@atlaskit/radio 8.3.2 → 8.3.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.
- package/CHANGELOG.md +6 -0
- package/codemods/__tests__/not-yet-migrate-aria-labelledby.tsx +480 -0
- package/codemods/utils.tsx +15 -13
- package/dist/cjs/radio.js +1 -1
- package/dist/es2019/radio.js +1 -1
- package/dist/esm/radio.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,27 @@ describe('Rename `aria-labelledby` prop to `labelId`', () => {
|
|
|
10
10
|
{},
|
|
11
11
|
`
|
|
12
12
|
import React from 'react';
|
|
13
|
+
import { Foo } from 'foo';
|
|
14
|
+
|
|
15
|
+
const SimpleRadio = () => {
|
|
16
|
+
return <Foo aria-labelledby="large" />;
|
|
17
|
+
}
|
|
18
|
+
`,
|
|
19
|
+
`
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import { Foo } from 'foo';
|
|
22
|
+
|
|
23
|
+
const SimpleRadio = () => {
|
|
24
|
+
return <Foo aria-labelledby="large" />;
|
|
25
|
+
}
|
|
26
|
+
`,
|
|
27
|
+
'should do nothing with wrong import and wrong package',
|
|
28
|
+
);
|
|
29
|
+
defineInlineTest(
|
|
30
|
+
{ default: transformer, parser: 'tsx' },
|
|
31
|
+
{},
|
|
32
|
+
`
|
|
33
|
+
import React from 'react';
|
|
13
34
|
import { Radio } from 'foo';
|
|
14
35
|
|
|
15
36
|
const SimpleRadio = () => {
|
|
@@ -91,4 +112,463 @@ describe('Rename `aria-labelledby` prop to `labelId`', () => {
|
|
|
91
112
|
'should not mess up the other props',
|
|
92
113
|
);
|
|
93
114
|
});
|
|
115
|
+
defineInlineTest(
|
|
116
|
+
{ default: transformer, parser: 'tsx' },
|
|
117
|
+
{},
|
|
118
|
+
`
|
|
119
|
+
/** @jsx jsx */
|
|
120
|
+
import React from 'react';
|
|
121
|
+
import { Radio } from '@atlaskit/radio';
|
|
122
|
+
import { cssMap, jsx } from '@atlaskit/css';
|
|
123
|
+
import { token } from '@atlaskit/tokens';
|
|
124
|
+
import { FormattedMessage } from '@atlassian/jira-intl';
|
|
125
|
+
import { isDefined } from '@atlassian/jira-portfolio-3-portfolio/src/common/ramda/index.tsx';
|
|
126
|
+
import {
|
|
127
|
+
AUTO_SCHEDULE_OVERWRITE,
|
|
128
|
+
ISSUE_VALUES,
|
|
129
|
+
type AutoScheduleOverwriteOptions,
|
|
130
|
+
type IssueValues,
|
|
131
|
+
} from '@atlassian/jira-portfolio-3-portfolio/src/common/view/constant.tsx';
|
|
132
|
+
import commonMessages from '@atlassian/jira-portfolio-3-portfolio/src/common/view/messages.tsx';
|
|
133
|
+
import messages from './messages.tsx';
|
|
134
|
+
import type { Props } from './types.tsx';
|
|
135
|
+
|
|
136
|
+
const DETAILED_OVERWRITE_OPTIONS = [
|
|
137
|
+
{
|
|
138
|
+
value: AUTO_SCHEDULE_OVERWRITE.ALL_VALUES,
|
|
139
|
+
label: <FormattedMessage {...messages.overwriteAllValuesDesc} />,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
value: AUTO_SCHEDULE_OVERWRITE.EMPTY_VALUES_ONLY,
|
|
143
|
+
label: <FormattedMessage {...messages.overwriteEmptyValuesOnlyDesc} />,
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
const OVERWRITE_OPTIONS = [
|
|
148
|
+
{
|
|
149
|
+
value: AUTO_SCHEDULE_OVERWRITE.ALL_VALUES,
|
|
150
|
+
label: <FormattedMessage {...messages.overwriteAllValues} />,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
value: AUTO_SCHEDULE_OVERWRITE.EMPTY_VALUES_ONLY,
|
|
154
|
+
label: <FormattedMessage {...messages.overwriteEmptyValuesOnly} />,
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
|
|
158
|
+
const OVERWRITE_ISSUE_VALUES = [
|
|
159
|
+
{
|
|
160
|
+
value: ISSUE_VALUES.SPRINT,
|
|
161
|
+
label: <FormattedMessage {...commonMessages.sprints} />,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
value: ISSUE_VALUES.RELEASE,
|
|
165
|
+
label: <FormattedMessage {...commonMessages.releases} />,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
value: ISSUE_VALUES.TEAM,
|
|
169
|
+
label: <FormattedMessage {...commonMessages.teams} />,
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
const API_KEYS_FOR_OVERWRITE_ISSUE_VALUES = {
|
|
174
|
+
[ISSUE_VALUES.SPRINT]: 'ignoreSprints',
|
|
175
|
+
[ISSUE_VALUES.RELEASE]: 'ignoreReleases',
|
|
176
|
+
[ISSUE_VALUES.TEAM]: 'ignoreTeams',
|
|
177
|
+
} as const;
|
|
178
|
+
|
|
179
|
+
const ConfigurationTable = ({
|
|
180
|
+
autoScheduleConfiguration,
|
|
181
|
+
isReadOnly,
|
|
182
|
+
updateAutoScheduleConfiguration,
|
|
183
|
+
withDetailedHeader,
|
|
184
|
+
isReleasesEnabled,
|
|
185
|
+
}: Props) => {
|
|
186
|
+
const getOverwriteHeader = () => {
|
|
187
|
+
return withDetailedHeader ? DETAILED_OVERWRITE_OPTIONS : OVERWRITE_OPTIONS;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const isOptionSelected = (
|
|
191
|
+
issueValue: IssueValues,
|
|
192
|
+
overwriteOption: AutoScheduleOverwriteOptions,
|
|
193
|
+
) => {
|
|
194
|
+
const apiKey = API_KEYS_FOR_OVERWRITE_ISSUE_VALUES[issueValue];
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
isDefined(autoScheduleConfiguration) &&
|
|
198
|
+
((autoScheduleConfiguration[apiKey] &&
|
|
199
|
+
overwriteOption === AUTO_SCHEDULE_OVERWRITE.ALL_VALUES) ||
|
|
200
|
+
(!autoScheduleConfiguration[apiKey] &&
|
|
201
|
+
overwriteOption === AUTO_SCHEDULE_OVERWRITE.EMPTY_VALUES_ONLY))
|
|
202
|
+
);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const onConfigurationChange = (
|
|
206
|
+
issueValue: IssueValues,
|
|
207
|
+
overwriteOption: AutoScheduleOverwriteOptions,
|
|
208
|
+
): void => {
|
|
209
|
+
updateAutoScheduleConfiguration({
|
|
210
|
+
[API_KEYS_FOR_OVERWRITE_ISSUE_VALUES[issueValue]]:
|
|
211
|
+
overwriteOption === AUTO_SCHEDULE_OVERWRITE.ALL_VALUES,
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const filterOutReleasesOptionWhenReleasesIsDisabled = ({
|
|
216
|
+
value,
|
|
217
|
+
}: {
|
|
218
|
+
value: IssueValues;
|
|
219
|
+
label: JSX.Element;
|
|
220
|
+
}) => isReleasesEnabled || value !== ISSUE_VALUES.RELEASE;
|
|
221
|
+
|
|
222
|
+
return (
|
|
223
|
+
<div
|
|
224
|
+
role="grid"
|
|
225
|
+
aria-labelledby="overwrite-issue-values-title"
|
|
226
|
+
aria-describedby="overwrite-issue-values-desc"
|
|
227
|
+
aria-busy="true"
|
|
228
|
+
>
|
|
229
|
+
<div role="rowgroup">
|
|
230
|
+
<div role="row" css={localStyles.header}>
|
|
231
|
+
<div css={[localStyles.optionHeader, localStyles.firstColumn]} />
|
|
232
|
+
<div
|
|
233
|
+
css={[
|
|
234
|
+
localStyles.optionValueHeader,
|
|
235
|
+
!withDetailedHeader && localStyles.optionValueBorder,
|
|
236
|
+
]}
|
|
237
|
+
>
|
|
238
|
+
{OVERWRITE_ISSUE_VALUES.filter(filterOutReleasesOptionWhenReleasesIsDisabled).map(
|
|
239
|
+
({ label, value }, colIndex) => (
|
|
240
|
+
<div
|
|
241
|
+
css={localStyles.optionValueContent}
|
|
242
|
+
id={\`column-\${colIndex}\`}
|
|
243
|
+
role="columnheader"
|
|
244
|
+
key={value}
|
|
245
|
+
>
|
|
246
|
+
<div css={localStyles.optionHeader}>{label}</div>
|
|
247
|
+
</div>
|
|
248
|
+
),
|
|
249
|
+
)}
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
<div role="rowgroup" css={localStyles.radioContent}>
|
|
254
|
+
{getOverwriteHeader().map(({ label, value: optionValue }, rowIndex) => (
|
|
255
|
+
<div role="row" key={optionValue} css={localStyles.radioRow}>
|
|
256
|
+
<div
|
|
257
|
+
id={\`row-\${rowIndex}\`}
|
|
258
|
+
role="rowheader"
|
|
259
|
+
css={[localStyles.rowHeader, localStyles.firstColumn]}
|
|
260
|
+
>
|
|
261
|
+
{label}
|
|
262
|
+
</div>
|
|
263
|
+
<div css={localStyles.radioSelection}>
|
|
264
|
+
{OVERWRITE_ISSUE_VALUES.filter(filterOutReleasesOptionWhenReleasesIsDisabled).map(
|
|
265
|
+
({ value: issueValue }, colIndex) => (
|
|
266
|
+
<div role="gridcell" key={issueValue}>
|
|
267
|
+
<Radio
|
|
268
|
+
isChecked={isOptionSelected(issueValue, optionValue)}
|
|
269
|
+
labelId={\`column-\${colIndex} row-\${rowIndex}\`}
|
|
270
|
+
name={issueValue}
|
|
271
|
+
isDisabled={isReadOnly}
|
|
272
|
+
value={optionValue}
|
|
273
|
+
onChange={() => onConfigurationChange(issueValue, optionValue)}
|
|
274
|
+
/>
|
|
275
|
+
</div>
|
|
276
|
+
),
|
|
277
|
+
)}
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
))}
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const localStyles = cssMap({
|
|
287
|
+
header: {
|
|
288
|
+
display: 'flex',
|
|
289
|
+
},
|
|
290
|
+
firstColumn: {
|
|
291
|
+
minWidth: '220px',
|
|
292
|
+
},
|
|
293
|
+
optionHeader: {
|
|
294
|
+
flex: '1 1 0',
|
|
295
|
+
font: token('font.heading.xxsmall'),
|
|
296
|
+
color: token('color.text.subtlest'),
|
|
297
|
+
marginBottom: token('space.100'),
|
|
298
|
+
},
|
|
299
|
+
optionValueHeader: {
|
|
300
|
+
display: 'flex',
|
|
301
|
+
flex: '1.5 1 0',
|
|
302
|
+
marginTop: token('space.250'),
|
|
303
|
+
},
|
|
304
|
+
optionValueBorder: {
|
|
305
|
+
borderBottomStyle: 'solid',
|
|
306
|
+
borderBottomColor: token('color.border'),
|
|
307
|
+
borderBottomWidth: token('border.width.outline'),
|
|
308
|
+
},
|
|
309
|
+
optionValueContent: {
|
|
310
|
+
flex: '1 1 0',
|
|
311
|
+
textAlign: 'center',
|
|
312
|
+
},
|
|
313
|
+
rowHeader: {
|
|
314
|
+
flex: '1 1 0',
|
|
315
|
+
marginTop: token('space.100'),
|
|
316
|
+
color: token('color.text'),
|
|
317
|
+
},
|
|
318
|
+
radioContent: {
|
|
319
|
+
marginTop: token('space.050'),
|
|
320
|
+
marginBottom: token('space.150'),
|
|
321
|
+
},
|
|
322
|
+
radioRow: {
|
|
323
|
+
display: 'flex',
|
|
324
|
+
},
|
|
325
|
+
radioSelection: {
|
|
326
|
+
display: 'flex',
|
|
327
|
+
flex: '1.5 1 0',
|
|
328
|
+
marginTop: token('space.050'),
|
|
329
|
+
marginBottom: token('space.050'),
|
|
330
|
+
justifyContent: 'space-around',
|
|
331
|
+
},
|
|
332
|
+
button: {
|
|
333
|
+
textAlign: 'end',
|
|
334
|
+
},
|
|
335
|
+
section: {
|
|
336
|
+
paddingTop: token('space.150'),
|
|
337
|
+
paddingRight: token('space.150'),
|
|
338
|
+
paddingBottom: token('space.150'),
|
|
339
|
+
paddingLeft: token('space.150'),
|
|
340
|
+
},
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
export default ConfigurationTable;
|
|
344
|
+
`,
|
|
345
|
+
`
|
|
346
|
+
/** @jsx jsx */
|
|
347
|
+
import React from 'react';
|
|
348
|
+
import { Radio } from '@atlaskit/radio';
|
|
349
|
+
import { cssMap, jsx } from '@atlaskit/css';
|
|
350
|
+
import { token } from '@atlaskit/tokens';
|
|
351
|
+
import { FormattedMessage } from '@atlassian/jira-intl';
|
|
352
|
+
import { isDefined } from '@atlassian/jira-portfolio-3-portfolio/src/common/ramda/index.tsx';
|
|
353
|
+
import {
|
|
354
|
+
AUTO_SCHEDULE_OVERWRITE,
|
|
355
|
+
ISSUE_VALUES,
|
|
356
|
+
type AutoScheduleOverwriteOptions,
|
|
357
|
+
type IssueValues,
|
|
358
|
+
} from '@atlassian/jira-portfolio-3-portfolio/src/common/view/constant.tsx';
|
|
359
|
+
import commonMessages from '@atlassian/jira-portfolio-3-portfolio/src/common/view/messages.tsx';
|
|
360
|
+
import messages from './messages.tsx';
|
|
361
|
+
import type { Props } from './types.tsx';
|
|
362
|
+
|
|
363
|
+
const DETAILED_OVERWRITE_OPTIONS = [
|
|
364
|
+
{
|
|
365
|
+
value: AUTO_SCHEDULE_OVERWRITE.ALL_VALUES,
|
|
366
|
+
label: <FormattedMessage {...messages.overwriteAllValuesDesc} />,
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
value: AUTO_SCHEDULE_OVERWRITE.EMPTY_VALUES_ONLY,
|
|
370
|
+
label: <FormattedMessage {...messages.overwriteEmptyValuesOnlyDesc} />,
|
|
371
|
+
},
|
|
372
|
+
];
|
|
373
|
+
|
|
374
|
+
const OVERWRITE_OPTIONS = [
|
|
375
|
+
{
|
|
376
|
+
value: AUTO_SCHEDULE_OVERWRITE.ALL_VALUES,
|
|
377
|
+
label: <FormattedMessage {...messages.overwriteAllValues} />,
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
value: AUTO_SCHEDULE_OVERWRITE.EMPTY_VALUES_ONLY,
|
|
381
|
+
label: <FormattedMessage {...messages.overwriteEmptyValuesOnly} />,
|
|
382
|
+
},
|
|
383
|
+
];
|
|
384
|
+
|
|
385
|
+
const OVERWRITE_ISSUE_VALUES = [
|
|
386
|
+
{
|
|
387
|
+
value: ISSUE_VALUES.SPRINT,
|
|
388
|
+
label: <FormattedMessage {...commonMessages.sprints} />,
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
value: ISSUE_VALUES.RELEASE,
|
|
392
|
+
label: <FormattedMessage {...commonMessages.releases} />,
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
value: ISSUE_VALUES.TEAM,
|
|
396
|
+
label: <FormattedMessage {...commonMessages.teams} />,
|
|
397
|
+
},
|
|
398
|
+
];
|
|
399
|
+
|
|
400
|
+
const API_KEYS_FOR_OVERWRITE_ISSUE_VALUES = {
|
|
401
|
+
[ISSUE_VALUES.SPRINT]: 'ignoreSprints',
|
|
402
|
+
[ISSUE_VALUES.RELEASE]: 'ignoreReleases',
|
|
403
|
+
[ISSUE_VALUES.TEAM]: 'ignoreTeams',
|
|
404
|
+
} as const;
|
|
405
|
+
|
|
406
|
+
const ConfigurationTable = ({
|
|
407
|
+
autoScheduleConfiguration,
|
|
408
|
+
isReadOnly,
|
|
409
|
+
updateAutoScheduleConfiguration,
|
|
410
|
+
withDetailedHeader,
|
|
411
|
+
isReleasesEnabled,
|
|
412
|
+
}: Props) => {
|
|
413
|
+
const getOverwriteHeader = () => {
|
|
414
|
+
return withDetailedHeader ? DETAILED_OVERWRITE_OPTIONS : OVERWRITE_OPTIONS;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
const isOptionSelected = (
|
|
418
|
+
issueValue: IssueValues,
|
|
419
|
+
overwriteOption: AutoScheduleOverwriteOptions,
|
|
420
|
+
) => {
|
|
421
|
+
const apiKey = API_KEYS_FOR_OVERWRITE_ISSUE_VALUES[issueValue];
|
|
422
|
+
|
|
423
|
+
return (
|
|
424
|
+
isDefined(autoScheduleConfiguration) &&
|
|
425
|
+
((autoScheduleConfiguration[apiKey] &&
|
|
426
|
+
overwriteOption === AUTO_SCHEDULE_OVERWRITE.ALL_VALUES) ||
|
|
427
|
+
(!autoScheduleConfiguration[apiKey] &&
|
|
428
|
+
overwriteOption === AUTO_SCHEDULE_OVERWRITE.EMPTY_VALUES_ONLY))
|
|
429
|
+
);
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
const onConfigurationChange = (
|
|
433
|
+
issueValue: IssueValues,
|
|
434
|
+
overwriteOption: AutoScheduleOverwriteOptions,
|
|
435
|
+
): void => {
|
|
436
|
+
updateAutoScheduleConfiguration({
|
|
437
|
+
[API_KEYS_FOR_OVERWRITE_ISSUE_VALUES[issueValue]]:
|
|
438
|
+
overwriteOption === AUTO_SCHEDULE_OVERWRITE.ALL_VALUES,
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
const filterOutReleasesOptionWhenReleasesIsDisabled = ({
|
|
443
|
+
value,
|
|
444
|
+
}: {
|
|
445
|
+
value: IssueValues;
|
|
446
|
+
label: JSX.Element;
|
|
447
|
+
}) => isReleasesEnabled || value !== ISSUE_VALUES.RELEASE;
|
|
448
|
+
|
|
449
|
+
return (
|
|
450
|
+
<div
|
|
451
|
+
role="grid"
|
|
452
|
+
aria-labelledby="overwrite-issue-values-title"
|
|
453
|
+
aria-describedby="overwrite-issue-values-desc"
|
|
454
|
+
aria-busy="true"
|
|
455
|
+
>
|
|
456
|
+
<div role="rowgroup">
|
|
457
|
+
<div role="row" css={localStyles.header}>
|
|
458
|
+
<div css={[localStyles.optionHeader, localStyles.firstColumn]} />
|
|
459
|
+
<div
|
|
460
|
+
css={[
|
|
461
|
+
localStyles.optionValueHeader,
|
|
462
|
+
!withDetailedHeader && localStyles.optionValueBorder,
|
|
463
|
+
]}
|
|
464
|
+
>
|
|
465
|
+
{OVERWRITE_ISSUE_VALUES.filter(filterOutReleasesOptionWhenReleasesIsDisabled).map(
|
|
466
|
+
({ label, value }, colIndex) => (
|
|
467
|
+
<div
|
|
468
|
+
css={localStyles.optionValueContent}
|
|
469
|
+
id={\`column-\${colIndex}\`}
|
|
470
|
+
role="columnheader"
|
|
471
|
+
key={value}
|
|
472
|
+
>
|
|
473
|
+
<div css={localStyles.optionHeader}>{label}</div>
|
|
474
|
+
</div>
|
|
475
|
+
),
|
|
476
|
+
)}
|
|
477
|
+
</div>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
<div role="rowgroup" css={localStyles.radioContent}>
|
|
481
|
+
{getOverwriteHeader().map(({ label, value: optionValue }, rowIndex) => (
|
|
482
|
+
<div role="row" key={optionValue} css={localStyles.radioRow}>
|
|
483
|
+
<div
|
|
484
|
+
id={\`row-\${rowIndex}\`}
|
|
485
|
+
role="rowheader"
|
|
486
|
+
css={[localStyles.rowHeader, localStyles.firstColumn]}
|
|
487
|
+
>
|
|
488
|
+
{label}
|
|
489
|
+
</div>
|
|
490
|
+
<div css={localStyles.radioSelection}>
|
|
491
|
+
{OVERWRITE_ISSUE_VALUES.filter(filterOutReleasesOptionWhenReleasesIsDisabled).map(
|
|
492
|
+
({ value: issueValue }, colIndex) => (
|
|
493
|
+
<div role="gridcell" key={issueValue}>
|
|
494
|
+
<Radio
|
|
495
|
+
isChecked={isOptionSelected(issueValue, optionValue)}
|
|
496
|
+
labelId={\`column-\${colIndex} row-\${rowIndex}\`}
|
|
497
|
+
name={issueValue}
|
|
498
|
+
isDisabled={isReadOnly}
|
|
499
|
+
value={optionValue}
|
|
500
|
+
onChange={() => onConfigurationChange(issueValue, optionValue)}
|
|
501
|
+
/>
|
|
502
|
+
</div>
|
|
503
|
+
),
|
|
504
|
+
)}
|
|
505
|
+
</div>
|
|
506
|
+
</div>
|
|
507
|
+
))}
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
);
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
const localStyles = cssMap({
|
|
514
|
+
header: {
|
|
515
|
+
display: 'flex',
|
|
516
|
+
},
|
|
517
|
+
firstColumn: {
|
|
518
|
+
minWidth: '220px',
|
|
519
|
+
},
|
|
520
|
+
optionHeader: {
|
|
521
|
+
flex: '1 1 0',
|
|
522
|
+
font: token('font.heading.xxsmall'),
|
|
523
|
+
color: token('color.text.subtlest'),
|
|
524
|
+
marginBottom: token('space.100'),
|
|
525
|
+
},
|
|
526
|
+
optionValueHeader: {
|
|
527
|
+
display: 'flex',
|
|
528
|
+
flex: '1.5 1 0',
|
|
529
|
+
marginTop: token('space.250'),
|
|
530
|
+
},
|
|
531
|
+
optionValueBorder: {
|
|
532
|
+
borderBottomStyle: 'solid',
|
|
533
|
+
borderBottomColor: token('color.border'),
|
|
534
|
+
borderBottomWidth: token('border.width.outline'),
|
|
535
|
+
},
|
|
536
|
+
optionValueContent: {
|
|
537
|
+
flex: '1 1 0',
|
|
538
|
+
textAlign: 'center',
|
|
539
|
+
},
|
|
540
|
+
rowHeader: {
|
|
541
|
+
flex: '1 1 0',
|
|
542
|
+
marginTop: token('space.100'),
|
|
543
|
+
color: token('color.text'),
|
|
544
|
+
},
|
|
545
|
+
radioContent: {
|
|
546
|
+
marginTop: token('space.050'),
|
|
547
|
+
marginBottom: token('space.150'),
|
|
548
|
+
},
|
|
549
|
+
radioRow: {
|
|
550
|
+
display: 'flex',
|
|
551
|
+
},
|
|
552
|
+
radioSelection: {
|
|
553
|
+
display: 'flex',
|
|
554
|
+
flex: '1.5 1 0',
|
|
555
|
+
marginTop: token('space.050'),
|
|
556
|
+
marginBottom: token('space.050'),
|
|
557
|
+
justifyContent: 'space-around',
|
|
558
|
+
},
|
|
559
|
+
button: {
|
|
560
|
+
textAlign: 'end',
|
|
561
|
+
},
|
|
562
|
+
section: {
|
|
563
|
+
paddingTop: token('space.150'),
|
|
564
|
+
paddingRight: token('space.150'),
|
|
565
|
+
paddingBottom: token('space.150'),
|
|
566
|
+
paddingLeft: token('space.150'),
|
|
567
|
+
},
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
export default ConfigurationTable;
|
|
571
|
+
`,
|
|
572
|
+
'should do nothing with wrong import and wrong package',
|
|
573
|
+
);
|
|
94
574
|
});
|
package/codemods/utils.tsx
CHANGED
|
@@ -238,19 +238,21 @@ export const createRenameFuncFor =
|
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
241
|
+
// Ignoring this because it's causing false positives for the radio rename initiative
|
|
242
|
+
|
|
243
|
+
// let variable = hasVariableAssignment(j, source, specifier);
|
|
244
|
+
// if (variable) {
|
|
245
|
+
// (variable as Collection<VariableDeclaration>)
|
|
246
|
+
// .find(j.VariableDeclarator)
|
|
247
|
+
// .forEach((declarator) => {
|
|
248
|
+
// j(declarator)
|
|
249
|
+
// .find(j.Identifier)
|
|
250
|
+
// .filter((identifier) => identifier.name === 'id')
|
|
251
|
+
// .forEach((ids) => {
|
|
252
|
+
// findIdentifierAndReplaceAttribute(j, source, ids.node.name, from, to);
|
|
253
|
+
// });
|
|
254
|
+
// });
|
|
255
|
+
// }
|
|
254
256
|
};
|
|
255
257
|
|
|
256
258
|
export const createRemoveFuncFor =
|
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 = "8.3.
|
|
23
|
+
var packageVersion = "8.3.2";
|
|
24
24
|
var noop = _noop.default;
|
|
25
25
|
var labelPaddingStyles = null;
|
|
26
26
|
var labelStyles = null;
|
package/dist/es2019/radio.js
CHANGED
|
@@ -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 = "8.3.
|
|
12
|
+
const packageVersion = "8.3.2";
|
|
13
13
|
const noop = __noop;
|
|
14
14
|
const labelPaddingStyles = null;
|
|
15
15
|
const labelStyles = null;
|
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 = "8.3.
|
|
14
|
+
var packageVersion = "8.3.2";
|
|
15
15
|
var noop = __noop;
|
|
16
16
|
var labelPaddingStyles = null;
|
|
17
17
|
var labelStyles = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/radio",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.3",
|
|
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/"
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
36
|
-
"@atlaskit/css": "^0.
|
|
36
|
+
"@atlaskit/css": "^0.14.0",
|
|
37
37
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
39
39
|
"@atlaskit/theme": "^20.0.0",
|
|
40
|
-
"@atlaskit/tokens": "^6.
|
|
40
|
+
"@atlaskit/tokens": "^6.3.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@compiled/react": "^0.18.3"
|
|
43
43
|
},
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@atlaskit/button": "^23.4.0",
|
|
52
52
|
"@atlaskit/checkbox": "^17.1.0",
|
|
53
53
|
"@atlaskit/docs": "^11.0.0",
|
|
54
|
-
"@atlaskit/form": "^12.
|
|
54
|
+
"@atlaskit/form": "^12.5.0",
|
|
55
55
|
"@atlaskit/link": "^3.2.0",
|
|
56
|
-
"@atlaskit/primitives": "^14.
|
|
56
|
+
"@atlaskit/primitives": "^14.14.0",
|
|
57
57
|
"@atlaskit/section-message": "^8.7.0",
|
|
58
58
|
"@atlaskit/ssr": "workspace:^",
|
|
59
59
|
"@atlassian/ssr-tests": "^0.3.0",
|