@fusion.dev/helix-headless 0.147.0 → 0.149.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 (296) hide show
  1. package/custom-elements.json +11222 -2332
  2. package/dist/accordion/item/accordion-item.d.ts +5 -2
  3. package/dist/accordion/item/accordion-item.js +11 -7
  4. package/dist/accordion/root/accordion-root.js +4 -6
  5. package/dist/announcement/root/announcement-root.d.ts +61 -5
  6. package/dist/announcement/root/announcement-root.js +126 -20
  7. package/dist/area-chart/root/area-chart-root.d.ts +11 -0
  8. package/dist/area-chart/root/area-chart-root.js +21 -9
  9. package/dist/avatar/group/avatar-group.d.ts +10 -2
  10. package/dist/avatar/group/avatar-group.js +10 -5
  11. package/dist/badge/count.d.ts +19 -0
  12. package/dist/badge/count.js +20 -0
  13. package/dist/badge/root/badge-root.d.ts +6 -2
  14. package/dist/badge/root/badge-root.js +8 -22
  15. package/dist/bar-chart/root/bar-chart-root.d.ts +13 -1
  16. package/dist/bar-chart/root/bar-chart-root.js +17 -4
  17. package/dist/blockquote/root/blockquote-root.d.ts +66 -8
  18. package/dist/blockquote/root/blockquote-root.js +85 -8
  19. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +2 -2
  20. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +8 -1
  21. package/dist/breadcrumbs/root/breadcrumbs-root.js +5 -2
  22. package/dist/button/root/button-root.d.ts +10 -1
  23. package/dist/button/root/button-root.js +3 -2
  24. package/dist/button-group/arrows.d.ts +14 -0
  25. package/dist/button-group/arrows.js +10 -0
  26. package/dist/button-group/root/button-group-root.d.ts +144 -3
  27. package/dist/button-group/root/button-group-root.js +142 -2
  28. package/dist/callout/root/callout-root.d.ts +16 -2
  29. package/dist/callout/root/callout-root.js +16 -4
  30. package/dist/canvas/describe.d.ts +10 -0
  31. package/dist/canvas/describe.js +9 -0
  32. package/dist/canvas/edge-pan.d.ts +61 -0
  33. package/dist/canvas/edge-pan.js +63 -0
  34. package/dist/canvas/neighbor.d.ts +17 -0
  35. package/dist/canvas/neighbor.js +1 -0
  36. package/dist/canvas/node/canvas-node.d.ts +12 -2
  37. package/dist/canvas/node/canvas-node.js +8 -3
  38. package/dist/canvas/root/canvas-document.d.ts +10 -0
  39. package/dist/canvas/root/canvas-document.js +1 -0
  40. package/dist/canvas/root/canvas-root.d.ts +168 -9
  41. package/dist/canvas/root/canvas-root.js +239 -69
  42. package/dist/canvas/snap.d.ts +42 -0
  43. package/dist/canvas/snap.js +32 -0
  44. package/dist/carousel/root/carousel-root.d.ts +9 -3
  45. package/dist/carousel/root/carousel-root.js +17 -10
  46. package/dist/chat/composer/chat-composer.d.ts +5 -0
  47. package/dist/chat/composer/chat-composer.js +4 -1
  48. package/dist/chat/message/chat-message.d.ts +9 -5
  49. package/dist/chat/message/chat-message.js +8 -4
  50. package/dist/chat/naming.js +2 -2
  51. package/dist/chat/root/chat-root.d.ts +40 -4
  52. package/dist/chat/root/chat-root.js +38 -14
  53. package/dist/checkbox/root/checkbox-root.d.ts +11 -0
  54. package/dist/checkbox/root/checkbox-root.js +8 -2
  55. package/dist/checkbox-group/root/checkbox-group-root.d.ts +24 -0
  56. package/dist/checkbox-group/root/checkbox-group-root.js +28 -12
  57. package/dist/checkbox-group/select-all.d.ts +11 -0
  58. package/dist/checkbox-group/select-all.js +5 -0
  59. package/dist/code-block/root/code-block-root.d.ts +20 -8
  60. package/dist/code-block/root/code-block-root.js +16 -5
  61. package/dist/color-input/root/color-input-root.d.ts +13 -0
  62. package/dist/color-input/root/color-input-root.js +18 -5
  63. package/dist/color-picker/root/color-picker-root.d.ts +19 -3
  64. package/dist/color-picker/root/color-picker-root.js +52 -24
  65. package/dist/color-picker/wheel.d.ts +11 -0
  66. package/dist/color-picker/wheel.js +9 -0
  67. package/dist/combobox/root/combobox-root.d.ts +106 -18
  68. package/dist/combobox/root/combobox-root.js +101 -26
  69. package/dist/command/root/command-root.d.ts +19 -9
  70. package/dist/command/root/command-root.js +9 -4
  71. package/dist/copy-button/root/copy-button-root.d.ts +5 -0
  72. package/dist/copy-button/root/copy-button-root.js +7 -2
  73. package/dist/data-table/root/data-table-root.d.ts +171 -29
  74. package/dist/data-table/root/data-table-root.js +284 -161
  75. package/dist/date-input/root/date-input-root.d.ts +32 -9
  76. package/dist/date-input/root/date-input-root.js +66 -44
  77. package/dist/date-picker/root/date-picker-root.d.ts +38 -15
  78. package/dist/date-picker/root/date-picker-root.js +52 -33
  79. package/dist/description-list/item/description-list-item.d.ts +4 -0
  80. package/dist/description-list/item/description-list-item.js +7 -1
  81. package/dist/dialog/root/dialog-root.d.ts +12 -1
  82. package/dist/dialog/root/dialog-root.js +11 -4
  83. package/dist/divider/root/divider-root.d.ts +45 -16
  84. package/dist/divider/root/divider-root.js +28 -4
  85. package/dist/donut-chart/root/donut-chart-root.d.ts +5 -0
  86. package/dist/donut-chart/root/donut-chart-root.js +8 -5
  87. package/dist/drawer/root/drawer-root.d.ts +12 -1
  88. package/dist/drawer/root/drawer-root.js +9 -2
  89. package/dist/drilldown/item/drilldown-item.js +3 -4
  90. package/dist/drilldown/root/drilldown-root.d.ts +5 -0
  91. package/dist/drilldown/root/drilldown-root.js +4 -1
  92. package/dist/element-events.generated.js +26 -3
  93. package/dist/empty/root/empty-root.d.ts +17 -3
  94. package/dist/empty/root/empty-root.js +29 -5
  95. package/dist/file-input/root/file-input-root.d.ts +18 -3
  96. package/dist/file-input/root/file-input-root.js +34 -18
  97. package/dist/file-input/status.js +2 -1
  98. package/dist/filter-input/chip/filter-chip.d.ts +13 -0
  99. package/dist/filter-input/chip/filter-chip.js +7 -3
  100. package/dist/filter-input/menu/filter-menu.d.ts +5 -0
  101. package/dist/filter-input/menu/filter-menu.js +3 -1
  102. package/dist/filter-input/root/filter-input-root.d.ts +20 -3
  103. package/dist/filter-input/root/filter-input-root.js +8 -4
  104. package/dist/format-date/fields.d.ts +20 -0
  105. package/dist/format-date/fields.js +14 -0
  106. package/dist/format-date/options.d.ts +2 -1
  107. package/dist/format-date/options.js +9 -38
  108. package/dist/format-date/root/format-date-root.d.ts +55 -5
  109. package/dist/format-date/root/format-date-root.js +29 -34
  110. package/dist/graph/root/graph-model.d.ts +11 -0
  111. package/dist/graph/root/graph-model.js +4 -0
  112. package/dist/graph/root/graph-root.d.ts +101 -14
  113. package/dist/graph/root/graph-root.js +140 -46
  114. package/dist/heatmap/root/heatmap-root.d.ts +37 -4
  115. package/dist/heatmap/root/heatmap-root.js +51 -16
  116. package/dist/icon-button/root/icon-button-root.d.ts +5 -0
  117. package/dist/icon-button/root/icon-button-root.js +1 -0
  118. package/dist/image/root/image-root.d.ts +11 -0
  119. package/dist/input/root/input-root.d.ts +5 -0
  120. package/dist/input/root/input-root.js +4 -1
  121. package/dist/kbd/root/kbd-root.js +1 -2
  122. package/dist/legend/root/legend-root.js +4 -17
  123. package/dist/lightbox/root/lightbox-root.d.ts +14 -4
  124. package/dist/lightbox/root/lightbox-root.js +25 -7
  125. package/dist/line-chart/root/line-chart-root.d.ts +5 -0
  126. package/dist/line-chart/root/line-chart-root.js +4 -2
  127. package/dist/list/item/list-item.d.ts +32 -0
  128. package/dist/list/item/list-item.js +34 -7
  129. package/dist/list/root/list-root.d.ts +87 -0
  130. package/dist/list/root/list-root.js +119 -23
  131. package/dist/listbox/reorder/index.d.ts +1 -0
  132. package/dist/listbox/reorder/index.js +4 -0
  133. package/dist/listbox/reorder/listbox-reorder.d.ts +83 -0
  134. package/dist/listbox/reorder/listbox-reorder.js +151 -0
  135. package/dist/listbox/root/listbox-root.d.ts +185 -33
  136. package/dist/listbox/root/listbox-root.js +166 -136
  137. package/dist/loader/root/loader-root.d.ts +5 -0
  138. package/dist/loader/root/loader-root.js +3 -1
  139. package/dist/map/area/map-area.d.ts +5 -0
  140. package/dist/map/area/map-area.js +3 -1
  141. package/dist/map/buildings/map-buildings.d.ts +5 -0
  142. package/dist/map/buildings/map-buildings.js +3 -1
  143. package/dist/map/contours/map-contours.d.ts +5 -0
  144. package/dist/map/contours/map-contours.js +3 -1
  145. package/dist/map/landcover/map-landcover.d.ts +5 -0
  146. package/dist/map/landcover/map-landcover.js +3 -1
  147. package/dist/map/marker/map-marker.d.ts +18 -2
  148. package/dist/map/marker/map-marker.js +13 -5
  149. package/dist/map/points/map-points.d.ts +5 -0
  150. package/dist/map/points/map-points.js +6 -4
  151. package/dist/map/position/map-position.d.ts +5 -0
  152. package/dist/map/position/map-position.js +3 -1
  153. package/dist/map/raster/map-raster.d.ts +5 -0
  154. package/dist/map/raster/map-raster.js +3 -1
  155. package/dist/map/root/map-root.d.ts +73 -16
  156. package/dist/map/root/map-root.js +122 -44
  157. package/dist/map/route/map-route.d.ts +5 -0
  158. package/dist/map/route/map-route.js +3 -1
  159. package/dist/map/terrain/map-terrain.d.ts +5 -0
  160. package/dist/map/terrain/map-terrain.js +3 -1
  161. package/dist/megamenu/root/megamenu-root.js +4 -11
  162. package/dist/menu/root/menu-root.d.ts +7 -2
  163. package/dist/menu/root/menu-root.js +3 -1
  164. package/dist/meter/root/meter-root.d.ts +16 -3
  165. package/dist/meter/root/meter-root.js +12 -5
  166. package/dist/navigation/root/navigation-root.d.ts +5 -0
  167. package/dist/navigation/root/navigation-root.js +7 -8
  168. package/dist/notifications/group/notification-group.d.ts +8 -1
  169. package/dist/notifications/group/notification-group.js +12 -6
  170. package/dist/notifications/notification/notification.d.ts +17 -1
  171. package/dist/notifications/notification/notification.js +6 -2
  172. package/dist/notifications/root/notifications-root.d.ts +49 -5
  173. package/dist/notifications/root/notifications-root.js +36 -8
  174. package/dist/number-input/root/number-input-root.d.ts +21 -8
  175. package/dist/number-input/root/number-input-root.js +26 -11
  176. package/dist/object-inspector/root/object-inspector-root.d.ts +56 -13
  177. package/dist/object-inspector/root/object-inspector-root.js +41 -30
  178. package/dist/outline/root/outline-root.d.ts +5 -0
  179. package/dist/outline/root/outline-root.js +3 -1
  180. package/dist/pagination/root/pagination-root.d.ts +7 -1
  181. package/dist/pagination/root/pagination-root.js +16 -7
  182. package/dist/pagination/size/pagination-size.d.ts +8 -3
  183. package/dist/pagination/size/pagination-size.js +5 -3
  184. package/dist/pagination/summary/pagination-summary.d.ts +8 -6
  185. package/dist/pagination/summary/pagination-summary.js +4 -9
  186. package/dist/pin-input/code.d.ts +23 -0
  187. package/dist/pin-input/code.js +21 -0
  188. package/dist/pin-input/root/pin-input-root.d.ts +9 -3
  189. package/dist/pin-input/root/pin-input-root.js +13 -23
  190. package/dist/popover/root/popover-root.d.ts +12 -2
  191. package/dist/popover/root/popover-root.js +10 -4
  192. package/dist/progress/root/progress-root.d.ts +7 -2
  193. package/dist/progress/root/progress-root.js +5 -2
  194. package/dist/qr-code/name.d.ts +3 -2
  195. package/dist/qr-code/name.js +2 -2
  196. package/dist/qr-code/root/qr-code-root.d.ts +26 -5
  197. package/dist/qr-code/root/qr-code-root.js +27 -6
  198. package/dist/radio/group/radio-group.d.ts +11 -0
  199. package/dist/radio/group/radio-group.js +8 -2
  200. package/dist/rating/root/rating-root.d.ts +12 -1
  201. package/dist/rating/root/rating-root.js +10 -3
  202. package/dist/scatter-chart/measures.d.ts +22 -0
  203. package/dist/scatter-chart/measures.js +11 -0
  204. package/dist/scatter-chart/root/scatter-chart-root.d.ts +22 -8
  205. package/dist/scatter-chart/root/scatter-chart-root.js +25 -23
  206. package/dist/select/root/select-root.d.ts +67 -8
  207. package/dist/select/root/select-root.js +45 -11
  208. package/dist/skip-link/root/skip-link-root.d.ts +5 -0
  209. package/dist/skip-link/root/skip-link-root.js +3 -1
  210. package/dist/slider/root/slider-root.d.ts +7 -2
  211. package/dist/slider/root/slider-root.js +11 -5
  212. package/dist/sparkline/readings.d.ts +15 -5
  213. package/dist/sparkline/readings.js +3 -3
  214. package/dist/sparkline/root/sparkline-root.d.ts +9 -4
  215. package/dist/sparkline/root/sparkline-root.js +9 -3
  216. package/dist/speed-dial/group/speed-dial-group.d.ts +48 -0
  217. package/dist/speed-dial/group/speed-dial-group.js +43 -0
  218. package/dist/speed-dial/index.d.ts +1 -0
  219. package/dist/speed-dial/index.js +1 -0
  220. package/dist/speed-dial/item/speed-dial-item.d.ts +26 -1
  221. package/dist/speed-dial/item/speed-dial-item.js +41 -3
  222. package/dist/speed-dial/long-press.d.ts +50 -0
  223. package/dist/speed-dial/long-press.js +48 -0
  224. package/dist/speed-dial/root/speed-dial-root.d.ts +85 -1
  225. package/dist/speed-dial/root/speed-dial-root.js +117 -5
  226. package/dist/splitter/root/splitter-root.d.ts +12 -3
  227. package/dist/splitter/root/splitter-root.js +22 -4
  228. package/dist/steps/root/steps-root.d.ts +9 -2
  229. package/dist/steps/root/steps-root.js +6 -3
  230. package/dist/steps/step/step.d.ts +12 -0
  231. package/dist/steps/step/step.js +11 -2
  232. package/dist/switch/root/switch-root.d.ts +11 -0
  233. package/dist/switch/root/switch-root.js +8 -2
  234. package/dist/table/cell/table-cell.d.ts +8 -1
  235. package/dist/table/cell/table-cell.js +6 -2
  236. package/dist/table/column/table-column.d.ts +11 -4
  237. package/dist/table/column/table-column.js +15 -10
  238. package/dist/table/grid-controller.d.ts +122 -0
  239. package/dist/table/grid-controller.js +299 -0
  240. package/dist/table/root/table-root.d.ts +154 -8
  241. package/dist/table/root/table-root.js +197 -38
  242. package/dist/table/row/table-row.d.ts +55 -1
  243. package/dist/table/row/table-row.js +60 -7
  244. package/dist/tabs/root/tabs-root.d.ts +5 -0
  245. package/dist/tabs/root/tabs-root.js +3 -1
  246. package/dist/tag/group/tag-group.d.ts +5 -0
  247. package/dist/tag/group/tag-group.js +8 -15
  248. package/dist/tag/root/tag-root.d.ts +14 -1
  249. package/dist/tag/root/tag-root.js +11 -8
  250. package/dist/textarea/root/textarea-root.d.ts +5 -0
  251. package/dist/textarea/root/textarea-root.js +3 -1
  252. package/dist/time-input/root/time-input-root.d.ts +14 -7
  253. package/dist/time-input/root/time-input-root.js +43 -32
  254. package/dist/time-picker/root/time-picker-root.d.ts +16 -7
  255. package/dist/time-picker/root/time-picker-root.js +28 -12
  256. package/dist/toast/item/toast-item.d.ts +13 -3
  257. package/dist/toast/item/toast-item.js +2 -0
  258. package/dist/toast/root/toast-root.d.ts +22 -2
  259. package/dist/toast/root/toast-root.js +24 -17
  260. package/dist/toggle/group/toggle-group.js +3 -5
  261. package/dist/toolbar/root/toolbar-root.d.ts +36 -0
  262. package/dist/toolbar/root/toolbar-root.js +43 -9
  263. package/dist/tooltip/root/tooltip-root.d.ts +27 -17
  264. package/dist/tooltip/root/tooltip-root.js +1 -2
  265. package/dist/tour/root/tour-root.d.ts +8 -2
  266. package/dist/tour/root/tour-root.js +4 -2
  267. package/dist/tour/stop/tour-stop.d.ts +5 -0
  268. package/dist/tour/stop/tour-stop.js +6 -1
  269. package/dist/tree/grip.d.ts +5 -0
  270. package/dist/tree/grip.js +1 -0
  271. package/dist/tree/item/tree-item.d.ts +24 -0
  272. package/dist/tree/item/tree-item.js +27 -5
  273. package/dist/tree/root/tree-root.d.ts +66 -1
  274. package/dist/tree/root/tree-root.js +77 -5
  275. package/dist/trend/root/trend-root.d.ts +20 -4
  276. package/dist/trend/root/trend-root.js +20 -5
  277. package/dist/video/root/video-root.d.ts +23 -3
  278. package/dist/video/root/video-root.js +56 -15
  279. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
  280. package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
  281. package/dist/video-playlist/root/video-playlist-root.d.ts +5 -0
  282. package/dist/video-playlist/root/video-playlist-root.js +3 -1
  283. package/dist/virtual-list/root/virtual-list-root.d.ts +19 -3
  284. package/dist/virtual-list/root/virtual-list-root.js +10 -19
  285. package/lint.json +1 -1
  286. package/package.json +7 -6
  287. package/types/jsx.d.ts +6005 -2114
  288. package/types/svelte.d.ts +1 -0
  289. package/types/vue.d.ts +1594 -676
  290. package/types/words.d.ts +3280 -0
  291. package/dist/kbd/keys.d.ts +0 -29
  292. package/dist/kbd/keys.js +0 -52
  293. package/dist/toast/hotkey.d.ts +0 -22
  294. package/dist/toast/hotkey.js +0 -23
  295. package/dist/tooltip/focus-target.d.ts +0 -6
  296. package/dist/tooltip/focus-target.js +0 -9
@@ -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, customElement, HelixElement, IndicatorController, KeyboardNavigationController, MixinControllerActive, whenHydrated, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, customElement, HelixElement, IndicatorController, KeyboardNavigationController, MixinControllerActive, whenHydrated, words, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { HelixHeadlessTabPanel } from '../panel/tab-panel.js';
@@ -40,6 +40,7 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
40
40
  this.indicator.place();
41
41
  };
42
42
  }
43
+ static { this.words = 'helix-tabs'; }
43
44
  get tabs() {
44
45
  return [...this.children].filter((child) => child instanceof HelixHeadlessTab);
45
46
  }
@@ -111,6 +112,7 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
111
112
  }
112
113
  };
113
114
  __decorate([
115
+ words,
114
116
  property()
115
117
  ], HelixHeadlessTabs.prototype, "label", void 0);
116
118
  __decorate([
@@ -46,6 +46,11 @@ export type TagSelectionMode = SelectionMode;
46
46
  * @csspart empty - Holds the `empty` slot while the group has no tags, rendered only then. Takes focus when the last tag is removed.
47
47
  */
48
48
  export declare class HelixHeadlessTagGroup extends HelixElement {
49
+ /**
50
+ * The key this part's words are registered under, its styled tag:
51
+ * `registerWords('de', { 'helix-tag-group': { emptyLabel: 'Keine Schlagwörter' } })`.
52
+ */
53
+ static words: string;
49
54
  /**
50
55
  * The words the group shows and says once its last tag is removed, where
51
56
  * nothing is in the `empty` slot.
@@ -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 { commaList, customElement, deepActiveElement, deepContains, HelixBeforeChangeEvent, HelixElement, hostAria, KeyboardNavigationController, pressedValue, prunedValue, requestChange, rovingStop, slottedWords, typeaheadByWords, whenHydrated, } from '@fusion.dev/helix-core';
7
+ import { commaList, customElement, deepActiveElement, deepContains, focusItemOf, HelixElement, hostAria, KeyboardNavigationController, pressedValue, prunedValue, requestValue, rovingStop, slottedWords, typeaheadByWords, whenHydrated, words, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { HelixHeadlessTag } from '../root/tag-root.js';
@@ -92,6 +92,7 @@ let HelixHeadlessTagGroup = class HelixHeadlessTagGroup extends HelixElement {
92
92
  }
93
93
  };
94
94
  }
95
+ static { this.words = 'helix-tag-group'; }
95
96
  get written() {
96
97
  return typeof this.value === 'string'
97
98
  ? this.value
@@ -107,14 +108,11 @@ let HelixHeadlessTagGroup = class HelixHeadlessTagGroup extends HelixElement {
107
108
  return this.tags.filter((tag) => !tag.disabled);
108
109
  }
109
110
  navigable(tag) {
110
- return {
111
- contains: (node) => tag.contains(node),
111
+ return focusItemOf(tag, {
112
112
  disabled: tag.disabled,
113
- focusItem: () => tag.focusItem(),
114
- select: () => { },
115
- selected: false,
113
+ focus: () => tag.focusItem(),
116
114
  words: tag.words,
117
- };
115
+ });
118
116
  }
119
117
  valueFor(tag) {
120
118
  return tag.value || slottedWords(tag, ['start', '']);
@@ -146,14 +144,8 @@ let HelixHeadlessTagGroup = class HelixHeadlessTagGroup extends HelixElement {
146
144
  if (mode === 'none' || tag.disabled) {
147
145
  return;
148
146
  }
149
- requestChange({
150
- apply: (value) => {
151
- this.value = value;
152
- this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
153
- },
154
- event: (value) => new HelixBeforeChangeEvent({ value }),
155
- host: this,
156
- next: pressedValue(mode, this.written, this.valueFor(tag)),
147
+ requestValue(this, pressedValue(mode, this.written, this.valueFor(tag)), (value) => {
148
+ this.value = value;
157
149
  });
158
150
  }
159
151
  connectedCallback() {
@@ -191,6 +183,7 @@ let HelixHeadlessTagGroup = class HelixHeadlessTagGroup extends HelixElement {
191
183
  }
192
184
  };
193
185
  __decorate([
186
+ words,
194
187
  property({ attribute: 'empty-label' })
195
188
  ], HelixHeadlessTagGroup.prototype, "emptyLabel", void 0);
196
189
  __decorate([
@@ -50,13 +50,26 @@ declare const HelixHeadlessTag_base: (new (...args: any[]) => import("@fusion.de
50
50
  * @cssstate selected - The tag is selected in a `Tag.Group` that selects.
51
51
  */
52
52
  export declare class HelixHeadlessTag extends HelixHeadlessTag_base {
53
- dismissLabel: string;
53
+ /**
54
+ * The key this family's words are registered under, its styled tag:
55
+ * `registerWords('de', { 'helix-tag': { dismissLabel: '{label} entfernen' } })`.
56
+ */
57
+ static words: string;
54
58
  /**
55
59
  * Takes the tag out of reach: its link and its remove button stop
56
60
  * answering, and in a `Tag.Group` the arrow keys pass over it and it cannot
57
61
  * be selected or removed.
58
62
  */
59
63
  disabled: boolean;
64
+ /**
65
+ * The remove button's name, read by screen readers, with `{label}` for the
66
+ * tag's own words.
67
+ *
68
+ * "Remove" rather than the mixin's "Dismiss": a tag is taken out of a set,
69
+ * which is a different act from closing a message. One sentence with the
70
+ * tag's words in it, so a translation puts them where its language does.
71
+ */
72
+ dismissLabel: string;
60
73
  /**
61
74
  * Whether the tag holds its group's tab stop.
62
75
  *
@@ -4,17 +4,18 @@ 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, drawDismiss, drawDismissGlyph, HelixElement, hostAria, MixinDismissible, slottedWords, } from '@fusion.dev/helix-core';
7
+ import { customElement, drawDismiss, drawDismissGlyph, formatWords, HelixElement, hostAria, MixinDismissible, slottedWords, words, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  let HelixHeadlessTag = class HelixHeadlessTag extends MixinDismissible(HelixElement) {
11
11
  constructor() {
12
12
  super(...arguments);
13
- this.dismissLabel = 'Remove';
14
13
  this.disabled = false;
14
+ this.dismissLabel = 'Remove {label}';
15
15
  this.href = '';
16
16
  this.value = '';
17
17
  }
18
+ static { this.words = 'helix-tag'; }
18
19
  get words() {
19
20
  return this.childrenKnown ? slottedWords(this, ['start', '']) : '';
20
21
  }
@@ -45,13 +46,11 @@ let HelixHeadlessTag = class HelixHeadlessTag extends MixinDismissible(HelixElem
45
46
  this.toggleState('selected', this.selected === true);
46
47
  }
47
48
  get removeName() {
48
- const words = this.words;
49
- if (this.dismissLabel.includes('{label}')) {
50
- return this.dismissLabel.replace('{label}', words).trim();
49
+ const { dismissLabel, words } = this;
50
+ if (dismissLabel.includes('{label}')) {
51
+ return formatWords(this, 'dismissLabel', { label: words }).trim();
51
52
  }
52
- return words === '' || this.dismissLabel.includes(words)
53
- ? this.dismissLabel
54
- : `${this.dismissLabel} ${words}`;
53
+ return words === '' || dismissLabel.includes(words) ? dismissLabel : `${dismissLabel} ${words}`;
55
54
  }
56
55
  firstUpdated(changed) {
57
56
  super.firstUpdated(changed);
@@ -95,6 +94,10 @@ let HelixHeadlessTag = class HelixHeadlessTag extends MixinDismissible(HelixElem
95
94
  __decorate([
96
95
  property({ reflect: true, type: Boolean })
97
96
  ], HelixHeadlessTag.prototype, "disabled", void 0);
97
+ __decorate([
98
+ words,
99
+ property({ attribute: 'dismiss-label' })
100
+ ], HelixHeadlessTag.prototype, "dismissLabel", void 0);
98
101
  __decorate([
99
102
  property({ attribute: false })
100
103
  ], HelixHeadlessTag.prototype, "focusable", void 0);
@@ -60,6 +60,11 @@ declare const HelixHeadlessTextarea_base: (new (...args: any[]) => import("@fusi
60
60
  * @cssstate invalid - The control has an error to show, from the browser's validation, `validate`, or your `feedback`.
61
61
  */
62
62
  export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
63
+ /**
64
+ * The key this family's words are registered under, its styled tag:
65
+ * `registerWords('de', { 'helix-textarea': { clearLabel: 'Leeren' } })`.
66
+ */
67
+ static words: string;
63
68
  protected readonly aria: AriaForwardController;
64
69
  /** Typed or dragged, so every edit is announced. See `announcesInput`. */
65
70
  protected readonly announcesInput = true;
@@ -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, applyOwnRule, customElement, drawIcon, HelixClearEvent, HelixFormElement, holdCaret, isRtl, MixinControllerValue, MixinField, restoreValue, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, applyOwnRule, customElement, drawIcon, HelixClearEvent, HelixFormElement, holdCaret, isRtl, MixinControllerValue, MixinField, restoreValue, words, } from '@fusion.dev/helix-core';
8
8
  import { x } from '@fusion.dev/helix-icons';
9
9
  import { html, nothing } from 'lit';
10
10
  import { property } from 'lit/decorators.js';
@@ -49,6 +49,7 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
49
49
  this.rows = 3;
50
50
  this.wrap = 'soft';
51
51
  }
52
+ static { this.words = 'helix-textarea'; }
52
53
  static { this.shadowRootOptions = {
53
54
  ...HelixFormElement.shadowRootOptions,
54
55
  delegatesFocus: true,
@@ -223,6 +224,7 @@ __decorate([
223
224
  property({ type: Boolean })
224
225
  ], HelixHeadlessTextarea.prototype, "clearable", void 0);
225
226
  __decorate([
227
+ words,
226
228
  property({ attribute: 'clear-label' })
227
229
  ], HelixHeadlessTextarea.prototype, "clearLabel", void 0);
228
230
  __decorate([
@@ -116,6 +116,11 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
116
116
  * @cssstate open - While the clock is open.
117
117
  */
118
118
  export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base {
119
+ /**
120
+ * The key this family's words are registered under, its styled tag:
121
+ * `registerWords('de', { 'helix-time-input': { triggerLabel: 'Uhrzeit auswählen' } })`.
122
+ */
123
+ static words: string;
119
124
  protected readonly aria: AriaForwardController;
120
125
  /**
121
126
  * What the browser may autofill here, as one of the platform's own tokens.
@@ -147,7 +152,7 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
147
152
  * Shoelace and Web Awesome read it, then the runtime's own.
148
153
  */
149
154
  locale: string;
150
- /** The locale the words are written in: `locale`, or the page's `lang`. */
155
+ /** The locale the words and times are written in: `locale`, or the page's `lang`. */
151
156
  private get language();
152
157
  /**
153
158
  * Latest time that can be chosen, as `HH:mm`.
@@ -174,20 +179,20 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
174
179
  * The message shown when a range holds more than two times.
175
180
  *
176
181
  * **Every sentence a control raises in the browser's bubble is a property**,
177
- * so a form in another language speaks it. Absent is the control's own
178
- * sentence, in English.
182
+ * so a form in another language speaks it. Unset is the sentence registered
183
+ * for the page's language, then the English.
179
184
  */
180
- rangeLengthMessage?: string;
185
+ rangeLengthMessage: string;
181
186
  /**
182
187
  * The message shown when a time is after `max`, with `{max}` filled in as
183
188
  * the field displays it.
184
189
  */
185
- rangeOverflowMessage?: string;
190
+ rangeOverflowMessage: string;
186
191
  /**
187
192
  * The message shown when a time is before `min`, with `{min}` filled in as
188
193
  * the field displays it.
189
194
  */
190
- rangeUnderflowMessage?: string;
195
+ rangeUnderflowMessage: string;
191
196
  /**
192
197
  * The name of the button that removes one time, with `{name}` filled in.
193
198
  *
@@ -223,7 +228,7 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
223
228
  /**
224
229
  * The message shown when `disable-times` bars a time.
225
230
  */
226
- unavailableMessage?: string;
231
+ unavailableMessage: string;
227
232
  /** Every time in the value, which may hold more than one. */
228
233
  private get held();
229
234
  /**
@@ -331,6 +336,8 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
331
336
  * consumer gets an inert unknown element and no mark whatsoever.
332
337
  */
333
338
  protected renderTrigger(): TemplateResult;
339
+ /** The line of text the times are typed into, where the field shows no segments. */
340
+ private renderControl;
334
341
  protected render(): TemplateResult;
335
342
  /**
336
343
  * The value as a `Date` on January 1, 1970 UTC, or `null` while there is no
@@ -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, localeOf, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinSegmentedField, MixinTokens, timeFault, writeClock, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, valueAsTime as asTime, clockLocale, customElement, formatWords, timeAsValue as fromTime, HelixFormElement, handedLocale, isClockValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinSegmentedField, MixinTokens, timeFault, words, wordsLocale, 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';
@@ -25,11 +25,15 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
25
25
  this.max = '23:59';
26
26
  this.min = '00:00';
27
27
  this.placeholder = 'HH:mm';
28
+ this.rangeLengthMessage = 'A range is two times.';
29
+ this.rangeOverflowMessage = 'Choose a time at or before {max}.';
30
+ this.rangeUnderflowMessage = 'Choose a time at or after {min}.';
28
31
  this.removeLabel = 'Remove {name}';
29
32
  this.seconds = false;
30
33
  this.step = 15;
31
34
  this.timeStyle = 'local';
32
35
  this.triggerLabel = 'Choose a time';
36
+ this.unavailableMessage = 'Choose a time that is available.';
33
37
  this.draft = '';
34
38
  this.handleDraftKey = (event) => {
35
39
  if (this.mode !== 'multiple') {
@@ -88,8 +92,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
88
92
  }
89
93
  };
90
94
  }
95
+ static { this.words = 'helix-time-input'; }
91
96
  get language() {
92
- return localeOf(this, this.locale);
97
+ return wordsLocale(this);
93
98
  }
94
99
  get held() {
95
100
  return this.value
@@ -157,7 +162,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
157
162
  if (faults.includes('rangeUnderflow')) {
158
163
  return [
159
164
  'rangeUnderflow',
160
- fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
165
+ formatWords(this, 'rangeUnderflowMessage', {
161
166
  min: writeClock(this.min, clockLocale(this.language, this.hourCycle), this.seconds),
162
167
  }),
163
168
  ];
@@ -165,16 +170,16 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
165
170
  if (faults.includes('rangeOverflow')) {
166
171
  return [
167
172
  'rangeOverflow',
168
- fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
173
+ formatWords(this, 'rangeOverflowMessage', {
169
174
  max: writeClock(this.max, clockLocale(this.language, this.hourCycle), this.seconds),
170
175
  }),
171
176
  ];
172
177
  }
173
178
  if (faults.includes('unavailable')) {
174
- return this.unavailableMessage || 'Choose a time that is available.';
179
+ return this.unavailableMessage;
175
180
  }
176
181
  if (this.mode === 'range' && held.length > 2) {
177
- return this.rangeLengthMessage || 'A range is two times.';
182
+ return this.rangeLengthMessage;
178
183
  }
179
184
  return '';
180
185
  }
@@ -209,7 +214,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
209
214
  manual
210
215
  label=${this.label || 'Time'}
211
216
  hour-cycle=${this.hourCycle ?? nothing}
212
- locale=${this.language || nothing}
217
+ locale=${handedLocale(this) || nothing}
213
218
  max=${this.max}
214
219
  min=${this.min}
215
220
  ?seconds=${this.seconds}
@@ -225,7 +230,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
225
230
  part="time"
226
231
  exportparts="cell: time-cell, dismiss: time-dismiss, dismiss-mark: time-dismiss-mark, label: time-label, link: time-link, start: time-start"
227
232
  dismissible
228
- dismiss-label=${fillTemplate(this.removeLabel, { name: this.written(at) })}
233
+ dismiss-label=${formatWords(this, 'removeLabel', { name: this.written(at) })}
229
234
  ?disabled=${this.isDisabled}
230
235
  @helix-dismiss=${(event) => {
231
236
  event.stopPropagation();
@@ -239,36 +244,35 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmented
239
244
  ${unsafeSVG(clock.content)}
240
245
  </svg></slot>`;
241
246
  }
247
+ renderControl() {
248
+ return html `<input
249
+ part="control"
250
+ id=${this.controlId}
251
+ type="text"
252
+ .value=${this.display}
253
+ name=${this.name || nothing}
254
+ placeholder=${this.mode === 'multiple' && this.held.length > 0 ? nothing : this.placeholder || nothing}
255
+ autocomplete=${this.autocomplete || nothing}
256
+ aria-describedby=${this.describedBy ?? nothing}
257
+ aria-invalid=${this.invalidity ?? nothing}
258
+ ?disabled=${this.isDisabled}
259
+ ?readonly=${this.readOnly}
260
+ ?required=${this.required}
261
+ @blur=${this.handleBlur}
262
+ @change=${this.handleCommit}
263
+ @focus=${this.handleFocus}
264
+ @input=${this.handleInput}
265
+ @keydown=${this.handleDraftKey}
266
+ @keypress=${this.handleKeypress}
267
+ />`;
268
+ }
242
269
  render() {
243
270
  return html `${this.renderLabel()}
244
271
  <div part="field" @keydown=${this.handleKeydown}>
245
272
  ${this.mode === 'multiple'
246
273
  ? this.renderTokenRow(this.shownTimes.map((at) => this.renderTag(at)), this.restCount)
247
274
  : nothing}
248
- ${this.segmentsShown
249
- ? this.renderSegments()
250
- : html `<input
251
- part="control"
252
- id=${this.controlId}
253
- type="text"
254
- .value=${this.display}
255
- name=${this.name || nothing}
256
- placeholder=${this.mode === 'multiple' && this.held.length > 0
257
- ? nothing
258
- : this.placeholder || nothing}
259
- autocomplete=${this.autocomplete || nothing}
260
- aria-describedby=${this.describedBy ?? nothing}
261
- aria-invalid=${this.invalidity ?? nothing}
262
- ?disabled=${this.isDisabled}
263
- ?readonly=${this.readOnly}
264
- ?required=${this.required}
265
- @blur=${this.handleBlur}
266
- @change=${this.handleCommit}
267
- @focus=${this.handleFocus}
268
- @input=${this.handleInput}
269
- @keydown=${this.handleDraftKey}
270
- @keypress=${this.handleKeypress}
271
- />`}
275
+ ${this.segmentsShown ? this.renderSegments() : this.renderControl()}
272
276
  <button
273
277
  part="trigger"
274
278
  type="button"
@@ -335,18 +339,23 @@ __decorate([
335
339
  property({ reflect: true })
336
340
  ], HelixHeadlessTimeInput.prototype, "mode", void 0);
337
341
  __decorate([
342
+ words,
338
343
  property()
339
344
  ], HelixHeadlessTimeInput.prototype, "placeholder", void 0);
340
345
  __decorate([
346
+ words,
341
347
  property({ attribute: 'range-length-message' })
342
348
  ], HelixHeadlessTimeInput.prototype, "rangeLengthMessage", void 0);
343
349
  __decorate([
350
+ words,
344
351
  property({ attribute: 'range-overflow-message' })
345
352
  ], HelixHeadlessTimeInput.prototype, "rangeOverflowMessage", void 0);
346
353
  __decorate([
354
+ words,
347
355
  property({ attribute: 'range-underflow-message' })
348
356
  ], HelixHeadlessTimeInput.prototype, "rangeUnderflowMessage", void 0);
349
357
  __decorate([
358
+ words,
350
359
  property({ attribute: 'remove-label' })
351
360
  ], HelixHeadlessTimeInput.prototype, "removeLabel", void 0);
352
361
  __decorate([
@@ -359,9 +368,11 @@ __decorate([
359
368
  property({ attribute: 'time-style' })
360
369
  ], HelixHeadlessTimeInput.prototype, "timeStyle", void 0);
361
370
  __decorate([
371
+ words,
362
372
  property({ attribute: 'trigger-label' })
363
373
  ], HelixHeadlessTimeInput.prototype, "triggerLabel", void 0);
364
374
  __decorate([
375
+ words,
365
376
  property({ attribute: 'unavailable-message' })
366
377
  ], HelixHeadlessTimeInput.prototype, "unavailableMessage", void 0);
367
378
  __decorate([
@@ -82,17 +82,26 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
82
82
  * @csspart option-label - The time's label.
83
83
  * @csspart option-text - The label and the caption, as one column.
84
84
  *
85
+ * @cssstate blank - While no time is chosen.
85
86
  * @cssstate invalid - While `invalid` is set or `feedback` says what is wrong.
86
87
  */
87
88
  export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_base {
89
+ /**
90
+ * The key this family's words are registered under, its styled tag:
91
+ * `registerWords('de', { 'helix-time-picker': { label: 'Uhrzeit' } })`.
92
+ */
93
+ static words: string;
88
94
  /**
89
95
  * The validation message for a value that is not a time.
90
96
  *
91
97
  * **Every sentence a control raises in the browser's bubble is a property**,
92
98
  * named for the validity flag it reports, so a form in another language
93
- * speaks it. Absent is the control's own sentence, in English.
99
+ * speaks it. Unset is the sentence registered for the page's language, then
100
+ * the English. `{shape}` is how a time is written, `HH:mm` or `HH:mm:ss`, and
101
+ * `{mode}` is `single`, `range` or `multiple`, so each can have its own
102
+ * sentence.
94
103
  */
95
- badInputMessage?: string;
104
+ badInputMessage: string;
96
105
  /**
97
106
  * Times that cannot be chosen, as `HH:mm`, separated by commas or spaces.
98
107
  *
@@ -192,12 +201,12 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
192
201
  * The validation message for a time after `max`. `{max}` is replaced with
193
202
  * `max`, written in `locale`.
194
203
  */
195
- rangeOverflowMessage?: string;
204
+ rangeOverflowMessage: string;
196
205
  /**
197
206
  * The validation message for a time before `min`. `{min}` is replaced with
198
207
  * `min`, written in `locale`.
199
208
  */
200
- rangeUnderflowMessage?: string;
209
+ rangeUnderflowMessage: string;
201
210
  /**
202
211
  * Every time on offer, as seconds since midnight.
203
212
  *
@@ -356,15 +365,15 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
356
365
  /**
357
366
  * The validation message for a time that `step` skips.
358
367
  */
359
- stepMismatchMessage?: string;
368
+ stepMismatchMessage: string;
360
369
  /**
361
370
  * The validation message for a time that `disable-times` bars.
362
371
  */
363
- unavailableMessage?: string;
372
+ unavailableMessage: string;
364
373
  /**
365
374
  * The validation message for a required time picker with no time chosen.
366
375
  */
367
- valueMissingMessage?: string;
376
+ valueMissingMessage: string;
368
377
  /**
369
378
  * What is wrong with a time the picker can read, as a validity flag and a
370
379
  * message, or nothing.