@cloudscape-design/components 3.0.840 → 3.0.842
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 +28 -28
- package/alert/styles.scoped.css +49 -45
- package/alert/styles.selectors.js +28 -28
- package/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +24 -20
- package/anchor-navigation/styles.selectors.js +8 -8
- package/annotation-context/annotation/annotation-icon.d.ts +2 -1
- package/annotation-context/annotation/annotation-icon.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-icon.js.map +1 -1
- package/annotation-context/annotation/annotation-popover.d.ts +2 -1
- package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-popover.js.map +1 -1
- package/annotation-context/annotation/annotation-trigger.d.ts +1 -1
- package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/closed-annotation.d.ts +2 -1
- package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
- package/annotation-context/annotation/closed-annotation.js.map +1 -1
- package/annotation-context/annotation/open-annotation.d.ts +2 -1
- package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
- package/annotation-context/annotation/open-annotation.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +36 -32
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/classic.d.ts.map +1 -1
- package/app-layout/classic.js +7 -3
- package/app-layout/classic.js.map +1 -1
- package/app-layout/content-wrapper/styles.css.js +3 -3
- package/app-layout/content-wrapper/styles.scoped.css +10 -6
- package/app-layout/content-wrapper/styles.selectors.js +3 -3
- package/app-layout/defaults.d.ts +2 -1
- package/app-layout/defaults.d.ts.map +1 -1
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/drawer/styles.css.js +14 -14
- package/app-layout/drawer/styles.scoped.css +28 -24
- package/app-layout/drawer/styles.selectors.js +14 -14
- package/app-layout/mobile-toolbar/styles.css.js +8 -8
- package/app-layout/mobile-toolbar/styles.scoped.css +12 -8
- package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
- package/app-layout/resize/styles.css.js +5 -5
- package/app-layout/resize/styles.scoped.css +16 -12
- package/app-layout/resize/styles.selectors.js +5 -5
- package/app-layout/split-panel/split-panel-forced-position.d.ts +5 -0
- package/app-layout/split-panel/split-panel-forced-position.d.ts.map +1 -0
- package/app-layout/split-panel/split-panel-forced-position.js +30 -0
- package/app-layout/split-panel/split-panel-forced-position.js.map +1 -0
- package/app-layout/split-panel/styles.css.js +2 -2
- package/app-layout/split-panel/styles.scoped.css +6 -2
- package/app-layout/split-panel/styles.selectors.js +2 -2
- package/app-layout/styles.css.js +12 -12
- package/app-layout/styles.scoped.css +16 -12
- package/app-layout/styles.selectors.js +12 -12
- package/app-layout/toggles/styles.css.js +2 -2
- package/app-layout/toggles/styles.scoped.css +12 -8
- package/app-layout/toggles/styles.selectors.js +2 -2
- package/app-layout/utils/use-resize.d.ts +1 -1
- package/app-layout/utils/use-resize.d.ts.map +1 -1
- package/app-layout/utils/use-resize.js.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts +2 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +5 -8
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.d.ts +0 -8
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
- package/app-layout/visual-refresh/drawers.js +1 -1
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +167 -163
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/compute-layout.js +6 -2
- package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +10 -10
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +17 -13
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +10 -10
- package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/index.js +32 -2
- package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +9 -5
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +19 -19
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +39 -35
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +19 -19
- package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +1 -1
- package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/split-panel/index.js +3 -1
- package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/split-panel/styles.css.js +1 -1
- package/app-layout/visual-refresh-toolbar/split-panel/styles.scoped.css +5 -1
- package/app-layout/visual-refresh-toolbar/split-panel/styles.selectors.js +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +3 -5
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +4 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +13 -13
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +19 -15
- package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +13 -13
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +7 -7
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +23 -19
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +7 -7
- package/area-chart/elements/area-series.d.ts +1 -1
- package/area-chart/elements/area-series.d.ts.map +1 -1
- package/area-chart/elements/area-series.js.map +1 -1
- package/area-chart/elements/threshold-series.d.ts +1 -1
- package/area-chart/elements/threshold-series.d.ts.map +1 -1
- package/area-chart/elements/threshold-series.js.map +1 -1
- package/area-chart/styles.css.js +6 -6
- package/area-chart/styles.scoped.css +15 -11
- package/area-chart/styles.selectors.js +6 -6
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +5 -1
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/row.d.ts +2 -1
- package/attribute-editor/row.d.ts.map +1 -1
- package/attribute-editor/row.js.map +1 -1
- package/attribute-editor/styles.css.js +14 -14
- package/attribute-editor/styles.scoped.css +28 -24
- package/attribute-editor/styles.selectors.js +14 -14
- package/autosuggest/analytics-metadata/interfaces.d.ts +0 -4
- package/autosuggest/analytics-metadata/interfaces.d.ts.map +1 -1
- package/autosuggest/analytics-metadata/interfaces.js.map +1 -1
- package/autosuggest/autosuggest-option.d.ts +1 -1
- package/autosuggest/autosuggest-option.d.ts.map +1 -1
- package/autosuggest/autosuggest-option.js.map +1 -1
- package/autosuggest/internal.d.ts +1 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/load-more-controller.d.ts +3 -2
- package/autosuggest/load-more-controller.d.ts.map +1 -1
- package/autosuggest/load-more-controller.js.map +1 -1
- package/autosuggest/options-list.d.ts +2 -1
- package/autosuggest/options-list.d.ts.map +1 -1
- package/autosuggest/options-list.js.map +1 -1
- package/badge/styles.css.js +10 -10
- package/badge/styles.scoped.css +14 -10
- package/badge/styles.selectors.js +10 -10
- package/box/styles.css.js +191 -191
- package/box/styles.scoped.css +240 -236
- package/box/styles.selectors.js +191 -191
- package/breadcrumb-group/all-items-dropdown.d.ts +15 -0
- package/breadcrumb-group/all-items-dropdown.d.ts.map +1 -0
- package/breadcrumb-group/all-items-dropdown.js +47 -0
- package/breadcrumb-group/all-items-dropdown.js.map +1 -0
- package/breadcrumb-group/analytics-metadata/interfaces.d.ts +0 -7
- package/breadcrumb-group/analytics-metadata/interfaces.d.ts.map +1 -1
- package/breadcrumb-group/analytics-metadata/interfaces.js.map +1 -1
- package/breadcrumb-group/implementation.d.ts.map +1 -1
- package/breadcrumb-group/implementation.js +9 -6
- package/breadcrumb-group/implementation.js.map +1 -1
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +29 -25
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/breadcrumb-group/styles.css.js +14 -10
- package/breadcrumb-group/styles.scoped.css +124 -11
- package/breadcrumb-group/styles.selectors.js +14 -10
- package/breadcrumb-group/utils.d.ts +0 -2
- package/breadcrumb-group/utils.d.ts.map +1 -1
- package/breadcrumb-group/utils.js +17 -46
- package/breadcrumb-group/utils.js.map +1 -1
- package/button/index.d.ts.map +1 -1
- package/button/index.js +3 -3
- package/button/index.js.map +1 -1
- package/button/interfaces.d.ts +18 -0
- package/button/interfaces.d.ts.map +1 -1
- package/button/interfaces.js.map +1 -1
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +15 -2
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +21 -21
- package/button/styles.scoped.css +158 -154
- package/button/styles.selectors.js +21 -21
- package/button/test-classes/styles.css.js +2 -1
- package/button/test-classes/styles.scoped.css +5 -1
- package/button/test-classes/styles.selectors.js +2 -1
- package/button-dropdown/category-elements/styles.css.js +14 -14
- package/button-dropdown/category-elements/styles.scoped.css +27 -23
- package/button-dropdown/category-elements/styles.selectors.js +14 -14
- package/button-dropdown/index.d.ts.map +1 -1
- package/button-dropdown/index.js +2 -2
- package/button-dropdown/index.js.map +1 -1
- package/button-dropdown/interfaces.d.ts +20 -3
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/internal.d.ts.map +1 -1
- package/button-dropdown/internal.js +13 -6
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/item-element/index.d.ts +0 -7
- package/button-dropdown/item-element/index.d.ts.map +1 -1
- package/button-dropdown/item-element/index.js +3 -2
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/item-element/styles.css.js +14 -13
- package/button-dropdown/item-element/styles.scoped.css +33 -21
- package/button-dropdown/item-element/styles.selectors.js +14 -13
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts.map +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
- package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +9 -5
- package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/button-dropdown/styles.css.js +21 -17
- package/button-dropdown/styles.scoped.css +51 -38
- package/button-dropdown/styles.selectors.js +21 -17
- package/button-dropdown/tooltip.d.ts +2 -1
- package/button-dropdown/tooltip.d.ts.map +1 -1
- package/button-dropdown/tooltip.js.map +1 -1
- package/button-dropdown/utils/menu-item.d.ts +3 -2
- package/button-dropdown/utils/menu-item.d.ts.map +1 -1
- package/button-dropdown/utils/menu-item.js.map +1 -1
- package/button-group/file-input-item.d.ts +11 -0
- package/button-group/file-input-item.d.ts.map +1 -0
- package/button-group/file-input-item.js +23 -0
- package/button-group/file-input-item.js.map +1 -0
- package/button-group/interfaces.d.ts +23 -1
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/button-group/internal.d.ts.map +1 -1
- package/button-group/internal.js +2 -2
- package/button-group/internal.js.map +1 -1
- package/button-group/item-element.d.ts +1 -0
- package/button-group/item-element.d.ts.map +1 -1
- package/button-group/item-element.js +12 -6
- package/button-group/item-element.js.map +1 -1
- package/button-group/styles.css.js +4 -4
- package/button-group/styles.scoped.css +10 -6
- package/button-group/styles.selectors.js +4 -4
- package/calendar/grid/use-calendar-grid-keyboard-navigation.d.ts.map +1 -1
- package/calendar/grid/use-calendar-grid-keyboard-navigation.js +2 -1
- package/calendar/grid/use-calendar-grid-keyboard-navigation.js.map +1 -1
- package/calendar/internal.d.ts.map +1 -1
- package/calendar/internal.js +2 -1
- package/calendar/internal.js.map +1 -1
- package/calendar/styles.css.js +21 -21
- package/calendar/styles.scoped.css +47 -43
- package/calendar/styles.selectors.js +21 -21
- package/calendar/utils/navigation-day.d.ts +8 -0
- package/calendar/utils/navigation-day.d.ts.map +1 -0
- package/calendar/utils/navigation-day.js +39 -0
- package/calendar/utils/navigation-day.js.map +1 -0
- package/calendar/utils/{navigation.d.ts → navigation-month.d.ts} +2 -6
- package/calendar/utils/navigation-month.d.ts.map +1 -0
- package/calendar/utils/navigation-month.js +39 -0
- package/calendar/utils/navigation-month.js.map +1 -0
- package/cards/styles.css.js +39 -39
- package/cards/styles.scoped.css +54 -50
- package/cards/styles.selectors.js +39 -39
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +9 -5
- package/checkbox/styles.selectors.js +3 -3
- package/code-editor/pane.d.ts +2 -1
- package/code-editor/pane.d.ts.map +1 -1
- package/code-editor/pane.js.map +1 -1
- package/code-editor/resizable-box/styles.css.js +3 -3
- package/code-editor/resizable-box/styles.scoped.css +10 -6
- package/code-editor/resizable-box/styles.selectors.js +3 -3
- package/code-editor/styles.css.js +33 -33
- package/code-editor/styles.scoped.css +139 -135
- package/code-editor/styles.selectors.js +33 -33
- package/collection-preferences/analytics-metadata/interfaces.d.ts +0 -24
- package/collection-preferences/analytics-metadata/interfaces.d.ts.map +1 -1
- package/collection-preferences/analytics-metadata/interfaces.js.map +1 -1
- package/collection-preferences/content-display/content-display-option.d.ts +1 -1
- package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
- package/collection-preferences/content-display/content-display-option.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +18 -42
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/content-display/styles.css.js +12 -13
- package/collection-preferences/content-display/styles.scoped.css +23 -44
- package/collection-preferences/content-display/styles.selectors.js +12 -13
- package/collection-preferences/styles.css.js +38 -39
- package/collection-preferences/styles.scoped.css +58 -71
- package/collection-preferences/styles.selectors.js +38 -39
- package/column-layout/flexible-column-layout/styles.css.js +5 -5
- package/column-layout/flexible-column-layout/styles.scoped.css +14 -10
- 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 +49 -45
- package/column-layout/styles.selectors.js +13 -13
- package/container/styles.css.js +31 -31
- package/container/styles.scoped.css +60 -56
- package/container/styles.selectors.js +31 -31
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +20 -16
- package/content-layout/styles.selectors.js +14 -14
- package/copy-to-clipboard/internal.d.ts +2 -1
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js.map +1 -1
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +13 -9
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/index.d.ts +2 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js +1 -1
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/monthly-grid.d.ts +2 -1
- package/date-range-picker/calendar/grids/monthly-grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/monthly-grid.js.map +1 -1
- package/date-range-picker/calendar/grids/styles.css.js +28 -28
- package/date-range-picker/calendar/grids/styles.scoped.css +47 -43
- package/date-range-picker/calendar/grids/styles.selectors.js +28 -28
- package/date-range-picker/calendar/index.js +1 -1
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/date-range-picker/dropdown.d.ts +2 -2
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +1 -1
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/index.d.ts.map +1 -1
- package/date-range-picker/index.js +3 -10
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +2 -1
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/date-range-picker/relative-range/index.d.ts +2 -1
- package/date-range-picker/relative-range/index.d.ts.map +1 -1
- package/date-range-picker/relative-range/index.js.map +1 -1
- package/date-range-picker/relative-range/styles.css.js +9 -9
- package/date-range-picker/relative-range/styles.scoped.css +17 -13
- 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 +51 -47
- package/date-range-picker/styles.selectors.js +38 -38
- package/date-range-picker/time-offset.d.ts +2 -1
- package/date-range-picker/time-offset.d.ts.map +1 -1
- package/date-range-picker/time-offset.js +1 -1
- package/date-range-picker/time-offset.js.map +1 -1
- package/date-range-picker/utils.d.ts +9 -0
- package/date-range-picker/utils.d.ts.map +1 -1
- package/date-range-picker/utils.js +19 -2
- package/date-range-picker/utils.js.map +1 -1
- package/drawer/implementation.d.ts +2 -1
- package/drawer/implementation.d.ts.map +1 -1
- package/drawer/implementation.js.map +1 -1
- package/drawer/interfaces.d.ts +2 -1
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js.map +1 -1
- package/drawer/styles.css.js +5 -5
- package/drawer/styles.scoped.css +16 -12
- package/drawer/styles.selectors.js +5 -5
- package/expandable-section/expandable-section-container.d.ts +2 -1
- 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 +0 -1
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +1 -1
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/internal.d.ts +2 -1
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js.map +1 -1
- package/expandable-section/styles.css.js +34 -34
- package/expandable-section/styles.scoped.css +69 -65
- package/expandable-section/styles.selectors.js +34 -34
- package/file-dropzone/styles.css.js +3 -3
- package/file-dropzone/styles.scoped.css +9 -5
- package/file-dropzone/styles.selectors.js +3 -3
- package/file-input/internal.d.ts +5 -1
- package/file-input/internal.d.ts.map +1 -1
- package/file-input/internal.js +18 -10
- package/file-input/internal.js.map +1 -1
- package/file-input/styles.css.js +6 -5
- package/file-input/styles.scoped.css +33 -8
- package/file-input/styles.selectors.js +6 -5
- package/file-token-group/file-token.d.ts +1 -1
- package/file-token-group/file-token.d.ts.map +1 -1
- package/file-token-group/file-token.js.map +1 -1
- package/file-token-group/styles.css.js +22 -22
- package/file-token-group/styles.scoped.css +35 -31
- package/file-token-group/styles.selectors.js +22 -22
- package/file-upload/interfaces.d.ts +0 -5
- package/file-upload/interfaces.d.ts.map +1 -1
- package/file-upload/interfaces.js.map +1 -1
- package/flashbar/analytics-metadata/interfaces.d.ts +0 -6
- package/flashbar/analytics-metadata/interfaces.d.ts.map +1 -1
- package/flashbar/analytics-metadata/interfaces.js.map +1 -1
- package/flashbar/collapsible-flashbar.d.ts +0 -1
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts +2 -1
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts +0 -1
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +152 -148
- package/flashbar/styles.selectors.js +50 -50
- package/flashbar/utils.d.ts +2 -1
- package/flashbar/utils.d.ts.map +1 -1
- package/flashbar/utils.js.map +1 -1
- package/form/styles.css.js +8 -8
- package/form/styles.scoped.css +12 -8
- package/form/styles.selectors.js +8 -8
- package/form-field/styles.css.js +24 -24
- package/form-field/styles.scoped.css +42 -38
- package/form-field/styles.selectors.js +24 -24
- package/grid/internal.d.ts +1 -1
- package/grid/internal.d.ts.map +1 -1
- package/grid/internal.js.map +1 -1
- package/grid/styles.css.js +53 -53
- package/grid/styles.scoped.css +58 -54
- package/grid/styles.selectors.js +53 -53
- package/header/styles.css.js +34 -34
- package/header/styles.scoped.css +56 -52
- package/header/styles.selectors.js +34 -34
- package/help-panel/implementation.d.ts +2 -1
- package/help-panel/implementation.d.ts.map +1 -1
- package/help-panel/implementation.js.map +1 -1
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +73 -69
- package/help-panel/styles.selectors.js +6 -6
- package/hotspot/styles.css.js +7 -7
- package/hotspot/styles.scoped.css +13 -9
- package/hotspot/styles.selectors.js +7 -7
- package/i18n/context.d.ts +1 -1
- package/i18n/context.d.ts.map +1 -1
- package/i18n/context.js.map +1 -1
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.ar.js +1 -1
- package/i18n/messages/all.ar.json +1 -1
- package/i18n/messages/all.de.js +1 -1
- package/i18n/messages/all.de.json +1 -1
- package/i18n/messages/all.en-GB.js +1 -1
- package/i18n/messages/all.en-GB.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages/all.es.js +1 -1
- package/i18n/messages/all.es.json +1 -1
- package/i18n/messages/all.fr.js +1 -1
- package/i18n/messages/all.fr.json +1 -1
- package/i18n/messages/all.id.js +1 -1
- package/i18n/messages/all.id.json +1 -1
- package/i18n/messages/all.it.js +1 -1
- package/i18n/messages/all.it.json +1 -1
- package/i18n/messages/all.ja.js +1 -1
- package/i18n/messages/all.ja.json +1 -1
- package/i18n/messages/all.ko.js +1 -1
- package/i18n/messages/all.ko.json +1 -1
- package/i18n/messages/all.pt-BR.js +1 -1
- package/i18n/messages/all.pt-BR.json +1 -1
- package/i18n/messages/all.tr.js +1 -1
- package/i18n/messages/all.tr.json +1 -1
- package/i18n/messages/all.zh-CN.js +1 -1
- package/i18n/messages/all.zh-CN.json +1 -1
- package/i18n/messages/all.zh-TW.js +1 -1
- package/i18n/messages/all.zh-TW.json +1 -1
- package/i18n/messages-types.d.ts +3 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/i18n/testing.d.ts +2 -1
- package/i18n/testing.d.ts.map +1 -1
- package/i18n/testing.js.map +1 -1
- package/icon/styles.css.js +38 -38
- package/icon/styles.scoped.css +89 -85
- package/icon/styles.selectors.js +38 -38
- package/input/styles.css.js +13 -13
- package/input/styles.scoped.css +36 -32
- package/input/styles.selectors.js +13 -13
- package/internal/analytics/components/analytics-funnel.d.ts +0 -1
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +1 -1
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/interfaces.d.ts +17 -24
- package/internal/analytics/interfaces.d.ts.map +1 -1
- package/internal/analytics/interfaces.js.map +1 -1
- package/internal/analytics/selectors.d.ts +1 -1
- package/internal/analytics/selectors.d.ts.map +1 -1
- package/internal/analytics/selectors.js +2 -1
- package/internal/analytics/selectors.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +13 -13
- package/internal/components/abstract-switch/styles.scoped.css +24 -20
- package/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/internal/components/autosuggest-input/index.d.ts +2 -2
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +13 -13
- package/internal/components/button-trigger/styles.scoped.css +31 -27
- package/internal/components/button-trigger/styles.selectors.js +13 -13
- package/internal/components/cartesian-chart/highlighted-point.d.ts +1 -1
- package/internal/components/cartesian-chart/highlighted-point.d.ts.map +1 -1
- package/internal/components/cartesian-chart/highlighted-point.js.map +1 -1
- package/internal/components/cartesian-chart/scales.d.ts +4 -5
- package/internal/components/cartesian-chart/scales.d.ts.map +1 -1
- package/internal/components/cartesian-chart/scales.js +1 -1
- package/internal/components/cartesian-chart/scales.js.map +1 -1
- package/internal/components/cartesian-chart/vertical-marker.d.ts +1 -1
- package/internal/components/cartesian-chart/vertical-marker.d.ts.map +1 -1
- package/internal/components/cartesian-chart/vertical-marker.js.map +1 -1
- package/internal/components/chart-filter/index.d.ts +1 -1
- package/internal/components/chart-filter/index.d.ts.map +1 -1
- package/internal/components/chart-filter/index.js.map +1 -1
- package/internal/components/chart-filter/styles.css.js +3 -3
- package/internal/components/chart-filter/styles.scoped.css +7 -3
- package/internal/components/chart-filter/styles.selectors.js +3 -3
- package/internal/components/chart-legend/index.d.ts +1 -1
- package/internal/components/chart-legend/index.d.ts.map +1 -1
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +19 -15
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/application-controller.d.ts +1 -1
- package/internal/components/chart-plot/application-controller.d.ts.map +1 -1
- package/internal/components/chart-plot/application-controller.js.map +1 -1
- package/internal/components/chart-plot/focus-outline.d.ts +2 -1
- package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
- package/internal/components/chart-plot/focus-outline.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-plot/styles.css.js +5 -5
- package/internal/components/chart-plot/styles.scoped.css +9 -5
- package/internal/components/chart-plot/styles.selectors.js +5 -5
- package/internal/components/chart-popover/index.d.ts +1 -1
- package/internal/components/chart-popover/index.d.ts.map +1 -1
- package/internal/components/chart-popover/index.js.map +1 -1
- package/internal/components/chart-popover/styles.css.js +3 -3
- package/internal/components/chart-popover/styles.scoped.css +7 -3
- package/internal/components/chart-popover/styles.selectors.js +3 -3
- package/internal/components/chart-series-details/index.d.ts +1 -1
- package/internal/components/chart-series-details/index.d.ts.map +1 -1
- package/internal/components/chart-series-details/index.js.map +1 -1
- package/internal/components/chart-series-details/styles.css.js +20 -20
- package/internal/components/chart-series-details/styles.scoped.css +37 -33
- package/internal/components/chart-series-details/styles.selectors.js +20 -20
- package/internal/components/chart-series-marker/styles.css.js +5 -5
- package/internal/components/chart-series-marker/styles.scoped.css +11 -7
- package/internal/components/chart-series-marker/styles.selectors.js +5 -5
- package/internal/components/chart-wrapper/styles.css.js +9 -9
- package/internal/components/chart-wrapper/styles.scoped.css +15 -11
- package/internal/components/chart-wrapper/styles.selectors.js +9 -9
- package/internal/components/checkbox-icon/index.d.ts +1 -10
- package/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/internal/components/checkbox-icon/index.js +1 -1
- package/internal/components/checkbox-icon/index.js.map +1 -1
- package/internal/components/checkbox-icon/styles.css.js +9 -9
- package/internal/components/checkbox-icon/styles.scoped.css +13 -9
- package/internal/components/checkbox-icon/styles.selectors.js +9 -9
- package/internal/components/dnd-container/index.d.ts +28 -0
- package/internal/components/dnd-container/index.d.ts.map +1 -0
- package/internal/components/dnd-container/index.js +67 -0
- package/internal/components/dnd-container/index.js.map +1 -0
- package/internal/components/dnd-container/interfaces.d.ts +13 -0
- package/internal/components/dnd-container/interfaces.d.ts.map +1 -0
- package/internal/components/dnd-container/interfaces.js +4 -0
- package/internal/components/dnd-container/interfaces.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/defaults.d.ts.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/defaults.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/index.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/index.js +1 -1
- package/internal/components/dnd-container/keyboard-sensor/index.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts +7 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/events.js +0 -4
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts +8 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/scroll.js +2 -2
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.js.map +1 -0
- package/internal/components/dnd-container/styles.css.js +6 -0
- package/internal/components/dnd-container/styles.scoped.css +172 -0
- package/internal/components/dnd-container/styles.selectors.js +7 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/use-drag-and-drop-reorder.d.ts +2 -4
- package/internal/components/dnd-container/use-drag-and-drop-reorder.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/use-drag-and-drop-reorder.js +4 -4
- package/internal/components/dnd-container/use-drag-and-drop-reorder.js.map +1 -0
- package/internal/components/dnd-container/use-live-announcements.d.ts +11 -0
- package/internal/components/dnd-container/use-live-announcements.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/use-live-announcements.js +6 -6
- package/internal/components/dnd-container/use-live-announcements.js.map +1 -0
- package/internal/components/dropdown/dropdown-fit-handler.d.ts +0 -30
- package/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
- package/internal/components/dropdown/dropdown-fit-handler.js +4 -4
- package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +41 -37
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/dropdown-footer/styles.css.js +3 -3
- package/internal/components/dropdown-footer/styles.scoped.css +7 -3
- package/internal/components/dropdown-footer/styles.selectors.js +3 -3
- package/internal/components/dropdown-status/styles.css.js +2 -2
- package/internal/components/dropdown-status/styles.scoped.css +6 -2
- package/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/internal/components/focus-lock/utils.d.ts +0 -1
- package/internal/components/focus-lock/utils.d.ts.map +1 -1
- package/internal/components/focus-lock/utils.js +1 -1
- package/internal/components/focus-lock/utils.js.map +1 -1
- package/internal/components/handle/styles.css.js +2 -2
- package/internal/components/handle/styles.scoped.css +10 -6
- package/internal/components/handle/styles.selectors.js +2 -2
- package/internal/components/masked-input/index.d.ts +1 -2
- package/internal/components/masked-input/index.d.ts.map +1 -1
- package/internal/components/masked-input/index.js +0 -1
- package/internal/components/masked-input/index.js.map +1 -1
- package/internal/components/masked-input/utils/mask-format.d.ts +1 -1
- package/internal/components/masked-input/utils/mask-format.d.ts.map +1 -1
- package/internal/components/masked-input/utils/mask-format.js.map +1 -1
- package/internal/components/menu-dropdown/index.d.ts.map +1 -1
- package/internal/components/menu-dropdown/index.js +2 -1
- package/internal/components/menu-dropdown/index.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +17 -13
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/option/highlight-match.d.ts +2 -1
- package/internal/components/option/highlight-match.d.ts.map +1 -1
- package/internal/components/option/highlight-match.js.map +1 -1
- package/internal/components/option/interfaces.d.ts +3 -2
- package/internal/components/option/interfaces.d.ts.map +1 -1
- package/internal/components/option/interfaces.js.map +1 -1
- package/internal/components/option/styles.css.js +17 -17
- package/internal/components/option/styles.scoped.css +33 -29
- package/internal/components/option/styles.selectors.js +17 -17
- package/internal/components/options-list/styles.css.js +3 -3
- package/internal/components/options-list/styles.scoped.css +7 -3
- package/internal/components/options-list/styles.selectors.js +3 -3
- package/internal/components/options-list/utils/use-highlight-option.d.ts +2 -1
- package/internal/components/options-list/utils/use-highlight-option.d.ts.map +1 -1
- package/internal/components/options-list/utils/use-highlight-option.js +2 -2
- package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
- package/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
- package/internal/components/options-list/utils/use-keyboard.js +13 -16
- package/internal/components/options-list/utils/use-keyboard.js.map +1 -1
- package/internal/components/panel-resize-handle/styles.css.js +5 -5
- package/internal/components/panel-resize-handle/styles.scoped.css +14 -10
- package/internal/components/panel-resize-handle/styles.selectors.js +5 -5
- package/internal/components/screenreader-only/index.d.ts +2 -1
- package/internal/components/screenreader-only/index.d.ts.map +1 -1
- package/internal/components/screenreader-only/index.js.map +1 -1
- package/internal/components/screenreader-only/styles.css.js +1 -1
- package/internal/components/screenreader-only/styles.scoped.css +5 -1
- package/internal/components/screenreader-only/styles.selectors.js +1 -1
- package/internal/components/selectable-item/styles.css.js +16 -16
- package/internal/components/selectable-item/styles.scoped.css +33 -29
- package/internal/components/selectable-item/styles.selectors.js +16 -16
- package/internal/components/tab-trap/index.d.ts +2 -1
- package/internal/components/tab-trap/index.d.ts.map +1 -1
- package/internal/components/tab-trap/index.js.map +1 -1
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +28 -24
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/components/transition/index.d.ts +2 -1
- package/internal/components/transition/index.d.ts.map +1 -1
- package/internal/components/transition/index.js.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.d.ts +2 -4
- package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/context/table-component-context.d.ts +2 -2
- package/internal/context/table-component-context.d.ts.map +1 -1
- package/internal/context/table-component-context.js +1 -1
- package/internal/context/table-component-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/hooks/forward-focus/radio-group.d.ts +2 -1
- package/internal/hooks/forward-focus/radio-group.d.ts.map +1 -1
- package/internal/hooks/forward-focus/radio-group.js.map +1 -1
- package/internal/hooks/use-dynamic-overlap/index.d.ts +2 -1
- package/internal/hooks/use-dynamic-overlap/index.d.ts.map +1 -1
- package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
- package/internal/hooks/use-performance-marks/index.d.ts.map +1 -1
- package/internal/hooks/use-performance-marks/index.js +23 -2
- package/internal/hooks/use-performance-marks/index.js.map +1 -1
- package/internal/keycode.d.ts +1 -5
- package/internal/keycode.d.ts.map +1 -1
- package/internal/keycode.js +0 -4
- package/internal/keycode.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/controllers/action-buttons.d.ts +1 -1
- package/internal/plugins/controllers/action-buttons.d.ts.map +1 -1
- package/internal/plugins/controllers/action-buttons.js.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.d.ts +3 -3
- package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.js.map +1 -1
- package/internal/plugins/controllers/app-layout-widget.d.ts +1 -1
- package/internal/plugins/controllers/app-layout-widget.d.ts.map +1 -1
- package/internal/plugins/controllers/app-layout-widget.js.map +1 -1
- package/internal/plugins/controllers/drawers.d.ts +4 -4
- package/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/internal/plugins/controllers/drawers.js.map +1 -1
- package/internal/styles/motion/utils.d.ts +2 -0
- package/internal/styles/motion/utils.d.ts.map +1 -0
- package/internal/styles/motion/utils.js +5 -0
- package/internal/styles/motion/utils.js.map +1 -0
- package/internal/utils/date-time/format-date-iso.d.ts +2 -1
- package/internal/utils/date-time/format-date-iso.d.ts.map +1 -1
- package/internal/utils/date-time/format-date-iso.js +6 -2
- package/internal/utils/date-time/format-date-iso.js.map +1 -1
- package/internal/utils/date-time/format-date-localized.d.ts +2 -1
- package/internal/utils/date-time/format-date-localized.d.ts.map +1 -1
- package/internal/utils/date-time/format-date-localized.js +9 -2
- package/internal/utils/date-time/format-date-localized.js.map +1 -1
- package/internal/utils/date-time/format-date-time-with-offset.d.ts.map +1 -1
- package/internal/utils/date-time/format-date-time-with-offset.js +4 -3
- package/internal/utils/date-time/format-date-time-with-offset.js.map +1 -1
- package/internal/utils/date-time/index.d.ts +1 -1
- package/internal/utils/date-time/index.d.ts.map +1 -1
- package/internal/utils/date-time/index.js +1 -1
- package/internal/utils/date-time/index.js.map +1 -1
- package/internal/utils/date-time/is-iso-only.d.ts +9 -0
- package/internal/utils/date-time/is-iso-only.d.ts.map +1 -0
- package/internal/utils/date-time/is-iso-only.js +18 -0
- package/internal/utils/date-time/is-iso-only.js.map +1 -0
- package/key-value-pairs/styles.css.js +8 -8
- package/key-value-pairs/styles.scoped.css +13 -9
- package/key-value-pairs/styles.selectors.js +8 -8
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +75 -71
- package/link/styles.selectors.js +20 -20
- package/live-region/internal.d.ts +1 -1
- package/live-region/internal.d.ts.map +1 -1
- package/live-region/internal.js.map +1 -1
- package/live-region/styles.css.js +2 -2
- package/live-region/styles.scoped.css +7 -3
- package/live-region/styles.selectors.js +2 -2
- package/mixed-line-bar-chart/bar-groups.d.ts +2 -1
- package/mixed-line-bar-chart/bar-groups.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-groups.js.map +1 -1
- package/mixed-line-bar-chart/bar-series.d.ts +2 -1
- package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-series.js.map +1 -1
- package/mixed-line-bar-chart/data-series.d.ts +2 -1
- package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/data-series.js.map +1 -1
- package/mixed-line-bar-chart/interfaces.d.ts +0 -2
- 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/line-series.d.ts +2 -1
- package/mixed-line-bar-chart/line-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/line-series.js.map +1 -1
- package/mixed-line-bar-chart/styles.css.js +11 -11
- package/mixed-line-bar-chart/styles.scoped.css +23 -19
- package/mixed-line-bar-chart/styles.selectors.js +11 -11
- package/modal/index.d.ts.map +1 -1
- package/modal/index.js +8 -2
- package/modal/index.js.map +1 -1
- package/modal/styles.css.js +23 -23
- package/modal/styles.scoped.css +42 -38
- package/modal/styles.selectors.js +23 -23
- package/multiselect/analytics-metadata/interfaces.d.ts +0 -4
- package/multiselect/analytics-metadata/interfaces.d.ts.map +1 -1
- package/multiselect/analytics-metadata/interfaces.js.map +1 -1
- package/multiselect/styles.css.js +3 -3
- package/multiselect/styles.scoped.css +7 -3
- package/multiselect/styles.selectors.js +3 -3
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +27 -23
- package/pagination/styles.selectors.js +9 -9
- package/pie-chart/interfaces.d.ts +2 -1
- package/pie-chart/interfaces.d.ts.map +1 -1
- package/pie-chart/interfaces.js.map +1 -1
- package/pie-chart/labels.d.ts +1 -1
- package/pie-chart/labels.d.ts.map +1 -1
- package/pie-chart/labels.js.map +1 -1
- package/pie-chart/pie-chart.d.ts +2 -7
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js.map +1 -1
- package/pie-chart/styles.css.js +27 -27
- package/pie-chart/styles.scoped.css +52 -48
- package/pie-chart/styles.selectors.js +27 -27
- package/popover/arrow.d.ts +1 -1
- package/popover/arrow.d.ts.map +1 -1
- package/popover/arrow.js.map +1 -1
- package/popover/container.d.ts +2 -1
- package/popover/container.d.ts.map +1 -1
- package/popover/container.js.map +1 -1
- package/popover/styles.css.js +53 -53
- package/popover/styles.scoped.css +89 -69
- package/popover/styles.selectors.js +53 -53
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +42 -34
- package/progress-bar/styles.selectors.js +19 -19
- package/prompt-input/internal.d.ts +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +14 -14
- package/prompt-input/styles.scoped.css +43 -39
- package/prompt-input/styles.selectors.js +14 -14
- package/property-filter/analytics-metadata/interfaces.d.ts +0 -15
- package/property-filter/analytics-metadata/interfaces.d.ts.map +1 -1
- package/property-filter/analytics-metadata/interfaces.js.map +1 -1
- package/property-filter/controller.d.ts +0 -1
- package/property-filter/controller.d.ts.map +1 -1
- package/property-filter/controller.js +1 -1
- package/property-filter/controller.js.map +1 -1
- package/property-filter/filtering-token/styles.css.js +18 -18
- package/property-filter/filtering-token/styles.scoped.css +45 -41
- package/property-filter/filtering-token/styles.selectors.js +18 -18
- package/property-filter/interfaces.d.ts +1 -6
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/property-filter/internal.d.ts +0 -2
- package/property-filter/internal.d.ts.map +1 -1
- package/property-filter/internal.js.map +1 -1
- package/property-filter/styles.css.js +39 -39
- package/property-filter/styles.scoped.css +45 -41
- package/property-filter/styles.selectors.js +39 -39
- package/property-filter/utils.d.ts +0 -1
- package/property-filter/utils.d.ts.map +1 -1
- package/property-filter/utils.js +1 -1
- package/property-filter/utils.js.map +1 -1
- package/radio-group/styles.css.js +10 -10
- package/radio-group/styles.scoped.css +20 -16
- package/radio-group/styles.selectors.js +10 -10
- package/s3-resource-selector/s3-modal/basic-table.d.ts +0 -6
- package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js +2 -1
- package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/styles.css.js +3 -3
- package/s3-resource-selector/s3-modal/styles.scoped.css +9 -5
- package/s3-resource-selector/s3-modal/styles.selectors.js +3 -3
- package/segmented-control/segment.d.ts +2 -1
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +15 -15
- package/segmented-control/styles.scoped.css +38 -34
- package/segmented-control/styles.selectors.js +15 -15
- package/select/analytics-metadata/interfaces.d.ts +0 -4
- package/select/analytics-metadata/interfaces.d.ts.map +1 -1
- package/select/analytics-metadata/interfaces.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/parts/styles.css.js +21 -21
- package/select/parts/styles.scoped.css +26 -22
- package/select/parts/styles.selectors.js +21 -21
- package/select/styles.css.js +1 -1
- package/select/styles.scoped.css +5 -1
- package/select/styles.selectors.js +1 -1
- package/select/utils/render-options.d.ts +2 -1
- package/select/utils/render-options.d.ts.map +1 -1
- package/select/utils/render-options.js.map +1 -1
- package/select/utils/use-native-search.d.ts +0 -1
- package/select/utils/use-native-search.d.ts.map +1 -1
- package/select/utils/use-native-search.js +1 -1
- package/select/utils/use-native-search.js.map +1 -1
- package/select/utils/use-select.js +1 -1
- package/select/utils/use-select.js.map +1 -1
- package/side-navigation/analytics-metadata/interfaces.d.ts +0 -2
- package/side-navigation/analytics-metadata/interfaces.d.ts.map +1 -1
- package/side-navigation/analytics-metadata/interfaces.js.map +1 -1
- package/side-navigation/implementation.d.ts +2 -1
- package/side-navigation/implementation.d.ts.map +1 -1
- package/side-navigation/implementation.js.map +1 -1
- package/side-navigation/parts.d.ts +2 -2
- package/side-navigation/parts.d.ts.map +1 -1
- package/side-navigation/parts.js.map +1 -1
- package/side-navigation/styles.css.js +30 -30
- package/side-navigation/styles.scoped.css +50 -46
- package/side-navigation/styles.selectors.js +30 -30
- package/slider/internal.d.ts +2 -1
- package/slider/internal.d.ts.map +1 -1
- package/slider/internal.js.map +1 -1
- package/slider/slider-labels.d.ts +2 -1
- package/slider/slider-labels.d.ts.map +1 -1
- package/slider/slider-labels.js.map +1 -1
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +80 -76
- package/slider/styles.selectors.js +26 -26
- package/slider/tick-marks.d.ts +2 -4
- package/slider/tick-marks.d.ts.map +1 -1
- package/slider/tick-marks.js.map +1 -1
- package/space-between/styles.css.js +23 -23
- package/space-between/styles.scoped.css +28 -24
- package/space-between/styles.selectors.js +23 -23
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +23 -19
- package/spinner/styles.selectors.js +13 -13
- package/split-panel/bottom.d.ts.map +1 -1
- package/split-panel/bottom.js +13 -3
- package/split-panel/bottom.js.map +1 -1
- package/split-panel/icons/styles.css.js +22 -22
- package/split-panel/icons/styles.scoped.css +28 -24
- package/split-panel/icons/styles.selectors.js +22 -22
- package/split-panel/implementation.js +1 -1
- package/split-panel/implementation.js.map +1 -1
- package/split-panel/styles.css.js +26 -26
- package/split-panel/styles.scoped.css +47 -48
- package/split-panel/styles.selectors.js +26 -26
- package/status-indicator/styles.css.js +23 -23
- package/status-indicator/styles.scoped.css +33 -29
- package/status-indicator/styles.selectors.js +23 -23
- package/steps/internal.d.ts +1 -1
- package/steps/internal.d.ts.map +1 -1
- package/steps/internal.js +1 -1
- package/steps/internal.js.map +1 -1
- package/steps/styles.css.js +6 -6
- package/steps/styles.scoped.css +13 -9
- package/steps/styles.selectors.js +6 -6
- package/table/body-cell/styles.css.js +46 -46
- package/table/body-cell/styles.scoped.css +296 -292
- package/table/body-cell/styles.selectors.js +46 -46
- package/table/expandable-rows/styles.css.js +3 -3
- package/table/expandable-rows/styles.scoped.css +17 -13
- package/table/expandable-rows/styles.selectors.js +3 -3
- package/table/header-cell/styles.css.js +26 -26
- package/table/header-cell/styles.scoped.css +69 -65
- package/table/header-cell/styles.selectors.js +26 -26
- package/table/header-cell/th-element.d.ts +2 -1
- package/table/header-cell/th-element.d.ts.map +1 -1
- package/table/header-cell/th-element.js +2 -2
- package/table/header-cell/th-element.js.map +1 -1
- package/table/interfaces.d.ts +17 -5
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +15 -6
- package/table/internal.js.map +1 -1
- package/table/progressive-loading/items-loader.d.ts +8 -2
- package/table/progressive-loading/items-loader.d.ts.map +1 -1
- package/table/progressive-loading/items-loader.js +11 -5
- package/table/progressive-loading/items-loader.js.map +1 -1
- package/table/progressive-loading/loader-cell.d.ts +2 -2
- package/table/progressive-loading/loader-cell.d.ts.map +1 -1
- package/table/progressive-loading/loader-cell.js +2 -2
- package/table/progressive-loading/loader-cell.js.map +1 -1
- package/table/progressive-loading/progressive-loading-utils.d.ts.map +1 -1
- package/table/progressive-loading/progressive-loading-utils.js +2 -2
- package/table/progressive-loading/progressive-loading-utils.js.map +1 -1
- package/table/resizer/styles.css.js +8 -8
- package/table/resizer/styles.scoped.css +19 -15
- package/table/resizer/styles.selectors.js +8 -8
- package/table/selection/interfaces.d.ts +1 -0
- package/table/selection/interfaces.d.ts.map +1 -1
- package/table/selection/interfaces.js.map +1 -1
- package/table/selection/selection-cell.d.ts.map +1 -1
- package/table/selection/selection-cell.js +4 -3
- package/table/selection/selection-cell.js.map +1 -1
- package/table/selection/styles.css.js +3 -3
- package/table/selection/styles.scoped.css +7 -3
- package/table/selection/styles.selectors.js +3 -3
- package/table/selection/use-selection.js +1 -0
- package/table/selection/use-selection.js.map +1 -1
- package/table/selection/utils.d.ts +0 -1
- package/table/selection/utils.d.ts.map +1 -1
- package/table/selection/utils.js +1 -1
- package/table/selection/utils.js.map +1 -1
- package/table/sticky-columns/use-sticky-columns.d.ts +1 -21
- package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
- package/table/sticky-columns/use-sticky-columns.js +1 -1
- package/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/table/sticky-scrollbar/styles.css.js +6 -6
- package/table/sticky-scrollbar/styles.scoped.css +14 -10
- package/table/sticky-scrollbar/styles.selectors.js +6 -6
- package/table/styles.css.js +34 -34
- package/table/styles.scoped.css +45 -41
- package/table/styles.selectors.js +34 -34
- package/table/table-role/grid-navigation.js +10 -0
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/table-role/index.d.ts +1 -1
- package/table/table-role/index.d.ts.map +1 -1
- package/table/table-role/index.js.map +1 -1
- package/table/use-cell-editing.d.ts +1 -1
- package/table/use-cell-editing.d.ts.map +1 -1
- package/table/use-cell-editing.js.map +1 -1
- package/tabs/styles.css.js +28 -28
- package/tabs/styles.scoped.css +57 -49
- package/tabs/styles.selectors.js +28 -28
- package/tabs/tab-header-bar.d.ts +2 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/internal.d.ts +2 -1
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +14 -10
- package/tag-editor/styles.selectors.js +3 -3
- package/test-utils/dom/anchor-navigation/index.d.ts +2 -1
- package/test-utils/dom/anchor-navigation/index.js +0 -2
- package/test-utils/dom/anchor-navigation/index.js.map +1 -1
- package/test-utils/dom/autosuggest/index.d.ts +0 -3
- package/test-utils/dom/autosuggest/index.js +1 -2
- package/test-utils/dom/autosuggest/index.js.map +1 -1
- package/test-utils/dom/button-group/index.d.ts +5 -0
- package/test-utils/dom/button-group/index.js +16 -7
- package/test-utils/dom/button-group/index.js.map +1 -1
- package/test-utils/dom/cards/index.d.ts +3 -2
- package/test-utils/dom/cards/index.js +0 -3
- package/test-utils/dom/cards/index.js.map +1 -1
- package/test-utils/dom/key-value-pairs/index.d.ts +3 -2
- package/test-utils/dom/key-value-pairs/index.js +0 -3
- package/test-utils/dom/key-value-pairs/index.js.map +1 -1
- package/test-utils/dom/steps/index.d.ts +2 -1
- package/test-utils/dom/steps/index.js +0 -2
- package/test-utils/dom/steps/index.js.map +1 -1
- package/test-utils/dom/tabs/index.d.ts +2 -1
- package/test-utils/dom/tabs/index.js +0 -2
- package/test-utils/dom/tabs/index.js.map +1 -1
- package/test-utils/dom/tag-editor/index.d.ts +2 -1
- package/test-utils/dom/tag-editor/index.js +0 -2
- package/test-utils/dom/tag-editor/index.js.map +1 -1
- package/test-utils/selectors/anchor-navigation/index.d.ts +2 -1
- package/test-utils/selectors/anchor-navigation/index.js +0 -2
- package/test-utils/selectors/anchor-navigation/index.js.map +1 -1
- package/test-utils/selectors/autosuggest/index.d.ts +0 -3
- package/test-utils/selectors/autosuggest/index.js +1 -2
- package/test-utils/selectors/autosuggest/index.js.map +1 -1
- package/test-utils/selectors/button-group/index.d.ts +5 -0
- package/test-utils/selectors/button-group/index.js +16 -7
- package/test-utils/selectors/button-group/index.js.map +1 -1
- package/test-utils/selectors/cards/index.d.ts +3 -2
- package/test-utils/selectors/cards/index.js +0 -3
- package/test-utils/selectors/cards/index.js.map +1 -1
- package/test-utils/selectors/key-value-pairs/index.d.ts +3 -2
- package/test-utils/selectors/key-value-pairs/index.js +0 -3
- package/test-utils/selectors/key-value-pairs/index.js.map +1 -1
- package/test-utils/selectors/steps/index.d.ts +2 -1
- package/test-utils/selectors/steps/index.js +0 -2
- package/test-utils/selectors/steps/index.js.map +1 -1
- package/test-utils/selectors/tabs/index.d.ts +2 -1
- package/test-utils/selectors/tabs/index.js +0 -2
- package/test-utils/selectors/tabs/index.js.map +1 -1
- package/test-utils/selectors/tag-editor/index.d.ts +2 -1
- package/test-utils/selectors/tag-editor/index.js +0 -2
- package/test-utils/selectors/tag-editor/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +64 -60
- package/text-content/styles.selectors.js +1 -1
- package/text-filter/analytics-metadata/interfaces.d.ts +0 -2
- package/text-filter/analytics-metadata/interfaces.d.ts.map +1 -1
- package/text-filter/analytics-metadata/interfaces.js.map +1 -1
- package/text-filter/styles.css.js +3 -3
- package/text-filter/styles.scoped.css +7 -3
- package/text-filter/styles.selectors.js +3 -3
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.scoped.css +18 -14
- package/textarea/styles.selectors.js +5 -5
- package/tiles/styles.css.js +30 -30
- package/tiles/styles.scoped.css +77 -73
- package/tiles/styles.selectors.js +30 -30
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +21 -17
- package/toggle/styles.selectors.js +10 -10
- package/toggle-button/internal.d.ts +0 -1
- package/toggle-button/internal.d.ts.map +1 -1
- package/toggle-button/internal.js +0 -1
- package/toggle-button/internal.js.map +1 -1
- package/token-group/analytics-metadata/interfaces.d.ts +0 -2
- package/token-group/analytics-metadata/interfaces.d.ts.map +1 -1
- package/token-group/analytics-metadata/interfaces.js.map +1 -1
- package/token-group/styles.css.js +8 -8
- package/token-group/styles.scoped.css +20 -16
- package/token-group/styles.selectors.js +8 -8
- package/top-navigation/1.0-beta/internal.d.ts +2 -1
- package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/top-navigation/1.0-beta/internal.js.map +1 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.d.ts +2 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +1 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +23 -25
- package/top-navigation/1.0-beta/styles.scoped.css +40 -66
- package/top-navigation/1.0-beta/styles.selectors.js +23 -25
- package/top-navigation/1.0-beta/use-top-navigation.d.ts +4 -24
- package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +1 -1
- package/top-navigation/1.0-beta/use-top-navigation.js +2 -2
- package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
- package/top-navigation/internal.d.ts +2 -1
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +3 -2
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/top-navigation/parts/overflow-menu/router.d.ts +1 -10
- package/top-navigation/parts/overflow-menu/router.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/router.js +1 -1
- package/top-navigation/parts/overflow-menu/router.js.map +1 -1
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +78 -85
- package/top-navigation/styles.selectors.js +47 -47
- package/top-navigation/use-top-navigation.d.ts +4 -3
- package/top-navigation/use-top-navigation.d.ts.map +1 -1
- package/top-navigation/use-top-navigation.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +27 -23
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +2 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts +2 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +33 -29
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/tutorial-panel/styles.css.js +1 -1
- package/tutorial-panel/styles.scoped.css +7 -3
- package/tutorial-panel/styles.selectors.js +1 -1
- package/wizard/analytics-metadata/interfaces.d.ts +0 -21
- package/wizard/analytics-metadata/interfaces.d.ts.map +1 -1
- package/wizard/analytics-metadata/interfaces.js.map +1 -1
- package/wizard/styles.css.js +30 -30
- package/wizard/styles.scoped.css +62 -58
- package/wizard/styles.selectors.js +30 -30
- package/wizard/wizard-form.d.ts +1 -4
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -1
- package/wizard/wizard-form.js.map +1 -1
- package/calendar/utils/navigation.d.ts.map +0 -1
- package/calendar/utils/navigation.js +0 -73
- package/calendar/utils/navigation.js.map +0 -1
- package/collection-preferences/content-display/draggable-option.d.ts +0 -9
- package/collection-preferences/content-display/draggable-option.d.ts.map +0 -1
- package/collection-preferences/content-display/draggable-option.js +0 -27
- package/collection-preferences/content-display/draggable-option.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/defaults.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/index.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/index.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts +0 -11
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts +0 -30
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js.map +0 -1
- package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts.map +0 -1
- package/collection-preferences/content-display/use-drag-and-drop-reorder.js.map +0 -1
- package/collection-preferences/content-display/use-live-announcements.d.ts +0 -12
- package/collection-preferences/content-display/use-live-announcements.d.ts.map +0 -1
- package/collection-preferences/content-display/use-live-announcements.js.map +0 -1
- package/internal/hooks/use-mutation-observer/index.d.ts +0 -8
- package/internal/hooks/use-mutation-observer/index.d.ts.map +0 -1
- package/internal/hooks/use-mutation-observer/index.js +0 -26
- package/internal/hooks/use-mutation-observer/index.js.map +0 -1
- package/internal/utils/date-time/is-iso-date-only.d.ts +0 -5
- package/internal/utils/date-time/is-iso-date-only.d.ts.map +0 -1
- package/internal/utils/date-time/is-iso-date-only.js +0 -10
- package/internal/utils/date-time/is-iso-date-only.js.map +0 -1
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/defaults.d.ts +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/defaults.js +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/index.d.ts +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/listeners.d.ts +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/listeners.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/pie-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { PopoverProps } from '../popover/interfaces';\n\nexport interface SeriesInfo {\n label: string;\n color: string;\n index: number;\n markerType: 'line' | 'rectangle';\n}\n\nexport interface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\nexport interface PieChartProps<T extends PieChartProps.Datum = PieChartProps.Datum> extends BaseComponentProps {\n /**\n * An array that represents the source of data for the displayed segments.\n * Each element can have the following properties:\n *\n * * `title` (string) - A human-readable title for this data point.\n * * `value` (number) - Numeric value that determines the segment size.\n * A segment with a value of zero (0) or lower (negative number) won't have a segment.\n * * `color`: (string) - (Optional) Color value for this segment that takes priority over the automatically assigned color.\n * Can be any valid CSS color identifier.\n *\n * As long as your data object implements the properties above, you can also define additional properties\n * that are relevant to your data visualization.\n * The full data object will be passed down to events and properties like `detailPopoverContent`.\n */\n data: ReadonlyArray<T>;\n\n /**\n * Specifies the size of the pie or donut chart.\n * When used with `fitHeight`, this property defines the minimum size of the chart area.\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Visual variant of the pie chart. Currently supports the default `pie` variant and the `donut` variant.\n * The donut variant provides a slot in the center of the chart that can contain additional information.\n * For more information, see `innerContent`.\n */\n variant?: 'pie' | 'donut';\n\n /**\n * A function that determines the details that are displayed in the popover when hovering over a segment.\n * The function is called with the data of the target segment and is expected to return an array of detail pairs.\n * By default, each segment displays two detail pairs: count and percentage.\n *\n * Each pair has the following properties:\n * * `key` (ReactNode) - Name of the detail or metric.\n * * `value` (ReactNode) - The value of this detail for the target segment.\n */\n detailPopoverContent?: PieChartProps.DetailPopoverContentFunction<T>;\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: PieChartProps.DetailPopoverFooter<T>;\n\n /**\n * A function that determines the description of a segment that is displayed on the chart, unless `hideDescriptions` is set to `true`.\n * This is an optional description that explains the segment and is displayed underneath the label.\n * The function is called with the data object of each segment and is expected to return the description as a string.\n */\n segmentDescription?: PieChartProps.SegmentDescriptionFunction<T>;\n\n /**\n * Determines the maximum width of the popover.\n */\n detailPopoverSize?: PopoverProps.Size;\n\n /**\n * Hides legend beneath the chart when set to `true`.\n * We highly recommend that you leave this unspecified or set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * Hides label titles next to the chart segments when set to `true`.\n * We highly recommend that you leave this unspecified or set to `false`.\n */\n hideTitles?: boolean;\n\n /**\n * Hides the label descriptions next to the chart segments when set to `true`.\n */\n hideDescriptions?: boolean;\n\n /**\n * Hides the default filtering dropdown when set to `true`.\n * You can still display additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional metric number that's displayed in the center of the chart if `variant` is set to `donut`.\n */\n innerMetricValue?: string;\n\n /**\n * Additional description that's displayed in the center of the chart below `innerMetricValue` if `variant` is set to `donut`.\n * This is usually the unit of the `innerMetricValue`.\n */\n innerMetricDescription?: string;\n\n /**\n * Title for the legend.\n */\n legendTitle?: string;\n\n /**\n * Additional filters that you can add above the chart component.\n * Make sure you update the `data` property when any of your custom filters change the data that's displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * Specifies the currently highlighted data segment. Highlighting is typically the result of\n * a user hovering over or selecting a segment in the chart or the legend.\n * A value of `null` means no segment is being highlighted.\n *\n * - If you don't set this property, segments are highlighted automatically when a user hovers over or selects one of the triggers (that is, uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a segment should be highlighted (that is, controlled behavior).\n */\n highlightedSegment?: T | null;\n\n /**\n * An array of data segment objects that determines which data segments are currently visible (that is, not filtered out).\n *\n * - If you don't set this property, segments are filtered automatically when using the default filtering of the component (that is, uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the list of filtered segments changes (that is, controlled behavior).\n */\n visibleSegments?: ReadonlyArray<T>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that data has loaded successfully.\n * * `error` - Indicates that an error occurred during fetch. You should provide an option to enable the user to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that's displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that's displayed when there is no data to display because it doesn't match the specified filter.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that's displayed when the chart is loading (that is, when `statusType` is set to `loading`).\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that's displayed when the chart is in error state (that is, when `statusType` is set to `error`).\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that's displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the highlighted segmented changes because of a user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<PieChartProps.HighlightChangeDetail<T>>;\n\n /**\n * Called when the values of the internal filter component changes.\n * This isn't called for any custom filter components you've defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<PieChartProps.FilterChangeDetail<T>>;\n\n /**\n * ARIA label that's assigned to the chart. It should match the visible label on the page\n * (for example, in the container header). Use either `ariaLabel` or `ariaLabelledby` (you can't use both).\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart. If there is a visible label for the chart on the page\n * (for example, in the container header), set this property to the ID of that header element.\n * Use either `ariaLabel` or `ariaLabelledby` (you can't use both).\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby` and `<title>`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n */\n i18nStrings?: PieChartProps.I18nStrings;\n\n /**\n * Enable this property to make the chart fit into the available height of the parent container.\n */\n fitHeight?: boolean;\n}\n\nexport namespace PieChartProps {\n export interface Datum {\n title: string;\n value: number;\n color?: string;\n }\n\n export type PieChartData = ReadonlyArray<Datum>;\n\n export interface DetailPopoverContentFunction<T = Datum> {\n (segment: T, visibleDataSum: number): ReadonlyArray<ChartDetailPair>;\n }\n\n export interface DetailPopoverFooter<T> {\n (segment: T): React.ReactNode;\n }\n\n export interface SegmentDescriptionFunction<T = Datum> {\n (segment: T, visibleDataSum: number): string;\n }\n\n export interface HighlightChangeDetail<T> {\n highlightedSegment: T | null;\n }\n\n export interface FilterChangeDetail<T> {\n visibleSegments: ReadonlyArray<T>;\n }\n\n export interface I18nStrings {\n /** Name of the \"Value\" key that is displayed in the details popover by default */\n detailsValue?: string;\n\n /** Name of the \"Percentage\" key that is displayed in the details popover by default */\n detailsPercentage?: string;\n\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"pie chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of each segment, e.g. \"segment\" */\n segmentAriaRoleDescription?: string;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/pie-chart/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { PopoverProps } from '../popover/interfaces';\n\nexport interface SeriesInfo {\n label: string;\n color: string;\n index: number;\n markerType: 'line' | 'rectangle';\n}\n\ninterface ChartDetailPair {\n key: ReactNode;\n value: ReactNode;\n}\n\nexport interface PieChartProps<T extends PieChartProps.Datum = PieChartProps.Datum> extends BaseComponentProps {\n /**\n * An array that represents the source of data for the displayed segments.\n * Each element can have the following properties:\n *\n * * `title` (string) - A human-readable title for this data point.\n * * `value` (number) - Numeric value that determines the segment size.\n * A segment with a value of zero (0) or lower (negative number) won't have a segment.\n * * `color`: (string) - (Optional) Color value for this segment that takes priority over the automatically assigned color.\n * Can be any valid CSS color identifier.\n *\n * As long as your data object implements the properties above, you can also define additional properties\n * that are relevant to your data visualization.\n * The full data object will be passed down to events and properties like `detailPopoverContent`.\n */\n data: ReadonlyArray<T>;\n\n /**\n * Specifies the size of the pie or donut chart.\n * When used with `fitHeight`, this property defines the minimum size of the chart area.\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Visual variant of the pie chart. Currently supports the default `pie` variant and the `donut` variant.\n * The donut variant provides a slot in the center of the chart that can contain additional information.\n * For more information, see `innerContent`.\n */\n variant?: 'pie' | 'donut';\n\n /**\n * A function that determines the details that are displayed in the popover when hovering over a segment.\n * The function is called with the data of the target segment and is expected to return an array of detail pairs.\n * By default, each segment displays two detail pairs: count and percentage.\n *\n * Each pair has the following properties:\n * * `key` (ReactNode) - Name of the detail or metric.\n * * `value` (ReactNode) - The value of this detail for the target segment.\n */\n detailPopoverContent?: PieChartProps.DetailPopoverContentFunction<T>;\n\n /**\n * Additional content that is displayed at the bottom of the detail popover.\n */\n detailPopoverFooter?: PieChartProps.DetailPopoverFooter<T>;\n\n /**\n * A function that determines the description of a segment that is displayed on the chart, unless `hideDescriptions` is set to `true`.\n * This is an optional description that explains the segment and is displayed underneath the label.\n * The function is called with the data object of each segment and is expected to return the description as a string.\n */\n segmentDescription?: PieChartProps.SegmentDescriptionFunction<T>;\n\n /**\n * Determines the maximum width of the popover.\n */\n detailPopoverSize?: PopoverProps.Size;\n\n /**\n * Hides legend beneath the chart when set to `true`.\n * We highly recommend that you leave this unspecified or set to `false`.\n */\n hideLegend?: boolean;\n\n /**\n * Hides label titles next to the chart segments when set to `true`.\n * We highly recommend that you leave this unspecified or set to `false`.\n */\n hideTitles?: boolean;\n\n /**\n * Hides the label descriptions next to the chart segments when set to `true`.\n */\n hideDescriptions?: boolean;\n\n /**\n * Hides the default filtering dropdown when set to `true`.\n * You can still display additional filters with the `additionalFilters` slot.\n */\n hideFilter?: boolean;\n\n /**\n * Additional metric number that's displayed in the center of the chart if `variant` is set to `donut`.\n */\n innerMetricValue?: string;\n\n /**\n * Additional description that's displayed in the center of the chart below `innerMetricValue` if `variant` is set to `donut`.\n * This is usually the unit of the `innerMetricValue`.\n */\n innerMetricDescription?: string;\n\n /**\n * Title for the legend.\n */\n legendTitle?: string;\n\n /**\n * Additional filters that you can add above the chart component.\n * Make sure you update the `data` property when any of your custom filters change the data that's displayed.\n */\n additionalFilters?: React.ReactNode;\n\n /**\n * Specifies the currently highlighted data segment. Highlighting is typically the result of\n * a user hovering over or selecting a segment in the chart or the legend.\n * A value of `null` means no segment is being highlighted.\n *\n * - If you don't set this property, segments are highlighted automatically when a user hovers over or selects one of the triggers (that is, uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onHighlightChange` listener to update this property when a segment should be highlighted (that is, controlled behavior).\n */\n highlightedSegment?: T | null;\n\n /**\n * An array of data segment objects that determines which data segments are currently visible (that is, not filtered out).\n *\n * - If you don't set this property, segments are filtered automatically when using the default filtering of the component (that is, uncontrolled behavior).\n * - If you explicitly set this property, you must set an `onFilterChange` listener to update this property when the list of filtered segments changes (that is, controlled behavior).\n */\n visibleSegments?: ReadonlyArray<T>;\n\n /**\n * Specifies the current status of loading data.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that data has loaded successfully.\n * * `error` - Indicates that an error occurred during fetch. You should provide an option to enable the user to recover.\n **/\n statusType?: 'loading' | 'finished' | 'error';\n\n /**\n * Content that's displayed when the data passed to the component is empty.\n */\n empty?: React.ReactNode;\n\n /**\n * Content that's displayed when there is no data to display because it doesn't match the specified filter.\n */\n noMatch?: React.ReactNode;\n\n /**\n * Text that's displayed when the chart is loading (that is, when `statusType` is set to `loading`).\n * @i18n\n */\n loadingText?: string;\n\n /**\n * Text that's displayed when the chart is in error state (that is, when `statusType` is set to `error`).\n * @i18n\n */\n errorText?: string;\n\n /**\n * Text for the recovery button that's displayed next to the error text.\n * @i18n\n **/\n recoveryText?: string;\n\n /**\n * Called when the user clicks the recovery button that appears when there is an error state.\n * Use this to enable the user to retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n\n /**\n * Called when the highlighted segmented changes because of a user interaction.\n */\n onHighlightChange?: NonCancelableEventHandler<PieChartProps.HighlightChangeDetail<T>>;\n\n /**\n * Called when the values of the internal filter component changes.\n * This isn't called for any custom filter components you've defined in `additionalFilters`.\n */\n onFilterChange?: NonCancelableEventHandler<PieChartProps.FilterChangeDetail<T>>;\n\n /**\n * ARIA label that's assigned to the chart. It should match the visible label on the page\n * (for example, in the container header). Use either `ariaLabel` or `ariaLabelledby` (you can't use both).\n */\n ariaLabel?: string;\n\n /**\n * Sets `aria-labelledby` on the chart. If there is a visible label for the chart on the page\n * (for example, in the container header), set this property to the ID of that header element.\n * Use either `ariaLabel` or `ariaLabelledby` (you can't use both).\n */\n ariaLabelledby?: string;\n\n /**\n * A description of the chart that assistive technologies can use (through `aria-describedby` and `<title>`).\n * Provide a concise summary of the data visualized in the chart.\n */\n ariaDescription?: string;\n\n /**\n * An object that contains all of the localized strings required by the component.\n * @i18n\n */\n i18nStrings?: PieChartProps.I18nStrings;\n\n /**\n * Enable this property to make the chart fit into the available height of the parent container.\n */\n fitHeight?: boolean;\n}\n\nexport namespace PieChartProps {\n export interface Datum {\n title: string;\n value: number;\n color?: string;\n }\n\n export type PieChartData = ReadonlyArray<Datum>;\n\n export interface DetailPopoverContentFunction<T = Datum> {\n (segment: T, visibleDataSum: number): ReadonlyArray<ChartDetailPair>;\n }\n\n export interface DetailPopoverFooter<T> {\n (segment: T): React.ReactNode;\n }\n\n export interface SegmentDescriptionFunction<T = Datum> {\n (segment: T, visibleDataSum: number): string;\n }\n\n export interface HighlightChangeDetail<T> {\n highlightedSegment: T | null;\n }\n\n export interface FilterChangeDetail<T> {\n visibleSegments: ReadonlyArray<T>;\n }\n\n export interface I18nStrings {\n /** Name of the \"Value\" key that is displayed in the details popover by default */\n detailsValue?: string;\n\n /** Name of the \"Percentage\" key that is displayed in the details popover by default */\n detailsPercentage?: string;\n\n /** Visible label of the default filter */\n filterLabel?: string;\n\n /** Placeholder text of the default filter */\n filterPlaceholder?: string;\n\n /** ARIA label for the default filter which is appended to any option that is selected */\n filterSelectedAriaLabel?: string;\n\n /** ARIA label that is associated with the legend in case there is no visible `legendTitle` defined */\n legendAriaLabel?: string;\n\n /** ARIA label for details popover dismiss button */\n detailPopoverDismissAriaLabel?: string;\n\n /** Name of the ARIA role description of the chart, e.g. \"pie chart\" */\n chartAriaRoleDescription?: string;\n\n /** Name of the ARIA role description of each segment, e.g. \"segment\" */\n segmentAriaRoleDescription?: string;\n }\n}\n"]}
|
package/pie-chart/labels.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { PieArcDatum } from 'd3-shape';
|
|
|
3
3
|
import { PieChartProps } from './interfaces';
|
|
4
4
|
import { InternalChartDatum } from './pie-chart';
|
|
5
5
|
import { Dimension } from './utils';
|
|
6
|
-
|
|
6
|
+
interface LabelsProps<T> {
|
|
7
7
|
pieData: PieArcDatum<InternalChartDatum<T>>[];
|
|
8
8
|
visibleDataSum: number;
|
|
9
9
|
dimensions: Dimension;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/labels.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAO,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAwC,SAAS,EAAE,MAAM,SAAS,CAAC;AAI1E,
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/labels.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAO,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAwC,SAAS,EAAE,MAAM,SAAS,CAAC;AAI1E,UAAU,WAAW,CAAC,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,cA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E;QAC7B,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC;QACzD,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { arc, PieArcDatum } from 'd3-shape';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PieChartProps } from './interfaces';\nimport { InternalChartDatum } from './pie-chart';\nimport ResponsiveText from './responsive-text';\nimport { balanceLabelNodes, computeSmartAngle, Dimension } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface LabelsProps<T> {\n pieData: PieArcDatum<InternalChartDatum<T>>[];\n visibleDataSum: number;\n dimensions: Dimension;\n hideTitles: boolean;\n hideDescriptions: boolean;\n highlightedSegment: PieChartProps.Datum | null;\n segmentDescription?: PieChartProps.SegmentDescriptionFunction<T>;\n containerRef: React.RefObject<HTMLDivElement>;\n}\n\ninterface LabelElementProps {\n x: number;\n y: number;\n rightSide: boolean;\n hideTitles: boolean;\n hideDescriptions: boolean;\n title: PieChartProps.Datum['title'];\n description?: string;\n containerBoundaries: null | { left: number; right: number };\n}\n\nfunction LabelElement({\n x,\n y,\n hideTitles,\n hideDescriptions,\n rightSide,\n title,\n description,\n containerBoundaries,\n}: LabelElementProps) {\n return (\n <g className={styles['label-text']} transform=\"\" data-x={x} data-y={y}>\n {!hideTitles && (\n <ResponsiveText x={x} y={y} rightSide={rightSide} containerBoundaries={containerBoundaries}>\n {title}\n </ResponsiveText>\n )}\n {!hideDescriptions && description && (\n <ResponsiveText\n x={x}\n y={y + (hideTitles ? 0 : 18)}\n rightSide={rightSide}\n className={styles.label__description}\n containerBoundaries={containerBoundaries}\n >\n {description}\n </ResponsiveText>\n )}\n </g>\n );\n}\n\nexport default <T extends PieChartProps.Datum>({\n pieData,\n dimensions,\n highlightedSegment,\n segmentDescription,\n visibleDataSum,\n hideTitles,\n hideDescriptions,\n containerRef,\n}: LabelsProps<T>) => {\n const containerBoundaries = useElementBoundaries(containerRef);\n const shouldOptimizeLabels =\n containerBoundaries.right - containerBoundaries.left - (dimensions.outerRadius + dimensions.innerLabelPadding) * 2 <\n 300;\n const markers = useMemo(() => {\n const { outerRadius: radius, innerLabelPadding } = dimensions;\n\n // More arc factories for the label positioning\n const arcMarkerStart = arc<PieArcDatum<any>>()\n .innerRadius(radius - 1)\n .outerRadius(radius - 1);\n\n const arcMarkerBreak = arc<PieArcDatum<any>>()\n .innerRadius(radius + innerLabelPadding)\n .outerRadius(radius + innerLabelPadding);\n\n return pieData.map((datum, i) => {\n const labelDatum = pieData[i];\n const smartAngle = computeSmartAngle(labelDatum.startAngle, labelDatum.endAngle, shouldOptimizeLabels);\n\n // Make the marker line longer if the segment is closer to the top or bottom of the chart\n const lineExtension = 0.5 * Math.cos(2 * smartAngle) + 0.5;\n arcMarkerBreak.outerRadius(radius + 20 * lineExtension);\n arcMarkerBreak.innerRadius(radius + 20 * lineExtension);\n const [startX, startY] = arcMarkerStart.centroid({ ...datum, startAngle: smartAngle, endAngle: smartAngle });\n const [breakX, breakY] = arcMarkerBreak.centroid({ ...datum, startAngle: smartAngle, endAngle: smartAngle });\n\n const rightSide = smartAngle < Math.PI;\n const endX = shouldOptimizeLabels ? breakX + 20 * (rightSide ? 1 : -1) : (radius + 20) * (rightSide ? 1 : -1);\n const textX = endX + 5 * (rightSide ? 1 : -1);\n\n return {\n startX,\n startY,\n breakX,\n breakY,\n endX,\n endY: breakY,\n textX,\n textY: breakY,\n rightSide,\n datum,\n };\n });\n }, [pieData, dimensions, shouldOptimizeLabels]);\n\n const rootRef = useRef<SVGGElement>(null);\n\n useLayoutEffect(() => {\n if (!rootRef.current) {\n return;\n }\n\n // Relax labels that are overlapping\n const labelNodes = rootRef.current.querySelectorAll<SVGGElement>(`.${styles['label-text']}`);\n balanceLabelNodes(labelNodes, markers, false, dimensions.outerRadius + dimensions.innerLabelPadding);\n balanceLabelNodes(labelNodes, markers, true, dimensions.outerRadius + dimensions.innerLabelPadding);\n }, [markers, pieData, dimensions]);\n\n return (\n <g className={styles.markers} aria-hidden=\"true\" ref={rootRef}>\n {markers.map(({ startX, startY, breakX, breakY, endX, endY, textX, textY, rightSide, datum }) => {\n const segment = datum.data.datum;\n const description = segmentDescription?.(segment, visibleDataSum);\n if ((hideTitles && !description) || (hideDescriptions && !segment.title)) {\n return null;\n }\n return (\n <g\n key={datum.data.index}\n className={clsx(styles.label, {\n [styles['label--highlighted']]: highlightedSegment === segment,\n [styles['label--dimmed']]: highlightedSegment !== null && highlightedSegment !== segment,\n [styles['label--align-right']]: !rightSide,\n })}\n >\n <line x1={startX} y1={startY} x2={breakX} y2={breakY} />\n <line x1={breakX} y1={breakY} x2={endX} y2={endY} className={styles['label-line']} />\n <LabelElement\n x={textX}\n y={textY}\n rightSide={rightSide}\n title={segment.title}\n description={description}\n hideTitles={hideTitles}\n hideDescriptions={hideDescriptions}\n containerBoundaries={containerBoundaries}\n />\n </g>\n );\n })}\n </g>\n );\n};\n\nfunction useElementBoundaries(ref: React.RefObject<HTMLElement>): { left: number; right: number } {\n const [state, setState] = useState({ left: 0, right: 0 });\n useResizeObserver(ref, entry => {\n const elementRect = entry.target.getBoundingClientRect();\n setState({ left: elementRect.left, right: elementRect.right });\n });\n return state;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/pie-chart/labels.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAA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AAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,GAAI;YACrF,oBAAC,YAAY,IACX,CAAC,EAAE,KAAK,EACR,CAAC,EAAE,KAAK,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,OAAO,CAAC,KAAK,EACpB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,GACxC,CACA,CACL,CAAC;IACJ,CAAC,CAAC,CACA,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,oBAAoB,CAAC,GAAiC;IAC7D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1D,iBAAiB,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE;QAC7B,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC;QACzD,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { arc, PieArcDatum } from 'd3-shape';\n\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { PieChartProps } from './interfaces';\nimport { InternalChartDatum } from './pie-chart';\nimport ResponsiveText from './responsive-text';\nimport { balanceLabelNodes, computeSmartAngle, Dimension } from './utils';\n\nimport styles from './styles.css.js';\n\ninterface LabelsProps<T> {\n pieData: PieArcDatum<InternalChartDatum<T>>[];\n visibleDataSum: number;\n dimensions: Dimension;\n hideTitles: boolean;\n hideDescriptions: boolean;\n highlightedSegment: PieChartProps.Datum | null;\n segmentDescription?: PieChartProps.SegmentDescriptionFunction<T>;\n containerRef: React.RefObject<HTMLDivElement>;\n}\n\ninterface LabelElementProps {\n x: number;\n y: number;\n rightSide: boolean;\n hideTitles: boolean;\n hideDescriptions: boolean;\n title: PieChartProps.Datum['title'];\n description?: string;\n containerBoundaries: null | { left: number; right: number };\n}\n\nfunction LabelElement({\n x,\n y,\n hideTitles,\n hideDescriptions,\n rightSide,\n title,\n description,\n containerBoundaries,\n}: LabelElementProps) {\n return (\n <g className={styles['label-text']} transform=\"\" data-x={x} data-y={y}>\n {!hideTitles && (\n <ResponsiveText x={x} y={y} rightSide={rightSide} containerBoundaries={containerBoundaries}>\n {title}\n </ResponsiveText>\n )}\n {!hideDescriptions && description && (\n <ResponsiveText\n x={x}\n y={y + (hideTitles ? 0 : 18)}\n rightSide={rightSide}\n className={styles.label__description}\n containerBoundaries={containerBoundaries}\n >\n {description}\n </ResponsiveText>\n )}\n </g>\n );\n}\n\nexport default <T extends PieChartProps.Datum>({\n pieData,\n dimensions,\n highlightedSegment,\n segmentDescription,\n visibleDataSum,\n hideTitles,\n hideDescriptions,\n containerRef,\n}: LabelsProps<T>) => {\n const containerBoundaries = useElementBoundaries(containerRef);\n const shouldOptimizeLabels =\n containerBoundaries.right - containerBoundaries.left - (dimensions.outerRadius + dimensions.innerLabelPadding) * 2 <\n 300;\n const markers = useMemo(() => {\n const { outerRadius: radius, innerLabelPadding } = dimensions;\n\n // More arc factories for the label positioning\n const arcMarkerStart = arc<PieArcDatum<any>>()\n .innerRadius(radius - 1)\n .outerRadius(radius - 1);\n\n const arcMarkerBreak = arc<PieArcDatum<any>>()\n .innerRadius(radius + innerLabelPadding)\n .outerRadius(radius + innerLabelPadding);\n\n return pieData.map((datum, i) => {\n const labelDatum = pieData[i];\n const smartAngle = computeSmartAngle(labelDatum.startAngle, labelDatum.endAngle, shouldOptimizeLabels);\n\n // Make the marker line longer if the segment is closer to the top or bottom of the chart\n const lineExtension = 0.5 * Math.cos(2 * smartAngle) + 0.5;\n arcMarkerBreak.outerRadius(radius + 20 * lineExtension);\n arcMarkerBreak.innerRadius(radius + 20 * lineExtension);\n const [startX, startY] = arcMarkerStart.centroid({ ...datum, startAngle: smartAngle, endAngle: smartAngle });\n const [breakX, breakY] = arcMarkerBreak.centroid({ ...datum, startAngle: smartAngle, endAngle: smartAngle });\n\n const rightSide = smartAngle < Math.PI;\n const endX = shouldOptimizeLabels ? breakX + 20 * (rightSide ? 1 : -1) : (radius + 20) * (rightSide ? 1 : -1);\n const textX = endX + 5 * (rightSide ? 1 : -1);\n\n return {\n startX,\n startY,\n breakX,\n breakY,\n endX,\n endY: breakY,\n textX,\n textY: breakY,\n rightSide,\n datum,\n };\n });\n }, [pieData, dimensions, shouldOptimizeLabels]);\n\n const rootRef = useRef<SVGGElement>(null);\n\n useLayoutEffect(() => {\n if (!rootRef.current) {\n return;\n }\n\n // Relax labels that are overlapping\n const labelNodes = rootRef.current.querySelectorAll<SVGGElement>(`.${styles['label-text']}`);\n balanceLabelNodes(labelNodes, markers, false, dimensions.outerRadius + dimensions.innerLabelPadding);\n balanceLabelNodes(labelNodes, markers, true, dimensions.outerRadius + dimensions.innerLabelPadding);\n }, [markers, pieData, dimensions]);\n\n return (\n <g className={styles.markers} aria-hidden=\"true\" ref={rootRef}>\n {markers.map(({ startX, startY, breakX, breakY, endX, endY, textX, textY, rightSide, datum }) => {\n const segment = datum.data.datum;\n const description = segmentDescription?.(segment, visibleDataSum);\n if ((hideTitles && !description) || (hideDescriptions && !segment.title)) {\n return null;\n }\n return (\n <g\n key={datum.data.index}\n className={clsx(styles.label, {\n [styles['label--highlighted']]: highlightedSegment === segment,\n [styles['label--dimmed']]: highlightedSegment !== null && highlightedSegment !== segment,\n [styles['label--align-right']]: !rightSide,\n })}\n >\n <line x1={startX} y1={startY} x2={breakX} y2={breakY} />\n <line x1={breakX} y1={breakY} x2={endX} y2={endY} className={styles['label-line']} />\n <LabelElement\n x={textX}\n y={textY}\n rightSide={rightSide}\n title={segment.title}\n description={description}\n hideTitles={hideTitles}\n hideDescriptions={hideDescriptions}\n containerBoundaries={containerBoundaries}\n />\n </g>\n );\n })}\n </g>\n );\n};\n\nfunction useElementBoundaries(ref: React.RefObject<HTMLElement>): { left: number; right: number } {\n const [state, setState] = useState({ left: 0, right: 0 });\n useResizeObserver(ref, entry => {\n const elementRect = entry.target.getBoundingClientRect();\n setState({ left: elementRect.left, right: elementRect.right });\n });\n return state;\n}\n"]}
|
package/pie-chart/pie-chart.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { PieArcDatum } from 'd3-shape';
|
|
3
3
|
import { SomeRequired } from '../internal/types';
|
|
4
|
-
import { PieChartProps
|
|
4
|
+
import { PieChartProps } from './interfaces';
|
|
5
5
|
export interface InternalChartDatum<T> {
|
|
6
6
|
index: number;
|
|
7
7
|
color: string;
|
|
@@ -16,11 +16,6 @@ interface InternalPieChartProps<T extends PieChartProps.Datum> extends SomeRequi
|
|
|
16
16
|
pieData: PieArcDatum<InternalChartDatum<T>>[];
|
|
17
17
|
dataSum: number;
|
|
18
18
|
}
|
|
19
|
-
export interface PopoverData<T> {
|
|
20
|
-
datum: T;
|
|
21
|
-
trackRef: React.RefObject<SVGElement>;
|
|
22
|
-
series: SeriesInfo;
|
|
23
|
-
}
|
|
24
19
|
declare const _default: <T extends PieChartProps.Datum>({ fitHeight, height: explicitHeight, variant, size, width, i18nStrings, ariaLabel, ariaLabelledby, ariaDescription, innerMetricValue, innerMetricDescription, hideTitles, hideDescriptions, detailPopoverContent, detailPopoverSize, detailPopoverFooter, segmentDescription, highlightedSegment, onHighlightChange, legendSegment, pieData, dataSum, }: InternalPieChartProps<T>) => JSX.Element;
|
|
25
20
|
export default _default;
|
|
26
21
|
//# sourceMappingURL=pie-chart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pie-chart.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/pie-chart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pie-chart.d.ts","sourceRoot":"","sources":["../../../src/pie-chart/pie-chart.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAevC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAc,MAAM,cAAc,CAAC;AAOzD,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;CACpB;AAED,UAAU,qBAAqB,CAAC,CAAC,SAAS,aAAa,CAAC,KAAK,CAC3D,SAAQ,YAAY,CAClB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAAC,EAC1D,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,YAAY,GAAG,kBAAkB,CACvE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IAEf,kBAAkB,EAAE,CAAC,GAAG,IAAI,CAAC;IAC7B,iBAAiB,EAAE,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC;IAE/C,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC;IAExB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;CACjB;;AAQD,wBAuVE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pie-chart.js","sourceRoot":"","sources":["../../../src/pie-chart/pie-chart.tsx"],"names":[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AAM,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAC,QAAQ;gBAChE,oBAAC,YAAY,IAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,UAAU,GAAI;gBAAC,GAAG;gBACzF,WAAW,CAAC,MAAM,CAAC,KAAK,CACb,CACf,EAEH,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,EAClC,aAAa,EAAE,aAAa,KAAK,IAAI,EACrC,gBAAgB,EAAE,WAAW,CAAC,6BAA6B,EAC3D,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,GAAG,KAAI,IAAI,EACvC,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,eAAe,EAC7B,MAAM,EAAE,iBAAiB;YAExB,cAAc;YACd,0BAA0B,IAAI,oBAAC,kBAAkB,QAAE,0BAA0B,CAAsB,CACvF,CAChB;QACD,oBAAC,kBAAkB,IAAC,OAAO,EAAE,CAAC,iBAAiB,CAAC,GAAI,CAChD,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { PieArcDatum } from 'd3-shape';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\n\nimport InternalBox from '../box/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport ChartPlot, { ChartPlotRef } from '../internal/components/chart-plot';\nimport ChartPopover from '../internal/components/chart-popover';\nimport ChartPopoverFooter from '../internal/components/chart-popover-footer';\nimport SeriesDetails from '../internal/components/chart-series-details';\nimport SeriesMarker from '../internal/components/chart-series-marker';\nimport { useHeightMeasure } from '../internal/hooks/container-queries/use-height-measure';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { KeyCode } from '../internal/keycode';\nimport { SomeRequired } from '../internal/types';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport InternalLiveRegion from '../live-region/internal';\nimport { PieChartProps, SeriesInfo } from './interfaces';\nimport Labels from './labels';\nimport Segments from './segments';\nimport { defaultDetails, getDimensionsBySize } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalChartDatum<T> {\n index: number;\n color: string;\n datum: Readonly<T>;\n}\n\ninterface InternalPieChartProps<T extends PieChartProps.Datum>\n extends SomeRequired<\n Omit<PieChartProps<T>, 'onHighlightChange' | 'statusType'>,\n 'variant' | 'size' | 'i18nStrings' | 'hideTitles' | 'hideDescriptions'\n > {\n width: number;\n height: number;\n\n highlightedSegment: T | null;\n onHighlightChange: (segment: null | T) => void;\n\n legendSegment: T | null;\n\n pieData: PieArcDatum<InternalChartDatum<T>>[];\n dataSum: number;\n}\n\nexport interface PopoverData<T> {\n datum: T;\n trackRef: React.RefObject<SVGElement>;\n series: SeriesInfo;\n}\n\nexport default <T extends PieChartProps.Datum>({\n fitHeight,\n height: explicitHeight,\n variant,\n size,\n width,\n i18nStrings,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n innerMetricValue,\n innerMetricDescription,\n hideTitles,\n hideDescriptions,\n detailPopoverContent,\n detailPopoverSize,\n detailPopoverFooter,\n segmentDescription,\n highlightedSegment,\n onHighlightChange,\n legendSegment,\n pieData,\n dataSum,\n}: InternalPieChartProps<T>) => {\n const [pinnedSegment, setPinnedSegment] = useState<T | null>(null);\n const plotRef = useRef<ChartPlotRef>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const focusedSegmentRef = useRef<SVGGElement>(null);\n const popoverTrackRef = useRef<SVGCircleElement>(null);\n const popoverRef = useRef<HTMLElement | null>(null);\n\n const hasLabels = !(hideTitles && hideDescriptions);\n const isRefresh = useVisualRefresh();\n\n const height = useHeightMeasure(() => plotRef.current?.svg ?? null, !fitHeight) ?? explicitHeight;\n\n const dimensions = useMemo(\n () =>\n getDimensionsBySize({ size: fitHeight ? Math.min(height, width) : size, hasLabels, visualRefresh: isRefresh }),\n [fitHeight, height, width, size, hasLabels, isRefresh]\n );\n\n // Inner content is only available for donut charts and the inner description is not displayed for small charts\n const hasInnerContent =\n variant === 'donut' && (innerMetricValue || (innerMetricDescription && dimensions.size !== 'small'));\n\n const innerMetricId = useUniqueId('awsui-pie-chart__inner');\n\n const [isPopoverOpen, setPopoverOpen] = useState<boolean>(false);\n const [popoverData, setPopoverData] = useState<PopoverData<T>>();\n\n const highlightedSegmentIndex = useMemo(() => {\n for (let index = 0; index < pieData.length; index++) {\n if (pieData[index].data.datum === highlightedSegment) {\n return index;\n }\n }\n return null;\n }, [pieData, highlightedSegment]);\n\n const detailPopoverFooterContent = useMemo(\n () => (detailPopoverFooter && highlightedSegment ? detailPopoverFooter(highlightedSegment) : null),\n [detailPopoverFooter, highlightedSegment]\n );\n\n const i18n = useInternalI18n('pie-chart');\n const detailFunction = detailPopoverContent || defaultDetails(i18n, i18nStrings);\n const details = popoverData ? detailFunction(popoverData.datum, dataSum) : [];\n const popoverContentRef = useRef<HTMLDivElement | null>(null);\n const popoverContent = popoverData && <SeriesDetails details={details} compactList={true} ref={popoverContentRef} />;\n\n const popoverDismissedRecently = useRef(false);\n const escapePressed = useRef(false);\n const duringTouch = useRef(false);\n\n const highlightSegment = useCallback(\n (internalDatum: InternalChartDatum<T>) => {\n const segment = internalDatum.datum;\n if (segment !== highlightedSegment) {\n onHighlightChange(segment);\n }\n\n if (popoverTrackRef.current) {\n setPopoverData({\n datum: internalDatum.datum,\n series: {\n color: internalDatum.color,\n index: internalDatum.index,\n label: internalDatum.datum.title,\n markerType: 'rectangle',\n },\n trackRef: popoverTrackRef,\n });\n setPopoverOpen(true);\n }\n },\n [highlightedSegment, setPopoverOpen, onHighlightChange]\n );\n\n const clearHighlightedSegment = useCallback(() => {\n setPopoverOpen(false);\n onHighlightChange(null);\n }, [onHighlightChange, setPopoverOpen]);\n\n const checkMouseLeave = (event: React.MouseEvent) => {\n if (pinnedSegment !== null) {\n return;\n }\n\n if (\n nodeContains(popoverRef.current, event.relatedTarget) ||\n nodeContains(focusedSegmentRef.current, event.relatedTarget)\n ) {\n return;\n }\n\n clearHighlightedSegment();\n };\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n clearHighlightedSegment();\n escapePressed.current = true;\n }\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [clearHighlightedSegment]);\n\n const onMouseDown = useCallback(\n (internalDatum: InternalChartDatum<T>) => {\n if (pinnedSegment === internalDatum.datum) {\n setPinnedSegment(null);\n clearHighlightedSegment();\n } else {\n setPinnedSegment(internalDatum.datum);\n highlightSegment(internalDatum);\n }\n },\n [pinnedSegment, clearHighlightedSegment, setPinnedSegment, highlightSegment]\n );\n const onMouseOver = useCallback(\n (internalDatum: InternalChartDatum<T>) => {\n if (escapePressed.current) {\n escapePressed.current = false;\n return;\n }\n if (duringTouch.current) {\n duringTouch.current = false;\n return;\n }\n if (pinnedSegment !== null) {\n return;\n }\n highlightSegment(internalDatum);\n },\n [pinnedSegment, highlightSegment]\n );\n const onTouchStart = useCallback(() => {\n duringTouch.current = true;\n }, []);\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const keyCode = event.keyCode;\n if (\n keyCode !== KeyCode.right &&\n keyCode !== KeyCode.left &&\n keyCode !== KeyCode.enter &&\n keyCode !== KeyCode.space\n ) {\n return;\n }\n\n event.preventDefault();\n\n let nextIndex = highlightedSegmentIndex || 0;\n const MAX = pieData.length - 1;\n if (keyCode === KeyCode.right) {\n nextIndex++;\n if (nextIndex > MAX) {\n nextIndex = 0;\n }\n } else if (keyCode === KeyCode.left) {\n nextIndex--;\n if (nextIndex < 0) {\n nextIndex = MAX;\n }\n }\n if (keyCode === KeyCode.enter || keyCode === KeyCode.space) {\n setPinnedSegment(pieData[nextIndex].data.datum);\n }\n highlightSegment(pieData[nextIndex].data);\n },\n [setPinnedSegment, highlightSegment, pieData, highlightedSegmentIndex]\n );\n const onApplicationFocus = useCallback(\n (_event: any, target: 'keyboard' | 'mouse') => {\n if (pinnedSegment !== null || popoverDismissedRecently.current || target === 'mouse') {\n return;\n }\n\n const segment = highlightedSegment || legendSegment || pieData[0].data.datum;\n const matched = pieData.filter(d => d.data.datum === segment);\n highlightSegment(matched[0].data);\n },\n [pinnedSegment, pieData, highlightSegment, highlightedSegment, legendSegment]\n );\n\n const onApplicationBlur = useCallback(\n (event: React.FocusEvent) => {\n const blurTarget = event.relatedTarget || event.target;\n if (blurTarget === null || !(blurTarget instanceof Element) || !nodeBelongs(containerRef.current, blurTarget)) {\n // We only need to close the popover and remove the pinned segment so that we keep track of the current\n // highlighted legendSeries. using clearHighlightedSegment() would set the legendSeries to null, in that case\n // using Keyboard Tab will always highlight the first legend item in the legend component.\n setPopoverOpen(false);\n setPinnedSegment(null);\n }\n },\n [setPinnedSegment]\n );\n const onPopoverDismiss = (outsideClick?: boolean) => {\n setPopoverOpen(false);\n setPinnedSegment(null);\n\n if (!outsideClick) {\n // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.\n setTimeout(() => {\n popoverDismissedRecently.current = true;\n plotRef.current!.focusApplication();\n popoverDismissedRecently.current = false;\n }, 0);\n } else {\n onHighlightChange(null);\n }\n };\n\n return (\n <div\n className={clsx(styles['chart-container'], fitHeight && styles['chart-container--fit-height'])}\n ref={containerRef}\n >\n <div\n className={clsx(\n styles['chart-container-chart-plot'],\n fitHeight && styles['chart-container-chart-plot--fit-height']\n )}\n >\n <ChartPlot\n ref={plotRef}\n width=\"100%\"\n height={fitHeight ? '100%' : height}\n transform={`translate(${width / 2} ${height / 2})`}\n isPrecise={true}\n isClickable={!isPopoverOpen}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n ariaDescribedby={hasInnerContent ? innerMetricId : undefined}\n ariaRoleDescription={i18nStrings?.chartAriaRoleDescription}\n activeElementRef={focusedSegmentRef}\n activeElementKey={highlightedSegmentIndex?.toString()}\n onApplicationFocus={onApplicationFocus}\n onApplicationBlur={onApplicationBlur}\n onKeyDown={onKeyDown}\n onMouseOut={checkMouseLeave}\n >\n <Segments\n pieData={pieData}\n dimensions={dimensions}\n variant={variant}\n focusedSegmentRef={focusedSegmentRef}\n popoverTrackRef={popoverTrackRef}\n highlightedSegment={highlightedSegment}\n segmentAriaRoleDescription={i18nStrings?.segmentAriaRoleDescription}\n onMouseDown={onMouseDown}\n onMouseOver={onMouseOver}\n onTouchStart={onTouchStart}\n />\n {hasLabels && (\n <Labels\n pieData={pieData}\n dimensions={dimensions}\n segmentDescription={segmentDescription}\n visibleDataSum={dataSum}\n hideTitles={hideTitles}\n hideDescriptions={hideDescriptions}\n highlightedSegment={highlightedSegment}\n containerRef={containerRef}\n />\n )}\n </ChartPlot>\n </div>\n\n {hasInnerContent && (\n <div className={styles['inner-content']} id={innerMetricId}>\n {innerMetricValue && (\n <InternalBox\n variant={dimensions.size === 'small' ? 'h3' : 'h1'}\n tagOverride=\"div\"\n color=\"inherit\"\n padding=\"n\"\n >\n {innerMetricValue}\n </InternalBox>\n )}\n {innerMetricDescription && dimensions.size !== 'small' && (\n <InternalBox variant=\"h3\" color=\"text-body-secondary\" tagOverride=\"div\" padding=\"n\">\n {innerMetricDescription}\n </InternalBox>\n )}\n </div>\n )}\n {isPopoverOpen && popoverData && (\n <ChartPopover\n ref={popoverRef}\n title={\n popoverData.series && (\n <InternalBox className={styles['popover-header']} variant=\"strong\">\n <SeriesMarker color={popoverData.series.color} type={popoverData.series.markerType} />{' '}\n {popoverData.series.label}\n </InternalBox>\n )\n }\n trackRef={popoverData.trackRef}\n trackKey={popoverData.series.index}\n dismissButton={pinnedSegment !== null}\n dismissAriaLabel={i18nStrings.detailPopoverDismissAriaLabel}\n onDismiss={onPopoverDismiss}\n container={plotRef.current?.svg || null}\n size={detailPopoverSize}\n onMouseLeave={checkMouseLeave}\n onBlur={onApplicationBlur}\n >\n {popoverContent}\n {detailPopoverFooterContent && <ChartPopoverFooter>{detailPopoverFooterContent}</ChartPopoverFooter>}\n </ChartPopover>\n )}\n <InternalLiveRegion sources={[popoverContentRef]} />\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"pie-chart.js","sourceRoot":"","sources":["../../../src/pie-chart/pie-chart.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,SAA2B,MAAM,mCAAmC,CAAC;AAC5E,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,kBAAkB,MAAM,6CAA6C,CAAC;AAC7E,OAAO,aAAa,MAAM,6CAA6C,CAAC;AACxE,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,QAAQ,MAAM,YAAY,CAAC;A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C,IAAI,KAAK,OAAO,IAAI,CACxD,oBAAC,WAAW,IAAC,OAAO,EAAC,IAAI,EAAC,KAAK,EAAC,qBAAqB,EAAC,WAAW,EAAC,KAAK,EAAC,OAAO,EAAC,GAAG,IAChF,sBAAsB,CACX,CACf,CACG,CACP;QACA,aAAa,IAAI,WAAW,IAAI,CAC/B,oBAAC,YAAY,IACX,GAAG,EAAE,UAAU,EACf,KAAK,EACH,WAAW,CAAC,MAAM,IAAI,CACpB,oBAAC,WAAW,IAAC,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAC,QAAQ;gBAChE,oBAAC,YAAY,IAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,UAAU,GAAI;gBAAC,GAAG;gBACzF,WAAW,CAAC,MAAM,CAAC,KAAK,CACb,CACf,EAEH,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAC9B,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,EAClC,aAAa,EAAE,aAAa,KAAK,IAAI,EACrC,gBAAgB,EAAE,WAAW,CAAC,6BAA6B,EAC3D,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,GAAG,KAAI,IAAI,EACvC,IAAI,EAAE,iBAAiB,EACvB,YAAY,EAAE,eAAe,EAC7B,MAAM,EAAE,iBAAiB;YAExB,cAAc;YACd,0BAA0B,IAAI,oBAAC,kBAAkB,QAAE,0BAA0B,CAAsB,CACvF,CAChB;QACD,oBAAC,kBAAkB,IAAC,OAAO,EAAE,CAAC,iBAAiB,CAAC,GAAI,CAChD,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { PieArcDatum } from 'd3-shape';\n\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\n\nimport InternalBox from '../box/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport ChartPlot, { ChartPlotRef } from '../internal/components/chart-plot';\nimport ChartPopover from '../internal/components/chart-popover';\nimport ChartPopoverFooter from '../internal/components/chart-popover-footer';\nimport SeriesDetails from '../internal/components/chart-series-details';\nimport SeriesMarker from '../internal/components/chart-series-marker';\nimport { useHeightMeasure } from '../internal/hooks/container-queries/use-height-measure';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { KeyCode } from '../internal/keycode';\nimport { SomeRequired } from '../internal/types';\nimport { nodeBelongs } from '../internal/utils/node-belongs';\nimport InternalLiveRegion from '../live-region/internal';\nimport { PieChartProps, SeriesInfo } from './interfaces';\nimport Labels from './labels';\nimport Segments from './segments';\nimport { defaultDetails, getDimensionsBySize } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalChartDatum<T> {\n index: number;\n color: string;\n datum: Readonly<T>;\n}\n\ninterface InternalPieChartProps<T extends PieChartProps.Datum>\n extends SomeRequired<\n Omit<PieChartProps<T>, 'onHighlightChange' | 'statusType'>,\n 'variant' | 'size' | 'i18nStrings' | 'hideTitles' | 'hideDescriptions'\n > {\n width: number;\n height: number;\n\n highlightedSegment: T | null;\n onHighlightChange: (segment: null | T) => void;\n\n legendSegment: T | null;\n\n pieData: PieArcDatum<InternalChartDatum<T>>[];\n dataSum: number;\n}\n\ninterface PopoverData<T> {\n datum: T;\n trackRef: React.RefObject<SVGElement>;\n series: SeriesInfo;\n}\n\nexport default <T extends PieChartProps.Datum>({\n fitHeight,\n height: explicitHeight,\n variant,\n size,\n width,\n i18nStrings,\n ariaLabel,\n ariaLabelledby,\n ariaDescription,\n innerMetricValue,\n innerMetricDescription,\n hideTitles,\n hideDescriptions,\n detailPopoverContent,\n detailPopoverSize,\n detailPopoverFooter,\n segmentDescription,\n highlightedSegment,\n onHighlightChange,\n legendSegment,\n pieData,\n dataSum,\n}: InternalPieChartProps<T>) => {\n const [pinnedSegment, setPinnedSegment] = useState<T | null>(null);\n const plotRef = useRef<ChartPlotRef>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const focusedSegmentRef = useRef<SVGGElement>(null);\n const popoverTrackRef = useRef<SVGCircleElement>(null);\n const popoverRef = useRef<HTMLElement | null>(null);\n\n const hasLabels = !(hideTitles && hideDescriptions);\n const isRefresh = useVisualRefresh();\n\n const height = useHeightMeasure(() => plotRef.current?.svg ?? null, !fitHeight) ?? explicitHeight;\n\n const dimensions = useMemo(\n () =>\n getDimensionsBySize({ size: fitHeight ? Math.min(height, width) : size, hasLabels, visualRefresh: isRefresh }),\n [fitHeight, height, width, size, hasLabels, isRefresh]\n );\n\n // Inner content is only available for donut charts and the inner description is not displayed for small charts\n const hasInnerContent =\n variant === 'donut' && (innerMetricValue || (innerMetricDescription && dimensions.size !== 'small'));\n\n const innerMetricId = useUniqueId('awsui-pie-chart__inner');\n\n const [isPopoverOpen, setPopoverOpen] = useState<boolean>(false);\n const [popoverData, setPopoverData] = useState<PopoverData<T>>();\n\n const highlightedSegmentIndex = useMemo(() => {\n for (let index = 0; index < pieData.length; index++) {\n if (pieData[index].data.datum === highlightedSegment) {\n return index;\n }\n }\n return null;\n }, [pieData, highlightedSegment]);\n\n const detailPopoverFooterContent = useMemo(\n () => (detailPopoverFooter && highlightedSegment ? detailPopoverFooter(highlightedSegment) : null),\n [detailPopoverFooter, highlightedSegment]\n );\n\n const i18n = useInternalI18n('pie-chart');\n const detailFunction = detailPopoverContent || defaultDetails(i18n, i18nStrings);\n const details = popoverData ? detailFunction(popoverData.datum, dataSum) : [];\n const popoverContentRef = useRef<HTMLDivElement | null>(null);\n const popoverContent = popoverData && <SeriesDetails details={details} compactList={true} ref={popoverContentRef} />;\n\n const popoverDismissedRecently = useRef(false);\n const escapePressed = useRef(false);\n const duringTouch = useRef(false);\n\n const highlightSegment = useCallback(\n (internalDatum: InternalChartDatum<T>) => {\n const segment = internalDatum.datum;\n if (segment !== highlightedSegment) {\n onHighlightChange(segment);\n }\n\n if (popoverTrackRef.current) {\n setPopoverData({\n datum: internalDatum.datum,\n series: {\n color: internalDatum.color,\n index: internalDatum.index,\n label: internalDatum.datum.title,\n markerType: 'rectangle',\n },\n trackRef: popoverTrackRef,\n });\n setPopoverOpen(true);\n }\n },\n [highlightedSegment, setPopoverOpen, onHighlightChange]\n );\n\n const clearHighlightedSegment = useCallback(() => {\n setPopoverOpen(false);\n onHighlightChange(null);\n }, [onHighlightChange, setPopoverOpen]);\n\n const checkMouseLeave = (event: React.MouseEvent) => {\n if (pinnedSegment !== null) {\n return;\n }\n\n if (\n nodeContains(popoverRef.current, event.relatedTarget) ||\n nodeContains(focusedSegmentRef.current, event.relatedTarget)\n ) {\n return;\n }\n\n clearHighlightedSegment();\n };\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n clearHighlightedSegment();\n escapePressed.current = true;\n }\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [clearHighlightedSegment]);\n\n const onMouseDown = useCallback(\n (internalDatum: InternalChartDatum<T>) => {\n if (pinnedSegment === internalDatum.datum) {\n setPinnedSegment(null);\n clearHighlightedSegment();\n } else {\n setPinnedSegment(internalDatum.datum);\n highlightSegment(internalDatum);\n }\n },\n [pinnedSegment, clearHighlightedSegment, setPinnedSegment, highlightSegment]\n );\n const onMouseOver = useCallback(\n (internalDatum: InternalChartDatum<T>) => {\n if (escapePressed.current) {\n escapePressed.current = false;\n return;\n }\n if (duringTouch.current) {\n duringTouch.current = false;\n return;\n }\n if (pinnedSegment !== null) {\n return;\n }\n highlightSegment(internalDatum);\n },\n [pinnedSegment, highlightSegment]\n );\n const onTouchStart = useCallback(() => {\n duringTouch.current = true;\n }, []);\n\n const onKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const keyCode = event.keyCode;\n if (\n keyCode !== KeyCode.right &&\n keyCode !== KeyCode.left &&\n keyCode !== KeyCode.enter &&\n keyCode !== KeyCode.space\n ) {\n return;\n }\n\n event.preventDefault();\n\n let nextIndex = highlightedSegmentIndex || 0;\n const MAX = pieData.length - 1;\n if (keyCode === KeyCode.right) {\n nextIndex++;\n if (nextIndex > MAX) {\n nextIndex = 0;\n }\n } else if (keyCode === KeyCode.left) {\n nextIndex--;\n if (nextIndex < 0) {\n nextIndex = MAX;\n }\n }\n if (keyCode === KeyCode.enter || keyCode === KeyCode.space) {\n setPinnedSegment(pieData[nextIndex].data.datum);\n }\n highlightSegment(pieData[nextIndex].data);\n },\n [setPinnedSegment, highlightSegment, pieData, highlightedSegmentIndex]\n );\n const onApplicationFocus = useCallback(\n (_event: any, target: 'keyboard' | 'mouse') => {\n if (pinnedSegment !== null || popoverDismissedRecently.current || target === 'mouse') {\n return;\n }\n\n const segment = highlightedSegment || legendSegment || pieData[0].data.datum;\n const matched = pieData.filter(d => d.data.datum === segment);\n highlightSegment(matched[0].data);\n },\n [pinnedSegment, pieData, highlightSegment, highlightedSegment, legendSegment]\n );\n\n const onApplicationBlur = useCallback(\n (event: React.FocusEvent) => {\n const blurTarget = event.relatedTarget || event.target;\n if (blurTarget === null || !(blurTarget instanceof Element) || !nodeBelongs(containerRef.current, blurTarget)) {\n // We only need to close the popover and remove the pinned segment so that we keep track of the current\n // highlighted legendSeries. using clearHighlightedSegment() would set the legendSeries to null, in that case\n // using Keyboard Tab will always highlight the first legend item in the legend component.\n setPopoverOpen(false);\n setPinnedSegment(null);\n }\n },\n [setPinnedSegment]\n );\n const onPopoverDismiss = (outsideClick?: boolean) => {\n setPopoverOpen(false);\n setPinnedSegment(null);\n\n if (!outsideClick) {\n // The delay is needed to bypass focus events caused by click or keypress needed to unpin the popover.\n setTimeout(() => {\n popoverDismissedRecently.current = true;\n plotRef.current!.focusApplication();\n popoverDismissedRecently.current = false;\n }, 0);\n } else {\n onHighlightChange(null);\n }\n };\n\n return (\n <div\n className={clsx(styles['chart-container'], fitHeight && styles['chart-container--fit-height'])}\n ref={containerRef}\n >\n <div\n className={clsx(\n styles['chart-container-chart-plot'],\n fitHeight && styles['chart-container-chart-plot--fit-height']\n )}\n >\n <ChartPlot\n ref={plotRef}\n width=\"100%\"\n height={fitHeight ? '100%' : height}\n transform={`translate(${width / 2} ${height / 2})`}\n isPrecise={true}\n isClickable={!isPopoverOpen}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescription={ariaDescription}\n ariaDescribedby={hasInnerContent ? innerMetricId : undefined}\n ariaRoleDescription={i18nStrings?.chartAriaRoleDescription}\n activeElementRef={focusedSegmentRef}\n activeElementKey={highlightedSegmentIndex?.toString()}\n onApplicationFocus={onApplicationFocus}\n onApplicationBlur={onApplicationBlur}\n onKeyDown={onKeyDown}\n onMouseOut={checkMouseLeave}\n >\n <Segments\n pieData={pieData}\n dimensions={dimensions}\n variant={variant}\n focusedSegmentRef={focusedSegmentRef}\n popoverTrackRef={popoverTrackRef}\n highlightedSegment={highlightedSegment}\n segmentAriaRoleDescription={i18nStrings?.segmentAriaRoleDescription}\n onMouseDown={onMouseDown}\n onMouseOver={onMouseOver}\n onTouchStart={onTouchStart}\n />\n {hasLabels && (\n <Labels\n pieData={pieData}\n dimensions={dimensions}\n segmentDescription={segmentDescription}\n visibleDataSum={dataSum}\n hideTitles={hideTitles}\n hideDescriptions={hideDescriptions}\n highlightedSegment={highlightedSegment}\n containerRef={containerRef}\n />\n )}\n </ChartPlot>\n </div>\n\n {hasInnerContent && (\n <div className={styles['inner-content']} id={innerMetricId}>\n {innerMetricValue && (\n <InternalBox\n variant={dimensions.size === 'small' ? 'h3' : 'h1'}\n tagOverride=\"div\"\n color=\"inherit\"\n padding=\"n\"\n >\n {innerMetricValue}\n </InternalBox>\n )}\n {innerMetricDescription && dimensions.size !== 'small' && (\n <InternalBox variant=\"h3\" color=\"text-body-secondary\" tagOverride=\"div\" padding=\"n\">\n {innerMetricDescription}\n </InternalBox>\n )}\n </div>\n )}\n {isPopoverOpen && popoverData && (\n <ChartPopover\n ref={popoverRef}\n title={\n popoverData.series && (\n <InternalBox className={styles['popover-header']} variant=\"strong\">\n <SeriesMarker color={popoverData.series.color} type={popoverData.series.markerType} />{' '}\n {popoverData.series.label}\n </InternalBox>\n )\n }\n trackRef={popoverData.trackRef}\n trackKey={popoverData.series.index}\n dismissButton={pinnedSegment !== null}\n dismissAriaLabel={i18nStrings.detailPopoverDismissAriaLabel}\n onDismiss={onPopoverDismiss}\n container={plotRef.current?.svg || null}\n size={detailPopoverSize}\n onMouseLeave={checkMouseLeave}\n onBlur={onApplicationBlur}\n >\n {popoverContent}\n {detailPopoverFooterContent && <ChartPopoverFooter>{detailPopoverFooterContent}</ChartPopoverFooter>}\n </ChartPopover>\n )}\n <InternalLiveRegion sources={[popoverContentRef]} />\n </div>\n );\n};\n"]}
|
package/pie-chart/styles.css.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"segment__path": "
|
|
5
|
-
"segment": "
|
|
6
|
-
"segment__hover": "
|
|
7
|
-
"label": "
|
|
8
|
-
"root": "
|
|
9
|
-
"content": "
|
|
10
|
-
"content--small": "awsui_content--
|
|
11
|
-
"content--fit-height": "awsui_content--fit-
|
|
12
|
-
"content--without-labels": "awsui_content--without-
|
|
13
|
-
"content--medium": "awsui_content--
|
|
14
|
-
"content--large": "awsui_content--
|
|
15
|
-
"status-container": "awsui_status-
|
|
16
|
-
"chart-container": "awsui_chart-
|
|
17
|
-
"chart-container--fit-height": "awsui_chart-container--fit-
|
|
18
|
-
"chart-container-chart-plot": "awsui_chart-container-chart-
|
|
19
|
-
"chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-
|
|
20
|
-
"inner-content": "awsui_inner-
|
|
21
|
-
"segment__highlight": "
|
|
22
|
-
"segment--dimmed": "awsui_segment--
|
|
23
|
-
"segment--highlighted": "awsui_segment--
|
|
24
|
-
"label--dimmed": "awsui_label--
|
|
25
|
-
"label--align-right": "awsui_label--align-
|
|
26
|
-
"label-text": "awsui_label-
|
|
27
|
-
"label__description": "
|
|
28
|
-
"label-line": "awsui_label-
|
|
29
|
-
"label--highlighted": "awsui_label--
|
|
30
|
-
"popover-header": "awsui_popover-
|
|
4
|
+
"segment__path": "awsui_segment__path_1edmh_1b6e4_161",
|
|
5
|
+
"segment": "awsui_segment_1edmh_1b6e4_161",
|
|
6
|
+
"segment__hover": "awsui_segment__hover_1edmh_1b6e4_188",
|
|
7
|
+
"label": "awsui_label_1edmh_1b6e4_202",
|
|
8
|
+
"root": "awsui_root_1edmh_1b6e4_216",
|
|
9
|
+
"content": "awsui_content_1edmh_1b6e4_220",
|
|
10
|
+
"content--small": "awsui_content--small_1edmh_1b6e4_220",
|
|
11
|
+
"content--fit-height": "awsui_content--fit-height_1edmh_1b6e4_223",
|
|
12
|
+
"content--without-labels": "awsui_content--without-labels_1edmh_1b6e4_226",
|
|
13
|
+
"content--medium": "awsui_content--medium_1edmh_1b6e4_232",
|
|
14
|
+
"content--large": "awsui_content--large_1edmh_1b6e4_244",
|
|
15
|
+
"status-container": "awsui_status-container_1edmh_1b6e4_261",
|
|
16
|
+
"chart-container": "awsui_chart-container_1edmh_1b6e4_265",
|
|
17
|
+
"chart-container--fit-height": "awsui_chart-container--fit-height_1edmh_1b6e4_269",
|
|
18
|
+
"chart-container-chart-plot": "awsui_chart-container-chart-plot_1edmh_1b6e4_274",
|
|
19
|
+
"chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-height_1edmh_1b6e4_277",
|
|
20
|
+
"inner-content": "awsui_inner-content_1edmh_1b6e4_283",
|
|
21
|
+
"segment__highlight": "awsui_segment__highlight_1edmh_1b6e4_294",
|
|
22
|
+
"segment--dimmed": "awsui_segment--dimmed_1edmh_1b6e4_309",
|
|
23
|
+
"segment--highlighted": "awsui_segment--highlighted_1edmh_1b6e4_312",
|
|
24
|
+
"label--dimmed": "awsui_label--dimmed_1edmh_1b6e4_329",
|
|
25
|
+
"label--align-right": "awsui_label--align-right_1edmh_1b6e4_332",
|
|
26
|
+
"label-text": "awsui_label-text_1edmh_1b6e4_340",
|
|
27
|
+
"label__description": "awsui_label__description_1edmh_1b6e4_348",
|
|
28
|
+
"label-line": "awsui_label-line_1edmh_1b6e4_355",
|
|
29
|
+
"label--highlighted": "awsui_label--highlighted_1edmh_1b6e4_359",
|
|
30
|
+
"popover-header": "awsui_popover-header_1edmh_1b6e4_363"
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -136,6 +136,10 @@
|
|
|
136
136
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
137
137
|
SPDX-License-Identifier: Apache-2.0
|
|
138
138
|
*/
|
|
139
|
+
/*
|
|
140
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
141
|
+
SPDX-License-Identifier: Apache-2.0
|
|
142
|
+
*/
|
|
139
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
140
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
141
145
|
/*
|
|
@@ -154,129 +158,129 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
158
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
155
159
|
SPDX-License-Identifier: Apache-2.0
|
|
156
160
|
*/
|
|
157
|
-
.
|
|
161
|
+
.awsui_segment__path_1edmh_1b6e4_161:not(#\9) {
|
|
158
162
|
transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
|
|
159
163
|
}
|
|
160
164
|
@media (prefers-reduced-motion: reduce) {
|
|
161
|
-
.
|
|
165
|
+
.awsui_segment__path_1edmh_1b6e4_161:not(#\9) {
|
|
162
166
|
animation: none;
|
|
163
167
|
transition: none;
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
|
-
.awsui-motion-disabled .
|
|
170
|
+
.awsui-motion-disabled .awsui_segment__path_1edmh_1b6e4_161:not(#\9), .awsui-mode-entering .awsui_segment__path_1edmh_1b6e4_161:not(#\9) {
|
|
167
171
|
animation: none;
|
|
168
172
|
transition: none;
|
|
169
173
|
}
|
|
170
174
|
|
|
171
|
-
.
|
|
175
|
+
.awsui_segment_1edmh_1b6e4_161:not(#\9) {
|
|
172
176
|
transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
|
|
173
177
|
}
|
|
174
178
|
@media (prefers-reduced-motion: reduce) {
|
|
175
|
-
.
|
|
179
|
+
.awsui_segment_1edmh_1b6e4_161:not(#\9) {
|
|
176
180
|
animation: none;
|
|
177
181
|
transition: none;
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
|
-
.awsui-motion-disabled .
|
|
184
|
+
.awsui-motion-disabled .awsui_segment_1edmh_1b6e4_161:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_1b6e4_161:not(#\9) {
|
|
181
185
|
animation: none;
|
|
182
186
|
transition: none;
|
|
183
187
|
}
|
|
184
|
-
.
|
|
188
|
+
.awsui_segment_1edmh_1b6e4_161 > .awsui_segment__hover_1edmh_1b6e4_188:not(#\9) {
|
|
185
189
|
transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
|
|
186
190
|
}
|
|
187
191
|
@media (prefers-reduced-motion: reduce) {
|
|
188
|
-
.
|
|
192
|
+
.awsui_segment_1edmh_1b6e4_161 > .awsui_segment__hover_1edmh_1b6e4_188:not(#\9) {
|
|
189
193
|
animation: none;
|
|
190
194
|
transition: none;
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
|
-
.awsui-motion-disabled .
|
|
197
|
+
.awsui-motion-disabled .awsui_segment_1edmh_1b6e4_161 > .awsui_segment__hover_1edmh_1b6e4_188:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_1b6e4_161 > .awsui_segment__hover_1edmh_1b6e4_188:not(#\9) {
|
|
194
198
|
animation: none;
|
|
195
199
|
transition: none;
|
|
196
200
|
}
|
|
197
201
|
|
|
198
|
-
.
|
|
202
|
+
.awsui_label_1edmh_1b6e4_202:not(#\9) {
|
|
199
203
|
transition: opacity var(--motion-duration-transition-quick-6npj01, 90ms) var(--motion-easing-transition-quick-l9jfsx, linear);
|
|
200
204
|
}
|
|
201
205
|
@media (prefers-reduced-motion: reduce) {
|
|
202
|
-
.
|
|
206
|
+
.awsui_label_1edmh_1b6e4_202:not(#\9) {
|
|
203
207
|
animation: none;
|
|
204
208
|
transition: none;
|
|
205
209
|
}
|
|
206
210
|
}
|
|
207
|
-
.awsui-motion-disabled .
|
|
211
|
+
.awsui-motion-disabled .awsui_label_1edmh_1b6e4_202:not(#\9), .awsui-mode-entering .awsui_label_1edmh_1b6e4_202:not(#\9) {
|
|
208
212
|
animation: none;
|
|
209
213
|
transition: none;
|
|
210
214
|
}
|
|
211
215
|
|
|
212
|
-
.
|
|
216
|
+
.awsui_root_1edmh_1b6e4_216:not(#\9) {
|
|
213
217
|
/* used in test-utils */
|
|
214
218
|
}
|
|
215
219
|
|
|
216
|
-
.
|
|
220
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--small_1edmh_1b6e4_220:not(#\9) {
|
|
217
221
|
min-block-size: calc(2 * (50px + var(--space-xs-zb16t3, 8px) + calc(2 * var(--line-height-body-m-30ar75, 20px))));
|
|
218
222
|
}
|
|
219
|
-
.
|
|
223
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--small_1edmh_1b6e4_220.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
220
224
|
min-block-size: calc(2 * (30px + calc(2 * var(--line-height-body-m-30ar75, 20px))));
|
|
221
225
|
}
|
|
222
|
-
.
|
|
226
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--small_1edmh_1b6e4_220.awsui_content--without-labels_1edmh_1b6e4_226:not(#\9) {
|
|
223
227
|
min-block-size: calc(2 * (50px + var(--space-xs-zb16t3, 8px)));
|
|
224
228
|
}
|
|
225
|
-
.
|
|
229
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--small_1edmh_1b6e4_220.awsui_content--without-labels_1edmh_1b6e4_226.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
226
230
|
min-block-size: calc(2 * (30px));
|
|
227
231
|
}
|
|
228
|
-
.
|
|
232
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--medium_1edmh_1b6e4_232:not(#\9) {
|
|
229
233
|
min-block-size: calc(2 * (100px + var(--space-s-34lx8l, 12px) + calc(2 * var(--line-height-body-m-30ar75, 20px))));
|
|
230
234
|
}
|
|
231
|
-
.
|
|
235
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--medium_1edmh_1b6e4_232.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
232
236
|
min-block-size: calc(2 * (100px + calc(2 * var(--line-height-body-m-30ar75, 20px))));
|
|
233
237
|
}
|
|
234
|
-
.
|
|
238
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--medium_1edmh_1b6e4_232.awsui_content--without-labels_1edmh_1b6e4_226:not(#\9) {
|
|
235
239
|
min-block-size: calc(2 * (100px + var(--space-s-34lx8l, 12px)));
|
|
236
240
|
}
|
|
237
|
-
.
|
|
241
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--medium_1edmh_1b6e4_232.awsui_content--without-labels_1edmh_1b6e4_226.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
238
242
|
min-block-size: calc(2 * (100px));
|
|
239
243
|
}
|
|
240
|
-
.
|
|
244
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--large_1edmh_1b6e4_244:not(#\9) {
|
|
241
245
|
min-block-size: calc(2 * (140px + var(--space-s-34lx8l, 12px) + calc(2 * var(--line-height-body-m-30ar75, 20px))));
|
|
242
246
|
}
|
|
243
|
-
.
|
|
247
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--large_1edmh_1b6e4_244.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
244
248
|
min-block-size: calc(2 * (140px + calc(2 * var(--line-height-body-m-30ar75, 20px))));
|
|
245
249
|
}
|
|
246
|
-
.
|
|
250
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--large_1edmh_1b6e4_244.awsui_content--without-labels_1edmh_1b6e4_226:not(#\9) {
|
|
247
251
|
min-block-size: calc(2 * (140px + var(--space-s-34lx8l, 12px)));
|
|
248
252
|
}
|
|
249
|
-
.
|
|
253
|
+
.awsui_content_1edmh_1b6e4_220.awsui_content--large_1edmh_1b6e4_244.awsui_content--without-labels_1edmh_1b6e4_226.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
250
254
|
min-block-size: calc(2 * (140px));
|
|
251
255
|
}
|
|
252
256
|
|
|
253
|
-
.awsui_content--fit-
|
|
257
|
+
.awsui_content--fit-height_1edmh_1b6e4_223:not(#\9) {
|
|
254
258
|
flex: 1;
|
|
255
259
|
}
|
|
256
260
|
|
|
257
|
-
.awsui_status-
|
|
261
|
+
.awsui_status-container_1edmh_1b6e4_261:not(#\9) {
|
|
258
262
|
/* used in test utils */
|
|
259
263
|
}
|
|
260
264
|
|
|
261
|
-
.awsui_chart-
|
|
265
|
+
.awsui_chart-container_1edmh_1b6e4_265:not(#\9) {
|
|
262
266
|
display: flex;
|
|
263
267
|
flex: 1;
|
|
264
268
|
}
|
|
265
|
-
.awsui_chart-container--fit-
|
|
269
|
+
.awsui_chart-container--fit-height_1edmh_1b6e4_269:not(#\9) {
|
|
266
270
|
block-size: 100%;
|
|
267
271
|
min-block-size: inherit;
|
|
268
272
|
}
|
|
269
273
|
|
|
270
|
-
.awsui_chart-container-chart-
|
|
274
|
+
.awsui_chart-container-chart-plot_1edmh_1b6e4_274:not(#\9) {
|
|
271
275
|
display: contents;
|
|
272
276
|
}
|
|
273
|
-
.awsui_chart-container-chart-plot--fit-
|
|
277
|
+
.awsui_chart-container-chart-plot--fit-height_1edmh_1b6e4_277:not(#\9) {
|
|
274
278
|
display: block;
|
|
275
279
|
position: absolute;
|
|
276
280
|
inset: 0;
|
|
277
281
|
}
|
|
278
282
|
|
|
279
|
-
.awsui_inner-
|
|
283
|
+
.awsui_inner-content_1edmh_1b6e4_283:not(#\9) {
|
|
280
284
|
display: flex;
|
|
281
285
|
position: absolute;
|
|
282
286
|
flex-direction: column;
|
|
@@ -287,53 +291,53 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
287
291
|
pointer-events: none;
|
|
288
292
|
}
|
|
289
293
|
|
|
290
|
-
.
|
|
294
|
+
.awsui_segment__highlight_1edmh_1b6e4_294:not(#\9) {
|
|
291
295
|
stroke: none;
|
|
292
296
|
opacity: 0;
|
|
293
297
|
}
|
|
294
298
|
|
|
295
|
-
.
|
|
299
|
+
.awsui_segment_1edmh_1b6e4_161:not(#\9) {
|
|
296
300
|
stroke: var(--color-background-container-content-z79u4u, #ffffff);
|
|
297
301
|
stroke-width: 2px;
|
|
298
302
|
stroke-linejoin: round;
|
|
299
303
|
opacity: 1;
|
|
300
304
|
cursor: pointer;
|
|
301
305
|
}
|
|
302
|
-
.
|
|
306
|
+
.awsui_segment_1edmh_1b6e4_161:not(#\9):focus {
|
|
303
307
|
outline: none;
|
|
304
308
|
}
|
|
305
|
-
.
|
|
309
|
+
.awsui_segment_1edmh_1b6e4_161.awsui_segment--dimmed_1edmh_1b6e4_309:not(#\9) {
|
|
306
310
|
opacity: 0.35;
|
|
307
311
|
}
|
|
308
|
-
.
|
|
312
|
+
.awsui_segment_1edmh_1b6e4_161.awsui_segment--highlighted_1edmh_1b6e4_312 > .awsui_segment__highlight_1edmh_1b6e4_294:not(#\9), .awsui_segment_1edmh_1b6e4_161:not(#\9):hover:not(.awsui_segment--dimmed_1edmh_1b6e4_309) > .awsui_segment__highlight_1edmh_1b6e4_294 {
|
|
309
313
|
opacity: 1;
|
|
310
314
|
}
|
|
311
315
|
|
|
312
|
-
.
|
|
316
|
+
.awsui_label_1edmh_1b6e4_202:not(#\9) {
|
|
313
317
|
color: var(--color-text-heading-default-jen9ei, #0f141a);
|
|
314
318
|
opacity: 1;
|
|
315
319
|
/* stylelint-disable-next-line selector-max-type */
|
|
316
320
|
/* stylelint-disable-next-line selector-max-type */
|
|
317
321
|
}
|
|
318
|
-
.
|
|
322
|
+
.awsui_label_1edmh_1b6e4_202 > line:not(#\9) {
|
|
319
323
|
stroke: var(--color-stroke-chart-line-i586tw, #8c8c94);
|
|
320
324
|
stroke-width: var(--border-divider-section-width-1061zr, 1px);
|
|
321
325
|
}
|
|
322
|
-
.
|
|
326
|
+
.awsui_label_1edmh_1b6e4_202 > div:not(#\9) {
|
|
323
327
|
margin-block-start: -0.75em;
|
|
324
328
|
}
|
|
325
|
-
.
|
|
329
|
+
.awsui_label_1edmh_1b6e4_202.awsui_label--dimmed_1edmh_1b6e4_329:not(#\9) {
|
|
326
330
|
opacity: 0.35;
|
|
327
331
|
}
|
|
328
|
-
.
|
|
332
|
+
.awsui_label_1edmh_1b6e4_202.awsui_label--align-right_1edmh_1b6e4_332:not(#\9) {
|
|
329
333
|
/* stylelint-disable-next-line selector-max-type */
|
|
330
334
|
}
|
|
331
|
-
.
|
|
335
|
+
.awsui_label_1edmh_1b6e4_202.awsui_label--align-right_1edmh_1b6e4_332 > div:not(#\9) {
|
|
332
336
|
text-align: end;
|
|
333
337
|
}
|
|
334
338
|
|
|
335
339
|
/* stylelint-disable-next-line selector-max-type */
|
|
336
|
-
.awsui_label-
|
|
340
|
+
.awsui_label-text_1edmh_1b6e4_340 > text:not(#\9) {
|
|
337
341
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
338
342
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
339
343
|
font-weight: var(--font-display-label-weight-815ja9, 700);
|
|
@@ -341,22 +345,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
341
345
|
dominant-baseline: middle;
|
|
342
346
|
}
|
|
343
347
|
|
|
344
|
-
text.
|
|
348
|
+
text.awsui_label__description_1edmh_1b6e4_348:not(#\9) {
|
|
345
349
|
font-size: var(--font-chart-detail-size-1n389u, 12px);
|
|
346
350
|
font-weight: 400;
|
|
347
351
|
color: var(--color-text-group-label-8pk3es, #424650);
|
|
348
352
|
fill: var(--color-text-group-label-8pk3es, #424650);
|
|
349
353
|
}
|
|
350
354
|
|
|
351
|
-
.awsui_label-
|
|
355
|
+
.awsui_label-line_1edmh_1b6e4_355:not(#\9) {
|
|
352
356
|
/* used in component code */
|
|
353
357
|
}
|
|
354
358
|
|
|
355
|
-
.awsui_label--
|
|
359
|
+
.awsui_label--highlighted_1edmh_1b6e4_359:not(#\9) {
|
|
356
360
|
/* used in test-utils */
|
|
357
361
|
}
|
|
358
362
|
|
|
359
|
-
.awsui_popover-
|
|
363
|
+
.awsui_popover-header_1edmh_1b6e4_363:not(#\9) {
|
|
360
364
|
display: inline-flex;
|
|
361
365
|
align-items: flex-start;
|
|
362
366
|
}
|