@atlaskit/atlassian-navigation 2.2.0 → 2.2.3
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 +20 -0
- package/dist/cjs/components/ProductHome/custom-product-home.js +8 -14
- package/dist/cjs/components/ProductHome/product-home.js +2 -3
- package/dist/cjs/theme/defaultTheme.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ProductHome/custom-product-home.js +2 -12
- package/dist/es2019/components/ProductHome/product-home.js +3 -7
- package/dist/es2019/theme/defaultTheme.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ProductHome/custom-product-home.js +8 -14
- package/dist/esm/components/ProductHome/product-home.js +2 -3
- package/dist/esm/theme/defaultTheme.js +3 -3
- 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 +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5b7962fbceb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5b7962fbceb) - Fix visual bug with selected state of navigation iconButtons
|
|
8
|
+
- [`dd991482e67`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dd991482e67) - [ux] Fixed a regression causing the `logoMaxWidth` prop to have no effect. VR tests may need regenerating, but in most cases will not.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 2.2.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`d28c3b5078e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d28c3b5078e) - Updated type documentation
|
|
16
|
+
|
|
17
|
+
## 2.2.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 2.2.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -27,7 +27,6 @@ var _excluded = ["iconAlt", "iconUrl", "logoAlt", "logoUrl", "href", "onClick",
|
|
|
27
27
|
|
|
28
28
|
var _css3;
|
|
29
29
|
|
|
30
|
-
var VAR_LOGO_MAX_WIDTH = '--logo-max-width';
|
|
31
30
|
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
32
31
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
33
32
|
var VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
@@ -40,12 +39,7 @@ var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
|
40
39
|
var productLogoStyles = (0, _core.css)((0, _defineProperty2.default)({
|
|
41
40
|
// Ensure anything passed into
|
|
42
41
|
// productHome is aligned correctly
|
|
43
|
-
display: 'flex'
|
|
44
|
-
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
45
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
46
|
-
'& > *': {
|
|
47
|
-
maxHeight: 24
|
|
48
|
-
}
|
|
42
|
+
display: 'flex'
|
|
49
43
|
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
50
44
|
display: 'none'
|
|
51
45
|
}));
|
|
@@ -55,11 +49,7 @@ var customMaxHeightStyles = (0, _core.css)({
|
|
|
55
49
|
var productIconStyles = (0, _core.css)((0, _defineProperty2.default)({
|
|
56
50
|
// Ensure anything passed into
|
|
57
51
|
// productHome is aligned correctly
|
|
58
|
-
display: 'flex'
|
|
59
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
60
|
-
'& > *': {
|
|
61
|
-
maxHeight: 24
|
|
62
|
-
}
|
|
52
|
+
display: 'flex'
|
|
63
53
|
}, "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
64
54
|
display: 'none'
|
|
65
55
|
}));
|
|
@@ -144,13 +134,17 @@ var CustomProductHome = function CustomProductHome(props) {
|
|
|
144
134
|
onMouseDown: preventFocusRing,
|
|
145
135
|
"data-testid": testId && "".concat(testId, "-container")
|
|
146
136
|
}, rest), logoUrl && (0, _core.jsx)("img", {
|
|
147
|
-
style:
|
|
137
|
+
style: {
|
|
138
|
+
maxWidth: logoMaxWidth
|
|
139
|
+
},
|
|
148
140
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
149
141
|
src: logoUrl,
|
|
150
142
|
alt: logoAlt,
|
|
151
143
|
"data-testid": testId && "".concat(testId, "-logo")
|
|
152
144
|
}), iconUrl && (0, _core.jsx)("img", {
|
|
153
|
-
style:
|
|
145
|
+
style: {
|
|
146
|
+
maxWidth: logoMaxWidth
|
|
147
|
+
},
|
|
154
148
|
css: [customMaxHeightStyles, productIconStyles],
|
|
155
149
|
src: iconUrl,
|
|
156
150
|
alt: iconAlt,
|
|
@@ -84,6 +84,7 @@ var productLogoStyles = (0, _core.css)((0, _defineProperty2.default)({
|
|
|
84
84
|
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
85
85
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
86
86
|
'& > *': {
|
|
87
|
+
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
87
88
|
maxHeight: 24
|
|
88
89
|
}
|
|
89
90
|
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
@@ -142,7 +143,7 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
142
143
|
onMouseDown && onMouseDown(e);
|
|
143
144
|
};
|
|
144
145
|
|
|
145
|
-
var productHomeButtonDynamicStyles = (_productHomeButtonDyn = {}, (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), _productHomeButtonDyn);
|
|
146
|
+
var productHomeButtonDynamicStyles = (_productHomeButtonDyn = {}, (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_LOGO_MAX_WIDTH, "".concat(logoMaxWidth, "px")), _productHomeButtonDyn);
|
|
146
147
|
return (0, _core.jsx)(_react.Fragment, null, (0, _core.jsx)(Tag, (0, _extends2.default)({
|
|
147
148
|
style: productHomeButtonDynamicStyles,
|
|
148
149
|
css: productHomeButtonStyles,
|
|
@@ -151,7 +152,6 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
151
152
|
onMouseDown: preventFocusRing,
|
|
152
153
|
"data-testid": testId && "".concat(testId, "-container")
|
|
153
154
|
}, rest), (0, _core.jsx)("div", {
|
|
154
|
-
style: (0, _defineProperty2.default)({}, VAR_LOGO_MAX_WIDTH, logoMaxWidth),
|
|
155
155
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
156
156
|
"data-testid": testId && "".concat(testId, "-logo")
|
|
157
157
|
}, (0, _core.jsx)(Logo, {
|
|
@@ -160,7 +160,6 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
160
160
|
iconColor: iconColor,
|
|
161
161
|
textColor: textColor
|
|
162
162
|
})), (0, _core.jsx)("div", {
|
|
163
|
-
style: (0, _defineProperty2.default)({}, VAR_LOGO_MAX_WIDTH, logoMaxWidth),
|
|
164
163
|
css: [customMaxHeightStyles, productIconStyles],
|
|
165
164
|
"data-testid": testId && "".concat(testId, "-icon")
|
|
166
165
|
}, (0, _core.jsx)(Icon, {
|
|
@@ -60,8 +60,8 @@ var defaultTheme = {
|
|
|
60
60
|
boxShadow: ''
|
|
61
61
|
},
|
|
62
62
|
selected: {
|
|
63
|
-
color: "var(--ds-text-selected)",
|
|
64
|
-
backgroundColor: "var(--ds-background-selected)",
|
|
63
|
+
color: "var(--ds-text-selected, ".concat(_colors.B400, ")"),
|
|
64
|
+
backgroundColor: "var(--ds-background-selected, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.6), ")"),
|
|
65
65
|
boxShadow: ''
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -104,7 +104,7 @@ var defaultTheme = {
|
|
|
104
104
|
},
|
|
105
105
|
selected: {
|
|
106
106
|
color: "var(--ds-text-selected, ".concat(_colors.B400, ")"),
|
|
107
|
-
backgroundColor: "var(--ds-background-selected)",
|
|
107
|
+
backgroundColor: "var(--ds-background-selected, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.7), ")"),
|
|
108
108
|
boxShadow: '',
|
|
109
109
|
borderColor: "var(--ds-border-selected, ".concat(_colors.B400, ")"),
|
|
110
110
|
bordorBottom: "4px solid ".concat("var(--ds-border-selected, ".concat(_colors.B400, ")"))
|
package/dist/cjs/version.json
CHANGED
|
@@ -6,7 +6,6 @@ import { css, jsx } from '@emotion/core';
|
|
|
6
6
|
import { gridSize, PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
7
7
|
import { useTheme } from '../../theme';
|
|
8
8
|
import { getTag } from './utils';
|
|
9
|
-
const VAR_LOGO_MAX_WIDTH = '--logo-max-width';
|
|
10
9
|
const VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
11
10
|
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
12
11
|
const VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
@@ -20,11 +19,6 @@ const productLogoStyles = css({
|
|
|
20
19
|
// Ensure anything passed into
|
|
21
20
|
// productHome is aligned correctly
|
|
22
21
|
display: 'flex',
|
|
23
|
-
maxWidth: `var(${VAR_LOGO_MAX_WIDTH})`,
|
|
24
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
25
|
-
'& > *': {
|
|
26
|
-
maxHeight: 24
|
|
27
|
-
},
|
|
28
22
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
29
23
|
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
30
24
|
display: 'none'
|
|
@@ -38,10 +32,6 @@ const productIconStyles = css({
|
|
|
38
32
|
// productHome is aligned correctly
|
|
39
33
|
display: 'flex',
|
|
40
34
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
41
|
-
'& > *': {
|
|
42
|
-
maxHeight: 24
|
|
43
|
-
},
|
|
44
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
45
35
|
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
46
36
|
display: 'none'
|
|
47
37
|
}
|
|
@@ -141,7 +131,7 @@ const CustomProductHome = props => {
|
|
|
141
131
|
"data-testid": testId && `${testId}-container`
|
|
142
132
|
}, rest), logoUrl && jsx("img", {
|
|
143
133
|
style: {
|
|
144
|
-
|
|
134
|
+
maxWidth: logoMaxWidth
|
|
145
135
|
},
|
|
146
136
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
147
137
|
src: logoUrl,
|
|
@@ -149,7 +139,7 @@ const CustomProductHome = props => {
|
|
|
149
139
|
"data-testid": testId && `${testId}-logo`
|
|
150
140
|
}), iconUrl && jsx("img", {
|
|
151
141
|
style: {
|
|
152
|
-
|
|
142
|
+
maxWidth: logoMaxWidth
|
|
153
143
|
},
|
|
154
144
|
css: [customMaxHeightStyles, productIconStyles],
|
|
155
145
|
src: iconUrl,
|
|
@@ -67,6 +67,7 @@ const productLogoStyles = css({
|
|
|
67
67
|
maxWidth: `var(${VAR_LOGO_MAX_WIDTH})`,
|
|
68
68
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
69
69
|
'& > *': {
|
|
70
|
+
maxWidth: `var(${VAR_LOGO_MAX_WIDTH})`,
|
|
70
71
|
maxHeight: 24
|
|
71
72
|
},
|
|
72
73
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
@@ -133,7 +134,8 @@ const ProductHome = ({
|
|
|
133
134
|
[VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS]: primaryButton.focus.boxShadow,
|
|
134
135
|
[VAR_PRODUCT_HOME_COLOR_HOVER]: primaryButton.hover.color,
|
|
135
136
|
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER]: primaryButton.hover.backgroundColor,
|
|
136
|
-
[VAR_PRODUCT_HOME_BOX_SHADOW_HOVER]: primaryButton.hover.boxShadow
|
|
137
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_HOVER]: primaryButton.hover.boxShadow,
|
|
138
|
+
[VAR_LOGO_MAX_WIDTH]: `${logoMaxWidth}px`
|
|
137
139
|
};
|
|
138
140
|
return jsx(Fragment, null, jsx(Tag, _extends({
|
|
139
141
|
style: productHomeButtonDynamicStyles,
|
|
@@ -143,9 +145,6 @@ const ProductHome = ({
|
|
|
143
145
|
onMouseDown: preventFocusRing,
|
|
144
146
|
"data-testid": testId && `${testId}-container`
|
|
145
147
|
}, rest), jsx("div", {
|
|
146
|
-
style: {
|
|
147
|
-
[VAR_LOGO_MAX_WIDTH]: logoMaxWidth
|
|
148
|
-
},
|
|
149
148
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
150
149
|
"data-testid": testId && `${testId}-logo`
|
|
151
150
|
}, jsx(Logo, {
|
|
@@ -154,9 +153,6 @@ const ProductHome = ({
|
|
|
154
153
|
iconColor: iconColor,
|
|
155
154
|
textColor: textColor
|
|
156
155
|
})), jsx("div", {
|
|
157
|
-
style: {
|
|
158
|
-
[VAR_LOGO_MAX_WIDTH]: logoMaxWidth
|
|
159
|
-
},
|
|
160
156
|
css: [customMaxHeightStyles, productIconStyles],
|
|
161
157
|
"data-testid": testId && `${testId}-icon`
|
|
162
158
|
}, jsx(Icon, {
|
|
@@ -51,8 +51,8 @@ const defaultTheme = {
|
|
|
51
51
|
boxShadow: ''
|
|
52
52
|
},
|
|
53
53
|
selected: {
|
|
54
|
-
color:
|
|
55
|
-
backgroundColor:
|
|
54
|
+
color: `var(--ds-text-selected, ${B400})`,
|
|
55
|
+
backgroundColor: `var(--ds-background-selected, ${hexToRGBA(B50, 0.6)})`,
|
|
56
56
|
boxShadow: ''
|
|
57
57
|
}
|
|
58
58
|
},
|
|
@@ -95,7 +95,7 @@ const defaultTheme = {
|
|
|
95
95
|
},
|
|
96
96
|
selected: {
|
|
97
97
|
color: `var(--ds-text-selected, ${B400})`,
|
|
98
|
-
backgroundColor:
|
|
98
|
+
backgroundColor: `var(--ds-background-selected, ${hexToRGBA(B50, 0.7)})`,
|
|
99
99
|
boxShadow: '',
|
|
100
100
|
borderColor: `var(--ds-border-selected, ${B400})`,
|
|
101
101
|
bordorBottom: `4px solid ${`var(--ds-border-selected, ${B400})`}`
|
package/dist/es2019/version.json
CHANGED
|
@@ -11,7 +11,6 @@ import { css, jsx } from '@emotion/core';
|
|
|
11
11
|
import { gridSize, PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
12
12
|
import { useTheme } from '../../theme';
|
|
13
13
|
import { getTag } from './utils';
|
|
14
|
-
var VAR_LOGO_MAX_WIDTH = '--logo-max-width';
|
|
15
14
|
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
16
15
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
17
16
|
var VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
@@ -24,12 +23,7 @@ var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
|
24
23
|
var productLogoStyles = css(_defineProperty({
|
|
25
24
|
// Ensure anything passed into
|
|
26
25
|
// productHome is aligned correctly
|
|
27
|
-
display: 'flex'
|
|
28
|
-
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
29
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
30
|
-
'& > *': {
|
|
31
|
-
maxHeight: 24
|
|
32
|
-
}
|
|
26
|
+
display: 'flex'
|
|
33
27
|
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
34
28
|
display: 'none'
|
|
35
29
|
}));
|
|
@@ -39,11 +33,7 @@ var customMaxHeightStyles = css({
|
|
|
39
33
|
var productIconStyles = css(_defineProperty({
|
|
40
34
|
// Ensure anything passed into
|
|
41
35
|
// productHome is aligned correctly
|
|
42
|
-
display: 'flex'
|
|
43
|
-
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
44
|
-
'& > *': {
|
|
45
|
-
maxHeight: 24
|
|
46
|
-
}
|
|
36
|
+
display: 'flex'
|
|
47
37
|
}, "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
48
38
|
display: 'none'
|
|
49
39
|
}));
|
|
@@ -129,13 +119,17 @@ var CustomProductHome = function CustomProductHome(props) {
|
|
|
129
119
|
onMouseDown: preventFocusRing,
|
|
130
120
|
"data-testid": testId && "".concat(testId, "-container")
|
|
131
121
|
}, rest), logoUrl && jsx("img", {
|
|
132
|
-
style:
|
|
122
|
+
style: {
|
|
123
|
+
maxWidth: logoMaxWidth
|
|
124
|
+
},
|
|
133
125
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
134
126
|
src: logoUrl,
|
|
135
127
|
alt: logoAlt,
|
|
136
128
|
"data-testid": testId && "".concat(testId, "-logo")
|
|
137
129
|
}), iconUrl && jsx("img", {
|
|
138
|
-
style:
|
|
130
|
+
style: {
|
|
131
|
+
maxWidth: logoMaxWidth
|
|
132
|
+
},
|
|
139
133
|
css: [customMaxHeightStyles, productIconStyles],
|
|
140
134
|
src: iconUrl,
|
|
141
135
|
alt: iconAlt,
|
|
@@ -68,6 +68,7 @@ var productLogoStyles = css(_defineProperty({
|
|
|
68
68
|
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
69
69
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
70
70
|
'& > *': {
|
|
71
|
+
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
71
72
|
maxHeight: 24
|
|
72
73
|
}
|
|
73
74
|
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
@@ -127,7 +128,7 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
127
128
|
onMouseDown && onMouseDown(e);
|
|
128
129
|
};
|
|
129
130
|
|
|
130
|
-
var productHomeButtonDynamicStyles = (_productHomeButtonDyn = {}, _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), _productHomeButtonDyn);
|
|
131
|
+
var productHomeButtonDynamicStyles = (_productHomeButtonDyn = {}, _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), _defineProperty(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), _defineProperty(_productHomeButtonDyn, VAR_LOGO_MAX_WIDTH, "".concat(logoMaxWidth, "px")), _productHomeButtonDyn);
|
|
131
132
|
return jsx(Fragment, null, jsx(Tag, _extends({
|
|
132
133
|
style: productHomeButtonDynamicStyles,
|
|
133
134
|
css: productHomeButtonStyles,
|
|
@@ -136,7 +137,6 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
136
137
|
onMouseDown: preventFocusRing,
|
|
137
138
|
"data-testid": testId && "".concat(testId, "-container")
|
|
138
139
|
}, rest), jsx("div", {
|
|
139
|
-
style: _defineProperty({}, VAR_LOGO_MAX_WIDTH, logoMaxWidth),
|
|
140
140
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
141
141
|
"data-testid": testId && "".concat(testId, "-logo")
|
|
142
142
|
}, jsx(Logo, {
|
|
@@ -145,7 +145,6 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
145
145
|
iconColor: iconColor,
|
|
146
146
|
textColor: textColor
|
|
147
147
|
})), jsx("div", {
|
|
148
|
-
style: _defineProperty({}, VAR_LOGO_MAX_WIDTH, logoMaxWidth),
|
|
149
148
|
css: [customMaxHeightStyles, productIconStyles],
|
|
150
149
|
"data-testid": testId && "".concat(testId, "-icon")
|
|
151
150
|
}, jsx(Icon, {
|
|
@@ -51,8 +51,8 @@ var defaultTheme = {
|
|
|
51
51
|
boxShadow: ''
|
|
52
52
|
},
|
|
53
53
|
selected: {
|
|
54
|
-
color: "var(--ds-text-selected)",
|
|
55
|
-
backgroundColor: "var(--ds-background-selected)",
|
|
54
|
+
color: "var(--ds-text-selected, ".concat(B400, ")"),
|
|
55
|
+
backgroundColor: "var(--ds-background-selected, ".concat(hexToRGBA(B50, 0.6), ")"),
|
|
56
56
|
boxShadow: ''
|
|
57
57
|
}
|
|
58
58
|
},
|
|
@@ -95,7 +95,7 @@ var defaultTheme = {
|
|
|
95
95
|
},
|
|
96
96
|
selected: {
|
|
97
97
|
color: "var(--ds-text-selected, ".concat(B400, ")"),
|
|
98
|
-
backgroundColor: "var(--ds-background-selected)",
|
|
98
|
+
backgroundColor: "var(--ds-background-selected, ".concat(hexToRGBA(B50, 0.7), ")"),
|
|
99
99
|
boxShadow: '',
|
|
100
100
|
borderColor: "var(--ds-border-selected, ".concat(B400, ")"),
|
|
101
101
|
bordorBottom: "4px solid ".concat("var(--ds-border-selected, ".concat(B400, ")"))
|
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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -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",
|