@cloudscape-design/components 3.0.581 → 3.0.582
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/internal.js +1 -1
- package/anchor-navigation/internal.js.map +1 -1
- package/box/styles.css.js +190 -190
- package/box/styles.scoped.css +357 -339
- package/box/styles.selectors.js +190 -190
- package/column-layout/styles.css.js +13 -13
- package/column-layout/styles.scoped.css +63 -63
- package/column-layout/styles.selectors.js +13 -13
- package/expandable-section/styles.css.js +32 -32
- package/expandable-section/styles.scoped.css +68 -62
- package/expandable-section/styles.selectors.js +32 -32
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +75 -71
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/select/internal.js +1 -1
- package/select/internal.js.map +1 -1
- package/select/parts/styles.css.js +16 -16
- package/select/parts/styles.scoped.css +20 -16
- package/select/parts/styles.selectors.js +16 -16
- package/select/utils/use-native-search.d.ts +1 -2
- package/select/utils/use-native-search.d.ts.map +1 -1
- package/select/utils/use-native-search.js +3 -7
- package/select/utils/use-native-search.js.map +1 -1
- package/tiles/styles.css.js +29 -29
- package/tiles/styles.scoped.css +90 -90
- package/tiles/styles.selectors.js +29 -29
- package/toggle/styles.css.js +8 -8
- package/toggle/styles.scoped.css +16 -13
- package/toggle/styles.selectors.js +8 -8
package/link/styles.scoped.css
CHANGED
|
@@ -96,7 +96,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
96
96
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
97
97
|
SPDX-License-Identifier: Apache-2.0
|
|
98
98
|
*/
|
|
99
|
-
.
|
|
99
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9) {
|
|
100
100
|
border-collapse: separate;
|
|
101
101
|
border-spacing: 0;
|
|
102
102
|
box-sizing: border-box;
|
|
@@ -145,30 +145,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
145
145
|
text-decoration-thickness: 1px;
|
|
146
146
|
}
|
|
147
147
|
@media (prefers-reduced-motion: reduce) {
|
|
148
|
-
.
|
|
148
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9) {
|
|
149
149
|
animation: none;
|
|
150
150
|
transition: none;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
.awsui-motion-disabled .
|
|
153
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99:not(#\9) {
|
|
154
154
|
animation: none;
|
|
155
155
|
transition: none;
|
|
156
156
|
}
|
|
157
|
-
.
|
|
157
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9):hover {
|
|
158
158
|
cursor: pointer;
|
|
159
159
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
160
160
|
}
|
|
161
|
-
.
|
|
161
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9):focus {
|
|
162
162
|
outline: none;
|
|
163
163
|
}
|
|
164
|
-
.
|
|
164
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9):active {
|
|
165
165
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
166
166
|
}
|
|
167
|
-
.
|
|
167
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9):active, .awsui_link_4c84z_i6aqa_99:not(#\9):focus, .awsui_link_4c84z_i6aqa_99:not(#\9):hover {
|
|
168
168
|
text-decoration-line: underline;
|
|
169
169
|
text-decoration-color: currentColor;
|
|
170
170
|
}
|
|
171
|
-
.
|
|
171
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9) {
|
|
172
172
|
-webkit-font-smoothing: inherit;
|
|
173
173
|
-moz-osx-font-smoothing: inherit;
|
|
174
174
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
@@ -182,30 +182,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
182
182
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
183
183
|
}
|
|
184
184
|
@media (prefers-reduced-motion: reduce) {
|
|
185
|
-
.
|
|
185
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9) {
|
|
186
186
|
animation: none;
|
|
187
187
|
transition: none;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
.awsui-motion-disabled .
|
|
190
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9) {
|
|
191
191
|
animation: none;
|
|
192
192
|
transition: none;
|
|
193
193
|
}
|
|
194
|
-
.
|
|
194
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9):hover {
|
|
195
195
|
cursor: pointer;
|
|
196
196
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9):focus {
|
|
199
199
|
outline: none;
|
|
200
200
|
}
|
|
201
|
-
.
|
|
201
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9):active {
|
|
202
202
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
203
203
|
}
|
|
204
|
-
.
|
|
204
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_variant-secondary_4c84z_i6aqa_168:not(#\9):hover {
|
|
205
205
|
text-decoration-line: underline;
|
|
206
206
|
text-decoration-color: currentColor;
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9) {
|
|
209
209
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
210
210
|
font-weight: inherit;
|
|
211
211
|
letter-spacing: normal;
|
|
@@ -217,30 +217,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
217
217
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
218
218
|
}
|
|
219
219
|
@media (prefers-reduced-motion: reduce) {
|
|
220
|
-
.
|
|
220
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9) {
|
|
221
221
|
animation: none;
|
|
222
222
|
transition: none;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
.awsui-motion-disabled .
|
|
225
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9) {
|
|
226
226
|
animation: none;
|
|
227
227
|
transition: none;
|
|
228
228
|
}
|
|
229
|
-
.
|
|
229
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9):hover {
|
|
230
230
|
cursor: pointer;
|
|
231
231
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9):focus {
|
|
234
234
|
outline: none;
|
|
235
235
|
}
|
|
236
|
-
.
|
|
236
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9):active {
|
|
237
237
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
238
238
|
}
|
|
239
|
-
.
|
|
239
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_variant-primary_4c84z_i6aqa_203:not(#\9):hover {
|
|
240
240
|
text-decoration-line: underline;
|
|
241
241
|
text-decoration-color: currentColor;
|
|
242
242
|
}
|
|
243
|
-
.
|
|
243
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9) {
|
|
244
244
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
245
245
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
246
246
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
@@ -254,30 +254,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
254
254
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
255
255
|
}
|
|
256
256
|
@media (prefers-reduced-motion: reduce) {
|
|
257
|
-
.
|
|
257
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9) {
|
|
258
258
|
animation: none;
|
|
259
259
|
transition: none;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
.awsui-motion-disabled .
|
|
262
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9) {
|
|
263
263
|
animation: none;
|
|
264
264
|
transition: none;
|
|
265
265
|
}
|
|
266
|
-
.
|
|
266
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9):hover {
|
|
267
267
|
cursor: pointer;
|
|
268
268
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
269
269
|
}
|
|
270
|
-
.
|
|
270
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9):focus {
|
|
271
271
|
outline: none;
|
|
272
272
|
}
|
|
273
|
-
.
|
|
273
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9):active {
|
|
274
274
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
275
275
|
}
|
|
276
|
-
.
|
|
276
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_variant-info_4c84z_i6aqa_236:not(#\9):hover {
|
|
277
277
|
text-decoration-line: underline;
|
|
278
278
|
text-decoration-color: var(--color-text-link-button-underline-hover-gyir88, transparent);
|
|
279
279
|
}
|
|
280
|
-
.
|
|
280
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9) {
|
|
281
281
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
282
282
|
font-weight: var(--font-box-value-large-weight-onoq9k, 700);
|
|
283
283
|
text-decoration-line: underline;
|
|
@@ -288,30 +288,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
288
288
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
289
289
|
}
|
|
290
290
|
@media (prefers-reduced-motion: reduce) {
|
|
291
|
-
.
|
|
291
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9) {
|
|
292
292
|
animation: none;
|
|
293
293
|
transition: none;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
.awsui-motion-disabled .
|
|
296
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9) {
|
|
297
297
|
animation: none;
|
|
298
298
|
transition: none;
|
|
299
299
|
}
|
|
300
|
-
.
|
|
300
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9):hover {
|
|
301
301
|
cursor: pointer;
|
|
302
302
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
303
303
|
}
|
|
304
|
-
.
|
|
304
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9):focus {
|
|
305
305
|
outline: none;
|
|
306
306
|
}
|
|
307
|
-
.
|
|
307
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9):active {
|
|
308
308
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
309
309
|
}
|
|
310
|
-
.
|
|
310
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_variant-value-large_4c84z_i6aqa_271:not(#\9):hover {
|
|
311
311
|
text-decoration-line: underline;
|
|
312
312
|
text-decoration-color: currentColor;
|
|
313
313
|
}
|
|
314
|
-
.
|
|
314
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9) {
|
|
315
315
|
color: var(--color-text-interactive-default-lnx6lk, #414d5c);
|
|
316
316
|
font-weight: 700;
|
|
317
317
|
letter-spacing: 0.005em;
|
|
@@ -323,30 +323,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
323
323
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
324
324
|
}
|
|
325
325
|
@media (prefers-reduced-motion: reduce) {
|
|
326
|
-
.
|
|
326
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9) {
|
|
327
327
|
animation: none;
|
|
328
328
|
transition: none;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
.awsui-motion-disabled .
|
|
331
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9) {
|
|
332
332
|
animation: none;
|
|
333
333
|
transition: none;
|
|
334
334
|
}
|
|
335
|
-
.
|
|
335
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9):hover {
|
|
336
336
|
cursor: pointer;
|
|
337
337
|
color: var(--color-text-interactive-hover-mj8add, #000716);
|
|
338
338
|
}
|
|
339
|
-
.
|
|
339
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9):focus {
|
|
340
340
|
outline: none;
|
|
341
341
|
}
|
|
342
|
-
.
|
|
342
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9):active {
|
|
343
343
|
color: var(--color-text-interactive-active-ox3ozh, #000716);
|
|
344
344
|
}
|
|
345
|
-
.
|
|
345
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_variant-top-navigation_4c84z_i6aqa_303:not(#\9):hover {
|
|
346
346
|
text-decoration-line: underline;
|
|
347
347
|
text-decoration-color: transparent;
|
|
348
348
|
}
|
|
349
|
-
.
|
|
349
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9) {
|
|
350
350
|
color: var(--color-text-link-default-latg1a, #0972d3);
|
|
351
351
|
font-weight: var(--font-link-button-weight-jephf1, 700);
|
|
352
352
|
letter-spacing: var(--font-link-button-letter-spacing-yi9f0l, 0.005em);
|
|
@@ -358,30 +358,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
358
358
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
359
359
|
}
|
|
360
360
|
@media (prefers-reduced-motion: reduce) {
|
|
361
|
-
.
|
|
361
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9) {
|
|
362
362
|
animation: none;
|
|
363
363
|
transition: none;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
.awsui-motion-disabled .
|
|
366
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9) {
|
|
367
367
|
animation: none;
|
|
368
368
|
transition: none;
|
|
369
369
|
}
|
|
370
|
-
.
|
|
370
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9):hover {
|
|
371
371
|
cursor: pointer;
|
|
372
372
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
373
373
|
}
|
|
374
|
-
.
|
|
374
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9):focus {
|
|
375
375
|
outline: none;
|
|
376
376
|
}
|
|
377
|
-
.
|
|
377
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9):active {
|
|
378
378
|
color: var(--color-text-link-hover-8j6p14, #033160);
|
|
379
379
|
}
|
|
380
|
-
.
|
|
380
|
+
.awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_variant-recovery_4c84z_i6aqa_336:not(#\9):hover {
|
|
381
381
|
text-decoration-line: underline;
|
|
382
382
|
text-decoration-color: var(--color-text-link-button-underline-hover-gyir88, transparent);
|
|
383
383
|
}
|
|
384
|
-
.
|
|
384
|
+
.awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9) {
|
|
385
385
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
386
386
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
387
387
|
color: var(--color-text-link-button-normal-default-px6yl8, #0972d3);
|
|
@@ -395,40 +395,40 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
395
395
|
transition-duration: var(--motion-duration-refresh-only-medium-nf6485, 165ms);
|
|
396
396
|
}
|
|
397
397
|
@media (prefers-reduced-motion: reduce) {
|
|
398
|
-
.
|
|
398
|
+
.awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9) {
|
|
399
399
|
animation: none;
|
|
400
400
|
transition: none;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
.awsui-motion-disabled .
|
|
403
|
+
.awsui-motion-disabled .awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9), .awsui-mode-entering .awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9) {
|
|
404
404
|
animation: none;
|
|
405
405
|
transition: none;
|
|
406
406
|
}
|
|
407
|
-
.
|
|
407
|
+
.awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9):hover {
|
|
408
408
|
cursor: pointer;
|
|
409
409
|
color: var(--color-text-link-button-normal-hover-4psj43, #033160);
|
|
410
410
|
}
|
|
411
|
-
.
|
|
411
|
+
.awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9):focus {
|
|
412
412
|
outline: none;
|
|
413
413
|
}
|
|
414
|
-
.
|
|
414
|
+
.awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9):active {
|
|
415
415
|
color: var(--color-text-link-button-normal-active-pv8vqs, #033160);
|
|
416
416
|
}
|
|
417
|
-
.
|
|
417
|
+
.awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9):active, .awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9):focus, .awsui_link_4c84z_i6aqa_99.awsui_button_4c84z_i6aqa_369:not(#\9):hover {
|
|
418
418
|
text-decoration-line: underline;
|
|
419
419
|
text-decoration-color: transparent;
|
|
420
420
|
}
|
|
421
|
-
.
|
|
421
|
+
.awsui_link_4c84z_i6aqa_99.awsui_color-inverted_4c84z_i6aqa_404:not(#\9) {
|
|
422
422
|
color: var(--color-text-notification-default-rdawv9, #fbfbfb);
|
|
423
423
|
}
|
|
424
|
-
.
|
|
424
|
+
.awsui_link_4c84z_i6aqa_99.awsui_color-inverted_4c84z_i6aqa_404:not(#\9):not(.awsui_button_4c84z_i6aqa_369) {
|
|
425
425
|
text-decoration-line: underline;
|
|
426
426
|
text-decoration-color: currentColor;
|
|
427
427
|
}
|
|
428
|
-
.
|
|
428
|
+
.awsui_link_4c84z_i6aqa_99.awsui_color-inverted_4c84z_i6aqa_404:not(#\9):hover {
|
|
429
429
|
color: var(--color-text-link-inverted-hover-09cw7h, #ffffff);
|
|
430
430
|
}
|
|
431
|
-
body[data-awsui-focus-visible=true] .
|
|
431
|
+
body[data-awsui-focus-visible=true] .awsui_link_4c84z_i6aqa_99:not(#\9):focus {
|
|
432
432
|
outline: thin dotted;
|
|
433
433
|
outline: var(--border-link-focus-ring-outline-kkfop6, 0);
|
|
434
434
|
outline-offset: 2px;
|
|
@@ -439,72 +439,76 @@ body[data-awsui-focus-visible=true] .awsui_link_4c84z_e7dbz_99:not(#\9):focus {
|
|
|
439
439
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
440
440
|
box-shadow: 0 0 0 var(--border-link-focus-ring-shadow-spread-v8hkrl, 2px) var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
441
441
|
}
|
|
442
|
-
.
|
|
442
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-body-s_4c84z_i6aqa_425:not(#\9) {
|
|
443
443
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
444
444
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
445
445
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
446
446
|
text-underline-offset: 0.3em;
|
|
447
447
|
text-decoration-thickness: 1px;
|
|
448
448
|
}
|
|
449
|
-
.
|
|
449
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-body-m_4c84z_i6aqa_432:not(#\9) {
|
|
450
450
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
451
451
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
452
452
|
text-underline-offset: 0.25em;
|
|
453
453
|
text-decoration-thickness: 1px;
|
|
454
454
|
}
|
|
455
|
-
.
|
|
455
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-heading-xs_4c84z_i6aqa_438:not(#\9) {
|
|
456
456
|
font-size: var(--font-size-heading-xs-wo4hpf, 14px);
|
|
457
457
|
line-height: var(--line-height-heading-xs-aeleja, 18px);
|
|
458
458
|
text-underline-offset: 0.25em;
|
|
459
459
|
text-decoration-thickness: 1px;
|
|
460
460
|
}
|
|
461
|
-
.
|
|
461
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-heading-s_4c84z_i6aqa_444:not(#\9) {
|
|
462
462
|
font-size: var(--font-size-heading-s-yykzif, 16px);
|
|
463
463
|
line-height: var(--line-height-heading-s-4i6ewn, 20px);
|
|
464
464
|
letter-spacing: var(--letter-spacing-heading-s-jr3mor, -0.005em);
|
|
465
465
|
text-underline-offset: 0.3em;
|
|
466
466
|
text-decoration-thickness: 1px;
|
|
467
467
|
}
|
|
468
|
-
.
|
|
468
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-heading-m_4c84z_i6aqa_451:not(#\9) {
|
|
469
469
|
font-size: var(--font-size-heading-m-sjd256, 18px);
|
|
470
470
|
line-height: var(--line-height-heading-m-50evfk, 22px);
|
|
471
471
|
letter-spacing: var(--letter-spacing-heading-m-0w575i, -0.01em);
|
|
472
472
|
text-underline-offset: 0.25em;
|
|
473
473
|
text-decoration-thickness: 1px;
|
|
474
474
|
}
|
|
475
|
-
.
|
|
475
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-heading-l_4c84z_i6aqa_458:not(#\9) {
|
|
476
476
|
font-size: var(--font-size-heading-l-ou0d0l, 20px);
|
|
477
477
|
line-height: var(--line-height-heading-l-mmm3my, 24px);
|
|
478
478
|
letter-spacing: var(--letter-spacing-heading-l-qqjd4y, -0.015em);
|
|
479
479
|
text-underline-offset: 0.25em;
|
|
480
480
|
text-decoration-thickness: 1px;
|
|
481
481
|
}
|
|
482
|
-
.
|
|
482
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-heading-xl_4c84z_i6aqa_465:not(#\9) {
|
|
483
483
|
font-size: var(--font-size-heading-xl-ypc05a, 24px);
|
|
484
484
|
line-height: var(--line-height-heading-xl-avbttk, 30px);
|
|
485
485
|
letter-spacing: var(--letter-spacing-heading-xl-sagq9c, -0.02em);
|
|
486
486
|
text-underline-offset: 0.25em;
|
|
487
487
|
text-decoration-thickness: 1px;
|
|
488
488
|
}
|
|
489
|
-
.
|
|
489
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-display-l_4c84z_i6aqa_472:not(#\9) {
|
|
490
490
|
font-size: var(--font-size-display-l-htkq3e, 42px);
|
|
491
491
|
line-height: var(--line-height-display-l-8nioft, 48px);
|
|
492
492
|
letter-spacing: var(--letter-spacing-display-l-9cigop, -0.03em);
|
|
493
493
|
text-underline-offset: 0.25em;
|
|
494
494
|
text-decoration-thickness: 2px;
|
|
495
495
|
}
|
|
496
|
-
.
|
|
496
|
+
.awsui_link_4c84z_i6aqa_99.awsui_font-size-inherit_4c84z_i6aqa_479:not(#\9) {
|
|
497
497
|
font-size: inherit;
|
|
498
498
|
line-height: inherit;
|
|
499
499
|
letter-spacing: inherit;
|
|
500
500
|
text-underline-offset: 0.25em;
|
|
501
501
|
text-decoration-thickness: 1px;
|
|
502
502
|
}
|
|
503
|
+
.awsui_link_4c84z_i6aqa_99:not(#\9):dir(rtl) {
|
|
504
|
+
align-items: center;
|
|
505
|
+
display: inline-flex;
|
|
506
|
+
}
|
|
503
507
|
|
|
504
|
-
.awsui_icon-
|
|
508
|
+
.awsui_icon-wrapper_4c84z_i6aqa_491:not(#\9) {
|
|
505
509
|
white-space: nowrap;
|
|
506
510
|
}
|
|
507
511
|
|
|
508
|
-
.
|
|
512
|
+
.awsui_icon_4c84z_i6aqa_491:not(#\9) {
|
|
509
513
|
display: inline-block;
|
|
510
514
|
}
|
package/link/styles.selectors.js
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"link": "
|
|
6
|
-
"variant-secondary": "awsui_variant-
|
|
7
|
-
"variant-primary": "awsui_variant-
|
|
8
|
-
"variant-info": "awsui_variant-
|
|
9
|
-
"variant-value-large": "awsui_variant-value-
|
|
10
|
-
"variant-top-navigation": "awsui_variant-top-
|
|
11
|
-
"variant-recovery": "awsui_variant-
|
|
12
|
-
"button": "
|
|
13
|
-
"color-inverted": "awsui_color-
|
|
14
|
-
"font-size-body-s": "awsui_font-size-body-
|
|
15
|
-
"font-size-body-m": "awsui_font-size-body-
|
|
16
|
-
"font-size-heading-xs": "awsui_font-size-heading-
|
|
17
|
-
"font-size-heading-s": "awsui_font-size-heading-
|
|
18
|
-
"font-size-heading-m": "awsui_font-size-heading-
|
|
19
|
-
"font-size-heading-l": "awsui_font-size-heading-
|
|
20
|
-
"font-size-heading-xl": "awsui_font-size-heading-
|
|
21
|
-
"font-size-display-l": "awsui_font-size-display-
|
|
22
|
-
"font-size-inherit": "awsui_font-size-
|
|
23
|
-
"icon-wrapper": "awsui_icon-
|
|
24
|
-
"icon": "
|
|
5
|
+
"link": "awsui_link_4c84z_i6aqa_99",
|
|
6
|
+
"variant-secondary": "awsui_variant-secondary_4c84z_i6aqa_168",
|
|
7
|
+
"variant-primary": "awsui_variant-primary_4c84z_i6aqa_203",
|
|
8
|
+
"variant-info": "awsui_variant-info_4c84z_i6aqa_236",
|
|
9
|
+
"variant-value-large": "awsui_variant-value-large_4c84z_i6aqa_271",
|
|
10
|
+
"variant-top-navigation": "awsui_variant-top-navigation_4c84z_i6aqa_303",
|
|
11
|
+
"variant-recovery": "awsui_variant-recovery_4c84z_i6aqa_336",
|
|
12
|
+
"button": "awsui_button_4c84z_i6aqa_369",
|
|
13
|
+
"color-inverted": "awsui_color-inverted_4c84z_i6aqa_404",
|
|
14
|
+
"font-size-body-s": "awsui_font-size-body-s_4c84z_i6aqa_425",
|
|
15
|
+
"font-size-body-m": "awsui_font-size-body-m_4c84z_i6aqa_432",
|
|
16
|
+
"font-size-heading-xs": "awsui_font-size-heading-xs_4c84z_i6aqa_438",
|
|
17
|
+
"font-size-heading-s": "awsui_font-size-heading-s_4c84z_i6aqa_444",
|
|
18
|
+
"font-size-heading-m": "awsui_font-size-heading-m_4c84z_i6aqa_451",
|
|
19
|
+
"font-size-heading-l": "awsui_font-size-heading-l_4c84z_i6aqa_458",
|
|
20
|
+
"font-size-heading-xl": "awsui_font-size-heading-xl_4c84z_i6aqa_465",
|
|
21
|
+
"font-size-display-l": "awsui_font-size-display-l_4c84z_i6aqa_472",
|
|
22
|
+
"font-size-inherit": "awsui_font-size-inherit_4c84z_i6aqa_479",
|
|
23
|
+
"icon-wrapper": "awsui_icon-wrapper_4c84z_i6aqa_491",
|
|
24
|
+
"icon": "awsui_icon_4c84z_i6aqa_491"
|
|
25
25
|
};
|
|
26
26
|
|
package/package.json
CHANGED
package/select/internal.js
CHANGED
|
@@ -117,7 +117,7 @@ const InternalSelect = React.forwardRef((_a, externalRef) => {
|
|
|
117
117
|
};
|
|
118
118
|
const mergedRef = useMergeRefs(rootRef, __internalRootRef);
|
|
119
119
|
const dropdownProps = getDropdownProps();
|
|
120
|
-
return (React.createElement("div", Object.assign({}, baseProps, { ref: mergedRef, className: clsx(styles.root, baseProps.className),
|
|
120
|
+
return (React.createElement("div", Object.assign({}, baseProps, { ref: mergedRef, className: clsx(styles.root, baseProps.className), onKeyDown: handleNativeSearch }),
|
|
121
121
|
React.createElement(Dropdown, Object.assign({}, dropdownProps, { ariaLabelledby: dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined, open: isOpen, stretchTriggerHeight: __inFilteringToken, stretchBeyondTriggerWidth: true, trigger: trigger, header: filter, onMouseDown: handleMouseDown, footer: dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: isOpen ? dropdownStatus.content : null, id: footerId })) : null, expandToViewport: expandToViewport }),
|
|
122
122
|
React.createElement(ListComponent, { listBottom: !dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: isOpen ? dropdownStatus.content : null, id: footerId })) : null, menuProps: menuProps, getOptionProps: getOptionProps, filteredOptions: filteredOptions, filteringValue: filteringValue, ref: scrollToIndex, hasDropdownStatus: dropdownStatus.content !== null, screenReaderContent: announcement, highlightType: highlightType })),
|
|
123
123
|
React.createElement(ScreenreaderOnly, { id: selectAriaLabelId }, ariaLabel)));
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AgB;YAElC,oBAAC,aAAa,IACZ,UAAU,EACR,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACzB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EAClB,iBAAiB,EAAE,cAAc,CAAC,OAAO,KAAK,IAAI,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,CACO;QACX,oBAAC,gBAAgB,IAAC,EAAE,EAAE,iBAAiB,IAAG,SAAS,CAAoB,CACnE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useRef, useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport Dropdown from '../internal/components/dropdown';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport Filter from './parts/filter';\nimport Trigger from './parts/trigger';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { SelectProps } from './interfaces';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options';\nimport { useSelect } from './utils/use-select';\nimport { checkOptionValueField } from './utils/check-option-value-field';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useAnnouncement } from './utils/use-announcement';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport VirtualList from './parts/virtual-list';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { OptionGroup } from '../internal/components/option/interfaces.js';\nimport { SomeRequired } from '../internal/types';\nimport ScreenreaderOnly from '../internal/components/screenreader-only/index.js';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: boolean;\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n ariaRequired,\n placeholder,\n disabled,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef = null,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n } = useSelect({\n selectedOptions: selectedOption ? [selectedOption] : [],\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none',\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n isFiltered,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: handleRecoveryClick,\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: dropdownStatus.content ? footerId : undefined,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n return (\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyPress={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined\n }\n open={isOpen}\n stretchTriggerHeight={__inFilteringToken}\n stretchBeyondTriggerWidth={true}\n trigger={trigger}\n header={filter}\n onMouseDown={handleMouseDown}\n footer={\n dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n expandToViewport={expandToViewport}\n >\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n </Dropdown>\n <ScreenreaderOnly id={selectAriaLabelId}>{ariaLabel}</ScreenreaderOnly>\n </div>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,qDAAqD,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,E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oB,EAAE,kBAAkB,EACxC,yBAAyB,EAAE,IAAI,EAC/B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,eAAe,EAC5B,MAAM,EACJ,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACxB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,gBAAgB,EAAE,gBAAgB;YAElC,oBAAC,aAAa,IACZ,UAAU,EACR,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACzB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EAClB,iBAAiB,EAAE,cAAc,CAAC,OAAO,KAAK,IAAI,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,CACO;QACX,oBAAC,gBAAgB,IAAC,EAAE,EAAE,iBAAiB,IAAG,SAAS,CAAoB,CACnE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useRef, useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\n\nimport Dropdown from '../internal/components/dropdown';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport Filter from './parts/filter';\nimport Trigger from './parts/trigger';\nimport { useUniqueId } from '../internal/hooks/use-unique-id';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { SelectProps } from './interfaces';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options';\nimport { useSelect } from './utils/use-select';\nimport { checkOptionValueField } from './utils/check-option-value-field';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useAnnouncement } from './utils/use-announcement';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport VirtualList from './parts/virtual-list';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { OptionGroup } from '../internal/components/option/interfaces.js';\nimport { SomeRequired } from '../internal/types';\nimport ScreenreaderOnly from '../internal/components/screenreader-only/index.js';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: boolean;\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n ariaRequired,\n placeholder,\n disabled,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef = null,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n } = useSelect({\n selectedOptions: selectedOption ? [selectedOption] : [],\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none',\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n isFiltered,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: handleRecoveryClick,\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: dropdownStatus.content ? footerId : undefined,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n return (\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.dropdownContentRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.dropdownContentRole ? (dropdownStatus.content ? footerId : undefined) : undefined\n }\n open={isOpen}\n stretchTriggerHeight={__inFilteringToken}\n stretchBeyondTriggerWidth={true}\n trigger={trigger}\n header={filter}\n onMouseDown={handleMouseDown}\n footer={\n dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n expandToViewport={expandToViewport}\n >\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n </Dropdown>\n <ScreenreaderOnly id={selectAriaLabelId}>{ariaLabel}</ScreenreaderOnly>\n </div>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"placeholder": "
|
|
5
|
-
"item": "
|
|
6
|
-
"checkbox": "
|
|
7
|
-
"filter": "
|
|
8
|
-
"trigger": "
|
|
9
|
-
"layout-strut": "awsui_layout-
|
|
10
|
-
"list-bottom": "awsui_list-
|
|
11
|
-
"selected-icon": "awsui_selected-
|
|
12
|
-
"show-label-tag": "awsui_show-label-
|
|
13
|
-
"inline-token-trigger": "awsui_inline-token-
|
|
14
|
-
"inline-token-list": "awsui_inline-token-
|
|
15
|
-
"inline-token": "awsui_inline-
|
|
16
|
-
"visual-refresh": "awsui_visual-
|
|
17
|
-
"inline-token-hidden-placeholder": "awsui_inline-token-hidden-
|
|
18
|
-
"inline-token-counter": "awsui_inline-token-
|
|
19
|
-
"inline-token-trigger--disabled": "awsui_inline-token-trigger--
|
|
4
|
+
"placeholder": "awsui_placeholder_dwuol_18z0d_99",
|
|
5
|
+
"item": "awsui_item_dwuol_18z0d_104",
|
|
6
|
+
"checkbox": "awsui_checkbox_dwuol_18z0d_108",
|
|
7
|
+
"filter": "awsui_filter_dwuol_18z0d_117",
|
|
8
|
+
"trigger": "awsui_trigger_dwuol_18z0d_122",
|
|
9
|
+
"layout-strut": "awsui_layout-strut_dwuol_18z0d_128",
|
|
10
|
+
"list-bottom": "awsui_list-bottom_dwuol_18z0d_134",
|
|
11
|
+
"selected-icon": "awsui_selected-icon_dwuol_18z0d_138",
|
|
12
|
+
"show-label-tag": "awsui_show-label-tag_dwuol_18z0d_142",
|
|
13
|
+
"inline-token-trigger": "awsui_inline-token-trigger_dwuol_18z0d_146",
|
|
14
|
+
"inline-token-list": "awsui_inline-token-list_dwuol_18z0d_153",
|
|
15
|
+
"inline-token": "awsui_inline-token_dwuol_18z0d_146",
|
|
16
|
+
"visual-refresh": "awsui_visual-refresh_dwuol_18z0d_182",
|
|
17
|
+
"inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_18z0d_189",
|
|
18
|
+
"inline-token-counter": "awsui_inline-token-counter_dwuol_18z0d_195",
|
|
19
|
+
"inline-token-trigger--disabled": "awsui_inline-token-trigger--disabled_dwuol_18z0d_199"
|
|
20
20
|
};
|
|
21
21
|
|