@atlaskit/atlassian-navigation 1.2.1 → 2.0.1

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/dist/cjs/common/constants.js +1 -1
  3. package/dist/cjs/components/AtlassianNavigation/styles.js +2 -4
  4. package/dist/cjs/components/IconButton/styles.js +1 -1
  5. package/dist/cjs/components/PrimaryButton/styles.js +1 -1
  6. package/dist/cjs/components/PrimaryItemsContainer/index.js +6 -11
  7. package/dist/cjs/components/PrimaryItemsContainer/styles.js +1 -1
  8. package/dist/cjs/components/ProductHome/index.js +4 -4
  9. package/dist/cjs/components/ProductHome/styles.js +1 -1
  10. package/dist/cjs/components/Search/styles.js +1 -1
  11. package/dist/cjs/controllers/overflow/index.js +1 -1
  12. package/dist/cjs/index.js +26 -26
  13. package/dist/cjs/theme/defaultTheme.js +42 -44
  14. package/dist/cjs/theme/index.js +8 -8
  15. package/dist/cjs/theme/themeGenerator.js +1 -1
  16. package/dist/cjs/theme/themeHelpers.js +1 -1
  17. package/dist/cjs/version.json +1 -1
  18. package/dist/es2019/components/AtlassianNavigation/styles.js +2 -3
  19. package/dist/es2019/components/PrimaryItemsContainer/index.js +6 -11
  20. package/dist/es2019/theme/defaultTheme.js +42 -43
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/components/AtlassianNavigation/styles.js +2 -3
  23. package/dist/esm/components/PrimaryItemsContainer/index.js +6 -11
  24. package/dist/esm/theme/defaultTheme.js +42 -43
  25. package/dist/esm/version.json +1 -1
  26. package/dist/types/components/AtlassianNavigation/index.d.ts +1 -0
  27. package/dist/types/components/AtlassianNavigation/skeleton.d.ts +1 -0
  28. package/dist/types/components/BadgeContainer/index.d.ts +1 -0
  29. package/dist/types/components/Create/index.d.ts +1 -0
  30. package/dist/types/components/Create/skeleton.d.ts +1 -0
  31. package/dist/types/components/IconButton/skeleton.d.ts +1 -0
  32. package/dist/types/components/PrimaryButton/skeleton.d.ts +1 -0
  33. package/dist/types/components/PrimaryItemsContainer/index.d.ts +1 -0
  34. package/dist/types/components/PrimaryItemsContainer/skeleton.d.ts +1 -0
  35. package/dist/types/components/ProductHome/custom-product-home.d.ts +1 -0
  36. package/dist/types/components/ProductHome/product-home.d.ts +1 -0
  37. package/dist/types/components/ProductHome/skeleton.d.ts +1 -0
  38. package/dist/types/components/Profile/skeleton.d.ts +1 -0
  39. package/dist/types/components/Search/index.d.ts +1 -0
  40. package/dist/types/components/Search/skeleton.d.ts +1 -0
  41. package/dist/types/components/SignIn/index.d.ts +1 -0
  42. package/dist/types/components/SignIn/skeleton.d.ts +1 -0
  43. package/dist/types/components/SkeletonCreateButton/index.d.ts +1 -0
  44. package/dist/types/components/SkeletonIconButton/index.d.ts +1 -0
  45. package/dist/types/components/SkeletonPrimaryButton/index.d.ts +1 -0
  46. package/dist/types/skeleton-help-button.d.ts +1 -0
  47. package/dist/types/skeleton-notification-button.d.ts +1 -0
  48. package/dist/types/skeleton-settings-button.d.ts +1 -0
  49. package/dist/types/skeleton-switcher-button.d.ts +1 -0
  50. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c55c736ecea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c55c736ecea) - Patch VULN AFP-3486 AFP-3487 AFP-3488 AFP-3489
8
+
9
+ ## 2.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - [`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
14
+
15
+ 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.
16
+ Why change was made: As part of a coordinated upgrade effort across AF packages, as react-intl v2 is quite dated.
17
+ How consumer should update their code: Ensure react-intl ^5.18.1 is installed in consuming applications.
18
+
19
+ Upgrade guide: To consume atlassian-frontend packages that use react-intl5 setup a second provider for the new version, using an npm alias
20
+
21
+ ```js
22
+ "react-intl": "^2.6.0",
23
+ "react-intl-next": "npm:react-intl@^5.18.1",
24
+ ```
25
+
26
+ ```js
27
+ import { IntlProvider } from 'react-intl';
28
+ import { IntlProvider as IntlNextProvider } from 'react-intl-next';
29
+
30
+ return (
31
+ <IntlProvider
32
+ key={locale}
33
+ data-test-language={locale}
34
+ locale={locale}
35
+ defaultLocale={DEFAULT_LOCALE}
36
+ messages={messages}
37
+ >
38
+ <IntlNextProvider
39
+ key={locale}
40
+ data-test-language={locale}
41
+ locale={locale}
42
+ defaultLocale={DEFAULT_LOCALE}
43
+ messages={messages}
44
+ >
45
+ {children}
46
+ </IntlNextProvider>
47
+ </IntlProvider>
48
+ );
49
+ ```
50
+
51
+ ## 1.3.0
52
+
53
+ ### Minor Changes
54
+
55
+ - [`9d4ca6e23da`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d4ca6e23da) - [ux] New create-dropdown-menu package for Create dropdown button
56
+
57
+ ## 1.2.2
58
+
59
+ ### Patch Changes
60
+
61
+ - [`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:
62
+
63
+ `ensure-design-token-usage` now covers:
64
+
65
+ - `legacyElevation` — warns about old usages of the elevation mixins or styles, which instead should use the `card` or `overlay` tokens.
66
+ - `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.
67
+
68
+ `no-unsafe-design-token-usage` (new) covers the remaining rules:
69
+
70
+ - `directTokenUsage` — warns against using the CSS Custom Property name that is output in the browser by the `token()` call.
71
+ Eg. directly using `var(--ds-accent-subtleBlue)` is bad.
72
+ - `staticToken` — warns when tokens aren't used inline. Inlining the token usages helps with static analysis, which unlocks future improvements.
73
+ Eg. pulling the token out into a const like `css={ color: token(primaryButtonText) }` is bad.
74
+ - `invalidToken` — warns when using a token that doesn't exist (not one that's been renamed, see the next point).
75
+ - `tokenRenamed` — warns when using a token that's been renamed in a subsequent release.
76
+ - `tokenFallbackEnforced` — warns if a fallback for the token call is not provided.
77
+ Eg. call with the fallback like this `token('color.background.disabled', N10)` instead of `token('color.background.disabled')`.
78
+ - `tokenFallbackRestricted` — the opposite of `tokenFallbackEnforced`.
79
+ Eg. do not pass in a fallback like this `token('color.background.disabled', N10)` and instead only include the token `token('color.background.disabled')`.
80
+
81
+ 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.
82
+
83
+ - [`22fb31312eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/22fb31312eb) - Fixes unmounted component state update warnings for AtlassianNavigation
84
+ - [`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.
85
+ - Updated dependencies
86
+
3
87
  ## 1.2.1
4
88
 
5
89
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CREATE_BREAKPOINT = exports.PRODUCT_HOME_BREAKPOINT = exports.HORIZONTAL_GLOBAL_NAV_HEIGHT = void 0;
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/ensure-design-token-usage
42
- borderBottom: "1px solid ".concat((0, _tokens.token)('color.border.neutral')),
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.iconButtonSkeletonCSS = exports.getIconButtonTheme = exports.padding = exports.margin = void 0;
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.isHighlightedCSS = exports.primaryButtonSkeletonCSS = exports.getPrimaryButtonTheme = exports.padding = exports.margin = exports.buttonHeight = void 0;
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)(WidthObserverRelativeWrapper, null));
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.primaryButtonSkeletonCSS = exports.widthObserverContainerStyle = exports.containerCSS = void 0;
6
+ exports.widthObserverContainerStyle = exports.primaryButtonSkeletonCSS = exports.containerCSS = void 0;
7
7
 
8
8
  var _constants = require("@atlaskit/theme/constants");
9
9
 
@@ -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, "ProductHome", {
8
+ Object.defineProperty(exports, "CustomProductHome", {
9
9
  enumerable: true,
10
10
  get: function get() {
11
- return _productHome.default;
11
+ return _customProductHome.default;
12
12
  }
13
13
  });
14
- Object.defineProperty(exports, "CustomProductHome", {
14
+ Object.defineProperty(exports, "ProductHome", {
15
15
  enumerable: true,
16
16
  get: function get() {
17
- return _customProductHome.default;
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.customProductLogoCSS = exports.productLogoSkeletonCSS = exports.siteTitleSkeletonCSS = exports.siteTitleCSS = exports.productLogoCSS = exports.customProductIconCSS = exports.productIconSkeletonCSS = exports.productIconCSS = exports.productHomeButtonSkeletonCSS = exports.productHomeButtonCSS = void 0;
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.searchInputCSS = exports.searchInputContainerCSS = exports.searchIconSkeletonCSS = exports.searchIconCSS = void 0;
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.default = exports.useOverflowController = exports.useOverflowStatus = exports.OverflowProvider = void 0;
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, "AtlassianNavigation", {
6
+ Object.defineProperty(exports, "AppSwitcher", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _AtlassianNavigation.AtlassianNavigation;
9
+ return _AppSwitcher.AppSwitcher;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "AppSwitcher", {
12
+ Object.defineProperty(exports, "AtlassianNavigation", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _AppSwitcher.AppSwitcher;
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, "Help", {
24
+ Object.defineProperty(exports, "CustomProductHome", {
25
25
  enumerable: true,
26
26
  get: function get() {
27
- return _Help.Help;
27
+ return _ProductHome.CustomProductHome;
28
28
  }
29
29
  });
30
- Object.defineProperty(exports, "Notifications", {
30
+ Object.defineProperty(exports, "HORIZONTAL_GLOBAL_NAV_HEIGHT", {
31
31
  enumerable: true,
32
32
  get: function get() {
33
- return _Notifications.Notifications;
33
+ return _constants.HORIZONTAL_GLOBAL_NAV_HEIGHT;
34
34
  }
35
35
  });
36
- Object.defineProperty(exports, "PrimaryButton", {
36
+ Object.defineProperty(exports, "Help", {
37
37
  enumerable: true,
38
38
  get: function get() {
39
- return _PrimaryButton.PrimaryButton;
39
+ return _Help.Help;
40
40
  }
41
41
  });
42
- Object.defineProperty(exports, "PrimaryDropdownButton", {
42
+ Object.defineProperty(exports, "IconButton", {
43
43
  enumerable: true,
44
44
  get: function get() {
45
- return _PrimaryDropdownButton.PrimaryDropdownButton;
45
+ return _IconButton.IconButton;
46
46
  }
47
47
  });
48
- Object.defineProperty(exports, "IconButton", {
48
+ Object.defineProperty(exports, "Notifications", {
49
49
  enumerable: true,
50
50
  get: function get() {
51
- return _IconButton.IconButton;
51
+ return _Notifications.Notifications;
52
52
  }
53
53
  });
54
- Object.defineProperty(exports, "CustomProductHome", {
54
+ Object.defineProperty(exports, "PrimaryButton", {
55
55
  enumerable: true,
56
56
  get: function get() {
57
- return _ProductHome.CustomProductHome;
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, "useOverflowStatus", {
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 _constants.HORIZONTAL_GLOBAL_NAV_HEIGHT;
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, "ThemeProvider", {
114
+ Object.defineProperty(exports, "useOverflowStatus", {
115
115
  enumerable: true,
116
116
  get: function get() {
117
- return _theme.ThemeProvider;
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: (0, _tokens.token)('color.text.onBold', _colors.N0),
19
- backgroundColor: (0, _tokens.token)('color.background.boldBrand.pressed', (0, _themeHelpers.hexToRGBA)(_colors.B400, 0.8)),
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: (0, _tokens.token)('color.text.onBold', _colors.N0),
24
- backgroundColor: (0, _tokens.token)('color.background.boldBrand.resting', _colors.B400),
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: (0, _tokens.token)('color.text.onBold', _colors.N0),
29
- backgroundColor: (0, _tokens.token)('color.background.boldBrand.resting', _colors.B400),
30
- boxShadow: "0 0 0 2px ".concat((0, _tokens.token)('color.border.focus', 'rgb(128,169,230)'))
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: (0, _tokens.token)('color.text.onBold', _colors.N0),
34
- backgroundColor: (0, _tokens.token)('color.background.boldBrand.hover', (0, _themeHelpers.hexToRGBA)(_colors.B400, 0.9)),
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.B400),
46
- backgroundColor: (0, _tokens.token)('color.background.subtleNeutral.pressed', (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.6)),
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.N600),
48
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
51
49
  backgroundColor: 'transparent',
52
50
  boxShadow: ''
53
51
  },
54
52
  focus: {
55
- color: (0, _tokens.token)('color.text.mediumEmphasis', _colors.N600),
56
- backgroundColor: (0, _tokens.token)('color.background.subtleBrand.hover', (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.5)),
57
- boxShadow: "0 0 0 2px ".concat((0, _tokens.token)('color.border.focus', _colors.B200))
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.B400),
61
- backgroundColor: (0, _tokens.token)('color.background.subtleNeutral.hover', (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9)),
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: (0, _tokens.token)('color.text.selected', ''),
66
- backgroundColor: (0, _tokens.token)('color.background.selected.resting', ''),
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: (0, _tokens.token)('color.background.default', _colors.N0),
72
- color: (0, _tokens.token)('color.text.lowEmphasis', _colors.N200)
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: (0, _tokens.token)('color.text.brand', _colors.B400),
76
- color: (0, _tokens.token)('color.text.highEmphasis', _colors.N700),
77
- borderRight: "1px solid ".concat((0, _tokens.token)('color.border.neutral', (0, _themeHelpers.hexToRGBA)(_colors.N200, 0.3))),
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.B400),
89
- backgroundColor: (0, _tokens.token)('color.background.subtleNeutral.pressed', (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.7)),
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.N600),
91
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
94
92
  backgroundColor: 'transparent',
95
93
  boxShadow: ''
96
94
  },
97
95
  focus: {
98
- color: (0, _tokens.token)('color.text.mediumEmphasis', _colors.N600),
96
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.N600, ")"),
99
97
  backgroundColor: '',
100
- boxShadow: "0 0 0 2px ".concat((0, _tokens.token)('color.border.focus', _colors.B200))
98
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-focus, ".concat(_colors.B200, ")"))
101
99
  },
102
100
  hover: {
103
- color: (0, _tokens.token)('color.text.mediumEmphasis', _colors.B400),
104
- backgroundColor: (0, _tokens.token)('color.background.subtleNeutral.hover', (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9)),
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: (0, _tokens.token)('color.text.mediumEmphasis', _colors.B400),
109
- backgroundColor: (0, _tokens.token)('color.background.selected.resting', ''),
106
+ color: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
107
+ backgroundColor: "var(--ds-background-selected-resting)",
110
108
  boxShadow: '',
111
- borderColor: (0, _tokens.token)('color.iconBorder.brand', _colors.B400),
112
- bordorBottom: "4px solid ".concat((0, _tokens.token)('color.iconBorder.brand', _colors.B400))
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: (0, _tokens.token)('color.background.default', _colors.N0),
118
- color: (0, _tokens.token)('color.text.lowEmphasis', _colors.N200),
119
- borderColor: (0, _tokens.token)('color.border.neutral', _colors.N40)
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: (0, _tokens.token)('color.border.focus', _colors.B200)
120
+ borderColor: "var(--ds-border-focus, ".concat(_colors.B200, ")")
123
121
  },
124
122
  hover: {
125
- color: (0, _tokens.token)('color.text.brand', _colors.B400),
126
- backgroundColor: (0, _tokens.token)('color.background.default', (0, _themeHelpers.hexToRGBA)(_colors.B50, 0.9))
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: (0, _tokens.token)('color.background.subtleNeutral.resting', _colors.N20),
128
+ backgroundColor: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N20, ")"),
131
129
  opacity: 1
132
130
  }
133
131
  }
@@ -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, "useTheme", {
24
+ Object.defineProperty(exports, "generateTheme", {
31
25
  enumerable: true,
32
26
  get: function get() {
33
- return _useTheme.useTheme;
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.default = exports.generateTheme = void 0;
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.getContrastColor = exports.generateTextColor = exports.convertHexShorthand = exports.getBoxShadow = exports.hexToRGBA = void 0;
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
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "1.2.1",
3
+ "version": "2.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -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/ensure-design-token-usage
23
- borderBottom: `1px solid ${token('color.border.neutral')}`,
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'
@@ -35,16 +35,6 @@ export const PrimaryItemsContainer = ({
35
35
  isSelected: isMoreOpen,
36
36
  testId: testId ? `${testId}-overflow-menu-trigger` : 'overflow-menu-trigger'
37
37
  }, triggerProps), moreLabel), [moreLabel, onMoreClick, isMoreOpen, testId]);
38
-
39
- const WidthObserverRelativeWrapper = () => {
40
- return jsx("div", {
41
- style: widthObserverContainerStyle
42
- }, jsx(WidthObserver, {
43
- offscreen: true,
44
- setWidth: updateWidth
45
- }));
46
- };
47
-
48
38
  const content = useCallback(() => jsx(OverflowProvider, {
49
39
  isVisible: false,
50
40
  openOverflowMenu: openOverflowMenu,
@@ -67,5 +57,10 @@ export const PrimaryItemsContainer = ({
67
57
  onClose: onMoreClose,
68
58
  trigger: trigger,
69
59
  testId: testId ? `${testId}-overflow-menu-popup` : 'overflow-menu-popup'
70
- }), Create && jsx(Create, null), jsx(WidthObserverRelativeWrapper, null));
60
+ }), Create && jsx(Create, null), jsx("div", {
61
+ style: widthObserverContainerStyle
62
+ }, jsx(WidthObserver, {
63
+ offscreen: true,
64
+ setWidth: updateWidth
65
+ })));
71
66
  };