@atlaskit/atlassian-navigation 2.3.4 → 2.3.5
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/dist/cjs/common/constants.js +0 -2
- package/dist/cjs/common/styles.js +0 -4
- package/dist/cjs/components/AppSwitcher/index.js +4 -16
- package/dist/cjs/components/AtlassianNavigation/index.js +23 -28
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +15 -24
- package/dist/cjs/components/BadgeContainer/index.js +6 -7
- package/dist/cjs/components/Create/index.js +12 -24
- package/dist/cjs/components/Create/skeleton.js +4 -11
- package/dist/cjs/components/Create/styles.js +2 -9
- package/dist/cjs/components/Help/index.js +4 -20
- package/dist/cjs/components/IconButton/index.js +5 -20
- package/dist/cjs/components/IconButton/skeleton.js +6 -16
- package/dist/cjs/components/IconButton/styles.js +2 -9
- package/dist/cjs/components/Notifications/index.js +3 -15
- package/dist/cjs/components/PrimaryButton/index.js +8 -22
- package/dist/cjs/components/PrimaryButton/skeleton.js +4 -7
- package/dist/cjs/components/PrimaryButton/styles.js +2 -9
- package/dist/cjs/components/PrimaryDropdownButton/index.js +2 -8
- package/dist/cjs/components/PrimaryItemsContainer/index.js +16 -28
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +4 -8
- package/dist/cjs/components/ProductHome/custom-product-home.js +14 -30
- package/dist/cjs/components/ProductHome/index.js +0 -3
- package/dist/cjs/components/ProductHome/product-home.js +20 -36
- package/dist/cjs/components/ProductHome/skeleton.js +3 -12
- package/dist/cjs/components/ProductHome/utils.js +0 -4
- package/dist/cjs/components/Profile/index.js +3 -6
- package/dist/cjs/components/Profile/skeleton.js +0 -6
- package/dist/cjs/components/Search/index.js +12 -29
- package/dist/cjs/components/Search/skeleton.js +4 -11
- package/dist/cjs/components/Settings/index.js +1 -12
- package/dist/cjs/components/SignIn/index.js +3 -12
- package/dist/cjs/components/SignIn/skeleton.js +0 -6
- package/dist/cjs/components/SkeletonCreateButton/index.js +3 -6
- package/dist/cjs/components/SkeletonIconButton/index.js +3 -6
- package/dist/cjs/components/SkeletonPrimaryButton/index.js +7 -18
- package/dist/cjs/controllers/overflow/index.js +27 -56
- package/dist/cjs/index.js +0 -16
- package/dist/cjs/skeleton-help-button.js +2 -11
- package/dist/cjs/skeleton-notification-button.js +1 -7
- package/dist/cjs/skeleton-settings-button.js +1 -7
- package/dist/cjs/skeleton-switcher-button.js +1 -7
- package/dist/cjs/skeleton.js +0 -4
- package/dist/cjs/theme/default-theme.js +0 -3
- package/dist/cjs/theme/index.js +0 -5
- package/dist/cjs/theme/theme-generator.js +7 -21
- package/dist/cjs/theme/theme-helpers.js +2 -27
- package/dist/cjs/theme/theme-provider.js +1 -4
- package/dist/cjs/theme/themes.js +0 -4
- package/dist/cjs/theme/use-theme.js +0 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AppSwitcher/index.js +3 -3
- package/dist/es2019/components/AtlassianNavigation/index.js +6 -4
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +4 -3
- package/dist/es2019/components/BadgeContainer/index.js +3 -2
- package/dist/es2019/components/Create/index.js +5 -5
- package/dist/es2019/components/Create/skeleton.js +3 -2
- package/dist/es2019/components/Create/styles.js +4 -2
- package/dist/es2019/components/Help/index.js +1 -1
- package/dist/es2019/components/IconButton/index.js +2 -4
- package/dist/es2019/components/IconButton/skeleton.js +3 -2
- package/dist/es2019/components/IconButton/styles.js +4 -2
- package/dist/es2019/components/Notifications/index.js +1 -1
- package/dist/es2019/components/PrimaryButton/index.js +3 -5
- package/dist/es2019/components/PrimaryButton/skeleton.js +4 -2
- package/dist/es2019/components/PrimaryButton/styles.js +4 -2
- package/dist/es2019/components/PrimaryDropdownButton/index.js +1 -2
- package/dist/es2019/components/PrimaryItemsContainer/index.js +5 -4
- package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -2
- package/dist/es2019/components/ProductHome/custom-product-home.js +3 -7
- package/dist/es2019/components/ProductHome/product-home.js +3 -7
- package/dist/es2019/components/ProductHome/skeleton.js +4 -2
- package/dist/es2019/components/ProductHome/utils.js +0 -2
- package/dist/es2019/components/Profile/index.js +3 -3
- package/dist/es2019/components/Profile/skeleton.js +3 -2
- package/dist/es2019/components/Search/index.js +5 -10
- package/dist/es2019/components/Search/skeleton.js +3 -2
- package/dist/es2019/components/Settings/index.js +0 -1
- package/dist/es2019/components/SignIn/index.js +2 -3
- package/dist/es2019/components/SignIn/skeleton.js +3 -2
- package/dist/es2019/components/SkeletonCreateButton/index.js +1 -1
- package/dist/es2019/components/SkeletonIconButton/index.js +1 -1
- package/dist/es2019/components/SkeletonPrimaryButton/index.js +3 -2
- package/dist/es2019/controllers/overflow/index.js +15 -24
- package/dist/es2019/skeleton-help-button.js +0 -1
- package/dist/es2019/skeleton-notification-button.js +0 -1
- package/dist/es2019/skeleton-settings-button.js +0 -1
- package/dist/es2019/skeleton-switcher-button.js +0 -1
- package/dist/es2019/theme/theme-generator.js +6 -8
- package/dist/es2019/theme/theme-helpers.js +4 -11
- package/dist/es2019/theme/theme-provider.js +4 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AppSwitcher/index.js +4 -5
- package/dist/esm/components/AtlassianNavigation/index.js +22 -20
- package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -13
- package/dist/esm/components/BadgeContainer/index.js +5 -4
- package/dist/esm/components/Create/index.js +11 -12
- package/dist/esm/components/Create/skeleton.js +3 -3
- package/dist/esm/components/Create/styles.js +2 -6
- package/dist/esm/components/Help/index.js +4 -6
- package/dist/esm/components/IconButton/index.js +5 -8
- package/dist/esm/components/IconButton/skeleton.js +6 -10
- package/dist/esm/components/IconButton/styles.js +2 -6
- package/dist/esm/components/Notifications/index.js +3 -4
- package/dist/esm/components/PrimaryButton/index.js +8 -12
- package/dist/esm/components/PrimaryButton/skeleton.js +4 -2
- package/dist/esm/components/PrimaryButton/styles.js +2 -6
- package/dist/esm/components/PrimaryDropdownButton/index.js +1 -2
- package/dist/esm/components/PrimaryItemsContainer/index.js +15 -17
- package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -2
- package/dist/esm/components/ProductHome/custom-product-home.js +14 -21
- package/dist/esm/components/ProductHome/product-home.js +20 -27
- package/dist/esm/components/ProductHome/skeleton.js +4 -7
- package/dist/esm/components/ProductHome/utils.js +0 -2
- package/dist/esm/components/Profile/index.js +3 -3
- package/dist/esm/components/Profile/skeleton.js +3 -2
- package/dist/esm/components/Search/index.js +12 -19
- package/dist/esm/components/Search/skeleton.js +3 -3
- package/dist/esm/components/Settings/index.js +1 -3
- package/dist/esm/components/SignIn/index.js +3 -5
- package/dist/esm/components/SignIn/skeleton.js +3 -2
- package/dist/esm/components/SkeletonCreateButton/index.js +2 -2
- package/dist/esm/components/SkeletonIconButton/index.js +2 -2
- package/dist/esm/components/SkeletonPrimaryButton/index.js +7 -13
- package/dist/esm/controllers/overflow/index.js +27 -40
- package/dist/esm/skeleton-help-button.js +2 -5
- package/dist/esm/skeleton-notification-button.js +1 -2
- package/dist/esm/skeleton-settings-button.js +1 -2
- package/dist/esm/skeleton-switcher-button.js +1 -2
- package/dist/esm/theme/theme-generator.js +7 -14
- package/dist/esm/theme/theme-helpers.js +2 -15
- package/dist/esm/theme/theme-provider.js +4 -3
- package/dist/esm/version.json +1 -1
- package/package.json +3 -3
- package/report.api.md +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`718d5ad3044`](https://bitbucket.org/atlassian/atlassian-frontend/commits/718d5ad3044) - Updates to support the new `@atlaskit/tokens` theming API.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 2.3.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.varSearchHoverBackgroundColor = exports.varSearchFocusBorderColor = exports.varSearchColor = exports.varSearchBorderColor = exports.varSearchBackgroundColor = exports.gridSize = exports.fontSize = exports.buttonHeight = exports.PRODUCT_HOME_BREAKPOINT = exports.HORIZONTAL_GLOBAL_NAV_HEIGHT = exports.CREATE_BREAKPOINT = void 0;
|
|
7
|
-
|
|
8
7
|
var _constants = require("@atlaskit/theme/constants");
|
|
9
|
-
|
|
10
8
|
var gridSize = (0, _constants.gridSize)();
|
|
11
9
|
exports.gridSize = gridSize;
|
|
12
10
|
var buttonHeight = gridSize * 4;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.actionSectionMobileCSS = exports.actionSectionDesktopCSS = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _constants = require("./constants");
|
|
13
|
-
|
|
14
10
|
var actionSectionDesktopCSS = (0, _defineProperty2.default)({}, "@media (max-width: ".concat(_constants.CREATE_BREAKPOINT - 1, "px)"), {
|
|
15
11
|
display: 'none !important'
|
|
16
12
|
});
|
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = exports.AppSwitcher = void 0;
|
|
11
|
-
|
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
12
|
var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/glyph/app-switcher"));
|
|
19
|
-
|
|
20
13
|
var _IconButton = require("../IconButton");
|
|
21
|
-
|
|
22
14
|
var _excluded = ["tooltip"];
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
17
|
/**
|
|
29
18
|
* _App switcher__
|
|
30
19
|
*
|
|
@@ -36,7 +25,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
36
25
|
*/
|
|
37
26
|
var AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
38
27
|
var tooltip = props.tooltip,
|
|
39
|
-
|
|
28
|
+
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
40
29
|
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
41
30
|
icon: /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
|
|
42
31
|
label: typeof tooltip === 'string' ? tooltip : 'Appswitcher Icon'
|
|
@@ -44,11 +33,10 @@ var AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
44
33
|
tooltip: tooltip,
|
|
45
34
|
ref: ref
|
|
46
35
|
}, iconButtonProps));
|
|
47
|
-
});
|
|
48
|
-
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
36
|
+
});
|
|
49
37
|
|
|
38
|
+
// exists only to extract props
|
|
39
|
+
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
50
40
|
exports.AppSwitcher = AppSwitcher;
|
|
51
|
-
|
|
52
41
|
var _default = function _default(props) {};
|
|
53
|
-
|
|
54
42
|
exports.default = _default;
|
|
@@ -4,20 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.AtlassianNavigation = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
|
|
11
|
-
|
|
12
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
-
|
|
14
10
|
var _constants = require("../../common/constants");
|
|
15
|
-
|
|
16
11
|
var _theme = require("../../theme");
|
|
17
|
-
|
|
18
12
|
var _PrimaryItemsContainer = require("../PrimaryItemsContainer");
|
|
19
|
-
|
|
20
13
|
/** @jsx jsx */
|
|
14
|
+
|
|
21
15
|
var containerStyles = (0, _react.css)({
|
|
22
16
|
display: 'flex',
|
|
23
17
|
boxSizing: 'border-box',
|
|
@@ -29,7 +23,7 @@ var containerStyles = (0, _react.css)({
|
|
|
29
23
|
justifyContent: 'space-between',
|
|
30
24
|
flexShrink: 0,
|
|
31
25
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
32
|
-
'[data-
|
|
26
|
+
'[data-color-mode="light"] &, [data-color-mode="dark"] &': {
|
|
33
27
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
34
28
|
borderBottom: "1px solid ".concat("var(--ds-border, #091E4224)"),
|
|
35
29
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
@@ -45,7 +39,8 @@ var containerStyles = (0, _react.css)({
|
|
|
45
39
|
right: 0,
|
|
46
40
|
left: 0,
|
|
47
41
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
48
|
-
background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat((0, _theme.hexToRGBA)(
|
|
42
|
+
background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat((0, _theme.hexToRGBA)(
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
49
44
|
_colors.N900, 0), " 4px)"),
|
|
50
45
|
content: '""'
|
|
51
46
|
}
|
|
@@ -77,6 +72,7 @@ var analyticsData = {
|
|
|
77
72
|
},
|
|
78
73
|
componentName: 'atlassianNavigation'
|
|
79
74
|
};
|
|
75
|
+
|
|
80
76
|
/**
|
|
81
77
|
* __Atlassian navigation__
|
|
82
78
|
*
|
|
@@ -85,25 +81,24 @@ var analyticsData = {
|
|
|
85
81
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
|
|
86
82
|
* - [Code](https://atlassian.design/components/atlassian-navigation/examples)
|
|
87
83
|
*/
|
|
88
|
-
|
|
89
84
|
var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
90
85
|
var label = props.label,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
_props$primaryItems = props.primaryItems,
|
|
87
|
+
primaryItems = _props$primaryItems === void 0 ? [] : _props$primaryItems,
|
|
88
|
+
AppSwitcher = props.renderAppSwitcher,
|
|
89
|
+
create = props.renderCreate,
|
|
90
|
+
Help = props.renderHelp,
|
|
91
|
+
Notifications = props.renderNotifications,
|
|
92
|
+
ProductHome = props.renderProductHome,
|
|
93
|
+
Profile = props.renderProfile,
|
|
94
|
+
Search = props.renderSearch,
|
|
95
|
+
SignIn = props.renderSignIn,
|
|
96
|
+
Settings = props.renderSettings,
|
|
97
|
+
_props$moreLabel = props.moreLabel,
|
|
98
|
+
moreLabel = _props$moreLabel === void 0 ? '…' : _props$moreLabel,
|
|
99
|
+
_props$theme = props.theme,
|
|
100
|
+
theme = _props$theme === void 0 ? _theme.defaultTheme : _props$theme,
|
|
101
|
+
testId = props.testId;
|
|
107
102
|
return (0, _react.jsx)(_theme.ThemeProvider, {
|
|
108
103
|
value: theme
|
|
109
104
|
}, (0, _react.jsx)(_analyticsNamespacedContext.NavigationAnalyticsContext, {
|
|
@@ -120,7 +115,8 @@ var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
|
120
115
|
testId: testId,
|
|
121
116
|
moreLabel: moreLabel,
|
|
122
117
|
items: primaryItems,
|
|
123
|
-
create: create
|
|
118
|
+
create: create
|
|
119
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
124
120
|
,
|
|
125
121
|
theme: theme
|
|
126
122
|
})), (0, _react.jsx)("div", {
|
|
@@ -128,7 +124,6 @@ var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
|
128
124
|
"data-testid": testId && "".concat(testId, "-secondary-actions")
|
|
129
125
|
}, Search && (0, _react.jsx)(Search, null), Notifications && (0, _react.jsx)(Notifications, null), Help && (0, _react.jsx)(Help, null), Settings && (0, _react.jsx)(Settings, null), SignIn && (0, _react.jsx)(SignIn, null), Profile && (0, _react.jsx)(Profile, null)))));
|
|
130
126
|
};
|
|
131
|
-
|
|
132
127
|
exports.AtlassianNavigation = AtlassianNavigation;
|
|
133
128
|
var _default = AtlassianNavigation;
|
|
134
129
|
exports.default = _default;
|
|
@@ -4,26 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.NavigationSkeleton = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
|
|
12
9
|
var _constants = require("../../common/constants");
|
|
13
|
-
|
|
14
10
|
var _theme = require("../../theme");
|
|
15
|
-
|
|
16
11
|
var _skeleton = require("../IconButton/skeleton");
|
|
17
|
-
|
|
18
12
|
var _skeleton2 = require("../PrimaryItemsContainer/skeleton");
|
|
19
|
-
|
|
20
13
|
var _skeleton3 = require("../ProductHome/skeleton");
|
|
21
|
-
|
|
22
14
|
var _skeleton4 = require("../Profile/skeleton");
|
|
23
|
-
|
|
24
15
|
var _skeleton5 = require("../Search/skeleton");
|
|
25
|
-
|
|
26
16
|
/** @jsx jsx */
|
|
17
|
+
|
|
27
18
|
var containerStyles = (0, _react.css)({
|
|
28
19
|
display: 'flex',
|
|
29
20
|
boxSizing: 'border-box',
|
|
@@ -35,7 +26,7 @@ var containerStyles = (0, _react.css)({
|
|
|
35
26
|
justifyContent: 'space-between',
|
|
36
27
|
flexShrink: 0,
|
|
37
28
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
38
|
-
'[data-
|
|
29
|
+
'[data-color-mode="light"] &, [data-color-mode="dark"] &': {
|
|
39
30
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
40
31
|
borderBottom: "1px solid ".concat("var(--ds-border, #091E4224)"),
|
|
41
32
|
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
@@ -51,7 +42,8 @@ var containerStyles = (0, _react.css)({
|
|
|
51
42
|
right: 0,
|
|
52
43
|
left: 0,
|
|
53
44
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
54
|
-
background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat((0, _theme.hexToRGBA)(
|
|
45
|
+
background: "linear-gradient(180deg, ".concat(_colors.N40A, " 0, ").concat(_colors.N40A, " 1px, ").concat(_colors.N30A, " 1px, ").concat((0, _theme.hexToRGBA)(
|
|
46
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
55
47
|
_colors.N900, 0), " 4px)"),
|
|
56
48
|
content: '""'
|
|
57
49
|
}
|
|
@@ -77,6 +69,7 @@ var rightStyles = (0, _react.css)({
|
|
|
77
69
|
flexShrink: 0
|
|
78
70
|
}
|
|
79
71
|
});
|
|
72
|
+
|
|
80
73
|
/**
|
|
81
74
|
* __Navigation skeleton__
|
|
82
75
|
*
|
|
@@ -90,19 +83,18 @@ var rightStyles = (0, _react.css)({
|
|
|
90
83
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
91
84
|
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
92
85
|
*/
|
|
93
|
-
|
|
94
86
|
var NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
95
87
|
var _ref$primaryItemsCoun = _ref.primaryItemsCount,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
88
|
+
primaryItemsCount = _ref$primaryItemsCoun === void 0 ? 4 : _ref$primaryItemsCoun,
|
|
89
|
+
_ref$secondaryItemsCo = _ref.secondaryItemsCount,
|
|
90
|
+
secondaryItemsCount = _ref$secondaryItemsCo === void 0 ? 4 : _ref$secondaryItemsCo,
|
|
91
|
+
_ref$theme = _ref.theme,
|
|
92
|
+
theme = _ref$theme === void 0 ? _theme.defaultTheme : _ref$theme,
|
|
93
|
+
_ref$showSiteName = _ref.showSiteName,
|
|
94
|
+
showSiteName = _ref$showSiteName === void 0 ? false : _ref$showSiteName,
|
|
95
|
+
_ref$shouldShowSearch = _ref.shouldShowSearch,
|
|
96
|
+
shouldShowSearch = _ref$shouldShowSearch === void 0 ? true : _ref$shouldShowSearch,
|
|
97
|
+
testId = _ref.testId;
|
|
106
98
|
return (0, _react.jsx)(_theme.ThemeProvider, {
|
|
107
99
|
value: theme
|
|
108
100
|
}, (0, _react.jsx)("div", {
|
|
@@ -132,7 +124,6 @@ var NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
|
132
124
|
});
|
|
133
125
|
}), (0, _react.jsx)(_skeleton4.ProfileSkeleton, null))));
|
|
134
126
|
};
|
|
135
|
-
|
|
136
127
|
exports.NavigationSkeleton = NavigationSkeleton;
|
|
137
128
|
var _default = NavigationSkeleton;
|
|
138
129
|
exports.default = _default;
|
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BadgeContainer = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
/** @jsx jsx */
|
|
9
|
+
|
|
11
10
|
var badgeContainerStyles = (0, _react.css)({
|
|
12
11
|
position: 'absolute',
|
|
13
12
|
top: '-4px',
|
|
@@ -16,13 +15,14 @@ var badgeContainerStyles = (0, _react.css)({
|
|
|
16
15
|
});
|
|
17
16
|
var containerStyles = (0, _react.css)({
|
|
18
17
|
position: 'relative'
|
|
19
|
-
});
|
|
20
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
18
|
+
});
|
|
21
19
|
|
|
20
|
+
// Not exported to consumers
|
|
21
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
22
22
|
var BadgeContainer = function BadgeContainer(props) {
|
|
23
23
|
var badgeId = props.id,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
Badge = props.badge,
|
|
25
|
+
children = props.children;
|
|
26
26
|
return (0, _react.jsx)("div", {
|
|
27
27
|
css: containerStyles
|
|
28
28
|
}, children, (0, _react.jsx)("div", {
|
|
@@ -31,5 +31,4 @@ var BadgeContainer = function BadgeContainer(props) {
|
|
|
31
31
|
"aria-hidden": true
|
|
32
32
|
}, (0, _react.jsx)(Badge, null)));
|
|
33
33
|
};
|
|
34
|
-
|
|
35
34
|
exports.BadgeContainer = BadgeContainer;
|
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.Create = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _react = require("react");
|
|
13
|
-
|
|
14
10
|
var _react2 = require("@emotion/react");
|
|
15
|
-
|
|
16
11
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
17
|
-
|
|
18
12
|
var _add = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/add"));
|
|
19
|
-
|
|
20
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
21
|
-
|
|
22
14
|
var _constants = require("../../common/constants");
|
|
23
|
-
|
|
24
15
|
var _theme = require("../../theme");
|
|
25
|
-
|
|
26
16
|
var _IconButton = require("../IconButton");
|
|
27
|
-
|
|
28
17
|
var _styles = require("./styles");
|
|
29
|
-
|
|
30
18
|
/** @jsx jsx */
|
|
19
|
+
|
|
31
20
|
var wrapperStyles = (0, _react2.css)({
|
|
32
21
|
display: 'flex',
|
|
33
22
|
alignItems: 'center',
|
|
@@ -44,15 +33,15 @@ var wrapperStyles = (0, _react2.css)({
|
|
|
44
33
|
marginLeft: _constants.gridSize * 1.5
|
|
45
34
|
}
|
|
46
35
|
});
|
|
47
|
-
|
|
48
36
|
var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
49
37
|
var buttonTooltip = _ref.buttonTooltip,
|
|
50
|
-
|
|
38
|
+
children = _ref.children;
|
|
51
39
|
return buttonTooltip ? (0, _react2.jsx)(_tooltip.default, {
|
|
52
40
|
content: buttonTooltip,
|
|
53
41
|
hideTooltipOnClick: true
|
|
54
42
|
}, children) : (0, _react2.jsx)(_react.Fragment, null, children);
|
|
55
43
|
};
|
|
44
|
+
|
|
56
45
|
/**
|
|
57
46
|
* _Create__
|
|
58
47
|
*
|
|
@@ -62,15 +51,13 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
|
62
51
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
63
52
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
64
53
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
54
|
var Create = function Create(_ref2) {
|
|
68
55
|
var onClick = _ref2.onClick,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
href = _ref2.href,
|
|
57
|
+
text = _ref2.text,
|
|
58
|
+
buttonTooltip = _ref2.buttonTooltip,
|
|
59
|
+
iconButtonTooltip = _ref2.iconButtonTooltip,
|
|
60
|
+
testId = _ref2.testId;
|
|
74
61
|
var theme = (0, _theme.useTheme)();
|
|
75
62
|
return (0, _react2.jsx)("div", {
|
|
76
63
|
css: wrapperStyles,
|
|
@@ -80,7 +67,8 @@ var Create = function Create(_ref2) {
|
|
|
80
67
|
}, (0, _react2.jsx)(_customThemeButton.default, {
|
|
81
68
|
id: "createGlobalItem",
|
|
82
69
|
onClick: onClick,
|
|
83
|
-
href: href
|
|
70
|
+
href: href
|
|
71
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
84
72
|
,
|
|
85
73
|
theme: (0, _styles.getCreateButtonTheme)(theme),
|
|
86
74
|
testId: testId && "".concat(testId, "-button"),
|
|
@@ -93,14 +81,14 @@ var Create = function Create(_ref2) {
|
|
|
93
81
|
}),
|
|
94
82
|
onClick: onClick,
|
|
95
83
|
href: href,
|
|
96
|
-
tooltip: iconButtonTooltip
|
|
84
|
+
tooltip: iconButtonTooltip
|
|
85
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
97
86
|
,
|
|
98
87
|
theme: (0, _styles.getCreateButtonTheme)(theme),
|
|
99
88
|
"aria-label": text,
|
|
100
89
|
"data-hide-on-largescreens": true
|
|
101
90
|
}));
|
|
102
91
|
};
|
|
103
|
-
|
|
104
92
|
exports.Create = Create;
|
|
105
93
|
var _default = Create;
|
|
106
94
|
exports.default = _default;
|
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.CreateSkeleton = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _react = require("react");
|
|
13
|
-
|
|
14
10
|
var _react2 = require("@emotion/react");
|
|
15
|
-
|
|
16
11
|
var _constants = require("../../common/constants");
|
|
17
|
-
|
|
18
12
|
var _theme = require("../../theme");
|
|
19
|
-
|
|
20
13
|
var _skeleton = require("../IconButton/skeleton");
|
|
21
|
-
|
|
22
14
|
/** @jsx jsx */
|
|
15
|
+
|
|
23
16
|
var buttonHeight = _constants.gridSize * 4;
|
|
24
17
|
var skeletonStyles = (0, _react2.css)({
|
|
25
18
|
width: 68,
|
|
@@ -30,9 +23,10 @@ var skeletonStyles = (0, _react2.css)({
|
|
|
30
23
|
});
|
|
31
24
|
var mobileStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(_constants.CREATE_BREAKPOINT - 1, "px)"), {
|
|
32
25
|
display: 'none !important'
|
|
33
|
-
}));
|
|
34
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
26
|
+
}));
|
|
35
27
|
|
|
28
|
+
// Not exported to consumers, only used in NavigationSkeleton
|
|
29
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
36
30
|
var CreateSkeleton = function CreateSkeleton() {
|
|
37
31
|
var theme = (0, _theme.useTheme)();
|
|
38
32
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
@@ -43,5 +37,4 @@ var CreateSkeleton = function CreateSkeleton() {
|
|
|
43
37
|
size: _constants.gridSize * 3.25
|
|
44
38
|
}));
|
|
45
39
|
};
|
|
46
|
-
|
|
47
40
|
exports.CreateSkeleton = CreateSkeleton;
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.getCreateButtonTheme = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
11
|
var getCreateButtonTheme = function getCreateButtonTheme(_ref) {
|
|
17
12
|
var create = _ref.mode.create;
|
|
18
13
|
return function (current, props) {
|
|
19
14
|
var _current = current(props),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
buttonStyles = _current.buttonStyles,
|
|
16
|
+
spinnerStyles = _current.spinnerStyles;
|
|
23
17
|
return {
|
|
24
18
|
buttonStyles: _objectSpread(_objectSpread(_objectSpread({}, buttonStyles), create.default), {}, {
|
|
25
19
|
margin: 0,
|
|
@@ -37,5 +31,4 @@ var getCreateButtonTheme = function getCreateButtonTheme(_ref) {
|
|
|
37
31
|
};
|
|
38
32
|
};
|
|
39
33
|
};
|
|
40
|
-
|
|
41
34
|
exports.getCreateButtonTheme = getCreateButtonTheme;
|
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = exports.Help = void 0;
|
|
11
|
-
|
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
12
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/question-circle"));
|
|
19
|
-
|
|
20
13
|
var _theme = require("../../theme");
|
|
21
|
-
|
|
22
14
|
var _BadgeContainer = require("../BadgeContainer");
|
|
23
|
-
|
|
24
15
|
var _IconButton = require("../IconButton");
|
|
25
|
-
|
|
26
16
|
var _excluded = ["badge", "tooltip"];
|
|
27
|
-
|
|
28
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
-
|
|
30
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
32
19
|
var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
|
|
20
|
+
|
|
33
21
|
/**
|
|
34
22
|
* __Help__
|
|
35
23
|
*
|
|
@@ -38,15 +26,12 @@ var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
|
|
|
38
26
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
39
27
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
40
28
|
*/
|
|
41
|
-
|
|
42
29
|
var Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
43
30
|
var badge = props.badge,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
tooltip = props.tooltip,
|
|
32
|
+
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
47
33
|
var _useTheme = (0, _theme.useTheme)(),
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
navigation = _useTheme.mode.navigation;
|
|
50
35
|
var button = /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
51
36
|
icon: /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
|
|
52
37
|
label: typeof tooltip === 'string' ? tooltip : 'Help Icon',
|
|
@@ -55,7 +40,6 @@ var Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
55
40
|
ref: ref,
|
|
56
41
|
tooltip: tooltip
|
|
57
42
|
}, iconButtonProps));
|
|
58
|
-
|
|
59
43
|
return badge ? /*#__PURE__*/_react.default.createElement(_BadgeContainer.BadgeContainer, {
|
|
60
44
|
id: HELP_NOTIFICATION_BADGE_ID,
|
|
61
45
|
badge: badge
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.IconButton = void 0;
|
|
11
|
-
|
|
12
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
12
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
19
|
-
|
|
20
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
21
|
-
|
|
22
14
|
var _theme = require("../../theme");
|
|
23
|
-
|
|
24
15
|
var _styles = require("./styles");
|
|
25
|
-
|
|
26
16
|
var _excluded = ["icon", "testId", "tooltip"];
|
|
27
|
-
|
|
28
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
-
|
|
30
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
-
|
|
32
19
|
/**
|
|
33
20
|
* __Icon button__
|
|
34
21
|
*
|
|
@@ -40,27 +27,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
40
27
|
*/
|
|
41
28
|
var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
42
29
|
var icon = props.icon,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
testId = props.testId,
|
|
31
|
+
tooltip = props.tooltip,
|
|
32
|
+
buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
46
33
|
var theme = (0, _theme.useTheme)();
|
|
47
|
-
|
|
48
34
|
var button = /*#__PURE__*/_react.default.createElement(_customThemeButton.default, (0, _extends2.default)({
|
|
49
35
|
appearance: "primary",
|
|
50
36
|
testId: testId,
|
|
51
37
|
iconBefore: icon,
|
|
52
|
-
ref: ref
|
|
38
|
+
ref: ref
|
|
39
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
53
40
|
,
|
|
54
41
|
theme: (0, _styles.getIconButtonTheme)(theme)
|
|
55
42
|
}, buttonProps));
|
|
56
|
-
|
|
57
43
|
if (tooltip) {
|
|
58
44
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
59
45
|
content: tooltip,
|
|
60
46
|
hideTooltipOnClick: true
|
|
61
47
|
}, button);
|
|
62
48
|
}
|
|
63
|
-
|
|
64
49
|
return button;
|
|
65
50
|
});
|
|
66
51
|
exports.IconButton = IconButton;
|