@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.
- package/CHANGELOG.md +184 -0
- package/README.md +93 -0
- package/dist/custom-elements.json +1445 -0
- package/dist/rc-select-MQcvA385.js +1079 -0
- package/dist/rc-select-MQcvA385.js.map +1 -0
- package/dist/rc-select-define.js +8 -0
- package/dist/rc-select-define.js.map +1 -0
- package/dist/rc-select.js +5 -0
- package/dist/rc-select.js.map +1 -0
- package/dist/types/packages/rc-select/src/define.d.ts +1 -0
- package/dist/types/packages/rc-select/src/index.d.ts +1 -0
- package/dist/types/packages/rc-select/src/rc-select.d.ts +430 -0
- package/dist/types/packages/rc-select/src/rc-select.styles.d.ts +2 -0
- package/package.json +68 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# @rcarls/rc-select
|
|
2
|
+
|
|
3
|
+
## 0.0.0-next-20260921045401
|
|
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
|
+
- 94dc987: `rc-menu-button`'s, `rc-select`'s, and `rc-combobox`'s popup/listbox now fade
|
|
43
|
+
in and out through CSS alone, using `@starting-style` and a discrete
|
|
44
|
+
`display`/`overlay` transition, driven by new `--rc-menu-button-popup-duration`,
|
|
45
|
+
`--rc-select-listbox-duration`, and `--rc-combobox-listbox-duration`
|
|
46
|
+
properties. `showPopover()`/`hidePopover()` (via `openPopup()`/`closePopup()`)
|
|
47
|
+
stay synchronous, and nothing waits on the transition finishing.
|
|
48
|
+
|
|
49
|
+
These animate opacity only, not a scale or slide transform: all three
|
|
50
|
+
position their popup with the shared `AnchorController`, which applies its
|
|
51
|
+
own viewport-clamping `translate` and reads `getBoundingClientRect()` to
|
|
52
|
+
compute the next correction. A second, CSS-driven transform on the same
|
|
53
|
+
element and property would fight that positioning math on every open, not
|
|
54
|
+
only during an edge case.
|
|
55
|
+
|
|
56
|
+
`rc-fab-menu` already had a scale-based entrance for its popup (verified safe
|
|
57
|
+
here: unlike the general `AnchorController` case, this popup isn't
|
|
58
|
+
collision-clamped), but no exit animation at all and no directional easing.
|
|
59
|
+
Both are added: the popup now fades and scales back out on close, and enter
|
|
60
|
+
uses a decelerating curve while exit uses an accelerating one.
|
|
61
|
+
|
|
62
|
+
- 8a30e96: Support acting as an `rc-field` control provider: `focus()`/`blur()` forward to the shadow-DOM
|
|
63
|
+
trigger, a real user-driven selection now dispatches native `input` and `change` on the slotted
|
|
64
|
+
`<select>` (a programmatic `value`/`defaultValue` write does not, matching `rc-textarea`'s
|
|
65
|
+
controlled-value contract), and a new `required` property mirrors the slotted select's own
|
|
66
|
+
`required` onto `aria-required` on the trigger.
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- Updated dependencies [50d5610]
|
|
71
|
+
- Updated dependencies [079e025]
|
|
72
|
+
- Updated dependencies [4341311]
|
|
73
|
+
- Updated dependencies [2c7c80a]
|
|
74
|
+
- Updated dependencies [57338f5]
|
|
75
|
+
- @rcarls/rc-common@0.0.0-next-20260921045401
|
|
76
|
+
- @rcarls/rc-chip-group@0.0.0-next-20260921045401
|
|
77
|
+
- @rcarls/rc-dialog@0.0.0-next-20260921045401
|
|
78
|
+
- @rcarls/rc-listbox@0.0.0-next-20260921045401
|
|
79
|
+
|
|
80
|
+
## 0.6.0
|
|
81
|
+
|
|
82
|
+
### Minor Changes
|
|
83
|
+
|
|
84
|
+
- ffcbf11: Add adaptive chip-group layouts, native-backed filter chips, and shared
|
|
85
|
+
input-chip rendering. Native-backed chips preserve controlled host state,
|
|
86
|
+
follow form resets when uncontrolled, and accept native link actions. Groups
|
|
87
|
+
restore author-owned chip variants when coordination ends. Keep search input
|
|
88
|
+
chrome inside the search surface and align contextual icon sizes with Material 3.
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies [ffcbf11]
|
|
93
|
+
- Updated dependencies [6683eb9]
|
|
94
|
+
- Updated dependencies [ee7ba6c]
|
|
95
|
+
- Updated dependencies [30eb232]
|
|
96
|
+
- @rcarls/rc-chip-group@0.6.0
|
|
97
|
+
- @rcarls/rc-common@0.6.0
|
|
98
|
+
- @rcarls/rc-listbox@0.6.0
|
|
99
|
+
|
|
100
|
+
## 0.5.0
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- Updated dependencies [4ae2ef0]
|
|
105
|
+
- Updated dependencies [689340c]
|
|
106
|
+
- @rcarls/rc-common@0.5.0
|
|
107
|
+
- @rcarls/rc-listbox@0.5.0
|
|
108
|
+
|
|
109
|
+
## 0.4.2
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- @rcarls/rc-common@0.4.2
|
|
114
|
+
- @rcarls/rc-listbox@0.4.2
|
|
115
|
+
|
|
116
|
+
## 0.4.1
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- @rcarls/rc-common@0.4.1
|
|
121
|
+
- @rcarls/rc-listbox@0.4.1
|
|
122
|
+
|
|
123
|
+
## 0.4.0
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- 9c3bc6f: Document the `listbox` CSS part, the `open`/`multiple`/`disabled`/`placeholder`/`display`
|
|
128
|
+
attributes, and the `--rc-select-chip-gap`, `--rc-select-chip-border`,
|
|
129
|
+
`--rc-select-listbox-border`, and `--rc-select-shadow` custom properties in the generated API
|
|
130
|
+
reference.
|
|
131
|
+
- Updated dependencies [e57277f]
|
|
132
|
+
- Updated dependencies [8944083]
|
|
133
|
+
- Updated dependencies [ccca8e2]
|
|
134
|
+
- Updated dependencies [037b1b3]
|
|
135
|
+
- @rcarls/rc-common@0.4.0
|
|
136
|
+
- @rcarls/rc-listbox@0.4.0
|
|
137
|
+
|
|
138
|
+
## 0.3.2
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- 88b4086: Fix Firefox for Android bug: `<label>`-wrapped multiple selects [Bugzilla 1475723](https://bugzilla.mozilla.org/show_bug.cgi?id=1475723)
|
|
143
|
+
- Updated dependencies [88b4086]
|
|
144
|
+
- @rcarls/rc-common@0.3.2
|
|
145
|
+
- @rcarls/rc-listbox@0.3.2
|
|
146
|
+
|
|
147
|
+
## 0.3.1
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- @rcarls/rc-common@0.3.1
|
|
152
|
+
- @rcarls/rc-listbox@0.3.1
|
|
153
|
+
|
|
154
|
+
## 0.3.0
|
|
155
|
+
|
|
156
|
+
### Added
|
|
157
|
+
|
|
158
|
+
- Add typed listbox action option support through the embedded listbox.
|
|
159
|
+
|
|
160
|
+
### Changed
|
|
161
|
+
|
|
162
|
+
- Change the required native `<select>` child to the default slot.
|
|
163
|
+
- Normalize embedded listbox option styling around `--rc-listbox-*` custom properties.
|
|
164
|
+
- Update package metadata, README intro, and docs links.
|
|
165
|
+
|
|
166
|
+
### Migration
|
|
167
|
+
|
|
168
|
+
- Remove `slot="select"` from the native `<select>` child.
|
|
169
|
+
|
|
170
|
+
```diff
|
|
171
|
+
- <rc-select><select slot="select" name="status">...</select></rc-select>
|
|
172
|
+
+ <rc-select><select name="status">...</select></rc-select>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Dependencies
|
|
176
|
+
|
|
177
|
+
- Sync internal dependencies to 0.3.0.
|
|
178
|
+
|
|
179
|
+
## 0.2.0
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- @rcarls/rc-common@0.2.0
|
|
184
|
+
- @rcarls/rc-listbox@0.2.0
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# `@rcarls/rc-select`
|
|
2
|
+
|
|
3
|
+
Select-only combobox backed by a native `<select>`, following the [WAI-ARIA Combobox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/).
|
|
4
|
+
|
|
5
|
+
Docs: [https://richardcarls.github.io/rc-webcomponents/components/rc-select](https://richardcarls.github.io/rc-webcomponents/components/rc-select).
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
PowerShell:
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
yarn.cmd add @rcarls/rc-select
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Bash/zsh:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @rcarls/rc-select
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Import
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import '@rcarls/rc-select/define';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Basic Usage
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<label>
|
|
31
|
+
Fruit
|
|
32
|
+
<rc-select placeholder="Choose fruit">
|
|
33
|
+
<select name="fruit">
|
|
34
|
+
<option value="">Choose fruit</option>
|
|
35
|
+
<option value="apple">Apple</option>
|
|
36
|
+
<option value="banana">Banana</option>
|
|
37
|
+
<option value="cherry" disabled>Cherry</option>
|
|
38
|
+
</select>
|
|
39
|
+
</rc-select>
|
|
40
|
+
</label>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Dialog popup
|
|
44
|
+
|
|
45
|
+
Set `popup-mode="dialog"` when an anchored listbox would leave too little usable viewport. The
|
|
46
|
+
component manages a fullscreen native dialog with a leading close action, title, current chips,
|
|
47
|
+
option list, and trailing Done action.
|
|
48
|
+
|
|
49
|
+
Dialog selection is transactional: option and chip changes are staged until Done is activated.
|
|
50
|
+
Done updates the native `<select>` and fires one `rc-select-change`; the leading close action,
|
|
51
|
+
Escape, and imperative close discard the staged changes.
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<rc-select popup-mode="dialog" placeholder="Choose categories" multiple>
|
|
55
|
+
<select name="categories" multiple>
|
|
56
|
+
<option value="quick">Quick meal</option>
|
|
57
|
+
<option value="vegetarian">Vegetarian</option>
|
|
58
|
+
</select>
|
|
59
|
+
</rc-select>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## API
|
|
63
|
+
|
|
64
|
+
| Property / method | Type | Description |
|
|
65
|
+
| -------------------------- | -------------------------------- | --------------------------------------------------------- |
|
|
66
|
+
| `open` | `boolean` | Current popup state. |
|
|
67
|
+
| `multiple` | `boolean` | Mirrors the slotted `<select multiple>` state. |
|
|
68
|
+
| `disabled` | `boolean` | Mirrors the slotted `<select disabled>` state. |
|
|
69
|
+
| `placeholder` | `string` | Text shown when no value is selected. |
|
|
70
|
+
| `display` | `'auto' \| 'chips' \| 'compact'` | Controls multi-select display. |
|
|
71
|
+
| `popupMode` | `'popover' \| 'dialog'` | Chooses anchored or transactional dialog presentation. |
|
|
72
|
+
| `dialogConfirmLabel` | `string` | Dialog commit action label. Defaults to `Done`. |
|
|
73
|
+
| `dialogCancelLabel` | `string` | Accessible label for the leading close action. |
|
|
74
|
+
| `dialogCancelButton` | `'visible' \| 'hidden'` | Shows or hides the leading close action. |
|
|
75
|
+
| `value` | `string \| string[]` | Controlled selection. Programmatic writes apply silently. |
|
|
76
|
+
| `openPopup()` | `void` | Opens the listbox popover. |
|
|
77
|
+
| `closePopup(returnFocus?)` | `void` | Closes the listbox and optionally restores focus. |
|
|
78
|
+
|
|
79
|
+
## Events
|
|
80
|
+
|
|
81
|
+
| Event | Detail | Description |
|
|
82
|
+
| ------------------ | ------------------------------- | ----------------------------- |
|
|
83
|
+
| `rc-select-change` | `{ value: string \| string[] }` | Fires when selection changes. |
|
|
84
|
+
| `rc-select-open` | none | Fires when the popup opens. |
|
|
85
|
+
| `rc-select-close` | none | Fires when the popup closes. |
|
|
86
|
+
|
|
87
|
+
## Accessibility
|
|
88
|
+
|
|
89
|
+
- Trigger uses `role="combobox"`, `aria-haspopup="listbox"`, and
|
|
90
|
+
`aria-activedescendant`.
|
|
91
|
+
- The popup uses `rc-listbox` for `role="listbox"` and option state.
|
|
92
|
+
- Accessible name is copied from the slotted select label or `aria-label` unless
|
|
93
|
+
the trigger has an explicit label.
|