@atlaskit/button 17.17.1 → 17.17.3

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 (74) hide show
  1. package/CHANGELOG.md +1224 -1221
  2. package/__perf__/button.tsx +6 -6
  3. package/__perf__/custom.tsx +6 -6
  4. package/__perf__/customised.tsx +1 -3
  5. package/__perf__/utils/example-runner.tsx +32 -36
  6. package/__perf__/utils/interaction-tasks.tsx +65 -86
  7. package/codemods/15.0.0-lite-mode.tsx +32 -36
  8. package/codemods/15.1.1-data-testid.tsx +136 -142
  9. package/codemods/__tests__/15.0.0-lite-mode/optimistic.tsx +121 -121
  10. package/codemods/__tests__/15.0.0-lite-mode/safe.tsx +54 -54
  11. package/codemods/__tests__/15.0.0-lite-mode/shared.tsx +96 -97
  12. package/codemods/__tests__/15.1.1-data-testid/rename-data-testid.tsx +32 -32
  13. package/codemods/__tests__/_framework.tsx +32 -32
  14. package/codemods/helpers/15.0.0-runner.tsx +135 -137
  15. package/codemods/helpers/helpers-generic.tsx +524 -556
  16. package/codemods/optimistic-15.0.0-lite-mode.tsx +208 -231
  17. package/dist/cjs/new-button/variants/default/button.js +28 -28
  18. package/dist/cjs/new-button/variants/default/link.js +26 -26
  19. package/dist/cjs/new-button/variants/default/use-default-button.js +11 -11
  20. package/dist/cjs/new-button/variants/icon/button.js +6 -6
  21. package/dist/cjs/new-button/variants/icon/link.js +5 -5
  22. package/dist/cjs/new-button/variants/icon/use-icon-button.js +6 -6
  23. package/dist/cjs/old-button/shared/button-base.js +4 -2
  24. package/dist/es2019/new-button/variants/default/button.js +27 -27
  25. package/dist/es2019/new-button/variants/default/link.js +27 -27
  26. package/dist/es2019/new-button/variants/default/use-default-button.js +11 -11
  27. package/dist/es2019/new-button/variants/icon/button.js +6 -6
  28. package/dist/es2019/new-button/variants/icon/link.js +8 -8
  29. package/dist/es2019/new-button/variants/icon/use-icon-button.js +6 -6
  30. package/dist/es2019/old-button/shared/button-base.js +4 -2
  31. package/dist/esm/new-button/variants/default/button.js +28 -28
  32. package/dist/esm/new-button/variants/default/link.js +28 -28
  33. package/dist/esm/new-button/variants/default/use-default-button.js +11 -11
  34. package/dist/esm/new-button/variants/icon/button.js +6 -6
  35. package/dist/esm/new-button/variants/icon/link.js +8 -8
  36. package/dist/esm/new-button/variants/icon/use-icon-button.js +6 -6
  37. package/dist/esm/old-button/shared/button-base.js +4 -2
  38. package/dist/types/entry-points/loading-button.d.ts +1 -1
  39. package/dist/types/entry-points/new.d.ts +3 -3
  40. package/dist/types/entry-points/types.d.ts +2 -2
  41. package/dist/types/index.d.ts +3 -3
  42. package/dist/types/new-button/containers/split-button/index.d.ts +2 -2
  43. package/dist/types/new-button/containers/split-button/split-button.d.ts +1 -1
  44. package/dist/types/new-button/variants/default/link.d.ts +1 -1
  45. package/dist/types/new-button/variants/default/use-default-button.d.ts +1 -1
  46. package/dist/types/new-button/variants/icon/use-icon-button.d.ts +1 -1
  47. package/dist/types/new-button/variants/shared/content.d.ts +1 -1
  48. package/dist/types/new.d.ts +3 -3
  49. package/dist/types-ts4.5/entry-points/loading-button.d.ts +1 -1
  50. package/dist/types-ts4.5/entry-points/new.d.ts +3 -3
  51. package/dist/types-ts4.5/entry-points/types.d.ts +2 -2
  52. package/dist/types-ts4.5/index.d.ts +3 -3
  53. package/dist/types-ts4.5/new-button/containers/split-button/index.d.ts +2 -2
  54. package/dist/types-ts4.5/new-button/containers/split-button/split-button.d.ts +1 -1
  55. package/dist/types-ts4.5/new-button/variants/default/link.d.ts +1 -1
  56. package/dist/types-ts4.5/new-button/variants/default/use-default-button.d.ts +1 -1
  57. package/dist/types-ts4.5/new-button/variants/icon/use-icon-button.d.ts +1 -1
  58. package/dist/types-ts4.5/new-button/variants/shared/content.d.ts +1 -1
  59. package/dist/types-ts4.5/new.d.ts +3 -3
  60. package/extract-react-types/custom-theme-button-props.tsx +2 -4
  61. package/extract-react-types/legacy-button/custom-theme-button-props.tsx +2 -4
  62. package/extract-react-types/legacy-button/loading-button-props.tsx +1 -1
  63. package/extract-react-types/legacy-button/shared-props.tsx +1 -1
  64. package/extract-react-types/loading-button-props.tsx +1 -1
  65. package/extract-react-types/new-button/containers/split-button/split-button-props.tsx +1 -1
  66. package/extract-react-types/new-button/variants/default/button-props.tsx +1 -1
  67. package/extract-react-types/new-button/variants/default/common-default-button-props.tsx +4 -4
  68. package/extract-react-types/new-button/variants/default/link-button-props.tsx +4 -4
  69. package/extract-react-types/new-button/variants/icon-button/common-icon-button-props.tsx +4 -4
  70. package/extract-react-types/new-button/variants/icon-button/icon-button-props.tsx +1 -1
  71. package/extract-react-types/new-button/variants/icon-button/link-icon-button-props.tsx +2 -4
  72. package/extract-react-types/shared-props.tsx +1 -1
  73. package/package.json +5 -7
  74. package/report.api.md +78 -96
@@ -11,36 +11,36 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
13
13
  var _useDefaultButton = _interopRequireDefault(require("./use-default-button"));
14
- var _excluded = ["analyticsContext", "interactionName", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "iconBefore", "UNSAFE_iconBefore_size", "iconAfter", "UNSAFE_iconAfter_size", "children", "shouldFitContainer", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "testId", "href"];
14
+ var _excluded = ["analyticsContext", "appearance", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "overlay", "shouldFitContainer", "spacing", "testId", "UNSAFE_iconAfter_size", "UNSAFE_iconBefore_size"];
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  var LinkButtonBase = function LinkButtonBase(_ref, ref) {
18
18
  var analyticsContext = _ref.analyticsContext,
19
- interactionName = _ref.interactionName,
20
- autoFocus = _ref.autoFocus,
21
19
  appearance = _ref.appearance,
22
- spacing = _ref.spacing,
20
+ autoFocus = _ref.autoFocus,
21
+ children = _ref.children,
22
+ href = _ref.href,
23
+ iconAfter = _ref.iconAfter,
24
+ iconBefore = _ref.iconBefore,
25
+ interactionName = _ref.interactionName,
23
26
  isDisabled = _ref.isDisabled,
24
27
  isSelected = _ref.isSelected,
25
- iconBefore = _ref.iconBefore,
26
- UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
27
- iconAfter = _ref.iconAfter,
28
- UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
29
- children = _ref.children,
30
- shouldFitContainer = _ref.shouldFitContainer,
31
- overlay = _ref.overlay,
32
28
  onClick = _ref.onClick,
33
- onMouseDownCapture = _ref.onMouseDownCapture,
34
- onMouseUpCapture = _ref.onMouseUpCapture,
29
+ onClickCapture = _ref.onClickCapture,
35
30
  onKeyDownCapture = _ref.onKeyDownCapture,
36
31
  onKeyUpCapture = _ref.onKeyUpCapture,
37
- onTouchStartCapture = _ref.onTouchStartCapture,
38
- onTouchEndCapture = _ref.onTouchEndCapture,
32
+ onMouseDownCapture = _ref.onMouseDownCapture,
33
+ onMouseUpCapture = _ref.onMouseUpCapture,
39
34
  onPointerDownCapture = _ref.onPointerDownCapture,
40
35
  onPointerUpCapture = _ref.onPointerUpCapture,
41
- onClickCapture = _ref.onClickCapture,
36
+ onTouchEndCapture = _ref.onTouchEndCapture,
37
+ onTouchStartCapture = _ref.onTouchStartCapture,
38
+ overlay = _ref.overlay,
39
+ shouldFitContainer = _ref.shouldFitContainer,
40
+ spacing = _ref.spacing,
42
41
  testId = _ref.testId,
43
- href = _ref.href,
42
+ UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
43
+ UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
44
44
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
45
45
  var baseProps = (0, _useDefaultButton.default)({
46
46
  analyticsContext: analyticsContext,
@@ -48,27 +48,27 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
48
48
  autoFocus: autoFocus,
49
49
  buttonType: 'link',
50
50
  children: children,
51
- iconBefore: iconBefore,
52
- UNSAFE_iconBefore_size: UNSAFE_iconBefore_size,
53
51
  iconAfter: iconAfter,
54
- UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
52
+ iconBefore: iconBefore,
55
53
  interactionName: interactionName,
56
54
  isDisabled: isDisabled,
57
55
  isSelected: isSelected,
58
56
  onClick: onClick,
59
- onMouseDownCapture: onMouseDownCapture,
60
- onMouseUpCapture: onMouseUpCapture,
57
+ onClickCapture: onClickCapture,
61
58
  onKeyDownCapture: onKeyDownCapture,
62
59
  onKeyUpCapture: onKeyUpCapture,
63
- onTouchStartCapture: onTouchStartCapture,
64
- onTouchEndCapture: onTouchEndCapture,
60
+ onMouseDownCapture: onMouseDownCapture,
61
+ onMouseUpCapture: onMouseUpCapture,
65
62
  onPointerDownCapture: onPointerDownCapture,
66
63
  onPointerUpCapture: onPointerUpCapture,
67
- onClickCapture: onClickCapture,
64
+ onTouchEndCapture: onTouchEndCapture,
65
+ onTouchStartCapture: onTouchStartCapture,
68
66
  overlay: overlay,
69
67
  ref: ref,
70
68
  shouldFitContainer: shouldFitContainer,
71
- spacing: spacing
69
+ spacing: spacing,
70
+ UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
71
+ UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
72
72
  });
73
73
  return /*#__PURE__*/_react.default.createElement(_anchor.default
74
74
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -26,30 +26,30 @@ var useDefaultButton = function useDefaultButton(_ref) {
26
26
  appearance = _ref.appearance,
27
27
  autoFocus = _ref.autoFocus,
28
28
  buttonType = _ref.buttonType,
29
- IconBefore = _ref.iconBefore,
30
- UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
29
+ children = _ref.children,
31
30
  IconAfter = _ref.iconAfter,
32
- UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
31
+ IconBefore = _ref.iconBefore,
33
32
  interactionName = _ref.interactionName,
34
33
  isDisabled = _ref.isDisabled,
35
- isSelected = _ref.isSelected,
36
34
  _ref$isLoading = _ref.isLoading,
37
35
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
38
- children = _ref.children,
36
+ isSelected = _ref.isSelected,
39
37
  onClick = _ref.onClick,
40
- onMouseDownCapture = _ref.onMouseDownCapture,
41
- onMouseUpCapture = _ref.onMouseUpCapture,
38
+ onClickCapture = _ref.onClickCapture,
42
39
  onKeyDownCapture = _ref.onKeyDownCapture,
43
40
  onKeyUpCapture = _ref.onKeyUpCapture,
44
- onTouchStartCapture = _ref.onTouchStartCapture,
45
- onTouchEndCapture = _ref.onTouchEndCapture,
41
+ onMouseDownCapture = _ref.onMouseDownCapture,
42
+ onMouseUpCapture = _ref.onMouseUpCapture,
46
43
  onPointerDownCapture = _ref.onPointerDownCapture,
47
44
  onPointerUpCapture = _ref.onPointerUpCapture,
48
- onClickCapture = _ref.onClickCapture,
45
+ onTouchEndCapture = _ref.onTouchEndCapture,
46
+ onTouchStartCapture = _ref.onTouchStartCapture,
49
47
  overlay = _ref.overlay,
50
48
  ref = _ref.ref,
51
49
  shouldFitContainer = _ref.shouldFitContainer,
52
- spacing = _ref.spacing;
50
+ spacing = _ref.spacing,
51
+ UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
52
+ UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size;
53
53
  var hasOverlay = Boolean(overlay || isLoading);
54
54
  var baseProps = (0, _useButtonBase.default)({
55
55
  analyticsContext: analyticsContext,
@@ -65,19 +65,19 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
65
65
  icon: icon,
66
66
  interactionName: interactionName,
67
67
  isDisabled: isDisabled,
68
- isSelected: isSelected,
69
68
  isLoading: isLoading,
69
+ isSelected: isSelected,
70
70
  label: label,
71
71
  onClick: onClick,
72
- onMouseDownCapture: onMouseDownCapture,
73
- onMouseUpCapture: onMouseUpCapture,
72
+ onClickCapture: onClickCapture,
74
73
  onKeyDownCapture: onKeyDownCapture,
75
74
  onKeyUpCapture: onKeyUpCapture,
76
- onTouchStartCapture: onTouchStartCapture,
77
- onTouchEndCapture: onTouchEndCapture,
75
+ onMouseDownCapture: onMouseDownCapture,
76
+ onMouseUpCapture: onMouseUpCapture,
78
77
  onPointerDownCapture: onPointerDownCapture,
79
78
  onPointerUpCapture: onPointerUpCapture,
80
- onClickCapture: onClickCapture,
79
+ onTouchEndCapture: onTouchEndCapture,
80
+ onTouchStartCapture: onTouchStartCapture,
81
81
  overlay: overlay,
82
82
  ref: ref,
83
83
  shape: shape,
@@ -56,15 +56,15 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
56
56
  isSelected: isSelected,
57
57
  label: label,
58
58
  onClick: onClick,
59
- onMouseDownCapture: onMouseDownCapture,
60
- onMouseUpCapture: onMouseUpCapture,
59
+ onClickCapture: onClickCapture,
61
60
  onKeyDownCapture: onKeyDownCapture,
62
61
  onKeyUpCapture: onKeyUpCapture,
63
- onTouchStartCapture: onTouchStartCapture,
64
- onTouchEndCapture: onTouchEndCapture,
62
+ onMouseDownCapture: onMouseDownCapture,
63
+ onMouseUpCapture: onMouseUpCapture,
65
64
  onPointerDownCapture: onPointerDownCapture,
66
65
  onPointerUpCapture: onPointerUpCapture,
67
- onClickCapture: onClickCapture,
66
+ onTouchEndCapture: onTouchEndCapture,
67
+ onTouchStartCapture: onTouchStartCapture,
68
68
  overlay: overlay,
69
69
  ref: ref,
70
70
  shape: shape,
@@ -27,19 +27,19 @@ var useIconButton = function useIconButton(_ref) {
27
27
  Icon = _ref.icon,
28
28
  interactionName = _ref.interactionName,
29
29
  isDisabled = _ref.isDisabled,
30
- isSelected = _ref.isSelected,
31
30
  isLoading = _ref.isLoading,
31
+ isSelected = _ref.isSelected,
32
32
  label = _ref.label,
33
33
  onClick = _ref.onClick,
34
- onMouseDownCapture = _ref.onMouseDownCapture,
35
- onMouseUpCapture = _ref.onMouseUpCapture,
34
+ onClickCapture = _ref.onClickCapture,
36
35
  onKeyDownCapture = _ref.onKeyDownCapture,
37
36
  onKeyUpCapture = _ref.onKeyUpCapture,
38
- onTouchStartCapture = _ref.onTouchStartCapture,
39
- onTouchEndCapture = _ref.onTouchEndCapture,
37
+ onMouseDownCapture = _ref.onMouseDownCapture,
38
+ onMouseUpCapture = _ref.onMouseUpCapture,
40
39
  onPointerDownCapture = _ref.onPointerDownCapture,
41
40
  onPointerUpCapture = _ref.onPointerUpCapture,
42
- onClickCapture = _ref.onClickCapture,
41
+ onTouchEndCapture = _ref.onTouchEndCapture,
42
+ onTouchStartCapture = _ref.onTouchStartCapture,
43
43
  overlay = _ref.overlay,
44
44
  ref = _ref.ref,
45
45
  shape = _ref.shape,
@@ -129,7 +129,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
129
129
  action: 'clicked',
130
130
  componentName: 'button',
131
131
  packageName: "@atlaskit/button",
132
- packageVersion: "17.17.1",
132
+ packageVersion: "17.17.3",
133
133
  analyticsData: analyticsContext
134
134
  });
135
135
 
@@ -168,7 +168,9 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
168
168
  };
169
169
  }
170
170
  return (0, _react2.jsx)(_focusRing.default, null, (0, _react2.jsx)(Component, (0, _extends2.default)({}, rest, {
171
- ref: setRef,
171
+ ref: setRef
172
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
173
+ ,
172
174
  className: className,
173
175
  css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss]
174
176
  // using undefined so that the property doesn't exist when false
@@ -13,32 +13,32 @@ import useDefaultButton from './use-default-button';
13
13
  */
14
14
  const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button({
15
15
  analyticsContext,
16
- interactionName,
17
- autoFocus,
18
16
  appearance,
19
- spacing,
20
- isDisabled,
21
- isSelected,
17
+ autoFocus,
18
+ children,
19
+ iconAfter,
22
20
  iconBefore,
21
+ interactionName,
22
+ isDisabled,
23
23
  isLoading,
24
- UNSAFE_iconAfter_size,
25
- iconAfter,
26
- UNSAFE_iconBefore_size,
27
- children,
28
- shouldFitContainer,
29
- overlay,
24
+ isSelected,
30
25
  onClick,
31
- onMouseDownCapture,
32
- onMouseUpCapture,
26
+ onClickCapture,
33
27
  onKeyDownCapture,
34
28
  onKeyUpCapture,
35
- onTouchStartCapture,
36
- onTouchEndCapture,
29
+ onMouseDownCapture,
30
+ onMouseUpCapture,
37
31
  onPointerDownCapture,
38
32
  onPointerUpCapture,
39
- onClickCapture,
40
- type = 'button',
33
+ onTouchEndCapture,
34
+ onTouchStartCapture,
35
+ overlay,
36
+ shouldFitContainer,
37
+ spacing,
41
38
  testId,
39
+ type = 'button',
40
+ UNSAFE_iconAfter_size,
41
+ UNSAFE_iconBefore_size,
42
42
  ...rest
43
43
  }, ref) {
44
44
  const baseProps = useDefaultButton({
@@ -47,28 +47,28 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
47
47
  autoFocus,
48
48
  buttonType: 'button',
49
49
  children,
50
- iconBefore,
51
- UNSAFE_iconBefore_size,
52
50
  iconAfter,
53
- UNSAFE_iconAfter_size,
51
+ iconBefore,
54
52
  interactionName,
55
53
  isDisabled,
56
- isSelected,
57
54
  isLoading,
55
+ isSelected,
58
56
  onClick,
59
- onMouseDownCapture,
60
- onMouseUpCapture,
57
+ onClickCapture,
61
58
  onKeyDownCapture,
62
59
  onKeyUpCapture,
63
- onTouchStartCapture,
64
- onTouchEndCapture,
60
+ onMouseDownCapture,
61
+ onMouseUpCapture,
65
62
  onPointerDownCapture,
66
63
  onPointerUpCapture,
67
- onClickCapture,
64
+ onTouchEndCapture,
65
+ onTouchStartCapture,
68
66
  overlay,
69
67
  ref,
70
68
  shouldFitContainer,
71
- spacing
69
+ spacing,
70
+ UNSAFE_iconAfter_size,
71
+ UNSAFE_iconBefore_size
72
72
  });
73
73
  return /*#__PURE__*/React.createElement(Pressable
74
74
  // TODO: Remove spread props
@@ -1,34 +1,34 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef, memo } from 'react';
3
- import UNSAFE_ANCHOR from '@atlaskit/primitives/anchor';
3
+ import Anchor from '@atlaskit/primitives/anchor';
4
4
  import useDefaultButton from './use-default-button';
5
5
  const LinkButtonBase = ({
6
6
  analyticsContext,
7
- interactionName,
8
- autoFocus,
9
7
  appearance,
10
- spacing,
8
+ autoFocus,
9
+ children,
10
+ href,
11
+ iconAfter,
12
+ iconBefore,
13
+ interactionName,
11
14
  isDisabled,
12
15
  isSelected,
13
- iconBefore,
14
- UNSAFE_iconBefore_size,
15
- iconAfter,
16
- UNSAFE_iconAfter_size,
17
- children,
18
- shouldFitContainer,
19
- overlay,
20
16
  onClick,
21
- onMouseDownCapture,
22
- onMouseUpCapture,
17
+ onClickCapture,
23
18
  onKeyDownCapture,
24
19
  onKeyUpCapture,
25
- onTouchStartCapture,
26
- onTouchEndCapture,
20
+ onMouseDownCapture,
21
+ onMouseUpCapture,
27
22
  onPointerDownCapture,
28
23
  onPointerUpCapture,
29
- onClickCapture,
24
+ onTouchEndCapture,
25
+ onTouchStartCapture,
26
+ overlay,
27
+ shouldFitContainer,
28
+ spacing,
30
29
  testId,
31
- href,
30
+ UNSAFE_iconAfter_size,
31
+ UNSAFE_iconBefore_size,
32
32
  ...rest
33
33
  }, ref) => {
34
34
  const baseProps = useDefaultButton({
@@ -37,29 +37,29 @@ const LinkButtonBase = ({
37
37
  autoFocus,
38
38
  buttonType: 'link',
39
39
  children,
40
- iconBefore,
41
- UNSAFE_iconBefore_size,
42
40
  iconAfter,
43
- UNSAFE_iconAfter_size,
41
+ iconBefore,
44
42
  interactionName,
45
43
  isDisabled,
46
44
  isSelected,
47
45
  onClick,
48
- onMouseDownCapture,
49
- onMouseUpCapture,
46
+ onClickCapture,
50
47
  onKeyDownCapture,
51
48
  onKeyUpCapture,
52
- onTouchStartCapture,
53
- onTouchEndCapture,
49
+ onMouseDownCapture,
50
+ onMouseUpCapture,
54
51
  onPointerDownCapture,
55
52
  onPointerUpCapture,
56
- onClickCapture,
53
+ onTouchEndCapture,
54
+ onTouchStartCapture,
57
55
  overlay,
58
56
  ref,
59
57
  shouldFitContainer,
60
- spacing
58
+ spacing,
59
+ UNSAFE_iconAfter_size,
60
+ UNSAFE_iconBefore_size
61
61
  });
62
- return /*#__PURE__*/React.createElement(UNSAFE_ANCHOR
62
+ return /*#__PURE__*/React.createElement(Anchor
63
63
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
64
64
  , _extends({}, rest, {
65
65
  ref: baseProps.ref,
@@ -16,29 +16,29 @@ const useDefaultButton = ({
16
16
  appearance,
17
17
  autoFocus,
18
18
  buttonType,
19
- iconBefore: IconBefore,
20
- UNSAFE_iconBefore_size,
19
+ children,
21
20
  iconAfter: IconAfter,
22
- UNSAFE_iconAfter_size,
21
+ iconBefore: IconBefore,
23
22
  interactionName,
24
23
  isDisabled,
25
- isSelected,
26
24
  isLoading = false,
27
- children,
25
+ isSelected,
28
26
  onClick,
29
- onMouseDownCapture,
30
- onMouseUpCapture,
27
+ onClickCapture,
31
28
  onKeyDownCapture,
32
29
  onKeyUpCapture,
33
- onTouchStartCapture,
34
- onTouchEndCapture,
30
+ onMouseDownCapture,
31
+ onMouseUpCapture,
35
32
  onPointerDownCapture,
36
33
  onPointerUpCapture,
37
- onClickCapture,
34
+ onTouchEndCapture,
35
+ onTouchStartCapture,
38
36
  overlay,
39
37
  ref,
40
38
  shouldFitContainer,
41
- spacing
39
+ spacing,
40
+ UNSAFE_iconAfter_size,
41
+ UNSAFE_iconBefore_size
42
42
  }) => {
43
43
  const hasOverlay = Boolean(overlay || isLoading);
44
44
  const baseProps = useButtonBase({
@@ -56,19 +56,19 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
56
56
  icon,
57
57
  interactionName,
58
58
  isDisabled,
59
- isSelected,
60
59
  isLoading,
60
+ isSelected,
61
61
  label,
62
62
  onClick,
63
- onMouseDownCapture,
64
- onMouseUpCapture,
63
+ onClickCapture,
65
64
  onKeyDownCapture,
66
65
  onKeyUpCapture,
67
- onTouchStartCapture,
68
- onTouchEndCapture,
66
+ onMouseDownCapture,
67
+ onMouseUpCapture,
69
68
  onPointerDownCapture,
70
69
  onPointerUpCapture,
71
- onClickCapture,
70
+ onTouchEndCapture,
71
+ onTouchStartCapture,
72
72
  overlay,
73
73
  ref,
74
74
  shape,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef, memo } from 'react';
3
- import UNSAFE_ANCHOR from '@atlaskit/primitives/anchor';
3
+ import Anchor from '@atlaskit/primitives/anchor';
4
4
  import Tooltip from '@atlaskit/tooltip';
5
5
  import useIconButton from './use-icon-button';
6
6
  const LinkIconButtonBase = ({
@@ -45,15 +45,15 @@ const LinkIconButtonBase = ({
45
45
  isSelected,
46
46
  label,
47
47
  onClick,
48
- onMouseDownCapture,
49
- onMouseUpCapture,
48
+ onClickCapture,
50
49
  onKeyDownCapture,
51
50
  onKeyUpCapture,
52
- onTouchStartCapture,
53
- onTouchEndCapture,
51
+ onMouseDownCapture,
52
+ onMouseUpCapture,
54
53
  onPointerDownCapture,
55
54
  onPointerUpCapture,
56
- onClickCapture,
55
+ onTouchEndCapture,
56
+ onTouchStartCapture,
57
57
  overlay,
58
58
  ref,
59
59
  shape,
@@ -77,7 +77,7 @@ const LinkIconButtonBase = ({
77
77
  component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
78
78
  hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
79
79
  hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
80
- }, triggerProps => /*#__PURE__*/React.createElement(UNSAFE_ANCHOR
80
+ }, triggerProps => /*#__PURE__*/React.createElement(Anchor
81
81
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
82
82
  , _extends({}, rest, {
83
83
  testId: testId,
@@ -151,7 +151,7 @@ const LinkIconButtonBase = ({
151
151
  "aria-disabled": baseProps.isDisabled === true ? true : undefined
152
152
  }), baseProps.children));
153
153
  }
154
- return /*#__PURE__*/React.createElement(UNSAFE_ANCHOR
154
+ return /*#__PURE__*/React.createElement(Anchor
155
155
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
156
156
  , _extends({}, rest, {
157
157
  ref: baseProps.ref,
@@ -20,19 +20,19 @@ const useIconButton = ({
20
20
  icon: Icon,
21
21
  interactionName,
22
22
  isDisabled,
23
- isSelected,
24
23
  isLoading,
24
+ isSelected,
25
25
  label,
26
26
  onClick,
27
- onMouseDownCapture,
28
- onMouseUpCapture,
27
+ onClickCapture,
29
28
  onKeyDownCapture,
30
29
  onKeyUpCapture,
31
- onTouchStartCapture,
32
- onTouchEndCapture,
30
+ onMouseDownCapture,
31
+ onMouseUpCapture,
33
32
  onPointerDownCapture,
34
33
  onPointerUpCapture,
35
- onClickCapture,
34
+ onTouchEndCapture,
35
+ onTouchStartCapture,
36
36
  overlay,
37
37
  ref,
38
38
  shape,
@@ -114,7 +114,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
114
114
  action: 'clicked',
115
115
  componentName: 'button',
116
116
  packageName: "@atlaskit/button",
117
- packageVersion: "17.17.1",
117
+ packageVersion: "17.17.3",
118
118
  analyticsData: analyticsContext
119
119
  });
120
120
 
@@ -153,7 +153,9 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
153
153
  };
154
154
  }
155
155
  return jsx(FocusRing, null, jsx(Component, _extends({}, rest, {
156
- ref: setRef,
156
+ ref: setRef
157
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
158
+ ,
157
159
  className: className,
158
160
  css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss]
159
161
  // using undefined so that the property doesn't exist when false