@atlaskit/atlassian-navigation 5.7.2 → 5.7.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 +7 -0
- package/afm-cc/tsconfig.json +0 -1
- package/afm-products/tsconfig.json +0 -1
- package/dist/cjs/common/constants.js +3 -0
- package/dist/cjs/components/AppSwitcher/app-switcher-nav4.js +61 -0
- package/dist/cjs/components/AppSwitcher/app-switcher.js +79 -0
- package/dist/cjs/components/AppSwitcher/index.js +1 -119
- package/dist/cjs/components/AtlassianNavigation/index.js +6 -0
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +2 -0
- package/dist/cjs/components/Create/index.js +2 -0
- package/dist/cjs/components/Help/index.js +2 -0
- package/dist/cjs/components/IconButton/index.js +1 -0
- package/dist/cjs/components/Notifications/index.js +2 -0
- package/dist/cjs/components/PrimaryButton/index.js +2 -0
- package/dist/cjs/components/PrimaryDropdownButton/index.js +2 -0
- package/dist/cjs/components/PrimaryItemsContainer/index.js +5 -4
- package/dist/cjs/components/ProductHome/app-home.js +180 -0
- package/dist/cjs/components/ProductHome/custom-product-home.js +2 -0
- package/dist/cjs/components/ProductHome/product-home.js +21 -110
- package/dist/cjs/components/Profile/index.js +2 -0
- package/dist/cjs/components/Profile/profile.js +74 -0
- package/dist/cjs/components/Search/index.js +2 -0
- package/dist/cjs/components/Settings/index.js +2 -0
- package/dist/cjs/components/SignIn/index.js +2 -0
- package/dist/cjs/controllers/overflow/index.js +2 -0
- package/dist/cjs/controllers/overflow/overflow-context.js +16 -0
- package/dist/cjs/controllers/overflow/overflow-provider.js +27 -0
- package/dist/cjs/controllers/overflow/use-overflow-controller.js +111 -0
- package/dist/cjs/controllers/overflow/use-overflow-status.js +20 -0
- package/dist/cjs/entry-points/app-switcher.js +4 -3
- package/dist/cjs/entry-points/overflow.js +2 -2
- package/dist/cjs/entry-points/profile.js +2 -2
- package/dist/cjs/entry-points/skeleton-help-button.js +2 -1
- package/dist/cjs/index.js +8 -7
- package/dist/cjs/nav4-skeleton-help-button.js +33 -0
- package/dist/cjs/skeleton-help-button.js +1 -24
- package/dist/cjs/skeleton-switcher-button.js +6 -0
- package/dist/cjs/theme/atlassian-theme.js +3 -0
- package/dist/cjs/theme/convert-hex-shorthand.js +47 -0
- package/dist/cjs/theme/default-theme-brand-refresh.js +10 -0
- package/dist/cjs/theme/default-theme.js +1 -2
- package/dist/cjs/theme/generate-text-color.js +13 -0
- package/dist/cjs/theme/get-contrast-color.js +12 -0
- package/dist/cjs/theme/hex-to-rgba.js +18 -0
- package/dist/cjs/theme/index.js +2 -2
- package/dist/cjs/theme/theme-generator.js +22 -13
- package/dist/cjs/theme/theme-provider.js +2 -0
- package/dist/cjs/theme/themes.js +3 -0
- package/dist/es2019/common/constants.js +3 -0
- package/dist/es2019/components/AppSwitcher/app-switcher-nav4.js +52 -0
- package/dist/es2019/components/AppSwitcher/app-switcher.js +70 -0
- package/dist/es2019/components/AppSwitcher/index.js +0 -116
- package/dist/es2019/components/AtlassianNavigation/index.js +6 -0
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +2 -0
- package/dist/es2019/components/Create/index.js +2 -0
- package/dist/es2019/components/Help/index.js +2 -0
- package/dist/es2019/components/IconButton/index.js +1 -0
- package/dist/es2019/components/Notifications/index.js +2 -0
- package/dist/es2019/components/PrimaryButton/index.js +2 -0
- package/dist/es2019/components/PrimaryDropdownButton/index.js +2 -0
- package/dist/es2019/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/es2019/components/ProductHome/app-home.js +185 -0
- package/dist/es2019/components/ProductHome/custom-product-home.js +2 -0
- package/dist/es2019/components/ProductHome/product-home.js +5 -110
- package/dist/es2019/components/Profile/index.js +2 -0
- package/dist/es2019/components/Profile/profile.js +65 -0
- package/dist/es2019/components/Search/index.js +2 -0
- package/dist/es2019/components/Settings/index.js +2 -0
- package/dist/es2019/components/SignIn/index.js +2 -0
- package/dist/es2019/controllers/overflow/index.js +2 -0
- package/dist/es2019/controllers/overflow/overflow-context.js +8 -0
- package/dist/es2019/controllers/overflow/overflow-provider.js +18 -0
- package/dist/es2019/controllers/overflow/use-overflow-controller.js +89 -0
- package/dist/es2019/controllers/overflow/use-overflow-status.js +13 -0
- package/dist/es2019/entry-points/app-switcher.js +2 -1
- package/dist/es2019/entry-points/overflow.js +1 -1
- package/dist/es2019/entry-points/profile.js +1 -1
- package/dist/es2019/entry-points/skeleton-help-button.js +2 -1
- package/dist/es2019/index.js +4 -3
- package/dist/es2019/nav4-skeleton-help-button.js +24 -0
- package/dist/es2019/skeleton-help-button.js +1 -22
- package/dist/es2019/skeleton-switcher-button.js +7 -0
- package/dist/es2019/theme/atlassian-theme.js +3 -0
- package/dist/es2019/theme/convert-hex-shorthand.js +27 -0
- package/dist/es2019/theme/default-theme-brand-refresh.js +3 -0
- package/dist/es2019/theme/default-theme.js +0 -1
- package/dist/es2019/theme/generate-text-color.js +6 -0
- package/dist/es2019/theme/get-contrast-color.js +3 -0
- package/dist/es2019/theme/hex-to-rgba.js +8 -0
- package/dist/es2019/theme/index.js +1 -1
- package/dist/es2019/theme/theme-generator.js +11 -2
- package/dist/es2019/theme/theme-provider.js +2 -0
- package/dist/es2019/theme/themes.js +3 -0
- package/dist/esm/common/constants.js +3 -0
- package/dist/esm/components/AppSwitcher/app-switcher-nav4.js +52 -0
- package/dist/esm/components/AppSwitcher/app-switcher.js +70 -0
- package/dist/esm/components/AppSwitcher/index.js +0 -115
- package/dist/esm/components/AtlassianNavigation/index.js +6 -0
- package/dist/esm/components/AtlassianNavigation/skeleton.js +2 -0
- package/dist/esm/components/Create/index.js +2 -0
- package/dist/esm/components/Help/index.js +2 -0
- package/dist/esm/components/IconButton/index.js +1 -0
- package/dist/esm/components/Notifications/index.js +2 -0
- package/dist/esm/components/PrimaryButton/index.js +2 -0
- package/dist/esm/components/PrimaryDropdownButton/index.js +2 -0
- package/dist/esm/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/esm/components/ProductHome/app-home.js +172 -0
- package/dist/esm/components/ProductHome/custom-product-home.js +2 -0
- package/dist/esm/components/ProductHome/product-home.js +16 -110
- package/dist/esm/components/Profile/index.js +2 -0
- package/dist/esm/components/Profile/profile.js +65 -0
- package/dist/esm/components/Search/index.js +2 -0
- package/dist/esm/components/Settings/index.js +2 -0
- package/dist/esm/components/SignIn/index.js +2 -0
- package/dist/esm/controllers/overflow/index.js +2 -0
- package/dist/esm/controllers/overflow/overflow-context.js +8 -0
- package/dist/esm/controllers/overflow/overflow-provider.js +19 -0
- package/dist/esm/controllers/overflow/use-overflow-controller.js +103 -0
- package/dist/esm/controllers/overflow/use-overflow-status.js +15 -0
- package/dist/esm/entry-points/app-switcher.js +2 -1
- package/dist/esm/entry-points/overflow.js +1 -1
- package/dist/esm/entry-points/profile.js +1 -1
- package/dist/esm/entry-points/skeleton-help-button.js +2 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/nav4-skeleton-help-button.js +26 -0
- package/dist/esm/skeleton-help-button.js +0 -23
- package/dist/esm/skeleton-switcher-button.js +7 -0
- package/dist/esm/theme/atlassian-theme.js +3 -0
- package/dist/esm/theme/convert-hex-shorthand.js +40 -0
- package/dist/esm/theme/default-theme-brand-refresh.js +3 -0
- package/dist/esm/theme/default-theme.js +0 -1
- package/dist/esm/theme/generate-text-color.js +6 -0
- package/dist/esm/theme/get-contrast-color.js +5 -0
- package/dist/esm/theme/hex-to-rgba.js +11 -0
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/theme/theme-generator.js +11 -2
- package/dist/esm/theme/theme-provider.js +2 -0
- package/dist/esm/theme/themes.js +3 -0
- package/dist/types/common/constants.d.ts +3 -0
- package/dist/types/components/AppSwitcher/app-switcher-nav4.d.ts +6 -0
- package/dist/types/components/AppSwitcher/app-switcher.d.ts +14 -0
- package/dist/types/components/AppSwitcher/index.d.ts +0 -12
- package/dist/types/components/AppSwitcher/types.d.ts +3 -0
- package/dist/types/components/AtlassianNavigation/index.d.ts +2 -0
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +2 -0
- package/dist/types/components/AtlassianNavigation/types.d.ts +6 -0
- package/dist/types/components/Create/index.d.ts +2 -0
- package/dist/types/components/Help/index.d.ts +2 -0
- package/dist/types/components/IconButton/index.d.ts +1 -0
- package/dist/types/components/Notifications/index.d.ts +2 -0
- package/dist/types/components/PrimaryButton/index.d.ts +2 -0
- package/dist/types/components/PrimaryDropdownButton/index.d.ts +2 -0
- package/dist/types/components/ProductHome/app-home.d.ts +20 -0
- package/dist/types/components/ProductHome/custom-product-home.d.ts +2 -0
- package/dist/types/components/ProductHome/product-home.d.ts +4 -13
- package/dist/types/components/Profile/index.d.ts +2 -0
- package/dist/types/components/Profile/profile.d.ts +14 -0
- package/dist/types/components/Profile/types.d.ts +3 -0
- package/dist/types/components/Search/index.d.ts +2 -0
- package/dist/types/components/Search/types.d.ts +3 -0
- package/dist/types/components/Settings/index.d.ts +2 -0
- package/dist/types/components/Settings/types.d.ts +3 -0
- package/dist/types/components/SignIn/index.d.ts +2 -0
- package/dist/types/components/SignIn/types.d.ts +3 -0
- package/dist/types/components/SkeletonCreateButton/types.d.ts +3 -0
- package/dist/types/components/SkeletonIconButton/types.d.ts +3 -0
- package/dist/types/components/SkeletonPrimaryButton/types.d.ts +3 -0
- package/dist/types/controllers/overflow/index.d.ts +2 -0
- package/dist/types/controllers/overflow/overflow-context.d.ts +17 -0
- package/dist/types/controllers/overflow/overflow-provider.d.ts +3 -0
- package/dist/types/controllers/overflow/use-overflow-controller.d.ts +7 -0
- package/dist/types/controllers/overflow/use-overflow-status.d.ts +11 -0
- package/dist/types/entry-points/app-switcher.d.ts +2 -1
- package/dist/types/entry-points/overflow.d.ts +1 -1
- package/dist/types/entry-points/profile.d.ts +1 -1
- package/dist/types/entry-points/skeleton-help-button.d.ts +2 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/nav4-skeleton-help-button.d.ts +8 -0
- package/dist/types/skeleton-help-button.d.ts +0 -6
- package/dist/types/skeleton-switcher-button.d.ts +5 -0
- package/dist/types/theme/atlassian-theme.d.ts +3 -0
- package/dist/types/theme/convert-hex-shorthand.d.ts +1 -0
- package/dist/types/theme/default-theme-brand-refresh.d.ts +1 -0
- package/dist/types/theme/default-theme.d.ts +0 -1
- package/dist/types/theme/generate-text-color.d.ts +1 -0
- package/dist/types/theme/get-contrast-color.d.ts +1 -0
- package/dist/types/theme/hex-to-rgba.d.ts +1 -0
- package/dist/types/theme/index.d.ts +1 -1
- package/dist/types/theme/theme-generator.d.ts +5 -0
- package/dist/types/theme/theme-provider.d.ts +2 -0
- package/dist/types/theme/themes.d.ts +3 -0
- package/dist/types/theme/types.d.ts +30 -0
- package/dist/types-ts4.5/common/constants.d.ts +3 -0
- package/dist/types-ts4.5/components/AppSwitcher/app-switcher-nav4.d.ts +6 -0
- package/dist/types-ts4.5/components/AppSwitcher/app-switcher.d.ts +14 -0
- package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +0 -12
- package/dist/types-ts4.5/components/AppSwitcher/types.d.ts +3 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/index.d.ts +2 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/types.d.ts +6 -0
- package/dist/types-ts4.5/components/Create/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Help/index.d.ts +2 -0
- package/dist/types-ts4.5/components/IconButton/index.d.ts +1 -0
- package/dist/types-ts4.5/components/Notifications/index.d.ts +2 -0
- package/dist/types-ts4.5/components/PrimaryButton/index.d.ts +2 -0
- package/dist/types-ts4.5/components/PrimaryDropdownButton/index.d.ts +2 -0
- package/dist/types-ts4.5/components/ProductHome/app-home.d.ts +20 -0
- package/dist/types-ts4.5/components/ProductHome/custom-product-home.d.ts +2 -0
- package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +4 -13
- package/dist/types-ts4.5/components/Profile/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Profile/profile.d.ts +14 -0
- package/dist/types-ts4.5/components/Profile/types.d.ts +3 -0
- package/dist/types-ts4.5/components/Search/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Search/types.d.ts +3 -0
- package/dist/types-ts4.5/components/Settings/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Settings/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SignIn/index.d.ts +2 -0
- package/dist/types-ts4.5/components/SignIn/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SkeletonCreateButton/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SkeletonIconButton/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/types.d.ts +3 -0
- package/dist/types-ts4.5/controllers/overflow/index.d.ts +2 -0
- package/dist/types-ts4.5/controllers/overflow/overflow-context.d.ts +17 -0
- package/dist/types-ts4.5/controllers/overflow/overflow-provider.d.ts +3 -0
- package/dist/types-ts4.5/controllers/overflow/use-overflow-controller.d.ts +7 -0
- package/dist/types-ts4.5/controllers/overflow/use-overflow-status.d.ts +11 -0
- package/dist/types-ts4.5/entry-points/app-switcher.d.ts +2 -1
- package/dist/types-ts4.5/entry-points/overflow.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/profile.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/skeleton-help-button.d.ts +2 -1
- package/dist/types-ts4.5/index.d.ts +4 -3
- package/dist/types-ts4.5/nav4-skeleton-help-button.d.ts +8 -0
- package/dist/types-ts4.5/skeleton-help-button.d.ts +0 -6
- package/dist/types-ts4.5/skeleton-switcher-button.d.ts +5 -0
- package/dist/types-ts4.5/theme/atlassian-theme.d.ts +3 -0
- package/dist/types-ts4.5/theme/convert-hex-shorthand.d.ts +1 -0
- package/dist/types-ts4.5/theme/default-theme-brand-refresh.d.ts +1 -0
- package/dist/types-ts4.5/theme/default-theme.d.ts +0 -1
- package/dist/types-ts4.5/theme/generate-text-color.d.ts +1 -0
- package/dist/types-ts4.5/theme/get-contrast-color.d.ts +1 -0
- package/dist/types-ts4.5/theme/hex-to-rgba.d.ts +1 -0
- package/dist/types-ts4.5/theme/index.d.ts +1 -1
- package/dist/types-ts4.5/theme/theme-generator.d.ts +5 -0
- package/dist/types-ts4.5/theme/theme-provider.d.ts +2 -0
- package/dist/types-ts4.5/theme/themes.d.ts +3 -0
- package/dist/types-ts4.5/theme/types.d.ts +30 -0
- package/package.json +9 -9
- package/afm-jira/tsconfig.json +0 -64
- /package/dist/cjs/components/AppSwitcher/{index.compiled.css → app-switcher.compiled.css} +0 -0
- /package/dist/cjs/{skeleton-help-button.compiled.css → nav4-skeleton-help-button.compiled.css} +0 -0
- /package/dist/es2019/components/AppSwitcher/{index.compiled.css → app-switcher.compiled.css} +0 -0
- /package/dist/es2019/{skeleton-help-button.compiled.css → nav4-skeleton-help-button.compiled.css} +0 -0
- /package/dist/esm/components/AppSwitcher/{index.compiled.css → app-switcher.compiled.css} +0 -0
- /package/dist/esm/{skeleton-help-button.compiled.css → nav4-skeleton-help-button.compiled.css} +0 -0
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
/* skeleton-help-button.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports.SkeletonHelpButton =
|
|
9
|
-
require("./skeleton-help-button.compiled.css");
|
|
10
|
-
var _runtime = require("@compiled/react/runtime");
|
|
7
|
+
exports.SkeletonHelpButton = void 0;
|
|
11
8
|
var _react = _interopRequireDefault(require("react"));
|
|
12
9
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/question-circle"));
|
|
13
|
-
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
10
|
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
15
|
-
var iconSpacingStyles = {
|
|
16
|
-
space050: "_1rjc1b66 _18zr1b66"
|
|
17
|
-
};
|
|
18
11
|
/**
|
|
19
12
|
* __Skeleton notification button__
|
|
20
13
|
*
|
|
@@ -32,20 +25,4 @@ var SkeletonHelpButton = exports.SkeletonHelpButton = function SkeletonHelpButto
|
|
|
32
25
|
label: label,
|
|
33
26
|
color: "currentColor"
|
|
34
27
|
}));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* __Nav 4 skeleton help button__
|
|
39
|
-
*
|
|
40
|
-
* A nav 4 skeleton help button {description}.
|
|
41
|
-
*/
|
|
42
|
-
var Nav4SkeletonHelpButton = exports.Nav4SkeletonHelpButton = function Nav4SkeletonHelpButton(_ref2) {
|
|
43
|
-
var _ref2$label = _ref2.label,
|
|
44
|
-
label = _ref2$label === void 0 ? '' : _ref2$label;
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(_SkeletonIconButton.SkeletonIconButton, null, /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
46
|
-
xcss: iconSpacingStyles.space050
|
|
47
|
-
}, /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
|
|
48
|
-
label: label,
|
|
49
|
-
color: "var(--ds-icon, #292A2E)"
|
|
50
|
-
})));
|
|
51
28
|
};
|
|
@@ -23,6 +23,10 @@ var _nav4SkeletonSwitcherButton = require("./nav4-skeleton-switcher-button");
|
|
|
23
23
|
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
28
|
+
*/
|
|
29
|
+
|
|
26
30
|
var skeletonSwitcherButtonStyles = (0, _react2.css)({
|
|
27
31
|
margin: 0,
|
|
28
32
|
// eslint-disable-next-line @atlaskit/design-system/no-physical-properties
|
|
@@ -65,6 +69,8 @@ var skeletonSwitcherButtonStyles = (0, _react2.css)({
|
|
|
65
69
|
*
|
|
66
70
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
67
71
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
72
|
+
*
|
|
73
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
68
74
|
*/
|
|
69
75
|
var SkeletonSwitcherButton = exports.SkeletonSwitcherButton = function SkeletonSwitcherButton(_ref) {
|
|
70
76
|
var _ref$label = _ref.label,
|
|
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.atlassianTheme = void 0;
|
|
7
7
|
var _defaultTheme = require("./default-theme");
|
|
8
8
|
var _themeGenerator = require("./theme-generator");
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
11
|
+
*/
|
|
9
12
|
var atlassianTheme = exports.atlassianTheme = (0, _themeGenerator.generateTheme)({
|
|
10
13
|
name: _defaultTheme.DEFAULT_THEME_NAME,
|
|
11
14
|
backgroundColor: '#FFFFFF',
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.convertHexShorthand = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var hex = '[a-z0-9]';
|
|
10
|
+
var shortHandHexColorPattern = new RegExp("#(".concat(hex, ")(").concat(hex, ")(").concat(hex, ")"), 'i');
|
|
11
|
+
var repeat = function repeat(str, times) {
|
|
12
|
+
return (0, _toConsumableArray2.default)(Array(times)).map(function () {
|
|
13
|
+
return str;
|
|
14
|
+
}).join('');
|
|
15
|
+
};
|
|
16
|
+
var isShortHexColor = function isShortHexColor(color) {
|
|
17
|
+
return color && color.length === 4;
|
|
18
|
+
};
|
|
19
|
+
var completeHexColor = function completeHexColor(colors) {
|
|
20
|
+
var hex = colors.map(function (color) {
|
|
21
|
+
return repeat(color, 2);
|
|
22
|
+
}).join('');
|
|
23
|
+
return "#".concat(hex);
|
|
24
|
+
};
|
|
25
|
+
var completeTriplet = function completeTriplet(colors) {
|
|
26
|
+
return "#".concat(repeat(colors[1], 6));
|
|
27
|
+
};
|
|
28
|
+
var isTriplet = function isTriplet(colors) {
|
|
29
|
+
return colors[0] === colors[1] && colors[1] === colors[2];
|
|
30
|
+
};
|
|
31
|
+
var convertHexShorthand = exports.convertHexShorthand = function convertHexShorthand(color) {
|
|
32
|
+
if (isShortHexColor(color)) {
|
|
33
|
+
// when color = '#ccc', matches is structured as ['#ccc', 'c', 'c', 'c', ...]
|
|
34
|
+
var matches = color.match(shortHandHexColorPattern);
|
|
35
|
+
if (matches) {
|
|
36
|
+
var colors = matches.slice(1, 4);
|
|
37
|
+
if (isTriplet(colors)) {
|
|
38
|
+
return completeTriplet(colors);
|
|
39
|
+
} else {
|
|
40
|
+
return completeHexColor(colors);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// return the color as is when it's not hex color shorthand
|
|
46
|
+
return color;
|
|
47
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.defaultThemeBrandRefresh = void 0;
|
|
8
|
+
var _defaultTheme = _interopRequireDefault(require("./default-theme"));
|
|
9
|
+
var defaultThemeCopy = JSON.parse(JSON.stringify(_defaultTheme.default));
|
|
10
|
+
var defaultThemeBrandRefresh = exports.defaultThemeBrandRefresh = defaultThemeCopy;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = exports.DEFAULT_THEME_NAME = void 0;
|
|
7
7
|
var defaultTheme = {
|
|
8
8
|
mode: {
|
|
9
9
|
create: {
|
|
@@ -137,6 +137,5 @@ var defaultThemeCopy = JSON.parse(JSON.stringify(defaultTheme));
|
|
|
137
137
|
// Update iconColor and textColor in defaultThemeBrandRefresh
|
|
138
138
|
defaultThemeCopy.mode.productHome.iconColor = undefined;
|
|
139
139
|
defaultThemeCopy.mode.productHome.textColor = undefined;
|
|
140
|
-
var defaultThemeBrandRefresh = exports.defaultThemeBrandRefresh = defaultThemeCopy;
|
|
141
140
|
var DEFAULT_THEME_NAME = exports.DEFAULT_THEME_NAME = 'atlassian';
|
|
142
141
|
var _default = exports.default = defaultTheme;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.generateTextColor = void 0;
|
|
8
|
+
var _chromatism = _interopRequireDefault(require("chromatism"));
|
|
9
|
+
var _convertHexShorthand = require("./convert-hex-shorthand");
|
|
10
|
+
var generateTextColor = exports.generateTextColor = function generateTextColor(color) {
|
|
11
|
+
var converted = (0, _convertHexShorthand.convertHexShorthand)(color);
|
|
12
|
+
return _chromatism.default.contrastRatio(converted).hex;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getContrastColor = void 0;
|
|
8
|
+
var _chromatism = _interopRequireDefault(require("chromatism"));
|
|
9
|
+
var _hexToRgba = require("./hex-to-rgba");
|
|
10
|
+
var getContrastColor = exports.getContrastColor = function getContrastColor(contrastValue, opacityValue, color) {
|
|
11
|
+
return (0, _hexToRgba.hexToRGBA)(_chromatism.default.contrast(contrastValue, color).hex, opacityValue);
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.hexToRGBA = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _chromatism = _interopRequireDefault(require("chromatism"));
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
var hexToRGBA = exports.hexToRGBA = function hexToRGBA(hex) {
|
|
13
|
+
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
14
|
+
var rgba = _objectSpread(_objectSpread({}, _chromatism.default.convert(hex).rgb), {}, {
|
|
15
|
+
a: opacity
|
|
16
|
+
});
|
|
17
|
+
return "rgba(".concat(Object.values(rgba).join(', '), ")");
|
|
18
|
+
};
|
package/dist/cjs/theme/index.js
CHANGED
|
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "generateTheme", {
|
|
|
30
30
|
Object.defineProperty(exports, "hexToRGBA", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function get() {
|
|
33
|
-
return
|
|
33
|
+
return _hexToRgba.hexToRGBA;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "useTheme", {
|
|
@@ -43,4 +43,4 @@ var _themeGenerator = require("./theme-generator");
|
|
|
43
43
|
var _themeProvider = require("./theme-provider");
|
|
44
44
|
var _themes = require("./themes");
|
|
45
45
|
var _useTheme = require("./use-theme");
|
|
46
|
-
var
|
|
46
|
+
var _hexToRgba = require("./hex-to-rgba");
|
|
@@ -7,8 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.generateTheme = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _defaultTheme = require("./default-theme");
|
|
10
|
+
var _defaultThemeBrandRefresh = require("./default-theme-brand-refresh");
|
|
11
|
+
var _generateTextColor = require("./generate-text-color");
|
|
10
12
|
var _getBoxShadow = require("./get-box-shadow");
|
|
11
|
-
var
|
|
13
|
+
var _getContrastColor = require("./get-contrast-color");
|
|
14
|
+
var _hexToRgba = require("./hex-to-rgba");
|
|
12
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
17
|
var generateOpacityValue = function generateOpacityValue(color) {
|
|
@@ -27,7 +30,7 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
|
|
|
27
30
|
var isCreateButton = buttonType === 'create';
|
|
28
31
|
return {
|
|
29
32
|
active: {
|
|
30
|
-
backgroundColor: isCreateButton ? (0,
|
|
33
|
+
backgroundColor: isCreateButton ? (0, _hexToRgba.hexToRGBA)(backgroundColor, 0.65) : (0, _getContrastColor.getContrastColor)(0.3, opacityValue, backgroundColor),
|
|
31
34
|
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent'),
|
|
32
35
|
color: color
|
|
33
36
|
},
|
|
@@ -42,19 +45,19 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
|
|
|
42
45
|
backgroundColor: backgroundColor
|
|
43
46
|
},
|
|
44
47
|
hover: {
|
|
45
|
-
backgroundColor: isCreateButton ? (0,
|
|
48
|
+
backgroundColor: isCreateButton ? (0, _hexToRgba.hexToRGBA)(backgroundColor, 0.8) : (0, _getContrastColor.getContrastColor)(0.1, opacityValue, backgroundColor),
|
|
46
49
|
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent'),
|
|
47
50
|
color: color
|
|
48
51
|
},
|
|
49
52
|
selected: {
|
|
50
53
|
color: color,
|
|
51
|
-
backgroundColor: (0,
|
|
54
|
+
backgroundColor: (0, _getContrastColor.getContrastColor)(0.3, opacityValue, backgroundColor),
|
|
52
55
|
borderColor: highlightColor,
|
|
53
56
|
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent')
|
|
54
57
|
},
|
|
55
58
|
selectedHover: {
|
|
56
59
|
color: color,
|
|
57
|
-
backgroundColor: (0,
|
|
60
|
+
backgroundColor: (0, _getContrastColor.getContrastColor)(0.3, opacityValue, backgroundColor),
|
|
58
61
|
borderColor: highlightColor,
|
|
59
62
|
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent')
|
|
60
63
|
}
|
|
@@ -63,20 +66,26 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
|
|
|
63
66
|
var generateCreateButtonColors = function generateCreateButtonColors(_themeBackground, themeHighlight) {
|
|
64
67
|
return {
|
|
65
68
|
backgroundColor: themeHighlight,
|
|
66
|
-
color: (0,
|
|
69
|
+
color: (0, _generateTextColor.generateTextColor)(themeHighlight),
|
|
67
70
|
highlightColor: themeHighlight
|
|
68
71
|
};
|
|
69
72
|
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* __generateTheme__
|
|
76
|
+
*
|
|
77
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
78
|
+
*/
|
|
70
79
|
var generateTheme = exports.generateTheme = function generateTheme(themeColors) {
|
|
71
80
|
var backgroundColor = themeColors.backgroundColor,
|
|
72
81
|
highlightColor = themeColors.highlightColor,
|
|
73
82
|
name = themeColors.name;
|
|
74
|
-
var color = (0,
|
|
83
|
+
var color = (0, _generateTextColor.generateTextColor)(backgroundColor);
|
|
75
84
|
var colors = _objectSpread(_objectSpread({}, themeColors), {}, {
|
|
76
85
|
color: color
|
|
77
86
|
});
|
|
78
87
|
if (name === _defaultTheme.DEFAULT_THEME_NAME) {
|
|
79
|
-
return
|
|
88
|
+
return _defaultThemeBrandRefresh.defaultThemeBrandRefresh;
|
|
80
89
|
}
|
|
81
90
|
return {
|
|
82
91
|
mode: {
|
|
@@ -92,20 +101,20 @@ var generateTheme = exports.generateTheme = function generateTheme(themeColors)
|
|
|
92
101
|
iconColor: color,
|
|
93
102
|
textColor: color,
|
|
94
103
|
backgroundColor: highlightColor,
|
|
95
|
-
borderRight: "var(--ds-border-width, 1px)".concat(" solid ", (0,
|
|
104
|
+
borderRight: "var(--ds-border-width, 1px)".concat(" solid ", (0, _hexToRgba.hexToRGBA)(color, 0.5))
|
|
96
105
|
},
|
|
97
106
|
search: {
|
|
98
107
|
default: {
|
|
99
108
|
backgroundColor: backgroundColor,
|
|
100
109
|
color: color,
|
|
101
|
-
borderColor: (0,
|
|
110
|
+
borderColor: (0, _hexToRgba.hexToRGBA)(color, 0.5)
|
|
102
111
|
},
|
|
103
112
|
focus: {
|
|
104
|
-
borderColor: (0,
|
|
105
|
-
boxShadow: (0, _getBoxShadow.getBoxShadow)((0,
|
|
113
|
+
borderColor: (0, _hexToRgba.hexToRGBA)(highlightColor, 0.8),
|
|
114
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)((0, _hexToRgba.hexToRGBA)(highlightColor, 0.5))
|
|
106
115
|
},
|
|
107
116
|
hover: {
|
|
108
|
-
backgroundColor: (0,
|
|
117
|
+
backgroundColor: (0, _getContrastColor.getContrastColor)(0.1, generateOpacityValue(color), backgroundColor),
|
|
109
118
|
color: color
|
|
110
119
|
}
|
|
111
120
|
},
|
|
@@ -15,5 +15,7 @@ var _themeContext = require("./theme-context");
|
|
|
15
15
|
* __Theme provider__
|
|
16
16
|
*
|
|
17
17
|
* A provider for the theme context used by all navigation components.
|
|
18
|
+
*
|
|
19
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
18
20
|
*/
|
|
19
21
|
var ThemeProvider = exports.ThemeProvider = _themeContext.ThemeContext.Provider;
|
package/dist/cjs/theme/themes.js
CHANGED
|
@@ -11,4 +11,7 @@ Object.defineProperty(exports, "atlassianTheme", {
|
|
|
11
11
|
});
|
|
12
12
|
exports.defaultTheme = void 0;
|
|
13
13
|
var _atlassianTheme = require("./atlassian-theme");
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
16
|
+
*/
|
|
14
17
|
var defaultTheme = exports.defaultTheme = _atlassianTheme.atlassianTheme;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
|
|
4
|
+
import { IconButton } from '../IconButton';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
7
|
+
*/
|
|
8
|
+
export const AppSwitcherNav4 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
+
const {
|
|
10
|
+
component,
|
|
11
|
+
href,
|
|
12
|
+
id,
|
|
13
|
+
isDisabled,
|
|
14
|
+
isSelected,
|
|
15
|
+
label,
|
|
16
|
+
onBlur,
|
|
17
|
+
onClick,
|
|
18
|
+
onFocus,
|
|
19
|
+
onMouseDown,
|
|
20
|
+
onMouseEnter,
|
|
21
|
+
onMouseLeave,
|
|
22
|
+
onMouseUp,
|
|
23
|
+
target,
|
|
24
|
+
testId,
|
|
25
|
+
tooltip,
|
|
26
|
+
...rest
|
|
27
|
+
} = props;
|
|
28
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
29
|
+
icon: /*#__PURE__*/React.createElement(AppSwitcherIcon, {
|
|
30
|
+
label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
|
|
31
|
+
color: "var(--ds-icon, #292A2E)"
|
|
32
|
+
}),
|
|
33
|
+
component: component,
|
|
34
|
+
href: href,
|
|
35
|
+
id: id,
|
|
36
|
+
isDisabled: isDisabled,
|
|
37
|
+
isSelected: isSelected,
|
|
38
|
+
label: label,
|
|
39
|
+
onBlur: onBlur,
|
|
40
|
+
onClick: onClick,
|
|
41
|
+
onFocus: onFocus,
|
|
42
|
+
onMouseDown: onMouseDown,
|
|
43
|
+
onMouseEnter: onMouseEnter,
|
|
44
|
+
onMouseLeave: onMouseLeave,
|
|
45
|
+
onMouseUp: onMouseUp,
|
|
46
|
+
ref: ref,
|
|
47
|
+
target: target,
|
|
48
|
+
testId: testId,
|
|
49
|
+
tooltip: tooltip
|
|
50
|
+
// These are all explicit, leaving it in just in case
|
|
51
|
+
}, rest));
|
|
52
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* app-switcher.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./app-switcher.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import React, { forwardRef } from 'react';
|
|
6
|
+
import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
|
|
7
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { IconButton } from '../IconButton';
|
|
9
|
+
const iconSpacingStyles = {
|
|
10
|
+
space050: "_1rjc1b66 _18zr1b66"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* _App switcher__
|
|
15
|
+
*
|
|
16
|
+
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
|
|
17
|
+
* `renderAppSwitcher` prop.
|
|
18
|
+
*
|
|
19
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
20
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
21
|
+
*
|
|
22
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
23
|
+
*/
|
|
24
|
+
export const AppSwitcher = /*#__PURE__*/forwardRef((props, ref) => {
|
|
25
|
+
const {
|
|
26
|
+
component,
|
|
27
|
+
href,
|
|
28
|
+
id,
|
|
29
|
+
isDisabled,
|
|
30
|
+
isSelected,
|
|
31
|
+
label,
|
|
32
|
+
onBlur,
|
|
33
|
+
onClick,
|
|
34
|
+
onFocus,
|
|
35
|
+
onMouseDown,
|
|
36
|
+
onMouseEnter,
|
|
37
|
+
onMouseLeave,
|
|
38
|
+
onMouseUp,
|
|
39
|
+
target,
|
|
40
|
+
testId,
|
|
41
|
+
tooltip,
|
|
42
|
+
...rest
|
|
43
|
+
} = props;
|
|
44
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
45
|
+
component: component,
|
|
46
|
+
href: href,
|
|
47
|
+
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
48
|
+
xcss: iconSpacingStyles.space050
|
|
49
|
+
}, /*#__PURE__*/React.createElement(AppSwitcherIcon, {
|
|
50
|
+
color: "currentColor",
|
|
51
|
+
label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
|
|
52
|
+
})),
|
|
53
|
+
id: id,
|
|
54
|
+
isDisabled: isDisabled,
|
|
55
|
+
isSelected: isSelected,
|
|
56
|
+
label: label,
|
|
57
|
+
onBlur: onBlur,
|
|
58
|
+
onClick: onClick,
|
|
59
|
+
onFocus: onFocus,
|
|
60
|
+
onMouseDown: onMouseDown,
|
|
61
|
+
onMouseEnter: onMouseEnter,
|
|
62
|
+
onMouseLeave: onMouseLeave,
|
|
63
|
+
onMouseUp: onMouseUp,
|
|
64
|
+
ref: ref,
|
|
65
|
+
target: target,
|
|
66
|
+
testId: testId,
|
|
67
|
+
tooltip: tooltip
|
|
68
|
+
// These are all explicit, leaving it in just in case
|
|
69
|
+
}, rest));
|
|
70
|
+
});
|
|
@@ -1,119 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import "./index.compiled.css";
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import React, { forwardRef } from 'react';
|
|
6
|
-
import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
|
|
7
|
-
import { Flex } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { IconButton } from '../IconButton';
|
|
9
|
-
const iconSpacingStyles = {
|
|
10
|
-
space050: "_1rjc1b66 _18zr1b66"
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* _App switcher__
|
|
15
|
-
*
|
|
16
|
-
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
|
|
17
|
-
* `renderAppSwitcher` prop.
|
|
18
|
-
*
|
|
19
|
-
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
20
|
-
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
21
|
-
*/
|
|
22
|
-
export const AppSwitcher = /*#__PURE__*/forwardRef((props, ref) => {
|
|
23
|
-
const {
|
|
24
|
-
component,
|
|
25
|
-
href,
|
|
26
|
-
id,
|
|
27
|
-
isDisabled,
|
|
28
|
-
isSelected,
|
|
29
|
-
label,
|
|
30
|
-
onBlur,
|
|
31
|
-
onClick,
|
|
32
|
-
onFocus,
|
|
33
|
-
onMouseDown,
|
|
34
|
-
onMouseEnter,
|
|
35
|
-
onMouseLeave,
|
|
36
|
-
onMouseUp,
|
|
37
|
-
target,
|
|
38
|
-
testId,
|
|
39
|
-
tooltip,
|
|
40
|
-
...rest
|
|
41
|
-
} = props;
|
|
42
|
-
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
43
|
-
component: component,
|
|
44
|
-
href: href,
|
|
45
|
-
icon: /*#__PURE__*/React.createElement(Flex, {
|
|
46
|
-
xcss: iconSpacingStyles.space050
|
|
47
|
-
}, /*#__PURE__*/React.createElement(AppSwitcherIcon, {
|
|
48
|
-
color: "currentColor",
|
|
49
|
-
label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
|
|
50
|
-
})),
|
|
51
|
-
id: id,
|
|
52
|
-
isDisabled: isDisabled,
|
|
53
|
-
isSelected: isSelected,
|
|
54
|
-
label: label,
|
|
55
|
-
onBlur: onBlur,
|
|
56
|
-
onClick: onClick,
|
|
57
|
-
onFocus: onFocus,
|
|
58
|
-
onMouseDown: onMouseDown,
|
|
59
|
-
onMouseEnter: onMouseEnter,
|
|
60
|
-
onMouseLeave: onMouseLeave,
|
|
61
|
-
onMouseUp: onMouseUp,
|
|
62
|
-
ref: ref,
|
|
63
|
-
target: target,
|
|
64
|
-
testId: testId,
|
|
65
|
-
tooltip: tooltip
|
|
66
|
-
// These are all explicit, leaving it in just in case
|
|
67
|
-
}, rest));
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
71
|
-
export const AppSwitcherNav4 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
72
|
-
const {
|
|
73
|
-
component,
|
|
74
|
-
href,
|
|
75
|
-
id,
|
|
76
|
-
isDisabled,
|
|
77
|
-
isSelected,
|
|
78
|
-
label,
|
|
79
|
-
onBlur,
|
|
80
|
-
onClick,
|
|
81
|
-
onFocus,
|
|
82
|
-
onMouseDown,
|
|
83
|
-
onMouseEnter,
|
|
84
|
-
onMouseLeave,
|
|
85
|
-
onMouseUp,
|
|
86
|
-
target,
|
|
87
|
-
testId,
|
|
88
|
-
tooltip,
|
|
89
|
-
...rest
|
|
90
|
-
} = props;
|
|
91
|
-
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
92
|
-
icon: /*#__PURE__*/React.createElement(AppSwitcherIcon, {
|
|
93
|
-
label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
|
|
94
|
-
color: "var(--ds-icon, #292A2E)"
|
|
95
|
-
}),
|
|
96
|
-
component: component,
|
|
97
|
-
href: href,
|
|
98
|
-
id: id,
|
|
99
|
-
isDisabled: isDisabled,
|
|
100
|
-
isSelected: isSelected,
|
|
101
|
-
label: label,
|
|
102
|
-
onBlur: onBlur,
|
|
103
|
-
onClick: onClick,
|
|
104
|
-
onFocus: onFocus,
|
|
105
|
-
onMouseDown: onMouseDown,
|
|
106
|
-
onMouseEnter: onMouseEnter,
|
|
107
|
-
onMouseLeave: onMouseLeave,
|
|
108
|
-
onMouseUp: onMouseUp,
|
|
109
|
-
ref: ref,
|
|
110
|
-
target: target,
|
|
111
|
-
testId: testId,
|
|
112
|
-
tooltip: tooltip
|
|
113
|
-
// These are all explicit, leaving it in just in case
|
|
114
|
-
}, rest));
|
|
115
|
-
});
|
|
116
|
-
|
|
117
1
|
// exists only to extract props
|
|
118
2
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
119
3
|
export default (_props => {});
|
|
@@ -8,6 +8,7 @@ import React from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { NavigationAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
11
|
+
import warnOnce from '@atlaskit/ds-lib/warn-once';
|
|
11
12
|
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
12
13
|
import { defaultTheme, ThemeProvider } from '../../theme';
|
|
13
14
|
import { PrimaryItemsContainer } from '../PrimaryItemsContainer';
|
|
@@ -62,8 +63,13 @@ const analyticsData = {
|
|
|
62
63
|
*
|
|
63
64
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
|
|
64
65
|
* - [Code](https://atlassian.design/components/atlassian-navigation/examples)
|
|
66
|
+
*
|
|
67
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
65
68
|
*/
|
|
66
69
|
export const AtlassianNavigation = props => {
|
|
70
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'CI') {
|
|
71
|
+
warnOnce('@atlaskit/atlassian-navigation is deprecated. Use @atlaskit/navigation-system instead.');
|
|
72
|
+
}
|
|
67
73
|
const {
|
|
68
74
|
label: label,
|
|
69
75
|
primaryItems = [],
|
|
@@ -60,6 +60,8 @@ const rightStyles = css({
|
|
|
60
60
|
*
|
|
61
61
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
62
62
|
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
63
|
+
*
|
|
64
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
63
65
|
*/
|
|
64
66
|
export const NavigationSkeleton = ({
|
|
65
67
|
primaryItemsCount = 4,
|
|
@@ -53,6 +53,8 @@ const TooltipSwitch = ({
|
|
|
53
53
|
*
|
|
54
54
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
55
55
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
56
|
+
*
|
|
57
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
56
58
|
*/
|
|
57
59
|
export const Create = ({
|
|
58
60
|
onClick,
|
|
@@ -19,6 +19,8 @@ const HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count
|
|
|
19
19
|
*
|
|
20
20
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
21
21
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
22
|
+
*
|
|
23
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
22
24
|
*/
|
|
23
25
|
export const Help = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24
26
|
const {
|
|
@@ -12,6 +12,7 @@ import { getIconButtonTheme } from './styles';
|
|
|
12
12
|
* pass into `AtlassianNavigation`'s render props, but where possible you should
|
|
13
13
|
* rely on the defaults.
|
|
14
14
|
*
|
|
15
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
15
16
|
*/
|
|
16
17
|
export const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
18
|
const {
|
|
@@ -20,6 +20,8 @@ const NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
|
20
20
|
*
|
|
21
21
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
|
|
22
22
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
23
|
+
*
|
|
24
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
23
25
|
*/
|
|
24
26
|
export const Notifications = /*#__PURE__*/forwardRef((props, ref) => {
|
|
25
27
|
const {
|