@cloudscape-design/components 3.0.387 → 3.0.389
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/anchor-navigation/index.d.ts +5 -0
- package/anchor-navigation/index.d.ts.map +1 -0
- package/anchor-navigation/index.js +14 -0
- package/anchor-navigation/index.js.map +1 -0
- package/anchor-navigation/interfaces.d.ts +67 -0
- package/anchor-navigation/interfaces.d.ts.map +1 -0
- package/anchor-navigation/interfaces.js +4 -0
- package/anchor-navigation/interfaces.js.map +1 -0
- package/anchor-navigation/internal.d.ts +5 -0
- package/anchor-navigation/internal.d.ts.map +1 -0
- package/anchor-navigation/internal.js +48 -0
- package/anchor-navigation/internal.js.map +1 -0
- package/anchor-navigation/styles.css.js +13 -0
- package/anchor-navigation/styles.scoped.css +243 -0
- package/anchor-navigation/styles.selectors.js +14 -0
- package/anchor-navigation/test-classes/styles.css.js +11 -0
- package/anchor-navigation/test-classes/styles.scoped.css +27 -0
- package/anchor-navigation/test-classes/styles.selectors.js +12 -0
- package/anchor-navigation/use-scroll-spy.d.ts +18 -0
- package/anchor-navigation/use-scroll-spy.d.ts.map +1 -0
- package/anchor-navigation/use-scroll-spy.js +74 -0
- package/anchor-navigation/use-scroll-spy.js.map +1 -0
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -30
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/visual-refresh/styles.css.js +75 -75
- package/app-layout/visual-refresh/styles.scoped.css +295 -295
- package/app-layout/visual-refresh/styles.selectors.js +75 -75
- package/button/styles.css.js +20 -20
- package/button/styles.scoped.css +151 -152
- package/button/styles.selectors.js +20 -20
- package/button-dropdown/item-element/styles.css.js +15 -15
- package/button-dropdown/item-element/styles.scoped.css +18 -19
- package/button-dropdown/item-element/styles.selectors.js +15 -15
- package/cards/index.js +2 -2
- package/cards/index.js.map +1 -1
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +129 -131
- package/code-editor/styles.selectors.js +32 -32
- package/collection-preferences/content-display/styles.css.js +11 -11
- package/collection-preferences/content-display/styles.scoped.css +17 -18
- package/collection-preferences/content-display/styles.selectors.js +11 -11
- package/collection-preferences/styles.css.js +37 -37
- package/collection-preferences/styles.scoped.css +44 -45
- package/collection-preferences/styles.selectors.js +37 -37
- package/container/index.d.ts.map +1 -1
- package/container/index.js +2 -2
- package/container/index.js.map +1 -1
- package/container/internal.d.ts +5 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +7 -4
- package/container/internal.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/expandable-section/expandable-section-container.d.ts +5 -3
- package/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/expandable-section/expandable-section-container.js +2 -2
- package/expandable-section/expandable-section-container.js.map +1 -1
- package/expandable-section/index.d.ts.map +1 -1
- package/expandable-section/index.js +8 -3
- package/expandable-section/index.js.map +1 -1
- package/expandable-section/internal.d.ts +3 -3
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js +2 -2
- package/expandable-section/internal.js.map +1 -1
- package/expandable-section/styles.css.js +29 -29
- package/expandable-section/styles.scoped.css +58 -59
- package/expandable-section/styles.selectors.js +29 -29
- package/flashbar/styles.css.js +47 -47
- package/flashbar/styles.scoped.css +171 -172
- package/flashbar/styles.selectors.js +47 -47
- package/form-field/styles.css.js +19 -19
- package/form-field/styles.scoped.css +29 -30
- package/form-field/styles.selectors.js +19 -19
- package/header/styles.css.js +32 -32
- package/header/styles.scoped.css +48 -49
- package/header/styles.selectors.js +32 -32
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/analytics/components/analytics-funnel.d.ts +3 -2
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +20 -5
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
- package/internal/analytics/hooks/use-funnel.js +2 -1
- package/internal/analytics/hooks/use-funnel.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +13 -13
- package/internal/components/abstract-switch/styles.scoped.css +19 -21
- package/internal/components/abstract-switch/styles.selectors.js +13 -13
- package/internal/components/dropdown/dropdown-fit-handler.d.ts +31 -2
- package/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
- package/internal/components/dropdown/dropdown-fit-handler.js +49 -7
- package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
- package/internal/components/dropdown/index.d.ts.map +1 -1
- package/internal/components/dropdown/index.js +20 -2
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown/styles.css.js +21 -21
- package/internal/components/dropdown/styles.scoped.css +37 -36
- package/internal/components/dropdown/styles.selectors.js +21 -21
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +13 -14
- 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 +29 -30
- package/internal/components/option/styles.selectors.js +17 -17
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +40 -39
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/scrollable-containers.d.ts +6 -1
- package/internal/utils/scrollable-containers.d.ts.map +1 -1
- package/internal/utils/scrollable-containers.js +1 -1
- package/internal/utils/scrollable-containers.js.map +1 -1
- package/modal/internal.d.ts.map +1 -1
- package/modal/internal.js +6 -4
- package/modal/internal.js.map +1 -1
- package/package.json +2 -1
- package/progress-bar/styles.css.js +18 -18
- package/progress-bar/styles.scoped.css +32 -33
- package/progress-bar/styles.selectors.js +18 -18
- package/property-filter/styles.css.js +30 -30
- package/property-filter/styles.scoped.css +32 -33
- package/property-filter/styles.selectors.js +30 -30
- package/side-navigation/styles.css.js +28 -28
- package/side-navigation/styles.scoped.css +38 -39
- package/side-navigation/styles.selectors.js +28 -28
- package/split-panel/styles.css.js +56 -56
- package/split-panel/styles.scoped.css +77 -78
- package/split-panel/styles.selectors.js +56 -56
- package/status-indicator/internal.d.ts.map +1 -1
- package/status-indicator/internal.js +3 -1
- package/status-indicator/internal.js.map +1 -1
- package/status-indicator/styles.css.js +22 -22
- package/status-indicator/styles.scoped.css +36 -34
- package/status-indicator/styles.selectors.js +22 -22
- package/table/header-cell/index.d.ts +1 -4
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +2 -2
- package/table/header-cell/index.js.map +1 -1
- package/table/index.d.ts.map +1 -1
- package/table/index.js +8 -4
- package/table/index.js.map +1 -1
- package/table/internal.d.ts +1 -0
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +9 -10
- package/table/internal.js.map +1 -1
- package/table/resizer/index.d.ts +3 -6
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +59 -119
- package/table/resizer/index.js.map +1 -1
- package/table/resizer/resizer-lookup.d.ts +8 -0
- package/table/resizer/resizer-lookup.d.ts.map +1 -0
- package/table/resizer/resizer-lookup.js +39 -0
- package/table/resizer/resizer-lookup.js.map +1 -0
- package/table/sticky-columns/utils.js +2 -2
- package/table/sticky-columns/utils.js.map +1 -1
- package/table/thead.d.ts +0 -1
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +2 -2
- package/table/thead.js.map +1 -1
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +39 -40
- package/tabs/styles.selectors.js +21 -21
- package/test-utils/dom/anchor-navigation/index.d.ts +16 -0
- package/test-utils/dom/anchor-navigation/index.js +58 -0
- package/test-utils/dom/anchor-navigation/index.js.map +1 -0
- package/test-utils/dom/index.d.ts +3 -0
- package/test-utils/dom/index.js +10 -2
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/selectors/anchor-navigation/index.d.ts +15 -0
- package/test-utils/selectors/anchor-navigation/index.js +45 -0
- package/test-utils/selectors/anchor-navigation/index.js.map +1 -0
- package/test-utils/selectors/index.d.ts +3 -0
- package/test-utils/selectors/index.js +10 -2
- package/test-utils/selectors/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/tiles/styles.css.js +29 -29
- package/tiles/styles.scoped.css +70 -71
- package/tiles/styles.selectors.js +29 -29
- package/wizard/styles.css.js +31 -31
- package/wizard/styles.scoped.css +64 -68
- package/wizard/styles.selectors.js +31 -31
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"option": "
|
|
5
|
-
"disabled": "
|
|
6
|
-
"parent": "
|
|
7
|
-
"highlighted": "
|
|
8
|
-
"content": "
|
|
9
|
-
"label-content": "awsui_label-
|
|
10
|
-
"label": "
|
|
11
|
-
"tag": "
|
|
12
|
-
"label-tag": "awsui_label-
|
|
13
|
-
"label-prefix": "awsui_label-
|
|
14
|
-
"tags": "
|
|
15
|
-
"description": "
|
|
16
|
-
"selected": "
|
|
17
|
-
"icon": "
|
|
18
|
-
"icon-size-big": "awsui_icon-size-
|
|
19
|
-
"filtering-match-highlight": "awsui_filtering-match-
|
|
20
|
-
"trigger-variant": "awsui_trigger-
|
|
4
|
+
"option": "awsui_option_1p2cx_1c2xj_97",
|
|
5
|
+
"disabled": "awsui_disabled_1p2cx_1c2xj_115",
|
|
6
|
+
"parent": "awsui_parent_1p2cx_1c2xj_118",
|
|
7
|
+
"highlighted": "awsui_highlighted_1p2cx_1c2xj_121",
|
|
8
|
+
"content": "awsui_content_1p2cx_1c2xj_125",
|
|
9
|
+
"label-content": "awsui_label-content_1p2cx_1c2xj_132",
|
|
10
|
+
"label": "awsui_label_1p2cx_1c2xj_132",
|
|
11
|
+
"tag": "awsui_tag_1p2cx_1c2xj_139",
|
|
12
|
+
"label-tag": "awsui_label-tag_1p2cx_1c2xj_140",
|
|
13
|
+
"label-prefix": "awsui_label-prefix_1p2cx_1c2xj_150",
|
|
14
|
+
"tags": "awsui_tags_1p2cx_1c2xj_163",
|
|
15
|
+
"description": "awsui_description_1p2cx_1c2xj_164",
|
|
16
|
+
"selected": "awsui_selected_1p2cx_1c2xj_175",
|
|
17
|
+
"icon": "awsui_icon_1p2cx_1c2xj_189",
|
|
18
|
+
"icon-size-big": "awsui_icon-size-big_1p2cx_1c2xj_196",
|
|
19
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_1c2xj_200",
|
|
20
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_1c2xj_215"
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -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_option_1p2cx_1c2xj_97:not(#\9) {
|
|
98
98
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
99
99
|
border-collapse: separate;
|
|
100
100
|
border-spacing: 0;
|
|
@@ -138,108 +138,107 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
138
138
|
box-sizing: border-box;
|
|
139
139
|
color: inherit;
|
|
140
140
|
}
|
|
141
|
-
.
|
|
141
|
+
.awsui_option_1p2cx_1c2xj_97:not(#\9):not(.awsui_disabled_1p2cx_1c2xj_115) {
|
|
142
142
|
cursor: inherit;
|
|
143
143
|
}
|
|
144
|
-
.
|
|
144
|
+
.awsui_option_1p2cx_1c2xj_97.awsui_parent_1p2cx_1c2xj_118:not(#\9) {
|
|
145
145
|
font-weight: bold;
|
|
146
146
|
}
|
|
147
|
-
.
|
|
147
|
+
.awsui_option_1p2cx_1c2xj_97.awsui_parent_1p2cx_1c2xj_118:not(#\9):not(.awsui_disabled_1p2cx_1c2xj_115):not(.awsui_highlighted_1p2cx_1c2xj_121) {
|
|
148
148
|
color: var(--color-text-dropdown-group-label-mej1lb, #414d5c);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
.
|
|
151
|
+
.awsui_content_1p2cx_1c2xj_125:not(#\9) {
|
|
152
152
|
width: 100%;
|
|
153
153
|
display: flex;
|
|
154
154
|
flex-direction: column;
|
|
155
155
|
min-width: 0;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.awsui_label-
|
|
158
|
+
.awsui_label-content_1p2cx_1c2xj_132:not(#\9) {
|
|
159
159
|
display: flex;
|
|
160
160
|
justify-content: space-between;
|
|
161
161
|
flex-wrap: wrap;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.
|
|
165
|
-
.
|
|
166
|
-
.awsui_label-
|
|
164
|
+
.awsui_label_1p2cx_1c2xj_132:not(#\9),
|
|
165
|
+
.awsui_tag_1p2cx_1c2xj_139:not(#\9),
|
|
166
|
+
.awsui_label-tag_1p2cx_1c2xj_140:not(#\9) {
|
|
167
167
|
min-width: 0;
|
|
168
|
-
-ms-word-break: break-all;
|
|
169
168
|
word-break: break-word;
|
|
170
169
|
}
|
|
171
170
|
|
|
172
|
-
.
|
|
173
|
-
.
|
|
171
|
+
.awsui_label_1p2cx_1c2xj_132:not(#\9),
|
|
172
|
+
.awsui_tag_1p2cx_1c2xj_139:not(#\9) {
|
|
174
173
|
flex-wrap: wrap;
|
|
175
174
|
}
|
|
176
175
|
|
|
177
|
-
.awsui_label-
|
|
176
|
+
.awsui_label-prefix_1p2cx_1c2xj_150:not(#\9) {
|
|
178
177
|
font-weight: 700;
|
|
179
178
|
}
|
|
180
179
|
|
|
181
|
-
.awsui_label-
|
|
180
|
+
.awsui_label-tag_1p2cx_1c2xj_140:not(#\9) {
|
|
182
181
|
padding-left: var(--space-s-34lx8l, 12px);
|
|
183
182
|
flex: auto;
|
|
184
183
|
text-align: right;
|
|
185
184
|
}
|
|
186
|
-
.awsui_label-
|
|
185
|
+
.awsui_label-tag_1p2cx_1c2xj_140:not(#\9):empty {
|
|
187
186
|
display: none;
|
|
188
187
|
}
|
|
189
188
|
|
|
190
|
-
.
|
|
191
|
-
.
|
|
189
|
+
.awsui_tags_1p2cx_1c2xj_163:not(#\9),
|
|
190
|
+
.awsui_description_1p2cx_1c2xj_164:not(#\9) {
|
|
192
191
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
193
192
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
194
193
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
195
194
|
color: var(--color-text-dropdown-item-secondary-jho0ju, #5f6b7a);
|
|
196
195
|
flex-wrap: wrap;
|
|
197
196
|
}
|
|
198
|
-
.
|
|
199
|
-
.
|
|
197
|
+
.awsui_tags_1p2cx_1c2xj_163.awsui_highlighted_1p2cx_1c2xj_121:not(#\9),
|
|
198
|
+
.awsui_description_1p2cx_1c2xj_164.awsui_highlighted_1p2cx_1c2xj_121:not(#\9) {
|
|
200
199
|
color: var(--color-text-dropdown-item-secondary-hover-zfmqjr, #5f6b7a);
|
|
201
200
|
}
|
|
202
|
-
.
|
|
203
|
-
.
|
|
201
|
+
.awsui_tags_1p2cx_1c2xj_163.awsui_selected_1p2cx_1c2xj_175:not(#\9),
|
|
202
|
+
.awsui_description_1p2cx_1c2xj_164.awsui_selected_1p2cx_1c2xj_175:not(#\9) {
|
|
204
203
|
color: var(--color-text-dropdown-item-secondary-jho0ju, #5f6b7a);
|
|
205
204
|
}
|
|
206
205
|
|
|
207
|
-
.
|
|
206
|
+
.awsui_tags_1p2cx_1c2xj_163:not(#\9) {
|
|
208
207
|
display: flex;
|
|
209
208
|
align-items: stretch;
|
|
210
209
|
}
|
|
211
210
|
|
|
212
|
-
.
|
|
211
|
+
.awsui_tag_1p2cx_1c2xj_139:not(#\9):not(:last-child) {
|
|
213
212
|
padding-right: var(--space-m-udix3p, 16px);
|
|
214
213
|
}
|
|
215
214
|
|
|
216
|
-
.
|
|
215
|
+
.awsui_icon_1p2cx_1c2xj_189:not(#\9) {
|
|
217
216
|
padding-right: var(--space-xs-zb16t3, 8px);
|
|
218
217
|
align-content: center;
|
|
219
218
|
display: flex;
|
|
220
219
|
flex-shrink: 0;
|
|
221
220
|
}
|
|
222
221
|
|
|
223
|
-
.awsui_icon-size-
|
|
222
|
+
.awsui_icon-size-big_1p2cx_1c2xj_196:not(#\9) {
|
|
224
223
|
padding-top: var(--space-option-icon-big-top-hybljv, 0px);
|
|
225
224
|
}
|
|
226
225
|
|
|
227
|
-
.awsui_filtering-match-
|
|
226
|
+
.awsui_filtering-match-highlight_1p2cx_1c2xj_200:not(#\9) {
|
|
228
227
|
background-color: var(--color-background-dropdown-item-filter-match-h5rjsp, #f2f8fd);
|
|
229
228
|
color: var(--color-text-dropdown-item-filter-match-6moumb, #0972d3);
|
|
230
229
|
font-weight: bold;
|
|
231
230
|
}
|
|
232
231
|
|
|
233
|
-
.
|
|
232
|
+
.awsui_disabled_1p2cx_1c2xj_115:not(#\9) {
|
|
234
233
|
color: var(--color-text-dropdown-item-disabled-6oq3n6, #9ba7b6);
|
|
235
234
|
pointer-events: none;
|
|
236
235
|
}
|
|
237
|
-
.
|
|
238
|
-
.
|
|
236
|
+
.awsui_disabled_1p2cx_1c2xj_115 > .awsui_content_1p2cx_1c2xj_125 > .awsui_tags_1p2cx_1c2xj_163:not(#\9),
|
|
237
|
+
.awsui_disabled_1p2cx_1c2xj_115 > .awsui_content_1p2cx_1c2xj_125 > .awsui_description_1p2cx_1c2xj_164:not(#\9) {
|
|
239
238
|
color: currentColor;
|
|
240
239
|
}
|
|
241
240
|
|
|
242
|
-
.awsui_trigger-
|
|
241
|
+
.awsui_trigger-variant_1p2cx_1c2xj_215:not(#\9) {
|
|
243
242
|
white-space: nowrap;
|
|
244
243
|
overflow: hidden;
|
|
245
244
|
text-overflow: ellipsis;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"option": "
|
|
6
|
-
"disabled": "
|
|
7
|
-
"parent": "
|
|
8
|
-
"highlighted": "
|
|
9
|
-
"content": "
|
|
10
|
-
"label-content": "awsui_label-
|
|
11
|
-
"label": "
|
|
12
|
-
"tag": "
|
|
13
|
-
"label-tag": "awsui_label-
|
|
14
|
-
"label-prefix": "awsui_label-
|
|
15
|
-
"tags": "
|
|
16
|
-
"description": "
|
|
17
|
-
"selected": "
|
|
18
|
-
"icon": "
|
|
19
|
-
"icon-size-big": "awsui_icon-size-
|
|
20
|
-
"filtering-match-highlight": "awsui_filtering-match-
|
|
21
|
-
"trigger-variant": "awsui_trigger-
|
|
5
|
+
"option": "awsui_option_1p2cx_1c2xj_97",
|
|
6
|
+
"disabled": "awsui_disabled_1p2cx_1c2xj_115",
|
|
7
|
+
"parent": "awsui_parent_1p2cx_1c2xj_118",
|
|
8
|
+
"highlighted": "awsui_highlighted_1p2cx_1c2xj_121",
|
|
9
|
+
"content": "awsui_content_1p2cx_1c2xj_125",
|
|
10
|
+
"label-content": "awsui_label-content_1p2cx_1c2xj_132",
|
|
11
|
+
"label": "awsui_label_1p2cx_1c2xj_132",
|
|
12
|
+
"tag": "awsui_tag_1p2cx_1c2xj_139",
|
|
13
|
+
"label-tag": "awsui_label-tag_1p2cx_1c2xj_140",
|
|
14
|
+
"label-prefix": "awsui_label-prefix_1p2cx_1c2xj_150",
|
|
15
|
+
"tags": "awsui_tags_1p2cx_1c2xj_163",
|
|
16
|
+
"description": "awsui_description_1p2cx_1c2xj_164",
|
|
17
|
+
"selected": "awsui_selected_1p2cx_1c2xj_175",
|
|
18
|
+
"icon": "awsui_icon_1p2cx_1c2xj_189",
|
|
19
|
+
"icon-size-big": "awsui_icon-size-big_1p2cx_1c2xj_196",
|
|
20
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_1c2xj_200",
|
|
21
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_1c2xj_215"
|
|
22
22
|
};
|
|
23
23
|
|
package/internal/environment.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAyClD,CAAC;AACF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
const customCSSPropertiesMap = {
|
|
2
|
-
breadcrumbsGap: '--awsui-breadcrumbs-gap-
|
|
3
|
-
contentGapLeft: '--awsui-content-gap-left-
|
|
4
|
-
contentGapRight: '--awsui-content-gap-right-
|
|
5
|
-
contentHeight: '--awsui-content-height-
|
|
6
|
-
containerFirstGap: '--awsui-container-first-gap-
|
|
7
|
-
containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-
|
|
8
|
-
defaultMaxContentWidth: '--awsui-default-max-content-width-
|
|
9
|
-
defaultMinContentWidth: '--awsui-default-min-content-width-
|
|
10
|
-
drawerSize: '--awsui-drawer-size-
|
|
11
|
-
footerHeight: '--awsui-footer-height-
|
|
12
|
-
headerGap: '--awsui-header-gap-
|
|
13
|
-
headerHeight: '--awsui-header-height-
|
|
14
|
-
layoutWidth: '--awsui-layout-width-
|
|
15
|
-
mainGap: '--awsui-main-gap-
|
|
16
|
-
mainOffsetLeft: '--awsui-main-offset-left-
|
|
17
|
-
mainTemplateRows: '--awsui-main-template-rows-
|
|
18
|
-
maxContentWidth: '--awsui-max-content-width-
|
|
19
|
-
minContentWidth: '--awsui-min-content-width-
|
|
20
|
-
mobileBarHeight: '--awsui-mobile-bar-height-
|
|
21
|
-
notificationsGap: '--awsui-notifications-gap-
|
|
22
|
-
notificationsHeight: '--awsui-notifications-height-
|
|
23
|
-
offsetTop: '--awsui-offset-top-
|
|
24
|
-
offsetTopWithNotifications: '--awsui-offset-top-with-notifications-
|
|
25
|
-
overlapHeight: '--awsui-overlap-height-
|
|
26
|
-
navigationWidth: '--awsui-navigation-width-
|
|
27
|
-
splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-
|
|
28
|
-
splitPanelReportedSize: '--awsui-split-panel-reported-size-
|
|
29
|
-
splitPanelHeight: '--awsui-split-panel-height-
|
|
30
|
-
splitPanelMinWidth: '--awsui-split-panel-min-width-
|
|
31
|
-
splitPanelMaxWidth: '--awsui-split-panel-max-width-
|
|
32
|
-
toolsMaxWidth: '--awsui-tools-max-width-
|
|
33
|
-
toolsWidth: '--awsui-tools-width-
|
|
34
|
-
toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-
|
|
35
|
-
contentScrollMargin: '--awsui-content-scroll-margin-
|
|
36
|
-
flashbarStackDepth: '--awsui-flashbar-stack-depth-
|
|
37
|
-
flashbarStackIndex: '--awsui-flashbar-stack-index-
|
|
38
|
-
flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-
|
|
39
|
-
stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-
|
|
40
|
-
stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-
|
|
2
|
+
breadcrumbsGap: '--awsui-breadcrumbs-gap-y98gph',
|
|
3
|
+
contentGapLeft: '--awsui-content-gap-left-y98gph',
|
|
4
|
+
contentGapRight: '--awsui-content-gap-right-y98gph',
|
|
5
|
+
contentHeight: '--awsui-content-height-y98gph',
|
|
6
|
+
containerFirstGap: '--awsui-container-first-gap-y98gph',
|
|
7
|
+
containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-y98gph',
|
|
8
|
+
defaultMaxContentWidth: '--awsui-default-max-content-width-y98gph',
|
|
9
|
+
defaultMinContentWidth: '--awsui-default-min-content-width-y98gph',
|
|
10
|
+
drawerSize: '--awsui-drawer-size-y98gph',
|
|
11
|
+
footerHeight: '--awsui-footer-height-y98gph',
|
|
12
|
+
headerGap: '--awsui-header-gap-y98gph',
|
|
13
|
+
headerHeight: '--awsui-header-height-y98gph',
|
|
14
|
+
layoutWidth: '--awsui-layout-width-y98gph',
|
|
15
|
+
mainGap: '--awsui-main-gap-y98gph',
|
|
16
|
+
mainOffsetLeft: '--awsui-main-offset-left-y98gph',
|
|
17
|
+
mainTemplateRows: '--awsui-main-template-rows-y98gph',
|
|
18
|
+
maxContentWidth: '--awsui-max-content-width-y98gph',
|
|
19
|
+
minContentWidth: '--awsui-min-content-width-y98gph',
|
|
20
|
+
mobileBarHeight: '--awsui-mobile-bar-height-y98gph',
|
|
21
|
+
notificationsGap: '--awsui-notifications-gap-y98gph',
|
|
22
|
+
notificationsHeight: '--awsui-notifications-height-y98gph',
|
|
23
|
+
offsetTop: '--awsui-offset-top-y98gph',
|
|
24
|
+
offsetTopWithNotifications: '--awsui-offset-top-with-notifications-y98gph',
|
|
25
|
+
overlapHeight: '--awsui-overlap-height-y98gph',
|
|
26
|
+
navigationWidth: '--awsui-navigation-width-y98gph',
|
|
27
|
+
splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-y98gph',
|
|
28
|
+
splitPanelReportedSize: '--awsui-split-panel-reported-size-y98gph',
|
|
29
|
+
splitPanelHeight: '--awsui-split-panel-height-y98gph',
|
|
30
|
+
splitPanelMinWidth: '--awsui-split-panel-min-width-y98gph',
|
|
31
|
+
splitPanelMaxWidth: '--awsui-split-panel-max-width-y98gph',
|
|
32
|
+
toolsMaxWidth: '--awsui-tools-max-width-y98gph',
|
|
33
|
+
toolsWidth: '--awsui-tools-width-y98gph',
|
|
34
|
+
toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-y98gph',
|
|
35
|
+
contentScrollMargin: '--awsui-content-scroll-margin-y98gph',
|
|
36
|
+
flashbarStackDepth: '--awsui-flashbar-stack-depth-y98gph',
|
|
37
|
+
flashbarStackIndex: '--awsui-flashbar-stack-index-y98gph',
|
|
38
|
+
flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-y98gph',
|
|
39
|
+
stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-y98gph',
|
|
40
|
+
stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-y98gph',
|
|
41
|
+
dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-y98gph',
|
|
41
42
|
};
|
|
42
43
|
export default customCSSPropertiesMap;
|
|
43
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,UAAU,EAAE,4BAA4B;IACxC,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/generated/custom-css-properties/index.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAA2B;IACrD,cAAc,EAAE,gCAAgC;IAChD,cAAc,EAAE,iCAAiC;IACjD,eAAe,EAAE,kCAAkC;IACnD,aAAa,EAAE,+BAA+B;IAC9C,iBAAiB,EAAE,oCAAoC;IACvD,8BAA8B,EAAE,kDAAkD;IAClF,sBAAsB,EAAE,0CAA0C;IAClE,sBAAsB,EAAE,0CAA0C;IAClE,UAAU,EAAE,4BAA4B;IACxC,YAAY,EAAE,8BAA8B;IAC5C,SAAS,EAAE,2BAA2B;IACtC,YAAY,EAAE,8BAA8B;IAC5C,WAAW,EAAE,6BAA6B;IAC1C,OAAO,EAAE,yBAAyB;IAClC,cAAc,EAAE,iCAAiC;IACjD,gBAAgB,EAAE,mCAAmC;IACrD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,kCAAkC;IACpD,mBAAmB,EAAE,qCAAqC;IAC1D,SAAS,EAAE,2BAA2B;IACtC,0BAA0B,EAAE,8CAA8C;IAC1E,aAAa,EAAE,+BAA+B;IAC9C,eAAe,EAAE,iCAAiC;IAClD,4BAA4B,EAAE,iDAAiD;IAC/E,sBAAsB,EAAE,0CAA0C;IAClE,gBAAgB,EAAE,mCAAmC;IACrD,kBAAkB,EAAE,sCAAsC;IAC1D,kBAAkB,EAAE,sCAAsC;IAC1D,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,4BAA4B;IACxC,6BAA6B,EAAE,iDAAiD;IAChF,mBAAmB,EAAE,sCAAsC;IAC3D,kBAAkB,EAAE,qCAAqC;IACzD,kBAAkB,EAAE,qCAAqC;IACzD,0BAA0B,EAAE,8CAA8C;IAC1E,gCAAgC,EAAE,oDAAoD;IACtF,uCAAuC,EAAE,4DAA4D;IACrG,uBAAuB,EAAE,2CAA2C;CACrE,CAAC;AACF,eAAe,sBAAsB,CAAC","sourcesContent":["const customCSSPropertiesMap: Record<string, string> = {\n breadcrumbsGap: '--awsui-breadcrumbs-gap-y98gph',\n contentGapLeft: '--awsui-content-gap-left-y98gph',\n contentGapRight: '--awsui-content-gap-right-y98gph',\n contentHeight: '--awsui-content-height-y98gph',\n containerFirstGap: '--awsui-container-first-gap-y98gph',\n containerFirstOverlapExtension: '--awsui-container-first-overlap-extension-y98gph',\n defaultMaxContentWidth: '--awsui-default-max-content-width-y98gph',\n defaultMinContentWidth: '--awsui-default-min-content-width-y98gph',\n drawerSize: '--awsui-drawer-size-y98gph',\n footerHeight: '--awsui-footer-height-y98gph',\n headerGap: '--awsui-header-gap-y98gph',\n headerHeight: '--awsui-header-height-y98gph',\n layoutWidth: '--awsui-layout-width-y98gph',\n mainGap: '--awsui-main-gap-y98gph',\n mainOffsetLeft: '--awsui-main-offset-left-y98gph',\n mainTemplateRows: '--awsui-main-template-rows-y98gph',\n maxContentWidth: '--awsui-max-content-width-y98gph',\n minContentWidth: '--awsui-min-content-width-y98gph',\n mobileBarHeight: '--awsui-mobile-bar-height-y98gph',\n notificationsGap: '--awsui-notifications-gap-y98gph',\n notificationsHeight: '--awsui-notifications-height-y98gph',\n offsetTop: '--awsui-offset-top-y98gph',\n offsetTopWithNotifications: '--awsui-offset-top-with-notifications-y98gph',\n overlapHeight: '--awsui-overlap-height-y98gph',\n navigationWidth: '--awsui-navigation-width-y98gph',\n splitPanelReportedHeaderSize: '--awsui-split-panel-reported-header-size-y98gph',\n splitPanelReportedSize: '--awsui-split-panel-reported-size-y98gph',\n splitPanelHeight: '--awsui-split-panel-height-y98gph',\n splitPanelMinWidth: '--awsui-split-panel-min-width-y98gph',\n splitPanelMaxWidth: '--awsui-split-panel-max-width-y98gph',\n toolsMaxWidth: '--awsui-tools-max-width-y98gph',\n toolsWidth: '--awsui-tools-width-y98gph',\n toolsAnimationStartingOpacity: '--awsui-tools-animation-starting-opacity-y98gph',\n contentScrollMargin: '--awsui-content-scroll-margin-y98gph',\n flashbarStackDepth: '--awsui-flashbar-stack-depth-y98gph',\n flashbarStackIndex: '--awsui-flashbar-stack-index-y98gph',\n flashbarStickyBottomMargin: '--awsui-flashbar-sticky-bottom-margin-y98gph',\n stackedNotificationsBottomMargin: '--awsui-stacked-notifications-bottom-margin-y98gph',\n stackedNotificationsDefaultBottomMargin: '--awsui-stacked-notifications-default-bottom-margin-y98gph',\n dropdownDefaultMaxWidth: '--awsui-dropdown-default-max-width-y98gph',\n};\nexport default customCSSPropertiesMap;\n"]}
|
package/internal/manifest.json
CHANGED
|
@@ -5,7 +5,12 @@ export interface Dimensions {
|
|
|
5
5
|
left: number;
|
|
6
6
|
}
|
|
7
7
|
export declare const getOverflowParents: (element: HTMLElement) => HTMLElement[];
|
|
8
|
-
export declare const getOverflowParentDimensions: (element
|
|
8
|
+
export declare const getOverflowParentDimensions: ({ element, excludeClosestParent, expandToViewport, canExpandOutsideViewport, }: {
|
|
9
|
+
element: HTMLElement;
|
|
10
|
+
excludeClosestParent: boolean;
|
|
11
|
+
expandToViewport: boolean;
|
|
12
|
+
canExpandOutsideViewport: boolean;
|
|
13
|
+
}) => Dimensions[];
|
|
9
14
|
type ScrollIntoViewOptions = Parameters<HTMLElement['scrollIntoView']>[0];
|
|
10
15
|
/**
|
|
11
16
|
* Calls `scrollIntoView` on the provided element with sensible defaults. If
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollable-containers.d.ts","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,WAAW,EAQpE,CAAC;AAEF,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"scrollable-containers.d.ts","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,WAAW,EAQpE,CAAC;AAEF,eAAO,MAAM,2BAA2B;aAM7B,WAAW;0BACE,OAAO;sBACX,OAAO;8BACC,OAAO;MAC/B,UAAU,EAqCb,CAAC;AAEF,KAAK,qBAAqB,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,OAAO,GAAE,qBAA+D,QAGzE"}
|
|
@@ -6,7 +6,7 @@ export const getOverflowParents = (element) => {
|
|
|
6
6
|
}
|
|
7
7
|
return parents;
|
|
8
8
|
};
|
|
9
|
-
export const getOverflowParentDimensions = (element, excludeClosestParent = false, expandToViewport = false, canExpandOutsideViewport = false) => {
|
|
9
|
+
export const getOverflowParentDimensions = ({ element, excludeClosestParent = false, expandToViewport = false, canExpandOutsideViewport = false, }) => {
|
|
10
10
|
const parents = expandToViewport
|
|
11
11
|
? []
|
|
12
12
|
: getOverflowParents(element).map(el => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollable-containers.js","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAiB,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,GAAuB,OAAO,CAAC;IAEvC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC5D,gBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACrE;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,
|
|
1
|
+
{"version":3,"file":"scrollable-containers.js","sourceRoot":"lib/default/","sources":["internal/utils/scrollable-containers.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAiB,EAAE;IACxE,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,GAAuB,OAAO,CAAC;IAEvC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE;QAC5D,gBAAgB,CAAC,IAAI,CAAC,CAAC,Q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AE,MAAM,CAAC,WAAW;YAC1B,KAAK,EAAE,MAAM,CAAC,UAAU;YACxB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;SACR,CAAC,CAAC;KACJ;IAED,IAAI,oBAAoB,IAAI,CAAC,gBAAgB,EAAE;QAC7C,OAAO,CAAC,KAAK,EAAE,CAAC;KACjB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAIF;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAgC,EAChC,UAAiC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;;IAExE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,wDAAG,OAAO,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport interface Dimensions {\n height: number;\n width: number;\n top: number;\n left: number;\n}\n\nexport const getOverflowParents = (element: HTMLElement): HTMLElement[] => {\n const parents = [];\n let node: HTMLElement | null = element;\n\n while ((node = node.parentElement) && node !== document.body) {\n getComputedStyle(node).overflow !== 'visible' && parents.push(node);\n }\n return parents;\n};\n\nexport const getOverflowParentDimensions = ({\n element,\n excludeClosestParent = false,\n expandToViewport = false,\n canExpandOutsideViewport = false,\n}: {\n element: HTMLElement;\n excludeClosestParent: boolean;\n expandToViewport: boolean;\n canExpandOutsideViewport: boolean;\n}): Dimensions[] => {\n const parents = expandToViewport\n ? []\n : getOverflowParents(element).map(el => {\n const { height, width, top, left } = el.getBoundingClientRect();\n return {\n // Treat the whole scrollable area as the available height\n // if we're allowed to expand past the viewport.\n height: canExpandOutsideViewport ? el.scrollHeight : height,\n width,\n top,\n left,\n };\n });\n\n if (canExpandOutsideViewport && !expandToViewport) {\n const documentDimensions = document.documentElement.getBoundingClientRect();\n parents.push({\n width: Math.max(documentDimensions.width, document.documentElement.clientWidth),\n height: Math.max(documentDimensions.height, document.documentElement.clientHeight),\n top: documentDimensions.top,\n left: documentDimensions.left,\n });\n } else {\n parents.push({\n height: window.innerHeight,\n width: window.innerWidth,\n top: 0,\n left: 0,\n });\n }\n\n if (excludeClosestParent && !expandToViewport) {\n parents.shift();\n }\n\n return parents;\n};\n\ntype ScrollIntoViewOptions = Parameters<HTMLElement['scrollIntoView']>[0];\n\n/**\n * Calls `scrollIntoView` on the provided element with sensible defaults. If\n * the element does not existed or does not support the `scrollIntoView`\n * method, it will do nothing. This wrapper is created to support environments\n * where the native function is not available like JSDom (feature request:\n * https://github.com/jsdom/jsdom/issues/1422).\n *\n * @param element to be scrolled into view\n * @param options native options for `scrollIntoView`\n */\nexport function scrollElementIntoView(\n element: HTMLElement | undefined,\n options: ScrollIntoViewOptions = { block: 'nearest', inline: 'nearest' }\n) {\n element?.scrollIntoView?.(options);\n}\n"]}
|
package/modal/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAYlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,0BAA0B,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAYlF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,0BAA0B,CAAC;AAExF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,eAU/E"}
|
package/modal/internal.js
CHANGED
|
@@ -23,13 +23,15 @@ import { useContainerQuery } from '@cloudscape-design/component-toolkit';
|
|
|
23
23
|
import { ButtonContext } from '../internal/context/button-context';
|
|
24
24
|
export default function InternalModal(_a) {
|
|
25
25
|
var { modalRoot } = _a, rest = __rest(_a, ["modalRoot"]);
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const referrerId = useUniqueId('modal');
|
|
27
|
+
return (React.createElement("div", { id: referrerId },
|
|
28
|
+
React.createElement(Portal, { container: modalRoot },
|
|
29
|
+
React.createElement(InnerModal, Object.assign({}, rest, { referrerId: referrerId })))));
|
|
28
30
|
}
|
|
29
31
|
// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.
|
|
30
32
|
// useContainerQuery needs its targeted element to exist on the first render in order to work properly.
|
|
31
33
|
function InnerModal(_a) {
|
|
32
|
-
var { size, visible, header, children, footer, disableContentPaddings, onDismiss, __internalRootRef = null } = _a, rest = __rest(_a, ["size", "visible", "header", "children", "footer", "disableContentPaddings", "onDismiss", "__internalRootRef"]);
|
|
34
|
+
var { size, visible, header, children, footer, disableContentPaddings, onDismiss, __internalRootRef = null, referrerId } = _a, rest = __rest(_a, ["size", "visible", "header", "children", "footer", "disableContentPaddings", "onDismiss", "__internalRootRef", "referrerId"]);
|
|
33
35
|
const instanceUniqueId = useUniqueId();
|
|
34
36
|
const headerId = `${rest.id || instanceUniqueId}-header`;
|
|
35
37
|
const lastMouseDownElementRef = useRef(null);
|
|
@@ -86,7 +88,7 @@ function InnerModal(_a) {
|
|
|
86
88
|
const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);
|
|
87
89
|
return (React.createElement(ButtonContext.Provider, { value: { onClick: () => { } } },
|
|
88
90
|
React.createElement(FormFieldContext.Provider, { value: {} },
|
|
89
|
-
React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-modal": true, "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined }),
|
|
91
|
+
React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh), role: "dialog", "aria-modal": true, "aria-labelledby": headerId, onMouseDown: onOverlayMouseDown, onClick: onOverlayClick, ref: mergedRef, style: footerHeight ? { scrollPaddingBottom: footerHeight } : undefined, "data-awsui-referrer-id": referrerId }),
|
|
90
92
|
React.createElement(FocusLock, { disabled: !visible, autoFocus: true, restoreFocus: true, className: styles['focus-lock'] },
|
|
91
93
|
React.createElement("div", { className: clsx(styles.dialog, styles[size], styles[`breakpoint-${breakpoint}`], isRefresh && styles.refresh), onKeyDown: escKeyHandler },
|
|
92
94
|
React.createElement("div", { className: styles.container },
|
package/modal/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,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AAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,IACxF,MAAM,CACH,CACP,CACG,CACF,CACI,CACR,CACoB,CACL,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { KeyCode } from '../internal/keycode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { InternalButton } from '../button/internal';\nimport InternalHeader from '../header/internal';\nimport Portal from '../internal/components/portal';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { FormFieldContext } from '../internal/context/form-field-context';\n\nimport { disableBodyScrolling, enableBodyScrolling } from './body-scroll';\nimport { ModalProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport FocusLock from '../internal/components/focus-lock';\nimport { useInternalI18n } from '../i18n/context';\nimport { useIntersectionObserver } from '../internal/hooks/use-intersection-observer';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { ButtonContext } from '../internal/context/button-context';\n\ntype InternalModalProps = SomeRequired<ModalProps, 'size'> & InternalBaseComponentProps;\n\nexport default function InternalModal({ modalRoot, ...rest }: InternalModalProps) {\n return (\n <Portal container={modalRoot}>\n <InnerModal {...rest} />\n </Portal>\n );\n}\n\n// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.\n// useContainerQuery needs its targeted element to exist on the first render in order to work properly.\nfunction InnerModal({\n size,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n onDismiss,\n __internalRootRef = null,\n ...rest\n}: InternalModalProps) {\n const instanceUniqueId = useUniqueId();\n const headerId = `${rest.id || instanceUniqueId}-header`;\n const lastMouseDownElementRef = useRef<HTMLElement | null>(null);\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n\n const i18n = useInternalI18n('modal');\n const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);\n\n const refObject = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);\n\n const isRefresh = useVisualRefresh();\n\n const baseProps = getBaseProps(rest);\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n // enable / disable body scroll\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n } else {\n enableBodyScrolling();\n }\n }, [visible]);\n\n // Because we hide the element with styles (and not actually detach it from DOM), we need to scroll to top\n useEffect(() => {\n if (visible && refObject.current) {\n refObject.current.scrollTop = 0;\n }\n }, [visible]);\n\n const dismiss = (reason: string) => fireNonCancelableEvent(onDismiss, { reason });\n\n const onOverlayMouseDown = (event: React.MouseEvent) => {\n lastMouseDownElementRef.current = event.target as HTMLElement;\n };\n const onOverlayClick = (event: React.MouseEvent) => {\n const overlay = refObject.current;\n const lastClicked = lastMouseDownElementRef.current;\n\n if (event.target === overlay && lastClicked === overlay) {\n dismiss('overlay');\n }\n };\n const onCloseButtonClick = () => dismiss('closeButton');\n const escKeyHandler = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n dismiss('keyboard');\n }\n };\n\n // We use an empty div element at the end of the content slot as a sentinel\n // to detect when the user has scrolled to the bottom.\n const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();\n\n // Add extra scroll padding to account for the height of the sticky footer,\n // to prevent it from covering focused elements.\n const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);\n\n return (\n <ButtonContext.Provider value={{ onClick: () => {} }}>\n <FormFieldContext.Provider value={{}}>\n <div\n {...baseProps}\n className={clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh)}\n role=\"dialog\"\n aria-modal={true}\n aria-labelledby={headerId}\n onMouseDown={onOverlayMouseDown}\n onClick={onOverlayClick}\n ref={mergedRef}\n style={footerHeight ? { scrollPaddingBottom: footerHeight } : undefined}\n >\n <FocusLock disabled={!visible} autoFocus={true} restoreFocus={true} className={styles['focus-lock']}>\n <div\n className={clsx(\n styles.dialog,\n styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh\n )}\n onKeyDown={escKeyHandler}\n >\n <div className={styles.container}>\n <div className={styles.header}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n actions={\n <InternalButton\n ariaLabel={closeAriaLabel}\n className={styles['dismiss-control']}\n variant=\"modal-dismiss\"\n iconName=\"close\"\n formAction=\"none\"\n onClick={onCloseButtonClick}\n />\n }\n >\n <span id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <div className={clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings })}>\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <div ref={footerRef} className={clsx(styles.footer, footerStuck && styles['footer--stuck'])}>\n {footer}\n </div>\n )}\n </div>\n </div>\n </FocusLock>\n </div>\n </FormFieldContext.Provider>\n </ButtonContext.Provider>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["modal/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAA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M,CAAC,cAAc,CAAC,IAClD,MAAM,CACF,CACQ,CACb;4BACN,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,sBAAsB,EAAE,CAAC;gCACtF,QAAQ;gCACT,6BAAK,GAAG,EAAE,iBAAiB,GAAI,CAC3B;4BACL,MAAM,IAAI,CACT,6BAAK,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,IACxF,MAAM,CACH,CACP,CACG,CACF,CACI,CACR,CACoB,CACL,CAC1B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef } from 'react';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { KeyCode } from '../internal/keycode';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { InternalButton } from '../button/internal';\nimport InternalHeader from '../header/internal';\nimport Portal from '../internal/components/portal';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { FormFieldContext } from '../internal/context/form-field-context';\n\nimport { disableBodyScrolling, enableBodyScrolling } from './body-scroll';\nimport { ModalProps } from './interfaces';\nimport styles from './styles.css.js';\nimport { SomeRequired } from '../internal/types';\nimport FocusLock from '../internal/components/focus-lock';\nimport { useInternalI18n } from '../i18n/context';\nimport { useIntersectionObserver } from '../internal/hooks/use-intersection-observer';\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { ButtonContext } from '../internal/context/button-context';\n\ntype InternalModalProps = SomeRequired<ModalProps, 'size'> & InternalBaseComponentProps;\n\nexport default function InternalModal({ modalRoot, ...rest }: InternalModalProps) {\n const referrerId = useUniqueId('modal');\n\n return (\n <div id={referrerId}>\n <Portal container={modalRoot}>\n <InnerModal {...rest} referrerId={referrerId} />\n </Portal>\n </div>\n );\n}\n\n// Separate component to prevent the Portal from getting in the way of refs, as it needs extra cycles to render the inner components.\n// useContainerQuery needs its targeted element to exist on the first render in order to work properly.\nfunction InnerModal({\n size,\n visible,\n header,\n children,\n footer,\n disableContentPaddings,\n onDismiss,\n __internalRootRef = null,\n referrerId,\n ...rest\n}: InternalModalProps & { referrerId: string }) {\n const instanceUniqueId = useUniqueId();\n const headerId = `${rest.id || instanceUniqueId}-header`;\n const lastMouseDownElementRef = useRef<HTMLElement | null>(null);\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n\n const i18n = useInternalI18n('modal');\n const closeAriaLabel = i18n('closeAriaLabel', rest.closeAriaLabel);\n\n const refObject = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(breakpointsRef, refObject, __internalRootRef);\n\n const isRefresh = useVisualRefresh();\n\n const baseProps = getBaseProps(rest);\n\n // enable body scroll and restore focus if unmounting while visible\n useEffect(() => {\n return () => {\n enableBodyScrolling();\n };\n }, []);\n\n // enable / disable body scroll\n useEffect(() => {\n if (visible) {\n disableBodyScrolling();\n } else {\n enableBodyScrolling();\n }\n }, [visible]);\n\n // Because we hide the element with styles (and not actually detach it from DOM), we need to scroll to top\n useEffect(() => {\n if (visible && refObject.current) {\n refObject.current.scrollTop = 0;\n }\n }, [visible]);\n\n const dismiss = (reason: string) => fireNonCancelableEvent(onDismiss, { reason });\n\n const onOverlayMouseDown = (event: React.MouseEvent) => {\n lastMouseDownElementRef.current = event.target as HTMLElement;\n };\n const onOverlayClick = (event: React.MouseEvent) => {\n const overlay = refObject.current;\n const lastClicked = lastMouseDownElementRef.current;\n\n if (event.target === overlay && lastClicked === overlay) {\n dismiss('overlay');\n }\n };\n const onCloseButtonClick = () => dismiss('closeButton');\n const escKeyHandler = (event: React.KeyboardEvent) => {\n if (event.keyCode === KeyCode.escape) {\n dismiss('keyboard');\n }\n };\n\n // We use an empty div element at the end of the content slot as a sentinel\n // to detect when the user has scrolled to the bottom.\n const { ref: stickySentinelRef, isIntersecting: footerStuck } = useIntersectionObserver();\n\n // Add extra scroll padding to account for the height of the sticky footer,\n // to prevent it from covering focused elements.\n const [footerHeight, footerRef] = useContainerQuery(rect => rect.borderBoxHeight);\n\n return (\n <ButtonContext.Provider value={{ onClick: () => {} }}>\n <FormFieldContext.Provider value={{}}>\n <div\n {...baseProps}\n className={clsx(styles.root, { [styles.hidden]: !visible }, baseProps.className, isRefresh && styles.refresh)}\n role=\"dialog\"\n aria-modal={true}\n aria-labelledby={headerId}\n onMouseDown={onOverlayMouseDown}\n onClick={onOverlayClick}\n ref={mergedRef}\n style={footerHeight ? { scrollPaddingBottom: footerHeight } : undefined}\n data-awsui-referrer-id={referrerId}\n >\n <FocusLock disabled={!visible} autoFocus={true} restoreFocus={true} className={styles['focus-lock']}>\n <div\n className={clsx(\n styles.dialog,\n styles[size],\n styles[`breakpoint-${breakpoint}`],\n isRefresh && styles.refresh\n )}\n onKeyDown={escKeyHandler}\n >\n <div className={styles.container}>\n <div className={styles.header}>\n <InternalHeader\n variant=\"h2\"\n __disableActionsWrapping={true}\n actions={\n <InternalButton\n ariaLabel={closeAriaLabel}\n className={styles['dismiss-control']}\n variant=\"modal-dismiss\"\n iconName=\"close\"\n formAction=\"none\"\n onClick={onCloseButtonClick}\n />\n }\n >\n <span id={headerId} className={styles['header--text']}>\n {header}\n </span>\n </InternalHeader>\n </div>\n <div className={clsx(styles.content, { [styles['no-paddings']]: disableContentPaddings })}>\n {children}\n <div ref={stickySentinelRef} />\n </div>\n {footer && (\n <div ref={footerRef} className={clsx(styles.footer, footerStuck && styles['footer--stuck'])}>\n {footer}\n </div>\n )}\n </div>\n </div>\n </FocusLock>\n </div>\n </FormFieldContext.Provider>\n </ButtonContext.Provider>\n );\n}\n"]}
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"./interfaces": "./interfaces.js",
|
|
11
11
|
"./contexts/form-field": "./contexts/form-field.js",
|
|
12
12
|
"./alert": "./alert/index.js",
|
|
13
|
+
"./anchor-navigation": "./anchor-navigation/index.js",
|
|
13
14
|
"./annotation-context": "./annotation-context/index.js",
|
|
14
15
|
"./app-layout": "./app-layout/index.js",
|
|
15
16
|
"./area-chart": "./area-chart/index.js",
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
"./internal/base-component/index.js",
|
|
110
111
|
"./internal/base-component/styles.css.js"
|
|
111
112
|
],
|
|
112
|
-
"version": "3.0.
|
|
113
|
+
"version": "3.0.389",
|
|
113
114
|
"repository": {
|
|
114
115
|
"type": "git",
|
|
115
116
|
"url": "https://github.com/cloudscape-design/components.git"
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"progress": "
|
|
5
|
-
"result-state": "awsui_result-
|
|
6
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
7
|
-
"root": "
|
|
8
|
-
"with-result-button": "awsui_with-result-
|
|
9
|
-
"result-text": "awsui_result-
|
|
10
|
-
"result-container-error": "awsui_result-container-
|
|
11
|
-
"result-container-success": "awsui_result-container-
|
|
12
|
-
"result-button": "awsui_result-
|
|
13
|
-
"word-wrap": "awsui_word-
|
|
14
|
-
"label-flash": "awsui_label-
|
|
15
|
-
"label-key-value": "awsui_label-key-
|
|
16
|
-
"flash": "
|
|
17
|
-
"progress-container": "awsui_progress-
|
|
18
|
-
"percentage-container": "awsui_percentage-
|
|
19
|
-
"percentage": "
|
|
20
|
-
"complete": "
|
|
21
|
-
"progress-in-flash": "awsui_progress-in-
|
|
4
|
+
"progress": "awsui_progress_11huc_106uy_185",
|
|
5
|
+
"result-state": "awsui_result-state_11huc_106uy_199",
|
|
6
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_106uy_1",
|
|
7
|
+
"root": "awsui_root_11huc_106uy_221",
|
|
8
|
+
"with-result-button": "awsui_with-result-button_11huc_106uy_234",
|
|
9
|
+
"result-text": "awsui_result-text_11huc_106uy_238",
|
|
10
|
+
"result-container-error": "awsui_result-container-error_11huc_106uy_242",
|
|
11
|
+
"result-container-success": "awsui_result-container-success_11huc_106uy_242",
|
|
12
|
+
"result-button": "awsui_result-button_11huc_106uy_246",
|
|
13
|
+
"word-wrap": "awsui_word-wrap_11huc_106uy_251",
|
|
14
|
+
"label-flash": "awsui_label-flash_11huc_106uy_256",
|
|
15
|
+
"label-key-value": "awsui_label-key-value_11huc_106uy_260",
|
|
16
|
+
"flash": "awsui_flash_11huc_106uy_268",
|
|
17
|
+
"progress-container": "awsui_progress-container_11huc_106uy_272",
|
|
18
|
+
"percentage-container": "awsui_percentage-container_11huc_106uy_279",
|
|
19
|
+
"percentage": "awsui_percentage_11huc_106uy_279",
|
|
20
|
+
"complete": "awsui_complete_11huc_106uy_314",
|
|
21
|
+
"progress-in-flash": "awsui_progress-in-flash_11huc_106uy_329"
|
|
22
22
|
};
|
|
23
23
|
|