@atlaskit/radio 8.3.0 → 8.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,19 @@
1
1
  # @atlaskit/radio
2
2
 
3
+ ## 8.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`255837cfba315`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/255837cfba315) -
14
+ Internal changes to how border radius is applied.
15
+ - Updated dependencies
16
+
3
17
  ## 8.3.0
4
18
 
5
19
  ### Minor Changes
@@ -0,0 +1,94 @@
1
+ jest.autoMockOff();
2
+
3
+ import transformer from '../not-yet-migrate-aria-labelledby';
4
+
5
+ const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
6
+
7
+ describe('Rename `aria-labelledby` prop to `labelId`', () => {
8
+ defineInlineTest(
9
+ { default: transformer, parser: 'tsx' },
10
+ {},
11
+ `
12
+ import React from 'react';
13
+ import { Radio } from 'foo';
14
+
15
+ const SimpleRadio = () => {
16
+ return <Radio aria-labelledby="large" />;
17
+ }
18
+ `,
19
+ `
20
+ import React from 'react';
21
+ import { Radio } from 'foo';
22
+
23
+ const SimpleRadio = () => {
24
+ return <Radio aria-labelledby="large" />;
25
+ }
26
+ `,
27
+ 'should do nothing with wrong package',
28
+ );
29
+ defineInlineTest(
30
+ { default: transformer, parser: 'tsx' },
31
+ {},
32
+ `
33
+ import React from 'react';
34
+ import { Foo } from '@atlaskit/radio';
35
+
36
+ const SimpleRadio = () => {
37
+ return <Foo aria-labelledby="large" />;
38
+ }
39
+ `,
40
+ `
41
+ import React from 'react';
42
+ import { Foo } from '@atlaskit/radio';
43
+
44
+ const SimpleRadio = () => {
45
+ return <Foo aria-labelledby="large" />;
46
+ }
47
+ `,
48
+ 'should do nothing with wrong import',
49
+ );
50
+ ['Radio', 'RadioGroup'].forEach((Component) => {
51
+ defineInlineTest(
52
+ { default: transformer, parser: 'tsx' },
53
+ {},
54
+ `
55
+ import React from 'react';
56
+ import { ${Component} } from '@atlaskit/radio';
57
+
58
+ const SimpleRadio = () => {
59
+ return <${Component} aria-labelledby="large" />;
60
+ }
61
+ `,
62
+ `
63
+ import React from 'react';
64
+ import { ${Component} } from '@atlaskit/radio';
65
+
66
+ const SimpleRadio = () => {
67
+ return <${Component} labelId="large" />;
68
+ }
69
+ `,
70
+ 'should rename prop',
71
+ );
72
+ defineInlineTest(
73
+ { default: transformer, parser: 'tsx' },
74
+ {},
75
+ `
76
+ import React from 'react';
77
+ import { ${Component} } from '@atlaskit/radio';
78
+
79
+ const SimpleRadio = () => {
80
+ return <${Component} baz="qux" aria-labelledby="large" foo="bar" />;
81
+ }
82
+ `,
83
+ `
84
+ import React from 'react';
85
+ import { ${Component} } from '@atlaskit/radio';
86
+
87
+ const SimpleRadio = () => {
88
+ return <${Component} baz="qux" labelId="large" foo="bar" />;
89
+ }
90
+ `,
91
+ 'should not mess up the other props',
92
+ );
93
+ });
94
+ });
@@ -0,0 +1,15 @@
1
+ import { createRenameFuncFor } from '../utils';
2
+
3
+ export const migrateRadioAriaLabelledby = createRenameFuncFor(
4
+ '@atlaskit/radio',
5
+ 'Radio',
6
+ 'aria-labelledby',
7
+ 'labelId',
8
+ );
9
+
10
+ export const migrateRadioGroupAriaLabelledby = createRenameFuncFor(
11
+ '@atlaskit/radio',
12
+ 'RadioGroup',
13
+ 'aria-labelledby',
14
+ 'labelId',
15
+ );
@@ -0,0 +1,12 @@
1
+ import {
2
+ migrateRadioAriaLabelledby,
3
+ migrateRadioGroupAriaLabelledby,
4
+ } from './migrations/migrate-aria-labelledby';
5
+ import { createTransformer } from './utils';
6
+
7
+ const transformer = createTransformer('@atlaskit/radio', [
8
+ migrateRadioAriaLabelledby,
9
+ migrateRadioGroupAriaLabelledby,
10
+ ]);
11
+
12
+ export default transformer;
@@ -0,0 +1,440 @@
1
+ import type {
2
+ API,
3
+ ASTPath,
4
+ default as core,
5
+ FileInfo,
6
+ ImportDeclaration,
7
+ ImportDefaultSpecifier,
8
+ ImportSpecifier,
9
+ JSXAttribute,
10
+ Options,
11
+ Program,
12
+ VariableDeclaration,
13
+ } from 'jscodeshift';
14
+ import { type Collection } from 'jscodeshift/src/Collection';
15
+
16
+ export type Nullable<T> = T | null;
17
+
18
+ export function getNamedSpecifier(
19
+ j: core.JSCodeshift,
20
+ source: any,
21
+ specifier: string,
22
+ importName: string,
23
+ ) {
24
+ const specifiers = source
25
+ .find(j.ImportDeclaration)
26
+ .filter((path: ASTPath<ImportDeclaration>) => path.node.source.value === specifier)
27
+ .find(j.ImportSpecifier)
28
+ .filter((path: ASTPath<ImportSpecifier>) => path.node.imported.name === importName);
29
+
30
+ if (!specifiers.length) {
31
+ return null;
32
+ }
33
+ return specifiers.nodes()[0]!.local!.name;
34
+ }
35
+
36
+ function getDefaultSpecifier(j: core.JSCodeshift, source: ReturnType<typeof j>, specifier: string) {
37
+ const specifiers = source
38
+ .find(j.ImportDeclaration)
39
+ .filter((path: ASTPath<ImportDeclaration>) => path.node.source.value === specifier)
40
+ .find(j.ImportDefaultSpecifier);
41
+
42
+ if (!specifiers.length) {
43
+ return null;
44
+ }
45
+ return specifiers.nodes()[0]!.local!.name;
46
+ }
47
+
48
+ export function getJSXAttributesByName(
49
+ j: core.JSCodeshift,
50
+ element: ASTPath<any>,
51
+ attributeName: string,
52
+ ): Collection<JSXAttribute> {
53
+ return j(element)
54
+ .find(j.JSXOpeningElement)
55
+ .find(j.JSXAttribute)
56
+ .filter((attribute) => {
57
+ const matches = j(attribute)
58
+ .find(j.JSXIdentifier)
59
+ .filter((identifier) => identifier.value.name === attributeName);
60
+ return Boolean(matches.length);
61
+ });
62
+ }
63
+
64
+ export function hasImportDeclaration(j: core.JSCodeshift, source: any, importPath: string) {
65
+ const imports = source
66
+ .find(j.ImportDeclaration)
67
+ .filter(
68
+ (path: ASTPath<ImportDeclaration>) =>
69
+ typeof path.node.source.value === 'string' && path.node.source.value.startsWith(importPath),
70
+ );
71
+
72
+ return Boolean(imports.length);
73
+ }
74
+
75
+ export function findIdentifierAndReplaceAttribute(
76
+ j: core.JSCodeshift,
77
+ source: ReturnType<typeof j>,
78
+ identifierName: string,
79
+ searchAttr: string,
80
+ replaceWithAttr: string,
81
+ ) {
82
+ source
83
+ .find(j.JSXElement)
84
+ .find(j.JSXOpeningElement)
85
+ .filter((path) => {
86
+ return !!j(path.node)
87
+ .find(j.JSXIdentifier)
88
+ .filter((identifier) => identifier.value.name === identifierName);
89
+ })
90
+ .forEach((element) => {
91
+ j(element)
92
+ .find(j.JSXAttribute)
93
+ .find(j.JSXIdentifier)
94
+ .filter((attr) => attr.node.name === searchAttr)
95
+ .forEach((attribute) => {
96
+ j(attribute).replaceWith(j.jsxIdentifier(replaceWithAttr));
97
+ });
98
+ });
99
+ }
100
+
101
+ export function hasVariableAssignment(
102
+ j: core.JSCodeshift,
103
+ source: ReturnType<typeof j>,
104
+ identifierName: string,
105
+ ): Collection<VariableDeclaration> | boolean {
106
+ const occurance = source.find(j.VariableDeclaration).filter((path) => {
107
+ return !!j(path.node)
108
+ .find(j.VariableDeclarator)
109
+ .find(j.Identifier)
110
+ .filter((identifier) => {
111
+ return identifier.node.name === identifierName;
112
+ }).length;
113
+ });
114
+ return !!occurance.length ? occurance : false;
115
+ }
116
+
117
+ // not replacing newlines (which \s does)
118
+ const spacesAndTabs: RegExp = /[ \t]{2,}/g;
119
+ const lineStartWithSpaces: RegExp = /^[ \t]*/gm;
120
+
121
+ function clean(value: string): string {
122
+ return (
123
+ value
124
+ .replace(spacesAndTabs, ' ')
125
+ .replace(lineStartWithSpaces, '')
126
+ // using .trim() to clear the any newlines before the first text and after last text
127
+ .trim()
128
+ );
129
+ }
130
+
131
+ export function addCommentToStartOfFile({
132
+ j,
133
+ base,
134
+ message,
135
+ }: {
136
+ j: core.JSCodeshift;
137
+ base: Collection<Node>;
138
+ message: string;
139
+ }) {
140
+ addCommentBefore({
141
+ j,
142
+ target: base.find(j.Program),
143
+ message,
144
+ });
145
+ }
146
+
147
+ export function addCommentBefore({
148
+ j,
149
+ target,
150
+ message,
151
+ }: {
152
+ j: core.JSCodeshift;
153
+ target: Collection<Program> | Collection<ImportDeclaration>;
154
+ message: string;
155
+ }) {
156
+ const content: string = ` TODO: (from codemod) ${clean(message)} `;
157
+ target.forEach((path: ASTPath<Program | ImportDeclaration>) => {
158
+ path.value.comments = path.value.comments || [];
159
+
160
+ const exists = path.value.comments.find((comment) => comment.value === content);
161
+
162
+ // avoiding duplicates of the same comment
163
+ if (exists) {
164
+ return;
165
+ }
166
+
167
+ path.value.comments.push(j.commentBlock(content));
168
+ });
169
+ }
170
+
171
+ export function tryCreateImport({
172
+ j,
173
+ base,
174
+ relativeToPackage,
175
+ packageName,
176
+ }: {
177
+ j: core.JSCodeshift;
178
+ base: Collection<any>;
179
+ relativeToPackage: string;
180
+ packageName: string;
181
+ }) {
182
+ const exists: boolean =
183
+ base.find(j.ImportDeclaration).filter((path) => path.value.source.value === packageName)
184
+ .length > 0;
185
+
186
+ if (exists) {
187
+ return;
188
+ }
189
+
190
+ base
191
+ .find(j.ImportDeclaration)
192
+ .filter((path) => path.value.source.value === relativeToPackage)
193
+ .insertBefore(j.importDeclaration([], j.literal(packageName)));
194
+ }
195
+
196
+ export function addToImport({
197
+ j,
198
+ base,
199
+ importSpecifier,
200
+ packageName,
201
+ }: {
202
+ j: core.JSCodeshift;
203
+ base: Collection<any>;
204
+ importSpecifier: ImportSpecifier | ImportDefaultSpecifier;
205
+ packageName: string;
206
+ }) {
207
+ base
208
+ .find(j.ImportDeclaration)
209
+ .filter((path) => path.value.source.value === packageName)
210
+ .replaceWith((declaration) => {
211
+ return j.importDeclaration(
212
+ [
213
+ // we are appending to the existing specifiers
214
+ // We are doing a filter hear because sometimes specifiers can be removed
215
+ // but they hand around in the declaration
216
+ ...(declaration.value.specifiers || []).filter(
217
+ (item) => item.type === 'ImportSpecifier' && item.imported != null,
218
+ ),
219
+ importSpecifier,
220
+ ],
221
+ j.literal(packageName),
222
+ );
223
+ });
224
+ }
225
+
226
+ export const createRenameFuncFor =
227
+ (component: string, importName: string, from: string, to: string) =>
228
+ (j: core.JSCodeshift, source: Collection<Node>) => {
229
+ const specifier = getNamedSpecifier(j, source, component, importName);
230
+
231
+ if (!specifier) {
232
+ return;
233
+ }
234
+
235
+ source.findJSXElements(specifier).forEach((element) => {
236
+ getJSXAttributesByName(j, element, from).forEach((attribute) => {
237
+ j(attribute).replaceWith(j.jsxAttribute(j.jsxIdentifier(to), attribute.node.value));
238
+ });
239
+ });
240
+
241
+ let variable = hasVariableAssignment(j, source, specifier);
242
+ if (variable) {
243
+ (variable as Collection<VariableDeclaration>)
244
+ .find(j.VariableDeclarator)
245
+ .forEach((declarator) => {
246
+ j(declarator)
247
+ .find(j.Identifier)
248
+ .filter((identifier) => identifier.name === 'id')
249
+ .forEach((ids) => {
250
+ findIdentifierAndReplaceAttribute(j, source, ids.node.name, from, to);
251
+ });
252
+ });
253
+ }
254
+ };
255
+
256
+ export const createRemoveFuncFor =
257
+ (component: string, importName: string, prop: string, comment?: string) =>
258
+ (j: core.JSCodeshift, source: Collection<Node>) => {
259
+ const specifier =
260
+ getNamedSpecifier(j, source, component, importName) ||
261
+ getDefaultSpecifier(j, source, component);
262
+
263
+ if (!specifier) {
264
+ return;
265
+ }
266
+
267
+ source.findJSXElements(specifier).forEach((element) => {
268
+ getJSXAttributesByName(j, element, prop).forEach((attribute) => {
269
+ j(attribute).remove();
270
+ if (comment) {
271
+ addCommentToStartOfFile({ j, base: source, message: comment });
272
+ }
273
+ });
274
+ });
275
+ };
276
+
277
+ export const createRenameImportFor =
278
+ ({
279
+ componentName,
280
+ newComponentName,
281
+ oldPackagePath,
282
+ newPackagePath,
283
+ }: {
284
+ componentName: string;
285
+ newComponentName?: string;
286
+ oldPackagePath: string;
287
+ newPackagePath: string;
288
+ }) =>
289
+ (j: core.JSCodeshift, source: Collection<Node>) => {
290
+ const isUsingName: boolean =
291
+ source
292
+ .find(j.ImportDeclaration)
293
+ .filter((path) => path.node.source.value === oldPackagePath)
294
+ .find(j.ImportSpecifier)
295
+ .nodes()
296
+ .filter((specifier) => specifier.imported && specifier.imported.name === componentName)
297
+ .length > 0;
298
+ if (!isUsingName) {
299
+ return;
300
+ }
301
+
302
+ const existingAlias: Nullable<string> =
303
+ source
304
+ .find(j.ImportDeclaration)
305
+ .filter((path) => path.node.source.value === oldPackagePath)
306
+ .find(j.ImportSpecifier)
307
+ .nodes()
308
+ .map((specifier): Nullable<string> => {
309
+ if (specifier.imported && specifier.imported.name !== componentName) {
310
+ return null;
311
+ }
312
+ // If aliased: return the alias
313
+ if (specifier.local && specifier.local.name !== componentName) {
314
+ return specifier.local.name;
315
+ }
316
+
317
+ return null;
318
+ })
319
+ .filter(Boolean)[0] || null;
320
+
321
+ // Check to see if need to create new package path
322
+ // Try create an import declaration just before the old import
323
+ tryCreateImport({
324
+ j,
325
+ base: source,
326
+ relativeToPackage: oldPackagePath,
327
+ packageName: newPackagePath,
328
+ });
329
+
330
+ const newSpecifier: ImportSpecifier | ImportDefaultSpecifier = (() => {
331
+ // If there's a new name use that
332
+ if (newComponentName) {
333
+ return j.importSpecifier(j.identifier(newComponentName), j.identifier(newComponentName));
334
+ }
335
+
336
+ if (existingAlias) {
337
+ return j.importSpecifier(j.identifier(componentName), j.identifier(existingAlias));
338
+ }
339
+
340
+ // Add specifier
341
+ return j.importSpecifier(j.identifier(componentName), j.identifier(componentName));
342
+ })();
343
+
344
+ addToImport({
345
+ j,
346
+ base: source,
347
+ importSpecifier: newSpecifier,
348
+ packageName: newPackagePath,
349
+ });
350
+
351
+ // Remove old path
352
+ source
353
+ .find(j.ImportDeclaration)
354
+ .filter((path) => path.node.source.value === oldPackagePath)
355
+ .remove();
356
+ };
357
+
358
+ export const createRemoveImportsFor =
359
+ ({
360
+ importsToRemove,
361
+ packagePath,
362
+ comment,
363
+ }: {
364
+ importsToRemove: string[];
365
+ packagePath: string;
366
+ comment: string;
367
+ }) =>
368
+ (j: core.JSCodeshift, source: Collection<Node>) => {
369
+ const isUsingName: boolean =
370
+ source.find(j.ImportDeclaration).filter((path) => path.node.source.value === packagePath)
371
+ .length > 0;
372
+ if (!isUsingName) {
373
+ return;
374
+ }
375
+
376
+ const existingAlias: Nullable<string> =
377
+ source
378
+ .find(j.ImportDeclaration)
379
+ .filter((path) => path.node.source.value === packagePath)
380
+ .find(j.ImportSpecifier)
381
+ .nodes()
382
+ .map((specifier): Nullable<string> => {
383
+ if (!importsToRemove.includes(specifier.imported.name)) {
384
+ return null;
385
+ }
386
+ // If aliased: return the alias
387
+ if (specifier.local && !importsToRemove.includes(specifier.local.name)) {
388
+ return specifier.local.name;
389
+ }
390
+
391
+ return null;
392
+ })
393
+ .filter(Boolean)[0] || null;
394
+
395
+ // Remove imports
396
+ source
397
+ .find(j.ImportDeclaration)
398
+ .filter((path) => path.node.source.value === packagePath)
399
+ .find(j.ImportSpecifier)
400
+ .find(j.Identifier)
401
+ .filter((identifier) => {
402
+ if (
403
+ importsToRemove.includes(identifier.value.name) ||
404
+ identifier.value.name === existingAlias
405
+ ) {
406
+ addCommentToStartOfFile({ j, base: source, message: comment });
407
+ return true;
408
+ }
409
+ return false;
410
+ })
411
+ .remove();
412
+
413
+ // Remove entire import if it is empty
414
+ const isEmptyImport =
415
+ source
416
+ .find(j.ImportDeclaration)
417
+ .filter((path) => path.node.source.value === packagePath)
418
+ .find(j.ImportSpecifier)
419
+ .find(j.Identifier).length === 0;
420
+ if (isEmptyImport) {
421
+ source
422
+ .find(j.ImportDeclaration)
423
+ .filter((path) => path.node.source.value === packagePath)
424
+ .remove();
425
+ }
426
+ };
427
+
428
+ export const createTransformer =
429
+ (component: string, migrates: { (j: core.JSCodeshift, source: Collection<Node>): void }[]) =>
430
+ (fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
431
+ const source: Collection<Node> = j(fileInfo.source);
432
+
433
+ if (!hasImportDeclaration(j, source, component)) {
434
+ return fileInfo.source;
435
+ }
436
+
437
+ migrates.forEach((tf) => tf(j, source));
438
+
439
+ return source.toSource(options.printOptions || { quote: 'single' });
440
+ };
@@ -1,10 +1,10 @@
1
1
 
2
2
  ._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
- ._14mj1q5u:after{border-radius:var(--ds-border-radius-circle,50%)}
3
+ ._14mj1qll:after{border-radius:var(--ds-radius-full,50%)}
4
4
  ._16r2ucr4:after{background:var(--radio-dot-color)}
5
5
  ._18s8ze3t{margin:var(--ds-space-0,0)}
6
6
  ._19itbyy8{border:var(--_1q9y51y)}
7
- ._2rko1q5u{border-radius:var(--ds-border-radius-circle,50%)}
7
+ ._2rko1qll{border-radius:var(--ds-radius-full,50%)}
8
8
  ._qc5orqeg:after{transition:background-color .2s ease-in-out,opacity .2s ease-in-out}
9
9
  ._v56415j1{transition:border-color .2s ease-in-out,background-color .2s ease-in-out}._1151ddza{--radio-border-color:var(--_vnm8xo)}
10
10
  ._11jy1j4g:checked{--radio-border-color:var(--_1gcp7nr)}
package/dist/cjs/radio.js CHANGED
@@ -20,7 +20,7 @@ var _colors = require("@atlaskit/theme/colors");
20
20
  var _excluded = ["ariaLabel", "aria-labelledby", "isDisabled", "isRequired", "isInvalid", "isChecked", "label", "labelId", "name", "onChange", "value", "testId", "analyticsContext"];
21
21
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
22
22
  var packageName = "@atlaskit/radio";
23
- var packageVersion = "0.0.0-development";
23
+ var packageVersion = "8.3.1";
24
24
  var noop = _noop.default;
25
25
  var labelPaddingStyles = null;
26
26
  var labelStyles = null;
@@ -81,7 +81,7 @@ var InnerRadio = /*#__PURE__*/(0, _react.forwardRef)(function Radio(props, ref)
81
81
  ,
82
82
  "data-invalid": isInvalid ? 'true' : undefined,
83
83
  ref: ref,
84
- className: (0, _runtime.ax)(["_18s8ze3t _19itbyy8 _2rko1q5u _12ji1r31 _1qu2glyw _12y31o36 _v56415j1 _1e0c1txw _1bsb1tcg _4t3i1tcg _kqswh2mm _4cvr1h6o _1bah1h6o _1o9zidpf _bfhk4t47 _13diglyw _1q6q1kd8 _1151ddza _1s6weh7q _tqbwidpf _t9ec1s1q _s7n4jp4b _wstuglyw _16r2ucr4 _14mj1q5u _qc5orqeg _z0ai1cbz _1qdg1cbz _18postnw _aetrb3bt _1peq1xmd _iosi1j4g _11jy1j4g _f3ett94y _19ybua6f _1d7pua6f _j5dh13gf _scgf13gf _4fps13gf _5ry313gf _qep213gf _180n13gf _1gcs13gf _1x1a13gf _6hp813gf _4rya1ouc _o1bd1ouc _2kbk1ouc _6cyr1ouc _n8t01ouc _1o5r1ouc _nxi61ouc _neoe1ouc _1el21ouc _lekr1pl2 _11v71pl2 _1if11pl2 _bl0e1pl2 _92na1pl2 _awur1pl2 _1f8c1pl2 _s2ft1pl2 _17a11pl2 _x48asnw8 _1ib2snw8 _wml0snw8 _tusmsnw8 _1c6fsnw8 _qfttsnw8 _1yk9snw8 _gdmbsnw8 _pmm4snw8 _y2mv1ri4 _1bg4jfq9 _6tjk1ri4 _awqnjfq9 _1rvq12ci _1p9jddza _x2tz1ehr _1iwz1ehr _sj8ye8ep _jckowjs8 _1dvdddza _60akxz7c", (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && "_t9ec1soj _z0ai120g _1qdg120g"]),
84
+ className: (0, _runtime.ax)(["_18s8ze3t _19itbyy8 _2rko1qll _12ji1r31 _1qu2glyw _12y31o36 _v56415j1 _1e0c1txw _1bsb1tcg _4t3i1tcg _kqswh2mm _4cvr1h6o _1bah1h6o _1o9zidpf _bfhk4t47 _13diglyw _1q6q1kd8 _1151ddza _1s6weh7q _tqbwidpf _t9ec1s1q _s7n4jp4b _wstuglyw _16r2ucr4 _14mj1qll _qc5orqeg _z0ai1cbz _1qdg1cbz _18postnw _aetrb3bt _1peq1xmd _iosi1j4g _11jy1j4g _f3ett94y _19ybua6f _1d7pua6f _j5dh13gf _scgf13gf _4fps13gf _5ry313gf _qep213gf _180n13gf _1gcs13gf _1x1a13gf _6hp813gf _4rya1ouc _o1bd1ouc _2kbk1ouc _6cyr1ouc _n8t01ouc _1o5r1ouc _nxi61ouc _neoe1ouc _1el21ouc _lekr1pl2 _11v71pl2 _1if11pl2 _bl0e1pl2 _92na1pl2 _awur1pl2 _1f8c1pl2 _s2ft1pl2 _17a11pl2 _x48asnw8 _1ib2snw8 _wml0snw8 _tusmsnw8 _1c6fsnw8 _qfttsnw8 _1yk9snw8 _gdmbsnw8 _pmm4snw8 _y2mv1ri4 _1bg4jfq9 _6tjk1ri4 _awqnjfq9 _1rvq12ci _1p9jddza _x2tz1ehr _1iwz1ehr _sj8ye8ep _jckowjs8 _1dvdddza _60akxz7c", (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && "_t9ec1soj _z0ai120g _1qdg120g"]),
85
85
  style: {
86
86
  "--_1q9y51y": (0, _runtime.ix)("var(--ds-border-width, 1px)".concat(" solid var(--radio-border-color)")),
87
87
  "--_4mkb4g": (0, _runtime.ix)("var(--ds-background-input, ".concat(_colors.N10, ")")),
@@ -1,10 +1,10 @@
1
1
 
2
2
  ._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
- ._14mj1q5u:after{border-radius:var(--ds-border-radius-circle,50%)}
3
+ ._14mj1qll:after{border-radius:var(--ds-radius-full,50%)}
4
4
  ._16r2ucr4:after{background:var(--radio-dot-color)}
5
5
  ._18s8ze3t{margin:var(--ds-space-0,0)}
6
6
  ._19it3vzd{border:var(--ds-border-width,1px) solid var(--radio-border-color)}
7
- ._2rko1q5u{border-radius:var(--ds-border-radius-circle,50%)}
7
+ ._2rko1qll{border-radius:var(--ds-radius-full,50%)}
8
8
  ._qc5orqeg:after{transition:background-color .2s ease-in-out,opacity .2s ease-in-out}
9
9
  ._v56415j1{transition:border-color .2s ease-in-out,background-color .2s ease-in-out}._11511fmg{--radio-border-color:var(--ds-border-input,#7a869a)}
10
10
  ._11jyzyvw:checked{--radio-border-color:var(--ds-background-selected-bold,#0052cc)}
@@ -9,7 +9,7 @@ import __noop from '@atlaskit/ds-lib/noop';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { B200, B300, B400, B50, N10, N100, N20, N30, N70, N80, N900, R300 } from '@atlaskit/theme/colors';
11
11
  const packageName = "@atlaskit/radio";
12
- const packageVersion = "0.0.0-development";
12
+ const packageVersion = "8.3.1";
13
13
  const noop = __noop;
14
14
  const labelPaddingStyles = null;
15
15
  const labelStyles = null;
@@ -65,7 +65,7 @@ const InnerRadio = /*#__PURE__*/forwardRef(function Radio(props, ref) {
65
65
  ,
66
66
  "data-invalid": isInvalid ? 'true' : undefined,
67
67
  ref: ref,
68
- className: ax(["_18s8ze3t _19it3vzd _2rko1q5u _12ji1r31 _1qu2glyw _12y31o36 _v56415j1 _1e0c1txw _1bsb1tcg _4t3i1tcg _kqswh2mm _4cvr1h6o _1bah1h6o _1o9zidpf _bfhk4t47 _13diglyw _1q6qmag2 _11511fmg _1s6w1qbb _tqbwidpf _t9ec1s1q _s7n4jp4b _wstuglyw _16r2ucr4 _14mj1q5u _qc5orqeg _z0ai1cbz _1qdg1cbz _18postnw _aetrb3bt _1peq1xmd _iosizyvw _11jyzyvw _f3ett94y _19ybk8x7 _1d7pk8x7 _j5dh13gf _scgf13gf _4fps13gf _5ry313gf _qep213gf _180n13gf _1gcs13gf _1x1a13gf _6hp813gf _4rya1y1w _o1bd1y1w _2kbk1y1w _6cyr1y1w _n8t01y1w _1o5r1y1w _nxi61y1w _neoe1y1w _1el21y1w _lekrzcs9 _11v7zcs9 _1if1zcs9 _bl0ezcs9 _92nazcs9 _awurzcs9 _1f8czcs9 _s2ftzcs9 _17a1zcs9 _x48a15t7 _1ib215t7 _wml015t7 _tusm15t7 _1c6f15t7 _qftt15t7 _1yk915t7 _gdmb15t7 _pmm415t7 _y2mvehbj _1bg4jfq9 _6tjkehbj _awqnjfq9 _1rvq10ko _1p9j1fmg _x2tzhh5a _1iwzhh5a _sj8y1wq0 _jckox2ru _1dvd1fmg _60ak1dzn", fg('platform-visual-refresh-icons') && "_t9ec1soj _z0ai120g _1qdg120g"])
68
+ className: ax(["_18s8ze3t _19it3vzd _2rko1qll _12ji1r31 _1qu2glyw _12y31o36 _v56415j1 _1e0c1txw _1bsb1tcg _4t3i1tcg _kqswh2mm _4cvr1h6o _1bah1h6o _1o9zidpf _bfhk4t47 _13diglyw _1q6qmag2 _11511fmg _1s6w1qbb _tqbwidpf _t9ec1s1q _s7n4jp4b _wstuglyw _16r2ucr4 _14mj1qll _qc5orqeg _z0ai1cbz _1qdg1cbz _18postnw _aetrb3bt _1peq1xmd _iosizyvw _11jyzyvw _f3ett94y _19ybk8x7 _1d7pk8x7 _j5dh13gf _scgf13gf _4fps13gf _5ry313gf _qep213gf _180n13gf _1gcs13gf _1x1a13gf _6hp813gf _4rya1y1w _o1bd1y1w _2kbk1y1w _6cyr1y1w _n8t01y1w _1o5r1y1w _nxi61y1w _neoe1y1w _1el21y1w _lekrzcs9 _11v7zcs9 _1if1zcs9 _bl0ezcs9 _92nazcs9 _awurzcs9 _1f8czcs9 _s2ftzcs9 _17a1zcs9 _x48a15t7 _1ib215t7 _wml015t7 _tusm15t7 _1c6f15t7 _qftt15t7 _1yk915t7 _gdmb15t7 _pmm415t7 _y2mvehbj _1bg4jfq9 _6tjkehbj _awqnjfq9 _1rvq10ko _1p9j1fmg _x2tzhh5a _1iwzhh5a _sj8y1wq0 _jckox2ru _1dvd1fmg _60ak1dzn", fg('platform-visual-refresh-icons') && "_t9ec1soj _z0ai120g _1qdg120g"])
69
69
  })), label ? /*#__PURE__*/React.createElement("span", {
70
70
  className: ax(["_85i5v77o _1q51v77o _y4ti1b66 _bozg1b66"])
71
71
  }, label) : null);
@@ -1,10 +1,10 @@
1
1
 
2
2
  ._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
3
- ._14mj1q5u:after{border-radius:var(--ds-border-radius-circle,50%)}
3
+ ._14mj1qll:after{border-radius:var(--ds-radius-full,50%)}
4
4
  ._16r2ucr4:after{background:var(--radio-dot-color)}
5
5
  ._18s8ze3t{margin:var(--ds-space-0,0)}
6
6
  ._19itbyy8{border:var(--_1q9y51y)}
7
- ._2rko1q5u{border-radius:var(--ds-border-radius-circle,50%)}
7
+ ._2rko1qll{border-radius:var(--ds-radius-full,50%)}
8
8
  ._qc5orqeg:after{transition:background-color .2s ease-in-out,opacity .2s ease-in-out}
9
9
  ._v56415j1{transition:border-color .2s ease-in-out,background-color .2s ease-in-out}._1151ddza{--radio-border-color:var(--_vnm8xo)}
10
10
  ._11jy1j4g:checked{--radio-border-color:var(--_1gcp7nr)}
package/dist/esm/radio.js CHANGED
@@ -11,7 +11,7 @@ import __noop from '@atlaskit/ds-lib/noop';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import { B200, B300, B400, B50, N10, N100, N20, N30, N70, N80, N900, R300 } from '@atlaskit/theme/colors';
13
13
  var packageName = "@atlaskit/radio";
14
- var packageVersion = "0.0.0-development";
14
+ var packageVersion = "8.3.1";
15
15
  var noop = __noop;
16
16
  var labelPaddingStyles = null;
17
17
  var labelStyles = null;
@@ -72,7 +72,7 @@ var InnerRadio = /*#__PURE__*/forwardRef(function Radio(props, ref) {
72
72
  ,
73
73
  "data-invalid": isInvalid ? 'true' : undefined,
74
74
  ref: ref,
75
- className: ax(["_18s8ze3t _19itbyy8 _2rko1q5u _12ji1r31 _1qu2glyw _12y31o36 _v56415j1 _1e0c1txw _1bsb1tcg _4t3i1tcg _kqswh2mm _4cvr1h6o _1bah1h6o _1o9zidpf _bfhk4t47 _13diglyw _1q6q1kd8 _1151ddza _1s6weh7q _tqbwidpf _t9ec1s1q _s7n4jp4b _wstuglyw _16r2ucr4 _14mj1q5u _qc5orqeg _z0ai1cbz _1qdg1cbz _18postnw _aetrb3bt _1peq1xmd _iosi1j4g _11jy1j4g _f3ett94y _19ybua6f _1d7pua6f _j5dh13gf _scgf13gf _4fps13gf _5ry313gf _qep213gf _180n13gf _1gcs13gf _1x1a13gf _6hp813gf _4rya1ouc _o1bd1ouc _2kbk1ouc _6cyr1ouc _n8t01ouc _1o5r1ouc _nxi61ouc _neoe1ouc _1el21ouc _lekr1pl2 _11v71pl2 _1if11pl2 _bl0e1pl2 _92na1pl2 _awur1pl2 _1f8c1pl2 _s2ft1pl2 _17a11pl2 _x48asnw8 _1ib2snw8 _wml0snw8 _tusmsnw8 _1c6fsnw8 _qfttsnw8 _1yk9snw8 _gdmbsnw8 _pmm4snw8 _y2mv1ri4 _1bg4jfq9 _6tjk1ri4 _awqnjfq9 _1rvq12ci _1p9jddza _x2tz1ehr _1iwz1ehr _sj8ye8ep _jckowjs8 _1dvdddza _60akxz7c", fg('platform-visual-refresh-icons') && "_t9ec1soj _z0ai120g _1qdg120g"]),
75
+ className: ax(["_18s8ze3t _19itbyy8 _2rko1qll _12ji1r31 _1qu2glyw _12y31o36 _v56415j1 _1e0c1txw _1bsb1tcg _4t3i1tcg _kqswh2mm _4cvr1h6o _1bah1h6o _1o9zidpf _bfhk4t47 _13diglyw _1q6q1kd8 _1151ddza _1s6weh7q _tqbwidpf _t9ec1s1q _s7n4jp4b _wstuglyw _16r2ucr4 _14mj1qll _qc5orqeg _z0ai1cbz _1qdg1cbz _18postnw _aetrb3bt _1peq1xmd _iosi1j4g _11jy1j4g _f3ett94y _19ybua6f _1d7pua6f _j5dh13gf _scgf13gf _4fps13gf _5ry313gf _qep213gf _180n13gf _1gcs13gf _1x1a13gf _6hp813gf _4rya1ouc _o1bd1ouc _2kbk1ouc _6cyr1ouc _n8t01ouc _1o5r1ouc _nxi61ouc _neoe1ouc _1el21ouc _lekr1pl2 _11v71pl2 _1if11pl2 _bl0e1pl2 _92na1pl2 _awur1pl2 _1f8c1pl2 _s2ft1pl2 _17a11pl2 _x48asnw8 _1ib2snw8 _wml0snw8 _tusmsnw8 _1c6fsnw8 _qfttsnw8 _1yk9snw8 _gdmbsnw8 _pmm4snw8 _y2mv1ri4 _1bg4jfq9 _6tjk1ri4 _awqnjfq9 _1rvq12ci _1p9jddza _x2tz1ehr _1iwz1ehr _sj8ye8ep _jckowjs8 _1dvdddza _60akxz7c", fg('platform-visual-refresh-icons') && "_t9ec1soj _z0ai120g _1qdg120g"]),
76
76
  style: {
77
77
  "--_1q9y51y": ix("var(--ds-border-width, 1px)".concat(" solid var(--radio-border-color)")),
78
78
  "--_4mkb4g": ix("var(--ds-background-input, ".concat(N10, ")")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/radio",
3
- "version": "8.3.0",
3
+ "version": "8.3.2",
4
4
  "description": "A radio input allows users to select only one option from a number of choices. Radio is generally displayed in a radio group.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,19 +31,13 @@
31
31
  "category": "Forms and input"
32
32
  }
33
33
  },
34
- "af:exports": {
35
- "./Radio": "./src/radio.tsx",
36
- "./RadioGroup": "./src/radio-group.tsx",
37
- "./types": "./src/types.tsx",
38
- ".": "./src/index.tsx"
39
- },
40
34
  "dependencies": {
41
35
  "@atlaskit/analytics-next": "^11.1.0",
42
- "@atlaskit/css": "^0.12.0",
36
+ "@atlaskit/css": "^0.13.0",
43
37
  "@atlaskit/ds-lib": "^5.0.0",
44
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
39
  "@atlaskit/theme": "^20.0.0",
46
- "@atlaskit/tokens": "^6.1.0",
40
+ "@atlaskit/tokens": "^6.2.0",
47
41
  "@babel/runtime": "^7.0.0",
48
42
  "@compiled/react": "^0.18.3"
49
43
  },
@@ -57,14 +51,15 @@
57
51
  "@atlaskit/button": "^23.4.0",
58
52
  "@atlaskit/checkbox": "^17.1.0",
59
53
  "@atlaskit/docs": "^11.0.0",
60
- "@atlaskit/form": "^12.2.0",
54
+ "@atlaskit/form": "^12.4.0",
61
55
  "@atlaskit/link": "^3.2.0",
62
- "@atlaskit/primitives": "^14.12.0",
63
- "@atlaskit/section-message": "^8.6.0",
56
+ "@atlaskit/primitives": "^14.13.0",
57
+ "@atlaskit/section-message": "^8.7.0",
64
58
  "@atlaskit/ssr": "workspace:^",
65
59
  "@atlassian/ssr-tests": "^0.3.0",
66
60
  "@testing-library/react": "^13.4.0",
67
61
  "@testing-library/user-event": "^14.4.3",
62
+ "jscodeshift": "^17.0.0",
68
63
  "react-dom": "^18.2.0"
69
64
  },
70
65
  "keywords": [