@atlaskit/atlassian-navigation 2.5.1 → 2.6.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 +12 -0
- package/dist/cjs/components/AtlassianNavigation/index.js +11 -1
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -2
- package/dist/cjs/components/PrimaryItemsContainerV2/index.js +149 -0
- package/dist/cjs/components/ProductHome/custom-product-home.js +6 -1
- package/dist/cjs/components/ProductHome/product-home.js +7 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AtlassianNavigation/index.js +11 -1
- package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -3
- package/dist/es2019/components/PrimaryItemsContainerV2/index.js +129 -0
- package/dist/es2019/components/ProductHome/custom-product-home.js +9 -1
- package/dist/es2019/components/ProductHome/product-home.js +10 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AtlassianNavigation/index.js +11 -1
- package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -3
- package/dist/esm/components/PrimaryItemsContainerV2/index.js +138 -0
- package/dist/esm/components/ProductHome/custom-product-home.js +6 -1
- package/dist/esm/components/ProductHome/product-home.js +7 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/PrimaryItemsContainer/skeleton.d.ts +2 -1
- package/dist/types/components/PrimaryItemsContainerV2/index.d.ts +8 -0
- package/dist/types-ts4.5/common/constants.d.ts +9 -0
- package/dist/types-ts4.5/common/styles.d.ts +10 -0
- package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +14 -0
- package/dist/types-ts4.5/components/AppSwitcher/types.d.ts +2 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/index.d.ts +13 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/skeleton.d.ts +18 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/types.d.ts +107 -0
- package/dist/types-ts4.5/components/BadgeContainer/index.d.ts +4 -0
- package/dist/types-ts4.5/components/BadgeContainer/types.d.ts +6 -0
- package/dist/types-ts4.5/components/Create/index.d.ts +13 -0
- package/dist/types-ts4.5/components/Create/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/Create/styles.d.ts +3 -0
- package/dist/types-ts4.5/components/Create/types.d.ts +35 -0
- package/dist/types-ts4.5/components/Help/index.d.ts +13 -0
- package/dist/types-ts4.5/components/Help/types.d.ts +9 -0
- package/dist/types-ts4.5/components/IconButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/IconButton/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/components/IconButton/styles.d.ts +3 -0
- package/dist/types-ts4.5/components/IconButton/types.d.ts +100 -0
- package/dist/types-ts4.5/components/Notifications/index.d.ts +14 -0
- package/dist/types-ts4.5/components/Notifications/types.d.ts +9 -0
- package/dist/types-ts4.5/components/PrimaryButton/index.d.ts +18 -0
- package/dist/types-ts4.5/components/PrimaryButton/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/components/PrimaryButton/styles.d.ts +3 -0
- package/dist/types-ts4.5/components/PrimaryButton/types.d.ts +43 -0
- package/dist/types-ts4.5/components/PrimaryDropdownButton/index.d.ts +16 -0
- package/dist/types-ts4.5/components/PrimaryDropdownButton/types.d.ts +18 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/index.d.ts +6 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/types.d.ts +10 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainerV2/index.d.ts +8 -0
- package/dist/types-ts4.5/components/ProductHome/custom-product-home.d.ts +12 -0
- package/dist/types-ts4.5/components/ProductHome/index.d.ts +2 -0
- package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +15 -0
- package/dist/types-ts4.5/components/ProductHome/skeleton.d.ts +5 -0
- package/dist/types-ts4.5/components/ProductHome/types.d.ts +100 -0
- package/dist/types-ts4.5/components/ProductHome/utils.d.ts +1 -0
- package/dist/types-ts4.5/components/Profile/index.d.ts +17 -0
- package/dist/types-ts4.5/components/Profile/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/Profile/types.d.ts +2 -0
- package/dist/types-ts4.5/components/Search/index.d.ts +12 -0
- package/dist/types-ts4.5/components/Search/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/Search/types.d.ts +16 -0
- package/dist/types-ts4.5/components/Settings/index.d.ts +11 -0
- package/dist/types-ts4.5/components/Settings/types.d.ts +2 -0
- package/dist/types-ts4.5/components/SignIn/index.d.ts +12 -0
- package/dist/types-ts4.5/components/SignIn/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/SignIn/types.d.ts +2 -0
- package/dist/types-ts4.5/components/SkeletonCreateButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/SkeletonCreateButton/types.d.ts +12 -0
- package/dist/types-ts4.5/components/SkeletonIconButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/SkeletonIconButton/types.d.ts +18 -0
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/types.d.ts +25 -0
- package/dist/types-ts4.5/controllers/overflow/index.d.ts +44 -0
- package/dist/types-ts4.5/controllers/overflow/types.d.ts +7 -0
- package/dist/types-ts4.5/index.d.ts +30 -0
- package/dist/types-ts4.5/skeleton-help-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton-notification-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton-settings-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton-switcher-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton.d.ts +5 -0
- package/dist/types-ts4.5/theme/default-theme.d.ts +6 -0
- package/dist/types-ts4.5/theme/index.d.ts +6 -0
- package/dist/types-ts4.5/theme/theme-generator.d.ts +3 -0
- package/dist/types-ts4.5/theme/theme-helpers.d.ts +5 -0
- package/dist/types-ts4.5/theme/theme-provider.d.ts +8 -0
- package/dist/types-ts4.5/theme/themes.d.ts +3 -0
- package/dist/types-ts4.5/theme/types.d.ts +69 -0
- package/dist/types-ts4.5/theme/use-theme.d.ts +1 -0
- package/package.json +12 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SkeletonSettingsButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
+
* reader. Differentiates from other navigation buttons on a page.
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __Skeleton settings button__
|
|
11
|
+
*
|
|
12
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
14
|
+
* navigation are loaded dynamically. This one represents the Settings button.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
19
|
+
export declare const SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SkeletonSwitcherButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
+
* reader. Differentiates from other navigation buttons on a page.
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __Skeleton switcher button__
|
|
11
|
+
*
|
|
12
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
14
|
+
* navigation are loaded dynamically. This one represents the AppSwitcher button.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
19
|
+
export declare const SkeletonSwitcherButton: ({ label, }: SkeletonSwitcherButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { NavigationSkeleton } from './components/AtlassianNavigation/skeleton';
|
|
2
|
+
export type { NavigationSkeletonProps } from './components/AtlassianNavigation/types';
|
|
3
|
+
export { SkeletonCreateButton } from './components/SkeletonCreateButton';
|
|
4
|
+
export { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
5
|
+
export { SkeletonPrimaryButton } from './components/SkeletonPrimaryButton';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { generateTheme } from './theme-generator';
|
|
2
|
+
export { ThemeProvider } from './theme-provider';
|
|
3
|
+
export { atlassianTheme, defaultTheme } from './themes';
|
|
4
|
+
export type { CreateCSS, IconButtonCSS, Mode, NavigationCSS, NavigationTheme, PrimaryButtonCSS, SearchCSS, ProductHomeCSS, SkeletonCSS, Colors, GenerateThemeArgs, } from './types';
|
|
5
|
+
export { useTheme } from './use-theme';
|
|
6
|
+
export { hexToRGBA } from './theme-helpers';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const hexToRGBA: (hex: string, opacity?: number) => string;
|
|
2
|
+
export declare const getBoxShadow: (color: string) => string;
|
|
3
|
+
export declare const convertHexShorthand: (color: string) => string;
|
|
4
|
+
export declare const generateTextColor: (color: string) => string;
|
|
5
|
+
export declare const getContrastColor: (contrastValue: number, opacityValue: number, color: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ThemeContext: import("react").Context<import("./types").NavigationTheme>;
|
|
3
|
+
/**
|
|
4
|
+
* __Theme provider__
|
|
5
|
+
*
|
|
6
|
+
* A provider for the theme context used by all navigation components.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ThemeProvider: import("react").Provider<import("./types").NavigationTheme>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
2
|
+
export type CSSProperties = CSSObject & {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
export type ButtonCSSProperties = CSSProperties & {
|
|
7
|
+
boxShadow: string;
|
|
8
|
+
};
|
|
9
|
+
export type ButtonCSSContext = {
|
|
10
|
+
default: ButtonCSSProperties;
|
|
11
|
+
hover: ButtonCSSProperties;
|
|
12
|
+
focus: ButtonCSSProperties;
|
|
13
|
+
active: ButtonCSSProperties;
|
|
14
|
+
selected: ButtonCSSProperties;
|
|
15
|
+
selectedHover?: ButtonCSSProperties;
|
|
16
|
+
};
|
|
17
|
+
export type CreateCSS = ButtonCSSContext;
|
|
18
|
+
export type IconButtonCSS = ButtonCSSContext;
|
|
19
|
+
export type PrimaryButtonCSS = ButtonCSSContext;
|
|
20
|
+
export type NavigationCSS = CSSProperties;
|
|
21
|
+
type LogoStyleProps = {
|
|
22
|
+
iconGradientStart?: string;
|
|
23
|
+
iconGradientStop?: string;
|
|
24
|
+
iconColor?: string;
|
|
25
|
+
textColor?: string;
|
|
26
|
+
};
|
|
27
|
+
export type ProductHomeCSS = CSSProperties & LogoStyleProps;
|
|
28
|
+
export type SearchCSS = {
|
|
29
|
+
default: CSSProperties;
|
|
30
|
+
focus: CSSObject;
|
|
31
|
+
hover: CSSObject;
|
|
32
|
+
};
|
|
33
|
+
export type SkeletonCSS = CSSObject & {
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
opacity: number;
|
|
36
|
+
};
|
|
37
|
+
export type Mode = {
|
|
38
|
+
create: CreateCSS;
|
|
39
|
+
iconButton: IconButtonCSS;
|
|
40
|
+
navigation: NavigationCSS;
|
|
41
|
+
primaryButton: PrimaryButtonCSS;
|
|
42
|
+
productHome: ProductHomeCSS;
|
|
43
|
+
search: SearchCSS;
|
|
44
|
+
skeleton: SkeletonCSS;
|
|
45
|
+
};
|
|
46
|
+
export type NavigationTheme = {
|
|
47
|
+
mode: Mode;
|
|
48
|
+
};
|
|
49
|
+
export type Colors = {
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
color: string;
|
|
52
|
+
};
|
|
53
|
+
export type GenerateThemeArgs = {
|
|
54
|
+
/**
|
|
55
|
+
* Name of the theme.
|
|
56
|
+
* If you pass in "atlassian" will return the default atlassian theme and not
|
|
57
|
+
* use any of the colors you pass in.
|
|
58
|
+
*/
|
|
59
|
+
name?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Main background color of the horizontal navigation bar.
|
|
62
|
+
*/
|
|
63
|
+
backgroundColor: string;
|
|
64
|
+
/**
|
|
65
|
+
* Highlight color for the navigation actions.
|
|
66
|
+
*/
|
|
67
|
+
highlightColor: string;
|
|
68
|
+
};
|
|
69
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTheme: () => import("./types").NavigationTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
38
38
|
"@atlaskit/icon": "^21.12.0",
|
|
39
39
|
"@atlaskit/logo": "*",
|
|
40
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
40
41
|
"@atlaskit/popup": "^1.6.0",
|
|
42
|
+
"@atlaskit/primitives": "^0.9.2",
|
|
41
43
|
"@atlaskit/theme": "^12.5.0",
|
|
42
44
|
"@atlaskit/tokens": "^1.4.0",
|
|
43
45
|
"@atlaskit/tooltip": "^17.8.0",
|
|
@@ -63,6 +65,8 @@
|
|
|
63
65
|
"@atlaskit/spinner": "*",
|
|
64
66
|
"@atlaskit/visual-regression": "*",
|
|
65
67
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
68
|
+
"@atlassian/feature-flags-test-utils": "^0.1.1",
|
|
69
|
+
"@atlassian/gemini-visual-regression": "*",
|
|
66
70
|
"@atlassian/switcher": "*",
|
|
67
71
|
"@atlassian/switcher-test-utils": "*",
|
|
68
72
|
"@testing-library/react": "^12.1.5",
|
|
@@ -70,6 +74,7 @@
|
|
|
70
74
|
"jest-axe": "^4.0.0",
|
|
71
75
|
"jest-emotion": "^10.0.32",
|
|
72
76
|
"react": "^16.8.0",
|
|
77
|
+
"react-dom": "^16.8.0",
|
|
73
78
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
74
79
|
"typescript": "~4.9.5"
|
|
75
80
|
},
|
|
@@ -93,5 +98,10 @@
|
|
|
93
98
|
}
|
|
94
99
|
},
|
|
95
100
|
"homepage": "https://atlassian.design/components/atlassian-navigation/",
|
|
96
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
101
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
102
|
+
"platform-feature-flags": {
|
|
103
|
+
"platform.design-system-team.navigation-v2-no-jank_5yhbd": {
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
97
107
|
}
|