@atlaskit/page-layout 1.2.8 → 1.3.1

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 (127) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/__perf__/utils/perf-example.tsx +1 -1
  3. package/__perf__/utils/product-integration/atlassian-navigation.tsx +1 -1
  4. package/__perf__/utils/product-integration/notifications-popup.tsx +1 -1
  5. package/__perf__/utils/product-integration/sample-footer.tsx +1 -1
  6. package/__perf__/utils/product-integration/sample-header.tsx +1 -1
  7. package/__perf__/utils/product-integration/side-navigation.tsx +1 -1
  8. package/dist/cjs/components/resize-control/grab-area.js +6 -6
  9. package/dist/cjs/components/resize-control/index.js +7 -7
  10. package/dist/cjs/components/resize-control/resize-button.js +7 -7
  11. package/dist/cjs/components/resize-control/shadow.js +4 -4
  12. package/dist/cjs/components/skip-links/skip-link-components.js +10 -10
  13. package/dist/cjs/components/slots/banner.js +6 -6
  14. package/dist/cjs/components/slots/content.js +3 -3
  15. package/dist/cjs/components/slots/internal/left-sidebar-inner.js +7 -7
  16. package/dist/cjs/components/slots/internal/left-sidebar-outer.js +9 -9
  17. package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +7 -7
  18. package/dist/cjs/components/slots/internal/slot-focus-ring.js +4 -4
  19. package/dist/cjs/components/slots/left-panel.js +6 -6
  20. package/dist/cjs/components/slots/left-sidebar-without-resize.js +4 -4
  21. package/dist/cjs/components/slots/left-sidebar.js +6 -6
  22. package/dist/cjs/components/slots/main.js +7 -7
  23. package/dist/cjs/components/slots/page-layout.js +5 -5
  24. package/dist/cjs/components/slots/right-panel.js +6 -6
  25. package/dist/cjs/components/slots/right-sidebar.js +9 -9
  26. package/dist/cjs/components/slots/top-navigation.js +6 -6
  27. package/dist/cjs/version.json +1 -1
  28. package/dist/es2019/components/resize-control/grab-area.js +1 -1
  29. package/dist/es2019/components/resize-control/index.js +1 -1
  30. package/dist/es2019/components/resize-control/resize-button.js +1 -1
  31. package/dist/es2019/components/resize-control/shadow.js +1 -1
  32. package/dist/es2019/components/skip-links/skip-link-components.js +1 -1
  33. package/dist/es2019/components/slots/banner.js +1 -1
  34. package/dist/es2019/components/slots/content.js +1 -1
  35. package/dist/es2019/components/slots/internal/left-sidebar-inner.js +1 -1
  36. package/dist/es2019/components/slots/internal/left-sidebar-outer.js +1 -1
  37. package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +1 -1
  38. package/dist/es2019/components/slots/internal/slot-focus-ring.js +1 -1
  39. package/dist/es2019/components/slots/left-panel.js +1 -1
  40. package/dist/es2019/components/slots/left-sidebar-without-resize.js +1 -1
  41. package/dist/es2019/components/slots/left-sidebar.js +1 -1
  42. package/dist/es2019/components/slots/main.js +1 -1
  43. package/dist/es2019/components/slots/page-layout.js +1 -1
  44. package/dist/es2019/components/slots/right-panel.js +1 -1
  45. package/dist/es2019/components/slots/right-sidebar.js +1 -1
  46. package/dist/es2019/components/slots/top-navigation.js +1 -1
  47. package/dist/es2019/version.json +1 -1
  48. package/dist/esm/components/resize-control/grab-area.js +1 -1
  49. package/dist/esm/components/resize-control/index.js +1 -1
  50. package/dist/esm/components/resize-control/resize-button.js +1 -1
  51. package/dist/esm/components/resize-control/shadow.js +1 -1
  52. package/dist/esm/components/skip-links/skip-link-components.js +1 -1
  53. package/dist/esm/components/slots/banner.js +1 -1
  54. package/dist/esm/components/slots/content.js +1 -1
  55. package/dist/esm/components/slots/internal/left-sidebar-inner.js +1 -1
  56. package/dist/esm/components/slots/internal/left-sidebar-outer.js +1 -1
  57. package/dist/esm/components/slots/internal/resizable-children-wrapper.js +1 -1
  58. package/dist/esm/components/slots/internal/slot-focus-ring.js +1 -1
  59. package/dist/esm/components/slots/left-panel.js +1 -1
  60. package/dist/esm/components/slots/left-sidebar-without-resize.js +1 -1
  61. package/dist/esm/components/slots/left-sidebar.js +1 -1
  62. package/dist/esm/components/slots/main.js +1 -1
  63. package/dist/esm/components/slots/page-layout.js +1 -1
  64. package/dist/esm/components/slots/right-panel.js +1 -1
  65. package/dist/esm/components/slots/right-sidebar.js +1 -1
  66. package/dist/esm/components/slots/top-navigation.js +1 -1
  67. package/dist/esm/version.json +1 -1
  68. package/dist/types/components/resize-control/grab-area.d.ts +2 -1
  69. package/dist/types/components/resize-control/index.d.ts +2 -2
  70. package/dist/types/components/resize-control/resize-button.d.ts +2 -2
  71. package/dist/types/components/resize-control/shadow.d.ts +2 -2
  72. package/dist/types/components/skip-links/skip-link-components.d.ts +3 -2
  73. package/dist/types/components/slots/banner.d.ts +2 -2
  74. package/dist/types/components/slots/content.d.ts +2 -1
  75. package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +2 -1
  76. package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +2 -1
  77. package/dist/types/components/slots/internal/slot-focus-ring.d.ts +2 -1
  78. package/dist/types/components/slots/left-panel.d.ts +2 -2
  79. package/dist/types/components/slots/left-sidebar-without-resize.d.ts +2 -2
  80. package/dist/types/components/slots/left-sidebar.d.ts +2 -2
  81. package/dist/types/components/slots/main.d.ts +2 -2
  82. package/dist/types/components/slots/page-layout.d.ts +2 -2
  83. package/dist/types/components/slots/right-panel.d.ts +2 -2
  84. package/dist/types/components/slots/right-sidebar.d.ts +2 -2
  85. package/dist/types/components/slots/top-navigation.d.ts +2 -2
  86. package/dist/types-ts4.0/common/constants.d.ts +47 -0
  87. package/dist/types-ts4.0/common/hooks/index.d.ts +2 -0
  88. package/dist/types-ts4.0/common/hooks/use-is-sidebar-collapsing.d.ts +2 -0
  89. package/dist/types-ts4.0/common/hooks/use-is-sidebar-dragging.d.ts +2 -0
  90. package/dist/types-ts4.0/common/safe-local-storage.d.ts +2 -0
  91. package/dist/types-ts4.0/common/types.d.ts +117 -0
  92. package/dist/types-ts4.0/common/utils.d.ts +13 -0
  93. package/dist/types-ts4.0/components/index.d.ts +12 -0
  94. package/dist/types-ts4.0/components/resize-control/grab-area.d.ts +9 -0
  95. package/dist/types-ts4.0/components/resize-control/index.d.ts +4 -0
  96. package/dist/types-ts4.0/components/resize-control/resize-button.d.ts +4 -0
  97. package/dist/types-ts4.0/components/resize-control/shadow.d.ts +6 -0
  98. package/dist/types-ts4.0/components/resize-control/types.d.ts +25 -0
  99. package/dist/types-ts4.0/components/skip-links/index.d.ts +2 -0
  100. package/dist/types-ts4.0/components/skip-links/skip-link-components.d.ts +11 -0
  101. package/dist/types-ts4.0/components/skip-links/types.d.ts +8 -0
  102. package/dist/types-ts4.0/components/skip-links/use-custom-skip-link.d.ts +2 -0
  103. package/dist/types-ts4.0/components/slots/banner.d.ts +12 -0
  104. package/dist/types-ts4.0/components/slots/content.d.ts +23 -0
  105. package/dist/types-ts4.0/components/slots/internal/left-sidebar-inner.d.ts +10 -0
  106. package/dist/types-ts4.0/components/slots/internal/left-sidebar-outer.d.ts +13 -0
  107. package/dist/types-ts4.0/components/slots/internal/resizable-children-wrapper.d.ts +11 -0
  108. package/dist/types-ts4.0/components/slots/internal/slot-focus-ring.d.ts +20 -0
  109. package/dist/types-ts4.0/components/slots/left-panel.d.ts +12 -0
  110. package/dist/types-ts4.0/components/slots/left-sidebar-without-resize.d.ts +12 -0
  111. package/dist/types-ts4.0/components/slots/left-sidebar.d.ts +12 -0
  112. package/dist/types-ts4.0/components/slots/main.d.ts +12 -0
  113. package/dist/types-ts4.0/components/slots/page-layout.d.ts +12 -0
  114. package/dist/types-ts4.0/components/slots/right-panel.d.ts +12 -0
  115. package/dist/types-ts4.0/components/slots/right-sidebar.d.ts +12 -0
  116. package/dist/types-ts4.0/components/slots/slot-dimensions.d.ts +7 -0
  117. package/dist/types-ts4.0/components/slots/top-navigation.d.ts +12 -0
  118. package/dist/types-ts4.0/controllers/index.d.ts +6 -0
  119. package/dist/types-ts4.0/controllers/sidebar-resize-context.d.ts +42 -0
  120. package/dist/types-ts4.0/controllers/sidebar-resize-controller.d.ts +3 -0
  121. package/dist/types-ts4.0/controllers/skip-link-context.d.ts +5 -0
  122. package/dist/types-ts4.0/controllers/skip-link-controller.d.ts +2 -0
  123. package/dist/types-ts4.0/controllers/types.d.ts +22 -0
  124. package/dist/types-ts4.0/controllers/use-page-layout-grid.d.ts +3 -0
  125. package/dist/types-ts4.0/controllers/use-update-css-vars.d.ts +2 -0
  126. package/dist/types-ts4.0/index.d.ts +4 -0
  127. package/package.json +17 -10
@@ -8,7 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
 
9
9
  /** @jsx jsx */
10
10
  import { useContext, useEffect, useRef } from 'react';
11
- import { jsx } from '@emotion/core';
11
+ import { jsx } from '@emotion/react';
12
12
  import { COLLAPSED_LEFT_SIDEBAR_WIDTH, DEFAULT_LEFT_SIDEBAR_WIDTH, FLYOUT_DELAY, RESIZE_BUTTON_SELECTOR, VAR_LEFT_SIDEBAR_FLYOUT, VAR_LEFT_SIDEBAR_WIDTH } from '../../common/constants';
13
13
  import { getGridStateFromStorage, mergeGridStateIntoStorage, resolveDimension } from '../../common/utils';
14
14
  import { publishGridState, SidebarResizeContext, useSkipLink } from '../../controllers';
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { useContext } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { prefersReducedMotion } from '@atlaskit/motion/accessibility';
7
7
  import { easeOut } from '@atlaskit/motion/curves';
8
8
  import { COLLAPSED_LEFT_SIDEBAR_WIDTH, DEFAULT_LEFT_SIDEBAR_FLYOUT_WIDTH, TRANSITION_DURATION, VAR_LEFT_SIDEBAR_FLYOUT } from '../../common/constants';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
 
4
4
  /** @jsx jsx */
5
5
  import { Fragment } from 'react';
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { BANNER, BANNER_HEIGHT, CONTENT, DEFAULT_I18N_PROPS_SKIP_LINKS, LEFT_PANEL, LEFT_PANEL_WIDTH, PAGE_LAYOUT_CONTAINER_SELECTOR, RIGHT_PANEL, RIGHT_PANEL_WIDTH, TOP_NAVIGATION, TOP_NAVIGATION_HEIGHT } from '../../common/constants';
8
8
  import { SidebarResizeController, SkipLinksController } from '../../controllers';
9
9
  import { SkipLinkWrapper } from '../skip-links';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
 
4
4
  /** @jsx jsx */
5
5
  import { useEffect } from 'react';
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { DEFAULT_RIGHT_PANEL_WIDTH, RIGHT_PANEL, RIGHT_PANEL_WIDTH, VAR_RIGHT_PANEL_WIDTH } from '../../common/constants';
8
8
  import { getPageLayoutSlotSelector, resolveDimension } from '../../common/utils';
9
9
  import { publishGridState, useSkipLink } from '../../controllers';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
 
4
4
  /** @jsx jsx */
5
5
  import { useEffect } from 'react';
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { BANNER_HEIGHT, DEFAULT_RIGHT_SIDEBAR_WIDTH, RIGHT_PANEL_WIDTH, RIGHT_SIDEBAR_WIDTH, TOP_NAVIGATION_HEIGHT, VAR_RIGHT_SIDEBAR_WIDTH } from '../../common/constants';
8
8
  import { getPageLayoutSlotSelector, resolveDimension } from '../../common/utils';
9
9
  import { publishGridState, useSkipLink } from '../../controllers';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
 
4
4
  /** @jsx jsx */
5
5
  import { useEffect } from 'react';
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { BANNER_HEIGHT, DEFAULT_TOP_NAVIGATION_HEIGHT, LEFT_PANEL_WIDTH, RIGHT_PANEL_WIDTH, TOP_NAVIGATION, TOP_NAVIGATION_HEIGHT, VAR_TOP_NAVIGATION_HEIGHT } from '../../common/constants';
8
8
  import { getPageLayoutSlotSelector, resolveDimension } from '../../common/utils';
9
9
  import { publishGridState, useSkipLink } from '../../controllers';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.2.8",
3
+ "version": "1.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,8 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import { ComponentProps } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  export declare type GrabAreaProps = {
4
5
  testId?: string;
5
6
  isLeftSidebarCollapsed: boolean;
6
7
  } & ComponentProps<'button'>;
7
- declare const GrabArea: ({ testId, isLeftSidebarCollapsed, ...rest }: GrabAreaProps) => JSX.Element;
8
+ declare const GrabArea: ({ testId, isLeftSidebarCollapsed, ...rest }: GrabAreaProps) => jsx.JSX.Element;
8
9
  export default GrabArea;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { ResizeControlProps } from './types';
3
- declare const ResizeControl: ({ testId, overrides, resizeButtonLabel, resizeGrabAreaLabel, onResizeStart, onResizeEnd, }: ResizeControlProps) => JSX.Element;
3
+ declare const ResizeControl: ({ testId, overrides, resizeButtonLabel, resizeGrabAreaLabel, onResizeStart, onResizeEnd, }: ResizeControlProps) => jsx.JSX.Element;
4
4
  export default ResizeControl;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { ResizeButtonProps } from './types';
3
- declare const ResizeButton: ({ isLeftSidebarCollapsed, label, testId, ...props }: ResizeButtonProps) => JSX.Element;
3
+ declare const ResizeButton: ({ isLeftSidebarCollapsed, label, testId, ...props }: ResizeButtonProps) => jsx.JSX.Element;
4
4
  export default ResizeButton;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
3
  declare const Shadow: ({ testId }: {
4
4
  testId?: string | undefined;
5
- }) => JSX.Element;
5
+ }) => jsx.JSX.Element;
6
6
  export default Shadow;
@@ -1,10 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import { SkipLinkWrapperProps } from './types';
4
- export declare const SkipLinkWrapper: ({ skipLinksLabel }: SkipLinkWrapperProps) => JSX.Element | null;
5
+ export declare const SkipLinkWrapper: ({ skipLinksLabel }: SkipLinkWrapperProps) => jsx.JSX.Element | null;
5
6
  export declare const SkipLink: ({ href, children, isFocusable, title, }: {
6
7
  href: string;
7
8
  children: ReactNode;
8
9
  isFocusable: boolean;
9
10
  title: string;
10
- }) => JSX.Element;
11
+ }) => jsx.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotHeightProps } from '../../common/types';
3
3
  /**
4
4
  * __Banner__
@@ -8,5 +8,5 @@ import { SlotHeightProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const Banner: (props: SlotHeightProps) => JSX.Element;
11
+ declare const Banner: (props: SlotHeightProps) => jsx.JSX.Element;
12
12
  export default Banner;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  interface ContentProps {
4
5
  /**
5
6
  * React children
@@ -18,5 +19,5 @@ interface ContentProps {
18
19
  * - [Examples](https://atlassian.design/components/page-layout/examples)
19
20
  * - [Code](https://atlassian.design/components/page-layout/code)
20
21
  */
21
- declare const Content: (props: ContentProps) => JSX.Element;
22
+ declare const Content: (props: ContentProps) => jsx.JSX.Element;
22
23
  export default Content;
@@ -1,9 +1,10 @@
1
1
  /** @jsx jsx */
2
2
  import type { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  declare type LeftSidebarInnerProps = {
4
5
  children: ReactNode;
5
6
  isFixed?: boolean;
6
7
  isFlyoutOpen?: boolean;
7
8
  };
8
- declare const LeftSidebarInner: ({ children, isFixed, isFlyoutOpen, }: LeftSidebarInnerProps) => JSX.Element;
9
+ declare const LeftSidebarInner: ({ children, isFixed, isFlyoutOpen, }: LeftSidebarInnerProps) => jsx.JSX.Element;
9
10
  export default LeftSidebarInner;
@@ -1,10 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import type { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  declare type ResizableChildrenWrapperProps = {
4
5
  children: ReactNode;
5
6
  isFlyoutOpen?: boolean;
6
7
  isLeftSidebarCollapsed?: boolean;
7
8
  hasCollapsedState?: boolean;
8
9
  };
9
- declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, }: ResizableChildrenWrapperProps) => JSX.Element;
10
+ declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, }: ResizableChildrenWrapperProps) => jsx.JSX.Element;
10
11
  export default ResizableChildrenWrapper;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import type { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  declare type SlotFocusRingProps = {
4
5
  children: (props: {
5
6
  className: string;
@@ -15,5 +16,5 @@ declare type SlotFocusRingProps = {
15
16
  * 2. We cannot wrap `children` in `FocusRing`,
16
17
  * because there's no guarantee the passed child takes `className`.
17
18
  */
18
- declare const SlotFocusRing: ({ children, isSidebar }: SlotFocusRingProps) => JSX.Element;
19
+ declare const SlotFocusRing: ({ children, isSidebar }: SlotFocusRingProps) => jsx.JSX.Element;
19
20
  export default SlotFocusRing;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotWidthProps } from '../../common/types';
3
3
  /**
4
4
  * __Left panel__
@@ -8,5 +8,5 @@ import { SlotWidthProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const LeftPanel: (props: SlotWidthProps) => JSX.Element;
11
+ declare const LeftPanel: (props: SlotWidthProps) => jsx.JSX.Element;
12
12
  export default LeftPanel;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotWidthProps } from '../../common/types';
3
3
  /**
4
4
  * __Left sidebar without resize__
@@ -8,5 +8,5 @@ import { SlotWidthProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const LeftSidebarWithoutResize: (props: SlotWidthProps) => JSX.Element;
11
+ declare const LeftSidebarWithoutResize: (props: SlotWidthProps) => jsx.JSX.Element;
12
12
  export default LeftSidebarWithoutResize;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { LeftSidebarProps } from '../../common/types';
3
3
  /**
4
4
  * __Left sidebar__
@@ -8,5 +8,5 @@ import { LeftSidebarProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const LeftSidebar: (props: LeftSidebarProps) => JSX.Element;
11
+ declare const LeftSidebar: (props: LeftSidebarProps) => jsx.JSX.Element;
12
12
  export default LeftSidebar;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotWidthProps } from '../../common/types';
3
3
  /**
4
4
  * __Main__
@@ -8,5 +8,5 @@ import { SlotWidthProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const Main: (props: SlotWidthProps) => JSX.Element;
11
+ declare const Main: (props: SlotWidthProps) => jsx.JSX.Element;
12
12
  export default Main;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { PageLayoutProps } from '../../common/types';
3
3
  /**
4
4
  * __Page layout__
@@ -8,5 +8,5 @@ import { PageLayoutProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => JSX.Element;
11
+ declare const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => jsx.JSX.Element;
12
12
  export default PageLayout;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotWidthProps } from '../../common/types';
3
3
  /**
4
4
  * __Right panel__
@@ -8,5 +8,5 @@ import { SlotWidthProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const RightPanel: (props: SlotWidthProps) => JSX.Element;
11
+ declare const RightPanel: (props: SlotWidthProps) => jsx.JSX.Element;
12
12
  export default RightPanel;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotWidthProps } from '../../common/types';
3
3
  /**
4
4
  * __Right sidebar__
@@ -8,5 +8,5 @@ import { SlotWidthProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const RightSidebar: (props: SlotWidthProps) => JSX.Element;
11
+ declare const RightSidebar: (props: SlotWidthProps) => jsx.JSX.Element;
12
12
  export default RightSidebar;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import { SlotHeightProps } from '../../common/types';
3
3
  /**
4
4
  * __Top navigation__
@@ -8,5 +8,5 @@ import { SlotHeightProps } from '../../common/types';
8
8
  * - [Examples](https://atlassian.design/components/page-layout/examples)
9
9
  * - [Code](https://atlassian.design/components/page-layout/code)
10
10
  */
11
- declare const TopNavigation: (props: SlotHeightProps) => JSX.Element;
11
+ declare const TopNavigation: (props: SlotHeightProps) => jsx.JSX.Element;
12
12
  export default TopNavigation;
@@ -0,0 +1,47 @@
1
+ export declare const VAR_LEFT_PANEL_WIDTH = "leftPanelWidth";
2
+ export declare const VAR_LEFT_SIDEBAR_WIDTH = "leftSidebarWidth";
3
+ export declare const VAR_RIGHT_SIDEBAR_WIDTH = "rightSidebarWidth";
4
+ export declare const VAR_RIGHT_PANEL_WIDTH = "rightPanelWidth";
5
+ export declare const VAR_TOP_NAVIGATION_HEIGHT = "topNavigationHeight";
6
+ export declare const VAR_BANNER_HEIGHT = "bannerHeight";
7
+ export declare const VAR_LEFT_SIDEBAR_FLYOUT = "leftSidebarFlyoutWidth";
8
+ export declare const DIMENSIONS: string[];
9
+ export declare const LEFT_PANEL = "left-panel";
10
+ export declare const RIGHT_PANEL = "right-panel";
11
+ export declare const BANNER = "banner";
12
+ export declare const TOP_NAVIGATION = "top-navigation";
13
+ export declare const CONTENT = "content";
14
+ export declare const MAIN = "main";
15
+ export declare const LEFT_SIDEBAR = "left-sidebar";
16
+ export declare const RIGHT_SIDEBAR = "right-sidebar";
17
+ export declare const DEFAULT_BANNER_HEIGHT = 56;
18
+ export declare const DEFAULT_TOP_NAVIGATION_HEIGHT = 56;
19
+ export declare const DEFAULT_LEFT_SIDEBAR_WIDTH = 240;
20
+ export declare const DEFAULT_RIGHT_SIDEBAR_WIDTH = 280;
21
+ export declare const DEFAULT_RIGHT_PANEL_WIDTH = 368;
22
+ export declare const DEFAULT_LEFT_PANEL_WIDTH = 368;
23
+ export declare const COLLAPSED_LEFT_SIDEBAR_WIDTH = 20;
24
+ export declare const MIN_LEFT_SIDEBAR_WIDTH = 80;
25
+ export declare const DEFAULT_LEFT_SIDEBAR_FLYOUT_WIDTH = 240;
26
+ export declare const MIN_LEFT_SIDEBAR_DRAG_THRESHOLD = 200;
27
+ export declare const TRANSITION_DURATION = 300;
28
+ export declare const FLYOUT_DELAY = 200;
29
+ export declare const LEFT_SIDEBAR_EXPANDED_WIDTH = "expandedLeftSidebarWidth";
30
+ export declare const PAGE_LAYOUT_LS_KEY = "DS_PAGE_LAYOUT_UI_STATE";
31
+ export declare const IS_SIDEBAR_DRAGGING = "data-is-sidebar-dragging";
32
+ export declare const IS_SIDEBAR_COLLAPSING = "data-is-sidebar-collapsing";
33
+ export declare const IS_FLYOUT_OPEN = "data-is-flyout-open";
34
+ export declare const GRAB_AREA_LINE_SELECTOR = "data-grab-area-line";
35
+ export declare const GRAB_AREA_SELECTOR = "data-grab-area";
36
+ export declare const RESIZE_BUTTON_SELECTOR = "data-resize-button";
37
+ export declare const RESIZE_CONTROL_SELECTOR = "data-resize-control";
38
+ export declare const PAGE_LAYOUT_SLOT_SELECTOR = "data-ds--page-layout--slot";
39
+ export declare const DEFAULT_I18N_PROPS_SKIP_LINKS = "Skip to:";
40
+ export declare const PAGE_LAYOUT_CONTAINER_SELECTOR = "data-layout-container";
41
+ export declare const LEFT_PANEL_WIDTH: string;
42
+ export declare const RIGHT_PANEL_WIDTH: string;
43
+ export declare const LEFT_SIDEBAR_WIDTH: string;
44
+ export declare const RIGHT_SIDEBAR_WIDTH: string;
45
+ export declare const TOP_NAVIGATION_HEIGHT: string;
46
+ export declare const BANNER_HEIGHT: string;
47
+ export declare const LEFT_SIDEBAR_FLYOUT_WIDTH: string;
@@ -0,0 +1,2 @@
1
+ export { default as useIsSidebarCollapsing } from './use-is-sidebar-collapsing';
2
+ export { default as useIsSidebarDragging } from './use-is-sidebar-dragging';
@@ -0,0 +1,2 @@
1
+ declare const useIsSidebarCollapsing: () => boolean;
2
+ export default useIsSidebarCollapsing;
@@ -0,0 +1,2 @@
1
+ declare const useIsSidebarDragging: () => boolean;
2
+ export default useIsSidebarDragging;
@@ -0,0 +1,2 @@
1
+ declare const safeLocalStorage: () => Storage;
2
+ export default safeLocalStorage;
@@ -0,0 +1,117 @@
1
+ import { ElementType, ReactElement, ReactNode } from 'react';
2
+ import { ResizeButtonProps } from '../components/resize-control/types';
3
+ import { LeftSidebarState } from '../controllers/sidebar-resize-context';
4
+ interface SlotProps {
5
+ /**
6
+ * Sets positon to fixed.
7
+ */
8
+ isFixed?: boolean;
9
+ /**
10
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests .
11
+ */
12
+ testId?: string;
13
+ /**
14
+ * React Children!
15
+ */
16
+ children: ReactNode;
17
+ id?: string;
18
+ skipLinkTitle?: string;
19
+ }
20
+ export interface SlotHeightProps extends SlotProps {
21
+ /**
22
+ * It save height in local storage.
23
+ */
24
+ shouldPersistHeight?: boolean;
25
+ /**
26
+ * Height!
27
+ */
28
+ height?: number;
29
+ }
30
+ export interface SlotWidthProps extends SlotProps {
31
+ /**
32
+ * It save width in local storage.
33
+ */
34
+ shouldPersistWidth?: boolean;
35
+ /**
36
+ * Width!
37
+ */
38
+ width?: number;
39
+ }
40
+ export interface LeftSidebarProps extends SlotWidthProps {
41
+ /**
42
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
43
+ */
44
+ testId?: string;
45
+ /**
46
+ * You can override prop(s) for the mentioned component(s).
47
+ */
48
+ overrides?: {
49
+ ResizeButton?: {
50
+ render?: (Component: ElementType<ResizeButtonProps>, props: ResizeButtonProps) => ReactElement;
51
+ };
52
+ };
53
+ /**
54
+ * Display label for grab area. This will be announced to the screenreaders when the grab area receives focus
55
+ */
56
+ resizeGrabAreaLabel?: string;
57
+ /**
58
+ * Display label for resize button.
59
+ */
60
+ resizeButtonLabel?: string;
61
+ /**
62
+ * Called when left-sidebar is collapsed.
63
+ */
64
+ onCollapse?: () => void;
65
+ /**
66
+ * Called when left-sidebar is expanded.
67
+ */
68
+ onExpand?: () => void;
69
+ /**
70
+ * Called when left-sidebar resize starts using mouse or touch.
71
+ */
72
+ onResizeStart?: (leftSidebarState: LeftSidebarState) => void;
73
+ /**
74
+ * Called when left-sidebar resize ends using mouse or touch.
75
+ */
76
+ onResizeEnd?: (leftSidebarState: LeftSidebarState) => void;
77
+ /**
78
+ * Called when left-sidebar is collapsed and mouse leaves the area.
79
+ */
80
+ onFlyoutCollapse?: () => void;
81
+ /**
82
+ * Called after flyout delay when left-sidebar is collapsed and mouse enters the area.
83
+ */
84
+ onFlyoutExpand?: () => void;
85
+ /**
86
+ * Controls whether the LeftSidebar mounts in a collapsed state, this will override the setting in localStorage
87
+ */
88
+ collapsedState?: 'collapsed' | 'expanded';
89
+ /**
90
+ * Controls the width when LeftSidebar mounts, this will override the setting in localStorage
91
+ */
92
+ width?: number;
93
+ }
94
+ export declare type SidebarResizeControllerProps = {
95
+ /**
96
+ * Called when left-sidebar expanded.
97
+ */
98
+ onLeftSidebarExpand?: (leftSidebarState: LeftSidebarState) => void;
99
+ /**
100
+ * Called when left-sidebar collapsed.
101
+ */
102
+ onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
103
+ };
104
+ export declare type DimensionNames = 'leftPanelWidth' | 'bannerHeight' | 'topNavigationHeight' | 'leftSidebarWidth' | 'leftSidebarFlyoutWidth' | 'rightSidebarWidth' | 'rightPanelWidth';
105
+ export declare type Dimensions = Partial<Record<DimensionNames, number>>;
106
+ export interface PageLayoutProps extends SidebarResizeControllerProps {
107
+ /**
108
+ * React children!
109
+ */
110
+ children: ReactNode;
111
+ skipLinksLabel?: string;
112
+ /**
113
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
114
+ */
115
+ testId?: string;
116
+ }
117
+ export type { LeftSidebarState } from '../controllers/sidebar-resize-context';
@@ -0,0 +1,13 @@
1
+ import { DimensionNames, Dimensions } from './types';
2
+ declare const emptyGridState: Dimensions;
3
+ declare const mergeGridStateIntoStorage: (key: string, value: any) => void;
4
+ declare const getGridStateFromStorage: (key: string) => any;
5
+ declare const removeFromGridStateInStorage: (key: string, secondKey?: string | undefined) => void;
6
+ declare const resolveDimension: (key: DimensionNames, dimension?: number, shouldPersist?: boolean) => any;
7
+ declare const getLeftPanelWidth: () => number;
8
+ declare const getLeftSidebarPercentage: (currentWidth: number, maxWidth: number) => number;
9
+ declare const getPageLayoutSlotSelector: (slotName: string) => {
10
+ "data-ds--page-layout--slot": string;
11
+ };
12
+ declare const getPageLayoutSlotCSSSelector: (slotName: string) => string;
13
+ export { emptyGridState, mergeGridStateIntoStorage, getGridStateFromStorage, removeFromGridStateInStorage, resolveDimension, getLeftPanelWidth, getLeftSidebarPercentage, getPageLayoutSlotSelector, getPageLayoutSlotCSSSelector, };
@@ -0,0 +1,12 @@
1
+ export { default as PageLayout } from './slots/page-layout';
2
+ export { default as Main } from './slots/main';
3
+ export { default as RightPanel } from './slots/right-panel';
4
+ export { default as LeftPanel } from './slots/left-panel';
5
+ export { default as RightSidebar } from './slots/right-sidebar';
6
+ export { default as LeftSidebar } from './slots/left-sidebar';
7
+ export { default as LeftSidebarWithoutResize } from './slots/left-sidebar-without-resize';
8
+ export { default as Banner } from './slots/banner';
9
+ export { default as TopNavigation } from './slots/top-navigation';
10
+ export { default as Content } from './slots/content';
11
+ export { default as ResizeControl } from './resize-control';
12
+ export { useCustomSkipLink } from './skip-links';
@@ -0,0 +1,9 @@
1
+ /** @jsx jsx */
2
+ import { ComponentProps } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ export declare type GrabAreaProps = {
5
+ testId?: string;
6
+ isLeftSidebarCollapsed: boolean;
7
+ } & ComponentProps<'button'>;
8
+ declare const GrabArea: ({ testId, isLeftSidebarCollapsed, ...rest }: GrabAreaProps) => jsx.JSX.Element;
9
+ export default GrabArea;
@@ -0,0 +1,4 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { ResizeControlProps } from './types';
3
+ declare const ResizeControl: ({ testId, overrides, resizeButtonLabel, resizeGrabAreaLabel, onResizeStart, onResizeEnd, }: ResizeControlProps) => jsx.JSX.Element;
4
+ export default ResizeControl;
@@ -0,0 +1,4 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { ResizeButtonProps } from './types';
3
+ declare const ResizeButton: ({ isLeftSidebarCollapsed, label, testId, ...props }: ResizeButtonProps) => jsx.JSX.Element;
4
+ export default ResizeButton;
@@ -0,0 +1,6 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ declare const Shadow: ({ testId }: {
4
+ testId?: string | undefined;
5
+ }) => jsx.JSX.Element;
6
+ export default Shadow;
@@ -0,0 +1,25 @@
1
+ import { ButtonHTMLAttributes, ElementType, ReactElement } from 'react';
2
+ import { LeftSidebarState } from '../../controllers/sidebar-resize-context';
3
+ export declare type ResizeButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
4
+ isLeftSidebarCollapsed: boolean;
5
+ label: string;
6
+ testId?: string;
7
+ };
8
+ export declare type ResizeControlProps = {
9
+ testId?: string;
10
+ overrides?: {
11
+ ResizeButton?: {
12
+ render?: (Component: ElementType<ResizeButtonProps>, props: ResizeButtonProps) => ReactElement;
13
+ };
14
+ };
15
+ resizeGrabAreaLabel?: string;
16
+ resizeButtonLabel?: string;
17
+ onCollapse?: (leftSidebarState: LeftSidebarState) => void;
18
+ onExpand?: (leftSidebarState: LeftSidebarState) => void;
19
+ onResizeStart?: (leftSidebarState: LeftSidebarState) => void;
20
+ onResizeEnd?: (leftSidebarState: LeftSidebarState) => void;
21
+ onFlyoutCollapse?: () => void;
22
+ onFlyoutExpand?: () => void;
23
+ leftSidebarState: LeftSidebarState;
24
+ setLeftSidebarState: (leftSidebarState: LeftSidebarState) => void;
25
+ };
@@ -0,0 +1,2 @@
1
+ export { SkipLinkWrapper, SkipLink } from './skip-link-components';
2
+ export { useCustomSkipLink } from './use-custom-skip-link';
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { SkipLinkWrapperProps } from './types';
5
+ export declare const SkipLinkWrapper: ({ skipLinksLabel }: SkipLinkWrapperProps) => jsx.JSX.Element | null;
6
+ export declare const SkipLink: ({ href, children, isFocusable, title, }: {
7
+ href: string;
8
+ children: ReactNode;
9
+ isFocusable: boolean;
10
+ title: string;
11
+ }) => jsx.JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare type SkipLinkData = {
2
+ id: string;
3
+ name: string;
4
+ ref?: undefined;
5
+ };
6
+ export declare type SkipLinkWrapperProps = {
7
+ skipLinksLabel: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ import { SkipLinkData } from '../../controllers';
2
+ export declare const useCustomSkipLink: (id: SkipLinkData['id'], skipLinkTitle: SkipLinkData['skipLinkTitle'], listIndex?: SkipLinkData['listIndex']) => void;
@@ -0,0 +1,12 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { SlotHeightProps } from '../../common/types';
3
+ /**
4
+ * __Banner__
5
+ *
6
+ * Provides a slot for a Banner within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
11
+ declare const Banner: (props: SlotHeightProps) => jsx.JSX.Element;
12
+ export default Banner;