@cloudscape-design/components 3.0.1128 → 3.0.1130

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 (824) hide show
  1. package/alert/actions-wrapper/index.js +3 -3
  2. package/alert/actions-wrapper/index.js.map +1 -1
  3. package/alert/internal-do-not-use-core.js +2 -4
  4. package/alert/internal-do-not-use-core.js.map +1 -1
  5. package/alert/internal.js +8 -10
  6. package/alert/internal.js.map +1 -1
  7. package/alert/style.js +12 -5
  8. package/alert/style.js.map +1 -1
  9. package/alert/styles.css.js +27 -27
  10. package/alert/styles.scoped.css +50 -50
  11. package/alert/styles.selectors.js +27 -27
  12. package/anchor-navigation/anchor-item/index.js +1 -1
  13. package/anchor-navigation/anchor-item/index.js.map +1 -1
  14. package/anchor-navigation/index.js +2 -4
  15. package/anchor-navigation/index.js.map +1 -1
  16. package/anchor-navigation/internal.js +2 -4
  17. package/anchor-navigation/internal.js.map +1 -1
  18. package/annotation-context/annotation/styles.css.js +24 -24
  19. package/annotation-context/annotation/styles.scoped.css +32 -32
  20. package/annotation-context/annotation/styles.selectors.js +24 -24
  21. package/annotation-context/index.js +3 -4
  22. package/annotation-context/index.js.map +1 -1
  23. package/app-layout/classic.js +20 -17
  24. package/app-layout/classic.js.map +1 -1
  25. package/app-layout/defaults.js +8 -3
  26. package/app-layout/defaults.js.map +1 -1
  27. package/app-layout/drawer/resizable-drawer.js +8 -10
  28. package/app-layout/drawer/resizable-drawer.js.map +1 -1
  29. package/app-layout/index.js +24 -21
  30. package/app-layout/index.js.map +1 -1
  31. package/app-layout/internal.js +3 -3
  32. package/app-layout/internal.js.map +1 -1
  33. package/app-layout/notifications/index.js +3 -5
  34. package/app-layout/notifications/index.js.map +1 -1
  35. package/app-layout/notifications/styles.css.js +3 -3
  36. package/app-layout/notifications/styles.scoped.css +7 -7
  37. package/app-layout/notifications/styles.selectors.js +3 -3
  38. package/app-layout/runtime-drawer/index.js +36 -18
  39. package/app-layout/runtime-drawer/index.js.map +1 -1
  40. package/app-layout/split-panel/provider.js +2 -4
  41. package/app-layout/split-panel/provider.js.map +1 -1
  42. package/app-layout/utils/use-app-layout-placement.js +1 -1
  43. package/app-layout/utils/use-app-layout-placement.js.map +1 -1
  44. package/app-layout/utils/use-drawers.js +9 -3
  45. package/app-layout/utils/use-drawers.js.map +1 -1
  46. package/app-layout/visual-refresh/context.js +28 -11
  47. package/app-layout/visual-refresh/context.js.map +1 -1
  48. package/app-layout/visual-refresh/drawers.js +3 -1
  49. package/app-layout/visual-refresh/drawers.js.map +1 -1
  50. package/app-layout/visual-refresh/index.js +1 -1
  51. package/app-layout/visual-refresh/index.js.map +1 -1
  52. package/app-layout/visual-refresh/layout.js +9 -1
  53. package/app-layout/visual-refresh/layout.js.map +1 -1
  54. package/app-layout/visual-refresh/main.js +4 -1
  55. package/app-layout/visual-refresh/main.js.map +1 -1
  56. package/app-layout/visual-refresh/split-panel.js +1 -1
  57. package/app-layout/visual-refresh/split-panel.js.map +1 -1
  58. package/app-layout/visual-refresh/styles.css.js +86 -86
  59. package/app-layout/visual-refresh/styles.scoped.css +258 -258
  60. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  61. package/app-layout/visual-refresh/trigger-button.js +6 -3
  62. package/app-layout/visual-refresh/trigger-button.js.map +1 -1
  63. package/app-layout/visual-refresh-toolbar/compute-layout.js +5 -2
  64. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  65. package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js +8 -4
  66. package/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
  67. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js +9 -6
  68. package/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
  69. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js +7 -3
  70. package/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  71. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +8 -4
  72. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  73. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
  74. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +87 -87
  75. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
  76. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  77. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  78. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  79. package/app-layout/visual-refresh-toolbar/skeleton/index.js +10 -10
  80. package/app-layout/visual-refresh-toolbar/skeleton/index.js.map +1 -1
  81. package/app-layout/visual-refresh-toolbar/skeleton/slots.js +5 -2
  82. package/app-layout/visual-refresh-toolbar/skeleton/slots.js.map +1 -1
  83. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
  84. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
  85. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
  86. package/app-layout/visual-refresh-toolbar/split-panel/index.js +2 -2
  87. package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
  88. package/app-layout/visual-refresh-toolbar/state/props-merger.js +7 -2
  89. package/app-layout/visual-refresh-toolbar/state/props-merger.js.map +1 -1
  90. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js +1 -1
  91. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.js.map +1 -1
  92. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js +19 -12
  93. package/app-layout/visual-refresh-toolbar/state/use-app-layout.js.map +1 -1
  94. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js +5 -2
  95. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.js.map +1 -1
  96. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js +10 -6
  97. package/app-layout/visual-refresh-toolbar/state/use-skeleton-slots-attributes.js.map +1 -1
  98. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +4 -1
  99. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  100. package/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
  101. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  102. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +8 -8
  103. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
  104. package/app-layout-toolbar/index.js +24 -21
  105. package/app-layout-toolbar/index.js.map +1 -1
  106. package/area-chart/chart-container.js +1 -1
  107. package/area-chart/chart-container.js.map +1 -1
  108. package/area-chart/elements/chart-popover.js +1 -1
  109. package/area-chart/elements/chart-popover.js.map +1 -1
  110. package/area-chart/elements/threshold-series.js +1 -1
  111. package/area-chart/elements/threshold-series.js.map +1 -1
  112. package/area-chart/index.js +2 -4
  113. package/area-chart/index.js.map +1 -1
  114. package/area-chart/internal.js +2 -4
  115. package/area-chart/internal.js.map +1 -1
  116. package/area-chart/model/interactions-store.js +39 -9
  117. package/area-chart/model/interactions-store.js.map +1 -1
  118. package/attribute-editor/index.d.ts.map +1 -1
  119. package/attribute-editor/index.js +4 -6
  120. package/attribute-editor/index.js.map +1 -1
  121. package/attribute-editor/interfaces.d.ts +8 -0
  122. package/attribute-editor/interfaces.d.ts.map +1 -1
  123. package/attribute-editor/interfaces.js.map +1 -1
  124. package/attribute-editor/internal.d.ts.map +1 -1
  125. package/attribute-editor/internal.js +14 -10
  126. package/attribute-editor/internal.js.map +1 -1
  127. package/attribute-editor/row.js +1 -1
  128. package/attribute-editor/row.js.map +1 -1
  129. package/attribute-editor/styles.css.js +15 -15
  130. package/attribute-editor/styles.scoped.css +28 -28
  131. package/attribute-editor/styles.selectors.js +15 -15
  132. package/autosuggest/autosuggest-option.js +3 -5
  133. package/autosuggest/autosuggest-option.js.map +1 -1
  134. package/autosuggest/internal-do-not-use-core.js +2 -4
  135. package/autosuggest/internal-do-not-use-core.js.map +1 -1
  136. package/autosuggest/internal.js +10 -5
  137. package/autosuggest/internal.js.map +1 -1
  138. package/autosuggest/options-controller.js +15 -8
  139. package/autosuggest/options-controller.js.map +1 -1
  140. package/autosuggest/plain-list.js +3 -3
  141. package/autosuggest/plain-list.js.map +1 -1
  142. package/autosuggest/virtual-list.js +2 -2
  143. package/autosuggest/virtual-list.js.map +1 -1
  144. package/badge/internal-do-not-use-core.js +2 -4
  145. package/badge/internal-do-not-use-core.js.map +1 -1
  146. package/bar-chart/index.js +2 -4
  147. package/bar-chart/index.js.map +1 -1
  148. package/box/internal-do-not-use-core.js +2 -4
  149. package/box/internal-do-not-use-core.js.map +1 -1
  150. package/box/internal.js +2 -4
  151. package/box/internal.js.map +1 -1
  152. package/breadcrumb-group/all-items-dropdown.js +3 -3
  153. package/breadcrumb-group/all-items-dropdown.js.map +1 -1
  154. package/breadcrumb-group/implementation.js +9 -8
  155. package/breadcrumb-group/implementation.js.map +1 -1
  156. package/breadcrumb-group/index.js +3 -5
  157. package/breadcrumb-group/index.js.map +1 -1
  158. package/breadcrumb-group/item/funnel.js +1 -1
  159. package/breadcrumb-group/item/funnel.js.map +1 -1
  160. package/breadcrumb-group/item/item.js +5 -7
  161. package/breadcrumb-group/item/item.js.map +1 -1
  162. package/breadcrumb-group/item/styles.css.js +7 -7
  163. package/breadcrumb-group/item/styles.scoped.css +28 -28
  164. package/breadcrumb-group/item/styles.selectors.js +7 -7
  165. package/button/icon-helper.js +3 -5
  166. package/button/icon-helper.js.map +1 -1
  167. package/button/internal-do-not-use-core.js +2 -4
  168. package/button/internal-do-not-use-core.js.map +1 -1
  169. package/button/internal.js +31 -14
  170. package/button/internal.js.map +1 -1
  171. package/button/style.js +38 -27
  172. package/button/style.js.map +1 -1
  173. package/button/styles.css.js +22 -22
  174. package/button/styles.scoped.css +256 -256
  175. package/button/styles.selectors.js +22 -22
  176. package/button-dropdown/category-elements/expandable-category-element.js +11 -11
  177. package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  178. package/button-dropdown/category-elements/mobile-expandable-category-element.js +12 -12
  179. package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  180. package/button-dropdown/internal-do-not-use-core.js +4 -6
  181. package/button-dropdown/internal-do-not-use-core.js.map +1 -1
  182. package/button-dropdown/internal.js +36 -25
  183. package/button-dropdown/internal.js.map +1 -1
  184. package/button-dropdown/item-element/index.js +25 -17
  185. package/button-dropdown/item-element/index.js.map +1 -1
  186. package/button-dropdown/item-element/styles.css.js +16 -16
  187. package/button-dropdown/item-element/styles.scoped.css +27 -27
  188. package/button-dropdown/item-element/styles.selectors.js +16 -16
  189. package/button-dropdown/tooltip.js +1 -1
  190. package/button-dropdown/tooltip.js.map +1 -1
  191. package/button-dropdown/utils/use-button-dropdown.js +1 -2
  192. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  193. package/button-group/internal-do-not-use-core.js +2 -4
  194. package/button-group/internal-do-not-use-core.js.map +1 -1
  195. package/button-group/internal.js +2 -4
  196. package/button-group/internal.js.map +1 -1
  197. package/button-group/item-element.js +4 -4
  198. package/button-group/item-element.js.map +1 -1
  199. package/button-group/menu-dropdown-item.js +1 -1
  200. package/button-group/menu-dropdown-item.js.map +1 -1
  201. package/button-group/style.js +34 -20
  202. package/button-group/style.js.map +1 -1
  203. package/calendar/grid/index.js +2 -3
  204. package/calendar/grid/index.js.map +1 -1
  205. package/calendar/index.js +2 -4
  206. package/calendar/index.js.map +1 -1
  207. package/calendar/internal.js +2 -4
  208. package/calendar/internal.js.map +1 -1
  209. package/cards/index.js +17 -19
  210. package/cards/index.js.map +1 -1
  211. package/checkbox/internal-do-not-use-core.js +2 -4
  212. package/checkbox/internal-do-not-use-core.js.map +1 -1
  213. package/checkbox/internal.js +4 -6
  214. package/checkbox/internal.js.map +1 -1
  215. package/checkbox/styles.css.js +3 -3
  216. package/checkbox/styles.scoped.css +11 -11
  217. package/checkbox/styles.selectors.js +3 -3
  218. package/code-editor/index.js +2 -3
  219. package/code-editor/index.js.map +1 -1
  220. package/code-editor/use-editor.js +4 -1
  221. package/code-editor/use-editor.js.map +1 -1
  222. package/code-editor/util.js +4 -1
  223. package/code-editor/util.js.map +1 -1
  224. package/collection-preferences/content-display/index.js +1 -1
  225. package/collection-preferences/content-display/index.js.map +1 -1
  226. package/collection-preferences/content-display/utils.js +1 -1
  227. package/collection-preferences/content-display/utils.js.map +1 -1
  228. package/collection-preferences/index.js +20 -13
  229. package/collection-preferences/index.js.map +1 -1
  230. package/collection-preferences/utils.js +9 -9
  231. package/collection-preferences/utils.js.map +1 -1
  232. package/collection-preferences/visible-content.js +8 -8
  233. package/collection-preferences/visible-content.js.map +1 -1
  234. package/column-layout/index.js +2 -4
  235. package/column-layout/index.js.map +1 -1
  236. package/column-layout/internal.js +2 -4
  237. package/column-layout/internal.js.map +1 -1
  238. package/container/internal-do-not-use-core.js +2 -4
  239. package/container/internal-do-not-use-core.js.map +1 -1
  240. package/container/internal.js +11 -9
  241. package/container/internal.js.map +1 -1
  242. package/container/style.js +11 -2
  243. package/container/style.js.map +1 -1
  244. package/content-layout/index.js +1 -1
  245. package/content-layout/index.js.map +1 -1
  246. package/content-layout/internal.js +3 -5
  247. package/content-layout/internal.js.map +1 -1
  248. package/content-layout/styles.css.js +14 -14
  249. package/content-layout/styles.scoped.css +27 -27
  250. package/content-layout/styles.selectors.js +14 -14
  251. package/copy-to-clipboard/index.js +2 -4
  252. package/copy-to-clipboard/index.js.map +1 -1
  253. package/copy-to-clipboard/internal.js +2 -4
  254. package/copy-to-clipboard/internal.js.map +1 -1
  255. package/date-input/internal-do-not-use-core.js +1 -1
  256. package/date-input/internal-do-not-use-core.js.map +1 -1
  257. package/date-input/internal.js +6 -8
  258. package/date-input/internal.js.map +1 -1
  259. package/date-picker/index.js +9 -6
  260. package/date-picker/index.js.map +1 -1
  261. package/date-range-picker/calendar/grids/grid-cell.js +3 -4
  262. package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
  263. package/date-range-picker/calendar/grids/grid.js +8 -8
  264. package/date-range-picker/calendar/grids/grid.js.map +1 -1
  265. package/date-range-picker/calendar/grids/index.js +2 -2
  266. package/date-range-picker/calendar/grids/index.js.map +1 -1
  267. package/date-range-picker/calendar/index.js +5 -2
  268. package/date-range-picker/calendar/index.js.map +1 -1
  269. package/date-range-picker/index.js +8 -6
  270. package/date-range-picker/index.js.map +1 -1
  271. package/date-range-picker/utils.js +8 -2
  272. package/date-range-picker/utils.js.map +1 -1
  273. package/drawer/implementation.js +7 -6
  274. package/drawer/implementation.js.map +1 -1
  275. package/drawer/index.js +1 -1
  276. package/drawer/index.js.map +1 -1
  277. package/expandable-section/expandable-section-container.js +3 -5
  278. package/expandable-section/expandable-section-container.js.map +1 -1
  279. package/expandable-section/expandable-section-header.js +8 -8
  280. package/expandable-section/expandable-section-header.js.map +1 -1
  281. package/expandable-section/index.js +2 -4
  282. package/expandable-section/index.js.map +1 -1
  283. package/expandable-section/internal.js +2 -4
  284. package/expandable-section/internal.js.map +1 -1
  285. package/file-dropzone/index.js +1 -1
  286. package/file-dropzone/index.js.map +1 -1
  287. package/file-dropzone/internal.js +3 -5
  288. package/file-dropzone/internal.js.map +1 -1
  289. package/file-input/index.js +2 -4
  290. package/file-input/index.js.map +1 -1
  291. package/file-input/internal.js +11 -8
  292. package/file-input/internal.js.map +1 -1
  293. package/file-token-group/default-formatters.js +3 -3
  294. package/file-token-group/default-formatters.js.map +1 -1
  295. package/file-token-group/index.js +2 -4
  296. package/file-token-group/index.js.map +1 -1
  297. package/file-token-group/internal.js +2 -4
  298. package/file-token-group/internal.js.map +1 -1
  299. package/file-upload/index.js +2 -4
  300. package/file-upload/index.js.map +1 -1
  301. package/file-upload/internal.js +5 -7
  302. package/file-upload/internal.js.map +1 -1
  303. package/flashbar/collapsible-flashbar.js +33 -23
  304. package/flashbar/collapsible-flashbar.js.map +1 -1
  305. package/flashbar/common.js +1 -3
  306. package/flashbar/common.js.map +1 -1
  307. package/flashbar/flash.js +4 -6
  308. package/flashbar/flash.js.map +1 -1
  309. package/flashbar/implementation.js +2 -2
  310. package/flashbar/implementation.js.map +1 -1
  311. package/flashbar/internal-do-not-use-core.js +1 -1
  312. package/flashbar/internal-do-not-use-core.js.map +1 -1
  313. package/flashbar/non-collapsible-flashbar.js +10 -9
  314. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  315. package/flashbar/style.js +50 -32
  316. package/flashbar/style.js.map +1 -1
  317. package/flashbar/styles.css.js +50 -50
  318. package/flashbar/styles.scoped.css +187 -187
  319. package/flashbar/styles.selectors.js +50 -50
  320. package/flashbar/utils.js +2 -2
  321. package/flashbar/utils.js.map +1 -1
  322. package/form/index.js +4 -7
  323. package/form/index.js.map +1 -1
  324. package/form/internal.js +2 -4
  325. package/form/internal.js.map +1 -1
  326. package/form-field/index.js +7 -9
  327. package/form-field/index.js.map +1 -1
  328. package/form-field/internal.js +6 -5
  329. package/form-field/internal.js.map +1 -1
  330. package/grid/index.js +2 -4
  331. package/grid/index.js.map +1 -1
  332. package/grid/internal.js +2 -4
  333. package/grid/internal.js.map +1 -1
  334. package/header/analytics/use-table-integration.d.ts +2 -1
  335. package/header/analytics/use-table-integration.d.ts.map +1 -1
  336. package/header/analytics/use-table-integration.js +8 -1
  337. package/header/analytics/use-table-integration.js.map +1 -1
  338. package/header/index.js +2 -4
  339. package/header/index.js.map +1 -1
  340. package/header/interfaces.d.ts +2 -2
  341. package/header/interfaces.d.ts.map +1 -1
  342. package/header/interfaces.js.map +1 -1
  343. package/header/internal.js +4 -6
  344. package/header/internal.js.map +1 -1
  345. package/help-panel/implementation.js +7 -6
  346. package/help-panel/implementation.js.map +1 -1
  347. package/help-panel/index.js +1 -1
  348. package/help-panel/index.js.map +1 -1
  349. package/help-panel/styles.css.js +6 -6
  350. package/help-panel/styles.scoped.css +73 -73
  351. package/help-panel/styles.selectors.js +6 -6
  352. package/hotspot/index.js +3 -5
  353. package/hotspot/index.js.map +1 -1
  354. package/icon/internal-do-not-use-core.js +2 -4
  355. package/icon/internal-do-not-use-core.js.map +1 -1
  356. package/icon/internal.js +4 -6
  357. package/icon/internal.js.map +1 -1
  358. package/icon-provider/index.js.map +1 -1
  359. package/icon-provider/internal.js +2 -2
  360. package/icon-provider/internal.js.map +1 -1
  361. package/input/internal-do-not-use-core.js +5 -5
  362. package/input/internal-do-not-use-core.js.map +1 -1
  363. package/input/internal.js +10 -12
  364. package/input/internal.js.map +1 -1
  365. package/input/styles.css.js +13 -13
  366. package/input/styles.js +42 -30
  367. package/input/styles.js.map +1 -1
  368. package/input/styles.scoped.css +65 -65
  369. package/input/styles.selectors.js +13 -13
  370. package/internal/analytics/components/analytics-funnel.js +9 -12
  371. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  372. package/internal/analytics/hooks/use-funnel.js +5 -6
  373. package/internal/analytics/hooks/use-funnel.js.map +1 -1
  374. package/internal/animate.js +1 -1
  375. package/internal/animate.js.map +1 -1
  376. package/internal/base-component/index.js +1 -1
  377. package/internal/base-component/index.js.map +1 -1
  378. package/internal/base-component/styles.scoped.css +1 -1
  379. package/internal/components/abstract-switch/index.js +21 -20
  380. package/internal/components/abstract-switch/index.js.map +1 -1
  381. package/internal/components/autosuggest-input/index.js +3 -5
  382. package/internal/components/autosuggest-input/index.js.map +1 -1
  383. package/internal/components/button-trigger/index.js +25 -6
  384. package/internal/components/button-trigger/index.js.map +1 -1
  385. package/internal/components/cartesian-chart/inline-start-labels.js +1 -1
  386. package/internal/components/cartesian-chart/inline-start-labels.js.map +1 -1
  387. package/internal/components/chart-filter/index.js +2 -4
  388. package/internal/components/chart-filter/index.js.map +1 -1
  389. package/internal/components/chart-plot/index.js +2 -2
  390. package/internal/components/chart-plot/index.js.map +1 -1
  391. package/internal/components/chart-popover/index.js +3 -5
  392. package/internal/components/chart-popover/index.js.map +1 -1
  393. package/internal/components/chart-series-details/index.js +2 -4
  394. package/internal/components/chart-series-details/index.js.map +1 -1
  395. package/internal/components/chart-wrapper/index.js +3 -5
  396. package/internal/components/chart-wrapper/index.js.map +1 -1
  397. package/internal/components/checkbox-icon/index.js +5 -7
  398. package/internal/components/checkbox-icon/index.js.map +1 -1
  399. package/internal/components/drag-handle/button.js +5 -5
  400. package/internal/components/drag-handle/button.js.map +1 -1
  401. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js +17 -4
  402. package/internal/components/drag-handle/hooks/use-drag-handle-interaction-state.js.map +1 -1
  403. package/internal/components/drag-handle/index.js +1 -3
  404. package/internal/components/drag-handle/index.js.map +1 -1
  405. package/internal/components/drag-handle-wrapper/styles.css.js +20 -20
  406. package/internal/components/drag-handle-wrapper/styles.scoped.css +48 -48
  407. package/internal/components/drag-handle-wrapper/styles.selectors.js +20 -20
  408. package/internal/components/dropdown/styles.css.js +20 -20
  409. package/internal/components/dropdown/styles.scoped.css +38 -38
  410. package/internal/components/dropdown/styles.selectors.js +20 -20
  411. package/internal/components/masked-input/index.js +12 -8
  412. package/internal/components/masked-input/index.js.map +1 -1
  413. package/internal/components/masked-input/utils/mask-format.js +6 -1
  414. package/internal/components/masked-input/utils/mask-format.js.map +1 -1
  415. package/internal/components/menu-dropdown/index.js +2 -4
  416. package/internal/components/menu-dropdown/index.js.map +1 -1
  417. package/internal/components/option/index.js +6 -8
  418. package/internal/components/option/index.js.map +1 -1
  419. package/internal/components/option/option-parts.js +1 -1
  420. package/internal/components/option/option-parts.js.map +1 -1
  421. package/internal/components/option/utils/flatten-options.js +1 -2
  422. package/internal/components/option/utils/flatten-options.js.map +1 -1
  423. package/internal/components/options-list/index.js +2 -4
  424. package/internal/components/options-list/index.js.map +1 -1
  425. package/internal/components/screenreader-only/index.js +1 -1
  426. package/internal/components/screenreader-only/index.js.map +1 -1
  427. package/internal/components/selectable-item/analytics-metadata/utils.js +1 -3
  428. package/internal/components/selectable-item/analytics-metadata/utils.js.map +1 -1
  429. package/internal/components/selectable-item/index.js +5 -7
  430. package/internal/components/selectable-item/index.js.map +1 -1
  431. package/internal/components/sortable-area/index.js +19 -6
  432. package/internal/components/sortable-area/index.js.map +1 -1
  433. package/internal/components/token-list/styles.css.js +10 -10
  434. package/internal/components/token-list/styles.scoped.css +25 -25
  435. package/internal/components/token-list/styles.selectors.js +10 -10
  436. package/internal/components/token-list/token-limit-toggle.js +1 -1
  437. package/internal/components/token-list/token-limit-toggle.js.map +1 -1
  438. package/internal/components/tooltip/index.js +1 -1
  439. package/internal/components/tooltip/index.js.map +1 -1
  440. package/internal/components/transition/index.js +3 -5
  441. package/internal/components/transition/index.js.map +1 -1
  442. package/internal/environment.js +2 -2
  443. package/internal/environment.json +2 -2
  444. package/internal/generated/custom-css-properties/index.d.ts +28 -0
  445. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  446. package/internal/generated/custom-css-properties/index.js +126 -98
  447. package/internal/generated/custom-css-properties/index.js.map +1 -1
  448. package/internal/generated/styles/tokens.d.ts +50 -75
  449. package/internal/generated/styles/tokens.js +50 -75
  450. package/internal/generated/theming/index.cjs +305 -461
  451. package/internal/generated/theming/index.js +305 -461
  452. package/internal/hooks/use-intersection-observer/index.js +1 -1
  453. package/internal/hooks/use-intersection-observer/index.js.map +1 -1
  454. package/internal/hooks/use-performance-marks/index.js +12 -2
  455. package/internal/hooks/use-performance-marks/index.js.map +1 -1
  456. package/internal/hooks/use-virtual/index.js +5 -2
  457. package/internal/hooks/use-virtual/index.js.map +1 -1
  458. package/internal/manifest.json +1 -1
  459. package/internal/plugins/controllers/drawers.js +4 -6
  460. package/internal/plugins/controllers/drawers.js.map +1 -1
  461. package/internal/plugins/helpers/use-global-breadcrumbs.js +4 -6
  462. package/internal/plugins/helpers/use-global-breadcrumbs.js.map +1 -1
  463. package/internal/plugins/widget/index.js +1 -1
  464. package/internal/plugins/widget/index.js.map +1 -1
  465. package/internal/utils/with-native-attributes.js +4 -6
  466. package/internal/utils/with-native-attributes.js.map +1 -1
  467. package/internal/widgets/index.js +2 -2
  468. package/internal/widgets/index.js.map +1 -1
  469. package/internal/widgets/loader-mock.js +2 -2
  470. package/internal/widgets/loader-mock.js.map +1 -1
  471. package/key-value-pairs/index.js +2 -4
  472. package/key-value-pairs/index.js.map +1 -1
  473. package/key-value-pairs/internal.js +4 -6
  474. package/key-value-pairs/internal.js.map +1 -1
  475. package/line-chart/index.js +2 -4
  476. package/line-chart/index.js.map +1 -1
  477. package/link/internal-do-not-use-core.js +2 -4
  478. package/link/internal-do-not-use-core.js.map +1 -1
  479. package/link/internal.js +13 -6
  480. package/link/internal.js.map +1 -1
  481. package/link/style.js +12 -9
  482. package/link/style.js.map +1 -1
  483. package/link/styles.css.js +20 -20
  484. package/link/styles.scoped.css +103 -103
  485. package/link/styles.selectors.js +20 -20
  486. package/list/index.js +1 -1
  487. package/list/index.js.map +1 -1
  488. package/list/internal.js +6 -8
  489. package/list/internal.js.map +1 -1
  490. package/live-region/index.js +2 -4
  491. package/live-region/index.js.map +1 -1
  492. package/live-region/internal.js +2 -4
  493. package/live-region/internal.js.map +1 -1
  494. package/mixed-line-bar-chart/bar-series.js +3 -3
  495. package/mixed-line-bar-chart/bar-series.js.map +1 -1
  496. package/mixed-line-bar-chart/chart-container.js +7 -9
  497. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  498. package/mixed-line-bar-chart/chart-popover.js +4 -1
  499. package/mixed-line-bar-chart/chart-popover.js.map +1 -1
  500. package/mixed-line-bar-chart/hooks/use-navigation.js +1 -1
  501. package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
  502. package/mixed-line-bar-chart/index.js +2 -4
  503. package/mixed-line-bar-chart/index.js.map +1 -1
  504. package/mixed-line-bar-chart/internal.js +2 -4
  505. package/mixed-line-bar-chart/internal.js.map +1 -1
  506. package/mixed-line-bar-chart/line-series.js +3 -3
  507. package/mixed-line-bar-chart/line-series.js.map +1 -1
  508. package/modal/index.js +5 -8
  509. package/modal/index.js.map +1 -1
  510. package/modal/internal.js +11 -14
  511. package/modal/internal.js.map +1 -1
  512. package/multiselect/embedded.js +15 -6
  513. package/multiselect/embedded.js.map +1 -1
  514. package/multiselect/index.js +2 -4
  515. package/multiselect/index.js.map +1 -1
  516. package/multiselect/internal.js +13 -12
  517. package/multiselect/internal.js.map +1 -1
  518. package/multiselect/use-multiselect.js +9 -5
  519. package/multiselect/use-multiselect.js.map +1 -1
  520. package/navigable-group/index.js +2 -4
  521. package/navigable-group/index.js.map +1 -1
  522. package/navigable-group/internal.js +2 -4
  523. package/navigable-group/internal.js.map +1 -1
  524. package/package.json +1 -1
  525. package/pagination/index.js +10 -10
  526. package/pagination/index.js.map +1 -1
  527. package/pagination/internal.js +36 -40
  528. package/pagination/internal.js.map +1 -1
  529. package/pie-chart/index.js +4 -6
  530. package/pie-chart/index.js.map +1 -1
  531. package/pie-chart/labels.js +2 -2
  532. package/pie-chart/labels.js.map +1 -1
  533. package/pie-chart/segments.js +1 -1
  534. package/pie-chart/segments.js.map +1 -1
  535. package/pie-chart/utils.js +17 -5
  536. package/pie-chart/utils.js.map +1 -1
  537. package/popover/body.js +3 -3
  538. package/popover/body.js.map +1 -1
  539. package/popover/container.js +1 -1
  540. package/popover/container.js.map +1 -1
  541. package/popover/index.js +2 -4
  542. package/popover/index.js.map +1 -1
  543. package/popover/internal.js +4 -6
  544. package/popover/internal.js.map +1 -1
  545. package/progress-bar/index.d.ts.map +1 -1
  546. package/progress-bar/index.js +14 -54
  547. package/progress-bar/interfaces.d.ts +18 -0
  548. package/progress-bar/interfaces.d.ts.map +1 -1
  549. package/progress-bar/interfaces.js.map +1 -1
  550. package/progress-bar/internal-do-not-use-core.js +56 -0
  551. package/progress-bar/internal-do-not-use-core.js.map +1 -0
  552. package/progress-bar/internal.d.ts +3 -1
  553. package/progress-bar/internal.d.ts.map +1 -1
  554. package/progress-bar/internal.js +10 -3
  555. package/progress-bar/internal.js.map +1 -1
  556. package/progress-bar/styles.css.js +19 -19
  557. package/progress-bar/styles.d.ts +15 -0
  558. package/progress-bar/styles.d.ts.map +1 -0
  559. package/progress-bar/styles.js +33 -0
  560. package/progress-bar/styles.js.map +1 -0
  561. package/progress-bar/styles.scoped.css +56 -56
  562. package/progress-bar/styles.selectors.js +19 -19
  563. package/prompt-input/index.js +1 -1
  564. package/prompt-input/interfaces.d.ts +48 -0
  565. package/prompt-input/interfaces.d.ts.map +1 -1
  566. package/prompt-input/interfaces.js.map +1 -1
  567. package/prompt-input/internal-do-not-use-core.js +2 -4
  568. package/prompt-input/internal-do-not-use-core.js.map +1 -1
  569. package/prompt-input/internal.d.ts.map +1 -1
  570. package/prompt-input/internal.js +5 -6
  571. package/prompt-input/internal.js.map +1 -1
  572. package/prompt-input/styles.css.js +17 -17
  573. package/prompt-input/styles.d.ts +4 -0
  574. package/prompt-input/styles.d.ts.map +1 -0
  575. package/prompt-input/styles.js +44 -0
  576. package/prompt-input/styles.js.map +1 -0
  577. package/prompt-input/styles.scoped.css +73 -61
  578. package/prompt-input/styles.selectors.js +17 -17
  579. package/property-filter/controller.js +6 -6
  580. package/property-filter/controller.js.map +1 -1
  581. package/property-filter/filter-options.js +1 -1
  582. package/property-filter/filter-options.js.map +1 -1
  583. package/property-filter/filtering-token/index.js +11 -14
  584. package/property-filter/filtering-token/index.js.map +1 -1
  585. package/property-filter/i18n-utils.js +48 -11
  586. package/property-filter/i18n-utils.js.map +1 -1
  587. package/property-filter/index.js +4 -6
  588. package/property-filter/index.js.map +1 -1
  589. package/property-filter/internal.js +15 -13
  590. package/property-filter/internal.js.map +1 -1
  591. package/property-filter/property-editor.js +1 -1
  592. package/property-filter/property-editor.js.map +1 -1
  593. package/property-filter/property-filter-autosuggest.js +8 -4
  594. package/property-filter/property-filter-autosuggest.js.map +1 -1
  595. package/property-filter/token-editor-inputs.js +10 -9
  596. package/property-filter/token-editor-inputs.js.map +1 -1
  597. package/property-filter/token-editor.js +10 -10
  598. package/property-filter/token-editor.js.map +1 -1
  599. package/property-filter/token.js +8 -8
  600. package/property-filter/token.js.map +1 -1
  601. package/property-filter/use-load-items.js +6 -1
  602. package/property-filter/use-load-items.js.map +1 -1
  603. package/radio-group/analytics-metadata/interfaces.d.ts +1 -0
  604. package/radio-group/analytics-metadata/interfaces.d.ts.map +1 -1
  605. package/radio-group/analytics-metadata/interfaces.js.map +1 -1
  606. package/radio-group/analytics-metadata/styles.css.js +6 -0
  607. package/radio-group/analytics-metadata/styles.scoped.css +7 -0
  608. package/radio-group/analytics-metadata/styles.selectors.js +7 -0
  609. package/radio-group/index.d.ts.map +1 -1
  610. package/radio-group/internal-do-not-use-core.js +10 -8
  611. package/radio-group/internal-do-not-use-core.js.map +1 -1
  612. package/radio-group/internal.d.ts.map +1 -1
  613. package/radio-group/internal.js +11 -12
  614. package/radio-group/internal.js.map +1 -1
  615. package/radio-group/radio-button.js +4 -6
  616. package/radio-group/radio-button.js.map +1 -1
  617. package/radio-group/styles.css.js +10 -10
  618. package/radio-group/styles.scoped.css +22 -22
  619. package/radio-group/styles.selectors.js +10 -10
  620. package/s3-resource-selector/index.js +3 -5
  621. package/s3-resource-selector/index.js.map +1 -1
  622. package/s3-resource-selector/s3-in-context/index.js +1 -1
  623. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  624. package/s3-resource-selector/s3-in-context/search-input.js +1 -1
  625. package/s3-resource-selector/s3-in-context/search-input.js.map +1 -1
  626. package/s3-resource-selector/s3-modal/basic-table.js +4 -7
  627. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  628. package/s3-resource-selector/s3-modal/buckets-table.js +13 -1
  629. package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
  630. package/s3-resource-selector/s3-modal/index.js +4 -1
  631. package/s3-resource-selector/s3-modal/index.js.map +1 -1
  632. package/s3-resource-selector/s3-modal/objects-table.js +14 -2
  633. package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
  634. package/s3-resource-selector/s3-modal/versions-table.js +13 -1
  635. package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
  636. package/segmented-control/index.js +1 -1
  637. package/segmented-control/index.js.map +1 -1
  638. package/segmented-control/internal.js +6 -8
  639. package/segmented-control/internal.js.map +1 -1
  640. package/segmented-control/segment.js +1 -1
  641. package/segmented-control/segment.js.map +1 -1
  642. package/select/index.js +2 -4
  643. package/select/index.js.map +1 -1
  644. package/select/internal.js +13 -10
  645. package/select/internal.js.map +1 -1
  646. package/select/parts/filter.js +9 -4
  647. package/select/parts/filter.js.map +1 -1
  648. package/select/parts/item.js +3 -5
  649. package/select/parts/item.js.map +1 -1
  650. package/select/parts/multiselect-item.js +3 -5
  651. package/select/parts/multiselect-item.js.map +1 -1
  652. package/select/parts/plain-list.js +1 -1
  653. package/select/parts/plain-list.js.map +1 -1
  654. package/select/parts/trigger.js +2 -2
  655. package/select/parts/trigger.js.map +1 -1
  656. package/select/parts/virtual-list.js +3 -3
  657. package/select/parts/virtual-list.js.map +1 -1
  658. package/select/utils/get-item-props.js +7 -1
  659. package/select/utils/get-item-props.js.map +1 -1
  660. package/select/utils/render-options.js +1 -1
  661. package/select/utils/render-options.js.map +1 -1
  662. package/side-navigation/implementation.js +2 -4
  663. package/side-navigation/implementation.js.map +1 -1
  664. package/side-navigation/index.js +2 -4
  665. package/side-navigation/index.js.map +1 -1
  666. package/side-navigation/parts.js +4 -4
  667. package/side-navigation/parts.js.map +1 -1
  668. package/slider/index.js +2 -4
  669. package/slider/index.js.map +1 -1
  670. package/slider/internal.js +2 -4
  671. package/slider/internal.js.map +1 -1
  672. package/slider/styles.css.js +26 -26
  673. package/slider/styles.scoped.css +86 -86
  674. package/slider/styles.selectors.js +26 -26
  675. package/slider/tick-marks.js +3 -3
  676. package/slider/tick-marks.js.map +1 -1
  677. package/space-between/internal-do-not-use-core.js +2 -4
  678. package/space-between/internal-do-not-use-core.js.map +1 -1
  679. package/space-between/internal.js +2 -4
  680. package/space-between/internal.js.map +1 -1
  681. package/spinner/internal-do-not-use-core.js +2 -4
  682. package/spinner/internal-do-not-use-core.js.map +1 -1
  683. package/spinner/internal.js +2 -4
  684. package/spinner/internal.js.map +1 -1
  685. package/spinner/styles.css.js +13 -13
  686. package/spinner/styles.scoped.css +39 -39
  687. package/spinner/styles.selectors.js +13 -13
  688. package/split-panel/bottom.js +2 -2
  689. package/split-panel/bottom.js.map +1 -1
  690. package/split-panel/implementation.js +2 -4
  691. package/split-panel/implementation.js.map +1 -1
  692. package/split-panel/index.js +16 -4
  693. package/split-panel/index.js.map +1 -1
  694. package/split-panel/side.js +6 -2
  695. package/split-panel/side.js.map +1 -1
  696. package/status-indicator/internal-do-not-use-core.js +2 -4
  697. package/status-indicator/internal-do-not-use-core.js.map +1 -1
  698. package/status-indicator/internal.js +3 -5
  699. package/status-indicator/internal.js.map +1 -1
  700. package/steps/internal-do-not-use-core.js +2 -4
  701. package/steps/internal-do-not-use-core.js.map +1 -1
  702. package/steps/internal.js +2 -4
  703. package/steps/internal.js.map +1 -1
  704. package/table/body-cell/disabled-inline-editor.js +4 -6
  705. package/table/body-cell/disabled-inline-editor.js.map +1 -1
  706. package/table/body-cell/index.js +9 -11
  707. package/table/body-cell/index.js.map +1 -1
  708. package/table/body-cell/inline-editor.js +18 -21
  709. package/table/body-cell/inline-editor.js.map +1 -1
  710. package/table/body-cell/td-element.js +3 -5
  711. package/table/body-cell/td-element.js.map +1 -1
  712. package/table/expandable-rows/expandable-rows-utils.js +1 -1
  713. package/table/expandable-rows/expandable-rows-utils.js.map +1 -1
  714. package/table/header-cell/index.js +20 -20
  715. package/table/header-cell/index.js.map +1 -1
  716. package/table/header-cell/th-element.js +3 -5
  717. package/table/header-cell/th-element.js.map +1 -1
  718. package/table/index.js +14 -10
  719. package/table/index.js.map +1 -1
  720. package/table/internal.js +47 -34
  721. package/table/internal.js.map +1 -1
  722. package/table/progressive-loading/loader-cell.js +2 -4
  723. package/table/progressive-loading/loader-cell.js.map +1 -1
  724. package/table/selection/selection-cell.js +8 -11
  725. package/table/selection/selection-cell.js.map +1 -1
  726. package/table/selection/selection-control.js +10 -12
  727. package/table/selection/selection-control.js.map +1 -1
  728. package/table/sticky-columns/use-sticky-columns.js +1 -1
  729. package/table/sticky-columns/use-sticky-columns.js.map +1 -1
  730. package/table/sticky-header.js +2 -2
  731. package/table/sticky-header.js.map +1 -1
  732. package/table/thead.js +5 -5
  733. package/table/thead.js.map +1 -1
  734. package/table/use-cell-editing.js +3 -4
  735. package/table/use-cell-editing.js.map +1 -1
  736. package/table/utils.js +1 -1
  737. package/table/utils.js.map +1 -1
  738. package/tabs/index.js +6 -8
  739. package/tabs/index.js.map +1 -1
  740. package/tabs/tab-header-bar.js +12 -5
  741. package/tabs/tab-header-bar.js.map +1 -1
  742. package/tag-editor/index.js +7 -9
  743. package/tag-editor/index.js.map +1 -1
  744. package/tag-editor/styles.css.js +3 -3
  745. package/tag-editor/styles.scoped.css +13 -13
  746. package/tag-editor/styles.selectors.js +3 -3
  747. package/text-content/index.js +2 -4
  748. package/text-content/index.js.map +1 -1
  749. package/text-content/styles.css.js +1 -1
  750. package/text-content/styles.scoped.css +66 -66
  751. package/text-content/styles.selectors.js +1 -1
  752. package/text-filter/index.js +1 -1
  753. package/text-filter/index.js.map +1 -1
  754. package/text-filter/internal.js +2 -4
  755. package/text-filter/internal.js.map +1 -1
  756. package/textarea/internal-do-not-use-core.js +3 -5
  757. package/textarea/internal-do-not-use-core.js.map +1 -1
  758. package/textarea/styles.css.js +5 -5
  759. package/textarea/styles.js +42 -30
  760. package/textarea/styles.js.map +1 -1
  761. package/textarea/styles.scoped.css +41 -41
  762. package/textarea/styles.selectors.js +5 -5
  763. package/tiles/index.js +3 -3
  764. package/tiles/index.js.map +1 -1
  765. package/tiles/internal.js +12 -14
  766. package/tiles/internal.js.map +1 -1
  767. package/tiles/tile.js +3 -5
  768. package/tiles/tile.js.map +1 -1
  769. package/time-input/internal-do-not-use-core.js +2 -4
  770. package/time-input/internal-do-not-use-core.js.map +1 -1
  771. package/time-input/internal.js +2 -4
  772. package/time-input/internal.js.map +1 -1
  773. package/toggle/internal-do-not-use-core.js +1 -1
  774. package/toggle/internal-do-not-use-core.js.map +1 -1
  775. package/toggle/internal.js +5 -7
  776. package/toggle/internal.js.map +1 -1
  777. package/toggle/styles.css.js +10 -10
  778. package/toggle/styles.scoped.css +23 -23
  779. package/toggle/styles.selectors.js +10 -10
  780. package/toggle-button/internal-do-not-use-core.js +2 -4
  781. package/toggle-button/internal-do-not-use-core.js.map +1 -1
  782. package/toggle-button/internal.js +3 -5
  783. package/toggle-button/internal.js.map +1 -1
  784. package/token/dismiss-button.js +2 -2
  785. package/token/dismiss-button.js.map +1 -1
  786. package/token/index.js +1 -1
  787. package/token/index.js.map +1 -1
  788. package/token/internal.js +20 -14
  789. package/token/internal.js.map +1 -1
  790. package/token-group/index.js +2 -4
  791. package/token-group/index.js.map +1 -1
  792. package/token-group/internal.js +6 -8
  793. package/token-group/internal.js.map +1 -1
  794. package/top-navigation/index.js +2 -4
  795. package/top-navigation/index.js.map +1 -1
  796. package/top-navigation/internal.js +2 -4
  797. package/top-navigation/internal.js.map +1 -1
  798. package/top-navigation/parts/overflow-menu/menu-item.js +7 -11
  799. package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
  800. package/top-navigation/parts/overflow-menu/views/submenu.js +2 -2
  801. package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
  802. package/top-navigation/parts/overflow-menu/views/utilities.js +1 -1
  803. package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
  804. package/top-navigation/parts/utility.js +1 -1
  805. package/top-navigation/parts/utility.js.map +1 -1
  806. package/tree-view/index.js +1 -1
  807. package/tree-view/index.js.map +1 -1
  808. package/tree-view/internal.js +2 -4
  809. package/tree-view/internal.js.map +1 -1
  810. package/tutorial-panel/components/tutorial-detail-view/task-list.js +1 -1
  811. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  812. package/tutorial-panel/index.js +2 -4
  813. package/tutorial-panel/index.js.map +1 -1
  814. package/wizard/internal-do-not-use-core.js +2 -4
  815. package/wizard/internal-do-not-use-core.js.map +1 -1
  816. package/wizard/internal.js +23 -10
  817. package/wizard/internal.js.map +1 -1
  818. package/wizard/wizard-actions.js +3 -3
  819. package/wizard/wizard-actions.js.map +1 -1
  820. package/wizard/wizard-form.js +2 -2
  821. package/wizard/wizard-form.js.map +1 -1
  822. package/wizard/wizard-navigation.js +7 -7
  823. package/wizard/wizard-navigation.js.map +1 -1
  824. package/progress-bar/index.js.map +0 -1
@@ -1,15 +1,20 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  import React from 'react';
5
4
  import InternalInput from '../../input/internal';
6
5
  import styles from './styles.css.js';
7
- const Filter = React.forwardRef((_a, ref) => {
8
- var { filteringType } = _a, filterProps = __rest(_a, ["filteringType"]);
6
+ const Filter = React.forwardRef(({ filteringType, ...filterProps }, ref) => {
9
7
  if (filteringType === 'none') {
10
8
  return null;
11
9
  }
12
- return (React.createElement(InternalInput, Object.assign({ ref: ref, type: "visualSearch", className: styles.filter, autoComplete: false, disableBrowserAutocorrect: true, invalid: false, __noBorderRadius: true }, filterProps, { nativeInputAttributes: Object.assign({ 'aria-expanded': true, 'aria-haspopup': true, role: 'combobox', autoCorrect: 'off', autoCapitalize: 'off' }, filterProps.nativeInputAttributes), __skipNativeAttributesWarnings: true })));
10
+ return (React.createElement(InternalInput, { ref: ref, type: "visualSearch", className: styles.filter, autoComplete: false, disableBrowserAutocorrect: true, invalid: false, __noBorderRadius: true, ...filterProps, nativeInputAttributes: {
11
+ 'aria-expanded': true,
12
+ 'aria-haspopup': true,
13
+ role: 'combobox',
14
+ autoCorrect: 'off',
15
+ autoCapitalize: 'off',
16
+ ...filterProps.nativeInputAttributes,
17
+ }, __skipNativeAttributesWarnings: true }));
13
18
  });
14
19
  export default Filter;
15
20
  //# sourceMappingURL=filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/select/parts/filter.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,aAAqC,MAAM,sBAAsB,CAAC;AAGzE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAOrC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAA8C,EAAE,GAAgC,EAAE,EAAE;QAApF,EAAE,aAAa,OAA+B,EAA1B,WAAW,cAA/B,iBAAiC,CAAF;IAC9D,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,oBAAC,aAAa,kBACZ,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,cAAc,EACnB,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,YAAY,EAAE,KAAK,EACnB,yBAAyB,EAAE,IAAI,EAC/B,OAAO,EAAE,KAAK,EACd,gBAAgB,EAAE,IAAI,IAClB,WAAW,IACf,qBAAqB,kBACnB,eAAe,EAAE,IAAI,EACrB,eAAe,EAAE,IAAI,EACrB,IAAI,EAAE,UAAU,EAChB,WAAW,EAAE,KAAK,EAClB,cAAc,EAAE,KAAK,IAClB,WAAW,CAAC,qBAAqB,GAEtC,8BAA8B,EAAE,IAAI,IACpC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport InternalInput, { InternalInputProps } from '../../input/internal';\nimport { SelectProps } from '../interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface FilterProps extends InternalInputProps {\n ref?: React.Ref<HTMLInputElement>;\n filteringType: SelectProps.FilteringType;\n}\n\nconst Filter = React.forwardRef(({ filteringType, ...filterProps }: FilterProps, ref: React.Ref<HTMLInputElement>) => {\n if (filteringType === 'none') {\n return null;\n }\n\n return (\n <InternalInput\n ref={ref}\n type=\"visualSearch\"\n className={styles.filter}\n autoComplete={false}\n disableBrowserAutocorrect={true}\n invalid={false}\n __noBorderRadius={true}\n {...filterProps}\n nativeInputAttributes={{\n 'aria-expanded': true,\n 'aria-haspopup': true,\n role: 'combobox',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n ...filterProps.nativeInputAttributes,\n }}\n __skipNativeAttributesWarnings={true}\n />\n );\n});\n\nexport default Filter;\n"]}
1
+ {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/select/parts/filter.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,aAAqC,MAAM,sBAAsB,CAAC;AAGzE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAOrC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,WAAW,EAAe,EAAE,GAAgC,EAAE,EAAE;IACnH,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,oBAAC,aAAa,IACZ,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,cAAc,EACnB,SAAS,EAAE,MAAM,CAAC,MAAM,EACxB,YAAY,EAAE,KAAK,EACnB,yBAAyB,EAAE,IAAI,EAC/B,OAAO,EAAE,KAAK,EACd,gBAAgB,EAAE,IAAI,KAClB,WAAW,EACf,qBAAqB,EAAE;YACrB,eAAe,EAAE,IAAI;YACrB,eAAe,EAAE,IAAI;YACrB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,KAAK;YACrB,GAAG,WAAW,CAAC,qBAAqB;SACrC,EACD,8BAA8B,EAAE,IAAI,GACpC,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport InternalInput, { InternalInputProps } from '../../input/internal';\nimport { SelectProps } from '../interfaces';\n\nimport styles from './styles.css.js';\n\nexport interface FilterProps extends InternalInputProps {\n ref?: React.Ref<HTMLInputElement>;\n filteringType: SelectProps.FilteringType;\n}\n\nconst Filter = React.forwardRef(({ filteringType, ...filterProps }: FilterProps, ref: React.Ref<HTMLInputElement>) => {\n if (filteringType === 'none') {\n return null;\n }\n\n return (\n <InternalInput\n ref={ref}\n type=\"visualSearch\"\n className={styles.filter}\n autoComplete={false}\n disableBrowserAutocorrect={true}\n invalid={false}\n __noBorderRadius={true}\n {...filterProps}\n nativeInputAttributes={{\n 'aria-expanded': true,\n 'aria-haspopup': true,\n role: 'combobox',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n ...filterProps.nativeInputAttributes,\n }}\n __skipNativeAttributesWarnings={true}\n />\n );\n});\n\nexport default Filter;\n"]}
@@ -1,4 +1,3 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  import React, { useEffect, useRef, useState } from 'react';
@@ -12,8 +11,7 @@ import SelectableItem from '../../internal/components/selectable-item';
12
11
  import Tooltip from '../../internal/components/tooltip';
13
12
  import useHiddenDescription from '../../internal/hooks/use-hidden-description';
14
13
  import styles from './styles.css.js';
15
- const Item = (_a, ref) => {
16
- var { option, highlighted, selected, filteringValue, hasCheckbox, virtualPosition, padBottom, isNextSelected, isPreviousSelected, screenReaderContent, ariaPosinset, ariaSetsize, highlightType, withScrollbar, sticky } = _a, restProps = __rest(_a, ["option", "highlighted", "selected", "filteringValue", "hasCheckbox", "virtualPosition", "padBottom", "isNextSelected", "isPreviousSelected", "screenReaderContent", "ariaPosinset", "ariaSetsize", "highlightType", "withScrollbar", "sticky"]);
14
+ const Item = ({ option, highlighted, selected, filteringValue, hasCheckbox, virtualPosition, padBottom, isNextSelected, isPreviousSelected, screenReaderContent, ariaPosinset, ariaSetsize, highlightType, withScrollbar, sticky, ...restProps }, ref) => {
17
15
  const baseProps = getBaseProps(restProps);
18
16
  const isParent = option.type === 'parent';
19
17
  const isChild = option.type === 'child';
@@ -25,11 +23,11 @@ const Item = (_a, ref) => {
25
23
  const { descriptionEl, descriptionId } = useHiddenDescription(disabledReason);
26
24
  const [canShowTooltip, setCanShowTooltip] = useState(true);
27
25
  useEffect(() => setCanShowTooltip(true), [highlighted]);
28
- return (React.createElement(SelectableItem, Object.assign({ ariaSelected: Boolean(selected), selected: selected, isNextSelected: isNextSelected, isPreviousSelected: isPreviousSelected, highlighted: highlighted, disabled: option.disabled, isParent: isParent, isChild: isChild, ref: useMergeRefs(ref, internalRef), virtualPosition: virtualPosition, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaPosinset: ariaPosinset, ariaSetsize: ariaSetsize, highlightType: highlightType, ariaDescribedby: isDisabledWithReason ? descriptionId : '', value: option.option.value, withScrollbar: withScrollbar, sticky: sticky }, baseProps),
26
+ return (React.createElement(SelectableItem, { ariaSelected: Boolean(selected), selected: selected, isNextSelected: isNextSelected, isPreviousSelected: isPreviousSelected, highlighted: highlighted, disabled: option.disabled, isParent: isParent, isChild: isChild, ref: useMergeRefs(ref, internalRef), virtualPosition: virtualPosition, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaPosinset: ariaPosinset, ariaSetsize: ariaSetsize, highlightType: highlightType, ariaDescribedby: isDisabledWithReason ? descriptionId : '', value: option.option.value, withScrollbar: withScrollbar, sticky: sticky, ...baseProps },
29
27
  React.createElement("div", { className: clsx(styles.item, !isParent && wrappedOption.labelTag && styles['show-label-tag']) },
30
28
  hasCheckbox && !isParent && (React.createElement("div", { className: styles.checkbox },
31
29
  React.createElement(CheckboxIcon, { checked: selected || false, disabled: option.disabled }))),
32
- React.createElement(Option, { option: Object.assign(Object.assign({}, wrappedOption), { disabled }), highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue, isGroupOption: isParent }),
30
+ React.createElement(Option, { option: { ...wrappedOption, disabled }, highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue, isGroupOption: isParent }),
33
31
  !hasCheckbox && !isParent && selected && (React.createElement("div", { className: styles['selected-icon'] },
34
32
  React.createElement(InternalIcon, { name: "check" }))),
35
33
  isDisabledWithReason && (React.createElement(React.Fragment, null,
@@ -1 +1 @@
1
- {"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/select/parts/item.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,MAAM,+CAA+C,CAAC;AAE7E,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAGtD,OAAO,cAAc,MAAM,2CAA2C,CAAC;AACvE,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAE/E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,IAAI,GAAG,CACX,EAiBY,EACZ,GAA8B,EAC9B,EAAE;QAnBF,EACE,MAAM,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,EACX,eAAe,EACf,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,aAAa,EACb,MAAM,OAEI,EADP,SAAS,cAhBd,gPAiBC,CADa;IAId,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAE1C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,KAAK,QAAQ,CAA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yright 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 } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalIcon from '../../icon/internal.js';\nimport { getBaseProps } from '../../internal/base-component';\nimport CheckboxIcon from '../../internal/components/checkbox-icon';\nimport Option from '../../internal/components/option';\nimport { DropdownOption, OptionDefinition } from '../../internal/components/option/interfaces';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option.js';\nimport SelectableItem from '../../internal/components/selectable-item';\nimport Tooltip from '../../internal/components/tooltip';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\n\nimport styles from './styles.css.js';\n\nexport interface ItemProps {\n option: DropdownOption;\n highlighted?: boolean;\n selected?: boolean;\n filteringValue?: string;\n hasCheckbox?: boolean;\n virtualPosition?: number;\n padBottom?: boolean;\n isNextSelected?: boolean;\n isPreviousSelected?: boolean;\n screenReaderContent?: string;\n ariaPosinset?: number;\n ariaSetsize?: number;\n highlightType?: HighlightType['type'];\n withScrollbar?: boolean;\n sticky?: boolean;\n}\n\nconst Item = (\n {\n option,\n highlighted,\n selected,\n filteringValue,\n hasCheckbox,\n virtualPosition,\n padBottom,\n isNextSelected,\n isPreviousSelected,\n screenReaderContent,\n ariaPosinset,\n ariaSetsize,\n highlightType,\n withScrollbar,\n sticky,\n ...restProps\n }: ItemProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n const isParent = option.type === 'parent';\n const isChild = option.type === 'child';\n const wrappedOption: OptionDefinition = option.option;\n const disabled = option.disabled || wrappedOption.disabled;\n const disabledReason = disabled && wrappedOption.disabledReason ? wrappedOption.disabledReason : '';\n const isDisabledWithReason = !!disabledReason;\n const internalRef = useRef<HTMLDivElement>(null);\n\n const { descriptionEl, descriptionId } = useHiddenDescription(disabledReason);\n\n const [canShowTooltip, setCanShowTooltip] = useState(true);\n useEffect(() => setCanShowTooltip(true), [highlighted]);\n\n return (\n <SelectableItem\n ariaSelected={Boolean(selected)}\n selected={selected}\n isNextSelected={isNextSelected}\n isPreviousSelected={isPreviousSelected}\n highlighted={highlighted}\n disabled={option.disabled}\n isParent={isParent}\n isChild={isChild}\n ref={useMergeRefs(ref, internalRef)}\n virtualPosition={virtualPosition}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaPosinset={ariaPosinset}\n ariaSetsize={ariaSetsize}\n highlightType={highlightType}\n ariaDescribedby={isDisabledWithReason ? descriptionId : ''}\n value={option.option.value}\n withScrollbar={withScrollbar}\n sticky={sticky}\n {...baseProps}\n >\n <div className={clsx(styles.item, !isParent && wrappedOption.labelTag && styles['show-label-tag'])}>\n {hasCheckbox && !isParent && (\n <div className={styles.checkbox}>\n <CheckboxIcon checked={selected || false} disabled={option.disabled} />\n </div>\n )}\n <Option\n option={{ ...wrappedOption, disabled }}\n highlightedOption={highlighted}\n selectedOption={selected}\n highlightText={filteringValue}\n isGroupOption={isParent}\n />\n {!hasCheckbox && !isParent && selected && (\n <div className={styles['selected-icon']}>\n <InternalIcon name=\"check\" />\n </div>\n )}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {highlighted && canShowTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={internalRef}\n value={disabledReason!}\n position=\"right\"\n hideOnOverscroll={true}\n onDismiss={() => setCanShowTooltip(false)}\n />\n )}\n </>\n )}\n </div>\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(Item));\n"]}
1
+ {"version":3,"file":"item.js","sourceRoot":"","sources":["../../../../src/select/parts/item.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,MA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tC,iBAAiB,EAAE,WAAW,EAC9B,cAAc,EAAE,QAAQ,EACxB,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,QAAQ,GACvB;YACD,CAAC,WAAW,IAAI,CAAC,QAAQ,IAAI,QAAQ,IAAI,CACxC,6BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC;gBACrC,oBAAC,YAAY,IAAC,IAAI,EAAC,OAAO,GAAG,CACzB,CACP;YACA,oBAAoB,IAAI,CACvB;gBACG,aAAa;gBACb,WAAW,IAAI,cAAc,IAAI,CAChC,oBAAC,OAAO,IACN,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,EAC5C,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,cAAe,EACtB,QAAQ,EAAC,OAAO,EAChB,gBAAgB,EAAE,IAAI,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,GACzC,CACH,CACA,CACJ,CACG,CACS,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,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 } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalIcon from '../../icon/internal.js';\nimport { getBaseProps } from '../../internal/base-component';\nimport CheckboxIcon from '../../internal/components/checkbox-icon';\nimport Option from '../../internal/components/option';\nimport { DropdownOption, OptionDefinition } from '../../internal/components/option/interfaces';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option.js';\nimport SelectableItem from '../../internal/components/selectable-item';\nimport Tooltip from '../../internal/components/tooltip';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\n\nimport styles from './styles.css.js';\n\nexport interface ItemProps {\n option: DropdownOption;\n highlighted?: boolean;\n selected?: boolean;\n filteringValue?: string;\n hasCheckbox?: boolean;\n virtualPosition?: number;\n padBottom?: boolean;\n isNextSelected?: boolean;\n isPreviousSelected?: boolean;\n screenReaderContent?: string;\n ariaPosinset?: number;\n ariaSetsize?: number;\n highlightType?: HighlightType['type'];\n withScrollbar?: boolean;\n sticky?: boolean;\n}\n\nconst Item = (\n {\n option,\n highlighted,\n selected,\n filteringValue,\n hasCheckbox,\n virtualPosition,\n padBottom,\n isNextSelected,\n isPreviousSelected,\n screenReaderContent,\n ariaPosinset,\n ariaSetsize,\n highlightType,\n withScrollbar,\n sticky,\n ...restProps\n }: ItemProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n const isParent = option.type === 'parent';\n const isChild = option.type === 'child';\n const wrappedOption: OptionDefinition = option.option;\n const disabled = option.disabled || wrappedOption.disabled;\n const disabledReason = disabled && wrappedOption.disabledReason ? wrappedOption.disabledReason : '';\n const isDisabledWithReason = !!disabledReason;\n const internalRef = useRef<HTMLDivElement>(null);\n\n const { descriptionEl, descriptionId } = useHiddenDescription(disabledReason);\n\n const [canShowTooltip, setCanShowTooltip] = useState(true);\n useEffect(() => setCanShowTooltip(true), [highlighted]);\n\n return (\n <SelectableItem\n ariaSelected={Boolean(selected)}\n selected={selected}\n isNextSelected={isNextSelected}\n isPreviousSelected={isPreviousSelected}\n highlighted={highlighted}\n disabled={option.disabled}\n isParent={isParent}\n isChild={isChild}\n ref={useMergeRefs(ref, internalRef)}\n virtualPosition={virtualPosition}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaPosinset={ariaPosinset}\n ariaSetsize={ariaSetsize}\n highlightType={highlightType}\n ariaDescribedby={isDisabledWithReason ? descriptionId : ''}\n value={option.option.value}\n withScrollbar={withScrollbar}\n sticky={sticky}\n {...baseProps}\n >\n <div className={clsx(styles.item, !isParent && wrappedOption.labelTag && styles['show-label-tag'])}>\n {hasCheckbox && !isParent && (\n <div className={styles.checkbox}>\n <CheckboxIcon checked={selected || false} disabled={option.disabled} />\n </div>\n )}\n <Option\n option={{ ...wrappedOption, disabled }}\n highlightedOption={highlighted}\n selectedOption={selected}\n highlightText={filteringValue}\n isGroupOption={isParent}\n />\n {!hasCheckbox && !isParent && selected && (\n <div className={styles['selected-icon']}>\n <InternalIcon name=\"check\" />\n </div>\n )}\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {highlighted && canShowTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={internalRef}\n value={disabledReason!}\n position=\"right\"\n hideOnOverscroll={true}\n onDismiss={() => setCanShowTooltip(false)}\n />\n )}\n </>\n )}\n </div>\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(Item));\n"]}
@@ -1,4 +1,3 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  import React, { useEffect, useRef, useState } from 'react';
@@ -10,8 +9,7 @@ import SelectableItem from '../../internal/components/selectable-item';
10
9
  import Tooltip from '../../internal/components/tooltip';
11
10
  import useHiddenDescription from '../../internal/hooks/use-hidden-description';
12
11
  import styles from './styles.css.js';
13
- const MultiSelectItem = (_a, ref) => {
14
- var { option, highlighted, selected, filteringValue, hasCheckbox, virtualPosition, padBottom, isNextSelected, isPreviousSelected, indeterminate, screenReaderContent, ariaPosinset, ariaSetsize, highlightType, withScrollbar, sticky } = _a, restProps = __rest(_a, ["option", "highlighted", "selected", "filteringValue", "hasCheckbox", "virtualPosition", "padBottom", "isNextSelected", "isPreviousSelected", "indeterminate", "screenReaderContent", "ariaPosinset", "ariaSetsize", "highlightType", "withScrollbar", "sticky"]);
12
+ const MultiSelectItem = ({ option, highlighted, selected, filteringValue, hasCheckbox, virtualPosition, padBottom, isNextSelected, isPreviousSelected, indeterminate, screenReaderContent, ariaPosinset, ariaSetsize, highlightType, withScrollbar, sticky, ...restProps }, ref) => {
15
13
  const baseProps = getBaseProps(restProps);
16
14
  const isParent = option.type === 'parent';
17
15
  const isChild = option.type === 'child';
@@ -27,11 +25,11 @@ const MultiSelectItem = (_a, ref) => {
27
25
  const { descriptionId, descriptionEl } = useHiddenDescription(disabledReason);
28
26
  const [canShowTooltip, setCanShowTooltip] = useState(true);
29
27
  useEffect(() => setCanShowTooltip(true), [highlighted]);
30
- return (React.createElement(SelectableItem, Object.assign({ ariaChecked: isParent && indeterminate ? 'mixed' : Boolean(selected), selected: selected, isNextSelected: isNextSelected, isPreviousSelected: isPreviousSelected, highlighted: highlighted, disabled: disabled, isParent: isParent, isChild: isChild, isSelectAll: isSelectAll, highlightType: highlightType, ref: useMergeRefs(ref, internalRef), virtualPosition: virtualPosition, padBottom: padBottom, useInteractiveGroups: true, screenReaderContent: screenReaderContent, ariaPosinset: ariaPosinset, ariaSetsize: ariaSetsize, ariaDescribedby: isDisabledWithReason ? descriptionId : '', value: option.option.value, afterHeader: option.afterHeader, withScrollbar: withScrollbar, sticky: sticky }, baseProps),
28
+ return (React.createElement(SelectableItem, { ariaChecked: isParent && indeterminate ? 'mixed' : Boolean(selected), selected: selected, isNextSelected: isNextSelected, isPreviousSelected: isPreviousSelected, highlighted: highlighted, disabled: disabled, isParent: isParent, isChild: isChild, isSelectAll: isSelectAll, highlightType: highlightType, ref: useMergeRefs(ref, internalRef), virtualPosition: virtualPosition, padBottom: padBottom, useInteractiveGroups: true, screenReaderContent: screenReaderContent, ariaPosinset: ariaPosinset, ariaSetsize: ariaSetsize, ariaDescribedby: isDisabledWithReason ? descriptionId : '', value: option.option.value, afterHeader: option.afterHeader, withScrollbar: withScrollbar, sticky: sticky, ...baseProps },
31
29
  React.createElement("div", { className: className },
32
30
  hasCheckbox && (React.createElement("div", { className: styles.checkbox },
33
31
  React.createElement(CheckboxIcon, { checked: selected, indeterminate: (isParent || isSelectAll) && indeterminate, disabled: disabled }))),
34
- React.createElement(Option, { option: Object.assign(Object.assign({}, wrappedOption), { disabled }), highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue, isGroupOption: isParent })),
32
+ React.createElement(Option, { option: { ...wrappedOption, disabled }, highlightedOption: highlighted, selectedOption: selected, highlightText: filteringValue, isGroupOption: isParent })),
35
33
  isDisabledWithReason && (React.createElement(React.Fragment, null,
36
34
  descriptionEl,
37
35
  highlighted && canShowTooltip && (React.createElement(Tooltip, { className: styles['disabled-reason-tooltip'], trackRef: internalRef, value: disabledReason, position: "right", hideOnOverscroll: true, onDismiss: () => setCanShowTooltip(false) }))))));
@@ -1 +1 @@
1
- {"version":3,"file":"multiselect-item.js","sourceRoot":"","sources":["../../../../src/select/parts/multiselect-item.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAEtD,OAAO,cAAc,MAAM,2CAA2C,CAAC;AACvE,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAG/E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAKrC,MAAM,eAAe,GAAG,CACtB,EAkBuB,EACvB,GAA8B,EAC9B,EAAE;QApBF,EACE,MAAM,EACN,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,EACX,eAAe,EACf,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,aAAa,EACb,MAAM,OAEe,EADlB,SAAS,cAjBd,iQAkBC,CADa;IAId,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAE1C,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EF,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,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';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../../internal/base-component';\nimport CheckboxIcon from '../../internal/components/checkbox-icon';\nimport Option from '../../internal/components/option';\nimport { OptionDefinition } from '../../internal/components/option/interfaces';\nimport SelectableItem from '../../internal/components/selectable-item';\nimport Tooltip from '../../internal/components/tooltip';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { ItemProps } from './item';\n\nimport styles from './styles.css.js';\ninterface MultiselectItemProps extends ItemProps {\n indeterminate?: boolean;\n}\n\nconst MultiSelectItem = (\n {\n option,\n highlighted,\n selected,\n filteringValue,\n hasCheckbox,\n virtualPosition,\n padBottom,\n isNextSelected,\n isPreviousSelected,\n indeterminate,\n screenReaderContent,\n ariaPosinset,\n ariaSetsize,\n highlightType,\n withScrollbar,\n sticky,\n ...restProps\n }: MultiselectItemProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n const isParent = option.type === 'parent';\n const isChild = option.type === 'child';\n const isSelectAll = option.type === 'select-all';\n const wrappedOption: OptionDefinition = option.option;\n const disabled = option.disabled || wrappedOption.disabled;\n const disabledReason =\n disabled && (option.disabledReason || wrappedOption.disabledReason)\n ? option.disabledReason || wrappedOption.disabledReason\n : '';\n const isDisabledWithReason = !!disabledReason;\n const internalRef = useRef<HTMLDivElement>(null);\n const className = styles.item;\n\n const { descriptionId, descriptionEl } = useHiddenDescription(disabledReason);\n\n const [canShowTooltip, setCanShowTooltip] = useState(true);\n useEffect(() => setCanShowTooltip(true), [highlighted]);\n return (\n <SelectableItem\n ariaChecked={isParent && indeterminate ? 'mixed' : Boolean(selected)}\n selected={selected}\n isNextSelected={isNextSelected}\n isPreviousSelected={isPreviousSelected}\n highlighted={highlighted}\n disabled={disabled}\n isParent={isParent}\n isChild={isChild}\n isSelectAll={isSelectAll}\n highlightType={highlightType}\n ref={useMergeRefs(ref, internalRef)}\n virtualPosition={virtualPosition}\n padBottom={padBottom}\n useInteractiveGroups={true}\n screenReaderContent={screenReaderContent}\n ariaPosinset={ariaPosinset}\n ariaSetsize={ariaSetsize}\n ariaDescribedby={isDisabledWithReason ? descriptionId : ''}\n value={option.option.value}\n afterHeader={option.afterHeader}\n withScrollbar={withScrollbar}\n sticky={sticky}\n {...baseProps}\n >\n <div className={className}>\n {hasCheckbox && (\n <div className={styles.checkbox}>\n <CheckboxIcon\n checked={selected}\n indeterminate={(isParent || isSelectAll) && indeterminate}\n disabled={disabled}\n />\n </div>\n )}\n <Option\n option={{ ...wrappedOption, disabled }}\n highlightedOption={highlighted}\n selectedOption={selected}\n highlightText={filteringValue}\n isGroupOption={isParent}\n />\n </div>\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {highlighted && canShowTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={internalRef}\n value={disabledReason!}\n position=\"right\"\n hideOnOverscroll={true}\n onDismiss={() => setCanShowTooltip(false)}\n />\n )}\n </>\n )}\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(MultiSelectItem));\n"]}
1
+ {"version":3,"file":"multiselect-item.js","sourceRoot":"","sources":["../../../../src/select/parts/multiselect-item.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,MAAM,MAAM,kCAAkC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,EAAE,GAAG,aAAa,EAAE,QAAQ,EAAE,EACtC,iBAAiB,EAAE,WAAW,EAC9B,cAAc,EAAE,QAAQ,EACxB,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,QAAQ,GACvB,CACE;QACL,oBAAoB,IAAI,CACvB;YACG,aAAa;YACb,WAAW,IAAI,cAAc,IAAI,CAChC,oBAAC,OAAO,IACN,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,EAC5C,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,cAAe,EACtB,QAAQ,EAAC,OAAO,EAChB,gBAAgB,EAAE,IAAI,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,GACzC,CACH,CACA,CACJ,CACc,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,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';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../../internal/base-component';\nimport CheckboxIcon from '../../internal/components/checkbox-icon';\nimport Option from '../../internal/components/option';\nimport { OptionDefinition } from '../../internal/components/option/interfaces';\nimport SelectableItem from '../../internal/components/selectable-item';\nimport Tooltip from '../../internal/components/tooltip';\nimport useHiddenDescription from '../../internal/hooks/use-hidden-description';\nimport { ItemProps } from './item';\n\nimport styles from './styles.css.js';\ninterface MultiselectItemProps extends ItemProps {\n indeterminate?: boolean;\n}\n\nconst MultiSelectItem = (\n {\n option,\n highlighted,\n selected,\n filteringValue,\n hasCheckbox,\n virtualPosition,\n padBottom,\n isNextSelected,\n isPreviousSelected,\n indeterminate,\n screenReaderContent,\n ariaPosinset,\n ariaSetsize,\n highlightType,\n withScrollbar,\n sticky,\n ...restProps\n }: MultiselectItemProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const baseProps = getBaseProps(restProps);\n\n const isParent = option.type === 'parent';\n const isChild = option.type === 'child';\n const isSelectAll = option.type === 'select-all';\n const wrappedOption: OptionDefinition = option.option;\n const disabled = option.disabled || wrappedOption.disabled;\n const disabledReason =\n disabled && (option.disabledReason || wrappedOption.disabledReason)\n ? option.disabledReason || wrappedOption.disabledReason\n : '';\n const isDisabledWithReason = !!disabledReason;\n const internalRef = useRef<HTMLDivElement>(null);\n const className = styles.item;\n\n const { descriptionId, descriptionEl } = useHiddenDescription(disabledReason);\n\n const [canShowTooltip, setCanShowTooltip] = useState(true);\n useEffect(() => setCanShowTooltip(true), [highlighted]);\n return (\n <SelectableItem\n ariaChecked={isParent && indeterminate ? 'mixed' : Boolean(selected)}\n selected={selected}\n isNextSelected={isNextSelected}\n isPreviousSelected={isPreviousSelected}\n highlighted={highlighted}\n disabled={disabled}\n isParent={isParent}\n isChild={isChild}\n isSelectAll={isSelectAll}\n highlightType={highlightType}\n ref={useMergeRefs(ref, internalRef)}\n virtualPosition={virtualPosition}\n padBottom={padBottom}\n useInteractiveGroups={true}\n screenReaderContent={screenReaderContent}\n ariaPosinset={ariaPosinset}\n ariaSetsize={ariaSetsize}\n ariaDescribedby={isDisabledWithReason ? descriptionId : ''}\n value={option.option.value}\n afterHeader={option.afterHeader}\n withScrollbar={withScrollbar}\n sticky={sticky}\n {...baseProps}\n >\n <div className={className}>\n {hasCheckbox && (\n <div className={styles.checkbox}>\n <CheckboxIcon\n checked={selected}\n indeterminate={(isParent || isSelectAll) && indeterminate}\n disabled={disabled}\n />\n </div>\n )}\n <Option\n option={{ ...wrappedOption, disabled }}\n highlightedOption={highlighted}\n selectedOption={selected}\n highlightText={filteringValue}\n isGroupOption={isParent}\n />\n </div>\n {isDisabledWithReason && (\n <>\n {descriptionEl}\n {highlighted && canShowTooltip && (\n <Tooltip\n className={styles['disabled-reason-tooltip']}\n trackRef={internalRef}\n value={disabledReason!}\n position=\"right\"\n hideOnOverscroll={true}\n onDismiss={() => setCanShowTooltip(false)}\n />\n )}\n </>\n )}\n </SelectableItem>\n );\n};\n\nexport default React.memo(React.forwardRef(MultiSelectItem));\n"]}
@@ -31,7 +31,7 @@ const PlainList = ({ menuProps, getOptionProps, filteredOptions, filteringValue,
31
31
  }
32
32
  }, [firstOptionSticky, highlightType.moveFocus, menuRef]);
33
33
  const withScrollbar = !!width && width.inner < width.outer;
34
- return (React.createElement(OptionsList, Object.assign({}, menuProps, { ref: mergedRef, stickyItemBlockSize: stickyOptionBlockSize }),
34
+ return (React.createElement(OptionsList, { ...menuProps, ref: mergedRef, stickyItemBlockSize: stickyOptionBlockSize },
35
35
  renderOptions({
36
36
  options: filteredOptions,
37
37
  getOptionProps,
@@ -1 +1 @@
1
- {"version":3,"file":"plain-list.js","sourceRoot":"","sources":["../../../../src/select/parts/plain-list.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG1F,OAAO,WAAW,MAAM,wCAAwC,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,SAAS,GAAG,CAChB,EACE,SAAS,EACT,cAAc,EACd,eAAe,EACf,cAAc,EACd,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GACD,EAClB,GAA6C,EAC7C,EAAE;IACF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CAAC;IAE3D,OAAO,CACL,oBAAC,WAAW,oBAAK,SAAS,IAAE,GAAG,EAAE,SAAS,EAAE,mBAAmB,EAAE,qBAAqB;QACnF,aAAa,CAAC;YACb,OAAO,EAAE,eAAe;YACxB,cAAc;YACd,cAAc;YACd,QAAQ;YACR,aAAa;YACb,UAAU;YACV,iBAAiB;YACjB,oBAAoB;YACpB,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;YACf,aAAa;SACd,CAAC;QACD,UAAU,CAAC,CAAC,CAAC,CACZ,6BAAK,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,IAChD,UAAU,CACP,CACP,CAAC,CAAC,CAAC,IAAI,CACI,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC,SAAS,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport OptionsList from '../../internal/components/options-list';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option';\nimport { renderOptions } from '../utils/render-options';\nimport scrollToIndex from '../utils/scroll-to-index';\nimport { GetOptionProps, MenuProps } from '../utils/use-select';\nimport { fallbackItemHeight } from './common';\n\nimport styles from './styles.css.js';\n\nexport interface SelectListProps {\n menuProps: MenuProps;\n getOptionProps: GetOptionProps;\n filteredOptions: ReadonlyArray<DropdownOption>;\n filteringValue: string;\n highlightType: HighlightType;\n checkboxes?: boolean;\n hasDropdownStatus?: boolean;\n listBottom?: React.ReactNode;\n useInteractiveGroups?: boolean;\n screenReaderContent?: string;\n firstOptionSticky?: boolean;\n}\n\nexport namespace SelectListProps {\n export type SelectListRef = (index: number) => void;\n}\n\nconst PlainList = (\n {\n menuProps,\n getOptionProps,\n filteredOptions,\n filteringValue,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n listBottom,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n }: SelectListProps,\n ref: React.Ref<SelectListProps.SelectListRef>\n) => {\n const idPrefix = useUniqueId('select-list-');\n const stickyOptionRef = useRef<HTMLDivElement>(null);\n const [stickyOptionBlockSize, setStickyOptionBlockSize] = useState(firstOptionSticky ? fallbackItemHeight : 0);\n\n const [width, menuMeasureRef] = useContainerQuery(rect => {\n if (stickyOptionRef.current) {\n // Cannot use container query on the sticky option individually because it is not rendered until the dropdown is open.\n // Not expecting the sticky option to change size without the dropdown also changing size.\n\n // The effects of using the sticky option block size to set the menu scroll padding are covered by integration tests.\n // istanbul ignore next\n setStickyOptionBlockSize(stickyOptionRef.current.clientHeight);\n }\n return { inner: rect.contentBoxWidth, outer: rect.borderBoxWidth };\n });\n\n const menuRef = menuProps.ref;\n\n const mergedRef = useMergeRefs(menuMeasureRef, menuRef);\n\n useImperativeHandle(\n ref,\n () => (index: number) => {\n const isSticky = firstOptionSticky && index === 0;\n if (highlightType.moveFocus && menuRef.current && !isSticky) {\n scrollToIndex({ index, menuEl: menuRef.current });\n }\n },\n [firstOptionSticky, highlightType.moveFocus, menuRef]\n );\n\n const withScrollbar = !!width && width.inner < width.outer;\n\n return (\n <OptionsList {...menuProps} ref={mergedRef} stickyItemBlockSize={stickyOptionBlockSize}>\n {renderOptions({\n options: filteredOptions,\n getOptionProps,\n filteringValue,\n idPrefix,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n stickyOptionRef,\n withScrollbar,\n })}\n {listBottom ? (\n <div role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </div>\n ) : null}\n </OptionsList>\n );\n};\n\nexport default forwardRef(PlainList);\n"]}
1
+ {"version":3,"file":"plain-list.js","sourceRoot":"","sources":["../../../../src/select/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, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport OptionsList from '../../internal/components/options-list';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option';\nimport { renderOptions } from '../utils/render-options';\nimport scrollToIndex from '../utils/scroll-to-index';\nimport { GetOptionProps, MenuProps } from '../utils/use-select';\nimport { fallbackItemHeight } from './common';\n\nimport styles from './styles.css.js';\n\nexport interface SelectListProps {\n menuProps: MenuProps;\n getOptionProps: GetOptionProps;\n filteredOptions: ReadonlyArray<DropdownOption>;\n filteringValue: string;\n highlightType: HighlightType;\n checkboxes?: boolean;\n hasDropdownStatus?: boolean;\n listBottom?: React.ReactNode;\n useInteractiveGroups?: boolean;\n screenReaderContent?: string;\n firstOptionSticky?: boolean;\n}\n\nexport namespace SelectListProps {\n export type SelectListRef = (index: number) => void;\n}\n\nconst PlainList = (\n {\n menuProps,\n getOptionProps,\n filteredOptions,\n filteringValue,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n listBottom,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n }: SelectListProps,\n ref: React.Ref<SelectListProps.SelectListRef>\n) => {\n const idPrefix = useUniqueId('select-list-');\n const stickyOptionRef = useRef<HTMLDivElement>(null);\n const [stickyOptionBlockSize, setStickyOptionBlockSize] = useState(firstOptionSticky ? fallbackItemHeight : 0);\n\n const [width, menuMeasureRef] = useContainerQuery(rect => {\n if (stickyOptionRef.current) {\n // Cannot use container query on the sticky option individually because it is not rendered until the dropdown is open.\n // Not expecting the sticky option to change size without the dropdown also changing size.\n\n // The effects of using the sticky option block size to set the menu scroll padding are covered by integration tests.\n // istanbul ignore next\n setStickyOptionBlockSize(stickyOptionRef.current.clientHeight);\n }\n return { inner: rect.contentBoxWidth, outer: rect.borderBoxWidth };\n });\n\n const menuRef = menuProps.ref;\n\n const mergedRef = useMergeRefs(menuMeasureRef, menuRef);\n\n useImperativeHandle(\n ref,\n () => (index: number) => {\n const isSticky = firstOptionSticky && index === 0;\n if (highlightType.moveFocus && menuRef.current && !isSticky) {\n scrollToIndex({ index, menuEl: menuRef.current });\n }\n },\n [firstOptionSticky, highlightType.moveFocus, menuRef]\n );\n\n const withScrollbar = !!width && width.inner < width.outer;\n\n return (\n <OptionsList {...menuProps} ref={mergedRef} stickyItemBlockSize={stickyOptionBlockSize}>\n {renderOptions({\n options: filteredOptions,\n getOptionProps,\n filteringValue,\n idPrefix,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n stickyOptionRef,\n withScrollbar,\n })}\n {listBottom ? (\n <div role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </div>\n ) : null}\n </OptionsList>\n );\n};\n\nexport default forwardRef(PlainList);\n"]}
@@ -36,13 +36,13 @@ const Trigger = React.forwardRef(({ ariaLabelledby, ariaDescribedby, controlId,
36
36
  triggerContent = (React.createElement("span", { "aria-disabled": "true", className: clsx(styles.placeholder, styles.trigger), id: triggerContentId }, placeholder));
37
37
  }
38
38
  else if (triggerVariant === 'option') {
39
- triggerContent = React.createElement(Option, { id: triggerContentId, option: Object.assign(Object.assign({}, selectedOption), { disabled }), triggerVariant: true });
39
+ triggerContent = React.createElement(Option, { id: triggerContentId, option: { ...selectedOption, disabled }, triggerVariant: true });
40
40
  }
41
41
  else {
42
42
  triggerContent = (React.createElement("span", { id: triggerContentId, className: styles.trigger }, selectedOption.label || selectedOption.value));
43
43
  }
44
44
  const mergedRef = useMergeRefs(triggerProps.ref, ref);
45
- const triggerButton = (React.createElement(ButtonTrigger, Object.assign({}, triggerProps, { id: id, ref: mergedRef, pressed: !!isOpen, disabled: disabled, readOnly: readOnly, invalid: invalid, warning: warning && !invalid, inFilteringToken: inFilteringToken, inlineTokens: triggerVariant === 'tokens', ariaDescribedby: ariaDescribedby, ariaLabelledby: ariaLabelledbyIds }), triggerContent));
45
+ const triggerButton = (React.createElement(ButtonTrigger, { ...triggerProps, id: id, ref: mergedRef, pressed: !!isOpen, disabled: disabled, readOnly: readOnly, invalid: invalid, warning: warning && !invalid, inFilteringToken: inFilteringToken, inlineTokens: triggerVariant === 'tokens', ariaDescribedby: ariaDescribedby, ariaLabelledby: ariaLabelledbyIds }, triggerContent));
46
46
  return (React.createElement(React.Fragment, null, inlineLabelText ? (React.createElement("div", { className: styles['inline-label-wrapper'] },
47
47
  React.createElement("label", { htmlFor: controlId, className: clsx(styles['inline-label'], disabled && styles['inline-label-disabled'], triggerVariant === 'tokens' && styles['inline-label-inline-tokens']) }, inlineLabelText),
48
48
  React.createElement("div", { className: styles['inline-label-trigger-wrapper'] }, triggerButton))) : (React.createElement(React.Fragment, null, triggerButton))));
@@ -1 +1 @@
1
- {"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../../src/select/parts/trigger.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAIjD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAerC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAC9B,CACE,EACE,cAAc,EACd,eAAe,EACf,SAAS,EACT,OAAO,EACP,eAAe,EACf,OAAO,EACP,YAAY,EAC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,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,iBAAiB,KAEhC,cAAc,CACD,CACjB,CAAC;IACF,OAAO,CACL,0CACG,eAAe,CAAC,CAAC,CAAC,CACjB,6BAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC;QAC5C,+BACE,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,cAAc,CAAC,EACtB,QAAQ,IAAI,MAAM,CAAC,uBAAuB,CAAC,EAC3C,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,4BAA4B,CAAC,CACpE,IAEA,eAAe,CACV;QACR,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,IAAG,aAAa,CAAO,CACzE,CACP,CAAC,CAAC,CAAC,CACF,0CAAG,aAAa,CAAI,CACrB,CACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport ButtonTrigger from '../../internal/components/button-trigger';\nimport Option from '../../internal/components/option';\nimport { OptionDefinition } from '../../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../../internal/context/form-field-context';\nimport { useVisualRefresh } from '../../internal/hooks/use-visual-mode';\nimport { joinStrings } from '../../internal/utils/strings';\nimport { MultiselectProps } from '../../multiselect/interfaces';\nimport InternalToken from '../../token/internal';\nimport { SelectProps } from '../interfaces';\nimport { SelectTriggerProps } from '../utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface TriggerProps extends FormFieldValidationControlProps {\n placeholder: string | undefined;\n disabled: boolean | undefined;\n readOnly?: boolean;\n triggerProps: SelectTriggerProps;\n selectedOption: OptionDefinition | null;\n inlineLabelText?: string;\n isOpen?: boolean;\n triggerVariant?: SelectProps.TriggerVariant | MultiselectProps.TriggerVariant;\n inFilteringToken?: 'root' | 'nested';\n selectedOptions?: ReadonlyArray<OptionDefinition>;\n}\n\nconst Trigger = React.forwardRef(\n (\n {\n ariaLabelledby,\n ariaDescribedby,\n controlId,\n invalid,\n inlineLabelText,\n warning,\n triggerProps,\n selectedOption,\n selectedOptions,\n triggerVariant,\n inFilteringToken,\n isOpen,\n placeholder,\n disabled,\n readOnly,\n }: TriggerProps,\n ref: React.Ref<HTMLButtonElement>\n ) => {\n const isVisualRefresh = useVisualRefresh();\n const generatedId = useUniqueId();\n const id = controlId ?? generatedId;\n const triggerContentId = useUniqueId('trigger-content-');\n\n let ariaLabelledbyIds = joinStrings(ariaLabelledby, triggerContentId);\n\n let triggerContent = null;\n if (triggerVariant === 'tokens') {\n if (selectedOptions?.length) {\n triggerContent = (\n <span\n className={clsx(\n styles['inline-token-trigger'],\n disabled && styles['inline-token-trigger--disabled'],\n isVisualRefresh && styles['visual-refresh']\n )}\n >\n <span className={styles['inline-token-list']}>\n {selectedOptions.map(({ label }, i) => (\n <InternalToken key={i} label={label} variant=\"inline\" disabled={disabled} />\n ))}\n </span>\n <span className={styles['inline-token-counter']} id={triggerContentId}>\n <span className={styles['inline-token-hidden-placeholder']}>{placeholder}</span>\n <span>({selectedOptions.length})</span>\n </span>\n </span>\n );\n ariaLabelledbyIds = ariaLabelledby;\n } else {\n triggerContent = (\n <span aria-disabled=\"true\" className={clsx(styles.placeholder, styles.trigger)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n }\n } else if (!selectedOption) {\n triggerContent = (\n <span aria-disabled=\"true\" className={clsx(styles.placeholder, styles.trigger)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n } else if (triggerVariant === 'option') {\n triggerContent = <Option id={triggerContentId} option={{ ...selectedOption, disabled }} triggerVariant={true} />;\n } else {\n triggerContent = (\n <span id={triggerContentId} className={styles.trigger}>\n {selectedOption.label || selectedOption.value}\n </span>\n );\n }\n\n const mergedRef = useMergeRefs(triggerProps.ref, ref);\n const triggerButton = (\n <ButtonTrigger\n {...triggerProps}\n id={id}\n ref={mergedRef}\n pressed={!!isOpen}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n warning={warning && !invalid}\n inFilteringToken={inFilteringToken}\n inlineTokens={triggerVariant === 'tokens'}\n ariaDescribedby={ariaDescribedby}\n ariaLabelledby={ariaLabelledbyIds}\n >\n {triggerContent}\n </ButtonTrigger>\n );\n return (\n <>\n {inlineLabelText ? (\n <div className={styles['inline-label-wrapper']}>\n <label\n htmlFor={controlId}\n className={clsx(\n styles['inline-label'],\n disabled && styles['inline-label-disabled'],\n triggerVariant === 'tokens' && styles['inline-label-inline-tokens']\n )}\n >\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>{triggerButton}</div>\n </div>\n ) : (\n <>{triggerButton}</>\n )}\n </>\n );\n }\n);\n\nexport default Trigger;\n"]}
1
+ {"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../../../src/select/parts/trigger.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAIjD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAerC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAC9B,CACE,EACE,cAAc,EACd,eAAe,EACf,SAAS,EACT,OAAO,EACP,eAAe,EACf,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EACf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AAE,eAAe,EAChC,cAAc,EAAE,iBAAiB,IAEhC,cAAc,CACD,CACjB,CAAC;IACF,OAAO,CACL,0CACG,eAAe,CAAC,CAAC,CAAC,CACjB,6BAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC;QAC5C,+BACE,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,cAAc,CAAC,EACtB,QAAQ,IAAI,MAAM,CAAC,uBAAuB,CAAC,EAC3C,cAAc,KAAK,QAAQ,IAAI,MAAM,CAAC,4BAA4B,CAAC,CACpE,IAEA,eAAe,CACV;QACR,6BAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,IAAG,aAAa,CAAO,CACzE,CACP,CAAC,CAAC,CAAC,CACF,0CAAG,aAAa,CAAI,CACrB,CACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport ButtonTrigger from '../../internal/components/button-trigger';\nimport Option from '../../internal/components/option';\nimport { OptionDefinition } from '../../internal/components/option/interfaces';\nimport { FormFieldValidationControlProps } from '../../internal/context/form-field-context';\nimport { useVisualRefresh } from '../../internal/hooks/use-visual-mode';\nimport { joinStrings } from '../../internal/utils/strings';\nimport { MultiselectProps } from '../../multiselect/interfaces';\nimport InternalToken from '../../token/internal';\nimport { SelectProps } from '../interfaces';\nimport { SelectTriggerProps } from '../utils/use-select';\n\nimport styles from './styles.css.js';\n\nexport interface TriggerProps extends FormFieldValidationControlProps {\n placeholder: string | undefined;\n disabled: boolean | undefined;\n readOnly?: boolean;\n triggerProps: SelectTriggerProps;\n selectedOption: OptionDefinition | null;\n inlineLabelText?: string;\n isOpen?: boolean;\n triggerVariant?: SelectProps.TriggerVariant | MultiselectProps.TriggerVariant;\n inFilteringToken?: 'root' | 'nested';\n selectedOptions?: ReadonlyArray<OptionDefinition>;\n}\n\nconst Trigger = React.forwardRef(\n (\n {\n ariaLabelledby,\n ariaDescribedby,\n controlId,\n invalid,\n inlineLabelText,\n warning,\n triggerProps,\n selectedOption,\n selectedOptions,\n triggerVariant,\n inFilteringToken,\n isOpen,\n placeholder,\n disabled,\n readOnly,\n }: TriggerProps,\n ref: React.Ref<HTMLButtonElement>\n ) => {\n const isVisualRefresh = useVisualRefresh();\n const generatedId = useUniqueId();\n const id = controlId ?? generatedId;\n const triggerContentId = useUniqueId('trigger-content-');\n\n let ariaLabelledbyIds = joinStrings(ariaLabelledby, triggerContentId);\n\n let triggerContent = null;\n if (triggerVariant === 'tokens') {\n if (selectedOptions?.length) {\n triggerContent = (\n <span\n className={clsx(\n styles['inline-token-trigger'],\n disabled && styles['inline-token-trigger--disabled'],\n isVisualRefresh && styles['visual-refresh']\n )}\n >\n <span className={styles['inline-token-list']}>\n {selectedOptions.map(({ label }, i) => (\n <InternalToken key={i} label={label} variant=\"inline\" disabled={disabled} />\n ))}\n </span>\n <span className={styles['inline-token-counter']} id={triggerContentId}>\n <span className={styles['inline-token-hidden-placeholder']}>{placeholder}</span>\n <span>({selectedOptions.length})</span>\n </span>\n </span>\n );\n ariaLabelledbyIds = ariaLabelledby;\n } else {\n triggerContent = (\n <span aria-disabled=\"true\" className={clsx(styles.placeholder, styles.trigger)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n }\n } else if (!selectedOption) {\n triggerContent = (\n <span aria-disabled=\"true\" className={clsx(styles.placeholder, styles.trigger)} id={triggerContentId}>\n {placeholder}\n </span>\n );\n } else if (triggerVariant === 'option') {\n triggerContent = <Option id={triggerContentId} option={{ ...selectedOption, disabled }} triggerVariant={true} />;\n } else {\n triggerContent = (\n <span id={triggerContentId} className={styles.trigger}>\n {selectedOption.label || selectedOption.value}\n </span>\n );\n }\n\n const mergedRef = useMergeRefs(triggerProps.ref, ref);\n const triggerButton = (\n <ButtonTrigger\n {...triggerProps}\n id={id}\n ref={mergedRef}\n pressed={!!isOpen}\n disabled={disabled}\n readOnly={readOnly}\n invalid={invalid}\n warning={warning && !invalid}\n inFilteringToken={inFilteringToken}\n inlineTokens={triggerVariant === 'tokens'}\n ariaDescribedby={ariaDescribedby}\n ariaLabelledby={ariaLabelledbyIds}\n >\n {triggerContent}\n </ButtonTrigger>\n );\n return (\n <>\n {inlineLabelText ? (\n <div className={styles['inline-label-wrapper']}>\n <label\n htmlFor={controlId}\n className={clsx(\n styles['inline-label'],\n disabled && styles['inline-label-disabled'],\n triggerVariant === 'tokens' && styles['inline-label-inline-tokens']\n )}\n >\n {inlineLabelText}\n </label>\n <div className={styles['inline-label-trigger-wrapper']}>{triggerButton}</div>\n </div>\n ) : (\n <>{triggerButton}</>\n )}\n </>\n );\n }\n);\n\nexport default Trigger;\n"]}
@@ -10,7 +10,7 @@ import customScrollToIndex from '../utils/scroll-to-index';
10
10
  import { fallbackItemHeight } from './common';
11
11
  import styles from './styles.css.js';
12
12
  const VirtualList = (props, ref) => {
13
- return props.menuProps.open ? React.createElement(VirtualListOpen, Object.assign({}, props, { ref: ref })) : React.createElement(VirtualListClosed, Object.assign({}, props, { ref: ref }));
13
+ return props.menuProps.open ? React.createElement(VirtualListOpen, { ...props, ref: ref }) : React.createElement(VirtualListClosed, { ...props, ref: ref });
14
14
  };
15
15
  const VirtualListOpen = forwardRef(({ menuProps, getOptionProps, filteredOptions, filteringValue, highlightType, checkboxes, hasDropdownStatus, listBottom, useInteractiveGroups, screenReaderContent, firstOptionSticky, }, ref) => {
16
16
  // update component, when it gets wider or narrower to reposition items
@@ -70,14 +70,14 @@ const VirtualListOpen = forwardRef(({ menuProps, getOptionProps, filteredOptions
70
70
  // Adjust totalSize to account for 1px overlap per item (matching the position adjustment in renderOptions)
71
71
  const overlapAdjustment = filteredOptions.length;
72
72
  const adjustedTotalSize = totalSize - overlapAdjustment;
73
- return (React.createElement(OptionsList, Object.assign({}, menuProps, { stickyItemBlockSize: stickySize, ref: menuRef }),
73
+ return (React.createElement(OptionsList, { ...menuProps, stickyItemBlockSize: stickySize, ref: menuRef },
74
74
  finalOptions,
75
75
  React.createElement("div", { "aria-hidden": "true", key: "total-size", className: styles['layout-strut'], style: { height: adjustedTotalSize - stickySize } }),
76
76
  listBottom ? (React.createElement("div", { role: "option", className: styles['list-bottom'] }, listBottom)) : null));
77
77
  });
78
78
  const VirtualListClosed = forwardRef(({ menuProps, listBottom }, ref) => {
79
79
  useImperativeHandle(ref, () => () => { }, []);
80
- return (React.createElement(OptionsList, Object.assign({}, menuProps, { ref: menuProps.ref }), listBottom ? (React.createElement("div", { role: "option", className: styles['list-bottom'] }, listBottom)) : null));
80
+ return (React.createElement(OptionsList, { ...menuProps, ref: menuProps.ref }, listBottom ? (React.createElement("div", { role: "option", className: styles['list-bottom'] }, listBottom)) : null));
81
81
  });
82
82
  export default forwardRef(VirtualList);
83
83
  //# sourceMappingURL=virtual-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../../../../src/select/parts/virtual-list.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,MAAM,MAAM,iB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, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport OptionsList from '../../internal/components/options-list';\nimport { useVirtual } from '../../internal/hooks/use-virtual';\nimport { renderOptions } from '../utils/render-options';\nimport customScrollToIndex from '../utils/scroll-to-index';\nimport { fallbackItemHeight } from './common';\nimport { SelectListProps } from './plain-list';\n\nimport styles from './styles.css.js';\n\nconst VirtualList = (props: SelectListProps, ref: React.Ref<SelectListProps.SelectListRef>) => {\n return props.menuProps.open ? <VirtualListOpen {...props} ref={ref} /> : <VirtualListClosed {...props} ref={ref} />;\n};\n\nconst VirtualListOpen = forwardRef(\n (\n {\n menuProps,\n getOptionProps,\n filteredOptions,\n filteringValue,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n listBottom,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n }: SelectListProps,\n ref: React.Ref<SelectListProps.SelectListRef>\n ) => {\n // update component, when it gets wider or narrower to reposition items\n const [width, menuMeasureRef] = useContainerQuery(\n rect => ({ inner: rect.contentBoxWidth, outer: rect.borderBoxWidth }),\n []\n );\n const menuRefObject = useRef(null);\n const menuRef = useMergeRefs(menuMeasureRef, menuRefObject, menuProps.ref);\n const previousHighlightedIndex = useRef<number>();\n const { virtualItems, totalSize, scrollToIndex } = useVirtual({\n items: filteredOptions,\n parentRef: menuRefObject,\n // estimateSize is a dependency of measurements memo. We update it to force full recalculation\n // when the height of any option could have changed:\n // 1: because the component got resized (width property got updated)\n // 2: because the option changed its content (filteringValue property controls the highlight and the visibility of hidden tags)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n estimateSize: useCallback(() => fallbackItemHeight, [width?.inner, filteringValue]),\n firstItemSticky: firstOptionSticky,\n });\n\n useImperativeHandle(\n ref,\n () => (index: number) => {\n if (highlightType.moveFocus) {\n const movingUp = previousHighlightedIndex.current !== undefined && index < previousHighlightedIndex.current;\n if (firstOptionSticky && movingUp && index !== 0 && menuRefObject.current) {\n // React-Virtual v2 does not offer a proper way to handle sticky elements when scrolling,\n // so until we upgrade to v3, use our own scroll implementation\n // to prevent newly highlighted element from being covered by the sticky element\n // when moving the highlight upwards in the list.\n\n // Scrolling behavior is covered by integration tests.\n // istanbul ignore next\n customScrollToIndex({\n index,\n menuEl: menuRefObject?.current,\n });\n } else {\n scrollToIndex(index);\n }\n }\n previousHighlightedIndex.current = index;\n },\n [firstOptionSticky, highlightType.moveFocus, scrollToIndex]\n );\n\n const stickySize = firstOptionSticky ? virtualItems[0].size : 0;\n const withScrollbar = !!width && width.inner < width.outer;\n\n const idPrefix = useUniqueId('select-list-');\n const finalOptions = renderOptions({\n options: virtualItems.map(({ index }) => filteredOptions[index]),\n getOptionProps,\n filteringValue,\n highlightType,\n idPrefix,\n checkboxes,\n hasDropdownStatus,\n virtualItems,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n withScrollbar,\n });\n\n // Adjust totalSize to account for 1px overlap per item (matching the position adjustment in renderOptions)\n const overlapAdjustment = filteredOptions.length;\n const adjustedTotalSize = totalSize - overlapAdjustment;\n\n return (\n <OptionsList {...menuProps} stickyItemBlockSize={stickySize} ref={menuRef}>\n {finalOptions}\n <div\n aria-hidden=\"true\"\n key=\"total-size\"\n className={styles['layout-strut']}\n style={{ height: adjustedTotalSize - stickySize }}\n />\n {listBottom ? (\n <div role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </div>\n ) : null}\n </OptionsList>\n );\n }\n);\n\nconst VirtualListClosed = forwardRef(\n ({ menuProps, listBottom }: SelectListProps, ref: React.Ref<SelectListProps.SelectListRef>) => {\n useImperativeHandle(ref, () => () => {}, []);\n return (\n <OptionsList {...menuProps} ref={menuProps.ref}>\n {listBottom ? (\n <div role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </div>\n ) : null}\n </OptionsList>\n );\n }\n);\n\nexport default forwardRef(VirtualList);\n"]}
1
+ {"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../../../../src/select/parts/virtual-list.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,WAAW,GAAG,CAAC,KAAsB,EAAE,GAA6C,EAAE,EAAE;IAC5F,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,eAAe,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC,CAAC,CAAC,oBAAC,iBAAiB,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AACtH,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,UAAU,CAChC,CACE,EACE,SAAS,EACT,cAAc,EACd,eAAe,EACf,cAAc,EACd,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,GACD,EAClB,GAA6C,EAC7C,EAAE;IACF,uEAAuE;IACvE,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG,iBAAiB,CAC/C,IAAI,CAAC,EAAE,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AAC,aAAa,CAAC,IAChD,UAAU,CACP,CACP,CAAC,CAAC,CAAC,IAAI,CACI,CACf,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,iBAAiB,GAAG,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAmB,EAAE,GAA6C,EAAE,EAAE;IAC5F,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7C,OAAO,CACL,oBAAC,WAAW,OAAK,SAAS,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,IAC3C,UAAU,CAAC,CAAC,CAAC,CACZ,6BAAK,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,IAChD,UAAU,CACP,CACP,CAAC,CAAC,CAAC,IAAI,CACI,CACf,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport OptionsList from '../../internal/components/options-list';\nimport { useVirtual } from '../../internal/hooks/use-virtual';\nimport { renderOptions } from '../utils/render-options';\nimport customScrollToIndex from '../utils/scroll-to-index';\nimport { fallbackItemHeight } from './common';\nimport { SelectListProps } from './plain-list';\n\nimport styles from './styles.css.js';\n\nconst VirtualList = (props: SelectListProps, ref: React.Ref<SelectListProps.SelectListRef>) => {\n return props.menuProps.open ? <VirtualListOpen {...props} ref={ref} /> : <VirtualListClosed {...props} ref={ref} />;\n};\n\nconst VirtualListOpen = forwardRef(\n (\n {\n menuProps,\n getOptionProps,\n filteredOptions,\n filteringValue,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n listBottom,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n }: SelectListProps,\n ref: React.Ref<SelectListProps.SelectListRef>\n ) => {\n // update component, when it gets wider or narrower to reposition items\n const [width, menuMeasureRef] = useContainerQuery(\n rect => ({ inner: rect.contentBoxWidth, outer: rect.borderBoxWidth }),\n []\n );\n const menuRefObject = useRef(null);\n const menuRef = useMergeRefs(menuMeasureRef, menuRefObject, menuProps.ref);\n const previousHighlightedIndex = useRef<number>();\n const { virtualItems, totalSize, scrollToIndex } = useVirtual({\n items: filteredOptions,\n parentRef: menuRefObject,\n // estimateSize is a dependency of measurements memo. We update it to force full recalculation\n // when the height of any option could have changed:\n // 1: because the component got resized (width property got updated)\n // 2: because the option changed its content (filteringValue property controls the highlight and the visibility of hidden tags)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n estimateSize: useCallback(() => fallbackItemHeight, [width?.inner, filteringValue]),\n firstItemSticky: firstOptionSticky,\n });\n\n useImperativeHandle(\n ref,\n () => (index: number) => {\n if (highlightType.moveFocus) {\n const movingUp = previousHighlightedIndex.current !== undefined && index < previousHighlightedIndex.current;\n if (firstOptionSticky && movingUp && index !== 0 && menuRefObject.current) {\n // React-Virtual v2 does not offer a proper way to handle sticky elements when scrolling,\n // so until we upgrade to v3, use our own scroll implementation\n // to prevent newly highlighted element from being covered by the sticky element\n // when moving the highlight upwards in the list.\n\n // Scrolling behavior is covered by integration tests.\n // istanbul ignore next\n customScrollToIndex({\n index,\n menuEl: menuRefObject?.current,\n });\n } else {\n scrollToIndex(index);\n }\n }\n previousHighlightedIndex.current = index;\n },\n [firstOptionSticky, highlightType.moveFocus, scrollToIndex]\n );\n\n const stickySize = firstOptionSticky ? virtualItems[0].size : 0;\n const withScrollbar = !!width && width.inner < width.outer;\n\n const idPrefix = useUniqueId('select-list-');\n const finalOptions = renderOptions({\n options: virtualItems.map(({ index }) => filteredOptions[index]),\n getOptionProps,\n filteringValue,\n highlightType,\n idPrefix,\n checkboxes,\n hasDropdownStatus,\n virtualItems,\n useInteractiveGroups,\n screenReaderContent,\n firstOptionSticky,\n withScrollbar,\n });\n\n // Adjust totalSize to account for 1px overlap per item (matching the position adjustment in renderOptions)\n const overlapAdjustment = filteredOptions.length;\n const adjustedTotalSize = totalSize - overlapAdjustment;\n\n return (\n <OptionsList {...menuProps} stickyItemBlockSize={stickySize} ref={menuRef}>\n {finalOptions}\n <div\n aria-hidden=\"true\"\n key=\"total-size\"\n className={styles['layout-strut']}\n style={{ height: adjustedTotalSize - stickySize }}\n />\n {listBottom ? (\n <div role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </div>\n ) : null}\n </OptionsList>\n );\n }\n);\n\nconst VirtualListClosed = forwardRef(\n ({ menuProps, listBottom }: SelectListProps, ref: React.Ref<SelectListProps.SelectListRef>) => {\n useImperativeHandle(ref, () => () => {}, []);\n return (\n <OptionsList {...menuProps} ref={menuProps.ref}>\n {listBottom ? (\n <div role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </div>\n ) : null}\n </OptionsList>\n );\n }\n);\n\nexport default forwardRef(VirtualList);\n"]}
@@ -3,6 +3,12 @@ export const getItemProps = ({ option, index, getOptionProps, filteringValue, ch
3
3
  const optionProps = getOptionProps(option, index);
4
4
  optionProps.filteringValue = filteringValue;
5
5
  const { inGroupIndex, groupIndex, throughIndex } = getTestOptionIndexes(option) || {};
6
- return Object.assign(Object.assign({}, optionProps), { hasCheckbox: checkboxes, ['data-group-index']: groupIndex, ['data-child-index']: inGroupIndex, ['data-test-index']: throughIndex });
6
+ return {
7
+ ...optionProps,
8
+ hasCheckbox: checkboxes,
9
+ ['data-group-index']: groupIndex,
10
+ ['data-child-index']: inGroupIndex,
11
+ ['data-test-index']: throughIndex,
12
+ };
7
13
  };
8
14
  //# sourceMappingURL=get-item-props.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-item-props.js","sourceRoot":"","sources":["../../../../src/select/utils/get-item-props.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAUjG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,GAAG,KAAK,EAAa,EAAE,EAAE;IAC/G,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,WAAW,CAAC,cAAc,GAAG,cAAc,CAAC;IAC5C,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACtF,uCACK,WAAW,KACd,WAAW,EAAE,UAAU,EACvB,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAChC,CAAC,kBAAkB,CAAC,EAAE,YAAY,EAClC,CAAC,iBAAiB,CAAC,EAAE,YAAY,IACjC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport { getTestOptionIndexes } from '../../internal/components/options-list/utils/test-indexes';\n\ninterface ItemProps {\n option: DropdownOption;\n index: number;\n getOptionProps: any;\n filteringValue: string;\n checkboxes: boolean;\n}\n\nexport const getItemProps = ({ option, index, getOptionProps, filteringValue, checkboxes = false }: ItemProps) => {\n const optionProps = getOptionProps(option, index);\n optionProps.filteringValue = filteringValue;\n const { inGroupIndex, groupIndex, throughIndex } = getTestOptionIndexes(option) || {};\n return {\n ...optionProps,\n hasCheckbox: checkboxes,\n ['data-group-index']: groupIndex,\n ['data-child-index']: inGroupIndex,\n ['data-test-index']: throughIndex,\n };\n};\n"]}
1
+ {"version":3,"file":"get-item-props.js","sourceRoot":"","sources":["../../../../src/select/utils/get-item-props.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAUjG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,GAAG,KAAK,EAAa,EAAE,EAAE;IAC/G,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,WAAW,CAAC,cAAc,GAAG,cAAc,CAAC;IAC5C,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACtF,OAAO;QACL,GAAG,WAAW;QACd,WAAW,EAAE,UAAU;QACvB,CAAC,kBAAkB,CAAC,EAAE,UAAU;QAChC,CAAC,kBAAkB,CAAC,EAAE,YAAY;QAClC,CAAC,iBAAiB,CAAC,EAAE,YAAY;KAClC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport { getTestOptionIndexes } from '../../internal/components/options-list/utils/test-indexes';\n\ninterface ItemProps {\n option: DropdownOption;\n index: number;\n getOptionProps: any;\n filteringValue: string;\n checkboxes: boolean;\n}\n\nexport const getItemProps = ({ option, index, getOptionProps, filteringValue, checkboxes = false }: ItemProps) => {\n const optionProps = getOptionProps(option, index);\n optionProps.filteringValue = filteringValue;\n const { inGroupIndex, groupIndex, throughIndex } = getTestOptionIndexes(option) || {};\n return {\n ...optionProps,\n hasCheckbox: checkboxes,\n ['data-group-index']: groupIndex,\n ['data-child-index']: inGroupIndex,\n ['data-test-index']: throughIndex,\n };\n};\n"]}
@@ -28,7 +28,7 @@ export const renderOptions = ({ options, getOptionProps, filteringValue, highlig
28
28
  // Adjust virtual position to create 1px overlap between items (matching non-virtual behavior)
29
29
  // Subtract globalIndex to shift each item up by 1px per item
30
30
  const adjustedVirtualPosition = virtualItem ? virtualItem.start - globalIndex : undefined;
31
- return (React.createElement(ListItem, Object.assign({ key: globalIndex }, props, { virtualPosition: adjustedVirtualPosition, ref: isSticky && stickyOptionRef ? stickyOptionRef : virtualItem && virtualItem.measureRef, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaPosinset: globalIndex + 1, ariaSetsize: ariaSetsize, highlightType: highlightType.type, withScrollbar: withScrollbar, sticky: isSticky })));
31
+ return (React.createElement(ListItem, { key: globalIndex, ...props, virtualPosition: adjustedVirtualPosition, ref: isSticky && stickyOptionRef ? stickyOptionRef : virtualItem && virtualItem.measureRef, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaPosinset: globalIndex + 1, ariaSetsize: ariaSetsize, highlightType: highlightType.type, withScrollbar: withScrollbar, sticky: isSticky }));
32
32
  };
33
33
  const unflattenedOptions = unflattenOptions(options);
34
34
  return unflattenedOptions.map(nestedDropdownOption => {
@@ -1 +1 @@
1
- {"version":3,"file":"render-options.js","sourceRoot":"","sources":["../../../../src/select/utils/render-options.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAwB,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAGlH,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAmBhD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,cAAc,EACd,cAAc,EACd,aAAa,EACb,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,eAAe,GACG,EAAE,EAAE;IACtB,MAAM,kBAAkB,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAwB,EAAE,EAAE;QACrE,MAAM,WAAW,GAAG,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,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport { NestedDropdownOption, unflattenOptions } from '../../internal/components/option/utils/unflatten-options';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option';\nimport { VirtualItem } from '../../internal/vendor/react-virtual';\nimport Item from '../parts/item';\nimport MultiselectItem from '../parts/multiselect-item';\nimport OptionGroup from '../parts/option-group';\nimport { getItemProps } from './get-item-props';\n\ninterface RenderOptionProps {\n options: ReadonlyArray<DropdownOption>;\n getOptionProps: any;\n filteringValue: string;\n highlightType: HighlightType;\n idPrefix: string;\n checkboxes?: boolean;\n hasDropdownStatus?: boolean;\n virtualItems?: VirtualItem[];\n useInteractiveGroups?: boolean;\n screenReaderContent?: string;\n ariaSetsize?: number;\n withScrollbar: boolean;\n firstOptionSticky?: boolean;\n stickyOptionRef?: React.Ref<HTMLDivElement>;\n}\n\nexport const renderOptions = ({\n options,\n getOptionProps,\n filteringValue,\n highlightType,\n idPrefix,\n checkboxes = false,\n hasDropdownStatus,\n virtualItems,\n useInteractiveGroups,\n screenReaderContent,\n ariaSetsize,\n withScrollbar,\n firstOptionSticky,\n stickyOptionRef,\n}: RenderOptionProps) => {\n const getNestedItemProps = ({ index, option }: NestedDropdownOption) => {\n const virtualItem = virtualItems && virtualItems[index];\n const globalIndex = virtualItem ? virtualItem.index : index;\n return getItemProps({\n option,\n index: globalIndex,\n getOptionProps,\n filteringValue: option.type === 'select-all' ? '' : filteringValue,\n checkboxes,\n });\n };\n\n const renderListItem = (props: any, index: number) => {\n const virtualItem = virtualItems && virtualItems[index];\n const globalIndex = virtualItem ? virtualItem.index : index;\n\n const isLastItem = index === options.length - 1;\n const padBottom = !hasDropdownStatus && isLastItem;\n const ListItem = useInteractiveGroups ? MultiselectItem : Item;\n const isSticky = firstOptionSticky && globalIndex === 0;\n\n // Adjust virtual position to create 1px overlap between items (matching non-virtual behavior)\n // Subtract globalIndex to shift each item up by 1px per item\n const adjustedVirtualPosition = virtualItem ? virtualItem.start - globalIndex : undefined;\n\n return (\n <ListItem\n key={globalIndex}\n {...props}\n virtualPosition={adjustedVirtualPosition}\n ref={isSticky && stickyOptionRef ? stickyOptionRef : virtualItem && virtualItem.measureRef}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaPosinset={globalIndex + 1}\n ariaSetsize={ariaSetsize}\n highlightType={highlightType.type}\n withScrollbar={withScrollbar}\n sticky={isSticky}\n />\n );\n };\n\n const unflattenedOptions = unflattenOptions(options);\n return unflattenedOptions.map(nestedDropdownOption => {\n const index = nestedDropdownOption.index;\n const props = getNestedItemProps(nestedDropdownOption);\n\n if (nestedDropdownOption.type === 'parent') {\n const { children } = nestedDropdownOption;\n const optionId = props.id ?? `${idPrefix}-option-${index}`;\n return (\n <OptionGroup\n key={index}\n virtual={virtualItems?.[index] !== undefined}\n ariaLabelledby={optionId}\n ariaDisabled={props['aria-disabled']}\n >\n {renderListItem(props, index)}\n {children.map(child => (\n <React.Fragment key={child.index}>{renderListItem(getNestedItemProps(child), child.index)}</React.Fragment>\n ))}\n </OptionGroup>\n );\n }\n\n return renderListItem(props, index);\n });\n};\n"]}
1
+ {"version":3,"file":"render-options.js","sourceRoot":"","sources":["../../../../src/select/utils/render-options.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAwB,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAGlH,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAmBhD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,cAAc,EACd,cAAc,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KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,CAAC,KAAK,IAAG,cAAc,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAkB,CAC5G,CAAC,CACU,CACf,CAAC;QACJ,CAAC;QAED,OAAO,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport { NestedDropdownOption, unflattenOptions } from '../../internal/components/option/utils/unflatten-options';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option';\nimport { VirtualItem } from '../../internal/vendor/react-virtual';\nimport Item from '../parts/item';\nimport MultiselectItem from '../parts/multiselect-item';\nimport OptionGroup from '../parts/option-group';\nimport { getItemProps } from './get-item-props';\n\ninterface RenderOptionProps {\n options: ReadonlyArray<DropdownOption>;\n getOptionProps: any;\n filteringValue: string;\n highlightType: HighlightType;\n idPrefix: string;\n checkboxes?: boolean;\n hasDropdownStatus?: boolean;\n virtualItems?: VirtualItem[];\n useInteractiveGroups?: boolean;\n screenReaderContent?: string;\n ariaSetsize?: number;\n withScrollbar: boolean;\n firstOptionSticky?: boolean;\n stickyOptionRef?: React.Ref<HTMLDivElement>;\n}\n\nexport const renderOptions = ({\n options,\n getOptionProps,\n filteringValue,\n highlightType,\n idPrefix,\n checkboxes = false,\n hasDropdownStatus,\n virtualItems,\n useInteractiveGroups,\n screenReaderContent,\n ariaSetsize,\n withScrollbar,\n firstOptionSticky,\n stickyOptionRef,\n}: RenderOptionProps) => {\n const getNestedItemProps = ({ index, option }: NestedDropdownOption) => {\n const virtualItem = virtualItems && virtualItems[index];\n const globalIndex = virtualItem ? virtualItem.index : index;\n return getItemProps({\n option,\n index: globalIndex,\n getOptionProps,\n filteringValue: option.type === 'select-all' ? '' : filteringValue,\n checkboxes,\n });\n };\n\n const renderListItem = (props: any, index: number) => {\n const virtualItem = virtualItems && virtualItems[index];\n const globalIndex = virtualItem ? virtualItem.index : index;\n\n const isLastItem = index === options.length - 1;\n const padBottom = !hasDropdownStatus && isLastItem;\n const ListItem = useInteractiveGroups ? MultiselectItem : Item;\n const isSticky = firstOptionSticky && globalIndex === 0;\n\n // Adjust virtual position to create 1px overlap between items (matching non-virtual behavior)\n // Subtract globalIndex to shift each item up by 1px per item\n const adjustedVirtualPosition = virtualItem ? virtualItem.start - globalIndex : undefined;\n\n return (\n <ListItem\n key={globalIndex}\n {...props}\n virtualPosition={adjustedVirtualPosition}\n ref={isSticky && stickyOptionRef ? stickyOptionRef : virtualItem && virtualItem.measureRef}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaPosinset={globalIndex + 1}\n ariaSetsize={ariaSetsize}\n highlightType={highlightType.type}\n withScrollbar={withScrollbar}\n sticky={isSticky}\n />\n );\n };\n\n const unflattenedOptions = unflattenOptions(options);\n return unflattenedOptions.map(nestedDropdownOption => {\n const index = nestedDropdownOption.index;\n const props = getNestedItemProps(nestedDropdownOption);\n\n if (nestedDropdownOption.type === 'parent') {\n const { children } = nestedDropdownOption;\n const optionId = props.id ?? `${idPrefix}-option-${index}`;\n return (\n <OptionGroup\n key={index}\n virtual={virtualItems?.[index] !== undefined}\n ariaLabelledby={optionId}\n ariaDisabled={props['aria-disabled']}\n >\n {renderListItem(props, index)}\n {children.map(child => (\n <React.Fragment key={child.index}>{renderListItem(getNestedItemProps(child), child.index)}</React.Fragment>\n ))}\n </OptionGroup>\n );\n }\n\n return renderListItem(props, index);\n });\n};\n"]}
@@ -1,4 +1,3 @@
1
- import { __rest } from "tslib";
2
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
2
  // SPDX-License-Identifier: Apache-2.0
4
3
  import React, { useCallback, useEffect, useMemo } from 'react';
@@ -11,8 +10,7 @@ import { createWidgetizedComponent } from '../internal/widgets';
11
10
  import { Header, NavigationItemsList } from './parts';
12
11
  import { checkDuplicateHrefs, generateExpandableItemsMapping } from './util';
13
12
  import styles from './styles.css.js';
14
- export function SideNavigationImplementation(_a) {
15
- var { header, itemsControl, activeHref, items = [], onFollow, onChange, __internalRootRef } = _a, props = __rest(_a, ["header", "itemsControl", "activeHref", "items", "onFollow", "onChange", "__internalRootRef"]);
13
+ export function SideNavigationImplementation({ header, itemsControl, activeHref, items = [], onFollow, onChange, __internalRootRef, ...props }) {
16
14
  const baseProps = getBaseProps(props);
17
15
  const isToolbar = useAppLayoutToolbarDesignEnabled();
18
16
  const parentMap = useMemo(() => generateExpandableItemsMapping(items), [items]);
@@ -28,7 +26,7 @@ export function SideNavigationImplementation(_a) {
28
26
  const onFollowHandler = useCallback((item, sourceEvent) => {
29
27
  fireCancelableEvent(onFollow, item, sourceEvent);
30
28
  }, [onFollow]);
31
- return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar']), ref: __internalRootRef }),
29
+ return (React.createElement("div", { ...baseProps, className: clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar']), ref: __internalRootRef },
32
30
  header && (React.createElement(Header, { definition: header, activeHref: activeHref, fireChange: onChangeHandler, fireFollow: onFollowHandler })),
33
31
  itemsControl && React.createElement("div", { className: styles['items-control'] }, itemsControl),
34
32
  items && (React.createElement("div", { className: styles['list-container'] },
@@ -1 +1 @@
1
- {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/side-navigation/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,4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,GAAG,WAAW,CACjC,CACE,IAI2C,EAC3C,WAAyC,EACzC,EAAE;QACF,mBAAmB,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,EACtF,GAAG,EAAE,iBAAiB;QAErB,MAAM,IAAI,CACT,oBAAC,MAAM,IAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,GAAI,CACjH;QACA,YAAY,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,IAAG,YAAY,CAAO;QAC7E,KAAK,IAAI,CACR,6BAAK,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC;YACtC,oBAAC,mBAAmB,IAClB,OAAO,EAAC,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,eAAe,EAC3B,UAAU,EAAE,eAAe,EAC3B,UAAU,EAAE,UAAU,GACtB,CACE,CACP,CACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { SideNavigationProps } from './interfaces';\nimport { Header, NavigationItemsList } from './parts';\nimport { checkDuplicateHrefs, generateExpandableItemsMapping } from './util';\n\nimport styles from './styles.css.js';\n\ntype SideNavigationInternalProps = SideNavigationProps & InternalBaseComponentProps;\n\nexport function SideNavigationImplementation({\n header,\n itemsControl,\n activeHref,\n items = [],\n onFollow,\n onChange,\n __internalRootRef,\n ...props\n}: SideNavigationInternalProps) {\n const baseProps = getBaseProps(props);\n const isToolbar = useAppLayoutToolbarDesignEnabled();\n const parentMap = useMemo(() => generateExpandableItemsMapping(items), [items]);\n\n if (isDevelopment) {\n // This code should be wiped in production anyway.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => checkDuplicateHrefs(items), [items]);\n }\n\n const onChangeHandler = useCallback(\n (item: SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup, expanded: boolean) => {\n // generateExpandableItemsMapping walks through the entire tree, so we're certain about getting a value.\n fireNonCancelableEvent(onChange, { item, expanded: expanded, expandableParents: parentMap.get(item)! });\n },\n [onChange, parentMap]\n );\n\n const onFollowHandler = useCallback(\n (\n item:\n | SideNavigationProps.Link\n | SideNavigationProps.Header\n | SideNavigationProps.LinkGroup\n | SideNavigationProps.ExpandableLinkGroup,\n sourceEvent: React.SyntheticEvent | Event\n ) => {\n fireCancelableEvent(onFollow, item, sourceEvent);\n },\n [onFollow]\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar'])}\n ref={__internalRootRef}\n >\n {header && (\n <Header definition={header} activeHref={activeHref} fireChange={onChangeHandler} fireFollow={onFollowHandler} />\n )}\n {itemsControl && <div className={styles['items-control']}>{itemsControl}</div>}\n {items && (\n <div className={styles['list-container']}>\n <NavigationItemsList\n variant=\"root\"\n items={items}\n fireFollow={onFollowHandler}\n fireChange={onChangeHandler}\n activeHref={activeHref}\n />\n </div>\n )}\n </div>\n );\n}\n\nexport const createWidgetizedSideNavigation = createWidgetizedComponent(SideNavigationImplementation);\n"]}
1
+ {"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/side-navigation/implementation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,QAAQ,CAAC;AAE7E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,UAAU,4BAA4B,CAAC,EAC3C,MAAM,EACN,YAAY,EACZ,UAAU,EACV,KAAK,GAAG,EAAE,EACV,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,GAAG,KAAK,EACoB;IAC5B,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,SAAS,GAAG,gCAAgC,EAAE,CAAC;IACrD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEhF,IAAI,aAAa,EAAE,CAAC;QAClB,kDAAkD;QAClD,sDAAsD;QACtD,SAAS,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACv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azon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport clsx from 'clsx';\n\nimport { useAppLayoutToolbarDesignEnabled } from '../app-layout/utils/feature-flags';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { createWidgetizedComponent } from '../internal/widgets';\nimport { SideNavigationProps } from './interfaces';\nimport { Header, NavigationItemsList } from './parts';\nimport { checkDuplicateHrefs, generateExpandableItemsMapping } from './util';\n\nimport styles from './styles.css.js';\n\ntype SideNavigationInternalProps = SideNavigationProps & InternalBaseComponentProps;\n\nexport function SideNavigationImplementation({\n header,\n itemsControl,\n activeHref,\n items = [],\n onFollow,\n onChange,\n __internalRootRef,\n ...props\n}: SideNavigationInternalProps) {\n const baseProps = getBaseProps(props);\n const isToolbar = useAppLayoutToolbarDesignEnabled();\n const parentMap = useMemo(() => generateExpandableItemsMapping(items), [items]);\n\n if (isDevelopment) {\n // This code should be wiped in production anyway.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => checkDuplicateHrefs(items), [items]);\n }\n\n const onChangeHandler = useCallback(\n (item: SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup, expanded: boolean) => {\n // generateExpandableItemsMapping walks through the entire tree, so we're certain about getting a value.\n fireNonCancelableEvent(onChange, { item, expanded: expanded, expandableParents: parentMap.get(item)! });\n },\n [onChange, parentMap]\n );\n\n const onFollowHandler = useCallback(\n (\n item:\n | SideNavigationProps.Link\n | SideNavigationProps.Header\n | SideNavigationProps.LinkGroup\n | SideNavigationProps.ExpandableLinkGroup,\n sourceEvent: React.SyntheticEvent | Event\n ) => {\n fireCancelableEvent(onFollow, item, sourceEvent);\n },\n [onFollow]\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, baseProps.className, isToolbar && styles['with-toolbar'])}\n ref={__internalRootRef}\n >\n {header && (\n <Header definition={header} activeHref={activeHref} fireChange={onChangeHandler} fireFollow={onFollowHandler} />\n )}\n {itemsControl && <div className={styles['items-control']}>{itemsControl}</div>}\n {items && (\n <div className={styles['list-container']}>\n <NavigationItemsList\n variant=\"root\"\n items={items}\n fireFollow={onFollowHandler}\n fireChange={onChangeHandler}\n activeHref={activeHref}\n />\n </div>\n )}\n </div>\n );\n}\n\nexport const createWidgetizedSideNavigation = createWidgetizedComponent(SideNavigationImplementation);\n"]}
@@ -1,15 +1,13 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  'use client';
4
- import { __rest } from "tslib";
5
4
  import React from 'react';
6
5
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
7
6
  import useBaseComponent from '../internal/hooks/use-base-component';
8
7
  import { applyDisplayName } from '../internal/utils/apply-display-name';
9
8
  import { InternalSideNavigation } from './internal';
10
9
  import analyticsSelectors from './analytics-metadata/styles.css.js';
11
- export default function SideNavigation(_a) {
12
- var { items = [] } = _a, props = __rest(_a, ["items"]);
10
+ export default function SideNavigation({ items = [], ...props }) {
13
11
  const internalProps = useBaseComponent('SideNavigation');
14
12
  const componentAnalyticMetadata = {
15
13
  name: 'awsui.SideNavigation',
@@ -18,7 +16,7 @@ export default function SideNavigation(_a) {
18
16
  activeHref: props.activeHref || '',
19
17
  },
20
18
  };
21
- return (React.createElement(InternalSideNavigation, Object.assign({}, props, internalProps, { items: items }, getAnalyticsMetadataAttribute({ component: componentAnalyticMetadata }))));
19
+ return (React.createElement(InternalSideNavigation, { ...props, ...internalProps, items: items, ...getAnalyticsMetadataAttribute({ component: componentAnalyticMetadata }) }));
22
20
  }
23
21
  applyDisplayName(SideNavigation, 'SideNavigation');
24
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/side-navigation/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAA6C;QAA7C,EAAE,KAAK,GAAG,EAAE,OAAiC,EAA5B,KAAK,cAAtB,SAAwB,CAAF;IAC3D,MAAM,aAAa,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAEzD,MAAM,yBAAyB,GAAsD;QACnF,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,EAAE;QACnD,UAAU,EAAE;YACV,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE;SACnC;KACF,CAAC;IACF,OAAO,CACL,oBAAC,sBAAsB,oBACjB,KAAK,EACL,aAAa,IACjB,KAAK,EAAE,KAAK,IACR,6BAA6B,CAAC,EAAE,SAAS,EAAE,yBAAyB,EAAE,CAAC,EAC3E,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataSideNavigationComponent } from './analytics-metadata/interfaces';\nimport { SideNavigationProps } from './interfaces';\nimport { InternalSideNavigation } from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { SideNavigationProps };\n\nexport default function SideNavigation({ items = [], ...props }: SideNavigationProps) {\n const internalProps = useBaseComponent('SideNavigation');\n\n const componentAnalyticMetadata: GeneratedAnalyticsMetadataSideNavigationComponent = {\n name: 'awsui.SideNavigation',\n label: `.${analyticsSelectors['header-link-text']}`,\n properties: {\n activeHref: props.activeHref || '',\n },\n };\n return (\n <InternalSideNavigation\n {...props}\n {...internalProps}\n items={items}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticMetadata })}\n />\n );\n}\n\napplyDisplayName(SideNavigation, 'SideNavigation');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/side-navigation/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAIpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,KAAK,EAAuB;IAClF,MAAM,aAAa,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAEzD,MAAM,yBAAyB,GAAsD;QACnF,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,EAAE;QACnD,UAAU,EAAE;YACV,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE;SACnC;KACF,CAAC;IACF,OAAO,CACL,oBAAC,sBAAsB,OACjB,KAAK,KACL,aAAa,EACjB,KAAK,EAAE,KAAK,KACR,6BAA6B,CAAC,EAAE,SAAS,EAAE,yBAAyB,EAAE,CAAC,GAC3E,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataSideNavigationComponent } from './analytics-metadata/interfaces';\nimport { SideNavigationProps } from './interfaces';\nimport { InternalSideNavigation } from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { SideNavigationProps };\n\nexport default function SideNavigation({ items = [], ...props }: SideNavigationProps) {\n const internalProps = useBaseComponent('SideNavigation');\n\n const componentAnalyticMetadata: GeneratedAnalyticsMetadataSideNavigationComponent = {\n name: 'awsui.SideNavigation',\n label: `.${analyticsSelectors['header-link-text']}`,\n properties: {\n activeHref: props.activeHref || '',\n },\n };\n return (\n <InternalSideNavigation\n {...props}\n {...internalProps}\n items={items}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticMetadata })}\n />\n );\n}\n\napplyDisplayName(SideNavigation, 'SideNavigation');\n"]}
@@ -32,10 +32,10 @@ export function Header({ definition, activeHref, fireFollow }) {
32
32
  };
33
33
  return (React.createElement(React.Fragment, null,
34
34
  React.createElement("h2", { className: styles.header },
35
- React.createElement("a", Object.assign({ href: definition.href, className: clsx(styles['header-link'], { [styles['header-link--has-logo']]: !!definition.logo }), "aria-current": definition.href === activeHref ? 'page' : undefined, onClick: onClick }, getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata)),
36
- definition.logo && (React.createElement("img", Object.assign({ className: clsx(styles['header-logo'], {
35
+ React.createElement("a", { href: definition.href, className: clsx(styles['header-link'], { [styles['header-link--has-logo']]: !!definition.logo }), "aria-current": definition.href === activeHref ? 'page' : undefined, onClick: onClick, ...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata) },
36
+ definition.logo && (React.createElement("img", { className: clsx(styles['header-logo'], {
37
37
  [styles['header-logo--stretched']]: !definition.text,
38
- }) }, definition.logo))),
38
+ }), ...definition.logo })),
39
39
  React.createElement("span", { className: clsx(styles['header-link-text'], analyticsSelectors['header-link-text']) }, definition.text))),
40
40
  React.createElement(Divider, { isPresentational: true, variant: "header" })));
41
41
  }
@@ -137,7 +137,7 @@ function Link({ definition, expanded, activeHref, fireFollow, position }) {
137
137
  };
138
138
  const renderedExternalIconAriaLabel = i18n('externalIconAriaLabel', definition.externalIconAriaLabel);
139
139
  return (React.createElement(React.Fragment, null,
140
- React.createElement("a", Object.assign({ href: definition.href, className: clsx(styles.link, { [styles['link-active']]: isActive }), target: definition.external ? '_blank' : undefined, rel: definition.external ? 'noopener noreferrer' : undefined, "aria-expanded": expanded, "aria-current": definition.href === activeHref ? 'page' : undefined, onClick: onClick }, getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata)),
140
+ React.createElement("a", { href: definition.href, className: clsx(styles.link, { [styles['link-active']]: isActive }), target: definition.external ? '_blank' : undefined, rel: definition.external ? 'noopener noreferrer' : undefined, "aria-expanded": expanded, "aria-current": definition.href === activeHref ? 'page' : undefined, onClick: onClick, ...getAnalyticsMetadataAttribute(clickActionAnalyticsMetadata) },
141
141
  React.createElement("span", { className: analyticsSelectors['link-text'] }, definition.text),
142
142
  definition.external && (React.createElement("span", { "aria-label": renderedExternalIconAriaLabel, role: renderedExternalIconAriaLabel ? 'img' : undefined },
143
143
  React.createElement(InternalIcon, { name: "external", className: styles['external-icon'] })))),