@rcarls/rc-select 0.1.0

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,856 @@
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": "A fully-accessible, form-associated select/combobox component.\n\nWraps a native `<select slot=\"select\">` as the form value reflector while\nrendering a custom trigger and popup listbox. Follows the WAI-ARIA APG\nCombobox pattern (select-only variant) with JS-computed popup placement\nand `aria-activedescendant` for virtual keyboard navigation.",
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 block padding.",
94
+ "name": "--rc-select-listbox-padding-block",
95
+ "default": "var(--rc-control-padding-block)"
96
+ },
97
+ {
98
+ "description": "Multi-select chip border radius.",
99
+ "name": "--rc-select-chip-radius",
100
+ "default": "var(--rc-radius-md)"
101
+ },
102
+ {
103
+ "description": "Multi-select chip block-axis padding.",
104
+ "name": "--rc-select-chip-padding-block",
105
+ "default": "0.1em"
106
+ },
107
+ {
108
+ "description": "Multi-select chip inline-axis padding.",
109
+ "name": "--rc-select-chip-padding-inline",
110
+ "default": "0.3em"
111
+ }
112
+ ],
113
+ "cssParts": [
114
+ {
115
+ "description": "The flex container wrapping chips and trigger.",
116
+ "name": "anchor"
117
+ },
118
+ {
119
+ "description": "The combobox trigger element (div).",
120
+ "name": "trigger"
121
+ },
122
+ {
123
+ "description": "The chips group container (when multiple).",
124
+ "name": "chips"
125
+ },
126
+ {
127
+ "description": "Individual chip (when multiple).",
128
+ "name": "chip"
129
+ },
130
+ {
131
+ "description": "Text label inside a chip.",
132
+ "name": "chip-label"
133
+ },
134
+ {
135
+ "description": "Remove button inside a chip.",
136
+ "name": "chip-remove"
137
+ },
138
+ {
139
+ "description": "The text label showing selected value(s).",
140
+ "name": "value-display"
141
+ },
142
+ {
143
+ "description": "The chevron/arrow icon container.",
144
+ "name": "toggle-icon"
145
+ }
146
+ ],
147
+ "slots": [
148
+ {
149
+ "description": "Required. A native `<select>` element used for form submission and as the source of truth for options, multiple, and disabled state.",
150
+ "name": "select"
151
+ },
152
+ {
153
+ "description": "Optional. Replaces the default value label in the trigger.",
154
+ "name": "display"
155
+ },
156
+ {
157
+ "description": "Optional. Replaces the default chevron icon.",
158
+ "name": "toggle-icon"
159
+ }
160
+ ],
161
+ "members": [
162
+ {
163
+ "kind": "field",
164
+ "name": "open",
165
+ "type": {
166
+ "text": "boolean"
167
+ },
168
+ "default": "false",
169
+ "attribute": "open",
170
+ "reflects": true
171
+ },
172
+ {
173
+ "kind": "field",
174
+ "name": "multiple",
175
+ "type": {
176
+ "text": "boolean"
177
+ },
178
+ "default": "false",
179
+ "attribute": "multiple",
180
+ "reflects": true
181
+ },
182
+ {
183
+ "kind": "field",
184
+ "name": "disabled",
185
+ "type": {
186
+ "text": "boolean"
187
+ },
188
+ "default": "false",
189
+ "attribute": "disabled",
190
+ "reflects": true
191
+ },
192
+ {
193
+ "kind": "field",
194
+ "name": "placeholder",
195
+ "type": {
196
+ "text": "string"
197
+ },
198
+ "default": "''",
199
+ "attribute": "placeholder"
200
+ },
201
+ {
202
+ "kind": "field",
203
+ "name": "display",
204
+ "type": {
205
+ "text": "'auto' | 'chips' | 'compact'"
206
+ },
207
+ "default": "'auto'",
208
+ "attribute": "display"
209
+ },
210
+ {
211
+ "kind": "field",
212
+ "name": "_$anchor",
213
+ "type": {
214
+ "text": "HTMLElement"
215
+ },
216
+ "privacy": "protected"
217
+ },
218
+ {
219
+ "kind": "field",
220
+ "name": "_$trigger",
221
+ "type": {
222
+ "text": "HTMLElement"
223
+ },
224
+ "privacy": "protected"
225
+ },
226
+ {
227
+ "kind": "field",
228
+ "name": "_$listbox",
229
+ "type": {
230
+ "text": "RCListbox"
231
+ },
232
+ "privacy": "protected"
233
+ },
234
+ {
235
+ "kind": "field",
236
+ "name": "_selectedValues",
237
+ "type": {
238
+ "text": "Set<string>"
239
+ },
240
+ "privacy": "protected",
241
+ "default": "new Set()"
242
+ },
243
+ {
244
+ "kind": "field",
245
+ "name": "_chipNavIndex",
246
+ "type": {
247
+ "text": "number"
248
+ },
249
+ "privacy": "private",
250
+ "default": "-1"
251
+ },
252
+ {
253
+ "kind": "field",
254
+ "name": "_options",
255
+ "type": {
256
+ "text": "ListboxOption[]"
257
+ },
258
+ "privacy": "private",
259
+ "default": "[]"
260
+ },
261
+ {
262
+ "kind": "field",
263
+ "name": "_selectRef",
264
+ "type": {
265
+ "text": "WeakRef<HTMLSelectElement> | null"
266
+ },
267
+ "privacy": "protected",
268
+ "default": "null"
269
+ },
270
+ {
271
+ "kind": "field",
272
+ "name": "_mutationObserver",
273
+ "type": {
274
+ "text": "MutationObserver | null"
275
+ },
276
+ "privacy": "private",
277
+ "default": "null"
278
+ },
279
+ {
280
+ "kind": "field",
281
+ "name": "_defaultValue",
282
+ "type": {
283
+ "text": "RCSelectValue | undefined"
284
+ },
285
+ "privacy": "private"
286
+ },
287
+ {
288
+ "kind": "field",
289
+ "name": "_propertyOptions",
290
+ "type": {
291
+ "text": "ListboxOption[] | undefined"
292
+ },
293
+ "privacy": "private"
294
+ },
295
+ {
296
+ "kind": "field",
297
+ "name": "_value",
298
+ "type": {
299
+ "text": "RCSelectValue | undefined"
300
+ },
301
+ "privacy": "private"
302
+ },
303
+ {
304
+ "kind": "field",
305
+ "name": "_selectionInitialized",
306
+ "type": {
307
+ "text": "boolean"
308
+ },
309
+ "privacy": "private",
310
+ "default": "false"
311
+ },
312
+ {
313
+ "kind": "field",
314
+ "name": "_typeAheadBuffer",
315
+ "type": {
316
+ "text": "string"
317
+ },
318
+ "privacy": "private",
319
+ "default": "''"
320
+ },
321
+ {
322
+ "kind": "field",
323
+ "name": "_typeAheadTimer",
324
+ "type": {
325
+ "text": "number"
326
+ },
327
+ "privacy": "private",
328
+ "default": "0"
329
+ },
330
+ {
331
+ "kind": "field",
332
+ "name": "_adc",
333
+ "privacy": "protected",
334
+ "default": "new ActiveDescendantController(this, { host: () => this._$trigger ?? null, items: () => this._$listbox?.navigableItems ?? [], })"
335
+ },
336
+ {
337
+ "kind": "field",
338
+ "name": "_anchorCtrl",
339
+ "privacy": "protected",
340
+ "default": "new AnchorController(this, { anchor: () => this._$anchor ?? null, floating: () => this._$listbox ?? null, shadowHost: () => this, placement: 'bottom-start', offset: 2, })"
341
+ },
342
+ {
343
+ "kind": "method",
344
+ "name": "openPopup"
345
+ },
346
+ {
347
+ "kind": "method",
348
+ "name": "closePopup",
349
+ "parameters": [
350
+ {
351
+ "name": "returnFocus",
352
+ "default": "true"
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ "kind": "field",
358
+ "name": "value",
359
+ "type": {
360
+ "text": "RCSelectValue"
361
+ },
362
+ "description": "Current selection. Host writes update selection silently; user interaction\nemits `rc-select-change`."
363
+ },
364
+ {
365
+ "kind": "field",
366
+ "name": "defaultValue",
367
+ "type": {
368
+ "text": "RCSelectValue | undefined"
369
+ },
370
+ "description": "Initial uncontrolled selection, applied before user or native state owns the value."
371
+ },
372
+ {
373
+ "kind": "field",
374
+ "name": "options",
375
+ "type": {
376
+ "text": "ListboxOption[] | undefined"
377
+ },
378
+ "description": "Programmatic option source. Omit to derive options from the slotted `<select>`."
379
+ },
380
+ {
381
+ "kind": "field",
382
+ "name": "selectedValues",
383
+ "type": {
384
+ "text": "string[]"
385
+ },
386
+ "description": "Selected values as a consistently-array-shaped convenience getter.",
387
+ "readonly": true
388
+ },
389
+ {
390
+ "kind": "field",
391
+ "name": "selectedOptions",
392
+ "type": {
393
+ "text": "ListboxOption[]"
394
+ },
395
+ "privacy": "protected",
396
+ "readonly": true
397
+ },
398
+ {
399
+ "kind": "method",
400
+ "name": "_applySelection",
401
+ "privacy": "protected",
402
+ "return": {
403
+ "type": {
404
+ "text": "void"
405
+ }
406
+ },
407
+ "parameters": [
408
+ {
409
+ "name": "values",
410
+ "type": {
411
+ "text": "string[]"
412
+ }
413
+ }
414
+ ]
415
+ },
416
+ {
417
+ "kind": "field",
418
+ "name": "_onDocClick",
419
+ "privacy": "private"
420
+ },
421
+ {
422
+ "kind": "field",
423
+ "name": "_onDocKeyDown",
424
+ "privacy": "private"
425
+ },
426
+ {
427
+ "kind": "method",
428
+ "name": "_handleSelectSlotChange",
429
+ "privacy": "protected",
430
+ "parameters": [
431
+ {
432
+ "name": "e",
433
+ "type": {
434
+ "text": "Event"
435
+ }
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ "kind": "method",
441
+ "name": "_syncOptionsFromSelect",
442
+ "privacy": "protected",
443
+ "parameters": [
444
+ {
445
+ "name": "sel",
446
+ "type": {
447
+ "text": "HTMLSelectElement"
448
+ }
449
+ }
450
+ ]
451
+ },
452
+ {
453
+ "kind": "method",
454
+ "name": "_applySelectionFromCurrentSource",
455
+ "privacy": "private",
456
+ "return": {
457
+ "type": {
458
+ "text": "void"
459
+ }
460
+ }
461
+ },
462
+ {
463
+ "kind": "method",
464
+ "name": "_syncOptions",
465
+ "privacy": "private",
466
+ "return": {
467
+ "type": {
468
+ "text": "void"
469
+ }
470
+ },
471
+ "parameters": [
472
+ {
473
+ "name": "options",
474
+ "type": {
475
+ "text": "ListboxOption[]"
476
+ }
477
+ }
478
+ ]
479
+ },
480
+ {
481
+ "kind": "method",
482
+ "name": "_currentOptions",
483
+ "privacy": "private",
484
+ "return": {
485
+ "type": {
486
+ "text": "ListboxOption[]"
487
+ }
488
+ }
489
+ },
490
+ {
491
+ "kind": "method",
492
+ "name": "_optionsFromSelect",
493
+ "privacy": "private",
494
+ "return": {
495
+ "type": {
496
+ "text": "ListboxOption[]"
497
+ }
498
+ },
499
+ "parameters": [
500
+ {
501
+ "name": "sel",
502
+ "type": {
503
+ "text": "HTMLSelectElement"
504
+ }
505
+ }
506
+ ]
507
+ },
508
+ {
509
+ "kind": "method",
510
+ "name": "_selectedValuesFromNativeSelect",
511
+ "privacy": "private",
512
+ "return": {
513
+ "type": {
514
+ "text": "string[]"
515
+ }
516
+ }
517
+ },
518
+ {
519
+ "kind": "method",
520
+ "name": "_defaultSelectedValuesFromNativeSelect",
521
+ "privacy": "private",
522
+ "return": {
523
+ "type": {
524
+ "text": "string[]"
525
+ }
526
+ }
527
+ },
528
+ {
529
+ "kind": "method",
530
+ "name": "_mirrorOptionsToNativeSelect",
531
+ "privacy": "private",
532
+ "return": {
533
+ "type": {
534
+ "text": "void"
535
+ }
536
+ }
537
+ },
538
+ {
539
+ "kind": "method",
540
+ "name": "_addOption",
541
+ "privacy": "protected",
542
+ "return": {
543
+ "type": {
544
+ "text": "void"
545
+ }
546
+ },
547
+ "parameters": [
548
+ {
549
+ "name": "option",
550
+ "type": {
551
+ "text": "ListboxOption"
552
+ }
553
+ }
554
+ ]
555
+ },
556
+ {
557
+ "kind": "method",
558
+ "name": "_normalizeValue",
559
+ "privacy": "private",
560
+ "return": {
561
+ "type": {
562
+ "text": "string[]"
563
+ }
564
+ },
565
+ "parameters": [
566
+ {
567
+ "name": "value",
568
+ "type": {
569
+ "text": "RCSelectValue"
570
+ }
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ "kind": "method",
576
+ "name": "_syncAccessibleName",
577
+ "privacy": "private",
578
+ "return": {
579
+ "type": {
580
+ "text": "void"
581
+ }
582
+ },
583
+ "parameters": [
584
+ {
585
+ "name": "sel",
586
+ "type": {
587
+ "text": "HTMLSelectElement"
588
+ }
589
+ }
590
+ ]
591
+ },
592
+ {
593
+ "kind": "method",
594
+ "name": "_handleListboxChange",
595
+ "privacy": "protected",
596
+ "parameters": [
597
+ {
598
+ "name": "e",
599
+ "type": {
600
+ "text": "CustomEvent"
601
+ }
602
+ }
603
+ ]
604
+ },
605
+ {
606
+ "kind": "method",
607
+ "name": "_removeValue",
608
+ "privacy": "protected",
609
+ "parameters": [
610
+ {
611
+ "name": "value",
612
+ "type": {
613
+ "text": "string"
614
+ }
615
+ }
616
+ ]
617
+ },
618
+ {
619
+ "kind": "method",
620
+ "name": "_syncNativeSelect",
621
+ "privacy": "protected"
622
+ },
623
+ {
624
+ "kind": "method",
625
+ "name": "_dispatchChange",
626
+ "privacy": "protected",
627
+ "return": {
628
+ "type": {
629
+ "text": "void"
630
+ }
631
+ }
632
+ },
633
+ {
634
+ "kind": "method",
635
+ "name": "_selectedOptionsFor",
636
+ "privacy": "private",
637
+ "return": {
638
+ "type": {
639
+ "text": "ListboxOption[]"
640
+ }
641
+ },
642
+ "parameters": [
643
+ {
644
+ "name": "values",
645
+ "type": {
646
+ "text": "string[]"
647
+ }
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "kind": "field",
653
+ "name": "_effectiveDisplay",
654
+ "type": {
655
+ "text": "'chips' | 'compact'"
656
+ },
657
+ "privacy": "protected",
658
+ "readonly": true
659
+ },
660
+ {
661
+ "kind": "method",
662
+ "name": "_labelFor",
663
+ "privacy": "protected",
664
+ "return": {
665
+ "type": {
666
+ "text": "string"
667
+ }
668
+ },
669
+ "parameters": [
670
+ {
671
+ "name": "value",
672
+ "type": {
673
+ "text": "string"
674
+ }
675
+ }
676
+ ]
677
+ },
678
+ {
679
+ "kind": "field",
680
+ "name": "_displayLabel",
681
+ "type": {
682
+ "text": "string"
683
+ },
684
+ "privacy": "protected",
685
+ "readonly": true
686
+ },
687
+ {
688
+ "kind": "method",
689
+ "name": "_handleTriggerKeyDown",
690
+ "privacy": "protected",
691
+ "parameters": [
692
+ {
693
+ "name": "e",
694
+ "type": {
695
+ "text": "KeyboardEvent"
696
+ }
697
+ }
698
+ ]
699
+ },
700
+ {
701
+ "kind": "method",
702
+ "name": "_activateActive",
703
+ "privacy": "private"
704
+ },
705
+ {
706
+ "kind": "method",
707
+ "name": "_handleTypeAhead",
708
+ "privacy": "private",
709
+ "parameters": [
710
+ {
711
+ "name": "char",
712
+ "type": {
713
+ "text": "string"
714
+ }
715
+ }
716
+ ]
717
+ },
718
+ {
719
+ "kind": "method",
720
+ "name": "_enterChipNav",
721
+ "privacy": "private"
722
+ },
723
+ {
724
+ "kind": "method",
725
+ "name": "_getChipButtons",
726
+ "privacy": "private",
727
+ "return": {
728
+ "type": {
729
+ "text": "HTMLButtonElement[]"
730
+ }
731
+ }
732
+ },
733
+ {
734
+ "kind": "method",
735
+ "name": "_handleChipKeyDown",
736
+ "privacy": "protected",
737
+ "parameters": [
738
+ {
739
+ "name": "e",
740
+ "type": {
741
+ "text": "KeyboardEvent"
742
+ }
743
+ },
744
+ {
745
+ "name": "value",
746
+ "type": {
747
+ "text": "string"
748
+ }
749
+ }
750
+ ]
751
+ },
752
+ {
753
+ "kind": "method",
754
+ "name": "_handleTriggerClick",
755
+ "privacy": "protected"
756
+ },
757
+ {
758
+ "kind": "method",
759
+ "name": "_renderChips",
760
+ "privacy": "protected"
761
+ }
762
+ ],
763
+ "events": [
764
+ {
765
+ "name": "rc-select-open",
766
+ "type": {
767
+ "text": "CustomEvent"
768
+ },
769
+ "description": "When the popup opens."
770
+ },
771
+ {
772
+ "name": "rc-select-close",
773
+ "type": {
774
+ "text": "CustomEvent"
775
+ },
776
+ "description": "When the popup closes."
777
+ },
778
+ {
779
+ "name": "rc-select-change",
780
+ "type": {
781
+ "text": "CustomEvent"
782
+ },
783
+ "description": "When user interaction changes selection. `detail: { value, selectedValues, selectedOptions }`"
784
+ }
785
+ ],
786
+ "attributes": [
787
+ {
788
+ "name": "open",
789
+ "type": {
790
+ "text": "boolean"
791
+ },
792
+ "default": "false",
793
+ "fieldName": "open"
794
+ },
795
+ {
796
+ "name": "multiple",
797
+ "type": {
798
+ "text": "boolean"
799
+ },
800
+ "default": "false",
801
+ "fieldName": "multiple"
802
+ },
803
+ {
804
+ "name": "disabled",
805
+ "type": {
806
+ "text": "boolean"
807
+ },
808
+ "default": "false",
809
+ "fieldName": "disabled"
810
+ },
811
+ {
812
+ "name": "placeholder",
813
+ "type": {
814
+ "text": "string"
815
+ },
816
+ "default": "''",
817
+ "fieldName": "placeholder"
818
+ },
819
+ {
820
+ "name": "display",
821
+ "type": {
822
+ "text": "'auto' | 'chips' | 'compact'"
823
+ },
824
+ "default": "'auto'",
825
+ "fieldName": "display"
826
+ }
827
+ ],
828
+ "superclass": {
829
+ "name": "LitElement",
830
+ "package": "lit"
831
+ },
832
+ "tagName": "rc-select",
833
+ "customElement": true
834
+ }
835
+ ],
836
+ "exports": [
837
+ {
838
+ "kind": "js",
839
+ "name": "RCSelect",
840
+ "declaration": {
841
+ "name": "RCSelect",
842
+ "module": "src/rc-select.ts"
843
+ }
844
+ },
845
+ {
846
+ "kind": "js",
847
+ "name": "default",
848
+ "declaration": {
849
+ "name": "RCSelect",
850
+ "module": "src/rc-select.ts"
851
+ }
852
+ }
853
+ ]
854
+ }
855
+ ]
856
+ }