@angular/cdk-experimental 20.0.0-next.0 → 20.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,607 @@
1
+ import { signal, computed } from '@angular/core';
2
+
3
+ /** Bit flag representation of the possible modifier keys that can be present on an event. */
4
+ var ModifierKey;
5
+ (function (ModifierKey) {
6
+ ModifierKey[ModifierKey["None"] = 0] = "None";
7
+ ModifierKey[ModifierKey["Ctrl"] = 1] = "Ctrl";
8
+ ModifierKey[ModifierKey["Shift"] = 2] = "Shift";
9
+ ModifierKey[ModifierKey["Alt"] = 4] = "Alt";
10
+ ModifierKey[ModifierKey["Meta"] = 8] = "Meta";
11
+ })(ModifierKey || (ModifierKey = {}));
12
+ /**
13
+ * Abstract base class for all event managers.
14
+ *
15
+ * Event managers are designed to normalize how event handlers are authored and create a safety net
16
+ * for common event handling gotchas like remembering to call preventDefault or stopPropagation.
17
+ */
18
+ class EventManager {
19
+ configs = [];
20
+ /** Runs the handlers that match with the given event. */
21
+ handle(event) {
22
+ for (const config of this.configs) {
23
+ if (config.matcher(event)) {
24
+ config.handler(event);
25
+ if (config.preventDefault) {
26
+ event.preventDefault();
27
+ }
28
+ if (config.stopPropagation) {
29
+ event.stopPropagation();
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ /** Gets bit flag representation of the modifier keys present on the given event. */
36
+ function getModifiers(event) {
37
+ return ((+event.ctrlKey && ModifierKey.Ctrl) |
38
+ (+event.shiftKey && ModifierKey.Shift) |
39
+ (+event.altKey && ModifierKey.Alt) |
40
+ (+event.metaKey && ModifierKey.Meta));
41
+ }
42
+ /**
43
+ * Checks if the given event has modifiers that are an exact match for any of the given modifier
44
+ * flag combinations.
45
+ */
46
+ function hasModifiers(event, modifiers) {
47
+ const eventModifiers = getModifiers(event);
48
+ const modifiersList = Array.isArray(modifiers) ? modifiers : [modifiers];
49
+ return modifiersList.some(modifiers => eventModifiers === modifiers);
50
+ }
51
+
52
+ /**
53
+ * An event manager that is specialized for handling keyboard events. By default this manager stops
54
+ * propagation and prevents default on all events it handles.
55
+ */
56
+ class KeyboardEventManager extends EventManager {
57
+ options = {
58
+ preventDefault: true,
59
+ stopPropagation: true,
60
+ };
61
+ on(...args) {
62
+ const { modifiers, key, handler } = this._normalizeInputs(...args);
63
+ this.configs.push({
64
+ handler: handler,
65
+ matcher: event => this._isMatch(event, key, modifiers),
66
+ ...this.options,
67
+ });
68
+ return this;
69
+ }
70
+ _normalizeInputs(...args) {
71
+ const key = args.length === 3 ? args[1] : args[0];
72
+ const handler = args.length === 3 ? args[2] : args[1];
73
+ const modifiers = args.length === 3 ? args[0] : ModifierKey.None;
74
+ return {
75
+ key: key,
76
+ handler: handler,
77
+ modifiers: modifiers,
78
+ };
79
+ }
80
+ _isMatch(event, key, modifiers) {
81
+ if (key instanceof RegExp) {
82
+ return key.test(event.key);
83
+ }
84
+ const keyStr = typeof key === 'string' ? key : key();
85
+ return keyStr.toLowerCase() === event.key.toLowerCase() && hasModifiers(event, modifiers);
86
+ }
87
+ }
88
+
89
+ /**
90
+ * The different mouse buttons that may appear on a pointer event.
91
+ */
92
+ var MouseButton;
93
+ (function (MouseButton) {
94
+ MouseButton[MouseButton["Main"] = 0] = "Main";
95
+ MouseButton[MouseButton["Auxiliary"] = 1] = "Auxiliary";
96
+ MouseButton[MouseButton["Secondary"] = 2] = "Secondary";
97
+ })(MouseButton || (MouseButton = {}));
98
+ /** An event manager that is specialized for handling pointer events. */
99
+ class PointerEventManager extends EventManager {
100
+ options = {
101
+ preventDefault: false,
102
+ stopPropagation: false,
103
+ };
104
+ on(...args) {
105
+ const { button, handler, modifiers } = this._normalizeInputs(...args);
106
+ this.configs.push({
107
+ handler,
108
+ matcher: event => this._isMatch(event, button, modifiers),
109
+ ...this.options,
110
+ });
111
+ return this;
112
+ }
113
+ _normalizeInputs(...args) {
114
+ if (args.length === 3) {
115
+ return {
116
+ button: args[0],
117
+ modifiers: args[1],
118
+ handler: args[2],
119
+ };
120
+ }
121
+ if (typeof args[0] === 'number' && typeof args[1] === 'function') {
122
+ return {
123
+ button: MouseButton.Main,
124
+ modifiers: args[0],
125
+ handler: args[1],
126
+ };
127
+ }
128
+ return {
129
+ button: MouseButton.Main,
130
+ modifiers: ModifierKey.None,
131
+ handler: args[0],
132
+ };
133
+ }
134
+ _isMatch(event, button, modifiers) {
135
+ return button === (event.button ?? 0) && hasModifiers(event, modifiers);
136
+ }
137
+ }
138
+
139
+ /** Controls selection for a list of items. */
140
+ class ListSelection {
141
+ inputs;
142
+ /** The id of the most recently selected item. */
143
+ previousSelectedId = signal(undefined);
144
+ /** The navigation controller of the parent list. */
145
+ navigation;
146
+ constructor(inputs) {
147
+ this.inputs = inputs;
148
+ this.navigation = inputs.navigation;
149
+ }
150
+ /** Selects the item at the current active index. */
151
+ select(item) {
152
+ item = item ?? this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];
153
+ if (item.disabled() || this.inputs.selectedIds().includes(item.id())) {
154
+ return;
155
+ }
156
+ if (!this.inputs.multiselectable()) {
157
+ this.deselectAll();
158
+ }
159
+ // TODO: Need to discuss when to drop this.
160
+ this._anchor();
161
+ this.inputs.selectedIds.update(ids => ids.concat(item.id()));
162
+ }
163
+ /** Deselects the item at the current active index. */
164
+ deselect(item) {
165
+ item = item ?? this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];
166
+ if (!item.disabled()) {
167
+ this.inputs.selectedIds.update(ids => ids.filter(id => id !== item.id()));
168
+ }
169
+ }
170
+ /** Toggles the item at the current active index. */
171
+ toggle() {
172
+ const item = this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];
173
+ this.inputs.selectedIds().includes(item.id()) ? this.deselect() : this.select();
174
+ }
175
+ /** Toggles only the item at the current active index. */
176
+ toggleOne() {
177
+ const item = this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];
178
+ this.inputs.selectedIds().includes(item.id()) ? this.deselect() : this.selectOne();
179
+ }
180
+ /** Selects all items in the list. */
181
+ selectAll() {
182
+ if (!this.inputs.multiselectable()) {
183
+ return; // Should we log a warning?
184
+ }
185
+ for (const item of this.inputs.items()) {
186
+ this.select(item);
187
+ }
188
+ this._anchor();
189
+ }
190
+ /** Deselects all items in the list. */
191
+ deselectAll() {
192
+ for (const item of this.inputs.items()) {
193
+ this.deselect(item);
194
+ }
195
+ }
196
+ /** Selects the items in the list starting at the last selected item. */
197
+ selectFromPrevSelectedItem() {
198
+ const prevSelectedId = this.inputs.items().findIndex(i => this.previousSelectedId() === i.id());
199
+ this._selectFromIndex(prevSelectedId);
200
+ }
201
+ /** Selects the items in the list starting at the last active item. */
202
+ selectFromActive() {
203
+ this._selectFromIndex(this.inputs.navigation.prevActiveIndex());
204
+ }
205
+ /** Selects the items in the list starting at the given index. */
206
+ _selectFromIndex(index) {
207
+ if (index === -1) {
208
+ return;
209
+ }
210
+ const upper = Math.max(this.inputs.navigation.inputs.activeIndex(), index);
211
+ const lower = Math.min(this.inputs.navigation.inputs.activeIndex(), index);
212
+ for (let i = lower; i <= upper; i++) {
213
+ this.select(this.inputs.items()[i]);
214
+ }
215
+ }
216
+ /** Sets the selection to only the current active item. */
217
+ selectOne() {
218
+ this.deselectAll();
219
+ this.select();
220
+ }
221
+ /** Sets the anchor to the current active index. */
222
+ _anchor() {
223
+ const item = this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];
224
+ this.previousSelectedId.set(item.id());
225
+ }
226
+ }
227
+
228
+ /** Controls typeahead for a list of items. */
229
+ class ListTypeahead {
230
+ inputs;
231
+ /** A reference to the timeout for resetting the typeahead search. */
232
+ timeout;
233
+ /** The navigation controller of the parent list. */
234
+ navigation;
235
+ /** Keeps track of the characters that typeahead search is being called with. */
236
+ _query = signal('');
237
+ /** The index where that the typeahead search was initiated from. */
238
+ _startIndex = signal(undefined);
239
+ constructor(inputs) {
240
+ this.inputs = inputs;
241
+ this.navigation = inputs.navigation;
242
+ }
243
+ /** Performs a typeahead search, appending the given character to the search string. */
244
+ search(char) {
245
+ if (char.length !== 1) {
246
+ return;
247
+ }
248
+ if (this._startIndex() === undefined) {
249
+ this._startIndex.set(this.navigation.inputs.activeIndex());
250
+ }
251
+ clearTimeout(this.timeout);
252
+ this._query.update(q => q + char.toLowerCase());
253
+ const item = this._getItem();
254
+ if (item) {
255
+ this.navigation.goto(item);
256
+ }
257
+ this.timeout = setTimeout(() => {
258
+ this._query.set('');
259
+ this._startIndex.set(undefined);
260
+ }, this.inputs.typeaheadDelay() * 1000);
261
+ }
262
+ /**
263
+ * Returns the first item whose search term matches the
264
+ * current query starting from the the current anchor index.
265
+ */
266
+ _getItem() {
267
+ let items = this.navigation.inputs.items();
268
+ const after = items.slice(this._startIndex() + 1);
269
+ const before = items.slice(0, this._startIndex());
270
+ items = this.navigation.inputs.wrap() ? after.concat(before) : after; // TODO: Always wrap?
271
+ items.push(this.navigation.inputs.items()[this._startIndex()]);
272
+ const focusableItems = [];
273
+ for (const item of items) {
274
+ if (this.navigation.isFocusable(item)) {
275
+ focusableItems.push(item);
276
+ }
277
+ }
278
+ return focusableItems.find(i => i.searchTerm().toLowerCase().startsWith(this._query()));
279
+ }
280
+ }
281
+
282
+ /** Controls navigation for a list of items. */
283
+ class ListNavigation {
284
+ inputs;
285
+ /** The last index that was active. */
286
+ prevActiveIndex = signal(0);
287
+ constructor(inputs) {
288
+ this.inputs = inputs;
289
+ this.prevActiveIndex.set(inputs.activeIndex());
290
+ }
291
+ /** Navigates to the given item. */
292
+ goto(item) {
293
+ if (this.isFocusable(item)) {
294
+ this.prevActiveIndex.set(this.inputs.activeIndex());
295
+ const index = this.inputs.items().indexOf(item);
296
+ this.inputs.activeIndex.set(index);
297
+ }
298
+ }
299
+ /** Navigates to the next item in the list. */
300
+ next() {
301
+ this._advance(1);
302
+ }
303
+ /** Navigates to the previous item in the list. */
304
+ prev() {
305
+ this._advance(-1);
306
+ }
307
+ /** Navigates to the first item in the list. */
308
+ first() {
309
+ const item = this.inputs.items().find(i => this.isFocusable(i));
310
+ if (item) {
311
+ this.goto(item);
312
+ }
313
+ }
314
+ /** Navigates to the last item in the list. */
315
+ last() {
316
+ const items = this.inputs.items();
317
+ for (let i = items.length - 1; i >= 0; i--) {
318
+ if (this.isFocusable(items[i])) {
319
+ this.goto(items[i]);
320
+ return;
321
+ }
322
+ }
323
+ }
324
+ /** Returns true if the given item can be navigated to. */
325
+ isFocusable(item) {
326
+ return !item.disabled() || !this.inputs.skipDisabled();
327
+ }
328
+ /** Advances to the next or previous focusable item in the list based on the given delta. */
329
+ _advance(delta) {
330
+ const items = this.inputs.items();
331
+ const itemCount = items.length;
332
+ const startIndex = this.inputs.activeIndex();
333
+ const step = (i) => this.inputs.wrap() ? (i + delta + itemCount) % itemCount : i + delta;
334
+ // If wrapping is enabled, this loop ultimately terminates when `i` gets back to `startIndex`
335
+ // in the case that all options are disabled. If wrapping is disabled, the loop terminates
336
+ // when the index goes out of bounds.
337
+ for (let i = step(startIndex); i !== startIndex && i < itemCount && i >= 0; i = step(i)) {
338
+ if (this.isFocusable(items[i])) {
339
+ this.goto(items[i]);
340
+ return;
341
+ }
342
+ }
343
+ }
344
+ }
345
+
346
+ /** Controls focus for a list of items. */
347
+ class ListFocus {
348
+ inputs;
349
+ /** The navigation controller of the parent list. */
350
+ navigation;
351
+ constructor(inputs) {
352
+ this.inputs = inputs;
353
+ this.navigation = inputs.navigation;
354
+ }
355
+ /** The id of the current active item. */
356
+ getActiveDescendant() {
357
+ if (this.inputs.focusMode() === 'roving') {
358
+ return undefined;
359
+ }
360
+ return this.navigation.inputs.items()[this.navigation.inputs.activeIndex()].id();
361
+ }
362
+ /** The tabindex for the list. */
363
+ getListTabindex() {
364
+ return this.inputs.focusMode() === 'activedescendant' ? 0 : -1;
365
+ }
366
+ /** Returns the tabindex for the given item. */
367
+ getItemTabindex(item) {
368
+ if (this.inputs.focusMode() === 'activedescendant') {
369
+ return -1;
370
+ }
371
+ const index = this.navigation.inputs.items().indexOf(item);
372
+ return this.navigation.inputs.activeIndex() === index ? 0 : -1;
373
+ }
374
+ /** Focuses the current active item. */
375
+ focus() {
376
+ if (this.inputs.focusMode() === 'activedescendant') {
377
+ return;
378
+ }
379
+ const item = this.navigation.inputs.items()[this.navigation.inputs.activeIndex()];
380
+ item.element().focus();
381
+ }
382
+ }
383
+
384
+ /** Controls the state of a listbox. */
385
+ class ListboxPattern {
386
+ inputs;
387
+ /** Controls navigation for the listbox. */
388
+ navigation;
389
+ /** Controls selection for the listbox. */
390
+ selection;
391
+ /** Controls typeahead for the listbox. */
392
+ typeahead;
393
+ /** Controls focus for the listbox. */
394
+ focusManager;
395
+ /** Whether the list is vertically or horizontally oriented. */
396
+ orientation;
397
+ /** Whether the listbox is disabled. */
398
+ disabled;
399
+ /** The tabindex of the listbox. */
400
+ tabindex = computed(() => this.focusManager.getListTabindex());
401
+ /** The id of the current active item. */
402
+ activedescendant = computed(() => this.focusManager.getActiveDescendant());
403
+ /** Whether multiple items in the list can be selected at once. */
404
+ multiselectable;
405
+ /** The number of items in the listbox. */
406
+ setsize = computed(() => this.navigation.inputs.items().length);
407
+ /** Whether the listbox selection follows focus. */
408
+ followFocus = computed(() => this.inputs.selectionMode() === 'follow');
409
+ /** The key used to navigate to the previous item in the list. */
410
+ prevKey = computed(() => {
411
+ if (this.inputs.orientation() === 'vertical') {
412
+ return 'ArrowUp';
413
+ }
414
+ return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
415
+ });
416
+ /** The key used to navigate to the next item in the list. */
417
+ nextKey = computed(() => {
418
+ if (this.inputs.orientation() === 'vertical') {
419
+ return 'ArrowDown';
420
+ }
421
+ return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
422
+ });
423
+ /** The regexp used to decide if a key should trigger typeahead. */
424
+ typeaheadRegexp = /^.$/; // TODO: Ignore spaces?
425
+ /** The keydown event manager for the listbox. */
426
+ keydown = computed(() => {
427
+ const manager = new KeyboardEventManager();
428
+ if (!this.followFocus()) {
429
+ manager
430
+ .on(this.prevKey, () => this.prev())
431
+ .on(this.nextKey, () => this.next())
432
+ .on('Home', () => this.first())
433
+ .on('End', () => this.last())
434
+ .on(this.typeaheadRegexp, e => this.search(e.key));
435
+ }
436
+ if (this.followFocus()) {
437
+ manager
438
+ .on(this.prevKey, () => this.prev({ selectOne: true }))
439
+ .on(this.nextKey, () => this.next({ selectOne: true }))
440
+ .on('Home', () => this.first({ selectOne: true }))
441
+ .on('End', () => this.last({ selectOne: true }))
442
+ .on(this.typeaheadRegexp, e => this.search(e.key, { selectOne: true }));
443
+ }
444
+ if (this.inputs.multiselectable()) {
445
+ manager
446
+ .on(ModifierKey.Shift, ' ', () => this._updateSelection({ selectFromAnchor: true }))
447
+ .on(ModifierKey.Shift, 'Enter', () => this._updateSelection({ selectFromAnchor: true }))
448
+ .on(ModifierKey.Shift, this.prevKey, () => this.prev({ toggle: true }))
449
+ .on(ModifierKey.Shift, this.nextKey, () => this.next({ toggle: true }))
450
+ .on(ModifierKey.Ctrl | ModifierKey.Shift, 'Home', () => this.first({ selectFromActive: true }))
451
+ .on(ModifierKey.Ctrl | ModifierKey.Shift, 'End', () => this.last({ selectFromActive: true }))
452
+ .on(ModifierKey.Ctrl, 'A', () => this._updateSelection({ selectAll: true }));
453
+ }
454
+ if (!this.followFocus() && this.inputs.multiselectable()) {
455
+ manager.on(' ', () => this._updateSelection({ toggle: true }));
456
+ manager.on('Enter', () => this._updateSelection({ toggle: true }));
457
+ }
458
+ if (!this.followFocus() && !this.inputs.multiselectable()) {
459
+ manager.on(' ', () => this._updateSelection({ toggleOne: true }));
460
+ manager.on('Enter', () => this._updateSelection({ toggleOne: true }));
461
+ }
462
+ if (this.inputs.multiselectable() && this.followFocus()) {
463
+ manager
464
+ .on(ModifierKey.Ctrl, this.prevKey, () => this.prev())
465
+ .on(ModifierKey.Ctrl, this.nextKey, () => this.next())
466
+ .on(ModifierKey.Ctrl, 'Home', () => this.first()) // TODO: Not in spec but prob should be.
467
+ .on(ModifierKey.Ctrl, 'End', () => this.last()); // TODO: Not in spec but prob should be.
468
+ }
469
+ return manager;
470
+ });
471
+ /** The pointerdown event manager for the listbox. */
472
+ pointerdown = computed(() => {
473
+ const manager = new PointerEventManager();
474
+ if (this.inputs.multiselectable()) {
475
+ manager
476
+ .on(e => this.goto(e, { toggle: true }))
477
+ .on(ModifierKey.Shift, e => this.goto(e, { selectFromActive: true }));
478
+ }
479
+ else {
480
+ manager.on(e => this.goto(e, { toggleOne: true }));
481
+ }
482
+ return manager;
483
+ });
484
+ constructor(inputs) {
485
+ this.inputs = inputs;
486
+ this.disabled = inputs.disabled;
487
+ this.orientation = inputs.orientation;
488
+ this.multiselectable = inputs.multiselectable;
489
+ this.navigation = new ListNavigation(inputs);
490
+ this.selection = new ListSelection({ ...inputs, navigation: this.navigation });
491
+ this.typeahead = new ListTypeahead({ ...inputs, navigation: this.navigation });
492
+ this.focusManager = new ListFocus({ ...inputs, navigation: this.navigation });
493
+ }
494
+ /** Handles keydown events for the listbox. */
495
+ onKeydown(event) {
496
+ if (!this.disabled()) {
497
+ this.keydown().handle(event);
498
+ }
499
+ }
500
+ onPointerdown(event) {
501
+ if (!this.disabled()) {
502
+ this.pointerdown().handle(event);
503
+ }
504
+ }
505
+ /** Navigates to the first option in the listbox. */
506
+ first(opts) {
507
+ this.navigation.first();
508
+ this.focusManager.focus();
509
+ this._updateSelection(opts);
510
+ }
511
+ /** Navigates to the last option in the listbox. */
512
+ last(opts) {
513
+ this.navigation.last();
514
+ this.focusManager.focus();
515
+ this._updateSelection(opts);
516
+ }
517
+ /** Navigates to the next option in the listbox. */
518
+ next(opts) {
519
+ this.navigation.next();
520
+ this.focusManager.focus();
521
+ this._updateSelection(opts);
522
+ }
523
+ /** Navigates to the previous option in the listbox. */
524
+ prev(opts) {
525
+ this.navigation.prev();
526
+ this.focusManager.focus();
527
+ this._updateSelection(opts);
528
+ }
529
+ /** Navigates to the given item in the listbox. */
530
+ goto(event, opts) {
531
+ const item = this._getItem(event);
532
+ if (item) {
533
+ this.navigation.goto(item);
534
+ this.focusManager.focus();
535
+ this._updateSelection(opts);
536
+ }
537
+ }
538
+ /** Handles typeahead search navigation for the listbox. */
539
+ search(char, opts) {
540
+ this.typeahead.search(char);
541
+ this.focusManager.focus();
542
+ this._updateSelection(opts);
543
+ }
544
+ /** Handles updating selection for the listbox. */
545
+ _updateSelection(opts) {
546
+ if (opts?.select) {
547
+ this.selection.select();
548
+ }
549
+ if (opts?.toggle) {
550
+ this.selection.toggle();
551
+ }
552
+ if (opts?.toggleOne) {
553
+ this.selection.toggleOne();
554
+ }
555
+ if (opts?.selectOne) {
556
+ this.selection.selectOne();
557
+ }
558
+ if (opts?.selectAll) {
559
+ this.selection.selectAll();
560
+ }
561
+ if (opts?.selectFromAnchor) {
562
+ this.selection.selectFromPrevSelectedItem();
563
+ }
564
+ if (opts?.selectFromActive) {
565
+ this.selection.selectFromActive();
566
+ }
567
+ }
568
+ _getItem(e) {
569
+ if (!(e.target instanceof HTMLElement)) {
570
+ return;
571
+ }
572
+ const element = e.target.closest('[cdkoption]'); // TODO: Use a different identifier.
573
+ return this.inputs.items().find(i => i.element() === element);
574
+ }
575
+ }
576
+
577
+ /** Represents an option in a listbox. */
578
+ class OptionPattern {
579
+ /** A unique identifier for the option. */
580
+ id;
581
+ /** The position of the option in the list. */
582
+ index = computed(() => this.listbox()
583
+ .navigation.inputs.items()
584
+ .findIndex(i => i.id() === this.id()) ?? -1);
585
+ /** Whether the option is selected. */
586
+ selected = computed(() => this.listbox().selection.inputs.selectedIds().includes(this.id()));
587
+ /** Whether the option is disabled. */
588
+ disabled;
589
+ /** The text used by the typeahead search. */
590
+ searchTerm;
591
+ /** A reference to the parent listbox. */
592
+ listbox;
593
+ /** The tabindex of the option. */
594
+ tabindex = computed(() => this.listbox().focusManager.getItemTabindex(this));
595
+ /** The html element that should receive focus. */
596
+ element;
597
+ constructor(args) {
598
+ this.id = args.id;
599
+ this.listbox = args.listbox;
600
+ this.element = args.element;
601
+ this.disabled = args.disabled;
602
+ this.searchTerm = args.searchTerm;
603
+ }
604
+ }
605
+
606
+ export { ListboxPattern as L, OptionPattern as O };
607
+ //# sourceMappingURL=option-d2bb1041.mjs.map