@cloudscape-design/components-themeable 3.0.1333 → 3.0.1335

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 (206) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/box/visual-accent.scss +61 -25
  3. package/lib/internal/scss/button/styles.scss +6 -0
  4. package/lib/internal/scss/code-editor/ace-editor.scss +1 -1
  5. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  6. package/lib/internal/scss/side-navigation/styles.scss +10 -3
  7. package/lib/internal/scss/steps/styles.scss +113 -31
  8. package/lib/internal/scss/table/header-cell/styles.scss +42 -14
  9. package/lib/internal/scss/table/styles.scss +6 -0
  10. package/lib/internal/scss/tooltip/styles.scss +22 -0
  11. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js +1 -1
  12. package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/index.js.map +1 -1
  13. package/lib/internal/template/box/interfaces.d.ts +1 -1
  14. package/lib/internal/template/box/interfaces.d.ts.map +1 -1
  15. package/lib/internal/template/box/interfaces.js.map +1 -1
  16. package/lib/internal/template/box/styles.css.js +220 -224
  17. package/lib/internal/template/box/styles.scoped.css +293 -313
  18. package/lib/internal/template/box/styles.selectors.js +220 -224
  19. package/lib/internal/template/button/internal.d.ts +2 -0
  20. package/lib/internal/template/button/internal.d.ts.map +1 -1
  21. package/lib/internal/template/button/internal.js +2 -1
  22. package/lib/internal/template/button/internal.js.map +1 -1
  23. package/lib/internal/template/button/styles.css.js +23 -22
  24. package/lib/internal/template/button/styles.scoped.css +74 -69
  25. package/lib/internal/template/button/styles.selectors.js +23 -22
  26. package/lib/internal/template/button-dropdown/internal-interfaces.d.ts +11 -0
  27. package/lib/internal/template/button-dropdown/internal-interfaces.d.ts.map +1 -1
  28. package/lib/internal/template/button-dropdown/internal-interfaces.js.map +1 -1
  29. package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
  30. package/lib/internal/template/button-dropdown/internal.js +3 -2
  31. package/lib/internal/template/button-dropdown/internal.js.map +1 -1
  32. package/lib/internal/template/button-group/copy-to-clipboard-item.d.ts +16 -0
  33. package/lib/internal/template/button-group/copy-to-clipboard-item.d.ts.map +1 -0
  34. package/lib/internal/template/button-group/copy-to-clipboard-item.js +38 -0
  35. package/lib/internal/template/button-group/copy-to-clipboard-item.js.map +1 -0
  36. package/lib/internal/template/button-group/index.d.ts.map +1 -1
  37. package/lib/internal/template/button-group/index.js +9 -1
  38. package/lib/internal/template/button-group/index.js.map +1 -1
  39. package/lib/internal/template/button-group/interfaces.d.ts +38 -2
  40. package/lib/internal/template/button-group/interfaces.d.ts.map +1 -1
  41. package/lib/internal/template/button-group/interfaces.js.map +1 -1
  42. package/lib/internal/template/button-group/internal-interfaces.d.ts +1 -1
  43. package/lib/internal/template/button-group/internal-interfaces.d.ts.map +1 -1
  44. package/lib/internal/template/button-group/internal-interfaces.js.map +1 -1
  45. package/lib/internal/template/button-group/internal.d.ts.map +1 -1
  46. package/lib/internal/template/button-group/internal.js +2 -2
  47. package/lib/internal/template/button-group/internal.js.map +1 -1
  48. package/lib/internal/template/button-group/item-element.d.ts +2 -0
  49. package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
  50. package/lib/internal/template/button-group/item-element.js +13 -3
  51. package/lib/internal/template/button-group/item-element.js.map +1 -1
  52. package/lib/internal/template/code-editor/styles.css.js +33 -33
  53. package/lib/internal/template/code-editor/styles.scoped.css +187 -187
  54. package/lib/internal/template/code-editor/styles.selectors.js +33 -33
  55. package/lib/internal/template/i18n/messages/all.all.js +1 -1
  56. package/lib/internal/template/i18n/messages/all.all.json +1 -1
  57. package/lib/internal/template/i18n/messages/all.ar.js +1 -1
  58. package/lib/internal/template/i18n/messages/all.ar.json +1 -1
  59. package/lib/internal/template/i18n/messages/all.de.js +1 -1
  60. package/lib/internal/template/i18n/messages/all.de.json +1 -1
  61. package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
  62. package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
  63. package/lib/internal/template/i18n/messages/all.en.js +1 -1
  64. package/lib/internal/template/i18n/messages/all.en.json +1 -1
  65. package/lib/internal/template/i18n/messages/all.es.js +1 -1
  66. package/lib/internal/template/i18n/messages/all.es.json +1 -1
  67. package/lib/internal/template/i18n/messages/all.fr.js +1 -1
  68. package/lib/internal/template/i18n/messages/all.fr.json +1 -1
  69. package/lib/internal/template/i18n/messages/all.id.js +1 -1
  70. package/lib/internal/template/i18n/messages/all.id.json +1 -1
  71. package/lib/internal/template/i18n/messages/all.it.js +1 -1
  72. package/lib/internal/template/i18n/messages/all.it.json +1 -1
  73. package/lib/internal/template/i18n/messages/all.ja.js +1 -1
  74. package/lib/internal/template/i18n/messages/all.ja.json +1 -1
  75. package/lib/internal/template/i18n/messages/all.ko.js +1 -1
  76. package/lib/internal/template/i18n/messages/all.ko.json +1 -1
  77. package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
  78. package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
  79. package/lib/internal/template/i18n/messages/all.tr.js +1 -1
  80. package/lib/internal/template/i18n/messages/all.tr.json +1 -1
  81. package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
  82. package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
  83. package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
  84. package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
  85. package/lib/internal/template/i18n/messages-types.d.ts +19 -0
  86. package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
  87. package/lib/internal/template/i18n/messages-types.js.map +1 -1
  88. package/lib/internal/template/internal/base-component/styles.scoped.css +163 -3
  89. package/lib/internal/template/internal/environment.js +2 -2
  90. package/lib/internal/template/internal/environment.json +2 -2
  91. package/lib/internal/template/internal/generated/styles/tokens.d.ts +35 -38
  92. package/lib/internal/template/internal/generated/styles/tokens.js +35 -38
  93. package/lib/internal/template/internal/generated/theming/index.cjs +585 -774
  94. package/lib/internal/template/internal/generated/theming/index.cjs.d.ts +36 -9
  95. package/lib/internal/template/internal/generated/theming/index.d.ts +36 -9
  96. package/lib/internal/template/internal/generated/theming/index.js +585 -774
  97. package/lib/internal/template/internal/utils/scrollable-containers.d.ts +5 -0
  98. package/lib/internal/template/internal/utils/scrollable-containers.d.ts.map +1 -1
  99. package/lib/internal/template/internal/utils/scrollable-containers.js +16 -0
  100. package/lib/internal/template/internal/utils/scrollable-containers.js.map +1 -1
  101. package/lib/internal/template/side-navigation/implementation.d.ts.map +1 -1
  102. package/lib/internal/template/side-navigation/implementation.js +3 -2
  103. package/lib/internal/template/side-navigation/implementation.js.map +1 -1
  104. package/lib/internal/template/side-navigation/parts.d.ts +2 -1
  105. package/lib/internal/template/side-navigation/parts.d.ts.map +1 -1
  106. package/lib/internal/template/side-navigation/parts.js +14 -13
  107. package/lib/internal/template/side-navigation/parts.js.map +1 -1
  108. package/lib/internal/template/side-navigation/styles.css.js +48 -47
  109. package/lib/internal/template/side-navigation/styles.scoped.css +77 -74
  110. package/lib/internal/template/side-navigation/styles.selectors.js +48 -47
  111. package/lib/internal/template/side-navigation/util.d.ts +1 -0
  112. package/lib/internal/template/side-navigation/util.d.ts.map +1 -1
  113. package/lib/internal/template/side-navigation/util.js +5 -0
  114. package/lib/internal/template/side-navigation/util.js.map +1 -1
  115. package/lib/internal/template/steps/interfaces.d.ts +2 -0
  116. package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
  117. package/lib/internal/template/steps/interfaces.js.map +1 -1
  118. package/lib/internal/template/steps/internal.d.ts.map +1 -1
  119. package/lib/internal/template/steps/internal.js +35 -12
  120. package/lib/internal/template/steps/internal.js.map +1 -1
  121. package/lib/internal/template/steps/styles.css.js +17 -13
  122. package/lib/internal/template/steps/styles.scoped.css +99 -42
  123. package/lib/internal/template/steps/styles.selectors.js +17 -13
  124. package/lib/internal/template/table/clear-sort.d.ts +9 -0
  125. package/lib/internal/template/table/clear-sort.d.ts.map +1 -0
  126. package/lib/internal/template/table/clear-sort.js +15 -0
  127. package/lib/internal/template/table/clear-sort.js.map +1 -0
  128. package/lib/internal/template/table/header-cell/index.d.ts +4 -1
  129. package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
  130. package/lib/internal/template/table/header-cell/index.js +122 -33
  131. package/lib/internal/template/table/header-cell/index.js.map +1 -1
  132. package/lib/internal/template/table/header-cell/sort-menu.d.ts +14 -0
  133. package/lib/internal/template/table/header-cell/sort-menu.d.ts.map +1 -0
  134. package/lib/internal/template/table/header-cell/sort-menu.js +50 -0
  135. package/lib/internal/template/table/header-cell/sort-menu.js.map +1 -0
  136. package/lib/internal/template/table/header-cell/styles.css.js +38 -33
  137. package/lib/internal/template/table/header-cell/styles.scoped.css +101 -76
  138. package/lib/internal/template/table/header-cell/styles.selectors.js +38 -33
  139. package/lib/internal/template/table/header-cell/th-element.d.ts +8 -1
  140. package/lib/internal/template/table/header-cell/th-element.d.ts.map +1 -1
  141. package/lib/internal/template/table/header-cell/th-element.js +6 -2
  142. package/lib/internal/template/table/header-cell/th-element.js.map +1 -1
  143. package/lib/internal/template/table/index.d.ts.map +1 -1
  144. package/lib/internal/template/table/index.js +8 -4
  145. package/lib/internal/template/table/index.js.map +1 -1
  146. package/lib/internal/template/table/interfaces.d.ts +81 -2
  147. package/lib/internal/template/table/interfaces.d.ts.map +1 -1
  148. package/lib/internal/template/table/interfaces.js.map +1 -1
  149. package/lib/internal/template/table/internal.d.ts.map +1 -1
  150. package/lib/internal/template/table/internal.js +40 -9
  151. package/lib/internal/template/table/internal.js.map +1 -1
  152. package/lib/internal/template/table/multi-column-sort/live-announcement.d.ts +16 -0
  153. package/lib/internal/template/table/multi-column-sort/live-announcement.d.ts.map +1 -0
  154. package/lib/internal/template/table/multi-column-sort/live-announcement.js +68 -0
  155. package/lib/internal/template/table/multi-column-sort/live-announcement.js.map +1 -0
  156. package/lib/internal/template/table/multi-column-sort/utils.d.ts +45 -0
  157. package/lib/internal/template/table/multi-column-sort/utils.d.ts.map +1 -0
  158. package/lib/internal/template/table/multi-column-sort/utils.js +76 -0
  159. package/lib/internal/template/table/multi-column-sort/utils.js.map +1 -0
  160. package/lib/internal/template/table/styles.css.js +37 -36
  161. package/lib/internal/template/table/styles.scoped.css +46 -43
  162. package/lib/internal/template/table/styles.selectors.js +37 -36
  163. package/lib/internal/template/table/thead.d.ts +3 -0
  164. package/lib/internal/template/table/thead.d.ts.map +1 -1
  165. package/lib/internal/template/table/thead.js +3 -3
  166. package/lib/internal/template/table/thead.js.map +1 -1
  167. package/lib/internal/template/table/tools-header.d.ts +2 -1
  168. package/lib/internal/template/table/tools-header.d.ts.map +1 -1
  169. package/lib/internal/template/table/tools-header.js +4 -3
  170. package/lib/internal/template/table/tools-header.js.map +1 -1
  171. package/lib/internal/template/table/use-auto-skeleton-rows.d.ts +12 -0
  172. package/lib/internal/template/table/use-auto-skeleton-rows.d.ts.map +1 -0
  173. package/lib/internal/template/table/use-auto-skeleton-rows.js +100 -0
  174. package/lib/internal/template/table/use-auto-skeleton-rows.js.map +1 -0
  175. package/lib/internal/template/test-utils/dom/button-group/index.d.ts +4 -0
  176. package/lib/internal/template/test-utils/dom/button-group/index.js +8 -0
  177. package/lib/internal/template/test-utils/dom/button-group/index.js.map +1 -1
  178. package/lib/internal/template/test-utils/dom/pagination/index.js +2 -2
  179. package/lib/internal/template/test-utils/dom/pagination/index.js.map +1 -1
  180. package/lib/internal/template/test-utils/dom/steps/index.d.ts +4 -0
  181. package/lib/internal/template/test-utils/dom/steps/index.js +6 -0
  182. package/lib/internal/template/test-utils/dom/steps/index.js.map +1 -1
  183. package/lib/internal/template/test-utils/dom/table/index.d.ts +77 -0
  184. package/lib/internal/template/test-utils/dom/table/index.js +87 -2
  185. package/lib/internal/template/test-utils/dom/table/index.js.map +1 -1
  186. package/lib/internal/template/test-utils/selectors/button-group/index.d.ts +4 -0
  187. package/lib/internal/template/test-utils/selectors/button-group/index.js +8 -0
  188. package/lib/internal/template/test-utils/selectors/button-group/index.js.map +1 -1
  189. package/lib/internal/template/test-utils/selectors/pagination/index.js +2 -2
  190. package/lib/internal/template/test-utils/selectors/pagination/index.js.map +1 -1
  191. package/lib/internal/template/test-utils/selectors/steps/index.d.ts +4 -0
  192. package/lib/internal/template/test-utils/selectors/steps/index.js +6 -0
  193. package/lib/internal/template/test-utils/selectors/steps/index.js.map +1 -1
  194. package/lib/internal/template/test-utils/selectors/table/index.d.ts +77 -0
  195. package/lib/internal/template/test-utils/selectors/table/index.js +87 -2
  196. package/lib/internal/template/test-utils/selectors/table/index.js.map +1 -1
  197. package/lib/internal/template/tooltip/internal.d.ts.map +1 -1
  198. package/lib/internal/template/tooltip/internal.js +2 -1
  199. package/lib/internal/template/tooltip/internal.js.map +1 -1
  200. package/lib/internal/template/tooltip/styles.css.js +7 -0
  201. package/lib/internal/template/tooltip/styles.scoped.css +165 -0
  202. package/lib/internal/template/tooltip/styles.selectors.js +8 -0
  203. package/lib/internal/template/top-navigation/use-top-navigation.d.ts.map +1 -1
  204. package/lib/internal/template/top-navigation/use-top-navigation.js +2 -5
  205. package/lib/internal/template/top-navigation/use-top-navigation.js.map +1 -1
  206. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/side-navigation/util.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAMzE,MAAM,UAAU,aAAa,CAAC,KAA8C,EAAE,UAAkB;IAC9F,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IACE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC;YAC7F,IAAI,CAAC,IAAI,KAAK,UAAU,EACxB,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IACE,CAAC,I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MAAM,OAAO,GAAmC,MAAM,CAAC;QACvD,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QAED,MAAM,QAAQ,GAAsC,OAAO,CAAC;QAC5D,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SideNavigationProps } from './interfaces';\n\ntype ExpandableItem = SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup;\n\nexport function hasActiveLink(items: ReadonlyArray<SideNavigationProps.Item>, activeHref: string): boolean {\n for (const item of items) {\n if (\n (item.type === 'link' || item.type === 'link-group' || item.type === 'expandable-link-group') &&\n item.href === activeHref\n ) {\n return true;\n }\n if (\n (item.type === 'section' || item.type === 'link-group' || item.type === 'expandable-link-group') &&\n hasActiveLink(item.items, activeHref)\n ) {\n return true;\n }\n }\n return false;\n}\n\nexport function generateExpandableItemsMapping(\n items: ReadonlyArray<SideNavigationProps.Item>,\n mapping: WeakMap<SideNavigationProps.Item, ReadonlyArray<ExpandableItem>> = new WeakMap(),\n expandableParents: ReadonlyArray<ExpandableItem> = []\n): WeakMap<SideNavigationProps.Item, ReadonlyArray<ExpandableItem>> {\n items.forEach(item => {\n const nextLevelParents = expandableParents.slice();\n if (item.type === 'section' || item.type === 'expandable-link-group') {\n mapping.set(item, expandableParents);\n nextLevelParents.unshift(item);\n }\n if (item.type === 'section' || item.type === 'link-group' || item.type === 'expandable-link-group') {\n generateExpandableItemsMapping(item.items, mapping, nextLevelParents);\n }\n });\n return mapping;\n}\n\nexport function checkDuplicateHrefs(items: ReadonlyArray<SideNavigationProps.Item>) {\n const hrefs = new Set();\n const queue = items.slice();\n while (queue.length > 0) {\n // We just checked that there's items in the queue.\n const item = queue.shift()!;\n\n // Check duplicated hrefs\n const hrefKey: keyof SideNavigationProps.Link = 'href';\n if (hrefKey in item) {\n if (hrefs.has(item.href)) {\n warnOnce('SideNavigation', `duplicate href in \"${item.text}\": ${item.href}`);\n }\n hrefs.add(item.href);\n }\n\n const itemsKey: keyof SideNavigationProps.Section = 'items';\n if (itemsKey in item) {\n queue.push(...item.items);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/side-navigation/util.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAMzE,MAAM,UAAU,aAAa,CAAC,KAA8C,EAAE,UAAkB;IAC9F,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IACE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC;YAC7F,IAAI,CAAC,IAAI,KAAK,UAAU,EACxB,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IACE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAuB,CAAC;YAChG,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,EACrC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OA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zB,MAAM,OAAO,GAAmC,MAAM,CAAC;QACvD,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,QAAQ,CAAC,gBAAgB,EAAE,sBAAsB,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QAED,MAAM,QAAQ,GAAsC,OAAO,CAAC;QAC5D,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SideNavigationProps } from './interfaces';\n\ntype ExpandableItem = SideNavigationProps.Section | SideNavigationProps.ExpandableLinkGroup;\n\nexport function hasActiveLink(items: ReadonlyArray<SideNavigationProps.Item>, activeHref: string): boolean {\n for (const item of items) {\n if (\n (item.type === 'link' || item.type === 'link-group' || item.type === 'expandable-link-group') &&\n item.href === activeHref\n ) {\n return true;\n }\n if (\n (item.type === 'section' || item.type === 'link-group' || item.type === 'expandable-link-group') &&\n hasActiveLink(item.items, activeHref)\n ) {\n return true;\n }\n }\n return false;\n}\n\n// Determines whether any top-level navigation item has an icon.\nexport function hasNavigationIcons(items: ReadonlyArray<SideNavigationProps.Item>): boolean {\n const iconKey: keyof SideNavigationProps.Link = 'icon';\n return items.some(item => iconKey in item && !!item.icon);\n}\n\nexport function generateExpandableItemsMapping(\n items: ReadonlyArray<SideNavigationProps.Item>,\n mapping: WeakMap<SideNavigationProps.Item, ReadonlyArray<ExpandableItem>> = new WeakMap(),\n expandableParents: ReadonlyArray<ExpandableItem> = []\n): WeakMap<SideNavigationProps.Item, ReadonlyArray<ExpandableItem>> {\n items.forEach(item => {\n const nextLevelParents = expandableParents.slice();\n if (item.type === 'section' || item.type === 'expandable-link-group') {\n mapping.set(item, expandableParents);\n nextLevelParents.unshift(item);\n }\n if (item.type === 'section' || item.type === 'link-group' || item.type === 'expandable-link-group') {\n generateExpandableItemsMapping(item.items, mapping, nextLevelParents);\n }\n });\n return mapping;\n}\n\nexport function checkDuplicateHrefs(items: ReadonlyArray<SideNavigationProps.Item>) {\n const hrefs = new Set();\n const queue = items.slice();\n while (queue.length > 0) {\n // We just checked that there's items in the queue.\n const item = queue.shift()!;\n\n // Check duplicated hrefs\n const hrefKey: keyof SideNavigationProps.Link = 'href';\n if (hrefKey in item) {\n if (hrefs.has(item.href)) {\n warnOnce('SideNavigation', `duplicate href in \"${item.text}\": ${item.href}`);\n }\n hrefs.add(item.href);\n }\n\n const itemsKey: keyof SideNavigationProps.Section = 'items';\n if (itemsKey in item) {\n queue.push(...item.items);\n }\n }\n}\n"]}
@@ -9,6 +9,7 @@ export interface StepsProps extends BaseComponentProps {
9
9
  * * `statusIconAriaLabel` - (string) - (Optional) Alternative text for the status icon.
10
10
  * * `header` (ReactNode) - Summary corresponding to the step.
11
11
  * * `details` (ReactNode) - (Optional) Additional information corresponding to the step.
12
+ * * `annotation` (ReactNode) - (Optional) Content rendered at the start of the step, before the icon. Typically a timestamp in a timeline view.
12
13
  */
13
14
  steps: ReadonlyArray<StepsProps.Step>;
14
15
  /**
@@ -57,6 +58,7 @@ export declare namespace StepsProps {
57
58
  statusIconAriaLabel?: string;
58
59
  header: React.ReactNode;
59
60
  details?: React.ReactNode;
61
+ annotation?: React.ReactNode;
60
62
  }
61
63
  type Orientation = 'vertical' | 'horizontal';
62
64
  type ConnectorLinesVariant = 'visible' | 'none';
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/steps/interfaces.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ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StatusIndicatorProps } from '../status-indicator/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface StepsProps extends BaseComponentProps {\n /**\n * An array of individual steps\n *\n * Each step definition has the following properties:\n * * `status` (string) - Status of the step corresponding to a status indicator. The `log` status renders a neutral dot marker.\n * * `statusIconAriaLabel` - (string) - (Optional) Alternative text for the status icon.\n * * `header` (ReactNode) - Summary corresponding to the step.\n * * `details` (ReactNode) - (Optional) Additional information corresponding to the step.\n */\n steps: ReadonlyArray<StepsProps.Step>;\n /**\n * The visual orientation of the steps (vertical or horizontal).\n * By default the orientation is vertical.\n */\n orientation?: StepsProps.Orientation;\n /**\n * Determines whether the connector lines between steps are displayed. The following variants are available:\n * * `visible` - Shows connector lines between consecutive steps.\n * * `none` - Hides the connector lines between steps.\n */\n connectorLines?: StepsProps.ConnectorLinesVariant;\n /**\n * Render a step. This overrides the default icon, header, and details provided by the component.\n * The function is called for each step and should return an object with the following keys:\n * * `header` (React.ReactNode) - Summary corresponding to the step.\n * * `details` (React.ReactNode) - (Optional) Additional information corresponding to the step.\n * * `icon` (React.ReactNode) - (Optional) Replaces the standard step icon from the status indicator.\n */\n renderStep?: (step: StepsProps.Step) => {\n header: React.ReactNode;\n details?: React.ReactNode;\n icon?: React.ReactNode;\n };\n /**\n * Provides an `aria-label` to the progress steps container.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n /**\n * Sets the `aria-labelledby` property on the progress steps container.\n * If there's a visible label element that you can reference, use this instead of `ariaLabel`.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n /**\n * Sets the `aria-describedby` property on the progress steps container.\n */\n ariaDescribedby?: string;\n}\n\nexport namespace StepsProps {\n export type Status = StatusIndicatorProps.Type | 'log';\n\n export interface Step {\n status: Status;\n statusIconAriaLabel?: string;\n header: React.ReactNode;\n details?: React.ReactNode;\n }\n\n export type Orientation = 'vertical' | 'horizontal';\n\n export type ConnectorLinesVariant = 'visible' | 'none';\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StatusIndicatorProps } from '../status-indicator/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\n\nexport interface StepsProps extends BaseComponentProps {\n /**\n * An array of individual steps\n *\n * Each step definition has the following properties:\n * * `status` (string) - Status of the step corresponding to a status indicator. The `log` status renders a neutral dot marker.\n * * `statusIconAriaLabel` - (string) - (Optional) Alternative text for the status icon.\n * * `header` (ReactNode) - Summary corresponding to the step.\n * * `details` (ReactNode) - (Optional) Additional information corresponding to the step.\n * * `annotation` (ReactNode) - (Optional) Content rendered at the start of the step, before the icon. Typically a timestamp in a timeline view.\n */\n steps: ReadonlyArray<StepsProps.Step>;\n /**\n * The visual orientation of the steps (vertical or horizontal).\n * By default the orientation is vertical.\n */\n orientation?: StepsProps.Orientation;\n /**\n * Determines whether the connector lines between steps are displayed. The following variants are available:\n * * `visible` - Shows connector lines between consecutive steps.\n * * `none` - Hides the connector lines between steps.\n */\n connectorLines?: StepsProps.ConnectorLinesVariant;\n /**\n * Render a step. This overrides the default icon, header, and details provided by the component.\n * The function is called for each step and should return an object with the following keys:\n * * `header` (React.ReactNode) - Summary corresponding to the step.\n * * `details` (React.ReactNode) - (Optional) Additional information corresponding to the step.\n * * `icon` (React.ReactNode) - (Optional) Replaces the standard step icon from the status indicator.\n */\n renderStep?: (step: StepsProps.Step) => {\n header: React.ReactNode;\n details?: React.ReactNode;\n icon?: React.ReactNode;\n };\n /**\n * Provides an `aria-label` to the progress steps container.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n /**\n * Sets the `aria-labelledby` property on the progress steps container.\n * If there's a visible label element that you can reference, use this instead of `ariaLabel`.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n /**\n * Sets the `aria-describedby` property on the progress steps container.\n */\n ariaDescribedby?: string;\n}\n\nexport namespace StepsProps {\n export type Status = StatusIndicatorProps.Type | 'log';\n\n export interface Step {\n status: Status;\n statusIconAriaLabel?: string;\n header: React.ReactNode;\n details?: React.ReactNode;\n annotation?: React.ReactNode;\n }\n\n export type Orientation = 'vertical' | 'horizontal';\n\n export type ConnectorLinesVariant = 'visible' | 'none';\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/steps/internal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,GAAG,aAAa,GAAG,gBAAgB,CAAC,GAC5F,0BAA0B,CAAC;AAmG7B,QAAA,MAAM,aAAa,GAAI,6HAUpB,kBAAkB,gBAsCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/steps/internal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,KAAK,kBAAkB,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,GAAG,aAAa,GAAG,gBAAgB,CAAC,GAC5F,0BAA0B,CAAC;AA8H7B,QAAA,MAAM,aAAa,GAAI,6HAUpB,kBAAkB,gBAwCpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -17,46 +17,69 @@ const statusToColor = {
17
17
  'not-started': 'text-status-inactive',
18
18
  log: 'text-status-inactive',
19
19
  };
20
+ const StepAnnotation = ({ children }) => {
21
+ if (children === undefined || children === null) {
22
+ return null;
23
+ }
24
+ return React.createElement("div", { className: styles.annotation }, children);
25
+ };
26
+ const StepDetails = ({ children }) => {
27
+ if (children === undefined || children === null) {
28
+ return null;
29
+ }
30
+ return React.createElement("div", { className: styles.details }, children);
31
+ };
20
32
  const CustomStep = ({ step, orientation, renderStep, hideConnectors, }) => {
21
- const { status, statusIconAriaLabel } = step;
33
+ const { status, statusIconAriaLabel, annotation } = step;
22
34
  const { header, details, icon } = renderStep(step);
23
35
  const iconNode = icon ? icon : React.createElement(InternalStatusIcon, { type: status, iconAriaLabel: statusIconAriaLabel });
24
36
  const connectorClassName = clsx(styles.connector, hideConnectors && styles['connector-hidden']);
25
37
  if (orientation === 'horizontal') {
26
38
  return (React.createElement("li", { className: styles.container },
27
- React.createElement("div", { className: styles.header },
39
+ React.createElement(StepAnnotation, null, annotation),
40
+ React.createElement("div", { className: styles['step-layout'] },
28
41
  iconNode,
29
42
  React.createElement("hr", { className: connectorClassName, role: "none" })),
30
- React.createElement("div", { className: styles['horizontal-header'] }, header),
31
- details && React.createElement("div", { className: styles.details }, details)));
43
+ React.createElement("div", { className: styles.content },
44
+ React.createElement("div", { className: styles.header }, header),
45
+ React.createElement(StepDetails, null, details))));
32
46
  }
33
47
  // Vertical orientation: render the icon and the connector together in a column-1 "rail" so the
34
48
  // connector starts directly beneath the icon and stretches the full height of the step. Unlike
35
49
  // placing the header in the same row as the icon, this keeps the vertical line continuous even
36
- // when the custom header wraps onto multiple lines.
50
+ // when the custom header wraps onto multiple lines. `annotation` (for example, a timeline timestamp)
51
+ // is rendered before the rail.
37
52
  return (React.createElement("li", { className: clsx(styles.container, styles['custom-vertical']) },
53
+ React.createElement(StepAnnotation, null, annotation),
38
54
  React.createElement("div", { className: styles.rail },
39
55
  iconNode,
40
56
  React.createElement("hr", { className: connectorClassName, role: "none" })),
41
57
  React.createElement("div", { className: styles.content },
42
58
  React.createElement("div", { className: styles.header }, header),
43
- details && React.createElement("div", { className: styles.details }, details))));
59
+ React.createElement(StepDetails, null, details))));
44
60
  };
45
- const InternalStep = ({ status, statusIconAriaLabel, header, details, orientation, hideConnectors, }) => {
61
+ const InternalStep = ({ status, statusIconAriaLabel, header, details, annotation, orientation, hideConnectors, }) => {
46
62
  const connectorClassName = clsx(styles.connector, hideConnectors && styles['connector-hidden']);
47
63
  return (React.createElement("li", { className: styles.container },
48
- React.createElement("div", { className: styles.header }, orientation === 'vertical' ? (React.createElement(InternalStatusIndicator, { type: status, iconAriaLabel: statusIconAriaLabel }, header)) : (React.createElement(React.Fragment, null,
64
+ React.createElement(StepAnnotation, null, annotation),
65
+ React.createElement("div", { className: styles['step-layout'] }, orientation === 'vertical' ? (React.createElement(React.Fragment, null,
66
+ React.createElement("div", { className: styles.header },
67
+ React.createElement(InternalStatusIndicator, { type: status, iconAriaLabel: statusIconAriaLabel }, header)),
68
+ React.createElement(StepDetails, null, details),
69
+ React.createElement("hr", { className: clsx(connectorClassName, styles['connector-continuation']), role: "none" }))) : (React.createElement(React.Fragment, null,
49
70
  React.createElement(InternalBox, { color: statusToColor[status] },
50
71
  React.createElement(InternalStatusIcon, { type: status, iconAriaLabel: statusIconAriaLabel })),
51
72
  React.createElement("hr", { className: connectorClassName, role: "none" })))),
52
- orientation === 'vertical' ? (React.createElement("hr", { className: connectorClassName, role: "none" })) : (React.createElement("div", { className: styles['horizontal-header'] },
53
- React.createElement(InternalBox, { color: statusToColor[status] }, header))),
54
- details && React.createElement("div", { className: styles.details }, details)));
73
+ orientation === 'horizontal' && (React.createElement("div", { className: styles.content },
74
+ React.createElement("div", { className: styles.header },
75
+ React.createElement(InternalBox, { color: statusToColor[status] }, header)),
76
+ React.createElement(StepDetails, null, details)))));
55
77
  };
56
78
  const InternalSteps = ({ steps, orientation, connectorLines, renderStep, ariaLabel, ariaLabelledby, ariaDescribedby, __internalRootRef, ...props }) => {
57
79
  const hideConnectors = connectorLines === 'none';
80
+ const hasAnnotations = steps.some(step => step.annotation !== undefined && step.annotation !== null);
58
81
  return (React.createElement("div", { ...props, className: clsx(styles.root, props.className, orientation === 'horizontal' ? styles.horizontal : styles.vertical), ref: __internalRootRef },
59
- React.createElement("ol", { className: styles.list, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby }, steps.map((step, index) => renderStep ? (React.createElement(CustomStep, { key: index, orientation: orientation, step: step, renderStep: renderStep, hideConnectors: hideConnectors })) : (React.createElement(InternalStep, { key: index, status: step.status, statusIconAriaLabel: step.statusIconAriaLabel, header: step.header, details: step.details, orientation: orientation, hideConnectors: hideConnectors }))))));
82
+ React.createElement("ol", { className: clsx(styles.list, orientation === 'vertical' && hasAnnotations && styles['with-annotation']), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby }, steps.map((step, index) => renderStep ? (React.createElement(CustomStep, { key: index, orientation: orientation, step: step, renderStep: renderStep, hideConnectors: hideConnectors })) : (React.createElement(InternalStep, { key: index, status: step.status, statusIconAriaLabel: step.statusIconAriaLabel, header: step.header, details: step.details, annotation: step.annotation, orientation: orientation, hideConnectors: hideConnectors }))))));
60
83
  };
61
84
  export default InternalSteps;
62
85
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/steps/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAG1C,OAAO,uBAAuB,EAAE,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAG3F,OAAO,MAAM,MAAM,iBAAiB,CAAC;A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AmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,GAC9B,CACH,CACF,CACE,CACD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { BoxProps } from '../box/interfaces';\nimport InternalBox from '../box/internal';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport InternalStatusIndicator, { InternalStatusIcon } from '../status-indicator/internal';\nimport { StepsProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalStepsProps = SomeRequired<StepsProps, 'steps' | 'orientation' | 'connectorLines'> &\n InternalBaseComponentProps;\n\nconst statusToColor: Record<StepsProps.Status, BoxProps.Color> = {\n error: 'text-status-error',\n warning: 'text-status-warning',\n success: 'text-status-success',\n info: 'text-status-info',\n stopped: 'text-status-inactive',\n pending: 'text-status-inactive',\n 'in-progress': 'text-status-inactive',\n loading: 'text-status-inactive',\n 'not-started': 'text-status-inactive',\n log: 'text-status-inactive',\n};\n\nconst CustomStep = ({\n step,\n orientation,\n renderStep,\n hideConnectors,\n}: {\n step: StepsProps.Step;\n orientation: StepsProps.Orientation;\n renderStep: Required<StepsProps>['renderStep'];\n hideConnectors: boolean;\n}) => {\n const { status, statusIconAriaLabel } = step;\n const { header, details, icon } = renderStep(step);\n const iconNode = icon ? icon : <InternalStatusIcon type={status} iconAriaLabel={statusIconAriaLabel} />;\n const connectorClassName = clsx(styles.connector, hideConnectors && styles['connector-hidden']);\n\n if (orientation === 'horizontal') {\n return (\n <li className={styles.container}>\n <div className={styles.header}>\n {iconNode}\n <hr className={connectorClassName} role=\"none\" />\n </div>\n <div className={styles['horizontal-header']}>{header}</div>\n {details && <div className={styles.details}>{details}</div>}\n </li>\n );\n }\n\n // Vertical orientation: render the icon and the connector together in a column-1 \"rail\" so the\n // connector starts directly beneath the icon and stretches the full height of the step. Unlike\n // placing the header in the same row as the icon, this keeps the vertical line continuous even\n // when the custom header wraps onto multiple lines.\n return (\n <li className={clsx(styles.container, styles['custom-vertical'])}>\n <div className={styles.rail}>\n {iconNode}\n <hr className={connectorClassName} role=\"none\" />\n </div>\n <div className={styles.content}>\n <div className={styles.header}>{header}</div>\n {details && <div className={styles.details}>{details}</div>}\n </div>\n </li>\n );\n};\n\nconst InternalStep = ({\n status,\n statusIconAriaLabel,\n header,\n details,\n orientation,\n hideConnectors,\n}: StepsProps.Step & { orientation: StepsProps.Orientation; hideConnectors: boolean }) => {\n const connectorClassName = clsx(styles.connector, hideConnectors && styles['connector-hidden']);\n return (\n <li className={styles.container}>\n <div className={styles.header}>\n {orientation === 'vertical' ? (\n <InternalStatusIndicator type={status} iconAriaLabel={statusIconAriaLabel}>\n {header}\n </InternalStatusIndicator>\n ) : (\n <>\n <InternalBox color={statusToColor[status]}>\n <InternalStatusIcon type={status} iconAriaLabel={statusIconAriaLabel} />\n </InternalBox>\n <hr className={connectorClassName} role=\"none\" />\n </>\n )}\n </div>\n {orientation === 'vertical' ? (\n <hr className={connectorClassName} role=\"none\" />\n ) : (\n <div className={styles['horizontal-header']}>\n <InternalBox color={statusToColor[status]}>{header}</InternalBox>\n </div>\n )}\n {details && <div className={styles.details}>{details}</div>}\n </li>\n );\n};\n\nconst InternalSteps = ({\n steps,\n orientation,\n connectorLines,\n renderStep,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n __internalRootRef,\n ...props\n}: InternalStepsProps) => {\n const hideConnectors = connectorLines === 'none';\n return (\n <div\n {...props}\n className={clsx(styles.root, props.className, orientation === 'horizontal' ? styles.horizontal : styles.vertical)}\n ref={__internalRootRef}\n >\n <ol\n className={styles.list}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n >\n {steps.map((step, index) =>\n renderStep ? (\n <CustomStep\n key={index}\n orientation={orientation}\n step={step}\n renderStep={renderStep}\n hideConnectors={hideConnectors}\n />\n ) : (\n <InternalStep\n key={index}\n status={step.status}\n statusIconAriaLabel={step.statusIconAriaLabel}\n header={step.header}\n details={step.details}\n orientation={orientation}\n hideConnectors={hideConnectors}\n />\n )\n )}\n </ol>\n </div>\n );\n};\n\nexport default InternalSteps;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/steps/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAG1C,OAAO,uBAAuB,EAAE,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAG3F,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAKrC,MAAM,aAAa,GAA8C;IAC/D,KAAK,EAAE,mBAAmB;IAC1B,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,sBAAsB;IAC/B,aAAa,EAAE,sBAAsB;IACrC,OAAO,EAAE,sBAAsB;IAC/B,aAAa,EAAE,sBAAsB;IACrC,GAAG,EAAE,sBAAsB;CAC5B,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAA+C,EAAE,EAAE;IACnF,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,UAAU,IAAG,QAAQ,CAAO,CAAC;AAC7D,CAAC,CAAC;AAEF,MAAM,WAAW,G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IAAI,MAAM,CAAC,iBAAiB,CAAC,CAAC,gBAC3F,SAAS,qBACJ,cAAc,sBACb,eAAe,IAEhC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CACzB,UAAU,CAAC,CAAC,CAAC,CACX,oBAAC,UAAU,IACT,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IACX,GAAG,EAAE,KAAK,EACV,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,GAC9B,CACH,CACF,CACE,CACD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { BoxProps } from '../box/interfaces';\nimport InternalBox from '../box/internal';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { SomeRequired } from '../internal/types';\nimport InternalStatusIndicator, { InternalStatusIcon } from '../status-indicator/internal';\nimport { StepsProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalStepsProps = SomeRequired<StepsProps, 'steps' | 'orientation' | 'connectorLines'> &\n InternalBaseComponentProps;\n\nconst statusToColor: Record<StepsProps.Status, BoxProps.Color> = {\n error: 'text-status-error',\n warning: 'text-status-warning',\n success: 'text-status-success',\n info: 'text-status-info',\n stopped: 'text-status-inactive',\n pending: 'text-status-inactive',\n 'in-progress': 'text-status-inactive',\n loading: 'text-status-inactive',\n 'not-started': 'text-status-inactive',\n log: 'text-status-inactive',\n};\n\nconst StepAnnotation = ({ children }: { children: StepsProps.Step['annotation'] }) => {\n if (children === undefined || children === null) {\n return null;\n }\n return <div className={styles.annotation}>{children}</div>;\n};\n\nconst StepDetails = ({ children }: { children: StepsProps.Step['details'] }) => {\n if (children === undefined || children === null) {\n return null;\n }\n return <div className={styles.details}>{children}</div>;\n};\n\nconst CustomStep = ({\n step,\n orientation,\n renderStep,\n hideConnectors,\n}: {\n step: StepsProps.Step;\n orientation: StepsProps.Orientation;\n renderStep: Required<StepsProps>['renderStep'];\n hideConnectors: boolean;\n}) => {\n const { status, statusIconAriaLabel, annotation } = step;\n const { header, details, icon } = renderStep(step);\n const iconNode = icon ? icon : <InternalStatusIcon type={status} iconAriaLabel={statusIconAriaLabel} />;\n const connectorClassName = clsx(styles.connector, hideConnectors && styles['connector-hidden']);\n\n if (orientation === 'horizontal') {\n return (\n <li className={styles.container}>\n <StepAnnotation>{annotation}</StepAnnotation>\n <div className={styles['step-layout']}>\n {iconNode}\n <hr className={connectorClassName} role=\"none\" />\n </div>\n <div className={styles.content}>\n <div className={styles.header}>{header}</div>\n <StepDetails>{details}</StepDetails>\n </div>\n </li>\n );\n }\n\n // Vertical orientation: render the icon and the connector together in a column-1 \"rail\" so the\n // connector starts directly beneath the icon and stretches the full height of the step. Unlike\n // placing the header in the same row as the icon, this keeps the vertical line continuous even\n // when the custom header wraps onto multiple lines. `annotation` (for example, a timeline timestamp)\n // is rendered before the rail.\n return (\n <li className={clsx(styles.container, styles['custom-vertical'])}>\n <StepAnnotation>{annotation}</StepAnnotation>\n <div className={styles.rail}>\n {iconNode}\n <hr className={connectorClassName} role=\"none\" />\n </div>\n <div className={styles.content}>\n <div className={styles.header}>{header}</div>\n <StepDetails>{details}</StepDetails>\n </div>\n </li>\n );\n};\n\nconst InternalStep = ({\n status,\n statusIconAriaLabel,\n header,\n details,\n annotation,\n orientation,\n hideConnectors,\n}: StepsProps.Step & { orientation: StepsProps.Orientation; hideConnectors: boolean }) => {\n const connectorClassName = clsx(styles.connector, hideConnectors && styles['connector-hidden']);\n return (\n <li className={styles.container}>\n <StepAnnotation>{annotation}</StepAnnotation>\n <div className={styles['step-layout']}>\n {orientation === 'vertical' ? (\n <>\n <div className={styles.header}>\n <InternalStatusIndicator type={status} iconAriaLabel={statusIconAriaLabel}>\n {header}\n </InternalStatusIndicator>\n </div>\n <StepDetails>{details}</StepDetails>\n <hr className={clsx(connectorClassName, styles['connector-continuation'])} role=\"none\" />\n </>\n ) : (\n <>\n <InternalBox color={statusToColor[status]}>\n <InternalStatusIcon type={status} iconAriaLabel={statusIconAriaLabel} />\n </InternalBox>\n <hr className={connectorClassName} role=\"none\" />\n </>\n )}\n </div>\n {orientation === 'horizontal' && (\n <div className={styles.content}>\n <div className={styles.header}>\n <InternalBox color={statusToColor[status]}>{header}</InternalBox>\n </div>\n <StepDetails>{details}</StepDetails>\n </div>\n )}\n </li>\n );\n};\n\nconst InternalSteps = ({\n steps,\n orientation,\n connectorLines,\n renderStep,\n ariaLabel,\n ariaLabelledby,\n ariaDescribedby,\n __internalRootRef,\n ...props\n}: InternalStepsProps) => {\n const hideConnectors = connectorLines === 'none';\n const hasAnnotations = steps.some(step => step.annotation !== undefined && step.annotation !== null);\n return (\n <div\n {...props}\n className={clsx(styles.root, props.className, orientation === 'horizontal' ? styles.horizontal : styles.vertical)}\n ref={__internalRootRef}\n >\n <ol\n className={clsx(styles.list, orientation === 'vertical' && hasAnnotations && styles['with-annotation'])}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n >\n {steps.map((step, index) =>\n renderStep ? (\n <CustomStep\n key={index}\n orientation={orientation}\n step={step}\n renderStep={renderStep}\n hideConnectors={hideConnectors}\n />\n ) : (\n <InternalStep\n key={index}\n status={step.status}\n statusIconAriaLabel={step.statusIconAriaLabel}\n header={step.header}\n details={step.details}\n annotation={step.annotation}\n orientation={orientation}\n hideConnectors={hideConnectors}\n />\n )\n )}\n </ol>\n </div>\n );\n};\n\nexport default InternalSteps;\n"]}
@@ -1,18 +1,22 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "connector": "awsui_connector_gxp9y_m67w6_181",
5
- "connector-hidden": "awsui_connector-hidden_gxp9y_m67w6_185",
6
- "root": "awsui_root_gxp9y_m67w6_189",
7
- "list": "awsui_list_gxp9y_m67w6_222",
8
- "container": "awsui_container_gxp9y_m67w6_227",
9
- "header": "awsui_header_gxp9y_m67w6_232",
10
- "details": "awsui_details_gxp9y_m67w6_238",
11
- "custom": "awsui_custom_gxp9y_m67w6_259",
12
- "horizontal": "awsui_horizontal_gxp9y_m67w6_263",
13
- "horizontal-header": "awsui_horizontal-header_gxp9y_m67w6_294",
14
- "custom-vertical": "awsui_custom-vertical_gxp9y_m67w6_308",
15
- "rail": "awsui_rail_gxp9y_m67w6_308",
16
- "content": "awsui_content_gxp9y_m67w6_326"
4
+ "connector": "awsui_connector_gxp9y_166tz_181",
5
+ "connector-hidden": "awsui_connector-hidden_gxp9y_166tz_185",
6
+ "header": "awsui_header_gxp9y_166tz_189",
7
+ "root": "awsui_root_gxp9y_166tz_193",
8
+ "list": "awsui_list_gxp9y_166tz_226",
9
+ "container": "awsui_container_gxp9y_166tz_231",
10
+ "annotation": "awsui_annotation_gxp9y_166tz_236",
11
+ "step-layout": "awsui_step-layout_gxp9y_166tz_241",
12
+ "details": "awsui_details_gxp9y_166tz_247",
13
+ "custom": "awsui_custom_gxp9y_166tz_253",
14
+ "horizontal": "awsui_horizontal_gxp9y_166tz_257",
15
+ "content": "awsui_content_gxp9y_166tz_293",
16
+ "vertical": "awsui_vertical_gxp9y_166tz_307",
17
+ "connector-continuation": "awsui_connector-continuation_gxp9y_166tz_321",
18
+ "custom-vertical": "awsui_custom-vertical_gxp9y_166tz_339",
19
+ "rail": "awsui_rail_gxp9y_166tz_339",
20
+ "with-annotation": "awsui_with-annotation_gxp9y_166tz_362"
17
21
  };
18
22
 
@@ -178,15 +178,19 @@
178
178
  */
179
179
  /* Style used for links in slots/components that are text heavy, to help links stand out among
180
180
  surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
181
- .awsui_connector_gxp9y_m67w6_181:not(#\9) {
181
+ .awsui_connector_gxp9y_166tz_181:not(#\9) {
182
182
  background-color: var(--color-border-divider-default-ipvpev, #eaeded);
183
183
  }
184
184
 
185
- .awsui_connector_gxp9y_m67w6_181.awsui_connector-hidden_gxp9y_m67w6_185:not(#\9) {
185
+ .awsui_connector_gxp9y_166tz_181.awsui_connector-hidden_gxp9y_166tz_185:not(#\9) {
186
186
  background-color: transparent;
187
187
  }
188
188
 
189
- .awsui_root_gxp9y_m67w6_189:not(#\9) {
189
+ .awsui_header_gxp9y_166tz_189:not(#\9) {
190
+ /* used in test-utils */
191
+ }
192
+
193
+ .awsui_root_gxp9y_166tz_193:not(#\9) {
190
194
  border-collapse: separate;
191
195
  border-spacing: 0;
192
196
  box-sizing: border-box;
@@ -219,66 +223,61 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
219
223
  min-inline-size: 0;
220
224
  word-break: break-word;
221
225
  }
222
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222:not(#\9) {
226
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226:not(#\9) {
223
227
  list-style: none;
224
228
  padding-inline-start: 0;
225
229
  margin-block: 0;
226
230
  }
227
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227:not(#\9) {
231
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231:not(#\9) {
228
232
  display: grid;
229
233
  grid-template-columns: var(--space-static-l-ig026c, 20px) 1fr;
230
234
  grid-template-rows: minmax(var(--space-static-l-ig026c, 20px), auto);
231
235
  }
232
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_header_gxp9y_m67w6_232:not(#\9) {
236
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_annotation_gxp9y_166tz_236:not(#\9) {
237
+ justify-self: flex-end;
238
+ min-inline-size: 0;
239
+ color: var(--color-text-status-inactive-n7p1uq, #687078);
240
+ }
241
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241:not(#\9) {
233
242
  display: flex;
234
243
  gap: var(--space-xxs-jnczic, 4px);
235
244
  grid-row: 1;
236
245
  grid-column: 1/span 2;
237
246
  }
238
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_details_gxp9y_m67w6_238:not(#\9) {
247
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_details_gxp9y_166tz_247:not(#\9) {
239
248
  align-items: center;
240
249
  grid-row: 2;
241
250
  grid-column: 2;
242
251
  margin-block-end: var(--space-static-xs-4gq40t, 8px);
243
252
  }
244
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_connector_gxp9y_m67w6_181:not(#\9) {
245
- grid-row: 2;
246
- grid-column: 1;
247
- margin-block: 0;
248
- border-block: 0;
249
- border-inline: 0;
250
- inline-size: var(--border-divider-list-width-2qbfmz, 1px);
251
- block-size: auto;
252
- min-block-size: var(--space-static-xs-4gq40t, 8px);
253
- position: relative;
254
- inset-inline-end: var(--space-static-xxxs-zckw10, 2px);
255
- }
256
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > :not(#\9):last-of-type > .awsui_connector_gxp9y_m67w6_181 {
257
- display: none;
258
- }
259
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222.awsui_custom_gxp9y_m67w6_259 > .awsui_details_gxp9y_m67w6_238:not(#\9) {
253
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_custom_gxp9y_166tz_253 > .awsui_details_gxp9y_166tz_247:not(#\9) {
260
254
  margin-block-end: 0;
261
255
  }
262
256
 
263
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222:not(#\9) {
257
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226:not(#\9) {
264
258
  display: grid;
265
259
  align-items: flex-start;
266
260
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
261
+ grid-template-rows: auto minmax(var(--space-static-l-ig026c, 20px), auto) auto;
267
262
  grid-auto-flow: column;
268
263
  }
269
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227:not(#\9) {
270
- display: grid;
271
- grid-template-columns: var(--space-static-l-ig026c, 20px) 1fr;
272
- grid-template-rows: minmax(var(--space-static-l-ig026c, 20px), auto);
264
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231:not(#\9) {
265
+ grid-row: 1/-1;
266
+ grid-template-rows: subgrid;
273
267
  align-items: center;
274
268
  }
275
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_header_gxp9y_m67w6_232:not(#\9) {
276
- display: flex;
269
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_annotation_gxp9y_166tz_236:not(#\9) {
270
+ justify-self: flex-start;
271
+ align-self: flex-end;
277
272
  grid-row: 1;
278
273
  grid-column: 1/span 2;
274
+ padding-inline-end: var(--space-xs-kw7k3v, 8px);
275
+ }
276
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241:not(#\9) {
277
+ grid-row: 2;
279
278
  align-items: center;
280
279
  }
281
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_header_gxp9y_m67w6_232 > .awsui_connector_gxp9y_m67w6_181:not(#\9) {
280
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241 > .awsui_connector_gxp9y_166tz_181:not(#\9) {
282
281
  display: block;
283
282
  flex: 1;
284
283
  margin-block: 0;
@@ -291,27 +290,59 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
291
290
  min-inline-size: var(--space-static-xs-4gq40t, 8px);
292
291
  margin-inline-end: var(--space-static-xxs-0cgyf1, 4px);
293
292
  }
294
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_horizontal-header_gxp9y_m67w6_294:not(#\9) {
295
- grid-row: 2;
296
- grid-column: 1/span 3;
297
- padding-inline-end: var(--space-xs-kw7k3v, 8px);
298
- }
299
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227 > .awsui_details_gxp9y_m67w6_238:not(#\9) {
293
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_content_gxp9y_166tz_293:not(#\9) {
294
+ align-self: flex-start;
300
295
  grid-row: 3;
301
296
  grid-column: 1/span 3;
297
+ min-inline-size: 0;
302
298
  padding-inline-end: var(--space-xs-kw7k3v, 8px);
303
299
  }
304
- .awsui_horizontal_gxp9y_m67w6_263 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227:not(#\9):last-child > .awsui_header_gxp9y_m67w6_232 > .awsui_connector_gxp9y_m67w6_181 {
300
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_content_gxp9y_166tz_293 > .awsui_details_gxp9y_166tz_247:not(#\9) {
301
+ margin-block-end: var(--space-static-xs-4gq40t, 8px);
302
+ }
303
+ .awsui_horizontal_gxp9y_166tz_257 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231:not(#\9):last-child > .awsui_step-layout_gxp9y_166tz_241 > .awsui_connector_gxp9y_166tz_181 {
304
+ display: none;
305
+ }
306
+
307
+ .awsui_vertical_gxp9y_166tz_307 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241:not(#\9) {
308
+ display: grid;
309
+ grid-template-columns: subgrid;
310
+ grid-template-rows: auto 1fr;
311
+ gap: 0;
312
+ }
313
+ .awsui_vertical_gxp9y_166tz_307 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241 > :not(#\9):first-child {
314
+ grid-column: 1/-1;
315
+ }
316
+ .awsui_vertical_gxp9y_166tz_307 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241 > .awsui_details_gxp9y_166tz_247:not(#\9) {
317
+ grid-row: 2;
318
+ grid-column: 2;
319
+ margin-block-end: var(--space-static-xs-4gq40t, 8px);
320
+ }
321
+ .awsui_vertical_gxp9y_166tz_307 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231 > .awsui_step-layout_gxp9y_166tz_241 > .awsui_connector-continuation_gxp9y_166tz_321:not(#\9) {
322
+ grid-row: 2;
323
+ grid-column: 1;
324
+ justify-self: center;
325
+ margin-block: 0;
326
+ margin-inline: 0;
327
+ border-block: 0;
328
+ border-inline: 0;
329
+ inline-size: var(--border-divider-list-width-2qbfmz, 1px);
330
+ block-size: auto;
331
+ min-block-size: var(--space-static-xs-4gq40t, 8px);
332
+ position: relative;
333
+ inset-inline-end: var(--space-static-xxxs-zckw10, 2px);
334
+ }
335
+ .awsui_vertical_gxp9y_166tz_307 > .awsui_list_gxp9y_166tz_226 > :not(#\9):last-of-type > .awsui_step-layout_gxp9y_166tz_241 > .awsui_connector-continuation_gxp9y_166tz_321 {
305
336
  display: none;
306
337
  }
307
338
 
308
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227.awsui_custom-vertical_gxp9y_m67w6_308 > .awsui_rail_gxp9y_m67w6_308:not(#\9) {
339
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231.awsui_custom-vertical_gxp9y_166tz_339 > .awsui_rail_gxp9y_166tz_339:not(#\9) {
309
340
  grid-column: 1;
310
341
  display: flex;
311
342
  flex-direction: column;
312
343
  align-items: center;
313
344
  }
314
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227.awsui_custom-vertical_gxp9y_m67w6_308 > .awsui_rail_gxp9y_m67w6_308 > .awsui_connector_gxp9y_m67w6_181:not(#\9) {
345
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231.awsui_custom-vertical_gxp9y_166tz_339 > .awsui_rail_gxp9y_166tz_339 > .awsui_connector_gxp9y_166tz_181:not(#\9) {
315
346
  grid-row: auto;
316
347
  grid-column: auto;
317
348
  flex: 1 1 auto;
@@ -323,11 +354,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
323
354
  inset-inline-end: 0;
324
355
  margin-block: var(--space-static-xxs-0cgyf1, 4px) 0;
325
356
  }
326
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227.awsui_custom-vertical_gxp9y_m67w6_308 > .awsui_content_gxp9y_m67w6_326:not(#\9) {
357
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231.awsui_custom-vertical_gxp9y_166tz_339 > .awsui_content_gxp9y_166tz_293:not(#\9) {
327
358
  grid-column: 2;
328
359
  min-inline-size: 0;
329
360
  }
330
361
 
331
- .awsui_root_gxp9y_m67w6_189 > .awsui_list_gxp9y_m67w6_222 > .awsui_container_gxp9y_m67w6_227.awsui_custom-vertical_gxp9y_m67w6_308:not(#\9):last-of-type > .awsui_rail_gxp9y_m67w6_308 > .awsui_connector_gxp9y_m67w6_181 {
362
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362:not(#\9) {
363
+ display: grid;
364
+ grid-template-columns: fit-content(50%) var(--space-static-l-ig026c, 20px) 1fr;
365
+ }
366
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362 > .awsui_container_gxp9y_166tz_231:not(#\9) {
367
+ grid-column: 1/-1;
368
+ grid-template-columns: subgrid;
369
+ }
370
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362 > .awsui_container_gxp9y_166tz_231 > .awsui_annotation_gxp9y_166tz_236:not(#\9) {
371
+ grid-row: 1;
372
+ grid-column: 1;
373
+ padding-inline-end: var(--space-xxs-jnczic, 4px);
374
+ }
375
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362 > .awsui_container_gxp9y_166tz_231:not(#\9):not(.awsui_custom-vertical_gxp9y_166tz_339) > .awsui_step-layout_gxp9y_166tz_241 {
376
+ grid-column: 2/span 2;
377
+ }
378
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362 > .awsui_container_gxp9y_166tz_231:not(#\9):not(.awsui_custom-vertical_gxp9y_166tz_339) > .awsui_details_gxp9y_166tz_247 {
379
+ grid-column: 3;
380
+ }
381
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362 > .awsui_container_gxp9y_166tz_231.awsui_custom-vertical_gxp9y_166tz_339 > .awsui_rail_gxp9y_166tz_339:not(#\9) {
382
+ grid-column: 2;
383
+ }
384
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226.awsui_with-annotation_gxp9y_166tz_362 > .awsui_container_gxp9y_166tz_231.awsui_custom-vertical_gxp9y_166tz_339 > .awsui_content_gxp9y_166tz_293:not(#\9) {
385
+ grid-column: 3;
386
+ }
387
+
388
+ .awsui_root_gxp9y_166tz_193 > .awsui_list_gxp9y_166tz_226 > .awsui_container_gxp9y_166tz_231.awsui_custom-vertical_gxp9y_166tz_339:not(#\9):last-of-type > .awsui_rail_gxp9y_166tz_339 > .awsui_connector_gxp9y_166tz_181 {
332
389
  display: none;
333
390
  }
@@ -2,18 +2,22 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "connector": "awsui_connector_gxp9y_m67w6_181",
6
- "connector-hidden": "awsui_connector-hidden_gxp9y_m67w6_185",
7
- "root": "awsui_root_gxp9y_m67w6_189",
8
- "list": "awsui_list_gxp9y_m67w6_222",
9
- "container": "awsui_container_gxp9y_m67w6_227",
10
- "header": "awsui_header_gxp9y_m67w6_232",
11
- "details": "awsui_details_gxp9y_m67w6_238",
12
- "custom": "awsui_custom_gxp9y_m67w6_259",
13
- "horizontal": "awsui_horizontal_gxp9y_m67w6_263",
14
- "horizontal-header": "awsui_horizontal-header_gxp9y_m67w6_294",
15
- "custom-vertical": "awsui_custom-vertical_gxp9y_m67w6_308",
16
- "rail": "awsui_rail_gxp9y_m67w6_308",
17
- "content": "awsui_content_gxp9y_m67w6_326"
5
+ "connector": "awsui_connector_gxp9y_166tz_181",
6
+ "connector-hidden": "awsui_connector-hidden_gxp9y_166tz_185",
7
+ "header": "awsui_header_gxp9y_166tz_189",
8
+ "root": "awsui_root_gxp9y_166tz_193",
9
+ "list": "awsui_list_gxp9y_166tz_226",
10
+ "container": "awsui_container_gxp9y_166tz_231",
11
+ "annotation": "awsui_annotation_gxp9y_166tz_236",
12
+ "step-layout": "awsui_step-layout_gxp9y_166tz_241",
13
+ "details": "awsui_details_gxp9y_166tz_247",
14
+ "custom": "awsui_custom_gxp9y_166tz_253",
15
+ "horizontal": "awsui_horizontal_gxp9y_166tz_257",
16
+ "content": "awsui_content_gxp9y_166tz_293",
17
+ "vertical": "awsui_vertical_gxp9y_166tz_307",
18
+ "connector-continuation": "awsui_connector-continuation_gxp9y_166tz_321",
19
+ "custom-vertical": "awsui_custom-vertical_gxp9y_166tz_339",
20
+ "rail": "awsui_rail_gxp9y_166tz_339",
21
+ "with-annotation": "awsui_with-annotation_gxp9y_166tz_362"
18
22
  };
19
23
 
@@ -0,0 +1,9 @@
1
+ import { TableProps } from './interfaces';
2
+ interface ClearSortButtonProps<T> {
3
+ multiColumnSort: TableProps.MultiColumnSort<T>;
4
+ i18nStrings?: TableProps.I18nStrings;
5
+ onClearSort?: () => void;
6
+ }
7
+ export declare function ClearSortButton<T>({ multiColumnSort, i18nStrings, onClearSort }: ClearSortButtonProps<T>): JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=clear-sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-sort.d.ts","sourceRoot":"","sources":["../../../src/table/clear-sort.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,oBAAoB,CAAC,CAAC;IAC9B,eAAe,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/C,WAAW,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,oBAAoB,CAAC,CAAC,CAAC,eAcxG"}
@@ -0,0 +1,15 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import React from 'react';
4
+ import InternalButton from '../button/internal';
5
+ import { useInternalI18n } from '../i18n/context';
6
+ import { fireNonCancelableEvent } from '../internal/events';
7
+ export function ClearSortButton({ multiColumnSort, i18nStrings, onClearSort }) {
8
+ var _a;
9
+ const i18n = useInternalI18n('table');
10
+ return (React.createElement(InternalButton, { variant: "inline-link", formAction: "none", onClick: () => {
11
+ fireNonCancelableEvent(multiColumnSort.onChange, { sortingColumns: [] });
12
+ onClearSort === null || onClearSort === void 0 ? void 0 : onClearSort();
13
+ } }, (_a = i18n('i18nStrings.clearSort', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.clearSort)) !== null && _a !== void 0 ? _a : ''));
14
+ }
15
+ //# sourceMappingURL=clear-sort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-sort.js","sourceRoot":"","sources":["../../../src/table/clear-sort.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAS5D,MAAM,UAAU,eAAe,CAAI,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAA2B;;IACvG,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CACL,oBAAC,cAAc,IACb,OAAO,EAAC,aAAa,EACrB,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,GAAG,EAAE;YACZ,sBAAsB,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;YACzE,WAAW,aAAX,WAAW,uBAAX,WAAW,EAAI,CAAC;QAClB,CAAC,IAEA,MAAA,IAAI,CAAC,uBAAuB,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAC,mCAAI,EAAE,CAC7C,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { TableProps } from './interfaces';\n\ninterface ClearSortButtonProps<T> {\n multiColumnSort: TableProps.MultiColumnSort<T>;\n i18nStrings?: TableProps.I18nStrings;\n onClearSort?: () => void;\n}\n\nexport function ClearSortButton<T>({ multiColumnSort, i18nStrings, onClearSort }: ClearSortButtonProps<T>) {\n const i18n = useInternalI18n('table');\n return (\n <InternalButton\n variant=\"inline-link\"\n formAction=\"none\"\n onClick={() => {\n fireNonCancelableEvent(multiColumnSort.onChange, { sortingColumns: [] });\n onClearSort?.();\n }}\n >\n {i18n('i18nStrings.clearSort', i18nStrings?.clearSort) ?? ''}\n </InternalButton>\n );\n}\n"]}
@@ -7,6 +7,9 @@ export interface TableHeaderCellProps<ItemType> extends BaseHeaderCellProps {
7
7
  sortingDisabled?: boolean;
8
8
  stuck?: boolean;
9
9
  onClick(detail: TableProps.SortingState<any>): void;
10
+ multiColumnSort?: TableProps.MultiColumnSort<ItemType>;
11
+ i18nStrings?: TableProps.I18nStrings;
12
+ ariaLabels?: TableProps.AriaLabels<ItemType>;
10
13
  updateColumn: (columnId: PropertyKey, newWidth: number) => void;
11
14
  isEditable?: boolean;
12
15
  columnId: PropertyKey;
@@ -18,5 +21,5 @@ export interface TableHeaderCellProps<ItemType> extends BaseHeaderCellProps {
18
21
  isLastChildOfGroup?: boolean;
19
22
  isLast?: boolean;
20
23
  }
21
- export declare function TableHeaderCell<ItemType>({ tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, focusedComponent, stuck, sticky, hidden, stripedRows, onClick, colIndex, updateColumn, resizableColumns, resizableStyle, onResizeFinish, isEditable, columnId, stickyState, cellRef, tableRole, resizerRoleDescription, resizerTooltipText, isExpandable, hasDynamicContent, variant, colSpan, rowSpan, columnGroupId, isLastChildOfGroup, isLast, tableVariant, }: TableHeaderCellProps<ItemType>): JSX.Element;
24
+ export declare function TableHeaderCell<ItemType>({ tabIndex, column, activeSortingColumn, sortingDescending, sortingDisabled, wrapLines, focusedComponent, stuck, sticky, hidden, stripedRows, onClick, colIndex, updateColumn, resizableColumns, resizableStyle, onResizeFinish, isEditable, columnId, stickyState, cellRef, tableRole, resizerRoleDescription, resizerTooltipText, isExpandable, hasDynamicContent, variant, colSpan, rowSpan, columnGroupId, isLastChildOfGroup, isLast, tableVariant, multiColumnSort, i18nStrings, ariaLabels, }: TableHeaderCellProps<ItemType>): JSX.Element;
22
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/table/header-cell/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAOrD,MAAM,WAAW,oBAAoB,CAAC,QAAQ,CAAE,SAAQ,mBAAmB;IACzE,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC9C,m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