@cloudscape-design/components 3.0.828 → 3.0.830

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 (189) hide show
  1. package/app-layout/visual-refresh-toolbar/navigation/index.d.ts.map +1 -1
  2. package/app-layout/visual-refresh-toolbar/navigation/index.js +5 -4
  3. package/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  4. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -5
  5. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +10 -16
  6. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -5
  7. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  8. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +1 -1
  9. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  10. package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
  11. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  12. package/button-group/icon-toggle-button-item.d.ts +12 -0
  13. package/button-group/icon-toggle-button-item.d.ts.map +1 -0
  14. package/button-group/icon-toggle-button-item.js +30 -0
  15. package/button-group/icon-toggle-button-item.js.map +1 -0
  16. package/button-group/interfaces.d.ts +42 -6
  17. package/button-group/interfaces.d.ts.map +1 -1
  18. package/button-group/interfaces.js.map +1 -1
  19. package/button-group/item-element.d.ts.map +1 -1
  20. package/button-group/item-element.js +2 -0
  21. package/button-group/item-element.js.map +1 -1
  22. package/button-group/menu-dropdown-item.js +1 -1
  23. package/button-group/menu-dropdown-item.js.map +1 -1
  24. package/{internal/components/file-dropzone → file-dropzone}/index.d.ts +1 -1
  25. package/file-dropzone/index.d.ts.map +1 -0
  26. package/file-dropzone/index.js +14 -0
  27. package/file-dropzone/index.js.map +1 -0
  28. package/{internal/components/file-dropzone → file-dropzone}/interfaces.d.ts +2 -2
  29. package/file-dropzone/interfaces.d.ts.map +1 -0
  30. package/file-dropzone/interfaces.js.map +1 -0
  31. package/file-dropzone/internal.d.ts +5 -0
  32. package/file-dropzone/internal.d.ts.map +1 -0
  33. package/{internal/components/file-dropzone/index.js → file-dropzone/internal.js} +10 -6
  34. package/file-dropzone/internal.js.map +1 -0
  35. package/file-dropzone/styles.css.js +8 -0
  36. package/{internal/components/file-dropzone → file-dropzone}/styles.scoped.css +17 -14
  37. package/{internal/components/file-dropzone → file-dropzone}/styles.selectors.js +3 -3
  38. package/file-dropzone/use-files-dragging.d.ts.map +1 -0
  39. package/file-dropzone/use-files-dragging.js.map +1 -0
  40. package/file-input/index.d.ts +6 -0
  41. package/file-input/index.d.ts.map +1 -0
  42. package/file-input/index.js +20 -0
  43. package/file-input/index.js.map +1 -0
  44. package/{internal/components/file-input → file-input}/interfaces.d.ts +3 -3
  45. package/file-input/interfaces.d.ts.map +1 -0
  46. package/file-input/interfaces.js.map +1 -0
  47. package/file-input/internal.d.ts +6 -0
  48. package/file-input/internal.d.ts.map +1 -0
  49. package/{internal/components/file-input/index.js → file-input/internal.js} +13 -11
  50. package/file-input/internal.js.map +1 -0
  51. package/file-input/styles.css.js +10 -0
  52. package/{internal/components/file-input → file-input}/styles.scoped.css +6 -6
  53. package/file-input/styles.selectors.js +11 -0
  54. package/file-token-group/default-formatters.d.ts.map +1 -0
  55. package/{internal/components/file-token-group → file-token-group}/default-formatters.js +1 -1
  56. package/file-token-group/default-formatters.js.map +1 -0
  57. package/{internal/components/file-token-group → file-token-group}/file-token.d.ts +2 -2
  58. package/file-token-group/file-token.d.ts.map +1 -0
  59. package/{internal/components/file-token-group → file-token-group}/file-token.js +8 -8
  60. package/file-token-group/file-token.js.map +1 -0
  61. package/file-token-group/index.d.ts +6 -0
  62. package/file-token-group/index.d.ts.map +1 -0
  63. package/file-token-group/index.js +23 -0
  64. package/file-token-group/index.js.map +1 -0
  65. package/{internal/components/file-token-group → file-token-group}/interfaces.d.ts +2 -2
  66. package/file-token-group/interfaces.d.ts.map +1 -0
  67. package/file-token-group/interfaces.js.map +1 -0
  68. package/{internal/components/file-token-group/index.d.ts → file-token-group/internal.d.ts} +2 -3
  69. package/file-token-group/internal.d.ts.map +1 -0
  70. package/{internal/components/file-token-group/index.js → file-token-group/internal.js} +7 -7
  71. package/file-token-group/internal.js.map +1 -0
  72. package/file-token-group/styles.css.js +27 -0
  73. package/{internal/components/file-token-group → file-token-group}/styles.scoped.css +29 -29
  74. package/file-token-group/styles.selectors.js +28 -0
  75. package/file-token-group/test-classes/styles.css.js +11 -0
  76. package/file-token-group/test-classes/styles.scoped.css +12 -0
  77. package/file-token-group/test-classes/styles.selectors.js +12 -0
  78. package/file-token-group/thumbnail.d.ts.map +1 -0
  79. package/file-token-group/thumbnail.js.map +1 -0
  80. package/file-upload/internal.d.ts.map +1 -1
  81. package/file-upload/internal.js +6 -5
  82. package/file-upload/internal.js.map +1 -1
  83. package/index.d.ts +3 -0
  84. package/index.d.ts.map +1 -1
  85. package/index.js +3 -0
  86. package/index.js.map +1 -1
  87. package/internal/base-component/styles.scoped.css +30 -20
  88. package/internal/environment.js +1 -1
  89. package/internal/environment.json +1 -1
  90. package/internal/generated/styles/tokens.d.ts +4 -2
  91. package/internal/generated/styles/tokens.js +6 -4
  92. package/internal/generated/theming/index.cjs +136 -74
  93. package/internal/generated/theming/index.js +136 -74
  94. package/internal/manifest.json +1 -1
  95. package/internal/plugins/controllers/drawers.d.ts +6 -2
  96. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  97. package/internal/plugins/controllers/drawers.js +24 -21
  98. package/internal/plugins/controllers/drawers.js.map +1 -1
  99. package/internal/utils/date-time/format-date-localized.d.ts.map +1 -1
  100. package/internal/utils/date-time/format-date-localized.js +6 -1
  101. package/internal/utils/date-time/format-date-localized.js.map +1 -1
  102. package/package.json +4 -1
  103. package/test-utils/dom/button-group/index.d.ts +5 -0
  104. package/test-utils/dom/button-group/index.js +9 -0
  105. package/test-utils/dom/button-group/index.js.map +1 -1
  106. package/test-utils/dom/{internal/file-dropzone.js → file-dropzone/index.js} +2 -2
  107. package/test-utils/dom/file-dropzone/index.js.map +1 -0
  108. package/test-utils/dom/{internal/file-input.js → file-input/index.js} +2 -2
  109. package/test-utils/dom/file-input/index.js.map +1 -0
  110. package/test-utils/dom/{internal/file-token-group.js → file-token-group/index.js} +14 -14
  111. package/test-utils/dom/file-token-group/index.js.map +1 -0
  112. package/test-utils/dom/file-upload/index.d.ts +1 -1
  113. package/test-utils/dom/file-upload/index.js +13 -13
  114. package/test-utils/dom/file-upload/index.js.map +1 -1
  115. package/test-utils/dom/index.d.ts +9 -0
  116. package/test-utils/dom/index.js +26 -2
  117. package/test-utils/dom/index.js.map +1 -1
  118. package/test-utils/selectors/button-group/index.d.ts +5 -0
  119. package/test-utils/selectors/button-group/index.js +9 -0
  120. package/test-utils/selectors/button-group/index.js.map +1 -1
  121. package/test-utils/selectors/{internal/file-dropzone.js → file-dropzone/index.js} +2 -2
  122. package/test-utils/selectors/file-dropzone/index.js.map +1 -0
  123. package/test-utils/selectors/{internal/file-input.js → file-input/index.js} +2 -2
  124. package/test-utils/selectors/file-input/index.js.map +1 -0
  125. package/test-utils/selectors/{internal/file-token-group.js → file-token-group/index.js} +14 -14
  126. package/test-utils/selectors/file-token-group/index.js.map +1 -0
  127. package/test-utils/selectors/file-upload/index.d.ts +1 -1
  128. package/test-utils/selectors/file-upload/index.js +13 -13
  129. package/test-utils/selectors/file-upload/index.js.map +1 -1
  130. package/test-utils/selectors/index.d.ts +9 -0
  131. package/test-utils/selectors/index.js +26 -2
  132. package/test-utils/selectors/index.js.map +1 -1
  133. package/test-utils/tsconfig.tsbuildinfo +1 -1
  134. package/toggle-button/internal.d.ts +3 -1
  135. package/toggle-button/internal.d.ts.map +1 -1
  136. package/toggle-button/internal.js.map +1 -1
  137. package/wizard/wizard-form.d.ts +4 -2
  138. package/wizard/wizard-form.d.ts.map +1 -1
  139. package/wizard/wizard-form.js +10 -9
  140. package/wizard/wizard-form.js.map +1 -1
  141. package/internal/components/file-dropzone/index.d.ts.map +0 -1
  142. package/internal/components/file-dropzone/index.js.map +0 -1
  143. package/internal/components/file-dropzone/interfaces.d.ts.map +0 -1
  144. package/internal/components/file-dropzone/interfaces.js.map +0 -1
  145. package/internal/components/file-dropzone/styles.css.js +0 -8
  146. package/internal/components/file-dropzone/use-files-dragging.d.ts.map +0 -1
  147. package/internal/components/file-dropzone/use-files-dragging.js.map +0 -1
  148. package/internal/components/file-input/index.d.ts +0 -6
  149. package/internal/components/file-input/index.d.ts.map +0 -1
  150. package/internal/components/file-input/index.js.map +0 -1
  151. package/internal/components/file-input/interfaces.d.ts.map +0 -1
  152. package/internal/components/file-input/interfaces.js.map +0 -1
  153. package/internal/components/file-input/styles.css.js +0 -10
  154. package/internal/components/file-input/styles.selectors.js +0 -11
  155. package/internal/components/file-token-group/default-formatters.d.ts.map +0 -1
  156. package/internal/components/file-token-group/default-formatters.js.map +0 -1
  157. package/internal/components/file-token-group/file-token.d.ts.map +0 -1
  158. package/internal/components/file-token-group/file-token.js.map +0 -1
  159. package/internal/components/file-token-group/index.d.ts.map +0 -1
  160. package/internal/components/file-token-group/index.js.map +0 -1
  161. package/internal/components/file-token-group/interfaces.d.ts.map +0 -1
  162. package/internal/components/file-token-group/interfaces.js.map +0 -1
  163. package/internal/components/file-token-group/styles.css.js +0 -27
  164. package/internal/components/file-token-group/styles.selectors.js +0 -28
  165. package/internal/components/file-token-group/test-classes/styles.css.js +0 -11
  166. package/internal/components/file-token-group/test-classes/styles.scoped.css +0 -12
  167. package/internal/components/file-token-group/test-classes/styles.selectors.js +0 -12
  168. package/internal/components/file-token-group/thumbnail.d.ts.map +0 -1
  169. package/internal/components/file-token-group/thumbnail.js.map +0 -1
  170. package/test-utils/dom/internal/file-dropzone.js.map +0 -1
  171. package/test-utils/dom/internal/file-input.js.map +0 -1
  172. package/test-utils/dom/internal/file-token-group.js.map +0 -1
  173. package/test-utils/selectors/internal/file-dropzone.js.map +0 -1
  174. package/test-utils/selectors/internal/file-input.js.map +0 -1
  175. package/test-utils/selectors/internal/file-token-group.js.map +0 -1
  176. /package/{internal/components/file-dropzone → file-dropzone}/interfaces.js +0 -0
  177. /package/{internal/components/file-dropzone → file-dropzone}/use-files-dragging.d.ts +0 -0
  178. /package/{internal/components/file-dropzone → file-dropzone}/use-files-dragging.js +0 -0
  179. /package/{internal/components/file-input → file-input}/interfaces.js +0 -0
  180. /package/{internal/components/file-token-group → file-token-group}/default-formatters.d.ts +0 -0
  181. /package/{internal/components/file-token-group → file-token-group}/interfaces.js +0 -0
  182. /package/{internal/components/file-token-group → file-token-group}/thumbnail.d.ts +0 -0
  183. /package/{internal/components/file-token-group → file-token-group}/thumbnail.js +0 -0
  184. /package/test-utils/dom/{internal/file-dropzone.d.ts → file-dropzone/index.d.ts} +0 -0
  185. /package/test-utils/dom/{internal/file-input.d.ts → file-input/index.d.ts} +0 -0
  186. /package/test-utils/dom/{internal/file-token-group.d.ts → file-token-group/index.d.ts} +0 -0
  187. /package/test-utils/selectors/{internal/file-dropzone.d.ts → file-dropzone/index.d.ts} +0 -0
  188. /package/test-utils/selectors/{internal/file-input.d.ts → file-input/index.d.ts} +0 -0
  189. /package/test-utils/selectors/{internal/file-token-group.d.ts → file-token-group/index.d.ts} +0 -0
@@ -1733,21 +1733,29 @@ export var preset = {
1733
1733
  "light": "{colorBlue200}",
1734
1734
  "dark": "{colorBlue600}"
1735
1735
  },
1736
- "colorDropzoneBackgroundActive": {
1737
- "light": "{colorGrey200}",
1738
- "dark": "{colorGrey500}"
1736
+ "colorDropzoneBackgroundDefault": {
1737
+ "light": "{colorWhite}",
1738
+ "dark": "{colorGrey800}"
1739
1739
  },
1740
1740
  "colorDropzoneBackgroundHover": {
1741
- "light": "{colorBlue200}",
1742
- "dark": "{colorBlue600}"
1741
+ "light": "{colorBlue100}",
1742
+ "dark": "{colorBlue900}"
1743
1743
  },
1744
- "colorDropzoneTextActive": {
1745
- "light": "{colorGrey550}",
1746
- "dark": "{colorGrey800}"
1744
+ "colorDropzoneTextDefault": {
1745
+ "light": "{colorGrey600}",
1746
+ "dark": "{colorGrey350}"
1747
1747
  },
1748
1748
  "colorDropzoneTextHover": {
1749
+ "light": "{colorGrey600}",
1750
+ "dark": "{colorGrey350}"
1751
+ },
1752
+ "colorDropzoneBorderDefault": {
1753
+ "light": "{colorGrey500}",
1754
+ "dark": "{colorGrey550}"
1755
+ },
1756
+ "colorDropzoneBorderHover": {
1749
1757
  "light": "{colorBlue800}",
1750
- "dark": "{colorWhite}"
1758
+ "dark": "{colorBlue400}"
1751
1759
  },
1752
1760
  "colorBackgroundSeverityCritical": {
1753
1761
  "light": "{colorChartsStatusCritical}",
@@ -3976,21 +3984,29 @@ export var preset = {
3976
3984
  "light": "{colorBlue600}",
3977
3985
  "dark": "{colorBlue600}"
3978
3986
  },
3979
- "colorDropzoneBackgroundActive": {
3980
- "light": "{colorGrey500}",
3981
- "dark": "{colorGrey500}"
3987
+ "colorDropzoneBackgroundDefault": {
3988
+ "light": "{colorGrey800}",
3989
+ "dark": "{colorGrey800}"
3982
3990
  },
3983
3991
  "colorDropzoneBackgroundHover": {
3984
- "light": "{colorBlue600}",
3985
- "dark": "{colorBlue600}"
3992
+ "light": "{colorBlue900}",
3993
+ "dark": "{colorBlue900}"
3986
3994
  },
3987
- "colorDropzoneTextActive": {
3988
- "light": "{colorGrey800}",
3989
- "dark": "{colorGrey800}"
3995
+ "colorDropzoneTextDefault": {
3996
+ "light": "{colorGrey350}",
3997
+ "dark": "{colorGrey350}"
3990
3998
  },
3991
3999
  "colorDropzoneTextHover": {
3992
- "light": "{colorWhite}",
3993
- "dark": "{colorWhite}"
4000
+ "light": "{colorGrey350}",
4001
+ "dark": "{colorGrey350}"
4002
+ },
4003
+ "colorDropzoneBorderDefault": {
4004
+ "light": "{colorGrey550}",
4005
+ "dark": "{colorGrey550}"
4006
+ },
4007
+ "colorDropzoneBorderHover": {
4008
+ "light": "{colorBlue400}",
4009
+ "dark": "{colorBlue400}"
3994
4010
  },
3995
4011
  "colorBackgroundSeverityCritical": {
3996
4012
  "light": "{colorChartsStatusCritical}",
@@ -5130,21 +5146,29 @@ export var preset = {
5130
5146
  "light": "{colorBlue600}",
5131
5147
  "dark": "{colorBlue600}"
5132
5148
  },
5133
- "colorDropzoneBackgroundActive": {
5134
- "light": "{colorGrey500}",
5135
- "dark": "{colorGrey500}"
5149
+ "colorDropzoneBackgroundDefault": {
5150
+ "light": "{colorGrey800}",
5151
+ "dark": "{colorGrey800}"
5136
5152
  },
5137
5153
  "colorDropzoneBackgroundHover": {
5138
- "light": "{colorBlue600}",
5139
- "dark": "{colorBlue600}"
5154
+ "light": "{colorBlue900}",
5155
+ "dark": "{colorBlue900}"
5140
5156
  },
5141
- "colorDropzoneTextActive": {
5142
- "light": "{colorGrey800}",
5143
- "dark": "{colorGrey800}"
5157
+ "colorDropzoneTextDefault": {
5158
+ "light": "{colorGrey350}",
5159
+ "dark": "{colorGrey350}"
5144
5160
  },
5145
5161
  "colorDropzoneTextHover": {
5146
- "light": "{colorWhite}",
5147
- "dark": "{colorWhite}"
5162
+ "light": "{colorGrey350}",
5163
+ "dark": "{colorGrey350}"
5164
+ },
5165
+ "colorDropzoneBorderDefault": {
5166
+ "light": "{colorGrey550}",
5167
+ "dark": "{colorGrey550}"
5168
+ },
5169
+ "colorDropzoneBorderHover": {
5170
+ "light": "{colorBlue400}",
5171
+ "dark": "{colorBlue400}"
5148
5172
  },
5149
5173
  "colorBackgroundSeverityCritical": {
5150
5174
  "light": "{colorChartsStatusCritical}",
@@ -6216,21 +6240,29 @@ export var preset = {
6216
6240
  "light": "{colorBlue200}",
6217
6241
  "dark": "{colorBlue600}"
6218
6242
  },
6219
- "colorDropzoneBackgroundActive": {
6220
- "light": "{colorGrey200}",
6221
- "dark": "{colorGrey500}"
6243
+ "colorDropzoneBackgroundDefault": {
6244
+ "light": "{colorWhite}",
6245
+ "dark": "{colorGrey800}"
6222
6246
  },
6223
6247
  "colorDropzoneBackgroundHover": {
6224
- "light": "{colorBlue200}",
6225
- "dark": "{colorBlue600}"
6248
+ "light": "{colorBlue100}",
6249
+ "dark": "{colorBlue900}"
6226
6250
  },
6227
- "colorDropzoneTextActive": {
6228
- "light": "{colorGrey550}",
6229
- "dark": "{colorGrey800}"
6251
+ "colorDropzoneTextDefault": {
6252
+ "light": "{colorGrey600}",
6253
+ "dark": "{colorGrey350}"
6230
6254
  },
6231
6255
  "colorDropzoneTextHover": {
6256
+ "light": "{colorGrey600}",
6257
+ "dark": "{colorGrey350}"
6258
+ },
6259
+ "colorDropzoneBorderDefault": {
6260
+ "light": "{colorGrey500}",
6261
+ "dark": "{colorGrey550}"
6262
+ },
6263
+ "colorDropzoneBorderHover": {
6232
6264
  "light": "{colorBlue800}",
6233
- "dark": "{colorWhite}"
6265
+ "dark": "{colorBlue400}"
6234
6266
  },
6235
6267
  "colorBackgroundSeverityCritical": {
6236
6268
  "light": "{colorChartsStatusCritical}",
@@ -7302,21 +7334,29 @@ export var preset = {
7302
7334
  "light": "{colorBlue200}",
7303
7335
  "dark": "{colorBlue600}"
7304
7336
  },
7305
- "colorDropzoneBackgroundActive": {
7306
- "light": "{colorGrey200}",
7307
- "dark": "{colorGrey500}"
7337
+ "colorDropzoneBackgroundDefault": {
7338
+ "light": "{colorWhite}",
7339
+ "dark": "{colorGrey800}"
7308
7340
  },
7309
7341
  "colorDropzoneBackgroundHover": {
7310
- "light": "{colorBlue200}",
7311
- "dark": "{colorBlue600}"
7342
+ "light": "{colorBlue100}",
7343
+ "dark": "{colorBlue900}"
7312
7344
  },
7313
- "colorDropzoneTextActive": {
7314
- "light": "{colorGrey550}",
7315
- "dark": "{colorGrey800}"
7345
+ "colorDropzoneTextDefault": {
7346
+ "light": "{colorGrey600}",
7347
+ "dark": "{colorGrey350}"
7316
7348
  },
7317
7349
  "colorDropzoneTextHover": {
7350
+ "light": "{colorGrey600}",
7351
+ "dark": "{colorGrey350}"
7352
+ },
7353
+ "colorDropzoneBorderDefault": {
7354
+ "light": "{colorGrey500}",
7355
+ "dark": "{colorGrey550}"
7356
+ },
7357
+ "colorDropzoneBorderHover": {
7318
7358
  "light": "{colorBlue800}",
7319
- "dark": "{colorWhite}"
7359
+ "dark": "{colorBlue400}"
7320
7360
  },
7321
7361
  "colorBackgroundSeverityCritical": {
7322
7362
  "light": "{colorChartsStatusCritical}",
@@ -8388,21 +8428,29 @@ export var preset = {
8388
8428
  "light": "{colorBlue200}",
8389
8429
  "dark": "{colorBlue600}"
8390
8430
  },
8391
- "colorDropzoneBackgroundActive": {
8392
- "light": "{colorGrey200}",
8393
- "dark": "{colorGrey500}"
8431
+ "colorDropzoneBackgroundDefault": {
8432
+ "light": "{colorWhite}",
8433
+ "dark": "{colorGrey800}"
8394
8434
  },
8395
8435
  "colorDropzoneBackgroundHover": {
8396
- "light": "{colorBlue200}",
8397
- "dark": "{colorBlue600}"
8436
+ "light": "{colorBlue100}",
8437
+ "dark": "{colorBlue900}"
8398
8438
  },
8399
- "colorDropzoneTextActive": {
8400
- "light": "{colorGrey550}",
8401
- "dark": "{colorGrey800}"
8439
+ "colorDropzoneTextDefault": {
8440
+ "light": "{colorGrey600}",
8441
+ "dark": "{colorGrey350}"
8402
8442
  },
8403
8443
  "colorDropzoneTextHover": {
8444
+ "light": "{colorGrey600}",
8445
+ "dark": "{colorGrey350}"
8446
+ },
8447
+ "colorDropzoneBorderDefault": {
8448
+ "light": "{colorGrey500}",
8449
+ "dark": "{colorGrey550}"
8450
+ },
8451
+ "colorDropzoneBorderHover": {
8404
8452
  "light": "{colorBlue800}",
8405
- "dark": "{colorWhite}"
8453
+ "dark": "{colorBlue400}"
8406
8454
  },
8407
8455
  "colorBackgroundSeverityCritical": {
8408
8456
  "light": "{colorChartsStatusCritical}",
@@ -9476,21 +9524,29 @@ export var preset = {
9476
9524
  "light": "{colorBlue600}",
9477
9525
  "dark": "{colorBlue600}"
9478
9526
  },
9479
- "colorDropzoneBackgroundActive": {
9480
- "light": "{colorGrey500}",
9481
- "dark": "{colorGrey500}"
9527
+ "colorDropzoneBackgroundDefault": {
9528
+ "light": "{colorGrey800}",
9529
+ "dark": "{colorGrey800}"
9482
9530
  },
9483
9531
  "colorDropzoneBackgroundHover": {
9484
- "light": "{colorBlue600}",
9485
- "dark": "{colorBlue600}"
9532
+ "light": "{colorBlue900}",
9533
+ "dark": "{colorBlue900}"
9486
9534
  },
9487
- "colorDropzoneTextActive": {
9488
- "light": "{colorGrey800}",
9489
- "dark": "{colorGrey800}"
9535
+ "colorDropzoneTextDefault": {
9536
+ "light": "{colorGrey350}",
9537
+ "dark": "{colorGrey350}"
9490
9538
  },
9491
9539
  "colorDropzoneTextHover": {
9492
- "light": "{colorWhite}",
9493
- "dark": "{colorWhite}"
9540
+ "light": "{colorGrey350}",
9541
+ "dark": "{colorGrey350}"
9542
+ },
9543
+ "colorDropzoneBorderDefault": {
9544
+ "light": "{colorGrey550}",
9545
+ "dark": "{colorGrey550}"
9546
+ },
9547
+ "colorDropzoneBorderHover": {
9548
+ "light": "{colorBlue400}",
9549
+ "dark": "{colorBlue400}"
9494
9550
  },
9495
9551
  "colorBackgroundSeverityCritical": {
9496
9552
  "light": "{colorChartsStatusCritical}",
@@ -9946,10 +10002,12 @@ export var preset = {
9946
10002
  "colorBoardPlaceholderHover": "color",
9947
10003
  "colorDragPlaceholderActive": "color",
9948
10004
  "colorDragPlaceholderHover": "color",
9949
- "colorDropzoneBackgroundActive": "color",
10005
+ "colorDropzoneBackgroundDefault": "color",
9950
10006
  "colorDropzoneBackgroundHover": "color",
9951
- "colorDropzoneTextActive": "color",
10007
+ "colorDropzoneTextDefault": "color",
9952
10008
  "colorDropzoneTextHover": "color",
10009
+ "colorDropzoneBorderDefault": "color",
10010
+ "colorDropzoneBorderHover": "color",
9953
10011
  "colorBackgroundSeverityCritical": "color",
9954
10012
  "colorTextSeverityCritical": "color",
9955
10013
  "colorBackgroundSeverityHigh": "color",
@@ -11194,10 +11252,12 @@ export var preset = {
11194
11252
  "colorBoardPlaceholderHover": "color-board-placeholder-hover",
11195
11253
  "colorDragPlaceholderActive": "color-drag-placeholder-active",
11196
11254
  "colorDragPlaceholderHover": "color-drag-placeholder-hover",
11197
- "colorDropzoneBackgroundActive": "color-dropzone-background-active",
11255
+ "colorDropzoneBackgroundDefault": "color-dropzone-background-default",
11198
11256
  "colorDropzoneBackgroundHover": "color-dropzone-background-hover",
11199
- "colorDropzoneTextActive": "color-dropzone-text-active",
11257
+ "colorDropzoneTextDefault": "color-dropzone-text-default",
11200
11258
  "colorDropzoneTextHover": "color-dropzone-text-hover",
11259
+ "colorDropzoneBorderDefault": "color-dropzone-border-default",
11260
+ "colorDropzoneBorderHover": "color-dropzone-border-hover",
11201
11261
  "colorBackgroundSeverityCritical": "color-background-severity-critical",
11202
11262
  "colorTextSeverityCritical": "color-text-severity-critical",
11203
11263
  "colorBackgroundSeverityHigh": "color-background-severity-high",
@@ -11927,10 +11987,12 @@ export var preset = {
11927
11987
  "colorBoardPlaceholderHover": "--color-board-placeholder-hover-yu7ixx",
11928
11988
  "colorDragPlaceholderActive": "--color-drag-placeholder-active-llvhbu",
11929
11989
  "colorDragPlaceholderHover": "--color-drag-placeholder-hover-oikifl",
11930
- "colorDropzoneBackgroundActive": "--color-dropzone-background-active-xjesd4",
11931
- "colorDropzoneBackgroundHover": "--color-dropzone-background-hover-elxayo",
11932
- "colorDropzoneTextActive": "--color-dropzone-text-active-pqn4ld",
11933
- "colorDropzoneTextHover": "--color-dropzone-text-hover-xjyyuz",
11990
+ "colorDropzoneBackgroundDefault": "--color-dropzone-background-default-q8kl4f",
11991
+ "colorDropzoneBackgroundHover": "--color-dropzone-background-hover-wl3yez",
11992
+ "colorDropzoneTextDefault": "--color-dropzone-text-default-owo5k2",
11993
+ "colorDropzoneTextHover": "--color-dropzone-text-hover-wteupn",
11994
+ "colorDropzoneBorderDefault": "--color-dropzone-border-default-phwpnt",
11995
+ "colorDropzoneBorderHover": "--color-dropzone-border-hover-tpluhc",
11934
11996
  "colorBackgroundSeverityCritical": "--color-background-severity-critical-idosdq",
11935
11997
  "colorTextSeverityCritical": "--color-text-severity-critical-gtjw4w",
11936
11998
  "colorBackgroundSeverityHigh": "--color-background-severity-high-434xpy",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "774fff474fff263806f1e88861a914c64c579a46"
2
+ "commit": "5343b839ae9443beef2895a930259cfc09a1ff4c"
3
3
  }
@@ -28,7 +28,10 @@ export interface DrawerConfig {
28
28
  unmountContent: (container: HTMLElement) => void;
29
29
  preserveInactiveContent?: boolean;
30
30
  }
31
- export type UpdateDrawerConfig = Pick<DrawerConfig, 'id' | 'badge' | 'resizable' | 'defaultSize'>;
31
+ declare const updatableProperties: readonly ["badge", "resizable", "defaultSize", "orderPriority", "defaultActive", "onResize"];
32
+ export type UpdateDrawerConfig = {
33
+ id: DrawerConfig['id'];
34
+ } & Partial<Pick<DrawerConfig, (typeof updatableProperties)[number]>>;
32
35
  export type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;
33
36
  export type DrawersToggledListener = (drawerId: string) => void;
34
37
  export interface DrawersApiPublic {
@@ -50,7 +53,7 @@ export declare class DrawersController {
50
53
  private drawerClosedListener;
51
54
  scheduleUpdate: () => void;
52
55
  registerDrawer: (config: DrawerConfig) => void;
53
- updateDrawer: (config: UpdateDrawerConfig) => void;
56
+ updateDrawer: ({ id: drawerId, ...rest }: UpdateDrawerConfig) => void;
54
57
  onDrawersRegistered: (listener: DrawersRegistrationListener) => () => void;
55
58
  clearRegisteredDrawers: () => void;
56
59
  onDrawerOpened: (listener: DrawersToggledListener) => () => void;
@@ -60,4 +63,5 @@ export declare class DrawersController {
60
63
  installPublic(api?: Partial<DrawersApiPublic>): DrawersApiPublic;
61
64
  installInternal(internalApi?: Partial<DrawersApiInternal>): DrawersApiInternal;
62
65
  }
66
+ export {};
63
67
  //# sourceMappingURL=drawers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawers.d.ts","sourceRoot":"","sources":["../../../../../src/internal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AAM,UAE5B;IAEF,WAAW,aAAc,MAAM,UAE7B;IAEF,aAAa,CAAC,GAAG,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,gBAAgB;IAQpE,eAAe,CAAC,WAAW,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,kBAAkB;CAOnF"}
@@ -1,6 +1,15 @@
1
+ import { __rest } from "tslib";
1
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
3
  // SPDX-License-Identifier: Apache-2.0
3
4
  import debounce from '../../debounce';
5
+ const updatableProperties = [
6
+ 'badge',
7
+ 'resizable',
8
+ 'defaultSize',
9
+ 'orderPriority',
10
+ 'defaultActive',
11
+ 'onResize',
12
+ ];
4
13
  export class DrawersController {
5
14
  constructor() {
6
15
  this.drawers = [];
@@ -15,30 +24,24 @@ export class DrawersController {
15
24
  this.drawers = this.drawers.concat(config);
16
25
  this.scheduleUpdate();
17
26
  };
18
- this.updateDrawer = (config) => {
19
- var _a;
20
- const { id: drawerId, resizable, badge, defaultSize } = config;
27
+ this.updateDrawer = (_a) => {
28
+ var _b;
29
+ var { id: drawerId } = _a, rest = __rest(_a, ["id"]);
21
30
  const drawerIndex = this.drawers.findIndex(({ id }) => id === drawerId);
22
- const oldDrawerConfig = (_a = this.drawers) === null || _a === void 0 ? void 0 : _a[drawerIndex];
23
- if (drawerIndex >= 0 && oldDrawerConfig) {
24
- const drawers = this.drawers.slice();
25
- const drawerConfig = Object.assign({}, oldDrawerConfig);
26
- if (typeof resizable === 'boolean') {
27
- drawerConfig.resizable = resizable;
28
- }
29
- if (typeof badge === 'boolean') {
30
- drawerConfig.badge = badge;
31
- }
32
- if (typeof defaultSize === 'number') {
33
- drawerConfig.defaultSize = defaultSize;
34
- }
35
- drawers[drawerIndex] = drawerConfig;
36
- this.drawers = drawers;
37
- this.scheduleUpdate();
38
- }
39
- else {
31
+ const oldDrawerConfig = (_b = this.drawers) === null || _b === void 0 ? void 0 : _b[drawerIndex];
32
+ if (!oldDrawerConfig) {
40
33
  throw new Error(`[AwsUi] [runtime drawers] drawer with id ${drawerId} not found`);
41
34
  }
35
+ const drawers = this.drawers.slice();
36
+ const updatedDrawer = Object.assign({}, oldDrawerConfig);
37
+ for (const key of updatableProperties) {
38
+ if (key in rest) {
39
+ updatedDrawer[key] = rest[key];
40
+ }
41
+ }
42
+ drawers[drawerIndex] = updatedDrawer;
43
+ this.drawers = drawers;
44
+ this.scheduleUpdate();
42
45
  };
43
46
  this.onDrawersRegistered = (listener) => {
44
47
  if (this.drawersRegistrationListener !== null) {
@@ -1 +1 @@
1
- {"version":3,"file":"drawers.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/controllers/drawers.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAoDtC,MAAM,OAAO,iBAAiB;IAA9B;QACU,YAAO,GAAwB,EAAE,CAAC;QAClC,gCAA2B,GAAuC,IAAI,CAAC;QACvE,yBAAoB,GAAkC,IAAI,CAAC;QAC3D,yBAAoB,GAAkC,IAAI,CAAC;QAEnE,mBAAc,GAAG,QAAQ,CAAC,GAAG,EAAE;;YAC7B,MAAA,IAAI,CAAC,2BAA2B,qDAAG,IAAI,CAAC,OAAO,CAAC,CAAC;QACnD,CAAC,EAAE,CAAC,CAAC,CAAC;QAEN,mBAAc,GAAG,CAAC,MAAoB,EAAE,EAAE;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3C,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,CAAC,CAAC;QAEF,iBAAY,GAAG,CAAC,MAA0B,EAAE,EAAE;;YAC5C,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;YAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,E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AAK,IAAI,CAAC,WAAW,EAAC;QACrC,OAAO,GAAuB,CAAC;IACjC,CAAC;IAED,eAAe,CAAC,cAA2C,EAAE;;QAC3D,MAAA,WAAW,CAAC,sBAAsB,oCAAlC,WAAW,CAAC,sBAAsB,GAAK,IAAI,CAAC,sBAAsB,EAAC;QACnE,MAAA,WAAW,CAAC,mBAAmB,oCAA/B,WAAW,CAAC,mBAAmB,GAAK,IAAI,CAAC,mBAAmB,EAAC;QAC7D,MAAA,WAAW,CAAC,cAAc,oCAA1B,WAAW,CAAC,cAAc,GAAK,IAAI,CAAC,cAAc,EAAC;QACnD,MAAA,WAAW,CAAC,cAAc,oCAA1B,WAAW,CAAC,cAAc,GAAK,IAAI,CAAC,cAAc,EAAC;QACnD,OAAO,WAAiC,CAAC;IAC3C,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport debounce from '../../debounce';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport type DrawerVisibilityChange = (callback: (isVisible: boolean) => void) => void;\n\nexport interface MountContentContext {\n onVisibilityChange: DrawerVisibilityChange;\n}\n\nexport interface DrawerConfig {\n id: string;\n type?: 'local' | 'global';\n ariaLabels: {\n content?: string;\n closeButton?: string;\n triggerButton?: string;\n resizeHandle?: string;\n };\n badge?: boolean;\n resizable?: boolean;\n defaultSize?: number;\n onResize?: NonCancelableEventHandler<{ size: number; id: string }>;\n orderPriority?: number;\n defaultActive?: boolean;\n trigger?: {\n iconSvg: string;\n };\n mountContent: (container: HTMLElement, mountContext: MountContentContext) => void;\n unmountContent: (container: HTMLElement) => void;\n preserveInactiveContent?: boolean;\n}\n\nexport type UpdateDrawerConfig = Pick<DrawerConfig, 'id' | 'badge' | 'resizable' | 'defaultSize'>;\n\nexport type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\n\nexport type DrawersToggledListener = (drawerId: string) => void;\n\nexport interface DrawersApiPublic {\n registerDrawer(config: DrawerConfig): void;\n updateDrawer(config: UpdateDrawerConfig): void;\n openDrawer(drawerId: string): void;\n closeDrawer(drawerId: string): void;\n}\n\nexport interface DrawersApiInternal {\n clearRegisteredDrawers(): void;\n onDrawersRegistered(listener: DrawersRegistrationListener): () => void;\n onDrawerOpened(listener: DrawersToggledListener): () => void;\n onDrawerClosed(listener: DrawersToggledListener): () => void;\n}\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private drawerOpenedListener: DrawersToggledListener | null = null;\n private drawerClosedListener: DrawersToggledListener | null = null;\n\n scheduleUpdate = debounce(() => {\n this.drawersRegistrationListener?.(this.drawers);\n }, 0);\n\n registerDrawer = (config: DrawerConfig) => {\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n updateDrawer = (config: UpdateDrawerConfig) => {\n const { id: drawerId, resizable, badge, defaultSize } = config;\n const drawerIndex = this.drawers.findIndex(({ id }) => id === drawerId);\n const oldDrawerConfig = this.drawers?.[drawerIndex];\n if (drawerIndex >= 0 && oldDrawerConfig) {\n const drawers = this.drawers.slice();\n const drawerConfig = { ...oldDrawerConfig };\n if (typeof resizable === 'boolean') {\n drawerConfig.resizable = resizable;\n }\n if (typeof badge === 'boolean') {\n drawerConfig.badge = badge;\n }\n if (typeof defaultSize === 'number') {\n drawerConfig.defaultSize = defaultSize;\n }\n\n drawers[drawerIndex] = drawerConfig;\n this.drawers = drawers;\n this.scheduleUpdate();\n } else {\n throw new Error(`[AwsUi] [runtime drawers] drawer with id ${drawerId} not found`);\n }\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n console.warn('[AwsUi] [runtime drawers] multiple app layout instances detected');\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n\n onDrawerOpened = (listener: DrawersToggledListener) => {\n if (this.drawerOpenedListener !== null) {\n console.warn('[AwsUi] [runtime drawers] multiple app layout instances detected');\n }\n\n this.drawerOpenedListener = listener;\n\n return () => {\n this.drawerOpenedListener = null;\n };\n };\n\n onDrawerClosed = (listener: DrawersToggledListener) => {\n if (this.drawerClosedListener !== null) {\n console.warn('[AwsUi] [runtime drawers] multiple app layout instances detected');\n }\n\n this.drawerClosedListener = listener;\n\n return () => {\n this.drawerClosedListener = null;\n };\n };\n\n openDrawer = (drawerId: string) => {\n this.drawerOpenedListener?.(drawerId);\n };\n\n closeDrawer = (drawerId: string) => {\n this.drawerClosedListener?.(drawerId);\n };\n\n installPublic(api: Partial<DrawersApiPublic> = {}): DrawersApiPublic {\n api.registerDrawer ??= this.registerDrawer;\n api.updateDrawer ??= this.updateDrawer;\n api.openDrawer ??= this.openDrawer;\n api.closeDrawer ??= this.closeDrawer;\n return api as DrawersApiPublic;\n }\n\n installInternal(internalApi: Partial<DrawersApiInternal> = {}): DrawersApiInternal {\n internalApi.clearRegisteredDrawers ??= this.clearRegisteredDrawers;\n internalApi.onDrawersRegistered ??= this.onDrawersRegistered;\n internalApi.onDrawerOpened ??= this.onDrawerOpened;\n internalApi.onDrawerClosed ??= this.onDrawerClosed;\n return internalApi as DrawersApiInternal;\n }\n}\n"]}
1
+ {"version":3,"file":"drawers.js","sourceRoot":"","sources":["../../../../../src/internal/plugins/controllers/drawers.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAgCtC,MAAM,mBAAmB,GAAG;IAC1B,OAAO;IACP,WAAW;IACX,aAAa;IACb,eAAe;IACf,eAAe;IACf,UAAU;CACF,CAAC;AAwBX,MAAM,OAAO,iBAAiB;IAA9B;QACU,YAAO,GAAwB,EAAE,CAAC;QAClC,gCAA2B,GAAuC,IAAI,CAAC;QACvE,yBAAoB,GAAkC,IAAI,CAAC;QAC3D,yBAAoB,GAAkC,IAAI,CAAC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AC;IAiBJ,CAAC;IAfC,aAAa,CAAC,MAAiC,EAAE;;QAC/C,MAAA,GAAG,CAAC,cAAc,oCAAlB,GAAG,CAAC,cAAc,GAAK,IAAI,CAAC,cAAc,EAAC;QAC3C,MAAA,GAAG,CAAC,YAAY,oCAAhB,GAAG,CAAC,YAAY,GAAK,IAAI,CAAC,YAAY,EAAC;QACvC,MAAA,GAAG,CAAC,UAAU,oCAAd,GAAG,CAAC,UAAU,GAAK,IAAI,CAAC,UAAU,EAAC;QACnC,MAAA,GAAG,CAAC,WAAW,oCAAf,GAAG,CAAC,WAAW,GAAK,IAAI,CAAC,WAAW,EAAC;QACrC,OAAO,GAAuB,CAAC;IACjC,CAAC;IAED,eAAe,CAAC,cAA2C,EAAE;;QAC3D,MAAA,WAAW,CAAC,sBAAsB,oCAAlC,WAAW,CAAC,sBAAsB,GAAK,IAAI,CAAC,sBAAsB,EAAC;QACnE,MAAA,WAAW,CAAC,mBAAmB,oCAA/B,WAAW,CAAC,mBAAmB,GAAK,IAAI,CAAC,mBAAmB,EAAC;QAC7D,MAAA,WAAW,CAAC,cAAc,oCAA1B,WAAW,CAAC,cAAc,GAAK,IAAI,CAAC,cAAc,EAAC;QACnD,MAAA,WAAW,CAAC,cAAc,oCAA1B,WAAW,CAAC,cAAc,GAAK,IAAI,CAAC,cAAc,EAAC;QACnD,OAAO,WAAiC,CAAC;IAC3C,CAAC;CACF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport debounce from '../../debounce';\nimport { NonCancelableEventHandler } from '../../events';\n\nexport type DrawerVisibilityChange = (callback: (isVisible: boolean) => void) => void;\n\nexport interface MountContentContext {\n onVisibilityChange: DrawerVisibilityChange;\n}\n\nexport interface DrawerConfig {\n id: string;\n type?: 'local' | 'global';\n ariaLabels: {\n content?: string;\n closeButton?: string;\n triggerButton?: string;\n resizeHandle?: string;\n };\n badge?: boolean;\n resizable?: boolean;\n defaultSize?: number;\n onResize?: NonCancelableEventHandler<{ size: number; id: string }>;\n orderPriority?: number;\n defaultActive?: boolean;\n trigger?: {\n iconSvg: string;\n };\n mountContent: (container: HTMLElement, mountContext: MountContentContext) => void;\n unmountContent: (container: HTMLElement) => void;\n preserveInactiveContent?: boolean;\n}\n\nconst updatableProperties = [\n 'badge',\n 'resizable',\n 'defaultSize',\n 'orderPriority',\n 'defaultActive',\n 'onResize',\n] as const;\n\nexport type UpdateDrawerConfig = { id: DrawerConfig['id'] } & Partial<\n Pick<DrawerConfig, (typeof updatableProperties)[number]>\n>;\n\nexport type DrawersRegistrationListener = (drawers: Array<DrawerConfig>) => void;\n\nexport type DrawersToggledListener = (drawerId: string) => void;\n\nexport interface DrawersApiPublic {\n registerDrawer(config: DrawerConfig): void;\n updateDrawer(config: UpdateDrawerConfig): void;\n openDrawer(drawerId: string): void;\n closeDrawer(drawerId: string): void;\n}\n\nexport interface DrawersApiInternal {\n clearRegisteredDrawers(): void;\n onDrawersRegistered(listener: DrawersRegistrationListener): () => void;\n onDrawerOpened(listener: DrawersToggledListener): () => void;\n onDrawerClosed(listener: DrawersToggledListener): () => void;\n}\n\nexport class DrawersController {\n private drawers: Array<DrawerConfig> = [];\n private drawersRegistrationListener: DrawersRegistrationListener | null = null;\n private drawerOpenedListener: DrawersToggledListener | null = null;\n private drawerClosedListener: DrawersToggledListener | null = null;\n\n scheduleUpdate = debounce(() => {\n this.drawersRegistrationListener?.(this.drawers);\n }, 0);\n\n registerDrawer = (config: DrawerConfig) => {\n this.drawers = this.drawers.concat(config);\n this.scheduleUpdate();\n };\n\n updateDrawer = ({ id: drawerId, ...rest }: UpdateDrawerConfig) => {\n const drawerIndex = this.drawers.findIndex(({ id }) => id === drawerId);\n const oldDrawerConfig = this.drawers?.[drawerIndex];\n if (!oldDrawerConfig) {\n throw new Error(`[AwsUi] [runtime drawers] drawer with id ${drawerId} not found`);\n }\n const drawers = this.drawers.slice();\n const updatedDrawer = { ...oldDrawerConfig };\n for (const key of updatableProperties) {\n if (key in rest) {\n updatedDrawer[key] = (rest as any)[key];\n }\n }\n drawers[drawerIndex] = updatedDrawer;\n this.drawers = drawers;\n this.scheduleUpdate();\n };\n\n onDrawersRegistered = (listener: DrawersRegistrationListener) => {\n if (this.drawersRegistrationListener !== null) {\n console.warn('[AwsUi] [runtime drawers] multiple app layout instances detected');\n }\n this.drawersRegistrationListener = listener;\n this.scheduleUpdate();\n return () => {\n this.drawersRegistrationListener = null;\n };\n };\n\n clearRegisteredDrawers = () => {\n this.drawers = [];\n };\n\n onDrawerOpened = (listener: DrawersToggledListener) => {\n if (this.drawerOpenedListener !== null) {\n console.warn('[AwsUi] [runtime drawers] multiple app layout instances detected');\n }\n\n this.drawerOpenedListener = listener;\n\n return () => {\n this.drawerOpenedListener = null;\n };\n };\n\n onDrawerClosed = (listener: DrawersToggledListener) => {\n if (this.drawerClosedListener !== null) {\n console.warn('[AwsUi] [runtime drawers] multiple app layout instances detected');\n }\n\n this.drawerClosedListener = listener;\n\n return () => {\n this.drawerClosedListener = null;\n };\n };\n\n openDrawer = (drawerId: string) => {\n this.drawerOpenedListener?.(drawerId);\n };\n\n closeDrawer = (drawerId: string) => {\n this.drawerClosedListener?.(drawerId);\n };\n\n installPublic(api: Partial<DrawersApiPublic> = {}): DrawersApiPublic {\n api.registerDrawer ??= this.registerDrawer;\n api.updateDrawer ??= this.updateDrawer;\n api.openDrawer ??= this.openDrawer;\n api.closeDrawer ??= this.closeDrawer;\n return api as DrawersApiPublic;\n }\n\n installInternal(internalApi: Partial<DrawersApiInternal> = {}): DrawersApiInternal {\n internalApi.clearRegisteredDrawers ??= this.clearRegisteredDrawers;\n internalApi.onDrawersRegistered ??= this.onDrawersRegistered;\n internalApi.onDrawerOpened ??= this.onDrawerOpened;\n internalApi.onDrawerClosed ??= this.onDrawerClosed;\n return internalApi as DrawersApiInternal;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"format-date-localized.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-localized.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,IAAI,EAAE,OAAO,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,UA4BA"}
1
+ {"version":3,"file":"format-date-localized.d.ts","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-localized.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,IAAI,EAAE,OAAO,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,UAgCA"}
@@ -1,8 +1,13 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ import { isValid, parseISO } from 'date-fns';
3
4
  import { formatTimeOffsetLocalized } from './format-time-offset';
4
5
  export default function formatDateLocalized({ date: isoDate, hideTimeOffset, isDateOnly, timeOffset, locale, }) {
5
- const date = new Date(isoDate);
6
+ let date = parseISO(isoDate);
7
+ // if the date is not ISO formatted, fallback to built-in date parsing
8
+ if (!isValid(date)) {
9
+ date = new Date(isoDate);
10
+ }
6
11
  const formattedDate = new Intl.DateTimeFormat(locale, {
7
12
  day: 'numeric',
8
13
  month: 'long',
@@ -1 +1 @@
1
- {"version":3,"file":"format-date-localized.js","sourceRoot":"","sources":["../../../../../src/internal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AG,CAAC,CAAC,CAAC,IAAI,CAAC;AACnF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { formatTimeOffsetLocalized } from './format-time-offset';\n\nexport default function formatDateLocalized({\n date: isoDate,\n hideTimeOffset,\n isDateOnly,\n timeOffset,\n locale,\n}: {\n date: string;\n hideTimeOffset?: boolean;\n isDateOnly: boolean;\n timeOffset?: number;\n locale?: string;\n}) {\n const date = new Date(isoDate);\n\n const formattedDate = new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n }).format(date);\n\n if (isDateOnly) {\n return formattedDate;\n }\n\n const formattedTime = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n hourCycle: 'h23',\n minute: '2-digit',\n second: '2-digit',\n }).format(date);\n\n const formattedDateTime = formattedDate + getDateTimeSeparator(locale) + formattedTime;\n\n if (hideTimeOffset) {\n return formattedDateTime;\n }\n\n const formattedTimeOffset = formatTimeOffsetLocalized(isoDate, timeOffset);\n return formattedDateTime + ' ' + formattedTimeOffset;\n}\n\n// Languages in which date and time are separated just with a space, without comma\nconst languagesWithoutDateTimeSeparator = ['ja', 'zh-CN', 'zh-TW'];\n\nfunction getDateTimeSeparator(locale?: string) {\n return locale && languagesWithoutDateTimeSeparator.includes(locale) ? ' ' : ', ';\n}\n"]}
1
+ {"version":3,"file":"format-date-localized.js","sourceRoot":"","sources":["../../../../../src/internal/utils/date-time/format-date-localized.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,IAAI,EAAE,OAAO,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,MAAM,GAOP;IACC,IAAI,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seISO } from 'date-fns';\n\nimport { formatTimeOffsetLocalized } from './format-time-offset';\n\nexport default function formatDateLocalized({\n date: isoDate,\n hideTimeOffset,\n isDateOnly,\n timeOffset,\n locale,\n}: {\n date: string;\n hideTimeOffset?: boolean;\n isDateOnly: boolean;\n timeOffset?: number;\n locale?: string;\n}) {\n let date = parseISO(isoDate);\n // if the date is not ISO formatted, fallback to built-in date parsing\n if (!isValid(date)) {\n date = new Date(isoDate);\n }\n\n const formattedDate = new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n }).format(date);\n\n if (isDateOnly) {\n return formattedDate;\n }\n\n const formattedTime = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n hourCycle: 'h23',\n minute: '2-digit',\n second: '2-digit',\n }).format(date);\n\n const formattedDateTime = formattedDate + getDateTimeSeparator(locale) + formattedTime;\n\n if (hideTimeOffset) {\n return formattedDateTime;\n }\n\n const formattedTimeOffset = formatTimeOffsetLocalized(isoDate, timeOffset);\n return formattedDateTime + ' ' + formattedTimeOffset;\n}\n\n// Languages in which date and time are separated just with a space, without comma\nconst languagesWithoutDateTimeSeparator = ['ja', 'zh-CN', 'zh-TW'];\n\nfunction getDateTimeSeparator(locale?: string) {\n return locale && languagesWithoutDateTimeSeparator.includes(locale) ? ' ' : ', ';\n}\n"]}
package/package.json CHANGED
@@ -40,6 +40,9 @@
40
40
  "./date-range-picker": "./date-range-picker/index.js",
41
41
  "./drawer": "./drawer/index.js",
42
42
  "./expandable-section": "./expandable-section/index.js",
43
+ "./file-dropzone": "./file-dropzone/index.js",
44
+ "./file-input": "./file-input/index.js",
45
+ "./file-token-group": "./file-token-group/index.js",
43
46
  "./file-upload": "./file-upload/index.js",
44
47
  "./flashbar": "./flashbar/index.js",
45
48
  "./form": "./form/index.js",
@@ -128,7 +131,7 @@
128
131
  "./internal/base-component/index.js",
129
132
  "./internal/base-component/styles.css.js"
130
133
  ],
131
- "version": "3.0.828",
134
+ "version": "3.0.830",
132
135
  "repository": {
133
136
  "type": "git",
134
137
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,6 +1,7 @@
1
1
  import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-core/dom';
2
2
  import ButtonWrapper from '../button/index.js';
3
3
  import ButtonDropdownWrapper from '../button-dropdown/index.js';
4
+ import ToggleButtonWrapper from '../toggle-button/index.js';
4
5
  export default class ButtonGroupWrapper extends ComponentWrapper {
5
6
  static rootSelector: string;
6
7
  /**
@@ -11,6 +12,10 @@ export default class ButtonGroupWrapper extends ComponentWrapper {
11
12
  * Finds a button item by its id.
12
13
  */
13
14
  findButtonById(id: string): null | ButtonWrapper;
15
+ /**
16
+ * Finds a toggle button item by its id.
17
+ */
18
+ findToggleButtonById(id: string): null | ToggleButtonWrapper;
14
19
  /**
15
20
  * Finds a menu item by its id.
16
21
  */
@@ -6,6 +6,7 @@ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
6
6
  const index_js_1 = require("../button/index.js");
7
7
  const index_js_2 = require("../button-dropdown/index.js");
8
8
  const index_js_3 = require("../index.js");
9
+ const index_js_4 = require("../toggle-button/index.js");
9
10
  const styles_selectors_js_1 = require("../../../button-group/test-classes/styles.selectors.js");
10
11
  class ButtonGroupWrapper extends dom_1.ComponentWrapper {
11
12
  /**
@@ -22,6 +23,14 @@ class ButtonGroupWrapper extends dom_1.ComponentWrapper {
22
23
  const wrapper = this.find(inlineItemSelector);
23
24
  return wrapper && new index_js_1.default(wrapper.getElement());
24
25
  }
26
+ /**
27
+ * Finds a toggle button item by its id.
28
+ */
29
+ findToggleButtonById(id) {
30
+ const inlineItemSelector = `.${styles_selectors_js_1.default['button-group-item']}[data-testid="${id}"]`;
31
+ const wrapper = this.find(inlineItemSelector);
32
+ return wrapper && new index_js_4.default(wrapper.getElement());
33
+ }
25
34
  /**
26
35
  * Finds a menu item by its id.
27
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-group/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAE1F,iDAA+C;AAC/C,0DAAgE;AAChE,0CAAwC;AAExC,gGAAoF;AAEpF,MAAqB,kBAAmB,SAAQ,sBAAgB;IAG9D;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,kBAAkB,CAAC,6BAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,EAAU;QACvB,MAAM,kBAAkB,GAAG,IAAI,6BAAc,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,IAAI,CAAC;QAC1F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAsC,CAAC;QACnF,OAAO,OAAO,IAAI,IAAI,kBAAa,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,EAAU;QACrB,MAAM,kBAAkB,GAAG,IAAI,6BAAc,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,IAAI,CAAC;QAC1F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC9C,OAAO,OAAO,IAAI,IAAI,kBAAqB,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,WAAW;QACT,OAAO,IAAA,kBAAa,GAAE,CAAC,eAAe,CAAC,6BAAc,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACjF,CAAC;;AAjCH,qCAkCC;AAjCQ,+BAAY,GAAW,6BAAc,CAAC,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-group/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAE1F,iDAA+C;AAC/C,0DAAgE;AAChE,0CAAwC;AACxC,wDA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3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  const dom_1 = require("@cloudscape-design/test-utils-core/dom");
6
- const styles_selectors_js_1 = require("../../../internal/components/file-dropzone/styles.selectors.js");
6
+ const styles_selectors_js_1 = require("../../../file-dropzone/styles.selectors.js");
7
7
  class FileDropzoneWrapper extends dom_1.ComponentWrapper {
8
8
  findContent() {
9
9
  return this.findByClassName(styles_selectors_js_1.default.content);
@@ -11,4 +11,4 @@ class FileDropzoneWrapper extends dom_1.ComponentWrapper {
11
11
  }
12
12
  exports.default = FileDropzoneWrapper;
13
13
  FileDropzoneWrapper.rootSelector = styles_selectors_js_1.default.root;
14
- //# sourceMappingURL=file-dropzone.js.map
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/file-dropzone/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAE1F,oFAAgE;AAEhE,MAAqB,mBAAoB,SAAQ,sBAAgB;IAG/D,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;;AALH,sCAMC;AALQ,gCAAY,GAAW,6BAAM,CAAC,IAAI,CAAC"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  const dom_1 = require("@cloudscape-design/test-utils-core/dom");
6
6
  const button_1 = require("../button");
7
- const styles_selectors_js_1 = require("../../../internal/components/file-input/styles.selectors.js");
7
+ const styles_selectors_js_1 = require("../../../file-input/styles.selectors.js");
8
8
  class FileInputWrapper extends dom_1.ComponentWrapper {
9
9
  findTrigger() {
10
10
  return this.findComponent(`.${styles_selectors_js_1.default['file-input-button']}`, button_1.default);
@@ -15,4 +15,4 @@ class FileInputWrapper extends dom_1.ComponentWrapper {
15
15
  }
16
16
  exports.default = FileInputWrapper;
17
17
  FileInputWrapper.rootSelector = styles_selectors_js_1.default.root;
18
- //# sourceMappingURL=file-input.js.map
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/file-input/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAE1F,sCAAsC;AAEtC,iFAAgE;AAEhE,MAAqB,gBAAiB,SAAQ,sBAA6B;IAGzE,WAAW;QACT,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAS,CAAC,mBAAmB,CAAC,EAAE,EAAE,gBAAa,CAAE,CAAC;IAClF,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAS,CAAC,YAAY,CAAC,CAAE,CAAC;IACxD,CAAC;;AATH,mCAUC;AATQ,6BAAY,GAAW,6BAAS,CAAC,IAAI,CAAC"}