@atlaskit/atlassian-navigation 5.7.2 → 5.7.4
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 +13 -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 +10 -10
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 5.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.7.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`45ab8af062543`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/45ab8af062543) -
|
|
14
|
+
Add deprecation notices to code exports
|
|
15
|
+
|
|
3
16
|
## 5.7.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.varSearchHoverBackgroundColor = exports.varSearchFocusBorderColor = exports.varSearchColor = exports.varSearchBorderColor = exports.varSearchBackgroundColor = exports.PRODUCT_HOME_BREAKPOINT = exports.HORIZONTAL_GLOBAL_NAV_HEIGHT = exports.CREATE_BREAKPOINT = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
9
|
+
*/
|
|
7
10
|
var HORIZONTAL_GLOBAL_NAV_HEIGHT = exports.HORIZONTAL_GLOBAL_NAV_HEIGHT = 56;
|
|
8
11
|
var PRODUCT_HOME_BREAKPOINT = exports.PRODUCT_HOME_BREAKPOINT = 1280;
|
|
9
12
|
var CREATE_BREAKPOINT = exports.CREATE_BREAKPOINT = 1130;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.AppSwitcherNav4 = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/core/app-switcher"));
|
|
13
|
+
var _IconButton = require("../IconButton");
|
|
14
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
18
|
+
*/
|
|
19
|
+
var AppSwitcherNav4 = exports.AppSwitcherNav4 = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
20
|
+
var component = props.component,
|
|
21
|
+
href = props.href,
|
|
22
|
+
id = props.id,
|
|
23
|
+
isDisabled = props.isDisabled,
|
|
24
|
+
isSelected = props.isSelected,
|
|
25
|
+
label = props.label,
|
|
26
|
+
onBlur = props.onBlur,
|
|
27
|
+
onClick = props.onClick,
|
|
28
|
+
onFocus = props.onFocus,
|
|
29
|
+
onMouseDown = props.onMouseDown,
|
|
30
|
+
onMouseEnter = props.onMouseEnter,
|
|
31
|
+
onMouseLeave = props.onMouseLeave,
|
|
32
|
+
onMouseUp = props.onMouseUp,
|
|
33
|
+
target = props.target,
|
|
34
|
+
testId = props.testId,
|
|
35
|
+
tooltip = props.tooltip,
|
|
36
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
38
|
+
icon: /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
|
|
39
|
+
label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
|
|
40
|
+
color: "var(--ds-icon, #292A2E)"
|
|
41
|
+
}),
|
|
42
|
+
component: component,
|
|
43
|
+
href: href,
|
|
44
|
+
id: id,
|
|
45
|
+
isDisabled: isDisabled,
|
|
46
|
+
isSelected: isSelected,
|
|
47
|
+
label: label,
|
|
48
|
+
onBlur: onBlur,
|
|
49
|
+
onClick: onClick,
|
|
50
|
+
onFocus: onFocus,
|
|
51
|
+
onMouseDown: onMouseDown,
|
|
52
|
+
onMouseEnter: onMouseEnter,
|
|
53
|
+
onMouseLeave: onMouseLeave,
|
|
54
|
+
onMouseUp: onMouseUp,
|
|
55
|
+
ref: ref,
|
|
56
|
+
target: target,
|
|
57
|
+
testId: testId,
|
|
58
|
+
tooltip: tooltip
|
|
59
|
+
// These are all explicit, leaving it in just in case
|
|
60
|
+
}, rest));
|
|
61
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* app-switcher.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.AppSwitcher = void 0;
|
|
10
|
+
require("./app-switcher.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/core/app-switcher"));
|
|
16
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
+
var _IconButton = require("../IconButton");
|
|
18
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
|
+
var iconSpacingStyles = {
|
|
21
|
+
space050: "_1rjc1b66 _18zr1b66"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* _App switcher__
|
|
26
|
+
*
|
|
27
|
+
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
|
|
28
|
+
* `renderAppSwitcher` prop.
|
|
29
|
+
*
|
|
30
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
31
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
32
|
+
*
|
|
33
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
34
|
+
*/
|
|
35
|
+
var AppSwitcher = exports.AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
36
|
+
var component = props.component,
|
|
37
|
+
href = props.href,
|
|
38
|
+
id = props.id,
|
|
39
|
+
isDisabled = props.isDisabled,
|
|
40
|
+
isSelected = props.isSelected,
|
|
41
|
+
label = props.label,
|
|
42
|
+
onBlur = props.onBlur,
|
|
43
|
+
onClick = props.onClick,
|
|
44
|
+
onFocus = props.onFocus,
|
|
45
|
+
onMouseDown = props.onMouseDown,
|
|
46
|
+
onMouseEnter = props.onMouseEnter,
|
|
47
|
+
onMouseLeave = props.onMouseLeave,
|
|
48
|
+
onMouseUp = props.onMouseUp,
|
|
49
|
+
target = props.target,
|
|
50
|
+
testId = props.testId,
|
|
51
|
+
tooltip = props.tooltip,
|
|
52
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
54
|
+
component: component,
|
|
55
|
+
href: href,
|
|
56
|
+
icon: /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
57
|
+
xcss: iconSpacingStyles.space050
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
|
|
59
|
+
color: "currentColor",
|
|
60
|
+
label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
|
|
61
|
+
})),
|
|
62
|
+
id: id,
|
|
63
|
+
isDisabled: isDisabled,
|
|
64
|
+
isSelected: isSelected,
|
|
65
|
+
label: label,
|
|
66
|
+
onBlur: onBlur,
|
|
67
|
+
onClick: onClick,
|
|
68
|
+
onFocus: onFocus,
|
|
69
|
+
onMouseDown: onMouseDown,
|
|
70
|
+
onMouseEnter: onMouseEnter,
|
|
71
|
+
onMouseLeave: onMouseLeave,
|
|
72
|
+
onMouseUp: onMouseUp,
|
|
73
|
+
ref: ref,
|
|
74
|
+
target: target,
|
|
75
|
+
testId: testId,
|
|
76
|
+
tooltip: tooltip
|
|
77
|
+
// These are all explicit, leaving it in just in case
|
|
78
|
+
}, rest));
|
|
79
|
+
});
|
|
@@ -1,127 +1,9 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
3
|
Object.defineProperty(exports, "__esModule", {
|
|
7
4
|
value: true
|
|
8
5
|
});
|
|
9
|
-
exports.default =
|
|
10
|
-
require("./index.compiled.css");
|
|
11
|
-
var _runtime = require("@compiled/react/runtime");
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/core/app-switcher"));
|
|
16
|
-
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
-
var _IconButton = require("../IconButton");
|
|
18
|
-
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"],
|
|
19
|
-
_excluded2 = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
20
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
21
|
-
var iconSpacingStyles = {
|
|
22
|
-
space050: "_1rjc1b66 _18zr1b66"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* _App switcher__
|
|
27
|
-
*
|
|
28
|
-
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
|
|
29
|
-
* `renderAppSwitcher` prop.
|
|
30
|
-
*
|
|
31
|
-
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
32
|
-
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
33
|
-
*/
|
|
34
|
-
var AppSwitcher = exports.AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
35
|
-
var component = props.component,
|
|
36
|
-
href = props.href,
|
|
37
|
-
id = props.id,
|
|
38
|
-
isDisabled = props.isDisabled,
|
|
39
|
-
isSelected = props.isSelected,
|
|
40
|
-
label = props.label,
|
|
41
|
-
onBlur = props.onBlur,
|
|
42
|
-
onClick = props.onClick,
|
|
43
|
-
onFocus = props.onFocus,
|
|
44
|
-
onMouseDown = props.onMouseDown,
|
|
45
|
-
onMouseEnter = props.onMouseEnter,
|
|
46
|
-
onMouseLeave = props.onMouseLeave,
|
|
47
|
-
onMouseUp = props.onMouseUp,
|
|
48
|
-
target = props.target,
|
|
49
|
-
testId = props.testId,
|
|
50
|
-
tooltip = props.tooltip,
|
|
51
|
-
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
52
|
-
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
53
|
-
component: component,
|
|
54
|
-
href: href,
|
|
55
|
-
icon: /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
|
|
56
|
-
xcss: iconSpacingStyles.space050
|
|
57
|
-
}, /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
|
|
58
|
-
color: "currentColor",
|
|
59
|
-
label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
|
|
60
|
-
})),
|
|
61
|
-
id: id,
|
|
62
|
-
isDisabled: isDisabled,
|
|
63
|
-
isSelected: isSelected,
|
|
64
|
-
label: label,
|
|
65
|
-
onBlur: onBlur,
|
|
66
|
-
onClick: onClick,
|
|
67
|
-
onFocus: onFocus,
|
|
68
|
-
onMouseDown: onMouseDown,
|
|
69
|
-
onMouseEnter: onMouseEnter,
|
|
70
|
-
onMouseLeave: onMouseLeave,
|
|
71
|
-
onMouseUp: onMouseUp,
|
|
72
|
-
ref: ref,
|
|
73
|
-
target: target,
|
|
74
|
-
testId: testId,
|
|
75
|
-
tooltip: tooltip
|
|
76
|
-
// These are all explicit, leaving it in just in case
|
|
77
|
-
}, rest));
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
81
|
-
var AppSwitcherNav4 = exports.AppSwitcherNav4 = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
82
|
-
var component = props.component,
|
|
83
|
-
href = props.href,
|
|
84
|
-
id = props.id,
|
|
85
|
-
isDisabled = props.isDisabled,
|
|
86
|
-
isSelected = props.isSelected,
|
|
87
|
-
label = props.label,
|
|
88
|
-
onBlur = props.onBlur,
|
|
89
|
-
onClick = props.onClick,
|
|
90
|
-
onFocus = props.onFocus,
|
|
91
|
-
onMouseDown = props.onMouseDown,
|
|
92
|
-
onMouseEnter = props.onMouseEnter,
|
|
93
|
-
onMouseLeave = props.onMouseLeave,
|
|
94
|
-
onMouseUp = props.onMouseUp,
|
|
95
|
-
target = props.target,
|
|
96
|
-
testId = props.testId,
|
|
97
|
-
tooltip = props.tooltip,
|
|
98
|
-
rest = (0, _objectWithoutProperties2.default)(props, _excluded2);
|
|
99
|
-
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
100
|
-
icon: /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
|
|
101
|
-
label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
|
|
102
|
-
color: "var(--ds-icon, #292A2E)"
|
|
103
|
-
}),
|
|
104
|
-
component: component,
|
|
105
|
-
href: href,
|
|
106
|
-
id: id,
|
|
107
|
-
isDisabled: isDisabled,
|
|
108
|
-
isSelected: isSelected,
|
|
109
|
-
label: label,
|
|
110
|
-
onBlur: onBlur,
|
|
111
|
-
onClick: onClick,
|
|
112
|
-
onFocus: onFocus,
|
|
113
|
-
onMouseDown: onMouseDown,
|
|
114
|
-
onMouseEnter: onMouseEnter,
|
|
115
|
-
onMouseLeave: onMouseLeave,
|
|
116
|
-
onMouseUp: onMouseUp,
|
|
117
|
-
ref: ref,
|
|
118
|
-
target: target,
|
|
119
|
-
testId: testId,
|
|
120
|
-
tooltip: tooltip
|
|
121
|
-
// These are all explicit, leaving it in just in case
|
|
122
|
-
}, rest));
|
|
123
|
-
});
|
|
124
|
-
|
|
6
|
+
exports.default = void 0;
|
|
125
7
|
// exists only to extract props
|
|
126
8
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
127
9
|
var _default = exports.default = function _default(_props) {};
|
|
@@ -9,6 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
12
|
+
var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
|
|
12
13
|
var _constants = require("../../common/constants");
|
|
13
14
|
var _theme = require("../../theme");
|
|
14
15
|
var _PrimaryItemsContainer = require("../PrimaryItemsContainer");
|
|
@@ -70,8 +71,13 @@ var analyticsData = {
|
|
|
70
71
|
*
|
|
71
72
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
|
|
72
73
|
* - [Code](https://atlassian.design/components/atlassian-navigation/examples)
|
|
74
|
+
*
|
|
75
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
73
76
|
*/
|
|
74
77
|
var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNavigation(props) {
|
|
78
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'CI') {
|
|
79
|
+
(0, _warnOnce.default)('@atlaskit/atlassian-navigation is deprecated. Use @atlaskit/navigation-system instead.');
|
|
80
|
+
}
|
|
75
81
|
var label = props.label,
|
|
76
82
|
_props$primaryItems = props.primaryItems,
|
|
77
83
|
primaryItems = _props$primaryItems === void 0 ? [] : _props$primaryItems,
|
|
@@ -68,6 +68,8 @@ var rightStyles = (0, _react2.css)({
|
|
|
68
68
|
*
|
|
69
69
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
70
70
|
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
71
|
+
*
|
|
72
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
71
73
|
*/
|
|
72
74
|
var NavigationSkeleton = exports.NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
73
75
|
var _ref$primaryItemsCoun = _ref.primaryItemsCount,
|
|
@@ -59,6 +59,8 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
|
59
59
|
*
|
|
60
60
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
61
61
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
62
|
+
*
|
|
63
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
62
64
|
*/
|
|
63
65
|
var Create = exports.Create = function Create(_ref2) {
|
|
64
66
|
var onClick = _ref2.onClick,
|
|
@@ -30,6 +30,8 @@ var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
|
|
|
30
30
|
*
|
|
31
31
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
32
32
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
33
|
+
*
|
|
34
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
33
35
|
*/
|
|
34
36
|
var Help = exports.Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
35
37
|
var badge = props.badge,
|
|
@@ -23,6 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
23
23
|
* pass into `AtlassianNavigation`'s render props, but where possible you should
|
|
24
24
|
* rely on the defaults.
|
|
25
25
|
*
|
|
26
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
26
27
|
*/
|
|
27
28
|
var IconButton = exports.IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
28
29
|
var icon = props.icon,
|
|
@@ -31,6 +31,8 @@ var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
|
31
31
|
*
|
|
32
32
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
|
|
33
33
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
34
|
+
*
|
|
35
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
34
36
|
*/
|
|
35
37
|
var Notifications = exports.Notifications = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
36
38
|
var badge = props.badge,
|
|
@@ -60,6 +60,8 @@ var buttonHighlightedStyles = (0, _react2.css)({
|
|
|
60
60
|
*
|
|
61
61
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#dropdown-menu)
|
|
62
62
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
63
|
+
*
|
|
64
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
63
65
|
*/
|
|
64
66
|
var PrimaryButton = exports.PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
65
67
|
var children = props.children,
|
|
@@ -29,6 +29,8 @@ var buttonNoOpStyle = (0, _react2.css)({
|
|
|
29
29
|
*
|
|
30
30
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
|
|
31
31
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
32
|
+
*
|
|
33
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
32
34
|
*/
|
|
33
35
|
var PrimaryDropdownButton = exports.PrimaryDropdownButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
34
36
|
var component = props.component,
|
|
@@ -12,7 +12,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
14
14
|
var _widthDetector = require("@atlaskit/width-detector");
|
|
15
|
-
var
|
|
15
|
+
var _overflowProvider = require("../../controllers/overflow/overflow-provider");
|
|
16
|
+
var _useOverflowController = require("../../controllers/overflow/use-overflow-controller");
|
|
16
17
|
var _PrimaryDropdownButton = require("../PrimaryDropdownButton");
|
|
17
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
19
|
/**
|
|
@@ -58,7 +59,7 @@ var PrimaryItemsContainer = exports.PrimaryItemsContainer = function PrimaryItem
|
|
|
58
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
60
|
isMoreOpen = _useState2[0],
|
|
60
61
|
setIsMoreOpen = _useState2[1];
|
|
61
|
-
var _useOverflowControlle = (0,
|
|
62
|
+
var _useOverflowControlle = (0, _useOverflowController.useOverflowController)(items),
|
|
62
63
|
updateWidth = _useOverflowControlle.updateWidth,
|
|
63
64
|
visibleItems = _useOverflowControlle.visibleItems,
|
|
64
65
|
overflowItems = _useOverflowControlle.overflowItems;
|
|
@@ -79,7 +80,7 @@ var PrimaryItemsContainer = exports.PrimaryItemsContainer = function PrimaryItem
|
|
|
79
80
|
}, triggerProps), moreLabel);
|
|
80
81
|
}, [moreLabel, onMoreClick, isMoreOpen, testId]);
|
|
81
82
|
var content = (0, _react.useCallback)(function () {
|
|
82
|
-
return (0, _react2.jsx)(
|
|
83
|
+
return (0, _react2.jsx)(_overflowProvider.OverflowProvider, {
|
|
83
84
|
isVisible: false,
|
|
84
85
|
openOverflowMenu: openOverflowMenu,
|
|
85
86
|
closeOverflowMenu: onMoreClose
|
|
@@ -95,7 +96,7 @@ var PrimaryItemsContainer = exports.PrimaryItemsContainer = function PrimaryItem
|
|
|
95
96
|
css: containerStyles,
|
|
96
97
|
"data-testid": testId && "".concat(testId, "-primary-actions"),
|
|
97
98
|
role: "list"
|
|
98
|
-
}, (0, _react2.jsx)(
|
|
99
|
+
}, (0, _react2.jsx)(_overflowProvider.OverflowProvider, {
|
|
99
100
|
isVisible: true,
|
|
100
101
|
openOverflowMenu: openOverflowMenu,
|
|
101
102
|
closeOverflowMenu: onMoreClose
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.AppHome = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _react2 = require("@emotion/react");
|
|
14
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
|
+
var _constants = require("../../common/constants");
|
|
16
|
+
var _theme = require("../../theme");
|
|
17
|
+
var _utils = require("../../utils");
|
|
18
|
+
var _utils2 = require("./utils");
|
|
19
|
+
var _excluded = ["aria-label", "href", "name", "icon", "onClick", "onMouseDown", "siteTitle", "testId"];
|
|
20
|
+
/**
|
|
21
|
+
* @jsxRuntime classic
|
|
22
|
+
* @jsx jsx
|
|
23
|
+
*/
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
|
+
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
27
|
+
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
28
|
+
var VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
29
|
+
var VAR_PRODUCT_HOME_COLOR_FOCUS = '--product-home-color-focus';
|
|
30
|
+
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS = '--product-home-bg-color-focus';
|
|
31
|
+
var VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
|
|
32
|
+
var VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
33
|
+
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
34
|
+
var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
35
|
+
var productHomeButtonStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
36
|
+
display: 'flex',
|
|
37
|
+
padding: "var(--ds-space-050, 4px)",
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
background: 'none',
|
|
40
|
+
border: 0,
|
|
41
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
42
|
+
color: 'inherit',
|
|
43
|
+
cursor: 'pointer',
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
45
|
+
'&::-moz-focus-inner': {
|
|
46
|
+
border: 0
|
|
47
|
+
},
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
49
|
+
'&:first-of-type': {
|
|
50
|
+
marginInlineStart: 0
|
|
51
|
+
},
|
|
52
|
+
'&:hover': {
|
|
53
|
+
backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, ")"),
|
|
54
|
+
boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, ")"),
|
|
55
|
+
color: "var(".concat(VAR_PRODUCT_HOME_COLOR_HOVER, ")")
|
|
56
|
+
},
|
|
57
|
+
'&:active': {
|
|
58
|
+
backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, ")"),
|
|
59
|
+
boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, ")"),
|
|
60
|
+
color: "var(".concat(VAR_PRODUCT_HOME_COLOR_ACTIVE, ")")
|
|
61
|
+
},
|
|
62
|
+
'&:focus-visible': {
|
|
63
|
+
backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, ")"),
|
|
64
|
+
color: "var(".concat(VAR_PRODUCT_HOME_COLOR_FOCUS, ")"),
|
|
65
|
+
outline: "var(--ds-border-width-focused, 2px)".concat(" solid ", "var(--ds-border-focused, #4688EC)")
|
|
66
|
+
},
|
|
67
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
68
|
+
'div&': {
|
|
69
|
+
pointerEvents: 'none'
|
|
70
|
+
}
|
|
71
|
+
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
72
|
+
margin: "0 ".concat("var(--ds-space-100, 8px)")
|
|
73
|
+
}), "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
74
|
+
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
75
|
+
}));
|
|
76
|
+
var appHomeIconStyles = (0, _react2.css)({
|
|
77
|
+
borderRadius: '10px'
|
|
78
|
+
});
|
|
79
|
+
var appIconStyles = (0, _react2.css)({
|
|
80
|
+
display: 'flex',
|
|
81
|
+
maxWidth: 24
|
|
82
|
+
});
|
|
83
|
+
var appLogoTextStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
84
|
+
// Logo text should never wrap or overflow
|
|
85
|
+
width: 'max-content',
|
|
86
|
+
paddingInlineEnd: "var(--ds-space-025, 2px)"
|
|
87
|
+
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
88
|
+
display: 'none'
|
|
89
|
+
}));
|
|
90
|
+
var siteTitleStyles = (0, _react2.css)({
|
|
91
|
+
display: 'flex',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
marginInlineEnd: "var(--ds-space-050, 4px)",
|
|
94
|
+
marginInlineStart: "var(--ds-space-050, 4px)",
|
|
95
|
+
paddingInlineEnd: "var(--ds-space-200, 16px)"
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* __App home__
|
|
100
|
+
*
|
|
101
|
+
* A variant of the ProductHome component designed for use with the updated app logos.
|
|
102
|
+
*
|
|
103
|
+
* Takes an icon, displayed at all viewport sizes, and a product name, which is
|
|
104
|
+
* displayed only at larger viewport sizes.
|
|
105
|
+
*
|
|
106
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-product-home)
|
|
107
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
108
|
+
*
|
|
109
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
110
|
+
*/
|
|
111
|
+
var AppHome = exports.AppHome = function AppHome(_ref) {
|
|
112
|
+
var ariaLabel = _ref['aria-label'],
|
|
113
|
+
href = _ref.href,
|
|
114
|
+
name = _ref.name,
|
|
115
|
+
Icon = _ref.icon,
|
|
116
|
+
onClick = _ref.onClick,
|
|
117
|
+
onMouseDown = _ref.onMouseDown,
|
|
118
|
+
siteTitle = _ref.siteTitle,
|
|
119
|
+
testId = _ref.testId,
|
|
120
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
121
|
+
var theme = (0, _theme.useTheme)();
|
|
122
|
+
var primaryButton = theme.mode.primaryButton;
|
|
123
|
+
// After the brand refresh, iconColor and textColor should be set to 'undefined' to allow the original
|
|
124
|
+
// multi-color logo tile colors to be visible, rather than a hardcoded blue.
|
|
125
|
+
var _theme$mode$productHo = theme.mode.productHome,
|
|
126
|
+
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
127
|
+
iconColor = _theme$mode$productHo2 === void 0 ? undefined : _theme$mode$productHo2,
|
|
128
|
+
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
129
|
+
textColor = _theme$mode$productHo3 === void 0 ? undefined : _theme$mode$productHo3;
|
|
130
|
+
|
|
131
|
+
// The default theme is set at module scope and immediately used in context.
|
|
132
|
+
// To allow the feature flag to switch the logo color at runtime, we also detect the original hardcoded
|
|
133
|
+
// values and override them to undefined.
|
|
134
|
+
if (iconColor === '#357DE8' && textColor === "var(--ds-text, #292A2E)") {
|
|
135
|
+
iconColor = undefined;
|
|
136
|
+
textColor = undefined;
|
|
137
|
+
}
|
|
138
|
+
var Tag = (0, _utils2.getTag)(onClick, href);
|
|
139
|
+
var preventFocusRing = function preventFocusRing(e) {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
onMouseDown && onMouseDown(e);
|
|
142
|
+
};
|
|
143
|
+
var productHomeButtonDynamicStyles = (0, _utils.stripEmptyProperties)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow));
|
|
144
|
+
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(Tag
|
|
145
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
146
|
+
, (0, _extends2.default)({
|
|
147
|
+
style: productHomeButtonDynamicStyles,
|
|
148
|
+
css: [productHomeButtonStyles, appHomeIconStyles],
|
|
149
|
+
href: href,
|
|
150
|
+
onClick: onClick,
|
|
151
|
+
onMouseDown: preventFocusRing,
|
|
152
|
+
"data-testid": testId && "".concat(testId, "-container"),
|
|
153
|
+
"aria-label": ariaLabel
|
|
154
|
+
// Made all props explicit, leaving just in case
|
|
155
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
156
|
+
}, rest), (0, _react2.jsx)(_compiled.Inline, {
|
|
157
|
+
space: "space.075",
|
|
158
|
+
alignBlock: "center"
|
|
159
|
+
}, (0, _react2.jsx)("div", {
|
|
160
|
+
css: [appIconStyles],
|
|
161
|
+
"data-testid": testId && "".concat(testId, "-icon")
|
|
162
|
+
}, (0, _react2.jsx)(Icon, {
|
|
163
|
+
iconColor: iconColor,
|
|
164
|
+
shouldUseNewLogoDesign: true,
|
|
165
|
+
size: "small",
|
|
166
|
+
appearance: "brand"
|
|
167
|
+
})), (0, _react2.jsx)("span", {
|
|
168
|
+
css: appLogoTextStyles
|
|
169
|
+
}, (0, _react2.jsx)(_compiled.Text, {
|
|
170
|
+
"aria-hidden": true,
|
|
171
|
+
color: "inherit",
|
|
172
|
+
weight: "semibold"
|
|
173
|
+
}, name)))), siteTitle && (0, _react2.jsx)("div", {
|
|
174
|
+
style: {
|
|
175
|
+
borderRight: theme.mode.productHome.borderRight
|
|
176
|
+
},
|
|
177
|
+
css: siteTitleStyles,
|
|
178
|
+
"data-testid": testId && "".concat(testId, "-site-title")
|
|
179
|
+
}, siteTitle));
|
|
180
|
+
};
|
|
@@ -103,6 +103,8 @@ var siteTitleStyles = (0, _react2.css)({
|
|
|
103
103
|
*
|
|
104
104
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#custom-product-home)
|
|
105
105
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
106
|
+
*
|
|
107
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
106
108
|
*/
|
|
107
109
|
var CustomProductHome = function CustomProductHome(props) {
|
|
108
110
|
var href = props.href,
|