@cloudscape-design/components 3.0.1262 → 3.0.1264
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +45 -43
- package/alert/styles.selectors.js +27 -27
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +148 -148
- package/flashbar/styles.selectors.js +50 -50
- package/internal/base-component/styles.scoped.css +7 -1
- package/internal/components/options-list/index.d.ts +1 -0
- package/internal/components/options-list/index.d.ts.map +1 -1
- package/internal/components/options-list/index.js +2 -2
- package/internal/components/options-list/index.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +6 -0
- package/internal/generated/styles/tokens.js +6 -0
- package/internal/generated/theming/index.cjs +33 -1
- package/internal/generated/theming/index.cjs.d.ts +63 -0
- package/internal/generated/theming/index.d.ts +63 -0
- package/internal/generated/theming/index.js +33 -1
- package/internal/manifest.json +1 -1
- package/multiselect/internal.js +1 -1
- package/multiselect/internal.js.map +1 -1
- package/multiselect/use-multiselect.d.ts +1 -0
- package/multiselect/use-multiselect.d.ts.map +1 -1
- package/package.json +1 -1
- package/select/internal.d.ts.map +1 -1
- package/select/internal.js +1 -0
- package/select/internal.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/side-navigation/interfaces.d.ts +0 -4
- package/side-navigation/interfaces.d.ts.map +1 -1
- package/side-navigation/interfaces.js.map +1 -1
|
@@ -241,6 +241,8 @@ export declare interface TypedOverride {
|
|
|
241
241
|
fontSizeHeadingS?: GlobalValue;
|
|
242
242
|
fontSizeHeadingXs?: GlobalValue;
|
|
243
243
|
fontWeightButton?: GlobalValue;
|
|
244
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
245
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
244
246
|
fontWeightHeadingXl?: GlobalValue;
|
|
245
247
|
fontWeightHeadingL?: GlobalValue;
|
|
246
248
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -280,6 +282,10 @@ export declare interface TypedOverride {
|
|
|
280
282
|
borderRadiusToken?: GlobalValue;
|
|
281
283
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
282
284
|
borderWidthAlert?: GlobalValue;
|
|
285
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
286
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
287
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
288
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
283
289
|
borderWidthButton?: GlobalValue;
|
|
284
290
|
borderWidthDropdown?: GlobalValue;
|
|
285
291
|
borderWidthField?: GlobalValue;
|
|
@@ -290,6 +296,7 @@ export declare interface TypedOverride {
|
|
|
290
296
|
borderWidthIconMedium?: GlobalValue;
|
|
291
297
|
borderWidthIconBig?: GlobalValue;
|
|
292
298
|
borderWidthIconLarge?: GlobalValue;
|
|
299
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
293
300
|
};
|
|
294
301
|
contexts?: {
|
|
295
302
|
'compact-table'?: {
|
|
@@ -533,6 +540,8 @@ export declare interface TypedOverride {
|
|
|
533
540
|
fontSizeHeadingS?: GlobalValue;
|
|
534
541
|
fontSizeHeadingXs?: GlobalValue;
|
|
535
542
|
fontWeightButton?: GlobalValue;
|
|
543
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
544
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
536
545
|
fontWeightHeadingXl?: GlobalValue;
|
|
537
546
|
fontWeightHeadingL?: GlobalValue;
|
|
538
547
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -572,6 +581,10 @@ export declare interface TypedOverride {
|
|
|
572
581
|
borderRadiusToken?: GlobalValue;
|
|
573
582
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
574
583
|
borderWidthAlert?: GlobalValue;
|
|
584
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
585
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
586
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
587
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
575
588
|
borderWidthButton?: GlobalValue;
|
|
576
589
|
borderWidthDropdown?: GlobalValue;
|
|
577
590
|
borderWidthField?: GlobalValue;
|
|
@@ -582,6 +595,7 @@ export declare interface TypedOverride {
|
|
|
582
595
|
borderWidthIconMedium?: GlobalValue;
|
|
583
596
|
borderWidthIconBig?: GlobalValue;
|
|
584
597
|
borderWidthIconLarge?: GlobalValue;
|
|
598
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
585
599
|
};
|
|
586
600
|
};
|
|
587
601
|
'top-navigation'?: {
|
|
@@ -825,6 +839,8 @@ export declare interface TypedOverride {
|
|
|
825
839
|
fontSizeHeadingS?: GlobalValue;
|
|
826
840
|
fontSizeHeadingXs?: GlobalValue;
|
|
827
841
|
fontWeightButton?: GlobalValue;
|
|
842
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
843
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
828
844
|
fontWeightHeadingXl?: GlobalValue;
|
|
829
845
|
fontWeightHeadingL?: GlobalValue;
|
|
830
846
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -864,6 +880,10 @@ export declare interface TypedOverride {
|
|
|
864
880
|
borderRadiusToken?: GlobalValue;
|
|
865
881
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
866
882
|
borderWidthAlert?: GlobalValue;
|
|
883
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
884
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
885
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
886
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
867
887
|
borderWidthButton?: GlobalValue;
|
|
868
888
|
borderWidthDropdown?: GlobalValue;
|
|
869
889
|
borderWidthField?: GlobalValue;
|
|
@@ -874,6 +894,7 @@ export declare interface TypedOverride {
|
|
|
874
894
|
borderWidthIconMedium?: GlobalValue;
|
|
875
895
|
borderWidthIconBig?: GlobalValue;
|
|
876
896
|
borderWidthIconLarge?: GlobalValue;
|
|
897
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
877
898
|
};
|
|
878
899
|
};
|
|
879
900
|
'header'?: {
|
|
@@ -1117,6 +1138,8 @@ export declare interface TypedOverride {
|
|
|
1117
1138
|
fontSizeHeadingS?: GlobalValue;
|
|
1118
1139
|
fontSizeHeadingXs?: GlobalValue;
|
|
1119
1140
|
fontWeightButton?: GlobalValue;
|
|
1141
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
1142
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
1120
1143
|
fontWeightHeadingXl?: GlobalValue;
|
|
1121
1144
|
fontWeightHeadingL?: GlobalValue;
|
|
1122
1145
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -1156,6 +1179,10 @@ export declare interface TypedOverride {
|
|
|
1156
1179
|
borderRadiusToken?: GlobalValue;
|
|
1157
1180
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
1158
1181
|
borderWidthAlert?: GlobalValue;
|
|
1182
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
1183
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
1184
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
1185
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
1159
1186
|
borderWidthButton?: GlobalValue;
|
|
1160
1187
|
borderWidthDropdown?: GlobalValue;
|
|
1161
1188
|
borderWidthField?: GlobalValue;
|
|
@@ -1166,6 +1193,7 @@ export declare interface TypedOverride {
|
|
|
1166
1193
|
borderWidthIconMedium?: GlobalValue;
|
|
1167
1194
|
borderWidthIconBig?: GlobalValue;
|
|
1168
1195
|
borderWidthIconLarge?: GlobalValue;
|
|
1196
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
1169
1197
|
};
|
|
1170
1198
|
};
|
|
1171
1199
|
'flashbar'?: {
|
|
@@ -1409,6 +1437,8 @@ export declare interface TypedOverride {
|
|
|
1409
1437
|
fontSizeHeadingS?: GlobalValue;
|
|
1410
1438
|
fontSizeHeadingXs?: GlobalValue;
|
|
1411
1439
|
fontWeightButton?: GlobalValue;
|
|
1440
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
1441
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
1412
1442
|
fontWeightHeadingXl?: GlobalValue;
|
|
1413
1443
|
fontWeightHeadingL?: GlobalValue;
|
|
1414
1444
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -1448,6 +1478,10 @@ export declare interface TypedOverride {
|
|
|
1448
1478
|
borderRadiusToken?: GlobalValue;
|
|
1449
1479
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
1450
1480
|
borderWidthAlert?: GlobalValue;
|
|
1481
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
1482
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
1483
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
1484
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
1451
1485
|
borderWidthButton?: GlobalValue;
|
|
1452
1486
|
borderWidthDropdown?: GlobalValue;
|
|
1453
1487
|
borderWidthField?: GlobalValue;
|
|
@@ -1458,6 +1492,7 @@ export declare interface TypedOverride {
|
|
|
1458
1492
|
borderWidthIconMedium?: GlobalValue;
|
|
1459
1493
|
borderWidthIconBig?: GlobalValue;
|
|
1460
1494
|
borderWidthIconLarge?: GlobalValue;
|
|
1495
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
1461
1496
|
};
|
|
1462
1497
|
};
|
|
1463
1498
|
'flashbar-warning'?: {
|
|
@@ -1701,6 +1736,8 @@ export declare interface TypedOverride {
|
|
|
1701
1736
|
fontSizeHeadingS?: GlobalValue;
|
|
1702
1737
|
fontSizeHeadingXs?: GlobalValue;
|
|
1703
1738
|
fontWeightButton?: GlobalValue;
|
|
1739
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
1740
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
1704
1741
|
fontWeightHeadingXl?: GlobalValue;
|
|
1705
1742
|
fontWeightHeadingL?: GlobalValue;
|
|
1706
1743
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -1740,6 +1777,10 @@ export declare interface TypedOverride {
|
|
|
1740
1777
|
borderRadiusToken?: GlobalValue;
|
|
1741
1778
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
1742
1779
|
borderWidthAlert?: GlobalValue;
|
|
1780
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
1781
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
1782
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
1783
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
1743
1784
|
borderWidthButton?: GlobalValue;
|
|
1744
1785
|
borderWidthDropdown?: GlobalValue;
|
|
1745
1786
|
borderWidthField?: GlobalValue;
|
|
@@ -1750,6 +1791,7 @@ export declare interface TypedOverride {
|
|
|
1750
1791
|
borderWidthIconMedium?: GlobalValue;
|
|
1751
1792
|
borderWidthIconBig?: GlobalValue;
|
|
1752
1793
|
borderWidthIconLarge?: GlobalValue;
|
|
1794
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
1753
1795
|
};
|
|
1754
1796
|
};
|
|
1755
1797
|
'alert'?: {
|
|
@@ -1993,6 +2035,8 @@ export declare interface TypedOverride {
|
|
|
1993
2035
|
fontSizeHeadingS?: GlobalValue;
|
|
1994
2036
|
fontSizeHeadingXs?: GlobalValue;
|
|
1995
2037
|
fontWeightButton?: GlobalValue;
|
|
2038
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
2039
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
1996
2040
|
fontWeightHeadingXl?: GlobalValue;
|
|
1997
2041
|
fontWeightHeadingL?: GlobalValue;
|
|
1998
2042
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -2032,6 +2076,10 @@ export declare interface TypedOverride {
|
|
|
2032
2076
|
borderRadiusToken?: GlobalValue;
|
|
2033
2077
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
2034
2078
|
borderWidthAlert?: GlobalValue;
|
|
2079
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
2080
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
2081
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
2082
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
2035
2083
|
borderWidthButton?: GlobalValue;
|
|
2036
2084
|
borderWidthDropdown?: GlobalValue;
|
|
2037
2085
|
borderWidthField?: GlobalValue;
|
|
@@ -2042,6 +2090,7 @@ export declare interface TypedOverride {
|
|
|
2042
2090
|
borderWidthIconMedium?: GlobalValue;
|
|
2043
2091
|
borderWidthIconBig?: GlobalValue;
|
|
2044
2092
|
borderWidthIconLarge?: GlobalValue;
|
|
2093
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
2045
2094
|
};
|
|
2046
2095
|
};
|
|
2047
2096
|
'alert-header'?: {
|
|
@@ -2285,6 +2334,8 @@ export declare interface TypedOverride {
|
|
|
2285
2334
|
fontSizeHeadingS?: GlobalValue;
|
|
2286
2335
|
fontSizeHeadingXs?: GlobalValue;
|
|
2287
2336
|
fontWeightButton?: GlobalValue;
|
|
2337
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
2338
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
2288
2339
|
fontWeightHeadingXl?: GlobalValue;
|
|
2289
2340
|
fontWeightHeadingL?: GlobalValue;
|
|
2290
2341
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -2324,6 +2375,10 @@ export declare interface TypedOverride {
|
|
|
2324
2375
|
borderRadiusToken?: GlobalValue;
|
|
2325
2376
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
2326
2377
|
borderWidthAlert?: GlobalValue;
|
|
2378
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
2379
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
2380
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
2381
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
2327
2382
|
borderWidthButton?: GlobalValue;
|
|
2328
2383
|
borderWidthDropdown?: GlobalValue;
|
|
2329
2384
|
borderWidthField?: GlobalValue;
|
|
@@ -2334,6 +2389,7 @@ export declare interface TypedOverride {
|
|
|
2334
2389
|
borderWidthIconMedium?: GlobalValue;
|
|
2335
2390
|
borderWidthIconBig?: GlobalValue;
|
|
2336
2391
|
borderWidthIconLarge?: GlobalValue;
|
|
2392
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
2337
2393
|
};
|
|
2338
2394
|
};
|
|
2339
2395
|
'app-layout-toolbar'?: {
|
|
@@ -2577,6 +2633,8 @@ export declare interface TypedOverride {
|
|
|
2577
2633
|
fontSizeHeadingS?: GlobalValue;
|
|
2578
2634
|
fontSizeHeadingXs?: GlobalValue;
|
|
2579
2635
|
fontWeightButton?: GlobalValue;
|
|
2636
|
+
fontWeightAlertHeader?: GlobalValue;
|
|
2637
|
+
fontWeightFlashbarHeader?: GlobalValue;
|
|
2580
2638
|
fontWeightHeadingXl?: GlobalValue;
|
|
2581
2639
|
fontWeightHeadingL?: GlobalValue;
|
|
2582
2640
|
fontWeightHeadingM?: GlobalValue;
|
|
@@ -2616,6 +2674,10 @@ export declare interface TypedOverride {
|
|
|
2616
2674
|
borderRadiusToken?: GlobalValue;
|
|
2617
2675
|
borderRadiusTutorialPanelItem?: GlobalValue;
|
|
2618
2676
|
borderWidthAlert?: GlobalValue;
|
|
2677
|
+
borderWidthAlertBlockStart?: GlobalValue;
|
|
2678
|
+
borderWidthAlertBlockEnd?: GlobalValue;
|
|
2679
|
+
borderWidthAlertInlineStart?: GlobalValue;
|
|
2680
|
+
borderWidthAlertInlineEnd?: GlobalValue;
|
|
2619
2681
|
borderWidthButton?: GlobalValue;
|
|
2620
2682
|
borderWidthDropdown?: GlobalValue;
|
|
2621
2683
|
borderWidthField?: GlobalValue;
|
|
@@ -2626,6 +2688,7 @@ export declare interface TypedOverride {
|
|
|
2626
2688
|
borderWidthIconMedium?: GlobalValue;
|
|
2627
2689
|
borderWidthIconBig?: GlobalValue;
|
|
2628
2690
|
borderWidthIconLarge?: GlobalValue;
|
|
2691
|
+
spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
|
|
2629
2692
|
};
|
|
2630
2693
|
};
|
|
2631
2694
|
};
|
|
@@ -2297,6 +2297,8 @@ export var preset = {
|
|
|
2297
2297
|
"fontTabsSize": "{fontSizeHeadingS}",
|
|
2298
2298
|
"fontWayfindingLinkActiveWeight": "700",
|
|
2299
2299
|
"fontWeightButton": "700",
|
|
2300
|
+
"fontWeightAlertHeader": "700",
|
|
2301
|
+
"fontWeightFlashbarHeader": "700",
|
|
2300
2302
|
"fontWeightHeadingXl": "700",
|
|
2301
2303
|
"fontWeightHeadingL": "700",
|
|
2302
2304
|
"fontWeightHeadingM": "700",
|
|
@@ -2361,6 +2363,10 @@ export var preset = {
|
|
|
2361
2363
|
"borderWidthCard": "{borderDividerSectionWidth}",
|
|
2362
2364
|
"borderWidthCardHighlighted": "{borderItemWidth}",
|
|
2363
2365
|
"borderWidthAlert": "2px",
|
|
2366
|
+
"borderWidthAlertBlockStart": "{borderWidthAlert}",
|
|
2367
|
+
"borderWidthAlertBlockEnd": "{borderWidthAlert}",
|
|
2368
|
+
"borderWidthAlertInlineStart": "{borderWidthAlert}",
|
|
2369
|
+
"borderWidthAlertInlineEnd": "{borderWidthAlert}",
|
|
2364
2370
|
"borderWidthButton": "2px",
|
|
2365
2371
|
"borderWidthDropdown": "2px",
|
|
2366
2372
|
"borderWidthField": "1px",
|
|
@@ -11864,6 +11870,8 @@ export var preset = {
|
|
|
11864
11870
|
"fontSizeHeadingS",
|
|
11865
11871
|
"fontSizeHeadingXs",
|
|
11866
11872
|
"fontWeightButton",
|
|
11873
|
+
"fontWeightAlertHeader",
|
|
11874
|
+
"fontWeightFlashbarHeader",
|
|
11867
11875
|
"fontWeightHeadingXl",
|
|
11868
11876
|
"fontWeightHeadingL",
|
|
11869
11877
|
"fontWeightHeadingM",
|
|
@@ -11903,6 +11911,10 @@ export var preset = {
|
|
|
11903
11911
|
"borderRadiusToken",
|
|
11904
11912
|
"borderRadiusTutorialPanelItem",
|
|
11905
11913
|
"borderWidthAlert",
|
|
11914
|
+
"borderWidthAlertBlockStart",
|
|
11915
|
+
"borderWidthAlertBlockEnd",
|
|
11916
|
+
"borderWidthAlertInlineStart",
|
|
11917
|
+
"borderWidthAlertInlineEnd",
|
|
11906
11918
|
"borderWidthButton",
|
|
11907
11919
|
"borderWidthDropdown",
|
|
11908
11920
|
"borderWidthField",
|
|
@@ -11912,7 +11924,8 @@ export var preset = {
|
|
|
11912
11924
|
"borderWidthIconNormal",
|
|
11913
11925
|
"borderWidthIconMedium",
|
|
11914
11926
|
"borderWidthIconBig",
|
|
11915
|
-
"borderWidthIconLarge"
|
|
11927
|
+
"borderWidthIconLarge",
|
|
11928
|
+
"spaceAlertVertical"
|
|
11916
11929
|
],
|
|
11917
11930
|
"exposed": [
|
|
11918
11931
|
"colorChartsRed300",
|
|
@@ -12252,6 +12265,8 @@ export var preset = {
|
|
|
12252
12265
|
"fontSizeHeadingS",
|
|
12253
12266
|
"fontSizeHeadingXs",
|
|
12254
12267
|
"fontWeightButton",
|
|
12268
|
+
"fontWeightAlertHeader",
|
|
12269
|
+
"fontWeightFlashbarHeader",
|
|
12255
12270
|
"fontWeightHeadingXl",
|
|
12256
12271
|
"fontWeightHeadingL",
|
|
12257
12272
|
"fontWeightHeadingM",
|
|
@@ -12292,6 +12307,10 @@ export var preset = {
|
|
|
12292
12307
|
"borderRadiusChatBubble",
|
|
12293
12308
|
"borderRadiusTutorialPanelItem",
|
|
12294
12309
|
"borderWidthAlert",
|
|
12310
|
+
"borderWidthAlertBlockStart",
|
|
12311
|
+
"borderWidthAlertBlockEnd",
|
|
12312
|
+
"borderWidthAlertInlineStart",
|
|
12313
|
+
"borderWidthAlertInlineEnd",
|
|
12295
12314
|
"borderWidthButton",
|
|
12296
12315
|
"borderWidthDropdown",
|
|
12297
12316
|
"borderWidthField",
|
|
@@ -12315,6 +12334,7 @@ export var preset = {
|
|
|
12315
12334
|
"motionKeyframesFadeOut",
|
|
12316
12335
|
"motionKeyframesStatusIconError",
|
|
12317
12336
|
"motionKeyframesScalePopup",
|
|
12337
|
+
"spaceAlertVertical",
|
|
12318
12338
|
"spaceContainerHorizontal",
|
|
12319
12339
|
"spaceFieldHorizontal",
|
|
12320
12340
|
"spaceTreeViewIndentation",
|
|
@@ -12926,6 +12946,8 @@ export var preset = {
|
|
|
12926
12946
|
"fontTabsSize": "font-tabs-size",
|
|
12927
12947
|
"fontWayfindingLinkActiveWeight": "font-wayfinding-link-active-weight",
|
|
12928
12948
|
"fontWeightButton": "font-weight-button",
|
|
12949
|
+
"fontWeightAlertHeader": "font-weight-alert-header",
|
|
12950
|
+
"fontWeightFlashbarHeader": "font-weight-flashbar-header",
|
|
12929
12951
|
"fontWeightHeadingXl": "font-weight-heading-xl",
|
|
12930
12952
|
"fontWeightHeadingL": "font-weight-heading-l",
|
|
12931
12953
|
"fontWeightHeadingM": "font-weight-heading-m",
|
|
@@ -12990,6 +13012,10 @@ export var preset = {
|
|
|
12990
13012
|
"borderWidthCard": "border-width-card",
|
|
12991
13013
|
"borderWidthCardHighlighted": "border-width-card-highlighted",
|
|
12992
13014
|
"borderWidthAlert": "border-width-alert",
|
|
13015
|
+
"borderWidthAlertBlockStart": "border-width-alert-block-start",
|
|
13016
|
+
"borderWidthAlertBlockEnd": "border-width-alert-block-end",
|
|
13017
|
+
"borderWidthAlertInlineStart": "border-width-alert-inline-start",
|
|
13018
|
+
"borderWidthAlertInlineEnd": "border-width-alert-inline-end",
|
|
12993
13019
|
"borderWidthButton": "border-width-button",
|
|
12994
13020
|
"borderWidthDropdown": "border-width-dropdown",
|
|
12995
13021
|
"borderWidthField": "border-width-field",
|
|
@@ -13758,6 +13784,8 @@ export var preset = {
|
|
|
13758
13784
|
"fontTabsSize": "--font-tabs-size-18irgl",
|
|
13759
13785
|
"fontWayfindingLinkActiveWeight": "--font-wayfinding-link-active-weight-ny4hup",
|
|
13760
13786
|
"fontWeightButton": "--font-weight-button-0eg20c",
|
|
13787
|
+
"fontWeightAlertHeader": "--font-weight-alert-header-zg25o1",
|
|
13788
|
+
"fontWeightFlashbarHeader": "--font-weight-flashbar-header-fg5kye",
|
|
13761
13789
|
"fontWeightHeadingXl": "--font-weight-heading-xl-u3m4we",
|
|
13762
13790
|
"fontWeightHeadingL": "--font-weight-heading-l-0t6dwc",
|
|
13763
13791
|
"fontWeightHeadingM": "--font-weight-heading-m-zf82dr",
|
|
@@ -13822,6 +13850,10 @@ export var preset = {
|
|
|
13822
13850
|
"borderWidthCard": "--border-width-card-x24gzt",
|
|
13823
13851
|
"borderWidthCardHighlighted": "--border-width-card-highlighted-x17dhn",
|
|
13824
13852
|
"borderWidthAlert": "--border-width-alert-tuifgy",
|
|
13853
|
+
"borderWidthAlertBlockStart": "--border-width-alert-block-start-5wbfsk",
|
|
13854
|
+
"borderWidthAlertBlockEnd": "--border-width-alert-block-end-q8rr42",
|
|
13855
|
+
"borderWidthAlertInlineStart": "--border-width-alert-inline-start-gjm6m1",
|
|
13856
|
+
"borderWidthAlertInlineEnd": "--border-width-alert-inline-end-9s426v",
|
|
13825
13857
|
"borderWidthButton": "--border-width-button-jm0qg7",
|
|
13826
13858
|
"borderWidthDropdown": "--border-width-dropdown-youcay",
|
|
13827
13859
|
"borderWidthField": "--border-width-field-2xc78x",
|
package/internal/manifest.json
CHANGED
package/multiselect/internal.js
CHANGED
|
@@ -77,7 +77,7 @@ const InternalMultiselect = React.forwardRef(({ options, filteringType, filterin
|
|
|
77
77
|
return (React.createElement("div", { ...baseProps, ref: __internalRootRef, className: clsx(styles.root, baseProps.className), ...multiselectProps.getWrapperProps() },
|
|
78
78
|
React.createElement(Dropdown, { ...dropdownProps, ariaLabelledby: dropdownProps.ariaRole ? joinStrings(ariaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.ariaRole ? (dropdownStatus.content ? footerId : undefined) : undefined, open: multiselectProps.isOpen, minWidth: getDropdownMinWidth({ expandToViewport, triggerWidth }), maxWidth: getBreakpointValue('xxs'), trigger: trigger, header: filter, footer: dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: multiselectProps.isOpen ? dropdownStatus.content : null, id: footerId })) : null, expandToViewport: expandToViewport,
|
|
79
79
|
// Forces dropdown position recalculation when new options are loaded
|
|
80
|
-
contentKey: hasOptions.current.toString(), content: React.createElement(ListComponent, { renderOption: renderOption, listBottom: !dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: multiselectProps.isOpen ? dropdownStatus.content : null, id: footerId })) : null, menuProps: multiselectProps.getMenuProps(), getOptionProps: multiselectProps.getOptionProps, filteredOptions: multiselectProps.filteredOptions, filteringValue: filteringValue, ref: multiselectProps.scrollToIndex, hasDropdownStatus: dropdownStatus.content !== null, checkboxes: true, useInteractiveGroups: true, screenReaderContent: multiselectProps.announcement, highlightType: multiselectProps.highlightType, firstOptionSticky: hasFilteredOptions && enableSelectAll, isMultiSelect: true }) }),
|
|
80
|
+
contentKey: hasOptions.current.toString(), content: React.createElement(ListComponent, { renderOption: renderOption, listBottom: !dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: multiselectProps.isOpen ? dropdownStatus.content : null, id: footerId })) : null, menuProps: { ...multiselectProps.getMenuProps(), ariaRequired }, getOptionProps: multiselectProps.getOptionProps, filteredOptions: multiselectProps.filteredOptions, filteringValue: filteringValue, ref: multiselectProps.scrollToIndex, hasDropdownStatus: dropdownStatus.content !== null, checkboxes: true, useInteractiveGroups: true, screenReaderContent: multiselectProps.announcement, highlightType: multiselectProps.highlightType, firstOptionSticky: hasFilteredOptions && enableSelectAll, isMultiSelect: true }) }),
|
|
81
81
|
showTokens && (React.createElement(InternalTokenGroup, { ...multiselectProps.getTokenProps(), className: styles.tokens, alignment: "horizontal", limit: tokenLimit, items: tokens, i18nStrings: tokenGroupI18nStrings, limitShowMoreAriaLabel: tokenLimitShowMoreAriaLabel, limitShowFewerAriaLabel: tokenLimitShowFewerAriaLabel, disableOuterPadding: true, readOnly: readOnly, isItemReadOnly: item => item._readOnly })),
|
|
82
82
|
React.createElement(ScreenreaderOnly, { id: ariaLabelId }, ariaLabel || inlineLabelText)));
|
|
83
83
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/multiselect/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE/F,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,cAAc,MAAM,iDAAiD,CAAC;AAC7E,OAAO,gBAAgB,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E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IAAI,eAAe,CAAoB,CAChF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer/index.js';\nimport ScreenreaderOnly from '../internal/components/screenreader-only';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component/index.js';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings';\nimport Filter from '../select/parts/filter';\nimport PlainList from '../select/parts/plain-list';\nimport Trigger from '../select/parts/trigger';\nimport VirtualList from '../select/parts/virtual-list';\nimport { TokenGroupProps } from '../token-group/interfaces';\nimport InternalTokenGroup from '../token-group/internal';\nimport { MultiselectProps } from './interfaces';\nimport { useMultiselect } from './use-multiselect';\n\nimport styles from './styles.css.js';\n\ntype InternalMultiselectProps = SomeRequired<\n MultiselectProps,\n 'options' | 'selectedOptions' | 'filteringType' | 'statusType' | 'keepOpen' | 'hideTokens'\n> &\n InternalBaseComponentProps;\n\ntype ExtendedToken = TokenGroupProps.Item & { _readOnly: boolean };\n\nconst InternalMultiselect = React.forwardRef(\n (\n {\n options,\n filteringType,\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n inlineLabelText,\n selectedOptions,\n deselectAriaLabel,\n tokenLimit,\n i18nStrings,\n virtualScroll,\n inlineTokens = false,\n hideTokens,\n expandToViewport,\n tokenLimitShowFewerAriaLabel,\n tokenLimitShowMoreAriaLabel,\n __internalRootRef,\n autoFocus,\n enableSelectAll,\n renderOption,\n ...restProps\n }: InternalMultiselectProps,\n externalRef: React.Ref<MultiselectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const i18n = useInternalI18n('multiselect');\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n const ariaLabelId = useUniqueId('multiselect-ariaLabel-');\n const footerId = useUniqueId('multiselect-footer-');\n\n const [filteringValue, setFilteringValue] = useState('');\n const multiselectProps = useMultiselect({\n options,\n selectedOptions,\n filteringType,\n disabled,\n deselectAriaLabel,\n controlId,\n ariaLabelId,\n footerId,\n filteringValue,\n setFilteringValue,\n externalRef,\n enableSelectAll,\n i18nStrings,\n ...restProps,\n });\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 {...multiselectProps.getFilterProps()}\n />\n );\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const trigger = (\n <Trigger\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerProps={multiselectProps.getTriggerProps(disabled, autoFocus)}\n selectedOption={null}\n selectedOptions={selectedOptions}\n triggerVariant={inlineTokens ? 'tokens' : 'placeholder'}\n isOpen={multiselectProps.isOpen}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, ariaLabelId)}\n />\n );\n\n const tokens: Array<ExtendedToken> = selectedOptions.map(option => ({\n label: option.label,\n disabled,\n labelTag: option.labelTag,\n description: option.description,\n iconAlt: option.iconAlt,\n iconName: option.iconName,\n iconUrl: option.iconUrl,\n iconSvg: option.iconSvg,\n tags: option.tags,\n dismissLabel: i18n('deselectAriaLabel', deselectAriaLabel?.(option), format =>\n format({ option__label: option.label ?? '' })\n ),\n _readOnly: !!option.disabled,\n }));\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const showTokens = !hideTokens && !inlineTokens && tokens.length > 0;\n\n const tokenGroupI18nStrings: TokenGroupProps.I18nStrings = {\n limitShowFewer: i18nStrings?.tokenLimitShowFewer,\n limitShowMore: i18nStrings?.tokenLimitShowMore,\n };\n\n const dropdownStatus = multiselectProps.dropdownStatus;\n const dropdownProps = multiselectProps.getDropdownProps();\n const hasFilteredOptions = multiselectProps.filteredOptions.length > 0;\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <div\n {...baseProps}\n ref={__internalRootRef}\n className={clsx(styles.root, baseProps.className)}\n {...multiselectProps.getWrapperProps()}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.ariaRole ? joinStrings(ariaLabelId, controlId) : undefined}\n ariaDescribedby={dropdownProps.ariaRole ? (dropdownStatus.content ? footerId : undefined) : undefined}\n open={multiselectProps.isOpen}\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={filter}\n footer={\n dropdownStatus.isSticky ? (\n <DropdownFooter content={multiselectProps.isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n expandToViewport={expandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n renderOption={renderOption}\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={multiselectProps.isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n menuProps={multiselectProps.getMenuProps()}\n getOptionProps={multiselectProps.getOptionProps}\n filteredOptions={multiselectProps.filteredOptions}\n filteringValue={filteringValue}\n ref={multiselectProps.scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n checkboxes={true}\n useInteractiveGroups={true}\n screenReaderContent={multiselectProps.announcement}\n highlightType={multiselectProps.highlightType}\n firstOptionSticky={hasFilteredOptions && enableSelectAll}\n isMultiSelect={true}\n />\n }\n />\n\n {showTokens && (\n <InternalTokenGroup\n {...multiselectProps.getTokenProps()}\n className={styles.tokens}\n alignment=\"horizontal\"\n limit={tokenLimit}\n items={tokens}\n i18nStrings={tokenGroupI18nStrings}\n limitShowMoreAriaLabel={tokenLimitShowMoreAriaLabel}\n limitShowFewerAriaLabel={tokenLimitShowFewerAriaLabel}\n disableOuterPadding={true}\n readOnly={readOnly}\n isItemReadOnly={item => (item as ExtendedToken)._readOnly}\n />\n )}\n\n <ScreenreaderOnly id={ariaLabelId}>{ariaLabel || inlineLabelText}</ScreenreaderOnly>\n </div>\n );\n }\n);\n\nexport default InternalMultiselect;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/multiselect/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE/F,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,cAAc,MAAM,iDAAiD,CAAC;AAC7E,OAAO,gBAAgB,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAA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AClB,cAAc,EAAE,IAAI,CAAC,EAAE,CAAE,IAAsB,CAAC,SAAS,GACzD,CACH;QAED,oBAAC,gBAAgB,IAAC,EAAE,EAAE,WAAW,IAAG,SAAS,IAAI,eAAe,CAAoB,CAChF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer/index.js';\nimport ScreenreaderOnly from '../internal/components/screenreader-only';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component/index.js';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings';\nimport Filter from '../select/parts/filter';\nimport PlainList from '../select/parts/plain-list';\nimport Trigger from '../select/parts/trigger';\nimport VirtualList from '../select/parts/virtual-list';\nimport { TokenGroupProps } from '../token-group/interfaces';\nimport InternalTokenGroup from '../token-group/internal';\nimport { MultiselectProps } from './interfaces';\nimport { useMultiselect } from './use-multiselect';\n\nimport styles from './styles.css.js';\n\ntype InternalMultiselectProps = SomeRequired<\n MultiselectProps,\n 'options' | 'selectedOptions' | 'filteringType' | 'statusType' | 'keepOpen' | 'hideTokens'\n> &\n InternalBaseComponentProps;\n\ntype ExtendedToken = TokenGroupProps.Item & { _readOnly: boolean };\n\nconst InternalMultiselect = React.forwardRef(\n (\n {\n options,\n filteringType,\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n inlineLabelText,\n selectedOptions,\n deselectAriaLabel,\n tokenLimit,\n i18nStrings,\n virtualScroll,\n inlineTokens = false,\n hideTokens,\n expandToViewport,\n tokenLimitShowFewerAriaLabel,\n tokenLimitShowMoreAriaLabel,\n __internalRootRef,\n autoFocus,\n enableSelectAll,\n renderOption,\n ...restProps\n }: InternalMultiselectProps,\n externalRef: React.Ref<MultiselectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const i18n = useInternalI18n('multiselect');\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n const ariaLabelId = useUniqueId('multiselect-ariaLabel-');\n const footerId = useUniqueId('multiselect-footer-');\n\n const [filteringValue, setFilteringValue] = useState('');\n const multiselectProps = useMultiselect({\n options,\n selectedOptions,\n filteringType,\n disabled,\n deselectAriaLabel,\n controlId,\n ariaLabelId,\n footerId,\n filteringValue,\n setFilteringValue,\n externalRef,\n enableSelectAll,\n i18nStrings,\n ...restProps,\n });\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 {...multiselectProps.getFilterProps()}\n />\n );\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const trigger = (\n <Trigger\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerProps={multiselectProps.getTriggerProps(disabled, autoFocus)}\n selectedOption={null}\n selectedOptions={selectedOptions}\n triggerVariant={inlineTokens ? 'tokens' : 'placeholder'}\n isOpen={multiselectProps.isOpen}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, ariaLabelId)}\n />\n );\n\n const tokens: Array<ExtendedToken> = selectedOptions.map(option => ({\n label: option.label,\n disabled,\n labelTag: option.labelTag,\n description: option.description,\n iconAlt: option.iconAlt,\n iconName: option.iconName,\n iconUrl: option.iconUrl,\n iconSvg: option.iconSvg,\n tags: option.tags,\n dismissLabel: i18n('deselectAriaLabel', deselectAriaLabel?.(option), format =>\n format({ option__label: option.label ?? '' })\n ),\n _readOnly: !!option.disabled,\n }));\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const showTokens = !hideTokens && !inlineTokens && tokens.length > 0;\n\n const tokenGroupI18nStrings: TokenGroupProps.I18nStrings = {\n limitShowFewer: i18nStrings?.tokenLimitShowFewer,\n limitShowMore: i18nStrings?.tokenLimitShowMore,\n };\n\n const dropdownStatus = multiselectProps.dropdownStatus;\n const dropdownProps = multiselectProps.getDropdownProps();\n const hasFilteredOptions = multiselectProps.filteredOptions.length > 0;\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <div\n {...baseProps}\n ref={__internalRootRef}\n className={clsx(styles.root, baseProps.className)}\n {...multiselectProps.getWrapperProps()}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.ariaRole ? joinStrings(ariaLabelId, controlId) : undefined}\n ariaDescribedby={dropdownProps.ariaRole ? (dropdownStatus.content ? footerId : undefined) : undefined}\n open={multiselectProps.isOpen}\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={filter}\n footer={\n dropdownStatus.isSticky ? (\n <DropdownFooter content={multiselectProps.isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n expandToViewport={expandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n renderOption={renderOption}\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={multiselectProps.isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n menuProps={{ ...multiselectProps.getMenuProps(), ariaRequired }}\n getOptionProps={multiselectProps.getOptionProps}\n filteredOptions={multiselectProps.filteredOptions}\n filteringValue={filteringValue}\n ref={multiselectProps.scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n checkboxes={true}\n useInteractiveGroups={true}\n screenReaderContent={multiselectProps.announcement}\n highlightType={multiselectProps.highlightType}\n firstOptionSticky={hasFilteredOptions && enableSelectAll}\n isMultiSelect={true}\n />\n }\n />\n\n {showTokens && (\n <InternalTokenGroup\n {...multiselectProps.getTokenProps()}\n className={styles.tokens}\n alignment=\"horizontal\"\n limit={tokenLimit}\n items={tokens}\n i18nStrings={tokenGroupI18nStrings}\n limitShowMoreAriaLabel={tokenLimitShowMoreAriaLabel}\n limitShowFewerAriaLabel={tokenLimitShowFewerAriaLabel}\n disableOuterPadding={true}\n readOnly={readOnly}\n isItemReadOnly={item => (item as ExtendedToken)._readOnly}\n />\n )}\n\n <ScreenreaderOnly id={ariaLabelId}>{ariaLabel || inlineLabelText}</ScreenreaderOnly>\n </div>\n );\n }\n);\n\nexport default InternalMultiselect;\n"]}
|
|
@@ -76,6 +76,7 @@ export declare function useMultiselect({
|
|
|
76
76
|
ariaLabel?: string | undefined;
|
|
77
77
|
tagOverride?: "div" | "ul" | undefined;
|
|
78
78
|
statusType: DropdownStatusProps.StatusType;
|
|
79
|
+
ariaRequired?: boolean | undefined;
|
|
79
80
|
decreaseBlockMargin?: boolean | undefined;
|
|
80
81
|
stickyItemBlockSize?: number | null | undefined;
|
|
81
82
|
isMultiSelect?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/use-multiselect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkD,MAAM,OAAO,CAAC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,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,eAAe,EACf,WAAW,EACX,GAAG,SAAS,EACb,EAAE,qBAAqB
|
|
1
|
+
{"version":3,"file":"use-multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/use-multiselect.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,mBAAmB,EAAqB,MAAM,wCAAwC,CAAC;AAChG,OAAO,EAAE,cAAc,EAAiC,MAAM,0CAA0C,CAAC;AAIzG,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAO7D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,KAAK,qBAAqB,GAAG,YAAY,CACvC,IAAI,CACF,gBAAgB,EACd,SAAS,GACT,iBAAiB,GACjB,eAAe,GACf,sBAAsB,GACtB,UAAU,GACV,SAAS,GACT,2BAA2B,GAC3B,mBAAmB,GACnB,UAAU,GACV,QAAQ,GACR,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,iBAAiB,GACjB,aAAa,CAChB,GACC,mBAAmB,GAAG;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;CAC9C,EACH,SAAS,GAAG,iBAAiB,GAAG,eAAe,GAAG,YAAY,GAAG,UAAU,CAC5E,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE3B,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,eAAe,EACf,WAAW,EACX,GAAG,SAAS,EACb,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA0Lc,KAAK,CAAC,UAAU;;;;;;;;;;EA0CrD"}
|
package/package.json
CHANGED
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"./internal/base-component/index.js",
|
|
164
164
|
"./internal/base-component/styles.css.js"
|
|
165
165
|
],
|
|
166
|
-
"version": "3.0.
|
|
166
|
+
"version": "3.0.1264",
|
|
167
167
|
"repository": {
|
|
168
168
|
"type": "git",
|
|
169
169
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/select/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAgB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAa3C,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IAC3G,kBAAkB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACxC;AAED,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAgB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAa3C,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IAC3G,kBAAkB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACxC;AAED,QAAA,MAAM,cAAc,6FAsQnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/select/internal.js
CHANGED
|
@@ -105,6 +105,7 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
|
|
|
105
105
|
onLoadMore: handleLoadMore,
|
|
106
106
|
ariaLabelledby: joinStrings(selectAriaLabelId, controlId),
|
|
107
107
|
ariaDescribedby: dropdownStatus.content ? footerId : undefined,
|
|
108
|
+
ariaRequired,
|
|
108
109
|
};
|
|
109
110
|
const announcement = useAnnouncement({
|
|
110
111
|
announceSelected,
|
package/select/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvH,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,eAAe,E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AAM,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;YAClC,qEAAqE;YACrE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,EACzC,OAAO,EACL,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,YAAY,EAAE,YAAY,EAC1B,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,GAEJ;QACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,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, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { OptionGroup } from '../internal/components/option/interfaces.js';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { checkOptionValueField } from './utils/check-option-value-field';\nimport { useAnnouncement } from './utils/use-announcement';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\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,\n renderOption,\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 const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\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 focusActiveRef,\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' && !readOnly,\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 renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n inlineLabelText={inlineLabelText}\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 filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\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 const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\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.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={dropdownProps.ariaRole ? (dropdownStatus.content ? footerId : undefined) : undefined}\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\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 // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\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 }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
|
1
|
+
{"version":3,"file":"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AAa,GAC5B,GAEJ;QACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,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, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { OptionGroup } from '../internal/components/option/interfaces.js';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { checkOptionValueField } from './utils/check-option-value-field';\nimport { useAnnouncement } from './utils/use-announcement';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\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,\n renderOption,\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 const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\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 focusActiveRef,\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' && !readOnly,\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 renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n inlineLabelText={inlineLabelText}\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 filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\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 ariaRequired,\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 const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\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.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={dropdownProps.ariaRole ? (dropdownStatus.content ? footerId : undefined) : undefined}\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={getDropdownMinWidth({ expandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\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 // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\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 }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
|
package/select/parts/filter.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export interface FilterProps extends InternalInputProps {
|
|
|
5
5
|
ref?: React.Ref<HTMLInputElement>;
|
|
6
6
|
filteringType: SelectProps.FilteringType;
|
|
7
7
|
}
|
|
8
|
-
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "warning" | "ariaLabel" | "ariaLabelledby" | "ariaDescribedby" | "clearAriaLabel" | "__internalRootRef" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "
|
|
8
|
+
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "warning" | "ariaLabel" | "ariaLabelledby" | "ariaDescribedby" | "clearAriaLabel" | "__internalRootRef" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "ariaRequired" | "controlId" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "filteringType" | "__leftIcon" | "__leftIconVariant" | "__onLeftIconClick" | "__rightIcon" | "__onRightIconClick" | "__noBorderRadius" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export default Filter;
|
|
@@ -43,7 +43,6 @@ export interface SideNavigationProps extends BaseComponentProps {
|
|
|
43
43
|
* The anchor also has the attributes `target="_blank"` and `rel="noopener"`.
|
|
44
44
|
* Additionally, the `activeHref` property won't be modified when a user chooses the link.
|
|
45
45
|
* - `externalIconAriaLabel` (string) - Adds an aria-label to the external icon.
|
|
46
|
-
* Note: Deprecated, use i18nStrings.externalIconAriaLabel instead.
|
|
47
46
|
* - `info` (ReactNode) - Enables you to display content next to the link. Although it is technically possible to insert any content,
|
|
48
47
|
* our UX guidelines allow only to add a Badge and/or a "New" label.
|
|
49
48
|
*
|
|
@@ -135,9 +134,6 @@ export declare namespace SideNavigationProps {
|
|
|
135
134
|
text: string;
|
|
136
135
|
href: string;
|
|
137
136
|
external?: boolean;
|
|
138
|
-
/**
|
|
139
|
-
* @deprecated Use i18nStrings.externalIconAriaLabel instead.
|
|
140
|
-
*/
|
|
141
137
|
externalIconAriaLabel?: string;
|
|
142
138
|
info?: React.ReactNode;
|
|
143
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/side-navigation/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE7G,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC;IAEpC;;QAEI;IACJ,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B;;;;;;;OAOG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