@fusion.dev/helix-headless 0.145.0 → 0.147.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 (343) hide show
  1. package/custom-elements.json +12286 -4281
  2. package/dist/accordion/item/accordion-item.d.ts +51 -18
  3. package/dist/accordion/item/accordion-item.js +45 -13
  4. package/dist/accordion/root/accordion-root.d.ts +16 -7
  5. package/dist/accordion/root/accordion-root.js +3 -3
  6. package/dist/announcement/root/announcement-root.d.ts +16 -6
  7. package/dist/announcement/root/announcement-root.js +37 -7
  8. package/dist/app-header/root/app-header-root.d.ts +7 -2
  9. package/dist/app-header/root/app-header-root.js +9 -1
  10. package/dist/app-header/sectioning.d.ts +3 -1
  11. package/dist/app-header/sectioning.js +3 -2
  12. package/dist/area-chart/root/area-chart-root.d.ts +18 -1
  13. package/dist/area-chart/root/area-chart-root.js +11 -3
  14. package/dist/avatar/group/avatar-group.d.ts +20 -14
  15. package/dist/avatar/group/avatar-group.js +17 -19
  16. package/dist/avatar/root/avatar-root.d.ts +31 -1
  17. package/dist/avatar/root/avatar-root.js +11 -1
  18. package/dist/badge/root/badge-root.d.ts +60 -7
  19. package/dist/badge/root/badge-root.js +89 -6
  20. package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
  21. package/dist/bar-chart/root/bar-chart-root.js +48 -20
  22. package/dist/bar-chart/stack.d.ts +25 -0
  23. package/dist/bar-chart/stack.js +27 -0
  24. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +14 -0
  25. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +12 -2
  26. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +25 -0
  27. package/dist/breadcrumbs/root/breadcrumbs-root.js +51 -4
  28. package/dist/button/root/button-root.d.ts +50 -38
  29. package/dist/button/root/button-root.js +42 -53
  30. package/dist/button/submitter.d.ts +27 -0
  31. package/dist/button/submitter.js +25 -0
  32. package/dist/button-group/root/button-group-root.d.ts +2 -1
  33. package/dist/button-group/root/button-group-root.js +5 -1
  34. package/dist/canvas/node/canvas-node.d.ts +4 -3
  35. package/dist/canvas/node/canvas-node.js +3 -2
  36. package/dist/canvas/root/canvas-root.js +2 -2
  37. package/dist/card/root/card-root.d.ts +36 -4
  38. package/dist/card/root/card-root.js +29 -10
  39. package/dist/carousel/root/carousel-root.d.ts +43 -4
  40. package/dist/carousel/root/carousel-root.js +40 -12
  41. package/dist/carousel/stops.d.ts +20 -0
  42. package/dist/carousel/stops.js +30 -0
  43. package/dist/chat/message/chat-message.js +5 -4
  44. package/dist/chat/naming.d.ts +5 -1
  45. package/dist/chat/naming.js +4 -2
  46. package/dist/chat/root/chat-root.d.ts +40 -4
  47. package/dist/chat/root/chat-root.js +32 -6
  48. package/dist/checkbox/root/checkbox-root.d.ts +20 -0
  49. package/dist/checkbox/root/checkbox-root.js +18 -7
  50. package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
  51. package/dist/checkbox-group/root/checkbox-group-root.js +14 -11
  52. package/dist/checkbox-group/select-all.d.ts +21 -0
  53. package/dist/checkbox-group/select-all.js +7 -0
  54. package/dist/code-block/highlight.d.ts +15 -0
  55. package/dist/code-block/highlight.js +4 -0
  56. package/dist/code-block/root/code-block-root.d.ts +79 -10
  57. package/dist/code-block/root/code-block-root.js +74 -5
  58. package/dist/color-input/root/color-input-root.d.ts +14 -0
  59. package/dist/color-input/root/color-input-root.js +17 -7
  60. package/dist/color-picker/channels.js +1 -2
  61. package/dist/color-picker/root/color-picker-root.d.ts +53 -16
  62. package/dist/color-picker/root/color-picker-root.js +155 -46
  63. package/dist/color-picker/wheel.d.ts +17 -0
  64. package/dist/color-picker/wheel.js +6 -0
  65. package/dist/combobox/root/combobox-root.d.ts +56 -0
  66. package/dist/combobox/root/combobox-root.js +92 -15
  67. package/dist/command/root/command-root.d.ts +19 -2
  68. package/dist/command/root/command-root.js +24 -23
  69. package/dist/copy-button/root/copy-button-root.d.ts +21 -1
  70. package/dist/copy-button/root/copy-button-root.js +16 -4
  71. package/dist/data-table/index.d.ts +1 -1
  72. package/dist/data-table/index.js +1 -1
  73. package/dist/data-table/keys.d.ts +6 -0
  74. package/dist/data-table/keys.js +14 -0
  75. package/dist/data-table/root/data-table-root.d.ts +27 -18
  76. package/dist/data-table/root/data-table-root.js +31 -57
  77. package/dist/data-table/tree.d.ts +16 -1
  78. package/dist/data-table/tree.js +2 -3
  79. package/dist/date-input/root/date-input-root.d.ts +11 -2
  80. package/dist/date-input/root/date-input-root.js +26 -12
  81. package/dist/date-picker/root/date-picker-root.d.ts +14 -9
  82. package/dist/date-picker/root/date-picker-root.js +33 -22
  83. package/dist/description-list/item/description-list-item.d.ts +18 -4
  84. package/dist/description-list/item/description-list-item.js +8 -4
  85. package/dist/dialog/description.js +15 -1
  86. package/dist/dialog/root/dialog-root.d.ts +8 -2
  87. package/dist/dialog/root/dialog-root.js +16 -1
  88. package/dist/divider/root/divider-root.d.ts +3 -0
  89. package/dist/divider/root/divider-root.js +2 -1
  90. package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
  91. package/dist/donut-chart/root/donut-chart-root.js +55 -1
  92. package/dist/donut-chart/slice-label.d.ts +35 -0
  93. package/dist/donut-chart/slice-label.js +11 -0
  94. package/dist/drawer/reveal.d.ts +8 -0
  95. package/dist/drawer/reveal.js +1 -0
  96. package/dist/drawer/root/drawer-root.d.ts +63 -2
  97. package/dist/drawer/root/drawer-root.js +75 -4
  98. package/dist/drilldown/item/drilldown-item.d.ts +21 -1
  99. package/dist/drilldown/item/drilldown-item.js +40 -5
  100. package/dist/drilldown/root/drilldown-root.d.ts +21 -3
  101. package/dist/drilldown/root/drilldown-root.js +22 -3
  102. package/dist/element-events.generated.js +35 -6
  103. package/dist/empty/root/empty-root.d.ts +34 -2
  104. package/dist/empty/root/empty-root.js +26 -4
  105. package/dist/file-input/root/file-input-root.d.ts +99 -8
  106. package/dist/file-input/root/file-input-root.js +120 -22
  107. package/dist/file-input/screen.d.ts +2 -1
  108. package/dist/file-input/status.d.ts +24 -0
  109. package/dist/file-input/status.js +10 -0
  110. package/dist/filter-input/chip/filter-chip.d.ts +23 -0
  111. package/dist/filter-input/chip/filter-chip.js +11 -2
  112. package/dist/filter-input/menu/filter-menu.d.ts +2 -0
  113. package/dist/filter-input/menu/filter-menu.js +12 -4
  114. package/dist/filter-input/root/filter-input-root.d.ts +38 -6
  115. package/dist/filter-input/root/filter-input-root.js +18 -28
  116. package/dist/filter-input/suggest.d.ts +28 -3
  117. package/dist/filter-input/suggest.js +18 -8
  118. package/dist/format-date/options.d.ts +3 -4
  119. package/dist/format-date/options.js +2 -2
  120. package/dist/format-date/root/format-date-root.d.ts +27 -17
  121. package/dist/format-date/root/format-date-root.js +27 -48
  122. package/dist/heatmap/root/buckets.d.ts +21 -0
  123. package/dist/heatmap/root/buckets.js +34 -0
  124. package/dist/heatmap/root/heatmap-root.d.ts +83 -11
  125. package/dist/heatmap/root/heatmap-root.js +104 -12
  126. package/dist/icon/index.d.ts +1 -1
  127. package/dist/icon/index.js +1 -1
  128. package/dist/icon/registry.d.ts +26 -1
  129. package/dist/icon/registry.js +12 -1
  130. package/dist/icon/root/icon-root.d.ts +25 -1
  131. package/dist/icon/root/icon-root.js +44 -12
  132. package/dist/icon/root/index.d.ts +1 -1
  133. package/dist/icon/root/index.js +1 -1
  134. package/dist/icon/settle.d.ts +7 -0
  135. package/dist/icon/settle.js +10 -0
  136. package/dist/icon-button/root/icon-button-root.d.ts +2 -0
  137. package/dist/image/root/image-root.d.ts +14 -1
  138. package/dist/image/root/image-root.js +7 -2
  139. package/dist/input/root/input-root.d.ts +34 -3
  140. package/dist/input/root/input-root.js +17 -4
  141. package/dist/kbd/keys.d.ts +29 -0
  142. package/dist/kbd/keys.js +52 -0
  143. package/dist/kbd/root/kbd-root.d.ts +52 -1
  144. package/dist/kbd/root/kbd-root.js +40 -47
  145. package/dist/legend/hidden-series.d.ts +10 -2
  146. package/dist/legend/hidden-series.js +5 -2
  147. package/dist/legend/root/legend-root.d.ts +77 -12
  148. package/dist/legend/root/legend-root.js +71 -17
  149. package/dist/lightbox/root/lightbox-root.d.ts +98 -10
  150. package/dist/lightbox/root/lightbox-root.js +153 -18
  151. package/dist/lightbox/zoom-controller.d.ts +59 -0
  152. package/dist/lightbox/zoom-controller.js +128 -0
  153. package/dist/lightbox/zoom.d.ts +24 -0
  154. package/dist/lightbox/zoom.js +18 -0
  155. package/dist/line-chart/root/line-chart-root.d.ts +38 -1
  156. package/dist/line-chart/root/line-chart-root.js +31 -3
  157. package/dist/list/item/list-item.d.ts +2 -0
  158. package/dist/list/item/list-item.js +11 -2
  159. package/dist/list/root/list-root.d.ts +70 -13
  160. package/dist/list/root/list-root.js +91 -13
  161. package/dist/list/selection.d.ts +54 -7
  162. package/dist/list/selection.js +32 -7
  163. package/dist/listbox/root/listbox-root.d.ts +44 -4
  164. package/dist/listbox/root/listbox-root.js +72 -34
  165. package/dist/loader/busy.d.ts +10 -0
  166. package/dist/loader/busy.js +11 -0
  167. package/dist/loader/root/loader-root.d.ts +9 -2
  168. package/dist/loader/root/loader-root.js +23 -3
  169. package/dist/megamenu/hand-over.d.ts +75 -0
  170. package/dist/megamenu/hand-over.js +67 -0
  171. package/dist/megamenu/root/megamenu-root.d.ts +80 -15
  172. package/dist/megamenu/root/megamenu-root.js +76 -19
  173. package/dist/menu/item/menu-item.d.ts +51 -2
  174. package/dist/menu/item/menu-item.js +50 -26
  175. package/dist/menu/root/menu-root.d.ts +17 -0
  176. package/dist/menu/root/menu-root.js +2 -2
  177. package/dist/meter/root/meter-root.d.ts +62 -1
  178. package/dist/meter/root/meter-root.js +38 -16
  179. package/dist/navigation/root/navigation-root.d.ts +2 -1
  180. package/dist/navigation/root/navigation-root.js +2 -2
  181. package/dist/notifications/root/notifications-root.d.ts +20 -4
  182. package/dist/notifications/root/notifications-root.js +30 -8
  183. package/dist/number-input/grain.d.ts +28 -0
  184. package/dist/number-input/grain.js +14 -0
  185. package/dist/number-input/root/number-input-root.d.ts +34 -9
  186. package/dist/number-input/root/number-input-root.js +31 -25
  187. package/dist/object-inspector/root/object-inspector-root.d.ts +88 -33
  188. package/dist/object-inspector/root/object-inspector-root.js +134 -92
  189. package/dist/object-inspector/rows.d.ts +18 -0
  190. package/dist/object-inspector/rows.js +33 -0
  191. package/dist/option/index.d.ts +1 -0
  192. package/dist/option/index.js +1 -0
  193. package/dist/option/root/option-root.d.ts +5 -3
  194. package/dist/option/separator/option-separator.d.ts +30 -0
  195. package/dist/option/separator/option-separator.js +21 -0
  196. package/dist/outline/root/outline-root.d.ts +30 -0
  197. package/dist/outline/root/outline-root.js +17 -13
  198. package/dist/pagination/size/pagination-size.d.ts +6 -0
  199. package/dist/pagination/size/pagination-size.js +5 -3
  200. package/dist/pin-input/code.d.ts +37 -0
  201. package/dist/pin-input/code.js +25 -0
  202. package/dist/pin-input/root/pin-input-root.d.ts +116 -115
  203. package/dist/pin-input/root/pin-input-root.js +163 -155
  204. package/dist/popover/hide-outside.d.ts +14 -0
  205. package/dist/popover/hide-outside.js +34 -0
  206. package/dist/popover/root/popover-root.d.ts +64 -8
  207. package/dist/popover/root/popover-root.js +67 -4
  208. package/dist/progress/root/progress-root.d.ts +47 -0
  209. package/dist/progress/root/progress-root.js +34 -16
  210. package/dist/qr-code/export.d.ts +45 -1
  211. package/dist/qr-code/export.js +28 -0
  212. package/dist/qr-code/name.d.ts +11 -0
  213. package/dist/qr-code/name.js +7 -0
  214. package/dist/qr-code/root/qr-code-root.d.ts +36 -11
  215. package/dist/qr-code/root/qr-code-root.js +58 -11
  216. package/dist/quote/marks.d.ts +8 -0
  217. package/dist/quote/marks.js +5 -0
  218. package/dist/quote/root/quote-root.d.ts +14 -2
  219. package/dist/quote/root/quote-root.js +23 -1
  220. package/dist/radio/group/radio-group.d.ts +15 -0
  221. package/dist/radio/root/radio-root.d.ts +6 -2
  222. package/dist/radio/root/radio-root.js +7 -2
  223. package/dist/rating/root/rating-root.d.ts +30 -12
  224. package/dist/rating/root/rating-root.js +27 -27
  225. package/dist/scatter-chart/fit.d.ts +15 -0
  226. package/dist/scatter-chart/fit.js +35 -0
  227. package/dist/scatter-chart/root/scatter-chart-root.d.ts +51 -1
  228. package/dist/scatter-chart/root/scatter-chart-root.js +64 -24
  229. package/dist/scroll-area/root/scroll-area-root.d.ts +22 -51
  230. package/dist/scroll-area/root/scroll-area-root.js +57 -173
  231. package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
  232. package/dist/scroll-area/scrollbar-controller.js +172 -0
  233. package/dist/scroll-area/scrollbar.d.ts +27 -8
  234. package/dist/scroll-area/scrollbar.js +10 -1
  235. package/dist/select/align.d.ts +47 -0
  236. package/dist/select/align.js +7 -0
  237. package/dist/select/root/select-root.d.ts +71 -0
  238. package/dist/select/root/select-root.js +78 -6
  239. package/dist/skeleton/root/skeleton-root.d.ts +3 -0
  240. package/dist/skeleton/root/skeleton-root.js +4 -2
  241. package/dist/skip-link/root/skip-link-root.js +2 -2
  242. package/dist/slider/root/slider-root.d.ts +59 -5
  243. package/dist/slider/root/slider-root.js +45 -3
  244. package/dist/sparkline/readings.d.ts +36 -0
  245. package/dist/sparkline/readings.js +36 -0
  246. package/dist/sparkline/root/sparkline-root.d.ts +121 -7
  247. package/dist/sparkline/root/sparkline-root.js +160 -26
  248. package/dist/speed-dial/item/speed-dial-item.d.ts +1 -1
  249. package/dist/speed-dial/item/speed-dial-item.js +2 -2
  250. package/dist/speed-dial/root/speed-dial-root.d.ts +6 -0
  251. package/dist/speed-dial/root/speed-dial-root.js +11 -3
  252. package/dist/splitter/root/splitter-root.d.ts +10 -12
  253. package/dist/splitter/root/splitter-root.js +211 -204
  254. package/dist/stat/root/stat-root.d.ts +14 -5
  255. package/dist/stat/root/stat-root.js +21 -5
  256. package/dist/steps/reach.d.ts +5 -0
  257. package/dist/steps/reach.js +3 -0
  258. package/dist/steps/root/steps-root.d.ts +56 -3
  259. package/dist/steps/root/steps-root.js +50 -6
  260. package/dist/steps/step/step.d.ts +8 -0
  261. package/dist/steps/step/step.js +8 -3
  262. package/dist/switch/root/switch-root.d.ts +10 -0
  263. package/dist/table/column/table-column.d.ts +6 -10
  264. package/dist/table/column/table-column.js +8 -20
  265. package/dist/table/root/table-root.d.ts +31 -10
  266. package/dist/table/root/table-root.js +14 -18
  267. package/dist/table/row/table-row.d.ts +24 -0
  268. package/dist/table/row/table-row.js +37 -1
  269. package/dist/tabs/panel/tab-panel.d.ts +16 -3
  270. package/dist/tabs/panel/tab-panel.js +34 -5
  271. package/dist/tabs/root/tabs-root.d.ts +17 -3
  272. package/dist/tabs/root/tabs-root.js +1 -1
  273. package/dist/tabs/tab/tab.d.ts +5 -0
  274. package/dist/tabs/tab/tab.js +5 -2
  275. package/dist/tag/group/tag-group.d.ts +44 -5
  276. package/dist/tag/group/tag-group.js +60 -9
  277. package/dist/tag/root/tag-root.js +9 -2
  278. package/dist/textarea/root/textarea-root.d.ts +41 -2
  279. package/dist/textarea/root/textarea-root.js +39 -1
  280. package/dist/time-input/root/time-input-root.d.ts +10 -2
  281. package/dist/time-input/root/time-input-root.js +24 -13
  282. package/dist/time-picker/root/time-picker-root.d.ts +28 -17
  283. package/dist/time-picker/root/time-picker-root.js +18 -29
  284. package/dist/time-picker/wheel-name.d.ts +9 -0
  285. package/dist/time-picker/wheel-name.js +15 -0
  286. package/dist/timeline/group/timeline-group.js +2 -2
  287. package/dist/toast/item/toast-item.d.ts +16 -3
  288. package/dist/toast/item/toast-item.js +22 -6
  289. package/dist/toast/root/toast-root.d.ts +34 -4
  290. package/dist/toast/root/toast-root.js +74 -13
  291. package/dist/toast/words.d.ts +12 -0
  292. package/dist/toast/words.js +25 -0
  293. package/dist/toggle/group/toggle-group.d.ts +52 -7
  294. package/dist/toggle/group/toggle-group.js +58 -44
  295. package/dist/toggle/root/toggle-root.js +2 -4
  296. package/dist/toolbar/root/toolbar-root.d.ts +21 -5
  297. package/dist/toolbar/root/toolbar-root.js +52 -8
  298. package/dist/tooltip/root/tooltip-root.d.ts +20 -3
  299. package/dist/tooltip/root/tooltip-root.js +18 -1
  300. package/dist/tour/back.d.ts +10 -0
  301. package/dist/tour/back.js +8 -0
  302. package/dist/tour/root/tour-root.d.ts +45 -2
  303. package/dist/tour/root/tour-root.js +53 -8
  304. package/dist/tour/stop/tour-stop.d.ts +3 -0
  305. package/dist/tour/stop/tour-stop.js +3 -3
  306. package/dist/tree/item/tree-item.d.ts +7 -3
  307. package/dist/tree/item/tree-item.js +3 -0
  308. package/dist/tree/root/tree-root.d.ts +24 -3
  309. package/dist/tree/root/tree-root.js +32 -13
  310. package/dist/tree/selection.js +2 -15
  311. package/dist/trend/figure.d.ts +16 -0
  312. package/dist/trend/figure.js +8 -0
  313. package/dist/trend/root/trend-root.d.ts +83 -19
  314. package/dist/trend/root/trend-root.js +59 -8
  315. package/dist/video/media-events.d.ts +13 -18
  316. package/dist/video/media-events.js +1 -5
  317. package/dist/video/root/extra-controls.d.ts +12 -0
  318. package/dist/video/root/extra-controls.js +6 -2
  319. package/dist/video/root/video-root.d.ts +23 -6
  320. package/dist/video/root/video-root.js +19 -10
  321. package/dist/video-playlist/menu/video-playlist-menu.d.ts +2 -0
  322. package/dist/video-playlist/menu/video-playlist-menu.js +2 -1
  323. package/dist/video-playlist/root/video-playlist-root.d.ts +17 -1
  324. package/dist/video-playlist/root/video-playlist-root.js +3 -0
  325. package/dist/virtual-list/fill.d.ts +11 -8
  326. package/dist/virtual-list/fill.js +10 -17
  327. package/dist/virtual-list/keys.d.ts +16 -7
  328. package/dist/virtual-list/keys.js +17 -6
  329. package/dist/virtual-list/plan.d.ts +65 -0
  330. package/dist/virtual-list/plan.js +27 -0
  331. package/dist/virtual-list/root/virtual-list-root.d.ts +136 -13
  332. package/dist/virtual-list/root/virtual-list-root.js +218 -51
  333. package/lint.json +1 -1
  334. package/package.json +8 -8
  335. package/types/jsx.d.ts +7441 -1458
  336. package/types/svelte.d.ts +1 -0
  337. package/types/vue.d.ts +1501 -326
  338. package/dist/chat/relative-clock.d.ts +0 -39
  339. package/dist/chat/relative-clock.js +0 -31
  340. package/dist/data-table/root/order.d.ts +0 -141
  341. package/dist/data-table/root/order.js +0 -76
  342. package/dist/tag/selection.d.ts +0 -10
  343. package/dist/tag/selection.js +0 -12
@@ -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.
@@ -71,8 +74,10 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
71
74
  * @csspart picker-column-search - The region that holds the filter field.
72
75
  * @csspart picker-column-search-field - The filter field.
73
76
  * @csspart picker-columns - The row of columns, in `wheels`.
77
+ * @csspart picker-feedback - The picker's own message, under the times, while the picker's `feedback` is set.
74
78
  * @csspart picker-list - The listbox holding the times, in `list`.
75
79
  * @csspart picker-list-empty - The text shown when the filter hides every option.
80
+ * @csspart picker-list-error - The list's `error` part, which the list never sets: its times do not load.
76
81
  * @csspart picker-list-feedback - The inner list's message that says what is wrong with the value.
77
82
  * @csspart picker-list-filter-icon - The icon beside the filter field.
78
83
  * @csspart picker-list-filter-mark - The default icon beside the filter field, shown when none is slotted.
@@ -138,9 +143,12 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
138
143
  /**
139
144
  * Language tag the times are written in.
140
145
  *
141
- * Absent uses the runtime's own.
146
+ * Absent is the page's: the `lang` of the nearest element with one, as
147
+ * Shoelace and Web Awesome read it, then the runtime's own.
142
148
  */
143
149
  locale: string;
150
+ /** The locale the words are written in: `locale`, or the page's `lang`. */
151
+ private get language();
144
152
  /**
145
153
  * Latest time that can be chosen, as `HH:mm`.
146
154
  */
@@ -272,7 +280,7 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
272
280
  /** Each time, where `mode` holds several, sent one entry each. */
273
281
  protected get answers(): readonly string[] | undefined;
274
282
  /** What is wrong with the times, which the text input cannot say. */
275
- protected validate(): string;
283
+ protected validate(): string | readonly [keyof ValidityStateFlags, string];
276
284
  /**
277
285
  * Whether the panel shows one list of times or a column for each part of the
278
286
  * time.
@@ -4,7 +4,7 @@ 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, valueAsTime as asTime, clockLocale, customElement, fillTemplate, timeAsValue as fromTime, HelixFormElement, isClockValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinSegmentedField, MixinTokens, timeFault, writeClock, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, valueAsTime as asTime, clockLocale, customElement, fillTemplate, timeAsValue as fromTime, HelixFormElement, isClockValue, localeOf, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinSegmentedField, MixinTokens, timeFault, writeClock, } from '@fusion.dev/helix-core';
8
8
  import { clock } from '@fusion.dev/helix-icons';
9
9
  import { nothing } from 'lit';
10
10
  import { property, state } from 'lit/decorators.js';
@@ -88,6 +88,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
88
88
  }
89
89
  };
90
90
  }
91
+ get language() {
92
+ return localeOf(this, this.locale);
93
+ }
91
94
  get held() {
92
95
  return this.value
93
96
  .replace(/\s+[–-]\s+/g, ',')
@@ -102,7 +105,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
102
105
  return 'time';
103
106
  }
104
107
  get segmentLocale() {
105
- return this.locale;
108
+ return this.language;
106
109
  }
107
110
  get segmentOptions() {
108
111
  return { hourCycle: this.hourCycle, seconds: this.seconds };
@@ -113,7 +116,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
113
116
  written(at) {
114
117
  return this.timeStyle === 'iso' || !this.isTime(at)
115
118
  ? at
116
- : writeClock(at, clockLocale(this.locale, this.hourCycle), this.seconds);
119
+ : writeClock(at, clockLocale(this.language, this.hourCycle), this.seconds);
117
120
  }
118
121
  get display() {
119
122
  if (this.mode === 'multiple') {
@@ -152,14 +155,20 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
152
155
  const rules = { disableTimes: this.disableTimes, max: this.max, min: this.min };
153
156
  const faults = held.map((one) => timeFault(one, rules));
154
157
  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
- });
158
+ return [
159
+ 'rangeUnderflow',
160
+ fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
161
+ min: writeClock(this.min, clockLocale(this.language, this.hourCycle), this.seconds),
162
+ }),
163
+ ];
158
164
  }
159
165
  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
- });
166
+ return [
167
+ 'rangeOverflow',
168
+ fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
169
+ max: writeClock(this.max, clockLocale(this.language, this.hourCycle), this.seconds),
170
+ }),
171
+ ];
163
172
  }
164
173
  if (faults.includes('unavailable')) {
165
174
  return this.unavailableMessage || 'Choose a time that is available.';
@@ -178,13 +187,13 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
178
187
  renderPicker() {
179
188
  return html `<${this.tag('time-picker')}
180
189
  part="picker"
181
- exportparts="column: picker-column, column-empty: picker-column-empty,
190
+ exportparts="column: picker-column, column-empty: picker-column-empty, column-error: picker-column-error,
182
191
  column-feedback: picker-column-feedback, column-filter-icon: picker-column-filter-icon,
183
192
  column-filter-mark: picker-column-filter-mark, column-hint: picker-column-hint,
184
193
  column-items: picker-column-items, column-label: picker-column-label,
185
194
  column-live: picker-column-live, column-loading: picker-column-loading, column-search: picker-column-search,
186
- column-search-field: picker-column-search-field, columns: picker-columns, list: picker-list,
187
- list-empty: picker-list-empty, list-feedback: picker-list-feedback,
195
+ column-search-field: picker-column-search-field, columns: picker-columns, feedback: picker-feedback, list: picker-list,
196
+ list-empty: picker-list-empty, list-error: picker-list-error, list-feedback: picker-list-feedback,
188
197
  list-filter-icon: picker-list-filter-icon, list-filter-mark: picker-list-filter-mark,
189
198
  list-hint: picker-list-hint, list-items: picker-list-items, list-label: picker-list-label,
190
199
  list-live: picker-list-live, list-loading: picker-list-loading, list-search: picker-list-search,
@@ -200,7 +209,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
200
209
  manual
201
210
  label=${this.label || 'Time'}
202
211
  hour-cycle=${this.hourCycle ?? nothing}
203
- locale=${this.locale || nothing}
212
+ locale=${this.language || nothing}
204
213
  max=${this.max}
205
214
  min=${this.min}
206
215
  ?seconds=${this.seconds}
@@ -285,7 +294,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
285
294
  ?hidden=${!this.open}
286
295
  @keydown=${this.handleWheelEnter}
287
296
  >
297
+ <slot name="panel-header"></slot>
288
298
  ${this.renderPicker()}
299
+ <slot name="panel-footer"></slot>
289
300
  </div>
290
301
  ${this.renderHint()}${this.renderFeedback()}`;
291
302
  }
@@ -2,7 +2,7 @@ import { HelixFormElement, type HourCycle } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  import '../../listbox/index.js';
4
4
  import '../../option/index.js';
5
- declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & typeof HelixFormElement;
5
+ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinPickerFeedbackInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & typeof HelixFormElement;
6
6
  /**
7
7
  * @summary A control for choosing a time from a list or from wheels.
8
8
  *
@@ -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.
@@ -58,8 +59,10 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
58
59
  * @csspart column-search - The region that holds the filter field.
59
60
  * @csspart column-search-field - The filter field.
60
61
  * @csspart columns - The row of columns, in `wheels`.
62
+ * @csspart feedback - The message under the times, while `feedback` is set.
61
63
  * @csspart list - The listbox holding the times, in `list`.
62
64
  * @csspart list-empty - The text shown when the filter hides every option.
65
+ * @csspart list-error - The list's `error` part, which Time Picker never sets: its times do not load.
63
66
  * @csspart list-feedback - The message that says what is wrong with the value.
64
67
  * @csspart list-filter-icon - The icon beside the filter field.
65
68
  * @csspart list-filter-mark - The default icon beside the filter field, shown when none is slotted.
@@ -78,6 +81,8 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
78
81
  * @csspart option-item-selected - The row of a chosen time: the one time, or either end of a range.
79
82
  * @csspart option-label - The time's label.
80
83
  * @csspart option-text - The label and the caption, as one column.
84
+ *
85
+ * @cssstate invalid - While `invalid` is set or `feedback` says what is wrong.
81
86
  */
82
87
  export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_base {
83
88
  /**
@@ -112,18 +117,11 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
112
117
  hourCycle?: HourCycle;
113
118
  /**
114
119
  * What the wheel of hours is called, read by screen readers.
115
- */
116
- hourLabel: string;
117
- /**
118
- * Whether the current selection fails validation.
119
120
  *
120
- * A flag rather than a message, the same split Date Picker draws. A flat
121
- * picker has no room of its own for a sentence: the field that wraps one owns
122
- * the label, the hint and the feedback, and a second message inside the panel
123
- * would be the same error said twice. What is left for the picker is the one
124
- * thing the field cannot draw from outside, the mark on the answer itself.
121
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "Hour" in
122
+ * English, "Stunde" in German.
125
123
  */
126
- invalid: boolean;
124
+ hourLabel?: string;
127
125
  /**
128
126
  * Accessible name for the list, which has no visible one of its own.
129
127
  *
@@ -131,11 +129,14 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
131
129
  */
132
130
  label: string;
133
131
  /**
134
- * Language tag the times are written in.
132
+ * Language tag the times and the wheels' names are written in.
135
133
  *
136
- * Absent uses the runtime's own.
134
+ * Absent is the page's: the `lang` of the nearest element with one, as
135
+ * Shoelace and Web Awesome read it, then the runtime's own.
137
136
  */
138
137
  locale: string;
138
+ /** The locale the words are written in: `locale`, or the page's `lang`. */
139
+ private get language();
139
140
  /**
140
141
  * Stops the arrow keys in the list from choosing each time they move to.
141
142
  * Enter, Space or a click chooses.
@@ -151,16 +152,22 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
151
152
  /**
152
153
  * What the wheel of the half of the day is called, read by screen readers.
153
154
  * Its two options are written as the locale writes them, such as AM and PM.
155
+ *
156
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "AM/PM" in
157
+ * English, "Tageshälfte" in German.
154
158
  */
155
- meridiemLabel: string;
159
+ meridiemLabel?: string;
156
160
  /**
157
161
  * Earliest time offered, as `HH:mm`.
158
162
  */
159
163
  min: string;
160
164
  /**
161
165
  * What the wheel of minutes is called, read by screen readers.
166
+ *
167
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "Minute" in
168
+ * English and German, "分" in Japanese.
162
169
  */
163
- minuteLabel: string;
170
+ minuteLabel?: string;
164
171
  /**
165
172
  * How many times can be held at once.
166
173
  *
@@ -322,8 +329,11 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
322
329
  required: boolean;
323
330
  /**
324
331
  * What the wheel of seconds is called, read by screen readers.
332
+ *
333
+ * Absent is the locale's own word, from `Intl.DisplayNames`: "Second" in
334
+ * English, "Sekunde" in German.
325
335
  */
326
- secondLabel: string;
336
+ secondLabel?: string;
327
337
  /**
328
338
  * Whether times carry their seconds.
329
339
  *
@@ -446,7 +456,8 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
446
456
  private listRevealed;
447
457
  /**
448
458
  * The list's name: the host's `aria-labelledby` read out, then its
449
- * `aria-label`, then `label`.
459
+ * `aria-label`, then `label`, through core's `hostWords`, which Select reads
460
+ * its list's name through too.
450
461
  *
451
462
  * Read out as words, because the list is inside two shadow roots and an id on
452
463
  * the page reaches neither. Measured before this: `<helix-time-picker
@@ -4,25 +4,22 @@ 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 { clockLocale, commaList, customElement, dayPeriod, elementById, fillTemplate, HelixFormElement, inlineStep, isTwelveHour, MixinControllerValue, nearestTime, offeredTimes, reportValues, secondsAsValue, timeBarred, timeFault, valueAsSeconds, wheelParts, wholeHour, writeClock, } from '@fusion.dev/helix-core';
7
+ import { clockLocale, commaList, customElement, dayPeriod, fillTemplate, HelixFormElement, hostWords, inlineStep, isTwelveHour, localeOf, MixinControllerValue, MixinPickerFeedback, nearestTime, offeredTimes, reportValues, secondsAsValue, timeBarred, timeFault, valueAsSeconds, wheelParts, wholeHour, writeClock, } from '@fusion.dev/helix-core';
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
- let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControllerValue(HelixFormElement) {
14
+ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerFeedback(MixinControllerValue(HelixFormElement)) {
14
15
  constructor() {
15
16
  super(...arguments);
16
17
  this.disableTimes = '';
17
- this.hourLabel = 'Hour';
18
- this.invalid = false;
19
18
  this.label = 'Time';
20
19
  this.locale = '';
21
20
  this.manual = false;
22
21
  this.max = '23:59';
23
- this.meridiemLabel = 'Before or after noon';
24
22
  this.min = '00:00';
25
- this.minuteLabel = 'Minute';
26
23
  this.handleListInput = (event) => {
27
24
  event.stopPropagation();
28
25
  };
@@ -77,7 +74,6 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
77
74
  };
78
75
  this.readOnly = false;
79
76
  this.required = false;
80
- this.secondLabel = 'Second';
81
77
  this.seconds = false;
82
78
  this.step = 15;
83
79
  this.listRevealed = false;
@@ -97,11 +93,14 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
97
93
  next.focus();
98
94
  };
99
95
  }
96
+ get language() {
97
+ return localeOf(this, this.locale);
98
+ }
100
99
  get times() {
101
100
  return offeredTimes(this.min, this.max, this.step, this.seconds);
102
101
  }
103
102
  get clock() {
104
- return clockLocale(this.locale, this.hourCycle);
103
+ return clockLocale(this.language, this.hourCycle);
105
104
  }
106
105
  valueFor(at) {
107
106
  return secondsAsValue(at, this.seconds);
@@ -242,13 +241,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
242
241
  this.reveal();
243
242
  }
244
243
  get listName() {
245
- const named = (this.getAttribute('aria-labelledby') ?? '')
246
- .split(/\s+/)
247
- .filter(Boolean)
248
- .map((id) => elementById(this, id)?.textContent?.trim() ?? '')
249
- .filter(Boolean)
250
- .join(' ');
251
- return named || this.getAttribute('aria-label') || this.label;
244
+ return hostWords(this, this.label);
252
245
  }
253
246
  connectedCallback() {
254
247
  super.connectedCallback();
@@ -262,7 +255,6 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
262
255
  }
263
256
  willUpdate(changed) {
264
257
  super.willUpdate(changed);
265
- this.internals.ariaInvalid = this.invalid ? 'true' : null;
266
258
  this.report();
267
259
  }
268
260
  updated(changed) {
@@ -285,8 +277,8 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
285
277
  return html `<${this.tag('listbox')}
286
278
  part="column"
287
279
  data-column=${part}
288
- aria-invalid=${this.invalid ? 'true' : nothing}
289
- exportparts="empty: column-empty, feedback: column-feedback, filter-icon: column-filter-icon,
280
+ aria-invalid=${this.marked ? 'true' : nothing}
281
+ exportparts="empty: column-empty, error: column-error, feedback: column-feedback, filter-icon: column-filter-icon,
290
282
  filter-mark: column-filter-mark, hint: column-hint, items: column-items, label: column-label,
291
283
  live: column-live, loading: column-loading, search: column-search, search-field: column-search-field"
292
284
  aria-label=${label}
@@ -323,21 +315,21 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
323
315
  data-unset=${this.value === '' ? '' : nothing}
324
316
  @keydown=${this.handleColumnsKeydown}
325
317
  >
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))}
318
+ ${this.renderColumn('hour', this.hourLabel ?? wheelName('hour', this.language), hours.map(String), (one) => (twelve ? one : one.padStart(2, '0')), String(shown), (one) => this.wholeHourBarred(Number(one), twelve ? meridiem : undefined))}
319
+ ${this.renderColumn('minute', this.minuteLabel ?? wheelName('minute', this.language), this.minutes.map(String), (one) => one.padStart(2, '0'), String(minute), (one) => this.barredAt(hour * 3600 + Number(one) * 60))}
328
320
  ${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)))
321
+ ? this.renderColumn('second', this.secondLabel ?? wheelName('second', this.language), this.secondsShown.map(String), (one) => one.padStart(2, '0'), String(second), (one) => this.barredAt(hour * 3600 + minute * 60 + Number(one)))
330
322
  : nothing}
331
323
  ${twelve
332
- ? this.renderColumn('meridiem', this.meridiemLabel, ['AM', 'PM'], (one) => dayPeriod(one, this.clock), meridiem, (one) => this.halfBarred(one))
324
+ ? this.renderColumn('meridiem', this.meridiemLabel ?? wheelName('dayPeriod', this.language), ['AM', 'PM'], (one) => dayPeriod(one, this.clock), meridiem, (one) => this.halfBarred(one))
333
325
  : nothing}
334
326
  </div>`;
335
327
  }
336
328
  renderList() {
337
329
  return html `<${this.tag('listbox')}
338
330
  part="list"
339
- aria-invalid=${this.invalid ? 'true' : nothing}
340
- exportparts="empty: list-empty, feedback: list-feedback, filter-icon: list-filter-icon,
331
+ aria-invalid=${this.marked ? 'true' : nothing}
332
+ exportparts="empty: list-empty, error: list-error, feedback: list-feedback, filter-icon: list-filter-icon,
341
333
  filter-mark: list-filter-mark, hint: list-hint, items: list-items, label: list-label,
342
334
  live: list-live, loading: list-loading, search: list-search, search-field: list-search-field"
343
335
  aria-label=${this.listName}
@@ -368,9 +360,9 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
368
360
  }
369
361
  render() {
370
362
  if (this.variant === 'wheels' && this.mode === undefined) {
371
- return this.renderSpinner();
363
+ return html `${this.renderSpinner()}${this.renderPickerFeedback()}`;
372
364
  }
373
- return html `${this.renderList()}`;
365
+ return html `${this.renderList()}${this.renderPickerFeedback()}`;
374
366
  }
375
367
  get valueAsDate() {
376
368
  const at = valueAsSeconds(this.value);
@@ -401,9 +393,6 @@ __decorate([
401
393
  __decorate([
402
394
  property({ attribute: 'hour-label' })
403
395
  ], HelixHeadlessTimePicker.prototype, "hourLabel", void 0);
404
- __decorate([
405
- property({ reflect: true, type: Boolean })
406
- ], HelixHeadlessTimePicker.prototype, "invalid", void 0);
407
396
  __decorate([
408
397
  property()
409
398
  ], HelixHeadlessTimePicker.prototype, "label", void 0);
@@ -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
+ };
@@ -4,7 +4,7 @@ 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 { customElement, HelixElement, hostAria } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement, headingLevel, hostAria } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  const HEADING_ID = 'heading';
@@ -18,7 +18,7 @@ let HelixHeadlessTimelineGroup = class HelixHeadlessTimelineGroup extends HelixE
18
18
  hostAria(this.internals, { role: 'listitem' });
19
19
  }
20
20
  render() {
21
- const level = Math.min(6, Math.max(1, Math.trunc(this.headingLevel ?? 3)));
21
+ const level = headingLevel(this.headingLevel);
22
22
  return html `<div part="heading" id=${HEADING_ID} role="heading" aria-level=${level}>
23
23
  <slot name="heading">${this.label}</slot>
24
24
  </div>
@@ -13,9 +13,11 @@ 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
17
- * is its own assertive live region, so it is announced at once; every other one
18
- * is announced politely by the region.
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. The region
19
+ * says each message once as it arrives, a `danger` one assertively, so a
20
+ * message is never a live region of its own.
19
21
  *
20
22
  * A touch or a pen swipes a message toward the end of the line, and past
21
23
  * halfway, or quickly, dismisses it through the same `helix-dismiss` as its
@@ -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.
@@ -114,6 +120,13 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
114
120
  connectedCallback(): void;
115
121
  protected willUpdate(changed: PropertyValues): void;
116
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;
117
130
  protected firstUpdated(changed: PropertyValues): void;
118
131
  /**
119
132
  * The mark for the message's tone, behind a seam.
@@ -46,6 +46,17 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
46
46
  this.handleResume = () => {
47
47
  this.countdown.release();
48
48
  };
49
+ this.name = () => {
50
+ const words = this.partNamed('content');
51
+ if (!words) {
52
+ return;
53
+ }
54
+ const heading = this.assigned('heading');
55
+ hostAria(this.internals, {
56
+ describedBy: this.assigned('description'),
57
+ labelledBy: heading.length > 0 ? heading : [words],
58
+ });
59
+ };
49
60
  }
50
61
  get open() {
51
62
  return this.openState ?? true;
@@ -93,14 +104,15 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
93
104
  this.toggleAttribute('hidden', !this.open);
94
105
  hostAria(this.internals, { role: 'alertdialog' });
95
106
  this.internals.ariaModal = 'false';
96
- this.internals.ariaLive = this.tone === 'danger' ? 'assertive' : null;
97
107
  }
98
108
  updated(changed) {
99
109
  super.updated(changed);
100
- const words = this.partNamed('content');
101
- if (words) {
102
- hostAria(this.internals, { labelledBy: [words] });
103
- }
110
+ this.name();
111
+ }
112
+ assigned(name) {
113
+ return (this.renderRoot
114
+ ?.querySelector(`slot[name="${name}"]`)
115
+ ?.assignedElements({ flatten: true }) ?? []);
104
116
  }
105
117
  firstUpdated(changed) {
106
118
  super.firstUpdated(changed);
@@ -137,7 +149,11 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
137
149
  ${this.renderIcon(mark)}
138
150
  </span>`
139
151
  : nothing}
140
- <div part="content"><slot></slot></div>
152
+ <div part="content">
153
+ <slot name="heading" part="heading" @slotchange=${this.name}></slot>
154
+ <slot name="description" part="description" @slotchange=${this.name}></slot>
155
+ <slot></slot>
156
+ </div>
141
157
  <div part="actions"><slot name="actions"></slot></div>
142
158
  ${this.dismissible
143
159
  ? drawDismiss({
@@ -9,10 +9,15 @@ import { type PropertyValues, type TemplateResult } from 'lit';
9
9
  * announce a region that arrives already holding its message. `Radio.Group` is
10
10
  * part of its family for the same reason.
11
11
  *
12
- * **The region is a landmark named by `label`, and a polite live region.** A
13
- * `danger` message is announced assertively, and every other one politely.
14
- * Each message is an `alertdialog` named by its words, so a reader who moves
15
- * into the stack hears which message they are on.
12
+ * **The region is a landmark named by `label`, and it says each message once
13
+ * as it arrives**: a `danger` message assertively, and every other one
14
+ * politely. It says the word for the tone, the heading, the description and
15
+ * the text, and not the actions, through two live regions of its own, the
16
+ * `live` parts, which it empties again a moment later. The stack itself is not
17
+ * a live region, so a message is never said twice, and changing the words of a
18
+ * message already showing says nothing. Each message is an `alertdialog` named
19
+ * by its words, so a reader who moves into the stack hears which message they
20
+ * are on.
16
21
  *
17
22
  * **`hotkey` takes focus to the stack and back**, F8 unless you set it, and
18
23
  * `label` says which key: `{hotkey}` in it is filled in, so the default name
@@ -54,6 +59,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
54
59
  *
55
60
  * @event {HelixDismissEvent} helix-dismiss - A message is being dismissed, by its control or by its timer. The message sends it, and you can listen for it on the region. Cancelable: canceling it keeps the message.
56
61
  *
62
+ * @csspart live - The two regions that say each message as it arrives, a polite `status` and an assertive `alert`, inside the stack. Empty at rest, and hide them with the standard clip, never `display: none`.
57
63
  * @csspart region - The stack the messages are in. It is in the top layer while a message shows, and takes focus from `hotkey` where no message holds a control.
58
64
  */
59
65
  export declare class HelixHeadlessToast extends HelixElement {
@@ -95,6 +101,24 @@ export declare class HelixHeadlessToast extends HelixElement {
95
101
  */
96
102
  placement?: 'bottom-center' | 'bottom-end' | 'bottom-start' | 'top-center' | 'top-end' | 'top-start';
97
103
  protected willUpdate(changed: PropertyValues): void;
104
+ /** What the polite region is saying. */
105
+ private said;
106
+ /** What the assertive region is saying. */
107
+ private urgent;
108
+ private readonly hush;
109
+ /**
110
+ * Says messages that have just arrived, each once, `danger` ones assertively.
111
+ *
112
+ * Emptied first and filled a frame later, so a message with the same words
113
+ * as the one before is still a change, and so a region the stack has just
114
+ * shown is in the accessibility tree before its words land.
115
+ */
116
+ private announce;
117
+ /**
118
+ * Says the messages that have just arrived: through the regions, or through
119
+ * `ariaNotify` where a modal dialog has made them inert.
120
+ */
121
+ private tell;
98
122
  /** The element focus came from when it entered the stack. */
99
123
  private focusOrigin;
100
124
  private readonly scope;
@@ -109,10 +133,16 @@ export declare class HelixHeadlessToast extends HelixElement {
109
133
  * stack, holding `message` as its text. The region removes it once it has
110
134
  * been dismissed and has finished leaving, which is the one case where it
111
135
  * removes anything: a message you render stays yours.
136
+ *
137
+ * `heading` gives the message a title, which names it, and `message` becomes
138
+ * the line of detail under it. `action` is an element for the message's
139
+ * `actions` slot, such as an Undo button you have wired up.
112
140
  */
113
141
  add(message: string, options?: {
142
+ action?: Element;
114
143
  dismissible?: boolean;
115
144
  duration?: number;
145
+ heading?: string;
116
146
  tone?: 'danger' | 'info' | 'success' | 'warning';
117
147
  }): HTMLElement;
118
148
  /** Removes a message `add()` made, once it has hidden and finished leaving. */