@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
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvH,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AACtG,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACjH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAA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,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACzB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EAClB,iBAAiB,EAAE,cAAc,CAAC,OAAO,KAAK,IAAI,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,GAEJ;YACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,CACqB,CAC9B,CAAC;AACJ,CAAC,CACF,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, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { useAnnouncement } from '../internal/components/listbox/use-announcement';\nimport { checkOptionValueField } from '../internal/components/listbox/utils/check-option-value-field';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnUnsupportedGroupedControlProps } from '../internal/grouped-control/dev-warnings';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { OptionGroup } from '../types/option';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { composeDropdownContent } from './utils/dropdown-customization';\nimport { useLoadItems } from './utils/use-load-items';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef,\n renderOption,\n renderDropdownHeader,\n renderDropdownFooter,\n dropdownRole,\n dropdownAriaDescribedby,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const groupedControlProps = useGroupedControlContext();\n\n warnOnUnsupportedGroupedControlProps({\n isGrouped: !!groupedControlProps.position,\n componentName: 'Select',\n invalid: formFieldContext.invalid,\n warning: formFieldContext.warning,\n readOnly,\n expandToViewport,\n });\n\n // When grouped, the dropdown is portaled regardless of the public\n // `expandToViewport` prop so it escapes the control slot's stacking context\n // and paints over the group's inline label (which the focus ring stays under).\n const effectiveExpandToViewport = expandToViewport || !!groupedControlProps.position;\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n options,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth)\n );\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n focusActiveRef,\n closeDropdown,\n } = useSelect({\n selectedOptions: selectedOption ? [selectedOption] : [],\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n dropdownRole,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none' && !readOnly,\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const dropdownContentProps: SelectProps.DropdownContentProps = { filterText: filteringValue, closeDropdown };\n const customDropdownHeader = renderDropdownHeader?.(dropdownContentProps);\n const customDropdownFooter = renderDropdownFooter?.(dropdownContentProps);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n groupedControlProps={groupedControlProps}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const statusFooter = dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null;\n const { header: dropdownHeader, footer: dropdownFooter } = composeDropdownContent({\n filter,\n customDropdownHeader,\n customDropdownFooter,\n statusFooter,\n dropdownHeaderClass: styles['dropdown-header'],\n dropdownFooterClass: styles['dropdown-footer'],\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby),\n ariaRequired,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <ResetGroupedControlContext>\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.ariaRole\n ? joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby)\n : undefined\n }\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={getDropdownMinWidth({ expandToViewport: effectiveExpandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={dropdownHeader}\n onMouseDown={handleMouseDown}\n footer={dropdownFooter}\n expandToViewport={effectiveExpandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n </ResetGroupedControlContext>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvH,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;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,CAAC,EAC5F,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,EACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,cAAc,EACtB,WAAW,EAAE,eAAe,EAC5B,MAAM,EAAE,cAAc,EACtB,gBAAgB,EAAE,yBAAyB;gBAC3C,qEAAqE;gBACrE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,EACzC,OAAO,EACL,oBAAC,aAAa,IACZ,UAAU,EACR,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CACzB,oBAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,QAAQ,GAAI,CAClF,CAAC,CAAC,CAAC,IAAI,EAEV,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EAClB,iBAAiB,EAAE,cAAc,CAAC,OAAO,KAAK,IAAI,EAClD,mBAAmB,EAAE,YAAY,EACjC,aAAa,EAAE,aAAa,GAC5B,GAEJ;YACF,6BAAK,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,IACrC,SAAS,IAAI,eAAe,CACzB,CACF,CACqB,CAC9B,CAAC;AACJ,CAAC,CACF,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, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useResizeObserver, useUniqueId, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport Dropdown from '../dropdown/internal';\nimport { useInternalI18n } from '../i18n/context.js';\nimport { getBaseProps } from '../internal/base-component';\nimport { getBreakpointValue } from '../internal/breakpoints';\nimport DropdownFooter from '../internal/components/dropdown-footer';\nimport { useDropdownStatus } from '../internal/components/dropdown-status';\nimport { singleSelection } from '../internal/components/listbox/selection/single-selection';\nimport { useAnnouncement } from '../internal/components/listbox/use-announcement';\nimport { checkOptionValueField } from '../internal/components/listbox/utils/check-option-value-field';\nimport { prepareOptions } from '../internal/components/option/utils/prepare-options.js';\nimport { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnUnsupportedGroupedControlProps } from '../internal/grouped-control/dev-warnings';\nimport checkControlled from '../internal/hooks/check-controlled';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useLoadItems } from '../internal/hooks/use-load-items';\nimport { SomeRequired } from '../internal/types';\nimport { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';\nimport { joinStrings } from '../internal/utils/strings/join-strings.js';\nimport { OptionGroup } from '../types/option';\nimport { SelectProps } from './interfaces';\nimport Filter from './parts/filter';\nimport PlainList, { SelectListProps } from './parts/plain-list';\nimport Trigger from './parts/trigger';\nimport VirtualList from './parts/virtual-list';\nimport { composeDropdownContent } from './utils/dropdown-customization';\nimport { useNativeSearch } from './utils/use-native-search';\nimport { useSelect } from './utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface InternalSelectProps extends SomeRequired<SelectProps, 'options'>, InternalBaseComponentProps {\n __inFilteringToken?: 'root' | 'nested';\n}\n\nconst InternalSelect = React.forwardRef(\n (\n {\n options,\n filteringType = 'none',\n filteringPlaceholder,\n filteringAriaLabel,\n filteringClearAriaLabel,\n filteringResultsText,\n inlineLabelText,\n ariaRequired,\n placeholder,\n disabled,\n readOnly,\n ariaLabel,\n statusType = 'finished',\n empty,\n loadingText,\n finishedText,\n errorText,\n noMatch,\n triggerVariant = 'label',\n renderHighlightedAriaLive,\n selectedOption,\n onBlur,\n onFocus,\n onLoadItems,\n onChange,\n virtualScroll,\n expandToViewport,\n autoFocus,\n __inFilteringToken,\n __internalRootRef,\n renderOption,\n renderDropdownHeader,\n renderDropdownFooter,\n dropdownRole,\n dropdownAriaDescribedby,\n ...restProps\n }: InternalSelectProps,\n externalRef: React.Ref<SelectProps.Ref>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n const groupedControlProps = useGroupedControlContext();\n\n warnOnUnsupportedGroupedControlProps({\n isGrouped: !!groupedControlProps.position,\n componentName: 'Select',\n invalid: formFieldContext.invalid,\n warning: formFieldContext.warning,\n readOnly,\n expandToViewport,\n });\n\n // When grouped, the dropdown is portaled regardless of the public\n // `expandToViewport` prop so it escapes the control slot's stacking context\n // and paints over the group's inline label (which the focus ring stays under).\n const effectiveExpandToViewport = expandToViewport || !!groupedControlProps.position;\n\n const i18n = useInternalI18n('select');\n const errorIconAriaLabel = i18n('errorIconAriaLabel', restProps.errorIconAriaLabel);\n const selectedAriaLabel = i18n('selectedAriaLabel', restProps.selectedAriaLabel);\n const recoveryText = i18n('recoveryText', restProps.recoveryText);\n\n if (restProps.recoveryText && !onLoadItems) {\n warnOnce('Select', '`onLoadItems` must be provided for `recoveryText` to be displayed.');\n }\n\n const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({\n onLoadItems,\n isEmpty: options.length === 0,\n statusType,\n });\n\n checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);\n\n checkOptionValueField('Select', 'options', options);\n\n const [filteringValue, setFilteringValue] = useState('');\n\n const { filteredOptions, parentMap, totalCount, matchesCount } = prepareOptions(\n options,\n filteringType,\n filteringValue\n );\n\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [triggerWidth, setTriggerWidth] = useState<number | null>(null);\n useResizeObserver(\n () => triggerRef.current,\n entry => setTriggerWidth(entry.borderBoxWidth)\n );\n\n const selfControlId = useUniqueId('trigger');\n const controlId = formFieldContext.controlId ?? selfControlId;\n\n const scrollToIndex = useRef<SelectListProps.SelectListRef>(null);\n const selectedOptions = selectedOption ? [selectedOption] : [];\n const {\n isOpen,\n highlightType,\n highlightedOption,\n highlightedIndex,\n getTriggerProps,\n getDropdownProps,\n getFilterProps,\n getMenuProps,\n getOptionProps,\n highlightOption,\n selectOption,\n announceSelected,\n focusActiveRef,\n closeDropdown,\n } = useSelect({\n selectedOptions,\n selection: singleSelection(selectedOptions),\n updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),\n options: filteredOptions,\n filteringType,\n onBlur,\n onFocus,\n externalRef,\n fireLoadItems,\n setFilteringValue,\n statusType,\n dropdownRole,\n });\n\n const handleNativeSearch = useNativeSearch({\n isEnabled: filteringType === 'none' && !readOnly,\n options: filteredOptions,\n highlightOption: !isOpen ? selectOption : highlightOption,\n highlightedOption: !isOpen ? selectedOption : highlightedOption?.option,\n });\n\n const selectAriaLabelId = useUniqueId('select-arialabel-');\n const footerId = useUniqueId('footer');\n\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const dropdownContentProps: SelectProps.DropdownContentProps = { filterText: filteringValue, closeDropdown };\n const customDropdownHeader = renderDropdownHeader?.(dropdownContentProps);\n const customDropdownFooter = renderDropdownFooter?.(dropdownContentProps);\n\n const filter = (\n <Filter\n clearAriaLabel={filteringClearAriaLabel}\n filteringType={filteringType}\n placeholder={filteringPlaceholder}\n ariaLabel={filteringAriaLabel}\n ariaRequired={ariaRequired}\n value={filteringValue}\n {...getFilterProps()}\n />\n );\n\n const trigger = (\n <Trigger\n renderOption={renderOption}\n ref={triggerRef}\n placeholder={placeholder}\n disabled={disabled}\n readOnly={readOnly}\n triggerVariant={triggerVariant}\n triggerProps={getTriggerProps(disabled, autoFocus)}\n selectedOption={selectedOption}\n isOpen={isOpen}\n inFilteringToken={__inFilteringToken}\n groupedControlProps={groupedControlProps}\n inlineLabelText={inlineLabelText}\n {...formFieldContext}\n controlId={controlId}\n ariaLabelledby={joinStrings(formFieldContext.ariaLabelledby, selectAriaLabelId)}\n />\n );\n\n const isEmpty = !options || options.length === 0;\n const isNoMatch = filteredOptions && filteredOptions.length === 0;\n const isFiltered =\n filteringType !== 'none' && filteringValue.length > 0 && filteredOptions && filteredOptions.length > 0;\n const filteredText = isFiltered ? filteringResultsText?.(matchesCount, totalCount) : undefined;\n\n const dropdownStatus = useDropdownStatus({\n statusType,\n empty,\n loadingText,\n finishedText,\n errorText,\n recoveryText,\n isEmpty,\n isNoMatch,\n noMatch,\n filteringResultsText: filteredText,\n errorIconAriaLabel,\n onRecoveryClick: () => {\n handleRecoveryClick();\n focusActiveRef();\n },\n hasRecoveryCallback: !!onLoadItems,\n });\n\n const statusFooter = dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null;\n const { header: dropdownHeader, footer: dropdownFooter } = composeDropdownContent({\n filter,\n customDropdownHeader,\n customDropdownFooter,\n statusFooter,\n dropdownHeaderClass: styles['dropdown-header'],\n dropdownFooterClass: styles['dropdown-footer'],\n });\n\n const menuProps = {\n ...getMenuProps(),\n onLoadMore: handleLoadMore,\n ariaLabelledby: joinStrings(selectAriaLabelId, controlId),\n ariaDescribedby: joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby),\n ariaRequired,\n };\n\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent: option => parentMap.get(option)?.option as undefined | OptionGroup,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const ListComponent = virtualScroll ? VirtualList : PlainList;\n\n const handleMouseDown = (event: React.MouseEvent) => {\n const target = event.target as HTMLElement;\n\n if (target !== document.activeElement) {\n // prevent currently focused element from losing it\n event.preventDefault();\n }\n };\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n\n const dropdownProps = getDropdownProps();\n\n const hasOptions = useRef(options.length > 0);\n hasOptions.current = hasOptions.current || options.length > 0;\n\n return (\n <ResetGroupedControlContext>\n <div\n {...baseProps}\n ref={mergedRef}\n className={clsx(styles.root, baseProps.className)}\n onKeyDown={handleNativeSearch}\n >\n <Dropdown\n {...dropdownProps}\n ariaLabelledby={dropdownProps.ariaRole ? joinStrings(selectAriaLabelId, controlId) : undefined}\n ariaDescribedby={\n dropdownProps.ariaRole\n ? joinStrings(dropdownStatus.content ? footerId : undefined, dropdownAriaDescribedby)\n : undefined\n }\n open={isOpen}\n stretchTriggerHeight={!!__inFilteringToken}\n minWidth={getDropdownMinWidth({ expandToViewport: effectiveExpandToViewport, triggerWidth })}\n maxWidth={getBreakpointValue('xxs')} // AWSUI-19898\n trigger={trigger}\n header={dropdownHeader}\n onMouseDown={handleMouseDown}\n footer={dropdownFooter}\n expandToViewport={effectiveExpandToViewport}\n // Forces dropdown position recalculation when new options are loaded\n contentKey={hasOptions.current.toString()}\n content={\n <ListComponent\n listBottom={\n !dropdownStatus.isSticky ? (\n <DropdownFooter content={isOpen ? dropdownStatus.content : null} id={footerId} />\n ) : null\n }\n renderOption={renderOption}\n menuProps={menuProps}\n getOptionProps={getOptionProps}\n filteredOptions={filteredOptions}\n filteringValue={filteringValue}\n ref={scrollToIndex}\n hasDropdownStatus={dropdownStatus.content !== null}\n screenReaderContent={announcement}\n highlightType={highlightType}\n />\n }\n />\n <div hidden={true} id={selectAriaLabelId}>\n {ariaLabel || inlineLabelText}\n </div>\n </div>\n </ResetGroupedControlContext>\n );\n }\n);\n\nexport default InternalSelect;\n"]}
@@ -5,5 +5,5 @@ export interface FilterProps extends InternalInputProps {
5
5
  ref?: React.Ref<HTMLInputElement>;
6
6
  filteringType: SelectProps.FilteringType;
7
7
  }
8
- declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "prefix" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "ariaLabel" | "ariaDescribedby" | "__internalRootRef" | "warning" | "ariaLabelledby" | "filteringType" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "styleClassNames" | "ariaRequired" | "controlId" | "inlineLabelText" | "suffix" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "clearAriaLabel" | "__startIcon" | "__onStartIconClick" | "__endIcon" | "__onEndIconClick" | "__noBorderRadius" | "__noBorder" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps" | "__fullWidth"> & React.RefAttributes<HTMLInputElement>>;
8
+ declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "style" | "disabled" | "className" | "id" | "name" | "type" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "placeholder" | "prefix" | "inputMode" | "autoFocus" | "value" | "autoComplete" | "readOnly" | "step" | "invalid" | "ariaLabel" | "ariaDescribedby" | "__internalRootRef" | "warning" | "ariaLabelledby" | "filteringType" | "__injectAnalyticsComponentMetadata" | "__skipNativeAttributesWarnings" | "styleClassNames" | "ariaRequired" | "controlId" | "inlineLabelText" | "suffix" | "nativeInputAttributes" | "disableBrowserAutocorrect" | "spellcheck" | "clearAriaLabel" | "__startIcon" | "__onStartIconClick" | "__endIcon" | "__onEndIconClick" | "__noBorderRadius" | "__inlineContent" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps" | "__fullWidth"> & React.RefAttributes<HTMLInputElement>>;
9
9
  export default Filter;
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/filter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAsB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC;CAC1C;AAED,QAAA,MAAM,MAAM,g3BA0BV,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/select/parts/filter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAsB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAClC,aAAa,EAAE,WAAW,CAAC,aAAa,CAAC;CAC1C;AAED,QAAA,MAAM,MAAM,q3BA0BV,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -1,26 +1,26 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "placeholder": "awsui_placeholder_dwuol_1mzf1_9",
5
- "disabled": "awsui_disabled_dwuol_1mzf1_14",
6
- "item": "awsui_item_dwuol_1mzf1_18",
7
- "checkbox": "awsui_checkbox_dwuol_1mzf1_22",
8
- "option-group": "awsui_option-group_dwuol_1mzf1_31",
9
- "filter": "awsui_filter_dwuol_1mzf1_35",
10
- "trigger": "awsui_trigger_dwuol_1mzf1_40",
11
- "layout-strut": "awsui_layout-strut_dwuol_1mzf1_46",
12
- "list-bottom": "awsui_list-bottom_dwuol_1mzf1_52",
13
- "selected-icon": "awsui_selected-icon_dwuol_1mzf1_56",
14
- "show-label-tag": "awsui_show-label-tag_dwuol_1mzf1_61",
15
- "inline-token-trigger": "awsui_inline-token-trigger_dwuol_1mzf1_65",
16
- "inline-token-list": "awsui_inline-token-list_dwuol_1mzf1_72",
17
- "inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_1mzf1_86",
18
- "inline-token-counter": "awsui_inline-token-counter_dwuol_1mzf1_92",
19
- "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_dwuol_1mzf1_96",
20
- "inline-label-wrapper": "awsui_inline-label-wrapper_dwuol_1mzf1_100",
21
- "inline-label": "awsui_inline-label_dwuol_1mzf1_96",
22
- "inline-label-disabled": "awsui_inline-label-disabled_dwuol_1mzf1_125",
23
- "inline-label-inline-tokens": "awsui_inline-label-inline-tokens_dwuol_1mzf1_129",
24
- "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_1mzf1_134"
4
+ "placeholder": "awsui_placeholder_dwuol_155nx_9",
5
+ "disabled": "awsui_disabled_dwuol_155nx_14",
6
+ "item": "awsui_item_dwuol_155nx_18",
7
+ "checkbox": "awsui_checkbox_dwuol_155nx_22",
8
+ "option-group": "awsui_option-group_dwuol_155nx_31",
9
+ "filter": "awsui_filter_dwuol_155nx_35",
10
+ "trigger": "awsui_trigger_dwuol_155nx_40",
11
+ "layout-strut": "awsui_layout-strut_dwuol_155nx_46",
12
+ "list-bottom": "awsui_list-bottom_dwuol_155nx_52",
13
+ "selected-icon": "awsui_selected-icon_dwuol_155nx_56",
14
+ "show-label-tag": "awsui_show-label-tag_dwuol_155nx_61",
15
+ "inline-token-trigger": "awsui_inline-token-trigger_dwuol_155nx_65",
16
+ "inline-token-list": "awsui_inline-token-list_dwuol_155nx_72",
17
+ "inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_155nx_86",
18
+ "inline-token-counter": "awsui_inline-token-counter_dwuol_155nx_92",
19
+ "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_dwuol_155nx_96",
20
+ "inline-label-wrapper": "awsui_inline-label-wrapper_dwuol_155nx_100",
21
+ "inline-label": "awsui_inline-label_dwuol_155nx_96",
22
+ "inline-label-disabled": "awsui_inline-label-disabled_dwuol_155nx_125",
23
+ "inline-label-inline-tokens": "awsui_inline-label-inline-tokens_dwuol_155nx_129",
24
+ "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_155nx_134"
25
25
  };
26
26
 
@@ -6,21 +6,21 @@
6
6
  /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
7
7
  /* Style used for links in slots/components that are text heavy, to help links stand out among
8
8
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
9
- .awsui_placeholder_dwuol_1mzf1_9:not(#\9) {
9
+ .awsui_placeholder_dwuol_155nx_9:not(#\9) {
10
10
  color: var(--color-text-input-placeholder-be5hpz, #656871);
11
11
  font-style: italic;
12
12
  -webkit-user-select: none;
13
13
  user-select: none;
14
14
  }
15
- .awsui_placeholder_dwuol_1mzf1_9.awsui_disabled_dwuol_1mzf1_14:not(#\9) {
15
+ .awsui_placeholder_dwuol_155nx_9.awsui_disabled_dwuol_155nx_14:not(#\9) {
16
16
  color: var(--color-text-input-placeholder-disabled-yuyrqn, #b4b4bb);
17
17
  }
18
18
 
19
- .awsui_item_dwuol_1mzf1_18:not(#\9) {
19
+ .awsui_item_dwuol_155nx_18:not(#\9) {
20
20
  display: flex;
21
21
  align-items: center;
22
22
  }
23
- .awsui_item_dwuol_1mzf1_18 > .awsui_checkbox_dwuol_1mzf1_22:not(#\9) {
23
+ .awsui_item_dwuol_155nx_18 > .awsui_checkbox_dwuol_155nx_22:not(#\9) {
24
24
  position: relative;
25
25
  min-block-size: var(--size-control-smkmln, 16px);
26
26
  min-inline-size: var(--size-control-smkmln, 16px);
@@ -29,48 +29,48 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
29
29
  margin-inline-end: var(--space-field-horizontal-d3xvls, 12px);
30
30
  }
31
31
 
32
- .awsui_option-group_dwuol_1mzf1_31:not(#\9):not(:first-child) {
32
+ .awsui_option-group_dwuol_155nx_31:not(#\9):not(:first-child) {
33
33
  margin-block-start: calc(-1 * var(--border-item-width-0d09z3, 2px));
34
34
  }
35
35
 
36
- .awsui_filter_dwuol_1mzf1_35:not(#\9) {
36
+ .awsui_filter_dwuol_155nx_35:not(#\9) {
37
37
  z-index: 4;
38
38
  flex-shrink: 0;
39
39
  }
40
40
 
41
- .awsui_trigger_dwuol_1mzf1_40:not(#\9) {
41
+ .awsui_trigger_dwuol_155nx_40:not(#\9) {
42
42
  white-space: nowrap;
43
43
  overflow: hidden;
44
44
  text-overflow: ellipsis;
45
45
  }
46
46
 
47
- .awsui_layout-strut_dwuol_1mzf1_46:not(#\9) {
47
+ .awsui_layout-strut_dwuol_155nx_46:not(#\9) {
48
48
  inline-size: 100%;
49
49
  position: relative;
50
50
  transform: translate3d(0, 0, 0);
51
51
  }
52
52
 
53
- .awsui_list-bottom_dwuol_1mzf1_52:not(#\9) {
53
+ .awsui_list-bottom_dwuol_155nx_52:not(#\9) {
54
54
  /* used in unit-tests */
55
55
  }
56
56
 
57
- .awsui_selected-icon_dwuol_1mzf1_56:not(#\9) {
57
+ .awsui_selected-icon_dwuol_155nx_56:not(#\9) {
58
58
  color: var(--color-item-selected-nhflqz, #006ce0);
59
59
  padding-inline-start: var(--space-xs-3yjatw, 8px);
60
60
  }
61
61
 
62
- .awsui_show-label-tag_dwuol_1mzf1_61 > .awsui_selected-icon_dwuol_1mzf1_56:not(#\9) {
62
+ .awsui_show-label-tag_dwuol_155nx_61 > .awsui_selected-icon_dwuol_155nx_56:not(#\9) {
63
63
  padding-inline-start: var(--space-scaled-s-srzhhj, 12px);
64
64
  }
65
65
 
66
- .awsui_inline-token-trigger_dwuol_1mzf1_65:not(#\9) {
66
+ .awsui_inline-token-trigger_dwuol_155nx_65:not(#\9) {
67
67
  display: flex;
68
68
  flex-wrap: nowrap;
69
69
  column-gap: var(--space-xxs-burh9x, 4px);
70
70
  inline-size: 100%;
71
71
  }
72
72
 
73
- .awsui_inline-token-list_dwuol_1mzf1_72:not(#\9) {
73
+ .awsui_inline-token-list_dwuol_155nx_72:not(#\9) {
74
74
  display: flex;
75
75
  flex-wrap: nowrap;
76
76
  align-items: center;
@@ -80,30 +80,30 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
80
80
  mask-image: linear-gradient(270deg, transparent, white 20px, white);
81
81
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
82
82
  }
83
- .awsui_inline-token-list_dwuol_1mzf1_72:not(#\9):dir(rtl) {
83
+ .awsui_inline-token-list_dwuol_155nx_72:not(#\9):dir(rtl) {
84
84
  mask-image: linear-gradient(-270deg, transparent, white 20px, white);
85
85
  }
86
86
 
87
- .awsui_inline-token-hidden-placeholder_dwuol_1mzf1_86:not(#\9) {
87
+ .awsui_inline-token-hidden-placeholder_dwuol_155nx_86:not(#\9) {
88
88
  position: absolute !important;
89
89
  inset-block-start: -9999px !important;
90
90
  inset-inline-start: -9999px !important;
91
91
  }
92
92
 
93
- .awsui_inline-token-counter_dwuol_1mzf1_92:not(#\9) {
93
+ .awsui_inline-token-counter_dwuol_155nx_92:not(#\9) {
94
94
  white-space: nowrap;
95
95
  }
96
96
 
97
- .awsui_inline-label-trigger-wrapper_dwuol_1mzf1_96:not(#\9) {
97
+ .awsui_inline-label-trigger-wrapper_dwuol_155nx_96:not(#\9) {
98
98
  margin-block-start: -7px;
99
99
  }
100
100
 
101
- .awsui_inline-label-wrapper_dwuol_1mzf1_100:not(#\9) {
101
+ .awsui_inline-label-wrapper_dwuol_155nx_100:not(#\9) {
102
102
  margin-block-start: calc(var(--space-scaled-xs-65ylh6, 8px) * -1);
103
103
  }
104
104
 
105
- .awsui_inline-label_dwuol_1mzf1_96:not(#\9) {
106
- background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-ka4djm, var(--color-background-layout-main-lursna, #ffffff)), var(--color-background-input-default-dfjnbd, #ffffff));
105
+ .awsui_inline-label_dwuol_155nx_96:not(#\9) {
106
+ background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-8i8exb, var(--color-background-layout-main-lursna, #ffffff)), var(--color-background-input-default-dfjnbd, #ffffff));
107
107
  border-start-start-radius: 2px;
108
108
  border-start-end-radius: 2px;
109
109
  border-end-start-radius: 2px;
@@ -123,15 +123,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
123
123
  max-inline-size: calc(100% - 2 * var(--space-field-horizontal-d3xvls, 12px));
124
124
  z-index: 1;
125
125
  }
126
- .awsui_inline-label-disabled_dwuol_1mzf1_125:not(#\9) {
127
- background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-ka4djm, var(--color-background-layout-main-lursna, #ffffff)), var(--color-background-input-disabled-obdkw7, #ebebf0));
126
+ .awsui_inline-label-disabled_dwuol_155nx_125:not(#\9) {
127
+ background: linear-gradient(to bottom, var(--awsui-inline-label-background-color-8i8exb, var(--color-background-layout-main-lursna, #ffffff)), var(--color-background-input-disabled-obdkw7, #ebebf0));
128
128
  }
129
129
 
130
- .awsui_inline-label-inline-tokens_dwuol_1mzf1_129:not(#\9) {
130
+ .awsui_inline-label-inline-tokens_dwuol_155nx_129:not(#\9) {
131
131
  padding-block-end: 0;
132
132
  transform: translateY(-1.5px);
133
133
  }
134
134
 
135
- .awsui_disabled-reason-tooltip_dwuol_1mzf1_134:not(#\9) {
135
+ .awsui_disabled-reason-tooltip_dwuol_155nx_134:not(#\9) {
136
136
  /* used in test-utils or tests */
137
137
  }
@@ -2,26 +2,26 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "placeholder": "awsui_placeholder_dwuol_1mzf1_9",
6
- "disabled": "awsui_disabled_dwuol_1mzf1_14",
7
- "item": "awsui_item_dwuol_1mzf1_18",
8
- "checkbox": "awsui_checkbox_dwuol_1mzf1_22",
9
- "option-group": "awsui_option-group_dwuol_1mzf1_31",
10
- "filter": "awsui_filter_dwuol_1mzf1_35",
11
- "trigger": "awsui_trigger_dwuol_1mzf1_40",
12
- "layout-strut": "awsui_layout-strut_dwuol_1mzf1_46",
13
- "list-bottom": "awsui_list-bottom_dwuol_1mzf1_52",
14
- "selected-icon": "awsui_selected-icon_dwuol_1mzf1_56",
15
- "show-label-tag": "awsui_show-label-tag_dwuol_1mzf1_61",
16
- "inline-token-trigger": "awsui_inline-token-trigger_dwuol_1mzf1_65",
17
- "inline-token-list": "awsui_inline-token-list_dwuol_1mzf1_72",
18
- "inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_1mzf1_86",
19
- "inline-token-counter": "awsui_inline-token-counter_dwuol_1mzf1_92",
20
- "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_dwuol_1mzf1_96",
21
- "inline-label-wrapper": "awsui_inline-label-wrapper_dwuol_1mzf1_100",
22
- "inline-label": "awsui_inline-label_dwuol_1mzf1_96",
23
- "inline-label-disabled": "awsui_inline-label-disabled_dwuol_1mzf1_125",
24
- "inline-label-inline-tokens": "awsui_inline-label-inline-tokens_dwuol_1mzf1_129",
25
- "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_1mzf1_134"
5
+ "placeholder": "awsui_placeholder_dwuol_155nx_9",
6
+ "disabled": "awsui_disabled_dwuol_155nx_14",
7
+ "item": "awsui_item_dwuol_155nx_18",
8
+ "checkbox": "awsui_checkbox_dwuol_155nx_22",
9
+ "option-group": "awsui_option-group_dwuol_155nx_31",
10
+ "filter": "awsui_filter_dwuol_155nx_35",
11
+ "trigger": "awsui_trigger_dwuol_155nx_40",
12
+ "layout-strut": "awsui_layout-strut_dwuol_155nx_46",
13
+ "list-bottom": "awsui_list-bottom_dwuol_155nx_52",
14
+ "selected-icon": "awsui_selected-icon_dwuol_155nx_56",
15
+ "show-label-tag": "awsui_show-label-tag_dwuol_155nx_61",
16
+ "inline-token-trigger": "awsui_inline-token-trigger_dwuol_155nx_65",
17
+ "inline-token-list": "awsui_inline-token-list_dwuol_155nx_72",
18
+ "inline-token-hidden-placeholder": "awsui_inline-token-hidden-placeholder_dwuol_155nx_86",
19
+ "inline-token-counter": "awsui_inline-token-counter_dwuol_155nx_92",
20
+ "inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_dwuol_155nx_96",
21
+ "inline-label-wrapper": "awsui_inline-label-wrapper_dwuol_155nx_100",
22
+ "inline-label": "awsui_inline-label_dwuol_155nx_96",
23
+ "inline-label-disabled": "awsui_inline-label-disabled_dwuol_155nx_125",
24
+ "inline-label-inline-tokens": "awsui_inline-label-inline-tokens_dwuol_155nx_129",
25
+ "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_dwuol_155nx_134"
26
26
  };
27
27
 
@@ -1,6 +1,7 @@
1
1
  import React, { RefObject } from 'react';
2
2
  import { InternalDropdownProps } from '../../dropdown/internal';
3
3
  import { ButtonTriggerProps } from '../../internal/components/button-trigger';
4
+ import { SelectionModel } from '../../internal/components/listbox/selection/interfaces';
4
5
  import { DropdownOption } from '../../internal/components/option/interfaces';
5
6
  import { OptionsListProps } from '../../internal/components/options-list';
6
7
  import { DropdownStatusProps } from '../../types/dropdown-status';
@@ -27,8 +28,8 @@ interface UseSelectProps {
27
28
  setFilteringValue?: (filteringText: string) => void;
28
29
  useInteractiveGroups?: boolean;
29
30
  statusType: DropdownStatusProps.StatusType;
30
- isAllSelected?: boolean;
31
- isSomeSelected?: boolean;
31
+ /** Source of group and select-all state. Defaults to single selection over `selectedOptions`. */
32
+ selection?: SelectionModel;
32
33
  toggleAll?: () => void;
33
34
  dropdownRole?: SelectProps.DropdownRole;
34
35
  }
@@ -49,8 +50,7 @@ export declare function useSelect({
49
50
  setFilteringValue,
50
51
  useInteractiveGroups,
51
52
  statusType,
52
- isAllSelected,
53
- isSomeSelected,
53
+ selection,
54
54
  toggleAll,
55
55
  dropdownRole
56
56
  }: UseSelectProps): {
@@ -1 +1 @@
1
- {"version":3,"file":"use-select.d.ts","sourceRoot":"","sources":["../../../../src/select/utils/use-select.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAKtD,OAAO,EAA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GAAiG;IACjG,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC;CACzC;AAED,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,GAAG,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;CACnC;AAED,wBAAgB,SAAS,CAAC,EACxB,eAAe,EACf,oBAAoB,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,oBAA4B,EAC5B,UAAU,EACV,SAA4C,EAC5C,SAAS,EACT,YAAY,GACb,EAAE,cAAc;;;;;;4BA0Ge,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,QAAQ,GAAG,mBAAmB,GAAG,UAAU,CACxD;;0BA4B0B,OAAO,CAAC,WAAW,CAAC;6BA0Df,cAAc,SAAS,MAAM;;4BA1I9B,cAAc;;;;;EA8P9C"}
@@ -3,6 +3,7 @@
3
3
  import { useCallback } from 'react';
4
4
  import { useEffect, useRef } from 'react';
5
5
  import { useUniqueId } from '@cloudscape-design/component-toolkit/internal';
6
+ import { singleSelection } from '../../internal/components/listbox/selection/single-selection';
6
7
  import { connectOptionsByValue } from '../../internal/components/listbox/utils/connect-options';
7
8
  import { isGroup, isGroupInteractive, isInteractive } from '../../internal/components/option/utils/filter-options';
8
9
  import { useHighlightedOption } from '../../internal/components/options-list/utils/use-highlight-option';
@@ -12,7 +13,7 @@ import { useOpenState } from '../../internal/components/options-list/utils/use-o
12
13
  import { fireNonCancelableEvent } from '../../internal/events';
13
14
  import useForwardFocus from '../../internal/hooks/forward-focus';
14
15
  import { usePrevious } from '../../internal/hooks/use-previous';
15
- export function useSelect({ selectedOptions, updateSelectedOption, options, filteringType, onBlur, onFocus, externalRef, keepOpen, embedded, fireLoadItems, setFilteringValue, useInteractiveGroups = false, statusType, isAllSelected, isSomeSelected, toggleAll, dropdownRole, }) {
16
+ export function useSelect({ selectedOptions, updateSelectedOption, options, filteringType, onBlur, onFocus, externalRef, keepOpen, embedded, fireLoadItems, setFilteringValue, useInteractiveGroups = false, statusType, selection = singleSelection(selectedOptions), toggleAll, dropdownRole, }) {
16
17
  const interactivityCheck = useInteractiveGroups ? isGroupInteractive : isInteractive;
17
18
  const isHighlightable = (option) => !!option && (useInteractiveGroups || option.type !== 'parent');
18
19
  const filterRef = useRef(null);
@@ -24,12 +25,6 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
24
25
  const activeRef = hasFilter ? filterRef : menuRef;
25
26
  const __selectedOptions = connectOptionsByValue(options, selectedOptions);
26
27
  const __selectedOptionsSet = new Set(__selectedOptions);
27
- const __selectedValuesSet = selectedOptions.reduce((selectedValuesSet, item) => {
28
- if (item.value) {
29
- selectedValuesSet.add(item.value);
30
- }
31
- return selectedValuesSet;
32
- }, new Set());
33
28
  const [{ highlightType, highlightedOption, highlightedIndex }, { moveHighlightWithKeyboard, resetHighlightWithKeyboard, setHighlightedIndexWithMouse, highlightOptionWithKeyboard, highlightFirstOptionWithMouse, goHomeWithKeyboard, goEndWithKeyboard, },] = useHighlightedOption({ options: options, isHighlightable });
34
29
  const { isOpen, openDropdown, closeDropdown, toggleDropdown, openedWithKeyboard } = useOpenState({
35
30
  defaultOpen: embedded,
@@ -185,29 +180,21 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
185
180
  }
186
181
  return menuProps;
187
182
  };
188
- const getGroupState = (option) => {
189
- const totalSelected = option.options.filter(item => !!item.value && __selectedValuesSet.has(item.value)).length;
190
- const hasSelected = totalSelected > 0;
191
- const allSelected = totalSelected === option.options.length;
192
- return {
193
- selected: hasSelected && allSelected && useInteractiveGroups,
194
- indeterminate: hasSelected && !allSelected,
195
- };
196
- };
197
183
  const getOptionProps = (option, index) => {
198
- var _a, _b;
199
184
  const isSelectAll = option.type === 'select-all';
200
185
  const highlighted = option === highlightedOption;
201
- const groupState = isGroup(option.option) ? getGroupState(option.option) : undefined;
202
- const selected = isSelectAll ? isAllSelected : __selectedOptionsSet.has(option) || !!(groupState === null || groupState === void 0 ? void 0 : groupState.selected);
203
- const nextOption = (_a = options[index + 1]) === null || _a === void 0 ? void 0 : _a.option;
204
- const isNextSelected = !!nextOption && isGroup(nextOption)
205
- ? getGroupState(nextOption).selected
206
- : __selectedOptionsSet.has(options[index + 1]);
207
- const previousOption = (_b = options[index - 1]) === null || _b === void 0 ? void 0 : _b.option;
208
- const isPreviousSelected = !!previousOption && isGroup(previousOption)
209
- ? getGroupState(previousOption).selected
210
- : __selectedOptionsSet.has(options[index - 1]);
186
+ const groupState = isSelectAll || isGroup(option.option) ? selection.getGroupState(option) : undefined;
187
+ const selected = isSelectAll ? !!(groupState === null || groupState === void 0 ? void 0 : groupState.selected) : __selectedOptionsSet.has(option) || !!(groupState === null || groupState === void 0 ? void 0 : groupState.selected);
188
+ // Only group neighbours use group state. Select-all never counts as a selected neighbour, so the row
189
+ // below it doesn't get the previous-item-selected style.
190
+ const nextOption = options[index + 1];
191
+ const isNextSelected = !!nextOption && isGroup(nextOption.option)
192
+ ? selection.getGroupState(nextOption).selected
193
+ : __selectedOptionsSet.has(nextOption);
194
+ const previousOption = options[index - 1];
195
+ const isPreviousSelected = !!previousOption && isGroup(previousOption.option)
196
+ ? selection.getGroupState(previousOption).selected
197
+ : __selectedOptionsSet.has(previousOption);
211
198
  const optionProps = {
212
199
  key: index,
213
200
  option,
@@ -215,7 +202,7 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
215
202
  selected,
216
203
  isNextSelected,
217
204
  isPreviousSelected,
218
- indeterminate: !!(groupState === null || groupState === void 0 ? void 0 : groupState.indeterminate) || (isSelectAll && !isAllSelected && isSomeSelected),
205
+ indeterminate: !!(groupState === null || groupState === void 0 ? void 0 : groupState.indeterminate),
219
206
  ['data-mouse-target']: isHighlightable(option) ? index : -1,
220
207
  id: getOptionId(menuId, index),
221
208
  };
@@ -270,7 +257,7 @@ export function useSelect({ selectedOptions, updateSelectedOption, options, filt
270
257
  }
271
258
  }, [isOpen, activeRef, embedded, focusActiveRef]);
272
259
  useForwardFocus(externalRef, triggerRef);
273
- const highlightedGroupSelected = !!highlightedOption && isGroup(highlightedOption.option) && getGroupState(highlightedOption.option).selected;
260
+ const highlightedGroupSelected = !!highlightedOption && isGroup(highlightedOption.option) && selection.getGroupState(highlightedOption).selected;
274
261
  const announceSelected = !!highlightedOption && (__selectedOptionsSet.has(highlightedOption) || highlightedGroupSelected);
275
262
  // Closes the dropdown and returns focus to the trigger, matching the normal close behavior.
276
263
  // Exposed to the public dropdown-customization render props via `DropdownContentProps.closeDropdown`.