@atlaskit/atlassian-navigation 2.3.3 → 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 +13 -0
- package/dist/cjs/common/constants.js +12 -4
- 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 +23 -37
- 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 +4 -8
- 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/common/constants.js +6 -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 +21 -13
- 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/default-theme.js +4 -5
- 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/common/constants.js +6 -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 +24 -27
- 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/default-theme.js +4 -5
- 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/dist/types/common/constants.d.ts +5 -0
- package/package.json +3 -3
- package/report.api.md +14 -1
|
@@ -1,32 +1,20 @@
|
|
|
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 = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
11
|
var _react = require("react");
|
|
17
|
-
|
|
18
12
|
var _react2 = require("@emotion/react");
|
|
19
|
-
|
|
20
13
|
var _constants = require("../../common/constants");
|
|
21
|
-
|
|
22
14
|
var _theme = require("../../theme");
|
|
23
|
-
|
|
24
15
|
var _utils = require("./utils");
|
|
25
|
-
|
|
26
16
|
var _excluded = ["icon", "logo", "siteTitle", "onClick", "href", "onMouseDown", "testId", "logoMaxWidth"];
|
|
27
|
-
|
|
28
17
|
var _css;
|
|
29
|
-
|
|
30
18
|
var VAR_LOGO_MAX_WIDTH = '--logo-max-width';
|
|
31
19
|
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
32
20
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
@@ -114,6 +102,7 @@ var siteTitleStyles = (0, _react2.css)({
|
|
|
114
102
|
paddingRight: _constants.gridSize * 2,
|
|
115
103
|
alignItems: 'center'
|
|
116
104
|
});
|
|
105
|
+
|
|
117
106
|
/**
|
|
118
107
|
* __Product home__
|
|
119
108
|
*
|
|
@@ -125,38 +114,34 @@ var siteTitleStyles = (0, _react2.css)({
|
|
|
125
114
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
|
|
126
115
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
127
116
|
*/
|
|
128
|
-
|
|
129
117
|
var ProductHome = function ProductHome(_ref) {
|
|
130
118
|
var _productHomeButtonDyn;
|
|
131
|
-
|
|
132
119
|
var Icon = _ref.icon,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
120
|
+
Logo = _ref.logo,
|
|
121
|
+
siteTitle = _ref.siteTitle,
|
|
122
|
+
onClick = _ref.onClick,
|
|
123
|
+
href = _ref.href,
|
|
124
|
+
onMouseDown = _ref.onMouseDown,
|
|
125
|
+
testId = _ref.testId,
|
|
126
|
+
_ref$logoMaxWidth = _ref.logoMaxWidth,
|
|
127
|
+
logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
|
|
128
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
142
129
|
var theme = (0, _theme.useTheme)();
|
|
143
130
|
var primaryButton = theme.mode.primaryButton;
|
|
144
131
|
var _theme$mode$productHo = theme.mode.productHome,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
132
|
+
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
133
|
+
iconColor = _theme$mode$productHo2 === void 0 ? 'inherit' : _theme$mode$productHo2,
|
|
134
|
+
_theme$mode$productHo3 = _theme$mode$productHo.iconGradientStart,
|
|
135
|
+
iconGradientStart = _theme$mode$productHo3 === void 0 ? 'inherit' : _theme$mode$productHo3,
|
|
136
|
+
_theme$mode$productHo4 = _theme$mode$productHo.iconGradientStop,
|
|
137
|
+
iconGradientStop = _theme$mode$productHo4 === void 0 ? 'inherit' : _theme$mode$productHo4,
|
|
138
|
+
_theme$mode$productHo5 = _theme$mode$productHo.textColor,
|
|
139
|
+
textColor = _theme$mode$productHo5 === void 0 ? theme.mode.productHome.color : _theme$mode$productHo5;
|
|
153
140
|
var Tag = (0, _utils.getTag)(onClick, href);
|
|
154
|
-
|
|
155
141
|
var preventFocusRing = function preventFocusRing(e) {
|
|
156
142
|
e.preventDefault();
|
|
157
143
|
onMouseDown && onMouseDown(e);
|
|
158
144
|
};
|
|
159
|
-
|
|
160
145
|
var productHomeButtonDynamicStyles = (_productHomeButtonDyn = {}, (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), (0, _defineProperty2.default)(_productHomeButtonDyn, VAR_LOGO_MAX_WIDTH, "".concat(logoMaxWidth, "px")), _productHomeButtonDyn);
|
|
161
146
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(Tag, (0, _extends2.default)({
|
|
162
147
|
style: productHomeButtonDynamicStyles,
|
|
@@ -164,8 +149,8 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
164
149
|
href: href,
|
|
165
150
|
onClick: onClick,
|
|
166
151
|
onMouseDown: preventFocusRing,
|
|
167
|
-
"data-testid": testId && "".concat(testId, "-container")
|
|
168
|
-
|
|
152
|
+
"data-testid": testId && "".concat(testId, "-container")
|
|
153
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
169
154
|
}, rest), (0, _react2.jsx)("div", {
|
|
170
155
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
171
156
|
"data-testid": testId && "".concat(testId, "-logo")
|
|
@@ -189,6 +174,5 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
189
174
|
"data-testid": testId && "".concat(testId, "-site-title")
|
|
190
175
|
}, siteTitle));
|
|
191
176
|
};
|
|
192
|
-
|
|
193
177
|
var _default = ProductHome;
|
|
194
178
|
exports.default = _default;
|
|
@@ -1,24 +1,16 @@
|
|
|
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.ProductHomeSkeleton = 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 _css;
|
|
21
|
-
|
|
22
14
|
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
23
15
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
24
16
|
var VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
@@ -111,12 +103,12 @@ var siteTitleStyles = (0, _react2.css)({
|
|
|
111
103
|
borderRadius: 4,
|
|
112
104
|
content: '""'
|
|
113
105
|
}
|
|
114
|
-
});
|
|
115
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
106
|
+
});
|
|
116
107
|
|
|
108
|
+
// Not exported to consumers, only used in NavigationSkeleton
|
|
109
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
117
110
|
var ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
118
111
|
var _productHomeButtonDyn;
|
|
119
|
-
|
|
120
112
|
var showSiteName = _ref.showSiteName;
|
|
121
113
|
var theme = (0, _theme.useTheme)();
|
|
122
114
|
var primaryButton = theme.mode.primaryButton;
|
|
@@ -139,5 +131,4 @@ var ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
|
139
131
|
css: siteTitleStyles
|
|
140
132
|
}));
|
|
141
133
|
};
|
|
142
|
-
|
|
143
134
|
exports.ProductHomeSkeleton = ProductHomeSkeleton;
|
|
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getTag = void 0;
|
|
7
|
-
|
|
8
7
|
var getTag = function getTag(onClick, href) {
|
|
9
8
|
if (href) {
|
|
10
9
|
return 'a';
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
if (onClick) {
|
|
14
12
|
return 'button';
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
return 'div';
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
exports.getTag = getTag;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Profile = void 0;
|
|
7
|
-
|
|
8
7
|
var _IconButton = require("../IconButton");
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* __Profile__
|
|
12
10
|
*
|
|
@@ -16,11 +14,10 @@ var _IconButton = require("../IconButton");
|
|
|
16
14
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
|
|
17
15
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
16
|
*/
|
|
19
|
-
var Profile = _IconButton.IconButton;
|
|
20
|
-
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
17
|
+
var Profile = _IconButton.IconButton;
|
|
21
18
|
|
|
19
|
+
// This exists only to extract props.
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
22
21
|
exports.Profile = Profile;
|
|
23
|
-
|
|
24
22
|
var _default = function _default(props) {};
|
|
25
|
-
|
|
26
23
|
exports.default = _default;
|
|
@@ -1,18 +1,13 @@
|
|
|
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.ProfileSkeleton = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _constants = require("@atlaskit/theme/constants");
|
|
13
|
-
|
|
14
10
|
var _skeleton = require("../IconButton/skeleton");
|
|
15
|
-
|
|
16
11
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
17
12
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
18
13
|
var ProfileSkeleton = function ProfileSkeleton() {
|
|
@@ -22,5 +17,4 @@ var ProfileSkeleton = function ProfileSkeleton() {
|
|
|
22
17
|
size: (0, _constants.gridSize)() * 3.25
|
|
23
18
|
});
|
|
24
19
|
};
|
|
25
|
-
|
|
26
20
|
exports.ProfileSkeleton = ProfileSkeleton;
|
|
@@ -1,36 +1,20 @@
|
|
|
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.Search = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
11
|
var _react = require("react");
|
|
17
|
-
|
|
18
12
|
var _react2 = require("@emotion/react");
|
|
19
|
-
|
|
20
13
|
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/search"));
|
|
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 _excluded = ["placeholder", "tooltip", "label", "value"];
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
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; }
|
|
33
|
-
|
|
34
18
|
var searchInputContainerStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
35
19
|
marginRight: _constants.gridSize,
|
|
36
20
|
marginLeft: 20,
|
|
@@ -51,40 +35,43 @@ var searchInputStyles = (0, _react2.css)({
|
|
|
51
35
|
width: '220px',
|
|
52
36
|
height: "".concat(_constants.gridSize * 4, "px"),
|
|
53
37
|
padding: "0 ".concat(_constants.gridSize, "px 0 40px"),
|
|
38
|
+
backgroundColor: "var(".concat(_constants.varSearchBackgroundColor, ")"),
|
|
54
39
|
border: '2px solid',
|
|
40
|
+
borderColor: "var(".concat(_constants.varSearchBorderColor, ")"),
|
|
55
41
|
borderRadius: 6,
|
|
42
|
+
color: "var(".concat(_constants.varSearchColor, ")"),
|
|
56
43
|
fontSize: "".concat(_constants.fontSize, "px"),
|
|
57
44
|
outline: 'none',
|
|
58
45
|
'::placeholder': {
|
|
59
46
|
color: 'inherit'
|
|
47
|
+
},
|
|
48
|
+
'&:focus': {
|
|
49
|
+
borderColor: "var(".concat(_constants.varSearchFocusBorderColor, ")")
|
|
50
|
+
},
|
|
51
|
+
'&:hover': {
|
|
52
|
+
backgroundColor: "var(".concat(_constants.varSearchHoverBackgroundColor, ")")
|
|
60
53
|
}
|
|
61
54
|
});
|
|
62
55
|
var searchIconStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (min-width: ".concat(_constants.CREATE_BREAKPOINT, "px)"), {
|
|
63
56
|
display: 'none !important'
|
|
64
57
|
}));
|
|
65
|
-
|
|
66
58
|
var SearchComponent = function SearchComponent(props) {
|
|
59
|
+
var _searchInputDynamicSt;
|
|
67
60
|
var onClick = props.onClick,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
placeholder = props.placeholder,
|
|
62
|
+
label = props.label,
|
|
63
|
+
value = props.value;
|
|
71
64
|
var theme = (0, _theme.useTheme)();
|
|
72
65
|
var search = theme.mode.search;
|
|
73
|
-
|
|
74
66
|
var onChange = function onChange() {
|
|
75
67
|
// @ts-ignore
|
|
76
68
|
onClick && onClick.apply(void 0, arguments);
|
|
77
69
|
};
|
|
78
|
-
|
|
79
70
|
var onInputClick = function onInputClick() {
|
|
80
71
|
// @ts-ignore
|
|
81
72
|
onClick && onClick.apply(void 0, arguments);
|
|
82
73
|
};
|
|
83
|
-
|
|
84
|
-
var searchInputDynamicStyles = _objectSpread(_objectSpread({}, search.default), {}, {
|
|
85
|
-
':focus': search.focus
|
|
86
|
-
});
|
|
87
|
-
|
|
74
|
+
var searchInputDynamicStyles = (_searchInputDynamicSt = {}, (0, _defineProperty2.default)(_searchInputDynamicSt, _constants.varSearchBackgroundColor, search.default.backgroundColor), (0, _defineProperty2.default)(_searchInputDynamicSt, _constants.varSearchColor, search.default.color), (0, _defineProperty2.default)(_searchInputDynamicSt, _constants.varSearchBorderColor, search.default.borderColor), (0, _defineProperty2.default)(_searchInputDynamicSt, _constants.varSearchFocusBorderColor, search.focus.borderColor), (0, _defineProperty2.default)(_searchInputDynamicSt, _constants.varSearchHoverBackgroundColor, search.hover.backgroundColor), _searchInputDynamicSt);
|
|
88
75
|
return (0, _react2.jsx)("div", {
|
|
89
76
|
css: searchInputContainerStyles,
|
|
90
77
|
role: "search"
|
|
@@ -102,6 +89,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
102
89
|
value: value
|
|
103
90
|
}));
|
|
104
91
|
};
|
|
92
|
+
|
|
105
93
|
/**
|
|
106
94
|
* __Search__
|
|
107
95
|
*
|
|
@@ -110,30 +98,28 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
110
98
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#search)
|
|
111
99
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
112
100
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
101
|
var Search = function Search(props) {
|
|
116
102
|
var placeholder = props.placeholder,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
103
|
+
tooltip = props.tooltip,
|
|
104
|
+
label = props.label,
|
|
105
|
+
value = props.value,
|
|
106
|
+
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
121
107
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(SearchComponent, {
|
|
122
108
|
onClick: iconButtonProps.onClick,
|
|
123
109
|
placeholder: placeholder,
|
|
124
110
|
label: label,
|
|
125
111
|
value: value || ''
|
|
126
|
-
}), (0, _react2.jsx)(_IconButton.IconButton
|
|
112
|
+
}), (0, _react2.jsx)(_IconButton.IconButton
|
|
113
|
+
// @ts-ignore Overriding styles is not supported.
|
|
127
114
|
, (0, _extends2.default)({
|
|
128
115
|
css: searchIconStyles,
|
|
129
116
|
icon: (0, _react2.jsx)(_search.default, {
|
|
130
117
|
label: label
|
|
131
118
|
}),
|
|
132
|
-
tooltip: tooltip
|
|
133
|
-
|
|
119
|
+
tooltip: tooltip
|
|
120
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
134
121
|
}, iconButtonProps)));
|
|
135
122
|
};
|
|
136
|
-
|
|
137
123
|
exports.Search = Search;
|
|
138
124
|
var _default = Search;
|
|
139
125
|
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.SearchSkeleton = 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 searchInputContainerStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
24
17
|
marginRight: _constants.gridSize,
|
|
25
18
|
marginLeft: 20,
|
|
@@ -37,9 +30,10 @@ var searchInputSkeletonStyles = (0, _react2.css)({
|
|
|
37
30
|
});
|
|
38
31
|
var searchIconStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (min-width: ".concat(_constants.CREATE_BREAKPOINT, "px)"), {
|
|
39
32
|
display: 'none !important'
|
|
40
|
-
}));
|
|
41
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
33
|
+
}));
|
|
42
34
|
|
|
35
|
+
// Not exported to consumers, only used in NavigationSkeleton
|
|
36
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
43
37
|
var SearchSkeleton = function SearchSkeleton() {
|
|
44
38
|
var theme = (0, _theme.useTheme)();
|
|
45
39
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
@@ -53,5 +47,4 @@ var SearchSkeleton = function SearchSkeleton() {
|
|
|
53
47
|
size: _constants.gridSize * 3.25
|
|
54
48
|
}));
|
|
55
49
|
};
|
|
56
|
-
|
|
57
50
|
exports.SearchSkeleton = SearchSkeleton;
|
|
@@ -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.Settings = 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 _settings = _interopRequireDefault(require("@atlaskit/icon/glyph/settings"));
|
|
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
|
* __Settings__
|
|
30
19
|
*
|
|
@@ -35,7 +24,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
35
24
|
*/
|
|
36
25
|
var Settings = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
37
26
|
var tooltip = props.tooltip,
|
|
38
|
-
|
|
27
|
+
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
39
28
|
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
40
29
|
icon: /*#__PURE__*/_react.default.createElement(_settings.default, {
|
|
41
30
|
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
|
|
@@ -1,24 +1,16 @@
|
|
|
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.SignIn = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var _signIn = _interopRequireDefault(require("@atlaskit/icon/glyph/sign-in"));
|
|
17
|
-
|
|
18
12
|
var _IconButton = require("../IconButton");
|
|
19
|
-
|
|
20
13
|
var _excluded = ["tooltip"];
|
|
21
|
-
|
|
22
14
|
/**
|
|
23
15
|
* __Sign in__
|
|
24
16
|
*
|
|
@@ -29,16 +21,15 @@ var _excluded = ["tooltip"];
|
|
|
29
21
|
*/
|
|
30
22
|
var SignIn = function SignIn(props) {
|
|
31
23
|
var tooltip = props.tooltip,
|
|
32
|
-
|
|
24
|
+
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
33
25
|
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
34
26
|
icon: /*#__PURE__*/_react.default.createElement(_signIn.default, {
|
|
35
27
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
36
28
|
}),
|
|
37
|
-
tooltip: tooltip
|
|
38
|
-
|
|
29
|
+
tooltip: tooltip
|
|
30
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
39
31
|
}, iconButtonProps));
|
|
40
32
|
};
|
|
41
|
-
|
|
42
33
|
exports.SignIn = SignIn;
|
|
43
34
|
var _default = SignIn;
|
|
44
35
|
exports.default = _default;
|
|
@@ -1,18 +1,13 @@
|
|
|
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.SignInSkeleton = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _constants = require("@atlaskit/theme/constants");
|
|
13
|
-
|
|
14
10
|
var _skeleton = require("../IconButton/skeleton");
|
|
15
|
-
|
|
16
11
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
17
12
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
18
13
|
var SignInSkeleton = function SignInSkeleton() {
|
|
@@ -22,5 +17,4 @@ var SignInSkeleton = function SignInSkeleton() {
|
|
|
22
17
|
size: (0, _constants.gridSize)() * 4.75
|
|
23
18
|
});
|
|
24
19
|
};
|
|
25
|
-
|
|
26
20
|
exports.SignInSkeleton = SignInSkeleton;
|
|
@@ -4,12 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SkeletonCreateButton = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _theme = require("../../theme");
|
|
11
|
-
|
|
12
9
|
/** @jsx jsx */
|
|
10
|
+
|
|
13
11
|
var skeletonCreateButtonStyles = (0, _react.css)({
|
|
14
12
|
height: 32,
|
|
15
13
|
padding: '0 12px',
|
|
@@ -30,6 +28,7 @@ var skeletonCreateButtonStyles = (0, _react.css)({
|
|
|
30
28
|
marginLeft: 12
|
|
31
29
|
}
|
|
32
30
|
});
|
|
31
|
+
|
|
33
32
|
/**
|
|
34
33
|
* __Skeleton create button__
|
|
35
34
|
*
|
|
@@ -40,10 +39,9 @@ var skeletonCreateButtonStyles = (0, _react.css)({
|
|
|
40
39
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
41
40
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
42
41
|
*/
|
|
43
|
-
|
|
44
42
|
var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
45
43
|
var text = _ref.text,
|
|
46
|
-
|
|
44
|
+
testId = _ref.testId;
|
|
47
45
|
var theme = (0, _theme.useTheme)();
|
|
48
46
|
return (0, _react.jsx)("button", {
|
|
49
47
|
style: theme.mode.create.default,
|
|
@@ -52,5 +50,4 @@ var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
|
52
50
|
type: "button"
|
|
53
51
|
}, text);
|
|
54
52
|
};
|
|
55
|
-
|
|
56
53
|
exports.SkeletonCreateButton = SkeletonCreateButton;
|
|
@@ -4,12 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SkeletonIconButton = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("@emotion/react");
|
|
9
|
-
|
|
10
8
|
var _theme = require("../../theme");
|
|
11
|
-
|
|
12
9
|
/** @jsx jsx */
|
|
10
|
+
|
|
13
11
|
var skeletonIconButtonStyles = (0, _react.css)({
|
|
14
12
|
margin: 0,
|
|
15
13
|
marginRight: 4,
|
|
@@ -37,6 +35,7 @@ var skeletonIconButtonStyles = (0, _react.css)({
|
|
|
37
35
|
verticalAlign: 'middle'
|
|
38
36
|
}
|
|
39
37
|
});
|
|
38
|
+
|
|
40
39
|
/**
|
|
41
40
|
* __Skeleton icon button__
|
|
42
41
|
*
|
|
@@ -47,10 +46,9 @@ var skeletonIconButtonStyles = (0, _react.css)({
|
|
|
47
46
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
48
47
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
49
48
|
*/
|
|
50
|
-
|
|
51
49
|
var SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
52
50
|
var children = _ref.children,
|
|
53
|
-
|
|
51
|
+
testId = _ref.testId;
|
|
54
52
|
var theme = (0, _theme.useTheme)();
|
|
55
53
|
return (0, _react.jsx)("button", {
|
|
56
54
|
style: theme.mode.iconButton.default,
|
|
@@ -59,5 +57,4 @@ var SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
|
59
57
|
type: "button"
|
|
60
58
|
}, children);
|
|
61
59
|
};
|
|
62
|
-
|
|
63
60
|
exports.SkeletonIconButton = SkeletonIconButton;
|