@fusion.dev/helix-headless 0.148.0 → 0.149.1

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 (240) hide show
  1. package/custom-elements.json +6966 -1798
  2. package/dist/announcement/root/announcement-root.d.ts +5 -0
  3. package/dist/announcement/root/announcement-root.js +5 -2
  4. package/dist/area-chart/root/area-chart-root.d.ts +11 -0
  5. package/dist/area-chart/root/area-chart-root.js +20 -7
  6. package/dist/avatar/group/avatar-group.d.ts +10 -2
  7. package/dist/avatar/group/avatar-group.js +10 -5
  8. package/dist/badge/count.d.ts +6 -1
  9. package/dist/badge/count.js +3 -3
  10. package/dist/badge/root/badge-root.d.ts +6 -2
  11. package/dist/badge/root/badge-root.js +3 -3
  12. package/dist/bar-chart/root/bar-chart-root.d.ts +13 -1
  13. package/dist/bar-chart/root/bar-chart-root.js +17 -4
  14. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +8 -1
  15. package/dist/breadcrumbs/root/breadcrumbs-root.js +5 -2
  16. package/dist/button/root/button-root.d.ts +10 -1
  17. package/dist/button/root/button-root.js +3 -2
  18. package/dist/button-group/root/button-group-root.d.ts +3 -0
  19. package/dist/button-group/root/button-group-root.js +2 -2
  20. package/dist/callout/root/callout-root.d.ts +16 -2
  21. package/dist/callout/root/callout-root.js +16 -4
  22. package/dist/canvas/describe.d.ts +10 -0
  23. package/dist/canvas/describe.js +9 -0
  24. package/dist/canvas/neighbor.d.ts +17 -0
  25. package/dist/canvas/neighbor.js +1 -0
  26. package/dist/canvas/node/canvas-node.js +3 -2
  27. package/dist/canvas/root/canvas-root.d.ts +65 -8
  28. package/dist/canvas/root/canvas-root.js +115 -49
  29. package/dist/carousel/root/carousel-root.d.ts +5 -0
  30. package/dist/carousel/root/carousel-root.js +16 -5
  31. package/dist/chat/composer/chat-composer.d.ts +5 -0
  32. package/dist/chat/composer/chat-composer.js +4 -1
  33. package/dist/chat/message/chat-message.d.ts +9 -5
  34. package/dist/chat/message/chat-message.js +8 -4
  35. package/dist/chat/naming.js +2 -2
  36. package/dist/chat/root/chat-root.d.ts +27 -1
  37. package/dist/chat/root/chat-root.js +37 -9
  38. package/dist/checkbox/root/checkbox-root.d.ts +11 -0
  39. package/dist/checkbox/root/checkbox-root.js +8 -2
  40. package/dist/checkbox-group/root/checkbox-group-root.d.ts +11 -0
  41. package/dist/checkbox-group/root/checkbox-group-root.js +11 -3
  42. package/dist/code-block/root/code-block-root.d.ts +12 -2
  43. package/dist/code-block/root/code-block-root.js +12 -2
  44. package/dist/color-input/root/color-input-root.d.ts +13 -0
  45. package/dist/color-input/root/color-input-root.js +18 -5
  46. package/dist/color-picker/root/color-picker-root.d.ts +19 -3
  47. package/dist/color-picker/root/color-picker-root.js +47 -13
  48. package/dist/combobox/root/combobox-root.d.ts +36 -7
  49. package/dist/combobox/root/combobox-root.js +37 -12
  50. package/dist/command/root/command-root.d.ts +15 -6
  51. package/dist/command/root/command-root.js +9 -4
  52. package/dist/copy-button/root/copy-button-root.d.ts +5 -0
  53. package/dist/copy-button/root/copy-button-root.js +7 -2
  54. package/dist/data-table/root/data-table-root.d.ts +171 -29
  55. package/dist/data-table/root/data-table-root.js +268 -118
  56. package/dist/date-input/root/date-input-root.d.ts +32 -9
  57. package/dist/date-input/root/date-input-root.js +66 -44
  58. package/dist/date-picker/root/date-picker-root.d.ts +38 -15
  59. package/dist/date-picker/root/date-picker-root.js +52 -33
  60. package/dist/dialog/root/dialog-root.d.ts +12 -1
  61. package/dist/dialog/root/dialog-root.js +11 -4
  62. package/dist/donut-chart/root/donut-chart-root.d.ts +5 -0
  63. package/dist/donut-chart/root/donut-chart-root.js +8 -5
  64. package/dist/drawer/root/drawer-root.d.ts +12 -1
  65. package/dist/drawer/root/drawer-root.js +9 -2
  66. package/dist/drilldown/root/drilldown-root.d.ts +5 -0
  67. package/dist/drilldown/root/drilldown-root.js +4 -1
  68. package/dist/element-events.generated.js +25 -3
  69. package/dist/file-input/root/file-input-root.d.ts +18 -3
  70. package/dist/file-input/root/file-input-root.js +34 -17
  71. package/dist/filter-input/chip/filter-chip.d.ts +13 -0
  72. package/dist/filter-input/chip/filter-chip.js +6 -1
  73. package/dist/filter-input/menu/filter-menu.d.ts +5 -0
  74. package/dist/filter-input/menu/filter-menu.js +3 -1
  75. package/dist/filter-input/root/filter-input-root.d.ts +20 -3
  76. package/dist/filter-input/root/filter-input-root.js +8 -4
  77. package/dist/format-date/root/format-date-root.d.ts +20 -2
  78. package/dist/format-date/root/format-date-root.js +5 -2
  79. package/dist/graph/root/graph-model.d.ts +11 -0
  80. package/dist/graph/root/graph-model.js +4 -0
  81. package/dist/graph/root/graph-root.d.ts +78 -9
  82. package/dist/graph/root/graph-root.js +124 -27
  83. package/dist/heatmap/root/heatmap-root.d.ts +25 -4
  84. package/dist/heatmap/root/heatmap-root.js +27 -7
  85. package/dist/icon-button/root/icon-button-root.d.ts +5 -0
  86. package/dist/icon-button/root/icon-button-root.js +1 -0
  87. package/dist/input/root/input-root.d.ts +5 -0
  88. package/dist/input/root/input-root.js +4 -1
  89. package/dist/lightbox/root/lightbox-root.d.ts +14 -4
  90. package/dist/lightbox/root/lightbox-root.js +25 -7
  91. package/dist/line-chart/root/line-chart-root.d.ts +5 -0
  92. package/dist/line-chart/root/line-chart-root.js +4 -2
  93. package/dist/list/item/list-item.d.ts +32 -0
  94. package/dist/list/item/list-item.js +34 -7
  95. package/dist/list/root/list-root.d.ts +87 -0
  96. package/dist/list/root/list-root.js +112 -2
  97. package/dist/listbox/reorder/index.d.ts +1 -0
  98. package/dist/listbox/reorder/index.js +4 -0
  99. package/dist/listbox/reorder/listbox-reorder.d.ts +83 -0
  100. package/dist/listbox/reorder/listbox-reorder.js +151 -0
  101. package/dist/listbox/root/listbox-root.d.ts +68 -11
  102. package/dist/listbox/root/listbox-root.js +41 -9
  103. package/dist/loader/root/loader-root.d.ts +5 -0
  104. package/dist/loader/root/loader-root.js +3 -1
  105. package/dist/map/area/map-area.d.ts +5 -0
  106. package/dist/map/area/map-area.js +3 -1
  107. package/dist/map/buildings/map-buildings.d.ts +5 -0
  108. package/dist/map/buildings/map-buildings.js +3 -1
  109. package/dist/map/contours/map-contours.d.ts +5 -0
  110. package/dist/map/contours/map-contours.js +3 -1
  111. package/dist/map/landcover/map-landcover.d.ts +5 -0
  112. package/dist/map/landcover/map-landcover.js +3 -1
  113. package/dist/map/marker/map-marker.d.ts +16 -1
  114. package/dist/map/marker/map-marker.js +13 -5
  115. package/dist/map/points/map-points.d.ts +5 -0
  116. package/dist/map/points/map-points.js +6 -4
  117. package/dist/map/position/map-position.d.ts +5 -0
  118. package/dist/map/position/map-position.js +3 -1
  119. package/dist/map/raster/map-raster.d.ts +5 -0
  120. package/dist/map/raster/map-raster.js +3 -1
  121. package/dist/map/root/map-root.d.ts +33 -14
  122. package/dist/map/root/map-root.js +59 -22
  123. package/dist/map/route/map-route.d.ts +5 -0
  124. package/dist/map/route/map-route.js +3 -1
  125. package/dist/map/terrain/map-terrain.d.ts +5 -0
  126. package/dist/map/terrain/map-terrain.js +3 -1
  127. package/dist/menu/root/menu-root.d.ts +5 -0
  128. package/dist/menu/root/menu-root.js +3 -1
  129. package/dist/meter/root/meter-root.d.ts +16 -3
  130. package/dist/meter/root/meter-root.js +12 -5
  131. package/dist/navigation/root/navigation-root.d.ts +5 -0
  132. package/dist/navigation/root/navigation-root.js +3 -1
  133. package/dist/notifications/notification/notification.d.ts +5 -0
  134. package/dist/notifications/notification/notification.js +3 -1
  135. package/dist/notifications/root/notifications-root.d.ts +8 -0
  136. package/dist/notifications/root/notifications-root.js +10 -2
  137. package/dist/number-input/root/number-input-root.d.ts +21 -8
  138. package/dist/number-input/root/number-input-root.js +26 -11
  139. package/dist/object-inspector/root/object-inspector-root.d.ts +51 -12
  140. package/dist/object-inspector/root/object-inspector-root.js +21 -20
  141. package/dist/outline/root/outline-root.d.ts +5 -0
  142. package/dist/outline/root/outline-root.js +3 -1
  143. package/dist/pagination/root/pagination-root.d.ts +7 -1
  144. package/dist/pagination/root/pagination-root.js +16 -7
  145. package/dist/pagination/size/pagination-size.d.ts +7 -3
  146. package/dist/pagination/size/pagination-size.js +4 -2
  147. package/dist/pagination/summary/pagination-summary.d.ts +8 -6
  148. package/dist/pagination/summary/pagination-summary.js +4 -9
  149. package/dist/pin-input/code.d.ts +6 -6
  150. package/dist/pin-input/code.js +1 -5
  151. package/dist/pin-input/root/pin-input-root.d.ts +9 -3
  152. package/dist/pin-input/root/pin-input-root.js +6 -2
  153. package/dist/popover/root/popover-root.d.ts +12 -2
  154. package/dist/popover/root/popover-root.js +10 -4
  155. package/dist/progress/root/progress-root.d.ts +7 -2
  156. package/dist/progress/root/progress-root.js +5 -2
  157. package/dist/qr-code/name.d.ts +3 -2
  158. package/dist/qr-code/name.js +2 -2
  159. package/dist/qr-code/root/qr-code-root.d.ts +12 -2
  160. package/dist/qr-code/root/qr-code-root.js +9 -2
  161. package/dist/radio/group/radio-group.d.ts +11 -0
  162. package/dist/radio/group/radio-group.js +8 -2
  163. package/dist/rating/root/rating-root.d.ts +12 -1
  164. package/dist/rating/root/rating-root.js +10 -3
  165. package/dist/scatter-chart/root/scatter-chart-root.d.ts +20 -2
  166. package/dist/scatter-chart/root/scatter-chart-root.js +20 -5
  167. package/dist/select/root/select-root.d.ts +11 -0
  168. package/dist/select/root/select-root.js +13 -3
  169. package/dist/skip-link/root/skip-link-root.d.ts +5 -0
  170. package/dist/skip-link/root/skip-link-root.js +3 -1
  171. package/dist/slider/root/slider-root.d.ts +7 -2
  172. package/dist/slider/root/slider-root.js +11 -5
  173. package/dist/sparkline/readings.d.ts +15 -5
  174. package/dist/sparkline/readings.js +3 -3
  175. package/dist/sparkline/root/sparkline-root.d.ts +9 -4
  176. package/dist/sparkline/root/sparkline-root.js +9 -3
  177. package/dist/speed-dial/root/speed-dial-root.d.ts +5 -0
  178. package/dist/speed-dial/root/speed-dial-root.js +4 -1
  179. package/dist/splitter/root/splitter-root.d.ts +6 -1
  180. package/dist/splitter/root/splitter-root.js +9 -4
  181. package/dist/steps/root/steps-root.d.ts +9 -2
  182. package/dist/steps/root/steps-root.js +6 -3
  183. package/dist/steps/step/step.d.ts +12 -0
  184. package/dist/steps/step/step.js +11 -2
  185. package/dist/switch/root/switch-root.d.ts +11 -0
  186. package/dist/switch/root/switch-root.js +8 -2
  187. package/dist/table/column/table-column.d.ts +11 -4
  188. package/dist/table/column/table-column.js +15 -10
  189. package/dist/table/grid-controller.d.ts +8 -3
  190. package/dist/table/grid-controller.js +17 -11
  191. package/dist/table/root/table-root.d.ts +107 -5
  192. package/dist/table/root/table-root.js +122 -20
  193. package/dist/table/row/table-row.d.ts +42 -0
  194. package/dist/table/row/table-row.js +40 -1
  195. package/dist/tabs/root/tabs-root.d.ts +5 -0
  196. package/dist/tabs/root/tabs-root.js +3 -1
  197. package/dist/tag/group/tag-group.d.ts +5 -0
  198. package/dist/tag/group/tag-group.js +3 -1
  199. package/dist/tag/root/tag-root.d.ts +14 -1
  200. package/dist/tag/root/tag-root.js +11 -8
  201. package/dist/textarea/root/textarea-root.d.ts +5 -0
  202. package/dist/textarea/root/textarea-root.js +3 -1
  203. package/dist/time-input/root/time-input-root.d.ts +14 -7
  204. package/dist/time-input/root/time-input-root.js +43 -32
  205. package/dist/time-picker/root/time-picker-root.d.ts +15 -7
  206. package/dist/time-picker/root/time-picker-root.js +25 -12
  207. package/dist/toast/item/toast-item.d.ts +7 -0
  208. package/dist/toast/item/toast-item.js +1 -0
  209. package/dist/toast/root/toast-root.d.ts +9 -1
  210. package/dist/toast/root/toast-root.js +5 -4
  211. package/dist/toolbar/root/toolbar-root.d.ts +5 -0
  212. package/dist/toolbar/root/toolbar-root.js +5 -2
  213. package/dist/tooltip/root/tooltip-root.d.ts +27 -17
  214. package/dist/tour/root/tour-root.d.ts +8 -2
  215. package/dist/tour/root/tour-root.js +4 -2
  216. package/dist/tour/stop/tour-stop.d.ts +5 -0
  217. package/dist/tour/stop/tour-stop.js +6 -1
  218. package/dist/tree/grip.d.ts +5 -0
  219. package/dist/tree/grip.js +1 -0
  220. package/dist/tree/item/tree-item.d.ts +24 -0
  221. package/dist/tree/item/tree-item.js +27 -5
  222. package/dist/tree/root/tree-root.d.ts +66 -1
  223. package/dist/tree/root/tree-root.js +77 -5
  224. package/dist/trend/root/trend-root.d.ts +20 -4
  225. package/dist/trend/root/trend-root.js +20 -5
  226. package/dist/video/root/video-root.d.ts +12 -3
  227. package/dist/video/root/video-root.js +41 -14
  228. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
  229. package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
  230. package/dist/video-playlist/root/video-playlist-root.d.ts +5 -0
  231. package/dist/video-playlist/root/video-playlist-root.js +3 -1
  232. package/dist/virtual-list/root/virtual-list-root.d.ts +19 -3
  233. package/dist/virtual-list/root/virtual-list-root.js +5 -2
  234. package/lint.json +1 -1
  235. package/package.json +9 -8
  236. package/types/jsx.d.ts +4014 -1862
  237. package/types/vue.d.ts +1266 -624
  238. package/types/words.d.ts +3280 -0
  239. package/dist/toast/hotkey.d.ts +0 -22
  240. package/dist/toast/hotkey.js +0 -23
@@ -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([
@@ -86,14 +86,22 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
86
86
  * @cssstate invalid - While `invalid` is set or `feedback` says what is wrong.
87
87
  */
88
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;
89
94
  /**
90
95
  * The validation message for a value that is not a time.
91
96
  *
92
97
  * **Every sentence a control raises in the browser's bubble is a property**,
93
98
  * named for the validity flag it reports, so a form in another language
94
- * 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.
95
103
  */
96
- badInputMessage?: string;
104
+ badInputMessage: string;
97
105
  /**
98
106
  * Times that cannot be chosen, as `HH:mm`, separated by commas or spaces.
99
107
  *
@@ -193,12 +201,12 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
193
201
  * The validation message for a time after `max`. `{max}` is replaced with
194
202
  * `max`, written in `locale`.
195
203
  */
196
- rangeOverflowMessage?: string;
204
+ rangeOverflowMessage: string;
197
205
  /**
198
206
  * The validation message for a time before `min`. `{min}` is replaced with
199
207
  * `min`, written in `locale`.
200
208
  */
201
- rangeUnderflowMessage?: string;
209
+ rangeUnderflowMessage: string;
202
210
  /**
203
211
  * Every time on offer, as seconds since midnight.
204
212
  *
@@ -357,15 +365,15 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
357
365
  /**
358
366
  * The validation message for a time that `step` skips.
359
367
  */
360
- stepMismatchMessage?: string;
368
+ stepMismatchMessage: string;
361
369
  /**
362
370
  * The validation message for a time that `disable-times` bars.
363
371
  */
364
- unavailableMessage?: string;
372
+ unavailableMessage: string;
365
373
  /**
366
374
  * The validation message for a required time picker with no time chosen.
367
375
  */
368
- valueMissingMessage?: string;
376
+ valueMissingMessage: string;
369
377
  /**
370
378
  * What is wrong with a time the picker can read, as a validity flag and a
371
379
  * message, or nothing.
@@ -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 { 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';
7
+ import { clockLocale, commaList, customElement, dayPeriod, formatWords, HelixFormElement, hostWords, inlineStep, isTwelveHour, MixinControllerValue, MixinPickerFeedback, nearestTime, offeredTimes, reportValues, secondsAsValue, timeBarred, timeFault, valueAsSeconds, wheelParts, wholeHour, words, wordsLocale, 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';
@@ -14,12 +14,15 @@ import '../../option/index.js';
14
14
  let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerFeedback(MixinControllerValue(HelixFormElement)) {
15
15
  constructor() {
16
16
  super(...arguments);
17
+ this.badInputMessage = '{mode, select, single {Enter a time as {shape}.} other {Enter times as {shape}, separated by commas.}}';
17
18
  this.disableTimes = '';
18
19
  this.label = 'Time';
19
20
  this.locale = '';
20
21
  this.manual = false;
21
22
  this.max = '23:59';
22
23
  this.min = '00:00';
24
+ this.rangeOverflowMessage = 'Choose a time at or before {max}.';
25
+ this.rangeUnderflowMessage = 'Choose a time at or after {min}.';
23
26
  this.handleListInput = (event) => {
24
27
  event.stopPropagation();
25
28
  };
@@ -76,6 +79,9 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerF
76
79
  this.required = false;
77
80
  this.seconds = false;
78
81
  this.step = 15;
82
+ this.stepMismatchMessage = 'Choose one of the times on offer.';
83
+ this.unavailableMessage = 'Choose a time that is available.';
84
+ this.valueMissingMessage = 'Choose a time.';
79
85
  this.listRevealed = false;
80
86
  this.naming = undefined;
81
87
  this.handleColumnsKeydown = (event) => {
@@ -93,8 +99,9 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerF
93
99
  next.focus();
94
100
  };
95
101
  }
102
+ static { this.words = 'helix-time-picker'; }
96
103
  get language() {
97
- return localeOf(this, this.locale);
104
+ return wordsLocale(this);
98
105
  }
99
106
  get times() {
100
107
  return offeredTimes(this.min, this.max, this.step, this.seconds);
@@ -183,21 +190,21 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerF
183
190
  case 'rangeUnderflow':
184
191
  return [
185
192
  'rangeUnderflow',
186
- fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
193
+ formatWords(this, 'rangeUnderflowMessage', {
187
194
  min: writeClock(this.min, this.clock, this.seconds),
188
195
  }),
189
196
  ];
190
197
  case 'rangeOverflow':
191
198
  return [
192
199
  'rangeOverflow',
193
- fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
200
+ formatWords(this, 'rangeOverflowMessage', {
194
201
  max: writeClock(this.max, this.clock, this.seconds),
195
202
  }),
196
203
  ];
197
204
  case 'unavailable':
198
- return ['badInput', this.unavailableMessage || 'Choose a time that is available.'];
205
+ return ['badInput', this.unavailableMessage];
199
206
  case 'stepMismatch':
200
- return ['stepMismatch', this.stepMismatchMessage || 'Choose one of the times on offer.'];
207
+ return ['stepMismatch', this.stepMismatchMessage];
201
208
  default:
202
209
  return undefined;
203
210
  }
@@ -205,16 +212,15 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerF
205
212
  reportRequired() {
206
213
  const anchor = this.partNamed('list') ?? undefined;
207
214
  if (this.required && this.value === '') {
208
- this.internals.setValidity({ valueMissing: true }, this.valueMissingMessage || 'Choose a time.', anchor);
215
+ this.internals.setValidity({ valueMissing: true }, this.valueMissingMessage, anchor);
209
216
  return;
210
217
  }
211
218
  const held = this.held;
212
219
  if (held.length > 0 && held.some((one) => valueAsSeconds(one) === null)) {
213
- const shape = this.seconds ? 'HH:mm:ss' : 'HH:mm';
214
- this.internals.setValidity({ badInput: true }, this.badInputMessage ||
215
- (this.mode === undefined
216
- ? `Enter a time as ${shape}.`
217
- : `Enter times as ${shape}, separated by commas.`), anchor);
220
+ this.internals.setValidity({ badInput: true }, formatWords(this, 'badInputMessage', {
221
+ mode: this.mode ?? 'single',
222
+ shape: this.seconds ? 'HH:mm:ss' : 'HH:mm',
223
+ }), anchor);
218
224
  return;
219
225
  }
220
226
  for (const one of held) {
@@ -385,6 +391,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinPickerF
385
391
  }
386
392
  };
387
393
  __decorate([
394
+ words,
388
395
  property({ attribute: 'bad-input-message' })
389
396
  ], HelixHeadlessTimePicker.prototype, "badInputMessage", void 0);
390
397
  __decorate([
@@ -397,6 +404,7 @@ __decorate([
397
404
  property({ attribute: 'hour-label' })
398
405
  ], HelixHeadlessTimePicker.prototype, "hourLabel", void 0);
399
406
  __decorate([
407
+ words,
400
408
  property()
401
409
  ], HelixHeadlessTimePicker.prototype, "label", void 0);
402
410
  __decorate([
@@ -421,9 +429,11 @@ __decorate([
421
429
  property({ reflect: true })
422
430
  ], HelixHeadlessTimePicker.prototype, "mode", void 0);
423
431
  __decorate([
432
+ words,
424
433
  property({ attribute: 'range-overflow-message' })
425
434
  ], HelixHeadlessTimePicker.prototype, "rangeOverflowMessage", void 0);
426
435
  __decorate([
436
+ words,
427
437
  property({ attribute: 'range-underflow-message' })
428
438
  ], HelixHeadlessTimePicker.prototype, "rangeUnderflowMessage", void 0);
429
439
  __decorate([
@@ -442,12 +452,15 @@ __decorate([
442
452
  property({ type: Number })
443
453
  ], HelixHeadlessTimePicker.prototype, "step", void 0);
444
454
  __decorate([
455
+ words,
445
456
  property({ attribute: 'step-mismatch-message' })
446
457
  ], HelixHeadlessTimePicker.prototype, "stepMismatchMessage", void 0);
447
458
  __decorate([
459
+ words,
448
460
  property({ attribute: 'unavailable-message' })
449
461
  ], HelixHeadlessTimePicker.prototype, "unavailableMessage", void 0);
450
462
  __decorate([
463
+ words,
451
464
  property({ attribute: 'value-missing-message' })
452
465
  ], HelixHeadlessTimePicker.prototype, "valueMissingMessage", void 0);
453
466
  __decorate([
@@ -59,6 +59,13 @@ declare const HelixHeadlessToastItem_base: (new (...args: any[]) => import("@fus
59
59
  * @cssproperty --toast-swipe-x - How far a swipe has moved the message across, in pixels, toward the right.
60
60
  */
61
61
  export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base {
62
+ /**
63
+ * The key this part's words are registered under, its styled tag. The close
64
+ * control's `dismiss-label` comes from a mixin other families share, and
65
+ * registers as `{ 'helix-toast-item': { dismissLabel: 'Schließen' } }` once
66
+ * that mixin declares it a word.
67
+ */
68
+ static words: string;
62
69
  /**
63
70
  * How long the message stays, in milliseconds. When it is not set, the
64
71
  * message stays until it is dismissed.
@@ -59,6 +59,7 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
59
59
  });
60
60
  };
61
61
  }
62
+ static { this.words = 'helix-toast-item'; }
62
63
  get open() {
63
64
  return this.openState ?? true;
64
65
  }
@@ -63,9 +63,17 @@ import { type PropertyValues, type TemplateResult } from 'lit';
63
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.
64
64
  */
65
65
  export declare class HelixHeadlessToast extends HelixElement {
66
+ /**
67
+ * The key this family's words are registered under, its styled tag:
68
+ * `registerWords('de', { 'helix-toast': { label: 'Benachrichtigungen ({hotkey})' } })`.
69
+ * A message's own words are under `helix-toast-item`.
70
+ */
71
+ static words: string;
66
72
  /**
67
73
  * The key that takes focus to the stack and back, such as `F8` or `Alt+T`:
68
- * keys joined by `+`, the last one the key. Empty turns it off.
74
+ * keys joined by `+`, the last one the key, as `Announcement`'s `hotkey`
75
+ * reads them: `mod` is Command on Apple devices and Control elsewhere.
76
+ * Empty turns it off.
69
77
  */
70
78
  hotkey: string;
71
79
  /**
@@ -4,10 +4,9 @@ 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 { animationsFinished, customElement, DelayController, deepActiveElement, deepContains, FocusScopeController, fillTemplate, focusableElements, HelixElement, hostAria, scrollHolders, } from '@fusion.dev/helix-core';
7
+ import { animationsFinished, customElement, DelayController, deepActiveElement, deepContains, FocusScopeController, focusableElements, formatWords, HelixElement, hostAria, matchesChord, onApple, scrollHolders, words, } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property, state } from 'lit/decorators.js';
10
- import { matchesHotkey, parseHotkey } from '../hotkey.js';
11
10
  import { joinSaid, messageWords } from '../words.js';
12
11
  let HelixHeadlessToast = class HelixHeadlessToast extends HelixElement {
13
12
  constructor() {
@@ -27,7 +26,7 @@ let HelixHeadlessToast = class HelixHeadlessToast extends HelixElement {
27
26
  surface: () => this.region,
28
27
  });
29
28
  this.handleHotkey = (event) => {
30
- if (event.defaultPrevented || !matchesHotkey(event, parseHotkey(this.hotkey))) {
29
+ if (event.defaultPrevented || !matchesChord(event, this.hotkey, onApple())) {
31
30
  return;
32
31
  }
33
32
  if (this.scope.holdsFocus) {
@@ -85,10 +84,11 @@ let HelixHeadlessToast = class HelixHeadlessToast extends HelixElement {
85
84
  });
86
85
  };
87
86
  }
87
+ static { this.words = 'helix-toast'; }
88
88
  willUpdate(changed) {
89
89
  super.willUpdate(changed);
90
90
  hostAria(this.internals, {
91
- label: fillTemplate(this.label, { hotkey: this.hotkey }),
91
+ label: formatWords(this, 'label', { hotkey: this.hotkey }),
92
92
  role: 'region',
93
93
  });
94
94
  }
@@ -272,6 +272,7 @@ __decorate([
272
272
  property()
273
273
  ], HelixHeadlessToast.prototype, "hotkey", void 0);
274
274
  __decorate([
275
+ words,
275
276
  property()
276
277
  ], HelixHeadlessToast.prototype, "label", void 0);
277
278
  __decorate([
@@ -76,6 +76,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
76
76
  * @cssstate vertical - The controls run down a column, under `orientation="vertical"`.
77
77
  */
78
78
  export declare class HelixHeadlessToolbar extends HelixElement {
79
+ /**
80
+ * The key this family's words are registered under, its styled tag:
81
+ * `registerWords('de', { 'helix-toolbar': { label: 'Werkzeugleiste' } })`.
82
+ */
83
+ static words: string;
79
84
  /**
80
85
  * The toolbar's name, read by screen readers.
81
86
  *
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  var HelixHeadlessToolbar_1;
8
- import { AriaForwardController, closestInstance, customElement, HelixElement, inlineStep, keyClaimed, toolbarAround, } from '@fusion.dev/helix-core';
8
+ import { AriaForwardController, closestInstance, customElement, HelixElement, inlineStep, keyClaimed, toolbarAround, words, } from '@fusion.dev/helix-core';
9
9
  import { html, nothing } from 'lit';
10
10
  import { property } from 'lit/decorators.js';
11
11
  const KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']);
@@ -44,7 +44,7 @@ const stopOf = (node) => {
44
44
  };
45
45
  const flattens = (node) => ownsTabStop(node) &&
46
46
  node.selectionMode === 'multiple';
47
- let HelixHeadlessToolbar = HelixHeadlessToolbar_1 = class HelixHeadlessToolbar extends HelixElement {
47
+ let HelixHeadlessToolbar = class HelixHeadlessToolbar extends HelixElement {
48
48
  constructor() {
49
49
  super(...arguments);
50
50
  this.label = 'Toolbar';
@@ -141,6 +141,8 @@ let HelixHeadlessToolbar = HelixHeadlessToolbar_1 = class HelixHeadlessToolbar e
141
141
  }
142
142
  };
143
143
  }
144
+ static { HelixHeadlessToolbar_1 = this; }
145
+ static { this.words = 'helix-toolbar'; }
144
146
  get controls() {
145
147
  const controls = [];
146
148
  for (const child of this.children) {
@@ -281,6 +283,7 @@ let HelixHeadlessToolbar = HelixHeadlessToolbar_1 = class HelixHeadlessToolbar e
281
283
  }
282
284
  };
283
285
  __decorate([
286
+ words,
284
287
  property()
285
288
  ], HelixHeadlessToolbar.prototype, "label", void 0);
286
289
  __decorate([