@rcarls/rc-select 0.2.0 → 0.3.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.
- package/README.md +4 -4
- package/dist/custom-elements.json +153 -75
- package/dist/{rc-select-BumY2uQl.js → rc-select-Bu4ukw92.js} +235 -122
- package/dist/rc-select-Bu4ukw92.js.map +1 -0
- package/dist/rc-select-define.js +1 -1
- package/dist/rc-select.js +1 -1
- package/dist/types/packages/rc-select/src/rc-select.d.ts +190 -37
- package/package.json +8 -11
- package/dist/demo.css +0 -85
- package/dist/demo.js +0 -40
- package/dist/rc-select-BumY2uQl.js.map +0 -1
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"declarations": [
|
|
47
47
|
{
|
|
48
48
|
"kind": "class",
|
|
49
|
-
"description": "
|
|
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
50
|
"name": "RCSelect",
|
|
51
51
|
"cssProperties": [
|
|
52
52
|
{
|
|
@@ -108,6 +108,11 @@
|
|
|
108
108
|
"description": "Multi-select chip inline-axis padding.",
|
|
109
109
|
"name": "--rc-select-chip-padding-inline",
|
|
110
110
|
"default": "0.3em"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"description": "Inline size of the toggle indicator container.",
|
|
114
|
+
"name": "--rc-select-toggle-indicator-size",
|
|
115
|
+
"default": "1.1em"
|
|
111
116
|
}
|
|
112
117
|
],
|
|
113
118
|
"cssParts": [
|
|
@@ -140,22 +145,22 @@
|
|
|
140
145
|
"name": "value-display"
|
|
141
146
|
},
|
|
142
147
|
{
|
|
143
|
-
"description": "The
|
|
144
|
-
"name": "toggle-
|
|
148
|
+
"description": "The open/close indicator container.",
|
|
149
|
+
"name": "toggle-indicator"
|
|
145
150
|
}
|
|
146
151
|
],
|
|
147
152
|
"slots": [
|
|
148
153
|
{
|
|
149
154
|
"description": "Required. A native `<select>` element used for form submission and as the source of truth for options, multiple, and disabled state.",
|
|
150
|
-
"name": "
|
|
155
|
+
"name": ""
|
|
151
156
|
},
|
|
152
157
|
{
|
|
153
158
|
"description": "Optional. Replaces the default value label in the trigger.",
|
|
154
159
|
"name": "display"
|
|
155
160
|
},
|
|
156
161
|
{
|
|
157
|
-
"description": "Optional. Replaces the default chevron
|
|
158
|
-
"name": "toggle-
|
|
162
|
+
"description": "Optional. Replaces the default chevron indicator. Accepts any element(s); the container shifts to inline-start in RTL via flex direction.",
|
|
163
|
+
"name": "toggle-indicator"
|
|
159
164
|
}
|
|
160
165
|
],
|
|
161
166
|
"members": [
|
|
@@ -166,6 +171,7 @@
|
|
|
166
171
|
"text": "boolean"
|
|
167
172
|
},
|
|
168
173
|
"default": "false",
|
|
174
|
+
"description": "Reflects whether the popup listbox is open.",
|
|
169
175
|
"attribute": "open",
|
|
170
176
|
"reflects": true
|
|
171
177
|
},
|
|
@@ -176,6 +182,7 @@
|
|
|
176
182
|
"text": "boolean"
|
|
177
183
|
},
|
|
178
184
|
"default": "false",
|
|
185
|
+
"description": "Enables selection of multiple options simultaneously.",
|
|
179
186
|
"attribute": "multiple",
|
|
180
187
|
"reflects": true
|
|
181
188
|
},
|
|
@@ -186,6 +193,7 @@
|
|
|
186
193
|
"text": "boolean"
|
|
187
194
|
},
|
|
188
195
|
"default": "false",
|
|
196
|
+
"description": "Disables the trigger and prevents the popup from opening.",
|
|
189
197
|
"attribute": "disabled",
|
|
190
198
|
"reflects": true
|
|
191
199
|
},
|
|
@@ -196,6 +204,7 @@
|
|
|
196
204
|
"text": "string"
|
|
197
205
|
},
|
|
198
206
|
"default": "''",
|
|
207
|
+
"description": "Text shown in the trigger when no value is selected.",
|
|
199
208
|
"attribute": "placeholder"
|
|
200
209
|
},
|
|
201
210
|
{
|
|
@@ -205,6 +214,7 @@
|
|
|
205
214
|
"text": "'auto' | 'chips' | 'compact'"
|
|
206
215
|
},
|
|
207
216
|
"default": "'auto'",
|
|
217
|
+
"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.",
|
|
208
218
|
"attribute": "display"
|
|
209
219
|
},
|
|
210
220
|
{
|
|
@@ -213,7 +223,8 @@
|
|
|
213
223
|
"type": {
|
|
214
224
|
"text": "HTMLElement"
|
|
215
225
|
},
|
|
216
|
-
"privacy": "protected"
|
|
226
|
+
"privacy": "protected",
|
|
227
|
+
"description": "Flex container used by `_anchorCtrl` as the positioning reference for the popup."
|
|
217
228
|
},
|
|
218
229
|
{
|
|
219
230
|
"kind": "field",
|
|
@@ -221,7 +232,8 @@
|
|
|
221
232
|
"type": {
|
|
222
233
|
"text": "HTMLElement"
|
|
223
234
|
},
|
|
224
|
-
"privacy": "protected"
|
|
235
|
+
"privacy": "protected",
|
|
236
|
+
"description": "The combobox trigger div.\n\nOwns `role=\"combobox\"`, `aria-activedescendant`,\n`aria-expanded`, and receives focus during keyboard navigation."
|
|
225
237
|
},
|
|
226
238
|
{
|
|
227
239
|
"kind": "field",
|
|
@@ -229,7 +241,8 @@
|
|
|
229
241
|
"type": {
|
|
230
242
|
"text": "RCListbox"
|
|
231
243
|
},
|
|
232
|
-
"privacy": "protected"
|
|
244
|
+
"privacy": "protected",
|
|
245
|
+
"description": "The `<rc-listbox>` popup. Receives option lists and selected-value updates from the host."
|
|
233
246
|
},
|
|
234
247
|
{
|
|
235
248
|
"kind": "field",
|
|
@@ -238,7 +251,8 @@
|
|
|
238
251
|
"text": "Set<string>"
|
|
239
252
|
},
|
|
240
253
|
"privacy": "protected",
|
|
241
|
-
"default": "new Set()"
|
|
254
|
+
"default": "new Set()",
|
|
255
|
+
"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."
|
|
242
256
|
},
|
|
243
257
|
{
|
|
244
258
|
"kind": "field",
|
|
@@ -246,8 +260,9 @@
|
|
|
246
260
|
"type": {
|
|
247
261
|
"text": "number"
|
|
248
262
|
},
|
|
249
|
-
"privacy": "
|
|
250
|
-
"default": "-1"
|
|
263
|
+
"privacy": "protected",
|
|
264
|
+
"default": "-1",
|
|
265
|
+
"description": "Index into the chip button array for roving-tabindex chip navigation.\n\n`-1` means focus is on the trigger."
|
|
251
266
|
},
|
|
252
267
|
{
|
|
253
268
|
"kind": "field",
|
|
@@ -255,8 +270,9 @@
|
|
|
255
270
|
"type": {
|
|
256
271
|
"text": "ListboxOption[]"
|
|
257
272
|
},
|
|
258
|
-
"privacy": "
|
|
259
|
-
"default": "[]"
|
|
273
|
+
"privacy": "protected",
|
|
274
|
+
"default": "[]",
|
|
275
|
+
"description": "The resolved option list, as rendered in the listbox.\n\n`_options` is sourced from the `options` property or the slotted `<select>`."
|
|
260
276
|
},
|
|
261
277
|
{
|
|
262
278
|
"kind": "field",
|
|
@@ -265,7 +281,15 @@
|
|
|
265
281
|
"text": "WeakRef<HTMLSelectElement> | null"
|
|
266
282
|
},
|
|
267
283
|
"privacy": "protected",
|
|
268
|
-
"default": "null"
|
|
284
|
+
"default": "null",
|
|
285
|
+
"description": "WeakRef to the slotted `<select>`. Refreshed on every `slotchange`; `null` when absent."
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"kind": "field",
|
|
289
|
+
"name": "_selectController",
|
|
290
|
+
"privacy": "protected",
|
|
291
|
+
"readonly": true,
|
|
292
|
+
"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>.', }); } }, })"
|
|
269
293
|
},
|
|
270
294
|
{
|
|
271
295
|
"kind": "field",
|
|
@@ -273,8 +297,9 @@
|
|
|
273
297
|
"type": {
|
|
274
298
|
"text": "MutationObserver | null"
|
|
275
299
|
},
|
|
276
|
-
"privacy": "
|
|
277
|
-
"default": "null"
|
|
300
|
+
"privacy": "protected",
|
|
301
|
+
"default": "null",
|
|
302
|
+
"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."
|
|
278
303
|
},
|
|
279
304
|
{
|
|
280
305
|
"kind": "field",
|
|
@@ -315,8 +340,9 @@
|
|
|
315
340
|
"type": {
|
|
316
341
|
"text": "string"
|
|
317
342
|
},
|
|
318
|
-
"privacy": "
|
|
319
|
-
"default": "''"
|
|
343
|
+
"privacy": "protected",
|
|
344
|
+
"default": "''",
|
|
345
|
+
"description": "Accumulated printable characters for type-ahead matching; cleared after 500 ms idle."
|
|
320
346
|
},
|
|
321
347
|
{
|
|
322
348
|
"kind": "field",
|
|
@@ -324,24 +350,28 @@
|
|
|
324
350
|
"type": {
|
|
325
351
|
"text": "number"
|
|
326
352
|
},
|
|
327
|
-
"privacy": "
|
|
328
|
-
"default": "0"
|
|
353
|
+
"privacy": "protected",
|
|
354
|
+
"default": "0",
|
|
355
|
+
"description": "`window.setTimeout` handle for resetting `_typeAheadBuffer`; cancel before modifying."
|
|
329
356
|
},
|
|
330
357
|
{
|
|
331
358
|
"kind": "field",
|
|
332
|
-
"name": "
|
|
359
|
+
"name": "_activeDescendantCtrl",
|
|
333
360
|
"privacy": "protected",
|
|
334
|
-
"default": "new ActiveDescendantController(this, { host: () => this._$trigger ?? null, items: () => this._$listbox?.navigableItems ?? [], })"
|
|
361
|
+
"default": "new ActiveDescendantController(this, { host: () => this._$trigger ?? null, items: () => this._$listbox?.navigableItems ?? [], })",
|
|
362
|
+
"description": "Manages `aria-activedescendant` on `_$trigger` and keyboard cursor position\nwithin `_$listbox.navigableItems`."
|
|
335
363
|
},
|
|
336
364
|
{
|
|
337
365
|
"kind": "field",
|
|
338
366
|
"name": "_anchorCtrl",
|
|
339
367
|
"privacy": "protected",
|
|
340
|
-
"default": "new AnchorController(this, { anchor: () => this._$anchor ?? null, floating: () => this._$listbox ?? null, shadowHost: () => this, placement: 'bottom-start', offset: 2, })"
|
|
368
|
+
"default": "new AnchorController(this, { anchor: () => this._$anchor ?? null, floating: () => this._$listbox ?? null, shadowHost: () => this, placement: 'bottom-start', offset: 2, })",
|
|
369
|
+
"description": "Manages CSS-anchored (or JS-fallback) placement of `_$listbox` relative to `_$anchor`."
|
|
341
370
|
},
|
|
342
371
|
{
|
|
343
372
|
"kind": "method",
|
|
344
|
-
"name": "openPopup"
|
|
373
|
+
"name": "openPopup",
|
|
374
|
+
"description": "Opens the popup listbox if not already open or disabled."
|
|
345
375
|
},
|
|
346
376
|
{
|
|
347
377
|
"kind": "method",
|
|
@@ -349,9 +379,11 @@
|
|
|
349
379
|
"parameters": [
|
|
350
380
|
{
|
|
351
381
|
"name": "returnFocus",
|
|
352
|
-
"default": "true"
|
|
382
|
+
"default": "true",
|
|
383
|
+
"description": "When `true` (default), returns focus to the trigger."
|
|
353
384
|
}
|
|
354
|
-
]
|
|
385
|
+
],
|
|
386
|
+
"description": "Closes the popup listbox."
|
|
355
387
|
},
|
|
356
388
|
{
|
|
357
389
|
"kind": "field",
|
|
@@ -390,9 +422,10 @@
|
|
|
390
422
|
"kind": "field",
|
|
391
423
|
"name": "selectedOptions",
|
|
392
424
|
"type": {
|
|
393
|
-
"text": "
|
|
425
|
+
"text": "ListboxSelectableOption[]"
|
|
394
426
|
},
|
|
395
427
|
"privacy": "protected",
|
|
428
|
+
"description": "`ListboxOption` objects for the current selection; falls back to label-only stubs for unknown values.",
|
|
396
429
|
"readonly": true
|
|
397
430
|
},
|
|
398
431
|
{
|
|
@@ -411,27 +444,36 @@
|
|
|
411
444
|
"text": "string[]"
|
|
412
445
|
}
|
|
413
446
|
}
|
|
414
|
-
]
|
|
447
|
+
],
|
|
448
|
+
"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`."
|
|
415
449
|
},
|
|
416
450
|
{
|
|
417
451
|
"kind": "field",
|
|
418
452
|
"name": "_onDocClick",
|
|
419
|
-
"privacy": "
|
|
453
|
+
"privacy": "protected",
|
|
454
|
+
"description": "Document-capture click handler that closes the popup when a click lands outside `this`."
|
|
420
455
|
},
|
|
421
456
|
{
|
|
422
457
|
"kind": "field",
|
|
423
458
|
"name": "_onDocKeyDown",
|
|
424
|
-
"privacy": "
|
|
459
|
+
"privacy": "protected",
|
|
460
|
+
"description": "Document-capture keydown handler; closes the popup on `Escape`."
|
|
425
461
|
},
|
|
426
462
|
{
|
|
427
463
|
"kind": "method",
|
|
428
464
|
"name": "_handleSelectSlotChange",
|
|
429
465
|
"privacy": "protected",
|
|
466
|
+
"description": "Resolves the slotted `<select>` on every `slotchange`, wires `_mutationObserver`,\nand seeds initial state via `queueMicrotask` to stay safe inside framework reactive passes."
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"kind": "method",
|
|
470
|
+
"name": "_setupSelect",
|
|
471
|
+
"privacy": "protected",
|
|
430
472
|
"parameters": [
|
|
431
473
|
{
|
|
432
|
-
"name": "
|
|
474
|
+
"name": "$select",
|
|
433
475
|
"type": {
|
|
434
|
-
"text": "
|
|
476
|
+
"text": "HTMLSelectElement | null"
|
|
435
477
|
}
|
|
436
478
|
}
|
|
437
479
|
]
|
|
@@ -442,27 +484,29 @@
|
|
|
442
484
|
"privacy": "protected",
|
|
443
485
|
"parameters": [
|
|
444
486
|
{
|
|
445
|
-
"name": "
|
|
487
|
+
"name": "$select",
|
|
446
488
|
"type": {
|
|
447
489
|
"text": "HTMLSelectElement"
|
|
448
490
|
}
|
|
449
491
|
}
|
|
450
|
-
]
|
|
492
|
+
],
|
|
493
|
+
"description": "Derives options from `$select` (or defers to `_propertyOptions` when set)\nand re-applies selection from the current authoritative source."
|
|
451
494
|
},
|
|
452
495
|
{
|
|
453
496
|
"kind": "method",
|
|
454
497
|
"name": "_applySelectionFromCurrentSource",
|
|
455
|
-
"privacy": "
|
|
498
|
+
"privacy": "protected",
|
|
456
499
|
"return": {
|
|
457
500
|
"type": {
|
|
458
501
|
"text": "void"
|
|
459
502
|
}
|
|
460
|
-
}
|
|
503
|
+
},
|
|
504
|
+
"description": "Picks the correct selection source in priority order:\ncontrolled `_value` → `_defaultValue` → native `<select>` default/current state."
|
|
461
505
|
},
|
|
462
506
|
{
|
|
463
507
|
"kind": "method",
|
|
464
508
|
"name": "_syncOptions",
|
|
465
|
-
"privacy": "
|
|
509
|
+
"privacy": "protected",
|
|
466
510
|
"return": {
|
|
467
511
|
"type": {
|
|
468
512
|
"text": "void"
|
|
@@ -475,22 +519,24 @@
|
|
|
475
519
|
"text": "ListboxOption[]"
|
|
476
520
|
}
|
|
477
521
|
}
|
|
478
|
-
]
|
|
522
|
+
],
|
|
523
|
+
"description": "Writes `_options` and pushes the list to `_$listbox` when it is mounted."
|
|
479
524
|
},
|
|
480
525
|
{
|
|
481
526
|
"kind": "method",
|
|
482
527
|
"name": "_currentOptions",
|
|
483
|
-
"privacy": "
|
|
528
|
+
"privacy": "protected",
|
|
484
529
|
"return": {
|
|
485
530
|
"type": {
|
|
486
531
|
"text": "ListboxOption[]"
|
|
487
532
|
}
|
|
488
|
-
}
|
|
533
|
+
},
|
|
534
|
+
"description": "Returns `_propertyOptions` when set; otherwise reads live from the slotted `<select>`."
|
|
489
535
|
},
|
|
490
536
|
{
|
|
491
537
|
"kind": "method",
|
|
492
538
|
"name": "_optionsFromSelect",
|
|
493
|
-
"privacy": "
|
|
539
|
+
"privacy": "protected",
|
|
494
540
|
"return": {
|
|
495
541
|
"type": {
|
|
496
542
|
"text": "ListboxOption[]"
|
|
@@ -498,42 +544,46 @@
|
|
|
498
544
|
},
|
|
499
545
|
"parameters": [
|
|
500
546
|
{
|
|
501
|
-
"name": "
|
|
547
|
+
"name": "$select",
|
|
502
548
|
"type": {
|
|
503
549
|
"text": "HTMLSelectElement"
|
|
504
550
|
}
|
|
505
551
|
}
|
|
506
|
-
]
|
|
552
|
+
],
|
|
553
|
+
"description": "Maps non-empty native `<option>` nodes to `ListboxOption` objects.\n\nOptions with empty `value` are skipped (placeholder guard)."
|
|
507
554
|
},
|
|
508
555
|
{
|
|
509
556
|
"kind": "method",
|
|
510
557
|
"name": "_selectedValuesFromNativeSelect",
|
|
511
|
-
"privacy": "
|
|
558
|
+
"privacy": "protected",
|
|
512
559
|
"return": {
|
|
513
560
|
"type": {
|
|
514
561
|
"text": "string[]"
|
|
515
562
|
}
|
|
516
|
-
}
|
|
563
|
+
},
|
|
564
|
+
"description": "Returns values of currently selected `<option>` nodes; falls back to `selectedValues` when no native select is present."
|
|
517
565
|
},
|
|
518
566
|
{
|
|
519
567
|
"kind": "method",
|
|
520
568
|
"name": "_defaultSelectedValuesFromNativeSelect",
|
|
521
|
-
"privacy": "
|
|
569
|
+
"privacy": "protected",
|
|
522
570
|
"return": {
|
|
523
571
|
"type": {
|
|
524
572
|
"text": "string[]"
|
|
525
573
|
}
|
|
526
|
-
}
|
|
574
|
+
},
|
|
575
|
+
"description": "Returns values of `defaultSelected` `<option>` nodes (author `selected` attribute); falls back to `selectedValues`."
|
|
527
576
|
},
|
|
528
577
|
{
|
|
529
578
|
"kind": "method",
|
|
530
579
|
"name": "_mirrorOptionsToNativeSelect",
|
|
531
|
-
"privacy": "
|
|
580
|
+
"privacy": "protected",
|
|
532
581
|
"return": {
|
|
533
582
|
"type": {
|
|
534
583
|
"text": "void"
|
|
535
584
|
}
|
|
536
|
-
}
|
|
585
|
+
},
|
|
586
|
+
"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."
|
|
537
587
|
},
|
|
538
588
|
{
|
|
539
589
|
"kind": "method",
|
|
@@ -551,12 +601,13 @@
|
|
|
551
601
|
"text": "ListboxOption"
|
|
552
602
|
}
|
|
553
603
|
}
|
|
554
|
-
]
|
|
604
|
+
],
|
|
605
|
+
"description": "Upserts a single option into `_options` (and `_propertyOptions` when set)\nand adds the corresponding `<option>` to the native `<select>` if absent."
|
|
555
606
|
},
|
|
556
607
|
{
|
|
557
608
|
"kind": "method",
|
|
558
609
|
"name": "_normalizeValue",
|
|
559
|
-
"privacy": "
|
|
610
|
+
"privacy": "protected",
|
|
560
611
|
"return": {
|
|
561
612
|
"type": {
|
|
562
613
|
"text": "string[]"
|
|
@@ -569,12 +620,13 @@
|
|
|
569
620
|
"text": "RCSelectValue"
|
|
570
621
|
}
|
|
571
622
|
}
|
|
572
|
-
]
|
|
623
|
+
],
|
|
624
|
+
"description": "Coerces `RCSelectValue` (string or string[]) to `string[]`; returns `[]` for empty-string singles."
|
|
573
625
|
},
|
|
574
626
|
{
|
|
575
627
|
"kind": "method",
|
|
576
628
|
"name": "_syncAccessibleName",
|
|
577
|
-
"privacy": "
|
|
629
|
+
"privacy": "protected",
|
|
578
630
|
"return": {
|
|
579
631
|
"type": {
|
|
580
632
|
"text": "void"
|
|
@@ -582,12 +634,13 @@
|
|
|
582
634
|
},
|
|
583
635
|
"parameters": [
|
|
584
636
|
{
|
|
585
|
-
"name": "sel",
|
|
637
|
+
"name": "$sel",
|
|
586
638
|
"type": {
|
|
587
639
|
"text": "HTMLSelectElement"
|
|
588
640
|
}
|
|
589
641
|
}
|
|
590
|
-
]
|
|
642
|
+
],
|
|
643
|
+
"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`."
|
|
591
644
|
},
|
|
592
645
|
{
|
|
593
646
|
"kind": "method",
|
|
@@ -600,7 +653,8 @@
|
|
|
600
653
|
"text": "CustomEvent"
|
|
601
654
|
}
|
|
602
655
|
}
|
|
603
|
-
]
|
|
656
|
+
],
|
|
657
|
+
"description": "Handles `rc-listbox-change` from the popup.\n\nStops propagation, mutates `_selectedValues`, syncs state, and fires\n`rc-select-change`."
|
|
604
658
|
},
|
|
605
659
|
{
|
|
606
660
|
"kind": "method",
|
|
@@ -613,12 +667,14 @@
|
|
|
613
667
|
"text": "string"
|
|
614
668
|
}
|
|
615
669
|
}
|
|
616
|
-
]
|
|
670
|
+
],
|
|
671
|
+
"description": "Removes a single value from `_selectedValues`, syncs the listbox and native select, and dispatches `rc-select-change`."
|
|
617
672
|
},
|
|
618
673
|
{
|
|
619
674
|
"kind": "method",
|
|
620
675
|
"name": "_syncNativeSelect",
|
|
621
|
-
"privacy": "protected"
|
|
676
|
+
"privacy": "protected",
|
|
677
|
+
"description": "Flips `selected` on each `<option>` in the native `<select>` to match `_selectedValues`; no-op when no native select is present."
|
|
622
678
|
},
|
|
623
679
|
{
|
|
624
680
|
"kind": "method",
|
|
@@ -628,15 +684,16 @@
|
|
|
628
684
|
"type": {
|
|
629
685
|
"text": "void"
|
|
630
686
|
}
|
|
631
|
-
}
|
|
687
|
+
},
|
|
688
|
+
"description": "Constructs and dispatches `rc-select-change` with current `value`, `selectedValues`, and `selectedOptions`."
|
|
632
689
|
},
|
|
633
690
|
{
|
|
634
691
|
"kind": "method",
|
|
635
692
|
"name": "_selectedOptionsFor",
|
|
636
|
-
"privacy": "
|
|
693
|
+
"privacy": "protected",
|
|
637
694
|
"return": {
|
|
638
695
|
"type": {
|
|
639
|
-
"text": "
|
|
696
|
+
"text": "ListboxSelectableOption[]"
|
|
640
697
|
}
|
|
641
698
|
},
|
|
642
699
|
"parameters": [
|
|
@@ -646,7 +703,8 @@
|
|
|
646
703
|
"text": "string[]"
|
|
647
704
|
}
|
|
648
705
|
}
|
|
649
|
-
]
|
|
706
|
+
],
|
|
707
|
+
"description": "Maps value strings to `ListboxOption` objects from `_options`; creates label-only fallback stubs for unknown values."
|
|
650
708
|
},
|
|
651
709
|
{
|
|
652
710
|
"kind": "field",
|
|
@@ -655,6 +713,7 @@
|
|
|
655
713
|
"text": "'chips' | 'compact'"
|
|
656
714
|
},
|
|
657
715
|
"privacy": "protected",
|
|
716
|
+
"description": "Resolved display mode after `auto` pointer-detection: `'chips'` on fine-pointer devices, `'compact'` on coarse.",
|
|
658
717
|
"readonly": true
|
|
659
718
|
},
|
|
660
719
|
{
|
|
@@ -673,7 +732,8 @@
|
|
|
673
732
|
"text": "string"
|
|
674
733
|
}
|
|
675
734
|
}
|
|
676
|
-
]
|
|
735
|
+
],
|
|
736
|
+
"description": "Looks up the display label for `value` from native `<select>` option text; returns `value` itself as a fallback."
|
|
677
737
|
},
|
|
678
738
|
{
|
|
679
739
|
"kind": "field",
|
|
@@ -682,6 +742,7 @@
|
|
|
682
742
|
"text": "string"
|
|
683
743
|
},
|
|
684
744
|
"privacy": "protected",
|
|
745
|
+
"description": "Text shown in the trigger's value-display area; returns placeholder when chips are active or nothing is selected.",
|
|
685
746
|
"readonly": true
|
|
686
747
|
},
|
|
687
748
|
{
|
|
@@ -695,17 +756,19 @@
|
|
|
695
756
|
"text": "KeyboardEvent"
|
|
696
757
|
}
|
|
697
758
|
}
|
|
698
|
-
]
|
|
759
|
+
],
|
|
760
|
+
"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."
|
|
699
761
|
},
|
|
700
762
|
{
|
|
701
763
|
"kind": "method",
|
|
702
764
|
"name": "_activateActive",
|
|
703
|
-
"privacy": "
|
|
765
|
+
"privacy": "protected",
|
|
766
|
+
"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."
|
|
704
767
|
},
|
|
705
768
|
{
|
|
706
769
|
"kind": "method",
|
|
707
770
|
"name": "_handleTypeAhead",
|
|
708
|
-
"privacy": "
|
|
771
|
+
"privacy": "protected",
|
|
709
772
|
"parameters": [
|
|
710
773
|
{
|
|
711
774
|
"name": "char",
|
|
@@ -713,22 +776,25 @@
|
|
|
713
776
|
"text": "string"
|
|
714
777
|
}
|
|
715
778
|
}
|
|
716
|
-
]
|
|
779
|
+
],
|
|
780
|
+
"description": "Accumulates characters in `_typeAheadBuffer` and either immediately selects\nthe first match (closed single-select) or moves the virtual cursor (open popup)."
|
|
717
781
|
},
|
|
718
782
|
{
|
|
719
783
|
"kind": "method",
|
|
720
784
|
"name": "_enterChipNav",
|
|
721
|
-
"privacy": "
|
|
785
|
+
"privacy": "protected",
|
|
786
|
+
"description": "Focuses the last chip button and sets `_chipNavIndex` to begin roving-tabindex navigation within the chip group."
|
|
722
787
|
},
|
|
723
788
|
{
|
|
724
789
|
"kind": "method",
|
|
725
|
-
"name": "
|
|
726
|
-
"privacy": "
|
|
790
|
+
"name": "_$chipButtons",
|
|
791
|
+
"privacy": "protected",
|
|
727
792
|
"return": {
|
|
728
793
|
"type": {
|
|
729
794
|
"text": "HTMLButtonElement[]"
|
|
730
795
|
}
|
|
731
|
-
}
|
|
796
|
+
},
|
|
797
|
+
"description": "Queries all `button[part~=\"chip\"]` elements in `renderRoot`; order matches DOM order."
|
|
732
798
|
},
|
|
733
799
|
{
|
|
734
800
|
"kind": "method",
|
|
@@ -747,17 +813,20 @@
|
|
|
747
813
|
"text": "string"
|
|
748
814
|
}
|
|
749
815
|
}
|
|
750
|
-
]
|
|
816
|
+
],
|
|
817
|
+
"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."
|
|
751
818
|
},
|
|
752
819
|
{
|
|
753
820
|
"kind": "method",
|
|
754
821
|
"name": "_handleTriggerClick",
|
|
755
|
-
"privacy": "protected"
|
|
822
|
+
"privacy": "protected",
|
|
823
|
+
"description": "Toggles the popup open or closed on trigger click."
|
|
756
824
|
},
|
|
757
825
|
{
|
|
758
826
|
"kind": "method",
|
|
759
827
|
"name": "_renderChips",
|
|
760
|
-
"privacy": "protected"
|
|
828
|
+
"privacy": "protected",
|
|
829
|
+
"description": "Renders the chip group `<span>` with one `<button>` per selected value for multi-select chip display mode."
|
|
761
830
|
}
|
|
762
831
|
],
|
|
763
832
|
"events": [
|
|
@@ -784,12 +853,17 @@
|
|
|
784
853
|
}
|
|
785
854
|
],
|
|
786
855
|
"attributes": [
|
|
856
|
+
{
|
|
857
|
+
"description": "Present when one or more options are selected. Use with CSS selectors (e.g. `rc-select[has-value]`) for floating-label wrappers.",
|
|
858
|
+
"name": "has-value"
|
|
859
|
+
},
|
|
787
860
|
{
|
|
788
861
|
"name": "open",
|
|
789
862
|
"type": {
|
|
790
863
|
"text": "boolean"
|
|
791
864
|
},
|
|
792
865
|
"default": "false",
|
|
866
|
+
"description": "Reflects whether the popup listbox is open.",
|
|
793
867
|
"fieldName": "open"
|
|
794
868
|
},
|
|
795
869
|
{
|
|
@@ -798,6 +872,7 @@
|
|
|
798
872
|
"text": "boolean"
|
|
799
873
|
},
|
|
800
874
|
"default": "false",
|
|
875
|
+
"description": "Enables selection of multiple options simultaneously.",
|
|
801
876
|
"fieldName": "multiple"
|
|
802
877
|
},
|
|
803
878
|
{
|
|
@@ -806,6 +881,7 @@
|
|
|
806
881
|
"text": "boolean"
|
|
807
882
|
},
|
|
808
883
|
"default": "false",
|
|
884
|
+
"description": "Disables the trigger and prevents the popup from opening.",
|
|
809
885
|
"fieldName": "disabled"
|
|
810
886
|
},
|
|
811
887
|
{
|
|
@@ -814,6 +890,7 @@
|
|
|
814
890
|
"text": "string"
|
|
815
891
|
},
|
|
816
892
|
"default": "''",
|
|
893
|
+
"description": "Text shown in the trigger when no value is selected.",
|
|
817
894
|
"fieldName": "placeholder"
|
|
818
895
|
},
|
|
819
896
|
{
|
|
@@ -822,6 +899,7 @@
|
|
|
822
899
|
"text": "'auto' | 'chips' | 'compact'"
|
|
823
900
|
},
|
|
824
901
|
"default": "'auto'",
|
|
902
|
+
"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.",
|
|
825
903
|
"fieldName": "display"
|
|
826
904
|
}
|
|
827
905
|
],
|