@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["badge", "tooltip"];
|
|
3
|
+
var _excluded = ["badge", "component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import NotificationIcon from '@atlaskit/icon/core/migration/notification';
|
|
6
6
|
import { BadgeContainer } from '../BadgeContainer';
|
|
@@ -18,21 +18,53 @@ var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
|
18
18
|
*/
|
|
19
19
|
export var Notifications = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
20
20
|
var badge = props.badge,
|
|
21
|
+
component = props.component,
|
|
22
|
+
href = props.href,
|
|
23
|
+
id = props.id,
|
|
24
|
+
isDisabled = props.isDisabled,
|
|
25
|
+
isSelected = props.isSelected,
|
|
26
|
+
label = props.label,
|
|
27
|
+
onBlur = props.onBlur,
|
|
28
|
+
onClick = props.onClick,
|
|
29
|
+
onFocus = props.onFocus,
|
|
30
|
+
onMouseDown = props.onMouseDown,
|
|
31
|
+
onMouseEnter = props.onMouseEnter,
|
|
32
|
+
onMouseLeave = props.onMouseLeave,
|
|
33
|
+
onMouseUp = props.onMouseUp,
|
|
34
|
+
target = props.target,
|
|
35
|
+
testId = props.testId,
|
|
21
36
|
tooltip = props.tooltip,
|
|
22
|
-
|
|
37
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "
|
|
4
|
+
var _excluded = ["children", "component", "isHighlighted", "isLoading", "isSelected", "onClick", "testId", "theme", "tooltip"];
|
|
5
5
|
/**
|
|
6
6
|
* @jsxRuntime classic
|
|
7
7
|
* @jsx jsx
|
|
@@ -53,29 +53,37 @@ var buttonHighlightedStyles = css({
|
|
|
53
53
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
54
54
|
*/
|
|
55
55
|
export var PrimaryButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
56
|
-
var _ref;
|
|
57
56
|
var children = props.children,
|
|
57
|
+
component = props.component,
|
|
58
|
+
isHighlighted = props.isHighlighted,
|
|
59
|
+
isLoading = props.isLoading,
|
|
60
|
+
isSelected = props.isSelected,
|
|
61
|
+
onClick = props.onClick,
|
|
58
62
|
testId = props.testId,
|
|
63
|
+
theme = props.theme,
|
|
59
64
|
tooltip = props.tooltip,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
buttonProps = _objectWithoutProperties(props, _excluded);
|
|
63
|
-
var theme = useTheme();
|
|
65
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
66
|
+
var themeFromContext = useTheme();
|
|
64
67
|
var button = jsx("div", {
|
|
65
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
66
|
-
style: (
|
|
69
|
+
style: _defineProperty(_defineProperty({}, VAR_BUTTON_SELECTED_COLOR, themeFromContext.mode.primaryButton.selected.color), VAR_BUTTON_SELECTED_BORDER_COLOR, themeFromContext.mode.primaryButton.selected.borderColor),
|
|
67
70
|
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles],
|
|
68
71
|
role: "listitem",
|
|
69
72
|
"data-vc": "primary-button"
|
|
70
73
|
}, jsx(Button, _extends({
|
|
71
74
|
appearance: "primary",
|
|
72
|
-
|
|
75
|
+
component: component,
|
|
76
|
+
isLoading: isLoading,
|
|
77
|
+
isSelected: isSelected,
|
|
78
|
+
onClick: onClick,
|
|
73
79
|
ref: ref,
|
|
74
|
-
|
|
75
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
80
|
+
testId: testId
|
|
81
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
|
|
76
82
|
,
|
|
77
|
-
theme: getPrimaryButtonTheme(
|
|
78
|
-
|
|
83
|
+
theme: theme || getPrimaryButtonTheme(themeFromContext)
|
|
84
|
+
// These are all explicit, leaving it in just in case
|
|
85
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
86
|
+
}, rest), children));
|
|
79
87
|
if (tooltip) {
|
|
80
88
|
return jsx(Tooltip, {
|
|
81
89
|
content: tooltip,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["component", "isHighlighted", "isLoading", "onClick", "testId", "theme", "tooltip"];
|
|
2
4
|
/**
|
|
3
5
|
* @jsxRuntime classic
|
|
4
6
|
* @jsx jsx
|
|
@@ -21,8 +23,19 @@ import { PrimaryButton } from '../PrimaryButton';
|
|
|
21
23
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
22
24
|
*/
|
|
23
25
|
export var PrimaryDropdownButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
|
+
var component = props.component,
|
|
27
|
+
isHighlighted = props.isHighlighted,
|
|
28
|
+
isLoading = props.isLoading,
|
|
29
|
+
onClick = props.onClick,
|
|
30
|
+
testId = props.testId,
|
|
31
|
+
theme = props.theme,
|
|
32
|
+
tooltip = props.tooltip,
|
|
33
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
24
34
|
return jsx(PrimaryButton, _extends({
|
|
25
|
-
|
|
35
|
+
component: component,
|
|
36
|
+
iconAfter:
|
|
37
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
38
|
+
fg('platform-component-visual-refresh') ? jsx(ChevronIcon, {
|
|
26
39
|
label: "",
|
|
27
40
|
color: "currentColor"
|
|
28
41
|
}) : jsx(ChevronIconMigration, {
|
|
@@ -30,7 +43,17 @@ export var PrimaryDropdownButton = /*#__PURE__*/forwardRef(function (props, ref)
|
|
|
30
43
|
color: "currentColor",
|
|
31
44
|
label: ""
|
|
32
45
|
}),
|
|
33
|
-
|
|
34
|
-
|
|
46
|
+
isHighlighted: isHighlighted,
|
|
47
|
+
isLoading: isLoading,
|
|
48
|
+
onClick: onClick,
|
|
49
|
+
ref: ref,
|
|
50
|
+
testId: testId
|
|
51
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
52
|
+
,
|
|
53
|
+
theme: theme,
|
|
54
|
+
tooltip: tooltip
|
|
55
|
+
// These are mostly explicit, leaving it in just in case
|
|
56
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
57
|
+
}, rest));
|
|
35
58
|
});
|
|
36
59
|
export default PrimaryDropdownButton;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["iconAlt", "iconUrl", "logoAlt", "
|
|
5
|
-
var _css3;
|
|
4
|
+
var _excluded = ["href", "iconAlt", "iconUrl", "logoAlt", "logoMaxWidth", "logoUrl", "onClick", "onMouseDown", "siteTitle", "testId"];
|
|
6
5
|
/**
|
|
7
6
|
* @jsxRuntime classic
|
|
8
7
|
* @jsx jsx
|
|
@@ -41,7 +40,7 @@ var productIconStyles = css(_defineProperty({
|
|
|
41
40
|
}, "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
42
41
|
display: 'none'
|
|
43
42
|
}));
|
|
44
|
-
var productHomeButtonStyles = css((
|
|
43
|
+
var productHomeButtonStyles = css(_defineProperty(_defineProperty({
|
|
45
44
|
display: 'flex',
|
|
46
45
|
padding: "var(--ds-space-050, 4px)",
|
|
47
46
|
alignItems: 'center',
|
|
@@ -77,11 +76,11 @@ var productHomeButtonStyles = css((_css3 = {
|
|
|
77
76
|
'div&': {
|
|
78
77
|
pointerEvents: 'none'
|
|
79
78
|
}
|
|
80
|
-
},
|
|
79
|
+
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
81
80
|
margin: "0 ".concat("var(--ds-space-100, 8px)")
|
|
82
|
-
}),
|
|
81
|
+
}), "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
83
82
|
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
84
|
-
})
|
|
83
|
+
}));
|
|
85
84
|
var siteTitleStyles = css({
|
|
86
85
|
display: 'flex',
|
|
87
86
|
alignItems: 'center',
|
|
@@ -99,18 +98,17 @@ var siteTitleStyles = css({
|
|
|
99
98
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
100
99
|
*/
|
|
101
100
|
var CustomProductHome = function CustomProductHome(props) {
|
|
102
|
-
var
|
|
103
|
-
|
|
101
|
+
var href = props.href,
|
|
102
|
+
iconAlt = props.iconAlt,
|
|
104
103
|
iconUrl = props.iconUrl,
|
|
105
104
|
logoAlt = props.logoAlt,
|
|
105
|
+
_props$logoMaxWidth = props.logoMaxWidth,
|
|
106
|
+
logoMaxWidth = _props$logoMaxWidth === void 0 ? 260 : _props$logoMaxWidth,
|
|
106
107
|
logoUrl = props.logoUrl,
|
|
107
|
-
href = props.href,
|
|
108
108
|
onClick = props.onClick,
|
|
109
|
-
siteTitle = props.siteTitle,
|
|
110
109
|
onMouseDown = props.onMouseDown,
|
|
110
|
+
siteTitle = props.siteTitle,
|
|
111
111
|
testId = props.testId,
|
|
112
|
-
_props$logoMaxWidth = props.logoMaxWidth,
|
|
113
|
-
logoMaxWidth = _props$logoMaxWidth === void 0 ? 260 : _props$logoMaxWidth,
|
|
114
112
|
rest = _objectWithoutProperties(props, _excluded);
|
|
115
113
|
var theme = useTheme();
|
|
116
114
|
var primaryButton = theme.mode.primaryButton;
|
|
@@ -119,7 +117,7 @@ var CustomProductHome = function CustomProductHome(props) {
|
|
|
119
117
|
event.preventDefault();
|
|
120
118
|
onMouseDown && onMouseDown(event);
|
|
121
119
|
};
|
|
122
|
-
var productHomeButtonDynamicStyles = (
|
|
120
|
+
var productHomeButtonDynamicStyles = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 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);
|
|
123
121
|
return jsx(Fragment, null, jsx(Tag, _extends({
|
|
124
122
|
href: href
|
|
125
123
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -129,6 +127,8 @@ var CustomProductHome = function CustomProductHome(props) {
|
|
|
129
127
|
onClick: onClick,
|
|
130
128
|
onMouseDown: preventFocusRing,
|
|
131
129
|
"data-testid": testId && "".concat(testId, "-container")
|
|
130
|
+
// Currently all props are mapped, but leaving in case people are
|
|
131
|
+
// passing non-explicit props
|
|
132
132
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
133
133
|
}, rest), logoUrl && jsx("img", {
|
|
134
134
|
style: {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["
|
|
5
|
-
var _css;
|
|
4
|
+
var _excluded = ["aria-label", "href", "icon", "logo", "logoMaxWidth", "onClick", "onMouseDown", "siteTitle", "testId"];
|
|
6
5
|
/**
|
|
7
6
|
* @jsxRuntime classic
|
|
8
7
|
* @jsx jsx
|
|
@@ -25,7 +24,7 @@ var VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
|
|
|
25
24
|
var VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
26
25
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
27
26
|
var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
28
|
-
var productHomeButtonStyles = css((
|
|
27
|
+
var productHomeButtonStyles = css(_defineProperty(_defineProperty({
|
|
29
28
|
display: 'flex',
|
|
30
29
|
padding: "var(--ds-space-050, 4px)",
|
|
31
30
|
alignItems: 'center',
|
|
@@ -61,11 +60,11 @@ var productHomeButtonStyles = css((_css = {
|
|
|
61
60
|
'div&': {
|
|
62
61
|
pointerEvents: 'none'
|
|
63
62
|
}
|
|
64
|
-
},
|
|
63
|
+
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
65
64
|
margin: "0 ".concat("var(--ds-space-100, 8px)")
|
|
66
|
-
}),
|
|
65
|
+
}), "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
67
66
|
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
68
|
-
})
|
|
67
|
+
}));
|
|
69
68
|
var productLogoStyles = css(_defineProperty({
|
|
70
69
|
// Ensure anything passed into
|
|
71
70
|
// productHome is aligned correctly
|
|
@@ -116,17 +115,16 @@ var siteTitleStyles = css({
|
|
|
116
115
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
117
116
|
*/
|
|
118
117
|
var ProductHome = function ProductHome(_ref) {
|
|
119
|
-
var
|
|
120
|
-
|
|
118
|
+
var ariaLabel = _ref['aria-label'],
|
|
119
|
+
href = _ref.href,
|
|
120
|
+
Icon = _ref.icon,
|
|
121
121
|
Logo = _ref.logo,
|
|
122
|
-
|
|
122
|
+
_ref$logoMaxWidth = _ref.logoMaxWidth,
|
|
123
|
+
logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
|
|
123
124
|
onClick = _ref.onClick,
|
|
124
|
-
href = _ref.href,
|
|
125
125
|
onMouseDown = _ref.onMouseDown,
|
|
126
|
+
siteTitle = _ref.siteTitle,
|
|
126
127
|
testId = _ref.testId,
|
|
127
|
-
_ref$logoMaxWidth = _ref.logoMaxWidth,
|
|
128
|
-
logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
|
|
129
|
-
ariaLabel = _ref['aria-label'],
|
|
130
128
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
131
129
|
var theme = useTheme();
|
|
132
130
|
var primaryButton = theme.mode.primaryButton;
|
|
@@ -140,7 +138,7 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
140
138
|
e.preventDefault();
|
|
141
139
|
onMouseDown && onMouseDown(e);
|
|
142
140
|
};
|
|
143
|
-
var productHomeButtonDynamicStyles = stripEmptyProperties((
|
|
141
|
+
var productHomeButtonDynamicStyles = stripEmptyProperties(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 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_LOGO_MAX_WIDTH, "".concat(logoMaxWidth, "px")));
|
|
144
142
|
return jsx(Fragment, null, jsx(Tag
|
|
145
143
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
146
144
|
, _extends({
|
|
@@ -151,6 +149,7 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
151
149
|
onMouseDown: preventFocusRing,
|
|
152
150
|
"data-testid": testId && "".concat(testId, "-container"),
|
|
153
151
|
"aria-label": ariaLabel
|
|
152
|
+
// Made all props explicit, leaving just in case
|
|
154
153
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
155
154
|
}, rest), jsx("div", {
|
|
156
155
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css;
|
|
3
2
|
/**
|
|
4
3
|
* @jsxRuntime classic
|
|
5
4
|
* @jsx jsx
|
|
@@ -22,7 +21,7 @@ var VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
|
22
21
|
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
23
22
|
var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
24
23
|
var VAR_SITE_TITLE_BG_COLOR_AFTER = '--site-title-bg-color-after';
|
|
25
|
-
var productHomeButtonStyles = css((
|
|
24
|
+
var productHomeButtonStyles = css(_defineProperty(_defineProperty({
|
|
26
25
|
display: 'flex',
|
|
27
26
|
padding: "var(--ds-space-050, 4px)",
|
|
28
27
|
alignItems: 'center',
|
|
@@ -59,11 +58,11 @@ var productHomeButtonStyles = css((_css = {
|
|
|
59
58
|
'div&': {
|
|
60
59
|
pointerEvents: 'none'
|
|
61
60
|
}
|
|
62
|
-
},
|
|
61
|
+
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
63
62
|
margin: "0 ".concat("var(--ds-space-100, 8px)")
|
|
64
|
-
}),
|
|
63
|
+
}), "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
65
64
|
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
66
|
-
})
|
|
65
|
+
}));
|
|
67
66
|
var productLogoStyles = css(_defineProperty({
|
|
68
67
|
display: 'flex',
|
|
69
68
|
width: 120,
|
|
@@ -112,11 +111,10 @@ var siteTitleStyles = css({
|
|
|
112
111
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
113
112
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
114
113
|
export var ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
115
|
-
var _stripEmptyProperties;
|
|
116
114
|
var showSiteName = _ref.showSiteName;
|
|
117
115
|
var theme = useTheme();
|
|
118
116
|
var primaryButton = theme.mode.primaryButton;
|
|
119
|
-
var productHomeButtonDynamicStyles = stripEmptyProperties((
|
|
117
|
+
var productHomeButtonDynamicStyles = stripEmptyProperties(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 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));
|
|
120
118
|
var siteTitleDynamicStyles = _defineProperty({
|
|
121
119
|
borderRight: theme.mode.productHome.borderRight,
|
|
122
120
|
opacity: theme.mode.skeleton.opacity
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["component", "href", "icon", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "theme", "tooltip"];
|
|
2
4
|
import React, { forwardRef } from 'react';
|
|
3
5
|
import { IconButton } from '../IconButton';
|
|
4
6
|
/**
|
|
@@ -11,20 +13,53 @@ import { IconButton } from '../IconButton';
|
|
|
11
13
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
12
14
|
*/
|
|
13
15
|
export var Profile = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
+
var component = props.component,
|
|
17
|
+
href = props.href,
|
|
18
|
+
icon = props.icon,
|
|
19
|
+
id = props.id,
|
|
20
|
+
isDisabled = props.isDisabled,
|
|
21
|
+
isSelected = props.isSelected,
|
|
22
|
+
labelProp = props.label,
|
|
23
|
+
onBlur = props.onBlur,
|
|
24
|
+
onClick = props.onClick,
|
|
25
|
+
onFocus = props.onFocus,
|
|
26
|
+
onMouseDown = props.onMouseDown,
|
|
27
|
+
onMouseEnter = props.onMouseEnter,
|
|
28
|
+
onMouseLeave = props.onMouseLeave,
|
|
29
|
+
onMouseUp = props.onMouseUp,
|
|
30
|
+
target = props.target,
|
|
31
|
+
testId = props.testId,
|
|
32
|
+
theme = props.theme,
|
|
33
|
+
tooltip = props.tooltip,
|
|
34
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
16
35
|
var label = labelProp || (typeof tooltip === 'string' ? tooltip : 'Your profile and settings');
|
|
17
|
-
|
|
18
|
-
// All other implementations of IconButton within the components are using spread props, so
|
|
19
|
-
// to use explicit props could cause regressions.
|
|
20
|
-
// TODO: Remove these spread props for better static analysis
|
|
21
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
22
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
37
|
role: "listitem"
|
|
24
38
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
39
|
+
component: component,
|
|
40
|
+
href: href,
|
|
41
|
+
icon: icon,
|
|
42
|
+
id: id,
|
|
43
|
+
isDisabled: isDisabled,
|
|
44
|
+
isSelected: isSelected,
|
|
25
45
|
label: label,
|
|
26
|
-
|
|
27
|
-
|
|
46
|
+
onBlur: onBlur,
|
|
47
|
+
onClick: onClick,
|
|
48
|
+
onFocus: onFocus,
|
|
49
|
+
onMouseDown: onMouseDown,
|
|
50
|
+
onMouseEnter: onMouseEnter,
|
|
51
|
+
onMouseLeave: onMouseLeave,
|
|
52
|
+
onMouseUp: onMouseUp,
|
|
53
|
+
ref: ref,
|
|
54
|
+
target: target,
|
|
55
|
+
testId: testId
|
|
56
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
57
|
+
,
|
|
58
|
+
theme: theme,
|
|
59
|
+
tooltip: tooltip
|
|
60
|
+
// These are mostly explicit, leaving it in just in case
|
|
61
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
62
|
+
}, rest)));
|
|
28
63
|
});
|
|
29
64
|
|
|
30
65
|
// This exists only to extract props.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["
|
|
4
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "placeholder", "target", "testId", "tooltip", "value"];
|
|
5
5
|
/**
|
|
6
6
|
* @jsxRuntime classic
|
|
7
7
|
* @jsx jsx
|
|
@@ -71,7 +71,6 @@ var searchIconStyles = css(_defineProperty({}, "@media (min-width: ".concat(CREA
|
|
|
71
71
|
display: 'none !important'
|
|
72
72
|
}));
|
|
73
73
|
var SearchComponent = function SearchComponent(props) {
|
|
74
|
-
var _stripEmptyProperties;
|
|
75
74
|
var onClick = props.onClick,
|
|
76
75
|
placeholder = props.placeholder,
|
|
77
76
|
label = props.label,
|
|
@@ -86,7 +85,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
86
85
|
// @ts-expect-error
|
|
87
86
|
onClick && onClick.apply(void 0, arguments);
|
|
88
87
|
};
|
|
89
|
-
var searchInputDynamicStyles = stripEmptyProperties((
|
|
88
|
+
var searchInputDynamicStyles = stripEmptyProperties(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, varSearchBackgroundColor, search.default.backgroundColor), varSearchColor, search.default.color), varSearchBorderColor, search.default.borderColor), varSearchFocusBorderColor, search.focus.borderColor), varSearchHoverBackgroundColor, search.hover.backgroundColor));
|
|
90
89
|
return jsx("div", {
|
|
91
90
|
css: searchInputContainerStyles,
|
|
92
91
|
role: "search"
|
|
@@ -117,27 +116,56 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
117
116
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
118
117
|
*/
|
|
119
118
|
export var Search = function Search(props) {
|
|
120
|
-
var
|
|
121
|
-
|
|
119
|
+
var component = props.component,
|
|
120
|
+
href = props.href,
|
|
121
|
+
id = props.id,
|
|
122
|
+
isDisabled = props.isDisabled,
|
|
123
|
+
isSelected = props.isSelected,
|
|
122
124
|
label = props.label,
|
|
125
|
+
onBlur = props.onBlur,
|
|
126
|
+
onClick = props.onClick,
|
|
127
|
+
onFocus = props.onFocus,
|
|
128
|
+
onMouseDown = props.onMouseDown,
|
|
129
|
+
onMouseEnter = props.onMouseEnter,
|
|
130
|
+
onMouseLeave = props.onMouseLeave,
|
|
131
|
+
onMouseUp = props.onMouseUp,
|
|
132
|
+
placeholder = props.placeholder,
|
|
133
|
+
target = props.target,
|
|
134
|
+
testId = props.testId,
|
|
135
|
+
tooltip = props.tooltip,
|
|
123
136
|
value = props.value,
|
|
124
|
-
|
|
137
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
125
138
|
return jsx(Fragment, null, jsx(SearchComponent, {
|
|
126
|
-
onClick:
|
|
139
|
+
onClick: onClick,
|
|
127
140
|
placeholder: placeholder,
|
|
128
141
|
label: label,
|
|
129
142
|
value: value || ''
|
|
130
|
-
}), jsx(IconButton
|
|
131
|
-
|
|
132
|
-
|
|
143
|
+
}), jsx(IconButton, _extends({
|
|
144
|
+
component: component
|
|
145
|
+
// @ts-ignore Overriding styles is not supported.
|
|
146
|
+
,
|
|
133
147
|
css: searchIconStyles,
|
|
148
|
+
href: href,
|
|
134
149
|
icon: jsx(SearchIcon, {
|
|
135
150
|
color: "currentColor",
|
|
136
151
|
spacing: "spacious",
|
|
137
152
|
label: label
|
|
138
153
|
}),
|
|
154
|
+
id: id,
|
|
155
|
+
isDisabled: isDisabled,
|
|
156
|
+
isSelected: isSelected,
|
|
157
|
+
onBlur: onBlur,
|
|
158
|
+
onClick: onClick,
|
|
159
|
+
onFocus: onFocus,
|
|
160
|
+
onMouseDown: onMouseDown,
|
|
161
|
+
onMouseEnter: onMouseEnter,
|
|
162
|
+
onMouseLeave: onMouseLeave,
|
|
163
|
+
onMouseUp: onMouseUp,
|
|
164
|
+
target: target,
|
|
165
|
+
testId: testId,
|
|
139
166
|
tooltip: tooltip
|
|
167
|
+
// Made all explicit, this is left just in case
|
|
140
168
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
141
|
-
},
|
|
169
|
+
}, rest)));
|
|
142
170
|
};
|
|
143
171
|
export default Search;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["tooltip"];
|
|
3
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import SettingsIcon from '@atlaskit/icon/core/migration/settings';
|
|
6
6
|
import { IconButton } from '../IconButton';
|
|
@@ -13,18 +13,48 @@ import { IconButton } from '../IconButton';
|
|
|
13
13
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
14
14
|
*/
|
|
15
15
|
export var Settings = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
16
|
-
var
|
|
17
|
-
|
|
16
|
+
var component = props.component,
|
|
17
|
+
href = props.href,
|
|
18
|
+
id = props.id,
|
|
19
|
+
isDisabled = props.isDisabled,
|
|
20
|
+
isSelected = props.isSelected,
|
|
21
|
+
label = props.label,
|
|
22
|
+
onBlur = props.onBlur,
|
|
23
|
+
onClick = props.onClick,
|
|
24
|
+
onFocus = props.onFocus,
|
|
25
|
+
onMouseDown = props.onMouseDown,
|
|
26
|
+
onMouseEnter = props.onMouseEnter,
|
|
27
|
+
onMouseLeave = props.onMouseLeave,
|
|
28
|
+
onMouseUp = props.onMouseUp,
|
|
29
|
+
target = props.target,
|
|
30
|
+
testId = props.testId,
|
|
31
|
+
tooltip = props.tooltip,
|
|
32
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
18
33
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
34
|
role: "listitem"
|
|
20
35
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
36
|
+
component: component,
|
|
37
|
+
href: href,
|
|
21
38
|
icon: /*#__PURE__*/React.createElement(SettingsIcon, {
|
|
22
39
|
color: "currentColor",
|
|
23
40
|
spacing: "spacious",
|
|
24
41
|
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
|
|
25
42
|
}),
|
|
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,
|
|
26
54
|
ref: ref,
|
|
55
|
+
target: target,
|
|
56
|
+
testId: testId,
|
|
27
57
|
tooltip: tooltip
|
|
28
|
-
},
|
|
58
|
+
}, rest)));
|
|
29
59
|
});
|
|
30
60
|
export default Settings;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["tooltip"];
|
|
3
|
+
var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import LogInIcon from '@atlaskit/icon/core/migration/log-in--sign-in';
|
|
6
6
|
import { IconButton } from '../IconButton';
|
|
@@ -13,18 +13,49 @@ import { IconButton } from '../IconButton';
|
|
|
13
13
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
14
14
|
*/
|
|
15
15
|
export var SignIn = function SignIn(props) {
|
|
16
|
-
var
|
|
17
|
-
|
|
16
|
+
var component = props.component,
|
|
17
|
+
href = props.href,
|
|
18
|
+
id = props.id,
|
|
19
|
+
isDisabled = props.isDisabled,
|
|
20
|
+
isSelected = props.isSelected,
|
|
21
|
+
label = props.label,
|
|
22
|
+
onBlur = props.onBlur,
|
|
23
|
+
onClick = props.onClick,
|
|
24
|
+
onFocus = props.onFocus,
|
|
25
|
+
onMouseDown = props.onMouseDown,
|
|
26
|
+
onMouseEnter = props.onMouseEnter,
|
|
27
|
+
onMouseLeave = props.onMouseLeave,
|
|
28
|
+
onMouseUp = props.onMouseUp,
|
|
29
|
+
target = props.target,
|
|
30
|
+
testId = props.testId,
|
|
31
|
+
tooltip = props.tooltip,
|
|
32
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
18
33
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
34
|
role: "listitem"
|
|
20
35
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
36
|
+
component: component,
|
|
37
|
+
href: href,
|
|
21
38
|
icon: /*#__PURE__*/React.createElement(LogInIcon, {
|
|
22
39
|
color: "currentColor",
|
|
23
40
|
spacing: "spacious",
|
|
24
41
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
25
42
|
}),
|
|
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
|
+
target: target,
|
|
55
|
+
testId: testId,
|
|
26
56
|
tooltip: tooltip
|
|
57
|
+
// These are all explicit, leaving it in just in case
|
|
27
58
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
28
|
-
},
|
|
59
|
+
}, rest)));
|
|
29
60
|
};
|
|
30
61
|
export default SignIn;
|