@cloudscape-design/components 3.0.647 → 3.0.649
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/app-layout/drawer/index.js +2 -2
- package/app-layout/drawer/index.js.map +1 -1
- package/app-layout/mobile-toolbar/index.js +1 -1
- package/app-layout/mobile-toolbar/index.js.map +1 -1
- package/app-layout/utils/sticky-offsets.d.ts +1 -1
- package/app-layout/utils/sticky-offsets.d.ts.map +1 -1
- package/app-layout/utils/sticky-offsets.js +2 -2
- package/app-layout/utils/sticky-offsets.js.map +1 -1
- package/app-layout/visual-refresh/background.d.ts.map +1 -1
- package/app-layout/visual-refresh/background.js +2 -5
- package/app-layout/visual-refresh/background.js.map +1 -1
- package/app-layout/visual-refresh/breadcrumbs.d.ts.map +1 -1
- package/app-layout/visual-refresh/breadcrumbs.js +1 -2
- package/app-layout/visual-refresh/breadcrumbs.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts +0 -2
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +2 -7
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.js +2 -2
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/layout.d.ts.map +1 -1
- package/app-layout/visual-refresh/layout.js +1 -3
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.d.ts.map +1 -1
- package/app-layout/visual-refresh/main.js +2 -4
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/navigation.js +2 -2
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh/notifications.js +3 -1
- package/app-layout/visual-refresh/notifications.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +82 -83
- package/app-layout/visual-refresh/styles.scoped.css +168 -190
- package/app-layout/visual-refresh/styles.selectors.js +82 -83
- package/app-layout/visual-refresh/tools.js +2 -2
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +1 -1
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/app-layout/visual-refresh/use-background-overlap.d.ts +0 -6
- package/app-layout/visual-refresh/use-background-overlap.d.ts.map +1 -1
- package/app-layout/visual-refresh/use-background-overlap.js +0 -6
- package/app-layout/visual-refresh/use-background-overlap.js.map +1 -1
- package/button-dropdown/category-elements/category-element.js +1 -1
- package/button-dropdown/category-elements/category-element.js.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +7 -25
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +30 -29
- package/container/styles.scoped.css +60 -53
- package/container/styles.selectors.js +30 -29
- package/container/use-sticky-header.d.ts +3 -2
- package/container/use-sticky-header.d.ts.map +1 -1
- package/container/use-sticky-header.js +5 -3
- package/container/use-sticky-header.js.map +1 -1
- package/content-layout/internal.js +2 -2
- package/content-layout/internal.js.map +1 -1
- package/drawer/implementation.js +2 -2
- package/drawer/implementation.js.map +1 -1
- package/help-panel/implementation.js +2 -2
- package/help-panel/implementation.js.map +1 -1
- package/icon/icons.js +1 -1
- package/icon/interfaces.d.ts +1 -1
- package/icon/interfaces.d.ts.map +1 -1
- package/icon/interfaces.js.map +1 -1
- package/internal/analytics/index.d.ts +7 -1
- package/internal/analytics/index.d.ts.map +1 -1
- package/internal/analytics/index.js +10 -0
- package/internal/analytics/index.js.map +1 -1
- package/internal/analytics/interfaces.d.ts +12 -0
- package/internal/analytics/interfaces.d.ts.map +1 -1
- package/internal/analytics/interfaces.js.map +1 -1
- package/internal/base-component/index.d.ts +5 -3
- package/internal/base-component/index.d.ts.map +1 -1
- package/internal/base-component/index.js.map +1 -1
- package/internal/components/cartesian-chart/inline-start-labels.js +1 -1
- package/internal/components/cartesian-chart/inline-start-labels.js.map +1 -1
- package/internal/components/option/highlight-match.d.ts.map +1 -1
- package/internal/components/option/highlight-match.js +1 -2
- package/internal/components/option/highlight-match.js.map +1 -1
- package/internal/components/option/index.js +2 -2
- package/internal/components/option/index.js.map +1 -1
- package/internal/context/reset-contexts-for-modal.d.ts.map +1 -1
- package/internal/context/reset-contexts-for-modal.js +6 -8
- package/internal/context/reset-contexts-for-modal.js.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.d.ts +16 -2
- package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.js +51 -1
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/hooks/use-table-interaction-metrics/index.d.ts +10 -0
- package/internal/hooks/use-table-interaction-metrics/index.d.ts.map +1 -0
- package/internal/hooks/use-table-interaction-metrics/index.js +47 -0
- package/internal/hooks/use-table-interaction-metrics/index.js.map +1 -0
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/popover/index.d.ts +1 -1
- package/popover/index.d.ts.map +1 -1
- package/popover/index.js +2 -2
- package/popover/index.js.map +1 -1
- package/popover/interfaces.d.ts +5 -0
- package/popover/interfaces.d.ts.map +1 -1
- package/popover/interfaces.js.map +1 -1
- package/popover/internal.js +2 -2
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +50 -49
- package/popover/styles.scoped.css +74 -66
- package/popover/styles.selectors.js +50 -49
- package/slider/internal.js +1 -1
- package/slider/internal.js.map +1 -1
- package/slider/slider-labels.js +1 -1
- package/slider/slider-labels.js.map +1 -1
- package/slider/tick-marks.js +2 -2
- package/slider/tick-marks.js.map +1 -1
- package/split-panel/side.js +3 -3
- package/split-panel/side.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +23 -17
- package/table/internal.js.map +1 -1
- package/table/selection/selection-control.js +1 -1
- package/table/selection/selection-control.js.map +1 -1
- package/table/table-role/grid-navigation.d.ts.map +1 -1
- package/table/table-role/grid-navigation.js +40 -67
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/thead.d.ts +1 -0
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +5 -2
- package/table/thead.js.map +1 -1
- package/table/tools-header.d.ts +2 -1
- package/table/tools-header.d.ts.map +1 -1
- package/table/tools-header.js +4 -4
- package/table/tools-header.js.map +1 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js +106 -55
- package/tabs/tab-header-bar.js.map +1 -1
- package/token-group/dismiss-button.d.ts.map +1 -1
- package/token-group/dismiss-button.js +1 -2
- package/token-group/dismiss-button.js.map +1 -1
- package/wizard/wizard-form-header.js +1 -1
- package/wizard/wizard-form-header.js.map +1 -1
- package/wizard/wizard-form.js +1 -1
- package/wizard/wizard-form.js.map +1 -1
- package/wizard/wizard-navigation.js +3 -3
- package/wizard/wizard-navigation.js.map +1 -1
- package/internal/context/app-layout-context.d.ts +0 -8
- package/internal/context/app-layout-context.d.ts.map +0 -1
- package/internal/context/app-layout-context.js +0 -9
- package/internal/context/app-layout-context.js.map +0 -1
package/container/styles.css.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"fit-height": "awsui_fit-
|
|
6
|
-
"with-side-media": "awsui_with-side-
|
|
7
|
-
"variant-default": "awsui_variant-
|
|
8
|
-
"variant-stacked": "awsui_variant-
|
|
9
|
-
"refresh": "
|
|
10
|
-
"sticky-enabled": "awsui_sticky-
|
|
11
|
-
"with-top-media": "awsui_with-top-
|
|
12
|
-
"content-wrapper": "awsui_content-
|
|
13
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
14
|
-
"media": "
|
|
15
|
-
"media-top": "awsui_media-
|
|
16
|
-
"media-side": "awsui_media-
|
|
17
|
-
"header": "
|
|
18
|
-
"header-with-media": "awsui_header-with-
|
|
19
|
-
"header-sticky-disabled": "awsui_header-sticky-
|
|
20
|
-
"header-sticky-enabled": "awsui_header-sticky-
|
|
21
|
-
"header-stuck": "awsui_header-
|
|
22
|
-
"header-variant-cards": "awsui_header-variant-
|
|
23
|
-
"header-dynamic-height": "awsui_header-dynamic-
|
|
24
|
-
"with-paddings": "awsui_with-
|
|
25
|
-
"with-hidden-content": "awsui_with-hidden-
|
|
26
|
-
"header-variant-full-page": "awsui_header-variant-full-
|
|
27
|
-
"with-toolbar": "awsui_with-
|
|
28
|
-
"
|
|
29
|
-
"content
|
|
30
|
-
"content-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
4
|
+
"root": "awsui_root_14iqq_fgdim_103",
|
|
5
|
+
"fit-height": "awsui_fit-height_14iqq_fgdim_139",
|
|
6
|
+
"with-side-media": "awsui_with-side-media_14iqq_fgdim_144",
|
|
7
|
+
"variant-default": "awsui_variant-default_14iqq_fgdim_147",
|
|
8
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_fgdim_147",
|
|
9
|
+
"refresh": "awsui_refresh_14iqq_fgdim_155",
|
|
10
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_fgdim_205",
|
|
11
|
+
"with-top-media": "awsui_with-top-media_14iqq_fgdim_217",
|
|
12
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_fgdim_222",
|
|
13
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_fgdim_227",
|
|
14
|
+
"media": "awsui_media_14iqq_fgdim_234",
|
|
15
|
+
"media-top": "awsui_media-top_14iqq_fgdim_252",
|
|
16
|
+
"media-side": "awsui_media-side_14iqq_fgdim_257",
|
|
17
|
+
"header": "awsui_header_14iqq_fgdim_263",
|
|
18
|
+
"header-with-media": "awsui_header-with-media_14iqq_fgdim_268",
|
|
19
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_fgdim_274",
|
|
20
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_fgdim_278",
|
|
21
|
+
"header-stuck": "awsui_header-stuck_14iqq_fgdim_284",
|
|
22
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_fgdim_294",
|
|
23
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_fgdim_297",
|
|
24
|
+
"with-paddings": "awsui_with-paddings_14iqq_fgdim_303",
|
|
25
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_fgdim_312",
|
|
26
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_fgdim_370",
|
|
27
|
+
"with-toolbar": "awsui_with-toolbar_14iqq_fgdim_370",
|
|
28
|
+
"header-cover": "awsui_header-cover_14iqq_fgdim_376",
|
|
29
|
+
"content": "awsui_content_14iqq_fgdim_222",
|
|
30
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_fgdim_404",
|
|
31
|
+
"content-with-media": "awsui_content-with-media_14iqq_fgdim_414",
|
|
32
|
+
"footer": "awsui_footer_14iqq_fgdim_418",
|
|
33
|
+
"with-divider": "awsui_with-divider_14iqq_fgdim_422"
|
|
33
34
|
};
|
|
34
35
|
|
|
@@ -100,7 +100,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
100
100
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
101
101
|
SPDX-License-Identifier: Apache-2.0
|
|
102
102
|
*/
|
|
103
|
-
.
|
|
103
|
+
.awsui_root_14iqq_fgdim_103:not(#\9) {
|
|
104
104
|
border-collapse: separate;
|
|
105
105
|
border-spacing: 0;
|
|
106
106
|
box-sizing: border-box;
|
|
@@ -137,15 +137,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
137
137
|
word-wrap: break-word;
|
|
138
138
|
position: relative;
|
|
139
139
|
}
|
|
140
|
-
.
|
|
140
|
+
.awsui_root_14iqq_fgdim_103.awsui_fit-height_14iqq_fgdim_139:not(#\9) {
|
|
141
141
|
display: flex;
|
|
142
142
|
flex-direction: column;
|
|
143
143
|
block-size: 100%;
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_14iqq_fgdim_103.awsui_fit-height_14iqq_fgdim_139.awsui_with-side-media_14iqq_fgdim_144:not(#\9) {
|
|
146
146
|
flex-direction: row;
|
|
147
147
|
}
|
|
148
|
-
.
|
|
148
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-default_14iqq_fgdim_147:not(#\9), .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9) {
|
|
149
149
|
background-color: var(--color-background-container-content-4un1ap, #ffffff);
|
|
150
150
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
151
151
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
@@ -153,11 +153,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
153
153
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
154
154
|
box-sizing: border-box;
|
|
155
155
|
}
|
|
156
|
-
.
|
|
156
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-default_14iqq_fgdim_147.awsui_refresh_14iqq_fgdim_155:not(#\9), .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147.awsui_refresh_14iqq_fgdim_155:not(#\9) {
|
|
157
157
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
158
158
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-default_14iqq_fgdim_147:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::before, .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::before {
|
|
161
161
|
content: "";
|
|
162
162
|
position: absolute;
|
|
163
163
|
inset-inline-start: 0px;
|
|
@@ -175,7 +175,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
175
175
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
176
176
|
z-index: 1;
|
|
177
177
|
}
|
|
178
|
-
.
|
|
178
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-default_14iqq_fgdim_147:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::after, .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::after {
|
|
179
179
|
content: "";
|
|
180
180
|
position: absolute;
|
|
181
181
|
inset-inline-start: 0px;
|
|
@@ -191,141 +191,141 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
191
191
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
192
192
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9):not(:last-child), .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9):not(:last-child)::before, .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9):not(:last-child)::after {
|
|
195
195
|
border-end-end-radius: 0;
|
|
196
196
|
border-end-start-radius: 0;
|
|
197
197
|
border-block-end-width: 0;
|
|
198
198
|
}
|
|
199
|
-
.
|
|
199
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147 + .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9), .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147 + .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9)::before, .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147 + .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9)::after {
|
|
200
200
|
border-start-start-radius: 0;
|
|
201
201
|
border-start-end-radius: 0;
|
|
202
202
|
}
|
|
203
|
-
.
|
|
203
|
+
.awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147 + .awsui_root_14iqq_fgdim_103.awsui_variant-stacked_14iqq_fgdim_147:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::before {
|
|
204
204
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
205
205
|
}
|
|
206
|
-
.
|
|
206
|
+
.awsui_root_14iqq_fgdim_103.awsui_sticky-enabled_14iqq_fgdim_205:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::before {
|
|
207
207
|
inset-block-start: calc(-1 * var(--border-container-top-width-uugwwl, 0px));
|
|
208
208
|
}
|
|
209
|
-
.
|
|
209
|
+
.awsui_root_14iqq_fgdim_103.awsui_sticky-enabled_14iqq_fgdim_205:not(#\9):not(.awsui_refresh_14iqq_fgdim_155).awsui_variant-stacked_14iqq_fgdim_147::before {
|
|
210
210
|
inset-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.awsui_with-side-
|
|
213
|
+
.awsui_with-side-media_14iqq_fgdim_144:not(#\9) {
|
|
214
214
|
display: flex;
|
|
215
215
|
flex-direction: row;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.awsui_with-top-
|
|
218
|
+
.awsui_with-top-media_14iqq_fgdim_217:not(#\9) {
|
|
219
219
|
display: flex;
|
|
220
220
|
flex-direction: column;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
.awsui_content-
|
|
223
|
+
.awsui_content-wrapper_14iqq_fgdim_222:not(#\9) {
|
|
224
224
|
display: flex;
|
|
225
225
|
flex-direction: column;
|
|
226
226
|
inline-size: 100%;
|
|
227
227
|
}
|
|
228
|
-
.awsui_content-wrapper-fit-
|
|
228
|
+
.awsui_content-wrapper-fit-height_14iqq_fgdim_227:not(#\9) {
|
|
229
229
|
block-size: 100%;
|
|
230
230
|
overflow: hidden;
|
|
231
231
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
232
232
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
.
|
|
235
|
+
.awsui_media_14iqq_fgdim_234:not(#\9) {
|
|
236
236
|
overflow: hidden;
|
|
237
237
|
flex-shrink: 0;
|
|
238
238
|
}
|
|
239
|
-
.
|
|
240
|
-
.
|
|
241
|
-
.
|
|
239
|
+
.awsui_media_14iqq_fgdim_234 img:not(#\9),
|
|
240
|
+
.awsui_media_14iqq_fgdim_234 video:not(#\9),
|
|
241
|
+
.awsui_media_14iqq_fgdim_234 picture:not(#\9) {
|
|
242
242
|
inline-size: 100%;
|
|
243
243
|
block-size: 100%;
|
|
244
244
|
object-fit: cover;
|
|
245
245
|
object-position: center;
|
|
246
246
|
}
|
|
247
|
-
.
|
|
247
|
+
.awsui_media_14iqq_fgdim_234 iframe:not(#\9) {
|
|
248
248
|
inline-size: 100%;
|
|
249
249
|
block-size: 100%;
|
|
250
250
|
border-block: 0;
|
|
251
251
|
border-inline: 0;
|
|
252
252
|
}
|
|
253
|
-
.awsui_media-
|
|
253
|
+
.awsui_media-top_14iqq_fgdim_252:not(#\9) {
|
|
254
254
|
max-block-size: 66%;
|
|
255
255
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
256
256
|
border-start-end-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
257
257
|
}
|
|
258
|
-
.awsui_media-
|
|
258
|
+
.awsui_media-side_14iqq_fgdim_257:not(#\9) {
|
|
259
259
|
max-inline-size: 66%;
|
|
260
260
|
border-start-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
261
261
|
border-end-start-radius: calc(var(--border-radius-container-wqv1zi, 16px) - 1px);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.
|
|
264
|
+
.awsui_header_14iqq_fgdim_263:not(#\9) {
|
|
265
265
|
background-color: var(--color-background-container-header-8b9fgi, #ffffff);
|
|
266
266
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
267
267
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
268
268
|
}
|
|
269
|
-
.
|
|
269
|
+
.awsui_header_14iqq_fgdim_263.awsui_header-with-media_14iqq_fgdim_268:not(#\9) {
|
|
270
270
|
background: none;
|
|
271
271
|
}
|
|
272
|
-
.
|
|
272
|
+
.awsui_header_14iqq_fgdim_263.awsui_header-with-media_14iqq_fgdim_268:not(#\9):not(:empty) {
|
|
273
273
|
border-block-end: none;
|
|
274
274
|
}
|
|
275
|
-
.awsui_header-sticky-
|
|
275
|
+
.awsui_header-sticky-disabled_14iqq_fgdim_274:not(#\9) {
|
|
276
276
|
position: relative;
|
|
277
277
|
z-index: 1;
|
|
278
278
|
}
|
|
279
|
-
.awsui_header-sticky-
|
|
279
|
+
.awsui_header-sticky-enabled_14iqq_fgdim_278:not(#\9) {
|
|
280
280
|
inset-block-start: 0;
|
|
281
281
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
282
282
|
position: sticky;
|
|
283
283
|
z-index: 800;
|
|
284
284
|
}
|
|
285
|
-
.awsui_header-
|
|
285
|
+
.awsui_header-stuck_14iqq_fgdim_284:not(#\9) {
|
|
286
286
|
border-start-start-radius: 0;
|
|
287
287
|
border-start-end-radius: 0;
|
|
288
288
|
border-end-start-radius: 0;
|
|
289
289
|
border-end-end-radius: 0;
|
|
290
290
|
}
|
|
291
|
-
.awsui_header-
|
|
291
|
+
.awsui_header-stuck_14iqq_fgdim_284:not(#\9)::before {
|
|
292
292
|
border-block: 0;
|
|
293
293
|
border-inline: 0;
|
|
294
294
|
}
|
|
295
|
-
.awsui_header-
|
|
295
|
+
.awsui_header-stuck_14iqq_fgdim_284:not(#\9):not(.awsui_header-variant-cards_14iqq_fgdim_294) {
|
|
296
296
|
box-shadow: var(--shadow-sticky-embedded-uvh5ry, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
|
|
297
297
|
}
|
|
298
|
-
.awsui_header-dynamic-
|
|
298
|
+
.awsui_header-dynamic-height_14iqq_fgdim_297.awsui_header-stuck_14iqq_fgdim_284:not(#\9) {
|
|
299
299
|
margin-block-end: calc(var(--line-height-heading-xl-avbttk, 30px) - var(--line-height-heading-l-mmm3my, 24px));
|
|
300
300
|
}
|
|
301
|
-
.
|
|
301
|
+
.awsui_header_14iqq_fgdim_263:not(#\9):not(:empty) {
|
|
302
302
|
border-block-end: var(--border-container-sticky-width-6asz33, 0px) solid var(--color-border-container-divider-p2uygo, transparent);
|
|
303
303
|
}
|
|
304
|
-
.
|
|
304
|
+
.awsui_header_14iqq_fgdim_263.awsui_with-paddings_14iqq_fgdim_303:not(#\9) {
|
|
305
305
|
padding-block-start: var(--space-container-header-top-5qav00, 12px);
|
|
306
306
|
padding-block-end: var(--space-container-header-bottom-vj01hn, 8px);
|
|
307
307
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
308
308
|
}
|
|
309
|
-
.
|
|
309
|
+
.awsui_header_14iqq_fgdim_263.awsui_with-paddings_14iqq_fgdim_303.awsui_header-variant-cards_14iqq_fgdim_294:not(#\9) {
|
|
310
310
|
padding-block: var(--space-container-header-top-5qav00, 12px);
|
|
311
311
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
312
312
|
}
|
|
313
|
-
.
|
|
313
|
+
.awsui_header_14iqq_fgdim_263.awsui_with-hidden-content_14iqq_fgdim_312:not(#\9) {
|
|
314
314
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
315
315
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
316
316
|
}
|
|
317
|
-
.awsui_header-variant-
|
|
317
|
+
.awsui_header-variant-cards_14iqq_fgdim_294:not(#\9) {
|
|
318
318
|
border-start-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
319
319
|
border-start-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
320
320
|
border-end-start-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
321
321
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
322
322
|
box-sizing: border-box;
|
|
323
323
|
}
|
|
324
|
-
.awsui_header-variant-
|
|
324
|
+
.awsui_header-variant-cards_14iqq_fgdim_294.awsui_refresh_14iqq_fgdim_155:not(#\9) {
|
|
325
325
|
border-block: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
326
326
|
border-inline: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
327
327
|
}
|
|
328
|
-
.awsui_header-variant-
|
|
328
|
+
.awsui_header-variant-cards_14iqq_fgdim_294:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::before {
|
|
329
329
|
content: "";
|
|
330
330
|
position: absolute;
|
|
331
331
|
inset-inline-start: 0px;
|
|
@@ -343,7 +343,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
343
343
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
344
344
|
z-index: 1;
|
|
345
345
|
}
|
|
346
|
-
.awsui_header-variant-
|
|
346
|
+
.awsui_header-variant-cards_14iqq_fgdim_294:not(#\9):not(.awsui_refresh_14iqq_fgdim_155)::after {
|
|
347
347
|
content: "";
|
|
348
348
|
position: absolute;
|
|
349
349
|
inset-inline-start: 0px;
|
|
@@ -359,22 +359,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
359
359
|
border-end-end-radius: var(--border-radius-container-wqv1zi, 16px);
|
|
360
360
|
box-shadow: var(--shadow-container-fxmdn3, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
|
|
361
361
|
}
|
|
362
|
-
.awsui_header-variant-
|
|
362
|
+
.awsui_header-variant-cards_14iqq_fgdim_294:not(#\9):not(.awsui_header-sticky-enabled_14iqq_fgdim_278) {
|
|
363
363
|
position: relative;
|
|
364
364
|
}
|
|
365
|
-
.awsui_header-variant-
|
|
365
|
+
.awsui_header-variant-cards_14iqq_fgdim_294.awsui_header-stuck_14iqq_fgdim_284:not(#\9)::after, .awsui_header-variant-cards_14iqq_fgdim_294.awsui_header-stuck_14iqq_fgdim_284:not(#\9)::before {
|
|
366
366
|
border-block: 0;
|
|
367
367
|
border-inline: 0;
|
|
368
368
|
border-start-start-radius: 0;
|
|
369
369
|
border-start-end-radius: 0;
|
|
370
370
|
}
|
|
371
|
-
.awsui_header-variant-full-
|
|
371
|
+
.awsui_header-variant-full-page_14iqq_fgdim_370.awsui_with-toolbar_14iqq_fgdim_370:not(#\9) {
|
|
372
372
|
padding-block-start: var(--space-scaled-s-aqzyko, 12px);
|
|
373
373
|
}
|
|
374
|
-
.awsui_header-variant-full-
|
|
374
|
+
.awsui_header-variant-full-page_14iqq_fgdim_370.awsui_header-stuck_14iqq_fgdim_284:not(#\9) {
|
|
375
375
|
box-shadow: none;
|
|
376
376
|
}
|
|
377
|
-
.awsui_header-variant-full-
|
|
377
|
+
.awsui_header-variant-full-page_14iqq_fgdim_370.awsui_header-stuck_14iqq_fgdim_284 > .awsui_header-cover_14iqq_fgdim_376:not(#\9) {
|
|
378
|
+
background-color: var(--color-background-layout-main-nx09lr, #ffffff);
|
|
379
|
+
inline-size: 100%;
|
|
380
|
+
position: absolute;
|
|
381
|
+
block-size: var(--space-scaled-s-aqzyko, 12px);
|
|
382
|
+
inset-block-start: calc(-1 * var(--space-scaled-s-aqzyko, 12px));
|
|
383
|
+
}
|
|
384
|
+
.awsui_header-variant-full-page_14iqq_fgdim_370.awsui_header-stuck_14iqq_fgdim_284:not(#\9)::before {
|
|
378
385
|
content: "";
|
|
379
386
|
position: absolute;
|
|
380
387
|
pointer-events: none;
|
|
@@ -384,7 +391,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
384
391
|
inset-block-start: 0;
|
|
385
392
|
border-block-end: solid var(--border-divider-section-width-1061zr, 1px) var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
386
393
|
}
|
|
387
|
-
.awsui_header-variant-full-
|
|
394
|
+
.awsui_header-variant-full-page_14iqq_fgdim_370.awsui_header-stuck_14iqq_fgdim_284:not(#\9)::after {
|
|
388
395
|
content: "";
|
|
389
396
|
position: absolute;
|
|
390
397
|
inset: 0;
|
|
@@ -392,27 +399,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
392
399
|
clip-path: polygon(-999% 100%, 999% 100%, 999% 999%, -999% 999%);
|
|
393
400
|
}
|
|
394
401
|
|
|
395
|
-
.
|
|
402
|
+
.awsui_content_14iqq_fgdim_222:not(#\9) {
|
|
396
403
|
flex: 1;
|
|
397
404
|
}
|
|
398
|
-
.awsui_content-fit-
|
|
405
|
+
.awsui_content-fit-height_14iqq_fgdim_404:not(#\9) {
|
|
399
406
|
overflow: auto;
|
|
400
407
|
}
|
|
401
|
-
.
|
|
408
|
+
.awsui_content_14iqq_fgdim_222.awsui_with-paddings_14iqq_fgdim_303:not(#\9) {
|
|
402
409
|
padding-block: var(--space-scaled-l-0hpmd7, 20px);
|
|
403
410
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
404
411
|
}
|
|
405
|
-
.
|
|
412
|
+
.awsui_header_14iqq_fgdim_263 + .awsui_content_14iqq_fgdim_222.awsui_with-paddings_14iqq_fgdim_303:not(#\9) {
|
|
406
413
|
padding-block-start: var(--space-container-content-top-1ae0r3, 4px);
|
|
407
414
|
}
|
|
408
|
-
.
|
|
415
|
+
.awsui_header_14iqq_fgdim_263 + .awsui_content_14iqq_fgdim_222.awsui_with-paddings_14iqq_fgdim_303.awsui_content-with-media_14iqq_fgdim_414:not(#\9) {
|
|
409
416
|
padding-block-start: 0;
|
|
410
417
|
}
|
|
411
418
|
|
|
412
|
-
.
|
|
419
|
+
.awsui_footer_14iqq_fgdim_418.awsui_with-paddings_14iqq_fgdim_303:not(#\9) {
|
|
413
420
|
padding-block: var(--space-scaled-s-aqzyko, 12px);
|
|
414
421
|
padding-inline: var(--space-container-horizontal-wfukh3, 20px);
|
|
415
422
|
}
|
|
416
|
-
.
|
|
423
|
+
.awsui_footer_14iqq_fgdim_418.awsui_with-divider_14iqq_fgdim_422:not(#\9) {
|
|
417
424
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-j74lyz, #b6bec9);
|
|
418
425
|
}
|
|
@@ -2,34 +2,35 @@
|
|
|
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
|
-
"fit-height": "awsui_fit-
|
|
7
|
-
"with-side-media": "awsui_with-side-
|
|
8
|
-
"variant-default": "awsui_variant-
|
|
9
|
-
"variant-stacked": "awsui_variant-
|
|
10
|
-
"refresh": "
|
|
11
|
-
"sticky-enabled": "awsui_sticky-
|
|
12
|
-
"with-top-media": "awsui_with-top-
|
|
13
|
-
"content-wrapper": "awsui_content-
|
|
14
|
-
"content-wrapper-fit-height": "awsui_content-wrapper-fit-
|
|
15
|
-
"media": "
|
|
16
|
-
"media-top": "awsui_media-
|
|
17
|
-
"media-side": "awsui_media-
|
|
18
|
-
"header": "
|
|
19
|
-
"header-with-media": "awsui_header-with-
|
|
20
|
-
"header-sticky-disabled": "awsui_header-sticky-
|
|
21
|
-
"header-sticky-enabled": "awsui_header-sticky-
|
|
22
|
-
"header-stuck": "awsui_header-
|
|
23
|
-
"header-variant-cards": "awsui_header-variant-
|
|
24
|
-
"header-dynamic-height": "awsui_header-dynamic-
|
|
25
|
-
"with-paddings": "awsui_with-
|
|
26
|
-
"with-hidden-content": "awsui_with-hidden-
|
|
27
|
-
"header-variant-full-page": "awsui_header-variant-full-
|
|
28
|
-
"with-toolbar": "awsui_with-
|
|
29
|
-
"
|
|
30
|
-
"content
|
|
31
|
-
"content-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
5
|
+
"root": "awsui_root_14iqq_fgdim_103",
|
|
6
|
+
"fit-height": "awsui_fit-height_14iqq_fgdim_139",
|
|
7
|
+
"with-side-media": "awsui_with-side-media_14iqq_fgdim_144",
|
|
8
|
+
"variant-default": "awsui_variant-default_14iqq_fgdim_147",
|
|
9
|
+
"variant-stacked": "awsui_variant-stacked_14iqq_fgdim_147",
|
|
10
|
+
"refresh": "awsui_refresh_14iqq_fgdim_155",
|
|
11
|
+
"sticky-enabled": "awsui_sticky-enabled_14iqq_fgdim_205",
|
|
12
|
+
"with-top-media": "awsui_with-top-media_14iqq_fgdim_217",
|
|
13
|
+
"content-wrapper": "awsui_content-wrapper_14iqq_fgdim_222",
|
|
14
|
+
"content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_fgdim_227",
|
|
15
|
+
"media": "awsui_media_14iqq_fgdim_234",
|
|
16
|
+
"media-top": "awsui_media-top_14iqq_fgdim_252",
|
|
17
|
+
"media-side": "awsui_media-side_14iqq_fgdim_257",
|
|
18
|
+
"header": "awsui_header_14iqq_fgdim_263",
|
|
19
|
+
"header-with-media": "awsui_header-with-media_14iqq_fgdim_268",
|
|
20
|
+
"header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_fgdim_274",
|
|
21
|
+
"header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_fgdim_278",
|
|
22
|
+
"header-stuck": "awsui_header-stuck_14iqq_fgdim_284",
|
|
23
|
+
"header-variant-cards": "awsui_header-variant-cards_14iqq_fgdim_294",
|
|
24
|
+
"header-dynamic-height": "awsui_header-dynamic-height_14iqq_fgdim_297",
|
|
25
|
+
"with-paddings": "awsui_with-paddings_14iqq_fgdim_303",
|
|
26
|
+
"with-hidden-content": "awsui_with-hidden-content_14iqq_fgdim_312",
|
|
27
|
+
"header-variant-full-page": "awsui_header-variant-full-page_14iqq_fgdim_370",
|
|
28
|
+
"with-toolbar": "awsui_with-toolbar_14iqq_fgdim_370",
|
|
29
|
+
"header-cover": "awsui_header-cover_14iqq_fgdim_376",
|
|
30
|
+
"content": "awsui_content_14iqq_fgdim_222",
|
|
31
|
+
"content-fit-height": "awsui_content-fit-height_14iqq_fgdim_404",
|
|
32
|
+
"content-with-media": "awsui_content-with-media_14iqq_fgdim_414",
|
|
33
|
+
"footer": "awsui_footer_14iqq_fgdim_418",
|
|
34
|
+
"with-divider": "awsui_with-divider_14iqq_fgdim_422"
|
|
34
35
|
};
|
|
35
36
|
|
|
@@ -7,10 +7,11 @@ interface ComputeOffsetProps {
|
|
|
7
7
|
__stickyOffset?: number;
|
|
8
8
|
__mobileStickyOffset?: number;
|
|
9
9
|
hasInnerOverflowParents: boolean;
|
|
10
|
+
__additionalOffset?: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare function computeOffset({ isMobile, __stickyOffset, __mobileStickyOffset, hasInnerOverflowParents, }: ComputeOffsetProps): string;
|
|
12
|
+
export declare function computeOffset({ isMobile, __stickyOffset, __mobileStickyOffset, hasInnerOverflowParents, __additionalOffset, }: ComputeOffsetProps): string;
|
|
12
13
|
export declare const StickyHeaderContext: import("react").Context<StickyHeaderContextProps>;
|
|
13
|
-
export declare const useStickyHeader: (rootRef: RefObject<HTMLDivElement>, headerRef: RefObject<HTMLDivElement>, __stickyHeader?: boolean, __stickyOffset?: number, __mobileStickyOffset?: number, __disableMobile?: boolean) => {
|
|
14
|
+
export declare const useStickyHeader: (rootRef: RefObject<HTMLDivElement>, headerRef: RefObject<HTMLDivElement>, __stickyHeader?: boolean, __stickyOffset?: number, __mobileStickyOffset?: number, __disableMobile?: boolean, __additionalOffset?: boolean) => {
|
|
14
15
|
isSticky: boolean;
|
|
15
16
|
isStuck: boolean;
|
|
16
17
|
stickyStyles: {
|
|
@@ -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,EAAoE,MAAM,OAAO,CAAC;
|
|
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;AAOpG,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,OAAO,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,GACnB,EAAE,kBAAkB,GAAG,MAAM,CAQ7B;AAED,eAAO,MAAM,mBAAmB,mDAE9B,CAAC;AAEH,eAAO,MAAM,eAAe,YACjB,UAAU,cAAc,CAAC,aACvB,UAAU,cAAc,CAAC,mBACnB,OAAO,mBACP,MAAM,yBACA,MAAM,oBACX,OAAO;;;;;;;;;;CAoE1B,CAAC"}
|
|
@@ -5,18 +5,19 @@ import { findUpUntil } from '../internal/utils/dom';
|
|
|
5
5
|
import { getOverflowParents } from '../internal/utils/scrollable-containers';
|
|
6
6
|
import { useMobile } from '../internal/hooks/use-mobile';
|
|
7
7
|
import globalVars from '../internal/styles/global-vars';
|
|
8
|
-
|
|
8
|
+
import * as tokens from '../internal/generated/styles/tokens';
|
|
9
|
+
export function computeOffset({ isMobile, __stickyOffset, __mobileStickyOffset, hasInnerOverflowParents, __additionalOffset, }) {
|
|
9
10
|
const localOffset = isMobile ? (__stickyOffset !== null && __stickyOffset !== void 0 ? __stickyOffset : 0) - (__mobileStickyOffset !== null && __mobileStickyOffset !== void 0 ? __mobileStickyOffset : 0) : __stickyOffset !== null && __stickyOffset !== void 0 ? __stickyOffset : 0;
|
|
10
11
|
if (hasInnerOverflowParents || __stickyOffset !== undefined) {
|
|
11
12
|
return `${localOffset}px`;
|
|
12
13
|
}
|
|
13
14
|
const globalOffset = `var(${globalVars.stickyVerticalTopOffset}, 0px)`;
|
|
14
|
-
return `calc(${globalOffset} + ${localOffset}px)`;
|
|
15
|
+
return `calc(${globalOffset} + ${localOffset}px + ${__additionalOffset ? tokens.spaceScaledS : '0px'})`;
|
|
15
16
|
}
|
|
16
17
|
export const StickyHeaderContext = createContext({
|
|
17
18
|
isStuck: false,
|
|
18
19
|
});
|
|
19
|
-
export const useStickyHeader = (rootRef, headerRef, __stickyHeader, __stickyOffset, __mobileStickyOffset, __disableMobile =
|
|
20
|
+
export const useStickyHeader = (rootRef, headerRef, __stickyHeader, __stickyOffset, __mobileStickyOffset, __disableMobile, __additionalOffset = false) => {
|
|
20
21
|
const isMobile = useMobile();
|
|
21
22
|
const disableSticky = isMobile && __disableMobile;
|
|
22
23
|
const isSticky = !disableSticky && !!__stickyHeader;
|
|
@@ -39,6 +40,7 @@ export const useStickyHeader = (rootRef, headerRef, __stickyHeader, __stickyOffs
|
|
|
39
40
|
__stickyOffset,
|
|
40
41
|
__mobileStickyOffset,
|
|
41
42
|
hasInnerOverflowParents,
|
|
43
|
+
__additionalOffset,
|
|
42
44
|
});
|
|
43
45
|
const stickyStyles = isSticky
|
|
44
46
|
? {
|
|
@@ -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,MAAM,OAAO,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,UAAU,MAAM,gCAAgC,CAAC;
|
|
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,MAAM,OAAO,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,UAAU,MAAM,gCAAgC,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,qCAAqC,CAAC;AAc9D,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,GACC;IACnB,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,CAAC,CAAC,GAAG,CAAC,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,CAAC,CAAC,CAA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C,QAAQ,EAAE,YAAY,CAAC,CAAC;YAChD,OAAO,GAAG,EAAE;gBACV,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;QACR,OAAO;QACP,YAAY;KACb,CAAC;AACJ,CAAC,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 { findUpUntil } from '../internal/utils/dom';\nimport { getOverflowParents } from '../internal/utils/scrollable-containers';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport globalVars from '../internal/styles/global-vars';\nimport * as tokens from '../internal/generated/styles/tokens';\n\ninterface StickyHeaderContextProps {\n isStuck: boolean;\n}\n\ninterface ComputeOffsetProps {\n isMobile: boolean;\n __stickyOffset?: number;\n __mobileStickyOffset?: number;\n hasInnerOverflowParents: boolean;\n __additionalOffset?: boolean;\n}\n\nexport function computeOffset({\n isMobile,\n __stickyOffset,\n __mobileStickyOffset,\n hasInnerOverflowParents,\n __additionalOffset,\n}: ComputeOffsetProps): string {\n const localOffset = isMobile ? (__stickyOffset ?? 0) - (__mobileStickyOffset ?? 0) : __stickyOffset ?? 0;\n if (hasInnerOverflowParents || __stickyOffset !== undefined) {\n return `${localOffset}px`;\n }\n const globalOffset = `var(${globalVars.stickyVerticalTopOffset}, 0px)`;\n\n return `calc(${globalOffset} + ${localOffset}px + ${__additionalOffset ? tokens.spaceScaledS : '0px'})`;\n}\n\nexport const StickyHeaderContext = createContext<StickyHeaderContextProps>({\n isStuck: false,\n});\n\nexport const useStickyHeader = (\n rootRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n __stickyHeader?: boolean,\n __stickyOffset?: number,\n __mobileStickyOffset?: number,\n __disableMobile?: boolean,\n __additionalOffset = false\n) => {\n const isMobile = useMobile();\n const disableSticky = isMobile && __disableMobile;\n const isSticky = !disableSticky && !!__stickyHeader;\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 computedOffset = computeOffset({\n isMobile,\n __stickyOffset,\n __mobileStickyOffset,\n hasInnerOverflowParents,\n __additionalOffset,\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 rootTopBorderWidth = parseFloat(getComputedStyle(rootRef.current).borderTopWidth) || 0;\n const rootTop = rootRef.current.getBoundingClientRect().top + rootTopBorderWidth;\n const headerTop = headerRef.current.getBoundingClientRect().top;\n\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"]}
|
|
@@ -35,7 +35,7 @@ export default function InternalContentLayout(_a) {
|
|
|
35
35
|
}), style: {
|
|
36
36
|
[customCssProps.contentLayoutMaxContentWidth]: maxContentWidth < Number.MAX_VALUE ? `${maxContentWidth}px` : `${halfGeckoMaxCssLength}px`,
|
|
37
37
|
}, ref: mergedRef }),
|
|
38
|
-
React.createElement("div", { className: clsx(styles.background, { [styles['has-default-background']]: !headerBackgroundStyle }, contentHeaderClassName), ref: overlapElement }, headerBackgroundStyle && (React.createElement("div", { className:
|
|
38
|
+
React.createElement("div", { className: clsx(styles.background, { [styles['has-default-background']]: !headerBackgroundStyle }, contentHeaderClassName), ref: overlapElement }, headerBackgroundStyle && (React.createElement("div", { className: styles['header-background'], style: {
|
|
39
39
|
background: typeof headerBackgroundStyle === 'function' ? headerBackgroundStyle(mode) : headerBackgroundStyle,
|
|
40
40
|
} }))),
|
|
41
41
|
notifications && (React.createElement("div", { className: clsx(styles.notifications, testutilStyles.notifications, contentHeaderClassName) }, notifications)),
|
|
@@ -48,7 +48,7 @@ export default function InternalContentLayout(_a) {
|
|
|
48
48
|
}) },
|
|
49
49
|
React.createElement(InternalGrid, { gridDefinition: [{ colspan: { default: 12, xs: 9 } }, { colspan: { default: 12, xs: 3 } }] },
|
|
50
50
|
React.createElement("div", { className: clsx(testutilStyles.header, contentHeaderClassName) }, header),
|
|
51
|
-
React.createElement("div", { className:
|
|
51
|
+
React.createElement("div", { className: testutilStyles['secondary-header'] }, secondaryHeader)))),
|
|
52
52
|
React.createElement("div", { className: clsx(styles.content, {
|
|
53
53
|
[styles['with-divider']]: headerVariant === 'divider',
|
|
54
54
|
}) }, children)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/content-layout/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MA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ourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\nimport { ContentLayoutProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { highContrastHeaderClassName } from '../internal/utils/content-header-utils';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport { useCurrentMode } from '@cloudscape-design/component-toolkit/internal';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\nimport InternalGrid from '../grid/internal';\n\ntype InternalContentLayoutProps = ContentLayoutProps & InternalBaseComponentProps;\n\nconst halfGeckoMaxCssLength = ((1 << 30) - 1) / 120;\n// CSS lengths in Gecko are limited to at most (1<<30)-1 app units (Gecko uses 60 as app unit).\n// Limit the maxContentWidth to the half of the upper boundary (≈4230^2) to be on the safe side.\n\nexport default function InternalContentLayout({\n children,\n disableOverlap,\n header,\n headerVariant = 'default',\n headerBackgroundStyle,\n __internalRootRef,\n maxContentWidth = Number.MAX_VALUE,\n breadcrumbs,\n notifications,\n defaultPadding,\n secondaryHeader,\n ...rest\n}: InternalContentLayoutProps) {\n const mainRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(mainRef, __internalRootRef);\n\n const baseProps = getBaseProps(rest);\n\n const isVisualRefresh = useVisualRefresh();\n const mode = useCurrentMode(mainRef);\n\n const overlapElement = useDynamicOverlap();\n\n const isOverlapDisabled = !children || disableOverlap;\n\n const contentHeaderClassName =\n headerVariant === 'high-contrast' && isVisualRefresh ? highContrastHeaderClassName : '';\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.layout, {\n [styles['is-overlap-disabled']]: isOverlapDisabled,\n [styles['is-visual-refresh']]: isVisualRefresh,\n [styles['has-header']]: !!header,\n [styles['default-padding']]: !!defaultPadding,\n [styles['has-notifications']]: !!notifications,\n })}\n style={{\n [customCssProps.contentLayoutMaxContentWidth]:\n maxContentWidth < Number.MAX_VALUE ? `${maxContentWidth}px` : `${halfGeckoMaxCssLength}px`,\n }}\n ref={mergedRef}\n >\n <div\n className={clsx(\n styles.background,\n { [styles['has-default-background']]: !headerBackgroundStyle },\n contentHeaderClassName\n )}\n ref={overlapElement}\n >\n {headerBackgroundStyle && (\n <div\n className={styles['header-background']}\n style={{\n background:\n typeof headerBackgroundStyle === 'function' ? headerBackgroundStyle(mode) : headerBackgroundStyle,\n }}\n />\n )}\n </div>\n {notifications && (\n <div className={clsx(styles.notifications, testutilStyles.notifications, contentHeaderClassName)}>\n {notifications}\n </div>\n )}\n {breadcrumbs && (\n <div className={clsx(styles.breadcrumbs, testutilStyles.breadcrumbs, contentHeaderClassName)}>\n {breadcrumbs}\n </div>\n )}\n {header && !secondaryHeader && (\n <div\n className={clsx(styles['header-wrapper'], testutilStyles.header, contentHeaderClassName, {\n [styles['with-divider']]: headerVariant === 'divider',\n })}\n >\n {header}\n </div>\n )}\n {header && secondaryHeader && (\n <div\n className={clsx(styles['header-wrapper'], {\n [styles['with-divider']]: headerVariant === 'divider',\n })}\n >\n <InternalGrid gridDefinition={[{ colspan: { default: 12, xs: 9 } }, { colspan: { default: 12, xs: 3 } }]}>\n <div className={clsx(testutilStyles.header, contentHeaderClassName)}>{header}</div>\n <div className={testutilStyles['secondary-header']}>{secondaryHeader}</div>\n </InternalGrid>\n </div>\n )}\n\n <div\n className={clsx(styles.content, {\n [styles['with-divider']]: headerVariant === 'divider',\n })}\n >\n {children}\n </div>\n </div>\n );\n}\n"]}
|
package/drawer/implementation.js
CHANGED
|
@@ -17,8 +17,8 @@ export function DrawerImplementation(_a) {
|
|
|
17
17
|
return loading ? (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
18
18
|
React.createElement(InternalStatusIndicator, { type: "loading" },
|
|
19
19
|
React.createElement(LiveRegion, { visible: true }, i18n('i18nStrings.loadingText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.loadingText))))) : (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
20
|
-
header && React.createElement("div", { className:
|
|
21
|
-
React.createElement("div", { className:
|
|
20
|
+
header && React.createElement("div", { className: styles.header }, header),
|
|
21
|
+
React.createElement("div", { className: styles['test-utils-drawer-content'] }, children)));
|
|
22
22
|
}
|
|
23
23
|
export const createWidgetizedDrawer = createWidgetizedComponent(DrawerImplementation);
|
|
24
24
|
//# sourceMappingURL=implementation.js.map
|