@fusion.dev/helix-headless 0.145.0 → 0.147.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 (343) hide show
  1. package/custom-elements.json +12286 -4281
  2. package/dist/accordion/item/accordion-item.d.ts +51 -18
  3. package/dist/accordion/item/accordion-item.js +45 -13
  4. package/dist/accordion/root/accordion-root.d.ts +16 -7
  5. package/dist/accordion/root/accordion-root.js +3 -3
  6. package/dist/announcement/root/announcement-root.d.ts +16 -6
  7. package/dist/announcement/root/announcement-root.js +37 -7
  8. package/dist/app-header/root/app-header-root.d.ts +7 -2
  9. package/dist/app-header/root/app-header-root.js +9 -1
  10. package/dist/app-header/sectioning.d.ts +3 -1
  11. package/dist/app-header/sectioning.js +3 -2
  12. package/dist/area-chart/root/area-chart-root.d.ts +18 -1
  13. package/dist/area-chart/root/area-chart-root.js +11 -3
  14. package/dist/avatar/group/avatar-group.d.ts +20 -14
  15. package/dist/avatar/group/avatar-group.js +17 -19
  16. package/dist/avatar/root/avatar-root.d.ts +31 -1
  17. package/dist/avatar/root/avatar-root.js +11 -1
  18. package/dist/badge/root/badge-root.d.ts +60 -7
  19. package/dist/badge/root/badge-root.js +89 -6
  20. package/dist/bar-chart/root/bar-chart-root.d.ts +18 -1
  21. package/dist/bar-chart/root/bar-chart-root.js +48 -20
  22. package/dist/bar-chart/stack.d.ts +25 -0
  23. package/dist/bar-chart/stack.js +27 -0
  24. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +14 -0
  25. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +12 -2
  26. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +25 -0
  27. package/dist/breadcrumbs/root/breadcrumbs-root.js +51 -4
  28. package/dist/button/root/button-root.d.ts +50 -38
  29. package/dist/button/root/button-root.js +42 -53
  30. package/dist/button/submitter.d.ts +27 -0
  31. package/dist/button/submitter.js +25 -0
  32. package/dist/button-group/root/button-group-root.d.ts +2 -1
  33. package/dist/button-group/root/button-group-root.js +5 -1
  34. package/dist/canvas/node/canvas-node.d.ts +4 -3
  35. package/dist/canvas/node/canvas-node.js +3 -2
  36. package/dist/canvas/root/canvas-root.js +2 -2
  37. package/dist/card/root/card-root.d.ts +36 -4
  38. package/dist/card/root/card-root.js +29 -10
  39. package/dist/carousel/root/carousel-root.d.ts +43 -4
  40. package/dist/carousel/root/carousel-root.js +40 -12
  41. package/dist/carousel/stops.d.ts +20 -0
  42. package/dist/carousel/stops.js +30 -0
  43. package/dist/chat/message/chat-message.js +5 -4
  44. package/dist/chat/naming.d.ts +5 -1
  45. package/dist/chat/naming.js +4 -2
  46. package/dist/chat/root/chat-root.d.ts +40 -4
  47. package/dist/chat/root/chat-root.js +32 -6
  48. package/dist/checkbox/root/checkbox-root.d.ts +20 -0
  49. package/dist/checkbox/root/checkbox-root.js +18 -7
  50. package/dist/checkbox-group/root/checkbox-group-root.d.ts +8 -2
  51. package/dist/checkbox-group/root/checkbox-group-root.js +14 -11
  52. package/dist/checkbox-group/select-all.d.ts +21 -0
  53. package/dist/checkbox-group/select-all.js +7 -0
  54. package/dist/code-block/highlight.d.ts +15 -0
  55. package/dist/code-block/highlight.js +4 -0
  56. package/dist/code-block/root/code-block-root.d.ts +79 -10
  57. package/dist/code-block/root/code-block-root.js +74 -5
  58. package/dist/color-input/root/color-input-root.d.ts +14 -0
  59. package/dist/color-input/root/color-input-root.js +17 -7
  60. package/dist/color-picker/channels.js +1 -2
  61. package/dist/color-picker/root/color-picker-root.d.ts +53 -16
  62. package/dist/color-picker/root/color-picker-root.js +155 -46
  63. package/dist/color-picker/wheel.d.ts +17 -0
  64. package/dist/color-picker/wheel.js +6 -0
  65. package/dist/combobox/root/combobox-root.d.ts +56 -0
  66. package/dist/combobox/root/combobox-root.js +92 -15
  67. package/dist/command/root/command-root.d.ts +19 -2
  68. package/dist/command/root/command-root.js +24 -23
  69. package/dist/copy-button/root/copy-button-root.d.ts +21 -1
  70. package/dist/copy-button/root/copy-button-root.js +16 -4
  71. package/dist/data-table/index.d.ts +1 -1
  72. package/dist/data-table/index.js +1 -1
  73. package/dist/data-table/keys.d.ts +6 -0
  74. package/dist/data-table/keys.js +14 -0
  75. package/dist/data-table/root/data-table-root.d.ts +27 -18
  76. package/dist/data-table/root/data-table-root.js +31 -57
  77. package/dist/data-table/tree.d.ts +16 -1
  78. package/dist/data-table/tree.js +2 -3
  79. package/dist/date-input/root/date-input-root.d.ts +11 -2
  80. package/dist/date-input/root/date-input-root.js +26 -12
  81. package/dist/date-picker/root/date-picker-root.d.ts +14 -9
  82. package/dist/date-picker/root/date-picker-root.js +33 -22
  83. package/dist/description-list/item/description-list-item.d.ts +18 -4
  84. package/dist/description-list/item/description-list-item.js +8 -4
  85. package/dist/dialog/description.js +15 -1
  86. package/dist/dialog/root/dialog-root.d.ts +8 -2
  87. package/dist/dialog/root/dialog-root.js +16 -1
  88. package/dist/divider/root/divider-root.d.ts +3 -0
  89. package/dist/divider/root/divider-root.js +2 -1
  90. package/dist/donut-chart/root/donut-chart-root.d.ts +31 -0
  91. package/dist/donut-chart/root/donut-chart-root.js +55 -1
  92. package/dist/donut-chart/slice-label.d.ts +35 -0
  93. package/dist/donut-chart/slice-label.js +11 -0
  94. package/dist/drawer/reveal.d.ts +8 -0
  95. package/dist/drawer/reveal.js +1 -0
  96. package/dist/drawer/root/drawer-root.d.ts +63 -2
  97. package/dist/drawer/root/drawer-root.js +75 -4
  98. package/dist/drilldown/item/drilldown-item.d.ts +21 -1
  99. package/dist/drilldown/item/drilldown-item.js +40 -5
  100. package/dist/drilldown/root/drilldown-root.d.ts +21 -3
  101. package/dist/drilldown/root/drilldown-root.js +22 -3
  102. package/dist/element-events.generated.js +35 -6
  103. package/dist/empty/root/empty-root.d.ts +34 -2
  104. package/dist/empty/root/empty-root.js +26 -4
  105. package/dist/file-input/root/file-input-root.d.ts +99 -8
  106. package/dist/file-input/root/file-input-root.js +120 -22
  107. package/dist/file-input/screen.d.ts +2 -1
  108. package/dist/file-input/status.d.ts +24 -0
  109. package/dist/file-input/status.js +10 -0
  110. package/dist/filter-input/chip/filter-chip.d.ts +23 -0
  111. package/dist/filter-input/chip/filter-chip.js +11 -2
  112. package/dist/filter-input/menu/filter-menu.d.ts +2 -0
  113. package/dist/filter-input/menu/filter-menu.js +12 -4
  114. package/dist/filter-input/root/filter-input-root.d.ts +38 -6
  115. package/dist/filter-input/root/filter-input-root.js +18 -28
  116. package/dist/filter-input/suggest.d.ts +28 -3
  117. package/dist/filter-input/suggest.js +18 -8
  118. package/dist/format-date/options.d.ts +3 -4
  119. package/dist/format-date/options.js +2 -2
  120. package/dist/format-date/root/format-date-root.d.ts +27 -17
  121. package/dist/format-date/root/format-date-root.js +27 -48
  122. package/dist/heatmap/root/buckets.d.ts +21 -0
  123. package/dist/heatmap/root/buckets.js +34 -0
  124. package/dist/heatmap/root/heatmap-root.d.ts +83 -11
  125. package/dist/heatmap/root/heatmap-root.js +104 -12
  126. package/dist/icon/index.d.ts +1 -1
  127. package/dist/icon/index.js +1 -1
  128. package/dist/icon/registry.d.ts +26 -1
  129. package/dist/icon/registry.js +12 -1
  130. package/dist/icon/root/icon-root.d.ts +25 -1
  131. package/dist/icon/root/icon-root.js +44 -12
  132. package/dist/icon/root/index.d.ts +1 -1
  133. package/dist/icon/root/index.js +1 -1
  134. package/dist/icon/settle.d.ts +7 -0
  135. package/dist/icon/settle.js +10 -0
  136. package/dist/icon-button/root/icon-button-root.d.ts +2 -0
  137. package/dist/image/root/image-root.d.ts +14 -1
  138. package/dist/image/root/image-root.js +7 -2
  139. package/dist/input/root/input-root.d.ts +34 -3
  140. package/dist/input/root/input-root.js +17 -4
  141. package/dist/kbd/keys.d.ts +29 -0
  142. package/dist/kbd/keys.js +52 -0
  143. package/dist/kbd/root/kbd-root.d.ts +52 -1
  144. package/dist/kbd/root/kbd-root.js +40 -47
  145. package/dist/legend/hidden-series.d.ts +10 -2
  146. package/dist/legend/hidden-series.js +5 -2
  147. package/dist/legend/root/legend-root.d.ts +77 -12
  148. package/dist/legend/root/legend-root.js +71 -17
  149. package/dist/lightbox/root/lightbox-root.d.ts +98 -10
  150. package/dist/lightbox/root/lightbox-root.js +153 -18
  151. package/dist/lightbox/zoom-controller.d.ts +59 -0
  152. package/dist/lightbox/zoom-controller.js +128 -0
  153. package/dist/lightbox/zoom.d.ts +24 -0
  154. package/dist/lightbox/zoom.js +18 -0
  155. package/dist/line-chart/root/line-chart-root.d.ts +38 -1
  156. package/dist/line-chart/root/line-chart-root.js +31 -3
  157. package/dist/list/item/list-item.d.ts +2 -0
  158. package/dist/list/item/list-item.js +11 -2
  159. package/dist/list/root/list-root.d.ts +70 -13
  160. package/dist/list/root/list-root.js +91 -13
  161. package/dist/list/selection.d.ts +54 -7
  162. package/dist/list/selection.js +32 -7
  163. package/dist/listbox/root/listbox-root.d.ts +44 -4
  164. package/dist/listbox/root/listbox-root.js +72 -34
  165. package/dist/loader/busy.d.ts +10 -0
  166. package/dist/loader/busy.js +11 -0
  167. package/dist/loader/root/loader-root.d.ts +9 -2
  168. package/dist/loader/root/loader-root.js +23 -3
  169. package/dist/megamenu/hand-over.d.ts +75 -0
  170. package/dist/megamenu/hand-over.js +67 -0
  171. package/dist/megamenu/root/megamenu-root.d.ts +80 -15
  172. package/dist/megamenu/root/megamenu-root.js +76 -19
  173. package/dist/menu/item/menu-item.d.ts +51 -2
  174. package/dist/menu/item/menu-item.js +50 -26
  175. package/dist/menu/root/menu-root.d.ts +17 -0
  176. package/dist/menu/root/menu-root.js +2 -2
  177. package/dist/meter/root/meter-root.d.ts +62 -1
  178. package/dist/meter/root/meter-root.js +38 -16
  179. package/dist/navigation/root/navigation-root.d.ts +2 -1
  180. package/dist/navigation/root/navigation-root.js +2 -2
  181. package/dist/notifications/root/notifications-root.d.ts +20 -4
  182. package/dist/notifications/root/notifications-root.js +30 -8
  183. package/dist/number-input/grain.d.ts +28 -0
  184. package/dist/number-input/grain.js +14 -0
  185. package/dist/number-input/root/number-input-root.d.ts +34 -9
  186. package/dist/number-input/root/number-input-root.js +31 -25
  187. package/dist/object-inspector/root/object-inspector-root.d.ts +88 -33
  188. package/dist/object-inspector/root/object-inspector-root.js +134 -92
  189. package/dist/object-inspector/rows.d.ts +18 -0
  190. package/dist/object-inspector/rows.js +33 -0
  191. package/dist/option/index.d.ts +1 -0
  192. package/dist/option/index.js +1 -0
  193. package/dist/option/root/option-root.d.ts +5 -3
  194. package/dist/option/separator/option-separator.d.ts +30 -0
  195. package/dist/option/separator/option-separator.js +21 -0
  196. package/dist/outline/root/outline-root.d.ts +30 -0
  197. package/dist/outline/root/outline-root.js +17 -13
  198. package/dist/pagination/size/pagination-size.d.ts +6 -0
  199. package/dist/pagination/size/pagination-size.js +5 -3
  200. package/dist/pin-input/code.d.ts +37 -0
  201. package/dist/pin-input/code.js +25 -0
  202. package/dist/pin-input/root/pin-input-root.d.ts +116 -115
  203. package/dist/pin-input/root/pin-input-root.js +163 -155
  204. package/dist/popover/hide-outside.d.ts +14 -0
  205. package/dist/popover/hide-outside.js +34 -0
  206. package/dist/popover/root/popover-root.d.ts +64 -8
  207. package/dist/popover/root/popover-root.js +67 -4
  208. package/dist/progress/root/progress-root.d.ts +47 -0
  209. package/dist/progress/root/progress-root.js +34 -16
  210. package/dist/qr-code/export.d.ts +45 -1
  211. package/dist/qr-code/export.js +28 -0
  212. package/dist/qr-code/name.d.ts +11 -0
  213. package/dist/qr-code/name.js +7 -0
  214. package/dist/qr-code/root/qr-code-root.d.ts +36 -11
  215. package/dist/qr-code/root/qr-code-root.js +58 -11
  216. package/dist/quote/marks.d.ts +8 -0
  217. package/dist/quote/marks.js +5 -0
  218. package/dist/quote/root/quote-root.d.ts +14 -2
  219. package/dist/quote/root/quote-root.js +23 -1
  220. package/dist/radio/group/radio-group.d.ts +15 -0
  221. package/dist/radio/root/radio-root.d.ts +6 -2
  222. package/dist/radio/root/radio-root.js +7 -2
  223. package/dist/rating/root/rating-root.d.ts +30 -12
  224. package/dist/rating/root/rating-root.js +27 -27
  225. package/dist/scatter-chart/fit.d.ts +15 -0
  226. package/dist/scatter-chart/fit.js +35 -0
  227. package/dist/scatter-chart/root/scatter-chart-root.d.ts +51 -1
  228. package/dist/scatter-chart/root/scatter-chart-root.js +64 -24
  229. package/dist/scroll-area/root/scroll-area-root.d.ts +22 -51
  230. package/dist/scroll-area/root/scroll-area-root.js +57 -173
  231. package/dist/scroll-area/scrollbar-controller.d.ts +111 -0
  232. package/dist/scroll-area/scrollbar-controller.js +172 -0
  233. package/dist/scroll-area/scrollbar.d.ts +27 -8
  234. package/dist/scroll-area/scrollbar.js +10 -1
  235. package/dist/select/align.d.ts +47 -0
  236. package/dist/select/align.js +7 -0
  237. package/dist/select/root/select-root.d.ts +71 -0
  238. package/dist/select/root/select-root.js +78 -6
  239. package/dist/skeleton/root/skeleton-root.d.ts +3 -0
  240. package/dist/skeleton/root/skeleton-root.js +4 -2
  241. package/dist/skip-link/root/skip-link-root.js +2 -2
  242. package/dist/slider/root/slider-root.d.ts +59 -5
  243. package/dist/slider/root/slider-root.js +45 -3
  244. package/dist/sparkline/readings.d.ts +36 -0
  245. package/dist/sparkline/readings.js +36 -0
  246. package/dist/sparkline/root/sparkline-root.d.ts +121 -7
  247. package/dist/sparkline/root/sparkline-root.js +160 -26
  248. package/dist/speed-dial/item/speed-dial-item.d.ts +1 -1
  249. package/dist/speed-dial/item/speed-dial-item.js +2 -2
  250. package/dist/speed-dial/root/speed-dial-root.d.ts +6 -0
  251. package/dist/speed-dial/root/speed-dial-root.js +11 -3
  252. package/dist/splitter/root/splitter-root.d.ts +10 -12
  253. package/dist/splitter/root/splitter-root.js +211 -204
  254. package/dist/stat/root/stat-root.d.ts +14 -5
  255. package/dist/stat/root/stat-root.js +21 -5
  256. package/dist/steps/reach.d.ts +5 -0
  257. package/dist/steps/reach.js +3 -0
  258. package/dist/steps/root/steps-root.d.ts +56 -3
  259. package/dist/steps/root/steps-root.js +50 -6
  260. package/dist/steps/step/step.d.ts +8 -0
  261. package/dist/steps/step/step.js +8 -3
  262. package/dist/switch/root/switch-root.d.ts +10 -0
  263. package/dist/table/column/table-column.d.ts +6 -10
  264. package/dist/table/column/table-column.js +8 -20
  265. package/dist/table/root/table-root.d.ts +31 -10
  266. package/dist/table/root/table-root.js +14 -18
  267. package/dist/table/row/table-row.d.ts +24 -0
  268. package/dist/table/row/table-row.js +37 -1
  269. package/dist/tabs/panel/tab-panel.d.ts +16 -3
  270. package/dist/tabs/panel/tab-panel.js +34 -5
  271. package/dist/tabs/root/tabs-root.d.ts +17 -3
  272. package/dist/tabs/root/tabs-root.js +1 -1
  273. package/dist/tabs/tab/tab.d.ts +5 -0
  274. package/dist/tabs/tab/tab.js +5 -2
  275. package/dist/tag/group/tag-group.d.ts +44 -5
  276. package/dist/tag/group/tag-group.js +60 -9
  277. package/dist/tag/root/tag-root.js +9 -2
  278. package/dist/textarea/root/textarea-root.d.ts +41 -2
  279. package/dist/textarea/root/textarea-root.js +39 -1
  280. package/dist/time-input/root/time-input-root.d.ts +10 -2
  281. package/dist/time-input/root/time-input-root.js +24 -13
  282. package/dist/time-picker/root/time-picker-root.d.ts +28 -17
  283. package/dist/time-picker/root/time-picker-root.js +18 -29
  284. package/dist/time-picker/wheel-name.d.ts +9 -0
  285. package/dist/time-picker/wheel-name.js +15 -0
  286. package/dist/timeline/group/timeline-group.js +2 -2
  287. package/dist/toast/item/toast-item.d.ts +16 -3
  288. package/dist/toast/item/toast-item.js +22 -6
  289. package/dist/toast/root/toast-root.d.ts +34 -4
  290. package/dist/toast/root/toast-root.js +74 -13
  291. package/dist/toast/words.d.ts +12 -0
  292. package/dist/toast/words.js +25 -0
  293. package/dist/toggle/group/toggle-group.d.ts +52 -7
  294. package/dist/toggle/group/toggle-group.js +58 -44
  295. package/dist/toggle/root/toggle-root.js +2 -4
  296. package/dist/toolbar/root/toolbar-root.d.ts +21 -5
  297. package/dist/toolbar/root/toolbar-root.js +52 -8
  298. package/dist/tooltip/root/tooltip-root.d.ts +20 -3
  299. package/dist/tooltip/root/tooltip-root.js +18 -1
  300. package/dist/tour/back.d.ts +10 -0
  301. package/dist/tour/back.js +8 -0
  302. package/dist/tour/root/tour-root.d.ts +45 -2
  303. package/dist/tour/root/tour-root.js +53 -8
  304. package/dist/tour/stop/tour-stop.d.ts +3 -0
  305. package/dist/tour/stop/tour-stop.js +3 -3
  306. package/dist/tree/item/tree-item.d.ts +7 -3
  307. package/dist/tree/item/tree-item.js +3 -0
  308. package/dist/tree/root/tree-root.d.ts +24 -3
  309. package/dist/tree/root/tree-root.js +32 -13
  310. package/dist/tree/selection.js +2 -15
  311. package/dist/trend/figure.d.ts +16 -0
  312. package/dist/trend/figure.js +8 -0
  313. package/dist/trend/root/trend-root.d.ts +83 -19
  314. package/dist/trend/root/trend-root.js +59 -8
  315. package/dist/video/media-events.d.ts +13 -18
  316. package/dist/video/media-events.js +1 -5
  317. package/dist/video/root/extra-controls.d.ts +12 -0
  318. package/dist/video/root/extra-controls.js +6 -2
  319. package/dist/video/root/video-root.d.ts +23 -6
  320. package/dist/video/root/video-root.js +19 -10
  321. package/dist/video-playlist/menu/video-playlist-menu.d.ts +2 -0
  322. package/dist/video-playlist/menu/video-playlist-menu.js +2 -1
  323. package/dist/video-playlist/root/video-playlist-root.d.ts +17 -1
  324. package/dist/video-playlist/root/video-playlist-root.js +3 -0
  325. package/dist/virtual-list/fill.d.ts +11 -8
  326. package/dist/virtual-list/fill.js +10 -17
  327. package/dist/virtual-list/keys.d.ts +16 -7
  328. package/dist/virtual-list/keys.js +17 -6
  329. package/dist/virtual-list/plan.d.ts +65 -0
  330. package/dist/virtual-list/plan.js +27 -0
  331. package/dist/virtual-list/root/virtual-list-root.d.ts +136 -13
  332. package/dist/virtual-list/root/virtual-list-root.js +218 -51
  333. package/lint.json +1 -1
  334. package/package.json +8 -8
  335. package/types/jsx.d.ts +7441 -1458
  336. package/types/svelte.d.ts +1 -0
  337. package/types/vue.d.ts +1501 -326
  338. package/dist/chat/relative-clock.d.ts +0 -39
  339. package/dist/chat/relative-clock.js +0 -31
  340. package/dist/data-table/root/order.d.ts +0 -141
  341. package/dist/data-table/root/order.js +0 -76
  342. package/dist/tag/selection.d.ts +0 -10
  343. package/dist/tag/selection.js +0 -12
@@ -4,10 +4,11 @@ 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, formatNumbers, HelixElement, isRtl, linear, MixinChartSource, PLOT_HEIGHT, PLOT_WIDTH, seriesIndex, ticks, } from '@fusion.dev/helix-core';
7
+ import { CHART_PLOT, customElement, drawTooltip, extent, formatNumbers, HelixElement, isRtl, linear, MixinChartSource, PLOT_HEIGHT, PLOT_WIDTH, seriesIndex, seriesKey, ticks, } 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';
11
+ import { correlation, leastSquares } from '../fit.js';
11
12
  const REACH = 24;
12
13
  const COEFFICIENTS = new Map();
13
14
  const coefficientIn = (locale) => {
@@ -31,28 +32,13 @@ const nice = ([low, high]) => {
31
32
  const round = (value) => Number(value.toPrecision(12));
32
33
  return [round(Math.floor(low / step) * step), round(Math.ceil(high / step) * step)];
33
34
  };
34
- const correlation = (pairs) => {
35
- if (pairs.length < 3) {
36
- return undefined;
37
- }
38
- const mean = (values) => values.reduce((sum, one) => sum + one, 0) / values.length;
39
- const across = mean(pairs.map(([x]) => x));
40
- const up = mean(pairs.map(([, y]) => y));
41
- let both = 0;
42
- let xs = 0;
43
- let ys = 0;
44
- for (const [x, y] of pairs) {
45
- both += (x - across) * (y - up);
46
- xs += (x - across) ** 2;
47
- ys += (y - up) ** 2;
48
- }
49
- return xs === 0 || ys === 0 ? undefined : both / Math.sqrt(xs * ys);
50
- };
51
35
  let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinChartSource(HelixElement) {
52
36
  constructor() {
53
37
  super(...arguments);
54
38
  this.correlationLabel = 'correlation';
55
39
  this.pointsLabel = 'points';
40
+ this.sizeBy = '';
41
+ this.trend = false;
56
42
  this.drawn = [];
57
43
  this.nearest = undefined;
58
44
  this.handleMove = (event) => {
@@ -97,8 +83,20 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
97
83
  this.removeEventListener('pointerleave', this.handleLeave);
98
84
  }
99
85
  seriesOf(cell) {
100
- const depth = this.plottedColumns.indexOf(cell);
101
- return depth < 1 ? undefined : seriesIndex(depth - 1);
86
+ const depth = this.measures.ups.indexOf(cell);
87
+ return depth < 0 ? undefined : seriesIndex(depth);
88
+ }
89
+ get measures() {
90
+ const rows = this.sourceRows;
91
+ const key = seriesKey(this.sizeBy);
92
+ const size = key === ''
93
+ ? undefined
94
+ : this.plottedColumns.find((column) => seriesKey(rows.find((row) => row.cells[column])?.cells[column]?.name ?? '') === key);
95
+ const [across, ...ups] = this.plottedColumns.filter((column) => column !== size);
96
+ return { across, size, ups };
97
+ }
98
+ showsColumn(cell) {
99
+ return cell !== this.measures.size && super.showsColumn(cell);
102
100
  }
103
101
  get rulesX() {
104
102
  return this.gridlines !== undefined && this.gridlines !== 'y';
@@ -108,8 +106,7 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
108
106
  }
109
107
  get field() {
110
108
  const rows = this.sourceRows;
111
- const columns = this.plottedColumns;
112
- const [across, ...ups] = columns;
109
+ const { across, size, ups } = this.measures;
113
110
  const name = (column) => column === undefined ? '' : (rows.find((row) => row.cells[column])?.cells[column]?.name ?? '');
114
111
  const pairs = ups.map((column) => rows.flatMap((row, index) => {
115
112
  const x = across === undefined ? undefined : row.cells[across]?.value;
@@ -122,10 +119,22 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
122
119
  const y = nice(extent(all.length > 0 ? all.map(([, one]) => one) : [0]));
123
120
  const along = linear(x, [0, PLOT_WIDTH]);
124
121
  const up = linear(y, [PLOT_HEIGHT, 0]);
122
+ const sizes = rows.map((row) => (size === undefined ? undefined : row.cells[size]?.value));
123
+ const largest = Math.max(0, ...sizes.map((one) => one ?? 0));
124
+ const weight = (row) => {
125
+ const one = sizes[row];
126
+ return one === undefined || largest <= 0 ? undefined : Math.sqrt(Math.max(0, one) / largest);
127
+ };
125
128
  return {
126
129
  pairs: pairs.map((series) => series.map(([one, two]) => [one, two])),
127
130
  points: pairs.flatMap((series, depth) => shown[depth]
128
- ? series.map(([one, two, row]) => ({ depth, row, x: along(one), y: up(two) }))
131
+ ? series.map(([one, two, row]) => ({
132
+ depth,
133
+ row,
134
+ weight: weight(row),
135
+ x: along(one),
136
+ y: up(two),
137
+ }))
129
138
  : []),
130
139
  x,
131
140
  xName: name(across),
@@ -180,6 +189,7 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
180
189
  ${this.rulesY
181
190
  ? ticks(field.y).map((level) => svg `<line part="gridline" x1="0" x2=${PLOT_WIDTH} y1=${up(level)} y2=${up(level)} />`)
182
191
  : nothing}
192
+ ${this.renderTrends(field, along, up)}
183
193
  </svg>
184
194
  ${field.points.map((point) => {
185
195
  const index = seriesIndex(point.depth);
@@ -188,12 +198,36 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
188
198
  data-series=${index}
189
199
  ?data-active=${point.row === at}
190
200
  part="point${point.row === at ? ' point-active' : ''}"
191
- style=${`--chart-series: var(--chart-series-${index}); --chart-point-x: ${point.x}%; --chart-point-y: ${point.y}%`}
201
+ style=${`--chart-series: var(--chart-series-${index}); --chart-point-x: ${point.x}%; --chart-point-y: ${point.y}%${point.weight === undefined ? '' : `; --chart-point-weight: ${point.weight}`}`}
192
202
  ></span>`;
193
203
  })}
194
204
  ${this.renderTooltip()}
195
205
  </div>`;
196
206
  }
207
+ renderTrends(field, along, up) {
208
+ if (!this.trend) {
209
+ return nothing;
210
+ }
211
+ const [start, end] = field.x;
212
+ return field.yNames.flatMap((name, depth) => {
213
+ const fit = this.showsSeries(name) ? leastSquares(field.pairs[depth] ?? []) : undefined;
214
+ if (fit === undefined) {
215
+ return [];
216
+ }
217
+ const index = seriesIndex(depth);
218
+ return [
219
+ svg `<line
220
+ data-series=${index}
221
+ part="trend"
222
+ style="--chart-series: var(--chart-series-${index})"
223
+ x1=${along(start)}
224
+ x2=${along(end)}
225
+ y1=${up(fit.intercept + fit.slope * start)}
226
+ y2=${up(fit.intercept + fit.slope * end)}
227
+ />`,
228
+ ];
229
+ });
230
+ }
197
231
  renderSummary(field) {
198
232
  const clauses = field.yNames.map((name, depth) => {
199
233
  const pairs = field.pairs[depth] ?? [];
@@ -233,6 +267,12 @@ __decorate([
233
267
  __decorate([
234
268
  property({ attribute: 'points-label' })
235
269
  ], HelixHeadlessScatterChart.prototype, "pointsLabel", void 0);
270
+ __decorate([
271
+ property({ attribute: 'size-by' })
272
+ ], HelixHeadlessScatterChart.prototype, "sizeBy", void 0);
273
+ __decorate([
274
+ property({ reflect: true, type: Boolean })
275
+ ], HelixHeadlessScatterChart.prototype, "trend", void 0);
236
276
  HelixHeadlessScatterChart = __decorate([
237
277
  customElement('helix-headless-scatter-chart')
238
278
  ], HelixHeadlessScatterChart);
@@ -30,10 +30,20 @@ declare const EDGES: readonly ['block-start', 'block-end', 'inline-start', 'inli
30
30
  * and draws the thumb from the two custom properties written on each
31
31
  * scrollbar. An axis whose `overflow` is `hidden` gets no scrollbar.
32
32
  *
33
+ * **`orientation` keeps the content to one axis.** `vertical` scrolls up and
34
+ * down only, and `horizontal` sideways only, so the other axis has no
35
+ * scrollbar, the browser's or the component's, and clips what is past it.
36
+ * Leave it unset to scroll both ways.
37
+ *
33
38
  * The viewport's `scroll` and `scrollend` are sent again from the host, which
34
- * is the element you hold. In React, bind them with `onScroll` and
39
+ * is the element you hold. A thumb dragged across the content sends one
40
+ * `scrollend`, once it is let go. In React, bind them with `onScroll` and
35
41
  * `onScrollEnd`.
36
42
  *
43
+ * **Keyboard.** The viewport is the tab stop while the content overflows, and
44
+ * the browser's scrolling keys move it: the arrow keys, Page Up and Page Down,
45
+ * Home and End, and Space. The scrollbars take no focus.
46
+ *
37
47
  * @since 0.1.0
38
48
  * @status stable
39
49
  * @category layout
@@ -43,7 +53,7 @@ declare const EDGES: readonly ['block-start', 'block-end', 'inline-start', 'inli
43
53
  * @slot - The content that scrolls.
44
54
  *
45
55
  * @event {Event} scroll - The content scrolled. Sent from the host, because the viewport's own does not leave the shadow root. Does not bubble.
46
- * @event {Event} scrollend - The content stopped scrolling. Sent from the host, as `scroll` is. Does not bubble.
56
+ * @event {Event} scrollend - The content stopped scrolling. Sent from the host, as `scroll` is, and once for a thumb dragged across the content. Does not bubble.
47
57
  *
48
58
  * @csspart corner - The square where the two scrollbars meet, under `scrollbars`. Hidden unless both are drawn.
49
59
  * @csspart edges - The layer that draws the cues on the inline start and end edges.
@@ -80,6 +90,11 @@ export declare class HelixHeadlessScrollArea extends HelixElement {
80
90
  * Without one there is no region: see the note on the class.
81
91
  */
82
92
  label: string;
93
+ /**
94
+ * The one axis the content scrolls along: `vertical` or `horizontal`. The
95
+ * other axis clips what is past it and has no scrollbar. Unset scrolls both.
96
+ */
97
+ orientation?: 'horizontal' | 'vertical';
83
98
  /**
84
99
  * Draws scrollbars of the component's own in place of the browser's, and
85
100
  * says when they show.
@@ -93,18 +108,8 @@ export declare class HelixHeadlessScrollArea extends HelixElement {
93
108
  * Absent keeps the browser's scrollbars.
94
109
  */
95
110
  scrollbars?: 'always' | 'auto' | 'hover' | 'scroll';
96
- /** What each scrollbar shows, measured, and `undefined` until it has been. */
97
- private bars;
98
- /** Whether the content moved, or the pointer left, within the hide delay. */
99
- private active;
100
- /** Whether the pointer is over the scroll area. */
101
- private hovered;
102
- /** Whether the pointer is over a scrollbar. */
103
- private over;
104
- /** The thumb being dragged, if one is. */
105
- private drag;
106
- /** Puts the scrollbars away once nothing has moved for the hide delay. */
107
- private readonly hide;
111
+ /** The scrollbars drawn under `scrollbars`: what they show, when, and the drag. */
112
+ private readonly bars;
108
113
  /**
109
114
  * Which edges have content past them, measured rather than guessed.
110
115
  */
@@ -137,45 +142,9 @@ export declare class HelixHeadlessScrollArea extends HelixElement {
137
142
  * costs.
138
143
  */
139
144
  private measure;
140
- /** One axis of the box, counted from its start whichever way the line runs. */
141
- private extent;
142
- /**
143
- * Reads what each scrollbar shows off the box.
144
- *
145
- * An axis scrolls unless its `overflow` says it cannot. An empty reading is a
146
- * harness with no layout, where the mark `core` puts on the viewport is
147
- * `overflow: auto` on both axes, so it counts as one that scrolls.
148
- *
149
- * Written only on a change, so a scroll that moves no thumb renders nothing.
150
- */
151
- private readBars;
152
- /**
153
- * Shows the scrollbars and starts the wait that puts them away again, under
154
- * `scroll` and `hover`.
155
- */
156
- private wake;
157
- /** Sends the content to `offset` along an axis, counted from its start. */
158
- private scrollAlong;
159
- /**
160
- * Takes hold of a thumb, or presses the track.
161
- *
162
- * A press on the track sends the thumb's middle to the press first, and the
163
- * drag carries on from there, so a press and a drag are one gesture as they
164
- * are on the browser's own scrollbar. `preventDefault` keeps the press from
165
- * starting a text selection, and from moving focus off the viewport.
166
- */
167
- private grab;
168
- private readonly handleVerticalDown;
169
- private readonly handleHorizontalDown;
170
- /** Moves the content with a dragged thumb. Nothing while no thumb is held. */
171
- private readonly handleDragMove;
172
- private readonly handleDragEnd;
173
- private readonly handleBarEnter;
174
- private readonly handleBarLeave;
175
- private readonly handleEnter;
176
- private readonly handleLeave;
177
145
  /** Measures, shows the scrollbars, and sends the event on from the host. */
178
146
  private readonly handleScroll;
147
+ /** Sends the event on from the host, except the ones a thumb drag holds back. */
179
148
  private readonly handleScrollEnd;
180
149
  connectedCallback(): void;
181
150
  disconnectedCallback(): void;
@@ -184,6 +153,8 @@ export declare class HelixHeadlessScrollArea extends HelixElement {
184
153
  private watchContent;
185
154
  protected updated(changed: PropertyValues): void;
186
155
  private readonly handleSlotChange;
156
+ /** The axis `orientation` takes away, clipped where the content would overflow it. */
157
+ private get clipped();
187
158
  protected render(): TemplateResult;
188
159
  /**
189
160
  * The scrollbars, the thumbs in them and the corner.
@@ -4,20 +4,22 @@ 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 { capturePointer, customElement, DelayController, HelixElement, isRtl, } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement } from '@fusion.dev/helix-core';
8
8
  import { html, nothing } from 'lit';
9
9
  import { property, state } from 'lit/decorators.js';
10
- import { hasScrollbar, offsetAt, scrollFraction, scrollPerPixel, showsScrollbar, thumbFraction, } from '../scrollbar.js';
10
+ import { ScrollbarController } from '../scrollbar-controller.js';
11
11
  const EDGES = ['block-start', 'block-end', 'inline-start', 'inline-end'];
12
12
  let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.hideDelay = 600;
16
16
  this.label = '';
17
- this.active = false;
18
- this.hovered = false;
19
- this.over = false;
20
- this.hide = new DelayController(this, { renders: false });
17
+ this.bars = new ScrollbarController(this, {
18
+ box: () => this.scroller,
19
+ hideDelay: () => this.hideDelay,
20
+ mode: () => this.scrollbars,
21
+ scrollEnd: () => this.dispatchEvent(new Event('scrollend')),
22
+ });
21
23
  this.more = [];
22
24
  this.scrolls = false;
23
25
  this.measure = () => {
@@ -26,72 +28,39 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
26
28
  return;
27
29
  }
28
30
  const slack = 1;
31
+ const block = this.orientation !== 'horizontal';
32
+ const inline = this.orientation !== 'vertical';
29
33
  const found = [];
30
- if (box.scrollTop > slack) {
34
+ if (block && box.scrollTop > slack) {
31
35
  found.push('block-start');
32
36
  }
33
- if (box.scrollTop + box.clientHeight < box.scrollHeight - slack) {
37
+ if (block && box.scrollTop + box.clientHeight < box.scrollHeight - slack) {
34
38
  found.push('block-end');
35
39
  }
36
40
  const along = Math.abs(box.scrollLeft);
37
- if (along > slack) {
41
+ if (inline && along > slack) {
38
42
  found.push('inline-start');
39
43
  }
40
- if (along + box.clientWidth < box.scrollWidth - slack) {
44
+ if (inline && along + box.clientWidth < box.scrollWidth - slack) {
41
45
  found.push('inline-end');
42
46
  }
43
47
  this.more = found;
44
- this.scrolls = box.scrollHeight > box.clientHeight || box.scrollWidth > box.clientWidth;
48
+ this.scrolls =
49
+ (block && box.scrollHeight > box.clientHeight) ||
50
+ (inline && box.scrollWidth > box.clientWidth);
45
51
  if (this.scrollbars) {
46
- this.readBars(box);
47
- }
48
- };
49
- this.handleVerticalDown = (event) => {
50
- this.grab(event, 'vertical');
51
- };
52
- this.handleHorizontalDown = (event) => {
53
- this.grab(event, 'horizontal');
54
- };
55
- this.handleDragMove = (event) => {
56
- const drag = this.drag;
57
- const box = this.scroller;
58
- if (!drag || !box) {
59
- return;
60
- }
61
- const pointer = drag.axis === 'vertical' ? event.clientY : event.clientX;
62
- this.scrollAlong(box, drag.axis, drag.from + (pointer - drag.pointer) * drag.sign * drag.perPixel);
63
- };
64
- this.handleDragEnd = () => {
65
- if (!this.drag) {
66
- return;
67
- }
68
- this.drag = undefined;
69
- this.wake();
70
- this.requestUpdate();
71
- };
72
- this.handleBarEnter = () => {
73
- this.over = true;
74
- };
75
- this.handleBarLeave = () => {
76
- this.over = false;
77
- this.wake();
78
- };
79
- this.handleEnter = () => {
80
- this.hovered = true;
81
- };
82
- this.handleLeave = () => {
83
- this.hovered = false;
84
- if (this.scrollbars === 'hover') {
85
- this.wake();
52
+ this.bars.read(box);
86
53
  }
87
54
  };
88
55
  this.handleScroll = (event) => {
89
56
  this.measure();
90
- this.wake();
57
+ this.bars.wake();
91
58
  this.relayNativeEvent(event);
92
59
  };
93
60
  this.handleScrollEnd = (event) => {
94
- this.relayNativeEvent(event);
61
+ if (!this.bars.holdsScrollEnd()) {
62
+ this.relayNativeEvent(event);
63
+ }
95
64
  };
96
65
  this.handleSlotChange = (event) => {
97
66
  const slot = event.target;
@@ -104,84 +73,8 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
104
73
  get scroller() {
105
74
  return this.partNamed('viewport');
106
75
  }
107
- extent(box, axis) {
108
- return axis === 'vertical'
109
- ? { client: box.clientHeight, offset: box.scrollTop, scroll: box.scrollHeight }
110
- : { client: box.clientWidth, offset: Math.abs(box.scrollLeft), scroll: box.scrollWidth };
111
- }
112
- readBars(box) {
113
- const mode = this.scrollbars ?? 'auto';
114
- const style = getComputedStyle(box);
115
- const bar = (axis, overflow) => {
116
- const extent = this.extent(box, axis);
117
- return {
118
- along: scrollFraction(extent),
119
- drawn: hasScrollbar(mode, !['clip', 'hidden', 'visible'].includes(overflow), extent.offset > 1 || extent.client < extent.scroll - 1),
120
- thumb: thumbFraction(extent),
121
- };
122
- };
123
- const next = {
124
- horizontal: bar('horizontal', style.overflowX),
125
- vertical: bar('vertical', style.overflowY),
126
- };
127
- if (JSON.stringify(next) !== JSON.stringify(this.bars)) {
128
- this.bars = next;
129
- }
130
- }
131
- wake() {
132
- if (this.scrollbars !== 'scroll' && this.scrollbars !== 'hover') {
133
- return;
134
- }
135
- this.active = true;
136
- this.hide.start(this.hideDelay, () => {
137
- this.active = false;
138
- });
139
- }
140
- scrollAlong(box, axis, offset) {
141
- box.scrollTo(axis === 'vertical'
142
- ? { behavior: 'instant', top: offset }
143
- : { behavior: 'instant', left: isRtl(box) ? -offset : offset });
144
- }
145
- grab(event, axis) {
146
- const box = this.scroller;
147
- const bar = event.currentTarget;
148
- const thumb = bar.querySelector('[part~="thumb"]');
149
- if (event.button !== 0 || !box || !thumb) {
150
- return;
151
- }
152
- event.preventDefault();
153
- const vertical = axis === 'vertical';
154
- const rtl = !vertical && isRtl(box);
155
- const track = bar.getBoundingClientRect();
156
- const held = thumb.getBoundingClientRect();
157
- const length = vertical ? track.height : track.width;
158
- const size = vertical ? held.height : held.width;
159
- const extent = this.extent(box, axis);
160
- const pointer = vertical ? event.clientY : event.clientX;
161
- let from = extent.offset;
162
- if (!thumb.contains(event.target)) {
163
- const along = vertical
164
- ? pointer - track.top
165
- : rtl
166
- ? track.right - pointer
167
- : pointer - track.left;
168
- from = offsetAt(extent, along, length, size);
169
- this.scrollAlong(box, axis, from);
170
- }
171
- this.drag = {
172
- axis,
173
- from,
174
- perPixel: scrollPerPixel(extent, length, size),
175
- pointer,
176
- sign: rtl ? -1 : 1,
177
- };
178
- capturePointer(bar, event.pointerId);
179
- this.requestUpdate();
180
- }
181
76
  connectedCallback() {
182
77
  super.connectedCallback();
183
- this.addEventListener('pointerenter', this.handleEnter);
184
- this.addEventListener('pointerleave', this.handleLeave);
185
78
  this.watcher = new ResizeObserver(this.measure);
186
79
  if (this.hasUpdated) {
187
80
  this.watchContent();
@@ -189,14 +82,8 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
189
82
  }
190
83
  disconnectedCallback() {
191
84
  super.disconnectedCallback();
192
- this.removeEventListener('pointerenter', this.handleEnter);
193
- this.removeEventListener('pointerleave', this.handleLeave);
194
85
  this.watcher?.disconnect();
195
86
  this.watcher = undefined;
196
- this.drag = undefined;
197
- this.active = false;
198
- this.hovered = false;
199
- this.over = false;
200
87
  }
201
88
  firstUpdated(changed) {
202
89
  super.firstUpdated?.(changed);
@@ -217,10 +104,13 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
217
104
  }
218
105
  updated(changed) {
219
106
  super.updated?.(changed);
220
- if (changed.has('scrollbars') && this.hasUpdated && this.scrollbars) {
107
+ if (changed.has('orientation') && this.hasUpdated) {
108
+ this.measure();
109
+ }
110
+ else if (changed.has('scrollbars') && this.scrollbars) {
221
111
  const box = this.scroller;
222
112
  if (box) {
223
- this.readBars(box);
113
+ this.bars.read(box);
224
114
  }
225
115
  }
226
116
  this.toggleState('scrolls', this.scrolls);
@@ -228,14 +118,21 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
228
118
  this.toggleState('more-block-end', this.more.includes('block-end'));
229
119
  this.toggleState('more-inline-start', this.more.includes('inline-start'));
230
120
  this.toggleState('more-inline-end', this.more.includes('inline-end'));
231
- const drawn = this.scrollbars ? this.bars : undefined;
121
+ const drawn = this.scrollbars ? this.bars.bars : undefined;
232
122
  this.toggleState('scrollbar-horizontal', drawn?.horizontal.drawn === true);
233
123
  this.toggleState('scrollbar-vertical', drawn?.vertical.drawn === true);
234
124
  }
125
+ get clipped() {
126
+ if (this.orientation === 'vertical') {
127
+ return 'overflow-x: hidden';
128
+ }
129
+ return this.orientation === 'horizontal' ? 'overflow-y: hidden' : nothing;
130
+ }
235
131
  render() {
236
132
  return html `<div
237
133
  data-scroller
238
134
  part="viewport"
135
+ style=${this.clipped}
239
136
  role=${this.label ? 'region' : nothing}
240
137
  aria-label=${this.label || nothing}
241
138
  tabindex=${this.scrolls ? '0' : nothing}
@@ -252,16 +149,12 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
252
149
  <div
253
150
  part="edges"
254
151
  aria-hidden="true"
255
- ></div>${this.scrollbars ? this.renderScrollbars(this.scrollbars) : nothing}`;
152
+ ></div>${this.scrollbars ? this.renderScrollbars() : nothing}`;
256
153
  }
257
- renderScrollbars(mode) {
258
- const bars = this.bars;
259
- const moment = {
260
- active: this.active,
261
- held: this.over || this.drag !== undefined,
262
- hovered: this.hovered,
263
- };
264
- const shown = showsScrollbar(mode, moment);
154
+ renderScrollbars() {
155
+ const controller = this.bars;
156
+ const bars = controller.bars;
157
+ const shown = controller.shown;
265
158
  const facts = (bar) => bar
266
159
  ? `--scroll-area-thumb-fraction: ${bar.thumb}; --scroll-area-scroll-fraction: ${bar.along}`
267
160
  : nothing;
@@ -272,13 +165,13 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
272
165
  aria-hidden="true"
273
166
  ?hidden=${!vertical}
274
167
  style=${facts(bars?.vertical)}
275
- @pointerdown=${this.handleVerticalDown}
276
- @pointermove=${this.handleDragMove}
277
- @pointerup=${this.handleDragEnd}
278
- @pointercancel=${this.handleDragEnd}
279
- @lostpointercapture=${this.handleDragEnd}
280
- @pointerenter=${this.handleBarEnter}
281
- @pointerleave=${this.handleBarLeave}
168
+ @pointerdown=${controller.handleVerticalDown}
169
+ @pointermove=${controller.handleDragMove}
170
+ @pointerup=${controller.handleDragEnd}
171
+ @pointercancel=${controller.handleDragEnd}
172
+ @lostpointercapture=${controller.handleDragEnd}
173
+ @pointerenter=${controller.handleBarEnter}
174
+ @pointerleave=${controller.handleBarLeave}
282
175
  >
283
176
  <div part="thumb thumb-vertical"></div>
284
177
  </div>
@@ -287,13 +180,13 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
287
180
  aria-hidden="true"
288
181
  ?hidden=${!horizontal}
289
182
  style=${facts(bars?.horizontal)}
290
- @pointerdown=${this.handleHorizontalDown}
291
- @pointermove=${this.handleDragMove}
292
- @pointerup=${this.handleDragEnd}
293
- @pointercancel=${this.handleDragEnd}
294
- @lostpointercapture=${this.handleDragEnd}
295
- @pointerenter=${this.handleBarEnter}
296
- @pointerleave=${this.handleBarLeave}
183
+ @pointerdown=${controller.handleHorizontalDown}
184
+ @pointermove=${controller.handleDragMove}
185
+ @pointerup=${controller.handleDragEnd}
186
+ @pointercancel=${controller.handleDragEnd}
187
+ @lostpointercapture=${controller.handleDragEnd}
188
+ @pointerenter=${controller.handleBarEnter}
189
+ @pointerleave=${controller.handleBarLeave}
297
190
  >
298
191
  <div part="thumb thumb-horizontal"></div>
299
192
  </div>
@@ -310,21 +203,12 @@ __decorate([
310
203
  __decorate([
311
204
  property()
312
205
  ], HelixHeadlessScrollArea.prototype, "label", void 0);
206
+ __decorate([
207
+ property()
208
+ ], HelixHeadlessScrollArea.prototype, "orientation", void 0);
313
209
  __decorate([
314
210
  property({ reflect: true })
315
211
  ], HelixHeadlessScrollArea.prototype, "scrollbars", void 0);
316
- __decorate([
317
- state()
318
- ], HelixHeadlessScrollArea.prototype, "bars", void 0);
319
- __decorate([
320
- state()
321
- ], HelixHeadlessScrollArea.prototype, "active", void 0);
322
- __decorate([
323
- state()
324
- ], HelixHeadlessScrollArea.prototype, "hovered", void 0);
325
- __decorate([
326
- state()
327
- ], HelixHeadlessScrollArea.prototype, "over", void 0);
328
212
  __decorate([
329
213
  state()
330
214
  ], HelixHeadlessScrollArea.prototype, "more", void 0);