@fusion.dev/helix-headless 0.142.1 → 0.144.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 (285) hide show
  1. package/custom-elements.json +25381 -1202
  2. package/dist/accordion/item/accordion-item.d.ts +38 -2
  3. package/dist/accordion/item/accordion-item.js +38 -6
  4. package/dist/accordion/root/accordion-root.d.ts +23 -1
  5. package/dist/accordion/root/accordion-root.js +39 -3
  6. package/dist/announcement/root/announcement-root.d.ts +11 -7
  7. package/dist/announcement/root/announcement-root.js +1 -1
  8. package/dist/app-header/root/app-header-root.d.ts +21 -0
  9. package/dist/app-header/root/app-header-root.js +31 -5
  10. package/dist/area-chart/root/area-chart-root.d.ts +12 -4
  11. package/dist/area-chart/root/area-chart-root.js +39 -11
  12. package/dist/avatar/group/avatar-group.d.ts +24 -3
  13. package/dist/avatar/group/avatar-group.js +34 -2
  14. package/dist/avatar/root/avatar-root.d.ts +17 -1
  15. package/dist/avatar/root/avatar-root.js +31 -10
  16. package/dist/badge/root/badge-root.d.ts +12 -0
  17. package/dist/badge/root/badge-root.js +1 -1
  18. package/dist/bar-chart/root/bar-chart-root.d.ts +30 -5
  19. package/dist/bar-chart/root/bar-chart-root.js +58 -21
  20. package/dist/blockquote/root/blockquote-root.d.ts +12 -7
  21. package/dist/blockquote/root/blockquote-root.js +6 -4
  22. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -3
  23. package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -1
  24. package/dist/button/root/button-root.d.ts +84 -1
  25. package/dist/button/root/button-root.js +81 -3
  26. package/dist/callout/root/callout-root.d.ts +32 -6
  27. package/dist/callout/root/callout-root.js +26 -7
  28. package/dist/canvas/root/canvas-root.d.ts +1 -0
  29. package/dist/canvas/root/canvas-root.js +10 -1
  30. package/dist/card/root/card-root.d.ts +30 -1
  31. package/dist/card/root/card-root.js +38 -5
  32. package/dist/carousel/root/carousel-root.d.ts +47 -5
  33. package/dist/carousel/root/carousel-root.js +53 -21
  34. package/dist/chat/composer/chat-composer.d.ts +13 -11
  35. package/dist/chat/composer/chat-composer.js +6 -12
  36. package/dist/chat/message/chat-message.js +8 -1
  37. package/dist/chat/root/chat-root.d.ts +1 -0
  38. package/dist/chat/root/chat-root.js +2 -1
  39. package/dist/checkbox/root/checkbox-root.d.ts +7 -0
  40. package/dist/checkbox/root/checkbox-root.js +9 -3
  41. package/dist/checkbox-group/root/checkbox-group-root.d.ts +116 -33
  42. package/dist/checkbox-group/root/checkbox-group-root.js +141 -44
  43. package/dist/code/root/code-root.d.ts +1 -1
  44. package/dist/code-block/lines.d.ts +13 -0
  45. package/dist/code-block/lines.js +2 -0
  46. package/dist/code-block/root/code-block-root.d.ts +49 -0
  47. package/dist/code-block/root/code-block-root.js +44 -3
  48. package/dist/color-input/root/color-input-root.d.ts +60 -2
  49. package/dist/color-input/root/color-input-root.js +55 -7
  50. package/dist/color-picker/channels.d.ts +26 -0
  51. package/dist/color-picker/channels.js +84 -0
  52. package/dist/color-picker/root/color-picker-root.d.ts +118 -12
  53. package/dist/color-picker/root/color-picker-root.js +183 -13
  54. package/dist/combobox/root/combobox-root.d.ts +126 -3
  55. package/dist/combobox/root/combobox-root.js +224 -21
  56. package/dist/command/root/command-root.d.ts +47 -10
  57. package/dist/command/root/command-root.js +45 -4
  58. package/dist/copy-button/from.d.ts +22 -0
  59. package/dist/copy-button/from.js +28 -0
  60. package/dist/copy-button/root/copy-button-root.d.ts +48 -7
  61. package/dist/copy-button/root/copy-button-root.js +54 -8
  62. package/dist/data-table/root/data-table-root.d.ts +164 -10
  63. package/dist/data-table/root/data-table-root.js +488 -57
  64. package/dist/date-input/root/date-input-root.d.ts +123 -9
  65. package/dist/date-input/root/date-input-root.js +147 -45
  66. package/dist/date-picker/root/date-picker-root.d.ts +229 -18
  67. package/dist/date-picker/root/date-picker-root.js +342 -46
  68. package/dist/dialog/description.d.ts +9 -0
  69. package/dist/dialog/description.js +14 -0
  70. package/dist/dialog/root/dialog-root.d.ts +101 -10
  71. package/dist/dialog/root/dialog-root.js +83 -4
  72. package/dist/donut-chart/root/donut-chart-root.d.ts +61 -16
  73. package/dist/donut-chart/root/donut-chart-root.js +48 -13
  74. package/dist/drawer/root/drawer-root.d.ts +93 -7
  75. package/dist/drawer/root/drawer-root.js +126 -5
  76. package/dist/drawer/swipe-start.d.ts +9 -0
  77. package/dist/drawer/swipe-start.js +12 -0
  78. package/dist/drilldown/item/drilldown-item.d.ts +16 -13
  79. package/dist/drilldown/item/drilldown-item.js +6 -2
  80. package/dist/drilldown/root/drilldown-root.d.ts +21 -5
  81. package/dist/drilldown/root/drilldown-root.js +26 -10
  82. package/dist/element-events.generated.js +42 -13
  83. package/dist/empty/root/empty-root.d.ts +1 -1
  84. package/dist/file-input/root/file-input-root.d.ts +65 -1
  85. package/dist/file-input/root/file-input-root.js +76 -12
  86. package/dist/file-input/screen.d.ts +35 -0
  87. package/dist/file-input/screen.js +49 -0
  88. package/dist/filter-input/menu/filter-menu.d.ts +9 -0
  89. package/dist/filter-input/menu/filter-menu.js +8 -0
  90. package/dist/filter-input/root/filter-input-root.d.ts +43 -6
  91. package/dist/filter-input/root/filter-input-root.js +89 -10
  92. package/dist/filter-input/suggest.d.ts +17 -0
  93. package/dist/filter-input/suggest.js +23 -0
  94. package/dist/format-date/options.d.ts +33 -0
  95. package/dist/format-date/options.js +42 -0
  96. package/dist/format-date/root/format-date-root.d.ts +62 -3
  97. package/dist/format-date/root/format-date-root.js +78 -37
  98. package/dist/graph/root/graph-root.d.ts +24 -3
  99. package/dist/graph/root/graph-root.js +66 -12
  100. package/dist/heatmap/root/buckets.d.ts +2 -1
  101. package/dist/heatmap/root/buckets.js +5 -1
  102. package/dist/heatmap/root/heatmap-root.d.ts +47 -9
  103. package/dist/heatmap/root/heatmap-root.js +46 -18
  104. package/dist/icon/index.d.ts +2 -0
  105. package/dist/icon/index.js +2 -0
  106. package/dist/icon/registry.d.ts +37 -0
  107. package/dist/icon/registry.js +83 -0
  108. package/dist/icon/root/icon-root.d.ts +53 -6
  109. package/dist/icon/root/icon-root.js +72 -4
  110. package/dist/icon/root/index.d.ts +2 -0
  111. package/dist/icon/root/index.js +2 -0
  112. package/dist/icon/set.d.ts +1 -0
  113. package/dist/icon/set.js +3 -0
  114. package/dist/icon-button/root/icon-button-root.d.ts +1 -1
  115. package/dist/image/root/image-root.d.ts +23 -2
  116. package/dist/image/root/image-root.js +23 -4
  117. package/dist/input/root/input-root.d.ts +62 -9
  118. package/dist/input/root/input-root.js +61 -5
  119. package/dist/kbd/root/kbd-root.d.ts +26 -11
  120. package/dist/kbd/root/kbd-root.js +35 -38
  121. package/dist/kbd/shortcut.d.ts +18 -0
  122. package/dist/kbd/shortcut.js +35 -0
  123. package/dist/legend/hidden-series.d.ts +8 -0
  124. package/dist/legend/hidden-series.js +13 -0
  125. package/dist/legend/root/legend-root.d.ts +63 -0
  126. package/dist/legend/root/legend-root.js +61 -7
  127. package/dist/lightbox/item/lightbox-item.d.ts +17 -1
  128. package/dist/lightbox/item/lightbox-item.js +10 -1
  129. package/dist/lightbox/root/lightbox-root.d.ts +77 -6
  130. package/dist/lightbox/root/lightbox-root.js +116 -5
  131. package/dist/line-chart/root/line-chart-root.d.ts +29 -4
  132. package/dist/line-chart/root/line-chart-root.js +58 -17
  133. package/dist/list/item/list-item.d.ts +11 -5
  134. package/dist/list/item/list-item.js +5 -6
  135. package/dist/listbox/range.d.ts +17 -0
  136. package/dist/listbox/range.js +5 -0
  137. package/dist/listbox/root/listbox-root.d.ts +184 -4
  138. package/dist/listbox/root/listbox-root.js +229 -23
  139. package/dist/loader/busy.d.ts +17 -0
  140. package/dist/loader/busy.js +24 -0
  141. package/dist/loader/root/loader-root.d.ts +37 -0
  142. package/dist/loader/root/loader-root.js +52 -3
  143. package/dist/map/root/map-root.d.ts +19 -4
  144. package/dist/map/root/map-root.js +36 -7
  145. package/dist/megamenu/root/megamenu-root.d.ts +10 -1
  146. package/dist/megamenu/root/megamenu-root.js +10 -1
  147. package/dist/menu/item/menu-item.d.ts +41 -12
  148. package/dist/menu/item/menu-item.js +46 -3
  149. package/dist/menu/root/menu-root.d.ts +32 -2
  150. package/dist/menu/root/menu-root.js +48 -8
  151. package/dist/meter/root/meter-root.d.ts +13 -0
  152. package/dist/meter/root/meter-root.js +24 -5
  153. package/dist/navigation/root/navigation-root.d.ts +10 -2
  154. package/dist/navigation/root/navigation-root.js +13 -2
  155. package/dist/notifications/feed-keys.d.ts +10 -0
  156. package/dist/notifications/feed-keys.js +14 -0
  157. package/dist/notifications/group/notification-group.d.ts +1 -0
  158. package/dist/notifications/notification/notification.d.ts +29 -0
  159. package/dist/notifications/notification/notification.js +51 -3
  160. package/dist/notifications/root/notifications-root.d.ts +49 -0
  161. package/dist/notifications/root/notifications-root.js +76 -2
  162. package/dist/number-input/root/number-input-root.d.ts +109 -7
  163. package/dist/number-input/root/number-input-root.js +109 -21
  164. package/dist/object-inspector/root/object-inspector-root.d.ts +49 -5
  165. package/dist/object-inspector/root/object-inspector-root.js +92 -12
  166. package/dist/option/root/option-root.d.ts +58 -6
  167. package/dist/option/root/option-root.js +35 -5
  168. package/dist/outline/root/outline-root.d.ts +13 -2
  169. package/dist/outline/root/outline-root.js +4 -2
  170. package/dist/pagination/root/pagination-root.d.ts +19 -1
  171. package/dist/pagination/root/pagination-root.js +49 -9
  172. package/dist/pagination/size/pagination-size.d.ts +13 -3
  173. package/dist/pagination/size/pagination-size.js +7 -0
  174. package/dist/pin-input/format.d.ts +7 -0
  175. package/dist/pin-input/format.js +16 -0
  176. package/dist/pin-input/root/pin-input-root.d.ts +37 -0
  177. package/dist/pin-input/root/pin-input-root.js +48 -7
  178. package/dist/popover/root/popover-root.d.ts +78 -3
  179. package/dist/popover/root/popover-root.js +74 -5
  180. package/dist/progress/root/progress-root.d.ts +23 -1
  181. package/dist/progress/root/progress-root.js +40 -10
  182. package/dist/qr-code/export.d.ts +31 -0
  183. package/dist/qr-code/export.js +10 -0
  184. package/dist/qr-code/root/qr-code-root.d.ts +45 -0
  185. package/dist/qr-code/root/qr-code-root.js +78 -3
  186. package/dist/radio/group/radio-group.d.ts +64 -0
  187. package/dist/radio/group/radio-group.js +66 -12
  188. package/dist/radio/root/radio-root.d.ts +8 -5
  189. package/dist/radio/root/radio-root.js +1 -2
  190. package/dist/rating/root/rating-root.d.ts +49 -1
  191. package/dist/rating/root/rating-root.js +69 -10
  192. package/dist/scatter-chart/root/scatter-chart-root.d.ts +17 -3
  193. package/dist/scatter-chart/root/scatter-chart-root.js +40 -14
  194. package/dist/select/root/select-root.d.ts +93 -3
  195. package/dist/select/root/select-root.js +111 -13
  196. package/dist/skeleton/root/skeleton-root.d.ts +39 -3
  197. package/dist/skeleton/root/skeleton-root.js +33 -4
  198. package/dist/skip-link/root/skip-link-root.d.ts +10 -0
  199. package/dist/skip-link/root/skip-link-root.js +15 -1
  200. package/dist/slider/root/slider-root.d.ts +59 -2
  201. package/dist/slider/root/slider-root.js +82 -8
  202. package/dist/sparkline/root/sparkline-root.d.ts +9 -10
  203. package/dist/speed-dial/item/speed-dial-item.d.ts +11 -5
  204. package/dist/speed-dial/item/speed-dial-item.js +7 -2
  205. package/dist/speed-dial/root/speed-dial-root.d.ts +15 -4
  206. package/dist/speed-dial/root/speed-dial-root.js +19 -5
  207. package/dist/splitter/root/splitter-root.d.ts +28 -6
  208. package/dist/splitter/root/splitter-root.js +35 -1
  209. package/dist/stat/root/stat-root.d.ts +9 -1
  210. package/dist/stat/root/stat-root.js +15 -2
  211. package/dist/steps/root/steps-root.js +1 -1
  212. package/dist/steps/step/step.d.ts +1 -0
  213. package/dist/steps/step/step.js +1 -1
  214. package/dist/switch/root/switch-root.d.ts +14 -2
  215. package/dist/switch/root/switch-root.js +7 -1
  216. package/dist/table/cell/table-cell.d.ts +24 -4
  217. package/dist/table/cell/table-cell.js +21 -1
  218. package/dist/table/column/table-column.d.ts +32 -6
  219. package/dist/table/column/table-column.js +36 -6
  220. package/dist/table/root/table-root.d.ts +94 -3
  221. package/dist/table/root/table-root.js +128 -5
  222. package/dist/table/row/table-row.d.ts +7 -0
  223. package/dist/table/row/table-row.js +9 -1
  224. package/dist/tabs/root/tabs-root.d.ts +6 -1
  225. package/dist/tabs/root/tabs-root.js +6 -2
  226. package/dist/tag/group/tag-group.d.ts +107 -0
  227. package/dist/tag/group/tag-group.js +157 -0
  228. package/dist/tag/index.d.ts +1 -0
  229. package/dist/tag/index.js +1 -0
  230. package/dist/tag/root/tag-root.d.ts +83 -1
  231. package/dist/tag/root/tag-root.js +87 -17
  232. package/dist/tag/selection.d.ts +10 -0
  233. package/dist/tag/selection.js +12 -0
  234. package/dist/textarea/grow.d.ts +22 -0
  235. package/dist/textarea/grow.js +20 -0
  236. package/dist/textarea/root/textarea-root.d.ts +13 -0
  237. package/dist/textarea/root/textarea-root.js +10 -2
  238. package/dist/time-input/root/time-input-root.d.ts +71 -6
  239. package/dist/time-input/root/time-input-root.js +110 -44
  240. package/dist/time-picker/root/time-picker-root.d.ts +155 -26
  241. package/dist/time-picker/root/time-picker-root.js +192 -63
  242. package/dist/toast/hotkey.d.ts +22 -0
  243. package/dist/toast/hotkey.js +23 -0
  244. package/dist/toast/item/toast-item.d.ts +16 -1
  245. package/dist/toast/item/toast-item.js +41 -13
  246. package/dist/toast/root/toast-root.d.ts +105 -8
  247. package/dist/toast/root/toast-root.js +209 -4
  248. package/dist/toggle/group/toggle-group.d.ts +95 -16
  249. package/dist/toggle/group/toggle-group.js +99 -13
  250. package/dist/toggle/root/toggle-root.d.ts +26 -11
  251. package/dist/toggle/root/toggle-root.js +14 -6
  252. package/dist/toolbar/root/toolbar-root.d.ts +55 -15
  253. package/dist/toolbar/root/toolbar-root.js +99 -16
  254. package/dist/tooltip/focus-target.d.ts +6 -0
  255. package/dist/tooltip/focus-target.js +9 -0
  256. package/dist/tooltip/root/tooltip-root.d.ts +73 -15
  257. package/dist/tooltip/root/tooltip-root.js +96 -7
  258. package/dist/tour/naming.d.ts +30 -0
  259. package/dist/tour/naming.js +10 -0
  260. package/dist/tour/root/tour-root.d.ts +67 -3
  261. package/dist/tour/root/tour-root.js +105 -17
  262. package/dist/tour/stop/tour-stop.d.ts +65 -3
  263. package/dist/tour/stop/tour-stop.js +61 -11
  264. package/dist/tour/wait.d.ts +11 -0
  265. package/dist/tour/wait.js +19 -0
  266. package/dist/tree/item/tree-item.d.ts +21 -5
  267. package/dist/tree/item/tree-item.js +14 -4
  268. package/dist/tree/root/tree-root.d.ts +29 -5
  269. package/dist/tree/root/tree-root.js +64 -8
  270. package/dist/trend/root/trend-root.d.ts +36 -1
  271. package/dist/trend/root/trend-root.js +41 -15
  272. package/dist/video/root/keys.d.ts +5 -0
  273. package/dist/video/root/keys.js +13 -1
  274. package/dist/video/root/video-root.d.ts +19 -0
  275. package/dist/video/root/video-root.js +48 -4
  276. package/dist/video-playlist/menu/video-playlist-menu.d.ts +20 -2
  277. package/dist/video-playlist/menu/video-playlist-menu.js +27 -5
  278. package/dist/video-playlist/root/video-playlist-root.js +6 -3
  279. package/dist/virtual-list/root/virtual-list-root.d.ts +52 -4
  280. package/dist/virtual-list/root/virtual-list-root.js +103 -21
  281. package/lint.json +1 -1
  282. package/package.json +5 -5
  283. package/types/jsx.d.ts +9140 -1149
  284. package/types/svelte.d.ts +1 -0
  285. package/types/vue.d.ts +2089 -267
@@ -12,6 +12,8 @@ let HelixHeadlessLightboxItem = class HelixHeadlessLightboxItem extends HelixEle
12
12
  super(...arguments);
13
13
  this.current = false;
14
14
  this.label = '';
15
+ this.position = '';
16
+ this.roleLabel = '';
15
17
  this.value = '';
16
18
  }
17
19
  willUpdate(changed) {
@@ -22,7 +24,8 @@ let HelixHeadlessLightboxItem = class HelixHeadlessLightboxItem extends HelixEle
22
24
  return html `<div
23
25
  part="item"
24
26
  role="group"
25
- aria-label=${this.label || nothing}
27
+ aria-roledescription=${this.roleLabel || nothing}
28
+ aria-label=${this.label || this.position || nothing}
26
29
  ?hidden=${!this.current}
27
30
  >
28
31
  <slot></slot>
@@ -36,6 +39,12 @@ __decorate([
36
39
  __decorate([
37
40
  property()
38
41
  ], HelixHeadlessLightboxItem.prototype, "label", void 0);
42
+ __decorate([
43
+ property({ attribute: false })
44
+ ], HelixHeadlessLightboxItem.prototype, "position", void 0);
45
+ __decorate([
46
+ property({ attribute: false })
47
+ ], HelixHeadlessLightboxItem.prototype, "roleLabel", void 0);
39
48
  __decorate([
40
49
  property()
41
50
  ], HelixHeadlessLightboxItem.prototype, "value", void 0);
@@ -1,4 +1,4 @@
1
- import { CommandController, HelixElement } from '@fusion.dev/helix-core';
1
+ import { CommandController, HelixElement, SwipeController } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  declare const HelixHeadlessLightbox_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerActiveInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
4
4
  /**
@@ -18,9 +18,21 @@ declare const HelixHeadlessLightbox_base: (new (...args: any[]) => import("@fusi
18
18
  * holds the current item, as in `Tabs`. The arrow keys change the item while
19
19
  * focus stays in the dialog.
20
20
  *
21
+ * Set `controls` for the viewer's own previous, next and close controls, named
22
+ * by `previous-label`, `next-label` and `dismiss-label`. Without it, compose the
23
+ * chrome yourself in the `header` and `footer` slots, with buttons that send
24
+ * `--previous`, `--next` and `--close`.
25
+ *
26
+ * Each item is a slide: a `group` with the role description in
27
+ * `slide-role-label`, named by its `label` or by `slide-label`. A touch or a pen
28
+ * swiped across the picture shows the next or the previous item, the way the
29
+ * line of text runs.
30
+ *
21
31
  * The chrome hides when there is no input, through `IdleController`, and comes
22
- * back on a pointer move or a focus. `fullscreen` uses `FullscreenController`,
23
- * as `Video` does.
32
+ * back on a pointer move, a key press, or a focus. It stays while focus is on a
33
+ * control in the header or the footer, so a keyboard reader is never left on
34
+ * a control that has gone. `fullscreen` uses `FullscreenController`, as `Video`
35
+ * does. While the viewer is open, the page behind it does not scroll.
24
36
  *
25
37
  * @since 0.100.0
26
38
  * @status stable
@@ -37,10 +49,16 @@ declare const HelixHeadlessLightbox_base: (new (...args: any[]) => import("@fusi
37
49
  * @event {HelixBeforeActivateEvent} helix-before-activate - Fired before the shown item changes. Cancelable: cancel it to keep the current item. It is the only way to stop the change.
38
50
  * @event {HelixBeforeCloseEvent} helix-before-close - Fired before the viewer closes. Cancelable.
39
51
  * @event {HelixBeforeOpenEvent} helix-before-open - Fired before the viewer opens. Cancelable.
40
- * @event {Event} toggle - Fired when the viewer opens or closes, with `newState` and `oldState`.
52
+ * @event {ToggleEvent} toggle - Fired when the viewer opens or closes, with `newState` and `oldState`.
41
53
  *
42
54
  * @csspart dialog - The native dialog element.
55
+ * @csspart dismiss - The close control, drawn with `controls`.
56
+ * @csspart dismiss-mark - The glyph on the close control.
43
57
  * @csspart live - The live region that announces which item is shown.
58
+ * @csspart next - The control that shows the next item, drawn with `controls`.
59
+ * @csspart next-mark - The glyph on the next control.
60
+ * @csspart previous - The control that shows the previous item, drawn with `controls`.
61
+ * @csspart previous-mark - The glyph on the previous control.
44
62
  * @csspart viewport - The box the current item is shown in.
45
63
  *
46
64
  * @cssstate fullscreen - While the viewer fills the screen.
@@ -48,6 +66,20 @@ declare const HelixHeadlessLightbox_base: (new (...args: any[]) => import("@fusi
48
66
  * @cssstate open - While the viewer is open.
49
67
  */
50
68
  export declare class HelixHeadlessLightbox extends HelixHeadlessLightbox_base {
69
+ /**
70
+ * Draws the viewer's own previous, next and close controls over the picture.
71
+ *
72
+ * Off by default, for a viewer whose chrome you compose in the `header` and
73
+ * `footer` slots. The controls hide with the rest of the chrome while the
74
+ * reader is idle, and the previous and next ones say they are unavailable at
75
+ * either end of a set that does not `loop`.
76
+ */
77
+ controls: boolean;
78
+ /**
79
+ * The close control's accessible name. Translate it with the rest of your
80
+ * interface.
81
+ */
82
+ dismissLabel: string;
51
83
  /**
52
84
  * How long the user can be idle before the header and footer hide, in
53
85
  * milliseconds.
@@ -66,8 +98,27 @@ export declare class HelixHeadlessLightbox extends HelixHeadlessLightbox_base {
66
98
  */
67
99
  loop: boolean;
68
100
  /**
69
- * The status text that says which item is shown, with `{index}` and `{count}`
70
- * filled in.
101
+ * The next control's accessible name.
102
+ */
103
+ nextLabel: string;
104
+ /**
105
+ * The previous control's accessible name.
106
+ */
107
+ previousLabel: string;
108
+ /**
109
+ * The name of an item with no `label` of its own, with `{index}` and
110
+ * `{count}` filled in.
111
+ */
112
+ slideLabel: string;
113
+ /**
114
+ * The word screen readers announce in place of an item's role, set as
115
+ * `aria-roledescription`. Translate it with the rest of your text, or empty
116
+ * it to leave the role as `group`.
117
+ */
118
+ slideRoleLabel: string;
119
+ /**
120
+ * The status text that says which item is shown, with `{index}`, `{count}`
121
+ * and the item's `{label}` filled in.
71
122
  *
72
123
  * Announced rather than only drawn, because the picture changing under a
73
124
  * reader who cannot see it is otherwise silent. A consumer who has their own
@@ -80,8 +131,17 @@ export declare class HelixHeadlessLightbox extends HelixHeadlessLightbox_base {
80
131
  private filled;
81
132
  /** What the live region is currently saying. */
82
133
  private announcement;
134
+ protected readonly swipes: SwipeController;
83
135
  private readonly fullscreen;
84
136
  private readonly idle;
137
+ /**
138
+ * Whether focus is on something in the header or the footer.
139
+ *
140
+ * The styled tier hides both with `visibility: hidden` while idle, which
141
+ * takes focus off a control in them and drops it on the body, where the
142
+ * arrow keys no longer reach this element.
143
+ */
144
+ private chromeHasFocus;
85
145
  protected readonly commands: CommandController;
86
146
  /**
87
147
  * The items, read from the host.
@@ -156,6 +216,7 @@ export declare class HelixHeadlessLightbox extends HelixHeadlessLightbox_base {
156
216
  */
157
217
  private readonly handleBackdrop;
158
218
  protected willUpdate(changed: PropertyValues): void;
219
+ disconnectedCallback(): void;
159
220
  protected updated(changed: PropertyValues): void;
160
221
  /**
161
222
  * Tells each item whether it is the one being shown.
@@ -165,6 +226,8 @@ export declare class HelixHeadlessLightbox extends HelixHeadlessLightbox_base {
165
226
  * every set whose current item has just been removed.
166
227
  */
167
228
  private mark;
229
+ /** Whether a step that way would show nothing new, at the end of a set that does not loop. */
230
+ private atEnd;
168
231
  /**
169
232
  * Says where the reader is, once the reader has moved.
170
233
  *
@@ -174,6 +237,14 @@ export declare class HelixHeadlessLightbox extends HelixHeadlessLightbox_base {
174
237
  */
175
238
  private say;
176
239
  protected render(): TemplateResult;
240
+ /**
241
+ * The viewer's own controls, behind a seam a tier above can move.
242
+ *
243
+ * After the item in the order, so `Tab` from the viewer reaches the picture's
244
+ * content first. `aria-disabled` at the ends, and never `disabled`, so a
245
+ * control that has just shown the last picture keeps focus.
246
+ */
247
+ protected renderControls(): TemplateResult;
177
248
  }
178
249
  declare global {
179
250
  interface HTMLElementTagNameMap {
@@ -4,25 +4,46 @@ 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 { CommandController, customElement, FullscreenController, fillTemplate, HelixElement, hostAria, IdleController, inlineStep, keyClaimed, MixinControllerActive, MixinControllerOpen, resolveActiveItem, } from '@fusion.dev/helix-core';
7
+ import { CommandController, customElement, deepActiveElement, deepContains, FullscreenController, fillTemplate, HelixElement, hostAria, IdleController, inlineStep, isRtl, keyClaimed, lockScroll, MixinControllerActive, MixinControllerOpen, resolveActiveItem, SwipeController, swipeStep, unlockScroll, whenHydrated, } from '@fusion.dev/helix-core';
8
+ import { caretLeft, caretRight, x } from '@fusion.dev/helix-icons';
8
9
  import { html, nothing } from 'lit';
9
10
  import { property, state } from 'lit/decorators.js';
11
+ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
10
12
  import { HelixHeadlessLightboxItem } from '../item/lightbox-item.js';
11
13
  let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerActive(MixinControllerOpen(HelixElement)) {
12
14
  constructor() {
13
15
  super(...arguments);
16
+ this.controls = false;
17
+ this.dismissLabel = 'Close';
14
18
  this.idleDelay = 0;
15
19
  this.label = '';
16
20
  this.loop = false;
21
+ this.nextLabel = 'Next';
22
+ this.previousLabel = 'Previous';
23
+ this.slideLabel = '{index} of {count}';
24
+ this.slideRoleLabel = 'slide';
17
25
  this.statusLabel = '{index} of {count}';
18
26
  this.resting = false;
19
27
  this.filled = false;
20
28
  this.announcement = '';
29
+ this.swipes = new SwipeController(this, {
30
+ axis: () => (this.open ? 'x' : undefined),
31
+ end: (dx, _dy, vx) => {
32
+ const width = this.partNamed('viewport')?.getBoundingClientRect().width ?? 0;
33
+ const step = swipeStep(dx, vx, width, isRtl(this));
34
+ if (step !== 0) {
35
+ this.step(step);
36
+ }
37
+ },
38
+ move: () => this.idle.stir(),
39
+ start: (_target, event) => event.pointerType !== 'mouse',
40
+ surface: () => this.dialog,
41
+ });
21
42
  this.fullscreen = new FullscreenController(this, (full) => {
22
43
  this.filled = full;
23
44
  });
24
45
  this.idle = new IdleController(this, () => this.idleDelay, (resting) => {
25
- this.resting = resting;
46
+ this.resting = resting && !this.chromeHasFocus();
26
47
  });
27
48
  this.commands = new CommandController(this, {
28
49
  commands: {
@@ -45,6 +66,7 @@ let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerA
45
66
  this.relayNativeEvent(event);
46
67
  };
47
68
  this.handleKeydown = (event) => {
69
+ this.idle.stir();
48
70
  if (keyClaimed(event) || event.altKey || event.ctrlKey || event.metaKey) {
49
71
  return;
50
72
  }
@@ -81,6 +103,12 @@ let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerA
81
103
  this.requestOpen(false);
82
104
  };
83
105
  }
106
+ chromeHasFocus() {
107
+ const active = deepActiveElement();
108
+ const own = this.shadowRoot?.activeElement?.matches('[part="previous"], [part="next"], [part="dismiss"]');
109
+ return (own === true ||
110
+ this.knownChildren.some((child) => (child.slot === 'header' || child.slot === 'footer') && deepContains(child, active)));
111
+ }
84
112
  get items() {
85
113
  return this.knownChildren.filter((child) => child instanceof HelixHeadlessLightboxItem);
86
114
  }
@@ -135,9 +163,19 @@ let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerA
135
163
  this.toggleState('idle', this.resting);
136
164
  this.say(changed);
137
165
  }
166
+ disconnectedCallback() {
167
+ super.disconnectedCallback();
168
+ unlockScroll(this);
169
+ }
138
170
  updated(changed) {
139
171
  super.updated(changed);
140
172
  this.mark();
173
+ if (this.open) {
174
+ lockScroll(this);
175
+ }
176
+ else {
177
+ unlockScroll(this);
178
+ }
141
179
  const dialog = this.dialog;
142
180
  if (!dialog) {
143
181
  return;
@@ -154,9 +192,23 @@ let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerA
154
192
  mark() {
155
193
  const items = this.items;
156
194
  const current = resolveActiveItem(this.active, items);
157
- for (const item of items) {
195
+ items.forEach((item, at) => {
158
196
  item.current = item === current;
159
- }
197
+ whenHydrated(item, () => {
198
+ item.position = fillTemplate(this.slideLabel, {
199
+ count: items.length,
200
+ index: at + 1,
201
+ label: item.label,
202
+ });
203
+ item.roleLabel = this.slideRoleLabel;
204
+ });
205
+ });
206
+ }
207
+ atEnd(by) {
208
+ const items = this.items;
209
+ const shown = this.shown;
210
+ const at = shown ? items.indexOf(shown) : 0;
211
+ return !this.loop && (items.length === 0 || (by === 1 ? at >= items.length - 1 : at <= 0));
160
212
  }
161
213
  say(changed) {
162
214
  if (!changed.has('active') && !changed.has('open')) {
@@ -170,7 +222,13 @@ let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerA
170
222
  const current = resolveActiveItem(this.active, items);
171
223
  const at = current ? items.indexOf(current) : -1;
172
224
  this.announcement =
173
- at === -1 ? '' : fillTemplate(this.statusLabel, { count: items.length, index: at + 1 });
225
+ at === -1 || !current
226
+ ? ''
227
+ : fillTemplate(this.statusLabel, {
228
+ count: items.length,
229
+ index: at + 1,
230
+ label: current.label,
231
+ });
174
232
  }
175
233
  render() {
176
234
  return html `<dialog
@@ -191,10 +249,51 @@ let HelixHeadlessLightbox = class HelixHeadlessLightbox extends MixinControllerA
191
249
  <slot></slot>
192
250
  </div>
193
251
  <slot name="footer"></slot>
252
+ ${this.controls ? this.renderControls() : nothing}
194
253
  <span part="live" role="status" aria-live="polite">${this.announcement || nothing}</span>
195
254
  </dialog>`;
196
255
  }
256
+ renderControls() {
257
+ return html `<button
258
+ part="previous"
259
+ type="button"
260
+ aria-label=${this.previousLabel}
261
+ aria-disabled=${this.atEnd(-1) ? 'true' : nothing}
262
+ @click=${() => this.previous()}
263
+ >
264
+ <svg part="previous-mark" data-mirror fill="currentColor" viewBox=${caretLeft.viewBox} aria-hidden="true">
265
+ ${unsafeSVG(caretLeft.content)}
266
+ </svg>
267
+ </button>
268
+ <button
269
+ part="next"
270
+ type="button"
271
+ aria-label=${this.nextLabel}
272
+ aria-disabled=${this.atEnd(1) ? 'true' : nothing}
273
+ @click=${() => this.next()}
274
+ >
275
+ <svg part="next-mark" data-mirror fill="currentColor" viewBox=${caretRight.viewBox} aria-hidden="true">
276
+ ${unsafeSVG(caretRight.content)}
277
+ </svg>
278
+ </button>
279
+ <button
280
+ part="dismiss"
281
+ type="button"
282
+ aria-label=${this.dismissLabel}
283
+ @click=${() => this.close()}
284
+ >
285
+ <svg part="dismiss-mark" fill="currentColor" viewBox=${x.viewBox} aria-hidden="true">
286
+ ${unsafeSVG(x.content)}
287
+ </svg>
288
+ </button>`;
289
+ }
197
290
  };
291
+ __decorate([
292
+ property({ reflect: true, type: Boolean })
293
+ ], HelixHeadlessLightbox.prototype, "controls", void 0);
294
+ __decorate([
295
+ property({ attribute: 'dismiss-label' })
296
+ ], HelixHeadlessLightbox.prototype, "dismissLabel", void 0);
198
297
  __decorate([
199
298
  property({ attribute: 'idle-delay', type: Number })
200
299
  ], HelixHeadlessLightbox.prototype, "idleDelay", void 0);
@@ -204,6 +303,18 @@ __decorate([
204
303
  __decorate([
205
304
  property({ reflect: true, type: Boolean })
206
305
  ], HelixHeadlessLightbox.prototype, "loop", void 0);
306
+ __decorate([
307
+ property({ attribute: 'next-label' })
308
+ ], HelixHeadlessLightbox.prototype, "nextLabel", void 0);
309
+ __decorate([
310
+ property({ attribute: 'previous-label' })
311
+ ], HelixHeadlessLightbox.prototype, "previousLabel", void 0);
312
+ __decorate([
313
+ property({ attribute: 'slide-label' })
314
+ ], HelixHeadlessLightbox.prototype, "slideLabel", void 0);
315
+ __decorate([
316
+ property({ attribute: 'slide-role-label' })
317
+ ], HelixHeadlessLightbox.prototype, "slideRoleLabel", void 0);
207
318
  __decorate([
208
319
  property({ attribute: 'status-label' })
209
320
  ], HelixHeadlessLightbox.prototype, "statusLabel", void 0);
@@ -23,8 +23,15 @@ declare const HelixHeadlessLineChart_base: typeof HelixElement & (new (...args:
23
23
  * `<svg>` that fills its box scales with the box, so the same `font-size` can
24
24
  * render at 10px in a narrow chart and 43px in a wide one.
25
25
  *
26
- * The table is the accessible representation, and the drawing is `aria-hidden`.
27
- * Screen reader users get the numbers.
26
+ * The table is the accessible representation, and the drawing is hidden from
27
+ * screen readers, who get the numbers. The `summary` part names the chart, from
28
+ * `label` or the table's caption, and gives each series' latest reading.
29
+ *
30
+ * **The plot is read by key.** It takes focus, named by `label` or the caption.
31
+ * The left and right arrows move from reading to reading, Home and End go to
32
+ * the first and the last, and the up and down arrows move among the series of
33
+ * a reading. The tooltip follows, the `live` part says the reading in words,
34
+ * and Escape puts the tooltip away.
28
35
  *
29
36
  * @since 0.1.0
30
37
  * @status stable
@@ -40,8 +47,10 @@ declare const HelixHeadlessLineChart_base: typeof HelixElement & (new (...args:
40
47
  * @csspart label - One reading's name.
41
48
  * @csspart labels - The row of reading names.
42
49
  * @csspart line - The line for one series.
50
+ * @csspart live - The readout: a polite live region that says the reading the keys moved to. Hide it visually.
43
51
  * @csspart mark - The invisible point the tooltip is anchored to.
44
- * @csspart plot - The drawing.
52
+ * @csspart plot - The drawing, which takes focus to be read by key.
53
+ * @csspart summary - The chart's name and each series' latest reading, written as a sentence for screen readers. Hide it visually.
45
54
  * @csspart svg - The drawing surface the lines and areas sit on.
46
55
  * @csspart terminus - The mark on one series' last reading.
47
56
  * @csspart tooltip - The bubble, forwarded from `Tooltip`.
@@ -53,6 +62,7 @@ declare const HelixHeadlessLineChart_base: typeof HelixElement & (new (...args:
53
62
  * @csspart tooltip-arrow-top - The point while the bubble is above the reading, so on its bottom edge, beside `tooltip-arrow`.
54
63
  * @csspart tooltip-bottom - The bubble while it is below the reading, beside `tooltip`.
55
64
  * @csspart tooltip-cell - One column's name and value inside the tooltip.
65
+ * @csspart tooltip-cell-current - The cell the up and down arrows rest on, while they rest there. Set alongside `tooltip-cell`.
56
66
  * @csspart tooltip-label - The reading's own name inside the tooltip.
57
67
  * @csspart tooltip-left - The bubble while it is left of the reading, beside `tooltip`.
58
68
  * @csspart tooltip-name - A column's name inside the tooltip.
@@ -183,6 +193,16 @@ export declare class HelixHeadlessLineChart extends HelixHeadlessLineChart_base
183
193
  */
184
194
  private ends;
185
195
  protected render(): TemplateResult;
196
+ /**
197
+ * What a reader who cannot see the lines is told: the chart's name and the
198
+ * latest reading of each series.
199
+ *
200
+ * The latest, because where a series ended is the question a line over time
201
+ * is asked first, which is what `AreaChart` gives too. Each series' own last
202
+ * reading, so a series with a blank in the last row still says where it was.
203
+ * Written the way the table writes it, such as `$128k` for `128000`.
204
+ */
205
+ protected renderSummary(series: Series[]): TemplateResult;
186
206
  /**
187
207
  * The lines themselves, behind a seam the styled tier can move.
188
208
  *
@@ -235,7 +255,12 @@ export declare class HelixHeadlessLineChart extends HelixHeadlessLineChart_base
235
255
  x: number;
236
256
  y: number;
237
257
  }>): TemplateResult | typeof nothing;
238
- /** One series, its wash first so the line is drawn over its own fill. */
258
+ /**
259
+ * One series, its wash first so the line is drawn over its own fill.
260
+ *
261
+ * Each reading sits at its own row, and the line breaks where a row has no
262
+ * reading: a line drawn across a blank claims a value nobody measured.
263
+ */
239
264
  protected renderSeries(one: Series, depth: number, x: (value: number) => number, y: (value: number) => number): TemplateResult;
240
265
  /**
241
266
  * The reading names, as HTML beside the drawing rather than inside it.
@@ -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 { CHART_PLOT, customElement, drawTooltip, extent, HelixElement, linear, linePath, MixinChartSource, PLOT_HEIGHT, PLOT_WIDTH, seriesIndex, ticks, } from '@fusion.dev/helix-core';
7
+ import { byRow, CHART_PLOT, customElement, drawTooltip, extent, HelixElement, linear, linePath, MixinChartSource, PLOT_HEIGHT, PLOT_WIDTH, seriesIndex, ticks, unbroken, } from '@fusion.dev/helix-core';
8
8
  import { html, nothing, svg } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  import '../../tooltip/index.js';
@@ -21,20 +21,25 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
21
21
  return this.gridlines === 'both' || this.gridlines === 'category';
22
22
  }
23
23
  range(series) {
24
- const values = series.flatMap((one) => one.points.map((point) => point.value));
24
+ const values = series
25
+ .filter((one) => this.showsSeries(one.name))
26
+ .flatMap((one) => one.points.map((point) => point.value));
25
27
  const [low, high] = extent(values.length > 0 ? values : [0]);
26
28
  return this.zero ? [Math.min(0, low), Math.max(0, high)] : [low, high];
27
29
  }
28
30
  ends(series, x, y) {
29
31
  return series.flatMap((one, depth) => {
30
32
  const last = one.points.at(-1);
33
+ if (!this.showsSeries(one.name)) {
34
+ return [];
35
+ }
31
36
  if (!last || one.points.length < 2) {
32
37
  return [];
33
38
  }
34
39
  return [
35
40
  {
36
41
  index: seriesIndex(depth),
37
- x: (x(one.points.length - 1) / PLOT_WIDTH) * 100,
42
+ x: (x(last.at) / PLOT_WIDTH) * 100,
38
43
  y: (y(last.value) / PLOT_HEIGHT) * 100,
39
44
  },
40
45
  ];
@@ -42,7 +47,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
42
47
  }
43
48
  render() {
44
49
  const series = this.series;
45
- const readings = series[0]?.points.map((point) => point.label) ?? [];
50
+ const readings = series.length === 0 ? [] : this.sourceRows.map((row) => row.label);
46
51
  if (readings.length === 0) {
47
52
  return html `<div id=${CHART_PLOT} part="plot"></div>`;
48
53
  }
@@ -50,7 +55,25 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
50
55
  const y = linear(domain, [PLOT_HEIGHT, 0]);
51
56
  const slot = PLOT_WIDTH / readings.length;
52
57
  const x = linear([0, Math.max(readings.length - 1, 1)], [slot / 2, PLOT_WIDTH - slot / 2]);
53
- return html `${this.renderPlot(series, x, y, domain)} ${this.renderLabels(readings)}`;
58
+ return html `${this.renderPlot(series, x, y, domain)} ${this.renderLabels(readings)}${this.renderSummary(series)}`;
59
+ }
60
+ renderSummary(series) {
61
+ const rows = this.sourceRows;
62
+ const columns = this.plottedColumns;
63
+ const latest = series.flatMap((one, depth) => {
64
+ const last = one.points.at(-1);
65
+ if (last === undefined) {
66
+ return [];
67
+ }
68
+ const text = rows[last.at]?.cells[columns[depth] ?? -1]?.text ?? String(last.value);
69
+ return [{ label: last.label, reading: `${one.name} ${text}` }];
70
+ });
71
+ const shared = latest.every((one) => one.label === latest[0]?.label);
72
+ const body = shared
73
+ ? `${latest[0]?.label ?? ''}: ${latest.map((one) => one.reading).join(', ')}`
74
+ : latest.map((one) => `${one.label}: ${one.reading}`).join('; ');
75
+ const named = this.named ? `${this.named}, ` : '';
76
+ return html `<p id="helix-chart-summary" part="summary">${named}${body}.</p>`;
54
77
  }
55
78
  renderPlot(series, x, y, domain) {
56
79
  const floor = domain[0] <= 0 && domain[1] >= 0 ? y(0) : undefined;
@@ -61,22 +84,27 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
61
84
  .join(', ')
62
85
  : undefined;
63
86
  return html `<div
64
- aria-hidden="true"
87
+ aria-describedby=${this.named ? 'helix-chart-summary' : nothing}
88
+ aria-label=${this.named || nothing}
89
+ aria-labelledby=${this.named ? nothing : 'helix-chart-summary'}
65
90
  id=${CHART_PLOT}
66
91
  part="plot"
92
+ role="application"
93
+ tabindex="0"
67
94
  style=${holes ? `--_line-chart-holes: ${holes}` : nothing}
68
95
  >
69
96
  <svg part="svg"
97
+ aria-hidden="true"
70
98
  data-mirror
71
99
  preserveAspectRatio="none"
72
100
  viewBox="0 0 ${PLOT_WIDTH} ${PLOT_HEIGHT}"
73
101
  xmlns="http://www.w3.org/2000/svg"
74
102
  >
75
- ${this.renderGridlines(x, y, domain, series[0]?.points.length ?? 0)}
103
+ ${this.renderGridlines(x, y, domain, this.readings)}
76
104
  ${floor === undefined
77
105
  ? nothing
78
106
  : svg `<line part="baseline" x1="0" x2=${PLOT_WIDTH} y1=${floor} y2=${floor} />`}
79
- ${this.renderBand(series[0]?.points.length ?? 0)}
107
+ ${this.renderBand(this.readings)}
80
108
  ${this.renderGuide(x)}
81
109
  ${series.map((one, depth) => this.renderSeries(one, depth, x, y))}
82
110
  </svg>
@@ -122,15 +150,27 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
122
150
  ></span>`)}`;
123
151
  }
124
152
  renderSeries(one, depth, x, y) {
125
- const points = one.points.map((point, index) => [x(index), y(point.value)]);
126
- const path = linePath(points, this.curve ?? 'smooth');
127
- if (path === '') {
153
+ if (!this.showsSeries(one.name)) {
154
+ return html `${nothing}`;
155
+ }
156
+ const runs = unbroken(one)
157
+ .map((run) => {
158
+ const points = run.map((point) => [x(point.at), y(point.value)]);
159
+ return { path: linePath(points, this.curve ?? 'smooth'), points };
160
+ })
161
+ .filter((run) => run.path !== '');
162
+ if (runs.length === 0) {
128
163
  return html `${nothing}`;
129
164
  }
130
165
  const index = seriesIndex(depth);
131
- const first = points[0];
132
- const last = points.at(-1);
133
- const wash = `${path}L${last[0]},${PLOT_HEIGHT}L${first[0]},${PLOT_HEIGHT}Z`;
166
+ const path = runs.map((run) => run.path).join('');
167
+ const wash = runs
168
+ .map((run) => {
169
+ const first = run.points[0];
170
+ const last = run.points.at(-1);
171
+ return `${run.path}L${last[0]},${PLOT_HEIGHT}L${first[0]},${PLOT_HEIGHT}Z`;
172
+ })
173
+ .join('');
134
174
  return svg `${this.area
135
175
  ? svg `<path
136
176
  d=${wash}
@@ -155,12 +195,13 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
155
195
  const at = this.pointer.at;
156
196
  const series = this.series;
157
197
  if (at < 0 || series.length === 0) {
158
- return drawTooltip(this.sourceRows, at, this.tag('tooltip'));
198
+ return drawTooltip(this.sourceRows, at, this.tag('tooltip'), undefined, undefined, this.pointer);
159
199
  }
160
200
  const domain = this.range(series);
161
201
  const scale = linear(domain, [PLOT_HEIGHT, 0]);
162
202
  const tops = series
163
- .map((one) => one.points[at]?.value)
203
+ .filter((one) => this.showsSeries(one.name))
204
+ .map((one) => byRow(one, this.readings)[at]?.value)
164
205
  .filter((one) => one !== undefined)
165
206
  .map((one) => scale(one));
166
207
  const slot = 100 / this.readings;
@@ -168,7 +209,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartSour
168
209
  placement: 'top',
169
210
  x: `${at * slot + slot / 2}%`,
170
211
  y: `${tops.length > 0 ? Math.min(...tops) : 0}%`,
171
- }, (cell) => this.seriesOf(cell));
212
+ }, (cell) => this.seriesOf(cell), this.pointer);
172
213
  }
173
214
  };
174
215
  __decorate([
@@ -6,11 +6,16 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
6
6
  * @description
7
7
  * Provides layout and semantics. The row is a target only when you set `href`.
8
8
  *
9
- * **`href` makes the whole row a link.** The component wraps its own layout in
10
- * an `<a part="row">`, as `Tree.Item` does. An anchor of your own cannot wrap
11
- * slots it does not own. With the anchor, the whole row is a target, Enter
12
- * follows it, middle click opens a new tab, the status bar shows the
13
- * destination, and all of it works before JavaScript runs.
9
+ * **`href` makes the row a link.** The component wraps the leading content,
10
+ * the label, and the description in an `<a part="link">` inside the row, as
11
+ * `Tree.Item` does. An anchor of your own cannot wrap slots it does not own.
12
+ * With the anchor, the row is a target, Enter follows it, middle click opens a
13
+ * new tab, the status bar shows the destination, and all of it works before
14
+ * JavaScript runs.
15
+ *
16
+ * **The `end` slot sits beside the link, outside it**, so a button or a menu
17
+ * there is a control of its own: a click on it does not follow the link, and
18
+ * its name is not part of the link's.
14
19
  *
15
20
  * Client-side routing needs your own handling. A router cannot render its
16
21
  * anchor inside the shadow root, so to navigate without a page load, intercept
@@ -30,6 +35,7 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
30
35
  * @slot end - Trailing content.
31
36
  * @slot start - Leading content, usually an icon or an avatar.
32
37
  *
38
+ * @csspart link - The link, when the row has `href`. It holds every region except `end`.
33
39
  * @csspart row - The row's layout. It sits inside the host so the host can carry a list marker.
34
40
  */
35
41
  export declare class HelixHeadlessListItem extends HelixElement {
@@ -24,17 +24,16 @@ let HelixHeadlessListItem = class HelixHeadlessListItem extends HelixElement {
24
24
  render() {
25
25
  const content = html `${this.renderRail()}<slot name="start"></slot>
26
26
  <slot></slot>
27
- <slot name="description"></slot>
28
- <slot name="end"></slot>`;
27
+ <slot name="description"></slot>`;
29
28
  return this.href === ''
30
- ? html `<div part="row">${content}</div>`
31
- : html `<a
32
- part="row"
29
+ ? html `<div part="row">${content}<slot name="end"></slot></div>`
30
+ : html `<div part="row"><a
31
+ part="link"
33
32
  href=${this.href}
34
33
  target=${this.target || nothing}
35
34
  rel=${this.rel || nothing}
36
35
  >${content}</a
37
- >`;
36
+ ><slot name="end"></slot></div>`;
38
37
  }
39
38
  };
40
39
  __decorate([