@cloudscape-design/components 3.0.221 → 3.0.222

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 (999) hide show
  1. package/alert/index.js +4 -4
  2. package/alert/index.js.map +1 -1
  3. package/alert/internal.js +14 -15
  4. package/alert/internal.js.map +1 -1
  5. package/annotation-context/annotation/annotation-icon.js +1 -2
  6. package/annotation-context/annotation/annotation-icon.js.map +1 -1
  7. package/annotation-context/annotation/annotation-popover.js +6 -7
  8. package/annotation-context/annotation/annotation-popover.js.map +1 -1
  9. package/annotation-context/annotation/annotation-trigger.js +4 -6
  10. package/annotation-context/annotation/annotation-trigger.js.map +1 -1
  11. package/annotation-context/annotation/closed-annotation.js +4 -5
  12. package/annotation-context/annotation/closed-annotation.js.map +1 -1
  13. package/annotation-context/annotation/open-annotation.js +2 -3
  14. package/annotation-context/annotation/open-annotation.js.map +1 -1
  15. package/annotation-context/context.js +7 -7
  16. package/annotation-context/context.js.map +1 -1
  17. package/annotation-context/index.js +62 -69
  18. package/annotation-context/index.js.map +1 -1
  19. package/app-layout/content-wrapper/index.js +2 -3
  20. package/app-layout/content-wrapper/index.js.map +1 -1
  21. package/app-layout/defaults.js +13 -14
  22. package/app-layout/defaults.js.map +1 -1
  23. package/app-layout/drawer.js +16 -18
  24. package/app-layout/drawer.js.map +1 -1
  25. package/app-layout/index.js +111 -113
  26. package/app-layout/index.js.map +1 -1
  27. package/app-layout/mobile-toolbar/index.js +7 -9
  28. package/app-layout/mobile-toolbar/index.js.map +1 -1
  29. package/app-layout/navigation-panel.js +5 -8
  30. package/app-layout/navigation-panel.js.map +1 -1
  31. package/app-layout/notifications/index.js +2 -2
  32. package/app-layout/notifications/index.js.map +1 -1
  33. package/app-layout/toggles/index.js +14 -22
  34. package/app-layout/toggles/index.js.map +1 -1
  35. package/app-layout/tools-and-split-panel.js +6 -9
  36. package/app-layout/tools-and-split-panel.js.map +1 -1
  37. package/app-layout/utils/use-content-height.js +14 -15
  38. package/app-layout/utils/use-content-height.js.map +1 -1
  39. package/app-layout/utils/use-content-width.js +8 -8
  40. package/app-layout/utils/use-content-width.js.map +1 -1
  41. package/app-layout/utils/use-focus-control.js +7 -8
  42. package/app-layout/utils/use-focus-control.js.map +1 -1
  43. package/app-layout/utils/use-observed-element.js +3 -3
  44. package/app-layout/utils/use-observed-element.js.map +1 -1
  45. package/app-layout/utils/use-window-width.js +4 -4
  46. package/app-layout/utils/use-window-width.js.map +1 -1
  47. package/app-layout/visual-refresh/app-bar.js +19 -20
  48. package/app-layout/visual-refresh/app-bar.js.map +1 -1
  49. package/app-layout/visual-refresh/background.js +9 -10
  50. package/app-layout/visual-refresh/background.js.map +1 -1
  51. package/app-layout/visual-refresh/context.js +101 -59
  52. package/app-layout/visual-refresh/context.js.map +1 -1
  53. package/app-layout/visual-refresh/header.js +6 -7
  54. package/app-layout/visual-refresh/header.js.map +1 -1
  55. package/app-layout/visual-refresh/index.js +3 -4
  56. package/app-layout/visual-refresh/index.js.map +1 -1
  57. package/app-layout/visual-refresh/layout.js +18 -21
  58. package/app-layout/visual-refresh/layout.js.map +1 -1
  59. package/app-layout/visual-refresh/main.js +17 -18
  60. package/app-layout/visual-refresh/main.js.map +1 -1
  61. package/app-layout/visual-refresh/navigation.js +22 -24
  62. package/app-layout/visual-refresh/navigation.js.map +1 -1
  63. package/app-layout/visual-refresh/notifications.js +6 -7
  64. package/app-layout/visual-refresh/notifications.js.map +1 -1
  65. package/app-layout/visual-refresh/split-panel.js +36 -43
  66. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  67. package/app-layout/visual-refresh/tools.js +32 -34
  68. package/app-layout/visual-refresh/tools.js.map +1 -1
  69. package/app-layout/visual-refresh/trigger-button.js +5 -8
  70. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  71. package/area-chart/chart-container.js +18 -19
  72. package/area-chart/chart-container.js.map +1 -1
  73. package/area-chart/elements/area-chart-filter.js +7 -8
  74. package/area-chart/elements/area-chart-filter.js.map +1 -1
  75. package/area-chart/elements/area-chart-legend.js +6 -9
  76. package/area-chart/elements/area-chart-legend.js.map +1 -1
  77. package/area-chart/elements/area-series.js +12 -13
  78. package/area-chart/elements/area-series.js.map +1 -1
  79. package/area-chart/elements/chart-popover.js +4 -6
  80. package/area-chart/elements/chart-popover.js.map +1 -1
  81. package/area-chart/elements/data-series.js +14 -17
  82. package/area-chart/elements/data-series.js.map +1 -1
  83. package/area-chart/elements/highlighted-point.js +6 -7
  84. package/area-chart/elements/highlighted-point.js.map +1 -1
  85. package/area-chart/elements/threshold-series.js +5 -7
  86. package/area-chart/elements/threshold-series.js.map +1 -1
  87. package/area-chart/elements/use-highlight-details.js +28 -30
  88. package/area-chart/elements/use-highlight-details.js.map +1 -1
  89. package/area-chart/elements/vertical-marker.js +6 -7
  90. package/area-chart/elements/vertical-marker.js.map +1 -1
  91. package/area-chart/index.js +4 -4
  92. package/area-chart/index.js.map +1 -1
  93. package/area-chart/internal.js +40 -41
  94. package/area-chart/internal.js.map +1 -1
  95. package/area-chart/model/async-store.js +23 -30
  96. package/area-chart/model/async-store.js.map +1 -1
  97. package/area-chart/model/compute-chart-props.js +11 -12
  98. package/area-chart/model/compute-chart-props.js.map +1 -1
  99. package/area-chart/model/create-series-decorator.js +11 -13
  100. package/area-chart/model/create-series-decorator.js.map +1 -1
  101. package/area-chart/model/interactions-store.js +47 -54
  102. package/area-chart/model/interactions-store.js.map +1 -1
  103. package/area-chart/model/use-chart-model.js +85 -89
  104. package/area-chart/model/use-chart-model.js.map +1 -1
  105. package/area-chart/model/use-filter-props.js +6 -6
  106. package/area-chart/model/use-filter-props.js.map +1 -1
  107. package/area-chart/model/use-highlight-props.js +6 -6
  108. package/area-chart/model/use-highlight-props.js.map +1 -1
  109. package/area-chart/model/utils.js +46 -59
  110. package/area-chart/model/utils.js.map +1 -1
  111. package/attribute-editor/additional-info.js +2 -5
  112. package/attribute-editor/additional-info.js.map +1 -1
  113. package/attribute-editor/index.js +5 -5
  114. package/attribute-editor/index.js.map +1 -1
  115. package/attribute-editor/internal.js +20 -20
  116. package/attribute-editor/internal.js.map +1 -1
  117. package/attribute-editor/row.js +17 -25
  118. package/attribute-editor/row.js.map +1 -1
  119. package/autosuggest/autosuggest-option.js +12 -12
  120. package/autosuggest/autosuggest-option.js.map +1 -1
  121. package/autosuggest/index.js +6 -6
  122. package/autosuggest/index.js.map +1 -1
  123. package/autosuggest/internal.js +39 -39
  124. package/autosuggest/internal.js.map +1 -1
  125. package/autosuggest/load-more-controller.js +10 -14
  126. package/autosuggest/load-more-controller.js.map +1 -1
  127. package/autosuggest/options-controller.js +31 -32
  128. package/autosuggest/options-controller.js.map +1 -1
  129. package/autosuggest/options-list.js +12 -13
  130. package/autosuggest/options-list.js.map +1 -1
  131. package/autosuggest/plain-list.js +15 -17
  132. package/autosuggest/plain-list.js.map +1 -1
  133. package/autosuggest/utils/utils.js +12 -12
  134. package/autosuggest/utils/utils.js.map +1 -1
  135. package/autosuggest/virtual-list.js +14 -16
  136. package/autosuggest/virtual-list.js.map +1 -1
  137. package/badge/index.js +6 -6
  138. package/badge/index.js.map +1 -1
  139. package/bar-chart/index.js +6 -6
  140. package/bar-chart/index.js.map +1 -1
  141. package/box/index.js +4 -4
  142. package/box/index.js.map +1 -1
  143. package/box/internal.js +12 -12
  144. package/box/internal.js.map +1 -1
  145. package/breadcrumb-group/index.js +4 -4
  146. package/breadcrumb-group/index.js.map +1 -1
  147. package/breadcrumb-group/internal.js +24 -25
  148. package/breadcrumb-group/internal.js.map +1 -1
  149. package/breadcrumb-group/item/item.js +32 -34
  150. package/breadcrumb-group/item/item.js.map +1 -1
  151. package/button/icon-helper.js +6 -6
  152. package/button/icon-helper.js.map +1 -1
  153. package/button/index.js +6 -6
  154. package/button/index.js.map +1 -1
  155. package/button/internal.js +32 -33
  156. package/button/internal.js.map +1 -1
  157. package/button-dropdown/category-elements/category-element.js +3 -5
  158. package/button-dropdown/category-elements/category-element.js.map +1 -1
  159. package/button-dropdown/category-elements/expandable-category-element.js +23 -26
  160. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  161. package/button-dropdown/category-elements/mobile-expandable-category-element.js +27 -30
  162. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  163. package/button-dropdown/index.js +6 -6
  164. package/button-dropdown/index.js.map +1 -1
  165. package/button-dropdown/internal.js +28 -29
  166. package/button-dropdown/internal.js.map +1 -1
  167. package/button-dropdown/item-element/index.js +30 -36
  168. package/button-dropdown/item-element/index.js.map +1 -1
  169. package/button-dropdown/items-list.js +3 -4
  170. package/button-dropdown/items-list.js.map +1 -1
  171. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js +2 -4
  172. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
  173. package/button-dropdown/tooltip.js +22 -24
  174. package/button-dropdown/tooltip.js.map +1 -1
  175. package/button-dropdown/utils/create-items-tree.js +21 -23
  176. package/button-dropdown/utils/create-items-tree.js.map +1 -1
  177. package/button-dropdown/utils/menu-item.js +6 -9
  178. package/button-dropdown/utils/menu-item.js.map +1 -1
  179. package/button-dropdown/utils/move-highlight.js +3 -4
  180. package/button-dropdown/utils/move-highlight.js.map +1 -1
  181. package/button-dropdown/utils/use-button-dropdown.js +31 -33
  182. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  183. package/button-dropdown/utils/use-hidden-description.js +3 -3
  184. package/button-dropdown/utils/use-hidden-description.js.map +1 -1
  185. package/button-dropdown/utils/use-highlighted-menu.js +40 -42
  186. package/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
  187. package/button-dropdown/utils/utils.js +5 -9
  188. package/button-dropdown/utils/utils.js.map +1 -1
  189. package/calendar/grid/index.js +25 -28
  190. package/calendar/grid/index.js.map +1 -1
  191. package/calendar/header/header-button.js +4 -6
  192. package/calendar/header/header-button.js.map +1 -1
  193. package/calendar/header/index.js +1 -2
  194. package/calendar/header/index.js.map +1 -1
  195. package/calendar/index.js +4 -4
  196. package/calendar/index.js.map +1 -1
  197. package/calendar/internal.js +27 -27
  198. package/calendar/internal.js.map +1 -1
  199. package/calendar/utils/intl.js +12 -13
  200. package/calendar/utils/intl.js.map +1 -1
  201. package/calendar/utils/navigation.js +3 -3
  202. package/calendar/utils/navigation.js.map +1 -1
  203. package/cards/cards-layout-helper.js +12 -12
  204. package/cards/cards-layout-helper.js.map +1 -1
  205. package/cards/index.js +53 -63
  206. package/cards/index.js.map +1 -1
  207. package/checkbox/index.js +4 -4
  208. package/checkbox/index.js.map +1 -1
  209. package/checkbox/internal.d.ts +1 -0
  210. package/checkbox/internal.d.ts.map +1 -1
  211. package/checkbox/internal.js +9 -9
  212. package/checkbox/internal.js.map +1 -1
  213. package/code-editor/ace-modes.js +1 -1
  214. package/code-editor/ace-modes.js.map +1 -1
  215. package/code-editor/ace-themes.js +2 -2
  216. package/code-editor/ace-themes.js.map +1 -1
  217. package/code-editor/error-screen.js +3 -4
  218. package/code-editor/error-screen.js.map +1 -1
  219. package/code-editor/index.js +61 -65
  220. package/code-editor/index.js.map +1 -1
  221. package/code-editor/listeners.js +5 -5
  222. package/code-editor/listeners.js.map +1 -1
  223. package/code-editor/loading-screen.js +2 -2
  224. package/code-editor/loading-screen.js.map +1 -1
  225. package/code-editor/pane.js +21 -25
  226. package/code-editor/pane.js.map +1 -1
  227. package/code-editor/preferences-modal.js +12 -13
  228. package/code-editor/preferences-modal.js.map +1 -1
  229. package/code-editor/resizable-box/index.js +14 -15
  230. package/code-editor/resizable-box/index.js.map +1 -1
  231. package/code-editor/setup-editor.js +20 -20
  232. package/code-editor/setup-editor.js.map +1 -1
  233. package/code-editor/status-bar.js +19 -22
  234. package/code-editor/status-bar.js.map +1 -1
  235. package/code-editor/tab-button.js +7 -10
  236. package/code-editor/tab-button.js.map +1 -1
  237. package/code-editor/util.js +6 -6
  238. package/code-editor/util.js.map +1 -1
  239. package/collection-preferences/index.js +21 -23
  240. package/collection-preferences/index.js.map +1 -1
  241. package/collection-preferences/utils.js +25 -57
  242. package/collection-preferences/utils.js.map +1 -1
  243. package/collection-preferences/visible-content.js +23 -27
  244. package/collection-preferences/visible-content.js.map +1 -1
  245. package/column-layout/index.js +6 -6
  246. package/column-layout/index.js.map +1 -1
  247. package/column-layout/internal.js +20 -21
  248. package/column-layout/internal.js.map +1 -1
  249. package/column-layout/util.js +2 -2
  250. package/column-layout/util.js.map +1 -1
  251. package/container/index.js +5 -5
  252. package/container/index.js.map +1 -1
  253. package/container/internal.js +30 -31
  254. package/container/internal.js.map +1 -1
  255. package/container/use-sticky-header.js +25 -25
  256. package/container/use-sticky-header.js.map +1 -1
  257. package/content-layout/index.js +2 -3
  258. package/content-layout/index.js.map +1 -1
  259. package/content-layout/internal.js +15 -16
  260. package/content-layout/internal.js.map +1 -1
  261. package/date-input/index.js +3 -4
  262. package/date-input/index.js.map +1 -1
  263. package/date-input/internal.js +8 -8
  264. package/date-input/internal.js.map +1 -1
  265. package/date-picker/index.js +28 -28
  266. package/date-picker/index.js.map +1 -1
  267. package/date-range-picker/calendar/grids/grid.js +54 -57
  268. package/date-range-picker/calendar/grids/grid.js.map +1 -1
  269. package/date-range-picker/calendar/grids/index.js +27 -28
  270. package/date-range-picker/calendar/grids/index.js.map +1 -1
  271. package/date-range-picker/calendar/header/header-button.js +4 -6
  272. package/date-range-picker/calendar/header/header-button.js.map +1 -1
  273. package/date-range-picker/calendar/header/index.js +6 -7
  274. package/date-range-picker/calendar/header/index.js.map +1 -1
  275. package/date-range-picker/calendar/index.js +40 -45
  276. package/date-range-picker/calendar/index.js.map +1 -1
  277. package/date-range-picker/calendar/range-inputs.js +5 -6
  278. package/date-range-picker/calendar/range-inputs.js.map +1 -1
  279. package/date-range-picker/calendar/utils.js +2 -2
  280. package/date-range-picker/calendar/utils.js.map +1 -1
  281. package/date-range-picker/dropdown.js +29 -34
  282. package/date-range-picker/dropdown.js.map +1 -1
  283. package/date-range-picker/index.js +40 -43
  284. package/date-range-picker/index.js.map +1 -1
  285. package/date-range-picker/mode-switcher.js +2 -3
  286. package/date-range-picker/mode-switcher.js.map +1 -1
  287. package/date-range-picker/relative-range/index.js +36 -40
  288. package/date-range-picker/relative-range/index.js.map +1 -1
  289. package/date-range-picker/time-offset.js +5 -5
  290. package/date-range-picker/time-offset.js.map +1 -1
  291. package/date-range-picker/utils.js +4 -5
  292. package/date-range-picker/utils.js.map +1 -1
  293. package/expandable-section/expandable-section-container.js +5 -5
  294. package/expandable-section/expandable-section-container.js.map +1 -1
  295. package/expandable-section/expandable-section-header.js +18 -23
  296. package/expandable-section/expandable-section-header.js.map +1 -1
  297. package/expandable-section/index.js +4 -4
  298. package/expandable-section/index.js.map +1 -1
  299. package/expandable-section/internal.js +22 -22
  300. package/expandable-section/internal.js.map +1 -1
  301. package/flashbar/collapsible-flashbar.js +103 -118
  302. package/flashbar/collapsible-flashbar.js.map +1 -1
  303. package/flashbar/common.js +26 -35
  304. package/flashbar/common.js.map +1 -1
  305. package/flashbar/constant.js +1 -1
  306. package/flashbar/constant.js.map +1 -1
  307. package/flashbar/flash.js +23 -26
  308. package/flashbar/flash.js.map +1 -1
  309. package/flashbar/index.js +3 -4
  310. package/flashbar/index.js.map +1 -1
  311. package/flashbar/internal/analytics.js +12 -12
  312. package/flashbar/internal/analytics.js.map +1 -1
  313. package/flashbar/non-collapsible-flashbar.js +10 -10
  314. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  315. package/flashbar/utils.js +25 -27
  316. package/flashbar/utils.js.map +1 -1
  317. package/form/index.js +4 -4
  318. package/form/index.js.map +1 -1
  319. package/form/internal.js +5 -6
  320. package/form/internal.js.map +1 -1
  321. package/form-field/index.js +4 -4
  322. package/form-field/index.js.map +1 -1
  323. package/form-field/internal.js +20 -23
  324. package/form-field/internal.js.map +1 -1
  325. package/form-field/util.js +9 -10
  326. package/form-field/util.js.map +1 -1
  327. package/grid/index.js +6 -6
  328. package/grid/index.js.map +1 -1
  329. package/grid/internal.js +14 -15
  330. package/grid/internal.js.map +1 -1
  331. package/header/index.js +4 -4
  332. package/header/index.js.map +1 -1
  333. package/header/internal.js +15 -15
  334. package/header/internal.js.map +1 -1
  335. package/help-panel/index.js +7 -7
  336. package/help-panel/index.js.map +1 -1
  337. package/hotspot/index.js +12 -12
  338. package/hotspot/index.js.map +1 -1
  339. package/icon/index.js +4 -4
  340. package/icon/index.js.map +1 -1
  341. package/icon/internal.js +18 -18
  342. package/icon/internal.js.map +1 -1
  343. package/input/index.js +36 -17
  344. package/input/index.js.map +1 -1
  345. package/input/internal.js +30 -25
  346. package/input/internal.js.map +1 -1
  347. package/input/utils.js +4 -5
  348. package/input/utils.js.map +1 -1
  349. package/internal/animate.js +27 -32
  350. package/internal/animate.js.map +1 -1
  351. package/internal/base-component/index.js +2 -2
  352. package/internal/base-component/index.js.map +1 -1
  353. package/internal/breakpoints.js +7 -12
  354. package/internal/breakpoints.js.map +1 -1
  355. package/internal/components/abstract-switch/index.d.ts +2 -1
  356. package/internal/components/abstract-switch/index.d.ts.map +1 -1
  357. package/internal/components/abstract-switch/index.js +19 -19
  358. package/internal/components/abstract-switch/index.js.map +1 -1
  359. package/internal/components/abstract-switch/styles.css.js +13 -12
  360. package/internal/components/abstract-switch/styles.scoped.css +21 -21
  361. package/internal/components/abstract-switch/styles.selectors.js +13 -12
  362. package/internal/components/autosuggest-input/index.js +38 -38
  363. package/internal/components/autosuggest-input/index.js.map +1 -1
  364. package/internal/components/button-trigger/index.js +7 -7
  365. package/internal/components/button-trigger/index.js.map +1 -1
  366. package/internal/components/cartesian-chart/axis-label.js +1 -2
  367. package/internal/components/cartesian-chart/axis-label.js.map +1 -1
  368. package/internal/components/cartesian-chart/bottom-labels.js +20 -26
  369. package/internal/components/cartesian-chart/bottom-labels.js.map +1 -1
  370. package/internal/components/cartesian-chart/constants.js +5 -5
  371. package/internal/components/cartesian-chart/constants.js.map +1 -1
  372. package/internal/components/cartesian-chart/emphasized-baseline.js +4 -5
  373. package/internal/components/cartesian-chart/emphasized-baseline.js.map +1 -1
  374. package/internal/components/cartesian-chart/highlighted-point.js +1 -2
  375. package/internal/components/cartesian-chart/highlighted-point.js.map +1 -1
  376. package/internal/components/cartesian-chart/label-utils.js +20 -24
  377. package/internal/components/cartesian-chart/label-utils.js.map +1 -1
  378. package/internal/components/cartesian-chart/labels-measure.js +6 -7
  379. package/internal/components/cartesian-chart/labels-measure.js.map +1 -1
  380. package/internal/components/cartesian-chart/left-labels.js +13 -17
  381. package/internal/components/cartesian-chart/left-labels.js.map +1 -1
  382. package/internal/components/cartesian-chart/scales.js +21 -26
  383. package/internal/components/cartesian-chart/scales.js.map +1 -1
  384. package/internal/components/cartesian-chart/ticks.js +9 -10
  385. package/internal/components/cartesian-chart/ticks.js.map +1 -1
  386. package/internal/components/cartesian-chart/vertical-grid-lines.js +3 -4
  387. package/internal/components/cartesian-chart/vertical-grid-lines.js.map +1 -1
  388. package/internal/components/cartesian-chart/vertical-marker.js +3 -4
  389. package/internal/components/cartesian-chart/vertical-marker.js.map +1 -1
  390. package/internal/components/chart-filter/index.js +13 -14
  391. package/internal/components/chart-filter/index.js.map +1 -1
  392. package/internal/components/chart-legend/index.js +26 -29
  393. package/internal/components/chart-legend/index.js.map +1 -1
  394. package/internal/components/chart-plot/application-controller.js +21 -25
  395. package/internal/components/chart-plot/application-controller.js.map +1 -1
  396. package/internal/components/chart-plot/focus-outline.js +7 -8
  397. package/internal/components/chart-plot/focus-outline.js.map +1 -1
  398. package/internal/components/chart-plot/index.js +33 -34
  399. package/internal/components/chart-plot/index.js.map +1 -1
  400. package/internal/components/chart-popover/index.js +11 -12
  401. package/internal/components/chart-popover/index.js.map +1 -1
  402. package/internal/components/chart-series-details/index.js +13 -17
  403. package/internal/components/chart-series-details/index.js.map +1 -1
  404. package/internal/components/chart-series-marker/index.js +2 -3
  405. package/internal/components/chart-series-marker/index.js.map +1 -1
  406. package/internal/components/chart-status-container/index.js +8 -10
  407. package/internal/components/chart-status-container/index.js.map +1 -1
  408. package/internal/components/checkbox-icon/index.js +18 -19
  409. package/internal/components/checkbox-icon/index.js.map +1 -1
  410. package/internal/components/dark-ribbon/index.js +13 -14
  411. package/internal/components/dark-ribbon/index.js.map +1 -1
  412. package/internal/components/dropdown/context.js +4 -5
  413. package/internal/components/dropdown/context.js.map +1 -1
  414. package/internal/components/dropdown/dropdown-fit-handler.js +74 -81
  415. package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
  416. package/internal/components/dropdown/index.js +57 -65
  417. package/internal/components/dropdown/index.js.map +1 -1
  418. package/internal/components/dropdown-footer/index.js +2 -6
  419. package/internal/components/dropdown-footer/index.js.map +1 -1
  420. package/internal/components/dropdown-status/index.js +5 -7
  421. package/internal/components/dropdown-status/index.js.map +1 -1
  422. package/internal/components/filtering-token/index.js +4 -6
  423. package/internal/components/filtering-token/index.js.map +1 -1
  424. package/internal/components/focus-lock/index.js +10 -11
  425. package/internal/components/focus-lock/index.js.map +1 -1
  426. package/internal/components/focus-lock/utils.js +4 -4
  427. package/internal/components/focus-lock/utils.js.map +1 -1
  428. package/internal/components/live-region/index.js +10 -10
  429. package/internal/components/live-region/index.js.map +1 -1
  430. package/internal/components/masked-input/index.js +22 -24
  431. package/internal/components/masked-input/index.js.map +1 -1
  432. package/internal/components/masked-input/keyboard-handler.js +18 -18
  433. package/internal/components/masked-input/keyboard-handler.js.map +1 -1
  434. package/internal/components/masked-input/use-mask.js +24 -28
  435. package/internal/components/masked-input/use-mask.js.map +1 -1
  436. package/internal/components/masked-input/utils/keys.js +4 -6
  437. package/internal/components/masked-input/utils/keys.js.map +1 -1
  438. package/internal/components/masked-input/utils/mask-format.js +103 -113
  439. package/internal/components/masked-input/utils/mask-format.js.map +1 -1
  440. package/internal/components/masked-input/utils/strings.js +1 -4
  441. package/internal/components/masked-input/utils/strings.js.map +1 -1
  442. package/internal/components/menu-dropdown/index.js +10 -12
  443. package/internal/components/menu-dropdown/index.js.map +1 -1
  444. package/internal/components/option/highlight-match.js +14 -18
  445. package/internal/components/option/highlight-match.js.map +1 -1
  446. package/internal/components/option/index.js +13 -13
  447. package/internal/components/option/index.js.map +1 -1
  448. package/internal/components/option/option-announcer.js +1 -1
  449. package/internal/components/option/option-announcer.js.map +1 -1
  450. package/internal/components/option/option-parts.js +28 -45
  451. package/internal/components/option/option-parts.js.map +1 -1
  452. package/internal/components/option/utils/filter-options.js +16 -19
  453. package/internal/components/option/utils/filter-options.js.map +1 -1
  454. package/internal/components/option/utils/flatten-options.js +15 -15
  455. package/internal/components/option/utils/flatten-options.js.map +1 -1
  456. package/internal/components/option/utils/prepare-options.js +3 -3
  457. package/internal/components/option/utils/prepare-options.js.map +1 -1
  458. package/internal/components/options-list/index.js +19 -20
  459. package/internal/components/options-list/index.js.map +1 -1
  460. package/internal/components/options-list/utils/test-indexes.js +11 -11
  461. package/internal/components/options-list/utils/test-indexes.js.map +1 -1
  462. package/internal/components/options-list/utils/use-highlight-option.js +17 -21
  463. package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
  464. package/internal/components/options-list/utils/use-ids.js +2 -2
  465. package/internal/components/options-list/utils/use-ids.js.map +1 -1
  466. package/internal/components/options-list/utils/use-keyboard.js +6 -8
  467. package/internal/components/options-list/utils/use-keyboard.js.map +1 -1
  468. package/internal/components/options-list/utils/use-open-state.js +6 -7
  469. package/internal/components/options-list/utils/use-open-state.js.map +1 -1
  470. package/internal/components/portal/index.js +5 -6
  471. package/internal/components/portal/index.js.map +1 -1
  472. package/internal/components/screenreader-only/index.js +1 -2
  473. package/internal/components/screenreader-only/index.js.map +1 -1
  474. package/internal/components/selectable-item/index.js +25 -26
  475. package/internal/components/selectable-item/index.js.map +1 -1
  476. package/internal/components/tab-trap/index.js +1 -2
  477. package/internal/components/tab-trap/index.js.map +1 -1
  478. package/internal/components/transition/index.js +16 -16
  479. package/internal/components/transition/index.js.map +1 -1
  480. package/internal/components/visual-context/index.js +6 -7
  481. package/internal/components/visual-context/index.js.map +1 -1
  482. package/internal/context/app-layout-context.js +2 -2
  483. package/internal/context/app-layout-context.js.map +1 -1
  484. package/internal/context/form-field-context.js +4 -4
  485. package/internal/context/form-field-context.js.map +1 -1
  486. package/internal/context/split-panel-context.js +3 -3
  487. package/internal/context/split-panel-context.js.map +1 -1
  488. package/internal/debounce.js +6 -11
  489. package/internal/debounce.js.map +1 -1
  490. package/internal/environment.js +1 -1
  491. package/internal/events/index.js +12 -16
  492. package/internal/events/index.js.map +1 -1
  493. package/internal/focus-tracker.js +22 -27
  494. package/internal/focus-tracker.js.map +1 -1
  495. package/internal/generated/custom-css-properties/index.js +2 -2
  496. package/internal/generated/custom-css-properties/index.js.map +1 -1
  497. package/internal/hooks/check-controlled/index.js +1 -1
  498. package/internal/hooks/check-controlled/index.js.map +1 -1
  499. package/internal/hooks/container-queries/use-container-breakpoints.js +2 -2
  500. package/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
  501. package/internal/hooks/container-queries/use-container-query.js +5 -6
  502. package/internal/hooks/container-queries/use-container-query.js.map +1 -1
  503. package/internal/hooks/container-queries/use-resize-observer.js +13 -13
  504. package/internal/hooks/container-queries/use-resize-observer.js.map +1 -1
  505. package/internal/hooks/focus-visible/index.js +8 -8
  506. package/internal/hooks/focus-visible/index.js.map +1 -1
  507. package/internal/hooks/forward-focus/index.js +5 -9
  508. package/internal/hooks/forward-focus/index.js.map +1 -1
  509. package/internal/hooks/forward-focus/radio-group.js +7 -7
  510. package/internal/hooks/forward-focus/radio-group.js.map +1 -1
  511. package/internal/hooks/use-base-component/component-metadata.js +5 -5
  512. package/internal/hooks/use-base-component/component-metadata.js.map +1 -1
  513. package/internal/hooks/use-base-component/index.js +1 -1
  514. package/internal/hooks/use-base-component/index.js.map +1 -1
  515. package/internal/hooks/use-controllable/index.js +16 -17
  516. package/internal/hooks/use-controllable/index.js.map +1 -1
  517. package/internal/hooks/use-date-cache/index.js +2 -2
  518. package/internal/hooks/use-date-cache/index.js.map +1 -1
  519. package/internal/hooks/use-debounce-callback/index.js +3 -7
  520. package/internal/hooks/use-debounce-callback/index.js.map +1 -1
  521. package/internal/hooks/use-dynamic-overlap/index.js +4 -4
  522. package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
  523. package/internal/hooks/use-effect-on-update.js +2 -2
  524. package/internal/hooks/use-effect-on-update.js.map +1 -1
  525. package/internal/hooks/use-focus-tracker.js +7 -8
  526. package/internal/hooks/use-focus-tracker.js.map +1 -1
  527. package/internal/hooks/use-has-rendered/index.js +6 -6
  528. package/internal/hooks/use-has-rendered/index.js.map +1 -1
  529. package/internal/hooks/use-merge-refs/index.js +5 -9
  530. package/internal/hooks/use-merge-refs/index.js.map +1 -1
  531. package/internal/hooks/use-mobile/index.js +7 -7
  532. package/internal/hooks/use-mobile/index.js.map +1 -1
  533. package/internal/hooks/use-mouse-down-target.js +5 -5
  534. package/internal/hooks/use-mouse-down-target.js.map +1 -1
  535. package/internal/hooks/use-mutation-observer/index.js +5 -5
  536. package/internal/hooks/use-mutation-observer/index.js.map +1 -1
  537. package/internal/hooks/use-portal-mode-classes/index.js +10 -12
  538. package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
  539. package/internal/hooks/use-previous/index.js +3 -3
  540. package/internal/hooks/use-previous/index.js.map +1 -1
  541. package/internal/hooks/use-scroll-sync/index.js +8 -9
  542. package/internal/hooks/use-scroll-sync/index.js.map +1 -1
  543. package/internal/hooks/use-singleton-handler/index.js +12 -14
  544. package/internal/hooks/use-singleton-handler/index.js.map +1 -1
  545. package/internal/hooks/use-stable-event-handler/index.js +3 -10
  546. package/internal/hooks/use-stable-event-handler/index.js.map +1 -1
  547. package/internal/hooks/use-telemetry/index.js +2 -2
  548. package/internal/hooks/use-telemetry/index.js.map +1 -1
  549. package/internal/hooks/use-telemetry/telemetry.js +3 -4
  550. package/internal/hooks/use-telemetry/telemetry.js.map +1 -1
  551. package/internal/hooks/use-unique-id/index.js +3 -3
  552. package/internal/hooks/use-unique-id/index.js.map +1 -1
  553. package/internal/hooks/use-visual-mode/index.js +11 -11
  554. package/internal/hooks/use-visual-mode/index.js.map +1 -1
  555. package/internal/is-development.js +1 -1
  556. package/internal/is-development.js.map +1 -1
  557. package/internal/logging.js +2 -2
  558. package/internal/logging.js.map +1 -1
  559. package/internal/manifest.json +1 -1
  560. package/internal/metrics/log-clients.js +18 -27
  561. package/internal/metrics/log-clients.js.map +1 -1
  562. package/internal/metrics/metrics-formatters.js +11 -14
  563. package/internal/metrics/metrics-formatters.js.map +1 -1
  564. package/internal/metrics/metrics.js +27 -33
  565. package/internal/metrics/metrics.js.map +1 -1
  566. package/internal/motion.js +2 -2
  567. package/internal/motion.js.map +1 -1
  568. package/internal/styles/colors.js +1 -1
  569. package/internal/styles/colors.js.map +1 -1
  570. package/internal/utils/browser-scrollbar-size.js +5 -5
  571. package/internal/utils/browser-scrollbar-size.js.map +1 -1
  572. package/internal/utils/calculate-once.js +2 -2
  573. package/internal/utils/calculate-once.js.map +1 -1
  574. package/internal/utils/check-safe-url.js +4 -4
  575. package/internal/utils/check-safe-url.js.map +1 -1
  576. package/internal/utils/create-category-color-scale.js +6 -9
  577. package/internal/utils/create-category-color-scale.js.map +1 -1
  578. package/internal/utils/date-time/format-date-range.js +3 -3
  579. package/internal/utils/date-time/format-date-range.js.map +1 -1
  580. package/internal/utils/date-time/format-date.js +4 -4
  581. package/internal/utils/date-time/format-date.js.map +1 -1
  582. package/internal/utils/date-time/format-time.js +5 -5
  583. package/internal/utils/date-time/format-time.js.map +1 -1
  584. package/internal/utils/date-time/format-timezone-offset.js +4 -4
  585. package/internal/utils/date-time/format-timezone-offset.js.map +1 -1
  586. package/internal/utils/date-time/is-iso-date-only.js +1 -1
  587. package/internal/utils/date-time/is-iso-date-only.js.map +1 -1
  588. package/internal/utils/date-time/join-date-time.js +3 -3
  589. package/internal/utils/date-time/join-date-time.js.map +1 -1
  590. package/internal/utils/date-time/parse-date.js +5 -6
  591. package/internal/utils/date-time/parse-date.js.map +1 -1
  592. package/internal/utils/date-time/parse-timezone-offset.js +5 -5
  593. package/internal/utils/date-time/parse-timezone-offset.js.map +1 -1
  594. package/internal/utils/date-time/shift-timezone-offset.js +6 -6
  595. package/internal/utils/date-time/shift-timezone-offset.js.map +1 -1
  596. package/internal/utils/dom.js +12 -12
  597. package/internal/utils/dom.js.map +1 -1
  598. package/internal/utils/external-props.js +3 -3
  599. package/internal/utils/external-props.js.map +1 -1
  600. package/internal/utils/focus-svg-element.js +1 -1
  601. package/internal/utils/focus-svg-element.js.map +1 -1
  602. package/internal/utils/locale/merge-locales.js +1 -1
  603. package/internal/utils/locale/merge-locales.js.map +1 -1
  604. package/internal/utils/locale/normalize-locale.js +3 -3
  605. package/internal/utils/locale/normalize-locale.js.map +1 -1
  606. package/internal/utils/promises.js +7 -11
  607. package/internal/utils/promises.js.map +1 -1
  608. package/internal/utils/scrollable-containers.js +14 -18
  609. package/internal/utils/scrollable-containers.js.map +1 -1
  610. package/internal/utils/strings/join-strings.js +1 -5
  611. package/internal/utils/strings/join-strings.js.map +1 -1
  612. package/internal/utils/strings/pad-left-zeros.js +1 -1
  613. package/internal/utils/strings/pad-left-zeros.js.map +1 -1
  614. package/internal/utils/throttle.js +10 -15
  615. package/internal/utils/throttle.js.map +1 -1
  616. package/internal/utils/use-container-width.js +3 -5
  617. package/internal/utils/use-container-width.js.map +1 -1
  618. package/line-chart/index.js +6 -6
  619. package/line-chart/index.js.map +1 -1
  620. package/link/index.js +5 -5
  621. package/link/index.js.map +1 -1
  622. package/link/internal.js +25 -25
  623. package/link/internal.js.map +1 -1
  624. package/mixed-line-bar-chart/bar-groups.js +3 -4
  625. package/mixed-line-bar-chart/bar-groups.js.map +1 -1
  626. package/mixed-line-bar-chart/bar-series.js +24 -33
  627. package/mixed-line-bar-chart/bar-series.js.map +1 -1
  628. package/mixed-line-bar-chart/chart-container.js +123 -138
  629. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  630. package/mixed-line-bar-chart/chart-filters.js +10 -17
  631. package/mixed-line-bar-chart/chart-filters.js.map +1 -1
  632. package/mixed-line-bar-chart/chart-legend.js +9 -13
  633. package/mixed-line-bar-chart/chart-legend.js.map +1 -1
  634. package/mixed-line-bar-chart/chart-popover.js +3 -4
  635. package/mixed-line-bar-chart/chart-popover.js.map +1 -1
  636. package/mixed-line-bar-chart/data-series.js +13 -17
  637. package/mixed-line-bar-chart/data-series.js.map +1 -1
  638. package/mixed-line-bar-chart/domain.js +32 -39
  639. package/mixed-line-bar-chart/domain.js.map +1 -1
  640. package/mixed-line-bar-chart/format-highlighted.js +13 -14
  641. package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  642. package/mixed-line-bar-chart/hooks/use-mouse-hover.js +32 -34
  643. package/mixed-line-bar-chart/hooks/use-mouse-hover.js.map +1 -1
  644. package/mixed-line-bar-chart/hooks/use-navigation.js +48 -57
  645. package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
  646. package/mixed-line-bar-chart/hooks/use-popover.js +7 -7
  647. package/mixed-line-bar-chart/hooks/use-popover.js.map +1 -1
  648. package/mixed-line-bar-chart/index.js +4 -4
  649. package/mixed-line-bar-chart/index.js.map +1 -1
  650. package/mixed-line-bar-chart/internal.js +47 -49
  651. package/mixed-line-bar-chart/internal.js.map +1 -1
  652. package/mixed-line-bar-chart/line-series.js +19 -24
  653. package/mixed-line-bar-chart/line-series.js.map +1 -1
  654. package/mixed-line-bar-chart/make-scaled-bar-groups.js +10 -11
  655. package/mixed-line-bar-chart/make-scaled-bar-groups.js.map +1 -1
  656. package/mixed-line-bar-chart/make-scaled-series.js +30 -38
  657. package/mixed-line-bar-chart/make-scaled-series.js.map +1 -1
  658. package/mixed-line-bar-chart/utils.js +18 -21
  659. package/mixed-line-bar-chart/utils.js.map +1 -1
  660. package/modal/body-scroll.js +4 -4
  661. package/modal/body-scroll.js.map +1 -1
  662. package/modal/index.js +4 -4
  663. package/modal/index.js.map +1 -1
  664. package/modal/internal.js +24 -25
  665. package/modal/internal.js.map +1 -1
  666. package/multiselect/index.js +5 -5
  667. package/multiselect/index.js.map +1 -1
  668. package/multiselect/internal.js +81 -88
  669. package/multiselect/internal.js.map +1 -1
  670. package/package.json +1 -1
  671. package/pagination/index.js +2 -3
  672. package/pagination/index.js.map +1 -1
  673. package/pagination/internal.js +16 -17
  674. package/pagination/internal.js.map +1 -1
  675. package/pagination/utils.js +12 -12
  676. package/pagination/utils.js.map +1 -1
  677. package/pie-chart/index.js +38 -39
  678. package/pie-chart/index.js.map +1 -1
  679. package/pie-chart/labels.js +38 -42
  680. package/pie-chart/labels.js.map +1 -1
  681. package/pie-chart/pie-chart.js +65 -67
  682. package/pie-chart/pie-chart.js.map +1 -1
  683. package/pie-chart/responsive-text.js +9 -10
  684. package/pie-chart/responsive-text.js.map +1 -1
  685. package/pie-chart/segments.js +27 -31
  686. package/pie-chart/segments.js.map +1 -1
  687. package/pie-chart/utils.js +32 -35
  688. package/pie-chart/utils.js.map +1 -1
  689. package/popover/arrow.js +2 -2
  690. package/popover/arrow.js.map +1 -1
  691. package/popover/body.js +16 -19
  692. package/popover/body.js.map +1 -1
  693. package/popover/container.js +52 -55
  694. package/popover/container.js.map +1 -1
  695. package/popover/index.js +6 -6
  696. package/popover/index.js.map +1 -1
  697. package/popover/internal.js +28 -28
  698. package/popover/internal.js.map +1 -1
  699. package/popover/utils/positions.js +54 -66
  700. package/popover/utils/positions.js.map +1 -1
  701. package/progress-bar/index.js +17 -17
  702. package/progress-bar/index.js.map +1 -1
  703. package/progress-bar/internal.js +12 -16
  704. package/progress-bar/internal.js.map +1 -1
  705. package/property-filter/controller.js +117 -125
  706. package/property-filter/controller.js.map +1 -1
  707. package/property-filter/filter-options.js +8 -11
  708. package/property-filter/filter-options.js.map +1 -1
  709. package/property-filter/index.js +50 -50
  710. package/property-filter/index.js.map +1 -1
  711. package/property-filter/property-editor.js +4 -5
  712. package/property-filter/property-editor.js.map +1 -1
  713. package/property-filter/property-filter-autosuggest.js +39 -39
  714. package/property-filter/property-filter-autosuggest.js.map +1 -1
  715. package/property-filter/token-editor.js +55 -66
  716. package/property-filter/token-editor.js.map +1 -1
  717. package/property-filter/token.js +9 -11
  718. package/property-filter/token.js.map +1 -1
  719. package/property-filter/use-load-items.js +8 -12
  720. package/property-filter/use-load-items.js.map +1 -1
  721. package/property-filter/utils.js +13 -18
  722. package/property-filter/utils.js.map +1 -1
  723. package/radio-group/index.js +3 -4
  724. package/radio-group/index.js.map +1 -1
  725. package/radio-group/internal.js +9 -9
  726. package/radio-group/internal.js.map +1 -1
  727. package/radio-group/radio-button.js +12 -15
  728. package/radio-group/radio-button.js.map +1 -1
  729. package/s3-resource-selector/index.js +29 -29
  730. package/s3-resource-selector/index.js.map +1 -1
  731. package/s3-resource-selector/s3-in-context/index.js +16 -18
  732. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  733. package/s3-resource-selector/s3-in-context/search-input.js +3 -4
  734. package/s3-resource-selector/s3-in-context/search-input.js.map +1 -1
  735. package/s3-resource-selector/s3-in-context/use-versions-fetch.js +16 -16
  736. package/s3-resource-selector/s3-in-context/use-versions-fetch.js.map +1 -1
  737. package/s3-resource-selector/s3-in-context/validation.js +6 -6
  738. package/s3-resource-selector/s3-in-context/validation.js.map +1 -1
  739. package/s3-resource-selector/s3-modal/basic-table.js +19 -20
  740. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  741. package/s3-resource-selector/s3-modal/buckets-table.js +11 -13
  742. package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
  743. package/s3-resource-selector/s3-modal/column-formats.js +5 -5
  744. package/s3-resource-selector/s3-modal/column-formats.js.map +1 -1
  745. package/s3-resource-selector/s3-modal/empty-state.js +1 -2
  746. package/s3-resource-selector/s3-modal/empty-state.js.map +1 -1
  747. package/s3-resource-selector/s3-modal/index.js +37 -43
  748. package/s3-resource-selector/s3-modal/index.js.map +1 -1
  749. package/s3-resource-selector/s3-modal/objects-table.js +12 -14
  750. package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
  751. package/s3-resource-selector/s3-modal/table-utils.js +9 -12
  752. package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
  753. package/s3-resource-selector/s3-modal/versions-table.js +10 -12
  754. package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
  755. package/s3-resource-selector/utils.js +1 -1
  756. package/s3-resource-selector/utils.js.map +1 -1
  757. package/segmented-control/index.js +2 -3
  758. package/segmented-control/index.js.map +1 -1
  759. package/segmented-control/internal-segmented-control.js +16 -17
  760. package/segmented-control/internal-segmented-control.js.map +1 -1
  761. package/segmented-control/internal.js +14 -14
  762. package/segmented-control/internal.js.map +1 -1
  763. package/segmented-control/segment.js +3 -6
  764. package/segmented-control/segment.js.map +1 -1
  765. package/select/index.js +6 -6
  766. package/select/index.js.map +1 -1
  767. package/select/internal.js +58 -58
  768. package/select/internal.js.map +1 -1
  769. package/select/parts/filter.js +4 -4
  770. package/select/parts/filter.js.map +1 -1
  771. package/select/parts/item.js +10 -10
  772. package/select/parts/item.js.map +1 -1
  773. package/select/parts/multiselect-item.js +13 -14
  774. package/select/parts/multiselect-item.js.map +1 -1
  775. package/select/parts/plain-list.js +13 -15
  776. package/select/parts/plain-list.js.map +1 -1
  777. package/select/parts/trigger.js +7 -9
  778. package/select/parts/trigger.js.map +1 -1
  779. package/select/parts/virtual-list.js +27 -33
  780. package/select/parts/virtual-list.js.map +1 -1
  781. package/select/utils/check-option-value-field.js +2 -2
  782. package/select/utils/check-option-value-field.js.map +1 -1
  783. package/select/utils/connect-options.js +6 -7
  784. package/select/utils/connect-options.js.map +1 -1
  785. package/select/utils/get-item-props.js +4 -7
  786. package/select/utils/get-item-props.js.map +1 -1
  787. package/select/utils/render-options.js +13 -15
  788. package/select/utils/render-options.js.map +1 -1
  789. package/select/utils/use-announcement.js +10 -11
  790. package/select/utils/use-announcement.js.map +1 -1
  791. package/select/utils/use-load-items.js +16 -19
  792. package/select/utils/use-load-items.js.map +1 -1
  793. package/select/utils/use-native-search.js +20 -29
  794. package/select/utils/use-native-search.js.map +1 -1
  795. package/select/utils/use-select.js +89 -96
  796. package/select/utils/use-select.js.map +1 -1
  797. package/side-navigation/index.js +10 -10
  798. package/side-navigation/index.js.map +1 -1
  799. package/side-navigation/internal.js +35 -46
  800. package/side-navigation/internal.js.map +1 -1
  801. package/side-navigation/util.js +9 -12
  802. package/side-navigation/util.js.map +1 -1
  803. package/space-between/index.js +4 -4
  804. package/space-between/index.js.map +1 -1
  805. package/space-between/internal.js +7 -7
  806. package/space-between/internal.js.map +1 -1
  807. package/spinner/index.js +4 -4
  808. package/spinner/index.js.map +1 -1
  809. package/spinner/internal.js +4 -4
  810. package/spinner/internal.js.map +1 -1
  811. package/split-panel/bottom.js +22 -25
  812. package/split-panel/bottom.js.map +1 -1
  813. package/split-panel/icons/bottom-icon-refresh.js +11 -13
  814. package/split-panel/icons/bottom-icon-refresh.js.map +1 -1
  815. package/split-panel/icons/bottom-icon.js +1 -1
  816. package/split-panel/icons/bottom-icon.js.map +1 -1
  817. package/split-panel/icons/resize-handler.js +3 -6
  818. package/split-panel/icons/resize-handler.js.map +1 -1
  819. package/split-panel/icons/side-position-refresh.js +12 -14
  820. package/split-panel/icons/side-position-refresh.js.map +1 -1
  821. package/split-panel/icons/side-position.js +1 -1
  822. package/split-panel/icons/side-position.js.map +1 -1
  823. package/split-panel/index.js +65 -65
  824. package/split-panel/index.js.map +1 -1
  825. package/split-panel/preferences-modal.js +9 -9
  826. package/split-panel/preferences-modal.js.map +1 -1
  827. package/split-panel/side.js +12 -15
  828. package/split-panel/side.js.map +1 -1
  829. package/split-panel/utils/size-utils.js +3 -3
  830. package/split-panel/utils/size-utils.js.map +1 -1
  831. package/split-panel/utils/use-keyboard-events.js +13 -17
  832. package/split-panel/utils/use-keyboard-events.js.map +1 -1
  833. package/split-panel/utils/use-pointer-events.js +12 -13
  834. package/split-panel/utils/use-pointer-events.js.map +1 -1
  835. package/status-indicator/index.js +4 -4
  836. package/status-indicator/index.js.map +1 -1
  837. package/status-indicator/internal.js +9 -10
  838. package/status-indicator/internal.js.map +1 -1
  839. package/table/body-cell/click-away.js +9 -10
  840. package/table/body-cell/click-away.js.map +1 -1
  841. package/table/body-cell/index.js +18 -18
  842. package/table/body-cell/index.js.map +1 -1
  843. package/table/body-cell/inline-editor.js +32 -46
  844. package/table/body-cell/inline-editor.js.map +1 -1
  845. package/table/body-cell/td-element.js +2 -4
  846. package/table/body-cell/td-element.js.map +1 -1
  847. package/table/body-cell/use-stable-scroll-position.js +10 -13
  848. package/table/body-cell/use-stable-scroll-position.js.map +1 -1
  849. package/table/header-cell/index.d.ts +4 -2
  850. package/table/header-cell/index.d.ts.map +1 -1
  851. package/table/header-cell/index.js +33 -34
  852. package/table/header-cell/index.js.map +1 -1
  853. package/table/header-cell/utils.js +10 -12
  854. package/table/header-cell/utils.js.map +1 -1
  855. package/table/index.js +5 -5
  856. package/table/index.js.map +1 -1
  857. package/table/internal.d.ts.map +1 -1
  858. package/table/internal.js +94 -118
  859. package/table/internal.js.map +1 -1
  860. package/table/resizer/index.d.ts +5 -1
  861. package/table/resizer/index.d.ts.map +1 -1
  862. package/table/resizer/index.js +40 -39
  863. package/table/resizer/index.js.map +1 -1
  864. package/table/selection-control/index.d.ts +4 -1
  865. package/table/selection-control/index.d.ts.map +1 -1
  866. package/table/selection-control/index.js +11 -11
  867. package/table/selection-control/index.js.map +1 -1
  868. package/table/sticky-header.d.ts +2 -2
  869. package/table/sticky-header.d.ts.map +1 -1
  870. package/table/sticky-header.js +16 -15
  871. package/table/sticky-header.js.map +1 -1
  872. package/table/sticky-scrollbar.js +5 -6
  873. package/table/sticky-scrollbar.js.map +1 -1
  874. package/table/sticky-scrolling.js +10 -10
  875. package/table/sticky-scrolling.js.map +1 -1
  876. package/table/thead.d.ts +11 -3
  877. package/table/thead.d.ts.map +1 -1
  878. package/table/thead.js +13 -13
  879. package/table/thead.js.map +1 -1
  880. package/table/tools-header.js +4 -5
  881. package/table/tools-header.js.map +1 -1
  882. package/table/use-column-widths.js +34 -44
  883. package/table/use-column-widths.js.map +1 -1
  884. package/table/use-row-events.js +10 -11
  885. package/table/use-row-events.js.map +1 -1
  886. package/table/use-selection.js +75 -81
  887. package/table/use-selection.js.map +1 -1
  888. package/table/use-sticky-header.js +16 -16
  889. package/table/use-sticky-header.js.map +1 -1
  890. package/table/use-sticky-scrollbar.js +42 -42
  891. package/table/use-sticky-scrollbar.js.map +1 -1
  892. package/table/use-table-focus-navigation.js +27 -28
  893. package/table/use-table-focus-navigation.js.map +1 -1
  894. package/table/utils.js +7 -7
  895. package/table/utils.js.map +1 -1
  896. package/tabs/index.js +30 -33
  897. package/tabs/index.js.map +1 -1
  898. package/tabs/scroll-utils.js +12 -13
  899. package/tabs/scroll-utils.js.map +1 -1
  900. package/tabs/smooth-scroll.js +17 -17
  901. package/tabs/smooth-scroll.js.map +1 -1
  902. package/tabs/tab-header-bar.js +61 -66
  903. package/tabs/tab-header-bar.js.map +1 -1
  904. package/tag-editor/index.js +59 -72
  905. package/tag-editor/index.js.map +1 -1
  906. package/tag-editor/internal.js +21 -29
  907. package/tag-editor/internal.js.map +1 -1
  908. package/tag-editor/utils.js +7 -8
  909. package/tag-editor/utils.js.map +1 -1
  910. package/tag-editor/validation.js +16 -18
  911. package/tag-editor/validation.js.map +1 -1
  912. package/text-content/index.js +6 -6
  913. package/text-content/index.js.map +1 -1
  914. package/text-filter/index.js +3 -4
  915. package/text-filter/index.js.map +1 -1
  916. package/text-filter/internal.js +10 -10
  917. package/text-filter/internal.js.map +1 -1
  918. package/textarea/index.js +23 -24
  919. package/textarea/index.js.map +1 -1
  920. package/theming/index.js +2 -3
  921. package/theming/index.js.map +1 -1
  922. package/tiles/index.js +3 -4
  923. package/tiles/index.js.map +1 -1
  924. package/tiles/internal.js +17 -17
  925. package/tiles/internal.js.map +1 -1
  926. package/tiles/tile.js +7 -9
  927. package/tiles/tile.js.map +1 -1
  928. package/time-input/index.js +5 -5
  929. package/time-input/index.js.map +1 -1
  930. package/time-input/internal.js +9 -9
  931. package/time-input/internal.js.map +1 -1
  932. package/toggle/index.js +3 -4
  933. package/toggle/index.js.map +1 -1
  934. package/toggle/internal.js +15 -16
  935. package/toggle/internal.js.map +1 -1
  936. package/token-group/dismiss-button.js +5 -7
  937. package/token-group/dismiss-button.js.map +1 -1
  938. package/token-group/index.js +4 -4
  939. package/token-group/index.js.map +1 -1
  940. package/token-group/internal.js +14 -14
  941. package/token-group/internal.js.map +1 -1
  942. package/token-group/toggle.js +7 -9
  943. package/token-group/toggle.js.map +1 -1
  944. package/top-navigation/1.0-beta/index.js +4 -4
  945. package/top-navigation/1.0-beta/index.js.map +1 -1
  946. package/top-navigation/1.0-beta/internal.js +43 -46
  947. package/top-navigation/1.0-beta/internal.js.map +1 -1
  948. package/top-navigation/1.0-beta/parts/overflow-menu.js +16 -17
  949. package/top-navigation/1.0-beta/parts/overflow-menu.js.map +1 -1
  950. package/top-navigation/1.0-beta/parts/utility.js +9 -12
  951. package/top-navigation/1.0-beta/parts/utility.js.map +1 -1
  952. package/top-navigation/1.0-beta/use-top-navigation.js +46 -54
  953. package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
  954. package/top-navigation/index.js +4 -4
  955. package/top-navigation/index.js.map +1 -1
  956. package/top-navigation/internal.js +64 -71
  957. package/top-navigation/internal.js.map +1 -1
  958. package/top-navigation/parts/overflow-menu/header.js +3 -4
  959. package/top-navigation/parts/overflow-menu/header.js.map +1 -1
  960. package/top-navigation/parts/overflow-menu/index.js +4 -5
  961. package/top-navigation/parts/overflow-menu/index.js.map +1 -1
  962. package/top-navigation/parts/overflow-menu/menu-item.js +56 -61
  963. package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
  964. package/top-navigation/parts/overflow-menu/router.js +11 -13
  965. package/top-navigation/parts/overflow-menu/router.js.map +1 -1
  966. package/top-navigation/parts/overflow-menu/views/submenu.js +6 -8
  967. package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
  968. package/top-navigation/parts/overflow-menu/views/utilities.js +5 -7
  969. package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
  970. package/top-navigation/parts/utility.js +12 -15
  971. package/top-navigation/parts/utility.js.map +1 -1
  972. package/top-navigation/use-top-navigation.js +52 -59
  973. package/top-navigation/use-top-navigation.js.map +1 -1
  974. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js +5 -7
  975. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
  976. package/tutorial-panel/components/tutorial-detail-view/index.js +6 -7
  977. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  978. package/tutorial-panel/components/tutorial-detail-view/task-list.js +8 -15
  979. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  980. package/tutorial-panel/components/tutorial-detail-view/task.js +5 -6
  981. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  982. package/tutorial-panel/components/tutorial-list/index.js +19 -22
  983. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  984. package/tutorial-panel/index.js +8 -8
  985. package/tutorial-panel/index.js.map +1 -1
  986. package/wizard/index.js +28 -28
  987. package/wizard/index.js.map +1 -1
  988. package/wizard/internal/analytics.js +32 -42
  989. package/wizard/internal/analytics.js.map +1 -1
  990. package/wizard/unmount.js +6 -13
  991. package/wizard/unmount.js.map +1 -1
  992. package/wizard/wizard-actions.js +7 -8
  993. package/wizard/wizard-actions.js.map +1 -1
  994. package/wizard/wizard-form-header.js +2 -3
  995. package/wizard/wizard-form-header.js.map +1 -1
  996. package/wizard/wizard-form.js +14 -16
  997. package/wizard/wizard-form.js.map +1 -1
  998. package/wizard/wizard-navigation.js +19 -25
  999. package/wizard/wizard-navigation.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"compute-chart-props.js","sourceRoot":"","sources":["../../../../src/area-chart/model/compute-chart-props.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG5E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,GACd,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MAAA,EAAE,CAAC;AACpE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AreaChartProps } from '../interfaces';\nimport { computePlotPoints, computeDomainX, computeDomainY } from './utils';\n\nimport { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';\nimport {\n createXTicks,\n createYTicks,\n getXTickCount,\n getYTickCount,\n} from '../../internal/components/cartesian-chart/ticks';\nimport { ChartScale, NumericChartScale } from '../../internal/components/cartesian-chart/scales';\n\nexport default function computeChartProps<T extends AreaChartProps.DataTypes>({\n series,\n xDomain: externalXDomain,\n yDomain: externalYDomain,\n xScaleType,\n yScaleType,\n height,\n width,\n}: {\n series: readonly AreaChartProps.Series<T>[];\n xDomain?: XDomain<T>;\n yDomain?: YDomain;\n xScaleType: XScaleType;\n yScaleType: YScaleType;\n height: number;\n width: number;\n}) {\n const xDomain = externalXDomain || computeDomainX(series);\n const xTickCount = getXTickCount(width);\n const xScale = new ChartScale(xScaleType, xDomain, [0, width]);\n const xTicks = xScale.domain.length > 0 ? createXTicks(xScale, xTickCount) : [];\n\n const yDomain = externalYDomain || computeDomainY(series, yScaleType);\n const yTickCount = getYTickCount(height);\n const yScale = new NumericChartScale(yScaleType, yDomain, [height, 0], externalYDomain ? null : yTickCount);\n const yTicks = createYTicks(yScale, yTickCount);\n\n const plot = computePlotPoints(series, xScale, yScale);\n\n return { xDomain, yDomain, xScale, yScale, xTicks, yTicks, plot };\n}\n"]}
1
+ {"version":3,"file":"compute-chart-props.js","sourceRoot":"","sources":["../../../../src/area-chart/model/compute-chart-props.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG5E,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,GACd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,iB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ps } from '../interfaces';\nimport { computePlotPoints, computeDomainX, computeDomainY } from './utils';\n\nimport { XDomain, XScaleType, YDomain, YScaleType } from '../../internal/components/cartesian-chart/interfaces';\nimport {\n createXTicks,\n createYTicks,\n getXTickCount,\n getYTickCount,\n} from '../../internal/components/cartesian-chart/ticks';\nimport { ChartScale, NumericChartScale } from '../../internal/components/cartesian-chart/scales';\n\nexport default function computeChartProps<T extends AreaChartProps.DataTypes>({\n series,\n xDomain: externalXDomain,\n yDomain: externalYDomain,\n xScaleType,\n yScaleType,\n height,\n width,\n}: {\n series: readonly AreaChartProps.Series<T>[];\n xDomain?: XDomain<T>;\n yDomain?: YDomain;\n xScaleType: XScaleType;\n yScaleType: YScaleType;\n height: number;\n width: number;\n}) {\n const xDomain = externalXDomain || computeDomainX(series);\n const xTickCount = getXTickCount(width);\n const xScale = new ChartScale(xScaleType, xDomain, [0, width]);\n const xTicks = xScale.domain.length > 0 ? createXTicks(xScale, xTickCount) : [];\n\n const yDomain = externalYDomain || computeDomainY(series, yScaleType);\n const yTickCount = getYTickCount(height);\n const yScale = new NumericChartScale(yScaleType, yDomain, [height, 0], externalYDomain ? null : yTickCount);\n const yTicks = createYTicks(yScale, yTickCount);\n\n const plot = computePlotPoints(series, xScale, yScale);\n\n return { xDomain, yDomain, xScale, yScale, xTicks, yTicks, plot };\n}\n"]}
@@ -2,26 +2,24 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import createCategoryColorScale from '../../internal/utils/create-category-color-scale';
4
4
  export default function createSeriesDecorator(externalSeries) {
5
- var colorScale = createCategoryColorScale(externalSeries, function (s) { return s.type === 'threshold'; }, function (s) { return s.color || null; });
6
- var decorateSeries = function (s, index) {
7
- var title = s.title;
8
- var color = colorScale[index];
9
- var markerType = s.type === 'area' ? 'hollow-rectangle' : 'dashed';
10
- var formatValue = s.type === 'threshold'
11
- ? function () { return (s.valueFormatter ? s.valueFormatter(s.y) : s.y); }
12
- : function (y, x) { return (s.valueFormatter ? s.valueFormatter(y, x) : y); };
13
- return { series: s, title: title, color: color, markerType: markerType, formatValue: formatValue };
5
+ const colorScale = createCategoryColorScale(externalSeries, s => s.type === 'threshold', s => s.color || null);
6
+ const decorateSeries = (s, index) => {
7
+ const title = s.title;
8
+ const color = colorScale[index];
9
+ const markerType = s.type === 'area' ? 'hollow-rectangle' : 'dashed';
10
+ const formatValue = s.type === 'threshold'
11
+ ? () => (s.valueFormatter ? s.valueFormatter(s.y) : s.y)
12
+ : (y, x) => (s.valueFormatter ? s.valueFormatter(y, x) : y);
13
+ return { series: s, title, color, markerType, formatValue };
14
14
  };
15
15
  // Map external series to internal ones.
16
- var mapping = externalSeries.reduce(function (map, series, index) {
16
+ const mapping = externalSeries.reduce((map, series, index) => {
17
17
  map.set(series, decorateSeries(series, index));
18
18
  return map;
19
19
  }, new Map());
20
20
  // It is inconvenient to use internal series everywhere, that's
21
21
  // why we also provide a decorator function to get the internal series on demand.
22
- var seriesDecorator = function (series) {
23
- return mapping.get(series) || decorateSeries(series, externalSeries.length);
24
- };
22
+ const seriesDecorator = (series) => mapping.get(series) || decorateSeries(series, externalSeries.length);
25
23
  return seriesDecorator;
26
24
  }
27
25
  //# sourceMappingURL=create-series-decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-series-decorator.js","sourceRoot":"","sources":["../../../../src/area-chart/model/create-series-decorator.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,wBAAwB,MAAM,kDAAkD,CAAC;AAIxF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,cAAmD;IAEnD,IAAM,UAAU,GAAG,wBAAwB,CACzC,cAAc,EACd,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,KAAK,WAAW,EAAtB,CAAsB,EAC3B,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,KAAK,IAAI,IAAI,EAAf,CAAe,CACrB,CAAC;IAEF,IAAM,cAAc,GAAG,UAAC,CAA2B,EAAE,KAA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C;IAEvE,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport createCategoryColorScale from '../../internal/utils/create-category-color-scale';\nimport { AreaChartProps } from '../interfaces';\nimport { ChartModel } from './index';\n\nexport default function createSeriesDecorator<T extends AreaChartProps.DataTypes>(\n externalSeries: readonly AreaChartProps.Series<T>[]\n) {\n const colorScale = createCategoryColorScale(\n externalSeries,\n s => s.type === 'threshold',\n s => s.color || null\n );\n\n const decorateSeries = (s: AreaChartProps.Series<T>, index: number): ChartModel.InternalSeries<T> => {\n const title = s.title;\n const color = colorScale[index];\n const markerType = s.type === 'area' ? 'hollow-rectangle' : 'dashed';\n const formatValue =\n s.type === 'threshold'\n ? () => (s.valueFormatter ? s.valueFormatter(s.y) : s.y)\n : (y: number, x: T) => (s.valueFormatter ? s.valueFormatter(y, x) : y);\n\n return { series: s, title, color, markerType, formatValue };\n };\n\n // Map external series to internal ones.\n const mapping = externalSeries.reduce((map, series, index) => {\n map.set(series, decorateSeries(series, index));\n return map;\n }, new Map<AreaChartProps.Series<T>, ChartModel.InternalSeries<T>>());\n\n // It is inconvenient to use internal series everywhere, that's\n // why we also provide a decorator function to get the internal series on demand.\n const seriesDecorator = (series: AreaChartProps.Series<T>): ChartModel.InternalSeries<T> =>\n mapping.get(series) || decorateSeries(series, externalSeries.length);\n\n return seriesDecorator;\n}\n"]}
1
+ {"version":3,"file":"create-series-decorator.js","sourceRoot":"","sources":["../../../../src/area-chart/model/create-series-decorator.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,wBAAwB,MAAM,kDAAkD,CAAC;AAIxF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,cAAmD;IAEnD,MAAM,UAAU,GAAG,wBAAwB,CACzC,cAAc,EACd,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,EAC3B,CA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O,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAEvE,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport createCategoryColorScale from '../../internal/utils/create-category-color-scale';\nimport { AreaChartProps } from '../interfaces';\nimport { ChartModel } from './index';\n\nexport default function createSeriesDecorator<T extends AreaChartProps.DataTypes>(\n externalSeries: readonly AreaChartProps.Series<T>[]\n) {\n const colorScale = createCategoryColorScale(\n externalSeries,\n s => s.type === 'threshold',\n s => s.color || null\n );\n\n const decorateSeries = (s: AreaChartProps.Series<T>, index: number): ChartModel.InternalSeries<T> => {\n const title = s.title;\n const color = colorScale[index];\n const markerType = s.type === 'area' ? 'hollow-rectangle' : 'dashed';\n const formatValue =\n s.type === 'threshold'\n ? () => (s.valueFormatter ? s.valueFormatter(s.y) : s.y)\n : (y: number, x: T) => (s.valueFormatter ? s.valueFormatter(y, x) : y);\n\n return { series: s, title, color, markerType, formatValue };\n };\n\n // Map external series to internal ones.\n const mapping = externalSeries.reduce((map, series, index) => {\n map.set(series, decorateSeries(series, index));\n return map;\n }, new Map<AreaChartProps.Series<T>, ChartModel.InternalSeries<T>>());\n\n // It is inconvenient to use internal series everywhere, that's\n // why we also provide a decorator function to get the internal series on demand.\n const seriesDecorator = (series: AreaChartProps.Series<T>): ChartModel.InternalSeries<T> =>\n mapping.get(series) || decorateSeries(series, externalSeries.length);\n\n return seriesDecorator;\n}\n"]}
@@ -1,63 +1,56 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import AsyncStore from './async-store';
3
- var initialState = Object.freeze({
2
+ const initialState = Object.freeze({
4
3
  highlightedX: null,
5
4
  highlightedPoint: null,
6
5
  highlightedSeries: null,
7
6
  legendSeries: null,
8
- isPopoverPinned: false
7
+ isPopoverPinned: false,
9
8
  });
10
- var InteractionsStore = /** @class */ (function (_super) {
11
- __extends(InteractionsStore, _super);
12
- function InteractionsStore(series, plot) {
13
- var _this = _super.call(this, initialState) || this;
14
- _this.series = series;
15
- _this.plot = plot;
16
- return _this;
17
- }
18
- InteractionsStore.prototype.highlightPoint = function (point) {
19
- var _this = this;
20
- this.set(function (state) { return (__assign(__assign({}, state), { highlightedX: _this.plot.xy[point.index.x], highlightedPoint: point, highlightedSeries: _this.series[point.index.s], legendSeries: _this.series[point.index.s] })); });
21
- };
22
- InteractionsStore.prototype.highlightX = function (points) {
23
- this.set(function (state) { return (__assign(__assign({}, state), { highlightedX: points, highlightedPoint: null, highlightedSeries: null, legendSeries: null })); });
24
- };
25
- InteractionsStore.prototype.highlightFirstPoint = function () {
26
- var _this = this;
27
- this.set(function (state) {
28
- var series = state.legendSeries || state.highlightedSeries;
29
- var firstSeriesPoint = series && _this._getFirstSeriesPoint(series);
30
- var point = state.highlightedPoint || firstSeriesPoint || _this.plot.sx[0][0];
31
- return __assign(__assign({}, state), { highlightedX: _this.plot.xy[point.index.x], highlightedPoint: point, highlightedSeries: _this.series[point.index.s], legendSeries: _this.series[point.index.s] });
9
+ export default class InteractionsStore extends AsyncStore {
10
+ constructor(series, plot) {
11
+ super(initialState);
12
+ this.series = series;
13
+ this.plot = plot;
14
+ }
15
+ highlightPoint(point) {
16
+ this.set(state => (Object.assign(Object.assign({}, state), { highlightedX: this.plot.xy[point.index.x], highlightedPoint: point, highlightedSeries: this.series[point.index.s], legendSeries: this.series[point.index.s] })));
17
+ }
18
+ highlightX(points) {
19
+ this.set(state => (Object.assign(Object.assign({}, state), { highlightedX: points, highlightedPoint: null, highlightedSeries: null, legendSeries: null })));
20
+ }
21
+ highlightFirstPoint() {
22
+ this.set(state => {
23
+ const series = state.legendSeries || state.highlightedSeries;
24
+ const firstSeriesPoint = series && this._getFirstSeriesPoint(series);
25
+ const point = state.highlightedPoint || firstSeriesPoint || this.plot.sx[0][0];
26
+ return Object.assign(Object.assign({}, state), { highlightedX: this.plot.xy[point.index.x], highlightedPoint: point, highlightedSeries: this.series[point.index.s], legendSeries: this.series[point.index.s] });
32
27
  });
33
- };
34
- InteractionsStore.prototype.highlightSeries = function (s) {
35
- this.set(function (state) { return (__assign(__assign({}, state), { highlightedSeries: s, legendSeries: s })); });
36
- };
37
- InteractionsStore.prototype.clearHighlight = function () {
38
- this.set(function (state) { return (__assign(__assign({}, state), { highlightedX: null, highlightedPoint: null, highlightedSeries: null })); });
39
- };
40
- InteractionsStore.prototype.clearHighlightedLegend = function () {
41
- this.set(function (state) { return (__assign(__assign({}, state), { legendSeries: null })); });
42
- };
43
- InteractionsStore.prototype.clearState = function () {
44
- this.set(function () { return initialState; });
45
- };
46
- InteractionsStore.prototype.pinPopover = function () {
47
- this.set(function (state) { return (__assign(__assign({}, state), { isPopoverPinned: true })); });
48
- };
49
- InteractionsStore.prototype.unpinPopover = function () {
50
- this.set(function (state) { return (__assign(__assign({}, state), { isPopoverPinned: false })); });
51
- };
52
- InteractionsStore.prototype.togglePopoverPin = function () {
53
- this.set(function (state) { return (__assign(__assign({}, state), { isPopoverPinned: !state.isPopoverPinned })); });
54
- };
55
- InteractionsStore.prototype._getFirstSeriesPoint = function (s) {
56
- var seriesIndex = this.series.indexOf(s);
57
- var firstSeriesPoint = (this.plot.sx[seriesIndex] || [])[0];
28
+ }
29
+ highlightSeries(s) {
30
+ this.set(state => (Object.assign(Object.assign({}, state), { highlightedSeries: s, legendSeries: s })));
31
+ }
32
+ clearHighlight() {
33
+ this.set(state => (Object.assign(Object.assign({}, state), { highlightedX: null, highlightedPoint: null, highlightedSeries: null })));
34
+ }
35
+ clearHighlightedLegend() {
36
+ this.set(state => (Object.assign(Object.assign({}, state), { legendSeries: null })));
37
+ }
38
+ clearState() {
39
+ this.set(() => initialState);
40
+ }
41
+ pinPopover() {
42
+ this.set(state => (Object.assign(Object.assign({}, state), { isPopoverPinned: true })));
43
+ }
44
+ unpinPopover() {
45
+ this.set(state => (Object.assign(Object.assign({}, state), { isPopoverPinned: false })));
46
+ }
47
+ togglePopoverPin() {
48
+ this.set(state => (Object.assign(Object.assign({}, state), { isPopoverPinned: !state.isPopoverPinned })));
49
+ }
50
+ _getFirstSeriesPoint(s) {
51
+ const seriesIndex = this.series.indexOf(s);
52
+ const [firstSeriesPoint] = this.plot.sx[seriesIndex] || [];
58
53
  return firstSeriesPoint || null;
59
- };
60
- return InteractionsStore;
61
- }(AsyncStore));
62
- export default InteractionsStore;
54
+ }
55
+ }
63
56
  //# sourceMappingURL=interactions-store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interactions-store.js","sourceRoot":"","sources":["../../../../src/area-chart/model/interactions-store.ts"],"names":[],"mappings":";AAKA,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,IAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,IAAI;IACtB,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AAEH;IAAmF,qCAElF;IAIC,2BAAY,MAA2C,EAAE,IAAyC;QAAlG,YACE,kBAAM,YAAY,CAAC,SAIpB;QAFC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;;IACnB,CAAC;IAED,0CAAc,GAAd,UAAe,KAA8B;QAA7C,iBAQC;QAPC,IAAI,CAAC,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,uBACb,KAAK,KACR,YAAY,EAAE,KAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EACzC,gBAAgB,EAAE,KAAK,EACvB,iBAAiB,EAAE,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAC7C,YAAY,EAAE,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,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Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ChartModel } from './index';\nimport { AreaChartProps } from '../interfaces';\n\nimport AsyncStore from './async-store';\n\nconst initialState = Object.freeze({\n highlightedX: null,\n highlightedPoint: null,\n highlightedSeries: null,\n legendSeries: null,\n isPopoverPinned: false,\n});\n\nexport default class InteractionsStore<T extends AreaChartProps.DataTypes> extends AsyncStore<\n ChartModel.InteractionsState<T>\n> {\n series: readonly AreaChartProps.Series<T>[];\n plot: ChartModel.ComputedProps<T>['plot'];\n\n constructor(series: readonly AreaChartProps.Series<T>[], plot: ChartModel.ComputedProps<T>['plot']) {\n super(initialState);\n\n this.series = series;\n this.plot = plot;\n }\n\n highlightPoint(point: ChartModel.PlotPoint<T>) {\n this.set(state => ({\n ...state,\n highlightedX: this.plot.xy[point.index.x],\n highlightedPoint: point,\n highlightedSeries: this.series[point.index.s],\n legendSeries: this.series[point.index.s],\n }));\n }\n\n highlightX(points: readonly ChartModel.PlotPoint<T>[]) {\n this.set(state => ({\n ...state,\n highlightedX: points,\n highlightedPoint: null,\n highlightedSeries: null,\n legendSeries: null,\n }));\n }\n\n highlightFirstPoint() {\n this.set(state => {\n const series = state.legendSeries || state.highlightedSeries;\n const firstSeriesPoint = series && this._getFirstSeriesPoint(series);\n const point = state.highlightedPoint || firstSeriesPoint || this.plot.sx[0][0];\n return {\n ...state,\n highlightedX: this.plot.xy[point.index.x],\n highlightedPoint: point,\n highlightedSeries: this.series[point.index.s],\n legendSeries: this.series[point.index.s],\n };\n });\n }\n\n highlightSeries(s: null | AreaChartProps.Series<T>) {\n this.set(state => ({\n ...state,\n highlightedSeries: s,\n legendSeries: s,\n }));\n }\n\n clearHighlight() {\n this.set(state => ({\n ...state,\n highlightedX: null,\n highlightedPoint: null,\n highlightedSeries: null,\n }));\n }\n clearHighlightedLegend() {\n this.set(state => ({\n ...state,\n legendSeries: null,\n }));\n }\n\n clearState() {\n this.set(() => initialState);\n }\n\n pinPopover() {\n this.set(state => ({ ...state, isPopoverPinned: true }));\n }\n\n unpinPopover() {\n this.set(state => ({ ...state, isPopoverPinned: false }));\n }\n\n togglePopoverPin() {\n this.set(state => ({ ...state, isPopoverPinned: !state.isPopoverPinned }));\n }\n\n _getFirstSeriesPoint(s: AreaChartProps.Series<T>): null | ChartModel.PlotPoint<T> {\n const seriesIndex = this.series.indexOf(s);\n const [firstSeriesPoint] = this.plot.sx[seriesIndex] || [];\n return firstSeriesPoint || null;\n }\n}\n"]}
1
+ {"version":3,"file":"interactions-store.js","sourceRoot":"","sources":["../../../../src/area-chart/model/interactions-store.ts"],"names":[],"mappings":"AAKA,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IACjC,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,IAAI;IACtB,iBAAiB,EAAE,IAAI;IACvB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,OAAO,iBAAsD,SAAQ,UAElF;IAIC,YAAY,MAA2C,EAAE,IAAyC;QAChG,KAAK,CAAC,YAAY,CAAC,CAAC;QAEpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,cAAc,CAAC,KAA8B;QAC3C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,iCACb,KAAK,KACR,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EACzC,gBAAgB,EAAE,KAAK,EACvB,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAC7C,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IACxC,CAAC,CAAC;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AE,IAAI,IACvB,CAAC,CAAC;IACN,CAAC;IACD,sBAAsB;QACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,iCACb,KAAK,KACR,YAAY,EAAE,IAAI,IAClB,CAAC,CAAC;IACN,CAAC;IAED,UAAU;QACR,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,iCAAM,KAAK,KAAE,eAAe,EAAE,IAAI,IAAG,CAAC,CAAC;IAC3D,CAAC;IAED,YAAY;QACV,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,iCAAM,KAAK,KAAE,eAAe,EAAE,KAAK,IAAG,CAAC,CAAC;IAC5D,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,iCAAM,KAAK,KAAE,eAAe,EAAE,CAAC,KAAK,CAAC,eAAe,IAAG,CAAC,CAAC;IAC7E,CAAC;IAED,oBAAoB,CAAC,CAA2B;QAC9C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAC3D,OAAO,gBAAgB,IAAI,IAAI,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ChartModel } from './index';\nimport { AreaChartProps } from '../interfaces';\n\nimport AsyncStore from './async-store';\n\nconst initialState = Object.freeze({\n highlightedX: null,\n highlightedPoint: null,\n highlightedSeries: null,\n legendSeries: null,\n isPopoverPinned: false,\n});\n\nexport default class InteractionsStore<T extends AreaChartProps.DataTypes> extends AsyncStore<\n ChartModel.InteractionsState<T>\n> {\n series: readonly AreaChartProps.Series<T>[];\n plot: ChartModel.ComputedProps<T>['plot'];\n\n constructor(series: readonly AreaChartProps.Series<T>[], plot: ChartModel.ComputedProps<T>['plot']) {\n super(initialState);\n\n this.series = series;\n this.plot = plot;\n }\n\n highlightPoint(point: ChartModel.PlotPoint<T>) {\n this.set(state => ({\n ...state,\n highlightedX: this.plot.xy[point.index.x],\n highlightedPoint: point,\n highlightedSeries: this.series[point.index.s],\n legendSeries: this.series[point.index.s],\n }));\n }\n\n highlightX(points: readonly ChartModel.PlotPoint<T>[]) {\n this.set(state => ({\n ...state,\n highlightedX: points,\n highlightedPoint: null,\n highlightedSeries: null,\n legendSeries: null,\n }));\n }\n\n highlightFirstPoint() {\n this.set(state => {\n const series = state.legendSeries || state.highlightedSeries;\n const firstSeriesPoint = series && this._getFirstSeriesPoint(series);\n const point = state.highlightedPoint || firstSeriesPoint || this.plot.sx[0][0];\n return {\n ...state,\n highlightedX: this.plot.xy[point.index.x],\n highlightedPoint: point,\n highlightedSeries: this.series[point.index.s],\n legendSeries: this.series[point.index.s],\n };\n });\n }\n\n highlightSeries(s: null | AreaChartProps.Series<T>) {\n this.set(state => ({\n ...state,\n highlightedSeries: s,\n legendSeries: s,\n }));\n }\n\n clearHighlight() {\n this.set(state => ({\n ...state,\n highlightedX: null,\n highlightedPoint: null,\n highlightedSeries: null,\n }));\n }\n clearHighlightedLegend() {\n this.set(state => ({\n ...state,\n legendSeries: null,\n }));\n }\n\n clearState() {\n this.set(() => initialState);\n }\n\n pinPopover() {\n this.set(state => ({ ...state, isPopoverPinned: true }));\n }\n\n unpinPopover() {\n this.set(state => ({ ...state, isPopoverPinned: false }));\n }\n\n togglePopoverPin() {\n this.set(state => ({ ...state, isPopoverPinned: !state.isPopoverPinned }));\n }\n\n _getFirstSeriesPoint(s: AreaChartProps.Series<T>): null | ChartModel.PlotPoint<T> {\n const seriesIndex = this.series.indexOf(s);\n const [firstSeriesPoint] = this.plot.sx[seriesIndex] || [];\n return firstSeriesPoint || null;\n }\n}\n"]}
@@ -8,37 +8,36 @@ import createSeriesDecorator from './create-series-decorator';
8
8
  import InteractionsStore from './interactions-store';
9
9
  import { useStableEventHandler } from '../../internal/hooks/use-stable-event-handler';
10
10
  import { throttle } from '../../internal/utils/throttle';
11
- var MAX_HOVER_MARGIN = 6;
12
- var SVG_HOVER_THROTTLE = 25;
13
- var POPOVER_DEADZONE = 12;
11
+ const MAX_HOVER_MARGIN = 6;
12
+ const SVG_HOVER_THROTTLE = 25;
13
+ const POPOVER_DEADZONE = 12;
14
14
  // Represents the core the chart logic, including the model of all allowed user interactions.
15
- export default function useChartModel(_a) {
16
- var allSeries = _a.externalSeries, series = _a.visibleSeries, setVisibleSeries = _a.setVisibleSeries, highlightedSeries = _a.highlightedSeries, setHighlightedSeries = _a.setHighlightedSeries, xDomain = _a.xDomain, yDomain = _a.yDomain, xScaleType = _a.xScaleType, yScaleType = _a.yScaleType, height = _a.height, width = _a.width, popoverRef = _a.popoverRef;
15
+ export default function useChartModel({ externalSeries: allSeries, visibleSeries: series, setVisibleSeries, highlightedSeries, setHighlightedSeries, xDomain, yDomain, xScaleType, yScaleType, height, width, popoverRef, }) {
17
16
  // Chart elements refs used in handlers.
18
- var plotRef = useRef(null);
19
- var containerRef = useRef(null);
20
- var verticalMarkerRef = useRef(null);
21
- var stableSetVisibleSeries = useStableEventHandler(setVisibleSeries);
22
- var model = useMemo(function () {
17
+ const plotRef = useRef(null);
18
+ const containerRef = useRef(null);
19
+ const verticalMarkerRef = useRef(null);
20
+ const stableSetVisibleSeries = useStableEventHandler(setVisibleSeries);
21
+ const model = useMemo(() => {
23
22
  // Compute scales, ticks and two-dimensional plots.
24
- var computed = computeChartProps({
25
- series: series,
26
- xDomain: xDomain,
27
- yDomain: yDomain,
28
- xScaleType: xScaleType,
29
- yScaleType: yScaleType,
30
- height: height,
31
- width: width
23
+ const computed = computeChartProps({
24
+ series,
25
+ xDomain,
26
+ yDomain,
27
+ xScaleType,
28
+ yScaleType,
29
+ height,
30
+ width,
32
31
  });
33
32
  // A store for chart interactions that don't require plot recomputation.
34
- var interactions = new InteractionsStore(series, computed.plot);
35
- var containsMultipleSeries = interactions.series.length > 1;
33
+ const interactions = new InteractionsStore(series, computed.plot);
34
+ const containsMultipleSeries = interactions.series.length > 1;
36
35
  // A series decorator to provide extra props such as color and marker type.
37
- var getInternalSeries = createSeriesDecorator(allSeries);
38
- var isMouseOverPopover = function (clientX, clientY) {
36
+ const getInternalSeries = createSeriesDecorator(allSeries);
37
+ const isMouseOverPopover = (clientX, clientY) => {
39
38
  var _a;
40
39
  if ((_a = popoverRef.current) === null || _a === void 0 ? void 0 : _a.firstChild) {
41
- var popoverPosition = popoverRef.current.firstChild.getBoundingClientRect();
40
+ const popoverPosition = popoverRef.current.firstChild.getBoundingClientRect();
42
41
  if (clientX > popoverPosition.x - POPOVER_DEADZONE &&
43
42
  clientX < popoverPosition.x + popoverPosition.width + POPOVER_DEADZONE &&
44
43
  clientY > popoverPosition.y - POPOVER_DEADZONE &&
@@ -50,7 +49,7 @@ export default function useChartModel(_a) {
50
49
  };
51
50
  // A Callback for svg mouseover to hover the plot points.
52
51
  // Throttling is necessary for a substantially smoother customer experience.
53
- var onSVGMouseMoveThrottled = throttle(function (clientX, clientY) {
52
+ const onSVGMouseMoveThrottled = throttle((clientX, clientY) => {
54
53
  // No hover logic when the popover is pinned or no data available.
55
54
  if (interactions.get().isPopoverPinned ||
56
55
  !plotRef.current ||
@@ -58,11 +57,11 @@ export default function useChartModel(_a) {
58
57
  isMouseOverPopover(clientX, clientY)) {
59
58
  return;
60
59
  }
61
- var svgRect = plotRef.current.svg.getBoundingClientRect();
62
- var offsetX = clientX - svgRect.left;
63
- var offsetY = clientY - svgRect.top;
64
- var closestX = findClosest(interactions.plot.xy, offsetX, function (xPoints) { return xPoints[0].scaled.x; });
65
- var closestPoint = findClosest(closestX, offsetY, function (point) { return point.scaled.y1; });
60
+ const svgRect = plotRef.current.svg.getBoundingClientRect();
61
+ const offsetX = clientX - svgRect.left;
62
+ const offsetY = clientY - svgRect.top;
63
+ const closestX = findClosest(interactions.plot.xy, offsetX, xPoints => xPoints[0].scaled.x);
64
+ const closestPoint = findClosest(closestX, offsetY, point => point.scaled.y1);
66
65
  // If close enough to the point - highlight the point and its column.
67
66
  // If not - only highlight the closest column.
68
67
  if (Math.abs(offsetX - closestPoint.scaled.x) < MAX_HOVER_MARGIN &&
@@ -73,12 +72,9 @@ export default function useChartModel(_a) {
73
72
  interactions.highlightX(closestX);
74
73
  }
75
74
  }, SVG_HOVER_THROTTLE);
76
- var onSVGMouseMove = function (_a) {
77
- var clientX = _a.clientX, clientY = _a.clientY;
78
- return onSVGMouseMoveThrottled(clientX, clientY);
79
- };
75
+ const onSVGMouseMove = ({ clientX, clientY }) => onSVGMouseMoveThrottled(clientX, clientY);
80
76
  // A callback for svg mouseout to clear all highlights.
81
- var onSVGMouseOut = function (event) {
77
+ const onSVGMouseOut = (event) => {
82
78
  // Because the mouseover is throttled, in can occur slightly after the mouseout,
83
79
  // neglecting its effect; cancelling the throttled function prevents that.
84
80
  onSVGMouseMoveThrottled.cancel();
@@ -93,53 +89,53 @@ export default function useChartModel(_a) {
93
89
  }
94
90
  };
95
91
  // A callback for svg click to pin/unpin the popover.
96
- var onSVGMouseDown = function (event) {
92
+ const onSVGMouseDown = (event) => {
97
93
  interactions.togglePopoverPin();
98
94
  event.preventDefault();
99
95
  };
100
- var moveWithinXAxis = function (direction) {
96
+ const moveWithinXAxis = (direction) => {
101
97
  if (interactions.get().highlightedPoint) {
102
98
  return moveWithinSeries(direction);
103
99
  }
104
100
  else if (containsMultipleSeries) {
105
- var highlightedX = interactions.get().highlightedX;
101
+ const { highlightedX } = interactions.get();
106
102
  if (highlightedX) {
107
- var currentXIndex = highlightedX[0].index.x;
108
- var nextXIndex = circleIndex(currentXIndex + direction, [0, interactions.plot.xy.length - 1]);
103
+ const currentXIndex = highlightedX[0].index.x;
104
+ const nextXIndex = circleIndex(currentXIndex + direction, [0, interactions.plot.xy.length - 1]);
109
105
  interactions.highlightX(interactions.plot.xy[nextXIndex]);
110
106
  }
111
107
  }
112
108
  };
113
109
  // A helper function to highlight the next or previous point within selected series.
114
- var moveWithinSeries = function (direction) {
110
+ const moveWithinSeries = (direction) => {
115
111
  // Can only use motion when a particular point is highlighted.
116
- var point = interactions.get().highlightedPoint;
112
+ const point = interactions.get().highlightedPoint;
117
113
  if (!point) {
118
114
  return;
119
115
  }
120
116
  // Take the index of the currently highlighted series.
121
- var sIndex = point.index.s;
117
+ const sIndex = point.index.s;
122
118
  // Take the incremented(circularly) x-index of the currently highlighted point.
123
- var xIndex = circleIndex(point.index.x + direction, [0, interactions.plot.xs.length - 1]);
119
+ const xIndex = circleIndex(point.index.x + direction, [0, interactions.plot.xs.length - 1]);
124
120
  // Highlight the next point using x:s grouped data.
125
121
  interactions.highlightPoint(interactions.plot.xs[xIndex][sIndex]);
126
122
  };
127
123
  // A helper function to highlight the next or previous point within the selected column.
128
- var moveBetweenSeries = function (direction) {
129
- var point = interactions.get().highlightedPoint;
124
+ const moveBetweenSeries = (direction) => {
125
+ const point = interactions.get().highlightedPoint;
130
126
  if (!point) {
131
- var highlightedX = interactions.get().highlightedX;
127
+ const { highlightedX } = interactions.get();
132
128
  if (highlightedX) {
133
- var xIndex_1 = highlightedX[0].index.x;
134
- var points = interactions.plot.xy[xIndex_1];
135
- var yIndex = direction === 1 ? 0 : points.length - 1;
129
+ const xIndex = highlightedX[0].index.x;
130
+ const points = interactions.plot.xy[xIndex];
131
+ const yIndex = direction === 1 ? 0 : points.length - 1;
136
132
  interactions.highlightPoint(points[yIndex]);
137
133
  }
138
134
  return;
139
135
  }
140
136
  // Take the index of the currently highlighted column.
141
- var xIndex = point.index.x;
142
- var currentYIndex = point.index.y;
137
+ const xIndex = point.index.x;
138
+ const currentYIndex = point.index.y;
143
139
  if (containsMultipleSeries &&
144
140
  ((currentYIndex === 0 && direction === -1) ||
145
141
  (currentYIndex === interactions.plot.xy[xIndex].length - 1 && direction === 1))) {
@@ -147,14 +143,14 @@ export default function useChartModel(_a) {
147
143
  }
148
144
  else {
149
145
  // Take the incremented(circularly) y-index of the currently highlighted point.
150
- var nextYIndex = circleIndex(currentYIndex + direction, [0, interactions.plot.xy[xIndex].length - 1]);
146
+ const nextYIndex = circleIndex(currentYIndex + direction, [0, interactions.plot.xy[xIndex].length - 1]);
151
147
  // Highlight the next point using x:y grouped data.
152
148
  interactions.highlightPoint(interactions.plot.xy[xIndex][nextYIndex]);
153
149
  }
154
150
  };
155
151
  // A callback for svg keydown to enable motions and popover pin with the keyboard.
156
- var onSVGKeyDown = function (event) {
157
- var keyCode = event.keyCode;
152
+ const onSVGKeyDown = (event) => {
153
+ const keyCode = event.keyCode;
158
154
  if (keyCode !== KeyCode.up &&
159
155
  keyCode !== KeyCode.right &&
160
156
  keyCode !== KeyCode.down &&
@@ -182,15 +178,15 @@ export default function useChartModel(_a) {
182
178
  interactions.pinPopover();
183
179
  }
184
180
  };
185
- var highlightFirstX = function () {
181
+ const highlightFirstX = () => {
186
182
  interactions.highlightX(interactions.plot.xy[0]);
187
183
  };
188
184
  // A callback for svg focus to highlight series.
189
- var onSVGFocus = function (_event, trigger) {
185
+ const onSVGFocus = (_event, trigger) => {
190
186
  // When focus is caused by a click event nothing is expected as clicks are handled separately.
191
187
  if (trigger === 'keyboard') {
192
- var _a = interactions.get(), highlightedX = _a.highlightedX, highlightedPoint = _a.highlightedPoint, highlightedSeries_1 = _a.highlightedSeries, legendSeries = _a.legendSeries;
193
- if (containsMultipleSeries && !highlightedX && !highlightedPoint && !highlightedSeries_1 && !legendSeries) {
188
+ const { highlightedX, highlightedPoint, highlightedSeries, legendSeries } = interactions.get();
189
+ if (containsMultipleSeries && !highlightedX && !highlightedPoint && !highlightedSeries && !legendSeries) {
194
190
  highlightFirstX();
195
191
  }
196
192
  else if (!highlightedX) {
@@ -199,25 +195,25 @@ export default function useChartModel(_a) {
199
195
  }
200
196
  };
201
197
  // A callback for svg blur to clear all highlights unless the popover is pinned.
202
- var onSVGBlur = function () {
198
+ const onSVGBlur = () => {
203
199
  // Pinned popover stays pinned even if the focus is lost.
204
200
  // If blur is not caused by the popover, forget the previously highlighted point.
205
201
  if (!interactions.get().isPopoverPinned) {
206
202
  interactions.clearHighlight();
207
203
  }
208
204
  };
209
- var onFilterSeries = function (series) {
205
+ const onFilterSeries = (series) => {
210
206
  stableSetVisibleSeries(series);
211
207
  };
212
- var onLegendHighlight = function (series) {
208
+ const onLegendHighlight = (series) => {
213
209
  interactions.highlightSeries(series);
214
210
  };
215
- var onPopoverDismiss = function (outsideClick) {
211
+ const onPopoverDismiss = (outsideClick) => {
216
212
  interactions.unpinPopover();
217
213
  // Return focus back to the application or plot (when no point is highlighted).
218
214
  if (!outsideClick) {
219
215
  // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.
220
- setTimeout(function () {
216
+ setTimeout(() => {
221
217
  if (interactions.get().highlightedPoint || interactions.get().highlightedX) {
222
218
  plotRef.current.focusApplication();
223
219
  }
@@ -228,16 +224,16 @@ export default function useChartModel(_a) {
228
224
  }, 0);
229
225
  }
230
226
  };
231
- var onContainerBlur = function () {
227
+ const onContainerBlur = () => {
232
228
  interactions.clearState();
233
229
  };
234
- var onDocumentKeyDown = function (event) {
230
+ const onDocumentKeyDown = (event) => {
235
231
  if (event.key === 'Escape') {
236
232
  interactions.clearHighlight();
237
233
  interactions.clearHighlightedLegend();
238
234
  }
239
235
  };
240
- var onPopoverLeave = function (event) {
236
+ const onPopoverLeave = (event) => {
241
237
  if (plotRef.current.svg.contains(event.relatedTarget) || interactions.get().isPopoverPinned) {
242
238
  return;
243
239
  }
@@ -245,39 +241,39 @@ export default function useChartModel(_a) {
245
241
  interactions.clearHighlightedLegend();
246
242
  };
247
243
  return {
248
- width: width,
249
- height: height,
250
- series: series,
251
- allSeries: allSeries,
252
- getInternalSeries: getInternalSeries,
253
- computed: computed,
254
- interactions: interactions,
244
+ width,
245
+ height,
246
+ series,
247
+ allSeries,
248
+ getInternalSeries,
249
+ computed,
250
+ interactions,
255
251
  handlers: {
256
- onSVGMouseMove: onSVGMouseMove,
257
- onSVGMouseOut: onSVGMouseOut,
258
- onSVGMouseDown: onSVGMouseDown,
259
- onSVGKeyDown: onSVGKeyDown,
260
- onSVGFocus: onSVGFocus,
261
- onSVGBlur: onSVGBlur,
262
- onFilterSeries: onFilterSeries,
263
- onLegendHighlight: onLegendHighlight,
264
- onPopoverDismiss: onPopoverDismiss,
265
- onContainerBlur: onContainerBlur,
266
- onDocumentKeyDown: onDocumentKeyDown,
267
- onPopoverLeave: onPopoverLeave
252
+ onSVGMouseMove,
253
+ onSVGMouseOut,
254
+ onSVGMouseDown,
255
+ onSVGKeyDown,
256
+ onSVGFocus,
257
+ onSVGBlur,
258
+ onFilterSeries,
259
+ onLegendHighlight,
260
+ onPopoverDismiss,
261
+ onContainerBlur,
262
+ onDocumentKeyDown,
263
+ onPopoverLeave,
268
264
  },
269
265
  refs: {
270
266
  plot: plotRef,
271
267
  container: containerRef,
272
268
  verticalMarker: verticalMarkerRef,
273
- popoverRef: popoverRef
274
- }
269
+ popoverRef,
270
+ },
275
271
  };
276
272
  }, [allSeries, series, xDomain, yDomain, xScaleType, yScaleType, height, width, stableSetVisibleSeries, popoverRef]);
277
273
  // Notify client when series highlight change.
278
- useReaction(model.interactions, function (state) { return state.highlightedSeries; }, setHighlightedSeries);
274
+ useReaction(model.interactions, state => state.highlightedSeries, setHighlightedSeries);
279
275
  // Update interactions store when series highlight in a controlled way.
280
- useEffect(function () {
276
+ useEffect(() => {
281
277
  if (highlightedSeries !== model.interactions.get().highlightedSeries) {
282
278
  model.interactions.highlightSeries(highlightedSeries);
283
279
  }