@atlaskit/page-layout 1.2.4 → 1.2.7

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 (95) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/__perf__/utils/perf-example.tsx +2 -2
  3. package/__perf__/utils/product-integration/{AtlassianNavigation.tsx → atlassian-navigation.tsx} +4 -4
  4. package/__perf__/utils/product-integration/{Create.tsx → create.tsx} +2 -1
  5. package/__perf__/utils/product-integration/{HelpPopup.tsx → help-popup.tsx} +1 -0
  6. package/__perf__/utils/product-integration/{NotificationsPopup.tsx → notifications-popup.tsx} +0 -0
  7. package/__perf__/utils/product-integration/{ProfilePopup.tsx → profile-popup.tsx} +2 -1
  8. package/__perf__/utils/product-integration/{SampleFooter.tsx → sample-footer.tsx} +1 -0
  9. package/__perf__/utils/product-integration/{SampleHeader.tsx → sample-header.tsx} +2 -0
  10. package/__perf__/utils/product-integration/{SideNavigation.tsx → side-navigation.tsx} +2 -2
  11. package/dist/cjs/common/safe-local-storage.js +1 -0
  12. package/dist/cjs/components/resize-control/grab-area.js +4 -2
  13. package/dist/cjs/components/resize-control/index.js +21 -7
  14. package/dist/cjs/components/resize-control/resize-button.js +4 -2
  15. package/dist/cjs/components/resize-control/shadow.js +2 -1
  16. package/dist/cjs/components/skip-links/skip-link-components.js +4 -2
  17. package/dist/cjs/components/slots/banner.js +8 -0
  18. package/dist/cjs/components/slots/content.js +8 -0
  19. package/dist/cjs/components/slots/internal/left-sidebar-inner.js +2 -1
  20. package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +2 -1
  21. package/dist/cjs/components/slots/left-panel.js +8 -0
  22. package/dist/cjs/components/slots/left-sidebar-without-resize.js +9 -0
  23. package/dist/cjs/components/slots/left-sidebar.js +10 -1
  24. package/dist/cjs/components/slots/main.js +8 -0
  25. package/dist/cjs/components/slots/page-layout.js +8 -0
  26. package/dist/cjs/components/slots/right-panel.js +8 -0
  27. package/dist/cjs/components/slots/right-sidebar.js +8 -0
  28. package/dist/cjs/components/slots/top-navigation.js +8 -0
  29. package/dist/cjs/controllers/sidebar-resize-context.js +8 -7
  30. package/dist/cjs/controllers/sidebar-resize-controller.js +7 -4
  31. package/dist/cjs/controllers/skip-link-context.js +6 -3
  32. package/dist/cjs/controllers/skip-link-controller.js +2 -1
  33. package/dist/cjs/version.json +1 -1
  34. package/dist/es2019/common/safe-local-storage.js +1 -0
  35. package/dist/es2019/components/resize-control/grab-area.js +4 -2
  36. package/dist/es2019/components/resize-control/index.js +19 -7
  37. package/dist/es2019/components/resize-control/resize-button.js +4 -2
  38. package/dist/es2019/components/resize-control/shadow.js +2 -1
  39. package/dist/es2019/components/skip-links/skip-link-components.js +6 -2
  40. package/dist/es2019/components/slots/banner.js +8 -0
  41. package/dist/es2019/components/slots/content.js +8 -0
  42. package/dist/es2019/components/slots/internal/left-sidebar-inner.js +2 -1
  43. package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +2 -1
  44. package/dist/es2019/components/slots/left-panel.js +8 -0
  45. package/dist/es2019/components/slots/left-sidebar-without-resize.js +8 -0
  46. package/dist/es2019/components/slots/left-sidebar.js +12 -1
  47. package/dist/es2019/components/slots/main.js +8 -0
  48. package/dist/es2019/components/slots/page-layout.js +8 -0
  49. package/dist/es2019/components/slots/right-panel.js +8 -0
  50. package/dist/es2019/components/slots/right-sidebar.js +8 -0
  51. package/dist/es2019/components/slots/top-navigation.js +8 -0
  52. package/dist/es2019/controllers/sidebar-resize-context.js +4 -5
  53. package/dist/es2019/controllers/sidebar-resize-controller.js +5 -3
  54. package/dist/es2019/controllers/skip-link-context.js +2 -3
  55. package/dist/es2019/controllers/skip-link-controller.js +2 -1
  56. package/dist/es2019/version.json +1 -1
  57. package/dist/esm/common/safe-local-storage.js +1 -0
  58. package/dist/esm/components/resize-control/grab-area.js +4 -2
  59. package/dist/esm/components/resize-control/index.js +20 -7
  60. package/dist/esm/components/resize-control/resize-button.js +4 -2
  61. package/dist/esm/components/resize-control/shadow.js +2 -1
  62. package/dist/esm/components/skip-links/skip-link-components.js +6 -2
  63. package/dist/esm/components/slots/banner.js +8 -0
  64. package/dist/esm/components/slots/content.js +8 -0
  65. package/dist/esm/components/slots/internal/left-sidebar-inner.js +2 -1
  66. package/dist/esm/components/slots/internal/resizable-children-wrapper.js +2 -1
  67. package/dist/esm/components/slots/left-panel.js +8 -0
  68. package/dist/esm/components/slots/left-sidebar-without-resize.js +8 -0
  69. package/dist/esm/components/slots/left-sidebar.js +12 -1
  70. package/dist/esm/components/slots/main.js +8 -0
  71. package/dist/esm/components/slots/page-layout.js +8 -0
  72. package/dist/esm/components/slots/right-panel.js +8 -0
  73. package/dist/esm/components/slots/right-sidebar.js +8 -0
  74. package/dist/esm/components/slots/top-navigation.js +8 -0
  75. package/dist/esm/controllers/sidebar-resize-context.js +4 -5
  76. package/dist/esm/controllers/sidebar-resize-controller.js +5 -3
  77. package/dist/esm/controllers/skip-link-context.js +2 -3
  78. package/dist/esm/controllers/skip-link-controller.js +2 -1
  79. package/dist/esm/version.json +1 -1
  80. package/dist/types/common/types.d.ts +61 -21
  81. package/dist/types/common/utils.d.ts +1 -1
  82. package/dist/types/components/slots/banner.d.ts +8 -0
  83. package/dist/types/components/slots/content.d.ts +12 -2
  84. package/dist/types/components/slots/left-panel.d.ts +8 -0
  85. package/dist/types/components/slots/left-sidebar-without-resize.d.ts +8 -0
  86. package/dist/types/components/slots/left-sidebar.d.ts +8 -0
  87. package/dist/types/components/slots/main.d.ts +8 -0
  88. package/dist/types/components/slots/page-layout.d.ts +8 -0
  89. package/dist/types/components/slots/right-panel.d.ts +8 -0
  90. package/dist/types/components/slots/right-sidebar.d.ts +8 -0
  91. package/dist/types/components/slots/top-navigation.d.ts +8 -0
  92. package/dist/types/controllers/sidebar-resize-context.d.ts +1 -1
  93. package/dist/types/controllers/types.d.ts +9 -3
  94. package/package.json +12 -7
  95. package/report.api.md +219 -0
@@ -4,6 +4,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
4
4
 
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
+ /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
8
+
7
9
  /** @jsx jsx */
8
10
  import { useContext, useEffect, useRef } from 'react';
9
11
  import { jsx } from '@emotion/core';
@@ -15,6 +17,14 @@ import LeftSidebarInner from './internal/left-sidebar-inner';
15
17
  import LeftSidebarOuter from './internal/left-sidebar-outer';
16
18
  import ResizableChildrenWrapper from './internal/resizable-children-wrapper';
17
19
  import SlotDimensions from './slot-dimensions';
20
+ /**
21
+ * __Left sidebar__
22
+ *
23
+ * Provides a slot for a left sidebar within the PageLayout.
24
+ *
25
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
26
+ * - [Code](https://atlassian.design/components/page-layout/code)
27
+ */
18
28
 
19
29
  var LeftSidebar = function LeftSidebar(props) {
20
30
  var children = props.children,
@@ -233,7 +243,8 @@ var LeftSidebar = function LeftSidebar(props) {
233
243
  }, children), jsx(ResizeControl, {
234
244
  testId: testId,
235
245
  resizeGrabAreaLabel: resizeGrabAreaLabel,
236
- resizeButtonLabel: resizeButtonLabel,
246
+ resizeButtonLabel: resizeButtonLabel // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
247
+ ,
237
248
  overrides: overrides,
238
249
  onCollapse: onCollapse,
239
250
  onExpand: onExpand,
@@ -35,6 +35,14 @@ var draggingStyles = css({
35
35
  var flyoutStyles = css({
36
36
  marginLeft: "calc(-1 * var(--".concat(VAR_LEFT_SIDEBAR_FLYOUT, ", ").concat(DEFAULT_LEFT_SIDEBAR_FLYOUT_WIDTH, "px) + ").concat(COLLAPSED_LEFT_SIDEBAR_WIDTH, "px)")
37
37
  });
38
+ /**
39
+ * __Main__
40
+ *
41
+ * Provides a slot for main content within the PageLayout.
42
+ *
43
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
44
+ * - [Code](https://atlassian.design/components/page-layout/code)
45
+ */
38
46
 
39
47
  var Main = function Main(props) {
40
48
  var children = props.children,
@@ -19,6 +19,14 @@ var gridStyles = css({
19
19
  gridTemplateRows: "".concat(BANNER_HEIGHT, " ").concat(TOP_NAVIGATION_HEIGHT, " auto"),
20
20
  outline: 'none'
21
21
  });
22
+ /**
23
+ * __Page layout__
24
+ *
25
+ * A collection of components which let you compose an application's page layout.
26
+ *
27
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
28
+ * - [Code](https://atlassian.design/components/page-layout/code)
29
+ */
22
30
 
23
31
  var PageLayout = function PageLayout(_ref) {
24
32
  var _ref$skipLinksLabel = _ref.skipLinksLabel,
@@ -19,6 +19,14 @@ var fixedStyles = css({
19
19
  right: 0,
20
20
  bottom: 0
21
21
  });
22
+ /**
23
+ * __Right panel__
24
+ *
25
+ * Provides a slot for a right panel within the PageLayout.
26
+ *
27
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
28
+ * - [Code](https://atlassian.design/components/page-layout/code)
29
+ */
22
30
 
23
31
  var RightPanel = function RightPanel(props) {
24
32
  var children = props.children,
@@ -46,6 +46,14 @@ var fixedOuterStyles = css({
46
46
  content: "''"
47
47
  }
48
48
  });
49
+ /**
50
+ * __Right sidebar__
51
+ *
52
+ * Provides a slot for a right sidebar within the PageLayout.
53
+ *
54
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
55
+ * - [Code](https://atlassian.design/components/page-layout/code)
56
+ */
49
57
 
50
58
  var RightSidebar = function RightSidebar(props) {
51
59
  var children = props.children,
@@ -20,6 +20,14 @@ var fixedStyles = css({
20
20
  right: RIGHT_PANEL_WIDTH,
21
21
  left: LEFT_PANEL_WIDTH
22
22
  });
23
+ /**
24
+ * __Top navigation__
25
+ *
26
+ * Provides a slot for top navigation within the PageLayout.
27
+ *
28
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
29
+ * - [Code](https://atlassian.design/components/page-layout/code)
30
+ */
23
31
 
24
32
  var TopNavigation = function TopNavigation(props) {
25
33
  var children = props.children,
@@ -7,9 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
7
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
 
9
9
  import { createContext, useContext, useEffect } from 'react';
10
-
11
- var noop = function noop() {};
12
-
10
+ import noop from '@atlaskit/ds-lib/noop';
13
11
  var leftSidebarState = {
14
12
  isFlyoutOpen: false,
15
13
  isResizing: false,
@@ -18,7 +16,8 @@ var leftSidebarState = {
18
16
  lastLeftSidebarWidth: 0,
19
17
  flyoutLockCount: 0,
20
18
  isFixed: true
21
- };
19
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
20
+
22
21
  export var SidebarResizeContext = /*#__PURE__*/createContext({
23
22
  isLeftSidebarCollapsed: false,
24
23
  expandLeftSidebar: noop,
@@ -34,7 +33,7 @@ export var usePageLayoutResize = function usePageLayoutResize() {
34
33
  return context;
35
34
  };
36
35
  /**
37
- * **WARNING:** This hook is intended as a temporary solution and
36
+ * _**WARNING:**_ This hook is intended as a temporary solution and
38
37
  * is likely to be removed in a future version of page-layout.
39
38
  *
40
39
  * ---
@@ -1,19 +1,19 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
+ import noop from '@atlaskit/ds-lib/noop';
3
4
  import { isReducedMotion } from '@atlaskit/motion';
4
5
  import { COLLAPSED_LEFT_SIDEBAR_WIDTH, DEFAULT_LEFT_SIDEBAR_WIDTH, GRAB_AREA_SELECTOR, IS_SIDEBAR_COLLAPSING } from '../common/constants';
5
6
  import { getPageLayoutSlotCSSSelector } from '../common/utils';
6
7
  import { SidebarResizeContext } from './sidebar-resize-context';
7
8
 
8
- var noop = function noop() {};
9
-
10
9
  var handleDataAttributesAndCb = function handleDataAttributesAndCb() {
11
10
  var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : noop;
12
11
  var isLeftSidebarCollapsed = arguments.length > 1 ? arguments[1] : undefined;
13
12
  var leftSidebarState = arguments.length > 2 ? arguments[2] : undefined;
14
13
  document.documentElement.removeAttribute(IS_SIDEBAR_COLLAPSING);
15
14
  callback(leftSidebarState);
16
- };
15
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
16
+
17
17
 
18
18
  export var SidebarResizeController = function SidebarResizeController(_ref) {
19
19
  var children = _ref.children,
@@ -40,6 +40,7 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
40
40
  var $leftSidebarResizeController = document.querySelector("[".concat(GRAB_AREA_SELECTOR, "]"));
41
41
  var isCollapsed = !!$leftSidebarResizeController && $leftSidebarResizeController.hasAttribute('disabled');
42
42
  handleDataAttributesAndCb(isCollapsed ? onCollapse : onExpand, isCollapsed, leftSidebarState); // Make sure multiple event handlers do not get attached
43
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
43
44
 
44
45
  document.querySelector(leftSidebarSelector).removeEventListener('transitionend', transitionEventHandler);
45
46
  } // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -49,6 +50,7 @@ export var SidebarResizeController = function SidebarResizeController(_ref) {
49
50
  var $leftSidebar = document.querySelector(leftSidebarSelector);
50
51
 
51
52
  if ($leftSidebar && !isReducedMotion()) {
53
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
52
54
  $leftSidebar.addEventListener('transitionend', transitionEventHandler);
53
55
  }
54
56
  }, [isLeftSidebarCollapsed, leftSidebarSelector, leftSidebarState, onCollapse, onExpand, transitionEventHandler]);
@@ -1,7 +1,6 @@
1
1
  import { createContext, useContext, useEffect } from 'react';
2
-
3
- var noop = function noop() {};
4
-
2
+ import noop from '@atlaskit/ds-lib/noop';
3
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
5
4
  export var SkipLinksContext = /*#__PURE__*/createContext({
6
5
  skipLinksData: [],
7
6
  registerSkipLink: noop,
@@ -28,7 +28,8 @@ var byDOMOrder = function byDOMOrder(a, b) {
28
28
  }
29
29
 
30
30
  return indexA - indexB;
31
- };
31
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
32
+
32
33
 
33
34
  export var SkipLinksController = function SkipLinksController(_ref) {
34
35
  var children = _ref.children;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.2.4",
3
+ "version": "1.2.7",
4
4
  "sideEffects": false
5
5
  }
@@ -2,27 +2,39 @@ import { ElementType, ReactElement, ReactNode } from 'react';
2
2
  import { ResizeButtonProps } from '../components/resize-control/types';
3
3
  import { LeftSidebarState } from '../controllers/sidebar-resize-context';
4
4
  interface SlotProps {
5
- /** Sets positon to fixed. */
5
+ /**
6
+ * Sets positon to fixed.
7
+ */
6
8
  isFixed?: boolean;
7
9
  /**
8
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 .
9
11
  */
10
12
  testId?: string;
11
- /** React Children! */
13
+ /**
14
+ * React Children!
15
+ */
12
16
  children: ReactNode;
13
17
  id?: string;
14
18
  skipLinkTitle?: string;
15
19
  }
16
20
  export interface SlotHeightProps extends SlotProps {
17
- /** It save height in local storage. */
21
+ /**
22
+ * It save height in local storage.
23
+ */
18
24
  shouldPersistHeight?: boolean;
19
- /** Height! */
25
+ /**
26
+ * Height!
27
+ */
20
28
  height?: number;
21
29
  }
22
30
  export interface SlotWidthProps extends SlotProps {
23
- /** It save width in local storage. */
31
+ /**
32
+ * It save width in local storage.
33
+ */
24
34
  shouldPersistWidth?: boolean;
25
- /** Width! */
35
+ /**
36
+ * Width!
37
+ */
26
38
  width?: number;
27
39
  }
28
40
  export interface LeftSidebarProps extends SlotWidthProps {
@@ -30,48 +42,76 @@ export interface LeftSidebarProps extends SlotWidthProps {
30
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.
31
43
  */
32
44
  testId?: string;
33
- /** You can override prop(s) for the mentioned component(s). */
45
+ /**
46
+ * You can override prop(s) for the mentioned component(s).
47
+ */
34
48
  overrides?: {
35
49
  ResizeButton?: {
36
50
  render?: (Component: ElementType<ResizeButtonProps>, props: ResizeButtonProps) => ReactElement;
37
51
  };
38
52
  };
39
- /** Display label for grab area. This will be announced to the screenreaders when the grab area receives focus */
53
+ /**
54
+ * Display label for grab area. This will be announced to the screenreaders when the grab area receives focus
55
+ */
40
56
  resizeGrabAreaLabel?: string;
41
- /** Display label for resize button. */
57
+ /**
58
+ * Display label for resize button.
59
+ */
42
60
  resizeButtonLabel?: string;
43
- /** Called when left-sidebar is collapsed. */
61
+ /**
62
+ * Called when left-sidebar is collapsed.
63
+ */
44
64
  onCollapse?: () => void;
45
- /** Called when left-sidebar is expanded. */
65
+ /**
66
+ * Called when left-sidebar is expanded.
67
+ */
46
68
  onExpand?: () => void;
47
- /** Called when left-sidebar resize starts using mouse or touch. */
69
+ /**
70
+ * Called when left-sidebar resize starts using mouse or touch.
71
+ */
48
72
  onResizeStart?: (leftSidebarState: LeftSidebarState) => void;
49
- /** Called when left-sidebar resize ends using mouse or touch. */
73
+ /**
74
+ * Called when left-sidebar resize ends using mouse or touch.
75
+ */
50
76
  onResizeEnd?: (leftSidebarState: LeftSidebarState) => void;
51
- /** Called when left-sidebar is collapsed and mouse leaves the area. */
77
+ /**
78
+ * Called when left-sidebar is collapsed and mouse leaves the area.
79
+ */
52
80
  onFlyoutCollapse?: () => void;
53
- /** Called after flyout delay when left-sidebar is collapsed and mouse enters the area. */
81
+ /**
82
+ * Called after flyout delay when left-sidebar is collapsed and mouse enters the area.
83
+ */
54
84
  onFlyoutExpand?: () => void;
55
- /** Controls whether the LeftSidebar mounts in a collapsed state, this will override the setting in localStorage */
85
+ /**
86
+ * Controls whether the LeftSidebar mounts in a collapsed state, this will override the setting in localStorage
87
+ */
56
88
  collapsedState?: 'collapsed' | 'expanded';
57
- /** Controls the width when LeftSidebar mounts, this will override the setting in localStorage */
89
+ /**
90
+ * Controls the width when LeftSidebar mounts, this will override the setting in localStorage
91
+ */
58
92
  width?: number;
59
93
  }
60
94
  export declare type SidebarResizeControllerProps = {
61
- /** Called when left-sidebar expanded. */
95
+ /**
96
+ * Called when left-sidebar expanded.
97
+ */
62
98
  onLeftSidebarExpand?: (leftSidebarState: LeftSidebarState) => void;
63
- /** Called when left-sidebar collapsed. */
99
+ /**
100
+ * Called when left-sidebar collapsed.
101
+ */
64
102
  onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
65
103
  };
66
104
  export declare type DimensionNames = 'leftPanelWidth' | 'bannerHeight' | 'topNavigationHeight' | 'leftSidebarWidth' | 'leftSidebarFlyoutWidth' | 'rightSidebarWidth' | 'rightPanelWidth';
67
105
  export declare type Dimensions = Partial<Record<DimensionNames, number>>;
68
106
  export interface PageLayoutProps extends SidebarResizeControllerProps {
69
- /** React children! */
107
+ /**
108
+ * React children!
109
+ */
70
110
  children: ReactNode;
71
111
  skipLinksLabel?: string;
72
112
  /**
73
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.
74
- **/
114
+ */
75
115
  testId?: string;
76
116
  }
77
117
  export type { LeftSidebarState } from '../controllers/sidebar-resize-context';
@@ -1,4 +1,4 @@
1
- import { DimensionNames, Dimensions } from '../common/types';
1
+ import { DimensionNames, Dimensions } from './types';
2
2
  declare const emptyGridState: Dimensions;
3
3
  declare const mergeGridStateIntoStorage: (key: string, value: any) => void;
4
4
  declare const getGridStateFromStorage: (key: string) => any;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
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
+ */
3
11
  declare const Banner: (props: SlotHeightProps) => JSX.Element;
4
12
  export default Banner;
@@ -1,12 +1,22 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
3
  interface ContentProps {
4
- /** React children! */
4
+ /**
5
+ * React children
6
+ */
5
7
  children: ReactNode;
6
8
  /**
7
9
  * 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.
8
- **/
10
+ */
9
11
  testId?: string;
10
12
  }
13
+ /**
14
+ * __Content__
15
+ *
16
+ * Provides a slot for your application content within the PageLayout.
17
+ *
18
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
19
+ * - [Code](https://atlassian.design/components/page-layout/code)
20
+ */
11
21
  declare const Content: (props: ContentProps) => JSX.Element;
12
22
  export default Content;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { SlotWidthProps } from '../../common/types';
3
+ /**
4
+ * __Left panel__
5
+ *
6
+ * Provides a slot for a left panel within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const LeftPanel: (props: SlotWidthProps) => JSX.Element;
4
12
  export default LeftPanel;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { SlotWidthProps } from '../../common/types';
3
+ /**
4
+ * __Left sidebar without resize__
5
+ *
6
+ * Provides a slot for a left sidebar without resize within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const LeftSidebarWithoutResize: (props: SlotWidthProps) => JSX.Element;
4
12
  export default LeftSidebarWithoutResize;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { LeftSidebarProps } from '../../common/types';
3
+ /**
4
+ * __Left sidebar__
5
+ *
6
+ * Provides a slot for a left sidebar within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const LeftSidebar: (props: LeftSidebarProps) => JSX.Element;
4
12
  export default LeftSidebar;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { SlotWidthProps } from '../../common/types';
3
+ /**
4
+ * __Main__
5
+ *
6
+ * Provides a slot for main content within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const Main: (props: SlotWidthProps) => JSX.Element;
4
12
  export default Main;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { PageLayoutProps } from '../../common/types';
3
+ /**
4
+ * __Page layout__
5
+ *
6
+ * A collection of components which let you compose an application's page layout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => JSX.Element;
4
12
  export default PageLayout;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { SlotWidthProps } from '../../common/types';
3
+ /**
4
+ * __Right panel__
5
+ *
6
+ * Provides a slot for a right panel within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const RightPanel: (props: SlotWidthProps) => JSX.Element;
4
12
  export default RightPanel;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { SlotWidthProps } from '../../common/types';
3
+ /**
4
+ * __Right sidebar__
5
+ *
6
+ * Provides a slot for a right sidebar within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const RightSidebar: (props: SlotWidthProps) => JSX.Element;
4
12
  export default RightSidebar;
@@ -1,4 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { SlotHeightProps } from '../../common/types';
3
+ /**
4
+ * __Top navigation__
5
+ *
6
+ * Provides a slot for top navigation within the PageLayout.
7
+ *
8
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
9
+ * - [Code](https://atlassian.design/components/page-layout/code)
10
+ */
3
11
  declare const TopNavigation: (props: SlotHeightProps) => JSX.Element;
4
12
  export default TopNavigation;
@@ -23,7 +23,7 @@ export declare const usePageLayoutResize: () => {
23
23
  leftSidebarState: LeftSidebarState;
24
24
  };
25
25
  /**
26
- * **WARNING:** This hook is intended as a temporary solution and
26
+ * _**WARNING:**_ This hook is intended as a temporary solution and
27
27
  * is likely to be removed in a future version of page-layout.
28
28
  *
29
29
  * ---
@@ -4,11 +4,17 @@ export declare type SkipLinkContextProps = {
4
4
  unregisterSkipLink: (id: string | undefined) => void;
5
5
  };
6
6
  export declare type SkipLinkData = {
7
- /** id for the element that will be skipped to */
7
+ /**
8
+ * id for the element that will be skipped to
9
+ */
8
10
  id: string;
9
- /** Text for the link that will appear in the skip link menu */
11
+ /**
12
+ * Text for the link that will appear in the skip link menu
13
+ */
10
14
  skipLinkTitle: string;
11
- /** Desired position in the skip link menu */
15
+ /**
16
+ * Desired position in the skip link menu
17
+ */
12
18
  listIndex?: number;
13
19
  };
14
20
  export declare type SkipLinkI18n = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.2.4",
3
+ "version": "1.2.7",
4
4
  "description": "A collection of components which let you compose an application's page layout.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -13,23 +13,26 @@
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
- "atlaskit:src": "src/index.ts",
16
+ "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
19
  "deprecatedAutoEntryPoints": true,
20
20
  "releaseModel": "scheduled",
21
21
  "website": {
22
- "name": "Page layout"
22
+ "name": "Page layout",
23
+ "category": "Components"
23
24
  }
24
25
  },
25
26
  "homepage": "https://atlassian.design/components/page-layout/",
26
27
  "dependencies": {
28
+ "@atlaskit/ds-lib": "^2.1.0",
27
29
  "@atlaskit/icon": "^21.10.0",
28
- "@atlaskit/motion": "^1.1.0",
30
+ "@atlaskit/motion": "^1.2.0",
29
31
  "@atlaskit/theme": "^12.1.0",
30
32
  "@atlaskit/tokens": "^0.10.0",
31
33
  "@babel/runtime": "^7.0.0",
32
34
  "@emotion/core": "^10.0.9",
35
+ "bind-event-listener": "^2.1.1",
33
36
  "raf-schd": "^4.0.3"
34
37
  },
35
38
  "peerDependencies": {
@@ -43,12 +46,12 @@
43
46
  "@atlaskit/docs": "*",
44
47
  "@atlaskit/drawer": "^7.1.0",
45
48
  "@atlaskit/icon": "*",
46
- "@atlaskit/logo": "^13.7.0",
49
+ "@atlaskit/logo": "^13.8.0",
47
50
  "@atlaskit/menu": "^1.3.0",
48
51
  "@atlaskit/notification-indicator": "^9.0.0",
49
52
  "@atlaskit/notification-log-client": "^6.0.0",
50
- "@atlaskit/onboarding": "^10.4.0",
51
- "@atlaskit/popup": "^1.3.0",
53
+ "@atlaskit/onboarding": "^10.5.0",
54
+ "@atlaskit/popup": "^1.4.0",
52
55
  "@atlaskit/section-message": "^6.0.0",
53
56
  "@atlaskit/side-navigation": "^1.2.0",
54
57
  "@atlaskit/ssr": "*",
@@ -75,6 +78,8 @@
75
78
  "import-structure": "atlassian-conventions"
76
79
  },
77
80
  "@repo/internal": {
81
+ "dom-events": "use-bind-event-listener",
82
+ "design-system": "v1",
78
83
  "ui-components": [
79
84
  "lite-mode"
80
85
  ],