@atlaskit/page-layout 1.2.6 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/__perf__/utils/perf-example.tsx +3 -3
  3. package/__perf__/utils/product-integration/{AtlassianNavigation.tsx → atlassian-navigation.tsx} +5 -5
  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} +1 -1
  7. package/__perf__/utils/product-integration/{ProfilePopup.tsx → profile-popup.tsx} +2 -1
  8. package/__perf__/utils/product-integration/{SampleFooter.tsx → sample-footer.tsx} +2 -1
  9. package/__perf__/utils/product-integration/{SampleHeader.tsx → sample-header.tsx} +3 -1
  10. package/__perf__/utils/product-integration/{SideNavigation.tsx → side-navigation.tsx} +3 -3
  11. package/dist/cjs/common/safe-local-storage.js +1 -0
  12. package/dist/cjs/components/resize-control/grab-area.js +10 -8
  13. package/dist/cjs/components/resize-control/index.js +9 -8
  14. package/dist/cjs/components/resize-control/resize-button.js +11 -9
  15. package/dist/cjs/components/resize-control/shadow.js +6 -5
  16. package/dist/cjs/components/skip-links/skip-link-components.js +14 -12
  17. package/dist/cjs/components/slots/banner.js +14 -6
  18. package/dist/cjs/components/slots/content.js +11 -3
  19. package/dist/cjs/components/slots/internal/left-sidebar-inner.js +9 -8
  20. package/dist/cjs/components/slots/internal/left-sidebar-outer.js +9 -9
  21. package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +9 -8
  22. package/dist/cjs/components/slots/internal/slot-focus-ring.js +4 -4
  23. package/dist/cjs/components/slots/left-panel.js +14 -6
  24. package/dist/cjs/components/slots/left-sidebar-without-resize.js +13 -4
  25. package/dist/cjs/components/slots/left-sidebar.js +16 -7
  26. package/dist/cjs/components/slots/main.js +15 -7
  27. package/dist/cjs/components/slots/page-layout.js +13 -5
  28. package/dist/cjs/components/slots/right-panel.js +14 -6
  29. package/dist/cjs/components/slots/right-sidebar.js +17 -9
  30. package/dist/cjs/components/slots/top-navigation.js +14 -6
  31. package/dist/cjs/controllers/sidebar-resize-context.js +8 -7
  32. package/dist/cjs/controllers/sidebar-resize-controller.js +5 -4
  33. package/dist/cjs/controllers/skip-link-context.js +6 -3
  34. package/dist/cjs/controllers/skip-link-controller.js +2 -1
  35. package/dist/cjs/version.json +1 -1
  36. package/dist/es2019/common/safe-local-storage.js +1 -0
  37. package/dist/es2019/components/resize-control/grab-area.js +5 -3
  38. package/dist/es2019/components/resize-control/index.js +3 -2
  39. package/dist/es2019/components/resize-control/resize-button.js +5 -3
  40. package/dist/es2019/components/resize-control/shadow.js +3 -2
  41. package/dist/es2019/components/skip-links/skip-link-components.js +5 -3
  42. package/dist/es2019/components/slots/banner.js +9 -1
  43. package/dist/es2019/components/slots/content.js +9 -1
  44. package/dist/es2019/components/slots/internal/left-sidebar-inner.js +3 -2
  45. package/dist/es2019/components/slots/internal/left-sidebar-outer.js +1 -1
  46. package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +3 -2
  47. package/dist/es2019/components/slots/internal/slot-focus-ring.js +1 -1
  48. package/dist/es2019/components/slots/left-panel.js +9 -1
  49. package/dist/es2019/components/slots/left-sidebar-without-resize.js +9 -1
  50. package/dist/es2019/components/slots/left-sidebar.js +11 -2
  51. package/dist/es2019/components/slots/main.js +9 -1
  52. package/dist/es2019/components/slots/page-layout.js +9 -1
  53. package/dist/es2019/components/slots/right-panel.js +9 -1
  54. package/dist/es2019/components/slots/right-sidebar.js +9 -1
  55. package/dist/es2019/components/slots/top-navigation.js +9 -1
  56. package/dist/es2019/controllers/sidebar-resize-context.js +4 -5
  57. package/dist/es2019/controllers/sidebar-resize-controller.js +3 -3
  58. package/dist/es2019/controllers/skip-link-context.js +2 -3
  59. package/dist/es2019/controllers/skip-link-controller.js +2 -1
  60. package/dist/es2019/version.json +1 -1
  61. package/dist/esm/common/safe-local-storage.js +1 -0
  62. package/dist/esm/components/resize-control/grab-area.js +5 -3
  63. package/dist/esm/components/resize-control/index.js +3 -2
  64. package/dist/esm/components/resize-control/resize-button.js +5 -3
  65. package/dist/esm/components/resize-control/shadow.js +3 -2
  66. package/dist/esm/components/skip-links/skip-link-components.js +5 -3
  67. package/dist/esm/components/slots/banner.js +9 -1
  68. package/dist/esm/components/slots/content.js +9 -1
  69. package/dist/esm/components/slots/internal/left-sidebar-inner.js +3 -2
  70. package/dist/esm/components/slots/internal/left-sidebar-outer.js +1 -1
  71. package/dist/esm/components/slots/internal/resizable-children-wrapper.js +3 -2
  72. package/dist/esm/components/slots/internal/slot-focus-ring.js +1 -1
  73. package/dist/esm/components/slots/left-panel.js +9 -1
  74. package/dist/esm/components/slots/left-sidebar-without-resize.js +9 -1
  75. package/dist/esm/components/slots/left-sidebar.js +11 -2
  76. package/dist/esm/components/slots/main.js +9 -1
  77. package/dist/esm/components/slots/page-layout.js +9 -1
  78. package/dist/esm/components/slots/right-panel.js +9 -1
  79. package/dist/esm/components/slots/right-sidebar.js +9 -1
  80. package/dist/esm/components/slots/top-navigation.js +9 -1
  81. package/dist/esm/controllers/sidebar-resize-context.js +4 -5
  82. package/dist/esm/controllers/sidebar-resize-controller.js +3 -3
  83. package/dist/esm/controllers/skip-link-context.js +2 -3
  84. package/dist/esm/controllers/skip-link-controller.js +2 -1
  85. package/dist/esm/version.json +1 -1
  86. package/dist/types/common/types.d.ts +61 -21
  87. package/dist/types/common/utils.d.ts +1 -1
  88. package/dist/types/components/resize-control/grab-area.d.ts +2 -1
  89. package/dist/types/components/resize-control/index.d.ts +2 -2
  90. package/dist/types/components/resize-control/resize-button.d.ts +2 -2
  91. package/dist/types/components/resize-control/shadow.d.ts +2 -2
  92. package/dist/types/components/skip-links/skip-link-components.d.ts +3 -2
  93. package/dist/types/components/slots/banner.d.ts +10 -2
  94. package/dist/types/components/slots/content.d.ts +14 -3
  95. package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +2 -1
  96. package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +2 -1
  97. package/dist/types/components/slots/internal/slot-focus-ring.d.ts +2 -1
  98. package/dist/types/components/slots/left-panel.d.ts +10 -2
  99. package/dist/types/components/slots/left-sidebar-without-resize.d.ts +10 -2
  100. package/dist/types/components/slots/left-sidebar.d.ts +10 -2
  101. package/dist/types/components/slots/main.d.ts +10 -2
  102. package/dist/types/components/slots/page-layout.d.ts +10 -2
  103. package/dist/types/components/slots/right-panel.d.ts +10 -2
  104. package/dist/types/components/slots/right-sidebar.d.ts +10 -2
  105. package/dist/types/components/slots/top-navigation.d.ts +10 -2
  106. package/dist/types/controllers/sidebar-resize-context.d.ts +1 -1
  107. package/dist/types/controllers/types.d.ts +9 -3
  108. package/package.json +13 -11
  109. package/report.api.md +219 -0
@@ -11,7 +11,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
 
12
12
  var _react = require("react");
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _motion = require("@atlaskit/motion");
17
17
 
@@ -25,8 +25,8 @@ var _slotFocusRing = _interopRequireDefault(require("./slot-focus-ring"));
25
25
 
26
26
  /** @jsx jsx */
27
27
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
28
- var prefersReducedMotionStyles = (0, _core.css)((0, _motion.prefersReducedMotion)());
29
- var outerStyles = (0, _core.css)({
28
+ var prefersReducedMotionStyles = (0, _react2.css)((0, _motion.prefersReducedMotion)());
29
+ var outerStyles = (0, _react2.css)({
30
30
  width: _constants.LEFT_SIDEBAR_WIDTH,
31
31
  marginLeft: 0,
32
32
  position: 'relative',
@@ -36,7 +36,7 @@ var outerStyles = (0, _core.css)({
36
36
  '--ds--resize-button--opacity': 1
37
37
  }
38
38
  });
39
- var draggingStyles = (0, _core.css)({
39
+ var draggingStyles = (0, _react2.css)({
40
40
  cursor: 'ew-resize',
41
41
  // Make sure drag to resize does not animate as the user drags
42
42
  transition: 'none'
@@ -47,17 +47,17 @@ var draggingStyles = (0, _core.css)({
47
47
  * so the pseudo element forces it to take up the necessary width.
48
48
  */
49
49
 
50
- var fixedStyles = (0, _core.css)({
50
+ var fixedStyles = (0, _react2.css)({
51
51
  '::after': {
52
52
  display: 'inline-block',
53
53
  width: "".concat(_constants.LEFT_SIDEBAR_WIDTH),
54
54
  content: "''"
55
55
  }
56
56
  });
57
- var flyoutStyles = (0, _core.css)({
57
+ var flyoutStyles = (0, _react2.css)({
58
58
  width: _constants.LEFT_SIDEBAR_FLYOUT_WIDTH
59
59
  });
60
- var flyoutFixedStyles = (0, _core.css)({
60
+ var flyoutFixedStyles = (0, _react2.css)({
61
61
  width: _constants.COLLAPSED_LEFT_SIDEBAR_WIDTH
62
62
  });
63
63
  var selector = (0, _utils.getPageLayoutSlotSelector)('left-sidebar');
@@ -73,7 +73,7 @@ var LeftSidebarOuter = function LeftSidebarOuter(_ref, ref) {
73
73
  onMouseOver = _ref.onMouseOver,
74
74
  id = _ref.id;
75
75
  var isDragging = (0, _hooks.useIsSidebarDragging)();
76
- return (0, _core.jsx)(_slotFocusRing.default, {
76
+ return (0, _react2.jsx)(_slotFocusRing.default, {
77
77
  isSidebar: true
78
78
  }, function (_ref2) {
79
79
  var className = _ref2.className;
@@ -82,7 +82,7 @@ var LeftSidebarOuter = function LeftSidebarOuter(_ref, ref) {
82
82
  * The mouse handlers control flyout behavior, a mouse-only experience.
83
83
  */
84
84
  // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
85
- (0, _core.jsx)("div", (0, _extends2.default)({
85
+ (0, _react2.jsx)("div", (0, _extends2.default)({
86
86
  css: [outerStyles, isFixed && fixedStyles, isFlyoutOpen && flyoutStyles, isFlyoutOpen && isFixed && flyoutFixedStyles, isDragging && draggingStyles, prefersReducedMotionStyles],
87
87
  className: className,
88
88
  "data-testid": testId,
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _motion = require("@atlaskit/motion");
11
11
 
@@ -15,7 +15,7 @@ var _hooks = require("../../../common/hooks");
15
15
 
16
16
  /** @jsx jsx */
17
17
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
18
- var prefersReducedMotionStyles = (0, _core.css)((0, _motion.prefersReducedMotion)());
18
+ var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
19
19
  /**
20
20
  * The transition duration is intentionally set to 0ms.
21
21
  *
@@ -23,20 +23,20 @@ var prefersReducedMotionStyles = (0, _core.css)((0, _motion.prefersReducedMotion
23
23
  * opacity and visibility so that it syncs collapsing sidebar.
24
24
  */
25
25
 
26
- var hideLeftSidebarContentsStyles = (0, _core.css)({
26
+ var hideLeftSidebarContentsStyles = (0, _react.css)({
27
27
  opacity: 0,
28
28
  transition: "opacity 0ms linear, visibility 0ms linear",
29
29
  transitionDelay: "".concat(_constants.TRANSITION_DURATION - 100, "ms"),
30
30
  visibility: 'hidden'
31
31
  });
32
- var resizableChildrenWrapperStyles = (0, _core.css)({
32
+ var resizableChildrenWrapperStyles = (0, _react.css)({
33
33
  height: '100%',
34
34
  opacity: 1,
35
35
  overflow: 'hidden auto',
36
36
  transition: 'none',
37
37
  visibility: 'visible'
38
38
  });
39
- var fixedChildrenWrapperStyles = (0, _core.css)({
39
+ var fixedChildrenWrapperStyles = (0, _react.css)({
40
40
  minWidth: 240,
41
41
  height: '100%'
42
42
  });
@@ -52,12 +52,13 @@ var ResizableChildrenWrapper = function ResizableChildrenWrapper(_ref) {
52
52
  var isCollapsing = (0, _hooks.useIsSidebarCollapsing)();
53
53
  var isCollapsed = isLeftSidebarCollapsed || hasCollapsedState;
54
54
  var isHidden = isCollapsing || isCollapsed && !isFlyoutOpen;
55
- return (0, _core.jsx)("div", {
55
+ return (0, _react.jsx)("div", {
56
56
  css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles]
57
- }, (0, _core.jsx)("div", {
57
+ }, (0, _react.jsx)("div", {
58
58
  css: fixedChildrenWrapperStyles
59
59
  }, children));
60
- };
60
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
61
+
61
62
 
62
63
  var _default = ResizableChildrenWrapper;
63
64
  exports.default = _default;
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
 
12
12
  /** @jsx jsx */
13
- var focusStyles = (0, _core.css)({
13
+ var focusStyles = (0, _react.css)({
14
14
  ':focus': {
15
15
  outline: 'none',
16
16
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
@@ -25,7 +25,7 @@ var focusStyles = (0, _core.css)({
25
25
  * so the nested selector needs to target an extra level deeper.
26
26
  */
27
27
 
28
- var sidebarFocusStyles = (0, _core.css)({
28
+ var sidebarFocusStyles = (0, _react.css)({
29
29
  ':focus': {
30
30
  outline: 'none',
31
31
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
@@ -49,7 +49,7 @@ var SlotFocusRing = function SlotFocusRing(_ref) {
49
49
  var children = _ref.children,
50
50
  _ref$isSidebar = _ref.isSidebar,
51
51
  isSidebar = _ref$isSidebar === void 0 ? false : _ref$isSidebar;
52
- return (0, _core.jsx)(_core.ClassNames, null, function (_ref2) {
52
+ return (0, _react.jsx)(_react.ClassNames, null, function (_ref2) {
53
53
  var css = _ref2.css;
54
54
  return children({
55
55
  className: isSidebar ? css(sidebarFocusStyles) : css(focusStyles)
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _constants = require("../../common/constants");
19
19
 
@@ -26,16 +26,24 @@ var _slotFocusRing = _interopRequireDefault(require("./internal/slot-focus-ring"
26
26
  var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
27
27
 
28
28
  /** @jsx jsx */
29
- var leftPanelStyles = (0, _core.css)({
29
+ var leftPanelStyles = (0, _react2.css)({
30
30
  gridArea: _constants.LEFT_PANEL
31
31
  });
32
- var leftPanelFixedStyles = (0, _core.css)({
32
+ var leftPanelFixedStyles = (0, _react2.css)({
33
33
  width: _constants.LEFT_PANEL_WIDTH,
34
34
  position: 'fixed',
35
35
  top: 0,
36
36
  bottom: 0,
37
37
  left: 0
38
38
  });
39
+ /**
40
+ * __Left panel__
41
+ *
42
+ * Provides a slot for a left panel within the PageLayout.
43
+ *
44
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
45
+ * - [Code](https://atlassian.design/components/page-layout/code)
46
+ */
39
47
 
40
48
  var LeftPanel = function LeftPanel(props) {
41
49
  var children = props.children,
@@ -54,14 +62,14 @@ var LeftPanel = function LeftPanel(props) {
54
62
  };
55
63
  }, [leftPanelWidth]);
56
64
  (0, _controllers.useSkipLink)(id, skipLinkTitle);
57
- return (0, _core.jsx)(_slotFocusRing.default, null, function (_ref) {
65
+ return (0, _react2.jsx)(_slotFocusRing.default, null, function (_ref) {
58
66
  var className = _ref.className;
59
- return (0, _core.jsx)("div", (0, _extends2.default)({
67
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
60
68
  css: [leftPanelStyles, isFixed && leftPanelFixedStyles],
61
69
  className: className,
62
70
  "data-testid": testId,
63
71
  id: id
64
- }, (0, _utils.getPageLayoutSlotSelector)('left-panel')), (0, _core.jsx)(_slotDimensions.default, {
72
+ }, (0, _utils.getPageLayoutSlotSelector)('left-panel')), (0, _react2.jsx)(_slotDimensions.default, {
65
73
  variableName: _constants.VAR_LEFT_PANEL_WIDTH,
66
74
  value: leftPanelWidth
67
75
  }), children);
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
 
12
12
  var _react = require("react");
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _constants = require("../../common/constants");
17
17
 
@@ -26,6 +26,15 @@ var _leftSidebarOuter = _interopRequireDefault(require("./internal/left-sidebar-
26
26
  var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
27
27
 
28
28
  /** @jsx jsx */
29
+
30
+ /**
31
+ * __Left sidebar without resize__
32
+ *
33
+ * Provides a slot for a left sidebar without resize within the PageLayout.
34
+ *
35
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
36
+ * - [Code](https://atlassian.design/components/page-layout/code)
37
+ */
29
38
  var LeftSidebarWithoutResize = function LeftSidebarWithoutResize(props) {
30
39
  var children = props.children,
31
40
  id = props.id,
@@ -42,14 +51,14 @@ var LeftSidebarWithoutResize = function LeftSidebarWithoutResize(props) {
42
51
  };
43
52
  }, [leftSidebarWidth]);
44
53
  (0, _controllers.useSkipLink)(id, skipLinkTitle);
45
- return (0, _core.jsx)(_leftSidebarOuter.default, {
54
+ return (0, _react2.jsx)(_leftSidebarOuter.default, {
46
55
  id: id,
47
56
  testId: testId,
48
57
  isFixed: isFixed
49
- }, (0, _core.jsx)(_slotDimensions.default, {
58
+ }, (0, _react2.jsx)(_slotDimensions.default, {
50
59
  variableName: _constants.VAR_LEFT_SIDEBAR_WIDTH,
51
60
  value: leftSidebarWidth
52
- }), (0, _core.jsx)(_leftSidebarInner.default, {
61
+ }), (0, _react2.jsx)(_leftSidebarInner.default, {
53
62
  isFixed: isFixed
54
63
  }, children));
55
64
  };
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
 
12
12
  var _react = require("react");
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _constants = require("../../common/constants");
17
17
 
@@ -33,6 +33,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
33
33
 
34
34
  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) { (0, _defineProperty2.default)(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; }
35
35
 
36
+ /**
37
+ * __Left sidebar__
38
+ *
39
+ * Provides a slot for a left sidebar within the PageLayout.
40
+ *
41
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
42
+ * - [Code](https://atlassian.design/components/page-layout/code)
43
+ */
36
44
  var LeftSidebar = function LeftSidebar(props) {
37
45
  var children = props.children,
38
46
  width = props.width,
@@ -229,7 +237,7 @@ var LeftSidebar = function LeftSidebar(props) {
229
237
  };
230
238
 
231
239
  return (// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
232
- (0, _core.jsx)(_leftSidebarOuter.default, {
240
+ (0, _react2.jsx)(_leftSidebarOuter.default, {
233
241
  ref: leftSideBarRef,
234
242
  testId: testId,
235
243
  onMouseOver: onMouseOver,
@@ -237,20 +245,21 @@ var LeftSidebar = function LeftSidebar(props) {
237
245
  id: id,
238
246
  isFixed: isFixed,
239
247
  isFlyoutOpen: isFlyoutOpen
240
- }, (0, _core.jsx)(_slotDimensions.default, {
248
+ }, (0, _react2.jsx)(_slotDimensions.default, {
241
249
  variableName: _constants.VAR_LEFT_SIDEBAR_WIDTH,
242
250
  value: notFirstRun.current ? leftSidebarWidth : leftSidebarWidthOnMount
243
- }), (0, _core.jsx)(_leftSidebarInner.default, {
251
+ }), (0, _react2.jsx)(_leftSidebarInner.default, {
244
252
  isFixed: isFixed,
245
253
  isFlyoutOpen: isFlyoutOpen
246
- }, (0, _core.jsx)(_resizableChildrenWrapper.default, {
254
+ }, (0, _react2.jsx)(_resizableChildrenWrapper.default, {
247
255
  isFlyoutOpen: isFlyoutOpen,
248
256
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
249
257
  hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed'
250
- }, children), (0, _core.jsx)(_resizeControl.default, {
258
+ }, children), (0, _react2.jsx)(_resizeControl.default, {
251
259
  testId: testId,
252
260
  resizeGrabAreaLabel: resizeGrabAreaLabel,
253
- resizeButtonLabel: resizeButtonLabel,
261
+ resizeButtonLabel: resizeButtonLabel // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
262
+ ,
254
263
  overrides: overrides,
255
264
  onCollapse: onCollapse,
256
265
  onExpand: onExpand,
@@ -11,7 +11,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
 
12
12
  var _react = require("react");
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _accessibility = require("@atlaskit/motion/accessibility");
17
17
 
@@ -29,8 +29,8 @@ var _slotFocusRing = _interopRequireDefault(require("./internal/slot-focus-ring"
29
29
 
30
30
  /** @jsx jsx */
31
31
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
32
- var prefersReducedMotionStyles = (0, _core.css)((0, _accessibility.prefersReducedMotion)());
33
- var mainStyles = (0, _core.css)({
32
+ var prefersReducedMotionStyles = (0, _react2.css)((0, _accessibility.prefersReducedMotion)());
33
+ var mainStyles = (0, _react2.css)({
34
34
  minWidth: 0,
35
35
  marginLeft: 0,
36
36
  // Prevent flex container from blowing up when there's super wide content.
@@ -38,7 +38,7 @@ var mainStyles = (0, _core.css)({
38
38
  // Transition negative margin on main in sync with the increase in width of leftSidebar.
39
39
  transition: "margin-left ".concat(_constants.TRANSITION_DURATION, "ms ").concat(_curves.easeOut, " 0s")
40
40
  });
41
- var draggingStyles = (0, _core.css)({
41
+ var draggingStyles = (0, _react2.css)({
42
42
  cursor: 'ew-resize',
43
43
  // Make sure drag to resize remains snappy.
44
44
  transition: 'none'
@@ -50,9 +50,17 @@ var draggingStyles = (0, _core.css)({
50
50
  * while main remains in place.
51
51
  */
52
52
 
53
- var flyoutStyles = (0, _core.css)({
53
+ var flyoutStyles = (0, _react2.css)({
54
54
  marginLeft: "calc(-1 * var(--".concat(_constants.VAR_LEFT_SIDEBAR_FLYOUT, ", ").concat(_constants.DEFAULT_LEFT_SIDEBAR_FLYOUT_WIDTH, "px) + ").concat(_constants.COLLAPSED_LEFT_SIDEBAR_WIDTH, "px)")
55
55
  });
56
+ /**
57
+ * __Main__
58
+ *
59
+ * Provides a slot for main content within the PageLayout.
60
+ *
61
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
62
+ * - [Code](https://atlassian.design/components/page-layout/code)
63
+ */
56
64
 
57
65
  var Main = function Main(props) {
58
66
  var children = props.children,
@@ -67,9 +75,9 @@ var Main = function Main(props) {
67
75
  isFlyoutOpen = _useContext$leftSideb.isFlyoutOpen,
68
76
  isFixed = _useContext$leftSideb.isFixed;
69
77
 
70
- return (0, _core.jsx)(_slotFocusRing.default, null, function (_ref) {
78
+ return (0, _react2.jsx)(_slotFocusRing.default, null, function (_ref) {
71
79
  var className = _ref.className;
72
- return (0, _core.jsx)("div", (0, _extends2.default)({
80
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
73
81
  "data-testid": testId,
74
82
  css: [mainStyles, isDragging && draggingStyles, isFlyoutOpen && !isFixed && flyoutStyles, prefersReducedMotionStyles],
75
83
  className: className,
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _constants = require("../../common/constants");
19
19
 
@@ -24,7 +24,7 @@ var _skipLinks = require("../skip-links");
24
24
  /** @jsx jsx */
25
25
  var pageLayoutSelector = (0, _defineProperty2.default)({}, _constants.PAGE_LAYOUT_CONTAINER_SELECTOR, true);
26
26
  var gridTemplateAreas = "\n \"".concat(_constants.LEFT_PANEL, " ").concat(_constants.BANNER, " ").concat(_constants.RIGHT_PANEL, "\"\n \"").concat(_constants.LEFT_PANEL, " ").concat(_constants.TOP_NAVIGATION, " ").concat(_constants.RIGHT_PANEL, "\"\n \"").concat(_constants.LEFT_PANEL, " ").concat(_constants.CONTENT, " ").concat(_constants.RIGHT_PANEL, "\"\n ");
27
- var gridStyles = (0, _core.css)({
27
+ var gridStyles = (0, _react2.css)({
28
28
  display: 'grid',
29
29
  height: '100%',
30
30
  gridTemplateAreas: gridTemplateAreas,
@@ -32,6 +32,14 @@ var gridStyles = (0, _core.css)({
32
32
  gridTemplateRows: "".concat(_constants.BANNER_HEIGHT, " ").concat(_constants.TOP_NAVIGATION_HEIGHT, " auto"),
33
33
  outline: 'none'
34
34
  });
35
+ /**
36
+ * __Page layout__
37
+ *
38
+ * A collection of components which let you compose an application's page layout.
39
+ *
40
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
41
+ * - [Code](https://atlassian.design/components/page-layout/code)
42
+ */
35
43
 
36
44
  var PageLayout = function PageLayout(_ref) {
37
45
  var _ref$skipLinksLabel = _ref.skipLinksLabel,
@@ -40,13 +48,13 @@ var PageLayout = function PageLayout(_ref) {
40
48
  testId = _ref.testId,
41
49
  onLeftSidebarExpand = _ref.onLeftSidebarExpand,
42
50
  onLeftSidebarCollapse = _ref.onLeftSidebarCollapse;
43
- return (0, _core.jsx)(_react.Fragment, null, (0, _core.jsx)(_controllers.SkipLinksController, null, (0, _core.jsx)(_skipLinks.SkipLinkWrapper, {
51
+ return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_controllers.SkipLinksController, null, (0, _react2.jsx)(_skipLinks.SkipLinkWrapper, {
44
52
  skipLinksLabel: skipLinksLabel
45
- }), (0, _core.jsx)("div", (0, _extends2.default)({}, pageLayoutSelector, {
53
+ }), (0, _react2.jsx)("div", (0, _extends2.default)({}, pageLayoutSelector, {
46
54
  "data-testid": testId,
47
55
  css: gridStyles,
48
56
  tabIndex: -1
49
- }), (0, _core.jsx)(_controllers.SidebarResizeController, {
57
+ }), (0, _react2.jsx)(_controllers.SidebarResizeController, {
50
58
  onLeftSidebarCollapse: onLeftSidebarCollapse,
51
59
  onLeftSidebarExpand: onLeftSidebarExpand
52
60
  }, children))));
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _constants = require("../../common/constants");
19
19
 
@@ -26,16 +26,24 @@ var _slotFocusRing = _interopRequireDefault(require("./internal/slot-focus-ring"
26
26
  var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
27
27
 
28
28
  /** @jsx jsx */
29
- var baseStyles = (0, _core.css)({
29
+ var baseStyles = (0, _react2.css)({
30
30
  gridArea: _constants.RIGHT_PANEL
31
31
  });
32
- var fixedStyles = (0, _core.css)({
32
+ var fixedStyles = (0, _react2.css)({
33
33
  width: _constants.RIGHT_PANEL_WIDTH,
34
34
  position: 'fixed',
35
35
  top: 0,
36
36
  right: 0,
37
37
  bottom: 0
38
38
  });
39
+ /**
40
+ * __Right panel__
41
+ *
42
+ * Provides a slot for a right panel within the PageLayout.
43
+ *
44
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
45
+ * - [Code](https://atlassian.design/components/page-layout/code)
46
+ */
39
47
 
40
48
  var RightPanel = function RightPanel(props) {
41
49
  var children = props.children,
@@ -54,14 +62,14 @@ var RightPanel = function RightPanel(props) {
54
62
  };
55
63
  }, [rightPanelWidth]);
56
64
  (0, _controllers.useSkipLink)(id, skipLinkTitle);
57
- return (0, _core.jsx)(_slotFocusRing.default, null, function (_ref) {
65
+ return (0, _react2.jsx)(_slotFocusRing.default, null, function (_ref) {
58
66
  var className = _ref.className;
59
- return (0, _core.jsx)("div", (0, _extends2.default)({
67
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
60
68
  css: [baseStyles, isFixed && fixedStyles],
61
69
  className: className,
62
70
  "data-testid": testId,
63
71
  id: id
64
- }, (0, _utils.getPageLayoutSlotSelector)('right-panel')), (0, _core.jsx)(_slotDimensions.default, {
72
+ }, (0, _utils.getPageLayoutSlotSelector)('right-panel')), (0, _react2.jsx)(_slotDimensions.default, {
65
73
  variableName: _constants.VAR_RIGHT_PANEL_WIDTH,
66
74
  value: rightPanelWidth
67
75
  }), children);
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _constants = require("../../common/constants");
19
19
 
@@ -33,7 +33,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
33
33
  * If we were to apply `position: fixed` to the outer wrapper, it will be popped
34
34
  * out of its flex container and Main would stretch to occupy all the space.
35
35
  */
36
- var fixedInnerStyles = (0, _core.css)({
36
+ var fixedInnerStyles = (0, _react2.css)({
37
37
  /**
38
38
  * This width on the inner wrapper is required when it is using fixed
39
39
  * positioning. Otherwise its width is slightly off.
@@ -44,10 +44,10 @@ var fixedInnerStyles = (0, _core.css)({
44
44
  right: "calc(".concat(_constants.RIGHT_PANEL_WIDTH, ")"),
45
45
  bottom: 0
46
46
  });
47
- var staticInnerStyles = (0, _core.css)({
47
+ var staticInnerStyles = (0, _react2.css)({
48
48
  height: '100%'
49
49
  });
50
- var outerStyles = (0, _core.css)({
50
+ var outerStyles = (0, _react2.css)({
51
51
  width: _constants.RIGHT_SIDEBAR_WIDTH
52
52
  });
53
53
  /**
@@ -56,13 +56,21 @@ var outerStyles = (0, _core.css)({
56
56
  * so the pseudo element forces it to take up the necessary width.
57
57
  */
58
58
 
59
- var fixedOuterStyles = (0, _core.css)({
59
+ var fixedOuterStyles = (0, _react2.css)({
60
60
  '&::after': {
61
61
  display: 'inline-block',
62
62
  width: _constants.RIGHT_SIDEBAR_WIDTH,
63
63
  content: "''"
64
64
  }
65
65
  });
66
+ /**
67
+ * __Right sidebar__
68
+ *
69
+ * Provides a slot for a right sidebar within the PageLayout.
70
+ *
71
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
72
+ * - [Code](https://atlassian.design/components/page-layout/code)
73
+ */
66
74
 
67
75
  var RightSidebar = function RightSidebar(props) {
68
76
  var children = props.children,
@@ -81,19 +89,19 @@ var RightSidebar = function RightSidebar(props) {
81
89
  };
82
90
  }, [rightSidebarWidth, id]);
83
91
  (0, _controllers.useSkipLink)(id, skipLinkTitle);
84
- return (0, _core.jsx)(_slotFocusRing.default, {
92
+ return (0, _react2.jsx)(_slotFocusRing.default, {
85
93
  isSidebar: true
86
94
  }, function (_ref) {
87
95
  var className = _ref.className;
88
- return (0, _core.jsx)("div", (0, _extends2.default)({
96
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
89
97
  "data-testid": testId,
90
98
  css: [outerStyles, isFixed && fixedOuterStyles],
91
99
  className: className,
92
100
  id: id
93
- }, (0, _utils.getPageLayoutSlotSelector)('right-sidebar')), (0, _core.jsx)(_slotDimensions.default, {
101
+ }, (0, _utils.getPageLayoutSlotSelector)('right-sidebar')), (0, _react2.jsx)(_slotDimensions.default, {
94
102
  variableName: _constants.VAR_RIGHT_SIDEBAR_WIDTH,
95
103
  value: rightSidebarWidth
96
- }), (0, _core.jsx)("div", {
104
+ }), (0, _react2.jsx)("div", {
97
105
  css: [isFixed && fixedInnerStyles, !isFixed && staticInnerStyles]
98
106
  }, children));
99
107
  });
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = require("react");
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _constants = require("../../common/constants");
19
19
 
@@ -26,17 +26,25 @@ var _slotFocusRing = _interopRequireDefault(require("./internal/slot-focus-ring"
26
26
  var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
27
27
 
28
28
  /** @jsx jsx */
29
- var topNavigationStyles = (0, _core.css)({
29
+ var topNavigationStyles = (0, _react2.css)({
30
30
  height: _constants.TOP_NAVIGATION_HEIGHT,
31
31
  gridArea: _constants.TOP_NAVIGATION
32
32
  });
33
- var fixedStyles = (0, _core.css)({
33
+ var fixedStyles = (0, _react2.css)({
34
34
  position: 'fixed',
35
35
  zIndex: 2,
36
36
  top: _constants.BANNER_HEIGHT,
37
37
  right: _constants.RIGHT_PANEL_WIDTH,
38
38
  left: _constants.LEFT_PANEL_WIDTH
39
39
  });
40
+ /**
41
+ * __Top navigation__
42
+ *
43
+ * Provides a slot for top navigation within the PageLayout.
44
+ *
45
+ * - [Examples](https://atlassian.design/components/page-layout/examples)
46
+ * - [Code](https://atlassian.design/components/page-layout/code)
47
+ */
40
48
 
41
49
  var TopNavigation = function TopNavigation(props) {
42
50
  var children = props.children,
@@ -56,14 +64,14 @@ var TopNavigation = function TopNavigation(props) {
56
64
  };
57
65
  }, [topNavigationHeight]);
58
66
  (0, _controllers.useSkipLink)(id, skipLinkTitle);
59
- return (0, _core.jsx)(_slotFocusRing.default, null, function (_ref) {
67
+ return (0, _react2.jsx)(_slotFocusRing.default, null, function (_ref) {
60
68
  var className = _ref.className;
61
- return (0, _core.jsx)("div", (0, _extends2.default)({
69
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
62
70
  css: [topNavigationStyles, isFixed && fixedStyles],
63
71
  className: className,
64
72
  "data-testid": testId,
65
73
  id: id
66
- }, (0, _utils.getPageLayoutSlotSelector)('top-navigation')), (0, _core.jsx)(_slotDimensions.default, {
74
+ }, (0, _utils.getPageLayoutSlotSelector)('top-navigation')), (0, _react2.jsx)(_slotDimensions.default, {
67
75
  variableName: _constants.VAR_TOP_NAVIGATION_HEIGHT,
68
76
  value: topNavigationHeight
69
77
  }), children);
@@ -13,14 +13,14 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
13
13
 
14
14
  var _react = require("react");
15
15
 
16
+ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
17
+
16
18
  var _excluded = ["setLeftSidebarState"];
17
19
 
18
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
21
 
20
22
  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) { (0, _defineProperty2.default)(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; }
21
23
 
22
- var noop = function noop() {};
23
-
24
24
  var leftSidebarState = {
25
25
  isFlyoutOpen: false,
26
26
  isResizing: false,
@@ -29,13 +29,14 @@ var leftSidebarState = {
29
29
  lastLeftSidebarWidth: 0,
30
30
  flyoutLockCount: 0,
31
31
  isFixed: true
32
- };
32
+ }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
33
+
33
34
  var SidebarResizeContext = /*#__PURE__*/(0, _react.createContext)({
34
35
  isLeftSidebarCollapsed: false,
35
- expandLeftSidebar: noop,
36
- collapseLeftSidebar: noop,
36
+ expandLeftSidebar: _noop.default,
37
+ collapseLeftSidebar: _noop.default,
37
38
  leftSidebarState: leftSidebarState,
38
- setLeftSidebarState: noop
39
+ setLeftSidebarState: _noop.default
39
40
  });
40
41
  exports.SidebarResizeContext = SidebarResizeContext;
41
42
 
@@ -47,7 +48,7 @@ var usePageLayoutResize = function usePageLayoutResize() {
47
48
  return context;
48
49
  };
49
50
  /**
50
- * **WARNING:** This hook is intended as a temporary solution and
51
+ * _**WARNING:**_ This hook is intended as a temporary solution and
51
52
  * is likely to be removed in a future version of page-layout.
52
53
  *
53
54
  * ---