luxen-ui 0.24.0 → 0.26.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 (249) hide show
  1. package/README.md +1 -0
  2. package/bin/cli.mjs +16 -1
  3. package/cdn/custom-elements.json +295 -169
  4. package/cdn/elements/alert-dialog/alert-dialog.d.ts +3 -2
  5. package/cdn/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
  6. package/cdn/elements/alert-dialog/alert-dialog.js.map +1 -1
  7. package/cdn/elements/avatar/avatar.js +1 -1
  8. package/cdn/elements/avatar/avatar.js.map +1 -1
  9. package/cdn/elements/carousel/carousel.js +1 -1
  10. package/cdn/elements/carousel/carousel.js.map +1 -1
  11. package/cdn/elements/combobox/combobox.d.ts.map +1 -1
  12. package/cdn/elements/combobox/combobox.js +2 -1
  13. package/cdn/elements/combobox/combobox.js.map +1 -1
  14. package/cdn/elements/dialog/dialog.d.ts +2 -1
  15. package/cdn/elements/dialog/dialog.d.ts.map +1 -1
  16. package/cdn/elements/dialog/dialog.js.map +1 -1
  17. package/cdn/elements/dialog/dialog.styles.js +1 -1
  18. package/cdn/elements/dialog/dialog.styles.js.map +1 -1
  19. package/cdn/elements/drawer/drawer.d.ts +7 -7
  20. package/cdn/elements/drawer/drawer.js +1 -1
  21. package/cdn/elements/drawer/drawer.js.map +1 -1
  22. package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
  23. package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
  24. package/cdn/elements/input-otp/input-otp.d.ts +2 -2
  25. package/cdn/elements/input-otp/input-otp.js.map +1 -1
  26. package/cdn/elements/prose-editor/prose-editor.js +1 -1
  27. package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
  28. package/cdn/elements/rating/rating.js +1 -1
  29. package/cdn/elements/rating/rating.js.map +1 -1
  30. package/cdn/elements/select/select.d.ts.map +1 -1
  31. package/cdn/elements/select/select.js +2 -1
  32. package/cdn/elements/select/select.js.map +1 -1
  33. package/cdn/elements/slider/slider.js +1 -1
  34. package/cdn/elements/slider/slider.js.map +1 -1
  35. package/cdn/elements/stories-viewer/stories-viewer.js +1 -1
  36. package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
  37. package/cdn/elements/table/table.meta.d.ts +55 -0
  38. package/cdn/elements/table/table.meta.d.ts.map +1 -0
  39. package/cdn/elements/table/table.meta.js +0 -0
  40. package/cdn/elements/tag/tag.js +1 -1
  41. package/cdn/elements/tag/tag.js.map +1 -1
  42. package/cdn/elements/tree/tree.js +1 -1
  43. package/cdn/elements/tree/tree.js.map +1 -1
  44. package/cdn/elements/tree-item/tree-item.js +1 -1
  45. package/cdn/elements/tree-item/tree-item.js.map +1 -1
  46. package/cdn/shared/controllers/listbox-nav.d.ts +7 -0
  47. package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
  48. package/cdn/shared/controllers/listbox-nav.js +1 -1
  49. package/cdn/shared/controllers/listbox-nav.js.map +1 -1
  50. package/cdn/shared/styles/button-core.styles.js +1 -1
  51. package/cdn/shared/styles/button-core.styles.js.map +1 -1
  52. package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
  53. package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
  54. package/cdn/shared/styles/picker-core.styles.js +1 -1
  55. package/cdn/shared/styles/picker-core.styles.js.map +1 -1
  56. package/cdn/standalone.css +392 -86
  57. package/cdn/standalone.js +38 -28
  58. package/cdn/standalone.js.map +1 -1
  59. package/cdn/styles/base.css +11 -0
  60. package/cdn/styles/elements/breadcrumb.css +2 -2
  61. package/cdn/styles/elements/button.css +2 -2
  62. package/cdn/styles/elements/checkbox.css +2 -2
  63. package/cdn/styles/elements/close-button/circle.css +2 -2
  64. package/cdn/styles/elements/close-button/ring.css +2 -2
  65. package/cdn/styles/elements/close-button/square.css +2 -2
  66. package/cdn/styles/elements/disclosure.css +2 -2
  67. package/cdn/styles/elements/input-otp.css +20 -4
  68. package/cdn/styles/elements/input-stepper/default.css +2 -2
  69. package/cdn/styles/elements/input-stepper/pill.css +2 -2
  70. package/cdn/styles/elements/input-stepper/rounded.css +2 -2
  71. package/cdn/styles/elements/input.css +50 -17
  72. package/cdn/styles/elements/prose-editor.css +26 -11
  73. package/cdn/styles/elements/radio-group.css +2 -2
  74. package/cdn/styles/elements/radio.css +2 -2
  75. package/cdn/styles/elements/segmented-control.css +2 -2
  76. package/cdn/styles/elements/select.css +26 -5
  77. package/cdn/styles/elements/story.css +2 -2
  78. package/cdn/styles/elements/switch.css +2 -2
  79. package/cdn/styles/elements/table.css +186 -0
  80. package/cdn/styles/elements/tabs/enclosed.css +4 -4
  81. package/cdn/styles/elements/tabs/line.css +4 -4
  82. package/cdn/styles/elements/textarea.css +23 -9
  83. package/cdn/styles/preset.css +21 -2
  84. package/cdn/styles/tokens/aliases.css +6 -2
  85. package/cdn/styles/tokens/forms.css +4 -0
  86. package/cdn/styles/tokens.css +10 -2
  87. package/dist/css/base.css +11 -0
  88. package/dist/css/elements/breadcrumb.css +2 -2
  89. package/dist/css/elements/button.css +2 -2
  90. package/dist/css/elements/checkbox.css +2 -2
  91. package/dist/css/elements/close-button/circle.css +2 -2
  92. package/dist/css/elements/close-button/ring.css +2 -2
  93. package/dist/css/elements/close-button/square.css +2 -2
  94. package/dist/css/elements/disclosure.css +2 -2
  95. package/dist/css/elements/input-otp.css +20 -4
  96. package/dist/css/elements/input-stepper/default.css +2 -2
  97. package/dist/css/elements/input-stepper/pill.css +2 -2
  98. package/dist/css/elements/input-stepper/rounded.css +2 -2
  99. package/dist/css/elements/input.css +50 -17
  100. package/dist/css/elements/prose-editor.css +26 -11
  101. package/dist/css/elements/radio-group.css +2 -2
  102. package/dist/css/elements/radio.css +2 -2
  103. package/dist/css/elements/segmented-control.css +2 -2
  104. package/dist/css/elements/select.css +26 -5
  105. package/dist/css/elements/story.css +2 -2
  106. package/dist/css/elements/switch.css +2 -2
  107. package/dist/css/elements/table.css +186 -0
  108. package/dist/css/elements/tabs/enclosed.css +4 -4
  109. package/dist/css/elements/tabs/line.css +4 -4
  110. package/dist/css/elements/textarea.css +23 -9
  111. package/dist/css/preset.css +21 -2
  112. package/dist/css/tokens/aliases.css +6 -2
  113. package/dist/css/tokens/forms.css +4 -0
  114. package/dist/css/tokens.css +10 -2
  115. package/dist/custom-elements.json +295 -169
  116. package/dist/elements/alert-dialog/alert-dialog.d.ts +3 -2
  117. package/dist/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
  118. package/dist/elements/alert-dialog/alert-dialog.js +3 -2
  119. package/dist/elements/avatar/avatar.css +2 -2
  120. package/dist/elements/carousel/carousel.css +18 -0
  121. package/dist/elements/combobox/combobox.css +9 -0
  122. package/dist/elements/combobox/combobox.d.ts.map +1 -1
  123. package/dist/elements/combobox/combobox.js +1 -0
  124. package/dist/elements/dialog/dialog.css +12 -0
  125. package/dist/elements/dialog/dialog.d.ts +2 -1
  126. package/dist/elements/dialog/dialog.d.ts.map +1 -1
  127. package/dist/elements/dialog/dialog.js +2 -1
  128. package/dist/elements/drawer/drawer.css +11 -1
  129. package/dist/elements/drawer/drawer.d.ts +7 -7
  130. package/dist/elements/drawer/drawer.js +7 -7
  131. package/dist/elements/dropdown-item/dropdown-item.css +5 -4
  132. package/dist/elements/input-otp/input-otp.d.ts +2 -2
  133. package/dist/elements/input-otp/input-otp.js +2 -2
  134. package/dist/elements/prose-editor/prose-editor.css +5 -3
  135. package/dist/elements/rating/rating.css +9 -10
  136. package/dist/elements/select/select.css +10 -9
  137. package/dist/elements/select/select.d.ts.map +1 -1
  138. package/dist/elements/select/select.js +1 -0
  139. package/dist/elements/slider/slider.css +5 -1
  140. package/dist/elements/stories-viewer/stories-viewer.css +10 -2
  141. package/dist/elements/table/table.meta.d.ts +55 -0
  142. package/dist/elements/table/table.meta.d.ts.map +1 -0
  143. package/dist/elements/table/table.meta.js +65 -0
  144. package/dist/elements/tag/tag.css +4 -4
  145. package/dist/elements/tree/tree.css +3 -3
  146. package/dist/elements/tree-item/tree-item.css +5 -3
  147. package/dist/metadata/alert-dialog.json +90 -85
  148. package/dist/metadata/alert.json +22 -22
  149. package/dist/metadata/avatar.json +26 -26
  150. package/dist/metadata/badge.json +13 -13
  151. package/dist/metadata/breadcrumb.json +9 -9
  152. package/dist/metadata/button.json +40 -40
  153. package/dist/metadata/carousel.json +133 -133
  154. package/dist/metadata/checkbox.json +13 -13
  155. package/dist/metadata/close-button.json +15 -15
  156. package/dist/metadata/color-scheme-icon.json +13 -13
  157. package/dist/metadata/combobox.json +77 -94
  158. package/dist/metadata/dialog.json +49 -44
  159. package/dist/metadata/disclosure.json +17 -17
  160. package/dist/metadata/divider.json +12 -12
  161. package/dist/metadata/drawer.json +61 -61
  162. package/dist/metadata/dropdown-item.json +50 -50
  163. package/dist/metadata/dropdown.json +32 -32
  164. package/dist/metadata/form-field.json +15 -15
  165. package/dist/metadata/icon.json +8 -8
  166. package/dist/metadata/index.json +1761 -1765
  167. package/dist/metadata/input-group.json +5 -5
  168. package/dist/metadata/input-otp.json +17 -17
  169. package/dist/metadata/input-stepper.json +24 -24
  170. package/dist/metadata/input.json +31 -31
  171. package/dist/metadata/popover.json +49 -49
  172. package/dist/metadata/progress.json +15 -15
  173. package/dist/metadata/prose-editor.json +110 -116
  174. package/dist/metadata/radio.json +15 -15
  175. package/dist/metadata/rating.json +25 -47
  176. package/dist/metadata/segmented-control.json +24 -46
  177. package/dist/metadata/select.json +81 -98
  178. package/dist/metadata/skeleton.json +12 -12
  179. package/dist/metadata/slider.json +60 -78
  180. package/dist/metadata/spinner.json +5 -5
  181. package/dist/metadata/sticky-bar.json +13 -13
  182. package/dist/metadata/stories-viewer.json +105 -105
  183. package/dist/metadata/stories.json +17 -17
  184. package/dist/metadata/story.json +41 -41
  185. package/dist/metadata/switch.json +9 -9
  186. package/dist/metadata/table.json +88 -0
  187. package/dist/metadata/tabs.json +26 -26
  188. package/dist/metadata/tag.json +50 -50
  189. package/dist/metadata/textarea.json +28 -28
  190. package/dist/metadata/toast.json +16 -16
  191. package/dist/metadata/tooltip.json +49 -49
  192. package/dist/metadata/tree-item.json +73 -73
  193. package/dist/metadata/tree.json +39 -39
  194. package/dist/shared/controllers/listbox-nav.d.ts +7 -0
  195. package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
  196. package/dist/shared/controllers/listbox-nav.js +12 -0
  197. package/dist/shared/styles/button-core.css +2 -2
  198. package/dist/shared/styles/checkbox-appearance.css +2 -2
  199. package/dist/shared/styles/picker-core.css +31 -7
  200. package/dist/templates/elements/alert-dialog.md +19 -18
  201. package/dist/templates/elements/alert.md +4 -4
  202. package/dist/templates/elements/avatar.md +9 -9
  203. package/dist/templates/elements/badge.md +4 -4
  204. package/dist/templates/elements/breadcrumb.md +4 -4
  205. package/dist/templates/elements/button.md +8 -8
  206. package/dist/templates/elements/carousel.md +32 -32
  207. package/dist/templates/elements/checkbox.md +4 -4
  208. package/dist/templates/elements/close-button.md +2 -2
  209. package/dist/templates/elements/color-scheme-icon.md +13 -13
  210. package/dist/templates/elements/combobox.md +19 -19
  211. package/dist/templates/elements/dialog.md +11 -10
  212. package/dist/templates/elements/disclosure.md +3 -3
  213. package/dist/templates/elements/divider.md +2 -2
  214. package/dist/templates/elements/drawer.md +15 -15
  215. package/dist/templates/elements/dropdown.md +15 -15
  216. package/dist/templates/elements/form-field.md +3 -3
  217. package/dist/templates/elements/icon.md +1 -1
  218. package/dist/templates/elements/input-otp.md +5 -5
  219. package/dist/templates/elements/input-stepper.md +4 -4
  220. package/dist/templates/elements/input.md +15 -8
  221. package/dist/templates/elements/popover.md +8 -8
  222. package/dist/templates/elements/progress.md +3 -3
  223. package/dist/templates/elements/prose-editor.md +38 -39
  224. package/dist/templates/elements/radio.md +6 -6
  225. package/dist/templates/elements/rating.md +5 -13
  226. package/dist/templates/elements/segmented-control.md +4 -4
  227. package/dist/templates/elements/select.md +23 -23
  228. package/dist/templates/elements/skeleton.md +2 -2
  229. package/dist/templates/elements/slider.md +13 -13
  230. package/dist/templates/elements/spinner.md +1 -1
  231. package/dist/templates/elements/sticky-bar.md +2 -2
  232. package/dist/templates/elements/stories-viewer.md +29 -29
  233. package/dist/templates/elements/stories.md +4 -4
  234. package/dist/templates/elements/story.md +11 -11
  235. package/dist/templates/elements/switch.md +5 -5
  236. package/dist/templates/elements/table.md +210 -0
  237. package/dist/templates/elements/tabs.md +4 -4
  238. package/dist/templates/elements/tag.md +14 -14
  239. package/dist/templates/elements/textarea.md +8 -8
  240. package/dist/templates/elements/toast.md +4 -4
  241. package/dist/templates/elements/tooltip.md +9 -9
  242. package/dist/templates/elements/tree-item.md +18 -18
  243. package/dist/templates/elements/tree.md +13 -13
  244. package/dist/templates/foundations/focus.md +303 -0
  245. package/elements.json +9 -0
  246. package/package.json +1 -1
  247. package/postcss-plugin-prefix.js +2 -2
  248. package/templates/SKILL.md.tpl +1 -0
  249. package/templates/choosing-elements.md.tpl +1 -0
@@ -245,12 +245,25 @@
245
245
  }
246
246
  }
247
247
 
248
- /* Focus: border takes the ring color plus the soft halo, matching l-input. */
248
+ /* Focus: border takes the ring color plus the soft halo, matching l-input.
249
+ The --l-form-control-focus-border-width stroke is an outline drawn inward
250
+ over the border (the box, the text and the picker icon never move; 0 by
251
+ default: nothing drawn), and box-shadow carries the halo alone (0 wide
252
+ paints nothing). */
249
253
  &:focus-visible {
250
- border-color: var(--l-focus-ring);
251
- outline: 2px solid transparent;
252
- outline-offset: 2px;
253
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--l-focus-ring) 22%, transparent);
254
+ border-color: var(--l-focus-ring-color);
255
+ outline: var(--l-form-control-focus-border-width) solid var(--l-focus-ring-color);
256
+ outline-offset: calc(var(--l-form-control-focus-border-width) * -1);
257
+ box-shadow: 0 0 0 var(--l-form-control-focus-halo-width)
258
+ color-mix(in oklab, var(--l-focus-ring-color) 22%, transparent);
259
+
260
+ /* Forced colors: the system palette overrides border-color and drops the
261
+ halo. A transparent outline is forced to a visible system color: it is
262
+ the indicator there. */
263
+ @media (forced-colors: active) {
264
+ outline: var(--l-focus-ring-width) solid transparent;
265
+ outline-offset: var(--l-focus-ring-offset);
266
+ }
254
267
  }
255
268
 
256
269
  /* Invalid: red border + faint danger wash. Ordered after focus so the red
@@ -265,6 +278,14 @@
265
278
  );
266
279
  }
267
280
 
281
+ /* Focused and invalid: the stroke and the halo follow the invalid border,
282
+ as on .l-input / .l-textarea. */
283
+ &:is(:user-invalid, [aria-invalid='true']):focus-visible {
284
+ outline-color: var(--l-form-control-border-color-invalid);
285
+ box-shadow: 0 0 0 var(--l-form-control-focus-halo-width)
286
+ color-mix(in oklab, var(--l-form-control-border-color-invalid) 22%, transparent);
287
+ }
288
+
268
289
  &:disabled {
269
290
  cursor: not-allowed;
270
291
  border-color: var(--l-form-control-border-color-disabled);
@@ -85,8 +85,8 @@
85
85
 
86
86
  /* Focus ring hugs the thumbnail shape (circle, portrait, etc.) — label stays outside the ring. */
87
87
  .l-story-trigger:focus-visible .l-story-thumb {
88
- outline: 2px solid var(--l-focus-ring);
89
- outline-offset: 3px;
88
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
89
+ outline-offset: var(--l-focus-ring-offset);
90
90
  }
91
91
 
92
92
  .l-story-trigger:hover .l-story-thumb {
@@ -135,8 +135,8 @@
135
135
  }
136
136
 
137
137
  &:focus-visible {
138
- outline: 2px solid var(--l-focus-ring);
139
- outline-offset: 2px;
138
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
139
+ outline-offset: var(--l-focus-ring-offset);
140
140
  }
141
141
 
142
142
  /* Invalid: after interaction (`:user-invalid`) or forced via `aria-invalid`
@@ -0,0 +1,186 @@
1
+ @layer components {
2
+ /**
3
+ * Table — `.l-table` on a native `<table>` holding records.
4
+ *
5
+ * CSS only. The states it shows are platform states, written in the markup:
6
+ *
7
+ * sort `aria-sort` on a `<th>` holding a `<button>` (APG sortable
8
+ * table example), or a link when the server sorts
9
+ *
10
+ * Rows are sized on the control scale (`--l-size-control-*`) plus a fixed
11
+ * block padding, so a control of the table's size fits a row exactly.
12
+ *
13
+ * Selectors walk `thead | tbody | tfoot > tr > cell` from the table so a table
14
+ * nested in a cell keeps its own styles.
15
+ *
16
+ * - https://www.w3.org/WAI/ARIA/apg/patterns/table/
17
+ * - https://www.w3.org/WAI/ARIA/apg/patterns/table/examples/sortable-table/
18
+ */
19
+
20
+ .l-table {
21
+ /* Public knobs */
22
+ --row-height: calc(var(--_size) + 2 * var(--_padding-block));
23
+ --background-color: var(--l-color-surface);
24
+ --border-color: var(--l-color-divider);
25
+
26
+ --_size: var(--l-size-control-md);
27
+ --_padding-block: var(--l-spacing-1);
28
+ --_padding-inline: var(--l-spacing-3);
29
+
30
+ inline-size: 100%;
31
+ /* `separate`: a sticky header loses its borders under `collapse`. */
32
+ border-collapse: separate;
33
+ border-spacing: 0;
34
+ background-color: var(--background-color);
35
+ color: var(--l-color-text-primary);
36
+ font-size: var(--l-text-sm);
37
+ /* Digits take the same width everywhere, so figures line up down a column. */
38
+ font-variant-numeric: tabular-nums;
39
+ line-height: var(--l-text-sm--line-height);
40
+
41
+ &[data-size='sm'] {
42
+ --_size: var(--l-size-control-sm);
43
+ --_padding-inline: var(--l-spacing-2);
44
+ }
45
+
46
+ &[data-size='lg'] {
47
+ --_size: var(--l-size-control-lg);
48
+ --_padding-inline: var(--l-spacing-4);
49
+ }
50
+
51
+ & > caption {
52
+ padding-block-end: var(--l-spacing-2);
53
+ font-weight: var(--l-font-weight-semibold);
54
+ text-align: start;
55
+ }
56
+
57
+ /* ── Cells ───────────────────────────────────────────────────────────── */
58
+
59
+ & > :where(thead, tbody, tfoot) > :where(tr) > :where(th, td) {
60
+ /* On a table cell a block size is a minimum: content still grows it.
61
+ Border-box, so the row height includes the padding. */
62
+ box-sizing: border-box;
63
+ block-size: var(--row-height);
64
+ border-block-end: 1px solid var(--border-color);
65
+ padding-block: var(--_padding-block);
66
+ padding-inline: var(--_padding-inline);
67
+ text-align: start;
68
+ vertical-align: middle;
69
+ }
70
+
71
+ /* A row header names its row; it reads as data, not as a column title. */
72
+ & > :where(tbody, tfoot) > :where(tr) > :where(th) {
73
+ font-weight: inherit;
74
+ }
75
+
76
+ /* Alignment, set on a column's header and cells: `end` for figures. */
77
+ & > :where(thead, tbody, tfoot) > :where(tr) > :where([data-align='center']) {
78
+ text-align: center;
79
+ }
80
+
81
+ & > :where(thead, tbody, tfoot) > :where(tr) > :where([data-align='end']) {
82
+ text-align: end;
83
+ }
84
+
85
+ /* Only the table's last row group drops its closing rule; the others keep
86
+ it, which separates one group from the next. */
87
+ & > tbody:last-of-type > tr:last-child > :where(th, td),
88
+ & > tfoot > tr:last-child > :where(th, td) {
89
+ border-block-end: 0;
90
+ }
91
+
92
+ /* ── Header ──────────────────────────────────────────────────────────── */
93
+
94
+ /* Sticks to the top of its scroll container, opaque over the rows. */
95
+ & > thead > tr > :where(th) {
96
+ position: sticky;
97
+ inset-block-start: 0;
98
+ z-index: 1;
99
+ border-block-end-color: var(--l-color-border);
100
+ background-color: var(--background-color);
101
+ color: var(--l-color-text-secondary);
102
+ font-weight: var(--l-font-weight-medium);
103
+ white-space: nowrap;
104
+ }
105
+
106
+ /* Sortable header: the button (or link) is the control, `aria-sort` on its
107
+ `<th>` is the state. The glyph is a mask painted with `currentColor`, so
108
+ `color` on the `::after` recolors it. An `.l-button` in a header is some
109
+ other action (column settings, a menu) and keeps its own look. */
110
+ & > thead > tr > th > :is(button, a):not(.l-button) {
111
+ display: inline-flex;
112
+ align-items: center;
113
+ gap: var(--l-spacing-1);
114
+ margin: 0;
115
+ border: 0;
116
+ border-radius: var(--l-radius-sm);
117
+ padding: 0;
118
+ background: none;
119
+ color: inherit;
120
+ font: inherit;
121
+ text-align: inherit;
122
+ text-decoration: none;
123
+ cursor: pointer;
124
+
125
+ &::after {
126
+ --_sort-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 6.5 8 3.5l3 3M5 9.5l3 3 3-3' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
127
+ content: '';
128
+ flex: none;
129
+ inline-size: 1em;
130
+ block-size: 1em;
131
+ color: var(--l-color-text-tertiary);
132
+ background-color: currentColor;
133
+ mask: var(--_sort-icon) center / contain no-repeat;
134
+ }
135
+
136
+ &:focus-visible {
137
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
138
+ outline-offset: var(--l-focus-ring-offset);
139
+ }
140
+
141
+ @media (hover: hover) {
142
+ &:hover:not(:disabled) {
143
+ color: var(--l-color-text-primary);
144
+ }
145
+ }
146
+
147
+ /* A column the current query cannot sort by. */
148
+ &:disabled {
149
+ cursor: not-allowed;
150
+ opacity: 0.4;
151
+ }
152
+ }
153
+
154
+ /* In an end-aligned column the label sits flush with the figures below it. */
155
+ & > thead > tr > th[data-align='end'] > :is(button, a):not(.l-button) {
156
+ flex-direction: row-reverse;
157
+ }
158
+
159
+ &
160
+ > thead
161
+ > tr
162
+ > th:is([aria-sort='ascending'], [aria-sort='descending'])
163
+ > :is(button, a):not(.l-button) {
164
+ color: var(--l-color-text-primary);
165
+
166
+ &::after {
167
+ color: inherit;
168
+ }
169
+ }
170
+
171
+ & > thead > tr > th[aria-sort='ascending'] > :is(button, a):not(.l-button)::after {
172
+ --_sort-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 12.5v-9M4.5 7 8 3.5 11.5 7' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
173
+ }
174
+
175
+ & > thead > tr > th[aria-sort='descending'] > :is(button, a):not(.l-button)::after {
176
+ --_sort-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v9M4.5 9 8 12.5 11.5 9' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
177
+ }
178
+
179
+ /* ── Totals ──────────────────────────────────────────────────────────── */
180
+
181
+ & > tfoot > tr:first-child > :where(th, td) {
182
+ border-block-start: 1px solid var(--l-color-border);
183
+ font-weight: var(--l-font-weight-medium);
184
+ }
185
+ }
186
+ }
@@ -87,8 +87,8 @@
87
87
  }
88
88
 
89
89
  &:focus-visible {
90
- outline: 2px solid var(--l-focus-ring);
91
- outline-offset: -2px;
90
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
91
+ outline-offset: calc(var(--l-focus-ring-width) * -1);
92
92
  border-radius: var(--l-radius-sm);
93
93
  }
94
94
  }
@@ -101,8 +101,8 @@
101
101
 
102
102
  l-tabs > :not(:first-child) {
103
103
  &:focus-visible {
104
- outline: 2px solid var(--l-focus-ring);
105
- outline-offset: 2px;
104
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
105
+ outline-offset: var(--l-focus-ring-offset);
106
106
  border-radius: var(--l-radius-sm);
107
107
  }
108
108
  }
@@ -87,8 +87,8 @@
87
87
  }
88
88
 
89
89
  &:focus-visible {
90
- outline: 2px solid var(--l-focus-ring);
91
- outline-offset: -2px;
90
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
91
+ outline-offset: calc(var(--l-focus-ring-width) * -1);
92
92
  border-radius: var(--l-radius-sm);
93
93
  }
94
94
  }
@@ -101,8 +101,8 @@
101
101
 
102
102
  l-tabs > :not(:first-child) {
103
103
  &:focus-visible {
104
- outline: 2px solid var(--l-focus-ring);
105
- outline-offset: 2px;
104
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
105
+ outline-offset: var(--l-focus-ring-offset);
106
106
  border-radius: var(--l-radius-sm);
107
107
  }
108
108
  }
@@ -56,13 +56,10 @@
56
56
  }
57
57
  }
58
58
 
59
- /* Focus: the border takes the focus-ring color; the soft halo lives in the
60
- rule below. The transparent outline keeps a visible indicator under
61
- forced colors. */
59
+ /* Focus: the border takes the focus-ring color; the focus stroke width and
60
+ the soft halo live in the rule below. */
62
61
  &:focus-visible {
63
- border-color: var(--l-focus-ring);
64
- outline: 2px solid transparent;
65
- outline-offset: 2px;
62
+ border-color: var(--l-focus-ring-color);
66
63
  }
67
64
 
68
65
  /* Invalid: red border + a faint danger wash. After interaction
@@ -96,16 +93,33 @@
96
93
  }
97
94
  }
98
95
 
99
- /* Soft focus halo. */
96
+ /* Focus stroke + soft halo — same recipe as `.l-input`. The
97
+ --l-form-control-focus-border-width stroke is an outline drawn inward over
98
+ the border (the box and the text never move; 0 by default: nothing drawn),
99
+ and box-shadow carries the halo alone, 0 wide
100
+ (--l-form-control-focus-halo-width: 0) painting nothing.
101
+ The outline paints above the content, so it stays whole over a scrollbar. */
100
102
  :is(.l-textarea, :where(l-form-field:not([unstyled])) > textarea):focus-visible {
101
- box-shadow: 0 0 0 3px color-mix(in oklab, var(--l-focus-ring) 22%, transparent);
103
+ outline: var(--l-form-control-focus-border-width) solid var(--l-focus-ring-color);
104
+ outline-offset: calc(var(--l-form-control-focus-border-width) * -1);
105
+ box-shadow: 0 0 0 var(--l-form-control-focus-halo-width)
106
+ color-mix(in oklab, var(--l-focus-ring-color) 22%, transparent);
107
+
108
+ /* Forced colors: the system palette overrides border-color and drops the
109
+ halo. A transparent outline is forced to a visible system color: it is
110
+ the indicator there. */
111
+ @media (forced-colors: active) {
112
+ outline: var(--l-focus-ring-width) solid transparent;
113
+ outline-offset: var(--l-focus-ring-offset);
114
+ }
102
115
  }
103
116
 
104
117
  :is(.l-textarea, :where(l-form-field:not([unstyled])) > textarea):is(
105
118
  :user-invalid,
106
119
  [aria-invalid='true']
107
120
  ):focus-visible {
108
- box-shadow: 0 0 0 3px
121
+ outline-color: var(--l-form-control-border-color-invalid);
122
+ box-shadow: 0 0 0 var(--l-form-control-focus-halo-width)
109
123
  color-mix(in oklab, var(--l-form-control-border-color-invalid) 22%, transparent);
110
124
  }
111
125
 
@@ -699,6 +699,17 @@ In dark mode, mixes the base color with black (default 15% black).
699
699
  l-tooltip:not(:defined) {
700
700
  display: none;
701
701
  }
702
+
703
+ /* Plain links, buttons and summaries — the ones no Luxen class styles — take
704
+ the same focus ring as the elements, instead of the browser default,
705
+ whose contrast is not guaranteed on a themed page. Zero specificity, in
706
+ the base layer: every element rule and any consumer rule wins over it.
707
+ Tags only, no `[tabindex]`: a document rule beats a shadow `:host` rule,
708
+ so it would ring custom-element hosts that draw their own ring inside. */
709
+ :where(a:any-link, button, summary):focus-visible {
710
+ outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);
711
+ outline-offset: var(--l-focus-ring-offset);
712
+ }
702
713
  }
703
714
  /* Design tokens — primitives (palette + scales) and semantic aliases. */
704
715
  /* Luxen design tokens — primitives (core 5 color families + spacing + radius
@@ -930,8 +941,12 @@ In dark mode, mixes the base color with black (default 15% black).
930
941
  --l-shadow-md: 0 4px 6px -1px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 40%)), 0 2px 4px -2px light-dark(rgb(0 0 0 / 6%), rgb(0 0 0 / 34%));
931
942
  /* Large elevation for prominent detached surfaces that float free of any edge — inset drawers, floating panels, large menus. The shadow color uses light-dark() so it deepens in dark mode. */
932
943
  --l-shadow-lg: 0 10px 15px -3px light-dark(rgb(0 0 0 / 10%), rgb(0 0 0 / 50%)), 0 4px 6px -4px light-dark(rgb(0 0 0 / 10%), rgb(0 0 0 / 44%));
933
- /* Focus ring color for :focus-visible outlines on interactive elements like buttons, inputs, and links. */
934
- --l-focus-ring: #d9461f;
944
+ /* Color of the focus indicator, shown on :focus-visible: the ring around buttons, checkbox, radio, switch, tabs, tags, menu and tree items, links, and the border and halo of a focused text field. Keep at least 3:1 against every surface it lands on (WCAG 1.4.11) — the default gives 4.3:1 on white and 4.1:1 on the dark surface. Re-theme it on an ancestor to scope it, e.g. a lighter color over a photo. */
945
+ --l-focus-ring-color: #d9461f;
946
+ /* Thickness of the :focus-visible ring drawn around interactive elements — buttons, checkbox, radio, switch, slider thumb, rating, tabs, tags, menu and tree items, toolbar and adornment buttons, close buttons, avatars, breadcrumb links. Keep it at 2px or more (WCAG 2.4.13). Rings set inside their element (items laid edge to edge — menu items, tabs, segmented control — where an outer ring would overlap a neighbor or the panel edge) grow inward with it. Text fields show focus on their border instead: see --l-form-control-focus-border-width, which a consumer can point at this token for one focus thickness everywhere. */
947
+ --l-focus-ring-width: 2px;
948
+ /* Gap between an element and its :focus-visible ring, so the ring reads apart from the element's own border or fill. Rings set inside their element (menu items, tabs, segmented control, disclosure summary — items laid edge to edge, where an outer ring would overlap a neighbor or the panel edge) ignore it and sit flush inside the edge instead. */
949
+ --l-focus-ring-offset: 2px;
935
950
  /* Standard interactive control height (28px) for extra-small elements like compact buttons, tags, and inline controls. */
936
951
  --l-size-control-xs: 1.75rem;
937
952
  /* Standard interactive control height (32px) for small elements like secondary buttons, small selects, and tight-layout controls. */
@@ -965,6 +980,10 @@ In dark mode, mixes the base color with black (default 15% black).
965
980
  --l-form-control-border-color: var(--l-color-border);
966
981
  /* Border width of text fields and of the checkbox and radio box. */
967
982
  --l-form-control-border-width: 1px;
983
+ /* Width of the stroke drawn on a focused text field (input, textarea, native select, input group, l-select and its search box, l-combobox, l-prose-editor, the active l-input-otp cell), in the focus-ring color (the invalid color on an invalid field). Drawn inward from the outer edge, over the border: the control keeps its size and its text does not move. The default `2px` covers the 1px border and 1px more inside, so a focused field reads as clearly as a ring around a button. A value at or below --l-form-control-border-width adds nothing visible: the resting border alone takes the focus color. */
984
+ --l-form-control-focus-border-width: 2px;
985
+ /* Width of the soft halo around a focused text field — a ring of the focus-ring color (the invalid color on an invalid field) at 22% opacity, outside the border. Set to `0` for a crisp stroke with no halo, typically together with --l-form-control-focus-border-width. The color is mixed at the control, so a --l-focus-ring-color re-themed on an ancestor recolors the halo too. */
986
+ --l-form-control-focus-halo-width: 3px;
968
987
  /* Corner radius of text fields (input, textarea, select, input group). Toggles keep their own shape. */
969
988
  --l-form-control-border-radius: var(--l-radius-md);
970
989
  /* Border color of a hovered form control (text fields, checkbox, radio). Also tints the hover halo of an unchecked checkbox or radio. */
@@ -92,8 +92,12 @@
92
92
  --l-shadow-md: 0 4px 6px -1px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 40%)), 0 2px 4px -2px light-dark(rgb(0 0 0 / 6%), rgb(0 0 0 / 34%));
93
93
  /* Large elevation for prominent detached surfaces that float free of any edge — inset drawers, floating panels, large menus. The shadow color uses light-dark() so it deepens in dark mode. */
94
94
  --l-shadow-lg: 0 10px 15px -3px light-dark(rgb(0 0 0 / 10%), rgb(0 0 0 / 50%)), 0 4px 6px -4px light-dark(rgb(0 0 0 / 10%), rgb(0 0 0 / 44%));
95
- /* Focus ring color for :focus-visible outlines on interactive elements like buttons, inputs, and links. */
96
- --l-focus-ring: #d9461f;
95
+ /* Color of the focus indicator, shown on :focus-visible: the ring around buttons, checkbox, radio, switch, tabs, tags, menu and tree items, links, and the border and halo of a focused text field. Keep at least 3:1 against every surface it lands on (WCAG 1.4.11) — the default gives 4.3:1 on white and 4.1:1 on the dark surface. Re-theme it on an ancestor to scope it, e.g. a lighter color over a photo. */
96
+ --l-focus-ring-color: #d9461f;
97
+ /* Thickness of the :focus-visible ring drawn around interactive elements — buttons, checkbox, radio, switch, slider thumb, rating, tabs, tags, menu and tree items, toolbar and adornment buttons, close buttons, avatars, breadcrumb links. Keep it at 2px or more (WCAG 2.4.13). Rings set inside their element (items laid edge to edge — menu items, tabs, segmented control — where an outer ring would overlap a neighbor or the panel edge) grow inward with it. Text fields show focus on their border instead: see --l-form-control-focus-border-width, which a consumer can point at this token for one focus thickness everywhere. */
98
+ --l-focus-ring-width: 2px;
99
+ /* Gap between an element and its :focus-visible ring, so the ring reads apart from the element's own border or fill. Rings set inside their element (menu items, tabs, segmented control, disclosure summary — items laid edge to edge, where an outer ring would overlap a neighbor or the panel edge) ignore it and sit flush inside the edge instead. */
100
+ --l-focus-ring-offset: 2px;
97
101
  /* Standard interactive control height (28px) for extra-small elements like compact buttons, tags, and inline controls. */
98
102
  --l-size-control-xs: 1.75rem;
99
103
  /* Standard interactive control height (32px) for small elements like secondary buttons, small selects, and tight-layout controls. */
@@ -22,6 +22,10 @@
22
22
  --l-form-control-border-color: var(--l-color-border);
23
23
  /* Border width of text fields and of the checkbox and radio box. */
24
24
  --l-form-control-border-width: 1px;
25
+ /* Width of the stroke drawn on a focused text field (input, textarea, native select, input group, l-select and its search box, l-combobox, l-prose-editor, the active l-input-otp cell), in the focus-ring color (the invalid color on an invalid field). Drawn inward from the outer edge, over the border: the control keeps its size and its text does not move. The default `2px` covers the 1px border and 1px more inside, so a focused field reads as clearly as a ring around a button. A value at or below --l-form-control-border-width adds nothing visible: the resting border alone takes the focus color. */
26
+ --l-form-control-focus-border-width: 2px;
27
+ /* Width of the soft halo around a focused text field — a ring of the focus-ring color (the invalid color on an invalid field) at 22% opacity, outside the border. Set to `0` for a crisp stroke with no halo, typically together with --l-form-control-focus-border-width. The color is mixed at the control, so a --l-focus-ring-color re-themed on an ancestor recolors the halo too. */
28
+ --l-form-control-focus-halo-width: 3px;
25
29
  /* Corner radius of text fields (input, textarea, select, input group). Toggles keep their own shape. */
26
30
  --l-form-control-border-radius: var(--l-radius-md);
27
31
  /* Border color of a hovered form control (text fields, checkbox, radio). Also tints the hover halo of an unchecked checkbox or radio. */
@@ -225,8 +225,12 @@
225
225
  --l-shadow-md: 0 4px 6px -1px light-dark(rgb(0 0 0 / 8%), rgb(0 0 0 / 40%)), 0 2px 4px -2px light-dark(rgb(0 0 0 / 6%), rgb(0 0 0 / 34%));
226
226
  /* Large elevation for prominent detached surfaces that float free of any edge — inset drawers, floating panels, large menus. The shadow color uses light-dark() so it deepens in dark mode. */
227
227
  --l-shadow-lg: 0 10px 15px -3px light-dark(rgb(0 0 0 / 10%), rgb(0 0 0 / 50%)), 0 4px 6px -4px light-dark(rgb(0 0 0 / 10%), rgb(0 0 0 / 44%));
228
- /* Focus ring color for :focus-visible outlines on interactive elements like buttons, inputs, and links. */
229
- --l-focus-ring: #d9461f;
228
+ /* Color of the focus indicator, shown on :focus-visible: the ring around buttons, checkbox, radio, switch, tabs, tags, menu and tree items, links, and the border and halo of a focused text field. Keep at least 3:1 against every surface it lands on (WCAG 1.4.11) — the default gives 4.3:1 on white and 4.1:1 on the dark surface. Re-theme it on an ancestor to scope it, e.g. a lighter color over a photo. */
229
+ --l-focus-ring-color: #d9461f;
230
+ /* Thickness of the :focus-visible ring drawn around interactive elements — buttons, checkbox, radio, switch, slider thumb, rating, tabs, tags, menu and tree items, toolbar and adornment buttons, close buttons, avatars, breadcrumb links. Keep it at 2px or more (WCAG 2.4.13). Rings set inside their element (items laid edge to edge — menu items, tabs, segmented control — where an outer ring would overlap a neighbor or the panel edge) grow inward with it. Text fields show focus on their border instead: see --l-form-control-focus-border-width, which a consumer can point at this token for one focus thickness everywhere. */
231
+ --l-focus-ring-width: 2px;
232
+ /* Gap between an element and its :focus-visible ring, so the ring reads apart from the element's own border or fill. Rings set inside their element (menu items, tabs, segmented control, disclosure summary — items laid edge to edge, where an outer ring would overlap a neighbor or the panel edge) ignore it and sit flush inside the edge instead. */
233
+ --l-focus-ring-offset: 2px;
230
234
  /* Standard interactive control height (28px) for extra-small elements like compact buttons, tags, and inline controls. */
231
235
  --l-size-control-xs: 1.75rem;
232
236
  /* Standard interactive control height (32px) for small elements like secondary buttons, small selects, and tight-layout controls. */
@@ -260,6 +264,10 @@
260
264
  --l-form-control-border-color: var(--l-color-border);
261
265
  /* Border width of text fields and of the checkbox and radio box. */
262
266
  --l-form-control-border-width: 1px;
267
+ /* Width of the stroke drawn on a focused text field (input, textarea, native select, input group, l-select and its search box, l-combobox, l-prose-editor, the active l-input-otp cell), in the focus-ring color (the invalid color on an invalid field). Drawn inward from the outer edge, over the border: the control keeps its size and its text does not move. The default `2px` covers the 1px border and 1px more inside, so a focused field reads as clearly as a ring around a button. A value at or below --l-form-control-border-width adds nothing visible: the resting border alone takes the focus color. */
268
+ --l-form-control-focus-border-width: 2px;
269
+ /* Width of the soft halo around a focused text field — a ring of the focus-ring color (the invalid color on an invalid field) at 22% opacity, outside the border. Set to `0` for a crisp stroke with no halo, typically together with --l-form-control-focus-border-width. The color is mixed at the control, so a --l-focus-ring-color re-themed on an ancestor recolors the halo too. */
270
+ --l-form-control-focus-halo-width: 3px;
263
271
  /* Corner radius of text fields (input, textarea, select, input group). Toggles keep their own shape. */
264
272
  --l-form-control-border-radius: var(--l-radius-md);
265
273
  /* Border color of a hovered form control (text fields, checkbox, radio). Also tints the hover halo of an unchecked checkbox or radio. */