@cloudscape-design/components 3.0.1292 → 3.0.1294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-layout/visual-refresh-toolbar/state/use-feature-notifications.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/state/use-feature-notifications.js +1 -4
- package/app-layout/visual-refresh-toolbar/state/use-feature-notifications.js.map +1 -1
- package/autosuggest/interfaces.d.ts +2 -1
- package/autosuggest/interfaces.d.ts.map +1 -1
- package/autosuggest/interfaces.js.map +1 -1
- package/date-range-picker/styles.css.js +23 -23
- package/date-range-picker/styles.scoped.css +34 -32
- package/date-range-picker/styles.selectors.js +23 -23
- package/file-token-group/styles.css.js +23 -23
- package/file-token-group/styles.scoped.css +34 -34
- package/file-token-group/styles.selectors.js +23 -23
- package/icon/generated/icons.d.ts +1 -0
- package/icon/generated/icons.d.ts.map +1 -1
- package/icon/generated/icons.js +3 -0
- package/icon/generated/icons.js.map +1 -1
- package/icon-provider/interfaces.d.ts +1 -1
- package/icon-provider/interfaces.d.ts.map +1 -1
- package/icon-provider/interfaces.js.map +1 -1
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/button-trigger/styles.css.js +14 -14
- package/internal/components/button-trigger/styles.scoped.css +32 -28
- package/internal/components/button-trigger/styles.selectors.js +14 -14
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/theming/index.cjs +7 -0
- package/internal/generated/theming/index.cjs.d.ts +27 -0
- package/internal/generated/theming/index.d.ts +27 -0
- package/internal/generated/theming/index.js +7 -0
- package/internal/manifest.json +1 -1
- package/multiselect/interfaces.d.ts +3 -0
- package/multiselect/interfaces.d.ts.map +1 -1
- package/multiselect/interfaces.js.map +1 -1
- package/package.json +1 -1
- package/prompt-input/internal.js +1 -1
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +26 -26
- package/prompt-input/styles.scoped.css +61 -62
- package/prompt-input/styles.selectors.js +26 -26
- package/property-filter/use-load-items.d.ts +2 -1
- package/property-filter/use-load-items.d.ts.map +1 -1
- package/select/interfaces.d.ts +2 -1
- package/select/interfaces.d.ts.map +1 -1
- package/select/interfaces.js.map +1 -1
- package/select/parts/styles.css.js +20 -20
- package/select/parts/styles.scoped.css +23 -21
- package/select/parts/styles.selectors.js +20 -20
- package/token/styles.css.js +14 -14
- package/token/styles.scoped.css +28 -30
- package/token/styles.selectors.js +14 -14
|
@@ -97,6 +97,7 @@ export declare interface TypedOverride {
|
|
|
97
97
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
98
98
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
99
99
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
100
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
100
101
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
101
102
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
102
103
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -203,6 +204,7 @@ export declare interface TypedOverride {
|
|
|
203
204
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
204
205
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
205
206
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
207
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
206
208
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
207
209
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
208
210
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -211,6 +213,7 @@ export declare interface TypedOverride {
|
|
|
211
213
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
212
214
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
213
215
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
216
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
214
217
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
215
218
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
216
219
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -441,6 +444,7 @@ export declare interface TypedOverride {
|
|
|
441
444
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
442
445
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
443
446
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
447
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
444
448
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
445
449
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
446
450
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -547,6 +551,7 @@ export declare interface TypedOverride {
|
|
|
547
551
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
548
552
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
549
553
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
554
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
550
555
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
551
556
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
552
557
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -555,6 +560,7 @@ export declare interface TypedOverride {
|
|
|
555
560
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
556
561
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
557
562
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
563
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
558
564
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
559
565
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
560
566
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -785,6 +791,7 @@ export declare interface TypedOverride {
|
|
|
785
791
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
786
792
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
787
793
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
794
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
788
795
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
789
796
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
790
797
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -891,6 +898,7 @@ export declare interface TypedOverride {
|
|
|
891
898
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
892
899
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
893
900
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
901
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
894
902
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
895
903
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
896
904
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -899,6 +907,7 @@ export declare interface TypedOverride {
|
|
|
899
907
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
900
908
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
901
909
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
910
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
902
911
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
903
912
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
904
913
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1129,6 +1138,7 @@ export declare interface TypedOverride {
|
|
|
1129
1138
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1130
1139
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1131
1140
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1141
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1132
1142
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1133
1143
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1134
1144
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1235,6 +1245,7 @@ export declare interface TypedOverride {
|
|
|
1235
1245
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1236
1246
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1237
1247
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1248
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1238
1249
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1239
1250
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1240
1251
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1243,6 +1254,7 @@ export declare interface TypedOverride {
|
|
|
1243
1254
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1244
1255
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1245
1256
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1257
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1246
1258
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1247
1259
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1248
1260
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1473,6 +1485,7 @@ export declare interface TypedOverride {
|
|
|
1473
1485
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1474
1486
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1475
1487
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1488
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1476
1489
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1477
1490
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1478
1491
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1579,6 +1592,7 @@ export declare interface TypedOverride {
|
|
|
1579
1592
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1580
1593
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1581
1594
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1595
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1582
1596
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1583
1597
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1584
1598
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1587,6 +1601,7 @@ export declare interface TypedOverride {
|
|
|
1587
1601
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1588
1602
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1589
1603
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1604
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1590
1605
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1591
1606
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1592
1607
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1817,6 +1832,7 @@ export declare interface TypedOverride {
|
|
|
1817
1832
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1818
1833
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1819
1834
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1835
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1820
1836
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1821
1837
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1822
1838
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1923,6 +1939,7 @@ export declare interface TypedOverride {
|
|
|
1923
1939
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1924
1940
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1925
1941
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1942
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1926
1943
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1927
1944
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1928
1945
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1931,6 +1948,7 @@ export declare interface TypedOverride {
|
|
|
1931
1948
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1932
1949
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1933
1950
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1951
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1934
1952
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1935
1953
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1936
1954
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2161,6 +2179,7 @@ export declare interface TypedOverride {
|
|
|
2161
2179
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2162
2180
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2163
2181
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2182
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2164
2183
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2165
2184
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2166
2185
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2267,6 +2286,7 @@ export declare interface TypedOverride {
|
|
|
2267
2286
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2268
2287
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2269
2288
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2289
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2270
2290
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2271
2291
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2272
2292
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2275,6 +2295,7 @@ export declare interface TypedOverride {
|
|
|
2275
2295
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2276
2296
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2277
2297
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2298
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2278
2299
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2279
2300
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2280
2301
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2505,6 +2526,7 @@ export declare interface TypedOverride {
|
|
|
2505
2526
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2506
2527
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2507
2528
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2529
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2508
2530
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2509
2531
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2510
2532
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2611,6 +2633,7 @@ export declare interface TypedOverride {
|
|
|
2611
2633
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2612
2634
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2613
2635
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2636
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2614
2637
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2615
2638
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2616
2639
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2619,6 +2642,7 @@ export declare interface TypedOverride {
|
|
|
2619
2642
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2620
2643
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2621
2644
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2645
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2622
2646
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2623
2647
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2624
2648
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2849,6 +2873,7 @@ export declare interface TypedOverride {
|
|
|
2849
2873
|
colorBackgroundDropdownItemDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2850
2874
|
colorBackgroundDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2851
2875
|
colorBackgroundDropdownItemHover?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2876
|
+
colorBackgroundDropdownItemSelected?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2852
2877
|
colorBackgroundHomeHeader?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2853
2878
|
colorBackgroundInputDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2854
2879
|
colorBackgroundInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2955,6 +2980,7 @@ export declare interface TypedOverride {
|
|
|
2955
2980
|
colorTextDropdownItemDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2956
2981
|
colorTextDropdownItemFilterMatch?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2957
2982
|
colorTextDropdownItemHighlighted?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2983
|
+
colorTextDropdownItemSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2958
2984
|
colorTextEmpty?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2959
2985
|
colorTextFormDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2960
2986
|
colorTextFormSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2963,6 +2989,7 @@ export declare interface TypedOverride {
|
|
|
2963
2989
|
colorTextHeadingSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2964
2990
|
colorTextHomeHeaderDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2965
2991
|
colorTextHomeHeaderSecondary?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2992
|
+
colorTextIconSubtle?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2966
2993
|
colorTextInputDisabled?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2967
2994
|
colorTextInputPlaceholder?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2968
2995
|
colorTextInteractiveActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -12852,6 +12852,7 @@ export var preset = {
|
|
|
12852
12852
|
"colorBackgroundDropdownItemDefault",
|
|
12853
12853
|
"colorBackgroundDropdownItemFilterMatch",
|
|
12854
12854
|
"colorBackgroundDropdownItemHover",
|
|
12855
|
+
"colorBackgroundDropdownItemSelected",
|
|
12855
12856
|
"colorBackgroundHomeHeader",
|
|
12856
12857
|
"colorBackgroundInputDefault",
|
|
12857
12858
|
"colorBackgroundInputDisabled",
|
|
@@ -12958,6 +12959,7 @@ export var preset = {
|
|
|
12958
12959
|
"colorTextDropdownItemDisabled",
|
|
12959
12960
|
"colorTextDropdownItemFilterMatch",
|
|
12960
12961
|
"colorTextDropdownItemHighlighted",
|
|
12962
|
+
"colorTextDropdownItemSecondary",
|
|
12961
12963
|
"colorTextEmpty",
|
|
12962
12964
|
"colorTextFormDefault",
|
|
12963
12965
|
"colorTextFormSecondary",
|
|
@@ -12966,6 +12968,7 @@ export var preset = {
|
|
|
12966
12968
|
"colorTextHeadingSecondary",
|
|
12967
12969
|
"colorTextHomeHeaderDefault",
|
|
12968
12970
|
"colorTextHomeHeaderSecondary",
|
|
12971
|
+
"colorTextIconSubtle",
|
|
12969
12972
|
"colorTextInputDisabled",
|
|
12970
12973
|
"colorTextInputPlaceholder",
|
|
12971
12974
|
"colorTextInteractiveActive",
|
|
@@ -13287,6 +13290,7 @@ export var preset = {
|
|
|
13287
13290
|
"colorBackgroundDropdownItemDefault",
|
|
13288
13291
|
"colorBackgroundDropdownItemFilterMatch",
|
|
13289
13292
|
"colorBackgroundDropdownItemHover",
|
|
13293
|
+
"colorBackgroundDropdownItemSelected",
|
|
13290
13294
|
"colorBackgroundHomeHeader",
|
|
13291
13295
|
"colorBackgroundInputDefault",
|
|
13292
13296
|
"colorBackgroundInputDisabled",
|
|
@@ -13311,6 +13315,7 @@ export var preset = {
|
|
|
13311
13315
|
"colorBackgroundSegmentDefault",
|
|
13312
13316
|
"colorBackgroundSegmentDisabled",
|
|
13313
13317
|
"colorBackgroundSegmentHover",
|
|
13318
|
+
"colorBackgroundSegmentWrapper",
|
|
13314
13319
|
"colorBackgroundSliderRangeDefault",
|
|
13315
13320
|
"colorBackgroundSliderRangeActive",
|
|
13316
13321
|
"colorBackgroundSliderHandleDefault",
|
|
@@ -13393,6 +13398,7 @@ export var preset = {
|
|
|
13393
13398
|
"colorTextDropdownItemDisabled",
|
|
13394
13399
|
"colorTextDropdownItemFilterMatch",
|
|
13395
13400
|
"colorTextDropdownItemHighlighted",
|
|
13401
|
+
"colorTextDropdownItemSecondary",
|
|
13396
13402
|
"colorTextEmpty",
|
|
13397
13403
|
"colorTextFormDefault",
|
|
13398
13404
|
"colorTextFormSecondary",
|
|
@@ -13402,6 +13408,7 @@ export var preset = {
|
|
|
13402
13408
|
"colorTextHeadingSecondary",
|
|
13403
13409
|
"colorTextHomeHeaderDefault",
|
|
13404
13410
|
"colorTextHomeHeaderSecondary",
|
|
13411
|
+
"colorTextIconSubtle",
|
|
13405
13412
|
"colorTextInputDisabled",
|
|
13406
13413
|
"colorTextInputPlaceholder",
|
|
13407
13414
|
"colorTextInteractiveActive",
|
package/internal/manifest.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { OptionsLoadItemsDetail } from '../dropdown/interfaces';
|
|
2
3
|
import { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';
|
|
3
4
|
import { NonCancelableEventHandler } from '../internal/events';
|
|
4
5
|
import { BaseSelectProps } from '../select/interfaces';
|
|
@@ -44,6 +45,7 @@ export interface MultiselectProps extends BaseSelectProps {
|
|
|
44
45
|
* @i18n
|
|
45
46
|
*/
|
|
46
47
|
i18nStrings?: MultiselectProps.I18nStrings;
|
|
48
|
+
onLoadItems?: NonCancelableEventHandler<MultiselectProps.LoadItemsDetail>;
|
|
47
49
|
/**
|
|
48
50
|
* Called when the user selects or deselects an option.
|
|
49
51
|
* The event `detail` contains the current `selectedOptions`.
|
|
@@ -78,6 +80,7 @@ export declare namespace MultiselectProps {
|
|
|
78
80
|
type Option = OptionDefinition;
|
|
79
81
|
type OptionGroup = OptionGroupDefinition;
|
|
80
82
|
type Options = ReadonlyArray<Option | OptionGroup>;
|
|
83
|
+
interface LoadItemsDetail extends OptionsLoadItemsDetail {}
|
|
81
84
|
interface MultiselectOptionItem {
|
|
82
85
|
type: 'item';
|
|
83
86
|
index: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAClH,OAAO,EAAE,yBAAyB,EA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;QACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B;IAED,UAAiB,uBAAuB;QACtC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACxC;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseSelectProps } from '../select/interfaces';\n\nexport interface MultiselectProps extends BaseSelectProps {\n /**\n * Specifies the currently selected options.\n * Provide an empty array to clear the selection.\n */\n selectedOptions: ReadonlyArray<MultiselectProps.Option>;\n\n /**\n * Specifies an inline label that appears next to the multiselect trigger.\n */\n inlineLabelText?: string;\n /**\n * Determines whether the dropdown list stays open after the user selects an item.\n */\n keepOpen?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Hides the tokens displayed underneath the component.\n * Only use this if the selected options are displayed elsewhere on the page.\n */\n hideTokens?: boolean;\n /**\n * Shows tokens inside the trigger instead of below it.\n */\n inlineTokens?: boolean;\n /**\n * Specifies an `aria-label` for the token deselection button.\n * @i18n\n */\n deselectAriaLabel?: MultiselectProps.DeselectAriaLabelFunction;\n /**\n * An object containing all the localized strings required by the component.\n *\n * * `selectAllText` (string) - Specifies the text to be displayed next to the checkbox that selects or deselects all options.\n * * `tokenLimitShowFewer` (string) - Specifies the text to be displayed in the \"Show fewer\" button for the token group control.\n * * `tokenLimitShowMore` (string) - Specifies the text to be displayed in the \"Show more\" button for the token group control. This string should not contain the number of hidden tokens\n * because this will be added by the component automatically.\n * @i18n\n */\n i18nStrings?: MultiselectProps.I18nStrings;\n /**\n * Called when the user selects or deselects an option.\n * The event `detail` contains the current `selectedOptions`.\n */\n onChange?: NonCancelableEventHandler<MultiselectProps.MultiselectChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n\n /**\n * Adds an aria-label to the \"Show fewer\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowFewer` label on one page.\n */\n tokenLimitShowFewerAriaLabel?: string;\n /**\n * Adds an aria-label to the \"Show more\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowMore` label on one page.\n */\n tokenLimitShowMoreAriaLabel?: string;\n /**\n * Enables users to select and deselect all options with a special extra checkbox which is displayed at the start of the dropdown.\n */\n enableSelectAll?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * @awsuiSystem core\n */\n renderOption?: MultiselectProps.MultiselectOptionItemRenderer;\n}\n\nexport namespace MultiselectProps {\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n export interface MultiselectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n parent: MultiselectOptionGroupItem | null;\n }\n export interface MultiselectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n indeterminate: boolean;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n }\n export interface MultiselectSelectAllItem {\n type: 'select-all';\n option: Option;\n indeterminate: boolean;\n highlighted: boolean;\n selected: boolean;\n }\n export type MultiselectItem = MultiselectOptionItem | MultiselectOptionGroupItem | MultiselectSelectAllItem;\n export type MultiselectOptionItemRenderer = (props: {\n item: MultiselectItem;\n filterText?: string;\n }) => ReactNode | null;\n\n export type DeselectAriaLabelFunction = (option: Option) => string;\n export type TriggerVariant = 'placeholder' | 'tokens';\n\n export interface I18nStrings {\n selectAllText?: string;\n tokenLimitShowFewer?: string;\n tokenLimitShowMore?: string;\n }\n\n export interface MultiselectChangeDetail {\n selectedOptions: ReadonlyArray<Option>;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/multiselect/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ReactNode } from 'react';\n\nimport { OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../internal/components/option/interfaces';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseSelectProps } from '../select/interfaces';\n\nexport interface MultiselectProps extends BaseSelectProps {\n /**\n * Specifies the currently selected options.\n * Provide an empty array to clear the selection.\n */\n selectedOptions: ReadonlyArray<MultiselectProps.Option>;\n\n /**\n * Specifies an inline label that appears next to the multiselect trigger.\n */\n inlineLabelText?: string;\n /**\n * Determines whether the dropdown list stays open after the user selects an item.\n */\n keepOpen?: boolean;\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Hides the tokens displayed underneath the component.\n * Only use this if the selected options are displayed elsewhere on the page.\n */\n hideTokens?: boolean;\n /**\n * Shows tokens inside the trigger instead of below it.\n */\n inlineTokens?: boolean;\n /**\n * Specifies an `aria-label` for the token deselection button.\n * @i18n\n */\n deselectAriaLabel?: MultiselectProps.DeselectAriaLabelFunction;\n /**\n * An object containing all the localized strings required by the component.\n *\n * * `selectAllText` (string) - Specifies the text to be displayed next to the checkbox that selects or deselects all options.\n * * `tokenLimitShowFewer` (string) - Specifies the text to be displayed in the \"Show fewer\" button for the token group control.\n * * `tokenLimitShowMore` (string) - Specifies the text to be displayed in the \"Show more\" button for the token group control. This string should not contain the number of hidden tokens\n * because this will be added by the component automatically.\n * @i18n\n */\n i18nStrings?: MultiselectProps.I18nStrings;\n onLoadItems?: NonCancelableEventHandler<MultiselectProps.LoadItemsDetail>;\n /**\n * Called when the user selects or deselects an option.\n * The event `detail` contains the current `selectedOptions`.\n */\n onChange?: NonCancelableEventHandler<MultiselectProps.MultiselectChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n\n /**\n * Adds an aria-label to the \"Show fewer\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowFewer` label on one page.\n */\n tokenLimitShowFewerAriaLabel?: string;\n /**\n * Adds an aria-label to the \"Show more\" button for the token group control.\n * Use to assign unique labels when there are multiple token groups with the same `tokenLimitShowMore` label on one page.\n */\n tokenLimitShowMoreAriaLabel?: string;\n /**\n * Enables users to select and deselect all options with a special extra checkbox which is displayed at the start of the dropdown.\n */\n enableSelectAll?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * @awsuiSystem core\n */\n renderOption?: MultiselectProps.MultiselectOptionItemRenderer;\n}\n\nexport namespace MultiselectProps {\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n /* eslint-disable-next-line @typescript-eslint/no-empty-object-type --\n * Required to create a distinct named type for the documenter.\n **/\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {}\n export interface MultiselectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n parent: MultiselectOptionGroupItem | null;\n }\n export interface MultiselectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n indeterminate: boolean;\n disabled: boolean;\n highlighted: boolean;\n selected: boolean;\n }\n export interface MultiselectSelectAllItem {\n type: 'select-all';\n option: Option;\n indeterminate: boolean;\n highlighted: boolean;\n selected: boolean;\n }\n export type MultiselectItem = MultiselectOptionItem | MultiselectOptionGroupItem | MultiselectSelectAllItem;\n export type MultiselectOptionItemRenderer = (props: {\n item: MultiselectItem;\n filterText?: string;\n }) => ReactNode | null;\n\n export type DeselectAriaLabelFunction = (option: Option) => string;\n export type TriggerVariant = 'placeholder' | 'tokens';\n\n export interface I18nStrings {\n selectAllText?: string;\n tokenLimitShowFewer?: string;\n tokenLimitShowMore?: string;\n }\n\n export interface MultiselectChangeDetail {\n selectedOptions: ReadonlyArray<Option>;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"./internal/base-component/index.js",
|
|
165
165
|
"./internal/base-component/styles.css.js"
|
|
166
166
|
],
|
|
167
|
-
"version": "3.0.
|
|
167
|
+
"version": "3.0.1294",
|
|
168
168
|
"repository": {
|
|
169
169
|
"type": "git",
|
|
170
170
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/prompt-input/internal.js
CHANGED
|
@@ -90,7 +90,7 @@ const InternalPromptInput = React.forwardRef(({ value: valueProp, actionButtonAr
|
|
|
90
90
|
else {
|
|
91
91
|
adjustInputHeight();
|
|
92
92
|
}
|
|
93
|
-
}, [isTokenMode, tokens, adjustInputHeight, value, isCompactMode]);
|
|
93
|
+
}, [isTokenMode, tokens, adjustInputHeight, value, isCompactMode, placeholder]);
|
|
94
94
|
const plainTextValue = isTokenMode
|
|
95
95
|
? tokensToText
|
|
96
96
|
? tokensToText(tokens !== null && tokens !== void 0 ? tokens : [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,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AAW,EAAE,oBAAoB,GACjC,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,wBAAwB,EAAE,wBAAwB,GAClD,CACH;YACA,eAAe,IAAI,CAAC,gBAAgB,IAAI,YAAY,CACjD;QAGL,WAAW,IAAI,SAAS,CAAC,OAAO;QAEhC,gBAAgB,IAAI,CACnB,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACvC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;gBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;aAC1B,CAAC;YAEF,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,EAAE;oBAChF,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,+BAA+B;oBAC3D,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,EAAE,CAAC,+BAA+B,IAAI,eAAe;oBAC1F,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;oBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;iBAC1B,CAAC,IAED,gBAAgB,CACb;YACN,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,gBAAgB,EAAE,0CAAE,KAAK,EAAE,CAAA,EAAA,GAAI;YAC5E,eAAe,IAAI,YAAY,CAC5B,CACP,CACG,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, { Ref, useEffect, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useDensityMode, useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { convertAutoComplete } from '../input/utils';\nimport { getBaseProps } from '../internal/base-component';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireCancelableEvent, fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport * as designTokens from '../internal/generated/styles/tokens';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { isDevelopment } from '../internal/is-development';\nimport { SomeRequired } from '../internal/types';\nimport InternalLiveRegion from '../live-region/internal';\nimport TextareaMode from './components/textarea-mode';\nimport TokenMode from './components/token-mode';\nimport { CaretController } from './core/caret-controller';\nimport { DEFAULT_MAX_ROWS } from './core/constants';\nimport { getPromptText } from './core/token-operations';\nimport { supportsTokenMode } from './core/token-renderer';\nimport { isPinnedReferenceToken } from './core/type-guards';\nimport { PromptInputProps } from './interfaces';\nimport { getPromptInputStyles } from './styles';\nimport { useTokenMode } from './tokens/use-token-mode';\nimport { insertTextIntoContentEditable } from './utils/insert-text-content-editable';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\ninterface InternalPromptInputProps\n extends SomeRequired<PromptInputProps, 'maxRows' | 'minRows'>,\n InternalBaseComponentProps {}\n\nconst InternalPromptInput = React.forwardRef(\n (\n {\n value: valueProp,\n actionButtonAriaLabel,\n actionButtonIconName,\n actionButtonIconUrl,\n actionButtonIconSvg,\n actionButtonIconAlt,\n ariaLabel,\n autoFocus,\n autoComplete,\n disableActionButton,\n disableBrowserAutocorrect,\n disabled,\n maxRows,\n minRows,\n name,\n onAction,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n spellcheck,\n customPrimaryAction,\n secondaryActions,\n secondaryContent,\n disableSecondaryActionsPaddings,\n disableSecondaryContentPaddings,\n nativeTextareaAttributes,\n style,\n tokens,\n tokensToText,\n menus,\n maxMenuHeight,\n onMenuItemSelect,\n onMenuFilter,\n onMenuLoadItems,\n onTriggerDetected,\n i18nStrings,\n __internalRootRef,\n ...rest\n }: InternalPromptInputProps,\n ref: Ref<PromptInputProps.Ref | HTMLTextAreaElement | HTMLInputElement>\n ) => {\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = useFormFieldContext(rest);\n const baseProps = getBaseProps(rest);\n\n const i18n = useInternalI18n('prompt-input');\n\n const effectiveI18nStrings: PromptInputProps.I18nStrings = {\n actionButtonAriaLabel: i18n(\n 'i18nStrings.actionButtonAriaLabel',\n i18nStrings?.actionButtonAriaLabel ?? actionButtonAriaLabel\n ),\n menuErrorIconAriaLabel: i18n('i18nStrings.menuErrorIconAriaLabel', i18nStrings?.menuErrorIconAriaLabel),\n menuRecoveryText: i18n('i18nStrings.menuRecoveryText', i18nStrings?.menuRecoveryText),\n menuLoadingText: i18n('i18nStrings.menuLoadingText', i18nStrings?.menuLoadingText),\n menuFinishedText: i18n('i18nStrings.menuFinishedText', i18nStrings?.menuFinishedText),\n menuErrorText: i18n('i18nStrings.menuErrorText', i18nStrings?.menuErrorText),\n tokenInsertedAriaLabel: i18n(\n 'i18nStrings.tokenInsertedAriaLabel',\n i18nStrings?.tokenInsertedAriaLabel,\n format => token => format({ token__label: token.label || token.value })\n ),\n tokenPinnedAriaLabel: i18n(\n 'i18nStrings.tokenPinnedAriaLabel',\n i18nStrings?.tokenPinnedAriaLabel,\n format => token => format({ token__label: token.label || token.value })\n ),\n tokenRemovedAriaLabel: i18n(\n 'i18nStrings.tokenRemovedAriaLabel',\n i18nStrings?.tokenRemovedAriaLabel,\n format => token => format({ token__label: token.label || token.value })\n ),\n };\n\n const isTokenMode = !!tokens && supportsTokenMode;\n\n if (isDevelopment) {\n if ((menus || tokens) && !supportsTokenMode) {\n warnOnce(\n 'PromptInput',\n 'Shortcuts features require React 18 or later. The `menus` and `tokens` props will be ignored and shortcuts features will not function.'\n );\n }\n }\n\n const value = valueProp ?? '';\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const editableElementRef = useRef<HTMLDivElement>(null);\n const caretControllerRef = useRef<CaretController | null>(null);\n\n const isRefresh = useVisualRefresh();\n const textareaDensityMode = useDensityMode(textareaRef);\n const editableDensityMode = useDensityMode(editableElementRef);\n const isCompactMode = (isTokenMode ? editableDensityMode : textareaDensityMode) === 'compact';\n\n const PADDING = isRefresh ? designTokens.spaceXxs : designTokens.spaceXxxs;\n const LINE_HEIGHT = designTokens.lineHeightBodyM;\n\n const getActiveElement = useStableCallback(() => {\n return isTokenMode ? editableElementRef.current : textareaRef.current;\n });\n\n /**\n * Dynamically adjusts the input height based on content and row constraints.\n */\n const adjustInputHeight = useStableCallback(() => {\n const element = getActiveElement();\n if (!element) {\n return;\n }\n\n const scrollTop = element.scrollTop;\n // this is required so the scrollHeight becomes dynamic, otherwise it will be locked at the highest value for the size it reached e.g. 500px\n element.style.height = 'auto';\n\n const minRowsHeight = `calc(${LINE_HEIGHT} + ${designTokens.spaceFieldVertical} * 2)`;\n const scrollHeight = `calc(${element.scrollHeight}px)`;\n\n if (maxRows === -1) {\n element.style.height = `max(${scrollHeight}, ${minRowsHeight})`;\n } else {\n const maxRowsHeight = `calc(${maxRows <= 0 ? DEFAULT_MAX_ROWS : maxRows} * (${LINE_HEIGHT} + ${PADDING} / 2) + ${PADDING})`;\n element.style.height = `min(max(${scrollHeight}, ${minRowsHeight}), ${maxRowsHeight})`;\n }\n\n if (isTokenMode) {\n element.scrollTop = scrollTop;\n }\n });\n\n useEffect(() => {\n if (isTokenMode) {\n requestAnimationFrame(() => adjustInputHeight());\n } else {\n adjustInputHeight();\n }\n }, [isTokenMode, tokens, adjustInputHeight, value, isCompactMode]);\n\n const plainTextValue = isTokenMode\n ? tokensToText\n ? tokensToText(tokens ?? [])\n : getPromptText(tokens ?? [])\n : value;\n\n const tokenMode = useTokenMode({\n editableElementRef,\n caretControllerRef,\n tokens,\n tokensToText,\n menus,\n disabled,\n readOnly,\n autoFocus,\n placeholder,\n invalid,\n warning,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ariaRequired: rest.ariaRequired,\n disableBrowserAutocorrect,\n spellcheck,\n onChange: (detail: { value: string; tokens: PromptInputProps.InputToken[] }) => {\n fireNonCancelableEvent(onChange, detail);\n },\n onTriggerDetected: onTriggerDetected ? detail => fireCancelableEvent(onTriggerDetected, detail) : undefined,\n onAction,\n onBlur,\n onFocus,\n onKeyDown,\n onKeyUp,\n onMenuItemSelect,\n onMenuFilter,\n onMenuLoadItems,\n i18nStrings: effectiveI18nStrings,\n adjustInputHeight,\n });\n\n const handleInsertText = useStableCallback((text: string, caretStart?: number, caretEnd?: number) => {\n if (disabled || readOnly) {\n return;\n }\n\n if (!isTokenMode || !editableElementRef.current || !tokens || !caretControllerRef.current) {\n return;\n }\n\n let adjustedCaretStart: number;\n let adjustedCaretEnd: number | undefined;\n\n if (caretStart === undefined) {\n const currentPos = caretControllerRef.current.getPosition();\n const pinnedCount = tokens.filter(isPinnedReferenceToken).length;\n\n // If the caret is before or between pinned tokens, move it after them.\n // Text inserted here would get pushed after pinned tokens by enforcePinnedTokenOrdering,\n // but the caret wouldn't follow — so we preemptively position it correctly.\n adjustedCaretStart = pinnedCount > 0 && currentPos < pinnedCount ? pinnedCount : currentPos;\n adjustedCaretEnd = undefined;\n } else {\n const pinnedTokens = tokens.filter(isPinnedReferenceToken);\n const pinnedOffset = pinnedTokens.length;\n\n adjustedCaretStart = caretStart + pinnedOffset;\n adjustedCaretEnd = caretEnd !== undefined ? caretEnd + pinnedOffset : undefined;\n }\n\n insertTextIntoContentEditable(\n editableElementRef.current,\n text,\n adjustedCaretStart,\n adjustedCaretEnd,\n caretControllerRef.current\n );\n });\n\n useImperativeHandle(\n ref,\n () => ({\n focus(...args: Parameters<HTMLElement['focus']>) {\n getActiveElement()?.focus(...args);\n },\n select() {\n if (isTokenMode) {\n if (editableElementRef.current && caretControllerRef.current) {\n caretControllerRef.current.selectAll();\n }\n } else {\n textareaRef.current?.select();\n }\n },\n setSelectionRange(...args: Parameters<HTMLTextAreaElement['setSelectionRange']>) {\n if (isTokenMode && caretControllerRef.current) {\n const [start, end] = args;\n const actualEnd = end ?? undefined;\n caretControllerRef.current.setPosition(start ?? 0, actualEnd);\n } else {\n textareaRef.current?.setSelectionRange(...args);\n }\n },\n insertText: handleInsertText,\n }),\n [getActiveElement, isTokenMode, handleInsertText]\n );\n\n const handleTextareaKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n fireKeyboardEvent(onKeyDown, event);\n\n if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {\n if (event.currentTarget.form && !event.isDefaultPrevented()) {\n event.currentTarget.form.requestSubmit();\n }\n event.preventDefault();\n fireNonCancelableEvent(onAction, {\n value: plainTextValue,\n });\n }\n };\n\n const handleTextareaChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (isTokenMode) {\n tokenMode.markTokensAsSent(tokens ?? []);\n }\n const detail: PromptInputProps.ChangeDetail = {\n value: event.target.value,\n };\n fireNonCancelableEvent(onChange, detail);\n adjustInputHeight();\n };\n\n const hasActionButton = !!(\n actionButtonIconName ||\n actionButtonIconSvg ||\n actionButtonIconUrl ||\n customPrimaryAction\n );\n\n const textareaAttributes: React.TextareaHTMLAttributes<HTMLTextAreaElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': invalid ? 'true' : undefined,\n name,\n placeholder,\n autoFocus,\n className: clsx(styles.textarea, testutilStyles.textarea, {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n }),\n autoComplete: convertAutoComplete(autoComplete),\n autoCorrect: disableBrowserAutocorrect ? 'off' : undefined,\n autoCapitalize: disableBrowserAutocorrect ? 'off' : undefined,\n spellCheck: spellcheck,\n disabled,\n readOnly: readOnly ? true : undefined,\n rows: minRows,\n value: value || '',\n onKeyDown: handleTextareaKeyDown,\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onChange: handleTextareaChange,\n onBlur: onBlur && (() => fireNonCancelableEvent(onBlur)),\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n const actionButton = (\n <div className={clsx(styles['primary-action'], testutilStyles['primary-action'])}>\n {customPrimaryAction ?? (\n <InternalButton\n className={clsx(styles['action-button'], testutilStyles['action-button'])}\n ariaLabel={effectiveI18nStrings.actionButtonAriaLabel}\n disabled={disabled || readOnly || disableActionButton}\n __focusable={readOnly}\n iconName={actionButtonIconName}\n iconUrl={actionButtonIconUrl}\n iconSvg={actionButtonIconSvg}\n iconAlt={actionButtonIconAlt}\n onClick={() => {\n fireNonCancelableEvent(onAction, {\n value: plainTextValue,\n ...(isTokenMode && { tokens: tokens ?? [] }),\n });\n }}\n variant=\"icon\"\n />\n )}\n </div>\n );\n\n return (\n <div\n {...baseProps}\n aria-label={ariaLabel}\n className={clsx(styles.root, testutilStyles.root, baseProps.className, {\n [styles['textarea-readonly']]: readOnly,\n [styles['textarea-invalid']]: invalid,\n [styles['textarea-warning']]: warning && !invalid,\n [styles.disabled]: disabled,\n })}\n ref={__internalRootRef}\n role=\"region\"\n style={getPromptInputStyles(style)}\n >\n <InternalLiveRegion tagName=\"span\" hidden={true} assertive={true} delay={0}>\n {tokenMode.tokenOperationAnnouncement}\n </InternalLiveRegion>\n\n {secondaryContent && (\n <div\n className={clsx(styles['secondary-content'], testutilStyles['secondary-content'], {\n [styles['with-paddings']]: !disableSecondaryContentPaddings,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryContent}\n </div>\n )}\n\n <div className={styles['textarea-wrapper']}>\n {isTokenMode ? (\n <TokenMode\n editableElementRef={editableElementRef}\n triggerWrapperRef={tokenMode.triggerWrapperRef}\n controlId={controlId}\n menuListId={tokenMode.menuListId}\n menuFooterControlId={tokenMode.menuFooterControlId}\n highlightedMenuOptionId={tokenMode.highlightedMenuOptionId}\n name={name}\n plainTextValue={plainTextValue}\n menuIsOpen={tokenMode.menuIsOpen}\n triggerWrapperReady={tokenMode.triggerWrapperReady}\n shouldRenderMenuDropdown={tokenMode.shouldRenderMenuDropdown}\n activeMenu={tokenMode.activeMenu}\n activeTriggerToken={tokenMode.activeTriggerToken}\n menuFilterText={tokenMode.menuFilterText}\n menuItemsState={tokenMode.menuItemsState}\n menuItemsHandlers={tokenMode.menuItemsHandlers}\n menuDropdownStatus={tokenMode.menuDropdownStatus}\n maxMenuHeight={maxMenuHeight}\n handleInput={tokenMode.handleInput}\n handleLoadMore={tokenMode.handleLoadMore}\n editableElementAttributes={tokenMode.editableElementAttributes}\n i18nStrings={effectiveI18nStrings}\n />\n ) : (\n <TextareaMode\n textareaRef={textareaRef}\n controlId={controlId}\n textareaAttributes={textareaAttributes}\n nativeTextareaAttributes={nativeTextareaAttributes}\n />\n )}\n {hasActionButton && !secondaryActions && actionButton}\n </div>\n\n {/* Render reference tokens into their DOM containers via portals */}\n {isTokenMode && tokenMode.portals}\n\n {secondaryActions && (\n <div\n className={clsx(styles['action-stripe'], {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n <div\n className={clsx(styles['secondary-actions'], testutilStyles['secondary-actions'], {\n [styles['with-paddings']]: !disableSecondaryActionsPaddings,\n [styles['with-paddings-and-actions']]: !disableSecondaryActionsPaddings && hasActionButton,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryActions}\n </div>\n <div className={styles.buffer} onClick={() => getActiveElement()?.focus()} />\n {hasActionButton && actionButton}\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default InternalPromptInput;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM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E,SAAS,CAAC,yBAAyB,EAC9D,WAAW,EAAE,oBAAoB,GACjC,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,wBAAwB,EAAE,wBAAwB,GAClD,CACH;YACA,eAAe,IAAI,CAAC,gBAAgB,IAAI,YAAY,CACjD;QAGL,WAAW,IAAI,SAAS,CAAC,OAAO;QAEhC,gBAAgB,IAAI,CACnB,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACvC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;gBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;aAC1B,CAAC;YAEF,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,EAAE;oBAChF,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,+BAA+B;oBAC3D,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,EAAE,CAAC,+BAA+B,IAAI,eAAe;oBAC1F,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;oBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;iBAC1B,CAAC,IAED,gBAAgB,CACb;YACN,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,gBAAgB,EAAE,0CAAE,KAAK,EAAE,CAAA,EAAA,GAAI;YAC5E,eAAe,IAAI,YAAY,CAC5B,CACP,CACG,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, { Ref, useEffect, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useDensityMode, useStableCallback, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { convertAutoComplete } from '../input/utils';\nimport { getBaseProps } from '../internal/base-component';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireCancelableEvent, fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport * as designTokens from '../internal/generated/styles/tokens';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { isDevelopment } from '../internal/is-development';\nimport { SomeRequired } from '../internal/types';\nimport InternalLiveRegion from '../live-region/internal';\nimport TextareaMode from './components/textarea-mode';\nimport TokenMode from './components/token-mode';\nimport { CaretController } from './core/caret-controller';\nimport { DEFAULT_MAX_ROWS } from './core/constants';\nimport { getPromptText } from './core/token-operations';\nimport { supportsTokenMode } from './core/token-renderer';\nimport { isPinnedReferenceToken } from './core/type-guards';\nimport { PromptInputProps } from './interfaces';\nimport { getPromptInputStyles } from './styles';\nimport { useTokenMode } from './tokens/use-token-mode';\nimport { insertTextIntoContentEditable } from './utils/insert-text-content-editable';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\ninterface InternalPromptInputProps\n extends SomeRequired<PromptInputProps, 'maxRows' | 'minRows'>,\n InternalBaseComponentProps {}\n\nconst InternalPromptInput = React.forwardRef(\n (\n {\n value: valueProp,\n actionButtonAriaLabel,\n actionButtonIconName,\n actionButtonIconUrl,\n actionButtonIconSvg,\n actionButtonIconAlt,\n ariaLabel,\n autoFocus,\n autoComplete,\n disableActionButton,\n disableBrowserAutocorrect,\n disabled,\n maxRows,\n minRows,\n name,\n onAction,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n spellcheck,\n customPrimaryAction,\n secondaryActions,\n secondaryContent,\n disableSecondaryActionsPaddings,\n disableSecondaryContentPaddings,\n nativeTextareaAttributes,\n style,\n tokens,\n tokensToText,\n menus,\n maxMenuHeight,\n onMenuItemSelect,\n onMenuFilter,\n onMenuLoadItems,\n onTriggerDetected,\n i18nStrings,\n __internalRootRef,\n ...rest\n }: InternalPromptInputProps,\n ref: Ref<PromptInputProps.Ref | HTMLTextAreaElement | HTMLInputElement>\n ) => {\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = useFormFieldContext(rest);\n const baseProps = getBaseProps(rest);\n\n const i18n = useInternalI18n('prompt-input');\n\n const effectiveI18nStrings: PromptInputProps.I18nStrings = {\n actionButtonAriaLabel: i18n(\n 'i18nStrings.actionButtonAriaLabel',\n i18nStrings?.actionButtonAriaLabel ?? actionButtonAriaLabel\n ),\n menuErrorIconAriaLabel: i18n('i18nStrings.menuErrorIconAriaLabel', i18nStrings?.menuErrorIconAriaLabel),\n menuRecoveryText: i18n('i18nStrings.menuRecoveryText', i18nStrings?.menuRecoveryText),\n menuLoadingText: i18n('i18nStrings.menuLoadingText', i18nStrings?.menuLoadingText),\n menuFinishedText: i18n('i18nStrings.menuFinishedText', i18nStrings?.menuFinishedText),\n menuErrorText: i18n('i18nStrings.menuErrorText', i18nStrings?.menuErrorText),\n tokenInsertedAriaLabel: i18n(\n 'i18nStrings.tokenInsertedAriaLabel',\n i18nStrings?.tokenInsertedAriaLabel,\n format => token => format({ token__label: token.label || token.value })\n ),\n tokenPinnedAriaLabel: i18n(\n 'i18nStrings.tokenPinnedAriaLabel',\n i18nStrings?.tokenPinnedAriaLabel,\n format => token => format({ token__label: token.label || token.value })\n ),\n tokenRemovedAriaLabel: i18n(\n 'i18nStrings.tokenRemovedAriaLabel',\n i18nStrings?.tokenRemovedAriaLabel,\n format => token => format({ token__label: token.label || token.value })\n ),\n };\n\n const isTokenMode = !!tokens && supportsTokenMode;\n\n if (isDevelopment) {\n if ((menus || tokens) && !supportsTokenMode) {\n warnOnce(\n 'PromptInput',\n 'Shortcuts features require React 18 or later. The `menus` and `tokens` props will be ignored and shortcuts features will not function.'\n );\n }\n }\n\n const value = valueProp ?? '';\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const editableElementRef = useRef<HTMLDivElement>(null);\n const caretControllerRef = useRef<CaretController | null>(null);\n\n const isRefresh = useVisualRefresh();\n const textareaDensityMode = useDensityMode(textareaRef);\n const editableDensityMode = useDensityMode(editableElementRef);\n const isCompactMode = (isTokenMode ? editableDensityMode : textareaDensityMode) === 'compact';\n\n const PADDING = isRefresh ? designTokens.spaceXxs : designTokens.spaceXxxs;\n const LINE_HEIGHT = designTokens.lineHeightBodyM;\n\n const getActiveElement = useStableCallback(() => {\n return isTokenMode ? editableElementRef.current : textareaRef.current;\n });\n\n /**\n * Dynamically adjusts the input height based on content and row constraints.\n */\n const adjustInputHeight = useStableCallback(() => {\n const element = getActiveElement();\n if (!element) {\n return;\n }\n\n const scrollTop = element.scrollTop;\n // this is required so the scrollHeight becomes dynamic, otherwise it will be locked at the highest value for the size it reached e.g. 500px\n element.style.height = 'auto';\n\n const minRowsHeight = `calc(${LINE_HEIGHT} + ${designTokens.spaceFieldVertical} * 2)`;\n const scrollHeight = `calc(${element.scrollHeight}px)`;\n\n if (maxRows === -1) {\n element.style.height = `max(${scrollHeight}, ${minRowsHeight})`;\n } else {\n const maxRowsHeight = `calc(${maxRows <= 0 ? DEFAULT_MAX_ROWS : maxRows} * (${LINE_HEIGHT} + ${PADDING} / 2) + ${PADDING})`;\n element.style.height = `min(max(${scrollHeight}, ${minRowsHeight}), ${maxRowsHeight})`;\n }\n\n if (isTokenMode) {\n element.scrollTop = scrollTop;\n }\n });\n\n useEffect(() => {\n if (isTokenMode) {\n requestAnimationFrame(() => adjustInputHeight());\n } else {\n adjustInputHeight();\n }\n }, [isTokenMode, tokens, adjustInputHeight, value, isCompactMode, placeholder]);\n\n const plainTextValue = isTokenMode\n ? tokensToText\n ? tokensToText(tokens ?? [])\n : getPromptText(tokens ?? [])\n : value;\n\n const tokenMode = useTokenMode({\n editableElementRef,\n caretControllerRef,\n tokens,\n tokensToText,\n menus,\n disabled,\n readOnly,\n autoFocus,\n placeholder,\n invalid,\n warning,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n ariaRequired: rest.ariaRequired,\n disableBrowserAutocorrect,\n spellcheck,\n onChange: (detail: { value: string; tokens: PromptInputProps.InputToken[] }) => {\n fireNonCancelableEvent(onChange, detail);\n },\n onTriggerDetected: onTriggerDetected ? detail => fireCancelableEvent(onTriggerDetected, detail) : undefined,\n onAction,\n onBlur,\n onFocus,\n onKeyDown,\n onKeyUp,\n onMenuItemSelect,\n onMenuFilter,\n onMenuLoadItems,\n i18nStrings: effectiveI18nStrings,\n adjustInputHeight,\n });\n\n const handleInsertText = useStableCallback((text: string, caretStart?: number, caretEnd?: number) => {\n if (disabled || readOnly) {\n return;\n }\n\n if (!isTokenMode || !editableElementRef.current || !tokens || !caretControllerRef.current) {\n return;\n }\n\n let adjustedCaretStart: number;\n let adjustedCaretEnd: number | undefined;\n\n if (caretStart === undefined) {\n const currentPos = caretControllerRef.current.getPosition();\n const pinnedCount = tokens.filter(isPinnedReferenceToken).length;\n\n // If the caret is before or between pinned tokens, move it after them.\n // Text inserted here would get pushed after pinned tokens by enforcePinnedTokenOrdering,\n // but the caret wouldn't follow — so we preemptively position it correctly.\n adjustedCaretStart = pinnedCount > 0 && currentPos < pinnedCount ? pinnedCount : currentPos;\n adjustedCaretEnd = undefined;\n } else {\n const pinnedTokens = tokens.filter(isPinnedReferenceToken);\n const pinnedOffset = pinnedTokens.length;\n\n adjustedCaretStart = caretStart + pinnedOffset;\n adjustedCaretEnd = caretEnd !== undefined ? caretEnd + pinnedOffset : undefined;\n }\n\n insertTextIntoContentEditable(\n editableElementRef.current,\n text,\n adjustedCaretStart,\n adjustedCaretEnd,\n caretControllerRef.current\n );\n });\n\n useImperativeHandle(\n ref,\n () => ({\n focus(...args: Parameters<HTMLElement['focus']>) {\n getActiveElement()?.focus(...args);\n },\n select() {\n if (isTokenMode) {\n if (editableElementRef.current && caretControllerRef.current) {\n caretControllerRef.current.selectAll();\n }\n } else {\n textareaRef.current?.select();\n }\n },\n setSelectionRange(...args: Parameters<HTMLTextAreaElement['setSelectionRange']>) {\n if (isTokenMode && caretControllerRef.current) {\n const [start, end] = args;\n const actualEnd = end ?? undefined;\n caretControllerRef.current.setPosition(start ?? 0, actualEnd);\n } else {\n textareaRef.current?.setSelectionRange(...args);\n }\n },\n insertText: handleInsertText,\n }),\n [getActiveElement, isTokenMode, handleInsertText]\n );\n\n const handleTextareaKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n fireKeyboardEvent(onKeyDown, event);\n\n if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {\n if (event.currentTarget.form && !event.isDefaultPrevented()) {\n event.currentTarget.form.requestSubmit();\n }\n event.preventDefault();\n fireNonCancelableEvent(onAction, {\n value: plainTextValue,\n });\n }\n };\n\n const handleTextareaChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (isTokenMode) {\n tokenMode.markTokensAsSent(tokens ?? []);\n }\n const detail: PromptInputProps.ChangeDetail = {\n value: event.target.value,\n };\n fireNonCancelableEvent(onChange, detail);\n adjustInputHeight();\n };\n\n const hasActionButton = !!(\n actionButtonIconName ||\n actionButtonIconSvg ||\n actionButtonIconUrl ||\n customPrimaryAction\n );\n\n const textareaAttributes: React.TextareaHTMLAttributes<HTMLTextAreaElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': invalid ? 'true' : undefined,\n name,\n placeholder,\n autoFocus,\n className: clsx(styles.textarea, testutilStyles.textarea, {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n }),\n autoComplete: convertAutoComplete(autoComplete),\n autoCorrect: disableBrowserAutocorrect ? 'off' : undefined,\n autoCapitalize: disableBrowserAutocorrect ? 'off' : undefined,\n spellCheck: spellcheck,\n disabled,\n readOnly: readOnly ? true : undefined,\n rows: minRows,\n value: value || '',\n onKeyDown: handleTextareaKeyDown,\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n onChange: handleTextareaChange,\n onBlur: onBlur && (() => fireNonCancelableEvent(onBlur)),\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n const actionButton = (\n <div className={clsx(styles['primary-action'], testutilStyles['primary-action'])}>\n {customPrimaryAction ?? (\n <InternalButton\n className={clsx(styles['action-button'], testutilStyles['action-button'])}\n ariaLabel={effectiveI18nStrings.actionButtonAriaLabel}\n disabled={disabled || readOnly || disableActionButton}\n __focusable={readOnly}\n iconName={actionButtonIconName}\n iconUrl={actionButtonIconUrl}\n iconSvg={actionButtonIconSvg}\n iconAlt={actionButtonIconAlt}\n onClick={() => {\n fireNonCancelableEvent(onAction, {\n value: plainTextValue,\n ...(isTokenMode && { tokens: tokens ?? [] }),\n });\n }}\n variant=\"icon\"\n />\n )}\n </div>\n );\n\n return (\n <div\n {...baseProps}\n aria-label={ariaLabel}\n className={clsx(styles.root, testutilStyles.root, baseProps.className, {\n [styles['textarea-readonly']]: readOnly,\n [styles['textarea-invalid']]: invalid,\n [styles['textarea-warning']]: warning && !invalid,\n [styles.disabled]: disabled,\n })}\n ref={__internalRootRef}\n role=\"region\"\n style={getPromptInputStyles(style)}\n >\n <InternalLiveRegion tagName=\"span\" hidden={true} assertive={true} delay={0}>\n {tokenMode.tokenOperationAnnouncement}\n </InternalLiveRegion>\n\n {secondaryContent && (\n <div\n className={clsx(styles['secondary-content'], testutilStyles['secondary-content'], {\n [styles['with-paddings']]: !disableSecondaryContentPaddings,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryContent}\n </div>\n )}\n\n <div className={styles['textarea-wrapper']}>\n {isTokenMode ? (\n <TokenMode\n editableElementRef={editableElementRef}\n triggerWrapperRef={tokenMode.triggerWrapperRef}\n controlId={controlId}\n menuListId={tokenMode.menuListId}\n menuFooterControlId={tokenMode.menuFooterControlId}\n highlightedMenuOptionId={tokenMode.highlightedMenuOptionId}\n name={name}\n plainTextValue={plainTextValue}\n menuIsOpen={tokenMode.menuIsOpen}\n triggerWrapperReady={tokenMode.triggerWrapperReady}\n shouldRenderMenuDropdown={tokenMode.shouldRenderMenuDropdown}\n activeMenu={tokenMode.activeMenu}\n activeTriggerToken={tokenMode.activeTriggerToken}\n menuFilterText={tokenMode.menuFilterText}\n menuItemsState={tokenMode.menuItemsState}\n menuItemsHandlers={tokenMode.menuItemsHandlers}\n menuDropdownStatus={tokenMode.menuDropdownStatus}\n maxMenuHeight={maxMenuHeight}\n handleInput={tokenMode.handleInput}\n handleLoadMore={tokenMode.handleLoadMore}\n editableElementAttributes={tokenMode.editableElementAttributes}\n i18nStrings={effectiveI18nStrings}\n />\n ) : (\n <TextareaMode\n textareaRef={textareaRef}\n controlId={controlId}\n textareaAttributes={textareaAttributes}\n nativeTextareaAttributes={nativeTextareaAttributes}\n />\n )}\n {hasActionButton && !secondaryActions && actionButton}\n </div>\n\n {/* Render reference tokens into their DOM containers via portals */}\n {isTokenMode && tokenMode.portals}\n\n {secondaryActions && (\n <div\n className={clsx(styles['action-stripe'], {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n <div\n className={clsx(styles['secondary-actions'], testutilStyles['secondary-actions'], {\n [styles['with-paddings']]: !disableSecondaryActionsPaddings,\n [styles['with-paddings-and-actions']]: !disableSecondaryActionsPaddings && hasActionButton,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryActions}\n </div>\n <div className={styles.buffer} onClick={() => getActiveElement()?.focus()} />\n {hasActionButton && actionButton}\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default InternalPromptInput;\n"]}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"textarea-readonly": "awsui_textarea-
|
|
6
|
-
"disabled": "
|
|
7
|
-
"textarea-invalid": "awsui_textarea-
|
|
8
|
-
"textarea-warning": "awsui_textarea-
|
|
9
|
-
"textarea": "
|
|
10
|
-
"placeholder-visible": "awsui_placeholder-
|
|
11
|
-
"invalid": "
|
|
12
|
-
"warning": "
|
|
13
|
-
"textarea-disabled": "awsui_textarea-
|
|
14
|
-
"textarea-wrapper": "awsui_textarea-
|
|
15
|
-
"editable-wrapper": "awsui_editable-
|
|
16
|
-
"editable-element": "awsui_editable-
|
|
17
|
-
"primary-action": "awsui_primary-
|
|
18
|
-
"action-button": "awsui_action-
|
|
19
|
-
"secondary-content": "awsui_secondary-
|
|
20
|
-
"with-paddings": "awsui_with-
|
|
21
|
-
"action-stripe": "awsui_action-
|
|
22
|
-
"secondary-actions": "awsui_secondary-
|
|
23
|
-
"with-paddings-and-actions": "awsui_with-paddings-and-
|
|
24
|
-
"buffer": "
|
|
25
|
-
"token-container": "awsui_token-
|
|
26
|
-
"reference-wrapper": "awsui_reference-
|
|
27
|
-
"trigger-base": "awsui_trigger-
|
|
28
|
-
"trigger-token": "awsui_trigger-
|
|
29
|
-
"paragraph": "
|
|
4
|
+
"root": "awsui_root_55fkh_qqi5z_146",
|
|
5
|
+
"textarea-readonly": "awsui_textarea-readonly_55fkh_qqi5z_191",
|
|
6
|
+
"disabled": "awsui_disabled_55fkh_qqi5z_197",
|
|
7
|
+
"textarea-invalid": "awsui_textarea-invalid_55fkh_qqi5z_205",
|
|
8
|
+
"textarea-warning": "awsui_textarea-warning_55fkh_qqi5z_233",
|
|
9
|
+
"textarea": "awsui_textarea_55fkh_qqi5z_191",
|
|
10
|
+
"placeholder-visible": "awsui_placeholder-visible_55fkh_qqi5z_330",
|
|
11
|
+
"invalid": "awsui_invalid_55fkh_qqi5z_366",
|
|
12
|
+
"warning": "awsui_warning_55fkh_qqi5z_366",
|
|
13
|
+
"textarea-disabled": "awsui_textarea-disabled_55fkh_qqi5z_369",
|
|
14
|
+
"textarea-wrapper": "awsui_textarea-wrapper_55fkh_qqi5z_386",
|
|
15
|
+
"editable-wrapper": "awsui_editable-wrapper_55fkh_qqi5z_391",
|
|
16
|
+
"editable-element": "awsui_editable-element_55fkh_qqi5z_397",
|
|
17
|
+
"primary-action": "awsui_primary-action_55fkh_qqi5z_404",
|
|
18
|
+
"action-button": "awsui_action-button_55fkh_qqi5z_412",
|
|
19
|
+
"secondary-content": "awsui_secondary-content_55fkh_qqi5z_417",
|
|
20
|
+
"with-paddings": "awsui_with-paddings_55fkh_qqi5z_452",
|
|
21
|
+
"action-stripe": "awsui_action-stripe_55fkh_qqi5z_462",
|
|
22
|
+
"secondary-actions": "awsui_secondary-actions_55fkh_qqi5z_501",
|
|
23
|
+
"with-paddings-and-actions": "awsui_with-paddings-and-actions_55fkh_qqi5z_519",
|
|
24
|
+
"buffer": "awsui_buffer_55fkh_qqi5z_523",
|
|
25
|
+
"token-container": "awsui_token-container_55fkh_qqi5z_529",
|
|
26
|
+
"reference-wrapper": "awsui_reference-wrapper_55fkh_qqi5z_537",
|
|
27
|
+
"trigger-base": "awsui_trigger-base_55fkh_qqi5z_541",
|
|
28
|
+
"trigger-token": "awsui_trigger-token_55fkh_qqi5z_545",
|
|
29
|
+
"paragraph": "awsui_paragraph_55fkh_qqi5z_551"
|
|
30
30
|
};
|
|
31
31
|
|