@atlaskit/page-layout 3.3.3 → 3.4.1

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +6 -3
  3. package/__perf__/examples.tsx +45 -69
  4. package/__perf__/utils/perf-example.tsx +53 -55
  5. package/__perf__/utils/product-integration/atlassian-navigation.tsx +80 -77
  6. package/__perf__/utils/product-integration/create.tsx +12 -15
  7. package/__perf__/utils/product-integration/help-popup.tsx +38 -38
  8. package/__perf__/utils/product-integration/notifications-popup.tsx +76 -74
  9. package/__perf__/utils/product-integration/profile-popup.tsx +53 -53
  10. package/__perf__/utils/product-integration/sample-footer.tsx +30 -26
  11. package/__perf__/utils/product-integration/sample-header.tsx +15 -11
  12. package/__perf__/utils/product-integration/side-navigation.tsx +92 -101
  13. package/dist/cjs/components/resize-control/grab-area.js +8 -1
  14. package/dist/cjs/components/resize-control/index.js +9 -3
  15. package/dist/cjs/components/resize-control/resize-button.js +6 -0
  16. package/dist/cjs/components/resize-control/shadow.js +9 -5
  17. package/dist/cjs/components/skip-links/skip-link-components.js +4 -2
  18. package/dist/cjs/components/skip-links/use-custom-skip-link.js +3 -0
  19. package/dist/cjs/components/slots/banner-slot.js +12 -5
  20. package/dist/cjs/components/slots/content.js +6 -0
  21. package/dist/cjs/components/slots/internal/left-sidebar-inner.js +18 -1
  22. package/dist/cjs/components/slots/internal/left-sidebar-outer.js +16 -1
  23. package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +7 -1
  24. package/dist/cjs/components/slots/internal/slot-focus-ring.js +9 -2
  25. package/dist/cjs/components/slots/left-panel.js +10 -3
  26. package/dist/cjs/components/slots/left-sidebar-without-resize.js +5 -0
  27. package/dist/cjs/components/slots/left-sidebar.js +4 -1
  28. package/dist/cjs/components/slots/main.js +8 -2
  29. package/dist/cjs/components/slots/page-layout.js +10 -2
  30. package/dist/cjs/components/slots/right-panel.js +10 -3
  31. package/dist/cjs/components/slots/right-sidebar.js +14 -9
  32. package/dist/cjs/components/slots/slot-dimensions.js +5 -1
  33. package/dist/cjs/components/slots/top-navigation.js +13 -6
  34. package/dist/es2019/components/resize-control/grab-area.js +8 -1
  35. package/dist/es2019/components/resize-control/index.js +10 -2
  36. package/dist/es2019/components/resize-control/resize-button.js +7 -1
  37. package/dist/es2019/components/resize-control/shadow.js +8 -5
  38. package/dist/es2019/components/skip-links/skip-link-components.js +5 -1
  39. package/dist/es2019/components/skip-links/use-custom-skip-link.js +3 -0
  40. package/dist/es2019/components/slots/banner-slot.js +12 -5
  41. package/dist/es2019/components/slots/content.js +5 -0
  42. package/dist/es2019/components/slots/internal/left-sidebar-inner.js +19 -3
  43. package/dist/es2019/components/slots/internal/left-sidebar-outer.js +18 -3
  44. package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +6 -1
  45. package/dist/es2019/components/slots/internal/slot-focus-ring.js +8 -2
  46. package/dist/es2019/components/slots/left-panel.js +10 -3
  47. package/dist/es2019/components/slots/left-sidebar-without-resize.js +5 -0
  48. package/dist/es2019/components/slots/left-sidebar.js +6 -0
  49. package/dist/es2019/components/slots/main.js +8 -2
  50. package/dist/es2019/components/slots/page-layout.js +15 -1
  51. package/dist/es2019/components/slots/right-panel.js +10 -3
  52. package/dist/es2019/components/slots/right-sidebar.js +14 -9
  53. package/dist/es2019/components/slots/slot-dimensions.js +4 -1
  54. package/dist/es2019/components/slots/top-navigation.js +13 -6
  55. package/dist/esm/components/resize-control/grab-area.js +8 -1
  56. package/dist/esm/components/resize-control/index.js +10 -2
  57. package/dist/esm/components/resize-control/resize-button.js +6 -0
  58. package/dist/esm/components/resize-control/shadow.js +8 -5
  59. package/dist/esm/components/skip-links/skip-link-components.js +5 -1
  60. package/dist/esm/components/skip-links/use-custom-skip-link.js +3 -0
  61. package/dist/esm/components/slots/banner-slot.js +12 -5
  62. package/dist/esm/components/slots/content.js +5 -0
  63. package/dist/esm/components/slots/internal/left-sidebar-inner.js +17 -1
  64. package/dist/esm/components/slots/internal/left-sidebar-outer.js +16 -1
  65. package/dist/esm/components/slots/internal/resizable-children-wrapper.js +6 -1
  66. package/dist/esm/components/slots/internal/slot-focus-ring.js +8 -2
  67. package/dist/esm/components/slots/left-panel.js +10 -3
  68. package/dist/esm/components/slots/left-sidebar-without-resize.js +5 -0
  69. package/dist/esm/components/slots/left-sidebar.js +6 -0
  70. package/dist/esm/components/slots/main.js +8 -2
  71. package/dist/esm/components/slots/page-layout.js +10 -2
  72. package/dist/esm/components/slots/right-panel.js +10 -3
  73. package/dist/esm/components/slots/right-sidebar.js +14 -9
  74. package/dist/esm/components/slots/slot-dimensions.js +5 -1
  75. package/dist/esm/components/slots/top-navigation.js +13 -6
  76. package/dist/types/components/resize-control/grab-area.d.ts +3 -0
  77. package/dist/types/components/resize-control/shadow.d.ts +3 -0
  78. package/dist/types/components/skip-links/skip-link-components.d.ts +3 -0
  79. package/dist/types/components/slots/content.d.ts +3 -0
  80. package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +3 -0
  81. package/dist/types/components/slots/internal/left-sidebar-outer.d.ts +3 -0
  82. package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +3 -0
  83. package/dist/types/components/slots/internal/slot-focus-ring.d.ts +3 -0
  84. package/dist/types/index.d.ts +1 -1
  85. package/dist/types-ts4.5/components/resize-control/grab-area.d.ts +3 -0
  86. package/dist/types-ts4.5/components/resize-control/shadow.d.ts +3 -0
  87. package/dist/types-ts4.5/components/skip-links/skip-link-components.d.ts +3 -0
  88. package/dist/types-ts4.5/components/slots/content.d.ts +3 -0
  89. package/dist/types-ts4.5/components/slots/internal/left-sidebar-inner.d.ts +3 -0
  90. package/dist/types-ts4.5/components/slots/internal/left-sidebar-outer.d.ts +3 -0
  91. package/dist/types-ts4.5/components/slots/internal/resizable-children-wrapper.d.ts +3 -0
  92. package/dist/types-ts4.5/components/slots/internal/slot-focus-ring.d.ts +3 -0
  93. package/dist/types-ts4.5/index.d.ts +1 -1
  94. package/package.json +123 -123
  95. package/report.api.md +83 -84
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 3.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#110836](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110836)
14
+ [`a8bd419fd70b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a8bd419fd70b9) -
15
+ Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime
16
+ is implicitly set to automatic.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 3.3.3
4
23
 
5
24
  ### Patch Changes
@@ -30,7 +49,7 @@
30
49
 
31
50
  - [#100748](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100748)
32
51
  [`ff76f4c7a63d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ff76f4c7a63d) -
33
- Add support for React 18.
52
+ Add support for React 18 in non-strict mode.
34
53
 
35
54
  ## 3.2.2
36
55
 
package/README.md CHANGED
@@ -10,7 +10,10 @@ yarn add @atlaskit/page-layout
10
10
 
11
11
  ## Usage
12
12
 
13
- Detailed docs and example usage can be found [here](https://atlassian.design/components/page-layout/).
13
+ Detailed docs and example usage can be found
14
+ [here](https://atlassian.design/components/page-layout/).
14
15
 
15
- To add side navigation, use [@atlaskit/side-navigation](https://atlassian.design/components/side-navigation/)
16
- To add top/global navigation, use [@atlaskit/atlassian-navigation](https://atlassian.design/components/atlassian-navigation/)
16
+ To add side navigation, use
17
+ [@atlaskit/side-navigation](https://atlassian.design/components/side-navigation/) To add top/global
18
+ navigation, use
19
+ [@atlaskit/atlassian-navigation](https://atlassian.design/components/atlassian-navigation/)
@@ -1,89 +1,65 @@
1
1
  import React from 'react';
2
2
 
3
- import {
4
- findByTestId,
5
- findByText,
6
- fireEvent,
7
- getByTestId,
8
- } from '@testing-library/dom'; // eslint-disable-line import/no-extraneous-dependencies
3
+ import { findByTestId, findByText, fireEvent, getByTestId } from '@testing-library/dom'; // eslint-disable-line import/no-extraneous-dependencies
9
4
  // eslint-disable-next-line import/no-extraneous-dependencies
10
- import {
11
- type InteractionTaskArgs,
12
- type PublicInteractionTask,
13
- } from 'storybook-addon-performance'; // eslint-disable-line import/no-extraneous-dependencies
5
+ import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance'; // eslint-disable-line import/no-extraneous-dependencies
14
6
 
15
7
  import ProductExample from './utils/perf-example';
16
8
 
17
9
  const interactionTasks: PublicInteractionTask[] = [
18
- {
19
- name: 'Side nav: Opening nested side nav',
20
- description: 'Open a nested item in side-navigation',
10
+ {
11
+ name: 'Side nav: Opening nested side nav',
12
+ description: 'Open a nested item in side-navigation',
21
13
 
22
- run: async ({ container }: InteractionTaskArgs): Promise<void> => {
23
- const element: HTMLElement | null = getByTestId(
24
- container,
25
- 'nav-side-queues--item',
26
- );
27
- fireEvent.click(element);
28
- await findByText(container, 'Untriaged', undefined, { timeout: 2000 });
29
- },
30
- },
31
- {
32
- name: 'Global nav: Open dropdown',
33
- description: 'Open a dropdown in side-navigation',
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',
34
23
 
35
- run: async ({ container }: InteractionTaskArgs): Promise<void> => {
36
- const element: HTMLElement | null = getByTestId(container, 'nav-help');
37
- fireEvent.click(element);
38
- await findByTestId(
39
- container.parentElement || container,
40
- 'nav-help-content',
41
- undefined,
42
- {
43
- timeout: 2000,
44
- },
45
- );
46
- },
47
- },
48
- {
49
- name: 'Global nav: Notifications',
50
- description: 'Open the notifications panel in global navigation',
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',
51
35
 
52
- run: async ({ container }: InteractionTaskArgs): Promise<void> => {
53
- const element: HTMLElement | null = getByTestId(
54
- container,
55
- 'nav-notifications',
56
- );
57
- fireEvent.click(element);
58
- await findByTestId(
59
- container.parentElement || container,
60
- 'jira-notifications',
61
- undefined,
62
- {
63
- timeout: 2000,
64
- },
65
- );
66
- },
67
- },
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
+ },
68
44
  ];
69
45
 
70
46
  const performance = () => {
71
- return (
72
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
73
- <div style={{ margin: '-1rem 0 0 -1rem', height: '100vh' }}>
74
- <ProductExample />
75
- </div>
76
- );
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
+ );
77
53
  };
78
54
 
79
55
  performance.story = {
80
- name: 'Performance',
56
+ name: 'Performance',
81
57
 
82
- parameters: {
83
- performance: {
84
- interactions: interactionTasks,
85
- },
86
- },
58
+ parameters: {
59
+ performance: {
60
+ interactions: interactionTasks,
61
+ },
62
+ },
87
63
  };
88
64
 
89
65
  export default performance;
@@ -1,82 +1,80 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
 
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
7
  import { css, jsx } from '@emotion/react';
4
8
 
5
9
  import { token } from '@atlaskit/tokens';
6
10
 
7
- import {
8
- Content,
9
- LeftSidebar,
10
- Main,
11
- PageLayout,
12
- TopNavigation,
13
- } from '../../src';
11
+ import { Content, LeftSidebar, Main, PageLayout, TopNavigation } from '../../src';
14
12
 
15
13
  import JiraIntegrationExample from './product-integration/atlassian-navigation';
16
14
  import Sidebar from './product-integration/side-navigation';
17
15
 
18
16
  const wrapperStyles = css({
19
- boxSizing: 'border-box',
20
- height: '100%',
21
- padding: token('space.100', '8px'),
22
- backgroundColor: token('color.background.neutral.subtle'),
23
- outlineOffset: -4,
24
- overflowY: 'auto',
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',
25
23
  });
26
24
 
27
25
  const Wrapper = ({
28
- borderColor,
29
- children,
30
- noOutline,
31
- noHorizontalScrollbar,
26
+ borderColor,
27
+ children,
28
+ noOutline,
29
+ noHorizontalScrollbar,
32
30
  }: {
33
- borderColor: string;
34
- children: React.ReactNode;
35
- noOutline?: boolean;
36
- noHorizontalScrollbar?: boolean;
31
+ borderColor: string;
32
+ children: React.ReactNode;
33
+ noOutline?: boolean;
34
+ noHorizontalScrollbar?: boolean;
37
35
  }) => (
38
- <div
39
- css={wrapperStyles}
40
- style={{
41
- outline: noOutline ? 'none' : `2px dashed ${borderColor}`,
42
- overflowX: noHorizontalScrollbar ? 'hidden' : 'auto',
43
- }}
44
- >
45
- {children}
46
- </div>
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>
47
45
  );
48
46
 
49
47
  const sidebarWrapperStyles = css({
50
- height: '100%',
51
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
52
- nav: {
53
- minWidth: 20,
54
- overflowX: 'hidden',
55
- },
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
+ },
56
54
  });
57
55
 
58
56
  const slotLabelStyles = css({ textAlign: 'center' });
59
57
 
60
58
  const BasicGrid = () => {
61
- return (
62
- <PageLayout>
63
- <TopNavigation height={60} isFixed={true}>
64
- <JiraIntegrationExample />
65
- </TopNavigation>
66
- <Content testId="content">
67
- <LeftSidebar testId="left-sidebar" isFixed={false} width={450}>
68
- <div css={sidebarWrapperStyles}>
69
- <Sidebar />
70
- </div>
71
- </LeftSidebar>
72
- <Main>
73
- <Wrapper noOutline borderColor={token('color.border')}>
74
- <h3 css={slotLabelStyles}>Main</h3>
75
- </Wrapper>
76
- </Main>
77
- </Content>
78
- </PageLayout>
79
- );
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
+ );
80
78
  };
81
79
 
82
80
  export default BasicGrid;
@@ -1,15 +1,19 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
  import { Fragment, type MouseEvent, useState } from 'react';
3
6
 
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
8
  import { jsx } from '@emotion/react';
5
9
 
6
10
  // AFP-1799 storybook examples in src cause issues
7
11
  import {
8
- AtlassianNavigation,
9
- PrimaryButton,
10
- ProductHome,
11
- Search,
12
- Settings,
12
+ AtlassianNavigation,
13
+ PrimaryButton,
14
+ ProductHome,
15
+ Search,
16
+ Settings,
13
17
  } from '@atlaskit/atlassian-navigation';
14
18
  import Drawer from '@atlaskit/drawer';
15
19
  import { JiraIcon, JiraLogo } from '@atlaskit/logo';
@@ -20,96 +24,95 @@ import { NotificationsPopup } from './notifications-popup';
20
24
  import { ProfilePopup } from './profile-popup';
21
25
 
22
26
  const drawerLabelText = {
23
- search: 'Search drawer',
24
- settings: 'Settings drawer',
27
+ search: 'Search drawer',
28
+ settings: 'Settings drawer',
25
29
  };
26
30
 
27
31
  const { search, settings } = drawerLabelText;
28
32
 
29
33
  const ProductHomeExample = () => (
30
- <ProductHome icon={JiraIcon} logo={JiraLogo} siteTitle="Extranet" />
34
+ <ProductHome icon={JiraIcon} logo={JiraLogo} siteTitle="Extranet" />
31
35
  );
32
36
 
33
37
  const SearchDrawer = () => {
34
- const [isOpen, setIsOpen] = useState(false);
35
-
36
- const onClick = () => {
37
- setIsOpen(!isOpen);
38
- };
39
-
40
- const onClose = () => {
41
- setIsOpen(false);
42
- };
43
-
44
- return (
45
- <Fragment>
46
- <Search
47
- onClick={onClick}
48
- testId="nav-search"
49
- placeholder="Search..."
50
- tooltip="Search"
51
- label="Search"
52
- />
53
- <Drawer label={search} isOpen={isOpen} onClose={onClose}>
54
- <div>{search}</div>
55
- </Drawer>
56
- </Fragment>
57
- );
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
+ <div>{search}</div>
59
+ </Drawer>
60
+ </Fragment>
61
+ );
58
62
  };
59
63
 
60
64
  const SettingsDrawer = () => {
61
- const [isOpen, setIsOpen] = useState(false);
62
-
63
- const onClick = () => {
64
- setIsOpen(!isOpen);
65
- };
66
-
67
- const onClose = () => {
68
- setIsOpen(false);
69
- };
70
-
71
- return (
72
- <Fragment>
73
- <Settings isSelected={isOpen} onClick={onClick} tooltip="Settings" />
74
- <Drawer label={settings} isOpen={isOpen} onClose={onClose}>
75
- {settings}
76
- </Drawer>
77
- </Fragment>
78
- );
65
+ const [isOpen, setIsOpen] = useState(false);
66
+
67
+ const onClick = () => {
68
+ setIsOpen(!isOpen);
69
+ };
70
+
71
+ const onClose = () => {
72
+ setIsOpen(false);
73
+ };
74
+
75
+ return (
76
+ <Fragment>
77
+ <Settings isSelected={isOpen} onClick={onClick} tooltip="Settings" />
78
+ <Drawer label={settings} isOpen={isOpen} onClose={onClose}>
79
+ {settings}
80
+ </Drawer>
81
+ </Fragment>
82
+ );
79
83
  };
80
84
 
81
- const buttonClick =
82
- (toLog: string) => (e: MouseEvent<HTMLElement | HTMLAnchorElement>) => {
83
- if (e.ctrlKey || e.metaKey) {
84
- return;
85
- }
86
- e.preventDefault();
87
- };
85
+ const buttonClick = (toLog: string) => (e: MouseEvent<HTMLElement | HTMLAnchorElement>) => {
86
+ if (e.ctrlKey || e.metaKey) {
87
+ return;
88
+ }
89
+ e.preventDefault();
90
+ };
88
91
 
89
92
  const primaryItems = [
90
- <PrimaryButton onClick={buttonClick('Projects')}>Projects</PrimaryButton>,
91
- <PrimaryButton onClick={buttonClick('Filters')} isHighlighted>
92
- Filters
93
- </PrimaryButton>,
94
- <PrimaryButton onClick={buttonClick('Dashboards')}>Dashboards</PrimaryButton>,
95
- <PrimaryButton onClick={buttonClick('Apps')}>Apps</PrimaryButton>,
93
+ <PrimaryButton onClick={buttonClick('Projects')}>Projects</PrimaryButton>,
94
+ <PrimaryButton onClick={buttonClick('Filters')} isHighlighted>
95
+ Filters
96
+ </PrimaryButton>,
97
+ <PrimaryButton onClick={buttonClick('Dashboards')}>Dashboards</PrimaryButton>,
98
+ <PrimaryButton onClick={buttonClick('Apps')}>Apps</PrimaryButton>,
96
99
  ];
97
100
 
98
101
  const PerfExample = () => (
99
- <Fragment>
100
- <AtlassianNavigation
101
- label="site"
102
- moreLabel="More"
103
- primaryItems={primaryItems}
104
- renderCreate={DefaultCreate}
105
- renderHelp={HelpPopup}
106
- renderNotifications={NotificationsPopup}
107
- renderProductHome={ProductHomeExample}
108
- renderProfile={ProfilePopup}
109
- renderSearch={SearchDrawer}
110
- renderSettings={SettingsDrawer}
111
- />
112
- </Fragment>
102
+ <Fragment>
103
+ <AtlassianNavigation
104
+ label="site"
105
+ moreLabel="More"
106
+ primaryItems={primaryItems}
107
+ renderCreate={DefaultCreate}
108
+ renderHelp={HelpPopup}
109
+ renderNotifications={NotificationsPopup}
110
+ renderProductHome={ProductHomeExample}
111
+ renderProfile={ProfilePopup}
112
+ renderSearch={SearchDrawer}
113
+ renderSettings={SettingsDrawer}
114
+ />
115
+ </Fragment>
113
116
  );
114
117
 
115
118
  export default PerfExample;
@@ -5,22 +5,19 @@ import noop from '@atlaskit/ds-lib/noop';
5
5
  import { token } from '@atlaskit/tokens';
6
6
 
7
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') }}>
12
- {' '}
13
- [c]
14
- </span>
15
- </span>
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>
16
13
  );
17
14
 
18
15
  export const DefaultCreate = () => (
19
- <Create
20
- buttonTooltip={<StyledTooltip />}
21
- iconButtonTooltip="Create button"
22
- onClick={noop}
23
- text="Create"
24
- testId="create-cta"
25
- />
16
+ <Create
17
+ buttonTooltip={<StyledTooltip />}
18
+ iconButtonTooltip="Create button"
19
+ onClick={noop}
20
+ text="Create"
21
+ testId="create-cta"
22
+ />
26
23
  );
@@ -5,48 +5,48 @@ import { ButtonItem, MenuGroup, Section } from '@atlaskit/menu';
5
5
  import Popup from '@atlaskit/popup';
6
6
 
7
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>
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
22
  );
23
23
 
24
24
  export const HelpPopup = () => {
25
- const [isOpen, setIsOpen] = useState(false);
25
+ const [isOpen, setIsOpen] = useState(false);
26
26
 
27
- const onClick = () => {
28
- setIsOpen(!isOpen);
29
- };
27
+ const onClick = () => {
28
+ setIsOpen(!isOpen);
29
+ };
30
30
 
31
- const onClose = () => {
32
- setIsOpen(false);
33
- };
31
+ const onClose = () => {
32
+ setIsOpen(false);
33
+ };
34
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
- );
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
52
  };