@atlaskit/page-layout 3.11.7 → 3.11.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 +8 -0
- package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +3 -2
- package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +3 -2
- package/dist/esm/components/slots/internal/resizable-children-wrapper.js +3 -2
- package/package.json +3 -3
- package/__perf__/examples.tsx +0 -65
- package/__perf__/utils/perf-example.tsx +0 -80
- package/__perf__/utils/product-integration/atlassian-navigation.tsx +0 -123
- package/__perf__/utils/product-integration/create.tsx +0 -23
- package/__perf__/utils/product-integration/help-popup.tsx +0 -52
- package/__perf__/utils/product-integration/notifications-popup.tsx +0 -107
- package/__perf__/utils/product-integration/profile-popup.tsx +0 -75
- package/__perf__/utils/product-integration/sample-footer.tsx +0 -52
- package/__perf__/utils/product-integration/sample-header.tsx +0 -29
- package/__perf__/utils/product-integration/side-navigation.tsx +0 -118
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/page-layout
|
|
2
2
|
|
|
3
|
+
## 3.11.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107520](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107520)
|
|
8
|
+
[`537278df4586e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/537278df4586e) -
|
|
9
|
+
Fixing A11y violation scrollable-region-focusable
|
|
10
|
+
|
|
3
11
|
## 3.11.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -26,7 +26,7 @@ var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotio
|
|
|
26
26
|
*/
|
|
27
27
|
var hideLeftSidebarContentsStyles = (0, _react.css)({
|
|
28
28
|
opacity: 0,
|
|
29
|
-
transition:
|
|
29
|
+
transition: 'opacity 0ms linear, visibility 0ms linear',
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
31
31
|
transitionDelay: "".concat(_constants.TRANSITION_DURATION - 100, "ms"),
|
|
32
32
|
visibility: 'hidden'
|
|
@@ -57,7 +57,8 @@ var ResizableChildrenWrapper = function ResizableChildrenWrapper(_ref) {
|
|
|
57
57
|
return (0, _react.jsx)("div", {
|
|
58
58
|
css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles],
|
|
59
59
|
"aria-hidden": isHidden,
|
|
60
|
-
"data-testid": testId
|
|
60
|
+
"data-testid": testId,
|
|
61
|
+
tabIndex: isHidden ? -1 : 0
|
|
61
62
|
}, (0, _react.jsx)("div", {
|
|
62
63
|
css: fixedChildrenWrapperStyles
|
|
63
64
|
}, children));
|
|
@@ -19,7 +19,7 @@ const prefersReducedMotionStyles = css(prefersReducedMotion());
|
|
|
19
19
|
*/
|
|
20
20
|
const hideLeftSidebarContentsStyles = css({
|
|
21
21
|
opacity: 0,
|
|
22
|
-
transition:
|
|
22
|
+
transition: 'opacity 0ms linear, visibility 0ms linear',
|
|
23
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
24
|
transitionDelay: `${TRANSITION_DURATION - 100}ms`,
|
|
25
25
|
visibility: 'hidden'
|
|
@@ -48,7 +48,8 @@ const ResizableChildrenWrapper = ({
|
|
|
48
48
|
return jsx("div", {
|
|
49
49
|
css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles],
|
|
50
50
|
"aria-hidden": isHidden,
|
|
51
|
-
"data-testid": testId
|
|
51
|
+
"data-testid": testId,
|
|
52
|
+
tabIndex: isHidden ? -1 : 0
|
|
52
53
|
}, jsx("div", {
|
|
53
54
|
css: fixedChildrenWrapperStyles
|
|
54
55
|
}, children));
|
|
@@ -19,7 +19,7 @@ var prefersReducedMotionStyles = css(prefersReducedMotion());
|
|
|
19
19
|
*/
|
|
20
20
|
var hideLeftSidebarContentsStyles = css({
|
|
21
21
|
opacity: 0,
|
|
22
|
-
transition:
|
|
22
|
+
transition: 'opacity 0ms linear, visibility 0ms linear',
|
|
23
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
24
|
transitionDelay: "".concat(TRANSITION_DURATION - 100, "ms"),
|
|
25
25
|
visibility: 'hidden'
|
|
@@ -50,7 +50,8 @@ var ResizableChildrenWrapper = function ResizableChildrenWrapper(_ref) {
|
|
|
50
50
|
return jsx("div", {
|
|
51
51
|
css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles],
|
|
52
52
|
"aria-hidden": isHidden,
|
|
53
|
-
"data-testid": testId
|
|
53
|
+
"data-testid": testId,
|
|
54
|
+
tabIndex: isHidden ? -1 : 0
|
|
54
55
|
}, jsx("div", {
|
|
55
56
|
css: fixedChildrenWrapperStyles
|
|
56
57
|
}, children));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/page-layout",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.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/"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
49
49
|
"@atlaskit/primitives": "^13.3.0",
|
|
50
50
|
"@atlaskit/theme": "^14.0.0",
|
|
51
|
-
"@atlaskit/tokens": "^3.
|
|
51
|
+
"@atlaskit/tokens": "^3.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
|
54
54
|
"bind-event-listener": "^3.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/notification-indicator": "^9.4.0",
|
|
70
70
|
"@atlaskit/notification-log-client": "^6.1.0",
|
|
71
71
|
"@atlaskit/popup": "^1.30.0",
|
|
72
|
-
"@atlaskit/side-navigation": "^
|
|
72
|
+
"@atlaskit/side-navigation": "^4.0.0",
|
|
73
73
|
"@atlaskit/ssr": "*",
|
|
74
74
|
"@atlaskit/toggle": "^14.0.0",
|
|
75
75
|
"@atlaskit/tooltip": "^19.0.0",
|
package/__perf__/examples.tsx
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { findByTestId, findByText, fireEvent, getByTestId } from '@testing-library/dom'; // eslint-disable-line import/no-extraneous-dependencies
|
|
4
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
5
|
-
import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance'; // eslint-disable-line import/no-extraneous-dependencies
|
|
6
|
-
|
|
7
|
-
import ProductExample from './utils/perf-example';
|
|
8
|
-
|
|
9
|
-
const interactionTasks: PublicInteractionTask[] = [
|
|
10
|
-
{
|
|
11
|
-
name: 'Side nav: Opening nested side nav',
|
|
12
|
-
description: 'Open a nested item in side-navigation',
|
|
13
|
-
|
|
14
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
15
|
-
const element: HTMLElement | null = getByTestId(container, 'nav-side-queues--item');
|
|
16
|
-
fireEvent.click(element);
|
|
17
|
-
await findByText(container, 'Untriaged', undefined, { timeout: 2000 });
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: 'Global nav: Open dropdown',
|
|
22
|
-
description: 'Open a dropdown in side-navigation',
|
|
23
|
-
|
|
24
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
25
|
-
const element: HTMLElement | null = getByTestId(container, 'nav-help');
|
|
26
|
-
fireEvent.click(element);
|
|
27
|
-
await findByTestId(container.parentElement || container, 'nav-help-content', undefined, {
|
|
28
|
-
timeout: 2000,
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'Global nav: Notifications',
|
|
34
|
-
description: 'Open the notifications panel in global navigation',
|
|
35
|
-
|
|
36
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
37
|
-
const element: HTMLElement | null = getByTestId(container, 'nav-notifications');
|
|
38
|
-
fireEvent.click(element);
|
|
39
|
-
await findByTestId(container.parentElement || container, 'jira-notifications', undefined, {
|
|
40
|
-
timeout: 2000,
|
|
41
|
-
});
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
|
|
46
|
-
const performance = () => {
|
|
47
|
-
return (
|
|
48
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
49
|
-
<div style={{ margin: '-1rem 0 0 -1rem', height: '100vh' }}>
|
|
50
|
-
<ProductExample />
|
|
51
|
-
</div>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
performance.story = {
|
|
56
|
-
name: 'Performance',
|
|
57
|
-
|
|
58
|
-
parameters: {
|
|
59
|
-
performance: {
|
|
60
|
-
interactions: interactionTasks,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default performance;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
8
|
-
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
|
-
|
|
11
|
-
import { Content, LeftSidebar, Main, PageLayout, TopNavigation } from '../../src';
|
|
12
|
-
|
|
13
|
-
import JiraIntegrationExample from './product-integration/atlassian-navigation';
|
|
14
|
-
import Sidebar from './product-integration/side-navigation';
|
|
15
|
-
|
|
16
|
-
const wrapperStyles = css({
|
|
17
|
-
boxSizing: 'border-box',
|
|
18
|
-
height: '100%',
|
|
19
|
-
padding: token('space.100', '8px'),
|
|
20
|
-
backgroundColor: token('color.background.neutral.subtle'),
|
|
21
|
-
outlineOffset: -4,
|
|
22
|
-
overflowY: 'auto',
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const Wrapper = ({
|
|
26
|
-
borderColor,
|
|
27
|
-
children,
|
|
28
|
-
noOutline,
|
|
29
|
-
noHorizontalScrollbar,
|
|
30
|
-
}: {
|
|
31
|
-
borderColor: string;
|
|
32
|
-
children: React.ReactNode;
|
|
33
|
-
noOutline?: boolean;
|
|
34
|
-
noHorizontalScrollbar?: boolean;
|
|
35
|
-
}) => (
|
|
36
|
-
<div
|
|
37
|
-
css={wrapperStyles}
|
|
38
|
-
style={{
|
|
39
|
-
outline: noOutline ? 'none' : `2px dashed ${borderColor}`,
|
|
40
|
-
overflowX: noHorizontalScrollbar ? 'hidden' : 'auto',
|
|
41
|
-
}}
|
|
42
|
-
>
|
|
43
|
-
{children}
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const sidebarWrapperStyles = css({
|
|
48
|
-
height: '100%',
|
|
49
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
50
|
-
nav: {
|
|
51
|
-
minWidth: 20,
|
|
52
|
-
overflowX: 'hidden',
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const slotLabelStyles = css({ textAlign: 'center' });
|
|
57
|
-
|
|
58
|
-
const BasicGrid = () => {
|
|
59
|
-
return (
|
|
60
|
-
<PageLayout>
|
|
61
|
-
<TopNavigation height={60} isFixed={true}>
|
|
62
|
-
<JiraIntegrationExample />
|
|
63
|
-
</TopNavigation>
|
|
64
|
-
<Content testId="content">
|
|
65
|
-
<LeftSidebar testId="left-sidebar" isFixed={false} width={450}>
|
|
66
|
-
<div css={sidebarWrapperStyles}>
|
|
67
|
-
<Sidebar />
|
|
68
|
-
</div>
|
|
69
|
-
</LeftSidebar>
|
|
70
|
-
<Main>
|
|
71
|
-
<Wrapper noOutline borderColor={token('color.border')}>
|
|
72
|
-
<h3 css={slotLabelStyles}>Main</h3>
|
|
73
|
-
</Wrapper>
|
|
74
|
-
</Main>
|
|
75
|
-
</Content>
|
|
76
|
-
</PageLayout>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default BasicGrid;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { Fragment, type MouseEvent, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
|
-
|
|
10
|
-
// AFP-1799 storybook examples in src cause issues
|
|
11
|
-
import {
|
|
12
|
-
AtlassianNavigation,
|
|
13
|
-
PrimaryButton,
|
|
14
|
-
ProductHome,
|
|
15
|
-
Search,
|
|
16
|
-
Settings,
|
|
17
|
-
} from '@atlaskit/atlassian-navigation';
|
|
18
|
-
import { Drawer, DrawerCloseButton, DrawerContent, DrawerSidebar } from '@atlaskit/drawer/compiled';
|
|
19
|
-
import { JiraIcon, JiraLogo } from '@atlaskit/logo';
|
|
20
|
-
|
|
21
|
-
import { DefaultCreate } from './create';
|
|
22
|
-
import { HelpPopup } from './help-popup';
|
|
23
|
-
import { NotificationsPopup } from './notifications-popup';
|
|
24
|
-
import { ProfilePopup } from './profile-popup';
|
|
25
|
-
|
|
26
|
-
const drawerLabelText = {
|
|
27
|
-
search: 'Search drawer',
|
|
28
|
-
settings: 'Settings drawer',
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const { search, settings } = drawerLabelText;
|
|
32
|
-
|
|
33
|
-
const ProductHomeExample = () => (
|
|
34
|
-
<ProductHome icon={JiraIcon} logo={JiraLogo} siteTitle="Extranet" />
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
const SearchDrawer = () => {
|
|
38
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
39
|
-
|
|
40
|
-
const onClick = () => {
|
|
41
|
-
setIsOpen(!isOpen);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const onClose = () => {
|
|
45
|
-
setIsOpen(false);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<Fragment>
|
|
50
|
-
<Search
|
|
51
|
-
onClick={onClick}
|
|
52
|
-
testId="nav-search"
|
|
53
|
-
placeholder="Search..."
|
|
54
|
-
tooltip="Search"
|
|
55
|
-
label="Search"
|
|
56
|
-
/>
|
|
57
|
-
<Drawer label={search} isOpen={isOpen} onClose={onClose}>
|
|
58
|
-
<DrawerSidebar>
|
|
59
|
-
<DrawerCloseButton />
|
|
60
|
-
</DrawerSidebar>
|
|
61
|
-
<DrawerContent>
|
|
62
|
-
<div>{search}</div>
|
|
63
|
-
</DrawerContent>
|
|
64
|
-
</Drawer>
|
|
65
|
-
</Fragment>
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const SettingsDrawer = () => {
|
|
70
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
71
|
-
|
|
72
|
-
const onClick = () => {
|
|
73
|
-
setIsOpen(!isOpen);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const onClose = () => {
|
|
77
|
-
setIsOpen(false);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<Fragment>
|
|
82
|
-
<Settings isSelected={isOpen} onClick={onClick} tooltip="Settings" />
|
|
83
|
-
<Drawer label={settings} isOpen={isOpen} onClose={onClose}>
|
|
84
|
-
{settings}
|
|
85
|
-
</Drawer>
|
|
86
|
-
</Fragment>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const buttonClick = (toLog: string) => (e: MouseEvent<HTMLElement | HTMLAnchorElement>) => {
|
|
91
|
-
if (e.ctrlKey || e.metaKey) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
e.preventDefault();
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const primaryItems = [
|
|
98
|
-
<PrimaryButton onClick={buttonClick('Projects')}>Projects</PrimaryButton>,
|
|
99
|
-
<PrimaryButton onClick={buttonClick('Filters')} isHighlighted>
|
|
100
|
-
Filters
|
|
101
|
-
</PrimaryButton>,
|
|
102
|
-
<PrimaryButton onClick={buttonClick('Dashboards')}>Dashboards</PrimaryButton>,
|
|
103
|
-
<PrimaryButton onClick={buttonClick('Apps')}>Apps</PrimaryButton>,
|
|
104
|
-
];
|
|
105
|
-
|
|
106
|
-
const PerfExample = () => (
|
|
107
|
-
<Fragment>
|
|
108
|
-
<AtlassianNavigation
|
|
109
|
-
label="site"
|
|
110
|
-
moreLabel="More"
|
|
111
|
-
primaryItems={primaryItems}
|
|
112
|
-
renderCreate={DefaultCreate}
|
|
113
|
-
renderHelp={HelpPopup}
|
|
114
|
-
renderNotifications={NotificationsPopup}
|
|
115
|
-
renderProductHome={ProductHomeExample}
|
|
116
|
-
renderProfile={ProfilePopup}
|
|
117
|
-
renderSearch={SearchDrawer}
|
|
118
|
-
renderSettings={SettingsDrawer}
|
|
119
|
-
/>
|
|
120
|
-
</Fragment>
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
export default PerfExample;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Create } from '@atlaskit/atlassian-navigation';
|
|
4
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
|
-
|
|
7
|
-
const StyledTooltip = () => (
|
|
8
|
-
<span>
|
|
9
|
-
Create
|
|
10
|
-
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
11
|
-
<span style={{ color: token('color.text.accent.orange', 'orange') }}> [c]</span>
|
|
12
|
-
</span>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export const DefaultCreate = () => (
|
|
16
|
-
<Create
|
|
17
|
-
buttonTooltip={<StyledTooltip />}
|
|
18
|
-
iconButtonTooltip="Create button"
|
|
19
|
-
onClick={noop}
|
|
20
|
-
text="Create"
|
|
21
|
-
testId="create-cta"
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Help } from '@atlaskit/atlassian-navigation';
|
|
4
|
-
import { ButtonItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
5
|
-
import Popup from '@atlaskit/popup';
|
|
6
|
-
|
|
7
|
-
const HelpContent = () => (
|
|
8
|
-
<MenuGroup testId={'nav-help-content'}>
|
|
9
|
-
<Section title="Help">
|
|
10
|
-
<ButtonItem>Atlassian Documentation</ButtonItem>
|
|
11
|
-
<ButtonItem>Atlassian Community</ButtonItem>
|
|
12
|
-
<ButtonItem>What's New</ButtonItem>
|
|
13
|
-
<ButtonItem>Get Jira Mobile</ButtonItem>
|
|
14
|
-
<ButtonItem>Keyboard shortcuts</ButtonItem>
|
|
15
|
-
<ButtonItem>About Jira</ButtonItem>
|
|
16
|
-
</Section>
|
|
17
|
-
<Section title="Legal" hasSeparator>
|
|
18
|
-
<ButtonItem>Terms of use</ButtonItem>
|
|
19
|
-
<ButtonItem>Privacy Policy</ButtonItem>
|
|
20
|
-
</Section>
|
|
21
|
-
</MenuGroup>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export const HelpPopup = () => {
|
|
25
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
26
|
-
|
|
27
|
-
const onClick = () => {
|
|
28
|
-
setIsOpen(!isOpen);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const onClose = () => {
|
|
32
|
-
setIsOpen(false);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<Popup
|
|
37
|
-
placement="bottom-start"
|
|
38
|
-
content={HelpContent}
|
|
39
|
-
isOpen={isOpen}
|
|
40
|
-
onClose={onClose}
|
|
41
|
-
trigger={(triggerProps) => (
|
|
42
|
-
<Help
|
|
43
|
-
testId={'nav-help'}
|
|
44
|
-
isSelected={isOpen}
|
|
45
|
-
onClick={onClick}
|
|
46
|
-
tooltip="Help"
|
|
47
|
-
{...triggerProps}
|
|
48
|
-
/>
|
|
49
|
-
)}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
|
|
10
|
-
import { Notifications } from '@atlaskit/atlassian-navigation';
|
|
11
|
-
import { Notifications as NotificationsIframe } from '@atlaskit/atlassian-notifications';
|
|
12
|
-
import { NotificationIndicator } from '@atlaskit/notification-indicator';
|
|
13
|
-
import { NotificationLogClient } from '@atlaskit/notification-log-client';
|
|
14
|
-
import Popup from '@atlaskit/popup';
|
|
15
|
-
|
|
16
|
-
const wrapperStyles = css({
|
|
17
|
-
display: 'flex',
|
|
18
|
-
width: 540,
|
|
19
|
-
height: 'calc(100vh - 200px)',
|
|
20
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
21
|
-
paddingBlockStart: 18,
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
23
|
-
paddingInlineStart: 18,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const NotificationsContent = () => (
|
|
27
|
-
<div css={wrapperStyles}>
|
|
28
|
-
<NotificationsIframe
|
|
29
|
-
// _url="https://start.stg.atlassian.com/notificationsDrawer/iframe.html?scope=user&product=uchi&locale=en"
|
|
30
|
-
_url="https://start.stg.atlassian.com/notificationsDrawer/iframe.html"
|
|
31
|
-
locale="en"
|
|
32
|
-
product="jira"
|
|
33
|
-
testId="jira-notifications"
|
|
34
|
-
title="Notifications"
|
|
35
|
-
/>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
class MockNotificationLogClient extends NotificationLogClient {
|
|
40
|
-
mockedCount = 0;
|
|
41
|
-
constructor(mockedCount: number) {
|
|
42
|
-
super('', '');
|
|
43
|
-
this.mockedCount = mockedCount;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public async countUnseenNotifications() {
|
|
47
|
-
return Promise.resolve({ count: this.mockedCount });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const client = new MockNotificationLogClient(5);
|
|
52
|
-
const emptyClient = new MockNotificationLogClient(0);
|
|
53
|
-
|
|
54
|
-
export const NotificationsPopup = () => {
|
|
55
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
56
|
-
const [interacted, setInteracted] = useState(false);
|
|
57
|
-
const [buttonLabel, setButtonLabel] = useState<number | undefined>();
|
|
58
|
-
|
|
59
|
-
const NotificationsBadge = () => (
|
|
60
|
-
<NotificationIndicator
|
|
61
|
-
onCountUpdated={updateButtonLabel}
|
|
62
|
-
// force a zero-count after the drawer has been opened
|
|
63
|
-
notificationLogProvider={Promise.resolve(interacted ? emptyClient : client)}
|
|
64
|
-
/>
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
const updateButtonLabel = ({
|
|
68
|
-
newCount,
|
|
69
|
-
oldCount,
|
|
70
|
-
source,
|
|
71
|
-
}: {
|
|
72
|
-
newCount: number;
|
|
73
|
-
oldCount?: number;
|
|
74
|
-
source?: string;
|
|
75
|
-
}) => {
|
|
76
|
-
setButtonLabel(newCount || 0);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const onClick = () => {
|
|
80
|
-
// let the badge icon know to clear its count
|
|
81
|
-
setInteracted(true);
|
|
82
|
-
setIsOpen(!isOpen);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const onClose = () => {
|
|
86
|
-
setIsOpen(false);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<Popup
|
|
91
|
-
placement="bottom-start"
|
|
92
|
-
content={NotificationsContent}
|
|
93
|
-
isOpen={isOpen}
|
|
94
|
-
onClose={onClose}
|
|
95
|
-
trigger={(triggerProps) => (
|
|
96
|
-
<Notifications
|
|
97
|
-
badge={NotificationsBadge}
|
|
98
|
-
onClick={onClick}
|
|
99
|
-
tooltip={`Notifications (${buttonLabel})`}
|
|
100
|
-
isSelected={isOpen}
|
|
101
|
-
testId={'nav-notifications'}
|
|
102
|
-
{...triggerProps}
|
|
103
|
-
/>
|
|
104
|
-
)}
|
|
105
|
-
/>
|
|
106
|
-
);
|
|
107
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Profile } from '@atlaskit/atlassian-navigation';
|
|
4
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
5
|
-
import { ButtonItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
6
|
-
import Popup from '@atlaskit/popup';
|
|
7
|
-
|
|
8
|
-
export const DefaultProfile = () => (
|
|
9
|
-
<Profile
|
|
10
|
-
icon={<img src={avatarUrl} alt="Your profile and settings" />}
|
|
11
|
-
onClick={noop}
|
|
12
|
-
tooltip="Your profile and settings"
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export const avatarUrl =
|
|
17
|
-
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsSAAALEgHS3X78AAAOsklEQVR42u2ceXyM5xbHp7ZLCELE0hBSa1A7tYSS9ja2T221u2ilLSGoiCCRzWSyLyJqiy2yi1gSe0JpIwhVlKqqVqvLrcSMNLbid59zZjFZmEhSGb3vH+eT+cy8b+Z5v+85z1nfkSUH3kZFyrYAFUtyYB68PkrFFu+fkBKcr3lfiZ0h9/Dp4vOYPMQLKUH5esffNgqRVTxAJQOL9rmB2jXN4TfnMFLDHyHJ/xYS/XOxbyXgNH4tZDIZ1iy9JIDeRZI4RwJYBODPDHDRtDjsWYECAB3HrmKAfnMysDv0AX9mLFpoNABjlv+KmjXq4sNRYdgvoCX65RbRQMXsdB1ASQP19sDtQX8iwS+HNXD8O244sEoPYATwyeRNDFA+64CkgcUBpL8pwXdgUc8K7/SegQORTwDuFQDJrAmgp3Ayu8P+kgAW54XJ275q0Rp9Xh/J0LR7IO2HBI4ALp6eKAF8FkBLizbobjNY50RIUsMfImDuUQY4f9JGDUClBLCwCe8QJtzEvCW6tbMXAB9rACqxK/Q+VrmeEwBfgcPIEPUeGCABLAKQAmkLMyv06jBcp4FaD73F+2dUqVQNY992ZU3dpgFoDBCNwwsLeKRtZrUbwbbLON4DEwlgoAoJiltIj3qMAf0HwbbTBAH0Tx08CaBeGBOv+AMm/6qDoW9O04UxyQJgvDwHn28BXF3c0dqytzDf3EKaKwXSnOPGKX5H1Uo1MevDT3BkIxDvm8OfE8iDq4GI4E3CS7fCRo9rDFzSQD0NTGEN/C9MqtVDcGAYvogB4uRqgEkBt4TjeIjEDZ+jfj1zhMzPYoezzUgciZEAzEes/DeY1jDHpg3ROBYtNF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ButtonItem>Give us feedback</ButtonItem>
|
|
23
|
-
</Section>
|
|
24
|
-
<Section title="Jira" hasSeparator>
|
|
25
|
-
<ButtonItem>Settings</ButtonItem>
|
|
26
|
-
</Section>
|
|
27
|
-
<Section title="John Smith" hasSeparator>
|
|
28
|
-
<ButtonItem>Profile</ButtonItem>
|
|
29
|
-
<ButtonItem>Account settings</ButtonItem>
|
|
30
|
-
<ButtonItem>Logout</ButtonItem>
|
|
31
|
-
</Section>
|
|
32
|
-
</MenuGroup>
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const imgCSS = {
|
|
36
|
-
borderRadius: '100%',
|
|
37
|
-
height: 24,
|
|
38
|
-
width: 24,
|
|
39
|
-
};
|
|
40
|
-
export const ProfilePopup = () => {
|
|
41
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
42
|
-
|
|
43
|
-
const onClick = () => {
|
|
44
|
-
setIsOpen(!isOpen);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const onClose = () => {
|
|
48
|
-
setIsOpen(false);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<Popup
|
|
53
|
-
placement="bottom-start"
|
|
54
|
-
content={ProfileContent}
|
|
55
|
-
isOpen={isOpen}
|
|
56
|
-
onClose={onClose}
|
|
57
|
-
trigger={(triggerProps) => (
|
|
58
|
-
<Profile
|
|
59
|
-
icon={
|
|
60
|
-
<img
|
|
61
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
62
|
-
style={imgCSS}
|
|
63
|
-
src={avatarUrl}
|
|
64
|
-
alt="Your profile and settings"
|
|
65
|
-
/>
|
|
66
|
-
}
|
|
67
|
-
onClick={onClick}
|
|
68
|
-
isSelected={isOpen}
|
|
69
|
-
tooltip="Your profile and settings"
|
|
70
|
-
{...triggerProps}
|
|
71
|
-
/>
|
|
72
|
-
)}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { Fragment } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
|
|
10
|
-
import { type CustomItemComponentProps } from '@atlaskit/menu';
|
|
11
|
-
import { Footer } from '@atlaskit/side-navigation';
|
|
12
|
-
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
|
-
|
|
15
|
-
const Container = (props: CustomItemComponentProps) => {
|
|
16
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
17
|
-
return <div {...props} />;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const linkStyles = css({
|
|
21
|
-
color: token('color.text.subtle', N200),
|
|
22
|
-
'&:hover': {
|
|
23
|
-
color: token('color.link', B400),
|
|
24
|
-
cursor: 'pointer',
|
|
25
|
-
textDecoration: 'none',
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// This example footer conforms to a design taken from Jira designs found at
|
|
30
|
-
// https://www.figma.com/file/GA22za6unqO2WsBWM0Ddxk/Jira-navigation-3?node-id=124%3A7194
|
|
31
|
-
const ExampleFooter = () => {
|
|
32
|
-
return (
|
|
33
|
-
<Footer
|
|
34
|
-
component={Container}
|
|
35
|
-
description={
|
|
36
|
-
<Fragment>
|
|
37
|
-
<a href="https://www.atlassian.com/company/contact" css={linkStyles}>
|
|
38
|
-
Give feedback
|
|
39
|
-
</a>
|
|
40
|
-
{' ∙ '}
|
|
41
|
-
<a href="http://www.atlassian.com" css={linkStyles}>
|
|
42
|
-
Learn more
|
|
43
|
-
</a>
|
|
44
|
-
</Fragment>
|
|
45
|
-
}
|
|
46
|
-
>
|
|
47
|
-
You're in a next-gen project
|
|
48
|
-
</Footer>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default ExampleFooter;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
|
|
8
|
-
import Icon from '@atlaskit/icon';
|
|
9
|
-
import { type CustomItemComponentProps } from '@atlaskit/menu';
|
|
10
|
-
import { Header } from '@atlaskit/side-navigation';
|
|
11
|
-
|
|
12
|
-
const Container = (props: CustomItemComponentProps) => {
|
|
13
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
14
|
-
return <div {...props} />;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const ExampleHeader = () => {
|
|
18
|
-
return (
|
|
19
|
-
<Header
|
|
20
|
-
component={Container}
|
|
21
|
-
description="Next-gen service desk"
|
|
22
|
-
iconBefore={<Icon label="" size="medium" />}
|
|
23
|
-
>
|
|
24
|
-
NXTGen Industries
|
|
25
|
-
</Header>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default ExampleHeader;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-20400 */
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
|
-
|
|
10
|
-
import DropboxIcon from '@atlaskit/icon/glyph/dropbox';
|
|
11
|
-
import FilterIcon from '@atlaskit/icon/glyph/filter';
|
|
12
|
-
import WorkIcon from '@atlaskit/icon/glyph/folder';
|
|
13
|
-
import CustomerIcon from '@atlaskit/icon/glyph/person';
|
|
14
|
-
import QueueIcon from '@atlaskit/icon/glyph/queues';
|
|
15
|
-
import SettingsIcon from '@atlaskit/icon/glyph/settings';
|
|
16
|
-
import LanguageIcon from '@atlaskit/icon/glyph/world';
|
|
17
|
-
import {
|
|
18
|
-
ButtonItem,
|
|
19
|
-
LinkItem,
|
|
20
|
-
NavigationFooter,
|
|
21
|
-
NavigationHeader,
|
|
22
|
-
NestableNavigationContent,
|
|
23
|
-
NestingItem,
|
|
24
|
-
Section,
|
|
25
|
-
SideNavigation,
|
|
26
|
-
} from '@atlaskit/side-navigation';
|
|
27
|
-
|
|
28
|
-
import SampleFooter from './sample-footer';
|
|
29
|
-
import SampleHeader from './sample-header';
|
|
30
|
-
|
|
31
|
-
const LanguageSettings = () => {
|
|
32
|
-
return (
|
|
33
|
-
<NestingItem iconBefore={<LanguageIcon label="" />} id="3-1" title="Language settings">
|
|
34
|
-
<ButtonItem>Customize</ButtonItem>
|
|
35
|
-
|
|
36
|
-
<NestingItem id="3-1-1" title="German Settings">
|
|
37
|
-
<ButtonItem>Hallo Welt!</ButtonItem>
|
|
38
|
-
</NestingItem>
|
|
39
|
-
<NestingItem id="3-1-2" title="English Settings">
|
|
40
|
-
<ButtonItem>Hello World!</ButtonItem>
|
|
41
|
-
</NestingItem>
|
|
42
|
-
</NestingItem>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const PerfExample = () => {
|
|
47
|
-
return (
|
|
48
|
-
<SideNavigation label="project" testId="side-navigation">
|
|
49
|
-
<NavigationHeader>
|
|
50
|
-
<SampleHeader />
|
|
51
|
-
</NavigationHeader>
|
|
52
|
-
<NestableNavigationContent initialStack={[]}>
|
|
53
|
-
<Section>
|
|
54
|
-
<ButtonItem iconBefore={<WorkIcon label="" />}>Your work</ButtonItem>
|
|
55
|
-
<LinkItem
|
|
56
|
-
href="https://www.atlassian.com/customers"
|
|
57
|
-
iconBefore={<CustomerIcon label="" />}
|
|
58
|
-
>
|
|
59
|
-
Your customers
|
|
60
|
-
</LinkItem>
|
|
61
|
-
<NestingItem
|
|
62
|
-
id="1"
|
|
63
|
-
isSelected
|
|
64
|
-
title="Queues view"
|
|
65
|
-
testId="nav-side-queues"
|
|
66
|
-
iconBefore={<QueueIcon label="" />}
|
|
67
|
-
>
|
|
68
|
-
<Section title="Queues">
|
|
69
|
-
<ButtonItem>Untriaged</ButtonItem>
|
|
70
|
-
<ButtonItem>My feature work</ButtonItem>
|
|
71
|
-
<ButtonItem>My bugfix work</ButtonItem>
|
|
72
|
-
<ButtonItem>Signals</ButtonItem>
|
|
73
|
-
<ButtonItem>Assigned to me</ButtonItem>
|
|
74
|
-
</Section>
|
|
75
|
-
<Section hasSeparator>
|
|
76
|
-
<ButtonItem>New queue</ButtonItem>
|
|
77
|
-
</Section>
|
|
78
|
-
</NestingItem>
|
|
79
|
-
<NestingItem
|
|
80
|
-
id="2"
|
|
81
|
-
testId="filter-nesting-item"
|
|
82
|
-
title="Filters"
|
|
83
|
-
iconBefore={<FilterIcon label="" />}
|
|
84
|
-
>
|
|
85
|
-
<Section>
|
|
86
|
-
<ButtonItem>Search issues</ButtonItem>
|
|
87
|
-
</Section>
|
|
88
|
-
<Section title="Starred">
|
|
89
|
-
<ButtonItem>Everything me</ButtonItem>
|
|
90
|
-
<ButtonItem>My open issues</ButtonItem>
|
|
91
|
-
<ButtonItem>Reported by me</ButtonItem>
|
|
92
|
-
</Section>
|
|
93
|
-
<Section hasSeparator title="Other">
|
|
94
|
-
<ButtonItem>All issues</ButtonItem>
|
|
95
|
-
<ButtonItem>Open issues</ButtonItem>
|
|
96
|
-
<ButtonItem>Created recently</ButtonItem>
|
|
97
|
-
<ButtonItem>Resolved recently</ButtonItem>
|
|
98
|
-
</Section>
|
|
99
|
-
<Section hasSeparator>
|
|
100
|
-
<ButtonItem>View all filters</ButtonItem>
|
|
101
|
-
</Section>
|
|
102
|
-
</NestingItem>
|
|
103
|
-
<NestingItem id="3" iconBefore={<SettingsIcon label="" />} title="Settings">
|
|
104
|
-
<LanguageSettings />
|
|
105
|
-
</NestingItem>
|
|
106
|
-
<NestingItem id="4" iconBefore={<DropboxIcon label="" />} title="Dropbox" isDisabled>
|
|
107
|
-
<span />
|
|
108
|
-
</NestingItem>
|
|
109
|
-
</Section>
|
|
110
|
-
</NestableNavigationContent>
|
|
111
|
-
<NavigationFooter>
|
|
112
|
-
<SampleFooter />
|
|
113
|
-
</NavigationFooter>
|
|
114
|
-
</SideNavigation>
|
|
115
|
-
);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export default PerfExample;
|