@fusion.dev/helix-headless 0.144.0 → 0.146.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/custom-elements.json +15195 -4240
  2. package/dist/accordion/item/accordion-item.d.ts +62 -12
  3. package/dist/accordion/item/accordion-item.js +41 -10
  4. package/dist/accordion/root/accordion-root.d.ts +14 -5
  5. package/dist/accordion/root/accordion-root.js +7 -1
  6. package/dist/announcement/root/announcement-root.d.ts +24 -3
  7. package/dist/announcement/root/announcement-root.js +39 -2
  8. package/dist/app-header/root/app-header-root.d.ts +12 -0
  9. package/dist/app-header/root/app-header-root.js +13 -1
  10. package/dist/app-header/sectioning.d.ts +9 -0
  11. package/dist/app-header/sectioning.js +27 -0
  12. package/dist/avatar/group/avatar-group.d.ts +20 -14
  13. package/dist/avatar/group/avatar-group.js +17 -19
  14. package/dist/badge/root/badge-root.d.ts +3 -1
  15. package/dist/badge/root/badge-root.js +2 -2
  16. package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
  17. package/dist/bar-chart/root/bar-chart-root.js +52 -15
  18. package/dist/bar-chart/stack.d.ts +15 -0
  19. package/dist/bar-chart/stack.js +19 -0
  20. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +57 -1
  21. package/dist/breadcrumbs/root/breadcrumbs-root.js +73 -3
  22. package/dist/button/root/button-root.d.ts +26 -0
  23. package/dist/button/root/button-root.js +38 -18
  24. package/dist/button-group/root/button-group-root.d.ts +2 -1
  25. package/dist/button-group/root/button-group-root.js +5 -1
  26. package/dist/canvas/node/canvas-node.d.ts +4 -3
  27. package/dist/canvas/node/canvas-node.js +3 -2
  28. package/dist/canvas/root/canvas-root.d.ts +38 -3
  29. package/dist/canvas/root/canvas-root.js +123 -42
  30. package/dist/card/root/card-root.d.ts +24 -3
  31. package/dist/card/root/card-root.js +20 -8
  32. package/dist/carousel/root/carousel-root.d.ts +133 -4
  33. package/dist/carousel/root/carousel-root.js +174 -24
  34. package/dist/carousel/stops.d.ts +20 -0
  35. package/dist/carousel/stops.js +30 -0
  36. package/dist/chat/composer/chat-composer.d.ts +38 -6
  37. package/dist/chat/composer/chat-composer.js +42 -9
  38. package/dist/chat/message/chat-message.d.ts +32 -1
  39. package/dist/chat/message/chat-message.js +27 -10
  40. package/dist/chat/naming.d.ts +26 -0
  41. package/dist/chat/naming.js +14 -0
  42. package/dist/chat/root/chat-root.d.ts +58 -0
  43. package/dist/chat/root/chat-root.js +43 -3
  44. package/dist/checkbox/root/checkbox-root.d.ts +20 -0
  45. package/dist/checkbox/root/checkbox-root.js +14 -1
  46. package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
  47. package/dist/checkbox-group/root/checkbox-group-root.js +12 -10
  48. package/dist/checkbox-group/select-all.d.ts +27 -0
  49. package/dist/checkbox-group/select-all.js +12 -0
  50. package/dist/code-block/highlight.d.ts +15 -0
  51. package/dist/code-block/highlight.js +4 -0
  52. package/dist/code-block/root/code-block-root.d.ts +57 -2
  53. package/dist/code-block/root/code-block-root.js +63 -8
  54. package/dist/color-input/root/color-input-root.d.ts +3 -0
  55. package/dist/color-input/root/color-input-root.js +6 -3
  56. package/dist/color-picker/root/color-picker-root.d.ts +33 -4
  57. package/dist/color-picker/root/color-picker-root.js +80 -21
  58. package/dist/color-picker/swatches.d.ts +12 -0
  59. package/dist/color-picker/swatches.js +26 -0
  60. package/dist/combobox/root/combobox-root.d.ts +43 -0
  61. package/dist/combobox/root/combobox-root.js +79 -15
  62. package/dist/command/root/command-root.d.ts +16 -1
  63. package/dist/command/root/command-root.js +22 -4
  64. package/dist/copy-button/root/copy-button-root.d.ts +26 -1
  65. package/dist/copy-button/root/copy-button-root.js +12 -5
  66. package/dist/data-table/index.d.ts +1 -1
  67. package/dist/data-table/index.js +1 -1
  68. package/dist/data-table/keys.d.ts +24 -0
  69. package/dist/data-table/keys.js +24 -0
  70. package/dist/data-table/root/data-table-root.d.ts +170 -13
  71. package/dist/data-table/root/data-table-root.js +294 -52
  72. package/dist/data-table/tree.d.ts +55 -0
  73. package/dist/data-table/tree.js +54 -0
  74. package/dist/date-input/root/date-input-root.d.ts +3 -1
  75. package/dist/date-input/root/date-input-root.js +18 -7
  76. package/dist/date-picker/root/date-picker-root.js +12 -6
  77. package/dist/description-list/item/description-list-item.d.ts +17 -2
  78. package/dist/description-list/item/description-list-item.js +15 -2
  79. package/dist/description-list/root/description-list-root.d.ts +27 -1
  80. package/dist/description-list/root/description-list-root.js +26 -1
  81. package/dist/dialog/description.js +15 -1
  82. package/dist/dialog/root/dialog-root.d.ts +8 -2
  83. package/dist/dialog/root/dialog-root.js +16 -1
  84. package/dist/divider/root/divider-root.d.ts +3 -0
  85. package/dist/divider/root/divider-root.js +2 -1
  86. package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
  87. package/dist/donut-chart/root/donut-chart-root.js +48 -1
  88. package/dist/drawer/reveal.d.ts +8 -0
  89. package/dist/drawer/reveal.js +1 -0
  90. package/dist/drawer/root/drawer-root.d.ts +59 -0
  91. package/dist/drawer/root/drawer-root.js +63 -4
  92. package/dist/drilldown/item/drilldown-item.d.ts +11 -6
  93. package/dist/drilldown/item/drilldown-item.js +8 -5
  94. package/dist/drilldown/root/drilldown-root.d.ts +29 -0
  95. package/dist/drilldown/root/drilldown-root.js +28 -5
  96. package/dist/element-events.generated.js +83 -12
  97. package/dist/empty/root/empty-root.d.ts +3 -1
  98. package/dist/empty/root/empty-root.js +3 -2
  99. package/dist/file-input/root/file-input-root.d.ts +69 -6
  100. package/dist/file-input/root/file-input-root.js +82 -19
  101. package/dist/file-input/screen.d.ts +2 -1
  102. package/dist/filter-input/menu/filter-menu.d.ts +5 -0
  103. package/dist/filter-input/menu/filter-menu.js +16 -4
  104. package/dist/filter-input/root/filter-input-root.d.ts +30 -6
  105. package/dist/filter-input/root/filter-input-root.js +1 -1
  106. package/dist/filter-input/suggest.d.ts +28 -3
  107. package/dist/filter-input/suggest.js +18 -8
  108. package/dist/format-date/root/format-date-root.d.ts +9 -16
  109. package/dist/format-date/root/format-date-root.js +10 -27
  110. package/dist/heatmap/root/heatmap-root.d.ts +24 -13
  111. package/dist/heatmap/root/heatmap-root.js +34 -12
  112. package/dist/icon/root/icon-root.d.ts +12 -1
  113. package/dist/icon/root/icon-root.js +21 -10
  114. package/dist/icon/settle.d.ts +7 -0
  115. package/dist/icon/settle.js +10 -0
  116. package/dist/icon-button/root/icon-button-root.d.ts +2 -0
  117. package/dist/image/root/image-root.d.ts +5 -1
  118. package/dist/image/root/image-root.js +10 -2
  119. package/dist/input/root/input-root.d.ts +13 -3
  120. package/dist/input/root/input-root.js +12 -3
  121. package/dist/kbd/root/kbd-root.d.ts +35 -1
  122. package/dist/kbd/root/kbd-root.js +23 -4
  123. package/dist/legend/root/legend-root.d.ts +55 -8
  124. package/dist/legend/root/legend-root.js +55 -13
  125. package/dist/lightbox/root/lightbox-root.d.ts +49 -6
  126. package/dist/lightbox/root/lightbox-root.js +86 -19
  127. package/dist/lightbox/zoom-controller.d.ts +59 -0
  128. package/dist/lightbox/zoom-controller.js +128 -0
  129. package/dist/lightbox/zoom.d.ts +22 -0
  130. package/dist/lightbox/zoom.js +16 -0
  131. package/dist/line-chart/root/line-chart-root.d.ts +22 -1
  132. package/dist/line-chart/root/line-chart-root.js +21 -1
  133. package/dist/list/item/list-item.d.ts +70 -1
  134. package/dist/list/item/list-item.js +77 -6
  135. package/dist/list/numbering.d.ts +14 -0
  136. package/dist/list/numbering.js +8 -0
  137. package/dist/list/root/list-root.d.ts +155 -9
  138. package/dist/list/root/list-root.js +246 -4
  139. package/dist/list/selection.d.ts +49 -0
  140. package/dist/list/selection.js +30 -0
  141. package/dist/listbox/root/listbox-root.d.ts +37 -1
  142. package/dist/listbox/root/listbox-root.js +49 -4
  143. package/dist/loader/busy.d.ts +10 -0
  144. package/dist/loader/busy.js +11 -0
  145. package/dist/loader/root/loader-root.d.ts +9 -2
  146. package/dist/loader/root/loader-root.js +23 -3
  147. package/dist/map/root/map-root.d.ts +6 -2
  148. package/dist/map/root/map-root.js +5 -2
  149. package/dist/megamenu/root/megamenu-root.d.ts +62 -0
  150. package/dist/megamenu/root/megamenu-root.js +90 -5
  151. package/dist/menu/index.d.ts +1 -0
  152. package/dist/menu/index.js +1 -0
  153. package/dist/menu/item/menu-item.d.ts +87 -11
  154. package/dist/menu/item/menu-item.js +78 -22
  155. package/dist/menu/root/menu-root.d.ts +39 -1
  156. package/dist/menu/root/menu-root.js +65 -8
  157. package/dist/menu/section/menu-section.d.ts +55 -0
  158. package/dist/menu/section/menu-section.js +60 -0
  159. package/dist/meter/root/meter-root.d.ts +20 -1
  160. package/dist/meter/root/meter-root.js +11 -15
  161. package/dist/navigation/root/navigation-root.d.ts +18 -2
  162. package/dist/navigation/root/navigation-root.js +29 -3
  163. package/dist/notifications/root/notifications-root.d.ts +25 -0
  164. package/dist/notifications/root/notifications-root.js +33 -5
  165. package/dist/number-input/root/number-input-root.d.ts +17 -8
  166. package/dist/number-input/root/number-input-root.js +2 -7
  167. package/dist/object-inspector/root/object-inspector-root.d.ts +161 -32
  168. package/dist/object-inspector/root/object-inspector-root.js +264 -123
  169. package/dist/object-inspector/rows.d.ts +75 -0
  170. package/dist/object-inspector/rows.js +119 -0
  171. package/dist/option/root/option-root.d.ts +5 -3
  172. package/dist/outline/levels.d.ts +31 -0
  173. package/dist/outline/levels.js +23 -0
  174. package/dist/outline/root/outline-root.d.ts +86 -3
  175. package/dist/outline/root/outline-root.js +95 -12
  176. package/dist/pagination/size/pagination-size.d.ts +12 -2
  177. package/dist/pagination/size/pagination-size.js +20 -5
  178. package/dist/pin-input/code.d.ts +10 -0
  179. package/dist/pin-input/code.js +13 -0
  180. package/dist/pin-input/root/pin-input-root.d.ts +25 -1
  181. package/dist/pin-input/root/pin-input-root.js +10 -11
  182. package/dist/popover/hide-outside.d.ts +14 -0
  183. package/dist/popover/hide-outside.js +41 -0
  184. package/dist/popover/root/popover-root.d.ts +57 -7
  185. package/dist/popover/root/popover-root.js +58 -3
  186. package/dist/progress/root/progress-root.d.ts +20 -0
  187. package/dist/progress/root/progress-root.js +15 -15
  188. package/dist/qr-code/export.d.ts +26 -1
  189. package/dist/qr-code/export.js +14 -0
  190. package/dist/qr-code/root/qr-code-root.d.ts +19 -5
  191. package/dist/qr-code/root/qr-code-root.js +58 -9
  192. package/dist/quote/marks.d.ts +8 -0
  193. package/dist/quote/marks.js +5 -0
  194. package/dist/quote/root/quote-root.d.ts +14 -2
  195. package/dist/quote/root/quote-root.js +23 -1
  196. package/dist/radio/group/radio-group.d.ts +4 -10
  197. package/dist/radio/group/radio-group.js +5 -10
  198. package/dist/radio/root/radio-root.d.ts +6 -2
  199. package/dist/radio/root/radio-root.js +6 -1
  200. package/dist/rating/root/rating-root.d.ts +10 -5
  201. package/dist/rating/root/rating-root.js +32 -8
  202. package/dist/rating/steps.d.ts +7 -0
  203. package/dist/rating/steps.js +9 -0
  204. package/dist/scatter-chart/fit.d.ts +15 -0
  205. package/dist/scatter-chart/fit.js +35 -0
  206. package/dist/scatter-chart/root/scatter-chart-root.d.ts +21 -1
  207. package/dist/scatter-chart/root/scatter-chart-root.js +30 -17
  208. package/dist/scroll-area/root/scroll-area-root.d.ts +84 -0
  209. package/dist/scroll-area/root/scroll-area-root.js +106 -7
  210. package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
  211. package/dist/scroll-area/scrollbar-controller.js +172 -0
  212. package/dist/scroll-area/scrollbar.d.ts +92 -0
  213. package/dist/scroll-area/scrollbar.js +33 -0
  214. package/dist/select/root/select-root.d.ts +15 -0
  215. package/dist/select/root/select-root.js +18 -6
  216. package/dist/skeleton/root/skeleton-root.d.ts +3 -0
  217. package/dist/skeleton/root/skeleton-root.js +4 -2
  218. package/dist/skip-link/root/skip-link-root.js +2 -2
  219. package/dist/slider/root/slider-root.d.ts +41 -4
  220. package/dist/slider/root/slider-root.js +23 -3
  221. package/dist/sparkline/readings.d.ts +18 -0
  222. package/dist/sparkline/readings.js +19 -0
  223. package/dist/sparkline/root/sparkline-root.d.ts +78 -7
  224. package/dist/sparkline/root/sparkline-root.js +118 -23
  225. package/dist/speed-dial/root/speed-dial-root.js +2 -2
  226. package/dist/splitter/root/splitter-root.d.ts +20 -12
  227. package/dist/splitter/root/splitter-root.js +226 -203
  228. package/dist/splitter/snap.d.ts +9 -0
  229. package/dist/splitter/snap.js +12 -0
  230. package/dist/stat/root/stat-root.d.ts +14 -5
  231. package/dist/stat/root/stat-root.js +21 -5
  232. package/dist/steps/reach.d.ts +20 -0
  233. package/dist/steps/reach.js +15 -0
  234. package/dist/steps/root/steps-root.d.ts +76 -0
  235. package/dist/steps/root/steps-root.js +93 -1
  236. package/dist/steps/step/step.d.ts +45 -2
  237. package/dist/steps/step/step.js +33 -6
  238. package/dist/switch/root/switch-root.d.ts +10 -0
  239. package/dist/table/column/table-column.d.ts +11 -10
  240. package/dist/table/column/table-column.js +8 -19
  241. package/dist/table/root/table-root.d.ts +126 -4
  242. package/dist/table/root/table-root.js +156 -6
  243. package/dist/table/row/table-row.d.ts +47 -1
  244. package/dist/table/row/table-row.js +39 -2
  245. package/dist/tabs/panel/tab-panel.d.ts +22 -5
  246. package/dist/tabs/panel/tab-panel.js +34 -6
  247. package/dist/tabs/root/tabs-root.d.ts +37 -1
  248. package/dist/tabs/root/tabs-root.js +22 -4
  249. package/dist/tabs/tab/tab.d.ts +41 -4
  250. package/dist/tabs/tab/tab.js +49 -3
  251. package/dist/tag/group/tag-group.d.ts +31 -4
  252. package/dist/tag/group/tag-group.js +46 -7
  253. package/dist/tag/root/tag-root.js +9 -2
  254. package/dist/textarea/root/textarea-root.d.ts +28 -1
  255. package/dist/textarea/root/textarea-root.js +40 -1
  256. package/dist/time-input/root/time-input-root.d.ts +5 -1
  257. package/dist/time-input/root/time-input-root.js +16 -8
  258. package/dist/time-picker/root/time-picker-root.d.ts +18 -4
  259. package/dist/time-picker/root/time-picker-root.js +7 -10
  260. package/dist/time-picker/wheel-name.d.ts +9 -0
  261. package/dist/time-picker/wheel-name.js +15 -0
  262. package/dist/timeline/group/timeline-group.d.ts +46 -0
  263. package/dist/timeline/group/timeline-group.js +37 -0
  264. package/dist/timeline/index.d.ts +1 -0
  265. package/dist/timeline/index.js +1 -0
  266. package/dist/timeline/root/timeline-root.d.ts +10 -3
  267. package/dist/toast/item/toast-item.d.ts +24 -18
  268. package/dist/toast/item/toast-item.js +36 -40
  269. package/dist/toast/root/toast-root.d.ts +6 -0
  270. package/dist/toast/root/toast-root.js +16 -1
  271. package/dist/toggle/group/toggle-group.d.ts +24 -3
  272. package/dist/toggle/group/toggle-group.js +34 -5
  273. package/dist/toolbar/root/toolbar-root.d.ts +13 -0
  274. package/dist/toolbar/root/toolbar-root.js +15 -5
  275. package/dist/tooltip/root/tooltip-root.d.ts +13 -2
  276. package/dist/tooltip/root/tooltip-root.js +9 -1
  277. package/dist/tour/back.d.ts +10 -0
  278. package/dist/tour/back.js +8 -0
  279. package/dist/tour/root/tour-root.d.ts +30 -2
  280. package/dist/tour/root/tour-root.js +34 -8
  281. package/dist/tree/item/tree-item.d.ts +61 -4
  282. package/dist/tree/item/tree-item.js +92 -20
  283. package/dist/tree/root/tree-root.d.ts +58 -0
  284. package/dist/tree/root/tree-root.js +80 -16
  285. package/dist/tree/selection.d.ts +24 -0
  286. package/dist/tree/selection.js +13 -0
  287. package/dist/trend/root/trend-root.d.ts +43 -18
  288. package/dist/trend/root/trend-root.js +31 -6
  289. package/dist/video/media-events.d.ts +44 -0
  290. package/dist/video/media-events.js +35 -0
  291. package/dist/video/root/video-root.d.ts +117 -18
  292. package/dist/video/root/video-root.js +93 -47
  293. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -0
  294. package/dist/video-playlist/menu/video-playlist-menu.js +3 -1
  295. package/dist/video-playlist/order.d.ts +41 -0
  296. package/dist/video-playlist/order.js +34 -0
  297. package/dist/video-playlist/root/video-playlist-root.d.ts +77 -3
  298. package/dist/video-playlist/root/video-playlist-root.js +60 -16
  299. package/dist/virtual-list/controls.d.ts +4 -0
  300. package/dist/virtual-list/controls.js +30 -0
  301. package/dist/virtual-list/fill.d.ts +22 -0
  302. package/dist/virtual-list/fill.js +23 -0
  303. package/dist/virtual-list/keys.d.ts +15 -0
  304. package/dist/virtual-list/keys.js +24 -0
  305. package/dist/virtual-list/plan.d.ts +49 -0
  306. package/dist/virtual-list/plan.js +16 -0
  307. package/dist/virtual-list/root/virtual-list-root.d.ts +259 -26
  308. package/dist/virtual-list/root/virtual-list-root.js +333 -49
  309. package/lint.json +1 -1
  310. package/package.json +8 -8
  311. package/types/jsx.d.ts +8113 -1394
  312. package/types/svelte.d.ts +2 -0
  313. package/types/vue.d.ts +1678 -353
  314. package/dist/data-table/root/order.d.ts +0 -141
  315. package/dist/data-table/root/order.js +0 -76
  316. package/dist/listbox/range.d.ts +0 -17
  317. package/dist/listbox/range.js +0 -5
  318. package/dist/tag/selection.d.ts +0 -10
  319. package/dist/tag/selection.js +0 -12
@@ -25,9 +25,10 @@ declare const HelixHeadlessNumberInput_base: (new (...args: any[]) => import("@f
25
25
  * The locale's group separators are read in every field, so `1,234` is a
26
26
  * number in `en-US`.
27
27
  *
28
- * On iOS and iPadOS the field is a text field described as a number field,
29
- * with no `role="spinbutton"`, which VoiceOver reads as a slider you cannot
30
- * type in. React Aria's NumberField does the same.
28
+ * On iOS and iPadOS the field is a plain text field, with no
29
+ * `role="spinbutton"`, which VoiceOver reads as a slider you cannot type in,
30
+ * and no role description, so VoiceOver says the field is required. React
31
+ * Aria's NumberField does the same.
31
32
  *
32
33
  * Validity follows the platform's rules: `min`, `max`, and `step` are checked
33
34
  * and reported through the host's own `setValidity`, under the platform's flag
@@ -36,6 +37,19 @@ declare const HelixHeadlessNumberInput_base: (new (...args: any[]) => import("@f
36
37
  * Stepping is separate from typing, so a number is not corrected while you type
37
38
  * it.
38
39
  *
40
+ * **Keyboard.** The field is one tab stop, and the stepper buttons are not in
41
+ * the tab order.
42
+ *
43
+ * | Key | What it does |
44
+ * |---|---|
45
+ * | Up, Down | Steps the value up or down by `step`. |
46
+ * | Page Up, Page Down | Steps by `large-step` steps, ten by default. |
47
+ * | Home, End | Goes to `min` or `max`, where there is one. Without one, moves the caret. |
48
+ * | Enter | Commits the typed number and submits the form, as a native field does. |
49
+ *
50
+ * The field has `role="spinbutton"` with `aria-valuenow`, `aria-valuemin`,
51
+ * `aria-valuemax`, and the formatted text in `aria-valuetext`.
52
+ *
39
53
  * @since 0.1.0
40
54
  * @status stable
41
55
  * @category forms
@@ -154,11 +168,6 @@ export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_b
154
168
  * Prevents editing. The value is still submitted with the form.
155
169
  */
156
170
  readOnly: boolean;
157
- /**
158
- * What the field is described as on iOS and iPadOS, where it carries no
159
- * spinbutton role. See the class description.
160
- */
161
- roleDescription: string;
162
171
  /**
163
172
  * Makes the label a grip that changes the value when it is dragged.
164
173
  *
@@ -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, appleTouch, valueAsNumber as asNumber, customElement, fillTemplate, formatNumber, numberAsValue as fromNumber, HelixFormElement, holdCaret, MixinControllerValue, MixinField, parseNumber, restoreValue, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, appleTouch, valueAsNumber as asNumber, customElement, fillTemplate, formatNumber, numberAsValue as fromNumber, HelixFormElement, holdCaret, MixinControllerValue, MixinField, parseNumber, restoreValue, submitImplicitly, } from '@fusion.dev/helix-core';
8
8
  import { minus, plus } from '@fusion.dev/helix-icons';
9
9
  import { html, nothing } from 'lit';
10
10
  import { property, state } from 'lit/decorators.js';
@@ -24,7 +24,6 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
24
24
  this.locale = '';
25
25
  this.placeholder = '';
26
26
  this.readOnly = false;
27
- this.roleDescription = 'number field';
28
27
  this.scrub = false;
29
28
  this.step = 1;
30
29
  this.valueText = '';
@@ -138,7 +137,7 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
138
137
  };
139
138
  this.handleKeypress = (event) => {
140
139
  if (event.key === 'Enter' && !event.defaultPrevented) {
141
- this.submitImplicitly();
140
+ submitImplicitly(this.form);
142
141
  }
143
142
  };
144
143
  }
@@ -317,7 +316,6 @@ let HelixHeadlessNumberInput = class HelixHeadlessNumberInput extends MixinContr
317
316
  .value=${this.shown}
318
317
  type="text"
319
318
  role=${this.touchApple ? nothing : 'spinbutton'}
320
- aria-roledescription=${this.touchApple ? this.roleDescription : nothing}
321
319
  inputmode="decimal"
322
320
  autocomplete=${this.autocomplete || nothing}
323
321
  name=${this.name || nothing}
@@ -411,9 +409,6 @@ __decorate([
411
409
  __decorate([
412
410
  property({ attribute: 'readonly', reflect: true, type: Boolean })
413
411
  ], HelixHeadlessNumberInput.prototype, "readOnly", void 0);
414
- __decorate([
415
- property({ attribute: 'role-description' })
416
- ], HelixHeadlessNumberInput.prototype, "roleDescription", void 0);
417
412
  __decorate([
418
413
  property({ reflect: true, type: Boolean })
419
414
  ], HelixHeadlessNumberInput.prototype, "scrub", void 0);
@@ -1,18 +1,7 @@
1
1
  import { AriaForwardController, HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  import '../../copy-button/index.js';
4
- /** One visible line of the tree: a value, where it sits, and whether it is open. */
5
- interface Row {
6
- branch: boolean;
7
- depth: number;
8
- /** The property name or array index this value is under; absent for the root. */
9
- key?: string;
10
- open: boolean;
11
- path: string;
12
- position: number;
13
- siblings: number;
14
- value: unknown;
15
- }
4
+ import { type Row } from '../rows.js';
16
5
  /**
17
6
  * @summary A structured value shown as a tree, where you can close branches,
18
7
  * see how many entries each holds, and copy any part.
@@ -26,13 +15,45 @@ interface Row {
26
15
  * works with server rendering and with React hydration, which skips object
27
16
  * properties. `value` wins when both are set.
28
17
  *
29
- * The tree is one tab stop. Up and Down move between rows, Right opens a branch
30
- * or moves into it, Left closes it or moves to its parent, and Home and End
31
- * move to the first and last rows. Typing moves to the next row whose key
32
- * starts with what was typed, and `*` opens every branch beside the active
33
- * row. Focus stays on the tree, and `aria-activedescendant` marks the active
34
- * row. Each row carries its real level, position, and set size, including in
35
- * a windowed tree.
18
+ * **Keyboard.** The tree is one tab stop, and focus moves from row to row.
19
+ *
20
+ * | Key | What it does |
21
+ * |---|---|
22
+ * | Down, Up | Moves to the next or the previous row. |
23
+ * | Right | Opens a closed branch, or moves into an open one. Left on a right-to-left page. |
24
+ * | Left | Closes an open branch, or moves to the parent. Right on a right-to-left page. |
25
+ * | Home, End | Moves to the first or the last row. |
26
+ * | Enter, Space | Opens or closes a branch. |
27
+ * | `*` | Opens every branch beside the active row. |
28
+ * | A letter or a word | Moves to the next row whose key starts with what you typed. |
29
+ * | Command+C, Control+C | Copies the active row, where no text is selected. |
30
+ *
31
+ * The tree is a `treegrid`, as React Aria's Tree is: each entry is a `row` with
32
+ * one cell, and carries its real level, position, and set size, including in a
33
+ * windowed tree. Nothing in it is chosen, so no row carries `aria-selected`,
34
+ * and a focused row is not announced as selected.
35
+ *
36
+ * A reader opening or closing a branch sends `helix-before-open` or
37
+ * `helix-before-close`, which you can cancel, and then `toggle` with
38
+ * `newState` and `oldState`, as `<details>` does. The branch is the active
39
+ * row, and `expanded` holds every open branch. `*` asks once for all the
40
+ * branches it opens. A script writing `expanded` or `active` sends nothing.
41
+ *
42
+ * `active` is the active row's path, written the way a JSON Pointer writes it:
43
+ * the empty string for the root and `/meta/tags/0` for an entry under it.
44
+ * Moving to another row sends `helix-before-activate`, which you can cancel,
45
+ * and then `helix-activate`, both with the path. Writing `active` moves there
46
+ * and opens the branches around it, and sends nothing. `expanded` holds the
47
+ * open branches by path, and writing it opens those and closes the rest. A row
48
+ * that closes around the active one hands it to the nearest open branch.
49
+ *
50
+ * `filter` narrows the tree to the entries whose key or value holds the text,
51
+ * ignoring case, and the branches that lead to them, which it opens. A matched
52
+ * branch keeps everything under it. Each matched row carries `row-match`, and
53
+ * a screen reader hears how many entries matched from `result-label` and
54
+ * `results-label`. `filterable` adds a field that sets it: typing sends
55
+ * `helix-filter`, which you can cancel, and then `helix-filtered`, and Down
56
+ * moves from the field to the tree.
36
57
  *
37
58
  * A new `value` keeps the branches a reader opened or closed, and the active
38
59
  * row, where the new value still has them. A branch the old value did not have
@@ -53,7 +74,14 @@ interface Row {
53
74
  * @aliases JSON viewer, Object viewer, Inspector, Data explorer
54
75
  * @documentation https://fusion.dev/helix/components/object-inspector
55
76
  *
77
+ * @event {HelixActivateEvent} helix-activate - The active row moved, by a key or a click. The detail's `value` is its path.
78
+ * @event {HelixBeforeActivateEvent} helix-before-activate - The active row is about to move, with its new path. Cancelable: cancel it to keep the row where it is.
79
+ * @event {HelixBeforeCloseEvent} helix-before-close - A reader is about to close the active branch. Cancelable: cancel it to keep the branch open.
80
+ * @event {HelixBeforeOpenEvent} helix-before-open - A reader is about to open the active branch, or `*` the branches beside it. Cancelable: cancel it to keep them closed.
56
81
  * @event {HelixCopyEvent} helix-copy - A value was put on the clipboard, from the copy button or the keyboard.
82
+ * @event {HelixFilterEvent} helix-filter - Text was typed in the filter field, with what it now holds. Cancelable: cancel it to keep the filter as it was.
83
+ * @event {HelixFilteredEvent} helix-filtered - The filter field changed `filter`, which now holds the text.
84
+ * @event {ToggleEvent} toggle - A reader opened or closed a branch, with `newState` and `oldState`. `expanded` holds every open branch.
57
85
  *
58
86
  * @csspart after - The space the rows below the drawn rows would take, when `windowed` is set.
59
87
  * @csspart before - The space the rows above the drawn rows would take, when `windowed` is set.
@@ -78,18 +106,32 @@ interface Row {
78
106
  * @csspart header - The bar that holds the label, when there is one.
79
107
  * @csspart key - A property name or an array index.
80
108
  * @csspart label - The label.
109
+ * @csspart live - How many entries a filter matched, in a region that screen readers announce when it changes. Drawn from the first filter on. Visually hidden in the styled tier.
81
110
  * @csspart null - A `null`.
82
111
  * @csspart number - A number.
83
- * @csspart row - One entry, as a tree item.
84
- * @csspart row-active - The entry the keyboard is on. Set alongside `row`.
112
+ * @csspart row - One entry, as a row of the tree grid, which takes focus.
113
+ * @csspart row-active - The entry the keyboard is on, which holds the tab stop. Set alongside `row`.
114
+ * @csspart row-match - An entry whose key or value holds the filter. Set alongside `row`.
115
+ * @csspart search-field - The field that sets `filter`, with `filterable`.
85
116
  * @csspart string - A string, in quotes.
86
117
  * @csspart summary - The brackets that stand for a branch's contents.
87
118
  * @csspart toggle - The caret on a branch. It points down when the branch is open and sideways when it is closed.
88
- * @csspart tree - The tree, which is the element that receives focus.
119
+ * @csspart tree - The tree grid that holds the rows.
89
120
  *
90
121
  * @cssproperty --object-inspector-level - How deep a row is, from 0 at the root, for indenting it.
91
122
  */
92
123
  export declare class HelixHeadlessObjectInspector extends HelixElement {
124
+ /**
125
+ * The active row's path, such as `/meta/tags/0`, and the empty string for the
126
+ * root.
127
+ *
128
+ * Reading gives the row the keys are on. Writing moves there, opening the
129
+ * branches around it, and sends no event, the way a script's write to any
130
+ * current value sends none. A path the value does not hold moves to the
131
+ * nearest branch above it that it does.
132
+ */
133
+ get active(): string;
134
+ set active(path: string);
93
135
  /**
94
136
  * The copy button's accessible name on a row with a key, with the key filled
95
137
  * in as `{name}`.
@@ -109,6 +151,23 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
109
151
  * wall of text this exists to avoid.
110
152
  */
111
153
  defaultDepth: number;
154
+ /**
155
+ * The open branches, by path, in no set order.
156
+ *
157
+ * Writing opens exactly these and closes every other, keeping the active row
158
+ * where it stays visible. A property, never an attribute.
159
+ */
160
+ get expanded(): string[];
161
+ set expanded(paths: string[]);
162
+ /**
163
+ * Text the tree is narrowed to: the entries whose key or value holds it,
164
+ * ignoring case, and the branches that lead to them. Empty shows everything.
165
+ */
166
+ filter: string;
167
+ /** Whether to show a field that sets `filter`. */
168
+ filterable: boolean;
169
+ /** The filter field's placeholder and accessible name. */
170
+ filterLabel: string;
112
171
  /**
113
172
  * The id of a `<script type="application/json">` holding the value.
114
173
  *
@@ -143,6 +202,13 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
143
202
  * reach a value.
144
203
  */
145
204
  noCopy: boolean;
205
+ /** What a screen reader hears when a filter matches one entry. `{count}` is the count. */
206
+ resultLabel: string;
207
+ /**
208
+ * What a screen reader hears when a filter matches any other number of
209
+ * entries. `{count}` is the count. The two are chosen by `Intl.PluralRules`.
210
+ */
211
+ resultsLabel: string;
146
212
  /**
147
213
  * The tree's accessible name when `label` is empty and the host names it
148
214
  * with neither `aria-label` nor `aria-labelledby`.
@@ -169,15 +235,32 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
169
235
  /** Which branches are open, by path. */
170
236
  private opened;
171
237
  /** The row the arrow keys are on, by its place among the visible rows. */
172
- private active;
238
+ private cursor;
239
+ /** A path written to `active` and not yet found among the rows. */
240
+ private wanted;
241
+ /**
242
+ * The branches written to `expanded`, until the next update applies them.
243
+ *
244
+ * Its own field, because a property declared with an accessor is in the
245
+ * first update's changes whether or not anybody wrote it.
246
+ */
247
+ private declared;
248
+ /** The paths the filter matched, or nothing while there is no filter. */
249
+ private found;
173
250
  /** Set by a keyboard move, so the next render brings the active row into view. */
174
251
  private revealing;
252
+ /** Set by a reader's move, so the next render moves focus to the active row. */
253
+ private focusing;
254
+ /** Whether a row held focus as this update began, so a row the render moved gets it back. */
255
+ private hadFocus;
175
256
  /** What has been typed toward a key, and when the last letter came. */
176
257
  private typed;
177
258
  /** The branches of the last value seen, by path, so a new value can tell old ones from new. */
178
259
  private branches;
179
260
  /** Carries a host `aria-label` and `aria-labelledby` to the tree, which is what takes focus. */
180
261
  protected readonly aria: AriaForwardController;
262
+ /** Says how many entries a filter matched. */
263
+ private readonly status;
181
264
  /**
182
265
  * How tall a row is taken to be before it has been drawn, in pixels.
183
266
  *
@@ -193,8 +276,6 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
193
276
  /** Every visible row, in order, worked out once per change rather than per read. */
194
277
  private rows;
195
278
  private readonly copier;
196
- /** Every visible row, in order, for the tree as it stands. */
197
- private flatten;
198
279
  /**
199
280
  * Opens every branch shallower than `defaultDepth`.
200
281
  *
@@ -205,9 +286,20 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
205
286
  * place on every update.
206
287
  */
207
288
  private seed;
289
+ /** Opens the branches around each path, where the value has them. */
290
+ private openAround;
208
291
  protected willUpdate(changed: PropertyValues): void;
292
+ /** Says how many entries the filter matched, and nothing for an empty one. */
293
+ private tell;
209
294
  protected firstUpdated(changed: PropertyValues): void;
210
295
  protected updated(changed: PropertyValues): void;
296
+ /**
297
+ * Moves focus to the active row, once it is drawn.
298
+ *
299
+ * After a reader's move only, so a script writing `active` does not take
300
+ * focus from wherever the reader is.
301
+ */
302
+ private focusActive;
211
303
  private load;
212
304
  /**
213
305
  * Brings the active row into the box.
@@ -224,11 +316,27 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
224
316
  private reveal;
225
317
  /** What copying takes: a branch as indented JSON, a string as itself. */
226
318
  private copyable;
319
+ /**
320
+ * Asks to open or close branches, and then does and says so:
321
+ * `helix-before-open` or `helix-before-close`, which a listener can cancel,
322
+ * then `toggle`. A reader's act only. Returns whether they moved.
323
+ */
324
+ private requestOpen;
325
+ /**
326
+ * Says a branch opened or closed under the platform's own name and in its
327
+ * shape: `toggle` with `newState` and `oldState`, not bubbling, as
328
+ * `<details>` sends it and as the open mixin does for the families whose
329
+ * open state it owns. A real `ToggleEvent` where the platform has one, and a
330
+ * plain event carrying the same two fields where it does not.
331
+ */
332
+ private announceToggle;
227
333
  private toggle;
334
+ /**
335
+ * Moves the active row, asking first: `helix-before-activate` with the path,
336
+ * then `helix-activate` once it has moved. Returns whether it is there.
337
+ */
228
338
  private move;
229
339
  private readonly handleKeydown;
230
- /** Opens every branch at the active row's level under the same parent, as `*` asks. */
231
- private openSiblings;
232
340
  /**
233
341
  * Moves to the next row whose key starts with what was typed.
234
342
  *
@@ -237,19 +345,41 @@ export declare class HelixHeadlessObjectInspector extends HelixElement {
237
345
  * keys that start with it.
238
346
  */
239
347
  private typeahead;
348
+ /** A press opens or closes the row it lands on, once that row is the active one. */
240
349
  private handleRowClick;
350
+ /** Text typed in the filter field, asked for before the tree narrows to it. */
351
+ private readonly handleFilterInput;
352
+ /** Down from the filter field goes to the active row, where the matches are. */
353
+ private readonly handleFilterKeydown;
241
354
  private renderValue;
242
355
  /**
243
356
  * One entry, named for its state where it holds one.
244
357
  *
245
358
  * **`row-active` and no attribute beside it.** Which row the keys are on is
246
359
  * drawn by a sheet and by nothing else: the accessibility tree hears it from
247
- * `aria-activedescendant` on the tree, which points at this row's id, so an
248
- * attribute would be a second spelling with no reader. The name is the one a
249
- * consumer can reach, nothing being able to follow `::part()` with an
250
- * attribute selector.
360
+ * focus, which the row holds, so an attribute would be a second spelling with
361
+ * no reader. The name is the one a consumer can reach, nothing being able to
362
+ * follow `::part()` with an attribute selector.
363
+ *
364
+ * **A `row` of a `treegrid` with one cell, focused itself, and no
365
+ * `aria-selected`**, because nothing here is chosen. Chromium takes the
366
+ * focused item of a single-selection `tree` as selected, by focus or by
367
+ * `aria-activedescendant` (measured), so every arrow press was also announced
368
+ * as a selection, and `aria-selected="false"` on every row was the one way to
369
+ * turn it off. A row of a tree grid is not selected by focus, which is why
370
+ * React Aria's Tree is one. The cell is `display: contents`, so the row lays
371
+ * out its text as it did.
251
372
  */
252
373
  private renderRow;
374
+ /** Whether a row of the tree holds focus. */
375
+ private hasFocusedRow;
376
+ /**
377
+ * A row that takes focus some other way than the keys, from a script or a
378
+ * screen reader, becomes the active row, so focus and the keys agree.
379
+ */
380
+ private readonly handleFocusIn;
381
+ /** A row kept drawn for focus is let go once focus leaves it. */
382
+ private readonly handleFocusOut;
253
383
  /** The copy button, behind the seam Code Block's uses, so each tier renders its own. */
254
384
  protected renderCopyButton(row: Row | undefined): TemplateResult;
255
385
  protected render(): TemplateResult;
@@ -259,4 +389,3 @@ declare global {
259
389
  'helix-headless-object-inspector': HelixHeadlessObjectInspector;
260
390
  }
261
391
  }
262
- export {};