@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.
- package/CHANGELOG.md +286 -0
- package/README.md +35 -2
- package/dist/custom-elements.json +324 -8
- package/dist/rc-combobox-8jDCwAe_.js +371 -0
- package/dist/rc-combobox-8jDCwAe_.js.map +1 -0
- package/dist/rc-combobox-define.js +3 -2
- package/dist/rc-combobox-define.js.map +1 -1
- package/dist/rc-combobox.js +3 -2
- package/dist/types/packages/rc-combobox/src/rc-combobox.d.ts +78 -9
- package/package.json +5 -6
- package/dist/rc-combobox-CbI4E_hd.js +0 -404
- package/dist/rc-combobox-CbI4E_hd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,291 @@
|
|
|
1
1
|
# @rcarls/rc-combobox
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 079e025: Standardize component styling contracts for the breaking 0.7 release.
|
|
8
|
+
|
|
9
|
+
BREAKING CHANGE: Rename the Markdown editor's `--rme-*` properties to
|
|
10
|
+
`--rc-markdown-editor-*`, `--rc-app-bar-background` to `--rc-app-bar-bg`,
|
|
11
|
+
`--rc-textarea-radius` to `--rc-textarea-border-radius`, the transfer-list
|
|
12
|
+
`--rc-transfer-list-panel-*` properties to `--rc-transfer-list-listbox-*`,
|
|
13
|
+
`--rc-chip-group-webkit-scrollbar-display` to
|
|
14
|
+
`--rc-chip-group-scrollbar-display`, and `--rc-text` to `--rc-field-text`.
|
|
15
|
+
Compatibility aliases are intentionally not provided.
|
|
16
|
+
|
|
17
|
+
BREAKING CHANGE: Replace `--rc-select-chip-padding-inline` and
|
|
18
|
+
`--rc-combobox-chip-padding-inline` with explicit `*-padding-inline-start` and
|
|
19
|
+
`*-padding-inline-end` tokens. Generated removable chips now reserve the full
|
|
20
|
+
remove target and its edge offset, so their indicator cannot overlap label text.
|
|
21
|
+
|
|
22
|
+
Add canonical app-bar elevation, transfer-list listbox radius, and textarea
|
|
23
|
+
line-action tokens. Add logical `rc-chip` inline-padding properties so themes
|
|
24
|
+
can implement Material's icon-aware spacing without overriding authored child
|
|
25
|
+
styles. Make `rc-field` consume the shared semantic token layer,
|
|
26
|
+
and place the `rc-chip` and `rc-search-bar` light-DOM structural styles in the
|
|
27
|
+
`rc-base` cascade layer so normal consumer rules override them.
|
|
28
|
+
|
|
29
|
+
Prevent decorative, `aria-hidden` trailing list content from intercepting a
|
|
30
|
+
whole-row action target, and keep segmented-list item geometry from leaking
|
|
31
|
+
into nested standard lists.
|
|
32
|
+
|
|
33
|
+
Remove unused Material navigation-rail toggle tokens and obsolete list-item
|
|
34
|
+
theme tokens. Register the segmented-button private theme seam and enforce
|
|
35
|
+
token ownership, documentation, removed-name, selector-budget, and cascade
|
|
36
|
+
layer contracts through the component architecture audit.
|
|
37
|
+
|
|
38
|
+
- 4341311: Add reusable fullscreen dialogs and declarative dialog popup mode to `rc-select` and
|
|
39
|
+
`rc-combobox`. Dialog selection and creation are staged until Done, while close and Escape
|
|
40
|
+
discard the draft. Fullscreen surfaces follow the visual viewport under browser zoom and
|
|
41
|
+
software keyboards, and anchored popups now clamp to the visual viewport.
|
|
42
|
+
- 54d9ead: Localize every component's built-in text. Button names, role
|
|
43
|
+
descriptions, announcements, and default labels now resolve per key from
|
|
44
|
+
the element's `messages` property, then from text registered with
|
|
45
|
+
`registerMessages(locale, catalog)` in `@rcarls/rc-common`, then from the
|
|
46
|
+
English defaults. The locale is the element's own `lang`, else
|
|
47
|
+
`<html lang>`; an ancestor's `lang` is ignored, because it usually marks
|
|
48
|
+
content rather than the interface. Components re-render when that locale
|
|
49
|
+
changes or new text is registered. `RcMessageCatalog` types the catalog,
|
|
50
|
+
and each package adds its scope to it.
|
|
51
|
+
|
|
52
|
+
Numbers a component formats as text follow the same locale:
|
|
53
|
+
`rc-progress`'s default percentage and `rc-splitter`'s `aria-valuetext`
|
|
54
|
+
use `Intl.NumberFormat`. `TypeaheadController` matches prefixes with an
|
|
55
|
+
`Intl.Collator`, so case and accents are ignored the way the locale
|
|
56
|
+
ignores them, and takes a `locale` option. `ItemsCollectionController`'s
|
|
57
|
+
`setCreateOption(text, label?)` takes the option's visible text from its
|
|
58
|
+
caller.
|
|
59
|
+
|
|
60
|
+
`rc-transfer-list`'s direction arrows are now decorative: screen readers
|
|
61
|
+
read only the action name, and the arrows turn over in RTL.
|
|
62
|
+
|
|
63
|
+
**Breaking:** chrome-text properties are replaced by `messages`. Migrate:
|
|
64
|
+
|
|
65
|
+
- `rc-search-bar` `clear-label` / `clearLabel` → `messages.clear`
|
|
66
|
+
- `rc-adaptive-menu` `overflow-label` / `overflowLabel` → `messages.overflow`
|
|
67
|
+
- `rc-chip-group` `show-all-label` / `showAllLabel` and `show-less-label` /
|
|
68
|
+
`showLessLabel` → `messages.showAll` and `messages.showLess`
|
|
69
|
+
- `rc-select` and `rc-combobox` `dialog-confirm-label` /
|
|
70
|
+
`dialogConfirmLabel` and `dialog-cancel-label` / `dialogCancelLabel` →
|
|
71
|
+
`messages.done` and `messages.cancel`
|
|
72
|
+
- `rc-editor-toolbar` `label` → `messages.toolbar`
|
|
73
|
+
|
|
74
|
+
Per-instance names stay attributes, but now default to `undefined` and fall
|
|
75
|
+
back to a message: `label` on `rc-adaptive-menu`, `rc-chip-group`,
|
|
76
|
+
`rc-menubar`, and `rc-splitter`; `available-label` and `selected-label`
|
|
77
|
+
on `rc-transfer-list`; `low-label` and `high-label` on `rc-range-slider`.
|
|
78
|
+
Read the resolved name from the rendered `aria-label` instead of the
|
|
79
|
+
property.
|
|
80
|
+
|
|
81
|
+
- 94dc987: `rc-menu-button`'s, `rc-select`'s, and `rc-combobox`'s popup/listbox now fade
|
|
82
|
+
in and out through CSS alone, using `@starting-style` and a discrete
|
|
83
|
+
`display`/`overlay` transition, driven by new `--rc-menu-button-popup-duration`,
|
|
84
|
+
`--rc-select-listbox-duration`, and `--rc-combobox-listbox-duration`
|
|
85
|
+
properties. `showPopover()`/`hidePopover()` (via `openPopup()`/`closePopup()`)
|
|
86
|
+
stay synchronous, and nothing waits on the transition finishing.
|
|
87
|
+
|
|
88
|
+
These animate opacity only, not a scale or slide transform: all three
|
|
89
|
+
position their popup with the shared `AnchorController`, which applies its
|
|
90
|
+
own viewport-clamping `translate` and reads `getBoundingClientRect()` to
|
|
91
|
+
compute the next correction. A second, CSS-driven transform on the same
|
|
92
|
+
element and property would fight that positioning math on every open, not
|
|
93
|
+
only during an edge case.
|
|
94
|
+
|
|
95
|
+
`rc-fab-menu` already had a scale-based entrance for its popup (verified safe
|
|
96
|
+
here: unlike the general `AnchorController` case, this popup isn't
|
|
97
|
+
collision-clamped), but no exit animation at all and no directional easing.
|
|
98
|
+
Both are added: the popup now fades and scales back out on close, and enter
|
|
99
|
+
uses a decelerating curve while exit uses an accelerating one.
|
|
100
|
+
|
|
101
|
+
- 687a9be: Add shared popup surface tokens: `--rc-popup-background`, `--rc-popup-color`,
|
|
102
|
+
`--rc-popup-border`, `--rc-popup-radius`, `--rc-popup-shadow`, and
|
|
103
|
+
`--rc-popup-padding-block`. Menus, adaptive-menu popups, and select and
|
|
104
|
+
combobox listboxes read them before their own fallbacks. Themes set them at the
|
|
105
|
+
theme root, so popups rendered inside other shadow roots keep the theme's
|
|
106
|
+
surface. Select and combobox add `--rc-*-listbox-background` and
|
|
107
|
+
`--rc-*-listbox-color`.
|
|
108
|
+
|
|
109
|
+
Breaking: popup surfaces no longer fall back to `--rc-control-radius`. Set
|
|
110
|
+
`--rc-popup-radius` (or the per-component radius token) to change popup
|
|
111
|
+
corners. The Material, Substrate, and Win31 themes no longer set per-component
|
|
112
|
+
popup surface tokens such as `--rc-menu-radius` or
|
|
113
|
+
`--rc-adaptive-menu-popup-background`; override the `--rc-popup-*` tokens
|
|
114
|
+
instead. Material select and combobox listboxes now use the menu container
|
|
115
|
+
color, Material forced-colors popups gain a border, and Substrate listboxes use
|
|
116
|
+
the menu shadow and padding. Material retains its two-layer adaptive-menu popup
|
|
117
|
+
shadow through a component token while other popups continue using the shared
|
|
118
|
+
shadow.
|
|
119
|
+
|
|
120
|
+
- f0d0fba: Load the select dialog popup and selected-value chips on first use.
|
|
121
|
+
`rc-select` and `rc-combobox` now import `rc-dialog` only for
|
|
122
|
+
`popup-mode="dialog"` and `rc-chip-group` only for `multiple`, so a popover
|
|
123
|
+
single select ships neither. The markdown editor toolbar picks the heading level
|
|
124
|
+
with a native `<select>`, styled by the existing
|
|
125
|
+
`--rc-markdown-editor-toolbar-select-*` properties, and no longer depends on
|
|
126
|
+
`rc-select`.
|
|
127
|
+
|
|
128
|
+
Breaking change and migration:
|
|
129
|
+
|
|
130
|
+
- Importing `@rcarls/rc-select/define` or `@rcarls/rc-combobox/define` no
|
|
131
|
+
longer registers `rc-dialog`, `rc-chip-group`, or `rc-chip`. Import their own
|
|
132
|
+
`define` entries where the page uses those elements directly.
|
|
133
|
+
|
|
134
|
+
### Patch Changes
|
|
135
|
+
|
|
136
|
+
- 9ee769c: Anchor popups in logical terms only. A placement is now `block-start`,
|
|
137
|
+
`block-end`, `inline-start`, or `inline-end`, each with an optional
|
|
138
|
+
`-start`/`-end` edge alignment, and all of them follow the writing mode and
|
|
139
|
+
direction. Block sides open above or below a row in horizontal text and
|
|
140
|
+
beside it in vertical text; inline sides open along the reading direction,
|
|
141
|
+
so `inline-end` opens to the left in RTL. `resolveAnchorPlacement` exposes
|
|
142
|
+
the resolution for other consumers.
|
|
143
|
+
|
|
144
|
+
**Breaking:** the physical placements `top*`, `bottom*`, `left*`, and
|
|
145
|
+
`right*` are removed from `AnchorPlacement`, `rc-menu-button`'s and
|
|
146
|
+
`rc-fab-menu`'s `placement`, and the React and Solid typings. Migrate:
|
|
147
|
+
|
|
148
|
+
- `bottom*` → `block-end*`
|
|
149
|
+
- `top*` → `block-start*`
|
|
150
|
+
- `right*` → `inline-end*` (in LTR)
|
|
151
|
+
- `left*` → `inline-start*` (in LTR)
|
|
152
|
+
|
|
153
|
+
Defaults move with them and render the same in horizontal LTR text:
|
|
154
|
+
`rc-menu-button`, `rc-select`, and `rc-combobox` open at `block-end-start`,
|
|
155
|
+
`rc-adaptive-menu`'s overflow menu at `block-end-end`, and `rc-fab-menu` at
|
|
156
|
+
`block-start-end`. In vertical text these popups now open beside their
|
|
157
|
+
trigger instead of over the next item. Vertical menubars and vertical
|
|
158
|
+
adaptive menus open submenus at `inline-end-start`. Open popups also
|
|
159
|
+
re-resolve their physical side and alignment when an ancestor's `dir`
|
|
160
|
+
changes, and `rc-fab-menu` keeps its corner-aware default even when nested in
|
|
161
|
+
a vertical menubar.
|
|
162
|
+
|
|
163
|
+
- 1179f24: Drop the `@oddbird/css-anchor-positioning` polyfill. Browsers without full
|
|
164
|
+
native anchor positioning now use `AnchorController`'s script positioning,
|
|
165
|
+
which applies the same placement and flip rules and re-positions when the page
|
|
166
|
+
scrolls or the viewport, anchor, or floating element resizes. Those browsers no
|
|
167
|
+
longer download the 41 kB polyfill the first time a popup opens.
|
|
168
|
+
- 3d050f1: Keep wrapped chip rows evenly spaced. Readonly chips in an `rc-chip-group`
|
|
169
|
+
keep the touch-target block size, so expanded rows share the disclosure
|
|
170
|
+
toggle's pitch. `rc-combobox` and `rc-select` return the chip touch-target
|
|
171
|
+
overlap tokens as row gap, so interior chip rows no longer collapse onto each
|
|
172
|
+
other inside a field. Material combobox and select input chips drop their
|
|
173
|
+
extra block padding to render at the 2rem chip height.
|
|
174
|
+
- 595fe37: `rc-combobox` now falls back to text registered under `rc-select`, below
|
|
175
|
+
its own `rc-combobox` text, so an app no longer registers the shared keys
|
|
176
|
+
twice. `resolveMessages()` and `MessagesController` take an `inherit` scope
|
|
177
|
+
for the same layering in other components: within each locale the
|
|
178
|
+
component's own scope wins, a more specific locale wins over its base
|
|
179
|
+
language, and only keys the component has defaults for are taken.
|
|
180
|
+
- 5c006de: Ship component CSS minified. Package builds now run the CSS in Lit `css` styles
|
|
181
|
+
and light-DOM structural styles through Lightning CSS, removing comments and
|
|
182
|
+
whitespace while keeping source maps that resolve to each template. Rendered
|
|
183
|
+
styles are unchanged.
|
|
184
|
+
|
|
185
|
+
`@rcarls/rc-common` adds `cssText`, an identity tag that marks a plain CSS
|
|
186
|
+
string for minification. `rc-chip`, `rc-disclosure`, and `rc-accordion` now
|
|
187
|
+
depend on `@rcarls/rc-common` for it.
|
|
188
|
+
|
|
189
|
+
- 011f3c6: Keep combobox chips clear of their trailing toggle, reset native selects inside
|
|
190
|
+
`rc-field`, keep controlled carousel accessibility state synchronized, and align
|
|
191
|
+
Material chips, menus, lists, disclosures, nested editors, and bottom-sheet
|
|
192
|
+
motion with their MD3 defaults.
|
|
193
|
+
- ec6ebc6: Load dialog move and resize behavior on demand. `rc-dialog` now imports its
|
|
194
|
+
drag and resize controllers only the first time `movable`, `move-handle`, or
|
|
195
|
+
`resize` enables them, so dialogs that never move or resize, including the
|
|
196
|
+
popups inside `rc-select`, `rc-combobox`, and `rc-markdown-editor`, no longer
|
|
197
|
+
ship that code. The new `@rcarls/rc-dialog/geometry` entry exports
|
|
198
|
+
`DialogGeometry` for subclasses that always resize; `rc-bottom-sheet` uses it,
|
|
199
|
+
so its resize stays available immediately.
|
|
200
|
+
|
|
201
|
+
Breaking changes and migration:
|
|
202
|
+
|
|
203
|
+
- `rc-dialog` and `rc-bottom-sheet` remove `light-dismiss` / `lightDismiss`.
|
|
204
|
+
Use `closed-by="any"`, which closes on Escape or a backdrop click and now
|
|
205
|
+
falls back to a backdrop click listener where the browser has no native
|
|
206
|
+
`closedby`.
|
|
207
|
+
- `rc-bottom-sheet` now defaults `closed-by` to `any` instead of defaulting
|
|
208
|
+
`light-dismiss` to true. Set `closed-by="closerequest"` to keep backdrop
|
|
209
|
+
clicks from closing a sheet, or `closed-by="none"` to allow only explicit
|
|
210
|
+
actions.
|
|
211
|
+
|
|
212
|
+
- 51f6403: Arrow keys follow the reading direction everywhere. `keyNavigation` now also
|
|
213
|
+
flips the cross axis in RTL, so a vertical menu opens its submenu with
|
|
214
|
+
ArrowLeft, as the APG describes. A horizontal menubar and segmented button
|
|
215
|
+
advance with ArrowLeft in RTL, Alt+ArrowLeft moves items toward the selected
|
|
216
|
+
list of a transfer list in RTL, and the arrow toward the inline start reaches
|
|
217
|
+
the chips of a multiple select or combobox (ArrowRight in RTL).
|
|
218
|
+
|
|
219
|
+
Add `inlineArrowKeys(flow)` for content that runs along the inline axis, such
|
|
220
|
+
as chips or text.
|
|
221
|
+
|
|
222
|
+
- b764a3c: Observe interface locale changes through containing shadow roots and the host's own document.
|
|
223
|
+
An explicit empty `lang` now means an unknown locale rather than falling back to `<html lang>`.
|
|
224
|
+
Typeahead compares complete grapheme prefixes, including decomposed accents and collation
|
|
225
|
+
expansions. Default interpolating messages format numeric positions in the interface locale
|
|
226
|
+
while translation callbacks continue to receive numbers and can accept an optional locale.
|
|
227
|
+
Default messages isolate consumer text whose direction is unknown. Textarea content direction
|
|
228
|
+
uses the native LTR fallback for neutral `dir="auto"` content, recognizes Arabic Letter Mark and
|
|
229
|
+
isolate controls, and reruns plugins when the native textarea's `lang` or `dir` changes.
|
|
230
|
+
- cc0205d: Use logical CSS properties so layout follows the reading direction and
|
|
231
|
+
writing mode: the textarea gutter border and alignment, line-action and
|
|
232
|
+
diagnostic-message spacing, the markdown editor's block quote and list
|
|
233
|
+
indents, and block-axis scrolling for listbox, select, combobox, and markdown
|
|
234
|
+
panes, each keeping its physical declaration as a fallback.
|
|
235
|
+
- 8363cb8: Fix a real user-driven "create new option" selection not dispatching native `input`/`change` on
|
|
236
|
+
the slotted `<select>` (`focus()`/`blur()` forwarding and `required` mirroring were already
|
|
237
|
+
correct through inheritance from `rc-select`'s new control-provider support). `aria-required`
|
|
238
|
+
now reflects on the input trigger.
|
|
239
|
+
- Updated dependencies [e3dfa59]
|
|
240
|
+
- Updated dependencies [50d5610]
|
|
241
|
+
- Updated dependencies [9ee769c]
|
|
242
|
+
- Updated dependencies [1179f24]
|
|
243
|
+
- Updated dependencies [9720b36]
|
|
244
|
+
- Updated dependencies [2934328]
|
|
245
|
+
- Updated dependencies [9059bce]
|
|
246
|
+
- Updated dependencies [3d050f1]
|
|
247
|
+
- Updated dependencies [595fe37]
|
|
248
|
+
- Updated dependencies [38cd00c]
|
|
249
|
+
- Updated dependencies [5c006de]
|
|
250
|
+
- Updated dependencies [079e025]
|
|
251
|
+
- Updated dependencies [a6553ff]
|
|
252
|
+
- Updated dependencies [2205478]
|
|
253
|
+
- Updated dependencies [ec6ebc6]
|
|
254
|
+
- Updated dependencies [4341311]
|
|
255
|
+
- Updated dependencies [899bb5e]
|
|
256
|
+
- Updated dependencies [25fcfe0]
|
|
257
|
+
- Updated dependencies [51f6403]
|
|
258
|
+
- Updated dependencies [9caca6b]
|
|
259
|
+
- Updated dependencies [b764a3c]
|
|
260
|
+
- Updated dependencies [cc0205d]
|
|
261
|
+
- Updated dependencies [54d9ead]
|
|
262
|
+
- Updated dependencies [94dc987]
|
|
263
|
+
- Updated dependencies [b9175e9]
|
|
264
|
+
- Updated dependencies [c8b762b]
|
|
265
|
+
- Updated dependencies [55e1e7f]
|
|
266
|
+
- Updated dependencies [f1ca82d]
|
|
267
|
+
- Updated dependencies [687a9be]
|
|
268
|
+
- Updated dependencies [3fe08cb]
|
|
269
|
+
- Updated dependencies [a86edce]
|
|
270
|
+
- Updated dependencies [b87f27b]
|
|
271
|
+
- Updated dependencies [32ebead]
|
|
272
|
+
- Updated dependencies [bfefedd]
|
|
273
|
+
- Updated dependencies [c130173]
|
|
274
|
+
- Updated dependencies [8a30e96]
|
|
275
|
+
- Updated dependencies [11680b6]
|
|
276
|
+
- Updated dependencies [223d36c]
|
|
277
|
+
- Updated dependencies [7b91a44]
|
|
278
|
+
- Updated dependencies [aa04ead]
|
|
279
|
+
- Updated dependencies [ac65b5b]
|
|
280
|
+
- Updated dependencies [f0d0fba]
|
|
281
|
+
- Updated dependencies [6d126fd]
|
|
282
|
+
- Updated dependencies [afcfef8]
|
|
283
|
+
- Updated dependencies [11ef1ad]
|
|
284
|
+
- @rcarls/rc-common@0.7.0
|
|
285
|
+
- @rcarls/rc-select@0.7.0
|
|
286
|
+
- @rcarls/rc-chip-group@0.7.0
|
|
287
|
+
- @rcarls/rc-listbox@0.7.0
|
|
288
|
+
|
|
3
289
|
## 0.6.0
|
|
4
290
|
|
|
5
291
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -56,10 +56,41 @@ fires `rc-combobox-create`.
|
|
|
56
56
|
</rc-combobox>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## Dialog Popup
|
|
60
|
+
|
|
61
|
+
Use `popup-mode="dialog"` when an anchored option list would leave too little usable
|
|
62
|
+
viewport, such as on a phone with the software keyboard open. The trigger opens a native modal
|
|
63
|
+
dialog with the current chips, a dedicated search input, the option list, and a Done action.
|
|
64
|
+
Selections and newly created values are staged while the dialog is open. Done commits them in
|
|
65
|
+
one selection change; the leading close action, Escape, and imperative close discard them.
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<rc-combobox popup-mode="dialog" allow-create placeholder="Add categories">
|
|
69
|
+
<select name="categories" multiple>
|
|
70
|
+
<option value="quick">Quick meal</option>
|
|
71
|
+
<option value="vegetarian">Vegetarian</option>
|
|
72
|
+
</select>
|
|
73
|
+
</rc-combobox>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Choose the mode declaratively from your application’s viewport policy. The component latches
|
|
77
|
+
the mode for an open interaction, so changing `popupMode` does not replace an active popup.
|
|
78
|
+
|
|
79
|
+
## Localization
|
|
80
|
+
|
|
81
|
+
Built-in text follows the element's own `lang`, else `<html lang>`, and never an
|
|
82
|
+
ancestor's `lang`, which usually marks content. Override it per element with the
|
|
83
|
+
`messages` property, or for every instance with `registerMessages()` from
|
|
84
|
+
`@rcarls/rc-common` under `rc-combobox`. Keys: every `rc-select` key plus `search`. Text
|
|
85
|
+
registered under `rc-select` applies too, below text registered under `rc-combobox`. The
|
|
86
|
+
"Create" option reads `rc-listbox`, and the combobox passes its `lang` to its listbox. See the
|
|
87
|
+
[rc-common Localization section](https://github.com/richardcarls/rc-webcomponents/tree/develop/packages/rc-common#localization).
|
|
88
|
+
|
|
59
89
|
### Validation
|
|
60
90
|
|
|
61
91
|
`rc-combobox-create` is cancelable. Call `event.preventDefault()` to block insertion when the
|
|
62
|
-
text fails validation.
|
|
92
|
+
text fails validation. In dialog mode the event is deferred until Done, before the selection
|
|
93
|
+
commit. The default behavior (insert + select) runs otherwise.
|
|
63
94
|
|
|
64
95
|
```js
|
|
65
96
|
combobox.addEventListener('rc-combobox-create', (event) => {
|
|
@@ -159,12 +190,13 @@ For `allow-create`, the same split applies to options:
|
|
|
159
190
|
| ---------------- | ------------------------------------ | -------------------------------------------------------------------------- |
|
|
160
191
|
| `allowCreate` | `boolean` | Shows a create option for unmatched input. |
|
|
161
192
|
| `filterStrategy` | `'prefix' \| 'contains' \| function` | Controls option filtering. |
|
|
193
|
+
| `popupMode` | `'popover' \| 'dialog'` | Chooses an anchored popup or modal dialog. Defaults to `'popover'`. |
|
|
162
194
|
| `open` | `boolean` | Inherited from `rc-select`; reflects whether the popup is open. |
|
|
163
195
|
| `multiple` | `boolean` | Inherited from `rc-select`; enables multiple selection and chip rendering. |
|
|
164
196
|
| `disabled` | `boolean` | Inherited from `rc-select`; disables the input and popup trigger. |
|
|
165
197
|
| `placeholder` | `string` | Inherited from `rc-select`; input placeholder when no value is selected. |
|
|
166
198
|
| `display` | `'auto' \| 'chips' \| 'compact'` | Inherited from `rc-select`; controls multiple-value presentation. |
|
|
167
|
-
| `value` | `string \| string[]` | Inherited
|
|
199
|
+
| `value` | `string \| string[]` | Inherited committed selection. Host writes are silent. |
|
|
168
200
|
| `defaultValue` | `string \| string[] \| undefined` | Inherited JS-only initial value for uncontrolled usage. |
|
|
169
201
|
| `options` | `ListboxOption[] \| undefined` | Inherited JS-only option-data override. |
|
|
170
202
|
| `selectedValues` | `string[]` | Inherited read-only snapshot of selected values. |
|
|
@@ -185,5 +217,6 @@ selection-change event.
|
|
|
185
217
|
## Accessibility
|
|
186
218
|
|
|
187
219
|
- Input uses `role="combobox"` with `aria-autocomplete="list"`.
|
|
220
|
+
- Dialog mode exposes a dialog-valued combobox trigger and moves filtering into the modal.
|
|
188
221
|
- Popup navigation uses `aria-activedescendant`.
|
|
189
222
|
- The slotted native `<select>` remains the form value source.
|