luxen-ui 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/custom-elements.json +203 -170
- package/cdn/elements/combobox/combobox.d.ts +6 -1
- package/cdn/elements/combobox/combobox.d.ts.map +1 -1
- package/cdn/elements/combobox/combobox.js +19 -17
- package/cdn/elements/combobox/combobox.js.map +1 -1
- package/cdn/elements/dropdown/dropdown.d.ts +6 -7
- package/cdn/elements/dropdown/dropdown.d.ts.map +1 -1
- package/cdn/elements/dropdown/dropdown.js +2 -2
- package/cdn/elements/dropdown/dropdown.js.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.d.ts +0 -1
- package/cdn/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js +2 -2
- package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
- package/cdn/elements/dropdown-label/dropdown-label.js +1 -1
- package/cdn/elements/dropdown-label/dropdown-label.js.map +1 -1
- package/cdn/elements/form-field/form-field.d.ts +1 -1
- package/cdn/elements/form-field/form-field.js.map +1 -1
- package/cdn/elements/input/input.meta.d.ts +2 -0
- package/cdn/elements/input/input.meta.d.ts.map +1 -1
- package/cdn/elements/input-otp/input-otp.d.ts +3 -3
- package/cdn/elements/input-otp/input-otp.js.map +1 -1
- package/cdn/elements/popover/popover.d.ts +3 -4
- package/cdn/elements/popover/popover.d.ts.map +1 -1
- package/cdn/elements/popover/popover.js +1 -1
- package/cdn/elements/popover/popover.js.map +1 -1
- package/cdn/elements/select/select.d.ts +6 -1
- package/cdn/elements/select/select.d.ts.map +1 -1
- package/cdn/elements/select/select.js +8 -7
- package/cdn/elements/select/select.js.map +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
- package/cdn/elements/stories-viewer/stories-viewer.js +4 -4
- package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
- package/cdn/elements/tooltip/tooltip.d.ts +0 -1
- package/cdn/elements/tooltip/tooltip.d.ts.map +1 -1
- package/cdn/elements/tooltip/tooltip.js +1 -1
- package/cdn/elements/tooltip/tooltip.js.map +1 -1
- package/cdn/shared/controllers/listbox-nav.d.ts +15 -1
- package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/cdn/shared/controllers/listbox-nav.js +1 -1
- package/cdn/shared/controllers/listbox-nav.js.map +1 -1
- package/cdn/shared/controllers/popover.d.ts +10 -2
- package/cdn/shared/controllers/popover.d.ts.map +1 -1
- package/cdn/shared/controllers/popover.js +1 -1
- package/cdn/shared/controllers/popover.js.map +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
- package/cdn/shared/styles/menu-panel.styles.d.ts +8 -0
- package/cdn/shared/styles/menu-panel.styles.d.ts.map +1 -0
- package/cdn/shared/styles/menu-panel.styles.js +2 -0
- package/cdn/shared/styles/menu-panel.styles.js.map +1 -0
- package/cdn/shared/styles/picker-core.styles.d.ts +9 -0
- package/cdn/shared/styles/picker-core.styles.d.ts.map +1 -0
- package/cdn/shared/styles/picker-core.styles.js +2 -0
- package/cdn/shared/styles/picker-core.styles.js.map +1 -0
- package/cdn/shared/styles/select-item-suffix.styles.js +1 -1
- package/cdn/shared/styles/select-item-suffix.styles.js.map +1 -1
- package/cdn/shared/styles/select-item.styles.d.ts +8 -0
- package/cdn/shared/styles/select-item.styles.d.ts.map +1 -0
- package/cdn/shared/styles/select-item.styles.js +2 -0
- package/cdn/shared/styles/select-item.styles.js.map +1 -0
- package/cdn/shared/styles/visually-hidden.styles.d.ts +8 -0
- package/cdn/shared/styles/visually-hidden.styles.d.ts.map +1 -0
- package/cdn/shared/styles/visually-hidden.styles.js +2 -0
- package/cdn/shared/styles/visually-hidden.styles.js.map +1 -0
- package/cdn/standalone.css +365 -196
- package/cdn/standalone.js +148 -75
- package/cdn/standalone.js.map +1 -1
- package/cdn/styles/base.css +30 -20
- package/cdn/styles/elements/checkbox.css +2 -2
- package/cdn/styles/elements/form-field.css +16 -9
- package/cdn/styles/elements/input-otp.css +16 -9
- package/cdn/styles/elements/input-stepper/default.css +4 -4
- package/cdn/styles/elements/input-stepper/pill.css +4 -4
- package/cdn/styles/elements/input-stepper/rounded.css +3 -3
- package/cdn/styles/elements/input.css +82 -27
- package/cdn/styles/elements/radio.css +2 -2
- package/cdn/styles/elements/select.css +137 -80
- package/cdn/styles/elements/switch.css +3 -3
- package/cdn/styles/elements/textarea.css +5 -5
- package/cdn/styles/preset.css +92 -49
- package/cdn/styles/tokens/forms.css +33 -30
- package/cdn/styles/tokens.css +62 -29
- package/dist/css/base.css +30 -20
- package/dist/css/elements/checkbox.css +2 -2
- package/dist/css/elements/form-field.css +16 -9
- package/dist/css/elements/input-otp.css +16 -9
- package/dist/css/elements/input-stepper/default.css +4 -4
- package/dist/css/elements/input-stepper/pill.css +4 -4
- package/dist/css/elements/input-stepper/rounded.css +3 -3
- package/dist/css/elements/input.css +82 -27
- package/dist/css/elements/radio.css +2 -2
- package/dist/css/elements/select.css +137 -80
- package/dist/css/elements/switch.css +3 -3
- package/dist/css/elements/textarea.css +5 -5
- package/dist/css/preset.css +92 -49
- package/dist/css/tokens/forms.css +33 -30
- package/dist/css/tokens.css +62 -29
- package/dist/custom-elements.json +203 -170
- package/dist/elements/combobox/combobox.css +30 -187
- package/dist/elements/combobox/combobox.d.ts +6 -1
- package/dist/elements/combobox/combobox.d.ts.map +1 -1
- package/dist/elements/combobox/combobox.js +48 -20
- package/dist/elements/dropdown/dropdown.css +7 -30
- package/dist/elements/dropdown/dropdown.d.ts +6 -7
- package/dist/elements/dropdown/dropdown.d.ts.map +1 -1
- package/dist/elements/dropdown/dropdown.js +17 -14
- package/dist/elements/dropdown-item/dropdown-item.css +7 -36
- package/dist/elements/dropdown-item/dropdown-item.d.ts +0 -1
- package/dist/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/dist/elements/dropdown-item/dropdown-item.js +4 -7
- package/dist/elements/dropdown-label/dropdown-label.css +3 -3
- package/dist/elements/form-field/form-field.d.ts +1 -1
- package/dist/elements/form-field/form-field.js +2 -2
- package/dist/elements/input/input.meta.d.ts +2 -0
- package/dist/elements/input/input.meta.d.ts.map +1 -1
- package/dist/elements/input/input.meta.js +2 -0
- package/dist/elements/input-otp/input-otp.d.ts +3 -3
- package/dist/elements/input-otp/input-otp.js +3 -3
- package/dist/elements/popover/popover.css +4 -4
- package/dist/elements/popover/popover.d.ts +3 -4
- package/dist/elements/popover/popover.d.ts.map +1 -1
- package/dist/elements/popover/popover.js +5 -9
- package/dist/elements/select/select.css +24 -260
- package/dist/elements/select/select.d.ts +6 -1
- package/dist/elements/select/select.d.ts.map +1 -1
- package/dist/elements/select/select.js +27 -9
- package/dist/elements/stories-viewer/stories-viewer.css +0 -12
- package/dist/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
- package/dist/elements/stories-viewer/stories-viewer.js +4 -3
- package/dist/elements/tooltip/tooltip.d.ts +0 -1
- package/dist/elements/tooltip/tooltip.d.ts.map +1 -1
- package/dist/elements/tooltip/tooltip.js +2 -6
- package/dist/metadata/combobox.json +16 -1
- package/dist/metadata/dropdown.json +10 -10
- package/dist/metadata/form-field.json +1 -1
- package/dist/metadata/index.json +57 -22
- package/dist/metadata/input-otp.json +3 -3
- package/dist/metadata/input.json +5 -0
- package/dist/metadata/popover.json +5 -5
- package/dist/metadata/select.json +16 -1
- package/dist/shared/controllers/listbox-nav.d.ts +15 -1
- package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
- package/dist/shared/controllers/listbox-nav.js +32 -1
- package/dist/shared/controllers/popover.d.ts +10 -2
- package/dist/shared/controllers/popover.d.ts.map +1 -1
- package/dist/shared/controllers/popover.js +16 -2
- package/dist/shared/styles/checkbox-appearance.css +2 -2
- package/dist/shared/styles/menu-panel.css +37 -0
- package/dist/shared/styles/menu-panel.styles.d.ts +8 -0
- package/dist/shared/styles/menu-panel.styles.d.ts.map +1 -0
- package/dist/shared/styles/menu-panel.styles.js +8 -0
- package/dist/shared/styles/picker-core.css +250 -0
- package/dist/shared/styles/picker-core.styles.d.ts +9 -0
- package/dist/shared/styles/picker-core.styles.d.ts.map +1 -0
- package/dist/shared/styles/picker-core.styles.js +9 -0
- package/dist/shared/styles/select-item-suffix.css +4 -4
- package/dist/shared/styles/select-item.css +98 -0
- package/dist/shared/styles/select-item.styles.d.ts +8 -0
- package/dist/shared/styles/select-item.styles.d.ts.map +1 -0
- package/dist/shared/styles/select-item.styles.js +8 -0
- package/dist/shared/styles/visually-hidden.css +27 -0
- package/dist/shared/styles/visually-hidden.styles.d.ts +8 -0
- package/dist/shared/styles/visually-hidden.styles.d.ts.map +1 -0
- package/dist/shared/styles/visually-hidden.styles.js +8 -0
- package/dist/templates/elements/combobox.md +26 -1
- package/dist/templates/elements/disclosure.md +2 -0
- package/dist/templates/elements/dropdown.md +6 -6
- package/dist/templates/elements/form-field.md +2 -2
- package/dist/templates/elements/input-otp.md +3 -3
- package/dist/templates/elements/input.md +1 -0
- package/dist/templates/elements/popover.md +3 -3
- package/dist/templates/elements/select.md +30 -1
- package/package.json +1 -1
package/cdn/standalone.css
CHANGED
|
@@ -661,28 +661,38 @@ In dark mode, mixes the base color with black (default 15% black).
|
|
|
661
661
|
--dark-result: color-mix(in oklab, black var(--dark-mix), var(--base));
|
|
662
662
|
result: if(color-scheme(dark): var(--dark-result); else: var(--light-result));
|
|
663
663
|
}
|
|
664
|
+
/* `.l-visually-hidden`: shared with the shadow roots that need it. */
|
|
664
665
|
@layer base {
|
|
665
|
-
.l-visually-hidden {
|
|
666
|
-
/* Visually hide this, but keep it accessible to keyboard,
|
|
667
|
-
screen reader and other assistive technologies.
|
|
668
666
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
667
|
+
/*
|
|
668
|
+
* `.l-visually-hidden` — hides content visually while keeping it available to
|
|
669
|
+
* screen readers and other assistive technologies (a.k.a. `.sr-only`).
|
|
670
|
+
* One source for both tiers, like button-core.css:
|
|
671
|
+
* - `@import`ed (and layered) by src/css/base/_base.css, the global helper
|
|
672
|
+
* consumers use in the light DOM, and
|
|
673
|
+
* - imported `?inline` (through visually-hidden.styles.ts) into the shadow
|
|
674
|
+
* roots that need it (l-select, l-combobox, l-stories-viewer), which the
|
|
675
|
+
* global class cannot reach. Templates bind it through `cls('visually-hidden')`
|
|
676
|
+
* so a renamed prefix keeps both in sync.
|
|
677
|
+
*
|
|
678
|
+
* References:
|
|
679
|
+
* - https://www.tpgi.com/the-anatomy-of-visually-hidden/
|
|
680
|
+
* - https://youtu.be/ob_M_qXeDVE?t=677
|
|
681
|
+
*/
|
|
685
682
|
|
|
683
|
+
.l-visually-hidden {
|
|
684
|
+
position: absolute;
|
|
685
|
+
inline-size: 1px;
|
|
686
|
+
block-size: 1px;
|
|
687
|
+
margin: -1px;
|
|
688
|
+
padding: 0;
|
|
689
|
+
overflow: hidden;
|
|
690
|
+
clip-path: inset(50%);
|
|
691
|
+
white-space: nowrap;
|
|
692
|
+
border: 0;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
@layer base {
|
|
686
696
|
/* Hide Shadow-DOM overlay elements until their custom element upgrades.
|
|
687
697
|
Without this, slotted/inner content flashes inline before the upgrade. */
|
|
688
698
|
l-dialog:not(:defined),
|
|
@@ -937,7 +947,7 @@ In dark mode, mixes the base color with black (default 15% black).
|
|
|
937
947
|
--l-size-control-xl: 2.75rem;
|
|
938
948
|
}
|
|
939
949
|
|
|
940
|
-
/* Form component tokens (--l-form-control
|
|
950
|
+
/* Form component tokens (--l-form-control-*). */
|
|
941
951
|
|
|
942
952
|
/* Luxen design-tokens — form component tokens.
|
|
943
953
|
Opt-in via `@import "luxen-ui/css/tokens/forms"` (already bundled in the
|
|
@@ -946,60 +956,62 @@ In dark mode, mixes the base color with black (default 15% black).
|
|
|
946
956
|
:root {
|
|
947
957
|
/* Color of a control when activated (checked checkbox, selected radio, on switch). Form-wide accent, akin to native `accent-color`. A stable, saturated color that does not invert between light and dark, so the baked white glyph stays legible in both modes — override per brand. */
|
|
948
958
|
--l-form-control-activated-color: var(--l-color-blue-600);
|
|
949
|
-
/* Color of the
|
|
959
|
+
/* Color of the switch thumb on the activated (on) track. Pairs with the stable accent. The checkbox checkmark and the radio dot do not read it: they are baked-white SVGs (background-image cannot take a color), so on a light accent swap them through the elements' `--checkmark` / `--dot` properties. */
|
|
950
960
|
--l-form-control-activated-content-color: var(--l-color-white);
|
|
951
|
-
/*
|
|
961
|
+
/* Background of every form control at rest: text fields (input, textarea, select) and the box of an unchecked checkbox or radio. */
|
|
952
962
|
--l-form-control-background-color: var(--l-color-surface);
|
|
953
963
|
/* Color of the user-entered value text. */
|
|
954
964
|
--l-form-control-value-color: var(--l-color-text-primary);
|
|
955
965
|
/* Placeholder text color. */
|
|
956
966
|
--l-form-control-placeholder-color: var(--l-color-text-tertiary);
|
|
957
|
-
/*
|
|
967
|
+
/* Border color of every form control at rest: text fields and the box of a checkbox or radio. */
|
|
958
968
|
--l-form-control-border-color: var(--l-color-border);
|
|
959
|
-
/*
|
|
969
|
+
/* Border width of text fields and of the checkbox and radio box. */
|
|
960
970
|
--l-form-control-border-width: 1px;
|
|
961
|
-
/*
|
|
971
|
+
/* Corner radius of text fields (input, textarea, select, input group). Toggles keep their own shape. */
|
|
962
972
|
--l-form-control-border-radius: var(--l-radius-md);
|
|
963
|
-
/*
|
|
973
|
+
/* Border color of a hovered form control (text fields, checkbox, radio). Also tints the hover halo of an unchecked checkbox or radio. */
|
|
964
974
|
--l-form-control-border-color-hover: var(--l-color-text-tertiary);
|
|
965
|
-
/*
|
|
975
|
+
/* Border color of an invalid form control (text fields, checkbox, radio), and the ring around an invalid switch. */
|
|
966
976
|
--l-form-control-border-color-invalid: var(--l-color-bg-fill-danger-strong);
|
|
967
|
-
/* Background of a disabled
|
|
968
|
-
--l-form-control-disabled
|
|
969
|
-
/* Border color of a disabled text
|
|
970
|
-
--l-form-control-disabled
|
|
971
|
-
/*
|
|
972
|
-
--l-form-control-
|
|
973
|
-
/* Mark on a disabled control that greys out through tokens rather than fading — currently the switch's thumb when it is off and disabled, sitting on the pale --l-form-control-disabled
|
|
974
|
-
--l-form-control-
|
|
977
|
+
/* Background of a disabled form control: text fields, the box of an unchecked checkbox or radio, and the track of an off switch — a faint ink wash (reinforces non-interactivity, instead of fading the whole control with opacity). Translucent rather than a solid grey so it composites onto whatever sits behind: a disabled field reads the same on a card, an alert, or a dialog, where an opaque fill would show as a mismatched patch. On the default surface it lands within a step of the former solid --l-color-bg-disabled, in both light and dark. */
|
|
978
|
+
--l-form-control-background-color-disabled: color-mix(in oklab, var(--l-color-text-primary) 6%, transparent);
|
|
979
|
+
/* Border color of a disabled form control: text fields and the box of an unchecked checkbox or radio. Translucent for the same reason as --l-form-control-background-color-disabled, and derived from the same ink so fill and border stay in step under any theme. 20% is the alpha that reproduces the former solid --l-color-border-disabled on the default surface in both modes; 25% (the CSSWG default-UA proposal) drifts bright enough in dark mode to read as an enabled border. */
|
|
980
|
+
--l-form-control-border-color-disabled: color-mix(in oklab, var(--l-color-text-primary) 20%, transparent);
|
|
981
|
+
/* Text color of a disabled control and of its field: the value and placeholder, plus the label, hint and required indicator of a disabled `l-form-field` (and the legend and labels of a `fieldset:disabled`). Deliberately opaque, unlike the fill and border: text is the one layer that must not composite. An ink-derived alpha assumes the backdrop luminance matches the color scheme, so on a dark card in light mode a translucent value would fade dark-on-dark to nothing — a solid grey stays legible either way. */
|
|
982
|
+
--l-form-control-text-color-disabled: var(--l-color-text-disabled);
|
|
983
|
+
/* Mark on a disabled control that greys out through tokens rather than fading — currently the switch's thumb when it is off and disabled, sitting on the pale --l-form-control-background-color-disabled. A mid grey that holds in both light and dark, so the mark keeps past 3:1 against that fill either way; the lighter --l-form-control-text-color-disabled would drop below it. Decoupled from text tokens for the same reason as --l-form-control-track-color-off. Activated controls (checked checkbox, selected radio, on switch) do not use this — they fade instead, keeping their accent tint. */
|
|
984
|
+
--l-form-control-mark-color-disabled: var(--l-color-gray-500);
|
|
975
985
|
/* Box size of toggle controls (checkbox, radio, switch). Relative to font size so it scales with the label. */
|
|
976
986
|
--l-form-control-toggle-size: 1.25em;
|
|
977
987
|
/* Thickness of the hover halo ring on toggle controls (checkbox, radio, switch), as a fraction of the toggle size. Single source for the shared toggle hover language. */
|
|
978
988
|
--l-form-control-toggle-halo-ratio: 0.22;
|
|
979
989
|
/* Off-state track fill of the switch. A mid grey that holds in both light and dark so the white thumb keeps ~5:1 contrast either way — decoupled from text tokens so re-theming body text never moves the track. */
|
|
980
|
-
--l-form-control-track-off
|
|
981
|
-
/* Height of text
|
|
990
|
+
--l-form-control-track-color-off: var(--l-color-gray-500);
|
|
991
|
+
/* Height of text fields (input, textarea, select, input group, l-select, l-combobox). Checkbox, radio and switch are sized by --l-form-control-toggle-size instead. */
|
|
982
992
|
--l-form-control-height: var(--l-size-control-md);
|
|
983
|
-
/* Horizontal padding of text
|
|
993
|
+
/* Horizontal padding of text fields (input, textarea, select, input group). */
|
|
984
994
|
--l-form-control-padding-inline: var(--l-spacing-3);
|
|
985
|
-
/*
|
|
995
|
+
/* Glyph size of the actions and indicators at the end of a text control: the clear (×) and the chevron of l-select / l-combobox, the chevron of the native `.l-select`, the native search clear and date/time picker icon of an input, and the password toggle of l-input-group. Only the glyph — each action's hit area follows the control height. Relative to font size by default; set a length to enlarge the glyphs on taller controls. */
|
|
996
|
+
--l-form-control-icon-size: 1em;
|
|
997
|
+
/* Color of an `l-form-field` label (and of a radio group legend). */
|
|
986
998
|
--l-form-control-label-color: var(--l-color-text-primary);
|
|
987
|
-
/*
|
|
999
|
+
/* Color of the helper text below a control (`.l-hint`). */
|
|
988
1000
|
--l-form-control-hint-color: var(--l-color-text-secondary);
|
|
989
|
-
/*
|
|
990
|
-
--l-form-control-error-color: var(--l-color-text-danger);
|
|
991
|
-
/*
|
|
1001
|
+
/* Color of the error message text (`.l-error`) shown when the field is invalid. The message only — the invalid border is --l-form-control-border-color-invalid. */
|
|
1002
|
+
--l-form-control-error-message-color: var(--l-color-text-danger);
|
|
1003
|
+
/* Indicator appended to the label of a required field, as a CSS `content` value: a symbol (the default asterisk) or text, e.g. `" (required)"`. */
|
|
992
1004
|
--l-form-control-required-content: '*';
|
|
993
|
-
/* Color of the required
|
|
1005
|
+
/* Color of the required indicator (--l-form-control-required-content). */
|
|
994
1006
|
--l-form-control-required-color: var(--l-color-text-danger);
|
|
1007
|
+
/* Space between the parts inside one `l-form-field`: label, control, hint and error, stacked vertically (in an inline field, between the label and its messages). Tight, so the label and helper text sit close to the control. Not the space between two fields — the form layout owns that. */
|
|
1008
|
+
--l-form-control-label-gap: var(--l-spacing-1);
|
|
1009
|
+
/* Horizontal space between a toggle control (checkbox, radio, switch) and its label in an inline `l-form-field`. */
|
|
1010
|
+
--l-form-control-choice-label-gap: var(--l-spacing-2);
|
|
995
1011
|
/* Background of the `<mark>` wrapping the part of an option that matches the search query, in the listbox of `l-combobox` and searchable `l-select` (plain label, or a rich option's title and description). A soft marker tint, light enough to keep the option text readable on a hovered or active row. Setting it to `transparent` leaves only --l-form-control-match-font-weight to mark the match — pick a weight above the option text's then, since a rich `l-select` title is already semibold. */
|
|
996
1012
|
--l-form-control-match-background-color: light-dark(var(--l-color-yellow-100), var(--l-color-yellow-900));
|
|
997
1013
|
/* Font weight of the search-query match in `l-combobox` and searchable `l-select` options. Pairs with --l-form-control-match-background-color; set to `inherit` to mark the match with the background alone. */
|
|
998
1014
|
--l-form-control-match-font-weight: var(--l-font-weight-semibold);
|
|
999
|
-
/* Vertical gap between label, control, and messages in a stacked field. Tight, so the label and helper text sit close to the control. */
|
|
1000
|
-
--l-form-field-gap: var(--l-spacing-1);
|
|
1001
|
-
/* Horizontal gap between a toggle control and its label in an inline field. */
|
|
1002
|
-
--l-form-field-choice-gap: var(--l-spacing-2);
|
|
1003
1015
|
}
|
|
1004
1016
|
|
|
1005
1017
|
/* Tooltip component token (--l-tooltip-background-color). */
|
|
@@ -1014,6 +1026,37 @@ In dark mode, mixes the base color with black (default 15% black).
|
|
|
1014
1026
|
--l-tooltip-background-color: light-dark(var(--l-color-gray-900), var(--l-color-gray-50));
|
|
1015
1027
|
}
|
|
1016
1028
|
|
|
1029
|
+
/* Popover and menu-item tokens (--l-popover-*, --l-menu-item-*): panels
|
|
1030
|
+
anchored to a trigger and their rows. */
|
|
1031
|
+
|
|
1032
|
+
/* Luxen design-tokens — popover and menu-item component tokens.
|
|
1033
|
+
Bundled in the Luxen preset via `luxen-ui/css/tokens`. Geometry and type of
|
|
1034
|
+
the panels anchored to a trigger (dropdown, popover, listbox, select picker)
|
|
1035
|
+
and of the rows inside them. */
|
|
1036
|
+
|
|
1037
|
+
:root {
|
|
1038
|
+
/* Corner radius of a panel anchored to a trigger (dropdown menu, popover, listbox, select picker). Each element still exposes its own `--border-radius` knob for a one-off override. Not for dialogs or drawers. */
|
|
1039
|
+
--l-popover-border-radius: var(--l-radius-md);
|
|
1040
|
+
/* Inset between a menu or listbox panel's border and its rows. Also the vertical margin of an `<hr>` separator, which bleeds through it to the panel edges. Not applied to `l-popover`, whose content brings its own spacing. */
|
|
1041
|
+
--l-popover-padding: var(--l-spacing-1);
|
|
1042
|
+
/* Elevation of a panel anchored to a trigger. Aliases --l-shadow-md so popovers can be re-elevated without moving every medium shadow. Modal surfaces use their own, higher elevation. */
|
|
1043
|
+
--l-popover-shadow: var(--l-shadow-md);
|
|
1044
|
+
/* Text size inside an anchored panel — menu items, listbox options, popover body. */
|
|
1045
|
+
--l-popover-font-size: var(--l-text-sm);
|
|
1046
|
+
/* Line height inside an anchored panel. Pairs with --l-popover-font-size; a row's first line box (font-size × line-height) is what checkmarks and suffixes centre on. */
|
|
1047
|
+
--l-popover-line-height: 1.5;
|
|
1048
|
+
/* Minimum height of a row in a menu or listbox — `l-dropdown-item`, `l-select` / `l-combobox` options, native `.l-select` options (36px). A comfortable pointer and touch target, well above the WCAG 2.5.8 24px floor. Rich rows (description, media) grow past it. */
|
|
1049
|
+
--l-menu-item-min-height: 2.25rem;
|
|
1050
|
+
/* Vertical padding of a menu item or listbox option. Select rows never go below it, and centre a single line on --l-menu-item-min-height. */
|
|
1051
|
+
--l-menu-item-padding-block: var(--l-spacing-1_5);
|
|
1052
|
+
/* Horizontal padding of a menu item or listbox option. Section labels (`l-dropdown-label`) use it too, so they line up with the rows below them. */
|
|
1053
|
+
--l-menu-item-padding-inline: var(--l-spacing-2);
|
|
1054
|
+
/* Gap between the parts of a menu item or option — check, icon, label, suffix. */
|
|
1055
|
+
--l-menu-item-gap: var(--l-spacing-2);
|
|
1056
|
+
/* Corner radius of a row's hover / active tint, inset inside the popover's own radius. */
|
|
1057
|
+
--l-menu-item-border-radius: var(--l-radius-sm);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1017
1060
|
/* alert.css */
|
|
1018
1061
|
@layer components {
|
|
1019
1062
|
/*
|
|
@@ -1988,8 +2031,8 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
1988
2031
|
checkbox and an input in the same disabled form grey out identically.
|
|
1989
2032
|
There is no mark here — only a box — so nothing can be washed out. */
|
|
1990
2033
|
&:disabled:not(:checked, :indeterminate) {
|
|
1991
|
-
border-color: var(--l-form-control-disabled
|
|
1992
|
-
background-color: var(--l-form-control-disabled
|
|
2034
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
2035
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
1993
2036
|
}
|
|
1994
2037
|
|
|
1995
2038
|
/* Checked: faded rather than greyed. A solid neutral fill keeps the glyph
|
|
@@ -2508,7 +2551,14 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2508
2551
|
@layer components {
|
|
2509
2552
|
l-form-field {
|
|
2510
2553
|
display: grid;
|
|
2511
|
-
|
|
2554
|
+
/* One column as wide as the field, never wider. An implicit `auto` column
|
|
2555
|
+
grows to the control's min-content, which for a select is its longest
|
|
2556
|
+
value kept on one line (native `select`, `l-select`): the field — and an
|
|
2557
|
+
`auto` grid track around it — then overflows its container instead of
|
|
2558
|
+
truncating the value. Max-content sizing is unchanged, so a field in a
|
|
2559
|
+
shrink-to-fit context still grows to fit its control. */
|
|
2560
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2561
|
+
gap: var(--l-form-control-label-gap);
|
|
2512
2562
|
/* Controls size to their content; text controls (`.l-input`, `.l-textarea`)
|
|
2513
2563
|
opt into full width via their own CSS — the field never forces width. */
|
|
2514
2564
|
justify-items: start;
|
|
@@ -2519,7 +2569,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2519
2569
|
font-weight: var(--l-font-weight-medium);
|
|
2520
2570
|
}
|
|
2521
2571
|
|
|
2522
|
-
/* Required
|
|
2572
|
+
/* Required indicator on the label. */
|
|
2523
2573
|
&[required] > label::after {
|
|
2524
2574
|
content: var(--l-form-control-required-content);
|
|
2525
2575
|
margin-inline-start: 0.25ch;
|
|
@@ -2530,7 +2580,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2530
2580
|
control on the left, label on the right, messages below the label. */
|
|
2531
2581
|
&[layout='inline'] {
|
|
2532
2582
|
grid-template-columns: auto 1fr;
|
|
2533
|
-
column-gap: var(--l-form-
|
|
2583
|
+
column-gap: var(--l-form-control-choice-label-gap);
|
|
2534
2584
|
align-items: center;
|
|
2535
2585
|
|
|
2536
2586
|
& > :is(input, select, textarea) {
|
|
@@ -2550,7 +2600,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2550
2600
|
}
|
|
2551
2601
|
}
|
|
2552
2602
|
|
|
2553
|
-
/* A disabled control takes its label, hint and required
|
|
2603
|
+
/* A disabled control takes its label, hint and required indicator with it —
|
|
2554
2604
|
otherwise a greyed-out control sits under a full-strength label and the
|
|
2555
2605
|
field still reads as available. Greying the label alone would invert the
|
|
2556
2606
|
hierarchy: `.l-hint` is `text-secondary`, darker than the disabled ink, so
|
|
@@ -2565,13 +2615,13 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2565
2615
|
l-form-field:has(> [disabled]) {
|
|
2566
2616
|
& > label,
|
|
2567
2617
|
& > .l-hint {
|
|
2568
|
-
color: var(--l-form-control-
|
|
2618
|
+
color: var(--l-form-control-text-color-disabled);
|
|
2569
2619
|
}
|
|
2570
2620
|
|
|
2571
|
-
/* The
|
|
2621
|
+
/* The indicator is decorative once nothing can be submitted; a red asterisk on
|
|
2572
2622
|
an inert field reads as an unmet requirement the user could act on. */
|
|
2573
2623
|
&[required] > label::after {
|
|
2574
|
-
color: var(--l-form-control-
|
|
2624
|
+
color: var(--l-form-control-text-color-disabled);
|
|
2575
2625
|
}
|
|
2576
2626
|
|
|
2577
2627
|
/* Undo the inline layout's `cursor: pointer` — clicking the label would
|
|
@@ -2592,7 +2642,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2592
2642
|
fieldset:disabled {
|
|
2593
2643
|
& :is(legend, label),
|
|
2594
2644
|
& .l-hint {
|
|
2595
|
-
color: var(--l-form-control-
|
|
2645
|
+
color: var(--l-form-control-text-color-disabled);
|
|
2596
2646
|
}
|
|
2597
2647
|
|
|
2598
2648
|
& label {
|
|
@@ -2610,7 +2660,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2610
2660
|
.l-error {
|
|
2611
2661
|
display: block;
|
|
2612
2662
|
margin: 0;
|
|
2613
|
-
color: var(--l-form-control-error-color);
|
|
2663
|
+
color: var(--l-form-control-error-message-color);
|
|
2614
2664
|
font-size: var(--l-text-sm);
|
|
2615
2665
|
}
|
|
2616
2666
|
|
|
@@ -2673,9 +2723,16 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2673
2723
|
:scope {
|
|
2674
2724
|
--digits: 6;
|
|
2675
2725
|
--cell-size: 2.75rem;
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
--cell-
|
|
2726
|
+
/* Built from the shared text-field tokens, so a themed form restyles its
|
|
2727
|
+
OTP cells too. The fill keeps its faint ink tint over the field color. */
|
|
2728
|
+
--cell-bg-color: color-mix(
|
|
2729
|
+
in oklab,
|
|
2730
|
+
var(--l-color-text-primary) 4%,
|
|
2731
|
+
var(--l-form-control-background-color)
|
|
2732
|
+
);
|
|
2733
|
+
--cell-border-color: var(--l-form-control-border-color);
|
|
2734
|
+
/* Same corners as the other text fields, so a themed form rounds its cells too. */
|
|
2735
|
+
--cell-border-radius: var(--l-form-control-border-radius);
|
|
2679
2736
|
--cell-focus-color: var(--l-focus-ring);
|
|
2680
2737
|
--cell-focus-ring: 0 0 0 1px var(--cell-focus-color);
|
|
2681
2738
|
--_cell-font:
|
|
@@ -2711,14 +2768,14 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2711
2768
|
justify-content: center;
|
|
2712
2769
|
inline-size: var(--cell-size);
|
|
2713
2770
|
block-size: var(--cell-size);
|
|
2714
|
-
border:
|
|
2771
|
+
border: var(--l-form-control-border-width) solid var(--cell-border-color);
|
|
2715
2772
|
border-radius: var(--cell-border-radius);
|
|
2716
2773
|
background: var(--cell-bg-color);
|
|
2717
2774
|
font-family: var(--_cell-font);
|
|
2718
2775
|
font-size: calc(var(--cell-size) * 0.45);
|
|
2719
2776
|
font-variant-numeric: tabular-nums;
|
|
2720
2777
|
line-height: 1;
|
|
2721
|
-
color: var(--l-
|
|
2778
|
+
color: var(--l-form-control-value-color);
|
|
2722
2779
|
transition:
|
|
2723
2780
|
border-color 150ms ease,
|
|
2724
2781
|
box-shadow 150ms ease;
|
|
@@ -2822,10 +2879,10 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2822
2879
|
top of the disabled ink, diluting the token to 40% of its calibrated
|
|
2823
2880
|
value and washing the border out with it. */
|
|
2824
2881
|
:scope:has(input:disabled) .l-input-otp-cell {
|
|
2825
|
-
--cell-bg-color: var(--l-form-control-disabled
|
|
2826
|
-
--cell-border-color: var(--l-form-control-disabled
|
|
2882
|
+
--cell-bg-color: var(--l-form-control-background-color-disabled);
|
|
2883
|
+
--cell-border-color: var(--l-form-control-border-color-disabled);
|
|
2827
2884
|
cursor: not-allowed;
|
|
2828
|
-
color: var(--l-form-control-
|
|
2885
|
+
color: var(--l-form-control-text-color-disabled);
|
|
2829
2886
|
}
|
|
2830
2887
|
|
|
2831
2888
|
/*
|
|
@@ -2855,7 +2912,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
2855
2912
|
border: 0;
|
|
2856
2913
|
border-radius: var(--cell-border-radius);
|
|
2857
2914
|
background: var(--cell-bg-color);
|
|
2858
|
-
color: var(--l-
|
|
2915
|
+
color: var(--l-form-control-value-color);
|
|
2859
2916
|
font-family: var(--_cell-font);
|
|
2860
2917
|
font-size: calc(var(--cell-size) * 0.45);
|
|
2861
2918
|
font-variant-numeric: tabular-nums;
|
|
@@ -3007,7 +3064,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3007
3064
|
sets on this same state. Matches `input:disabled` below. */
|
|
3008
3065
|
button:disabled {
|
|
3009
3066
|
cursor: not-allowed;
|
|
3010
|
-
color: var(--l-form-control-
|
|
3067
|
+
color: var(--l-form-control-text-color-disabled);
|
|
3011
3068
|
}
|
|
3012
3069
|
|
|
3013
3070
|
@media (hover: hover) {
|
|
@@ -3066,7 +3123,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3066
3123
|
paints — the form-control fill in `default`, nothing at all in `rounded` —
|
|
3067
3124
|
shows through untouched. A fill here would composite a second time over the
|
|
3068
3125
|
host's own and read as a tinted rectangle over the value area wherever either
|
|
3069
|
-
one is translucent, e.g. --l-form-control-disabled
|
|
3126
|
+
one is translucent, e.g. --l-form-control-background-color-disabled. */
|
|
3070
3127
|
.l-input-stepper-track-display {
|
|
3071
3128
|
position: absolute;
|
|
3072
3129
|
inset: 0;
|
|
@@ -3153,8 +3210,8 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3153
3210
|
/* Uses the form-control disabled tokens, not the generic aliases: a stepper
|
|
3154
3211
|
is a text control and must grey out identically to the input next to it. */
|
|
3155
3212
|
:scope:has(input:disabled) {
|
|
3156
|
-
border-color: var(--l-form-control-disabled
|
|
3157
|
-
background-color: var(--l-form-control-disabled
|
|
3213
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
3214
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
3158
3215
|
}
|
|
3159
3216
|
}
|
|
3160
3217
|
|
|
@@ -3300,7 +3357,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3300
3357
|
sets on this same state. Matches `input:disabled` below. */
|
|
3301
3358
|
button:disabled {
|
|
3302
3359
|
cursor: not-allowed;
|
|
3303
|
-
color: var(--l-form-control-
|
|
3360
|
+
color: var(--l-form-control-text-color-disabled);
|
|
3304
3361
|
}
|
|
3305
3362
|
|
|
3306
3363
|
@media (hover: hover) {
|
|
@@ -3359,7 +3416,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3359
3416
|
paints — the form-control fill in `default`, nothing at all in `rounded` —
|
|
3360
3417
|
shows through untouched. A fill here would composite a second time over the
|
|
3361
3418
|
host's own and read as a tinted rectangle over the value area wherever either
|
|
3362
|
-
one is translucent, e.g. --l-form-control-disabled
|
|
3419
|
+
one is translucent, e.g. --l-form-control-background-color-disabled. */
|
|
3363
3420
|
.l-input-stepper-track-display {
|
|
3364
3421
|
position: absolute;
|
|
3365
3422
|
inset: 0;
|
|
@@ -3572,7 +3629,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3572
3629
|
box-shadow: none;
|
|
3573
3630
|
}
|
|
3574
3631
|
|
|
3575
|
-
/* Deliberately *not* the --l-form-control
|
|
3632
|
+
/* Deliberately *not* the --l-form-control-*-disabled tokens the `default`
|
|
3576
3633
|
appearance greys out with: those are translucent, and this capsule needs
|
|
3577
3634
|
one flat colour rather than a tint laid over whatever it happens to sit
|
|
3578
3635
|
on. Soft lands between the page and the enabled fill in both modes —
|
|
@@ -3588,7 +3645,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3588
3645
|
one. */
|
|
3589
3646
|
:scope:has(input:disabled)[appearance='pill'] {
|
|
3590
3647
|
--_fill: var(--l-color-bg-fill-neutral-soft);
|
|
3591
|
-
--border-color: var(--l-form-control-disabled
|
|
3648
|
+
--border-color: var(--l-form-control-border-color-disabled);
|
|
3592
3649
|
}
|
|
3593
3650
|
}
|
|
3594
3651
|
}
|
|
@@ -3722,7 +3779,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3722
3779
|
sets on this same state. Matches `input:disabled` below. */
|
|
3723
3780
|
button:disabled {
|
|
3724
3781
|
cursor: not-allowed;
|
|
3725
|
-
color: var(--l-form-control-
|
|
3782
|
+
color: var(--l-form-control-text-color-disabled);
|
|
3726
3783
|
}
|
|
3727
3784
|
|
|
3728
3785
|
@media (hover: hover) {
|
|
@@ -3781,7 +3838,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3781
3838
|
paints — the form-control fill in `default`, nothing at all in `rounded` —
|
|
3782
3839
|
shows through untouched. A fill here would composite a second time over the
|
|
3783
3840
|
host's own and read as a tinted rectangle over the value area wherever either
|
|
3784
|
-
one is translucent, e.g. --l-form-control-disabled
|
|
3841
|
+
one is translucent, e.g. --l-form-control-background-color-disabled. */
|
|
3785
3842
|
.l-input-stepper-track-display {
|
|
3786
3843
|
position: absolute;
|
|
3787
3844
|
inset: 0;
|
|
@@ -3906,7 +3963,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3906
3963
|
}
|
|
3907
3964
|
|
|
3908
3965
|
:scope button:disabled {
|
|
3909
|
-
border-color: var(--l-form-control-disabled
|
|
3966
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
3910
3967
|
}
|
|
3911
3968
|
}
|
|
3912
3969
|
}
|
|
@@ -3955,6 +4012,10 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
3955
4012
|
/* Public knobs */
|
|
3956
4013
|
--height: var(--l-form-control-height);
|
|
3957
4014
|
--border-radius: var(--l-form-control-border-radius);
|
|
4015
|
+
/* The native end actions (date/time picker, search clear) each take a
|
|
4016
|
+
square as tall as the field inside its borders — same box as the
|
|
4017
|
+
l-select / l-combobox chevron and clear. */
|
|
4018
|
+
--_action-size: calc(var(--height) - 2 * var(--l-form-control-border-width));
|
|
3958
4019
|
/* https://lucide.dev/icons/calendar */
|
|
3959
4020
|
--calendar-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/></svg>');
|
|
3960
4021
|
/* https://lucide.dev/icons/clock */
|
|
@@ -4019,14 +4080,14 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4019
4080
|
forced grey on disabled inputs so the token color actually applies. */
|
|
4020
4081
|
&:disabled {
|
|
4021
4082
|
cursor: not-allowed;
|
|
4022
|
-
border-color: var(--l-form-control-disabled
|
|
4023
|
-
background-color: var(--l-form-control-disabled
|
|
4024
|
-
color: var(--l-form-control-
|
|
4025
|
-
-webkit-text-fill-color: var(--l-form-control-
|
|
4083
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
4084
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
4085
|
+
color: var(--l-form-control-text-color-disabled);
|
|
4086
|
+
-webkit-text-fill-color: var(--l-form-control-text-color-disabled);
|
|
4026
4087
|
}
|
|
4027
4088
|
|
|
4028
4089
|
&:disabled::placeholder {
|
|
4029
|
-
color: var(--l-form-control-
|
|
4090
|
+
color: var(--l-form-control-text-color-disabled);
|
|
4030
4091
|
}
|
|
4031
4092
|
}
|
|
4032
4093
|
|
|
@@ -4078,16 +4139,24 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4078
4139
|
.l-input,
|
|
4079
4140
|
:where(l-form-field:not([unstyled]), l-input-group) > input
|
|
4080
4141
|
)::-webkit-calendar-picker-indicator {
|
|
4081
|
-
|
|
4082
|
-
|
|
4142
|
+
/* Same end-action box as the l-select / l-combobox chevron and clear: a
|
|
4143
|
+
square as tall as the field inside its borders, bleeding over the end
|
|
4144
|
+
padding so it sits flush against the border. Its hit area follows
|
|
4145
|
+
`--height`; only the glyph is masked down to
|
|
4146
|
+
`--l-form-control-icon-size` (default 1em, the size of an `<l-icon>`
|
|
4147
|
+
affix). The mask covers the whole box, so a native indicator gets a
|
|
4148
|
+
color change on hover but no wash. */
|
|
4149
|
+
box-sizing: border-box;
|
|
4150
|
+
inline-size: var(--_action-size);
|
|
4151
|
+
block-size: var(--_action-size);
|
|
4152
|
+
margin: 0;
|
|
4153
|
+
margin-inline-end: calc(var(--l-form-control-padding-inline) * -1);
|
|
4083
4154
|
padding: 0;
|
|
4084
4155
|
color: var(--l-form-control-placeholder-color);
|
|
4085
4156
|
background-color: currentColor;
|
|
4086
4157
|
background-image: none;
|
|
4087
4158
|
cursor: pointer;
|
|
4088
|
-
|
|
4089
|
-
the glyph the same visual size as a 1em `<l-icon>` affix. */
|
|
4090
|
-
mask: var(--calendar-icon) center / 1em no-repeat;
|
|
4159
|
+
mask: var(--calendar-icon) center / var(--l-form-control-icon-size) no-repeat;
|
|
4091
4160
|
}
|
|
4092
4161
|
|
|
4093
4162
|
:is(
|
|
@@ -4125,25 +4194,30 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4125
4194
|
}
|
|
4126
4195
|
|
|
4127
4196
|
/* Native search clear — clears the field with zero JS (WebKit/Blink; Firefox
|
|
4128
|
-
has no cancel button but Escape clears the field natively).
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4197
|
+
has no cancel button but Escape clears the field natively). The type sits
|
|
4198
|
+
in `:where()`: only a search input has this button anyway, and counting it
|
|
4199
|
+
would outrank l-input-group's reset of the end-padding bleed below — the
|
|
4200
|
+
clear would then slide past the inner input's edge and get clipped. */
|
|
4201
|
+
:is(.l-input, :where(l-form-field:not([unstyled]), l-input-group) > input):where(
|
|
4202
|
+
[type='search']
|
|
4203
|
+
)::-webkit-search-cancel-button {
|
|
4204
|
+
/* Same end-action box as the date/time picker icon above. */
|
|
4133
4205
|
appearance: none;
|
|
4134
|
-
|
|
4135
|
-
|
|
4206
|
+
box-sizing: border-box;
|
|
4207
|
+
inline-size: var(--_action-size);
|
|
4208
|
+
block-size: var(--_action-size);
|
|
4209
|
+
margin: 0;
|
|
4210
|
+
margin-inline-end: calc(var(--l-form-control-padding-inline) * -1);
|
|
4136
4211
|
color: var(--l-form-control-placeholder-color);
|
|
4137
4212
|
background-color: currentColor;
|
|
4138
4213
|
cursor: pointer;
|
|
4139
|
-
mask: var(--clear-icon) center /
|
|
4214
|
+
mask: var(--clear-icon) center / var(--l-form-control-icon-size) no-repeat;
|
|
4140
4215
|
}
|
|
4141
4216
|
|
|
4142
4217
|
@media (hover: hover) {
|
|
4143
|
-
:is(
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
)[type='search']::-webkit-search-cancel-button:hover {
|
|
4218
|
+
:is(.l-input, :where(l-form-field:not([unstyled]), l-input-group) > input):where(
|
|
4219
|
+
[type='search']
|
|
4220
|
+
)::-webkit-search-cancel-button:hover {
|
|
4147
4221
|
color: var(--l-form-control-value-color);
|
|
4148
4222
|
}
|
|
4149
4223
|
}
|
|
@@ -4195,6 +4269,9 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4195
4269
|
/* The control inside drops its own chrome — the group provides it.
|
|
4196
4270
|
`:is(input, .l-input)` outranks the `.l-input` base rule. */
|
|
4197
4271
|
& > :is(input, .l-input) {
|
|
4272
|
+
/* Follow the group's height (its `size` or `--height`), not the input
|
|
4273
|
+
default: the native date/search action is sized from it. */
|
|
4274
|
+
--height: inherit;
|
|
4198
4275
|
flex: 1 1 auto;
|
|
4199
4276
|
min-inline-size: 0;
|
|
4200
4277
|
inline-size: auto;
|
|
@@ -4205,6 +4282,33 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4205
4282
|
background: transparent;
|
|
4206
4283
|
}
|
|
4207
4284
|
|
|
4285
|
+
/* The inner input has no end padding to bleed over (the group owns it), so
|
|
4286
|
+
its native date/search action stays inside the input box. */
|
|
4287
|
+
& > :is(input, .l-input)::-webkit-calendar-picker-indicator,
|
|
4288
|
+
& > :is(input, .l-input)::-webkit-search-cancel-button {
|
|
4289
|
+
margin-inline-end: 0;
|
|
4290
|
+
}
|
|
4291
|
+
|
|
4292
|
+
/* A date/time input that ends the group always shows its picker icon:
|
|
4293
|
+
drop the group's end padding so that square sits flush against the
|
|
4294
|
+
border, like a trailing button adornment or a picker's chevron. Gated on
|
|
4295
|
+
the WebKit indicator — elsewhere the browser draws its own control. The
|
|
4296
|
+
search clear only shows on hover or focus, so a search input keeps the
|
|
4297
|
+
padding. */
|
|
4298
|
+
@supports selector(::-webkit-calendar-picker-indicator) {
|
|
4299
|
+
&:has(
|
|
4300
|
+
> :is(input, .l-input):last-child:is(
|
|
4301
|
+
[type='date'],
|
|
4302
|
+
[type='time'],
|
|
4303
|
+
[type='datetime-local'],
|
|
4304
|
+
[type='month'],
|
|
4305
|
+
[type='week']
|
|
4306
|
+
)
|
|
4307
|
+
) {
|
|
4308
|
+
padding-inline-end: 0;
|
|
4309
|
+
}
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4208
4312
|
/* The group owns the state visuals (focus halo, invalid wash); keep the
|
|
4209
4313
|
inner input neutral so they don't render twice. */
|
|
4210
4314
|
& > :is(input, .l-input):focus-visible {
|
|
@@ -4294,10 +4398,18 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4294
4398
|
secondary skin, disabled state included. */
|
|
4295
4399
|
&:disabled {
|
|
4296
4400
|
cursor: not-allowed;
|
|
4297
|
-
color: var(--l-form-control-
|
|
4401
|
+
color: var(--l-form-control-text-color-disabled);
|
|
4298
4402
|
}
|
|
4299
4403
|
}
|
|
4300
4404
|
|
|
4405
|
+
/* The injected password toggle is an end action like the date picker or a
|
|
4406
|
+
picker's clear: its glyph follows --l-form-control-icon-size. `l-icon`
|
|
4407
|
+
renders at 1em, so the size goes through font-size (default 1em: no
|
|
4408
|
+
change). Authored adornments keep their own icon size. */
|
|
4409
|
+
& > .l-input-group-toggle {
|
|
4410
|
+
font-size: var(--l-form-control-icon-size);
|
|
4411
|
+
}
|
|
4412
|
+
|
|
4301
4413
|
@media (hover: hover) {
|
|
4302
4414
|
&:hover:where(:not(:has(> input:disabled))) {
|
|
4303
4415
|
border-color: var(--l-form-control-border-color-hover);
|
|
@@ -4334,9 +4446,9 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4334
4446
|
|
|
4335
4447
|
&:has(> input:disabled) {
|
|
4336
4448
|
cursor: not-allowed;
|
|
4337
|
-
border-color: var(--l-form-control-disabled
|
|
4338
|
-
background-color: var(--l-form-control-disabled
|
|
4339
|
-
color: var(--l-form-control-
|
|
4449
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
4450
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
4451
|
+
color: var(--l-form-control-text-color-disabled);
|
|
4340
4452
|
|
|
4341
4453
|
/* Static adornments (icons, unit text) set their own colour above, so the
|
|
4342
4454
|
`color` on the group never reaches them — a disabled group ended up with
|
|
@@ -4345,7 +4457,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4345
4457
|
live next to a disabled field, and the injected toggle already mirrors
|
|
4346
4458
|
the input's `disabled` and greys through its own rule. */
|
|
4347
4459
|
& > :not(input, button) {
|
|
4348
|
-
color: var(--l-form-control-
|
|
4460
|
+
color: var(--l-form-control-text-color-disabled);
|
|
4349
4461
|
}
|
|
4350
4462
|
}
|
|
4351
4463
|
}
|
|
@@ -4985,8 +5097,8 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
4985
5097
|
wash out), selected fades (the fade reads as inactive at a glance, at the
|
|
4986
5098
|
cost of a 1.85:1 dot — see checkbox-appearance.css for the full rationale). */
|
|
4987
5099
|
&:disabled:not(:checked) {
|
|
4988
|
-
border-color: var(--l-form-control-disabled
|
|
4989
|
-
background-color: var(--l-form-control-disabled
|
|
5100
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
5101
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
4990
5102
|
}
|
|
4991
5103
|
|
|
4992
5104
|
&:disabled:checked {
|
|
@@ -5222,10 +5334,114 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5222
5334
|
- the trigger (the <select> box) mirrors the form controls (l-input /
|
|
5223
5335
|
l-textarea) through the --l-form-control-* tokens;
|
|
5224
5336
|
- the picker (::picker(select)) and its items mirror the l-dropdown panel
|
|
5225
|
-
|
|
5337
|
+
through the --l-popover-* / --l-menu-item-* tokens (plus --l-color-surface-overlay /
|
|
5338
|
+
--l-color-border-overlay). */
|
|
5226
5339
|
|
|
5227
|
-
/* The rich-option
|
|
5228
|
-
|
|
5340
|
+
/* The option row and rich-option content are shared with the l-select shadow
|
|
5341
|
+
root from select-item.css; the rich-option suffix (`.l-select-item-suffix`)
|
|
5342
|
+
with the l-select / l-combobox shadow roots from select-item-suffix.css. */
|
|
5343
|
+
|
|
5344
|
+
@layer components {
|
|
5345
|
+
|
|
5346
|
+
/*
|
|
5347
|
+
* Option row and rich-option content (`.l-select-item-media / -text / -title /
|
|
5348
|
+
* -description`) shared by the two select tiers, so they cannot drift apart:
|
|
5349
|
+
* - `@import`ed (and layered) by src/css/elements/select.css for the native
|
|
5350
|
+
* `select.l-select` picker, where `.l-select option` is the row, and
|
|
5351
|
+
* - imported `?inline` into the l-select shadow root, which copies each
|
|
5352
|
+
* option's markup straight into its `:host .option` row — the same shape as
|
|
5353
|
+
* a native <option>, so a row is rich by its content alone.
|
|
5354
|
+
* `:host` never matches in a document, so the shadow selectors cannot reach a
|
|
5355
|
+
* consumer's own `.option`. Each rule is a selector LIST (not
|
|
5356
|
+
* `:is()`), so every tier keeps its own specificity.
|
|
5357
|
+
*
|
|
5358
|
+
* The selected checkmark is NOT here: the native one is `::checkmark`, which a
|
|
5359
|
+
* browser without customizable select would reject — taking the whole rule,
|
|
5360
|
+
* and the shadow tier's checkmark with it.
|
|
5361
|
+
*
|
|
5362
|
+
* Intentionally UNLAYERED, like button-core.css / select-item-suffix.css.
|
|
5363
|
+
* In the shadow root it loads BEFORE picker-core.css, whose disabled-option rule
|
|
5364
|
+
* must win over the row's `cursor: pointer`.
|
|
5365
|
+
*/
|
|
5366
|
+
|
|
5367
|
+
.l-select option,
|
|
5368
|
+
:host .option {
|
|
5369
|
+
display: flex;
|
|
5370
|
+
position: relative;
|
|
5371
|
+
align-items: start;
|
|
5372
|
+
gap: var(--l-menu-item-gap);
|
|
5373
|
+
/* For the native tier: the document has no box-sizing reset, so the padding
|
|
5374
|
+
would add to the min-height. Shadow roots already get it from host.css. */
|
|
5375
|
+
box-sizing: border-box;
|
|
5376
|
+
/* Block padding that centres a one-line row on the item min-height (36px at
|
|
5377
|
+
the default tokens, like l-dropdown-item) but never drops below the item
|
|
5378
|
+
padding token. Rows top-align (`align-items: start`) so a wrapping
|
|
5379
|
+
description grows downwards; the checkmarks pin to this same offset. */
|
|
5380
|
+
--_row-padding-block: max(
|
|
5381
|
+
var(--l-menu-item-padding-block),
|
|
5382
|
+
(var(--l-menu-item-min-height) - var(--l-popover-font-size) * var(--l-popover-line-height)) / 2
|
|
5383
|
+
);
|
|
5384
|
+
|
|
5385
|
+
min-block-size: var(--l-menu-item-min-height);
|
|
5386
|
+
padding-block: var(--_row-padding-block);
|
|
5387
|
+
/* Reserve the inline-start checkmark column on every row so titles align
|
|
5388
|
+
whether or not the option is selected (like l-dropdown). */
|
|
5389
|
+
padding-inline: 1.75rem var(--l-menu-item-padding-inline);
|
|
5390
|
+
border-radius: var(--l-menu-item-border-radius);
|
|
5391
|
+
cursor: pointer;
|
|
5392
|
+
color: var(--l-color-text-primary);
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
/* Selection is shown by the checkmark alone (like l-dropdown) — the selected
|
|
5396
|
+
option carries NO background, so it never reads as merged with the
|
|
5397
|
+
hovered/active row, which is the only one that takes the tint. Native tier
|
|
5398
|
+
only: in the l-select shadow root the mouse moves the active option
|
|
5399
|
+
(ListboxNavController.onPointerMove), whose `[data-active]` tint is the one
|
|
5400
|
+
highlight — a `:hover` tint there would add a second row. */
|
|
5401
|
+
@media (hover: hover) {
|
|
5402
|
+
.l-select option:hover {
|
|
5403
|
+
background: var(--l-color-bg-state-hover);
|
|
5404
|
+
}
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5407
|
+
/* Rich option content — image/icon + title + optional description. One class
|
|
5408
|
+
selector per part, not scoped to a tier: the classes are library-owned (like
|
|
5409
|
+
`.l-select-item-suffix`), so the same rule styles a native <option>, an
|
|
5410
|
+
l-select row and the copy each trigger shows. Each trigger then trims its copy
|
|
5411
|
+
(title weight, hidden description) next to its own rules. */
|
|
5412
|
+
.l-select-item-media {
|
|
5413
|
+
flex: 0 0 auto;
|
|
5414
|
+
inline-size: 1.5rem;
|
|
5415
|
+
block-size: 1.5rem;
|
|
5416
|
+
border-radius: 4px;
|
|
5417
|
+
object-fit: cover;
|
|
5418
|
+
}
|
|
5419
|
+
|
|
5420
|
+
.l-select-item-text {
|
|
5421
|
+
display: flex;
|
|
5422
|
+
min-inline-size: 0;
|
|
5423
|
+
flex: 1 1 auto;
|
|
5424
|
+
flex-direction: column;
|
|
5425
|
+
}
|
|
5426
|
+
|
|
5427
|
+
.l-select-item-title {
|
|
5428
|
+
overflow: hidden;
|
|
5429
|
+
white-space: nowrap;
|
|
5430
|
+
text-overflow: ellipsis;
|
|
5431
|
+
font-weight: var(--l-font-weight-semibold);
|
|
5432
|
+
}
|
|
5433
|
+
|
|
5434
|
+
.l-select-item-description {
|
|
5435
|
+
/* Override the `white-space: nowrap` inherited from the native <select>, so
|
|
5436
|
+
the description wraps within the picker's max-inline-size instead of
|
|
5437
|
+
overflowing on one line. */
|
|
5438
|
+
white-space: normal;
|
|
5439
|
+
text-wrap: pretty;
|
|
5440
|
+
color: var(--l-color-text-tertiary);
|
|
5441
|
+
font-size: 0.75rem;
|
|
5442
|
+
line-height: 1.3;
|
|
5443
|
+
}
|
|
5444
|
+
}
|
|
5229
5445
|
|
|
5230
5446
|
@layer components {
|
|
5231
5447
|
|
|
@@ -5237,8 +5453,8 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5237
5453
|
* `select.l-select` picker, where `.l-select option` is the row, and
|
|
5238
5454
|
* - imported `?inline` into the l-select / l-combobox shadow roots, which copy
|
|
5239
5455
|
* each option's markup and cannot reach the global stylesheet; there
|
|
5240
|
-
* `:host .option
|
|
5241
|
-
* the light-DOM copy cannot reach a consumer's own `.option
|
|
5456
|
+
* `:host .option` is the row. `:host` never matches in a document, so
|
|
5457
|
+
* the light-DOM copy cannot reach a consumer's own `.option`.
|
|
5242
5458
|
*
|
|
5243
5459
|
* A class, not a `slot="suffix"` attribute hook: in a customizable select the
|
|
5244
5460
|
* <option> has its own UA shadow root, so a child carrying a `slot` it has no
|
|
@@ -5259,7 +5475,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5259
5475
|
initial-value: 0px;
|
|
5260
5476
|
}
|
|
5261
5477
|
|
|
5262
|
-
:is(.l-select option, :host .option
|
|
5478
|
+
:is(.l-select option, :host .option) {
|
|
5263
5479
|
--_select-item-line: 1lh;
|
|
5264
5480
|
}
|
|
5265
5481
|
|
|
@@ -5286,7 +5502,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5286
5502
|
too, so the title shares the suffix's line in a centred row (l-combobox).
|
|
5287
5503
|
Scoped to the rows: the trigger's copy of the selected option (where the
|
|
5288
5504
|
suffix is hidden) keeps its own centring. */
|
|
5289
|
-
:is(.l-select option, :host .option
|
|
5505
|
+
:is(.l-select option, :host .option) > .l-select-item-text:has(~ .l-select-item-suffix) {
|
|
5290
5506
|
align-self: flex-start;
|
|
5291
5507
|
}
|
|
5292
5508
|
}
|
|
@@ -5301,6 +5517,9 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5301
5517
|
/* mdi:chevron-down — same glyph as l-disclosure's `data-marker="arrow"`.
|
|
5302
5518
|
Override with any url()/image to re-skin; pairs with --caret-color. */
|
|
5303
5519
|
--caret-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"></path></svg>');
|
|
5520
|
+
/* The chevron takes a square as tall as the field inside its borders, like
|
|
5521
|
+
the l-select / l-combobox chevron and the native input actions. */
|
|
5522
|
+
--_action-size: calc(var(--height) - 2 * var(--l-form-control-border-width));
|
|
5304
5523
|
|
|
5305
5524
|
box-sizing: border-box;
|
|
5306
5525
|
display: inline-flex;
|
|
@@ -5372,9 +5591,9 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5372
5591
|
|
|
5373
5592
|
&:disabled {
|
|
5374
5593
|
cursor: not-allowed;
|
|
5375
|
-
border-color: var(--l-form-control-disabled
|
|
5376
|
-
background-color: var(--l-form-control-disabled
|
|
5377
|
-
color: var(--l-form-control-
|
|
5594
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
5595
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
5596
|
+
color: var(--l-form-control-text-color-disabled);
|
|
5378
5597
|
}
|
|
5379
5598
|
|
|
5380
5599
|
/* The selected value fills the trigger; the chevron sits at the inline-end.
|
|
@@ -5411,10 +5630,16 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5411
5630
|
&::picker-icon {
|
|
5412
5631
|
content: '';
|
|
5413
5632
|
flex: 0 0 auto;
|
|
5414
|
-
|
|
5415
|
-
|
|
5633
|
+
/* Same end-action box as l-select: a square of the field height that
|
|
5634
|
+
bleeds over the end padding to sit flush against the border, so it
|
|
5635
|
+
lines up with the other controls' chevrons. The glyph is masked down
|
|
5636
|
+
to --l-form-control-icon-size. Rotating the square keeps the glyph
|
|
5637
|
+
centred. */
|
|
5638
|
+
align-self: stretch;
|
|
5639
|
+
inline-size: var(--_action-size);
|
|
5640
|
+
margin-inline-end: calc(var(--l-form-control-padding-inline) * -1);
|
|
5416
5641
|
background-color: var(--caret-color);
|
|
5417
|
-
mask: var(--caret-icon) center /
|
|
5642
|
+
mask: var(--caret-icon) center / var(--l-form-control-icon-size) no-repeat;
|
|
5418
5643
|
transition: rotate 150ms ease;
|
|
5419
5644
|
}
|
|
5420
5645
|
&:open::picker-icon {
|
|
@@ -5432,15 +5657,15 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5432
5657
|
never wrap (they'd overflow with a horizontal scrollbar). */
|
|
5433
5658
|
min-inline-size: anchor-size(width);
|
|
5434
5659
|
max-inline-size: min(90vw, 22rem);
|
|
5435
|
-
padding:
|
|
5660
|
+
padding: var(--l-popover-padding);
|
|
5436
5661
|
margin-block-start: 0.25rem;
|
|
5437
5662
|
border: 1px solid var(--l-color-border-overlay);
|
|
5438
|
-
border-radius:
|
|
5663
|
+
border-radius: var(--l-popover-border-radius);
|
|
5439
5664
|
background: var(--l-color-surface-overlay);
|
|
5440
5665
|
color: var(--l-color-text-primary);
|
|
5441
|
-
box-shadow: var(--l-shadow
|
|
5442
|
-
font-size:
|
|
5443
|
-
line-height:
|
|
5666
|
+
box-shadow: var(--l-popover-shadow);
|
|
5667
|
+
font-size: var(--l-popover-font-size);
|
|
5668
|
+
line-height: var(--l-popover-line-height);
|
|
5444
5669
|
|
|
5445
5670
|
/* Off-stage (also the exit state); the entry starts from @starting-style. */
|
|
5446
5671
|
opacity: 0;
|
|
@@ -5462,42 +5687,20 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5462
5687
|
}
|
|
5463
5688
|
}
|
|
5464
5689
|
|
|
5690
|
+
/* Row layout and hover tint: select-item.css (shared with l-select). */
|
|
5465
5691
|
.l-select option {
|
|
5466
|
-
display: flex;
|
|
5467
|
-
position: relative;
|
|
5468
|
-
align-items: start;
|
|
5469
|
-
gap: 0.5rem;
|
|
5470
|
-
box-sizing: border-box;
|
|
5471
|
-
min-block-size: 36px;
|
|
5472
|
-
padding-block: 0.5rem;
|
|
5473
|
-
/* Reserve the inline-start checkmark column on every row so titles align
|
|
5474
|
-
whether or not the option is selected (like l-dropdown). */
|
|
5475
|
-
padding-inline: 1.75rem 0.5rem;
|
|
5476
|
-
border-radius: 4px;
|
|
5477
|
-
cursor: pointer;
|
|
5478
|
-
color: var(--l-color-text-primary);
|
|
5479
|
-
|
|
5480
|
-
/* Selection is shown by the checkmark alone (like l-dropdown) — the
|
|
5481
|
-
selected option carries NO background, so it never reads as merged with
|
|
5482
|
-
the hovered/active row, which is the only one that takes the tint. */
|
|
5483
|
-
@media (hover: hover) {
|
|
5484
|
-
&:hover {
|
|
5485
|
-
background: var(--l-color-bg-state-hover);
|
|
5486
|
-
}
|
|
5487
|
-
}
|
|
5488
|
-
|
|
5489
5692
|
/* Native selected indicator — absolutely placed in the reserved inline-start
|
|
5490
5693
|
column and pinned to the first line, so a wrapping description never
|
|
5491
5694
|
shifts it and unselected rows keep identical text alignment. */
|
|
5492
5695
|
&::checkmark {
|
|
5493
5696
|
position: absolute;
|
|
5494
5697
|
inset-inline-start: 0.5rem;
|
|
5495
|
-
/* Sit in the title's line box: same start offset as the padding
|
|
5496
|
-
block-size equal to the title's line-height
|
|
5497
|
-
glyph centers on the title regardless of its cap height. */
|
|
5498
|
-
inset-block-start:
|
|
5698
|
+
/* Sit in the title's line box: same start offset as the row padding
|
|
5699
|
+
(select-item.css), and a block-size equal to the title's line-height so
|
|
5700
|
+
the glyph centers on the title regardless of its cap height. */
|
|
5701
|
+
inset-block-start: var(--_row-padding-block);
|
|
5499
5702
|
inline-size: 1rem;
|
|
5500
|
-
block-size:
|
|
5703
|
+
block-size: calc(var(--l-popover-font-size) * var(--l-popover-line-height));
|
|
5501
5704
|
background-color: currentColor;
|
|
5502
5705
|
/* https://lucide.dev/icons/check */
|
|
5503
5706
|
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"></path></svg>')
|
|
@@ -5505,40 +5708,6 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
5505
5708
|
}
|
|
5506
5709
|
}
|
|
5507
5710
|
|
|
5508
|
-
/* Rich option content — image/icon + title + optional description. */
|
|
5509
|
-
.l-select-item-media {
|
|
5510
|
-
flex: 0 0 auto;
|
|
5511
|
-
inline-size: 1.5rem;
|
|
5512
|
-
block-size: 1.5rem;
|
|
5513
|
-
border-radius: 4px;
|
|
5514
|
-
object-fit: cover;
|
|
5515
|
-
}
|
|
5516
|
-
|
|
5517
|
-
.l-select-item-text {
|
|
5518
|
-
display: flex;
|
|
5519
|
-
min-inline-size: 0;
|
|
5520
|
-
flex: 1 1 auto;
|
|
5521
|
-
flex-direction: column;
|
|
5522
|
-
}
|
|
5523
|
-
|
|
5524
|
-
.l-select-item-title {
|
|
5525
|
-
overflow: hidden;
|
|
5526
|
-
white-space: nowrap;
|
|
5527
|
-
text-overflow: ellipsis;
|
|
5528
|
-
font-weight: var(--l-font-weight-semibold);
|
|
5529
|
-
}
|
|
5530
|
-
|
|
5531
|
-
.l-select-item-description {
|
|
5532
|
-
/* Override the `white-space: nowrap` inherited from the native <select>, so
|
|
5533
|
-
the description wraps within the picker's max-inline-size instead of
|
|
5534
|
-
overflowing on one line. */
|
|
5535
|
-
white-space: normal;
|
|
5536
|
-
text-wrap: pretty;
|
|
5537
|
-
color: var(--l-color-text-tertiary);
|
|
5538
|
-
font-size: 0.75rem;
|
|
5539
|
-
line-height: 1.3;
|
|
5540
|
-
}
|
|
5541
|
-
|
|
5542
5711
|
@media (prefers-reduced-motion: reduce) {
|
|
5543
5712
|
.l-select,
|
|
5544
5713
|
.l-select::picker-icon,
|
|
@@ -6004,7 +6173,7 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
6004
6173
|
|
|
6005
6174
|
/* `--_track` is the live track fill; `:checked` flips it to the accent.
|
|
6006
6175
|
The hover halo reads it back so the glow always matches the state. */
|
|
6007
|
-
--_track: var(--l-form-control-track-off
|
|
6176
|
+
--_track: var(--l-form-control-track-color-off);
|
|
6008
6177
|
--_thumb-color: var(--l-form-control-activated-content-color);
|
|
6009
6178
|
--_thumb-img: radial-gradient(ellipse closest-side, var(--_thumb-color) 94%, #0000);
|
|
6010
6179
|
|
|
@@ -6121,8 +6290,8 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
6121
6290
|
input and the thumb flips to the muted grey so it stays legible on it —
|
|
6122
6291
|
an off switch has no accent fill, so there is nothing a fade would help. */
|
|
6123
6292
|
&:disabled:not(:checked) {
|
|
6124
|
-
--_track: var(--l-form-control-disabled
|
|
6125
|
-
--_thumb-color: var(--l-form-control-
|
|
6293
|
+
--_track: var(--l-form-control-background-color-disabled);
|
|
6294
|
+
--_thumb-color: var(--l-form-control-mark-color-disabled);
|
|
6126
6295
|
}
|
|
6127
6296
|
|
|
6128
6297
|
/* On + disabled: faded, like the checked checkbox and radio. The white thumb
|
|
@@ -6608,14 +6777,14 @@ l-badge:has(:is(iconify-icon, l-icon, svg):last-child:not(:first-child)) {
|
|
|
6608
6777
|
&:disabled {
|
|
6609
6778
|
cursor: not-allowed;
|
|
6610
6779
|
resize: none;
|
|
6611
|
-
border-color: var(--l-form-control-disabled
|
|
6612
|
-
background-color: var(--l-form-control-disabled
|
|
6613
|
-
color: var(--l-form-control-
|
|
6614
|
-
-webkit-text-fill-color: var(--l-form-control-
|
|
6780
|
+
border-color: var(--l-form-control-border-color-disabled);
|
|
6781
|
+
background-color: var(--l-form-control-background-color-disabled);
|
|
6782
|
+
color: var(--l-form-control-text-color-disabled);
|
|
6783
|
+
-webkit-text-fill-color: var(--l-form-control-text-color-disabled);
|
|
6615
6784
|
}
|
|
6616
6785
|
|
|
6617
6786
|
&:disabled::placeholder {
|
|
6618
|
-
color: var(--l-form-control-
|
|
6787
|
+
color: var(--l-form-control-text-color-disabled);
|
|
6619
6788
|
}
|
|
6620
6789
|
}
|
|
6621
6790
|
|