@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.
- package/alert/styles.css.js +25 -25
- package/alert/styles.scoped.css +59 -53
- package/alert/styles.selectors.js +25 -25
- package/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +39 -30
- package/anchor-navigation/styles.selectors.js +8 -8
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +55 -48
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/content-wrapper/styles.css.js +3 -3
- package/app-layout/content-wrapper/styles.scoped.css +15 -15
- package/app-layout/content-wrapper/styles.selectors.js +3 -3
- package/app-layout/drawer/styles.css.js +12 -12
- package/app-layout/drawer/styles.scoped.css +29 -30
- package/app-layout/drawer/styles.selectors.js +12 -12
- package/app-layout/interfaces.d.ts +3 -4
- package/app-layout/interfaces.d.ts.map +1 -1
- package/app-layout/interfaces.js.map +1 -1
- package/app-layout/mobile-toolbar/styles.css.js +8 -8
- package/app-layout/mobile-toolbar/styles.scoped.css +18 -17
- package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +6 -6
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/split-panel/styles.css.js +2 -2
- package/app-layout/split-panel/styles.scoped.css +3 -3
- package/app-layout/split-panel/styles.selectors.js +2 -2
- package/app-layout/styles.css.js +16 -16
- package/app-layout/styles.scoped.css +26 -26
- package/app-layout/styles.selectors.js +16 -16
- package/app-layout/toggles/styles.css.js +2 -2
- package/app-layout/toggles/styles.scoped.css +10 -9
- package/app-layout/toggles/styles.selectors.js +2 -2
- package/app-layout/utils/use-drawers.js.map +1 -1
- package/app-layout/visual-refresh/context.js +1 -1
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +80 -80
- package/app-layout/visual-refresh/styles.scoped.css +268 -251
- package/app-layout/visual-refresh/styles.selectors.js +80 -80
- package/area-chart/styles.css.js +6 -6
- package/area-chart/styles.scoped.css +12 -11
- package/area-chart/styles.selectors.js +6 -6
- package/attribute-editor/styles.css.js +14 -14
- package/attribute-editor/styles.scoped.css +30 -29
- package/attribute-editor/styles.selectors.js +14 -14
- package/autosuggest/styles.css.js +3 -3
- package/autosuggest/styles.scoped.css +5 -5
- package/autosuggest/styles.selectors.js +3 -3
- package/badge/styles.css.js +5 -5
- package/badge/styles.scoped.css +11 -7
- package/badge/styles.selectors.js +5 -5
- package/bar-chart/index.d.ts +1 -1
- package/bar-chart/index.d.ts.map +1 -1
- package/bar-chart/index.js +2 -2
- package/bar-chart/index.js.map +1 -1
- package/bar-chart/interfaces.d.ts +8 -3
- package/bar-chart/interfaces.d.ts.map +1 -1
- package/bar-chart/interfaces.js.map +1 -1
- package/box/styles.css.js +190 -190
- package/box/styles.scoped.css +244 -240
- package/box/styles.selectors.js +190 -190
- package/breadcrumb-group/item/styles.css.js +9 -9
- package/breadcrumb-group/item/styles.scoped.css +20 -19
- package/breadcrumb-group/item/styles.selectors.js +9 -9
- package/breadcrumb-group/styles.css.js +7 -7
- package/breadcrumb-group/styles.scoped.css +28 -21
- package/breadcrumb-group/styles.selectors.js +7 -7
- package/button/styles.css.js +20 -20
- package/button/styles.scoped.css +155 -153
- package/button/styles.selectors.js +20 -20
- package/button-dropdown/category-elements/styles.css.js +13 -13
- package/button-dropdown/category-elements/styles.scoped.css +60 -50
- package/button-dropdown/category-elements/styles.selectors.js +13 -13
- package/button-dropdown/item-element/styles.css.js +15 -15
- package/button-dropdown/item-element/styles.scoped.css +38 -33
- package/button-dropdown/item-element/styles.selectors.js +15 -15
- package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +8 -8
- package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/button-dropdown/styles.css.js +15 -15
- package/button-dropdown/styles.scoped.css +39 -36
- package/button-dropdown/styles.selectors.js +15 -15
- package/calendar/styles.css.js +18 -18
- package/calendar/styles.scoped.css +75 -59
- package/calendar/styles.selectors.js +18 -18
- package/cards/styles.css.js +38 -38
- package/cards/styles.scoped.css +110 -94
- package/cards/styles.selectors.js +38 -38
- package/code-editor/resizable-box/styles.css.js +3 -3
- package/code-editor/resizable-box/styles.scoped.css +10 -10
- package/code-editor/resizable-box/styles.selectors.js +3 -3
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +210 -198
- package/code-editor/styles.selectors.js +32 -32
- package/collection-preferences/content-display/styles.css.js +11 -11
- package/collection-preferences/content-display/styles.scoped.css +40 -30
- package/collection-preferences/content-display/styles.selectors.js +11 -11
- package/collection-preferences/styles.css.js +37 -37
- package/collection-preferences/styles.scoped.css +79 -66
- package/collection-preferences/styles.selectors.js +37 -37
- package/column-layout/flexible-column-layout/styles.css.js +5 -5
- package/column-layout/flexible-column-layout/styles.scoped.css +8 -9
- package/column-layout/flexible-column-layout/styles.selectors.js +5 -5
- package/column-layout/styles.css.js +13 -13
- package/column-layout/styles.scoped.css +70 -64
- package/column-layout/styles.selectors.js +13 -13
- package/container/styles.css.js +28 -28
- package/container/styles.scoped.css +106 -98
- package/container/styles.selectors.js +28 -28
- package/content-layout/styles.css.js +7 -7
- package/content-layout/styles.scoped.css +15 -15
- package/content-layout/styles.selectors.js +7 -7
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +12 -12
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/styles.css.js +25 -25
- package/date-range-picker/calendar/grids/styles.scoped.css +71 -60
- package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
- package/date-range-picker/relative-range/styles.css.js +9 -9
- package/date-range-picker/relative-range/styles.scoped.css +21 -21
- package/date-range-picker/relative-range/styles.selectors.js +9 -9
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +73 -68
- package/date-range-picker/styles.selectors.js +38 -38
- package/drawer/styles.css.js +3 -3
- package/drawer/styles.scoped.css +21 -18
- package/drawer/styles.selectors.js +3 -3
- package/expandable-section/expandable-section-container.d.ts +2 -2
- package/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/expandable-section/expandable-section-container.js.map +1 -1
- package/expandable-section/expandable-section-header.d.ts +3 -2
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +7 -11
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/interfaces.d.ts +0 -1
- package/expandable-section/interfaces.d.ts.map +1 -1
- package/expandable-section/interfaces.js.map +1 -1
- package/expandable-section/internal.d.ts +2 -4
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js.map +1 -1
- package/expandable-section/styles.css.js +29 -32
- package/expandable-section/styles.scoped.css +99 -106
- package/expandable-section/styles.selectors.js +29 -32
- package/expandable-section/utils.d.ts +2 -3
- package/expandable-section/utils.d.ts.map +1 -1
- package/expandable-section/utils.js +1 -4
- package/expandable-section/utils.js.map +1 -1
- package/file-upload/dropzone/styles.css.js +2 -2
- package/file-upload/dropzone/styles.scoped.css +8 -4
- package/file-upload/dropzone/styles.selectors.js +2 -2
- package/file-upload/file-option/styles.css.js +7 -7
- package/file-upload/file-option/styles.scoped.css +15 -15
- package/file-upload/file-option/styles.selectors.js +7 -7
- package/file-upload/styles.css.js +2 -2
- package/file-upload/styles.scoped.css +4 -4
- package/file-upload/styles.selectors.js +2 -2
- package/flashbar/styles.css.js +47 -47
- package/flashbar/styles.scoped.css +220 -215
- package/flashbar/styles.selectors.js +47 -47
- package/form/styles.css.js +9 -9
- package/form/styles.scoped.css +18 -18
- package/form/styles.selectors.js +9 -9
- package/form-field/styles.css.js +19 -19
- package/form-field/styles.scoped.css +34 -34
- package/form-field/styles.selectors.js +19 -19
- package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
- package/internal/components/cartesian-chart/interfaces.js.map +1 -1
- package/internal/components/chart-plot/index.d.ts +1 -1
- package/internal/components/chart-plot/index.d.ts.map +1 -1
- package/internal/components/chart-plot/index.js.map +1 -1
- package/internal/components/chart-series-details/index.d.ts +4 -12
- package/internal/components/chart-series-details/index.d.ts.map +1 -1
- package/internal/components/chart-series-details/index.js +10 -46
- package/internal/components/chart-series-details/index.js.map +1 -1
- package/internal/components/chart-series-details/styles.css.js +5 -19
- package/internal/components/chart-series-details/styles.scoped.css +15 -141
- package/internal/components/chart-series-details/styles.selectors.js +5 -19
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/line-chart/interfaces.d.ts +8 -2
- package/line-chart/interfaces.d.ts.map +1 -1
- package/line-chart/interfaces.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.d.ts +1 -2
- package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +8 -17
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/chart-popover.d.ts +0 -1
- package/mixed-line-bar-chart/chart-popover.d.ts.map +1 -1
- package/mixed-line-bar-chart/chart-popover.js +3 -13
- package/mixed-line-bar-chart/chart-popover.js.map +1 -1
- package/mixed-line-bar-chart/format-highlighted.d.ts +2 -7
- package/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
- package/mixed-line-bar-chart/format-highlighted.js +5 -25
- package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
- package/mixed-line-bar-chart/interfaces.d.ts +6 -38
- package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
- package/mixed-line-bar-chart/interfaces.js.map +1 -1
- package/mixed-line-bar-chart/internal.d.ts +1 -1
- package/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/mixed-line-bar-chart/internal.js +2 -2
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/modal/styles.css.js +23 -23
- package/modal/styles.scoped.css +39 -39
- package/modal/styles.selectors.js +23 -23
- package/package.json +1 -1
- package/pie-chart/interfaces.d.ts +5 -5
- package/pie-chart/interfaces.d.ts.map +1 -1
- package/pie-chart/interfaces.js.map +1 -1
- package/pie-chart/pie-chart.d.ts +1 -1
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js +18 -21
- package/pie-chart/pie-chart.js.map +1 -1
- package/table/column-widths-utils.d.ts +0 -1
- package/table/column-widths-utils.d.ts.map +1 -1
- package/table/column-widths-utils.js +0 -18
- package/table/column-widths-utils.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +6 -7
- package/table/internal.js.map +1 -1
- package/table/node-data-cell.d.ts +15 -0
- package/table/node-data-cell.d.ts.map +1 -0
- package/table/node-data-cell.js +25 -0
- package/table/node-data-cell.js.map +1 -0
- package/table/sticky-columns/use-sticky-columns.js +1 -1
- package/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/table/thead.d.ts +1 -0
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +18 -3
- package/table/thead.js.map +1 -1
- package/table/use-column-widths.d.ts +3 -5
- package/table/use-column-widths.d.ts.map +1 -1
- package/table/use-column-widths.js +11 -61
- package/table/use-column-widths.js.map +1 -1
- package/table/use-sticky-header.d.ts.map +1 -1
- package/table/use-sticky-header.js +13 -0
- package/table/use-sticky-header.js.map +1 -1
- package/test-utils/dom/internal/chart-popover.d.ts +0 -8
- package/test-utils/dom/internal/chart-popover.js +0 -23
- package/test-utils/dom/internal/chart-popover.js.map +1 -1
- package/test-utils/selectors/internal/chart-popover.d.ts +0 -8
- package/test-utils/selectors/internal/chart-popover.js +0 -22
- package/test-utils/selectors/internal/chart-popover.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/tiles/styles.css.js +29 -29
- package/tiles/styles.scoped.css +97 -91
- package/tiles/styles.selectors.js +29 -29
- package/internal/components/chart-series-details/series-details-text.d.ts +0 -2
- package/internal/components/chart-series-details/series-details-text.d.ts.map +0 -1
- package/internal/components/chart-series-details/series-details-text.js +0 -17
- package/internal/components/chart-series-details/series-details-text.js.map +0 -1
- package/table/no-data-cell.d.ts +0 -13
- package/table/no-data-cell.d.ts.map +0 -1
- package/table/no-data-cell.js +0 -24
- 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;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,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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,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AC1B,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?: 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
|
|
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<
|
|
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,
|
|
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, {
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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,
|
|
58
|
-
React.createElement(
|
|
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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/chart-series-details/index.tsx"],"names":[],"mappings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jD,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": "
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
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
|
-
.
|
|
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
|
-
.
|
|
134
|
+
.awsui_dimmed_10ipo_1oktv_93:not(#\9) {
|
|
135
135
|
animation: none;
|
|
136
136
|
transition: none;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
.awsui-motion-disabled .
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
317
|
-
|
|
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
|
-
.
|
|
329
|
-
|
|
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
|
-
.
|
|
333
|
-
|
|
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": "
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
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
|
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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,c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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
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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
|