@cloudscape-design/components-themeable 3.0.1318 → 3.0.1320

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 (278) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/attribute-editor/styles.scss +5 -0
  3. package/lib/internal/scss/expandable-section/styles.scss +4 -5
  4. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  5. package/lib/internal/template/app-layout/drawer/overflow-menu.d.ts +2 -1
  6. package/lib/internal/template/app-layout/drawer/overflow-menu.d.ts.map +1 -1
  7. package/lib/internal/template/app-layout/drawer/overflow-menu.js.map +1 -1
  8. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.js.map +1 -1
  9. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-bottom-drawer.js.map +1 -1
  10. package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/global-drawer.js.map +1 -1
  11. package/lib/internal/template/attribute-editor/styles.css.js +15 -15
  12. package/lib/internal/template/attribute-editor/styles.scoped.css +28 -25
  13. package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
  14. package/lib/internal/template/breadcrumb-group/implementation.d.ts +2 -1
  15. package/lib/internal/template/breadcrumb-group/implementation.d.ts.map +1 -1
  16. package/lib/internal/template/breadcrumb-group/implementation.js.map +1 -1
  17. package/lib/internal/template/breadcrumb-group/interfaces.d.ts +0 -4
  18. package/lib/internal/template/breadcrumb-group/interfaces.d.ts.map +1 -1
  19. package/lib/internal/template/breadcrumb-group/interfaces.js.map +1 -1
  20. package/lib/internal/template/breadcrumb-group/internal-interfaces.d.ts +6 -0
  21. package/lib/internal/template/breadcrumb-group/internal-interfaces.d.ts.map +1 -0
  22. package/lib/internal/template/breadcrumb-group/internal-interfaces.js +2 -0
  23. package/lib/internal/template/breadcrumb-group/internal-interfaces.js.map +1 -0
  24. package/lib/internal/template/breadcrumb-group/skeleton.js.map +1 -1
  25. package/lib/internal/template/button-dropdown/category-elements/category-element.d.ts +1 -1
  26. package/lib/internal/template/button-dropdown/category-elements/category-element.d.ts.map +1 -1
  27. package/lib/internal/template/button-dropdown/category-elements/category-element.js.map +1 -1
  28. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts +1 -1
  29. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
  30. package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
  31. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -1
  32. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
  33. package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
  34. package/lib/internal/template/button-dropdown/interfaces.d.ts +0 -101
  35. package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
  36. package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
  37. package/lib/internal/template/button-dropdown/internal-interfaces.d.ts +104 -0
  38. package/lib/internal/template/button-dropdown/internal-interfaces.d.ts.map +1 -0
  39. package/lib/internal/template/button-dropdown/internal-interfaces.js +2 -0
  40. package/lib/internal/template/button-dropdown/internal-interfaces.js.map +1 -0
  41. package/lib/internal/template/button-dropdown/internal.d.ts +2 -1
  42. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  43. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  44. package/lib/internal/template/button-dropdown/item-element/index.d.ts +1 -1
  45. package/lib/internal/template/button-dropdown/item-element/index.d.ts.map +1 -1
  46. package/lib/internal/template/button-dropdown/item-element/index.js.map +1 -1
  47. package/lib/internal/template/button-dropdown/items-list.d.ts +1 -1
  48. package/lib/internal/template/button-dropdown/items-list.d.ts.map +1 -1
  49. package/lib/internal/template/button-dropdown/items-list.js.map +1 -1
  50. package/lib/internal/template/button-group/icon-button-item.d.ts +2 -1
  51. package/lib/internal/template/button-group/icon-button-item.d.ts.map +1 -1
  52. package/lib/internal/template/button-group/icon-button-item.js.map +1 -1
  53. package/lib/internal/template/button-group/icon-toggle-button-item.d.ts +2 -1
  54. package/lib/internal/template/button-group/icon-toggle-button-item.d.ts.map +1 -1
  55. package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
  56. package/lib/internal/template/button-group/interfaces.d.ts +0 -14
  57. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  58. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  59. package/lib/internal/template/button-group/internal-interfaces.d.ts +16 -0
  60. package/lib/internal/template/button-group/internal-interfaces.d.ts.map +1 -0
  61. package/lib/internal/template/button-group/internal-interfaces.js +2 -0
  62. package/lib/internal/template/button-group/internal-interfaces.js.map +1 -0
  63. package/lib/internal/template/button-group/internal.d.ts +2 -1
  64. package/lib/internal/template/button-group/internal.d.ts.map +1 -1
  65. package/lib/internal/template/button-group/internal.js.map +1 -1
  66. package/lib/internal/template/column-layout/flexible-column-layout/index.d.ts +1 -1
  67. package/lib/internal/template/column-layout/flexible-column-layout/index.d.ts.map +1 -1
  68. package/lib/internal/template/column-layout/flexible-column-layout/index.js.map +1 -1
  69. package/lib/internal/template/column-layout/grid-column-layout.d.ts +1 -1
  70. package/lib/internal/template/column-layout/grid-column-layout.d.ts.map +1 -1
  71. package/lib/internal/template/column-layout/grid-column-layout.js.map +1 -1
  72. package/lib/internal/template/column-layout/interfaces.d.ts +0 -9
  73. package/lib/internal/template/column-layout/interfaces.d.ts.map +1 -1
  74. package/lib/internal/template/column-layout/interfaces.js.map +1 -1
  75. package/lib/internal/template/column-layout/internal-interfaces.d.ts +11 -0
  76. package/lib/internal/template/column-layout/internal-interfaces.d.ts.map +1 -0
  77. package/lib/internal/template/column-layout/internal-interfaces.js +2 -0
  78. package/lib/internal/template/column-layout/internal-interfaces.js.map +1 -0
  79. package/lib/internal/template/column-layout/internal.d.ts +1 -1
  80. package/lib/internal/template/column-layout/internal.d.ts.map +1 -1
  81. package/lib/internal/template/column-layout/internal.js.map +1 -1
  82. package/lib/internal/template/expandable-section/expandable-section-container.d.ts +1 -1
  83. package/lib/internal/template/expandable-section/expandable-section-container.d.ts.map +1 -1
  84. package/lib/internal/template/expandable-section/expandable-section-container.js.map +1 -1
  85. package/lib/internal/template/expandable-section/expandable-section-header.d.ts +2 -1
  86. package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
  87. package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
  88. package/lib/internal/template/expandable-section/interfaces.d.ts +0 -1
  89. package/lib/internal/template/expandable-section/interfaces.d.ts.map +1 -1
  90. package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
  91. package/lib/internal/template/expandable-section/internal-interfaces.d.ts +3 -0
  92. package/lib/internal/template/expandable-section/internal-interfaces.d.ts.map +1 -0
  93. package/lib/internal/template/expandable-section/internal-interfaces.js +2 -0
  94. package/lib/internal/template/expandable-section/internal-interfaces.js.map +1 -0
  95. package/lib/internal/template/expandable-section/internal.d.ts +2 -1
  96. package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
  97. package/lib/internal/template/expandable-section/internal.js.map +1 -1
  98. package/lib/internal/template/expandable-section/styles.css.js +35 -35
  99. package/lib/internal/template/expandable-section/styles.scoped.css +71 -74
  100. package/lib/internal/template/expandable-section/styles.selectors.js +35 -35
  101. package/lib/internal/template/expandable-section/utils.d.ts +1 -1
  102. package/lib/internal/template/expandable-section/utils.d.ts.map +1 -1
  103. package/lib/internal/template/expandable-section/utils.js.map +1 -1
  104. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts +1 -1
  105. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
  106. package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
  107. package/lib/internal/template/flashbar/common.d.ts +2 -1
  108. package/lib/internal/template/flashbar/common.d.ts.map +1 -1
  109. package/lib/internal/template/flashbar/common.js.map +1 -1
  110. package/lib/internal/template/flashbar/implementation.d.ts +1 -1
  111. package/lib/internal/template/flashbar/implementation.d.ts.map +1 -1
  112. package/lib/internal/template/flashbar/implementation.js.map +1 -1
  113. package/lib/internal/template/flashbar/interfaces.d.ts +0 -2
  114. package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
  115. package/lib/internal/template/flashbar/interfaces.js.map +1 -1
  116. package/lib/internal/template/flashbar/internal-interfaces.d.ts +4 -0
  117. package/lib/internal/template/flashbar/internal-interfaces.d.ts.map +1 -0
  118. package/lib/internal/template/flashbar/internal-interfaces.js +2 -0
  119. package/lib/internal/template/flashbar/internal-interfaces.js.map +1 -0
  120. package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts +1 -1
  121. package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  122. package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
  123. package/lib/internal/template/form-field/interfaces.d.ts +2 -15
  124. package/lib/internal/template/form-field/interfaces.d.ts.map +1 -1
  125. package/lib/internal/template/form-field/interfaces.js.map +1 -1
  126. package/lib/internal/template/form-field/internal-interfaces.d.ts +17 -0
  127. package/lib/internal/template/form-field/internal-interfaces.d.ts.map +1 -0
  128. package/lib/internal/template/form-field/internal-interfaces.js +2 -0
  129. package/lib/internal/template/form-field/internal-interfaces.js.map +1 -0
  130. package/lib/internal/template/form-field/internal.d.ts +1 -1
  131. package/lib/internal/template/form-field/internal.d.ts.map +1 -1
  132. package/lib/internal/template/form-field/internal.js.map +1 -1
  133. package/lib/internal/template/icon/generated/icons.d.ts +2 -0
  134. package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
  135. package/lib/internal/template/icon/generated/icons.js +7 -0
  136. package/lib/internal/template/icon/generated/icons.js.map +1 -1
  137. package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
  138. package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
  139. package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
  140. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  141. package/lib/internal/template/internal/components/menu-dropdown/interfaces.d.ts +1 -1
  142. package/lib/internal/template/internal/components/menu-dropdown/interfaces.d.ts.map +1 -1
  143. package/lib/internal/template/internal/components/menu-dropdown/interfaces.js.map +1 -1
  144. package/lib/internal/template/internal/environment.js +2 -2
  145. package/lib/internal/template/internal/environment.json +2 -2
  146. package/lib/internal/template/item-card/interfaces.d.ts +0 -19
  147. package/lib/internal/template/item-card/interfaces.d.ts.map +1 -1
  148. package/lib/internal/template/item-card/interfaces.js.map +1 -1
  149. package/lib/internal/template/item-card/internal-interfaces.d.ts +22 -0
  150. package/lib/internal/template/item-card/internal-interfaces.d.ts.map +1 -0
  151. package/lib/internal/template/item-card/internal-interfaces.js +2 -0
  152. package/lib/internal/template/item-card/internal-interfaces.js.map +1 -0
  153. package/lib/internal/template/item-card/internal.d.ts +1 -1
  154. package/lib/internal/template/item-card/internal.d.ts.map +1 -1
  155. package/lib/internal/template/item-card/internal.js.map +1 -1
  156. package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts +2 -1
  157. package/lib/internal/template/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  158. package/lib/internal/template/mixed-line-bar-chart/chart-container.js.map +1 -1
  159. package/lib/internal/template/mixed-line-bar-chart/chart-legend.d.ts +2 -1
  160. package/lib/internal/template/mixed-line-bar-chart/chart-legend.d.ts.map +1 -1
  161. package/lib/internal/template/mixed-line-bar-chart/chart-legend.js.map +1 -1
  162. package/lib/internal/template/mixed-line-bar-chart/data-series.d.ts +2 -1
  163. package/lib/internal/template/mixed-line-bar-chart/data-series.d.ts.map +1 -1
  164. package/lib/internal/template/mixed-line-bar-chart/data-series.js.map +1 -1
  165. package/lib/internal/template/mixed-line-bar-chart/domain.d.ts +2 -1
  166. package/lib/internal/template/mixed-line-bar-chart/domain.d.ts.map +1 -1
  167. package/lib/internal/template/mixed-line-bar-chart/domain.js.map +1 -1
  168. package/lib/internal/template/mixed-line-bar-chart/format-highlighted.d.ts +2 -1
  169. package/lib/internal/template/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
  170. package/lib/internal/template/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  171. package/lib/internal/template/mixed-line-bar-chart/interfaces.d.ts +0 -5
  172. package/lib/internal/template/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  173. package/lib/internal/template/mixed-line-bar-chart/interfaces.js.map +1 -1
  174. package/lib/internal/template/mixed-line-bar-chart/internal-interfaces.d.ts +7 -0
  175. package/lib/internal/template/mixed-line-bar-chart/internal-interfaces.d.ts.map +1 -0
  176. package/lib/internal/template/mixed-line-bar-chart/internal-interfaces.js +2 -0
  177. package/lib/internal/template/mixed-line-bar-chart/internal-interfaces.js.map +1 -0
  178. package/lib/internal/template/mixed-line-bar-chart/make-scaled-bar-groups.d.ts +2 -1
  179. package/lib/internal/template/mixed-line-bar-chart/make-scaled-bar-groups.d.ts.map +1 -1
  180. package/lib/internal/template/mixed-line-bar-chart/make-scaled-bar-groups.js.map +1 -1
  181. package/lib/internal/template/mixed-line-bar-chart/make-scaled-series.d.ts +2 -1
  182. package/lib/internal/template/mixed-line-bar-chart/make-scaled-series.d.ts.map +1 -1
  183. package/lib/internal/template/mixed-line-bar-chart/make-scaled-series.js.map +1 -1
  184. package/lib/internal/template/mixed-line-bar-chart/utils.d.ts +2 -1
  185. package/lib/internal/template/mixed-line-bar-chart/utils.d.ts.map +1 -1
  186. package/lib/internal/template/mixed-line-bar-chart/utils.js.map +1 -1
  187. package/lib/internal/template/navigable-group/interfaces.d.ts +0 -3
  188. package/lib/internal/template/navigable-group/interfaces.d.ts.map +1 -1
  189. package/lib/internal/template/navigable-group/interfaces.js.map +1 -1
  190. package/lib/internal/template/navigable-group/internal-interfaces.d.ts +5 -0
  191. package/lib/internal/template/navigable-group/internal-interfaces.d.ts.map +1 -0
  192. package/lib/internal/template/navigable-group/internal-interfaces.js +4 -0
  193. package/lib/internal/template/navigable-group/internal-interfaces.js.map +1 -0
  194. package/lib/internal/template/navigable-group/internal.d.ts +2 -1
  195. package/lib/internal/template/navigable-group/internal.d.ts.map +1 -1
  196. package/lib/internal/template/navigable-group/internal.js.map +1 -1
  197. package/lib/internal/template/popover/arrow.d.ts +1 -1
  198. package/lib/internal/template/popover/arrow.d.ts.map +1 -1
  199. package/lib/internal/template/popover/arrow.js.map +1 -1
  200. package/lib/internal/template/popover/container.d.ts +2 -1
  201. package/lib/internal/template/popover/container.d.ts.map +1 -1
  202. package/lib/internal/template/popover/container.js.map +1 -1
  203. package/lib/internal/template/popover/interfaces.d.ts +0 -4
  204. package/lib/internal/template/popover/interfaces.d.ts.map +1 -1
  205. package/lib/internal/template/popover/interfaces.js.map +1 -1
  206. package/lib/internal/template/popover/internal-interfaces.d.ts +5 -0
  207. package/lib/internal/template/popover/internal-interfaces.d.ts.map +1 -0
  208. package/lib/internal/template/popover/internal-interfaces.js +4 -0
  209. package/lib/internal/template/popover/internal-interfaces.js.map +1 -0
  210. package/lib/internal/template/popover/use-popover-position.d.ts +2 -1
  211. package/lib/internal/template/popover/use-popover-position.d.ts.map +1 -1
  212. package/lib/internal/template/popover/use-popover-position.js.map +1 -1
  213. package/lib/internal/template/popover/utils/positions.d.ts +2 -1
  214. package/lib/internal/template/popover/utils/positions.d.ts.map +1 -1
  215. package/lib/internal/template/popover/utils/positions.js.map +1 -1
  216. package/lib/internal/template/property-filter/controller.d.ts +2 -1
  217. package/lib/internal/template/property-filter/controller.d.ts.map +1 -1
  218. package/lib/internal/template/property-filter/controller.js.map +1 -1
  219. package/lib/internal/template/property-filter/i18n-utils.d.ts +2 -1
  220. package/lib/internal/template/property-filter/i18n-utils.d.ts.map +1 -1
  221. package/lib/internal/template/property-filter/i18n-utils.js.map +1 -1
  222. package/lib/internal/template/property-filter/interfaces.d.ts +1 -50
  223. package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
  224. package/lib/internal/template/property-filter/interfaces.js.map +1 -1
  225. package/lib/internal/template/property-filter/internal-interfaces.d.ts +52 -0
  226. package/lib/internal/template/property-filter/internal-interfaces.d.ts.map +1 -0
  227. package/lib/internal/template/property-filter/internal-interfaces.js +4 -0
  228. package/lib/internal/template/property-filter/internal-interfaces.js.map +1 -0
  229. package/lib/internal/template/property-filter/internal.d.ts.map +1 -1
  230. package/lib/internal/template/property-filter/internal.js.map +1 -1
  231. package/lib/internal/template/property-filter/property-editor.d.ts +2 -1
  232. package/lib/internal/template/property-filter/property-editor.d.ts.map +1 -1
  233. package/lib/internal/template/property-filter/property-editor.js.map +1 -1
  234. package/lib/internal/template/property-filter/token-editor-inputs.d.ts +2 -1
  235. package/lib/internal/template/property-filter/token-editor-inputs.d.ts.map +1 -1
  236. package/lib/internal/template/property-filter/token-editor-inputs.js.map +1 -1
  237. package/lib/internal/template/property-filter/token-editor.d.ts +2 -1
  238. package/lib/internal/template/property-filter/token-editor.d.ts.map +1 -1
  239. package/lib/internal/template/property-filter/token-editor.js.map +1 -1
  240. package/lib/internal/template/property-filter/token.d.ts +2 -1
  241. package/lib/internal/template/property-filter/token.d.ts.map +1 -1
  242. package/lib/internal/template/property-filter/token.js.map +1 -1
  243. package/lib/internal/template/property-filter/utils.d.ts +2 -1
  244. package/lib/internal/template/property-filter/utils.d.ts.map +1 -1
  245. package/lib/internal/template/property-filter/utils.js.map +1 -1
  246. package/lib/internal/template/table/interfaces.d.ts +0 -1
  247. package/lib/internal/template/table/interfaces.d.ts.map +1 -1
  248. package/lib/internal/template/table/interfaces.js.map +1 -1
  249. package/lib/internal/template/table/internal-interfaces.d.ts +3 -0
  250. package/lib/internal/template/table/internal-interfaces.d.ts.map +1 -0
  251. package/lib/internal/template/table/internal-interfaces.js +2 -0
  252. package/lib/internal/template/table/internal-interfaces.js.map +1 -0
  253. package/lib/internal/template/table/selection/use-group-selection.d.ts +2 -1
  254. package/lib/internal/template/table/selection/use-group-selection.d.ts.map +1 -1
  255. package/lib/internal/template/table/selection/use-group-selection.js.map +1 -1
  256. package/lib/internal/template/table/selection/use-selection-focus-move.d.ts +1 -1
  257. package/lib/internal/template/table/selection/use-selection-focus-move.d.ts.map +1 -1
  258. package/lib/internal/template/table/selection/use-selection-focus-move.js.map +1 -1
  259. package/lib/internal/template/table/selection/use-selection.d.ts +2 -1
  260. package/lib/internal/template/table/selection/use-selection.d.ts.map +1 -1
  261. package/lib/internal/template/table/selection/use-selection.js.map +1 -1
  262. package/lib/internal/template/table/thead.d.ts +2 -1
  263. package/lib/internal/template/table/thead.d.ts.map +1 -1
  264. package/lib/internal/template/table/thead.js.map +1 -1
  265. package/lib/internal/template/table/use-table-focus-navigation.d.ts +2 -1
  266. package/lib/internal/template/table/use-table-focus-navigation.d.ts.map +1 -1
  267. package/lib/internal/template/table/use-table-focus-navigation.js.map +1 -1
  268. package/lib/internal/template/tooltip/interfaces.d.ts +0 -10
  269. package/lib/internal/template/tooltip/interfaces.d.ts.map +1 -1
  270. package/lib/internal/template/tooltip/interfaces.js.map +1 -1
  271. package/lib/internal/template/tooltip/internal-interfaces.d.ts +12 -0
  272. package/lib/internal/template/tooltip/internal-interfaces.d.ts.map +1 -0
  273. package/lib/internal/template/tooltip/internal-interfaces.js +2 -0
  274. package/lib/internal/template/tooltip/internal-interfaces.js.map +1 -0
  275. package/lib/internal/template/tooltip/internal.d.ts +1 -1
  276. package/lib/internal/template/tooltip/internal.d.ts.map +1 -1
  277. package/lib/internal/template/tooltip/internal.js.map +1 -1
  278. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"icon-toggle-button-item.js","sourceRoot":"","sources":["../../../src/button-group/icon-toggle-button-item.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;A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AAC,IAAI,EAE1G,QAAQ,EAAE,gBAAgB,GAC1B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces.js';\nimport { fireCancelableEvent } from '../internal/events/index.js';\nimport InternalLiveRegion from '../live-region/internal.js';\nimport { InternalToggleButton } from '../toggle-button/internal.js';\nimport Tooltip from '../tooltip/internal.js';\nimport { CancelableEventHandler } from '../types/events';\nimport { ButtonGroupProps, InternalIconToggleButton } from './interfaces.js';\n\nimport testUtilStyles from './test-classes/styles.css.js';\n\ninterface IconToggleButtonItemProps {\n item: InternalIconToggleButton;\n showTooltip: boolean;\n showFeedback: boolean;\n onTooltipDismiss: () => void;\n onItemClick?: CancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n}\n\nconst IconToggleButtonItem = forwardRef(\n (\n { item, showTooltip, showFeedback, onTooltipDismiss, onItemClick }: IconToggleButtonItemProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const hasIcon = item.iconName || item.iconUrl || item.iconSvg;\n const hasPressedIcon = item.pressedIconName || item.pressedIconUrl || item.pressedIconSvg;\n\n if (!hasIcon) {\n warnOnce('ButtonGroup', `Missing icon for item with id: ${item.id}`);\n }\n if (!hasPressedIcon) {\n warnOnce('ButtonGroup', `Missing pressed icon for item with id: ${item.id}`);\n }\n\n const feedbackContent = item.pressed ? (item.pressedPopoverFeedback ?? item.popoverFeedback) : item.popoverFeedback;\n const canShowTooltip = showTooltip && !item.disabled && !item.loading;\n const canShowFeedback = showTooltip && showFeedback && feedbackContent;\n return (\n <div ref={containerRef}>\n <InternalToggleButton\n variant=\"icon\"\n pressed={item.pressed}\n loading={item.loading}\n loadingText={item.loadingText}\n disabled={item.disabled}\n disabledReason={showFeedback ? undefined : item.disabledReason} // don't show disabled reason when popover feedback is shown\n iconName={hasIcon ? item.iconName : 'close'}\n iconUrl={item.iconUrl}\n iconSvg={item.iconSvg}\n pressedIconName={hasIcon ? item.pressedIconName : 'close'}\n pressedIconUrl={item.pressedIconUrl}\n pressedIconSvg={item.pressedIconSvg}\n ariaLabel={item.text}\n onChange={event => fireCancelableEvent(onItemClick, { id: item.id, pressed: event.detail.pressed })}\n ref={ref}\n data-testid={item.id}\n data-itemid={item.id}\n className={clsx(testUtilStyles.item, testUtilStyles['button-group-item'])}\n analyticsAction={item.analyticsAction}\n __title=\"\"\n >\n {item.text}\n </InternalToggleButton>\n {(canShowTooltip || canShowFeedback) && (\n <Tooltip\n className={testUtilStyles['button-group-tooltip']}\n getTrack={() => containerRef.current}\n content={\n (showFeedback && <InternalLiveRegion tagName=\"span\">{feedbackContent}</InternalLiveRegion>) || item.text\n }\n onEscape={onTooltipDismiss}\n />\n )}\n </div>\n );\n }\n);\n\nexport default IconToggleButtonItem;\n"]}
1
+ {"version":3,"file":"icon-toggle-button-item.js","sourceRoot":"","sources":["../../../src/button-group/icon-toggle-button-item.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAK7C,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAU1D,MAAM,oBAAoB,GAAG,UAAU,CACrC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PDX-License-Identifier: Apache-2.0\nimport React, { forwardRef } from 'react';\nimport clsx from 'clsx';\n\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { ButtonProps } from '../button/interfaces.js';\nimport { fireCancelableEvent } from '../internal/events/index.js';\nimport InternalLiveRegion from '../live-region/internal.js';\nimport { InternalToggleButton } from '../toggle-button/internal.js';\nimport Tooltip from '../tooltip/internal.js';\nimport { CancelableEventHandler } from '../types/events';\nimport { ButtonGroupProps } from './interfaces.js';\nimport { InternalIconToggleButton } from './internal-interfaces.js';\n\nimport testUtilStyles from './test-classes/styles.css.js';\n\ninterface IconToggleButtonItemProps {\n item: InternalIconToggleButton;\n showTooltip: boolean;\n showFeedback: boolean;\n onTooltipDismiss: () => void;\n onItemClick?: CancelableEventHandler<ButtonGroupProps.ItemClickDetails>;\n}\n\nconst IconToggleButtonItem = forwardRef(\n (\n { item, showTooltip, showFeedback, onTooltipDismiss, onItemClick }: IconToggleButtonItemProps,\n ref: React.Ref<ButtonProps.Ref>\n ) => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const hasIcon = item.iconName || item.iconUrl || item.iconSvg;\n const hasPressedIcon = item.pressedIconName || item.pressedIconUrl || item.pressedIconSvg;\n\n if (!hasIcon) {\n warnOnce('ButtonGroup', `Missing icon for item with id: ${item.id}`);\n }\n if (!hasPressedIcon) {\n warnOnce('ButtonGroup', `Missing pressed icon for item with id: ${item.id}`);\n }\n\n const feedbackContent = item.pressed ? (item.pressedPopoverFeedback ?? item.popoverFeedback) : item.popoverFeedback;\n const canShowTooltip = showTooltip && !item.disabled && !item.loading;\n const canShowFeedback = showTooltip && showFeedback && feedbackContent;\n return (\n <div ref={containerRef}>\n <InternalToggleButton\n variant=\"icon\"\n pressed={item.pressed}\n loading={item.loading}\n loadingText={item.loadingText}\n disabled={item.disabled}\n disabledReason={showFeedback ? undefined : item.disabledReason} // don't show disabled reason when popover feedback is shown\n iconName={hasIcon ? item.iconName : 'close'}\n iconUrl={item.iconUrl}\n iconSvg={item.iconSvg}\n pressedIconName={hasIcon ? item.pressedIconName : 'close'}\n pressedIconUrl={item.pressedIconUrl}\n pressedIconSvg={item.pressedIconSvg}\n ariaLabel={item.text}\n onChange={event => fireCancelableEvent(onItemClick, { id: item.id, pressed: event.detail.pressed })}\n ref={ref}\n data-testid={item.id}\n data-itemid={item.id}\n className={clsx(testUtilStyles.item, testUtilStyles['button-group-item'])}\n analyticsAction={item.analyticsAction}\n __title=\"\"\n >\n {item.text}\n </InternalToggleButton>\n {(canShowTooltip || canShowFeedback) && (\n <Tooltip\n className={testUtilStyles['button-group-tooltip']}\n getTrack={() => containerRef.current}\n content={\n (showFeedback && <InternalLiveRegion tagName=\"span\">{feedbackContent}</InternalLiveRegion>) || item.text\n }\n onEscape={onTooltipDismiss}\n />\n )}\n </div>\n );\n }\n);\n\nexport default IconToggleButtonItem;\n"]}
@@ -1,7 +1,5 @@
1
1
  import { ButtonDropdownProps } from '../button-dropdown/interfaces';
2
2
  import { IconProps } from '../icon/interfaces';
3
- import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
4
- import { SomeRequired } from '../internal/types';
5
3
  import { BaseComponentProps } from '../types/base-component';
6
4
  import { NonCancelableEventHandler } from '../types/events';
7
5
  export interface ButtonGroupProps extends BaseComponentProps {
@@ -110,12 +108,6 @@ export interface ButtonGroupProps extends BaseComponentProps {
110
108
  */
111
109
  style?: ButtonGroupProps.Style;
112
110
  }
113
- export interface InternalIconButton extends ButtonGroupProps.IconButton {
114
- analyticsAction?: string;
115
- }
116
- export interface InternalIconToggleButton extends ButtonGroupProps.IconToggleButton {
117
- analyticsAction?: string;
118
- }
119
111
  export interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {
120
112
  iconSvg?: string;
121
113
  }
@@ -128,12 +120,6 @@ export interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown,
128
120
  }
129
121
  export type ItemOrGroupRuntime = ItemRuntime | ButtonGroupProps.Group;
130
122
  export type ItemRuntime = IconButtonRuntime | IconToggleButtonRuntime | ButtonGroupProps.IconFileInput | MenuDropdownRuntime;
131
- export type InternalItemOrGroup = InternalItem | ButtonGroupProps.Group;
132
- export type InternalItem = InternalIconButton | InternalIconToggleButton | ButtonGroupProps.IconFileInput | ButtonGroupProps.MenuDropdown;
133
- export interface InternalButtonGroupProps extends SomeRequired<ButtonGroupProps, 'dropdownExpandToViewport'>, InternalBaseComponentProps {
134
- style?: ButtonGroupProps.Style;
135
- items: ReadonlyArray<InternalItemOrGroup>;
136
- }
137
123
  export declare namespace ButtonGroupProps {
138
124
  type Variant = 'icon';
139
125
  type ItemOrGroup = Item | Group;
@@ -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,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC;IAClC;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACnD;;OAEG;IACH,WAAW,CAAC,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C,EAAE,MAAM,CAAC;aAChB,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,MAAM,CAAC,EAAE,MAAM,CAAC;gBAChB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;aAChB,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;KACH;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 { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\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 * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\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 * * `href` (optional, string) - Renders the button as a link with the specified URL. Use for actions that navigate, such as opening a page in a new browser tab.\n * * `target` (optional, string) - Specifies where to open the linked URL (for example, `_blank` to open in a new tab). This property only applies when `href` is set.\n * * `rel` (optional, string) - Adds a `rel` attribute to the link. By default, the component sets `rel` to \"noopener noreferrer\" when `target` is `\"_blank\"`. This property only applies when `href` is set.\n * * `download` (optional, boolean | string) - Specifies whether the linked URL, when selected, prompts the user to download instead of navigate. You can provide a string to suggest a file name. This property only applies when `href` is set.\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 * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\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 * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for the menu 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/). Defaults to `ellipsis`.\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 * * `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 * An object containing CSS properties to customize the button group's visual appearance.\n * Refer to the [style](/components/button-group/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ButtonGroupProps.Style;\n}\n\nexport interface InternalIconButton extends ButtonGroupProps.IconButton {\n analyticsAction?: string;\n}\nexport interface InternalIconToggleButton extends ButtonGroupProps.IconToggleButton {\n analyticsAction?: string;\n}\n\nexport interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {\n iconSvg?: string;\n}\nexport interface IconToggleButtonRuntime\n extends Omit<\n ButtonGroupProps.IconToggleButton,\n 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback'\n > {\n iconSvg?: string;\n pressedIconSvg?: string;\n}\nexport interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown, 'iconSvg'> {\n iconSvg?: string;\n}\nexport type ItemOrGroupRuntime = ItemRuntime | ButtonGroupProps.Group;\nexport type ItemRuntime =\n | IconButtonRuntime\n | IconToggleButtonRuntime\n | ButtonGroupProps.IconFileInput\n | MenuDropdownRuntime;\n\nexport type InternalItemOrGroup = InternalItem | ButtonGroupProps.Group;\nexport type InternalItem =\n | InternalIconButton\n | InternalIconToggleButton\n | ButtonGroupProps.IconFileInput\n | ButtonGroupProps.MenuDropdown;\n\nexport interface InternalButtonGroupProps\n extends SomeRequired<ButtonGroupProps, 'dropdownExpandToViewport'>,\n InternalBaseComponentProps {\n style?: ButtonGroupProps.Style;\n items: ReadonlyArray<InternalItemOrGroup>;\n}\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 disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\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 disabledReason?: string;\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 disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\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 export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n paddingBlock?: string;\n paddingInline?: string;\n boxShadow?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n item?: {\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n boxShadow?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\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 '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\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 * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\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 * * `href` (optional, string) - Renders the button as a link with the specified URL. Use for actions that navigate, such as opening a page in a new browser tab.\n * * `target` (optional, string) - Specifies where to open the linked URL (for example, `_blank` to open in a new tab). This property only applies when `href` is set.\n * * `rel` (optional, string) - Adds a `rel` attribute to the link. By default, the component sets `rel` to \"noopener noreferrer\" when `target` is `\"_blank\"`. This property only applies when `href` is set.\n * * `download` (optional, boolean | string) - Specifies whether the linked URL, when selected, prompts the user to download instead of navigate. You can provide a string to suggest a file name. This property only applies when `href` is set.\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 * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\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 * * `disabledReason` (optional, boolean) - Provides a reason why the button is disabled (only when `disabled` is `true`). If provided, the button becomes focusable.\n * * `loading` (optional, boolean) - The loading state indication for the menu 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/). Defaults to `ellipsis`.\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 * * `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 * An object containing CSS properties to customize the button group's visual appearance.\n * Refer to the [style](/components/button-group/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: ButtonGroupProps.Style;\n}\n\nexport interface IconButtonRuntime extends Omit<ButtonGroupProps.IconButton, 'iconSvg' | 'popoverFeedback'> {\n iconSvg?: string;\n}\nexport interface IconToggleButtonRuntime\n extends Omit<\n ButtonGroupProps.IconToggleButton,\n 'iconSvg' | 'pressedIconSvg' | 'popoverFeedback' | 'pressedPopoverFeedback'\n > {\n iconSvg?: string;\n pressedIconSvg?: string;\n}\nexport interface MenuDropdownRuntime extends Omit<ButtonGroupProps.MenuDropdown, 'iconSvg'> {\n iconSvg?: string;\n}\nexport type ItemOrGroupRuntime = ItemRuntime | ButtonGroupProps.Group;\nexport type ItemRuntime =\n | IconButtonRuntime\n | IconToggleButtonRuntime\n | ButtonGroupProps.IconFileInput\n | MenuDropdownRuntime;\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 disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\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 disabledReason?: string;\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 disabledReason?: string;\n loading?: boolean;\n loadingText?: string;\n iconName?: IconProps.Name;\n iconAlt?: string;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\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 export interface Style {\n root?: {\n background?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n paddingBlock?: string;\n paddingInline?: string;\n boxShadow?: string;\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n item?: {\n color?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n boxShadow?: {\n active?: string;\n default?: string;\n disabled?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n }\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
2
+ import { SomeRequired } from '../internal/types';
3
+ import { ButtonGroupProps } from './interfaces';
4
+ export interface InternalIconButton extends ButtonGroupProps.IconButton {
5
+ analyticsAction?: string;
6
+ }
7
+ export interface InternalIconToggleButton extends ButtonGroupProps.IconToggleButton {
8
+ analyticsAction?: string;
9
+ }
10
+ export type InternalItemOrGroup = InternalItem | ButtonGroupProps.Group;
11
+ export type InternalItem = InternalIconButton | InternalIconToggleButton | ButtonGroupProps.IconFileInput | ButtonGroupProps.MenuDropdown;
12
+ export interface InternalButtonGroupProps extends SomeRequired<ButtonGroupProps, 'dropdownExpandToViewport'>, InternalBaseComponentProps {
13
+ style?: ButtonGroupProps.Style;
14
+ items: ReadonlyArray<InternalItemOrGroup>;
15
+ }
16
+ //# sourceMappingURL=internal-interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-group/internal-interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB,CAAC,UAAU;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB,CAAC,gBAAgB;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACxE,MAAM,MAAM,YAAY,GACpB,kBAAkB,GAClB,wBAAwB,GACxB,gBAAgB,CAAC,aAAa,GAC9B,gBAAgB,CAAC,YAAY,CAAC;AAElC,MAAM,WAAW,wBACf,SAAQ,YAAY,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,EAChE,0BAA0B;IAC5B,KAAK,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC;IAC/B,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=internal-interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/button-group/internal-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport { ButtonGroupProps } from './interfaces';\n\nexport interface InternalIconButton extends ButtonGroupProps.IconButton {\n analyticsAction?: string;\n}\nexport interface InternalIconToggleButton extends ButtonGroupProps.IconToggleButton {\n analyticsAction?: string;\n}\n\nexport type InternalItemOrGroup = InternalItem | ButtonGroupProps.Group;\nexport type InternalItem =\n | InternalIconButton\n | InternalIconToggleButton\n | ButtonGroupProps.IconFileInput\n | ButtonGroupProps.MenuDropdown;\n\nexport interface InternalButtonGroupProps\n extends SomeRequired<ButtonGroupProps, 'dropdownExpandToViewport'>,\n InternalBaseComponentProps {\n style?: ButtonGroupProps.Style;\n items: ReadonlyArray<InternalItemOrGroup>;\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { ButtonGroupProps, InternalButtonGroupProps } from './interfaces';
2
+ import { ButtonGroupProps } from './interfaces';
3
+ import { InternalButtonGroupProps } from './internal-interfaces';
3
4
  declare const InternalButtonGroup: React.ForwardRefExoticComponent<InternalButtonGroupProps & React.RefAttributes<ButtonGroupProps.Ref>>;
4
5
  export default InternalButtonGroup;
5
6
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAQjF,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO1E,QAAA,MAAM,mBAAmB,uGA6ExB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAQjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAOjE,QAAA,MAAM,mBAAmB,uGA6ExB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
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,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AAEjE,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,MAAM,mBAAmB,GAAG,UAAU,CACpC,CACE,EACE,KAAK,GAAG,EAAE,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,KAAK,EACL,iBAAiB,EACjB,GAAG,KAAK,EACiB,EAC3B,GAAoC,EACpC,EAAE;IACF,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,MAAM,CAAyC,EAAE,CAAC,CAAC;IACpE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA6C,IAAI,CAAC,CAAC;IAEzF,mBAAmB,CAAC,GAAG,E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AC;YACjC,MAAM,UAAU,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,MAAK,OAAO,CAAC;YACjD,MAAM,gBAAgB,GAAG,aAAa,IAAI,CAAC,CAAC,aAAa,IAAI,UAAU,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC;YAExF,IAAI,UAAU,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACjD,QAAQ,CAAC,aAAa,EAAE,qDAAqD,CAAC,CAAC;YACjF,CAAC;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,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC,CACzF,CACP,CAAC,CAAC,CAAC,CACF,WAAW,CAAC,WAAW,EAAE,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,CACzC,CACc,CAClB,CAAC;QACJ,CAAC,CAAC,CACqB,CACrB,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, 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 InternalNavigableGroup from '../navigable-group/internal';\nimport { ButtonGroupProps, InternalButtonGroupProps } from './interfaces';\nimport ItemElement from './item-element.js';\nimport { getButtonGroupStyles } from './style';\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 style,\n __internalRootRef,\n ...props\n }: InternalButtonGroupProps,\n ref: React.Ref<ButtonGroupProps.Ref>\n ) => {\n const baseProps = getBaseProps(props);\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 const stylePropertiesAndVariables = getButtonGroupStyles(style);\n return (\n <div\n {...baseProps}\n ref={__internalRootRef}\n className={clsx(styles.root, testUtilStyles['button-group'], baseProps.className)}\n role=\"toolbar\"\n aria-label={ariaLabel}\n style={stylePropertiesAndVariables}\n >\n <InternalNavigableGroup getItemKey={item => item.dataset.itemid!}>\n {items.map((itemOrGroup, index) => {\n const itemContent = (item: ButtonGroupProps.Item, position: string) => (\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 position={position}\n style={style}\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, subIndex) => itemContent(item, `${index + 1},${subIndex + 1}`))}\n </div>\n ) : (\n itemContent(itemOrGroup, `${index + 1}`)\n )}\n </React.Fragment>\n );\n })}\n </InternalNavigableGroup>\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,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAGzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AAGjE,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAE1D,MAAM,mBAAmB,GAAG,UAAU,CACpC,CACE,EACE,KAAK,GAAG,EAAE,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,KAAK,EACL,iBAAiB,EACjB,GAAG,KAAK,EACiB,EAC3B,GAAoC,EACpC,EAAE;IACF,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,QAAQ,GAAG,MAAM,CAAyC,EAAE,CAAC,CAAC;IACpE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copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, useImperativeHandle, useRef, useState } from 'react';\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 InternalNavigableGroup from '../navigable-group/internal';\nimport { ButtonGroupProps } from './interfaces';\nimport { InternalButtonGroupProps } from './internal-interfaces';\nimport ItemElement from './item-element.js';\nimport { getButtonGroupStyles } from './style';\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 style,\n __internalRootRef,\n ...props\n }: InternalButtonGroupProps,\n ref: React.Ref<ButtonGroupProps.Ref>\n ) => {\n const baseProps = getBaseProps(props);\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 const stylePropertiesAndVariables = getButtonGroupStyles(style);\n return (\n <div\n {...baseProps}\n ref={__internalRootRef}\n className={clsx(styles.root, testUtilStyles['button-group'], baseProps.className)}\n role=\"toolbar\"\n aria-label={ariaLabel}\n style={stylePropertiesAndVariables}\n >\n <InternalNavigableGroup getItemKey={item => item.dataset.itemid!}>\n {items.map((itemOrGroup, index) => {\n const itemContent = (item: ButtonGroupProps.Item, position: string) => (\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 position={position}\n style={style}\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, subIndex) => itemContent(item, `${index + 1},${subIndex + 1}`))}\n </div>\n ) : (\n itemContent(itemOrGroup, `${index + 1}`)\n )}\n </React.Fragment>\n );\n })}\n </InternalNavigableGroup>\n </div>\n );\n }\n);\n\nexport default InternalButtonGroup;\n"]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { InternalColumnLayoutProps } from '../interfaces';
2
+ import { InternalColumnLayoutProps } from '../internal-interfaces';
3
3
  export declare function calculcateCssColumnCount(columns: number, minColumnWidth: number, containerWidth: number | null): number;
4
4
  interface FlexibleColumnLayoutProps extends Pick<InternalColumnLayoutProps, 'minColumnWidth' | 'columns' | 'variant' | 'borders' | 'disableGutters' | '__tagOverride'> {
5
5
  children: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/column-layout/flexible-column-layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAM1D,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,GAAG,IAAI,GAC5B,MAAM,CAaR;AAED,UAAU,yBACR,SAAQ,IAAI,CACV,yBAAyB,EACzB,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAC1F;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,OAAW,EACX,cAAkB,EAClB,cAAc,EACd,OAAO,EACP,QAAQ,EACR,aAAa,GACd,EAAE,yBAAyB,eAqC3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/column-layout/flexible-column-layout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAMnE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,cAAc,EAAE,MAAM,GAAG,IAAI,GAC5B,MAAM,CAaR;AAED,UAAU,yBACR,SAAQ,IAAI,CACV,yBAAyB,EACzB,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAC1F;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,OAAW,EACX,cAAkB,EAClB,cAAc,EACd,OAAO,EACP,QAAQ,EACR,aAAa,GACd,EAAE,yBAAyB,eAqC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/column-layout/flexible-column-layout/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,GAAG,CAAC,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AoB,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CACpD,EACD,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,WAAW,mBAAmB,EAAE,IAEvE,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAClC,sEAAsE;QACtE,MAAM,GAAG,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAgC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAEnG,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAClC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC3B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,GAAG,WAAW,KAAK,CAAC;aAChD,CAAC,IAED,KAAK,CACF,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\n\nimport { flattenChildren } from '../../internal/utils/flatten-children';\nimport { InternalColumnLayoutProps } from '../interfaces';\n\nimport styles from './styles.css.js';\n\nconst isOdd = (value: number): boolean => value % 2 !== 0;\n\nexport function calculcateCssColumnCount(\n columns: number,\n minColumnWidth: number,\n containerWidth: number | null\n): number {\n if (!containerWidth) {\n return columns;\n }\n\n // First, calculate how many columns we can have based on the current container width and minColumnWidth.\n const targetColumnCount = Math.min(columns, Math.floor(containerWidth / minColumnWidth));\n\n // When we start wrapping into fewer columns than desired, we want to keep the number of columns even.\n return Math.max(\n 1,\n targetColumnCount < columns && isOdd(targetColumnCount) ? targetColumnCount - 1 : targetColumnCount\n );\n}\n\ninterface FlexibleColumnLayoutProps\n extends Pick<\n InternalColumnLayoutProps,\n 'minColumnWidth' | 'columns' | 'variant' | 'borders' | 'disableGutters' | '__tagOverride'\n > {\n children: React.ReactNode;\n}\n\nexport default function FlexibleColumnLayout({\n columns = 1,\n minColumnWidth = 0,\n disableGutters,\n variant,\n children,\n __tagOverride,\n}: FlexibleColumnLayoutProps) {\n const [containerWidth, containerRef] = useContainerQuery(rect => rect.contentBoxWidth);\n\n const columnCount = calculcateCssColumnCount(columns, minColumnWidth, containerWidth);\n const shouldDisableGutters = variant !== 'text-grid' && disableGutters;\n\n // Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n const flattenedChildren = flattenChildren(children, 'ColumnLayout');\n const Tag = (__tagOverride ?? 'div') as 'div';\n\n return (\n <Tag\n ref={containerRef}\n className={clsx(\n styles['css-grid'],\n styles[`grid-variant-${variant}`],\n shouldDisableGutters && [styles['grid-no-gutters']]\n )}\n style={{ gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))` }}\n >\n {flattenedChildren.map((child, i) => {\n // If this react child is a primitive value, the key will be undefined\n const key = child && typeof child === 'object' ? (child as Record<'key', unknown>).key : undefined;\n\n return (\n <div\n key={key ? String(key) : undefined}\n className={clsx(styles.item, {\n [styles['first-column']]: i % columnCount === 0,\n })}\n >\n {child}\n </div>\n );\n })}\n </Tag>\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/column-layout/flexible-column-layout/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,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E,CAAC,EACjC,oBAAoB,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CACpD,EACD,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,WAAW,mBAAmB,EAAE,IAEvE,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAClC,sEAAsE;QACtE,MAAM,GAAG,GAAG,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAgC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAEnG,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAClC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBAC3B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,GAAG,WAAW,KAAK,CAAC;aAChD,CAAC,IAED,KAAK,CACF,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useContainerQuery } from '@cloudscape-design/component-toolkit';\n\nimport { flattenChildren } from '../../internal/utils/flatten-children';\nimport { InternalColumnLayoutProps } from '../internal-interfaces';\n\nimport styles from './styles.css.js';\n\nconst isOdd = (value: number): boolean => value % 2 !== 0;\n\nexport function calculcateCssColumnCount(\n columns: number,\n minColumnWidth: number,\n containerWidth: number | null\n): number {\n if (!containerWidth) {\n return columns;\n }\n\n // First, calculate how many columns we can have based on the current container width and minColumnWidth.\n const targetColumnCount = Math.min(columns, Math.floor(containerWidth / minColumnWidth));\n\n // When we start wrapping into fewer columns than desired, we want to keep the number of columns even.\n return Math.max(\n 1,\n targetColumnCount < columns && isOdd(targetColumnCount) ? targetColumnCount - 1 : targetColumnCount\n );\n}\n\ninterface FlexibleColumnLayoutProps\n extends Pick<\n InternalColumnLayoutProps,\n 'minColumnWidth' | 'columns' | 'variant' | 'borders' | 'disableGutters' | '__tagOverride'\n > {\n children: React.ReactNode;\n}\n\nexport default function FlexibleColumnLayout({\n columns = 1,\n minColumnWidth = 0,\n disableGutters,\n variant,\n children,\n __tagOverride,\n}: FlexibleColumnLayoutProps) {\n const [containerWidth, containerRef] = useContainerQuery(rect => rect.contentBoxWidth);\n\n const columnCount = calculcateCssColumnCount(columns, minColumnWidth, containerWidth);\n const shouldDisableGutters = variant !== 'text-grid' && disableGutters;\n\n // Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n const flattenedChildren = flattenChildren(children, 'ColumnLayout');\n const Tag = (__tagOverride ?? 'div') as 'div';\n\n return (\n <Tag\n ref={containerRef}\n className={clsx(\n styles['css-grid'],\n styles[`grid-variant-${variant}`],\n shouldDisableGutters && [styles['grid-no-gutters']]\n )}\n style={{ gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))` }}\n >\n {flattenedChildren.map((child, i) => {\n // If this react child is a primitive value, the key will be undefined\n const key = child && typeof child === 'object' ? (child as Record<'key', unknown>).key : undefined;\n\n return (\n <div\n key={key ? String(key) : undefined}\n className={clsx(styles.item, {\n [styles['first-column']]: i % columnCount === 0,\n })}\n >\n {child}\n </div>\n );\n })}\n </Tag>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { InternalColumnLayoutProps } from './interfaces';
3
2
  import { ColumnLayoutBreakpoint } from './internal';
3
+ import { InternalColumnLayoutProps } from './internal-interfaces';
4
4
  interface GridColumnLayoutProps extends Required<Pick<InternalColumnLayoutProps, 'columns' | 'variant' | 'borders' | 'disableGutters'>>, Pick<InternalColumnLayoutProps, '__tagOverride'> {
5
5
  children: React.ReactNode;
6
6
  __breakpoint?: ColumnLayoutBreakpoint;
@@ -1 +1 @@
1
- {"version":3,"file":"grid-column-layout.d.ts","sourceRoot":"","sources":["../../../src/column-layout/grid-column-layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAmB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAYrE,UAAU,qBACR,SAAQ,QAAQ,CAAC,IAAI,CAAC,yBAAyB,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC,CAAC,EACrG,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,EAAE,qBAAqB,eA4BvB"}
1
+ {"version":3,"file":"grid-column-layout.d.ts","sourceRoot":"","sources":["../../../src/column-layout/grid-column-layout.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAmB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAYlE,UAAU,qBACR,SAAQ,QAAQ,CAAC,IAAI,CAAC,yBAAyB,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC,CAAC,EACrG,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC;IAClD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,aAAa,GACd,EAAE,qBAAqB,eA4BvB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IAAI,cAAc,CAAC;IAClE,MAAM,2BAA2B,GAAG,CAAC,iBAAiB,IAAI,CAAC,OAAO,KAAK,YAAY,IAAI,OAAO,KAAK,KAAK,CAAC,CAAC;IAC1G,MAAM,yBAAyB,GAAG,CAAC,iBAAiB,IAAI,CAAC,OAAO,KAAK,UAAU,IAAI,OAAO,KAAK,KAAK,CAAC,CAAC;IAEtG,wFAAwF;IACxF,MAAM,iBAAiB,GAAG,eAAe,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAEpE,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC;IAEnE,OAAO,CACL,oBAAC,YAAY,IACX,GAAG,EAAE,GAAG,EACR,cAAc,EAAE,IAAI,EACpB,cAAc,EAAE,MAAM,CAAC,MAAA,WAAW,CAAC,OAAO,CAAC,mCAAI,EAAE,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAC5E,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,gBAAgB,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,gBAAgB,OAAO,EAAE,CAAC,EAAE;YACjG,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC,EAAE,2BAA2B;YAChE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,yBAAyB;YAC5D,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,EAAE,oBAAoB;SAClD,CAAC,EACF,YAAY,EAAE,YAAY,IAAI,UAAU,EACxC,qBAAqB,EAAE,UAAU,CAAC,EAAE,CAAC,UAAU,IAAI,MAAM,CAAC,mBAAmB,UAAU,EAAE,CAAC,EAC1F,aAAa,EAAE,aAAa,IAE3B,QAAQ,CACI,CAChB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { GridProps } from '../grid/interfaces';\nimport InternalGrid from '../grid/internal';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { flattenChildren } from '../internal/utils/flatten-children';\nimport { InternalColumnLayoutProps } from './interfaces';\nimport { COLUMN_TRIGGERS, ColumnLayoutBreakpoint } from './internal';\nimport { repeat } from './util';\n\nimport styles from './styles.css.js';\n\nconst COLUMN_DEFS: Record<number, GridProps.ElementDefinition | undefined> = {\n 1: { colspan: { default: 12, xxs: 12, xs: 12 } },\n 2: { colspan: { default: 12, xxs: 6, xs: 6 } },\n 3: { colspan: { default: 12, xxs: 6, xs: 4 } },\n 4: { colspan: { default: 12, xxs: 6, xs: 3 } },\n};\n\ninterface GridColumnLayoutProps\n extends Required<Pick<InternalColumnLayoutProps, 'columns' | 'variant' | 'borders' | 'disableGutters'>>,\n Pick<InternalColumnLayoutProps, '__tagOverride'> {\n children: React.ReactNode;\n __breakpoint?: ColumnLayoutBreakpoint;\n}\n\nexport default function GridColumnLayout({\n columns,\n variant,\n borders,\n disableGutters,\n __breakpoint,\n children,\n __tagOverride,\n}: GridColumnLayoutProps) {\n const isTextGridVariant = variant === 'text-grid';\n const shouldDisableGutters = !isTextGridVariant && disableGutters;\n const shouldHaveHorizontalBorders = !isTextGridVariant && (borders === 'horizontal' || borders === 'all');\n const shouldHaveVerticalBorders = !isTextGridVariant && (borders === 'vertical' || borders === 'all');\n\n // Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n const flattenedChildren = flattenChildren(children, 'ColumnLayout');\n\n const [breakpoint, ref] = useContainerBreakpoints(COLUMN_TRIGGERS);\n\n return (\n <InternalGrid\n ref={ref}\n disableGutters={true}\n gridDefinition={repeat(COLUMN_DEFS[columns] ?? {}, flattenedChildren.length)}\n className={clsx(styles.grid, styles[`grid-columns-${columns}`], styles[`grid-variant-${variant}`], {\n [styles['grid-horizontal-borders']]: shouldHaveHorizontalBorders,\n [styles['grid-vertical-borders']]: shouldHaveVerticalBorders,\n [styles['grid-no-gutters']]: shouldDisableGutters,\n })}\n __breakpoint={__breakpoint || breakpoint}\n __responsiveClassName={breakpoint => breakpoint && styles[`grid-breakpoint-${breakpoint}`]}\n __tagOverride={__tagOverride}\n >\n {children}\n </InternalGrid>\n );\n}\n"]}
1
+ {"version":3,"file":"grid-column-layout.js","sourceRoot":"","sources":["../../../src/column-layout/grid-column-layout.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,eAAe,EAA0B,MAAM,YAAY,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,WAAW,GAA4D;IAC3E,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAChD,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;IAC9C,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;IAC9C,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;CAC/C,CAAC;AASF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,OAAO,EACP,OAAO,EACP,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AChB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { GridProps } from '../grid/interfaces';\nimport InternalGrid from '../grid/internal';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { flattenChildren } from '../internal/utils/flatten-children';\nimport { COLUMN_TRIGGERS, ColumnLayoutBreakpoint } from './internal';\nimport { InternalColumnLayoutProps } from './internal-interfaces';\nimport { repeat } from './util';\n\nimport styles from './styles.css.js';\n\nconst COLUMN_DEFS: Record<number, GridProps.ElementDefinition | undefined> = {\n 1: { colspan: { default: 12, xxs: 12, xs: 12 } },\n 2: { colspan: { default: 12, xxs: 6, xs: 6 } },\n 3: { colspan: { default: 12, xxs: 6, xs: 4 } },\n 4: { colspan: { default: 12, xxs: 6, xs: 3 } },\n};\n\ninterface GridColumnLayoutProps\n extends Required<Pick<InternalColumnLayoutProps, 'columns' | 'variant' | 'borders' | 'disableGutters'>>,\n Pick<InternalColumnLayoutProps, '__tagOverride'> {\n children: React.ReactNode;\n __breakpoint?: ColumnLayoutBreakpoint;\n}\n\nexport default function GridColumnLayout({\n columns,\n variant,\n borders,\n disableGutters,\n __breakpoint,\n children,\n __tagOverride,\n}: GridColumnLayoutProps) {\n const isTextGridVariant = variant === 'text-grid';\n const shouldDisableGutters = !isTextGridVariant && disableGutters;\n const shouldHaveHorizontalBorders = !isTextGridVariant && (borders === 'horizontal' || borders === 'all');\n const shouldHaveVerticalBorders = !isTextGridVariant && (borders === 'vertical' || borders === 'all');\n\n // Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n const flattenedChildren = flattenChildren(children, 'ColumnLayout');\n\n const [breakpoint, ref] = useContainerBreakpoints(COLUMN_TRIGGERS);\n\n return (\n <InternalGrid\n ref={ref}\n disableGutters={true}\n gridDefinition={repeat(COLUMN_DEFS[columns] ?? {}, flattenedChildren.length)}\n className={clsx(styles.grid, styles[`grid-columns-${columns}`], styles[`grid-variant-${variant}`], {\n [styles['grid-horizontal-borders']]: shouldHaveHorizontalBorders,\n [styles['grid-vertical-borders']]: shouldHaveVerticalBorders,\n [styles['grid-no-gutters']]: shouldDisableGutters,\n })}\n __breakpoint={__breakpoint || breakpoint}\n __responsiveClassName={breakpoint => breakpoint && styles[`grid-breakpoint-${breakpoint}`]}\n __tagOverride={__tagOverride}\n >\n {children}\n </InternalGrid>\n );\n}\n"]}
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
- import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
2
  import { BaseComponentProps } from '../types/base-component';
4
- import { ColumnLayoutBreakpoint } from './internal';
5
3
  export interface ColumnLayoutProps extends BaseComponentProps {
6
4
  /**
7
5
  * Specifies the number of columns in each grid row.
@@ -38,11 +36,4 @@ export declare namespace ColumnLayoutProps {
38
36
  type Variant = 'default' | 'text-grid';
39
37
  type Borders = 'none' | 'vertical' | 'horizontal' | 'all';
40
38
  }
41
- export interface InternalColumnLayoutProps extends ColumnLayoutProps, InternalBaseComponentProps {
42
- __breakpoint?: ColumnLayoutBreakpoint;
43
- /**
44
- * Overrides the default wrapper HTML tag.
45
- */
46
- __tagOverride?: 'dl';
47
- }
48
39
  //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/column-layout/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,i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AG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,KAAK,CAAC;CAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/column-layout/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { BaseComponentProps } from '../types/base-component';\nimport { ColumnLayoutBreakpoint } from './internal';\n\nexport interface ColumnLayoutProps extends BaseComponentProps {\n /**\n * Specifies the number of columns in each grid row.\n * When `minColumnWidth` is not set, only up to 4 columns are supported.\n */\n columns?: number;\n\n /**\n * Specifies the content type. This determines the spacing of the grid.\n */\n variant?: ColumnLayoutProps.Variant;\n\n /**\n * Controls whether dividers are placed between rows and columns.\n *\n * Note: This is not supported when used with `minColumnWidth`.\n */\n borders?: ColumnLayoutProps.Borders;\n\n /**\n * Determines whether the default gutters between columns are removed.\n */\n disableGutters?: boolean;\n\n /**\n * Use together with `columns` to specify the desired minimum width for each column in pixels.\n *\n * The number of columns is determined by the value of this property, the available space,\n * and the maximum number of columns as defined by the `columns` property.\n */\n minColumnWidth?: number;\n\n /**\n * The columns to render.\n */\n children?: React.ReactNode;\n}\n\nexport namespace ColumnLayoutProps {\n export type Variant = 'default' | 'text-grid';\n export type Borders = 'none' | 'vertical' | 'horizontal' | 'all';\n}\n\nexport interface InternalColumnLayoutProps extends ColumnLayoutProps, InternalBaseComponentProps {\n __breakpoint?: ColumnLayoutBreakpoint;\n /**\n * Overrides the default wrapper HTML tag.\n */\n __tagOverride?: 'dl';\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/column-layout/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface ColumnLayoutProps extends BaseComponentProps {\n /**\n * Specifies the number of columns in each grid row.\n * When `minColumnWidth` is not set, only up to 4 columns are supported.\n */\n columns?: number;\n\n /**\n * Specifies the content type. This determines the spacing of the grid.\n */\n variant?: ColumnLayoutProps.Variant;\n\n /**\n * Controls whether dividers are placed between rows and columns.\n *\n * Note: This is not supported when used with `minColumnWidth`.\n */\n borders?: ColumnLayoutProps.Borders;\n\n /**\n * Determines whether the default gutters between columns are removed.\n */\n disableGutters?: boolean;\n\n /**\n * Use together with `columns` to specify the desired minimum width for each column in pixels.\n *\n * The number of columns is determined by the value of this property, the available space,\n * and the maximum number of columns as defined by the `columns` property.\n */\n minColumnWidth?: number;\n\n /**\n * The columns to render.\n */\n children?: React.ReactNode;\n}\n\nexport namespace ColumnLayoutProps {\n export type Variant = 'default' | 'text-grid';\n export type Borders = 'none' | 'vertical' | 'horizontal' | 'all';\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
2
+ import { ColumnLayoutProps } from './interfaces';
3
+ import { ColumnLayoutBreakpoint } from './internal';
4
+ export interface InternalColumnLayoutProps extends ColumnLayoutProps, InternalBaseComponentProps {
5
+ __breakpoint?: ColumnLayoutBreakpoint;
6
+ /**
7
+ * Overrides the default wrapper HTML tag.
8
+ */
9
+ __tagOverride?: 'dl';
10
+ }
11
+ //# sourceMappingURL=internal-interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-interfaces.d.ts","sourceRoot":"","sources":["../../../src/column-layout/internal-interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB,EAAE,0BAA0B;IAC9F,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=internal-interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/column-layout/internal-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { ColumnLayoutProps } from './interfaces';\nimport { ColumnLayoutBreakpoint } from './internal';\n\nexport interface InternalColumnLayoutProps extends ColumnLayoutProps, InternalBaseComponentProps {\n __breakpoint?: ColumnLayoutBreakpoint;\n /**\n * Overrides the default wrapper HTML tag.\n */\n __tagOverride?: 'dl';\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { InternalColumnLayoutProps } from './interfaces';
1
+ import { InternalColumnLayoutProps } from './internal-interfaces';
2
2
  export declare const COLUMN_TRIGGERS: readonly ["default", "xxs", "xs"];
3
3
  export type ColumnLayoutBreakpoint = (typeof COLUMN_TRIGGERS)[number] | null;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/column-layout/internal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAIzD,eAAO,MAAM,eAAe,mCAAoC,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,OAAW,EACX,OAAmB,EACnB,OAAgB,EAChB,cAAsB,EACtB,cAAc,EACd,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,yBAAyB,eA8B3B"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/column-layout/internal.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,eAAO,MAAM,eAAe,mCAAoC,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,OAAW,EACX,OAAmB,EACnB,OAAgB,EAChB,cAAsB,EACtB,cAAc,EACd,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,yBAAyB,eA8B3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/column-layout/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAC5D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAGpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAU,CAAC;AAGjE;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,MAAM,EAChB,cAAc,GAAG,KAAK,EACtB,cAAc,EACd,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,GAAG,SAAS,EACc;IAC1B,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAE1C,OAAO,CACL,gCAAS,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,iBAAiB,IACtG,cAAc,CAAC,CAAC,CAAC,CAChB,oBAAC,oBAAoB,IACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,IAE3B,QAAQ,CACY,CACxB,CAAC,CAAC,CAAC,CACF,oBAAC,gBAAgB,IACf,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,IAE3B,QAAQ,CACQ,CACpB,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport FlexibleColumnLayout from './flexible-column-layout';\nimport GridColumnLayout from './grid-column-layout';\nimport { InternalColumnLayoutProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\nexport const COLUMN_TRIGGERS = ['default', 'xxs', 'xs'] as const;\nexport type ColumnLayoutBreakpoint = (typeof COLUMN_TRIGGERS)[number] | null;\n\n/**\n * A responsive grid layout.\n */\nexport default function ColumnLayout({\n columns = 1,\n variant = 'default',\n borders = 'none',\n disableGutters = false,\n minColumnWidth,\n children,\n __tagOverride,\n __breakpoint,\n __internalRootRef,\n ...restProps\n}: InternalColumnLayoutProps) {\n const baseProps = getBaseProps(restProps);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['column-layout'])} ref={__internalRootRef}>\n {minColumnWidth ? (\n <FlexibleColumnLayout\n columns={columns}\n borders={borders}\n variant={variant}\n minColumnWidth={minColumnWidth}\n disableGutters={disableGutters}\n __tagOverride={__tagOverride}\n >\n {children}\n </FlexibleColumnLayout>\n ) : (\n <GridColumnLayout\n columns={columns}\n variant={variant}\n borders={borders}\n disableGutters={disableGutters}\n __breakpoint={__breakpoint}\n __tagOverride={__tagOverride}\n >\n {children}\n </GridColumnLayout>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/column-layout/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAC5D,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAGpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAU,CAAC;AAGjE;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,MAAM,EAChB,cAAc,GAAG,KAAK,EACtB,cAAc,EACd,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,GAAG,SAAS,EACc;IAC1B,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;IAE1C,OAAO,CACL,gCAAS,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,iBAAiB,IACtG,cAAc,CAAC,CAAC,CAAC,CAChB,oBAAC,oBAAoB,IACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,IAE3B,QAAQ,CACY,CACxB,CAAC,CAAC,CAAC,CACF,oBAAC,gBAAgB,IACf,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,IAE3B,QAAQ,CACQ,CACpB,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport FlexibleColumnLayout from './flexible-column-layout';\nimport GridColumnLayout from './grid-column-layout';\nimport { InternalColumnLayoutProps } from './internal-interfaces';\n\nimport styles from './styles.css.js';\n\nexport const COLUMN_TRIGGERS = ['default', 'xxs', 'xs'] as const;\nexport type ColumnLayoutBreakpoint = (typeof COLUMN_TRIGGERS)[number] | null;\n\n/**\n * A responsive grid layout.\n */\nexport default function ColumnLayout({\n columns = 1,\n variant = 'default',\n borders = 'none',\n disableGutters = false,\n minColumnWidth,\n children,\n __tagOverride,\n __breakpoint,\n __internalRootRef,\n ...restProps\n}: InternalColumnLayoutProps) {\n const baseProps = getBaseProps(restProps);\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['column-layout'])} ref={__internalRootRef}>\n {minColumnWidth ? (\n <FlexibleColumnLayout\n columns={columns}\n borders={borders}\n variant={variant}\n minColumnWidth={minColumnWidth}\n disableGutters={disableGutters}\n __tagOverride={__tagOverride}\n >\n {children}\n </FlexibleColumnLayout>\n ) : (\n <GridColumnLayout\n columns={columns}\n variant={variant}\n borders={borders}\n disableGutters={disableGutters}\n __breakpoint={__breakpoint}\n __tagOverride={__tagOverride}\n >\n {children}\n </GridColumnLayout>\n )}\n </div>\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
- import { InternalVariant } from './interfaces';
3
+ import { InternalVariant } from './internal-interfaces';
4
4
  interface ExpandableSectionContainerProps extends InternalBaseComponentProps {
5
5
  className?: string;
6
6
  header: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-section-container.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAI/C,UAAU,+BAAgC,SAAQ,0BAA0B;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,sBAAsB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5C,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED,eAAO,MAAM,0BAA0B,GAAI,4IAUxC,+BAA+B,gBA+CjC,CAAC"}
1
+ {"version":3,"file":"expandable-section-container.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-container.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxD,UAAU,+BAAgC,SAAQ,0BAA0B;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,sBAAsB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5C,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED,eAAO,MAAM,0BAA0B,GAAI,4IAUxC,+BAA+B,gBA+CjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-section-container.js","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-container.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAKvG,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AAYpE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,iBAAiB,EACjB,kCAAkC,EAClC,GAAG,IAAI,EACyB,EAAE,EAAE;IACpC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,IAAsC,CAAC,CAAC;IAC5F,MAAM,0BAA0B,GAAyD;QACvF,IAAI,EAAE,yBAAyB;QAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACvB,UAAU,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;KACnD,CAAC;IAEF,MAAM,iBAAiB,GAAG,kCAAkC;QAC1D,CAAC,CAAC,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC;QAC1E,CAAC,CAAC,EAAE,CAAC;IAEP,IAAI,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,CACL,oBAAC,sBAAsB,IACrB,iBAAiB,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,kBAAkB,EACxD,mBAAmB,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,YAAY;YAEpD,oBAAC,0BAA0B,OACrB,IAAI,EACR,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACtD,sBAAsB,EAAE,sBAAsB,IAAI,CAAC,QAAQ,EAC3D,qBAAqB,EAAE,IAAI,EAC3B,eAAe,EAAE,CAAC,QAAQ,EAC1B,iBAAiB,EAAE,iBAAiB,KAChC,iBAAiB,IAEpB,QAAQ,CACkB,CACN,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,CACL,6BACE,SAAS,EAAE,SAAS,KAChB,IAAI,EACR,GAAG,EAAE,iBAAiB,KAClB,iBAAiB,KACjB,0BAA0B,CAAC,IAAI,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;QAEvE,MAAM;QACN,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalContainerAsSubstep } from '../container/internal';\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { GeneratedAnalyticsMetadataExpandableSectionComponent } from './analytics-metadata/interfaces';\nimport { InternalVariant } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\ninterface ExpandableSectionContainerProps extends InternalBaseComponentProps {\n className?: string;\n header: React.ReactNode;\n children?: React.ReactNode;\n variant: InternalVariant;\n expanded: boolean | undefined;\n disableContentPaddings: boolean | undefined;\n __injectAnalyticsComponentMetadata?: boolean;\n}\n\nexport const ExpandableSectionContainer = ({\n className,\n children,\n header,\n variant,\n expanded,\n disableContentPaddings,\n __internalRootRef,\n __injectAnalyticsComponentMetadata,\n ...rest\n}: ExpandableSectionContainerProps) => {\n const analyticsMetadata = getAnalyticsMetadataProps(rest as BasePropsWithAnalyticsMetadata);\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataExpandableSectionComponent = {\n name: 'awsui.ExpandableSection',\n label: { root: 'self' },\n properties: { variant, expanded: `${!!expanded}` },\n };\n\n const metadataAttribute = __injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })\n : {};\n\n if (variant === 'container' || variant === 'stacked') {\n return (\n <AnalyticsFunnelSubStep\n subStepIdentifier={analyticsMetadata?.instanceIdentifier}\n subStepErrorContext={analyticsMetadata?.errorContext}\n >\n <InternalContainerAsSubstep\n {...rest}\n className={className}\n header={header}\n variant={variant === 'stacked' ? 'stacked' : 'default'}\n disableContentPaddings={disableContentPaddings || !expanded}\n disableHeaderPaddings={true}\n __hiddenContent={!expanded}\n __internalRootRef={__internalRootRef}\n {...metadataAttribute}\n >\n {children}\n </InternalContainerAsSubstep>\n </AnalyticsFunnelSubStep>\n );\n }\n\n return (\n <div\n className={className}\n {...rest}\n ref={__internalRootRef}\n {...metadataAttribute}\n {...getAnalyticsLabelAttribute(`.${analyticsSelectors['header-label']}`)}\n >\n {header}\n {children}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"expandable-section-container.js","sourceRoot":"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,0BAA0B,OACrB,IAAI,EACR,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACtD,sBAAsB,EAAE,sBAAsB,IAAI,CAAC,QAAQ,EAC3D,qBAAqB,EAAE,IAAI,EAC3B,eAAe,EAAE,CAAC,QAAQ,EAC1B,iBAAiB,EAAE,iBAAiB,KAChC,iBAAiB,IAEpB,QAAQ,CACkB,CACN,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,CACL,6BACE,SAAS,EAAE,SAAS,KAChB,IAAI,EACR,GAAG,EAAE,iBAAiB,KAClB,iBAAiB,KACjB,0BAA0B,CAAC,IAAI,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;QAEvE,MAAM;QACN,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport {\n getAnalyticsLabelAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalContainerAsSubstep } from '../container/internal';\nimport { AnalyticsFunnelSubStep } from '../internal/analytics/components/analytics-funnel';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { GeneratedAnalyticsMetadataExpandableSectionComponent } from './analytics-metadata/interfaces';\nimport { InternalVariant } from './internal-interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\ninterface ExpandableSectionContainerProps extends InternalBaseComponentProps {\n className?: string;\n header: React.ReactNode;\n children?: React.ReactNode;\n variant: InternalVariant;\n expanded: boolean | undefined;\n disableContentPaddings: boolean | undefined;\n __injectAnalyticsComponentMetadata?: boolean;\n}\n\nexport const ExpandableSectionContainer = ({\n className,\n children,\n header,\n variant,\n expanded,\n disableContentPaddings,\n __internalRootRef,\n __injectAnalyticsComponentMetadata,\n ...rest\n}: ExpandableSectionContainerProps) => {\n const analyticsMetadata = getAnalyticsMetadataProps(rest as BasePropsWithAnalyticsMetadata);\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataExpandableSectionComponent = {\n name: 'awsui.ExpandableSection',\n label: { root: 'self' },\n properties: { variant, expanded: `${!!expanded}` },\n };\n\n const metadataAttribute = __injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: analyticsComponentMetadata })\n : {};\n\n if (variant === 'container' || variant === 'stacked') {\n return (\n <AnalyticsFunnelSubStep\n subStepIdentifier={analyticsMetadata?.instanceIdentifier}\n subStepErrorContext={analyticsMetadata?.errorContext}\n >\n <InternalContainerAsSubstep\n {...rest}\n className={className}\n header={header}\n variant={variant === 'stacked' ? 'stacked' : 'default'}\n disableContentPaddings={disableContentPaddings || !expanded}\n disableHeaderPaddings={true}\n __hiddenContent={!expanded}\n __internalRootRef={__internalRootRef}\n {...metadataAttribute}\n >\n {children}\n </InternalContainerAsSubstep>\n </AnalyticsFunnelSubStep>\n );\n }\n\n return (\n <div\n className={className}\n {...rest}\n ref={__internalRootRef}\n {...metadataAttribute}\n {...getAnalyticsLabelAttribute(`.${analyticsSelectors['header-label']}`)}\n >\n {header}\n {children}\n </div>\n );\n};\n"]}
@@ -1,5 +1,6 @@
1
1
  import { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
2
- import { ExpandableSectionProps, InternalVariant } from './interfaces';
2
+ import { ExpandableSectionProps } from './interfaces';
3
+ import { InternalVariant } from './internal-interfaces';
3
4
  interface ExpandableDefaultHeaderProps {
4
5
  id: string;
5
6
  descriptionId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAalF,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAavE,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAcD,UAAU,4BAA6B,SAAQ,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,MAAM,CAAC;IACpG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsLD,eAAO,MAAM,uBAAuB,GAAI,iOAmBrC,4BAA4B,gBA4F9B,CAAC"}
1
+ {"version":3,"file":"expandable-section-header.d.ts","sourceRoot":"","sources":["../../../src/expandable-section/expandable-section-header.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAalF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAaxD,UAAU,4BAA4B;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAcD,UAAU,4BAA6B,SAAQ,IAAI,CAAC,4BAA4B,EAAE,UAAU,GAAG,MAAM,CAAC;IACpG,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsLD,eAAO,MAAM,uBAAuB,GAAI,iOAmBrC,4BAA4B,gBA4F9B,CAAC"}