@rcarls/rc-combobox 0.6.0 → 0.7.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.
@@ -44,6 +44,13 @@
44
44
  "kind": "javascript-module",
45
45
  "path": "src/rc-combobox.ts",
46
46
  "declarations": [
47
+ {
48
+ "kind": "variable",
49
+ "name": "DEFAULT_COMBOBOX_MESSAGES",
50
+ "type": {
51
+ "text": "Readonly<RCComboboxMessages>"
52
+ }
53
+ },
47
54
  {
48
55
  "kind": "class",
49
56
  "description": "Editable combobox with filtering and optional allow-create behavior, configured from\nnative option data and following the WAI-ARIA Combobox pattern.\n\nExtends `rc-select` by replacing the trigger `<div>` with a text `<input>`\nand adding: live filtering of the listbox, keyboard navigation from input,\nand an optional \"Create '{text}'\" option for new entries.",
@@ -87,22 +94,75 @@
87
94
  {
88
95
  "description": "Popup listbox border radius.",
89
96
  "name": "--rc-combobox-listbox-radius",
90
- "default": "var(--rc-control-radius)"
97
+ "default": "var(--rc-popup-radius)"
98
+ },
99
+ {
100
+ "description": "Popup listbox open/close fade transition duration.",
101
+ "name": "--rc-combobox-listbox-duration",
102
+ "default": "150ms"
91
103
  },
92
104
  {
93
105
  "description": "Popup listbox border.",
94
106
  "name": "--rc-combobox-listbox-border",
95
- "default": "var(--rc-border)"
107
+ "default": "var(--rc-popup-border)"
108
+ },
109
+ {
110
+ "description": "Popup listbox background.",
111
+ "name": "--rc-combobox-listbox-background",
112
+ "default": "var(--rc-popup-background)"
113
+ },
114
+ {
115
+ "description": "Popup listbox text color.",
116
+ "name": "--rc-combobox-listbox-color",
117
+ "default": "var(--rc-popup-color)"
96
118
  },
97
119
  {
98
120
  "description": "Popup listbox box shadow.",
99
121
  "name": "--rc-combobox-shadow",
100
- "default": "var(--rc-shadow)"
122
+ "default": "var(--rc-popup-shadow)"
101
123
  },
102
124
  {
103
125
  "description": "Popup listbox block padding.",
104
126
  "name": "--rc-combobox-listbox-padding-block",
105
- "default": "var(--rc-control-padding-block)"
127
+ "default": "var(--rc-popup-padding-block)"
128
+ },
129
+ {
130
+ "description": "Dialog search input border.",
131
+ "name": "--rc-combobox-dialog-input-border",
132
+ "default": "var(--rc-border)"
133
+ },
134
+ {
135
+ "description": "Dialog search input radius.",
136
+ "name": "--rc-combobox-dialog-input-radius",
137
+ "default": "var(--rc-control-radius)"
138
+ },
139
+ {
140
+ "description": "Dialog search input background.",
141
+ "name": "--rc-combobox-dialog-input-background",
142
+ "default": "var(--rc-field)"
143
+ },
144
+ {
145
+ "description": "Gap between fullscreen dialog regions.",
146
+ "name": "--rc-combobox-dialog-gap",
147
+ "default": "1rem"
148
+ },
149
+ {
150
+ "description": "Gap between fullscreen dialog header slots.",
151
+ "name": "--rc-combobox-dialog-header-gap",
152
+ "default": "0.5rem"
153
+ },
154
+ {
155
+ "description": "Gap between the dialog search label and input.",
156
+ "name": "--rc-combobox-dialog-search-gap",
157
+ "default": "0.25rem"
158
+ },
159
+ {
160
+ "description": "Visual-viewport inline space supplied by the anchor controller.",
161
+ "name": "--rc-anchor-viewport-inline-size"
162
+ },
163
+ {
164
+ "description": "Visual-viewport block space supplied by the anchor controller.",
165
+ "name": "--rc-anchor-viewport-block-size"
106
166
  },
107
167
  {
108
168
  "description": "Multi-select chip border radius.",
@@ -115,12 +175,17 @@
115
175
  "default": "0.1em"
116
176
  },
117
177
  {
118
- "description": "Multi-select chip inline-axis padding.",
119
- "name": "--rc-combobox-chip-padding-inline",
178
+ "description": "Multi-select chip leading padding.",
179
+ "name": "--rc-combobox-chip-padding-inline-start",
120
180
  "default": "0.3em"
121
181
  },
122
182
  {
123
- "description": "Gap between chip label and remove icon.",
183
+ "description": "Multi-select chip trailing padding, including the remove affordance.",
184
+ "name": "--rc-combobox-chip-padding-inline-end",
185
+ "default": "calc(var(--rc-chip-remove-target-size, 1.5rem) + var(--rc-chip-remove-offset-inline, 0.125rem))"
186
+ },
187
+ {
188
+ "description": "Gap between chip content items.",
124
189
  "name": "--rc-combobox-chip-gap",
125
190
  "default": "calc(var(--rc-control-gap, 0.25em) * 0.8)"
126
191
  },
@@ -129,6 +194,26 @@
129
194
  "name": "--rc-combobox-chip-border",
130
195
  "default": "var(--rc-border)"
131
196
  },
197
+ {
198
+ "description": "Inherited remove-target width reserved by generated multi-select chips.",
199
+ "name": "--rc-chip-remove-target-size",
200
+ "default": "1.5rem"
201
+ },
202
+ {
203
+ "description": "Inherited edge offset reserved by generated multi-select chips.",
204
+ "name": "--rc-chip-remove-offset-inline",
205
+ "default": "0.125rem"
206
+ },
207
+ {
208
+ "description": "Space returned between wrapped chip rows after a touch target overlaps the field's leading padding.",
209
+ "name": "--rc-chip-touch-target-overlap-block-start",
210
+ "default": "0px"
211
+ },
212
+ {
213
+ "description": "Space returned between wrapped chip rows after a touch target overlaps the field's trailing padding.",
214
+ "name": "--rc-chip-touch-target-overlap-block-end",
215
+ "default": "0px"
216
+ },
132
217
  {
133
218
  "description": "Inline size of the toggle button's icon area.",
134
219
  "name": "--rc-combobox-toggle-size",
@@ -167,6 +252,46 @@
167
252
  {
168
253
  "description": "The `<rc-listbox>` popup element.",
169
254
  "name": "listbox"
255
+ },
256
+ {
257
+ "description": "Dialog popup surface.",
258
+ "name": "dialog"
259
+ },
260
+ {
261
+ "description": "Dialog title and action row.",
262
+ "name": "dialog-header"
263
+ },
264
+ {
265
+ "description": "Visible dialog title.",
266
+ "name": "dialog-title"
267
+ },
268
+ {
269
+ "description": "Scrollable selected-chip region.",
270
+ "name": "dialog-selected"
271
+ },
272
+ {
273
+ "description": "Dialog search field wrapper.",
274
+ "name": "dialog-search"
275
+ },
276
+ {
277
+ "description": "Dialog search input.",
278
+ "name": "dialog-input"
279
+ },
280
+ {
281
+ "description": "Dialog option list.",
282
+ "name": "dialog-listbox"
283
+ },
284
+ {
285
+ "description": "Dialog action group.",
286
+ "name": "dialog-actions"
287
+ },
288
+ {
289
+ "description": "Commits pending dialog selection and closes the dialog.",
290
+ "name": "dialog-confirm"
291
+ },
292
+ {
293
+ "description": "Discards pending dialog selection and closes the dialog. Built-in text follows the element's own `lang`, else `<html lang>`: per element through `messages`, or for every combobox through `registerMessages()` from `@rcarls/rc-common` under `rc-combobox`. Text registered under `rc-select` applies too, below the combobox's own. The \"Create\" option reads `rc-listbox`.",
294
+ "name": "dialog-cancel"
170
295
  }
171
296
  ],
172
297
  "slots": [
@@ -180,6 +305,23 @@
180
305
  }
181
306
  ],
182
307
  "members": [
308
+ {
309
+ "kind": "field",
310
+ "name": "messages",
311
+ "type": {
312
+ "text": "Partial<RCComboboxMessages> | undefined"
313
+ },
314
+ "description": "Built-in text overrides; unset keys fall back to registered text, then English."
315
+ },
316
+ {
317
+ "kind": "field",
318
+ "name": "_text",
319
+ "type": {
320
+ "text": "RCComboboxMessages"
321
+ },
322
+ "privacy": "protected",
323
+ "readonly": true
324
+ },
183
325
  {
184
326
  "kind": "field",
185
327
  "name": "allowCreate",
@@ -204,10 +346,18 @@
204
346
  "kind": "field",
205
347
  "name": "_$trigger",
206
348
  "type": {
207
- "text": "HTMLInputElement"
349
+ "text": "HTMLElement"
208
350
  },
209
351
  "privacy": "protected"
210
352
  },
353
+ {
354
+ "kind": "field",
355
+ "name": "_$dialogInput",
356
+ "type": {
357
+ "text": "HTMLInputElement | undefined"
358
+ },
359
+ "privacy": "private"
360
+ },
211
361
  {
212
362
  "kind": "field",
213
363
  "name": "_filterText",
@@ -226,6 +376,39 @@
226
376
  "privacy": "private",
227
377
  "default": "false"
228
378
  },
379
+ {
380
+ "kind": "field",
381
+ "name": "_provisionalOptions",
382
+ "privacy": "private",
383
+ "default": "new Map<string, { value: string; label: string }>()"
384
+ },
385
+ {
386
+ "kind": "field",
387
+ "name": "_preDialogOptions",
388
+ "type": {
389
+ "text": "typeof this._options | null"
390
+ },
391
+ "privacy": "private",
392
+ "default": "null"
393
+ },
394
+ {
395
+ "kind": "field",
396
+ "name": "_$filterInput",
397
+ "type": {
398
+ "text": "HTMLInputElement | null"
399
+ },
400
+ "privacy": "private",
401
+ "readonly": true
402
+ },
403
+ {
404
+ "kind": "field",
405
+ "name": "_$activeDescendantHost",
406
+ "type": {
407
+ "text": "HTMLElement | null"
408
+ },
409
+ "privacy": "protected",
410
+ "readonly": true
411
+ },
229
412
  {
230
413
  "kind": "method",
231
414
  "name": "openPopup"
@@ -284,6 +467,42 @@
284
467
  }
285
468
  ]
286
469
  },
470
+ {
471
+ "kind": "method",
472
+ "name": "_handleDialogAnchorClick",
473
+ "privacy": "private",
474
+ "return": {
475
+ "type": {
476
+ "text": "void"
477
+ }
478
+ },
479
+ "parameters": [
480
+ {
481
+ "name": "e",
482
+ "type": {
483
+ "text": "MouseEvent"
484
+ }
485
+ }
486
+ ]
487
+ },
488
+ {
489
+ "kind": "method",
490
+ "name": "_handleDialogTriggerKeyDown",
491
+ "privacy": "private",
492
+ "return": {
493
+ "type": {
494
+ "text": "void"
495
+ }
496
+ },
497
+ "parameters": [
498
+ {
499
+ "name": "e",
500
+ "type": {
501
+ "text": "KeyboardEvent"
502
+ }
503
+ }
504
+ ]
505
+ },
287
506
  {
288
507
  "kind": "method",
289
508
  "name": "_updateCreateOption",
@@ -358,6 +577,87 @@
358
577
  },
359
578
  "privacy": "private",
360
579
  "readonly": true
580
+ },
581
+ {
582
+ "kind": "method",
583
+ "name": "_syncAccessibleName",
584
+ "privacy": "protected",
585
+ "return": {
586
+ "type": {
587
+ "text": "void"
588
+ }
589
+ },
590
+ "parameters": [
591
+ {
592
+ "name": "$select",
593
+ "type": {
594
+ "text": "HTMLSelectElement"
595
+ }
596
+ }
597
+ ]
598
+ },
599
+ {
600
+ "kind": "method",
601
+ "name": "_focusDialogContent",
602
+ "privacy": "protected",
603
+ "return": {
604
+ "type": {
605
+ "text": "void"
606
+ }
607
+ }
608
+ },
609
+ {
610
+ "kind": "method",
611
+ "name": "_prepareDialogCommit",
612
+ "privacy": "protected",
613
+ "return": {
614
+ "type": {
615
+ "text": "void"
616
+ }
617
+ }
618
+ },
619
+ {
620
+ "kind": "method",
621
+ "name": "_commitDialogSelection",
622
+ "privacy": "protected",
623
+ "return": {
624
+ "type": {
625
+ "text": "void"
626
+ }
627
+ }
628
+ },
629
+ {
630
+ "kind": "method",
631
+ "name": "_discardDialogSelection",
632
+ "privacy": "protected",
633
+ "return": {
634
+ "type": {
635
+ "text": "void"
636
+ }
637
+ }
638
+ },
639
+ {
640
+ "kind": "method",
641
+ "name": "_finishDialogClose",
642
+ "privacy": "protected",
643
+ "return": {
644
+ "type": {
645
+ "text": "void"
646
+ }
647
+ },
648
+ "parameters": [
649
+ {
650
+ "name": "returnFocus",
651
+ "type": {
652
+ "text": "boolean"
653
+ }
654
+ }
655
+ ]
656
+ },
657
+ {
658
+ "kind": "method",
659
+ "name": "_renderDialogBody",
660
+ "privacy": "protected"
361
661
  }
362
662
  ],
363
663
  "events": [
@@ -380,6 +680,10 @@
380
680
  "default": "false",
381
681
  "fieldName": "allowCreate"
382
682
  },
683
+ {
684
+ "description": "Inherited from `rc-select`; mirrors the slotted native `<select>`'s own `required`, for `aria-required` on the input trigger.",
685
+ "name": "required"
686
+ },
383
687
  {
384
688
  "description": "How option labels are matched against typed input.\n\n- Forwarded to the internal `rc-listbox`.\n- Defaults to `'contains'` (substring).\n- Set to `'prefix'` for starts-with matching, or\n- Pass a custom `(label, query) => boolean` predicate.\n\nFunction values are JS-only; string values may be set via the `filter-strategy` attribute.",
385
689
  "name": "filter-strategy",
@@ -388,6 +692,10 @@
388
692
  },
389
693
  "default": "'contains'",
390
694
  "fieldName": "filterStrategy"
695
+ },
696
+ {
697
+ "description": "Presents options in an anchored `popover` (default) or modal `dialog`.",
698
+ "name": "popup-mode"
391
699
  }
392
700
  ],
393
701
  "superclass": {
@@ -399,6 +707,14 @@
399
707
  }
400
708
  ],
401
709
  "exports": [
710
+ {
711
+ "kind": "js",
712
+ "name": "DEFAULT_COMBOBOX_MESSAGES",
713
+ "declaration": {
714
+ "name": "DEFAULT_COMBOBOX_MESSAGES",
715
+ "module": "src/rc-combobox.ts"
716
+ }
717
+ },
402
718
  {
403
719
  "kind": "js",
404
720
  "name": "RCCombobox",