@procore/core-react 12.14.0 → 12.16.0

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 (314) hide show
  1. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  2. package/dist/Avatar/Avatar.styles.js +5 -5
  3. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  4. package/dist/Badge/Badge.styles.js +2 -2
  5. package/dist/Banner/Banner.js +3 -3
  6. package/dist/Banner/Banner.js.map +1 -1
  7. package/dist/Banner/Banner.styles.d.ts +3 -3
  8. package/dist/Banner/Banner.styles.js +16 -16
  9. package/dist/Banner/Banner.styles.js.map +1 -1
  10. package/dist/Box/Box.styles.js +1 -1
  11. package/dist/Breadcrumbs/Breadcrumbs.js +5 -2
  12. package/dist/Breadcrumbs/Breadcrumbs.js.map +1 -1
  13. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  14. package/dist/Button/Button.styles.js +5 -5
  15. package/dist/Calendar/Calendar.styles.js +8 -8
  16. package/dist/Card/Card.styles.js +1 -1
  17. package/dist/Checkbox/Checkbox.styles.js +6 -6
  18. package/dist/Checkbox/CheckboxTooltip.js +1 -1
  19. package/dist/ContactItem/ContactItem.styles.js +5 -5
  20. package/dist/Content/Content.styles.js +2 -2
  21. package/dist/DateInput/DateInput.js +1 -1
  22. package/dist/DateInput/DateInput.js.map +1 -1
  23. package/dist/DateInput/DateInput.styles.d.ts +1 -1
  24. package/dist/DateInput/DateInput.styles.js +6 -6
  25. package/dist/DateInput/DateInput.styles.js.map +1 -1
  26. package/dist/DetailPage/DetailPage.styles.js +7 -7
  27. package/dist/DetailPageTemplate/DetailPageTemplate.d.ts +11 -0
  28. package/dist/DetailPageTemplate/DetailPageTemplate.js +38 -0
  29. package/dist/DetailPageTemplate/DetailPageTemplate.js.map +1 -0
  30. package/dist/DetailPageTemplate/DetailPageTemplate.types.d.ts +13 -0
  31. package/dist/DetailPageTemplate/DetailPageTemplate.types.js +2 -0
  32. package/dist/DetailPageTemplate/DetailPageTemplate.types.js.map +1 -0
  33. package/dist/Dropdown/Dropdown.styles.js +3 -3
  34. package/dist/Dropdown/Dropdown.types.d.ts +5 -11
  35. package/dist/Dropdown/Dropdown.types.js.map +1 -1
  36. package/dist/DropdownFlyout/DropdownFlyout.js +6 -2
  37. package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
  38. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  39. package/dist/DropdownFlyout/DropdownFlyout.types.d.ts +12 -14
  40. package/dist/DropdownFlyout/DropdownFlyout.types.js.map +1 -1
  41. package/dist/Dropzone/Dropzone.js +3 -2
  42. package/dist/Dropzone/Dropzone.js.map +1 -1
  43. package/dist/Dropzone/Dropzone.styles.js +9 -9
  44. package/dist/Dropzone/Dropzone.types.d.ts +22 -20
  45. package/dist/Dropzone/Dropzone.types.js.map +1 -1
  46. package/dist/EmptyState/EmptyState.styles.js +6 -6
  47. package/dist/Field/Field.styles.js +3 -3
  48. package/dist/FileList/FileList.styles.js +4 -4
  49. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  50. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  51. package/dist/FileSelect/FileSelect.styles.js +2 -2
  52. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  53. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  54. package/dist/FileSelect/GridSource/GridSource.js +3 -3
  55. package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
  56. package/dist/FileSelect/GridSource/GridSource.styles.d.ts +3 -3
  57. package/dist/FileSelect/GridSource/GridSource.styles.js +12 -12
  58. package/dist/FileSelect/GridSource/GridSource.styles.js.map +1 -1
  59. package/dist/FileSelect/GridSource/GridSource.types.d.ts +14 -23
  60. package/dist/FileSelect/GridSource/GridSource.types.js.map +1 -1
  61. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  62. package/dist/FileSelect/LocalSource/LocalSource.types.d.ts +43 -47
  63. package/dist/FileSelect/LocalSource/LocalSource.types.js.map +1 -1
  64. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  65. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  66. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  67. package/dist/FileSelect/TreeSource/TreeSource.types.d.ts +3 -1
  68. package/dist/FileSelect/TreeSource/TreeSource.types.js.map +1 -1
  69. package/dist/FileToken/FileToken.styles.js +4 -4
  70. package/dist/FilterToken/FilterToken.styles.js +2 -2
  71. package/dist/FlexList/FlexList.styles.js +1 -1
  72. package/dist/Form/Form.js +12 -7
  73. package/dist/Form/Form.js.map +1 -1
  74. package/dist/Form/Form.styles.js +14 -14
  75. package/dist/Form/Form.types.d.ts +55 -67
  76. package/dist/Form/Form.types.js.map +1 -1
  77. package/dist/Form/StyledFormikForm.styles.js +2 -2
  78. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  79. package/dist/Grid/Grid.styles.js +2 -2
  80. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  81. package/dist/Input/Input.styles.js +1 -1
  82. package/dist/Link/Link.styles.js +1 -1
  83. package/dist/ListPage/ListPage.styles.js +8 -8
  84. package/dist/Loader/Loader.styles.js +4 -4
  85. package/dist/Loader/Loader.styles.js.map +1 -1
  86. package/dist/MenuImperative/MenuImperative.js +8 -5
  87. package/dist/MenuImperative/MenuImperative.js.map +1 -1
  88. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  89. package/dist/Modal/Modal.js +2 -2
  90. package/dist/Modal/Modal.js.map +1 -1
  91. package/dist/Modal/Modal.styles.d.ts +2 -2
  92. package/dist/Modal/Modal.styles.js +18 -18
  93. package/dist/Modal/Modal.styles.js.map +1 -1
  94. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  95. package/dist/MultiSelect/MultiSelect.types.d.ts +22 -15
  96. package/dist/MultiSelect/MultiSelect.types.js.map +1 -1
  97. package/dist/NextMenu/NextMenu.styles.js +3 -3
  98. package/dist/Notation/Notation.js +1 -1
  99. package/dist/NumberInput/NumberInput.js +2 -2
  100. package/dist/NumberInput/NumberInput.js.map +1 -1
  101. package/dist/NumberInput/NumberInput.styles.d.ts +2 -2
  102. package/dist/NumberInput/NumberInput.styles.js +11 -11
  103. package/dist/NumberInput/NumberInput.styles.js.map +1 -1
  104. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  105. package/dist/PageFooterTemplate/PageFooterTemplate.styles.js +2 -2
  106. package/dist/PageFooterTemplate/PageFooterTemplate.styles.js.map +1 -1
  107. package/dist/PageHeaderTemplate/PageHeaderTemplate.js +70 -23
  108. package/dist/PageHeaderTemplate/PageHeaderTemplate.js.map +1 -1
  109. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.d.ts +2 -0
  110. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js +11 -1
  111. package/dist/PageHeaderTemplate/PageHeaderTemplate.styles.js.map +1 -1
  112. package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.d.ts +11 -0
  113. package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.js +88 -0
  114. package/dist/PageHeaderTemplate/PageHeaderTemplate.utils.js.map +1 -0
  115. package/dist/PageLayout/PageLayout.styles.js +16 -16
  116. package/dist/PageLayout/PageLayout.utils.d.ts +2 -0
  117. package/dist/PageLayout/PageLayout.utils.js +6 -0
  118. package/dist/PageLayout/PageLayout.utils.js.map +1 -1
  119. package/dist/PageTemplate/PageTemplate.js +6 -2
  120. package/dist/PageTemplate/PageTemplate.js.map +1 -1
  121. package/dist/PageTemplate/PageTemplate.styles.d.ts +5 -0
  122. package/dist/PageTemplate/PageTemplate.styles.js +24 -0
  123. package/dist/PageTemplate/PageTemplate.styles.js.map +1 -0
  124. package/dist/PageTemplate/PageTemplate.types.d.ts +1 -0
  125. package/dist/PageTemplate/PageTemplate.types.js.map +1 -1
  126. package/dist/Pagination/Pagination.styles.js +5 -5
  127. package/dist/Panel/Panel.styles.js +11 -11
  128. package/dist/Pill/Pill.styles.js +2 -2
  129. package/dist/Pill/Pill.types.d.ts +3 -1
  130. package/dist/Pill/Pill.types.js.map +1 -1
  131. package/dist/PillSelect/PillSelect.styles.js +4 -4
  132. package/dist/Popover/Popover.styles.js +2 -2
  133. package/dist/Portal/Portal.styles.js +1 -1
  134. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  135. package/dist/RadioButton/RadioButton.styles.js +3 -3
  136. package/dist/Required/Required.styles.js +3 -3
  137. package/dist/Search/Search.styles.js +5 -5
  138. package/dist/Search/Search.types.d.ts +4 -2
  139. package/dist/Search/Search.types.js.map +1 -1
  140. package/dist/Section/Section.styles.js +7 -7
  141. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  142. package/dist/Select/Select.js +6 -3
  143. package/dist/Select/Select.js.map +1 -1
  144. package/dist/Select/Select.styles.js +9 -8
  145. package/dist/Select/Select.styles.js.map +1 -1
  146. package/dist/Select/Select.types.d.ts +9 -1
  147. package/dist/Select/Select.types.js.map +1 -1
  148. package/dist/Semantic/Semantic.d.ts +3 -7
  149. package/dist/Semantic/Semantic.js +14 -2
  150. package/dist/Semantic/Semantic.js.map +1 -1
  151. package/dist/Semantic/Semantic.styles.d.ts +3 -3
  152. package/dist/Semantic/Semantic.styles.js +11 -11
  153. package/dist/Semantic/Semantic.styles.js.map +1 -1
  154. package/dist/Semantic/Semantic.types.d.ts +5 -0
  155. package/dist/Semantic/Semantic.types.js.map +1 -1
  156. package/dist/SettingsPageTemplate/SettingsPageTemplate.d.ts +7 -0
  157. package/dist/SettingsPageTemplate/SettingsPageTemplate.js +34 -0
  158. package/dist/SettingsPageTemplate/SettingsPageTemplate.js.map +1 -0
  159. package/dist/SettingsPageTemplate/SettingsPageTemplate.types.d.ts +9 -0
  160. package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js +2 -0
  161. package/dist/SettingsPageTemplate/SettingsPageTemplate.types.js.map +1 -0
  162. package/dist/Slider/Slider.js +2 -2
  163. package/dist/Slider/Slider.js.map +1 -1
  164. package/dist/Slider/Slider.styles.d.ts +2 -2
  165. package/dist/Slider/Slider.styles.js +9 -9
  166. package/dist/Slider/Slider.styles.js.map +1 -1
  167. package/dist/Spinner/Spinner.styles.js +7 -7
  168. package/dist/Spinner/Spinner.types.d.ts +2 -5
  169. package/dist/Spinner/Spinner.types.js.map +1 -1
  170. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  171. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  172. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  173. package/dist/Switch/Switch.styles.js +4 -4
  174. package/dist/Table/Table.styles.js +28 -28
  175. package/dist/TableShelf/TableShelf.styles.js +5 -5
  176. package/dist/Tabs/Tabs.styles.js +15 -15
  177. package/dist/Tearsheet/Tearsheet.styles.js +7 -7
  178. package/dist/Tearsheet/Tearsheet.styles.js.map +1 -1
  179. package/dist/TextArea/TextArea.styles.js +1 -1
  180. package/dist/TextEditor/TextEditor.types.d.ts +12 -9
  181. package/dist/TextEditor/TextEditor.types.js.map +1 -1
  182. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  183. package/dist/Thumbnail/Thumbnail.js +25 -10
  184. package/dist/Thumbnail/Thumbnail.js.map +1 -1
  185. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  186. package/dist/Thumbnail/Thumbnail.types.d.ts +2 -3
  187. package/dist/Thumbnail/Thumbnail.types.js.map +1 -1
  188. package/dist/Thumbnail/ThumbnailCaption.js +2 -2
  189. package/dist/Thumbnail/ThumbnailCaption.js.map +1 -1
  190. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  191. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  192. package/dist/TieredSelect/TieredSelect.types.d.ts +64 -40
  193. package/dist/TieredSelect/TieredSelect.types.js.map +1 -1
  194. package/dist/Tile/Tile.styles.js +8 -8
  195. package/dist/Tile/Tile.types.d.ts +1 -1
  196. package/dist/Tile/Tile.types.js.map +1 -1
  197. package/dist/Title/Title.styles.js +7 -7
  198. package/dist/Toast/Toast.styles.js +3 -3
  199. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  200. package/dist/ToggleButton/ToggleButton.types.d.ts +1 -1
  201. package/dist/ToggleButton/ToggleButton.types.js.map +1 -1
  202. package/dist/Token/Token.styles.js +3 -3
  203. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  204. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  205. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.d.ts +5 -0
  206. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js +44 -0
  207. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.js.map +1 -0
  208. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.d.ts +7 -0
  209. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js +2 -0
  210. package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.types.js.map +1 -0
  211. package/dist/Tooltip/Tooltip.styles.js +2 -2
  212. package/dist/Tree/Tree.js +3 -3
  213. package/dist/Tree/Tree.js.map +1 -1
  214. package/dist/Tree/Tree.styles.d.ts +9 -3
  215. package/dist/Tree/Tree.styles.js +23 -15
  216. package/dist/Tree/Tree.styles.js.map +1 -1
  217. package/dist/Tree/Tree.types.d.ts +40 -19
  218. package/dist/Tree/Tree.types.js.map +1 -1
  219. package/dist/Typeahead/Typeahead.styles.js +3 -3
  220. package/dist/Typography/Typography.js +1 -1
  221. package/dist/Typography/Typography.js.map +1 -1
  222. package/dist/Typography/Typography.styles.d.ts +2 -1
  223. package/dist/Typography/Typography.styles.js +3 -3
  224. package/dist/Typography/Typography.styles.js.map +1 -1
  225. package/dist/Typography/Typography.table.story.js +2 -2
  226. package/dist/_hooks/useCurrentMedia.d.ts +36 -0
  227. package/dist/_hooks/useCurrentMedia.js +73 -0
  228. package/dist/_hooks/useCurrentMedia.js.map +1 -0
  229. package/dist/_locales/en-AU.json +56 -56
  230. package/dist/_locales/en-CA.json +56 -56
  231. package/dist/_locales/en-GB.json +55 -55
  232. package/dist/_locales/es.json +2 -2
  233. package/dist/_locales/ja-JP.json +5 -5
  234. package/dist/_locales/pt-BR.json +1 -1
  235. package/dist/_locales/th-TH.json +1 -1
  236. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  237. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  238. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  239. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  240. package/dist/_typedoc/Box/Box.types.json +68 -68
  241. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  242. package/dist/_typedoc/Button/Button.types.json +12 -12
  243. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  244. package/dist/_typedoc/Card/Card.types.json +6 -6
  245. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  246. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  247. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  248. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  249. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  250. package/dist/_typedoc/Dropdown/Dropdown.types.json +39 -39
  251. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +35 -35
  252. package/dist/_typedoc/Dropzone/Dropzone.types.json +53 -53
  253. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  254. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  255. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  256. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +42 -42
  257. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +30 -30
  258. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +27 -27
  259. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  260. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  261. package/dist/_typedoc/Form/Form.types.json +1015 -975
  262. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  263. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  264. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +54 -54
  265. package/dist/_typedoc/Input/Input.types.json +2 -2
  266. package/dist/_typedoc/Link/Link.types.json +4 -4
  267. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  268. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  269. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  270. package/dist/_typedoc/Modal/Modal.types.json +46 -46
  271. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +35 -35
  272. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  273. package/dist/_typedoc/NumberInput/NumberInput.types.json +37 -37
  274. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  275. package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
  276. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  277. package/dist/_typedoc/Panel/Panel.types.json +28 -28
  278. package/dist/_typedoc/Pill/Pill.types.json +4 -4
  279. package/dist/_typedoc/PillSelect/PillSelect.types.json +58 -48
  280. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  281. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  282. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  283. package/dist/_typedoc/Required/Required.types.json +5 -5
  284. package/dist/_typedoc/Search/Search.types.json +22 -22
  285. package/dist/_typedoc/Section/Section.types.json +15 -15
  286. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  287. package/dist/_typedoc/Select/Select.types.json +78 -58
  288. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  289. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  290. package/dist/_typedoc/Spinner/Spinner.types.json +11 -11
  291. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +12 -12
  292. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  293. package/dist/_typedoc/Table/Table.types.json +112 -102
  294. package/dist/_typedoc/Tabs/Tabs.types.json +19 -19
  295. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  296. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  297. package/dist/_typedoc/TextEditor/TextEditor.types.json +13 -13
  298. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  299. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +23 -23
  300. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +56 -56
  301. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +44 -44
  302. package/dist/_typedoc/Tile/Tile.types.json +32 -32
  303. package/dist/_typedoc/Title/Title.types.json +1 -1
  304. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  305. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +6 -6
  306. package/dist/_typedoc/Token/Token.types.json +4 -4
  307. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  308. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +7 -7
  309. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  310. package/dist/_typedoc/Tree/Tree.types.json +110 -110
  311. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  312. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  313. package/dist/_typedoc/_utils/types.json +3 -3
  314. package/package.json +2 -2
@@ -3,6 +3,6 @@ import { colors } from '../_styles/colors';
3
3
  import { spacing } from '../_styles/spacing';
4
4
  export var StyledPageFooter = /*#__PURE__*/styled.footer.withConfig({
5
5
  displayName: "StyledPageFooter",
6
- componentId: "core-12_14_0__sc-1sku1tz-0"
7
- })(["display:flex;align-items:center;justify-content:space-between;background-color:", ";padding:", "px;width:100%;"], colors.white, spacing.lg);
6
+ componentId: "core-12_16_0__sc-1sku1tz-0"
7
+ })(["display:flex;align-items:center;justify-content:space-between;background-color:", ";padding:", "px;width:100%;box-shadow:0 -2px 6px 0 rgba(0,0,0,0.1);position:sticky;bottom:0;"], colors.white, spacing.lg);
8
8
  //# sourceMappingURL=PageFooterTemplate.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageFooterTemplate.styles.js","names":["styled","colors","spacing","StyledPageFooter","footer","withConfig","displayName","componentId","white","lg"],"sources":["../../src/PageFooterTemplate/PageFooterTemplate.styles.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledPageFooter = styled.footer`\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: ${colors.white};\n padding: ${spacing.lg}px;\n width: 100%;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,gBAAgB,gBAAGH,MAAM,CAACI,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,uHAIvBN,MAAM,CAACO,KAAK,EACrBN,OAAO,CAACO,EAAE,CAEtB"}
1
+ {"version":3,"file":"PageFooterTemplate.styles.js","names":["styled","colors","spacing","StyledPageFooter","footer","withConfig","displayName","componentId","white","lg"],"sources":["../../src/PageFooterTemplate/PageFooterTemplate.styles.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledPageFooter = styled.footer`\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: ${colors.white};\n padding: ${spacing.lg}px;\n width: 100%;\n box-shadow: 0 -2px 6px 0 rgba(0, 0, 0, 0.1);\n position: sticky;\n bottom: 0;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,gBAAgB,gBAAGH,MAAM,CAACI,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wLAIvBN,MAAM,CAACO,KAAK,EACrBN,OAAO,CAACO,EAAE,CAKtB"}
@@ -1,39 +1,86 @@
1
- var _excluded = ["actions", "banner", "beforeTitleZone", "breadcrumbs", "children", "heading", "subtext", "tabs", "toggleAction"];
1
+ var _excluded = ["children"],
2
+ _excluded2 = ["actions", "banner", "beforeTitleZone", "breadcrumbs", "children", "heading", "subtext", "tabs", "toggleAction"];
2
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
4
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
6
  import React from 'react';
6
7
  import { Box } from '../Box';
7
8
  import { Content } from '../Content';
8
- import { Page } from '../PageLayout';
9
- import { Heading } from '../Section/Section';
9
+ import { H1 } from '../Semantic';
10
10
  import { Typography } from '../Typography';
11
- import { StyledToggleActionBox } from './PageHeaderTemplate.styles';
12
- export var PageHeaderTemplate = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13
- var actions = _ref.actions,
14
- banner = _ref.banner,
15
- beforeTitleZone = _ref.beforeTitleZone,
16
- breadcrumbs = _ref.breadcrumbs,
17
- children = _ref.children,
18
- heading = _ref.heading,
19
- subtext = _ref.subtext,
20
- tabs = _ref.tabs,
21
- toggleAction = _ref.toggleAction,
22
- props = _objectWithoutProperties(_ref, _excluded);
11
+ import { spacing } from '../_styles/spacing';
12
+ import { StyledActions, StyledPageHeader, StyledToggleActionBox } from './PageHeaderTemplate.styles';
13
+ import { usePageHeaderTemplateLayout } from './PageHeaderTemplate.utils';
14
+ var PageHeaderTemplateActions = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
+ var children = _ref.children,
16
+ boxProps = _objectWithoutProperties(_ref, _excluded);
17
+ return /*#__PURE__*/React.createElement(StyledActions, _extends({}, boxProps, {
18
+ display: "flex",
19
+ gap: "sm",
20
+ ref: ref
21
+ }), children);
22
+ });
23
+ export var PageHeaderTemplate = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
24
+ var actions = _ref2.actions,
25
+ banner = _ref2.banner,
26
+ beforeTitleZone = _ref2.beforeTitleZone,
27
+ breadcrumbs = _ref2.breadcrumbs,
28
+ children = _ref2.children,
29
+ heading = _ref2.heading,
30
+ subtext = _ref2.subtext,
31
+ tabs = _ref2.tabs,
32
+ toggleAction = _ref2.toggleAction,
33
+ props = _objectWithoutProperties(_ref2, _excluded2);
34
+ var _usePageHeaderTemplat = usePageHeaderTemplateLayout(),
35
+ headerRef = _usePageHeaderTemplat.headerRef,
36
+ breadcrumbsWrapperRef = _usePageHeaderTemplat.breadcrumbsWrapperRef,
37
+ breadcrumbsRef = _usePageHeaderTemplat.breadcrumbsRef,
38
+ actionsRef = _usePageHeaderTemplat.actionsRef,
39
+ headingRef = _usePageHeaderTemplat.headingRef,
40
+ actionsPosition = _usePageHeaderTemplat.actionsPosition;
41
+ var flexWrap = React.useMemo(function () {
42
+ if (!breadcrumbs && actionsPosition === 'bottom') {
43
+ return 'wrap';
44
+ }
45
+ return 'nowrap';
46
+ }, [actionsPosition, breadcrumbs]);
23
47
  return /*#__PURE__*/React.createElement(React.Suspense, {
24
48
  fallback: "loading"
25
- }, /*#__PURE__*/React.createElement(Page.Header, _extends({
49
+ }, /*#__PURE__*/React.createElement(StyledPageHeader, _extends({
26
50
  ref: ref
27
- }, props), /*#__PURE__*/React.createElement(Content, null, breadcrumbs, banner, /*#__PURE__*/React.createElement(Box, {
51
+ }, props), /*#__PURE__*/React.createElement(Content, null, banner, /*#__PURE__*/React.createElement(Box, {
28
52
  display: "flex",
29
- justifyContent: "space-between"
30
- }, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Box, {
53
+ justifyContent: "space-between",
54
+ flexDirection: breadcrumbs ? 'column' : 'row',
55
+ gap: breadcrumbs ? undefined : 'md',
56
+ flexWrap: flexWrap,
57
+ ref: headerRef
58
+ }, breadcrumbs && /*#__PURE__*/React.createElement(Box, {
31
59
  display: "flex",
32
- gap: "xs",
33
- alignItems: "center"
34
- }, beforeTitleZone, heading && /*#__PURE__*/React.createElement(Heading, null, heading)), subtext && /*#__PURE__*/React.createElement(Typography, {
60
+ justifyContent: "space-between",
61
+ gap: "lg",
62
+ marginBottom: "md",
63
+ style: {
64
+ minHeight: "".concat(spacing.xl, "px"),
65
+ maxHeight: "".concat(spacing.xl, "px")
66
+ },
67
+ flexWrap: "wrap",
68
+ ref: breadcrumbsWrapperRef
69
+ }, /*#__PURE__*/React.createElement(Box, {
70
+ ref: breadcrumbsRef
71
+ }, breadcrumbs), actionsPosition === 'top' && /*#__PURE__*/React.createElement(PageHeaderTemplateActions, {
72
+ ref: actionsRef
73
+ }, actions)), /*#__PURE__*/React.createElement(Box, {
74
+ display: "flex",
75
+ gap: "md",
76
+ ref: headingRef
77
+ }, beforeTitleZone, /*#__PURE__*/React.createElement(Box, null, heading && /*#__PURE__*/React.createElement(H1, null, heading), subtext && /*#__PURE__*/React.createElement(Typography, {
35
78
  color: "gray45"
36
- }, subtext)), /*#__PURE__*/React.createElement(Box, null, actions)), children, /*#__PURE__*/React.createElement(Box, {
79
+ }, subtext))), (!breadcrumbs || actionsPosition === 'bottom') && /*#__PURE__*/React.createElement(PageHeaderTemplateActions, {
80
+ ref: actionsRef,
81
+ flexWrap: flexWrap,
82
+ marginTop: breadcrumbs && actionsPosition === 'bottom' ? 'md' : undefined
83
+ }, actions)), children, /*#__PURE__*/React.createElement(Box, {
37
84
  display: "flex",
38
85
  gap: "xs",
39
86
  alignItems: "flex-end"
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeaderTemplate.js","names":["React","Box","Content","Page","Heading","Typography","StyledToggleActionBox","PageHeaderTemplate","forwardRef","_ref","ref","actions","banner","beforeTitleZone","breadcrumbs","children","heading","subtext","tabs","toggleAction","props","_objectWithoutProperties","_excluded","createElement","Suspense","fallback","Header","_extends","display","justifyContent","gap","alignItems","color"],"sources":["../../src/PageHeaderTemplate/PageHeaderTemplate.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Box } from '../Box'\nimport { Content } from '../Content'\nimport { Page } from '../PageLayout'\nimport { Heading } from '../Section/Section'\nimport { Typography } from '../Typography'\nimport { StyledToggleActionBox } from './PageHeaderTemplate.styles'\nimport type { PageHeaderTemplateProps } from './PageHeaderTemplate.types'\n\nexport const PageHeaderTemplate = React.forwardRef<\n HTMLDivElement,\n PageHeaderTemplateProps\n>(\n (\n {\n actions,\n banner,\n beforeTitleZone,\n breadcrumbs,\n children,\n heading,\n subtext,\n tabs,\n toggleAction,\n ...props\n },\n ref\n ) => (\n <React.Suspense fallback=\"loading\">\n <Page.Header ref={ref} {...props}>\n <Content>\n {breadcrumbs}\n {banner}\n <Box display=\"flex\" justifyContent=\"space-between\">\n <Box>\n <Box display=\"flex\" gap=\"xs\" alignItems=\"center\">\n {beforeTitleZone}\n {heading && <Heading>{heading}</Heading>}\n </Box>\n {subtext && <Typography color=\"gray45\">{subtext}</Typography>}\n </Box>\n <Box>{actions}</Box>\n </Box>\n {children}\n <Box display=\"flex\" gap=\"xs\" alignItems=\"flex-end\">\n {tabs}\n {toggleAction && (\n <StyledToggleActionBox>{toggleAction}</StyledToggleActionBox>\n )}\n </Box>\n </Content>\n </Page.Header>\n </React.Suspense>\n )\n)\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,qBAAqB,QAAQ,6BAA6B;AAGnE,OAAO,IAAMC,kBAAkB,gBAAGP,KAAK,CAACQ,UAAU,CAIhD,UAAAC,IAAA,EAaEC,GAAG;EAAA,IAXDC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,eAAe,GAAAJ,IAAA,CAAfI,eAAe;IACfC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IACRC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,OAAO,GAAAR,IAAA,CAAPQ,OAAO;IACPC,IAAI,GAAAT,IAAA,CAAJS,IAAI;IACJC,YAAY,GAAAV,IAAA,CAAZU,YAAY;IACTC,KAAK,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA;EAAA,oBAIVtB,KAAA,CAAAuB,aAAA,CAACvB,KAAK,CAACwB,QAAQ;IAACC,QAAQ,EAAC;EAAS,gBAChCzB,KAAA,CAAAuB,aAAA,CAACpB,IAAI,CAACuB,MAAM,EAAAC,QAAA;IAACjB,GAAG,EAAEA;EAAI,GAAKU,KAAK,gBAC9BpB,KAAA,CAAAuB,aAAA,CAACrB,OAAO,QACLY,WAAW,EACXF,MAAM,eACPZ,KAAA,CAAAuB,aAAA,CAACtB,GAAG;IAAC2B,OAAO,EAAC,MAAM;IAACC,cAAc,EAAC;EAAe,gBAChD7B,KAAA,CAAAuB,aAAA,CAACtB,GAAG,qBACFD,KAAA,CAAAuB,aAAA,CAACtB,GAAG;IAAC2B,OAAO,EAAC,MAAM;IAACE,GAAG,EAAC,IAAI;IAACC,UAAU,EAAC;EAAQ,GAC7ClB,eAAe,EACfG,OAAO,iBAAIhB,KAAA,CAAAuB,aAAA,CAACnB,OAAO,QAAEY,OAAiB,CACpC,CAAC,EACLC,OAAO,iBAAIjB,KAAA,CAAAuB,aAAA,CAAClB,UAAU;IAAC2B,KAAK,EAAC;EAAQ,GAAEf,OAAoB,CACzD,CAAC,eACNjB,KAAA,CAAAuB,aAAA,CAACtB,GAAG,QAAEU,OAAa,CAChB,CAAC,EACLI,QAAQ,eACTf,KAAA,CAAAuB,aAAA,CAACtB,GAAG;IAAC2B,OAAO,EAAC,MAAM;IAACE,GAAG,EAAC,IAAI;IAACC,UAAU,EAAC;EAAU,GAC/Cb,IAAI,EACJC,YAAY,iBACXnB,KAAA,CAAAuB,aAAA,CAACjB,qBAAqB,QAAEa,YAAoC,CAE3D,CACE,CACE,CACC,CAAC;AAAA,CAErB,CAAC"}
1
+ {"version":3,"file":"PageHeaderTemplate.js","names":["React","Box","Content","H1","Typography","spacing","StyledActions","StyledPageHeader","StyledToggleActionBox","usePageHeaderTemplateLayout","PageHeaderTemplateActions","forwardRef","_ref","ref","children","boxProps","_objectWithoutProperties","_excluded","createElement","_extends","display","gap","PageHeaderTemplate","_ref2","actions","banner","beforeTitleZone","breadcrumbs","heading","subtext","tabs","toggleAction","props","_excluded2","_usePageHeaderTemplat","headerRef","breadcrumbsWrapperRef","breadcrumbsRef","actionsRef","headingRef","actionsPosition","flexWrap","useMemo","Suspense","fallback","justifyContent","flexDirection","undefined","marginBottom","style","minHeight","concat","xl","maxHeight","color","marginTop","alignItems"],"sources":["../../src/PageHeaderTemplate/PageHeaderTemplate.tsx"],"sourcesContent":["import React from 'react'\nimport type { BoxProps } from '../Box'\nimport { Box } from '../Box'\nimport { Content } from '../Content'\nimport { H1 } from '../Semantic'\nimport { Typography } from '../Typography'\nimport { spacing } from '../_styles/spacing'\nimport {\n StyledActions,\n StyledPageHeader,\n StyledToggleActionBox,\n} from './PageHeaderTemplate.styles'\nimport type { PageHeaderTemplateProps } from './PageHeaderTemplate.types'\nimport { usePageHeaderTemplateLayout } from './PageHeaderTemplate.utils'\n\nconst PageHeaderTemplateActions = React.forwardRef<\n HTMLDivElement,\n React.PropsWithChildren<Omit<BoxProps, 'as'>>\n>(({ children, ...boxProps }, ref) => (\n <StyledActions {...boxProps} display=\"flex\" gap=\"sm\" ref={ref}>\n {children}\n </StyledActions>\n))\n\nexport const PageHeaderTemplate = React.forwardRef<\n HTMLDivElement,\n PageHeaderTemplateProps\n>(\n (\n {\n actions,\n banner,\n beforeTitleZone,\n breadcrumbs,\n children,\n heading,\n subtext,\n tabs,\n toggleAction,\n ...props\n },\n ref\n ) => {\n const {\n headerRef,\n breadcrumbsWrapperRef,\n breadcrumbsRef,\n actionsRef,\n headingRef,\n actionsPosition,\n } = usePageHeaderTemplateLayout()\n\n const flexWrap = React.useMemo((): BoxProps['flexWrap'] => {\n if (!breadcrumbs && actionsPosition === 'bottom') {\n return 'wrap'\n }\n\n return 'nowrap'\n }, [actionsPosition, breadcrumbs])\n\n return (\n <React.Suspense fallback=\"loading\">\n <StyledPageHeader ref={ref} {...props}>\n <Content>\n {banner}\n\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n flexDirection={breadcrumbs ? 'column' : 'row'}\n gap={breadcrumbs ? undefined : 'md'}\n flexWrap={flexWrap}\n ref={headerRef}\n >\n {breadcrumbs && (\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n gap=\"lg\"\n marginBottom=\"md\"\n style={{\n minHeight: `${spacing.xl}px`,\n maxHeight: `${spacing.xl}px`,\n }}\n flexWrap=\"wrap\"\n ref={breadcrumbsWrapperRef}\n >\n <Box ref={breadcrumbsRef}>{breadcrumbs}</Box>\n\n {actionsPosition === 'top' && (\n <PageHeaderTemplateActions ref={actionsRef}>\n {actions}\n </PageHeaderTemplateActions>\n )}\n </Box>\n )}\n\n <Box display=\"flex\" gap=\"md\" ref={headingRef}>\n {beforeTitleZone}\n\n <Box>\n {heading && <H1>{heading}</H1>}\n {subtext && <Typography color=\"gray45\">{subtext}</Typography>}\n </Box>\n </Box>\n\n {(!breadcrumbs || actionsPosition === 'bottom') && (\n <PageHeaderTemplateActions\n ref={actionsRef}\n flexWrap={flexWrap}\n marginTop={\n breadcrumbs && actionsPosition === 'bottom'\n ? 'md'\n : undefined\n }\n >\n {actions}\n </PageHeaderTemplateActions>\n )}\n </Box>\n\n {children}\n\n <Box display=\"flex\" gap=\"xs\" alignItems=\"flex-end\">\n {tabs}\n\n {toggleAction && (\n <StyledToggleActionBox>{toggleAction}</StyledToggleActionBox>\n )}\n </Box>\n </Content>\n </StyledPageHeader>\n </React.Suspense>\n )\n }\n)\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,EAAE,QAAQ,aAAa;AAChC,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SACEC,aAAa,EACbC,gBAAgB,EAChBC,qBAAqB,QAChB,6BAA6B;AAEpC,SAASC,2BAA2B,QAAQ,4BAA4B;AAExE,IAAMC,yBAAyB,gBAAGV,KAAK,CAACW,UAAU,CAGhD,UAAAC,IAAA,EAA4BC,GAAG;EAAA,IAA5BC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAKC,QAAQ,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EAAA,oBACxBjB,KAAA,CAAAkB,aAAA,CAACZ,aAAa,EAAAa,QAAA,KAAKJ,QAAQ;IAAEK,OAAO,EAAC,MAAM;IAACC,GAAG,EAAC,IAAI;IAACR,GAAG,EAAEA;EAAI,IAC3DC,QACY,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OAAoB,CACzD,CACF,CAAC,EAEL,CAAC,CAACF,WAAW,IAAIa,eAAe,KAAK,QAAQ,kBAC5CxC,KAAA,CAAAkB,aAAA,CAACR,yBAAyB;IACxBG,GAAG,EAAEyB,UAAW;IAChBG,QAAQ,EAAEA,QAAS;IACnBc,SAAS,EACP5B,WAAW,IAAIa,eAAe,KAAK,QAAQ,GACvC,IAAI,GACJO;EACL,GAEAvB,OACwB,CAE1B,CAAC,EAELV,QAAQ,eAETd,KAAA,CAAAkB,aAAA,CAACjB,GAAG;IAACmB,OAAO,EAAC,MAAM;IAACC,GAAG,EAAC,IAAI;IAACmC,UAAU,EAAC;EAAU,GAC/C1B,IAAI,EAEJC,YAAY,iBACX/B,KAAA,CAAAkB,aAAA,CAACV,qBAAqB,QAAEuB,YAAoC,CAE3D,CACE,CACO,CACJ,CAAC;AAErB,CACF,CAAC"}
@@ -1,2 +1,4 @@
1
1
  /// <reference types="react" />
2
+ export declare const StyledPageHeader: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../PageLayout").PageHeaderProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
3
+ export declare const StyledActions: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../Box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
2
4
  export declare const StyledToggleActionBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").DivAttributes & import("../Box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
@@ -1,8 +1,18 @@
1
1
  import styled from 'styled-components';
2
2
  import { Box } from '../Box';
3
+ import { Page } from '../PageLayout';
4
+ import { colors } from '../_styles/colors';
3
5
  import { spacing } from '../_styles/spacing';
6
+ export var StyledPageHeader = /*#__PURE__*/styled(Page.Header).withConfig({
7
+ displayName: "StyledPageHeader",
8
+ componentId: "core-12_16_0__sc-usghcn-0"
9
+ })(["border-bottom:1px solid ", ";"], colors.gray85);
10
+ export var StyledActions = /*#__PURE__*/styled(Box).withConfig({
11
+ displayName: "StyledActions",
12
+ componentId: "core-12_16_0__sc-usghcn-1"
13
+ })(["width:fit-content;"]);
4
14
  export var StyledToggleActionBox = /*#__PURE__*/styled(Box).withConfig({
5
15
  displayName: "StyledToggleActionBox",
6
- componentId: "core-12_14_0__sc-usghcn-0"
16
+ componentId: "core-12_16_0__sc-usghcn-2"
7
17
  })(["top:-", "px;position:relative;"], spacing.lg);
8
18
  //# sourceMappingURL=PageHeaderTemplate.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeaderTemplate.styles.js","names":["styled","Box","spacing","StyledToggleActionBox","withConfig","displayName","componentId","lg"],"sources":["../../src/PageHeaderTemplate/PageHeaderTemplate.styles.tsx"],"sourcesContent":["import styled from 'styled-components'\nimport { Box } from '../Box'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledToggleActionBox = styled(Box)`\n top: -${spacing.lg}px;\n position: relative;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,qBAAqB,gBAAGH,MAAM,CAACC,GAAG,CAAC,CAAAG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,uCACtCJ,OAAO,CAACK,EAAE,CAEnB"}
1
+ {"version":3,"file":"PageHeaderTemplate.styles.js","names":["styled","Box","Page","colors","spacing","StyledPageHeader","Header","withConfig","displayName","componentId","gray85","StyledActions","StyledToggleActionBox","lg"],"sources":["../../src/PageHeaderTemplate/PageHeaderTemplate.styles.tsx"],"sourcesContent":["import styled from 'styled-components'\nimport { Box } from '../Box'\nimport { Page } from '../PageLayout'\nimport { colors } from '../_styles/colors'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledPageHeader = styled(Page.Header)`\n border-bottom: 1px solid ${colors.gray85};\n`\n\nexport const StyledActions = styled(Box)`\n width: fit-content;\n`\n\nexport const StyledToggleActionBox = styled(Box)`\n top: -${spacing.lg}px;\n position: relative;\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,gBAAgB,gBAAGL,MAAM,CAACE,IAAI,CAACI,MAAM,CAAC,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sCACtBN,MAAM,CAACO,MAAM,CACzC;AAED,OAAO,IAAMC,aAAa,gBAAGX,MAAM,CAACC,GAAG,CAAC,CAAAM,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0BAEvC;AAED,OAAO,IAAMG,qBAAqB,gBAAGZ,MAAM,CAACC,GAAG,CAAC,CAAAM,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,uCACtCL,OAAO,CAACS,EAAE,CAEnB"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ declare type ActionsPosition = 'top' | 'bottom';
3
+ export declare const usePageHeaderTemplateLayout: () => {
4
+ headerRef: React.RefObject<HTMLDivElement>;
5
+ breadcrumbsWrapperRef: React.RefObject<HTMLDivElement>;
6
+ breadcrumbsRef: React.RefObject<HTMLDivElement>;
7
+ actionsRef: React.RefObject<HTMLDivElement>;
8
+ headingRef: React.RefObject<HTMLDivElement>;
9
+ actionsPosition: ActionsPosition;
10
+ };
11
+ export {};
@@ -0,0 +1,88 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React from 'react';
8
+ import { useResizeObserver } from '../_hooks/ResizeObserver';
9
+ import { useCurrentMedia } from '../_hooks/useCurrentMedia';
10
+ var contentGap = 16;
11
+ var pixelsToNumber = function pixelsToNumber(value) {
12
+ return Number(value.slice(0, -2));
13
+ };
14
+
15
+ /**
16
+ * Returns `true` if first block collides with second block in the container, `false` otherwise
17
+ * */
18
+ var checkCollision = function checkCollision(container, firstBlock, secondBlock) {
19
+ var containerWidth = pixelsToNumber(getComputedStyle(container).width);
20
+ var firstBlockWidth = pixelsToNumber(getComputedStyle(firstBlock).width);
21
+ var secondBlockWidth = pixelsToNumber(getComputedStyle(secondBlock).width);
22
+ return firstBlockWidth + contentGap + secondBlockWidth >= containerWidth;
23
+ };
24
+ export var usePageHeaderTemplateLayout = function usePageHeaderTemplateLayout() {
25
+ var _useCurrentMedia = useCurrentMedia(),
26
+ isTabletLandscape = _useCurrentMedia.isTabletLandscape,
27
+ isDesktop = _useCurrentMedia.isDesktop;
28
+ var headerRef = React.useRef(null);
29
+ var breadcrumbsWrapperRef = React.useRef(null);
30
+ var breadcrumbsRef = React.useRef(null);
31
+ var actionsRef = React.useRef(null);
32
+ var headingRef = React.useRef(null);
33
+ var _React$useState = React.useState('top'),
34
+ _React$useState2 = _slicedToArray(_React$useState, 2),
35
+ actionsPosition = _React$useState2[0],
36
+ setActionsPosition = _React$useState2[1];
37
+ var handleResize = React.useCallback(function () {
38
+ var header = headerRef.current;
39
+ var breadcrumbsWrapper = breadcrumbsWrapperRef.current;
40
+ var breadcrumbs = breadcrumbsRef.current;
41
+ var actions = actionsRef.current;
42
+ if (!header || !actions) {
43
+ return;
44
+ }
45
+ if (!breadcrumbs || !breadcrumbsWrapper) {
46
+ var heading = headingRef.current;
47
+ if (!heading) {
48
+ return;
49
+ }
50
+ if (isDesktop || isTabletLandscape) {
51
+ if (actionsPosition === 'bottom') {
52
+ setActionsPosition('top');
53
+ }
54
+ return;
55
+ }
56
+ var _hasCollision = checkCollision(header, heading, actions);
57
+ if (actionsPosition === 'top' && _hasCollision) {
58
+ setActionsPosition('bottom');
59
+ return;
60
+ }
61
+ if (actionsPosition === 'bottom' && !_hasCollision) {
62
+ setActionsPosition('top');
63
+ }
64
+ return;
65
+ }
66
+ var hasCollision = checkCollision(breadcrumbsWrapper, breadcrumbs, actions);
67
+ if (actionsPosition === 'top' && hasCollision) {
68
+ setActionsPosition('bottom');
69
+ return;
70
+ }
71
+ if (actionsPosition === 'bottom' && !hasCollision) {
72
+ setActionsPosition('top');
73
+ }
74
+ }, [actionsPosition, isDesktop, isTabletLandscape]);
75
+ var observe = useResizeObserver(handleResize);
76
+ React.useEffect(function () {
77
+ observe(headerRef.current);
78
+ }, [observe]);
79
+ return {
80
+ headerRef: headerRef,
81
+ breadcrumbsWrapperRef: breadcrumbsWrapperRef,
82
+ breadcrumbsRef: breadcrumbsRef,
83
+ actionsRef: actionsRef,
84
+ headingRef: headingRef,
85
+ actionsPosition: actionsPosition
86
+ };
87
+ };
88
+ //# sourceMappingURL=PageHeaderTemplate.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeaderTemplate.utils.js","names":["React","useResizeObserver","useCurrentMedia","contentGap","pixelsToNumber","value","Number","slice","checkCollision","container","firstBlock","secondBlock","containerWidth","getComputedStyle","width","firstBlockWidth","secondBlockWidth","usePageHeaderTemplateLayout","_useCurrentMedia","isTabletLandscape","isDesktop","headerRef","useRef","breadcrumbsWrapperRef","breadcrumbsRef","actionsRef","headingRef","_React$useState","useState","_React$useState2","_slicedToArray","actionsPosition","setActionsPosition","handleResize","useCallback","header","current","breadcrumbsWrapper","breadcrumbs","actions","heading","hasCollision","observe","useEffect"],"sources":["../../src/PageHeaderTemplate/PageHeaderTemplate.utils.ts"],"sourcesContent":["import React from 'react'\nimport { useResizeObserver } from '../_hooks/ResizeObserver'\nimport { useCurrentMedia } from '../_hooks/useCurrentMedia'\n\ntype ActionsPosition = 'top' | 'bottom'\n\nconst contentGap = 16\n\nconst pixelsToNumber = (value: string) => Number(value.slice(0, -2))\n\n/**\n * Returns `true` if first block collides with second block in the container, `false` otherwise\n * */\nconst checkCollision = (\n container: HTMLElement,\n firstBlock: HTMLElement,\n secondBlock: HTMLElement\n): boolean => {\n const containerWidth = pixelsToNumber(getComputedStyle(container).width)\n const firstBlockWidth = pixelsToNumber(getComputedStyle(firstBlock).width)\n const secondBlockWidth = pixelsToNumber(getComputedStyle(secondBlock).width)\n\n return firstBlockWidth + contentGap + secondBlockWidth >= containerWidth\n}\n\nexport const usePageHeaderTemplateLayout = () => {\n const { isTabletLandscape, isDesktop } = useCurrentMedia()\n\n const headerRef = React.useRef<HTMLDivElement>(null)\n const breadcrumbsWrapperRef = React.useRef<HTMLDivElement>(null)\n const breadcrumbsRef = React.useRef<HTMLDivElement>(null)\n const actionsRef = React.useRef<HTMLDivElement>(null)\n const headingRef = React.useRef<HTMLDivElement>(null)\n\n const [actionsPosition, setActionsPosition] =\n React.useState<ActionsPosition>('top')\n\n const handleResize = React.useCallback(() => {\n const header = headerRef.current\n const breadcrumbsWrapper = breadcrumbsWrapperRef.current\n const breadcrumbs = breadcrumbsRef.current\n const actions = actionsRef.current\n\n if (!header || !actions) {\n return\n }\n\n if (!breadcrumbs || !breadcrumbsWrapper) {\n const heading = headingRef.current\n\n if (!heading) {\n return\n }\n\n if (isDesktop || isTabletLandscape) {\n if (actionsPosition === 'bottom') {\n setActionsPosition('top')\n }\n return\n }\n\n const hasCollision = checkCollision(header, heading, actions)\n\n if (actionsPosition === 'top' && hasCollision) {\n setActionsPosition('bottom')\n return\n }\n\n if (actionsPosition === 'bottom' && !hasCollision) {\n setActionsPosition('top')\n }\n\n return\n }\n\n const hasCollision = checkCollision(\n breadcrumbsWrapper,\n breadcrumbs,\n actions\n )\n\n if (actionsPosition === 'top' && hasCollision) {\n setActionsPosition('bottom')\n return\n }\n\n if (actionsPosition === 'bottom' && !hasCollision) {\n setActionsPosition('top')\n }\n }, [actionsPosition, isDesktop, isTabletLandscape])\n\n const observe = useResizeObserver(handleResize)\n\n React.useEffect(() => {\n observe(headerRef.current)\n }, [observe])\n\n return {\n headerRef,\n breadcrumbsWrapperRef,\n breadcrumbsRef,\n actionsRef,\n headingRef,\n\n actionsPosition,\n }\n}\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,eAAe,QAAQ,2BAA2B;AAI3D,IAAMC,UAAU,GAAG,EAAE;AAErB,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAa;EAAA,OAAKC,MAAM,CAACD,KAAK,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAAA;;AAEpE;AACA;AACA;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAClBC,SAAsB,EACtBC,UAAuB,E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ATA,SAAS;IACTE,qBAAqB,EAArBA,qBAAqB;IACrBC,cAAc,EAAdA,cAAc;IACdC,UAAU,EAAVA,UAAU;IACVC,UAAU,EAAVA,UAAU;IAEVK,eAAe,EAAfA;EACF,CAAC;AACH,CAAC"}
@@ -14,52 +14,52 @@ export var adjustMaxWidth = function adjustMaxWidth(breakpointMinWidth) {
14
14
  };
15
15
  export var StyledPageHeader = /*#__PURE__*/styled.div.withConfig({
16
16
  displayName: "StyledPageHeader",
17
- componentId: "core-12_14_0__sc-1cvdbsv-0"
17
+ componentId: "core-12_16_0__sc-1cvdbsv-0"
18
18
  })(["padding-top:", "px;padding-right:", "px;padding-left:", "px;@media ", "{padding-right:", "px;padding-left:", "px;}", ""], headerVerticalSpacing, outerPageSpacing, outerPageSpacing, getSmallScreenBreakpointValue(), outerPageSpacingSmaller, outerPageSpacingSmaller, function (_ref) {
19
19
  var $transparent = _ref.$transparent;
20
20
  return !$transparent && css(["", " background-color:", ";"], getShadow(1.5), colors.white);
21
21
  });
22
22
  var StyledPageHeaderItem = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledPageHeaderItem",
24
- componentId: "core-12_14_0__sc-1cvdbsv-1"
24
+ componentId: "core-12_16_0__sc-1cvdbsv-1"
25
25
  })(["margin-top:", "px;&:first-child{margin-top:0;}"], headerVerticalSpacing);
26
26
  export var StyledPageTitle = /*#__PURE__*/styled(StyledPageHeaderItem).withConfig({
27
27
  displayName: "StyledPageTitle",
28
- componentId: "core-12_14_0__sc-1cvdbsv-2"
28
+ componentId: "core-12_16_0__sc-1cvdbsv-2"
29
29
  })(["&:last-child{padding-bottom:", "px;}"], headerVerticalSpacing);
30
30
  export var StyledPageBreadcrumbs = /*#__PURE__*/styled(StyledPageHeaderItem).attrs({
31
31
  as: 'nav'
32
32
  }).withConfig({
33
33
  displayName: "StyledPageBreadcrumbs",
34
- componentId: "core-12_14_0__sc-1cvdbsv-3"
34
+ componentId: "core-12_16_0__sc-1cvdbsv-3"
35
35
  })([""]);
36
36
  export var StyledPageBanner = /*#__PURE__*/styled(StyledPageHeaderItem).withConfig({
37
37
  displayName: "StyledPageBanner",
38
- componentId: "core-12_14_0__sc-1cvdbsv-4"
38
+ componentId: "core-12_16_0__sc-1cvdbsv-4"
39
39
  })([""]);
40
40
  export var getActions = function getActions() {
41
41
  return css(["flex-shrink:0;padding-left:", "px;> button,> a{&:first-child{margin-left:0;}margin-left:", "px;}"], spacing.xl, spacing.sm);
42
42
  };
43
43
  export var StyledPageActions = /*#__PURE__*/styled.div.withConfig({
44
44
  displayName: "StyledPageActions",
45
- componentId: "core-12_14_0__sc-1cvdbsv-5"
45
+ componentId: "core-12_16_0__sc-1cvdbsv-5"
46
46
  })(["", ""], getActions());
47
47
  export var StyledPageTabs = /*#__PURE__*/styled(StyledPageHeaderItem).withConfig({
48
48
  displayName: "StyledPageTabs",
49
- componentId: "core-12_14_0__sc-1cvdbsv-6"
49
+ componentId: "core-12_16_0__sc-1cvdbsv-6"
50
50
  })([""]);
51
51
  export var StyledBody = /*#__PURE__*/styled.div.withConfig({
52
52
  displayName: "StyledBody",
53
- componentId: "core-12_14_0__sc-1cvdbsv-7"
53
+ componentId: "core-12_16_0__sc-1cvdbsv-7"
54
54
  })(["padding-top:", "px;padding-left:", "px;padding-right:", "px;@media ", "{padding-top:", "px;padding-left:", "px;padding-right:", "px;}"], outerPageSpacing, outerPageSpacing, outerPageSpacing, getSmallScreenBreakpointValue(), outerPageSpacingSmaller, outerPageSpacingSmaller, outerPageSpacingSmaller);
55
55
  var navigationWidth = 200;
56
56
  export var StyledNavigation = /*#__PURE__*/styled.div.withConfig({
57
57
  displayName: "StyledNavigation",
58
- componentId: "core-12_14_0__sc-1cvdbsv-8"
58
+ componentId: "core-12_16_0__sc-1cvdbsv-8"
59
59
  })(["float:left;max-height:100vh;min-width:", "px;overflow-y:auto;position:sticky;top:0;width:", "px;", "{padding:20px ", "px 0 0;}@media screen and (max-width:1024px){display:none;}"], navigationWidth, navigationWidth, StyledAnchorNavigation, spacing.sm);
60
60
  export var StyledContent = /*#__PURE__*/styled.div.withConfig({
61
61
  displayName: "StyledContent",
62
- componentId: "core-12_14_0__sc-1cvdbsv-9"
62
+ componentId: "core-12_16_0__sc-1cvdbsv-9"
63
63
  })([""]);
64
64
  var panelWidth = 400;
65
65
  var zIndexes = {
@@ -72,7 +72,7 @@ export var animationDuration = {
72
72
  };
73
73
  export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
74
74
  displayName: "StyledFooter",
75
- componentId: "core-12_14_0__sc-1cvdbsv-10"
75
+ componentId: "core-12_16_0__sc-1cvdbsv-10"
76
76
  })(["background-color:", ";", " position:sticky;bottom:0;z-index:", ";", ""], colors.white, function (_ref2) {
77
77
  var $hasShadow = _ref2.$hasShadow;
78
78
  return $hasShadow && getShadow(2, 'top');
@@ -82,7 +82,7 @@ export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
82
82
  });
83
83
  export var StyledAside = /*#__PURE__*/styled.div.withConfig({
84
84
  displayName: "StyledAside",
85
- componentId: "core-12_14_0__sc-1cvdbsv-11"
85
+ componentId: "core-12_16_0__sc-1cvdbsv-11"
86
86
  })(["", " @media ", "{position:absolute;right:0;}"], function (_ref4) {
87
87
  var $closed = _ref4.$closed,
88
88
  $open = _ref4.$open;
@@ -102,7 +102,7 @@ var getPanelAnimation = function getPanelAnimation() {
102
102
  };
103
103
  export var StyledAsidePanel = /*#__PURE__*/styled.div.withConfig({
104
104
  displayName: "StyledAsidePanel",
105
- componentId: "core-12_14_0__sc-1cvdbsv-12"
105
+ componentId: "core-12_16_0__sc-1cvdbsv-12"
106
106
  })(["", " @media ", "{", "}", " ", " border-left:1px solid ", ";width:", "px;position:fixed;background-color:", ";overflow:auto;z-index:", ";", " ", ""], function (_ref7) {
107
107
  var $rightOffset = _ref7.$rightOffset;
108
108
  return css(["@media ", "{", " border-left:0;z-index:", ";right:", "px;}"], getSmallScreenBreakpointValue(), getShadow(2), zIndexes.panelNarrowScreen, $rightOffset);
@@ -121,7 +121,7 @@ export var StyledAsidePanel = /*#__PURE__*/styled.div.withConfig({
121
121
  });
122
122
  export var StyledPageMain = /*#__PURE__*/styled.div.withConfig({
123
123
  displayName: "StyledPageMain",
124
- componentId: "core-12_14_0__sc-1cvdbsv-13"
124
+ componentId: "core-12_16_0__sc-1cvdbsv-13"
125
125
  })(["position:relative;max-width:100%;background-color:", ";", " ", ""], colors.gray96, function () {
126
126
  return isIE11() && css(["flex:1 0 0%;"]);
127
127
  }, function (_ref12) {
@@ -136,13 +136,13 @@ export var StyledPageMain = /*#__PURE__*/styled.div.withConfig({
136
136
  });
137
137
  export var StyledPageContainer = /*#__PURE__*/styled.div.withConfig({
138
138
  displayName: "StyledPageContainer",
139
- componentId: "core-12_14_0__sc-1cvdbsv-14"
139
+ componentId: "core-12_16_0__sc-1cvdbsv-14"
140
140
  })(["display:grid;grid-template-columns:1fr auto;", ""], function () {
141
141
  return isIE11() && css(["display:flex;flex-wrap:wrap;"]);
142
142
  });
143
143
  export var StyledAsideFluidContainer = /*#__PURE__*/styled.div.withConfig({
144
144
  displayName: "StyledAsideFluidContainer",
145
- componentId: "core-12_14_0__sc-1cvdbsv-15"
145
+ componentId: "core-12_16_0__sc-1cvdbsv-15"
146
146
  })(["", ""], function (_ref13) {
147
147
  var $closed = _ref13.$closed,
148
148
  $open = _ref13.$open;
@@ -1,4 +1,6 @@
1
1
  export declare const getSmallScreenBreakpointValue: () => string;
2
+ export declare const getTabletLargeBreakpointValue: () => string;
3
+ export declare const getDesktopBreakpointValue: () => string;
2
4
  export declare const getIsUsingSmallScreen: () => boolean;
3
5
  export declare const wait: (ms: number) => Promise<void>;
4
6
  export declare function getBottomOffsetForFooterUseCase(footerEl: HTMLDivElement, globalBottomOffset: number): number | null;
@@ -3,6 +3,12 @@ import { adjustMaxWidth } from './PageLayout.styles';
3
3
  export var getSmallScreenBreakpointValue = function getSmallScreenBreakpointValue() {
4
4
  return "(max-width: ".concat(adjustMaxWidth(breakpointRawMinWidthValues.tabletMd), "px)");
5
5
  };
6
+ export var getTabletLargeBreakpointValue = function getTabletLargeBreakpointValue() {
7
+ return "(max-width: ".concat(adjustMaxWidth(breakpointRawMinWidthValues.tabletLg), "px)");
8
+ };
9
+ export var getDesktopBreakpointValue = function getDesktopBreakpointValue() {
10
+ return "(max-width: ".concat(adjustMaxWidth(breakpointRawMinWidthValues.desktopMd), "px)");
11
+ };
6
12
  export var getIsUsingSmallScreen = function getIsUsingSmallScreen() {
7
13
  var _globalThis$matchMedi;
8
14
  return (_globalThis$matchMedi = globalThis.matchMedia) === null || _globalThis$matchMedi === void 0 ? void 0 : _globalThis$matchMedi.call(globalThis, getSmallScreenBreakpointValue()).matches;
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.utils.js","names":["breakpointRawMinWidthValues","adjustMaxWidth","getSmallScreenBreakpointValue","concat","tabletMd","getIsUsingSmallScreen","_globalThis$matchMedi","globalThis","matchMedia","call","matches","wait","ms","Promise","resolve","setTimeout","getBottomOffsetForFooterUseCase","footerEl","globalBottomOffset","_footerRect$y","viewportHeight","innerHeight","footerRect","getBoundingClientRect","footerTop","y","top","footerHeight","height","isSmallScreen","isPageFooterSticky","dataset","sticky","bottom","getGlobalBottomOffset","containerEl","lowerBoundary","lowerBoundaryTopOffset","document","documentElement","clientHeight","Math","max","getGlobalTopOffset","_upperBoundary$y","upperBoundary","upperBoundaryTopOffset","getRightOffset","containerRight","right","viewportWidth","clientWidth","getIsIntersectingVertically","upperEl","lowerEl"],"sources":["../../src/PageLayout/PageLayout.utils.ts"],"sourcesContent":["import { breakpointRawMinWidthValues } from '../Grid/Grid.constants'\nimport { adjustMaxWidth } from './PageLayout.styles'\n\nexport const getSmallScreenBreakpointValue = () =>\n `(max-width: ${adjustMaxWidth(breakpointRawMinWidthValues.tabletMd)}px)`\n\nexport const getIsUsingSmallScreen = () => {\n return globalThis.matchMedia?.(getSmallScreenBreakpointValue()).matches\n}\n\nexport const wait = (ms: number) =>\n new Promise<void>((resolve) => setTimeout(resolve, ms))\n\nexport function getBottomOffsetForFooterUseCase(\n footerEl: HTMLDivElement,\n globalBottomOffset: number\n) {\n const viewportHeight = globalThis.innerHeight\n const footerRect = footerEl.getBoundingClientRect()\n const footerTop = footerRect.y ?? footerRect.top\n const footerHeight = footerRect.height\n const isSmallScreen = getIsUsingSmallScreen()\n const isPageFooterSticky = footerEl.dataset.sticky === 'sticky'\n\n if (isSmallScreen) {\n if (isPageFooterSticky) {\n return globalBottomOffset + viewportHeight - footerTop\n }\n\n return globalBottomOffset + footerHeight\n }\n\n if (isPageFooterSticky) {\n // align with the sticky footer in the rest of use cases\n return viewportHeight - footerRect.bottom\n }\n\n return null\n}\n\nexport function getGlobalBottomOffset(containerEl: HTMLDivElement) {\n const lowerBoundary = containerEl.getBoundingClientRect()\n const lowerBoundaryTopOffset = lowerBoundary.bottom\n const viewportHeight = document.documentElement.clientHeight\n return Math.max(viewportHeight - lowerBoundaryTopOffset, 0)\n}\n\nexport function getGlobalTopOffset(containerEl: HTMLDivElement) {\n const upperBoundary = containerEl.getBoundingClientRect()\n const upperBoundaryTopOffset = upperBoundary.y ?? upperBoundary.top\n return Math.max(upperBoundaryTopOffset, 0)\n}\n\nexport function getRightOffset(containerEl: HTMLDivElement) {\n const containerRight = containerEl.getBoundingClientRect().right\n const viewportWidth = document.documentElement.clientWidth\n\n return viewportWidth - containerRight\n}\n\nexport function getIsIntersectingVertically(\n upperEl: HTMLElement,\n lowerEl: HTMLElement\n) {\n return (\n upperEl.getBoundingClientRect().bottom > lowerEl.getBoundingClientRect().top\n )\n}\n"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,wBAAwB;AACpE,SAASC,cAAc,QAAQ,qBAAqB;AAEpD,OAAO,IAAMC,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAA;EAAA,sBAAAC,MAAA,CACzBF,cAAc,CAACD,2BAA2B,CAACI,QAAQ,CAAC;AAAA,CAAK;AAE1E,OAAO,IAAMC,qBAAqB,GAAG,S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AsB,GAAGD,aAAa,CAACH,MAAM;EACnD,IAAMb,cAAc,GAAGkB,QAAQ,CAACC,eAAe,CAACC,YAAY;EAC5D,OAAOC,IAAI,CAACC,GAAG,CAACtB,cAAc,GAAGiB,sBAAsB,EAAE,CAAC,CAAC;AAC7D;AAEA,OAAO,SAASM,kBAAkBA,CAACR,WAA2B,EAAE;EAAA,IAAAS,gBAAA;EAC9D,IAAMC,aAAa,GAAGV,WAAW,CAACZ,qBAAqB,CAAC,CAAC;EACzD,IAAMuB,sBAAsB,IAAAF,gBAAA,GAAGC,aAAa,CAACpB,CAAC,cAAAmB,gBAAA,cAAAA,gBAAA,GAAIC,aAAa,CAACnB,GAAG;EACnE,OAAOe,IAAI,CAACC,GAAG,CAACI,sBAAsB,EAAE,CAAC,CAAC;AAC5C;AAEA,OAAO,SAASC,cAAcA,CAACZ,WAA2B,EAAE;EAC1D,IAAMa,cAAc,GAAGb,WAAW,CAACZ,qBAAqB,CAAC,CAAC,CAAC0B,KAAK;EAChE,IAAMC,aAAa,GAAGZ,QAAQ,CAACC,eAAe,CAACY,WAAW;EAE1D,OAAOD,aAAa,GAAGF,cAAc;AACvC;AAEA,OAAO,SAASI,2BAA2BA,CACzCC,OAAoB,EACpBC,OAAoB,EACpB;EACA,OACED,OAAO,CAAC9B,qBAAqB,CAAC,CAAC,CAACU,MAAM,GAAGqB,OAAO,CAAC/B,qBAAqB,CAAC,CAAC,CAACG,GAAG;AAEhF"}
1
+ {"version":3,"file":"PageLayout.utils.js","names":["breakpointRawMinWidthValues","adjustMaxWidth","getSmallScreenBreakpointValue","concat","tabletMd","getTabletLargeBreakpointValue","tabletLg","getDesktopBreakpointValue","desktopMd","getIsUsingSmallScreen","_globalThis$matchMedi","globalThis","matchMedia","call","matches","wait","ms","Promise","resolve","setTimeout","getBottomOffsetForFooterUseCase","footerEl","globalBottomOffset","_footerRect$y","viewportHeight","innerHeight","footerRect","getBoundingClientRect","footerTop","y","top","footerHeight","height","isSmallScreen","isPageFooterSticky","dataset","sticky","bottom","getGlobalBottomOffset","containerEl","lowerBoundary","lowerBoundaryTopOffset","document","documentElement","clientHeight","Math","max","getGlobalTopOffset","_upperBoundary$y","upperBoundary","upperBoundaryTopOffset","getRightOffset","containerRight","right","viewportWidth","clientWidth","getIsIntersectingVertically","upperEl","lowerEl"],"sources":["../../src/PageLayout/PageLayout.utils.ts"],"sourcesContent":["import { breakpointRawMinWidthValues } from '../Grid/Grid.constants'\nimport { adjustMaxWidth } from './PageLayout.styles'\n\nexport const getSmallScreenBreakpointValue = () =>\n `(max-width: ${adjustMaxWidth(breakpointRawMinWidthValues.tabletMd)}px)`\n\nexport const getTabletLargeBreakpointValue = () =>\n `(max-width: ${adjustMaxWidth(breakpointRawMinWidthValues.tabletLg)}px)`\n\nexport const getDesktopBreakpointValue = () =>\n `(max-width: ${adjustMaxWidth(breakpointRawMinWidthValues.desktopMd)}px)`\n\nexport const getIsUsingSmallScreen = () => {\n return globalThis.matchMedia?.(getSmallScreenBreakpointValue()).matches\n}\n\nexport const wait = (ms: number) =>\n new Promise<void>((resolve) => setTimeout(resolve, ms))\n\nexport function getBottomOffsetForFooterUseCase(\n footerEl: HTMLDivElement,\n globalBottomOffset: number\n) {\n const viewportHeight = globalThis.innerHeight\n const footerRect = footerEl.getBoundingClientRect()\n const footerTop = footerRect.y ?? footerRect.top\n const footerHeight = footerRect.height\n const isSmallScreen = getIsUsingSmallScreen()\n const isPageFooterSticky = footerEl.dataset.sticky === 'sticky'\n\n if (isSmallScreen) {\n if (isPageFooterSticky) {\n return globalBottomOffset + viewportHeight - footerTop\n }\n\n return globalBottomOffset + footerHeight\n }\n\n if (isPageFooterSticky) {\n // align with the sticky footer in the rest of use cases\n return viewportHeight - footerRect.bottom\n }\n\n return null\n}\n\nexport function getGlobalBottomOffset(containerEl: HTMLDivElement) {\n const lowerBoundary = containerEl.getBoundingClientRect()\n const lowerBoundaryTopOffset = lowerBoundary.bottom\n const viewportHeight = document.documentElement.clientHeight\n return Math.max(viewportHeight - lowerBoundaryTopOffset, 0)\n}\n\nexport function getGlobalTopOffset(containerEl: HTMLDivElement) {\n const upperBoundary = containerEl.getBoundingClientRect()\n const upperBoundaryTopOffset = upperBoundary.y ?? upperBoundary.top\n return Math.max(upperBoundaryTopOffset, 0)\n}\n\nexport function getRightOffset(containerEl: HTMLDivElement) {\n const containerRight = containerEl.getBoundingClientRect().right\n const viewportWidth = document.documentElement.clientWidth\n\n return viewportWidth - containerRight\n}\n\nexport function getIsIntersectingVertically(\n upperEl: HTMLElement,\n lowerEl: HTMLElement\n) {\n return (\n upperEl.getBoundingClientRect().bottom > lowerEl.getBoundingClientRect().top\n )\n}\n"],"mappings":"AAAA,SAASA,2BAA2B,QAAQ,wBAAwB;AACpE,SAASC,cAAc,QAAQ,qBAAqB;AAEpD,OAAO,IAAMC,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAA;EAAA,sBAAAC,MAAA,CACzBF,cAAc,CAACD,2BAA2B,CAACI,QAAQ,CAAC;AAAA,CAAK;AAE1E,OAAO,IAAMC,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAA;EAAA,sBAAAF,MAAA,CACzBF,cAAc,CAACD,2BAA2B,CAACM,QAAQ,CAAC;AAAA,CAAK;AAE1E,OAAO,IAAMC,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAA;EAAA,sBAAAJ,MAAA,CACrBF,cAAc,CAACD,2BAA2B,CAACQ,SAAS,CAAC;AAAA,CAAK;AAE3E,OAAO,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAA,EAAS;EAAA,IAAAC,qBAAA;EACzC,QAAAA,qBAAA,GAAOC,UAAU,CAACC,UAAU,cAAAF,qBAAA,uBAArBA,qBAAA,CAAAG,IAAA,CAAAF,UAAU,EAAcT,6BAA6B,CAAC,CAAC,CAAC,CAACY,OAAO;AACzE,CAAC;AAED,OAAO,IAAMC,IAAI,GAAG,SAAPA,IAAIA,CAAIC,EAAU;EAAA,OAC7B,IAAIC,O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qB,CAAC,CAAC;EACzD,IAAMuB,sBAAsB,IAAAF,gBAAA,GAAGC,aAAa,CAACpB,CAAC,cAAAmB,gBAAA,cAAAA,gBAAA,GAAIC,aAAa,CAACnB,GAAG;EACnE,OAAOe,IAAI,CAACC,GAAG,CAACI,sBAAsB,EAAE,CAAC,CAAC;AAC5C;AAEA,OAAO,SAASC,cAAcA,CAACZ,WAA2B,EAAE;EAC1D,IAAMa,cAAc,GAAGb,WAAW,CAACZ,qBAAqB,CAAC,CAAC,CAAC0B,KAAK;EAChE,IAAMC,aAAa,GAAGZ,QAAQ,CAACC,eAAe,CAACY,WAAW;EAE1D,OAAOD,aAAa,GAAGF,cAAc;AACvC;AAEA,OAAO,SAASI,2BAA2BA,CACzCC,OAAoB,EACpBC,OAAoB,EACpB;EACA,OACED,OAAO,CAAC9B,qBAAqB,CAAC,CAAC,CAACU,MAAM,GAAGqB,OAAO,CAAC/B,qBAAqB,CAAC,CAAC,CAACG,GAAG;AAEhF"}
@@ -1,18 +1,22 @@
1
- var _excluded = ["children", "header", "footer", "pane", "innerPane"];
1
+ var _excluded = ["children", "header", "footer", "pane", "innerPane", "isAsideVisible"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import React from 'react';
6
6
  import { Page } from '../PageLayout';
7
+ import { StyledPageAside, StyledPageBody, StyledPageBodyWrapper, StyledPageWrapper } from './PageTemplate.styles';
7
8
  export var PageTemplate = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
8
9
  var children = _ref.children,
9
10
  header = _ref.header,
10
11
  footer = _ref.footer,
11
12
  pane = _ref.pane,
12
13
  innerPane = _ref.innerPane,
14
+ isAsideVisible = _ref.isAsideVisible,
13
15
  props = _objectWithoutProperties(_ref, _excluded);
14
16
  return /*#__PURE__*/React.createElement(Page, _extends({}, props, {
15
17
  ref: ref
16
- }), /*#__PURE__*/React.createElement(Page.Main, null, header, /*#__PURE__*/React.createElement(Page.Body, null, innerPane, children), footer), pane);
18
+ }), /*#__PURE__*/React.createElement(StyledPageWrapper, null, header, /*#__PURE__*/React.createElement(StyledPageBodyWrapper, null, /*#__PURE__*/React.createElement(Page.Main, null, /*#__PURE__*/React.createElement(StyledPageBody, null, innerPane, children), footer), /*#__PURE__*/React.createElement(StyledPageAside, {
19
+ open: isAsideVisible
20
+ }, pane))));
17
21
  });
18
22
  //# sourceMappingURL=PageTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageTemplate.js","names":["React","Page","PageTemplate","forwardRef","_ref","ref","children","header","footer","pane","innerPane","props","_objectWithoutProperties","_excluded","createElement","_extends","Main","Body"],"sources":["../../src/PageTemplate/PageTemplate.tsx"],"sourcesContent":["import React from 'react'\nimport { Page } from '../PageLayout'\nimport type { PageTemplateProps } from './PageTemplate.types'\n\nexport const PageTemplate = React.forwardRef<HTMLDivElement, PageTemplateProps>(\n ({ children, header, footer, pane, innerPane, ...props }, ref) => (\n <Page {...props} ref={ref}>\n <Page.Main>\n {header}\n <Page.Body>\n {innerPane}\n {children}\n </Page.Body>\n {footer}\n </Page.Main>\n {pane}\n </Page>\n )\n)\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,eAAe;AAGpC,OAAO,IAAMC,YAAY,gBAAGF,KAAK,CAACG,UAAU,CAC1C,UAAAC,IAAA,EAA0DC,GAAG;EAAA,IAA1DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,MAAM,GAAAH,IAAA,CAANG,MAAM;IAAEC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAEC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAKC,KAAK,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA;EAAA,oBACpDb,KAAA,CAAAc,aAAA,CAACb,IAAI,EAAAc,QAAA,KAAKJ,KAAK;IAAEN,GAAG,EAAEA;EAAI,iBACxBL,KAAA,CAAAc,aAAA,CAACb,IAAI,CAACe,IAAI,QACPT,MAAM,eACPP,KAAA,CAAAc,aAAA,CAACb,IAAI,CAACgB,IAAI,QACPP,SAAS,EACTJ,QACQ,CAAC,EACXE,MACQ,CAAC,EACXC,IACG,CAAC;AAAA,CAEX,CAAC"}
1
+ {"version":3,"file":"PageTemplate.js","names":["React","Page","StyledPageAside","StyledPageBody","StyledPageBodyWrapper","StyledPageWrapper","PageTemplate","forwardRef","_ref","ref","children","header","footer","pane","innerPane","isAsideVisible","props","_objectWithoutProperties","_excluded","createElement","_extends","Main","open"],"sources":["../../src/PageTemplate/PageTemplate.tsx"],"sourcesContent":["import React from 'react'\nimport { Page } from '../PageLayout'\nimport {\n StyledPageAside,\n StyledPageBody,\n StyledPageBodyWrapper,\n StyledPageWrapper,\n} from './PageTemplate.styles'\nimport type { PageTemplateProps } from './PageTemplate.types'\n\nexport const PageTemplate = React.forwardRef<HTMLDivElement, PageTemplateProps>(\n (\n { children, header, footer, pane, innerPane, isAsideVisible, ...props },\n ref\n ) => (\n <Page {...props} ref={ref}>\n <StyledPageWrapper>\n {header}\n <StyledPageBodyWrapper>\n <Page.Main>\n <StyledPageBody>\n {innerPane}\n {children}\n </StyledPageBody>\n {footer}\n </Page.Main>\n <StyledPageAside open={isAsideVisible}>{pane}</StyledPageAside>\n </StyledPageBodyWrapper>\n </StyledPageWrapper>\n </Page>\n )\n)\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,eAAe;AACpC,SACEC,eAAe,EACfC,cAAc,EACdC,qBAAqB,EACrBC,iBAAiB,QACZ,uBAAuB;AAG9B,OAAO,IAAMC,YAAY,gBAAGN,KAAK,CAACO,UAAU,CAC1C,UAAAC,IAAA,EAEEC,GAAG;EAAA,IADDC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,MAAM,GAAAH,IAAA,CAANG,MAAM;IAAEC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAEC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,cAAc,GAAAP,IAAA,CAAdO,cAAc;IAAKC,KAAK,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA;EAAA,oBAGrElB,KAAA,CAAAmB,aAAA,CAAClB,IAAI,EAAAmB,QAAA,KAAKJ,KAAK;IAAEP,GAAG,EAAEA;EAAI,iBACxBT,KAAA,CAAAmB,aAAA,CAACd,iBAAiB,QACfM,MAAM,eACPX,KAAA,CAAAmB,aAAA,CAACf,qBAAqB,qBACpBJ,KAAA,CAAAmB,aAAA,CAAClB,IAAI,CAACoB,IAAI,qBACRrB,KAAA,CAAAmB,aAAA,CAAChB,cAAc,QACZW,SAAS,EACTJ,QACa,CAAC,EAChBE,MACQ,CAAC,eACZZ,KAAA,CAAAmB,aAAA,CAACjB,eAAe;IAACoB,IAAI,EAAEP;EAAe,GAAEF,IAAsB,CACzC,CACN,CACf,CAAC;AAAA,CAEX,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledPageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const StyledPageBodyWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledPageBody: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../PageLayout").PageProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
5
+ export declare const StyledPageAside: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../PageLayout").PageAsideProps & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
@@ -0,0 +1,24 @@
1
+ import styled from 'styled-components';
2
+ import { Page } from '../PageLayout';
3
+ import { StyledAsideFluidContainer, StyledAsidePanel } from '../PageLayout/PageLayout.styles';
4
+ import { getDesktopBreakpointValue, getTabletLargeBreakpointValue } from '../PageLayout/PageLayout.utils';
5
+ import { StyledFooter } from '../Panel/Panel.styles';
6
+ import { spacing } from '../_styles/spacing';
7
+ var panelWidthSmall = 360;
8
+ export var StyledPageWrapper = /*#__PURE__*/styled.div.withConfig({
9
+ displayName: "StyledPageWrapper",
10
+ componentId: "core-12_16_0__sc-1yw4cq0-0"
11
+ })(["display:flex;flex-direction:column;"]);
12
+ export var StyledPageBodyWrapper = /*#__PURE__*/styled.div.withConfig({
13
+ displayName: "StyledPageBodyWrapper",
14
+ componentId: "core-12_16_0__sc-1yw4cq0-1"
15
+ })(["display:grid;grid-template-columns:1fr auto;"]);
16
+ export var StyledPageBody = /*#__PURE__*/styled(Page.Body).withConfig({
17
+ displayName: "StyledPageBody",
18
+ componentId: "core-12_16_0__sc-1yw4cq0-2"
19
+ })(["padding-bottom:", "px;@media ", "{padding:", "px;}"], spacing.lg, getDesktopBreakpointValue(), spacing.md);
20
+ export var StyledPageAside = /*#__PURE__*/styled(Page.Aside).withConfig({
21
+ displayName: "StyledPageAside",
22
+ componentId: "core-12_16_0__sc-1yw4cq0-3"
23
+ })(["position:sticky;top:0;right:0;max-height:100vh;width:100%;height:100%;@media ", "{position:sticky;max-width:", "px;flex-basis:", "px;}", "{@media ", "{max-width:", "px;}}", "{position:sticky;top:0;right:0;box-shadow:none;animation:none;@media ", "{width:", "px;}}", "{position:fixed;bottom:0;display:flex;width:100%;max-width:400px;@media ", "{max-width:", "px;}}"], getTabletLargeBreakpointValue(), panelWidthSmall, panelWidthSmall, StyledAsideFluidContainer, getTabletLargeBreakpointValue(), panelWidthSmall, StyledAsidePanel, getTabletLargeBreakpointValue(), panelWidthSmall, StyledFooter, getTabletLargeBreakpointValue(), panelWidthSmall);
24
+ //# sourceMappingURL=PageTemplate.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageTemplate.styles.js","names":["styled","Page","StyledAsideFluidContainer","StyledAsidePanel","getDesktopBreakpointValue","getTabletLargeBreakpointValue","StyledFooter","spacing","panelWidthSmall","StyledPageWrapper","div","withConfig","displayName","componentId","StyledPageBodyWrapper","StyledPageBody","Body","lg","md","StyledPageAside","Aside"],"sources":["../../src/PageTemplate/PageTemplate.styles.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { Page } from '../PageLayout'\nimport {\n StyledAsideFluidContainer,\n StyledAsidePanel,\n} from '../PageLayout/PageLayout.styles'\nimport {\n getDesktopBreakpointValue,\n getTabletLargeBreakpointValue,\n} from '../PageLayout/PageLayout.utils'\nimport { StyledFooter } from '../Panel/Panel.styles'\nimport { spacing } from '../_styles/spacing'\n\nconst panelWidthSmall = 360\n\nexport const StyledPageWrapper = styled.div`\n display: flex;\n flex-direction: column;\n`\n\nexport const StyledPageBodyWrapper = styled.div`\n display: grid;\n grid-template-columns: 1fr auto;\n`\n\nexport const StyledPageBody = styled(Page.Body)`\n padding-bottom: ${spacing.lg}px;\n\n @media ${getDesktopBreakpointValue()} {\n padding: ${spacing.md}px;\n }\n`\n\nexport const StyledPageAside = styled(Page.Aside)`\n position: sticky;\n top: 0;\n right: 0;\n max-height: 100vh;\n width: 100%;\n height: 100%;\n\n @media ${getTabletLargeBreakpointValue()} {\n position: sticky;\n max-width: ${panelWidthSmall}px;\n flex-basis: ${panelWidthSmall}px;\n }\n\n ${StyledAsideFluidContainer} {\n @media ${getTabletLargeBreakpointValue()} {\n max-width: ${panelWidthSmall}px;\n }\n }\n\n ${StyledAsidePanel} {\n position: sticky;\n top: 0;\n right: 0;\n box-shadow: none;\n animation: none;\n\n @media ${getTabletLargeBreakpointValue()} {\n width: ${panelWidthSmall}px;\n }\n }\n\n ${StyledFooter} {\n position: fixed;\n bottom: 0;\n display: flex;\n width: 100%;\n max-width: 400px;\n\n @media ${getTabletLargeBreakpointValue()} {\n max-width: ${panelWidthSmall}px;\n }\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,IAAI,QAAQ,eAAe;AACpC,SACEC,yBAAyB,EACzBC,gBAAgB,QACX,iCAAiC;AACxC,SACEC,yBAAyB,EACzBC,6BAA6B,QACxB,gCAAgC;AACvC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,IAAMC,eAAe,GAAG,GAAG;AAE3B,OAAO,IAAMC,iBAAiB,gBAAGT,MAAM,CAACU,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,2CAG1C;AAED,OAAO,IAAMC,qBAAqB,gBAAGd,MAAM,CAACU,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oDAG9C;AAED,OAAO,IAAME,cAAc,gBAAGf,MAAM,CAACC,IAAI,CAACe,IAAI,CAAC,CAAAL,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,2DAC3BN,OAAO,CAACU,EAAE,EAEnBb,yBAAyB,CAAC,CAAC,EACvBG,OAAO,CAACW,EAAE,CAExB;AAED,OAAO,IAAMC,eAAe,gBAAGnB,MAAM,CAACC,IAAI,CAACmB,KAAK,CAAC,CAAAT,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oXAQtCR,6BAA6B,CAAC,CAAC,EAEzBG,eAAe,EACdA,eAAe,EAG7BN,yBAAyB,EAChBG,6BAA6B,CAAC,CAAC,EACzBG,eAAe,EAI9BL,gBAAgB,EAOPE,6BAA6B,CAAC,CAAC,EAC7BG,eAAe,EAI1BF,YAAY,EAOHD,6BAA6B,CAAC,CAAC,EACzBG,eAAe,CAGjC"}
@@ -5,4 +5,5 @@ export declare type PageTemplateProps = {
5
5
  footer?: ReactNode;
6
6
  pane?: ReactNode;
7
7
  innerPane?: ReactNode;
8
+ isAsideVisible?: boolean;
8
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PageTemplate.types.js","names":[],"sources":["../../src/PageTemplate/PageTemplate.types.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport type PageTemplateProps = {\n children?: ReactNode\n header?: ReactNode\n footer?: ReactNode\n pane?: ReactNode\n innerPane?: ReactNode\n}\n"],"mappings":""}
1
+ {"version":3,"file":"PageTemplate.types.js","names":[],"sources":["../../src/PageTemplate/PageTemplate.types.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport type PageTemplateProps = {\n children?: ReactNode\n header?: ReactNode\n footer?: ReactNode\n pane?: ReactNode\n innerPane?: ReactNode\n isAsideVisible?: boolean\n}\n"],"mappings":""}