@cloudscape-design/components 3.0.1407 → 3.0.1409

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 (529) hide show
  1. package/alert/styles.css.js +27 -27
  2. package/alert/styles.scoped.css +55 -53
  3. package/alert/styles.selectors.js +27 -27
  4. package/annotation-context/annotation/styles.css.js +13 -13
  5. package/annotation-context/annotation/styles.scoped.css +21 -21
  6. package/annotation-context/annotation/styles.selectors.js +13 -13
  7. package/app-layout/notifications/styles.css.js +3 -3
  8. package/app-layout/notifications/styles.scoped.css +7 -7
  9. package/app-layout/notifications/styles.selectors.js +3 -3
  10. package/app-layout/visual-refresh/styles.css.js +86 -86
  11. package/app-layout/visual-refresh/styles.scoped.css +258 -258
  12. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  13. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
  14. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
  15. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
  16. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
  17. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +13 -13
  18. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
  19. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
  20. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -68
  21. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
  22. package/attribute-editor/styles.css.js +15 -15
  23. package/attribute-editor/styles.scoped.css +28 -28
  24. package/attribute-editor/styles.selectors.js +15 -15
  25. package/breadcrumb-group/item/styles.css.js +7 -7
  26. package/breadcrumb-group/item/styles.scoped.css +28 -28
  27. package/breadcrumb-group/item/styles.selectors.js +7 -7
  28. package/button/styles.css.js +24 -24
  29. package/button/styles.scoped.css +327 -327
  30. package/button/styles.selectors.js +24 -24
  31. package/button-dropdown/category-elements/expandable-category-element.d.ts +4 -1
  32. package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  33. package/button-dropdown/category-elements/expandable-category-element.js +18 -3
  34. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  35. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +4 -1
  36. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  37. package/button-dropdown/category-elements/mobile-expandable-category-element.js +23 -3
  38. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  39. package/button-dropdown/category-elements/use-expandable-group-status.d.ts +34 -0
  40. package/button-dropdown/category-elements/use-expandable-group-status.d.ts.map +1 -0
  41. package/button-dropdown/category-elements/use-expandable-group-status.js +59 -0
  42. package/button-dropdown/category-elements/use-expandable-group-status.js.map +1 -0
  43. package/button-dropdown/filter.d.ts +1 -1
  44. package/button-dropdown/filter.d.ts.map +1 -1
  45. package/button-dropdown/index.d.ts.map +1 -1
  46. package/button-dropdown/index.js +3 -3
  47. package/button-dropdown/index.js.map +1 -1
  48. package/button-dropdown/interfaces.d.ts +110 -8
  49. package/button-dropdown/interfaces.d.ts.map +1 -1
  50. package/button-dropdown/interfaces.js.map +1 -1
  51. package/button-dropdown/internal-interfaces.d.ts +20 -0
  52. package/button-dropdown/internal-interfaces.d.ts.map +1 -1
  53. package/button-dropdown/internal-interfaces.js.map +1 -1
  54. package/button-dropdown/internal.d.ts.map +1 -1
  55. package/button-dropdown/internal.js +149 -16
  56. package/button-dropdown/internal.js.map +1 -1
  57. package/button-dropdown/item-element/styles.css.js +21 -21
  58. package/button-dropdown/item-element/styles.scoped.css +37 -37
  59. package/button-dropdown/item-element/styles.selectors.js +21 -21
  60. package/button-dropdown/items-list.d.ts +4 -1
  61. package/button-dropdown/items-list.d.ts.map +1 -1
  62. package/button-dropdown/items-list.js +2 -2
  63. package/button-dropdown/items-list.js.map +1 -1
  64. package/button-dropdown/status-footer.d.ts +16 -0
  65. package/button-dropdown/status-footer.d.ts.map +1 -0
  66. package/button-dropdown/status-footer.js +23 -0
  67. package/button-dropdown/status-footer.js.map +1 -0
  68. package/button-dropdown/styles.css.js +23 -23
  69. package/button-dropdown/styles.scoped.css +34 -31
  70. package/button-dropdown/styles.selectors.js +23 -23
  71. package/button-dropdown/test-classes/styles.css.js +7 -0
  72. package/button-dropdown/test-classes/styles.scoped.css +11 -0
  73. package/button-dropdown/test-classes/styles.selectors.js +8 -0
  74. package/button-dropdown/utils/use-button-dropdown.d.ts +31 -2
  75. package/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  76. package/button-dropdown/utils/use-button-dropdown.js +62 -7
  77. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  78. package/button-dropdown/utils/use-highlighted-menu.d.ts +2 -0
  79. package/button-dropdown/utils/use-highlighted-menu.d.ts.map +1 -1
  80. package/button-dropdown/utils/use-highlighted-menu.js +7 -0
  81. package/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
  82. package/button-dropdown/utils/use-load-items.d.ts +17 -0
  83. package/button-dropdown/utils/use-load-items.d.ts.map +1 -0
  84. package/button-dropdown/utils/use-load-items.js +23 -0
  85. package/button-dropdown/utils/use-load-items.js.map +1 -0
  86. package/button-group/copy-to-clipboard-item.d.ts +1 -0
  87. package/button-group/copy-to-clipboard-item.d.ts.map +1 -1
  88. package/button-group/copy-to-clipboard-item.js +2 -2
  89. package/button-group/copy-to-clipboard-item.js.map +1 -1
  90. package/button-group/file-input-item.d.ts +1 -0
  91. package/button-group/file-input-item.d.ts.map +1 -1
  92. package/button-group/file-input-item.js +2 -2
  93. package/button-group/file-input-item.js.map +1 -1
  94. package/button-group/icon-button-item.d.ts +1 -0
  95. package/button-group/icon-button-item.d.ts.map +1 -1
  96. package/button-group/icon-button-item.js +2 -2
  97. package/button-group/icon-button-item.js.map +1 -1
  98. package/button-group/icon-toggle-button-item.d.ts +1 -0
  99. package/button-group/icon-toggle-button-item.d.ts.map +1 -1
  100. package/button-group/icon-toggle-button-item.js +2 -2
  101. package/button-group/icon-toggle-button-item.js.map +1 -1
  102. package/button-group/index.d.ts.map +1 -1
  103. package/button-group/index.js +1 -1
  104. package/button-group/index.js.map +1 -1
  105. package/button-group/internal-interfaces.d.ts +8 -0
  106. package/button-group/internal-interfaces.d.ts.map +1 -1
  107. package/button-group/internal-interfaces.js.map +1 -1
  108. package/button-group/internal.d.ts.map +1 -1
  109. package/button-group/internal.js +3 -3
  110. package/button-group/internal.js.map +1 -1
  111. package/button-group/item-element.d.ts +2 -0
  112. package/button-group/item-element.d.ts.map +1 -1
  113. package/button-group/item-element.js +7 -6
  114. package/button-group/item-element.js.map +1 -1
  115. package/button-group/menu-dropdown-item.d.ts +2 -0
  116. package/button-group/menu-dropdown-item.d.ts.map +1 -1
  117. package/button-group/menu-dropdown-item.js +3 -3
  118. package/button-group/menu-dropdown-item.js.map +1 -1
  119. package/button-group/styles.css.js +4 -4
  120. package/button-group/styles.scoped.css +19 -6
  121. package/button-group/styles.selectors.js +4 -4
  122. package/cards/styles.css.js +39 -39
  123. package/cards/styles.scoped.css +41 -41
  124. package/cards/styles.selectors.js +39 -39
  125. package/checkbox/styles.css.js +3 -3
  126. package/checkbox/styles.scoped.css +10 -10
  127. package/checkbox/styles.selectors.js +3 -3
  128. package/column-layout/internal.d.ts.map +1 -1
  129. package/column-layout/internal.js +12 -0
  130. package/column-layout/internal.js.map +1 -1
  131. package/container/internal.d.ts +11 -0
  132. package/container/internal.d.ts.map +1 -1
  133. package/container/internal.js +7 -4
  134. package/container/internal.js.map +1 -1
  135. package/container/styles.css.js +33 -34
  136. package/container/styles.scoped.css +140 -94
  137. package/container/styles.selectors.js +33 -34
  138. package/content-layout/styles.css.js +14 -14
  139. package/content-layout/styles.scoped.css +27 -27
  140. package/content-layout/styles.selectors.js +14 -14
  141. package/control-group/styles.css.js +27 -27
  142. package/control-group/styles.scoped.css +28 -28
  143. package/control-group/styles.selectors.js +27 -27
  144. package/copy-to-clipboard/index.d.ts.map +1 -1
  145. package/copy-to-clipboard/index.js +1 -1
  146. package/copy-to-clipboard/index.js.map +1 -1
  147. package/copy-to-clipboard/internal.d.ts +9 -1
  148. package/copy-to-clipboard/internal.d.ts.map +1 -1
  149. package/copy-to-clipboard/internal.js +3 -3
  150. package/copy-to-clipboard/internal.js.map +1 -1
  151. package/copy-to-clipboard/styles.css.js +10 -10
  152. package/copy-to-clipboard/styles.scoped.css +16 -14
  153. package/copy-to-clipboard/styles.selectors.js +10 -10
  154. package/date-input/internal.d.ts +5 -0
  155. package/date-input/internal.d.ts.map +1 -1
  156. package/date-input/internal.js +2 -2
  157. package/date-input/internal.js.map +1 -1
  158. package/date-input/styles.css.js +1 -1
  159. package/date-input/styles.scoped.css +2 -1
  160. package/date-input/styles.selectors.js +1 -1
  161. package/divider/index.d.ts.map +1 -1
  162. package/divider/index.js +1 -1
  163. package/divider/index.js.map +1 -1
  164. package/divider/internal.d.ts +7 -1
  165. package/divider/internal.d.ts.map +1 -1
  166. package/divider/internal.js +2 -2
  167. package/divider/internal.js.map +1 -1
  168. package/divider/styles.css.js +6 -6
  169. package/divider/styles.scoped.css +20 -9
  170. package/divider/styles.selectors.js +6 -6
  171. package/dropdown/internal.d.ts +1 -1
  172. package/dropdown/internal.d.ts.map +1 -1
  173. package/dropdown/internal.js +1 -1
  174. package/dropdown/internal.js.map +1 -1
  175. package/dropdown/styles.css.js +20 -20
  176. package/dropdown/styles.scoped.css +48 -48
  177. package/dropdown/styles.selectors.js +20 -20
  178. package/expandable-section/expandable-section-container.d.ts +6 -0
  179. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  180. package/expandable-section/expandable-section-container.js +4 -3
  181. package/expandable-section/expandable-section-container.js.map +1 -1
  182. package/expandable-section/expandable-section-header.d.ts +6 -0
  183. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  184. package/expandable-section/expandable-section-header.js +34 -15
  185. package/expandable-section/expandable-section-header.js.map +1 -1
  186. package/expandable-section/interfaces.d.ts +11 -0
  187. package/expandable-section/interfaces.d.ts.map +1 -1
  188. package/expandable-section/interfaces.js.map +1 -1
  189. package/expandable-section/internal.d.ts +2 -0
  190. package/expandable-section/internal.d.ts.map +1 -1
  191. package/expandable-section/internal.js +10 -3
  192. package/expandable-section/internal.js.map +1 -1
  193. package/expandable-section/styles.css.js +49 -46
  194. package/expandable-section/styles.scoped.css +121 -91
  195. package/expandable-section/styles.selectors.js +49 -46
  196. package/expandable-section/utils.d.ts +1 -0
  197. package/expandable-section/utils.d.ts.map +1 -1
  198. package/expandable-section/utils.js +3 -0
  199. package/expandable-section/utils.js.map +1 -1
  200. package/file-input/internal.d.ts +2 -0
  201. package/file-input/internal.d.ts.map +1 -1
  202. package/file-input/internal.js +2 -2
  203. package/file-input/internal.js.map +1 -1
  204. package/file-input/styles.css.js +5 -5
  205. package/file-input/styles.scoped.css +18 -22
  206. package/file-input/styles.selectors.js +5 -5
  207. package/file-token-group/styles.css.js +23 -23
  208. package/file-token-group/styles.scoped.css +36 -36
  209. package/file-token-group/styles.selectors.js +23 -23
  210. package/flashbar/styles.css.js +50 -50
  211. package/flashbar/styles.scoped.css +184 -184
  212. package/flashbar/styles.selectors.js +50 -50
  213. package/header/interfaces.d.ts +3 -2
  214. package/header/interfaces.d.ts.map +1 -1
  215. package/header/interfaces.js.map +1 -1
  216. package/header/internal.d.ts +6 -0
  217. package/header/internal.d.ts.map +1 -1
  218. package/header/internal.js +2 -1
  219. package/header/internal.js.map +1 -1
  220. package/header/styles.css.js +36 -35
  221. package/header/styles.scoped.css +69 -53
  222. package/header/styles.selectors.js +36 -35
  223. package/help-panel/styles.css.js +6 -6
  224. package/help-panel/styles.scoped.css +72 -72
  225. package/help-panel/styles.selectors.js +6 -6
  226. package/i18n/messages/all.all.js +1 -1
  227. package/i18n/messages/all.all.json +1 -1
  228. package/i18n/messages/all.de.js +1 -1
  229. package/i18n/messages/all.de.json +1 -1
  230. package/i18n/messages/all.en-GB.js +1 -1
  231. package/i18n/messages/all.en-GB.json +1 -1
  232. package/i18n/messages/all.en.js +1 -1
  233. package/i18n/messages/all.en.json +1 -1
  234. package/i18n/messages/all.es.js +1 -1
  235. package/i18n/messages/all.es.json +1 -1
  236. package/i18n/messages/all.fr.js +1 -1
  237. package/i18n/messages/all.fr.json +1 -1
  238. package/i18n/messages/all.id.js +1 -1
  239. package/i18n/messages/all.id.json +1 -1
  240. package/i18n/messages/all.it.js +1 -1
  241. package/i18n/messages/all.it.json +1 -1
  242. package/i18n/messages/all.ja.js +1 -1
  243. package/i18n/messages/all.ja.json +1 -1
  244. package/i18n/messages/all.ko.js +1 -1
  245. package/i18n/messages/all.ko.json +1 -1
  246. package/i18n/messages/all.pt-BR.js +1 -1
  247. package/i18n/messages/all.pt-BR.json +1 -1
  248. package/i18n/messages/all.tr.js +1 -1
  249. package/i18n/messages/all.tr.json +1 -1
  250. package/i18n/messages/all.zh-CN.js +1 -1
  251. package/i18n/messages/all.zh-CN.json +1 -1
  252. package/i18n/messages/all.zh-TW.js +1 -1
  253. package/i18n/messages/all.zh-TW.json +1 -1
  254. package/i18n/messages-types.d.ts +28 -0
  255. package/i18n/messages-types.d.ts.map +1 -1
  256. package/i18n/messages-types.js.map +1 -1
  257. package/input/internal.d.ts +1 -1
  258. package/input/internal.d.ts.map +1 -1
  259. package/input/internal.js +4 -2
  260. package/input/internal.js.map +1 -1
  261. package/input/styles.css.js +45 -44
  262. package/input/styles.scoped.css +159 -151
  263. package/input/styles.selectors.js +45 -44
  264. package/internal/base-component/styles.scoped.css +1 -1
  265. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  266. package/internal/components/autosuggest-input/index.js +21 -60
  267. package/internal/components/autosuggest-input/index.js.map +1 -1
  268. package/internal/components/autosuggest-input/inline-tokens.d.ts +1 -0
  269. package/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -1
  270. package/internal/components/autosuggest-input/inline-tokens.js +4 -2
  271. package/internal/components/autosuggest-input/inline-tokens.js.map +1 -1
  272. package/internal/components/autosuggest-input/styles.css.js +11 -33
  273. package/internal/components/autosuggest-input/styles.scoped.css +15 -233
  274. package/internal/components/autosuggest-input/styles.selectors.js +11 -33
  275. package/internal/components/autosuggest-input/use-token-overflow.d.ts +7 -11
  276. package/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -1
  277. package/internal/components/autosuggest-input/use-token-overflow.js +16 -29
  278. package/internal/components/autosuggest-input/use-token-overflow.js.map +1 -1
  279. package/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  280. package/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  281. package/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  282. package/internal/components/dropdown-status/index.d.ts +7 -1
  283. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  284. package/internal/components/dropdown-status/index.js +2 -2
  285. package/internal/components/dropdown-status/index.js.map +1 -1
  286. package/internal/components/listbox/selection/interfaces.d.ts +28 -0
  287. package/internal/components/listbox/selection/interfaces.d.ts.map +1 -0
  288. package/internal/components/listbox/selection/interfaces.js +2 -0
  289. package/internal/components/listbox/selection/interfaces.js.map +1 -0
  290. package/internal/components/listbox/selection/multi-selection.d.ts +24 -0
  291. package/internal/components/listbox/selection/multi-selection.d.ts.map +1 -0
  292. package/internal/components/listbox/selection/multi-selection.js +60 -0
  293. package/internal/components/listbox/selection/multi-selection.js.map +1 -0
  294. package/internal/components/listbox/selection/single-selection.d.ts +7 -0
  295. package/internal/components/listbox/selection/single-selection.d.ts.map +1 -0
  296. package/internal/components/listbox/selection/single-selection.js +26 -0
  297. package/internal/components/listbox/selection/single-selection.js.map +1 -0
  298. package/internal/components/option/styles.css.js +18 -18
  299. package/internal/components/option/styles.scoped.css +35 -35
  300. package/internal/components/option/styles.selectors.js +18 -18
  301. package/internal/components/radio-button/styles.css.js +7 -7
  302. package/internal/components/radio-button/styles.scoped.css +17 -17
  303. package/internal/components/radio-button/styles.selectors.js +7 -7
  304. package/internal/components/selectable-item/styles.css.js +22 -22
  305. package/internal/components/selectable-item/styles.scoped.css +57 -57
  306. package/internal/components/selectable-item/styles.selectors.js +22 -22
  307. package/internal/components/token-list/styles.css.js +10 -10
  308. package/internal/components/token-list/styles.scoped.css +25 -25
  309. package/internal/components/token-list/styles.selectors.js +10 -10
  310. package/internal/environment.js +2 -2
  311. package/internal/environment.json +2 -2
  312. package/internal/generated/custom-css-properties/index.d.ts +2 -0
  313. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  314. package/internal/generated/custom-css-properties/index.js +177 -175
  315. package/internal/generated/custom-css-properties/index.js.map +1 -1
  316. package/internal/hooks/use-load-items/index.d.ts +18 -0
  317. package/internal/hooks/use-load-items/index.d.ts.map +1 -0
  318. package/{select/utils/use-load-items.js → internal/hooks/use-load-items/index.js} +4 -5
  319. package/internal/hooks/use-load-items/index.js.map +1 -0
  320. package/internal/manifest.json +1 -1
  321. package/item-card/styles.css.js +14 -14
  322. package/item-card/styles.scoped.css +63 -63
  323. package/item-card/styles.selectors.js +14 -14
  324. package/link/styles.css.js +21 -21
  325. package/link/styles.scoped.css +104 -104
  326. package/link/styles.selectors.js +21 -21
  327. package/manifest.json +2 -2
  328. package/modal/styles.css.js +32 -32
  329. package/modal/styles.scoped.css +49 -49
  330. package/modal/styles.selectors.js +32 -32
  331. package/multiselect/internal.js +1 -1
  332. package/multiselect/internal.js.map +1 -1
  333. package/multiselect/use-multiselect.d.ts.map +1 -1
  334. package/multiselect/use-multiselect.js +15 -48
  335. package/multiselect/use-multiselect.js.map +1 -1
  336. package/package.json +1 -1
  337. package/popover/arrow.d.ts +3 -1
  338. package/popover/arrow.d.ts.map +1 -1
  339. package/popover/arrow.js +2 -2
  340. package/popover/arrow.js.map +1 -1
  341. package/popover/body.d.ts +1 -0
  342. package/popover/body.d.ts.map +1 -1
  343. package/popover/body.js +2 -2
  344. package/popover/body.js.map +1 -1
  345. package/popover/container.d.ts +3 -1
  346. package/popover/container.d.ts.map +1 -1
  347. package/popover/container.js +2 -2
  348. package/popover/container.js.map +1 -1
  349. package/popover/internal.d.ts +6 -0
  350. package/popover/internal.d.ts.map +1 -1
  351. package/popover/internal.js +3 -3
  352. package/popover/internal.js.map +1 -1
  353. package/popover/styles.css.js +58 -58
  354. package/popover/styles.scoped.css +114 -95
  355. package/popover/styles.selectors.js +58 -58
  356. package/progress-bar/index.d.ts.map +1 -1
  357. package/progress-bar/index.js +4 -3
  358. package/progress-bar/index.js.map +1 -1
  359. package/progress-bar/internal.d.ts +7 -1
  360. package/progress-bar/internal.d.ts.map +1 -1
  361. package/progress-bar/internal.js +2 -2
  362. package/progress-bar/internal.js.map +1 -1
  363. package/progress-bar/styles.css.js +20 -19
  364. package/progress-bar/styles.scoped.css +92 -59
  365. package/progress-bar/styles.selectors.js +20 -19
  366. package/prompt-input/styles.css.js +26 -26
  367. package/prompt-input/styles.scoped.css +105 -105
  368. package/prompt-input/styles.selectors.js +26 -26
  369. package/segmented-control/styles.css.js +31 -31
  370. package/segmented-control/styles.scoped.css +81 -81
  371. package/segmented-control/styles.selectors.js +31 -31
  372. package/select/internal.d.ts.map +1 -1
  373. package/select/internal.js +7 -4
  374. package/select/internal.js.map +1 -1
  375. package/select/parts/filter.d.ts +1 -1
  376. package/select/parts/filter.d.ts.map +1 -1
  377. package/select/parts/styles.css.js +21 -21
  378. package/select/parts/styles.scoped.css +24 -24
  379. package/select/parts/styles.selectors.js +21 -21
  380. package/select/utils/use-select.d.ts +4 -4
  381. package/select/utils/use-select.d.ts.map +1 -1
  382. package/select/utils/use-select.js +16 -29
  383. package/select/utils/use-select.js.map +1 -1
  384. package/side-navigation/styles.css.js +65 -65
  385. package/side-navigation/styles.scoped.css +114 -114
  386. package/side-navigation/styles.selectors.js +65 -65
  387. package/slider/internal.d.ts +6 -0
  388. package/slider/internal.d.ts.map +1 -1
  389. package/slider/internal.js +3 -3
  390. package/slider/internal.js.map +1 -1
  391. package/slider/styles.css.js +26 -26
  392. package/slider/styles.scoped.css +202 -171
  393. package/slider/styles.selectors.js +26 -26
  394. package/spinner/styles.css.js +14 -14
  395. package/spinner/styles.scoped.css +40 -40
  396. package/spinner/styles.selectors.js +14 -14
  397. package/styling/button-dropdown.scss +1 -0
  398. package/styling/button-group.scss +15 -0
  399. package/styling/container.scss +95 -0
  400. package/styling/copy-to-clipboard.scss +1 -0
  401. package/styling/date-input.scss +1 -0
  402. package/styling/divider.scss +15 -0
  403. package/styling/dropdown.scss +2 -2
  404. package/styling/popover.scss +58 -0
  405. package/styling/progress-bar.scss +36 -0
  406. package/styling/slider.scss +30 -0
  407. package/styling/text-filter.scss +19 -0
  408. package/styling/time-input.scss +1 -0
  409. package/styling/toggle-button.scss +1 -0
  410. package/styling/token.scss +49 -0
  411. package/styling/tooltip.scss +58 -0
  412. package/table/column-groups/col-group.d.ts +1 -1
  413. package/table/column-groups/col-group.d.ts.map +1 -1
  414. package/table/column-groups/col-group.js +3 -3
  415. package/table/column-groups/col-group.js.map +1 -1
  416. package/table/header-cell/group-header-cell.js +2 -2
  417. package/table/header-cell/group-header-cell.js.map +1 -1
  418. package/table/internal.d.ts.map +1 -1
  419. package/table/internal.js +1 -1
  420. package/table/internal.js.map +1 -1
  421. package/table/styles.css.js +37 -37
  422. package/table/styles.scoped.css +46 -46
  423. package/table/styles.selectors.js +37 -37
  424. package/table/use-column-widths.d.ts +2 -1
  425. package/table/use-column-widths.d.ts.map +1 -1
  426. package/table/use-column-widths.js +42 -11
  427. package/table/use-column-widths.js.map +1 -1
  428. package/tabs/styles.css.js +31 -30
  429. package/tabs/styles.scoped.css +93 -77
  430. package/tabs/styles.selectors.js +31 -30
  431. package/tabs/tab-header-bar.d.ts.map +1 -1
  432. package/tabs/tab-header-bar.js +54 -5
  433. package/tabs/tab-header-bar.js.map +1 -1
  434. package/tag-editor/styles.css.js +3 -3
  435. package/tag-editor/styles.scoped.css +13 -13
  436. package/tag-editor/styles.selectors.js +3 -3
  437. package/test-utils/dom/button-dropdown/index.d.ts +16 -0
  438. package/test-utils/dom/button-dropdown/index.js +28 -6
  439. package/test-utils/dom/button-dropdown/index.js.map +1 -1
  440. package/test-utils/selectors/button-dropdown/index.d.ts +16 -0
  441. package/test-utils/selectors/button-dropdown/index.js +32 -6
  442. package/test-utils/selectors/button-dropdown/index.js.map +1 -1
  443. package/text-content/styles.css.js +1 -1
  444. package/text-content/styles.scoped.css +66 -66
  445. package/text-content/styles.selectors.js +1 -1
  446. package/text-filter/internal.d.ts +8 -1
  447. package/text-filter/internal.d.ts.map +1 -1
  448. package/text-filter/internal.js +3 -3
  449. package/text-filter/internal.js.map +1 -1
  450. package/text-filter/search-results.d.ts +1 -0
  451. package/text-filter/search-results.d.ts.map +1 -1
  452. package/text-filter/search-results.js +3 -2
  453. package/text-filter/search-results.js.map +1 -1
  454. package/text-filter/styles.css.js +3 -3
  455. package/text-filter/styles.scoped.css +6 -3
  456. package/text-filter/styles.selectors.js +3 -3
  457. package/textarea/styles.css.js +9 -9
  458. package/textarea/styles.scoped.css +51 -51
  459. package/textarea/styles.selectors.js +9 -9
  460. package/time-input/internal.d.ts +7 -1
  461. package/time-input/internal.d.ts.map +1 -1
  462. package/time-input/internal.js +2 -1
  463. package/time-input/internal.js.map +1 -1
  464. package/time-input/styles.css.js +1 -1
  465. package/time-input/styles.scoped.css +2 -1
  466. package/time-input/styles.selectors.js +1 -1
  467. package/toggle/styles.css.js +10 -10
  468. package/toggle/styles.scoped.css +25 -25
  469. package/toggle/styles.selectors.js +10 -10
  470. package/toggle-button/index.d.ts.map +1 -1
  471. package/toggle-button/index.js +1 -1
  472. package/toggle-button/index.js.map +1 -1
  473. package/toggle-button/internal.d.ts +2 -0
  474. package/toggle-button/internal.d.ts.map +1 -1
  475. package/toggle-button/internal.js +2 -2
  476. package/toggle-button/internal.js.map +1 -1
  477. package/toggle-button/styles.css.js +4 -4
  478. package/toggle-button/styles.scoped.css +5 -4
  479. package/toggle-button/styles.selectors.js +4 -4
  480. package/token/dismiss-button.d.ts +13 -3
  481. package/token/dismiss-button.d.ts.map +1 -1
  482. package/token/dismiss-button.js +6 -22
  483. package/token/dismiss-button.js.map +1 -1
  484. package/token/index.d.ts.map +1 -1
  485. package/token/index.js +1 -1
  486. package/token/index.js.map +1 -1
  487. package/token/internal.d.ts +6 -0
  488. package/token/internal.d.ts.map +1 -1
  489. package/token/internal.js +3 -3
  490. package/token/internal.js.map +1 -1
  491. package/token/styles.css.js +14 -14
  492. package/token/styles.d.ts +26 -1
  493. package/token/styles.d.ts.map +1 -1
  494. package/token/styles.js +22 -12
  495. package/token/styles.js.map +1 -1
  496. package/token/styles.scoped.css +67 -61
  497. package/token/styles.selectors.js +14 -14
  498. package/tooltip/internal.d.ts +6 -0
  499. package/tooltip/internal.d.ts.map +1 -1
  500. package/tooltip/internal.js +2 -2
  501. package/tooltip/internal.js.map +1 -1
  502. package/tooltip/styles.css.js +2 -2
  503. package/tooltip/styles.scoped.css +7 -5
  504. package/tooltip/styles.selectors.js +2 -2
  505. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts +1 -1
  506. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts.map +1 -1
  507. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
  508. package/tutorial-panel/components/tutorial-detail-view/index.d.ts +1 -1
  509. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  510. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  511. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +1 -1
  512. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
  513. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  514. package/tutorial-panel/components/tutorial-detail-view/task.d.ts +1 -1
  515. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  516. package/tutorial-panel/components/tutorial-detail-view/task.js +9 -5
  517. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  518. package/tutorial-panel/components/tutorial-list/index.d.ts +1 -1
  519. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  520. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  521. package/tutorial-panel/index.d.ts.map +1 -1
  522. package/tutorial-panel/index.js +27 -1
  523. package/tutorial-panel/index.js.map +1 -1
  524. package/tutorial-panel/interfaces.d.ts +19 -18
  525. package/tutorial-panel/interfaces.d.ts.map +1 -1
  526. package/tutorial-panel/interfaces.js.map +1 -1
  527. package/select/utils/use-load-items.d.ts +0 -18
  528. package/select/utils/use-load-items.d.ts.map +0 -1
  529. package/select/utils/use-load-items.js.map +0 -1
@@ -10,27 +10,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
10
10
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
11
  SPDX-License-Identifier: Apache-2.0
12
12
  */
13
- @keyframes awsui_drag-handle-entry_155yk_1t4u0_1 {
13
+ @keyframes awsui_drag-handle-entry_155yk_3aiot_1 {
14
14
  from {
15
- transform: translate(var(--awsui-drag-handle-animation-inline-offset-ka4djm), var(--awsui-drag-handle-animation-block-offset-ka4djm));
15
+ transform: translate(var(--awsui-drag-handle-animation-inline-offset-8i8exb), var(--awsui-drag-handle-animation-block-offset-8i8exb));
16
16
  }
17
17
  to {
18
18
  transform: translate(0, 0);
19
19
  }
20
20
  }
21
- @keyframes awsui_drag-handle-exit_155yk_1t4u0_1 {
21
+ @keyframes awsui_drag-handle-exit_155yk_3aiot_1 {
22
22
  from {
23
23
  transform: translate(0, 0);
24
24
  }
25
25
  to {
26
- transform: translate(var(--awsui-drag-handle-animation-inline-offset-ka4djm), var(--awsui-drag-handle-animation-block-offset-ka4djm));
26
+ transform: translate(var(--awsui-drag-handle-animation-inline-offset-8i8exb), var(--awsui-drag-handle-animation-block-offset-8i8exb));
27
27
  }
28
28
  }
29
- .awsui_direction-button-wrapper_155yk_1t4u0_29:not(#\9) {
30
- --awsui-drag-handle-animation-inline-offset-ka4djm: 0;
31
- --awsui-drag-handle-animation-block-offset-ka4djm: 0;
29
+ .awsui_direction-button-wrapper_155yk_3aiot_29:not(#\9) {
30
+ --awsui-drag-handle-animation-inline-offset-8i8exb: 0;
31
+ --awsui-drag-handle-animation-block-offset-8i8exb: 0;
32
32
  }
33
- @keyframes awsui_awsui-motion-fade-in_155yk_1t4u0_1 {
33
+ @keyframes awsui_awsui-motion-fade-in_155yk_3aiot_1 {
34
34
  from {
35
35
  opacity: 0.2;
36
36
  }
@@ -38,7 +38,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
38
38
  opacity: 1;
39
39
  }
40
40
  }
41
- @keyframes awsui_awsui-motion-fade-out-0_155yk_1t4u0_1 {
41
+ @keyframes awsui_awsui-motion-fade-out-0_155yk_3aiot_1 {
42
42
  from {
43
43
  opacity: 1;
44
44
  }
@@ -46,81 +46,81 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
46
46
  opacity: 0;
47
47
  }
48
48
  }
49
- .awsui_direction-button-wrapper-motion-enter_155yk_1t4u0_49:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_1t4u0_49:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_1t4u0_49:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_1t4u0_49:not(#\9) {
49
+ .awsui_direction-button-wrapper-motion-enter_155yk_3aiot_49:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_3aiot_49:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_3aiot_49:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_3aiot_49:not(#\9) {
50
50
  pointer-events: none;
51
51
  }
52
- .awsui_direction-button-wrapper-motion-entering_155yk_1t4u0_49:not(#\9) {
53
- animation: awsui_drag-handle-entry_155yk_1t4u0_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1)), awsui_awsui-motion-fade-in_155yk_1t4u0_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1));
52
+ .awsui_direction-button-wrapper-motion-entering_155yk_3aiot_49:not(#\9) {
53
+ animation: awsui_drag-handle-entry_155yk_3aiot_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1)), awsui_awsui-motion-fade-in_155yk_3aiot_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1));
54
54
  }
55
55
  @media (prefers-reduced-motion: reduce) {
56
- .awsui_direction-button-wrapper-motion-entering_155yk_1t4u0_49:not(#\9) {
56
+ .awsui_direction-button-wrapper-motion-entering_155yk_3aiot_49:not(#\9) {
57
57
  animation: none;
58
58
  transition: none;
59
59
  }
60
60
  }
61
- .awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_1t4u0_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_1t4u0_49:not(#\9) {
61
+ .awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_3aiot_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_3aiot_49:not(#\9) {
62
62
  animation: none;
63
63
  transition: none;
64
64
  }
65
- .awsui_direction-button-wrapper-motion-exiting_155yk_1t4u0_49:not(#\9) {
66
- animation: awsui_drag-handle-exit_155yk_1t4u0_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1)) forwards, awsui_awsui-motion-fade-out-0_155yk_1t4u0_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1)) forwards;
65
+ .awsui_direction-button-wrapper-motion-exiting_155yk_3aiot_49:not(#\9) {
66
+ animation: awsui_drag-handle-exit_155yk_3aiot_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1)) forwards, awsui_awsui-motion-fade-out-0_155yk_3aiot_1 var(--motion-duration-complex-h93x8u, 250ms) var(--motion-easing-responsive-vkzjfg, cubic-bezier(0, 0, 0, 1)) forwards;
67
67
  }
68
68
  @media (prefers-reduced-motion: reduce) {
69
- .awsui_direction-button-wrapper-motion-exiting_155yk_1t4u0_49:not(#\9) {
69
+ .awsui_direction-button-wrapper-motion-exiting_155yk_3aiot_49:not(#\9) {
70
70
  animation: none;
71
71
  transition: none;
72
72
  }
73
73
  }
74
- .awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_1t4u0_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_1t4u0_49:not(#\9) {
74
+ .awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_3aiot_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_3aiot_49:not(#\9) {
75
75
  animation: none;
76
76
  transition: none;
77
77
  }
78
78
  @media (prefers-reduced-motion: reduce) {
79
- .awsui_direction-button-wrapper_155yk_1t4u0_29:not(#\9) {
79
+ .awsui_direction-button-wrapper_155yk_3aiot_29:not(#\9) {
80
80
  animation: none;
81
81
  transition: none;
82
82
  }
83
83
  }
84
- .awsui-motion-disabled .awsui_direction-button-wrapper_155yk_1t4u0_29:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_1t4u0_29:not(#\9) {
84
+ .awsui-motion-disabled .awsui_direction-button-wrapper_155yk_3aiot_29:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_3aiot_29:not(#\9) {
85
85
  animation: none;
86
86
  transition: none;
87
87
  }
88
88
 
89
- .awsui_direction-button-wrapper-block-start_155yk_1t4u0_89:not(#\9) {
90
- --awsui-drag-handle-animation-block-offset-ka4djm: 20px;
89
+ .awsui_direction-button-wrapper-block-start_155yk_3aiot_89:not(#\9) {
90
+ --awsui-drag-handle-animation-block-offset-8i8exb: 20px;
91
91
  }
92
92
 
93
- .awsui_direction-button-wrapper-block-end_155yk_1t4u0_93:not(#\9) {
94
- --awsui-drag-handle-animation-block-offset-ka4djm: -20px;
93
+ .awsui_direction-button-wrapper-block-end_155yk_3aiot_93:not(#\9) {
94
+ --awsui-drag-handle-animation-block-offset-8i8exb: -20px;
95
95
  }
96
96
 
97
- .awsui_direction-button-wrapper-inline-start_155yk_1t4u0_97:not(#\9) {
97
+ .awsui_direction-button-wrapper-inline-start_155yk_3aiot_97:not(#\9) {
98
98
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
99
99
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
100
100
  }
101
- .awsui_direction-button-wrapper-inline-start_155yk_1t4u0_97:not(#\9):dir(ltr) {
102
- --awsui-drag-handle-animation-inline-offset-ka4djm: 20px;
101
+ .awsui_direction-button-wrapper-inline-start_155yk_3aiot_97:not(#\9):dir(ltr) {
102
+ --awsui-drag-handle-animation-inline-offset-8i8exb: 20px;
103
103
  }
104
- .awsui_direction-button-wrapper-inline-start_155yk_1t4u0_97:not(#\9):dir(rtl) {
105
- --awsui-drag-handle-animation-inline-offset-ka4djm: -20px;
104
+ .awsui_direction-button-wrapper-inline-start_155yk_3aiot_97:not(#\9):dir(rtl) {
105
+ --awsui-drag-handle-animation-inline-offset-8i8exb: -20px;
106
106
  }
107
107
 
108
- .awsui_direction-button-wrapper-inline-end_155yk_1t4u0_108:not(#\9) {
108
+ .awsui_direction-button-wrapper-inline-end_155yk_3aiot_108:not(#\9) {
109
109
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
110
110
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
111
111
  }
112
- .awsui_direction-button-wrapper-inline-end_155yk_1t4u0_108:not(#\9):dir(ltr) {
113
- --awsui-drag-handle-animation-inline-offset-ka4djm: -20px;
112
+ .awsui_direction-button-wrapper-inline-end_155yk_3aiot_108:not(#\9):dir(ltr) {
113
+ --awsui-drag-handle-animation-inline-offset-8i8exb: -20px;
114
114
  }
115
- .awsui_direction-button-wrapper-inline-end_155yk_1t4u0_108:not(#\9):dir(rtl) {
116
- --awsui-drag-handle-animation-inline-offset-ka4djm: 20px;
115
+ .awsui_direction-button-wrapper-inline-end_155yk_3aiot_108:not(#\9):dir(rtl) {
116
+ --awsui-drag-handle-animation-inline-offset-8i8exb: 20px;
117
117
  }
118
118
 
119
- .awsui_contents_155yk_1t4u0_119:not(#\9) {
119
+ .awsui_contents_155yk_3aiot_119:not(#\9) {
120
120
  display: contents;
121
121
  }
122
122
 
123
- .awsui_portal-overlay_155yk_1t4u0_123:not(#\9) {
123
+ .awsui_portal-overlay_155yk_3aiot_123:not(#\9) {
124
124
  position: absolute;
125
125
  inset-block-start: 0;
126
126
  inset-inline-start: 0;
@@ -128,20 +128,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
128
128
  z-index: 7000;
129
129
  }
130
130
 
131
- .awsui_portal-overlay-disabled_155yk_1t4u0_131:not(#\9) {
131
+ .awsui_portal-overlay-disabled_155yk_3aiot_131:not(#\9) {
132
132
  display: none;
133
133
  }
134
134
 
135
- .awsui_portal-overlay-contents_155yk_1t4u0_135:not(#\9) {
135
+ .awsui_portal-overlay-contents_155yk_3aiot_135:not(#\9) {
136
136
  pointer-events: auto;
137
137
  }
138
138
 
139
- .awsui_drag-handle_155yk_1t4u0_139:not(#\9) {
139
+ .awsui_drag-handle_155yk_3aiot_139:not(#\9) {
140
140
  position: relative;
141
141
  display: inline-flex;
142
142
  }
143
143
 
144
- .awsui_direction-button-wrapper_155yk_1t4u0_29:not(#\9) {
144
+ .awsui_direction-button-wrapper_155yk_3aiot_29:not(#\9) {
145
145
  position: absolute;
146
146
  block-size: var(--space-static-xl-f42nfd, 24px);
147
147
  inline-size: var(--space-static-xl-f42nfd, 24px);
@@ -149,67 +149,67 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
149
149
  padding-inline: var(--space-static-xxs-0tl528, 4px);
150
150
  }
151
151
 
152
- .awsui_direction-button-wrapper-hidden_155yk_1t4u0_152:not(#\9) {
152
+ .awsui_direction-button-wrapper-hidden_155yk_3aiot_152:not(#\9) {
153
153
  display: none;
154
154
  }
155
155
 
156
- .awsui_direction-button-wrapper-block-start_155yk_1t4u0_89:not(#\9) {
156
+ .awsui_direction-button-wrapper-block-start_155yk_3aiot_89:not(#\9) {
157
157
  inset-block-start: calc(-1 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
158
158
  inset-inline-start: calc(50% - (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)) / 2);
159
159
  }
160
160
 
161
- .awsui_direction-button-wrapper-block-end_155yk_1t4u0_93:not(#\9) {
161
+ .awsui_direction-button-wrapper-block-end_155yk_3aiot_93:not(#\9) {
162
162
  inset-block-end: calc(-1 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
163
163
  inset-inline-start: calc(50% - (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)) / 2);
164
164
  }
165
165
 
166
- .awsui_direction-button-wrapper-inline-start_155yk_1t4u0_97:not(#\9) {
166
+ .awsui_direction-button-wrapper-inline-start_155yk_3aiot_97:not(#\9) {
167
167
  inset-inline-start: calc(-1 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
168
168
  inset-block-start: calc(50% - (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)) / 2);
169
169
  }
170
170
 
171
- .awsui_direction-button-wrapper-inline-end_155yk_1t4u0_108:not(#\9) {
171
+ .awsui_direction-button-wrapper-inline-end_155yk_3aiot_108:not(#\9) {
172
172
  inset-inline-end: calc(-1 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
173
173
  inset-block-start: calc(50% - (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)) / 2);
174
174
  }
175
175
 
176
- .awsui_direction-button-wrapper-forced_155yk_1t4u0_176:not(#\9) {
176
+ .awsui_direction-button-wrapper-forced_155yk_3aiot_176:not(#\9) {
177
177
  inset-inline-start: calc(50% - (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)) / 2);
178
178
  }
179
179
 
180
- .awsui_direction-button-wrapper-forced-top-0_155yk_1t4u0_180:not(#\9) {
180
+ .awsui_direction-button-wrapper-forced-top-0_155yk_3aiot_180:not(#\9) {
181
181
  inset-block-start: calc(-1 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
182
182
  }
183
183
 
184
- .awsui_direction-button-wrapper-forced-top-1_155yk_1t4u0_184:not(#\9) {
184
+ .awsui_direction-button-wrapper-forced-top-1_155yk_3aiot_184:not(#\9) {
185
185
  inset-block-start: calc(-2 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
186
186
  }
187
187
 
188
- .awsui_direction-button-wrapper-forced-top-2_155yk_1t4u0_188:not(#\9) {
188
+ .awsui_direction-button-wrapper-forced-top-2_155yk_3aiot_188:not(#\9) {
189
189
  inset-block-start: calc(-3 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
190
190
  }
191
191
 
192
- .awsui_direction-button-wrapper-forced-top-3_155yk_1t4u0_192:not(#\9) {
192
+ .awsui_direction-button-wrapper-forced-top-3_155yk_3aiot_192:not(#\9) {
193
193
  inset-block-start: calc(-4 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
194
194
  }
195
195
 
196
- .awsui_direction-button-wrapper-forced-bottom-0_155yk_1t4u0_196:not(#\9) {
196
+ .awsui_direction-button-wrapper-forced-bottom-0_155yk_3aiot_196:not(#\9) {
197
197
  inset-block-start: calc(1 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
198
198
  }
199
199
 
200
- .awsui_direction-button-wrapper-forced-bottom-1_155yk_1t4u0_200:not(#\9) {
200
+ .awsui_direction-button-wrapper-forced-bottom-1_155yk_3aiot_200:not(#\9) {
201
201
  inset-block-start: calc(2 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
202
202
  }
203
203
 
204
- .awsui_direction-button-wrapper-forced-bottom-2_155yk_1t4u0_204:not(#\9) {
204
+ .awsui_direction-button-wrapper-forced-bottom-2_155yk_3aiot_204:not(#\9) {
205
205
  inset-block-start: calc(3 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
206
206
  }
207
207
 
208
- .awsui_direction-button-wrapper-forced-bottom-3_155yk_1t4u0_208:not(#\9) {
208
+ .awsui_direction-button-wrapper-forced-bottom-3_155yk_3aiot_208:not(#\9) {
209
209
  inset-block-start: calc(4 * (var(--space-static-xl-f42nfd, 24px) + 2 * var(--space-static-xxs-0tl528, 4px)));
210
210
  }
211
211
 
212
- .awsui_direction-button_155yk_1t4u0_29:not(#\9) {
212
+ .awsui_direction-button_155yk_3aiot_29:not(#\9) {
213
213
  position: absolute;
214
214
  border-width: 0;
215
215
  cursor: pointer;
@@ -228,14 +228,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
228
228
  color: var(--color-text-direction-button-default-ywr3ay, #ffffff);
229
229
  box-shadow: var(--shadow-dropdown-py0mls, 0px 4px 20px 1px rgba(0, 7, 22, 0.1));
230
230
  }
231
- .awsui_direction-button_155yk_1t4u0_29:not(#\9):not(.awsui_direction-button-disabled_155yk_1t4u0_231):hover {
231
+ .awsui_direction-button_155yk_3aiot_29:not(#\9):not(.awsui_direction-button-disabled_155yk_3aiot_231):hover {
232
232
  background-color: var(--color-background-direction-button-hover-rxnl0l, #333843);
233
233
  }
234
- .awsui_direction-button_155yk_1t4u0_29:not(#\9):not(.awsui_direction-button-disabled_155yk_1t4u0_231):active {
234
+ .awsui_direction-button_155yk_3aiot_29:not(#\9):not(.awsui_direction-button-disabled_155yk_3aiot_231):active {
235
235
  background-color: var(--color-background-direction-button-active-ziirpu, #232b37);
236
236
  }
237
237
 
238
- .awsui_direction-button-disabled_155yk_1t4u0_231:not(#\9) {
238
+ .awsui_direction-button-disabled_155yk_3aiot_231:not(#\9) {
239
239
  cursor: default;
240
240
  background-color: var(--color-background-direction-button-disabled-mt2zqn, #ebebf0);
241
241
  color: var(--color-text-direction-button-disabled-ykyihd, #b4b4bb);
@@ -2,35 +2,35 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_1t4u0_29",
6
- "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_1t4u0_49",
7
- "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_1t4u0_49",
8
- "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_1t4u0_49",
9
- "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_1t4u0_49",
10
- "drag-handle-entry": "awsui_drag-handle-entry_155yk_1t4u0_1",
11
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_1t4u0_1",
12
- "drag-handle-exit": "awsui_drag-handle-exit_155yk_1t4u0_1",
13
- "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_1t4u0_1",
14
- "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_1t4u0_89",
15
- "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_1t4u0_93",
16
- "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_1t4u0_97",
17
- "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_1t4u0_108",
18
- "contents": "awsui_contents_155yk_1t4u0_119",
19
- "portal-overlay": "awsui_portal-overlay_155yk_1t4u0_123",
20
- "portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_1t4u0_131",
21
- "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_1t4u0_135",
22
- "drag-handle": "awsui_drag-handle_155yk_1t4u0_139",
23
- "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_1t4u0_152",
24
- "direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_1t4u0_176",
25
- "direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_1t4u0_180",
26
- "direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_1t4u0_184",
27
- "direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_1t4u0_188",
28
- "direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_1t4u0_192",
29
- "direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_1t4u0_196",
30
- "direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_1t4u0_200",
31
- "direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_1t4u0_204",
32
- "direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_1t4u0_208",
33
- "direction-button": "awsui_direction-button_155yk_1t4u0_29",
34
- "direction-button-disabled": "awsui_direction-button-disabled_155yk_1t4u0_231"
5
+ "direction-button-wrapper": "awsui_direction-button-wrapper_155yk_3aiot_29",
6
+ "direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_3aiot_49",
7
+ "direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_3aiot_49",
8
+ "direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_3aiot_49",
9
+ "direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_3aiot_49",
10
+ "drag-handle-entry": "awsui_drag-handle-entry_155yk_3aiot_1",
11
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_3aiot_1",
12
+ "drag-handle-exit": "awsui_drag-handle-exit_155yk_3aiot_1",
13
+ "awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_3aiot_1",
14
+ "direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_3aiot_89",
15
+ "direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_3aiot_93",
16
+ "direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_3aiot_97",
17
+ "direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_3aiot_108",
18
+ "contents": "awsui_contents_155yk_3aiot_119",
19
+ "portal-overlay": "awsui_portal-overlay_155yk_3aiot_123",
20
+ "portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_3aiot_131",
21
+ "portal-overlay-contents": "awsui_portal-overlay-contents_155yk_3aiot_135",
22
+ "drag-handle": "awsui_drag-handle_155yk_3aiot_139",
23
+ "direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_3aiot_152",
24
+ "direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_3aiot_176",
25
+ "direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_3aiot_180",
26
+ "direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_3aiot_184",
27
+ "direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_3aiot_188",
28
+ "direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_3aiot_192",
29
+ "direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_3aiot_196",
30
+ "direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_3aiot_200",
31
+ "direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_3aiot_204",
32
+ "direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_3aiot_208",
33
+ "direction-button": "awsui_direction-button_155yk_3aiot_29",
34
+ "direction-button-disabled": "awsui_direction-button-disabled_155yk_3aiot_231"
35
35
  };
36
36
 
@@ -18,6 +18,11 @@ export interface DropdownStatusPropsExtended extends DropdownStatusProps {
18
18
  * in case recoveryText was automatically provided by i18n.
19
19
  */
20
20
  hasRecoveryCallback?: boolean;
21
+ /**
22
+ * Optional `id` for the recovery button, so that it can be referenced
23
+ * through `aria-activedescendant` while focus stays in a filter input.
24
+ */
25
+ recoveryButtonId?: string;
21
26
  }
22
27
  declare function DropdownStatus({
23
28
  children
@@ -36,7 +41,8 @@ type UseDropdownStatus = ({
36
41
  isNoMatch,
37
42
  noMatch,
38
43
  hasRecoveryCallback,
39
- onRecoveryClick
44
+ onRecoveryClick,
45
+ recoveryButtonId
40
46
  }: DropdownStatusPropsExtended) => DropdownStatusResult;
41
47
  export interface DropdownStatusResult {
42
48
  isSticky: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAMlE,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAElE;AAED,KAAK,iBAAiB,GAAG,CAAC,EACxB,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,mBAAmB,EACnB,eAAe,GAChB,EAAE,2BAA2B,KAAK,oBAAoB,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAuD/B,CAAC;AAEF,eAAe,cAAc,CAAC;AAG9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAMlE,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAElE;AAED,KAAK,iBAAiB,GAAG,CAAC,EACxB,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,mBAAmB,EACnB,eAAe,EACf,gBAAgB,GACjB,EAAE,2BAA2B,KAAK,oBAAoB,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAyD/B,CAAC;AAEF,eAAe,cAAc,CAAC;AAG9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -9,7 +9,7 @@ import styles from './styles.css.js';
9
9
  function DropdownStatus({ children }) {
10
10
  return React.createElement("div", { className: styles.root }, children);
11
11
  }
12
- export const useDropdownStatus = ({ statusType, empty, loadingText, finishedText, filteringResultsText, errorText, recoveryText, isEmpty, isNoMatch, noMatch, onRecoveryClick, hasRecoveryCallback = false, errorIconAriaLabel, }) => {
12
+ export const useDropdownStatus = ({ statusType, empty, loadingText, finishedText, filteringResultsText, errorText, recoveryText, isEmpty, isNoMatch, noMatch, onRecoveryClick, hasRecoveryCallback = false, errorIconAriaLabel, recoveryButtonId, }) => {
13
13
  const previousStatusType = usePrevious(statusType);
14
14
  const statusResult = { isSticky: true, content: null, hasRecoveryButton: false };
15
15
  if (statusType === 'loading') {
@@ -20,7 +20,7 @@ export const useDropdownStatus = ({ statusType, empty, loadingText, finishedText
20
20
  statusResult.content = (React.createElement("span", null,
21
21
  React.createElement(InternalStatusIndicator, { type: "error", __display: "inline", __animate: previousStatusType !== 'error', iconAriaLabel: errorIconAriaLabel }, errorText),
22
22
  ' ',
23
- statusResult.hasRecoveryButton && (React.createElement(InternalLink, { onFollow: () => fireNonCancelableEvent(onRecoveryClick), variant: "recovery", className: styles.recovery }, recoveryText))));
23
+ statusResult.hasRecoveryButton && (React.createElement(InternalLink, { id: recoveryButtonId, onFollow: () => fireNonCancelableEvent(onRecoveryClick), variant: "recovery", className: styles.recovery }, recoveryText))));
24
24
  }
25
25
  else if (isEmpty && empty) {
26
26
  statusResult.content = empty;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AAGzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAqBrC,SAAS,cAAc,CAAC,EAAE,QAAQ,EAAiC;IACjE,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,QAAQ,CAAO,CAAC;AACvD,CAAC;AAuBD,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,EACnD,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,mBAAmB,GAAG,KAAK,EAC3B,kBAAkB,GACnB,EAAwB,EAAE;IACzB,MAAM,kBAAkB,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACnD,MAAM,YAAY,GAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;IAEvG,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,YAAY,CAAC,OAAO,GAAG,oBAAC,uBAAuB,IAAC,IAAI,EAAE,SAAS,IAAG,WAAW,CAA2B,CAAC;IAC3G,CAAC;SAAM,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QAClC,YAAY,CAAC,iBAAiB,GAAG,CAAC,CAAC,YAAY,IAAI,mBAAmB,CAAC;QACvE,YAAY,CAAC,OAAO,GAAG,CACrB;YACE,oBAAC,uBAAuB,IACtB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,kBAAkB,KAAK,OAAO,EACzC,aAAa,EAAE,kBAAkB,IAEhC,SAAS,CACc;YAAC,GAAG;YAC7B,YAAY,CAAC,iBAAiB,IAAI,CACjC,oBAAC,YAAY,IACX,QAAQ,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,eAAe,CAAC,EACvD,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,MAAM,CAAC,QAAQ,IAEzB,YAAY,CACA,CAChB,CACI,CACR,CAAC;IACJ,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;IAC/B,CAAC;SAAM,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QAChC,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IACjC,CAAC;SAAM,IAAI,oBAAoB,EAAE,CAAC;QAChC,YAAY,CAAC,OAAO,GAAG,oBAAoB,CAAC;IAC9C,CAAC;SAAM,IAAI,UAAU,KAAK,UAAU,IAAI,YAAY,EAAE,CAAC;QACrD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC;QACpC,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,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';\n\nimport InternalLink from '../../../link/internal';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { DropdownStatusProps } from '../../../types/dropdown-status';\nimport { NonCancelableEventHandler } from '../../../types/events';\nimport { fireNonCancelableEvent } from '../../events';\nimport { usePrevious } from '../../hooks/use-previous';\n\nimport styles from './styles.css.js';\n\nexport interface DropdownStatusPropsExtended extends DropdownStatusProps {\n isEmpty?: boolean;\n isNoMatch?: boolean;\n noMatch?: React.ReactNode;\n filteringResultsText?: string;\n /**\n * Called when the user clicks the recovery button placed at the\n * bottom of the dropdown list in the error state. Use this to\n * retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n /**\n * Determines if retry button should be rendered\n * in case recoveryText was automatically provided by i18n.\n */\n hasRecoveryCallback?: boolean;\n}\n\nfunction DropdownStatus({ children }: { children: React.ReactNode }) {\n return <div className={styles.root}>{children}</div>;\n}\n\ntype UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n filteringResultsText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n hasRecoveryCallback,\n onRecoveryClick,\n}: DropdownStatusPropsExtended) => DropdownStatusResult;\n\nexport interface DropdownStatusResult {\n isSticky: boolean;\n content: React.ReactNode | null;\n hasRecoveryButton: boolean;\n}\n\nexport const useDropdownStatus: UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n filteringResultsText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n hasRecoveryCallback = false,\n errorIconAriaLabel,\n}): DropdownStatusResult => {\n const previousStatusType = usePrevious(statusType);\n const statusResult: DropdownStatusResult = { isSticky: true, content: null, hasRecoveryButton: false };\n\n if (statusType === 'loading') {\n statusResult.content = <InternalStatusIndicator type={'loading'}>{loadingText}</InternalStatusIndicator>;\n } else if (statusType === 'error') {\n statusResult.hasRecoveryButton = !!recoveryText && hasRecoveryCallback;\n statusResult.content = (\n <span>\n <InternalStatusIndicator\n type=\"error\"\n __display=\"inline\"\n __animate={previousStatusType !== 'error'}\n iconAriaLabel={errorIconAriaLabel}\n >\n {errorText}\n </InternalStatusIndicator>{' '}\n {statusResult.hasRecoveryButton && (\n <InternalLink\n onFollow={() => fireNonCancelableEvent(onRecoveryClick)}\n variant=\"recovery\"\n className={styles.recovery}\n >\n {recoveryText}\n </InternalLink>\n )}\n </span>\n );\n } else if (isEmpty && empty) {\n statusResult.content = empty;\n } else if (isNoMatch && noMatch) {\n statusResult.content = noMatch;\n } else if (filteringResultsText) {\n statusResult.content = filteringResultsText;\n } else if (statusType === 'finished' && finishedText) {\n statusResult.content = finishedText;\n statusResult.isSticky = false;\n }\n\n return statusResult;\n};\n\nexport default DropdownStatus;\n\n// Backward-compatibility re-export for consumers importing this public type from the internal path.\nexport { DropdownStatusProps } from '../../../types/dropdown-status';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/dropdown-status/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AAGzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA0BrC,SAAS,cAAc,CAAC,EAAE,QAAQ,EAAiC;IACjE,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI,IAAG,QAAQ,CAAO,CAAC;AACvD,CAAC;AAwBD,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,EACnD,UAAU,EACV,KAAK,EACL,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,OAAO,EACP,SAAS,EACT,OAAO,EACP,eAAe,EACf,mBAAmB,GAAG,KAAK,EAC3B,kBAAkB,EAClB,gBAAgB,GACjB,EAAwB,EAAE;IACzB,MAAM,kBAAkB,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACnD,MAAM,YAAY,GAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC;IAEvG,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,YAAY,CAAC,OAAO,GAAG,oBAAC,uBAAuB,IAAC,IAAI,EAAE,SAAS,IAAG,WAAW,CAA2B,CAAC;IAC3G,CAAC;SAAM,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QAClC,YAAY,CAAC,iBAAiB,GAAG,CAAC,CAAC,YAAY,IAAI,mBAAmB,CAAC;QACvE,YAAY,CAAC,OAAO,GAAG,CACrB;YACE,oBAAC,uBAAuB,IACtB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,kBAAkB,KAAK,OAAO,EACzC,aAAa,EAAE,kBAAkB,IAEhC,SAAS,CACc;YAAC,GAAG;YAC7B,YAAY,CAAC,iBAAiB,IAAI,CACjC,oBAAC,YAAY,IACX,EAAE,EAAE,gBAAgB,EACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,eAAe,CAAC,EACvD,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,MAAM,CAAC,QAAQ,IAEzB,YAAY,CACA,CAChB,CACI,CACR,CAAC;IACJ,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;IAC/B,CAAC;SAAM,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QAChC,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IACjC,CAAC;SAAM,IAAI,oBAAoB,EAAE,CAAC;QAChC,YAAY,CAAC,OAAO,GAAG,oBAAoB,CAAC;IAC9C,CAAC;SAAM,IAAI,UAAU,KAAK,UAAU,IAAI,YAAY,EAAE,CAAC;QACrD,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC;QACpC,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;IAChC,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC,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';\n\nimport InternalLink from '../../../link/internal';\nimport InternalStatusIndicator from '../../../status-indicator/internal';\nimport { DropdownStatusProps } from '../../../types/dropdown-status';\nimport { NonCancelableEventHandler } from '../../../types/events';\nimport { fireNonCancelableEvent } from '../../events';\nimport { usePrevious } from '../../hooks/use-previous';\n\nimport styles from './styles.css.js';\n\nexport interface DropdownStatusPropsExtended extends DropdownStatusProps {\n isEmpty?: boolean;\n isNoMatch?: boolean;\n noMatch?: React.ReactNode;\n filteringResultsText?: string;\n /**\n * Called when the user clicks the recovery button placed at the\n * bottom of the dropdown list in the error state. Use this to\n * retry a failed request or provide another option for the user\n * to recover from the error.\n */\n onRecoveryClick?: NonCancelableEventHandler;\n /**\n * Determines if retry button should be rendered\n * in case recoveryText was automatically provided by i18n.\n */\n hasRecoveryCallback?: boolean;\n /**\n * Optional `id` for the recovery button, so that it can be referenced\n * through `aria-activedescendant` while focus stays in a filter input.\n */\n recoveryButtonId?: string;\n}\n\nfunction DropdownStatus({ children }: { children: React.ReactNode }) {\n return <div className={styles.root}>{children}</div>;\n}\n\ntype UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n filteringResultsText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n hasRecoveryCallback,\n onRecoveryClick,\n recoveryButtonId,\n}: DropdownStatusPropsExtended) => DropdownStatusResult;\n\nexport interface DropdownStatusResult {\n isSticky: boolean;\n content: React.ReactNode | null;\n hasRecoveryButton: boolean;\n}\n\nexport const useDropdownStatus: UseDropdownStatus = ({\n statusType,\n empty,\n loadingText,\n finishedText,\n filteringResultsText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n onRecoveryClick,\n hasRecoveryCallback = false,\n errorIconAriaLabel,\n recoveryButtonId,\n}): DropdownStatusResult => {\n const previousStatusType = usePrevious(statusType);\n const statusResult: DropdownStatusResult = { isSticky: true, content: null, hasRecoveryButton: false };\n\n if (statusType === 'loading') {\n statusResult.content = <InternalStatusIndicator type={'loading'}>{loadingText}</InternalStatusIndicator>;\n } else if (statusType === 'error') {\n statusResult.hasRecoveryButton = !!recoveryText && hasRecoveryCallback;\n statusResult.content = (\n <span>\n <InternalStatusIndicator\n type=\"error\"\n __display=\"inline\"\n __animate={previousStatusType !== 'error'}\n iconAriaLabel={errorIconAriaLabel}\n >\n {errorText}\n </InternalStatusIndicator>{' '}\n {statusResult.hasRecoveryButton && (\n <InternalLink\n id={recoveryButtonId}\n onFollow={() => fireNonCancelableEvent(onRecoveryClick)}\n variant=\"recovery\"\n className={styles.recovery}\n >\n {recoveryText}\n </InternalLink>\n )}\n </span>\n );\n } else if (isEmpty && empty) {\n statusResult.content = empty;\n } else if (isNoMatch && noMatch) {\n statusResult.content = noMatch;\n } else if (filteringResultsText) {\n statusResult.content = filteringResultsText;\n } else if (statusType === 'finished' && finishedText) {\n statusResult.content = finishedText;\n statusResult.isSticky = false;\n }\n\n return statusResult;\n};\n\nexport default DropdownStatus;\n\n// Backward-compatibility re-export for consumers importing this public type from the internal path.\nexport { DropdownStatusProps } from '../../../types/dropdown-status';\n"]}
@@ -0,0 +1,28 @@
1
+ import { OptionDefinition } from '../../../../types/option';
2
+ import { DropdownOption } from '../../option/interfaces';
3
+ export type SelectionType = 'single' | 'multi';
4
+ export interface GroupState {
5
+ selected: boolean;
6
+ indeterminate: boolean;
7
+ }
8
+ /**
9
+ * Describes how a list selects options. Implementations are pure functions of their inputs.
10
+ */
11
+ export interface SelectionModel {
12
+ /** Drives aria-multiselectable and the row style. */
13
+ selectionType: SelectionType;
14
+ /** Whether group headers (and select-all) can be highlighted and chosen. */
15
+ interactiveGroups: boolean;
16
+ /**
17
+ * The selected options. Rows are matched to them by `value` (the first option with a matching value wins),
18
+ * so this is the single source of truth for which rows render as selected.
19
+ */
20
+ selectedOptions: ReadonlyArray<OptionDefinition>;
21
+ /** The checkbox state of a group header or select-all row. Other options are neither selected nor indeterminate. */
22
+ getGroupState(option: DropdownOption): GroupState;
23
+ /**
24
+ * Returns the selection that results from the user choosing `option`.
25
+ * Does not check whether `option` is disabled, read-only or non-interactive; callers must do that first.
26
+ */
27
+ getNextSelection(option: DropdownOption): ReadonlyArray<OptionDefinition>;
28
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/listbox/selection/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qDAAqD;IACrD,aAAa,EAAE,aAAa,CAAC;IAC7B,4EAA4E;IAC5E,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,eAAe,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAEjD,oHAAoH;IACpH,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC3E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../../src/internal/components/listbox/selection/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { OptionDefinition } from '../../../../types/option';\nimport { DropdownOption } from '../../option/interfaces';\n\nexport type SelectionType = 'single' | 'multi';\n\nexport interface GroupState {\n selected: boolean;\n indeterminate: boolean;\n}\n\n/**\n * Describes how a list selects options. Implementations are pure functions of their inputs.\n */\nexport interface SelectionModel {\n /** Drives aria-multiselectable and the row style. */\n selectionType: SelectionType;\n /** Whether group headers (and select-all) can be highlighted and chosen. */\n interactiveGroups: boolean;\n /**\n * The selected options. Rows are matched to them by `value` (the first option with a matching value wins),\n * so this is the single source of truth for which rows render as selected.\n */\n selectedOptions: ReadonlyArray<OptionDefinition>;\n\n /** The checkbox state of a group header or select-all row. Other options are neither selected nor indeterminate. */\n getGroupState(option: DropdownOption): GroupState;\n /**\n * Returns the selection that results from the user choosing `option`.\n * Does not check whether `option` is disabled, read-only or non-interactive; callers must do that first.\n */\n getNextSelection(option: DropdownOption): ReadonlyArray<OptionDefinition>;\n}\n"]}
@@ -0,0 +1,24 @@
1
+ import { OptionDefinition } from '../../../../types/option';
2
+ import { DropdownOption } from '../../option/interfaces';
3
+ import { SelectionModel } from './interfaces';
4
+ interface MultiSelectionConfig {
5
+ /** The options the user can currently see. Choosing a group toggles only its visible, enabled children. */
6
+ options: ReadonlyArray<DropdownOption>;
7
+ /**
8
+ * All options, including the ones hidden by filtering. Select-all keeps hidden selected options and
9
+ * reports "all selected" against this list. Defaults to `options`.
10
+ */
11
+ allOptions?: ReadonlyArray<DropdownOption>;
12
+ /** Whether group headers can be highlighted and chosen. */
13
+ interactiveGroups?: boolean;
14
+ }
15
+ /**
16
+ * Any number of options. Choosing an option toggles it. Choosing a group toggles its visible, enabled
17
+ * children. Choosing select-all toggles every visible, enabled option.
18
+ */
19
+ export declare function multiSelection(selectedOptions: ReadonlyArray<OptionDefinition>, {
20
+ options,
21
+ allOptions,
22
+ interactiveGroups
23
+ }: MultiSelectionConfig): SelectionModel;
24
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-selection.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/listbox/selection/multi-selection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAe,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EAAc,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,UAAU,oBAAoB;IAC5B,2GAA2G;IAC3G,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC3C,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAOD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,eAAe,EAAE,aAAa,CAAC,gBAAgB,CAAC,EAChD,EAAE,OAAO,EAAE,UAAoB,EAAE,iBAAyB,EAAE,EAAE,oBAAoB,GACjF,cAAc,CA0DhB"}
@@ -0,0 +1,60 @@
1
+ import { isGroup } from '../../option/utils/filter-options';
2
+ import { findOptionIndex } from '../utils/connect-options';
3
+ const nonParentOptions = (options) => options
4
+ .filter(item => item.type !== 'parent' && item.type !== 'select-all')
5
+ .map(item => item.option);
6
+ /**
7
+ * Any number of options. Choosing an option toggles it. Choosing a group toggles its visible, enabled
8
+ * children. Choosing select-all toggles every visible, enabled option.
9
+ */
10
+ export function multiSelection(selectedOptions, { options, allOptions = options, interactiveGroups = false }) {
11
+ const selectedValues = new Set(selectedOptions.map(option => option.value));
12
+ const visible = nonParentOptions(options);
13
+ const all = nonParentOptions(allOptions);
14
+ const isSomeSelected = selectedOptions.length > 0;
15
+ const isAllSelected = all.every(option => selectedValues.has(option.value));
16
+ const isAllVisibleSelectableSelected = isSomeSelected && visible.every(option => option.disabled || selectedValues.has(option.value));
17
+ const getOptionGroupState = (group) => {
18
+ const totalSelected = group.options.filter(item => !!item.value && selectedValues.has(item.value)).length;
19
+ const hasSelected = totalSelected > 0;
20
+ const allSelected = totalSelected === group.options.length;
21
+ return { selected: hasSelected && allSelected && interactiveGroups, indeterminate: hasSelected && !allSelected };
22
+ };
23
+ const getGroupState = (option) => {
24
+ if (option.type === 'select-all') {
25
+ return { selected: isAllSelected, indeterminate: !isAllSelected && isSomeSelected };
26
+ }
27
+ return isGroup(option.option) ? getOptionGroupState(option.option) : { selected: false, indeterminate: false };
28
+ };
29
+ const toggleAll = () => {
30
+ const visibleValues = new Set(visible.map(option => option.value));
31
+ return isAllVisibleSelectableSelected
32
+ ? selectedOptions.filter(option => !visibleValues.has(option.value))
33
+ : all.filter(({ disabled, value }) => selectedValues.has(value) || (!disabled && visibleValues.has(value)));
34
+ };
35
+ const toggle = (toToggle) => {
36
+ // Disabled options count as selected, so a group with a disabled child doesn't get stuck in one direction.
37
+ const allSelected = toToggle.every(item => findOptionIndex(selectedOptions, item) > -1 || item.disabled);
38
+ if (allSelected) {
39
+ return selectedOptions.filter(option => findOptionIndex(toToggle, option) === -1);
40
+ }
41
+ return selectedOptions.filter(item => findOptionIndex(toToggle, item) === -1).concat(toToggle);
42
+ };
43
+ return {
44
+ selectionType: 'multi',
45
+ interactiveGroups,
46
+ selectedOptions,
47
+ getGroupState,
48
+ getNextSelection: (option) => {
49
+ if (option.type === 'select-all') {
50
+ return toggleAll();
51
+ }
52
+ if (isGroup(option.option)) {
53
+ const visibleChildren = option.option.options.filter(item => findOptionIndex(visible, item) > -1 && !item.disabled);
54
+ return toggle(visibleChildren);
55
+ }
56
+ return toggle([option.option]);
57
+ },
58
+ };
59
+ }
60
+ //# sourceMappingURL=multi-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-selection.js","sourceRoot":"","sources":["../../../../../../src/internal/components/listbox/selection/multi-selection.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAe3D,MAAM,gBAAgB,GAAG,CAAC,OAAsC,EAAE,EAAE,CAClE,OAAO;KACJ,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC;KACpE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAA0B,CAAC,CAAC;AAElD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,eAAgD,EAChD,EAAE,OAAO,EAAE,UAAU,GAAG,OAAO,EAAE,iBAAiB,GAAG,KAAK,EAAwB;IAElF,MAAM,cAAc,GAAG,IAAI,GAAG,CAAqB,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAChG,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,GAAG,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAEzC,MAAM,cAAc,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5E,MAAM,8BAA8B,GAClC,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAEjG,MAAM,mBAAmB,GAAG,CAAC,KAAkB,EAAc,EAAE;QAC7D,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QAC1G,MAAM,WAAW,GAAG,aAAa,GAAG,CAAC,CAAC;QACtC,MAAM,WAAW,GAAG,aAAa,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAC3D,OAAO,EAAE,QAAQ,EAAE,WAAW,IAAI,WAAW,IAAI,iBAAiB,EAAE,aAAa,EAAE,WAAW,IAAI,CAAC,WAAW,EAAE,CAAC;IACnH,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,CAAC,MAAsB,EAAc,EAAE;QAC3D,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YACjC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,aAAa,IAAI,cAAc,EAAE,CAAC;QACtF,CAAC;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IACjH,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,OAAO,8BAA8B;YACnC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACpE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChH,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,CAAC,QAAyC,EAAE,EAAE;QAC3D,2GAA2G;QAC3G,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,eAAe,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzG,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACjG,CAAC,CAAC;IAEF,OAAO;QACL,aAAa,EAAE,OAAO;QACtB,iBAAiB;QACjB,eAAe;QACf,aAAa;QACb,gBAAgB,EAAE,CAAC,MAAsB,EAAE,EAAE;YAC3C,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;gBACjC,OAAO,SAAS,EAAE,CAAC;YACrB,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3B,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAClD,IAAI,CAAC,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAC9D,CAAC;gBACF,OAAO,MAAM,CAAC,eAAe,CAAC,CAAC;YACjC,CAAC;YACD,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { OptionDefinition, OptionGroup } from '../../../../types/option';\nimport { DropdownOption } from '../../option/interfaces';\nimport { isGroup } from '../../option/utils/filter-options';\nimport { findOptionIndex } from '../utils/connect-options';\nimport { GroupState, SelectionModel } from './interfaces';\n\ninterface MultiSelectionConfig {\n /** The options the user can currently see. Choosing a group toggles only its visible, enabled children. */\n options: ReadonlyArray<DropdownOption>;\n /**\n * All options, including the ones hidden by filtering. Select-all keeps hidden selected options and\n * reports \"all selected\" against this list. Defaults to `options`.\n */\n allOptions?: ReadonlyArray<DropdownOption>;\n /** Whether group headers can be highlighted and chosen. */\n interactiveGroups?: boolean;\n}\n\nconst nonParentOptions = (options: ReadonlyArray<DropdownOption>) =>\n options\n .filter(item => item.type !== 'parent' && item.type !== 'select-all')\n .map(item => item.option as OptionDefinition);\n\n/**\n * Any number of options. Choosing an option toggles it. Choosing a group toggles its visible, enabled\n * children. Choosing select-all toggles every visible, enabled option.\n */\nexport function multiSelection(\n selectedOptions: ReadonlyArray<OptionDefinition>,\n { options, allOptions = options, interactiveGroups = false }: MultiSelectionConfig\n): SelectionModel {\n const selectedValues = new Set<string | undefined>(selectedOptions.map(option => option.value));\n const visible = nonParentOptions(options);\n const all = nonParentOptions(allOptions);\n\n const isSomeSelected = selectedOptions.length > 0;\n const isAllSelected = all.every(option => selectedValues.has(option.value));\n const isAllVisibleSelectableSelected =\n isSomeSelected && visible.every(option => option.disabled || selectedValues.has(option.value));\n\n const getOptionGroupState = (group: OptionGroup): GroupState => {\n const totalSelected = group.options.filter(item => !!item.value && selectedValues.has(item.value)).length;\n const hasSelected = totalSelected > 0;\n const allSelected = totalSelected === group.options.length;\n return { selected: hasSelected && allSelected && interactiveGroups, indeterminate: hasSelected && !allSelected };\n };\n\n const getGroupState = (option: DropdownOption): GroupState => {\n if (option.type === 'select-all') {\n return { selected: isAllSelected, indeterminate: !isAllSelected && isSomeSelected };\n }\n return isGroup(option.option) ? getOptionGroupState(option.option) : { selected: false, indeterminate: false };\n };\n\n const toggleAll = () => {\n const visibleValues = new Set(visible.map(option => option.value));\n return isAllVisibleSelectableSelected\n ? selectedOptions.filter(option => !visibleValues.has(option.value))\n : all.filter(({ disabled, value }) => selectedValues.has(value) || (!disabled && visibleValues.has(value)));\n };\n\n const toggle = (toToggle: ReadonlyArray<OptionDefinition>) => {\n // Disabled options count as selected, so a group with a disabled child doesn't get stuck in one direction.\n const allSelected = toToggle.every(item => findOptionIndex(selectedOptions, item) > -1 || item.disabled);\n if (allSelected) {\n return selectedOptions.filter(option => findOptionIndex(toToggle, option) === -1);\n }\n return selectedOptions.filter(item => findOptionIndex(toToggle, item) === -1).concat(toToggle);\n };\n\n return {\n selectionType: 'multi',\n interactiveGroups,\n selectedOptions,\n getGroupState,\n getNextSelection: (option: DropdownOption) => {\n if (option.type === 'select-all') {\n return toggleAll();\n }\n if (isGroup(option.option)) {\n const visibleChildren = option.option.options.filter(\n item => findOptionIndex(visible, item) > -1 && !item.disabled\n );\n return toggle(visibleChildren);\n }\n return toggle([option.option]);\n },\n };\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { OptionDefinition } from '../../../../types/option';
2
+ import { SelectionModel } from './interfaces';
3
+ /**
4
+ * One option at a time. Choosing the selected option again keeps it selected.
5
+ * Only the first entry of `selectedOptions` is used. Group headers are never selectable.
6
+ */
7
+ export declare function singleSelection(selectedOptions: ReadonlyArray<OptionDefinition>): SelectionModel;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-selection.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/listbox/selection/single-selection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;GAGG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAmBhG"}