@atlaskit/atlassian-navigation 4.9.4 → 4.10.0
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 +14 -0
- package/dist/cjs/components/AppSwitcher/index.js +77 -23
- package/dist/cjs/components/Create/index.js +1 -1
- package/dist/cjs/components/Help/index.js +35 -3
- package/dist/cjs/components/IconButton/index.js +37 -8
- package/dist/cjs/components/Notifications/index.js +37 -5
- package/dist/cjs/components/PrimaryButton/index.js +20 -12
- package/dist/cjs/components/PrimaryDropdownButton/index.js +26 -5
- package/dist/cjs/components/ProductHome/custom-product-home.js +13 -13
- package/dist/cjs/components/ProductHome/product-home.js +13 -14
- package/dist/cjs/components/ProductHome/skeleton.js +7 -7
- package/dist/cjs/components/Profile/index.js +44 -9
- package/dist/cjs/components/Search/index.js +39 -11
- package/dist/cjs/components/Settings/index.js +34 -4
- package/dist/cjs/components/SignIn/index.js +35 -4
- package/dist/cjs/components/SkeletonPrimaryButton/index.js +1 -2
- package/dist/es2019/components/AppSwitcher/index.js +73 -19
- package/dist/es2019/components/Create/index.js +1 -1
- package/dist/es2019/components/Help/index.js +34 -2
- package/dist/es2019/components/IconButton/index.js +36 -7
- package/dist/es2019/components/Notifications/index.js +36 -4
- package/dist/es2019/components/PrimaryButton/index.js +20 -11
- package/dist/es2019/components/PrimaryDropdownButton/index.js +26 -3
- package/dist/es2019/components/ProductHome/custom-product-home.js +5 -3
- package/dist/es2019/components/ProductHome/product-home.js +5 -4
- package/dist/es2019/components/Profile/index.js +41 -8
- package/dist/es2019/components/Search/index.js +36 -7
- package/dist/es2019/components/Settings/index.js +32 -2
- package/dist/es2019/components/SignIn/index.js +33 -2
- package/dist/esm/components/AppSwitcher/index.js +77 -23
- package/dist/esm/components/Create/index.js +1 -1
- package/dist/esm/components/Help/index.js +35 -3
- package/dist/esm/components/IconButton/index.js +37 -8
- package/dist/esm/components/Notifications/index.js +37 -5
- package/dist/esm/components/PrimaryButton/index.js +20 -12
- package/dist/esm/components/PrimaryDropdownButton/index.js +26 -3
- package/dist/esm/components/ProductHome/custom-product-home.js +13 -13
- package/dist/esm/components/ProductHome/product-home.js +13 -14
- package/dist/esm/components/ProductHome/skeleton.js +5 -7
- package/dist/esm/components/Profile/index.js +44 -9
- package/dist/esm/components/Search/index.js +39 -11
- package/dist/esm/components/Settings/index.js +34 -4
- package/dist/esm/components/SignIn/index.js +35 -4
- package/dist/esm/components/SkeletonPrimaryButton/index.js +1 -2
- package/dist/types/components/AppSwitcher/index.d.ts +0 -9
- package/dist/types/components/ProductHome/product-home.d.ts +1 -1
- package/dist/types/controllers/overflow/index.d.ts +1 -1
- package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +0 -9
- package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +1 -1
- package/dist/types-ts4.5/controllers/overflow/index.d.ts +1 -1
- package/package.json +4 -3
|
@@ -11,12 +11,13 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
var _constants = require("../../common/constants");
|
|
12
12
|
var _theme = require("../../theme");
|
|
13
13
|
var _utils = require("../../utils");
|
|
14
|
-
var _css;
|
|
15
14
|
/**
|
|
16
15
|
* @jsxRuntime classic
|
|
17
16
|
* @jsx jsx
|
|
18
17
|
*/
|
|
18
|
+
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
|
+
|
|
20
21
|
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
21
22
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
22
23
|
var VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
@@ -27,7 +28,7 @@ var VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
|
27
28
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
28
29
|
var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
29
30
|
var VAR_SITE_TITLE_BG_COLOR_AFTER = '--site-title-bg-color-after';
|
|
30
|
-
var productHomeButtonStyles = (0, _react2.css)((
|
|
31
|
+
var productHomeButtonStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
31
32
|
display: 'flex',
|
|
32
33
|
padding: "var(--ds-space-050, 4px)",
|
|
33
34
|
alignItems: 'center',
|
|
@@ -64,11 +65,11 @@ var productHomeButtonStyles = (0, _react2.css)((_css = {
|
|
|
64
65
|
'div&': {
|
|
65
66
|
pointerEvents: 'none'
|
|
66
67
|
}
|
|
67
|
-
},
|
|
68
|
+
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
68
69
|
margin: "0 ".concat("var(--ds-space-100, 8px)")
|
|
69
|
-
}),
|
|
70
|
+
}), "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
70
71
|
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
71
|
-
})
|
|
72
|
+
}));
|
|
72
73
|
var productLogoStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
73
74
|
display: 'flex',
|
|
74
75
|
width: 120,
|
|
@@ -117,11 +118,10 @@ var siteTitleStyles = (0, _react2.css)({
|
|
|
117
118
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
118
119
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
119
120
|
var ProductHomeSkeleton = exports.ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
120
|
-
var _stripEmptyProperties;
|
|
121
121
|
var showSiteName = _ref.showSiteName;
|
|
122
122
|
var theme = (0, _theme.useTheme)();
|
|
123
123
|
var primaryButton = theme.mode.primaryButton;
|
|
124
|
-
var productHomeButtonDynamicStyles = (0, _utils.stripEmptyProperties)((
|
|
124
|
+
var productHomeButtonDynamicStyles = (0, _utils.stripEmptyProperties)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), VAR_SITE_TITLE_BG_COLOR_AFTER, theme.mode.skeleton.backgroundColor));
|
|
125
125
|
var siteTitleDynamicStyles = (0, _defineProperty2.default)({
|
|
126
126
|
borderRight: theme.mode.productHome.borderRight,
|
|
127
127
|
opacity: theme.mode.skeleton.opacity
|
|
@@ -7,8 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.Profile = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _IconButton = require("../IconButton");
|
|
13
|
+
var _excluded = ["component", "href", "icon", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "theme", "tooltip"];
|
|
12
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
16
|
/**
|
|
@@ -21,20 +23,53 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
21
23
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
22
24
|
*/
|
|
23
25
|
var Profile = exports.Profile = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
+
var component = props.component,
|
|
27
|
+
href = props.href,
|
|
28
|
+
icon = props.icon,
|
|
29
|
+
id = props.id,
|
|
30
|
+
isDisabled = props.isDisabled,
|
|
31
|
+
isSelected = props.isSelected,
|
|
32
|
+
labelProp = props.label,
|
|
33
|
+
onBlur = props.onBlur,
|
|
34
|
+
onClick = props.onClick,
|
|
35
|
+
onFocus = props.onFocus,
|
|
36
|
+
onMouseDown = props.onMouseDown,
|
|
37
|
+
onMouseEnter = props.onMouseEnter,
|
|
38
|
+
onMouseLeave = props.onMouseLeave,
|
|
39
|
+
onMouseUp = props.onMouseUp,
|
|
40
|
+
target = props.target,
|
|
41
|
+
testId = props.testId,
|
|
42
|
+
theme = props.theme,
|
|
43
|
+
tooltip = props.tooltip,
|
|
44
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
26
45
|
var label = labelProp || (typeof tooltip === 'string' ? tooltip : 'Your profile and settings');
|
|
27
|
-
|
|
28
|
-
// All other implementations of IconButton within the components are using spread props, so
|
|
29
|
-
// to use explicit props could cause regressions.
|
|
30
|
-
// TODO: Remove these spread props for better static analysis
|
|
31
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
32
46
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
47
|
role: "listitem"
|
|
34
48
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
49
|
+
component: component,
|
|
50
|
+
href: href,
|
|
51
|
+
icon: icon,
|
|
52
|
+
id: id,
|
|
53
|
+
isDisabled: isDisabled,
|
|
54
|
+
isSelected: isSelected,
|
|
35
55
|
label: label,
|
|
36
|
-
|
|
37
|
-
|
|
56
|
+
onBlur: onBlur,
|
|
57
|
+
onClick: onClick,
|
|
58
|
+
onFocus: onFocus,
|
|
59
|
+
onMouseDown: onMouseDown,
|
|
60
|
+
onMouseEnter: onMouseEnter,
|
|
61
|
+
onMouseLeave: onMouseLeave,
|
|
62
|
+
onMouseUp: onMouseUp,
|
|
63
|
+
ref: ref,
|
|
64
|
+
target: target,
|
|
65
|
+
testId: testId
|
|
66
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
67
|
+
,
|
|
68
|
+
theme: theme,
|
|
69
|
+
tooltip: tooltip
|
|
70
|
+
// These are mostly explicit, leaving it in just in case
|
|
71
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
72
|
+
}, rest)));
|
|
38
73
|
});
|
|
39
74
|
|
|
40
75
|
// This exists only to extract props.
|
|
@@ -15,7 +15,7 @@ var _constants = require("../../common/constants");
|
|
|
15
15
|
var _theme = require("../../theme");
|
|
16
16
|
var _utils = require("../../utils");
|
|
17
17
|
var _IconButton = require("../IconButton");
|
|
18
|
-
var _excluded = ["
|
|
18
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "placeholder", "target", "testId", "tooltip", "value"];
|
|
19
19
|
/**
|
|
20
20
|
* @jsxRuntime classic
|
|
21
21
|
* @jsx jsx
|
|
@@ -77,7 +77,6 @@ var searchIconStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@medi
|
|
|
77
77
|
display: 'none !important'
|
|
78
78
|
}));
|
|
79
79
|
var SearchComponent = function SearchComponent(props) {
|
|
80
|
-
var _stripEmptyProperties;
|
|
81
80
|
var onClick = props.onClick,
|
|
82
81
|
placeholder = props.placeholder,
|
|
83
82
|
label = props.label,
|
|
@@ -92,7 +91,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
92
91
|
// @ts-expect-error
|
|
93
92
|
onClick && onClick.apply(void 0, arguments);
|
|
94
93
|
};
|
|
95
|
-
var searchInputDynamicStyles = (0, _utils.stripEmptyProperties)((
|
|
94
|
+
var searchInputDynamicStyles = (0, _utils.stripEmptyProperties)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.varSearchBackgroundColor, search.default.backgroundColor), _constants.varSearchColor, search.default.color), _constants.varSearchBorderColor, search.default.borderColor), _constants.varSearchFocusBorderColor, search.focus.borderColor), _constants.varSearchHoverBackgroundColor, search.hover.backgroundColor));
|
|
96
95
|
return (0, _react2.jsx)("div", {
|
|
97
96
|
css: searchInputContainerStyles,
|
|
98
97
|
role: "search"
|
|
@@ -123,27 +122,56 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
123
122
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
124
123
|
*/
|
|
125
124
|
var Search = exports.Search = function Search(props) {
|
|
126
|
-
var
|
|
127
|
-
|
|
125
|
+
var component = props.component,
|
|
126
|
+
href = props.href,
|
|
127
|
+
id = props.id,
|
|
128
|
+
isDisabled = props.isDisabled,
|
|
129
|
+
isSelected = props.isSelected,
|
|
128
130
|
label = props.label,
|
|
131
|
+
onBlur = props.onBlur,
|
|
132
|
+
onClick = props.onClick,
|
|
133
|
+
onFocus = props.onFocus,
|
|
134
|
+
onMouseDown = props.onMouseDown,
|
|
135
|
+
onMouseEnter = props.onMouseEnter,
|
|
136
|
+
onMouseLeave = props.onMouseLeave,
|
|
137
|
+
onMouseUp = props.onMouseUp,
|
|
138
|
+
placeholder = props.placeholder,
|
|
139
|
+
target = props.target,
|
|
140
|
+
testId = props.testId,
|
|
141
|
+
tooltip = props.tooltip,
|
|
129
142
|
value = props.value,
|
|
130
|
-
|
|
143
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
131
144
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(SearchComponent, {
|
|
132
|
-
onClick:
|
|
145
|
+
onClick: onClick,
|
|
133
146
|
placeholder: placeholder,
|
|
134
147
|
label: label,
|
|
135
148
|
value: value || ''
|
|
136
|
-
}), (0, _react2.jsx)(_IconButton.IconButton
|
|
137
|
-
|
|
138
|
-
|
|
149
|
+
}), (0, _react2.jsx)(_IconButton.IconButton, (0, _extends2.default)({
|
|
150
|
+
component: component
|
|
151
|
+
// @ts-ignore Overriding styles is not supported.
|
|
152
|
+
,
|
|
139
153
|
css: searchIconStyles,
|
|
154
|
+
href: href,
|
|
140
155
|
icon: (0, _react2.jsx)(_search.default, {
|
|
141
156
|
color: "currentColor",
|
|
142
157
|
spacing: "spacious",
|
|
143
158
|
label: label
|
|
144
159
|
}),
|
|
160
|
+
id: id,
|
|
161
|
+
isDisabled: isDisabled,
|
|
162
|
+
isSelected: isSelected,
|
|
163
|
+
onBlur: onBlur,
|
|
164
|
+
onClick: onClick,
|
|
165
|
+
onFocus: onFocus,
|
|
166
|
+
onMouseDown: onMouseDown,
|
|
167
|
+
onMouseEnter: onMouseEnter,
|
|
168
|
+
onMouseLeave: onMouseLeave,
|
|
169
|
+
onMouseUp: onMouseUp,
|
|
170
|
+
target: target,
|
|
171
|
+
testId: testId,
|
|
145
172
|
tooltip: tooltip
|
|
173
|
+
// Made all explicit, this is left just in case
|
|
146
174
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
147
|
-
},
|
|
175
|
+
}, rest)));
|
|
148
176
|
};
|
|
149
177
|
var _default = exports.default = Search;
|
|
@@ -11,7 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _settings = _interopRequireDefault(require("@atlaskit/icon/core/migration/settings"));
|
|
13
13
|
var _IconButton = require("../IconButton");
|
|
14
|
-
var _excluded = ["tooltip"];
|
|
14
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
/**
|
|
@@ -23,18 +23,48 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
23
23
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
24
24
|
*/
|
|
25
25
|
var Settings = exports.Settings = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
26
|
-
var
|
|
27
|
-
|
|
26
|
+
var component = props.component,
|
|
27
|
+
href = props.href,
|
|
28
|
+
id = props.id,
|
|
29
|
+
isDisabled = props.isDisabled,
|
|
30
|
+
isSelected = props.isSelected,
|
|
31
|
+
label = props.label,
|
|
32
|
+
onBlur = props.onBlur,
|
|
33
|
+
onClick = props.onClick,
|
|
34
|
+
onFocus = props.onFocus,
|
|
35
|
+
onMouseDown = props.onMouseDown,
|
|
36
|
+
onMouseEnter = props.onMouseEnter,
|
|
37
|
+
onMouseLeave = props.onMouseLeave,
|
|
38
|
+
onMouseUp = props.onMouseUp,
|
|
39
|
+
target = props.target,
|
|
40
|
+
testId = props.testId,
|
|
41
|
+
tooltip = props.tooltip,
|
|
42
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
28
43
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
44
|
role: "listitem"
|
|
30
45
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
46
|
+
component: component,
|
|
47
|
+
href: href,
|
|
31
48
|
icon: /*#__PURE__*/_react.default.createElement(_settings.default, {
|
|
32
49
|
color: "currentColor",
|
|
33
50
|
spacing: "spacious",
|
|
34
51
|
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
|
|
35
52
|
}),
|
|
53
|
+
id: id,
|
|
54
|
+
isDisabled: isDisabled,
|
|
55
|
+
isSelected: isSelected,
|
|
56
|
+
label: label,
|
|
57
|
+
onBlur: onBlur,
|
|
58
|
+
onClick: onClick,
|
|
59
|
+
onFocus: onFocus,
|
|
60
|
+
onMouseDown: onMouseDown,
|
|
61
|
+
onMouseEnter: onMouseEnter,
|
|
62
|
+
onMouseLeave: onMouseLeave,
|
|
63
|
+
onMouseUp: onMouseUp,
|
|
36
64
|
ref: ref,
|
|
65
|
+
target: target,
|
|
66
|
+
testId: testId,
|
|
37
67
|
tooltip: tooltip
|
|
38
|
-
},
|
|
68
|
+
}, rest)));
|
|
39
69
|
});
|
|
40
70
|
var _default = exports.default = Settings;
|
|
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _logInSignIn = _interopRequireDefault(require("@atlaskit/icon/core/migration/log-in--sign-in"));
|
|
12
12
|
var _IconButton = require("../IconButton");
|
|
13
|
-
var _excluded = ["tooltip"];
|
|
13
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
14
14
|
/**
|
|
15
15
|
* __Sign in__
|
|
16
16
|
*
|
|
@@ -20,18 +20,49 @@ var _excluded = ["tooltip"];
|
|
|
20
20
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
21
21
|
*/
|
|
22
22
|
var SignIn = exports.SignIn = function SignIn(props) {
|
|
23
|
-
var
|
|
24
|
-
|
|
23
|
+
var component = props.component,
|
|
24
|
+
href = props.href,
|
|
25
|
+
id = props.id,
|
|
26
|
+
isDisabled = props.isDisabled,
|
|
27
|
+
isSelected = props.isSelected,
|
|
28
|
+
label = props.label,
|
|
29
|
+
onBlur = props.onBlur,
|
|
30
|
+
onClick = props.onClick,
|
|
31
|
+
onFocus = props.onFocus,
|
|
32
|
+
onMouseDown = props.onMouseDown,
|
|
33
|
+
onMouseEnter = props.onMouseEnter,
|
|
34
|
+
onMouseLeave = props.onMouseLeave,
|
|
35
|
+
onMouseUp = props.onMouseUp,
|
|
36
|
+
target = props.target,
|
|
37
|
+
testId = props.testId,
|
|
38
|
+
tooltip = props.tooltip,
|
|
39
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
25
40
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
41
|
role: "listitem"
|
|
27
42
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
43
|
+
component: component,
|
|
44
|
+
href: href,
|
|
28
45
|
icon: /*#__PURE__*/_react.default.createElement(_logInSignIn.default, {
|
|
29
46
|
color: "currentColor",
|
|
30
47
|
spacing: "spacious",
|
|
31
48
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
32
49
|
}),
|
|
50
|
+
id: id,
|
|
51
|
+
isDisabled: isDisabled,
|
|
52
|
+
isSelected: isSelected,
|
|
53
|
+
label: label,
|
|
54
|
+
onBlur: onBlur,
|
|
55
|
+
onClick: onClick,
|
|
56
|
+
onFocus: onFocus,
|
|
57
|
+
onMouseDown: onMouseDown,
|
|
58
|
+
onMouseEnter: onMouseEnter,
|
|
59
|
+
onMouseLeave: onMouseLeave,
|
|
60
|
+
onMouseUp: onMouseUp,
|
|
61
|
+
target: target,
|
|
62
|
+
testId: testId,
|
|
33
63
|
tooltip: tooltip
|
|
64
|
+
// These are all explicit, leaving it in just in case
|
|
34
65
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
35
|
-
},
|
|
66
|
+
}, rest)));
|
|
36
67
|
};
|
|
37
68
|
var _default = exports.default = SignIn;
|
|
@@ -99,7 +99,6 @@ var buttonWrapperStyles = (0, _react.css)({
|
|
|
99
99
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
100
100
|
*/
|
|
101
101
|
var SkeletonPrimaryButton = exports.SkeletonPrimaryButton = function SkeletonPrimaryButton(_ref) {
|
|
102
|
-
var _objectSpread2;
|
|
103
102
|
var _ref$isDropdownButton = _ref.isDropdownButton,
|
|
104
103
|
isDropdownButton = _ref$isDropdownButton === void 0 ? false : _ref$isDropdownButton,
|
|
105
104
|
_ref$isHighlighted = _ref.isHighlighted,
|
|
@@ -111,7 +110,7 @@ var SkeletonPrimaryButton = exports.SkeletonPrimaryButton = function SkeletonPri
|
|
|
111
110
|
var primaryButton = theme.mode.primaryButton;
|
|
112
111
|
var dynamicStyles = (0, _utils.stripEmptyProperties)(_objectSpread(_objectSpread(_objectSpread({}, primaryButton.default), isHighlighted && {
|
|
113
112
|
color: primaryButton.selected.color
|
|
114
|
-
}), {}, (
|
|
113
|
+
}), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, VAR_PRIMARY_BUTTON_BEFORE_HIGHLIGHTED_BACKGROUND_COLOR, primaryButton.selected.borderColor), VAR_PRIMARY_BUTTON_AFTER_DROPDOWN_BORDER_COLOR, isHighlighted ? primaryButton.default.borderColor : primaryButton.default.color)));
|
|
115
114
|
return (0, _react.jsx)("div", {
|
|
116
115
|
role: "listitem",
|
|
117
116
|
css: buttonWrapperStyles
|
|
@@ -14,44 +14,98 @@ import { IconButton } from '../IconButton';
|
|
|
14
14
|
*/
|
|
15
15
|
export const AppSwitcher = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
16
|
const {
|
|
17
|
+
component,
|
|
18
|
+
href,
|
|
19
|
+
id,
|
|
20
|
+
isDisabled,
|
|
21
|
+
isSelected,
|
|
22
|
+
label,
|
|
23
|
+
onBlur,
|
|
24
|
+
onClick,
|
|
25
|
+
onFocus,
|
|
26
|
+
onMouseDown,
|
|
27
|
+
onMouseEnter,
|
|
28
|
+
onMouseLeave,
|
|
29
|
+
onMouseUp,
|
|
30
|
+
target,
|
|
31
|
+
testId,
|
|
17
32
|
tooltip,
|
|
18
|
-
...
|
|
33
|
+
...rest
|
|
19
34
|
} = props;
|
|
20
35
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
36
|
+
component: component,
|
|
37
|
+
href: href,
|
|
21
38
|
icon: /*#__PURE__*/React.createElement(AppSwitcherIcon, {
|
|
22
39
|
color: "currentColor",
|
|
23
40
|
spacing: "spacious",
|
|
24
41
|
label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
|
|
25
42
|
}),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
id: id,
|
|
44
|
+
isDisabled: isDisabled,
|
|
45
|
+
isSelected: isSelected,
|
|
46
|
+
label: label,
|
|
47
|
+
onBlur: onBlur,
|
|
48
|
+
onClick: onClick,
|
|
49
|
+
onFocus: onFocus,
|
|
50
|
+
onMouseDown: onMouseDown,
|
|
51
|
+
onMouseEnter: onMouseEnter,
|
|
52
|
+
onMouseLeave: onMouseLeave,
|
|
53
|
+
onMouseUp: onMouseUp,
|
|
54
|
+
ref: ref,
|
|
55
|
+
target: target,
|
|
56
|
+
testId: testId,
|
|
57
|
+
tooltip: tooltip
|
|
58
|
+
// These are all explicit, leaving it in just in case
|
|
59
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
60
|
+
}, rest));
|
|
29
61
|
});
|
|
30
62
|
|
|
31
|
-
//
|
|
32
|
-
// Remove links that the component does not have (such as usage). If there are no links remove them all.
|
|
33
|
-
/**
|
|
34
|
-
* __App switcher nav 4__
|
|
35
|
-
*
|
|
36
|
-
* An app switcher nav 4 {description}.
|
|
37
|
-
*
|
|
38
|
-
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
39
|
-
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
40
|
-
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
41
|
-
*/
|
|
63
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
42
64
|
export const AppSwitcherNav4 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
43
65
|
const {
|
|
66
|
+
component,
|
|
67
|
+
href,
|
|
68
|
+
id,
|
|
69
|
+
isDisabled,
|
|
70
|
+
isSelected,
|
|
71
|
+
label,
|
|
72
|
+
onBlur,
|
|
73
|
+
onClick,
|
|
74
|
+
onFocus,
|
|
75
|
+
onMouseDown,
|
|
76
|
+
onMouseEnter,
|
|
77
|
+
onMouseLeave,
|
|
78
|
+
onMouseUp,
|
|
79
|
+
target,
|
|
80
|
+
testId,
|
|
44
81
|
tooltip,
|
|
45
|
-
...
|
|
82
|
+
...rest
|
|
46
83
|
} = props;
|
|
47
84
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
48
85
|
icon: /*#__PURE__*/React.createElement(Nav4AppSwitcherIcon, {
|
|
49
86
|
label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
|
|
50
87
|
color: "var(--ds-icon, #44546F)"
|
|
51
88
|
}),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
89
|
+
component: component,
|
|
90
|
+
href: href,
|
|
91
|
+
id: id,
|
|
92
|
+
isDisabled: isDisabled,
|
|
93
|
+
isSelected: isSelected,
|
|
94
|
+
label: label,
|
|
95
|
+
onBlur: onBlur,
|
|
96
|
+
onClick: onClick,
|
|
97
|
+
onFocus: onFocus,
|
|
98
|
+
onMouseDown: onMouseDown,
|
|
99
|
+
onMouseEnter: onMouseEnter,
|
|
100
|
+
onMouseLeave: onMouseLeave,
|
|
101
|
+
onMouseUp: onMouseUp,
|
|
102
|
+
ref: ref,
|
|
103
|
+
target: target,
|
|
104
|
+
testId: testId,
|
|
105
|
+
tooltip: tooltip
|
|
106
|
+
// These are all explicit, leaving it in just in case
|
|
107
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
108
|
+
}, rest));
|
|
55
109
|
});
|
|
56
110
|
|
|
57
111
|
// exists only to extract props
|
|
@@ -75,7 +75,7 @@ export const Create = ({
|
|
|
75
75
|
"aria-label": label,
|
|
76
76
|
onClick: onClick,
|
|
77
77
|
href: href
|
|
78
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
78
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
|
|
79
79
|
,
|
|
80
80
|
theme: getCreateButtonTheme(theme),
|
|
81
81
|
testId: testId && `${testId}-button`,
|
|
@@ -17,8 +17,23 @@ const HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count
|
|
|
17
17
|
export const Help = /*#__PURE__*/forwardRef((props, ref) => {
|
|
18
18
|
const {
|
|
19
19
|
badge,
|
|
20
|
+
component,
|
|
21
|
+
href,
|
|
22
|
+
id,
|
|
23
|
+
isDisabled,
|
|
24
|
+
isSelected,
|
|
25
|
+
label,
|
|
26
|
+
onBlur,
|
|
27
|
+
onClick,
|
|
28
|
+
onFocus,
|
|
29
|
+
onMouseDown,
|
|
30
|
+
onMouseEnter,
|
|
31
|
+
onMouseLeave,
|
|
32
|
+
onMouseUp,
|
|
33
|
+
target,
|
|
34
|
+
testId,
|
|
20
35
|
tooltip,
|
|
21
|
-
...
|
|
36
|
+
...rest
|
|
22
37
|
} = props;
|
|
23
38
|
const {
|
|
24
39
|
mode: {
|
|
@@ -26,15 +41,32 @@ export const Help = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
26
41
|
}
|
|
27
42
|
} = useTheme();
|
|
28
43
|
const button = /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
44
|
+
component: component,
|
|
45
|
+
href: href,
|
|
29
46
|
icon: /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
30
47
|
label: typeof tooltip === 'string' ? tooltip : 'Help Icon',
|
|
31
48
|
color: "currentColor",
|
|
32
49
|
spacing: "spacious",
|
|
33
50
|
LEGACY_secondaryColor: navigation.backgroundColor
|
|
34
51
|
}),
|
|
52
|
+
id: id,
|
|
53
|
+
isDisabled: isDisabled,
|
|
54
|
+
isSelected: isSelected,
|
|
55
|
+
label: label,
|
|
56
|
+
onBlur: onBlur,
|
|
57
|
+
onClick: onClick,
|
|
58
|
+
onFocus: onFocus,
|
|
59
|
+
onMouseDown: onMouseDown,
|
|
60
|
+
onMouseEnter: onMouseEnter,
|
|
61
|
+
onMouseLeave: onMouseLeave,
|
|
62
|
+
onMouseUp: onMouseUp,
|
|
35
63
|
ref: ref,
|
|
64
|
+
target: target,
|
|
65
|
+
testId: testId,
|
|
36
66
|
tooltip: tooltip
|
|
37
|
-
|
|
67
|
+
// These are all explicit, leaving it in just in case
|
|
68
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
69
|
+
}, rest));
|
|
38
70
|
return badge ? /*#__PURE__*/React.createElement(BadgeContainer, {
|
|
39
71
|
id: HELP_NOTIFICATION_BADGE_ID,
|
|
40
72
|
badge: badge,
|
|
@@ -19,19 +19,48 @@ export const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
19
19
|
label,
|
|
20
20
|
testId,
|
|
21
21
|
tooltip,
|
|
22
|
-
|
|
22
|
+
component,
|
|
23
|
+
href,
|
|
24
|
+
id,
|
|
25
|
+
isDisabled,
|
|
26
|
+
isSelected,
|
|
27
|
+
onBlur,
|
|
28
|
+
onClick,
|
|
29
|
+
onFocus,
|
|
30
|
+
onMouseDown,
|
|
31
|
+
onMouseEnter,
|
|
32
|
+
onMouseLeave,
|
|
33
|
+
onMouseUp,
|
|
34
|
+
target,
|
|
35
|
+
theme,
|
|
36
|
+
...rest
|
|
23
37
|
} = props;
|
|
24
|
-
const
|
|
38
|
+
const themeFromContext = useTheme();
|
|
25
39
|
const button = /*#__PURE__*/React.createElement(Button, _extends({
|
|
26
40
|
appearance: "primary",
|
|
27
41
|
"aria-label": label,
|
|
28
|
-
|
|
42
|
+
component: component,
|
|
43
|
+
href: href,
|
|
29
44
|
iconBefore: icon,
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
id: id,
|
|
46
|
+
isDisabled: isDisabled,
|
|
47
|
+
isSelected: isSelected,
|
|
48
|
+
onBlur: onBlur,
|
|
49
|
+
onClick: onClick,
|
|
50
|
+
onFocus: onFocus,
|
|
51
|
+
onMouseDown: onMouseDown,
|
|
52
|
+
onMouseEnter: onMouseEnter,
|
|
53
|
+
onMouseLeave: onMouseLeave,
|
|
54
|
+
onMouseUp: onMouseUp,
|
|
55
|
+
ref: ref,
|
|
56
|
+
target: target,
|
|
57
|
+
testId: testId
|
|
58
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
|
|
32
59
|
,
|
|
33
|
-
theme: getIconButtonTheme(
|
|
34
|
-
|
|
60
|
+
theme: theme || getIconButtonTheme(themeFromContext)
|
|
61
|
+
// These are all explicit, leaving it in just in case
|
|
62
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
63
|
+
}, rest));
|
|
35
64
|
if (tooltip) {
|
|
36
65
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
37
66
|
content: tooltip,
|
|
@@ -17,22 +17,54 @@ const NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
|
17
17
|
export const Notifications = /*#__PURE__*/forwardRef((props, ref) => {
|
|
18
18
|
const {
|
|
19
19
|
badge,
|
|
20
|
+
component,
|
|
21
|
+
href,
|
|
22
|
+
id,
|
|
23
|
+
isDisabled,
|
|
24
|
+
isSelected,
|
|
25
|
+
label,
|
|
26
|
+
onBlur,
|
|
27
|
+
onClick,
|
|
28
|
+
onFocus,
|
|
29
|
+
onMouseDown,
|
|
30
|
+
onMouseEnter,
|
|
31
|
+
onMouseLeave,
|
|
32
|
+
onMouseUp,
|
|
33
|
+
target,
|
|
34
|
+
testId,
|
|
20
35
|
tooltip,
|
|
21
|
-
...
|
|
36
|
+
...rest
|
|
22
37
|
} = props;
|
|
23
38
|
return /*#__PURE__*/React.createElement(BadgeContainer, {
|
|
24
39
|
id: NOTIFICATIONS_BADGE_ID,
|
|
25
40
|
badge: badge,
|
|
26
41
|
role: "listitem"
|
|
27
42
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
43
|
+
"aria-describedby": NOTIFICATIONS_BADGE_ID,
|
|
44
|
+
component: component,
|
|
45
|
+
href: href,
|
|
28
46
|
icon: /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
29
47
|
spacing: "spacious",
|
|
30
48
|
color: "currentColor",
|
|
31
49
|
label: typeof tooltip === 'string' ? tooltip : 'Notification Icon'
|
|
32
50
|
}),
|
|
33
|
-
|
|
51
|
+
id: id,
|
|
52
|
+
isDisabled: isDisabled,
|
|
53
|
+
isSelected: isSelected,
|
|
54
|
+
label: label,
|
|
55
|
+
onBlur: onBlur,
|
|
56
|
+
onClick: onClick,
|
|
57
|
+
onFocus: onFocus,
|
|
58
|
+
onMouseDown: onMouseDown,
|
|
59
|
+
onMouseEnter: onMouseEnter,
|
|
60
|
+
onMouseLeave: onMouseLeave,
|
|
61
|
+
onMouseUp: onMouseUp,
|
|
34
62
|
ref: ref,
|
|
35
|
-
|
|
36
|
-
|
|
63
|
+
target: target,
|
|
64
|
+
testId: testId,
|
|
65
|
+
tooltip: tooltip
|
|
66
|
+
// These are all explicit, leaving it in just in case
|
|
67
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
68
|
+
}, rest)));
|
|
37
69
|
});
|
|
38
70
|
export default Notifications;
|