@atlaskit/page-layout 1.7.8 → 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,11 @@
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
+
3
9
  ## 1.7.8
4
10
 
5
11
  ### 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',
@@ -75,6 +75,7 @@ var GrabArea = function GrabArea(_ref) {
75
75
  ,
76
76
  role: "separator",
77
77
  css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
78
+ "aria-orientation": "vertical",
78
79
  "aria-valuenow": leftSidebarPercentageExpanded,
79
80
  "aria-valuemin": 0,
80
81
  "aria-valuemax": 100,
@@ -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
@@ -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.8",
3
+ "version": "1.7.9",
4
4
  "sideEffects": false
5
5
  }
@@ -74,6 +74,7 @@ const GrabArea = ({
74
74
  ,
75
75
  role: "separator",
76
76
  css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
77
+ "aria-orientation": "vertical",
77
78
  "aria-valuenow": leftSidebarPercentageExpanded,
78
79
  "aria-valuemin": 0,
79
80
  "aria-valuemax": 100,
@@ -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
@@ -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.8",
3
+ "version": "1.7.9",
4
4
  "sideEffects": false
5
5
  }
@@ -69,6 +69,7 @@ var GrabArea = function GrabArea(_ref) {
69
69
  ,
70
70
  role: "separator",
71
71
  css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles],
72
+ "aria-orientation": "vertical",
72
73
  "aria-valuenow": leftSidebarPercentageExpanded,
73
74
  "aria-valuemin": 0,
74
75
  "aria-valuemax": 100,
@@ -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
@@ -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.8",
3
+ "version": "1.7.9",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.8",
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/"
@@ -0,0 +1,174 @@
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
+ ```