@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
@@ -5,13 +5,15 @@ 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 HelixHeadlessSplitter_1;
8
- import { AriaForwardController, capturePointer, closestInstance, commaList, customElement, HelixBeforeCollapseEvent, HelixBeforeResizeEvent, HelixCollapseEvent, HelixElement, HelixResizedEvent, inlineStep, isRtl, requestChange, } from '@fusion.dev/helix-core';
8
+ import { AriaForwardController, capturePointer, closestInstance, commaList, customElement, formatPercent, HelixBeforeCollapseEvent, HelixBeforeResizeEvent, HelixCollapseEvent, HelixElement, HelixResizedEvent, inlineStep, isRtl, requestChange, words, wordsLocale, } from '@fusion.dev/helix-core';
9
9
  import { html, nothing } from 'lit';
10
10
  import { property, state } from 'lit/decorators.js';
11
11
  import { snapTo } from '../snap.js';
12
12
  const STACK_BELOW = 512;
13
13
  const channel = new WeakMap();
14
- let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitter extends HelixElement {
14
+ let HelixHeadlessSplitter = class HelixHeadlessSplitter extends HelixElement {
15
+ static { HelixHeadlessSplitter_1 = this; }
16
+ static { this.words = 'helix-splitter'; }
15
17
  get collapsed() {
16
18
  const held = this.collapsedState;
17
19
  if (held === undefined) {
@@ -144,6 +146,9 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
144
146
  const previous = this.position;
145
147
  this.positionState = value;
146
148
  this.requestUpdate('position', previous);
149
+ if (value !== previous) {
150
+ this.dispatchEvent(new Event('input', { bubbles: true, composed: true }));
151
+ }
147
152
  this.dispatchEvent(new HelixResizedEvent({ value: String(value) }));
148
153
  },
149
154
  event: (value) => new HelixBeforeResizeEvent({ value: String(value) }),
@@ -447,6 +452,7 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
447
452
  super.firstUpdated(changed);
448
453
  this.watchWidth();
449
454
  this.findOuter();
455
+ this.finishHydration();
450
456
  }
451
457
  updated(changed) {
452
458
  super.updated(changed);
@@ -473,6 +479,8 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
473
479
  willUpdate(changed) {
474
480
  super.willUpdate(changed);
475
481
  this.toggleState('dragging', this.dragging);
482
+ this.toggleState('collapsed', this.collapsed !== undefined);
483
+ this.toggleState('vertical', this.vertical);
476
484
  }
477
485
  render() {
478
486
  const position = this.showing;
@@ -494,7 +502,11 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
494
502
  aria-valuemax=${this.collapsed ? 100 : this.clamp(this.maxPercent)}
495
503
  aria-valuemin=${this.collapsed ? 0 : this.clamp(this.minPercent)}
496
504
  aria-valuenow=${Math.round(position)}
497
- aria-valuetext=${this.collapsed ? this.collapsedLabel : nothing}
505
+ aria-valuetext=${this.collapsed
506
+ ? this.collapsedLabel
507
+ : this.hydrating
508
+ ? nothing
509
+ : formatPercent(Math.round(position) / 100, wordsLocale(this))}
498
510
  ?data-dragging=${this.dragging}
499
511
  ?data-flush=${this.flush}
500
512
  @dblclick=${this.handleDoubleClick}
@@ -503,7 +515,9 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
503
515
  @pointerdown=${this.handlePointerDown}
504
516
  @pointermove=${this.handlePointerMove}
505
517
  @pointerup=${this.handlePointerUp}
506
- ></div>
518
+ >
519
+ <slot name="handle"></slot>
520
+ </div>
507
521
  <div part="end" ?data-dragging=${this.dragging}>
508
522
  <slot name="end"></slot>
509
523
  </div>
@@ -516,6 +530,7 @@ let HelixHeadlessSplitter = HelixHeadlessSplitter_1 = class HelixHeadlessSplitte
516
530
  aria-valuemax="100"
517
531
  aria-valuemin="0"
518
532
  aria-valuenow=${Math.round(crossing.at)}
533
+ aria-valuetext=${formatPercent(Math.round(crossing.at) / 100, wordsLocale(this))}
519
534
  data-cross=${index}
520
535
  style="--splitter-corner-at: ${crossing.at}%; --splitter-position: ${position}%"
521
536
  @dblclick=${this.handleCornerDoubleClick}
@@ -531,12 +546,14 @@ __decorate([
531
546
  property()
532
547
  ], HelixHeadlessSplitter.prototype, "collapsed", null);
533
548
  __decorate([
549
+ words,
534
550
  property({ attribute: 'collapsed-label' })
535
551
  ], HelixHeadlessSplitter.prototype, "collapsedLabel", void 0);
536
552
  __decorate([
537
553
  property({ attribute: 'collapsed-size', type: Number })
538
554
  ], HelixHeadlessSplitter.prototype, "collapsedSize", void 0);
539
555
  __decorate([
556
+ words,
540
557
  property({ attribute: 'corner-label' })
541
558
  ], HelixHeadlessSplitter.prototype, "cornerLabel", void 0);
542
559
  __decorate([
@@ -546,6 +563,7 @@ __decorate([
546
563
  property({ attribute: 'default-position', type: Number })
547
564
  ], HelixHeadlessSplitter.prototype, "defaultPosition", void 0);
548
565
  __decorate([
566
+ words,
549
567
  property()
550
568
  ], HelixHeadlessSplitter.prototype, "label", void 0);
551
569
  __decorate([
@@ -58,6 +58,11 @@ declare const HelixHeadlessSteps_base: (new (...args: any[]) => import("@fusion.
58
58
  * @cssstate complete - Every stage is complete.
59
59
  */
60
60
  export declare class HelixHeadlessSteps extends HelixHeadlessSteps_base {
61
+ /**
62
+ * The key this family's words are registered under, its styled tag:
63
+ * `registerWords('de', { 'helix-steps': { progressLabel: '{share, number, percent} erledigt' } })`.
64
+ */
65
+ static words: string;
61
66
  /**
62
67
  * The sequence's name, read by screen readers.
63
68
  *
@@ -85,8 +90,10 @@ export declare class HelixHeadlessSteps extends HelixHeadlessSteps_base {
85
90
  */
86
91
  orientation?: 'vertical';
87
92
  /**
88
- * What the `progress` part says to a screen reader, with `{percent}` filled
89
- * in with `progress`.
93
+ * What the `progress` part says to a screen reader. `{share, number,
94
+ * percent}` writes `progress` as a percentage the way the locale writes one,
95
+ * such as `40%`, or `40 %` in French. `{percent}` is `progress` as a whole
96
+ * number, for a sentence that places the sign itself.
90
97
  */
91
98
  progressLabel: string;
92
99
  /**
@@ -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, fillTemplate, HelixElement, hostAria, MixinControllerActive, whenHydrated, } from '@fusion.dev/helix-core';
7
+ import { customElement, formatWords, HelixElement, hostAria, MixinControllerActive, whenHydrated, words, } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import { canReach, progressOf } from '../reach.js';
@@ -13,7 +13,7 @@ let HelixHeadlessSteps = class HelixHeadlessSteps extends MixinControllerActive(
13
13
  super(...arguments);
14
14
  this.label = 'Steps';
15
15
  this.linear = false;
16
- this.progressLabel = '{percent}% complete';
16
+ this.progressLabel = '{share, number, percent} complete';
17
17
  this.handleSelection = (event) => {
18
18
  if (event.defaultPrevented || !this.steps.includes(event.target)) {
19
19
  return;
@@ -29,6 +29,7 @@ let HelixHeadlessSteps = class HelixHeadlessSteps extends MixinControllerActive(
29
29
  this.lock();
30
30
  };
31
31
  }
32
+ static { this.words = 'helix-steps'; }
32
33
  get progress() {
33
34
  return progressOf(this.steps);
34
35
  }
@@ -141,13 +142,14 @@ let HelixHeadlessSteps = class HelixHeadlessSteps extends MixinControllerActive(
141
142
  aria-valuemin="0"
142
143
  aria-valuemax="100"
143
144
  aria-valuenow=${progress}
144
- aria-valuetext=${fillTemplate(this.progressLabel, { percent: String(progress) })}
145
+ aria-valuetext=${formatWords(this, 'progressLabel', { percent: progress, share: progress / 100 })}
145
146
  style="--steps-progress: ${progress}%"
146
147
  hidden
147
148
  ></div>`;
148
149
  }
149
150
  };
150
151
  __decorate([
152
+ words,
151
153
  property()
152
154
  ], HelixHeadlessSteps.prototype, "label", void 0);
153
155
  __decorate([
@@ -157,6 +159,7 @@ __decorate([
157
159
  property({ reflect: true })
158
160
  ], HelixHeadlessSteps.prototype, "orientation", void 0);
159
161
  __decorate([
162
+ words,
160
163
  property({ attribute: 'progress-label' })
161
164
  ], HelixHeadlessSteps.prototype, "progressLabel", void 0);
162
165
  __decorate([
@@ -55,10 +55,22 @@ import '../../button/index.js';
55
55
  * @cssstate invalid - The sequence's `validate` last answered that this stage is not valid.
56
56
  */
57
57
  export declare class HelixHeadlessStep extends HelixElement {
58
+ /**
59
+ * The key this family's words are registered under, its styled tag:
60
+ * `registerWords('de', { 'helix-step': { completeLabel: 'Erledigt' } })`.
61
+ */
62
+ static words: string;
58
63
  /**
59
64
  * Whether this stage is finished.
60
65
  */
61
66
  complete: boolean;
67
+ /**
68
+ * What a screen reader hears when the stage is finished while the page is
69
+ * open. `{name}` is the stage's name and `{complete}` is `complete-label`, so
70
+ * a language can write the whole sentence in its own order. A stage with no
71
+ * name says `complete-label` alone.
72
+ */
73
+ completedLabel: string;
62
74
  /**
63
75
  * The words that tell a screen reader the stage is finished. Translate it
64
76
  * with the page.
@@ -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, drawStatus, HelixElement, HelixSelectEvent, hostAria, StatusController, slottedWords, } from '@fusion.dev/helix-core';
7
+ import { customElement, drawStatus, formatWords, HelixElement, HelixSelectEvent, hostAria, StatusController, slottedWords, words, } from '@fusion.dev/helix-core';
8
8
  import { check, circle, record } from '@fusion.dev/helix-icons';
9
9
  import { nothing } from 'lit';
10
10
  import { property } from 'lit/decorators.js';
@@ -15,6 +15,7 @@ let HelixHeadlessStep = class HelixHeadlessStep extends HelixElement {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.complete = false;
18
+ this.completedLabel = '{name}, {complete}';
18
19
  this.completeLabel = 'Complete';
19
20
  this.current = false;
20
21
  this.disabled = false;
@@ -24,6 +25,7 @@ let HelixHeadlessStep = class HelixHeadlessStep extends HelixElement {
24
25
  this.value = '';
25
26
  this.status = new StatusController(this);
26
27
  }
28
+ static { this.words = 'helix-step'; }
27
29
  select() {
28
30
  if (this.disabled || this.locked) {
29
31
  return;
@@ -47,7 +49,9 @@ let HelixHeadlessStep = class HelixHeadlessStep extends HelixElement {
47
49
  super.updated(changed);
48
50
  if (changed.get('complete') === false && this.complete) {
49
51
  const name = slottedWords(this, ['']);
50
- this.status.say(name === '' ? this.completeLabel : `${name}, ${this.completeLabel}`);
52
+ this.status.say(name === ''
53
+ ? this.completeLabel
54
+ : formatWords(this, 'completedLabel', { complete: this.completeLabel, name }));
51
55
  }
52
56
  }
53
57
  renderLabel() {
@@ -78,6 +82,11 @@ __decorate([
78
82
  property({ reflect: true, type: Boolean })
79
83
  ], HelixHeadlessStep.prototype, "complete", void 0);
80
84
  __decorate([
85
+ words,
86
+ property({ attribute: 'completed-label' })
87
+ ], HelixHeadlessStep.prototype, "completedLabel", void 0);
88
+ __decorate([
89
+ words,
81
90
  property({ attribute: 'complete-label' })
82
91
  ], HelixHeadlessStep.prototype, "completeLabel", void 0);
83
92
  __decorate([
@@ -58,6 +58,11 @@ declare const HelixHeadlessSwitch_base: (new (...args: any[]) => import("@fusion
58
58
  * @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
59
59
  */
60
60
  export declare class HelixHeadlessSwitch extends HelixHeadlessSwitch_base {
61
+ /**
62
+ * The key this family's words are registered under, its styled tag:
63
+ * `registerWords('de', { 'helix-switch': { valueMissingMessage: '...' } })`.
64
+ */
65
+ static words: string;
61
66
  protected readonly aria: AriaForwardController;
62
67
  /** A click on the element itself, `click()` or a page's `<label for>`, toggles it. */
63
68
  protected readonly clicks: HostClickController;
@@ -65,6 +70,12 @@ export declare class HelixHeadlessSwitch extends HelixHeadlessSwitch_base {
65
70
  * Value submitted when the switch is on.
66
71
  */
67
72
  value: string;
73
+ /**
74
+ * The message reported when the field is required and the switch is off.
75
+ * Absent, or empty, is this sentence, or the words registered for the page's
76
+ * locale.
77
+ */
78
+ valueMissingMessage: string;
68
79
  private readonly handleChange;
69
80
  /** Reports what the form would submit, and the verdict on it. */
70
81
  private sync;
@@ -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, HelixFormElement, HostClickController, MixinControllerChecked, MixinField, markRegion, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, customElement, HelixFormElement, HostClickController, MixinControllerChecked, MixinField, markRegion, words, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  let HelixHeadlessSwitch = class HelixHeadlessSwitch extends MixinControllerChecked(MixinField(HelixFormElement)) {
@@ -16,6 +16,7 @@ let HelixHeadlessSwitch = class HelixHeadlessSwitch extends MixinControllerCheck
16
16
  });
17
17
  this.clicks = new HostClickController(this, () => this.partNamed('control'));
18
18
  this.value = 'on';
19
+ this.valueMissingMessage = 'Turn this on to continue.';
19
20
  this.handleChange = (event) => {
20
21
  event.stopPropagation();
21
22
  const control = event.target;
@@ -27,9 +28,10 @@ let HelixHeadlessSwitch = class HelixHeadlessSwitch extends MixinControllerCheck
27
28
  this.announceChange();
28
29
  };
29
30
  }
31
+ static { this.words = 'helix-switch'; }
30
32
  sync() {
31
33
  this.internals.setFormValue(this.checked ? this.value : null);
32
- this.reportRequired(!this.checked, 'Turn this on to continue.', 'control');
34
+ this.reportRequired(!this.checked, this.valueMissingMessage, 'control');
33
35
  }
34
36
  formResetCallback() {
35
37
  super.formResetCallback();
@@ -72,6 +74,10 @@ let HelixHeadlessSwitch = class HelixHeadlessSwitch extends MixinControllerCheck
72
74
  __decorate([
73
75
  property()
74
76
  ], HelixHeadlessSwitch.prototype, "value", void 0);
77
+ __decorate([
78
+ words,
79
+ property({ attribute: 'value-missing-message' })
80
+ ], HelixHeadlessSwitch.prototype, "valueMissingMessage", void 0);
75
81
  HelixHeadlessSwitch = __decorate([
76
82
  customElement('helix-headless-switch')
77
83
  ], HelixHeadlessSwitch);
@@ -14,7 +14,9 @@ import { type PropertyValues, type TemplateResult } from 'lit';
14
14
  * table with no `TableColumn` heads its columns with.
15
15
  *
16
16
  * The role is on the host so the cell stays a child of its row in the flat
17
- * tree, which keeps the table structure intact.
17
+ * tree, which keeps the table structure intact. In a `grid` table a value is
18
+ * a `gridcell`, and the table gives the cell a `tabindex` so focus can rest on
19
+ * it.
18
20
  *
19
21
  * @since 0.1.0
20
22
  * @status stable
@@ -33,6 +35,11 @@ export declare class HelixHeadlessTableCell extends HelixElement {
33
35
  * column in a row of headers alone.
34
36
  */
35
37
  header: boolean;
38
+ /**
39
+ * @internal Whether the cell is a cell of a `grid` table, which moves focus
40
+ * between its cells, written by that table. Not a consumer's to set.
41
+ */
42
+ gridCell: boolean;
36
43
  /**
37
44
  * @internal Read by the row and by the cells beside it, to tell a header
38
45
  * cell from a value. Not a consumer's to read or set.
@@ -6,11 +6,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { customElement, HelixElement, hostAria } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
- import { property } from 'lit/decorators.js';
9
+ import { property, state } from 'lit/decorators.js';
10
10
  let HelixHeadlessTableCell = class HelixHeadlessTableCell extends HelixElement {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.header = false;
14
+ this.gridCell = false;
14
15
  this.isTableCell = true;
15
16
  this.handleSlotChange = () => {
16
17
  const text = [...this.childNodes].some((node) => node.nodeType === Node.TEXT_NODE && (node.textContent ?? '').trim() !== '');
@@ -27,7 +28,7 @@ let HelixHeadlessTableCell = class HelixHeadlessTableCell extends HelixElement {
27
28
  willUpdate(changed) {
28
29
  super.willUpdate(changed);
29
30
  const header = this.headsRow ? 'rowheader' : 'columnheader';
30
- hostAria(this.internals, { role: this.header ? header : 'cell' });
31
+ hostAria(this.internals, { role: this.header ? header : this.gridCell ? 'gridcell' : 'cell' });
31
32
  }
32
33
  updated(changed) {
33
34
  super.updated(changed);
@@ -47,6 +48,9 @@ let HelixHeadlessTableCell = class HelixHeadlessTableCell extends HelixElement {
47
48
  __decorate([
48
49
  property({ reflect: true, type: Boolean })
49
50
  ], HelixHeadlessTableCell.prototype, "header", void 0);
51
+ __decorate([
52
+ state()
53
+ ], HelixHeadlessTableCell.prototype, "gridCell", void 0);
50
54
  HelixHeadlessTableCell = __decorate([
51
55
  customElement('helix-headless-table-cell')
52
56
  ], HelixHeadlessTableCell);
@@ -86,6 +86,11 @@ export declare const edgeOf: (align: string | undefined) => string | undefined;
86
86
  * @cssstate sorted-descending - While the table is sorted by this column, largest first.
87
87
  */
88
88
  export declare class HelixHeadlessTableColumn extends HelixElement {
89
+ /**
90
+ * The key this part's words are registered under, its styled tag:
91
+ * `registerWords('de', { 'helix-table-column': { resizeLabel: '{name} anpassen' } })`.
92
+ */
93
+ static words: string;
89
94
  /**
90
95
  * A function that reads the cell's content from a row, for cells that `field`
91
96
  * alone cannot read.
@@ -124,8 +129,9 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
124
129
  */
125
130
  field: string;
126
131
  /**
127
- * The accessible name of the grip that moves the column. `{name}` is replaced
128
- * with the heading text.
132
+ * The accessible name of the grip that moves the column. `{name}` is the
133
+ * heading text, and `{named}` is `no` for a column without one, so the
134
+ * sentence for it can name the column another way.
129
135
  *
130
136
  * **Every word a column speaks is a property**, so a table in another
131
137
  * language hears its own rather than English around its own headings.
@@ -142,7 +148,7 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
142
148
  resizable: boolean;
143
149
  /**
144
150
  * The accessible name of the separator that resizes the column. `{name}` is
145
- * replaced with the heading text.
151
+ * the heading text, and `{named}` is `no` for a column without one.
146
152
  */
147
153
  resizeLabel: string;
148
154
  /**
@@ -234,7 +240,8 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
234
240
  width: string;
235
241
  /**
236
242
  * The text screen readers announce for the column's width. `{width}` is
237
- * replaced with the width.
243
+ * the width in pixels, written in the locale, and each language writes the
244
+ * forms it has.
238
245
  */
239
246
  widthLabel: string;
240
247
  /**
@@ -5,8 +5,8 @@ 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 HelixHeadlessTableColumn_1;
8
- import { customElement, fillTemplate, HelixBeforeResizeEvent, HelixElement, HelixResizedEvent, hostAria, inlineStep, isRtl, requestChange, valueAt, } from '@fusion.dev/helix-core';
9
- import { dotsThreeVertical } from '@fusion.dev/helix-icons';
8
+ import { customElement, formatWords, HelixBeforeResizeEvent, HelixElement, HelixResizedEvent, hostAria, inlineStep, isRtl, requestChange, valueAt, words, } from '@fusion.dev/helix-core';
9
+ import { dotsSixVertical } from '@fusion.dev/helix-icons';
10
10
  import { html, nothing } from 'lit';
11
11
  import { property, state } from 'lit/decorators.js';
12
12
  import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
@@ -18,13 +18,13 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
18
18
  this.cell = undefined;
19
19
  this.compare = undefined;
20
20
  this.field = '';
21
- this.moveLabel = 'Move {name}';
21
+ this.moveLabel = '{named, select, no {Move column} other {Move {name}}}';
22
22
  this.resizable = false;
23
- this.resizeLabel = 'Resize {name}';
23
+ this.resizeLabel = '{named, select, no {Resize column} other {Resize {name}}}';
24
24
  this.rowHeader = false;
25
25
  this.sortable = false;
26
26
  this.width = '';
27
- this.widthLabel = '{width} pixels';
27
+ this.widthLabel = '{width, plural, one {# pixel} other {# pixels}}';
28
28
  this.isTableColumn = true;
29
29
  this.sorted = undefined;
30
30
  this.movable = false;
@@ -67,6 +67,7 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
67
67
  };
68
68
  }
69
69
  static { HelixHeadlessTableColumn_1 = this; }
70
+ static { this.words = 'helix-table-column'; }
70
71
  static { this.NARROWEST = 48; }
71
72
  static { this.STEP = 16; }
72
73
  get track() {
@@ -170,6 +171,7 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
170
171
  }
171
172
  render() {
172
173
  const name = this.name;
174
+ const named = { name, named: name ? 'yes' : 'no' };
173
175
  const grid = this.gridCell;
174
176
  const control = grid ? '-1' : nothing;
175
177
  return html `<span
@@ -179,9 +181,9 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
179
181
  aria-sort=${grid && this.canSort ? (this.sorted ?? 'none') : nothing}
180
182
  aria-label=${grid && (this.movable || this.resizable) && name ? name : nothing}
181
183
  >${this.movable
182
- ? html `<button part="grip" type="button" tabindex=${control} aria-label=${fillTemplate(this.moveLabel, { name: name || 'column' })}>
183
- <svg aria-hidden="true" fill="currentColor" part="grip-mark" viewBox=${dotsThreeVertical.viewBox}>
184
- ${unsafeSVG(dotsThreeVertical.content)}
184
+ ? html `<button part="grip" type="button" tabindex=${control} aria-label=${formatWords(this, 'moveLabel', named)}>
185
+ <svg aria-hidden="true" fill="currentColor" part="grip-mark" viewBox=${dotsSixVertical.viewBox}>
186
+ ${unsafeSVG(dotsSixVertical.content)}
185
187
  </svg>
186
188
  </button>`
187
189
  : nothing}${this.canSort
@@ -191,12 +193,12 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
191
193
  part="resizer"
192
194
  role="separator"
193
195
  tabindex=${grid ? '-1' : '0'}
194
- aria-label=${fillTemplate(this.resizeLabel, { name: name || 'column' })}
196
+ aria-label=${formatWords(this, 'resizeLabel', named)}
195
197
  aria-orientation="vertical"
196
198
  aria-valuemin=${HelixHeadlessTableColumn_1.NARROWEST}
197
199
  aria-valuemax="4096"
198
200
  aria-valuenow=${Math.max(HelixHeadlessTableColumn_1.NARROWEST, this.drawn)}
199
- aria-valuetext=${fillTemplate(this.widthLabel, { width: this.drawn })}
201
+ aria-valuetext=${formatWords(this, 'widthLabel', { width: this.drawn })}
200
202
  @keydown=${this.handleResizeKey}
201
203
  @pointerdown=${this.handleResizeStart}
202
204
  @pointermove=${this.handleResizeMove}
@@ -216,12 +218,14 @@ __decorate([
216
218
  property()
217
219
  ], HelixHeadlessTableColumn.prototype, "field", void 0);
218
220
  __decorate([
221
+ words,
219
222
  property({ attribute: 'move-label' })
220
223
  ], HelixHeadlessTableColumn.prototype, "moveLabel", void 0);
221
224
  __decorate([
222
225
  property({ type: Boolean })
223
226
  ], HelixHeadlessTableColumn.prototype, "resizable", void 0);
224
227
  __decorate([
228
+ words,
225
229
  property({ attribute: 'resize-label' })
226
230
  ], HelixHeadlessTableColumn.prototype, "resizeLabel", void 0);
227
231
  __decorate([
@@ -237,6 +241,7 @@ __decorate([
237
241
  property()
238
242
  ], HelixHeadlessTableColumn.prototype, "width", void 0);
239
243
  __decorate([
244
+ words,
240
245
  property({ attribute: 'width-label' })
241
246
  ], HelixHeadlessTableColumn.prototype, "widthLabel", void 0);
242
247
  __decorate([
@@ -0,0 +1,122 @@
1
+ import { type GridPlace } from '@fusion.dev/helix-core';
2
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
3
+ import type { HelixHeadlessTableColumn } from './column/table-column.js';
4
+ /**
5
+ * A column the table draws before the consumer's cells: the grips of a
6
+ * `reorderable` table, and the checkboxes of a `selectable` one.
7
+ */
8
+ export type LeadColumn = 'grip' | 'select';
9
+ /** A place in the grid with the element that holds focus there. */
10
+ export interface GridCell extends GridPlace {
11
+ cell: HTMLElement;
12
+ }
13
+ export interface TableGridOptions {
14
+ /**
15
+ * Acts on a cell for Enter, Space or F2, and says whether it did. A key it
16
+ * leaves alone moves into the cell's controls, Enter and F2 only.
17
+ */
18
+ activate: (place: GridCell, event: KeyboardEvent) => boolean;
19
+ /** The headings that are drawn, in order. */
20
+ columns: () => HelixHeadlessTableColumn[];
21
+ /** The columns the table draws before the consumer's cells, in order. */
22
+ lead: () => readonly LeadColumn[];
23
+ /** The element in the table's own shadow root holding a part of that name. */
24
+ part: (name: string) => HTMLElement | null;
25
+ /** The rows in the order they are drawn. */
26
+ rows: () => Element[];
27
+ /** Selects every row for Control or Command with A, and says whether it did. */
28
+ selectAll: () => boolean;
29
+ /** Whether the table is a grid now. */
30
+ on: () => boolean;
31
+ }
32
+ /**
33
+ * The keyboard of a `grid` table: one tab stop among its cells, the arrow
34
+ * keys, Home, End and the Page keys between them, and Enter or F2 into a
35
+ * cell's controls.
36
+ *
37
+ * **Tab leaves the grid.** The controls in a cell are the consumer's, so their
38
+ * tab order is left as written: Tab on a cell, or past the last control of a
39
+ * cell, focuses an empty box at the grid's end (Shift: its start) and lets the
40
+ * key go on from there, as React Aria's collections do. A control in a cell
41
+ * that focus reaches from outside by the keyboard hands it to the stop, so the
42
+ * grid is one stop from either side. A press, or a script focusing a cell, is
43
+ * left where it lands, and the stop follows it.
44
+ */
45
+ export declare class TableGridController implements ReactiveController {
46
+ private readonly host;
47
+ private readonly options;
48
+ /** The row holding the stop, `head` for the headings, or nothing for the first row. */
49
+ private stopRow;
50
+ /** The column holding the stop. */
51
+ private stopColumn;
52
+ /** Where the stop's row was drawn when last marked, for the row that takes over when it goes. */
53
+ private stopIndex;
54
+ /** The row focus is in, while it is in the grid's rows. */
55
+ private focusRow;
56
+ /** Whether the next update focuses the stop, after a key moved it. */
57
+ private focusWanted;
58
+ /** Whether focus is arriving from a press, which keeps its place. */
59
+ private pointing;
60
+ /** The cells given a `tabindex`, so a table that stops being a grid takes it back. */
61
+ private readonly given;
62
+ constructor(host: ReactiveControllerHost & HTMLElement, options: TableGridOptions);
63
+ hostConnected(): void;
64
+ hostDisconnected(): void;
65
+ /**
66
+ * A row taken away while it held the stop hands it to the row drawn in its
67
+ * place, or to the row before where it was the last, at the same column.
68
+ * Where focus was in that row and went with it, focus follows the stop, as
69
+ * React Aria's collections move it to a neighbor; focus that had already
70
+ * left the grid is left where it is. Before the render, so the cells the
71
+ * table draws itself are drawn with the stop where it now is.
72
+ */
73
+ hostUpdate(): void;
74
+ /** How many columns lead the consumer's cells: the grips and the checkboxes, where there are any. */
75
+ private get offset();
76
+ /** The first row: the headings where there are any, and the first row of cells otherwise. */
77
+ private get top();
78
+ /** A row's cells that are drawn, in order. */
79
+ private cellsOf;
80
+ /** How many columns a row has. */
81
+ private widthOf;
82
+ /** The element that takes focus at a place, or nothing where there is none. */
83
+ cellAt({ column, row }: GridPlace): HTMLElement | null;
84
+ /** The place holding the stop now, held to the grid as it is. */
85
+ current(): GridPlace;
86
+ /** Whether the stop is at a place, for a cell the table draws itself. */
87
+ isStop(place: GridPlace): boolean;
88
+ /** The place an event came from or through, with the element that holds focus there. */
89
+ private placeOf;
90
+ /** Moves the stop to a place, and focus with it on the next update. */
91
+ private moveTo;
92
+ /**
93
+ * Writes the stops: a `tabindex` on every cell, `0` on the one holding the
94
+ * stop, and the grid's state on the rows and headings. Takes it all back
95
+ * once the table stops being a grid. Called by the table after each update.
96
+ */
97
+ mark(): void;
98
+ /** Focuses the stop where a key asked for it. Called by the table after `mark`. */
99
+ place(): void;
100
+ /** The controls in a cell, in order: what Enter and F2 move into, and Tab moves between. */
101
+ private controlsIn;
102
+ /**
103
+ * Hands focus to the empty box at the grid's end, or its start, so the Tab
104
+ * under way goes on from there and out of the grid.
105
+ */
106
+ private leave;
107
+ /** How many rows a Page key moves from a cell. */
108
+ private pageFrom;
109
+ private readonly handleKeydown;
110
+ /** The keys the grid takes while focus is on a control inside a cell. */
111
+ private handleControlKey;
112
+ /**
113
+ * Focus arriving on a cell, or inside one. From outside the grid by the
114
+ * keyboard, anywhere but the stop is handed to the stop; otherwise the stop
115
+ * moves to where focus went.
116
+ */
117
+ private readonly handleFocusIn;
118
+ /** Focus leaving for somewhere outside the grid's host is no longer in a row. */
119
+ private readonly handleFocusOut;
120
+ /** A press is under way, so the focus it brings stays where it lands. */
121
+ private readonly handlePointerDown;
122
+ }