@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.
Files changed (51) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/components/AppSwitcher/index.js +77 -23
  3. package/dist/cjs/components/Create/index.js +1 -1
  4. package/dist/cjs/components/Help/index.js +35 -3
  5. package/dist/cjs/components/IconButton/index.js +37 -8
  6. package/dist/cjs/components/Notifications/index.js +37 -5
  7. package/dist/cjs/components/PrimaryButton/index.js +20 -12
  8. package/dist/cjs/components/PrimaryDropdownButton/index.js +26 -5
  9. package/dist/cjs/components/ProductHome/custom-product-home.js +13 -13
  10. package/dist/cjs/components/ProductHome/product-home.js +13 -14
  11. package/dist/cjs/components/ProductHome/skeleton.js +7 -7
  12. package/dist/cjs/components/Profile/index.js +44 -9
  13. package/dist/cjs/components/Search/index.js +39 -11
  14. package/dist/cjs/components/Settings/index.js +34 -4
  15. package/dist/cjs/components/SignIn/index.js +35 -4
  16. package/dist/cjs/components/SkeletonPrimaryButton/index.js +1 -2
  17. package/dist/es2019/components/AppSwitcher/index.js +73 -19
  18. package/dist/es2019/components/Create/index.js +1 -1
  19. package/dist/es2019/components/Help/index.js +34 -2
  20. package/dist/es2019/components/IconButton/index.js +36 -7
  21. package/dist/es2019/components/Notifications/index.js +36 -4
  22. package/dist/es2019/components/PrimaryButton/index.js +20 -11
  23. package/dist/es2019/components/PrimaryDropdownButton/index.js +26 -3
  24. package/dist/es2019/components/ProductHome/custom-product-home.js +5 -3
  25. package/dist/es2019/components/ProductHome/product-home.js +5 -4
  26. package/dist/es2019/components/Profile/index.js +41 -8
  27. package/dist/es2019/components/Search/index.js +36 -7
  28. package/dist/es2019/components/Settings/index.js +32 -2
  29. package/dist/es2019/components/SignIn/index.js +33 -2
  30. package/dist/esm/components/AppSwitcher/index.js +77 -23
  31. package/dist/esm/components/Create/index.js +1 -1
  32. package/dist/esm/components/Help/index.js +35 -3
  33. package/dist/esm/components/IconButton/index.js +37 -8
  34. package/dist/esm/components/Notifications/index.js +37 -5
  35. package/dist/esm/components/PrimaryButton/index.js +20 -12
  36. package/dist/esm/components/PrimaryDropdownButton/index.js +26 -3
  37. package/dist/esm/components/ProductHome/custom-product-home.js +13 -13
  38. package/dist/esm/components/ProductHome/product-home.js +13 -14
  39. package/dist/esm/components/ProductHome/skeleton.js +5 -7
  40. package/dist/esm/components/Profile/index.js +44 -9
  41. package/dist/esm/components/Search/index.js +39 -11
  42. package/dist/esm/components/Settings/index.js +34 -4
  43. package/dist/esm/components/SignIn/index.js +35 -4
  44. package/dist/esm/components/SkeletonPrimaryButton/index.js +1 -2
  45. package/dist/types/components/AppSwitcher/index.d.ts +0 -9
  46. package/dist/types/components/ProductHome/product-home.d.ts +1 -1
  47. package/dist/types/controllers/overflow/index.d.ts +1 -1
  48. package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +0 -9
  49. package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +1 -1
  50. package/dist/types-ts4.5/controllers/overflow/index.d.ts +1 -1
  51. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 4.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#178538](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178538)
8
+ [`883a3a2291949`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/883a3a2291949) -
9
+ Make spread props explicit and clean up ESLint disables within components.
10
+
11
+ ## 4.9.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 4.9.4
4
18
 
5
19
  ### Patch Changes
@@ -12,8 +12,8 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var _appSwitcher = _interopRequireDefault(require("@atlaskit/icon/core/app-switcher"));
13
13
  var _appSwitcher2 = _interopRequireDefault(require("@atlaskit/icon/core/migration/app-switcher"));
14
14
  var _IconButton = require("../IconButton");
15
- var _excluded = ["tooltip"],
16
- _excluded2 = ["tooltip"];
15
+ var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"],
16
+ _excluded2 = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
17
17
  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); }
18
18
  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; }
19
19
  /**
@@ -26,41 +26,95 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
26
26
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
27
27
  */
28
28
  var AppSwitcher = exports.AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
29
- var tooltip = props.tooltip,
30
- iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
29
+ var component = props.component,
30
+ href = props.href,
31
+ id = props.id,
32
+ isDisabled = props.isDisabled,
33
+ isSelected = props.isSelected,
34
+ label = props.label,
35
+ onBlur = props.onBlur,
36
+ onClick = props.onClick,
37
+ onFocus = props.onFocus,
38
+ onMouseDown = props.onMouseDown,
39
+ onMouseEnter = props.onMouseEnter,
40
+ onMouseLeave = props.onMouseLeave,
41
+ onMouseUp = props.onMouseUp,
42
+ target = props.target,
43
+ testId = props.testId,
44
+ tooltip = props.tooltip,
45
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
31
46
  return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
47
+ component: component,
48
+ href: href,
32
49
  icon: /*#__PURE__*/_react.default.createElement(_appSwitcher2.default, {
33
50
  color: "currentColor",
34
51
  spacing: "spacious",
35
52
  label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
36
53
  }),
37
- tooltip: tooltip,
38
- ref: ref
39
- }, iconButtonProps));
54
+ id: id,
55
+ isDisabled: isDisabled,
56
+ isSelected: isSelected,
57
+ label: label,
58
+ onBlur: onBlur,
59
+ onClick: onClick,
60
+ onFocus: onFocus,
61
+ onMouseDown: onMouseDown,
62
+ onMouseEnter: onMouseEnter,
63
+ onMouseLeave: onMouseLeave,
64
+ onMouseUp: onMouseUp,
65
+ ref: ref,
66
+ target: target,
67
+ testId: testId,
68
+ tooltip: tooltip
69
+ // These are all explicit, leaving it in just in case
70
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
71
+ }, rest));
40
72
  });
41
73
 
42
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
43
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
44
- /**
45
- * __App switcher nav 4__
46
- *
47
- * An app switcher nav 4 {description}.
48
- *
49
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
50
- * - [Code](https://atlassian.design/components/{packageName}/code)
51
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
52
- */
74
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
53
75
  var AppSwitcherNav4 = exports.AppSwitcherNav4 = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
54
- var tooltip = props.tooltip,
55
- iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded2);
76
+ var component = props.component,
77
+ href = props.href,
78
+ id = props.id,
79
+ isDisabled = props.isDisabled,
80
+ isSelected = props.isSelected,
81
+ label = props.label,
82
+ onBlur = props.onBlur,
83
+ onClick = props.onClick,
84
+ onFocus = props.onFocus,
85
+ onMouseDown = props.onMouseDown,
86
+ onMouseEnter = props.onMouseEnter,
87
+ onMouseLeave = props.onMouseLeave,
88
+ onMouseUp = props.onMouseUp,
89
+ target = props.target,
90
+ testId = props.testId,
91
+ tooltip = props.tooltip,
92
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded2);
56
93
  return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
57
94
  icon: /*#__PURE__*/_react.default.createElement(_appSwitcher.default, {
58
95
  label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
59
96
  color: "var(--ds-icon, #44546F)"
60
97
  }),
61
- tooltip: tooltip,
62
- ref: ref
63
- }, iconButtonProps));
98
+ component: component,
99
+ href: href,
100
+ id: id,
101
+ isDisabled: isDisabled,
102
+ isSelected: isSelected,
103
+ label: label,
104
+ onBlur: onBlur,
105
+ onClick: onClick,
106
+ onFocus: onFocus,
107
+ onMouseDown: onMouseDown,
108
+ onMouseEnter: onMouseEnter,
109
+ onMouseLeave: onMouseLeave,
110
+ onMouseUp: onMouseUp,
111
+ ref: ref,
112
+ target: target,
113
+ testId: testId,
114
+ tooltip: tooltip
115
+ // These are all explicit, leaving it in just in case
116
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
117
+ }, rest));
64
118
  });
65
119
 
66
120
  // exists only to extract props
@@ -78,7 +78,7 @@ var Create = exports.Create = function Create(_ref2) {
78
78
  "aria-label": label,
79
79
  onClick: onClick,
80
80
  href: href
81
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
81
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
82
82
  ,
83
83
  theme: (0, _styles.getCreateButtonTheme)(theme),
84
84
  testId: testId && "".concat(testId, "-button"),
@@ -13,7 +13,7 @@ var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/migrat
13
13
  var _theme = require("../../theme");
14
14
  var _BadgeContainer = require("../BadgeContainer");
15
15
  var _IconButton = require("../IconButton");
16
- var _excluded = ["badge", "tooltip"];
16
+ var _excluded = ["badge", "component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
17
17
  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); }
18
18
  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; }
19
19
  var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
@@ -28,20 +28,52 @@ var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
28
28
  */
29
29
  var Help = exports.Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
30
  var badge = props.badge,
31
+ component = props.component,
32
+ href = props.href,
33
+ id = props.id,
34
+ isDisabled = props.isDisabled,
35
+ isSelected = props.isSelected,
36
+ label = props.label,
37
+ onBlur = props.onBlur,
38
+ onClick = props.onClick,
39
+ onFocus = props.onFocus,
40
+ onMouseDown = props.onMouseDown,
41
+ onMouseEnter = props.onMouseEnter,
42
+ onMouseLeave = props.onMouseLeave,
43
+ onMouseUp = props.onMouseUp,
44
+ target = props.target,
45
+ testId = props.testId,
31
46
  tooltip = props.tooltip,
32
- iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
47
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
33
48
  var _useTheme = (0, _theme.useTheme)(),
34
49
  navigation = _useTheme.mode.navigation;
35
50
  var button = /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
51
+ component: component,
52
+ href: href,
36
53
  icon: /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
37
54
  label: typeof tooltip === 'string' ? tooltip : 'Help Icon',
38
55
  color: "currentColor",
39
56
  spacing: "spacious",
40
57
  LEGACY_secondaryColor: navigation.backgroundColor
41
58
  }),
59
+ id: id,
60
+ isDisabled: isDisabled,
61
+ isSelected: isSelected,
62
+ label: label,
63
+ onBlur: onBlur,
64
+ onClick: onClick,
65
+ onFocus: onFocus,
66
+ onMouseDown: onMouseDown,
67
+ onMouseEnter: onMouseEnter,
68
+ onMouseLeave: onMouseLeave,
69
+ onMouseUp: onMouseUp,
42
70
  ref: ref,
71
+ target: target,
72
+ testId: testId,
43
73
  tooltip: tooltip
44
- }, iconButtonProps));
74
+ // These are all explicit, leaving it in just in case
75
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
76
+ }, rest));
45
77
  return badge ? /*#__PURE__*/_react.default.createElement(_BadgeContainer.BadgeContainer, {
46
78
  id: HELP_NOTIFICATION_BADGE_ID,
47
79
  badge: badge,
@@ -13,7 +13,7 @@ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom
13
13
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
14
14
  var _theme = require("../../theme");
15
15
  var _styles = require("./styles");
16
- var _excluded = ["icon", "label", "testId", "tooltip"];
16
+ var _excluded = ["icon", "label", "testId", "tooltip", "component", "href", "id", "isDisabled", "isSelected", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "theme"];
17
17
  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); }
18
18
  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; }
19
19
  /**
@@ -30,18 +30,47 @@ var IconButton = exports.IconButton = /*#__PURE__*/(0, _react.forwardRef)(functi
30
30
  label = props.label,
31
31
  testId = props.testId,
32
32
  tooltip = props.tooltip,
33
- buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
34
- var theme = (0, _theme.useTheme)();
33
+ component = props.component,
34
+ href = props.href,
35
+ id = props.id,
36
+ isDisabled = props.isDisabled,
37
+ isSelected = props.isSelected,
38
+ onBlur = props.onBlur,
39
+ onClick = props.onClick,
40
+ onFocus = props.onFocus,
41
+ onMouseDown = props.onMouseDown,
42
+ onMouseEnter = props.onMouseEnter,
43
+ onMouseLeave = props.onMouseLeave,
44
+ onMouseUp = props.onMouseUp,
45
+ target = props.target,
46
+ theme = props.theme,
47
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
48
+ var themeFromContext = (0, _theme.useTheme)();
35
49
  var button = /*#__PURE__*/_react.default.createElement(_customThemeButton.default, (0, _extends2.default)({
36
50
  appearance: "primary",
37
51
  "aria-label": label,
38
- testId: testId,
52
+ component: component,
53
+ href: href,
39
54
  iconBefore: icon,
40
- ref: ref
41
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
55
+ id: id,
56
+ isDisabled: isDisabled,
57
+ isSelected: isSelected,
58
+ onBlur: onBlur,
59
+ onClick: onClick,
60
+ onFocus: onFocus,
61
+ onMouseDown: onMouseDown,
62
+ onMouseEnter: onMouseEnter,
63
+ onMouseLeave: onMouseLeave,
64
+ onMouseUp: onMouseUp,
65
+ ref: ref,
66
+ target: target,
67
+ testId: testId
68
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
42
69
  ,
43
- theme: (0, _styles.getIconButtonTheme)(theme)
44
- }, buttonProps));
70
+ theme: theme || (0, _styles.getIconButtonTheme)(themeFromContext)
71
+ // These are all explicit, leaving it in just in case
72
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
73
+ }, rest));
45
74
  if (tooltip) {
46
75
  return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
47
76
  content: tooltip,
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var _notification = _interopRequireDefault(require("@atlaskit/icon/core/migration/notification"));
13
13
  var _BadgeContainer = require("../BadgeContainer");
14
14
  var _IconButton = require("../IconButton");
15
- var _excluded = ["badge", "tooltip"];
15
+ var _excluded = ["badge", "component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
16
16
  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); }
17
17
  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; }
18
18
  var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
@@ -28,21 +28,53 @@ var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
28
28
  */
29
29
  var Notifications = exports.Notifications = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
30
30
  var badge = props.badge,
31
+ component = props.component,
32
+ href = props.href,
33
+ id = props.id,
34
+ isDisabled = props.isDisabled,
35
+ isSelected = props.isSelected,
36
+ label = props.label,
37
+ onBlur = props.onBlur,
38
+ onClick = props.onClick,
39
+ onFocus = props.onFocus,
40
+ onMouseDown = props.onMouseDown,
41
+ onMouseEnter = props.onMouseEnter,
42
+ onMouseLeave = props.onMouseLeave,
43
+ onMouseUp = props.onMouseUp,
44
+ target = props.target,
45
+ testId = props.testId,
31
46
  tooltip = props.tooltip,
32
- iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
47
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
33
48
  return /*#__PURE__*/_react.default.createElement(_BadgeContainer.BadgeContainer, {
34
49
  id: NOTIFICATIONS_BADGE_ID,
35
50
  badge: badge,
36
51
  role: "listitem"
37
52
  }, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
53
+ "aria-describedby": NOTIFICATIONS_BADGE_ID,
54
+ component: component,
55
+ href: href,
38
56
  icon: /*#__PURE__*/_react.default.createElement(_notification.default, {
39
57
  spacing: "spacious",
40
58
  color: "currentColor",
41
59
  label: typeof tooltip === 'string' ? tooltip : 'Notification Icon'
42
60
  }),
43
- tooltip: tooltip,
61
+ id: id,
62
+ isDisabled: isDisabled,
63
+ isSelected: isSelected,
64
+ label: label,
65
+ onBlur: onBlur,
66
+ onClick: onClick,
67
+ onFocus: onFocus,
68
+ onMouseDown: onMouseDown,
69
+ onMouseEnter: onMouseEnter,
70
+ onMouseLeave: onMouseLeave,
71
+ onMouseUp: onMouseUp,
44
72
  ref: ref,
45
- "aria-describedby": NOTIFICATIONS_BADGE_ID
46
- }, iconButtonProps)));
73
+ target: target,
74
+ testId: testId,
75
+ tooltip: tooltip
76
+ // These are all explicit, leaving it in just in case
77
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
78
+ }, rest)));
47
79
  });
48
80
  var _default = exports.default = Notifications;
@@ -14,7 +14,7 @@ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom
14
14
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
15
15
  var _theme = require("../../theme");
16
16
  var _styles = require("./styles");
17
- var _excluded = ["children", "testId", "tooltip", "isSelected", "isHighlighted"];
17
+ var _excluded = ["children", "component", "isHighlighted", "isLoading", "isSelected", "onClick", "testId", "theme", "tooltip"];
18
18
  /**
19
19
  * @jsxRuntime classic
20
20
  * @jsx jsx
@@ -59,29 +59,37 @@ var buttonHighlightedStyles = (0, _react2.css)({
59
59
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
60
60
  */
61
61
  var PrimaryButton = exports.PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
62
- var _ref;
63
62
  var children = props.children,
63
+ component = props.component,
64
+ isHighlighted = props.isHighlighted,
65
+ isLoading = props.isLoading,
66
+ isSelected = props.isSelected,
67
+ onClick = props.onClick,
64
68
  testId = props.testId,
69
+ theme = props.theme,
65
70
  tooltip = props.tooltip,
66
- isSelected = props.isSelected,
67
- isHighlighted = props.isHighlighted,
68
- buttonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
69
- var theme = (0, _theme.useTheme)();
71
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
72
+ var themeFromContext = (0, _theme.useTheme)();
70
73
  var button = (0, _react2.jsx)("div", {
71
74
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
72
- style: (_ref = {}, (0, _defineProperty2.default)(_ref, VAR_BUTTON_SELECTED_COLOR, theme.mode.primaryButton.selected.color), (0, _defineProperty2.default)(_ref, VAR_BUTTON_SELECTED_BORDER_COLOR, theme.mode.primaryButton.selected.borderColor), _ref),
75
+ style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, VAR_BUTTON_SELECTED_COLOR, themeFromContext.mode.primaryButton.selected.color), VAR_BUTTON_SELECTED_BORDER_COLOR, themeFromContext.mode.primaryButton.selected.borderColor),
73
76
  css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles],
74
77
  role: "listitem",
75
78
  "data-vc": "primary-button"
76
79
  }, (0, _react2.jsx)(_customThemeButton.default, (0, _extends2.default)({
77
80
  appearance: "primary",
78
- testId: testId,
81
+ component: component,
82
+ isLoading: isLoading,
83
+ isSelected: isSelected,
84
+ onClick: onClick,
79
85
  ref: ref,
80
- isSelected: isSelected
81
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
86
+ testId: testId
87
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
82
88
  ,
83
- theme: (0, _styles.getPrimaryButtonTheme)(theme)
84
- }, buttonProps), children));
89
+ theme: theme || (0, _styles.getPrimaryButtonTheme)(themeFromContext)
90
+ // These are all explicit, leaving it in just in case
91
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
92
+ }, rest), children));
85
93
  if (tooltip) {
86
94
  return (0, _react2.jsx)(_tooltip.default, {
87
95
  content: tooltip,
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = exports.PrimaryDropdownButton = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
10
  var _react = require("react");
10
11
  var _react2 = require("@emotion/react");
11
12
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-down"));
12
13
  var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
13
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _PrimaryButton = require("../PrimaryButton");
16
+ var _excluded = ["component", "isHighlighted", "isLoading", "onClick", "testId", "theme", "tooltip"];
15
17
  /**
16
18
  * @jsxRuntime classic
17
19
  * @jsx jsx
18
20
  */
19
-
20
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
-
22
22
  /**
23
23
  * __Primary dropdown button__
24
24
  *
@@ -29,8 +29,19 @@ var _PrimaryButton = require("../PrimaryButton");
29
29
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
30
30
  */
31
31
  var PrimaryDropdownButton = exports.PrimaryDropdownButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
32
+ var component = props.component,
33
+ isHighlighted = props.isHighlighted,
34
+ isLoading = props.isLoading,
35
+ onClick = props.onClick,
36
+ testId = props.testId,
37
+ theme = props.theme,
38
+ tooltip = props.tooltip,
39
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
32
40
  return (0, _react2.jsx)(_PrimaryButton.PrimaryButton, (0, _extends2.default)({
33
- iconAfter: (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _react2.jsx)(_chevronDown.default, {
41
+ component: component,
42
+ iconAfter:
43
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
44
+ (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _react2.jsx)(_chevronDown.default, {
34
45
  label: "",
35
46
  color: "currentColor"
36
47
  }) : (0, _react2.jsx)(_chevronDown2.default, {
@@ -38,7 +49,17 @@ var PrimaryDropdownButton = exports.PrimaryDropdownButton = /*#__PURE__*/(0, _re
38
49
  color: "currentColor",
39
50
  label: ""
40
51
  }),
41
- ref: ref
42
- }, props));
52
+ isHighlighted: isHighlighted,
53
+ isLoading: isLoading,
54
+ onClick: onClick,
55
+ ref: ref,
56
+ testId: testId
57
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
58
+ ,
59
+ theme: theme,
60
+ tooltip: tooltip
61
+ // These are mostly explicit, leaving it in just in case
62
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
63
+ }, rest));
43
64
  });
44
65
  var _default = exports.default = PrimaryDropdownButton;
@@ -14,8 +14,7 @@ var _colors = require("@atlaskit/theme/colors");
14
14
  var _constants = require("../../common/constants");
15
15
  var _theme = require("../../theme");
16
16
  var _utils = require("./utils");
17
- var _excluded = ["iconAlt", "iconUrl", "logoAlt", "logoUrl", "href", "onClick", "siteTitle", "onMouseDown", "testId", "logoMaxWidth"];
18
- var _css3;
17
+ var _excluded = ["href", "iconAlt", "iconUrl", "logoAlt", "logoMaxWidth", "logoUrl", "onClick", "onMouseDown", "siteTitle", "testId"];
19
18
  /**
20
19
  * @jsxRuntime classic
21
20
  * @jsx jsx
@@ -47,7 +46,7 @@ var productIconStyles = (0, _react2.css)((0, _defineProperty2.default)({
47
46
  }, "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
48
47
  display: 'none'
49
48
  }));
50
- var productHomeButtonStyles = (0, _react2.css)((_css3 = {
49
+ var productHomeButtonStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
51
50
  display: 'flex',
52
51
  padding: "var(--ds-space-050, 4px)",
53
52
  alignItems: 'center',
@@ -83,11 +82,11 @@ var productHomeButtonStyles = (0, _react2.css)((_css3 = {
83
82
  'div&': {
84
83
  pointerEvents: 'none'
85
84
  }
86
- }, (0, _defineProperty2.default)(_css3, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
85
+ }, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
87
86
  margin: "0 ".concat("var(--ds-space-100, 8px)")
88
- }), (0, _defineProperty2.default)(_css3, "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
87
+ }), "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
89
88
  margin: "0 ".concat("var(--ds-space-200, 16px)")
90
- }), _css3));
89
+ }));
91
90
  var siteTitleStyles = (0, _react2.css)({
92
91
  display: 'flex',
93
92
  alignItems: 'center',
@@ -105,18 +104,17 @@ var siteTitleStyles = (0, _react2.css)({
105
104
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
106
105
  */
107
106
  var CustomProductHome = function CustomProductHome(props) {
108
- var _productHomeButtonDyn;
109
- var iconAlt = props.iconAlt,
107
+ var href = props.href,
108
+ iconAlt = props.iconAlt,
110
109
  iconUrl = props.iconUrl,
111
110
  logoAlt = props.logoAlt,
111
+ _props$logoMaxWidth = props.logoMaxWidth,
112
+ logoMaxWidth = _props$logoMaxWidth === void 0 ? 260 : _props$logoMaxWidth,
112
113
  logoUrl = props.logoUrl,
113
- href = props.href,
114
114
  onClick = props.onClick,
115
- siteTitle = props.siteTitle,
116
115
  onMouseDown = props.onMouseDown,
116
+ siteTitle = props.siteTitle,
117
117
  testId = props.testId,
118
- _props$logoMaxWidth = props.logoMaxWidth,
119
- logoMaxWidth = _props$logoMaxWidth === void 0 ? 260 : _props$logoMaxWidth,
120
118
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
121
119
  var theme = (0, _theme.useTheme)();
122
120
  var primaryButton = theme.mode.primaryButton;
@@ -125,7 +123,7 @@ var CustomProductHome = function CustomProductHome(props) {
125
123
  event.preventDefault();
126
124
  onMouseDown && onMouseDown(event);
127
125
  };
128
- 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), _productHomeButtonDyn);
126
+ var productHomeButtonDynamicStyles = (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);
129
127
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(Tag, (0, _extends2.default)({
130
128
  href: href
131
129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -135,6 +133,8 @@ var CustomProductHome = function CustomProductHome(props) {
135
133
  onClick: onClick,
136
134
  onMouseDown: preventFocusRing,
137
135
  "data-testid": testId && "".concat(testId, "-container")
136
+ // Currently all props are mapped, but leaving in case people are
137
+ // passing non-explicit props
138
138
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
139
139
  }, rest), logoUrl && (0, _react2.jsx)("img", {
140
140
  style: {
@@ -14,8 +14,7 @@ var _constants = require("../../common/constants");
14
14
  var _theme = require("../../theme");
15
15
  var _utils = require("../../utils");
16
16
  var _utils2 = require("./utils");
17
- var _excluded = ["icon", "logo", "siteTitle", "onClick", "href", "onMouseDown", "testId", "logoMaxWidth", "aria-label"];
18
- var _css;
17
+ var _excluded = ["aria-label", "href", "icon", "logo", "logoMaxWidth", "onClick", "onMouseDown", "siteTitle", "testId"];
19
18
  /**
20
19
  * @jsxRuntime classic
21
20
  * @jsx jsx
@@ -31,7 +30,7 @@ var VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
31
30
  var VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
32
31
  var VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
33
32
  var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
34
- var productHomeButtonStyles = (0, _react2.css)((_css = {
33
+ var productHomeButtonStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({
35
34
  display: 'flex',
36
35
  padding: "var(--ds-space-050, 4px)",
37
36
  alignItems: 'center',
@@ -67,11 +66,11 @@ var productHomeButtonStyles = (0, _react2.css)((_css = {
67
66
  'div&': {
68
67
  pointerEvents: 'none'
69
68
  }
70
- }, (0, _defineProperty2.default)(_css, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
69
+ }, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
71
70
  margin: "0 ".concat("var(--ds-space-100, 8px)")
72
- }), (0, _defineProperty2.default)(_css, "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
71
+ }), "@media (min-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT, "px)"), {
73
72
  margin: "0 ".concat("var(--ds-space-200, 16px)")
74
- }), _css));
73
+ }));
75
74
  var productLogoStyles = (0, _react2.css)((0, _defineProperty2.default)({
76
75
  // Ensure anything passed into
77
76
  // productHome is aligned correctly
@@ -122,17 +121,16 @@ var siteTitleStyles = (0, _react2.css)({
122
121
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
123
122
  */
124
123
  var ProductHome = function ProductHome(_ref) {
125
- var _stripEmptyProperties;
126
- var Icon = _ref.icon,
124
+ var ariaLabel = _ref['aria-label'],
125
+ href = _ref.href,
126
+ Icon = _ref.icon,
127
127
  Logo = _ref.logo,
128
- siteTitle = _ref.siteTitle,
128
+ _ref$logoMaxWidth = _ref.logoMaxWidth,
129
+ logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
129
130
  onClick = _ref.onClick,
130
- href = _ref.href,
131
131
  onMouseDown = _ref.onMouseDown,
132
+ siteTitle = _ref.siteTitle,
132
133
  testId = _ref.testId,
133
- _ref$logoMaxWidth = _ref.logoMaxWidth,
134
- logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
135
- ariaLabel = _ref['aria-label'],
136
134
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
137
135
  var theme = (0, _theme.useTheme)();
138
136
  var primaryButton = theme.mode.primaryButton;
@@ -146,7 +144,7 @@ var ProductHome = function ProductHome(_ref) {
146
144
  e.preventDefault();
147
145
  onMouseDown && onMouseDown(e);
148
146
  };
149
- var productHomeButtonDynamicStyles = (0, _utils.stripEmptyProperties)((_stripEmptyProperties = {}, (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow), (0, _defineProperty2.default)(_stripEmptyProperties, VAR_LOGO_MAX_WIDTH, "".concat(logoMaxWidth, "px")), _stripEmptyProperties));
147
+ 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_LOGO_MAX_WIDTH, "".concat(logoMaxWidth, "px")));
150
148
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(Tag
151
149
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
152
150
  , (0, _extends2.default)({
@@ -157,6 +155,7 @@ var ProductHome = function ProductHome(_ref) {
157
155
  onMouseDown: preventFocusRing,
158
156
  "data-testid": testId && "".concat(testId, "-container"),
159
157
  "aria-label": ariaLabel
158
+ // Made all props explicit, leaving just in case
160
159
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
161
160
  }, rest), (0, _react2.jsx)("div", {
162
161
  css: [customMaxHeightStyles, productLogoStyles],