@atlaskit/page-layout 1.7.7 → 1.7.9

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,17 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 1.7.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`55c42f7ce9d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/55c42f7ce9d) - [ux] Add proper orientation to grab area.
8
+
9
+ ## 1.7.8
10
+
11
+ ### Patch Changes
12
+
13
+ - [`6a33c4fd6b6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a33c4fd6b6) - Removes unnecessary aria attribute from grab area in left sidebar.
14
+
3
15
  ## 1.7.7
4
16
 
5
17
  ### Patch Changes
@@ -48,7 +48,7 @@ const Wrapper = ({
48
48
 
49
49
  const sidebarWrapperStyles = css({
50
50
  height: '100%',
51
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
51
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
52
52
  nav: {
53
53
  minWidth: 20,
54
54
  overflowX: 'hidden',
@@ -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,37 @@ 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-orientation": "vertical",
79
+ "aria-valuenow": leftSidebarPercentageExpanded,
80
+ "aria-valuemin": 0,
81
+ "aria-valuemax": 100,
82
+ onKeyDown: onKeyDown,
83
+ onMouseDown: onMouseDown,
84
+ onFocus: onFocus,
85
+ onBlur: onBlur
64
86
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
65
87
  }, rest), (0, _react.jsx)("span", (0, _extends2.default)({
66
88
  css: lineStyles
@@ -37,7 +37,7 @@ var showResizeButtonStyles = (0, _react2.css)({
37
37
 
38
38
  // @ts-expect-error adding `!important` to style rules is currently a type error
39
39
  var globalResizingStyles = (0, _react2.css)({
40
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
40
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
41
41
  '*': {
42
42
  // Setting the cursor to be `ew-resize` on all elements so that even if the user
43
43
  // pointer slips off the resize handle, the cursor will still be the resize cursor
@@ -50,7 +50,7 @@ var globalResizingStyles = (0, _react2.css)({
50
50
  // - The current selection will resume after resizing
51
51
  userSelect: 'none !important'
52
52
  },
53
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
53
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
54
54
  iframe: {
55
55
  // Disabling pointer events on iframes when resizing
56
56
  // as iframes will swallower user events when the user is over them
@@ -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
@@ -11,7 +11,7 @@ var _colors = require("@atlaskit/theme/colors");
11
11
  var focusStyles = (0, _react.css)({
12
12
  ':focus': {
13
13
  outline: 'none',
14
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
14
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
15
15
  '> div': {
16
16
  boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
17
17
  outline: 'none'
@@ -26,7 +26,7 @@ var focusStyles = (0, _react.css)({
26
26
  var sidebarFocusStyles = (0, _react.css)({
27
27
  ':focus': {
28
28
  outline: 'none',
29
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
29
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
30
30
  '> div > div': {
31
31
  boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
32
32
  outline: 'none'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
4
  "sideEffects": false
5
5
  }
@@ -51,15 +51,37 @@ 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-orientation": "vertical",
78
+ "aria-valuenow": leftSidebarPercentageExpanded,
79
+ "aria-valuemin": 0,
80
+ "aria-valuemax": 100,
81
+ onKeyDown: onKeyDown,
82
+ onMouseDown: onMouseDown,
83
+ onFocus: onFocus,
84
+ onBlur: onBlur
63
85
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
64
86
  }, rest), jsx("span", _extends({
65
87
  css: lineStyles
@@ -31,7 +31,7 @@ const showResizeButtonStyles = css({
31
31
 
32
32
  // @ts-expect-error adding `!important` to style rules is currently a type error
33
33
  const globalResizingStyles = css({
34
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
34
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
35
35
  '*': {
36
36
  // Setting the cursor to be `ew-resize` on all elements so that even if the user
37
37
  // pointer slips off the resize handle, the cursor will still be the resize cursor
@@ -44,7 +44,7 @@ const globalResizingStyles = css({
44
44
  // - The current selection will resume after resizing
45
45
  userSelect: 'none !important'
46
46
  },
47
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
47
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
48
48
  iframe: {
49
49
  // Disabling pointer events on iframes when resizing
50
50
  // as iframes will swallower user events when the user is over them
@@ -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
@@ -19,7 +19,7 @@ const increaseHitAreaStyles = css({
19
19
 
20
20
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
21
21
  const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
22
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
22
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
23
23
  [UNSAFE_media.below.md]: {
24
24
  opacity: 1
25
25
  }
@@ -11,7 +11,7 @@ const prefersReducedMotionStyles = css(prefersReducedMotion());
11
11
 
12
12
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
13
13
  const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
14
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
14
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
15
15
  [UNSAFE_media.below.md]: {
16
16
  width: `${MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH}px`,
17
17
  position: 'fixed',
@@ -26,7 +26,7 @@ const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-l
26
26
 
27
27
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
28
28
  const mobileInnerFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
29
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
29
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
30
30
  [UNSAFE_media.below.md]: {
31
31
  width: `min(90vw, ${MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH}px)`,
32
32
  maxWidth: MAX_MOBILE_SIDEBAR_FLYOUT_WIDTH,
@@ -15,7 +15,7 @@ const prefersReducedMotionStyles = css(prefersReducedMotion());
15
15
 
16
16
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
17
17
  const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
18
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
18
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
19
19
  [UNSAFE_media.below.md]: {
20
20
  width: MOBILE_COLLAPSED_LEFT_SIDEBAR_WIDTH,
21
21
  cursor: 'pointer',
@@ -31,7 +31,7 @@ const mobileStyles = getBooleanFF('platform.design-system-team.responsive-page-l
31
31
 
32
32
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
33
33
  const mobileFlyoutStyles = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
34
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
34
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
35
35
  [UNSAFE_media.below.md]: {
36
36
  cursor: 'revert'
37
37
  }
@@ -5,7 +5,7 @@ import { B100 } from '@atlaskit/theme/colors';
5
5
  const focusStyles = css({
6
6
  ':focus': {
7
7
  outline: 'none',
8
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
8
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
9
9
  '> div': {
10
10
  boxShadow: `0px 0px 0px 2px inset ${`var(--ds-border-focused, ${B100})`}`,
11
11
  outline: 'none'
@@ -20,7 +20,7 @@ const focusStyles = css({
20
20
  const sidebarFocusStyles = css({
21
21
  ':focus': {
22
22
  outline: 'none',
23
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
23
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
24
24
  '> div > div': {
25
25
  boxShadow: `0px 0px 0px 2px inset ${`var(--ds-border-focused, ${B100})`}`,
26
26
  outline: 'none'
@@ -31,7 +31,7 @@ const gridStyles = css({
31
31
 
32
32
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- With a feature flag, this does not apply
33
33
  const gridStylesMobile = getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') ? css({
34
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
34
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
35
35
  [UNSAFE_media.below.md]: {
36
36
  gridTemplateAreas: gridTemplateAreasMobile,
37
37
  gridTemplateColumns: `${LEFT_PANEL_WIDTH} minmax(0, 1fr)`
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
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,37 @@ 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-orientation": "vertical",
73
+ "aria-valuenow": leftSidebarPercentageExpanded,
74
+ "aria-valuemin": 0,
75
+ "aria-valuemax": 100,
76
+ onKeyDown: onKeyDown,
77
+ onMouseDown: onMouseDown,
78
+ onFocus: onFocus,
79
+ onBlur: onBlur
58
80
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
59
81
  }, rest), jsx("span", _extends({
60
82
  css: lineStyles
@@ -33,7 +33,7 @@ var showResizeButtonStyles = css({
33
33
 
34
34
  // @ts-expect-error adding `!important` to style rules is currently a type error
35
35
  var globalResizingStyles = css({
36
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
36
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
37
37
  '*': {
38
38
  // Setting the cursor to be `ew-resize` on all elements so that even if the user
39
39
  // pointer slips off the resize handle, the cursor will still be the resize cursor
@@ -46,7 +46,7 @@ var globalResizingStyles = css({
46
46
  // - The current selection will resume after resizing
47
47
  userSelect: 'none !important'
48
48
  },
49
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
49
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
50
50
  iframe: {
51
51
  // Disabling pointer events on iframes when resizing
52
52
  // as iframes will swallower user events when the user is over them
@@ -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
@@ -5,7 +5,7 @@ import { B100 } from '@atlaskit/theme/colors';
5
5
  var focusStyles = css({
6
6
  ':focus': {
7
7
  outline: 'none',
8
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
8
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
9
9
  '> div': {
10
10
  boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(B100, ")")),
11
11
  outline: 'none'
@@ -20,7 +20,7 @@ var focusStyles = css({
20
20
  var sidebarFocusStyles = css({
21
21
  ':focus': {
22
22
  outline: 'none',
23
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
23
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
24
24
  '> div > div': {
25
25
  boxShadow: "0px 0px 0px 2px inset ".concat("var(--ds-border-focused, ".concat(B100, ")")),
26
26
  outline: 'none'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
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.9",
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
+ }