@cloudscape-design/components 3.0.313 → 3.0.315
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/index.js +1 -1
- package/app-layout/index.js.map +1 -1
- package/app-layout/visual-refresh/context.js +1 -1
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/area-chart/internal.js +1 -1
- package/area-chart/internal.js.map +1 -1
- package/autosuggest/internal.js +1 -1
- package/autosuggest/internal.js.map +1 -1
- package/collection-preferences/index.js +1 -1
- package/collection-preferences/index.js.map +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/time-offset.js +1 -1
- package/date-range-picker/time-offset.js.map +1 -1
- package/expandable-section/expandable-section-header.js +1 -1
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/file-upload/internal.js +1 -1
- package/file-upload/internal.js.map +1 -1
- package/flashbar/common.js +1 -1
- package/flashbar/common.js.map +1 -1
- package/flashbar/flash.js +1 -1
- package/flashbar/flash.js.map +1 -1
- package/grid/internal.js +2 -2
- package/grid/internal.js.map +1 -1
- package/i18n/provider.js +1 -1
- package/i18n/provider.js.map +1 -1
- package/icon/internal.js +1 -1
- package/icon/internal.js.map +1 -1
- package/internal/base-component/styles.scoped.css +6 -0
- package/internal/components/masked-input/use-mask.js +2 -2
- package/internal/components/masked-input/use-mask.js.map +1 -1
- package/internal/components/option/index.js +1 -1
- package/internal/components/option/index.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/generated/theming/index.cjs +54 -0
- package/internal/generated/theming/index.js +54 -0
- package/internal/hooks/check-controlled/index.js +1 -1
- package/internal/hooks/check-controlled/index.js.map +1 -1
- package/internal/hooks/use-controllable/index.js +1 -1
- package/internal/hooks/use-controllable/index.js.map +1 -1
- package/internal/hooks/use-visual-mode/index.js +1 -1
- package/internal/hooks/use-visual-mode/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/check-safe-url.js +1 -1
- package/internal/utils/check-safe-url.js.map +1 -1
- package/internal/utils/locale/normalize-locale.js +1 -1
- package/internal/utils/locale/normalize-locale.js.map +1 -1
- package/mixed-line-bar-chart/internal.js +1 -1
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/package.json +1 -1
- package/pie-chart/styles.css.js +27 -27
- package/pie-chart/styles.scoped.css +44 -44
- package/pie-chart/styles.selectors.js +27 -27
- package/popover/index.js +1 -1
- package/popover/index.js.map +1 -1
- package/progress-bar/index.js +1 -1
- package/progress-bar/index.js.map +1 -1
- package/select/utils/check-option-value-field.js +1 -1
- package/select/utils/check-option-value-field.js.map +1 -1
- package/side-navigation/util.js +1 -1
- package/side-navigation/util.js.map +1 -1
- package/table/body-cell/styles.css.js +28 -28
- package/table/body-cell/styles.scoped.css +70 -70
- package/table/body-cell/styles.selectors.js +28 -28
- package/table/use-column-widths.js +1 -1
- package/table/use-column-widths.js.map +1 -1
- package/table/utils.js +1 -1
- package/table/utils.js.map +1 -1
- package/wizard/internal.js +1 -1
- package/wizard/internal.js.map +1 -1
- package/internal/logging.d.ts +0 -2
- package/internal/logging.d.ts.map +0 -1
- package/internal/logging.js +0 -14
- package/internal/logging.js.map +0 -1
|
@@ -94,57 +94,57 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
94
94
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
95
95
|
SPDX-License-Identifier: Apache-2.0
|
|
96
96
|
*/
|
|
97
|
-
.
|
|
97
|
+
.awsui_segment__path_1edmh_360wr_97:not(#\9) {
|
|
98
98
|
transition: opacity var(--motion-duration-transition-quick-0viajb, 90ms) var(--motion-easing-transition-quick-191occ, linear);
|
|
99
99
|
}
|
|
100
100
|
@media (prefers-reduced-motion: reduce) {
|
|
101
|
-
.
|
|
101
|
+
.awsui_segment__path_1edmh_360wr_97:not(#\9) {
|
|
102
102
|
animation: none;
|
|
103
103
|
transition: none;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
.awsui-motion-disabled .
|
|
106
|
+
.awsui-motion-disabled .awsui_segment__path_1edmh_360wr_97:not(#\9), .awsui-mode-entering .awsui_segment__path_1edmh_360wr_97:not(#\9) {
|
|
107
107
|
animation: none;
|
|
108
108
|
transition: none;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.
|
|
111
|
+
.awsui_segment_1edmh_360wr_97:not(#\9) {
|
|
112
112
|
transition: opacity var(--motion-duration-transition-quick-0viajb, 90ms) var(--motion-easing-transition-quick-191occ, linear);
|
|
113
113
|
}
|
|
114
114
|
@media (prefers-reduced-motion: reduce) {
|
|
115
|
-
.
|
|
115
|
+
.awsui_segment_1edmh_360wr_97:not(#\9) {
|
|
116
116
|
animation: none;
|
|
117
117
|
transition: none;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
.awsui-motion-disabled .
|
|
120
|
+
.awsui-motion-disabled .awsui_segment_1edmh_360wr_97:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_360wr_97:not(#\9) {
|
|
121
121
|
animation: none;
|
|
122
122
|
transition: none;
|
|
123
123
|
}
|
|
124
|
-
.
|
|
124
|
+
.awsui_segment_1edmh_360wr_97 > .awsui_segment__hover_1edmh_360wr_124:not(#\9) {
|
|
125
125
|
transition: opacity var(--motion-duration-transition-quick-0viajb, 90ms) var(--motion-easing-transition-quick-191occ, linear);
|
|
126
126
|
}
|
|
127
127
|
@media (prefers-reduced-motion: reduce) {
|
|
128
|
-
.
|
|
128
|
+
.awsui_segment_1edmh_360wr_97 > .awsui_segment__hover_1edmh_360wr_124:not(#\9) {
|
|
129
129
|
animation: none;
|
|
130
130
|
transition: none;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
.awsui-motion-disabled .
|
|
133
|
+
.awsui-motion-disabled .awsui_segment_1edmh_360wr_97 > .awsui_segment__hover_1edmh_360wr_124:not(#\9), .awsui-mode-entering .awsui_segment_1edmh_360wr_97 > .awsui_segment__hover_1edmh_360wr_124:not(#\9) {
|
|
134
134
|
animation: none;
|
|
135
135
|
transition: none;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.
|
|
138
|
+
.awsui_label_1edmh_360wr_138:not(#\9) {
|
|
139
139
|
transition: opacity var(--motion-duration-transition-quick-0viajb, 90ms) var(--motion-easing-transition-quick-191occ, linear);
|
|
140
140
|
}
|
|
141
141
|
@media (prefers-reduced-motion: reduce) {
|
|
142
|
-
.
|
|
142
|
+
.awsui_label_1edmh_360wr_138:not(#\9) {
|
|
143
143
|
animation: none;
|
|
144
144
|
transition: none;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
.awsui-motion-disabled .
|
|
147
|
+
.awsui-motion-disabled .awsui_label_1edmh_360wr_138:not(#\9), .awsui-mode-entering .awsui_label_1edmh_360wr_138:not(#\9) {
|
|
148
148
|
animation: none;
|
|
149
149
|
transition: none;
|
|
150
150
|
}
|
|
@@ -153,7 +153,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
153
153
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
154
154
|
SPDX-License-Identifier: Apache-2.0
|
|
155
155
|
*/
|
|
156
|
-
.
|
|
156
|
+
.awsui_root_1edmh_360wr_156:not(#\9) {
|
|
157
157
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
158
158
|
border-collapse: separate;
|
|
159
159
|
border-spacing: 0;
|
|
@@ -193,55 +193,55 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
193
193
|
display: block;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
.awsui_filter-
|
|
196
|
+
.awsui_filter-container_1edmh_360wr_170:not(#\9) {
|
|
197
197
|
/* used in test-utils */
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
.awsui_has-default-
|
|
200
|
+
.awsui_has-default-filter_1edmh_360wr_174 > :not(#\9):first-child {
|
|
201
201
|
flex: 280px 0 1;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.
|
|
204
|
+
.awsui_content_1edmh_360wr_178:not(#\9) {
|
|
205
205
|
display: flex;
|
|
206
206
|
position: relative;
|
|
207
207
|
justify-content: center;
|
|
208
208
|
align-items: center;
|
|
209
209
|
}
|
|
210
|
-
.
|
|
210
|
+
.awsui_content_1edmh_360wr_178.awsui_content--small_1edmh_360wr_184:not(#\9) {
|
|
211
211
|
min-height: calc(2 * (50px + var(--space-xs-edba2s, 8px) + calc(2 * var(--font-body-m-line-height-rfgrp9, 22px))));
|
|
212
212
|
}
|
|
213
|
-
.
|
|
213
|
+
.awsui_content_1edmh_360wr_178.awsui_content--small_1edmh_360wr_184.awsui_content--without-labels_1edmh_360wr_187:not(#\9) {
|
|
214
214
|
min-height: calc(2 * (50px + var(--space-xs-edba2s, 8px)));
|
|
215
215
|
}
|
|
216
|
-
.
|
|
216
|
+
.awsui_content_1edmh_360wr_178.awsui_content--medium_1edmh_360wr_190:not(#\9) {
|
|
217
217
|
min-height: calc(2 * (100px + var(--space-s-hdd878, 12px) + calc(2 * var(--font-body-m-line-height-rfgrp9, 22px))));
|
|
218
218
|
}
|
|
219
|
-
.
|
|
219
|
+
.awsui_content_1edmh_360wr_178.awsui_content--medium_1edmh_360wr_190.awsui_content--without-labels_1edmh_360wr_187:not(#\9) {
|
|
220
220
|
min-height: calc(2 * (100px + var(--space-s-hdd878, 12px)));
|
|
221
221
|
}
|
|
222
|
-
.
|
|
222
|
+
.awsui_content_1edmh_360wr_178.awsui_content--large_1edmh_360wr_196:not(#\9) {
|
|
223
223
|
min-height: calc(2 * (140px + var(--space-s-hdd878, 12px) + calc(2 * var(--font-body-m-line-height-rfgrp9, 22px))));
|
|
224
224
|
}
|
|
225
|
-
.
|
|
225
|
+
.awsui_content_1edmh_360wr_178.awsui_content--large_1edmh_360wr_196.awsui_content--without-labels_1edmh_360wr_187:not(#\9) {
|
|
226
226
|
min-height: calc(2 * (140px + var(--space-s-hdd878, 12px)));
|
|
227
227
|
}
|
|
228
|
-
.
|
|
228
|
+
.awsui_content_1edmh_360wr_178.awsui_content--reserve-filter_1edmh_360wr_202:not(#\9) {
|
|
229
229
|
margin-top: calc(2 * var(--font-body-m-line-height-rfgrp9, 22px));
|
|
230
230
|
}
|
|
231
|
-
.
|
|
231
|
+
.awsui_content_1edmh_360wr_178.awsui_content--reserve-legend_1edmh_360wr_205:not(#\9) {
|
|
232
232
|
margin-bottom: calc(2 * var(--font-body-m-line-height-rfgrp9, 22px));
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
.awsui_status-
|
|
235
|
+
.awsui_status-container_1edmh_360wr_209:not(#\9) {
|
|
236
236
|
/* used in test utils */
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
.awsui_chart-
|
|
239
|
+
.awsui_chart-container_1edmh_360wr_213:not(#\9) {
|
|
240
240
|
display: flex;
|
|
241
241
|
flex: 1;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
.awsui_inner-
|
|
244
|
+
.awsui_inner-content_1edmh_360wr_218:not(#\9) {
|
|
245
245
|
display: flex;
|
|
246
246
|
position: absolute;
|
|
247
247
|
flex-direction: column;
|
|
@@ -255,53 +255,53 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
255
255
|
pointer-events: none;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
.
|
|
258
|
+
.awsui_segment__highlight_1edmh_360wr_232:not(#\9) {
|
|
259
259
|
stroke: none;
|
|
260
260
|
opacity: 0;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
.
|
|
263
|
+
.awsui_segment_1edmh_360wr_97:not(#\9) {
|
|
264
264
|
stroke: var(--color-background-container-content-og3y0v, #ffffff);
|
|
265
265
|
stroke-width: 2px;
|
|
266
266
|
stroke-linejoin: round;
|
|
267
267
|
opacity: 1;
|
|
268
268
|
cursor: pointer;
|
|
269
269
|
}
|
|
270
|
-
.
|
|
270
|
+
.awsui_segment_1edmh_360wr_97:not(#\9):focus {
|
|
271
271
|
outline: none;
|
|
272
272
|
}
|
|
273
|
-
.
|
|
273
|
+
.awsui_segment_1edmh_360wr_97.awsui_segment--dimmed_1edmh_360wr_247:not(#\9) {
|
|
274
274
|
opacity: 0.35;
|
|
275
275
|
}
|
|
276
|
-
.
|
|
276
|
+
.awsui_segment_1edmh_360wr_97.awsui_segment--highlighted_1edmh_360wr_250 > .awsui_segment__highlight_1edmh_360wr_232:not(#\9), .awsui_segment_1edmh_360wr_97:not(#\9):hover:not(.awsui_segment--dimmed_1edmh_360wr_247) > .awsui_segment__highlight_1edmh_360wr_232 {
|
|
277
277
|
opacity: 1;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
.
|
|
280
|
+
.awsui_label_1edmh_360wr_138:not(#\9) {
|
|
281
281
|
color: var(--color-text-heading-default-18iw0k, #000716);
|
|
282
282
|
opacity: 1;
|
|
283
283
|
/* stylelint-disable-next-line selector-max-type */
|
|
284
284
|
/* stylelint-disable-next-line selector-max-type */
|
|
285
285
|
}
|
|
286
|
-
.
|
|
287
|
-
stroke: var(--color-
|
|
286
|
+
.awsui_label_1edmh_360wr_138 > line:not(#\9) {
|
|
287
|
+
stroke: var(--color-stroke-chart-line-7sdstd, #7d8998);
|
|
288
288
|
stroke-width: var(--border-divider-section-width-orq175, 2px);
|
|
289
289
|
}
|
|
290
|
-
.
|
|
290
|
+
.awsui_label_1edmh_360wr_138 > div:not(#\9) {
|
|
291
291
|
margin-top: -0.75em;
|
|
292
292
|
}
|
|
293
|
-
.
|
|
293
|
+
.awsui_label_1edmh_360wr_138.awsui_label--dimmed_1edmh_360wr_267:not(#\9) {
|
|
294
294
|
opacity: 0.35;
|
|
295
295
|
}
|
|
296
|
-
.
|
|
296
|
+
.awsui_label_1edmh_360wr_138.awsui_label--align-right_1edmh_360wr_270:not(#\9) {
|
|
297
297
|
/* stylelint-disable-next-line selector-max-type */
|
|
298
298
|
}
|
|
299
|
-
.
|
|
299
|
+
.awsui_label_1edmh_360wr_138.awsui_label--align-right_1edmh_360wr_270 > div:not(#\9) {
|
|
300
300
|
text-align: right;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
/* stylelint-disable-next-line selector-max-type */
|
|
304
|
-
.awsui_label-
|
|
304
|
+
.awsui_label-text_1edmh_360wr_278 > text:not(#\9) {
|
|
305
305
|
font-size: var(--font-body-m-size-7dign1, 14px);
|
|
306
306
|
line-height: var(--font-body-m-line-height-rfgrp9, 22px);
|
|
307
307
|
font-weight: var(--font-display-label-weight-io22e5, 700);
|
|
@@ -309,22 +309,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
309
309
|
dominant-baseline: middle;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
text.
|
|
312
|
+
text.awsui_label__description_1edmh_360wr_286:not(#\9) {
|
|
313
313
|
font-size: var(--font-chart-detail-size-gtiv3j, 12px);
|
|
314
314
|
font-weight: 400;
|
|
315
315
|
color: var(--color-text-group-label-qtmgp9, #414d5c);
|
|
316
316
|
fill: var(--color-text-group-label-qtmgp9, #414d5c);
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
.awsui_label-
|
|
319
|
+
.awsui_label-line_1edmh_360wr_293:not(#\9) {
|
|
320
320
|
/* used in component code */
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
-
.awsui_label--
|
|
323
|
+
.awsui_label--highlighted_1edmh_360wr_297:not(#\9) {
|
|
324
324
|
/* used in test-utils */
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
.awsui_popover-
|
|
327
|
+
.awsui_popover-header_1edmh_360wr_301:not(#\9) {
|
|
328
328
|
display: inline-flex;
|
|
329
329
|
align-items: flex-start;
|
|
330
330
|
}
|
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"segment__path": "
|
|
6
|
-
"segment": "
|
|
7
|
-
"segment__hover": "
|
|
8
|
-
"label": "
|
|
9
|
-
"root": "
|
|
10
|
-
"filter-container": "awsui_filter-
|
|
11
|
-
"has-default-filter": "awsui_has-default-
|
|
12
|
-
"content": "
|
|
13
|
-
"content--small": "awsui_content--
|
|
14
|
-
"content--without-labels": "awsui_content--without-
|
|
15
|
-
"content--medium": "awsui_content--
|
|
16
|
-
"content--large": "awsui_content--
|
|
17
|
-
"content--reserve-filter": "awsui_content--reserve-
|
|
18
|
-
"content--reserve-legend": "awsui_content--reserve-
|
|
19
|
-
"status-container": "awsui_status-
|
|
20
|
-
"chart-container": "awsui_chart-
|
|
21
|
-
"inner-content": "awsui_inner-
|
|
22
|
-
"segment__highlight": "
|
|
23
|
-
"segment--dimmed": "awsui_segment--
|
|
24
|
-
"segment--highlighted": "awsui_segment--
|
|
25
|
-
"label--dimmed": "awsui_label--
|
|
26
|
-
"label--align-right": "awsui_label--align-
|
|
27
|
-
"label-text": "awsui_label-
|
|
28
|
-
"label__description": "
|
|
29
|
-
"label-line": "awsui_label-
|
|
30
|
-
"label--highlighted": "awsui_label--
|
|
31
|
-
"popover-header": "awsui_popover-
|
|
5
|
+
"segment__path": "awsui_segment__path_1edmh_360wr_97",
|
|
6
|
+
"segment": "awsui_segment_1edmh_360wr_97",
|
|
7
|
+
"segment__hover": "awsui_segment__hover_1edmh_360wr_124",
|
|
8
|
+
"label": "awsui_label_1edmh_360wr_138",
|
|
9
|
+
"root": "awsui_root_1edmh_360wr_156",
|
|
10
|
+
"filter-container": "awsui_filter-container_1edmh_360wr_170",
|
|
11
|
+
"has-default-filter": "awsui_has-default-filter_1edmh_360wr_174",
|
|
12
|
+
"content": "awsui_content_1edmh_360wr_178",
|
|
13
|
+
"content--small": "awsui_content--small_1edmh_360wr_184",
|
|
14
|
+
"content--without-labels": "awsui_content--without-labels_1edmh_360wr_187",
|
|
15
|
+
"content--medium": "awsui_content--medium_1edmh_360wr_190",
|
|
16
|
+
"content--large": "awsui_content--large_1edmh_360wr_196",
|
|
17
|
+
"content--reserve-filter": "awsui_content--reserve-filter_1edmh_360wr_202",
|
|
18
|
+
"content--reserve-legend": "awsui_content--reserve-legend_1edmh_360wr_205",
|
|
19
|
+
"status-container": "awsui_status-container_1edmh_360wr_209",
|
|
20
|
+
"chart-container": "awsui_chart-container_1edmh_360wr_213",
|
|
21
|
+
"inner-content": "awsui_inner-content_1edmh_360wr_218",
|
|
22
|
+
"segment__highlight": "awsui_segment__highlight_1edmh_360wr_232",
|
|
23
|
+
"segment--dimmed": "awsui_segment--dimmed_1edmh_360wr_247",
|
|
24
|
+
"segment--highlighted": "awsui_segment--highlighted_1edmh_360wr_250",
|
|
25
|
+
"label--dimmed": "awsui_label--dimmed_1edmh_360wr_267",
|
|
26
|
+
"label--align-right": "awsui_label--align-right_1edmh_360wr_270",
|
|
27
|
+
"label-text": "awsui_label-text_1edmh_360wr_278",
|
|
28
|
+
"label__description": "awsui_label__description_1edmh_360wr_286",
|
|
29
|
+
"label-line": "awsui_label-line_1edmh_360wr_293",
|
|
30
|
+
"label--highlighted": "awsui_label--highlighted_1edmh_360wr_297",
|
|
31
|
+
"popover-header": "awsui_popover-header_1edmh_360wr_301"
|
|
32
32
|
};
|
|
33
33
|
|
package/popover/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { getExternalProps } from '../internal/utils/external-props';
|
|
|
7
7
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
8
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
9
9
|
import { isDevelopment } from '../internal/is-development';
|
|
10
|
-
import { warnOnce } from '
|
|
10
|
+
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
11
11
|
export default function Popover(_a) {
|
|
12
12
|
var { position = 'right', size = 'medium', fixedWidth = false, triggerType = 'text', dismissButton = true, renderWithPortal = false, header } = _a, rest = __rest(_a, ["position", "size", "fixedWidth", "triggerType", "dismissButton", "renderWithPortal", "header"]);
|
|
13
13
|
if (isDevelopment) {
|
package/popover/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["popover/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAKzE,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EASjB;QATiB,EAC9B,QAAQ,GAAG,OAAO,EAClB,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,WAAW,GAAG,MAAM,EACpB,aAAa,GAAG,IAAI,EACpB,gBAAgB,GAAG,KAAK,EACxB,MAAM,OAEO,EADV,IAAI,cARuB,gGAS/B,CADQ;IAEP,IAAI,aAAa,EAAE;QACjB,IAAI,aAAa,IAAI,CAAC,MAAM,EAAE;YAC5B,QAAQ,CAAC,SAAS,EAAE,iEAAiE,CAAC,CAAC;SACxF;KACF;IAED,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7C,OAAO,CACL,oBAAC,eAAe,kBACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,IAC9B,aAAa,EACb,kBAAkB,EACtB,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport InternalPopover from './internal';\nimport { getExternalProps } from '../internal/utils/external-props';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { PopoverProps } from './interfaces';\n\nexport { PopoverProps };\n\nexport default function Popover({\n position = 'right',\n size = 'medium',\n fixedWidth = false,\n triggerType = 'text',\n dismissButton = true,\n renderWithPortal = false,\n header,\n ...rest\n}: PopoverProps) {\n if (isDevelopment) {\n if (dismissButton && !header) {\n warnOnce('Popover', `You should provide a \\`header\\` when \\`dismissButton\\` is true.`);\n }\n }\n\n const baseComponentProps = useBaseComponent('Popover');\n const externalProps = getExternalProps(rest);\n return (\n <InternalPopover\n header={header}\n position={position}\n size={size}\n fixedWidth={fixedWidth}\n triggerType={triggerType}\n dismissButton={dismissButton}\n renderWithPortal={renderWithPortal}\n {...externalProps}\n {...baseComponentProps}\n />\n );\n}\n\napplyDisplayName(Popover, 'Popover');\n"]}
|
package/progress-bar/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import styles from './styles.css.js';
|
|
7
7
|
import { getBaseProps } from '../internal/base-component';
|
|
8
|
-
import { warnOnce } from '
|
|
8
|
+
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
9
9
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
10
10
|
import { useUniqueId } from '../internal/hooks/use-unique-id';
|
|
11
11
|
import { Progress, ResultState, SmallText } from './internal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["progress-bar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["progress-bar/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAE5D,MAAM,mBAAmB,GAAG,IAAI,CAAC,CAAC,gDAAgD;AAIlF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAWjB;QAXiB,EAClC,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,aAAa,EACtB,OAAO,GAAG,YAAY,EACtB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,cAAc,EACd,UAAU,EACV,mBAAmB,OAEF,EADd,IAAI,cAV2B,iIAWnC,CADQ;IAEP,MAAM,EAAE,iBAAiB,EAAE,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAEzD,MAAM,OAAO,GAAG,GAAG,aAAa,QAAQ,CAAC;IACzC,MAAM,SAAS,GAAG,OAAO,KAAK,OAAO,CAAC;IACtC,MAAM,iBAAiB,GAAG,MAAM,KAAK,aAAa,CAAC;IAEnD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,EAAE;QACtC,OAAO,QAAQ,CAAC,CAAC,KAAgC,EAAE,EAAE;YACnD,YAAY,CAAC,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,KAAK,KAAK,GAAG,CAAC,CAAC;QAC5C,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAC1B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,SAAS,CAAC,GAAG,EAAE;QACb,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;IAEhC,IAAI,SAAS,IAAI,gBAAgB,EAAE;QACjC,QAAQ,CACN,aAAa,EACb,oPAAoP,CACrP,CAAC;KACH;IAED,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,EAC7E,GAAG,EAAE,iBAAiB;QAEtB,6BAAK,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,SAAS;YAC/D,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,SAAS,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,IAC/E,KAAK,CACF;YACL,WAAW,IAAI,oBAAC,SAAS,IAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAG,WAAW,CAAa;YAC9F,iCACG,iBAAiB,CAAC,CAAC,CAAC,CACnB;gBACE,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAI;gBAClE,oBAAC,UAAU,IAAC,KAAK,EAAE,CAAC,IAAG,SAAS,CAAc,CAC7C,CACJ,CAAC,CAAC,CAAC,CACF,oBAAC,WAAW,IACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE;oBACZ,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;gBAC9C,CAAC,GACD,CACH,CACG,CACF;QACL,cAAc,IAAI,oBAAC,SAAS,IAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAG,cAAc,CAAa,CAChG,CACP,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useMemo, useState } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport { ProgressBarProps } from './interfaces';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\nimport { Progress, ResultState, SmallText } from './internal';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { throttle } from '../internal/utils/throttle';\nimport LiveRegion from '../internal/components/live-region';\n\nconst ASSERTION_FREQUENCY = 5000; // interval in ms between progress announcements\n\nexport { ProgressBarProps };\n\nexport default function ProgressBar({\n value = 0,\n status = 'in-progress',\n variant = 'standalone',\n resultButtonText,\n label,\n description,\n additionalInfo,\n resultText,\n onResultButtonClick,\n ...rest\n}: ProgressBarProps) {\n const { __internalRootRef } = useBaseComponent('ProgressBar');\n const baseProps = getBaseProps(rest);\n const generatedName = useUniqueId('awsui-progress-bar-');\n\n const labelId = `${generatedName}-label`;\n const isInFlash = variant === 'flash';\n const isInProgressState = status === 'in-progress';\n\n const [assertion, setAssertion] = useState('');\n const throttledAssertion = useMemo(() => {\n return throttle((value: ProgressBarProps['value']) => {\n setAssertion(`${label ?? ''}: ${value}%`);\n }, ASSERTION_FREQUENCY);\n }, [label]);\n\n useEffect(() => {\n throttledAssertion(value);\n }, [throttledAssertion, value]);\n\n if (isInFlash && resultButtonText) {\n warnOnce(\n 'ProgressBar',\n 'The `resultButtonText` is ignored if you set `variant=\"flash\"`, and the result button is not displayed. Use the `buttonText` property and the `onButtonClick` event listener of the flashbar item in which the progress bar component is embedded.'\n );\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles.root, variant && styles[variant])}\n ref={__internalRootRef}\n >\n <div className={isInFlash ? styles['flash-container'] : undefined}>\n <div className={clsx(styles['word-wrap'], styles[`label-${variant}`])} id={labelId}>\n {label}\n </div>\n {description && <SmallText color={isInFlash ? 'inherit' : undefined}>{description}</SmallText>}\n <div>\n {isInProgressState ? (\n <>\n <Progress value={value} labelId={labelId} isInFlash={isInFlash} />\n <LiveRegion delay={0}>{assertion}</LiveRegion>\n </>\n ) : (\n <ResultState\n resultText={resultText}\n isInFlash={isInFlash}\n resultButtonText={resultButtonText}\n status={status}\n onClick={() => {\n fireNonCancelableEvent(onResultButtonClick);\n }}\n />\n )}\n </div>\n </div>\n {additionalInfo && <SmallText color={isInFlash ? 'inherit' : undefined}>{additionalInfo}</SmallText>}\n </div>\n );\n}\n\napplyDisplayName(ProgressBar, 'ProgressBar');\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { isDevelopment } from '../../internal/is-development';
|
|
4
|
-
import { warnOnce } from '
|
|
4
|
+
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
5
5
|
export function checkOptionValueField(componentName, propertyName, propertyValue) {
|
|
6
6
|
if (isDevelopment) {
|
|
7
7
|
if (!propertyValue) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-option-value-field.js","sourceRoot":"lib/default/","sources":["select/utils/check-option-value-field.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"check-option-value-field.js","sourceRoot":"lib/default/","sources":["select/utils/check-option-value-field.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,MAAM,UAAU,qBAAqB,CACnC,aAAqB,EACrB,YAAoB,EACpB,aAAoC;IAEpC,IAAI,aAAa,EAAE;QACjB,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;SACR;QAED,MAAM,oBAAoB,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YAC1D,OAAO,SAAS,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC;QACpD,CAAC,CAAC,CAAC;QAEH,IAAI,oBAAoB,EAAE;YACxB,QAAQ,CACN,aAAa,EACb,qBAAqB,YAAY,8IAA8I,CAChL,CAAC;SACH;KACF;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isDevelopment } from '../../internal/is-development';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nexport function checkOptionValueField<ValueType extends ReadonlyArray<any>>(\n componentName: string,\n propertyName: string,\n propertyValue: ValueType | undefined\n) {\n if (isDevelopment) {\n if (!propertyValue) {\n return;\n }\n\n const valuePropertyMissing = !propertyValue.every(element => {\n return 'options' in element || 'value' in element;\n });\n\n if (valuePropertyMissing) {\n warnOnce(\n componentName,\n `You provided an \\`${propertyName}\\` prop where at least one non-group array element is missing the \\`value\\` field. This field is required for all options without sub-items.`\n );\n }\n }\n}\n"]}
|
package/side-navigation/util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { warnOnce } from '
|
|
1
|
+
import { warnOnce } from '@cloudscape-design/component-toolkit/internal';
|
|
2
2
|
export function hasActiveLink(items, activeHref) {
|
|
3
3
|
for (const item of items) {
|
|
4
4
|
if ((item.type === 'link' || item.type === 'link-group' || item.type === 'expandable-link-group') &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"lib/default/","sources":["side-navigation/util.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"lib/default/","sources":["side-navigation/util.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAIzE,MAAM,UAAU,aAAa,CAAC,KAA8C,EAAE,UAAkB;IAC9F,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,IACE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC;YAC7F,IAAI,CAAC,IAAI,KAAK,UAAU,EACxB;YACA,OAAO,IAAI,CAAC;SACb;QACD,IACE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC;YAChG,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,EACrC;YACA,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,KAA8C,EAC9C,UAA4E,IAAI,OAAO,EAAE,EACzF,oBAAmD,EAAE;IAErD,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,KAAK,EAAE,CAAC;QACnD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,EAAE;YACpE,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YACrC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;SAChC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,EAAE;YAClG,8BAA8B,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;SACvE;IACH,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAA8C;IAChF,MAAM,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;IAC5B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,mDAAmD;QACnD,oEAAoE;QACpE,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,EAAG,CAAC;QAE5B,yBAAyB;QACzB,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACxB,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;aAC9E;YACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACtB;QAED,IAAI,OAAO,IAAI,IAAI,EAAE;YACnB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;SAC3B;KACF;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SideNavigationProps } from './interfaces';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\ntype ExpandableItem = SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup;\n\nexport function hasActiveLink(items: ReadonlyArray<SideNavigationProps.Item>, activeHref: string): boolean {\n for (const item of items) {\n if (\n (item.type === 'link' || item.type === 'link-group' || item.type === 'expandable-link-group') &&\n item.href === activeHref\n ) {\n return true;\n }\n if (\n (item.type === 'section' || item.type === 'link-group' || item.type === 'expandable-link-group') &&\n hasActiveLink(item.items, activeHref)\n ) {\n return true;\n }\n }\n return false;\n}\n\nexport function generateExpandableItemsMapping(\n items: ReadonlyArray<SideNavigationProps.Item>,\n mapping: WeakMap<SideNavigationProps.Item, ReadonlyArray<ExpandableItem>> = new WeakMap(),\n expandableParents: ReadonlyArray<ExpandableItem> = []\n): WeakMap<SideNavigationProps.Item, ReadonlyArray<ExpandableItem>> {\n items.forEach(item => {\n const nextLevelParents = expandableParents.slice();\n if (item.type === 'section' || item.type === 'expandable-link-group') {\n mapping.set(item, expandableParents);\n nextLevelParents.unshift(item);\n }\n if (item.type === 'section' || item.type === 'link-group' || item.type === 'expandable-link-group') {\n generateExpandableItemsMapping(item.items, mapping, nextLevelParents);\n }\n });\n return mapping;\n}\n\nexport function checkDuplicateHrefs(items: ReadonlyArray<SideNavigationProps.Item>) {\n const hrefs = new Set();\n const queue = items.slice();\n while (queue.length > 0) {\n // We just checked that there's items in the queue.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const item = queue.shift()!;\n\n // Check duplicated hrefs\n if ('href' in item) {\n if (hrefs.has(item.href)) {\n warnOnce('SideNavigation', `duplicate href in \"${item.text}\": ${item.href}`);\n }\n hrefs.add(item.href);\n }\n\n if ('items' in item) {\n queue.push(...item.items);\n }\n }\n}\n"]}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"body-cell": "awsui_body-
|
|
5
|
-
"body-cell-wrap": "awsui_body-cell-
|
|
6
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
7
|
-
"has-striped-rows": "awsui_has-striped-
|
|
8
|
-
"body-cell-edit-active": "awsui_body-cell-edit-
|
|
9
|
-
"body-cell-editable": "awsui_body-cell-
|
|
10
|
-
"has-striped-rows-sticky-cell-pad-left": "awsui_has-striped-rows-sticky-cell-pad-
|
|
11
|
-
"has-selection": "awsui_has-
|
|
12
|
-
"body-cell-first-row": "awsui_body-cell-first-
|
|
13
|
-
"body-cell-last-row": "awsui_body-cell-last-
|
|
14
|
-
"body-cell-selected": "awsui_body-cell-
|
|
15
|
-
"has-footer": "awsui_has-
|
|
16
|
-
"body-cell-shaded": "awsui_body-cell-
|
|
17
|
-
"sticky-cell": "awsui_sticky-
|
|
18
|
-
"sticky-cell-pad-left": "awsui_sticky-cell-pad-
|
|
19
|
-
"sticky-cell-last-right": "awsui_sticky-cell-last-
|
|
20
|
-
"sticky-cell-last-left": "awsui_sticky-cell-last-
|
|
21
|
-
"body-cell-next-selected": "awsui_body-cell-next-
|
|
22
|
-
"body-cell-prev-selected": "awsui_body-cell-prev-
|
|
23
|
-
"body-cell-success": "awsui_body-cell-
|
|
24
|
-
"body-cell-editor": "awsui_body-cell-
|
|
25
|
-
"body-cell-success-form": "awsui_body-cell-success-
|
|
26
|
-
"body-cell-editor-form": "awsui_body-cell-editor-
|
|
27
|
-
"body-cell-success-row": "awsui_body-cell-success-
|
|
28
|
-
"body-cell-editor-row": "awsui_body-cell-editor-
|
|
29
|
-
"body-cell-success-controls": "awsui_body-cell-success-
|
|
30
|
-
"body-cell-editor-controls": "awsui_body-cell-editor-
|
|
31
|
-
"body-cell-has-success": "awsui_body-cell-has-
|
|
4
|
+
"body-cell": "awsui_body-cell_c6tup_11rnr_93",
|
|
5
|
+
"body-cell-wrap": "awsui_body-cell-wrap_c6tup_11rnr_103",
|
|
6
|
+
"is-visual-refresh": "awsui_is-visual-refresh_c6tup_11rnr_115",
|
|
7
|
+
"has-striped-rows": "awsui_has-striped-rows_c6tup_11rnr_127",
|
|
8
|
+
"body-cell-edit-active": "awsui_body-cell-edit-active_c6tup_11rnr_130",
|
|
9
|
+
"body-cell-editable": "awsui_body-cell-editable_c6tup_11rnr_130",
|
|
10
|
+
"has-striped-rows-sticky-cell-pad-left": "awsui_has-striped-rows-sticky-cell-pad-left_c6tup_11rnr_136",
|
|
11
|
+
"has-selection": "awsui_has-selection_c6tup_11rnr_139",
|
|
12
|
+
"body-cell-first-row": "awsui_body-cell-first-row_c6tup_11rnr_145",
|
|
13
|
+
"body-cell-last-row": "awsui_body-cell-last-row_c6tup_11rnr_148",
|
|
14
|
+
"body-cell-selected": "awsui_body-cell-selected_c6tup_11rnr_148",
|
|
15
|
+
"has-footer": "awsui_has-footer_c6tup_11rnr_148",
|
|
16
|
+
"body-cell-shaded": "awsui_body-cell-shaded_c6tup_11rnr_158",
|
|
17
|
+
"sticky-cell": "awsui_sticky-cell_c6tup_11rnr_175",
|
|
18
|
+
"sticky-cell-pad-left": "awsui_sticky-cell-pad-left_c6tup_11rnr_183",
|
|
19
|
+
"sticky-cell-last-right": "awsui_sticky-cell-last-right_c6tup_11rnr_200",
|
|
20
|
+
"sticky-cell-last-left": "awsui_sticky-cell-last-left_c6tup_11rnr_204",
|
|
21
|
+
"body-cell-next-selected": "awsui_body-cell-next-selected_c6tup_11rnr_227",
|
|
22
|
+
"body-cell-prev-selected": "awsui_body-cell-prev-selected_c6tup_11rnr_231",
|
|
23
|
+
"body-cell-success": "awsui_body-cell-success_c6tup_11rnr_255",
|
|
24
|
+
"body-cell-editor": "awsui_body-cell-editor_c6tup_11rnr_255",
|
|
25
|
+
"body-cell-success-form": "awsui_body-cell-success-form_c6tup_11rnr_277",
|
|
26
|
+
"body-cell-editor-form": "awsui_body-cell-editor-form_c6tup_11rnr_277",
|
|
27
|
+
"body-cell-success-row": "awsui_body-cell-success-row_c6tup_11rnr_286",
|
|
28
|
+
"body-cell-editor-row": "awsui_body-cell-editor-row_c6tup_11rnr_286",
|
|
29
|
+
"body-cell-success-controls": "awsui_body-cell-success-controls_c6tup_11rnr_296",
|
|
30
|
+
"body-cell-editor-controls": "awsui_body-cell-editor-controls_c6tup_11rnr_296",
|
|
31
|
+
"body-cell-has-success": "awsui_body-cell-has-success_c6tup_11rnr_315"
|
|
32
32
|
};
|
|
33
33
|
|