@cloudscape-design/components 3.0.193 → 3.0.195

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 (347) hide show
  1. package/alert/styles.css.js +19 -19
  2. package/alert/styles.scoped.css +33 -33
  3. package/alert/styles.selectors.js +19 -19
  4. package/annotation-context/annotation/styles.css.js +24 -24
  5. package/annotation-context/annotation/styles.scoped.css +32 -32
  6. package/annotation-context/annotation/styles.selectors.js +24 -24
  7. package/app-layout/content-wrapper/styles.css.js +3 -3
  8. package/app-layout/content-wrapper/styles.scoped.css +8 -8
  9. package/app-layout/content-wrapper/styles.selectors.js +3 -3
  10. package/app-layout/mobile-toolbar/styles.css.js +4 -4
  11. package/app-layout/mobile-toolbar/styles.scoped.css +9 -9
  12. package/app-layout/mobile-toolbar/styles.selectors.js +4 -4
  13. package/app-layout/notifications/styles.css.js +1 -1
  14. package/app-layout/notifications/styles.scoped.css +2 -1
  15. package/app-layout/notifications/styles.selectors.js +1 -1
  16. package/app-layout/styles.css.js +26 -26
  17. package/app-layout/styles.scoped.css +35 -35
  18. package/app-layout/styles.selectors.js +26 -26
  19. package/app-layout/toggles/styles.css.js +1 -1
  20. package/app-layout/toggles/styles.scoped.css +3 -3
  21. package/app-layout/toggles/styles.selectors.js +1 -1
  22. package/app-layout/visual-refresh/styles.css.js +60 -60
  23. package/app-layout/visual-refresh/styles.scoped.css +225 -224
  24. package/app-layout/visual-refresh/styles.selectors.js +60 -60
  25. package/area-chart/styles.css.js +13 -13
  26. package/area-chart/styles.scoped.css +18 -18
  27. package/area-chart/styles.selectors.js +13 -13
  28. package/attribute-editor/interfaces.d.ts +1 -0
  29. package/attribute-editor/interfaces.d.ts.map +1 -1
  30. package/attribute-editor/interfaces.js.map +1 -1
  31. package/attribute-editor/internal.d.ts.map +1 -1
  32. package/attribute-editor/internal.js +17 -2
  33. package/attribute-editor/internal.js.map +1 -1
  34. package/attribute-editor/styles.css.js +14 -14
  35. package/attribute-editor/styles.scoped.css +26 -26
  36. package/attribute-editor/styles.selectors.js +14 -14
  37. package/badge/styles.css.js +5 -5
  38. package/badge/styles.scoped.css +7 -7
  39. package/badge/styles.selectors.js +5 -5
  40. package/box/styles.css.js +189 -189
  41. package/box/styles.scoped.css +240 -240
  42. package/box/styles.selectors.js +189 -189
  43. package/breadcrumb-group/item/styles.css.js +9 -9
  44. package/breadcrumb-group/item/styles.scoped.css +19 -19
  45. package/breadcrumb-group/item/styles.selectors.js +9 -9
  46. package/breadcrumb-group/styles.css.js +6 -6
  47. package/breadcrumb-group/styles.scoped.css +13 -13
  48. package/breadcrumb-group/styles.selectors.js +6 -6
  49. package/button/styles.css.js +18 -18
  50. package/button/styles.scoped.css +138 -138
  51. package/button/styles.selectors.js +18 -18
  52. package/button-dropdown/category-elements/styles.css.js +13 -13
  53. package/button-dropdown/category-elements/styles.scoped.css +25 -25
  54. package/button-dropdown/category-elements/styles.selectors.js +13 -13
  55. package/button-dropdown/item-element/styles.css.js +14 -14
  56. package/button-dropdown/item-element/styles.scoped.css +20 -20
  57. package/button-dropdown/item-element/styles.selectors.js +14 -14
  58. package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
  59. package/button-dropdown/mobile-expandable-group/styles.scoped.css +7 -7
  60. package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
  61. package/button-dropdown/styles.css.js +8 -8
  62. package/button-dropdown/styles.scoped.css +16 -16
  63. package/button-dropdown/styles.selectors.js +8 -8
  64. package/calendar/styles.css.js +18 -18
  65. package/calendar/styles.scoped.css +40 -40
  66. package/calendar/styles.selectors.js +18 -18
  67. package/cards/styles.css.js +37 -37
  68. package/cards/styles.scoped.css +122 -57
  69. package/cards/styles.selectors.js +37 -37
  70. package/checkbox/styles.css.js +3 -3
  71. package/checkbox/styles.scoped.css +7 -7
  72. package/checkbox/styles.selectors.js +3 -3
  73. package/code-editor/styles.css.js +32 -32
  74. package/code-editor/styles.scoped.css +111 -111
  75. package/code-editor/styles.selectors.js +32 -32
  76. package/collection-preferences/styles.css.js +20 -20
  77. package/collection-preferences/styles.scoped.css +25 -25
  78. package/collection-preferences/styles.selectors.js +20 -20
  79. package/column-layout/styles.css.js +13 -13
  80. package/column-layout/styles.scoped.css +45 -45
  81. package/column-layout/styles.selectors.js +13 -13
  82. package/container/internal.d.ts.map +1 -1
  83. package/container/internal.js +1 -1
  84. package/container/internal.js.map +1 -1
  85. package/container/styles.css.js +18 -17
  86. package/container/styles.scoped.css +107 -44
  87. package/container/styles.selectors.js +18 -17
  88. package/container/use-sticky-header.d.ts.map +1 -1
  89. package/container/use-sticky-header.js +4 -15
  90. package/container/use-sticky-header.js.map +1 -1
  91. package/content-layout/styles.css.js +7 -7
  92. package/content-layout/styles.scoped.css +13 -13
  93. package/content-layout/styles.selectors.js +7 -7
  94. package/date-picker/styles.css.js +7 -7
  95. package/date-picker/styles.scoped.css +11 -11
  96. package/date-picker/styles.selectors.js +7 -7
  97. package/date-range-picker/calendar/grids/styles.css.js +25 -25
  98. package/date-range-picker/calendar/grids/styles.scoped.css +44 -44
  99. package/date-range-picker/calendar/grids/styles.selectors.js +25 -25
  100. package/date-range-picker/relative-range/styles.css.js +9 -9
  101. package/date-range-picker/relative-range/styles.scoped.css +15 -15
  102. package/date-range-picker/relative-range/styles.selectors.js +9 -9
  103. package/date-range-picker/styles.css.js +38 -38
  104. package/date-range-picker/styles.scoped.css +47 -47
  105. package/date-range-picker/styles.selectors.js +38 -38
  106. package/expandable-section/styles.css.js +21 -21
  107. package/expandable-section/styles.scoped.css +44 -44
  108. package/expandable-section/styles.selectors.js +21 -21
  109. package/flashbar/collapsible-flashbar.d.ts +2 -2
  110. package/flashbar/collapsible-flashbar.d.ts.map +1 -1
  111. package/flashbar/collapsible-flashbar.js +19 -9
  112. package/flashbar/collapsible-flashbar.js.map +1 -1
  113. package/flashbar/common.d.ts +2 -2
  114. package/flashbar/common.d.ts.map +1 -1
  115. package/flashbar/common.js.map +1 -1
  116. package/flashbar/index.d.ts +2 -2
  117. package/flashbar/index.d.ts.map +1 -1
  118. package/flashbar/index.js +1 -4
  119. package/flashbar/index.js.map +1 -1
  120. package/flashbar/interfaces.d.ts +30 -17
  121. package/flashbar/interfaces.d.ts.map +1 -1
  122. package/flashbar/interfaces.js.map +1 -1
  123. package/flashbar/non-collapsible-flashbar.d.ts +2 -2
  124. package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
  125. package/flashbar/non-collapsible-flashbar.js.map +1 -1
  126. package/flashbar/styles.css.js +43 -43
  127. package/flashbar/styles.scoped.css +152 -163
  128. package/flashbar/styles.selectors.js +43 -43
  129. package/flashbar/utils.d.ts +1 -0
  130. package/flashbar/utils.d.ts.map +1 -1
  131. package/flashbar/utils.js +3 -0
  132. package/flashbar/utils.js.map +1 -1
  133. package/form/styles.css.js +8 -8
  134. package/form/styles.scoped.css +10 -10
  135. package/form/styles.selectors.js +8 -8
  136. package/form-field/styles.css.js +19 -19
  137. package/form-field/styles.scoped.css +31 -31
  138. package/form-field/styles.selectors.js +19 -19
  139. package/grid/styles.css.js +53 -53
  140. package/grid/styles.scoped.css +56 -56
  141. package/grid/styles.selectors.js +53 -53
  142. package/header/styles.css.js +44 -44
  143. package/header/styles.scoped.css +49 -49
  144. package/header/styles.selectors.js +44 -44
  145. package/help-panel/styles.css.js +4 -4
  146. package/help-panel/styles.scoped.css +60 -60
  147. package/help-panel/styles.selectors.js +4 -4
  148. package/hotspot/styles.css.js +7 -7
  149. package/hotspot/styles.scoped.css +9 -9
  150. package/hotspot/styles.selectors.js +7 -7
  151. package/icon/styles.css.js +21 -21
  152. package/icon/styles.scoped.css +50 -50
  153. package/icon/styles.selectors.js +21 -21
  154. package/input/styles.css.js +12 -12
  155. package/input/styles.scoped.css +32 -32
  156. package/input/styles.selectors.js +12 -12
  157. package/internal/base-component/styles.scoped.css +6 -6
  158. package/internal/components/abstract-switch/styles.css.js +12 -12
  159. package/internal/components/abstract-switch/styles.scoped.css +21 -21
  160. package/internal/components/abstract-switch/styles.selectors.js +12 -12
  161. package/internal/components/button-trigger/styles.css.js +9 -9
  162. package/internal/components/button-trigger/styles.scoped.css +25 -25
  163. package/internal/components/button-trigger/styles.selectors.js +9 -9
  164. package/internal/components/chart-filter/styles.css.js +3 -3
  165. package/internal/components/chart-filter/styles.scoped.css +5 -5
  166. package/internal/components/chart-filter/styles.selectors.js +3 -3
  167. package/internal/components/chart-legend/styles.css.js +6 -6
  168. package/internal/components/chart-legend/styles.scoped.css +17 -17
  169. package/internal/components/chart-legend/styles.selectors.js +6 -6
  170. package/internal/components/chart-plot/styles.css.js +5 -5
  171. package/internal/components/chart-plot/styles.scoped.css +7 -7
  172. package/internal/components/chart-plot/styles.selectors.js +5 -5
  173. package/internal/components/chart-popover/styles.css.js +3 -3
  174. package/internal/components/chart-popover/styles.scoped.css +5 -5
  175. package/internal/components/chart-popover/styles.selectors.js +3 -3
  176. package/internal/components/chart-series-details/styles.css.js +5 -5
  177. package/internal/components/chart-series-details/styles.scoped.css +10 -10
  178. package/internal/components/chart-series-details/styles.selectors.js +5 -5
  179. package/internal/components/chart-series-marker/styles.css.js +5 -5
  180. package/internal/components/chart-series-marker/styles.scoped.css +9 -9
  181. package/internal/components/chart-series-marker/styles.selectors.js +5 -5
  182. package/internal/components/checkbox-icon/styles.css.js +7 -7
  183. package/internal/components/checkbox-icon/styles.scoped.css +10 -10
  184. package/internal/components/checkbox-icon/styles.selectors.js +7 -7
  185. package/internal/components/dropdown/styles.css.js +20 -20
  186. package/internal/components/dropdown/styles.scoped.css +37 -37
  187. package/internal/components/dropdown/styles.selectors.js +20 -20
  188. package/internal/components/dropdown-footer/styles.css.js +3 -3
  189. package/internal/components/dropdown-footer/styles.scoped.css +5 -5
  190. package/internal/components/dropdown-footer/styles.selectors.js +3 -3
  191. package/internal/components/dropdown-status/styles.css.js +2 -2
  192. package/internal/components/dropdown-status/styles.scoped.css +4 -4
  193. package/internal/components/dropdown-status/styles.selectors.js +2 -2
  194. package/internal/components/filtering-token/styles.css.js +7 -7
  195. package/internal/components/filtering-token/styles.scoped.css +15 -15
  196. package/internal/components/filtering-token/styles.selectors.js +7 -7
  197. package/internal/components/menu-dropdown/styles.css.js +7 -7
  198. package/internal/components/menu-dropdown/styles.scoped.css +15 -15
  199. package/internal/components/menu-dropdown/styles.selectors.js +7 -7
  200. package/internal/components/option/styles.css.js +17 -17
  201. package/internal/components/option/styles.scoped.css +31 -31
  202. package/internal/components/option/styles.selectors.js +17 -17
  203. package/internal/components/options-list/styles.css.js +2 -2
  204. package/internal/components/options-list/styles.scoped.css +4 -4
  205. package/internal/components/options-list/styles.selectors.js +2 -2
  206. package/internal/components/screenreader-only/styles.css.js +1 -1
  207. package/internal/components/screenreader-only/styles.scoped.css +3 -3
  208. package/internal/components/screenreader-only/styles.selectors.js +1 -1
  209. package/internal/components/selectable-item/styles.css.js +16 -16
  210. package/internal/components/selectable-item/styles.scoped.css +29 -29
  211. package/internal/components/selectable-item/styles.selectors.js +16 -16
  212. package/internal/environment.js +1 -1
  213. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  214. package/internal/generated/custom-css-properties/index.js +28 -27
  215. package/internal/generated/custom-css-properties/index.js.map +1 -1
  216. package/internal/generated/theming/index.cjs +6 -6
  217. package/internal/generated/theming/index.js +6 -6
  218. package/internal/manifest.json +1 -1
  219. package/link/styles.css.js +20 -20
  220. package/link/styles.scoped.css +73 -73
  221. package/link/styles.selectors.js +20 -20
  222. package/mixed-line-bar-chart/styles.css.js +19 -19
  223. package/mixed-line-bar-chart/styles.scoped.css +28 -28
  224. package/mixed-line-bar-chart/styles.selectors.js +19 -19
  225. package/modal/styles.css.js +22 -22
  226. package/modal/styles.scoped.css +40 -47
  227. package/modal/styles.selectors.js +22 -22
  228. package/multiselect/styles.css.js +1 -1
  229. package/multiselect/styles.scoped.css +3 -3
  230. package/multiselect/styles.selectors.js +1 -1
  231. package/package.json +1 -1
  232. package/pagination/styles.css.js +9 -9
  233. package/pagination/styles.scoped.css +25 -25
  234. package/pagination/styles.selectors.js +9 -9
  235. package/pie-chart/styles.css.js +27 -27
  236. package/pie-chart/styles.scoped.css +45 -45
  237. package/pie-chart/styles.selectors.js +27 -27
  238. package/popover/styles.css.js +50 -50
  239. package/popover/styles.scoped.css +73 -73
  240. package/popover/styles.selectors.js +50 -50
  241. package/progress-bar/styles.css.js +18 -18
  242. package/progress-bar/styles.scoped.css +36 -36
  243. package/progress-bar/styles.selectors.js +18 -18
  244. package/property-filter/styles.css.js +33 -33
  245. package/property-filter/styles.scoped.css +37 -37
  246. package/property-filter/styles.selectors.js +33 -33
  247. package/radio-group/styles.css.js +9 -9
  248. package/radio-group/styles.scoped.css +17 -17
  249. package/radio-group/styles.selectors.js +9 -9
  250. package/segmented-control/styles.css.js +14 -14
  251. package/segmented-control/styles.scoped.css +35 -35
  252. package/segmented-control/styles.selectors.js +14 -14
  253. package/select/parts/styles.css.js +9 -9
  254. package/select/parts/styles.scoped.css +14 -14
  255. package/select/parts/styles.selectors.js +9 -9
  256. package/select/styles.css.js +1 -1
  257. package/select/styles.scoped.css +3 -3
  258. package/select/styles.selectors.js +1 -1
  259. package/side-navigation/styles.css.js +26 -26
  260. package/side-navigation/styles.scoped.css +38 -38
  261. package/side-navigation/styles.selectors.js +26 -26
  262. package/space-between/styles.css.js +28 -28
  263. package/space-between/styles.scoped.css +31 -31
  264. package/space-between/styles.selectors.js +28 -28
  265. package/spinner/styles.css.js +13 -13
  266. package/spinner/styles.scoped.css +20 -20
  267. package/spinner/styles.selectors.js +13 -13
  268. package/split-panel/styles.css.js +59 -59
  269. package/split-panel/styles.scoped.css +85 -85
  270. package/split-panel/styles.selectors.js +59 -59
  271. package/status-indicator/styles.css.js +20 -20
  272. package/status-indicator/styles.scoped.css +28 -28
  273. package/status-indicator/styles.selectors.js +20 -20
  274. package/table/body-cell/styles.css.js +18 -18
  275. package/table/body-cell/styles.scoped.css +52 -52
  276. package/table/body-cell/styles.selectors.js +18 -18
  277. package/table/header-cell/styles.css.js +19 -19
  278. package/table/header-cell/styles.scoped.css +33 -33
  279. package/table/header-cell/styles.selectors.js +19 -19
  280. package/table/resizer/styles.css.js +6 -6
  281. package/table/resizer/styles.scoped.css +13 -13
  282. package/table/resizer/styles.selectors.js +6 -6
  283. package/table/selection-control/styles.css.js +3 -3
  284. package/table/selection-control/styles.scoped.css +5 -5
  285. package/table/selection-control/styles.selectors.js +3 -3
  286. package/table/styles.css.js +33 -33
  287. package/table/styles.scoped.css +41 -41
  288. package/table/styles.selectors.js +33 -33
  289. package/tabs/styles.css.js +21 -21
  290. package/tabs/styles.scoped.css +42 -42
  291. package/tabs/styles.selectors.js +21 -21
  292. package/tag-editor/interfaces.d.ts +1 -0
  293. package/tag-editor/interfaces.d.ts.map +1 -1
  294. package/tag-editor/interfaces.js.map +1 -1
  295. package/tag-editor/styles.css.js +3 -3
  296. package/tag-editor/styles.scoped.css +12 -12
  297. package/tag-editor/styles.selectors.js +3 -3
  298. package/test-utils/dom/flashbar/index.d.ts +2 -0
  299. package/test-utils/dom/flashbar/index.js +2 -0
  300. package/test-utils/dom/flashbar/index.js.map +1 -1
  301. package/test-utils/selectors/flashbar/index.d.ts +2 -0
  302. package/test-utils/selectors/flashbar/index.js +2 -0
  303. package/test-utils/selectors/flashbar/index.js.map +1 -1
  304. package/test-utils/tsconfig.tsbuildinfo +1 -1
  305. package/text-content/styles.css.js +1 -1
  306. package/text-content/styles.scoped.css +62 -62
  307. package/text-content/styles.selectors.js +1 -1
  308. package/text-filter/styles.css.js +4 -4
  309. package/text-filter/styles.scoped.css +6 -6
  310. package/text-filter/styles.selectors.js +4 -4
  311. package/textarea/styles.css.js +4 -4
  312. package/textarea/styles.scoped.css +14 -14
  313. package/textarea/styles.selectors.js +4 -4
  314. package/tiles/styles.css.js +28 -28
  315. package/tiles/styles.scoped.css +70 -70
  316. package/tiles/styles.selectors.js +28 -28
  317. package/toggle/styles.css.js +8 -8
  318. package/toggle/styles.scoped.css +15 -15
  319. package/toggle/styles.selectors.js +8 -8
  320. package/token-group/styles.css.js +7 -7
  321. package/token-group/styles.scoped.css +24 -24
  322. package/token-group/styles.selectors.js +7 -7
  323. package/top-navigation/1.0-beta/styles.css.js +25 -25
  324. package/top-navigation/1.0-beta/styles.scoped.css +44 -44
  325. package/top-navigation/1.0-beta/styles.selectors.js +25 -25
  326. package/top-navigation/styles.css.js +47 -47
  327. package/top-navigation/styles.scoped.css +68 -68
  328. package/top-navigation/styles.selectors.js +47 -47
  329. package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
  330. package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +23 -23
  331. package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
  332. package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
  333. package/tutorial-panel/components/tutorial-list/styles.scoped.css +29 -29
  334. package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
  335. package/tutorial-panel/styles.css.js +1 -1
  336. package/tutorial-panel/styles.scoped.css +3 -3
  337. package/tutorial-panel/styles.selectors.js +1 -1
  338. package/wizard/index.d.ts.map +1 -1
  339. package/wizard/index.js +5 -4
  340. package/wizard/index.js.map +1 -1
  341. package/wizard/internal/analytics.d.ts +3 -3
  342. package/wizard/internal/analytics.d.ts.map +1 -1
  343. package/wizard/internal/analytics.js +6 -11
  344. package/wizard/internal/analytics.js.map +1 -1
  345. package/wizard/styles.css.js +32 -32
  346. package/wizard/styles.scoped.css +98 -64
  347. package/wizard/styles.selectors.js +32 -32
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAA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,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,yBAAkB,OAAO,CAAE,CAAC;oBAChE,GAAC,MAAM,CAAC,wBAAwB,CAAC,IAAG,cAAc,IAAI,CAAC,QAAQ;oBAC/D,GAAC,MAAM,CAAC,uBAAuB,CAAC,IAAG,QAAQ;oBAC3C,GAAC,MAAM,CAAC,uBAAuB,CAAC,IAAG,gBAAgB;oBACnD,GAAC,MAAM,CAAC,cAAc,CAAC,IAAG,OAAO;oBACjC,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,qBAAqB;oBACjD,GAAC,MAAM,CAAC,qBAAqB,CAAC,IAAG,CAAC,QAAQ,IAAI,eAAe;wBAC7D,IACE,YAAY,EACZ,YAAY,IAChB,GAAG,EAAE,eAAe,KAEnB,YAAY,CAAC,CAAC,CAAC,CACd,6BAAK,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,8BAA8B,CAAC,IAAG,MAAM,CAAO,CAC5F,CAAC,CAAC,CAAC,CACF,MAAM,CACP,CACG,CACuB,CAChC;QACD,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;gBAC5B,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,sBAAsB;oBAClD,IAED,QAAQ,CACL;QACL,MAAM,IAAI,CACT,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC3B,GAAC,MAAM,CAAC,cAAc,CAAC,IAAG,CAAC,sBAAsB;gBACjD,GAAC,MAAM,CAAC,eAAe,CAAC,IAAG,CAAC,uBAAuB;oBACnD,IAED,MAAM,CACH,CACP,CACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useRef } from 'react';\nimport { ContainerProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport styles from './styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __headerId?: string;\n __darkHeader?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n __stickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __headerId,\n __darkHeader = false,\n ...restProps\n}: InternalContainerProps) {\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, stickyStyles } = useStickyHeader(rootRef, headerRef, __stickyHeader, __stickyOffset);\n const { setHasStickyBackground } = useAppLayoutContext();\n const isRefresh = useVisualRefresh();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight || !__darkHeader });\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, overlapElement, __headerRef);\n const headerIdProp = __headerId ? { id: __headerId } : {};\n\n /**\n * The visual refresh AppLayout component needs to know if a child component\n * has a high contrast sticky header. This is to make sure the background element\n * stays in the same vertical position as the header content.\n */\n useEffect(() => {\n const shouldUpdateStickyBackground = isSticky && variant === 'full-page' && setHasStickyBackground;\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(true);\n }\n\n return () => {\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(false);\n }\n };\n }, [isSticky, setHasStickyBackground, variant]);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['root-fit-height']\n )}\n ref={mergedRef}\n >\n {header && (\n <StickyHeaderContext.Provider value={{ isStuck }}>\n <div\n className={clsx(styles.header, styles[`header-variant-${variant}`], {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n })}\n {...headerIdProp}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {__darkHeader ? (\n <div className={clsx(styles['dark-header'], 'awsui-context-content-header')}>{header}</div>\n ) : (\n header\n )}\n </div>\n </StickyHeaderContext.Provider>\n )}\n <div\n className={clsx(styles.content, {\n [styles['with-paddings']]: !disableContentPaddings,\n })}\n >\n {children}\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/container/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,O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["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React, { useEffect, useRef } from 'react';\nimport { ContainerProps } from './interfaces';\nimport { getBaseProps } from '../internal/base-component';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { StickyHeaderContext, useStickyHeader } from './use-sticky-header';\nimport { useDynamicOverlap } from '../internal/hooks/use-dynamic-overlap';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport styles from './styles.css.js';\n\nexport interface InternalContainerProps extends Omit<ContainerProps, 'variant'>, InternalBaseComponentProps {\n __stickyHeader?: boolean;\n __stickyOffset?: number;\n __disableFooterDivider?: boolean;\n __disableFooterPaddings?: boolean;\n __hiddenContent?: boolean;\n __headerRef?: React.RefObject<HTMLDivElement>;\n __headerId?: string;\n __darkHeader?: boolean;\n /**\n * Additional internal variant:\n * * `embedded` - Use this variant within a parent container (such as a modal,\n * expandable section, container or split panel).\n * * `full-page` – Only for internal use in table, cards and other components\n */\n variant?: ContainerProps['variant'] | 'embedded' | 'full-page' | 'cards';\n}\n\nexport default function InternalContainer({\n header,\n footer,\n children,\n variant = 'default',\n disableHeaderPaddings = false,\n disableContentPaddings = false,\n fitHeight,\n __stickyOffset,\n __stickyHeader = false,\n __internalRootRef = null,\n __disableFooterDivider = false,\n __disableFooterPaddings = false,\n __hiddenContent = false,\n __headerRef,\n __headerId,\n __darkHeader = false,\n ...restProps\n}: InternalContainerProps) {\n const baseProps = getBaseProps(restProps);\n const rootRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const { isSticky, isStuck, stickyStyles } = useStickyHeader(rootRef, headerRef, __stickyHeader, __stickyOffset);\n const { setHasStickyBackground } = useAppLayoutContext();\n const isRefresh = useVisualRefresh();\n\n const hasDynamicHeight = isRefresh && variant === 'full-page';\n const overlapElement = useDynamicOverlap({ disabled: !hasDynamicHeight || !__darkHeader });\n\n const mergedRef = useMergeRefs(rootRef, __internalRootRef);\n const headerMergedRef = useMergeRefs(headerRef, overlapElement, __headerRef);\n const headerIdProp = __headerId ? { id: __headerId } : {};\n\n /**\n * The visual refresh AppLayout component needs to know if a child component\n * has a high contrast sticky header. This is to make sure the background element\n * stays in the same vertical position as the header content.\n */\n useEffect(() => {\n const shouldUpdateStickyBackground = isSticky && variant === 'full-page' && setHasStickyBackground;\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(true);\n }\n\n return () => {\n if (shouldUpdateStickyBackground) {\n setHasStickyBackground(false);\n }\n };\n }, [isSticky, setHasStickyBackground, variant]);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[`variant-${variant}`],\n fitHeight && styles['fit-height'],\n isSticky && [styles['sticky-enabled']]\n )}\n ref={mergedRef}\n >\n {header && (\n <StickyHeaderContext.Provider value={{ isStuck }}>\n <div\n className={clsx(styles.header, styles[`header-variant-${variant}`], {\n [styles['header-sticky-disabled']]: __stickyHeader && !isSticky,\n [styles['header-sticky-enabled']]: isSticky,\n [styles['header-dynamic-height']]: hasDynamicHeight,\n [styles['header-stuck']]: isStuck,\n [styles['with-paddings']]: !disableHeaderPaddings,\n [styles['with-hidden-content']]: !children || __hiddenContent,\n })}\n {...headerIdProp}\n {...stickyStyles}\n ref={headerMergedRef}\n >\n {__darkHeader ? (\n <div className={clsx(styles['dark-header'], 'awsui-context-content-header')}>{header}</div>\n ) : (\n header\n )}\n </div>\n </StickyHeaderContext.Provider>\n )}\n <div\n className={clsx(styles.content, {\n [styles['with-paddings']]: !disableContentPaddings,\n })}\n >\n {children}\n </div>\n {footer && (\n <div\n className={clsx(styles.footer, {\n [styles['with-divider']]: !__disableFooterDivider,\n [styles['with-paddings']]: !__disableFooterPaddings,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -1,22 +1,23 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_14iqq_4079j_97",
5
- "root-fit-height": "awsui_root-fit-height_14iqq_4079j_110",
6
- "variant-default": "awsui_variant-default_14iqq_4079j_116",
7
- "variant-stacked": "awsui_variant-stacked_14iqq_4079j_116",
8
- "header": "awsui_header_14iqq_4079j_139",
9
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_4079j_144",
10
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_4079j_148",
11
- "header-stuck": "awsui_header-stuck_14iqq_4079j_154",
12
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_4079j_159",
13
- "with-paddings": "awsui_with-paddings_14iqq_4079j_165",
14
- "with-hidden-content": "awsui_with-hidden-content_14iqq_4079j_168",
15
- "header-variant-cards": "awsui_header-variant-cards_14iqq_4079j_172",
16
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_4079j_196",
17
- "dark-header": "awsui_dark-header_14iqq_4079j_214",
18
- "content": "awsui_content_14iqq_4079j_218",
19
- "footer": "awsui_footer_14iqq_4079j_229",
20
- "with-divider": "awsui_with-divider_14iqq_4079j_232"
4
+ "root": "awsui_root_14iqq_xhasy_97",
5
+ "fit-height": "awsui_fit-height_14iqq_xhasy_111",
6
+ "variant-default": "awsui_variant-default_14iqq_xhasy_116",
7
+ "variant-stacked": "awsui_variant-stacked_14iqq_xhasy_116",
8
+ "sticky-enabled": "awsui_sticky-enabled_14iqq_xhasy_169",
9
+ "header": "awsui_header_14iqq_xhasy_176",
10
+ "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_xhasy_181",
11
+ "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_xhasy_185",
12
+ "header-stuck": "awsui_header-stuck_14iqq_xhasy_191",
13
+ "header-variant-cards": "awsui_header-variant-cards_14iqq_xhasy_197",
14
+ "header-dynamic-height": "awsui_header-dynamic-height_14iqq_xhasy_200",
15
+ "with-paddings": "awsui_with-paddings_14iqq_xhasy_206",
16
+ "with-hidden-content": "awsui_with-hidden-content_14iqq_xhasy_209",
17
+ "header-variant-full-page": "awsui_header-variant-full-page_14iqq_xhasy_259",
18
+ "dark-header": "awsui_dark-header_14iqq_xhasy_277",
19
+ "content": "awsui_content_14iqq_xhasy_281",
20
+ "footer": "awsui_footer_14iqq_xhasy_292",
21
+ "with-divider": "awsui_with-divider_14iqq_xhasy_295"
21
22
  };
22
23
 
@@ -50,8 +50,6 @@
50
50
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
51
  SPDX-License-Identifier: Apache-2.0
52
52
  */
53
- /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
54
- /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
55
53
  /*
56
54
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
57
55
  SPDX-License-Identifier: Apache-2.0
@@ -64,6 +62,8 @@
64
62
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
65
63
  SPDX-License-Identifier: Apache-2.0
66
64
  */
65
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
66
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
67
67
  /*
68
68
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
69
69
  SPDX-License-Identifier: Apache-2.0
@@ -94,7 +94,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
94
94
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
95
  SPDX-License-Identifier: Apache-2.0
96
96
  */
97
- .awsui_root_14iqq_4079j_97:not(#\9) {
97
+ .awsui_root_14iqq_xhasy_97:not(#\9) {
98
98
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
99
99
  border-collapse: separate;
100
100
  border-spacing: 0;
@@ -132,97 +132,160 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
132
132
  -webkit-font-smoothing: auto;
133
133
  -moz-osx-font-smoothing: auto;
134
134
  word-wrap: break-word;
135
+ position: relative;
135
136
  }
136
- .awsui_root-fit-height_14iqq_4079j_110:not(#\9) {
137
+ .awsui_root_14iqq_xhasy_97.awsui_fit-height_14iqq_xhasy_111:not(#\9) {
137
138
  display: flex;
138
139
  flex-direction: column;
139
- overflow: hidden;
140
140
  height: 100%;
141
141
  }
142
- .awsui_root_14iqq_4079j_97.awsui_variant-default_14iqq_4079j_116:not(#\9), .awsui_root_14iqq_4079j_97.awsui_variant-stacked_14iqq_4079j_116:not(#\9) {
143
- box-shadow: var(--shadow-container-7nblnj, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
144
- border-top: var(--border-container-top-width-jk6fhm, 0px) solid var(--color-border-container-top-srcvx4, transparent);
142
+ .awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9) {
145
143
  border-radius: var(--border-radius-container-gh9ysk, 16px);
146
144
  box-sizing: border-box;
147
145
  background-color: var(--color-background-container-content-i8i4a0, #ffffff);
148
146
  }
147
+ .awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9)::before, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before {
148
+ content: "";
149
+ position: absolute;
150
+ left: 0px;
151
+ top: 0px;
152
+ width: 100%;
153
+ height: 100%;
154
+ pointer-events: none;
155
+ background: transparent;
156
+ box-sizing: border-box;
157
+ border-color: transparent;
158
+ border-top: var(--border-container-top-width-jk6fhm, 0px) solid var(--color-border-container-top-srcvx4, transparent);
159
+ border-radius: var(--border-radius-container-gh9ysk, 16px);
160
+ z-index: 1;
161
+ }
162
+ .awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9)::after, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::after {
163
+ content: "";
164
+ position: absolute;
165
+ left: 0px;
166
+ top: 0px;
167
+ width: 100%;
168
+ height: 100%;
169
+ pointer-events: none;
170
+ background: transparent;
171
+ box-sizing: border-box;
172
+ box-shadow: var(--shadow-container-fx563k, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
173
+ border-radius: var(--border-radius-container-gh9ysk, 16px);
174
+ mix-blend-mode: multiply;
175
+ }
149
176
  @media screen and (-ms-high-contrast: active) {
150
- .awsui_root_14iqq_4079j_97.awsui_variant-default_14iqq_4079j_116:not(#\9), .awsui_root_14iqq_4079j_97.awsui_variant-stacked_14iqq_4079j_116:not(#\9) {
177
+ .awsui_root_14iqq_xhasy_97.awsui_variant-default_14iqq_xhasy_116:not(#\9), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9) {
151
178
  border: var(--border-field-width-idlekx, 2px) solid var(--color-border-container-top-srcvx4, transparent);
152
179
  }
153
180
  }
154
- .awsui_root_14iqq_4079j_97.awsui_variant-stacked_14iqq_4079j_116:not(#\9):not(:last-child) {
181
+ .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9):not(:last-child), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9):not(:last-child)::before, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9):not(:last-child)::after {
155
182
  border-bottom-right-radius: 0;
156
183
  border-bottom-left-radius: 0;
157
184
  }
158
- .awsui_root_14iqq_4079j_97.awsui_variant-stacked_14iqq_4079j_116 + .awsui_root_14iqq_4079j_97.awsui_variant-stacked_14iqq_4079j_116:not(#\9) {
159
- border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
185
+ .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9), .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before, .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::after {
160
186
  border-top-left-radius: 0;
161
187
  border-top-right-radius: 0;
162
- box-shadow: var(--shadow-container-stacked-lumzae, -1px 1px 1px 0px #e9ebed, 1px 1px 1px 0px #e9ebed, 0px 9px 8px -7px rgba(0, 7, 22, 0.12), 8px 0px 8px -7px rgba(0, 7, 22, 0.12), -8px 0px 8px -7px rgba(0, 7, 22, 0.12));
188
+ }
189
+ .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before {
190
+ border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
191
+ }
192
+ .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116 + .awsui_root_14iqq_xhasy_97.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::after {
193
+ box-shadow: var(--shadow-container-stacked-jfo2nn, -1px 1px 1px 0px #e9ebed, 1px 1px 1px 0px #e9ebed, 0px 9px 8px -7px rgba(0, 7, 22, 0.12), 8px 0px 8px -7px rgba(0, 7, 22, 0.12), -8px 0px 8px -7px rgba(0, 7, 22, 0.12));
194
+ }
195
+ .awsui_root_14iqq_xhasy_97.awsui_sticky-enabled_14iqq_xhasy_169:not(#\9)::before {
196
+ top: calc(-1 * var(--border-container-top-width-jk6fhm, 0px));
197
+ }
198
+ .awsui_root_14iqq_xhasy_97.awsui_sticky-enabled_14iqq_xhasy_169.awsui_variant-stacked_14iqq_xhasy_116:not(#\9)::before {
199
+ top: calc(-1 * var(--border-divider-section-width-4wm2it, 2px));
163
200
  }
164
201
 
165
- .awsui_header_14iqq_4079j_139:not(#\9) {
202
+ .awsui_header_14iqq_xhasy_176:not(#\9) {
166
203
  background-color: var(--color-background-container-header-4flbq5, #ffffff);
167
204
  border-top-left-radius: var(--border-radius-container-gh9ysk, 16px);
168
205
  border-top-right-radius: var(--border-radius-container-gh9ysk, 16px);
169
206
  }
170
- .awsui_header-sticky-disabled_14iqq_4079j_144:not(#\9) {
207
+ .awsui_header-sticky-disabled_14iqq_xhasy_181:not(#\9) {
171
208
  position: relative;
172
209
  z-index: 1;
173
210
  }
174
- .awsui_header-sticky-enabled_14iqq_4079j_148:not(#\9) {
211
+ .awsui_header-sticky-enabled_14iqq_xhasy_185:not(#\9) {
175
212
  top: 0;
176
213
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
177
214
  position: sticky;
178
215
  z-index: 800;
179
216
  }
180
- .awsui_header-stuck_14iqq_4079j_154:not(#\9) {
181
- box-shadow: var(--shadow-sticky-embedded-qit8ba, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
182
- border: 0;
217
+ .awsui_header-stuck_14iqq_xhasy_191:not(#\9) {
183
218
  border-radius: 0;
184
219
  }
185
- .awsui_header-dynamic-height_14iqq_4079j_159.awsui_header-stuck_14iqq_4079j_154:not(#\9) {
220
+ .awsui_header-stuck_14iqq_xhasy_191:not(#\9)::before {
221
+ border: 0;
222
+ }
223
+ .awsui_header-stuck_14iqq_xhasy_191:not(#\9):not(.awsui_header-variant-cards_14iqq_xhasy_197) {
224
+ box-shadow: var(--shadow-sticky-embedded-qit8ba, 0px 2px 0px 0px #e9ebed, 0px 16px 16px -12px rgba(0, 7, 22, 0.1));
225
+ }
226
+ .awsui_header-dynamic-height_14iqq_xhasy_200.awsui_header-stuck_14iqq_xhasy_191:not(#\9) {
186
227
  margin-bottom: calc(var(--font-heading-xl-line-height-doxfdj, 40px) - var(--font-heading-l-line-height-gev4n1, 30px));
187
228
  }
188
- .awsui_header_14iqq_4079j_139:not(#\9):not(:empty) {
229
+ .awsui_header_14iqq_xhasy_176:not(#\9):not(:empty) {
189
230
  border-bottom: var(--border-container-sticky-width-i7t7xe, 0px) solid var(--color-border-container-divider-4ade7z, transparent);
190
231
  }
191
- .awsui_header_14iqq_4079j_139.awsui_with-paddings_14iqq_4079j_165:not(#\9) {
232
+ .awsui_header_14iqq_xhasy_176.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
192
233
  padding: var(--space-container-header-vertical-zsjhel, 12px) var(--space-container-horizontal-tlw03i, 20px);
193
234
  }
194
- .awsui_header_14iqq_4079j_139.awsui_with-hidden-content_14iqq_4079j_168:not(#\9) {
235
+ .awsui_header_14iqq_xhasy_176.awsui_with-hidden-content_14iqq_xhasy_209:not(#\9) {
195
236
  border-bottom-left-radius: var(--border-radius-container-gh9ysk, 16px);
196
237
  border-bottom-right-radius: var(--border-radius-container-gh9ysk, 16px);
197
238
  }
198
- .awsui_header-variant-cards_14iqq_4079j_172:not(#\9) {
199
- box-shadow: var(--shadow-container-7nblnj, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
239
+ .awsui_header-variant-cards_14iqq_xhasy_197:not(#\9) {
240
+ border-radius: var(--border-radius-container-gh9ysk, 16px);
241
+ box-sizing: border-box;
242
+ }
243
+ .awsui_header-variant-cards_14iqq_xhasy_197:not(#\9):not(.awsui_header-sticky-enabled_14iqq_xhasy_185) {
244
+ position: relative;
245
+ }
246
+ .awsui_header-variant-cards_14iqq_xhasy_197:not(#\9)::before {
247
+ content: "";
248
+ position: absolute;
249
+ left: 0px;
250
+ top: 0px;
251
+ width: 100%;
252
+ height: 100%;
253
+ pointer-events: none;
254
+ background: transparent;
255
+ box-sizing: border-box;
256
+ border-color: transparent;
200
257
  border-top: var(--border-container-top-width-jk6fhm, 0px) solid var(--color-border-container-top-srcvx4, transparent);
201
258
  border-radius: var(--border-radius-container-gh9ysk, 16px);
259
+ z-index: 1;
260
+ }
261
+ .awsui_header-variant-cards_14iqq_xhasy_197:not(#\9)::after {
262
+ content: "";
263
+ position: absolute;
264
+ left: 0px;
265
+ top: 0px;
266
+ width: 100%;
267
+ height: 100%;
268
+ pointer-events: none;
269
+ background: transparent;
202
270
  box-sizing: border-box;
271
+ box-shadow: var(--shadow-container-fx563k, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12));
272
+ border-radius: var(--border-radius-container-gh9ysk, 16px);
273
+ mix-blend-mode: multiply;
203
274
  }
204
275
  @media screen and (-ms-high-contrast: active) {
205
- .awsui_header-variant-cards_14iqq_4079j_172:not(#\9) {
276
+ .awsui_header-variant-cards_14iqq_xhasy_197:not(#\9) {
206
277
  border: var(--border-field-width-idlekx, 2px) solid var(--color-border-container-top-srcvx4, transparent);
207
278
  }
208
279
  }
209
- .awsui_header-variant-cards_14iqq_4079j_172:not(#\9):not(:empty) {
210
- border-bottom: 1px solid #d5dbdb;
211
- /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
212
- }
213
- @supports (--css-variable-support-check: #000) {
214
- .awsui_header-variant-cards_14iqq_4079j_172:not(#\9):not(:empty) {
215
- border-bottom: 0;
216
- }
217
- }
218
- .awsui_header-variant-cards_14iqq_4079j_172.awsui_header-stuck_14iqq_4079j_154:not(#\9) {
280
+ .awsui_header-variant-cards_14iqq_xhasy_197.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::after, .awsui_header-variant-cards_14iqq_xhasy_197.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::before {
281
+ border: 0;
219
282
  border-top-left-radius: 0;
220
283
  border-top-right-radius: 0;
221
284
  }
222
- .awsui_header-variant-full-page_14iqq_4079j_196.awsui_header-stuck_14iqq_4079j_154:not(#\9) {
285
+ .awsui_header-variant-full-page_14iqq_xhasy_259.awsui_header-stuck_14iqq_xhasy_191:not(#\9) {
223
286
  box-shadow: none;
224
287
  }
225
- .awsui_header-variant-full-page_14iqq_4079j_196.awsui_header-stuck_14iqq_4079j_154:not(#\9)::after {
288
+ .awsui_header-variant-full-page_14iqq_xhasy_259.awsui_header-stuck_14iqq_xhasy_191:not(#\9)::after {
226
289
  content: "";
227
290
  position: absolute;
228
291
  right: 0;
@@ -237,24 +300,24 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
237
300
  The dynamic height dark header needs a background that will cover
238
301
  the default white background of the container component.
239
302
  */
240
- .awsui_dark-header_14iqq_4079j_214:not(#\9) {
303
+ .awsui_dark-header_14iqq_xhasy_277:not(#\9) {
241
304
  background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
242
305
  }
243
306
 
244
- .awsui_root-fit-height_14iqq_4079j_110 > .awsui_content_14iqq_4079j_218:not(#\9) {
307
+ .awsui_fit-height_14iqq_xhasy_111 > .awsui_content_14iqq_xhasy_281:not(#\9) {
245
308
  flex: 1;
246
309
  overflow: auto;
247
310
  }
248
- .awsui_content_14iqq_4079j_218.awsui_with-paddings_14iqq_4079j_165:not(#\9) {
311
+ .awsui_content_14iqq_xhasy_281.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
249
312
  padding: var(--space-scaled-l-t03y3z, 20px) var(--space-container-horizontal-tlw03i, 20px);
250
313
  }
251
- .awsui_header_14iqq_4079j_139 + .awsui_content_14iqq_4079j_218.awsui_with-paddings_14iqq_4079j_165:not(#\9) {
314
+ .awsui_header_14iqq_xhasy_176 + .awsui_content_14iqq_xhasy_281.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
252
315
  padding-top: var(--space-container-content-top-fsd8nr, 0px);
253
316
  }
254
317
 
255
- .awsui_footer_14iqq_4079j_229.awsui_with-paddings_14iqq_4079j_165:not(#\9) {
318
+ .awsui_footer_14iqq_xhasy_292.awsui_with-paddings_14iqq_xhasy_206:not(#\9) {
256
319
  padding: var(--space-scaled-s-cu1hzn, 12px) var(--space-container-horizontal-tlw03i, 20px);
257
320
  }
258
- .awsui_footer_14iqq_4079j_229.awsui_with-divider_14iqq_4079j_232:not(#\9) {
321
+ .awsui_footer_14iqq_xhasy_292.awsui_with-divider_14iqq_xhasy_295:not(#\9) {
259
322
  border-top: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
260
323
  }
@@ -2,22 +2,23 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "root": "awsui_root_14iqq_4079j_97",
6
- "root-fit-height": "awsui_root-fit-height_14iqq_4079j_110",
7
- "variant-default": "awsui_variant-default_14iqq_4079j_116",
8
- "variant-stacked": "awsui_variant-stacked_14iqq_4079j_116",
9
- "header": "awsui_header_14iqq_4079j_139",
10
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_4079j_144",
11
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_4079j_148",
12
- "header-stuck": "awsui_header-stuck_14iqq_4079j_154",
13
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_4079j_159",
14
- "with-paddings": "awsui_with-paddings_14iqq_4079j_165",
15
- "with-hidden-content": "awsui_with-hidden-content_14iqq_4079j_168",
16
- "header-variant-cards": "awsui_header-variant-cards_14iqq_4079j_172",
17
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_4079j_196",
18
- "dark-header": "awsui_dark-header_14iqq_4079j_214",
19
- "content": "awsui_content_14iqq_4079j_218",
20
- "footer": "awsui_footer_14iqq_4079j_229",
21
- "with-divider": "awsui_with-divider_14iqq_4079j_232"
5
+ "root": "awsui_root_14iqq_xhasy_97",
6
+ "fit-height": "awsui_fit-height_14iqq_xhasy_111",
7
+ "variant-default": "awsui_variant-default_14iqq_xhasy_116",
8
+ "variant-stacked": "awsui_variant-stacked_14iqq_xhasy_116",
9
+ "sticky-enabled": "awsui_sticky-enabled_14iqq_xhasy_169",
10
+ "header": "awsui_header_14iqq_xhasy_176",
11
+ "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_xhasy_181",
12
+ "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_xhasy_185",
13
+ "header-stuck": "awsui_header-stuck_14iqq_xhasy_191",
14
+ "header-variant-cards": "awsui_header-variant-cards_14iqq_xhasy_197",
15
+ "header-dynamic-height": "awsui_header-dynamic-height_14iqq_xhasy_200",
16
+ "with-paddings": "awsui_with-paddings_14iqq_xhasy_206",
17
+ "with-hidden-content": "awsui_with-hidden-content_14iqq_xhasy_209",
18
+ "header-variant-full-page": "awsui_header-variant-full-page_14iqq_xhasy_259",
19
+ "dark-header": "awsui_dark-header_14iqq_xhasy_277",
20
+ "content": "awsui_content_14iqq_xhasy_281",
21
+ "footer": "awsui_footer_14iqq_xhasy_292",
22
+ "with-divider": "awsui_with-divider_14iqq_xhasy_295"
22
23
  };
23
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"use-sticky-header.d.ts","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA6E,MAAM,OAAO,CAAC;AAQ7G,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,mDAA8D,CAAC;AAE/F,eAAO,MAAM,eAAe,YACjB,UAAU,cAAc,CAAC,aACvB,UAAU,cAAc,CAAC,mBACnB,OAAO,mBACP,MAAM;;;;;;;;;;CAqFxB,CAAC;AAEF,wBAAgB,uBAAuB,YAGtC"}
1
+ {"version":3,"file":"use-sticky-header.d.ts","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoE,MAAM,OAAO,CAAC;AAQpG,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,mDAA8D,CAAC;AAE/F,eAAO,MAAM,eAAe,YACjB,UAAU,cAAc,CAAC,aACvB,UAAU,cAAc,CAAC,mBACnB,OAAO,mBACP,MAAM;;;;;;;;;;CAyExB,CAAC;AAEF,wBAAgB,uBAAuB,YAGtC"}
@@ -1,6 +1,6 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import { useState, useLayoutEffect, useCallback, useEffect, createContext, useMemo } from 'react';
3
+ import { useState, useLayoutEffect, useCallback, useEffect, createContext } from 'react';
4
4
  import { useAppLayoutContext } from '../internal/context/app-layout-context';
5
5
  import { useMobile } from '../internal/hooks/use-mobile';
6
6
  import { findUpUntil, supportsStickyPosition } from '../internal/utils/dom';
@@ -9,17 +9,6 @@ import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
9
9
  import customCssProps from '../internal/generated/custom-css-properties';
10
10
  export var StickyHeaderContext = createContext({ isStuck: false });
11
11
  export var useStickyHeader = function (rootRef, headerRef, __stickyHeader, __stickyOffset) {
12
- var currentRootRef = rootRef.current;
13
- var currentHeaderRef = headerRef.current;
14
- var totalBorder = useMemo(function () {
15
- var containerRootBorder = currentRootRef
16
- ? parseInt(getComputedStyle(currentRootRef).getPropertyValue('border-top-width'), 10)
17
- : 0;
18
- var headerBorder = currentHeaderRef
19
- ? parseInt(getComputedStyle(currentHeaderRef).getPropertyValue('border-top-width'), 10)
20
- : 0;
21
- return containerRootBorder + headerBorder;
22
- }, [currentRootRef, currentHeaderRef]);
23
12
  // We reach into AppLayoutContext in case sticky header needs to be offset down by the height
24
13
  // of other sticky elements positioned on top of the view.
25
14
  var stickyOffsetTop = useAppLayoutContext().stickyOffsetTop;
@@ -47,7 +36,7 @@ export var useStickyHeader = function (rootRef, headerRef, __stickyHeader, __sti
47
36
  * body scroll then we will use that property. When a component is used outside AppLayout, we fall back
48
37
  * to the default offset calculated in AppLayoutDomContext.
49
38
  */
50
- var computedOffset = "".concat(effectiveStickyOffset - totalBorder, "px");
39
+ var computedOffset = "".concat(effectiveStickyOffset, "px");
51
40
  if (isRefresh && !hasInnerOverflowParents) {
52
41
  computedOffset = "var(".concat(customCssProps.offsetTopWithNotifications, ", ").concat(computedOffset, ")");
53
42
  }
@@ -64,14 +53,14 @@ export var useStickyHeader = function (rootRef, headerRef, __stickyHeader, __sti
64
53
  if (rootRef.current && headerRef.current) {
65
54
  var rootTop = rootRef.current.getBoundingClientRect().top;
66
55
  var headerTop = headerRef.current.getBoundingClientRect().top;
67
- if (rootTop + totalBorder < headerTop) {
56
+ if (rootTop < headerTop) {
68
57
  setIsStuck(true);
69
58
  }
70
59
  else {
71
60
  setIsStuck(false);
72
61
  }
73
62
  }
74
- }, [rootRef, headerRef, totalBorder]);
63
+ }, [rootRef, headerRef]);
75
64
  useEffect(function () {
76
65
  if (isSticky) {
77
66
  window.addEventListener('scroll', checkIfStuck, true);
@@ -1 +1 @@
1
- {"version":3,"file":"use-sticky-header.js","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAMzE,MAAM,CAAC,IAAM,mBAAmB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AClB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,CAAC;aACnB;SACF;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IACtC,SAAS,CAAC;QACR,IAAI,QAAQ,EAAE;YACZ,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;YACtD,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YAChD,OAAO;gBACL,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;gBACzD,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YACrD,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAC7B,OAAO;QACL,QAAQ,UAAA;QACR,OAAO,SAAA;QACP,YAAY,cAAA;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,uBAAuB;IACrC,IAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,sBAAsB,EAAE,IAAI,CAAC,QAAQ,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useState, useLayoutEffect, useCallback, useEffect, createContext, useMemo } from 'react';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { findUpUntil, supportsStickyPosition } from '../internal/utils/dom';\nimport { getOverflowParents } from '../internal/utils/scrollable-containers';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport customCssProps from '../internal/generated/custom-css-properties';\n\ninterface StickyHeaderContextProps {\n isStuck: boolean;\n}\n\nexport const StickyHeaderContext = createContext<StickyHeaderContextProps>({ isStuck: false });\n\nexport const useStickyHeader = (\n rootRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n __stickyHeader?: boolean,\n __stickyOffset?: number\n) => {\n const currentRootRef = rootRef.current;\n const currentHeaderRef = headerRef.current;\n const totalBorder = useMemo(() => {\n const containerRootBorder = currentRootRef\n ? parseInt(getComputedStyle(currentRootRef).getPropertyValue('border-top-width'), 10)\n : 0;\n const headerBorder = currentHeaderRef\n ? parseInt(getComputedStyle(currentHeaderRef).getPropertyValue('border-top-width'), 10)\n : 0;\n return containerRootBorder + headerBorder;\n }, [currentRootRef, currentHeaderRef]);\n\n // We reach into AppLayoutContext in case sticky header needs to be offset down by the height\n // of other sticky elements positioned on top of the view.\n const { stickyOffsetTop } = useAppLayoutContext();\n const isSticky = useSupportsStickyHeader() && !!__stickyHeader;\n const isRefresh = useVisualRefresh();\n\n // If it has overflow parents inside the app layout, we shouldn't apply a sticky offset.\n const [hasInnerOverflowParents, setHasInnerOverflowParents] = useState(false);\n const [isStuck, setIsStuck] = useState(false);\n useLayoutEffect(() => {\n if (rootRef.current) {\n const overflowParents = getOverflowParents(rootRef.current);\n const mainElement = findUpUntil(rootRef.current, elem => elem.tagName === 'MAIN');\n // In both versions of the app layout, the scrolling element for disableBodyScroll\n // is the <main>. If the closest overflow parent is also the closest <main> and we have\n // offset values, it's safe to assume that it's the app layout scroll root and we\n // should stop there.\n setHasInnerOverflowParents(overflowParents.length > 0 && overflowParents[0] !== mainElement);\n }\n }, [rootRef]);\n\n const effectiveStickyOffset = __stickyOffset ?? (hasInnerOverflowParents ? 0 : stickyOffsetTop);\n\n /**\n * The AppLayout refactor removed the need for passing the sticky offset in px all the time through the\n * AppLayoutDomContext provider because that information already exists on the DOM in a custom property\n * on the Layout subcomponent. Thus, if the Container header is sticky, we are in Visual Refresh and use\n * body scroll then we will use that property. When a component is used outside AppLayout, we fall back\n * to the default offset calculated in AppLayoutDomContext.\n */\n let computedOffset = `${effectiveStickyOffset - totalBorder}px`;\n if (isRefresh && !hasInnerOverflowParents) {\n computedOffset = `var(${customCssProps.offsetTopWithNotifications}, ${computedOffset})`;\n }\n\n const stickyStyles = isSticky\n ? {\n style: {\n top: computedOffset,\n },\n }\n : {};\n\n // \"stuck\" state, when the header has moved from its original posititon has a\n // box-shadow, applied here by a \"header-stuck\" className\n const checkIfStuck = useCallback(() => {\n if (rootRef.current && headerRef.current) {\n const rootTop = rootRef.current.getBoundingClientRect().top;\n const headerTop = headerRef.current.getBoundingClientRect().top;\n if (rootTop + totalBorder < headerTop) {\n setIsStuck(true);\n } else {\n setIsStuck(false);\n }\n }\n }, [rootRef, headerRef, totalBorder]);\n useEffect(() => {\n if (isSticky) {\n window.addEventListener('scroll', checkIfStuck, true);\n window.addEventListener('resize', checkIfStuck);\n return () => {\n window.removeEventListener('scroll', checkIfStuck, true);\n window.removeEventListener('resize', checkIfStuck);\n };\n }\n }, [isSticky, checkIfStuck]);\n return {\n isSticky,\n isStuck,\n stickyStyles,\n };\n};\n\nexport function useSupportsStickyHeader() {\n const isMobile = useMobile();\n return supportsStickyPosition() && !isMobile;\n}\n"]}
1
+ {"version":3,"file":"use-sticky-header.js","sourceRoot":"","sources":["../../../src/container/use-sticky-header.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAMzE,MAAM,CAAC,IAAM,mBAAmB,GAAG,aA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C,CAAC;AAEF,MAAM,UAAU,uBAAuB;IACrC,IAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,sBAAsB,EAAE,IAAI,CAAC,QAAQ,CAAC;AAC/C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useState, useLayoutEffect, useCallback, useEffect, createContext } from 'react';\nimport { useAppLayoutContext } from '../internal/context/app-layout-context';\nimport { useMobile } from '../internal/hooks/use-mobile';\nimport { findUpUntil, supportsStickyPosition } from '../internal/utils/dom';\nimport { getOverflowParents } from '../internal/utils/scrollable-containers';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport customCssProps from '../internal/generated/custom-css-properties';\n\ninterface StickyHeaderContextProps {\n isStuck: boolean;\n}\n\nexport const StickyHeaderContext = createContext<StickyHeaderContextProps>({ isStuck: false });\n\nexport const useStickyHeader = (\n rootRef: RefObject<HTMLDivElement>,\n headerRef: RefObject<HTMLDivElement>,\n __stickyHeader?: boolean,\n __stickyOffset?: number\n) => {\n // We reach into AppLayoutContext in case sticky header needs to be offset down by the height\n // of other sticky elements positioned on top of the view.\n const { stickyOffsetTop } = useAppLayoutContext();\n const isSticky = useSupportsStickyHeader() && !!__stickyHeader;\n const isRefresh = useVisualRefresh();\n\n // If it has overflow parents inside the app layout, we shouldn't apply a sticky offset.\n const [hasInnerOverflowParents, setHasInnerOverflowParents] = useState(false);\n const [isStuck, setIsStuck] = useState(false);\n useLayoutEffect(() => {\n if (rootRef.current) {\n const overflowParents = getOverflowParents(rootRef.current);\n const mainElement = findUpUntil(rootRef.current, elem => elem.tagName === 'MAIN');\n // In both versions of the app layout, the scrolling element for disableBodyScroll\n // is the <main>. If the closest overflow parent is also the closest <main> and we have\n // offset values, it's safe to assume that it's the app layout scroll root and we\n // should stop there.\n setHasInnerOverflowParents(overflowParents.length > 0 && overflowParents[0] !== mainElement);\n }\n }, [rootRef]);\n\n const effectiveStickyOffset = __stickyOffset ?? (hasInnerOverflowParents ? 0 : stickyOffsetTop);\n\n /**\n * The AppLayout refactor removed the need for passing the sticky offset in px all the time through the\n * AppLayoutDomContext provider because that information already exists on the DOM in a custom property\n * on the Layout subcomponent. Thus, if the Container header is sticky, we are in Visual Refresh and use\n * body scroll then we will use that property. When a component is used outside AppLayout, we fall back\n * to the default offset calculated in AppLayoutDomContext.\n */\n let computedOffset = `${effectiveStickyOffset}px`;\n if (isRefresh && !hasInnerOverflowParents) {\n computedOffset = `var(${customCssProps.offsetTopWithNotifications}, ${computedOffset})`;\n }\n\n const stickyStyles = isSticky\n ? {\n style: {\n top: computedOffset,\n },\n }\n : {};\n\n // \"stuck\" state, when the header has moved from its original posititon has a\n // box-shadow, applied here by a \"header-stuck\" className\n const checkIfStuck = useCallback(() => {\n if (rootRef.current && headerRef.current) {\n const rootTop = rootRef.current.getBoundingClientRect().top;\n const headerTop = headerRef.current.getBoundingClientRect().top;\n if (rootTop < headerTop) {\n setIsStuck(true);\n } else {\n setIsStuck(false);\n }\n }\n }, [rootRef, headerRef]);\n useEffect(() => {\n if (isSticky) {\n window.addEventListener('scroll', checkIfStuck, true);\n window.addEventListener('resize', checkIfStuck);\n return () => {\n window.removeEventListener('scroll', checkIfStuck, true);\n window.removeEventListener('resize', checkIfStuck);\n };\n }\n }, [isSticky, checkIfStuck]);\n return {\n isSticky,\n isStuck,\n stickyStyles,\n };\n};\n\nexport function useSupportsStickyHeader() {\n const isMobile = useMobile();\n return supportsStickyPosition() && !isMobile;\n}\n"]}
@@ -1,12 +1,12 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "layout": "awsui_layout_5gtk3_1onm4_99",
5
- "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1onm4_99",
6
- "background": "awsui_background_5gtk3_1onm4_102",
7
- "header": "awsui_header_5gtk3_1onm4_105",
8
- "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1onm4_115",
9
- "has-breadcrumbs": "awsui_has-breadcrumbs_5gtk3_1onm4_132",
10
- "content": "awsui_content_5gtk3_1onm4_141"
4
+ "layout": "awsui_layout_5gtk3_1tyi9_99",
5
+ "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1tyi9_99",
6
+ "background": "awsui_background_5gtk3_1tyi9_102",
7
+ "header": "awsui_header_5gtk3_1tyi9_105",
8
+ "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1tyi9_115",
9
+ "has-breadcrumbs": "awsui_has-breadcrumbs_5gtk3_1tyi9_132",
10
+ "content": "awsui_content_5gtk3_1tyi9_141"
11
11
  };
12
12
 
@@ -50,8 +50,6 @@
50
50
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
51
  SPDX-License-Identifier: Apache-2.0
52
52
  */
53
- /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
54
- /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
55
53
  /*
56
54
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
57
55
  SPDX-License-Identifier: Apache-2.0
@@ -64,6 +62,8 @@
64
62
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
65
63
  SPDX-License-Identifier: Apache-2.0
66
64
  */
65
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
66
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
67
67
  /*
68
68
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
69
69
  SPDX-License-Identifier: Apache-2.0
@@ -96,49 +96,49 @@ visual refresh mode. The padding is still added to the header
96
96
  in this scenario because otherwise the header and child
97
97
  nodes will directly touch with no gap between them.
98
98
  */
99
- .awsui_layout_5gtk3_1onm4_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1onm4_99) {
99
+ .awsui_layout_5gtk3_1tyi9_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1tyi9_99) {
100
100
  display: contents;
101
101
  }
102
- .awsui_layout_5gtk3_1onm4_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1onm4_99) > .awsui_background_5gtk3_1onm4_102 {
102
+ .awsui_layout_5gtk3_1tyi9_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1tyi9_99) > .awsui_background_5gtk3_1tyi9_102 {
103
103
  display: none;
104
104
  }
105
- .awsui_layout_5gtk3_1onm4_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1onm4_99) > .awsui_header_5gtk3_1onm4_105 {
105
+ .awsui_layout_5gtk3_1tyi9_99:not(#\9):not(.awsui_is-visual-refresh_5gtk3_1tyi9_99) > .awsui_header_5gtk3_1tyi9_105 {
106
106
  padding-bottom: var(--space-content-header-padding-bottom-nvqytg, 24px);
107
107
  }
108
108
 
109
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99:not(#\9) {
109
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99:not(#\9) {
110
110
  display: grid;
111
111
  grid-template-columns: minmax(0, 1fr);
112
112
  grid-template-rows: auto var(--space-dark-header-overlap-distance-hfejul, 36px) 1fr;
113
113
  min-height: 100%;
114
114
  }
115
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99.awsui_is-overlap-disabled_5gtk3_1onm4_115:not(#\9) {
115
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99.awsui_is-overlap-disabled_5gtk3_1tyi9_115:not(#\9) {
116
116
  grid-template-rows: auto 0 1fr;
117
117
  }
118
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99 > .awsui_background_5gtk3_1onm4_102:not(#\9) {
118
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_background_5gtk3_1tyi9_102:not(#\9) {
119
119
  background-color: var(--color-background-layout-main-sfhm4y, #ffffff);
120
120
  grid-column: 1;
121
121
  grid-row: 1/3;
122
122
  }
123
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99 > .awsui_background_5gtk3_1onm4_102.awsui_is-overlap-disabled_5gtk3_1onm4_115:not(#\9) {
123
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_background_5gtk3_1tyi9_102.awsui_is-overlap-disabled_5gtk3_1tyi9_115:not(#\9) {
124
124
  grid-row: 1/2;
125
125
  }
126
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99 > .awsui_header_5gtk3_1onm4_105:not(#\9) {
126
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_header_5gtk3_1tyi9_105:not(#\9) {
127
127
  grid-column: 1;
128
128
  grid-row: 1;
129
129
  padding-bottom: var(--space-content-header-padding-bottom-nvqytg, 24px);
130
130
  }
131
131
  @media (min-width: 689px) {
132
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99 > .awsui_header_5gtk3_1onm4_105.awsui_has-breadcrumbs_5gtk3_1onm4_132:not(#\9) {
132
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_header_5gtk3_1tyi9_105.awsui_has-breadcrumbs_5gtk3_1tyi9_132:not(#\9) {
133
133
  padding-top: var(--space-xxs-ynfts5, 4px);
134
134
  }
135
135
  }
136
136
  @media (max-width: 688px) {
137
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99 > .awsui_header_5gtk3_1onm4_105:not(#\9) {
137
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_header_5gtk3_1tyi9_105:not(#\9) {
138
138
  padding: var(--space-m-17eucw, 16px) 0 var(--space-content-header-padding-bottom-nvqytg, 24px);
139
139
  }
140
140
  }
141
- .awsui_layout_5gtk3_1onm4_99.awsui_is-visual-refresh_5gtk3_1onm4_99 > .awsui_content_5gtk3_1onm4_141:not(#\9) {
141
+ .awsui_layout_5gtk3_1tyi9_99.awsui_is-visual-refresh_5gtk3_1tyi9_99 > .awsui_content_5gtk3_1tyi9_141:not(#\9) {
142
142
  grid-column: 1;
143
143
  grid-row: 2/4;
144
144
  }
@@ -2,12 +2,12 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "layout": "awsui_layout_5gtk3_1onm4_99",
6
- "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1onm4_99",
7
- "background": "awsui_background_5gtk3_1onm4_102",
8
- "header": "awsui_header_5gtk3_1onm4_105",
9
- "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1onm4_115",
10
- "has-breadcrumbs": "awsui_has-breadcrumbs_5gtk3_1onm4_132",
11
- "content": "awsui_content_5gtk3_1onm4_141"
5
+ "layout": "awsui_layout_5gtk3_1tyi9_99",
6
+ "is-visual-refresh": "awsui_is-visual-refresh_5gtk3_1tyi9_99",
7
+ "background": "awsui_background_5gtk3_1tyi9_102",
8
+ "header": "awsui_header_5gtk3_1tyi9_105",
9
+ "is-overlap-disabled": "awsui_is-overlap-disabled_5gtk3_1tyi9_115",
10
+ "has-breadcrumbs": "awsui_has-breadcrumbs_5gtk3_1tyi9_132",
11
+ "content": "awsui_content_5gtk3_1tyi9_141"
12
12
  };
13
13
 
@@ -1,12 +1,12 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "root": "awsui_root_145pa_1uavz_93",
5
- "focus-lock": "awsui_focus-lock_145pa_1uavz_106",
6
- "calendar": "awsui_calendar_145pa_1uavz_110",
7
- "date-picker-container": "awsui_date-picker-container_145pa_1uavz_123",
8
- "date-picker-trigger": "awsui_date-picker-trigger_145pa_1uavz_128",
9
- "date-picker-input": "awsui_date-picker-input_145pa_1uavz_132",
10
- "open-calendar-button": "awsui_open-calendar-button_145pa_1uavz_137"
4
+ "root": "awsui_root_145pa_1uao4_93",
5
+ "focus-lock": "awsui_focus-lock_145pa_1uao4_106",
6
+ "calendar": "awsui_calendar_145pa_1uao4_110",
7
+ "date-picker-container": "awsui_date-picker-container_145pa_1uao4_123",
8
+ "date-picker-trigger": "awsui_date-picker-trigger_145pa_1uao4_128",
9
+ "date-picker-input": "awsui_date-picker-input_145pa_1uao4_132",
10
+ "open-calendar-button": "awsui_open-calendar-button_145pa_1uao4_137"
11
11
  };
12
12