@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.
- package/CHANGELOG.md +23 -0
- package/__perf__/utils/perf-example.tsx +3 -3
- package/__perf__/utils/product-integration/{AtlassianNavigation.tsx → atlassian-navigation.tsx} +5 -5
- package/__perf__/utils/product-integration/{Create.tsx → create.tsx} +2 -1
- package/__perf__/utils/product-integration/{HelpPopup.tsx → help-popup.tsx} +1 -0
- package/__perf__/utils/product-integration/{NotificationsPopup.tsx → notifications-popup.tsx} +1 -1
- package/__perf__/utils/product-integration/{ProfilePopup.tsx → profile-popup.tsx} +2 -1
- package/__perf__/utils/product-integration/{SampleFooter.tsx → sample-footer.tsx} +2 -1
- package/__perf__/utils/product-integration/{SampleHeader.tsx → sample-header.tsx} +3 -1
- package/__perf__/utils/product-integration/{SideNavigation.tsx → side-navigation.tsx} +3 -3
- package/dist/cjs/common/safe-local-storage.js +1 -0
- package/dist/cjs/components/resize-control/grab-area.js +10 -8
- package/dist/cjs/components/resize-control/index.js +9 -8
- package/dist/cjs/components/resize-control/resize-button.js +11 -9
- package/dist/cjs/components/resize-control/shadow.js +6 -5
- package/dist/cjs/components/skip-links/skip-link-components.js +14 -12
- package/dist/cjs/components/slots/banner.js +14 -6
- package/dist/cjs/components/slots/content.js +11 -3
- package/dist/cjs/components/slots/internal/left-sidebar-inner.js +9 -8
- package/dist/cjs/components/slots/internal/left-sidebar-outer.js +9 -9
- package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +9 -8
- package/dist/cjs/components/slots/internal/slot-focus-ring.js +4 -4
- package/dist/cjs/components/slots/left-panel.js +14 -6
- package/dist/cjs/components/slots/left-sidebar-without-resize.js +13 -4
- package/dist/cjs/components/slots/left-sidebar.js +16 -7
- package/dist/cjs/components/slots/main.js +15 -7
- package/dist/cjs/components/slots/page-layout.js +13 -5
- package/dist/cjs/components/slots/right-panel.js +14 -6
- package/dist/cjs/components/slots/right-sidebar.js +17 -9
- package/dist/cjs/components/slots/top-navigation.js +14 -6
- package/dist/cjs/controllers/sidebar-resize-context.js +8 -7
- package/dist/cjs/controllers/sidebar-resize-controller.js +5 -4
- package/dist/cjs/controllers/skip-link-context.js +6 -3
- package/dist/cjs/controllers/skip-link-controller.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/safe-local-storage.js +1 -0
- package/dist/es2019/components/resize-control/grab-area.js +5 -3
- package/dist/es2019/components/resize-control/index.js +3 -2
- package/dist/es2019/components/resize-control/resize-button.js +5 -3
- package/dist/es2019/components/resize-control/shadow.js +3 -2
- package/dist/es2019/components/skip-links/skip-link-components.js +5 -3
- package/dist/es2019/components/slots/banner.js +9 -1
- package/dist/es2019/components/slots/content.js +9 -1
- package/dist/es2019/components/slots/internal/left-sidebar-inner.js +3 -2
- package/dist/es2019/components/slots/internal/left-sidebar-outer.js +1 -1
- package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +3 -2
- package/dist/es2019/components/slots/internal/slot-focus-ring.js +1 -1
- package/dist/es2019/components/slots/left-panel.js +9 -1
- package/dist/es2019/components/slots/left-sidebar-without-resize.js +9 -1
- package/dist/es2019/components/slots/left-sidebar.js +11 -2
- package/dist/es2019/components/slots/main.js +9 -1
- package/dist/es2019/components/slots/page-layout.js +9 -1
- package/dist/es2019/components/slots/right-panel.js +9 -1
- package/dist/es2019/components/slots/right-sidebar.js +9 -1
- package/dist/es2019/components/slots/top-navigation.js +9 -1
- package/dist/es2019/controllers/sidebar-resize-context.js +4 -5
- package/dist/es2019/controllers/sidebar-resize-controller.js +3 -3
- package/dist/es2019/controllers/skip-link-context.js +2 -3
- package/dist/es2019/controllers/skip-link-controller.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/safe-local-storage.js +1 -0
- package/dist/esm/components/resize-control/grab-area.js +5 -3
- package/dist/esm/components/resize-control/index.js +3 -2
- package/dist/esm/components/resize-control/resize-button.js +5 -3
- package/dist/esm/components/resize-control/shadow.js +3 -2
- package/dist/esm/components/skip-links/skip-link-components.js +5 -3
- package/dist/esm/components/slots/banner.js +9 -1
- package/dist/esm/components/slots/content.js +9 -1
- package/dist/esm/components/slots/internal/left-sidebar-inner.js +3 -2
- package/dist/esm/components/slots/internal/left-sidebar-outer.js +1 -1
- package/dist/esm/components/slots/internal/resizable-children-wrapper.js +3 -2
- package/dist/esm/components/slots/internal/slot-focus-ring.js +1 -1
- package/dist/esm/components/slots/left-panel.js +9 -1
- package/dist/esm/components/slots/left-sidebar-without-resize.js +9 -1
- package/dist/esm/components/slots/left-sidebar.js +11 -2
- package/dist/esm/components/slots/main.js +9 -1
- package/dist/esm/components/slots/page-layout.js +9 -1
- package/dist/esm/components/slots/right-panel.js +9 -1
- package/dist/esm/components/slots/right-sidebar.js +9 -1
- package/dist/esm/components/slots/top-navigation.js +9 -1
- package/dist/esm/controllers/sidebar-resize-context.js +4 -5
- package/dist/esm/controllers/sidebar-resize-controller.js +3 -3
- package/dist/esm/controllers/skip-link-context.js +2 -3
- package/dist/esm/controllers/skip-link-controller.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/common/types.d.ts +61 -21
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/components/resize-control/grab-area.d.ts +2 -1
- package/dist/types/components/resize-control/index.d.ts +2 -2
- package/dist/types/components/resize-control/resize-button.d.ts +2 -2
- package/dist/types/components/resize-control/shadow.d.ts +2 -2
- package/dist/types/components/skip-links/skip-link-components.d.ts +3 -2
- package/dist/types/components/slots/banner.d.ts +10 -2
- package/dist/types/components/slots/content.d.ts +14 -3
- package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +2 -1
- package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +2 -1
- package/dist/types/components/slots/internal/slot-focus-ring.d.ts +2 -1
- package/dist/types/components/slots/left-panel.d.ts +10 -2
- package/dist/types/components/slots/left-sidebar-without-resize.d.ts +10 -2
- package/dist/types/components/slots/left-sidebar.d.ts +10 -2
- package/dist/types/components/slots/main.d.ts +10 -2
- package/dist/types/components/slots/page-layout.d.ts +10 -2
- package/dist/types/components/slots/right-panel.d.ts +10 -2
- package/dist/types/components/slots/right-sidebar.d.ts +10 -2
- package/dist/types/components/slots/top-navigation.d.ts +10 -2
- package/dist/types/controllers/sidebar-resize-context.d.ts +1 -1
- package/dist/types/controllers/types.d.ts +9 -3
- package/package.json +13 -11
- package/report.api.md +219 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/page-layout
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3de296cfd19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3de296cfd19) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.2.8
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
18
|
+
|
|
19
|
+
## 1.2.7
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`26b3e978512`](https://bitbucket.org/atlassian/atlassian-frontend/commits/26b3e978512) - Internal code change turning on new linting rules.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 1.2.6
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
|
|
5
5
|
import { token } from '@atlaskit/tokens';
|
|
6
6
|
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
TopNavigation,
|
|
13
13
|
} from '../../src';
|
|
14
14
|
|
|
15
|
-
import JiraIntegrationExample from './product-integration/
|
|
16
|
-
import Sidebar from './product-integration/
|
|
15
|
+
import JiraIntegrationExample from './product-integration/atlassian-navigation';
|
|
16
|
+
import Sidebar from './product-integration/side-navigation';
|
|
17
17
|
|
|
18
18
|
const wrapperStyles = css({
|
|
19
19
|
boxSizing: 'border-box',
|
package/__perf__/utils/product-integration/{AtlassianNavigation.tsx → atlassian-navigation.tsx}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Fragment, MouseEvent, useState } from 'react';
|
|
3
3
|
|
|
4
|
-
import { jsx } from '@emotion/
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
// AFP-1799 storybook examples in src cause issues
|
|
7
7
|
import {
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
import Drawer from '@atlaskit/drawer';
|
|
15
15
|
import { JiraIcon, JiraLogo } from '@atlaskit/logo';
|
|
16
16
|
|
|
17
|
-
import { DefaultCreate } from './
|
|
18
|
-
import { HelpPopup } from './
|
|
19
|
-
import { NotificationsPopup } from './
|
|
20
|
-
import { ProfilePopup } from './
|
|
17
|
+
import { DefaultCreate } from './create';
|
|
18
|
+
import { HelpPopup } from './help-popup';
|
|
19
|
+
import { NotificationsPopup } from './notifications-popup';
|
|
20
|
+
import { ProfilePopup } from './profile-popup';
|
|
21
21
|
|
|
22
22
|
const ProductHomeExample = () => (
|
|
23
23
|
<ProductHome icon={JiraIcon} logo={JiraLogo} siteTitle="Extranet" />
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { Create } from '@atlaskit/atlassian-navigation';
|
|
4
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
4
5
|
import { token } from '@atlaskit/tokens';
|
|
5
6
|
|
|
6
7
|
const StyledTooltip = () => (
|
|
@@ -17,7 +18,7 @@ export const DefaultCreate = () => (
|
|
|
17
18
|
<Create
|
|
18
19
|
buttonTooltip={<StyledTooltip />}
|
|
19
20
|
iconButtonTooltip="Create button"
|
|
20
|
-
onClick={
|
|
21
|
+
onClick={noop}
|
|
21
22
|
text="Create"
|
|
22
23
|
testId="create-cta"
|
|
23
24
|
/>
|
|
@@ -3,6 +3,7 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { Help } from '@atlaskit/atlassian-navigation';
|
|
4
4
|
import { ButtonItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
5
5
|
import Popup from '@atlaskit/popup';
|
|
6
|
+
|
|
6
7
|
const HelpContent = () => (
|
|
7
8
|
<MenuGroup testId={'nav-help-content'}>
|
|
8
9
|
<Section title="Help">
|
package/__perf__/utils/product-integration/{NotificationsPopup.tsx → notifications-popup.tsx}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
import { Notifications } from '@atlaskit/atlassian-navigation';
|
|
7
7
|
import { Notifications as NotificationsIframe } from '@atlaskit/atlassian-notifications';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { Profile } from '@atlaskit/atlassian-navigation';
|
|
4
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
4
5
|
import { ButtonItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
5
6
|
import Popup from '@atlaskit/popup';
|
|
6
7
|
|
|
7
8
|
export const DefaultProfile = () => (
|
|
8
9
|
<Profile
|
|
9
10
|
icon={<img src={avatarUrl} alt="Your profile and settings" />}
|
|
10
|
-
onClick={
|
|
11
|
+
onClick={noop}
|
|
11
12
|
tooltip="Your profile and settings"
|
|
12
13
|
/>
|
|
13
14
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
import { CustomItemComponentProps } from '@atlaskit/menu';
|
|
7
7
|
import { Footer } from '@atlaskit/side-navigation';
|
|
@@ -9,6 +9,7 @@ import { B400, N200 } from '@atlaskit/theme/colors';
|
|
|
9
9
|
import { token } from '@atlaskit/tokens';
|
|
10
10
|
|
|
11
11
|
const Container: React.FC<CustomItemComponentProps> = (props) => {
|
|
12
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
12
13
|
return <div {...props} />;
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
|
-
import { jsx } from '@emotion/
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
import Icon from '@atlaskit/icon';
|
|
7
7
|
import { CustomItemComponentProps } from '@atlaskit/menu';
|
|
8
8
|
import { Header } from '@atlaskit/side-navigation';
|
|
9
|
+
|
|
9
10
|
const Container: React.FC<CustomItemComponentProps> = (props) => {
|
|
11
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
10
12
|
return <div {...props} />;
|
|
11
13
|
};
|
|
12
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
|
-
import { jsx } from '@emotion/
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
4
|
|
|
5
5
|
import DropboxIcon from '@atlaskit/icon/glyph/dropbox';
|
|
6
6
|
import FilterIcon from '@atlaskit/icon/glyph/filter';
|
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
SideNavigation,
|
|
21
21
|
} from '@atlaskit/side-navigation';
|
|
22
22
|
|
|
23
|
-
import SampleFooter from './
|
|
24
|
-
import SampleHeader from './
|
|
23
|
+
import SampleFooter from './sample-footer';
|
|
24
|
+
import SampleHeader from './sample-header';
|
|
25
25
|
|
|
26
26
|
const LanguageSettings = () => {
|
|
27
27
|
return (
|
|
@@ -11,6 +11,7 @@ exports.default = void 0;
|
|
|
11
11
|
var isLocalStorageSupported = function isLocalStorageSupported() {
|
|
12
12
|
try {
|
|
13
13
|
// use an random key to test
|
|
14
|
+
// eslint-disable-next-line @repo/internal/react/disallow-unstable-values
|
|
14
15
|
var testKey = "__test_".concat(Date.now(), "__");
|
|
15
16
|
localStorage.setItem(testKey, testKey);
|
|
16
17
|
localStorage.removeItem(testKey);
|
|
@@ -13,7 +13,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _react = require("@emotion/react");
|
|
17
17
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ var _excluded = ["testId", "isLeftSidebarCollapsed"];
|
|
|
27
27
|
* Used on internal leaf node, so naming collisions won't matter.
|
|
28
28
|
*/
|
|
29
29
|
var varLineColor = '--ds-line';
|
|
30
|
-
var grabAreaStyles = (0,
|
|
30
|
+
var grabAreaStyles = (0, _react.css)({
|
|
31
31
|
width: 24,
|
|
32
32
|
height: '100%',
|
|
33
33
|
padding: 0,
|
|
@@ -45,13 +45,13 @@ var grabAreaStyles = (0, _core.css)({
|
|
|
45
45
|
':active, :focus': (0, _defineProperty2.default)({}, varLineColor, "var(--ds-border-selected, ".concat(_colors.B200, ")"))
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
var grabAreaCollapsedStyles = (0,
|
|
48
|
+
var grabAreaCollapsedStyles = (0, _react.css)({
|
|
49
49
|
padding: 0,
|
|
50
50
|
backgroundColor: 'transparent',
|
|
51
51
|
border: 0,
|
|
52
52
|
cursor: 'default'
|
|
53
53
|
});
|
|
54
|
-
var lineStyles = (0,
|
|
54
|
+
var lineStyles = (0, _react.css)({
|
|
55
55
|
display: 'block',
|
|
56
56
|
width: 2,
|
|
57
57
|
height: '100%',
|
|
@@ -65,14 +65,16 @@ var GrabArea = function GrabArea(_ref) {
|
|
|
65
65
|
var testId = _ref.testId,
|
|
66
66
|
isLeftSidebarCollapsed = _ref.isLeftSidebarCollapsed,
|
|
67
67
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
68
|
-
return (0,
|
|
68
|
+
return (0, _react.jsx)("button", (0, _extends2.default)({}, grabAreaSelector, {
|
|
69
69
|
"data-testid": testId,
|
|
70
70
|
type: "button",
|
|
71
|
-
css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles]
|
|
72
|
-
|
|
71
|
+
css: [grabAreaStyles, isLeftSidebarCollapsed && grabAreaCollapsedStyles] // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
72
|
+
|
|
73
|
+
}, rest), (0, _react.jsx)("span", (0, _extends2.default)({
|
|
73
74
|
css: lineStyles
|
|
74
75
|
}, grabAreaLineSelector)));
|
|
75
|
-
};
|
|
76
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
77
|
+
|
|
76
78
|
|
|
77
79
|
var _default = GrabArea;
|
|
78
80
|
exports.default = _default;
|
|
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
|
|
16
16
|
var _react = require("react");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _react2 = require("@emotion/react");
|
|
19
19
|
|
|
20
20
|
var _bindEventListener = require("bind-event-listener");
|
|
21
21
|
|
|
@@ -38,14 +38,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
38
38
|
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; }
|
|
39
39
|
|
|
40
40
|
var cssSelector = (0, _defineProperty2.default)({}, _constants.RESIZE_CONTROL_SELECTOR, true);
|
|
41
|
-
var resizeControlStyles = (0,
|
|
41
|
+
var resizeControlStyles = (0, _react2.css)({
|
|
42
42
|
position: 'absolute',
|
|
43
43
|
top: 0,
|
|
44
44
|
bottom: 0,
|
|
45
45
|
left: '100%',
|
|
46
46
|
outline: 'none'
|
|
47
47
|
});
|
|
48
|
-
var showResizeButtonStyles = (0,
|
|
48
|
+
var showResizeButtonStyles = (0, _react2.css)({
|
|
49
49
|
'--ds--resize-button--opacity': 1
|
|
50
50
|
});
|
|
51
51
|
|
|
@@ -263,7 +263,7 @@ var ResizeControl = function ResizeControl(_ref) {
|
|
|
263
263
|
|
|
264
264
|
var resizeButton = _objectSpread({
|
|
265
265
|
render: function render(Component, props) {
|
|
266
|
-
return (0,
|
|
266
|
+
return (0, _react2.jsx)(Component, props);
|
|
267
267
|
}
|
|
268
268
|
}, overrides && overrides.ResizeButton); // This width is calculated once only on mount.
|
|
269
269
|
// This means resizing the window will cause this value to be incorrect for screen reader users,
|
|
@@ -277,11 +277,11 @@ var ResizeControl = function ResizeControl(_ref) {
|
|
|
277
277
|
var leftSidebarPercentageExpanded = (0, _utils.getLeftSidebarPercentage)(leftSidebarState.leftSidebarWidth, maxAriaWidth);
|
|
278
278
|
/* eslint-disable jsx-a11y/role-supports-aria-props */
|
|
279
279
|
|
|
280
|
-
return (0,
|
|
280
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({}, cssSelector, {
|
|
281
281
|
css: [resizeControlStyles, (isGrabAreaFocused || isLeftSidebarCollapsed) && showResizeButtonStyles]
|
|
282
|
-
}), (0,
|
|
282
|
+
}), (0, _react2.jsx)(_shadow.default, {
|
|
283
283
|
testId: testId && "".concat(testId, "-shadow")
|
|
284
|
-
}), (0,
|
|
284
|
+
}), (0, _react2.jsx)(_grabArea.default, {
|
|
285
285
|
role: "separator",
|
|
286
286
|
"aria-label": resizeGrabAreaLabel,
|
|
287
287
|
"aria-valuenow": leftSidebarPercentageExpanded,
|
|
@@ -302,7 +302,8 @@ var ResizeControl = function ResizeControl(_ref) {
|
|
|
302
302
|
testId: testId && "".concat(testId, "-resize-button")
|
|
303
303
|
}));
|
|
304
304
|
/* eslint-enable jsx-a11y/role-supports-aria-props */
|
|
305
|
-
};
|
|
305
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
306
|
+
|
|
306
307
|
|
|
307
308
|
var _default = ResizeControl;
|
|
308
309
|
exports.default = _default;
|
|
@@ -13,7 +13,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _react = require("@emotion/react");
|
|
17
17
|
|
|
18
18
|
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right"));
|
|
19
19
|
|
|
@@ -26,14 +26,14 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
26
26
|
var _constants = require("../../common/constants");
|
|
27
27
|
|
|
28
28
|
var _excluded = ["isLeftSidebarCollapsed", "label", "testId"];
|
|
29
|
-
var increaseHitAreaStyles = (0,
|
|
29
|
+
var increaseHitAreaStyles = (0, _react.css)({
|
|
30
30
|
position: 'absolute',
|
|
31
31
|
top: -8,
|
|
32
32
|
right: -12,
|
|
33
33
|
bottom: -8,
|
|
34
34
|
left: -8
|
|
35
35
|
});
|
|
36
|
-
var resizeIconButtonStyles = (0,
|
|
36
|
+
var resizeIconButtonStyles = (0, _react.css)({
|
|
37
37
|
width: 24,
|
|
38
38
|
height: 24,
|
|
39
39
|
padding: 0,
|
|
@@ -73,7 +73,7 @@ var resizeIconButtonStyles = (0, _core.css)({
|
|
|
73
73
|
opacity: 1
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
|
-
var resizeIconButtonExpandedStyles = (0,
|
|
76
|
+
var resizeIconButtonExpandedStyles = (0, _react.css)({
|
|
77
77
|
transform: 'rotate(180deg)',
|
|
78
78
|
transformOrigin: 7
|
|
79
79
|
});
|
|
@@ -89,7 +89,7 @@ var ResizeButton = function ResizeButton(_ref) {
|
|
|
89
89
|
label = _ref.label,
|
|
90
90
|
testId = _ref.testId,
|
|
91
91
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
92
|
-
return (0,
|
|
92
|
+
return (0, _react.jsx)("button", (0, _extends2.default)({}, cssSelector, {
|
|
93
93
|
// DO NOT remove. used as a CSS selector.
|
|
94
94
|
"aria-expanded": !isLeftSidebarCollapsed,
|
|
95
95
|
"aria-label": label,
|
|
@@ -98,13 +98,15 @@ var ResizeButton = function ResizeButton(_ref) {
|
|
|
98
98
|
"data-testid": testId // Prevents focus staying attached to the button
|
|
99
99
|
// when pressed
|
|
100
100
|
,
|
|
101
|
-
onMouseDown: preventDefault
|
|
102
|
-
|
|
101
|
+
onMouseDown: preventDefault // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
102
|
+
|
|
103
|
+
}, props), (0, _react.jsx)(_chevronRight.default, {
|
|
103
104
|
label: ""
|
|
104
|
-
}), (0,
|
|
105
|
+
}), (0, _react.jsx)("div", {
|
|
105
106
|
css: increaseHitAreaStyles
|
|
106
107
|
}));
|
|
107
|
-
};
|
|
108
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
109
|
+
|
|
108
110
|
|
|
109
111
|
var _default = ResizeButton;
|
|
110
112
|
exports.default = _default;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
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
|
var colorStops = "\n rgba(0, 0, 0, 0.2) 0px,\n rgba(0, 0, 0, 0.2) 1px,\n rgba(0, 0, 0, 0.1) 1px,\n rgba(0, 0, 0, 0) 100%\n ";
|
|
16
16
|
var direction = 'to left';
|
|
17
17
|
var transitionDuration = '0.22s';
|
|
18
|
-
var shadowStyles = (0,
|
|
18
|
+
var shadowStyles = (0, _react.css)({
|
|
19
19
|
width: 3,
|
|
20
20
|
position: 'absolute',
|
|
21
21
|
top: 0,
|
|
@@ -28,7 +28,7 @@ var shadowStyles = (0, _core.css)({
|
|
|
28
28
|
transitionProperty: 'left, opacity, width',
|
|
29
29
|
transitionTimingFunction: _motion.easeOut
|
|
30
30
|
});
|
|
31
|
-
var draggingStyles = (0,
|
|
31
|
+
var draggingStyles = (0, _react.css)({
|
|
32
32
|
width: 6,
|
|
33
33
|
left: -6,
|
|
34
34
|
background: "var(--ds-background-neutral-subtle, ".concat("linear-gradient(".concat(direction, ", ").concat(colorStops, ")"), ")"),
|
|
@@ -38,11 +38,12 @@ var draggingStyles = (0, _core.css)({
|
|
|
38
38
|
var Shadow = function Shadow(_ref) {
|
|
39
39
|
var testId = _ref.testId;
|
|
40
40
|
var isDragging = (0, _hooks.useIsSidebarDragging)();
|
|
41
|
-
return (0,
|
|
41
|
+
return (0, _react.jsx)("div", {
|
|
42
42
|
"data-testid": testId,
|
|
43
43
|
css: [shadowStyles, isDragging && draggingStyles]
|
|
44
44
|
});
|
|
45
|
-
};
|
|
45
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
46
|
+
|
|
46
47
|
|
|
47
48
|
var _default = Shadow;
|
|
48
49
|
exports.default = _default;
|
|
@@ -11,7 +11,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _react = require("@emotion/react");
|
|
15
15
|
|
|
16
16
|
var _motion = require("@atlaskit/motion");
|
|
17
17
|
|
|
@@ -26,8 +26,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
28
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
29
|
-
var prefersReducedMotionStyles = (0,
|
|
30
|
-
var skipLinkStyles = (0,
|
|
29
|
+
var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
|
|
30
|
+
var skipLinkStyles = (0, _react.css)({
|
|
31
31
|
margin: 10,
|
|
32
32
|
padding: '0.8rem 1rem',
|
|
33
33
|
position: 'fixed',
|
|
@@ -53,13 +53,13 @@ var skipLinkStyles = (0, _core.css)({
|
|
|
53
53
|
transform: 'translateY(0%)'
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
var skipLinkListStyles = (0,
|
|
56
|
+
var skipLinkListStyles = (0, _react.css)({
|
|
57
57
|
marginTop: 4,
|
|
58
58
|
paddingLeft: 0,
|
|
59
59
|
listStylePosition: 'outside',
|
|
60
60
|
listStyleType: 'none'
|
|
61
61
|
});
|
|
62
|
-
var skipLinkListItemStyles = (0,
|
|
62
|
+
var skipLinkListItemStyles = (0, _react.css)({
|
|
63
63
|
marginTop: 0
|
|
64
64
|
});
|
|
65
65
|
|
|
@@ -69,7 +69,8 @@ var assignIndex = function assignIndex(num, arr) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
return assignIndex(num + 1, arr);
|
|
72
|
-
};
|
|
72
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
73
|
+
|
|
73
74
|
|
|
74
75
|
var SkipLinkWrapper = function SkipLinkWrapper(_ref) {
|
|
75
76
|
var skipLinksLabel = _ref.skipLinksLabel;
|
|
@@ -125,17 +126,17 @@ var SkipLinkWrapper = function SkipLinkWrapper(_ref) {
|
|
|
125
126
|
return window.removeEventListener('keydown', escapeHandler, false);
|
|
126
127
|
};
|
|
127
128
|
|
|
128
|
-
return (0,
|
|
129
|
+
return (0, _react.jsx)("div", {
|
|
129
130
|
onFocus: attachEscHandler,
|
|
130
131
|
onBlur: removeEscHandler,
|
|
131
132
|
css: [skipLinkStyles, prefersReducedMotionStyles],
|
|
132
133
|
"data-skip-link-wrapper": true
|
|
133
|
-
}, (0,
|
|
134
|
+
}, (0, _react.jsx)("h5", null, skipLinksLabel), (0, _react.jsx)("ol", {
|
|
134
135
|
css: skipLinkListStyles
|
|
135
136
|
}, sortSkipLinks(skipLinksData).map(function (_ref2) {
|
|
136
137
|
var id = _ref2.id,
|
|
137
138
|
skipLinkTitle = _ref2.skipLinkTitle;
|
|
138
|
-
return (0,
|
|
139
|
+
return (0, _react.jsx)(SkipLink, {
|
|
139
140
|
key: id,
|
|
140
141
|
href: "#".concat(id),
|
|
141
142
|
isFocusable: true,
|
|
@@ -179,16 +180,17 @@ var focusTargetRef = function focusTargetRef(href) {
|
|
|
179
180
|
|
|
180
181
|
return false;
|
|
181
182
|
};
|
|
182
|
-
};
|
|
183
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
184
|
+
|
|
183
185
|
|
|
184
186
|
var SkipLink = function SkipLink(_ref3) {
|
|
185
187
|
var href = _ref3.href,
|
|
186
188
|
children = _ref3.children,
|
|
187
189
|
isFocusable = _ref3.isFocusable,
|
|
188
190
|
title = _ref3.title;
|
|
189
|
-
return (0,
|
|
191
|
+
return (0, _react.jsx)("li", {
|
|
190
192
|
css: skipLinkListItemStyles
|
|
191
|
-
}, (0,
|
|
193
|
+
}, (0, _react.jsx)("a", {
|
|
192
194
|
tabIndex: isFocusable ? 0 : -1,
|
|
193
195
|
href: href,
|
|
194
196
|
onClick: focusTargetRef(href),
|
|
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
|
|
16
|
-
var
|
|
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 bannerStyles = (0,
|
|
29
|
+
var bannerStyles = (0, _react2.css)({
|
|
30
30
|
height: _constants.BANNER_HEIGHT,
|
|
31
31
|
gridArea: _constants.BANNER
|
|
32
32
|
});
|
|
33
|
-
var bannerFixedStyles = (0,
|
|
33
|
+
var bannerFixedStyles = (0, _react2.css)({
|
|
34
34
|
position: 'fixed',
|
|
35
35
|
zIndex: 2,
|
|
36
36
|
top: 0,
|
|
37
37
|
right: _constants.RIGHT_PANEL_WIDTH,
|
|
38
38
|
left: _constants.LEFT_PANEL_WIDTH
|
|
39
39
|
});
|
|
40
|
+
/**
|
|
41
|
+
* __Banner__
|
|
42
|
+
*
|
|
43
|
+
* Provides a slot for a Banner 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 Banner = function Banner(props) {
|
|
42
50
|
var children = props.children,
|
|
@@ -56,14 +64,14 @@ var Banner = function Banner(props) {
|
|
|
56
64
|
};
|
|
57
65
|
}, [bannerHeight]);
|
|
58
66
|
(0, _controllers.useSkipLink)(id, skipLinkTitle);
|
|
59
|
-
return (0,
|
|
67
|
+
return (0, _react2.jsx)(_slotFocusRing.default, null, function (_ref) {
|
|
60
68
|
var className = _ref.className;
|
|
61
|
-
return (0,
|
|
69
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
62
70
|
css: [bannerStyles, isFixed && bannerFixedStyles],
|
|
63
71
|
className: className,
|
|
64
72
|
"data-testid": testId,
|
|
65
73
|
id: id
|
|
66
|
-
}, (0, _utils.getPageLayoutSlotSelector)('banner')), (0,
|
|
74
|
+
}, (0, _utils.getPageLayoutSlotSelector)('banner')), (0, _react2.jsx)(_slotDimensions.default, {
|
|
67
75
|
variableName: _constants.VAR_BANNER_HEIGHT,
|
|
68
76
|
value: bannerHeight
|
|
69
77
|
}), children);
|
|
@@ -5,22 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
10
|
var _constants = require("../../common/constants");
|
|
11
11
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
|
-
var contentStyles = (0,
|
|
13
|
+
var contentStyles = (0, _react.css)({
|
|
14
14
|
display: 'flex',
|
|
15
15
|
height: '100%',
|
|
16
16
|
position: 'relative',
|
|
17
17
|
gridArea: _constants.CONTENT
|
|
18
18
|
});
|
|
19
|
+
/**
|
|
20
|
+
* __Content__
|
|
21
|
+
*
|
|
22
|
+
* Provides a slot for your application content within the PageLayout.
|
|
23
|
+
*
|
|
24
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
25
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
26
|
+
*/
|
|
19
27
|
|
|
20
28
|
var Content = function Content(props) {
|
|
21
29
|
var children = props.children,
|
|
22
30
|
testId = props.testId;
|
|
23
|
-
return (0,
|
|
31
|
+
return (0, _react.jsx)("div", {
|
|
24
32
|
"data-testid": testId,
|
|
25
33
|
css: contentStyles
|
|
26
34
|
}, children);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
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,
|
|
18
|
+
var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
|
|
19
19
|
/**
|
|
20
20
|
* This inner wrapper is required to allow the sidebar to be `position: fixed`.
|
|
21
21
|
*
|
|
@@ -23,7 +23,7 @@ var prefersReducedMotionStyles = (0, _core.css)((0, _motion.prefersReducedMotion
|
|
|
23
23
|
* out of its flex container and Main would stretch to occupy all the space.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
var fixedInnerStyles = (0,
|
|
26
|
+
var fixedInnerStyles = (0, _react.css)({
|
|
27
27
|
width: "".concat(_constants.LEFT_SIDEBAR_WIDTH),
|
|
28
28
|
position: 'fixed',
|
|
29
29
|
top: "calc(".concat(_constants.BANNER_HEIGHT, " + ").concat(_constants.TOP_NAVIGATION_HEIGHT, ")"),
|
|
@@ -31,7 +31,7 @@ var fixedInnerStyles = (0, _core.css)({
|
|
|
31
31
|
left: "".concat(_constants.LEFT_PANEL_WIDTH),
|
|
32
32
|
transition: "width ".concat(_constants.TRANSITION_DURATION, "ms ").concat(_motion.easeOut, " 0s")
|
|
33
33
|
});
|
|
34
|
-
var fixedInnerFlyoutStyles = (0,
|
|
34
|
+
var fixedInnerFlyoutStyles = (0, _react.css)({
|
|
35
35
|
width: _constants.LEFT_SIDEBAR_FLYOUT_WIDTH
|
|
36
36
|
});
|
|
37
37
|
/**
|
|
@@ -40,10 +40,10 @@ var fixedInnerFlyoutStyles = (0, _core.css)({
|
|
|
40
40
|
* It will expand the page height to fit its content.
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
|
-
var staticInnerStyles = (0,
|
|
43
|
+
var staticInnerStyles = (0, _react.css)({
|
|
44
44
|
height: '100%'
|
|
45
45
|
});
|
|
46
|
-
var draggingStyles = (0,
|
|
46
|
+
var draggingStyles = (0, _react.css)({
|
|
47
47
|
cursor: 'ew-resize',
|
|
48
48
|
// Make sure drag to resize does not animate as the user drags
|
|
49
49
|
transition: 'none'
|
|
@@ -56,10 +56,11 @@ var LeftSidebarInner = function LeftSidebarInner(_ref) {
|
|
|
56
56
|
_ref$isFlyoutOpen = _ref.isFlyoutOpen,
|
|
57
57
|
isFlyoutOpen = _ref$isFlyoutOpen === void 0 ? false : _ref$isFlyoutOpen;
|
|
58
58
|
var isDragging = (0, _hooks.useIsSidebarDragging)();
|
|
59
|
-
return (0,
|
|
59
|
+
return (0, _react.jsx)("div", {
|
|
60
60
|
css: [!isFixed && staticInnerStyles, isFixed && fixedInnerStyles, isFixed && isFlyoutOpen && fixedInnerFlyoutStyles, isDragging && draggingStyles, prefersReducedMotionStyles]
|
|
61
61
|
}, children);
|
|
62
|
-
};
|
|
62
|
+
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
63
|
+
|
|
63
64
|
|
|
64
65
|
var _default = LeftSidebarInner;
|
|
65
66
|
exports.default = _default;
|