@@ -58,18 +58,18 @@ export class CdkListbox implements OnDestroy {
5858 /** The directionality (LTR / RTL) context for the application (or a subtree of it). */
5959 private _dir = inject ( Directionality ) ;
6060
61- /** A signal wrapper for directionality. */
62- private directionality = signal < 'ltr' | 'rtl' > ( 'ltr' ) ;
63-
6461 /** The CdkOptions nested inside of the CdkListbox. */
6562 private _cdkOptions = contentChildren ( CdkOption , { descendants : true } ) ;
6663
67- /** The Option UIPatterns of the child CdkOptions. */
68- private items = computed ( ( ) => this . _cdkOptions ( ) . map ( option => option . pattern ) ) ;
69-
7064 /** Emits when the list has been destroyed. */
7165 private readonly _destroyed = new Subject < void > ( ) ;
7266
67+ /** A signal wrapper for directionality. */
68+ protected directionality = signal < 'ltr' | 'rtl' > ( 'ltr' ) ;
69+
70+ /** The Option UIPatterns of the child CdkOptions. */
71+ protected items = computed ( ( ) => this . _cdkOptions ( ) . map ( option => option . pattern ) ) ;
72+
7373 /** Whether the list is vertically or horizontally oriented. */
7474 orientation = input < 'vertical' | 'horizontal' > ( 'vertical' ) ;
7575
@@ -141,16 +141,16 @@ export class CdkOption {
141141 private _cdkListbox = inject ( CdkListbox ) ;
142142
143143 /** A unique identifier for the option. */
144- private id = computed ( ( ) => `${ count ++ } ` ) ;
144+ protected id = computed ( ( ) => `${ count ++ } ` ) ;
145145
146146 /** The text used by the typeahead search. */
147- private searchTerm = computed ( ( ) => this . label ( ) ?? this . element ( ) . textContent ) ;
147+ protected searchTerm = computed ( ( ) => this . label ( ) ?? this . element ( ) . textContent ) ;
148148
149149 /** The parent Listbox UIPattern. */
150- private listbox = computed ( ( ) => this . _cdkListbox . pattern ) ;
150+ protected listbox = computed ( ( ) => this . _cdkListbox . pattern ) ;
151151
152152 /** A reference to the option element to be focused on navigation. */
153- private element = computed ( ( ) => this . _elementRef . nativeElement ) ;
153+ protected element = computed ( ( ) => this . _elementRef . nativeElement ) ;
154154
155155 /** Whether an item is disabled. */
156156 disabled = input ( false , { transform : booleanAttribute } ) ;
0 commit comments