@cloudscape-design/components-themeable 3.0.374 → 3.0.376
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/lib/internal/manifest.json +1 -1
- package/lib/internal/template/alert/actions-wrapper/styles.css.js +1 -1
- package/lib/internal/template/alert/actions-wrapper/styles.scoped.css +3 -3
- package/lib/internal/template/alert/actions-wrapper/styles.selectors.js +1 -1
- package/lib/internal/template/alert/index.d.ts.map +1 -1
- package/lib/internal/template/alert/index.js +21 -16
- package/lib/internal/template/alert/index.js.map +1 -1
- package/lib/internal/template/alert/styles.css.js +25 -25
- package/lib/internal/template/alert/styles.scoped.css +81 -81
- package/lib/internal/template/alert/styles.selectors.js +25 -25
- package/lib/internal/template/annotation-context/annotation/styles.css.js +24 -24
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +46 -46
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +24 -24
- package/lib/internal/template/app-layout/content-wrapper/styles.css.js +3 -3
- package/lib/internal/template/app-layout/content-wrapper/styles.scoped.css +10 -10
- package/lib/internal/template/app-layout/content-wrapper/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/drawer/styles.css.js +10 -10
- package/lib/internal/template/app-layout/drawer/styles.scoped.css +28 -28
- package/lib/internal/template/app-layout/drawer/styles.selectors.js +10 -10
- package/lib/internal/template/app-layout/mobile-toolbar/styles.css.js +8 -8
- package/lib/internal/template/app-layout/mobile-toolbar/styles.scoped.css +18 -18
- package/lib/internal/template/app-layout/mobile-toolbar/styles.selectors.js +8 -8
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/styles.css.js +17 -17
- package/lib/internal/template/app-layout/styles.scoped.css +30 -30
- package/lib/internal/template/app-layout/styles.selectors.js +17 -17
- package/lib/internal/template/app-layout/toggles/styles.css.js +2 -2
- package/lib/internal/template/app-layout/toggles/styles.scoped.css +16 -16
- package/lib/internal/template/app-layout/toggles/styles.selectors.js +2 -2
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +69 -69
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +267 -267
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +69 -69
- package/lib/internal/template/area-chart/model/use-chart-model.js +1 -1
- package/lib/internal/template/area-chart/model/use-chart-model.js.map +1 -1
- package/lib/internal/template/area-chart/styles.css.js +6 -6
- package/lib/internal/template/area-chart/styles.scoped.css +16 -16
- package/lib/internal/template/area-chart/styles.selectors.js +6 -6
- package/lib/internal/template/attribute-editor/styles.css.js +14 -14
- package/lib/internal/template/attribute-editor/styles.scoped.css +43 -43
- package/lib/internal/template/attribute-editor/styles.selectors.js +14 -14
- package/lib/internal/template/badge/styles.css.js +5 -5
- package/lib/internal/template/badge/styles.scoped.css +20 -20
- package/lib/internal/template/badge/styles.selectors.js +5 -5
- package/lib/internal/template/box/styles.css.js +190 -190
- package/lib/internal/template/box/styles.scoped.css +420 -420
- package/lib/internal/template/box/styles.selectors.js +190 -190
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +9 -9
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +9 -9
- package/lib/internal/template/breadcrumb-group/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/styles.scoped.css +22 -22
- package/lib/internal/template/breadcrumb-group/styles.selectors.js +7 -7
- package/lib/internal/template/button/styles.css.js +20 -20
- package/lib/internal/template/button/styles.scoped.css +472 -472
- package/lib/internal/template/button/styles.selectors.js +20 -20
- package/lib/internal/template/button-dropdown/category-elements/styles.css.js +13 -13
- package/lib/internal/template/button-dropdown/category-elements/styles.scoped.css +50 -50
- package/lib/internal/template/button-dropdown/category-elements/styles.selectors.js +13 -13
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +15 -15
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +42 -42
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +15 -15
- package/lib/internal/template/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/lib/internal/template/button-dropdown/mobile-expandable-group/styles.scoped.css +10 -10
- package/lib/internal/template/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/lib/internal/template/button-dropdown/styles.css.js +14 -14
- package/lib/internal/template/button-dropdown/styles.scoped.css +32 -32
- package/lib/internal/template/button-dropdown/styles.selectors.js +14 -14
- package/lib/internal/template/calendar/styles.css.js +18 -18
- package/lib/internal/template/calendar/styles.scoped.css +89 -89
- package/lib/internal/template/calendar/styles.selectors.js +18 -18
- package/lib/internal/template/cards/styles.css.js +38 -38
- package/lib/internal/template/cards/styles.scoped.css +99 -99
- package/lib/internal/template/cards/styles.selectors.js +38 -38
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +16 -16
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/code-editor/index.d.ts.map +1 -1
- package/lib/internal/template/code-editor/index.js +26 -71
- package/lib/internal/template/code-editor/index.js.map +1 -1
- package/lib/internal/template/code-editor/listeners.d.ts +1 -1
- package/lib/internal/template/code-editor/listeners.d.ts.map +1 -1
- package/lib/internal/template/code-editor/listeners.js.map +1 -1
- package/lib/internal/template/code-editor/resizable-box/styles.css.js +3 -3
- package/lib/internal/template/code-editor/resizable-box/styles.scoped.css +11 -11
- package/lib/internal/template/code-editor/resizable-box/styles.selectors.js +3 -3
- package/lib/internal/template/code-editor/setup-editor.d.ts.map +1 -1
- package/lib/internal/template/code-editor/setup-editor.js +39 -36
- package/lib/internal/template/code-editor/setup-editor.js.map +1 -1
- package/lib/internal/template/code-editor/styles.css.js +32 -32
- package/lib/internal/template/code-editor/styles.scoped.css +270 -270
- package/lib/internal/template/code-editor/styles.selectors.js +32 -32
- package/lib/internal/template/code-editor/use-editor.d.ts +24 -0
- package/lib/internal/template/code-editor/use-editor.d.ts.map +1 -0
- package/lib/internal/template/code-editor/use-editor.js +71 -0
- package/lib/internal/template/code-editor/use-editor.js.map +1 -0
- package/lib/internal/template/collection-preferences/content-display/styles.css.js +11 -11
- package/lib/internal/template/collection-preferences/content-display/styles.scoped.css +42 -42
- package/lib/internal/template/collection-preferences/content-display/styles.selectors.js +11 -11
- package/lib/internal/template/collection-preferences/styles.css.js +37 -37
- package/lib/internal/template/collection-preferences/styles.scoped.css +81 -81
- package/lib/internal/template/collection-preferences/styles.selectors.js +37 -37
- package/lib/internal/template/column-layout/flexible-column-layout/styles.css.js +5 -5
- package/lib/internal/template/column-layout/flexible-column-layout/styles.scoped.css +8 -8
- package/lib/internal/template/column-layout/flexible-column-layout/styles.selectors.js +5 -5
- package/lib/internal/template/column-layout/styles.css.js +13 -13
- package/lib/internal/template/column-layout/styles.scoped.css +55 -55
- package/lib/internal/template/column-layout/styles.selectors.js +13 -13
- package/lib/internal/template/container/styles.css.js +28 -28
- package/lib/internal/template/container/styles.scoped.css +94 -94
- package/lib/internal/template/container/styles.selectors.js +28 -28
- package/lib/internal/template/content-layout/styles.css.js +7 -7
- package/lib/internal/template/content-layout/styles.scoped.css +17 -17
- package/lib/internal/template/content-layout/styles.selectors.js +7 -7
- package/lib/internal/template/date-picker/styles.css.js +7 -7
- package/lib/internal/template/date-picker/styles.scoped.css +16 -16
- package/lib/internal/template/date-picker/styles.selectors.js +7 -7
- package/lib/internal/template/date-range-picker/calendar/grids/styles.css.js +25 -25
- package/lib/internal/template/date-range-picker/calendar/grids/styles.scoped.css +95 -95
- package/lib/internal/template/date-range-picker/calendar/grids/styles.selectors.js +25 -25
- package/lib/internal/template/date-range-picker/relative-range/styles.css.js +9 -9
- package/lib/internal/template/date-range-picker/relative-range/styles.scoped.css +16 -16
- package/lib/internal/template/date-range-picker/relative-range/styles.selectors.js +9 -9
- package/lib/internal/template/date-range-picker/styles.css.js +38 -38
- package/lib/internal/template/date-range-picker/styles.scoped.css +76 -76
- package/lib/internal/template/date-range-picker/styles.selectors.js +38 -38
- package/lib/internal/template/expandable-section/styles.css.js +29 -29
- package/lib/internal/template/expandable-section/styles.scoped.css +108 -108
- package/lib/internal/template/expandable-section/styles.selectors.js +29 -29
- package/lib/internal/template/file-upload/dropzone/styles.css.js +2 -2
- package/lib/internal/template/file-upload/dropzone/styles.scoped.css +9 -9
- package/lib/internal/template/file-upload/dropzone/styles.selectors.js +2 -2
- package/lib/internal/template/file-upload/file-input/styles.css.js +4 -4
- package/lib/internal/template/file-upload/file-input/styles.scoped.css +14 -14
- package/lib/internal/template/file-upload/file-input/styles.selectors.js +4 -4
- package/lib/internal/template/file-upload/file-option/styles.css.js +7 -7
- package/lib/internal/template/file-upload/file-option/styles.scoped.css +10 -10
- package/lib/internal/template/file-upload/file-option/styles.selectors.js +7 -7
- package/lib/internal/template/file-upload/styles.css.js +2 -2
- package/lib/internal/template/file-upload/styles.scoped.css +4 -4
- package/lib/internal/template/file-upload/styles.selectors.js +2 -2
- package/lib/internal/template/flashbar/styles.css.js +47 -47
- package/lib/internal/template/flashbar/styles.scoped.css +249 -249
- package/lib/internal/template/flashbar/styles.selectors.js +47 -47
- package/lib/internal/template/form/styles.css.js +9 -9
- package/lib/internal/template/form/styles.scoped.css +20 -20
- package/lib/internal/template/form/styles.selectors.js +9 -9
- package/lib/internal/template/form-field/internal.d.ts.map +1 -1
- package/lib/internal/template/form-field/internal.js +17 -12
- package/lib/internal/template/form-field/internal.js.map +1 -1
- package/lib/internal/template/form-field/styles.css.js +19 -19
- package/lib/internal/template/form-field/styles.scoped.css +52 -52
- package/lib/internal/template/form-field/styles.selectors.js +19 -19
- package/lib/internal/template/grid/styles.css.js +53 -53
- package/lib/internal/template/grid/styles.scoped.css +60 -60
- package/lib/internal/template/grid/styles.selectors.js +53 -53
- package/lib/internal/template/header/styles.css.js +33 -33
- package/lib/internal/template/header/styles.scoped.css +114 -114
- package/lib/internal/template/header/styles.selectors.js +33 -33
- package/lib/internal/template/help-panel/styles.css.js +4 -4
- package/lib/internal/template/help-panel/styles.scoped.css +167 -167
- package/lib/internal/template/help-panel/styles.selectors.js +4 -4
- package/lib/internal/template/hotspot/styles.css.js +7 -7
- package/lib/internal/template/hotspot/styles.scoped.css +10 -10
- package/lib/internal/template/hotspot/styles.selectors.js +7 -7
- package/lib/internal/template/icon/styles.css.js +21 -21
- package/lib/internal/template/icon/styles.scoped.css +81 -81
- package/lib/internal/template/icon/styles.selectors.js +21 -21
- package/lib/internal/template/input/styles.css.js +12 -12
- package/lib/internal/template/input/styles.scoped.css +73 -73
- package/lib/internal/template/input/styles.selectors.js +12 -12
- package/lib/internal/template/internal/base-component/styles.scoped.css +3177 -3105
- package/lib/internal/template/internal/components/abstract-switch/styles.css.js +13 -13
- package/lib/internal/template/internal/components/abstract-switch/styles.scoped.css +26 -26
- package/lib/internal/template/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/lib/internal/template/internal/components/button-trigger/styles.css.js +9 -9
- package/lib/internal/template/internal/components/button-trigger/styles.scoped.css +63 -63
- package/lib/internal/template/internal/components/button-trigger/styles.selectors.js +9 -9
- package/lib/internal/template/internal/components/cartesian-chart/styles.css.js +27 -27
- package/lib/internal/template/internal/components/cartesian-chart/styles.scoped.css +41 -41
- package/lib/internal/template/internal/components/cartesian-chart/styles.selectors.js +27 -27
- package/lib/internal/template/internal/components/chart-filter/styles.css.js +3 -3
- package/lib/internal/template/internal/components/chart-filter/styles.scoped.css +7 -7
- package/lib/internal/template/internal/components/chart-filter/styles.selectors.js +3 -3
- package/lib/internal/template/internal/components/chart-legend/styles.css.js +6 -6
- package/lib/internal/template/internal/components/chart-legend/styles.scoped.css +23 -23
- package/lib/internal/template/internal/components/chart-legend/styles.selectors.js +6 -6
- package/lib/internal/template/internal/components/chart-plot/styles.css.js +5 -5
- package/lib/internal/template/internal/components/chart-plot/styles.scoped.css +6 -6
- package/lib/internal/template/internal/components/chart-plot/styles.selectors.js +5 -5
- package/lib/internal/template/internal/components/chart-popover/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/chart-popover/index.js +1 -1
- package/lib/internal/template/internal/components/chart-popover/index.js.map +1 -1
- package/lib/internal/template/internal/components/chart-popover/styles.css.js +3 -3
- package/lib/internal/template/internal/components/chart-popover/styles.scoped.css +9 -9
- package/lib/internal/template/internal/components/chart-popover/styles.selectors.js +3 -3
- package/lib/internal/template/internal/components/chart-series-details/styles.css.js +5 -5
- package/lib/internal/template/internal/components/chart-series-details/styles.scoped.css +20 -20
- package/lib/internal/template/internal/components/chart-series-details/styles.selectors.js +5 -5
- package/lib/internal/template/internal/components/chart-series-marker/styles.css.js +5 -5
- package/lib/internal/template/internal/components/chart-series-marker/styles.scoped.css +14 -14
- package/lib/internal/template/internal/components/chart-series-marker/styles.selectors.js +5 -5
- package/lib/internal/template/internal/components/chart-status-container/styles.css.js +2 -2
- package/lib/internal/template/internal/components/chart-status-container/styles.scoped.css +3 -3
- package/lib/internal/template/internal/components/chart-status-container/styles.selectors.js +2 -2
- package/lib/internal/template/internal/components/chart-wrapper/styles.css.js +9 -9
- package/lib/internal/template/internal/components/chart-wrapper/styles.scoped.css +15 -15
- package/lib/internal/template/internal/components/chart-wrapper/styles.selectors.js +9 -9
- package/lib/internal/template/internal/components/checkbox-icon/styles.css.js +7 -7
- package/lib/internal/template/internal/components/checkbox-icon/styles.scoped.css +18 -18
- package/lib/internal/template/internal/components/checkbox-icon/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/dark-ribbon/styles.css.js +2 -2
- package/lib/internal/template/internal/components/dark-ribbon/styles.scoped.css +4 -4
- package/lib/internal/template/internal/components/dark-ribbon/styles.selectors.js +2 -2
- package/lib/internal/template/internal/components/dropdown/styles.css.js +21 -21
- package/lib/internal/template/internal/components/dropdown/styles.scoped.css +52 -52
- package/lib/internal/template/internal/components/dropdown/styles.selectors.js +21 -21
- package/lib/internal/template/internal/components/dropdown-footer/styles.css.js +3 -3
- package/lib/internal/template/internal/components/dropdown-footer/styles.scoped.css +9 -9
- package/lib/internal/template/internal/components/dropdown-footer/styles.selectors.js +3 -3
- package/lib/internal/template/internal/components/dropdown-status/styles.css.js +2 -2
- package/lib/internal/template/internal/components/dropdown-status/styles.scoped.css +8 -8
- package/lib/internal/template/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/lib/internal/template/internal/components/filtering-token/styles.css.js +7 -7
- package/lib/internal/template/internal/components/filtering-token/styles.scoped.css +34 -34
- package/lib/internal/template/internal/components/filtering-token/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/handle/styles.css.js +2 -2
- package/lib/internal/template/internal/components/handle/styles.scoped.css +12 -12
- package/lib/internal/template/internal/components/handle/styles.selectors.js +2 -2
- package/lib/internal/template/internal/components/menu-dropdown/styles.css.js +7 -7
- package/lib/internal/template/internal/components/menu-dropdown/styles.scoped.css +32 -32
- package/lib/internal/template/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/option/styles.css.js +17 -17
- package/lib/internal/template/internal/components/option/styles.scoped.css +47 -47
- package/lib/internal/template/internal/components/option/styles.selectors.js +17 -17
- package/lib/internal/template/internal/components/options-list/styles.css.js +2 -2
- package/lib/internal/template/internal/components/options-list/styles.scoped.css +7 -7
- package/lib/internal/template/internal/components/options-list/styles.selectors.js +2 -2
- package/lib/internal/template/internal/components/selectable-item/styles.css.js +16 -16
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +70 -70
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +16 -16
- package/lib/internal/template/internal/components/token-list/styles.css.js +9 -9
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +40 -40
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +9 -9
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/internal/generated/styles/tokens.js +1 -1
- package/lib/internal/template/internal/generated/theming/index.cjs +25 -23
- package/lib/internal/template/internal/generated/theming/index.js +25 -23
- package/lib/internal/template/internal/plugins/api.d.ts +21 -25
- package/lib/internal/template/internal/plugins/api.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/api.js +15 -35
- package/lib/internal/template/internal/plugins/api.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/action-buttons.d.ts +9 -0
- package/lib/internal/template/internal/plugins/controllers/action-buttons.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/action-buttons.js +11 -0
- package/lib/internal/template/internal/plugins/controllers/action-buttons.js.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts +9 -0
- package/lib/internal/template/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/lib/internal/template/internal/plugins/controllers/drawers.js +11 -0
- package/lib/internal/template/internal/plugins/controllers/drawers.js.map +1 -1
- package/lib/internal/template/internal/utils/dom.d.ts +1 -8
- package/lib/internal/template/internal/utils/dom.d.ts.map +1 -1
- package/lib/internal/template/internal/utils/dom.js +1 -22
- package/lib/internal/template/internal/utils/dom.js.map +1 -1
- package/lib/internal/template/link/styles.css.js +20 -20
- package/lib/internal/template/link/styles.scoped.css +158 -158
- package/lib/internal/template/link/styles.selectors.js +20 -20
- package/lib/internal/template/mixed-line-bar-chart/hooks/use-mouse-hover.js +1 -1
- package/lib/internal/template/mixed-line-bar-chart/hooks/use-mouse-hover.js.map +1 -1
- package/lib/internal/template/mixed-line-bar-chart/styles.css.js +11 -11
- package/lib/internal/template/mixed-line-bar-chart/styles.scoped.css +24 -24
- package/lib/internal/template/mixed-line-bar-chart/styles.selectors.js +11 -11
- package/lib/internal/template/modal/styles.css.js +23 -23
- package/lib/internal/template/modal/styles.scoped.css +67 -67
- package/lib/internal/template/modal/styles.selectors.js +23 -23
- package/lib/internal/template/multiselect/styles.css.js +1 -1
- package/lib/internal/template/multiselect/styles.scoped.css +5 -5
- package/lib/internal/template/multiselect/styles.selectors.js +1 -1
- package/lib/internal/template/pagination/styles.css.js +9 -9
- package/lib/internal/template/pagination/styles.scoped.css +47 -47
- package/lib/internal/template/pagination/styles.selectors.js +9 -9
- package/lib/internal/template/pie-chart/pie-chart.d.ts.map +1 -1
- package/lib/internal/template/pie-chart/pie-chart.js +1 -1
- package/lib/internal/template/pie-chart/pie-chart.js.map +1 -1
- package/lib/internal/template/pie-chart/styles.css.js +27 -27
- package/lib/internal/template/pie-chart/styles.scoped.css +63 -63
- package/lib/internal/template/pie-chart/styles.selectors.js +27 -27
- package/lib/internal/template/popover/container.d.ts.map +1 -1
- package/lib/internal/template/popover/container.js +3 -2
- package/lib/internal/template/popover/container.js.map +1 -1
- package/lib/internal/template/popover/styles.css.js +50 -50
- package/lib/internal/template/popover/styles.scoped.css +104 -104
- package/lib/internal/template/popover/styles.selectors.js +50 -50
- package/lib/internal/template/progress-bar/styles.css.js +18 -18
- package/lib/internal/template/progress-bar/styles.scoped.css +58 -58
- package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
- package/lib/internal/template/property-filter/styles.css.js +29 -29
- package/lib/internal/template/property-filter/styles.scoped.css +52 -52
- package/lib/internal/template/property-filter/styles.selectors.js +29 -29
- package/lib/internal/template/radio-group/styles.css.js +9 -9
- package/lib/internal/template/radio-group/styles.scoped.css +37 -37
- package/lib/internal/template/radio-group/styles.selectors.js +9 -9
- package/lib/internal/template/s3-resource-selector/s3-in-context/styles.css.js +7 -7
- package/lib/internal/template/s3-resource-selector/s3-in-context/styles.scoped.css +12 -12
- package/lib/internal/template/s3-resource-selector/s3-in-context/styles.selectors.js +7 -7
- package/lib/internal/template/segmented-control/styles.css.js +14 -14
- package/lib/internal/template/segmented-control/styles.scoped.css +78 -78
- package/lib/internal/template/segmented-control/styles.selectors.js +14 -14
- package/lib/internal/template/select/parts/styles.css.js +9 -9
- package/lib/internal/template/select/parts/styles.scoped.css +17 -17
- package/lib/internal/template/select/parts/styles.selectors.js +9 -9
- package/lib/internal/template/select/styles.css.js +1 -1
- package/lib/internal/template/select/styles.scoped.css +5 -5
- package/lib/internal/template/select/styles.selectors.js +1 -1
- package/lib/internal/template/side-navigation/styles.css.js +28 -28
- package/lib/internal/template/side-navigation/styles.scoped.css +92 -92
- package/lib/internal/template/side-navigation/styles.selectors.js +28 -28
- package/lib/internal/template/space-between/styles.css.js +23 -23
- package/lib/internal/template/space-between/styles.scoped.css +40 -40
- package/lib/internal/template/space-between/styles.selectors.js +23 -23
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +35 -35
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/split-panel/styles.css.js +56 -56
- package/lib/internal/template/split-panel/styles.scoped.css +146 -146
- package/lib/internal/template/split-panel/styles.selectors.js +56 -56
- package/lib/internal/template/status-indicator/styles.css.js +22 -22
- package/lib/internal/template/status-indicator/styles.scoped.css +46 -46
- package/lib/internal/template/status-indicator/styles.selectors.js +22 -22
- package/lib/internal/template/table/body-cell/styles.css.js +28 -28
- package/lib/internal/template/table/body-cell/styles.scoped.css +155 -155
- package/lib/internal/template/table/body-cell/styles.selectors.js +28 -28
- package/lib/internal/template/table/header-cell/styles.css.js +24 -24
- package/lib/internal/template/table/header-cell/styles.scoped.css +93 -93
- package/lib/internal/template/table/header-cell/styles.selectors.js +24 -24
- package/lib/internal/template/table/resizer/styles.css.js +6 -6
- package/lib/internal/template/table/resizer/styles.scoped.css +27 -27
- package/lib/internal/template/table/resizer/styles.selectors.js +6 -6
- package/lib/internal/template/table/selection-control/styles.css.js +3 -3
- package/lib/internal/template/table/selection-control/styles.scoped.css +4 -4
- package/lib/internal/template/table/selection-control/styles.selectors.js +3 -3
- package/lib/internal/template/table/sticky-scrollbar/styles.css.js +6 -6
- package/lib/internal/template/table/sticky-scrollbar/styles.scoped.css +10 -10
- package/lib/internal/template/table/sticky-scrollbar/styles.selectors.js +6 -6
- package/lib/internal/template/table/styles.css.js +34 -34
- package/lib/internal/template/table/styles.scoped.css +84 -84
- package/lib/internal/template/table/styles.selectors.js +34 -34
- package/lib/internal/template/tabs/styles.css.js +21 -21
- package/lib/internal/template/tabs/styles.scoped.css +86 -86
- package/lib/internal/template/tabs/styles.selectors.js +21 -21
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +24 -24
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +120 -120
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/text-filter/styles.css.js +3 -3
- package/lib/internal/template/text-filter/styles.scoped.css +10 -10
- package/lib/internal/template/text-filter/styles.selectors.js +3 -3
- package/lib/internal/template/textarea/styles.css.js +4 -4
- package/lib/internal/template/textarea/styles.scoped.css +40 -40
- package/lib/internal/template/textarea/styles.selectors.js +4 -4
- package/lib/internal/template/tiles/styles.css.js +29 -29
- package/lib/internal/template/tiles/styles.scoped.css +128 -128
- package/lib/internal/template/tiles/styles.selectors.js +29 -29
- package/lib/internal/template/toggle/styles.css.js +8 -8
- package/lib/internal/template/toggle/styles.scoped.css +27 -27
- package/lib/internal/template/toggle/styles.selectors.js +8 -8
- package/lib/internal/template/token-group/styles.css.js +7 -7
- package/lib/internal/template/token-group/styles.scoped.css +42 -42
- package/lib/internal/template/token-group/styles.selectors.js +7 -7
- package/lib/internal/template/top-navigation/1.0-beta/styles.css.js +25 -25
- package/lib/internal/template/top-navigation/1.0-beta/styles.scoped.css +84 -84
- package/lib/internal/template/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/lib/internal/template/top-navigation/styles.css.js +47 -47
- package/lib/internal/template/top-navigation/styles.scoped.css +148 -148
- package/lib/internal/template/top-navigation/styles.selectors.js +47 -47
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +43 -43
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/lib/internal/template/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/lib/internal/template/tutorial-panel/components/tutorial-list/styles.scoped.css +50 -50
- package/lib/internal/template/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/lib/internal/template/tutorial-panel/styles.css.js +1 -1
- package/lib/internal/template/tutorial-panel/styles.scoped.css +6 -6
- package/lib/internal/template/tutorial-panel/styles.selectors.js +1 -1
- package/lib/internal/template/wizard/styles.css.js +31 -31
- package/lib/internal/template/wizard/styles.scoped.css +124 -124
- package/lib/internal/template/wizard/styles.selectors.js +31 -31
- package/package.json +1 -1
|
@@ -94,57 +94,57 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
98
|
-
transition: opacity var(--motion-duration-transition-quick-
|
|
97
|
+
.awsui_segment__path_1edmh_gci9o_97:not(#\9) {
|
|
98
|
+
transition: opacity var(--motion-duration-transition-quick-j01tkg, 90ms) var(--motion-easing-transition-quick-9ktw66, linear);
|
|
99
99
|
}
|
|
100
100
|
@media (prefers-reduced-motion: reduce) {
|
|
101
|
-
.
|
|
101
|
+
.awsui_segment__path_1edmh_gci9o_97:not(#\9) {
|
|
102
102
|
animation: none;
|
|
103
103
|
transition: none;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
.awsui-motion-disabled .
|
|
106
|
+
.awsui-motion-disabled .awsui_segment__path_1edmh_gci9o_97:not(#\9), .awsui-mode-entering .awsui_segment__path_1edmh_gci9o_97:not(#\9) {
|
|
107
107
|
animation: none;
|
|
108
108
|
transition: none;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.
|
|
112
|
-
transition: opacity var(--motion-duration-transition-quick-
|
|
111
|
+
.awsui_segment_1edmh_gci9o_97:not(#\9) {
|
|
112
|
+
transition: opacity var(--motion-duration-transition-quick-j01tkg, 90ms) var(--motion-easing-transition-quick-9ktw66, linear);
|
|
113
113
|
}
|
|
114
114
|
@media (prefers-reduced-motion: reduce) {
|
|
115
|
-
.
|
|
115
|
+
.awsui_segment_1edmh_gci9o_97:not(#\9) {
|
|
116
116
|
animation: none;
|
|
117
117
|
transition: none;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
.awsui-motion-disabled .
|
|
120
|
+
.awsui-motion-disabled .awsui_segment_1edmh_gci9o_97:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_gci9o_97:not(#\9) {
|
|
121
121
|
animation: none;
|
|
122
122
|
transition: none;
|
|
123
123
|
}
|
|
124
|
-
.
|
|
125
|
-
transition: opacity var(--motion-duration-transition-quick-
|
|
124
|
+
.awsui_segment_1edmh_gci9o_97 > .awsui_segment__hover_1edmh_gci9o_124:not(#\9) {
|
|
125
|
+
transition: opacity var(--motion-duration-transition-quick-j01tkg, 90ms) var(--motion-easing-transition-quick-9ktw66, linear);
|
|
126
126
|
}
|
|
127
127
|
@media (prefers-reduced-motion: reduce) {
|
|
128
|
-
.
|
|
128
|
+
.awsui_segment_1edmh_gci9o_97 > .awsui_segment__hover_1edmh_gci9o_124:not(#\9) {
|
|
129
129
|
animation: none;
|
|
130
130
|
transition: none;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
.awsui-motion-disabled .
|
|
133
|
+
.awsui-motion-disabled .awsui_segment_1edmh_gci9o_97 > .awsui_segment__hover_1edmh_gci9o_124:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_gci9o_97 > .awsui_segment__hover_1edmh_gci9o_124:not(#\9) {
|
|
134
134
|
animation: none;
|
|
135
135
|
transition: none;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.
|
|
139
|
-
transition: opacity var(--motion-duration-transition-quick-
|
|
138
|
+
.awsui_label_1edmh_gci9o_138:not(#\9) {
|
|
139
|
+
transition: opacity var(--motion-duration-transition-quick-j01tkg, 90ms) var(--motion-easing-transition-quick-9ktw66, linear);
|
|
140
140
|
}
|
|
141
141
|
@media (prefers-reduced-motion: reduce) {
|
|
142
|
-
.
|
|
142
|
+
.awsui_label_1edmh_gci9o_138:not(#\9) {
|
|
143
143
|
animation: none;
|
|
144
144
|
transition: none;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
.awsui-motion-disabled .
|
|
147
|
+
.awsui-motion-disabled .awsui_label_1edmh_gci9o_138:not(#\9), .awsui-mode-entering .awsui_label_1edmh_gci9o_138:not(#\9) {
|
|
148
148
|
animation: none;
|
|
149
149
|
transition: none;
|
|
150
150
|
}
|
|
@@ -153,50 +153,50 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
153
153
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
154
154
|
SPDX-License-Identifier: Apache-2.0
|
|
155
155
|
*/
|
|
156
|
-
.
|
|
156
|
+
.awsui_root_1edmh_gci9o_156:not(#\9) {
|
|
157
157
|
/* used in test-utils */
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.
|
|
161
|
-
min-height: calc(2 * (50px + var(--space-xs-
|
|
160
|
+
.awsui_content_1edmh_gci9o_160.awsui_content--small_1edmh_gci9o_160:not(#\9) {
|
|
161
|
+
min-height: calc(2 * (50px + var(--space-xs-xf5ch3, 8px) + calc(2 * var(--font-body-m-line-height-wmg6vk, 22px))));
|
|
162
162
|
}
|
|
163
|
-
.
|
|
164
|
-
min-height: calc(2 * (50px + var(--space-xs-
|
|
163
|
+
.awsui_content_1edmh_gci9o_160.awsui_content--small_1edmh_gci9o_160.awsui_content--without-labels_1edmh_gci9o_163:not(#\9) {
|
|
164
|
+
min-height: calc(2 * (50px + var(--space-xs-xf5ch3, 8px)));
|
|
165
165
|
}
|
|
166
|
-
.
|
|
167
|
-
min-height: calc(2 * (100px + var(--space-s-
|
|
166
|
+
.awsui_content_1edmh_gci9o_160.awsui_content--medium_1edmh_gci9o_166:not(#\9) {
|
|
167
|
+
min-height: calc(2 * (100px + var(--space-s-2025hl, 12px) + calc(2 * var(--font-body-m-line-height-wmg6vk, 22px))));
|
|
168
168
|
}
|
|
169
|
-
.
|
|
170
|
-
min-height: calc(2 * (100px + var(--space-s-
|
|
169
|
+
.awsui_content_1edmh_gci9o_160.awsui_content--medium_1edmh_gci9o_166.awsui_content--without-labels_1edmh_gci9o_163:not(#\9) {
|
|
170
|
+
min-height: calc(2 * (100px + var(--space-s-2025hl, 12px)));
|
|
171
171
|
}
|
|
172
|
-
.
|
|
173
|
-
min-height: calc(2 * (140px + var(--space-s-
|
|
172
|
+
.awsui_content_1edmh_gci9o_160.awsui_content--large_1edmh_gci9o_172:not(#\9) {
|
|
173
|
+
min-height: calc(2 * (140px + var(--space-s-2025hl, 12px) + calc(2 * var(--font-body-m-line-height-wmg6vk, 22px))));
|
|
174
174
|
}
|
|
175
|
-
.
|
|
176
|
-
min-height: calc(2 * (140px + var(--space-s-
|
|
175
|
+
.awsui_content_1edmh_gci9o_160.awsui_content--large_1edmh_gci9o_172.awsui_content--without-labels_1edmh_gci9o_163:not(#\9) {
|
|
176
|
+
min-height: calc(2 * (140px + var(--space-s-2025hl, 12px)));
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.awsui_content--fit-
|
|
179
|
+
.awsui_content--fit-height_1edmh_gci9o_179:not(#\9) {
|
|
180
180
|
flex: 1;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
.awsui_status-
|
|
183
|
+
.awsui_status-container_1edmh_gci9o_183:not(#\9) {
|
|
184
184
|
/* used in test utils */
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
.awsui_chart-
|
|
187
|
+
.awsui_chart-container_1edmh_gci9o_187:not(#\9) {
|
|
188
188
|
display: flex;
|
|
189
189
|
flex: 1;
|
|
190
190
|
}
|
|
191
|
-
.awsui_chart-container--fit-
|
|
191
|
+
.awsui_chart-container--fit-height_1edmh_gci9o_191:not(#\9) {
|
|
192
192
|
height: 100%;
|
|
193
193
|
min-height: inherit;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
.awsui_chart-container-chart-
|
|
196
|
+
.awsui_chart-container-chart-plot_1edmh_gci9o_196:not(#\9) {
|
|
197
197
|
display: contents;
|
|
198
198
|
}
|
|
199
|
-
.awsui_chart-container-chart-plot--fit-
|
|
199
|
+
.awsui_chart-container-chart-plot--fit-height_1edmh_gci9o_199:not(#\9) {
|
|
200
200
|
display: block;
|
|
201
201
|
position: absolute;
|
|
202
202
|
top: 0;
|
|
@@ -205,7 +205,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
205
205
|
left: 0;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.awsui_inner-
|
|
208
|
+
.awsui_inner-content_1edmh_gci9o_208:not(#\9) {
|
|
209
209
|
display: flex;
|
|
210
210
|
position: absolute;
|
|
211
211
|
flex-direction: column;
|
|
@@ -219,76 +219,76 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
219
219
|
pointer-events: none;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.
|
|
222
|
+
.awsui_segment__highlight_1edmh_gci9o_222:not(#\9) {
|
|
223
223
|
stroke: none;
|
|
224
224
|
opacity: 0;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
.
|
|
228
|
-
stroke: var(--color-background-container-content-
|
|
227
|
+
.awsui_segment_1edmh_gci9o_97:not(#\9) {
|
|
228
|
+
stroke: var(--color-background-container-content-il2pe5, #ffffff);
|
|
229
229
|
stroke-width: 2px;
|
|
230
230
|
stroke-linejoin: round;
|
|
231
231
|
opacity: 1;
|
|
232
232
|
cursor: pointer;
|
|
233
233
|
}
|
|
234
|
-
.
|
|
234
|
+
.awsui_segment_1edmh_gci9o_97:not(#\9):focus {
|
|
235
235
|
outline: none;
|
|
236
236
|
}
|
|
237
|
-
.
|
|
237
|
+
.awsui_segment_1edmh_gci9o_97.awsui_segment--dimmed_1edmh_gci9o_237:not(#\9) {
|
|
238
238
|
opacity: 0.35;
|
|
239
239
|
}
|
|
240
|
-
.
|
|
240
|
+
.awsui_segment_1edmh_gci9o_97.awsui_segment--highlighted_1edmh_gci9o_240 > .awsui_segment__highlight_1edmh_gci9o_222:not(#\9), .awsui_segment_1edmh_gci9o_97:not(#\9):hover:not(.awsui_segment--dimmed_1edmh_gci9o_237) > .awsui_segment__highlight_1edmh_gci9o_222 {
|
|
241
241
|
opacity: 1;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
.
|
|
245
|
-
color: var(--color-text-heading-default-
|
|
244
|
+
.awsui_label_1edmh_gci9o_138:not(#\9) {
|
|
245
|
+
color: var(--color-text-heading-default-q5s9rq, #16191f);
|
|
246
246
|
opacity: 1;
|
|
247
247
|
/* stylelint-disable-next-line selector-max-type */
|
|
248
248
|
/* stylelint-disable-next-line selector-max-type */
|
|
249
249
|
}
|
|
250
|
-
.
|
|
251
|
-
stroke: var(--color-stroke-chart-line-
|
|
252
|
-
stroke-width: var(--border-divider-section-width-
|
|
250
|
+
.awsui_label_1edmh_gci9o_138 > line:not(#\9) {
|
|
251
|
+
stroke: var(--color-stroke-chart-line-917j1w, #879596);
|
|
252
|
+
stroke-width: var(--border-divider-section-width-4ozgf3, 1px);
|
|
253
253
|
}
|
|
254
|
-
.
|
|
254
|
+
.awsui_label_1edmh_gci9o_138 > div:not(#\9) {
|
|
255
255
|
margin-top: -0.75em;
|
|
256
256
|
}
|
|
257
|
-
.
|
|
257
|
+
.awsui_label_1edmh_gci9o_138.awsui_label--dimmed_1edmh_gci9o_257:not(#\9) {
|
|
258
258
|
opacity: 0.35;
|
|
259
259
|
}
|
|
260
|
-
.
|
|
260
|
+
.awsui_label_1edmh_gci9o_138.awsui_label--align-right_1edmh_gci9o_260:not(#\9) {
|
|
261
261
|
/* stylelint-disable-next-line selector-max-type */
|
|
262
262
|
}
|
|
263
|
-
.
|
|
263
|
+
.awsui_label_1edmh_gci9o_138.awsui_label--align-right_1edmh_gci9o_260 > div:not(#\9) {
|
|
264
264
|
text-align: right;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
/* stylelint-disable-next-line selector-max-type */
|
|
268
|
-
.awsui_label-
|
|
269
|
-
font-size: var(--font-body-m-size-
|
|
270
|
-
line-height: var(--font-body-m-line-height-
|
|
271
|
-
font-weight: var(--font-display-label-weight-
|
|
272
|
-
fill: var(--color-text-heading-default-
|
|
268
|
+
.awsui_label-text_1edmh_gci9o_268 > text:not(#\9) {
|
|
269
|
+
font-size: var(--font-body-m-size-bf8hby, 14px);
|
|
270
|
+
line-height: var(--font-body-m-line-height-wmg6vk, 22px);
|
|
271
|
+
font-weight: var(--font-display-label-weight-2njs7q, 400);
|
|
272
|
+
fill: var(--color-text-heading-default-q5s9rq, #16191f);
|
|
273
273
|
dominant-baseline: middle;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
text.
|
|
277
|
-
font-size: var(--font-chart-detail-size-
|
|
276
|
+
text.awsui_label__description_1edmh_gci9o_276:not(#\9) {
|
|
277
|
+
font-size: var(--font-chart-detail-size-pob89f, 14px);
|
|
278
278
|
font-weight: 400;
|
|
279
|
-
color: var(--color-text-group-label-
|
|
280
|
-
fill: var(--color-text-group-label-
|
|
279
|
+
color: var(--color-text-group-label-7crvc9, #545b64);
|
|
280
|
+
fill: var(--color-text-group-label-7crvc9, #545b64);
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.awsui_label-
|
|
283
|
+
.awsui_label-line_1edmh_gci9o_283:not(#\9) {
|
|
284
284
|
/* used in component code */
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
.awsui_label--
|
|
287
|
+
.awsui_label--highlighted_1edmh_gci9o_287:not(#\9) {
|
|
288
288
|
/* used in test-utils */
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.awsui_popover-
|
|
291
|
+
.awsui_popover-header_1edmh_gci9o_291:not(#\9) {
|
|
292
292
|
display: inline-flex;
|
|
293
293
|
align-items: flex-start;
|
|
294
294
|
}
|
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"segment__path": "
|
|
6
|
-
"segment": "
|
|
7
|
-
"segment__hover": "
|
|
8
|
-
"label": "
|
|
9
|
-
"root": "
|
|
10
|
-
"content": "
|
|
11
|
-
"content--small": "awsui_content--
|
|
12
|
-
"content--without-labels": "awsui_content--without-
|
|
13
|
-
"content--medium": "awsui_content--
|
|
14
|
-
"content--large": "awsui_content--
|
|
15
|
-
"content--fit-height": "awsui_content--fit-
|
|
16
|
-
"status-container": "awsui_status-
|
|
17
|
-
"chart-container": "awsui_chart-
|
|
18
|
-
"chart-container--fit-height": "awsui_chart-container--fit-
|
|
19
|
-
"chart-container-chart-plot": "awsui_chart-container-chart-
|
|
20
|
-
"chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-
|
|
21
|
-
"inner-content": "awsui_inner-
|
|
22
|
-
"segment__highlight": "
|
|
23
|
-
"segment--dimmed": "awsui_segment--
|
|
24
|
-
"segment--highlighted": "awsui_segment--
|
|
25
|
-
"label--dimmed": "awsui_label--
|
|
26
|
-
"label--align-right": "awsui_label--align-
|
|
27
|
-
"label-text": "awsui_label-
|
|
28
|
-
"label__description": "
|
|
29
|
-
"label-line": "awsui_label-
|
|
30
|
-
"label--highlighted": "awsui_label--
|
|
31
|
-
"popover-header": "awsui_popover-
|
|
5
|
+
"segment__path": "awsui_segment__path_1edmh_gci9o_97",
|
|
6
|
+
"segment": "awsui_segment_1edmh_gci9o_97",
|
|
7
|
+
"segment__hover": "awsui_segment__hover_1edmh_gci9o_124",
|
|
8
|
+
"label": "awsui_label_1edmh_gci9o_138",
|
|
9
|
+
"root": "awsui_root_1edmh_gci9o_156",
|
|
10
|
+
"content": "awsui_content_1edmh_gci9o_160",
|
|
11
|
+
"content--small": "awsui_content--small_1edmh_gci9o_160",
|
|
12
|
+
"content--without-labels": "awsui_content--without-labels_1edmh_gci9o_163",
|
|
13
|
+
"content--medium": "awsui_content--medium_1edmh_gci9o_166",
|
|
14
|
+
"content--large": "awsui_content--large_1edmh_gci9o_172",
|
|
15
|
+
"content--fit-height": "awsui_content--fit-height_1edmh_gci9o_179",
|
|
16
|
+
"status-container": "awsui_status-container_1edmh_gci9o_183",
|
|
17
|
+
"chart-container": "awsui_chart-container_1edmh_gci9o_187",
|
|
18
|
+
"chart-container--fit-height": "awsui_chart-container--fit-height_1edmh_gci9o_191",
|
|
19
|
+
"chart-container-chart-plot": "awsui_chart-container-chart-plot_1edmh_gci9o_196",
|
|
20
|
+
"chart-container-chart-plot--fit-height": "awsui_chart-container-chart-plot--fit-height_1edmh_gci9o_199",
|
|
21
|
+
"inner-content": "awsui_inner-content_1edmh_gci9o_208",
|
|
22
|
+
"segment__highlight": "awsui_segment__highlight_1edmh_gci9o_222",
|
|
23
|
+
"segment--dimmed": "awsui_segment--dimmed_1edmh_gci9o_237",
|
|
24
|
+
"segment--highlighted": "awsui_segment--highlighted_1edmh_gci9o_240",
|
|
25
|
+
"label--dimmed": "awsui_label--dimmed_1edmh_gci9o_257",
|
|
26
|
+
"label--align-right": "awsui_label--align-right_1edmh_gci9o_260",
|
|
27
|
+
"label-text": "awsui_label-text_1edmh_gci9o_268",
|
|
28
|
+
"label__description": "awsui_label__description_1edmh_gci9o_276",
|
|
29
|
+
"label-line": "awsui_label-line_1edmh_gci9o_283",
|
|
30
|
+
"label--highlighted": "awsui_label--highlighted_1edmh_gci9o_287",
|
|
31
|
+
"popover-header": "awsui_popover-header_1edmh_gci9o_291"
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"lib/default/","sources":["popover/container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"lib/default/","sources":["popover/container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAAkB,gBAAgB,EAAU,YAAY,EAAE,MAAM,cAAc,CAAC;AAKtF,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACnC;;;;;;;;MAQE;IACF,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC;IAChC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,KAAK,EAAE,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,OAAO,GACR,EAAE,qBAAqB,eAqKvB"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React, { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import {
|
|
5
|
+
import { nodeContains } from '@cloudscape-design/component-toolkit/dom';
|
|
6
|
+
import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
|
|
7
|
+
import { getContainingBlock } from '../internal/utils/dom';
|
|
6
8
|
import { calculatePosition } from './utils/positions';
|
|
7
9
|
import styles from './styles.css.js';
|
|
8
10
|
import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
9
|
-
import { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';
|
|
10
11
|
const INITIAL_STYLES = { position: 'absolute', top: -9999, left: -9999 };
|
|
11
12
|
export default function PopoverContainer({ position, trackRef, trackKey, arrow, children, zIndex, renderWithPortal, size, fixedWidth, variant, }) {
|
|
12
13
|
const bodyRef = useRef(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"lib/default/","sources":["popover/container.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAyBlF,MAAM,cAAc,GAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,IAAI,EACJ,UAAU,EACV,OAAO,GACe;IACtB,MAAM,OAAO,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,MA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AAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,qBAAqB,EAAE,CAAC;IACvE,OAAO;QACL,GAAG;QACH,IAAI;QACJ,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,WAAW;QAC3C,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,YAAY;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { CSSProperties, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { getContainingBlock, nodeContains } from '../internal/utils/dom';\nimport { BoundingOffset, InternalPosition, Offset, PopoverProps } from './interfaces';\nimport { calculatePosition } from './utils/positions';\nimport styles from './styles.css.js';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nexport interface PopoverContainerProps {\n /** References the element the container is positioned against. */\n trackRef: React.RefObject<Element>;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n position: PopoverProps.Position;\n zIndex?: React.CSSProperties['zIndex'];\n arrow: (position: InternalPosition | null) => React.ReactNode;\n children: React.ReactNode;\n renderWithPortal?: boolean;\n size: PopoverProps.Size;\n fixedWidth: boolean;\n variant?: 'annotation';\n}\n\nconst INITIAL_STYLES: CSSProperties = { position: 'absolute', top: -9999, left: -9999 };\n\nexport default function PopoverContainer({\n position,\n trackRef,\n trackKey,\n arrow,\n children,\n zIndex,\n renderWithPortal,\n size,\n fixedWidth,\n variant,\n}: PopoverContainerProps) {\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const [popoverStyle, setPopoverStyle] = useState<CSSProperties>(INITIAL_STYLES);\n const [internalPosition, setInternalPosition] = useState<InternalPosition | null>(null);\n const isRefresh = useVisualRefresh();\n\n // Store the handler in a ref so that it can still be replaced from outside of the listener closure.\n const positionHandlerRef = useRef<() => void>(() => {});\n\n // Updates the position handler.\n const updatePositionHandler = useCallback(() => {\n if (!trackRef.current || !popoverRef.current || !bodyRef.current || !contentRef.current || !arrowRef.current) {\n return;\n }\n\n // Get important elements\n const popover = popoverRef.current;\n const body = bodyRef.current;\n const arrow = arrowRef.current;\n const document = popover.ownerDocument;\n const track = trackRef.current;\n\n // If the popover body isn't being rendered for whatever reason (e.g. \"display: none\" or JSDOM),\n // or track does not belong to the document - bail on calculating dimensions.\n if (popover.offsetWidth === 0 || popover.offsetHeight === 0 || !nodeContains(document.body, track)) {\n return;\n }\n\n // Imperatively move body off-screen to give it room to expand.\n // Not doing this in React because this recalculation should happen\n // in the span of a single frame without rerendering anything.\n const prevTop = popover.style.top;\n const prevLeft = popover.style.left;\n popover.style.top = '0';\n popover.style.left = '0';\n // Imperatively remove body styles that can remain from the previous computation.\n body.style.maxHeight = '';\n body.style.overflowX = '';\n body.style.overflowY = '';\n\n // Get rects representing key elements\n // Use getComputedStyle for arrowRect to avoid modifications made by transform\n const viewportRect = getViewportRect(document.defaultView!);\n const trackRect = track.getBoundingClientRect();\n const arrowRect = {\n width: parseFloat(getComputedStyle(arrow).width),\n height: parseFloat(getComputedStyle(arrow).height),\n };\n const containingBlock = getContainingBlock(popover);\n const containingBlockRect = containingBlock ? containingBlock.getBoundingClientRect() : viewportRect;\n\n const bodyBorderWidth = getBorderWidth(body);\n const contentRect = contentRef.current.getBoundingClientRect();\n const contentBoundingBox = {\n width: contentRect.width + 2 * bodyBorderWidth,\n height: contentRect.height + 2 * bodyBorderWidth,\n };\n\n // Calculate the arrow direction and viewport-relative position of the popover.\n const {\n scrollable,\n internalPosition: newInternalPosition,\n boundingOffset,\n } = calculatePosition(\n position,\n trackRect,\n arrowRect,\n contentBoundingBox,\n containingBlock ? containingBlockRect : getDocumentRect(document),\n viewportRect,\n renderWithPortal\n );\n\n // Get the position of the popover relative to the offset parent.\n const popoverOffset = toRelativePosition(boundingOffset, containingBlockRect);\n\n // Cache the distance between the trigger and the popover (which stays the same as you scroll),\n // and use that to recalculate the new popover position.\n const trackRelativeOffset = toRelativePosition(popoverOffset, toRelativePosition(trackRect, containingBlockRect));\n\n // Bring back the container to its original position to prevent any flashing.\n popover.style.top = prevTop;\n popover.style.left = prevLeft;\n\n // Allow popover body to scroll if can't fit the popover into the container/viewport otherwise.\n if (scrollable) {\n body.style.maxHeight = boundingOffset.height + 'px';\n body.style.overflowX = 'hidden';\n body.style.overflowY = 'auto';\n }\n\n // Position the popover\n setInternalPosition(newInternalPosition);\n setPopoverStyle({ top: popoverOffset.top, left: popoverOffset.left });\n\n positionHandlerRef.current = () => {\n const newTrackOffset = toRelativePosition(\n track.getBoundingClientRect(),\n containingBlock ? containingBlock.getBoundingClientRect() : viewportRect\n );\n setPopoverStyle({\n top: newTrackOffset.top + trackRelativeOffset.top,\n left: newTrackOffset.left + trackRelativeOffset.left,\n });\n };\n }, [position, trackRef, renderWithPortal]);\n\n // Recalculate position when properties change.\n useLayoutEffect(() => {\n updatePositionHandler();\n }, [updatePositionHandler, trackKey]);\n\n // Recalculate position when content size changes.\n useResizeObserver(contentRef, () => updatePositionHandler());\n\n // Recalculate position on DOM events.\n useLayoutEffect(() => {\n /*\n This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),\n and by tracking the click event we can adapt the popover's position to the new layout.\n\n TODO: extend this to Enter and Spacebar?\n */\n const updatePosition = () => requestAnimationFrame(() => updatePositionHandler());\n const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());\n\n window.addEventListener('click', updatePosition);\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', refreshPosition, true);\n return () => {\n window.removeEventListener('click', updatePosition);\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', refreshPosition, true);\n };\n }, [updatePositionHandler]);\n\n return (\n <div\n ref={popoverRef}\n style={{ ...popoverStyle, zIndex }}\n className={clsx(styles.container, isRefresh && styles.refresh)}\n >\n <div\n ref={arrowRef}\n className={clsx(styles[`container-arrow`], styles[`container-arrow-position-${internalPosition}`])}\n aria-hidden={true}\n >\n {arrow(internalPosition)}\n </div>\n\n <div\n ref={bodyRef}\n className={clsx(styles['container-body'], styles[`container-body-size-${size}`], {\n [styles['fixed-width']]: fixedWidth,\n [styles[`container-body-variant-${variant}`]]: variant,\n })}\n >\n <div ref={contentRef}>{children}</div>\n </div>\n </div>\n );\n}\n\nfunction getBorderWidth(element: HTMLElement) {\n return parseInt(getComputedStyle(element).borderWidth) || 0;\n}\n\n/**\n * Convert a viewport-relative offset to an element-relative offset.\n */\nfunction toRelativePosition(element: Offset, parent: Offset): Offset {\n return {\n top: element.top - parent.top,\n left: element.left - parent.left,\n };\n}\n\n/**\n * Get a BoundingOffset that represents the visible viewport.\n */\nfunction getViewportRect(window: Window): BoundingOffset {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n };\n}\n\nfunction getDocumentRect(document: Document): BoundingOffset {\n const { top, left } = document.documentElement.getBoundingClientRect();\n return {\n top,\n left,\n width: document.documentElement.scrollWidth,\n height: document.documentElement.scrollHeight,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"lib/default/","sources":["popover/container.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE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,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,OAAoB;IAC1C,OAAO,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,OAAe,EAAE,MAAc;IACzD,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG;QAC7B,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI;KACjC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO;QACL,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM,CAAC,UAAU;QACxB,MAAM,EAAE,MAAM,CAAC,WAAW;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,eAAe,CAAC,QAAkB;IACzC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC,qBAAqB,EAAE,CAAC;IACvE,OAAO;QACL,GAAG;QACH,IAAI;QACJ,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,WAAW;QAC3C,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,YAAY;KAC9C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { CSSProperties, useCallback, useLayoutEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { nodeContains } from '@cloudscape-design/component-toolkit/dom';\nimport { useResizeObserver } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getContainingBlock } from '../internal/utils/dom';\nimport { BoundingOffset, InternalPosition, Offset, PopoverProps } from './interfaces';\nimport { calculatePosition } from './utils/positions';\nimport styles from './styles.css.js';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\n\nexport interface PopoverContainerProps {\n /** References the element the container is positioned against. */\n trackRef: React.RefObject<Element>;\n /**\n Used to update the container position in case track or track position changes:\n \n const trackRef = useRef<Element>(null)\n return (<>\n <Track style={getPosition(selectedItemId)} ref={trackRef} />\n <PopoverContainer trackRef={trackRef} trackKey={selectedItemId} .../>\n </>)\n */\n trackKey?: string | number;\n position: PopoverProps.Position;\n zIndex?: React.CSSProperties['zIndex'];\n arrow: (position: InternalPosition | null) => React.ReactNode;\n children: React.ReactNode;\n renderWithPortal?: boolean;\n size: PopoverProps.Size;\n fixedWidth: boolean;\n variant?: 'annotation';\n}\n\nconst INITIAL_STYLES: CSSProperties = { position: 'absolute', top: -9999, left: -9999 };\n\nexport default function PopoverContainer({\n position,\n trackRef,\n trackKey,\n arrow,\n children,\n zIndex,\n renderWithPortal,\n size,\n fixedWidth,\n variant,\n}: PopoverContainerProps) {\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n const popoverRef = useRef<HTMLDivElement | null>(null);\n const arrowRef = useRef<HTMLDivElement | null>(null);\n\n const [popoverStyle, setPopoverStyle] = useState<CSSProperties>(INITIAL_STYLES);\n const [internalPosition, setInternalPosition] = useState<InternalPosition | null>(null);\n const isRefresh = useVisualRefresh();\n\n // Store the handler in a ref so that it can still be replaced from outside of the listener closure.\n const positionHandlerRef = useRef<() => void>(() => {});\n\n // Updates the position handler.\n const updatePositionHandler = useCallback(() => {\n if (!trackRef.current || !popoverRef.current || !bodyRef.current || !contentRef.current || !arrowRef.current) {\n return;\n }\n\n // Get important elements\n const popover = popoverRef.current;\n const body = bodyRef.current;\n const arrow = arrowRef.current;\n const document = popover.ownerDocument;\n const track = trackRef.current;\n\n // If the popover body isn't being rendered for whatever reason (e.g. \"display: none\" or JSDOM),\n // or track does not belong to the document - bail on calculating dimensions.\n if (popover.offsetWidth === 0 || popover.offsetHeight === 0 || !nodeContains(document.body, track)) {\n return;\n }\n\n // Imperatively move body off-screen to give it room to expand.\n // Not doing this in React because this recalculation should happen\n // in the span of a single frame without rerendering anything.\n const prevTop = popover.style.top;\n const prevLeft = popover.style.left;\n popover.style.top = '0';\n popover.style.left = '0';\n // Imperatively remove body styles that can remain from the previous computation.\n body.style.maxHeight = '';\n body.style.overflowX = '';\n body.style.overflowY = '';\n\n // Get rects representing key elements\n // Use getComputedStyle for arrowRect to avoid modifications made by transform\n const viewportRect = getViewportRect(document.defaultView!);\n const trackRect = track.getBoundingClientRect();\n const arrowRect = {\n width: parseFloat(getComputedStyle(arrow).width),\n height: parseFloat(getComputedStyle(arrow).height),\n };\n const containingBlock = getContainingBlock(popover);\n const containingBlockRect = containingBlock ? containingBlock.getBoundingClientRect() : viewportRect;\n\n const bodyBorderWidth = getBorderWidth(body);\n const contentRect = contentRef.current.getBoundingClientRect();\n const contentBoundingBox = {\n width: contentRect.width + 2 * bodyBorderWidth,\n height: contentRect.height + 2 * bodyBorderWidth,\n };\n\n // Calculate the arrow direction and viewport-relative position of the popover.\n const {\n scrollable,\n internalPosition: newInternalPosition,\n boundingOffset,\n } = calculatePosition(\n position,\n trackRect,\n arrowRect,\n contentBoundingBox,\n containingBlock ? containingBlockRect : getDocumentRect(document),\n viewportRect,\n renderWithPortal\n );\n\n // Get the position of the popover relative to the offset parent.\n const popoverOffset = toRelativePosition(boundingOffset, containingBlockRect);\n\n // Cache the distance between the trigger and the popover (which stays the same as you scroll),\n // and use that to recalculate the new popover position.\n const trackRelativeOffset = toRelativePosition(popoverOffset, toRelativePosition(trackRect, containingBlockRect));\n\n // Bring back the container to its original position to prevent any flashing.\n popover.style.top = prevTop;\n popover.style.left = prevLeft;\n\n // Allow popover body to scroll if can't fit the popover into the container/viewport otherwise.\n if (scrollable) {\n body.style.maxHeight = boundingOffset.height + 'px';\n body.style.overflowX = 'hidden';\n body.style.overflowY = 'auto';\n }\n\n // Position the popover\n setInternalPosition(newInternalPosition);\n setPopoverStyle({ top: popoverOffset.top, left: popoverOffset.left });\n\n positionHandlerRef.current = () => {\n const newTrackOffset = toRelativePosition(\n track.getBoundingClientRect(),\n containingBlock ? containingBlock.getBoundingClientRect() : viewportRect\n );\n setPopoverStyle({\n top: newTrackOffset.top + trackRelativeOffset.top,\n left: newTrackOffset.left + trackRelativeOffset.left,\n });\n };\n }, [position, trackRef, renderWithPortal]);\n\n // Recalculate position when properties change.\n useLayoutEffect(() => {\n updatePositionHandler();\n }, [updatePositionHandler, trackKey]);\n\n // Recalculate position when content size changes.\n useResizeObserver(contentRef, () => updatePositionHandler());\n\n // Recalculate position on DOM events.\n useLayoutEffect(() => {\n /*\n This is a heuristic. Some layout changes are caused by user clicks (e.g. toggling the tools panel, submitting a form),\n and by tracking the click event we can adapt the popover's position to the new layout.\n\n TODO: extend this to Enter and Spacebar?\n */\n const updatePosition = () => requestAnimationFrame(() => updatePositionHandler());\n const refreshPosition = () => requestAnimationFrame(() => positionHandlerRef.current());\n\n window.addEventListener('click', updatePosition);\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', refreshPosition, true);\n return () => {\n window.removeEventListener('click', updatePosition);\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', refreshPosition, true);\n };\n }, [updatePositionHandler]);\n\n return (\n <div\n ref={popoverRef}\n style={{ ...popoverStyle, zIndex }}\n className={clsx(styles.container, isRefresh && styles.refresh)}\n >\n <div\n ref={arrowRef}\n className={clsx(styles[`container-arrow`], styles[`container-arrow-position-${internalPosition}`])}\n aria-hidden={true}\n >\n {arrow(internalPosition)}\n </div>\n\n <div\n ref={bodyRef}\n className={clsx(styles['container-body'], styles[`container-body-size-${size}`], {\n [styles['fixed-width']]: fixedWidth,\n [styles[`container-body-variant-${variant}`]]: variant,\n })}\n >\n <div ref={contentRef}>{children}</div>\n </div>\n </div>\n );\n}\n\nfunction getBorderWidth(element: HTMLElement) {\n return parseInt(getComputedStyle(element).borderWidth) || 0;\n}\n\n/**\n * Convert a viewport-relative offset to an element-relative offset.\n */\nfunction toRelativePosition(element: Offset, parent: Offset): Offset {\n return {\n top: element.top - parent.top,\n left: element.left - parent.left,\n };\n}\n\n/**\n * Get a BoundingOffset that represents the visible viewport.\n */\nfunction getViewportRect(window: Window): BoundingOffset {\n return {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n };\n}\n\nfunction getDocumentRect(document: Document): BoundingOffset {\n const { top, left } = document.documentElement.getBoundingClientRect();\n return {\n top,\n left,\n width: document.documentElement.scrollWidth,\n height: document.documentElement.scrollHeight,\n };\n}\n"]}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"arrow": "
|
|
5
|
-
"arrow-outer": "awsui_arrow-
|
|
6
|
-
"arrow-inner": "awsui_arrow-
|
|
7
|
-
"arrow-position-right-top": "awsui_arrow-position-right-
|
|
8
|
-
"arrow-position-right-bottom": "awsui_arrow-position-right-
|
|
9
|
-
"arrow-position-left-top": "awsui_arrow-position-left-
|
|
10
|
-
"arrow-position-left-bottom": "awsui_arrow-position-left-
|
|
11
|
-
"arrow-position-top-center": "awsui_arrow-position-top-
|
|
12
|
-
"arrow-position-top-right": "awsui_arrow-position-top-
|
|
13
|
-
"arrow-position-top-left": "awsui_arrow-position-top-
|
|
14
|
-
"arrow-position-top-responsive": "awsui_arrow-position-top-
|
|
15
|
-
"arrow-position-bottom-center": "awsui_arrow-position-bottom-
|
|
16
|
-
"arrow-position-bottom-right": "awsui_arrow-position-bottom-
|
|
17
|
-
"arrow-position-bottom-left": "awsui_arrow-position-bottom-
|
|
18
|
-
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-
|
|
19
|
-
"body": "
|
|
20
|
-
"body-overflow-visible": "awsui_body-overflow-
|
|
21
|
-
"has-dismiss": "awsui_has-
|
|
22
|
-
"dismiss": "
|
|
23
|
-
"dismiss-control": "awsui_dismiss-
|
|
24
|
-
"header-row": "awsui_header-
|
|
25
|
-
"header": "
|
|
26
|
-
"content": "
|
|
27
|
-
"content-overflow-visible": "awsui_content-overflow-
|
|
28
|
-
"container": "
|
|
29
|
-
"container-body": "awsui_container-
|
|
30
|
-
"container-body-variant-annotation": "awsui_container-body-variant-
|
|
31
|
-
"container-body-size-small": "awsui_container-body-size-
|
|
32
|
-
"fixed-width": "awsui_fixed-
|
|
33
|
-
"container-body-size-medium": "awsui_container-body-size-
|
|
34
|
-
"container-body-size-large": "awsui_container-body-size-
|
|
35
|
-
"container-arrow": "awsui_container-
|
|
36
|
-
"container-arrow-position-right-top": "awsui_container-arrow-position-right-
|
|
37
|
-
"container-arrow-position-right-bottom": "awsui_container-arrow-position-right-
|
|
38
|
-
"container-arrow-position-left-top": "awsui_container-arrow-position-left-
|
|
39
|
-
"container-arrow-position-left-bottom": "awsui_container-arrow-position-left-
|
|
40
|
-
"container-arrow-position-top-center": "awsui_container-arrow-position-top-
|
|
41
|
-
"container-arrow-position-top-right": "awsui_container-arrow-position-top-
|
|
42
|
-
"container-arrow-position-top-left": "awsui_container-arrow-position-top-
|
|
43
|
-
"container-arrow-position-top-responsive": "awsui_container-arrow-position-top-
|
|
44
|
-
"container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-
|
|
45
|
-
"container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-
|
|
46
|
-
"container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-
|
|
47
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
48
|
-
"refresh": "
|
|
49
|
-
"root": "
|
|
50
|
-
"trigger": "
|
|
51
|
-
"trigger-type-text": "awsui_trigger-type-
|
|
52
|
-
"trigger-inner-text": "awsui_trigger-inner-
|
|
53
|
-
"popover-content": "awsui_popover-
|
|
4
|
+
"arrow": "awsui_arrow_xjuzf_1xm3f_185",
|
|
5
|
+
"arrow-outer": "awsui_arrow-outer_xjuzf_1xm3f_189",
|
|
6
|
+
"arrow-inner": "awsui_arrow-inner_xjuzf_1xm3f_189",
|
|
7
|
+
"arrow-position-right-top": "awsui_arrow-position-right-top_xjuzf_1xm3f_220",
|
|
8
|
+
"arrow-position-right-bottom": "awsui_arrow-position-right-bottom_xjuzf_1xm3f_220",
|
|
9
|
+
"arrow-position-left-top": "awsui_arrow-position-left-top_xjuzf_1xm3f_223",
|
|
10
|
+
"arrow-position-left-bottom": "awsui_arrow-position-left-bottom_xjuzf_1xm3f_223",
|
|
11
|
+
"arrow-position-top-center": "awsui_arrow-position-top-center_xjuzf_1xm3f_226",
|
|
12
|
+
"arrow-position-top-right": "awsui_arrow-position-top-right_xjuzf_1xm3f_226",
|
|
13
|
+
"arrow-position-top-left": "awsui_arrow-position-top-left_xjuzf_1xm3f_226",
|
|
14
|
+
"arrow-position-top-responsive": "awsui_arrow-position-top-responsive_xjuzf_1xm3f_226",
|
|
15
|
+
"arrow-position-bottom-center": "awsui_arrow-position-bottom-center_xjuzf_1xm3f_229",
|
|
16
|
+
"arrow-position-bottom-right": "awsui_arrow-position-bottom-right_xjuzf_1xm3f_229",
|
|
17
|
+
"arrow-position-bottom-left": "awsui_arrow-position-bottom-left_xjuzf_1xm3f_229",
|
|
18
|
+
"arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_xjuzf_1xm3f_229",
|
|
19
|
+
"body": "awsui_body_xjuzf_1xm3f_325",
|
|
20
|
+
"body-overflow-visible": "awsui_body-overflow-visible_xjuzf_1xm3f_341",
|
|
21
|
+
"has-dismiss": "awsui_has-dismiss_xjuzf_1xm3f_345",
|
|
22
|
+
"dismiss": "awsui_dismiss_xjuzf_1xm3f_350",
|
|
23
|
+
"dismiss-control": "awsui_dismiss-control_xjuzf_1xm3f_357",
|
|
24
|
+
"header-row": "awsui_header-row_xjuzf_1xm3f_361",
|
|
25
|
+
"header": "awsui_header_xjuzf_1xm3f_361",
|
|
26
|
+
"content": "awsui_content_xjuzf_1xm3f_387",
|
|
27
|
+
"content-overflow-visible": "awsui_content-overflow-visible_xjuzf_1xm3f_395",
|
|
28
|
+
"container": "awsui_container_xjuzf_1xm3f_491",
|
|
29
|
+
"container-body": "awsui_container-body_xjuzf_1xm3f_499",
|
|
30
|
+
"container-body-variant-annotation": "awsui_container-body-variant-annotation_xjuzf_1xm3f_516",
|
|
31
|
+
"container-body-size-small": "awsui_container-body-size-small_xjuzf_1xm3f_521",
|
|
32
|
+
"fixed-width": "awsui_fixed-width_xjuzf_1xm3f_524",
|
|
33
|
+
"container-body-size-medium": "awsui_container-body-size-medium_xjuzf_1xm3f_528",
|
|
34
|
+
"container-body-size-large": "awsui_container-body-size-large_xjuzf_1xm3f_535",
|
|
35
|
+
"container-arrow": "awsui_container-arrow_xjuzf_1xm3f_547",
|
|
36
|
+
"container-arrow-position-right-top": "awsui_container-arrow-position-right-top_xjuzf_1xm3f_551",
|
|
37
|
+
"container-arrow-position-right-bottom": "awsui_container-arrow-position-right-bottom_xjuzf_1xm3f_551",
|
|
38
|
+
"container-arrow-position-left-top": "awsui_container-arrow-position-left-top_xjuzf_1xm3f_563",
|
|
39
|
+
"container-arrow-position-left-bottom": "awsui_container-arrow-position-left-bottom_xjuzf_1xm3f_563",
|
|
40
|
+
"container-arrow-position-top-center": "awsui_container-arrow-position-top-center_xjuzf_1xm3f_575",
|
|
41
|
+
"container-arrow-position-top-right": "awsui_container-arrow-position-top-right_xjuzf_1xm3f_575",
|
|
42
|
+
"container-arrow-position-top-left": "awsui_container-arrow-position-top-left_xjuzf_1xm3f_575",
|
|
43
|
+
"container-arrow-position-top-responsive": "awsui_container-arrow-position-top-responsive_xjuzf_1xm3f_575",
|
|
44
|
+
"container-arrow-position-bottom-center": "awsui_container-arrow-position-bottom-center_xjuzf_1xm3f_591",
|
|
45
|
+
"container-arrow-position-bottom-right": "awsui_container-arrow-position-bottom-right_xjuzf_1xm3f_595",
|
|
46
|
+
"container-arrow-position-bottom-left": "awsui_container-arrow-position-bottom-left_xjuzf_1xm3f_599",
|
|
47
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_xjuzf_1xm3f_1",
|
|
48
|
+
"refresh": "awsui_refresh_xjuzf_1xm3f_717",
|
|
49
|
+
"root": "awsui_root_xjuzf_1xm3f_739",
|
|
50
|
+
"trigger": "awsui_trigger_xjuzf_1xm3f_753",
|
|
51
|
+
"trigger-type-text": "awsui_trigger-type-text_xjuzf_1xm3f_760",
|
|
52
|
+
"trigger-inner-text": "awsui_trigger-inner-text_xjuzf_1xm3f_789",
|
|
53
|
+
"popover-content": "awsui_popover-content_xjuzf_1xm3f_793"
|
|
54
54
|
};
|
|
55
55
|
|