@cloudscape-design/components 3.0.459 → 3.0.460

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 (255) hide show
  1. package/alert/styles.css.js +25 -25
  2. package/alert/styles.scoped.css +59 -53
  3. package/alert/styles.selectors.js +25 -25
  4. package/anchor-navigation/styles.css.js +8 -8
  5. package/anchor-navigation/styles.scoped.css +39 -30
  6. package/anchor-navigation/styles.selectors.js +8 -8
  7. package/annotation-context/annotation/styles.css.js +24 -24
  8. package/annotation-context/annotation/styles.scoped.css +55 -48
  9. package/annotation-context/annotation/styles.selectors.js +24 -24
  10. package/app-layout/content-wrapper/styles.css.js +3 -3
  11. package/app-layout/content-wrapper/styles.scoped.css +15 -15
  12. package/app-layout/content-wrapper/styles.selectors.js +3 -3
  13. package/app-layout/drawer/styles.css.js +12 -12
  14. package/app-layout/drawer/styles.scoped.css +29 -30
  15. package/app-layout/drawer/styles.selectors.js +12 -12
  16. package/app-layout/interfaces.d.ts +3 -4
  17. package/app-layout/interfaces.d.ts.map +1 -1
  18. package/app-layout/interfaces.js.map +1 -1
  19. package/app-layout/mobile-toolbar/styles.css.js +8 -8
  20. package/app-layout/mobile-toolbar/styles.scoped.css +18 -17
  21. package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
  22. package/app-layout/notifications/styles.css.js +3 -3
  23. package/app-layout/notifications/styles.scoped.css +6 -6
  24. package/app-layout/notifications/styles.selectors.js +3 -3
  25. package/app-layout/split-panel/styles.css.js +2 -2
  26. package/app-layout/split-panel/styles.scoped.css +3 -3
  27. package/app-layout/split-panel/styles.selectors.js +2 -2
  28. package/app-layout/styles.css.js +16 -16
  29. package/app-layout/styles.scoped.css +26 -26
  30. package/app-layout/styles.selectors.js +16 -16
  31. package/app-layout/toggles/styles.css.js +2 -2
  32. package/app-layout/toggles/styles.scoped.css +10 -9
  33. package/app-layout/toggles/styles.selectors.js +2 -2
  34. package/app-layout/utils/use-drawers.js.map +1 -1
  35. package/app-layout/visual-refresh/context.js +1 -1
  36. package/app-layout/visual-refresh/context.js.map +1 -1
  37. package/app-layout/visual-refresh/styles.css.js +80 -80
  38. package/app-layout/visual-refresh/styles.scoped.css +268 -251
  39. package/app-layout/visual-refresh/styles.selectors.js +80 -80
  40. package/area-chart/styles.css.js +6 -6
  41. package/area-chart/styles.scoped.css +12 -11
  42. package/area-chart/styles.selectors.js +6 -6
  43. package/attribute-editor/styles.css.js +14 -14
  44. package/attribute-editor/styles.scoped.css +30 -29
  45. package/attribute-editor/styles.selectors.js +14 -14
  46. package/autosuggest/styles.css.js +3 -3
  47. package/autosuggest/styles.scoped.css +5 -5
  48. package/autosuggest/styles.selectors.js +3 -3
  49. package/badge/styles.css.js +5 -5
  50. package/badge/styles.scoped.css +11 -7
  51. package/badge/styles.selectors.js +5 -5
  52. package/bar-chart/index.d.ts +1 -1
  53. package/bar-chart/index.d.ts.map +1 -1
  54. package/bar-chart/index.js +2 -2
  55. package/bar-chart/index.js.map +1 -1
  56. package/bar-chart/interfaces.d.ts +8 -3
  57. package/bar-chart/interfaces.d.ts.map +1 -1
  58. package/bar-chart/interfaces.js.map +1 -1
  59. package/box/styles.css.js +190 -190
  60. package/box/styles.scoped.css +244 -240
  61. package/box/styles.selectors.js +190 -190
  62. package/breadcrumb-group/item/styles.css.js +9 -9
  63. package/breadcrumb-group/item/styles.scoped.css +20 -19
  64. package/breadcrumb-group/item/styles.selectors.js +9 -9
  65. package/breadcrumb-group/styles.css.js +7 -7
  66. package/breadcrumb-group/styles.scoped.css +28 -21
  67. package/breadcrumb-group/styles.selectors.js +7 -7
  68. package/button/styles.css.js +20 -20
  69. package/button/styles.scoped.css +155 -153
  70. package/button/styles.selectors.js +20 -20
  71. package/button-dropdown/category-elements/styles.css.js +13 -13
  72. package/button-dropdown/category-elements/styles.scoped.css +60 -50
  73. package/button-dropdown/category-elements/styles.selectors.js +13 -13
  74. package/button-dropdown/item-element/styles.css.js +15 -15
  75. package/button-dropdown/item-element/styles.scoped.css +38 -33
  76. package/button-dropdown/item-element/styles.selectors.js +15 -15
  77. package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  78. package/button-dropdown/mobile-expandable-group/styles.scoped.css +8 -8
  79. package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  80. package/button-dropdown/styles.css.js +15 -15
  81. package/button-dropdown/styles.scoped.css +39 -36
  82. package/button-dropdown/styles.selectors.js +15 -15
  83. package/calendar/styles.css.js +18 -18
  84. package/calendar/styles.scoped.css +75 -59
  85. package/calendar/styles.selectors.js +18 -18
  86. package/cards/styles.css.js +38 -38
  87. package/cards/styles.scoped.css +110 -94
  88. package/cards/styles.selectors.js +38 -38
  89. package/code-editor/resizable-box/styles.css.js +3 -3
  90. package/code-editor/resizable-box/styles.scoped.css +10 -10
  91. package/code-editor/resizable-box/styles.selectors.js +3 -3
  92. package/code-editor/styles.css.js +32 -32
  93. package/code-editor/styles.scoped.css +210 -198
  94. package/code-editor/styles.selectors.js +32 -32
  95. package/collection-preferences/content-display/styles.css.js +11 -11
  96. package/collection-preferences/content-display/styles.scoped.css +40 -30
  97. package/collection-preferences/content-display/styles.selectors.js +11 -11
  98. package/collection-preferences/styles.css.js +37 -37
  99. package/collection-preferences/styles.scoped.css +79 -66
  100. package/collection-preferences/styles.selectors.js +37 -37
  101. package/column-layout/flexible-column-layout/styles.css.js +5 -5
  102. package/column-layout/flexible-column-layout/styles.scoped.css +8 -9
  103. package/column-layout/flexible-column-layout/styles.selectors.js +5 -5
  104. package/column-layout/styles.css.js +13 -13
  105. package/column-layout/styles.scoped.css +70 -64
  106. package/column-layout/styles.selectors.js +13 -13
  107. package/container/styles.css.js +28 -28
  108. package/container/styles.scoped.css +106 -98
  109. package/container/styles.selectors.js +28 -28
  110. package/content-layout/styles.css.js +7 -7
  111. package/content-layout/styles.scoped.css +15 -15
  112. package/content-layout/styles.selectors.js +7 -7
  113. package/date-picker/styles.css.js +7 -7
  114. package/date-picker/styles.scoped.css +12 -12
  115. package/date-picker/styles.selectors.js +7 -7
  116. package/date-range-picker/calendar/grids/styles.css.js +25 -25
  117. package/date-range-picker/calendar/grids/styles.scoped.css +71 -60
  118. package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
  119. package/date-range-picker/relative-range/styles.css.js +9 -9
  120. package/date-range-picker/relative-range/styles.scoped.css +21 -21
  121. package/date-range-picker/relative-range/styles.selectors.js +9 -9
  122. package/date-range-picker/styles.css.js +38 -38
  123. package/date-range-picker/styles.scoped.css +73 -68
  124. package/date-range-picker/styles.selectors.js +38 -38
  125. package/drawer/styles.css.js +3 -3
  126. package/drawer/styles.scoped.css +21 -18
  127. package/drawer/styles.selectors.js +3 -3
  128. package/expandable-section/expandable-section-container.d.ts +2 -2
  129. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  130. package/expandable-section/expandable-section-container.js.map +1 -1
  131. package/expandable-section/expandable-section-header.d.ts +3 -2
  132. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  133. package/expandable-section/expandable-section-header.js +7 -11
  134. package/expandable-section/expandable-section-header.js.map +1 -1
  135. package/expandable-section/interfaces.d.ts +0 -1
  136. package/expandable-section/interfaces.d.ts.map +1 -1
  137. package/expandable-section/interfaces.js.map +1 -1
  138. package/expandable-section/internal.d.ts +2 -4
  139. package/expandable-section/internal.d.ts.map +1 -1
  140. package/expandable-section/internal.js.map +1 -1
  141. package/expandable-section/styles.css.js +29 -32
  142. package/expandable-section/styles.scoped.css +99 -106
  143. package/expandable-section/styles.selectors.js +29 -32
  144. package/expandable-section/utils.d.ts +2 -3
  145. package/expandable-section/utils.d.ts.map +1 -1
  146. package/expandable-section/utils.js +1 -4
  147. package/expandable-section/utils.js.map +1 -1
  148. package/file-upload/dropzone/styles.css.js +2 -2
  149. package/file-upload/dropzone/styles.scoped.css +8 -4
  150. package/file-upload/dropzone/styles.selectors.js +2 -2
  151. package/file-upload/file-option/styles.css.js +7 -7
  152. package/file-upload/file-option/styles.scoped.css +15 -15
  153. package/file-upload/file-option/styles.selectors.js +7 -7
  154. package/file-upload/styles.css.js +2 -2
  155. package/file-upload/styles.scoped.css +4 -4
  156. package/file-upload/styles.selectors.js +2 -2
  157. package/flashbar/styles.css.js +47 -47
  158. package/flashbar/styles.scoped.css +220 -215
  159. package/flashbar/styles.selectors.js +47 -47
  160. package/form/styles.css.js +9 -9
  161. package/form/styles.scoped.css +18 -18
  162. package/form/styles.selectors.js +9 -9
  163. package/form-field/styles.css.js +19 -19
  164. package/form-field/styles.scoped.css +34 -34
  165. package/form-field/styles.selectors.js +19 -19
  166. package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
  167. package/internal/components/cartesian-chart/interfaces.js.map +1 -1
  168. package/internal/components/chart-plot/index.d.ts +1 -1
  169. package/internal/components/chart-plot/index.d.ts.map +1 -1
  170. package/internal/components/chart-plot/index.js.map +1 -1
  171. package/internal/components/chart-series-details/index.d.ts +4 -12
  172. package/internal/components/chart-series-details/index.d.ts.map +1 -1
  173. package/internal/components/chart-series-details/index.js +10 -46
  174. package/internal/components/chart-series-details/index.js.map +1 -1
  175. package/internal/components/chart-series-details/styles.css.js +5 -19
  176. package/internal/components/chart-series-details/styles.scoped.css +15 -141
  177. package/internal/components/chart-series-details/styles.selectors.js +5 -19
  178. package/internal/environment.js +1 -1
  179. package/internal/environment.json +1 -1
  180. package/internal/manifest.json +1 -1
  181. package/line-chart/interfaces.d.ts +8 -2
  182. package/line-chart/interfaces.d.ts.map +1 -1
  183. package/line-chart/interfaces.js.map +1 -1
  184. package/mixed-line-bar-chart/chart-container.d.ts +1 -2
  185. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  186. package/mixed-line-bar-chart/chart-container.js +8 -17
  187. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  188. package/mixed-line-bar-chart/chart-popover.d.ts +0 -1
  189. package/mixed-line-bar-chart/chart-popover.d.ts.map +1 -1
  190. package/mixed-line-bar-chart/chart-popover.js +3 -13
  191. package/mixed-line-bar-chart/chart-popover.js.map +1 -1
  192. package/mixed-line-bar-chart/format-highlighted.d.ts +2 -7
  193. package/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
  194. package/mixed-line-bar-chart/format-highlighted.js +5 -25
  195. package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  196. package/mixed-line-bar-chart/interfaces.d.ts +6 -38
  197. package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  198. package/mixed-line-bar-chart/interfaces.js.map +1 -1
  199. package/mixed-line-bar-chart/internal.d.ts +1 -1
  200. package/mixed-line-bar-chart/internal.d.ts.map +1 -1
  201. package/mixed-line-bar-chart/internal.js +2 -2
  202. package/mixed-line-bar-chart/internal.js.map +1 -1
  203. package/modal/styles.css.js +23 -23
  204. package/modal/styles.scoped.css +39 -39
  205. package/modal/styles.selectors.js +23 -23
  206. package/package.json +1 -1
  207. package/pie-chart/interfaces.d.ts +5 -5
  208. package/pie-chart/interfaces.d.ts.map +1 -1
  209. package/pie-chart/interfaces.js.map +1 -1
  210. package/pie-chart/pie-chart.d.ts +1 -1
  211. package/pie-chart/pie-chart.d.ts.map +1 -1
  212. package/pie-chart/pie-chart.js +18 -21
  213. package/pie-chart/pie-chart.js.map +1 -1
  214. package/table/column-widths-utils.d.ts +0 -1
  215. package/table/column-widths-utils.d.ts.map +1 -1
  216. package/table/column-widths-utils.js +0 -18
  217. package/table/column-widths-utils.js.map +1 -1
  218. package/table/internal.d.ts.map +1 -1
  219. package/table/internal.js +6 -7
  220. package/table/internal.js.map +1 -1
  221. package/table/node-data-cell.d.ts +15 -0
  222. package/table/node-data-cell.d.ts.map +1 -0
  223. package/table/node-data-cell.js +25 -0
  224. package/table/node-data-cell.js.map +1 -0
  225. package/table/sticky-columns/use-sticky-columns.js +1 -1
  226. package/table/sticky-columns/use-sticky-columns.js.map +1 -1
  227. package/table/thead.d.ts +1 -0
  228. package/table/thead.d.ts.map +1 -1
  229. package/table/thead.js +18 -3
  230. package/table/thead.js.map +1 -1
  231. package/table/use-column-widths.d.ts +3 -5
  232. package/table/use-column-widths.d.ts.map +1 -1
  233. package/table/use-column-widths.js +11 -61
  234. package/table/use-column-widths.js.map +1 -1
  235. package/table/use-sticky-header.d.ts.map +1 -1
  236. package/table/use-sticky-header.js +13 -0
  237. package/table/use-sticky-header.js.map +1 -1
  238. package/test-utils/dom/internal/chart-popover.d.ts +0 -8
  239. package/test-utils/dom/internal/chart-popover.js +0 -23
  240. package/test-utils/dom/internal/chart-popover.js.map +1 -1
  241. package/test-utils/selectors/internal/chart-popover.d.ts +0 -8
  242. package/test-utils/selectors/internal/chart-popover.js +0 -22
  243. package/test-utils/selectors/internal/chart-popover.js.map +1 -1
  244. package/test-utils/tsconfig.tsbuildinfo +1 -1
  245. package/tiles/styles.css.js +29 -29
  246. package/tiles/styles.scoped.css +97 -91
  247. package/tiles/styles.selectors.js +29 -29
  248. package/internal/components/chart-series-details/series-details-text.d.ts +0 -2
  249. package/internal/components/chart-series-details/series-details-text.d.ts.map +0 -1
  250. package/internal/components/chart-series-details/series-details-text.js +0 -17
  251. package/internal/components/chart-series-details/series-details-text.js.map +0 -1
  252. package/table/no-data-cell.d.ts +0 -13
  253. package/table/no-data-cell.d.ts.map +0 -1
  254. package/table/no-data-cell.js +0 -24
  255. package/table/no-data-cell.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9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KAAK;gBACL,MAAM;gBACN,SAAS,EAAE,SAAS;gBACpB,YAAY,EAAE,YAAY;gBAC1B,UAAU,EAAE,UAAU;gBACtB,WAAW,EAAE,WAAW;aACzB,EACD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC3B,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,WAAW;gBAC/B,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS;aAC5B,CAAC,EACF,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,aAAa;YAExB,oBAAC,YAAY,IAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAI;YAEpF,2BAAG,SAAS,EAAE,SAAS;gBACrB,oBAAC,qBAAqB,IACpB,gBAAgB,EAAE,gBAAgB,IAAI,IAAI,EAC1C,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,oBAAoB,GAC/B;gBAGD,eAAe,IAAI,aAAa,IAAI,CACnC,6CAAkB,MAAM,EAAC,EAAE,EAAE,qBAAqB,IAC/C,eAAe,CACX,CACR;gBAEA,QAAQ;gBAET,oBAAC,YAAY,IACX,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,oBAAoB,IAAI,gBAAgB,EACpD,MAAM,EAAE,wBAAwB,GAChC,CACA,CACA;QAEN,oBAAC,UAAU,QAAE,cAAc,CAAc,CACxC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\n\nimport { KeyCode } from '../../keycode';\nimport LiveRegion from '../live-region/index';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\nimport { Offset } from '../interfaces';\nimport { useInternalI18n } from '../../../i18n/context';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number | string;\n height: number | string;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: string;\n isClickable?: boolean;\n isPrecise?: boolean;\n onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n ...restProps\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const i18n = useInternalI18n('[charts]');\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => svgRef.current!.focus(),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = () => {\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current && !plotClickedRef.current) {\n setPlotFocused(true);\n }\n // The click should focus the underling application bypassing the svg.\n else if (plotClickedRef.current) {\n applicationRef.current!.focus();\n }\n };\n const onPlotClick = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onClick && onClick(event);\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onFocus && onFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onBlur && onBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription),\n }\n : {};\n\n return (\n <>\n <svg\n {...restProps}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n style={{\n width,\n height,\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onClick={onPlotClick}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform}>\n <ApplicationController\n activeElementKey={activeElementKey || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onApplicationFocus}\n onBlur={onApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <LiveRegion>{ariaLiveRegion}</LiveRegion>\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-plot/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,qBAAyC,MAAM,0BAA0B,CAAC;AACjF,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAqCvC;;;;;;;;;EASE;AACF,eAAe,UAAU,CAAC,SAAS,CAAC,CAAC;AAErC,SAAS,SAAS,CAChB,EA0BiB,EACjB,GAA4B;QA3B5B,EACE,KAAK,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,WAAW,GAAG,yBAAyB,EACvC,wBAAwB,GAAG,4BAA4B,OAExC,EADZ,SAAS,cAzBd,gXA0BC,CADa;IAId,MAAM,IAAI,GAAG,eAAe,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AAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,oBAAoB,GAC/B;gBAGD,eAAe,IAAI,aAAa,IAAI,CACnC,6CAAkB,MAAM,EAAC,EAAE,EAAE,qBAAqB,IAC/C,eAAe,CACX,CACR;gBAEA,QAAQ;gBAET,oBAAC,YAAY,IACX,UAAU,EAAE,gBAAgB,EAC5B,UAAU,EAAE,oBAAoB,IAAI,gBAAgB,EACpD,MAAM,EAAE,wBAAwB,GAChC,CACA,CACA;QAEN,oBAAC,UAAU,QAAE,cAAc,CAAc,CACxC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { useUniqueId } from '../../hooks/use-unique-id';\n\nimport { KeyCode } from '../../keycode';\nimport LiveRegion from '../live-region/index';\nimport ApplicationController, { ApplicationRef } from './application-controller';\nimport FocusOutline from './focus-outline';\nimport { Offset } from '../interfaces';\nimport { useInternalI18n } from '../../../i18n/context';\n\nconst DEFAULT_PLOT_FOCUS_OFFSET = 3;\nconst DEFAULT_ELEMENT_FOCUS_OFFSET = 3;\n\nexport interface ChartPlotRef {\n svg: SVGSVGElement;\n focusPlot(): void;\n focusApplication(): void;\n}\n\nexport interface ChartPlotProps {\n width: number | string;\n height: number | string;\n transform?: string;\n offsetTop?: number;\n offsetBottom?: number;\n offsetLeft?: number;\n offsetRight?: number;\n focusOffset?: number;\n ariaLabel?: string;\n ariaLabelledby?: string;\n ariaDescription?: string;\n ariaDescribedby?: string;\n ariaRoleDescription?: string;\n activeElementKey?: null | string | number | boolean;\n activeElementRef?: React.RefObject<SVGGElement>;\n activeElementFocusOffset?: Offset;\n ariaLiveRegion?: React.ReactNode;\n isClickable?: boolean;\n isPrecise?: boolean;\n onClick?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseMove?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onMouseOut?: (event: React.MouseEvent<SVGSVGElement>) => void;\n onFocus?: (event: React.FocusEvent<SVGGElement>, trigger: 'mouse' | 'keyboard') => void;\n onBlur?: (event: React.FocusEvent<SVGGElement>) => void;\n onKeyDown?: (event: React.KeyboardEvent<SVGGElement>) => void;\n children: React.ReactNode;\n}\n\n/**\n An extension for the SVG to be used for charts. It includes a controller element to\n handle the focus and keyboard interactions in a way that is supported by screen readers.\n\n The application mimics the aria-activedescendant behavior which is unsupported by Safari. The\n activeElementRef is the pointer to the secondary-focus element and activeElementKey denotes when\n the focus transition was made.\n\n Alternatively, ariaLiveRegion can be used to make announcements.\n*/\nexport default forwardRef(ChartPlot);\n\nfunction ChartPlot(\n {\n width,\n height,\n transform,\n offsetTop,\n offsetBottom,\n offsetLeft,\n offsetRight,\n ariaLabel,\n ariaLabelledby,\n ariaRoleDescription,\n ariaDescription,\n ariaDescribedby,\n activeElementKey,\n activeElementRef,\n ariaLiveRegion,\n isClickable,\n isPrecise,\n children,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n focusOffset = DEFAULT_PLOT_FOCUS_OFFSET,\n activeElementFocusOffset = DEFAULT_ELEMENT_FOCUS_OFFSET,\n ...restProps\n }: ChartPlotProps,\n ref: React.Ref<ChartPlotRef>\n) {\n const i18n = useInternalI18n('[charts]');\n const svgRef = useRef<SVGSVGElement>(null);\n const applicationRef = useRef<ApplicationRef>(null);\n const plotClickedRef = useRef(false);\n const [isPlotFocused, setPlotFocused] = useState(false);\n const [isApplicationFocused, setApplicationFocused] = useState(false);\n\n const internalDescriptionId = useUniqueId('awsui-chart-plot__description');\n const ariaDescriptionId = [ariaDescription && internalDescriptionId, ariaDescribedby].filter(Boolean).join(' ');\n\n useImperativeHandle(ref, () => ({\n svg: svgRef.current!,\n focusPlot: () => svgRef.current!.focus(),\n focusApplication: () => applicationRef.current!.focus(),\n }));\n\n const onPlotMouseDown = () => {\n // Record the click was made for the application focus handler.\n plotClickedRef.current = true;\n };\n const onPlotFocus = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current && !plotClickedRef.current) {\n setPlotFocused(true);\n }\n // The click should focus the underling application bypassing the svg.\n else if (plotClickedRef.current) {\n applicationRef.current!.focus();\n }\n };\n const onPlotClick = (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => {\n onClick && onClick(event);\n };\n const onPlotBlur = (event: React.FocusEvent<SVGSVGElement>) => {\n if (event.target === svgRef.current) {\n setPlotFocused(false);\n }\n };\n // Once one of the expected keys is pressed the focus is delegated to the application controller.\n const onPlotKeyDown = (event: React.KeyboardEvent) => {\n if (isPlotFocused) {\n // Delegate the focus to the application if one of the expected keys was pressed.\n const codes = [KeyCode.space, KeyCode.enter, KeyCode.up, KeyCode.left, KeyCode.right, KeyCode.down];\n if (codes.indexOf(event.keyCode) !== -1) {\n applicationRef.current!.focus();\n }\n }\n };\n\n const onApplicationFocus = (event: React.FocusEvent<SVGGElement>) => {\n onFocus && onFocus(event, plotClickedRef.current ? 'mouse' : 'keyboard');\n // \"Release\" the click reference to not affect the next call of this handler.\n plotClickedRef.current = false;\n setApplicationFocused(true);\n };\n const onApplicationBlur = (event: React.FocusEvent<SVGGElement>) => {\n onBlur && onBlur(event);\n setApplicationFocused(false);\n };\n const onApplicationKeyDown = onKeyDown;\n\n const plotFocusable = !isApplicationFocused;\n const plotTabIndex = plotFocusable ? 0 : -1;\n const plotAria = !isApplicationFocused\n ? {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescriptionId,\n 'aria-roledescription': i18n('i18nStrings.chartAriaRoleDescription', ariaRoleDescription),\n }\n : {};\n\n return (\n <>\n <svg\n {...restProps}\n focusable={plotFocusable}\n tabIndex={plotTabIndex}\n role=\"application\"\n aria-hidden=\"false\"\n {...plotAria}\n ref={svgRef}\n style={{\n width,\n height,\n marginTop: offsetTop,\n marginBottom: offsetBottom,\n marginLeft: offsetLeft,\n marginRight: offsetRight,\n }}\n className={clsx(styles.root, {\n [styles.clickable]: isClickable,\n [styles.precise]: isPrecise,\n })}\n onMouseDown={onPlotMouseDown}\n onClick={onPlotClick}\n onFocus={onPlotFocus}\n onBlur={onPlotBlur}\n onKeyDown={onPlotKeyDown}\n >\n <FocusOutline elementRef={svgRef} elementKey={isPlotFocused} offset={focusOffset} />\n\n <g transform={transform}>\n <ApplicationController\n activeElementKey={activeElementKey || null}\n activeElementRef={activeElementRef}\n ref={applicationRef}\n onFocus={onApplicationFocus}\n onBlur={onApplicationBlur}\n onKeyDown={onApplicationKeyDown}\n />\n\n {/* Only show description when plot is focusable to avoid repetition in Safari and Firefox */}\n {ariaDescription && plotFocusable && (\n <desc aria-hidden=\"true\" id={internalDescriptionId}>\n {ariaDescription}\n </desc>\n )}\n\n {children}\n\n <FocusOutline\n elementRef={activeElementRef}\n elementKey={isApplicationFocused && activeElementKey}\n offset={activeElementFocusOffset}\n />\n </g>\n </svg>\n\n <LiveRegion>{ariaLiveRegion}</LiveRegion>\n </>\n );\n}\n"]}
@@ -1,24 +1,16 @@
1
- import React, { ReactNode } from 'react';
1
+ import React from 'react';
2
2
  import { BaseComponentProps } from '../../base-component';
3
+ import { ChartDetailPair } from '../../../pie-chart/interfaces';
3
4
  import { ChartSeriesMarkerType } from '../chart-series-marker';
4
- interface ChartDetailPair {
5
- key: ReactNode;
6
- value: ReactNode;
7
- }
8
5
  export interface ChartSeriesDetailItem extends ChartDetailPair {
9
6
  markerType?: ChartSeriesMarkerType;
10
7
  color?: string;
11
8
  isDimmed?: boolean;
12
- subItems?: ReadonlyArray<ChartDetailPair>;
13
- expandableId?: string;
14
9
  }
15
- export type ExpandedSeries = Set<string>;
16
10
  export interface ChartSeriesDetailsProps extends BaseComponentProps {
17
11
  details: ReadonlyArray<ChartSeriesDetailItem>;
18
- expandedSeries?: ExpandedSeries;
19
- setPopoverText?: (s: string) => void;
20
- setExpandedState?: (seriesTitle: string, state: boolean) => void;
21
12
  }
22
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ChartSeriesDetailsProps & React.RefAttributes<HTMLDivElement>>>;
13
+ declare const _default: React.MemoExoticComponent<typeof ChartSeriesDetails>;
23
14
  export default _default;
15
+ declare function ChartSeriesDetails({ details, ...restProps }: ChartSeriesDetailsProps): JSX.Element;
24
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAoB,SAAS,EAAqB,MAAM,OAAO,CAAC;AAG9E,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAA0B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAMlF,UAAU,eAAe;IACvB,GAAG,EAAE,SAAS,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;CAClB;AAUD,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAClE;;AAED,wBAAoD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAA0B,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC/C;;AAED,wBAAwC;AAExC,iBAAS,kBAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,EAAE,uBAAuB,eAyB7E"}
@@ -1,61 +1,25 @@
1
1
  import { __rest } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
- import React, { forwardRef, memo, useEffect, useRef } from 'react';
4
+ import React, { memo } from 'react';
5
5
  import clsx from 'clsx';
6
6
  import { getBaseProps } from '../../base-component';
7
+ import InternalBox from '../../../box/internal';
7
8
  import ChartSeriesMarker from '../chart-series-marker';
8
9
  import styles from './styles.css.js';
9
- import InternalExpandableSection from '../../../expandable-section/internal';
10
- import getSeriesDetailsText from './series-details-text';
11
- import { useMergeRefs } from '../../hooks/use-merge-refs';
12
- export default memo(forwardRef(ChartSeriesDetails));
13
- function ChartSeriesDetails(_a, ref) {
14
- var { details, expandedSeries, setPopoverText, setExpandedState } = _a, restProps = __rest(_a, ["details", "expandedSeries", "setPopoverText", "setExpandedState"]);
10
+ export default memo(ChartSeriesDetails);
11
+ function ChartSeriesDetails(_a) {
12
+ var { details } = _a, restProps = __rest(_a, ["details"]);
15
13
  const baseProps = getBaseProps(restProps);
16
14
  const className = clsx(baseProps.className, styles.root);
17
- const detailsRef = useRef(null);
18
- const mergedRef = useMergeRefs(ref, detailsRef);
19
- // Once the component has rendered, pass its content in plain text
20
- // so that it can be used by screen readers.
21
- useEffect(() => {
22
- if (setPopoverText) {
23
- if (detailsRef.current) {
24
- setPopoverText(getSeriesDetailsText(detailsRef.current));
25
- }
26
- return () => {
27
- setPopoverText('');
28
- };
29
- }
30
- }, [details, setPopoverText]);
31
- const isExpanded = (seriesTitle) => !!expandedSeries && expandedSeries.has(seriesTitle);
32
- return (React.createElement("div", Object.assign({}, baseProps, { className: className, ref: mergedRef }),
33
- React.createElement("ul", { className: styles.list }, details.map(({ key, value, markerType, color, isDimmed, subItems, expandableId }, index) => (React.createElement("li", { key: index, className: clsx({
15
+ return (React.createElement("div", Object.assign({}, baseProps, { className: className }),
16
+ React.createElement("ul", { className: styles.list }, details.map(({ key, value, markerType, color, isDimmed }, index) => (React.createElement("li", { key: index, className: clsx({
34
17
  [styles.dimmed]: isDimmed,
35
18
  [styles['list-item']]: true,
36
- [styles['with-sub-items']]: subItems === null || subItems === void 0 ? void 0 : subItems.length,
37
- [styles.expandable]: !!expandableId,
38
- }) }, (subItems === null || subItems === void 0 ? void 0 : subItems.length) && !!expandableId ? (React.createElement(ExpandableSeries, { itemKey: key, value: value, markerType: markerType, color: color, subItems: subItems, expanded: isExpanded(expandableId), setExpandedState: state => setExpandedState && setExpandedState(expandableId, state) })) : (React.createElement(NonExpandableSeries, { itemKey: key, value: value, markerType: markerType, color: color, subItems: subItems }))))))));
39
- }
40
- function SubItems({ items, expandable, expanded, }) {
41
- return (React.createElement("ul", { className: clsx(styles['sub-items'], expandable && styles.expandable) }, items.map(({ key, value }, index) => (React.createElement("li", { key: index, className: clsx(styles['inner-list-item'], styles['key-value-pair'], (expanded || !expandable) && styles.announced) },
42
- React.createElement("span", { className: styles.key }, key),
43
- React.createElement("span", { className: styles.value }, value))))));
44
- }
45
- function ExpandableSeries({ itemKey, value, subItems, markerType, color, expanded, setExpandedState, }) {
46
- return (React.createElement("div", { className: styles['expandable-section'] },
47
- markerType && color && React.createElement(ChartSeriesMarker, { type: markerType, color: color }),
48
- React.createElement("div", { className: styles['full-width'] },
49
- React.createElement(InternalExpandableSection, { variant: "compact", headerText: itemKey, headerActions: React.createElement("span", { className: clsx(styles.value, styles.expandable) }, value), expanded: expanded, onChange: ({ detail }) => setExpandedState(detail.expanded) },
50
- React.createElement(SubItems, { items: subItems, expandable: true, expanded: expanded })))));
51
- }
52
- function NonExpandableSeries({ itemKey, value, subItems, markerType, color }) {
53
- return (React.createElement(React.Fragment, null,
54
- React.createElement("div", { className: clsx(styles['key-value-pair'], styles.announced) },
19
+ }) },
55
20
  React.createElement("div", { className: styles.key },
56
21
  markerType && color && React.createElement(ChartSeriesMarker, { type: markerType, color: color }),
57
- React.createElement("span", null, itemKey)),
58
- React.createElement("span", { className: styles.value }, value)),
59
- subItems && React.createElement(SubItems, { items: subItems })));
22
+ React.createElement("span", null, key)),
23
+ React.createElement(InternalBox, { textAlign: "right" }, value)))))));
60
24
  }
61
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,iBAA4C,MAAM,wBAAwB,CAAC;AAClF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,yBAAyB,MAAM,sCAAsC,CAAC;AAC7E,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY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,EAAE,KAAK,EAAiB;IACzF,OAAO,CACL;QACE,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC;YAC9D,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;gBACvB,UAAU,IAAI,KAAK,IAAI,oBAAC,iBAAiB,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI;gBAC7E,kCAAO,OAAO,CAAQ,CAClB;YACN,8BAAM,SAAS,EAAE,MAAM,CAAC,KAAK,IAAG,KAAK,CAAQ,CACzC;QACL,QAAQ,IAAI,oBAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,GAAI,CACzC,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, memo, ReactNode, useEffect, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport ChartSeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport styles from './styles.css.js';\nimport InternalExpandableSection from '../../../expandable-section/internal';\nimport getSeriesDetailsText from './series-details-text';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\n\ninterface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\ninterface ListItemProps {\n itemKey: ReactNode;\n value: ReactNode;\n subItems?: ReadonlyArray<ChartDetailPair>;\n markerType?: ChartSeriesMarkerType;\n color?: string;\n}\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n markerType?: ChartSeriesMarkerType;\n color?: string;\n isDimmed?: boolean;\n subItems?: ReadonlyArray<ChartDetailPair>;\n expandableId?: string;\n}\nexport type ExpandedSeries = Set<string>;\n\nexport interface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n expandedSeries?: ExpandedSeries;\n setPopoverText?: (s: string) => void;\n setExpandedState?: (seriesTitle: string, state: boolean) => void;\n}\n\nexport default memo(forwardRef(ChartSeriesDetails));\n\nfunction ChartSeriesDetails(\n { details, expandedSeries, setPopoverText, setExpandedState, ...restProps }: ChartSeriesDetailsProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const baseProps = getBaseProps(restProps);\n const className = clsx(baseProps.className, styles.root);\n const detailsRef = useRef<HTMLDivElement | null>(null);\n const mergedRef = useMergeRefs(ref, detailsRef);\n\n // Once the component has rendered, pass its content in plain text\n // so that it can be used by screen readers.\n useEffect(() => {\n if (setPopoverText) {\n if (detailsRef.current) {\n setPopoverText(getSeriesDetailsText(detailsRef.current));\n }\n return () => {\n setPopoverText('');\n };\n }\n }, [details, setPopoverText]);\n\n const isExpanded = (seriesTitle: string) => !!expandedSeries && expandedSeries.has(seriesTitle);\n\n return (\n <div {...baseProps} className={className} ref={mergedRef}>\n <ul className={styles.list}>\n {details.map(({ key, value, markerType, color, isDimmed, subItems, expandableId }, index) => (\n <li\n key={index}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles['list-item']]: true,\n [styles['with-sub-items']]: subItems?.length,\n [styles.expandable]: !!expandableId,\n })}\n >\n {subItems?.length && !!expandableId ? (\n <ExpandableSeries\n itemKey={key}\n value={value}\n markerType={markerType}\n color={color}\n subItems={subItems}\n expanded={isExpanded(expandableId)}\n setExpandedState={state => setExpandedState && setExpandedState(expandableId, state)}\n />\n ) : (\n <NonExpandableSeries\n itemKey={key}\n value={value}\n markerType={markerType}\n color={color}\n subItems={subItems}\n />\n )}\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction SubItems({\n items,\n expandable,\n expanded,\n}: {\n items: ReadonlyArray<ChartDetailPair>;\n expandable?: boolean;\n expanded?: boolean;\n}) {\n return (\n <ul className={clsx(styles['sub-items'], expandable && styles.expandable)}>\n {items.map(({ key, value }, index) => (\n <li\n key={index}\n className={clsx(\n styles['inner-list-item'],\n styles['key-value-pair'],\n (expanded || !expandable) && styles.announced\n )}\n >\n <span className={styles.key}>{key}</span>\n <span className={styles.value}>{value}</span>\n </li>\n ))}\n </ul>\n );\n}\n\nfunction ExpandableSeries({\n itemKey,\n value,\n subItems,\n markerType,\n color,\n expanded,\n setExpandedState,\n}: ListItemProps &\n Required<Pick<ListItemProps, 'subItems'>> & {\n expanded: boolean;\n setExpandedState: (state: boolean) => void;\n }) {\n return (\n <div className={styles['expandable-section']}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <div className={styles['full-width']}>\n <InternalExpandableSection\n variant=\"compact\"\n headerText={itemKey}\n headerActions={<span className={clsx(styles.value, styles.expandable)}>{value}</span>}\n expanded={expanded}\n onChange={({ detail }) => setExpandedState(detail.expanded)}\n >\n <SubItems items={subItems} expandable={true} expanded={expanded} />\n </InternalExpandableSection>\n </div>\n </div>\n );\n}\n\nfunction NonExpandableSeries({ itemKey, value, subItems, markerType, color }: ListItemProps) {\n return (\n <>\n <div className={clsx(styles['key-value-pair'], styles.announced)}>\n <div className={styles.key}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <span>{itemKey}</span>\n </div>\n <span className={styles.value}>{value}</span>\n </div>\n {subItems && <SubItems items={subItems} />}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,iBAA4C,MAAM,wBAAwB,CAAC;AAClF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAYrC,eAAe,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAExC,SAAS,kBAAkB,CAAC,EAAkD;QAAlD,EAAE,OAAO,OAAyC,EAApC,SAAS,cAAvB,WAAyB,CAAF;IACjD,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,CACL,6CAAS,SAAS,IAAE,SAAS,EAAE,SAAS;QACtC,4BAAI,SAAS,EAAE,MAAM,CAAC,IAAI,IACvB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CACnE,4BACE,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,IAAI,CAAC;gBACd,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ;gBACzB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI;aAC5B,CAAC;YAEF,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;gBACvB,UAAU,IAAI,KAAK,IAAI,oBAAC,iBAAiB,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI;gBAC7E,kCAAO,GAAG,CAAQ,CACd;YACN,oBAAC,WAAW,IAAC,SAAS,EAAC,OAAO,IAAE,KAAK,CAAe,CACjD,CACN,CAAC,CACC,CACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { memo } from 'react';\nimport clsx from 'clsx';\n\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport InternalBox from '../../../box/internal';\nimport { ChartDetailPair } from '../../../pie-chart/interfaces';\nimport ChartSeriesMarker, { ChartSeriesMarkerType } from '../chart-series-marker';\nimport styles from './styles.css.js';\n\nexport interface ChartSeriesDetailItem extends ChartDetailPair {\n markerType?: ChartSeriesMarkerType;\n color?: string;\n isDimmed?: boolean;\n}\n\nexport interface ChartSeriesDetailsProps extends BaseComponentProps {\n details: ReadonlyArray<ChartSeriesDetailItem>;\n}\n\nexport default memo(ChartSeriesDetails);\n\nfunction ChartSeriesDetails({ details, ...restProps }: ChartSeriesDetailsProps) {\n const baseProps = getBaseProps(restProps);\n const className = clsx(baseProps.className, styles.root);\n\n return (\n <div {...baseProps} className={className}>\n <ul className={styles.list}>\n {details.map(({ key, value, markerType, color, isDimmed }, index) => (\n <li\n key={index}\n className={clsx({\n [styles.dimmed]: isDimmed,\n [styles['list-item']]: true,\n })}\n >\n <div className={styles.key}>\n {markerType && color && <ChartSeriesMarker type={markerType} color={color} />}\n <span>{key}</span>\n </div>\n <InternalBox textAlign=\"right\">{value}</InternalBox>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"]}
@@ -1,24 +1,10 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "dimmed": "awsui_dimmed_10ipo_19hs8_93",
5
- "marker": "awsui_marker_10ipo_19hs8_122",
6
- "marker--line": "awsui_marker--line_10ipo_19hs8_140",
7
- "marker--rectangle": "awsui_marker--rectangle_10ipo_19hs8_144",
8
- "marker--hollow-rectangle": "awsui_marker--hollow-rectangle_10ipo_19hs8_148",
9
- "marker--dashed": "awsui_marker--dashed_10ipo_19hs8_160",
10
- "root": "awsui_root_10ipo_19hs8_180",
11
- "value": "awsui_value_10ipo_19hs8_193",
12
- "expandable": "awsui_expandable_10ipo_19hs8_197",
13
- "list-item": "awsui_list-item_10ipo_19hs8_201",
14
- "inner-list-item": "awsui_inner-list-item_10ipo_19hs8_202",
15
- "key-value-pair": "awsui_key-value-pair_10ipo_19hs8_207",
16
- "expandable-section": "awsui_expandable-section_10ipo_19hs8_208",
17
- "key": "awsui_key_10ipo_19hs8_207",
18
- "sub-items": "awsui_sub-items_10ipo_19hs8_221",
19
- "list": "awsui_list_10ipo_19hs8_201",
20
- "with-sub-items": "awsui_with-sub-items_10ipo_19hs8_245",
21
- "full-width": "awsui_full-width_10ipo_19hs8_250",
22
- "announced": "awsui_announced_10ipo_19hs8_254"
4
+ "dimmed": "awsui_dimmed_10ipo_1oktv_93",
5
+ "root": "awsui_root_10ipo_1oktv_122",
6
+ "list": "awsui_list_10ipo_1oktv_135",
7
+ "list-item": "awsui_list-item_10ipo_1oktv_142",
8
+ "key": "awsui_key_10ipo_1oktv_147"
23
9
  };
24
10
 
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_dimmed_10ipo_19hs8_93:not(#\9) {
93
+ .awsui_dimmed_10ipo_1oktv_93:not(#\9) {
94
94
  transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
95
95
  transition-delay: var(--motion-duration-transition-quick-6npj01, 90ms);
96
96
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
@@ -131,12 +131,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
131
131
  -moz-osx-font-smoothing: auto;
132
132
  }
133
133
  @media (prefers-reduced-motion: reduce) {
134
- .awsui_dimmed_10ipo_19hs8_93:not(#\9) {
134
+ .awsui_dimmed_10ipo_1oktv_93:not(#\9) {
135
135
  animation: none;
136
136
  transition: none;
137
137
  }
138
138
  }
139
- .awsui-motion-disabled .awsui_dimmed_10ipo_19hs8_93:not(#\9), .awsui-mode-entering .awsui_dimmed_10ipo_19hs8_93:not(#\9) {
139
+ .awsui-motion-disabled .awsui_dimmed_10ipo_1oktv_93:not(#\9), .awsui-mode-entering .awsui_dimmed_10ipo_1oktv_93:not(#\9) {
140
140
  animation: none;
141
141
  transition: none;
142
142
  }
@@ -145,7 +145,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
145
145
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
146
146
  SPDX-License-Identifier: Apache-2.0
147
147
  */
148
- .awsui_marker_10ipo_19hs8_122:not(#\9) {
148
+ .awsui_root_10ipo_1oktv_122:not(#\9) {
149
149
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
150
150
  border-collapse: separate;
151
151
  border-spacing: 0;
@@ -182,153 +182,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
182
182
  font-family: var(--font-family-base-dnvic8, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
183
183
  -webkit-font-smoothing: auto;
184
184
  -moz-osx-font-smoothing: auto;
185
- margin-right: var(--space-xxs-p8yyaw, 4px);
186
- margin-top: var(--space-xxs-p8yyaw, 4px);
187
- border-radius: 2px;
188
- width: 14px;
189
- flex-shrink: 0;
190
- cursor: inherit;
191
- }
192
- .awsui_marker--line_10ipo_19hs8_140:not(#\9) {
193
- margin-top: 9px;
194
- height: 4px;
195
- }
196
- .awsui_marker--rectangle_10ipo_19hs8_144:not(#\9) {
197
- height: 14px;
198
- border-radius: 2px;
199
- }
200
- .awsui_marker--hollow-rectangle_10ipo_19hs8_148:not(#\9) {
201
- height: 14px;
202
- border-radius: 2px;
203
- }
204
- .awsui_marker--hollow-rectangle_10ipo_19hs8_148:not(#\9)::after {
205
- content: "";
206
- display: block;
207
- margin: 2px;
208
- height: 10px;
209
- background-color: var(--color-background-container-content-4un1ap, #ffffff);
210
- opacity: 0.5;
211
- }
212
- .awsui_marker--dashed_10ipo_19hs8_160:not(#\9) {
213
- height: 4px;
214
- width: 6px;
215
- margin-top: 9px;
216
- margin-right: 12px;
217
- }
218
- .awsui_marker--dashed_10ipo_19hs8_160:not(#\9)::after {
219
- content: "";
220
- display: block;
221
- width: 6px;
222
- height: 4px;
223
- margin-left: 8px;
224
- border-radius: 2px;
225
- background-color: inherit;
226
- }
227
-
228
- /*
229
- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
230
- SPDX-License-Identifier: Apache-2.0
231
- */
232
- .awsui_root_10ipo_19hs8_180:not(#\9) {
233
- /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
234
- border-collapse: separate;
235
- border-spacing: 0;
236
- caption-side: top;
237
- cursor: auto;
238
- direction: ltr;
239
- empty-cells: show;
240
- font-family: serif;
241
- font-size: medium;
242
- font-style: normal;
243
- font-variant: normal;
244
- font-weight: normal;
245
- font-stretch: normal;
246
- line-height: normal;
247
- -webkit-hyphens: none;
248
- hyphens: none;
249
- letter-spacing: normal;
250
- list-style: disc outside none;
251
- tab-size: 8;
252
- text-align: left;
253
- text-align-last: auto;
254
- text-indent: 0;
255
- text-shadow: none;
256
- text-transform: none;
257
- visibility: visible;
258
- white-space: normal;
259
- widows: 2;
260
- word-spacing: normal;
261
- box-sizing: border-box;
262
- font-size: var(--font-size-body-m-x4okxb, 14px);
263
- line-height: var(--line-height-body-m-30ar75, 20px);
264
- color: var(--color-text-body-default-2sxhhn, #000716);
265
- font-weight: 400;
266
- font-family: var(--font-family-base-dnvic8, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
267
- -webkit-font-smoothing: auto;
268
- -moz-osx-font-smoothing: auto;
269
- }
270
-
271
- .awsui_value_10ipo_19hs8_193:not(#\9) {
272
- text-align: right;
273
- margin-inline-start: var(--space-xxl-cu2m1r, 32px);
274
- }
275
- .awsui_value_10ipo_19hs8_193.awsui_expandable_10ipo_19hs8_197:not(#\9) {
276
- font-weight: var(--font-weight-heading-s-cwn6wc, 700);
277
- }
278
-
279
- .awsui_list-item_10ipo_19hs8_201:not(#\9),
280
- .awsui_inner-list-item_10ipo_19hs8_202:not(#\9) {
281
- list-style: none;
282
- }
283
-
284
- .awsui_inner-list-item_10ipo_19hs8_202:not(#\9),
285
- .awsui_list-item_10ipo_19hs8_201 > .awsui_key-value-pair_10ipo_19hs8_207:not(#\9),
286
- .awsui_list-item_10ipo_19hs8_201 > .awsui_expandable-section_10ipo_19hs8_208:not(#\9) {
287
- display: flex;
288
- flex-direction: row;
289
- justify-content: space-between;
290
- width: 100%;
291
- }
292
- .awsui_inner-list-item_10ipo_19hs8_202 > .awsui_key_10ipo_19hs8_207:not(#\9),
293
- .awsui_list-item_10ipo_19hs8_201 > .awsui_key-value-pair_10ipo_19hs8_207 > .awsui_key_10ipo_19hs8_207:not(#\9),
294
- .awsui_list-item_10ipo_19hs8_201 > .awsui_expandable-section_10ipo_19hs8_208 > .awsui_key_10ipo_19hs8_207:not(#\9) {
295
- display: inline-flex;
296
- color: var(--color-text-group-label-zuh0h0, #414d5c);
297
- }
298
-
299
- .awsui_sub-items_10ipo_19hs8_221:not(#\9):not(.awsui_expandable_10ipo_19hs8_197) {
300
- padding-inline-start: calc(14px + var(--space-xxs-p8yyaw, 4px));
301
- }
302
- .awsui_sub-items_10ipo_19hs8_221.awsui_expandable_10ipo_19hs8_197:not(#\9) {
303
- padding-inline-start: 0;
304
- }
305
- .awsui_sub-items_10ipo_19hs8_221.awsui_expandable_10ipo_19hs8_197 > .awsui_inner-list-item_10ipo_19hs8_202 > .awsui_value_10ipo_19hs8_193:not(#\9) {
306
- white-space: nowrap;
307
185
  }
308
186
 
309
- .awsui_list_10ipo_19hs8_201:not(#\9) {
187
+ .awsui_list_10ipo_1oktv_135:not(#\9) {
310
188
  display: flex;
311
189
  margin: 0;
312
190
  padding: 0;
313
191
  list-style: none;
314
192
  flex-direction: column;
315
193
  }
316
- .awsui_list_10ipo_19hs8_201 > .awsui_list-item_10ipo_19hs8_201 > .awsui_key-value-pair_10ipo_19hs8_207 > .awsui_key_10ipo_19hs8_207:not(#\9) {
317
- align-items: flex-start;
318
- }
319
- .awsui_list_10ipo_19hs8_201 > .awsui_list-item_10ipo_19hs8_201.awsui_dimmed_10ipo_19hs8_93:not(#\9) {
320
- opacity: 0.35;
321
- }
322
-
323
- .awsui_list-item_10ipo_19hs8_201.awsui_with-sub-items_10ipo_19hs8_245:not(#\9):not(.awsui_expandable_10ipo_19hs8_197) > .awsui_key-value-pair_10ipo_19hs8_207 > .awsui_key_10ipo_19hs8_207,
324
- .awsui_list-item_10ipo_19hs8_201.awsui_with-sub-items_10ipo_19hs8_245:not(#\9):not(.awsui_expandable_10ipo_19hs8_197) > .awsui_key-value-pair_10ipo_19hs8_207 > .awsui_value_10ipo_19hs8_193 {
325
- font-weight: var(--font-weight-heading-s-cwn6wc, 700);
194
+ .awsui_list_10ipo_1oktv_135 > .awsui_list-item_10ipo_1oktv_142:not(#\9) {
195
+ display: inline-flex;
196
+ justify-content: space-between;
326
197
  }
327
198
 
328
- .awsui_full-width_10ipo_19hs8_250:not(#\9) {
329
- width: 100%;
199
+ .awsui_key_10ipo_1oktv_147:not(#\9) {
200
+ display: inline-flex;
201
+ align-items: flex-start;
202
+ color: var(--color-text-group-label-zuh0h0, #414d5c);
203
+ margin-right: var(--space-xxl-cu2m1r, 32px);
330
204
  }
331
205
 
332
- .awsui_announced_10ipo_19hs8_254:not(#\9) {
333
- /* Used by getSeriesDetailText to select text to be announced by screen readers */
206
+ .awsui_dimmed_10ipo_1oktv_93:not(#\9) {
207
+ opacity: 0.35;
334
208
  }
@@ -2,24 +2,10 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "dimmed": "awsui_dimmed_10ipo_19hs8_93",
6
- "marker": "awsui_marker_10ipo_19hs8_122",
7
- "marker--line": "awsui_marker--line_10ipo_19hs8_140",
8
- "marker--rectangle": "awsui_marker--rectangle_10ipo_19hs8_144",
9
- "marker--hollow-rectangle": "awsui_marker--hollow-rectangle_10ipo_19hs8_148",
10
- "marker--dashed": "awsui_marker--dashed_10ipo_19hs8_160",
11
- "root": "awsui_root_10ipo_19hs8_180",
12
- "value": "awsui_value_10ipo_19hs8_193",
13
- "expandable": "awsui_expandable_10ipo_19hs8_197",
14
- "list-item": "awsui_list-item_10ipo_19hs8_201",
15
- "inner-list-item": "awsui_inner-list-item_10ipo_19hs8_202",
16
- "key-value-pair": "awsui_key-value-pair_10ipo_19hs8_207",
17
- "expandable-section": "awsui_expandable-section_10ipo_19hs8_208",
18
- "key": "awsui_key_10ipo_19hs8_207",
19
- "sub-items": "awsui_sub-items_10ipo_19hs8_221",
20
- "list": "awsui_list_10ipo_19hs8_201",
21
- "with-sub-items": "awsui_with-sub-items_10ipo_19hs8_245",
22
- "full-width": "awsui_full-width_10ipo_19hs8_250",
23
- "announced": "awsui_announced_10ipo_19hs8_254"
5
+ "dimmed": "awsui_dimmed_10ipo_1oktv_93",
6
+ "root": "awsui_root_10ipo_1oktv_122",
7
+ "list": "awsui_list_10ipo_1oktv_135",
8
+ "list-item": "awsui_list-item_10ipo_1oktv_142",
9
+ "key": "awsui_key_10ipo_1oktv_147"
24
10
  };
25
11
 
@@ -1,4 +1,4 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (b5ca2a63)";
2
+ export var PACKAGE_VERSION = "3.0.0 (d64a5bbe)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (b5ca2a63)",
3
+ "PACKAGE_VERSION": "3.0.0 (d64a5bbe)",
4
4
  "THEME": "default",
5
5
  "ALWAYS_VISUAL_REFRESH": false
6
6
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "b5ca2a63a0b044b4e85b83b4a009ab1f559b90e0"
2
+ "commit": "d64a5bbe977d91971a1a04a4fa7c167a6ef5d90c"
3
3
  }
@@ -1,6 +1,7 @@
1
- import { ChartDataTypes, CommonMixedChartProps, MixedLineBarChartProps } from '../mixed-line-bar-chart/interfaces';
1
+ import { CartesianChartProps } from '../internal/components/cartesian-chart/interfaces';
2
+ import { ChartDataTypes, MixedLineBarChartProps } from '../mixed-line-bar-chart/interfaces';
2
3
  type LineSeries<T> = MixedLineBarChartProps.LineDataSeries<T> | MixedLineBarChartProps.ThresholdSeries<T>;
3
- export interface LineChartProps<T extends ChartDataTypes> extends CommonMixedChartProps<T> {
4
+ export interface LineChartProps<T extends ChartDataTypes> extends CartesianChartProps<T, MixedLineBarChartProps.ChartSeries<T>> {
4
5
  /**
5
6
  * Array that represents the source of data for the displayed chart.
6
7
  * Each element can represent a line series or a threshold, and can have the following properties:
@@ -12,6 +13,11 @@ export interface LineChartProps<T extends ChartDataTypes> extends CommonMixedCha
12
13
  * * `valueFormatter` (Function): (Optional) A function that formats data values before rendering in the UI, For example, in the details popover.
13
14
  */
14
15
  series: ReadonlyArray<LineSeries<T>>;
16
+ /**
17
+ * When set to `true`, adds a visual emphasis on the zero baseline axis.
18
+ * See the usage guidelines for more details.
19
+ */
20
+ emphasizeBaselineAxis?: boolean;
15
21
  }
16
22
  export declare namespace LineChartProps { }
17
23
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["line-chart/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAEnH,KAAK,UAAU,CAAC,CAAC,IAAI,sBAAsB,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AAE1G,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,cAAc,CAAE,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IACxF;;;;;;;;;OASG;IACH,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC;AAGD,yBAAiB,cAAc,CAAC,GAAE"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["line-chart/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5F,KAAK,UAAU,CAAC,CAAC,IAAI,sBAAsB,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;AAE1G,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,cAAc,CACtD,SAAQ,mBAAmB,CAAC,CAAC,EAAE,sBAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACrE;;;;;;;;;OASG;IACH,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAErC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,yBAAiB,cAAc,CAAC,GAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["line-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ChartDataTypes, CommonMixedChartProps, MixedLineBarChartProps } from '../mixed-line-bar-chart/interfaces';\n\ntype LineSeries<T> = MixedLineBarChartProps.LineDataSeries<T> | MixedLineBarChartProps.ThresholdSeries<T>;\n\nexport interface LineChartProps<T extends ChartDataTypes> extends CommonMixedChartProps<T> {\n /**\n * Array that represents the source of data for the displayed chart.\n * Each element can represent a line series or a threshold, and can have the following properties:\n *\n * * `title` (string): A human-readable title for this series\n * * `type` (string): Series type (`\"line\"`, or `\"threshold\"`)\n * * `data` (Array): An array of data points, represented as objects with `x` and `y` properties\n * * `color` (string): (Optional) A color hex value for this series. When assigned, it takes priority over the automatically assigned color\n * * `valueFormatter` (Function): (Optional) A function that formats data values before rendering in the UI, For example, in the details popover.\n */\n series: ReadonlyArray<LineSeries<T>>;\n}\n\n// W/o this documenter injects CartesianChartProps namespace properties into LineChartProps definition.\nexport namespace LineChartProps {}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["line-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CartesianChartProps } from '../internal/components/cartesian-chart/interfaces';\nimport { ChartDataTypes, MixedLineBarChartProps } from '../mixed-line-bar-chart/interfaces';\n\ntype LineSeries<T> = MixedLineBarChartProps.LineDataSeries<T> | MixedLineBarChartProps.ThresholdSeries<T>;\n\nexport interface LineChartProps<T extends ChartDataTypes>\n extends CartesianChartProps<T, MixedLineBarChartProps.ChartSeries<T>> {\n /**\n * Array that represents the source of data for the displayed chart.\n * Each element can represent a line series or a threshold, and can have the following properties:\n *\n * * `title` (string): A human-readable title for this series\n * * `type` (string): Series type (`\"line\"`, or `\"threshold\"`)\n * * `data` (Array): An array of data points, represented as objects with `x` and `y` properties\n * * `color` (string): (Optional) A color hex value for this series. When assigned, it takes priority over the automatically assigned color\n * * `valueFormatter` (Function): (Optional) A function that formats data values before rendering in the UI, For example, in the details popover.\n */\n series: ReadonlyArray<LineSeries<T>>;\n\n /**\n * When set to `true`, adds a visual emphasis on the zero baseline axis.\n * See the usage guidelines for more details.\n */\n emphasizeBaselineAxis?: boolean;\n}\n\n// W/o this documenter injects CartesianChartProps namespace properties into LineChartProps definition.\nexport namespace LineChartProps {}\n"]}
@@ -31,7 +31,6 @@ export interface ChartContainerProps<T extends ChartDataTypes> {
31
31
  ariaDescription: MixedLineBarChartProps<T>['ariaDescription'];
32
32
  i18nStrings: MixedLineBarChartProps<T>['i18nStrings'];
33
33
  plotContainerRef: React.RefObject<HTMLDivElement>;
34
- detailPopoverSeriesContent?: MixedLineBarChartProps.DetailPopoverSeriesContent<T>;
35
34
  }
36
- export default function ChartContainer<T extends ChartDataTypes>({ fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize, stackedBars, horizontalBars, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings, plotContainerRef, detailPopoverSeriesContent, ...props }: ChartContainerProps<T>): JSX.Element;
35
+ export default function ChartContainer<T extends ChartDataTypes>({ fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize, stackedBars, horizontalBars, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings, plotContainerRef, ...props }: ChartContainerProps<T>): JSX.Element;
37
36
  //# sourceMappingURL=chart-container.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart-container.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/chart-container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAgBlG,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAmB,MAAM,cAAc,CAAC;AAGvH,OAAyB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAYxF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc;IAC3D,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAClE,mBAAmB,EAAE,sBAAsB,CAAC,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AC,iBAAiB,CAAC,CAAC;IAC9D,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAEtD,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAElD,0BAA0B,CAAC,EAAE,sBAAsB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;CACnF;AAuBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,SAAS,cAAc,EAAE,EAC/D,SAAS,EACT,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,iBAA4B,EAC5B,WAAmB,EACnB,cAAsB,EACtB,UAAU,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,CAAC,CAAC,eA6gBxB"}
1
+ {"version":3,"file":"chart-container.d.ts","sourceRoot":"lib/default/","sources":["mixed-line-bar-chart/chart-container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAgBlG,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAmB,MAAM,cAAc,CAAC;AAGvH,OAAyB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAYxF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc;IAC3D,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9C,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,C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;IAE9D,SAAS,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAClD,cAAc,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC5D,eAAe,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC9D,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAEtD,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CACnD;AAuBD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,SAAS,cAAc,EAAE,EAC/D,SAAS,EACT,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,iBAA4B,EAC5B,WAAmB,EACnB,cAAsB,EACtB,UAAU,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAgB,EAChB,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAsgBxB"}
@@ -35,12 +35,11 @@ const BOTTOM_LABELS_OFFSET = 12;
35
35
  const fallbackContainerWidth = 500;
36
36
  export default function ChartContainer(_a) {
37
37
  var _b, _c;
38
- var { fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize = 'medium', stackedBars = false, horizontalBars = false, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings = {}, plotContainerRef, detailPopoverSeriesContent } = _a, props = __rest(_a, ["fitHeight", "height", "series", "visibleSeries", "highlightedSeries", "onHighlightChange", "highlightedPoint", "setHighlightedPoint", "highlightedGroupIndex", "setHighlightedGroupIndex", "detailPopoverFooter", "detailPopoverSize", "stackedBars", "horizontalBars", "xScaleType", "yScaleType", "xTickFormatter", "yTickFormatter", "emphasizeBaselineAxis", "xTitle", "yTitle", "ariaLabel", "ariaLabelledby", "ariaDescription", "i18nStrings", "plotContainerRef", "detailPopoverSeriesContent"]);
38
+ var { fitHeight, height: explicitPlotHeight, series, visibleSeries, highlightedSeries, onHighlightChange, highlightedPoint, setHighlightedPoint, highlightedGroupIndex, setHighlightedGroupIndex, detailPopoverFooter, detailPopoverSize = 'medium', stackedBars = false, horizontalBars = false, xScaleType, yScaleType, xTickFormatter, yTickFormatter, emphasizeBaselineAxis, xTitle, yTitle, ariaLabel, ariaLabelledby, ariaDescription, i18nStrings = {}, plotContainerRef } = _a, props = __rest(_a, ["fitHeight", "height", "series", "visibleSeries", "highlightedSeries", "onHighlightChange", "highlightedPoint", "setHighlightedPoint", "highlightedGroupIndex", "setHighlightedGroupIndex", "detailPopoverFooter", "detailPopoverSize", "stackedBars", "horizontalBars", "xScaleType", "yScaleType", "xTickFormatter", "yTickFormatter", "emphasizeBaselineAxis", "xTitle", "yTitle", "ariaLabel", "ariaLabelledby", "ariaDescription", "i18nStrings", "plotContainerRef"]);
39
39
  const plotRef = useRef(null);
40
40
  const verticalMarkerRef = useRef(null);
41
41
  const [leftLabelsWidth, setLeftLabelsWidth] = useState(0);
42
42
  const [verticalMarkerX, setVerticalMarkerX] = useState(null);
43
- const [detailsPopoverText, setDetailsPopoverText] = useState('');
44
43
  const [containerWidth, containerMeasureRef] = useContainerWidth(fallbackContainerWidth);
45
44
  const maxLeftLabelsWidth = Math.round(containerWidth / 2);
46
45
  const plotWidth = containerWidth
@@ -318,23 +317,15 @@ export default function ChartContainer(_a) {
318
317
  // When series point is highlighted show the corresponding series and matching x-thresholds.
319
318
  if (highlightedPoint) {
320
319
  const seriesToShow = visibleSeries.filter(series => series.series === (highlightedPoint === null || highlightedPoint === void 0 ? void 0 : highlightedPoint.series) || isXThreshold(series.series));
321
- return formatHighlighted({
322
- position: highlightedX,
323
- series: seriesToShow,
324
- xTickFormatter,
325
- detailPopoverSeriesContent,
326
- });
320
+ return formatHighlighted(highlightedX, seriesToShow, xTickFormatter);
327
321
  }
328
322
  // Otherwise - show all visible series details.
329
- return formatHighlighted({
330
- position: highlightedX,
331
- series: visibleSeries,
332
- xTickFormatter,
333
- detailPopoverSeriesContent,
334
- });
335
- }, [highlightedX, highlightedPoint, visibleSeries, xTickFormatter, detailPopoverSeriesContent]);
323
+ return formatHighlighted(highlightedX, visibleSeries, xTickFormatter);
324
+ }, [highlightedX, highlightedPoint, visibleSeries, xTickFormatter]);
336
325
  const detailPopoverFooterContent = useMemo(() => (detailPopoverFooter && highlightedX ? detailPopoverFooter(highlightedX) : null), [detailPopoverFooter, highlightedX]);
337
- const activeAriaLabel = highlightDetails && detailsPopoverText ? `${highlightDetails.position}, ${detailsPopoverText}` : '';
326
+ const activeAriaLabel = useMemo(() => highlightDetails
327
+ ? `${highlightDetails.position}, ${highlightDetails.details.map(d => d.key + ' ' + d.value).join(',')}`
328
+ : '', [highlightDetails]);
338
329
  // Live region is used when nothing is focused e.g. when hovering.
339
330
  const activeLiveRegion = activeAriaLabel && !highlightedPoint && highlightedGroupIndex === null ? activeAriaLabel : '';
340
331
  const isLineXKeyboardFocused = isPlotFocused && !highlightedPoint && verticalMarkerX;
@@ -350,6 +341,6 @@ export default function ChartContainer(_a) {
350
341
  React.createElement(VerticalMarker, { key: verticalLineX || '', height: plotHeight, showPoints: highlightedPoint === null, showLine: !isGroupNavigation, points: verticalMarkers, ref: verticalMarkerRef }),
351
342
  highlightedPoint && (React.createElement(HighlightedPoint, { ref: highlightedPointRef, point: point, role: "button", ariaLabel: activeAriaLabel, ariaHasPopup: true, ariaExpanded: isPopoverPinned })),
352
343
  isGroupNavigation && xAxisProps.scale.isCategorical() && (React.createElement(BarGroups, { ariaLabel: activeAriaLabel, isRefresh: isRefresh, isPopoverPinned: isPopoverPinned, barGroups: barGroups, highlightedGroupIndex: highlightedGroupIndex, highlightedGroupRef: highlightedGroupRef })),
353
- React.createElement(BottomLabels, Object.assign({}, bottomLabelsProps, { axis: x, scale: bottomAxisProps.scale, title: bottomAxisProps.title, ariaRoleDescription: bottomAxisProps.ariaRoleDescription, height: plotHeight, width: plotWidth, offsetLeft: leftLabelsWidth + BOTTOM_LABELS_OFFSET, offsetRight: BOTTOM_LABELS_OFFSET }))), popover: React.createElement(ChartPopover, { ref: popoverRef, containerRef: containerRefObject, trackRef: highlightedElementRef, isOpen: isPopoverOpen, isPinned: isPopoverPinned, highlightDetails: highlightDetails, onDismiss: onPopoverDismiss, size: detailPopoverSize, footer: detailPopoverFooterContent, dismissAriaLabel: i18nStrings.detailPopoverDismissAriaLabel, onMouseLeave: onPopoverLeave, onBlur: onSVGBlur, setPopoverText: setDetailsPopoverText }) }));
344
+ React.createElement(BottomLabels, Object.assign({}, bottomLabelsProps, { axis: x, scale: bottomAxisProps.scale, title: bottomAxisProps.title, ariaRoleDescription: bottomAxisProps.ariaRoleDescription, height: plotHeight, width: plotWidth, offsetLeft: leftLabelsWidth + BOTTOM_LABELS_OFFSET, offsetRight: BOTTOM_LABELS_OFFSET }))), popover: React.createElement(ChartPopover, { ref: popoverRef, containerRef: containerRefObject, trackRef: highlightedElementRef, isOpen: isPopoverOpen, isPinned: isPopoverPinned, highlightDetails: highlightDetails, onDismiss: onPopoverDismiss, size: detailPopoverSize, footer: detailPopoverFooterContent, dismissAriaLabel: i18nStrings.detailPopoverDismissAriaLabel, onMouseLeave: onPopoverLeave, onBlur: onSVGBlur }) }));
354
345
  }
355
346
  //# sourceMappingURL=chart-container.js.map