@cloudscape-design/components 3.0.1315 → 3.0.1317

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 (666) hide show
  1. package/action-card/interfaces.d.ts +3 -3
  2. package/action-card/interfaces.d.ts.map +1 -1
  3. package/action-card/interfaces.js.map +1 -1
  4. package/alert/interfaces.d.ts +3 -3
  5. package/alert/interfaces.d.ts.map +1 -1
  6. package/alert/interfaces.js.map +1 -1
  7. package/anchor-navigation/interfaces.d.ts +2 -2
  8. package/anchor-navigation/interfaces.d.ts.map +1 -1
  9. package/anchor-navigation/interfaces.js.map +1 -1
  10. package/annotation-context/interfaces.d.ts +1 -1
  11. package/annotation-context/interfaces.d.ts.map +1 -1
  12. package/annotation-context/interfaces.js.map +1 -1
  13. package/app-layout/classic.d.ts +1 -1
  14. package/app-layout/drawer/overflow-menu.d.ts +1 -1
  15. package/app-layout/drawer/overflow-menu.d.ts.map +1 -1
  16. package/app-layout/drawer/overflow-menu.js.map +1 -1
  17. package/app-layout/index.js.map +1 -1
  18. package/app-layout/interfaces.d.ts +3 -3
  19. package/app-layout/interfaces.d.ts.map +1 -1
  20. package/app-layout/interfaces.js.map +1 -1
  21. package/app-layout/internal.d.ts +1 -1
  22. package/app-layout/runtime-drawer/index.d.ts +1 -1
  23. package/app-layout/runtime-drawer/index.d.ts.map +1 -1
  24. package/app-layout/runtime-drawer/index.js.map +1 -1
  25. package/app-layout/visual-refresh/index.d.ts +1 -1
  26. package/app-layout/visual-refresh-toolbar/interfaces.d.ts +1 -1
  27. package/app-layout/visual-refresh-toolbar/interfaces.d.ts.map +1 -1
  28. package/app-layout/visual-refresh-toolbar/interfaces.js.map +1 -1
  29. package/app-layout/visual-refresh-toolbar/state/use-ai-drawer.d.ts +4 -4
  30. package/app-layout/visual-refresh-toolbar/state/use-bottom-drawers.d.ts +4 -4
  31. package/app-layout-toolbar/index.js.map +1 -1
  32. package/area-chart/elements/use-highlight-details.d.ts +1 -1
  33. package/area-chart/elements/use-highlight-details.d.ts.map +1 -1
  34. package/area-chart/elements/use-highlight-details.js.map +1 -1
  35. package/area-chart/interfaces.d.ts +1 -1
  36. package/area-chart/interfaces.d.ts.map +1 -1
  37. package/area-chart/interfaces.js.map +1 -1
  38. package/area-chart/model/compute-chart-props.d.ts +2 -2
  39. package/area-chart/model/compute-chart-props.d.ts.map +1 -1
  40. package/area-chart/model/compute-chart-props.js +2 -0
  41. package/area-chart/model/compute-chart-props.js.map +1 -1
  42. package/area-chart/model/index.d.ts +1 -1
  43. package/area-chart/model/index.d.ts.map +1 -1
  44. package/area-chart/model/index.js.map +1 -1
  45. package/area-chart/model/use-chart-model.d.ts +1 -1
  46. package/area-chart/model/use-chart-model.d.ts.map +1 -1
  47. package/area-chart/model/use-chart-model.js.map +1 -1
  48. package/area-chart/model/use-filter-props.d.ts +1 -1
  49. package/area-chart/model/use-filter-props.d.ts.map +1 -1
  50. package/area-chart/model/use-filter-props.js.map +1 -1
  51. package/area-chart/model/use-highlight-props.d.ts +1 -1
  52. package/area-chart/model/use-highlight-props.d.ts.map +1 -1
  53. package/area-chart/model/use-highlight-props.js.map +1 -1
  54. package/area-chart/model/utils.d.ts +1 -1
  55. package/area-chart/model/utils.d.ts.map +1 -1
  56. package/area-chart/model/utils.js.map +1 -1
  57. package/attribute-editor/interfaces.d.ts +3 -3
  58. package/attribute-editor/interfaces.d.ts.map +1 -1
  59. package/attribute-editor/interfaces.js.map +1 -1
  60. package/attribute-editor/row.d.ts +2 -2
  61. package/attribute-editor/row.d.ts.map +1 -1
  62. package/attribute-editor/row.js.map +1 -1
  63. package/autosuggest/autosuggest-option.d.ts +1 -1
  64. package/autosuggest/autosuggest-option.d.ts.map +1 -1
  65. package/autosuggest/autosuggest-option.js.map +1 -1
  66. package/autosuggest/interfaces.d.ts +5 -5
  67. package/autosuggest/interfaces.d.ts.map +1 -1
  68. package/autosuggest/interfaces.js.map +1 -1
  69. package/autosuggest/internal.d.ts.map +1 -1
  70. package/autosuggest/internal.js +1 -1
  71. package/autosuggest/internal.js.map +1 -1
  72. package/autosuggest/load-more-controller.d.ts +1 -1
  73. package/autosuggest/load-more-controller.d.ts.map +1 -1
  74. package/autosuggest/load-more-controller.js.map +1 -1
  75. package/badge/interfaces.d.ts +2 -2
  76. package/badge/interfaces.d.ts.map +1 -1
  77. package/badge/interfaces.js.map +1 -1
  78. package/bar-chart/interfaces.d.ts +1 -1
  79. package/bar-chart/interfaces.d.ts.map +1 -1
  80. package/bar-chart/interfaces.js.map +1 -1
  81. package/box/interfaces.d.ts +2 -2
  82. package/box/interfaces.d.ts.map +1 -1
  83. package/box/interfaces.js.map +1 -1
  84. package/breadcrumb-group/all-items-dropdown.d.ts +1 -1
  85. package/breadcrumb-group/all-items-dropdown.d.ts.map +1 -1
  86. package/breadcrumb-group/all-items-dropdown.js.map +1 -1
  87. package/breadcrumb-group/interfaces.d.ts +2 -2
  88. package/breadcrumb-group/interfaces.d.ts.map +1 -1
  89. package/breadcrumb-group/interfaces.js.map +1 -1
  90. package/button/interfaces.d.ts +3 -3
  91. package/button/interfaces.d.ts.map +1 -1
  92. package/button/interfaces.js.map +1 -1
  93. package/button-dropdown/interfaces.d.ts +3 -3
  94. package/button-dropdown/interfaces.d.ts.map +1 -1
  95. package/button-dropdown/interfaces.js.map +1 -1
  96. package/button-dropdown/utils/use-button-dropdown.d.ts +1 -1
  97. package/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
  98. package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
  99. package/button-group/file-input-item.d.ts +1 -1
  100. package/button-group/file-input-item.d.ts.map +1 -1
  101. package/button-group/file-input-item.js.map +1 -1
  102. package/button-group/icon-button-item.d.ts +1 -1
  103. package/button-group/icon-button-item.d.ts.map +1 -1
  104. package/button-group/icon-button-item.js +1 -1
  105. package/button-group/icon-button-item.js.map +1 -1
  106. package/button-group/icon-toggle-button-item.d.ts +1 -1
  107. package/button-group/icon-toggle-button-item.d.ts.map +1 -1
  108. package/button-group/icon-toggle-button-item.js.map +1 -1
  109. package/button-group/interfaces.d.ts +10 -2
  110. package/button-group/interfaces.d.ts.map +1 -1
  111. package/button-group/interfaces.js.map +1 -1
  112. package/button-group/item-element.d.ts +1 -1
  113. package/button-group/item-element.d.ts.map +1 -1
  114. package/button-group/item-element.js.map +1 -1
  115. package/button-group/menu-dropdown-item.d.ts +1 -1
  116. package/button-group/menu-dropdown-item.d.ts.map +1 -1
  117. package/button-group/menu-dropdown-item.js.map +1 -1
  118. package/calendar/interfaces.d.ts +3 -3
  119. package/calendar/interfaces.d.ts.map +1 -1
  120. package/calendar/interfaces.js.map +1 -1
  121. package/cards/interfaces.d.ts +2 -2
  122. package/cards/interfaces.d.ts.map +1 -1
  123. package/cards/interfaces.js.map +1 -1
  124. package/checkbox/base-checkbox.d.ts +3 -3
  125. package/checkbox/base-checkbox.d.ts.map +1 -1
  126. package/checkbox/base-checkbox.js.map +1 -1
  127. package/checkbox/interfaces.d.ts +2 -2
  128. package/checkbox/interfaces.d.ts.map +1 -1
  129. package/checkbox/interfaces.js.map +1 -1
  130. package/code-editor/error-screen.d.ts +1 -1
  131. package/code-editor/error-screen.d.ts.map +1 -1
  132. package/code-editor/error-screen.js.map +1 -1
  133. package/code-editor/interfaces.d.ts +3 -3
  134. package/code-editor/interfaces.d.ts.map +1 -1
  135. package/code-editor/interfaces.js.map +1 -1
  136. package/code-editor/listeners.d.ts +1 -1
  137. package/code-editor/listeners.d.ts.map +1 -1
  138. package/code-editor/listeners.js.map +1 -1
  139. package/code-editor/preferences-modal.js.map +1 -1
  140. package/collection-preferences/interfaces.d.ts +4 -4
  141. package/collection-preferences/interfaces.d.ts.map +1 -1
  142. package/collection-preferences/interfaces.js.map +1 -1
  143. package/column-layout/interfaces.d.ts +1 -1
  144. package/column-layout/interfaces.d.ts.map +1 -1
  145. package/column-layout/interfaces.js.map +1 -1
  146. package/container/interfaces.d.ts +1 -1
  147. package/container/interfaces.d.ts.map +1 -1
  148. package/container/interfaces.js.map +1 -1
  149. package/content-layout/interfaces.d.ts +1 -1
  150. package/content-layout/interfaces.d.ts.map +1 -1
  151. package/content-layout/interfaces.js.map +1 -1
  152. package/contexts/form-field.d.ts +2 -1
  153. package/contexts/form-field.d.ts.map +1 -1
  154. package/contexts/form-field.js +1 -1
  155. package/contexts/form-field.js.map +1 -1
  156. package/copy-to-clipboard/interfaces.d.ts +2 -2
  157. package/copy-to-clipboard/interfaces.d.ts.map +1 -1
  158. package/copy-to-clipboard/interfaces.js.map +1 -1
  159. package/date-input/interfaces.d.ts +3 -3
  160. package/date-input/interfaces.d.ts.map +1 -1
  161. package/date-input/interfaces.js.map +1 -1
  162. package/date-input/internal.d.ts.map +1 -1
  163. package/date-input/internal.js.map +1 -1
  164. package/date-picker/interfaces.d.ts +4 -4
  165. package/date-picker/interfaces.d.ts.map +1 -1
  166. package/date-picker/interfaces.js.map +1 -1
  167. package/date-range-picker/calendar/interfaces.d.ts +1 -1
  168. package/date-range-picker/calendar/interfaces.d.ts.map +1 -1
  169. package/date-range-picker/calendar/interfaces.js.map +1 -1
  170. package/date-range-picker/interfaces.d.ts +4 -4
  171. package/date-range-picker/interfaces.d.ts.map +1 -1
  172. package/date-range-picker/interfaces.js.map +1 -1
  173. package/divider/interfaces.d.ts +2 -2
  174. package/divider/interfaces.d.ts.map +1 -1
  175. package/divider/interfaces.js.map +1 -1
  176. package/drawer/interfaces.d.ts +2 -2
  177. package/drawer/interfaces.d.ts.map +1 -1
  178. package/drawer/interfaces.js.map +1 -1
  179. package/dropdown/interfaces.d.ts +1 -1
  180. package/dropdown/interfaces.d.ts.map +1 -1
  181. package/dropdown/interfaces.js.map +1 -1
  182. package/dropdown/internal.d.ts +1 -1
  183. package/dropdown/internal.d.ts.map +1 -1
  184. package/dropdown/internal.js.map +1 -1
  185. package/error-boundary/interfaces.d.ts +1 -1
  186. package/error-boundary/interfaces.d.ts.map +1 -1
  187. package/error-boundary/interfaces.js.map +1 -1
  188. package/expandable-section/interfaces.d.ts +2 -2
  189. package/expandable-section/interfaces.d.ts.map +1 -1
  190. package/expandable-section/interfaces.js.map +1 -1
  191. package/file-dropzone/interfaces.d.ts +2 -2
  192. package/file-dropzone/interfaces.d.ts.map +1 -1
  193. package/file-dropzone/interfaces.js.map +1 -1
  194. package/file-input/interfaces.d.ts +3 -3
  195. package/file-input/interfaces.d.ts.map +1 -1
  196. package/file-input/interfaces.js.map +1 -1
  197. package/file-token-group/file-token.d.ts +1 -1
  198. package/file-token-group/file-token.d.ts.map +1 -1
  199. package/file-token-group/file-token.js.map +1 -1
  200. package/file-token-group/interfaces.d.ts +2 -2
  201. package/file-token-group/interfaces.d.ts.map +1 -1
  202. package/file-token-group/interfaces.js.map +1 -1
  203. package/file-upload/interfaces.d.ts +3 -3
  204. package/file-upload/interfaces.d.ts.map +1 -1
  205. package/file-upload/interfaces.js.map +1 -1
  206. package/flashbar/common.d.ts +1 -1
  207. package/flashbar/interfaces.d.ts +2 -2
  208. package/flashbar/interfaces.d.ts.map +1 -1
  209. package/flashbar/interfaces.js.map +1 -1
  210. package/form/interfaces.d.ts +2 -2
  211. package/form/interfaces.d.ts.map +1 -1
  212. package/form/interfaces.js.map +1 -1
  213. package/form-field/interfaces.d.ts +2 -2
  214. package/form-field/interfaces.d.ts.map +1 -1
  215. package/form-field/interfaces.js.map +1 -1
  216. package/grid/interfaces.d.ts +2 -2
  217. package/grid/interfaces.d.ts.map +1 -1
  218. package/grid/interfaces.js.map +1 -1
  219. package/grid/internal.d.ts +1 -1
  220. package/grid/internal.d.ts.map +1 -1
  221. package/grid/internal.js.map +1 -1
  222. package/header/interfaces.d.ts +1 -1
  223. package/header/interfaces.d.ts.map +1 -1
  224. package/header/interfaces.js.map +1 -1
  225. package/help-panel/interfaces.d.ts +1 -1
  226. package/help-panel/interfaces.d.ts.map +1 -1
  227. package/help-panel/interfaces.js.map +1 -1
  228. package/hotspot/interfaces.d.ts +1 -1
  229. package/hotspot/interfaces.d.ts.map +1 -1
  230. package/hotspot/interfaces.js.map +1 -1
  231. package/icon/interfaces.d.ts +2 -2
  232. package/icon/interfaces.d.ts.map +1 -1
  233. package/icon/interfaces.js.map +1 -1
  234. package/icon-provider/interfaces.d.ts +1 -1
  235. package/icon-provider/interfaces.d.ts.map +1 -1
  236. package/icon-provider/interfaces.js.map +1 -1
  237. package/input/interfaces.d.ts +4 -4
  238. package/input/interfaces.d.ts.map +1 -1
  239. package/input/interfaces.js.map +1 -1
  240. package/input/internal.d.ts +3 -3
  241. package/input/internal.d.ts.map +1 -1
  242. package/input/internal.js.map +1 -1
  243. package/interfaces.d.ts +1 -1
  244. package/interfaces.d.ts.map +1 -1
  245. package/interfaces.js.map +1 -1
  246. package/internal/analytics/components/analytics-funnel.d.ts +2 -1
  247. package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
  248. package/internal/analytics/components/analytics-funnel.js.map +1 -1
  249. package/internal/analytics/context/analytics-context.d.ts +2 -1
  250. package/internal/analytics/context/analytics-context.d.ts.map +1 -1
  251. package/internal/analytics/context/analytics-context.js.map +1 -1
  252. package/internal/analytics/interfaces.d.ts +2 -15
  253. package/internal/analytics/interfaces.d.ts.map +1 -1
  254. package/internal/analytics/interfaces.js.map +1 -1
  255. package/internal/base-component/index.d.ts +4 -16
  256. package/internal/base-component/index.d.ts.map +1 -1
  257. package/internal/base-component/index.js.map +1 -1
  258. package/internal/base-component/styles.scoped.css +13 -9
  259. package/internal/breakpoints.d.ts +3 -2
  260. package/internal/breakpoints.d.ts.map +1 -1
  261. package/internal/breakpoints.js.map +1 -1
  262. package/internal/components/autosuggest-input/index.d.ts +3 -3
  263. package/internal/components/autosuggest-input/index.d.ts.map +1 -1
  264. package/internal/components/autosuggest-input/index.js.map +1 -1
  265. package/internal/components/button-trigger/index.d.ts +2 -2
  266. package/internal/components/button-trigger/index.d.ts.map +1 -1
  267. package/internal/components/button-trigger/index.js.map +1 -1
  268. package/internal/components/cartesian-chart/block-end-labels.d.ts +1 -1
  269. package/internal/components/cartesian-chart/block-end-labels.d.ts.map +1 -1
  270. package/internal/components/cartesian-chart/block-end-labels.js.map +1 -1
  271. package/internal/components/cartesian-chart/interfaces.d.ts +1 -209
  272. package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
  273. package/internal/components/cartesian-chart/interfaces.js +2 -0
  274. package/internal/components/cartesian-chart/interfaces.js.map +1 -1
  275. package/internal/components/cartesian-chart/label-utils.d.ts +1 -1
  276. package/internal/components/cartesian-chart/label-utils.d.ts.map +1 -1
  277. package/internal/components/cartesian-chart/label-utils.js.map +1 -1
  278. package/internal/components/cartesian-chart/scales.d.ts +1 -1
  279. package/internal/components/cartesian-chart/scales.d.ts.map +1 -1
  280. package/internal/components/cartesian-chart/scales.js +0 -2
  281. package/internal/components/cartesian-chart/scales.js.map +1 -1
  282. package/internal/components/cartesian-chart/ticks.d.ts +1 -1
  283. package/internal/components/cartesian-chart/ticks.d.ts.map +1 -1
  284. package/internal/components/cartesian-chart/ticks.js.map +1 -1
  285. package/internal/components/chart-filter/index.d.ts +1 -1
  286. package/internal/components/chart-filter/index.d.ts.map +1 -1
  287. package/internal/components/chart-filter/index.js.map +1 -1
  288. package/internal/components/chart-series-details/index.d.ts +1 -1
  289. package/internal/components/chart-series-details/index.d.ts.map +1 -1
  290. package/internal/components/chart-series-details/index.js.map +1 -1
  291. package/internal/components/chart-series-marker/index.d.ts +1 -1
  292. package/internal/components/chart-series-marker/index.d.ts.map +1 -1
  293. package/internal/components/chart-series-marker/index.js.map +1 -1
  294. package/internal/components/chart-status-container/index.d.ts +2 -2
  295. package/internal/components/chart-status-container/index.d.ts.map +1 -1
  296. package/internal/components/chart-status-container/index.js.map +1 -1
  297. package/internal/components/chart-wrapper/index.d.ts +1 -1
  298. package/internal/components/chart-wrapper/index.d.ts.map +1 -1
  299. package/internal/components/chart-wrapper/index.js.map +1 -1
  300. package/internal/components/checkbox-icon/index.d.ts +1 -1
  301. package/internal/components/checkbox-icon/index.d.ts.map +1 -1
  302. package/internal/components/checkbox-icon/index.js.map +1 -1
  303. package/internal/components/dropdown-status/index.d.ts +4 -4
  304. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  305. package/internal/components/dropdown-status/index.js.map +1 -1
  306. package/internal/components/masked-input/interfaces.d.ts +2 -2
  307. package/internal/components/masked-input/interfaces.d.ts.map +1 -1
  308. package/internal/components/masked-input/interfaces.js.map +1 -1
  309. package/internal/components/masked-input/use-mask.d.ts +1 -1
  310. package/internal/components/masked-input/use-mask.d.ts.map +1 -1
  311. package/internal/components/masked-input/use-mask.js.map +1 -1
  312. package/internal/components/option/interfaces.d.ts +3 -26
  313. package/internal/components/option/interfaces.d.ts.map +1 -1
  314. package/internal/components/option/interfaces.js.map +1 -1
  315. package/internal/components/option/option-announcer.d.ts +1 -1
  316. package/internal/components/option/option-announcer.d.ts.map +1 -1
  317. package/internal/components/option/option-announcer.js.map +1 -1
  318. package/internal/components/option/utils/filter-options.d.ts +2 -1
  319. package/internal/components/option/utils/filter-options.d.ts.map +1 -1
  320. package/internal/components/option/utils/filter-options.js.map +1 -1
  321. package/internal/components/option/utils/flatten-options.d.ts +2 -1
  322. package/internal/components/option/utils/flatten-options.d.ts.map +1 -1
  323. package/internal/components/option/utils/flatten-options.js.map +1 -1
  324. package/internal/components/options-list/index.d.ts +3 -3
  325. package/internal/components/options-list/index.d.ts.map +1 -1
  326. package/internal/components/options-list/index.js +1 -1
  327. package/internal/components/options-list/index.js.map +1 -1
  328. package/internal/components/options-list/utils/use-keyboard.d.ts +1 -1
  329. package/internal/components/options-list/utils/use-keyboard.d.ts.map +1 -1
  330. package/internal/components/options-list/utils/use-keyboard.js.map +1 -1
  331. package/internal/components/radio-button/index.d.ts +1 -1
  332. package/internal/components/radio-button/index.d.ts.map +1 -1
  333. package/internal/components/radio-button/index.js.map +1 -1
  334. package/internal/components/radio-button/interfaces.d.ts +1 -128
  335. package/internal/components/radio-button/interfaces.d.ts.map +1 -1
  336. package/internal/components/radio-button/interfaces.js +2 -0
  337. package/internal/components/radio-button/interfaces.js.map +1 -1
  338. package/internal/components/selectable-item/interfaces.d.ts +1 -1
  339. package/internal/components/selectable-item/interfaces.d.ts.map +1 -1
  340. package/internal/components/selectable-item/interfaces.js.map +1 -1
  341. package/internal/components/sortable-area/interfaces.d.ts +3 -9
  342. package/internal/components/sortable-area/interfaces.d.ts.map +1 -1
  343. package/internal/components/sortable-area/interfaces.js.map +1 -1
  344. package/internal/components/token-list/token-limit-toggle.d.ts +1 -1
  345. package/internal/components/token-list/token-limit-toggle.d.ts.map +1 -1
  346. package/internal/components/token-list/token-limit-toggle.js.map +1 -1
  347. package/internal/context/form-field-context.d.ts +3 -55
  348. package/internal/context/form-field-context.d.ts.map +1 -1
  349. package/internal/context/form-field-context.js.map +1 -1
  350. package/internal/do-not-use/feature-prompt/interfaces.d.ts +1 -1
  351. package/internal/do-not-use/feature-prompt/interfaces.d.ts.map +1 -1
  352. package/internal/do-not-use/feature-prompt/interfaces.js.map +1 -1
  353. package/internal/do-not-use/feature-prompt/internal.d.ts +1 -1
  354. package/internal/do-not-use/feature-prompt/internal.d.ts.map +1 -1
  355. package/internal/do-not-use/feature-prompt/internal.js.map +1 -1
  356. package/internal/environment.js +2 -2
  357. package/internal/environment.json +2 -2
  358. package/internal/events/index.d.ts +2 -24
  359. package/internal/events/index.d.ts.map +1 -1
  360. package/internal/events/index.js.map +1 -1
  361. package/internal/generated/styles/tokens.d.ts +1 -0
  362. package/internal/generated/styles/tokens.js +1 -0
  363. package/internal/generated/theming/index.cjs +60 -21
  364. package/internal/generated/theming/index.cjs.d.ts +36 -0
  365. package/internal/generated/theming/index.d.ts +36 -0
  366. package/internal/generated/theming/index.js +60 -21
  367. package/internal/hooks/check-controlled/index.d.ts +1 -1
  368. package/internal/hooks/check-controlled/index.d.ts.map +1 -1
  369. package/internal/hooks/check-controlled/index.js.map +1 -1
  370. package/internal/hooks/container-queries/use-container-breakpoints.d.ts +1 -1
  371. package/internal/hooks/container-queries/use-container-breakpoints.d.ts.map +1 -1
  372. package/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
  373. package/internal/hooks/use-base-component/index.d.ts +1 -1
  374. package/internal/hooks/use-base-component/index.d.ts.map +1 -1
  375. package/internal/hooks/use-base-component/index.js.map +1 -1
  376. package/internal/hooks/use-focus-tracker.d.ts +1 -1
  377. package/internal/hooks/use-focus-tracker.d.ts.map +1 -1
  378. package/internal/hooks/use-focus-tracker.js.map +1 -1
  379. package/internal/manifest.json +1 -1
  380. package/internal/plugins/controllers/drawers.d.ts +1 -1
  381. package/internal/plugins/controllers/drawers.d.ts.map +1 -1
  382. package/internal/plugins/controllers/drawers.js.map +1 -1
  383. package/internal/plugins/widget/interfaces.d.ts +1 -1
  384. package/internal/plugins/widget/interfaces.d.ts.map +1 -1
  385. package/internal/plugins/widget/interfaces.js.map +1 -1
  386. package/internal/utils/date-time/interfaces.d.ts +1 -16
  387. package/internal/utils/date-time/interfaces.d.ts.map +1 -1
  388. package/internal/utils/date-time/interfaces.js.map +1 -1
  389. package/internal/utils/with-native-attributes.d.ts +3 -2
  390. package/internal/utils/with-native-attributes.d.ts.map +1 -1
  391. package/internal/utils/with-native-attributes.js.map +1 -1
  392. package/item-card/interfaces.d.ts +2 -2
  393. package/item-card/interfaces.d.ts.map +1 -1
  394. package/item-card/interfaces.js.map +1 -1
  395. package/key-value-pairs/interfaces.d.ts +1 -1
  396. package/key-value-pairs/interfaces.d.ts.map +1 -1
  397. package/key-value-pairs/interfaces.js.map +1 -1
  398. package/link/interfaces.d.ts +3 -3
  399. package/link/interfaces.d.ts.map +1 -1
  400. package/link/interfaces.js.map +1 -1
  401. package/list/interfaces.d.ts +3 -3
  402. package/list/interfaces.d.ts.map +1 -1
  403. package/list/interfaces.js.map +1 -1
  404. package/live-region/interfaces.d.ts +1 -1
  405. package/live-region/interfaces.d.ts.map +1 -1
  406. package/live-region/interfaces.js.map +1 -1
  407. package/manifest.json +2 -2
  408. package/mixed-line-bar-chart/chart-container.d.ts +1 -1
  409. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  410. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  411. package/mixed-line-bar-chart/format-highlighted.d.ts +1 -1
  412. package/mixed-line-bar-chart/format-highlighted.d.ts.map +1 -1
  413. package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
  414. package/mixed-line-bar-chart/interfaces.d.ts +1 -1
  415. package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
  416. package/mixed-line-bar-chart/interfaces.js.map +1 -1
  417. package/modal/interfaces.d.ts +3 -3
  418. package/modal/interfaces.d.ts.map +1 -1
  419. package/modal/interfaces.js.map +1 -1
  420. package/multiselect/embedded.d.ts +2 -2
  421. package/multiselect/interfaces.d.ts +2 -2
  422. package/multiselect/interfaces.d.ts.map +1 -1
  423. package/multiselect/interfaces.js.map +1 -1
  424. package/multiselect/internal.d.ts +1 -1
  425. package/multiselect/use-multiselect.d.ts +8 -8
  426. package/multiselect/use-multiselect.d.ts.map +1 -1
  427. package/multiselect/use-multiselect.js.map +1 -1
  428. package/navigable-group/interfaces.d.ts +1 -1
  429. package/navigable-group/interfaces.d.ts.map +1 -1
  430. package/navigable-group/interfaces.js.map +1 -1
  431. package/package.json +1 -1
  432. package/pagination/interfaces.d.ts +1 -1
  433. package/pagination/interfaces.d.ts.map +1 -1
  434. package/pagination/interfaces.js.map +1 -1
  435. package/pagination/internal.d.ts.map +1 -1
  436. package/pagination/internal.js.map +1 -1
  437. package/panel-layout/interfaces.d.ts +2 -2
  438. package/panel-layout/interfaces.d.ts.map +1 -1
  439. package/panel-layout/interfaces.js.map +1 -1
  440. package/pie-chart/interfaces.d.ts +2 -2
  441. package/pie-chart/interfaces.d.ts.map +1 -1
  442. package/pie-chart/interfaces.js.map +1 -1
  443. package/popover/interfaces.d.ts +1 -1
  444. package/popover/interfaces.d.ts.map +1 -1
  445. package/popover/interfaces.js.map +1 -1
  446. package/popover/internal.d.ts +1 -1
  447. package/popover/internal.d.ts.map +1 -1
  448. package/popover/internal.js.map +1 -1
  449. package/progress-bar/interfaces.d.ts +2 -2
  450. package/progress-bar/interfaces.d.ts.map +1 -1
  451. package/progress-bar/interfaces.js.map +1 -1
  452. package/prompt-input/core/menu-state.d.ts +2 -2
  453. package/prompt-input/core/menu-state.d.ts.map +1 -1
  454. package/prompt-input/core/menu-state.js.map +1 -1
  455. package/prompt-input/interfaces.d.ts +6 -6
  456. package/prompt-input/interfaces.d.ts.map +1 -1
  457. package/prompt-input/interfaces.js.map +1 -1
  458. package/property-filter/controller.d.ts +2 -2
  459. package/property-filter/controller.d.ts.map +1 -1
  460. package/property-filter/controller.js.map +1 -1
  461. package/property-filter/filter-options.js.map +1 -1
  462. package/property-filter/interfaces.d.ts +4 -4
  463. package/property-filter/interfaces.d.ts.map +1 -1
  464. package/property-filter/interfaces.js.map +1 -1
  465. package/property-filter/property-editor.d.ts +2 -2
  466. package/property-filter/property-editor.d.ts.map +1 -1
  467. package/property-filter/property-editor.js.map +1 -1
  468. package/property-filter/property-filter-autosuggest.d.ts +1 -1
  469. package/property-filter/property-filter-autosuggest.d.ts.map +1 -1
  470. package/property-filter/property-filter-autosuggest.js +1 -1
  471. package/property-filter/property-filter-autosuggest.js.map +1 -1
  472. package/property-filter/token-editor-inputs.d.ts +2 -2
  473. package/property-filter/token-editor-inputs.d.ts.map +1 -1
  474. package/property-filter/token-editor-inputs.js.map +1 -1
  475. package/property-filter/token-editor.d.ts +2 -2
  476. package/property-filter/token-editor.d.ts.map +1 -1
  477. package/property-filter/token-editor.js.map +1 -1
  478. package/property-filter/token.d.ts +2 -2
  479. package/property-filter/token.d.ts.map +1 -1
  480. package/property-filter/token.js.map +1 -1
  481. package/property-filter/use-load-items.d.ts +1 -1
  482. package/property-filter/use-load-items.d.ts.map +1 -1
  483. package/property-filter/use-load-items.js.map +1 -1
  484. package/radio-button/interfaces.d.ts +128 -2
  485. package/radio-button/interfaces.d.ts.map +1 -1
  486. package/radio-button/interfaces.js.map +1 -1
  487. package/radio-group/interfaces.d.ts +4 -4
  488. package/radio-group/interfaces.d.ts.map +1 -1
  489. package/radio-group/interfaces.js.map +1 -1
  490. package/s3-resource-selector/interfaces.d.ts +2 -2
  491. package/s3-resource-selector/interfaces.d.ts.map +1 -1
  492. package/s3-resource-selector/interfaces.js.map +1 -1
  493. package/s3-resource-selector/s3-in-context/index.d.ts +1 -1
  494. package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
  495. package/s3-resource-selector/s3-in-context/index.js.map +1 -1
  496. package/s3-resource-selector/s3-in-context/use-versions-fetch.d.ts +1 -1
  497. package/segmented-control/interfaces.d.ts +2 -2
  498. package/segmented-control/interfaces.d.ts.map +1 -1
  499. package/segmented-control/interfaces.js.map +1 -1
  500. package/select/interfaces.d.ts +5 -5
  501. package/select/interfaces.d.ts.map +1 -1
  502. package/select/interfaces.js.map +1 -1
  503. package/select/internal.d.ts.map +1 -1
  504. package/select/internal.js.map +1 -1
  505. package/select/parts/item.d.ts.map +1 -1
  506. package/select/parts/item.js.map +1 -1
  507. package/select/parts/multiselect-item.d.ts.map +1 -1
  508. package/select/parts/multiselect-item.js.map +1 -1
  509. package/select/parts/trigger.d.ts +2 -2
  510. package/select/parts/trigger.d.ts.map +1 -1
  511. package/select/parts/trigger.js.map +1 -1
  512. package/select/utils/connect-options.d.ts +2 -1
  513. package/select/utils/connect-options.d.ts.map +1 -1
  514. package/select/utils/connect-options.js.map +1 -1
  515. package/select/utils/use-announcement.d.ts +1 -1
  516. package/select/utils/use-announcement.d.ts.map +1 -1
  517. package/select/utils/use-announcement.js.map +1 -1
  518. package/select/utils/use-load-items.d.ts +2 -2
  519. package/select/utils/use-load-items.d.ts.map +1 -1
  520. package/select/utils/use-load-items.js.map +1 -1
  521. package/select/utils/use-native-search.d.ts +2 -1
  522. package/select/utils/use-native-search.d.ts.map +1 -1
  523. package/select/utils/use-native-search.js.map +1 -1
  524. package/select/utils/use-select.d.ts +4 -3
  525. package/select/utils/use-select.d.ts.map +1 -1
  526. package/select/utils/use-select.js.map +1 -1
  527. package/side-navigation/interfaces.d.ts +2 -2
  528. package/side-navigation/interfaces.d.ts.map +1 -1
  529. package/side-navigation/interfaces.js.map +1 -1
  530. package/side-navigation/parts.d.ts.map +1 -1
  531. package/side-navigation/parts.js.map +1 -1
  532. package/skeleton/interfaces.d.ts +1 -1
  533. package/skeleton/interfaces.d.ts.map +1 -1
  534. package/skeleton/interfaces.js.map +1 -1
  535. package/slider/interfaces.d.ts +3 -3
  536. package/slider/interfaces.d.ts.map +1 -1
  537. package/slider/interfaces.js.map +1 -1
  538. package/space-between/interfaces.d.ts +2 -2
  539. package/space-between/interfaces.d.ts.map +1 -1
  540. package/space-between/interfaces.js.map +1 -1
  541. package/spinner/interfaces.d.ts +2 -2
  542. package/spinner/interfaces.d.ts.map +1 -1
  543. package/spinner/interfaces.js.map +1 -1
  544. package/split-panel/interfaces.d.ts +1 -1
  545. package/split-panel/interfaces.d.ts.map +1 -1
  546. package/split-panel/interfaces.js.map +1 -1
  547. package/status-indicator/interfaces.d.ts +2 -2
  548. package/status-indicator/interfaces.d.ts.map +1 -1
  549. package/status-indicator/interfaces.js.map +1 -1
  550. package/steps/interfaces.d.ts +1 -1
  551. package/steps/interfaces.d.ts.map +1 -1
  552. package/steps/interfaces.js.map +1 -1
  553. package/table/interfaces.d.ts +2 -2
  554. package/table/interfaces.d.ts.map +1 -1
  555. package/table/interfaces.js.map +1 -1
  556. package/table/thead.d.ts +1 -1
  557. package/table/thead.d.ts.map +1 -1
  558. package/table/thead.js.map +1 -1
  559. package/table/use-cell-editing.d.ts +1 -1
  560. package/table/use-cell-editing.d.ts.map +1 -1
  561. package/table/use-cell-editing.js.map +1 -1
  562. package/tabs/interfaces.d.ts +2 -2
  563. package/tabs/interfaces.d.ts.map +1 -1
  564. package/tabs/interfaces.js.map +1 -1
  565. package/tag-editor/index.d.ts.map +1 -1
  566. package/tag-editor/index.js.map +1 -1
  567. package/tag-editor/interfaces.d.ts +2 -2
  568. package/tag-editor/interfaces.d.ts.map +1 -1
  569. package/tag-editor/interfaces.js.map +1 -1
  570. package/tag-editor/internal.js.map +1 -1
  571. package/text-content/interfaces.d.ts +1 -1
  572. package/text-content/interfaces.d.ts.map +1 -1
  573. package/text-content/interfaces.js.map +1 -1
  574. package/text-filter/interfaces.d.ts +3 -3
  575. package/text-filter/interfaces.d.ts.map +1 -1
  576. package/text-filter/interfaces.js.map +1 -1
  577. package/textarea/interfaces.d.ts +4 -4
  578. package/textarea/interfaces.d.ts.map +1 -1
  579. package/textarea/interfaces.js.map +1 -1
  580. package/tiles/interfaces.d.ts +4 -4
  581. package/tiles/interfaces.d.ts.map +1 -1
  582. package/tiles/interfaces.js.map +1 -1
  583. package/time-input/interfaces.d.ts +2 -2
  584. package/time-input/interfaces.d.ts.map +1 -1
  585. package/time-input/interfaces.js.map +1 -1
  586. package/toggle/interfaces.d.ts +2 -2
  587. package/toggle/interfaces.d.ts.map +1 -1
  588. package/toggle/interfaces.js.map +1 -1
  589. package/toggle-button/interfaces.d.ts +2 -2
  590. package/toggle-button/interfaces.d.ts.map +1 -1
  591. package/toggle-button/interfaces.js.map +1 -1
  592. package/token/dismiss-button.d.ts +1 -1
  593. package/token/dismiss-button.d.ts.map +1 -1
  594. package/token/dismiss-button.js.map +1 -1
  595. package/token/interfaces.d.ts +2 -2
  596. package/token/interfaces.d.ts.map +1 -1
  597. package/token/interfaces.js.map +1 -1
  598. package/token-group/interfaces.d.ts +2 -2
  599. package/token-group/interfaces.d.ts.map +1 -1
  600. package/token-group/interfaces.js.map +1 -1
  601. package/tooltip/interfaces.d.ts +1 -1
  602. package/tooltip/interfaces.d.ts.map +1 -1
  603. package/tooltip/interfaces.js.map +1 -1
  604. package/top-navigation/interfaces.d.ts +2 -2
  605. package/top-navigation/interfaces.d.ts.map +1 -1
  606. package/top-navigation/interfaces.js.map +1 -1
  607. package/tree-view/interfaces.d.ts +2 -2
  608. package/tree-view/interfaces.d.ts.map +1 -1
  609. package/tree-view/interfaces.js.map +1 -1
  610. package/truncated-text/interfaces.d.ts +1 -1
  611. package/truncated-text/interfaces.d.ts.map +1 -1
  612. package/truncated-text/interfaces.js.map +1 -1
  613. package/tutorial-panel/index.js.map +1 -1
  614. package/tutorial-panel/interfaces.d.ts +2 -2
  615. package/tutorial-panel/interfaces.d.ts.map +1 -1
  616. package/tutorial-panel/interfaces.js.map +1 -1
  617. package/types/analytics.d.ts +15 -0
  618. package/types/analytics.d.ts.map +1 -0
  619. package/types/analytics.js +4 -0
  620. package/types/analytics.js.map +1 -0
  621. package/types/base-component.d.ts +14 -0
  622. package/types/base-component.d.ts.map +1 -0
  623. package/types/base-component.js +4 -0
  624. package/types/base-component.js.map +1 -0
  625. package/types/breakpoint.d.ts +1 -0
  626. package/types/breakpoint.d.ts.map +1 -0
  627. package/types/breakpoint.js +2 -0
  628. package/types/breakpoint.js.map +1 -0
  629. package/types/cartesian-chart.d.ts +209 -0
  630. package/types/cartesian-chart.d.ts.map +1 -0
  631. package/types/cartesian-chart.js +2 -0
  632. package/types/cartesian-chart.js.map +1 -0
  633. package/types/date-time.d.ts +16 -0
  634. package/types/date-time.d.ts.map +1 -0
  635. package/types/date-time.js +4 -0
  636. package/types/date-time.js.map +1 -0
  637. package/types/dropdown-status.d.ts.map +1 -0
  638. package/types/dropdown-status.js +2 -0
  639. package/types/dropdown-status.js.map +1 -0
  640. package/types/events.d.ts +24 -0
  641. package/types/events.d.ts.map +1 -0
  642. package/types/events.js +4 -0
  643. package/types/events.js.map +1 -0
  644. package/types/form-field.d.ts +54 -0
  645. package/types/form-field.d.ts.map +1 -0
  646. package/types/form-field.js +4 -0
  647. package/types/form-field.js.map +1 -0
  648. package/types/native-attributes.d.ts +2 -0
  649. package/types/native-attributes.d.ts.map +1 -0
  650. package/types/native-attributes.js +2 -0
  651. package/types/native-attributes.js.map +1 -0
  652. package/types/option.d.ts +26 -0
  653. package/types/option.d.ts.map +1 -0
  654. package/types/option.js +2 -0
  655. package/types/option.js.map +1 -0
  656. package/types/sortable-area.d.ts +8 -0
  657. package/types/sortable-area.d.ts.map +1 -0
  658. package/types/sortable-area.js +4 -0
  659. package/types/sortable-area.js.map +1 -0
  660. package/wizard/interfaces.d.ts +3 -3
  661. package/wizard/interfaces.d.ts.map +1 -1
  662. package/wizard/interfaces.js.map +1 -1
  663. package/internal/components/dropdown-status/interfaces.d.ts.map +0 -1
  664. package/internal/components/dropdown-status/interfaces.js +0 -2
  665. package/internal/components/dropdown-status/interfaces.js.map +0 -1
  666. /package/{internal/components/dropdown-status/interfaces.d.ts → types/dropdown-status.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/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 '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport namespace ExpandableSectionProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n\n export type Variant = 'default' | 'footer' | 'container' | 'navigation' | 'stacked' | 'inline';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport type InternalVariant = ExpandableSectionProps.Variant | 'compact';\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ExpandableSectionProps.AnalyticsMetadata;\n\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * * `inline` - Use this variant in any context where you need reduced padding around the header.\n * @visualrefresh `stacked` variant\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Using this\n * property does not change the visual appearance of the component. Note that this only works with the `headerText`\n * slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the default or container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/expandable-section/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';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport namespace ExpandableSectionProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n }\n\n export type Variant = 'default' | 'footer' | 'container' | 'navigation' | 'stacked' | 'inline';\n export interface ChangeDetail {\n expanded: boolean;\n }\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n\nexport type InternalVariant = ExpandableSectionProps.Variant | 'compact';\n\nexport interface ExpandableSectionProps extends BaseComponentProps {\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * @analytics\n */\n analyticsMetadata?: ExpandableSectionProps.AnalyticsMetadata;\n\n /**\n * Determines whether the component initially displays in expanded state (that is, with content visible). The component operates in an uncontrolled\n * manner even if you provide a value for this property.\n */\n defaultExpanded?: boolean;\n\n /**\n * Determines whether the component is in the expanded state (that is, with content visible). The component operates in a controlled\n * manner if you provide a value for this property.\n */\n expanded?: boolean;\n\n /**\n * The possible variants of an expandable section are as follows:\n * * `default` - Use this variant in any context.\n * * `footer` - Use this variant in container footers.\n * * `container` - Use this variant in a detail page alongside other containers.\n * * `navigation` - Use this variant in the navigation panel with anchors and custom styled content.\n * It doesn't have any default styles.\n * * `stacked` - Use this variant directly adjacent to other stacked containers (such as a container, table).\n * * `inline` - Use this variant in any context where you need reduced padding around the header.\n * @visualrefresh `stacked` variant\n * */\n variant?: ExpandableSectionProps.Variant;\n\n /**\n * Determines whether the content section's default padding is removed. This default padding is only present for the `container` variant.\n */\n disableContentPaddings?: boolean;\n\n /**\n * Primary content displayed in the expandable section element.\n */\n children?: React.ReactNode;\n\n /**\n * @deprecated Use `headerText` instead.\n */\n header?: React.ReactNode;\n\n /**\n * The heading text. Use plain text. When using the container variant, you can use additional header props like `headerDescription` and `headerCounter` to display other elements in the header.\n */\n headerText?: React.ReactNode;\n\n /**\n * Supplementary text below the heading. Use with the container, default or footer variants.\n */\n headerDescription?: string;\n\n /**\n * Specifies secondary text that's displayed to the right of the heading title. Use with the container variant.\n * Behaves similar to the Header component counter.\n */\n headerCounter?: string;\n\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements).\n * Use with the container variant (which defaults to H2) or default/footer variants (which default to DIV). Using this\n * property does not change the visual appearance of the component. Note that this only works with the `headerText`\n * slot (not with the deprecated `header`), and not with the navigation variant.\n */\n headingTagOverride?: ExpandableSectionProps.HeadingTag;\n\n /**\n * Adds `aria-label` to the header element.\n * Use to assign unique labels when there are multiple expandable sections with the same header text on one page.\n */\n headerAriaLabel?: string;\n\n /**\n * Called when the state changes (that is, when the user expands or collapses the component).\n * The event `detail` contains the current value of the `expanded` property.\n */\n onChange?: NonCancelableEventHandler<ExpandableSectionProps.ChangeDetail>;\n\n /**\n * The area next to the heading, used to display an Info link. Use with the container variant.\n */\n headerInfo?: React.ReactNode;\n\n /**\n * Actions for the header. Use with the default or container variant.\n */\n headerActions?: React.ReactNode;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { BaseComponentProps } from '../internal/base-component';
2
- import { NonCancelableEventHandler } from '../internal/events';
1
+ import { BaseComponentProps } from '../types/base-component';
2
+ import { NonCancelableEventHandler } from '../types/events';
3
3
  export interface FileDropzoneProps extends BaseComponentProps {
4
4
  /**
5
5
  * Called when the user selects new file(s), or removes a file.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/file-dropzone/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;;OAGG;IACH,QAAQ,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACpE;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,YAAY;QAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;KACf;CACF"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/file-dropzone/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;;OAGG;IACH,QAAQ,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACpE;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,YAAY;QAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;KACf;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-dropzone/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface FileDropzoneProps extends BaseComponentProps {\n /**\n * Called when the user selects new file(s), or removes a file.\n * The event `detail` contains the current value of the component.\n */\n onChange: NonCancelableEventHandler<FileDropzoneProps.ChangeDetail>;\n /**\n * Children of the Dropzone.\n */\n children: React.ReactNode;\n}\n\nexport namespace FileDropzoneProps {\n export interface ChangeDetail {\n value: File[];\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-dropzone/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface FileDropzoneProps extends BaseComponentProps {\n /**\n * Called when the user selects new file(s), or removes a file.\n * The event `detail` contains the current value of the component.\n */\n onChange: NonCancelableEventHandler<FileDropzoneProps.ChangeDetail>;\n /**\n * Children of the Dropzone.\n */\n children: React.ReactNode;\n}\n\nexport namespace FileDropzoneProps {\n export interface ChangeDetail {\n value: File[];\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseComponentProps } from '../internal/base-component';
2
- import { FormFieldCommonValidationControlProps } from '../internal/context/form-field-context';
3
- import { NonCancelableEventHandler } from '../internal/events';
1
+ import { BaseComponentProps } from '../types/base-component';
2
+ import { NonCancelableEventHandler } from '../types/events';
3
+ import { FormFieldCommonValidationControlProps } from '../types/form-field';
4
4
  export interface FileInputProps extends BaseComponentProps, FormFieldCommonValidationControlProps {
5
5
  /**
6
6
  * Variant of the file input. Defaults to "button".
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/file-input/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qCAAqC,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,cAAe,SAAQ,kBAAkB,EAAE,qCAAqC;IAC/F;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;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;KACf;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-input/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldCommonValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface FileInputProps extends BaseComponentProps, FormFieldCommonValidationControlProps {\n /**\n * Variant of the file input. Defaults to \"button\".\n */\n variant?: 'button' | 'icon';\n\n /**\n * Adds `aria-label` to the file input element. Use this to provide an accessible name for file inputs\n * that don't have visible text, and to distinguish between multiple file inputs with identical visible text.\n */\n ariaLabel?: string;\n\n /**\n * Text displayed in the file input component. Used as the aria label if ariaLabel is not defined.\n * @displayname text\n */\n children?: string;\n\n /**\n * Specifies the native file input `accept` attribute to describe the allow-list of file types.\n */\n accept?: string;\n\n /**\n * Specifies whether to add aria-required to the file upload control.\n */\n ariaRequired?: boolean;\n\n /**\n * Specifies the native file input `multiple` attribute to allow users entering more than one file.\n */\n multiple?: boolean;\n\n /**\n * Called when the user selects new file(s), or removes a file.\n * The event `detail` contains the current value of the component.\n */\n onChange: NonCancelableEventHandler<FileInputProps.ChangeDetail>;\n\n /**\n * Specifies the currently selected file(s).\n * If you want to clear the selection, use empty array.\n */\n value: ReadonlyArray<File>;\n}\n\nexport namespace FileInputProps {\n export interface ChangeDetail {\n value: File[];\n }\n\n export interface Ref {\n /**\n * Sets focus on the file upload button.\n */\n focus(): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-input/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldCommonValidationControlProps } from '../types/form-field';\n\nexport interface FileInputProps extends BaseComponentProps, FormFieldCommonValidationControlProps {\n /**\n * Variant of the file input. Defaults to \"button\".\n */\n variant?: 'button' | 'icon';\n\n /**\n * Adds `aria-label` to the file input element. Use this to provide an accessible name for file inputs\n * that don't have visible text, and to distinguish between multiple file inputs with identical visible text.\n */\n ariaLabel?: string;\n\n /**\n * Text displayed in the file input component. Used as the aria label if ariaLabel is not defined.\n * @displayname text\n */\n children?: string;\n\n /**\n * Specifies the native file input `accept` attribute to describe the allow-list of file types.\n */\n accept?: string;\n\n /**\n * Specifies whether to add aria-required to the file upload control.\n */\n ariaRequired?: boolean;\n\n /**\n * Specifies the native file input `multiple` attribute to allow users entering more than one file.\n */\n multiple?: boolean;\n\n /**\n * Called when the user selects new file(s), or removes a file.\n * The event `detail` contains the current value of the component.\n */\n onChange: NonCancelableEventHandler<FileInputProps.ChangeDetail>;\n\n /**\n * Specifies the currently selected file(s).\n * If you want to clear the selection, use empty array.\n */\n value: ReadonlyArray<File>;\n}\n\nexport namespace FileInputProps {\n export interface ChangeDetail {\n value: File[];\n }\n\n export interface Ref {\n /**\n * Sets focus on the file upload button.\n */\n focus(): void;\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { BaseComponentProps } from '../internal/base-component/index.js';
3
2
  import { TokenGroupProps } from '../token-group/interfaces.js';
3
+ import { BaseComponentProps } from '../types/base-component';
4
4
  export declare namespace FileTokenProps {
5
5
  interface I18nStrings {
6
6
  removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"file-token.d.ts","sourceRoot":"","sources":["../../../src/file-token-group/file-token.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAOhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAIzE,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jB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iBAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,KAAK,GACN,EAAE,cAAc,eAuJhB;AAED,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-token.js","sourceRoot":"","sources":["../../../src/file-token-group/file-token.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE/F,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1E,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAC7C,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AA8B1D,SAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,KAAK,GACU;;IACf,MAAM,c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AoB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,IACrF,WAAW,CACK,CACpB;QACA,WAAW,IAAI,WAAW,IAAI,CAC7B,oBAAC,OAAO,IACN,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EACpC,OAAO,EAAE,oBAAC,WAAW,IAAC,UAAU,EAAC,QAAQ,IAAE,IAAI,CAAC,IAAI,CAAe,EACnE,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,GACrC,CACH,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalBox from '../box/internal.js';\nimport { FormFieldError, FormFieldWarning } from '../form-field/internal';\nimport { BaseComponentProps } from '../internal/base-component/index.js';\nimport InternalSpaceBetween from '../space-between/internal.js';\nimport InternalSpinner from '../spinner/internal.js';\nimport InternalToken from '../token/internal.js';\nimport { TokenGroupProps } from '../token-group/interfaces.js';\nimport Tooltip from '../tooltip/internal.js';\nimport * as defaultFormatters from './default-formatters.js';\nimport { FileOptionThumbnail } from './thumbnail.js';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport namespace FileTokenProps {\n export interface I18nStrings {\n removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n}\n\ninterface FileTokenProps extends BaseComponentProps {\n file: File;\n onDismiss: () => void;\n showFileSize?: boolean;\n showFileLastModified?: boolean;\n showFileThumbnail?: boolean;\n errorText?: React.ReactNode;\n warningText?: React.ReactNode;\n loading?: boolean;\n readOnly?: boolean;\n i18nStrings?: FileTokenProps.I18nStrings;\n dismissLabel?: string;\n alignment?: TokenGroupProps.Alignment;\n groupContainsImage?: boolean;\n isImage: boolean;\n index: number;\n}\n\nfunction InternalFileToken({\n file,\n showFileLastModified,\n showFileSize,\n showFileThumbnail,\n i18nStrings,\n onDismiss,\n errorText,\n warningText,\n readOnly,\n loading,\n alignment,\n groupContainsImage,\n isImage,\n index,\n}: FileTokenProps) {\n const formatFileSize = i18nStrings?.formatFileSize ?? defaultFormatters.formatFileSize;\n const formatFileLastModified = i18nStrings?.formatFileLastModified ?? defaultFormatters.formatFileLastModified;\n\n const errorId = useUniqueId('error');\n const warningId = useUniqueId('warning');\n\n const showWarning = warningText && !errorText;\n const containerRef = useRef<HTMLDivElement>(null);\n const fileNameRef = useRef<HTMLSpanElement>(null);\n const fileNameContainerRef = useRef<HTMLDivElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n const [isTruncated, setIsTruncated] = useState(false);\n\n const getDismissLabel = (fileIndex: number) => i18nStrings?.removeFileAriaLabel?.(fileIndex, file.name);\n\n function isEllipsisActive() {\n const span = fileNameRef.current;\n const container = fileNameContainerRef.current;\n\n if (span && container) {\n return span.offsetWidth >= container.offsetWidth;\n }\n return false;\n }\n\n useResizeObserver(\n () => fileNameContainerRef.current,\n () => setIsTruncated(isEllipsisActive())\n );\n\n const fileIsSingleRow =\n !showFileLastModified && !showFileSize && (!groupContainsImage || (groupContainsImage && !showFileThumbnail));\n\n // The full body of the token. Rendered through InternalToken's customContent slot so this\n // component owns the inner layout (thumbnail + metadata column + loading overlay), while\n // InternalToken handles the token-box and the dismiss button.\n const fileContent = (\n <>\n {loading && (\n <div\n className={clsx(styles['file-loading-overlay'], {\n [styles['file-loading-overlay-single-row']]: loading && fileIsSingleRow,\n })}\n >\n <InternalSpinner variant=\"normal\" size=\"normal\" />\n </div>\n )}\n <InternalBox className={styles['file-option']}>\n {showFileThumbnail && isImage && <FileOptionThumbnail file={file} />}\n\n <div\n className={clsx(styles['file-option-metadata'], {\n [styles['with-image']]: showFileThumbnail && isImage,\n [styles['single-row-loading']]: loading && fileIsSingleRow,\n })}\n >\n <InternalSpaceBetween direction=\"vertical\" size=\"xxxs\">\n <div\n className={styles['file-name-container']}\n onMouseOver={() => setShowTooltip(true)}\n onMouseOut={() => setShowTooltip(false)}\n onFocus={() => setShowTooltip(true)}\n onBlur={() => setShowTooltip(false)}\n role={isTruncated ? 'button' : undefined}\n aria-expanded={isTruncated ? showTooltip : undefined}\n tabIndex={isTruncated ? 0 : -1}\n ref={fileNameContainerRef}\n >\n <InternalBox\n fontWeight=\"normal\"\n className={clsx(styles['file-option-name'], testUtilStyles['file-option-name'], {\n [testUtilStyles['ellipsis-active']]: isTruncated,\n })}\n >\n <span ref={fileNameRef}>{file.name}</span>\n </InternalBox>\n </div>\n\n {showFileSize && file.size ? (\n <InternalBox\n fontSize=\"body-s\"\n color={'text-body-secondary'}\n className={clsx(styles['file-option-size'], testUtilStyles['file-option-size'])}\n >\n {formatFileSize(file.size)}\n </InternalBox>\n ) : null}\n\n {showFileLastModified && file.lastModified ? (\n <InternalBox\n fontSize=\"body-s\"\n color={'text-body-secondary'}\n className={clsx(styles['file-option-last-modified'], testUtilStyles['file-option-last-modified'])}\n >\n {formatFileLastModified(new Date(file.lastModified))}\n </InternalBox>\n ) : null}\n </InternalSpaceBetween>\n </div>\n </InternalBox>\n </>\n );\n\n return (\n <div\n ref={containerRef}\n className={clsx(styles.token, {\n [styles['token-grid']]: alignment === 'horizontal',\n [styles['token-contains-image']]: groupContainsImage && showFileThumbnail,\n })}\n role=\"group\"\n aria-label={file.name}\n aria-describedby={errorText ? errorId : warningText ? warningId : undefined}\n aria-disabled={loading || undefined}\n data-index={index}\n >\n <InternalToken\n // The outer wrapper above is the accessibility group (role=\"group\" + aria-label). The\n // token itself is presentation-only so screen readers don't see two nested groups.\n role=\"presentation\"\n __customContent={fileContent}\n onDismiss={readOnly ? undefined : onDismiss}\n dismissLabel={getDismissLabel(index)}\n __tokenBoxClassName={clsx(styles['token-box'], {\n [styles.loading]: loading,\n [styles.error]: errorText,\n [styles.warning]: showWarning,\n [styles.horizontal]: alignment === 'horizontal',\n [styles['read-only']]: readOnly,\n })}\n />\n {errorText && (\n <FormFieldError id={errorId} errorIconAriaLabel={i18nStrings?.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {showWarning && (\n <FormFieldWarning id={warningId} warningIconAriaLabel={i18nStrings?.warningIconAriaLabel}>\n {warningText}\n </FormFieldWarning>\n )}\n {showTooltip && isTruncated && (\n <Tooltip\n getTrack={() => containerRef.current}\n content={<InternalBox fontWeight=\"normal\">{file.name}</InternalBox>}\n onEscape={() => setShowTooltip(false)}\n />\n )}\n </div>\n );\n}\n\nexport default InternalFileToken;\n"]}
1
+ {"version":3,"file":"file-token.js","sourceRoot":"","sources":["../../../src/file-token-group/file-token.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE/F,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,aAAa,MAAM,sBAAsB,CAAC;AAEjD,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAE7C,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AA8B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AAI,CACZ,oBAAC,cAAc,IAAC,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,kBAAkB,IAC7E,SAAS,CACK,CAClB;QACA,WAAW,IAAI,CACd,oBAAC,gBAAgB,IAAC,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,IACrF,WAAW,CACK,CACpB;QACA,WAAW,IAAI,WAAW,IAAI,CAC7B,oBAAC,OAAO,IACN,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EACpC,OAAO,EAAE,oBAAC,WAAW,IAAC,UAAU,EAAC,QAAQ,IAAE,IAAI,CAAC,IAAI,CAAe,EACnE,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,GACrC,CACH,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalBox from '../box/internal.js';\nimport { FormFieldError, FormFieldWarning } from '../form-field/internal';\nimport InternalSpaceBetween from '../space-between/internal.js';\nimport InternalSpinner from '../spinner/internal.js';\nimport InternalToken from '../token/internal.js';\nimport { TokenGroupProps } from '../token-group/interfaces.js';\nimport Tooltip from '../tooltip/internal.js';\nimport { BaseComponentProps } from '../types/base-component';\nimport * as defaultFormatters from './default-formatters.js';\nimport { FileOptionThumbnail } from './thumbnail.js';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport namespace FileTokenProps {\n export interface I18nStrings {\n removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n}\n\ninterface FileTokenProps extends BaseComponentProps {\n file: File;\n onDismiss: () => void;\n showFileSize?: boolean;\n showFileLastModified?: boolean;\n showFileThumbnail?: boolean;\n errorText?: React.ReactNode;\n warningText?: React.ReactNode;\n loading?: boolean;\n readOnly?: boolean;\n i18nStrings?: FileTokenProps.I18nStrings;\n dismissLabel?: string;\n alignment?: TokenGroupProps.Alignment;\n groupContainsImage?: boolean;\n isImage: boolean;\n index: number;\n}\n\nfunction InternalFileToken({\n file,\n showFileLastModified,\n showFileSize,\n showFileThumbnail,\n i18nStrings,\n onDismiss,\n errorText,\n warningText,\n readOnly,\n loading,\n alignment,\n groupContainsImage,\n isImage,\n index,\n}: FileTokenProps) {\n const formatFileSize = i18nStrings?.formatFileSize ?? defaultFormatters.formatFileSize;\n const formatFileLastModified = i18nStrings?.formatFileLastModified ?? defaultFormatters.formatFileLastModified;\n\n const errorId = useUniqueId('error');\n const warningId = useUniqueId('warning');\n\n const showWarning = warningText && !errorText;\n const containerRef = useRef<HTMLDivElement>(null);\n const fileNameRef = useRef<HTMLSpanElement>(null);\n const fileNameContainerRef = useRef<HTMLDivElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n const [isTruncated, setIsTruncated] = useState(false);\n\n const getDismissLabel = (fileIndex: number) => i18nStrings?.removeFileAriaLabel?.(fileIndex, file.name);\n\n function isEllipsisActive() {\n const span = fileNameRef.current;\n const container = fileNameContainerRef.current;\n\n if (span && container) {\n return span.offsetWidth >= container.offsetWidth;\n }\n return false;\n }\n\n useResizeObserver(\n () => fileNameContainerRef.current,\n () => setIsTruncated(isEllipsisActive())\n );\n\n const fileIsSingleRow =\n !showFileLastModified && !showFileSize && (!groupContainsImage || (groupContainsImage && !showFileThumbnail));\n\n // The full body of the token. Rendered through InternalToken's customContent slot so this\n // component owns the inner layout (thumbnail + metadata column + loading overlay), while\n // InternalToken handles the token-box and the dismiss button.\n const fileContent = (\n <>\n {loading && (\n <div\n className={clsx(styles['file-loading-overlay'], {\n [styles['file-loading-overlay-single-row']]: loading && fileIsSingleRow,\n })}\n >\n <InternalSpinner variant=\"normal\" size=\"normal\" />\n </div>\n )}\n <InternalBox className={styles['file-option']}>\n {showFileThumbnail && isImage && <FileOptionThumbnail file={file} />}\n\n <div\n className={clsx(styles['file-option-metadata'], {\n [styles['with-image']]: showFileThumbnail && isImage,\n [styles['single-row-loading']]: loading && fileIsSingleRow,\n })}\n >\n <InternalSpaceBetween direction=\"vertical\" size=\"xxxs\">\n <div\n className={styles['file-name-container']}\n onMouseOver={() => setShowTooltip(true)}\n onMouseOut={() => setShowTooltip(false)}\n onFocus={() => setShowTooltip(true)}\n onBlur={() => setShowTooltip(false)}\n role={isTruncated ? 'button' : undefined}\n aria-expanded={isTruncated ? showTooltip : undefined}\n tabIndex={isTruncated ? 0 : -1}\n ref={fileNameContainerRef}\n >\n <InternalBox\n fontWeight=\"normal\"\n className={clsx(styles['file-option-name'], testUtilStyles['file-option-name'], {\n [testUtilStyles['ellipsis-active']]: isTruncated,\n })}\n >\n <span ref={fileNameRef}>{file.name}</span>\n </InternalBox>\n </div>\n\n {showFileSize && file.size ? (\n <InternalBox\n fontSize=\"body-s\"\n color={'text-body-secondary'}\n className={clsx(styles['file-option-size'], testUtilStyles['file-option-size'])}\n >\n {formatFileSize(file.size)}\n </InternalBox>\n ) : null}\n\n {showFileLastModified && file.lastModified ? (\n <InternalBox\n fontSize=\"body-s\"\n color={'text-body-secondary'}\n className={clsx(styles['file-option-last-modified'], testUtilStyles['file-option-last-modified'])}\n >\n {formatFileLastModified(new Date(file.lastModified))}\n </InternalBox>\n ) : null}\n </InternalSpaceBetween>\n </div>\n </InternalBox>\n </>\n );\n\n return (\n <div\n ref={containerRef}\n className={clsx(styles.token, {\n [styles['token-grid']]: alignment === 'horizontal',\n [styles['token-contains-image']]: groupContainsImage && showFileThumbnail,\n })}\n role=\"group\"\n aria-label={file.name}\n aria-describedby={errorText ? errorId : warningText ? warningId : undefined}\n aria-disabled={loading || undefined}\n data-index={index}\n >\n <InternalToken\n // The outer wrapper above is the accessibility group (role=\"group\" + aria-label). The\n // token itself is presentation-only so screen readers don't see two nested groups.\n role=\"presentation\"\n __customContent={fileContent}\n onDismiss={readOnly ? undefined : onDismiss}\n dismissLabel={getDismissLabel(index)}\n __tokenBoxClassName={clsx(styles['token-box'], {\n [styles.loading]: loading,\n [styles.error]: errorText,\n [styles.warning]: showWarning,\n [styles.horizontal]: alignment === 'horizontal',\n [styles['read-only']]: readOnly,\n })}\n />\n {errorText && (\n <FormFieldError id={errorId} errorIconAriaLabel={i18nStrings?.errorIconAriaLabel}>\n {errorText}\n </FormFieldError>\n )}\n {showWarning && (\n <FormFieldWarning id={warningId} warningIconAriaLabel={i18nStrings?.warningIconAriaLabel}>\n {warningText}\n </FormFieldWarning>\n )}\n {showTooltip && isTruncated && (\n <Tooltip\n getTrack={() => containerRef.current}\n content={<InternalBox fontWeight=\"normal\">{file.name}</InternalBox>}\n onEscape={() => setShowTooltip(false)}\n />\n )}\n </div>\n );\n}\n\nexport default InternalFileToken;\n"]}
@@ -1,5 +1,5 @@
1
- import { BaseComponentProps } from '../internal/base-component';
2
- import { NonCancelableEventHandler } from '../internal/events';
1
+ import { BaseComponentProps } from '../types/base-component';
2
+ import { NonCancelableEventHandler } from '../types/events';
3
3
  export interface FileTokenGroupProps extends BaseComponentProps {
4
4
  /**
5
5
  * Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/file-token-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;I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Q,EAAE,MAAM,KAAK,MAAM,CAAC;QACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;QACjD,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;KACjD;IAED,KAAY,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;IAElD,UAAiB,IAAI;QACnB,IAAI,EAAE,IAAI,CAAC;QACX,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;KAC7B;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-token-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface FileTokenGroupProps extends BaseComponentProps {\n /**\n * Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.\n */\n showFileSize?: boolean;\n\n /**\n * Show file last modified timestamp in the token. Use `i18nStrings.formatFileLastModified` to customize it.\n */\n showFileLastModified?: boolean;\n\n /**\n * Show file thumbnail in the token. Only supported for images.\n */\n showFileThumbnail?: boolean;\n /**\n * Called when the user clicks on the dismiss button. The token won't be automatically removed.\n * Make sure that you add a listener to this event to update your application state.\n */\n onDismiss: NonCancelableEventHandler<FileTokenGroupProps.DismissDetail>;\n\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n limit?: number;\n /**\n * Specifies the direction in which tokens are aligned (`horizontal | vertical`).\n */\n alignment?: FileTokenGroupProps.Alignment;\n\n /**\n *\n * An array of objects representing token items. Each token has the following properties:\n *\n * - `file` (string) - File value.\n * - `loading` (boolean) - (Optional) Determine whether the token is loading.\n * - `errorText` (string) - (Optional) Text that displays as a validation error message.\n * - `warningText` (string) - (Optional) - Text that displays as a validation warning message.\n */\n items: ReadonlyArray<FileTokenGroupProps.Item>;\n /**\n * Adds an `aria-label` to the \"Show fewer\" button.\n * Use to assign unique labels when there are multiple file token groups with the same `limitShowFewer` label on one page.\n */\n limitShowFewerAriaLabel?: string;\n /**\n * Adds an `aria-label` to the \"Show more\" button.\n * Use to assign unique labels when there are multiple file token groups with the same `limitShowMore` label on one page.\n */\n limitShowMoreAriaLabel?: string;\n /**\n * Specifies if the control is read-only, which prevents the\n * user from modifying the value. A read-only control is still focusable.\n */\n readOnly?: boolean;\n /**\n * An object containing all the localized strings required by the component:\n * * `removeFileAriaLabel` (function): A function to render the ARIA label for file token remove button. Receives file index and file name.\n * * `errorIconAriaLabel` (string): The ARIA label to be shown on the error file icon.\n * * `warningIconAriaLabel` (string): The ARIA label to be shown on the warning file icon.\n * * `formatFileSize` (function): (Optional) A function that takes file size in bytes, and produces a formatted string.\n * * `formatFileLastModified` (function): (Optional) A function that takes the files last modified date, and produces a formatted string.\n */\n i18nStrings?: FileTokenGroupProps.I18nStrings;\n}\n\nexport namespace FileTokenGroupProps {\n export interface DismissDetail {\n fileIndex: number;\n }\n\n export interface I18nStrings {\n limitShowFewer?: string;\n limitShowMore?: string;\n\n removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n\n export type Alignment = 'horizontal' | 'vertical';\n\n export interface Item {\n file: File;\n loading?: boolean;\n errorText?: null | string;\n warningText?: null | string;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-token-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface FileTokenGroupProps extends BaseComponentProps {\n /**\n * Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.\n */\n showFileSize?: boolean;\n\n /**\n * Show file last modified timestamp in the token. Use `i18nStrings.formatFileLastModified` to customize it.\n */\n showFileLastModified?: boolean;\n\n /**\n * Show file thumbnail in the token. Only supported for images.\n */\n showFileThumbnail?: boolean;\n /**\n * Called when the user clicks on the dismiss button. The token won't be automatically removed.\n * Make sure that you add a listener to this event to update your application state.\n */\n onDismiss: NonCancelableEventHandler<FileTokenGroupProps.DismissDetail>;\n\n /**\n * Specifies the maximum number of displayed tokens. If the property isn't set, all of the tokens are displayed.\n */\n limit?: number;\n /**\n * Specifies the direction in which tokens are aligned (`horizontal | vertical`).\n */\n alignment?: FileTokenGroupProps.Alignment;\n\n /**\n *\n * An array of objects representing token items. Each token has the following properties:\n *\n * - `file` (string) - File value.\n * - `loading` (boolean) - (Optional) Determine whether the token is loading.\n * - `errorText` (string) - (Optional) Text that displays as a validation error message.\n * - `warningText` (string) - (Optional) - Text that displays as a validation warning message.\n */\n items: ReadonlyArray<FileTokenGroupProps.Item>;\n /**\n * Adds an `aria-label` to the \"Show fewer\" button.\n * Use to assign unique labels when there are multiple file token groups with the same `limitShowFewer` label on one page.\n */\n limitShowFewerAriaLabel?: string;\n /**\n * Adds an `aria-label` to the \"Show more\" button.\n * Use to assign unique labels when there are multiple file token groups with the same `limitShowMore` label on one page.\n */\n limitShowMoreAriaLabel?: string;\n /**\n * Specifies if the control is read-only, which prevents the\n * user from modifying the value. A read-only control is still focusable.\n */\n readOnly?: boolean;\n /**\n * An object containing all the localized strings required by the component:\n * * `removeFileAriaLabel` (function): A function to render the ARIA label for file token remove button. Receives file index and file name.\n * * `errorIconAriaLabel` (string): The ARIA label to be shown on the error file icon.\n * * `warningIconAriaLabel` (string): The ARIA label to be shown on the warning file icon.\n * * `formatFileSize` (function): (Optional) A function that takes file size in bytes, and produces a formatted string.\n * * `formatFileLastModified` (function): (Optional) A function that takes the files last modified date, and produces a formatted string.\n */\n i18nStrings?: FileTokenGroupProps.I18nStrings;\n}\n\nexport namespace FileTokenGroupProps {\n export interface DismissDetail {\n fileIndex: number;\n }\n\n export interface I18nStrings {\n limitShowFewer?: string;\n limitShowMore?: string;\n\n removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n\n export type Alignment = 'horizontal' | 'vertical';\n\n export interface Item {\n file: File;\n loading?: boolean;\n errorText?: null | string;\n warningText?: null | string;\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseComponentProps } from '../internal/base-component';
2
- import { FormFieldCommonValidationControlProps } from '../internal/context/form-field-context';
3
- import { NonCancelableEventHandler } from '../internal/events';
1
+ import { BaseComponentProps } from '../types/base-component';
2
+ import { NonCancelableEventHandler } from '../types/events';
3
+ import { FormFieldCommonValidationControlProps } from '../types/form-field';
4
4
  export interface FileUploadProps extends BaseComponentProps, FormFieldCommonValidationControlProps {
5
5
  /**
6
6
  * Specifies the native file input `accept` attribute to describe the allow-list of file types.
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/file-upload/interfaces.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qCAAqC,EAAE,MAAM,wCAAwC,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,qCAAqC;IAChG;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE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AC;QACjD,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;KACjD;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-upload/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 { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldCommonValidationControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface FileUploadProps extends BaseComponentProps, FormFieldCommonValidationControlProps {\n /**\n * Specifies the native file input `accept` attribute to describe the allow-list of file types.\n */\n accept?: string;\n /**\n * Specifies whether to add aria-required to the file upload control.\n */\n ariaRequired?: boolean;\n /**\n * Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.\n */\n showFileSize?: boolean;\n /**\n * Show file last modified timestamp in the token. Use `i18nStrings.formatFileLastModified` to customize it.\n */\n showFileLastModified?: boolean;\n /**\n * Show file thumbnail in the token. Only supported for images.\n */\n showFileThumbnail?: boolean;\n /**\n * Specifies the native file input `multiple` attribute to allow users entering more than one file.\n */\n multiple?: boolean;\n /**\n * Called when the user selects new file(s), or removes a file.\n * The event `detail` contains the current value of the component.\n */\n onChange?: NonCancelableEventHandler<FileUploadProps.ChangeDetail>;\n /**\n * Specifies the currently selected file(s).\n * If you want to clear the selection, use empty array.\n */\n value: ReadonlyArray<File>;\n /**\n * Specifies the maximum number of displayed file tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Constraint text that is displayed below the control. Use this to provide additional information about file size limit, etc.\n */\n constraintText?: React.ReactNode;\n /**\n * Text that displays as a validation error message.\n */\n errorText?: React.ReactNode;\n /**\n * Text that displays as a validation warning message.\n */\n warningText?: React.ReactNode;\n /**\n * An array of file errors corresponding to the files in the `value`.\n */\n fileErrors?: ReadonlyArray<null | string>;\n /**\n * An array of file warnings corresponding to the files in the `value`.\n */\n fileWarnings?: ReadonlyArray<null | string>;\n /**\n * Alignment of the file tokens. Defaults to \"vertical\".\n */\n fileTokenAlignment?: FileUploadProps.FileTokenAlignment;\n /**\n * An object containing all the localized strings required by the component:\n * * `uploadButtonText` (function): A function to render the text of the file upload button. It takes `multiple` attribute to define plurality.\n * * `dropzoneText` (function): A function to render the text shown in the dropzone. It takes `multiple` attribute to define plurality.\n * * `removeFileAriaLabel` (function): A function to render the ARIA label for file token remove button.\n * * `limitShowFewer` (string): The text of the show more tokens button.\n * * `limitShowMore` (string): The text of the show fewer tokens button.\n * * `errorIconAriaLabel` (string): The ARIA label to be shown on the error file icon.\n * * `warningIconAriaLabel` (string): The ARIA label to be shown on the warning file icon.\n * * `formatFileSize` (function): (Optional) A function that takes file size in bytes, and produces a formatted string.\n * * `formatFileLastModified` (function): (Optional) A function that takes the files last modified date, and produces a formatted string.\n */\n i18nStrings?: FileUploadProps.I18nStrings;\n}\n\nexport namespace FileUploadProps {\n export interface ChangeDetail {\n value: File[];\n }\n\n export interface DismissDetail {\n index: number;\n file: File;\n }\n\n export type FileTokenAlignment = 'vertical' | 'horizontal';\n\n export interface I18nStrings {\n uploadButtonText?: (multiple: boolean) => string;\n dropzoneText?: (multiple: boolean) => string;\n removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;\n limitShowFewer?: string;\n limitShowMore?: string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the file upload button.\n */\n focus(): void;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/file-upload/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 { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldCommonValidationControlProps } from '../types/form-field';\n\nexport interface FileUploadProps extends BaseComponentProps, FormFieldCommonValidationControlProps {\n /**\n * Specifies the native file input `accept` attribute to describe the allow-list of file types.\n */\n accept?: string;\n /**\n * Specifies whether to add aria-required to the file upload control.\n */\n ariaRequired?: boolean;\n /**\n * Show file size in the token. Use `i18nStrings.formatFileSize` to customize it.\n */\n showFileSize?: boolean;\n /**\n * Show file last modified timestamp in the token. Use `i18nStrings.formatFileLastModified` to customize it.\n */\n showFileLastModified?: boolean;\n /**\n * Show file thumbnail in the token. Only supported for images.\n */\n showFileThumbnail?: boolean;\n /**\n * Specifies the native file input `multiple` attribute to allow users entering more than one file.\n */\n multiple?: boolean;\n /**\n * Called when the user selects new file(s), or removes a file.\n * The event `detail` contains the current value of the component.\n */\n onChange?: NonCancelableEventHandler<FileUploadProps.ChangeDetail>;\n /**\n * Specifies the currently selected file(s).\n * If you want to clear the selection, use empty array.\n */\n value: ReadonlyArray<File>;\n /**\n * Specifies the maximum number of displayed file tokens. If the property isn't set, all of the tokens are displayed.\n */\n tokenLimit?: number;\n /**\n * Constraint text that is displayed below the control. Use this to provide additional information about file size limit, etc.\n */\n constraintText?: React.ReactNode;\n /**\n * Text that displays as a validation error message.\n */\n errorText?: React.ReactNode;\n /**\n * Text that displays as a validation warning message.\n */\n warningText?: React.ReactNode;\n /**\n * An array of file errors corresponding to the files in the `value`.\n */\n fileErrors?: ReadonlyArray<null | string>;\n /**\n * An array of file warnings corresponding to the files in the `value`.\n */\n fileWarnings?: ReadonlyArray<null | string>;\n /**\n * Alignment of the file tokens. Defaults to \"vertical\".\n */\n fileTokenAlignment?: FileUploadProps.FileTokenAlignment;\n /**\n * An object containing all the localized strings required by the component:\n * * `uploadButtonText` (function): A function to render the text of the file upload button. It takes `multiple` attribute to define plurality.\n * * `dropzoneText` (function): A function to render the text shown in the dropzone. It takes `multiple` attribute to define plurality.\n * * `removeFileAriaLabel` (function): A function to render the ARIA label for file token remove button.\n * * `limitShowFewer` (string): The text of the show more tokens button.\n * * `limitShowMore` (string): The text of the show fewer tokens button.\n * * `errorIconAriaLabel` (string): The ARIA label to be shown on the error file icon.\n * * `warningIconAriaLabel` (string): The ARIA label to be shown on the warning file icon.\n * * `formatFileSize` (function): (Optional) A function that takes file size in bytes, and produces a formatted string.\n * * `formatFileLastModified` (function): (Optional) A function that takes the files last modified date, and produces a formatted string.\n */\n i18nStrings?: FileUploadProps.I18nStrings;\n}\n\nexport namespace FileUploadProps {\n export interface ChangeDetail {\n value: File[];\n }\n\n export interface DismissDetail {\n index: number;\n file: File;\n }\n\n export type FileTokenAlignment = 'vertical' | 'horizontal';\n\n export interface I18nStrings {\n uploadButtonText?: (multiple: boolean) => string;\n dropzoneText?: (multiple: boolean) => string;\n removeFileAriaLabel?: (fileIndex: number, fileName: string) => string;\n limitShowFewer?: string;\n limitShowMore?: string;\n errorIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n formatFileSize?: (sizeInBytes: number) => string;\n formatFileLastModified?: (date: Date) => string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the file upload button.\n */\n focus(): void;\n }\n}\n"]}
@@ -16,7 +16,7 @@ export declare function useFlashbar({
16
16
  }) => void;
17
17
  }): {
18
18
  allItemsHaveId: boolean;
19
- baseProps: import("../internal/base-component").BaseComponentProps;
19
+ baseProps: import("../types/base-component").BaseComponentProps;
20
20
  isReducedMotion: boolean;
21
21
  isVisualRefresh: boolean;
22
22
  mergedRef: ((instance: any) => void) | null;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from '../button/interfaces';
3
- import { ErrorContext } from '../internal/analytics/interfaces';
4
- import { BaseComponentProps } from '../internal/base-component';
5
3
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
4
+ import { ErrorContext } from '../types/analytics';
5
+ import { BaseComponentProps } from '../types/base-component';
6
6
  export declare namespace FlashbarProps {
7
7
  interface MessageDefinition {
8
8
  header?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,iBAAiB;QAChC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,IAAI,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC;QAC1B,QAAQ,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC;QAClC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACzB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;QACrC,aAAa,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QACvC,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QACnC,iBAAiB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC;QACxD,iBAAiB,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC;KACrD;IAED,UAAiB,qBAAqB;QAC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B,CAAC;aACH,CAAC;SACH,CAAC;KACH;IAED,KAAY,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;IAC5E,KAAY,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;CAC3C;AAED,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAEtD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC;IAExC;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;CAC7B;AAED,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/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 { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n persistenceConfig?: FlashbarProps.PersistenceConfig;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n export interface PersistenceConfig {\n uniqueKey: string;\n crossServicePersistence?: boolean;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `onDismiss` (event => void) - (Optional) Called when a user clicks on the dismiss button.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `persistenceConfig` (FlashbarProps.PersistenceConfig) - Config to persist dismiss state for dismissable Flashbar item, used only in AWS Consoles.\n * * `uniqueKey` (string) - This key to store the persistence state, it must be unique across your console.\n * * `crossServicePersistence` (boolean) - If true, the persistence state will be shared across AWS services.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * An object containing CSS properties to customize the flashbar's visual appearance.\n * Refer to the [style](/components/flashbar/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n\nexport type InternalFlashbarProps = FlashbarProps & InternalBaseComponentProps;\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/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 { ButtonProps } from '../button/interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { ErrorContext } from '../types/analytics';\nimport { BaseComponentProps } from '../types/base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n persistenceConfig?: FlashbarProps.PersistenceConfig;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n export interface PersistenceConfig {\n uniqueKey: string;\n crossServicePersistence?: boolean;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `onDismiss` (event => void) - (Optional) Called when a user clicks on the dismiss button.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `persistenceConfig` (FlashbarProps.PersistenceConfig) - Config to persist dismiss state for dismissable Flashbar item, used only in AWS Consoles.\n * * `uniqueKey` (string) - This key to store the persistence state, it must be unique across your console.\n * * `crossServicePersistence` (boolean) - If true, the persistence state will be shared across AWS services.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * An object containing CSS properties to customize the flashbar's visual appearance.\n * Refer to the [style](/components/flashbar/?tabId=style) tab for more details.\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n\nexport type InternalFlashbarProps = FlashbarProps & InternalBaseComponentProps;\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ErrorContext, FlowType } from '../internal/analytics/interfaces';
3
- import { BaseComponentProps } from '../internal/base-component';
2
+ import { ErrorContext, FlowType } from '../types/analytics';
3
+ import { BaseComponentProps } from '../types/base-component';
4
4
  export declare namespace FormProps {
5
5
  interface AnalyticsMetadata {
6
6
  instanceIdentifier?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/form/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,yBAAiB,SAAS,CAAC;IACzB,UAAiB,iBAAiB;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;CACF;AAED,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAEnC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC;CACjD"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/form/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,yBAAiB,SAAS,CAAC;IACzB,UAAiB,iBAAiB;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;CACF;AAED,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;IAEnC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC;CACjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/form/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 { ErrorContext, FlowType } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport namespace FormProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n resourceType?: string;\n errorContext?: ErrorContext;\n }\n}\n\nexport interface FormProps extends BaseComponentProps {\n /**\n * Specifies the main form content.\n */\n children?: React.ReactNode;\n\n /**\n * Specifies the form title and optional description. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Specifies a form-level validation message.\n */\n errorText?: React.ReactNode;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * Specifies actions for the form. You should wrap action buttons in a [space between component](/components/space-between) with `direction=\"horizontal\"` and `size=\"xs\"`.\n */\n actions?: React.ReactNode;\n\n /**\n * Specifies left-aligned secondary actions for the form. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Specify a form variant with one of the following:\n * * `full-page` - Use this variant when the form contains the entire content of the page.\n * * `embedded` - Use this variant when the form doesn't occupy the full page.\n * @deprecated You can safely remove this property as there is no longer any visual difference between `full-page` and `embedded` variants.\n */\n variant?: 'full-page' | 'embedded';\n\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * * `errorContext` - Identifies the error category and sub-category.\n * @analytics\n */\n analyticsMetadata?: FormProps.AnalyticsMetadata;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/form/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 { ErrorContext, FlowType } from '../types/analytics';\nimport { BaseComponentProps } from '../types/base-component';\n\nexport namespace FormProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n flowType?: FlowType;\n resourceType?: string;\n errorContext?: ErrorContext;\n }\n}\n\nexport interface FormProps extends BaseComponentProps {\n /**\n * Specifies the main form content.\n */\n children?: React.ReactNode;\n\n /**\n * Specifies the form title and optional description. Use the [header component](/components/header/).\n */\n header?: React.ReactNode;\n\n /**\n * Specifies a form-level validation message.\n */\n errorText?: React.ReactNode;\n\n /**\n * Provides a text alternative for the error icon in the error alert.\n * @i18n\n */\n errorIconAriaLabel?: string;\n\n /**\n * Specifies actions for the form. You should wrap action buttons in a [space between component](/components/space-between) with `direction=\"horizontal\"` and `size=\"xs\"`.\n */\n actions?: React.ReactNode;\n\n /**\n * Specifies left-aligned secondary actions for the form. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Specify a form variant with one of the following:\n * * `full-page` - Use this variant when the form contains the entire content of the page.\n * * `embedded` - Use this variant when the form doesn't occupy the full page.\n * @deprecated You can safely remove this property as there is no longer any visual difference between `full-page` and `embedded` variants.\n */\n variant?: 'full-page' | 'embedded';\n\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `flowType` - Identifies the type of flow represented by the component.\n * * `resourceType` - Identifies the type of resource represented by the flow. **Note:** This API is currently experimental.\n * * `errorContext` - Identifies the error category and sub-category.\n * @analytics\n */\n analyticsMetadata?: FormProps.AnalyticsMetadata;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from 'react';
2
- import { AnalyticsMetadata, ErrorContext } from '../internal/analytics/interfaces';
3
- import { BaseComponentProps } from '../internal/base-component';
4
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
3
+ import { AnalyticsMetadata, ErrorContext } from '../types/analytics';
4
+ import { BaseComponentProps } from '../types/base-component';
5
5
  export interface FormFieldProps extends BaseComponentProps {
6
6
  /**
7
7
  * The ID of the primary form control. You can use this to set the
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/form-field/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC;IAEzC;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;CACtD;AAED,yBAAiB,cAAc,CAAC;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AAK,CAAC,SAAS,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE5B;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC;CACtD;AAED,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,iBAAiB;QAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;IAED,UAAiB,WAAW;QAC1B;;WAEG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAE5B;;WAEG;QACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B;CACF;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc,EAAE,0BAA0B;IACxF;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;IACxC,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/form-field/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { CSSProperties } from 'react';\n\nimport { AnalyticsMetadata, ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nexport interface FormFieldProps extends BaseComponentProps {\n /**\n * The ID of the primary form control. You can use this to set the\n * `for` attribute of a label for accessibility.\n *\n * If you don't set this property, the control group automatically sets\n * the label to the ID of an inner form control (for example, an [input](/components/input) component).\n * This only works well if you're using a single control in the form field.\n */\n controlId?: string;\n\n /**\n * Determines whether the primary control should expand to 12 columns.\n *\n * By default (or when this property is set to `false`), the primary control\n * occupies 9 columns. The secondary control uses the remaining 3 columns.\n * On smaller viewports, both components occupy 12 columns and stack on top of each other.\n *\n * If this property is set to `true`, the primary control uses the full\n * 12 columns. The secondary control (if present) also uses 12 columns, and the two\n * controls stack on top of each other.\n */\n stretch?: boolean;\n\n /**\n * The main label for the form field.\n */\n label?: React.ReactNode;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: FormFieldProps.I18nStrings;\n\n /**\n * Use to display an 'Info' link next to the label.\n */\n info?: React.ReactNode;\n\n /**\n * The primary form control (for example, input, textarea, etc.).\n * @displayname control\n */\n children?: React.ReactNode;\n\n /**\n * A secondary control. You can use this for custom actions and content.\n */\n secondaryControl?: React.ReactNode;\n\n /**\n * Detailed information about the form field that's displayed below the label.\n */\n description?: React.ReactNode;\n\n /**\n * Constraint text that's displayed below the control. Use this to provide\n * additional information about valid formats, etc.\n */\n constraintText?: React.ReactNode;\n\n /**\n * Character count constraint displayed adjacent to the constraintText. Use\n * this to provide an updated character count on each keypress that is debounced\n * for screen reader users.\n */\n characterCountText?: string;\n\n /**\n * Text that displays as a validation error message. If this is set to a\n * non-empty string, it will render the form field as invalid.\n */\n errorText?: React.ReactNode;\n\n /**\n * Text that displays as a validation warning message. If this is set to a\n * non-empty string, it will render the form field in a warning state.\n */\n warningText?: React.ReactNode;\n\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `errorContext` - Identifies the error category and sub-category.\n * @analytics\n */\n analyticsMetadata?: FormFieldProps.AnalyticsMetadata;\n}\n\nexport namespace FormFieldProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n /**\n * Provides a text alternative for the error icon in the error message.\n */\n errorIconAriaLabel?: string;\n\n /**\n * Provides a text alternative for the warning icon in the warning message.\n */\n warningIconAriaLabel?: string;\n }\n}\n\nexport interface InternalFormFieldProps extends FormFieldProps, InternalBaseComponentProps {\n /**\n * Visually hide the label.\n */\n __hideLabel?: boolean;\n\n /**\n * Disable the gutter applied by default.\n */\n __disableGutters?: boolean;\n __analyticsMetadata?: AnalyticsMetadata;\n __style?: CSSProperties;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/form-field/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { CSSProperties } from 'react';\n\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { AnalyticsMetadata, ErrorContext } from '../types/analytics';\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface FormFieldProps extends BaseComponentProps {\n /**\n * The ID of the primary form control. You can use this to set the\n * `for` attribute of a label for accessibility.\n *\n * If you don't set this property, the control group automatically sets\n * the label to the ID of an inner form control (for example, an [input](/components/input) component).\n * This only works well if you're using a single control in the form field.\n */\n controlId?: string;\n\n /**\n * Determines whether the primary control should expand to 12 columns.\n *\n * By default (or when this property is set to `false`), the primary control\n * occupies 9 columns. The secondary control uses the remaining 3 columns.\n * On smaller viewports, both components occupy 12 columns and stack on top of each other.\n *\n * If this property is set to `true`, the primary control uses the full\n * 12 columns. The secondary control (if present) also uses 12 columns, and the two\n * controls stack on top of each other.\n */\n stretch?: boolean;\n\n /**\n * The main label for the form field.\n */\n label?: React.ReactNode;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: FormFieldProps.I18nStrings;\n\n /**\n * Use to display an 'Info' link next to the label.\n */\n info?: React.ReactNode;\n\n /**\n * The primary form control (for example, input, textarea, etc.).\n * @displayname control\n */\n children?: React.ReactNode;\n\n /**\n * A secondary control. You can use this for custom actions and content.\n */\n secondaryControl?: React.ReactNode;\n\n /**\n * Detailed information about the form field that's displayed below the label.\n */\n description?: React.ReactNode;\n\n /**\n * Constraint text that's displayed below the control. Use this to provide\n * additional information about valid formats, etc.\n */\n constraintText?: React.ReactNode;\n\n /**\n * Character count constraint displayed adjacent to the constraintText. Use\n * this to provide an updated character count on each keypress that is debounced\n * for screen reader users.\n */\n characterCountText?: string;\n\n /**\n * Text that displays as a validation error message. If this is set to a\n * non-empty string, it will render the form field as invalid.\n */\n errorText?: React.ReactNode;\n\n /**\n * Text that displays as a validation warning message. If this is set to a\n * non-empty string, it will render the form field in a warning state.\n */\n warningText?: React.ReactNode;\n\n /**\n * Specifies additional analytics-related metadata.\n * * `instanceIdentifier` - A unique string that identifies this component instance in your application.\n * * `errorContext` - Identifies the error category and sub-category.\n * @analytics\n */\n analyticsMetadata?: FormFieldProps.AnalyticsMetadata;\n}\n\nexport namespace FormFieldProps {\n export interface AnalyticsMetadata {\n instanceIdentifier?: string;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n /**\n * Provides a text alternative for the error icon in the error message.\n */\n errorIconAriaLabel?: string;\n\n /**\n * Provides a text alternative for the warning icon in the warning message.\n */\n warningIconAriaLabel?: string;\n }\n}\n\nexport interface InternalFormFieldProps extends FormFieldProps, InternalBaseComponentProps {\n /**\n * Visually hide the label.\n */\n __hideLabel?: boolean;\n\n /**\n * Disable the gutter applied by default.\n */\n __disableGutters?: boolean;\n __analyticsMetadata?: AnalyticsMetadata;\n __style?: CSSProperties;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { BaseComponentProps } from '../internal/base-component';
3
- import { Breakpoint as _Breakpoint } from '../internal/breakpoints';
2
+ import { BaseComponentProps } from '../types/base-component';
3
+ import { Breakpoint as _Breakpoint } from '../types/breakpoint';
4
4
  export interface GridProps extends BaseComponentProps {
5
5
  /**
6
6
  * An array of element definitions that specifies how the columns must be
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/grid/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAE5D;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,yBAAiB,SAAS,CAAC;IACzB,KAAY,UAAU,GAAG,WAAW,CAAC;IAErC,KAAY,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAErE,UAAiB,iBAAiB;QAChC;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAE/C;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAE9C;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAE5C;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;KAC7C;CACF"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/grid/interfaces.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACnD;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAE5D;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,yBAAiB,SAAS,CAAC;IACzB,KAAY,UAAU,GAAG,WAAW,CAAC;IAErC,KAAY,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAErE,UAAiB,iBAAiB;QAChC;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAE/C;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAE9C;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAE5C;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;KAC7C;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/grid/interfaces.tsx"],"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 '../internal/base-component';\nimport { Breakpoint as _Breakpoint } from '../internal/breakpoints';\n\nexport interface GridProps extends BaseComponentProps {\n /**\n * An array of element definitions that specifies how the columns must be\n * arranged. Each element definition can have the following properties:\n *\n * - `colspan` (number | GridProps.BreakpointMapping) - The number (1-12) of grid elements for this column to span.\n * - `offset` (number | GridProps.BreakpointMapping) - The number (0-11) of grid elements by which to offset the column.\n * - `pull` (number | GridProps.BreakpointMapping) - The number (0-12) of grid elements by which to pull the column to the left.\n * - `push` (number | GridProps.BreakpointMapping) - The number (0-12) of grid elements by which to push the column to the right.\n *\n * The value for the each property can be a number (which applies for all\n * breakpoints) or an object where the key is one of the supported breakpoints\n * (`xxs`, `xs`, `s`, `m`, `l`, `xl`) or `default`. The value of this key is a number of columns,\n * applied for that breakpoint and those above it. You must provide a `default` value for `colspan`.\n *\n * We recommend that you don't use the `pull` and `push` properties of the element definition\n * for accessibility reasons.\n */\n gridDefinition?: ReadonlyArray<GridProps.ElementDefinition>;\n\n /**\n * Determines whether horizontal and vertical gutters are hidden.\n */\n disableGutters?: boolean;\n\n /**\n * The elements to align in the grid.\n *\n * You can provide any elements here. The number of elements\n * should match the number of objects defined in the `gridDefinition`\n * property.\n */\n children?: React.ReactNode;\n}\n\nexport namespace GridProps {\n export type Breakpoint = _Breakpoint;\n\n export type BreakpointMapping = Partial<Record<_Breakpoint, number>>;\n\n export interface ElementDefinition {\n /**\n * The number of grid elements for the column to span.\n */\n colspan?: number | GridProps.BreakpointMapping;\n\n /**\n * The number of grid elements to offset the column by.\n */\n offset?: number | GridProps.BreakpointMapping;\n\n /**\n * The number of grid elements to pull the column to the left by.\n */\n pull?: number | GridProps.BreakpointMapping;\n\n /**\n * The number of grid elements to push the column to the right by.\n */\n push?: number | GridProps.BreakpointMapping;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/grid/interfaces.tsx"],"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';\nimport { Breakpoint as _Breakpoint } from '../types/breakpoint';\n\nexport interface GridProps extends BaseComponentProps {\n /**\n * An array of element definitions that specifies how the columns must be\n * arranged. Each element definition can have the following properties:\n *\n * - `colspan` (number | GridProps.BreakpointMapping) - The number (1-12) of grid elements for this column to span.\n * - `offset` (number | GridProps.BreakpointMapping) - The number (0-11) of grid elements by which to offset the column.\n * - `pull` (number | GridProps.BreakpointMapping) - The number (0-12) of grid elements by which to pull the column to the left.\n * - `push` (number | GridProps.BreakpointMapping) - The number (0-12) of grid elements by which to push the column to the right.\n *\n * The value for the each property can be a number (which applies for all\n * breakpoints) or an object where the key is one of the supported breakpoints\n * (`xxs`, `xs`, `s`, `m`, `l`, `xl`) or `default`. The value of this key is a number of columns,\n * applied for that breakpoint and those above it. You must provide a `default` value for `colspan`.\n *\n * We recommend that you don't use the `pull` and `push` properties of the element definition\n * for accessibility reasons.\n */\n gridDefinition?: ReadonlyArray<GridProps.ElementDefinition>;\n\n /**\n * Determines whether horizontal and vertical gutters are hidden.\n */\n disableGutters?: boolean;\n\n /**\n * The elements to align in the grid.\n *\n * You can provide any elements here. The number of elements\n * should match the number of objects defined in the `gridDefinition`\n * property.\n */\n children?: React.ReactNode;\n}\n\nexport namespace GridProps {\n export type Breakpoint = _Breakpoint;\n\n export type BreakpointMapping = Partial<Record<_Breakpoint, number>>;\n\n export interface ElementDefinition {\n /**\n * The number of grid elements for the column to span.\n */\n colspan?: number | GridProps.BreakpointMapping;\n\n /**\n * The number of grid elements to offset the column by.\n */\n offset?: number | GridProps.BreakpointMapping;\n\n /**\n * The number of grid elements to pull the column to the left by.\n */\n pull?: number | GridProps.BreakpointMapping;\n\n /**\n * The number of grid elements to push the column to the right by.\n */\n push?: number | GridProps.BreakpointMapping;\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ClassValue } from 'clsx';
3
- import { Breakpoint } from '../internal/breakpoints';
4
3
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
4
+ import { Breakpoint } from '../types/breakpoint';
5
5
  import { GridProps } from './interfaces';
6
6
  interface InternalGridProps extends GridProps, InternalBaseComponentProps {
7
7
  __breakpoint?: Breakpoint | null;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/grid/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAa,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKxC,OAAO,EAAE,UAAU,EAA0B,MAAM,yBAAyB,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,UAAU,iBAAkB,SAAQ,SAAS,EAAE,0BAA0B;IACvE,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,KAAK,UAAU,CAAC;IACtE;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,0FA0EjB,CAAC;AAgBF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/grid/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAa,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAOxC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,UAAU,iBAAkB,SAAQ,SAAS,EAAE,0BAA0B;IACvE,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,KAAK,UAAU,CAAC;IACtE;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,0FA0EjB,CAAC;AAgBF,eAAe,YAAY,CAAC"}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IAAI,EAAE,iBAAiB,CAAC,EACvE,mBAAmB,CAAC,MAAM,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,IAAI,EAAE,iBAAiB,CAAC,CACxE;YAED,6BAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,CAAC,IAAG,KAAK,CAAO,CAC3D,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,mBAAmB,CAC1B,IAAY,EACZ,OAAyD,EACzD,UAA6B;IAE7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,GAAG,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,IAAI,IAAI,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,eAAe,YAAY,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, { ClassValue } from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { Breakpoint, matchBreakpointMapping } from '../internal/breakpoints';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { flattenChildren } from '../internal/utils/flatten-children';\nimport { GridProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ninterface InternalGridProps extends GridProps, InternalBaseComponentProps {\n __breakpoint?: Breakpoint | null;\n\n /**\n * The handler that fires when the grid breakpoint changes.\n */\n __responsiveClassName?: (breakpoint: Breakpoint | null) => ClassValue;\n /**\n * Overrides the default wrapper HTML tag.\n */\n __tagOverride?: string;\n}\n\nconst InternalGrid = React.forwardRef(\n (\n {\n __breakpoint,\n gridDefinition = [],\n disableGutters = false,\n children,\n __tagOverride,\n __responsiveClassName,\n __internalRootRef,\n ...restProps\n }: InternalGridProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n let [defaultBreakpoint, defaultRef]: [Breakpoint | null, React.Ref<HTMLDivElement>] =\n useContainerBreakpoints(undefined);\n if (__breakpoint !== undefined) {\n defaultBreakpoint = __breakpoint;\n defaultRef = ref;\n }\n\n const baseProps = getBaseProps(restProps);\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children, 'Grid');\n const Tag = (__tagOverride ?? 'div') as 'div';\n\n if (isDevelopment) {\n const columnCount = gridDefinition.length;\n const childCount = flattenedChildren.length;\n if (columnCount !== childCount) {\n warnOnce(\n 'Grid',\n `The number of children (${childCount}) does not match the number of columns defined (${columnCount}).`\n );\n }\n }\n\n const mergedRef = useMergeRefs(defaultRef, __internalRootRef);\n\n return (\n <Tag\n {...baseProps}\n className={clsx(\n styles.grid,\n baseProps.className,\n { [styles['no-gutters']]: disableGutters },\n __responsiveClassName ? __responsiveClassName(defaultBreakpoint) : null\n )}\n ref={mergedRef}\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(\n styles['grid-column'],\n getColumnClassNames('colspan', gridDefinition[i]?.colspan, defaultBreakpoint),\n getColumnClassNames('offset', gridDefinition[i]?.offset, defaultBreakpoint),\n getColumnClassNames('pull', gridDefinition[i]?.pull, defaultBreakpoint),\n getColumnClassNames('push', gridDefinition[i]?.push, defaultBreakpoint)\n )}\n >\n <div className={styles['restore-pointer-events']}>{child}</div>\n </div>\n );\n })}\n </Tag>\n );\n }\n);\n\nfunction getColumnClassNames(\n prop: string,\n mapping: undefined | number | GridProps.BreakpointMapping,\n breakpoint: Breakpoint | null\n): string | null {\n if (typeof mapping === 'number') {\n return styles[`${prop}-${mapping}`];\n }\n if (breakpoint === null || mapping === undefined) {\n return null;\n }\n return styles[`${prop}-${matchBreakpointMapping(mapping, breakpoint)}`];\n}\n\nexport default InternalGrid;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/grid/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAoB,MAAM,MAAM,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAIrE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAerC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CACnC,CACE,EACE,YAAY,EACZ,cAAc,GAAG,EAAE,EACnB,cAAc,GAAG,KAAK,EACtB,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,GAAG,SAAS,EACM,EACpB,GAA8B,EAC9B,EAAE;IACF,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GACjC,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,iBAAiB,GAAG,YAAY,CAAC;QACjC,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,CAAC,SAAS,C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CAAC,CAAC,CAAC,0CAAE,OAAO,EAAE,iBAAiB,CAAC,EAC7E,mBAAmB,CAAC,QAAQ,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,EAAE,iBAAiB,CAAC,EAC3E,mBAAmB,CAAC,MAAM,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,IAAI,EAAE,iBAAiB,CAAC,EACvE,mBAAmB,CAAC,MAAM,EAAE,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,IAAI,EAAE,iBAAiB,CAAC,CACxE;YAED,6BAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,CAAC,IAAG,KAAK,CAAO,CAC3D,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,mBAAmB,CAC1B,IAAY,EACZ,OAAyD,EACzD,UAA6B;IAE7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,GAAG,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,IAAI,IAAI,sBAAsB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,eAAe,YAAY,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, { ClassValue } from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { matchBreakpointMapping } from '../internal/breakpoints';\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { isDevelopment } from '../internal/is-development';\nimport { flattenChildren } from '../internal/utils/flatten-children';\nimport { Breakpoint } from '../types/breakpoint';\nimport { GridProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ninterface InternalGridProps extends GridProps, InternalBaseComponentProps {\n __breakpoint?: Breakpoint | null;\n\n /**\n * The handler that fires when the grid breakpoint changes.\n */\n __responsiveClassName?: (breakpoint: Breakpoint | null) => ClassValue;\n /**\n * Overrides the default wrapper HTML tag.\n */\n __tagOverride?: string;\n}\n\nconst InternalGrid = React.forwardRef(\n (\n {\n __breakpoint,\n gridDefinition = [],\n disableGutters = false,\n children,\n __tagOverride,\n __responsiveClassName,\n __internalRootRef,\n ...restProps\n }: InternalGridProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n let [defaultBreakpoint, defaultRef]: [Breakpoint | null, React.Ref<HTMLDivElement>] =\n useContainerBreakpoints(undefined);\n if (__breakpoint !== undefined) {\n defaultBreakpoint = __breakpoint;\n defaultRef = ref;\n }\n\n const baseProps = getBaseProps(restProps);\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children, 'Grid');\n const Tag = (__tagOverride ?? 'div') as 'div';\n\n if (isDevelopment) {\n const columnCount = gridDefinition.length;\n const childCount = flattenedChildren.length;\n if (columnCount !== childCount) {\n warnOnce(\n 'Grid',\n `The number of children (${childCount}) does not match the number of columns defined (${columnCount}).`\n );\n }\n }\n\n const mergedRef = useMergeRefs(defaultRef, __internalRootRef);\n\n return (\n <Tag\n {...baseProps}\n className={clsx(\n styles.grid,\n baseProps.className,\n { [styles['no-gutters']]: disableGutters },\n __responsiveClassName ? __responsiveClassName(defaultBreakpoint) : null\n )}\n ref={mergedRef}\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(\n styles['grid-column'],\n getColumnClassNames('colspan', gridDefinition[i]?.colspan, defaultBreakpoint),\n getColumnClassNames('offset', gridDefinition[i]?.offset, defaultBreakpoint),\n getColumnClassNames('pull', gridDefinition[i]?.pull, defaultBreakpoint),\n getColumnClassNames('push', gridDefinition[i]?.push, defaultBreakpoint)\n )}\n >\n <div className={styles['restore-pointer-events']}>{child}</div>\n </div>\n );\n })}\n </Tag>\n );\n }\n);\n\nfunction getColumnClassNames(\n prop: string,\n mapping: undefined | number | GridProps.BreakpointMapping,\n breakpoint: Breakpoint | null\n): string | null {\n if (typeof mapping === 'number') {\n return styles[`${prop}-${mapping}`];\n }\n if (breakpoint === null || mapping === undefined) {\n return null;\n }\n return styles[`${prop}-${matchBreakpointMapping(mapping, breakpoint)}`];\n}\n\nexport default InternalGrid;\n"]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BaseComponentProps } from '../internal/base-component';
2
+ import { BaseComponentProps } from '../types/base-component';
3
3
  export interface HeaderProps extends BaseComponentProps {
4
4
  /**
5
5
  * The heading text. Plain text is recommended. The component renders the
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/header/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;IAC9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC;IAC5C;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,yBAAiB,WAAW,CAAC;IAC3B,KAAY,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,iBAAiB,CAAC;IAC7D,KAAY,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3D"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/header/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;IAC9B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC;IAC5C;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,yBAAiB,WAAW,CAAC;IAC3B,KAAY,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,iBAAiB,CAAC;IAC7D,KAAY,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/header/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 '../internal/base-component';\n\nexport interface HeaderProps extends BaseComponentProps {\n /**\n * The heading text. Plain text is recommended. The component renders the\n * HTML heading tag based on the specified `variant` or `headingTagOverride`.\n * @displayname title\n */\n children?: React.ReactNode;\n /**\n * Specifies the variant of the header:\n * * `h1` - Use this for page level headers.\n * * `h2` - Use this for container level headers.\n * * `h3` - Use this for section level headers.\n * * `awsui-h1-sticky` - Use this for sticky headers in cards and tables.\n * @visualrefresh `awsui-h1-sticky` variant\n */\n variant?: HeaderProps.Variant;\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)\n * provided by the variant. Using this property does not change the visual appearance of the component.\n */\n headingTagOverride?: HeaderProps.HeadingTag;\n /**\n * Supplementary text below the heading.\n */\n description?: React.ReactNode;\n /**\n * Actions for the container.\n */\n actions?: React.ReactNode;\n /**\n * Specifies secondary content that's displayed to the right of the heading title. This is commonly used\n * to display resource counters in table and cards components.\n */\n counter?: React.ReactNode;\n /**\n * Area next to the heading to display an Info link.\n */\n info?: React.ReactNode;\n}\n\nexport namespace HeaderProps {\n export type Variant = 'h1' | 'h2' | 'h3' | 'awsui-h1-sticky';\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/header/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 HeaderProps extends BaseComponentProps {\n /**\n * The heading text. Plain text is recommended. The component renders the\n * HTML heading tag based on the specified `variant` or `headingTagOverride`.\n * @displayname title\n */\n children?: React.ReactNode;\n /**\n * Specifies the variant of the header:\n * * `h1` - Use this for page level headers.\n * * `h2` - Use this for container level headers.\n * * `h3` - Use this for section level headers.\n * * `awsui-h1-sticky` - Use this for sticky headers in cards and tables.\n * @visualrefresh `awsui-h1-sticky` variant\n */\n variant?: HeaderProps.Variant;\n /**\n * Overrides the default [HTML heading tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)\n * provided by the variant. Using this property does not change the visual appearance of the component.\n */\n headingTagOverride?: HeaderProps.HeadingTag;\n /**\n * Supplementary text below the heading.\n */\n description?: React.ReactNode;\n /**\n * Actions for the container.\n */\n actions?: React.ReactNode;\n /**\n * Specifies secondary content that's displayed to the right of the heading title. This is commonly used\n * to display resource counters in table and cards components.\n */\n counter?: React.ReactNode;\n /**\n * Area next to the heading to display an Info link.\n */\n info?: React.ReactNode;\n}\n\nexport namespace HeaderProps {\n export type Variant = 'h1' | 'h2' | 'h3' | 'awsui-h1-sticky';\n export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { BaseComponentProps } from '../internal/base-component';
2
+ import { BaseComponentProps } from '../types/base-component';
3
3
  export interface HelpPanelProps extends BaseComponentProps {
4
4
  /**
5
5
  * Header of the help panel.