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.
Files changed (173) hide show
  1. package/cdn/custom-elements.json +203 -170
  2. package/cdn/elements/combobox/combobox.d.ts +6 -1
  3. package/cdn/elements/combobox/combobox.d.ts.map +1 -1
  4. package/cdn/elements/combobox/combobox.js +19 -17
  5. package/cdn/elements/combobox/combobox.js.map +1 -1
  6. package/cdn/elements/dropdown/dropdown.d.ts +6 -7
  7. package/cdn/elements/dropdown/dropdown.d.ts.map +1 -1
  8. package/cdn/elements/dropdown/dropdown.js +2 -2
  9. package/cdn/elements/dropdown/dropdown.js.map +1 -1
  10. package/cdn/elements/dropdown-item/dropdown-item.d.ts +0 -1
  11. package/cdn/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
  12. package/cdn/elements/dropdown-item/dropdown-item.js +2 -2
  13. package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
  14. package/cdn/elements/dropdown-label/dropdown-label.js +1 -1
  15. package/cdn/elements/dropdown-label/dropdown-label.js.map +1 -1
  16. package/cdn/elements/form-field/form-field.d.ts +1 -1
  17. package/cdn/elements/form-field/form-field.js.map +1 -1
  18. package/cdn/elements/input/input.meta.d.ts +2 -0
  19. package/cdn/elements/input/input.meta.d.ts.map +1 -1
  20. package/cdn/elements/input-otp/input-otp.d.ts +3 -3
  21. package/cdn/elements/input-otp/input-otp.js.map +1 -1
  22. package/cdn/elements/popover/popover.d.ts +3 -4
  23. package/cdn/elements/popover/popover.d.ts.map +1 -1
  24. package/cdn/elements/popover/popover.js +1 -1
  25. package/cdn/elements/popover/popover.js.map +1 -1
  26. package/cdn/elements/select/select.d.ts +6 -1
  27. package/cdn/elements/select/select.d.ts.map +1 -1
  28. package/cdn/elements/select/select.js +8 -7
  29. package/cdn/elements/select/select.js.map +1 -1
  30. package/cdn/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
  31. package/cdn/elements/stories-viewer/stories-viewer.js +4 -4
  32. package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
  33. package/cdn/elements/tooltip/tooltip.d.ts +0 -1
  34. package/cdn/elements/tooltip/tooltip.d.ts.map +1 -1
  35. package/cdn/elements/tooltip/tooltip.js +1 -1
  36. package/cdn/elements/tooltip/tooltip.js.map +1 -1
  37. package/cdn/shared/controllers/listbox-nav.d.ts +15 -1
  38. package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
  39. package/cdn/shared/controllers/listbox-nav.js +1 -1
  40. package/cdn/shared/controllers/listbox-nav.js.map +1 -1
  41. package/cdn/shared/controllers/popover.d.ts +10 -2
  42. package/cdn/shared/controllers/popover.d.ts.map +1 -1
  43. package/cdn/shared/controllers/popover.js +1 -1
  44. package/cdn/shared/controllers/popover.js.map +1 -1
  45. package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
  46. package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
  47. package/cdn/shared/styles/menu-panel.styles.d.ts +8 -0
  48. package/cdn/shared/styles/menu-panel.styles.d.ts.map +1 -0
  49. package/cdn/shared/styles/menu-panel.styles.js +2 -0
  50. package/cdn/shared/styles/menu-panel.styles.js.map +1 -0
  51. package/cdn/shared/styles/picker-core.styles.d.ts +9 -0
  52. package/cdn/shared/styles/picker-core.styles.d.ts.map +1 -0
  53. package/cdn/shared/styles/picker-core.styles.js +2 -0
  54. package/cdn/shared/styles/picker-core.styles.js.map +1 -0
  55. package/cdn/shared/styles/select-item-suffix.styles.js +1 -1
  56. package/cdn/shared/styles/select-item-suffix.styles.js.map +1 -1
  57. package/cdn/shared/styles/select-item.styles.d.ts +8 -0
  58. package/cdn/shared/styles/select-item.styles.d.ts.map +1 -0
  59. package/cdn/shared/styles/select-item.styles.js +2 -0
  60. package/cdn/shared/styles/select-item.styles.js.map +1 -0
  61. package/cdn/shared/styles/visually-hidden.styles.d.ts +8 -0
  62. package/cdn/shared/styles/visually-hidden.styles.d.ts.map +1 -0
  63. package/cdn/shared/styles/visually-hidden.styles.js +2 -0
  64. package/cdn/shared/styles/visually-hidden.styles.js.map +1 -0
  65. package/cdn/standalone.css +365 -196
  66. package/cdn/standalone.js +148 -75
  67. package/cdn/standalone.js.map +1 -1
  68. package/cdn/styles/base.css +30 -20
  69. package/cdn/styles/elements/checkbox.css +2 -2
  70. package/cdn/styles/elements/form-field.css +16 -9
  71. package/cdn/styles/elements/input-otp.css +16 -9
  72. package/cdn/styles/elements/input-stepper/default.css +4 -4
  73. package/cdn/styles/elements/input-stepper/pill.css +4 -4
  74. package/cdn/styles/elements/input-stepper/rounded.css +3 -3
  75. package/cdn/styles/elements/input.css +82 -27
  76. package/cdn/styles/elements/radio.css +2 -2
  77. package/cdn/styles/elements/select.css +137 -80
  78. package/cdn/styles/elements/switch.css +3 -3
  79. package/cdn/styles/elements/textarea.css +5 -5
  80. package/cdn/styles/preset.css +92 -49
  81. package/cdn/styles/tokens/forms.css +33 -30
  82. package/cdn/styles/tokens.css +62 -29
  83. package/dist/css/base.css +30 -20
  84. package/dist/css/elements/checkbox.css +2 -2
  85. package/dist/css/elements/form-field.css +16 -9
  86. package/dist/css/elements/input-otp.css +16 -9
  87. package/dist/css/elements/input-stepper/default.css +4 -4
  88. package/dist/css/elements/input-stepper/pill.css +4 -4
  89. package/dist/css/elements/input-stepper/rounded.css +3 -3
  90. package/dist/css/elements/input.css +82 -27
  91. package/dist/css/elements/radio.css +2 -2
  92. package/dist/css/elements/select.css +137 -80
  93. package/dist/css/elements/switch.css +3 -3
  94. package/dist/css/elements/textarea.css +5 -5
  95. package/dist/css/preset.css +92 -49
  96. package/dist/css/tokens/forms.css +33 -30
  97. package/dist/css/tokens.css +62 -29
  98. package/dist/custom-elements.json +203 -170
  99. package/dist/elements/combobox/combobox.css +30 -187
  100. package/dist/elements/combobox/combobox.d.ts +6 -1
  101. package/dist/elements/combobox/combobox.d.ts.map +1 -1
  102. package/dist/elements/combobox/combobox.js +48 -20
  103. package/dist/elements/dropdown/dropdown.css +7 -30
  104. package/dist/elements/dropdown/dropdown.d.ts +6 -7
  105. package/dist/elements/dropdown/dropdown.d.ts.map +1 -1
  106. package/dist/elements/dropdown/dropdown.js +17 -14
  107. package/dist/elements/dropdown-item/dropdown-item.css +7 -36
  108. package/dist/elements/dropdown-item/dropdown-item.d.ts +0 -1
  109. package/dist/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
  110. package/dist/elements/dropdown-item/dropdown-item.js +4 -7
  111. package/dist/elements/dropdown-label/dropdown-label.css +3 -3
  112. package/dist/elements/form-field/form-field.d.ts +1 -1
  113. package/dist/elements/form-field/form-field.js +2 -2
  114. package/dist/elements/input/input.meta.d.ts +2 -0
  115. package/dist/elements/input/input.meta.d.ts.map +1 -1
  116. package/dist/elements/input/input.meta.js +2 -0
  117. package/dist/elements/input-otp/input-otp.d.ts +3 -3
  118. package/dist/elements/input-otp/input-otp.js +3 -3
  119. package/dist/elements/popover/popover.css +4 -4
  120. package/dist/elements/popover/popover.d.ts +3 -4
  121. package/dist/elements/popover/popover.d.ts.map +1 -1
  122. package/dist/elements/popover/popover.js +5 -9
  123. package/dist/elements/select/select.css +24 -260
  124. package/dist/elements/select/select.d.ts +6 -1
  125. package/dist/elements/select/select.d.ts.map +1 -1
  126. package/dist/elements/select/select.js +27 -9
  127. package/dist/elements/stories-viewer/stories-viewer.css +0 -12
  128. package/dist/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
  129. package/dist/elements/stories-viewer/stories-viewer.js +4 -3
  130. package/dist/elements/tooltip/tooltip.d.ts +0 -1
  131. package/dist/elements/tooltip/tooltip.d.ts.map +1 -1
  132. package/dist/elements/tooltip/tooltip.js +2 -6
  133. package/dist/metadata/combobox.json +16 -1
  134. package/dist/metadata/dropdown.json +10 -10
  135. package/dist/metadata/form-field.json +1 -1
  136. package/dist/metadata/index.json +57 -22
  137. package/dist/metadata/input-otp.json +3 -3
  138. package/dist/metadata/input.json +5 -0
  139. package/dist/metadata/popover.json +5 -5
  140. package/dist/metadata/select.json +16 -1
  141. package/dist/shared/controllers/listbox-nav.d.ts +15 -1
  142. package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
  143. package/dist/shared/controllers/listbox-nav.js +32 -1
  144. package/dist/shared/controllers/popover.d.ts +10 -2
  145. package/dist/shared/controllers/popover.d.ts.map +1 -1
  146. package/dist/shared/controllers/popover.js +16 -2
  147. package/dist/shared/styles/checkbox-appearance.css +2 -2
  148. package/dist/shared/styles/menu-panel.css +37 -0
  149. package/dist/shared/styles/menu-panel.styles.d.ts +8 -0
  150. package/dist/shared/styles/menu-panel.styles.d.ts.map +1 -0
  151. package/dist/shared/styles/menu-panel.styles.js +8 -0
  152. package/dist/shared/styles/picker-core.css +250 -0
  153. package/dist/shared/styles/picker-core.styles.d.ts +9 -0
  154. package/dist/shared/styles/picker-core.styles.d.ts.map +1 -0
  155. package/dist/shared/styles/picker-core.styles.js +9 -0
  156. package/dist/shared/styles/select-item-suffix.css +4 -4
  157. package/dist/shared/styles/select-item.css +98 -0
  158. package/dist/shared/styles/select-item.styles.d.ts +8 -0
  159. package/dist/shared/styles/select-item.styles.d.ts.map +1 -0
  160. package/dist/shared/styles/select-item.styles.js +8 -0
  161. package/dist/shared/styles/visually-hidden.css +27 -0
  162. package/dist/shared/styles/visually-hidden.styles.d.ts +8 -0
  163. package/dist/shared/styles/visually-hidden.styles.d.ts.map +1 -0
  164. package/dist/shared/styles/visually-hidden.styles.js +8 -0
  165. package/dist/templates/elements/combobox.md +26 -1
  166. package/dist/templates/elements/disclosure.md +2 -0
  167. package/dist/templates/elements/dropdown.md +6 -6
  168. package/dist/templates/elements/form-field.md +2 -2
  169. package/dist/templates/elements/input-otp.md +3 -3
  170. package/dist/templates/elements/input.md +1 -0
  171. package/dist/templates/elements/popover.md +3 -3
  172. package/dist/templates/elements/select.md +30 -1
  173. package/package.json +1 -1
@@ -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
- Also know as CSS helper: `.visually-hidden` / `.sr-only`
670
-
671
- References:
672
- - https://www.tpgi.com/the-anatomy-of-visually-hidden/
673
- - https://youtu.be/ob_M_qXeDVE?t=677
674
- */
675
- position: absolute;
676
- width: 1px;
677
- height: 1px;
678
- padding: 0;
679
- margin: -1px;
680
- overflow: hidden;
681
- clip: rect(0, 0, 0, 0); /* for IE only */
682
- white-space: nowrap;
683
- border: 0;
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-*, --l-form-field-*). */
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 glyph on the activated fill (checkmark, radio dot, switch thumb). Pairs with the stable accent. */
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
- /* Control background (input, textarea, select, unchecked toggle box). */
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
- /* Control border color. */
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
- /* Control border width. */
969
+ /* Border width of text fields and of the checkbox and radio box. */
960
970
  --l-form-control-border-width: 1px;
961
- /* Control border radius. */
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
- /* Control border color on hover. */
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
- /* Control border color when invalid. */
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 text control — 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. */
968
- --l-form-control-disabled-background: color-mix(in oklab, var(--l-color-text-primary) 6%, transparent);
969
- /* Border color of a disabled text control. Translucent for the same reason as --l-form-control-disabled-background, 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. */
970
- --l-form-control-disabled-border: color-mix(in oklab, var(--l-color-text-primary) 20%, transparent);
971
- /* Value/placeholder text color of a disabled text control. 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. */
972
- --l-form-control-disabled-color: var(--l-color-text-disabled);
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-background. 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-disabled-color would drop below it. Decoupled from text tokens for the same reason as --l-form-control-track-off-color. Activated controls (checked checkbox, selected radio, on switch) do not use this — they fade instead, keeping their accent tint. */
974
- --l-form-control-disabled-mark-color: var(--l-color-gray-500);
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-color: var(--l-color-gray-500);
981
- /* Height of text controls (input, select, textarea). */
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 controls. */
993
+ /* Horizontal padding of text fields (input, textarea, select, input group). */
984
994
  --l-form-control-padding-inline: var(--l-spacing-3);
985
- /* Field label color. */
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
- /* Helper/description text color (`l-hint`). */
999
+ /* Color of the helper text below a control (`.l-hint`). */
988
1000
  --l-form-control-hint-color: var(--l-color-text-secondary);
989
- /* Error message text color (`l-error`). */
990
- --l-form-control-error-color: var(--l-color-text-danger);
991
- /* Marker appended to a required field's label. */
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 marker. */
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-border);
1992
- background-color: var(--l-form-control-disabled-background);
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
- gap: var(--l-form-field-gap);
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 marker on the label. */
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-field-choice-gap);
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 marker with it —
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-disabled-color);
2618
+ color: var(--l-form-control-text-color-disabled);
2569
2619
  }
2570
2620
 
2571
- /* The marker is decorative once nothing can be submitted; a red asterisk on
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-disabled-color);
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-disabled-color);
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
- --cell-bg-color: color-mix(in oklab, var(--l-color-text-primary) 4%, var(--l-color-surface));
2677
- --cell-border-color: var(--l-color-border);
2678
- --cell-border-radius: var(--l-radius-md);
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: 1px solid var(--cell-border-color);
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-color-text-primary);
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-background);
2826
- --cell-border-color: var(--l-form-control-disabled-border);
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-disabled-color);
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-color-text-primary);
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-disabled-color);
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-background. */
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-border);
3157
- background-color: var(--l-form-control-disabled-background);
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-disabled-color);
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-background. */
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-disabled-* tokens the `default`
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-border);
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-disabled-color);
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-background. */
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-border);
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-border);
4023
- background-color: var(--l-form-control-disabled-background);
4024
- color: var(--l-form-control-disabled-color);
4025
- -webkit-text-fill-color: var(--l-form-control-disabled-color);
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-disabled-color);
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
- inline-size: 1.15em;
4082
- block-size: 1.15em;
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
- /* 1em mask-size (not `contain`, which would fill the 1.15em hit area) keeps
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
- :is(
4130
- .l-input,
4131
- :where(l-form-field:not([unstyled]), l-input-group) > input
4132
- )[type='search']::-webkit-search-cancel-button {
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
- inline-size: 1.15em;
4135
- block-size: 1.15em;
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 / 1em no-repeat;
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
- .l-input,
4145
- :where(l-form-field:not([unstyled]), l-input-group) > input
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-disabled-color);
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-border);
4338
- background-color: var(--l-form-control-disabled-background);
4339
- color: var(--l-form-control-disabled-color);
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-disabled-color);
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-border);
4989
- background-color: var(--l-form-control-disabled-background);
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
- (--l-color-surface-overlay / --l-color-border-overlay / --l-shadow-md). */
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 suffix (`.l-select-item-suffix`) is shared with the
5228
- l-select / l-combobox shadow roots from select-item-suffix.css. */
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-rich` is the row. `:host` never matches in a document, so
5241
- * the light-DOM copy cannot reach a consumer's own `.option-rich`.
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-rich) {
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-rich) > .l-select-item-text:has(~ .l-select-item-suffix) {
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-border);
5376
- background-color: var(--l-form-control-disabled-background);
5377
- color: var(--l-form-control-disabled-color);
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
- inline-size: 1.25rem;
5415
- block-size: 1.25rem;
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 / contain no-repeat;
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: 0.25rem;
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: 6px;
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-md);
5442
- font-size: 0.875rem;
5443
- line-height: 1.5;
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, and a
5496
- block-size equal to the title's line-height (0.875rem × 1.5) so the
5497
- glyph centers on the title regardless of its cap height. */
5498
- inset-block-start: 0.5rem;
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: 1.3125rem;
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-color);
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-background);
6125
- --_thumb-color: var(--l-form-control-disabled-mark-color);
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-border);
6612
- background-color: var(--l-form-control-disabled-background);
6613
- color: var(--l-form-control-disabled-color);
6614
- -webkit-text-fill-color: var(--l-form-control-disabled-color);
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-disabled-color);
6787
+ color: var(--l-form-control-text-color-disabled);
6619
6788
  }
6620
6789
  }
6621
6790