@atlaskit/page-layout 4.3.1 → 4.3.2

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 (185) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/common/constants.js +19 -0
  3. package/dist/cjs/common/get-grid-state-from-storage.js +13 -0
  4. package/dist/cjs/common/get-left-panel-width.js +13 -0
  5. package/dist/cjs/common/get-left-sidebar-percentage.js +17 -0
  6. package/dist/cjs/common/get-page-layout-slot-css-selector.js +10 -0
  7. package/dist/cjs/common/get-page-layout-slot-selector.js +12 -0
  8. package/dist/cjs/common/merge-grid-state-into-storage.js +22 -0
  9. package/dist/cjs/common/remove-from-grid-state-in-storage.js +18 -0
  10. package/dist/cjs/common/resolve-dimension.js +16 -0
  11. package/dist/cjs/components/resize-control/index.js +7 -6
  12. package/dist/cjs/components/skip-links/skip-link-components.js +11 -174
  13. package/dist/cjs/components/skip-links/skip-link-wrapper.js +130 -0
  14. package/dist/cjs/components/skip-links/skip-link.js +63 -0
  15. package/dist/cjs/components/skip-links/use-custom-skip-link.js +5 -0
  16. package/dist/cjs/components/slots/banner-slot.js +6 -3
  17. package/dist/cjs/components/slots/content.js +2 -0
  18. package/dist/cjs/components/slots/internal/left-sidebar-outer.js +2 -2
  19. package/dist/cjs/components/slots/left-panel.js +6 -3
  20. package/dist/cjs/components/slots/left-sidebar-without-resize.js +4 -2
  21. package/dist/cjs/components/slots/left-sidebar.js +10 -6
  22. package/dist/cjs/components/slots/main.js +4 -2
  23. package/dist/cjs/components/slots/page-layout.js +6 -0
  24. package/dist/cjs/components/slots/right-panel.js +6 -3
  25. package/dist/cjs/components/slots/right-sidebar.js +6 -3
  26. package/dist/cjs/components/slots/top-navigation.js +6 -3
  27. package/dist/cjs/controllers/index.js +6 -3
  28. package/dist/cjs/controllers/sidebar-resize-context.js +2 -50
  29. package/dist/cjs/controllers/sidebar-resize-controller.js +2 -2
  30. package/dist/cjs/controllers/skip-link-context.js +3 -13
  31. package/dist/cjs/controllers/skip-link-controller.js +2 -2
  32. package/dist/cjs/controllers/skip-links-context.js +15 -0
  33. package/dist/cjs/controllers/use-left-sidebar-flyout-lock.js +49 -0
  34. package/dist/cjs/controllers/use-page-layout-grid.js +4 -3
  35. package/dist/cjs/controllers/use-page-layout-resize.js +20 -0
  36. package/dist/cjs/controllers/use-skip-links.js +11 -0
  37. package/dist/cjs/entry-points/sidebar-resize-context.js +4 -3
  38. package/dist/es2019/common/constants.js +19 -0
  39. package/dist/es2019/common/get-grid-state-from-storage.js +6 -0
  40. package/dist/es2019/common/get-left-panel-width.js +7 -0
  41. package/dist/es2019/common/get-left-sidebar-percentage.js +11 -0
  42. package/dist/es2019/common/get-page-layout-slot-css-selector.js +2 -0
  43. package/dist/es2019/common/get-page-layout-slot-selector.js +4 -0
  44. package/dist/es2019/common/merge-grid-state-into-storage.js +14 -0
  45. package/dist/es2019/common/remove-from-grid-state-in-storage.js +11 -0
  46. package/dist/es2019/common/resolve-dimension.js +8 -0
  47. package/dist/es2019/components/resize-control/index.js +2 -1
  48. package/dist/es2019/components/skip-links/skip-link-components.js +2 -165
  49. package/dist/es2019/components/skip-links/skip-link-wrapper.js +114 -0
  50. package/dist/es2019/components/skip-links/skip-link.js +54 -0
  51. package/dist/es2019/components/skip-links/use-custom-skip-link.js +6 -0
  52. package/dist/es2019/components/slots/banner-slot.js +4 -1
  53. package/dist/es2019/components/slots/content.js +2 -0
  54. package/dist/es2019/components/slots/internal/left-sidebar-outer.js +1 -1
  55. package/dist/es2019/components/slots/left-panel.js +4 -1
  56. package/dist/es2019/components/slots/left-sidebar-without-resize.js +3 -1
  57. package/dist/es2019/components/slots/left-sidebar.js +5 -1
  58. package/dist/es2019/components/slots/main.js +3 -1
  59. package/dist/es2019/components/slots/page-layout.js +6 -0
  60. package/dist/es2019/components/slots/right-panel.js +4 -1
  61. package/dist/es2019/components/slots/right-sidebar.js +4 -1
  62. package/dist/es2019/components/slots/top-navigation.js +4 -1
  63. package/dist/es2019/controllers/index.js +5 -2
  64. package/dist/es2019/controllers/sidebar-resize-context.js +2 -45
  65. package/dist/es2019/controllers/sidebar-resize-controller.js +1 -1
  66. package/dist/es2019/controllers/skip-link-context.js +2 -9
  67. package/dist/es2019/controllers/skip-link-controller.js +1 -1
  68. package/dist/es2019/controllers/skip-links-context.js +8 -0
  69. package/dist/es2019/controllers/use-left-sidebar-flyout-lock.js +39 -0
  70. package/dist/es2019/controllers/use-page-layout-grid.js +2 -1
  71. package/dist/es2019/controllers/use-page-layout-resize.js +12 -0
  72. package/dist/es2019/controllers/use-skip-links.js +3 -0
  73. package/dist/es2019/entry-points/sidebar-resize-context.js +2 -1
  74. package/dist/esm/common/constants.js +19 -0
  75. package/dist/esm/common/get-grid-state-from-storage.js +6 -0
  76. package/dist/esm/common/get-left-panel-width.js +7 -0
  77. package/dist/esm/common/get-left-sidebar-percentage.js +11 -0
  78. package/dist/esm/common/get-page-layout-slot-css-selector.js +4 -0
  79. package/dist/esm/common/get-page-layout-slot-selector.js +5 -0
  80. package/dist/esm/common/merge-grid-state-into-storage.js +15 -0
  81. package/dist/esm/common/remove-from-grid-state-in-storage.js +11 -0
  82. package/dist/esm/common/resolve-dimension.js +10 -0
  83. package/dist/esm/components/resize-control/index.js +2 -1
  84. package/dist/esm/components/skip-links/skip-link-components.js +2 -179
  85. package/dist/esm/components/skip-links/skip-link-wrapper.js +127 -0
  86. package/dist/esm/components/skip-links/skip-link.js +55 -0
  87. package/dist/esm/components/skip-links/use-custom-skip-link.js +6 -0
  88. package/dist/esm/components/slots/banner-slot.js +4 -1
  89. package/dist/esm/components/slots/content.js +2 -0
  90. package/dist/esm/components/slots/internal/left-sidebar-outer.js +1 -1
  91. package/dist/esm/components/slots/left-panel.js +4 -1
  92. package/dist/esm/components/slots/left-sidebar-without-resize.js +3 -1
  93. package/dist/esm/components/slots/left-sidebar.js +5 -1
  94. package/dist/esm/components/slots/main.js +3 -1
  95. package/dist/esm/components/slots/page-layout.js +6 -0
  96. package/dist/esm/components/slots/right-panel.js +4 -1
  97. package/dist/esm/components/slots/right-sidebar.js +4 -1
  98. package/dist/esm/components/slots/top-navigation.js +4 -1
  99. package/dist/esm/controllers/index.js +5 -2
  100. package/dist/esm/controllers/sidebar-resize-context.js +2 -50
  101. package/dist/esm/controllers/sidebar-resize-controller.js +1 -1
  102. package/dist/esm/controllers/skip-link-context.js +2 -11
  103. package/dist/esm/controllers/skip-link-controller.js +1 -1
  104. package/dist/esm/controllers/skip-links-context.js +8 -0
  105. package/dist/esm/controllers/use-left-sidebar-flyout-lock.js +43 -0
  106. package/dist/esm/controllers/use-page-layout-grid.js +2 -1
  107. package/dist/esm/controllers/use-page-layout-resize.js +13 -0
  108. package/dist/esm/controllers/use-skip-links.js +5 -0
  109. package/dist/esm/entry-points/sidebar-resize-context.js +2 -1
  110. package/dist/types/common/constants.d.ts +18 -0
  111. package/dist/types/common/get-grid-state-from-storage.d.ts +1 -0
  112. package/dist/types/common/get-left-panel-width.d.ts +1 -0
  113. package/dist/types/common/get-left-sidebar-percentage.d.ts +1 -0
  114. package/dist/types/common/get-page-layout-slot-css-selector.d.ts +1 -0
  115. package/dist/types/common/get-page-layout-slot-selector.d.ts +3 -0
  116. package/dist/types/common/merge-grid-state-into-storage.d.ts +1 -0
  117. package/dist/types/common/remove-from-grid-state-in-storage.d.ts +1 -0
  118. package/dist/types/common/resolve-dimension.d.ts +2 -0
  119. package/dist/types/common/types.d.ts +14 -2
  120. package/dist/types/components/resize-control/types.d.ts +1 -1
  121. package/dist/types/components/skip-links/skip-link-components.d.ts +2 -20
  122. package/dist/types/components/skip-links/skip-link-wrapper.d.ts +14 -0
  123. package/dist/types/components/skip-links/skip-link.d.ts +10 -0
  124. package/dist/types/components/skip-links/use-custom-skip-link.d.ts +5 -0
  125. package/dist/types/components/slots/banner-slot.d.ts +2 -0
  126. package/dist/types/components/slots/content.d.ts +2 -0
  127. package/dist/types/components/slots/left-panel.d.ts +2 -0
  128. package/dist/types/components/slots/left-sidebar-without-resize.d.ts +2 -0
  129. package/dist/types/components/slots/left-sidebar.d.ts +2 -0
  130. package/dist/types/components/slots/main.d.ts +2 -0
  131. package/dist/types/components/slots/page-layout.d.ts +2 -0
  132. package/dist/types/components/slots/right-panel.d.ts +2 -0
  133. package/dist/types/components/slots/right-sidebar.d.ts +2 -0
  134. package/dist/types/components/slots/top-navigation.d.ts +2 -0
  135. package/dist/types/controllers/index.d.ts +5 -2
  136. package/dist/types/controllers/sidebar-resize-context.d.ts +1 -39
  137. package/dist/types/controllers/skip-link-context.d.ts +1 -4
  138. package/dist/types/controllers/skip-links-context.d.ts +3 -0
  139. package/dist/types/controllers/types.d.ts +13 -0
  140. package/dist/types/controllers/use-left-sidebar-flyout-lock.d.ts +20 -0
  141. package/dist/types/controllers/use-page-layout-resize.d.ts +16 -0
  142. package/dist/types/controllers/use-skip-links.d.ts +2 -0
  143. package/dist/types/entry-points/sidebar-resize-context.d.ts +3 -2
  144. package/dist/types/index.d.ts +2 -1
  145. package/dist/types-ts4.5/common/constants.d.ts +18 -0
  146. package/dist/types-ts4.5/common/get-grid-state-from-storage.d.ts +1 -0
  147. package/dist/types-ts4.5/common/get-left-panel-width.d.ts +1 -0
  148. package/dist/types-ts4.5/common/get-left-sidebar-percentage.d.ts +1 -0
  149. package/dist/types-ts4.5/common/get-page-layout-slot-css-selector.d.ts +1 -0
  150. package/dist/types-ts4.5/common/get-page-layout-slot-selector.d.ts +3 -0
  151. package/dist/types-ts4.5/common/merge-grid-state-into-storage.d.ts +1 -0
  152. package/dist/types-ts4.5/common/remove-from-grid-state-in-storage.d.ts +1 -0
  153. package/dist/types-ts4.5/common/resolve-dimension.d.ts +2 -0
  154. package/dist/types-ts4.5/common/types.d.ts +14 -2
  155. package/dist/types-ts4.5/components/resize-control/types.d.ts +1 -1
  156. package/dist/types-ts4.5/components/skip-links/skip-link-components.d.ts +2 -20
  157. package/dist/types-ts4.5/components/skip-links/skip-link-wrapper.d.ts +14 -0
  158. package/dist/types-ts4.5/components/skip-links/skip-link.d.ts +10 -0
  159. package/dist/types-ts4.5/components/skip-links/use-custom-skip-link.d.ts +5 -0
  160. package/dist/types-ts4.5/components/slots/banner-slot.d.ts +2 -0
  161. package/dist/types-ts4.5/components/slots/content.d.ts +2 -0
  162. package/dist/types-ts4.5/components/slots/left-panel.d.ts +2 -0
  163. package/dist/types-ts4.5/components/slots/left-sidebar-without-resize.d.ts +2 -0
  164. package/dist/types-ts4.5/components/slots/left-sidebar.d.ts +2 -0
  165. package/dist/types-ts4.5/components/slots/main.d.ts +2 -0
  166. package/dist/types-ts4.5/components/slots/page-layout.d.ts +2 -0
  167. package/dist/types-ts4.5/components/slots/right-panel.d.ts +2 -0
  168. package/dist/types-ts4.5/components/slots/right-sidebar.d.ts +2 -0
  169. package/dist/types-ts4.5/components/slots/top-navigation.d.ts +2 -0
  170. package/dist/types-ts4.5/controllers/index.d.ts +5 -2
  171. package/dist/types-ts4.5/controllers/sidebar-resize-context.d.ts +1 -39
  172. package/dist/types-ts4.5/controllers/skip-link-context.d.ts +1 -4
  173. package/dist/types-ts4.5/controllers/skip-links-context.d.ts +3 -0
  174. package/dist/types-ts4.5/controllers/types.d.ts +13 -0
  175. package/dist/types-ts4.5/controllers/use-left-sidebar-flyout-lock.d.ts +20 -0
  176. package/dist/types-ts4.5/controllers/use-page-layout-resize.d.ts +16 -0
  177. package/dist/types-ts4.5/controllers/use-skip-links.d.ts +2 -0
  178. package/dist/types-ts4.5/entry-points/sidebar-resize-context.d.ts +3 -2
  179. package/dist/types-ts4.5/index.d.ts +2 -1
  180. package/package.json +8 -8
  181. package/dist/cjs/common/utils.js +0 -66
  182. package/dist/es2019/common/utils.js +0 -55
  183. package/dist/esm/common/utils.js +0 -60
  184. package/dist/types/common/utils.d.ts +0 -12
  185. package/dist/types-ts4.5/common/utils.d.ts +0 -12
@@ -0,0 +1 @@
1
+ export declare const getGridStateFromStorage: (key: string) => any;
@@ -0,0 +1 @@
1
+ export declare const getLeftPanelWidth: () => number;
@@ -0,0 +1 @@
1
+ export declare const getLeftSidebarPercentage: (currentWidth: number, maxWidth: number) => number;
@@ -0,0 +1 @@
1
+ export declare const getPageLayoutSlotCSSSelector: (slotName: string) => string;
@@ -0,0 +1,3 @@
1
+ export declare const getPageLayoutSlotSelector: (slotName: string) => {
2
+ "data-ds--page-layout--slot": string;
3
+ };
@@ -0,0 +1 @@
1
+ export declare const mergeGridStateIntoStorage: (key: string, value: any) => void;
@@ -0,0 +1 @@
1
+ export declare const removeFromGridStateInStorage: (key: string, secondKey?: string) => void;
@@ -0,0 +1,2 @@
1
+ import type { DimensionNames } from './types';
2
+ export declare const resolveDimension: (key: DimensionNames, dimension?: number, shouldPersist?: boolean) => any;
@@ -1,6 +1,6 @@
1
1
  import type { ElementType, ReactElement, ReactNode } from 'react';
2
2
  import type { ResizeButtonProps } from '../components/resize-control/types';
3
- import type { LeftSidebarState } from '../controllers/sidebar-resize-context';
3
+ import type { LeftSidebarState } from '../controllers/types';
4
4
  interface SlotProps {
5
5
  /**
6
6
  * Sets the position to fixed.
@@ -17,6 +17,9 @@ interface SlotProps {
17
17
  id?: string;
18
18
  skipLinkTitle?: string;
19
19
  }
20
+ /**
21
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
22
+ */
20
23
  export interface SlotHeightProps extends SlotProps {
21
24
  /**
22
25
  * It saves the height in local storage.
@@ -27,6 +30,9 @@ export interface SlotHeightProps extends SlotProps {
27
30
  */
28
31
  height?: number;
29
32
  }
33
+ /**
34
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
35
+ */
30
36
  export interface SlotWidthProps extends SlotProps {
31
37
  /**
32
38
  * It saves the width in local storage.
@@ -106,7 +112,13 @@ export type SidebarResizeControllerProps = {
106
112
  onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
107
113
  };
108
114
  export type DimensionNames = 'leftPanelWidth' | 'bannerHeight' | 'topNavigationHeight' | 'leftSidebarWidth' | 'leftSidebarFlyoutWidth' | 'rightSidebarWidth' | 'rightPanelWidth';
115
+ /**
116
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
117
+ */
109
118
  export type Dimensions = Partial<Record<DimensionNames, number>>;
119
+ /**
120
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
121
+ */
110
122
  export interface PageLayoutProps extends SidebarResizeControllerProps {
111
123
  skipLinksLabel?: string;
112
124
  /**
@@ -114,4 +126,4 @@ export interface PageLayoutProps extends SidebarResizeControllerProps {
114
126
  */
115
127
  testId?: string;
116
128
  }
117
- export type { LeftSidebarState } from '../controllers/sidebar-resize-context';
129
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { ButtonHTMLAttributes, ElementType, ReactElement } from 'react';
2
- import type { LeftSidebarState } from '../../controllers/sidebar-resize-context';
2
+ import type { LeftSidebarState } from '../../controllers/types';
3
3
  export type ResizeButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  isLeftSidebarCollapsed: boolean;
5
5
  label: string;
@@ -1,20 +1,2 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { SkipLinkWrapperProps } from './types';
8
- /**
9
- * The default label will be used when the `skipLinksLabel` attribute is not
10
- * provided or the attribute is an empty string. If a string comprised only of
11
- * spaces is provided, the skip link heading element will be removed, but the
12
- * default label will still be used in `title` attribute of the skip links
13
- * themselves.
14
- */
15
- export declare const SkipLinkWrapper: ({ skipLinksLabel, }: SkipLinkWrapperProps) => jsx.JSX.Element | null;
16
- export declare const SkipLink: ({ href, children, isFocusable, }: {
17
- href: string;
18
- children: ReactNode;
19
- isFocusable: boolean;
20
- }) => jsx.JSX.Element;
1
+ export { SkipLinkWrapper } from './skip-link-wrapper';
2
+ export { SkipLink } from './skip-link';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import type { ReactNode } from 'react';
6
+ import type { SkipLinkWrapperProps } from './types';
7
+ /**
8
+ * The default label will be used when the `skipLinksLabel` attribute is not
9
+ * provided or the attribute is an empty string. If a string comprised only of
10
+ * spaces is provided, the skip link heading element will be removed, but the
11
+ * default label will still be used in `title` attribute of the skip links
12
+ * themselves.
13
+ */
14
+ export declare const SkipLinkWrapper: ({ skipLinksLabel }: SkipLinkWrapperProps) => ReactNode;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ export declare const SkipLink: ({ href, children, isFocusable, }: {
7
+ href: string;
8
+ children: ReactNode;
9
+ isFocusable: boolean;
10
+ }) => ReactNode;
@@ -1,2 +1,7 @@
1
1
  import { type SkipLinkData } from '../../controllers';
2
+ /**
3
+ * __useCustomSkipLink__
4
+ *
5
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
6
+ */
2
7
  export declare const useCustomSkipLink: (id: SkipLinkData["id"], skipLinkTitle: SkipLinkData["skipLinkTitle"], listIndex?: SkipLinkData["listIndex"]) => void;
@@ -7,6 +7,8 @@ import type { SlotHeightProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const Banner: (props: SlotHeightProps) => jsx.JSX.Element;
12
14
  export default Banner;
@@ -21,6 +21,8 @@ interface ContentProps {
21
21
  *
22
22
  * - [Examples](https://atlassian.design/components/page-layout/examples)
23
23
  * - [Code](https://atlassian.design/components/page-layout/code)
24
+ *
25
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
24
26
  */
25
27
  declare const Content: (props: ContentProps) => jsx.JSX.Element;
26
28
  export default Content;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const LeftPanel: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default LeftPanel;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const LeftSidebarWithoutResize: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default LeftSidebarWithoutResize;
@@ -12,6 +12,8 @@ import type { LeftSidebarProps } from '../../common/types';
12
12
  *
13
13
  * - [Examples](https://atlassian.design/components/page-layout/examples)
14
14
  * - [Code](https://atlassian.design/components/page-layout/code)
15
+ *
16
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
15
17
  */
16
18
  declare const LeftSidebar: (props: LeftSidebarProps) => jsx.JSX.Element;
17
19
  export default LeftSidebar;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const Main: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default Main;
@@ -7,6 +7,8 @@ import type { PageLayoutProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => jsx.JSX.Element;
12
14
  export default PageLayout;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const RightPanel: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default RightPanel;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const RightSidebar: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default RightSidebar;
@@ -7,6 +7,8 @@ import type { SlotHeightProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const TopNavigation: (props: SlotHeightProps) => jsx.JSX.Element;
12
14
  export default TopNavigation;
@@ -1,6 +1,9 @@
1
1
  export type { SkipLinkData } from './types';
2
2
  export { default as publishGridState } from './use-page-layout-grid';
3
- export { SidebarResizeContext, usePageLayoutResize, useLeftSidebarFlyoutLock, } from './sidebar-resize-context';
3
+ export { SidebarResizeContext } from './sidebar-resize-context';
4
+ export { usePageLayoutResize } from './use-page-layout-resize';
5
+ export { useLeftSidebarFlyoutLock } from './use-left-sidebar-flyout-lock';
4
6
  export { SidebarResizeController } from './sidebar-resize-controller';
5
- export { useSkipLinks, useSkipLink } from './skip-link-context';
7
+ export { useSkipLink } from './skip-link-context';
8
+ export { useSkipLinks } from './use-skip-links';
6
9
  export { SkipLinksController } from './skip-link-controller';
@@ -1,14 +1,5 @@
1
1
  import { type Context, type KeyboardEvent, type MouseEvent } from 'react';
2
- export type LeftSidebarState = {
3
- isFlyoutOpen: boolean;
4
- isResizing: boolean;
5
- isLeftSidebarCollapsed: boolean;
6
- leftSidebarWidth: number;
7
- lastLeftSidebarWidth: number;
8
- flyoutLockCount: number;
9
- isFixed: boolean;
10
- hasInit: boolean;
11
- };
2
+ import { type LeftSidebarState } from './types';
12
3
  export type SidebarResizeContextValue = {
13
4
  isLeftSidebarCollapsed: boolean;
14
5
  expandLeftSidebar: () => void;
@@ -22,32 +13,3 @@ export type SidebarResizeContextValue = {
22
13
  setLeftSidebarState: (value: LeftSidebarState | ((prevState: LeftSidebarState) => LeftSidebarState)) => void;
23
14
  };
24
15
  export declare const SidebarResizeContext: Context<SidebarResizeContextValue>;
25
- export declare const usePageLayoutResize: () => {
26
- isLeftSidebarCollapsed: boolean;
27
- expandLeftSidebar: () => void;
28
- collapseLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
29
- /**
30
- * Conditionally expands or collapses the left sidebar based on the current state.
31
- * This is aware of our flyout mode in mobile as well.
32
- */
33
- toggleLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
34
- leftSidebarState: LeftSidebarState;
35
- };
36
- /**
37
- * _**WARNING:**_ This hook is intended as a temporary solution and
38
- * is likely to be removed in a future version of page-layout.
39
- *
40
- * ---
41
- *
42
- * This hook will prevent the left sidebar from automatically collapsing
43
- * when it is in a flyout state.
44
- *
45
- * The intended use case for this hook is to allow popup menus in the
46
- * left sidebar to be usable while it is in a flyout state.
47
- *
48
- * ## Usage
49
- * The intended usage is to use this hook within the popup component
50
- * you are rendering. This way the left sidebar will be locked for
51
- * as long as the popup is open.
52
- */
53
- export declare const useLeftSidebarFlyoutLock: () => void;
@@ -1,5 +1,2 @@
1
- import { type Context } from 'react';
2
- import { type SkipLinkContextProps, type SkipLinkData } from './types';
3
- export declare const SkipLinksContext: Context<SkipLinkContextProps>;
4
- export declare const useSkipLinks: () => SkipLinkContextProps;
1
+ import { type SkipLinkData } from './types';
5
2
  export declare const useSkipLink: (id?: SkipLinkData["id"], skipLinkTitle?: SkipLinkData["skipLinkTitle"]) => void;
@@ -0,0 +1,3 @@
1
+ import { type Context } from 'react';
2
+ import { type SkipLinkContextProps } from './types';
3
+ export declare const SkipLinksContext: Context<SkipLinkContextProps>;
@@ -17,3 +17,16 @@ export type SkipLinkData = {
17
17
  */
18
18
  listIndex?: number;
19
19
  };
20
+ /**
21
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
22
+ */
23
+ export type LeftSidebarState = {
24
+ isFlyoutOpen: boolean;
25
+ isResizing: boolean;
26
+ isLeftSidebarCollapsed: boolean;
27
+ leftSidebarWidth: number;
28
+ lastLeftSidebarWidth: number;
29
+ flyoutLockCount: number;
30
+ isFixed: boolean;
31
+ hasInit: boolean;
32
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * _**WARNING:**_ This hook is intended as a temporary solution and
3
+ * is likely to be removed in a future version of page-layout.
4
+ *
5
+ * ---
6
+ *
7
+ * This hook will prevent the left sidebar from automatically collapsing
8
+ * when it is in a flyout state.
9
+ *
10
+ * The intended use case for this hook is to allow popup menus in the
11
+ * left sidebar to be usable while it is in a flyout state.
12
+ *
13
+ * ## Usage
14
+ * The intended usage is to use this hook within the popup component
15
+ * you are rendering. This way the left sidebar will be locked for
16
+ * as long as the popup is open.
17
+ *
18
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
19
+ */
20
+ export declare const useLeftSidebarFlyoutLock: () => void;
@@ -0,0 +1,16 @@
1
+ import { type KeyboardEvent, type MouseEvent } from 'react';
2
+ import { type LeftSidebarState } from './types';
3
+ /**
4
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
5
+ */
6
+ export declare const usePageLayoutResize: () => {
7
+ isLeftSidebarCollapsed: boolean;
8
+ expandLeftSidebar: () => void;
9
+ collapseLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
10
+ /**
11
+ * Conditionally expands or collapses the left sidebar based on the current state.
12
+ * This is aware of our flyout mode in mobile as well.
13
+ */
14
+ toggleLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
15
+ leftSidebarState: LeftSidebarState;
16
+ };
@@ -0,0 +1,2 @@
1
+ import { type SkipLinkContextProps } from './types';
2
+ export declare const useSkipLinks: () => SkipLinkContextProps;
@@ -1,2 +1,3 @@
1
- export { usePageLayoutResize, useLeftSidebarFlyoutLock, } from '../controllers/sidebar-resize-context';
2
- export type { LeftSidebarState } from '../controllers/sidebar-resize-context';
1
+ export { usePageLayoutResize } from '../controllers/use-page-layout-resize';
2
+ export { useLeftSidebarFlyoutLock } from '../controllers/use-left-sidebar-flyout-lock';
3
+ export type { LeftSidebarState } from '../controllers/types';
@@ -1,4 +1,5 @@
1
1
  export { PageLayout, Main, Content, RightSidebar, LeftSidebar, LeftSidebarWithoutResize, RightPanel, LeftPanel, Banner, TopNavigation, useCustomSkipLink, } from './components';
2
2
  export { LEFT_PANEL_WIDTH, RIGHT_PANEL_WIDTH, BANNER_HEIGHT, TOP_NAVIGATION_HEIGHT, LEFT_SIDEBAR_WIDTH, RIGHT_SIDEBAR_WIDTH, } from './common/constants';
3
3
  export { usePageLayoutResize, useLeftSidebarFlyoutLock } from './controllers';
4
- export type { SlotHeightProps, SlotWidthProps, Dimensions, LeftSidebarState, PageLayoutProps, } from './common/types';
4
+ export type { SlotHeightProps, SlotWidthProps, Dimensions, PageLayoutProps } from './common/types';
5
+ export type { LeftSidebarState } from './controllers/types';
@@ -33,10 +33,28 @@ export declare const RESIZE_CONTROL_SELECTOR = "data-resize-control";
33
33
  export declare const PAGE_LAYOUT_SLOT_SELECTOR = "data-ds--page-layout--slot";
34
34
  export declare const DEFAULT_I18N_PROPS_SKIP_LINKS = "Skip to:";
35
35
  export declare const PAGE_LAYOUT_CONTAINER_SELECTOR = "data-layout-container";
36
+ /**
37
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
38
+ */
36
39
  export declare const LEFT_PANEL_WIDTH: 'var(--leftPanelWidth, 0px)';
40
+ /**
41
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
42
+ */
37
43
  export declare const RIGHT_PANEL_WIDTH: 'var(--rightPanelWidth, 0px)';
44
+ /**
45
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
46
+ */
38
47
  export declare const LEFT_SIDEBAR_WIDTH: 'var(--leftSidebarWidth, 0px)';
48
+ /**
49
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
50
+ */
39
51
  export declare const RIGHT_SIDEBAR_WIDTH: 'var(--rightSidebarWidth, 0px)';
52
+ /**
53
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
54
+ */
40
55
  export declare const TOP_NAVIGATION_HEIGHT: 'var(--topNavigationHeight, 0px)';
56
+ /**
57
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
58
+ */
41
59
  export declare const BANNER_HEIGHT: 'var(--bannerHeight, 0px)';
42
60
  export declare const LEFT_SIDEBAR_FLYOUT_WIDTH: 'var(--leftSidebarFlyoutWidth, 240px)';
@@ -0,0 +1 @@
1
+ export declare const getGridStateFromStorage: (key: string) => any;
@@ -0,0 +1 @@
1
+ export declare const getLeftPanelWidth: () => number;
@@ -0,0 +1 @@
1
+ export declare const getLeftSidebarPercentage: (currentWidth: number, maxWidth: number) => number;
@@ -0,0 +1 @@
1
+ export declare const getPageLayoutSlotCSSSelector: (slotName: string) => string;
@@ -0,0 +1,3 @@
1
+ export declare const getPageLayoutSlotSelector: (slotName: string) => {
2
+ "data-ds--page-layout--slot": string;
3
+ };
@@ -0,0 +1 @@
1
+ export declare const mergeGridStateIntoStorage: (key: string, value: any) => void;
@@ -0,0 +1 @@
1
+ export declare const removeFromGridStateInStorage: (key: string, secondKey?: string) => void;
@@ -0,0 +1,2 @@
1
+ import type { DimensionNames } from './types';
2
+ export declare const resolveDimension: (key: DimensionNames, dimension?: number, shouldPersist?: boolean) => any;
@@ -1,6 +1,6 @@
1
1
  import type { ElementType, ReactElement, ReactNode } from 'react';
2
2
  import type { ResizeButtonProps } from '../components/resize-control/types';
3
- import type { LeftSidebarState } from '../controllers/sidebar-resize-context';
3
+ import type { LeftSidebarState } from '../controllers/types';
4
4
  interface SlotProps {
5
5
  /**
6
6
  * Sets the position to fixed.
@@ -17,6 +17,9 @@ interface SlotProps {
17
17
  id?: string;
18
18
  skipLinkTitle?: string;
19
19
  }
20
+ /**
21
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
22
+ */
20
23
  export interface SlotHeightProps extends SlotProps {
21
24
  /**
22
25
  * It saves the height in local storage.
@@ -27,6 +30,9 @@ export interface SlotHeightProps extends SlotProps {
27
30
  */
28
31
  height?: number;
29
32
  }
33
+ /**
34
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
35
+ */
30
36
  export interface SlotWidthProps extends SlotProps {
31
37
  /**
32
38
  * It saves the width in local storage.
@@ -106,7 +112,13 @@ export type SidebarResizeControllerProps = {
106
112
  onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
107
113
  };
108
114
  export type DimensionNames = 'leftPanelWidth' | 'bannerHeight' | 'topNavigationHeight' | 'leftSidebarWidth' | 'leftSidebarFlyoutWidth' | 'rightSidebarWidth' | 'rightPanelWidth';
115
+ /**
116
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
117
+ */
109
118
  export type Dimensions = Partial<Record<DimensionNames, number>>;
119
+ /**
120
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
121
+ */
110
122
  export interface PageLayoutProps extends SidebarResizeControllerProps {
111
123
  skipLinksLabel?: string;
112
124
  /**
@@ -114,4 +126,4 @@ export interface PageLayoutProps extends SidebarResizeControllerProps {
114
126
  */
115
127
  testId?: string;
116
128
  }
117
- export type { LeftSidebarState } from '../controllers/sidebar-resize-context';
129
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { ButtonHTMLAttributes, ElementType, ReactElement } from 'react';
2
- import type { LeftSidebarState } from '../../controllers/sidebar-resize-context';
2
+ import type { LeftSidebarState } from '../../controllers/types';
3
3
  export type ResizeButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
4
4
  isLeftSidebarCollapsed: boolean;
5
5
  label: string;
@@ -1,20 +1,2 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { SkipLinkWrapperProps } from './types';
8
- /**
9
- * The default label will be used when the `skipLinksLabel` attribute is not
10
- * provided or the attribute is an empty string. If a string comprised only of
11
- * spaces is provided, the skip link heading element will be removed, but the
12
- * default label will still be used in `title` attribute of the skip links
13
- * themselves.
14
- */
15
- export declare const SkipLinkWrapper: ({ skipLinksLabel, }: SkipLinkWrapperProps) => jsx.JSX.Element | null;
16
- export declare const SkipLink: ({ href, children, isFocusable, }: {
17
- href: string;
18
- children: ReactNode;
19
- isFocusable: boolean;
20
- }) => jsx.JSX.Element;
1
+ export { SkipLinkWrapper } from './skip-link-wrapper';
2
+ export { SkipLink } from './skip-link';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import type { ReactNode } from 'react';
6
+ import type { SkipLinkWrapperProps } from './types';
7
+ /**
8
+ * The default label will be used when the `skipLinksLabel` attribute is not
9
+ * provided or the attribute is an empty string. If a string comprised only of
10
+ * spaces is provided, the skip link heading element will be removed, but the
11
+ * default label will still be used in `title` attribute of the skip links
12
+ * themselves.
13
+ */
14
+ export declare const SkipLinkWrapper: ({ skipLinksLabel }: SkipLinkWrapperProps) => ReactNode;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ export declare const SkipLink: ({ href, children, isFocusable, }: {
7
+ href: string;
8
+ children: ReactNode;
9
+ isFocusable: boolean;
10
+ }) => ReactNode;
@@ -1,2 +1,7 @@
1
1
  import { type SkipLinkData } from '../../controllers';
2
+ /**
3
+ * __useCustomSkipLink__
4
+ *
5
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
6
+ */
2
7
  export declare const useCustomSkipLink: (id: SkipLinkData["id"], skipLinkTitle: SkipLinkData["skipLinkTitle"], listIndex?: SkipLinkData["listIndex"]) => void;
@@ -7,6 +7,8 @@ import type { SlotHeightProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const Banner: (props: SlotHeightProps) => jsx.JSX.Element;
12
14
  export default Banner;
@@ -21,6 +21,8 @@ interface ContentProps {
21
21
  *
22
22
  * - [Examples](https://atlassian.design/components/page-layout/examples)
23
23
  * - [Code](https://atlassian.design/components/page-layout/code)
24
+ *
25
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
24
26
  */
25
27
  declare const Content: (props: ContentProps) => jsx.JSX.Element;
26
28
  export default Content;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const LeftPanel: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default LeftPanel;
@@ -7,6 +7,8 @@ import type { SlotWidthProps } from '../../common/types';
7
7
  *
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
+ *
11
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
10
12
  */
11
13
  declare const LeftSidebarWithoutResize: (props: SlotWidthProps) => jsx.JSX.Element;
12
14
  export default LeftSidebarWithoutResize;
@@ -12,6 +12,8 @@ import type { LeftSidebarProps } from '../../common/types';
12
12
  *
13
13
  * - [Examples](https://atlassian.design/components/page-layout/examples)
14
14
  * - [Code](https://atlassian.design/components/page-layout/code)
15
+ *
16
+ * @deprecated `@atlaskit/page-layout` is deprecated. Use `@atlaskit/navigation-system` instead.
15
17
  */
16
18
  declare const LeftSidebar: (props: LeftSidebarProps) => jsx.JSX.Element;
17
19
  export default LeftSidebar;