@fusion.dev/helix-headless 0.144.0 → 0.146.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 (319) hide show
  1. package/custom-elements.json +15195 -4240
  2. package/dist/accordion/item/accordion-item.d.ts +62 -12
  3. package/dist/accordion/item/accordion-item.js +41 -10
  4. package/dist/accordion/root/accordion-root.d.ts +14 -5
  5. package/dist/accordion/root/accordion-root.js +7 -1
  6. package/dist/announcement/root/announcement-root.d.ts +24 -3
  7. package/dist/announcement/root/announcement-root.js +39 -2
  8. package/dist/app-header/root/app-header-root.d.ts +12 -0
  9. package/dist/app-header/root/app-header-root.js +13 -1
  10. package/dist/app-header/sectioning.d.ts +9 -0
  11. package/dist/app-header/sectioning.js +27 -0
  12. package/dist/avatar/group/avatar-group.d.ts +20 -14
  13. package/dist/avatar/group/avatar-group.js +17 -19
  14. package/dist/badge/root/badge-root.d.ts +3 -1
  15. package/dist/badge/root/badge-root.js +2 -2
  16. package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
  17. package/dist/bar-chart/root/bar-chart-root.js +52 -15
  18. package/dist/bar-chart/stack.d.ts +15 -0
  19. package/dist/bar-chart/stack.js +19 -0
  20. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +57 -1
  21. package/dist/breadcrumbs/root/breadcrumbs-root.js +73 -3
  22. package/dist/button/root/button-root.d.ts +26 -0
  23. package/dist/button/root/button-root.js +38 -18
  24. package/dist/button-group/root/button-group-root.d.ts +2 -1
  25. package/dist/button-group/root/button-group-root.js +5 -1
  26. package/dist/canvas/node/canvas-node.d.ts +4 -3
  27. package/dist/canvas/node/canvas-node.js +3 -2
  28. package/dist/canvas/root/canvas-root.d.ts +38 -3
  29. package/dist/canvas/root/canvas-root.js +123 -42
  30. package/dist/card/root/card-root.d.ts +24 -3
  31. package/dist/card/root/card-root.js +20 -8
  32. package/dist/carousel/root/carousel-root.d.ts +133 -4
  33. package/dist/carousel/root/carousel-root.js +174 -24
  34. package/dist/carousel/stops.d.ts +20 -0
  35. package/dist/carousel/stops.js +30 -0
  36. package/dist/chat/composer/chat-composer.d.ts +38 -6
  37. package/dist/chat/composer/chat-composer.js +42 -9
  38. package/dist/chat/message/chat-message.d.ts +32 -1
  39. package/dist/chat/message/chat-message.js +27 -10
  40. package/dist/chat/naming.d.ts +26 -0
  41. package/dist/chat/naming.js +14 -0
  42. package/dist/chat/root/chat-root.d.ts +58 -0
  43. package/dist/chat/root/chat-root.js +43 -3
  44. package/dist/checkbox/root/checkbox-root.d.ts +20 -0
  45. package/dist/checkbox/root/checkbox-root.js +14 -1
  46. package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
  47. package/dist/checkbox-group/root/checkbox-group-root.js +12 -10
  48. package/dist/checkbox-group/select-all.d.ts +27 -0
  49. package/dist/checkbox-group/select-all.js +12 -0
  50. package/dist/code-block/highlight.d.ts +15 -0
  51. package/dist/code-block/highlight.js +4 -0
  52. package/dist/code-block/root/code-block-root.d.ts +57 -2
  53. package/dist/code-block/root/code-block-root.js +63 -8
  54. package/dist/color-input/root/color-input-root.d.ts +3 -0
  55. package/dist/color-input/root/color-input-root.js +6 -3
  56. package/dist/color-picker/root/color-picker-root.d.ts +33 -4
  57. package/dist/color-picker/root/color-picker-root.js +80 -21
  58. package/dist/color-picker/swatches.d.ts +12 -0
  59. package/dist/color-picker/swatches.js +26 -0
  60. package/dist/combobox/root/combobox-root.d.ts +43 -0
  61. package/dist/combobox/root/combobox-root.js +79 -15
  62. package/dist/command/root/command-root.d.ts +16 -1
  63. package/dist/command/root/command-root.js +22 -4
  64. package/dist/copy-button/root/copy-button-root.d.ts +26 -1
  65. package/dist/copy-button/root/copy-button-root.js +12 -5
  66. package/dist/data-table/index.d.ts +1 -1
  67. package/dist/data-table/index.js +1 -1
  68. package/dist/data-table/keys.d.ts +24 -0
  69. package/dist/data-table/keys.js +24 -0
  70. package/dist/data-table/root/data-table-root.d.ts +170 -13
  71. package/dist/data-table/root/data-table-root.js +294 -52
  72. package/dist/data-table/tree.d.ts +55 -0
  73. package/dist/data-table/tree.js +54 -0
  74. package/dist/date-input/root/date-input-root.d.ts +3 -1
  75. package/dist/date-input/root/date-input-root.js +18 -7
  76. package/dist/date-picker/root/date-picker-root.js +12 -6
  77. package/dist/description-list/item/description-list-item.d.ts +17 -2
  78. package/dist/description-list/item/description-list-item.js +15 -2
  79. package/dist/description-list/root/description-list-root.d.ts +27 -1
  80. package/dist/description-list/root/description-list-root.js +26 -1
  81. package/dist/dialog/description.js +15 -1
  82. package/dist/dialog/root/dialog-root.d.ts +8 -2
  83. package/dist/dialog/root/dialog-root.js +16 -1
  84. package/dist/divider/root/divider-root.d.ts +3 -0
  85. package/dist/divider/root/divider-root.js +2 -1
  86. package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
  87. package/dist/donut-chart/root/donut-chart-root.js +48 -1
  88. package/dist/drawer/reveal.d.ts +8 -0
  89. package/dist/drawer/reveal.js +1 -0
  90. package/dist/drawer/root/drawer-root.d.ts +59 -0
  91. package/dist/drawer/root/drawer-root.js +63 -4
  92. package/dist/drilldown/item/drilldown-item.d.ts +11 -6
  93. package/dist/drilldown/item/drilldown-item.js +8 -5
  94. package/dist/drilldown/root/drilldown-root.d.ts +29 -0
  95. package/dist/drilldown/root/drilldown-root.js +28 -5
  96. package/dist/element-events.generated.js +83 -12
  97. package/dist/empty/root/empty-root.d.ts +3 -1
  98. package/dist/empty/root/empty-root.js +3 -2
  99. package/dist/file-input/root/file-input-root.d.ts +69 -6
  100. package/dist/file-input/root/file-input-root.js +82 -19
  101. package/dist/file-input/screen.d.ts +2 -1
  102. package/dist/filter-input/menu/filter-menu.d.ts +5 -0
  103. package/dist/filter-input/menu/filter-menu.js +16 -4
  104. package/dist/filter-input/root/filter-input-root.d.ts +30 -6
  105. package/dist/filter-input/root/filter-input-root.js +1 -1
  106. package/dist/filter-input/suggest.d.ts +28 -3
  107. package/dist/filter-input/suggest.js +18 -8
  108. package/dist/format-date/root/format-date-root.d.ts +9 -16
  109. package/dist/format-date/root/format-date-root.js +10 -27
  110. package/dist/heatmap/root/heatmap-root.d.ts +24 -13
  111. package/dist/heatmap/root/heatmap-root.js +34 -12
  112. package/dist/icon/root/icon-root.d.ts +12 -1
  113. package/dist/icon/root/icon-root.js +21 -10
  114. package/dist/icon/settle.d.ts +7 -0
  115. package/dist/icon/settle.js +10 -0
  116. package/dist/icon-button/root/icon-button-root.d.ts +2 -0
  117. package/dist/image/root/image-root.d.ts +5 -1
  118. package/dist/image/root/image-root.js +10 -2
  119. package/dist/input/root/input-root.d.ts +13 -3
  120. package/dist/input/root/input-root.js +12 -3
  121. package/dist/kbd/root/kbd-root.d.ts +35 -1
  122. package/dist/kbd/root/kbd-root.js +23 -4
  123. package/dist/legend/root/legend-root.d.ts +55 -8
  124. package/dist/legend/root/legend-root.js +55 -13
  125. package/dist/lightbox/root/lightbox-root.d.ts +49 -6
  126. package/dist/lightbox/root/lightbox-root.js +86 -19
  127. package/dist/lightbox/zoom-controller.d.ts +59 -0
  128. package/dist/lightbox/zoom-controller.js +128 -0
  129. package/dist/lightbox/zoom.d.ts +22 -0
  130. package/dist/lightbox/zoom.js +16 -0
  131. package/dist/line-chart/root/line-chart-root.d.ts +22 -1
  132. package/dist/line-chart/root/line-chart-root.js +21 -1
  133. package/dist/list/item/list-item.d.ts +70 -1
  134. package/dist/list/item/list-item.js +77 -6
  135. package/dist/list/numbering.d.ts +14 -0
  136. package/dist/list/numbering.js +8 -0
  137. package/dist/list/root/list-root.d.ts +155 -9
  138. package/dist/list/root/list-root.js +246 -4
  139. package/dist/list/selection.d.ts +49 -0
  140. package/dist/list/selection.js +30 -0
  141. package/dist/listbox/root/listbox-root.d.ts +37 -1
  142. package/dist/listbox/root/listbox-root.js +49 -4
  143. package/dist/loader/busy.d.ts +10 -0
  144. package/dist/loader/busy.js +11 -0
  145. package/dist/loader/root/loader-root.d.ts +9 -2
  146. package/dist/loader/root/loader-root.js +23 -3
  147. package/dist/map/root/map-root.d.ts +6 -2
  148. package/dist/map/root/map-root.js +5 -2
  149. package/dist/megamenu/root/megamenu-root.d.ts +62 -0
  150. package/dist/megamenu/root/megamenu-root.js +90 -5
  151. package/dist/menu/index.d.ts +1 -0
  152. package/dist/menu/index.js +1 -0
  153. package/dist/menu/item/menu-item.d.ts +87 -11
  154. package/dist/menu/item/menu-item.js +78 -22
  155. package/dist/menu/root/menu-root.d.ts +39 -1
  156. package/dist/menu/root/menu-root.js +65 -8
  157. package/dist/menu/section/menu-section.d.ts +55 -0
  158. package/dist/menu/section/menu-section.js +60 -0
  159. package/dist/meter/root/meter-root.d.ts +20 -1
  160. package/dist/meter/root/meter-root.js +11 -15
  161. package/dist/navigation/root/navigation-root.d.ts +18 -2
  162. package/dist/navigation/root/navigation-root.js +29 -3
  163. package/dist/notifications/root/notifications-root.d.ts +25 -0
  164. package/dist/notifications/root/notifications-root.js +33 -5
  165. package/dist/number-input/root/number-input-root.d.ts +17 -8
  166. package/dist/number-input/root/number-input-root.js +2 -7
  167. package/dist/object-inspector/root/object-inspector-root.d.ts +161 -32
  168. package/dist/object-inspector/root/object-inspector-root.js +264 -123
  169. package/dist/object-inspector/rows.d.ts +75 -0
  170. package/dist/object-inspector/rows.js +119 -0
  171. package/dist/option/root/option-root.d.ts +5 -3
  172. package/dist/outline/levels.d.ts +31 -0
  173. package/dist/outline/levels.js +23 -0
  174. package/dist/outline/root/outline-root.d.ts +86 -3
  175. package/dist/outline/root/outline-root.js +95 -12
  176. package/dist/pagination/size/pagination-size.d.ts +12 -2
  177. package/dist/pagination/size/pagination-size.js +20 -5
  178. package/dist/pin-input/code.d.ts +10 -0
  179. package/dist/pin-input/code.js +13 -0
  180. package/dist/pin-input/root/pin-input-root.d.ts +25 -1
  181. package/dist/pin-input/root/pin-input-root.js +10 -11
  182. package/dist/popover/hide-outside.d.ts +14 -0
  183. package/dist/popover/hide-outside.js +41 -0
  184. package/dist/popover/root/popover-root.d.ts +57 -7
  185. package/dist/popover/root/popover-root.js +58 -3
  186. package/dist/progress/root/progress-root.d.ts +20 -0
  187. package/dist/progress/root/progress-root.js +15 -15
  188. package/dist/qr-code/export.d.ts +26 -1
  189. package/dist/qr-code/export.js +14 -0
  190. package/dist/qr-code/root/qr-code-root.d.ts +19 -5
  191. package/dist/qr-code/root/qr-code-root.js +58 -9
  192. package/dist/quote/marks.d.ts +8 -0
  193. package/dist/quote/marks.js +5 -0
  194. package/dist/quote/root/quote-root.d.ts +14 -2
  195. package/dist/quote/root/quote-root.js +23 -1
  196. package/dist/radio/group/radio-group.d.ts +4 -10
  197. package/dist/radio/group/radio-group.js +5 -10
  198. package/dist/radio/root/radio-root.d.ts +6 -2
  199. package/dist/radio/root/radio-root.js +6 -1
  200. package/dist/rating/root/rating-root.d.ts +10 -5
  201. package/dist/rating/root/rating-root.js +32 -8
  202. package/dist/rating/steps.d.ts +7 -0
  203. package/dist/rating/steps.js +9 -0
  204. package/dist/scatter-chart/fit.d.ts +15 -0
  205. package/dist/scatter-chart/fit.js +35 -0
  206. package/dist/scatter-chart/root/scatter-chart-root.d.ts +21 -1
  207. package/dist/scatter-chart/root/scatter-chart-root.js +30 -17
  208. package/dist/scroll-area/root/scroll-area-root.d.ts +84 -0
  209. package/dist/scroll-area/root/scroll-area-root.js +106 -7
  210. package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
  211. package/dist/scroll-area/scrollbar-controller.js +172 -0
  212. package/dist/scroll-area/scrollbar.d.ts +92 -0
  213. package/dist/scroll-area/scrollbar.js +33 -0
  214. package/dist/select/root/select-root.d.ts +15 -0
  215. package/dist/select/root/select-root.js +18 -6
  216. package/dist/skeleton/root/skeleton-root.d.ts +3 -0
  217. package/dist/skeleton/root/skeleton-root.js +4 -2
  218. package/dist/skip-link/root/skip-link-root.js +2 -2
  219. package/dist/slider/root/slider-root.d.ts +41 -4
  220. package/dist/slider/root/slider-root.js +23 -3
  221. package/dist/sparkline/readings.d.ts +18 -0
  222. package/dist/sparkline/readings.js +19 -0
  223. package/dist/sparkline/root/sparkline-root.d.ts +78 -7
  224. package/dist/sparkline/root/sparkline-root.js +118 -23
  225. package/dist/speed-dial/root/speed-dial-root.js +2 -2
  226. package/dist/splitter/root/splitter-root.d.ts +20 -12
  227. package/dist/splitter/root/splitter-root.js +226 -203
  228. package/dist/splitter/snap.d.ts +9 -0
  229. package/dist/splitter/snap.js +12 -0
  230. package/dist/stat/root/stat-root.d.ts +14 -5
  231. package/dist/stat/root/stat-root.js +21 -5
  232. package/dist/steps/reach.d.ts +20 -0
  233. package/dist/steps/reach.js +15 -0
  234. package/dist/steps/root/steps-root.d.ts +76 -0
  235. package/dist/steps/root/steps-root.js +93 -1
  236. package/dist/steps/step/step.d.ts +45 -2
  237. package/dist/steps/step/step.js +33 -6
  238. package/dist/switch/root/switch-root.d.ts +10 -0
  239. package/dist/table/column/table-column.d.ts +11 -10
  240. package/dist/table/column/table-column.js +8 -19
  241. package/dist/table/root/table-root.d.ts +126 -4
  242. package/dist/table/root/table-root.js +156 -6
  243. package/dist/table/row/table-row.d.ts +47 -1
  244. package/dist/table/row/table-row.js +39 -2
  245. package/dist/tabs/panel/tab-panel.d.ts +22 -5
  246. package/dist/tabs/panel/tab-panel.js +34 -6
  247. package/dist/tabs/root/tabs-root.d.ts +37 -1
  248. package/dist/tabs/root/tabs-root.js +22 -4
  249. package/dist/tabs/tab/tab.d.ts +41 -4
  250. package/dist/tabs/tab/tab.js +49 -3
  251. package/dist/tag/group/tag-group.d.ts +31 -4
  252. package/dist/tag/group/tag-group.js +46 -7
  253. package/dist/tag/root/tag-root.js +9 -2
  254. package/dist/textarea/root/textarea-root.d.ts +28 -1
  255. package/dist/textarea/root/textarea-root.js +40 -1
  256. package/dist/time-input/root/time-input-root.d.ts +5 -1
  257. package/dist/time-input/root/time-input-root.js +16 -8
  258. package/dist/time-picker/root/time-picker-root.d.ts +18 -4
  259. package/dist/time-picker/root/time-picker-root.js +7 -10
  260. package/dist/time-picker/wheel-name.d.ts +9 -0
  261. package/dist/time-picker/wheel-name.js +15 -0
  262. package/dist/timeline/group/timeline-group.d.ts +46 -0
  263. package/dist/timeline/group/timeline-group.js +37 -0
  264. package/dist/timeline/index.d.ts +1 -0
  265. package/dist/timeline/index.js +1 -0
  266. package/dist/timeline/root/timeline-root.d.ts +10 -3
  267. package/dist/toast/item/toast-item.d.ts +24 -18
  268. package/dist/toast/item/toast-item.js +36 -40
  269. package/dist/toast/root/toast-root.d.ts +6 -0
  270. package/dist/toast/root/toast-root.js +16 -1
  271. package/dist/toggle/group/toggle-group.d.ts +24 -3
  272. package/dist/toggle/group/toggle-group.js +34 -5
  273. package/dist/toolbar/root/toolbar-root.d.ts +13 -0
  274. package/dist/toolbar/root/toolbar-root.js +15 -5
  275. package/dist/tooltip/root/tooltip-root.d.ts +13 -2
  276. package/dist/tooltip/root/tooltip-root.js +9 -1
  277. package/dist/tour/back.d.ts +10 -0
  278. package/dist/tour/back.js +8 -0
  279. package/dist/tour/root/tour-root.d.ts +30 -2
  280. package/dist/tour/root/tour-root.js +34 -8
  281. package/dist/tree/item/tree-item.d.ts +61 -4
  282. package/dist/tree/item/tree-item.js +92 -20
  283. package/dist/tree/root/tree-root.d.ts +58 -0
  284. package/dist/tree/root/tree-root.js +80 -16
  285. package/dist/tree/selection.d.ts +24 -0
  286. package/dist/tree/selection.js +13 -0
  287. package/dist/trend/root/trend-root.d.ts +43 -18
  288. package/dist/trend/root/trend-root.js +31 -6
  289. package/dist/video/media-events.d.ts +44 -0
  290. package/dist/video/media-events.js +35 -0
  291. package/dist/video/root/video-root.d.ts +117 -18
  292. package/dist/video/root/video-root.js +93 -47
  293. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
  294. package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
  295. package/dist/video-playlist/order.d.ts +41 -0
  296. package/dist/video-playlist/order.js +34 -0
  297. package/dist/video-playlist/root/video-playlist-root.d.ts +77 -3
  298. package/dist/video-playlist/root/video-playlist-root.js +60 -16
  299. package/dist/virtual-list/controls.d.ts +4 -0
  300. package/dist/virtual-list/controls.js +30 -0
  301. package/dist/virtual-list/fill.d.ts +22 -0
  302. package/dist/virtual-list/fill.js +23 -0
  303. package/dist/virtual-list/keys.d.ts +15 -0
  304. package/dist/virtual-list/keys.js +24 -0
  305. package/dist/virtual-list/plan.d.ts +49 -0
  306. package/dist/virtual-list/plan.js +16 -0
  307. package/dist/virtual-list/root/virtual-list-root.d.ts +259 -26
  308. package/dist/virtual-list/root/virtual-list-root.js +333 -49
  309. package/lint.json +1 -1
  310. package/package.json +8 -8
  311. package/types/jsx.d.ts +8113 -1394
  312. package/types/svelte.d.ts +2 -0
  313. package/types/vue.d.ts +1678 -353
  314. package/dist/data-table/root/order.d.ts +0 -141
  315. package/dist/data-table/root/order.js +0 -76
  316. package/dist/listbox/range.d.ts +0 -17
  317. package/dist/listbox/range.js +0 -5
  318. package/dist/tag/selection.d.ts +0 -10
  319. package/dist/tag/selection.js +0 -12
@@ -17,6 +17,11 @@ declare const HelixHeadlessTextarea_base: (new (...args: any[]) => import("@fusi
17
17
  * `max-rows` stops the growth at that many lines, and the field scrolls past
18
18
  * them.
19
19
  *
20
+ * `clearable` draws a button that empties the field while it holds text, and
21
+ * sends `helix-clear`, as `Input` does. `validate` adds your own rule, run on
22
+ * every change once the browser finds nothing wrong, as React Aria's
23
+ * TextField `validate` does.
24
+ *
20
25
  * @since 0.1.0
21
26
  * @status stable
22
27
  * @category forms
@@ -31,15 +36,18 @@ declare const HelixHeadlessTextarea_base: (new (...args: any[]) => import("@fusi
31
36
  *
32
37
  * @event {Event} change - Sent from the textarea when the user finishes an edit.
33
38
  * @event {HelixBeforeChangeEvent} helix-before-change - Fired as the text changes, and cancelable.
39
+ * @event {HelixClearEvent} helix-clear - Fired after the clear button has emptied the field, after `input` and `change`.
34
40
  * @event {Event} input - Fired after the value changes.
35
41
  *
42
+ * @csspart clear - The button that empties the field, under `clearable`.
36
43
  * @csspart control - The textarea itself.
37
44
  * @csspart feedback - The message that says what is wrong.
38
45
  * @csspart field - The box that holds the textarea.
39
46
  * @csspart hint - Help under the field, while nothing is wrong.
40
47
  * @csspart label - The label above the field.
41
48
  *
42
- * @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
49
+ * @cssstate blank - The field holds no text.
50
+ * @cssstate invalid - The control has an error to show, from the browser's validation, `validate`, or your `feedback`.
43
51
  */
44
52
  export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
45
53
  protected readonly aria: AriaForwardController;
@@ -57,6 +65,14 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
57
65
  * Grows the box to fit its content, so it does not scroll.
58
66
  */
59
67
  autoGrow: boolean;
68
+ /**
69
+ * Draws a button that empties the field while it holds text.
70
+ */
71
+ clearable: boolean;
72
+ /**
73
+ * The accessible name of the clear button, which shows only an icon.
74
+ */
75
+ clearLabel: string;
60
76
  /**
61
77
  * How many characters wide the box is, when the layout does not set its
62
78
  * width.
@@ -194,6 +210,11 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
194
210
  focus(options?: FocusOptions): void;
195
211
  /** Reports the value and the validity the host stands behind. */
196
212
  private sync;
213
+ /**
214
+ * Empties the field and puts the caret back in it, through `requestValue`,
215
+ * so a consumer who owns the value can refuse. `Input` clears the same way.
216
+ */
217
+ private readonly handleClear;
197
218
  connectedCallback(): void;
198
219
  disconnectedCallback(): void;
199
220
  protected firstUpdated(changed: PropertyValues): void;
@@ -212,6 +233,12 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
212
233
  * How many lines the box is before anything is typed.
213
234
  */
214
235
  rows: number;
236
+ /**
237
+ * Your own rule for the value, run on every change once the browser finds
238
+ * nothing wrong. Return a message, or a list of them, to mark the field
239
+ * invalid, and `true`, `null`, or nothing to accept the value.
240
+ */
241
+ validate?: (value: string) => string | string[] | true | null | undefined;
215
242
  /**
216
243
  * How the browser wraps the text, and whether the breaks are submitted with
217
244
  * it.
@@ -4,7 +4,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { AriaForwardController, customElement, HelixFormElement, holdCaret, isRtl, MixinControllerValue, MixinField, restoreValue, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, customElement, drawIcon, HelixClearEvent, HelixFormElement, holdCaret, isRtl, MixinControllerValue, MixinField, restoreValue, } from '@fusion.dev/helix-core';
8
+ import { x } from '@fusion.dev/helix-icons';
8
9
  import { html, nothing } from 'lit';
9
10
  import { property } from 'lit/decorators.js';
10
11
  import { grownHeight, lineMetrics } from '../grow.js';
@@ -17,6 +18,8 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
17
18
  this.announcesInput = true;
18
19
  this.autocomplete = '';
19
20
  this.autoGrow = false;
21
+ this.clearable = false;
22
+ this.clearLabel = 'Clear';
20
23
  this.dirName = '';
21
24
  this.placeholder = '';
22
25
  this.readOnly = false;
@@ -32,6 +35,17 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
32
35
  event.stopPropagation();
33
36
  this.announceChange();
34
37
  };
38
+ this.handleClear = () => {
39
+ if (this.value !== '' && this.requestValue('')) {
40
+ this.announceChange();
41
+ this.dispatchEvent(new HelixClearEvent());
42
+ }
43
+ const control = this.control;
44
+ if (control) {
45
+ restoreValue(control, this.value);
46
+ control.focus();
47
+ }
48
+ };
35
49
  this.rows = 3;
36
50
  this.wrap = 'soft';
37
51
  }
@@ -112,6 +126,11 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
112
126
  return;
113
127
  }
114
128
  this.copyValidity(control);
129
+ const own = control.validity.valid ? this.validate?.(this.value) : undefined;
130
+ const message = Array.isArray(own) ? own.join(' ') : typeof own === 'string' ? own : '';
131
+ if (message !== '') {
132
+ this.internals.setValidity({ customError: true }, message, control);
133
+ }
115
134
  this.refreshFeedback();
116
135
  }
117
136
  connectedCallback() {
@@ -140,6 +159,7 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
140
159
  }
141
160
  willUpdate(changed) {
142
161
  super.willUpdate(changed);
162
+ this.toggleState('blank', this.value === '');
143
163
  if (!this.hasUpdated) {
144
164
  return;
145
165
  }
@@ -180,6 +200,16 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
180
200
  @change=${this.handleChange}
181
201
  ></textarea>
182
202
  <slot name="end"></slot>
203
+ ${this.clearable && this.value !== '' && !this.isDisabled && !this.readOnly
204
+ ? html `<button
205
+ part="clear"
206
+ type="button"
207
+ aria-label=${this.clearLabel}
208
+ @click=${this.handleClear}
209
+ >
210
+ ${drawIcon(x)}
211
+ </button>`
212
+ : nothing}
183
213
  </div>
184
214
  ${this.renderHint()}${this.renderFeedback()}`;
185
215
  }
@@ -190,6 +220,12 @@ __decorate([
190
220
  __decorate([
191
221
  property({ attribute: 'auto-grow', reflect: true, type: Boolean })
192
222
  ], HelixHeadlessTextarea.prototype, "autoGrow", void 0);
223
+ __decorate([
224
+ property({ type: Boolean })
225
+ ], HelixHeadlessTextarea.prototype, "clearable", void 0);
226
+ __decorate([
227
+ property({ attribute: 'clear-label' })
228
+ ], HelixHeadlessTextarea.prototype, "clearLabel", void 0);
193
229
  __decorate([
194
230
  property({ type: Number })
195
231
  ], HelixHeadlessTextarea.prototype, "cols", void 0);
@@ -214,6 +250,9 @@ __decorate([
214
250
  __decorate([
215
251
  property({ type: Number })
216
252
  ], HelixHeadlessTextarea.prototype, "rows", void 0);
253
+ __decorate([
254
+ property({ attribute: false })
255
+ ], HelixHeadlessTextarea.prototype, "validate", void 0);
217
256
  __decorate([
218
257
  property()
219
258
  ], HelixHeadlessTextarea.prototype, "wrap", void 0);
@@ -42,6 +42,8 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
42
42
  *
43
43
  * @slot feedback - The message that says what is wrong with the value.
44
44
  * @slot hint - Help under the field.
45
+ * @slot panel-footer - Content in the panel under the times, such as a note or an action.
46
+ * @slot panel-header - Content in the panel above the times, such as a heading or a shortcut.
45
47
  * @slot trigger - The icon on the field that shows a list opens.
46
48
  *
47
49
  * @event {Event} change - Fired after the value changes.
@@ -60,6 +62,7 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
60
62
  * @csspart picker - The time picker inside the panel.
61
63
  * @csspart picker-column - One column of the picker.
62
64
  * @csspart picker-column-empty - The text shown when the filter hides every option.
65
+ * @csspart picker-column-error - A wheel's `error` part, which the list never sets: its times do not load.
63
66
  * @csspart picker-column-feedback - The column's message that says what is wrong with the value.
64
67
  * @csspart picker-column-filter-icon - The icon beside the filter field.
65
68
  * @csspart picker-column-filter-mark - The default icon beside the filter field, shown when none is slotted.
@@ -73,6 +76,7 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
73
76
  * @csspart picker-columns - The row of columns, in `wheels`.
74
77
  * @csspart picker-list - The listbox holding the times, in `list`.
75
78
  * @csspart picker-list-empty - The text shown when the filter hides every option.
79
+ * @csspart picker-list-error - The list's `error` part, which the list never sets: its times do not load.
76
80
  * @csspart picker-list-feedback - The inner list's message that says what is wrong with the value.
77
81
  * @csspart picker-list-filter-icon - The icon beside the filter field.
78
82
  * @csspart picker-list-filter-mark - The default icon beside the filter field, shown when none is slotted.
@@ -272,7 +276,7 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
272
276
  /** Each time, where `mode` holds several, sent one entry each. */
273
277
  protected get answers(): readonly string[] | undefined;
274
278
  /** What is wrong with the times, which the text input cannot say. */
275
- protected validate(): string;
279
+ protected validate(): string | readonly [keyof ValidityStateFlags, string];
276
280
  /**
277
281
  * Whether the panel shows one list of times or a column for each part of the
278
282
  * time.
@@ -152,14 +152,20 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
152
152
  const rules = { disableTimes: this.disableTimes, max: this.max, min: this.min };
153
153
  const faults = held.map((one) => timeFault(one, rules));
154
154
  if (faults.includes('rangeUnderflow')) {
155
- return fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
156
- min: writeClock(this.min, clockLocale(this.locale, this.hourCycle), this.seconds),
157
- });
155
+ return [
156
+ 'rangeUnderflow',
157
+ fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
158
+ min: writeClock(this.min, clockLocale(this.locale, this.hourCycle), this.seconds),
159
+ }),
160
+ ];
158
161
  }
159
162
  if (faults.includes('rangeOverflow')) {
160
- return fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
161
- max: writeClock(this.max, clockLocale(this.locale, this.hourCycle), this.seconds),
162
- });
163
+ return [
164
+ 'rangeOverflow',
165
+ fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
166
+ max: writeClock(this.max, clockLocale(this.locale, this.hourCycle), this.seconds),
167
+ }),
168
+ ];
163
169
  }
164
170
  if (faults.includes('unavailable')) {
165
171
  return this.unavailableMessage || 'Choose a time that is available.';
@@ -178,13 +184,13 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
178
184
  renderPicker() {
179
185
  return html `<${this.tag('time-picker')}
180
186
  part="picker"
181
- exportparts="column: picker-column, column-empty: picker-column-empty,
187
+ exportparts="column: picker-column, column-empty: picker-column-empty, column-error: picker-column-error,
182
188
  column-feedback: picker-column-feedback, column-filter-icon: picker-column-filter-icon,
183
189
  column-filter-mark: picker-column-filter-mark, column-hint: picker-column-hint,
184
190
  column-items: picker-column-items, column-label: picker-column-label,
185
191
  column-live: picker-column-live, column-loading: picker-column-loading, column-search: picker-column-search,
186
192
  column-search-field: picker-column-search-field, columns: picker-columns, list: picker-list,
187
- list-empty: picker-list-empty, list-feedback: picker-list-feedback,
193
+ list-empty: picker-list-empty, list-error: picker-list-error, list-feedback: picker-list-feedback,
188
194
  list-filter-icon: picker-list-filter-icon, list-filter-mark: picker-list-filter-mark,
189
195
  list-hint: picker-list-hint, list-items: picker-list-items, list-label: picker-list-label,
190
196
  list-live: picker-list-live, list-loading: picker-list-loading, list-search: picker-list-search,
@@ -285,7 +291,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
285
291
  ?hidden=${!this.open}
286
292
  @keydown=${this.handleWheelEnter}
287
293
  >
294
+ <slot name="panel-header"></slot>
288
295
  ${this.renderPicker()}
296
+ <slot name="panel-footer"></slot>
289
297
  </div>
290
298
  ${this.renderHint()}${this.renderFeedback()}`;
291
299
  }
@@ -47,6 +47,7 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
47
47
  *
48
48
  * @csspart column - One column of the wheels.
49
49
  * @csspart column-empty - The text shown when the filter hides every option.
50
+ * @csspart column-error - A wheel's `error` part, which Time Picker never sets: its times do not load.
50
51
  * @csspart column-feedback - The message that says what is wrong with the value.
51
52
  * @csspart column-filter-icon - The icon beside the filter field.
52
53
  * @csspart column-filter-mark - The default icon beside the filter field, shown when none is slotted.
@@ -60,6 +61,7 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
60
61
  * @csspart columns - The row of columns, in `wheels`.
61
62
  * @csspart list - The listbox holding the times, in `list`.
62
63
  * @csspart list-empty - The text shown when the filter hides every option.
64
+ * @csspart list-error - The list's `error` part, which Time Picker never sets: its times do not load.
63
65
  * @csspart list-feedback - The message that says what is wrong with the value.
64
66
  * @csspart list-filter-icon - The icon beside the filter field.
65
67
  * @csspart list-filter-mark - The default icon beside the filter field, shown when none is slotted.
@@ -112,8 +114,11 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
112
114
  hourCycle?: HourCycle;
113
115
  /**
114
116
  * What the wheel of hours is called, read by screen readers.
117
+ *
118
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "Hour" in
119
+ * English, "Stunde" in German.
115
120
  */
116
- hourLabel: string;
121
+ hourLabel?: string;
117
122
  /**
118
123
  * Whether the current selection fails validation.
119
124
  *
@@ -151,16 +156,22 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
151
156
  /**
152
157
  * What the wheel of the half of the day is called, read by screen readers.
153
158
  * Its two options are written as the locale writes them, such as AM and PM.
159
+ *
160
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "AM/PM" in
161
+ * English, "Tageshälfte" in German.
154
162
  */
155
- meridiemLabel: string;
163
+ meridiemLabel?: string;
156
164
  /**
157
165
  * Earliest time offered, as `HH:mm`.
158
166
  */
159
167
  min: string;
160
168
  /**
161
169
  * What the wheel of minutes is called, read by screen readers.
170
+ *
171
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "Minute" in
172
+ * English and German, "分" in Japanese.
162
173
  */
163
- minuteLabel: string;
174
+ minuteLabel?: string;
164
175
  /**
165
176
  * How many times can be held at once.
166
177
  *
@@ -322,8 +333,11 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
322
333
  required: boolean;
323
334
  /**
324
335
  * What the wheel of seconds is called, read by screen readers.
336
+ *
337
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "Second" in
338
+ * English, "Sekunde" in German.
325
339
  */
326
- secondLabel: string;
340
+ secondLabel?: string;
327
341
  /**
328
342
  * Whether times carry their seconds.
329
343
  *
@@ -8,21 +8,19 @@ import { clockLocale, commaList, customElement, dayPeriod, elementById, fillTemp
8
8
  import { nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { html } from 'lit/static-html.js';
11
+ import { wheelName } from '../wheel-name.js';
11
12
  import '../../listbox/index.js';
12
13
  import '../../option/index.js';
13
14
  let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControllerValue(HelixFormElement) {
14
15
  constructor() {
15
16
  super(...arguments);
16
17
  this.disableTimes = '';
17
- this.hourLabel = 'Hour';
18
18
  this.invalid = false;
19
19
  this.label = 'Time';
20
20
  this.locale = '';
21
21
  this.manual = false;
22
22
  this.max = '23:59';
23
- this.meridiemLabel = 'Before or after noon';
24
23
  this.min = '00:00';
25
- this.minuteLabel = 'Minute';
26
24
  this.handleListInput = (event) => {
27
25
  event.stopPropagation();
28
26
  };
@@ -77,7 +75,6 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
77
75
  };
78
76
  this.readOnly = false;
79
77
  this.required = false;
80
- this.secondLabel = 'Second';
81
78
  this.seconds = false;
82
79
  this.step = 15;
83
80
  this.listRevealed = false;
@@ -286,7 +283,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
286
283
  part="column"
287
284
  data-column=${part}
288
285
  aria-invalid=${this.invalid ? 'true' : nothing}
289
- exportparts="empty: column-empty, feedback: column-feedback, filter-icon: column-filter-icon,
286
+ exportparts="empty: column-empty, error: column-error, feedback: column-feedback, filter-icon: column-filter-icon,
290
287
  filter-mark: column-filter-mark, hint: column-hint, items: column-items, label: column-label,
291
288
  live: column-live, loading: column-loading, search: column-search, search-field: column-search-field"
292
289
  aria-label=${label}
@@ -323,13 +320,13 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
323
320
  data-unset=${this.value === '' ? '' : nothing}
324
321
  @keydown=${this.handleColumnsKeydown}
325
322
  >
326
- ${this.renderColumn('hour', this.hourLabel, hours.map(String), (one) => (twelve ? one : one.padStart(2, '0')), String(shown), (one) => this.wholeHourBarred(Number(one), twelve ? meridiem : undefined))}
327
- ${this.renderColumn('minute', this.minuteLabel, this.minutes.map(String), (one) => one.padStart(2, '0'), String(minute), (one) => this.barredAt(hour * 3600 + Number(one) * 60))}
323
+ ${this.renderColumn('hour', this.hourLabel ?? wheelName('hour', this.locale), hours.map(String), (one) => (twelve ? one : one.padStart(2, '0')), String(shown), (one) => this.wholeHourBarred(Number(one), twelve ? meridiem : undefined))}
324
+ ${this.renderColumn('minute', this.minuteLabel ?? wheelName('minute', this.locale), this.minutes.map(String), (one) => one.padStart(2, '0'), String(minute), (one) => this.barredAt(hour * 3600 + Number(one) * 60))}
328
325
  ${this.seconds
329
- ? this.renderColumn('second', this.secondLabel, this.secondsShown.map(String), (one) => one.padStart(2, '0'), String(second), (one) => this.barredAt(hour * 3600 + minute * 60 + Number(one)))
326
+ ? this.renderColumn('second', this.secondLabel ?? wheelName('second', this.locale), this.secondsShown.map(String), (one) => one.padStart(2, '0'), String(second), (one) => this.barredAt(hour * 3600 + minute * 60 + Number(one)))
330
327
  : nothing}
331
328
  ${twelve
332
- ? this.renderColumn('meridiem', this.meridiemLabel, ['AM', 'PM'], (one) => dayPeriod(one, this.clock), meridiem, (one) => this.halfBarred(one))
329
+ ? this.renderColumn('meridiem', this.meridiemLabel ?? wheelName('dayPeriod', this.locale), ['AM', 'PM'], (one) => dayPeriod(one, this.clock), meridiem, (one) => this.halfBarred(one))
333
330
  : nothing}
334
331
  </div>`;
335
332
  }
@@ -337,7 +334,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
337
334
  return html `<${this.tag('listbox')}
338
335
  part="list"
339
336
  aria-invalid=${this.invalid ? 'true' : nothing}
340
- exportparts="empty: list-empty, feedback: list-feedback, filter-icon: list-filter-icon,
337
+ exportparts="empty: list-empty, error: list-error, feedback: list-feedback, filter-icon: list-filter-icon,
341
338
  filter-mark: list-filter-mark, hint: list-hint, items: list-items, label: list-label,
342
339
  live: list-live, loading: list-loading, search: list-search, search-field: list-search-field"
343
340
  aria-label=${this.listName}
@@ -0,0 +1,9 @@
1
+ /** A part of the time a Time Picker wheel sets. */
2
+ export type WheelField = 'dayPeriod' | 'hour' | 'minute' | 'second';
3
+ /**
4
+ * What a locale calls a wheel, core's `segmentName`, with its first letter in
5
+ * capitals as a name standing on its own: "Hour" in English, "Stunde" in
6
+ * German, "時" in Japanese, and "AM/PM" for the half of the day, React Aria's
7
+ * name for it.
8
+ */
9
+ export declare const wheelName: (field: WheelField, locale: string) => string;
@@ -0,0 +1,15 @@
1
+ import { segmentName } from '@fusion.dev/helix-core';
2
+ const ENGLISH = {
3
+ dayPeriod: 'AM/PM',
4
+ hour: 'Hour',
5
+ minute: 'Minute',
6
+ second: 'Second',
7
+ };
8
+ export const wheelName = (field, locale) => {
9
+ const name = segmentName(field, locale);
10
+ if (name === field || name === '') {
11
+ return ENGLISH[field];
12
+ }
13
+ const lead = String.fromCodePoint(name.codePointAt(0));
14
+ return `${lead.toLocaleUpperCase(locale || undefined)}${name.slice(lead.length)}`;
15
+ };
@@ -0,0 +1,46 @@
1
+ import { HelixElement } from '@fusion.dev/helix-core';
2
+ import { type PropertyValues, type TemplateResult } from 'lit';
3
+ /**
4
+ * @summary A run of timeline entries under a heading, such as a day.
5
+ *
6
+ * @description
7
+ * Groups entries by date, such as "Today" and "Yesterday", in a timeline that
8
+ * holds many. The group is an entry of the timeline, and its entries are a
9
+ * list of their own, named by the heading. A screen reader lists the heading
10
+ * with the page's headings and hears how many entries each day holds.
11
+ *
12
+ * The heading's level is `heading-level`, and 3 where it is not set.
13
+ *
14
+ * Each group draws its own line, so the line stops at the last entry of one
15
+ * day and starts again at the first entry of the next.
16
+ *
17
+ * @since 0.1.0
18
+ * @status stable
19
+ * @aliases Day, Section, Date group
20
+ * @documentation https://fusion.dev/helix/components/timeline
21
+ *
22
+ * @slot - The entries.
23
+ * @slot heading - The heading, when it is more than text. Falls back to `label`.
24
+ *
25
+ * @csspart entries - The list that holds the entries.
26
+ * @csspart heading - The heading.
27
+ */
28
+ export declare class HelixHeadlessTimelineGroup extends HelixElement {
29
+ /**
30
+ * The level of the group's heading, from 1 to 6.
31
+ */
32
+ headingLevel?: number;
33
+ /**
34
+ * The heading, when it is plain text, such as "Today".
35
+ *
36
+ * The fallback of the `heading` slot, so slotted content replaces it.
37
+ */
38
+ label: string;
39
+ protected willUpdate(changed: PropertyValues): void;
40
+ protected render(): TemplateResult;
41
+ }
42
+ declare global {
43
+ interface HTMLElementTagNameMap {
44
+ 'helix-headless-timeline-group': HelixHeadlessTimelineGroup;
45
+ }
46
+ }
@@ -0,0 +1,37 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { customElement, HelixElement, headingLevel, hostAria } from '@fusion.dev/helix-core';
8
+ import { html } from 'lit';
9
+ import { property } from 'lit/decorators.js';
10
+ const HEADING_ID = 'heading';
11
+ let HelixHeadlessTimelineGroup = class HelixHeadlessTimelineGroup extends HelixElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.label = '';
15
+ }
16
+ willUpdate(changed) {
17
+ super.willUpdate(changed);
18
+ hostAria(this.internals, { role: 'listitem' });
19
+ }
20
+ render() {
21
+ const level = headingLevel(this.headingLevel);
22
+ return html `<div part="heading" id=${HEADING_ID} role="heading" aria-level=${level}>
23
+ <slot name="heading">${this.label}</slot>
24
+ </div>
25
+ <div part="entries" role="list" aria-labelledby=${HEADING_ID}><slot></slot></div>`;
26
+ }
27
+ };
28
+ __decorate([
29
+ property({ attribute: 'heading-level', type: Number })
30
+ ], HelixHeadlessTimelineGroup.prototype, "headingLevel", void 0);
31
+ __decorate([
32
+ property()
33
+ ], HelixHeadlessTimelineGroup.prototype, "label", void 0);
34
+ HelixHeadlessTimelineGroup = __decorate([
35
+ customElement('helix-headless-timeline-group')
36
+ ], HelixHeadlessTimelineGroup);
37
+ export { HelixHeadlessTimelineGroup };
@@ -1,2 +1,3 @@
1
+ export * from './group/timeline-group.js';
1
2
  export * from './item/timeline-item.js';
2
3
  export * from './root/timeline-root.js';
@@ -1,2 +1,3 @@
1
+ export * from './group/timeline-group.js';
1
2
  export * from './item/timeline-item.js';
2
3
  export * from './root/timeline-root.js';
@@ -16,8 +16,15 @@ import { type PropertyValues, type TemplateResult } from 'lit';
16
16
  * The host has `role="list"`, because the entries are your elements in the
17
17
  * light DOM. `Steps` does the same.
18
18
  *
19
- * A timeline runs down the page and has no horizontal layout. For stages laid
20
- * out horizontally, use `Steps`, which is horizontal by default.
19
+ * **Group entries by date with `Timeline.Group`**, which puts a heading such as
20
+ * "Today" over its entries. The group is an entry of the timeline, and its
21
+ * entries are a list of their own named by the heading.
22
+ *
23
+ * **The reading order is the order you write the entries in**, in every layout
24
+ * the styled tier draws: down the page, either side of a line down the middle,
25
+ * or across the page. Inside each entry the time is read before what happened.
26
+ * Write the entries in the order the events happened, oldest or newest first,
27
+ * and the layout only moves where they are drawn.
21
28
  *
22
29
  * @since 0.1.0
23
30
  * @status stable
@@ -25,7 +32,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
25
32
  * @aliases Activity feed, History, Changelog, Audit trail
26
33
  * @documentation https://fusion.dev/helix/components/timeline
27
34
  *
28
- * @slot - The entries.
35
+ * @slot - The entries, and any groups of them.
29
36
  */
30
37
  export declare class HelixHeadlessTimeline extends HelixElement {
31
38
  /**
@@ -13,7 +13,9 @@ declare const HelixHeadlessToastItem_base: (new (...args: any[]) => import("@fus
13
13
  * seconds.
14
14
  *
15
15
  * **Each message is an `alertdialog` named by its words**, which is how a reader
16
- * who moves into the stack hears which message they are on. A `danger` message
16
+ * who moves into the stack hears which message they are on. Give it a
17
+ * `heading` and a `description`, and the heading names it and the description
18
+ * describes it, for a message with a title and a line of detail. A `danger` message
17
19
  * is its own assertive live region, so it is announced at once; every other one
18
20
  * is announced politely by the region.
19
21
  *
@@ -31,7 +33,9 @@ declare const HelixHeadlessToastItem_base: (new (...args: any[]) => import("@fus
31
33
  *
32
34
  * @slot - The message.
33
35
  * @slot actions - Actions for the message, usually a button or a link.
36
+ * @slot description - A line of detail under the heading, which describes the message.
34
37
  * @slot dismiss-icon - Replaces the glyph inside the dismiss control.
38
+ * @slot heading - The message's title, which names it.
35
39
  * @slot icon - Replaces the tone mark. The name matches `Callout`. The dismiss
36
40
  * control's glyph uses `dismiss-icon`, because two slots cannot share a name:
37
41
  * content goes to whichever slot comes first in the tree, and the tone mark is
@@ -41,8 +45,10 @@ declare const HelixHeadlessToastItem_base: (new (...args: any[]) => import("@fus
41
45
  *
42
46
  * @csspart actions - The region that holds the actions.
43
47
  * @csspart content - The message.
48
+ * @csspart description - The slot the description is in. It draws no box until you give it one.
44
49
  * @csspart dismiss - The control that dismisses the message.
45
50
  * @csspart dismiss-mark - The glyph on the dismiss control, where none is slotted.
51
+ * @csspart heading - The slot the heading is in. It draws no box until you give it one.
46
52
  * @csspart icon - The tone mark, where the message has one.
47
53
  * @csspart icon-mark - The tone glyph, where none is slotted.
48
54
  * @csspart item - The message's own surface.
@@ -78,11 +84,16 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
78
84
  protected readonly swipes: SwipeController;
79
85
  /** Writes how far a swipe has moved the message toward the end of the line. */
80
86
  private slide;
81
- /** When the current run of the timer began, or nothing while it is paused. */
82
- private startedAt;
83
- /** What is left of the duration, so resuming continues rather than restarts. */
84
- private remaining;
85
- private timer;
87
+ /**
88
+ * The dismiss timer, which pauses while a reader is on the message and
89
+ * continues from what was left.
90
+ *
91
+ * Paused is said on the host so the indicator can freeze with the clock. A
92
+ * `data-` attribute rather than a property, because it is written after
93
+ * upgrade from a pointer moving: nothing declares it and no server rendered
94
+ * it, which is the same reason `Carousel` names its slides from here.
95
+ */
96
+ private readonly countdown;
86
97
  /**
87
98
  * The kind of message, which sets its mark and the mark's accessible name.
88
99
  *
@@ -104,23 +115,18 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
104
115
  pause(): void;
105
116
  /** Restarts the dismiss timer from where it paused. */
106
117
  resume(): void;
107
- /**
108
- * How many reasons there are to hold the clock, rather than whether there is
109
- * one.
110
- *
111
- * Hover and focus stop the same timer, and the two are genuinely independent:
112
- * a pointer can leave while focus stays, and focus can leave while the
113
- * pointer stays. Uncounted, a reader who tabs into a message and then moves
114
- * the pointer off it has the clock restarted underneath them, which is the
115
- * case the pause exists for. Only the last one out starts it again.
116
- */
117
- private holds;
118
118
  private readonly handlePause;
119
119
  private readonly handleResume;
120
120
  connectedCallback(): void;
121
- disconnectedCallback(): void;
122
121
  protected willUpdate(changed: PropertyValues): void;
123
122
  protected updated(changed: PropertyValues): void;
123
+ /** The elements assigned to one of the message's named slots. */
124
+ private assigned;
125
+ /**
126
+ * Names the message by its heading and describes it by its description,
127
+ * where it has them, and otherwise names it by all its words.
128
+ */
129
+ private readonly name;
124
130
  protected firstUpdated(changed: PropertyValues): void;
125
131
  /**
126
132
  * The mark for the message's tone, behind a seam.