@adia-ai/web-components 0.6.33 → 0.6.35
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 +64 -0
- package/color/index.js +1 -1
- package/components/accordion/accordion-item.yaml +2 -2
- package/components/accordion/accordion.css +2 -2
- package/components/accordion/accordion.js +1 -1
- package/components/action-list/action-item.yaml +2 -2
- package/components/action-list/action-list.css +2 -2
- package/components/action-list/action-list.js +1 -1
- package/components/agent-artifact/{class.js → agent-artifact.class.js} +1 -1
- package/components/agent-artifact/agent-artifact.css +31 -31
- package/components/agent-artifact/agent-artifact.js +1 -1
- package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
- package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
- package/components/agent-questions/agent-questions.css +57 -57
- package/components/agent-questions/agent-questions.js +1 -1
- package/components/agent-reasoning/agent-reasoning.css +62 -62
- package/components/agent-reasoning/agent-reasoning.js +1 -1
- package/components/agent-suggestions/agent-suggestions.css +4 -4
- package/components/agent-suggestions/agent-suggestions.js +1 -1
- package/components/agent-trace/agent-trace.css +53 -53
- package/components/alert/alert.a2ui.json +64 -1
- package/components/alert/{class.js → alert.class.js} +189 -2
- package/components/alert/alert.css +119 -41
- package/components/alert/alert.d.ts +14 -0
- package/components/alert/alert.js +1 -1
- package/components/alert/alert.test.js +184 -0
- package/components/alert/alert.yaml +114 -1
- package/components/avatar/avatar-group.yaml +2 -2
- package/components/avatar/avatar.css +27 -27
- package/components/avatar/avatar.js +1 -1
- package/components/badge/badge.css +27 -27
- package/components/badge/badge.js +1 -1
- package/components/block/block.css +16 -16
- package/components/block/block.js +1 -1
- package/components/breadcrumb/breadcrumb.css +23 -23
- package/components/breadcrumb/breadcrumb.js +1 -1
- package/components/button/button.css +101 -91
- package/components/button/button.js +1 -1
- package/components/calendar-grid/calendar-grid.a2ui.json +146 -0
- package/components/calendar-grid/calendar-grid.class.js +326 -0
- package/components/calendar-grid/calendar-grid.css +246 -0
- package/components/calendar-grid/calendar-grid.d.ts +41 -0
- package/components/calendar-grid/calendar-grid.js +17 -0
- package/components/calendar-grid/calendar-grid.yaml +136 -0
- package/components/calendar-picker/calendar-picker.css +139 -139
- package/components/calendar-picker/calendar-picker.js +1 -1
- package/components/canvas/canvas.css +12 -12
- package/components/card/card.css +83 -83
- package/components/card/card.js +1 -1
- package/components/chart/chart.css +224 -224
- package/components/chart/chart.js +1 -1
- package/components/chart-legend/chart-legend.css +26 -26
- package/components/chart-legend/chart-legend.js +1 -1
- package/components/chat-thread/chat-input.a2ui.json +1 -1
- package/components/chat-thread/chat-input.js +6 -1
- package/components/chat-thread/chat-input.yaml +4 -1
- package/components/chat-thread/chat-thread.js +1 -1
- package/components/check/check.css +40 -40
- package/components/check/check.js +1 -1
- package/components/code/code.css +125 -125
- package/components/code/code.js +1 -1
- package/components/col/col.css +15 -15
- package/components/col/col.js +1 -1
- package/components/color-input/color-input.js +1 -1
- package/components/color-picker/color-picker.css +55 -55
- package/components/color-picker/color-picker.js +1 -1
- package/components/combobox/combobox.a2ui.json +363 -0
- package/components/combobox/combobox.class.js +861 -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/command/command.js +1 -1
- package/components/date-range-picker/date-range-picker.a2ui.json +300 -0
- package/components/date-range-picker/date-range-picker.class.js +791 -0
- package/components/date-range-picker/date-range-picker.css +224 -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/datetime-picker.a2ui.json +334 -0
- package/components/datetime-picker/datetime-picker.class.js +706 -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/demo-toggle/demo-toggle.js +1 -1
- package/components/description-list/description-list.css +18 -18
- package/components/description-list/description-list.js +1 -1
- package/components/divider/divider.css +24 -24
- package/components/divider/divider.js +1 -1
- package/components/drawer/drawer.js +1 -1
- package/components/embed/embed.css +6 -6
- package/components/embed/embed.js +1 -1
- package/components/empty-state/empty-state.css +27 -27
- package/components/empty-state/empty-state.js +1 -1
- package/components/feed/feed.css +12 -12
- package/components/feed/feed.js +1 -1
- package/components/field/field.css +28 -28
- package/components/field/field.js +1 -1
- package/components/field/field.test.js +1 -1
- package/components/fields/fields.css +5 -5
- package/components/fields/fields.js +1 -1
- package/components/grid/grid.css +5 -5
- package/components/grid/grid.js +1 -1
- package/components/heatmap/heatmap.css +63 -63
- package/components/heatmap/heatmap.js +1 -1
- package/components/icon/icon.css +12 -12
- package/components/icon/icon.js +1 -1
- package/components/image/image.css +14 -14
- package/components/image/image.js +1 -1
- package/components/index.js +11 -0
- package/components/inline-message/inline-message.a2ui.json +143 -0
- package/components/inline-message/inline-message.class.js +169 -0
- package/components/inline-message/inline-message.css +75 -0
- package/components/inline-message/inline-message.d.ts +31 -0
- package/components/inline-message/inline-message.examples.md +19 -0
- package/components/inline-message/inline-message.js +17 -0
- package/components/inline-message/inline-message.test.js +203 -0
- package/components/inline-message/inline-message.yaml +205 -0
- package/components/input/input.css +67 -67
- package/components/input/input.js +1 -1
- package/components/input/input.yaml +5 -4
- package/components/inspector/inspector.css +6 -6
- package/components/inspector/inspector.js +1 -1
- package/components/integration-card/integration-card.a2ui.json +268 -0
- package/components/integration-card/integration-card.class.js +410 -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/kbd/kbd.js +1 -1
- package/components/link/link.css +12 -12
- package/components/link/link.js +1 -1
- package/components/list/list-item.yaml +2 -2
- package/components/list/list.css +8 -8
- package/components/list/list.js +1 -1
- package/components/list-window/list-window.a2ui.json +277 -0
- package/components/list-window/list-window.class.js +688 -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/loading-overlay/loading-overlay.a2ui.json +176 -0
- package/components/loading-overlay/loading-overlay.class.js +203 -0
- package/components/loading-overlay/loading-overlay.css +81 -0
- package/components/loading-overlay/loading-overlay.d.ts +24 -0
- package/components/loading-overlay/loading-overlay.examples.md +50 -0
- package/components/loading-overlay/loading-overlay.js +17 -0
- package/components/loading-overlay/loading-overlay.test.js +257 -0
- package/components/loading-overlay/loading-overlay.yaml +260 -0
- package/components/menu/menu-divider.yaml +1 -1
- package/components/menu/menu-item.yaml +1 -1
- package/components/menu/menu.a2ui.json +3 -0
- package/components/menu/menu.css +8 -8
- package/components/menu/menu.js +1 -1
- package/components/menu/menu.yaml +7 -0
- package/components/modal/{class.js → modal.class.js} +12 -1
- package/components/modal/modal.css +54 -44
- package/components/modal/modal.js +1 -1
- package/components/nav/nav.css +40 -40
- package/components/nav/nav.js +1 -1
- package/components/nav-group/nav-group.css +52 -52
- package/components/nav-group/nav-group.js +1 -1
- package/components/nav-item/nav-item.css +44 -44
- package/components/nav-item/nav-item.js +1 -1
- package/components/noodles/noodles.css +31 -31
- package/components/noodles/noodles.js +1 -1
- package/components/option-card/option-card.css +69 -69
- package/components/option-card/option-card.js +1 -1
- package/components/otp-input/otp-input.css +30 -30
- package/components/otp-input/otp-input.js +1 -1
- package/components/page/page.css +18 -18
- package/components/page/page.js +1 -1
- package/components/pagination/pagination.css +61 -61
- package/components/pagination/pagination.js +1 -1
- package/components/pane/pane.css +57 -57
- package/components/pane/pane.js +1 -1
- package/components/pipeline-status/pipeline-status.css +65 -65
- package/components/pipeline-status/pipeline-status.js +1 -1
- package/components/popover/popover.a2ui.json +8 -1
- package/components/popover/popover.css +17 -17
- package/components/popover/popover.js +1 -1
- package/components/popover/popover.yaml +14 -1
- package/components/progress/progress.css +23 -23
- package/components/progress/progress.js +1 -1
- package/components/progress-row/progress-row.css +17 -17
- package/components/progress-row/progress-row.js +1 -1
- package/components/radio/radio.css +39 -39
- package/components/radio/radio.js +1 -1
- package/components/range/range.css +55 -55
- package/components/range/range.js +1 -1
- package/components/rating/rating.css +28 -28
- package/components/rating/rating.js +1 -1
- package/components/richtext/richtext.css +133 -133
- package/components/richtext/richtext.js +1 -1
- package/components/row/row.css +19 -19
- package/components/row/row.js +1 -1
- package/components/search/search.css +5 -5
- package/components/search/search.js +1 -1
- package/components/segment/segment.css +24 -24
- package/components/segment/segment.js +1 -1
- package/components/segmented/segmented.css +25 -25
- package/components/segmented/segmented.js +1 -1
- package/components/select/select.a2ui.json +58 -4
- package/components/select/{class.js → select.class.js} +415 -6
- package/components/select/select.css +242 -84
- package/components/select/select.d.ts +31 -1
- package/components/select/select.js +1 -1
- package/components/select/select.test.js +202 -0
- package/components/select/select.yaml +126 -5
- package/components/skeleton/skeleton.css +14 -14
- package/components/skeleton/skeleton.js +1 -1
- package/components/slider/slider.css +46 -46
- package/components/slider/slider.js +1 -1
- package/components/spinner/spinner.a2ui.json +198 -0
- package/components/spinner/spinner.class.js +99 -0
- package/components/spinner/spinner.css +221 -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 +272 -0
- package/components/spinner/spinner.yaml +238 -0
- package/components/stack/stack.css +11 -11
- package/components/stack/stack.js +1 -1
- package/components/stat/stat.css +25 -25
- package/components/step-progress/step-progress.css +20 -20
- package/components/step-progress/step-progress.js +1 -1
- package/components/stepper/stepper-item.yaml +1 -1
- package/components/stepper/stepper.css +29 -29
- package/components/stepper/stepper.js +1 -1
- package/components/stream/stream.css +12 -12
- package/components/stream/stream.js +1 -1
- package/components/swatch/swatch.css +68 -68
- package/components/swatch/swatch.js +1 -1
- package/components/swiper/swiper.css +57 -57
- package/components/swiper/swiper.js +1 -1
- package/components/switch/switch.css +52 -52
- package/components/switch/switch.js +1 -1
- package/components/table/table.css +163 -163
- package/components/table/table.js +1 -1
- package/components/table-toolbar/{class.js → table-toolbar.class.js} +1 -1
- package/components/table-toolbar/table-toolbar.css +32 -32
- package/components/table-toolbar/table-toolbar.js +1 -1
- package/components/tabs/tab.yaml +2 -2
- package/components/tabs/tabs.css +51 -51
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.css +48 -48
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.a2ui.json +337 -0
- package/components/tags-input/tags-input.class.js +776 -0
- package/components/tags-input/tags-input.css +201 -0
- package/components/tags-input/tags-input.d.ts +120 -0
- package/components/tags-input/tags-input.examples.md +92 -0
- package/components/tags-input/tags-input.js +17 -0
- package/components/tags-input/tags-input.test.js +368 -0
- package/components/tags-input/tags-input.yaml +367 -0
- package/components/text/text.css +44 -44
- package/components/text/text.js +1 -1
- package/components/textarea/textarea.a2ui.json +1 -1
- package/components/textarea/textarea.css +46 -46
- package/components/textarea/textarea.js +1 -1
- package/components/textarea/textarea.yaml +11 -8
- package/components/time-picker/time-picker.a2ui.json +267 -0
- package/components/time-picker/time-picker.class.js +693 -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-item.yaml +2 -2
- package/components/timeline/{class.js → timeline.class.js} +1 -1
- package/components/timeline/timeline.css +50 -50
- package/components/timeline/timeline.js +1 -1
- package/components/toast/toast.css +58 -58
- package/components/toast/toast.js +1 -1
- package/components/toggle-group/toggle-group.css +6 -6
- package/components/toggle-group/toggle-group.js +1 -1
- package/components/toggle-group/toggle-option.yaml +1 -1
- package/components/toggle-scheme/toggle-scheme.css +2 -2
- package/components/toggle-scheme/toggle-scheme.js +1 -1
- package/components/toolbar/toolbar-group.yaml +1 -1
- package/components/toolbar/toolbar.css +17 -17
- package/components/toolbar/toolbar.js +1 -1
- package/components/tooltip/tooltip.css +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/tree/tree-item.yaml +1 -1
- package/components/tree/tree.css +37 -37
- package/components/tree/tree.js +1 -1
- package/components/upload/upload.css +49 -49
- package/components/upload/upload.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +146 -87
- package/package.json +3 -3
- package/styles/components.css +11 -0
- /package/components/accordion/{class.js → accordion.class.js} +0 -0
- /package/components/action-list/{class.js → action-list.class.js} +0 -0
- /package/components/agent-feedback-bar/{class.js → agent-feedback-bar.class.js} +0 -0
- /package/components/agent-questions/{class.js → agent-questions.class.js} +0 -0
- /package/components/agent-reasoning/{class.js → agent-reasoning.class.js} +0 -0
- /package/components/agent-suggestions/{class.js → agent-suggestions.class.js} +0 -0
- /package/components/avatar/{class.js → avatar.class.js} +0 -0
- /package/components/badge/{class.js → badge.class.js} +0 -0
- /package/components/block/{class.js → block.class.js} +0 -0
- /package/components/breadcrumb/{class.js → breadcrumb.class.js} +0 -0
- /package/components/button/{class.js → button.class.js} +0 -0
- /package/components/calendar-picker/{class.js → calendar-picker.class.js} +0 -0
- /package/components/card/{class.js → card.class.js} +0 -0
- /package/components/chart/{class.js → chart.class.js} +0 -0
- /package/components/chart-legend/{class.js → chart-legend.class.js} +0 -0
- /package/components/chat-thread/{class.js → chat-thread.class.js} +0 -0
- /package/components/check/{class.js → check.class.js} +0 -0
- /package/components/code/{class.js → code.class.js} +0 -0
- /package/components/col/{class.js → col.class.js} +0 -0
- /package/components/color-input/{class.js → color-input.class.js} +0 -0
- /package/components/color-picker/{class.js → color-picker.class.js} +0 -0
- /package/components/command/{class.js → command.class.js} +0 -0
- /package/components/demo-toggle/{class.js → demo-toggle.class.js} +0 -0
- /package/components/description-list/{class.js → description-list.class.js} +0 -0
- /package/components/divider/{class.js → divider.class.js} +0 -0
- /package/components/drawer/{class.js → drawer.class.js} +0 -0
- /package/components/embed/{class.js → embed.class.js} +0 -0
- /package/components/empty-state/{class.js → empty-state.class.js} +0 -0
- /package/components/feed/{class.js → feed.class.js} +0 -0
- /package/components/field/{class.js → field.class.js} +0 -0
- /package/components/fields/{class.js → fields.class.js} +0 -0
- /package/components/grid/{class.js → grid.class.js} +0 -0
- /package/components/heatmap/{class.js → heatmap.class.js} +0 -0
- /package/components/icon/{class.js → icon.class.js} +0 -0
- /package/components/image/{class.js → image.class.js} +0 -0
- /package/components/input/{class.js → input.class.js} +0 -0
- /package/components/inspector/{class.js → inspector.class.js} +0 -0
- /package/components/kbd/{class.js → kbd.class.js} +0 -0
- /package/components/link/{class.js → link.class.js} +0 -0
- /package/components/list/{class.js → list.class.js} +0 -0
- /package/components/menu/{class.js → menu.class.js} +0 -0
- /package/components/nav/{class.js → nav.class.js} +0 -0
- /package/components/nav-group/{class.js → nav-group.class.js} +0 -0
- /package/components/nav-item/{class.js → nav-item.class.js} +0 -0
- /package/components/noodles/{class.js → noodles.class.js} +0 -0
- /package/components/option-card/{class.js → option-card.class.js} +0 -0
- /package/components/otp-input/{class.js → otp-input.class.js} +0 -0
- /package/components/page/{class.js → page.class.js} +0 -0
- /package/components/pagination/{class.js → pagination.class.js} +0 -0
- /package/components/pane/{class.js → pane.class.js} +0 -0
- /package/components/pipeline-status/{class.js → pipeline-status.class.js} +0 -0
- /package/components/popover/{class.js → popover.class.js} +0 -0
- /package/components/progress/{class.js → progress.class.js} +0 -0
- /package/components/progress-row/{class.js → progress-row.class.js} +0 -0
- /package/components/radio/{class.js → radio.class.js} +0 -0
- /package/components/range/{class.js → range.class.js} +0 -0
- /package/components/rating/{class.js → rating.class.js} +0 -0
- /package/components/richtext/{class.js → richtext.class.js} +0 -0
- /package/components/row/{class.js → row.class.js} +0 -0
- /package/components/search/{class.js → search.class.js} +0 -0
- /package/components/segment/{class.js → segment.class.js} +0 -0
- /package/components/segmented/{class.js → segmented.class.js} +0 -0
- /package/components/skeleton/{class.js → skeleton.class.js} +0 -0
- /package/components/slider/{class.js → slider.class.js} +0 -0
- /package/components/stack/{class.js → stack.class.js} +0 -0
- /package/components/step-progress/{class.js → step-progress.class.js} +0 -0
- /package/components/stepper/{class.js → stepper.class.js} +0 -0
- /package/components/stream/{class.js → stream.class.js} +0 -0
- /package/components/swatch/{class.js → swatch.class.js} +0 -0
- /package/components/swiper/{class.js → swiper.class.js} +0 -0
- /package/components/switch/{class.js → switch.class.js} +0 -0
- /package/components/table/{class.js → table.class.js} +0 -0
- /package/components/tabs/{class.js → tabs.class.js} +0 -0
- /package/components/tag/{class.js → tag.class.js} +0 -0
- /package/components/text/{class.js → text.class.js} +0 -0
- /package/components/textarea/{class.js → textarea.class.js} +0 -0
- /package/components/toast/{class.js → toast.class.js} +0 -0
- /package/components/toggle-group/{class.js → toggle-group.class.js} +0 -0
- /package/components/toggle-scheme/{class.js → toggle-scheme.class.js} +0 -0
- /package/components/toolbar/{class.js → toolbar.class.js} +0 -0
- /package/components/tooltip/{class.js → tooltip.class.js} +0 -0
- /package/components/tree/{class.js → tree.class.js} +0 -0
- /package/components/upload/{class.js → upload.class.js} +0 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
@scope (select-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Layout ── */
|
|
4
|
-
--select-gap: var(--a-space-2);
|
|
5
|
-
--select-trigger-gap: var(--a-space-1);
|
|
6
|
-
--select-height: var(--a-size);
|
|
7
|
-
--select-px: var(--a-ui-px);
|
|
8
|
-
--select-radius: var(--a-radius);
|
|
9
|
-
--select-leading-radius: var(--a-radius-full);
|
|
4
|
+
--select-gap-default: var(--a-space-2);
|
|
5
|
+
--select-trigger-gap-default: var(--a-space-1);
|
|
6
|
+
--select-height-default: var(--a-size);
|
|
7
|
+
--select-px-default: var(--a-ui-px);
|
|
8
|
+
--select-radius-default: var(--a-radius);
|
|
9
|
+
--select-leading-radius-default: var(--a-radius-full);
|
|
10
10
|
|
|
11
11
|
/* ── Typography ── */
|
|
12
|
-
--select-font-size: var(--a-ui-size);
|
|
13
|
-
--select-label-size: var(--a-label-size);
|
|
12
|
+
--select-font-size-default: var(--a-ui-size);
|
|
13
|
+
--select-label-size-default: var(--a-label-size);
|
|
14
14
|
|
|
15
15
|
/* ── Colors ── */
|
|
16
|
-
--select-bg: var(--a-ui-bg);
|
|
17
|
-
--select-bg-selected: var(--a-ui-bg-selected);
|
|
18
|
-
--select-bg-hover: var(--a-ui-bg-hover);
|
|
19
|
-
--select-border: var(--a-ui-border);
|
|
20
|
-
--select-border-hover: var(--a-ui-border-hover);
|
|
21
|
-
--select-focus-ring: var(--a-focus-ring);
|
|
22
|
-
--select-focus-ring-invalid: var(--a-focus-ring-invalid);
|
|
23
|
-
--select-label-fg: var(--a-ui-text-muted);
|
|
24
|
-
--select-placeholder-fg: var(--a-ui-text-placeholder);
|
|
25
|
-
--select-caret-fg: var(--a-ui-text-muted);
|
|
26
|
-
--select-fg: var(--a-ui-text);
|
|
27
|
-
--select-fg-hover: var(--a-ui-text-hover);
|
|
28
|
-
--select-fg-selected: var(--a-ui-text-selected);
|
|
29
|
-
--select-fg-subtle: var(--a-ui-text-subtle);
|
|
30
|
-
--select-fg-muted: var(--a-ui-text-muted);
|
|
31
|
-
--select-fg-disabled: var(--a-ui-text-disabled);
|
|
32
|
-
--select-ghost-bg-hover: var(--a-bg-muted);
|
|
16
|
+
--select-bg-default: var(--a-ui-bg);
|
|
17
|
+
--select-bg-selected-default: var(--a-ui-bg-selected);
|
|
18
|
+
--select-bg-hover-default: var(--a-ui-bg-hover);
|
|
19
|
+
--select-border-default: var(--a-ui-border);
|
|
20
|
+
--select-border-hover-default: var(--a-ui-border-hover);
|
|
21
|
+
--select-focus-ring-default: var(--a-focus-ring);
|
|
22
|
+
--select-focus-ring-invalid-default: var(--a-focus-ring-invalid);
|
|
23
|
+
--select-label-fg-default: var(--a-ui-text-muted);
|
|
24
|
+
--select-placeholder-fg-default: var(--a-ui-text-placeholder);
|
|
25
|
+
--select-caret-fg-default: var(--a-ui-text-muted);
|
|
26
|
+
--select-fg-default: var(--a-ui-text);
|
|
27
|
+
--select-fg-hover-default: var(--a-ui-text-hover);
|
|
28
|
+
--select-fg-selected-default: var(--a-ui-text-selected);
|
|
29
|
+
--select-fg-subtle-default: var(--a-ui-text-subtle);
|
|
30
|
+
--select-fg-muted-default: var(--a-ui-text-muted);
|
|
31
|
+
--select-fg-disabled-default: var(--a-ui-text-disabled);
|
|
32
|
+
--select-ghost-bg-hover-default: var(--a-bg-muted);
|
|
33
33
|
|
|
34
34
|
/* ── Transition ── */
|
|
35
|
-
--select-duration: var(--a-duration-fast);
|
|
36
|
-
--select-easing: var(--a-easing);
|
|
35
|
+
--select-duration-default: var(--a-duration-fast);
|
|
36
|
+
--select-easing-default: var(--a-easing);
|
|
37
37
|
|
|
38
38
|
/* ── Listbox ── */
|
|
39
|
-
--select-option-px: var(--a-ui-px);
|
|
40
|
-
--select-option-py: var(--a-ui-py);
|
|
41
|
-
--select-option-bg-hover: var(--a-bg-hover);
|
|
42
|
-
--select-option-fg-active: var(--a-ui-text-active);
|
|
43
|
-
--select-option-fg-disabled: var(--a-ui-text-disabled);
|
|
44
|
-
--select-group-label-size: var(--a-ui-size);
|
|
39
|
+
--select-option-px-default: var(--a-ui-px);
|
|
40
|
+
--select-option-py-default: var(--a-ui-py);
|
|
41
|
+
--select-option-bg-hover-default: var(--a-bg-hover);
|
|
42
|
+
--select-option-fg-active-default: var(--a-ui-text-active);
|
|
43
|
+
--select-option-fg-disabled-default: var(--a-ui-text-disabled);
|
|
44
|
+
--select-group-label-size-default: var(--a-ui-size);
|
|
45
45
|
text-align: start; /* §text-align-reset — blocks inheritance from centered ancestors */
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
position: relative;
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
|
-
gap: var(--select-gap);
|
|
54
|
+
gap: var(--select-gap, var(--select-gap-default));
|
|
55
55
|
min-width: 0;
|
|
56
|
-
font-size: var(--select-font-size);
|
|
56
|
+
font-size: var(--select-font-size, var(--select-font-size-default));
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
:scope[data-direction="row"] {
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
grid-template-columns: 1fr 1fr;
|
|
62
62
|
align-items: center;
|
|
63
63
|
}
|
|
64
|
-
:scope[disabled] { pointer-events: none; color: var(--select-fg-disabled); }
|
|
64
|
+
:scope[disabled] { pointer-events: none; color: var(--select-fg-disabled, var(--select-fg-disabled-default)); }
|
|
65
65
|
|
|
66
66
|
/* Label */
|
|
67
67
|
:scope::before {
|
|
68
68
|
content: attr(label);
|
|
69
|
-
font-size: var(--select-label-size);
|
|
70
|
-
color: var(--select-label-fg);
|
|
69
|
+
font-size: var(--select-label-size, var(--select-label-size-default));
|
|
70
|
+
color: var(--select-label-fg, var(--select-label-fg-default));
|
|
71
71
|
}
|
|
72
72
|
:scope:not([label])::before,
|
|
73
73
|
:scope[label=""]::before { display: none; }
|
|
@@ -77,42 +77,42 @@
|
|
|
77
77
|
display: flex;
|
|
78
78
|
align-items: center;
|
|
79
79
|
justify-content: space-between;
|
|
80
|
-
gap: var(--select-trigger-gap);
|
|
80
|
+
gap: var(--select-trigger-gap, var(--select-trigger-gap-default));
|
|
81
81
|
min-width: 0;
|
|
82
|
-
min-height: var(--select-height);
|
|
83
|
-
padding: 0 var(--select-px);
|
|
84
|
-
border: 1px solid var(--select-border);
|
|
85
|
-
border-radius: var(--select-radius);
|
|
86
|
-
background: var(--select-bg);
|
|
82
|
+
min-height: var(--select-height, var(--select-height-default));
|
|
83
|
+
padding: 0 var(--select-px, var(--select-px-default));
|
|
84
|
+
border: 1px solid var(--select-border, var(--select-border-default));
|
|
85
|
+
border-radius: var(--select-radius, var(--select-radius-default));
|
|
86
|
+
background: var(--select-bg, var(--select-bg-default));
|
|
87
87
|
line-height: 1;
|
|
88
88
|
cursor: pointer;
|
|
89
89
|
/* Match every property the hover / focus / invalid states change. */
|
|
90
90
|
transition:
|
|
91
|
-
background var(--select-duration) var(--select-easing),
|
|
92
|
-
border-color var(--select-duration) var(--select-easing),
|
|
93
|
-
color var(--select-duration) var(--select-easing),
|
|
94
|
-
box-shadow var(--select-duration) var(--select-easing);
|
|
91
|
+
background var(--select-duration, var(--select-duration-default)) var(--select-easing, var(--select-easing-default)),
|
|
92
|
+
border-color var(--select-duration, var(--select-duration-default)) var(--select-easing, var(--select-easing-default)),
|
|
93
|
+
color var(--select-duration, var(--select-duration-default)) var(--select-easing, var(--select-easing-default)),
|
|
94
|
+
box-shadow var(--select-duration, var(--select-duration-default)) var(--select-easing, var(--select-easing-default));
|
|
95
95
|
}
|
|
96
96
|
[slot="trigger"]:hover {
|
|
97
|
-
border-color: var(--select-border-hover);
|
|
98
|
-
background: var(--select-bg-hover);
|
|
99
|
-
color: var(--select-fg);
|
|
97
|
+
border-color: var(--select-border-hover, var(--select-border-hover-default));
|
|
98
|
+
background: var(--select-bg-hover, var(--select-bg-hover-default));
|
|
99
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
100
100
|
}
|
|
101
101
|
[slot="trigger"]:hover [slot="caret"] {
|
|
102
|
-
color: var(--select-fg-subtle);
|
|
102
|
+
color: var(--select-fg-subtle, var(--select-fg-subtle-default));
|
|
103
103
|
}
|
|
104
104
|
:scope:focus-visible { outline: none; }
|
|
105
105
|
:scope:focus-visible [slot="trigger"] {
|
|
106
106
|
/* Canonical ring via L3 token (see semantics.css FOCUS block). */
|
|
107
|
-
box-shadow: var(--select-focus-ring);
|
|
108
|
-
color: var(--select-fg);
|
|
107
|
+
box-shadow: var(--select-focus-ring, var(--select-focus-ring-default));
|
|
108
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
109
109
|
}
|
|
110
110
|
:scope[aria-invalid="true"]:focus-visible [slot="trigger"],
|
|
111
111
|
:scope[error]:focus-visible [slot="trigger"] {
|
|
112
|
-
box-shadow: var(--select-focus-ring-invalid);
|
|
112
|
+
box-shadow: var(--select-focus-ring-invalid, var(--select-focus-ring-invalid-default));
|
|
113
113
|
}
|
|
114
114
|
:scope:focus-visible::before {
|
|
115
|
-
color: var(--select-fg-subtle);
|
|
115
|
+
color: var(--select-fg-subtle, var(--select-fg-subtle-default));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/* Leading icon / avatar — inline-flex centers icon content vertically
|
|
@@ -122,14 +122,14 @@
|
|
|
122
122
|
align-items: center;
|
|
123
123
|
flex-shrink: 0;
|
|
124
124
|
line-height: 1;
|
|
125
|
-
--a-icon-size: var(--select-font-size);
|
|
126
|
-
color: var(--select-fg-muted);
|
|
125
|
+
--a-icon-size: var(--select-font-size, var(--select-font-size-default));
|
|
126
|
+
color: var(--select-fg-muted, var(--select-fg-muted-default));
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
img[slot="leading"] {
|
|
130
|
-
width: var(--select-leading-size, calc(var(--select-height) - var(--select-gap)));
|
|
131
|
-
height: var(--select-leading-size, calc(var(--select-height) - var(--select-gap)));
|
|
132
|
-
border-radius: var(--select-leading-radius);
|
|
130
|
+
width: var(--select-leading-size, calc(var(--select-height, var(--select-height-default)) - var(--select-gap, var(--select-gap-default))));
|
|
131
|
+
height: var(--select-leading-size, calc(var(--select-height, var(--select-height-default)) - var(--select-gap, var(--select-gap-default))));
|
|
132
|
+
border-radius: var(--select-leading-radius, var(--select-leading-radius-default));
|
|
133
133
|
object-fit: cover;
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
overflow: hidden;
|
|
139
139
|
text-overflow: ellipsis;
|
|
140
140
|
white-space: nowrap;
|
|
141
|
-
color: var(--select-fg);
|
|
141
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
142
142
|
}
|
|
143
143
|
input[slot="display"] {
|
|
144
144
|
border: none;
|
|
@@ -147,23 +147,23 @@
|
|
|
147
147
|
padding: 0;
|
|
148
148
|
margin: 0;
|
|
149
149
|
font: inherit;
|
|
150
|
-
color: var(--select-fg);
|
|
150
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
151
151
|
min-width: 0;
|
|
152
152
|
width: 100%;
|
|
153
153
|
}
|
|
154
154
|
input[slot="display"]::placeholder {
|
|
155
|
-
color: var(--select-placeholder-fg);
|
|
155
|
+
color: var(--select-placeholder-fg, var(--select-placeholder-fg-default));
|
|
156
156
|
}
|
|
157
157
|
:scope:not([value]) [slot="display"],
|
|
158
158
|
:scope[value=""] [slot="display"] {
|
|
159
|
-
color: var(--select-placeholder-fg);
|
|
159
|
+
color: var(--select-placeholder-fg, var(--select-placeholder-fg-default));
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
/* Caret color is held against button-ui's stronger cascade by chaining
|
|
163
163
|
:scope > [slot="trigger"] > [slot="caret"] — matches at the same
|
|
164
164
|
specificity as button-ui's own slot rules without !important. */
|
|
165
165
|
:scope > [slot="trigger"] > [slot="caret"] {
|
|
166
|
-
color: var(--select-caret-fg);
|
|
166
|
+
color: var(--select-caret-fg, var(--select-caret-fg-default));
|
|
167
167
|
flex-shrink: 0;
|
|
168
168
|
}
|
|
169
169
|
|
|
@@ -171,16 +171,84 @@
|
|
|
171
171
|
|
|
172
172
|
/* Ghost variant */
|
|
173
173
|
:scope[variant="ghost"] {
|
|
174
|
-
--select-bg: transparent;
|
|
175
|
-
--select-border: transparent;
|
|
176
|
-
--select-border-hover: transparent;
|
|
174
|
+
--select-bg-default: transparent;
|
|
175
|
+
--select-border-default: transparent;
|
|
176
|
+
--select-border-hover-default: transparent;
|
|
177
177
|
}
|
|
178
178
|
:scope[variant="ghost"] [slot="trigger"]:hover {
|
|
179
|
-
background: var(--select-ghost-bg-hover);
|
|
180
|
-
color: var(--select-fg);
|
|
179
|
+
background: var(--select-ghost-bg-hover, var(--select-ghost-bg-hover-default));
|
|
180
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
181
181
|
}
|
|
182
182
|
:scope[variant="ghost"] > [slot="trigger"]:hover > [slot="caret"] {
|
|
183
|
-
color: var(--select-fg-subtle);
|
|
183
|
+
color: var(--select-fg-subtle, var(--select-fg-subtle-default));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* ── SPEC-040 — Multi-select chip trigger ──
|
|
187
|
+
[data-multi-chips] is set on the host by render() when [multiple] is
|
|
188
|
+
active. Layout switches from inline-text trigger to wrap-flex chip row.
|
|
189
|
+
Tag-ui chips inside [data-chips] inherit the host's tag-ui token set;
|
|
190
|
+
the +more pill is a CSS-only button styled to match. */
|
|
191
|
+
:scope[data-multi-chips] > [slot="trigger"] {
|
|
192
|
+
flex-wrap: wrap;
|
|
193
|
+
align-items: center;
|
|
194
|
+
gap: var(--a-space-1);
|
|
195
|
+
/* min-height tracks single-row height when empty; flex-wrap allows
|
|
196
|
+
it to grow as chips overflow. */
|
|
197
|
+
padding-block: calc(var(--select-py, var(--a-space-1)));
|
|
198
|
+
}
|
|
199
|
+
:scope[data-multi-chips] [data-chips] {
|
|
200
|
+
display: contents; /* let chips participate in the trigger's flex line */
|
|
201
|
+
}
|
|
202
|
+
:scope[data-multi-chips] [data-chips] tag-ui {
|
|
203
|
+
/* Chip styling tracks the active variant via tag-ui's own tokens. */
|
|
204
|
+
--tag-size-default: var(--a-ui-tiny);
|
|
205
|
+
}
|
|
206
|
+
:scope[data-multi-chips] [data-chips] [data-more] {
|
|
207
|
+
appearance: none;
|
|
208
|
+
border: 1px solid var(--select-border, var(--select-border-default));
|
|
209
|
+
background: var(--select-bg-hover, var(--select-bg-hover-default));
|
|
210
|
+
color: var(--select-fg-muted, var(--select-fg-muted-default));
|
|
211
|
+
border-radius: var(--a-radius-full);
|
|
212
|
+
padding: 0 var(--a-space-2);
|
|
213
|
+
font: inherit;
|
|
214
|
+
font-size: var(--a-ui-tiny);
|
|
215
|
+
line-height: calc(var(--a-size) - var(--a-space-3));
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
}
|
|
218
|
+
:scope[data-multi-chips] [data-chips] [data-more]:hover {
|
|
219
|
+
background: var(--a-bg-hover);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* Clear-all `x` affordance. Visible only when [clearable] AND chips. */
|
|
223
|
+
:scope[data-multi-chips] [data-clear-all] {
|
|
224
|
+
appearance: none;
|
|
225
|
+
background: transparent;
|
|
226
|
+
border: none;
|
|
227
|
+
padding: var(--a-space-0);
|
|
228
|
+
margin-inline-start: var(--a-space-1);
|
|
229
|
+
color: var(--select-fg-muted, var(--select-fg-muted-default));
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
border-radius: var(--a-radius-full);
|
|
232
|
+
--a-icon-size: var(--a-ui-sm);
|
|
233
|
+
display: inline-flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
}
|
|
236
|
+
:scope[data-multi-chips] [data-clear-all][hidden] { display: none; }
|
|
237
|
+
:scope[data-multi-chips] [data-clear-all]:hover {
|
|
238
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
239
|
+
background: var(--a-bg-hover);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* In multi-select with chips present, the trigger display element is
|
|
243
|
+
the rest-of-row slot — make it flex-grow but not push chips off. */
|
|
244
|
+
:scope[data-multi-chips] [slot="display"] {
|
|
245
|
+
flex: 1;
|
|
246
|
+
min-width: 4ch;
|
|
247
|
+
}
|
|
248
|
+
/* Hide the display when empty in multi-mode (chips fill the slot). */
|
|
249
|
+
:scope[data-multi-chips] [slot="display"]:empty {
|
|
250
|
+
flex: 0 0 0;
|
|
251
|
+
padding: 0;
|
|
184
252
|
}
|
|
185
253
|
}
|
|
186
254
|
|
|
@@ -197,7 +265,7 @@ select-ui [slot="listbox"] {
|
|
|
197
265
|
overflow-y: auto;
|
|
198
266
|
font-family: inherit;
|
|
199
267
|
font-size: var(--a-ui-size);
|
|
200
|
-
color: var(--select-fg);
|
|
268
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
201
269
|
|
|
202
270
|
/* Positioned by JS (#positionListbox) — fixed to viewport */
|
|
203
271
|
width: max-content;
|
|
@@ -225,7 +293,7 @@ select-ui [role="option"] {
|
|
|
225
293
|
padding: var(--a-space-1) var(--a-ui-px);
|
|
226
294
|
border-radius: var(--a-radius-sm);
|
|
227
295
|
white-space: nowrap;
|
|
228
|
-
color: var(--select-fg-subtle);
|
|
296
|
+
color: var(--select-fg-subtle, var(--select-fg-subtle-default));
|
|
229
297
|
cursor: pointer;
|
|
230
298
|
transition:
|
|
231
299
|
background var(--a-duration-fast) var(--a-easing),
|
|
@@ -233,16 +301,16 @@ select-ui [role="option"] {
|
|
|
233
301
|
}
|
|
234
302
|
select-ui [role="option"]:hover,
|
|
235
303
|
select-ui [role="option"][data-focused] {
|
|
236
|
-
background: var(--select-option-bg-hover);
|
|
237
|
-
color: var(--select-fg-hover);
|
|
304
|
+
background: var(--select-option-bg-hover, var(--select-option-bg-hover-default));
|
|
305
|
+
color: var(--select-fg-hover, var(--select-fg-hover-default));
|
|
238
306
|
}
|
|
239
307
|
select-ui [role="option"][aria-selected="true"] {
|
|
240
|
-
color: var(--select-fg-selected);
|
|
241
|
-
background: var(--select-bg-selected);
|
|
308
|
+
color: var(--select-fg-selected, var(--select-fg-selected-default));
|
|
309
|
+
background: var(--select-bg-selected, var(--select-bg-selected-default));
|
|
242
310
|
font-weight: var(--a-ui-weight);
|
|
243
311
|
}
|
|
244
312
|
select-ui [role="option"][aria-disabled="true"] {
|
|
245
|
-
color: var(--select-option-fg-disabled);
|
|
313
|
+
color: var(--select-option-fg-disabled, var(--select-option-fg-disabled-default));
|
|
246
314
|
cursor: not-allowed;
|
|
247
315
|
}
|
|
248
316
|
select-ui [role="option"][aria-disabled="true"]:hover {
|
|
@@ -252,7 +320,7 @@ select-ui [role="option"][aria-disabled="true"]:hover {
|
|
|
252
320
|
/* Option with icon */
|
|
253
321
|
select-ui [role="option"] icon-ui {
|
|
254
322
|
--a-icon-size: var(--a-ui-size);
|
|
255
|
-
color: var(--select-fg-muted);
|
|
323
|
+
color: var(--select-fg-muted, var(--select-fg-muted-default));
|
|
256
324
|
margin-inline-end: var(--a-space-1);
|
|
257
325
|
vertical-align: -0.125em;
|
|
258
326
|
}
|
|
@@ -284,21 +352,21 @@ select-ui [data-menu-header] img {
|
|
|
284
352
|
select-ui [data-menu-header] strong {
|
|
285
353
|
display: block;
|
|
286
354
|
font-weight: var(--a-weight-medium);
|
|
287
|
-
color: var(--select-fg);
|
|
355
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
288
356
|
font-size: var(--a-ui-size);
|
|
289
357
|
}
|
|
290
358
|
|
|
291
359
|
select-ui [data-menu-header] span {
|
|
292
360
|
display: block;
|
|
293
361
|
font-size: var(--a-ui-sm);
|
|
294
|
-
color: var(--select-fg-muted);
|
|
362
|
+
color: var(--select-fg-muted, var(--select-fg-muted-default));
|
|
295
363
|
}
|
|
296
364
|
|
|
297
365
|
select-ui [role="group"] [slot="group-label"] {
|
|
298
366
|
padding: var(--a-space-1) var(--a-ui-px);
|
|
299
367
|
font-size: var(--a-ui-tiny);
|
|
300
368
|
font-weight: var(--a-ui-weight);
|
|
301
|
-
color: var(--select-fg-muted);
|
|
369
|
+
color: var(--select-fg-muted, var(--select-fg-muted-default));
|
|
302
370
|
text-transform: uppercase;
|
|
303
371
|
letter-spacing: 0.05em;
|
|
304
372
|
white-space: nowrap;
|
|
@@ -317,6 +385,96 @@ select-ui > [slot="hint"] {
|
|
|
317
385
|
display: block;
|
|
318
386
|
margin-top: var(--select-hint-mt, var(--a-space-1));
|
|
319
387
|
font-size: var(--select-hint-size, var(--a-ui-xs));
|
|
320
|
-
color: var(--select-hint-fg, var(--select-fg-muted));
|
|
388
|
+
color: var(--select-hint-fg, var(--select-fg-muted, var(--select-fg-muted-default)));
|
|
321
389
|
line-height: var(--select-hint-lh, 1.4);
|
|
322
390
|
}
|
|
391
|
+
|
|
392
|
+
/* ── SPEC-040 — Multi-select popover affordances ──
|
|
393
|
+
Top-layer: popover lives outside @scope so reference --a-* directly. */
|
|
394
|
+
|
|
395
|
+
/* Select-all / Clear control row above the option list. */
|
|
396
|
+
select-ui [slot="listbox"] [data-select-all] {
|
|
397
|
+
display: flex;
|
|
398
|
+
align-items: center;
|
|
399
|
+
justify-content: flex-end;
|
|
400
|
+
padding: var(--a-space-1);
|
|
401
|
+
border-bottom: 1px solid var(--a-border-subtle);
|
|
402
|
+
margin-bottom: var(--a-space-1);
|
|
403
|
+
}
|
|
404
|
+
select-ui [slot="listbox"] [data-select-all-btn] {
|
|
405
|
+
appearance: none;
|
|
406
|
+
background: transparent;
|
|
407
|
+
border: none;
|
|
408
|
+
font: inherit;
|
|
409
|
+
font-size: var(--a-ui-xs);
|
|
410
|
+
color: var(--a-accent);
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
padding: var(--a-space-1) var(--a-space-2);
|
|
413
|
+
border-radius: var(--a-radius-sm);
|
|
414
|
+
}
|
|
415
|
+
select-ui [slot="listbox"] [data-select-all-btn]:hover {
|
|
416
|
+
background: var(--a-bg-hover);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* Multi-select option rows — leading checkbox indicator + label.
|
|
420
|
+
The check icon is hidden by default and revealed at aria-selected. */
|
|
421
|
+
select-ui [role="option"][data-multi-option] {
|
|
422
|
+
display: flex;
|
|
423
|
+
align-items: center;
|
|
424
|
+
gap: var(--a-space-2);
|
|
425
|
+
}
|
|
426
|
+
select-ui [role="option"][data-multi-option] [data-checkbox] {
|
|
427
|
+
flex-shrink: 0;
|
|
428
|
+
display: inline-flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
width: 1rem;
|
|
432
|
+
height: 1rem;
|
|
433
|
+
border: 1px solid var(--a-ui-border);
|
|
434
|
+
border-radius: var(--a-radius-sm);
|
|
435
|
+
background: var(--a-canvas-bright);
|
|
436
|
+
margin-inline-end: 0; /* row gap already provides spacing */
|
|
437
|
+
transition:
|
|
438
|
+
background var(--a-duration-fast) var(--a-easing),
|
|
439
|
+
border-color var(--a-duration-fast) var(--a-easing);
|
|
440
|
+
}
|
|
441
|
+
/* Hide the check icon when unselected — overrides the option-row icon-ui
|
|
442
|
+
rule above. */
|
|
443
|
+
select-ui [role="option"][data-multi-option] [data-checkbox] icon-ui {
|
|
444
|
+
--a-icon-size: 0.75rem;
|
|
445
|
+
color: transparent;
|
|
446
|
+
margin: 0;
|
|
447
|
+
vertical-align: 0;
|
|
448
|
+
transition: color var(--a-duration-fast) var(--a-easing);
|
|
449
|
+
}
|
|
450
|
+
select-ui [role="option"][data-multi-option][aria-selected="true"] [data-checkbox] {
|
|
451
|
+
background: var(--a-accent);
|
|
452
|
+
border-color: var(--a-accent);
|
|
453
|
+
}
|
|
454
|
+
select-ui [role="option"][data-multi-option][aria-selected="true"] [data-checkbox] icon-ui {
|
|
455
|
+
color: var(--a-chrome-light);
|
|
456
|
+
}
|
|
457
|
+
select-ui [role="option"][data-multi-option] [data-option-label] {
|
|
458
|
+
flex: 1;
|
|
459
|
+
min-width: 0;
|
|
460
|
+
}
|
|
461
|
+
/* Multi-option selected state — override the single-select "bold +
|
|
462
|
+
accent bg" treatment so the row stays light + the checkbox carries
|
|
463
|
+
the selected signal. */
|
|
464
|
+
select-ui [role="option"][data-multi-option][aria-selected="true"] {
|
|
465
|
+
background: transparent;
|
|
466
|
+
font-weight: inherit;
|
|
467
|
+
color: var(--select-fg, var(--select-fg-default));
|
|
468
|
+
}
|
|
469
|
+
select-ui [role="option"][data-multi-option][aria-selected="true"]:hover,
|
|
470
|
+
select-ui [role="option"][data-multi-option][aria-selected="true"][data-focused] {
|
|
471
|
+
background: var(--select-option-bg-hover, var(--select-option-bg-hover-default));
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* Empty state when there are no options. */
|
|
475
|
+
select-ui [slot="listbox"] [data-empty] {
|
|
476
|
+
padding: var(--a-space-3) var(--a-ui-px);
|
|
477
|
+
color: var(--a-fg-muted);
|
|
478
|
+
text-align: center;
|
|
479
|
+
font-size: var(--a-ui-xs);
|
|
480
|
+
}
|
|
@@ -17,7 +17,12 @@ export interface SelectOption {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface SelectChangeEventDetail<V extends string = string> {
|
|
20
|
-
value:
|
|
20
|
+
/** Single-select: the new value. Multi-select: array of selected ids. */
|
|
21
|
+
value: V | V[];
|
|
22
|
+
/** Multi-select only: ids added in this change. */
|
|
23
|
+
added?: V[];
|
|
24
|
+
/** Multi-select only: ids removed in this change. */
|
|
25
|
+
removed?: V[];
|
|
21
26
|
}
|
|
22
27
|
export type SelectChangeEvent<V extends string = string> = CustomEvent<SelectChangeEventDetail<V>>;
|
|
23
28
|
|
|
@@ -26,6 +31,13 @@ export interface SelectActionEventDetail {
|
|
|
26
31
|
}
|
|
27
32
|
export type SelectActionEvent = CustomEvent<SelectActionEventDetail>;
|
|
28
33
|
|
|
34
|
+
/** SPEC-040 — fired when [multiple] toggle suppressed by min/max constraints. */
|
|
35
|
+
export interface SelectInvalidEventDetail {
|
|
36
|
+
value: string[];
|
|
37
|
+
reason: 'min' | 'max';
|
|
38
|
+
}
|
|
39
|
+
export type SelectInvalidEvent = CustomEvent<SelectInvalidEventDetail>;
|
|
40
|
+
|
|
29
41
|
export class UISelect extends UIFormElement {
|
|
30
42
|
placeholder: string;
|
|
31
43
|
/** Open/closed reflected attribute — toggled by trigger click / keyboard. */
|
|
@@ -40,6 +52,16 @@ export class UISelect extends UIFormElement {
|
|
|
40
52
|
/** Allow values not in the option list (combobox mode). */
|
|
41
53
|
freeText: boolean;
|
|
42
54
|
divider: boolean;
|
|
55
|
+
/** SPEC-040 — cap visible chips in multi-select trigger. 0 = unlimited. */
|
|
56
|
+
maxChips: number;
|
|
57
|
+
/** SPEC-040 — minimum required selections in multi-select mode. */
|
|
58
|
+
min: number;
|
|
59
|
+
/** SPEC-040 — maximum allowed selections in multi-select mode. 0 = unlimited. */
|
|
60
|
+
max: number;
|
|
61
|
+
/** SPEC-040 — render Select-all / Clear control above the option list. */
|
|
62
|
+
selectAll: boolean;
|
|
63
|
+
/** SPEC-040 — render a clear-all `x` affordance in the trigger. */
|
|
64
|
+
clearable: boolean;
|
|
43
65
|
/** §207 (v0.5.7): hint text below the field, wired to aria-describedby. */
|
|
44
66
|
hint: string;
|
|
45
67
|
/**
|
|
@@ -63,6 +85,13 @@ export class UISelect extends UIFormElement {
|
|
|
63
85
|
*/
|
|
64
86
|
options: readonly SelectOption[];
|
|
65
87
|
|
|
88
|
+
/** SPEC-040 — toggle one option's selection in multi-select mode. */
|
|
89
|
+
toggle(id: string): void;
|
|
90
|
+
/** SPEC-040 — select every non-disabled option in multi-select mode. */
|
|
91
|
+
selectAllOptions(): void;
|
|
92
|
+
/** SPEC-040 — clear all selections. */
|
|
93
|
+
clear(): void;
|
|
94
|
+
|
|
66
95
|
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
67
96
|
type: K,
|
|
68
97
|
listener: (this: UISelect, ev: HTMLElementEventMap[K]) => unknown,
|
|
@@ -70,4 +99,5 @@ export class UISelect extends UIFormElement {
|
|
|
70
99
|
): void;
|
|
71
100
|
addEventListener(type: 'change', listener: (ev: SelectChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
72
101
|
addEventListener(type: 'action', listener: (ev: SelectActionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
102
|
+
addEventListener(type: 'invalid', listener: (ev: SelectInvalidEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
73
103
|
}
|