@atlaskit/page-layout 3.3.3 → 3.4.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 +14 -1
- package/README.md +6 -3
- package/__perf__/examples.tsx +45 -69
- package/__perf__/utils/perf-example.tsx +53 -55
- package/__perf__/utils/product-integration/atlassian-navigation.tsx +80 -77
- package/__perf__/utils/product-integration/create.tsx +12 -15
- package/__perf__/utils/product-integration/help-popup.tsx +38 -38
- package/__perf__/utils/product-integration/notifications-popup.tsx +76 -74
- package/__perf__/utils/product-integration/profile-popup.tsx +53 -53
- package/__perf__/utils/product-integration/sample-footer.tsx +30 -26
- package/__perf__/utils/product-integration/sample-header.tsx +15 -11
- package/__perf__/utils/product-integration/side-navigation.tsx +92 -101
- package/dist/cjs/components/resize-control/grab-area.js +8 -1
- package/dist/cjs/components/resize-control/index.js +9 -3
- package/dist/cjs/components/resize-control/resize-button.js +6 -0
- package/dist/cjs/components/resize-control/shadow.js +9 -5
- package/dist/cjs/components/skip-links/skip-link-components.js +4 -2
- package/dist/cjs/components/skip-links/use-custom-skip-link.js +3 -0
- package/dist/cjs/components/slots/banner-slot.js +12 -5
- package/dist/cjs/components/slots/content.js +6 -0
- package/dist/cjs/components/slots/internal/left-sidebar-inner.js +18 -1
- package/dist/cjs/components/slots/internal/left-sidebar-outer.js +16 -1
- package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +7 -1
- package/dist/cjs/components/slots/internal/slot-focus-ring.js +9 -2
- package/dist/cjs/components/slots/left-panel.js +10 -3
- package/dist/cjs/components/slots/left-sidebar-without-resize.js +5 -0
- package/dist/cjs/components/slots/left-sidebar.js +4 -1
- package/dist/cjs/components/slots/main.js +8 -2
- package/dist/cjs/components/slots/page-layout.js +10 -2
- package/dist/cjs/components/slots/right-panel.js +10 -3
- package/dist/cjs/components/slots/right-sidebar.js +14 -9
- package/dist/cjs/components/slots/slot-dimensions.js +5 -1
- package/dist/cjs/components/slots/top-navigation.js +13 -6
- package/dist/es2019/components/resize-control/grab-area.js +8 -1
- package/dist/es2019/components/resize-control/index.js +10 -2
- package/dist/es2019/components/resize-control/resize-button.js +7 -1
- package/dist/es2019/components/resize-control/shadow.js +8 -5
- package/dist/es2019/components/skip-links/skip-link-components.js +5 -1
- package/dist/es2019/components/skip-links/use-custom-skip-link.js +3 -0
- package/dist/es2019/components/slots/banner-slot.js +12 -5
- package/dist/es2019/components/slots/content.js +5 -0
- package/dist/es2019/components/slots/internal/left-sidebar-inner.js +19 -3
- package/dist/es2019/components/slots/internal/left-sidebar-outer.js +18 -3
- package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +6 -1
- package/dist/es2019/components/slots/internal/slot-focus-ring.js +8 -2
- package/dist/es2019/components/slots/left-panel.js +10 -3
- package/dist/es2019/components/slots/left-sidebar-without-resize.js +5 -0
- package/dist/es2019/components/slots/left-sidebar.js +6 -0
- package/dist/es2019/components/slots/main.js +8 -2
- package/dist/es2019/components/slots/page-layout.js +15 -1
- package/dist/es2019/components/slots/right-panel.js +10 -3
- package/dist/es2019/components/slots/right-sidebar.js +14 -9
- package/dist/es2019/components/slots/slot-dimensions.js +4 -1
- package/dist/es2019/components/slots/top-navigation.js +13 -6
- package/dist/esm/components/resize-control/grab-area.js +8 -1
- package/dist/esm/components/resize-control/index.js +10 -2
- package/dist/esm/components/resize-control/resize-button.js +6 -0
- package/dist/esm/components/resize-control/shadow.js +8 -5
- package/dist/esm/components/skip-links/skip-link-components.js +5 -1
- package/dist/esm/components/skip-links/use-custom-skip-link.js +3 -0
- package/dist/esm/components/slots/banner-slot.js +12 -5
- package/dist/esm/components/slots/content.js +5 -0
- package/dist/esm/components/slots/internal/left-sidebar-inner.js +17 -1
- package/dist/esm/components/slots/internal/left-sidebar-outer.js +16 -1
- package/dist/esm/components/slots/internal/resizable-children-wrapper.js +6 -1
- package/dist/esm/components/slots/internal/slot-focus-ring.js +8 -2
- package/dist/esm/components/slots/left-panel.js +10 -3
- package/dist/esm/components/slots/left-sidebar-without-resize.js +5 -0
- package/dist/esm/components/slots/left-sidebar.js +6 -0
- package/dist/esm/components/slots/main.js +8 -2
- package/dist/esm/components/slots/page-layout.js +10 -2
- package/dist/esm/components/slots/right-panel.js +10 -3
- package/dist/esm/components/slots/right-sidebar.js +14 -9
- package/dist/esm/components/slots/slot-dimensions.js +5 -1
- package/dist/esm/components/slots/top-navigation.js +13 -6
- package/dist/types/components/resize-control/grab-area.d.ts +3 -0
- package/dist/types/components/resize-control/shadow.d.ts +3 -0
- package/dist/types/components/skip-links/skip-link-components.d.ts +3 -0
- package/dist/types/components/slots/content.d.ts +3 -0
- package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +3 -0
- package/dist/types/components/slots/internal/left-sidebar-outer.d.ts +3 -0
- package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +3 -0
- package/dist/types/components/slots/internal/slot-focus-ring.d.ts +3 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/resize-control/grab-area.d.ts +3 -0
- package/dist/types-ts4.5/components/resize-control/shadow.d.ts +3 -0
- package/dist/types-ts4.5/components/skip-links/skip-link-components.d.ts +3 -0
- package/dist/types-ts4.5/components/slots/content.d.ts +3 -0
- package/dist/types-ts4.5/components/slots/internal/left-sidebar-inner.d.ts +3 -0
- package/dist/types-ts4.5/components/slots/internal/left-sidebar-outer.d.ts +3 -0
- package/dist/types-ts4.5/components/slots/internal/resizable-children-wrapper.d.ts +3 -0
- package/dist/types-ts4.5/components/slots/internal/slot-focus-ring.d.ts +3 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +123 -123
- package/report.api.md +83 -84
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { useState } from 'react';
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { css, jsx } from '@emotion/react';
|
|
5
9
|
|
|
6
10
|
import { Notifications } from '@atlaskit/atlassian-navigation';
|
|
@@ -10,96 +14,94 @@ import { NotificationLogClient } from '@atlaskit/notification-log-client';
|
|
|
10
14
|
import Popup from '@atlaskit/popup';
|
|
11
15
|
|
|
12
16
|
const wrapperStyles = css({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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,
|
|
20
24
|
});
|
|
21
25
|
|
|
22
26
|
const NotificationsContent = () => (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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>
|
|
33
37
|
);
|
|
34
38
|
|
|
35
39
|
class MockNotificationLogClient extends NotificationLogClient {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
mockedCount = 0;
|
|
41
|
+
constructor(mockedCount: number) {
|
|
42
|
+
super('', '');
|
|
43
|
+
this.mockedCount = mockedCount;
|
|
44
|
+
}
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
public async countUnseenNotifications() {
|
|
47
|
+
return Promise.resolve({ count: this.mockedCount });
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
const client = new MockNotificationLogClient(5);
|
|
48
52
|
const emptyClient = new MockNotificationLogClient(0);
|
|
49
53
|
|
|
50
54
|
export const NotificationsPopup = () => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
56
|
+
const [interacted, setInteracted] = useState(false);
|
|
57
|
+
const [buttonLabel, setButtonLabel] = useState<number | undefined>();
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
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
|
+
);
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
+
};
|
|
76
78
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
const onClick = () => {
|
|
80
|
+
// let the badge icon know to clear its count
|
|
81
|
+
setInteracted(true);
|
|
82
|
+
setIsOpen(!isOpen);
|
|
83
|
+
};
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
const onClose = () => {
|
|
86
|
+
setIsOpen(false);
|
|
87
|
+
};
|
|
86
88
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
+
);
|
|
105
107
|
};
|
|
@@ -6,70 +6,70 @@ import { ButtonItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
|
6
6
|
import Popup from '@atlaskit/popup';
|
|
7
7
|
|
|
8
8
|
export const DefaultProfile = () => (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<Profile
|
|
10
|
+
icon={<img src={avatarUrl} alt="Your profile and settings" />}
|
|
11
|
+
onClick={noop}
|
|
12
|
+
tooltip="Your profile and settings"
|
|
13
|
+
/>
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
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enuGroup>
|
|
21
|
+
<Section>
|
|
22
|
+
<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
33
|
);
|
|
34
34
|
|
|
35
35
|
const imgCSS = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
borderRadius: '100%',
|
|
37
|
+
height: 24,
|
|
38
|
+
width: 24,
|
|
39
39
|
};
|
|
40
40
|
export const ProfilePopup = () => {
|
|
41
|
-
|
|
41
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const onClick = () => {
|
|
44
|
+
setIsOpen(!isOpen);
|
|
45
|
+
};
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
const onClose = () => {
|
|
48
|
+
setIsOpen(false);
|
|
49
|
+
};
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
75
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { Fragment } from 'react';
|
|
3
6
|
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
8
|
import { css, jsx } from '@emotion/react';
|
|
5
9
|
|
|
6
10
|
import { type CustomItemComponentProps } from '@atlaskit/menu';
|
|
@@ -9,40 +13,40 @@ import { B400, N200 } from '@atlaskit/theme/colors';
|
|
|
9
13
|
import { token } from '@atlaskit/tokens';
|
|
10
14
|
|
|
11
15
|
const Container = (props: CustomItemComponentProps) => {
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
17
|
+
return <div {...props} />;
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
const linkStyles = css({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
color: token('color.text.subtle', N200),
|
|
22
|
+
'&:hover': {
|
|
23
|
+
color: token('color.link', B400),
|
|
24
|
+
cursor: 'pointer',
|
|
25
|
+
textDecoration: 'none',
|
|
26
|
+
},
|
|
23
27
|
});
|
|
24
28
|
|
|
25
29
|
// This example footer conforms to a design taken from Jira designs found at
|
|
26
30
|
// https://www.figma.com/file/GA22za6unqO2WsBWM0Ddxk/Jira-navigation-3?node-id=124%3A7194
|
|
27
31
|
const ExampleFooter = () => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
);
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
export default ExampleFooter;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
6
|
import { jsx } from '@emotion/react';
|
|
3
7
|
|
|
4
8
|
import Icon from '@atlaskit/icon';
|
|
@@ -6,20 +10,20 @@ import { type CustomItemComponentProps } from '@atlaskit/menu';
|
|
|
6
10
|
import { Header } from '@atlaskit/side-navigation';
|
|
7
11
|
|
|
8
12
|
const Container = (props: CustomItemComponentProps) => {
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
14
|
+
return <div {...props} />;
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
const ExampleHeader = () => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
);
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
export default ExampleHeader;
|