@adia-ai/web-components 0.6.32 → 0.6.34
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 +44 -0
- package/components/accordion/accordion.css +2 -2
- package/components/action-list/action-list.css +2 -2
- package/components/agent-artifact/agent-artifact.css +31 -31
- package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
- package/components/agent-questions/agent-questions.css +57 -57
- package/components/agent-reasoning/agent-reasoning.css +62 -62
- package/components/agent-suggestions/agent-suggestions.css +4 -4
- package/components/agent-trace/agent-trace.css +53 -53
- package/components/alert/alert.css +41 -41
- package/components/avatar/avatar.css +27 -27
- package/components/badge/badge.css +27 -27
- package/components/block/block.css +16 -16
- package/components/breadcrumb/breadcrumb.css +23 -23
- package/components/button/button.css +101 -91
- package/components/calendar-grid/calendar-grid.a2ui.json +136 -0
- package/components/calendar-grid/calendar-grid.css +226 -0
- package/components/calendar-grid/calendar-grid.d.ts +37 -0
- package/components/calendar-grid/calendar-grid.js +17 -0
- package/components/calendar-grid/calendar-grid.yaml +116 -0
- package/components/calendar-grid/class.js +300 -0
- package/components/calendar-picker/calendar-picker.css +139 -139
- package/components/canvas/canvas.css +12 -12
- package/components/card/card.css +83 -83
- package/components/chart/chart.css +224 -224
- package/components/chart-legend/chart-legend.css +26 -26
- package/components/check/check.css +40 -40
- package/components/code/code.css +125 -125
- package/components/col/col.css +15 -15
- package/components/color-picker/color-picker.css +55 -55
- package/components/combobox/class.js +861 -0
- package/components/combobox/combobox.a2ui.json +363 -0
- package/components/combobox/combobox.css +244 -0
- package/components/combobox/combobox.d.ts +113 -0
- package/components/combobox/combobox.examples.md +59 -0
- package/components/combobox/combobox.js +17 -0
- package/components/combobox/combobox.test.js +181 -0
- package/components/combobox/combobox.yaml +369 -0
- package/components/command/command.css +90 -90
- package/components/date-range-picker/class.js +775 -0
- package/components/date-range-picker/date-range-picker.a2ui.json +300 -0
- package/components/date-range-picker/date-range-picker.css +178 -0
- package/components/date-range-picker/date-range-picker.d.ts +82 -0
- package/components/date-range-picker/date-range-picker.examples.md +37 -0
- package/components/date-range-picker/date-range-picker.js +17 -0
- package/components/date-range-picker/date-range-picker.test.js +387 -0
- package/components/date-range-picker/date-range-picker.yaml +285 -0
- package/components/datetime-picker/class.js +706 -0
- package/components/datetime-picker/datetime-picker.a2ui.json +334 -0
- package/components/datetime-picker/datetime-picker.css +150 -0
- package/components/datetime-picker/datetime-picker.d.ts +86 -0
- package/components/datetime-picker/datetime-picker.examples.md +46 -0
- package/components/datetime-picker/datetime-picker.js +17 -0
- package/components/datetime-picker/datetime-picker.test.js +454 -0
- package/components/datetime-picker/datetime-picker.yaml +332 -0
- package/components/demo-toggle/demo-toggle.css +27 -27
- package/components/description-list/description-list.css +18 -18
- package/components/divider/divider.css +24 -24
- package/components/embed/embed.css +6 -6
- package/components/empty-state/empty-state.css +27 -27
- package/components/feed/feed.css +12 -12
- package/components/field/field.css +37 -28
- package/components/field/field.test.js +32 -0
- package/components/fields/fields.css +5 -5
- package/components/grid/grid.css +5 -5
- package/components/heatmap/heatmap.css +63 -63
- package/components/icon/icon.css +12 -12
- package/components/image/image.css +14 -14
- package/components/index.js +8 -0
- package/components/input/input.css +66 -66
- package/components/inspector/inspector.css +6 -6
- package/components/integration-card/class.js +410 -0
- package/components/integration-card/integration-card.a2ui.json +268 -0
- package/components/integration-card/integration-card.css +169 -0
- package/components/integration-card/integration-card.d.ts +63 -0
- package/components/integration-card/integration-card.examples.md +41 -0
- package/components/integration-card/integration-card.js +17 -0
- package/components/integration-card/integration-card.test.js +306 -0
- package/components/integration-card/integration-card.yaml +280 -0
- package/components/kbd/kbd.css +32 -32
- package/components/link/link.css +12 -12
- package/components/list/list.css +8 -8
- package/components/list-window/class.js +688 -0
- package/components/list-window/list-window.a2ui.json +277 -0
- package/components/list-window/list-window.css +124 -0
- package/components/list-window/list-window.d.ts +84 -0
- package/components/list-window/list-window.examples.md +73 -0
- package/components/list-window/list-window.js +17 -0
- package/components/list-window/list-window.test.js +303 -0
- package/components/list-window/list-window.yaml +270 -0
- package/components/menu/menu.css +8 -8
- package/components/modal/modal.css +43 -43
- package/components/nav/nav.css +40 -40
- package/components/nav-group/nav-group.css +52 -52
- package/components/nav-item/nav-item.css +44 -44
- package/components/noodles/noodles.css +31 -31
- package/components/option-card/option-card.css +69 -69
- package/components/otp-input/otp-input.css +30 -30
- package/components/page/page.css +18 -18
- package/components/pagination/pagination.css +61 -61
- package/components/pane/pane.css +57 -57
- package/components/pipeline-status/pipeline-status.css +65 -65
- package/components/popover/popover.css +17 -17
- package/components/progress/progress.css +23 -23
- package/components/progress-row/progress-row.css +17 -17
- package/components/radio/radio.css +39 -39
- package/components/range/range.css +55 -55
- package/components/rating/rating.css +28 -28
- package/components/richtext/richtext.css +133 -133
- package/components/row/row.css +19 -19
- package/components/search/search.css +5 -5
- package/components/segment/segment.css +24 -24
- package/components/segmented/segmented.css +25 -25
- package/components/select/select.css +84 -84
- package/components/skeleton/skeleton.css +14 -14
- package/components/slider/slider.css +46 -46
- package/components/spinner/class.js +69 -0
- package/components/spinner/spinner.a2ui.json +197 -0
- package/components/spinner/spinner.css +165 -0
- package/components/spinner/spinner.d.ts +26 -0
- package/components/spinner/spinner.examples.md +26 -0
- package/components/spinner/spinner.js +17 -0
- package/components/spinner/spinner.test.js +234 -0
- package/components/spinner/spinner.yaml +230 -0
- package/components/stack/stack.css +11 -11
- package/components/stat/stat.css +25 -25
- package/components/step-progress/step-progress.css +20 -20
- package/components/stepper/stepper.css +29 -29
- package/components/stream/stream.css +12 -12
- package/components/swatch/swatch.css +68 -68
- package/components/swiper/swiper.css +57 -57
- package/components/switch/switch.css +52 -52
- package/components/table/class.js +9 -0
- package/components/table/table.a2ui.json +1 -1
- package/components/table/table.css +162 -162
- package/components/table/table.d.ts +1 -1
- package/components/table/table.test.js +53 -0
- package/components/table/table.yaml +13 -1
- package/components/table-toolbar/table-toolbar.css +32 -32
- package/components/tabs/tabs.css +51 -51
- package/components/tag/tag.css +48 -48
- package/components/text/text.css +44 -44
- package/components/textarea/textarea.css +46 -46
- package/components/time-picker/class.js +693 -0
- package/components/time-picker/time-picker.a2ui.json +267 -0
- package/components/time-picker/time-picker.css +122 -0
- package/components/time-picker/time-picker.d.ts +75 -0
- package/components/time-picker/time-picker.examples.md +35 -0
- package/components/time-picker/time-picker.js +17 -0
- package/components/time-picker/time-picker.test.js +287 -0
- package/components/time-picker/time-picker.yaml +256 -0
- package/components/timeline/timeline.css +50 -50
- package/components/toast/toast.css +58 -58
- package/components/toggle-group/toggle-group.css +6 -6
- package/components/toggle-scheme/toggle-scheme.css +2 -2
- package/components/toolbar/toolbar.css +17 -17
- package/components/tooltip/tooltip.css +2 -2
- package/components/tree/tree.css +37 -37
- package/components/upload/upload.css +49 -49
- package/dist/icons-manifest.js +3 -3
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +121 -83
- package/package.json +1 -1
- package/styles/components.css +8 -0
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
# Hand-authored — SPEC-036 (2026-05-24).
|
|
2
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
+
name: UICombobox
|
|
5
|
+
tag: combobox-ui
|
|
6
|
+
status: stable
|
|
7
|
+
component: Combobox
|
|
8
|
+
category: input
|
|
9
|
+
version: 1
|
|
10
|
+
description: |
|
|
11
|
+
Typeahead-filterable single-select primitive — the constrained-choice
|
|
12
|
+
combobox per WAI-APG "Combobox With List Autocomplete (manual
|
|
13
|
+
selection)". The committed value MUST come from the options list
|
|
14
|
+
unless `[free-text]` is set. Distinct from `<select-ui searchable>`
|
|
15
|
+
(button-first dropdown) and `<autocomplete-input-ui>` (free-form).
|
|
16
|
+
Form-bearing via UIFormElement: `[name]`, `[value]`, `[required]`,
|
|
17
|
+
`[disabled]`, fires `change`. Options via native `<option>` /
|
|
18
|
+
`<optgroup>` children OR programmatic `.options` array.
|
|
19
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
20
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
21
|
+
composes:
|
|
22
|
+
- icon-ui # caret-down / x / magnifying-glass affixes (created in render)
|
|
23
|
+
props:
|
|
24
|
+
name:
|
|
25
|
+
description: Form control name for form data submission
|
|
26
|
+
type: string
|
|
27
|
+
default: ""
|
|
28
|
+
size:
|
|
29
|
+
description: >-
|
|
30
|
+
Sizing scale via universal `[size]` attribute system. Matches
|
|
31
|
+
Input + Select sizing tokens so a Combobox rendered alongside
|
|
32
|
+
either feels coherent in a form row.
|
|
33
|
+
type: string
|
|
34
|
+
default: md
|
|
35
|
+
enum: [sm, md, lg]
|
|
36
|
+
reflect: true
|
|
37
|
+
required:
|
|
38
|
+
description: Marks the field as required for form validation
|
|
39
|
+
type: boolean
|
|
40
|
+
default: false
|
|
41
|
+
reflect: true
|
|
42
|
+
disabled:
|
|
43
|
+
description: Disables interaction and dims the control
|
|
44
|
+
type: boolean
|
|
45
|
+
default: false
|
|
46
|
+
reflect: true
|
|
47
|
+
readonly:
|
|
48
|
+
description: Prevents selection changes while keeping the field focusable + popover-open allowed
|
|
49
|
+
type: boolean
|
|
50
|
+
default: false
|
|
51
|
+
reflect: true
|
|
52
|
+
error:
|
|
53
|
+
description: Validation error message
|
|
54
|
+
type: string
|
|
55
|
+
default: ""
|
|
56
|
+
hint:
|
|
57
|
+
description: |-
|
|
58
|
+
Caption text below the field; wires `aria-describedby` on the host
|
|
59
|
+
so screen readers announce it as a description.
|
|
60
|
+
type: string
|
|
61
|
+
default: ""
|
|
62
|
+
label:
|
|
63
|
+
description: |-
|
|
64
|
+
Inline label rendered above the field. Wrap with <field-ui> for
|
|
65
|
+
proper `<label for>` association in form-row compositions.
|
|
66
|
+
type: string
|
|
67
|
+
default: ""
|
|
68
|
+
placeholder:
|
|
69
|
+
description: Placeholder text in the input when value is empty
|
|
70
|
+
type: string
|
|
71
|
+
default: Select...
|
|
72
|
+
value:
|
|
73
|
+
description: >-
|
|
74
|
+
Currently selected option value. Must be a member of `options[].value`
|
|
75
|
+
unless `[free-text]` is set. With declarative <option> children,
|
|
76
|
+
a child carrying the native `selected` attribute sets the initial
|
|
77
|
+
value when this attribute is absent.
|
|
78
|
+
type: string
|
|
79
|
+
default: ""
|
|
80
|
+
options:
|
|
81
|
+
description: >-
|
|
82
|
+
Programmatic option list. Array of {value, label, disabled?, group?}
|
|
83
|
+
or grouped {label, options:[…]}. Alternative to declarative
|
|
84
|
+
<option> / <optgroup> children.
|
|
85
|
+
type: array
|
|
86
|
+
default: []
|
|
87
|
+
open:
|
|
88
|
+
description: Reflects popover open / closed state
|
|
89
|
+
type: boolean
|
|
90
|
+
default: false
|
|
91
|
+
reflect: true
|
|
92
|
+
free-text:
|
|
93
|
+
description: |-
|
|
94
|
+
Allow typed text not in the options list. Blurs the distinction
|
|
95
|
+
with <autocomplete-input-ui>; prefer the dedicated primitive
|
|
96
|
+
unless the value model truly needs both modes (tag-with-suggestions,
|
|
97
|
+
email-with-recent-recipients).
|
|
98
|
+
type: boolean
|
|
99
|
+
default: false
|
|
100
|
+
reflect: true
|
|
101
|
+
creatable:
|
|
102
|
+
description: |-
|
|
103
|
+
Implies `[free-text]`; on Enter with unmatched typed text fires a
|
|
104
|
+
`create` event with detail.value so the consumer can run a
|
|
105
|
+
backend create-then-refresh-options flow.
|
|
106
|
+
type: boolean
|
|
107
|
+
default: false
|
|
108
|
+
reflect: true
|
|
109
|
+
clearable:
|
|
110
|
+
description: Renders an `x` clear button when value is set
|
|
111
|
+
type: boolean
|
|
112
|
+
default: false
|
|
113
|
+
reflect: true
|
|
114
|
+
filter-mode:
|
|
115
|
+
description: Client-side filter algorithm.
|
|
116
|
+
type: string
|
|
117
|
+
default: substring
|
|
118
|
+
enum: [substring, prefix, fuzzy]
|
|
119
|
+
reflect: true
|
|
120
|
+
loading:
|
|
121
|
+
description: Shows a loading spinner inside the popover; consumer drives async fetch
|
|
122
|
+
type: boolean
|
|
123
|
+
default: false
|
|
124
|
+
reflect: true
|
|
125
|
+
max-options:
|
|
126
|
+
description: Cap on rendered options. Overflow shows a "scroll for more" hint
|
|
127
|
+
type: number
|
|
128
|
+
default: 100
|
|
129
|
+
reflect: true
|
|
130
|
+
highlight-match:
|
|
131
|
+
description: Wraps the matched substring in `<mark>` inside option labels
|
|
132
|
+
type: boolean
|
|
133
|
+
default: true
|
|
134
|
+
reflect: true
|
|
135
|
+
events:
|
|
136
|
+
input:
|
|
137
|
+
description: Fired on each keystroke (filter typing); not a commit. Detail carries the typed query.
|
|
138
|
+
detail:
|
|
139
|
+
value:
|
|
140
|
+
type: string
|
|
141
|
+
description: Current input text (the user's typed query).
|
|
142
|
+
query:
|
|
143
|
+
type: string
|
|
144
|
+
description: Lowercased filter query.
|
|
145
|
+
change:
|
|
146
|
+
description: |-
|
|
147
|
+
Fired when value is committed — option clicked, Enter on active
|
|
148
|
+
option, or programmatic `.value =`. Detail.option resolves to the
|
|
149
|
+
matching `{label,value,...}` or null in free-text/cleared paths.
|
|
150
|
+
detail:
|
|
151
|
+
value:
|
|
152
|
+
type: string
|
|
153
|
+
description: Committed value.
|
|
154
|
+
option:
|
|
155
|
+
type: object
|
|
156
|
+
description: Resolved option object or null when free-text / cleared.
|
|
157
|
+
source:
|
|
158
|
+
type: string
|
|
159
|
+
description: One of `click` / `keyboard` / `programmatic`.
|
|
160
|
+
create:
|
|
161
|
+
description: |-
|
|
162
|
+
Fired when `[creatable]` is set and the user presses Enter on
|
|
163
|
+
typed text that doesn't match any option. Consumer wires this to
|
|
164
|
+
a backend create flow and then refreshes `.options`.
|
|
165
|
+
detail:
|
|
166
|
+
value:
|
|
167
|
+
type: string
|
|
168
|
+
description: The typed text the user is trying to create.
|
|
169
|
+
open:
|
|
170
|
+
description: Popover opened.
|
|
171
|
+
detail:
|
|
172
|
+
trigger:
|
|
173
|
+
type: string
|
|
174
|
+
description: One of `click` / `keyboard` / `typing`.
|
|
175
|
+
close:
|
|
176
|
+
description: Popover closed.
|
|
177
|
+
detail:
|
|
178
|
+
reason:
|
|
179
|
+
type: string
|
|
180
|
+
description: One of `escape` / `outside` / `select` / `blur`.
|
|
181
|
+
invalid:
|
|
182
|
+
description: |-
|
|
183
|
+
Fired when `[free-text]` is false and the user presses Enter on
|
|
184
|
+
typed text that doesn't match any option. The value is NOT
|
|
185
|
+
committed; the input is restored to the last committed value.
|
|
186
|
+
detail:
|
|
187
|
+
query:
|
|
188
|
+
type: string
|
|
189
|
+
description: The unmatched typed text.
|
|
190
|
+
slots:
|
|
191
|
+
default:
|
|
192
|
+
description: Native <option> / <optgroup> children for declarative authoring
|
|
193
|
+
empty:
|
|
194
|
+
description: Custom no-matches content (defaults to "No matches")
|
|
195
|
+
loading:
|
|
196
|
+
description: Custom loading content (defaults to a spinner)
|
|
197
|
+
footer:
|
|
198
|
+
description: Footer area inside the popover (e.g. "Press Enter to create…" affordance)
|
|
199
|
+
prefix:
|
|
200
|
+
description: Leading icon / element inside the input chrome
|
|
201
|
+
suffix:
|
|
202
|
+
description: Trailing icon / element (defaults to `caret-down`)
|
|
203
|
+
states:
|
|
204
|
+
- name: idle
|
|
205
|
+
description: Closed; not focused.
|
|
206
|
+
- name: focused
|
|
207
|
+
description: Input focused; popover closed.
|
|
208
|
+
attribute: ":focus-within"
|
|
209
|
+
- name: open
|
|
210
|
+
description: Popover visible; filtered options listed.
|
|
211
|
+
attribute: open
|
|
212
|
+
- name: loading
|
|
213
|
+
description: Spinner shown; options stale (consumer-driven async fetch).
|
|
214
|
+
attribute: loading
|
|
215
|
+
- name: disabled
|
|
216
|
+
description: Non-interactive; dimmed.
|
|
217
|
+
attribute: disabled
|
|
218
|
+
- name: readonly
|
|
219
|
+
description: Focusable + popover-open allowed; commits blocked.
|
|
220
|
+
attribute: readonly
|
|
221
|
+
traits: []
|
|
222
|
+
tokens:
|
|
223
|
+
--combobox-bg:
|
|
224
|
+
description: Input background color
|
|
225
|
+
--combobox-fg:
|
|
226
|
+
description: Input text color
|
|
227
|
+
--combobox-radius:
|
|
228
|
+
description: Input border radius
|
|
229
|
+
--combobox-popover-bg:
|
|
230
|
+
description: Popover background color
|
|
231
|
+
--combobox-popover-border:
|
|
232
|
+
description: Popover border color
|
|
233
|
+
--combobox-popover-radius:
|
|
234
|
+
description: Popover border radius
|
|
235
|
+
--combobox-popover-shadow:
|
|
236
|
+
description: Popover elevation shadow
|
|
237
|
+
--combobox-option-bg-active:
|
|
238
|
+
description: Background for the currently active (arrow-navigated) option
|
|
239
|
+
--combobox-option-fg-active:
|
|
240
|
+
description: Foreground for the currently active option
|
|
241
|
+
--combobox-option-bg-selected:
|
|
242
|
+
description: Background for the currently committed option
|
|
243
|
+
--combobox-match-bg:
|
|
244
|
+
description: Background for `<mark>` spans that highlight matched substrings
|
|
245
|
+
requiredIcons:
|
|
246
|
+
- caret-down
|
|
247
|
+
- x-circle
|
|
248
|
+
- check
|
|
249
|
+
a2ui:
|
|
250
|
+
rules:
|
|
251
|
+
- >-
|
|
252
|
+
Use <combobox-ui> for typeahead-filterable single-select with
|
|
253
|
+
a constrained-choice value model. `value` MUST be one of
|
|
254
|
+
`options[].value` unless `[free-text]` is set. For ≤ 4 options,
|
|
255
|
+
use <segmented-ui> or <radio-ui> instead.
|
|
256
|
+
- >-
|
|
257
|
+
For free-form text entry with suggestions, use
|
|
258
|
+
<autocomplete-input-ui> (SPEC-035) — combobox is constrained-choice.
|
|
259
|
+
For button-first dropdowns where the trigger should be closed by
|
|
260
|
+
default, use <select-ui searchable>.
|
|
261
|
+
- >-
|
|
262
|
+
Compose options via native <option> / <optgroup> children, OR set
|
|
263
|
+
`.options` programmatically as an array of
|
|
264
|
+
`{value, label, disabled?}` (grouped form: `{label, options:[…]}`).
|
|
265
|
+
Setting `value` to a string not in `options` is invalid mid-state
|
|
266
|
+
(free-text=false) and the validator should reject it.
|
|
267
|
+
- >-
|
|
268
|
+
`[creatable]` implies `[free-text]` and adds the "Create '{value}'"
|
|
269
|
+
footer affordance + `create` event. Consumer wires the create
|
|
270
|
+
event to a backend flow.
|
|
271
|
+
- >-
|
|
272
|
+
Multi-select goes through <multi-select-ui> (SPEC-040), not
|
|
273
|
+
combobox. Combobox is single-select.
|
|
274
|
+
anti_patterns:
|
|
275
|
+
- wrong: |
|
|
276
|
+
{"component": "Combobox", "value": "xx", "options": [{"value": "us", "label": "United States"}]}
|
|
277
|
+
why: |
|
|
278
|
+
`value` is "xx" but only "us" is in options. With free-text:false (default), this is an invalid
|
|
279
|
+
mid-state — set value: "us" or add an option with value: "xx".
|
|
280
|
+
fix: |
|
|
281
|
+
{"component": "Combobox", "value": "us", "options": [{"value": "us", "label": "United States"}]}
|
|
282
|
+
- wrong: |
|
|
283
|
+
{"component": "Combobox", "options": [{"value": "a", "label": "A"}, {"value": "b", "label": "B"}]}
|
|
284
|
+
why: |
|
|
285
|
+
Only 2 options. Combobox is overkill — use SegmentedControl or Radio.
|
|
286
|
+
fix: |
|
|
287
|
+
{"component": "SegmentedControl", "options": [{"value": "a", "label": "A"}, {"value": "b", "label": "B"}]}
|
|
288
|
+
- wrong: |
|
|
289
|
+
{"component": "Combobox", "multiple": true, "options": [...]}
|
|
290
|
+
why: |
|
|
291
|
+
Combobox is single-select. Multi-select goes through MultiSelect.
|
|
292
|
+
fix: |
|
|
293
|
+
{"component": "MultiSelect", "options": [...]}
|
|
294
|
+
examples:
|
|
295
|
+
- name: country-picker
|
|
296
|
+
description: Country picker — canonical declarative <option> children inside a <field-ui>.
|
|
297
|
+
a2ui: >-
|
|
298
|
+
[
|
|
299
|
+
{"id": "root", "component": "Card", "children": ["sec"]},
|
|
300
|
+
{"id": "sec", "component": "Section", "children": ["country"]},
|
|
301
|
+
{
|
|
302
|
+
"id": "country",
|
|
303
|
+
"component": "Combobox",
|
|
304
|
+
"name": "country",
|
|
305
|
+
"label": "Country",
|
|
306
|
+
"placeholder": "Select country…",
|
|
307
|
+
"options": [
|
|
308
|
+
{"value": "us", "label": "United States"},
|
|
309
|
+
{"value": "gb", "label": "United Kingdom"},
|
|
310
|
+
{"value": "de", "label": "Germany"},
|
|
311
|
+
{"value": "fr", "label": "France"},
|
|
312
|
+
{"value": "es", "label": "Spain"}
|
|
313
|
+
],
|
|
314
|
+
"value": "us"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
- name: creatable-tag-picker
|
|
318
|
+
description: Tag picker with create-new affordance — fires `create` event on unmatched Enter.
|
|
319
|
+
a2ui: >-
|
|
320
|
+
[
|
|
321
|
+
{"id": "root", "component": "Card", "children": ["sec"]},
|
|
322
|
+
{"id": "sec", "component": "Section", "children": ["tag"]},
|
|
323
|
+
{
|
|
324
|
+
"id": "tag",
|
|
325
|
+
"component": "Combobox",
|
|
326
|
+
"name": "tag",
|
|
327
|
+
"label": "Tag",
|
|
328
|
+
"creatable": true,
|
|
329
|
+
"placeholder": "Pick or create a tag…",
|
|
330
|
+
"options": [
|
|
331
|
+
{"value": "bug", "label": "bug"},
|
|
332
|
+
{"value": "feature", "label": "feature"},
|
|
333
|
+
{"value": "chore", "label": "chore"}
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
keywords:
|
|
338
|
+
- combobox
|
|
339
|
+
- autocomplete
|
|
340
|
+
- typeahead
|
|
341
|
+
- select
|
|
342
|
+
- filter
|
|
343
|
+
- picker
|
|
344
|
+
- country-picker
|
|
345
|
+
- timezone-picker
|
|
346
|
+
- member-picker
|
|
347
|
+
synonyms:
|
|
348
|
+
autocomplete:
|
|
349
|
+
- combobox
|
|
350
|
+
- typeahead
|
|
351
|
+
- suggest
|
|
352
|
+
combobox:
|
|
353
|
+
- autocomplete
|
|
354
|
+
- typeahead
|
|
355
|
+
- filter
|
|
356
|
+
- picker
|
|
357
|
+
typeahead:
|
|
358
|
+
- combobox
|
|
359
|
+
- autocomplete
|
|
360
|
+
- search
|
|
361
|
+
picker:
|
|
362
|
+
- combobox
|
|
363
|
+
- select
|
|
364
|
+
- dropdown
|
|
365
|
+
related:
|
|
366
|
+
- select
|
|
367
|
+
- search
|
|
368
|
+
- input
|
|
369
|
+
- field
|
|
@@ -4,85 +4,85 @@
|
|
|
4
4
|
No default width or height — the host pattern (dialog, popover,
|
|
5
5
|
app-shell search slot, etc.) is responsible for sizing the palette.
|
|
6
6
|
This keeps the component composable across overlay and inline use. */
|
|
7
|
-
--command-radius: var(--a-radius-lg);
|
|
8
|
-
--command-px: var(--a-space-3);
|
|
9
|
-
--command-py: var(--a-space-3);
|
|
10
|
-
--command-gap: var(--a-space-2);
|
|
11
|
-
--command-list-px: var(--a-space-1);
|
|
12
|
-
--command-list-py: var(--a-space-1);
|
|
13
|
-
--command-group-gap: var(--a-space-1);
|
|
7
|
+
--command-radius-default: var(--a-radius-lg);
|
|
8
|
+
--command-px-default: var(--a-space-3);
|
|
9
|
+
--command-py-default: var(--a-space-3);
|
|
10
|
+
--command-gap-default: var(--a-space-2);
|
|
11
|
+
--command-list-px-default: var(--a-space-1);
|
|
12
|
+
--command-list-py-default: var(--a-space-1);
|
|
13
|
+
--command-group-gap-default: var(--a-space-1);
|
|
14
14
|
|
|
15
15
|
/* ── Colors ── */
|
|
16
|
-
--command-bg: var(--a-bg-subtle);
|
|
17
|
-
--command-fg: var(--a-fg);
|
|
18
|
-
--command-fg-muted: var(--a-fg-muted);
|
|
19
|
-
--command-border: var(--a-border-subtle);
|
|
16
|
+
--command-bg-default: var(--a-bg-subtle);
|
|
17
|
+
--command-fg-default: var(--a-fg);
|
|
18
|
+
--command-fg-muted-default: var(--a-fg-muted);
|
|
19
|
+
--command-border-default: var(--a-border-subtle);
|
|
20
20
|
|
|
21
21
|
/* ── Elevation ── */
|
|
22
|
-
--command-shadow: var(--a-shadow-lg);
|
|
22
|
+
--command-shadow-default: var(--a-shadow-lg);
|
|
23
23
|
|
|
24
24
|
/* ── Typography ── */
|
|
25
|
-
--command-font-size: var(--a-ui-size);
|
|
26
|
-
--command-input-font-size: var(--a-body-size);
|
|
25
|
+
--command-font-size-default: var(--a-ui-size);
|
|
26
|
+
--command-input-font-size-default: var(--a-body-size);
|
|
27
27
|
|
|
28
28
|
/* ── Transition ── */
|
|
29
|
-
--command-duration: var(--a-duration-fast);
|
|
30
|
-
--command-easing: var(--a-easing);
|
|
29
|
+
--command-duration-default: var(--a-duration-fast);
|
|
30
|
+
--command-easing-default: var(--a-easing);
|
|
31
31
|
|
|
32
32
|
/* ── Item ── */
|
|
33
|
-
--command-item-height: var(--a-size);
|
|
34
|
-
--command-item-radius: var(--a-radius-md);
|
|
35
|
-
--command-item-px: var(--a-space-2);
|
|
36
|
-
--command-item-py: var(--a-space-2);
|
|
37
|
-
--command-item-fg: var(--a-fg-subtle);
|
|
38
|
-
--command-item-fg-hover: var(--a-fg-hover);
|
|
39
|
-
--command-item-bg-hover: var(--a-bg-hover);
|
|
40
|
-
--command-item-fg-disabled: var(--a-ui-text-disabled);
|
|
33
|
+
--command-item-height-default: var(--a-size);
|
|
34
|
+
--command-item-radius-default: var(--a-radius-md);
|
|
35
|
+
--command-item-px-default: var(--a-space-2);
|
|
36
|
+
--command-item-py-default: var(--a-space-2);
|
|
37
|
+
--command-item-fg-default: var(--a-fg-subtle);
|
|
38
|
+
--command-item-fg-hover-default: var(--a-fg-hover);
|
|
39
|
+
--command-item-bg-hover-default: var(--a-bg-hover);
|
|
40
|
+
--command-item-fg-disabled-default: var(--a-ui-text-disabled);
|
|
41
41
|
|
|
42
42
|
/* ── Shortcut ── */
|
|
43
|
-
--command-shortcut-fg: var(--a-fg-muted);
|
|
44
|
-
--command-shortcut-font-size: var(--a-ui-sm);
|
|
43
|
+
--command-shortcut-fg-default: var(--a-fg-muted);
|
|
44
|
+
--command-shortcut-font-size-default: var(--a-ui-sm);
|
|
45
45
|
|
|
46
46
|
/* ── Group label ── */
|
|
47
|
-
--command-group-fg: var(--a-fg-muted);
|
|
48
|
-
--command-group-font-size: var(--a-ui-sm);
|
|
49
|
-
--command-group-font-weight: var(--a-weight-medium);
|
|
50
|
-
--command-group-label-px: var(--a-space-2);
|
|
51
|
-
--command-group-label-py: var(--a-space-2);
|
|
47
|
+
--command-group-fg-default: var(--a-fg-muted);
|
|
48
|
+
--command-group-font-size-default: var(--a-ui-sm);
|
|
49
|
+
--command-group-font-weight-default: var(--a-weight-medium);
|
|
50
|
+
--command-group-label-px-default: var(--a-space-2);
|
|
51
|
+
--command-group-label-py-default: var(--a-space-2);
|
|
52
52
|
|
|
53
53
|
/* ── Empty state ── */
|
|
54
|
-
--command-empty-fg: var(--a-fg-muted);
|
|
54
|
+
--command-empty-fg-default: var(--a-fg-muted);
|
|
55
55
|
|
|
56
56
|
/* ── Header ── */
|
|
57
|
-
--command-header-px: var(--a-space-4);
|
|
58
|
-
--command-header-py: var(--a-space-4);
|
|
57
|
+
--command-header-px-default: var(--a-space-4);
|
|
58
|
+
--command-header-py-default: var(--a-space-4);
|
|
59
59
|
|
|
60
60
|
/* ── Footer ── */
|
|
61
|
-
--command-footer-fg: var(--a-fg-muted);
|
|
62
|
-
--command-footer-font-size: var(--a-ui-sm);
|
|
63
|
-
--command-footer-px: var(--command-px);
|
|
64
|
-
--command-footer-py: var(--command-py);
|
|
61
|
+
--command-footer-fg-default: var(--a-fg-muted);
|
|
62
|
+
--command-footer-font-size-default: var(--a-ui-sm);
|
|
63
|
+
--command-footer-px-default: var(--command-px, var(--command-px-default));
|
|
64
|
+
--command-footer-py-default: var(--command-py, var(--command-py-default));
|
|
65
65
|
|
|
66
66
|
/* ── Footer kbd ── */
|
|
67
|
-
--command-kbd-border: var(--a-border-subtle);
|
|
68
|
-
--command-kbd-radius: var(--a-radius-sm);
|
|
69
|
-
--command-kbd-bg: var(--a-bg-muted);
|
|
70
|
-
--command-kbd-fg: var(--a-fg-muted);
|
|
67
|
+
--command-kbd-border-default: var(--a-border-subtle);
|
|
68
|
+
--command-kbd-radius-default: var(--a-radius-sm);
|
|
69
|
+
--command-kbd-bg-default: var(--a-bg-muted);
|
|
70
|
+
--command-kbd-fg-default: var(--a-fg-muted);
|
|
71
71
|
|
|
72
72
|
/* ── Hint ── */
|
|
73
|
-
--command-hint-gap: var(--a-space-0-5);
|
|
74
|
-
--command-hint-kbd-px: var(--a-space-0-5);
|
|
73
|
+
--command-hint-gap-default: var(--a-space-0-5);
|
|
74
|
+
--command-hint-kbd-px-default: var(--a-space-0-5);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
:scope {
|
|
78
78
|
box-sizing: border-box;
|
|
79
79
|
display: flex;
|
|
80
80
|
flex-direction: column;
|
|
81
|
-
background: var(--command-bg);
|
|
82
|
-
border: 1px solid var(--command-border);
|
|
83
|
-
border-radius: var(--command-radius);
|
|
84
|
-
box-shadow: var(--command-shadow);
|
|
85
|
-
font-size: var(--command-font-size);
|
|
81
|
+
background: var(--command-bg, var(--command-bg-default));
|
|
82
|
+
border: 1px solid var(--command-border, var(--command-border-default));
|
|
83
|
+
border-radius: var(--command-radius, var(--command-radius-default));
|
|
84
|
+
box-shadow: var(--command-shadow, var(--command-shadow-default));
|
|
85
|
+
font-size: var(--command-font-size, var(--command-font-size-default));
|
|
86
86
|
overflow: hidden;
|
|
87
87
|
}
|
|
88
88
|
|
|
@@ -90,15 +90,15 @@
|
|
|
90
90
|
& > header {
|
|
91
91
|
display: flex;
|
|
92
92
|
align-items: center;
|
|
93
|
-
gap: var(--command-gap);
|
|
94
|
-
padding: var(--command-header-py) var(--command-header-px);
|
|
95
|
-
border-bottom: 1px solid var(--command-border);
|
|
93
|
+
gap: var(--command-gap, var(--command-gap-default));
|
|
94
|
+
padding: var(--command-header-py, var(--command-header-py-default)) var(--command-header-px, var(--command-header-px-default));
|
|
95
|
+
border-bottom: 1px solid var(--command-border, var(--command-border-default));
|
|
96
96
|
flex-shrink: 0;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
& > header icon-ui {
|
|
100
100
|
flex-shrink: 0;
|
|
101
|
-
color: var(--command-fg-muted);
|
|
101
|
+
color: var(--command-fg-muted, var(--command-fg-muted-default));
|
|
102
102
|
--a-icon-size: 1rem;
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -108,15 +108,15 @@
|
|
|
108
108
|
border: none;
|
|
109
109
|
outline: none;
|
|
110
110
|
background: transparent;
|
|
111
|
-
color: var(--command-fg);
|
|
111
|
+
color: var(--command-fg, var(--command-fg-default));
|
|
112
112
|
font-family: inherit;
|
|
113
|
-
font-size: var(--command-input-font-size);
|
|
113
|
+
font-size: var(--command-input-font-size, var(--command-input-font-size-default));
|
|
114
114
|
line-height: 1.4;
|
|
115
115
|
padding: 0;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
& > header input::placeholder {
|
|
119
|
-
color: var(--command-fg-muted);
|
|
119
|
+
color: var(--command-fg-muted, var(--command-fg-muted-default));
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/* Suppress focus ring on the input — the palette itself is the focused surface */
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
[slot="list"] {
|
|
134
134
|
flex: 1;
|
|
135
135
|
overflow-y: auto;
|
|
136
|
-
padding: var(--command-list-py) var(--command-list-px);
|
|
136
|
+
padding: var(--command-list-py, var(--command-list-py-default)) var(--command-list-px, var(--command-list-px-default));
|
|
137
137
|
scrollbar-width: none;
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -143,22 +143,22 @@
|
|
|
143
143
|
[role="option"] {
|
|
144
144
|
display: flex;
|
|
145
145
|
align-items: center;
|
|
146
|
-
gap: var(--command-gap);
|
|
147
|
-
min-height: var(--command-item-height);
|
|
148
|
-
padding: 0 var(--command-item-px);
|
|
149
|
-
border-radius: var(--command-item-radius);
|
|
150
|
-
color: var(--command-item-fg);
|
|
146
|
+
gap: var(--command-gap, var(--command-gap-default));
|
|
147
|
+
min-height: var(--command-item-height, var(--command-item-height-default));
|
|
148
|
+
padding: 0 var(--command-item-px, var(--command-item-px-default));
|
|
149
|
+
border-radius: var(--command-item-radius, var(--command-item-radius-default));
|
|
150
|
+
color: var(--command-item-fg, var(--command-item-fg-default));
|
|
151
151
|
cursor: pointer;
|
|
152
152
|
white-space: nowrap;
|
|
153
153
|
transition:
|
|
154
|
-
background var(--command-duration) var(--command-easing),
|
|
155
|
-
color var(--command-duration) var(--command-easing);
|
|
154
|
+
background var(--command-duration, var(--command-duration-default)) var(--command-easing, var(--command-easing-default)),
|
|
155
|
+
color var(--command-duration, var(--command-duration-default)) var(--command-easing, var(--command-easing-default));
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
[role="option"] icon-ui {
|
|
159
|
-
--a-icon-size: var(--command-font-size);
|
|
159
|
+
--a-icon-size: var(--command-font-size, var(--command-font-size-default));
|
|
160
160
|
flex-shrink: 0;
|
|
161
|
-
color: var(--command-fg-muted);
|
|
161
|
+
color: var(--command-fg-muted, var(--command-fg-muted-default));
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
[role="option"] [data-text] {
|
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
[role="option"] [data-shortcut] {
|
|
172
|
-
color: var(--command-shortcut-fg);
|
|
173
|
-
font-size: var(--command-shortcut-font-size);
|
|
172
|
+
color: var(--command-shortcut-fg, var(--command-shortcut-fg-default));
|
|
173
|
+
font-size: var(--command-shortcut-font-size, var(--command-shortcut-font-size-default));
|
|
174
174
|
margin-inline-start: auto;
|
|
175
175
|
flex-shrink: 0;
|
|
176
176
|
}
|
|
@@ -178,32 +178,32 @@
|
|
|
178
178
|
/* ── State: hover / active ── */
|
|
179
179
|
[role="option"]:not([aria-disabled]):hover,
|
|
180
180
|
[role="option"][data-active] {
|
|
181
|
-
background: var(--command-item-bg-hover);
|
|
182
|
-
color: var(--command-item-fg-hover);
|
|
181
|
+
background: var(--command-item-bg-hover, var(--command-item-bg-hover-default));
|
|
182
|
+
color: var(--command-item-fg-hover, var(--command-item-fg-hover-default));
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
[role="option"]:not([aria-disabled]):hover icon-ui,
|
|
186
186
|
[role="option"][data-active] icon-ui {
|
|
187
|
-
color: var(--command-item-fg-hover);
|
|
187
|
+
color: var(--command-item-fg-hover, var(--command-item-fg-hover-default));
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
/* ── State: disabled ── */
|
|
191
191
|
[role="option"][aria-disabled] {
|
|
192
|
-
color: var(--command-item-fg-disabled);
|
|
192
|
+
color: var(--command-item-fg-disabled, var(--command-item-fg-disabled-default));
|
|
193
193
|
cursor: not-allowed;
|
|
194
194
|
pointer-events: none;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/* ── Groups ── */
|
|
198
198
|
[data-group] {
|
|
199
|
-
padding: var(--command-list-py) var(--command-list-px);
|
|
199
|
+
padding: var(--command-list-py, var(--command-list-py-default)) var(--command-list-px, var(--command-list-px-default));
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
[data-group-label] {
|
|
203
|
-
padding: var(--command-group-label-py) var(--command-group-label-px);
|
|
204
|
-
font-size: var(--command-group-font-size);
|
|
205
|
-
font-weight: var(--command-group-font-weight);
|
|
206
|
-
color: var(--command-group-fg);
|
|
203
|
+
padding: var(--command-group-label-py, var(--command-group-label-py-default)) var(--command-group-label-px, var(--command-group-label-px-default));
|
|
204
|
+
font-size: var(--command-group-font-size, var(--command-group-font-size-default));
|
|
205
|
+
font-weight: var(--command-group-font-weight, var(--command-group-font-weight-default));
|
|
206
|
+
color: var(--command-group-fg, var(--command-group-fg-default));
|
|
207
207
|
text-transform: uppercase;
|
|
208
208
|
letter-spacing: 0.05em;
|
|
209
209
|
white-space: nowrap;
|
|
@@ -211,8 +211,8 @@
|
|
|
211
211
|
|
|
212
212
|
/* ── Empty state ── */
|
|
213
213
|
[data-empty] {
|
|
214
|
-
padding: var(--command-py) var(--command-px);
|
|
215
|
-
color: var(--command-empty-fg);
|
|
214
|
+
padding: var(--command-py, var(--command-py-default)) var(--command-px, var(--command-px-default));
|
|
215
|
+
color: var(--command-empty-fg, var(--command-empty-fg-default));
|
|
216
216
|
text-align: center;
|
|
217
217
|
}
|
|
218
218
|
|
|
@@ -220,18 +220,18 @@
|
|
|
220
220
|
& > footer {
|
|
221
221
|
display: flex;
|
|
222
222
|
align-items: center;
|
|
223
|
-
gap: var(--command-px);
|
|
224
|
-
padding: var(--command-footer-py) var(--command-footer-px);
|
|
225
|
-
border-top: 1px solid var(--command-border);
|
|
226
|
-
font-size: var(--command-footer-font-size);
|
|
227
|
-
color: var(--command-footer-fg);
|
|
223
|
+
gap: var(--command-px, var(--command-px-default));
|
|
224
|
+
padding: var(--command-footer-py, var(--command-footer-py-default)) var(--command-footer-px, var(--command-footer-px-default));
|
|
225
|
+
border-top: 1px solid var(--command-border, var(--command-border-default));
|
|
226
|
+
font-size: var(--command-footer-font-size, var(--command-footer-font-size-default));
|
|
227
|
+
color: var(--command-footer-fg, var(--command-footer-fg-default));
|
|
228
228
|
flex-shrink: 0;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
[data-hint] {
|
|
232
232
|
display: inline-flex;
|
|
233
233
|
align-items: center;
|
|
234
|
-
gap: var(--command-hint-gap);
|
|
234
|
+
gap: var(--command-hint-gap, var(--command-hint-gap-default));
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
[data-hint] kbd {
|
|
@@ -239,13 +239,13 @@
|
|
|
239
239
|
align-items: center;
|
|
240
240
|
justify-content: center;
|
|
241
241
|
min-width: 1.25em;
|
|
242
|
-
padding: 0 var(--command-hint-kbd-px);
|
|
243
|
-
border: 1px solid var(--command-kbd-border);
|
|
244
|
-
border-radius: var(--command-kbd-radius);
|
|
242
|
+
padding: 0 var(--command-hint-kbd-px, var(--command-hint-kbd-px-default));
|
|
243
|
+
border: 1px solid var(--command-kbd-border, var(--command-kbd-border-default));
|
|
244
|
+
border-radius: var(--command-kbd-radius, var(--command-kbd-radius-default));
|
|
245
245
|
font-family: inherit;
|
|
246
246
|
font-size: inherit;
|
|
247
247
|
line-height: 1.6;
|
|
248
|
-
color: var(--command-kbd-fg);
|
|
249
|
-
background: var(--command-kbd-bg);
|
|
248
|
+
color: var(--command-kbd-fg, var(--command-kbd-fg-default));
|
|
249
|
+
background: var(--command-kbd-bg, var(--command-kbd-bg-default));
|
|
250
250
|
}
|
|
251
251
|
}
|