@atlaskit/checkbox 15.3.1 → 15.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/checkbox
|
|
2
2
|
|
|
3
|
+
## 15.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#114285](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114285)
|
|
8
|
+
[`7401cbc8ec943`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7401cbc8ec943) -
|
|
9
|
+
Remove old codemod.
|
|
10
|
+
|
|
3
11
|
## 15.3.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/cjs/checkbox.js
CHANGED
|
@@ -196,7 +196,7 @@ var Checkbox = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef
|
|
|
196
196
|
analyticsData: analyticsContext,
|
|
197
197
|
componentName: 'checkbox',
|
|
198
198
|
packageName: "@atlaskit/checkbox",
|
|
199
|
-
packageVersion: "15.3.
|
|
199
|
+
packageVersion: "15.3.2"
|
|
200
200
|
});
|
|
201
201
|
var internalRef = (0, _react.useRef)(null);
|
|
202
202
|
var mergedRefs = (0, _mergeRefs.default)([internalRef, ref]);
|
package/dist/es2019/checkbox.js
CHANGED
|
@@ -182,7 +182,7 @@ const Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(pr
|
|
|
182
182
|
analyticsData: analyticsContext,
|
|
183
183
|
componentName: 'checkbox',
|
|
184
184
|
packageName: "@atlaskit/checkbox",
|
|
185
|
-
packageVersion: "15.3.
|
|
185
|
+
packageVersion: "15.3.2"
|
|
186
186
|
});
|
|
187
187
|
const internalRef = useRef(null);
|
|
188
188
|
const mergedRefs = mergeRefs([internalRef, ref]);
|
package/dist/esm/checkbox.js
CHANGED
|
@@ -190,7 +190,7 @@ var Checkbox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Checkbox(prop
|
|
|
190
190
|
analyticsData: analyticsContext,
|
|
191
191
|
componentName: 'checkbox',
|
|
192
192
|
packageName: "@atlaskit/checkbox",
|
|
193
|
-
packageVersion: "15.3.
|
|
193
|
+
packageVersion: "15.3.2"
|
|
194
194
|
});
|
|
195
195
|
var internalRef = useRef(null);
|
|
196
196
|
var mergedRefs = mergeRefs([internalRef, ref]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/checkbox",
|
|
3
|
-
"version": "15.3.
|
|
3
|
+
"version": "15.3.2",
|
|
4
4
|
"description": "A checkbox is an input control that allows a user to select one or more options from a number of choices.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/analytics-next": "^10.3.0",
|
|
40
40
|
"@atlaskit/css": "^0.8.0",
|
|
41
41
|
"@atlaskit/ds-lib": "^3.5.0",
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
42
|
+
"@atlaskit/icon": "^23.9.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "*",
|
|
44
44
|
"@atlaskit/theme": "^15.0.0",
|
|
45
45
|
"@atlaskit/tokens": "^3.3.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/docs": "*",
|
|
58
58
|
"@atlaskit/form": "^11.1.0",
|
|
59
59
|
"@atlaskit/link": "*",
|
|
60
|
-
"@atlaskit/primitives": "^13.
|
|
60
|
+
"@atlaskit/primitives": "^13.5.0",
|
|
61
61
|
"@atlaskit/section-message": "*",
|
|
62
62
|
"@atlaskit/ssr": "*",
|
|
63
63
|
"@atlaskit/visual-regression": "*",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { removeThemeImports } from './migrations/remove-imports';
|
|
2
|
-
import { removeFullWidth, removeOverrides, removeTheme } from './migrations/remove-props';
|
|
3
|
-
import {
|
|
4
|
-
renameCheckboxWithoutAnalyticsImport,
|
|
5
|
-
renameDeepTypeImport,
|
|
6
|
-
renameTypeImport,
|
|
7
|
-
} from './migrations/rename-import';
|
|
8
|
-
import { renameInputRef } from './migrations/rename-input-ref-to-ref';
|
|
9
|
-
import { createTransformer } from './utils';
|
|
10
|
-
|
|
11
|
-
const transformer = createTransformer('@atlaskit/checkbox', [
|
|
12
|
-
removeThemeImports,
|
|
13
|
-
renameCheckboxWithoutAnalyticsImport,
|
|
14
|
-
renameTypeImport,
|
|
15
|
-
renameDeepTypeImport,
|
|
16
|
-
renameInputRef,
|
|
17
|
-
removeFullWidth,
|
|
18
|
-
removeOverrides,
|
|
19
|
-
removeTheme,
|
|
20
|
-
]);
|
|
21
|
-
|
|
22
|
-
export default transformer;
|
|
@@ -1,549 +0,0 @@
|
|
|
1
|
-
jest.autoMockOff();
|
|
2
|
-
|
|
3
|
-
import transformer from '../12.0.0-lite-mode';
|
|
4
|
-
|
|
5
|
-
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
6
|
-
|
|
7
|
-
describe('Update imports', () => {
|
|
8
|
-
defineInlineTest(
|
|
9
|
-
{ default: transformer, parser: 'tsx' },
|
|
10
|
-
{},
|
|
11
|
-
`
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { CheckboxWithoutAnalytics as Checkbox } from '@atlaskit/checkbox/Checkbox';
|
|
14
|
-
|
|
15
|
-
const SimpleCheckbox = () => {
|
|
16
|
-
return <Checkbox />;
|
|
17
|
-
}
|
|
18
|
-
`,
|
|
19
|
-
`
|
|
20
|
-
import React from 'react';
|
|
21
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
22
|
-
|
|
23
|
-
const SimpleCheckbox = () => {
|
|
24
|
-
return <Checkbox />;
|
|
25
|
-
}
|
|
26
|
-
`,
|
|
27
|
-
'should replace import to CheckboxWithoutAnayltics with base import',
|
|
28
|
-
);
|
|
29
|
-
defineInlineTest(
|
|
30
|
-
{ default: transformer, parser: 'tsx' },
|
|
31
|
-
{},
|
|
32
|
-
`
|
|
33
|
-
import React from 'react';
|
|
34
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
35
|
-
import { CheckboxProps } from '@atlaskit/checkbox/types';
|
|
36
|
-
|
|
37
|
-
const SimpleCheckbox = () => {
|
|
38
|
-
const props: CheckboxProps = {
|
|
39
|
-
value: 'hello',
|
|
40
|
-
};
|
|
41
|
-
return <Checkbox {...props} />;
|
|
42
|
-
}
|
|
43
|
-
`,
|
|
44
|
-
`
|
|
45
|
-
import React from 'react';
|
|
46
|
-
import { Checkbox, CheckboxProps } from '@atlaskit/checkbox';
|
|
47
|
-
|
|
48
|
-
const SimpleCheckbox = () => {
|
|
49
|
-
const props: CheckboxProps = {
|
|
50
|
-
value: 'hello',
|
|
51
|
-
};
|
|
52
|
-
return <Checkbox {...props} />;
|
|
53
|
-
}
|
|
54
|
-
`,
|
|
55
|
-
'should replace import into /types with base import',
|
|
56
|
-
);
|
|
57
|
-
defineInlineTest(
|
|
58
|
-
{ default: transformer, parser: 'tsx' },
|
|
59
|
-
{},
|
|
60
|
-
`
|
|
61
|
-
import React from 'react';
|
|
62
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
63
|
-
import { CheckboxProps as AkCheckboxProps } from '@atlaskit/checkbox/dist/cjs/types';
|
|
64
|
-
|
|
65
|
-
const SimpleCheckbox = () => {
|
|
66
|
-
const props: AkCheckboxProps = {
|
|
67
|
-
value: 'hello',
|
|
68
|
-
};
|
|
69
|
-
return <Checkbox {...props} />;
|
|
70
|
-
}
|
|
71
|
-
`,
|
|
72
|
-
`
|
|
73
|
-
import React from 'react';
|
|
74
|
-
import { Checkbox, CheckboxProps as AkCheckboxProps } from '@atlaskit/checkbox';
|
|
75
|
-
|
|
76
|
-
const SimpleCheckbox = () => {
|
|
77
|
-
const props: AkCheckboxProps = {
|
|
78
|
-
value: 'hello',
|
|
79
|
-
};
|
|
80
|
-
return <Checkbox {...props} />;
|
|
81
|
-
}
|
|
82
|
-
`,
|
|
83
|
-
'should replace import into /dist/cjs/types with an alias with base import',
|
|
84
|
-
);
|
|
85
|
-
defineInlineTest(
|
|
86
|
-
{ default: transformer, parser: 'tsx' },
|
|
87
|
-
{},
|
|
88
|
-
`
|
|
89
|
-
import React from 'react';
|
|
90
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
91
|
-
import { ComponentTokens, ThemeFn } from '@atlaskit/checkbox/types';
|
|
92
|
-
|
|
93
|
-
const SimpleCheckbox = () => {
|
|
94
|
-
return <Checkbox />;
|
|
95
|
-
}
|
|
96
|
-
`,
|
|
97
|
-
`
|
|
98
|
-
/* TODO: (from codemod) This file uses exports used to help theme @atlaskit/checkbox which
|
|
99
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
100
|
-
theme with an equivalent API due to minimal usage of the theming.
|
|
101
|
-
The appearance of Checkbox will have likely changed. */
|
|
102
|
-
import React from 'react';
|
|
103
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
104
|
-
|
|
105
|
-
const SimpleCheckbox = () => {
|
|
106
|
-
return <Checkbox />;
|
|
107
|
-
}
|
|
108
|
-
`,
|
|
109
|
-
'should replace import from /types that do not exist anymore',
|
|
110
|
-
);
|
|
111
|
-
defineInlineTest(
|
|
112
|
-
{ default: transformer, parser: 'tsx' },
|
|
113
|
-
{},
|
|
114
|
-
`
|
|
115
|
-
import React from 'react';
|
|
116
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
117
|
-
import { ComponentTokens, ThemeFn, CheckboxProps as AkCheckboxProps } from '@atlaskit/checkbox/types';
|
|
118
|
-
|
|
119
|
-
const SimpleCheckbox = () => {
|
|
120
|
-
const props: AkCheckboxProps = {
|
|
121
|
-
value: 'hello',
|
|
122
|
-
};
|
|
123
|
-
return <Checkbox {...props} />;
|
|
124
|
-
}
|
|
125
|
-
`,
|
|
126
|
-
`
|
|
127
|
-
/* TODO: (from codemod) This file uses exports used to help theme @atlaskit/checkbox which
|
|
128
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
129
|
-
theme with an equivalent API due to minimal usage of the theming.
|
|
130
|
-
The appearance of Checkbox will have likely changed. */
|
|
131
|
-
import React from 'react';
|
|
132
|
-
import { Checkbox, CheckboxProps as AkCheckboxProps } from '@atlaskit/checkbox';
|
|
133
|
-
|
|
134
|
-
const SimpleCheckbox = () => {
|
|
135
|
-
const props: AkCheckboxProps = {
|
|
136
|
-
value: 'hello',
|
|
137
|
-
};
|
|
138
|
-
return <Checkbox {...props} />;
|
|
139
|
-
}
|
|
140
|
-
`,
|
|
141
|
-
'should replace import from /types that do not exist anymore',
|
|
142
|
-
);
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
describe('Update ref prop', () => {
|
|
146
|
-
defineInlineTest(
|
|
147
|
-
{ default: transformer, parser: 'tsx' },
|
|
148
|
-
{},
|
|
149
|
-
`
|
|
150
|
-
import React, { useRef } from 'react';
|
|
151
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
152
|
-
|
|
153
|
-
const SimpleCheckbox = () => {
|
|
154
|
-
let ref = useRef();
|
|
155
|
-
|
|
156
|
-
const inputRef = (newRef) => {
|
|
157
|
-
ref = newRef;
|
|
158
|
-
}
|
|
159
|
-
return <Checkbox inputRef={inputRef} />;
|
|
160
|
-
}
|
|
161
|
-
`,
|
|
162
|
-
`
|
|
163
|
-
import React, { useRef } from 'react';
|
|
164
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
165
|
-
|
|
166
|
-
const SimpleCheckbox = () => {
|
|
167
|
-
let ref = useRef();
|
|
168
|
-
|
|
169
|
-
const inputRef = (newRef) => {
|
|
170
|
-
ref = newRef;
|
|
171
|
-
}
|
|
172
|
-
return <Checkbox ref={inputRef} />;
|
|
173
|
-
}
|
|
174
|
-
`,
|
|
175
|
-
'should replace inputRef with ref',
|
|
176
|
-
);
|
|
177
|
-
|
|
178
|
-
defineInlineTest(
|
|
179
|
-
{ default: transformer, parser: 'tsx' },
|
|
180
|
-
{},
|
|
181
|
-
`
|
|
182
|
-
import React, { useRef } from 'react';
|
|
183
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
184
|
-
|
|
185
|
-
const SimpleCheckbox = () => {
|
|
186
|
-
let ref = useRef();
|
|
187
|
-
|
|
188
|
-
return (
|
|
189
|
-
<Checkbox
|
|
190
|
-
inputRef={newRef => {
|
|
191
|
-
ref = newRef;
|
|
192
|
-
}}
|
|
193
|
-
/>
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
`,
|
|
197
|
-
`
|
|
198
|
-
import React, { useRef } from 'react';
|
|
199
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
200
|
-
|
|
201
|
-
const SimpleCheckbox = () => {
|
|
202
|
-
let ref = useRef();
|
|
203
|
-
|
|
204
|
-
return (
|
|
205
|
-
<Checkbox
|
|
206
|
-
ref={newRef => {
|
|
207
|
-
ref = newRef;
|
|
208
|
-
}}
|
|
209
|
-
/>
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
`,
|
|
213
|
-
'should replace inputRef with ref when defined inline',
|
|
214
|
-
);
|
|
215
|
-
|
|
216
|
-
defineInlineTest(
|
|
217
|
-
{ default: transformer, parser: 'tsx' },
|
|
218
|
-
{},
|
|
219
|
-
`
|
|
220
|
-
import React, { useRef } from 'react';
|
|
221
|
-
import { Checkbox as Foo } from '@atlaskit/checkbox';
|
|
222
|
-
|
|
223
|
-
const SimpleCheckbox = () => {
|
|
224
|
-
let ref = useRef();
|
|
225
|
-
|
|
226
|
-
const inputRef = (newRef) => {
|
|
227
|
-
ref = newRef;
|
|
228
|
-
}
|
|
229
|
-
return <Foo inputRef={inputRef} />;
|
|
230
|
-
}
|
|
231
|
-
`,
|
|
232
|
-
`
|
|
233
|
-
import React, { useRef } from 'react';
|
|
234
|
-
import { Checkbox as Foo } from '@atlaskit/checkbox';
|
|
235
|
-
|
|
236
|
-
const SimpleCheckbox = () => {
|
|
237
|
-
let ref = useRef();
|
|
238
|
-
|
|
239
|
-
const inputRef = (newRef) => {
|
|
240
|
-
ref = newRef;
|
|
241
|
-
}
|
|
242
|
-
return <Foo ref={inputRef} />;
|
|
243
|
-
}
|
|
244
|
-
`,
|
|
245
|
-
'should change inputRef with aliased import name',
|
|
246
|
-
);
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
describe('Remove props', () => {
|
|
250
|
-
defineInlineTest(
|
|
251
|
-
{ default: transformer, parser: 'tsx' },
|
|
252
|
-
{},
|
|
253
|
-
`
|
|
254
|
-
import React from 'react';
|
|
255
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
256
|
-
|
|
257
|
-
const SimpleCheckbox = () => {
|
|
258
|
-
return <Checkbox isFullWidth={true} />;
|
|
259
|
-
}
|
|
260
|
-
`,
|
|
261
|
-
`
|
|
262
|
-
import React from 'react';
|
|
263
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
264
|
-
|
|
265
|
-
const SimpleCheckbox = () => {
|
|
266
|
-
return <Checkbox />;
|
|
267
|
-
}
|
|
268
|
-
`,
|
|
269
|
-
'should remove isFullWidth',
|
|
270
|
-
);
|
|
271
|
-
defineInlineTest(
|
|
272
|
-
{ default: transformer, parser: 'tsx' },
|
|
273
|
-
{},
|
|
274
|
-
`
|
|
275
|
-
import React from 'react';
|
|
276
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
277
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
278
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
279
|
-
|
|
280
|
-
const SimpleCheckbox = () => {
|
|
281
|
-
return (
|
|
282
|
-
<Checkbox
|
|
283
|
-
overrides={{
|
|
284
|
-
Icon: {
|
|
285
|
-
// Adding a custom Icon component
|
|
286
|
-
component: Icon,
|
|
287
|
-
},
|
|
288
|
-
IconIndeterminate: {
|
|
289
|
-
// Adding a custom Icon component for the indeterminate state
|
|
290
|
-
component: IconIndeterminate,
|
|
291
|
-
},
|
|
292
|
-
}}
|
|
293
|
-
/>
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
|
-
`,
|
|
297
|
-
`
|
|
298
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`overrides\` prop
|
|
299
|
-
which has now been removed due to its poor performance characteristics. We have not
|
|
300
|
-
replaced overrides with an equivalent API and the overrides pattern exposes internal
|
|
301
|
-
implementation detail as public API and makes it harder for you to upgrade. The appearance
|
|
302
|
-
of Checkbox will have likely changed. */
|
|
303
|
-
import React from 'react';
|
|
304
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
305
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
306
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
307
|
-
|
|
308
|
-
const SimpleCheckbox = () => {
|
|
309
|
-
return <Checkbox />;
|
|
310
|
-
}
|
|
311
|
-
`,
|
|
312
|
-
'should remove overrides and leave a comment',
|
|
313
|
-
);
|
|
314
|
-
defineInlineTest(
|
|
315
|
-
{ default: transformer, parser: 'tsx' },
|
|
316
|
-
{},
|
|
317
|
-
`
|
|
318
|
-
import React from 'react';
|
|
319
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
320
|
-
import customeTheme from './theme';
|
|
321
|
-
|
|
322
|
-
const SimpleCheckbox = () => {
|
|
323
|
-
return (
|
|
324
|
-
<Checkbox
|
|
325
|
-
theme={customTheme}
|
|
326
|
-
/>
|
|
327
|
-
);
|
|
328
|
-
}
|
|
329
|
-
`,
|
|
330
|
-
`
|
|
331
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`theme\` prop which
|
|
332
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
333
|
-
theme with an equivalent API due to minimal usage of the \`theme\` prop. However if you
|
|
334
|
-
were using theme to customise the size of the checkbox there is now a \`size\` prop.
|
|
335
|
-
The appearance of Checkbox will have likely changed. */
|
|
336
|
-
import React from 'react';
|
|
337
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
338
|
-
import customeTheme from './theme';
|
|
339
|
-
|
|
340
|
-
const SimpleCheckbox = () => {
|
|
341
|
-
return <Checkbox />;
|
|
342
|
-
}
|
|
343
|
-
`,
|
|
344
|
-
'should remove theme and leave a comment',
|
|
345
|
-
);
|
|
346
|
-
defineInlineTest(
|
|
347
|
-
{ default: transformer, parser: 'tsx' },
|
|
348
|
-
{},
|
|
349
|
-
`
|
|
350
|
-
import React from 'react';
|
|
351
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
352
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
353
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
354
|
-
import customeTheme from './theme';
|
|
355
|
-
|
|
356
|
-
const SimpleCheckbox = () => {
|
|
357
|
-
return (
|
|
358
|
-
<Checkbox
|
|
359
|
-
overrides={{
|
|
360
|
-
Icon: {
|
|
361
|
-
// Adding a custom Icon component
|
|
362
|
-
component: Icon,
|
|
363
|
-
},
|
|
364
|
-
IconIndeterminate: {
|
|
365
|
-
// Adding a custom Icon component for the indeterminate state
|
|
366
|
-
component: IconIndeterminate,
|
|
367
|
-
},
|
|
368
|
-
}}
|
|
369
|
-
theme={customeTheme}
|
|
370
|
-
isFullWidth={true}
|
|
371
|
-
/>
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
`,
|
|
375
|
-
`
|
|
376
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`overrides\` prop
|
|
377
|
-
which has now been removed due to its poor performance characteristics. We have not
|
|
378
|
-
replaced overrides with an equivalent API and the overrides pattern exposes internal
|
|
379
|
-
implementation detail as public API and makes it harder for you to upgrade. The appearance
|
|
380
|
-
of Checkbox will have likely changed. */
|
|
381
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`theme\` prop which
|
|
382
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
383
|
-
theme with an equivalent API due to minimal usage of the \`theme\` prop. However if you
|
|
384
|
-
were using theme to customise the size of the checkbox there is now a \`size\` prop.
|
|
385
|
-
The appearance of Checkbox will have likely changed. */
|
|
386
|
-
import React from 'react';
|
|
387
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
388
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
389
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
390
|
-
import customeTheme from './theme';
|
|
391
|
-
|
|
392
|
-
const SimpleCheckbox = () => {
|
|
393
|
-
return <Checkbox />;
|
|
394
|
-
}
|
|
395
|
-
`,
|
|
396
|
-
'should remove all 3 props and leave a comment',
|
|
397
|
-
);
|
|
398
|
-
defineInlineTest(
|
|
399
|
-
{ default: transformer, parser: 'tsx' },
|
|
400
|
-
{},
|
|
401
|
-
`
|
|
402
|
-
import React from 'react';
|
|
403
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
404
|
-
import { ComponentTokens, ThemeFn, CheckboxProps as AkCheckboxProps } from '@atlaskit/checkbox/types';
|
|
405
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
406
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
407
|
-
import customeTheme from './theme';
|
|
408
|
-
|
|
409
|
-
const SimpleCheckbox = () => {
|
|
410
|
-
return (
|
|
411
|
-
<Checkbox
|
|
412
|
-
overrides={{
|
|
413
|
-
Icon: {
|
|
414
|
-
// Adding a custom Icon component
|
|
415
|
-
component: Icon,
|
|
416
|
-
},
|
|
417
|
-
IconIndeterminate: {
|
|
418
|
-
// Adding a custom Icon component for the indeterminate state
|
|
419
|
-
component: IconIndeterminate,
|
|
420
|
-
},
|
|
421
|
-
}}
|
|
422
|
-
theme={customeTheme}
|
|
423
|
-
isFullWidth={true}
|
|
424
|
-
/>
|
|
425
|
-
);
|
|
426
|
-
}
|
|
427
|
-
`,
|
|
428
|
-
`
|
|
429
|
-
/* TODO: (from codemod) This file uses exports used to help theme @atlaskit/checkbox which
|
|
430
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
431
|
-
theme with an equivalent API due to minimal usage of the theming.
|
|
432
|
-
The appearance of Checkbox will have likely changed. */
|
|
433
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`overrides\` prop
|
|
434
|
-
which has now been removed due to its poor performance characteristics. We have not
|
|
435
|
-
replaced overrides with an equivalent API and the overrides pattern exposes internal
|
|
436
|
-
implementation detail as public API and makes it harder for you to upgrade. The appearance
|
|
437
|
-
of Checkbox will have likely changed. */
|
|
438
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`theme\` prop which
|
|
439
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
440
|
-
theme with an equivalent API due to minimal usage of the \`theme\` prop. However if you
|
|
441
|
-
were using theme to customise the size of the checkbox there is now a \`size\` prop.
|
|
442
|
-
The appearance of Checkbox will have likely changed. */
|
|
443
|
-
import React from 'react';
|
|
444
|
-
import { Checkbox, CheckboxProps as AkCheckboxProps } from '@atlaskit/checkbox';
|
|
445
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
446
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
447
|
-
import customeTheme from './theme';
|
|
448
|
-
|
|
449
|
-
const SimpleCheckbox = () => {
|
|
450
|
-
return <Checkbox />;
|
|
451
|
-
}
|
|
452
|
-
`,
|
|
453
|
-
'should remove an old import, all 3 props and leave a comment',
|
|
454
|
-
);
|
|
455
|
-
defineInlineTest(
|
|
456
|
-
{ default: transformer, parser: 'tsx' },
|
|
457
|
-
{},
|
|
458
|
-
`
|
|
459
|
-
import React from 'react';
|
|
460
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
461
|
-
import customeTheme from './theme';
|
|
462
|
-
|
|
463
|
-
const SimpleCheckbox = () => {
|
|
464
|
-
return (
|
|
465
|
-
<div>
|
|
466
|
-
<Checkbox
|
|
467
|
-
theme={customTheme}
|
|
468
|
-
/>
|
|
469
|
-
<Checkbox
|
|
470
|
-
theme={customTheme}
|
|
471
|
-
/>
|
|
472
|
-
</div>
|
|
473
|
-
);
|
|
474
|
-
}
|
|
475
|
-
`,
|
|
476
|
-
`
|
|
477
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`theme\` prop which
|
|
478
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
479
|
-
theme with an equivalent API due to minimal usage of the \`theme\` prop. However if you
|
|
480
|
-
were using theme to customise the size of the checkbox there is now a \`size\` prop.
|
|
481
|
-
The appearance of Checkbox will have likely changed. */
|
|
482
|
-
import React from 'react';
|
|
483
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
484
|
-
import customeTheme from './theme';
|
|
485
|
-
|
|
486
|
-
const SimpleCheckbox = () => {
|
|
487
|
-
return (
|
|
488
|
-
<div>
|
|
489
|
-
<Checkbox />
|
|
490
|
-
<Checkbox />
|
|
491
|
-
</div>
|
|
492
|
-
);
|
|
493
|
-
}
|
|
494
|
-
`,
|
|
495
|
-
'should remove 2 usages of theme and add 1 comment',
|
|
496
|
-
);
|
|
497
|
-
defineInlineTest(
|
|
498
|
-
{ default: transformer, parser: 'tsx' },
|
|
499
|
-
{},
|
|
500
|
-
`
|
|
501
|
-
import React from 'react';
|
|
502
|
-
import { Checkbox as Foo } from '@atlaskit/checkbox';
|
|
503
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
504
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
505
|
-
import customeTheme from './theme';
|
|
506
|
-
|
|
507
|
-
const SimpleCheckbox = () => {
|
|
508
|
-
return (
|
|
509
|
-
<Foo
|
|
510
|
-
overrides={{
|
|
511
|
-
Icon: {
|
|
512
|
-
// Adding a custom Icon component
|
|
513
|
-
component: Icon,
|
|
514
|
-
},
|
|
515
|
-
IconIndeterminate: {
|
|
516
|
-
// Adding a custom Icon component for the indeterminate state
|
|
517
|
-
component: IconIndeterminate,
|
|
518
|
-
},
|
|
519
|
-
}}
|
|
520
|
-
theme={customeTheme}
|
|
521
|
-
isFullWidth={true}
|
|
522
|
-
/>
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
`,
|
|
526
|
-
`
|
|
527
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`overrides\` prop
|
|
528
|
-
which has now been removed due to its poor performance characteristics. We have not
|
|
529
|
-
replaced overrides with an equivalent API and the overrides pattern exposes internal
|
|
530
|
-
implementation detail as public API and makes it harder for you to upgrade. The appearance
|
|
531
|
-
of Checkbox will have likely changed. */
|
|
532
|
-
/* TODO: (from codemod) This file uses the @atlaskit/checkbox \`theme\` prop which
|
|
533
|
-
has now been removed due to its poor performance characteristics. We have not replaced
|
|
534
|
-
theme with an equivalent API due to minimal usage of the \`theme\` prop. However if you
|
|
535
|
-
were using theme to customise the size of the checkbox there is now a \`size\` prop.
|
|
536
|
-
The appearance of Checkbox will have likely changed. */
|
|
537
|
-
import React from 'react';
|
|
538
|
-
import { Checkbox as Foo } from '@atlaskit/checkbox';
|
|
539
|
-
import IconIndeterminate from '@atlaskit/icon/glyph/add-circle';
|
|
540
|
-
import Icon from '@atlaskit/icon/glyph/check-circle';
|
|
541
|
-
import customeTheme from './theme';
|
|
542
|
-
|
|
543
|
-
const SimpleCheckbox = () => {
|
|
544
|
-
return <Foo />;
|
|
545
|
-
}
|
|
546
|
-
`,
|
|
547
|
-
'should remove props when using an aliased name',
|
|
548
|
-
);
|
|
549
|
-
});
|