@cloudscape-design/components 3.0.193 → 3.0.195
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 +19 -19
- package/alert/styles.scoped.css +33 -33
- package/alert/styles.selectors.js +19 -19
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +32 -32
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/content-wrapper/styles.css.js +3 -3
- package/app-layout/content-wrapper/styles.scoped.css +8 -8
- package/app-layout/content-wrapper/styles.selectors.js +3 -3
- package/app-layout/mobile-toolbar/styles.css.js +4 -4
- package/app-layout/mobile-toolbar/styles.scoped.css +9 -9
- package/app-layout/mobile-toolbar/styles.selectors.js +4 -4
- package/app-layout/notifications/styles.css.js +1 -1
- package/app-layout/notifications/styles.scoped.css +2 -1
- package/app-layout/notifications/styles.selectors.js +1 -1
- package/app-layout/styles.css.js +26 -26
- package/app-layout/styles.scoped.css +35 -35
- package/app-layout/styles.selectors.js +26 -26
- package/app-layout/toggles/styles.css.js +1 -1
- package/app-layout/toggles/styles.scoped.css +3 -3
- package/app-layout/toggles/styles.selectors.js +1 -1
- package/app-layout/visual-refresh/styles.css.js +60 -60
- package/app-layout/visual-refresh/styles.scoped.css +225 -224
- package/app-layout/visual-refresh/styles.selectors.js +60 -60
- package/area-chart/styles.css.js +13 -13
- package/area-chart/styles.scoped.css +18 -18
- package/area-chart/styles.selectors.js +13 -13
- package/attribute-editor/interfaces.d.ts +1 -0
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +17 -2
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/styles.css.js +14 -14
- package/attribute-editor/styles.scoped.css +26 -26
- package/attribute-editor/styles.selectors.js +14 -14
- package/badge/styles.css.js +5 -5
- package/badge/styles.scoped.css +7 -7
- package/badge/styles.selectors.js +5 -5
- package/box/styles.css.js +189 -189
- package/box/styles.scoped.css +240 -240
- package/box/styles.selectors.js +189 -189
- package/breadcrumb-group/item/styles.css.js +9 -9
- package/breadcrumb-group/item/styles.scoped.css +19 -19
- package/breadcrumb-group/item/styles.selectors.js +9 -9
- package/breadcrumb-group/styles.css.js +6 -6
- package/breadcrumb-group/styles.scoped.css +13 -13
- package/breadcrumb-group/styles.selectors.js +6 -6
- package/button/styles.css.js +18 -18
- package/button/styles.scoped.css +138 -138
- package/button/styles.selectors.js +18 -18
- package/button-dropdown/category-elements/styles.css.js +13 -13
- package/button-dropdown/category-elements/styles.scoped.css +25 -25
- package/button-dropdown/category-elements/styles.selectors.js +13 -13
- package/button-dropdown/item-element/styles.css.js +14 -14
- package/button-dropdown/item-element/styles.scoped.css +20 -20
- package/button-dropdown/item-element/styles.selectors.js +14 -14
- package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +7 -7
- package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/button-dropdown/styles.css.js +8 -8
- package/button-dropdown/styles.scoped.css +16 -16
- package/button-dropdown/styles.selectors.js +8 -8
- package/calendar/styles.css.js +18 -18
- package/calendar/styles.scoped.css +40 -40
- package/calendar/styles.selectors.js +18 -18
- package/cards/styles.css.js +37 -37
- package/cards/styles.scoped.css +122 -57
- package/cards/styles.selectors.js +37 -37
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +7 -7
- package/checkbox/styles.selectors.js +3 -3
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +111 -111
- package/code-editor/styles.selectors.js +32 -32
- package/collection-preferences/styles.css.js +20 -20
- package/collection-preferences/styles.scoped.css +25 -25
- package/collection-preferences/styles.selectors.js +20 -20
- package/column-layout/styles.css.js +13 -13
- package/column-layout/styles.scoped.css +45 -45
- package/column-layout/styles.selectors.js +13 -13
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +1 -1
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +18 -17
- package/container/styles.scoped.css +107 -44
- package/container/styles.selectors.js +18 -17
- package/container/use-sticky-header.d.ts.map +1 -1
- package/container/use-sticky-header.js +4 -15
- package/container/use-sticky-header.js.map +1 -1
- package/content-layout/styles.css.js +7 -7
- package/content-layout/styles.scoped.css +13 -13
- package/content-layout/styles.selectors.js +7 -7
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +11 -11
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/styles.css.js +25 -25
- package/date-range-picker/calendar/grids/styles.scoped.css +44 -44
- package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
- package/date-range-picker/relative-range/styles.css.js +9 -9
- package/date-range-picker/relative-range/styles.scoped.css +15 -15
- 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 +47 -47
- package/date-range-picker/styles.selectors.js +38 -38
- package/expandable-section/styles.css.js +21 -21
- package/expandable-section/styles.scoped.css +44 -44
- package/expandable-section/styles.selectors.js +21 -21
- package/flashbar/collapsible-flashbar.d.ts +2 -2
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js +19 -9
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/common.d.ts +2 -2
- package/flashbar/common.d.ts.map +1 -1
- package/flashbar/common.js.map +1 -1
- package/flashbar/index.d.ts +2 -2
- package/flashbar/index.d.ts.map +1 -1
- package/flashbar/index.js +1 -4
- package/flashbar/index.js.map +1 -1
- package/flashbar/interfaces.d.ts +30 -17
- package/flashbar/interfaces.d.ts.map +1 -1
- package/flashbar/interfaces.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts +2 -2
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/styles.css.js +43 -43
- package/flashbar/styles.scoped.css +152 -163
- package/flashbar/styles.selectors.js +43 -43
- package/flashbar/utils.d.ts +1 -0
- package/flashbar/utils.d.ts.map +1 -1
- package/flashbar/utils.js +3 -0
- package/flashbar/utils.js.map +1 -1
- package/form/styles.css.js +8 -8
- package/form/styles.scoped.css +10 -10
- package/form/styles.selectors.js +8 -8
- package/form-field/styles.css.js +19 -19
- package/form-field/styles.scoped.css +31 -31
- package/form-field/styles.selectors.js +19 -19
- package/grid/styles.css.js +53 -53
- package/grid/styles.scoped.css +56 -56
- package/grid/styles.selectors.js +53 -53
- package/header/styles.css.js +44 -44
- package/header/styles.scoped.css +49 -49
- package/header/styles.selectors.js +44 -44
- package/help-panel/styles.css.js +4 -4
- package/help-panel/styles.scoped.css +60 -60
- package/help-panel/styles.selectors.js +4 -4
- package/hotspot/styles.css.js +7 -7
- package/hotspot/styles.scoped.css +9 -9
- package/hotspot/styles.selectors.js +7 -7
- package/icon/styles.css.js +21 -21
- package/icon/styles.scoped.css +50 -50
- package/icon/styles.selectors.js +21 -21
- package/input/styles.css.js +12 -12
- package/input/styles.scoped.css +32 -32
- package/input/styles.selectors.js +12 -12
- package/internal/base-component/styles.scoped.css +6 -6
- package/internal/components/abstract-switch/styles.css.js +12 -12
- package/internal/components/abstract-switch/styles.scoped.css +21 -21
- package/internal/components/abstract-switch/styles.selectors.js +12 -12
- package/internal/components/button-trigger/styles.css.js +9 -9
- package/internal/components/button-trigger/styles.scoped.css +25 -25
- package/internal/components/button-trigger/styles.selectors.js +9 -9
- package/internal/components/chart-filter/styles.css.js +3 -3
- package/internal/components/chart-filter/styles.scoped.css +5 -5
- package/internal/components/chart-filter/styles.selectors.js +3 -3
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +17 -17
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/styles.css.js +5 -5
- package/internal/components/chart-plot/styles.scoped.css +7 -7
- package/internal/components/chart-plot/styles.selectors.js +5 -5
- package/internal/components/chart-popover/styles.css.js +3 -3
- package/internal/components/chart-popover/styles.scoped.css +5 -5
- package/internal/components/chart-popover/styles.selectors.js +3 -3
- package/internal/components/chart-series-details/styles.css.js +5 -5
- package/internal/components/chart-series-details/styles.scoped.css +10 -10
- package/internal/components/chart-series-details/styles.selectors.js +5 -5
- package/internal/components/chart-series-marker/styles.css.js +5 -5
- package/internal/components/chart-series-marker/styles.scoped.css +9 -9
- package/internal/components/chart-series-marker/styles.selectors.js +5 -5
- package/internal/components/checkbox-icon/styles.css.js +7 -7
- package/internal/components/checkbox-icon/styles.scoped.css +10 -10
- package/internal/components/checkbox-icon/styles.selectors.js +7 -7
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +37 -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 +5 -5
- 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 +4 -4
- package/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/internal/components/filtering-token/styles.css.js +7 -7
- package/internal/components/filtering-token/styles.scoped.css +15 -15
- package/internal/components/filtering-token/styles.selectors.js +7 -7
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +15 -15
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/option/styles.css.js +17 -17
- package/internal/components/option/styles.scoped.css +31 -31
- package/internal/components/option/styles.selectors.js +17 -17
- package/internal/components/options-list/styles.css.js +2 -2
- package/internal/components/options-list/styles.scoped.css +4 -4
- package/internal/components/options-list/styles.selectors.js +2 -2
- package/internal/components/screenreader-only/styles.css.js +1 -1
- package/internal/components/screenreader-only/styles.scoped.css +3 -3
- 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 +29 -29
- package/internal/components/selectable-item/styles.selectors.js +16 -16
- package/internal/environment.js +1 -1
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +28 -27
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/generated/theming/index.cjs +6 -6
- package/internal/generated/theming/index.js +6 -6
- package/internal/manifest.json +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +73 -73
- package/link/styles.selectors.js +20 -20
- package/mixed-line-bar-chart/styles.css.js +19 -19
- package/mixed-line-bar-chart/styles.scoped.css +28 -28
- package/mixed-line-bar-chart/styles.selectors.js +19 -19
- package/modal/styles.css.js +22 -22
- package/modal/styles.scoped.css +40 -47
- package/modal/styles.selectors.js +22 -22
- package/multiselect/styles.css.js +1 -1
- package/multiselect/styles.scoped.css +3 -3
- package/multiselect/styles.selectors.js +1 -1
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +25 -25
- package/pagination/styles.selectors.js +9 -9
- package/pie-chart/styles.css.js +27 -27
- package/pie-chart/styles.scoped.css +45 -45
- package/pie-chart/styles.selectors.js +27 -27
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +73 -73
- package/popover/styles.selectors.js +50 -50
- package/progress-bar/styles.css.js +18 -18
- package/progress-bar/styles.scoped.css +36 -36
- package/progress-bar/styles.selectors.js +18 -18
- package/property-filter/styles.css.js +33 -33
- package/property-filter/styles.scoped.css +37 -37
- package/property-filter/styles.selectors.js +33 -33
- package/radio-group/styles.css.js +9 -9
- package/radio-group/styles.scoped.css +17 -17
- package/radio-group/styles.selectors.js +9 -9
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +35 -35
- package/segmented-control/styles.selectors.js +14 -14
- package/select/parts/styles.css.js +9 -9
- package/select/parts/styles.scoped.css +14 -14
- package/select/parts/styles.selectors.js +9 -9
- package/select/styles.css.js +1 -1
- package/select/styles.scoped.css +3 -3
- package/select/styles.selectors.js +1 -1
- package/side-navigation/styles.css.js +26 -26
- package/side-navigation/styles.scoped.css +38 -38
- package/side-navigation/styles.selectors.js +26 -26
- package/space-between/styles.css.js +28 -28
- package/space-between/styles.scoped.css +31 -31
- package/space-between/styles.selectors.js +28 -28
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +20 -20
- package/spinner/styles.selectors.js +13 -13
- package/split-panel/styles.css.js +59 -59
- package/split-panel/styles.scoped.css +85 -85
- package/split-panel/styles.selectors.js +59 -59
- package/status-indicator/styles.css.js +20 -20
- package/status-indicator/styles.scoped.css +28 -28
- package/status-indicator/styles.selectors.js +20 -20
- package/table/body-cell/styles.css.js +18 -18
- package/table/body-cell/styles.scoped.css +52 -52
- package/table/body-cell/styles.selectors.js +18 -18
- package/table/header-cell/styles.css.js +19 -19
- package/table/header-cell/styles.scoped.css +33 -33
- package/table/header-cell/styles.selectors.js +19 -19
- package/table/resizer/styles.css.js +6 -6
- package/table/resizer/styles.scoped.css +13 -13
- package/table/resizer/styles.selectors.js +6 -6
- package/table/selection-control/styles.css.js +3 -3
- package/table/selection-control/styles.scoped.css +5 -5
- package/table/selection-control/styles.selectors.js +3 -3
- package/table/styles.css.js +33 -33
- package/table/styles.scoped.css +41 -41
- package/table/styles.selectors.js +33 -33
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +42 -42
- package/tabs/styles.selectors.js +21 -21
- package/tag-editor/interfaces.d.ts +1 -0
- package/tag-editor/interfaces.d.ts.map +1 -1
- package/tag-editor/interfaces.js.map +1 -1
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +12 -12
- package/tag-editor/styles.selectors.js +3 -3
- package/test-utils/dom/flashbar/index.d.ts +2 -0
- package/test-utils/dom/flashbar/index.js +2 -0
- package/test-utils/dom/flashbar/index.js.map +1 -1
- package/test-utils/selectors/flashbar/index.d.ts +2 -0
- package/test-utils/selectors/flashbar/index.js +2 -0
- package/test-utils/selectors/flashbar/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 +62 -62
- package/text-content/styles.selectors.js +1 -1
- package/text-filter/styles.css.js +4 -4
- package/text-filter/styles.scoped.css +6 -6
- package/text-filter/styles.selectors.js +4 -4
- package/textarea/styles.css.js +4 -4
- package/textarea/styles.scoped.css +14 -14
- package/textarea/styles.selectors.js +4 -4
- package/tiles/styles.css.js +28 -28
- package/tiles/styles.scoped.css +70 -70
- package/tiles/styles.selectors.js +28 -28
- package/toggle/styles.css.js +8 -8
- package/toggle/styles.scoped.css +15 -15
- package/toggle/styles.selectors.js +8 -8
- package/token-group/styles.css.js +7 -7
- package/token-group/styles.scoped.css +24 -24
- package/token-group/styles.selectors.js +7 -7
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +44 -44
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +68 -68
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +23 -23
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +29 -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 +3 -3
- package/tutorial-panel/styles.selectors.js +1 -1
- package/wizard/index.d.ts.map +1 -1
- package/wizard/index.js +5 -4
- package/wizard/index.js.map +1 -1
- package/wizard/internal/analytics.d.ts +3 -3
- package/wizard/internal/analytics.d.ts.map +1 -1
- package/wizard/internal/analytics.js +6 -11
- package/wizard/internal/analytics.js.map +1 -1
- package/wizard/styles.css.js +32 -32
- package/wizard/styles.scoped.css +98 -64
- package/wizard/styles.selectors.js +32 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAkBjB;;IAjBvB,IAAA,MAAM,YAAA,EACN,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,6BAA6B,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,EAC7B,8BAA8B,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,EAC9B,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,sBAAsB,EAAtB,cAAc,mBAAG,KAAK,KAAA,EACtB,yBAAwB,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,EACxB,8BAA8B,EAA9B,sBAAsB,mBAAG,KAAK,KAAA,EAC9B,+BAA+B,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAC/B,uBAAuB,EAAvB,eAAe,mBAAG,KAAK,KAAA,EACvB,WAAW,iBAAA,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O,CAC5F,CAAC,CAAC,CAAC,CACF,MAAM,CACP,CACG,CACuB,CAChC;QACD,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;gBAC5B,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,sBAAsB;oBAClD,IAED,QAAQ,CACL;QACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC3B,GAAC,MAAM,CAAC,cAAc,CAAC,IAAG,CAAC,sBAAsB;gBACjD,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,uBAAuB;oBACnD,IAED,MAAM,CACH,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useRef } from 'react';\nimport { ContainerProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport styles from './styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __headerId?: string;\n __darkHeader?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n __stickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __headerId,\n __darkHeader = false,\n ...restProps\n}: InternalContainerProps) {\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, stickyStyles } = useStickyHeader(rootRef, headerRef, __stickyHeader, __stickyOffset);\n const { setHasStickyBackground } = useAppLayoutContext();\n const isRefresh = useVisualRefresh();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight || !__darkHeader });\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, overlapElement, __headerRef);\n const headerIdProp = __headerId ? { id: __headerId } : {};\n\n /**\n * The visual refresh AppLayout component needs to know if a child component\n * has a high contrast sticky header. This is to make sure the background element\n * stays in the same vertical position as the header content.\n */\n useEffect(() => {\n const shouldUpdateStickyBackground = isSticky && variant === 'full-page' && setHasStickyBackground;\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(true);\n }\n\n return () => {\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(false);\n }\n };\n }, [isSticky, setHasStickyBackground, variant]);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n isSticky && [styles['sticky-enabled']]\n )}\n ref={mergedRef}\n >\n {header && (\n <StickyHeaderContext.Provider value={{ isStuck }}>\n <div\n className={clsx(styles.header, styles[`header-variant-${variant}`], {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n })}\n {...headerIdProp}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {__darkHeader ? (\n <div className={clsx(styles['dark-header'], 'awsui-context-content-header')}>{header}</div>\n ) : (\n header\n )}\n </div>\n </StickyHeaderContext.Provider>\n )}\n <div\n className={clsx(styles.content, {\n [styles['with-paddings']]: !disableContentPaddings,\n })}\n >\n {children}\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n );\n}\n"]}
|
package/container/styles.css.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"
|
|
6
|
-
"variant-default": "awsui_variant-
|
|
7
|
-
"variant-stacked": "awsui_variant-
|
|
8
|
-
"
|
|
9
|
-
"header
|
|
10
|
-
"header-sticky-
|
|
11
|
-
"header-
|
|
12
|
-
"header-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
4
|
+
"root": "awsui_root_14iqq_xhasy_97",
|
|
5
|
+
"fit-height": "awsui_fit-height_14iqq_xhasy_111",
|
|
6
|
+
"variant-default": "awsui_variant-default_14iqq_xhasy_116",
|
|
7
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_xhasy_116",
|
|
8
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_xhasy_169",
|
|
9
|
+
"header": "awsui_header_14iqq_xhasy_176",
|
|
10
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_xhasy_181",
|
|
11
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_xhasy_185",
|
|
12
|
+
"header-stuck": "awsui_header-stuck_14iqq_xhasy_191",
|
|
13
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_xhasy_197",
|
|
14
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_xhasy_200",
|
|
15
|
+
"with-paddings": "awsui_with-paddings_14iqq_xhasy_206",
|
|
16
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_xhasy_209",
|
|
17
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_xhasy_259",
|
|
18
|
+
"dark-header": "awsui_dark-header_14iqq_xhasy_277",
|
|
19
|
+
"content": "awsui_content_14iqq_xhasy_281",
|
|
20
|
+
"footer": "awsui_footer_14iqq_xhasy_292",
|
|
21
|
+
"with-divider": "awsui_with-divider_14iqq_xhasy_295"
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -50,8 +50,6 @@
|
|
|
50
50
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
51
|
SPDX-License-Identifier: Apache-2.0
|
|
52
52
|
*/
|
|
53
|
-
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
54
|
-
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
55
53
|
/*
|
|
56
54
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
57
55
|
SPDX-License-Identifier: Apache-2.0
|
|
@@ -64,6 +62,8 @@
|
|
|
64
62
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
65
63
|
SPDX-License-Identifier: Apache-2.0
|
|
66
64
|
*/
|
|
65
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
66
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
67
67
|
/*
|
|
68
68
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
69
|
SPDX-License-Identifier: Apache-2.0
|
|
@@ -94,7 +94,7 @@ 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
|
-
.
|
|
97
|
+
.awsui_root_14iqq_xhasy_97:not(#\9) {
|
|
98
98
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
99
99
|
border-collapse: separate;
|
|
100
100
|
border-spacing: 0;
|
|
@@ -132,97 +132,160 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
132
132
|
-webkit-font-smoothing: auto;
|
|
133
133
|
-moz-osx-font-smoothing: auto;
|
|
134
134
|
word-wrap: break-word;
|
|
135
|
+
position: relative;
|
|
135
136
|
}
|
|
136
|
-
.
|
|
137
|
+
.awsui_root_14iqq_xhasy_97.awsui_fit-height_14iqq_xhasy_111:not(#\9) {
|
|
137
138
|
display: flex;
|
|
138
139
|
flex-direction: column;
|
|
139
|
-
overflow: hidden;
|
|
140
140
|
height: 100%;
|
|
141
141
|
}
|
|
142
|
-
.
|
|
143
|
-
box-shadow: var(--shadow-container-7nblnj, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
144
|
-
border-top: var(--border-container-top-width-jk6fhm, 0px) solid var(--color-border-container-top-srcvx4, transparent);
|
|
142
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9) {
|
|
145
143
|
border-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
146
144
|
box-sizing: border-box;
|
|
147
145
|
background-color: var(--color-background-container-content-i8i4a0, #ffffff);
|
|
148
146
|
}
|
|
147
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9)::before, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before {
|
|
148
|
+
content: "";
|
|
149
|
+
position: absolute;
|
|
150
|
+
left: 0px;
|
|
151
|
+
top: 0px;
|
|
152
|
+
width: 100%;
|
|
153
|
+
height: 100%;
|
|
154
|
+
pointer-events: none;
|
|
155
|
+
background: transparent;
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
border-color: transparent;
|
|
158
|
+
border-top: var(--border-container-top-width-jk6fhm, 0px) solid var(--color-border-container-top-srcvx4, transparent);
|
|
159
|
+
border-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
160
|
+
z-index: 1;
|
|
161
|
+
}
|
|
162
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9)::after, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::after {
|
|
163
|
+
content: "";
|
|
164
|
+
position: absolute;
|
|
165
|
+
left: 0px;
|
|
166
|
+
top: 0px;
|
|
167
|
+
width: 100%;
|
|
168
|
+
height: 100%;
|
|
169
|
+
pointer-events: none;
|
|
170
|
+
background: transparent;
|
|
171
|
+
box-sizing: border-box;
|
|
172
|
+
box-shadow: var(--shadow-container-fx563k, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
173
|
+
border-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
174
|
+
mix-blend-mode: multiply;
|
|
175
|
+
}
|
|
149
176
|
@media screen and (-ms-high-contrast: active) {
|
|
150
|
-
.
|
|
177
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9) {
|
|
151
178
|
border: var(--border-field-width-idlekx, 2px) solid var(--color-border-container-top-srcvx4, transparent);
|
|
152
179
|
}
|
|
153
180
|
}
|
|
154
|
-
.
|
|
181
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9):not(:last-child), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9):not(:last-child)::before, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9):not(:last-child)::after {
|
|
155
182
|
border-bottom-right-radius: 0;
|
|
156
183
|
border-bottom-left-radius: 0;
|
|
157
184
|
}
|
|
158
|
-
.
|
|
159
|
-
border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
185
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::after {
|
|
160
186
|
border-top-left-radius: 0;
|
|
161
187
|
border-top-right-radius: 0;
|
|
162
|
-
|
|
188
|
+
}
|
|
189
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before {
|
|
190
|
+
border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
191
|
+
}
|
|
192
|
+
.awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::after {
|
|
193
|
+
box-shadow: var(--shadow-container-stacked-jfo2nn, -1px 1px 1px 0px #e9ebed, 1px 1px 1px 0px #e9ebed, 0px 9px 8px -7px rgba(0, 7, 22, 0.12), 8px 0px 8px -7px rgba(0, 7, 22, 0.12), -8px 0px 8px -7px rgba(0, 7, 22, 0.12));
|
|
194
|
+
}
|
|
195
|
+
.awsui_root_14iqq_xhasy_97.awsui_sticky-enabled_14iqq_xhasy_169:not(#\9)::before {
|
|
196
|
+
top: calc(-1 * var(--border-container-top-width-jk6fhm, 0px));
|
|
197
|
+
}
|
|
198
|
+
.awsui_root_14iqq_xhasy_97.awsui_sticky-enabled_14iqq_xhasy_169.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before {
|
|
199
|
+
top: calc(-1 * var(--border-divider-section-width-4wm2it, 2px));
|
|
163
200
|
}
|
|
164
201
|
|
|
165
|
-
.
|
|
202
|
+
.awsui_header_14iqq_xhasy_176:not(#\9) {
|
|
166
203
|
background-color: var(--color-background-container-header-4flbq5, #ffffff);
|
|
167
204
|
border-top-left-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
168
205
|
border-top-right-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
169
206
|
}
|
|
170
|
-
.awsui_header-sticky-
|
|
207
|
+
.awsui_header-sticky-disabled_14iqq_xhasy_181:not(#\9) {
|
|
171
208
|
position: relative;
|
|
172
209
|
z-index: 1;
|
|
173
210
|
}
|
|
174
|
-
.awsui_header-sticky-
|
|
211
|
+
.awsui_header-sticky-enabled_14iqq_xhasy_185:not(#\9) {
|
|
175
212
|
top: 0;
|
|
176
213
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
177
214
|
position: sticky;
|
|
178
215
|
z-index: 800;
|
|
179
216
|
}
|
|
180
|
-
.awsui_header-
|
|
181
|
-
box-shadow: var(--shadow-sticky-embedded-qit8ba, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
182
|
-
border: 0;
|
|
217
|
+
.awsui_header-stuck_14iqq_xhasy_191:not(#\9) {
|
|
183
218
|
border-radius: 0;
|
|
184
219
|
}
|
|
185
|
-
.awsui_header-
|
|
220
|
+
.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::before {
|
|
221
|
+
border: 0;
|
|
222
|
+
}
|
|
223
|
+
.awsui_header-stuck_14iqq_xhasy_191:not(#\9):not(.awsui_header-variant-cards_14iqq_xhasy_197) {
|
|
224
|
+
box-shadow: var(--shadow-sticky-embedded-qit8ba, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
225
|
+
}
|
|
226
|
+
.awsui_header-dynamic-height_14iqq_xhasy_200.awsui_header-stuck_14iqq_xhasy_191:not(#\9) {
|
|
186
227
|
margin-bottom: calc(var(--font-heading-xl-line-height-doxfdj, 40px) - var(--font-heading-l-line-height-gev4n1, 30px));
|
|
187
228
|
}
|
|
188
|
-
.
|
|
229
|
+
.awsui_header_14iqq_xhasy_176:not(#\9):not(:empty) {
|
|
189
230
|
border-bottom: var(--border-container-sticky-width-i7t7xe, 0px) solid var(--color-border-container-divider-4ade7z, transparent);
|
|
190
231
|
}
|
|
191
|
-
.
|
|
232
|
+
.awsui_header_14iqq_xhasy_176.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
|
|
192
233
|
padding: var(--space-container-header-vertical-zsjhel, 12px) var(--space-container-horizontal-tlw03i, 20px);
|
|
193
234
|
}
|
|
194
|
-
.
|
|
235
|
+
.awsui_header_14iqq_xhasy_176.awsui_with-hidden-content_14iqq_xhasy_209:not(#\9) {
|
|
195
236
|
border-bottom-left-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
196
237
|
border-bottom-right-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
197
238
|
}
|
|
198
|
-
.awsui_header-variant-
|
|
199
|
-
|
|
239
|
+
.awsui_header-variant-cards_14iqq_xhasy_197:not(#\9) {
|
|
240
|
+
border-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
241
|
+
box-sizing: border-box;
|
|
242
|
+
}
|
|
243
|
+
.awsui_header-variant-cards_14iqq_xhasy_197:not(#\9):not(.awsui_header-sticky-enabled_14iqq_xhasy_185) {
|
|
244
|
+
position: relative;
|
|
245
|
+
}
|
|
246
|
+
.awsui_header-variant-cards_14iqq_xhasy_197:not(#\9)::before {
|
|
247
|
+
content: "";
|
|
248
|
+
position: absolute;
|
|
249
|
+
left: 0px;
|
|
250
|
+
top: 0px;
|
|
251
|
+
width: 100%;
|
|
252
|
+
height: 100%;
|
|
253
|
+
pointer-events: none;
|
|
254
|
+
background: transparent;
|
|
255
|
+
box-sizing: border-box;
|
|
256
|
+
border-color: transparent;
|
|
200
257
|
border-top: var(--border-container-top-width-jk6fhm, 0px) solid var(--color-border-container-top-srcvx4, transparent);
|
|
201
258
|
border-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
259
|
+
z-index: 1;
|
|
260
|
+
}
|
|
261
|
+
.awsui_header-variant-cards_14iqq_xhasy_197:not(#\9)::after {
|
|
262
|
+
content: "";
|
|
263
|
+
position: absolute;
|
|
264
|
+
left: 0px;
|
|
265
|
+
top: 0px;
|
|
266
|
+
width: 100%;
|
|
267
|
+
height: 100%;
|
|
268
|
+
pointer-events: none;
|
|
269
|
+
background: transparent;
|
|
202
270
|
box-sizing: border-box;
|
|
271
|
+
box-shadow: var(--shadow-container-fx563k, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
272
|
+
border-radius: var(--border-radius-container-gh9ysk, 16px);
|
|
273
|
+
mix-blend-mode: multiply;
|
|
203
274
|
}
|
|
204
275
|
@media screen and (-ms-high-contrast: active) {
|
|
205
|
-
.awsui_header-variant-
|
|
276
|
+
.awsui_header-variant-cards_14iqq_xhasy_197:not(#\9) {
|
|
206
277
|
border: var(--border-field-width-idlekx, 2px) solid var(--color-border-container-top-srcvx4, transparent);
|
|
207
278
|
}
|
|
208
279
|
}
|
|
209
|
-
.awsui_header-variant-
|
|
210
|
-
border
|
|
211
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
212
|
-
}
|
|
213
|
-
@supports (--css-variable-support-check: #000) {
|
|
214
|
-
.awsui_header-variant-cards_14iqq_4079j_172:not(#\9):not(:empty) {
|
|
215
|
-
border-bottom: 0;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
.awsui_header-variant-cards_14iqq_4079j_172.awsui_header-stuck_14iqq_4079j_154:not(#\9) {
|
|
280
|
+
.awsui_header-variant-cards_14iqq_xhasy_197.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::after, .awsui_header-variant-cards_14iqq_xhasy_197.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::before {
|
|
281
|
+
border: 0;
|
|
219
282
|
border-top-left-radius: 0;
|
|
220
283
|
border-top-right-radius: 0;
|
|
221
284
|
}
|
|
222
|
-
.awsui_header-variant-full-
|
|
285
|
+
.awsui_header-variant-full-page_14iqq_xhasy_259.awsui_header-stuck_14iqq_xhasy_191:not(#\9) {
|
|
223
286
|
box-shadow: none;
|
|
224
287
|
}
|
|
225
|
-
.awsui_header-variant-full-
|
|
288
|
+
.awsui_header-variant-full-page_14iqq_xhasy_259.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::after {
|
|
226
289
|
content: "";
|
|
227
290
|
position: absolute;
|
|
228
291
|
right: 0;
|
|
@@ -237,24 +300,24 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
237
300
|
The dynamic height dark header needs a background that will cover
|
|
238
301
|
the default white background of the container component.
|
|
239
302
|
*/
|
|
240
|
-
.awsui_dark-
|
|
303
|
+
.awsui_dark-header_14iqq_xhasy_277:not(#\9) {
|
|
241
304
|
background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
|
|
242
305
|
}
|
|
243
306
|
|
|
244
|
-
.
|
|
307
|
+
.awsui_fit-height_14iqq_xhasy_111 > .awsui_content_14iqq_xhasy_281:not(#\9) {
|
|
245
308
|
flex: 1;
|
|
246
309
|
overflow: auto;
|
|
247
310
|
}
|
|
248
|
-
.
|
|
311
|
+
.awsui_content_14iqq_xhasy_281.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
|
|
249
312
|
padding: var(--space-scaled-l-t03y3z, 20px) var(--space-container-horizontal-tlw03i, 20px);
|
|
250
313
|
}
|
|
251
|
-
.
|
|
314
|
+
.awsui_header_14iqq_xhasy_176 + .awsui_content_14iqq_xhasy_281.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
|
|
252
315
|
padding-top: var(--space-container-content-top-fsd8nr, 0px);
|
|
253
316
|
}
|
|
254
317
|
|
|
255
|
-
.
|
|
318
|
+
.awsui_footer_14iqq_xhasy_292.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
|
|
256
319
|
padding: var(--space-scaled-s-cu1hzn, 12px) var(--space-container-horizontal-tlw03i, 20px);
|
|
257
320
|
}
|
|
258
|
-
.
|
|
321
|
+
.awsui_footer_14iqq_xhasy_292.awsui_with-divider_14iqq_xhasy_295:not(#\9) {
|
|
259
322
|
border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
|
|
260
323
|
}
|
|
@@ -2,22 +2,23 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"
|
|
7
|
-
"variant-default": "awsui_variant-
|
|
8
|
-
"variant-stacked": "awsui_variant-
|
|
9
|
-
"
|
|
10
|
-
"header
|
|
11
|
-
"header-sticky-
|
|
12
|
-
"header-
|
|
13
|
-
"header-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
5
|
+
"root": "awsui_root_14iqq_xhasy_97",
|
|
6
|
+
"fit-height": "awsui_fit-height_14iqq_xhasy_111",
|
|
7
|
+
"variant-default": "awsui_variant-default_14iqq_xhasy_116",
|
|
8
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_xhasy_116",
|
|
9
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_xhasy_169",
|
|
10
|
+
"header": "awsui_header_14iqq_xhasy_176",
|
|
11
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_xhasy_181",
|
|
12
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_xhasy_185",
|
|
13
|
+
"header-stuck": "awsui_header-stuck_14iqq_xhasy_191",
|
|
14
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_xhasy_197",
|
|
15
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_xhasy_200",
|
|
16
|
+
"with-paddings": "awsui_with-paddings_14iqq_xhasy_206",
|
|
17
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_xhasy_209",
|
|
18
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_xhasy_259",
|
|
19
|
+
"dark-header": "awsui_dark-header_14iqq_xhasy_277",
|
|
20
|
+
"content": "awsui_content_14iqq_xhasy_281",
|
|
21
|
+
"footer": "awsui_footer_14iqq_xhasy_292",
|
|
22
|
+
"with-divider": "awsui_with-divider_14iqq_xhasy_295"
|
|
22
23
|
};
|
|
23
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-header.d.ts","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"use-sticky-header.d.ts","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoE,MAAM,OAAO,CAAC;AAQpG,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,mDAA8D,CAAC;AAE/F,eAAO,MAAM,eAAe,YACjB,UAAU,cAAc,CAAC,aACvB,UAAU,cAAc,CAAC,mBACnB,OAAO,mBACP,MAAM;;;;;;;;;;CAyExB,CAAC;AAEF,wBAAgB,uBAAuB,YAGtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { useState, useLayoutEffect, useCallback, useEffect, createContext
|
|
3
|
+
import { useState, useLayoutEffect, useCallback, useEffect, createContext } from 'react';
|
|
4
4
|
import { useAppLayoutContext } from '../internal/context/app-layout-context';
|
|
5
5
|
import { useMobile } from '../internal/hooks/use-mobile';
|
|
6
6
|
import { findUpUntil, supportsStickyPosition } from '../internal/utils/dom';
|
|
@@ -9,17 +9,6 @@ import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
|
9
9
|
import customCssProps from '../internal/generated/custom-css-properties';
|
|
10
10
|
export var StickyHeaderContext = createContext({ isStuck: false });
|
|
11
11
|
export var useStickyHeader = function (rootRef, headerRef, __stickyHeader, __stickyOffset) {
|
|
12
|
-
var currentRootRef = rootRef.current;
|
|
13
|
-
var currentHeaderRef = headerRef.current;
|
|
14
|
-
var totalBorder = useMemo(function () {
|
|
15
|
-
var containerRootBorder = currentRootRef
|
|
16
|
-
? parseInt(getComputedStyle(currentRootRef).getPropertyValue('border-top-width'), 10)
|
|
17
|
-
: 0;
|
|
18
|
-
var headerBorder = currentHeaderRef
|
|
19
|
-
? parseInt(getComputedStyle(currentHeaderRef).getPropertyValue('border-top-width'), 10)
|
|
20
|
-
: 0;
|
|
21
|
-
return containerRootBorder + headerBorder;
|
|
22
|
-
}, [currentRootRef, currentHeaderRef]);
|
|
23
12
|
// We reach into AppLayoutContext in case sticky header needs to be offset down by the height
|
|
24
13
|
// of other sticky elements positioned on top of the view.
|
|
25
14
|
var stickyOffsetTop = useAppLayoutContext().stickyOffsetTop;
|
|
@@ -47,7 +36,7 @@ export var useStickyHeader = function (rootRef, headerRef, __stickyHeader, __sti
|
|
|
47
36
|
* body scroll then we will use that property. When a component is used outside AppLayout, we fall back
|
|
48
37
|
* to the default offset calculated in AppLayoutDomContext.
|
|
49
38
|
*/
|
|
50
|
-
var computedOffset = "".concat(effectiveStickyOffset
|
|
39
|
+
var computedOffset = "".concat(effectiveStickyOffset, "px");
|
|
51
40
|
if (isRefresh && !hasInnerOverflowParents) {
|
|
52
41
|
computedOffset = "var(".concat(customCssProps.offsetTopWithNotifications, ", ").concat(computedOffset, ")");
|
|
53
42
|
}
|
|
@@ -64,14 +53,14 @@ export var useStickyHeader = function (rootRef, headerRef, __stickyHeader, __sti
|
|
|
64
53
|
if (rootRef.current && headerRef.current) {
|
|
65
54
|
var rootTop = rootRef.current.getBoundingClientRect().top;
|
|
66
55
|
var headerTop = headerRef.current.getBoundingClientRect().top;
|
|
67
|
-
if (rootTop
|
|
56
|
+
if (rootTop < headerTop) {
|
|
68
57
|
setIsStuck(true);
|
|
69
58
|
}
|
|
70
59
|
else {
|
|
71
60
|
setIsStuck(false);
|
|
72
61
|
}
|
|
73
62
|
}
|
|
74
|
-
}, [rootRef, headerRef
|
|
63
|
+
}, [rootRef, headerRef]);
|
|
75
64
|
useEffect(function () {
|
|
76
65
|
if (isSticky) {
|
|
77
66
|
window.addEventListener('scroll', checkIfStuck, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-header.js","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"use-sticky-header.js","sourceRoot":"","sources":["../../../src/container/use-stic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AAC;IACzB,SAAS,CAAC;QACR,IAAI,QAAQ,EAAE;YACZ,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;YACtD,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YAChD,OAAO;gBACL,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;gBACzD,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YACrD,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC7B,OAAO;QACL,QAAQ,UAAA;QACR,OAAO,SAAA;QACP,YAAY,cAAA;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,uBAAuB;IACrC,IAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,sBAAsB,EAAE,IAAI,CAAC,QAAQ,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useState, useLayoutEffect, useCallback, useEffect, createContext } from 'react';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { findUpUntil, supportsStickyPosition } from '../internal/utils/dom';\nimport { getOverflowParents } from '../internal/utils/scrollable-containers';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport customCssProps from '../internal/generated/custom-css-properties';\n\ninterface StickyHeaderContextProps {\n isStuck: boolean;\n}\n\nexport const StickyHeaderContext = createContext<StickyHeaderContextProps>({ isStuck: false });\n\nexport const useStickyHeader = (\n rootRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n __stickyHeader?: boolean,\n __stickyOffset?: number\n) => {\n // We reach into AppLayoutContext in case sticky header needs to be offset down by the height\n // of other sticky elements positioned on top of the view.\n const { stickyOffsetTop } = useAppLayoutContext();\n const isSticky = useSupportsStickyHeader() && !!__stickyHeader;\n const isRefresh = useVisualRefresh();\n\n // If it has overflow parents inside the app layout, we shouldn't apply a sticky offset.\n const [hasInnerOverflowParents, setHasInnerOverflowParents] = useState(false);\n const [isStuck, setIsStuck] = useState(false);\n useLayoutEffect(() => {\n if (rootRef.current) {\n const overflowParents = getOverflowParents(rootRef.current);\n const mainElement = findUpUntil(rootRef.current, elem => elem.tagName === 'MAIN');\n // In both versions of the app layout, the scrolling element for disableBodyScroll\n // is the <main>. If the closest overflow parent is also the closest <main> and we have\n // offset values, it's safe to assume that it's the app layout scroll root and we\n // should stop there.\n setHasInnerOverflowParents(overflowParents.length > 0 && overflowParents[0] !== mainElement);\n }\n }, [rootRef]);\n\n const effectiveStickyOffset = __stickyOffset ?? (hasInnerOverflowParents ? 0 : stickyOffsetTop);\n\n /**\n * The AppLayout refactor removed the need for passing the sticky offset in px all the time through the\n * AppLayoutDomContext provider because that information already exists on the DOM in a custom property\n * on the Layout subcomponent. Thus, if the Container header is sticky, we are in Visual Refresh and use\n * body scroll then we will use that property. When a component is used outside AppLayout, we fall back\n * to the default offset calculated in AppLayoutDomContext.\n */\n let computedOffset = `${effectiveStickyOffset}px`;\n if (isRefresh && !hasInnerOverflowParents) {\n computedOffset = `var(${customCssProps.offsetTopWithNotifications}, ${computedOffset})`;\n }\n\n const stickyStyles = isSticky\n ? {\n style: {\n top: computedOffset,\n },\n }\n : {};\n\n // \"stuck\" state, when the header has moved from its original posititon has a\n // box-shadow, applied here by a \"header-stuck\" className\n const checkIfStuck = useCallback(() => {\n if (rootRef.current && headerRef.current) {\n const rootTop = rootRef.current.getBoundingClientRect().top;\n const headerTop = headerRef.current.getBoundingClientRect().top;\n if (rootTop < headerTop) {\n setIsStuck(true);\n } else {\n setIsStuck(false);\n }\n }\n }, [rootRef, headerRef]);\n useEffect(() => {\n if (isSticky) {\n window.addEventListener('scroll', checkIfStuck, true);\n window.addEventListener('resize', checkIfStuck);\n return () => {\n window.removeEventListener('scroll', checkIfStuck, true);\n window.removeEventListener('resize', checkIfStuck);\n };\n }\n }, [isSticky, checkIfStuck]);\n return {\n isSticky,\n isStuck,\n stickyStyles,\n };\n};\n\nexport function useSupportsStickyHeader() {\n const isMobile = useMobile();\n return supportsStickyPosition() && !isMobile;\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"layout": "
|
|
5
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
6
|
-
"background": "
|
|
7
|
-
"header": "
|
|
8
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
9
|
-
"has-breadcrumbs": "awsui_has-
|
|
10
|
-
"content": "
|
|
4
|
+
"layout": "awsui_layout_5gtk3_1tyi9_99",
|
|
5
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1tyi9_99",
|
|
6
|
+
"background": "awsui_background_5gtk3_1tyi9_102",
|
|
7
|
+
"header": "awsui_header_5gtk3_1tyi9_105",
|
|
8
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1tyi9_115",
|
|
9
|
+
"has-breadcrumbs": "awsui_has-breadcrumbs_5gtk3_1tyi9_132",
|
|
10
|
+
"content": "awsui_content_5gtk3_1tyi9_141"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -50,8 +50,6 @@
|
|
|
50
50
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
51
51
|
SPDX-License-Identifier: Apache-2.0
|
|
52
52
|
*/
|
|
53
|
-
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
54
|
-
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
55
53
|
/*
|
|
56
54
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
57
55
|
SPDX-License-Identifier: Apache-2.0
|
|
@@ -64,6 +62,8 @@
|
|
|
64
62
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
65
63
|
SPDX-License-Identifier: Apache-2.0
|
|
66
64
|
*/
|
|
65
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
66
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
67
67
|
/*
|
|
68
68
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
69
69
|
SPDX-License-Identifier: Apache-2.0
|
|
@@ -96,49 +96,49 @@ visual refresh mode. The padding is still added to the header
|
|
|
96
96
|
in this scenario because otherwise the header and child
|
|
97
97
|
nodes will directly touch with no gap between them.
|
|
98
98
|
*/
|
|
99
|
-
.
|
|
99
|
+
.awsui_layout_5gtk3_1tyi9_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1tyi9_99) {
|
|
100
100
|
display: contents;
|
|
101
101
|
}
|
|
102
|
-
.
|
|
102
|
+
.awsui_layout_5gtk3_1tyi9_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1tyi9_99) > .awsui_background_5gtk3_1tyi9_102 {
|
|
103
103
|
display: none;
|
|
104
104
|
}
|
|
105
|
-
.
|
|
105
|
+
.awsui_layout_5gtk3_1tyi9_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1tyi9_99) > .awsui_header_5gtk3_1tyi9_105 {
|
|
106
106
|
padding-bottom: var(--space-content-header-padding-bottom-nvqytg, 24px);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
109
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99:not(#\9) {
|
|
110
110
|
display: grid;
|
|
111
111
|
grid-template-columns: minmax(0, 1fr);
|
|
112
112
|
grid-template-rows: auto var(--space-dark-header-overlap-distance-hfejul, 36px) 1fr;
|
|
113
113
|
min-height: 100%;
|
|
114
114
|
}
|
|
115
|
-
.
|
|
115
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99.awsui_is-overlap-disabled_5gtk3_1tyi9_115:not(#\9) {
|
|
116
116
|
grid-template-rows: auto 0 1fr;
|
|
117
117
|
}
|
|
118
|
-
.
|
|
118
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_background_5gtk3_1tyi9_102:not(#\9) {
|
|
119
119
|
background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
|
|
120
120
|
grid-column: 1;
|
|
121
121
|
grid-row: 1/3;
|
|
122
122
|
}
|
|
123
|
-
.
|
|
123
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_background_5gtk3_1tyi9_102.awsui_is-overlap-disabled_5gtk3_1tyi9_115:not(#\9) {
|
|
124
124
|
grid-row: 1/2;
|
|
125
125
|
}
|
|
126
|
-
.
|
|
126
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_header_5gtk3_1tyi9_105:not(#\9) {
|
|
127
127
|
grid-column: 1;
|
|
128
128
|
grid-row: 1;
|
|
129
129
|
padding-bottom: var(--space-content-header-padding-bottom-nvqytg, 24px);
|
|
130
130
|
}
|
|
131
131
|
@media (min-width: 689px) {
|
|
132
|
-
.
|
|
132
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_header_5gtk3_1tyi9_105.awsui_has-breadcrumbs_5gtk3_1tyi9_132:not(#\9) {
|
|
133
133
|
padding-top: var(--space-xxs-ynfts5, 4px);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
@media (max-width: 688px) {
|
|
137
|
-
.
|
|
137
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_header_5gtk3_1tyi9_105:not(#\9) {
|
|
138
138
|
padding: var(--space-m-17eucw, 16px) 0 var(--space-content-header-padding-bottom-nvqytg, 24px);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_content_5gtk3_1tyi9_141:not(#\9) {
|
|
142
142
|
grid-column: 1;
|
|
143
143
|
grid-row: 2/4;
|
|
144
144
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"layout": "
|
|
6
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
7
|
-
"background": "
|
|
8
|
-
"header": "
|
|
9
|
-
"is-overlap-disabled": "awsui_is-overlap-
|
|
10
|
-
"has-breadcrumbs": "awsui_has-
|
|
11
|
-
"content": "
|
|
5
|
+
"layout": "awsui_layout_5gtk3_1tyi9_99",
|
|
6
|
+
"is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1tyi9_99",
|
|
7
|
+
"background": "awsui_background_5gtk3_1tyi9_102",
|
|
8
|
+
"header": "awsui_header_5gtk3_1tyi9_105",
|
|
9
|
+
"is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1tyi9_115",
|
|
10
|
+
"has-breadcrumbs": "awsui_has-breadcrumbs_5gtk3_1tyi9_132",
|
|
11
|
+
"content": "awsui_content_5gtk3_1tyi9_141"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"focus-lock": "awsui_focus-
|
|
6
|
-
"calendar": "
|
|
7
|
-
"date-picker-container": "awsui_date-picker-
|
|
8
|
-
"date-picker-trigger": "awsui_date-picker-
|
|
9
|
-
"date-picker-input": "awsui_date-picker-
|
|
10
|
-
"open-calendar-button": "awsui_open-calendar-
|
|
4
|
+
"root": "awsui_root_145pa_1uao4_93",
|
|
5
|
+
"focus-lock": "awsui_focus-lock_145pa_1uao4_106",
|
|
6
|
+
"calendar": "awsui_calendar_145pa_1uao4_110",
|
|
7
|
+
"date-picker-container": "awsui_date-picker-container_145pa_1uao4_123",
|
|
8
|
+
"date-picker-trigger": "awsui_date-picker-trigger_145pa_1uao4_128",
|
|
9
|
+
"date-picker-input": "awsui_date-picker-input_145pa_1uao4_132",
|
|
10
|
+
"open-calendar-button": "awsui_open-calendar-button_145pa_1uao4_137"
|
|
11
11
|
};
|
|
12
12
|
|