@atlaskit/atlassian-navigation 1.2.0 → 2.0.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 +84 -0
- package/dist/cjs/common/constants.js +1 -1
- package/dist/cjs/components/AtlassianNavigation/styles.js +2 -4
- package/dist/cjs/components/IconButton/styles.js +1 -1
- package/dist/cjs/components/PrimaryButton/styles.js +1 -1
- package/dist/cjs/components/PrimaryItemsContainer/index.js +6 -11
- package/dist/cjs/components/PrimaryItemsContainer/styles.js +1 -10
- package/dist/cjs/components/ProductHome/index.js +4 -4
- package/dist/cjs/components/ProductHome/styles.js +1 -1
- package/dist/cjs/components/Search/styles.js +1 -1
- package/dist/cjs/controllers/overflow/index.js +1 -1
- package/dist/cjs/index.js +26 -26
- package/dist/cjs/theme/defaultTheme.js +42 -44
- package/dist/cjs/theme/index.js +8 -8
- package/dist/cjs/theme/themeGenerator.js +1 -1
- package/dist/cjs/theme/themeHelpers.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AtlassianNavigation/styles.js +2 -3
- package/dist/es2019/components/PrimaryItemsContainer/index.js +6 -11
- package/dist/es2019/components/PrimaryItemsContainer/styles.js +0 -9
- package/dist/es2019/theme/defaultTheme.js +42 -43
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AtlassianNavigation/styles.js +2 -3
- package/dist/esm/components/PrimaryItemsContainer/index.js +6 -11
- package/dist/esm/components/PrimaryItemsContainer/styles.js +0 -9
- package/dist/esm/theme/defaultTheme.js +42 -43
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AtlassianNavigation/index.d.ts +1 -0
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +1 -0
- package/dist/types/components/BadgeContainer/index.d.ts +1 -0
- package/dist/types/components/Create/index.d.ts +1 -0
- package/dist/types/components/Create/skeleton.d.ts +1 -0
- package/dist/types/components/IconButton/skeleton.d.ts +1 -0
- package/dist/types/components/PrimaryButton/skeleton.d.ts +1 -0
- package/dist/types/components/PrimaryItemsContainer/index.d.ts +1 -0
- package/dist/types/components/PrimaryItemsContainer/skeleton.d.ts +1 -0
- package/dist/types/components/ProductHome/custom-product-home.d.ts +1 -0
- package/dist/types/components/ProductHome/product-home.d.ts +1 -0
- package/dist/types/components/ProductHome/skeleton.d.ts +1 -0
- package/dist/types/components/Profile/skeleton.d.ts +1 -0
- package/dist/types/components/Search/index.d.ts +1 -0
- package/dist/types/components/Search/skeleton.d.ts +1 -0
- package/dist/types/components/SignIn/index.d.ts +1 -0
- package/dist/types/components/SignIn/skeleton.d.ts +1 -0
- package/dist/types/components/SkeletonCreateButton/index.d.ts +1 -0
- package/dist/types/components/SkeletonIconButton/index.d.ts +1 -0
- package/dist/types/components/SkeletonPrimaryButton/index.d.ts +1 -0
- package/dist/types/skeleton-help-button.d.ts +1 -0
- package/dist/types/skeleton-notification-button.d.ts +1 -0
- package/dist/types/skeleton-settings-button.d.ts +1 -0
- package/dist/types/skeleton-switcher-button.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`47f58da5946`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47f58da5946) - ED-13322, ED-13324, ED-13326, ED-13323, ED-13204: Upgrade and support react-intl@^5.18.1 including breaking API changes, types and tests in atlassian-frontend packages
|
|
8
|
+
|
|
9
|
+
What changed: Upgraded our react-intl support from ^2.6.0 to ^5.18.1. This means editor packages now rely on consumers installing ^5.18.1, otherwise editor usage of react-intl will mismatch with actual installed react-intl APIs.
|
|
10
|
+
Why change was made: As part of a coordinated upgrade effort across AF packages, as react-intl v2 is quite dated.
|
|
11
|
+
How consumer should update their code: Ensure react-intl ^5.18.1 is installed in consuming applications.
|
|
12
|
+
|
|
13
|
+
Upgrade guide: To consume atlassian-frontend packages that use react-intl5 setup a second provider for the new version, using an npm alias
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
"react-intl": "^2.6.0",
|
|
17
|
+
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import { IntlProvider } from 'react-intl';
|
|
22
|
+
import { IntlProvider as IntlNextProvider } from 'react-intl-next';
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<IntlProvider
|
|
26
|
+
key={locale}
|
|
27
|
+
data-test-language={locale}
|
|
28
|
+
locale={locale}
|
|
29
|
+
defaultLocale={DEFAULT_LOCALE}
|
|
30
|
+
messages={messages}
|
|
31
|
+
>
|
|
32
|
+
<IntlNextProvider
|
|
33
|
+
key={locale}
|
|
34
|
+
data-test-language={locale}
|
|
35
|
+
locale={locale}
|
|
36
|
+
defaultLocale={DEFAULT_LOCALE}
|
|
37
|
+
messages={messages}
|
|
38
|
+
>
|
|
39
|
+
{children}
|
|
40
|
+
</IntlNextProvider>
|
|
41
|
+
</IntlProvider>
|
|
42
|
+
);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## 1.3.0
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- [`9d4ca6e23da`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d4ca6e23da) - [ux] New create-dropdown-menu package for Create dropdown button
|
|
50
|
+
|
|
51
|
+
## 1.2.2
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [`a2f953f3814`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a2f953f3814) - Previously the `ensure-design-token-usage` eslint rule contained all checks relating to token use. This has now been split up into two separate rules:
|
|
56
|
+
|
|
57
|
+
`ensure-design-token-usage` now covers:
|
|
58
|
+
|
|
59
|
+
- `legacyElevation` — warns about old usages of the elevation mixins or styles, which instead should use the `card` or `overlay` tokens.
|
|
60
|
+
- `hardCodedColor` — warns about use of hard-coded colors such as `color: colors.B100`, which instead should be wrapped in a `token()` call. This covers the majority of cases in existing codebases when first adopting tokens.
|
|
61
|
+
|
|
62
|
+
`no-unsafe-design-token-usage` (new) covers the remaining rules:
|
|
63
|
+
|
|
64
|
+
- `directTokenUsage` — warns against using the CSS Custom Property name that is output in the browser by the `token()` call.
|
|
65
|
+
Eg. directly using `var(--ds-accent-subtleBlue)` is bad.
|
|
66
|
+
- `staticToken` — warns when tokens aren't used inline. Inlining the token usages helps with static analysis, which unlocks future improvements.
|
|
67
|
+
Eg. pulling the token out into a const like `css={ color: token(primaryButtonText) }` is bad.
|
|
68
|
+
- `invalidToken` — warns when using a token that doesn't exist (not one that's been renamed, see the next point).
|
|
69
|
+
- `tokenRenamed` — warns when using a token that's been renamed in a subsequent release.
|
|
70
|
+
- `tokenFallbackEnforced` — warns if a fallback for the token call is not provided.
|
|
71
|
+
Eg. call with the fallback like this `token('color.background.disabled', N10)` instead of `token('color.background.disabled')`.
|
|
72
|
+
- `tokenFallbackRestricted` — the opposite of `tokenFallbackEnforced`.
|
|
73
|
+
Eg. do not pass in a fallback like this `token('color.background.disabled', N10)` and instead only include the token `token('color.background.disabled')`.
|
|
74
|
+
|
|
75
|
+
Upgrading — some instances of `\\eslint-disable` may need to be changed to the new rule. If you have failing lint rules after only bumping this package then switch those ignores to use `no-unsafe-design-token-usage` instead.
|
|
76
|
+
|
|
77
|
+
- [`22fb31312eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/22fb31312eb) - Fixes unmounted component state update warnings for AtlassianNavigation
|
|
78
|
+
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
79
|
+
- Updated dependencies
|
|
80
|
+
|
|
81
|
+
## 1.2.1
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- [`bb54a699e54`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bb54a699e54) - [ux] Fixes a bug where a previously removed gradient positioned ::after primary actions was still rendered. Also fixes a bug where this gradient rendered incorrectly on Safari.
|
|
86
|
+
|
|
3
87
|
## 1.2.0
|
|
4
88
|
|
|
5
89
|
### Minor Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PRODUCT_HOME_BREAKPOINT = exports.HORIZONTAL_GLOBAL_NAV_HEIGHT = exports.CREATE_BREAKPOINT = void 0;
|
|
7
7
|
var HORIZONTAL_GLOBAL_NAV_HEIGHT = 56;
|
|
8
8
|
exports.HORIZONTAL_GLOBAL_NAV_HEIGHT = HORIZONTAL_GLOBAL_NAV_HEIGHT;
|
|
9
9
|
var PRODUCT_HOME_BREAKPOINT = 1280;
|
|
@@ -13,8 +13,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
13
13
|
|
|
14
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _constants2 = require("../../common/constants");
|
|
19
17
|
|
|
20
18
|
var _theme = require("../../theme");
|
|
@@ -38,8 +36,8 @@ var containerCSS = function containerCSS(_ref) {
|
|
|
38
36
|
height: _constants2.HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
39
37
|
position: 'relative',
|
|
40
38
|
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
42
|
-
borderBottom: "1px solid ".concat((
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
40
|
+
borderBottom: "1px solid ".concat("var(--ds-border-neutral, #091E4224)"),
|
|
43
41
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
44
42
|
'&::after': {
|
|
45
43
|
content: 'none'
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.padding = exports.margin = exports.iconButtonSkeletonCSS = exports.getIconButtonTheme = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.primaryButtonSkeletonCSS = exports.padding = exports.margin = exports.isHighlightedCSS = exports.getPrimaryButtonTheme = exports.buttonHeight = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -59,16 +59,6 @@ var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
|
59
59
|
testId: testId ? "".concat(testId, "-overflow-menu-trigger") : 'overflow-menu-trigger'
|
|
60
60
|
}, triggerProps), moreLabel);
|
|
61
61
|
}, [moreLabel, onMoreClick, isMoreOpen, testId]);
|
|
62
|
-
|
|
63
|
-
var WidthObserverRelativeWrapper = function WidthObserverRelativeWrapper() {
|
|
64
|
-
return (0, _core.jsx)("div", {
|
|
65
|
-
style: _styles.widthObserverContainerStyle
|
|
66
|
-
}, (0, _core.jsx)(_widthDetector.WidthObserver, {
|
|
67
|
-
offscreen: true,
|
|
68
|
-
setWidth: updateWidth
|
|
69
|
-
}));
|
|
70
|
-
};
|
|
71
|
-
|
|
72
62
|
var content = (0, _react.useCallback)(function () {
|
|
73
63
|
return (0, _core.jsx)(_overflow.OverflowProvider, {
|
|
74
64
|
isVisible: false,
|
|
@@ -93,7 +83,12 @@ var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
|
93
83
|
onClose: onMoreClose,
|
|
94
84
|
trigger: trigger,
|
|
95
85
|
testId: testId ? "".concat(testId, "-overflow-menu-popup") : 'overflow-menu-popup'
|
|
96
|
-
}), Create && (0, _core.jsx)(Create, null), (0, _core.jsx)(
|
|
86
|
+
}), Create && (0, _core.jsx)(Create, null), (0, _core.jsx)("div", {
|
|
87
|
+
style: _styles.widthObserverContainerStyle
|
|
88
|
+
}, (0, _core.jsx)(_widthDetector.WidthObserver, {
|
|
89
|
+
offscreen: true,
|
|
90
|
+
setWidth: updateWidth
|
|
91
|
+
})));
|
|
97
92
|
};
|
|
98
93
|
|
|
99
94
|
exports.PrimaryItemsContainer = PrimaryItemsContainer;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.widthObserverContainerStyle = exports.primaryButtonSkeletonCSS = exports.containerCSS = void 0;
|
|
7
7
|
|
|
8
8
|
var _constants = require("@atlaskit/theme/constants");
|
|
9
9
|
|
|
@@ -22,15 +22,6 @@ var containerCSS = function containerCSS(_ref) {
|
|
|
22
22
|
'& > *': {
|
|
23
23
|
flexShrink: 0,
|
|
24
24
|
margin: margin
|
|
25
|
-
},
|
|
26
|
-
'&::after': {
|
|
27
|
-
content: '""',
|
|
28
|
-
position: 'absolute',
|
|
29
|
-
top: 0,
|
|
30
|
-
right: 0,
|
|
31
|
-
height: '100%',
|
|
32
|
-
width: "".concat((0, _constants.gridSize)() * 3, "px"),
|
|
33
|
-
background: "linear-gradient(90deg, transparent 0%, ".concat(navigation.backgroundColor, " 100%)")
|
|
34
25
|
}
|
|
35
26
|
};
|
|
36
27
|
};
|
|
@@ -5,16 +5,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "CustomProductHome", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
11
|
-
return
|
|
11
|
+
return _customProductHome.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
14
|
+
Object.defineProperty(exports, "ProductHome", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function get() {
|
|
17
|
-
return
|
|
17
|
+
return _productHome.default;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.siteTitleSkeletonCSS = exports.siteTitleCSS = exports.productLogoSkeletonCSS = exports.productLogoCSS = exports.productIconSkeletonCSS = exports.productIconCSS = exports.productHomeButtonSkeletonCSS = exports.productHomeButtonCSS = exports.customProductLogoCSS = exports.customProductIconCSS = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.searchInputSkeletonCSS = exports.searchInputIconCSS = exports.
|
|
8
|
+
exports.searchInputSkeletonCSS = exports.searchInputIconCSS = exports.searchInputContainerCSS = exports.searchInputCSS = exports.searchIconSkeletonCSS = exports.searchIconCSS = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.useOverflowStatus = exports.useOverflowController = exports.default = exports.OverflowProvider = void 0;
|
|
11
11
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "AppSwitcher", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _AppSwitcher.AppSwitcher;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "AtlassianNavigation", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return
|
|
15
|
+
return _AtlassianNavigation.AtlassianNavigation;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Create", {
|
|
@@ -21,40 +21,46 @@ Object.defineProperty(exports, "Create", {
|
|
|
21
21
|
return _Create.Create;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "CustomProductHome", {
|
|
25
25
|
enumerable: true,
|
|
26
26
|
get: function get() {
|
|
27
|
-
return
|
|
27
|
+
return _ProductHome.CustomProductHome;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "HORIZONTAL_GLOBAL_NAV_HEIGHT", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function get() {
|
|
33
|
-
return
|
|
33
|
+
return _constants.HORIZONTAL_GLOBAL_NAV_HEIGHT;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
Object.defineProperty(exports, "
|
|
36
|
+
Object.defineProperty(exports, "Help", {
|
|
37
37
|
enumerable: true,
|
|
38
38
|
get: function get() {
|
|
39
|
-
return
|
|
39
|
+
return _Help.Help;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
42
|
+
Object.defineProperty(exports, "IconButton", {
|
|
43
43
|
enumerable: true,
|
|
44
44
|
get: function get() {
|
|
45
|
-
return
|
|
45
|
+
return _IconButton.IconButton;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "Notifications", {
|
|
49
49
|
enumerable: true,
|
|
50
50
|
get: function get() {
|
|
51
|
-
return
|
|
51
|
+
return _Notifications.Notifications;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "
|
|
54
|
+
Object.defineProperty(exports, "PrimaryButton", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function get() {
|
|
57
|
-
return
|
|
57
|
+
return _PrimaryButton.PrimaryButton;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "PrimaryDropdownButton", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _PrimaryDropdownButton.PrimaryDropdownButton;
|
|
58
64
|
}
|
|
59
65
|
});
|
|
60
66
|
Object.defineProperty(exports, "ProductHome", {
|
|
@@ -87,16 +93,10 @@ Object.defineProperty(exports, "SignIn", {
|
|
|
87
93
|
return _SignIn.SignIn;
|
|
88
94
|
}
|
|
89
95
|
});
|
|
90
|
-
Object.defineProperty(exports, "
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function get() {
|
|
93
|
-
return _overflow.useOverflowStatus;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "HORIZONTAL_GLOBAL_NAV_HEIGHT", {
|
|
96
|
+
Object.defineProperty(exports, "ThemeProvider", {
|
|
97
97
|
enumerable: true,
|
|
98
98
|
get: function get() {
|
|
99
|
-
return
|
|
99
|
+
return _theme.ThemeProvider;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "atlassianTheme", {
|
|
@@ -111,10 +111,10 @@ Object.defineProperty(exports, "generateTheme", {
|
|
|
111
111
|
return _theme.generateTheme;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
Object.defineProperty(exports, "
|
|
114
|
+
Object.defineProperty(exports, "useOverflowStatus", {
|
|
115
115
|
enumerable: true,
|
|
116
116
|
get: function get() {
|
|
117
|
-
return
|
|
117
|
+
return _overflow.useOverflowStatus;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
|
|
@@ -7,31 +7,29 @@ exports.default = exports.DEFAULT_THEME_NAME = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
|
|
10
|
-
var _tokens = require("@atlaskit/tokens");
|
|
11
|
-
|
|
12
10
|
var _themeHelpers = require("./themeHelpers");
|
|
13
11
|
|
|
14
12
|
var defaultTheme = {
|
|
15
13
|
mode: {
|
|
16
14
|
create: {
|
|
17
15
|
active: {
|
|
18
|
-
color: (
|
|
19
|
-
backgroundColor: (
|
|
16
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
17
|
+
backgroundColor: "var(--ds-background-boldBrand-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B400, 0.8), ")"),
|
|
20
18
|
boxShadow: ''
|
|
21
19
|
},
|
|
22
20
|
default: {
|
|
23
|
-
color: (
|
|
24
|
-
backgroundColor: (
|
|
21
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
22
|
+
backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
|
|
25
23
|
boxShadow: ''
|
|
26
24
|
},
|
|
27
25
|
focus: {
|
|
28
|
-
color: (
|
|
29
|
-
backgroundColor: (
|
|
30
|
-
boxShadow: "0 0 0 2px ".concat((
|
|
26
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
27
|
+
backgroundColor: "var(--ds-background-boldBrand-resting, ".concat(_colors.B400, ")"),
|
|
28
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, rgb(128,169,230))")
|
|
31
29
|
},
|
|
32
30
|
hover: {
|
|
33
|
-
color: (
|
|
34
|
-
backgroundColor: (
|
|
31
|
+
color: "var(--ds-text-onBold, ".concat(_colors.N0, ")"),
|
|
32
|
+
backgroundColor: "var(--ds-background-boldBrand-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B400, 0.9), ")"),
|
|
35
33
|
boxShadow: ''
|
|
36
34
|
},
|
|
37
35
|
selected: {
|
|
@@ -42,39 +40,39 @@ var defaultTheme = {
|
|
|
42
40
|
},
|
|
43
41
|
iconButton: {
|
|
44
42
|
active: {
|
|
45
|
-
color: (
|
|
46
|
-
backgroundColor: (
|
|
43
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
44
|
+
backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.6), ")"),
|
|
47
45
|
boxShadow: ''
|
|
48
46
|
},
|
|
49
47
|
default: {
|
|
50
|
-
color: (
|
|
48
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
51
49
|
backgroundColor: 'transparent',
|
|
52
50
|
boxShadow: ''
|
|
53
51
|
},
|
|
54
52
|
focus: {
|
|
55
|
-
color: (
|
|
56
|
-
backgroundColor: (
|
|
57
|
-
boxShadow: "0 0 0 2px ".concat((
|
|
53
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
54
|
+
backgroundColor: "var(--ds-background-subtleBrand-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.5), ")"),
|
|
55
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(_colors.B200, ")"))
|
|
58
56
|
},
|
|
59
57
|
hover: {
|
|
60
|
-
color: (
|
|
61
|
-
backgroundColor: (
|
|
58
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
59
|
+
backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")"),
|
|
62
60
|
boxShadow: ''
|
|
63
61
|
},
|
|
64
62
|
selected: {
|
|
65
|
-
color: (
|
|
66
|
-
backgroundColor: (
|
|
63
|
+
color: "var(--ds-text-selected)",
|
|
64
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
67
65
|
boxShadow: ''
|
|
68
66
|
}
|
|
69
67
|
},
|
|
70
68
|
navigation: {
|
|
71
|
-
backgroundColor: (
|
|
72
|
-
color: (
|
|
69
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
70
|
+
color: "var(--ds-text-lowEmphasis, ".concat(_colors.N200, ")")
|
|
73
71
|
},
|
|
74
72
|
productHome: {
|
|
75
|
-
backgroundColor: (
|
|
76
|
-
color: (
|
|
77
|
-
borderRight: "1px solid ".concat((
|
|
73
|
+
backgroundColor: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
|
|
74
|
+
color: "var(--ds-text-highEmphasis, ".concat(_colors.N700, ")"),
|
|
75
|
+
borderRight: "1px solid ".concat("var(--ds-border-neutral, ".concat((0, _themeHelpers.hexToRGBA)(_colors.N200, 0.3), ")")),
|
|
78
76
|
// TODO: (DSP-1256) These colors should be moved into the Logo package
|
|
79
77
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
80
78
|
iconGradientStart: _colors.B400,
|
|
@@ -85,49 +83,49 @@ var defaultTheme = {
|
|
|
85
83
|
},
|
|
86
84
|
primaryButton: {
|
|
87
85
|
active: {
|
|
88
|
-
color: (
|
|
89
|
-
backgroundColor: (
|
|
86
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
87
|
+
backgroundColor: "var(--ds-background-subtleNeutral-pressed, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.7), ")"),
|
|
90
88
|
boxShadow: ''
|
|
91
89
|
},
|
|
92
90
|
default: {
|
|
93
|
-
color: (
|
|
91
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
94
92
|
backgroundColor: 'transparent',
|
|
95
93
|
boxShadow: ''
|
|
96
94
|
},
|
|
97
95
|
focus: {
|
|
98
|
-
color: (
|
|
96
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
|
|
99
97
|
backgroundColor: '',
|
|
100
|
-
boxShadow: "0 0 0 2px ".concat((
|
|
98
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(_colors.B200, ")"))
|
|
101
99
|
},
|
|
102
100
|
hover: {
|
|
103
|
-
color: (
|
|
104
|
-
backgroundColor: (
|
|
101
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
102
|
+
backgroundColor: "var(--ds-background-subtleNeutral-hover, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")"),
|
|
105
103
|
boxShadow: ''
|
|
106
104
|
},
|
|
107
105
|
selected: {
|
|
108
|
-
color: (
|
|
109
|
-
backgroundColor: (
|
|
106
|
+
color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
107
|
+
backgroundColor: "var(--ds-background-selected-resting)",
|
|
110
108
|
boxShadow: '',
|
|
111
|
-
borderColor: (
|
|
112
|
-
bordorBottom: "4px solid ".concat((
|
|
109
|
+
borderColor: "var(--ds-iconBorder-brand, ".concat(_colors.B400, ")"),
|
|
110
|
+
bordorBottom: "4px solid ".concat("var(--ds-iconBorder-brand, ".concat(_colors.B400, ")"))
|
|
113
111
|
}
|
|
114
112
|
},
|
|
115
113
|
search: {
|
|
116
114
|
default: {
|
|
117
|
-
backgroundColor: (
|
|
118
|
-
color: (
|
|
119
|
-
borderColor: (
|
|
115
|
+
backgroundColor: "var(--ds-background-default, ".concat(_colors.N0, ")"),
|
|
116
|
+
color: "var(--ds-text-lowEmphasis, ".concat(_colors.N200, ")"),
|
|
117
|
+
borderColor: "var(--ds-border-neutral, ".concat(_colors.N40, ")")
|
|
120
118
|
},
|
|
121
119
|
focus: {
|
|
122
|
-
borderColor: (
|
|
120
|
+
borderColor: "var(--ds-border-focus, ".concat(_colors.B200, ")")
|
|
123
121
|
},
|
|
124
122
|
hover: {
|
|
125
|
-
color: (
|
|
126
|
-
backgroundColor: (
|
|
123
|
+
color: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
|
|
124
|
+
backgroundColor: "var(--ds-background-default, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9), ")")
|
|
127
125
|
}
|
|
128
126
|
},
|
|
129
127
|
skeleton: {
|
|
130
|
-
backgroundColor: (
|
|
128
|
+
backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")"),
|
|
131
129
|
opacity: 1
|
|
132
130
|
}
|
|
133
131
|
}
|
package/dist/cjs/theme/index.js
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "generateTheme", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _themeGenerator.generateTheme;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function get() {
|
|
@@ -27,10 +21,10 @@ Object.defineProperty(exports, "defaultTheme", {
|
|
|
27
21
|
return _themes.defaultTheme;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
24
|
+
Object.defineProperty(exports, "generateTheme", {
|
|
31
25
|
enumerable: true,
|
|
32
26
|
get: function get() {
|
|
33
|
-
return
|
|
27
|
+
return _themeGenerator.generateTheme;
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
30
|
Object.defineProperty(exports, "hexToRGBA", {
|
|
@@ -39,6 +33,12 @@ Object.defineProperty(exports, "hexToRGBA", {
|
|
|
39
33
|
return _themeHelpers.hexToRGBA;
|
|
40
34
|
}
|
|
41
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "useTheme", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _useTheme.useTheme;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
42
|
|
|
43
43
|
var _themeGenerator = require("./themeGenerator");
|
|
44
44
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.generateTheme = exports.default = void 0;
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.hexToRGBA = exports.getContrastColor = exports.getBoxShadow = exports.generateTextColor = exports.convertHexShorthand = void 0;
|
|
9
9
|
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
5
4
|
import { hexToRGBA } from '../../theme';
|
|
6
5
|
const gridSize = gridSizeFn();
|
|
@@ -19,8 +18,8 @@ export const containerCSS = ({
|
|
|
19
18
|
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
20
19
|
position: 'relative',
|
|
21
20
|
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
22
|
-
// eslint-disable-next-line @atlaskit/design-system/
|
|
23
|
-
borderBottom: `1px solid ${
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
22
|
+
borderBottom: `1px solid ${"var(--ds-border-neutral, #091E4224)"}`,
|
|
24
23
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
25
24
|
'&::after': {
|
|
26
25
|
content: 'none'
|