@atlaskit/page-layout 1.7.7 → 1.7.8

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 1.7.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6a33c4fd6b6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a33c4fd6b6) - Removes unnecessary aria attribute from grab area in left sidebar.
8
+
3
9
  ## 1.7.7
4
10
 
5
11
  ### Patch Changes
@@ -31,10 +31,13 @@ const ExampleFooter = () => {
31
31
  component={Container}
32
32
  description={
33
33
  <Fragment>
34
- {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
35
- <a css={linkStyles}>Give feedback</a> {' ∙ '}
36
- {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
37
- <a css={linkStyles}>Learn more</a>
34
+ <a href="https://www.atlassian.com/company/contact" css={linkStyles}>
35
+ Give feedback
36
+ </a>
37
+ {' ∙ '}
38
+ <a href="http://www.atlassian.com" css={linkStyles}>
39
+ Learn more
40
+ </a>
38
41
  </Fragment>
39
42
  }
40
43
  >
@@ -51,7 +51,10 @@ const PerfExample = () => {
51
51
  <NestableNavigationContent initialStack={[]}>
52
52
  <Section>
53
53
  <ButtonItem iconBefore={<WorkIcon label="" />}>Your work</ButtonItem>
54
- <LinkItem href="#" iconBefore={<CustomerIcon label="" />}>
54
+ <LinkItem
55
+ href="https://www.atlassian.com/customers"
56
+ iconBefore={<CustomerIcon label="" />}
57
+ >
55
58
  Your customers
56
59
  </LinkItem>
57
60
  <NestingItem
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
  var _react = require("@emotion/react");
12
12
  var _colors = require("@atlaskit/theme/colors");
13
13
  var _constants = require("../../common/constants");
14
- var _excluded = ["testId", "isLeftSidebarCollapsed"];
14
+ var _excluded = ["testId", "isDisabled", "isLeftSidebarCollapsed", "label", "leftSidebarPercentageExpanded", "onKeyDown", "onMouseDown", "onBlur", "onFocus"];
15
15
  /** @jsx jsx */
16
16
  /**
17
17
  * Determines the color of the grab line.
@@ -52,15 +52,36 @@ var lineStyles = (0, _react.css)({
52
52
  });
53
53
  var grabAreaLineSelector = (0, _defineProperty2.default)({}, _constants.GRAB_AREA_LINE_SELECTOR, true);
54
54
  var grabAreaSelector = (0, _defineProperty2.default)({}, _constants.GRAB_AREA_SELECTOR, true);
55
- // TODO: Consider allowing this to be controlled using arrow keys
56
55
  var GrabArea = function GrabArea(_ref) {
57
56
  var testId = _ref.testId,
57
+ isDisabled = _ref.isDisabled,
58
58
  isLeftSidebarCollapsed = _ref.isLeftSidebarCollapsed,
59
+ label = _ref.label,
60
+ leftSidebarPercentageExpanded = _ref.leftSidebarPercentageExpanded,
61
+ onKeyDown = _ref.onKeyDown,
62
+ onMouseDown = _ref.onMouseDown,
63
+ onBlur = _ref.onBlur,
64
+ onFocus = _ref.onFocus,
59
65
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
60
66
  return (0, _react.jsx)("button", (0, _extends2.default)({}, grabAreaSelector, {
67
+ "aria-label": label,
61
68
  "data-testid": testId,
62
- type: "button",
63
- css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles]
69
+ disabled: isDisabled,
70
+ type: "button"
71
+ // The separator role is applied to a button to utilize the native
72
+ // interactive and disabled functionality on the resize separator. While a
73
+ // range input would be more semantically accurate, it does not affect
74
+ // usability.
75
+ ,
76
+ role: "separator",
77
+ css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
78
+ "aria-valuenow": leftSidebarPercentageExpanded,
79
+ "aria-valuemin": 0,
80
+ "aria-valuemax": 100,
81
+ onKeyDown: onKeyDown,
82
+ onMouseDown: onMouseDown,
83
+ onFocus: onFocus,
84
+ onBlur: onBlur
64
85
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
65
86
  }, rest), (0, _react.jsx)("span", (0, _extends2.default)({
66
87
  css: lineStyles
@@ -325,26 +325,20 @@ var ResizeControl = function ResizeControl(_ref) {
325
325
  return Math.round(innerWidth / 2) - (0, _utils.getLeftPanelWidth)();
326
326
  }, []);
327
327
  var leftSidebarPercentageExpanded = (0, _utils.getLeftSidebarPercentage)(leftSidebarState.leftSidebarWidth, maxAriaWidth);
328
-
329
- /* eslint-disable jsx-a11y/role-supports-aria-props */
330
328
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", (0, _extends2.default)({}, cssSelector, {
331
329
  css: [resizeControlStyles, (isGrabAreaFocused || isLeftSidebarCollapsed) && showResizeButtonStyles]
332
330
  }), (0, _react2.jsx)(_shadow.default, {
333
331
  testId: testId && "".concat(testId, "-shadow")
334
332
  }), !(mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches) && (0, _react2.jsx)(_grabArea.default, {
335
- role: "separator",
336
- "aria-label": resizeGrabAreaLabel,
337
- "aria-valuenow": leftSidebarPercentageExpanded,
338
- "aria-valuemin": 0,
339
- "aria-valuemax": 100,
340
- "aria-expanded": !isLeftSidebarCollapsed,
333
+ isDisabled: isLeftSidebarCollapsed,
334
+ isLeftSidebarCollapsed: isLeftSidebarCollapsed,
335
+ label: resizeGrabAreaLabel,
336
+ leftSidebarPercentageExpanded: leftSidebarPercentageExpanded,
337
+ onBlur: onBlur,
338
+ onFocus: onFocus,
341
339
  onKeyDown: onKeyDown,
342
340
  onMouseDown: onMouseDown,
343
- onFocus: onFocus,
344
- onBlur: onBlur,
345
- testId: testId && "".concat(testId, "-grab-area"),
346
- isLeftSidebarCollapsed: isLeftSidebarCollapsed,
347
- disabled: isLeftSidebarCollapsed
341
+ testId: testId && "".concat(testId, "-grab-area")
348
342
  }), resizeButton.render(_resizeButton.default, {
349
343
  isLeftSidebarCollapsed: mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches ? !leftSidebarState.isFlyoutOpen : isLeftSidebarCollapsed,
350
344
  label: resizeButtonLabel,
@@ -353,7 +347,6 @@ var ResizeControl = function ResizeControl(_ref) {
353
347
  })), leftSidebarState.isResizing ? (0, _react2.jsx)(_react2.Global, {
354
348
  styles: globalResizingStyles
355
349
  }) : null);
356
- /* eslint-enable jsx-a11y/role-supports-aria-props */
357
350
  };
358
351
 
359
352
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "sideEffects": false
5
5
  }
@@ -51,15 +51,36 @@ const grabAreaLineSelector = {
51
51
  const grabAreaSelector = {
52
52
  [GRAB_AREA_SELECTOR]: true
53
53
  };
54
- // TODO: Consider allowing this to be controlled using arrow keys
55
54
  const GrabArea = ({
56
55
  testId,
56
+ isDisabled,
57
57
  isLeftSidebarCollapsed,
58
+ label,
59
+ leftSidebarPercentageExpanded,
60
+ onKeyDown,
61
+ onMouseDown,
62
+ onBlur,
63
+ onFocus,
58
64
  ...rest
59
65
  }) => jsx("button", _extends({}, grabAreaSelector, {
66
+ "aria-label": label,
60
67
  "data-testid": testId,
61
- type: "button",
62
- css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles]
68
+ disabled: isDisabled,
69
+ type: "button"
70
+ // The separator role is applied to a button to utilize the native
71
+ // interactive and disabled functionality on the resize separator. While a
72
+ // range input would be more semantically accurate, it does not affect
73
+ // usability.
74
+ ,
75
+ role: "separator",
76
+ css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
77
+ "aria-valuenow": leftSidebarPercentageExpanded,
78
+ "aria-valuemin": 0,
79
+ "aria-valuemax": 100,
80
+ onKeyDown: onKeyDown,
81
+ onMouseDown: onMouseDown,
82
+ onFocus: onFocus,
83
+ onBlur: onBlur
63
84
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
64
85
  }, rest), jsx("span", _extends({
65
86
  css: lineStyles
@@ -326,26 +326,20 @@ const ResizeControl = ({
326
326
  return Math.round(innerWidth / 2) - getLeftPanelWidth();
327
327
  }, []);
328
328
  const leftSidebarPercentageExpanded = getLeftSidebarPercentage(leftSidebarState.leftSidebarWidth, maxAriaWidth);
329
-
330
- /* eslint-disable jsx-a11y/role-supports-aria-props */
331
329
  return jsx(Fragment, null, jsx("div", _extends({}, cssSelector, {
332
330
  css: [resizeControlStyles, (isGrabAreaFocused || isLeftSidebarCollapsed) && showResizeButtonStyles]
333
331
  }), jsx(Shadow, {
334
332
  testId: testId && `${testId}-shadow`
335
333
  }), !(mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches) && jsx(GrabArea, {
336
- role: "separator",
337
- "aria-label": resizeGrabAreaLabel,
338
- "aria-valuenow": leftSidebarPercentageExpanded,
339
- "aria-valuemin": 0,
340
- "aria-valuemax": 100,
341
- "aria-expanded": !isLeftSidebarCollapsed,
334
+ isDisabled: isLeftSidebarCollapsed,
335
+ isLeftSidebarCollapsed: isLeftSidebarCollapsed,
336
+ label: resizeGrabAreaLabel,
337
+ leftSidebarPercentageExpanded: leftSidebarPercentageExpanded,
338
+ onBlur: onBlur,
339
+ onFocus: onFocus,
342
340
  onKeyDown: onKeyDown,
343
341
  onMouseDown: onMouseDown,
344
- onFocus: onFocus,
345
- onBlur: onBlur,
346
- testId: testId && `${testId}-grab-area`,
347
- isLeftSidebarCollapsed: isLeftSidebarCollapsed,
348
- disabled: isLeftSidebarCollapsed
342
+ testId: testId && `${testId}-grab-area`
349
343
  }), resizeButton.render(ResizeButton, {
350
344
  isLeftSidebarCollapsed: mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches ? !leftSidebarState.isFlyoutOpen : isLeftSidebarCollapsed,
351
345
  label: resizeButtonLabel,
@@ -354,7 +348,6 @@ const ResizeControl = ({
354
348
  })), leftSidebarState.isResizing ? jsx(Global, {
355
349
  styles: globalResizingStyles
356
350
  }) : null);
357
- /* eslint-enable jsx-a11y/role-supports-aria-props */
358
351
  };
359
352
 
360
353
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- var _excluded = ["testId", "isLeftSidebarCollapsed"];
4
+ var _excluded = ["testId", "isDisabled", "isLeftSidebarCollapsed", "label", "leftSidebarPercentageExpanded", "onKeyDown", "onMouseDown", "onBlur", "onFocus"];
5
5
  /** @jsx jsx */
6
6
 
7
7
  import { css, jsx } from '@emotion/react';
@@ -46,15 +46,36 @@ var lineStyles = css({
46
46
  });
47
47
  var grabAreaLineSelector = _defineProperty({}, GRAB_AREA_LINE_SELECTOR, true);
48
48
  var grabAreaSelector = _defineProperty({}, GRAB_AREA_SELECTOR, true);
49
- // TODO: Consider allowing this to be controlled using arrow keys
50
49
  var GrabArea = function GrabArea(_ref) {
51
50
  var testId = _ref.testId,
51
+ isDisabled = _ref.isDisabled,
52
52
  isLeftSidebarCollapsed = _ref.isLeftSidebarCollapsed,
53
+ label = _ref.label,
54
+ leftSidebarPercentageExpanded = _ref.leftSidebarPercentageExpanded,
55
+ onKeyDown = _ref.onKeyDown,
56
+ onMouseDown = _ref.onMouseDown,
57
+ onBlur = _ref.onBlur,
58
+ onFocus = _ref.onFocus,
53
59
  rest = _objectWithoutProperties(_ref, _excluded);
54
60
  return jsx("button", _extends({}, grabAreaSelector, {
61
+ "aria-label": label,
55
62
  "data-testid": testId,
56
- type: "button",
57
- css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles]
63
+ disabled: isDisabled,
64
+ type: "button"
65
+ // The separator role is applied to a button to utilize the native
66
+ // interactive and disabled functionality on the resize separator. While a
67
+ // range input would be more semantically accurate, it does not affect
68
+ // usability.
69
+ ,
70
+ role: "separator",
71
+ css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
72
+ "aria-valuenow": leftSidebarPercentageExpanded,
73
+ "aria-valuemin": 0,
74
+ "aria-valuemax": 100,
75
+ onKeyDown: onKeyDown,
76
+ onMouseDown: onMouseDown,
77
+ onFocus: onFocus,
78
+ onBlur: onBlur
58
79
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
59
80
  }, rest), jsx("span", _extends({
60
81
  css: lineStyles
@@ -321,26 +321,20 @@ var ResizeControl = function ResizeControl(_ref) {
321
321
  return Math.round(innerWidth / 2) - getLeftPanelWidth();
322
322
  }, []);
323
323
  var leftSidebarPercentageExpanded = getLeftSidebarPercentage(leftSidebarState.leftSidebarWidth, maxAriaWidth);
324
-
325
- /* eslint-disable jsx-a11y/role-supports-aria-props */
326
324
  return jsx(Fragment, null, jsx("div", _extends({}, cssSelector, {
327
325
  css: [resizeControlStyles, (isGrabAreaFocused || isLeftSidebarCollapsed) && showResizeButtonStyles]
328
326
  }), jsx(Shadow, {
329
327
  testId: testId && "".concat(testId, "-shadow")
330
328
  }), !(mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches) && jsx(GrabArea, {
331
- role: "separator",
332
- "aria-label": resizeGrabAreaLabel,
333
- "aria-valuenow": leftSidebarPercentageExpanded,
334
- "aria-valuemin": 0,
335
- "aria-valuemax": 100,
336
- "aria-expanded": !isLeftSidebarCollapsed,
329
+ isDisabled: isLeftSidebarCollapsed,
330
+ isLeftSidebarCollapsed: isLeftSidebarCollapsed,
331
+ label: resizeGrabAreaLabel,
332
+ leftSidebarPercentageExpanded: leftSidebarPercentageExpanded,
333
+ onBlur: onBlur,
334
+ onFocus: onFocus,
337
335
  onKeyDown: onKeyDown,
338
336
  onMouseDown: onMouseDown,
339
- onFocus: onFocus,
340
- onBlur: onBlur,
341
- testId: testId && "".concat(testId, "-grab-area"),
342
- isLeftSidebarCollapsed: isLeftSidebarCollapsed,
343
- disabled: isLeftSidebarCollapsed
337
+ testId: testId && "".concat(testId, "-grab-area")
344
338
  }), resizeButton.render(ResizeButton, {
345
339
  isLeftSidebarCollapsed: mobileMediaQuery !== null && mobileMediaQuery !== void 0 && mobileMediaQuery.matches ? !leftSidebarState.isFlyoutOpen : isLeftSidebarCollapsed,
346
340
  label: resizeButtonLabel,
@@ -349,7 +343,6 @@ var ResizeControl = function ResizeControl(_ref) {
349
343
  })), leftSidebarState.isResizing ? jsx(Global, {
350
344
  styles: globalResizingStyles
351
345
  }) : null);
352
- /* eslint-enable jsx-a11y/role-supports-aria-props */
353
346
  };
354
347
 
355
348
  // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "sideEffects": false
5
5
  }
@@ -1,9 +1,16 @@
1
1
  /** @jsx jsx */
2
- import { ComponentProps } from 'react';
2
+ import { ComponentProps, FocusEvent, KeyboardEvent, MouseEvent } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  export type GrabAreaProps = {
5
- testId?: string;
5
+ isDisabled: boolean;
6
6
  isLeftSidebarCollapsed: boolean;
7
+ label: string;
8
+ leftSidebarPercentageExpanded: number;
9
+ onBlur: (event: FocusEvent) => void;
10
+ onFocus: (event: FocusEvent) => void;
11
+ onKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
12
+ onMouseDown: (event: MouseEvent<HTMLButtonElement>) => void;
13
+ testId?: string;
7
14
  } & ComponentProps<'button'>;
8
- declare const GrabArea: ({ testId, isLeftSidebarCollapsed, ...rest }: GrabAreaProps) => jsx.JSX.Element;
15
+ declare const GrabArea: ({ testId, isDisabled, isLeftSidebarCollapsed, label, leftSidebarPercentageExpanded, onKeyDown, onMouseDown, onBlur, onFocus, ...rest }: GrabAreaProps) => jsx.JSX.Element;
9
16
  export default GrabArea;
@@ -1,9 +1,16 @@
1
1
  /** @jsx jsx */
2
- import { ComponentProps } from 'react';
2
+ import { ComponentProps, FocusEvent, KeyboardEvent, MouseEvent } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  export type GrabAreaProps = {
5
- testId?: string;
5
+ isDisabled: boolean;
6
6
  isLeftSidebarCollapsed: boolean;
7
+ label: string;
8
+ leftSidebarPercentageExpanded: number;
9
+ onBlur: (event: FocusEvent) => void;
10
+ onFocus: (event: FocusEvent) => void;
11
+ onKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
12
+ onMouseDown: (event: MouseEvent<HTMLButtonElement>) => void;
13
+ testId?: string;
7
14
  } & ComponentProps<'button'>;
8
- declare const GrabArea: ({ testId, isLeftSidebarCollapsed, ...rest }: GrabAreaProps) => jsx.JSX.Element;
15
+ declare const GrabArea: ({ testId, isDisabled, isLeftSidebarCollapsed, label, leftSidebarPercentageExpanded, onKeyDown, onMouseDown, onBlur, onFocus, ...rest }: GrabAreaProps) => jsx.JSX.Element;
9
16
  export default GrabArea;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
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/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/platform-feature-flags": "^0.2.0",
40
40
  "@atlaskit/primitives": "^1.0.0",
41
41
  "@atlaskit/theme": "^12.5.0",
42
- "@atlaskit/tokens": "^1.11.0",
42
+ "@atlaskit/tokens": "^1.13.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
45
45
  "bind-event-listener": "^2.1.1",
@@ -59,7 +59,6 @@
59
59
  "@atlaskit/notification-indicator": "^9.1.0",
60
60
  "@atlaskit/notification-log-client": "^6.1.0",
61
61
  "@atlaskit/popup": "^1.8.0",
62
- "@atlaskit/section-message": "^6.4.0",
63
62
  "@atlaskit/side-navigation": "^1.10.0",
64
63
  "@atlaskit/ssr": "*",
65
64
  "@atlaskit/tooltip": "*",
@@ -113,4 +112,4 @@
113
112
  "type": "boolean"
114
113
  }
115
114
  }
116
- }
115
+ }
@@ -1,174 +0,0 @@
1
- ## API Report File for "@atlaskit/page-layout"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { ButtonHTMLAttributes } from 'react';
8
- import { ElementType } from 'react';
9
- import { jsx } from '@emotion/react';
10
- import { KeyboardEvent as KeyboardEvent_2 } from 'react';
11
- import { MouseEvent as MouseEvent_2 } from 'react';
12
- import { ReactElement } from 'react';
13
- import { ReactNode } from 'react';
14
-
15
- // @public
16
- export const Banner: (props: SlotHeightProps) => jsx.JSX.Element;
17
-
18
- // @public (undocumented)
19
- export const BANNER_HEIGHT: string;
20
-
21
- // @public
22
- export const Content: (props: ContentProps) => jsx.JSX.Element;
23
-
24
- // @public (undocumented)
25
- interface ContentProps {
26
- children: ReactNode;
27
- testId?: string;
28
- }
29
-
30
- // @public (undocumented)
31
- type DimensionNames = 'bannerHeight' | 'leftPanelWidth' | 'leftSidebarFlyoutWidth' | 'leftSidebarWidth' | 'rightPanelWidth' | 'rightSidebarWidth' | 'topNavigationHeight';
32
-
33
- // @public (undocumented)
34
- export type Dimensions = Partial<Record<DimensionNames, number>>;
35
-
36
- // @public (undocumented)
37
- export const LEFT_PANEL_WIDTH: string;
38
-
39
- // @public (undocumented)
40
- export const LEFT_SIDEBAR_WIDTH: string;
41
-
42
- // @public
43
- export const LeftPanel: (props: SlotWidthProps) => jsx.JSX.Element;
44
-
45
- // @public
46
- export const LeftSidebar: (props: LeftSidebarProps) => jsx.JSX.Element;
47
-
48
- // @public (undocumented)
49
- interface LeftSidebarProps extends SlotWidthProps {
50
- collapsedState?: 'collapsed' | 'expanded';
51
- onCollapse?: () => void;
52
- onExpand?: () => void;
53
- onFlyoutCollapse?: () => void;
54
- onFlyoutExpand?: () => void;
55
- onResizeEnd?: (leftSidebarState: LeftSidebarState) => void;
56
- onResizeStart?: (leftSidebarState: LeftSidebarState) => void;
57
- overrides?: {
58
- ResizeButton?: {
59
- render?: (Component: ElementType<ResizeButtonProps>, props: ResizeButtonProps) => ReactElement;
60
- };
61
- };
62
- resizeButtonLabel?: string;
63
- resizeGrabAreaLabel?: string;
64
- testId?: string;
65
- width?: number;
66
- }
67
-
68
- // @public (undocumented)
69
- export type LeftSidebarState = {
70
- isFlyoutOpen: boolean;
71
- isResizing: boolean;
72
- isLeftSidebarCollapsed: boolean;
73
- leftSidebarWidth: number;
74
- lastLeftSidebarWidth: number;
75
- flyoutLockCount: number;
76
- isFixed: boolean;
77
- };
78
-
79
- // @public
80
- export const LeftSidebarWithoutResize: (props: SlotWidthProps) => jsx.JSX.Element;
81
-
82
- // @public
83
- export const Main: (props: SlotWidthProps) => jsx.JSX.Element;
84
-
85
- // @public
86
- export const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => jsx.JSX.Element;
87
-
88
- // @public (undocumented)
89
- interface PageLayoutProps extends SidebarResizeControllerProps {
90
- // (undocumented)
91
- skipLinksLabel?: string;
92
- testId?: string;
93
- }
94
-
95
- // @public (undocumented)
96
- type ResizeButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
97
- isLeftSidebarCollapsed: boolean;
98
- label: string;
99
- testId?: string;
100
- };
101
-
102
- // @public (undocumented)
103
- export const RIGHT_PANEL_WIDTH: string;
104
-
105
- // @public (undocumented)
106
- export const RIGHT_SIDEBAR_WIDTH: string;
107
-
108
- // @public
109
- export const RightPanel: (props: SlotWidthProps) => jsx.JSX.Element;
110
-
111
- // @public
112
- export const RightSidebar: (props: SlotWidthProps) => jsx.JSX.Element;
113
-
114
- // @public (undocumented)
115
- type SidebarResizeControllerProps = {
116
- children: ReactNode;
117
- onLeftSidebarExpand?: (leftSidebarState: LeftSidebarState) => void;
118
- onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
119
- };
120
-
121
- // @public (undocumented)
122
- type SkipLinkData = {
123
- id: string;
124
- skipLinkTitle: string;
125
- listIndex?: number;
126
- };
127
-
128
- // @public (undocumented)
129
- export interface SlotHeightProps extends SlotProps {
130
- height?: number;
131
- shouldPersistHeight?: boolean;
132
- }
133
-
134
- // @public (undocumented)
135
- interface SlotProps {
136
- children: ReactNode;
137
- // (undocumented)
138
- id?: string;
139
- isFixed?: boolean;
140
- // (undocumented)
141
- skipLinkTitle?: string;
142
- testId?: string;
143
- }
144
-
145
- // @public (undocumented)
146
- export interface SlotWidthProps extends SlotProps {
147
- shouldPersistWidth?: boolean;
148
- width?: number;
149
- }
150
-
151
- // @public (undocumented)
152
- export const TOP_NAVIGATION_HEIGHT: string;
153
-
154
- // @public
155
- export const TopNavigation: (props: SlotHeightProps) => jsx.JSX.Element;
156
-
157
- // @public (undocumented)
158
- export const useCustomSkipLink: (id: SkipLinkData['id'], skipLinkTitle: SkipLinkData['skipLinkTitle'], listIndex?: SkipLinkData['listIndex']) => void;
159
-
160
- // @public
161
- export const useLeftSidebarFlyoutLock: () => void;
162
-
163
- // @public (undocumented)
164
- export const usePageLayoutResize: () => {
165
- isLeftSidebarCollapsed: boolean;
166
- expandLeftSidebar: () => void;
167
- collapseLeftSidebar: (event?: KeyboardEvent_2 | MouseEvent_2, collapseWithoutTransition?: boolean) => void;
168
- toggleLeftSidebar: (event?: KeyboardEvent_2 | MouseEvent_2, collapseWithoutTransition?: boolean) => void;
169
- leftSidebarState: LeftSidebarState;
170
- };
171
-
172
- // (No @packageDocumentation comment for this package)
173
-
174
- ```