@atlaskit/atlassian-navigation 2.6.15 → 2.6.16
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 +6 -0
- package/dist/cjs/components/PrimaryItemsContainerV2/index.js +83 -43
- package/dist/cjs/components/ProductHome/product-home.js +10 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/PrimaryItemsContainerV2/index.js +68 -44
- package/dist/es2019/components/ProductHome/product-home.js +9 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/PrimaryItemsContainerV2/index.js +85 -45
- package/dist/esm/components/ProductHome/product-home.js +10 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/PrimaryItemsContainerV2/index.d.ts +1 -3
- package/dist/types-ts4.5/components/PrimaryItemsContainerV2/index.d.ts +1 -3
- package/package.json +3 -3
- package/__perf__/default.tsx +0 -14
- package/docs/01-intro.tsx +0 -46
- package/docs/02-atlassian-navigation.tsx +0 -38
- package/docs/03-product-home.tsx +0 -73
- package/docs/04-app-switcher.tsx +0 -29
- package/docs/05-create.tsx +0 -37
- package/docs/06-primary-actions.tsx +0 -64
- package/docs/07-secondary-actions.tsx +0 -206
- package/docs/96-skeleton-buttons.tsx +0 -88
- package/docs/97-theming.tsx +0 -45
- package/docs/98-overflow-menu.tsx +0 -49
- package/docs/99-migrating-from-navigation-next.tsx +0 -52
- package/docs/ert/skeleton-create-button.tsx +0 -3
- package/docs/ert/skeleton-icon-button.tsx +0 -3
- package/docs/ert/skeleton-primary-button.tsx +0 -3
- package/docs/ert/skeleton-switcher-button.tsx +0 -3
package/docs/97-theming.tsx
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
Theming is enabled via the \`theme\` prop in the parent [Atlassian navigation](atlassian-navigation) component.
|
|
7
|
-
|
|
8
|
-
${code`
|
|
9
|
-
import {
|
|
10
|
-
generateTheme,
|
|
11
|
-
AtlassianNavigation
|
|
12
|
-
} from '@atlaskit/atlassian-navigation';
|
|
13
|
-
|
|
14
|
-
const theme = generateTheme({
|
|
15
|
-
name: 'high-contrast',
|
|
16
|
-
backgroundColor: '#272727',
|
|
17
|
-
highlightColor: '#E94E34',
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
<AtlassianNavigation
|
|
21
|
-
theme={theme}
|
|
22
|
-
...
|
|
23
|
-
/>
|
|
24
|
-
`}
|
|
25
|
-
|
|
26
|
-
${(
|
|
27
|
-
<Example
|
|
28
|
-
title="Themed navigation"
|
|
29
|
-
Component={require('../examples/themed-navigation').default}
|
|
30
|
-
source={require('!!raw-loader!../examples/themed-navigation')}
|
|
31
|
-
/>
|
|
32
|
-
)}
|
|
33
|
-
|
|
34
|
-
## \`generateTheme({})\`
|
|
35
|
-
|
|
36
|
-
Will return a theme function for you to pass into the Atlassian navigation component.
|
|
37
|
-
Ensures all colors including text have an accessible contrast.
|
|
38
|
-
|
|
39
|
-
${(
|
|
40
|
-
<Props
|
|
41
|
-
heading=""
|
|
42
|
-
props={require('!!extract-react-types-loader!../src/theme/theme-generator')}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
`;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { code, Example, md, Props } from '@atlaskit/docs';
|
|
4
|
-
|
|
5
|
-
export default md`
|
|
6
|
-
To support viewports of various sizes the primary navigation items supports being moved into an overflow menu.
|
|
7
|
-
Make sure to interact with the overflow menu button in the example below,
|
|
8
|
-
notice the items change appearance when they're inside the overflow menu.
|
|
9
|
-
|
|
10
|
-
The overflow menu uses [Menu](/packages/design-system/menu) so make sure to use items from that package else you will get undefined behaviour.
|
|
11
|
-
|
|
12
|
-
${code`
|
|
13
|
-
import {
|
|
14
|
-
PrimaryButton,
|
|
15
|
-
PrimaryButtonProps,
|
|
16
|
-
useOverflowStatus
|
|
17
|
-
} from '@atlaskit/atlassian-navigation';
|
|
18
|
-
import { ButtonItem } from '@atlaskit/menu';
|
|
19
|
-
|
|
20
|
-
(props: PrimaryButtonProps) => {
|
|
21
|
-
const overflowStatus = useOverflowStatus();
|
|
22
|
-
|
|
23
|
-
return overflowStatus.isVisible ? (
|
|
24
|
-
<PrimaryButton {...props} />
|
|
25
|
-
) : (
|
|
26
|
-
<ButtonItem>{props.children}</ButtonItem>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
`}
|
|
30
|
-
|
|
31
|
-
${(
|
|
32
|
-
<Example
|
|
33
|
-
title="Overflow menu"
|
|
34
|
-
Component={require('../examples/overflow-menu').default}
|
|
35
|
-
source={require('!!raw-loader!../examples/overflow-menu')}
|
|
36
|
-
/>
|
|
37
|
-
)}
|
|
38
|
-
|
|
39
|
-
## \`useOverflowStatus()\`
|
|
40
|
-
|
|
41
|
-
Used to get the current visibility of the navigation item.
|
|
42
|
-
|
|
43
|
-
${(
|
|
44
|
-
<Props
|
|
45
|
-
heading=""
|
|
46
|
-
props={require('!!extract-react-types-loader!../src/controllers/overflow')}
|
|
47
|
-
/>
|
|
48
|
-
)}
|
|
49
|
-
`;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { code, md } from '@atlaskit/docs';
|
|
2
|
-
|
|
3
|
-
export default md`
|
|
4
|
-
\`@atlaskit/navigation-next\` was deprecated due to:
|
|
5
|
-
|
|
6
|
-
- Large bundle size
|
|
7
|
-
- Poor runtime performance
|
|
8
|
-
- Lack of flexibility with layout
|
|
9
|
-
- Lack of consumer control of how and where to render the page content
|
|
10
|
-
|
|
11
|
-
It has been superseded by a composed navigation experience consisting of \`@atlaskit/page-layout\` to layout your application, \`@atlaskit/atlassian-navigation\` for the horizontal nav bar at the top of the screen, and \`@atlaskit/side-navigation\` for the side nav. **All Atlassian products should be using these packages instead — support is no longer provided for** \`@atlaskit/navigation-next\`.
|
|
12
|
-
|
|
13
|
-
This page intends to serve as a high level conceptual introduction to these packages. Detailed documentation for each can be found below:
|
|
14
|
-
|
|
15
|
-
- [Page layout](https://atlaskit.atlassian.com/packages/design-system/page-layout)
|
|
16
|
-
- [Atlassian navigation](https://atlaskit.atlassian.com/packages/navigation/atlassian-navigation)
|
|
17
|
-
- [Side navigation](https://atlaskit.atlassian.com/packages/navigation/side-navigation)
|
|
18
|
-
- [Worked example of all packages used together](https://atlaskit.atlassian.com/examples/design-system/page-layout/integration-example)
|
|
19
|
-
|
|
20
|
-
## Laying out your application
|
|
21
|
-
|
|
22
|
-
Where \`@atlaskit/navigation-next\` used to rely on the rigid and unperformant \`LayoutManager\`, we now have a light-weight and flexible solution in \`@atlaskit/page-layout\` ([docs](https://atlaskit.atlassian.com/packages/design-system/page-layout)). \`@atlaskit/page-layout\` can be used to wrap your entire app and help split the viewport into sections where you can render components in slots such as \`Banner\`, \`TopNavigation\`, \`Main\`, \`LeftSidebar\`, and more. It also provides valuable accessibility improvements to your application with support for [skip links](https://atlaskit.atlassian.com/packages/design-system/page-layout/docs/skip-links).
|
|
23
|
-
|
|
24
|
-
## Standardised top navigation
|
|
25
|
-
|
|
26
|
-
The role that used to be played by the deprecated \`@atlaskit/global-navigation\` is now played by \`@atlaskit/atlassian-navigation\` ([docs](https://atlaskit.atlassian.com/packages/navigation/atlassian-navigation)). This provides a well-structured, cohesive and performant navigation experience that is used across all Atlassian products.
|
|
27
|
-
|
|
28
|
-
\`@atlaskit/atlassian-navigation\` slots into the \`TopNavigation\` section in \`PageLayout\`.
|
|
29
|
-
|
|
30
|
-
If you're still using \`@atlaskit/navigation-next\`, it is also possible to incrementally adopt \`@atlaskit/atlassian-navigation\` by using the \`experimental_horizontalGlobalNav\` prop.
|
|
31
|
-
|
|
32
|
-
${code`
|
|
33
|
-
import { LayoutManagerWithViewController } from '@atlaskit/navigation-next';
|
|
34
|
-
import { AtlassianNavigation } from '@atlaskit/atlassian-navigation';
|
|
35
|
-
|
|
36
|
-
<LayoutManagerWithViewController
|
|
37
|
-
- globalNavigation={DefaultGlobalNavigation}
|
|
38
|
-
+ globalNavigation={AtlassianNavigation}
|
|
39
|
-
+ experimental_horizontalGlobalNav
|
|
40
|
-
/>
|
|
41
|
-
`}
|
|
42
|
-
|
|
43
|
-
However, it is **strongly recommended** that you adopt the full suite of navigation components together as ongoing support for \`@atlaskit/navigation-next\` will not be provided.
|
|
44
|
-
|
|
45
|
-
## Contextual, product-specific navigation
|
|
46
|
-
|
|
47
|
-
Previously contextual navigation was handled by passing in content to the \`productNavigation\` prop in \`@atlaskit/navigation-next\`'s \`LayoutManager\`. Now, it belongs in the dedicated \`@atlaskit/side-navigation\` package ([docs](https://atlaskit.atlassian.com/packages/navigation/side-navigation)).
|
|
48
|
-
|
|
49
|
-
## Need help?
|
|
50
|
-
|
|
51
|
-
Reach out to !disturbed in #help-design-system.
|
|
52
|
-
`;
|