@atlaskit/atlassian-navigation 5.7.0 → 5.7.2
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 +16 -0
- package/dist/cjs/common/action-section-desktop-css.js +12 -0
- package/dist/cjs/common/action-section-mobile-css.js +12 -0
- package/dist/cjs/common/styles.js +13 -9
- package/dist/cjs/nav4-skeleton-notification-button.js +24 -0
- package/dist/cjs/nav4-skeleton-settings-button.js +23 -0
- package/dist/cjs/nav4-skeleton-switcher-button.js +24 -0
- package/dist/cjs/skeleton-notification-button.js +8 -16
- package/dist/cjs/skeleton-settings-button.js +8 -15
- package/dist/cjs/skeleton-switcher-button.js +8 -17
- package/dist/cjs/theme/atlassian-theme.js +13 -0
- package/dist/cjs/theme/get-box-shadow.js +9 -0
- package/dist/cjs/theme/theme-context.js +10 -0
- package/dist/cjs/theme/theme-generator.js +7 -6
- package/dist/cjs/theme/theme-helpers.js +10 -5
- package/dist/cjs/theme/theme-provider.js +9 -8
- package/dist/cjs/theme/themes.js +8 -8
- package/dist/cjs/theme/use-theme.js +2 -2
- package/dist/es2019/common/action-section-desktop-css.js +6 -0
- package/dist/es2019/common/action-section-mobile-css.js +6 -0
- package/dist/es2019/common/styles.js +2 -11
- package/dist/es2019/nav4-skeleton-notification-button.js +15 -0
- package/dist/es2019/nav4-skeleton-settings-button.js +14 -0
- package/dist/es2019/nav4-skeleton-switcher-button.js +15 -0
- package/dist/es2019/skeleton-notification-button.js +1 -13
- package/dist/es2019/skeleton-settings-button.js +1 -12
- package/dist/es2019/skeleton-switcher-button.js +1 -14
- package/dist/es2019/theme/atlassian-theme.js +7 -0
- package/dist/es2019/theme/get-box-shadow.js +1 -0
- package/dist/es2019/theme/theme-context.js +4 -0
- package/dist/es2019/theme/theme-generator.js +2 -1
- package/dist/es2019/theme/theme-helpers.js +3 -5
- package/dist/es2019/theme/theme-provider.js +3 -7
- package/dist/es2019/theme/themes.js +3 -8
- package/dist/es2019/theme/use-theme.js +1 -1
- package/dist/esm/common/action-section-desktop-css.js +5 -0
- package/dist/esm/common/action-section-mobile-css.js +5 -0
- package/dist/esm/common/styles.js +2 -8
- package/dist/esm/nav4-skeleton-notification-button.js +17 -0
- package/dist/esm/nav4-skeleton-settings-button.js +16 -0
- package/dist/esm/nav4-skeleton-switcher-button.js +17 -0
- package/dist/esm/skeleton-notification-button.js +1 -15
- package/dist/esm/skeleton-settings-button.js +1 -14
- package/dist/esm/skeleton-switcher-button.js +1 -16
- package/dist/esm/theme/atlassian-theme.js +7 -0
- package/dist/esm/theme/get-box-shadow.js +3 -0
- package/dist/esm/theme/theme-context.js +4 -0
- package/dist/esm/theme/theme-generator.js +2 -1
- package/dist/esm/theme/theme-helpers.js +3 -5
- package/dist/esm/theme/theme-provider.js +3 -7
- package/dist/esm/theme/themes.js +3 -8
- package/dist/esm/theme/use-theme.js +1 -1
- package/dist/types/common/action-section-desktop-css.d.ts +5 -0
- package/dist/types/common/action-section-mobile-css.d.ts +5 -0
- package/dist/types/common/styles.d.ts +2 -10
- package/dist/types/nav4-skeleton-notification-button.d.ts +9 -0
- package/dist/types/nav4-skeleton-settings-button.d.ts +8 -0
- package/dist/types/nav4-skeleton-switcher-button.d.ts +8 -0
- package/dist/types/skeleton-notification-button.d.ts +1 -7
- package/dist/types/skeleton-settings-button.d.ts +1 -6
- package/dist/types/skeleton-switcher-button.d.ts +1 -6
- package/dist/types/theme/atlassian-theme.d.ts +2 -0
- package/dist/types/theme/get-box-shadow.d.ts +1 -0
- package/dist/types/theme/theme-context.d.ts +3 -0
- package/dist/types/theme/theme-helpers.d.ts +1 -1
- package/dist/types/theme/theme-provider.d.ts +2 -2
- package/dist/types/theme/themes.d.ts +1 -1
- package/dist/types-ts4.5/common/action-section-desktop-css.d.ts +5 -0
- package/dist/types-ts4.5/common/action-section-mobile-css.d.ts +5 -0
- package/dist/types-ts4.5/common/styles.d.ts +2 -10
- package/dist/types-ts4.5/nav4-skeleton-notification-button.d.ts +9 -0
- package/dist/types-ts4.5/nav4-skeleton-settings-button.d.ts +8 -0
- package/dist/types-ts4.5/nav4-skeleton-switcher-button.d.ts +8 -0
- package/dist/types-ts4.5/skeleton-notification-button.d.ts +1 -7
- package/dist/types-ts4.5/skeleton-settings-button.d.ts +1 -6
- package/dist/types-ts4.5/skeleton-switcher-button.d.ts +1 -6
- package/dist/types-ts4.5/theme/atlassian-theme.d.ts +2 -0
- package/dist/types-ts4.5/theme/get-box-shadow.d.ts +1 -0
- package/dist/types-ts4.5/theme/theme-context.d.ts +3 -0
- package/dist/types-ts4.5/theme/theme-helpers.d.ts +1 -1
- package/dist/types-ts4.5/theme/theme-provider.d.ts +2 -2
- package/dist/types-ts4.5/theme/themes.d.ts +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 5.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`76faad1c8c7b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76faad1c8c7b5) -
|
|
14
|
+
Removed `react-intl-next` alias and replaced all usages with `react-intl` directly.
|
|
15
|
+
|
|
16
|
+
What changed: The `react-intl-next` devDependency alias (which resolved to `react-intl@^5`) has
|
|
17
|
+
been renamed to `react-intl`. This is a development-only change with no impact on consumers.
|
|
18
|
+
|
|
3
19
|
## 5.7.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -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.actionSectionDesktopCSS = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _constants = require("./constants");
|
|
10
|
+
var actionSectionDesktopCSS = exports.actionSectionDesktopCSS = (0, _defineProperty2.default)({}, "@media (max-width: ".concat(_constants.CREATE_BREAKPOINT - 1, "px)"), {
|
|
11
|
+
display: 'none !important'
|
|
12
|
+
});
|
|
@@ -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.actionSectionMobileCSS = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _constants = require("./constants");
|
|
10
|
+
var actionSectionMobileCSS = exports.actionSectionMobileCSS = (0, _defineProperty2.default)({}, "@media (min-width: ".concat(_constants.CREATE_BREAKPOINT, "px)"), {
|
|
11
|
+
display: 'none !important'
|
|
12
|
+
});
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
Object.defineProperty(exports, "actionSectionDesktopCSS", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _actionSectionDesktopCss.actionSectionDesktopCSS;
|
|
10
|
+
}
|
|
12
11
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Object.defineProperty(exports, "actionSectionMobileCSS", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _actionSectionMobileCss.actionSectionMobileCSS;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _actionSectionDesktopCss = require("./action-section-desktop-css");
|
|
19
|
+
var _actionSectionMobileCss = require("./action-section-mobile-css");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Nav4SkeletonNotificationButton = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _notification = _interopRequireDefault(require("@atlaskit/icon/core/notification"));
|
|
10
|
+
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
11
|
+
/**
|
|
12
|
+
* __Nav 4 skeleton notification button__
|
|
13
|
+
*
|
|
14
|
+
* A nav 4 skeleton notification button.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
var Nav4SkeletonNotificationButton = exports.Nav4SkeletonNotificationButton = function Nav4SkeletonNotificationButton(_ref) {
|
|
18
|
+
var _ref$label = _ref.label,
|
|
19
|
+
label = _ref$label === void 0 ? '' : _ref$label;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_SkeletonIconButton.SkeletonIconButton, null, /*#__PURE__*/_react.default.createElement(_notification.default, {
|
|
21
|
+
label: label,
|
|
22
|
+
color: "var(--ds-icon, #292A2E)"
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Nav4SkeletonSettingsButton = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _settings = _interopRequireDefault(require("@atlaskit/icon/core/settings"));
|
|
10
|
+
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
11
|
+
/**
|
|
12
|
+
* __Nav 4 skeleton settings button__
|
|
13
|
+
*
|
|
14
|
+
* A nav 4 skeleton settings button
|
|
15
|
+
*/
|
|
16
|
+
var Nav4SkeletonSettingsButton = exports.Nav4SkeletonSettingsButton = function Nav4SkeletonSettingsButton(_ref) {
|
|
17
|
+
var _ref$label = _ref.label,
|
|
18
|
+
label = _ref$label === void 0 ? '' : _ref$label;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_SkeletonIconButton.SkeletonIconButton, null, /*#__PURE__*/_react.default.createElement(_settings.default, {
|
|
20
|
+
label: label,
|
|
21
|
+
color: "var(--ds-icon, #292A2E)"
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Nav4SkeletonSwitcherButton = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/core/app-switcher"));
|
|
10
|
+
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
11
|
+
/**
|
|
12
|
+
* __Nav 4 skeleton switcher button__
|
|
13
|
+
*
|
|
14
|
+
* A nav 4 skeleton switcher button
|
|
15
|
+
*/
|
|
16
|
+
var Nav4SkeletonSwitcherButton = exports.Nav4SkeletonSwitcherButton = function Nav4SkeletonSwitcherButton(_ref) {
|
|
17
|
+
var _ref$label = _ref.label,
|
|
18
|
+
label = _ref$label === void 0 ? '' : _ref$label;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_SkeletonIconButton.SkeletonIconButton, null, /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
|
|
20
|
+
label: label,
|
|
21
|
+
spacing: "spacious",
|
|
22
|
+
color: "var(--ds-icon, #292A2E)"
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
@@ -5,13 +5,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
Object.defineProperty(exports, "Nav4SkeletonNotificationButton", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _nav4SkeletonNotificationButton.Nav4SkeletonNotificationButton;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports.SkeletonNotificationButton = void 0;
|
|
9
15
|
require("./skeleton-notification-button.compiled.css");
|
|
10
16
|
var _runtime = require("@compiled/react/runtime");
|
|
11
17
|
var _react = _interopRequireDefault(require("react"));
|
|
12
18
|
var _notification = _interopRequireDefault(require("@atlaskit/icon/core/notification"));
|
|
13
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
20
|
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
21
|
+
var _nav4SkeletonNotificationButton = require("./nav4-skeleton-notification-button");
|
|
15
22
|
var iconSpacingStyles = {
|
|
16
23
|
space050: "_1rjc1b66 _18zr1b66"
|
|
17
24
|
};
|
|
@@ -34,19 +41,4 @@ var SkeletonNotificationButton = exports.SkeletonNotificationButton = function S
|
|
|
34
41
|
color: "currentColor",
|
|
35
42
|
label: label
|
|
36
43
|
})));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* __Nav 4 skeleton notification button__
|
|
41
|
-
*
|
|
42
|
-
* A nav 4 skeleton notification button.
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
var Nav4SkeletonNotificationButton = exports.Nav4SkeletonNotificationButton = function Nav4SkeletonNotificationButton(_ref2) {
|
|
46
|
-
var _ref2$label = _ref2.label,
|
|
47
|
-
label = _ref2$label === void 0 ? '' : _ref2$label;
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(_SkeletonIconButton.SkeletonIconButton, null, /*#__PURE__*/_react.default.createElement(_notification.default, {
|
|
49
|
-
label: label,
|
|
50
|
-
color: "var(--ds-icon, #292A2E)"
|
|
51
|
-
}));
|
|
52
44
|
};
|
|
@@ -5,13 +5,20 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
Object.defineProperty(exports, "Nav4SkeletonSettingsButton", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _nav4SkeletonSettingsButton.Nav4SkeletonSettingsButton;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports.SkeletonSettingsButton = void 0;
|
|
9
15
|
require("./skeleton-settings-button.compiled.css");
|
|
10
16
|
var _runtime = require("@compiled/react/runtime");
|
|
11
17
|
var _react = _interopRequireDefault(require("react"));
|
|
12
18
|
var _settings = _interopRequireDefault(require("@atlaskit/icon/core/settings"));
|
|
13
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
20
|
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
21
|
+
var _nav4SkeletonSettingsButton = require("./nav4-skeleton-settings-button");
|
|
15
22
|
var iconSpacingStyles = {
|
|
16
23
|
space050: "_1rjc1b66 _18zr1b66"
|
|
17
24
|
};
|
|
@@ -34,18 +41,4 @@ var SkeletonSettingsButton = exports.SkeletonSettingsButton = function SkeletonS
|
|
|
34
41
|
color: "currentColor",
|
|
35
42
|
label: label
|
|
36
43
|
})));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* __Nav 4 skeleton settings button__
|
|
41
|
-
*
|
|
42
|
-
* A nav 4 skeleton settings button
|
|
43
|
-
*/
|
|
44
|
-
var Nav4SkeletonSettingsButton = exports.Nav4SkeletonSettingsButton = function Nav4SkeletonSettingsButton(_ref2) {
|
|
45
|
-
var _ref2$label = _ref2.label,
|
|
46
|
-
label = _ref2$label === void 0 ? '' : _ref2$label;
|
|
47
|
-
return /*#__PURE__*/_react.default.createElement(_SkeletonIconButton.SkeletonIconButton, null, /*#__PURE__*/_react.default.createElement(_settings.default, {
|
|
48
|
-
label: label,
|
|
49
|
-
color: "var(--ds-icon, #292A2E)"
|
|
50
|
-
}));
|
|
51
44
|
};
|
|
@@ -4,12 +4,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, "Nav4SkeletonSwitcherButton", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _nav4SkeletonSwitcherButton.Nav4SkeletonSwitcherButton;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
exports.SkeletonSwitcherButton = void 0;
|
|
8
14
|
var _react = _interopRequireDefault(require("react"));
|
|
9
15
|
var _react2 = require("@emotion/react");
|
|
10
16
|
var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/core/app-switcher"));
|
|
11
|
-
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
12
17
|
var _theme = require("./theme");
|
|
18
|
+
var _nav4SkeletonSwitcherButton = require("./nav4-skeleton-switcher-button");
|
|
13
19
|
/**
|
|
14
20
|
* @jsxRuntime classic
|
|
15
21
|
* @jsx jsx
|
|
@@ -76,19 +82,4 @@ var SkeletonSwitcherButton = exports.SkeletonSwitcherButton = function SkeletonS
|
|
|
76
82
|
spacing: "spacious",
|
|
77
83
|
label: label
|
|
78
84
|
}));
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* __Nav 4 skeleton switcher button__
|
|
83
|
-
*
|
|
84
|
-
* A nav 4 skeleton switcher button
|
|
85
|
-
*/
|
|
86
|
-
var Nav4SkeletonSwitcherButton = exports.Nav4SkeletonSwitcherButton = function Nav4SkeletonSwitcherButton(_ref2) {
|
|
87
|
-
var _ref2$label = _ref2.label,
|
|
88
|
-
label = _ref2$label === void 0 ? '' : _ref2$label;
|
|
89
|
-
return (0, _react2.jsx)(_SkeletonIconButton.SkeletonIconButton, null, (0, _react2.jsx)(_appSwitcher.default, {
|
|
90
|
-
label: label,
|
|
91
|
-
spacing: "spacious",
|
|
92
|
-
color: "var(--ds-icon, #292A2E)"
|
|
93
|
-
}));
|
|
94
85
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.atlassianTheme = void 0;
|
|
7
|
+
var _defaultTheme = require("./default-theme");
|
|
8
|
+
var _themeGenerator = require("./theme-generator");
|
|
9
|
+
var atlassianTheme = exports.atlassianTheme = (0, _themeGenerator.generateTheme)({
|
|
10
|
+
name: _defaultTheme.DEFAULT_THEME_NAME,
|
|
11
|
+
backgroundColor: '#FFFFFF',
|
|
12
|
+
highlightColor: '#0052CC'
|
|
13
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ThemeContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _themes = require("./themes");
|
|
9
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
10
|
+
var ThemeContext = exports.ThemeContext = /*#__PURE__*/(0, _react.createContext)(_themes.defaultTheme);
|
|
@@ -7,6 +7,7 @@ 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 _getBoxShadow = require("./get-box-shadow");
|
|
10
11
|
var _themeHelpers = require("./theme-helpers");
|
|
11
12
|
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; }
|
|
12
13
|
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; }
|
|
@@ -27,12 +28,12 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
|
|
|
27
28
|
return {
|
|
28
29
|
active: {
|
|
29
30
|
backgroundColor: isCreateButton ? (0, _themeHelpers.hexToRGBA)(backgroundColor, 0.65) : (0, _themeHelpers.getContrastColor)(0.3, opacityValue, backgroundColor),
|
|
30
|
-
boxShadow: (0,
|
|
31
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent'),
|
|
31
32
|
color: color
|
|
32
33
|
},
|
|
33
34
|
default: {
|
|
34
35
|
backgroundColor: backgroundColor,
|
|
35
|
-
boxShadow: (0,
|
|
36
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent'),
|
|
36
37
|
color: color
|
|
37
38
|
},
|
|
38
39
|
focus: {
|
|
@@ -42,20 +43,20 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
|
|
|
42
43
|
},
|
|
43
44
|
hover: {
|
|
44
45
|
backgroundColor: isCreateButton ? (0, _themeHelpers.hexToRGBA)(backgroundColor, 0.8) : (0, _themeHelpers.getContrastColor)(0.1, opacityValue, backgroundColor),
|
|
45
|
-
boxShadow: (0,
|
|
46
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent'),
|
|
46
47
|
color: color
|
|
47
48
|
},
|
|
48
49
|
selected: {
|
|
49
50
|
color: color,
|
|
50
51
|
backgroundColor: (0, _themeHelpers.getContrastColor)(0.3, opacityValue, backgroundColor),
|
|
51
52
|
borderColor: highlightColor,
|
|
52
|
-
boxShadow: (0,
|
|
53
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent')
|
|
53
54
|
},
|
|
54
55
|
selectedHover: {
|
|
55
56
|
color: color,
|
|
56
57
|
backgroundColor: (0, _themeHelpers.getContrastColor)(0.3, opacityValue, backgroundColor),
|
|
57
58
|
borderColor: highlightColor,
|
|
58
|
-
boxShadow: (0,
|
|
59
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)('transparent')
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
};
|
|
@@ -101,7 +102,7 @@ var generateTheme = exports.generateTheme = function generateTheme(themeColors)
|
|
|
101
102
|
},
|
|
102
103
|
focus: {
|
|
103
104
|
borderColor: (0, _themeHelpers.hexToRGBA)(highlightColor, 0.8),
|
|
104
|
-
boxShadow: (0,
|
|
105
|
+
boxShadow: (0, _getBoxShadow.getBoxShadow)((0, _themeHelpers.hexToRGBA)(highlightColor, 0.5))
|
|
105
106
|
},
|
|
106
107
|
hover: {
|
|
107
108
|
backgroundColor: (0, _themeHelpers.getContrastColor)(0.1, generateOpacityValue(color), backgroundColor),
|
|
@@ -4,22 +4,27 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.generateTextColor = exports.convertHexShorthand = void 0;
|
|
8
|
+
Object.defineProperty(exports, "getBoxShadow", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _getBoxShadow.getBoxShadow;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports.hexToRGBA = exports.getContrastColor = void 0;
|
|
8
15
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
17
|
var _chromatism = _interopRequireDefault(require("chromatism"));
|
|
18
|
+
var _getBoxShadow = require("./get-box-shadow");
|
|
11
19
|
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; }
|
|
12
20
|
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; }
|
|
13
21
|
var hexToRGBA = exports.hexToRGBA = function hexToRGBA(hex) {
|
|
14
22
|
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
15
|
-
var rgba = _objectSpread(_objectSpread({}, _chromatism.default.convert(hex).rgb), {
|
|
23
|
+
var rgba = _objectSpread(_objectSpread({}, _chromatism.default.convert(hex).rgb), {}, {
|
|
16
24
|
a: opacity
|
|
17
25
|
});
|
|
18
26
|
return "rgba(".concat(Object.values(rgba).join(', '), ")");
|
|
19
27
|
};
|
|
20
|
-
var getBoxShadow = exports.getBoxShadow = function getBoxShadow(color) {
|
|
21
|
-
return "0 0 0 2px ".concat(color);
|
|
22
|
-
};
|
|
23
28
|
var hex = '[a-z0-9]';
|
|
24
29
|
var shortHandHexColorPattern = new RegExp("#(".concat(hex, ")(").concat(hex, ")(").concat(hex, ")"), 'i');
|
|
25
30
|
var repeat = function repeat(str, times) {
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
Object.defineProperty(exports, "ThemeContext", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _themeContext.ThemeContext;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.ThemeProvider = void 0;
|
|
13
|
+
var _themeContext = require("./theme-context");
|
|
13
14
|
/**
|
|
14
15
|
* __Theme provider__
|
|
15
16
|
*
|
|
16
17
|
* A provider for the theme context used by all navigation components.
|
|
17
18
|
*/
|
|
18
|
-
var ThemeProvider = exports.ThemeProvider = ThemeContext.Provider;
|
|
19
|
+
var ThemeProvider = exports.ThemeProvider = _themeContext.ThemeContext.Provider;
|
package/dist/cjs/theme/themes.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
backgroundColor: '#FFFFFF',
|
|
12
|
-
highlightColor: '#0052CC'
|
|
6
|
+
Object.defineProperty(exports, "atlassianTheme", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _atlassianTheme.atlassianTheme;
|
|
10
|
+
}
|
|
13
11
|
});
|
|
14
|
-
|
|
12
|
+
exports.defaultTheme = void 0;
|
|
13
|
+
var _atlassianTheme = require("./atlassian-theme");
|
|
14
|
+
var defaultTheme = exports.defaultTheme = _atlassianTheme.atlassianTheme;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useTheme = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _themeContext = require("./theme-context");
|
|
9
9
|
var useTheme = exports.useTheme = function useTheme() {
|
|
10
|
-
return (0, _react.useContext)(
|
|
10
|
+
return (0, _react.useContext)(_themeContext.ThemeContext);
|
|
11
11
|
};
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
[`@media (max-width: ${CREATE_BREAKPOINT - 1}px)`]: {
|
|
4
|
-
display: 'none !important'
|
|
5
|
-
}
|
|
6
|
-
};
|
|
7
|
-
export const actionSectionMobileCSS = {
|
|
8
|
-
[`@media (min-width: ${CREATE_BREAKPOINT}px)`]: {
|
|
9
|
-
display: 'none !important'
|
|
10
|
-
}
|
|
11
|
-
};
|
|
1
|
+
export { actionSectionDesktopCSS } from './action-section-desktop-css';
|
|
2
|
+
export { actionSectionMobileCSS } from './action-section-mobile-css';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import NotificationIcon from '@atlaskit/icon/core/notification';
|
|
3
|
+
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
|
+
/**
|
|
5
|
+
* __Nav 4 skeleton notification button__
|
|
6
|
+
*
|
|
7
|
+
* A nav 4 skeleton notification button.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export const Nav4SkeletonNotificationButton = ({
|
|
11
|
+
label = ''
|
|
12
|
+
}) => /*#__PURE__*/React.createElement(SkeletonIconButton, null, /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
13
|
+
label: label,
|
|
14
|
+
color: "var(--ds-icon, #292A2E)"
|
|
15
|
+
}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SettingsIcon from '@atlaskit/icon/core/settings';
|
|
3
|
+
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
|
+
/**
|
|
5
|
+
* __Nav 4 skeleton settings button__
|
|
6
|
+
*
|
|
7
|
+
* A nav 4 skeleton settings button
|
|
8
|
+
*/
|
|
9
|
+
export const Nav4SkeletonSettingsButton = ({
|
|
10
|
+
label = ''
|
|
11
|
+
}) => /*#__PURE__*/React.createElement(SkeletonIconButton, null, /*#__PURE__*/React.createElement(SettingsIcon, {
|
|
12
|
+
label: label,
|
|
13
|
+
color: "var(--ds-icon, #292A2E)"
|
|
14
|
+
}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
|
|
3
|
+
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
|
+
/**
|
|
5
|
+
* __Nav 4 skeleton switcher button__
|
|
6
|
+
*
|
|
7
|
+
* A nav 4 skeleton switcher button
|
|
8
|
+
*/
|
|
9
|
+
export const Nav4SkeletonSwitcherButton = ({
|
|
10
|
+
label = ''
|
|
11
|
+
}) => /*#__PURE__*/React.createElement(SkeletonIconButton, null, /*#__PURE__*/React.createElement(AppSwitcherIcon, {
|
|
12
|
+
label: label,
|
|
13
|
+
spacing: "spacious",
|
|
14
|
+
color: "var(--ds-icon, #292A2E)"
|
|
15
|
+
}));
|
|
@@ -26,16 +26,4 @@ export const SkeletonNotificationButton = ({
|
|
|
26
26
|
color: "currentColor",
|
|
27
27
|
label: label
|
|
28
28
|
})));
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* __Nav 4 skeleton notification button__
|
|
32
|
-
*
|
|
33
|
-
* A nav 4 skeleton notification button.
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
export const Nav4SkeletonNotificationButton = ({
|
|
37
|
-
label = ''
|
|
38
|
-
}) => /*#__PURE__*/React.createElement(SkeletonIconButton, null, /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
39
|
-
label: label,
|
|
40
|
-
color: "var(--ds-icon, #292A2E)"
|
|
41
|
-
}));
|
|
29
|
+
export { Nav4SkeletonNotificationButton } from './nav4-skeleton-notification-button';
|
|
@@ -26,15 +26,4 @@ export const SkeletonSettingsButton = ({
|
|
|
26
26
|
color: "currentColor",
|
|
27
27
|
label: label
|
|
28
28
|
})));
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* __Nav 4 skeleton settings button__
|
|
32
|
-
*
|
|
33
|
-
* A nav 4 skeleton settings button
|
|
34
|
-
*/
|
|
35
|
-
export const Nav4SkeletonSettingsButton = ({
|
|
36
|
-
label = ''
|
|
37
|
-
}) => /*#__PURE__*/React.createElement(SkeletonIconButton, null, /*#__PURE__*/React.createElement(SettingsIcon, {
|
|
38
|
-
label: label,
|
|
39
|
-
color: "var(--ds-icon, #292A2E)"
|
|
40
|
-
}));
|
|
29
|
+
export { Nav4SkeletonSettingsButton } from './nav4-skeleton-settings-button';
|
|
@@ -7,7 +7,6 @@ import React from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
|
|
10
|
-
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
11
10
|
import { useTheme } from './theme';
|
|
12
11
|
const skeletonSwitcherButtonStyles = css({
|
|
13
12
|
margin: 0,
|
|
@@ -69,16 +68,4 @@ export const SkeletonSwitcherButton = ({
|
|
|
69
68
|
label: label
|
|
70
69
|
}));
|
|
71
70
|
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* __Nav 4 skeleton switcher button__
|
|
75
|
-
*
|
|
76
|
-
* A nav 4 skeleton switcher button
|
|
77
|
-
*/
|
|
78
|
-
export const Nav4SkeletonSwitcherButton = ({
|
|
79
|
-
label = ''
|
|
80
|
-
}) => jsx(SkeletonIconButton, null, jsx(AppSwitcherIcon, {
|
|
81
|
-
label: label,
|
|
82
|
-
spacing: "spacious",
|
|
83
|
-
color: "var(--ds-icon, #292A2E)"
|
|
84
|
-
}));
|
|
71
|
+
export { Nav4SkeletonSwitcherButton } from './nav4-skeleton-switcher-button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getBoxShadow = color => `0 0 0 2px ${color}`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_THEME_NAME, defaultThemeBrandRefresh } from './default-theme';
|
|
2
|
-
import {
|
|
2
|
+
import { getBoxShadow } from './get-box-shadow';
|
|
3
|
+
import { generateTextColor, getContrastColor, hexToRGBA } from './theme-helpers';
|
|
3
4
|
const generateOpacityValue = color => color === '#000000' ? 0.3 : 0.6;
|
|
4
5
|
|
|
5
6
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|