@cloudscape-design/components 3.0.1342 → 3.0.1344

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.
Files changed (149) hide show
  1. package/expandable-section/expandable-section-header.d.ts +3 -1
  2. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  3. package/expandable-section/expandable-section-header.js +57 -13
  4. package/expandable-section/expandable-section-header.js.map +1 -1
  5. package/expandable-section/interfaces.d.ts +1 -1
  6. package/expandable-section/interfaces.js.map +1 -1
  7. package/expandable-section/internal.d.ts +15 -0
  8. package/expandable-section/internal.d.ts.map +1 -1
  9. package/expandable-section/internal.js +3 -3
  10. package/expandable-section/internal.js.map +1 -1
  11. package/expandable-section/styles.css.js +42 -35
  12. package/expandable-section/styles.scoped.css +177 -69
  13. package/expandable-section/styles.selectors.js +42 -35
  14. package/i18n/messages/all.all.js +1 -1
  15. package/i18n/messages/all.all.json +1 -1
  16. package/i18n/messages/all.ar.js +1 -1
  17. package/i18n/messages/all.ar.json +1 -1
  18. package/i18n/messages/all.de.js +1 -1
  19. package/i18n/messages/all.de.json +1 -1
  20. package/i18n/messages/all.en-GB.js +1 -1
  21. package/i18n/messages/all.en-GB.json +1 -1
  22. package/i18n/messages/all.en.js +1 -1
  23. package/i18n/messages/all.en.json +1 -1
  24. package/i18n/messages/all.es.js +1 -1
  25. package/i18n/messages/all.es.json +1 -1
  26. package/i18n/messages/all.fr.js +1 -1
  27. package/i18n/messages/all.fr.json +1 -1
  28. package/i18n/messages/all.id.js +1 -1
  29. package/i18n/messages/all.id.json +1 -1
  30. package/i18n/messages/all.it.js +1 -1
  31. package/i18n/messages/all.it.json +1 -1
  32. package/i18n/messages/all.ja.js +1 -1
  33. package/i18n/messages/all.ja.json +1 -1
  34. package/i18n/messages/all.ko.js +1 -1
  35. package/i18n/messages/all.ko.json +1 -1
  36. package/i18n/messages/all.pt-BR.js +1 -1
  37. package/i18n/messages/all.pt-BR.json +1 -1
  38. package/i18n/messages/all.tr.js +1 -1
  39. package/i18n/messages/all.tr.json +1 -1
  40. package/i18n/messages/all.zh-CN.js +1 -1
  41. package/i18n/messages/all.zh-CN.json +1 -1
  42. package/i18n/messages/all.zh-TW.js +1 -1
  43. package/i18n/messages/all.zh-TW.json +1 -1
  44. package/i18n/messages-types.d.ts +5 -0
  45. package/i18n/messages-types.d.ts.map +1 -1
  46. package/i18n/messages-types.js.map +1 -1
  47. package/input/styles.css.js +28 -28
  48. package/input/styles.scoped.css +70 -70
  49. package/input/styles.selectors.js +28 -28
  50. package/internal/base-component/styles.scoped.css +11 -6
  51. package/internal/environment.js +2 -2
  52. package/internal/environment.json +2 -2
  53. package/internal/generated/styles/tokens.d.ts +1 -0
  54. package/internal/generated/styles/tokens.js +2 -1
  55. package/internal/generated/theming/index.cjs +46 -15
  56. package/internal/generated/theming/index.js +46 -15
  57. package/internal/manifest.json +1 -1
  58. package/manifest.json +2 -2
  59. package/multiselect/index.d.ts.map +1 -1
  60. package/multiselect/index.js +4 -0
  61. package/multiselect/index.js.map +1 -1
  62. package/multiselect/interfaces.d.ts +8 -1
  63. package/multiselect/interfaces.d.ts.map +1 -1
  64. package/multiselect/interfaces.js.map +1 -1
  65. package/multiselect/internal.d.ts.map +1 -1
  66. package/multiselect/internal.js +22 -2
  67. package/multiselect/internal.js.map +1 -1
  68. package/multiselect/styles.css.js +5 -3
  69. package/multiselect/styles.scoped.css +13 -3
  70. package/multiselect/styles.selectors.js +5 -3
  71. package/multiselect/use-multiselect.d.ts +4 -1
  72. package/multiselect/use-multiselect.d.ts.map +1 -1
  73. package/multiselect/use-multiselect.js +5 -3
  74. package/multiselect/use-multiselect.js.map +1 -1
  75. package/package.json +95 -1
  76. package/pagination/index.d.ts.map +1 -1
  77. package/pagination/index.js +3 -3
  78. package/pagination/index.js.map +1 -1
  79. package/pagination/interfaces.d.ts +19 -3
  80. package/pagination/interfaces.d.ts.map +1 -1
  81. package/pagination/interfaces.js.map +1 -1
  82. package/pagination/internal.d.ts.map +1 -1
  83. package/pagination/internal.js +18 -6
  84. package/pagination/internal.js.map +1 -1
  85. package/pagination/styles.css.js +12 -11
  86. package/pagination/styles.scoped.css +34 -25
  87. package/pagination/styles.selectors.js +12 -11
  88. package/pagination/test-classes/styles.css.js +6 -0
  89. package/pagination/test-classes/styles.scoped.css +7 -0
  90. package/pagination/test-classes/styles.selectors.js +7 -0
  91. package/prompt-input/internal.d.ts.map +1 -1
  92. package/prompt-input/internal.js +14 -2
  93. package/prompt-input/internal.js.map +1 -1
  94. package/select/index.d.ts.map +1 -1
  95. package/select/index.js +4 -0
  96. package/select/index.js.map +1 -1
  97. package/select/interfaces.d.ts +39 -0
  98. package/select/interfaces.d.ts.map +1 -1
  99. package/select/interfaces.js.map +1 -1
  100. package/select/internal.d.ts.map +1 -1
  101. package/select/internal.js +20 -4
  102. package/select/internal.js.map +1 -1
  103. package/select/styles.css.js +3 -1
  104. package/select/styles.scoped.css +11 -1
  105. package/select/styles.selectors.js +3 -1
  106. package/select/utils/dropdown-customization.d.ts +26 -0
  107. package/select/utils/dropdown-customization.d.ts.map +1 -0
  108. package/select/utils/dropdown-customization.js +22 -0
  109. package/select/utils/dropdown-customization.js.map +1 -0
  110. package/select/utils/use-select.d.ts +5 -1
  111. package/select/utils/use-select.d.ts.map +1 -1
  112. package/select/utils/use-select.js +21 -4
  113. package/select/utils/use-select.js.map +1 -1
  114. package/side-navigation/parts.d.ts.map +1 -1
  115. package/side-navigation/parts.js +3 -2
  116. package/side-navigation/parts.js.map +1 -1
  117. package/side-navigation/styles.css.js +50 -48
  118. package/side-navigation/styles.scoped.css +106 -93
  119. package/side-navigation/styles.selectors.js +50 -48
  120. package/skeleton/styles.css.js +15 -15
  121. package/skeleton/styles.scoped.css +26 -26
  122. package/skeleton/styles.selectors.js +15 -15
  123. package/test-utils/dom/multiselect/index.d.ts +16 -0
  124. package/test-utils/dom/multiselect/index.js +16 -0
  125. package/test-utils/dom/multiselect/index.js.map +1 -1
  126. package/test-utils/dom/pagination/index.d.ts +5 -1
  127. package/test-utils/dom/pagination/index.js +7 -0
  128. package/test-utils/dom/pagination/index.js.map +1 -1
  129. package/test-utils/dom/select/index.d.ts +16 -0
  130. package/test-utils/dom/select/index.js +16 -0
  131. package/test-utils/dom/select/index.js.map +1 -1
  132. package/test-utils/selectors/multiselect/index.d.ts +16 -0
  133. package/test-utils/selectors/multiselect/index.js +20 -0
  134. package/test-utils/selectors/multiselect/index.js.map +1 -1
  135. package/test-utils/selectors/pagination/index.d.ts +5 -1
  136. package/test-utils/selectors/pagination/index.js +7 -0
  137. package/test-utils/selectors/pagination/index.js.map +1 -1
  138. package/test-utils/selectors/select/index.d.ts +16 -0
  139. package/test-utils/selectors/select/index.js +20 -0
  140. package/test-utils/selectors/select/index.js.map +1 -1
  141. package/textarea/index.d.ts.map +1 -1
  142. package/textarea/index.js +11 -3
  143. package/textarea/index.js.map +1 -1
  144. package/textarea/interfaces.d.ts +12 -0
  145. package/textarea/interfaces.d.ts.map +1 -1
  146. package/textarea/interfaces.js.map +1 -1
  147. package/textarea/styles.css.js +9 -5
  148. package/textarea/styles.scoped.css +26 -14
  149. package/textarea/styles.selectors.js +9 -5
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (6db99848)",
4
- "GIT_SHA": "6db99848",
3
+ "PACKAGE_VERSION": "3.0.0 (21c5e82c)",
4
+ "GIT_SHA": "21c5e82c",
5
5
  "THEME": "open-source-visual-refresh",
6
6
  "SYSTEM": "core",
7
7
  "ALWAYS_VISUAL_REFRESH": true,
@@ -437,6 +437,7 @@ export const colorBackgroundInputDisabled: string;
437
437
  export const colorBackgroundItemSelected: string;
438
438
  export const colorBackgroundSideNavigationItemActive: string;
439
439
  export const colorBackgroundSideNavigationItemActiveCollapsed: string;
440
+ export const colorBackgroundSideNavigationItemIconHover: string;
440
441
  export const colorBackgroundLayoutMain: string;
441
442
  export const colorBackgroundLayoutAiDrawer: string;
442
443
  export const colorBackgroundDrawer: string;
@@ -437,6 +437,7 @@ export var colorBackgroundInputDisabled = "var(--color-background-input-disabled
437
437
  export var colorBackgroundItemSelected = "var(--color-background-item-selected-9gppru, #f0fbff)";
438
438
  export var colorBackgroundSideNavigationItemActive = "var(--color-background-side-navigation-item-active-adfprg, transparent)";
439
439
  export var colorBackgroundSideNavigationItemActiveCollapsed = "var(--color-background-side-navigation-item-active-collapsed-ceubmy, #006ce0)";
440
+ export var colorBackgroundSideNavigationItemIconHover = "var(--color-background-side-navigation-item-icon-hover-ul9ia1, #f0fbff)";
440
441
  export var colorBackgroundLayoutMain = "var(--color-background-layout-main-5ilwcb, #ffffff)";
441
442
  export var colorBackgroundLayoutAiDrawer = "var(--color-background-layout-ai-drawer-b4mvv3, #161d26)";
442
443
  export var colorBackgroundDrawer = "var(--color-background-drawer-5hs0eh, #ffffff)";
@@ -729,7 +730,7 @@ export var colorIconActionCardDefault = "var(--color-icon-action-card-default-an
729
730
  export var colorIconActionCardHover = "var(--color-icon-action-card-hover-qxq4pp, #002b66)";
730
731
  export var colorIconActionCardActive = "var(--color-icon-action-card-active-rhp94s, #002b66)";
731
732
  export var colorIconActionCardDisabled = "var(--color-icon-action-card-disabled-wm3kyf, #b4b4bb)";
732
- export var colorBackgroundSkeleton = "var(--color-background-skeleton-sjxg4n, #ebebf0)";
733
+ export var colorBackgroundSkeleton = "var(--color-background-skeleton-h3lxqh, #8c8c94)";
733
734
  export var colorBackgroundSkeletonWave = "var(--color-background-skeleton-wave-1dy97d, #f6f6f9)";
734
735
  export var colorBackgroundBadgeGreen = "var(--color-background-badge-green-1bcjh0, #00802f)";
735
736
  export var colorBackgroundBadgeBlue = "var(--color-background-badge-blue-6346bd, #006ce0)";
@@ -1795,6 +1795,10 @@ module.exports.preset = {
1795
1795
  "light": "{colorBackgroundControlChecked}",
1796
1796
  "dark": "{colorBackgroundControlChecked}"
1797
1797
  },
1798
+ "colorBackgroundSideNavigationItemIconHover": {
1799
+ "light": "{colorPrimary50}",
1800
+ "dark": "{colorNeutral700}"
1801
+ },
1798
1802
  "colorBackgroundLayoutMain": {
1799
1803
  "light": "{colorWhite}",
1800
1804
  "dark": "{colorNeutral850}"
@@ -2964,8 +2968,8 @@ module.exports.preset = {
2964
2968
  "dark": "{colorNeutral600}"
2965
2969
  },
2966
2970
  "colorBackgroundSkeleton": {
2967
- "light": "{colorNeutral250}",
2968
- "dark": "{colorNeutral750}"
2971
+ "light": "{colorNeutral500}",
2972
+ "dark": "{colorNeutral600}"
2969
2973
  },
2970
2974
  "colorBackgroundSkeletonWave": {
2971
2975
  "light": "{colorNeutral150}",
@@ -4799,6 +4803,10 @@ module.exports.preset = {
4799
4803
  "light": "{colorBackgroundControlChecked}",
4800
4804
  "dark": "{colorBackgroundControlChecked}"
4801
4805
  },
4806
+ "colorBackgroundSideNavigationItemIconHover": {
4807
+ "light": "{colorNeutral700}",
4808
+ "dark": "{colorNeutral700}"
4809
+ },
4802
4810
  "colorBackgroundLayoutMain": {
4803
4811
  "light": "{colorNeutral850}",
4804
4812
  "dark": "{colorNeutral850}"
@@ -5968,8 +5976,8 @@ module.exports.preset = {
5968
5976
  "dark": "{colorNeutral600}"
5969
5977
  },
5970
5978
  "colorBackgroundSkeleton": {
5971
- "light": "{colorNeutral750}",
5972
- "dark": "{colorNeutral750}"
5979
+ "light": "{colorNeutral600}",
5980
+ "dark": "{colorNeutral600}"
5973
5981
  },
5974
5982
  "colorBackgroundSkeletonWave": {
5975
5983
  "light": "{colorNeutral700}",
@@ -6615,6 +6623,10 @@ module.exports.preset = {
6615
6623
  "light": "{colorBackgroundControlChecked}",
6616
6624
  "dark": "{colorBackgroundControlChecked}"
6617
6625
  },
6626
+ "colorBackgroundSideNavigationItemIconHover": {
6627
+ "light": "{colorNeutral700}",
6628
+ "dark": "{colorNeutral700}"
6629
+ },
6618
6630
  "colorBackgroundLayoutMain": {
6619
6631
  "light": "{colorNeutral950}",
6620
6632
  "dark": "{colorNeutral950}"
@@ -7784,8 +7796,8 @@ module.exports.preset = {
7784
7796
  "dark": "{colorNeutral600}"
7785
7797
  },
7786
7798
  "colorBackgroundSkeleton": {
7787
- "light": "{colorNeutral750}",
7788
- "dark": "{colorNeutral750}"
7799
+ "light": "{colorNeutral600}",
7800
+ "dark": "{colorNeutral600}"
7789
7801
  },
7790
7802
  "colorBackgroundSkeletonWave": {
7791
7803
  "light": "{colorNeutral700}",
@@ -8359,6 +8371,10 @@ module.exports.preset = {
8359
8371
  "light": "{colorBackgroundControlChecked}",
8360
8372
  "dark": "{colorBackgroundControlChecked}"
8361
8373
  },
8374
+ "colorBackgroundSideNavigationItemIconHover": {
8375
+ "light": "{colorPrimary50}",
8376
+ "dark": "{colorNeutral700}"
8377
+ },
8362
8378
  "colorBackgroundLayoutMain": {
8363
8379
  "light": "{colorWhite}",
8364
8380
  "dark": "{colorNeutral850}"
@@ -9528,8 +9544,8 @@ module.exports.preset = {
9528
9544
  "dark": "{colorNeutral600}"
9529
9545
  },
9530
9546
  "colorBackgroundSkeleton": {
9531
- "light": "{colorNeutral250}",
9532
- "dark": "{colorNeutral750}"
9547
+ "light": "{colorNeutral500}",
9548
+ "dark": "{colorNeutral600}"
9533
9549
  },
9534
9550
  "colorBackgroundSkeletonWave": {
9535
9551
  "light": "{colorNeutral150}",
@@ -9949,6 +9965,10 @@ module.exports.preset = {
9949
9965
  "light": "{colorBackgroundControlChecked}",
9950
9966
  "dark": "{colorBackgroundControlChecked}"
9951
9967
  },
9968
+ "colorBackgroundSideNavigationItemIconHover": {
9969
+ "light": "{colorPrimary50}",
9970
+ "dark": "{colorNeutral700}"
9971
+ },
9952
9972
  "colorBackgroundLayoutMain": {
9953
9973
  "light": "{colorWhite}",
9954
9974
  "dark": "{colorNeutral850}"
@@ -11118,8 +11138,8 @@ module.exports.preset = {
11118
11138
  "dark": "{colorNeutral600}"
11119
11139
  },
11120
11140
  "colorBackgroundSkeleton": {
11121
- "light": "{colorNeutral250}",
11122
- "dark": "{colorNeutral750}"
11141
+ "light": "{colorNeutral500}",
11142
+ "dark": "{colorNeutral600}"
11123
11143
  },
11124
11144
  "colorBackgroundSkeletonWave": {
11125
11145
  "light": "{colorNeutral150}",
@@ -11539,6 +11559,10 @@ module.exports.preset = {
11539
11559
  "light": "{colorBackgroundControlChecked}",
11540
11560
  "dark": "{colorBackgroundControlChecked}"
11541
11561
  },
11562
+ "colorBackgroundSideNavigationItemIconHover": {
11563
+ "light": "{colorPrimary50}",
11564
+ "dark": "{colorNeutral700}"
11565
+ },
11542
11566
  "colorBackgroundLayoutMain": {
11543
11567
  "light": "{colorWhite}",
11544
11568
  "dark": "{colorNeutral850}"
@@ -12708,8 +12732,8 @@ module.exports.preset = {
12708
12732
  "dark": "{colorNeutral600}"
12709
12733
  },
12710
12734
  "colorBackgroundSkeleton": {
12711
- "light": "{colorNeutral250}",
12712
- "dark": "{colorNeutral750}"
12735
+ "light": "{colorNeutral500}",
12736
+ "dark": "{colorNeutral600}"
12713
12737
  },
12714
12738
  "colorBackgroundSkeletonWave": {
12715
12739
  "light": "{colorNeutral150}",
@@ -13131,6 +13155,10 @@ module.exports.preset = {
13131
13155
  "light": "{colorBackgroundControlChecked}",
13132
13156
  "dark": "{colorBackgroundControlChecked}"
13133
13157
  },
13158
+ "colorBackgroundSideNavigationItemIconHover": {
13159
+ "light": "{colorNeutral700}",
13160
+ "dark": "{colorNeutral700}"
13161
+ },
13134
13162
  "colorBackgroundLayoutMain": {
13135
13163
  "light": "{colorNeutral850}",
13136
13164
  "dark": "{colorNeutral850}"
@@ -14300,8 +14328,8 @@ module.exports.preset = {
14300
14328
  "dark": "{colorNeutral600}"
14301
14329
  },
14302
14330
  "colorBackgroundSkeleton": {
14303
- "light": "{colorNeutral750}",
14304
- "dark": "{colorNeutral750}"
14331
+ "light": "{colorNeutral600}",
14332
+ "dark": "{colorNeutral600}"
14305
14333
  },
14306
14334
  "colorBackgroundSkeletonWave": {
14307
14335
  "light": "{colorNeutral700}",
@@ -14932,6 +14960,7 @@ module.exports.preset = {
14932
14960
  "colorBackgroundItemSelected": "color",
14933
14961
  "colorBackgroundSideNavigationItemActive": "color",
14934
14962
  "colorBackgroundSideNavigationItemActiveCollapsed": "color",
14963
+ "colorBackgroundSideNavigationItemIconHover": "color",
14935
14964
  "colorBackgroundLayoutMain": "color",
14936
14965
  "colorBackgroundLayoutAiDrawer": "color",
14937
14966
  "colorBackgroundDrawer": "color",
@@ -17215,6 +17244,7 @@ module.exports.preset = {
17215
17244
  "colorBackgroundItemSelected": "color-background-item-selected",
17216
17245
  "colorBackgroundSideNavigationItemActive": "color-background-side-navigation-item-active",
17217
17246
  "colorBackgroundSideNavigationItemActiveCollapsed": "color-background-side-navigation-item-active-collapsed",
17247
+ "colorBackgroundSideNavigationItemIconHover": "color-background-side-navigation-item-icon-hover",
17218
17248
  "colorBackgroundLayoutMain": "color-background-layout-main",
17219
17249
  "colorBackgroundLayoutAiDrawer": "color-background-layout-ai-drawer",
17220
17250
  "colorBackgroundDrawer": "color-background-drawer",
@@ -18337,6 +18367,7 @@ module.exports.preset = {
18337
18367
  "colorBackgroundItemSelected": "--color-background-item-selected-9gppru",
18338
18368
  "colorBackgroundSideNavigationItemActive": "--color-background-side-navigation-item-active-adfprg",
18339
18369
  "colorBackgroundSideNavigationItemActiveCollapsed": "--color-background-side-navigation-item-active-collapsed-ceubmy",
18370
+ "colorBackgroundSideNavigationItemIconHover": "--color-background-side-navigation-item-icon-hover-ul9ia1",
18340
18371
  "colorBackgroundLayoutMain": "--color-background-layout-main-5ilwcb",
18341
18372
  "colorBackgroundLayoutAiDrawer": "--color-background-layout-ai-drawer-b4mvv3",
18342
18373
  "colorBackgroundDrawer": "--color-background-drawer-5hs0eh",
@@ -18629,7 +18660,7 @@ module.exports.preset = {
18629
18660
  "colorIconActionCardHover": "--color-icon-action-card-hover-qxq4pp",
18630
18661
  "colorIconActionCardActive": "--color-icon-action-card-active-rhp94s",
18631
18662
  "colorIconActionCardDisabled": "--color-icon-action-card-disabled-wm3kyf",
18632
- "colorBackgroundSkeleton": "--color-background-skeleton-sjxg4n",
18663
+ "colorBackgroundSkeleton": "--color-background-skeleton-h3lxqh",
18633
18664
  "colorBackgroundSkeletonWave": "--color-background-skeleton-wave-1dy97d",
18634
18665
  "colorBackgroundBadgeGreen": "--color-background-badge-green-1bcjh0",
18635
18666
  "colorBackgroundBadgeBlue": "--color-background-badge-blue-6346bd",
@@ -1795,6 +1795,10 @@ export var preset = {
1795
1795
  "light": "{colorBackgroundControlChecked}",
1796
1796
  "dark": "{colorBackgroundControlChecked}"
1797
1797
  },
1798
+ "colorBackgroundSideNavigationItemIconHover": {
1799
+ "light": "{colorPrimary50}",
1800
+ "dark": "{colorNeutral700}"
1801
+ },
1798
1802
  "colorBackgroundLayoutMain": {
1799
1803
  "light": "{colorWhite}",
1800
1804
  "dark": "{colorNeutral850}"
@@ -2964,8 +2968,8 @@ export var preset = {
2964
2968
  "dark": "{colorNeutral600}"
2965
2969
  },
2966
2970
  "colorBackgroundSkeleton": {
2967
- "light": "{colorNeutral250}",
2968
- "dark": "{colorNeutral750}"
2971
+ "light": "{colorNeutral500}",
2972
+ "dark": "{colorNeutral600}"
2969
2973
  },
2970
2974
  "colorBackgroundSkeletonWave": {
2971
2975
  "light": "{colorNeutral150}",
@@ -4799,6 +4803,10 @@ export var preset = {
4799
4803
  "light": "{colorBackgroundControlChecked}",
4800
4804
  "dark": "{colorBackgroundControlChecked}"
4801
4805
  },
4806
+ "colorBackgroundSideNavigationItemIconHover": {
4807
+ "light": "{colorNeutral700}",
4808
+ "dark": "{colorNeutral700}"
4809
+ },
4802
4810
  "colorBackgroundLayoutMain": {
4803
4811
  "light": "{colorNeutral850}",
4804
4812
  "dark": "{colorNeutral850}"
@@ -5968,8 +5976,8 @@ export var preset = {
5968
5976
  "dark": "{colorNeutral600}"
5969
5977
  },
5970
5978
  "colorBackgroundSkeleton": {
5971
- "light": "{colorNeutral750}",
5972
- "dark": "{colorNeutral750}"
5979
+ "light": "{colorNeutral600}",
5980
+ "dark": "{colorNeutral600}"
5973
5981
  },
5974
5982
  "colorBackgroundSkeletonWave": {
5975
5983
  "light": "{colorNeutral700}",
@@ -6615,6 +6623,10 @@ export var preset = {
6615
6623
  "light": "{colorBackgroundControlChecked}",
6616
6624
  "dark": "{colorBackgroundControlChecked}"
6617
6625
  },
6626
+ "colorBackgroundSideNavigationItemIconHover": {
6627
+ "light": "{colorNeutral700}",
6628
+ "dark": "{colorNeutral700}"
6629
+ },
6618
6630
  "colorBackgroundLayoutMain": {
6619
6631
  "light": "{colorNeutral950}",
6620
6632
  "dark": "{colorNeutral950}"
@@ -7784,8 +7796,8 @@ export var preset = {
7784
7796
  "dark": "{colorNeutral600}"
7785
7797
  },
7786
7798
  "colorBackgroundSkeleton": {
7787
- "light": "{colorNeutral750}",
7788
- "dark": "{colorNeutral750}"
7799
+ "light": "{colorNeutral600}",
7800
+ "dark": "{colorNeutral600}"
7789
7801
  },
7790
7802
  "colorBackgroundSkeletonWave": {
7791
7803
  "light": "{colorNeutral700}",
@@ -8359,6 +8371,10 @@ export var preset = {
8359
8371
  "light": "{colorBackgroundControlChecked}",
8360
8372
  "dark": "{colorBackgroundControlChecked}"
8361
8373
  },
8374
+ "colorBackgroundSideNavigationItemIconHover": {
8375
+ "light": "{colorPrimary50}",
8376
+ "dark": "{colorNeutral700}"
8377
+ },
8362
8378
  "colorBackgroundLayoutMain": {
8363
8379
  "light": "{colorWhite}",
8364
8380
  "dark": "{colorNeutral850}"
@@ -9528,8 +9544,8 @@ export var preset = {
9528
9544
  "dark": "{colorNeutral600}"
9529
9545
  },
9530
9546
  "colorBackgroundSkeleton": {
9531
- "light": "{colorNeutral250}",
9532
- "dark": "{colorNeutral750}"
9547
+ "light": "{colorNeutral500}",
9548
+ "dark": "{colorNeutral600}"
9533
9549
  },
9534
9550
  "colorBackgroundSkeletonWave": {
9535
9551
  "light": "{colorNeutral150}",
@@ -9949,6 +9965,10 @@ export var preset = {
9949
9965
  "light": "{colorBackgroundControlChecked}",
9950
9966
  "dark": "{colorBackgroundControlChecked}"
9951
9967
  },
9968
+ "colorBackgroundSideNavigationItemIconHover": {
9969
+ "light": "{colorPrimary50}",
9970
+ "dark": "{colorNeutral700}"
9971
+ },
9952
9972
  "colorBackgroundLayoutMain": {
9953
9973
  "light": "{colorWhite}",
9954
9974
  "dark": "{colorNeutral850}"
@@ -11118,8 +11138,8 @@ export var preset = {
11118
11138
  "dark": "{colorNeutral600}"
11119
11139
  },
11120
11140
  "colorBackgroundSkeleton": {
11121
- "light": "{colorNeutral250}",
11122
- "dark": "{colorNeutral750}"
11141
+ "light": "{colorNeutral500}",
11142
+ "dark": "{colorNeutral600}"
11123
11143
  },
11124
11144
  "colorBackgroundSkeletonWave": {
11125
11145
  "light": "{colorNeutral150}",
@@ -11539,6 +11559,10 @@ export var preset = {
11539
11559
  "light": "{colorBackgroundControlChecked}",
11540
11560
  "dark": "{colorBackgroundControlChecked}"
11541
11561
  },
11562
+ "colorBackgroundSideNavigationItemIconHover": {
11563
+ "light": "{colorPrimary50}",
11564
+ "dark": "{colorNeutral700}"
11565
+ },
11542
11566
  "colorBackgroundLayoutMain": {
11543
11567
  "light": "{colorWhite}",
11544
11568
  "dark": "{colorNeutral850}"
@@ -12708,8 +12732,8 @@ export var preset = {
12708
12732
  "dark": "{colorNeutral600}"
12709
12733
  },
12710
12734
  "colorBackgroundSkeleton": {
12711
- "light": "{colorNeutral250}",
12712
- "dark": "{colorNeutral750}"
12735
+ "light": "{colorNeutral500}",
12736
+ "dark": "{colorNeutral600}"
12713
12737
  },
12714
12738
  "colorBackgroundSkeletonWave": {
12715
12739
  "light": "{colorNeutral150}",
@@ -13131,6 +13155,10 @@ export var preset = {
13131
13155
  "light": "{colorBackgroundControlChecked}",
13132
13156
  "dark": "{colorBackgroundControlChecked}"
13133
13157
  },
13158
+ "colorBackgroundSideNavigationItemIconHover": {
13159
+ "light": "{colorNeutral700}",
13160
+ "dark": "{colorNeutral700}"
13161
+ },
13134
13162
  "colorBackgroundLayoutMain": {
13135
13163
  "light": "{colorNeutral850}",
13136
13164
  "dark": "{colorNeutral850}"
@@ -14300,8 +14328,8 @@ export var preset = {
14300
14328
  "dark": "{colorNeutral600}"
14301
14329
  },
14302
14330
  "colorBackgroundSkeleton": {
14303
- "light": "{colorNeutral750}",
14304
- "dark": "{colorNeutral750}"
14331
+ "light": "{colorNeutral600}",
14332
+ "dark": "{colorNeutral600}"
14305
14333
  },
14306
14334
  "colorBackgroundSkeletonWave": {
14307
14335
  "light": "{colorNeutral700}",
@@ -14932,6 +14960,7 @@ export var preset = {
14932
14960
  "colorBackgroundItemSelected": "color",
14933
14961
  "colorBackgroundSideNavigationItemActive": "color",
14934
14962
  "colorBackgroundSideNavigationItemActiveCollapsed": "color",
14963
+ "colorBackgroundSideNavigationItemIconHover": "color",
14935
14964
  "colorBackgroundLayoutMain": "color",
14936
14965
  "colorBackgroundLayoutAiDrawer": "color",
14937
14966
  "colorBackgroundDrawer": "color",
@@ -17215,6 +17244,7 @@ export var preset = {
17215
17244
  "colorBackgroundItemSelected": "color-background-item-selected",
17216
17245
  "colorBackgroundSideNavigationItemActive": "color-background-side-navigation-item-active",
17217
17246
  "colorBackgroundSideNavigationItemActiveCollapsed": "color-background-side-navigation-item-active-collapsed",
17247
+ "colorBackgroundSideNavigationItemIconHover": "color-background-side-navigation-item-icon-hover",
17218
17248
  "colorBackgroundLayoutMain": "color-background-layout-main",
17219
17249
  "colorBackgroundLayoutAiDrawer": "color-background-layout-ai-drawer",
17220
17250
  "colorBackgroundDrawer": "color-background-drawer",
@@ -18337,6 +18367,7 @@ export var preset = {
18337
18367
  "colorBackgroundItemSelected": "--color-background-item-selected-9gppru",
18338
18368
  "colorBackgroundSideNavigationItemActive": "--color-background-side-navigation-item-active-adfprg",
18339
18369
  "colorBackgroundSideNavigationItemActiveCollapsed": "--color-background-side-navigation-item-active-collapsed-ceubmy",
18370
+ "colorBackgroundSideNavigationItemIconHover": "--color-background-side-navigation-item-icon-hover-ul9ia1",
18340
18371
  "colorBackgroundLayoutMain": "--color-background-layout-main-5ilwcb",
18341
18372
  "colorBackgroundLayoutAiDrawer": "--color-background-layout-ai-drawer-b4mvv3",
18342
18373
  "colorBackgroundDrawer": "--color-background-drawer-5hs0eh",
@@ -18629,7 +18660,7 @@ export var preset = {
18629
18660
  "colorIconActionCardHover": "--color-icon-action-card-hover-qxq4pp",
18630
18661
  "colorIconActionCardActive": "--color-icon-action-card-active-rhp94s",
18631
18662
  "colorIconActionCardDisabled": "--color-icon-action-card-disabled-wm3kyf",
18632
- "colorBackgroundSkeleton": "--color-background-skeleton-sjxg4n",
18663
+ "colorBackgroundSkeleton": "--color-background-skeleton-h3lxqh",
18633
18664
  "colorBackgroundSkeletonWave": "--color-background-skeleton-wave-1dy97d",
18634
18665
  "colorBackgroundBadgeGreen": "--color-background-badge-green-1bcjh0",
18635
18666
  "colorBackgroundBadgeBlue": "--color-background-badge-blue-6346bd",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "6db99848695ad631858cad7dea69c46d347003ea"
2
+ "commit": "21c5e82cac052ddeb69a09b6dc20090543f19fff"
3
3
  }
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactId": "8961009388",
2
+ "artifactId": "9071858249",
3
3
  "repoName": "components",
4
- "commitSha": "6db99848695ad631858cad7dea69c46d347003ea"
4
+ "commitSha": "21c5e82cac052ddeb69a09b6dc20090543f19fff"
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/multiselect/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FAkEhB,CAAC;AAGF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/multiselect/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,QAAA,MAAM,WAAW,+FAsEhB,CAAC;AAGF,eAAe,WAAW,CAAC"}
@@ -20,10 +20,14 @@ const Multiselect = React.forwardRef(({ options = [], filteringType = 'none', st
20
20
  virtualScroll: restProps.virtualScroll,
21
21
  readOnly: restProps.readOnly,
22
22
  enableSelectAll: restProps.enableSelectAll,
23
+ dropdownRole: restProps.dropdownRole,
23
24
  },
24
25
  metadata: {
25
26
  hasInlineLabel: Boolean(restProps.inlineLabelText),
26
27
  hasDisabledReasons: options.some(option => Boolean(option.disabledReason)),
28
+ hasDropdownHeader: Boolean(restProps.renderDropdownHeader),
29
+ hasDropdownFooter: Boolean(restProps.renderDropdownFooter),
30
+ hasDropdownAriaDescribedby: Boolean(restProps.dropdownAriaDescribedby),
27
31
  },
28
32
  });
29
33
  const componentAnalyticsMetadata = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/multiselect/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,mBAAmB,MAAM,YAAY,CAAC;AAE7C,OAAO,+BAA+B,MAAM,wEAAwE,CAAC;AAIrH,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,OAAO,GAAG,EAAE,EACZ,aAAa,GAAG,MAAM,EACtB,UAAU,GAAG,UAAU,EACvB,eAAe,GAAG,EAAE,EACpB,QAAQ,GAAG,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2B;iBAC1B,GAAG,CAAC,MAAM,CAAC,EAAE,WAAC,OAAA,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,MAAM,CAAC,KAAK,EAAE,CAAA,EAAA,CAAC;SACpD;KACF,CAAC;IAEF,OAAO,CACL,oBAAC,mBAAmB,IAClB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,KAClB,SAAS,KACT,kBAAkB,EACtB,GAAG,EAAE,GAAG,KACJ,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,GAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC7C,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataMultiselectComponent } from './analytics-metadata/interfaces';\nimport { MultiselectProps } from './interfaces';\nimport InternalMultiselect from './internal';\n\nimport buttonTriggerAnalyticsSelectors from '../internal/components/button-trigger/analytics-metadata/styles.css.js';\n\nexport { MultiselectProps };\n\nconst Multiselect = React.forwardRef(\n (\n {\n options = [],\n filteringType = 'none',\n statusType = 'finished',\n selectedOptions = [],\n keepOpen = true,\n hideTokens = false,\n renderOption,\n ...restProps\n }: MultiselectProps,\n ref: React.Ref<MultiselectProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Multiselect', {\n props: {\n inlineTokens: restProps.inlineTokens,\n autoFocus: restProps.autoFocus,\n expandToViewport: restProps.expandToViewport,\n filteringType,\n hideTokens,\n keepOpen,\n tokenLimit: restProps.tokenLimit,\n virtualScroll: restProps.virtualScroll,\n readOnly: restProps.readOnly,\n enableSelectAll: restProps.enableSelectAll,\n },\n metadata: {\n hasInlineLabel: Boolean(restProps.inlineLabelText),\n hasDisabledReasons: options.some(option => Boolean(option.disabledReason)),\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataMultiselectComponent = {\n name: 'awsui.Multiselect',\n label: `.${buttonTriggerAnalyticsSelectors['button-trigger']}`,\n properties: {\n disabled: `${!!restProps.disabled}`,\n selectedOptionsCount: `${selectedOptions.length}`,\n selectedOptionsValues: selectedOptions\n .filter(option => option.value !== undefined)\n .map(option => `${option.value}`),\n selectedOptions: selectedOptions\n .filter(option => option.value !== undefined)\n // fallback on value when label's undefined because in the dropdown if there's no label\n // the value will be shown.\n .map(option => `${option.label ?? option.value}`),\n },\n };\n\n return (\n <InternalMultiselect\n renderOption={renderOption}\n options={options}\n filteringType={filteringType}\n statusType={statusType}\n selectedOptions={selectedOptions}\n keepOpen={keepOpen}\n hideTokens={hideTokens}\n {...restProps}\n {...baseComponentProps}\n ref={ref}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Multiselect, 'Multiselect');\nexport default Multiselect;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/multiselect/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,mBAAmB,MAAM,YAAY,CAAC;AAE7C,OAAO,+BAA+B,MAAM,wEAAwE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,CAAC,QAAQ,EAAE;YACnC,oBAAoB,EAAE,GAAG,eAAe,CAAC,MAAM,EAAE;YACjD,qBAAqB,EAAE,eAAe;iBACnC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC;iBAC5C,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;YACnC,eAAe,EAAE,eAAe;iBAC7B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC;gBAC7C,uFAAuF;gBACvF,2BAA2B;iBAC1B,GAAG,CAAC,MAAM,CAAC,EAAE,WAAC,OAAA,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,MAAM,CAAC,KAAK,EAAE,CAAA,EAAA,CAAC;SACpD;KACF,CAAC;IAEF,OAAO,CACL,oBAAC,mBAAmB,IAClB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,KAClB,SAAS,KACT,kBAAkB,EACtB,GAAG,EAAE,GAAG,KACJ,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,GAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC7C,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataMultiselectComponent } from './analytics-metadata/interfaces';\nimport { MultiselectProps } from './interfaces';\nimport InternalMultiselect from './internal';\n\nimport buttonTriggerAnalyticsSelectors from '../internal/components/button-trigger/analytics-metadata/styles.css.js';\n\nexport { MultiselectProps };\n\nconst Multiselect = React.forwardRef(\n (\n {\n options = [],\n filteringType = 'none',\n statusType = 'finished',\n selectedOptions = [],\n keepOpen = true,\n hideTokens = false,\n renderOption,\n ...restProps\n }: MultiselectProps,\n ref: React.Ref<MultiselectProps.Ref>\n ) => {\n const baseComponentProps = useBaseComponent('Multiselect', {\n props: {\n inlineTokens: restProps.inlineTokens,\n autoFocus: restProps.autoFocus,\n expandToViewport: restProps.expandToViewport,\n filteringType,\n hideTokens,\n keepOpen,\n tokenLimit: restProps.tokenLimit,\n virtualScroll: restProps.virtualScroll,\n readOnly: restProps.readOnly,\n enableSelectAll: restProps.enableSelectAll,\n dropdownRole: restProps.dropdownRole,\n },\n metadata: {\n hasInlineLabel: Boolean(restProps.inlineLabelText),\n hasDisabledReasons: options.some(option => Boolean(option.disabledReason)),\n hasDropdownHeader: Boolean(restProps.renderDropdownHeader),\n hasDropdownFooter: Boolean(restProps.renderDropdownFooter),\n hasDropdownAriaDescribedby: Boolean(restProps.dropdownAriaDescribedby),\n },\n });\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataMultiselectComponent = {\n name: 'awsui.Multiselect',\n label: `.${buttonTriggerAnalyticsSelectors['button-trigger']}`,\n properties: {\n disabled: `${!!restProps.disabled}`,\n selectedOptionsCount: `${selectedOptions.length}`,\n selectedOptionsValues: selectedOptions\n .filter(option => option.value !== undefined)\n .map(option => `${option.value}`),\n selectedOptions: selectedOptions\n .filter(option => option.value !== undefined)\n // fallback on value when label's undefined because in the dropdown if there's no label\n // the value will be shown.\n .map(option => `${option.label ?? option.value}`),\n },\n };\n\n return (\n <InternalMultiselect\n renderOption={renderOption}\n options={options}\n filteringType={filteringType}\n statusType={statusType}\n selectedOptions={selectedOptions}\n keepOpen={keepOpen}\n hideTokens={hideTokens}\n {...restProps}\n {...baseComponentProps}\n ref={ref}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Multiselect, 'Multiselect');\nexport default Multiselect;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { OptionsLoadItemsDetail } from '../dropdown/interfaces';
3
- import { BaseSelectProps } from '../select/interfaces';
3
+ import { BaseSelectProps, SelectProps } from '../select/interfaces';
4
4
  import { NonCancelableEventHandler } from '../types/events';
5
5
  import { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';
6
6
  export interface MultiselectProps extends BaseSelectProps {
@@ -78,6 +78,13 @@ export declare namespace MultiselectProps {
78
78
  type Option = OptionDefinition;
79
79
  type OptionGroup = OptionGroupDefinition;
80
80
  type Options = ReadonlyArray<Option | OptionGroup>;
81
+ /**
82
+ * The argument passed to the dropdown render functions (`renderDropdownHeader`
83
+ * and `renderDropdownFooter`).
84
+ */
85
+ type DropdownContentProps = SelectProps.DropdownContentProps;
86
+ type DropdownRole = SelectProps.DropdownRole;
87
+ type DropdownContentRenderer = SelectProps.DropdownContentRenderer;
81
88
  interface LoadItemsDetail extends OptionsLoadItemsDetail {}
82
89
  interface MultiselectOptionItem {
83
90
  type: 'item';
@@ -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,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,gBAAiB,SAAQ,eA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AE,MAAM,CAAC;KACrB,KAAK,SAAS,GAAG,IAAI,CAAC;IAEvB,KAAY,yBAAyB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACnE,KAAY,cAAc,GAAG,aAAa,GAAG,QAAQ,CAAC;IAEtD,UAAiB,WAAW;QAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;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 { OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { BaseSelectProps } from '../select/interfaces';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\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 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"]}
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 { BaseSelectProps, SelectProps } from '../select/interfaces';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\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 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\n /**\n * The argument passed to the dropdown render functions (`renderDropdownHeader`\n * and `renderDropdownFooter`).\n */\n export type DropdownContentProps = SelectProps.DropdownContentProps;\n export type DropdownRole = SelectProps.DropdownRole;\n export type DropdownContentRenderer = SelectProps.DropdownContentRenderer;\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/multiselect/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAYhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAU3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAahD,QAAA,MAAM,mBAAmB;;;;;;;2EAoMxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/multiselect/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAYhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAW3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAahD,QAAA,MAAM,mBAAmB;;;;;;;2EA6NxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -16,10 +16,11 @@ import Filter from '../select/parts/filter';
16
16
  import PlainList from '../select/parts/plain-list';
17
17
  import Trigger from '../select/parts/trigger';
18
18
  import VirtualList from '../select/parts/virtual-list';
19
+ import { composeDropdownContent } from '../select/utils/dropdown-customization';
19
20
  import InternalTokenGroup from '../token-group/internal';
20
21
  import { useMultiselect } from './use-multiselect';
21
22
  import styles from './styles.css.js';
22
- const InternalMultiselect = React.forwardRef(({ options, filteringType, filteringPlaceholder, filteringAriaLabel, filteringClearAriaLabel, ariaRequired, placeholder, disabled, readOnly, ariaLabel, inlineLabelText, selectedOptions, deselectAriaLabel, tokenLimit, i18nStrings, virtualScroll, inlineTokens = false, hideTokens, expandToViewport, tokenLimitShowFewerAriaLabel, tokenLimitShowMoreAriaLabel, __internalRootRef, autoFocus, enableSelectAll, renderOption, ...restProps }, externalRef) => {
23
+ const InternalMultiselect = React.forwardRef(({ options, filteringType, filteringPlaceholder, filteringAriaLabel, filteringClearAriaLabel, ariaRequired, placeholder, disabled, readOnly, ariaLabel, inlineLabelText, selectedOptions, deselectAriaLabel, tokenLimit, i18nStrings, virtualScroll, inlineTokens = false, hideTokens, expandToViewport, tokenLimitShowFewerAriaLabel, tokenLimitShowMoreAriaLabel, __internalRootRef, autoFocus, enableSelectAll, renderOption, renderDropdownHeader, renderDropdownFooter, dropdownRole, dropdownAriaDescribedby, ...restProps }, externalRef) => {
23
24
  var _a;
24
25
  const baseProps = getBaseProps(restProps);
25
26
  const formFieldContext = useFormFieldContext(restProps);
@@ -43,8 +44,16 @@ const InternalMultiselect = React.forwardRef(({ options, filteringType, filterin
43
44
  externalRef,
44
45
  enableSelectAll,
45
46
  i18nStrings,
47
+ dropdownRole,
48
+ dropdownAriaDescribedby,
46
49
  ...restProps,
47
50
  });
51
+ const dropdownContentProps = {
52
+ filterText: filteringValue,
53
+ closeDropdown: multiselectProps.closeDropdown,
54
+ };
55
+ const customDropdownHeader = renderDropdownHeader === null || renderDropdownHeader === void 0 ? void 0 : renderDropdownHeader(dropdownContentProps);
56
+ const customDropdownFooter = renderDropdownFooter === null || renderDropdownFooter === void 0 ? void 0 : renderDropdownFooter(dropdownContentProps);
48
57
  const filter = (React.createElement(Filter, { clearAriaLabel: filteringClearAriaLabel, filteringType: filteringType, placeholder: filteringPlaceholder, ariaLabel: filteringAriaLabel, ariaRequired: ariaRequired, value: filteringValue, ...multiselectProps.getFilterProps() }));
49
58
  const triggerRef = useRef(null);
50
59
  const [triggerWidth, setTriggerWidth] = useState(null);
@@ -72,10 +81,21 @@ const InternalMultiselect = React.forwardRef(({ options, filteringType, filterin
72
81
  const dropdownStatus = multiselectProps.dropdownStatus;
73
82
  const dropdownProps = multiselectProps.getDropdownProps();
74
83
  const hasFilteredOptions = multiselectProps.filteredOptions.length > 0;
84
+ const statusFooter = dropdownStatus.isSticky ? (React.createElement(DropdownFooter, { content: multiselectProps.isOpen ? dropdownStatus.content : null, id: footerId })) : null;
85
+ const { header: dropdownHeader, footer: dropdownFooter } = composeDropdownContent({
86
+ filter,
87
+ customDropdownHeader,
88
+ customDropdownFooter,
89
+ statusFooter,
90
+ dropdownHeaderClass: styles['dropdown-header'],
91
+ dropdownFooterClass: styles['dropdown-footer'],
92
+ });
75
93
  const hasOptions = useRef(options.length > 0);
76
94
  hasOptions.current = hasOptions.current || options.length > 0;
77
95
  return (React.createElement("div", { ...baseProps, ref: __internalRootRef, className: clsx(styles.root, baseProps.className), ...multiselectProps.getWrapperProps() },
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,
96
+ React.createElement(Dropdown, { ...dropdownProps, ariaLabelledby: dropdownProps.ariaRole ? joinStrings(ariaLabelId, controlId) : undefined, ariaDescribedby: dropdownProps.ariaRole
97
+ ? joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby)
98
+ : undefined, open: multiselectProps.isOpen, minWidth: getDropdownMinWidth({ expandToViewport, triggerWidth }), maxWidth: getBreakpointValue('xxs'), trigger: trigger, header: dropdownHeader, footer: dropdownFooter, expandToViewport: expandToViewport,
79
99
  // Forces dropdown position recalculation when new options are loaded
80
100
  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
101
  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 })),