@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
@@ -1,81 +1,72 @@
1
1
  import { type NodePath } from 'ast-types/lib/node-path';
2
- import type {
3
- API,
4
- default as core,
5
- FileInfo,
6
- JSXElement,
7
- Node,
8
- Options,
9
- } from 'jscodeshift';
2
+ import type { API, default as core, FileInfo, JSXElement, Node, Options } from 'jscodeshift';
10
3
  import { type Collection } from 'jscodeshift/src/Collection';
11
4
 
12
5
  import { convertButtonType, transformButton } from './helpers/15.0.0-runner';
13
6
  import {
14
- addCommentBefore,
15
- addCommentToStartOfFile,
16
- addToImport,
17
- changeImportFor,
18
- getDefaultSpecifierName,
19
- getSafeImportName,
20
- isOnlyUsingNameForJSX,
21
- isUsingProp,
22
- isUsingSupportedSpread,
23
- type Nullable,
24
- tryCreateImport,
7
+ addCommentBefore,
8
+ addCommentToStartOfFile,
9
+ addToImport,
10
+ changeImportFor,
11
+ getDefaultSpecifierName,
12
+ getSafeImportName,
13
+ isOnlyUsingNameForJSX,
14
+ isUsingProp,
15
+ isUsingSupportedSpread,
16
+ type Nullable,
17
+ tryCreateImport,
25
18
  } from './helpers/helpers-generic';
26
19
 
27
20
  function changeUsage({
28
- j,
29
- base,
30
- packageName,
21
+ j,
22
+ base,
23
+ packageName,
31
24
  }: {
32
- j: core.JSCodeshift;
33
- base: Collection<Node>;
34
- packageName: string;
25
+ j: core.JSCodeshift;
26
+ base: Collection<Node>;
27
+ packageName: string;
35
28
  }): void {
36
- // 1. Are we using the default export?
37
- // If not: we can exit early!
38
- const defaultName: Nullable<string> = getDefaultSpecifierName({
39
- j,
40
- base,
41
- packageName,
42
- });
43
- if (defaultName == null) {
44
- return;
45
- }
29
+ // 1. Are we using the default export?
30
+ // If not: we can exit early!
31
+ const defaultName: Nullable<string> = getDefaultSpecifierName({
32
+ j,
33
+ base,
34
+ packageName,
35
+ });
36
+ if (defaultName == null) {
37
+ return;
38
+ }
46
39
 
47
- // Only supporting cases where default identifier is only used in JSX
48
- const isSupported: boolean = isOnlyUsingNameForJSX({
49
- j,
50
- base,
51
- name: defaultName,
52
- });
40
+ // Only supporting cases where default identifier is only used in JSX
41
+ const isSupported: boolean = isOnlyUsingNameForJSX({
42
+ j,
43
+ base,
44
+ name: defaultName,
45
+ });
53
46
 
54
- if (!isSupported) {
55
- tryCreateImport({
56
- j,
57
- base,
58
- relativeToPackage: '@atlaskit/button',
59
- packageName: '@atlaskit/button/standard-button',
60
- });
61
- addToImport({
62
- j,
63
- base,
64
- // we can safely use the default name, because it was being used before
65
- importSpecifier: j.importDefaultSpecifier(j.identifier(defaultName)),
66
- packageName: '@atlaskit/button/standard-button',
67
- });
47
+ if (!isSupported) {
48
+ tryCreateImport({
49
+ j,
50
+ base,
51
+ relativeToPackage: '@atlaskit/button',
52
+ packageName: '@atlaskit/button/standard-button',
53
+ });
54
+ addToImport({
55
+ j,
56
+ base,
57
+ // we can safely use the default name, because it was being used before
58
+ importSpecifier: j.importDefaultSpecifier(j.identifier(defaultName)),
59
+ packageName: '@atlaskit/button/standard-button',
60
+ });
68
61
 
69
- addCommentBefore({
70
- j,
71
- target: base
72
- .find(j.ImportDeclaration)
73
- .filter(
74
- (declaration) =>
75
- declaration.value.source.value ===
76
- '@atlaskit/button/standard-button',
77
- ),
78
- message: `
62
+ addCommentBefore({
63
+ j,
64
+ target: base
65
+ .find(j.ImportDeclaration)
66
+ .filter(
67
+ (declaration) => declaration.value.source.value === '@atlaskit/button/standard-button',
68
+ ),
69
+ message: `
79
70
  This file does not exclusively use Button in JSX.
80
71
  The codemod is unable to know which button variant, so it is using
81
72
  the standard button: "@atlaskit/button/standard-button".
@@ -83,203 +74,189 @@ function changeUsage({
83
74
  Please validate this decision.
84
75
  You might need to change the usage of Button to either LoadingButton or CustomThemeButton
85
76
  `,
86
- });
87
- return;
88
- }
77
+ });
78
+ return;
79
+ }
89
80
 
90
- // Find usages of the Button component
91
- // There are three possible import statements:
92
- // 1. import Button from '@atlaskit/button/standard';
93
- // 2. import LoadingButton from '@atlaskit/button/loading-button';
94
- // 3. import CustomThemeButton from '@atlaskit/button/custom-theme-button';
81
+ // Find usages of the Button component
82
+ // There are three possible import statements:
83
+ // 1. import Button from '@atlaskit/button/standard';
84
+ // 2. import LoadingButton from '@atlaskit/button/loading-button';
85
+ // 3. import CustomThemeButton from '@atlaskit/button/custom-theme-button';
95
86
 
96
- // What to do if any of the names clash?
97
- // - In the case of clash: prefix with 'DS' (eg import DSLoadingButton from '@atlaskit/button/loading-button';)
87
+ // What to do if any of the names clash?
88
+ // - In the case of clash: prefix with 'DS' (eg import DSLoadingButton from '@atlaskit/button/loading-button';)
98
89
 
99
- // What to do if old Button was aliased? eg "AkButton"
100
- // - We cannot use that existing alias as we might have three different Button imports in the file
101
- // - We automatically will be be swapping to the standard names with 'DS' prefix for all imports
90
+ // What to do if old Button was aliased? eg "AkButton"
91
+ // - We cannot use that existing alias as we might have three different Button imports in the file
92
+ // - We automatically will be be swapping to the standard names with 'DS' prefix for all imports
102
93
 
103
- type Groups = {
104
- standard: NodePath<JSXElement, JSXElement>[];
105
- loading: NodePath<JSXElement, JSXElement>[];
106
- customTheme: NodePath<JSXElement, JSXElement>[];
107
- };
94
+ type Groups = {
95
+ standard: NodePath<JSXElement, JSXElement>[];
96
+ loading: NodePath<JSXElement, JSXElement>[];
97
+ customTheme: NodePath<JSXElement, JSXElement>[];
98
+ };
108
99
 
109
- const groups: Groups = {
110
- standard: [],
111
- loading: [],
112
- customTheme: [],
113
- };
100
+ const groups: Groups = {
101
+ standard: [],
102
+ loading: [],
103
+ customTheme: [],
104
+ };
114
105
 
115
- base.findJSXElements(defaultName).forEach((path) => {
116
- const hasThemeProp: boolean = isUsingProp({
117
- j,
118
- base,
119
- element: path,
120
- propName: 'theme',
121
- });
106
+ base.findJSXElements(defaultName).forEach((path) => {
107
+ const hasThemeProp: boolean = isUsingProp({
108
+ j,
109
+ base,
110
+ element: path,
111
+ propName: 'theme',
112
+ });
122
113
 
123
- if (hasThemeProp) {
124
- groups.customTheme.push(path);
125
- return;
126
- }
114
+ if (hasThemeProp) {
115
+ groups.customTheme.push(path);
116
+ return;
117
+ }
127
118
 
128
- if (!isUsingSupportedSpread({ j, base, element: path })) {
129
- addCommentToStartOfFile({
130
- j,
131
- base,
132
- message: `
119
+ if (!isUsingSupportedSpread({ j, base, element: path })) {
120
+ addCommentToStartOfFile({
121
+ j,
122
+ base,
123
+ message: `
133
124
  Detected spreading props (<Button {...props} />) that was too complex for our codemod to understand
134
125
  Our codemod will only look at inline objects, or objects defined in the same file (ObjectExpression's)
135
126
  We have opted for our safest upgrade component in this file: '<CustomThemeButton />'
136
127
  `,
137
- });
138
- groups.customTheme.push(path);
139
- return;
140
- }
128
+ });
129
+ groups.customTheme.push(path);
130
+ return;
131
+ }
141
132
 
142
- const isUsingThemeInFile: boolean =
143
- base
144
- .find(j.ImportDeclaration)
145
- .filter(
146
- (declaration) =>
147
- declaration.value.source.value ===
148
- '@atlaskit/button/custom-theme-button',
149
- )
150
- .find(j.ImportSpecifier)
151
- .filter((specifier) => specifier.value.imported.name === 'Theme')
152
- .length > 0;
133
+ const isUsingThemeInFile: boolean =
134
+ base
135
+ .find(j.ImportDeclaration)
136
+ .filter(
137
+ (declaration) =>
138
+ declaration.value.source.value === '@atlaskit/button/custom-theme-button',
139
+ )
140
+ .find(j.ImportSpecifier)
141
+ .filter((specifier) => specifier.value.imported.name === 'Theme').length > 0;
153
142
 
154
- if (isUsingThemeInFile) {
155
- addCommentToStartOfFile({
156
- j,
157
- base,
158
- message: `
143
+ if (isUsingThemeInFile) {
144
+ addCommentToStartOfFile({
145
+ j,
146
+ base,
147
+ message: `
159
148
  Using "import { Theme } from '@atlaskit/button/custom-theme-button" in a file
160
149
  will cause all buttons in that file to be safely converted to a <CustomThemeButton/>
161
150
  `,
162
- });
151
+ });
163
152
 
164
- groups.customTheme.push(path);
165
- return;
166
- }
153
+ groups.customTheme.push(path);
154
+ return;
155
+ }
167
156
 
168
- const hasIsLoadingProp: boolean = isUsingProp({
169
- j,
170
- base,
171
- element: path,
172
- propName: 'isLoading',
173
- });
157
+ const hasIsLoadingProp: boolean = isUsingProp({
158
+ j,
159
+ base,
160
+ element: path,
161
+ propName: 'isLoading',
162
+ });
174
163
 
175
- if (hasIsLoadingProp) {
176
- groups.loading.push(path);
177
- return;
178
- }
164
+ if (hasIsLoadingProp) {
165
+ groups.loading.push(path);
166
+ return;
167
+ }
179
168
 
180
- groups.standard.push(path);
181
- return;
182
- });
169
+ groups.standard.push(path);
170
+ return;
171
+ });
183
172
 
184
- convertButtonType({
185
- j,
186
- base,
187
- elements: groups.standard,
188
- name: getSafeImportName({
189
- j,
190
- base,
191
- currentDefaultSpecifierName: defaultName,
192
- desiredName: 'Button',
193
- fallbackName: 'DSButton',
194
- }),
195
- newPackageName: '@atlaskit/button/standard-button',
196
- });
173
+ convertButtonType({
174
+ j,
175
+ base,
176
+ elements: groups.standard,
177
+ name: getSafeImportName({
178
+ j,
179
+ base,
180
+ currentDefaultSpecifierName: defaultName,
181
+ desiredName: 'Button',
182
+ fallbackName: 'DSButton',
183
+ }),
184
+ newPackageName: '@atlaskit/button/standard-button',
185
+ });
197
186
 
198
- convertButtonType({
199
- j,
200
- base,
201
- elements: groups.loading,
202
- newPackageName: '@atlaskit/button/loading-button',
203
- name: getSafeImportName({
204
- j,
205
- base,
206
- desiredName: 'LoadingButton',
207
- fallbackName: 'DSLoadingButton',
208
- currentDefaultSpecifierName: defaultName,
209
- }),
210
- });
211
- convertButtonType({
212
- j,
213
- base,
214
- elements: groups.customTheme,
215
- newPackageName: '@atlaskit/button/custom-theme-button',
216
- name: getSafeImportName({
217
- j,
218
- base,
219
- currentDefaultSpecifierName: defaultName,
220
- desiredName: 'CustomThemeButton',
221
- fallbackName: 'DSCustomThemeButton',
222
- }),
223
- });
187
+ convertButtonType({
188
+ j,
189
+ base,
190
+ elements: groups.loading,
191
+ newPackageName: '@atlaskit/button/loading-button',
192
+ name: getSafeImportName({
193
+ j,
194
+ base,
195
+ desiredName: 'LoadingButton',
196
+ fallbackName: 'DSLoadingButton',
197
+ currentDefaultSpecifierName: defaultName,
198
+ }),
199
+ });
200
+ convertButtonType({
201
+ j,
202
+ base,
203
+ elements: groups.customTheme,
204
+ newPackageName: '@atlaskit/button/custom-theme-button',
205
+ name: getSafeImportName({
206
+ j,
207
+ base,
208
+ currentDefaultSpecifierName: defaultName,
209
+ desiredName: 'CustomThemeButton',
210
+ fallbackName: 'DSCustomThemeButton',
211
+ }),
212
+ });
224
213
  }
225
214
 
226
- export default function transformer(
227
- file: FileInfo,
228
- { jscodeshift: j }: API,
229
- options: Options,
230
- ) {
231
- return transformButton({
232
- j,
233
- file,
234
- custom: (base: Collection<any>) => {
235
- changeImportFor({
236
- j,
237
- base,
238
- option: {
239
- type: 'keep-name',
240
- name: 'ButtonProps',
241
- behaviour: 'keep-as-named-import',
242
- },
243
- oldPackagePath: '@atlaskit/button',
244
- newPackagePath: '@atlaskit/button/types',
245
- });
215
+ export default function transformer(file: FileInfo, { jscodeshift: j }: API, options: Options) {
216
+ return transformButton({
217
+ j,
218
+ file,
219
+ custom: (base: Collection<any>) => {
220
+ changeImportFor({
221
+ j,
222
+ base,
223
+ option: {
224
+ type: 'keep-name',
225
+ name: 'ButtonProps',
226
+ behaviour: 'keep-as-named-import',
227
+ },
228
+ oldPackagePath: '@atlaskit/button',
229
+ newPackagePath: '@atlaskit/button/types',
230
+ });
246
231
 
247
- const isUsingButtonPropsType: boolean =
248
- base
249
- .find(j.ImportDeclaration)
250
- .filter(
251
- (declaration) =>
252
- declaration.value.source.value === '@atlaskit/button/types',
253
- )
254
- .find(j.ImportSpecifier)
255
- .filter(
256
- (specifier) => specifier.value.imported.name === 'ButtonProps',
257
- ).length > 0;
232
+ const isUsingButtonPropsType: boolean =
233
+ base
234
+ .find(j.ImportDeclaration)
235
+ .filter((declaration) => declaration.value.source.value === '@atlaskit/button/types')
236
+ .find(j.ImportSpecifier)
237
+ .filter((specifier) => specifier.value.imported.name === 'ButtonProps').length > 0;
258
238
 
259
- if (isUsingButtonPropsType) {
260
- const target = base
261
- .find(j.ImportDeclaration)
262
- .filter(
263
- (declaration) =>
264
- declaration.value.source.value === '@atlaskit/button/types',
265
- );
266
- addCommentBefore({
267
- j,
268
- target,
269
- message: `
239
+ if (isUsingButtonPropsType) {
240
+ const target = base
241
+ .find(j.ImportDeclaration)
242
+ .filter((declaration) => declaration.value.source.value === '@atlaskit/button/types');
243
+ addCommentBefore({
244
+ j,
245
+ target,
246
+ message: `
270
247
  Verify ButtonProps is the right prop type
271
248
  You might need the LoadingButtonProps, CustomButtonProps types which can be imported from '@atlaskit/button/types'
272
249
  `,
273
- });
274
- }
250
+ });
251
+ }
275
252
 
276
- changeUsage({
277
- j,
278
- base,
279
- packageName: '@atlaskit/button',
280
- });
281
- },
282
- });
253
+ changeUsage({
254
+ j,
255
+ base,
256
+ packageName: '@atlaskit/button',
257
+ });
258
+ },
259
+ });
283
260
  }
284
261
 
285
262
  // Note: not exporting a 'parser' because doing so
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
12
12
  var _useDefaultButton = _interopRequireDefault(require("./use-default-button"));
13
- var _excluded = ["analyticsContext", "interactionName", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "iconBefore", "isLoading", "UNSAFE_iconAfter_size", "iconAfter", "UNSAFE_iconBefore_size", "children", "shouldFitContainer", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "type", "testId"];
13
+ var _excluded = ["analyticsContext", "appearance", "autoFocus", "children", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isLoading", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "overlay", "shouldFitContainer", "spacing", "testId", "type", "UNSAFE_iconAfter_size", "UNSAFE_iconBefore_size"];
14
14
  /**
15
15
  * __Button__
16
16
  *
@@ -22,33 +22,33 @@ var _excluded = ["analyticsContext", "interactionName", "autoFocus", "appearance
22
22
  */
23
23
  var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function Button(_ref, ref) {
24
24
  var analyticsContext = _ref.analyticsContext,
25
- interactionName = _ref.interactionName,
26
- autoFocus = _ref.autoFocus,
27
25
  appearance = _ref.appearance,
28
- spacing = _ref.spacing,
29
- isDisabled = _ref.isDisabled,
30
- isSelected = _ref.isSelected,
26
+ autoFocus = _ref.autoFocus,
27
+ children = _ref.children,
28
+ iconAfter = _ref.iconAfter,
31
29
  iconBefore = _ref.iconBefore,
30
+ interactionName = _ref.interactionName,
31
+ isDisabled = _ref.isDisabled,
32
32
  isLoading = _ref.isLoading,
33
- UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
34
- iconAfter = _ref.iconAfter,
35
- UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
36
- children = _ref.children,
37
- shouldFitContainer = _ref.shouldFitContainer,
38
- overlay = _ref.overlay,
33
+ isSelected = _ref.isSelected,
39
34
  onClick = _ref.onClick,
40
- onMouseDownCapture = _ref.onMouseDownCapture,
41
- onMouseUpCapture = _ref.onMouseUpCapture,
35
+ onClickCapture = _ref.onClickCapture,
42
36
  onKeyDownCapture = _ref.onKeyDownCapture,
43
37
  onKeyUpCapture = _ref.onKeyUpCapture,
44
- onTouchStartCapture = _ref.onTouchStartCapture,
45
- onTouchEndCapture = _ref.onTouchEndCapture,
38
+ onMouseDownCapture = _ref.onMouseDownCapture,
39
+ onMouseUpCapture = _ref.onMouseUpCapture,
46
40
  onPointerDownCapture = _ref.onPointerDownCapture,
47
41
  onPointerUpCapture = _ref.onPointerUpCapture,
48
- onClickCapture = _ref.onClickCapture,
42
+ onTouchEndCapture = _ref.onTouchEndCapture,
43
+ onTouchStartCapture = _ref.onTouchStartCapture,
44
+ overlay = _ref.overlay,
45
+ shouldFitContainer = _ref.shouldFitContainer,
46
+ spacing = _ref.spacing,
47
+ testId = _ref.testId,
49
48
  _ref$type = _ref.type,
50
49
  type = _ref$type === void 0 ? 'button' : _ref$type,
51
- testId = _ref.testId,
50
+ UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
51
+ UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
52
52
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
53
53
  var baseProps = (0, _useDefaultButton.default)({
54
54
  analyticsContext: analyticsContext,
@@ -56,28 +56,28 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
56
56
  autoFocus: autoFocus,
57
57
  buttonType: 'button',
58
58
  children: children,
59
- iconBefore: iconBefore,
60
- UNSAFE_iconBefore_size: UNSAFE_iconBefore_size,
61
59
  iconAfter: iconAfter,
62
- UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
60
+ iconBefore: iconBefore,
63
61
  interactionName: interactionName,
64
62
  isDisabled: isDisabled,
65
- isSelected: isSelected,
66
63
  isLoading: isLoading,
64
+ isSelected: isSelected,
67
65
  onClick: onClick,
68
- onMouseDownCapture: onMouseDownCapture,
69
- onMouseUpCapture: onMouseUpCapture,
66
+ onClickCapture: onClickCapture,
70
67
  onKeyDownCapture: onKeyDownCapture,
71
68
  onKeyUpCapture: onKeyUpCapture,
72
- onTouchStartCapture: onTouchStartCapture,
73
- onTouchEndCapture: onTouchEndCapture,
69
+ onMouseDownCapture: onMouseDownCapture,
70
+ onMouseUpCapture: onMouseUpCapture,
74
71
  onPointerDownCapture: onPointerDownCapture,
75
72
  onPointerUpCapture: onPointerUpCapture,
76
- onClickCapture: onClickCapture,
73
+ onTouchEndCapture: onTouchEndCapture,
74
+ onTouchStartCapture: onTouchStartCapture,
77
75
  overlay: overlay,
78
76
  ref: ref,
79
77
  shouldFitContainer: shouldFitContainer,
80
- spacing: spacing
78
+ spacing: spacing,
79
+ UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
80
+ UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
81
81
  });
82
82
  return /*#__PURE__*/_react.default.createElement(_pressable.default
83
83
  // TODO: Remove spread props