@zazz-ui/core 0.4.1 → 0.5.1
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/AUTHORING.md +158 -0
- package/CHANGELOG.md +345 -0
- package/README.md +55 -23
- package/dist/scroll-state-C8mA5gq6.js +1 -0
- package/dist/sri.json +124 -72
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +116794 -0
- package/editor/zazz.html-data.json +1683 -0
- package/editor/zazz.language-data.json +5001 -0
- package/editor/zazz.lint-data.json +152 -0
- package/package.json +12 -5
- package/src/base/_breakpoints.css +12 -0
- package/src/base/_layers.css +8 -9
- package/src/base/_properties-2xl.css +171 -0
- package/src/base/_properties-active.css +107 -0
- package/src/base/_properties-checked.css +107 -0
- package/src/base/_properties-current.css +107 -0
- package/src/base/_properties-disabled.css +107 -0
- package/src/base/_properties-focus-visible.css +107 -0
- package/src/base/_properties-focus-within.css +107 -0
- package/src/base/_properties-hover.css +107 -0
- package/src/base/_properties-lg.css +171 -0
- package/src/base/_properties-md.css +171 -0
- package/src/base/_properties-open.css +107 -0
- package/src/base/_properties-sm.css +171 -0
- package/src/base/_properties-starting.css +55 -0
- package/src/base/_properties-stuck.css +55 -0
- package/src/base/_properties-xl.css +171 -0
- package/src/base/_properties.css +555 -0
- package/src/base/_reset.css +67 -75
- package/src/base/_switches.css +145 -0
- package/src/base/_typography.css +437 -370
- package/src/base/_utilities-box.css +142 -0
- package/src/base/_utilities-color.css +290 -0
- package/src/base/_utilities-effects.css +235 -0
- package/src/base/_utilities-flow.css +312 -0
- package/src/base/_utilities-grid.css +143 -0
- package/src/base/_utilities-margin.css +376 -0
- package/src/base/_utilities-pseudo.css +426 -0
- package/src/base/_utilities-sizing.css +259 -0
- package/src/base/_utilities-spacing.css +190 -0
- package/src/base/_utilities-tier-2xl.css +93 -0
- package/src/base/_utilities-tier-active.css +61 -0
- package/src/base/_utilities-tier-checked.css +61 -0
- package/src/base/_utilities-tier-current.css +61 -0
- package/src/base/_utilities-tier-disabled.css +61 -0
- package/src/base/_utilities-tier-focus-visible.css +61 -0
- package/src/base/_utilities-tier-focus-within.css +61 -0
- package/src/base/_utilities-tier-hover.css +63 -0
- package/src/base/_utilities-tier-lg.css +93 -0
- package/src/base/_utilities-tier-md.css +93 -0
- package/src/base/_utilities-tier-open.css +61 -0
- package/src/base/_utilities-tier-sm.css +93 -0
- package/src/base/_utilities-tier-starting.css +35 -0
- package/src/base/_utilities-tier-stuck.css +114 -0
- package/src/base/_utilities-tier-xl.css +93 -0
- package/src/base/_utilities-typography.css +141 -0
- package/src/base/_variables.css +323 -372
- package/src/base/_view-transitions.css +10 -12
- package/src/base/command-score.d.ts.map +1 -1
- package/src/base/command-score.js +1 -2
- package/src/base/command-score.ts +1 -2
- package/src/base/dialog-lifecycle.js +1 -1
- package/src/base/dialog-lifecycle.ts +1 -1
- package/src/base/embla.d.ts +6 -7
- package/src/base/embla.d.ts.map +1 -1
- package/src/base/embla.js +89 -55
- package/src/base/embla.ts +89 -55
- package/src/base/hotkeys.d.ts +0 -5
- package/src/base/hotkeys.d.ts.map +1 -1
- package/src/base/hotkeys.ts +0 -5
- package/src/base/navigation.d.ts +12 -1
- package/src/base/navigation.d.ts.map +1 -1
- package/src/base/navigation.js +229 -86
- package/src/base/navigation.ts +224 -92
- package/src/base/reveal.js +14 -14
- package/src/base/reveal.ts +14 -14
- package/src/base/scroll-state.d.ts +21 -0
- package/src/base/scroll-state.d.ts.map +1 -0
- package/src/base/scroll-state.js +177 -0
- package/src/base/scroll-state.ts +188 -0
- package/src/base/signals.d.ts +1 -2
- package/src/base/signals.d.ts.map +1 -1
- package/src/base/signals.js +4 -6
- package/src/base/signals.ts +4 -6
- package/src/base/style-format.d.ts +33 -0
- package/src/base/style-format.d.ts.map +1 -0
- package/src/base/style-format.js +160 -0
- package/src/base/style-format.ts +180 -0
- package/src/base/typeahead.d.ts +19 -4
- package/src/base/typeahead.d.ts.map +1 -1
- package/src/base/typeahead.js +68 -21
- package/src/base/typeahead.ts +73 -23
- package/src/base/utilities.d.ts +188 -0
- package/src/base/utilities.d.ts.map +1 -0
- package/src/base/utilities.js +750 -0
- package/src/base/utilities.ts +865 -0
- package/src/base/utils.d.ts +3 -7
- package/src/base/utils.d.ts.map +1 -1
- package/src/base/utils.js +4 -8
- package/src/base/utils.ts +4 -8
- package/src/base/zazz-element.d.ts +14 -8
- package/src/base/zazz-element.d.ts.map +1 -1
- package/src/base/zazz-element.js +14 -8
- package/src/base/zazz-element.ts +15 -8
- package/src/globals.d.ts +1 -1
- package/src/head.d.ts +50 -4
- package/src/head.d.ts.map +1 -1
- package/src/head.js +119 -38
- package/src/head.ts +172 -41
- package/src/index.css +57 -14
- package/src/index.js +5 -0
- package/src/index.ts +6 -0
- package/src/manifest.d.ts +36 -5
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +150 -6
- package/src/manifest.ts +167 -9
- package/src/primitives/accordion/accordion.css +18 -17
- package/src/primitives/accordion/accordion.html +42 -9
- package/src/primitives/alert-dialog/alert-dialog.css +13 -13
- package/src/primitives/alert-dialog/alert-dialog.html +26 -12
- package/src/primitives/autocomplete/autocomplete-groups.html +64 -33
- package/src/primitives/autocomplete/autocomplete.css +43 -39
- package/src/primitives/autocomplete/autocomplete.d.ts +6 -5
- package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -1
- package/src/primitives/autocomplete/autocomplete.html +38 -26
- package/src/primitives/autocomplete/autocomplete.js +6 -5
- package/src/primitives/autocomplete/autocomplete.ts +6 -5
- package/src/primitives/avatar/avatar.html +110 -15
- package/src/primitives/badge/badge-icon.html +22 -8
- package/src/primitives/badge/badge.css +401 -128
- package/src/primitives/badge/badge.html +12 -6
- package/src/primitives/breadcrumbs/breadcrumbs.html +25 -5
- package/src/primitives/button/button-icon-only.html +17 -11
- package/src/primitives/button/button-icon.html +9 -3
- package/src/primitives/button/button.css +408 -164
- package/src/primitives/button/button.html +14 -7
- package/src/primitives/button-group/button-group-vertical.html +5 -5
- package/src/primitives/button-group/button-group.css +61 -31
- package/src/primitives/button-group/button-group.html +18 -12
- package/src/primitives/callout/callout.css +114 -0
- package/src/primitives/callout/callout.html +188 -0
- package/src/primitives/card/card-subgrid.html +249 -34
- package/src/primitives/card/card.css +125 -0
- package/src/primitives/card/card.html +141 -20
- package/src/primitives/carousel/carousel.css +30 -20
- package/src/primitives/carousel/carousel.d.ts +7 -10
- package/src/primitives/carousel/carousel.d.ts.map +1 -1
- package/src/primitives/carousel/carousel.html +420 -84
- package/src/primitives/carousel/carousel.js +1 -1
- package/src/primitives/carousel/carousel.ts +8 -11
- package/src/primitives/checkbox/checkbox-tasklist.html +6 -6
- package/src/primitives/checkbox/checkbox.css +98 -40
- package/src/primitives/checkbox/checkbox.d.ts.map +1 -1
- package/src/primitives/checkbox/checkbox.html +13 -8
- package/src/primitives/checkbox/checkbox.js +7 -9
- package/src/primitives/checkbox/checkbox.ts +7 -15
- package/src/primitives/combobox/combobox-multiselect.html +53 -33
- package/src/primitives/combobox/combobox.css +145 -122
- package/src/primitives/combobox/combobox.d.ts +12 -11
- package/src/primitives/combobox/combobox.d.ts.map +1 -1
- package/src/primitives/combobox/combobox.html +48 -28
- package/src/primitives/combobox/combobox.js +46 -51
- package/src/primitives/combobox/combobox.ts +48 -55
- package/src/primitives/command/command-actions.d.ts +2 -3
- package/src/primitives/command/command-actions.d.ts.map +1 -1
- package/src/primitives/command/command-actions.html +48 -33
- package/src/primitives/command/command-actions.js +12 -10
- package/src/primitives/command/command-actions.ts +12 -13
- package/src/primitives/command/command-dialog.html +49 -25
- package/src/primitives/command/command.css +52 -42
- package/src/primitives/command/command.d.ts +10 -7
- package/src/primitives/command/command.d.ts.map +1 -1
- package/src/primitives/command/command.html +95 -46
- package/src/primitives/command/command.js +30 -13
- package/src/primitives/command/command.ts +30 -12
- package/src/primitives/debug/audit-core.d.ts +64 -0
- package/src/primitives/debug/audit-core.d.ts.map +1 -0
- package/src/primitives/debug/audit-core.js +356 -0
- package/src/primitives/debug/audit-core.ts +535 -0
- package/src/primitives/debug/debug.d.ts +50 -0
- package/src/primitives/debug/debug.d.ts.map +1 -0
- package/src/primitives/debug/debug.js +168 -0
- package/src/primitives/debug/debug.ts +211 -0
- package/src/primitives/dialog/dialog-with-form.html +67 -45
- package/src/primitives/dialog/dialog.css +87 -61
- package/src/primitives/dialog/dialog.html +25 -17
- package/src/primitives/fields/fields.css +108 -134
- package/src/primitives/fields/fields.html +39 -0
- package/src/primitives/input/input-icon-leading.html +3 -3
- package/src/primitives/input/input-icon-trailing.html +3 -3
- package/src/primitives/input/input.css +87 -49
- package/src/primitives/input/input.html +15 -15
- package/src/primitives/input-group/input-group-password-group.html +15 -15
- package/src/primitives/input-group/input-group.css +118 -75
- package/src/primitives/input-group/input-group.html +42 -30
- package/src/primitives/kbd/kbd-group.html +15 -2
- package/src/primitives/kbd/kbd.css +44 -31
- package/src/primitives/kbd/kbd.html +7 -1
- package/src/primitives/layout/layout.css +159 -0
- package/src/primitives/layout/layout.html +35 -0
- package/src/primitives/lightbox/lightbox.css +178 -105
- package/src/primitives/lightbox/lightbox.d.ts.map +1 -1
- package/src/primitives/lightbox/lightbox.html +138 -166
- package/src/primitives/lightbox/lightbox.js +10 -13
- package/src/primitives/lightbox/lightbox.ts +12 -13
- package/src/primitives/menu/menu-interest.html +60 -18
- package/src/primitives/menu/menu.css +22 -17
- package/src/primitives/menu/menu.d.ts +5 -5
- package/src/primitives/menu/menu.html +195 -40
- package/src/primitives/menu/menu.js +8 -8
- package/src/primitives/menu/menu.ts +8 -8
- package/src/primitives/menubar/menubar-help-search.html +78 -32
- package/src/primitives/menubar/menubar.html +166 -38
- package/src/primitives/meter/meter.css +41 -38
- package/src/primitives/meter/meter.html +44 -9
- package/src/primitives/mobile-menu/mobile-menu.css +47 -40
- package/src/primitives/mobile-menu/mobile-menu.html +1460 -179
- package/src/primitives/navigation-menu/navigation-menu-featured.html +155 -33
- package/src/primitives/navigation-menu/navigation-menu-icon-grid.html +222 -47
- package/src/primitives/navigation-menu/navigation-menu-interest.html +130 -38
- package/src/primitives/navigation-menu/navigation-menu-megamenu.html +402 -72
- package/src/primitives/navigation-menu/navigation-menu-simple.html +90 -40
- package/src/primitives/navigation-menu/navigation-menu.css +104 -106
- package/src/primitives/navigation-menu/navigation-menu.html +554 -158
- package/src/primitives/otp/otp.css +43 -44
- package/src/primitives/otp/otp.d.ts +4 -5
- package/src/primitives/otp/otp.d.ts.map +1 -1
- package/src/primitives/otp/otp.html +7 -6
- package/src/primitives/otp/otp.js +13 -18
- package/src/primitives/otp/otp.ts +12 -19
- package/src/primitives/password-group/password-group.css +132 -107
- package/src/primitives/password-group/password-group.d.ts.map +1 -1
- package/src/primitives/password-group/password-group.html +23 -16
- package/src/primitives/password-group/password-group.js +11 -12
- package/src/primitives/password-group/password-group.ts +11 -12
- package/src/primitives/popover/popover.css +88 -95
- package/src/primitives/popover/popover.html +18 -0
- package/src/primitives/progress/progress-indeterminate.html +1 -1
- package/src/primitives/progress/progress.css +34 -35
- package/src/primitives/progress/progress.html +18 -4
- package/src/primitives/prose/prose.html +19 -12
- package/src/primitives/radio/radio.css +83 -46
- package/src/primitives/radio/radio.html +16 -11
- package/src/primitives/reveal/reveal.css +37 -46
- package/src/primitives/reveal/reveal.html +15 -0
- package/src/primitives/scroll-fade/scroll-fade.css +115 -0
- package/src/primitives/scroll-fade/scroll-fade.html +69 -0
- package/src/primitives/select/multiselect.d.ts +8 -10
- package/src/primitives/select/multiselect.d.ts.map +1 -1
- package/src/primitives/select/multiselect.js +23 -27
- package/src/primitives/select/multiselect.ts +23 -29
- package/src/primitives/select/select-align.html +79 -16
- package/src/primitives/select/select-multiple.html +8 -4
- package/src/primitives/select/select-sides.html +104 -21
- package/src/primitives/select/select.css +297 -186
- package/src/primitives/select/select.html +24 -5
- package/src/primitives/separator/separator.css +15 -18
- package/src/primitives/separator/separator.html +37 -10
- package/src/primitives/slider/slider.css +48 -38
- package/src/primitives/slider/slider.html +9 -1
- package/src/primitives/style-guard/style-guard.d.ts +19 -0
- package/src/primitives/style-guard/style-guard.d.ts.map +1 -0
- package/src/primitives/style-guard/style-guard.js +125 -0
- package/src/primitives/style-guard/style-guard.ts +153 -0
- package/src/primitives/switch/switch.css +42 -33
- package/src/primitives/switch/switch.html +11 -6
- package/src/primitives/table/table-alternating.html +1 -1
- package/src/primitives/table/table-grid.html +5 -5
- package/src/primitives/table/table-size-sm.html +1 -1
- package/src/primitives/table/table.css +64 -61
- package/src/primitives/table/table.html +7 -7
- package/src/primitives/tabs/tabs.css +167 -166
- package/src/primitives/tabs/tabs.d.ts +10 -11
- package/src/primitives/tabs/tabs.d.ts.map +1 -1
- package/src/primitives/tabs/tabs.html +192 -36
- package/src/primitives/tabs/tabs.js +14 -15
- package/src/primitives/tabs/tabs.ts +14 -15
- package/src/primitives/textarea/textarea.css +69 -44
- package/src/primitives/textarea/textarea.html +3 -3
- package/src/primitives/toaster/toaster.css +90 -92
- package/src/primitives/toaster/toaster.d.ts +0 -6
- package/src/primitives/toaster/toaster.d.ts.map +1 -1
- package/src/primitives/toaster/toaster.html +22 -18
- package/src/primitives/toaster/toaster.js +64 -72
- package/src/primitives/toaster/toaster.ts +71 -87
- package/src/primitives/toggle/toggle.css +368 -153
- package/src/primitives/toggle/toggle.html +27 -9
- package/src/primitives/toggle-group/toggle-group-multiple.html +3 -3
- package/src/primitives/toggle-group/toggle-group-vertical.html +4 -4
- package/src/primitives/toggle-group/toggle-group.css +76 -26
- package/src/primitives/toggle-group/toggle-group.html +3 -3
- package/src/primitives/toolbar/toolbar.html +35 -13
- package/src/primitives/tooltip/tooltip-disabled.html +3 -3
- package/src/primitives/tooltip/tooltip-sides.html +36 -14
- package/src/primitives/tooltip/tooltip-with-kbd.html +5 -5
- package/src/primitives/tooltip/tooltip.css +111 -80
- package/src/primitives/tooltip/tooltip.html +3 -3
- package/src/primitives/utilities/aspect-ratio.html +51 -7
- package/src/primitives/utilities/basis.html +64 -11
- package/src/primitives/utilities/col-span.html +65 -9
- package/src/primitives/utilities/compose.html +48 -10
- package/src/primitives/utilities/flex-align.html +89 -19
- package/src/primitives/utilities/flex-direction.html +111 -13
- package/src/primitives/utilities/flex-grow.html +41 -7
- package/src/primitives/utilities/gap.html +158 -19
- package/src/primitives/utilities/grid-cols.html +75 -7
- package/src/primitives/utilities/grid-responsive.html +111 -12
- package/src/primitives/utilities/margin-auto.html +38 -7
- package/src/primitives/utilities/object-fit.html +75 -13
- package/src/primitives/utilities/order.html +40 -4
- package/src/primitives/utilities/overflow.html +74 -20
- package/src/primitives/utilities/padding-compose.html +67 -10
- package/src/primitives/utilities/padding.html +84 -13
- package/src/primitives/utilities/pile.html +29 -0
- package/src/primitives/utilities/position.html +65 -8
- package/src/primitives/utilities/responsive-flex.html +54 -7
- package/src/primitives/utilities/responsive-grid.html +115 -12
- package/src/primitives/utilities/size.html +120 -16
- package/src/primitives/utilities/width.html +123 -16
- package/examples/about.html +0 -583
- package/examples/components.html +0 -1028
- package/examples/forms.html +0 -504
- package/examples/index.html +0 -261
- package/examples/layout.html +0 -313
- package/examples/products.html +0 -839
- package/examples/responsive.html +0 -332
- package/src/base/_layout.css +0 -571
- package/src/base/_utilities.css +0 -6758
- package/src/primitives/utilities/grid-pile.html +0 -5
|
@@ -1,83 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* select.css: Select (
|
|
2
|
+
* select.css: Select (:where([data-ui~="select"]) on customizable <select>)
|
|
3
3
|
*
|
|
4
4
|
* @layer variables, reset, components
|
|
5
|
-
* @requires
|
|
6
|
-
* @uses appearance: base-select: customizable select
|
|
5
|
+
* @requires _layers.css, _variables.css, fields.css, _reset.css, popover.css (--ui-popover-*), button.css (--ui-button-*)
|
|
6
|
+
* @uses appearance: base-select: customizable select
|
|
7
7
|
* @uses ::picker(select), ::picker-icon, selectedcontent, option::checkmark
|
|
8
8
|
* @uses @starting-style + allow-discrete: picker open animation
|
|
9
|
-
* @uses anchor-size(width): match picker width to trigger
|
|
9
|
+
* @uses anchor-size(width): match picker width to trigger
|
|
10
10
|
* @uses position-area, position-try-fallbacks: placement tokens come from
|
|
11
11
|
* popover.css's shared matrix (@supports gated)
|
|
12
|
-
* @uses backdrop-filter: picker surface blur (shared with [popover])
|
|
13
12
|
* @uses Degrades to native OS dropdown where base-select is unsupported
|
|
14
13
|
* @uses ui-multiselect (multiselect.ts): JS-projected dropdown for
|
|
15
|
-
* <select multiple
|
|
16
|
-
*
|
|
17
|
-
* the native multi listbox without JS; retire the enhancement when
|
|
18
|
-
* base-select-for-multiple ships stable.
|
|
14
|
+
* <select multiple> (base-select has no stable multi-select);
|
|
15
|
+
* degrades to the native multi listbox without JS
|
|
19
16
|
* @tokens --ui-select-* (@layer variables); picker panel reuses --ui-popover-* (owned in popover.css)
|
|
20
17
|
* @consumedby autocomplete.css, combobox.css, command.css (--ui-option-*, --ui-select-picker-icon-*)
|
|
21
18
|
*/
|
|
22
19
|
|
|
23
20
|
@layer variables {
|
|
24
21
|
:root {
|
|
25
|
-
/* Box treatment
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--ui-select-
|
|
30
|
-
|
|
31
|
-
--ui-select-
|
|
32
|
-
/* Trailing space differs from .ui-input: room for the picker icon */
|
|
33
|
-
--ui-select-padding-inline-end: var(--step-2);
|
|
22
|
+
/* Box treatment aliases the shared --ui-field-* family; remap a --ui-select-*
|
|
23
|
+
token to diverge just the select. */
|
|
24
|
+
--ui-select-w: 100%;
|
|
25
|
+
--ui-select-min-w: 16ch;
|
|
26
|
+
--ui-select-pl: var(--ui-field-px);
|
|
27
|
+
/* room for the picker icon */
|
|
28
|
+
--ui-select-pr: calc(var(--spacing) * 2);
|
|
34
29
|
--ui-select-font-size: var(--ui-field-font-size);
|
|
35
|
-
--ui-select-
|
|
30
|
+
--ui-select-leading: var(--ui-field-leading);
|
|
36
31
|
--ui-select-border-width: var(--ui-field-border-width);
|
|
37
32
|
--ui-select-border-style: var(--ui-field-border-style);
|
|
38
33
|
--ui-select-border-color: var(--ui-field-border-color);
|
|
39
|
-
--ui-select-
|
|
34
|
+
--ui-select-rounded: var(--ui-field-rounded);
|
|
40
35
|
--ui-select-option-gap: var(--ui-field-option-gap);
|
|
41
36
|
|
|
42
|
-
/* Picker icon (trigger chevron)
|
|
43
|
-
** @see https://www.svgbackgrounds.com/tools/svg-to-css/
|
|
44
|
-
** Set to Legacy / URL Wrapper to update icon */
|
|
37
|
+
/* Picker icon (trigger chevron) */
|
|
45
38
|
--ui-select-picker-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Crect width='256' height='256' fill='none'/%3E%3Cpolyline points='80 176 128 224 176 176' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3Cpolyline points='80 80 128 32 176 80' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3C/svg%3E");
|
|
46
39
|
--ui-select-picker-icon-size: var(--ui-field-icon-size);
|
|
47
40
|
--ui-select-picker-icon-color: currentColor;
|
|
48
41
|
|
|
49
|
-
/* Option (menu item): a ghost button rendered as a native <option>.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
follow. The ghost look is base button minus the surface fill + border, so
|
|
53
|
-
only --ui-option-background/--ui-option-border-color diverge. Radius bridges
|
|
54
|
-
to the shared --ui-menu-button-radius. */
|
|
42
|
+
/* Option (menu item): a ghost button rendered as a native <option>. Aliases
|
|
43
|
+
--ui-button-*; only --ui-option-bg/--ui-option-border-color diverge
|
|
44
|
+
(no fill or border). Radius bridges to --ui-menu-button-rounded. */
|
|
55
45
|
--ui-option-font-family: var(--ui-button-font-family);
|
|
56
46
|
--ui-option-font-size: var(--ui-button-font-size);
|
|
57
47
|
--ui-option-font-weight: var(--ui-button-font-weight);
|
|
58
|
-
--ui-option-
|
|
48
|
+
--ui-option-leading: var(--ui-button-leading);
|
|
59
49
|
--ui-option-gap: var(--ui-button-gap);
|
|
60
|
-
--ui-option-
|
|
61
|
-
--ui-option-
|
|
50
|
+
--ui-option-px: var(--ui-button-px);
|
|
51
|
+
--ui-option-min-h: var(--ui-button-min-h);
|
|
62
52
|
--ui-option-icon-size: var(--ui-button-icon-size);
|
|
63
|
-
--ui-option-
|
|
53
|
+
--ui-option-rounded: var(--ui-menu-button-rounded);
|
|
64
54
|
--ui-option-shadow: none;
|
|
65
55
|
|
|
66
|
-
--ui-option-
|
|
67
|
-
--ui-option-
|
|
68
|
-
--ui-option-
|
|
69
|
-
--ui-option-
|
|
70
|
-
--ui-option-
|
|
71
|
-
--ui-option-
|
|
56
|
+
--ui-option-bg: transparent;
|
|
57
|
+
--ui-option-bg--hover: var(--ui-button-bg--hover);
|
|
58
|
+
--ui-option-bg--active: var(--ui-button-bg--active);
|
|
59
|
+
--ui-option-text: var(--ui-button-text);
|
|
60
|
+
--ui-option-text--hover: var(--ui-button-text--hover);
|
|
61
|
+
--ui-option-text--active: var(--ui-button-text--active);
|
|
72
62
|
--ui-option-border-width: var(--ui-button-border-width);
|
|
73
63
|
--ui-option-border-style: var(--ui-button-border-style);
|
|
74
64
|
--ui-option-border-color: transparent;
|
|
75
65
|
--ui-option-border-color--hover: transparent;
|
|
76
66
|
--ui-option-border-color--active: transparent;
|
|
77
67
|
|
|
78
|
-
/* Option checkmark
|
|
79
|
-
** @see https://www.svgbackgrounds.com/tools/svg-to-css/
|
|
80
|
-
** Set to Legacy / URL Wrapper to update icon */
|
|
68
|
+
/* Option checkmark */
|
|
81
69
|
--ui-option-checkmark-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Crect width='256' height='256' fill='none'/%3E%3Cpolyline points='40 144 96 200 224 72' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3C/svg%3E");
|
|
82
70
|
--ui-option-checkmark-size: var(--ui-field-icon-size);
|
|
83
71
|
--ui-option-checkmark-color: currentColor;
|
|
@@ -87,21 +75,19 @@
|
|
|
87
75
|
@layer reset {
|
|
88
76
|
/* ===========================================================================
|
|
89
77
|
SELECT: native <select> internals (::picker, <option>, ::picker-icon)
|
|
90
|
-
- In the reset layer so component overrides win
|
|
91
|
-
stays in _reset.css.
|
|
78
|
+
- In the reset layer so component overrides win.
|
|
92
79
|
- Both the select and ::picker(select) need appearance: base-select before
|
|
93
|
-
picker pseudo styles apply
|
|
80
|
+
picker pseudo styles apply.
|
|
94
81
|
=========================================================================== */
|
|
95
82
|
|
|
96
|
-
:where(
|
|
97
|
-
:where(
|
|
83
|
+
:where([data-ui~="select"]),
|
|
84
|
+
:where([data-ui~="select"])::picker(select) {
|
|
98
85
|
appearance: base-select;
|
|
99
86
|
}
|
|
100
87
|
|
|
101
|
-
:where(
|
|
88
|
+
:where([data-ui~="select"])::picker(select) {
|
|
102
89
|
transform-origin: var(--ui-popover-origin);
|
|
103
90
|
opacity: var(--ui-popover-opacity--start);
|
|
104
|
-
backdrop-filter: var(--ui-popover-backdrop-filter);
|
|
105
91
|
transform: scale(var(--ui-popover-scale--start)) translate3d(var(--ui-popover-translate--start));
|
|
106
92
|
|
|
107
93
|
transition:
|
|
@@ -116,14 +102,14 @@
|
|
|
116
102
|
allow-discrete;
|
|
117
103
|
}
|
|
118
104
|
|
|
119
|
-
:where(
|
|
105
|
+
:where([data-ui~="select"]:open)::picker(select) {
|
|
120
106
|
opacity: var(--ui-popover-opacity--end);
|
|
121
107
|
transform: scale(var(--ui-popover-scale--end)) translate3d(var(--ui-popover-translate--end));
|
|
122
108
|
display: flex;
|
|
123
109
|
}
|
|
124
110
|
|
|
125
111
|
@starting-style {
|
|
126
|
-
:where(
|
|
112
|
+
:where([data-ui~="select"]:open)::picker(select) {
|
|
127
113
|
opacity: var(--ui-popover-opacity--start);
|
|
128
114
|
transform: scale(var(--ui-popover-scale--start))
|
|
129
115
|
translate3d(var(--ui-popover-translate--start));
|
|
@@ -138,7 +124,7 @@
|
|
|
138
124
|
mask: var(--ui-option-checkmark-mask) center / contain no-repeat;
|
|
139
125
|
}
|
|
140
126
|
|
|
141
|
-
:where(
|
|
127
|
+
:where([data-ui~="select"])::picker-icon {
|
|
142
128
|
content: "";
|
|
143
129
|
inline-size: var(--ui-select-picker-icon-size);
|
|
144
130
|
block-size: var(--ui-select-picker-icon-size);
|
|
@@ -147,67 +133,78 @@
|
|
|
147
133
|
}
|
|
148
134
|
}
|
|
149
135
|
|
|
150
|
-
@layer
|
|
136
|
+
@layer ui.components {
|
|
151
137
|
/* ===========================================================================
|
|
152
|
-
SELECT:
|
|
153
|
-
- appearance: base-select themes the trigger, picker, options, and arrow while
|
|
154
|
-
the browser keeps keyboard nav, top-layer rendering, and form integration.
|
|
138
|
+
SELECT: :where([data-ui~="select"]) (customizable <select>, no JS)
|
|
155
139
|
- Needs a <button><selectedcontent></selectedcontent></button> child. Degrades
|
|
156
140
|
to the native OS dropdown where unsupported (the _reset.css chevron covers it).
|
|
157
|
-
- Shares the --ui-field-* tokens defined in fields.css.
|
|
158
141
|
=========================================================================== */
|
|
159
142
|
|
|
160
|
-
|
|
143
|
+
:where([data-ui~="select"]) {
|
|
161
144
|
display: flex;
|
|
162
145
|
align-items: center;
|
|
163
146
|
justify-content: space-between;
|
|
164
147
|
gap: var(--ui-select-option-gap);
|
|
165
148
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
149
|
+
--_w-len: var(--_w-resolved, var(--ui-select-w));
|
|
150
|
+
--_w-num: var(--_w-resolved, var(--ui-select-w));
|
|
151
|
+
inline-size: calc(var(--_w-len) + var(--_w-num) * var(--spacing));
|
|
152
|
+
--_min-w-len: var(--_min-w-resolved, var(--ui-select-min-w));
|
|
153
|
+
--_min-w-num: var(--_min-w-resolved, var(--ui-select-min-w));
|
|
154
|
+
min-inline-size: calc(var(--_min-w-len) + var(--_min-w-num) * var(--spacing));
|
|
155
|
+
--_h-len: var(--_h-resolved, var(--ui-field-h));
|
|
156
|
+
--_h-num: var(--_h-resolved, var(--ui-field-h));
|
|
157
|
+
block-size: calc(var(--_h-len) + var(--_h-num) * var(--spacing));
|
|
158
|
+
--_pl-len: var(--_pl-resolved, var(--ui-select-pl));
|
|
159
|
+
--_pl-num: var(--_pl-resolved, var(--ui-select-pl));
|
|
160
|
+
padding-inline-start: calc(var(--_pl-len) + var(--_pl-num) * var(--spacing));
|
|
161
|
+
--_pr-len: var(--_pr-resolved, var(--ui-select-pr));
|
|
162
|
+
--_pr-num: var(--_pr-resolved, var(--ui-select-pr));
|
|
163
|
+
padding-inline-end: calc(var(--_pr-len) + var(--_pr-num) * var(--spacing));
|
|
164
|
+
|
|
165
|
+
font-size: var(--_font-size-resolved, var(--ui-select-font-size));
|
|
166
|
+
line-height: var(--_leading-resolved, var(--ui-select-leading));
|
|
173
167
|
text-align: start;
|
|
174
|
-
color: var(--ui-field-
|
|
175
|
-
background-color: var(--ui-field-
|
|
168
|
+
color: var(--_text-resolved, var(--ui-field-text));
|
|
169
|
+
background-color: var(--_bg-resolved, var(--ui-field-bg));
|
|
176
170
|
background-image: none;
|
|
177
171
|
|
|
178
|
-
border: var(--
|
|
179
|
-
|
|
180
|
-
border-
|
|
172
|
+
border-width: var(--_border-width-resolved, var(--ui-select-border-width));
|
|
173
|
+
border-style: var(--_border-style-resolved, var(--ui-select-border-style));
|
|
174
|
+
border-color: var(--_border-color-resolved, var(--ui-select-border-color));
|
|
175
|
+
border-radius: var(--_rounded-resolved, var(--ui-select-rounded));
|
|
181
176
|
cursor: pointer;
|
|
182
177
|
|
|
183
|
-
/*
|
|
184
|
-
in forced-colors / high-contrast modes */
|
|
178
|
+
/* the transparent outline keeps focus visible in forced-colors */
|
|
185
179
|
--_ring-offset-width: 0px;
|
|
186
180
|
--_ring-width: 0px;
|
|
187
|
-
--_ring: color-mix(in oklch, var(--ui-field-ring-color) var(--ring-opacity), transparent);
|
|
188
|
-
|
|
189
|
-
0 0 0 var(--_ring-offset-width) var(--ring-offset-color),
|
|
190
|
-
0 0 0 calc(var(--_ring-offset-width) + var(--_ring-width))
|
|
181
|
+
--_ring-fill: color-mix(in oklch, var(--ui-field-ring-color) var(--ring-opacity), transparent);
|
|
182
|
+
--_focus-ring:
|
|
183
|
+
0 0 0 var(--_ring-offset-width) var(--ring-offset-shadow-color),
|
|
184
|
+
0 0 0 calc(var(--_ring-offset-width) + var(--_ring-width))
|
|
185
|
+
var(--_ring-fill, var(--ring-shadow-color));
|
|
186
|
+
box-shadow: var(--_focus-ring, 0 0 #0000), var(--_shadow-resolved, 0 0 #0000);
|
|
191
187
|
outline: var(--outline-width) var(--outline-style) transparent;
|
|
192
188
|
outline-offset: var(--outline-offset);
|
|
193
189
|
|
|
194
190
|
transition: var(--default-transition);
|
|
195
191
|
}
|
|
196
192
|
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
@media (hover: hover) {
|
|
194
|
+
:where([data-ui~="select"]):hover {
|
|
195
|
+
border-color: var(--_border-color-resolved, var(--ui-field-border-color--hover));
|
|
196
|
+
}
|
|
199
197
|
}
|
|
200
198
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
border-color: var(--ui-field-border-color--focus);
|
|
199
|
+
/* :is() takes a forgiving list: an engine without :open keeps the focus ring */
|
|
200
|
+
:where([data-ui~="select"]):is(:focus-visible, :open) {
|
|
201
|
+
border-color: var(--_border-color-resolved, var(--ui-field-border-color--focus-within));
|
|
204
202
|
--_ring-offset-width: var(--ring-offset-width);
|
|
205
203
|
--_ring-width: var(--ring-width);
|
|
206
204
|
outline-color: transparent;
|
|
207
205
|
}
|
|
208
206
|
|
|
209
|
-
|
|
210
|
-
.ui-select > button {
|
|
207
|
+
:where([data-ui~="select"]) > button {
|
|
211
208
|
block-size: 100%;
|
|
212
209
|
display: flex;
|
|
213
210
|
flex: 1;
|
|
@@ -217,7 +214,7 @@
|
|
|
217
214
|
overflow: hidden;
|
|
218
215
|
}
|
|
219
216
|
|
|
220
|
-
|
|
217
|
+
:where([data-ui~="select"]) selectedcontent {
|
|
221
218
|
display: flex;
|
|
222
219
|
align-items: center;
|
|
223
220
|
block-size: 100%;
|
|
@@ -226,121 +223,113 @@
|
|
|
226
223
|
white-space: nowrap;
|
|
227
224
|
}
|
|
228
225
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
.ui-select selectedcontent > svg {
|
|
226
|
+
:where([data-ui~="select"]) > button > svg,
|
|
227
|
+
:where([data-ui~="select"]) selectedcontent > svg {
|
|
232
228
|
flex-shrink: 0;
|
|
233
229
|
inline-size: var(--ui-field-icon-size);
|
|
234
230
|
block-size: var(--ui-field-icon-size);
|
|
235
|
-
color: var(--muted-foreground);
|
|
231
|
+
color: var(--color-muted-foreground);
|
|
236
232
|
}
|
|
237
233
|
|
|
238
|
-
|
|
239
|
-
background-color: var(--ui-field-
|
|
234
|
+
:where([data-ui~="select"]):open {
|
|
235
|
+
background-color: var(--_bg-resolved, var(--ui-field-bg--focus-within));
|
|
240
236
|
}
|
|
241
237
|
|
|
242
|
-
|
|
238
|
+
:where([data-ui~="select"]):open::picker-icon {
|
|
243
239
|
transform: rotate(-180deg);
|
|
244
240
|
}
|
|
245
241
|
|
|
246
|
-
/*
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
Safari 26.0), and where it is missing the declaration is simply dropped, so
|
|
250
|
-
the max-content declared above stands — the panel sizes to its content
|
|
251
|
-
instead of stretching. */
|
|
252
|
-
.ui-select::picker(select) {
|
|
242
|
+
/* Where anchor-size() is missing the declaration is dropped, so the panel
|
|
243
|
+
keeps max-content sizing. */
|
|
244
|
+
:where([data-ui~="select"])::picker(select) {
|
|
253
245
|
flex-direction: column;
|
|
254
|
-
gap:
|
|
246
|
+
gap: 1px;
|
|
255
247
|
inline-size: max-content;
|
|
256
|
-
max-inline-size: var(--ui-popover-max-
|
|
257
|
-
padding: var(--ui-popover-
|
|
258
|
-
margin-block: var(--ui-popover-
|
|
248
|
+
max-inline-size: var(--ui-popover-max-w);
|
|
249
|
+
padding: var(--ui-popover-p);
|
|
250
|
+
margin-block: var(--ui-popover-my);
|
|
259
251
|
overflow: clip;
|
|
260
252
|
|
|
261
|
-
background-color: var(--popover);
|
|
262
|
-
color: var(--popover-foreground);
|
|
253
|
+
background-color: var(--color-popover);
|
|
254
|
+
color: var(--color-popover-foreground);
|
|
263
255
|
border: 1px solid var(--ui-popover-border-color);
|
|
264
|
-
border-radius: var(--ui-popover-
|
|
256
|
+
border-radius: var(--ui-popover-rounded);
|
|
265
257
|
box-shadow: var(--ui-popover-shadow);
|
|
266
258
|
}
|
|
267
259
|
|
|
268
|
-
|
|
260
|
+
:where([data-ui~="select"])::picker(select) {
|
|
269
261
|
min-inline-size: anchor-size(width);
|
|
270
262
|
}
|
|
271
263
|
|
|
272
264
|
/* ===========================================================================
|
|
273
|
-
PICKER PLACEMENT: the
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
position-area is gated on anchor support.
|
|
265
|
+
PICKER PLACEMENT: the placement tokens come from the matrix below (select
|
|
266
|
+
custom properties inherit into ::picker(select)); applying them is gated on
|
|
267
|
+
anchor support.
|
|
277
268
|
=========================================================================== */
|
|
278
269
|
|
|
279
|
-
/* The picker is implicitly anchored
|
|
280
|
-
|
|
281
|
-
browsers without it (Firefox/Safari) keep the UA picker placement instead of
|
|
282
|
-
a mispositioned box. */
|
|
270
|
+
/* The picker is implicitly anchored, so no anchor-name is needed; gated like
|
|
271
|
+
popover.css so unsupporting browsers keep the UA placement. */
|
|
283
272
|
@supports (anchor-name: --zazz) {
|
|
284
|
-
|
|
273
|
+
:where([data-ui~="select"])::picker(select) {
|
|
285
274
|
position-area: var(--ui-popover-position-area);
|
|
286
275
|
position-try-fallbacks: var(--ui-popover-position-try-fallbacks);
|
|
287
|
-
margin-inline: var(--ui-popover-
|
|
276
|
+
margin-inline: var(--ui-popover-mx);
|
|
288
277
|
}
|
|
289
278
|
}
|
|
290
279
|
|
|
291
|
-
/*
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
min-block-size + padding-inline (no block padding) so every row is uniform. */
|
|
295
|
-
.ui-select option {
|
|
280
|
+
/* Like [data-ui~="button"], sizing rides on min-block-size + padding-inline
|
|
281
|
+
(no block padding) so every row is uniform. */
|
|
282
|
+
:where([data-ui~="select"]) option {
|
|
296
283
|
display: flex;
|
|
297
284
|
align-items: center;
|
|
298
285
|
gap: var(--ui-option-gap);
|
|
299
|
-
min-block-size: var(--ui-option-
|
|
300
|
-
padding-inline: var(--ui-option-
|
|
286
|
+
min-block-size: var(--ui-option-min-h);
|
|
287
|
+
padding-inline: var(--ui-option-px);
|
|
301
288
|
|
|
302
289
|
font-family: var(--ui-option-font-family);
|
|
303
290
|
font-size: var(--ui-option-font-size);
|
|
304
291
|
font-weight: var(--ui-option-font-weight);
|
|
305
|
-
line-height: var(--ui-option-
|
|
292
|
+
line-height: var(--ui-option-leading);
|
|
306
293
|
|
|
307
|
-
color: var(--ui-option-
|
|
308
|
-
background-color: var(--ui-option-
|
|
294
|
+
color: var(--ui-option-text);
|
|
295
|
+
background-color: var(--ui-option-bg);
|
|
309
296
|
border: var(--ui-option-border-width) var(--ui-option-border-style)
|
|
310
297
|
var(--ui-option-border-color);
|
|
311
|
-
border-radius: var(--ui-option-
|
|
298
|
+
border-radius: var(--ui-option-rounded);
|
|
312
299
|
box-shadow: var(--ui-option-shadow);
|
|
313
300
|
cursor: pointer;
|
|
314
301
|
|
|
315
302
|
transition: var(--default-transition);
|
|
316
303
|
}
|
|
317
304
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
305
|
+
@media (hover: hover) {
|
|
306
|
+
:where([data-ui~="select"]) option:hover {
|
|
307
|
+
color: var(--ui-option-text--hover);
|
|
308
|
+
background-color: var(--ui-option-bg--hover);
|
|
309
|
+
border-color: var(--ui-option-border-color--hover);
|
|
310
|
+
}
|
|
322
311
|
}
|
|
323
312
|
|
|
324
|
-
|
|
325
|
-
color: var(--ui-option-
|
|
326
|
-
background-color: var(--ui-option-
|
|
313
|
+
:where([data-ui~="select"]) option:checked {
|
|
314
|
+
color: var(--ui-option-text--active);
|
|
315
|
+
background-color: var(--ui-option-bg--active);
|
|
327
316
|
border-color: var(--ui-option-border-color--active);
|
|
328
317
|
}
|
|
329
318
|
|
|
330
|
-
|
|
331
|
-
--ui-option-
|
|
319
|
+
:where([data-ui~="select"]) option:disabled {
|
|
320
|
+
--ui-option-text: var(--color-muted-foreground);
|
|
332
321
|
cursor: default;
|
|
333
322
|
opacity: 0.5;
|
|
334
323
|
}
|
|
335
324
|
|
|
336
|
-
|
|
325
|
+
:where([data-ui~="select"]) option > svg {
|
|
337
326
|
flex-shrink: 0;
|
|
338
327
|
inline-size: var(--ui-option-icon-size);
|
|
339
328
|
block-size: var(--ui-option-icon-size);
|
|
340
|
-
color: var(--muted-foreground);
|
|
329
|
+
color: var(--color-muted-foreground);
|
|
341
330
|
}
|
|
342
331
|
|
|
343
|
-
|
|
332
|
+
:where([data-ui~="select"]) option::checkmark {
|
|
344
333
|
order: 1;
|
|
345
334
|
margin-inline-start: auto;
|
|
346
335
|
color: currentcolor;
|
|
@@ -348,45 +337,46 @@
|
|
|
348
337
|
|
|
349
338
|
/* ===========================================================================
|
|
350
339
|
MULTISELECT: ui-multiselect (JS-projected dropdown over <select multiple>)
|
|
351
|
-
- The script hides the real select and stamps a
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
pickers read identically.
|
|
355
|
-
- Without JS the native multi listbox renders; it gets minimal field-family
|
|
356
|
-
dress below rather than the single-select trigger treatment.
|
|
340
|
+
- The script hides the real select and stamps a trigger plus a popover of
|
|
341
|
+
checkbox rows (see multiselect.ts).
|
|
342
|
+
- Without JS the native multi listbox renders with minimal field styling.
|
|
357
343
|
=========================================================================== */
|
|
358
344
|
|
|
359
|
-
:where(ui-multiselect) {
|
|
345
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) {
|
|
360
346
|
anchor-scope: --ui-multiselect-trigger;
|
|
361
347
|
display: block;
|
|
362
|
-
|
|
363
|
-
|
|
348
|
+
--_w-len: var(--_w-resolved, var(--ui-select-w));
|
|
349
|
+
--_w-num: var(--_w-resolved, var(--ui-select-w));
|
|
350
|
+
inline-size: calc(var(--_w-len) + var(--_w-num) * var(--spacing));
|
|
351
|
+
--_min-w-len: var(--_min-w-resolved, var(--ui-select-min-w));
|
|
352
|
+
--_min-w-num: var(--_min-w-resolved, var(--ui-select-min-w));
|
|
353
|
+
min-inline-size: calc(var(--_min-w-len) + var(--_min-w-num) * var(--spacing));
|
|
364
354
|
}
|
|
365
355
|
|
|
366
|
-
/*
|
|
367
|
-
|
|
356
|
+
/* The real select stays in the DOM as the form value carrier */
|
|
357
|
+
:where(ui-multiselect, [data-ui~="multiselect"])
|
|
358
|
+
select[multiple][data-multiselect-state~="enhanced"] {
|
|
368
359
|
display: none;
|
|
369
360
|
}
|
|
370
361
|
|
|
371
|
-
|
|
372
|
-
|
|
362
|
+
:where(ui-multiselect, [data-ui~="multiselect"])
|
|
363
|
+
select[multiple][data-ui~="select"]:not([data-multiselect-state~="enhanced"]) {
|
|
373
364
|
display: block;
|
|
374
365
|
block-size: auto;
|
|
375
|
-
padding-block: var(--
|
|
366
|
+
padding-block: var(--spacing);
|
|
376
367
|
}
|
|
377
368
|
|
|
378
|
-
[data-
|
|
369
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="trigger"] {
|
|
379
370
|
anchor-name: --ui-multiselect-trigger;
|
|
380
371
|
}
|
|
381
372
|
|
|
382
|
-
[data-
|
|
373
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="label"] {
|
|
383
374
|
overflow: hidden;
|
|
384
375
|
text-overflow: ellipsis;
|
|
385
376
|
white-space: nowrap;
|
|
386
377
|
}
|
|
387
378
|
|
|
388
|
-
|
|
389
|
-
[data-slot~="multiselect-icon"] {
|
|
379
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="icon"] {
|
|
390
380
|
flex-shrink: 0;
|
|
391
381
|
inline-size: var(--ui-select-picker-icon-size);
|
|
392
382
|
block-size: var(--ui-select-picker-icon-size);
|
|
@@ -395,70 +385,75 @@
|
|
|
395
385
|
transition: var(--default-transition);
|
|
396
386
|
}
|
|
397
387
|
|
|
398
|
-
|
|
388
|
+
:where(ui-multiselect, [data-ui~="multiselect"])
|
|
389
|
+
[data-multiselect-slot~="trigger"][aria-expanded="true"]
|
|
390
|
+
[data-multiselect-slot~="icon"] {
|
|
399
391
|
transform: rotate(-180deg);
|
|
400
392
|
}
|
|
401
393
|
|
|
402
|
-
[data-
|
|
394
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="panel"] {
|
|
403
395
|
position-anchor: --ui-multiselect-trigger;
|
|
404
|
-
/*
|
|
396
|
+
/* layout stays ungated so the close fade keeps it */
|
|
405
397
|
flex-direction: column;
|
|
406
|
-
gap:
|
|
398
|
+
gap: 1px;
|
|
407
399
|
box-shadow: var(--ui-menu-shadow);
|
|
408
400
|
}
|
|
409
401
|
|
|
410
|
-
|
|
411
|
-
[data-slot~="multiselect-panel"]:popover-open {
|
|
402
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="panel"]:popover-open {
|
|
412
403
|
display: flex;
|
|
413
404
|
}
|
|
414
405
|
|
|
415
|
-
[data-
|
|
406
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="panel"] {
|
|
416
407
|
min-inline-size: anchor-size(width);
|
|
417
408
|
}
|
|
418
409
|
|
|
419
|
-
/*
|
|
420
|
-
|
|
421
|
-
[data-slot~="multiselect-option"] {
|
|
410
|
+
/* The checkbox is real but visually replaced by the shared checkmark glyph */
|
|
411
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="option"] {
|
|
422
412
|
display: flex;
|
|
423
413
|
align-items: center;
|
|
424
414
|
gap: var(--ui-option-gap);
|
|
425
|
-
min-block-size: var(--ui-option-
|
|
426
|
-
padding-inline: var(--ui-option-
|
|
415
|
+
min-block-size: var(--ui-option-min-h);
|
|
416
|
+
padding-inline: var(--ui-option-px);
|
|
427
417
|
|
|
428
418
|
font-family: var(--ui-option-font-family);
|
|
429
419
|
font-size: var(--ui-option-font-size);
|
|
430
420
|
font-weight: var(--ui-option-font-weight);
|
|
431
|
-
line-height: var(--ui-option-
|
|
421
|
+
line-height: var(--ui-option-leading);
|
|
432
422
|
|
|
433
|
-
color: var(--ui-option-
|
|
434
|
-
background-color: var(--ui-option-
|
|
423
|
+
color: var(--ui-option-text);
|
|
424
|
+
background-color: var(--ui-option-bg);
|
|
435
425
|
border: var(--ui-option-border-width) var(--ui-option-border-style)
|
|
436
426
|
var(--ui-option-border-color);
|
|
437
|
-
border-radius: var(--ui-option-
|
|
427
|
+
border-radius: var(--ui-option-rounded);
|
|
438
428
|
cursor: pointer;
|
|
439
429
|
|
|
440
430
|
transition: var(--default-transition);
|
|
441
431
|
}
|
|
442
432
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
433
|
+
@media (hover: hover) {
|
|
434
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="option"]:hover {
|
|
435
|
+
color: var(--ui-option-text--hover);
|
|
436
|
+
background-color: var(--ui-option-bg--hover);
|
|
437
|
+
}
|
|
446
438
|
}
|
|
447
439
|
|
|
448
|
-
[data-
|
|
449
|
-
color: var(--ui-option-
|
|
450
|
-
background-color: var(--ui-option-
|
|
440
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="option"]:has(:checked) {
|
|
441
|
+
color: var(--ui-option-text--active);
|
|
442
|
+
background-color: var(--ui-option-bg--active);
|
|
451
443
|
}
|
|
452
444
|
|
|
453
|
-
[data-
|
|
454
|
-
|
|
445
|
+
:where(ui-multiselect, [data-ui~="multiselect"])
|
|
446
|
+
[data-multiselect-slot~="option"]:has(:disabled) {
|
|
447
|
+
color: var(--color-muted-foreground);
|
|
455
448
|
cursor: default;
|
|
456
449
|
opacity: 0.5;
|
|
457
450
|
}
|
|
458
451
|
|
|
459
452
|
/* The checkbox stays focusable and announced but invisible; keyboard focus
|
|
460
453
|
surfaces on the row via :focus-within */
|
|
461
|
-
[data-
|
|
454
|
+
:where(ui-multiselect, [data-ui~="multiselect"])
|
|
455
|
+
[data-multiselect-slot~="option"]
|
|
456
|
+
input[type="checkbox"] {
|
|
462
457
|
position: absolute;
|
|
463
458
|
inline-size: 1px;
|
|
464
459
|
block-size: 1px;
|
|
@@ -467,13 +462,14 @@
|
|
|
467
462
|
white-space: nowrap;
|
|
468
463
|
}
|
|
469
464
|
|
|
470
|
-
[data-
|
|
471
|
-
background-color: var(--ui-option-
|
|
472
|
-
outline: var(--outline-width) var(--outline-style) var(--ring);
|
|
465
|
+
:where(ui-multiselect, [data-ui~="multiselect"]) [data-multiselect-slot~="option"]:focus-within {
|
|
466
|
+
background-color: var(--ui-option-bg--hover);
|
|
467
|
+
outline: var(--outline-width) var(--outline-style) var(--ring-shadow-color);
|
|
473
468
|
outline-offset: calc(var(--outline-offset) * -1);
|
|
474
469
|
}
|
|
475
470
|
|
|
476
|
-
[data-
|
|
471
|
+
:where(ui-multiselect, [data-ui~="multiselect"])
|
|
472
|
+
[data-multiselect-slot~="option"]:has(:checked)::after {
|
|
477
473
|
content: "";
|
|
478
474
|
order: 1;
|
|
479
475
|
margin-inline-start: auto;
|
|
@@ -483,3 +479,118 @@
|
|
|
483
479
|
mask: var(--ui-option-checkmark-mask) center / contain no-repeat;
|
|
484
480
|
}
|
|
485
481
|
}
|
|
482
|
+
|
|
483
|
+
/* An invalid control remaps the --ui-field-* family on itself. */
|
|
484
|
+
@layer ui.components {
|
|
485
|
+
:where([data-ui~="select"]):disabled {
|
|
486
|
+
opacity: 0.5;
|
|
487
|
+
cursor: not-allowed;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
:where([data-ui~="select"]):user-invalid {
|
|
491
|
+
--ui-field-bg: color-mix(in oklch, var(--color-destructive) 5%, var(--color-input));
|
|
492
|
+
--ui-field-bg--hover: color-mix(in oklch, var(--color-destructive) 10%, var(--color-input));
|
|
493
|
+
--ui-field-border-color: var(--color-destructive);
|
|
494
|
+
--ui-field-border-color--hover: var(--color-destructive);
|
|
495
|
+
--ui-field-border-color--focus-within: var(--color-destructive);
|
|
496
|
+
--ui-field-ring-color: var(--color-destructive);
|
|
497
|
+
|
|
498
|
+
border-color: var(--color-destructive);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* Placement rows of the popover matrix for the native select, keyed on
|
|
503
|
+
data-select-side / data-select-align. */
|
|
504
|
+
@layer ui.components {
|
|
505
|
+
:where([data-ui~="select"])[data-select-side="bottom"]:not([data-select-align]),
|
|
506
|
+
:where([data-ui~="select"])[data-select-side="bottom"][data-select-align="start"],
|
|
507
|
+
:where([data-ui~="select"]:not([data-select-side]):not([data-select-align])),
|
|
508
|
+
:where([data-ui~="select"]:not([data-select-side])[data-select-align="start"]) {
|
|
509
|
+
--ui-popover-position-area: block-end span-inline-end;
|
|
510
|
+
--ui-popover-origin: top center;
|
|
511
|
+
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
512
|
+
--ui-popover-mx: 0;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
:where([data-ui~="select"])[data-select-side="bottom"][data-select-align="center"],
|
|
516
|
+
:where([data-ui~="select"]:not([data-select-side])[data-select-align="center"]) {
|
|
517
|
+
--ui-popover-position-area: block-end span-all;
|
|
518
|
+
--ui-popover-origin: top center;
|
|
519
|
+
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
520
|
+
--ui-popover-mx: 0;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
:where([data-ui~="select"])[data-select-side="bottom"][data-select-align="end"],
|
|
524
|
+
:where([data-ui~="select"]:not([data-select-side])[data-select-align="end"]) {
|
|
525
|
+
--ui-popover-position-area: block-end span-inline-start;
|
|
526
|
+
--ui-popover-origin: top center;
|
|
527
|
+
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
528
|
+
--ui-popover-mx: 0;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
:where([data-ui~="select"])[data-select-side="top"]:not([data-select-align]),
|
|
532
|
+
:where([data-ui~="select"])[data-select-side="top"][data-select-align="start"] {
|
|
533
|
+
--ui-popover-position-area: block-start span-inline-end;
|
|
534
|
+
--ui-popover-origin: bottom center;
|
|
535
|
+
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
536
|
+
--ui-popover-mx: 0;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
:where([data-ui~="select"])[data-select-side="top"][data-select-align="center"] {
|
|
540
|
+
--ui-popover-position-area: block-start span-all;
|
|
541
|
+
--ui-popover-origin: bottom center;
|
|
542
|
+
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
543
|
+
--ui-popover-mx: 0;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
:where([data-ui~="select"])[data-select-side="top"][data-select-align="end"] {
|
|
547
|
+
--ui-popover-position-area: block-start span-inline-start;
|
|
548
|
+
--ui-popover-origin: bottom center;
|
|
549
|
+
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
550
|
+
--ui-popover-mx: 0;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
:where([data-ui~="select"])[data-select-side="right"]:not([data-select-align]),
|
|
554
|
+
:where([data-ui~="select"])[data-select-side="right"][data-select-align="start"] {
|
|
555
|
+
--ui-popover-position-area: inline-end span-block-end;
|
|
556
|
+
--ui-popover-origin: bottom left;
|
|
557
|
+
--ui-popover-my: 0;
|
|
558
|
+
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
:where([data-ui~="select"])[data-select-side="right"][data-select-align="center"] {
|
|
562
|
+
--ui-popover-position-area: inline-end span-all;
|
|
563
|
+
--ui-popover-origin: center left;
|
|
564
|
+
--ui-popover-my: 0;
|
|
565
|
+
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
:where([data-ui~="select"])[data-select-side="right"][data-select-align="end"] {
|
|
569
|
+
--ui-popover-position-area: inline-end span-block-start;
|
|
570
|
+
--ui-popover-origin: top left;
|
|
571
|
+
--ui-popover-my: 0;
|
|
572
|
+
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
:where([data-ui~="select"])[data-select-side="left"]:not([data-select-align]),
|
|
576
|
+
:where([data-ui~="select"])[data-select-side="left"][data-select-align="start"] {
|
|
577
|
+
--ui-popover-position-area: inline-start span-block-end;
|
|
578
|
+
--ui-popover-origin: bottom right;
|
|
579
|
+
--ui-popover-my: 0;
|
|
580
|
+
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
:where([data-ui~="select"])[data-select-side="left"][data-select-align="center"] {
|
|
584
|
+
--ui-popover-position-area: inline-start span-all;
|
|
585
|
+
--ui-popover-origin: center right;
|
|
586
|
+
--ui-popover-my: 0;
|
|
587
|
+
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
:where([data-ui~="select"])[data-select-side="left"][data-select-align="end"] {
|
|
591
|
+
--ui-popover-position-area: inline-start span-block-start;
|
|
592
|
+
--ui-popover-origin: top right;
|
|
593
|
+
--ui-popover-my: 0;
|
|
594
|
+
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
595
|
+
}
|
|
596
|
+
}
|