@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
@@ -52,31 +52,40 @@ const buttonHighlightedStyles = css({
52
52
  export const PrimaryButton = /*#__PURE__*/forwardRef((props, ref) => {
53
53
  const {
54
54
  children,
55
+ component,
56
+ isHighlighted,
57
+ isLoading,
58
+ isSelected,
59
+ onClick,
55
60
  testId,
61
+ theme,
56
62
  tooltip,
57
- isSelected,
58
- isHighlighted,
59
- ...buttonProps
63
+ ...rest
60
64
  } = props;
61
- const theme = useTheme();
65
+ const themeFromContext = useTheme();
62
66
  const button = jsx("div", {
63
67
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
64
68
  style: {
65
- [VAR_BUTTON_SELECTED_COLOR]: theme.mode.primaryButton.selected.color,
66
- [VAR_BUTTON_SELECTED_BORDER_COLOR]: theme.mode.primaryButton.selected.borderColor
69
+ [VAR_BUTTON_SELECTED_COLOR]: themeFromContext.mode.primaryButton.selected.color,
70
+ [VAR_BUTTON_SELECTED_BORDER_COLOR]: themeFromContext.mode.primaryButton.selected.borderColor
67
71
  },
68
72
  css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles],
69
73
  role: "listitem",
70
74
  "data-vc": "primary-button"
71
75
  }, jsx(Button, _extends({
72
76
  appearance: "primary",
73
- testId: testId,
77
+ component: component,
78
+ isLoading: isLoading,
79
+ isSelected: isSelected,
80
+ onClick: onClick,
74
81
  ref: ref,
75
- isSelected: isSelected
76
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
82
+ testId: testId
83
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
77
84
  ,
78
- theme: getPrimaryButtonTheme(theme)
79
- }, buttonProps), children));
85
+ theme: theme || getPrimaryButtonTheme(themeFromContext)
86
+ // These are all explicit, leaving it in just in case
87
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
88
+ }, rest), children));
80
89
  if (tooltip) {
81
90
  return jsx(Tooltip, {
82
91
  content: tooltip,
@@ -21,8 +21,21 @@ import { PrimaryButton } from '../PrimaryButton';
21
21
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
22
22
  */
23
23
  export const PrimaryDropdownButton = /*#__PURE__*/forwardRef((props, ref) => {
24
+ const {
25
+ component,
26
+ isHighlighted,
27
+ isLoading,
28
+ onClick,
29
+ testId,
30
+ theme,
31
+ tooltip,
32
+ ...rest
33
+ } = props;
24
34
  return jsx(PrimaryButton, _extends({
25
- iconAfter: fg('platform-component-visual-refresh') ? jsx(ChevronIcon, {
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 const PrimaryDropdownButton = /*#__PURE__*/forwardRef((props, ref) => {
30
43
  color: "currentColor",
31
44
  label: ""
32
45
  }),
33
- ref: ref
34
- }, props));
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;
@@ -104,16 +104,16 @@ const siteTitleStyles = css({
104
104
  */
105
105
  const CustomProductHome = props => {
106
106
  const {
107
+ href,
107
108
  iconAlt,
108
109
  iconUrl,
109
110
  logoAlt,
111
+ logoMaxWidth = 260,
110
112
  logoUrl,
111
- href,
112
113
  onClick,
113
- siteTitle,
114
114
  onMouseDown,
115
+ siteTitle,
115
116
  testId,
116
- logoMaxWidth = 260,
117
117
  ...rest
118
118
  } = props;
119
119
  const theme = useTheme();
@@ -143,6 +143,8 @@ const CustomProductHome = props => {
143
143
  onClick: onClick,
144
144
  onMouseDown: preventFocusRing,
145
145
  "data-testid": testId && `${testId}-container`
146
+ // Currently all props are mapped, but leaving in case people are
147
+ // passing non-explicit props
146
148
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
147
149
  }, rest), logoUrl && jsx("img", {
148
150
  style: {
@@ -120,15 +120,15 @@ const siteTitleStyles = css({
120
120
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
121
121
  */
122
122
  const ProductHome = ({
123
+ 'aria-label': ariaLabel,
124
+ href,
123
125
  icon: Icon,
124
126
  logo: Logo,
125
- siteTitle,
127
+ logoMaxWidth = 260,
126
128
  onClick,
127
- href,
128
129
  onMouseDown,
130
+ siteTitle,
129
131
  testId,
130
- logoMaxWidth = 260,
131
- 'aria-label': ariaLabel,
132
132
  ...rest
133
133
  }) => {
134
134
  const theme = useTheme();
@@ -164,6 +164,7 @@ const ProductHome = ({
164
164
  onMouseDown: preventFocusRing,
165
165
  "data-testid": testId && `${testId}-container`,
166
166
  "aria-label": ariaLabel
167
+ // Made all props explicit, leaving just in case
167
168
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
168
169
  }, rest), jsx("div", {
169
170
  css: [customMaxHeightStyles, productLogoStyles],
@@ -12,21 +12,54 @@ import { IconButton } from '../IconButton';
12
12
  */
13
13
  export const Profile = /*#__PURE__*/forwardRef((props, ref) => {
14
14
  const {
15
+ component,
16
+ href,
17
+ icon,
18
+ id,
19
+ isDisabled,
20
+ isSelected,
15
21
  label: labelProp,
16
- tooltip
22
+ onBlur,
23
+ onClick,
24
+ onFocus,
25
+ onMouseDown,
26
+ onMouseEnter,
27
+ onMouseLeave,
28
+ onMouseUp,
29
+ target,
30
+ testId,
31
+ theme,
32
+ tooltip,
33
+ ...rest
17
34
  } = props;
18
35
  const label = labelProp || (typeof tooltip === 'string' ? tooltip : 'Your profile and settings');
19
-
20
- // All other implementations of IconButton within the components are using spread props, so
21
- // to use explicit props could cause regressions.
22
- // TODO: Remove these spread props for better static analysis
23
- // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
24
36
  return /*#__PURE__*/React.createElement("div", {
25
37
  role: "listitem"
26
38
  }, /*#__PURE__*/React.createElement(IconButton, _extends({
39
+ component: component,
40
+ href: href,
41
+ icon: icon,
42
+ id: id,
43
+ isDisabled: isDisabled,
44
+ isSelected: isSelected,
27
45
  label: label,
28
- ref: ref
29
- }, props)));
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)));
30
63
  });
31
64
 
32
65
  // This exists only to extract props.
@@ -127,28 +127,57 @@ const SearchComponent = props => {
127
127
  */
128
128
  export const Search = props => {
129
129
  const {
130
+ component,
131
+ href,
132
+ id,
133
+ isDisabled,
134
+ isSelected,
135
+ label,
136
+ onBlur,
137
+ onClick,
138
+ onFocus,
139
+ onMouseDown,
140
+ onMouseEnter,
141
+ onMouseLeave,
142
+ onMouseUp,
130
143
  placeholder,
144
+ target,
145
+ testId,
131
146
  tooltip,
132
- label,
133
147
  value,
134
- ...iconButtonProps
148
+ ...rest
135
149
  } = props;
136
150
  return jsx(Fragment, null, jsx(SearchComponent, {
137
- onClick: iconButtonProps.onClick,
151
+ onClick: onClick,
138
152
  placeholder: placeholder,
139
153
  label: label,
140
154
  value: value || ''
141
- }), jsx(IconButton
142
- // @ts-ignore Overriding styles is not supported.
143
- , _extends({
155
+ }), jsx(IconButton, _extends({
156
+ component: component
157
+ // @ts-ignore Overriding styles is not supported.
158
+ ,
144
159
  css: searchIconStyles,
160
+ href: href,
145
161
  icon: jsx(SearchIcon, {
146
162
  color: "currentColor",
147
163
  spacing: "spacious",
148
164
  label: label
149
165
  }),
166
+ id: id,
167
+ isDisabled: isDisabled,
168
+ isSelected: isSelected,
169
+ onBlur: onBlur,
170
+ onClick: onClick,
171
+ onFocus: onFocus,
172
+ onMouseDown: onMouseDown,
173
+ onMouseEnter: onMouseEnter,
174
+ onMouseLeave: onMouseLeave,
175
+ onMouseUp: onMouseUp,
176
+ target: target,
177
+ testId: testId,
150
178
  tooltip: tooltip
179
+ // Made all explicit, this is left just in case
151
180
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
152
- }, iconButtonProps)));
181
+ }, rest)));
153
182
  };
154
183
  export default Search;
@@ -12,19 +12,49 @@ import { IconButton } from '../IconButton';
12
12
  */
13
13
  export const Settings = /*#__PURE__*/forwardRef((props, ref) => {
14
14
  const {
15
+ component,
16
+ href,
17
+ id,
18
+ isDisabled,
19
+ isSelected,
20
+ label,
21
+ onBlur,
22
+ onClick,
23
+ onFocus,
24
+ onMouseDown,
25
+ onMouseEnter,
26
+ onMouseLeave,
27
+ onMouseUp,
28
+ target,
29
+ testId,
15
30
  tooltip,
16
- ...iconButtonProps
31
+ ...rest
17
32
  } = props;
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
- }, iconButtonProps)));
58
+ }, rest)));
29
59
  });
30
60
  export default Settings;
@@ -12,19 +12,50 @@ import { IconButton } from '../IconButton';
12
12
  */
13
13
  export const SignIn = props => {
14
14
  const {
15
+ component,
16
+ href,
17
+ id,
18
+ isDisabled,
19
+ isSelected,
20
+ label,
21
+ onBlur,
22
+ onClick,
23
+ onFocus,
24
+ onMouseDown,
25
+ onMouseEnter,
26
+ onMouseLeave,
27
+ onMouseUp,
28
+ target,
29
+ testId,
15
30
  tooltip,
16
- ...iconButtonProps
31
+ ...rest
17
32
  } = props;
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
- }, iconButtonProps)));
59
+ }, rest)));
29
60
  };
30
61
  export default SignIn;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["tooltip"],
4
- _excluded2 = ["tooltip"];
3
+ var _excluded = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"],
4
+ _excluded2 = ["component", "href", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "tooltip"];
5
5
  import React, { forwardRef } from 'react';
6
6
  import Nav4AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
7
7
  import AppSwitcherIcon from '@atlaskit/icon/core/migration/app-switcher';
@@ -16,41 +16,95 @@ import { IconButton } from '../IconButton';
16
16
  * - [Code](https://atlassian.design/components/atlassian-navigation/code)
17
17
  */
18
18
  export var AppSwitcher = /*#__PURE__*/forwardRef(function (props, ref) {
19
- var tooltip = props.tooltip,
20
- iconButtonProps = _objectWithoutProperties(props, _excluded);
19
+ var component = props.component,
20
+ href = props.href,
21
+ id = props.id,
22
+ isDisabled = props.isDisabled,
23
+ isSelected = props.isSelected,
24
+ label = props.label,
25
+ onBlur = props.onBlur,
26
+ onClick = props.onClick,
27
+ onFocus = props.onFocus,
28
+ onMouseDown = props.onMouseDown,
29
+ onMouseEnter = props.onMouseEnter,
30
+ onMouseLeave = props.onMouseLeave,
31
+ onMouseUp = props.onMouseUp,
32
+ target = props.target,
33
+ testId = props.testId,
34
+ tooltip = props.tooltip,
35
+ rest = _objectWithoutProperties(props, _excluded);
21
36
  return /*#__PURE__*/React.createElement(IconButton, _extends({
37
+ component: component,
38
+ href: href,
22
39
  icon: /*#__PURE__*/React.createElement(AppSwitcherIcon, {
23
40
  color: "currentColor",
24
41
  spacing: "spacious",
25
42
  label: typeof tooltip === 'string' ? tooltip : 'Switch apps'
26
43
  }),
27
- tooltip: tooltip,
28
- ref: ref
29
- }, iconButtonProps));
44
+ id: id,
45
+ isDisabled: isDisabled,
46
+ isSelected: isSelected,
47
+ label: label,
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
+ tooltip: tooltip
59
+ // These are all explicit, leaving it in just in case
60
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
61
+ }, rest));
30
62
  });
31
63
 
32
- // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
33
- // Remove links that the component does not have (such as usage). If there are no links remove them all.
34
- /**
35
- * __App switcher nav 4__
36
- *
37
- * An app switcher nav 4 {description}.
38
- *
39
- * - [Examples](https://atlassian.design/components/{packageName}/examples)
40
- * - [Code](https://atlassian.design/components/{packageName}/code)
41
- * - [Usage](https://atlassian.design/components/{packageName}/usage)
42
- */
64
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
43
65
  export var AppSwitcherNav4 = /*#__PURE__*/forwardRef(function (props, ref) {
44
- var tooltip = props.tooltip,
45
- iconButtonProps = _objectWithoutProperties(props, _excluded2);
66
+ var component = props.component,
67
+ href = props.href,
68
+ id = props.id,
69
+ isDisabled = props.isDisabled,
70
+ isSelected = props.isSelected,
71
+ label = props.label,
72
+ onBlur = props.onBlur,
73
+ onClick = props.onClick,
74
+ onFocus = props.onFocus,
75
+ onMouseDown = props.onMouseDown,
76
+ onMouseEnter = props.onMouseEnter,
77
+ onMouseLeave = props.onMouseLeave,
78
+ onMouseUp = props.onMouseUp,
79
+ target = props.target,
80
+ testId = props.testId,
81
+ tooltip = props.tooltip,
82
+ rest = _objectWithoutProperties(props, _excluded2);
46
83
  return /*#__PURE__*/React.createElement(IconButton, _extends({
47
84
  icon: /*#__PURE__*/React.createElement(Nav4AppSwitcherIcon, {
48
85
  label: typeof tooltip === 'string' ? tooltip : 'Switch apps',
49
86
  color: "var(--ds-icon, #44546F)"
50
87
  }),
51
- tooltip: tooltip,
52
- ref: ref
53
- }, iconButtonProps));
88
+ component: component,
89
+ href: href,
90
+ id: id,
91
+ isDisabled: isDisabled,
92
+ isSelected: isSelected,
93
+ label: label,
94
+ onBlur: onBlur,
95
+ onClick: onClick,
96
+ onFocus: onFocus,
97
+ onMouseDown: onMouseDown,
98
+ onMouseEnter: onMouseEnter,
99
+ onMouseLeave: onMouseLeave,
100
+ onMouseUp: onMouseUp,
101
+ ref: ref,
102
+ target: target,
103
+ testId: testId,
104
+ tooltip: tooltip
105
+ // These are all explicit, leaving it in just in case
106
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
107
+ }, rest));
54
108
  });
55
109
 
56
110
  // exists only to extract props
@@ -70,7 +70,7 @@ export var Create = function Create(_ref2) {
70
70
  "aria-label": label,
71
71
  onClick: onClick,
72
72
  href: href
73
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
73
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides, @atlaskit/design-system/no-unsafe-style-overrides
74
74
  ,
75
75
  theme: getCreateButtonTheme(theme),
76
76
  testId: testId && "".concat(testId, "-button"),
@@ -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 QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
6
6
  import { useTheme } from '../../theme';
@@ -18,20 +18,52 @@ var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
18
18
  */
19
19
  export var Help = /*#__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
- iconButtonProps = _objectWithoutProperties(props, _excluded);
37
+ rest = _objectWithoutProperties(props, _excluded);
23
38
  var _useTheme = useTheme(),
24
39
  navigation = _useTheme.mode.navigation;
25
40
  var button = /*#__PURE__*/React.createElement(IconButton, _extends({
41
+ component: component,
42
+ href: href,
26
43
  icon: /*#__PURE__*/React.createElement(QuestionCircleIcon, {
27
44
  label: typeof tooltip === 'string' ? tooltip : 'Help Icon',
28
45
  color: "currentColor",
29
46
  spacing: "spacious",
30
47
  LEGACY_secondaryColor: navigation.backgroundColor
31
48
  }),
49
+ id: id,
50
+ isDisabled: isDisabled,
51
+ isSelected: isSelected,
52
+ label: label,
53
+ onBlur: onBlur,
54
+ onClick: onClick,
55
+ onFocus: onFocus,
56
+ onMouseDown: onMouseDown,
57
+ onMouseEnter: onMouseEnter,
58
+ onMouseLeave: onMouseLeave,
59
+ onMouseUp: onMouseUp,
32
60
  ref: ref,
61
+ target: target,
62
+ testId: testId,
33
63
  tooltip: tooltip
34
- }, iconButtonProps));
64
+ // These are all explicit, leaving it in just in case
65
+ // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
66
+ }, rest));
35
67
  return badge ? /*#__PURE__*/React.createElement(BadgeContainer, {
36
68
  id: HELP_NOTIFICATION_BADGE_ID,
37
69
  badge: badge,
@@ -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 = ["icon", "label", "testId", "tooltip"];
3
+ var _excluded = ["icon", "label", "testId", "tooltip", "component", "href", "id", "isDisabled", "isSelected", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "theme"];
4
4
  import React, { forwardRef } from 'react';
5
5
  import Button from '@atlaskit/button/custom-theme-button';
6
6
  import Tooltip from '@atlaskit/tooltip';
@@ -20,18 +20,47 @@ export var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
20
20
  label = props.label,
21
21
  testId = props.testId,
22
22
  tooltip = props.tooltip,
23
- buttonProps = _objectWithoutProperties(props, _excluded);
24
- var theme = useTheme();
23
+ component = props.component,
24
+ href = props.href,
25
+ id = props.id,
26
+ isDisabled = props.isDisabled,
27
+ isSelected = props.isSelected,
28
+ onBlur = props.onBlur,
29
+ onClick = props.onClick,
30
+ onFocus = props.onFocus,
31
+ onMouseDown = props.onMouseDown,
32
+ onMouseEnter = props.onMouseEnter,
33
+ onMouseLeave = props.onMouseLeave,
34
+ onMouseUp = props.onMouseUp,
35
+ target = props.target,
36
+ theme = props.theme,
37
+ rest = _objectWithoutProperties(props, _excluded);
38
+ var themeFromContext = useTheme();
25
39
  var button = /*#__PURE__*/React.createElement(Button, _extends({
26
40
  appearance: "primary",
27
41
  "aria-label": label,
28
- testId: testId,
42
+ component: component,
43
+ href: href,
29
44
  iconBefore: icon,
30
- ref: ref
31
- // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
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(theme)
34
- }, buttonProps));
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,