@cloudscape-design/components 3.0.1406 → 3.0.1408

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 (606) 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/autosuggest/internal.d.ts.map +1 -1
  26. package/autosuggest/internal.js +9 -0
  27. package/autosuggest/internal.js.map +1 -1
  28. package/breadcrumb-group/item/styles.css.js +7 -7
  29. package/breadcrumb-group/item/styles.scoped.css +28 -28
  30. package/breadcrumb-group/item/styles.selectors.js +7 -7
  31. package/button/styles.css.js +24 -24
  32. package/button/styles.scoped.css +327 -327
  33. package/button/styles.selectors.js +24 -24
  34. package/button-dropdown/category-elements/expandable-category-element.d.ts +4 -1
  35. package/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  36. package/button-dropdown/category-elements/expandable-category-element.js +18 -3
  37. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  38. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +4 -1
  39. package/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  40. package/button-dropdown/category-elements/mobile-expandable-category-element.js +23 -3
  41. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  42. package/button-dropdown/category-elements/use-expandable-group-status.d.ts +34 -0
  43. package/button-dropdown/category-elements/use-expandable-group-status.d.ts.map +1 -0
  44. package/button-dropdown/category-elements/use-expandable-group-status.js +59 -0
  45. package/button-dropdown/category-elements/use-expandable-group-status.js.map +1 -0
  46. package/button-dropdown/index.d.ts.map +1 -1
  47. package/button-dropdown/index.js +3 -3
  48. package/button-dropdown/index.js.map +1 -1
  49. package/button-dropdown/interfaces.d.ts +110 -8
  50. package/button-dropdown/interfaces.d.ts.map +1 -1
  51. package/button-dropdown/interfaces.js.map +1 -1
  52. package/button-dropdown/internal-interfaces.d.ts +20 -0
  53. package/button-dropdown/internal-interfaces.d.ts.map +1 -1
  54. package/button-dropdown/internal-interfaces.js.map +1 -1
  55. package/button-dropdown/internal.d.ts.map +1 -1
  56. package/button-dropdown/internal.js +149 -16
  57. package/button-dropdown/internal.js.map +1 -1
  58. package/button-dropdown/item-element/styles.css.js +21 -21
  59. package/button-dropdown/item-element/styles.scoped.css +37 -37
  60. package/button-dropdown/item-element/styles.selectors.js +21 -21
  61. package/button-dropdown/items-list.d.ts +4 -1
  62. package/button-dropdown/items-list.d.ts.map +1 -1
  63. package/button-dropdown/items-list.js +2 -2
  64. package/button-dropdown/items-list.js.map +1 -1
  65. package/button-dropdown/status-footer.d.ts +16 -0
  66. package/button-dropdown/status-footer.d.ts.map +1 -0
  67. package/button-dropdown/status-footer.js +23 -0
  68. package/button-dropdown/status-footer.js.map +1 -0
  69. package/button-dropdown/styles.css.js +23 -23
  70. package/button-dropdown/styles.scoped.css +34 -31
  71. package/button-dropdown/styles.selectors.js +23 -23
  72. package/button-dropdown/test-classes/styles.css.js +7 -0
  73. package/button-dropdown/test-classes/styles.scoped.css +11 -0
  74. package/button-dropdown/test-classes/styles.selectors.js +8 -0
  75. package/button-dropdown/utils/use-button-dropdown.d.ts +31 -2
  76. package/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  77. package/button-dropdown/utils/use-button-dropdown.js +62 -7
  78. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  79. package/button-dropdown/utils/use-highlighted-menu.d.ts +2 -0
  80. package/button-dropdown/utils/use-highlighted-menu.d.ts.map +1 -1
  81. package/button-dropdown/utils/use-highlighted-menu.js +7 -0
  82. package/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
  83. package/button-dropdown/utils/use-load-items.d.ts +17 -0
  84. package/button-dropdown/utils/use-load-items.d.ts.map +1 -0
  85. package/button-dropdown/utils/use-load-items.js +23 -0
  86. package/button-dropdown/utils/use-load-items.js.map +1 -0
  87. package/button-group/copy-to-clipboard-item.d.ts +1 -0
  88. package/button-group/copy-to-clipboard-item.d.ts.map +1 -1
  89. package/button-group/copy-to-clipboard-item.js +2 -2
  90. package/button-group/copy-to-clipboard-item.js.map +1 -1
  91. package/button-group/file-input-item.d.ts +1 -0
  92. package/button-group/file-input-item.d.ts.map +1 -1
  93. package/button-group/file-input-item.js +2 -2
  94. package/button-group/file-input-item.js.map +1 -1
  95. package/button-group/icon-button-item.d.ts +1 -0
  96. package/button-group/icon-button-item.d.ts.map +1 -1
  97. package/button-group/icon-button-item.js +2 -2
  98. package/button-group/icon-button-item.js.map +1 -1
  99. package/button-group/icon-toggle-button-item.d.ts +1 -0
  100. package/button-group/icon-toggle-button-item.d.ts.map +1 -1
  101. package/button-group/icon-toggle-button-item.js +2 -2
  102. package/button-group/icon-toggle-button-item.js.map +1 -1
  103. package/button-group/index.d.ts.map +1 -1
  104. package/button-group/index.js +1 -1
  105. package/button-group/index.js.map +1 -1
  106. package/button-group/internal-interfaces.d.ts +8 -0
  107. package/button-group/internal-interfaces.d.ts.map +1 -1
  108. package/button-group/internal-interfaces.js.map +1 -1
  109. package/button-group/internal.d.ts.map +1 -1
  110. package/button-group/internal.js +3 -3
  111. package/button-group/internal.js.map +1 -1
  112. package/button-group/item-element.d.ts +2 -0
  113. package/button-group/item-element.d.ts.map +1 -1
  114. package/button-group/item-element.js +7 -6
  115. package/button-group/item-element.js.map +1 -1
  116. package/button-group/menu-dropdown-item.d.ts +2 -0
  117. package/button-group/menu-dropdown-item.d.ts.map +1 -1
  118. package/button-group/menu-dropdown-item.js +3 -3
  119. package/button-group/menu-dropdown-item.js.map +1 -1
  120. package/button-group/styles.css.js +4 -4
  121. package/button-group/styles.scoped.css +19 -6
  122. package/button-group/styles.selectors.js +4 -4
  123. package/cards/styles.css.js +39 -39
  124. package/cards/styles.scoped.css +41 -41
  125. package/cards/styles.selectors.js +39 -39
  126. package/checkbox/styles.css.js +3 -3
  127. package/checkbox/styles.scoped.css +10 -10
  128. package/checkbox/styles.selectors.js +3 -3
  129. package/column-layout/internal.d.ts.map +1 -1
  130. package/column-layout/internal.js +12 -0
  131. package/column-layout/internal.js.map +1 -1
  132. package/container/internal.d.ts +11 -0
  133. package/container/internal.d.ts.map +1 -1
  134. package/container/internal.js +7 -4
  135. package/container/internal.js.map +1 -1
  136. package/container/styles.css.js +33 -34
  137. package/container/styles.scoped.css +140 -94
  138. package/container/styles.selectors.js +33 -34
  139. package/content-layout/styles.css.js +14 -14
  140. package/content-layout/styles.scoped.css +27 -27
  141. package/content-layout/styles.selectors.js +14 -14
  142. package/{internal/components/control-group → control-group}/index.d.ts +0 -3
  143. package/control-group/index.d.ts.map +1 -0
  144. package/control-group/index.js +19 -0
  145. package/control-group/index.js.map +1 -0
  146. package/{internal/components/control-group → control-group}/interfaces.d.ts +7 -7
  147. package/control-group/interfaces.d.ts.map +1 -0
  148. package/control-group/interfaces.js.map +1 -0
  149. package/control-group/internal.d.ts +12 -0
  150. package/control-group/internal.d.ts.map +1 -0
  151. package/{internal/components/control-group/index.js → control-group/internal.js} +18 -12
  152. package/control-group/internal.js.map +1 -0
  153. package/control-group/styles.css.js +32 -0
  154. package/{internal/components/control-group → control-group}/styles.scoped.css +29 -29
  155. package/control-group/styles.selectors.js +33 -0
  156. package/control-group/test-classes/styles.css.js +9 -0
  157. package/{internal/components/control-group → control-group}/test-classes/styles.scoped.css +4 -4
  158. package/control-group/test-classes/styles.selectors.js +10 -0
  159. package/copy-to-clipboard/index.d.ts.map +1 -1
  160. package/copy-to-clipboard/index.js +1 -1
  161. package/copy-to-clipboard/index.js.map +1 -1
  162. package/copy-to-clipboard/internal.d.ts +9 -1
  163. package/copy-to-clipboard/internal.d.ts.map +1 -1
  164. package/copy-to-clipboard/internal.js +3 -3
  165. package/copy-to-clipboard/internal.js.map +1 -1
  166. package/copy-to-clipboard/styles.css.js +10 -10
  167. package/copy-to-clipboard/styles.scoped.css +16 -14
  168. package/copy-to-clipboard/styles.selectors.js +10 -10
  169. package/date-input/internal.d.ts +5 -0
  170. package/date-input/internal.d.ts.map +1 -1
  171. package/date-input/internal.js +2 -2
  172. package/date-input/internal.js.map +1 -1
  173. package/date-input/styles.css.js +1 -1
  174. package/date-input/styles.scoped.css +2 -1
  175. package/date-input/styles.selectors.js +1 -1
  176. package/divider/index.d.ts.map +1 -1
  177. package/divider/index.js +1 -1
  178. package/divider/index.js.map +1 -1
  179. package/divider/internal.d.ts +7 -1
  180. package/divider/internal.d.ts.map +1 -1
  181. package/divider/internal.js +2 -2
  182. package/divider/internal.js.map +1 -1
  183. package/divider/styles.css.js +6 -6
  184. package/divider/styles.scoped.css +20 -9
  185. package/divider/styles.selectors.js +6 -6
  186. package/dropdown/internal.d.ts +1 -1
  187. package/dropdown/internal.d.ts.map +1 -1
  188. package/dropdown/internal.js +1 -1
  189. package/dropdown/internal.js.map +1 -1
  190. package/dropdown/styles.css.js +20 -20
  191. package/dropdown/styles.scoped.css +48 -48
  192. package/dropdown/styles.selectors.js +20 -20
  193. package/expandable-section/expandable-section-container.d.ts +6 -0
  194. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  195. package/expandable-section/expandable-section-container.js +4 -3
  196. package/expandable-section/expandable-section-container.js.map +1 -1
  197. package/expandable-section/expandable-section-header.d.ts +6 -0
  198. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  199. package/expandable-section/expandable-section-header.js +34 -15
  200. package/expandable-section/expandable-section-header.js.map +1 -1
  201. package/expandable-section/interfaces.d.ts +11 -0
  202. package/expandable-section/interfaces.d.ts.map +1 -1
  203. package/expandable-section/interfaces.js.map +1 -1
  204. package/expandable-section/internal.d.ts +2 -0
  205. package/expandable-section/internal.d.ts.map +1 -1
  206. package/expandable-section/internal.js +10 -3
  207. package/expandable-section/internal.js.map +1 -1
  208. package/expandable-section/styles.css.js +49 -46
  209. package/expandable-section/styles.scoped.css +121 -91
  210. package/expandable-section/styles.selectors.js +49 -46
  211. package/expandable-section/utils.d.ts +1 -0
  212. package/expandable-section/utils.d.ts.map +1 -1
  213. package/expandable-section/utils.js +3 -0
  214. package/expandable-section/utils.js.map +1 -1
  215. package/file-input/internal.d.ts +2 -0
  216. package/file-input/internal.d.ts.map +1 -1
  217. package/file-input/internal.js +2 -2
  218. package/file-input/internal.js.map +1 -1
  219. package/file-input/styles.css.js +5 -5
  220. package/file-input/styles.scoped.css +18 -22
  221. package/file-input/styles.selectors.js +5 -5
  222. package/file-token-group/styles.css.js +23 -23
  223. package/file-token-group/styles.scoped.css +38 -38
  224. package/file-token-group/styles.selectors.js +23 -23
  225. package/flashbar/styles.css.js +50 -50
  226. package/flashbar/styles.scoped.css +184 -184
  227. package/flashbar/styles.selectors.js +50 -50
  228. package/form-field/interfaces.d.ts +2 -2
  229. package/form-field/interfaces.js.map +1 -1
  230. package/header/interfaces.d.ts +3 -2
  231. package/header/interfaces.d.ts.map +1 -1
  232. package/header/interfaces.js.map +1 -1
  233. package/header/internal.d.ts +6 -0
  234. package/header/internal.d.ts.map +1 -1
  235. package/header/internal.js +2 -1
  236. package/header/internal.js.map +1 -1
  237. package/header/styles.css.js +36 -35
  238. package/header/styles.scoped.css +69 -53
  239. package/header/styles.selectors.js +36 -35
  240. package/help-panel/styles.css.js +6 -6
  241. package/help-panel/styles.scoped.css +72 -72
  242. package/help-panel/styles.selectors.js +6 -6
  243. package/i18n/messages/all.all.js +1 -1
  244. package/i18n/messages/all.all.json +1 -1
  245. package/i18n/messages/all.de.js +1 -1
  246. package/i18n/messages/all.de.json +1 -1
  247. package/i18n/messages/all.en-GB.js +1 -1
  248. package/i18n/messages/all.en-GB.json +1 -1
  249. package/i18n/messages/all.en.js +1 -1
  250. package/i18n/messages/all.en.json +1 -1
  251. package/i18n/messages/all.es.js +1 -1
  252. package/i18n/messages/all.es.json +1 -1
  253. package/i18n/messages/all.fr.js +1 -1
  254. package/i18n/messages/all.fr.json +1 -1
  255. package/i18n/messages/all.id.js +1 -1
  256. package/i18n/messages/all.id.json +1 -1
  257. package/i18n/messages/all.it.js +1 -1
  258. package/i18n/messages/all.it.json +1 -1
  259. package/i18n/messages/all.ja.js +1 -1
  260. package/i18n/messages/all.ja.json +1 -1
  261. package/i18n/messages/all.ko.js +1 -1
  262. package/i18n/messages/all.ko.json +1 -1
  263. package/i18n/messages/all.pt-BR.js +1 -1
  264. package/i18n/messages/all.pt-BR.json +1 -1
  265. package/i18n/messages/all.tr.js +1 -1
  266. package/i18n/messages/all.tr.json +1 -1
  267. package/i18n/messages/all.zh-CN.js +1 -1
  268. package/i18n/messages/all.zh-CN.json +1 -1
  269. package/i18n/messages/all.zh-TW.js +1 -1
  270. package/i18n/messages/all.zh-TW.json +1 -1
  271. package/i18n/messages-types.d.ts +28 -0
  272. package/i18n/messages-types.d.ts.map +1 -1
  273. package/i18n/messages-types.js.map +1 -1
  274. package/index.d.ts +1 -0
  275. package/index.d.ts.map +1 -1
  276. package/index.js +1 -0
  277. package/index.js.map +1 -1
  278. package/input/internal.d.ts.map +1 -1
  279. package/input/internal.js +9 -1
  280. package/input/internal.js.map +1 -1
  281. package/input/styles.css.js +44 -44
  282. package/input/styles.scoped.css +152 -152
  283. package/input/styles.selectors.js +44 -44
  284. package/internal/base-component/styles.scoped.css +1 -1
  285. package/internal/base-theme/styles.scoped.css +1 -1
  286. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  287. package/internal/components/autosuggest-input/index.js +25 -24
  288. package/internal/components/autosuggest-input/index.js.map +1 -1
  289. package/internal/components/autosuggest-input/styles.css.js +33 -33
  290. package/internal/components/autosuggest-input/styles.scoped.css +91 -91
  291. package/internal/components/autosuggest-input/styles.selectors.js +33 -33
  292. package/internal/components/button-trigger/index.js +1 -1
  293. package/internal/components/button-trigger/index.js.map +1 -1
  294. package/internal/components/button-trigger/styles.css.js +29 -29
  295. package/internal/components/button-trigger/styles.scoped.css +71 -71
  296. package/internal/components/button-trigger/styles.selectors.js +29 -29
  297. package/internal/components/drag-handle/hooks/interfaces.d.ts +1 -0
  298. package/internal/components/drag-handle/hooks/interfaces.d.ts.map +1 -1
  299. package/internal/components/drag-handle/hooks/interfaces.js.map +1 -1
  300. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.d.ts.map +1 -1
  301. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js +9 -1
  302. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js.map +1 -1
  303. package/internal/components/drag-handle-wrapper/styles.css.js +30 -30
  304. package/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
  305. package/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
  306. package/internal/components/dropdown-status/index.d.ts +7 -1
  307. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  308. package/internal/components/dropdown-status/index.js +2 -2
  309. package/internal/components/dropdown-status/index.js.map +1 -1
  310. package/internal/components/listbox/selection/interfaces.d.ts +28 -0
  311. package/internal/components/listbox/selection/interfaces.d.ts.map +1 -0
  312. package/internal/components/listbox/selection/interfaces.js +2 -0
  313. package/internal/components/listbox/selection/interfaces.js.map +1 -0
  314. package/internal/components/listbox/selection/multi-selection.d.ts +24 -0
  315. package/internal/components/listbox/selection/multi-selection.d.ts.map +1 -0
  316. package/internal/components/listbox/selection/multi-selection.js +60 -0
  317. package/internal/components/listbox/selection/multi-selection.js.map +1 -0
  318. package/internal/components/listbox/selection/single-selection.d.ts +7 -0
  319. package/internal/components/listbox/selection/single-selection.d.ts.map +1 -0
  320. package/internal/components/listbox/selection/single-selection.js +26 -0
  321. package/internal/components/listbox/selection/single-selection.js.map +1 -0
  322. package/internal/components/option/styles.css.js +18 -18
  323. package/internal/components/option/styles.scoped.css +35 -35
  324. package/internal/components/option/styles.selectors.js +18 -18
  325. package/internal/components/radio-button/styles.css.js +7 -7
  326. package/internal/components/radio-button/styles.scoped.css +17 -17
  327. package/internal/components/radio-button/styles.selectors.js +7 -7
  328. package/internal/components/selectable-item/styles.css.js +22 -22
  329. package/internal/components/selectable-item/styles.scoped.css +57 -57
  330. package/internal/components/selectable-item/styles.selectors.js +22 -22
  331. package/internal/components/token-list/styles.css.js +10 -10
  332. package/internal/components/token-list/styles.scoped.css +25 -25
  333. package/internal/components/token-list/styles.selectors.js +10 -10
  334. package/internal/environment.js +2 -2
  335. package/internal/environment.json +2 -2
  336. package/internal/generated/custom-css-properties/index.d.ts +2 -0
  337. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  338. package/internal/generated/custom-css-properties/index.js +177 -175
  339. package/internal/generated/custom-css-properties/index.js.map +1 -1
  340. package/internal/generated/styles/tokens.d.ts +1 -1
  341. package/internal/generated/styles/tokens.js +1 -1
  342. package/internal/generated/theming/index.cjs +5 -3
  343. package/internal/generated/theming/index.d.cts +9 -0
  344. package/internal/generated/theming/index.d.ts +9 -0
  345. package/internal/generated/theming/index.js +5 -3
  346. package/internal/grouped-control/dev-warnings.d.ts +46 -0
  347. package/internal/grouped-control/dev-warnings.d.ts.map +1 -0
  348. package/internal/grouped-control/dev-warnings.js +29 -0
  349. package/internal/grouped-control/dev-warnings.js.map +1 -0
  350. package/internal/{components/control-group → grouped-control}/grouped-control-styles.d.ts +1 -1
  351. package/internal/grouped-control/grouped-control-styles.d.ts.map +1 -0
  352. package/internal/grouped-control/grouped-control-styles.js.map +1 -0
  353. package/internal/hooks/use-load-items/index.d.ts +18 -0
  354. package/internal/hooks/use-load-items/index.d.ts.map +1 -0
  355. package/{select/utils/use-load-items.js → internal/hooks/use-load-items/index.js} +4 -5
  356. package/internal/hooks/use-load-items/index.js.map +1 -0
  357. package/internal/manifest.json +1 -1
  358. package/item-card/styles.css.js +14 -14
  359. package/item-card/styles.scoped.css +63 -63
  360. package/item-card/styles.selectors.js +14 -14
  361. package/link/styles.css.js +21 -21
  362. package/link/styles.scoped.css +104 -104
  363. package/link/styles.selectors.js +21 -21
  364. package/manifest.json +2 -2
  365. package/modal/styles.css.js +32 -32
  366. package/modal/styles.scoped.css +49 -49
  367. package/modal/styles.selectors.js +32 -32
  368. package/multiselect/interfaces.d.ts +1 -0
  369. package/multiselect/interfaces.d.ts.map +1 -1
  370. package/multiselect/interfaces.js.map +1 -1
  371. package/multiselect/internal.d.ts.map +1 -1
  372. package/multiselect/internal.js +11 -1
  373. package/multiselect/internal.js.map +1 -1
  374. package/multiselect/use-multiselect.d.ts.map +1 -1
  375. package/multiselect/use-multiselect.js +15 -48
  376. package/multiselect/use-multiselect.js.map +1 -1
  377. package/package.json +4 -1
  378. package/popover/arrow.d.ts +3 -1
  379. package/popover/arrow.d.ts.map +1 -1
  380. package/popover/arrow.js +2 -2
  381. package/popover/arrow.js.map +1 -1
  382. package/popover/body.d.ts +1 -0
  383. package/popover/body.d.ts.map +1 -1
  384. package/popover/body.js +2 -2
  385. package/popover/body.js.map +1 -1
  386. package/popover/container.d.ts +3 -1
  387. package/popover/container.d.ts.map +1 -1
  388. package/popover/container.js +2 -2
  389. package/popover/container.js.map +1 -1
  390. package/popover/internal.d.ts +6 -0
  391. package/popover/internal.d.ts.map +1 -1
  392. package/popover/internal.js +3 -3
  393. package/popover/internal.js.map +1 -1
  394. package/popover/styles.css.js +58 -58
  395. package/popover/styles.scoped.css +114 -95
  396. package/popover/styles.selectors.js +58 -58
  397. package/progress-bar/index.d.ts.map +1 -1
  398. package/progress-bar/index.js +4 -3
  399. package/progress-bar/index.js.map +1 -1
  400. package/progress-bar/internal.d.ts +7 -1
  401. package/progress-bar/internal.d.ts.map +1 -1
  402. package/progress-bar/internal.js +2 -2
  403. package/progress-bar/internal.js.map +1 -1
  404. package/progress-bar/styles.css.js +20 -19
  405. package/progress-bar/styles.scoped.css +92 -59
  406. package/progress-bar/styles.selectors.js +20 -19
  407. package/prompt-input/styles.css.js +26 -26
  408. package/prompt-input/styles.scoped.css +116 -116
  409. package/prompt-input/styles.selectors.js +26 -26
  410. package/segmented-control/internal-segmented-control.d.ts.map +1 -1
  411. package/segmented-control/internal-segmented-control.js +1 -1
  412. package/segmented-control/internal-segmented-control.js.map +1 -1
  413. package/segmented-control/internal.js +1 -1
  414. package/segmented-control/internal.js.map +1 -1
  415. package/segmented-control/styles.css.js +31 -31
  416. package/segmented-control/styles.scoped.css +82 -82
  417. package/segmented-control/styles.selectors.js +31 -31
  418. package/select/interfaces.d.ts +14 -0
  419. package/select/interfaces.d.ts.map +1 -1
  420. package/select/interfaces.js.map +1 -1
  421. package/select/internal.d.ts.map +1 -1
  422. package/select/internal.js +15 -3
  423. package/select/internal.js.map +1 -1
  424. package/select/parts/styles.css.js +21 -21
  425. package/select/parts/styles.scoped.css +24 -24
  426. package/select/parts/styles.selectors.js +21 -21
  427. package/select/utils/use-select.d.ts +4 -4
  428. package/select/utils/use-select.d.ts.map +1 -1
  429. package/select/utils/use-select.js +16 -29
  430. package/select/utils/use-select.js.map +1 -1
  431. package/side-navigation/styles.css.js +65 -65
  432. package/side-navigation/styles.scoped.css +114 -114
  433. package/side-navigation/styles.selectors.js +65 -65
  434. package/slider/internal.d.ts +6 -0
  435. package/slider/internal.d.ts.map +1 -1
  436. package/slider/internal.js +3 -3
  437. package/slider/internal.js.map +1 -1
  438. package/slider/styles.css.js +26 -26
  439. package/slider/styles.scoped.css +202 -171
  440. package/slider/styles.selectors.js +26 -26
  441. package/spinner/styles.css.js +14 -14
  442. package/spinner/styles.scoped.css +40 -40
  443. package/spinner/styles.selectors.js +14 -14
  444. package/styling/button-dropdown.scss +1 -0
  445. package/styling/button-group.scss +15 -0
  446. package/styling/container.scss +95 -0
  447. package/styling/copy-to-clipboard.scss +1 -0
  448. package/styling/date-input.scss +1 -0
  449. package/styling/divider.scss +15 -0
  450. package/styling/dropdown.scss +2 -2
  451. package/styling/popover.scss +58 -0
  452. package/styling/progress-bar.scss +36 -0
  453. package/styling/slider.scss +30 -0
  454. package/styling/text-filter.scss +19 -0
  455. package/styling/textarea.scss +67 -0
  456. package/styling/time-input.scss +1 -0
  457. package/styling/toggle-button.scss +1 -0
  458. package/styling/token.scss +49 -0
  459. package/styling/tooltip.scss +58 -0
  460. package/table/column-groups/col-group.d.ts +1 -1
  461. package/table/column-groups/col-group.d.ts.map +1 -1
  462. package/table/column-groups/col-group.js +3 -3
  463. package/table/column-groups/col-group.js.map +1 -1
  464. package/table/header-cell/group-header-cell.js +2 -2
  465. package/table/header-cell/group-header-cell.js.map +1 -1
  466. package/table/internal.d.ts.map +1 -1
  467. package/table/internal.js +1 -1
  468. package/table/internal.js.map +1 -1
  469. package/table/styles.css.js +37 -37
  470. package/table/styles.scoped.css +46 -46
  471. package/table/styles.selectors.js +37 -37
  472. package/table/use-column-widths.d.ts +2 -1
  473. package/table/use-column-widths.d.ts.map +1 -1
  474. package/table/use-column-widths.js +42 -11
  475. package/table/use-column-widths.js.map +1 -1
  476. package/tabs/styles.css.js +31 -30
  477. package/tabs/styles.scoped.css +93 -77
  478. package/tabs/styles.selectors.js +31 -30
  479. package/tabs/tab-header-bar.d.ts.map +1 -1
  480. package/tabs/tab-header-bar.js +54 -5
  481. package/tabs/tab-header-bar.js.map +1 -1
  482. package/tag-editor/styles.css.js +3 -3
  483. package/tag-editor/styles.scoped.css +13 -13
  484. package/tag-editor/styles.selectors.js +3 -3
  485. package/test-utils/dom/button-dropdown/index.d.ts +16 -0
  486. package/test-utils/dom/button-dropdown/index.js +28 -6
  487. package/test-utils/dom/button-dropdown/index.js.map +1 -1
  488. package/test-utils/dom/{internal/control-group.js → control-group/index.js} +2 -2
  489. package/test-utils/dom/control-group/index.js.map +1 -0
  490. package/test-utils/dom/index.d.ts +28 -0
  491. package/test-utils/dom/index.js +22 -3
  492. package/test-utils/dom/index.js.map +1 -1
  493. package/test-utils/selectors/button-dropdown/index.d.ts +16 -0
  494. package/test-utils/selectors/button-dropdown/index.js +32 -6
  495. package/test-utils/selectors/button-dropdown/index.js.map +1 -1
  496. package/test-utils/selectors/{internal/control-group.js → control-group/index.js} +2 -2
  497. package/test-utils/selectors/control-group/index.js.map +1 -0
  498. package/test-utils/selectors/index.d.ts +18 -0
  499. package/test-utils/selectors/index.js +17 -3
  500. package/test-utils/selectors/index.js.map +1 -1
  501. package/text-content/styles.css.js +1 -1
  502. package/text-content/styles.scoped.css +66 -66
  503. package/text-content/styles.selectors.js +1 -1
  504. package/text-filter/internal.d.ts +8 -1
  505. package/text-filter/internal.d.ts.map +1 -1
  506. package/text-filter/internal.js +3 -3
  507. package/text-filter/internal.js.map +1 -1
  508. package/text-filter/search-results.d.ts +1 -0
  509. package/text-filter/search-results.d.ts.map +1 -1
  510. package/text-filter/search-results.js +3 -2
  511. package/text-filter/search-results.js.map +1 -1
  512. package/text-filter/styles.css.js +3 -3
  513. package/text-filter/styles.scoped.css +6 -3
  514. package/text-filter/styles.selectors.js +3 -3
  515. package/textarea/index.d.ts.map +1 -1
  516. package/textarea/index.js +2 -1
  517. package/textarea/index.js.map +1 -1
  518. package/textarea/styles.css.js +9 -9
  519. package/textarea/styles.scoped.css +78 -56
  520. package/textarea/styles.selectors.js +9 -9
  521. package/time-input/internal.d.ts +7 -1
  522. package/time-input/internal.d.ts.map +1 -1
  523. package/time-input/internal.js +2 -1
  524. package/time-input/internal.js.map +1 -1
  525. package/time-input/styles.css.js +1 -1
  526. package/time-input/styles.scoped.css +2 -1
  527. package/time-input/styles.selectors.js +1 -1
  528. package/toggle/styles.css.js +10 -10
  529. package/toggle/styles.scoped.css +25 -25
  530. package/toggle/styles.selectors.js +10 -10
  531. package/toggle-button/index.d.ts.map +1 -1
  532. package/toggle-button/index.js +1 -1
  533. package/toggle-button/index.js.map +1 -1
  534. package/toggle-button/internal.d.ts +2 -0
  535. package/toggle-button/internal.d.ts.map +1 -1
  536. package/toggle-button/internal.js +2 -2
  537. package/toggle-button/internal.js.map +1 -1
  538. package/toggle-button/styles.css.js +4 -4
  539. package/toggle-button/styles.scoped.css +5 -4
  540. package/toggle-button/styles.selectors.js +4 -4
  541. package/token/dismiss-button.d.ts +13 -3
  542. package/token/dismiss-button.d.ts.map +1 -1
  543. package/token/dismiss-button.js +6 -22
  544. package/token/dismiss-button.js.map +1 -1
  545. package/token/index.d.ts.map +1 -1
  546. package/token/index.js +1 -1
  547. package/token/index.js.map +1 -1
  548. package/token/internal.d.ts +6 -0
  549. package/token/internal.d.ts.map +1 -1
  550. package/token/internal.js +3 -3
  551. package/token/internal.js.map +1 -1
  552. package/token/styles.css.js +14 -14
  553. package/token/styles.d.ts +26 -1
  554. package/token/styles.d.ts.map +1 -1
  555. package/token/styles.js +22 -12
  556. package/token/styles.js.map +1 -1
  557. package/token/styles.scoped.css +67 -61
  558. package/token/styles.selectors.js +14 -14
  559. package/tooltip/internal.d.ts +6 -0
  560. package/tooltip/internal.d.ts.map +1 -1
  561. package/tooltip/internal.js +2 -2
  562. package/tooltip/internal.js.map +1 -1
  563. package/tooltip/styles.css.js +2 -2
  564. package/tooltip/styles.scoped.css +7 -5
  565. package/tooltip/styles.selectors.js +2 -2
  566. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts +1 -1
  567. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts.map +1 -1
  568. package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
  569. package/tutorial-panel/components/tutorial-detail-view/index.d.ts +1 -1
  570. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  571. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  572. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +1 -1
  573. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
  574. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  575. package/tutorial-panel/components/tutorial-detail-view/task.d.ts +1 -1
  576. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  577. package/tutorial-panel/components/tutorial-detail-view/task.js +9 -5
  578. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  579. package/tutorial-panel/components/tutorial-list/index.d.ts +1 -1
  580. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  581. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  582. package/tutorial-panel/index.d.ts.map +1 -1
  583. package/tutorial-panel/index.js +27 -1
  584. package/tutorial-panel/index.js.map +1 -1
  585. package/tutorial-panel/interfaces.d.ts +19 -18
  586. package/tutorial-panel/interfaces.d.ts.map +1 -1
  587. package/tutorial-panel/interfaces.js.map +1 -1
  588. package/internal/components/control-group/grouped-control-styles.d.ts.map +0 -1
  589. package/internal/components/control-group/grouped-control-styles.js.map +0 -1
  590. package/internal/components/control-group/index.d.ts.map +0 -1
  591. package/internal/components/control-group/index.js.map +0 -1
  592. package/internal/components/control-group/interfaces.d.ts.map +0 -1
  593. package/internal/components/control-group/interfaces.js.map +0 -1
  594. package/internal/components/control-group/styles.css.js +0 -32
  595. package/internal/components/control-group/styles.selectors.js +0 -33
  596. package/internal/components/control-group/test-classes/styles.css.js +0 -9
  597. package/internal/components/control-group/test-classes/styles.selectors.js +0 -10
  598. package/select/utils/use-load-items.d.ts +0 -18
  599. package/select/utils/use-load-items.d.ts.map +0 -1
  600. package/select/utils/use-load-items.js.map +0 -1
  601. package/test-utils/dom/internal/control-group.js.map +0 -1
  602. package/test-utils/selectors/internal/control-group.js.map +0 -1
  603. /package/{internal/components/control-group → control-group}/interfaces.js +0 -0
  604. /package/internal/{components/control-group → grouped-control}/grouped-control-styles.js +0 -0
  605. /package/test-utils/dom/{internal/control-group.d.ts → control-group/index.d.ts} +0 -0
  606. /package/test-utils/selectors/{internal/control-group.d.ts → control-group/index.d.ts} +0 -0
@@ -2,36 +2,36 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "segment": "awsui_segment_8cbea_14190_17",
6
- "full-width": "awsui_full-width_8cbea_14190_44",
7
- "refresh": "awsui_refresh_8cbea_14190_47",
8
- "disabled": "awsui_disabled_8cbea_14190_53",
9
- "selected": "awsui_selected_8cbea_14190_110",
10
- "icon": "awsui_icon_8cbea_14190_122",
11
- "with-text": "awsui_with-text_8cbea_14190_126",
12
- "with-no-text": "awsui_with-no-text_8cbea_14190_132",
13
- "root": "awsui_root_8cbea_14190_137",
14
- "segment-part": "awsui_segment-part_8cbea_14190_169",
15
- "grouped": "awsui_grouped_8cbea_14190_190",
16
- "grouped-only": "awsui_grouped-only_8cbea_14190_190",
17
- "grouped-vertical": "awsui_grouped-vertical_8cbea_14190_194",
18
- "grouped-horizontal-first": "awsui_grouped-horizontal-first_8cbea_14190_206",
19
- "grouped-horizontal-middle": "awsui_grouped-horizontal-middle_8cbea_14190_210",
20
- "grouped-horizontal-last": "awsui_grouped-horizontal-last_8cbea_14190_216",
21
- "grouped-vertical-first": "awsui_grouped-vertical-first_8cbea_14190_220",
22
- "grouped-vertical-middle": "awsui_grouped-vertical-middle_8cbea_14190_224",
23
- "grouped-vertical-last": "awsui_grouped-vertical-last_8cbea_14190_230",
24
- "grouped-with-action": "awsui_grouped-with-action_8cbea_14190_234",
25
- "grouped-with-error": "awsui_grouped-with-error_8cbea_14190_238",
26
- "grouped-horizontal-only": "awsui_grouped-horizontal-only_8cbea_14190_266",
27
- "grouped-vertical-only": "awsui_grouped-vertical-only_8cbea_14190_266",
28
- "grouped-with-warning": "awsui_grouped-with-warning_8cbea_14190_272",
29
- "select": "awsui_select_8cbea_14190_110",
30
- "segment-count-2": "awsui_segment-count-2_8cbea_14190_336",
31
- "segment-count-3": "awsui_segment-count-3_8cbea_14190_343",
32
- "segment-count-4": "awsui_segment-count-4_8cbea_14190_350",
33
- "segment-count-5": "awsui_segment-count-5_8cbea_14190_357",
34
- "segment-count-6": "awsui_segment-count-6_8cbea_14190_364",
35
- "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_14190_371"
5
+ "segment": "awsui_segment_8cbea_wwfwa_17",
6
+ "full-width": "awsui_full-width_8cbea_wwfwa_44",
7
+ "refresh": "awsui_refresh_8cbea_wwfwa_47",
8
+ "disabled": "awsui_disabled_8cbea_wwfwa_53",
9
+ "selected": "awsui_selected_8cbea_wwfwa_110",
10
+ "icon": "awsui_icon_8cbea_wwfwa_122",
11
+ "with-text": "awsui_with-text_8cbea_wwfwa_126",
12
+ "with-no-text": "awsui_with-no-text_8cbea_wwfwa_132",
13
+ "root": "awsui_root_8cbea_wwfwa_137",
14
+ "segment-part": "awsui_segment-part_8cbea_wwfwa_169",
15
+ "grouped": "awsui_grouped_8cbea_wwfwa_190",
16
+ "grouped-only": "awsui_grouped-only_8cbea_wwfwa_190",
17
+ "grouped-vertical": "awsui_grouped-vertical_8cbea_wwfwa_194",
18
+ "grouped-horizontal-first": "awsui_grouped-horizontal-first_8cbea_wwfwa_206",
19
+ "grouped-horizontal-middle": "awsui_grouped-horizontal-middle_8cbea_wwfwa_210",
20
+ "grouped-horizontal-last": "awsui_grouped-horizontal-last_8cbea_wwfwa_216",
21
+ "grouped-vertical-first": "awsui_grouped-vertical-first_8cbea_wwfwa_220",
22
+ "grouped-vertical-middle": "awsui_grouped-vertical-middle_8cbea_wwfwa_224",
23
+ "grouped-vertical-last": "awsui_grouped-vertical-last_8cbea_wwfwa_230",
24
+ "grouped-with-action": "awsui_grouped-with-action_8cbea_wwfwa_234",
25
+ "grouped-with-error": "awsui_grouped-with-error_8cbea_wwfwa_238",
26
+ "grouped-horizontal-only": "awsui_grouped-horizontal-only_8cbea_wwfwa_266",
27
+ "grouped-vertical-only": "awsui_grouped-vertical-only_8cbea_wwfwa_266",
28
+ "grouped-with-warning": "awsui_grouped-with-warning_8cbea_wwfwa_272",
29
+ "select": "awsui_select_8cbea_wwfwa_110",
30
+ "segment-count-2": "awsui_segment-count-2_8cbea_wwfwa_336",
31
+ "segment-count-3": "awsui_segment-count-3_8cbea_wwfwa_343",
32
+ "segment-count-4": "awsui_segment-count-4_8cbea_wwfwa_350",
33
+ "segment-count-5": "awsui_segment-count-5_8cbea_wwfwa_357",
34
+ "segment-count-6": "awsui_segment-count-6_8cbea_wwfwa_364",
35
+ "disabled-reason-tooltip": "awsui_disabled-reason-tooltip_8cbea_wwfwa_371"
36
36
  };
37
37
 
@@ -162,6 +162,20 @@ export interface BaseSelectProps extends BaseDropdownHostProps, BaseComponentPro
162
162
  * Adds `aria-describedby` to the dropdown's listbox/dialog content.
163
163
  */
164
164
  dropdownAriaDescribedby?: string;
165
+ /**
166
+ * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.
167
+ * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and
168
+ * [React Portals](https://reactjs.org/docs/portals.html).
169
+ *
170
+ * Set this property if the dropdown would otherwise be constrained by a scrollable container,
171
+ * for example inside table and split view layouts.
172
+ *
173
+ * We recommend you use discretion, and don't enable this property unless necessary
174
+ * because fixed positioning results in a slight, visible lag when scrolling complex pages.
175
+ *
176
+ * When the component is rendered in a control group, the dropdown will be rendered expanded to the viewport regardless of this property.
177
+ */
178
+ expandToViewport?: boolean;
165
179
  }
166
180
  export interface SelectProps extends BaseSelectProps {
167
181
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,eACf,SAAQ,qBAAqB,EAC3B,kBAAkB,EAClB,+BAA+B,EAC/B,mBAAmB;IACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiCI;IACJ,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;IAE9B;;;;;;;;;;;;;;;;QAgBI;IACJ,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5E;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH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,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,WAAW,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;KACnB;IACD,UAAiB,uBAAuB;QACtC,IAAI,EAAE,SAAS,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB;IACD,KAAY,UAAU,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,uBAAuB,CAAC;IAC5F,KAAY,wBAAwB,GAAG,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,GAAG,IAAI,CAAC;IAK9G,UAAiB,eAAgB,SAAQ,sBAAsB;KAAG;IAElE,UAAiB,YAAY;QAC3B,cAAc,EAAE,MAAM,CAAC;KACxB;IAED,UAAiB,8BAA8B;QAC7C,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;KAC/C;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { BaseDropdownHostProps, OptionsFilteringType, OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { DropdownStatusProps } from '../types/dropdown-status';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedAriaLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * Renders content at the top of the dropdown, above the filter input (when filtering is enabled) and the\n * options list. Pinned (sticky) to the top and rendered in every state (empty, no-match, loading, error,\n * finished).\n */\n renderDropdownHeader?: SelectProps.DropdownContentRenderer;\n\n /**\n * Renders content at the bottom of the dropdown. The content is always sticky and never scrolls with the\n * options list. It is added below the built-in status region. Receives the current filtering state and a\n * callback to close the dropdown.\n */\n renderDropdownFooter?: SelectProps.DropdownContentRenderer;\n\n /**\n * Determines the ARIA role of the dropdown.\n *\n * - `auto` (default): the dropdown uses a listbox role, or a dialog role wrapping the listbox when built-in\n * filtering is enabled.\n * - `dialog`: the dropdown always uses a dialog role wrapping the listbox, even without built-in filtering. Use\n * this when you render interactive custom content and want assistive technologies to treat the dropdown as a dialog.\n */\n dropdownRole?: SelectProps.DropdownRole;\n\n /**\n * Adds `aria-describedby` to the dropdown's listbox/dialog content.\n */\n dropdownAriaDescribedby?: string;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n onLoadItems?: NonCancelableEventHandler<SelectProps.LoadItemsDetail>;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu or trigger.\n */\n renderOption?: SelectProps.SelectOptionItemRenderer;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n /**\n * The argument passed to the dropdown render functions (`renderDropdownHeader`\n * and `renderDropdownFooter`).\n */\n export interface DropdownContentProps {\n filterText: string;\n\n closeDropdown: () => void;\n }\n\n export type DropdownRole = 'auto' | 'dialog';\n\n /**\n * A render function for custom dropdown content, used by `renderDropdownHeader` and `renderDropdownFooter`.\n * Receives the current filtering state and a callback to close the dropdown.\n */\n export type DropdownContentRenderer = (props: DropdownContentProps) => ReactNode | null;\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export interface SelectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n parent: SelectOptionGroupItem | null;\n }\n export interface SelectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n disabled: boolean;\n }\n export interface SelectTriggerOptionItem {\n type: 'trigger';\n option: Option;\n }\n export type SelectItem = SelectOptionItem | SelectOptionGroupItem | SelectTriggerOptionItem;\n export type SelectOptionItemRenderer = (props: { item: SelectItem; filterText?: string }) => ReactNode | null;\n\n /* eslint-disable-next-line @typescript-eslint/no-empty-object-type --\n * Required to create a distinct named type for the documenter.\n **/\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {}\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/select/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { BaseDropdownHostProps, OptionsFilteringType, OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { DropdownStatusProps } from '../types/dropdown-status';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport { OptionDefinition, OptionGroup as OptionGroupDefinition } from '../types/option';\n\nexport interface BaseSelectProps\n extends BaseDropdownHostProps,\n BaseComponentProps,\n FormFieldValidationControlProps,\n DropdownStatusProps {\n /**\n * Specifies an array of options that are displayed to the user as a dropdown list.\n * The options can be grouped using `OptionGroup` objects.\n *\n * #### Option\n * - `value` (string) - The returned value of the option when selected.\n *\n * #### OptionGroup\n * - `value` (string) - Used to locate option group in test utils.\n * - `options` (Option[]) - (Optional) The options under this group.\n *\n * #### Shared Option and OptionGroup properties\n * - `label` (string) - (Optional) Option or group text displayed to the user.\n * - `lang` (string) - (Optional) The language of the option or group, provided as a BCP 47 language tag.\n * - `description` (string) - (Optional) Further information about the option or group that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the option or group is disabled.\n * - `disabledReason` (ReactNode) - (Optional) Displays tooltip near the item when disabled. Use to provide additional context. Do not place interactive elements like links or buttons.\n * - `labelTag` (string) - (Optional) A label tag that provides additional guidance, shown next to the label.\n * - `tags` [string[]] - (Optional) A list of tags giving further guidance about the option or group.\n * - `filteringTags` [string[]] - (Optional) A list of additional tags used for automatic filtering.\n * - `iconName` (string) - (Optional) Specifies the name of an [icon](/components/icon/) to display in the option or group.\n * - `iconAriaLabel` (string) - (Optional) Specifies alternate text for the icon. We recommend that you provide this for accessibility.\n * - `iconAlt` (string) - (Optional) **Deprecated**, replaced by \\`iconAriaLabel\\`. Specifies alternate text for a custom icon, for use with `iconUrl`.\n * - `iconUrl` (string) - (Optional) URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n *\n * Note: Only one level of option nesting is supported.\n *\n * If you want to use the built-in filtering capabilities of this component, provide\n * a list of all valid options here and they will be automatically filtered based on the user's filtering input.\n *\n * Alternatively, you can listen to the `onChange` or `onLoadItems` event and set new options\n * on your own.\n **/\n options?: SelectProps.Options;\n\n /**\n * Determines how filtering is applied to the list of `options`:\n *\n * * `auto` - The component will automatically filter options based on user input.\n * * `manual` - You will set up `onChange` or `onLoadItems` event listeners and filter options on your side or request\n * them from server.\n *\n * By default the component will filter the provided `options` based on the value of the filtering input field.\n * Only options that have a `value`, `label`, `description` or `labelTag` that contains the input value as a substring\n * are displayed in the list of options.\n *\n * If you set this property to `manual`, this default filtering mechanism is disabled and all provided `options` are\n * displayed in the dropdown list. In that case make sure that you use the `onChange` or `onLoadItems` events in order\n * to set the `options` property to the options that are relevant for the user, given the filtering input value.\n *\n * Note: Manual filtering doesn't disable match highlighting.\n **/\n filteringType?: OptionsFilteringType;\n\n /**\n * Determines whether the whole select component is disabled.\n */\n disabled?: boolean;\n /**\n * Specifies the placeholder to display in the filtering input if filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n /**\n * Adds an `aria-label` on the built-in filtering input if filtering is enabled.\n */\n filteringAriaLabel?: string;\n /**\n * Adds an `aria-label` to the clear button inside the search input.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n /**\n * @deprecated Has no effect.\n */\n name?: string;\n /**\n * Specifies the hint text that's displayed in the field when no option has been selected.\n */\n placeholder?: string;\n /**\n * Specifies the ID for the trigger component. It uses an automatically generated ID by default.\n */\n controlId?: string;\n /**\n * Adds `aria-required` to the native input element.\n */\n ariaRequired?: boolean;\n /**\n * Adds `aria-label` to the select element.\n * Use this if you don't have a visible label for this control.\n */\n ariaLabel?: string;\n /**\n * Specifies the localized string that describes an option as being selected.\n * This is required to provide a good screen reader experience. For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n * @i18n\n */\n selectedAriaLabel?: string;\n /**\n * Overrides the element that is announced to screen readers\n * when the highlighted option changes. By default, this announces\n * the option's name and properties, and its selected state if\n * the `selectedAriaLabel` property is defined.\n * The highlighted option is provided, and its group (if groups\n * are used and it differs from the group of the previously highlighted option).\n *\n * For more information, see the\n * [accessibility guidelines](/components/select/?tabId=usage#accessibility-guidelines).\n */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n /**\n * Displayed for `filteringType=\"auto\"` when there are no matches for the filtering.\n */\n noMatch?: React.ReactNode;\n /**\n * Called when input focus is removed from the UI control.\n */\n onBlur?: NonCancelableEventHandler;\n /**\n * Called when input focus is set onto the UI control.\n */\n onFocus?: NonCancelableEventHandler;\n\n /**\n * Specifies if the control is read-only, which prevents the\n * user from both modifying the value and opening the dropdown. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * Renders content at the top of the dropdown, above the filter input (when filtering is enabled) and the\n * options list. Pinned (sticky) to the top and rendered in every state (empty, no-match, loading, error,\n * finished).\n */\n renderDropdownHeader?: SelectProps.DropdownContentRenderer;\n\n /**\n * Renders content at the bottom of the dropdown. The content is always sticky and never scrolls with the\n * options list. It is added below the built-in status region. Receives the current filtering state and a\n * callback to close the dropdown.\n */\n renderDropdownFooter?: SelectProps.DropdownContentRenderer;\n\n /**\n * Determines the ARIA role of the dropdown.\n *\n * - `auto` (default): the dropdown uses a listbox role, or a dialog role wrapping the listbox when built-in\n * filtering is enabled.\n * - `dialog`: the dropdown always uses a dialog role wrapping the listbox, even without built-in filtering. Use\n * this when you render interactive custom content and want assistive technologies to treat the dropdown as a dialog.\n */\n dropdownRole?: SelectProps.DropdownRole;\n\n /**\n * Adds `aria-describedby` to the dropdown's listbox/dialog content.\n */\n dropdownAriaDescribedby?: string;\n\n /**\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n *\n * When the component is rendered in a control group, the dropdown will be rendered expanded to the viewport regardless of this property.\n */\n expandToViewport?: boolean;\n}\n\nexport interface SelectProps extends BaseSelectProps {\n /**\n * Adds a small label inline with the input for saving vertical space in the UI.\n * For use with collection select filters only.\n */\n inlineLabelText?: string;\n onLoadItems?: NonCancelableEventHandler<SelectProps.LoadItemsDetail>;\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't using `inlineLabelText` and isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n /**\n * Defines the variant of the trigger. You can use a simple label or the entire option (`label | option`)\n */\n triggerVariant?: SelectProps.TriggerVariant;\n /**\n * Specifies the currently selected option.\n * If you want to clear the selection, use `null`.\n */\n selectedOption: SelectProps.Option | null;\n /**\n * Called when the user selects an option.\n * The event `detail` contains the current `selectedOption`.\n */\n onChange?: NonCancelableEventHandler<SelectProps.ChangeDetail>;\n\n /**\n * Automatically focuses the trigger when component is mounted.\n */\n autoFocus?: boolean;\n /**\n * Specifies a render function to render custom options in the dropdown menu or trigger.\n */\n renderOption?: SelectProps.SelectOptionItemRenderer;\n}\n\nexport namespace SelectProps {\n export type FilteringType = OptionsFilteringType;\n export type TriggerVariant = 'label' | 'option';\n\n /**\n * The argument passed to the dropdown render functions (`renderDropdownHeader`\n * and `renderDropdownFooter`).\n */\n export interface DropdownContentProps {\n filterText: string;\n\n closeDropdown: () => void;\n }\n\n export type DropdownRole = 'auto' | 'dialog';\n\n /**\n * A render function for custom dropdown content, used by `renderDropdownHeader` and `renderDropdownFooter`.\n * Receives the current filtering state and a callback to close the dropdown.\n */\n export type DropdownContentRenderer = (props: DropdownContentProps) => ReactNode | null;\n\n export type Option = OptionDefinition;\n export type OptionGroup = OptionGroupDefinition;\n export type Options = ReadonlyArray<Option | OptionGroup>;\n\n export interface SelectOptionItem {\n type: 'item';\n index: number;\n option: Option;\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n parent: SelectOptionGroupItem | null;\n }\n export interface SelectOptionGroupItem {\n type: 'group';\n index: number;\n option: OptionGroup;\n disabled: boolean;\n }\n export interface SelectTriggerOptionItem {\n type: 'trigger';\n option: Option;\n }\n export type SelectItem = SelectOptionItem | SelectOptionGroupItem | SelectTriggerOptionItem;\n export type SelectOptionItemRenderer = (props: { item: SelectItem; filterText?: string }) => ReactNode | null;\n\n /* eslint-disable-next-line @typescript-eslint/no-empty-object-type --\n * Required to create a distinct named type for the documenter.\n **/\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {}\n\n export interface ChangeDetail {\n selectedOption: Option;\n }\n\n export interface ContainingOptionAndGroupString {\n (option: Option, group?: OptionGroup): string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the element without opening the dropdown or showing a visual focus indicator.\n */\n focus(): void;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAkB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAY3C,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IAC3G,kBAAkB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACxC;AAED,QAAA,MAAM,cAAc,6FAqSnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/select/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAoB3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAW3C,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,0BAA0B;IAC3G,kBAAkB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;CACxC;AAED,QAAA,MAAM,cAAc,6FAgTnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -9,13 +9,16 @@ import { getBaseProps } from '../internal/base-component';
9
9
  import { getBreakpointValue } from '../internal/breakpoints';
10
10
  import DropdownFooter from '../internal/components/dropdown-footer';
11
11
  import { useDropdownStatus } from '../internal/components/dropdown-status';
12
+ import { singleSelection } from '../internal/components/listbox/selection/single-selection';
12
13
  import { useAnnouncement } from '../internal/components/listbox/use-announcement';
13
14
  import { checkOptionValueField } from '../internal/components/listbox/utils/check-option-value-field';
14
15
  import { prepareOptions } from '../internal/components/option/utils/prepare-options.js';
15
16
  import { ResetGroupedControlContext, useGroupedControlContext } from '../internal/context/control-group-context';
16
17
  import { useFormFieldContext } from '../internal/context/form-field-context';
17
18
  import { fireNonCancelableEvent } from '../internal/events';
19
+ import { warnOnUnsupportedGroupedControlProps } from '../internal/grouped-control/dev-warnings';
18
20
  import checkControlled from '../internal/hooks/check-controlled';
21
+ import { useLoadItems } from '../internal/hooks/use-load-items';
19
22
  import { getDropdownMinWidth } from '../internal/utils/get-dropdown-min-width';
20
23
  import { joinStrings } from '../internal/utils/strings/join-strings.js';
21
24
  import Filter from './parts/filter';
@@ -23,7 +26,6 @@ import PlainList from './parts/plain-list';
23
26
  import Trigger from './parts/trigger';
24
27
  import VirtualList from './parts/virtual-list';
25
28
  import { composeDropdownContent } from './utils/dropdown-customization';
26
- import { useLoadItems } from './utils/use-load-items';
27
29
  import { useNativeSearch } from './utils/use-native-search';
28
30
  import { useSelect } from './utils/use-select';
29
31
  import styles from './styles.css.js';
@@ -32,6 +34,14 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
32
34
  const baseProps = getBaseProps(restProps);
33
35
  const formFieldContext = useFormFieldContext(restProps);
34
36
  const groupedControlProps = useGroupedControlContext();
37
+ warnOnUnsupportedGroupedControlProps({
38
+ isGrouped: !!groupedControlProps.position,
39
+ componentName: 'Select',
40
+ invalid: formFieldContext.invalid,
41
+ warning: formFieldContext.warning,
42
+ readOnly,
43
+ expandToViewport,
44
+ });
35
45
  // When grouped, the dropdown is portaled regardless of the public
36
46
  // `expandToViewport` prop so it escapes the control slot's stacking context
37
47
  // and paints over the group's inline label (which the focus ring stays under).
@@ -45,7 +55,7 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
45
55
  }
46
56
  const { handleLoadMore, handleRecoveryClick, fireLoadItems } = useLoadItems({
47
57
  onLoadItems,
48
- options,
58
+ isEmpty: options.length === 0,
49
59
  statusType,
50
60
  });
51
61
  checkControlled('Select', 'selectedOption', selectedOption, 'onChange', onChange);
@@ -59,8 +69,10 @@ const InternalSelect = React.forwardRef(({ options, filteringType = 'none', filt
59
69
  const selfControlId = useUniqueId('trigger');
60
70
  const controlId = (_a = formFieldContext.controlId) !== null && _a !== void 0 ? _a : selfControlId;
61
71
  const scrollToIndex = useRef(null);
72
+ const selectedOptions = selectedOption ? [selectedOption] : [];
62
73
  const { isOpen, highlightType, highlightedOption, highlightedIndex, getTriggerProps, getDropdownProps, getFilterProps, getMenuProps, getOptionProps, highlightOption, selectOption, announceSelected, focusActiveRef, closeDropdown, } = useSelect({
63
- selectedOptions: selectedOption ? [selectedOption] : [],
74
+ selectedOptions,
75
+ selection: singleSelection(selectedOptions),
64
76
  updateSelectedOption: option => fireNonCancelableEvent(onChange, { selectedOption: option }),
65
77
  options: filteredOptions,
66
78
  filteringType,
@@ -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,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,eAAe,MAAM,oCAAo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AAa,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 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 // 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"]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C,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 => 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 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"]}
@@ -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