luxen-ui 0.6.2 → 0.8.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 (270) hide show
  1. package/bin/cli.mjs +54 -10
  2. package/cdn/chunks/decorate.js +1 -1
  3. package/cdn/chunks/floating-ui.dom.js +2 -0
  4. package/cdn/chunks/floating-ui.dom.js.map +1 -0
  5. package/cdn/chunks/lit-html.js +3 -0
  6. package/cdn/chunks/lit-html.js.map +1 -0
  7. package/cdn/chunks/lit.js +1 -2
  8. package/cdn/chunks/lit.js.map +1 -1
  9. package/cdn/chunks/module.js +717 -0
  10. package/cdn/chunks/module.js.map +1 -0
  11. package/cdn/chunks/native.js +2 -0
  12. package/cdn/chunks/native.js.map +1 -0
  13. package/cdn/chunks/static-html.js +2 -0
  14. package/cdn/chunks/static-html.js.map +1 -0
  15. package/cdn/custom-elements.json +1412 -12629
  16. package/cdn/elements/avatar/avatar.d.ts +5 -0
  17. package/cdn/elements/avatar/avatar.d.ts.map +1 -1
  18. package/cdn/elements/avatar/avatar.js +5 -5
  19. package/cdn/elements/avatar/avatar.js.map +1 -1
  20. package/cdn/elements/button/button.meta.d.ts +33 -0
  21. package/cdn/elements/button/button.meta.d.ts.map +1 -0
  22. package/cdn/elements/button/button.meta.js +0 -0
  23. package/cdn/elements/carousel/carousel.d.ts +6 -0
  24. package/cdn/elements/carousel/carousel.d.ts.map +1 -1
  25. package/cdn/elements/carousel/carousel.js +1 -1
  26. package/cdn/elements/carousel/carousel.js.map +1 -1
  27. package/cdn/elements/carousel-item/carousel-item.d.ts +2 -0
  28. package/cdn/elements/carousel-item/carousel-item.d.ts.map +1 -1
  29. package/cdn/elements/carousel-item/carousel-item.js +1 -1
  30. package/cdn/elements/carousel-item/carousel-item.js.map +1 -1
  31. package/cdn/elements/close-button/close-button.meta.d.ts +24 -0
  32. package/cdn/elements/close-button/close-button.meta.d.ts.map +1 -0
  33. package/cdn/elements/close-button/close-button.meta.js +0 -0
  34. package/cdn/elements/dialog/dialog.d.ts +12 -6
  35. package/cdn/elements/dialog/dialog.d.ts.map +1 -1
  36. package/cdn/elements/dialog/dialog.js +8 -5
  37. package/cdn/elements/dialog/dialog.js.map +1 -1
  38. package/cdn/elements/dialog/dialog.styles.js +1 -1
  39. package/cdn/elements/dialog/dialog.styles.js.map +1 -1
  40. package/cdn/elements/disclosure/disclosure.meta.d.ts +28 -0
  41. package/cdn/elements/disclosure/disclosure.meta.d.ts.map +1 -0
  42. package/cdn/elements/disclosure/disclosure.meta.js +0 -0
  43. package/cdn/elements/divider/divider.d.ts +1 -1
  44. package/cdn/elements/divider/divider.js.map +1 -1
  45. package/cdn/elements/drawer/drawer.d.ts +5 -0
  46. package/cdn/elements/drawer/drawer.d.ts.map +1 -1
  47. package/cdn/elements/drawer/drawer.js +1 -1
  48. package/cdn/elements/drawer/drawer.js.map +1 -1
  49. package/cdn/elements/dropdown/dropdown.d.ts +2 -0
  50. package/cdn/elements/dropdown/dropdown.d.ts.map +1 -1
  51. package/cdn/elements/dropdown/dropdown.js +1 -1
  52. package/cdn/elements/dropdown/dropdown.js.map +1 -1
  53. package/cdn/elements/dropdown-item/dropdown-item.d.ts +2 -0
  54. package/cdn/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
  55. package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
  56. package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
  57. package/cdn/elements/icon/icon.js +1 -1
  58. package/cdn/elements/icon/icon.js.map +1 -1
  59. package/cdn/elements/input-otp/input-otp.d.ts +2 -0
  60. package/cdn/elements/input-otp/input-otp.d.ts.map +1 -1
  61. package/cdn/elements/input-otp/input-otp.js.map +1 -1
  62. package/cdn/elements/input-stepper/input-stepper.d.ts +2 -0
  63. package/cdn/elements/input-stepper/input-stepper.d.ts.map +1 -1
  64. package/cdn/elements/input-stepper/input-stepper.js +1 -1
  65. package/cdn/elements/input-stepper/input-stepper.js.map +1 -1
  66. package/cdn/elements/kbd/kbd.meta.d.ts +14 -0
  67. package/cdn/elements/kbd/kbd.meta.d.ts.map +1 -0
  68. package/cdn/elements/kbd/kbd.meta.js +0 -0
  69. package/cdn/elements/popover/popover.js +1 -1
  70. package/cdn/elements/popover/popover.js.map +1 -1
  71. package/cdn/elements/progress/progress.meta.d.ts +22 -0
  72. package/cdn/elements/progress/progress.meta.d.ts.map +1 -0
  73. package/cdn/elements/progress/progress.meta.js +0 -0
  74. package/cdn/elements/prose-editor/index.d.ts +2 -0
  75. package/cdn/elements/prose-editor/index.d.ts.map +1 -0
  76. package/cdn/elements/prose-editor/index.js +2 -0
  77. package/cdn/elements/prose-editor/index.js.map +1 -0
  78. package/cdn/elements/prose-editor/prose-editor.d.ts +113 -0
  79. package/cdn/elements/prose-editor/prose-editor.d.ts.map +1 -0
  80. package/cdn/elements/prose-editor/prose-editor.js +180 -0
  81. package/cdn/elements/prose-editor/prose-editor.js.map +1 -0
  82. package/cdn/elements/rating/rating.d.ts +2 -0
  83. package/cdn/elements/rating/rating.d.ts.map +1 -1
  84. package/cdn/elements/rating/rating.js +1 -1
  85. package/cdn/elements/rating/rating.js.map +1 -1
  86. package/cdn/elements/select/select.meta.d.ts +28 -0
  87. package/cdn/elements/select/select.meta.d.ts.map +1 -0
  88. package/cdn/elements/select/select.meta.js +0 -0
  89. package/cdn/elements/skeleton/skeleton.d.ts +3 -0
  90. package/cdn/elements/skeleton/skeleton.d.ts.map +1 -1
  91. package/cdn/elements/skeleton/skeleton.js.map +1 -1
  92. package/cdn/elements/spinner/spinner.js +1 -1
  93. package/cdn/elements/spinner/spinner.js.map +1 -1
  94. package/cdn/elements/sticky-bar/sticky-bar.js +1 -1
  95. package/cdn/elements/sticky-bar/sticky-bar.js.map +1 -1
  96. package/cdn/elements/stories-viewer/stories-viewer.d.ts +1 -1
  97. package/cdn/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
  98. package/cdn/elements/stories-viewer/stories-viewer.js +26 -26
  99. package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
  100. package/cdn/elements/story/story.d.ts +10 -1
  101. package/cdn/elements/story/story.d.ts.map +1 -1
  102. package/cdn/elements/story/story.js +20 -20
  103. package/cdn/elements/story/story.js.map +1 -1
  104. package/cdn/elements/toast/toast.d.ts +5 -0
  105. package/cdn/elements/toast/toast.d.ts.map +1 -1
  106. package/cdn/elements/toast/toast.js.map +1 -1
  107. package/cdn/elements/tooltip/tooltip.js +1 -1
  108. package/cdn/elements/tooltip/tooltip.js.map +1 -1
  109. package/cdn/elements/tree/tree.d.ts +2 -0
  110. package/cdn/elements/tree/tree.d.ts.map +1 -1
  111. package/cdn/elements/tree/tree.js +1 -1
  112. package/cdn/elements/tree/tree.js.map +1 -1
  113. package/cdn/elements/tree-item/tree-item.d.ts +2 -0
  114. package/cdn/elements/tree-item/tree-item.d.ts.map +1 -1
  115. package/cdn/elements/tree-item/tree-item.js +1 -1
  116. package/cdn/elements/tree-item/tree-item.js.map +1 -1
  117. package/cdn/registry.d.ts +1 -1
  118. package/cdn/registry.d.ts.map +1 -1
  119. package/cdn/registry.js.map +1 -1
  120. package/cdn/shared/controllers/has-slot-controller.d.ts +37 -0
  121. package/cdn/shared/controllers/has-slot-controller.d.ts.map +1 -0
  122. package/cdn/shared/controllers/has-slot-controller.js +2 -0
  123. package/cdn/shared/controllers/has-slot-controller.js.map +1 -0
  124. package/cdn/shared/controllers/popover.js +1 -1
  125. package/cdn/shared/controllers/popover.js.map +1 -1
  126. package/cdn/shared/styles/host.styles.js +1 -1
  127. package/cdn/standalone.css +132 -1
  128. package/cdn/standalone.js +25743 -191
  129. package/cdn/standalone.js.map +1 -1
  130. package/cdn/static-tag.d.ts +17 -0
  131. package/cdn/static-tag.d.ts.map +1 -0
  132. package/cdn/static-tag.js +2 -0
  133. package/cdn/static-tag.js.map +1 -0
  134. package/cdn/styles/elements/prose-editor.css +129 -0
  135. package/cdn/styles/elements/toast.css +1 -1
  136. package/dist/css/elements/prose-editor.css +129 -0
  137. package/dist/css/elements/toast.css +1 -1
  138. package/dist/custom-elements.json +1412 -12629
  139. package/dist/elements/avatar/avatar.d.ts +5 -0
  140. package/dist/elements/avatar/avatar.d.ts.map +1 -1
  141. package/dist/elements/avatar/avatar.js +5 -0
  142. package/dist/elements/button/button.meta.d.ts +33 -0
  143. package/dist/elements/button/button.meta.d.ts.map +1 -0
  144. package/dist/elements/button/button.meta.js +44 -0
  145. package/dist/elements/carousel/carousel.d.ts +6 -0
  146. package/dist/elements/carousel/carousel.d.ts.map +1 -1
  147. package/dist/elements/carousel/carousel.js +6 -0
  148. package/dist/elements/carousel-item/carousel-item.d.ts +2 -0
  149. package/dist/elements/carousel-item/carousel-item.d.ts.map +1 -1
  150. package/dist/elements/carousel-item/carousel-item.js +2 -0
  151. package/dist/elements/close-button/close-button.meta.d.ts +24 -0
  152. package/dist/elements/close-button/close-button.meta.d.ts.map +1 -0
  153. package/dist/elements/close-button/close-button.meta.js +30 -0
  154. package/dist/elements/dialog/dialog.css +15 -0
  155. package/dist/elements/dialog/dialog.d.ts +12 -6
  156. package/dist/elements/dialog/dialog.d.ts.map +1 -1
  157. package/dist/elements/dialog/dialog.js +21 -7
  158. package/dist/elements/disclosure/disclosure.meta.d.ts +28 -0
  159. package/dist/elements/disclosure/disclosure.meta.d.ts.map +1 -0
  160. package/dist/elements/disclosure/disclosure.meta.js +34 -0
  161. package/dist/elements/divider/divider.d.ts +1 -1
  162. package/dist/elements/divider/divider.js +1 -1
  163. package/dist/elements/drawer/drawer.d.ts +5 -0
  164. package/dist/elements/drawer/drawer.d.ts.map +1 -1
  165. package/dist/elements/drawer/drawer.js +5 -0
  166. package/dist/elements/dropdown/dropdown.d.ts +2 -0
  167. package/dist/elements/dropdown/dropdown.d.ts.map +1 -1
  168. package/dist/elements/dropdown/dropdown.js +2 -0
  169. package/dist/elements/dropdown-item/dropdown-item.d.ts +2 -0
  170. package/dist/elements/dropdown-item/dropdown-item.d.ts.map +1 -1
  171. package/dist/elements/dropdown-item/dropdown-item.js +2 -0
  172. package/dist/elements/input-otp/input-otp.d.ts +2 -0
  173. package/dist/elements/input-otp/input-otp.d.ts.map +1 -1
  174. package/dist/elements/input-otp/input-otp.js +2 -0
  175. package/dist/elements/input-stepper/input-stepper.d.ts +2 -0
  176. package/dist/elements/input-stepper/input-stepper.d.ts.map +1 -1
  177. package/dist/elements/input-stepper/input-stepper.js +5 -1
  178. package/dist/elements/kbd/kbd.meta.d.ts +14 -0
  179. package/dist/elements/kbd/kbd.meta.d.ts.map +1 -0
  180. package/dist/elements/kbd/kbd.meta.js +20 -0
  181. package/dist/elements/progress/progress.meta.d.ts +22 -0
  182. package/dist/elements/progress/progress.meta.d.ts.map +1 -0
  183. package/dist/elements/progress/progress.meta.js +28 -0
  184. package/dist/elements/prose-editor/index.d.ts +2 -0
  185. package/dist/elements/prose-editor/index.d.ts.map +1 -0
  186. package/dist/elements/prose-editor/index.js +4 -0
  187. package/dist/elements/prose-editor/prose-editor.css +133 -0
  188. package/dist/elements/prose-editor/prose-editor.d.ts +114 -0
  189. package/dist/elements/prose-editor/prose-editor.d.ts.map +1 -0
  190. package/dist/elements/prose-editor/prose-editor.js +481 -0
  191. package/dist/elements/rating/rating.d.ts +2 -0
  192. package/dist/elements/rating/rating.d.ts.map +1 -1
  193. package/dist/elements/rating/rating.js +2 -0
  194. package/dist/elements/select/select.meta.d.ts +28 -0
  195. package/dist/elements/select/select.meta.d.ts.map +1 -0
  196. package/dist/elements/select/select.meta.js +34 -0
  197. package/dist/elements/skeleton/skeleton.d.ts +3 -0
  198. package/dist/elements/skeleton/skeleton.d.ts.map +1 -1
  199. package/dist/elements/skeleton/skeleton.js +3 -0
  200. package/dist/elements/stories-viewer/stories-viewer.d.ts +1 -1
  201. package/dist/elements/stories-viewer/stories-viewer.d.ts.map +1 -1
  202. package/dist/elements/stories-viewer/stories-viewer.js +23 -19
  203. package/dist/elements/story/story.d.ts +10 -1
  204. package/dist/elements/story/story.d.ts.map +1 -1
  205. package/dist/elements/story/story.js +29 -17
  206. package/dist/elements/toast/toast.d.ts +5 -0
  207. package/dist/elements/toast/toast.d.ts.map +1 -1
  208. package/dist/elements/toast/toast.js +5 -0
  209. package/dist/elements/tree/tree.d.ts +2 -0
  210. package/dist/elements/tree/tree.d.ts.map +1 -1
  211. package/dist/elements/tree/tree.js +2 -0
  212. package/dist/elements/tree-item/tree-item.d.ts +2 -0
  213. package/dist/elements/tree-item/tree-item.d.ts.map +1 -1
  214. package/dist/elements/tree-item/tree-item.js +2 -0
  215. package/dist/metadata/avatar.json +83 -0
  216. package/dist/metadata/badge.json +59 -0
  217. package/dist/metadata/button.json +138 -0
  218. package/dist/metadata/carousel-item.json +32 -0
  219. package/dist/metadata/carousel.json +388 -0
  220. package/dist/metadata/close-button.json +90 -0
  221. package/dist/metadata/dialog.json +163 -0
  222. package/dist/metadata/disclosure.json +88 -0
  223. package/dist/metadata/divider.json +65 -0
  224. package/dist/metadata/drawer.json +176 -0
  225. package/dist/metadata/dropdown-item.json +85 -0
  226. package/dist/metadata/dropdown.json +157 -0
  227. package/dist/metadata/icon.json +49 -0
  228. package/dist/metadata/index.json +4062 -0
  229. package/dist/metadata/input-otp.json +86 -0
  230. package/dist/metadata/input-stepper.json +122 -0
  231. package/dist/metadata/kbd.json +37 -0
  232. package/dist/metadata/popover.json +157 -0
  233. package/dist/metadata/progress.json +71 -0
  234. package/dist/metadata/prose-editor.json +365 -0
  235. package/dist/metadata/rating.json +126 -0
  236. package/dist/metadata/select.json +82 -0
  237. package/dist/metadata/skeleton.json +56 -0
  238. package/dist/metadata/spinner.json +47 -0
  239. package/dist/metadata/sticky-bar.json +93 -0
  240. package/dist/metadata/stories-viewer.json +316 -0
  241. package/dist/metadata/stories.json +109 -0
  242. package/dist/metadata/story.json +148 -0
  243. package/dist/metadata/tabs.json +74 -0
  244. package/dist/metadata/toast.json +122 -0
  245. package/dist/metadata/tooltip.json +144 -0
  246. package/dist/metadata/tree-item.json +199 -0
  247. package/dist/metadata/tree.json +130 -0
  248. package/dist/registry.d.ts +1 -1
  249. package/dist/registry.d.ts.map +1 -1
  250. package/dist/shared/controllers/has-slot-controller.d.ts +37 -0
  251. package/dist/shared/controllers/has-slot-controller.d.ts.map +1 -0
  252. package/dist/shared/controllers/has-slot-controller.js +66 -0
  253. package/dist/static-tag.d.ts +17 -0
  254. package/dist/static-tag.d.ts.map +1 -0
  255. package/dist/static-tag.js +22 -0
  256. package/dist/templates/elements/avatar.md +21 -24
  257. package/dist/templates/elements/badge.md +9 -15
  258. package/dist/templates/elements/button.md +31 -41
  259. package/dist/templates/elements/close-button.md +24 -36
  260. package/dist/templates/elements/dialog.md +73 -54
  261. package/dist/templates/elements/drawer.md +39 -52
  262. package/dist/templates/elements/progress.md +13 -23
  263. package/dist/templates/elements/prose-editor.md +211 -0
  264. package/dist/templates/elements/select.md +20 -31
  265. package/dist/templates/elements/sticky-bar.md +16 -60
  266. package/dist/templates/elements/toast.md +33 -53
  267. package/dist/templates/elements/tree.md +39 -67
  268. package/elements.json +46 -1
  269. package/package.json +13 -3
  270. package/templates/SKILL.md.tpl +5 -1
@@ -6,10 +6,7 @@ outline: deep
6
6
 
7
7
  Selects are used to pick a single option from a dropdown list. Commonly used in forms for choosing categories, countries, or any predefined set of values.
8
8
 
9
- <ElementSpec
10
- tag="select"
11
- type="native"
12
- />
9
+ **`.l-select`** — Native HTML Element
13
10
 
14
11
  ## Options
15
12
 
@@ -44,26 +41,23 @@ Selects are used to pick a single option from a dropdown list. Commonly used in
44
41
 
45
42
  ### Criteria
46
43
 
47
- | Check | Description |
48
- |-------|-------------|
49
- | Role | Uses native `<select>` built-in `combobox`/`listbox` semantics |
50
- | Accessible name | Must have an associated `<label>` element |
51
- | Disabled state | Native `disabled` attribute prevents interaction and announces as disabled |
52
- | Required state | Native `required` attribute communicates mandatory field to assistive tech |
44
+ - **Role** Uses native `<select>` — built-in `combobox`/`listbox` semantics
45
+ - **Accessible name** — Must have an associated `<label>` element
46
+ - **Disabled state**Native `disabled` attribute prevents interaction and announces as disabled
47
+ - **Required state** Native `required` attribute communicates mandatory field to assistive tech
53
48
 
54
49
  ### Rules
50
+
55
51
  - Always pair the `<select>` with a visible `<label>` element using `for`/`id`
56
52
  - Use native `<option>` elements for choices — the browser handles all ARIA semantics
57
53
 
58
54
  ### Keyboard interactions
59
55
 
60
- | Key | Description |
61
- |-----|-------------|
62
- | Enter | Opens the option list or confirms selection |
63
- | Space | Opens the option list |
64
- | ArrowDown | Moves to the next option |
65
- | ArrowUp | Moves to the previous option |
66
- | Tab | Moves focus to the next focusable element |
56
+ - `Enter` Opens the option list or confirms selection
57
+ - `Space` — Opens the option list
58
+ - `ArrowDown` Moves to the next option
59
+ - `ArrowUp` Moves to the previous option
60
+ - `Tab` Moves focus to the next focusable element
67
61
 
68
62
  ## API reference
69
63
 
@@ -75,26 +69,21 @@ Selects are used to pick a single option from a dropdown list. Commonly used in
75
69
 
76
70
  ### Attributes & Properties
77
71
 
78
- <ApiTable :data="[
79
- { Attribute: 'disabled', Description: 'Disables the select' },
80
- { Attribute: 'required', Description: 'Marks the field as required' },
81
- { Attribute: 'multiple', Description: 'Allows multiple selections' },
82
- ]" />
72
+ - **disabled** — Disables the select.
73
+ - **required** Marks the field as required.
74
+ - **multiple** Allows multiple selections.
83
75
 
84
76
  ### Events
85
77
 
86
- <ApiTable :data="events" />
78
+ - **change** — Fires when an option is selected.
79
+ - **input** — Fires when the value changes.
87
80
 
88
81
  ### CSS classes
89
82
 
90
- <ApiTable :data="[
91
- { Class: '.l-select', Description: 'Base select element with `appearance: base-select`' },
92
- { Class: '.l-select-item', Description: 'Option styling with checkmark indicator' },
93
- ]" />
83
+ - `.l-select` — Base select element with `appearance: base-select`.
84
+ - `.l-select-item` Option styling with checkmark indicator.
94
85
 
95
86
  ### CSS custom properties
96
87
 
97
- <ApiTable :data="[
98
- { Name: '--border-radius', Description: 'Border radius (default: 4px)' },
99
- { Name: '--border-color', Description: 'Border color (adapts to light/dark)' },
100
- ]" />
88
+ - `--border-radius` (default: `4px`) — Border radius.
89
+ - `--border-color` Border color (adapts to light/dark).
@@ -2,48 +2,13 @@
2
2
  outline: deep
3
3
  ---
4
4
 
5
- <style scoped>
6
- .phone-deck {
7
- display: flex;
8
- flex-wrap: wrap;
9
- gap: 24px;
10
- justify-content: center;
11
- padding: 24px 0;
12
- }
13
- .phone {
14
- display: flex;
15
- flex-direction: column;
16
- align-items: center;
17
- gap: 8px;
18
- }
19
- .phone .label {
20
- font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
21
- font-size: 11px;
22
- font-weight: 500;
23
- text-transform: uppercase;
24
- letter-spacing: 0.06em;
25
- color: var(--vp-c-text-2);
26
- }
27
- .phone iframe {
28
- width: 340px;
29
- height: 640px;
30
- border: 10px solid #18181b;
31
- border-radius: 40px;
32
- background: var(--vp-c-bg);
33
- box-shadow: 0 24px 48px -12px rgb(0 0 0 / 0.25);
34
- }
35
- </style>
36
-
37
5
  # Sticky Bar
38
6
 
39
7
  A bar docked to the viewport edge, painted in the document's **top layer**. Pass `for="<id>"` to track an element; the bar reveals when that element scrolls out of view (e.g. an Add to cart button on a mobile product page). Omit `for` for a permanently visible bar.
40
8
 
41
9
  Common use cases: mobile product Add to cart, sticky save action on long forms, post-form newsletter signup, cookie banners, environment indicators, promo announcements.
42
10
 
43
- <ElementSpec
44
- tag="l-sticky-bar"
45
- type="shadow"
46
- />
11
+ **`<l-sticky-bar>`** — Custom Element · Shadow DOM
47
12
 
48
13
  ## Examples
49
14
 
@@ -95,13 +60,12 @@ Both demos start with the bar **revealed** (the Add to cart button sits below th
95
60
 
96
61
  The element is a positioning shell — it adds no role of its own. Slotted content keeps its native semantics: a `<button>` stays a button, a `<form>` stays a form, links remain in the focus order.
97
62
 
98
- | Check | Description |
99
- |-------|-------------|
100
- | Motion | Respects `prefers-reduced-motion` the slide animation collapses to instant |
101
- | Focus order | Slotted content stays in the natural focus order. Do not focus-trap inside the bar — it is not a dialog |
102
- | Contrast | The bar inherits text and background from slotted content — apply your own contrast tokens |
63
+ - **Motion** Respects `prefers-reduced-motion` — the slide animation collapses to instant
64
+ - **Focus order** — Slotted content stays in the natural focus order. Do not focus-trap inside the bar — it is not a dialog
65
+ - **Contrast** The bar inherits text and background from slotted content — apply your own contrast tokens
103
66
 
104
67
  ### Rules
68
+
105
69
  - Keep the bar action self-explanatory (e.g. duplicate the in-page button label, do not introduce a new verb)
106
70
  - Use `--offset` to clear a sticky header when `placement="top"` to avoid overlap
107
71
  - Do not nest live regions or modal-like behavior inside the bar
@@ -116,33 +80,25 @@ import 'luxen-ui/sticky-bar';
116
80
 
117
81
  ### Attributes & Properties
118
82
 
119
- <ApiTable :data="[
120
- { Attribute: 'for', Description: 'HTML id of the element to track. The bar reveals when it leaves the viewport. Omit for a permanently visible bar' },
121
- { Attribute: 'placement', Description: '`bottom` (default) or `top`. Edge to dock against' },
122
- { Attribute: 'root', Description: 'HTML id of the scrolling ancestor used as the IntersectionObserver root. Omit to use the viewport. Useful for nested scroll containers' },
123
- ]" />
83
+ - **for**: `string` — HTML id of the element to track. When that element leaves the viewport, the bar reveals. Omit for a permanently visible bar.
84
+ - **root**: `string` HTML id of the scrolling ancestor used as the IntersectionObserver root. Omit to use the viewport. Useful for nested scroll containers (CMS preview panes, modals).
85
+ - **placement**: `'bottom' | 'top'` (default: `'bottom'`) Edge to dock against.
124
86
 
125
87
  ### Events
126
88
 
127
- <ApiTable :data="[
128
- { Event: 'show', Description: 'Fired before the bar reveals. Cancelable' },
129
- { Event: 'after-show', Description: 'Fired after the reveal animation completes' },
130
- { Event: 'hide', Description: 'Fired before the bar hides. Cancelable' },
131
- { Event: 'after-hide', Description: 'Fired after the hide animation completes' },
132
- ]" />
89
+ - **show** (cancelable) — Fired before the bar reveals. Cancelable.
90
+ - **after-show** Fired after the reveal animation completes.
91
+ - **hide** (cancelable) Fired before the bar hides. Cancelable.
92
+ - **after-hide** Fired after the hide animation completes.
133
93
 
134
94
  ### Slots
135
95
 
136
- <ApiTable :data="[
137
- { Slot: '(default)', Description: 'Bar content. Owns its own background, padding, and typography' },
138
- ]" />
96
+ - **(default)** — Bar content. Owns its own background, padding, and typography.
139
97
 
140
98
  ### CSS custom properties
141
99
 
142
- <ApiTable :data="[
143
- { Name: '--show-duration', Description: 'Reveal animation duration. Default `200ms`' },
144
- { Name: '--hide-duration', Description: 'Dismiss animation duration. Default `200ms`' },
145
- { Name: '--offset', Description: 'Distance from the active edge. Default `0px`. Use to clear a sticky header when `placement=&quot;top&quot;`' },
146
- ]" />
100
+ - `--show-duration` (default: `200ms`) — Reveal animation duration.
101
+ - `--hide-duration` (default: `200ms`) — Dismiss animation duration.
102
+ - `--offset` (default: `0px`) Distance from the active edge. Use to clear a sticky header when `placement="top"`.
147
103
 
148
104
  > **Top layer.** The bar uses `popover="manual"` internally, so it paints in the document's top layer — `z-index` is not needed and would be ignored. Target `l-sticky-bar:popover-open` to style the revealed state.
@@ -6,10 +6,7 @@ outline: deep
6
6
 
7
7
  Toasts are used to display brief, non-blocking notifications that auto-dismiss. Commonly used to confirm actions, report errors, or surface system messages without interrupting the user's workflow.
8
8
 
9
- <ElementSpec
10
- tag="l-toast"
11
- type="custom"
12
- />
9
+ **`<l-toast>`** — Custom Element (no Shadow DOM)
13
10
 
14
11
  ## Options
15
12
 
@@ -299,16 +296,15 @@ toast({
299
296
 
300
297
  ### Criteria
301
298
 
302
- | Check | Description |
303
- |-------|-------------|
304
- | Live region | Container uses `role="log"` with `aria-live="polite"` for screen reader announcements |
305
- | Role | Items use `role="status"` (`role="alert"` for `danger` variant) |
306
- | Accessible name | Heading and message linked via `aria-labelledby` / `aria-describedby` |
307
- | Decorative elements | Icons, accent bar, and timer bar are hidden with `aria-hidden="true"` |
308
- | Timer pausing | Timer pauses on hover and focus, providing keyboard parity |
309
- | Motion | Respects `prefers-reduced-motion` |
299
+ - **Live region** Container uses `role="log"` with `aria-live="polite"` for screen reader announcements
300
+ - **Role** — Items use `role="status"` (`role="alert"` for `danger` variant)
301
+ - **Accessible name** Heading and message linked via `aria-labelledby` / `aria-describedby`
302
+ - **Decorative elements** Icons, accent bar, and timer bar are hidden with `aria-hidden="true"`
303
+ - **Timer pausing** Timer pauses on hover and focus, providing keyboard parity
304
+ - **Motion** Respects `prefers-reduced-motion`
310
305
 
311
306
  ### Rules
307
+
312
308
  - Keep messages short and readable within the auto-dismiss duration
313
309
  - Set `duration` to `5000` or longer for readability
314
310
  - Use `variant="danger"` for critical alerts — it promotes the toast to `role="alert"`
@@ -317,10 +313,8 @@ toast({
317
313
 
318
314
  ### Keyboard interactions
319
315
 
320
- | Key | Description |
321
- |-----|-------------|
322
- | Escape | Dismisses the most recent toast |
323
- | Tab | Moves focus into the toast (pauses the auto-dismiss timer) |
316
+ - `Escape` Dismisses the most recent toast
317
+ - `Tab` — Moves focus into the toast (pauses the auto-dismiss timer)
324
318
 
325
319
  ## API reference
326
320
 
@@ -342,55 +336,41 @@ toast({ text: 'Hello!' });
342
336
 
343
337
  ### Attributes & Properties
344
338
 
345
- <ApiTable :data="[
346
- { Attribute: 'placement', Description: 'Position of the toast stack: `top-start`, `top-center`, `top-end` (default), `bottom-start`, `bottom-center`, `bottom-end`' },
347
- { Attribute: 'duration', Description: 'Default auto-dismiss delay in ms. Default `5000`. Set to `0` or `Infinity` to keep open until dismissed' },
348
- { Attribute: 'variant', Description: 'Default variant for toast items: `info`, `success`, `warning`, `danger`' },
349
- ]" />
339
+ - **placement**: `ToastPlacement` (default: `'top-end'`) — Position of the toast stack on the screen.
340
+ - **duration**: `number` (default: `5000`) Default auto-dismiss delay in milliseconds. 0 disables auto-dismiss.
341
+ - **variant**: `ToastVariant | undefined` — Default variant for toast items: `info`, `success`, `warning`, `danger`.
350
342
 
351
343
  ### Methods
352
344
 
353
- <ApiTable :data="[
354
- { Method: 'toast()', Arguments: '`options: ToastOptions`', Returns: '`HTMLElement`', Description: 'Creates and shows a toast notification' },
355
- ]" />
345
+ - **toast(options: ToastOptions)** → `HTMLElement` — Create and show a toast notification.
356
346
 
357
347
  ### ToastOptions
358
348
 
359
- <ApiTable :data="[
360
- { Property: 'text', Type: '`string`', Default: '', Description: 'The message text to display. Required unless `html` is provided' },
361
- { Property: 'html', Type: '`string`', Default: '', Description: 'HTML content for the message, sanitized via the [Sanitizer API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API). Ignored if `text` is provided' },
362
- { Property: 'heading', Type: '`string`', Default: '', Description: 'Heading text displayed above the message' },
363
- { Property: 'icon', Type: '`string`', Default: '—', Description: 'Iconify icon name (e.g. `lucide:check`). Replaces the accent bar, colored by variant' },
364
- { Property: 'variant', Type: '`string`', Default: 'Element\'s `variant`', Description: 'Override variant for this toast' },
365
- { Property: 'duration', Type: '`number`', Default: 'Element\'s `duration`', Description: 'Override auto-dismiss delay in ms. `0` or `Infinity` to keep open until dismissed' },
366
- { Property: 'timer', Type: '`boolean`', Default: '`false`', Description: 'Show a countdown progress bar at the bottom' },
367
- ]" />
349
+ - **text**: `string` — The message text to display. Required unless `html` is provided
350
+ - **html**: `string` — HTML content for the message, sanitized via the [Sanitizer API](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API). Ignored if `text` is provided
351
+ - **heading**: `string` — Heading text displayed above the message
352
+ - **icon**: `string` — Iconify icon name (e.g. `lucide:check`). Replaces the accent bar, colored by variant
353
+ - **variant**: `string` (default: Element's `variant`) Override variant for this toast
354
+ - **duration**: `number` (default: Element's `duration`) Override auto-dismiss delay in ms. `0` or `Infinity` to keep open until dismissed
355
+ - **timer**: `boolean` (default: `false`) Show a countdown progress bar at the bottom
368
356
 
369
357
  ### Events
370
358
 
371
- <ApiTable :data="[
372
- { Event: 'l-show', Detail: '`{ toast }`', Description: 'Emitted when a toast begins to show. Cancelable' },
373
- { Event: 'l-after-show', Detail: '`{ toast }`', Description: 'Emitted after the show animation completes' },
374
- { Event: 'l-hide', Detail: '`{ toast }`', Description: 'Emitted when a toast begins to hide. Cancelable' },
375
- { Event: 'l-after-hide', Detail: '`{ toast }`', Description: 'Emitted after the hide animation completes and toast is removed' },
376
- ]" />
359
+ - **show** (cancelable) — Emitted when a toast begins to show. Cancelable.
360
+ - **after-show** Emitted after the show animation completes.
361
+ - **hide** (cancelable) Emitted when a toast begins to hide. Cancelable.
362
+ - **after-hide** Emitted after the hide animation completes and toast is removed.
377
363
 
378
364
  ### CSS classes
379
365
 
380
- <ApiTable :data="[
381
- { Class: 'l-toast-item', Description: 'Toast item custom element (generated internally)' },
382
- { Class: '.l-toast-accent', Description: 'Left accent bar, colored by variant' },
383
- { Class: '.l-toast-content', Description: 'Content area' },
384
- { Class: '.l-toast-heading', Description: 'Heading text' },
385
- { Class: '.l-toast-message', Description: 'Message text' },
386
- { Class: '.l-toast-timer', Description: 'Countdown progress bar (auto-added for timed toasts)' },
387
- ]" />
366
+ - `.l-toast-accent` — The left accent bar, colored by variant.
367
+ - `.l-toast-icon` The leading icon, colored by variant (replaces the accent bar).
368
+ - `.l-toast-content` The content column wrapping the heading and message.
369
+ - `.l-toast-timer` The countdown progress bar (for timed toasts).
388
370
 
389
371
  ### CSS custom properties
390
372
 
391
- <ApiTable :data="[
392
- { Property: '--gap', Description: 'Gap between stacked items. Default `0.5rem`' },
393
- { Property: '--width', Description: 'Width of the toast stack. Default `28rem`' },
394
- { Property: '--show-duration', Description: 'Show animation duration. Default `200ms`' },
395
- { Property: '--hide-duration', Description: 'Hide animation duration. Default `200ms`' },
396
- ]" />
373
+ - `--gap` — Gap between stacked toast items.
374
+ - `--width` Width of the toast stack.
375
+ - `--show-duration` Duration of the show animation.
376
+ - `--hide-duration` Duration of the hide animation.
@@ -6,10 +6,7 @@ outline: deep
6
6
 
7
7
  Tree views present hierarchical data like file explorers, navigation menus, and taxonomies. Each node expands/collapses to reveal nested items and can be selected in several ways.
8
8
 
9
- <ElementSpec
10
- tag="l-tree"
11
- type="shadow"
12
- />
9
+ **`<l-tree>`** — Custom Element · Shadow DOM
13
10
 
14
11
  ## Options
15
12
 
@@ -17,8 +14,6 @@ Tree views present hierarchical data like file explorers, navigation menus, and
17
14
 
18
15
  Wrap `<l-tree-item>` nodes inside `<l-tree>`. Nested `<l-tree-item>` children become sub-nodes automatically.
19
16
 
20
- <ComponentWrapper vertical :html="treeBasic" />
21
-
22
17
  ```html
23
18
  <l-tree>
24
19
  <l-tree-item>
@@ -47,8 +42,6 @@ Wrap `<l-tree-item>` nodes inside `<l-tree>`. Nested `<l-tree-item>` children be
47
42
 
48
43
  Place any element in the `prefix` slot to render a leading icon before the label. Icons inherit the current text color.
49
44
 
50
- <ComponentWrapper vertical :html="treeIcons" />
51
-
52
45
  ```html
53
46
  <l-tree>
54
47
  <l-tree-item expanded>
@@ -114,8 +107,6 @@ Place any element in the `prefix` slot to render a leading icon before the label
114
107
 
115
108
  Override the `expand-icon` and `collapse-icon` slots to show a different icon per state — e.g. a closed folder when the branch is collapsed and an open folder when expanded. Leaves keep the `prefix` slot for their own icon.
116
109
 
117
- <ComponentWrapper vertical :html="treeExpandIcons" />
118
-
119
110
  ```html
120
111
  <l-tree>
121
112
  <l-tree-item expanded>
@@ -177,14 +168,10 @@ Place any interactive element inside a `<l-tree-item>` to expose per-row actions
177
168
 
178
169
  This demo is controlled from Vue state: the yellow `…` trigger is rendered only on the selected row via `v-if`, so clicking another row moves the button there without duplicating it in the DOM.
179
170
 
180
- <TreeActionsDemo />
181
-
182
171
  ### Multiple selection
183
172
 
184
173
  Set `selection="multiple"` to render a native checkbox on every item. Toggling a parent cascades the selection to its descendants and sets the indeterminate state when only some children are selected.
185
174
 
186
- <ComponentWrapper vertical :html="treeMultiple" />
187
-
188
175
  ```html
189
176
  <l-tree selection="multiple">
190
177
  <l-tree-item expanded>
@@ -205,8 +192,6 @@ Set `selection="multiple"` to render a native checkbox on every item. Toggling a
205
192
 
206
193
  Add `independent` to decouple parents and children: a parent can be selected without ticking any of its descendants and vice-versa. Useful when nodes represent independent concepts (categories, tags, permissions) rather than aggregations.
207
194
 
208
- <ComponentWrapper vertical :html="treeIndependent" />
209
-
210
195
  ```html
211
196
  <l-tree
212
197
  selection="multiple"
@@ -230,8 +215,6 @@ Add `independent` to decouple parents and children: a parent can be selected wit
230
215
 
231
216
  Set `selection="leaf"` when only terminal nodes represent selectable values. Clicking a branch only toggles its expansion.
232
217
 
233
- <ComponentWrapper vertical :html="treeLeaf" />
234
-
235
218
  ```html
236
219
  <l-tree selection="leaf">
237
220
  <l-tree-item expanded>
@@ -252,8 +235,6 @@ Set `selection="leaf"` when only terminal nodes represent selectable values. Cli
252
235
 
253
236
  Add `disabled` to any item to prevent selection and interaction. The item remains visible and part of the structure.
254
237
 
255
- <ComponentWrapper vertical :html="treeDisabled" />
256
-
257
238
  ```html
258
239
  <l-tree selection="multiple">
259
240
  <l-tree-item expanded>
@@ -269,48 +250,41 @@ Add `disabled` to any item to prevent selection and interaction. The item remain
269
250
 
270
251
  Add `lazy` to an item whose children will be fetched on first expand. The component emits `lazy-load`; set `loading` to render a spinner in place of the chevron, then append children and remove `lazy`.
271
252
 
272
- <TreeLazyDemo />
273
-
274
253
  ## Examples
275
254
 
276
255
  ### Comment thread
277
256
 
278
257
  A discussion tree styled like a Reddit comment thread. Demonstrates stacking `prefix` (avatar), the default slot (multi-line content + action buttons), and swapped `expand-icon` / `collapse-icon` slots (`lucide:circle-plus` / `lucide:circle-minus`). The `::part(base)` and `::part(label)` are overridden to align content to the top and allow wrapping; `--indent-size` and `--indent-guide-width` are tuned for the denser look.
279
258
 
280
- <TreeRedditDemo />
281
-
282
259
  ## Accessibility
283
260
 
284
261
  ### Criteria
285
262
 
286
- | Check | Description |
287
- |-------|-------------|
288
- | Role | Container has `role="tree"`, items have `role="treeitem"`, groups have `role="group"` |
289
- | Expanded state | Branches expose `aria-expanded` reflecting open state. Leaf nodes omit the attribute. |
290
- | Selected state | Selected items expose `aria-selected="true"` |
291
- | Multi-selectable | Container sets `aria-multiselectable="true"` when `selection="multiple"` |
292
- | Disabled state | Disabled items expose `aria-disabled="true"` and stay in the DOM for discoverability |
293
- | Focus management | Roving tabindex: only one item is in the tab order at a time; arrow keys move focus within the tree |
294
- | Motion | Chevron rotation and spinner respect `prefers-reduced-motion` |
263
+ - **Role** Container has `role="tree"`, items have `role="treeitem"`, groups have `role="group"`
264
+ - **Expanded state** — Branches expose `aria-expanded` reflecting open state. Leaf nodes omit the attribute.
265
+ - **Selected state** Selected items expose `aria-selected="true"`
266
+ - **Multi-selectable** Container sets `aria-multiselectable="true"` when `selection="multiple"`
267
+ - **Disabled state** Disabled items expose `aria-disabled="true"` and stay in the DOM for discoverability
268
+ - **Focus management** Roving tabindex: only one item is in the tab order at a time; arrow keys move focus within the tree
269
+ - **Motion** Chevron rotation and spinner respect `prefers-reduced-motion`
295
270
 
296
271
  ### Rules
272
+
297
273
  - Every item needs visible text content for its accessible name
298
274
  - Use `selection="leaf"` when branches are never valid values — this prevents keyboard users from accidentally selecting aggregations
299
275
  - Prefer `selection="multiple" independent` for forms where parent selection is a distinct choice from the children
300
276
 
301
277
  ### Keyboard interactions
302
278
 
303
- | Key | Description |
304
- |-----|-------------|
305
- | ArrowDown | Moves focus to the next visible item |
306
- | ArrowUp | Moves focus to the previous visible item |
307
- | ArrowRight | Expands a collapsed branch, or moves to the first child when already expanded |
308
- | ArrowLeft | Collapses an expanded branch, or moves to the parent item |
309
- | Home | Moves focus to the first visible item |
310
- | End | Moves focus to the last visible item |
311
- | Enter | Activates the item (selects or toggles expansion depending on mode) |
312
- | Space | Activates the item (selects or toggles expansion depending on mode) |
313
- | * | Expands all sibling branches of the focused item |
279
+ - `ArrowDown` Moves focus to the next visible item
280
+ - `ArrowUp` — Moves focus to the previous visible item
281
+ - `ArrowRight` Expands a collapsed branch, or moves to the first child when already expanded
282
+ - `ArrowLeft` Collapses an expanded branch, or moves to the parent item
283
+ - `Home` Moves focus to the first visible item
284
+ - `End` Moves focus to the last visible item
285
+ - `Enter` Activates the item (selects or toggles expansion depending on mode)
286
+ - `Space` Activates the item (selects or toggles expansion depending on mode)
287
+ - `*` Expands all sibling branches of the focused item
314
288
 
315
289
  ## API reference
316
290
 
@@ -323,37 +297,35 @@ import 'luxen-ui/tree-item';
323
297
 
324
298
  ### Attributes & Properties
325
299
 
326
- <ApiTable :data="[
327
- { Attribute: 'selection', Description: 'Selection mode: `single` (default), `multiple`, `leaf`, or `none`' },
328
- { Attribute: 'independent', Description: 'When set with `selection=&quot;multiple&quot;`, parent and descendants selection are decoupled (no cascade, no indeterminate)' },
329
- ]" />
300
+ - **selection**: `TreeSelection` (default: `'single'`) — Selection behaviour:
301
+ - `single` (default): at most one item selected via `aria-selected`.
302
+ - `multiple`: any number of items selected. Checkboxes are rendered.
303
+ - `leaf`: only leaf items can be selected (single). Branches just toggle.
304
+ - `none`: purely navigable, no selection state.
305
+ - **independent**: `boolean` (default: `false`) — When set with `selection="multiple"`, parent and children selection are decoupled:
306
+ toggling a parent does NOT toggle its descendants and vice versa.
307
+ Without it, selection cascades both ways and branches may become indeterminate.
330
308
 
331
309
  ### Methods
332
310
 
333
- <ApiTable :data="[
334
- { Method: 'getAllItems()', Description: 'Returns every `<l-tree-item>` in document order (including nested)' },
335
- { Method: 'getSelection()', Description: 'Returns the currently selected items' },
336
- { Method: 'expandAll()', Description: 'Expands every branch' },
337
- { Method: 'collapseAll()', Description: 'Collapses every item' },
338
- ]" />
311
+ - **getAllItems({ includeDisabled = true }: unknown)** → `TreeItem[]` — Returns all items in document (flat) order, including nested ones.
312
+ - **getSelection()** `TreeItem[]` Returns currently selected items.
313
+ - **expandAll()** Expands every item that has children.
314
+ - **collapseAll()** Collapses every item.
339
315
 
340
316
  ### Events
341
317
 
342
- <ApiTable :data="[
343
- { Event: 'selection-change', Description: 'Fired when the selection changes. Detail: `{ selection }`' },
344
- ]" />
318
+ - **selection-change** — Fired when the selected items change. Detail: `{ selection: TreeItem[] }`.
345
319
 
346
320
  ### CSS custom properties
347
321
 
348
- <ApiTable :data="[
349
- { Name: '--indent-size', Description: 'Horizontal indent per depth level. Default `1rem`' },
350
- { Name: '--indent-guide-width', Description: 'Thickness of the vertical guide line between a parent and its children. Default `1px`. Set to `0` to hide guides' },
351
- { Name: '--indent-guide-style', Description: 'Line style of the guide: `solid` (default), `dashed`, `dotted`, `double`' },
352
- { Name: '--indent-guide-color', Description: 'Color of the guide line' },
353
- { Name: '--row-height', Description: 'Minimum row height. Default `1.75rem`' },
354
- { Name: '--row-padding-inline', Description: 'Inner inline padding of the row; also drives the content slot left indent and the guide column. Default `0.25rem`' },
355
- { Name: '--chevron-size', Description: 'Size of the expand/collapse chevron/avatar box. Default `1.125rem`' },
356
- { Name: '--item-gap', Description: 'Horizontal gap between chevron, prefix, label and suffix on the row; also drives the content slot left indent. Default `0.375rem`' },
357
- ]" />
322
+ - `--indent-size` (default: `1rem`) — Horizontal indent per depth level.
323
+ - `--indent-guide-width` (default: `1px`) Thickness of the vertical guide line between a parent and its children. Set to `0` to hide guides.
324
+ - `--indent-guide-style` (default: `solid`) — Line style of the guide (`solid`, `dashed`, `dotted`, `double`…).
325
+ - `--indent-guide-color` Color of the guide line.
326
+ - `--row-height` (default: `1.75rem`) Minimum row height.
327
+ - `--row-padding-inline` (default: `0.25rem`) — Inner inline padding of the row; also drives the content slot left indent and the indent guide column.
328
+ - `--chevron-size` (default: `1.125rem`) Size of the expand/collapse chevron box.
329
+ - `--item-gap` (default: `0.375rem`) — Horizontal gap between chevron, prefix, label and suffix on the row; also drives the content slot left indent.
358
330
 
359
331
  See [`<l-tree-item>`](/elements/tree-item) for the per-item API.