@cloudscape-design/components 3.0.840 → 3.0.842

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 (1142) hide show
  1. package/alert/styles.css.js +28 -28
  2. package/alert/styles.scoped.css +49 -45
  3. package/alert/styles.selectors.js +28 -28
  4. package/anchor-navigation/styles.css.js +8 -8
  5. package/anchor-navigation/styles.scoped.css +24 -20
  6. package/anchor-navigation/styles.selectors.js +8 -8
  7. package/annotation-context/annotation/annotation-icon.d.ts +2 -1
  8. package/annotation-context/annotation/annotation-icon.d.ts.map +1 -1
  9. package/annotation-context/annotation/annotation-icon.js.map +1 -1
  10. package/annotation-context/annotation/annotation-popover.d.ts +2 -1
  11. package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
  12. package/annotation-context/annotation/annotation-popover.js.map +1 -1
  13. package/annotation-context/annotation/annotation-trigger.d.ts +1 -1
  14. package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
  15. package/annotation-context/annotation/annotation-trigger.js.map +1 -1
  16. package/annotation-context/annotation/closed-annotation.d.ts +2 -1
  17. package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
  18. package/annotation-context/annotation/closed-annotation.js.map +1 -1
  19. package/annotation-context/annotation/open-annotation.d.ts +2 -1
  20. package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
  21. package/annotation-context/annotation/open-annotation.js.map +1 -1
  22. package/annotation-context/annotation/styles.css.js +24 -24
  23. package/annotation-context/annotation/styles.scoped.css +36 -32
  24. package/annotation-context/annotation/styles.selectors.js +24 -24
  25. package/app-layout/classic.d.ts.map +1 -1
  26. package/app-layout/classic.js +7 -3
  27. package/app-layout/classic.js.map +1 -1
  28. package/app-layout/content-wrapper/styles.css.js +3 -3
  29. package/app-layout/content-wrapper/styles.scoped.css +10 -6
  30. package/app-layout/content-wrapper/styles.selectors.js +3 -3
  31. package/app-layout/defaults.d.ts +2 -1
  32. package/app-layout/defaults.d.ts.map +1 -1
  33. package/app-layout/defaults.js.map +1 -1
  34. package/app-layout/drawer/styles.css.js +14 -14
  35. package/app-layout/drawer/styles.scoped.css +28 -24
  36. package/app-layout/drawer/styles.selectors.js +14 -14
  37. package/app-layout/mobile-toolbar/styles.css.js +8 -8
  38. package/app-layout/mobile-toolbar/styles.scoped.css +12 -8
  39. package/app-layout/mobile-toolbar/styles.selectors.js +8 -8
  40. package/app-layout/resize/styles.css.js +5 -5
  41. package/app-layout/resize/styles.scoped.css +16 -12
  42. package/app-layout/resize/styles.selectors.js +5 -5
  43. package/app-layout/split-panel/split-panel-forced-position.d.ts +5 -0
  44. package/app-layout/split-panel/split-panel-forced-position.d.ts.map +1 -0
  45. package/app-layout/split-panel/split-panel-forced-position.js +30 -0
  46. package/app-layout/split-panel/split-panel-forced-position.js.map +1 -0
  47. package/app-layout/split-panel/styles.css.js +2 -2
  48. package/app-layout/split-panel/styles.scoped.css +6 -2
  49. package/app-layout/split-panel/styles.selectors.js +2 -2
  50. package/app-layout/styles.css.js +12 -12
  51. package/app-layout/styles.scoped.css +16 -12
  52. package/app-layout/styles.selectors.js +12 -12
  53. package/app-layout/toggles/styles.css.js +2 -2
  54. package/app-layout/toggles/styles.scoped.css +12 -8
  55. package/app-layout/toggles/styles.selectors.js +2 -2
  56. package/app-layout/utils/use-resize.d.ts +1 -1
  57. package/app-layout/utils/use-resize.d.ts.map +1 -1
  58. package/app-layout/utils/use-resize.js.map +1 -1
  59. package/app-layout/utils/use-split-panel-focus-control.d.ts +2 -1
  60. package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
  61. package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
  62. package/app-layout/visual-refresh/context.d.ts.map +1 -1
  63. package/app-layout/visual-refresh/context.js +5 -8
  64. package/app-layout/visual-refresh/context.js.map +1 -1
  65. package/app-layout/visual-refresh/drawers.d.ts +0 -8
  66. package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
  67. package/app-layout/visual-refresh/drawers.js +1 -1
  68. package/app-layout/visual-refresh/drawers.js.map +1 -1
  69. package/app-layout/visual-refresh/styles.css.js +86 -86
  70. package/app-layout/visual-refresh/styles.scoped.css +167 -163
  71. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  72. package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
  73. package/app-layout/visual-refresh-toolbar/compute-layout.js +6 -2
  74. package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
  75. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +1 -1
  76. package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
  77. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +10 -10
  78. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +17 -13
  79. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +10 -10
  80. package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
  81. package/app-layout/visual-refresh-toolbar/index.js +32 -2
  82. package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
  83. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  84. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +9 -5
  85. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  86. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +19 -19
  87. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +39 -35
  88. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +19 -19
  89. package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +1 -1
  90. package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
  91. package/app-layout/visual-refresh-toolbar/split-panel/index.js +3 -1
  92. package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
  93. package/app-layout/visual-refresh-toolbar/split-panel/styles.css.js +1 -1
  94. package/app-layout/visual-refresh-toolbar/split-panel/styles.scoped.css +5 -1
  95. package/app-layout/visual-refresh-toolbar/split-panel/styles.selectors.js +1 -1
  96. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
  97. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +3 -5
  98. package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
  99. package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
  100. package/app-layout/visual-refresh-toolbar/toolbar/index.js +4 -1
  101. package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
  102. package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +13 -13
  103. package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +19 -15
  104. package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +13 -13
  105. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +7 -7
  106. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +23 -19
  107. package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +7 -7
  108. package/area-chart/elements/area-series.d.ts +1 -1
  109. package/area-chart/elements/area-series.d.ts.map +1 -1
  110. package/area-chart/elements/area-series.js.map +1 -1
  111. package/area-chart/elements/threshold-series.d.ts +1 -1
  112. package/area-chart/elements/threshold-series.d.ts.map +1 -1
  113. package/area-chart/elements/threshold-series.js.map +1 -1
  114. package/area-chart/styles.css.js +6 -6
  115. package/area-chart/styles.scoped.css +15 -11
  116. package/area-chart/styles.selectors.js +6 -6
  117. package/attribute-editor/internal.d.ts.map +1 -1
  118. package/attribute-editor/internal.js +5 -1
  119. package/attribute-editor/internal.js.map +1 -1
  120. package/attribute-editor/row.d.ts +2 -1
  121. package/attribute-editor/row.d.ts.map +1 -1
  122. package/attribute-editor/row.js.map +1 -1
  123. package/attribute-editor/styles.css.js +14 -14
  124. package/attribute-editor/styles.scoped.css +28 -24
  125. package/attribute-editor/styles.selectors.js +14 -14
  126. package/autosuggest/analytics-metadata/interfaces.d.ts +0 -4
  127. package/autosuggest/analytics-metadata/interfaces.d.ts.map +1 -1
  128. package/autosuggest/analytics-metadata/interfaces.js.map +1 -1
  129. package/autosuggest/autosuggest-option.d.ts +1 -1
  130. package/autosuggest/autosuggest-option.d.ts.map +1 -1
  131. package/autosuggest/autosuggest-option.js.map +1 -1
  132. package/autosuggest/internal.d.ts +1 -1
  133. package/autosuggest/internal.d.ts.map +1 -1
  134. package/autosuggest/internal.js.map +1 -1
  135. package/autosuggest/load-more-controller.d.ts +3 -2
  136. package/autosuggest/load-more-controller.d.ts.map +1 -1
  137. package/autosuggest/load-more-controller.js.map +1 -1
  138. package/autosuggest/options-list.d.ts +2 -1
  139. package/autosuggest/options-list.d.ts.map +1 -1
  140. package/autosuggest/options-list.js.map +1 -1
  141. package/badge/styles.css.js +10 -10
  142. package/badge/styles.scoped.css +14 -10
  143. package/badge/styles.selectors.js +10 -10
  144. package/box/styles.css.js +191 -191
  145. package/box/styles.scoped.css +240 -236
  146. package/box/styles.selectors.js +191 -191
  147. package/breadcrumb-group/all-items-dropdown.d.ts +15 -0
  148. package/breadcrumb-group/all-items-dropdown.d.ts.map +1 -0
  149. package/breadcrumb-group/all-items-dropdown.js +47 -0
  150. package/breadcrumb-group/all-items-dropdown.js.map +1 -0
  151. package/breadcrumb-group/analytics-metadata/interfaces.d.ts +0 -7
  152. package/breadcrumb-group/analytics-metadata/interfaces.d.ts.map +1 -1
  153. package/breadcrumb-group/analytics-metadata/interfaces.js.map +1 -1
  154. package/breadcrumb-group/implementation.d.ts.map +1 -1
  155. package/breadcrumb-group/implementation.js +9 -6
  156. package/breadcrumb-group/implementation.js.map +1 -1
  157. package/breadcrumb-group/item/styles.css.js +7 -7
  158. package/breadcrumb-group/item/styles.scoped.css +29 -25
  159. package/breadcrumb-group/item/styles.selectors.js +7 -7
  160. package/breadcrumb-group/styles.css.js +14 -10
  161. package/breadcrumb-group/styles.scoped.css +124 -11
  162. package/breadcrumb-group/styles.selectors.js +14 -10
  163. package/breadcrumb-group/utils.d.ts +0 -2
  164. package/breadcrumb-group/utils.d.ts.map +1 -1
  165. package/breadcrumb-group/utils.js +17 -46
  166. package/breadcrumb-group/utils.js.map +1 -1
  167. package/button/index.d.ts.map +1 -1
  168. package/button/index.js +3 -3
  169. package/button/index.js.map +1 -1
  170. package/button/interfaces.d.ts +18 -0
  171. package/button/interfaces.d.ts.map +1 -1
  172. package/button/interfaces.js.map +1 -1
  173. package/button/internal.d.ts.map +1 -1
  174. package/button/internal.js +15 -2
  175. package/button/internal.js.map +1 -1
  176. package/button/styles.css.js +21 -21
  177. package/button/styles.scoped.css +158 -154
  178. package/button/styles.selectors.js +21 -21
  179. package/button/test-classes/styles.css.js +2 -1
  180. package/button/test-classes/styles.scoped.css +5 -1
  181. package/button/test-classes/styles.selectors.js +2 -1
  182. package/button-dropdown/category-elements/styles.css.js +14 -14
  183. package/button-dropdown/category-elements/styles.scoped.css +27 -23
  184. package/button-dropdown/category-elements/styles.selectors.js +14 -14
  185. package/button-dropdown/index.d.ts.map +1 -1
  186. package/button-dropdown/index.js +2 -2
  187. package/button-dropdown/index.js.map +1 -1
  188. package/button-dropdown/interfaces.d.ts +20 -3
  189. package/button-dropdown/interfaces.d.ts.map +1 -1
  190. package/button-dropdown/interfaces.js.map +1 -1
  191. package/button-dropdown/internal.d.ts.map +1 -1
  192. package/button-dropdown/internal.js +13 -6
  193. package/button-dropdown/internal.js.map +1 -1
  194. package/button-dropdown/item-element/index.d.ts +0 -7
  195. package/button-dropdown/item-element/index.d.ts.map +1 -1
  196. package/button-dropdown/item-element/index.js +3 -2
  197. package/button-dropdown/item-element/index.js.map +1 -1
  198. package/button-dropdown/item-element/styles.css.js +14 -13
  199. package/button-dropdown/item-element/styles.scoped.css +33 -21
  200. package/button-dropdown/item-element/styles.selectors.js +14 -13
  201. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts +1 -1
  202. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts.map +1 -1
  203. package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
  204. package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  205. package/button-dropdown/mobile-expandable-group/styles.scoped.css +9 -5
  206. package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  207. package/button-dropdown/styles.css.js +21 -17
  208. package/button-dropdown/styles.scoped.css +51 -38
  209. package/button-dropdown/styles.selectors.js +21 -17
  210. package/button-dropdown/tooltip.d.ts +2 -1
  211. package/button-dropdown/tooltip.d.ts.map +1 -1
  212. package/button-dropdown/tooltip.js.map +1 -1
  213. package/button-dropdown/utils/menu-item.d.ts +3 -2
  214. package/button-dropdown/utils/menu-item.d.ts.map +1 -1
  215. package/button-dropdown/utils/menu-item.js.map +1 -1
  216. package/button-group/file-input-item.d.ts +11 -0
  217. package/button-group/file-input-item.d.ts.map +1 -0
  218. package/button-group/file-input-item.js +23 -0
  219. package/button-group/file-input-item.js.map +1 -0
  220. package/button-group/interfaces.d.ts +23 -1
  221. package/button-group/interfaces.d.ts.map +1 -1
  222. package/button-group/interfaces.js.map +1 -1
  223. package/button-group/internal.d.ts.map +1 -1
  224. package/button-group/internal.js +2 -2
  225. package/button-group/internal.js.map +1 -1
  226. package/button-group/item-element.d.ts +1 -0
  227. package/button-group/item-element.d.ts.map +1 -1
  228. package/button-group/item-element.js +12 -6
  229. package/button-group/item-element.js.map +1 -1
  230. package/button-group/styles.css.js +4 -4
  231. package/button-group/styles.scoped.css +10 -6
  232. package/button-group/styles.selectors.js +4 -4
  233. package/calendar/grid/use-calendar-grid-keyboard-navigation.d.ts.map +1 -1
  234. package/calendar/grid/use-calendar-grid-keyboard-navigation.js +2 -1
  235. package/calendar/grid/use-calendar-grid-keyboard-navigation.js.map +1 -1
  236. package/calendar/internal.d.ts.map +1 -1
  237. package/calendar/internal.js +2 -1
  238. package/calendar/internal.js.map +1 -1
  239. package/calendar/styles.css.js +21 -21
  240. package/calendar/styles.scoped.css +47 -43
  241. package/calendar/styles.selectors.js +21 -21
  242. package/calendar/utils/navigation-day.d.ts +8 -0
  243. package/calendar/utils/navigation-day.d.ts.map +1 -0
  244. package/calendar/utils/navigation-day.js +39 -0
  245. package/calendar/utils/navigation-day.js.map +1 -0
  246. package/calendar/utils/{navigation.d.ts → navigation-month.d.ts} +2 -6
  247. package/calendar/utils/navigation-month.d.ts.map +1 -0
  248. package/calendar/utils/navigation-month.js +39 -0
  249. package/calendar/utils/navigation-month.js.map +1 -0
  250. package/cards/styles.css.js +39 -39
  251. package/cards/styles.scoped.css +54 -50
  252. package/cards/styles.selectors.js +39 -39
  253. package/checkbox/styles.css.js +3 -3
  254. package/checkbox/styles.scoped.css +9 -5
  255. package/checkbox/styles.selectors.js +3 -3
  256. package/code-editor/pane.d.ts +2 -1
  257. package/code-editor/pane.d.ts.map +1 -1
  258. package/code-editor/pane.js.map +1 -1
  259. package/code-editor/resizable-box/styles.css.js +3 -3
  260. package/code-editor/resizable-box/styles.scoped.css +10 -6
  261. package/code-editor/resizable-box/styles.selectors.js +3 -3
  262. package/code-editor/styles.css.js +33 -33
  263. package/code-editor/styles.scoped.css +139 -135
  264. package/code-editor/styles.selectors.js +33 -33
  265. package/collection-preferences/analytics-metadata/interfaces.d.ts +0 -24
  266. package/collection-preferences/analytics-metadata/interfaces.d.ts.map +1 -1
  267. package/collection-preferences/analytics-metadata/interfaces.js.map +1 -1
  268. package/collection-preferences/content-display/content-display-option.d.ts +1 -1
  269. package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
  270. package/collection-preferences/content-display/content-display-option.js.map +1 -1
  271. package/collection-preferences/content-display/index.d.ts.map +1 -1
  272. package/collection-preferences/content-display/index.js +18 -42
  273. package/collection-preferences/content-display/index.js.map +1 -1
  274. package/collection-preferences/content-display/styles.css.js +12 -13
  275. package/collection-preferences/content-display/styles.scoped.css +23 -44
  276. package/collection-preferences/content-display/styles.selectors.js +12 -13
  277. package/collection-preferences/styles.css.js +38 -39
  278. package/collection-preferences/styles.scoped.css +58 -71
  279. package/collection-preferences/styles.selectors.js +38 -39
  280. package/column-layout/flexible-column-layout/styles.css.js +5 -5
  281. package/column-layout/flexible-column-layout/styles.scoped.css +14 -10
  282. package/column-layout/flexible-column-layout/styles.selectors.js +5 -5
  283. package/column-layout/styles.css.js +13 -13
  284. package/column-layout/styles.scoped.css +49 -45
  285. package/column-layout/styles.selectors.js +13 -13
  286. package/container/styles.css.js +31 -31
  287. package/container/styles.scoped.css +60 -56
  288. package/container/styles.selectors.js +31 -31
  289. package/content-layout/styles.css.js +14 -14
  290. package/content-layout/styles.scoped.css +20 -16
  291. package/content-layout/styles.selectors.js +14 -14
  292. package/copy-to-clipboard/internal.d.ts +2 -1
  293. package/copy-to-clipboard/internal.d.ts.map +1 -1
  294. package/copy-to-clipboard/internal.js.map +1 -1
  295. package/date-picker/styles.css.js +7 -7
  296. package/date-picker/styles.scoped.css +13 -9
  297. package/date-picker/styles.selectors.js +7 -7
  298. package/date-range-picker/calendar/grids/index.d.ts +2 -1
  299. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  300. package/date-range-picker/calendar/grids/index.js +1 -1
  301. package/date-range-picker/calendar/grids/index.js.map +1 -1
  302. package/date-range-picker/calendar/grids/monthly-grid.d.ts +2 -1
  303. package/date-range-picker/calendar/grids/monthly-grid.d.ts.map +1 -1
  304. package/date-range-picker/calendar/grids/monthly-grid.js.map +1 -1
  305. package/date-range-picker/calendar/grids/styles.css.js +28 -28
  306. package/date-range-picker/calendar/grids/styles.scoped.css +47 -43
  307. package/date-range-picker/calendar/grids/styles.selectors.js +28 -28
  308. package/date-range-picker/calendar/index.js +1 -1
  309. package/date-range-picker/calendar/index.js.map +1 -1
  310. package/date-range-picker/calendar/range-inputs.d.ts +1 -1
  311. package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
  312. package/date-range-picker/calendar/range-inputs.js.map +1 -1
  313. package/date-range-picker/dropdown.d.ts +2 -2
  314. package/date-range-picker/dropdown.d.ts.map +1 -1
  315. package/date-range-picker/dropdown.js +1 -1
  316. package/date-range-picker/dropdown.js.map +1 -1
  317. package/date-range-picker/index.d.ts.map +1 -1
  318. package/date-range-picker/index.js +3 -10
  319. package/date-range-picker/index.js.map +1 -1
  320. package/date-range-picker/interfaces.d.ts +2 -1
  321. package/date-range-picker/interfaces.d.ts.map +1 -1
  322. package/date-range-picker/interfaces.js.map +1 -1
  323. package/date-range-picker/relative-range/index.d.ts +2 -1
  324. package/date-range-picker/relative-range/index.d.ts.map +1 -1
  325. package/date-range-picker/relative-range/index.js.map +1 -1
  326. package/date-range-picker/relative-range/styles.css.js +9 -9
  327. package/date-range-picker/relative-range/styles.scoped.css +17 -13
  328. package/date-range-picker/relative-range/styles.selectors.js +9 -9
  329. package/date-range-picker/styles.css.js +38 -38
  330. package/date-range-picker/styles.scoped.css +51 -47
  331. package/date-range-picker/styles.selectors.js +38 -38
  332. package/date-range-picker/time-offset.d.ts +2 -1
  333. package/date-range-picker/time-offset.d.ts.map +1 -1
  334. package/date-range-picker/time-offset.js +1 -1
  335. package/date-range-picker/time-offset.js.map +1 -1
  336. package/date-range-picker/utils.d.ts +9 -0
  337. package/date-range-picker/utils.d.ts.map +1 -1
  338. package/date-range-picker/utils.js +19 -2
  339. package/date-range-picker/utils.js.map +1 -1
  340. package/drawer/implementation.d.ts +2 -1
  341. package/drawer/implementation.d.ts.map +1 -1
  342. package/drawer/implementation.js.map +1 -1
  343. package/drawer/interfaces.d.ts +2 -1
  344. package/drawer/interfaces.d.ts.map +1 -1
  345. package/drawer/interfaces.js.map +1 -1
  346. package/drawer/styles.css.js +5 -5
  347. package/drawer/styles.scoped.css +16 -12
  348. package/drawer/styles.selectors.js +5 -5
  349. package/expandable-section/expandable-section-container.d.ts +2 -1
  350. package/expandable-section/expandable-section-container.d.ts.map +1 -1
  351. package/expandable-section/expandable-section-container.js.map +1 -1
  352. package/expandable-section/expandable-section-header.d.ts +0 -1
  353. package/expandable-section/expandable-section-header.d.ts.map +1 -1
  354. package/expandable-section/expandable-section-header.js +1 -1
  355. package/expandable-section/expandable-section-header.js.map +1 -1
  356. package/expandable-section/internal.d.ts +2 -1
  357. package/expandable-section/internal.d.ts.map +1 -1
  358. package/expandable-section/internal.js.map +1 -1
  359. package/expandable-section/styles.css.js +34 -34
  360. package/expandable-section/styles.scoped.css +69 -65
  361. package/expandable-section/styles.selectors.js +34 -34
  362. package/file-dropzone/styles.css.js +3 -3
  363. package/file-dropzone/styles.scoped.css +9 -5
  364. package/file-dropzone/styles.selectors.js +3 -3
  365. package/file-input/internal.d.ts +5 -1
  366. package/file-input/internal.d.ts.map +1 -1
  367. package/file-input/internal.js +18 -10
  368. package/file-input/internal.js.map +1 -1
  369. package/file-input/styles.css.js +6 -5
  370. package/file-input/styles.scoped.css +33 -8
  371. package/file-input/styles.selectors.js +6 -5
  372. package/file-token-group/file-token.d.ts +1 -1
  373. package/file-token-group/file-token.d.ts.map +1 -1
  374. package/file-token-group/file-token.js.map +1 -1
  375. package/file-token-group/styles.css.js +22 -22
  376. package/file-token-group/styles.scoped.css +35 -31
  377. package/file-token-group/styles.selectors.js +22 -22
  378. package/file-upload/interfaces.d.ts +0 -5
  379. package/file-upload/interfaces.d.ts.map +1 -1
  380. package/file-upload/interfaces.js.map +1 -1
  381. package/flashbar/analytics-metadata/interfaces.d.ts +0 -6
  382. package/flashbar/analytics-metadata/interfaces.d.ts.map +1 -1
  383. package/flashbar/analytics-metadata/interfaces.js.map +1 -1
  384. package/flashbar/collapsible-flashbar.d.ts +0 -1
  385. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  386. package/flashbar/collapsible-flashbar.js.map +1 -1
  387. package/flashbar/flash.d.ts +2 -1
  388. package/flashbar/flash.d.ts.map +1 -1
  389. package/flashbar/flash.js.map +1 -1
  390. package/flashbar/non-collapsible-flashbar.d.ts +0 -1
  391. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  392. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  393. package/flashbar/styles.css.js +50 -50
  394. package/flashbar/styles.scoped.css +152 -148
  395. package/flashbar/styles.selectors.js +50 -50
  396. package/flashbar/utils.d.ts +2 -1
  397. package/flashbar/utils.d.ts.map +1 -1
  398. package/flashbar/utils.js.map +1 -1
  399. package/form/styles.css.js +8 -8
  400. package/form/styles.scoped.css +12 -8
  401. package/form/styles.selectors.js +8 -8
  402. package/form-field/styles.css.js +24 -24
  403. package/form-field/styles.scoped.css +42 -38
  404. package/form-field/styles.selectors.js +24 -24
  405. package/grid/internal.d.ts +1 -1
  406. package/grid/internal.d.ts.map +1 -1
  407. package/grid/internal.js.map +1 -1
  408. package/grid/styles.css.js +53 -53
  409. package/grid/styles.scoped.css +58 -54
  410. package/grid/styles.selectors.js +53 -53
  411. package/header/styles.css.js +34 -34
  412. package/header/styles.scoped.css +56 -52
  413. package/header/styles.selectors.js +34 -34
  414. package/help-panel/implementation.d.ts +2 -1
  415. package/help-panel/implementation.d.ts.map +1 -1
  416. package/help-panel/implementation.js.map +1 -1
  417. package/help-panel/styles.css.js +6 -6
  418. package/help-panel/styles.scoped.css +73 -69
  419. package/help-panel/styles.selectors.js +6 -6
  420. package/hotspot/styles.css.js +7 -7
  421. package/hotspot/styles.scoped.css +13 -9
  422. package/hotspot/styles.selectors.js +7 -7
  423. package/i18n/context.d.ts +1 -1
  424. package/i18n/context.d.ts.map +1 -1
  425. package/i18n/context.js.map +1 -1
  426. package/i18n/messages/all.all.js +1 -1
  427. package/i18n/messages/all.all.json +1 -1
  428. package/i18n/messages/all.ar.js +1 -1
  429. package/i18n/messages/all.ar.json +1 -1
  430. package/i18n/messages/all.de.js +1 -1
  431. package/i18n/messages/all.de.json +1 -1
  432. package/i18n/messages/all.en-GB.js +1 -1
  433. package/i18n/messages/all.en-GB.json +1 -1
  434. package/i18n/messages/all.en.js +1 -1
  435. package/i18n/messages/all.en.json +1 -1
  436. package/i18n/messages/all.es.js +1 -1
  437. package/i18n/messages/all.es.json +1 -1
  438. package/i18n/messages/all.fr.js +1 -1
  439. package/i18n/messages/all.fr.json +1 -1
  440. package/i18n/messages/all.id.js +1 -1
  441. package/i18n/messages/all.id.json +1 -1
  442. package/i18n/messages/all.it.js +1 -1
  443. package/i18n/messages/all.it.json +1 -1
  444. package/i18n/messages/all.ja.js +1 -1
  445. package/i18n/messages/all.ja.json +1 -1
  446. package/i18n/messages/all.ko.js +1 -1
  447. package/i18n/messages/all.ko.json +1 -1
  448. package/i18n/messages/all.pt-BR.js +1 -1
  449. package/i18n/messages/all.pt-BR.json +1 -1
  450. package/i18n/messages/all.tr.js +1 -1
  451. package/i18n/messages/all.tr.json +1 -1
  452. package/i18n/messages/all.zh-CN.js +1 -1
  453. package/i18n/messages/all.zh-CN.json +1 -1
  454. package/i18n/messages/all.zh-TW.js +1 -1
  455. package/i18n/messages/all.zh-TW.json +1 -1
  456. package/i18n/messages-types.d.ts +3 -0
  457. package/i18n/messages-types.d.ts.map +1 -1
  458. package/i18n/messages-types.js.map +1 -1
  459. package/i18n/testing.d.ts +2 -1
  460. package/i18n/testing.d.ts.map +1 -1
  461. package/i18n/testing.js.map +1 -1
  462. package/icon/styles.css.js +38 -38
  463. package/icon/styles.scoped.css +89 -85
  464. package/icon/styles.selectors.js +38 -38
  465. package/input/styles.css.js +13 -13
  466. package/input/styles.scoped.css +36 -32
  467. package/input/styles.selectors.js +13 -13
  468. package/internal/analytics/components/analytics-funnel.d.ts +0 -1
  469. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  470. package/internal/analytics/components/analytics-funnel.js +1 -1
  471. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  472. package/internal/analytics/interfaces.d.ts +17 -24
  473. package/internal/analytics/interfaces.d.ts.map +1 -1
  474. package/internal/analytics/interfaces.js.map +1 -1
  475. package/internal/analytics/selectors.d.ts +1 -1
  476. package/internal/analytics/selectors.d.ts.map +1 -1
  477. package/internal/analytics/selectors.js +2 -1
  478. package/internal/analytics/selectors.js.map +1 -1
  479. package/internal/components/abstract-switch/styles.css.js +13 -13
  480. package/internal/components/abstract-switch/styles.scoped.css +24 -20
  481. package/internal/components/abstract-switch/styles.selectors.js +13 -13
  482. package/internal/components/autosuggest-input/index.d.ts +2 -2
  483. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  484. package/internal/components/autosuggest-input/index.js.map +1 -1
  485. package/internal/components/button-trigger/styles.css.js +13 -13
  486. package/internal/components/button-trigger/styles.scoped.css +31 -27
  487. package/internal/components/button-trigger/styles.selectors.js +13 -13
  488. package/internal/components/cartesian-chart/highlighted-point.d.ts +1 -1
  489. package/internal/components/cartesian-chart/highlighted-point.d.ts.map +1 -1
  490. package/internal/components/cartesian-chart/highlighted-point.js.map +1 -1
  491. package/internal/components/cartesian-chart/scales.d.ts +4 -5
  492. package/internal/components/cartesian-chart/scales.d.ts.map +1 -1
  493. package/internal/components/cartesian-chart/scales.js +1 -1
  494. package/internal/components/cartesian-chart/scales.js.map +1 -1
  495. package/internal/components/cartesian-chart/vertical-marker.d.ts +1 -1
  496. package/internal/components/cartesian-chart/vertical-marker.d.ts.map +1 -1
  497. package/internal/components/cartesian-chart/vertical-marker.js.map +1 -1
  498. package/internal/components/chart-filter/index.d.ts +1 -1
  499. package/internal/components/chart-filter/index.d.ts.map +1 -1
  500. package/internal/components/chart-filter/index.js.map +1 -1
  501. package/internal/components/chart-filter/styles.css.js +3 -3
  502. package/internal/components/chart-filter/styles.scoped.css +7 -3
  503. package/internal/components/chart-filter/styles.selectors.js +3 -3
  504. package/internal/components/chart-legend/index.d.ts +1 -1
  505. package/internal/components/chart-legend/index.d.ts.map +1 -1
  506. package/internal/components/chart-legend/index.js.map +1 -1
  507. package/internal/components/chart-legend/styles.css.js +6 -6
  508. package/internal/components/chart-legend/styles.scoped.css +19 -15
  509. package/internal/components/chart-legend/styles.selectors.js +6 -6
  510. package/internal/components/chart-plot/application-controller.d.ts +1 -1
  511. package/internal/components/chart-plot/application-controller.d.ts.map +1 -1
  512. package/internal/components/chart-plot/application-controller.js.map +1 -1
  513. package/internal/components/chart-plot/focus-outline.d.ts +2 -1
  514. package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
  515. package/internal/components/chart-plot/focus-outline.js.map +1 -1
  516. package/internal/components/chart-plot/index.d.ts +1 -1
  517. package/internal/components/chart-plot/index.d.ts.map +1 -1
  518. package/internal/components/chart-plot/index.js.map +1 -1
  519. package/internal/components/chart-plot/styles.css.js +5 -5
  520. package/internal/components/chart-plot/styles.scoped.css +9 -5
  521. package/internal/components/chart-plot/styles.selectors.js +5 -5
  522. package/internal/components/chart-popover/index.d.ts +1 -1
  523. package/internal/components/chart-popover/index.d.ts.map +1 -1
  524. package/internal/components/chart-popover/index.js.map +1 -1
  525. package/internal/components/chart-popover/styles.css.js +3 -3
  526. package/internal/components/chart-popover/styles.scoped.css +7 -3
  527. package/internal/components/chart-popover/styles.selectors.js +3 -3
  528. package/internal/components/chart-series-details/index.d.ts +1 -1
  529. package/internal/components/chart-series-details/index.d.ts.map +1 -1
  530. package/internal/components/chart-series-details/index.js.map +1 -1
  531. package/internal/components/chart-series-details/styles.css.js +20 -20
  532. package/internal/components/chart-series-details/styles.scoped.css +37 -33
  533. package/internal/components/chart-series-details/styles.selectors.js +20 -20
  534. package/internal/components/chart-series-marker/styles.css.js +5 -5
  535. package/internal/components/chart-series-marker/styles.scoped.css +11 -7
  536. package/internal/components/chart-series-marker/styles.selectors.js +5 -5
  537. package/internal/components/chart-wrapper/styles.css.js +9 -9
  538. package/internal/components/chart-wrapper/styles.scoped.css +15 -11
  539. package/internal/components/chart-wrapper/styles.selectors.js +9 -9
  540. package/internal/components/checkbox-icon/index.d.ts +1 -10
  541. package/internal/components/checkbox-icon/index.d.ts.map +1 -1
  542. package/internal/components/checkbox-icon/index.js +1 -1
  543. package/internal/components/checkbox-icon/index.js.map +1 -1
  544. package/internal/components/checkbox-icon/styles.css.js +9 -9
  545. package/internal/components/checkbox-icon/styles.scoped.css +13 -9
  546. package/internal/components/checkbox-icon/styles.selectors.js +9 -9
  547. package/internal/components/dnd-container/index.d.ts +28 -0
  548. package/internal/components/dnd-container/index.d.ts.map +1 -0
  549. package/internal/components/dnd-container/index.js +67 -0
  550. package/internal/components/dnd-container/index.js.map +1 -0
  551. package/internal/components/dnd-container/interfaces.d.ts +13 -0
  552. package/internal/components/dnd-container/interfaces.d.ts.map +1 -0
  553. package/internal/components/dnd-container/interfaces.js +4 -0
  554. package/internal/components/dnd-container/interfaces.js.map +1 -0
  555. package/internal/components/dnd-container/keyboard-sensor/defaults.d.ts.map +1 -0
  556. package/internal/components/dnd-container/keyboard-sensor/defaults.js.map +1 -0
  557. package/internal/components/dnd-container/keyboard-sensor/index.d.ts.map +1 -0
  558. package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/index.js +1 -1
  559. package/internal/components/dnd-container/keyboard-sensor/index.js.map +1 -0
  560. package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts +7 -0
  561. package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts.map +1 -0
  562. package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/events.js +0 -4
  563. package/internal/components/dnd-container/keyboard-sensor/utilities/events.js.map +1 -0
  564. package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
  565. package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.js.map +1 -0
  566. package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts +8 -0
  567. package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
  568. package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/scroll.js +2 -2
  569. package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.js.map +1 -0
  570. package/internal/components/dnd-container/styles.css.js +6 -0
  571. package/internal/components/dnd-container/styles.scoped.css +172 -0
  572. package/internal/components/dnd-container/styles.selectors.js +7 -0
  573. package/{collection-preferences/content-display → internal/components/dnd-container}/use-drag-and-drop-reorder.d.ts +2 -4
  574. package/internal/components/dnd-container/use-drag-and-drop-reorder.d.ts.map +1 -0
  575. package/{collection-preferences/content-display → internal/components/dnd-container}/use-drag-and-drop-reorder.js +4 -4
  576. package/internal/components/dnd-container/use-drag-and-drop-reorder.js.map +1 -0
  577. package/internal/components/dnd-container/use-live-announcements.d.ts +11 -0
  578. package/internal/components/dnd-container/use-live-announcements.d.ts.map +1 -0
  579. package/{collection-preferences/content-display → internal/components/dnd-container}/use-live-announcements.js +6 -6
  580. package/internal/components/dnd-container/use-live-announcements.js.map +1 -0
  581. package/internal/components/dropdown/dropdown-fit-handler.d.ts +0 -30
  582. package/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
  583. package/internal/components/dropdown/dropdown-fit-handler.js +4 -4
  584. package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
  585. package/internal/components/dropdown/styles.css.js +20 -20
  586. package/internal/components/dropdown/styles.scoped.css +41 -37
  587. package/internal/components/dropdown/styles.selectors.js +20 -20
  588. package/internal/components/dropdown-footer/styles.css.js +3 -3
  589. package/internal/components/dropdown-footer/styles.scoped.css +7 -3
  590. package/internal/components/dropdown-footer/styles.selectors.js +3 -3
  591. package/internal/components/dropdown-status/styles.css.js +2 -2
  592. package/internal/components/dropdown-status/styles.scoped.css +6 -2
  593. package/internal/components/dropdown-status/styles.selectors.js +2 -2
  594. package/internal/components/focus-lock/utils.d.ts +0 -1
  595. package/internal/components/focus-lock/utils.d.ts.map +1 -1
  596. package/internal/components/focus-lock/utils.js +1 -1
  597. package/internal/components/focus-lock/utils.js.map +1 -1
  598. package/internal/components/handle/styles.css.js +2 -2
  599. package/internal/components/handle/styles.scoped.css +10 -6
  600. package/internal/components/handle/styles.selectors.js +2 -2
  601. package/internal/components/masked-input/index.d.ts +1 -2
  602. package/internal/components/masked-input/index.d.ts.map +1 -1
  603. package/internal/components/masked-input/index.js +0 -1
  604. package/internal/components/masked-input/index.js.map +1 -1
  605. package/internal/components/masked-input/utils/mask-format.d.ts +1 -1
  606. package/internal/components/masked-input/utils/mask-format.d.ts.map +1 -1
  607. package/internal/components/masked-input/utils/mask-format.js.map +1 -1
  608. package/internal/components/menu-dropdown/index.d.ts.map +1 -1
  609. package/internal/components/menu-dropdown/index.js +2 -1
  610. package/internal/components/menu-dropdown/index.js.map +1 -1
  611. package/internal/components/menu-dropdown/styles.css.js +7 -7
  612. package/internal/components/menu-dropdown/styles.scoped.css +17 -13
  613. package/internal/components/menu-dropdown/styles.selectors.js +7 -7
  614. package/internal/components/option/highlight-match.d.ts +2 -1
  615. package/internal/components/option/highlight-match.d.ts.map +1 -1
  616. package/internal/components/option/highlight-match.js.map +1 -1
  617. package/internal/components/option/interfaces.d.ts +3 -2
  618. package/internal/components/option/interfaces.d.ts.map +1 -1
  619. package/internal/components/option/interfaces.js.map +1 -1
  620. package/internal/components/option/styles.css.js +17 -17
  621. package/internal/components/option/styles.scoped.css +33 -29
  622. package/internal/components/option/styles.selectors.js +17 -17
  623. package/internal/components/options-list/styles.css.js +3 -3
  624. package/internal/components/options-list/styles.scoped.css +7 -3
  625. package/internal/components/options-list/styles.selectors.js +3 -3
  626. package/internal/components/options-list/utils/use-highlight-option.d.ts +2 -1
  627. package/internal/components/options-list/utils/use-highlight-option.d.ts.map +1 -1
  628. package/internal/components/options-list/utils/use-highlight-option.js +2 -2
  629. package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
  630. package/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
  631. package/internal/components/options-list/utils/use-keyboard.js +13 -16
  632. package/internal/components/options-list/utils/use-keyboard.js.map +1 -1
  633. package/internal/components/panel-resize-handle/styles.css.js +5 -5
  634. package/internal/components/panel-resize-handle/styles.scoped.css +14 -10
  635. package/internal/components/panel-resize-handle/styles.selectors.js +5 -5
  636. package/internal/components/screenreader-only/index.d.ts +2 -1
  637. package/internal/components/screenreader-only/index.d.ts.map +1 -1
  638. package/internal/components/screenreader-only/index.js.map +1 -1
  639. package/internal/components/screenreader-only/styles.css.js +1 -1
  640. package/internal/components/screenreader-only/styles.scoped.css +5 -1
  641. package/internal/components/screenreader-only/styles.selectors.js +1 -1
  642. package/internal/components/selectable-item/styles.css.js +16 -16
  643. package/internal/components/selectable-item/styles.scoped.css +33 -29
  644. package/internal/components/selectable-item/styles.selectors.js +16 -16
  645. package/internal/components/tab-trap/index.d.ts +2 -1
  646. package/internal/components/tab-trap/index.d.ts.map +1 -1
  647. package/internal/components/tab-trap/index.js.map +1 -1
  648. package/internal/components/token-list/styles.css.js +10 -10
  649. package/internal/components/token-list/styles.scoped.css +28 -24
  650. package/internal/components/token-list/styles.selectors.js +10 -10
  651. package/internal/components/transition/index.d.ts +2 -1
  652. package/internal/components/transition/index.d.ts.map +1 -1
  653. package/internal/components/transition/index.js.map +1 -1
  654. package/internal/context/single-tab-stop-navigation-context.d.ts +2 -4
  655. package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
  656. package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
  657. package/internal/context/table-component-context.d.ts +2 -2
  658. package/internal/context/table-component-context.d.ts.map +1 -1
  659. package/internal/context/table-component-context.js +1 -1
  660. package/internal/context/table-component-context.js.map +1 -1
  661. package/internal/environment.js +1 -1
  662. package/internal/environment.json +1 -1
  663. package/internal/hooks/forward-focus/radio-group.d.ts +2 -1
  664. package/internal/hooks/forward-focus/radio-group.d.ts.map +1 -1
  665. package/internal/hooks/forward-focus/radio-group.js.map +1 -1
  666. package/internal/hooks/use-dynamic-overlap/index.d.ts +2 -1
  667. package/internal/hooks/use-dynamic-overlap/index.d.ts.map +1 -1
  668. package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
  669. package/internal/hooks/use-performance-marks/index.d.ts.map +1 -1
  670. package/internal/hooks/use-performance-marks/index.js +23 -2
  671. package/internal/hooks/use-performance-marks/index.js.map +1 -1
  672. package/internal/keycode.d.ts +1 -5
  673. package/internal/keycode.d.ts.map +1 -1
  674. package/internal/keycode.js +0 -4
  675. package/internal/keycode.js.map +1 -1
  676. package/internal/manifest.json +1 -1
  677. package/internal/plugins/controllers/action-buttons.d.ts +1 -1
  678. package/internal/plugins/controllers/action-buttons.d.ts.map +1 -1
  679. package/internal/plugins/controllers/action-buttons.js.map +1 -1
  680. package/internal/plugins/controllers/alert-flash-content.d.ts +3 -3
  681. package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
  682. package/internal/plugins/controllers/alert-flash-content.js.map +1 -1
  683. package/internal/plugins/controllers/app-layout-widget.d.ts +1 -1
  684. package/internal/plugins/controllers/app-layout-widget.d.ts.map +1 -1
  685. package/internal/plugins/controllers/app-layout-widget.js.map +1 -1
  686. package/internal/plugins/controllers/drawers.d.ts +4 -4
  687. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  688. package/internal/plugins/controllers/drawers.js.map +1 -1
  689. package/internal/styles/motion/utils.d.ts +2 -0
  690. package/internal/styles/motion/utils.d.ts.map +1 -0
  691. package/internal/styles/motion/utils.js +5 -0
  692. package/internal/styles/motion/utils.js.map +1 -0
  693. package/internal/utils/date-time/format-date-iso.d.ts +2 -1
  694. package/internal/utils/date-time/format-date-iso.d.ts.map +1 -1
  695. package/internal/utils/date-time/format-date-iso.js +6 -2
  696. package/internal/utils/date-time/format-date-iso.js.map +1 -1
  697. package/internal/utils/date-time/format-date-localized.d.ts +2 -1
  698. package/internal/utils/date-time/format-date-localized.d.ts.map +1 -1
  699. package/internal/utils/date-time/format-date-localized.js +9 -2
  700. package/internal/utils/date-time/format-date-localized.js.map +1 -1
  701. package/internal/utils/date-time/format-date-time-with-offset.d.ts.map +1 -1
  702. package/internal/utils/date-time/format-date-time-with-offset.js +4 -3
  703. package/internal/utils/date-time/format-date-time-with-offset.js.map +1 -1
  704. package/internal/utils/date-time/index.d.ts +1 -1
  705. package/internal/utils/date-time/index.d.ts.map +1 -1
  706. package/internal/utils/date-time/index.js +1 -1
  707. package/internal/utils/date-time/index.js.map +1 -1
  708. package/internal/utils/date-time/is-iso-only.d.ts +9 -0
  709. package/internal/utils/date-time/is-iso-only.d.ts.map +1 -0
  710. package/internal/utils/date-time/is-iso-only.js +18 -0
  711. package/internal/utils/date-time/is-iso-only.js.map +1 -0
  712. package/key-value-pairs/styles.css.js +8 -8
  713. package/key-value-pairs/styles.scoped.css +13 -9
  714. package/key-value-pairs/styles.selectors.js +8 -8
  715. package/link/styles.css.js +20 -20
  716. package/link/styles.scoped.css +75 -71
  717. package/link/styles.selectors.js +20 -20
  718. package/live-region/internal.d.ts +1 -1
  719. package/live-region/internal.d.ts.map +1 -1
  720. package/live-region/internal.js.map +1 -1
  721. package/live-region/styles.css.js +2 -2
  722. package/live-region/styles.scoped.css +7 -3
  723. package/live-region/styles.selectors.js +2 -2
  724. package/mixed-line-bar-chart/bar-groups.d.ts +2 -1
  725. package/mixed-line-bar-chart/bar-groups.d.ts.map +1 -1
  726. package/mixed-line-bar-chart/bar-groups.js.map +1 -1
  727. package/mixed-line-bar-chart/bar-series.d.ts +2 -1
  728. package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
  729. package/mixed-line-bar-chart/bar-series.js.map +1 -1
  730. package/mixed-line-bar-chart/data-series.d.ts +2 -1
  731. package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
  732. package/mixed-line-bar-chart/data-series.js.map +1 -1
  733. package/mixed-line-bar-chart/interfaces.d.ts +0 -2
  734. package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  735. package/mixed-line-bar-chart/interfaces.js.map +1 -1
  736. package/mixed-line-bar-chart/line-series.d.ts +2 -1
  737. package/mixed-line-bar-chart/line-series.d.ts.map +1 -1
  738. package/mixed-line-bar-chart/line-series.js.map +1 -1
  739. package/mixed-line-bar-chart/styles.css.js +11 -11
  740. package/mixed-line-bar-chart/styles.scoped.css +23 -19
  741. package/mixed-line-bar-chart/styles.selectors.js +11 -11
  742. package/modal/index.d.ts.map +1 -1
  743. package/modal/index.js +8 -2
  744. package/modal/index.js.map +1 -1
  745. package/modal/styles.css.js +23 -23
  746. package/modal/styles.scoped.css +42 -38
  747. package/modal/styles.selectors.js +23 -23
  748. package/multiselect/analytics-metadata/interfaces.d.ts +0 -4
  749. package/multiselect/analytics-metadata/interfaces.d.ts.map +1 -1
  750. package/multiselect/analytics-metadata/interfaces.js.map +1 -1
  751. package/multiselect/styles.css.js +3 -3
  752. package/multiselect/styles.scoped.css +7 -3
  753. package/multiselect/styles.selectors.js +3 -3
  754. package/package.json +1 -1
  755. package/pagination/styles.css.js +9 -9
  756. package/pagination/styles.scoped.css +27 -23
  757. package/pagination/styles.selectors.js +9 -9
  758. package/pie-chart/interfaces.d.ts +2 -1
  759. package/pie-chart/interfaces.d.ts.map +1 -1
  760. package/pie-chart/interfaces.js.map +1 -1
  761. package/pie-chart/labels.d.ts +1 -1
  762. package/pie-chart/labels.d.ts.map +1 -1
  763. package/pie-chart/labels.js.map +1 -1
  764. package/pie-chart/pie-chart.d.ts +2 -7
  765. package/pie-chart/pie-chart.d.ts.map +1 -1
  766. package/pie-chart/pie-chart.js.map +1 -1
  767. package/pie-chart/styles.css.js +27 -27
  768. package/pie-chart/styles.scoped.css +52 -48
  769. package/pie-chart/styles.selectors.js +27 -27
  770. package/popover/arrow.d.ts +1 -1
  771. package/popover/arrow.d.ts.map +1 -1
  772. package/popover/arrow.js.map +1 -1
  773. package/popover/container.d.ts +2 -1
  774. package/popover/container.d.ts.map +1 -1
  775. package/popover/container.js.map +1 -1
  776. package/popover/styles.css.js +53 -53
  777. package/popover/styles.scoped.css +89 -69
  778. package/popover/styles.selectors.js +53 -53
  779. package/progress-bar/styles.css.js +19 -19
  780. package/progress-bar/styles.scoped.css +42 -34
  781. package/progress-bar/styles.selectors.js +19 -19
  782. package/prompt-input/internal.d.ts +1 -1
  783. package/prompt-input/internal.d.ts.map +1 -1
  784. package/prompt-input/internal.js.map +1 -1
  785. package/prompt-input/styles.css.js +14 -14
  786. package/prompt-input/styles.scoped.css +43 -39
  787. package/prompt-input/styles.selectors.js +14 -14
  788. package/property-filter/analytics-metadata/interfaces.d.ts +0 -15
  789. package/property-filter/analytics-metadata/interfaces.d.ts.map +1 -1
  790. package/property-filter/analytics-metadata/interfaces.js.map +1 -1
  791. package/property-filter/controller.d.ts +0 -1
  792. package/property-filter/controller.d.ts.map +1 -1
  793. package/property-filter/controller.js +1 -1
  794. package/property-filter/controller.js.map +1 -1
  795. package/property-filter/filtering-token/styles.css.js +18 -18
  796. package/property-filter/filtering-token/styles.scoped.css +45 -41
  797. package/property-filter/filtering-token/styles.selectors.js +18 -18
  798. package/property-filter/interfaces.d.ts +1 -6
  799. package/property-filter/interfaces.d.ts.map +1 -1
  800. package/property-filter/interfaces.js.map +1 -1
  801. package/property-filter/internal.d.ts +0 -2
  802. package/property-filter/internal.d.ts.map +1 -1
  803. package/property-filter/internal.js.map +1 -1
  804. package/property-filter/styles.css.js +39 -39
  805. package/property-filter/styles.scoped.css +45 -41
  806. package/property-filter/styles.selectors.js +39 -39
  807. package/property-filter/utils.d.ts +0 -1
  808. package/property-filter/utils.d.ts.map +1 -1
  809. package/property-filter/utils.js +1 -1
  810. package/property-filter/utils.js.map +1 -1
  811. package/radio-group/styles.css.js +10 -10
  812. package/radio-group/styles.scoped.css +20 -16
  813. package/radio-group/styles.selectors.js +10 -10
  814. package/s3-resource-selector/s3-modal/basic-table.d.ts +0 -6
  815. package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
  816. package/s3-resource-selector/s3-modal/basic-table.js +2 -1
  817. package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
  818. package/s3-resource-selector/s3-modal/styles.css.js +3 -3
  819. package/s3-resource-selector/s3-modal/styles.scoped.css +9 -5
  820. package/s3-resource-selector/s3-modal/styles.selectors.js +3 -3
  821. package/segmented-control/segment.d.ts +2 -1
  822. package/segmented-control/segment.d.ts.map +1 -1
  823. package/segmented-control/segment.js.map +1 -1
  824. package/segmented-control/styles.css.js +15 -15
  825. package/segmented-control/styles.scoped.css +38 -34
  826. package/segmented-control/styles.selectors.js +15 -15
  827. package/select/analytics-metadata/interfaces.d.ts +0 -4
  828. package/select/analytics-metadata/interfaces.d.ts.map +1 -1
  829. package/select/analytics-metadata/interfaces.js.map +1 -1
  830. package/select/parts/filter.d.ts +1 -1
  831. package/select/parts/styles.css.js +21 -21
  832. package/select/parts/styles.scoped.css +26 -22
  833. package/select/parts/styles.selectors.js +21 -21
  834. package/select/styles.css.js +1 -1
  835. package/select/styles.scoped.css +5 -1
  836. package/select/styles.selectors.js +1 -1
  837. package/select/utils/render-options.d.ts +2 -1
  838. package/select/utils/render-options.d.ts.map +1 -1
  839. package/select/utils/render-options.js.map +1 -1
  840. package/select/utils/use-native-search.d.ts +0 -1
  841. package/select/utils/use-native-search.d.ts.map +1 -1
  842. package/select/utils/use-native-search.js +1 -1
  843. package/select/utils/use-native-search.js.map +1 -1
  844. package/select/utils/use-select.js +1 -1
  845. package/select/utils/use-select.js.map +1 -1
  846. package/side-navigation/analytics-metadata/interfaces.d.ts +0 -2
  847. package/side-navigation/analytics-metadata/interfaces.d.ts.map +1 -1
  848. package/side-navigation/analytics-metadata/interfaces.js.map +1 -1
  849. package/side-navigation/implementation.d.ts +2 -1
  850. package/side-navigation/implementation.d.ts.map +1 -1
  851. package/side-navigation/implementation.js.map +1 -1
  852. package/side-navigation/parts.d.ts +2 -2
  853. package/side-navigation/parts.d.ts.map +1 -1
  854. package/side-navigation/parts.js.map +1 -1
  855. package/side-navigation/styles.css.js +30 -30
  856. package/side-navigation/styles.scoped.css +50 -46
  857. package/side-navigation/styles.selectors.js +30 -30
  858. package/slider/internal.d.ts +2 -1
  859. package/slider/internal.d.ts.map +1 -1
  860. package/slider/internal.js.map +1 -1
  861. package/slider/slider-labels.d.ts +2 -1
  862. package/slider/slider-labels.d.ts.map +1 -1
  863. package/slider/slider-labels.js.map +1 -1
  864. package/slider/styles.css.js +26 -26
  865. package/slider/styles.scoped.css +80 -76
  866. package/slider/styles.selectors.js +26 -26
  867. package/slider/tick-marks.d.ts +2 -4
  868. package/slider/tick-marks.d.ts.map +1 -1
  869. package/slider/tick-marks.js.map +1 -1
  870. package/space-between/styles.css.js +23 -23
  871. package/space-between/styles.scoped.css +28 -24
  872. package/space-between/styles.selectors.js +23 -23
  873. package/spinner/styles.css.js +13 -13
  874. package/spinner/styles.scoped.css +23 -19
  875. package/spinner/styles.selectors.js +13 -13
  876. package/split-panel/bottom.d.ts.map +1 -1
  877. package/split-panel/bottom.js +13 -3
  878. package/split-panel/bottom.js.map +1 -1
  879. package/split-panel/icons/styles.css.js +22 -22
  880. package/split-panel/icons/styles.scoped.css +28 -24
  881. package/split-panel/icons/styles.selectors.js +22 -22
  882. package/split-panel/implementation.js +1 -1
  883. package/split-panel/implementation.js.map +1 -1
  884. package/split-panel/styles.css.js +26 -26
  885. package/split-panel/styles.scoped.css +47 -48
  886. package/split-panel/styles.selectors.js +26 -26
  887. package/status-indicator/styles.css.js +23 -23
  888. package/status-indicator/styles.scoped.css +33 -29
  889. package/status-indicator/styles.selectors.js +23 -23
  890. package/steps/internal.d.ts +1 -1
  891. package/steps/internal.d.ts.map +1 -1
  892. package/steps/internal.js +1 -1
  893. package/steps/internal.js.map +1 -1
  894. package/steps/styles.css.js +6 -6
  895. package/steps/styles.scoped.css +13 -9
  896. package/steps/styles.selectors.js +6 -6
  897. package/table/body-cell/styles.css.js +46 -46
  898. package/table/body-cell/styles.scoped.css +296 -292
  899. package/table/body-cell/styles.selectors.js +46 -46
  900. package/table/expandable-rows/styles.css.js +3 -3
  901. package/table/expandable-rows/styles.scoped.css +17 -13
  902. package/table/expandable-rows/styles.selectors.js +3 -3
  903. package/table/header-cell/styles.css.js +26 -26
  904. package/table/header-cell/styles.scoped.css +69 -65
  905. package/table/header-cell/styles.selectors.js +26 -26
  906. package/table/header-cell/th-element.d.ts +2 -1
  907. package/table/header-cell/th-element.d.ts.map +1 -1
  908. package/table/header-cell/th-element.js +2 -2
  909. package/table/header-cell/th-element.js.map +1 -1
  910. package/table/interfaces.d.ts +17 -5
  911. package/table/interfaces.d.ts.map +1 -1
  912. package/table/interfaces.js.map +1 -1
  913. package/table/internal.d.ts.map +1 -1
  914. package/table/internal.js +15 -6
  915. package/table/internal.js.map +1 -1
  916. package/table/progressive-loading/items-loader.d.ts +8 -2
  917. package/table/progressive-loading/items-loader.d.ts.map +1 -1
  918. package/table/progressive-loading/items-loader.js +11 -5
  919. package/table/progressive-loading/items-loader.js.map +1 -1
  920. package/table/progressive-loading/loader-cell.d.ts +2 -2
  921. package/table/progressive-loading/loader-cell.d.ts.map +1 -1
  922. package/table/progressive-loading/loader-cell.js +2 -2
  923. package/table/progressive-loading/loader-cell.js.map +1 -1
  924. package/table/progressive-loading/progressive-loading-utils.d.ts.map +1 -1
  925. package/table/progressive-loading/progressive-loading-utils.js +2 -2
  926. package/table/progressive-loading/progressive-loading-utils.js.map +1 -1
  927. package/table/resizer/styles.css.js +8 -8
  928. package/table/resizer/styles.scoped.css +19 -15
  929. package/table/resizer/styles.selectors.js +8 -8
  930. package/table/selection/interfaces.d.ts +1 -0
  931. package/table/selection/interfaces.d.ts.map +1 -1
  932. package/table/selection/interfaces.js.map +1 -1
  933. package/table/selection/selection-cell.d.ts.map +1 -1
  934. package/table/selection/selection-cell.js +4 -3
  935. package/table/selection/selection-cell.js.map +1 -1
  936. package/table/selection/styles.css.js +3 -3
  937. package/table/selection/styles.scoped.css +7 -3
  938. package/table/selection/styles.selectors.js +3 -3
  939. package/table/selection/use-selection.js +1 -0
  940. package/table/selection/use-selection.js.map +1 -1
  941. package/table/selection/utils.d.ts +0 -1
  942. package/table/selection/utils.d.ts.map +1 -1
  943. package/table/selection/utils.js +1 -1
  944. package/table/selection/utils.js.map +1 -1
  945. package/table/sticky-columns/use-sticky-columns.d.ts +1 -21
  946. package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
  947. package/table/sticky-columns/use-sticky-columns.js +1 -1
  948. package/table/sticky-columns/use-sticky-columns.js.map +1 -1
  949. package/table/sticky-scrollbar/styles.css.js +6 -6
  950. package/table/sticky-scrollbar/styles.scoped.css +14 -10
  951. package/table/sticky-scrollbar/styles.selectors.js +6 -6
  952. package/table/styles.css.js +34 -34
  953. package/table/styles.scoped.css +45 -41
  954. package/table/styles.selectors.js +34 -34
  955. package/table/table-role/grid-navigation.js +10 -0
  956. package/table/table-role/grid-navigation.js.map +1 -1
  957. package/table/table-role/index.d.ts +1 -1
  958. package/table/table-role/index.d.ts.map +1 -1
  959. package/table/table-role/index.js.map +1 -1
  960. package/table/use-cell-editing.d.ts +1 -1
  961. package/table/use-cell-editing.d.ts.map +1 -1
  962. package/table/use-cell-editing.js.map +1 -1
  963. package/tabs/styles.css.js +28 -28
  964. package/tabs/styles.scoped.css +57 -49
  965. package/tabs/styles.selectors.js +28 -28
  966. package/tabs/tab-header-bar.d.ts +2 -1
  967. package/tabs/tab-header-bar.d.ts.map +1 -1
  968. package/tabs/tab-header-bar.js.map +1 -1
  969. package/tag-editor/internal.d.ts +2 -1
  970. package/tag-editor/internal.d.ts.map +1 -1
  971. package/tag-editor/internal.js.map +1 -1
  972. package/tag-editor/styles.css.js +3 -3
  973. package/tag-editor/styles.scoped.css +14 -10
  974. package/tag-editor/styles.selectors.js +3 -3
  975. package/test-utils/dom/anchor-navigation/index.d.ts +2 -1
  976. package/test-utils/dom/anchor-navigation/index.js +0 -2
  977. package/test-utils/dom/anchor-navigation/index.js.map +1 -1
  978. package/test-utils/dom/autosuggest/index.d.ts +0 -3
  979. package/test-utils/dom/autosuggest/index.js +1 -2
  980. package/test-utils/dom/autosuggest/index.js.map +1 -1
  981. package/test-utils/dom/button-group/index.d.ts +5 -0
  982. package/test-utils/dom/button-group/index.js +16 -7
  983. package/test-utils/dom/button-group/index.js.map +1 -1
  984. package/test-utils/dom/cards/index.d.ts +3 -2
  985. package/test-utils/dom/cards/index.js +0 -3
  986. package/test-utils/dom/cards/index.js.map +1 -1
  987. package/test-utils/dom/key-value-pairs/index.d.ts +3 -2
  988. package/test-utils/dom/key-value-pairs/index.js +0 -3
  989. package/test-utils/dom/key-value-pairs/index.js.map +1 -1
  990. package/test-utils/dom/steps/index.d.ts +2 -1
  991. package/test-utils/dom/steps/index.js +0 -2
  992. package/test-utils/dom/steps/index.js.map +1 -1
  993. package/test-utils/dom/tabs/index.d.ts +2 -1
  994. package/test-utils/dom/tabs/index.js +0 -2
  995. package/test-utils/dom/tabs/index.js.map +1 -1
  996. package/test-utils/dom/tag-editor/index.d.ts +2 -1
  997. package/test-utils/dom/tag-editor/index.js +0 -2
  998. package/test-utils/dom/tag-editor/index.js.map +1 -1
  999. package/test-utils/selectors/anchor-navigation/index.d.ts +2 -1
  1000. package/test-utils/selectors/anchor-navigation/index.js +0 -2
  1001. package/test-utils/selectors/anchor-navigation/index.js.map +1 -1
  1002. package/test-utils/selectors/autosuggest/index.d.ts +0 -3
  1003. package/test-utils/selectors/autosuggest/index.js +1 -2
  1004. package/test-utils/selectors/autosuggest/index.js.map +1 -1
  1005. package/test-utils/selectors/button-group/index.d.ts +5 -0
  1006. package/test-utils/selectors/button-group/index.js +16 -7
  1007. package/test-utils/selectors/button-group/index.js.map +1 -1
  1008. package/test-utils/selectors/cards/index.d.ts +3 -2
  1009. package/test-utils/selectors/cards/index.js +0 -3
  1010. package/test-utils/selectors/cards/index.js.map +1 -1
  1011. package/test-utils/selectors/key-value-pairs/index.d.ts +3 -2
  1012. package/test-utils/selectors/key-value-pairs/index.js +0 -3
  1013. package/test-utils/selectors/key-value-pairs/index.js.map +1 -1
  1014. package/test-utils/selectors/steps/index.d.ts +2 -1
  1015. package/test-utils/selectors/steps/index.js +0 -2
  1016. package/test-utils/selectors/steps/index.js.map +1 -1
  1017. package/test-utils/selectors/tabs/index.d.ts +2 -1
  1018. package/test-utils/selectors/tabs/index.js +0 -2
  1019. package/test-utils/selectors/tabs/index.js.map +1 -1
  1020. package/test-utils/selectors/tag-editor/index.d.ts +2 -1
  1021. package/test-utils/selectors/tag-editor/index.js +0 -2
  1022. package/test-utils/selectors/tag-editor/index.js.map +1 -1
  1023. package/test-utils/tsconfig.tsbuildinfo +1 -1
  1024. package/text-content/styles.css.js +1 -1
  1025. package/text-content/styles.scoped.css +64 -60
  1026. package/text-content/styles.selectors.js +1 -1
  1027. package/text-filter/analytics-metadata/interfaces.d.ts +0 -2
  1028. package/text-filter/analytics-metadata/interfaces.d.ts.map +1 -1
  1029. package/text-filter/analytics-metadata/interfaces.js.map +1 -1
  1030. package/text-filter/styles.css.js +3 -3
  1031. package/text-filter/styles.scoped.css +7 -3
  1032. package/text-filter/styles.selectors.js +3 -3
  1033. package/textarea/styles.css.js +5 -5
  1034. package/textarea/styles.scoped.css +18 -14
  1035. package/textarea/styles.selectors.js +5 -5
  1036. package/tiles/styles.css.js +30 -30
  1037. package/tiles/styles.scoped.css +77 -73
  1038. package/tiles/styles.selectors.js +30 -30
  1039. package/toggle/styles.css.js +10 -10
  1040. package/toggle/styles.scoped.css +21 -17
  1041. package/toggle/styles.selectors.js +10 -10
  1042. package/toggle-button/internal.d.ts +0 -1
  1043. package/toggle-button/internal.d.ts.map +1 -1
  1044. package/toggle-button/internal.js +0 -1
  1045. package/toggle-button/internal.js.map +1 -1
  1046. package/token-group/analytics-metadata/interfaces.d.ts +0 -2
  1047. package/token-group/analytics-metadata/interfaces.d.ts.map +1 -1
  1048. package/token-group/analytics-metadata/interfaces.js.map +1 -1
  1049. package/token-group/styles.css.js +8 -8
  1050. package/token-group/styles.scoped.css +20 -16
  1051. package/token-group/styles.selectors.js +8 -8
  1052. package/top-navigation/1.0-beta/internal.d.ts +2 -1
  1053. package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
  1054. package/top-navigation/1.0-beta/internal.js.map +1 -1
  1055. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts +2 -1
  1056. package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +1 -1
  1057. package/top-navigation/1.0-beta/parts/overflow-menu.js.map +1 -1
  1058. package/top-navigation/1.0-beta/styles.css.js +23 -25
  1059. package/top-navigation/1.0-beta/styles.scoped.css +40 -66
  1060. package/top-navigation/1.0-beta/styles.selectors.js +23 -25
  1061. package/top-navigation/1.0-beta/use-top-navigation.d.ts +4 -24
  1062. package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +1 -1
  1063. package/top-navigation/1.0-beta/use-top-navigation.js +2 -2
  1064. package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
  1065. package/top-navigation/internal.d.ts +2 -1
  1066. package/top-navigation/internal.d.ts.map +1 -1
  1067. package/top-navigation/internal.js.map +1 -1
  1068. package/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
  1069. package/top-navigation/parts/overflow-menu/menu-item.js +3 -2
  1070. package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
  1071. package/top-navigation/parts/overflow-menu/router.d.ts +1 -10
  1072. package/top-navigation/parts/overflow-menu/router.d.ts.map +1 -1
  1073. package/top-navigation/parts/overflow-menu/router.js +1 -1
  1074. package/top-navigation/parts/overflow-menu/router.js.map +1 -1
  1075. package/top-navigation/styles.css.js +47 -47
  1076. package/top-navigation/styles.scoped.css +78 -85
  1077. package/top-navigation/styles.selectors.js +47 -47
  1078. package/top-navigation/use-top-navigation.d.ts +4 -3
  1079. package/top-navigation/use-top-navigation.d.ts.map +1 -1
  1080. package/top-navigation/use-top-navigation.js.map +1 -1
  1081. package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  1082. package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +27 -23
  1083. package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  1084. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +2 -1
  1085. package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
  1086. package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
  1087. package/tutorial-panel/components/tutorial-list/index.d.ts +2 -1
  1088. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  1089. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  1090. package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  1091. package/tutorial-panel/components/tutorial-list/styles.scoped.css +33 -29
  1092. package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  1093. package/tutorial-panel/styles.css.js +1 -1
  1094. package/tutorial-panel/styles.scoped.css +7 -3
  1095. package/tutorial-panel/styles.selectors.js +1 -1
  1096. package/wizard/analytics-metadata/interfaces.d.ts +0 -21
  1097. package/wizard/analytics-metadata/interfaces.d.ts.map +1 -1
  1098. package/wizard/analytics-metadata/interfaces.js.map +1 -1
  1099. package/wizard/styles.css.js +30 -30
  1100. package/wizard/styles.scoped.css +62 -58
  1101. package/wizard/styles.selectors.js +30 -30
  1102. package/wizard/wizard-form.d.ts +1 -4
  1103. package/wizard/wizard-form.d.ts.map +1 -1
  1104. package/wizard/wizard-form.js +1 -1
  1105. package/wizard/wizard-form.js.map +1 -1
  1106. package/calendar/utils/navigation.d.ts.map +0 -1
  1107. package/calendar/utils/navigation.js +0 -73
  1108. package/calendar/utils/navigation.js.map +0 -1
  1109. package/collection-preferences/content-display/draggable-option.d.ts +0 -9
  1110. package/collection-preferences/content-display/draggable-option.d.ts.map +0 -1
  1111. package/collection-preferences/content-display/draggable-option.js +0 -27
  1112. package/collection-preferences/content-display/draggable-option.js.map +0 -1
  1113. package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts.map +0 -1
  1114. package/collection-preferences/content-display/keyboard-sensor/defaults.js.map +0 -1
  1115. package/collection-preferences/content-display/keyboard-sensor/index.d.ts.map +0 -1
  1116. package/collection-preferences/content-display/keyboard-sensor/index.js.map +0 -1
  1117. package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts +0 -11
  1118. package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts.map +0 -1
  1119. package/collection-preferences/content-display/keyboard-sensor/utilities/events.js.map +0 -1
  1120. package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
  1121. package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js.map +0 -1
  1122. package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts +0 -30
  1123. package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
  1124. package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js.map +0 -1
  1125. package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts.map +0 -1
  1126. package/collection-preferences/content-display/use-drag-and-drop-reorder.js.map +0 -1
  1127. package/collection-preferences/content-display/use-live-announcements.d.ts +0 -12
  1128. package/collection-preferences/content-display/use-live-announcements.d.ts.map +0 -1
  1129. package/collection-preferences/content-display/use-live-announcements.js.map +0 -1
  1130. package/internal/hooks/use-mutation-observer/index.d.ts +0 -8
  1131. package/internal/hooks/use-mutation-observer/index.d.ts.map +0 -1
  1132. package/internal/hooks/use-mutation-observer/index.js +0 -26
  1133. package/internal/hooks/use-mutation-observer/index.js.map +0 -1
  1134. package/internal/utils/date-time/is-iso-date-only.d.ts +0 -5
  1135. package/internal/utils/date-time/is-iso-date-only.d.ts.map +0 -1
  1136. package/internal/utils/date-time/is-iso-date-only.js +0 -10
  1137. package/internal/utils/date-time/is-iso-date-only.js.map +0 -1
  1138. /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/defaults.d.ts +0 -0
  1139. /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/defaults.js +0 -0
  1140. /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/index.d.ts +0 -0
  1141. /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/listeners.d.ts +0 -0
  1142. /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/listeners.js +0 -0
@@ -136,62 +136,58 @@
136
136
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
137
137
  SPDX-License-Identifier: Apache-2.0
138
138
  */
139
+ /*
140
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
141
+ SPDX-License-Identifier: Apache-2.0
142
+ */
139
143
  /* Style used for links in slots/components that are text heavy, to help links stand out among
140
144
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
141
- .awsui_button-dropdown_sne0l_1nhyq_141:not(#\9) {
145
+ .awsui_button-dropdown_sne0l_1r0xx_145:not(#\9) {
142
146
  display: inline-block;
143
147
  }
148
+ .awsui_button-dropdown_sne0l_1r0xx_145.awsui_full-width_sne0l_1r0xx_148:not(#\9) {
149
+ inline-size: 100%;
150
+ display: block;
151
+ }
144
152
 
145
- .awsui_items-list-container_sne0l_1nhyq_145:not(#\9) {
153
+ .awsui_items-list-container_sne0l_1r0xx_153:not(#\9) {
146
154
  padding-block: 0;
147
155
  padding-inline: 0;
148
156
  margin-block: 0;
149
157
  margin-inline: 0;
150
- animation: awsui_awsui-motion-fade-in-0_sne0l_1nhyq_1 500ms var(--motion-easing-show-quick-vc5zgd, ease-out);
158
+ animation: awsui_awsui-motion-fade-in-0_sne0l_1r0xx_1 500ms var(--motion-easing-show-quick-vc5zgd, ease-out);
151
159
  animation-fill-mode: none;
152
160
  }
153
161
  @media (prefers-reduced-motion: reduce) {
154
- .awsui_items-list-container_sne0l_1nhyq_145:not(#\9) {
155
- animation: none;
156
- transition: none;
157
- }
158
- }
159
- .awsui-motion-disabled .awsui_items-list-container_sne0l_1nhyq_145:not(#\9), .awsui-mode-entering .awsui_items-list-container_sne0l_1nhyq_145:not(#\9) {
160
- animation: none;
161
- transition: none;
162
- }
163
-
164
- .awsui_rotate-up_sne0l_1nhyq_164:not(#\9) {
165
- transform: rotate(-180deg);
166
- transition: transform var(--motion-duration-rotate-180-dpvl4m, 135ms) var(--motion-easing-rotate-180-e270ko, cubic-bezier(0.165, 0.84, 0.44, 1));
167
- }
168
- @media (prefers-reduced-motion: reduce) {
169
- .awsui_rotate-up_sne0l_1nhyq_164:not(#\9) {
162
+ .awsui_items-list-container_sne0l_1r0xx_153:not(#\9) {
170
163
  animation: none;
171
164
  transition: none;
172
165
  }
173
166
  }
174
- .awsui-motion-disabled .awsui_rotate-up_sne0l_1nhyq_164:not(#\9), .awsui-mode-entering .awsui_rotate-up_sne0l_1nhyq_164:not(#\9) {
167
+ .awsui-motion-disabled .awsui_items-list-container_sne0l_1r0xx_153:not(#\9), .awsui-mode-entering .awsui_items-list-container_sne0l_1r0xx_153:not(#\9) {
175
168
  animation: none;
176
169
  transition: none;
177
170
  }
178
171
 
179
- .awsui_rotate-down_sne0l_1nhyq_179:not(#\9) {
172
+ .awsui_rotate_sne0l_1r0xx_172:not(#\9) {
180
173
  transform: rotate(0deg);
181
174
  transition: transform var(--motion-duration-rotate-180-dpvl4m, 135ms) var(--motion-easing-rotate-180-e270ko, cubic-bezier(0.165, 0.84, 0.44, 1));
182
175
  }
183
176
  @media (prefers-reduced-motion: reduce) {
184
- .awsui_rotate-down_sne0l_1nhyq_179:not(#\9) {
177
+ .awsui_rotate_sne0l_1r0xx_172:not(#\9) {
185
178
  animation: none;
186
179
  transition: none;
187
180
  }
188
181
  }
189
- .awsui-motion-disabled .awsui_rotate-down_sne0l_1nhyq_179:not(#\9), .awsui-mode-entering .awsui_rotate-down_sne0l_1nhyq_179:not(#\9) {
182
+ .awsui-motion-disabled .awsui_rotate_sne0l_1r0xx_172:not(#\9), .awsui-mode-entering .awsui_rotate_sne0l_1r0xx_172:not(#\9) {
190
183
  animation: none;
191
184
  transition: none;
192
185
  }
186
+ .awsui_rotate-open_sne0l_1r0xx_186:not(#\9) {
187
+ transform: rotate(-180deg);
188
+ }
193
189
 
194
- .awsui_header_sne0l_1nhyq_194:not(#\9) {
190
+ .awsui_header_sne0l_1r0xx_190:not(#\9) {
195
191
  display: flex;
196
192
  flex-direction: column;
197
193
  list-style: none;
@@ -202,52 +198,69 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
202
198
  border-inline: var(--border-width-field-h1g7tw, 2px) solid transparent;
203
199
  }
204
200
 
205
- .awsui_title_sne0l_1nhyq_205:not(#\9),
206
- .awsui_description_sne0l_1nhyq_206:not(#\9) {
201
+ .awsui_title_sne0l_1r0xx_201:not(#\9),
202
+ .awsui_description_sne0l_1r0xx_202:not(#\9) {
207
203
  color: var(--color-text-top-navigation-title-v9cb3m, #0f141a);
208
204
  }
209
205
 
210
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210:not(#\9) {
206
+ .awsui_trigger-button_sne0l_1r0xx_206.awsui_full-width_sne0l_1r0xx_148:not(#\9) {
207
+ display: grid;
208
+ grid-template-columns: 1fr auto;
209
+ }
210
+ .awsui_trigger-button_sne0l_1r0xx_206.awsui_full-width_sne0l_1r0xx_148.awsui_loading_sne0l_1r0xx_210:not(#\9) {
211
+ grid-template-columns: auto 1fr auto;
212
+ }
213
+
214
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214:not(#\9) {
211
215
  display: flex;
212
216
  }
213
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213 > .awsui_trigger-button_sne0l_1nhyq_213:not(#\9):focus, .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213 > .awsui_trigger-button_sne0l_1nhyq_213:not(#\9):hover {
217
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217 > .awsui_trigger-button_sne0l_1r0xx_206:not(#\9):focus, .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217 > .awsui_trigger-button_sne0l_1r0xx_206:not(#\9):hover {
214
218
  z-index: 1;
215
219
  }
216
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1nhyq_213 {
220
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1r0xx_206 {
217
221
  border-start-end-radius: 0;
218
222
  border-end-end-radius: 0;
219
223
  padding-inline-end: var(--space-m-udix3p, 16px);
220
224
  margin-inline-end: var(--space-xxxs-zbmxqb, 2px);
221
225
  }
222
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1nhyq_213.awsui_has-no-text_sne0l_1nhyq_222 {
226
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1r0xx_206.awsui_has-no-text_sne0l_1r0xx_226 {
223
227
  padding-inline: var(--space-button-icon-only-horizontal-zsf2nw, 6px);
224
228
  }
225
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1nhyq_213.awsui_has-no-text_sne0l_1nhyq_222.awsui_visual-refresh_sne0l_1nhyq_225 {
229
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1r0xx_206.awsui_has-no-text_sne0l_1r0xx_226.awsui_visual-refresh_sne0l_1r0xx_229 {
226
230
  padding-inline-start: calc(var(--space-s-34lx8l, 12px) - 2px);
227
231
  }
228
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_1nhyq_213 {
232
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_1r0xx_206 {
229
233
  border-start-start-radius: 0;
230
234
  border-end-start-radius: 0;
231
235
  padding-inline: calc(var(--space-xs-zb16t3, 8px) - 2px);
232
236
  }
233
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213:not(#\9):not(:first-child).awsui_visual-refresh_sne0l_1nhyq_225 > .awsui_trigger-button_sne0l_1nhyq_213 {
237
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217:not(#\9):not(:first-child).awsui_visual-refresh_sne0l_1r0xx_229 > .awsui_trigger-button_sne0l_1r0xx_206 {
234
238
  padding-inline-end: calc(var(--space-s-34lx8l, 12px) - 2px);
235
239
  }
236
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213.awsui_variant-normal_sne0l_1nhyq_236:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1nhyq_213 {
240
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217.awsui_variant-normal_sne0l_1r0xx_240:not(#\9):not(:last-child) > .awsui_trigger-button_sne0l_1r0xx_206 {
237
241
  margin-inline-end: 0;
238
242
  }
239
- .awsui_split-trigger-wrapper_sne0l_1nhyq_210 > .awsui_trigger-item_sne0l_1nhyq_213.awsui_variant-normal_sne0l_1nhyq_236:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_1nhyq_213 {
243
+ .awsui_split-trigger-wrapper_sne0l_1r0xx_214 > .awsui_trigger-item_sne0l_1r0xx_217.awsui_variant-normal_sne0l_1r0xx_240:not(#\9):not(:first-child) > .awsui_trigger-button_sne0l_1r0xx_206 {
240
244
  margin-inline-start: calc(var(--border-width-field-h1g7tw, 2px) * -1);
241
245
  }
242
246
 
243
- .awsui_split-trigger_sne0l_1nhyq_210:not(#\9) {
247
+ .awsui_split-trigger_sne0l_1r0xx_214:not(#\9) {
244
248
  display: contents;
245
249
  }
246
250
 
247
- .awsui_dropdown-trigger_sne0l_1nhyq_247:not(#\9) {
251
+ .awsui_dropdown-trigger_sne0l_1r0xx_251:not(#\9) {
248
252
  display: contents;
249
253
  }
250
254
 
251
- .awsui_test-utils-button-trigger_sne0l_1nhyq_251:not(#\9) {
255
+ .awsui_main-action-full-width_sne0l_1r0xx_255:not(#\9) {
256
+ flex: 1 1 0;
257
+ text-align: center;
258
+ }
259
+
260
+ .awsui_main-action-trigger-full-width_sne0l_1r0xx_260:not(#\9) {
261
+ flex: 0 0 auto;
262
+ }
263
+
264
+ .awsui_test-utils-button-trigger_sne0l_1r0xx_264:not(#\9) {
252
265
  /* used in test-utils */
253
266
  }
@@ -2,22 +2,26 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "button-dropdown": "awsui_button-dropdown_sne0l_1nhyq_141",
6
- "items-list-container": "awsui_items-list-container_sne0l_1nhyq_145",
7
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_sne0l_1nhyq_1",
8
- "rotate-up": "awsui_rotate-up_sne0l_1nhyq_164",
9
- "rotate-down": "awsui_rotate-down_sne0l_1nhyq_179",
10
- "header": "awsui_header_sne0l_1nhyq_194",
11
- "title": "awsui_title_sne0l_1nhyq_205",
12
- "description": "awsui_description_sne0l_1nhyq_206",
13
- "split-trigger-wrapper": "awsui_split-trigger-wrapper_sne0l_1nhyq_210",
14
- "trigger-item": "awsui_trigger-item_sne0l_1nhyq_213",
15
- "trigger-button": "awsui_trigger-button_sne0l_1nhyq_213",
16
- "has-no-text": "awsui_has-no-text_sne0l_1nhyq_222",
17
- "visual-refresh": "awsui_visual-refresh_sne0l_1nhyq_225",
18
- "variant-normal": "awsui_variant-normal_sne0l_1nhyq_236",
19
- "split-trigger": "awsui_split-trigger_sne0l_1nhyq_210",
20
- "dropdown-trigger": "awsui_dropdown-trigger_sne0l_1nhyq_247",
21
- "test-utils-button-trigger": "awsui_test-utils-button-trigger_sne0l_1nhyq_251"
5
+ "button-dropdown": "awsui_button-dropdown_sne0l_1r0xx_145",
6
+ "full-width": "awsui_full-width_sne0l_1r0xx_148",
7
+ "items-list-container": "awsui_items-list-container_sne0l_1r0xx_153",
8
+ "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_sne0l_1r0xx_1",
9
+ "rotate": "awsui_rotate_sne0l_1r0xx_172",
10
+ "rotate-open": "awsui_rotate-open_sne0l_1r0xx_186",
11
+ "header": "awsui_header_sne0l_1r0xx_190",
12
+ "title": "awsui_title_sne0l_1r0xx_201",
13
+ "description": "awsui_description_sne0l_1r0xx_202",
14
+ "trigger-button": "awsui_trigger-button_sne0l_1r0xx_206",
15
+ "loading": "awsui_loading_sne0l_1r0xx_210",
16
+ "split-trigger-wrapper": "awsui_split-trigger-wrapper_sne0l_1r0xx_214",
17
+ "trigger-item": "awsui_trigger-item_sne0l_1r0xx_217",
18
+ "has-no-text": "awsui_has-no-text_sne0l_1r0xx_226",
19
+ "visual-refresh": "awsui_visual-refresh_sne0l_1r0xx_229",
20
+ "variant-normal": "awsui_variant-normal_sne0l_1r0xx_240",
21
+ "split-trigger": "awsui_split-trigger_sne0l_1r0xx_214",
22
+ "dropdown-trigger": "awsui_dropdown-trigger_sne0l_1r0xx_251",
23
+ "main-action-full-width": "awsui_main-action-full-width_sne0l_1r0xx_255",
24
+ "main-action-trigger-full-width": "awsui_main-action-trigger-full-width_sne0l_1r0xx_260",
25
+ "test-utils-button-trigger": "awsui_test-utils-button-trigger_sne0l_1r0xx_264"
22
26
  };
23
27
 
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- export interface TooltipProps {
2
+ interface TooltipProps {
3
3
  children?: React.ReactNode;
4
4
  content?: React.ReactNode;
5
5
  position?: 'top' | 'right' | 'bottom' | 'left';
6
6
  className?: string;
7
7
  }
8
8
  export default function Tooltip({ children, content, position, className }: TooltipProps): JSX.Element;
9
+ export {};
9
10
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAUtE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,eAsCjG"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAUtE,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAkB,EAAE,SAAS,EAAE,EAAE,YAAY,eAsCjG"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/button-dropdown/tooltip.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAwB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEjF,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC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AM,GAAG,MAAM,EAAU,CAAC;IAChC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7B,SAAS,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;IACF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC;IACF,MAAM,SAAS,GAAyB,CAAC,CAAC,EAAE;QAC1C,IAAI,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;YAC7B,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,KAAK,EAAE,CAAC;SACT;IACH,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,WAAW,CAAC;IAC5B,MAAM,MAAM,GAAG,KAAK,CAAC;IAErB,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,YAAY,EAAE;YACZ,MAAM;YACN,OAAO;YACP,SAAS;SACV;KACF,CAAC;AACJ,CAAC;AAED,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEventHandler, useRef, useState } from 'react';\n\nimport { useReducedMotion } from '@cloudscape-design/component-toolkit/internal';\n\nimport Portal from '../internal/components/portal';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport Arrow from '../popover/arrow';\nimport PopoverBody from '../popover/body';\nimport PopoverContainer from '../popover/container';\n\nexport interface TooltipProps {\n children?: React.ReactNode;\n content?: React.ReactNode;\n position?: 'top' | 'right' | 'bottom' | 'left';\n className?: string;\n}\n\nconst DEFAULT_OPEN_TIMEOUT_IN_MS = 120;\n\nexport default function Tooltip({ children, content, position = 'right', className }: TooltipProps) {\n const ref = useRef<HTMLSpanElement | null>(null);\n const isReducedMotion = useReducedMotion(ref);\n const { open, triggerProps } = useTooltipOpen(isReducedMotion ? 0 : DEFAULT_OPEN_TIMEOUT_IN_MS);\n const portalClasses = usePortalModeClasses(ref);\n\n return (\n <span ref={ref} {...triggerProps} className={className}>\n {children}\n {open && (\n <Portal>\n <span className={portalClasses}>\n <PopoverContainer\n size=\"small\"\n fixedWidth={false}\n position={position}\n trackRef={ref}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={true}\n zIndex={7000}\n >\n <PopoverBody\n dismissButton={false}\n dismissAriaLabel={undefined}\n header={null}\n onDismiss={() => {}}\n overflowVisible=\"both\"\n >\n <span data-testid=\"button-dropdown-disabled-reason\" role=\"tooltip\">\n {content}\n </span>\n </PopoverBody>\n </PopoverContainer>\n </span>\n </Portal>\n )}\n </span>\n );\n}\n\nfunction useTooltipOpen(timeout: number) {\n const handle = useRef<number>();\n const [isOpen, setIsOpen] = useState(false);\n\n const close = () => {\n clearTimeout(handle.current);\n setIsOpen(false);\n };\n const open = () => setIsOpen(true);\n const openDelayed = () => {\n handle.current = setTimeout(open, timeout);\n };\n const onKeyDown: KeyboardEventHandler = e => {\n if (isOpen && isEscape(e.key)) {\n e.preventDefault();\n e.stopPropagation();\n close();\n }\n };\n\n const onFocus = openDelayed;\n const onBlur = close;\n\n return {\n open: isOpen,\n triggerProps: {\n onBlur,\n onFocus,\n onKeyDown,\n },\n };\n}\n\nconst isEscape = (key: string) => key === 'Escape' || key === 'Esc';\n"]}
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/button-dropdown/tooltip.tsx"],"names":[],"mappings":"AA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E,EAAE,CAAC,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { KeyboardEventHandler, useRef, useState } from 'react';\n\nimport { useReducedMotion } from '@cloudscape-design/component-toolkit/internal';\n\nimport Portal from '../internal/components/portal';\nimport { usePortalModeClasses } from '../internal/hooks/use-portal-mode-classes';\nimport Arrow from '../popover/arrow';\nimport PopoverBody from '../popover/body';\nimport PopoverContainer from '../popover/container';\n\ninterface TooltipProps {\n children?: React.ReactNode;\n content?: React.ReactNode;\n position?: 'top' | 'right' | 'bottom' | 'left';\n className?: string;\n}\n\nconst DEFAULT_OPEN_TIMEOUT_IN_MS = 120;\n\nexport default function Tooltip({ children, content, position = 'right', className }: TooltipProps) {\n const ref = useRef<HTMLSpanElement | null>(null);\n const isReducedMotion = useReducedMotion(ref);\n const { open, triggerProps } = useTooltipOpen(isReducedMotion ? 0 : DEFAULT_OPEN_TIMEOUT_IN_MS);\n const portalClasses = usePortalModeClasses(ref);\n\n return (\n <span ref={ref} {...triggerProps} className={className}>\n {children}\n {open && (\n <Portal>\n <span className={portalClasses}>\n <PopoverContainer\n size=\"small\"\n fixedWidth={false}\n position={position}\n trackRef={ref}\n arrow={position => <Arrow position={position} />}\n renderWithPortal={true}\n zIndex={7000}\n >\n <PopoverBody\n dismissButton={false}\n dismissAriaLabel={undefined}\n header={null}\n onDismiss={() => {}}\n overflowVisible=\"both\"\n >\n <span data-testid=\"button-dropdown-disabled-reason\" role=\"tooltip\">\n {content}\n </span>\n </PopoverBody>\n </PopoverContainer>\n </span>\n </Portal>\n )}\n </span>\n );\n}\n\nfunction useTooltipOpen(timeout: number) {\n const handle = useRef<number>();\n const [isOpen, setIsOpen] = useState(false);\n\n const close = () => {\n clearTimeout(handle.current);\n setIsOpen(false);\n };\n const open = () => setIsOpen(true);\n const openDelayed = () => {\n handle.current = setTimeout(open, timeout);\n };\n const onKeyDown: KeyboardEventHandler = e => {\n if (isOpen && isEscape(e.key)) {\n e.preventDefault();\n e.stopPropagation();\n close();\n }\n };\n\n const onFocus = openDelayed;\n const onBlur = close;\n\n return {\n open: isOpen,\n triggerProps: {\n onBlur,\n onFocus,\n onKeyDown,\n },\n };\n}\n\nconst isEscape = (key: string) => key === 'Escape' || key === 'Esc';\n"]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export interface GetMenuItemPropsParams {
2
+ interface GetMenuItemPropsParams {
3
3
  disabled: boolean;
4
4
  parent?: boolean;
5
5
  expanded?: boolean;
@@ -8,8 +8,9 @@ export interface GetMenuItemPropsParams {
8
8
  * @returns attributes for a menuitem widget given parameters
9
9
  */
10
10
  export declare const getMenuItemProps: (params: GetMenuItemPropsParams) => React.HTMLProps<HTMLElement>;
11
- export interface GetMenuItemCheckboxPropsParams extends GetMenuItemPropsParams {
11
+ interface GetMenuItemCheckboxPropsParams extends GetMenuItemPropsParams {
12
12
  checked: boolean;
13
13
  }
14
14
  export declare const getMenuItemCheckboxProps: (params: GetMenuItemCheckboxPropsParams) => React.HTMLProps<HTMLElement>;
15
+ export {};
15
16
  //# sourceMappingURL=menu-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/button-dropdown/utils/menu-item.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC,WAAW,CAS5F,CAAC;AAEH,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;IAC5E,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,KAAK,CAAC,SAAS,CAAC,WAAW,CAO5G,CAAC"}
1
+ {"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/button-dropdown/utils/menu-item.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC,WAAW,CAS5F,CAAC;AAEH,UAAU,8BAA+B,SAAQ,sBAAsB;IACrE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,wBAAwB,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,KAAK,CAAC,SAAS,CAAC,WAAW,CAO5G,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"menu-item.js","sourceRoot":"","sources":["../../../../src/button-dropdown/utils/menu-item.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqE,CAAC,EACjG,QAAQ,EACR,MAAM,EACN,QAAQ,GACe,EAAE,EAAE,CAAC,CAAC;IAC7B,IAAI,EAAE,UAAU;IAChB,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;IAC9C,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;IAC5C,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;CAClE,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,wBAAwB,GAA6E,CAAC,EACjH,QAAQ,EACR,OAAO,GACwB,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE,kBAAkB;IACxB,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;IAC9C,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;CAC3C,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\nexport interface GetMenuItemPropsParams {\n disabled: boolean;\n parent?: boolean;\n expanded?: boolean;\n}\n/**\n * @returns attributes for a menuitem widget given parameters\n */\nexport const getMenuItemProps: (params: GetMenuItemPropsParams) => React.HTMLProps<HTMLElement> = ({\n disabled,\n parent,\n expanded,\n}: GetMenuItemPropsParams) => ({\n role: 'menuitem',\n 'aria-disabled': disabled ? 'true' : undefined,\n 'aria-haspopup': parent ? 'true' : undefined,\n 'aria-expanded': expanded ? 'true' : parent ? 'false' : undefined,\n});\n\nexport interface GetMenuItemCheckboxPropsParams extends GetMenuItemPropsParams {\n checked: boolean;\n}\n\nexport const getMenuItemCheckboxProps: (params: GetMenuItemCheckboxPropsParams) => React.HTMLProps<HTMLElement> = ({\n disabled,\n checked,\n}: GetMenuItemCheckboxPropsParams) => ({\n role: 'menuitemcheckbox',\n 'aria-disabled': disabled ? 'true' : undefined,\n 'aria-checked': checked ? 'true' : 'false',\n});\n"]}
1
+ {"version":3,"file":"menu-item.js","sourceRoot":"","sources":["../../../../src/button-dropdown/utils/menu-item.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqE,CAAC,EACjG,QAAQ,EACR,MAAM,EACN,QAAQ,GACe,EAAE,EAAE,CAAC,CAAC;IAC7B,IAAI,EAAE,UAAU;IAChB,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;IAC9C,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;IAC5C,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;CAClE,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,wBAAwB,GAA6E,CAAC,EACjH,QAAQ,EACR,OAAO,GACwB,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE,kBAAkB;IACxB,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;IAC9C,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;CAC3C,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\ninterface GetMenuItemPropsParams {\n disabled: boolean;\n parent?: boolean;\n expanded?: boolean;\n}\n/**\n * @returns attributes for a menuitem widget given parameters\n */\nexport const getMenuItemProps: (params: GetMenuItemPropsParams) => React.HTMLProps<HTMLElement> = ({\n disabled,\n parent,\n expanded,\n}: GetMenuItemPropsParams) => ({\n role: 'menuitem',\n 'aria-disabled': disabled ? 'true' : undefined,\n 'aria-haspopup': parent ? 'true' : undefined,\n 'aria-expanded': expanded ? 'true' : parent ? 'false' : undefined,\n});\n\ninterface GetMenuItemCheckboxPropsParams extends GetMenuItemPropsParams {\n checked: boolean;\n}\n\nexport const getMenuItemCheckboxProps: (params: GetMenuItemCheckboxPropsParams) => React.HTMLProps<HTMLElement> = ({\n disabled,\n checked,\n}: GetMenuItemCheckboxPropsParams) => ({\n role: 'menuitemcheckbox',\n 'aria-disabled': disabled ? 'true' : undefined,\n 'aria-checked': checked ? 'true' : 'false',\n});\n"]}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { FileInputProps } from '../file-input/interfaces.js';
3
+ import { CancelableEventHandler } from '../internal/events/index.js';
4
+ import { ButtonGroupProps } from './interfaces.js';
5
+ declare const FileInputItem: React.ForwardRefExoticComponent<{
6
+ item: ButtonGroupProps.IconFileInput;
7
+ showTooltip: boolean;
8
+ onFilesChange?: CancelableEventHandler<ButtonGroupProps.FilesChangeDetails> | undefined;
9
+ } & React.RefAttributes<FileInputProps.Ref>>;
10
+ export default FileInputItem;
11
+ //# sourceMappingURL=file-input-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-input-item.d.ts","sourceRoot":"","sources":["../../../src/button-group/file-input-item.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,OAAO,EAAE,sBAAsB,EAAuB,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,QAAA,MAAM,aAAa;UAOP,iBAAiB,aAAa;iBACvB,OAAO;;4CAyCzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,23 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React, { forwardRef, useState } from 'react';
4
+ import clsx from 'clsx';
5
+ import InternalFileInput from '../file-input/internal.js';
6
+ import Tooltip from '../internal/components/tooltip/index.js';
7
+ import { fireCancelableEvent } from '../internal/events/index.js';
8
+ import testUtilStyles from './test-classes/styles.css.js';
9
+ const FileInputItem = forwardRef(({ item, showTooltip, onFilesChange, }, ref) => {
10
+ const [files, setFiles] = useState([]);
11
+ const containerRef = React.useRef(null);
12
+ const canShowTooltip = Boolean(showTooltip);
13
+ return (React.createElement("div", { ref: containerRef },
14
+ React.createElement(InternalFileInput, { className: clsx(testUtilStyles['button-group-item']), ref: ref, variant: "icon", ariaLabel: item.text, accept: item.accept, multiple: item.multiple, value: files, onChange: event => {
15
+ fireCancelableEvent(onFilesChange, { id: item.id, files: event.detail.value });
16
+ setFiles(event.detail.value);
17
+ }, "data-testid": item.id, __inputNativeAttributes: {
18
+ 'data-itemid': item.id,
19
+ }, __inputClassName: testUtilStyles.item }),
20
+ canShowTooltip && (React.createElement(Tooltip, { trackRef: containerRef, trackKey: item.id, value: item.text, className: clsx(testUtilStyles.tooltip, testUtilStyles['button-group-tooltip']) }))));
21
+ });
22
+ export default FileInputItem;
23
+ //# sourceMappingURL=file-input-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-input-item.js","sourceRoot":"","sources":["../../../src/button-group/file-input-item.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,OAAO,MAAM,yCAAyC,CAAC;AAC9D,OAAO,EAA0B,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAG1F,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,MAAM,aAAa,GAAG,UAAU,CAC9B,CACE,EACE,IAAI,EACJ,WAAW,EACX,aAAa,GAKd,EACD,GAAkC,EAClC,EAAE;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAC/C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAExD,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAE5C,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY;QACpB,oBAAC,iBAAiB,IAChB,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,EACpD,GAAG,EAAE,GAAG,EACR,OAAO,EAAC,MAAM,EACd,SAAS,EAAE,IAAI,CAAC,IAAI,EACpB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAChB,mBAAmB,CAAC,aAAa,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;gBAC/E,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC,iBACY,IAAI,CAAC,EAAE,EACpB,uBAAuB,EAAE;gBACvB,aAAa,EAAE,IAAI,CAAC,EAAE;aACvB,EACD,gBAAgB,EAAE,cAAc,CAAC,IAAI,GACrC;QACD,cAAc,IAAI,CACjB,oBAAC,OAAO,IACN,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,IAAI,CAAC,EAAE,EACjB,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC,GAC/E,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { FileInputProps } from '../file-input/interfaces.js';\nimport InternalFileInput from '../file-input/internal.js';\nimport Tooltip from '../internal/components/tooltip/index.js';\nimport { CancelableEventHandler, fireCancelableEvent } from '../internal/events/index.js';\nimport { ButtonGroupProps } from './interfaces.js';\n\nimport testUtilStyles from './test-classes/styles.css.js';\n\nconst FileInputItem = forwardRef(\n (\n {\n item,\n showTooltip,\n onFilesChange,\n }: {\n item: ButtonGroupProps.IconFileInput;\n showTooltip: boolean;\n onFilesChange?: CancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;\n },\n ref: React.Ref<FileInputProps.Ref>\n ) => {\n const [files, setFiles] = useState<File[]>([]);\n const containerRef = React.useRef<HTMLDivElement>(null);\n\n const canShowTooltip = Boolean(showTooltip);\n\n return (\n <div ref={containerRef}>\n <InternalFileInput\n className={clsx(testUtilStyles['button-group-item'])}\n ref={ref}\n variant=\"icon\"\n ariaLabel={item.text}\n accept={item.accept}\n multiple={item.multiple}\n value={files}\n onChange={event => {\n fireCancelableEvent(onFilesChange, { id: item.id, files: event.detail.value });\n setFiles(event.detail.value);\n }}\n data-testid={item.id}\n __inputNativeAttributes={{\n 'data-itemid': item.id,\n }}\n __inputClassName={testUtilStyles.item}\n />\n {canShowTooltip && (\n <Tooltip\n trackRef={containerRef}\n trackKey={item.id}\n value={item.text}\n className={clsx(testUtilStyles.tooltip, testUtilStyles['button-group-tooltip'])}\n />\n )}\n </div>\n );\n }\n);\n\nexport default FileInputItem;\n"]}
@@ -62,6 +62,13 @@ export interface ButtonGroupProps extends BaseComponentProps {
62
62
  * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.
63
63
  * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.
64
64
  *
65
+ * * ### file-input
66
+ *
67
+ * * `id` (string) - The unique identifier of the button, used as detail in `onFilesChange`.
68
+ * * `text` (string) - The name of the menu button shown as a tooltip.
69
+ * * `accept` (optional, string) - Specifies the native file input `accept` attribute to describe the allow-list of file types.
70
+ * * `multiple` (optional, string) - Specifies the native file input `multiple` attribute to allow users entering more than one file.
71
+ *
65
72
  * ### menu-dropdown
66
73
  *
67
74
  * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.
@@ -81,13 +88,17 @@ export interface ButtonGroupProps extends BaseComponentProps {
81
88
  * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.
82
89
  */
83
90
  onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;
91
+ /**
92
+ * Called when the user uploads files. The event detail object contains the id and files from the file input item.
93
+ */
94
+ onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;
84
95
  }
85
96
  export interface InternalButtonGroupProps extends ButtonGroupProps, InternalBaseComponentProps {
86
97
  }
87
98
  export declare namespace ButtonGroupProps {
88
99
  type Variant = 'icon';
89
100
  type ItemOrGroup = Item | Group;
90
- type Item = IconButton | IconToggleButton | MenuDropdown;
101
+ type Item = IconButton | IconToggleButton | IconFileInput | MenuDropdown;
91
102
  interface IconButton {
92
103
  type: 'icon-button';
93
104
  id: string;
@@ -118,6 +129,13 @@ export declare namespace ButtonGroupProps {
118
129
  popoverFeedback?: React.ReactNode;
119
130
  pressedPopoverFeedback?: React.ReactNode;
120
131
  }
132
+ interface IconFileInput {
133
+ type: 'icon-file-input';
134
+ id: string;
135
+ text: string;
136
+ accept?: string;
137
+ multiple?: boolean;
138
+ }
121
139
  interface MenuDropdown {
122
140
  type: 'menu-dropdown';
123
141
  id: string;
@@ -137,6 +155,10 @@ export declare namespace ButtonGroupProps {
137
155
  pressed?: boolean;
138
156
  checked?: boolean;
139
157
  }
158
+ interface FilesChangeDetails {
159
+ id: string;
160
+ files: File[];
161
+ }
140
162
  interface Ref {
141
163
  /**
142
164
  * Focuses button group item by id.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,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O,CAAC,EAAE,OAAO,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;KACvD;IAED,UAAiB,KAAK;QACpB,IAAI,EAAE,OAAO,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;KAC7C;IAED,UAAiB,gBAAgB;QAC/B,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAED,UAAiB,kBAAkB;QACjC,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,IAAI,EAAE,CAAC;KACf;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface ButtonGroupProps extends BaseComponentProps {\n /**\n * Adds `aria-label` to the button group toolbar element.\n * Use this to provide a unique accessible name for each button group on the page.\n */\n ariaLabel?: string;\n /**\n * Determines the general styling of the button dropdown.\n * * `icon` for icon buttons.\n */\n variant: ButtonGroupProps.Variant;\n /**\n * Use this property to determine dropdown placement strategy for all menu dropdown items.\n *\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n dropdownExpandToViewport?: boolean;\n /**\n * Array of objects with a number of supported types.\n *\n * ### icon-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n *\n * ### icon-toggle-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `pressed` (boolean) - The toggle button pressed state.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `pressedIconName` (optional, string) - Specifies the name of the icon in pressed state, used with the [icon component](/components/icon/).\n * * `pressedIconUrl` (optional, string) - Specifies the URL of a custom icon in pressed state.\n * * `pressedIconSvg` (optional, ReactNode) - Custom SVG icon in pressed state. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.\n *\n * ### menu-dropdown\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `disabled` (optional, boolean) - The disabled state indication for the menu button.\n * * `loading` (optional, boolean) - The loading state indication for the menu button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `items` (ButtonDropdownProps.ItemOrGroup[]) - The array of dropdown items that belong to this menu.\n *\n * ### group\n *\n * * `text` (string) - The name of the group rendered as ARIA label for this group.\n * * `items` ((ButtonGroupProps.IconButton | ButtonGroupProps.MenuDropdown)[]) - The array of items that belong to this group.\n */\n items: ReadonlyArray<ButtonGroupProps.ItemOrGroup>;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n}\n\nexport interface InternalButtonGroupProps extends ButtonGroupProps, InternalBaseComponentProps {}\n\nexport namespace ButtonGroupProps {\n export type Variant = 'icon';\n\n export type ItemOrGroup = Item | Group;\n export type Item = IconButton | IconToggleButton | MenuDropdown;\n\n export interface IconButton {\n type: 'icon-button';\n id: string;\n text: string;\n disabled?: boolean;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n }\n\n export interface IconToggleButton {\n type: 'icon-toggle-button';\n id: string;\n text: string;\n pressed: boolean;\n disabled?: boolean;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n pressedIconName?: IconProps.Name;\n pressedIconUrl?: string;\n pressedIconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n pressedPopoverFeedback?: React.ReactNode;\n }\n\n export interface MenuDropdown {\n type: 'menu-dropdown';\n id: string;\n text: string;\n disabled?: boolean;\n loading?: boolean;\n loadingText?: string;\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n }\n\n export interface Group {\n type: 'group';\n text: string;\n items: ReadonlyArray<ButtonGroupProps.Item>;\n }\n\n export interface ItemClickDetails {\n id: string;\n pressed?: boolean;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses button group item by id.\n */\n focus(itemId: string): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ButtonDropdownProps } from '../button-dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface ButtonGroupProps extends BaseComponentProps {\n /**\n * Adds `aria-label` to the button group toolbar element.\n * Use this to provide a unique accessible name for each button group on the page.\n */\n ariaLabel?: string;\n /**\n * Determines the general styling of the button dropdown.\n * * `icon` for icon buttons.\n */\n variant: ButtonGroupProps.Variant;\n /**\n * Use this property to determine dropdown placement strategy for all menu dropdown items.\n *\n * By default, the dropdown height is constrained to fit inside the height of its next scrollable container element.\n * Enabling this property will allow the dropdown to extend beyond that container by using fixed positioning and\n * [React Portals](https://reactjs.org/docs/portals.html).\n *\n * Set this property if the dropdown would otherwise be constrained by a scrollable container,\n * for example inside table and split view layouts.\n *\n * We recommend you use discretion, and don't enable this property unless necessary\n * because fixed positioning results in a slight, visible lag when scrolling complex pages.\n */\n dropdownExpandToViewport?: boolean;\n /**\n * Array of objects with a number of supported types.\n *\n * ### icon-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconAlt` (optional, string) - Specifies alternate text for the icon when using `iconUrl`.\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n *\n * ### icon-toggle-button\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick` handler and to focus the button using `ref.focus(id)`.\n * * `pressed` (boolean) - The toggle button pressed state.\n * * `text` (string) - The name shown as a tooltip for this button.\n * * `disabled` (optional, boolean) - The disabled state indication for this button.\n * * `loading` (optional, boolean) - The loading state indication for this button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `iconName` (optional, string) - Specifies the name of the icon, used with the [icon component](/components/icon/).\n * * `iconUrl` (optional, string) - Specifies the URL of a custom icon.\n * * `iconSvg` (optional, ReactNode) - Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `pressedIconName` (optional, string) - Specifies the name of the icon in pressed state, used with the [icon component](/components/icon/).\n * * `pressedIconUrl` (optional, string) - Specifies the URL of a custom icon in pressed state.\n * * `pressedIconSvg` (optional, ReactNode) - Custom SVG icon in pressed state. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * * `popoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button. Use to provide feedback to the user.\n * * `pressedPopoverFeedback` (optional, ReactNode) - Text that appears when the user clicks the button in pressed state. Defaults to `popoverFeedback`.\n *\n * * ### file-input\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onFilesChange`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `accept` (optional, string) - Specifies the native file input `accept` attribute to describe the allow-list of file types.\n * * `multiple` (optional, string) - Specifies the native file input `multiple` attribute to allow users entering more than one file.\n *\n * ### menu-dropdown\n *\n * * `id` (string) - The unique identifier of the button, used as detail in `onItemClick`.\n * * `text` (string) - The name of the menu button shown as a tooltip.\n * * `disabled` (optional, boolean) - The disabled state indication for the menu button.\n * * `loading` (optional, boolean) - The loading state indication for the menu button.\n * * `loadingText` (optional, string) - The loading text announced to screen readers.\n * * `items` (ButtonDropdownProps.ItemOrGroup[]) - The array of dropdown items that belong to this menu.\n *\n * ### group\n *\n * * `text` (string) - The name of the group rendered as ARIA label for this group.\n * * `items` ((ButtonGroupProps.IconButton | ButtonGroupProps.MenuDropdown)[]) - The array of items that belong to this group.\n */\n items: ReadonlyArray<ButtonGroupProps.ItemOrGroup>;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n /**\n * Called when the user uploads files. The event detail object contains the id and files from the file input item.\n */\n onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails>;\n}\n\nexport interface InternalButtonGroupProps extends ButtonGroupProps, InternalBaseComponentProps {}\n\nexport namespace ButtonGroupProps {\n export type Variant = 'icon';\n\n export type ItemOrGroup = Item | Group;\n export type Item = IconButton | IconToggleButton | IconFileInput | MenuDropdown;\n\n export interface IconButton {\n type: 'icon-button';\n id: string;\n text: string;\n disabled?: boolean;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n }\n\n export interface IconToggleButton {\n type: 'icon-toggle-button';\n id: string;\n text: string;\n pressed: boolean;\n disabled?: boolean;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n pressedIconName?: IconProps.Name;\n pressedIconUrl?: string;\n pressedIconSvg?: React.ReactNode;\n popoverFeedback?: React.ReactNode;\n pressedPopoverFeedback?: React.ReactNode;\n }\n\n export interface IconFileInput {\n type: 'icon-file-input';\n id: string;\n text: string;\n accept?: string;\n multiple?: boolean;\n }\n\n export interface MenuDropdown {\n type: 'menu-dropdown';\n id: string;\n text: string;\n disabled?: boolean;\n loading?: boolean;\n loadingText?: string;\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n }\n\n export interface Group {\n type: 'group';\n text: string;\n items: ReadonlyArray<ButtonGroupProps.Item>;\n }\n\n export interface ItemClickDetails {\n id: string;\n pressed?: boolean;\n checked?: boolean;\n }\n\n export interface FilesChangeDetails {\n id: string;\n files: File[];\n }\n\n export interface Ref {\n /**\n * Focuses button group item by id.\n */\n focus(itemId: string): void;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuE,MAAM,OAAO,CAAC;AAiB5F,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAM1E,QAAA,MAAM,mBAAmB,uGAoKxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuE,MAAM,OAAO,CAAC;AAiB5F,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAM1E,QAAA,MAAM,mBAAmB,uGAsKxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -16,7 +16,7 @@ import ItemElement from './item-element.js';
16
16
  import styles from './styles.css.js';
17
17
  import testUtilStyles from './test-classes/styles.css.js';
18
18
  const InternalButtonGroup = forwardRef((_a, ref) => {
19
- var { items = [], onItemClick, ariaLabel, dropdownExpandToViewport, __internalRootRef = null } = _a, props = __rest(_a, ["items", "onItemClick", "ariaLabel", "dropdownExpandToViewport", "__internalRootRef"]);
19
+ var { items = [], onItemClick, onFilesChange, ariaLabel, dropdownExpandToViewport, __internalRootRef = null } = _a, props = __rest(_a, ["items", "onItemClick", "onFilesChange", "ariaLabel", "dropdownExpandToViewport", "__internalRootRef"]);
20
20
  const baseProps = getBaseProps(props);
21
21
  const focusedIdRef = useRef(null);
22
22
  const navigationAPI = useRef(null);
@@ -106,7 +106,7 @@ const InternalButtonGroup = forwardRef((_a, ref) => {
106
106
  return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(styles.root, testUtilStyles['button-group'], baseProps.className), ref: containerRef, role: "toolbar", "aria-label": ariaLabel, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown }),
107
107
  React.createElement(SingleTabStopNavigationProvider, { ref: navigationAPI, navigationActive: true, getNextFocusTarget: getNextFocusTarget, onUnregisterActive: onUnregisterActive }, items.map((itemOrGroup, index) => {
108
108
  var _a;
109
- const itemContent = (item) => (React.createElement(ItemElement, { key: item.id, item: item, dropdownExpandToViewport: dropdownExpandToViewport, tooltip: tooltip, setTooltip: setTooltip, onItemClick: onItemClick, ref: element => (itemsRef.current[item.id] = element) }));
109
+ const itemContent = (item) => (React.createElement(ItemElement, { key: item.id, item: item, dropdownExpandToViewport: dropdownExpandToViewport, tooltip: tooltip, setTooltip: setTooltip, onItemClick: onItemClick, onFilesChange: onFilesChange, ref: element => (itemsRef.current[item.id] = element) }));
110
110
  const isGroupBefore = ((_a = items[index - 1]) === null || _a === void 0 ? void 0 : _a.type) === 'group';
111
111
  const currentItem = items[index];
112
112
  const isGroupNow = (currentItem === null || currentItem === void 0 ? void 0 : currentItem.type) === 'group';
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources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EAAE;gBAChD,QAAQ,CAAC,aAAa,EAAE,qDAAqD,CAAC,CAAC;aAChF;YAED,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,WAAW,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE;gBACvE,gBAAgB,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,OAAO,GAAI;gBACtD,WAAW,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAC9B,6BAAK,GAAG,EAAE,KAAK,EAAE,IAAI,EAAC,OAAO,gBAAa,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,IAChF,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAC7C,CACP,CAAC,CAAC,CAAC,CACF,WAAW,CAAC,WAAW,CAAC,CACzB,CACc,CAClB,CAAC;QACJ,CAAC,CAAC,CAC8B,CAC9B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { getAllFocusables } from '../internal/components/focus-lock/utils';\nimport {\n SingleTabStopNavigationAPI,\n SingleTabStopNavigationProvider,\n} from '../internal/context/single-tab-stop-navigation-context';\nimport { hasModifierKeys } from '../internal/events';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { KeyCode } from '../internal/keycode';\nimport { circleIndex } from '../internal/utils/circle-index';\nimport handleKey from '../internal/utils/handle-key';\nimport { ButtonGroupProps, InternalButtonGroupProps } from './interfaces';\nimport ItemElement from './item-element.js';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nconst InternalButtonGroup = forwardRef(\n (\n {\n items = [],\n onItemClick,\n ariaLabel,\n dropdownExpandToViewport,\n __internalRootRef = null,\n ...props\n }: InternalButtonGroupProps,\n ref: React.Ref<ButtonGroupProps.Ref>\n ) => {\n const baseProps = getBaseProps(props);\n const focusedIdRef = useRef<null | string>(null);\n const navigationAPI = useRef<SingleTabStopNavigationAPI>(null);\n const containerObjectRef = useRef<HTMLDivElement>(null);\n const containerRef = useMergeRefs(containerObjectRef, __internalRootRef);\n const itemsRef = useRef<Record<string, ButtonProps.Ref | null>>({});\n const [tooltip, setTooltip] = useState<null | { item: string; feedback: boolean }>(null);\n\n useImperativeHandle(ref, () => ({\n focus: id => {\n itemsRef.current[id]?.focus();\n },\n }));\n\n function getNextFocusTarget(): null | HTMLElement {\n if (containerObjectRef.current) {\n const buttons: HTMLButtonElement[] = Array.from(\n containerObjectRef.current.querySelectorAll(`.${testUtilStyles.item}`)\n );\n const activeButtons = buttons.filter(button => !button.disabled);\n return activeButtons.find(button => button.dataset.itemid === focusedIdRef.current) ?? activeButtons[0] ?? null;\n }\n return null;\n }\n\n function onUnregisterActive(focusableElement: HTMLElement) {\n // Only refocus when the node is actually removed (no such ID anymore).\n const target = navigationAPI.current?.getFocusTarget();\n\n if (target && target.dataset.itemid !== focusableElement.dataset.itemid) {\n target.focus();\n }\n }\n\n useEffect(() => {\n navigationAPI.current?.updateFocusTarget();\n });\n\n function onFocus(event: React.FocusEvent) {\n if (event.target instanceof HTMLElement && event.target.dataset.itemid) {\n focusedIdRef.current = event.target.dataset.itemid;\n }\n\n navigationAPI.current?.updateFocusTarget();\n }\n\n function onBlur() {\n navigationAPI.current?.updateFocusTarget();\n }\n\n function onKeyDown(event: React.KeyboardEvent) {\n const focusTarget = navigationAPI.current?.getFocusTarget();\n const specialKeys = [KeyCode.right, KeyCode.left, KeyCode.end, KeyCode.home, KeyCode.pageUp, KeyCode.pageDown];\n if (hasModifierKeys(event) || specialKeys.indexOf(event.keyCode) === -1) {\n return;\n }\n if (!containerObjectRef.current || !focusTarget) {\n return;\n }\n // Ignore navigation when the focused element is not an item.\n if (document.activeElement && !document.activeElement.matches(`.${testUtilStyles.item}`)) {\n return;\n }\n event.preventDefault();\n\n const focusables = getFocusablesFrom(containerObjectRef.current);\n const activeIndex = focusables.indexOf(focusTarget);\n handleKey(event as any, {\n onHome: () => focusElement(focusables[0]),\n onEnd: () => focusElement(focusables[focusables.length - 1]),\n onInlineStart: () => focusElement(focusables[circleIndex(activeIndex - 1, [0, focusables.length - 1])]),\n onInlineEnd: () => focusElement(focusables[circleIndex(activeIndex + 1, [0, focusables.length - 1])]),\n });\n }\n\n function focusElement(element: HTMLElement) {\n element.focus();\n }\n\n // List all non-disabled and registered focusables: those are eligible for keyboard navigation.\n function getFocusablesFrom(target: HTMLElement) {\n function isElementRegistered(element: HTMLElement) {\n return navigationAPI.current?.isRegistered(element) ?? false;\n }\n\n function isElementDisabled(element: HTMLElement) {\n if (element instanceof HTMLButtonElement) {\n return element.disabled;\n }\n\n return false;\n }\n\n return getAllFocusables(target).filter(el => isElementRegistered(el) && !isElementDisabled(el));\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, testUtilStyles['button-group'], baseProps.className)}\n ref={containerRef}\n role=\"toolbar\"\n aria-label={ariaLabel}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n >\n <SingleTabStopNavigationProvider\n ref={navigationAPI}\n navigationActive={true}\n getNextFocusTarget={getNextFocusTarget}\n onUnregisterActive={onUnregisterActive}\n >\n {items.map((itemOrGroup, index) => {\n const itemContent = (item: ButtonGroupProps.Item) => (\n <ItemElement\n key={item.id}\n item={item}\n dropdownExpandToViewport={dropdownExpandToViewport}\n tooltip={tooltip}\n setTooltip={setTooltip}\n onItemClick={onItemClick}\n ref={element => (itemsRef.current[item.id] = element)}\n />\n );\n\n const isGroupBefore = items[index - 1]?.type === 'group';\n const currentItem = items[index];\n const isGroupNow = currentItem?.type === 'group';\n const shouldAddDivider = isGroupBefore || (!isGroupBefore && isGroupNow && index !== 0);\n\n if (isGroupNow && currentItem.items.length === 0) {\n warnOnce('ButtonGroup', 'Empty group detected. Empty groups are not allowed.');\n }\n\n return (\n <React.Fragment key={itemOrGroup.type === 'group' ? index : itemOrGroup.id}>\n {shouldAddDivider && <div className={styles.divider} />}\n {itemOrGroup.type === 'group' ? (\n <div key={index} role=\"group\" aria-label={itemOrGroup.text} className={styles.group}>\n {itemOrGroup.items.map(item => itemContent(item))}\n </div>\n ) : (\n itemContent(itemOrGroup)\n )}\n </React.Fragment>\n );\n })}\n </SingleTabStopNavigationProvider>\n </div>\n );\n }\n);\n\nexport default InternalButtonGroup;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/button-group/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5F,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAEL,+BAA+B,GAChC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,SAAS,MAAM,8BAA8B,CA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CAAC;QACJ,CAAC,CAAC,CAC8B,CAC9B,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { getAllFocusables } from '../internal/components/focus-lock/utils';\nimport {\n SingleTabStopNavigationAPI,\n SingleTabStopNavigationProvider,\n} from '../internal/context/single-tab-stop-navigation-context';\nimport { hasModifierKeys } from '../internal/events';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { KeyCode } from '../internal/keycode';\nimport { circleIndex } from '../internal/utils/circle-index';\nimport handleKey from '../internal/utils/handle-key';\nimport { ButtonGroupProps, InternalButtonGroupProps } from './interfaces';\nimport ItemElement from './item-element.js';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nconst InternalButtonGroup = forwardRef(\n (\n {\n items = [],\n onItemClick,\n onFilesChange,\n ariaLabel,\n dropdownExpandToViewport,\n __internalRootRef = null,\n ...props\n }: InternalButtonGroupProps,\n ref: React.Ref<ButtonGroupProps.Ref>\n ) => {\n const baseProps = getBaseProps(props);\n const focusedIdRef = useRef<null | string>(null);\n const navigationAPI = useRef<SingleTabStopNavigationAPI>(null);\n const containerObjectRef = useRef<HTMLDivElement>(null);\n const containerRef = useMergeRefs(containerObjectRef, __internalRootRef);\n const itemsRef = useRef<Record<string, ButtonProps.Ref | null>>({});\n const [tooltip, setTooltip] = useState<null | { item: string; feedback: boolean }>(null);\n\n useImperativeHandle(ref, () => ({\n focus: id => {\n itemsRef.current[id]?.focus();\n },\n }));\n\n function getNextFocusTarget(): null | HTMLElement {\n if (containerObjectRef.current) {\n const buttons: HTMLButtonElement[] = Array.from(\n containerObjectRef.current.querySelectorAll(`.${testUtilStyles.item}`)\n );\n const activeButtons = buttons.filter(button => !button.disabled);\n return activeButtons.find(button => button.dataset.itemid === focusedIdRef.current) ?? activeButtons[0] ?? null;\n }\n return null;\n }\n\n function onUnregisterActive(focusableElement: HTMLElement) {\n // Only refocus when the node is actually removed (no such ID anymore).\n const target = navigationAPI.current?.getFocusTarget();\n\n if (target && target.dataset.itemid !== focusableElement.dataset.itemid) {\n target.focus();\n }\n }\n\n useEffect(() => {\n navigationAPI.current?.updateFocusTarget();\n });\n\n function onFocus(event: React.FocusEvent) {\n if (event.target instanceof HTMLElement && event.target.dataset.itemid) {\n focusedIdRef.current = event.target.dataset.itemid;\n }\n\n navigationAPI.current?.updateFocusTarget();\n }\n\n function onBlur() {\n navigationAPI.current?.updateFocusTarget();\n }\n\n function onKeyDown(event: React.KeyboardEvent) {\n const focusTarget = navigationAPI.current?.getFocusTarget();\n const specialKeys = [KeyCode.right, KeyCode.left, KeyCode.end, KeyCode.home, KeyCode.pageUp, KeyCode.pageDown];\n if (hasModifierKeys(event) || specialKeys.indexOf(event.keyCode) === -1) {\n return;\n }\n if (!containerObjectRef.current || !focusTarget) {\n return;\n }\n // Ignore navigation when the focused element is not an item.\n if (document.activeElement && !document.activeElement.matches(`.${testUtilStyles.item}`)) {\n return;\n }\n event.preventDefault();\n\n const focusables = getFocusablesFrom(containerObjectRef.current);\n const activeIndex = focusables.indexOf(focusTarget);\n handleKey(event as any, {\n onHome: () => focusElement(focusables[0]),\n onEnd: () => focusElement(focusables[focusables.length - 1]),\n onInlineStart: () => focusElement(focusables[circleIndex(activeIndex - 1, [0, focusables.length - 1])]),\n onInlineEnd: () => focusElement(focusables[circleIndex(activeIndex + 1, [0, focusables.length - 1])]),\n });\n }\n\n function focusElement(element: HTMLElement) {\n element.focus();\n }\n\n // List all non-disabled and registered focusables: those are eligible for keyboard navigation.\n function getFocusablesFrom(target: HTMLElement) {\n function isElementRegistered(element: HTMLElement) {\n return navigationAPI.current?.isRegistered(element) ?? false;\n }\n\n function isElementDisabled(element: HTMLElement) {\n if (element instanceof HTMLButtonElement) {\n return element.disabled;\n }\n\n return false;\n }\n\n return getAllFocusables(target).filter(el => isElementRegistered(el) && !isElementDisabled(el));\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, testUtilStyles['button-group'], baseProps.className)}\n ref={containerRef}\n role=\"toolbar\"\n aria-label={ariaLabel}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n >\n <SingleTabStopNavigationProvider\n ref={navigationAPI}\n navigationActive={true}\n getNextFocusTarget={getNextFocusTarget}\n onUnregisterActive={onUnregisterActive}\n >\n {items.map((itemOrGroup, index) => {\n const itemContent = (item: ButtonGroupProps.Item) => (\n <ItemElement\n key={item.id}\n item={item}\n dropdownExpandToViewport={dropdownExpandToViewport}\n tooltip={tooltip}\n setTooltip={setTooltip}\n onItemClick={onItemClick}\n onFilesChange={onFilesChange}\n ref={element => (itemsRef.current[item.id] = element)}\n />\n );\n\n const isGroupBefore = items[index - 1]?.type === 'group';\n const currentItem = items[index];\n const isGroupNow = currentItem?.type === 'group';\n const shouldAddDivider = isGroupBefore || (!isGroupBefore && isGroupNow && index !== 0);\n\n if (isGroupNow && currentItem.items.length === 0) {\n warnOnce('ButtonGroup', 'Empty group detected. Empty groups are not allowed.');\n }\n\n return (\n <React.Fragment key={itemOrGroup.type === 'group' ? index : itemOrGroup.id}>\n {shouldAddDivider && <div className={styles.divider} />}\n {itemOrGroup.type === 'group' ? (\n <div key={index} role=\"group\" aria-label={itemOrGroup.text} className={styles.group}>\n {itemOrGroup.items.map(item => itemContent(item))}\n </div>\n ) : (\n itemContent(itemOrGroup)\n )}\n </React.Fragment>\n );\n })}\n </SingleTabStopNavigationProvider>\n </div>\n );\n }\n);\n\nexport default InternalButtonGroup;\n"]}
@@ -14,6 +14,7 @@ interface ItemElementProps {
14
14
  feedback: boolean;
15
15
  }) => void;
16
16
  onItemClick?: NonCancelableEventHandler<ButtonGroupProps.ItemClickDetails> | undefined;
17
+ onFilesChange?: NonCancelableEventHandler<ButtonGroupProps.FilesChangeDetails> | undefined;
17
18
  }
18
19
  declare const ItemElement: React.ForwardRefExoticComponent<ItemElementProps & React.RefAttributes<ButtonProps.Ref>>;
19
20
  export default ItemElement;
@@ -1 +1 @@
1
- {"version":3,"file":"item-element.d.ts","sourceRoot":"","sources":["../../../src/button-group/item-element.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAuB,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAIpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,UAAU,gBAAgB;IACxB,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,OAAO,EAAE,IAAI,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IACpD,UAAU,EAAE,CAAC,OAAO,EAAE,IAAI,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1E,WAAW,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;CACxF;AAED,QAAA,MAAM,WAAW,0FAqHhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"item-element.d.ts","sourceRoot":"","sources":["../../../src/button-group/item-element.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6D,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAuB,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAKpF,OAAO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