@atlaskit/atlassian-navigation 2.1.6 → 2.2.2
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 +22 -0
- package/dist/cjs/theme/themeGenerator.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/theme/themeGenerator.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/theme/themeGenerator.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AtlassianNavigation/types.d.ts +18 -18
- package/dist/types/components/IconButton/types.d.ts +14 -14
- package/dist/types/components/PrimaryButton/index.d.ts +1 -0
- package/dist/types/components/PrimaryButton/types.d.ts +18 -1
- package/dist/types/components/ProductHome/types.d.ts +18 -18
- package/dist/types/components/SkeletonCreateButton/types.d.ts +8 -0
- package/dist/types/components/SkeletonIconButton/types.d.ts +12 -0
- package/dist/types/components/SkeletonPrimaryButton/types.d.ts +17 -0
- package/dist/types/skeleton-help-button.d.ts +7 -2
- package/dist/types/skeleton-notification-button.d.ts +7 -2
- package/dist/types/skeleton-settings-button.d.ts +7 -2
- package/dist/types/skeleton-switcher-button.d.ts +7 -2
- package/docs/ert/skeleton-create-button.tsx +3 -0
- package/docs/ert/skeleton-icon-button.tsx +3 -0
- package/docs/ert/skeleton-primary-button.tsx +3 -0
- package/docs/ert/skeleton-switcher-button.tsx +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d28c3b5078e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d28c3b5078e) - Updated type documentation
|
|
8
|
+
|
|
9
|
+
## 2.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 2.2.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`81addc0c144`](https://bitbucket.org/atlassian/atlassian-frontend/commits/81addc0c144) - [ux] Pass boxShadow for the focus styling of search section in the theme generator.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 2.1.6
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -107,7 +107,8 @@ var generateTheme = function generateTheme(themeColors) {
|
|
|
107
107
|
borderColor: (0, _themeHelpers.hexToRGBA)(color, 0.5)
|
|
108
108
|
},
|
|
109
109
|
focus: {
|
|
110
|
-
borderColor: (0, _themeHelpers.hexToRGBA)(highlightColor, 0.8)
|
|
110
|
+
borderColor: (0, _themeHelpers.hexToRGBA)(highlightColor, 0.8),
|
|
111
|
+
boxShadow: (0, _themeHelpers.getBoxShadow)((0, _themeHelpers.hexToRGBA)(highlightColor, 0.5))
|
|
111
112
|
},
|
|
112
113
|
hover: {
|
|
113
114
|
backgroundColor: (0, _themeHelpers.getContrastColor)(0.1, generateOpacityValue(color), backgroundColor),
|
package/dist/cjs/version.json
CHANGED
|
@@ -84,7 +84,8 @@ export const generateTheme = themeColors => {
|
|
|
84
84
|
borderColor: hexToRGBA(color, 0.5)
|
|
85
85
|
},
|
|
86
86
|
focus: {
|
|
87
|
-
borderColor: hexToRGBA(highlightColor, 0.8)
|
|
87
|
+
borderColor: hexToRGBA(highlightColor, 0.8),
|
|
88
|
+
boxShadow: getBoxShadow(hexToRGBA(highlightColor, 0.5))
|
|
88
89
|
},
|
|
89
90
|
hover: {
|
|
90
91
|
backgroundColor: getContrastColor(0.1, generateOpacityValue(color), backgroundColor),
|
package/dist/es2019/version.json
CHANGED
|
@@ -91,7 +91,8 @@ export var generateTheme = function generateTheme(themeColors) {
|
|
|
91
91
|
borderColor: hexToRGBA(color, 0.5)
|
|
92
92
|
},
|
|
93
93
|
focus: {
|
|
94
|
-
borderColor: hexToRGBA(highlightColor, 0.8)
|
|
94
|
+
borderColor: hexToRGBA(highlightColor, 0.8),
|
|
95
|
+
boxShadow: getBoxShadow(hexToRGBA(highlightColor, 0.5))
|
|
95
96
|
},
|
|
96
97
|
hover: {
|
|
97
98
|
backgroundColor: getContrastColor(0.1, generateOpacityValue(color), backgroundColor),
|
package/dist/esm/version.json
CHANGED
|
@@ -55,17 +55,17 @@ export interface AtlassianNavigationProps {
|
|
|
55
55
|
*/
|
|
56
56
|
theme?: NavigationTheme;
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
A `testId` prop is provided for specified elements,
|
|
59
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
60
|
+
serving as a hook for automated tests.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Will set these elements when defined:
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
- Header element - `{testId}-header`
|
|
65
|
+
- Primary actions container - `{testId}-primary-actions`
|
|
66
|
+
- Secondary actions container - `{testId}-secondary-actions`
|
|
67
|
+
- Overflow menu popup - `{testId}-overflow-menu-popup`
|
|
68
|
+
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
69
69
|
*/
|
|
70
70
|
testId?: string;
|
|
71
71
|
}
|
|
@@ -91,17 +91,17 @@ export interface NavigationSkeletonProps {
|
|
|
91
91
|
*/
|
|
92
92
|
theme?: NavigationTheme;
|
|
93
93
|
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
A `testId` prop is provided for specified elements,
|
|
95
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
96
|
+
serving as a hook for automated tests.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
Will set these elements when defined:
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
- Header element - `{testId}-header`
|
|
101
|
+
- Primary actions container - `{testId}-primary-actions`
|
|
102
|
+
- Secondary actions container - `{testId}-secondary-actions`
|
|
103
|
+
- Overflow menu popup - `{testId}-overflow-menu-popup`
|
|
104
|
+
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
105
105
|
*/
|
|
106
106
|
testId?: string;
|
|
107
107
|
}
|
|
@@ -59,20 +59,20 @@ export interface BaseIconButtonProps {
|
|
|
59
59
|
*/
|
|
60
60
|
target?: string;
|
|
61
61
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
Allows for overriding the component used to render the button.
|
|
63
|
+
|
|
64
|
+
This is primarily intended for compatibility with custom
|
|
65
|
+
routing libraries when using the `href` prop.
|
|
66
|
+
|
|
67
|
+
For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
|
|
68
|
+
|
|
69
|
+
@example
|
|
70
|
+
```tsx
|
|
71
|
+
<Settings
|
|
72
|
+
component={CustomRouterLink}
|
|
73
|
+
href="/path/to/url"
|
|
74
|
+
/>
|
|
75
|
+
```
|
|
76
76
|
*/
|
|
77
77
|
component?: CustomThemeButtonProps['component'];
|
|
78
78
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const PrimaryButton: import("react").ForwardRefExoticComponent<Omit<import("@atlaskit/button/custom-theme-button").CustomThemeButtonProps, "appearance" | "onClick"> & {
|
|
3
|
+
component?: import("react").ComponentType<import("react").AllHTMLAttributes<HTMLElement>> | import("react").ElementType<any> | undefined;
|
|
3
4
|
isHighlighted?: boolean | undefined;
|
|
4
5
|
testId?: string | undefined;
|
|
5
6
|
tooltip?: import("react").ReactNode;
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { AllHTMLAttributes, ComponentType, ElementType } from 'react';
|
|
2
2
|
import { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
3
3
|
export declare type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
|
|
4
|
+
/**
|
|
5
|
+
Allows for overriding the component used to render the button.
|
|
6
|
+
|
|
7
|
+
This is primarily intended for compatibility with custom
|
|
8
|
+
routing libraries when using the `href` prop.
|
|
9
|
+
|
|
10
|
+
For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
|
|
11
|
+
|
|
12
|
+
@example
|
|
13
|
+
```tsx
|
|
14
|
+
<Settings
|
|
15
|
+
component={CustomRouterLink}
|
|
16
|
+
href="/path/to/url"
|
|
17
|
+
/>
|
|
18
|
+
```
|
|
19
|
+
*/
|
|
20
|
+
component?: ComponentType<AllHTMLAttributes<HTMLElement>> | ElementType<any>;
|
|
4
21
|
/**
|
|
5
22
|
* Will set the appearance of the button to look highlighted.
|
|
6
23
|
*/
|
|
@@ -12,7 +12,7 @@ export interface ProductHomeProps {
|
|
|
12
12
|
*/
|
|
13
13
|
logo: ComponentType<Partial<LogoProps>>;
|
|
14
14
|
/**
|
|
15
|
-
* Maximum width in pixel, that logo can
|
|
15
|
+
* Maximum width in pixel, that logo can acquire. Defaults to 260px.
|
|
16
16
|
*/
|
|
17
17
|
logoMaxWidth?: number;
|
|
18
18
|
/**
|
|
@@ -33,16 +33,16 @@ export interface ProductHomeProps {
|
|
|
33
33
|
*/
|
|
34
34
|
siteTitle?: string;
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
A `testId` prop is provided for specified elements,
|
|
37
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
38
|
+
serving as a hook for automated tests.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Will set these elements when defined:
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
- Root element of the component - `{testId}-container`
|
|
43
|
+
- Product logo shown at large screen sizes - `{testId}-logo`
|
|
44
|
+
- Product icon shown at small screen sizes - `{testId}-icon`
|
|
45
|
+
- Site title - `{testId}-site-title`
|
|
46
46
|
*/
|
|
47
47
|
testId?: string;
|
|
48
48
|
}
|
|
@@ -64,7 +64,7 @@ export interface CustomProductHomeProps {
|
|
|
64
64
|
*/
|
|
65
65
|
logoUrl: string;
|
|
66
66
|
/**
|
|
67
|
-
* Maximum width
|
|
67
|
+
* Maximum width of the logo, in pixels. Defaults to 260px.
|
|
68
68
|
*/
|
|
69
69
|
logoMaxWidth?: number;
|
|
70
70
|
/**
|
|
@@ -85,16 +85,16 @@ export interface CustomProductHomeProps {
|
|
|
85
85
|
*/
|
|
86
86
|
siteTitle?: string;
|
|
87
87
|
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
A `testId` prop is provided for specified elements,
|
|
89
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
90
|
+
serving as a hook for automated tests.
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Will set these elements when defined:
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
- Root element of the component - `{testId}-container`
|
|
95
|
+
- Product logo shown at large screen sizes - `{testId}-logo`
|
|
96
|
+
- Product icon shown at small screen sizes - `{testId}-icon`
|
|
97
|
+
- Site title - `{testId}-site-title`
|
|
98
98
|
*/
|
|
99
99
|
testId?: string;
|
|
100
100
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare type SkeletonCreateButtonProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Text to be displayed inside the skeleton create button.
|
|
4
|
+
*/
|
|
2
5
|
text: string;
|
|
6
|
+
/**
|
|
7
|
+
* A `testId` prop is provided for specified elements,
|
|
8
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
9
|
+
* serving as a hook for automated tests.
|
|
10
|
+
*/
|
|
3
11
|
testId?: string;
|
|
4
12
|
};
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare type SkeletonIconButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Content to be placed inside the skeleton.
|
|
5
|
+
*/
|
|
3
6
|
children: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* A `testId` prop is provided for specified elements,
|
|
9
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
+
* serving as a hook for automated tests.
|
|
11
|
+
*/
|
|
4
12
|
testId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
15
|
+
* reader. Differentiates from other navigation buttons on a page.
|
|
16
|
+
*/
|
|
5
17
|
label?: string;
|
|
6
18
|
};
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare type SkeletonPrimaryButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Text content to be displayed inside the skeleton button.
|
|
5
|
+
*/
|
|
3
6
|
text?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Children to be displayed inside the skeleton button.
|
|
9
|
+
* Renders if `text` prop not set
|
|
10
|
+
*/
|
|
4
11
|
children?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the appearance of the skeleton button to look like a dropdown button
|
|
14
|
+
*/
|
|
5
15
|
isDropdownButton?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the appearance of the skeleton button to look highlighted.
|
|
18
|
+
*/
|
|
6
19
|
isHighlighted?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
22
|
+
* serving as a hook for automated tests.
|
|
23
|
+
*/
|
|
7
24
|
testId?: string;
|
|
8
25
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare
|
|
2
|
+
export declare type SkeletonHelpButtonProps = {
|
|
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
|
+
*/
|
|
3
7
|
label: string;
|
|
4
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) => JSX.Element;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare
|
|
2
|
+
export declare type SkeletonNotificationButtonProps = {
|
|
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
|
+
*/
|
|
3
7
|
label: string;
|
|
4
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => JSX.Element;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare
|
|
2
|
+
export declare 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
|
+
*/
|
|
3
7
|
label: string;
|
|
4
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => JSX.Element;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare
|
|
2
|
+
export declare 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
|
+
*/
|
|
3
7
|
label: string;
|
|
4
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const SkeletonSwitcherButton: ({ label, }: SkeletonSwitcherButtonProps) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/logo": "*",
|
|
30
30
|
"@atlaskit/popup": "^1.3.0",
|
|
31
31
|
"@atlaskit/theme": "^12.1.0",
|
|
32
|
-
"@atlaskit/tokens": "^0.
|
|
32
|
+
"@atlaskit/tokens": "^0.10.0",
|
|
33
33
|
"@atlaskit/tooltip": "^17.5.0",
|
|
34
34
|
"@atlaskit/width-detector": "^4.0.0",
|
|
35
35
|
"@babel/runtime": "^7.0.0",
|