@cloudscape-design/components-themeable 3.0.256 → 3.0.258

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 (142) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/button/styles.scss +4 -0
  3. package/lib/internal/scss/file-upload/dropzone/styles.scss +24 -0
  4. package/lib/internal/scss/file-upload/file-input/styles.scss +20 -0
  5. package/lib/internal/scss/file-upload/file-option/styles.scss +34 -0
  6. package/lib/internal/scss/file-upload/styles.scss +15 -0
  7. package/lib/internal/scss/token-group/styles.scss +30 -14
  8. package/lib/internal/template/app-layout/visual-refresh/app-bar.js +1 -1
  9. package/lib/internal/template/app-layout/visual-refresh/app-bar.js.map +1 -1
  10. package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
  11. package/lib/internal/template/autosuggest/internal.js +2 -1
  12. package/lib/internal/template/autosuggest/internal.js.map +1 -1
  13. package/lib/internal/template/autosuggest/options-list.d.ts +2 -1
  14. package/lib/internal/template/autosuggest/options-list.d.ts.map +1 -1
  15. package/lib/internal/template/autosuggest/options-list.js +8 -2
  16. package/lib/internal/template/autosuggest/options-list.js.map +1 -1
  17. package/lib/internal/template/button/internal.d.ts +1 -1
  18. package/lib/internal/template/button/internal.d.ts.map +1 -1
  19. package/lib/internal/template/button/internal.js +3 -2
  20. package/lib/internal/template/button/internal.js.map +1 -1
  21. package/lib/internal/template/button/styles.css.js +20 -19
  22. package/lib/internal/template/button/styles.scoped.css +298 -136
  23. package/lib/internal/template/button/styles.selectors.js +20 -19
  24. package/lib/internal/template/file-upload/default-formatters.d.ts +3 -0
  25. package/lib/internal/template/file-upload/default-formatters.d.ts.map +1 -0
  26. package/lib/internal/template/file-upload/default-formatters.js +23 -0
  27. package/lib/internal/template/file-upload/default-formatters.js.map +1 -0
  28. package/lib/internal/template/file-upload/dropzone/index.d.ts +9 -0
  29. package/lib/internal/template/file-upload/dropzone/index.d.ts.map +1 -0
  30. package/lib/internal/template/file-upload/dropzone/index.js +69 -0
  31. package/lib/internal/template/file-upload/dropzone/index.js.map +1 -0
  32. package/lib/internal/template/file-upload/dropzone/styles.css.js +7 -0
  33. package/lib/internal/template/file-upload/dropzone/styles.scoped.css +108 -0
  34. package/lib/internal/template/file-upload/dropzone/styles.selectors.js +8 -0
  35. package/lib/internal/template/file-upload/file-input/index.d.ts +14 -0
  36. package/lib/internal/template/file-upload/file-input/index.d.ts.map +1 -0
  37. package/lib/internal/template/file-upload/file-input/index.js +55 -0
  38. package/lib/internal/template/file-upload/file-input/index.js.map +1 -0
  39. package/lib/internal/template/file-upload/file-input/styles.css.js +8 -0
  40. package/lib/internal/template/file-upload/file-input/styles.scoped.css +21 -0
  41. package/lib/internal/template/file-upload/file-input/styles.selectors.js +9 -0
  42. package/lib/internal/template/file-upload/file-option/index.d.ts +10 -0
  43. package/lib/internal/template/file-upload/file-option/index.d.ts.map +1 -0
  44. package/lib/internal/template/file-upload/file-option/index.js +22 -0
  45. package/lib/internal/template/file-upload/file-option/index.js.map +1 -0
  46. package/lib/internal/template/file-upload/file-option/styles.css.js +12 -0
  47. package/lib/internal/template/file-upload/file-option/styles.scoped.css +35 -0
  48. package/lib/internal/template/file-upload/file-option/styles.selectors.js +13 -0
  49. package/lib/internal/template/file-upload/file-option/thumbnail.d.ts +7 -0
  50. package/lib/internal/template/file-upload/file-option/thumbnail.d.ts.map +1 -0
  51. package/lib/internal/template/file-upload/file-option/thumbnail.js +20 -0
  52. package/lib/internal/template/file-upload/file-option/thumbnail.js.map +1 -0
  53. package/lib/internal/template/file-upload/index.d.ts +6 -0
  54. package/lib/internal/template/file-upload/index.d.ts.map +1 -0
  55. package/lib/internal/template/file-upload/index.js +17 -0
  56. package/lib/internal/template/file-upload/index.js.map +1 -0
  57. package/lib/internal/template/file-upload/interfaces.d.ts +99 -0
  58. package/lib/internal/template/file-upload/interfaces.d.ts.map +1 -0
  59. package/lib/internal/template/file-upload/interfaces.js +4 -0
  60. package/lib/internal/template/file-upload/interfaces.js.map +1 -0
  61. package/lib/internal/template/file-upload/internal.d.ts +7 -0
  62. package/lib/internal/template/file-upload/internal.d.ts.map +1 -0
  63. package/lib/internal/template/file-upload/internal.js +72 -0
  64. package/lib/internal/template/file-upload/internal.js.map +1 -0
  65. package/lib/internal/template/file-upload/styles.css.js +7 -0
  66. package/lib/internal/template/file-upload/styles.scoped.css +16 -0
  67. package/lib/internal/template/file-upload/styles.selectors.js +8 -0
  68. package/lib/internal/template/form-field/internal.d.ts +6 -1
  69. package/lib/internal/template/form-field/internal.d.ts.map +1 -1
  70. package/lib/internal/template/form-field/internal.js +6 -3
  71. package/lib/internal/template/form-field/internal.js.map +1 -1
  72. package/lib/internal/template/index.d.ts +1 -0
  73. package/lib/internal/template/index.d.ts.map +1 -1
  74. package/lib/internal/template/index.js +1 -0
  75. package/lib/internal/template/index.js.map +1 -1
  76. package/lib/internal/template/internal/base-component/styles.scoped.css +49 -7
  77. package/lib/internal/template/internal/components/dropdown-footer/index.d.ts +1 -0
  78. package/lib/internal/template/internal/components/dropdown-footer/index.d.ts.map +1 -1
  79. package/lib/internal/template/internal/components/dropdown-footer/index.js +2 -2
  80. package/lib/internal/template/internal/components/dropdown-footer/index.js.map +1 -1
  81. package/lib/internal/template/internal/components/live-region/index.d.ts +2 -1
  82. package/lib/internal/template/internal/components/live-region/index.d.ts.map +1 -1
  83. package/lib/internal/template/internal/components/live-region/index.js +2 -2
  84. package/lib/internal/template/internal/components/live-region/index.js.map +1 -1
  85. package/lib/internal/template/internal/components/options-list/index.d.ts +1 -0
  86. package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
  87. package/lib/internal/template/internal/components/options-list/index.js +2 -2
  88. package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
  89. package/lib/internal/template/internal/environment.js +1 -1
  90. package/lib/internal/template/internal/generated/theming/index.cjs +142 -25
  91. package/lib/internal/template/internal/generated/theming/index.js +142 -25
  92. package/lib/internal/template/multiselect/internal.d.ts.map +1 -1
  93. package/lib/internal/template/multiselect/internal.js +4 -3
  94. package/lib/internal/template/multiselect/internal.js.map +1 -1
  95. package/lib/internal/template/package.json +1 -0
  96. package/lib/internal/template/property-filter/index.d.ts.map +1 -1
  97. package/lib/internal/template/property-filter/index.js +1 -1
  98. package/lib/internal/template/property-filter/index.js.map +1 -1
  99. package/lib/internal/template/property-filter/interfaces.d.ts +2 -1
  100. package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
  101. package/lib/internal/template/property-filter/interfaces.js.map +1 -1
  102. package/lib/internal/template/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  103. package/lib/internal/template/property-filter/property-filter-autosuggest.js +4 -2
  104. package/lib/internal/template/property-filter/property-filter-autosuggest.js.map +1 -1
  105. package/lib/internal/template/select/internal.d.ts.map +1 -1
  106. package/lib/internal/template/select/internal.js +4 -3
  107. package/lib/internal/template/select/internal.js.map +1 -1
  108. package/lib/internal/template/split-panel/interfaces.d.ts +8 -8
  109. package/lib/internal/template/split-panel/interfaces.d.ts.map +1 -1
  110. package/lib/internal/template/split-panel/interfaces.js.map +1 -1
  111. package/lib/internal/template/split-panel/preferences-modal.d.ts +7 -7
  112. package/lib/internal/template/split-panel/preferences-modal.d.ts.map +1 -1
  113. package/lib/internal/template/split-panel/preferences-modal.js.map +1 -1
  114. package/lib/internal/template/table/body-cell/index.js +1 -1
  115. package/lib/internal/template/table/body-cell/index.js.map +1 -1
  116. package/lib/internal/template/test-utils/dom/file-upload/index.d.ts +29 -0
  117. package/lib/internal/template/test-utils/dom/file-upload/index.js +66 -0
  118. package/lib/internal/template/test-utils/dom/file-upload/index.js.map +1 -0
  119. package/lib/internal/template/test-utils/dom/index.d.ts +3 -0
  120. package/lib/internal/template/test-utils/dom/index.js +10 -2
  121. package/lib/internal/template/test-utils/dom/index.js.map +1 -1
  122. package/lib/internal/template/test-utils/selectors/file-upload/index.d.ts +29 -0
  123. package/lib/internal/template/test-utils/selectors/file-upload/index.js +66 -0
  124. package/lib/internal/template/test-utils/selectors/file-upload/index.js.map +1 -0
  125. package/lib/internal/template/test-utils/selectors/index.d.ts +3 -0
  126. package/lib/internal/template/test-utils/selectors/index.js +10 -2
  127. package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
  128. package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
  129. package/lib/internal/template/theming/index.d.ts +2 -1
  130. package/lib/internal/template/theming/index.d.ts.map +1 -1
  131. package/lib/internal/template/theming/index.js +2 -1
  132. package/lib/internal/template/theming/index.js.map +1 -1
  133. package/lib/internal/template/token-group/styles.css.js +7 -5
  134. package/lib/internal/template/token-group/styles.scoped.css +41 -23
  135. package/lib/internal/template/token-group/styles.selectors.js +7 -5
  136. package/lib/internal/template/token-group/token.d.ts +4 -1
  137. package/lib/internal/template/token-group/token.d.ts.map +1 -1
  138. package/lib/internal/template/token-group/token.js +13 -4
  139. package/lib/internal/template/token-group/token.js.map +1 -1
  140. package/lib/theming/index.d.ts +2 -1
  141. package/lib/theming/index.js +2 -1
  142. package/package.json +1 -1
@@ -359,6 +359,10 @@
359
359
  --color-board-placeholder-hover-82yrwq:#99cbe4;
360
360
  --color-drag-placeholder-active-465bif:#d5dbdb;
361
361
  --color-drag-placeholder-hover-brp0p3:#99cbe4;
362
+ --color-dropzone-background-active-4uyrv4:#d5dbdb;
363
+ --color-dropzone-background-hover-ekwhes:#99cbe4;
364
+ --color-dropzone-text-active-se5py5:#545b64;
365
+ --color-dropzone-text-hover-8nw8ve:#12293b;
362
366
  --font-body-m-line-height-i7xxvv:22px;
363
367
  --font-body-m-size-sregvd:14px;
364
368
  --font-body-s-letter-spacing-p88gax:normal;
@@ -436,6 +440,7 @@
436
440
  --border-radius-control-circular-focus-ring-l88ib6:50%;
437
441
  --border-radius-control-default-focus-ring-hekmgc:2px;
438
442
  --border-radius-dropdown-0c284d:0px;
443
+ --border-radius-dropzone-qwe2cs:0px;
439
444
  --border-radius-flashbar-hhymq3:0px;
440
445
  --border-radius-item-wjpc1f:0px;
441
446
  --border-radius-input-fterib:2px;
@@ -913,6 +918,10 @@
913
918
  --color-board-placeholder-hover-82yrwq:#0073bb;
914
919
  --color-drag-placeholder-active-465bif:#687078;
915
920
  --color-drag-placeholder-hover-brp0p3:#0073bb;
921
+ --color-dropzone-background-active-4uyrv4:#687078;
922
+ --color-dropzone-background-hover-ekwhes:#0073bb;
923
+ --color-dropzone-text-active-se5py5:#16191f;
924
+ --color-dropzone-text-hover-8nw8ve:#ffffff;
916
925
  --shadow-container-0bkp96:0 1px 1px 0 rgba(0, 0, 0, 0.3), 1px 1px 1px 0 rgba(0, 0, 0, 0.3), -1px 1px 1px 0 rgba(0, 0, 0, 0.3);
917
926
  --shadow-container-stacked-j8j87i:0 1px 1px 0 rgba(0, 0, 0, 0.3), 1px 1px 1px 0 rgba(0, 0, 0, 0.3), -1px 1px 1px 0 rgba(0, 0, 0, 0.3);
918
927
  --shadow-dropdown-lzmmvx:0 1px 1px 0 rgba(0, 0, 0, 0.3), 1px 1px 1px 0 rgba(0, 0, 0, 0.3), -1px 1px 1px 0 rgba(0, 0, 0, 0.3);
@@ -1179,6 +1188,10 @@
1179
1188
  --color-board-placeholder-hover-82yrwq:#0073bb;
1180
1189
  --color-drag-placeholder-active-465bif:#687078;
1181
1190
  --color-drag-placeholder-hover-brp0p3:#0073bb;
1191
+ --color-dropzone-background-active-4uyrv4:#687078;
1192
+ --color-dropzone-background-hover-ekwhes:#0073bb;
1193
+ --color-dropzone-text-active-se5py5:#16191f;
1194
+ --color-dropzone-text-hover-8nw8ve:#ffffff;
1182
1195
  }
1183
1196
 
1184
1197
  .awsui-context-flashbar:not(#\9) {
@@ -1262,7 +1275,7 @@
1262
1275
  --color-border-control-checked-9uv01j:#0972d3;
1263
1276
  --color-border-control-default-bwkbmv:#7d8998;
1264
1277
  --color-border-control-disabled-zgidl5:#d1d5db;
1265
- --color-border-divider-active-22zon0:#7d8998;
1278
+ --color-border-divider-active-22zon0:#000716;
1266
1279
  --color-border-divider-default-k96bks:#e9ebed;
1267
1280
  --color-border-divider-panel-bottom-x6jr6g:#e9ebed;
1268
1281
  --color-border-divider-panel-side-hxw8vd:#e9ebed;
@@ -1287,7 +1300,7 @@
1287
1300
  --color-border-status-info-0iedcr:#0972d3;
1288
1301
  --color-border-status-success-lb896w:#037f0c;
1289
1302
  --color-border-status-warning-2otrg9:#7d8998;
1290
- --color-border-divider-interactive-default-mrpwro:#e9ebed;
1303
+ --color-border-divider-interactive-default-mrpwro:#414d5c;
1291
1304
  --color-border-tabs-divider-lf9ugx:#e9ebed;
1292
1305
  --color-border-tabs-shadow-22eyu5:rgba(0, 7, 22, 0.12);
1293
1306
  --color-border-tabs-underline-ba6hzi:#0972d3;
@@ -1373,6 +1386,10 @@
1373
1386
  --color-board-placeholder-hover-82yrwq:#d3e7f9;
1374
1387
  --color-drag-placeholder-active-465bif:#e9ebed;
1375
1388
  --color-drag-placeholder-hover-brp0p3:#d3e7f9;
1389
+ --color-dropzone-background-active-4uyrv4:#e9ebed;
1390
+ --color-dropzone-background-hover-ekwhes:#d3e7f9;
1391
+ --color-dropzone-text-active-se5py5:#5f6b7a;
1392
+ --color-dropzone-text-hover-8nw8ve:#033160;
1376
1393
  --font-body-s-letter-spacing-p88gax:0.005em;
1377
1394
  --font-button-letter-spacing-9fsbgj:0.005em;
1378
1395
  --font-button-weight-of7qcx:800;
@@ -1440,6 +1457,7 @@
1440
1457
  --border-radius-control-circular-focus-ring-l88ib6:4px;
1441
1458
  --border-radius-control-default-focus-ring-hekmgc:4px;
1442
1459
  --border-radius-dropdown-0c284d:8px;
1460
+ --border-radius-dropzone-qwe2cs:12px;
1443
1461
  --border-radius-flashbar-hhymq3:12px;
1444
1462
  --border-radius-item-wjpc1f:8px;
1445
1463
  --border-radius-input-fterib:8px;
@@ -1592,6 +1610,7 @@
1592
1610
  --color-border-code-editor-pane-item-hover-ibrahi:#5f6b7a;
1593
1611
  --color-border-control-checked-9uv01j:#539fe5;
1594
1612
  --color-border-control-disabled-zgidl5:#354150;
1613
+ --color-border-divider-active-22zon0:#fbfbfb;
1595
1614
  --color-border-divider-default-k96bks:#414d5c;
1596
1615
  --color-border-divider-panel-bottom-x6jr6g:rgba(0, 7, 22, 1);
1597
1616
  --color-border-divider-panel-side-hxw8vd:#414d5c;
@@ -1614,7 +1633,7 @@
1614
1633
  --color-border-status-info-0iedcr:#539fe5;
1615
1634
  --color-border-status-success-lb896w:#29ad32;
1616
1635
  --color-border-status-warning-2otrg9:#8d99a8;
1617
- --color-border-divider-interactive-default-mrpwro:#414d5c;
1636
+ --color-border-divider-interactive-default-mrpwro:#d1d5db;
1618
1637
  --color-border-tabs-divider-lf9ugx:#414d5c;
1619
1638
  --color-border-tabs-shadow-22eyu5:rgba(0, 7, 22, 1);
1620
1639
  --color-border-tabs-underline-ba6hzi:#539fe5;
@@ -1705,6 +1724,10 @@
1705
1724
  --color-board-placeholder-hover-82yrwq:#0972d3;
1706
1725
  --color-drag-placeholder-active-465bif:#5f6b7a;
1707
1726
  --color-drag-placeholder-hover-brp0p3:#0972d3;
1727
+ --color-dropzone-background-active-4uyrv4:#7d8998;
1728
+ --color-dropzone-background-hover-ekwhes:#0972d3;
1729
+ --color-dropzone-text-active-se5py5:#0f1b2a;
1730
+ --color-dropzone-text-hover-8nw8ve:#ffffff;
1708
1731
  --shadow-container-0bkp96:0px 1px 8px 2px rgba(0, 7, 22, 0.6);
1709
1732
  --shadow-container-stacked-j8j87i:0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%);
1710
1733
  --shadow-container-active-h4jsj2:0px 1px 1px 1px #192534, 0px 6px 36px #000716;
@@ -1843,6 +1866,7 @@
1843
1866
  --color-border-container-top-1itxac:transparent;
1844
1867
  --color-border-control-checked-9uv01j:#539fe5;
1845
1868
  --color-border-control-disabled-zgidl5:#354150;
1869
+ --color-border-divider-active-22zon0:#fbfbfb;
1846
1870
  --color-border-divider-default-k96bks:#414d5c;
1847
1871
  --color-border-divider-panel-bottom-x6jr6g:rgba(0, 7, 22, 1);
1848
1872
  --color-border-divider-panel-side-hxw8vd:#414d5c;
@@ -1866,7 +1890,7 @@
1866
1890
  --color-border-status-info-0iedcr:#539fe5;
1867
1891
  --color-border-status-success-lb896w:#29ad32;
1868
1892
  --color-border-status-warning-2otrg9:#8d99a8;
1869
- --color-border-divider-interactive-default-mrpwro:#414d5c;
1893
+ --color-border-divider-interactive-default-mrpwro:#d1d5db;
1870
1894
  --color-border-tabs-divider-lf9ugx:#414d5c;
1871
1895
  --color-border-tabs-shadow-22eyu5:rgba(0, 7, 22, 1);
1872
1896
  --color-border-tabs-underline-ba6hzi:#539fe5;
@@ -1956,6 +1980,9 @@
1956
1980
  --color-board-placeholder-hover-82yrwq:#0972d3;
1957
1981
  --color-drag-placeholder-active-465bif:#5f6b7a;
1958
1982
  --color-drag-placeholder-hover-brp0p3:#0972d3;
1983
+ --color-dropzone-background-active-4uyrv4:#7d8998;
1984
+ --color-dropzone-background-hover-ekwhes:#0972d3;
1985
+ --color-dropzone-text-active-se5py5:#0f1b2a;
1959
1986
  }
1960
1987
 
1961
1988
  .awsui-context-top-navigation.awsui-visual-refresh:not(#\9) {
@@ -2023,6 +2050,7 @@
2023
2050
  --color-border-code-editor-pane-item-hover-ibrahi:#5f6b7a;
2024
2051
  --color-border-control-checked-9uv01j:#539fe5;
2025
2052
  --color-border-control-disabled-zgidl5:#354150;
2053
+ --color-border-divider-active-22zon0:#fbfbfb;
2026
2054
  --color-border-divider-default-k96bks:#414d5c;
2027
2055
  --color-border-divider-panel-bottom-x6jr6g:rgba(0, 7, 22, 1);
2028
2056
  --color-border-divider-panel-side-hxw8vd:#414d5c;
@@ -2045,7 +2073,7 @@
2045
2073
  --color-border-status-info-0iedcr:#539fe5;
2046
2074
  --color-border-status-success-lb896w:#29ad32;
2047
2075
  --color-border-status-warning-2otrg9:#8d99a8;
2048
- --color-border-divider-interactive-default-mrpwro:#414d5c;
2076
+ --color-border-divider-interactive-default-mrpwro:#d1d5db;
2049
2077
  --color-border-tabs-divider-lf9ugx:#414d5c;
2050
2078
  --color-border-tabs-shadow-22eyu5:rgba(0, 7, 22, 1);
2051
2079
  --color-border-tabs-underline-ba6hzi:#539fe5;
@@ -2136,6 +2164,10 @@
2136
2164
  --color-board-placeholder-hover-82yrwq:#0972d3;
2137
2165
  --color-drag-placeholder-active-465bif:#5f6b7a;
2138
2166
  --color-drag-placeholder-hover-brp0p3:#0972d3;
2167
+ --color-dropzone-background-active-4uyrv4:#7d8998;
2168
+ --color-dropzone-background-hover-ekwhes:#0972d3;
2169
+ --color-dropzone-text-active-se5py5:#0f1b2a;
2170
+ --color-dropzone-text-hover-8nw8ve:#ffffff;
2139
2171
  }
2140
2172
 
2141
2173
  .awsui-visual-refresh .awsui-context-content-header:not(#\9) {
@@ -2203,6 +2235,7 @@
2203
2235
  --color-border-code-editor-pane-item-hover-ibrahi:#5f6b7a;
2204
2236
  --color-border-control-checked-9uv01j:#539fe5;
2205
2237
  --color-border-control-disabled-zgidl5:#354150;
2238
+ --color-border-divider-active-22zon0:#fbfbfb;
2206
2239
  --color-border-divider-default-k96bks:#414d5c;
2207
2240
  --color-border-divider-panel-bottom-x6jr6g:rgba(0, 7, 22, 1);
2208
2241
  --color-border-divider-panel-side-hxw8vd:#414d5c;
@@ -2225,7 +2258,7 @@
2225
2258
  --color-border-status-info-0iedcr:#539fe5;
2226
2259
  --color-border-status-success-lb896w:#29ad32;
2227
2260
  --color-border-status-warning-2otrg9:#8d99a8;
2228
- --color-border-divider-interactive-default-mrpwro:#414d5c;
2261
+ --color-border-divider-interactive-default-mrpwro:#d1d5db;
2229
2262
  --color-border-tabs-divider-lf9ugx:#414d5c;
2230
2263
  --color-border-tabs-shadow-22eyu5:rgba(0, 7, 22, 1);
2231
2264
  --color-border-tabs-underline-ba6hzi:#539fe5;
@@ -2315,6 +2348,10 @@
2315
2348
  --color-board-placeholder-hover-82yrwq:#0972d3;
2316
2349
  --color-drag-placeholder-active-465bif:#5f6b7a;
2317
2350
  --color-drag-placeholder-hover-brp0p3:#0972d3;
2351
+ --color-dropzone-background-active-4uyrv4:#7d8998;
2352
+ --color-dropzone-background-hover-ekwhes:#0972d3;
2353
+ --color-dropzone-text-active-se5py5:#0f1b2a;
2354
+ --color-dropzone-text-hover-8nw8ve:#ffffff;
2318
2355
  --shadow-container-0bkp96:none;
2319
2356
  --shadow-container-stacked-j8j87i:0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%);
2320
2357
  --shadow-container-active-h4jsj2:0px 1px 1px 1px #192534, 0px 6px 36px #000716;
@@ -2393,6 +2430,7 @@
2393
2430
  --color-border-code-editor-pane-item-hover-ibrahi:#5f6b7a;
2394
2431
  --color-border-control-checked-9uv01j:#539fe5;
2395
2432
  --color-border-control-disabled-zgidl5:#354150;
2433
+ --color-border-divider-active-22zon0:#fbfbfb;
2396
2434
  --color-border-divider-default-k96bks:#414d5c;
2397
2435
  --color-border-divider-panel-bottom-x6jr6g:rgba(0, 7, 22, 1);
2398
2436
  --color-border-divider-panel-side-hxw8vd:#414d5c;
@@ -2415,7 +2453,7 @@
2415
2453
  --color-border-status-info-0iedcr:#539fe5;
2416
2454
  --color-border-status-success-lb896w:#29ad32;
2417
2455
  --color-border-status-warning-2otrg9:#8d99a8;
2418
- --color-border-divider-interactive-default-mrpwro:#414d5c;
2456
+ --color-border-divider-interactive-default-mrpwro:#d1d5db;
2419
2457
  --color-border-tabs-divider-lf9ugx:#414d5c;
2420
2458
  --color-border-tabs-shadow-22eyu5:rgba(0, 7, 22, 1);
2421
2459
  --color-border-tabs-underline-ba6hzi:#539fe5;
@@ -2505,6 +2543,10 @@
2505
2543
  --color-board-placeholder-hover-82yrwq:#0972d3;
2506
2544
  --color-drag-placeholder-active-465bif:#5f6b7a;
2507
2545
  --color-drag-placeholder-hover-brp0p3:#0972d3;
2546
+ --color-dropzone-background-active-4uyrv4:#7d8998;
2547
+ --color-dropzone-background-hover-ekwhes:#0972d3;
2548
+ --color-dropzone-text-active-se5py5:#0f1b2a;
2549
+ --color-dropzone-text-hover-8nw8ve:#ffffff;
2508
2550
  --shadow-container-0bkp96:none;
2509
2551
  --shadow-container-stacked-j8j87i:0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%);
2510
2552
  --shadow-container-active-h4jsj2:0px 1px 1px 1px #192534, 0px 6px 36px #000716;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface DropdownFooter {
3
3
  content?: React.ReactNode | null;
4
4
  hasItems?: boolean;
5
+ id?: string;
5
6
  }
6
7
  declare const DropdownFooter: React.FC<DropdownFooter>;
7
8
  export default DropdownFooter;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAM5C,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAM5C,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -5,7 +5,7 @@ import clsx from 'clsx';
5
5
  import styles from './styles.css.js';
6
6
  import DropdownStatus from '../dropdown-status/index.js';
7
7
  import LiveRegion from '../live-region/index.js';
8
- const DropdownFooter = ({ content, hasItems = true }) => (React.createElement("div", { className: clsx(styles.root, { [styles.hidden]: content === null, [styles['no-items']]: !hasItems }) },
9
- React.createElement(LiveRegion, { visible: true, tagName: "div" }, content && React.createElement(DropdownStatus, null, content))));
8
+ const DropdownFooter = ({ content, id, hasItems = true }) => (React.createElement("div", { className: clsx(styles.root, { [styles.hidden]: content === null, [styles['no-items']]: !hasItems }) },
9
+ React.createElement(LiveRegion, { visible: true, tagName: "div", id: id }, content && React.createElement(DropdownStatus, null, content))));
10
10
  export default DropdownFooter;
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAOjD,MAAM,cAAc,GAA6B,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,EAAkB,EAAE,EAAE,CAAC,CACjG,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;IACvG,oBAAC,UAAU,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,KAAK,IACrC,OAAO,IAAI,oBAAC,cAAc,QAAE,OAAO,CAAkB,CAC3C,CACT,CACP,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport DropdownStatus from '../dropdown-status/index.js';\nimport LiveRegion from '../live-region/index.js';\n\ninterface DropdownFooter {\n content?: React.ReactNode | null;\n hasItems?: boolean;\n}\n\nconst DropdownFooter: React.FC<DropdownFooter> = ({ content, hasItems = true }: DropdownFooter) => (\n <div className={clsx(styles.root, { [styles.hidden]: content === null, [styles['no-items']]: !hasItems })}>\n <LiveRegion visible={true} tagName=\"div\">\n {content && <DropdownStatus>{content}</DropdownStatus>}\n </LiveRegion>\n </div>\n);\n\nexport default DropdownFooter;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/dropdown-footer/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAQjD,MAAM,cAAc,GAA6B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAkB,EAAE,EAAE,CAAC,CACrG,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;IACvG,oBAAC,UAAU,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,KAAK,EAAC,EAAE,EAAE,EAAE,IAC5C,OAAO,IAAI,oBAAC,cAAc,QAAE,OAAO,CAAkB,CAC3C,CACT,CACP,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.css.js';\nimport DropdownStatus from '../dropdown-status/index.js';\nimport LiveRegion from '../live-region/index.js';\n\ninterface DropdownFooter {\n content?: React.ReactNode | null;\n hasItems?: boolean;\n id?: string;\n}\n\nconst DropdownFooter: React.FC<DropdownFooter> = ({ content, id, hasItems = true }: DropdownFooter) => (\n <div className={clsx(styles.root, { [styles.hidden]: content === null, [styles['no-items']]: !hasItems })}>\n <LiveRegion visible={true} tagName=\"div\" id={id}>\n {content && <DropdownStatus>{content}</DropdownStatus>}\n </LiveRegion>\n </div>\n);\n\nexport default DropdownFooter;\n"]}
@@ -6,6 +6,7 @@ export interface LiveRegionProps extends ScreenreaderOnlyProps {
6
6
  visible?: boolean;
7
7
  tagName?: 'span' | 'div';
8
8
  children: React.ReactNode;
9
+ id?: string;
9
10
  }
10
11
  /**
11
12
  * The live region is hidden in the layout, but visible for screen readers.
@@ -42,5 +43,5 @@ export interface LiveRegionProps extends ScreenreaderOnlyProps {
42
43
  */
43
44
  declare const _default: React.MemoExoticComponent<typeof LiveRegion>;
44
45
  export default _default;
45
- declare function LiveRegion({ assertive, delay, visible, tagName: TagName, children, ...restProps }: LiveRegionProps): JSX.Element;
46
+ declare function LiveRegion({ assertive, delay, visible, tagName: TagName, children, id, ...restProps }: LiveRegionProps): JSX.Element;
46
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/live-region/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;AACH,wBAAgC;AAEhC,iBAAS,UAAU,CAAC,EAClB,SAAiB,EACjB,KAAU,EACV,OAAe,EACf,OAAO,EAAE,OAAgB,EACzB,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,eAAe,eA0DjB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/live-region/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;AACH,wBAAgC;AAEhC,iBAAS,UAAU,CAAC,EAClB,SAAiB,EACjB,KAAU,EACV,OAAe,EACf,OAAO,EAAE,OAAgB,EACzB,QAAQ,EACR,EAAE,EACF,GAAG,SAAS,EACb,EAAE,eAAe,eA8DjB"}
@@ -41,7 +41,7 @@ import styles from './styles.css.js';
41
41
  */
42
42
  export default memo(LiveRegion);
43
43
  function LiveRegion(_a) {
44
- var { assertive = false, delay = 10, visible = false, tagName: TagName = 'span', children } = _a, restProps = __rest(_a, ["assertive", "delay", "visible", "tagName", "children"]);
44
+ var { assertive = false, delay = 10, visible = false, tagName: TagName = 'span', children, id } = _a, restProps = __rest(_a, ["assertive", "delay", "visible", "tagName", "children", "id"]);
45
45
  const sourceRef = useRef(null);
46
46
  const targetRef = useRef(null);
47
47
  /*
@@ -82,7 +82,7 @@ function LiveRegion(_a) {
82
82
  };
83
83
  });
84
84
  return (React.createElement(React.Fragment, null,
85
- visible && React.createElement(TagName, { ref: sourceRef }, children),
85
+ visible && (React.createElement(TagName, { ref: sourceRef, id: id }, children)),
86
86
  React.createElement(ScreenreaderOnly, Object.assign({}, restProps, { className: clsx(styles.root, restProps.className) }),
87
87
  !visible && (React.createElement(TagName, { ref: sourceRef, "aria-hidden": "true" }, children)),
88
88
  React.createElement("span", { ref: targetRef, "aria-atomic": "true", "aria-live": assertive ? 'assertive' : 'polite' }))));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/live-region/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,0DAA0D;AAE1D,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,gBAA2C,MAAM,sBAAsB,CAAC;AAC/E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAUrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC;AAEhC,SAAS,UAAU,CAAC,EAOF;QAPE,EAClB,SAAS,GAAG,KAAK,EACjB,KAAK,GAAG,EAAE,EACV,OAAO,GAAG,KAAK,EACf,OAAO,EAAE,OAAO,GAAG,MAAM,EACzB,QAAQ,OAEQ,EADb,SAAS,cANM,wDAOnB,CADa;IAEZ,MAAM,SAAS,GAAG,MAAM,CAAmC,IAAI,CAAC,CAAC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AC;AAED,oGAAoG;AACpG,oGAAoG;AACpG,0FAA0F;AAC1F,SAAS,gBAAgB,CAAC,IAAiB;IACzC,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @cloudscape-design/prefer-live-region */\n\nimport clsx from 'clsx';\nimport React, { memo, useEffect, useRef } from 'react';\nimport ScreenreaderOnly, { ScreenreaderOnlyProps } from '../screenreader-only';\nimport styles from './styles.css.js';\n\nexport interface LiveRegionProps extends ScreenreaderOnlyProps {\n assertive?: boolean;\n delay?: number;\n visible?: boolean;\n tagName?: 'span' | 'div';\n children: React.ReactNode;\n}\n\n/**\n * The live region is hidden in the layout, but visible for screen readers.\n * It's purpose it to announce changes e.g. when custom navigation logic is used.\n *\n * The way live region works differently in different browsers and screen readers and\n * it is recommended to manually test every new implementation.\n *\n * If you notice there are different words being merged together,\n * check if there are text nodes not being wrapped in elements, like:\n * <LiveRegion>\n * {title}\n * <span><Details /></span>\n * </LiveRegion>\n *\n * To fix, wrap \"title\" in an element:\n * <LiveRegion>\n * <span>{title}</span>\n * <span><Details /></span>\n * </LiveRegion>\n *\n * Or create a single text node if possible:\n * <LiveRegion>\n * {`${title} ${details}`}\n * </LiveRegion>\n *\n * The live region is always atomic, because non-atomic regions can be treated by screen readers\n * differently and produce unexpected results. To imitate non-atomic announcements simply use\n * multiple live regions:\n * <>\n * <LiveRegion>{title}</LiveRegion>\n * <LiveRegion><Details /></LiveRegion>\n * </>\n */\nexport default memo(LiveRegion);\n\nfunction LiveRegion({\n assertive = false,\n delay = 10,\n visible = false,\n tagName: TagName = 'span',\n children,\n ...restProps\n}: LiveRegionProps) {\n const sourceRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n const targetRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n\n /*\n When React state changes, React often produces too many DOM updates, causing NVDA to\n issue many announcements for the same logical event (See https://github.com/nvaccess/nvda/issues/7996).\n\n The code below imitates a debouncing, scheduling a callback every time new React state\n update is detected. When a callback resolves, it copies content from a muted element\n to the live region, which is recognized by screen readers as an update.\n\n If the use case requires no announcement to be ignored, use delay = 0, but ensure it\n does not impact the performance. If it does, prefer using a string as children prop.\n */\n useEffect(() => {\n function updateLiveRegion() {\n if (targetRef.current && sourceRef.current) {\n const sourceContent = extractInnerText(sourceRef.current);\n const targetContent = extractInnerText(targetRef.current);\n if (targetContent !== sourceContent) {\n // The aria-atomic does not work properly in Voice Over, causing\n // certain parts of the content to be ignored. To fix that,\n // we assign the source text content as a single node.\n targetRef.current.innerText = sourceContent;\n }\n }\n }\n\n let timeoutId: null | number;\n if (delay) {\n timeoutId = setTimeout(updateLiveRegion, delay);\n } else {\n updateLiveRegion();\n }\n\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n });\n\n return (\n <>\n {visible && <TagName ref={sourceRef}>{children}</TagName>}\n\n <ScreenreaderOnly {...restProps} className={clsx(styles.root, restProps.className)}>\n {!visible && (\n <TagName ref={sourceRef} aria-hidden=\"true\">\n {children}\n </TagName>\n )}\n\n <span ref={targetRef} aria-atomic=\"true\" aria-live={assertive ? 'assertive' : 'polite'}></span>\n </ScreenreaderOnly>\n </>\n );\n}\n\n// This only extracts text content from the node including all its children which is enough for now.\n// To make it more powerful, it is possible to create a more sophisticated extractor with respect to\n// ARIA properties to ignore aria-hidden nodes and read ARIA labels from the live content.\nfunction extractInnerText(node: HTMLElement) {\n return (node.innerText || '').replace(/\\s+/g, ' ').trim();\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/live-region/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,0DAA0D;AAE1D,OAAO,IAAI,MAAM,MAAM,CAAC;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AS,CAAC,CAAC;aACzB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACL;QACG,OAAO,IAAI,CACV,oBAAC,OAAO,IAAC,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,IAC5B,QAAQ,CACD,CACX;QAED,oBAAC,gBAAgB,oBAAK,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC;YAC/E,CAAC,OAAO,IAAI,CACX,oBAAC,OAAO,IAAC,GAAG,EAAE,SAAS,iBAAc,MAAM,IACxC,QAAQ,CACD,CACX;YAED,8BAAM,GAAG,EAAE,SAAS,iBAAc,MAAM,eAAY,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,GAAS,CAC9E,CAClB,CACJ,CAAC;AACJ,CAAC;AAED,oGAAoG;AACpG,oGAAoG;AACpG,0FAA0F;AAC1F,SAAS,gBAAgB,CAAC,IAAiB;IACzC,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable @cloudscape-design/prefer-live-region */\n\nimport clsx from 'clsx';\nimport React, { memo, useEffect, useRef } from 'react';\nimport ScreenreaderOnly, { ScreenreaderOnlyProps } from '../screenreader-only';\nimport styles from './styles.css.js';\n\nexport interface LiveRegionProps extends ScreenreaderOnlyProps {\n assertive?: boolean;\n delay?: number;\n visible?: boolean;\n tagName?: 'span' | 'div';\n children: React.ReactNode;\n id?: string;\n}\n\n/**\n * The live region is hidden in the layout, but visible for screen readers.\n * It's purpose it to announce changes e.g. when custom navigation logic is used.\n *\n * The way live region works differently in different browsers and screen readers and\n * it is recommended to manually test every new implementation.\n *\n * If you notice there are different words being merged together,\n * check if there are text nodes not being wrapped in elements, like:\n * <LiveRegion>\n * {title}\n * <span><Details /></span>\n * </LiveRegion>\n *\n * To fix, wrap \"title\" in an element:\n * <LiveRegion>\n * <span>{title}</span>\n * <span><Details /></span>\n * </LiveRegion>\n *\n * Or create a single text node if possible:\n * <LiveRegion>\n * {`${title} ${details}`}\n * </LiveRegion>\n *\n * The live region is always atomic, because non-atomic regions can be treated by screen readers\n * differently and produce unexpected results. To imitate non-atomic announcements simply use\n * multiple live regions:\n * <>\n * <LiveRegion>{title}</LiveRegion>\n * <LiveRegion><Details /></LiveRegion>\n * </>\n */\nexport default memo(LiveRegion);\n\nfunction LiveRegion({\n assertive = false,\n delay = 10,\n visible = false,\n tagName: TagName = 'span',\n children,\n id,\n ...restProps\n}: LiveRegionProps) {\n const sourceRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n const targetRef = useRef<HTMLSpanElement & HTMLDivElement>(null);\n\n /*\n When React state changes, React often produces too many DOM updates, causing NVDA to\n issue many announcements for the same logical event (See https://github.com/nvaccess/nvda/issues/7996).\n\n The code below imitates a debouncing, scheduling a callback every time new React state\n update is detected. When a callback resolves, it copies content from a muted element\n to the live region, which is recognized by screen readers as an update.\n\n If the use case requires no announcement to be ignored, use delay = 0, but ensure it\n does not impact the performance. If it does, prefer using a string as children prop.\n */\n useEffect(() => {\n function updateLiveRegion() {\n if (targetRef.current && sourceRef.current) {\n const sourceContent = extractInnerText(sourceRef.current);\n const targetContent = extractInnerText(targetRef.current);\n if (targetContent !== sourceContent) {\n // The aria-atomic does not work properly in Voice Over, causing\n // certain parts of the content to be ignored. To fix that,\n // we assign the source text content as a single node.\n targetRef.current.innerText = sourceContent;\n }\n }\n }\n\n let timeoutId: null | number;\n if (delay) {\n timeoutId = setTimeout(updateLiveRegion, delay);\n } else {\n updateLiveRegion();\n }\n\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n });\n\n return (\n <>\n {visible && (\n <TagName ref={sourceRef} id={id}>\n {children}\n </TagName>\n )}\n\n <ScreenreaderOnly {...restProps} className={clsx(styles.root, restProps.className)}>\n {!visible && (\n <TagName ref={sourceRef} aria-hidden=\"true\">\n {children}\n </TagName>\n )}\n\n <span ref={targetRef} aria-atomic=\"true\" aria-live={assertive ? 'assertive' : 'polite'}></span>\n </ScreenreaderOnly>\n </>\n );\n}\n\n// This only extracts text content from the node including all its children which is enough for now.\n// To make it more powerful, it is possible to create a more sophisticated extractor with respect to\n// ARIA properties to ignore aria-hidden nodes and read ARIA labels from the live content.\nfunction extractInnerText(node: HTMLElement) {\n return (node.innerText || '').replace(/\\s+/g, ' ').trim();\n}\n"]}
@@ -22,6 +22,7 @@ export interface OptionsListProps extends BaseComponentProps {
22
22
  position?: React.CSSProperties['position'];
23
23
  role?: 'listbox' | 'list' | 'menu';
24
24
  ariaLabelledby?: string;
25
+ ariaDescribedby?: string;
25
26
  decreaseTopMargin?: boolean;
26
27
  }
27
28
  declare const _default: React.ForwardRefExoticComponent<OptionsListProps & React.RefAttributes<HTMLUListElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"lib/default/","sources":["internal/components/options-list/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAEL,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EAEd,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;IACvC,SAAS,CAAC,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC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,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;;AAmFD,wBAA6C"}
@@ -15,7 +15,7 @@ const getItemIndex = (containerRef, event) => {
15
15
  return mouseTarget ? parseInt(mouseTarget) : -1;
16
16
  };
17
17
  const OptionsList = (_a, ref) => {
18
- var { open, children, nativeAttributes = {}, onKeyDown, onBlur, onFocus, onLoadMore, onMouseUp, onMouseMove, position = 'relative', role = 'listbox', decreaseTopMargin = false, ariaLabelledby } = _a, restProps = __rest(_a, ["open", "children", "nativeAttributes", "onKeyDown", "onBlur", "onFocus", "onLoadMore", "onMouseUp", "onMouseMove", "position", "role", "decreaseTopMargin", "ariaLabelledby"]);
18
+ var { open, children, nativeAttributes = {}, onKeyDown, onBlur, onFocus, onLoadMore, onMouseUp, onMouseMove, position = 'relative', role = 'listbox', decreaseTopMargin = false, ariaLabelledby, ariaDescribedby } = _a, restProps = __rest(_a, ["open", "children", "nativeAttributes", "onKeyDown", "onBlur", "onFocus", "onLoadMore", "onMouseUp", "onMouseMove", "position", "role", "decreaseTopMargin", "ariaLabelledby", "ariaDescribedby"]);
19
19
  const baseProps = getBaseProps(restProps);
20
20
  const menuRef = useRef(null);
21
21
  const handleScroll = () => {
@@ -38,7 +38,7 @@ const OptionsList = (_a, ref) => {
38
38
  [styles['decrease-top-margin']]: decreaseTopMargin,
39
39
  });
40
40
  const mergedRef = useMergeRefs(ref, menuRef);
41
- return (React.createElement("ul", Object.assign({}, baseProps, nativeAttributes, { className: className, ref: mergedRef, style: { position }, role: role, onScroll: handleScroll, onKeyDown: event => onKeyDown && fireKeyboardEvent(onKeyDown, event), onMouseMove: event => onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(getItemIndex(menuRef, event)), onMouseUp: event => onMouseUp === null || onMouseUp === void 0 ? void 0 : onMouseUp(getItemIndex(menuRef, event)), onBlur: event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }), onFocus: () => fireNonCancelableEvent(onFocus), tabIndex: -1, "aria-labelledby": ariaLabelledby }), open && children));
41
+ return (React.createElement("ul", Object.assign({}, baseProps, nativeAttributes, { className: className, ref: mergedRef, style: { position }, role: role, onScroll: handleScroll, onKeyDown: event => onKeyDown && fireKeyboardEvent(onKeyDown, event), onMouseMove: event => onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(getItemIndex(menuRef, event)), onMouseUp: event => onMouseUp === null || onMouseUp === void 0 ? void 0 : onMouseUp(getItemIndex(menuRef, event)), onBlur: event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget }), onFocus: () => fireNonCancelableEvent(onFocus), tabIndex: -1, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby }), open && children));
42
42
  };
43
43
  export default React.forwardRef(OptionsList);
44
44
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/options-list/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACL,sBAAsB,EAItB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,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Ae,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useRef } from 'react';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport {\n fireNonCancelableEvent,\n NonCancelableEventHandler,\n CancelableEventHandler,\n BaseKeyDetail,\n fireKeyboardEvent,\n} from '../../events';\nimport { findUpUntil } from '../../utils/dom';\nimport styles from './styles.css.js';\n\nexport interface OptionsListProps extends BaseComponentProps {\n open?: boolean;\n /**\n * Options list\n */\n children: React.ReactNode;\n nativeAttributes?: Record<string, any>;\n /**\n * Called when more items need to be loaded.\n */\n onLoadMore?: NonCancelableEventHandler;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onBlur?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n onFocus?: NonCancelableEventHandler;\n onMouseUp?: (itemIndex: number) => void;\n onMouseMove?: (itemIndex: number) => void;\n position?: React.CSSProperties['position'];\n role?: 'listbox' | 'list' | 'menu';\n ariaLabelledby?: string;\n decreaseTopMargin?: boolean;\n}\n\nconst BOTTOM_TRIGGER_OFFSET = 80;\n\nconst getItemIndex = (containerRef: React.RefObject<HTMLElement>, event: React.MouseEvent) => {\n const target = findUpUntil(\n event.target as HTMLElement,\n element => element === containerRef.current || !!element.dataset.mouseTarget\n );\n const mouseTarget = target?.dataset.mouseTarget;\n return mouseTarget ? parseInt(mouseTarget) : -1;\n};\n\nconst OptionsList = (\n {\n open,\n children,\n nativeAttributes = {},\n onKeyDown,\n onBlur,\n onFocus,\n onLoadMore,\n onMouseUp,\n onMouseMove,\n position = 'relative',\n role = 'listbox',\n decreaseTopMargin = false,\n ariaLabelledby,\n ...restProps\n }: OptionsListProps,\n ref: React.Ref<HTMLUListElement>\n) => {\n const baseProps = getBaseProps(restProps);\n const menuRef = useRef<HTMLUListElement>(null);\n\n const handleScroll = () => {\n const scrollContainer = menuRef?.current;\n if (scrollContainer) {\n const bottomEdgePosition = scrollContainer.scrollTop + scrollContainer.clientHeight;\n const remainingScrollHeight = scrollContainer.scrollHeight - bottomEdgePosition;\n if (remainingScrollHeight < BOTTOM_TRIGGER_OFFSET) {\n fireNonCancelableEvent(onLoadMore);\n }\n }\n };\n\n useEffect(() => {\n if (!open) {\n return;\n }\n handleScroll();\n });\n\n const className = clsx(styles['options-list'], {\n [styles['decrease-top-margin']]: decreaseTopMargin,\n });\n\n const mergedRef = useMergeRefs(ref, menuRef);\n\n return (\n <ul\n {...baseProps}\n {...nativeAttributes}\n className={className}\n ref={mergedRef}\n style={{ position }}\n role={role}\n onScroll={handleScroll}\n onKeyDown={event => onKeyDown && fireKeyboardEvent(onKeyDown, event)}\n onMouseMove={event => onMouseMove?.(getItemIndex(menuRef, event))}\n onMouseUp={event => onMouseUp?.(getItemIndex(menuRef, event))}\n onBlur={event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget })}\n onFocus={() => fireNonCancelableEvent(onFocus)}\n tabIndex={-1}\n aria-labelledby={ariaLabelledby}\n >\n {open && children}\n </ul>\n );\n};\n\nexport default React.forwardRef(OptionsList);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"lib/default/","sources":["internal/components/options-list/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EACL,sBAAsB,EAItB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,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AAe,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport React, { useEffect, useRef } from 'react';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport {\n fireNonCancelableEvent,\n NonCancelableEventHandler,\n CancelableEventHandler,\n BaseKeyDetail,\n fireKeyboardEvent,\n} from '../../events';\nimport { findUpUntil } from '../../utils/dom';\nimport styles from './styles.css.js';\n\nexport interface OptionsListProps extends BaseComponentProps {\n open?: boolean;\n /**\n * Options list\n */\n children: React.ReactNode;\n nativeAttributes?: Record<string, any>;\n /**\n * Called when more items need to be loaded.\n */\n onLoadMore?: NonCancelableEventHandler;\n onKeyDown?: CancelableEventHandler<BaseKeyDetail>;\n onBlur?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n onFocus?: NonCancelableEventHandler;\n onMouseUp?: (itemIndex: number) => void;\n onMouseMove?: (itemIndex: number) => void;\n position?: React.CSSProperties['position'];\n role?: 'listbox' | 'list' | 'menu';\n ariaLabelledby?: string;\n ariaDescribedby?: string;\n decreaseTopMargin?: boolean;\n}\n\nconst BOTTOM_TRIGGER_OFFSET = 80;\n\nconst getItemIndex = (containerRef: React.RefObject<HTMLElement>, event: React.MouseEvent) => {\n const target = findUpUntil(\n event.target as HTMLElement,\n element => element === containerRef.current || !!element.dataset.mouseTarget\n );\n const mouseTarget = target?.dataset.mouseTarget;\n return mouseTarget ? parseInt(mouseTarget) : -1;\n};\n\nconst OptionsList = (\n {\n open,\n children,\n nativeAttributes = {},\n onKeyDown,\n onBlur,\n onFocus,\n onLoadMore,\n onMouseUp,\n onMouseMove,\n position = 'relative',\n role = 'listbox',\n decreaseTopMargin = false,\n ariaLabelledby,\n ariaDescribedby,\n ...restProps\n }: OptionsListProps,\n ref: React.Ref<HTMLUListElement>\n) => {\n const baseProps = getBaseProps(restProps);\n const menuRef = useRef<HTMLUListElement>(null);\n\n const handleScroll = () => {\n const scrollContainer = menuRef?.current;\n if (scrollContainer) {\n const bottomEdgePosition = scrollContainer.scrollTop + scrollContainer.clientHeight;\n const remainingScrollHeight = scrollContainer.scrollHeight - bottomEdgePosition;\n if (remainingScrollHeight < BOTTOM_TRIGGER_OFFSET) {\n fireNonCancelableEvent(onLoadMore);\n }\n }\n };\n\n useEffect(() => {\n if (!open) {\n return;\n }\n handleScroll();\n });\n\n const className = clsx(styles['options-list'], {\n [styles['decrease-top-margin']]: decreaseTopMargin,\n });\n\n const mergedRef = useMergeRefs(ref, menuRef);\n\n return (\n <ul\n {...baseProps}\n {...nativeAttributes}\n className={className}\n ref={mergedRef}\n style={{ position }}\n role={role}\n onScroll={handleScroll}\n onKeyDown={event => onKeyDown && fireKeyboardEvent(onKeyDown, event)}\n onMouseMove={event => onMouseMove?.(getItemIndex(menuRef, event))}\n onMouseUp={event => onMouseUp?.(getItemIndex(menuRef, event))}\n onBlur={event => fireNonCancelableEvent(onBlur, { relatedTarget: event.relatedTarget })}\n onFocus={() => fireNonCancelableEvent(onFocus)}\n tabIndex={-1}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n >\n {open && children}\n </ul>\n );\n};\n\nexport default React.forwardRef(OptionsList);\n"]}
@@ -1,6 +1,6 @@
1
1
 
2
2
  export var PACKAGE_SOURCE = 'components';
3
- export var PACKAGE_VERSION = '3.0.0 (f0bd2be)';
3
+ export var PACKAGE_VERSION = '3.0.0 (b823b82)';
4
4
  export var THEME = 'open-source-visual-refresh';
5
5
  export var ALWAYS_VISUAL_REFRESH = true;
6
6