@rcarls/rc-select 0.0.0-next-20260921045401

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,1445 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/define.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "custom-element-definition",
12
+ "name": "rc-select",
13
+ "declaration": {
14
+ "name": "RCSelect",
15
+ "module": "/src/index.js"
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "*",
21
+ "declaration": {
22
+ "name": "*",
23
+ "module": "src/index.js"
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/index.ts",
31
+ "declarations": [],
32
+ "exports": [
33
+ {
34
+ "kind": "js",
35
+ "name": "*",
36
+ "declaration": {
37
+ "name": "*",
38
+ "module": "src/rc-select.js"
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "kind": "javascript-module",
45
+ "path": "src/rc-select.ts",
46
+ "declarations": [
47
+ {
48
+ "kind": "class",
49
+ "description": "Select-only combobox backed by a native <select>, following the WAI-ARIA Combobox\npattern.\n\nWraps a native `<select>` (default slot) as the form value reflector while\nrendering a custom button trigger and popup listbox. Popup placement\nand `aria-activedescendant` virtual keyboard navigation are supported.",
50
+ "name": "RCSelect",
51
+ "cssProperties": [
52
+ {
53
+ "description": "Maximum popup height.",
54
+ "name": "--rc-select-max-height",
55
+ "default": "20em"
56
+ },
57
+ {
58
+ "description": "Trigger block size.",
59
+ "name": "--rc-select-control-block-size",
60
+ "default": "var(--rc-control-block-size)"
61
+ },
62
+ {
63
+ "description": "Trigger block-axis padding.",
64
+ "name": "--rc-select-padding-block",
65
+ "default": "var(--rc-control-padding-block)"
66
+ },
67
+ {
68
+ "description": "Trigger inline-axis padding.",
69
+ "name": "--rc-select-padding-inline",
70
+ "default": "var(--rc-control-padding-inline)"
71
+ },
72
+ {
73
+ "description": "Gap between trigger content, chips, and icon.",
74
+ "name": "--rc-select-gap",
75
+ "default": "var(--rc-control-gap)"
76
+ },
77
+ {
78
+ "description": "Trigger border radius.",
79
+ "name": "--rc-select-radius",
80
+ "default": "var(--rc-control-radius)"
81
+ },
82
+ {
83
+ "description": "Trigger border.",
84
+ "name": "--rc-select-border",
85
+ "default": "var(--rc-border)"
86
+ },
87
+ {
88
+ "description": "Popup listbox border radius.",
89
+ "name": "--rc-select-listbox-radius",
90
+ "default": "var(--rc-control-radius)"
91
+ },
92
+ {
93
+ "description": "Popup listbox open/close fade transition duration.",
94
+ "name": "--rc-select-listbox-duration",
95
+ "default": "150ms"
96
+ },
97
+ {
98
+ "description": "Popup listbox border.",
99
+ "name": "--rc-select-listbox-border",
100
+ "default": "var(--rc-border)"
101
+ },
102
+ {
103
+ "description": "Popup listbox box shadow.",
104
+ "name": "--rc-select-shadow",
105
+ "default": "var(--rc-shadow)"
106
+ },
107
+ {
108
+ "description": "Popup listbox block padding.",
109
+ "name": "--rc-select-listbox-padding-block",
110
+ "default": "var(--rc-control-padding-block)"
111
+ },
112
+ {
113
+ "description": "Multi-select chip border radius.",
114
+ "name": "--rc-select-chip-radius",
115
+ "default": "var(--rc-radius-md)"
116
+ },
117
+ {
118
+ "description": "Multi-select chip block-axis padding.",
119
+ "name": "--rc-select-chip-padding-block",
120
+ "default": "0.1em"
121
+ },
122
+ {
123
+ "description": "Multi-select chip leading padding.",
124
+ "name": "--rc-select-chip-padding-inline-start",
125
+ "default": "0.3em"
126
+ },
127
+ {
128
+ "description": "Multi-select chip trailing padding, including the remove affordance.",
129
+ "name": "--rc-select-chip-padding-inline-end",
130
+ "default": "calc(var(--rc-chip-remove-target-size, 1.5rem) + var(--rc-chip-remove-offset-inline, 0.125rem))"
131
+ },
132
+ {
133
+ "description": "Gap between chip content items.",
134
+ "name": "--rc-select-chip-gap",
135
+ "default": "calc(var(--rc-control-gap, 0.25em) * 0.8)"
136
+ },
137
+ {
138
+ "description": "Multi-select chip border.",
139
+ "name": "--rc-select-chip-border",
140
+ "default": "var(--rc-border)"
141
+ },
142
+ {
143
+ "description": "Inherited remove-target width reserved by generated multi-select chips.",
144
+ "name": "--rc-chip-remove-target-size",
145
+ "default": "1.5rem"
146
+ },
147
+ {
148
+ "description": "Inherited edge offset reserved by generated multi-select chips.",
149
+ "name": "--rc-chip-remove-offset-inline",
150
+ "default": "0.125rem"
151
+ },
152
+ {
153
+ "description": "Inline size of the toggle indicator container.",
154
+ "name": "--rc-select-toggle-indicator-size",
155
+ "default": "1.1em"
156
+ },
157
+ {
158
+ "description": "Gap between fullscreen dialog regions.",
159
+ "name": "--rc-select-dialog-gap",
160
+ "default": "1rem"
161
+ },
162
+ {
163
+ "description": "Gap between fullscreen dialog header slots.",
164
+ "name": "--rc-select-dialog-header-gap",
165
+ "default": "0.5rem"
166
+ }
167
+ ],
168
+ "cssParts": [
169
+ {
170
+ "description": "The flex container wrapping chips and trigger.",
171
+ "name": "anchor"
172
+ },
173
+ {
174
+ "description": "The combobox trigger element (div).",
175
+ "name": "trigger"
176
+ },
177
+ {
178
+ "description": "The chips group container (when multiple).",
179
+ "name": "chips"
180
+ },
181
+ {
182
+ "description": "Individual chip (when multiple).",
183
+ "name": "chip"
184
+ },
185
+ {
186
+ "description": "Text label inside a chip.",
187
+ "name": "chip-label"
188
+ },
189
+ {
190
+ "description": "Remove button inside a chip.",
191
+ "name": "chip-remove"
192
+ },
193
+ {
194
+ "description": "The text label showing selected value(s).",
195
+ "name": "value-display"
196
+ },
197
+ {
198
+ "description": "The open/close indicator container.",
199
+ "name": "toggle-indicator"
200
+ },
201
+ {
202
+ "description": "The `<rc-listbox>` popup element.",
203
+ "name": "listbox"
204
+ },
205
+ {
206
+ "description": "Dialog popup surface.",
207
+ "name": "dialog"
208
+ },
209
+ {
210
+ "description": "Managed leading/title/trailing header.",
211
+ "name": "dialog-header"
212
+ },
213
+ {
214
+ "description": "Leading button that discards pending changes.",
215
+ "name": "dialog-cancel"
216
+ },
217
+ {
218
+ "description": "Decorative close icon inside the cancel button.",
219
+ "name": "dialog-cancel-icon"
220
+ },
221
+ {
222
+ "description": "Visible dialog title.",
223
+ "name": "dialog-title"
224
+ },
225
+ {
226
+ "description": "Scrollable pending-selection chip region.",
227
+ "name": "dialog-selected"
228
+ },
229
+ {
230
+ "description": "Dialog confirmation action group.",
231
+ "name": "dialog-actions"
232
+ },
233
+ {
234
+ "description": "Commits pending changes and closes the dialog.",
235
+ "name": "dialog-confirm"
236
+ },
237
+ {
238
+ "description": "Dialog option list.",
239
+ "name": "dialog-listbox"
240
+ }
241
+ ],
242
+ "slots": [
243
+ {
244
+ "description": "Required. A native `<select>` element used for form submission and as the source of truth for options, multiple, and disabled state.",
245
+ "name": ""
246
+ },
247
+ {
248
+ "description": "Optional. Replaces the default value label in the trigger.",
249
+ "name": "display"
250
+ },
251
+ {
252
+ "description": "Optional. Replaces the default chevron indicator. Accepts any element(s); the container shifts to inline-start in RTL via flex direction.",
253
+ "name": "toggle-indicator"
254
+ }
255
+ ],
256
+ "members": [
257
+ {
258
+ "kind": "field",
259
+ "name": "open",
260
+ "type": {
261
+ "text": "boolean"
262
+ },
263
+ "default": "false",
264
+ "description": "Reflects whether the popup listbox is open.",
265
+ "attribute": "open",
266
+ "reflects": true
267
+ },
268
+ {
269
+ "kind": "field",
270
+ "name": "multiple",
271
+ "type": {
272
+ "text": "boolean"
273
+ },
274
+ "default": "false",
275
+ "description": "Enables selection of multiple options simultaneously.",
276
+ "attribute": "multiple",
277
+ "reflects": true
278
+ },
279
+ {
280
+ "kind": "field",
281
+ "name": "disabled",
282
+ "type": {
283
+ "text": "boolean"
284
+ },
285
+ "default": "false",
286
+ "description": "Disables the trigger and prevents the popup from opening.",
287
+ "attribute": "disabled",
288
+ "reflects": true
289
+ },
290
+ {
291
+ "kind": "field",
292
+ "name": "required",
293
+ "type": {
294
+ "text": "boolean"
295
+ },
296
+ "default": "false",
297
+ "description": "Mirrors the slotted native `<select>`'s own `required`, for `aria-required` on the trigger.\nRead-only in practice: set `required` on the slotted `<select>` itself, the source of truth\nfor form participation and constraint validation.",
298
+ "attribute": "required",
299
+ "reflects": true
300
+ },
301
+ {
302
+ "kind": "field",
303
+ "name": "placeholder",
304
+ "type": {
305
+ "text": "string"
306
+ },
307
+ "default": "''",
308
+ "description": "Text shown in the trigger when no value is selected.",
309
+ "attribute": "placeholder"
310
+ },
311
+ {
312
+ "kind": "field",
313
+ "name": "display",
314
+ "type": {
315
+ "text": "'auto' | 'chips' | 'compact'"
316
+ },
317
+ "default": "'auto'",
318
+ "description": "Controls how selected values appear in the trigger.\n\n- `'chips'` — each selected value renders as a removable chip.\n- `'compact'` — selected values are summarized as \"First, +N more\".\n- `'auto'` — uses `'chips'` on pointer devices and `'compact'` on touch.",
319
+ "attribute": "display"
320
+ },
321
+ {
322
+ "kind": "field",
323
+ "name": "popupMode",
324
+ "type": {
325
+ "text": "RCSelectPopupMode"
326
+ },
327
+ "default": "'popover'",
328
+ "description": "Presents options in an anchored popover or transactional modal dialog.",
329
+ "attribute": "popup-mode",
330
+ "reflects": true
331
+ },
332
+ {
333
+ "kind": "field",
334
+ "name": "dialogConfirmLabel",
335
+ "type": {
336
+ "text": "string"
337
+ },
338
+ "default": "'Done'",
339
+ "description": "Text for the dialog confirmation action.",
340
+ "attribute": "dialog-confirm-label"
341
+ },
342
+ {
343
+ "kind": "field",
344
+ "name": "dialogCancelLabel",
345
+ "type": {
346
+ "text": "string"
347
+ },
348
+ "default": "'Cancel'",
349
+ "description": "Accessible label for the leading dialog cancel action.",
350
+ "attribute": "dialog-cancel-label"
351
+ },
352
+ {
353
+ "kind": "field",
354
+ "name": "dialogCancelButton",
355
+ "type": {
356
+ "text": "'visible' | 'hidden'"
357
+ },
358
+ "default": "'visible'",
359
+ "description": "Whether the leading dialog cancel action is visible.",
360
+ "attribute": "dialog-cancel-button",
361
+ "reflects": true
362
+ },
363
+ {
364
+ "kind": "field",
365
+ "name": "_$anchor",
366
+ "type": {
367
+ "text": "HTMLElement"
368
+ },
369
+ "privacy": "protected",
370
+ "description": "Flex container used by `_anchorCtrl` as the positioning reference for the popup."
371
+ },
372
+ {
373
+ "kind": "field",
374
+ "name": "_$trigger",
375
+ "type": {
376
+ "text": "HTMLElement"
377
+ },
378
+ "privacy": "protected",
379
+ "description": "The combobox trigger div.\n\nOwns `role=\"combobox\"`, `aria-activedescendant`,\n`aria-expanded`, and receives focus during keyboard navigation."
380
+ },
381
+ {
382
+ "kind": "field",
383
+ "name": "_$listbox",
384
+ "type": {
385
+ "text": "RCListbox"
386
+ },
387
+ "privacy": "protected",
388
+ "description": "The `<rc-listbox>` popup. Receives option lists and selected-value updates from the host."
389
+ },
390
+ {
391
+ "kind": "field",
392
+ "name": "_$dialogHost",
393
+ "type": {
394
+ "text": "RCDialog | undefined"
395
+ },
396
+ "privacy": "protected"
397
+ },
398
+ {
399
+ "kind": "field",
400
+ "name": "_selectedValues",
401
+ "type": {
402
+ "text": "Set<string>"
403
+ },
404
+ "privacy": "protected",
405
+ "default": "new Set()",
406
+ "description": "Reactive set of currently selected option values.\n\nDrive changes through `_applySelection` rather than mutating this directly\nso the listbox and native `<select>` stay in sync."
407
+ },
408
+ {
409
+ "kind": "field",
410
+ "name": "_pendingSelectedValues",
411
+ "type": {
412
+ "text": "Set<string> | null"
413
+ },
414
+ "privacy": "protected",
415
+ "default": "null",
416
+ "description": "Transaction-local selection while a dialog popup is open."
417
+ },
418
+ {
419
+ "kind": "field",
420
+ "name": "_accessibleName",
421
+ "type": {
422
+ "text": "string"
423
+ },
424
+ "privacy": "protected",
425
+ "default": "''"
426
+ },
427
+ {
428
+ "kind": "field",
429
+ "name": "_activePopupMode",
430
+ "type": {
431
+ "text": "RCSelectPopupMode"
432
+ },
433
+ "privacy": "protected",
434
+ "default": "'popover'"
435
+ },
436
+ {
437
+ "kind": "field",
438
+ "name": "_chipNavIndex",
439
+ "type": {
440
+ "text": "number"
441
+ },
442
+ "privacy": "protected",
443
+ "default": "-1",
444
+ "description": "Index into the chip button array for roving-tabindex chip navigation.\n\n`-1` means focus is on the trigger."
445
+ },
446
+ {
447
+ "kind": "field",
448
+ "name": "_options",
449
+ "type": {
450
+ "text": "ListboxOption[]"
451
+ },
452
+ "privacy": "protected",
453
+ "default": "[]",
454
+ "description": "The resolved option list, as rendered in the listbox.\n\n`_options` is sourced from the `options` property or the slotted `<select>`."
455
+ },
456
+ {
457
+ "kind": "field",
458
+ "name": "_$selectRef",
459
+ "type": {
460
+ "text": "WeakRef<HTMLSelectElement> | null"
461
+ },
462
+ "privacy": "protected",
463
+ "default": "null",
464
+ "description": "WeakRef to the slotted `<select>`. Refreshed on every `slotchange`; `null` when absent."
465
+ },
466
+ {
467
+ "kind": "field",
468
+ "name": "_selectController",
469
+ "privacy": "protected",
470
+ "readonly": true,
471
+ "default": "new NativeChildController<HTMLSelectElement>(this, { selector: ':scope > select', observe: true, onChange: ($select) => this._setupSelect($select), onMissing: () => { if (import.meta.env.DEV) { warnMissingDirectChild(this, { selector: ':scope > select', message: '[rc-select] No direct child <select> found. Place a native <select> inside <rc-select>.', }); } }, })"
472
+ },
473
+ {
474
+ "kind": "field",
475
+ "name": "_mutationObserver",
476
+ "type": {
477
+ "text": "MutationObserver | null"
478
+ },
479
+ "privacy": "protected",
480
+ "default": "null",
481
+ "description": "Watches the slotted `<select>` for `childList`, `subtree`, and `attributes` changes\nso the option list and disabled/multiple state stay in sync with author mutations."
482
+ },
483
+ {
484
+ "kind": "field",
485
+ "name": "_defaultValue",
486
+ "type": {
487
+ "text": "RCSelectValue | undefined"
488
+ },
489
+ "privacy": "private"
490
+ },
491
+ {
492
+ "kind": "field",
493
+ "name": "_propertyOptions",
494
+ "type": {
495
+ "text": "ListboxOption[] | undefined"
496
+ },
497
+ "privacy": "private"
498
+ },
499
+ {
500
+ "kind": "field",
501
+ "name": "_value",
502
+ "type": {
503
+ "text": "RCSelectValue | undefined"
504
+ },
505
+ "privacy": "private"
506
+ },
507
+ {
508
+ "kind": "field",
509
+ "name": "_selectionInitialized",
510
+ "type": {
511
+ "text": "boolean"
512
+ },
513
+ "privacy": "private",
514
+ "default": "false"
515
+ },
516
+ {
517
+ "kind": "field",
518
+ "name": "_pickerGuardActive",
519
+ "type": {
520
+ "text": "boolean"
521
+ },
522
+ "privacy": "protected",
523
+ "default": "false",
524
+ "description": "True while `_applyPickerGuard` has force-disabled the slotted multiple `<select>`."
525
+ },
526
+ {
527
+ "kind": "field",
528
+ "name": "_pickerGuardConsumerDisabled",
529
+ "type": {
530
+ "text": "boolean"
531
+ },
532
+ "privacy": "protected",
533
+ "default": "false",
534
+ "description": "Consumer's `disabled` state on the select before the picker guard forced it; restored on teardown."
535
+ },
536
+ {
537
+ "kind": "field",
538
+ "name": "_pickerGuardForm",
539
+ "type": {
540
+ "text": "HTMLFormElement | null"
541
+ },
542
+ "privacy": "protected",
543
+ "default": "null",
544
+ "description": "Form currently carrying the picker guard's `formdata` listener."
545
+ },
546
+ {
547
+ "kind": "field",
548
+ "name": "_typeAheadBuffer",
549
+ "type": {
550
+ "text": "string"
551
+ },
552
+ "privacy": "protected",
553
+ "default": "''",
554
+ "description": "Accumulated printable characters for type-ahead matching; cleared after 500 ms idle."
555
+ },
556
+ {
557
+ "kind": "field",
558
+ "name": "_typeAheadTimer",
559
+ "type": {
560
+ "text": "number"
561
+ },
562
+ "privacy": "protected",
563
+ "default": "0",
564
+ "description": "`window.setTimeout` handle for resetting `_typeAheadBuffer`; cancel before modifying."
565
+ },
566
+ {
567
+ "kind": "field",
568
+ "name": "_activeDescendantCtrl",
569
+ "privacy": "protected",
570
+ "default": "new ActiveDescendantController(this, { host: () => this._$activeDescendantHost, items: () => this._$listbox?.navigableItems ?? [], })",
571
+ "description": "Manages `aria-activedescendant` on `_$trigger` and keyboard cursor position\nwithin `_$listbox.navigableItems`."
572
+ },
573
+ {
574
+ "kind": "field",
575
+ "name": "_anchorCtrl",
576
+ "privacy": "protected",
577
+ "default": "new AnchorController(this, { anchor: () => this._$anchor ?? null, floating: () => this._$listbox ?? null, shadowHost: () => this, placement: 'bottom-start', offset: 2, })",
578
+ "description": "Manages CSS-anchored (or JS-fallback) placement of `_$listbox` relative to `_$anchor`."
579
+ },
580
+ {
581
+ "kind": "field",
582
+ "name": "_$activeDescendantHost",
583
+ "type": {
584
+ "text": "HTMLElement | null"
585
+ },
586
+ "privacy": "protected",
587
+ "description": "Element that owns `aria-activedescendant` for the currently rendered popup.",
588
+ "readonly": true
589
+ },
590
+ {
591
+ "kind": "method",
592
+ "name": "focus",
593
+ "return": {
594
+ "type": {
595
+ "text": "void"
596
+ }
597
+ },
598
+ "parameters": [
599
+ {
600
+ "name": "options",
601
+ "optional": true,
602
+ "type": {
603
+ "text": "FocusOptions"
604
+ }
605
+ }
606
+ ],
607
+ "description": "Forwards focus to the trigger. The host itself is never in the tab order, so without this\noverride, calling `.focus()` on `<rc-select>` (as `rc-field` does when treating it as a\ncontrol provider) would be a no-op."
608
+ },
609
+ {
610
+ "kind": "method",
611
+ "name": "blur",
612
+ "return": {
613
+ "type": {
614
+ "text": "void"
615
+ }
616
+ },
617
+ "description": "Forwards blur to the trigger; see `focus()`."
618
+ },
619
+ {
620
+ "kind": "method",
621
+ "name": "openPopup",
622
+ "description": "Opens the popup listbox if not already open or disabled."
623
+ },
624
+ {
625
+ "kind": "method",
626
+ "name": "closePopup",
627
+ "parameters": [
628
+ {
629
+ "name": "returnFocus",
630
+ "default": "true",
631
+ "description": "When `true` (default), returns focus to the trigger."
632
+ }
633
+ ],
634
+ "description": "Closes the popup listbox."
635
+ },
636
+ {
637
+ "kind": "field",
638
+ "name": "value",
639
+ "type": {
640
+ "text": "RCSelectValue"
641
+ },
642
+ "description": "Current selection. Host writes update selection silently; user interaction\nemits `rc-select-change`."
643
+ },
644
+ {
645
+ "kind": "field",
646
+ "name": "defaultValue",
647
+ "type": {
648
+ "text": "RCSelectValue | undefined"
649
+ },
650
+ "description": "Initial uncontrolled selection, applied before user or native state owns the value."
651
+ },
652
+ {
653
+ "kind": "field",
654
+ "name": "options",
655
+ "type": {
656
+ "text": "ListboxOption[] | undefined"
657
+ },
658
+ "description": "Programmatic option source. Omit to derive options from the slotted `<select>`."
659
+ },
660
+ {
661
+ "kind": "field",
662
+ "name": "selectedValues",
663
+ "type": {
664
+ "text": "string[]"
665
+ },
666
+ "description": "Selected values as a consistently-array-shaped convenience getter.",
667
+ "readonly": true
668
+ },
669
+ {
670
+ "kind": "field",
671
+ "name": "selectedOptions",
672
+ "type": {
673
+ "text": "ListboxSelectableOption[]"
674
+ },
675
+ "privacy": "protected",
676
+ "description": "`ListboxOption` objects for the current selection; falls back to label-only stubs for unknown values.",
677
+ "readonly": true
678
+ },
679
+ {
680
+ "kind": "method",
681
+ "name": "_applySelection",
682
+ "privacy": "protected",
683
+ "return": {
684
+ "type": {
685
+ "text": "void"
686
+ }
687
+ },
688
+ "parameters": [
689
+ {
690
+ "name": "values",
691
+ "type": {
692
+ "text": "string[]"
693
+ }
694
+ },
695
+ {
696
+ "name": "fromUser",
697
+ "default": "false",
698
+ "description": "Pass `true` only for a selection driven by real user interaction, so\n`_syncNativeSelect` dispatches native `input`/`change` on the underlying `<select>` (a\nprogrammatic `value`/`defaultValue` write is not a native interaction and relies on an\nexternal `sync()` call instead, the same as `rc-textarea`'s controlled-value contract)."
699
+ }
700
+ ],
701
+ "description": "Applies an already-normalized array of values as the current selection.\n\nIn single-select mode only the first value is kept. Syncs `_$listbox` and the\nnative `<select>` but does NOT dispatch `rc-select-change`."
702
+ },
703
+ {
704
+ "kind": "field",
705
+ "name": "_onDocClick",
706
+ "privacy": "protected",
707
+ "description": "Document-capture click handler that closes the popup when a click lands outside `this`."
708
+ },
709
+ {
710
+ "kind": "field",
711
+ "name": "_onDocKeyDown",
712
+ "privacy": "protected",
713
+ "description": "Document-capture keydown handler; closes the popup on `Escape`."
714
+ },
715
+ {
716
+ "kind": "field",
717
+ "name": "_onNativeSelectClick",
718
+ "privacy": "protected",
719
+ "description": "Suppress the native `<select>`'s default click action"
720
+ },
721
+ {
722
+ "kind": "method",
723
+ "name": "_applyPickerGuard",
724
+ "privacy": "protected",
725
+ "return": {
726
+ "type": {
727
+ "text": "void"
728
+ }
729
+ },
730
+ "parameters": [
731
+ {
732
+ "name": "$select",
733
+ "type": {
734
+ "text": "HTMLSelectElement"
735
+ }
736
+ }
737
+ ],
738
+ "description": "Countermeasure for select[\"multiple\"] bug in Firefox for Android / GeckoView.\n\nWorks around a GeckoView bug where tapping anywhere inside an\nancestor `<label>`'s bounds opens the native picker dialog of a wrapped\n`<select multiple>`, even though the select is hidden and the tap landed on this\ncomponent's own UI.\n\nLabel activation on a disabled control is a spec-defined no-op, so the slotted select\nis force-disabled after upgrade while it is `multiple`. A disabled select submits\nnothing, so form submission is restored by appending the current selection in a\n`formdata` listener on the owning form (`_handleFormData`). A disabled select is also\nbarred from native constraint validation, so `_handleFormSubmit` enforces its\n`ValidityState` at submit time instead.\n\nScoped to multiple selects: the single-select picker path is already suppressed by\n`_onNativeSelectClick`. Pre-upgrade behavior is unaffected — the guard\nonly applies once the component initializes."
739
+ },
740
+ {
741
+ "kind": "method",
742
+ "name": "_syncFormListeners",
743
+ "privacy": "protected",
744
+ "return": {
745
+ "type": {
746
+ "text": "void"
747
+ }
748
+ },
749
+ "parameters": [
750
+ {
751
+ "name": "$form",
752
+ "type": {
753
+ "text": "HTMLFormElement | null"
754
+ }
755
+ }
756
+ ],
757
+ "description": "Moves the picker guard's `formdata` and `submit` listeners to `$form`; pass `null` to detach."
758
+ },
759
+ {
760
+ "kind": "field",
761
+ "name": "_handleFormData",
762
+ "privacy": "protected",
763
+ "description": "Appends the current selection to the owning form's entry list.\n\nReplaces the submission the select would have produced were it\nnot force-disabled by `_applyPickerGuard`.\n\nAppend-only: entries from other same-named controls in the form\nare left alone."
764
+ },
765
+ {
766
+ "kind": "field",
767
+ "name": "_handleFormSubmit",
768
+ "privacy": "protected",
769
+ "description": "Enforces the slotted select's constraints at submit time.\n\nMirrors native scoping: skipped for `novalidate`\nforms and `formnovalidate` submitters, and never runs for `form.submit()`\n\nThe native validation bubble cannot render on a hidden control, so a\ncancelable `invalid` event is fired on the select (matching native\nreporting) and focus moves to the trigger unless the consumer cancels it."
770
+ },
771
+ {
772
+ "kind": "method",
773
+ "name": "_handleSelectSlotChange",
774
+ "privacy": "protected",
775
+ "description": "Resolves the slotted `<select>` on every `slotchange`, wires `_mutationObserver`,\nand seeds initial state via `queueMicrotask` to stay safe inside framework reactive passes."
776
+ },
777
+ {
778
+ "kind": "method",
779
+ "name": "_setupSelect",
780
+ "privacy": "protected",
781
+ "parameters": [
782
+ {
783
+ "name": "$select",
784
+ "type": {
785
+ "text": "HTMLSelectElement | null"
786
+ }
787
+ }
788
+ ]
789
+ },
790
+ {
791
+ "kind": "method",
792
+ "name": "_syncOptionsFromSelect",
793
+ "privacy": "protected",
794
+ "parameters": [
795
+ {
796
+ "name": "$select",
797
+ "type": {
798
+ "text": "HTMLSelectElement"
799
+ }
800
+ }
801
+ ],
802
+ "description": "Derives options from `$select` (or defers to `_propertyOptions` when set)\nand re-applies selection from the current authoritative source."
803
+ },
804
+ {
805
+ "kind": "method",
806
+ "name": "_applySelectionFromCurrentSource",
807
+ "privacy": "protected",
808
+ "return": {
809
+ "type": {
810
+ "text": "void"
811
+ }
812
+ },
813
+ "description": "Picks the correct selection source in priority order:\ncontrolled `_value` → `_defaultValue` → native `<select>` default/current state."
814
+ },
815
+ {
816
+ "kind": "method",
817
+ "name": "_syncOptions",
818
+ "privacy": "protected",
819
+ "return": {
820
+ "type": {
821
+ "text": "void"
822
+ }
823
+ },
824
+ "parameters": [
825
+ {
826
+ "name": "options",
827
+ "type": {
828
+ "text": "ListboxOption[]"
829
+ }
830
+ }
831
+ ],
832
+ "description": "Writes `_options` and pushes the list to `_$listbox` when it is mounted."
833
+ },
834
+ {
835
+ "kind": "method",
836
+ "name": "_currentOptions",
837
+ "privacy": "protected",
838
+ "return": {
839
+ "type": {
840
+ "text": "ListboxOption[]"
841
+ }
842
+ },
843
+ "description": "Returns `_propertyOptions` when set; otherwise reads live from the slotted `<select>`."
844
+ },
845
+ {
846
+ "kind": "method",
847
+ "name": "_optionsFromSelect",
848
+ "privacy": "protected",
849
+ "return": {
850
+ "type": {
851
+ "text": "ListboxOption[]"
852
+ }
853
+ },
854
+ "parameters": [
855
+ {
856
+ "name": "$select",
857
+ "type": {
858
+ "text": "HTMLSelectElement"
859
+ }
860
+ }
861
+ ],
862
+ "description": "Maps non-empty native `<option>` nodes to `ListboxOption` objects.\n\nOptions with empty `value` are skipped (placeholder guard)."
863
+ },
864
+ {
865
+ "kind": "method",
866
+ "name": "_selectedValuesFromNativeSelect",
867
+ "privacy": "protected",
868
+ "return": {
869
+ "type": {
870
+ "text": "string[]"
871
+ }
872
+ },
873
+ "description": "Returns values of currently selected `<option>` nodes; falls back to `selectedValues` when no native select is present."
874
+ },
875
+ {
876
+ "kind": "method",
877
+ "name": "_defaultSelectedValuesFromNativeSelect",
878
+ "privacy": "protected",
879
+ "return": {
880
+ "type": {
881
+ "text": "string[]"
882
+ }
883
+ },
884
+ "description": "Returns values of `defaultSelected` `<option>` nodes (author `selected` attribute); falls back to `selectedValues`."
885
+ },
886
+ {
887
+ "kind": "method",
888
+ "name": "_mirrorOptionsToNativeSelect",
889
+ "privacy": "protected",
890
+ "return": {
891
+ "type": {
892
+ "text": "void"
893
+ }
894
+ },
895
+ "description": "Rebuilds native `<select>` options from `_propertyOptions`.\n\nOnly runs when `_propertyOptions` is set; pauses then resumes `_mutationObserver`\nwhile writing to avoid re-entrant sync."
896
+ },
897
+ {
898
+ "kind": "method",
899
+ "name": "_addOption",
900
+ "privacy": "protected",
901
+ "return": {
902
+ "type": {
903
+ "text": "void"
904
+ }
905
+ },
906
+ "parameters": [
907
+ {
908
+ "name": "option",
909
+ "type": {
910
+ "text": "ListboxOption"
911
+ }
912
+ }
913
+ ],
914
+ "description": "Upserts a single option into `_options` (and `_propertyOptions` when set)\nand adds the corresponding `<option>` to the native `<select>` if absent."
915
+ },
916
+ {
917
+ "kind": "method",
918
+ "name": "_normalizeValue",
919
+ "privacy": "protected",
920
+ "return": {
921
+ "type": {
922
+ "text": "string[]"
923
+ }
924
+ },
925
+ "parameters": [
926
+ {
927
+ "name": "value",
928
+ "type": {
929
+ "text": "RCSelectValue"
930
+ }
931
+ }
932
+ ],
933
+ "description": "Coerces `RCSelectValue` (string or string[]) to `string[]`; returns `[]` for empty-string singles."
934
+ },
935
+ {
936
+ "kind": "method",
937
+ "name": "_syncAccessibleName",
938
+ "privacy": "protected",
939
+ "return": {
940
+ "type": {
941
+ "text": "void"
942
+ }
943
+ },
944
+ "parameters": [
945
+ {
946
+ "name": "$sel",
947
+ "type": {
948
+ "text": "HTMLSelectElement"
949
+ }
950
+ }
951
+ ],
952
+ "description": "Copies `aria-label` or first-label text from the native `<select>` to `_$trigger`.\n\nNo-op when the trigger already has an explicit `aria-label`."
953
+ },
954
+ {
955
+ "kind": "method",
956
+ "name": "_handleListboxChange",
957
+ "privacy": "protected",
958
+ "parameters": [
959
+ {
960
+ "name": "e",
961
+ "type": {
962
+ "text": "CustomEvent"
963
+ }
964
+ }
965
+ ],
966
+ "description": "Handles `rc-listbox-change` from the popup.\n\nStops propagation, mutates `_selectedValues`, syncs state, and fires\n`rc-select-change`."
967
+ },
968
+ {
969
+ "kind": "method",
970
+ "name": "_removeValue",
971
+ "privacy": "protected",
972
+ "parameters": [
973
+ {
974
+ "name": "value",
975
+ "type": {
976
+ "text": "string"
977
+ }
978
+ }
979
+ ],
980
+ "description": "Removes a single value from `_selectedValues`, syncs the listbox and native select, and dispatches `rc-select-change`."
981
+ },
982
+ {
983
+ "kind": "method",
984
+ "name": "_syncNativeSelect",
985
+ "privacy": "protected",
986
+ "parameters": [
987
+ {
988
+ "name": "fromUser",
989
+ "default": "false",
990
+ "description": "When `true`, also dispatches native `input` and `change` on `$select`\n(in that order, matching a real `<select>`) so outside listeners, including an\n`rc-field` ancestor treating this component as its control provider, observe the change."
991
+ }
992
+ ],
993
+ "description": "Flips `selected` on each `<option>` in the native `<select>` to match `_selectedValues`;\nno-op when no native select is present."
994
+ },
995
+ {
996
+ "kind": "method",
997
+ "name": "_dispatchChange",
998
+ "privacy": "protected",
999
+ "return": {
1000
+ "type": {
1001
+ "text": "void"
1002
+ }
1003
+ },
1004
+ "description": "Constructs and dispatches `rc-select-change` with current `value`, `selectedValues`, and `selectedOptions`."
1005
+ },
1006
+ {
1007
+ "kind": "method",
1008
+ "name": "_selectedOptionsFor",
1009
+ "privacy": "protected",
1010
+ "return": {
1011
+ "type": {
1012
+ "text": "ListboxSelectableOption[]"
1013
+ }
1014
+ },
1015
+ "parameters": [
1016
+ {
1017
+ "name": "values",
1018
+ "type": {
1019
+ "text": "string[]"
1020
+ }
1021
+ }
1022
+ ],
1023
+ "description": "Maps value strings to `ListboxOption` objects from `_options`; creates label-only fallback stubs for unknown values."
1024
+ },
1025
+ {
1026
+ "kind": "field",
1027
+ "name": "_effectiveDisplay",
1028
+ "type": {
1029
+ "text": "'chips' | 'compact'"
1030
+ },
1031
+ "privacy": "protected",
1032
+ "description": "Resolved display mode after `auto` pointer-detection: `'chips'` on fine-pointer devices, `'compact'` on coarse.",
1033
+ "readonly": true
1034
+ },
1035
+ {
1036
+ "kind": "method",
1037
+ "name": "_labelFor",
1038
+ "privacy": "protected",
1039
+ "return": {
1040
+ "type": {
1041
+ "text": "string"
1042
+ }
1043
+ },
1044
+ "parameters": [
1045
+ {
1046
+ "name": "value",
1047
+ "type": {
1048
+ "text": "string"
1049
+ }
1050
+ }
1051
+ ],
1052
+ "description": "Looks up the display label for `value` from native `<select>` option text; returns `value` itself as a fallback."
1053
+ },
1054
+ {
1055
+ "kind": "field",
1056
+ "name": "_displayLabel",
1057
+ "type": {
1058
+ "text": "string"
1059
+ },
1060
+ "privacy": "protected",
1061
+ "description": "Text shown in the trigger's value-display area; returns placeholder when chips are active or nothing is selected.",
1062
+ "readonly": true
1063
+ },
1064
+ {
1065
+ "kind": "method",
1066
+ "name": "_handleTriggerKeyDown",
1067
+ "privacy": "protected",
1068
+ "parameters": [
1069
+ {
1070
+ "name": "e",
1071
+ "type": {
1072
+ "text": "KeyboardEvent"
1073
+ }
1074
+ }
1075
+ ],
1076
+ "description": "APG Combobox keyboard handler on the trigger.\n\nArrow keys navigate/open, Space/Enter activate, Tab closes without focus return,\nArrowLeft enters chip navigation, and printable chars forward to type-ahead."
1077
+ },
1078
+ {
1079
+ "kind": "method",
1080
+ "name": "_activateActive",
1081
+ "privacy": "protected",
1082
+ "description": "Dispatches a synthetic `pointerdown` on the active listbox item to activate it.\n\nPrefers `pointerdown` over a direct call so listbox item click logic\n(which is bound to `pointerdown`) fires through its normal path."
1083
+ },
1084
+ {
1085
+ "kind": "method",
1086
+ "name": "_handleTypeAhead",
1087
+ "privacy": "protected",
1088
+ "parameters": [
1089
+ {
1090
+ "name": "char",
1091
+ "type": {
1092
+ "text": "string"
1093
+ }
1094
+ }
1095
+ ],
1096
+ "description": "Accumulates characters in `_typeAheadBuffer` and either immediately selects\nthe first match (closed single-select) or moves the virtual cursor (open popup)."
1097
+ },
1098
+ {
1099
+ "kind": "method",
1100
+ "name": "_enterChipNav",
1101
+ "privacy": "protected",
1102
+ "description": "Focuses the last chip button and sets `_chipNavIndex` to begin roving-tabindex navigation within the chip group."
1103
+ },
1104
+ {
1105
+ "kind": "method",
1106
+ "name": "_$chipButtons",
1107
+ "privacy": "protected",
1108
+ "return": {
1109
+ "type": {
1110
+ "text": "HTMLButtonElement[]"
1111
+ }
1112
+ },
1113
+ "description": "Queries all native remove buttons inside input chips; order matches DOM order."
1114
+ },
1115
+ {
1116
+ "kind": "method",
1117
+ "name": "_handleChipKeyDown",
1118
+ "privacy": "protected",
1119
+ "parameters": [
1120
+ {
1121
+ "name": "e",
1122
+ "type": {
1123
+ "text": "KeyboardEvent"
1124
+ }
1125
+ },
1126
+ {
1127
+ "name": "value",
1128
+ "type": {
1129
+ "text": "string"
1130
+ }
1131
+ }
1132
+ ],
1133
+ "description": "Keyboard handler for chip buttons.\n\nArrowLeft/Right rove chip focus, Escape returns to trigger,\nDelete/Backspace/Enter/Space remove the chip's value\nand return focus to the trigger."
1134
+ },
1135
+ {
1136
+ "kind": "method",
1137
+ "name": "_handleTriggerClick",
1138
+ "privacy": "protected",
1139
+ "description": "Toggles the popup open or closed on trigger click."
1140
+ },
1141
+ {
1142
+ "kind": "field",
1143
+ "name": "_dialogSelectedValues",
1144
+ "type": {
1145
+ "text": "string[]"
1146
+ },
1147
+ "privacy": "protected",
1148
+ "readonly": true
1149
+ },
1150
+ {
1151
+ "kind": "method",
1152
+ "name": "_focusDialogContent",
1153
+ "privacy": "protected",
1154
+ "return": {
1155
+ "type": {
1156
+ "text": "void"
1157
+ }
1158
+ }
1159
+ },
1160
+ {
1161
+ "kind": "method",
1162
+ "name": "_prepareDialogCommit",
1163
+ "privacy": "protected",
1164
+ "return": {
1165
+ "type": {
1166
+ "text": "void"
1167
+ }
1168
+ },
1169
+ "description": "Hook for subclasses to finalize provisional options before dialog selection commits."
1170
+ },
1171
+ {
1172
+ "kind": "method",
1173
+ "name": "_commitDialogSelection",
1174
+ "privacy": "protected",
1175
+ "return": {
1176
+ "type": {
1177
+ "text": "void"
1178
+ }
1179
+ }
1180
+ },
1181
+ {
1182
+ "kind": "method",
1183
+ "name": "_discardDialogSelection",
1184
+ "privacy": "protected",
1185
+ "return": {
1186
+ "type": {
1187
+ "text": "void"
1188
+ }
1189
+ }
1190
+ },
1191
+ {
1192
+ "kind": "method",
1193
+ "name": "_finishDialogClose",
1194
+ "privacy": "protected",
1195
+ "return": {
1196
+ "type": {
1197
+ "text": "void"
1198
+ }
1199
+ },
1200
+ "parameters": [
1201
+ {
1202
+ "name": "returnFocus",
1203
+ "type": {
1204
+ "text": "boolean"
1205
+ }
1206
+ }
1207
+ ]
1208
+ },
1209
+ {
1210
+ "kind": "method",
1211
+ "name": "_handleDialogClose",
1212
+ "privacy": "protected",
1213
+ "return": {
1214
+ "type": {
1215
+ "text": "void"
1216
+ }
1217
+ },
1218
+ "parameters": [
1219
+ {
1220
+ "name": "e",
1221
+ "type": {
1222
+ "text": "CustomEvent<RCDialogCloseEvent>"
1223
+ }
1224
+ }
1225
+ ]
1226
+ },
1227
+ {
1228
+ "kind": "method",
1229
+ "name": "_stopDialogEvent",
1230
+ "privacy": "protected",
1231
+ "return": {
1232
+ "type": {
1233
+ "text": "void"
1234
+ }
1235
+ },
1236
+ "parameters": [
1237
+ {
1238
+ "name": "e",
1239
+ "type": {
1240
+ "text": "Event"
1241
+ }
1242
+ }
1243
+ ]
1244
+ },
1245
+ {
1246
+ "kind": "method",
1247
+ "name": "_removePendingValue",
1248
+ "privacy": "protected",
1249
+ "return": {
1250
+ "type": {
1251
+ "text": "void"
1252
+ }
1253
+ },
1254
+ "parameters": [
1255
+ {
1256
+ "name": "value",
1257
+ "type": {
1258
+ "text": "string"
1259
+ }
1260
+ }
1261
+ ]
1262
+ },
1263
+ {
1264
+ "kind": "method",
1265
+ "name": "_renderDialogBody",
1266
+ "privacy": "protected"
1267
+ },
1268
+ {
1269
+ "kind": "method",
1270
+ "name": "_renderDialogPopup",
1271
+ "privacy": "protected"
1272
+ },
1273
+ {
1274
+ "kind": "method",
1275
+ "name": "_renderAnchor",
1276
+ "privacy": "protected"
1277
+ },
1278
+ {
1279
+ "kind": "method",
1280
+ "name": "_renderChips",
1281
+ "privacy": "protected",
1282
+ "parameters": [
1283
+ {
1284
+ "name": "values",
1285
+ "default": "this._selectedValues",
1286
+ "type": {
1287
+ "text": "Iterable<string>"
1288
+ }
1289
+ },
1290
+ {
1291
+ "name": "pending",
1292
+ "default": "false"
1293
+ }
1294
+ ],
1295
+ "description": "Renders selected values as removable input chips inside the shared chip-group layout."
1296
+ }
1297
+ ],
1298
+ "events": [
1299
+ {
1300
+ "name": "rc-select-open",
1301
+ "type": {
1302
+ "text": "CustomEvent"
1303
+ },
1304
+ "description": "When the popup opens."
1305
+ },
1306
+ {
1307
+ "name": "rc-select-close",
1308
+ "type": {
1309
+ "text": "CustomEvent"
1310
+ },
1311
+ "description": "When the popup closes."
1312
+ },
1313
+ {
1314
+ "name": "rc-select-change",
1315
+ "type": {
1316
+ "text": "CustomEvent"
1317
+ },
1318
+ "description": "When user interaction changes selection. `detail: { value, selectedValues, selectedOptions }`"
1319
+ }
1320
+ ],
1321
+ "attributes": [
1322
+ {
1323
+ "description": "Reflects whether the popup listbox is open.",
1324
+ "name": "open",
1325
+ "type": {
1326
+ "text": "boolean"
1327
+ },
1328
+ "default": "false",
1329
+ "fieldName": "open"
1330
+ },
1331
+ {
1332
+ "description": "Enables selection of multiple options simultaneously.",
1333
+ "name": "multiple",
1334
+ "type": {
1335
+ "text": "boolean"
1336
+ },
1337
+ "default": "false",
1338
+ "fieldName": "multiple"
1339
+ },
1340
+ {
1341
+ "description": "Disables the trigger and prevents the popup from opening.",
1342
+ "name": "disabled",
1343
+ "type": {
1344
+ "text": "boolean"
1345
+ },
1346
+ "default": "false",
1347
+ "fieldName": "disabled"
1348
+ },
1349
+ {
1350
+ "description": "Mirrors the slotted native `<select>`'s own `required`, for `aria-required` on the trigger.\nRead-only in practice: set `required` on the slotted `<select>` itself, the source of truth\nfor form participation and constraint validation.",
1351
+ "name": "required",
1352
+ "type": {
1353
+ "text": "boolean"
1354
+ },
1355
+ "default": "false",
1356
+ "fieldName": "required"
1357
+ },
1358
+ {
1359
+ "description": "Text shown in the trigger when no value is selected.",
1360
+ "name": "placeholder",
1361
+ "type": {
1362
+ "text": "string"
1363
+ },
1364
+ "default": "''",
1365
+ "fieldName": "placeholder"
1366
+ },
1367
+ {
1368
+ "description": "Controls how selected values appear in the trigger.\n\n- `'chips'` — each selected value renders as a removable chip.\n- `'compact'` — selected values are summarized as \"First, +N more\".\n- `'auto'` — uses `'chips'` on pointer devices and `'compact'` on touch.",
1369
+ "name": "display",
1370
+ "type": {
1371
+ "text": "'auto' | 'chips' | 'compact'"
1372
+ },
1373
+ "default": "'auto'",
1374
+ "fieldName": "display"
1375
+ },
1376
+ {
1377
+ "description": "Presents options in an anchored popover or transactional modal dialog.",
1378
+ "name": "popup-mode",
1379
+ "type": {
1380
+ "text": "RCSelectPopupMode"
1381
+ },
1382
+ "default": "'popover'",
1383
+ "fieldName": "popupMode"
1384
+ },
1385
+ {
1386
+ "description": "Text for the dialog confirmation action.",
1387
+ "name": "dialog-confirm-label",
1388
+ "type": {
1389
+ "text": "string"
1390
+ },
1391
+ "default": "'Done'",
1392
+ "fieldName": "dialogConfirmLabel"
1393
+ },
1394
+ {
1395
+ "description": "Accessible label for the leading dialog cancel action.",
1396
+ "name": "dialog-cancel-label",
1397
+ "type": {
1398
+ "text": "string"
1399
+ },
1400
+ "default": "'Cancel'",
1401
+ "fieldName": "dialogCancelLabel"
1402
+ },
1403
+ {
1404
+ "description": "Whether the leading dialog cancel action is visible.",
1405
+ "name": "dialog-cancel-button",
1406
+ "type": {
1407
+ "text": "'visible' | 'hidden'"
1408
+ },
1409
+ "default": "'visible'",
1410
+ "fieldName": "dialogCancelButton"
1411
+ },
1412
+ {
1413
+ "description": "Present when one or more options are selected. Use with CSS selectors (e.g. `rc-select[has-value]`) for floating-label wrappers.",
1414
+ "name": "has-value"
1415
+ }
1416
+ ],
1417
+ "superclass": {
1418
+ "name": "LitElement",
1419
+ "package": "lit"
1420
+ },
1421
+ "tagName": "rc-select",
1422
+ "customElement": true
1423
+ }
1424
+ ],
1425
+ "exports": [
1426
+ {
1427
+ "kind": "js",
1428
+ "name": "RCSelect",
1429
+ "declaration": {
1430
+ "name": "RCSelect",
1431
+ "module": "src/rc-select.ts"
1432
+ }
1433
+ },
1434
+ {
1435
+ "kind": "js",
1436
+ "name": "default",
1437
+ "declaration": {
1438
+ "name": "RCSelect",
1439
+ "module": "src/rc-select.ts"
1440
+ }
1441
+ }
1442
+ ]
1443
+ }
1444
+ ]
1445
+ }