@react-spectrum/codemods 0.1.0

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.
@@ -0,0 +1,1106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.changes = void 0;
4
+ exports.changes = {
5
+ Avatar: {
6
+ changes: [
7
+ {
8
+ description: 'Comment out isDisabled',
9
+ reason: 'It has not been implemented yet',
10
+ function: {
11
+ name: 'commentOutProp',
12
+ args: { propToComment: 'isDisabled' }
13
+ }
14
+ },
15
+ {
16
+ description: 'Update size prop',
17
+ reason: 'Updated naming convention',
18
+ function: {
19
+ name: 'updateAvatarSize',
20
+ args: {}
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ ActionMenu: {
26
+ changes: [
27
+ {
28
+ description: 'Comment out closeOnSelect',
29
+ reason: 'It has not been implemented yet',
30
+ function: {
31
+ name: 'commentOutProp',
32
+ args: { propToComment: 'closeOnSelect' }
33
+ }
34
+ },
35
+ {
36
+ description: 'Comment out trigger',
37
+ reason: 'It has not been implemented yet',
38
+ function: {
39
+ name: 'commentOutProp',
40
+ args: { propToComment: 'trigger' }
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ Breadcrumbs: {
46
+ changes: [
47
+ {
48
+ description: 'Comment out showRoot',
49
+ reason: 'It has not been implemented yet',
50
+ function: {
51
+ name: 'commentOutProp',
52
+ args: { propToComment: 'showRoot' }
53
+ }
54
+ },
55
+ {
56
+ description: 'Comment out isMultiline',
57
+ reason: 'It has not been implemented yet',
58
+ function: {
59
+ name: 'commentOutProp',
60
+ args: { propToComment: 'isMultiline' }
61
+ }
62
+ },
63
+ {
64
+ description: 'Comment out autoFocusCurrent',
65
+ reason: 'It has not been implemented yet',
66
+ function: {
67
+ name: 'commentOutProp',
68
+ args: { propToComment: 'autoFocusCurrent' }
69
+ }
70
+ },
71
+ {
72
+ description: 'Remove size="S"',
73
+ reason: 'Small is no longer a supported size in Spectrum 2',
74
+ function: {
75
+ name: 'removeProp',
76
+ args: { propToRemove: 'size', propValue: 'S' }
77
+ }
78
+ },
79
+ {
80
+ description: 'Add comment to wrap in nav element if needed',
81
+ reason: 'A nav element is no longer included inside Breadcrumbs by default. You can wrap the Breadcrumbs component in a nav element if needed.',
82
+ function: {
83
+ name: 'addCommentToElement',
84
+ args: { comment: 'S2 Breadcrumbs no longer includes a nav element by default. You can wrap the Breadcrumbs component in a nav element if needed.' }
85
+ }
86
+ }
87
+ ]
88
+ },
89
+ Button: {
90
+ changes: [
91
+ {
92
+ description: 'Change variant="cta" to variant="accent"',
93
+ reason: 'Call-to-action was deprecated',
94
+ function: {
95
+ name: 'updatePropNameAndValue',
96
+ args: {
97
+ oldProp: 'variant',
98
+ oldValue: 'cta',
99
+ newProp: 'variant',
100
+ newValue: 'accent'
101
+ }
102
+ }
103
+ },
104
+ {
105
+ description: 'Change variant="overBackground" to variant="primary" staticColor="white"',
106
+ reason: 'Updated design guidelines',
107
+ function: {
108
+ name: 'updatePropValueAndAddNewProp',
109
+ args: {
110
+ oldProp: 'variant',
111
+ oldValue: 'overBackground',
112
+ newProp: 'variant',
113
+ newValue: 'primary',
114
+ additionalProp: 'staticColor',
115
+ additionalValue: 'white'
116
+ }
117
+ }
118
+ },
119
+ {
120
+ description: 'Change style to fillStyle',
121
+ reason: 'To avoid confusion with HTMLElement style attribute',
122
+ function: {
123
+ name: 'updatePropName',
124
+ args: { oldProp: 'style', newProp: 'fillStyle' }
125
+ }
126
+ },
127
+ {
128
+ description: 'Comment out isPending',
129
+ reason: 'It has not been implemented yet',
130
+ function: {
131
+ name: 'commentOutProp',
132
+ args: { propToComment: 'isPending' }
133
+ }
134
+ },
135
+ {
136
+ description: 'Remove isQuiet',
137
+ reason: 'It is no longer supported',
138
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
139
+ },
140
+ {
141
+ description: 'If href is present, Button should be converted to a LinkButton',
142
+ reason: 'Improved API and behavior for links',
143
+ function: {
144
+ name: 'updateComponentIfPropPresent',
145
+ args: {
146
+ newComponent: 'LinkButton',
147
+ propToCheck: 'href'
148
+ }
149
+ }
150
+ },
151
+ {
152
+ description: 'Remove elementType',
153
+ reason: 'It is no longer supported',
154
+ function: { name: 'removeProp', args: { propToRemove: 'elementType' } }
155
+ }
156
+ ]
157
+ },
158
+ CheckboxGroup: {
159
+ changes: [
160
+ {
161
+ description: 'Remove showErrorIcon',
162
+ reason: 'It has been removed for accessibility reasons',
163
+ function: {
164
+ name: 'removeProp',
165
+ args: { propToRemove: 'showErrorIcon' }
166
+ }
167
+ }
168
+ ]
169
+ },
170
+ ColorArea: {
171
+ changes: []
172
+ },
173
+ ColorWheel: {
174
+ changes: []
175
+ },
176
+ ColorSlider: {
177
+ changes: [
178
+ {
179
+ description: 'Remove showValueLabel',
180
+ reason: 'It has been removed for accessibility reasons',
181
+ function: {
182
+ name: 'removeProp',
183
+ args: { propToRemove: 'showValueLabel' }
184
+ }
185
+ }
186
+ ]
187
+ },
188
+ ColorField: {
189
+ changes: [
190
+ {
191
+ description: 'Remove isQuiet',
192
+ reason: 'It is no longer supported',
193
+ function: {
194
+ name: 'removeProp',
195
+ args: { propToRemove: 'isQuiet' }
196
+ }
197
+ },
198
+ {
199
+ description: 'Remove placeholder',
200
+ reason: 'It has been removed for accessibility reasons',
201
+ function: {
202
+ name: 'removeProp',
203
+ args: { propToRemove: 'placeholder' }
204
+ }
205
+ },
206
+ {
207
+ description: "Change validationState='invalid' to isInvalid",
208
+ reason: 'Updated API',
209
+ function: {
210
+ name: 'updatePropNameAndValue',
211
+ args: {
212
+ oldProp: 'validationState',
213
+ oldValue: 'invalid',
214
+ newProp: 'isInvalid',
215
+ newValue: true
216
+ }
217
+ }
218
+ },
219
+ {
220
+ description: "Remove validationState='valid'",
221
+ reason: 'It is no longer supported',
222
+ function: {
223
+ name: 'removeProp',
224
+ args: { propToRemove: 'validationState', propValue: 'valid' }
225
+ }
226
+ }
227
+ ]
228
+ },
229
+ ComboBox: {
230
+ changes: [
231
+ {
232
+ description: 'Change menuWidth value from a DimensionValue to a pixel value',
233
+ reason: 'Updated design guidelines',
234
+ function: {
235
+ name: 'convertDimensionValueToPx',
236
+ args: {
237
+ propToConvertValue: 'menuWidth'
238
+ }
239
+ }
240
+ },
241
+ {
242
+ description: 'Remove isQuiet',
243
+ reason: 'It is no longer supported',
244
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
245
+ },
246
+ {
247
+ description: 'Comment out loadingState',
248
+ reason: 'It has not been implemented yet',
249
+ function: {
250
+ name: 'commentOutProp',
251
+ args: { propToComment: 'loadingState' }
252
+ }
253
+ },
254
+ {
255
+ description: 'Remove placeholder',
256
+ reason: 'It is no longer supported',
257
+ function: { name: 'removeProp', args: { propToRemove: 'placeholder' } }
258
+ },
259
+ {
260
+ description: "Change validationState='invalid' to isInvalid",
261
+ reason: 'Updated API',
262
+ function: {
263
+ name: 'updatePropNameAndValue',
264
+ args: {
265
+ oldProp: 'validationState',
266
+ oldValue: 'invalid',
267
+ newProp: 'isInvalid',
268
+ newValue: true
269
+ }
270
+ }
271
+ },
272
+ {
273
+ description: "Remove validationState='valid'",
274
+ reason: 'It is no longer supported',
275
+ function: {
276
+ name: 'removeProp',
277
+ args: { propToRemove: 'validationState', propValue: 'valid' }
278
+ }
279
+ },
280
+ {
281
+ description: 'Comment out onLoadMore',
282
+ reason: 'It has not been implemented yet',
283
+ function: {
284
+ name: 'commentOutProp',
285
+ args: { propToComment: 'onLoadMore' }
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ Dialog: {
291
+ changes: []
292
+ },
293
+ DialogTrigger: {
294
+ changes: [
295
+ {
296
+ description: "Comment out type='tray'",
297
+ reason: 'Tray has not been implemented yet',
298
+ function: { name: 'commentOutProp', args: { propToComment: 'type', propValue: 'tray' } }
299
+ },
300
+ {
301
+ description: "Comment out mobileType='tray'",
302
+ reason: 'mobileType has not been implemented yet',
303
+ function: {
304
+ name: 'commentOutProp',
305
+ args: { propToComment: 'mobileType' }
306
+ }
307
+ },
308
+ {
309
+ description: 'Remove targetRef',
310
+ reason: 'It is no longer supported',
311
+ function: { name: 'removeProp', args: { propToRemove: 'targetRef' } }
312
+ },
313
+ {
314
+ description: 'Update children to move render props from being the second child of DialogTrigger to being a child of Dialog',
315
+ reason: 'Updated API',
316
+ function: {
317
+ name: 'moveRenderPropsToChild',
318
+ args: { newChildComponent: 'Dialog' }
319
+ }
320
+ }
321
+ ]
322
+ },
323
+ Divider: {
324
+ changes: [
325
+ {
326
+ description: 'Remove Divider if within a Dialog',
327
+ reason: 'Updated design',
328
+ function: {
329
+ name: 'removeComponentIfWithinParent',
330
+ args: { parentComponent: 'Dialog' }
331
+ }
332
+ }
333
+ ]
334
+ },
335
+ Flex: {
336
+ changes: [
337
+ {
338
+ description: 'Update Flex to be a div and apply flex styles using the style macro',
339
+ reason: 'Updated API',
340
+ function: {
341
+ name: 'updateToNewComponent',
342
+ args: { newComponent: 'div' }
343
+ }
344
+ }
345
+ ]
346
+ },
347
+ Form: {
348
+ changes: [
349
+ {
350
+ description: 'Remove isQuiet',
351
+ reason: 'It is no longer supported',
352
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
353
+ },
354
+ {
355
+ description: 'Remove isReadOnly',
356
+ reason: 'It is no longer supported',
357
+ function: { name: 'removeProp', args: { propToRemove: 'isReadOnly' } }
358
+ },
359
+ {
360
+ description: 'Remove validationState',
361
+ reason: 'It is no longer supported',
362
+ function: {
363
+ name: 'removeProp',
364
+ args: { propToRemove: 'validationState' }
365
+ }
366
+ }
367
+ ]
368
+ },
369
+ Grid: {
370
+ changes: [
371
+ {
372
+ description: 'Update Grid to be a div and apply grid styles using the style macro',
373
+ reason: 'Updated API',
374
+ function: {
375
+ name: 'updateToNewComponent',
376
+ args: { newComponent: 'div' }
377
+ }
378
+ }
379
+ ]
380
+ },
381
+ InlineAlert: {
382
+ changes: [
383
+ {
384
+ description: "Change variant='info' to variant='informative'",
385
+ reason: 'Updated naming convention',
386
+ function: {
387
+ name: 'updatePropNameAndValue',
388
+ args: {
389
+ oldProp: 'variant',
390
+ oldValue: 'info',
391
+ newProp: 'variant',
392
+ newValue: 'informative'
393
+ }
394
+ }
395
+ }
396
+ ]
397
+ },
398
+ Item: {
399
+ changes: [
400
+ {
401
+ description: 'If within Menu, update Item to be a MenuItem',
402
+ reason: 'Updated collections API',
403
+ function: {
404
+ name: 'updateComponentWithinCollection',
405
+ args: {
406
+ parentComponent: 'Menu',
407
+ newComponent: 'MenuItem'
408
+ }
409
+ }
410
+ },
411
+ {
412
+ description: 'If within ActionMenu, update Item to be a MenuItem',
413
+ reason: 'Updated collections API',
414
+ function: {
415
+ name: 'updateComponentWithinCollection',
416
+ args: {
417
+ parentComponent: 'ActionMenu',
418
+ newComponent: 'MenuItem'
419
+ }
420
+ }
421
+ },
422
+ {
423
+ description: 'If within TagGroup, update Item to be a Tag',
424
+ reason: 'Updated collections API',
425
+ function: {
426
+ name: 'updateComponentWithinCollection',
427
+ args: {
428
+ parentComponent: 'TagGroup',
429
+ newComponent: 'Tag'
430
+ }
431
+ }
432
+ },
433
+ {
434
+ description: 'If within Breadcrumbs, update Item to be a Breadcrumb',
435
+ reason: 'Updated collections API',
436
+ function: {
437
+ name: 'updateComponentWithinCollection',
438
+ args: {
439
+ parentComponent: 'Breadcrumbs',
440
+ newComponent: 'Breadcrumb'
441
+ }
442
+ }
443
+ },
444
+ {
445
+ description: 'If within Picker, update Item to be a PickerItem',
446
+ reason: 'Updated collections API',
447
+ function: {
448
+ name: 'updateComponentWithinCollection',
449
+ args: {
450
+ parentComponent: 'Picker',
451
+ newComponent: 'PickerItem'
452
+ }
453
+ }
454
+ },
455
+ {
456
+ description: 'If within ComboBox, update Item to be a ComboBoxItem',
457
+ reason: 'Updated collections API',
458
+ function: {
459
+ name: 'updateComponentWithinCollection',
460
+ args: {
461
+ parentComponent: 'ComboBox',
462
+ newComponent: 'ComboBoxItem'
463
+ }
464
+ }
465
+ },
466
+ {
467
+ description: 'Leave comment if we cannot determine parent collection component',
468
+ reason: 'No collection parent detected',
469
+ function: {
470
+ name: 'commentIfParentCollectionNotDetected',
471
+ args: {}
472
+ }
473
+ }
474
+ // TODO: Not yet implemented in S2
475
+ // {
476
+ // description: 'If within ListBox, update Item to be a ListBoxItem',
477
+ // reason: 'Updated collections API',
478
+ // function: {
479
+ // name: 'updateComponentWithinCollection',
480
+ // args: {
481
+ // parentComponent: 'ListBox',
482
+ // newComponent: 'ListBoxItem'
483
+ // }
484
+ // }
485
+ // },
486
+ ]
487
+ },
488
+ Link: {
489
+ changes: [
490
+ {
491
+ description: "Change variant='overBackground' to staticColor='white'",
492
+ reason: 'Updated design guidelines',
493
+ function: {
494
+ name: 'updatePropNameAndValue',
495
+ args: {
496
+ oldProp: 'variant',
497
+ oldValue: 'overBackground',
498
+ newProp: 'staticColor',
499
+ newValue: 'white'
500
+ }
501
+ }
502
+ }
503
+ ]
504
+ },
505
+ MenuTrigger: {
506
+ changes: [
507
+ {
508
+ description: 'Comment out closeOnSelect',
509
+ reason: 'It has not been implemented yet',
510
+ function: {
511
+ name: 'commentOutProp',
512
+ args: { propToComment: 'closeOnSelect' }
513
+ }
514
+ }
515
+ ]
516
+ },
517
+ SubmenuTrigger: {
518
+ changes: [
519
+ {
520
+ description: 'Remove targetKey',
521
+ reason: 'Potential v3 bug or API differ bug',
522
+ function: { name: 'removeProp', args: { propToRemove: 'targetKey' } }
523
+ }
524
+ ]
525
+ },
526
+ NumberField: {
527
+ changes: [
528
+ {
529
+ description: 'Remove isQuiet',
530
+ reason: 'It is no longer supported',
531
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
532
+ },
533
+ {
534
+ description: "Change validationState='invalid' to isInvalid",
535
+ reason: 'Updated API',
536
+ function: {
537
+ name: 'updatePropNameAndValue',
538
+ args: {
539
+ oldProp: 'validationState',
540
+ oldValue: 'invalid',
541
+ newProp: 'isInvalid',
542
+ newValue: true
543
+ }
544
+ }
545
+ },
546
+ {
547
+ description: "Remove validationState='valid'",
548
+ reason: 'It is no longer supported',
549
+ function: {
550
+ name: 'removeProp',
551
+ args: { propToRemove: 'validationState', propValue: 'valid' }
552
+ }
553
+ }
554
+ ]
555
+ },
556
+ Picker: {
557
+ changes: [
558
+ {
559
+ description: 'Change menuWidth value from a DimensionValue to a pixel value',
560
+ reason: 'Updated design guidelines',
561
+ function: {
562
+ name: 'convertDimensionValueToPx',
563
+ args: {
564
+ propToConvertValue: 'menuWidth'
565
+ }
566
+ }
567
+ },
568
+ {
569
+ description: 'Remove isQuiet',
570
+ reason: 'It is no longer supported',
571
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
572
+ },
573
+ {
574
+ description: "Change validationState='invalid' to isInvalid",
575
+ reason: 'Updated API',
576
+ function: {
577
+ name: 'updatePropNameAndValue',
578
+ args: {
579
+ oldProp: 'validationState',
580
+ oldValue: 'invalid',
581
+ newProp: 'isInvalid',
582
+ newValue: true
583
+ }
584
+ }
585
+ },
586
+ {
587
+ description: "Remove validationState='valid'",
588
+ reason: 'It is no longer supported',
589
+ function: {
590
+ name: 'removeProp',
591
+ args: { propToRemove: 'validationState', propValue: 'valid' }
592
+ }
593
+ },
594
+ {
595
+ description: 'Comment out isLoading',
596
+ reason: 'It has not been implemented yet',
597
+ function: {
598
+ name: 'commentOutProp',
599
+ args: { propToComment: 'isLoading' }
600
+ }
601
+ },
602
+ {
603
+ description: 'Comment out onLoadMore',
604
+ reason: 'It has not been implemented yet',
605
+ function: {
606
+ name: 'commentOutProp',
607
+ args: { propToComment: 'onLoadMore' }
608
+ }
609
+ }
610
+ ]
611
+ },
612
+ ProgressBar: {
613
+ changes: [
614
+ {
615
+ description: "Change variant='overBackground' to staticColor='white'",
616
+ reason: 'Updated design guidelines',
617
+ function: {
618
+ name: 'updatePropNameAndValue',
619
+ args: {
620
+ oldProp: 'variant',
621
+ oldValue: 'overBackground',
622
+ newProp: 'staticColor',
623
+ newValue: 'white'
624
+ }
625
+ }
626
+ },
627
+ {
628
+ description: 'Comment out labelPosition',
629
+ reason: 'It has not been implemented yet',
630
+ function: {
631
+ name: 'commentOutProp',
632
+ args: { propToComment: 'labelPosition' }
633
+ }
634
+ },
635
+ {
636
+ description: 'Remove showValueLabel',
637
+ reason: 'It was removed for accessibility reasons',
638
+ function: { name: 'removeProp', args: { propToRemove: 'showValueLabel' } }
639
+ }
640
+ ]
641
+ },
642
+ ProgressCircle: {
643
+ changes: [
644
+ {
645
+ description: "Change variant='overBackground' to staticColor='white'",
646
+ reason: 'Updated design guidelines',
647
+ function: {
648
+ name: 'updatePropNameAndValue',
649
+ args: {
650
+ oldProp: 'variant',
651
+ oldValue: 'overBackground',
652
+ newProp: 'staticColor',
653
+ newValue: 'white'
654
+ }
655
+ }
656
+ }
657
+ ]
658
+ },
659
+ RadioGroup: {
660
+ changes: [
661
+ {
662
+ description: "Change validationState='invalid' to isInvalid",
663
+ reason: 'Updated API',
664
+ function: {
665
+ name: 'updatePropNameAndValue',
666
+ args: {
667
+ oldProp: 'validationState',
668
+ oldValue: 'invalid',
669
+ newProp: 'isInvalid',
670
+ newValue: true
671
+ }
672
+ }
673
+ },
674
+ {
675
+ description: "Remove validationState='valid'",
676
+ reason: 'It is no longer supported',
677
+ function: {
678
+ name: 'removeProp',
679
+ args: { propToRemove: 'validationState', propValue: 'valid' }
680
+ }
681
+ },
682
+ {
683
+ description: 'Remove showErrorIcon',
684
+ reason: 'It has been removed for accessibility reasons',
685
+ function: {
686
+ name: 'removeProp',
687
+ args: { propToRemove: 'showErrorIcon' }
688
+ }
689
+ }
690
+ ]
691
+ },
692
+ RangeSlider: {
693
+ changes: [
694
+ {
695
+ description: 'Remove showValueLabel',
696
+ reason: 'It was removed for accessibility reasons',
697
+ function: { name: 'removeProp', args: { propToRemove: 'showValueLabel' } }
698
+ },
699
+ {
700
+ description: 'Comment out getValueLabel',
701
+ reason: 'It has not been implemented yet',
702
+ function: {
703
+ name: 'commentOutProp',
704
+ args: { propToComment: 'getValueLabel' }
705
+ }
706
+ },
707
+ {
708
+ description: 'Comment out orientation',
709
+ reason: 'It has not been implemented yet',
710
+ function: {
711
+ name: 'commentOutProp',
712
+ args: { propToComment: 'orientation' }
713
+ }
714
+ }
715
+ ]
716
+ },
717
+ SearchField: {
718
+ changes: [
719
+ {
720
+ description: 'Remove placeholder',
721
+ reason: 'It has been removed for accessibility reasons',
722
+ function: { name: 'removeProp', args: { propToRemove: 'placeholder' } }
723
+ },
724
+ {
725
+ description: 'Comment out icon',
726
+ reason: 'It has not been implemented yet',
727
+ function: { name: 'commentOutProp', args: { propToComment: 'icon' } }
728
+ },
729
+ {
730
+ description: 'Remove isQuiet',
731
+ reason: 'It is no longer supported',
732
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
733
+ },
734
+ {
735
+ description: "Change validationState='invalid' to isInvalid",
736
+ reason: 'Updated API',
737
+ function: {
738
+ name: 'updatePropNameAndValue',
739
+ args: {
740
+ oldProp: 'validationState',
741
+ oldValue: 'invalid',
742
+ newProp: 'isInvalid',
743
+ newValue: true
744
+ }
745
+ }
746
+ },
747
+ {
748
+ description: "Remove validationState='valid'",
749
+ reason: 'It is no longer supported',
750
+ function: {
751
+ name: 'removeProp',
752
+ args: { propToRemove: 'validationState', propValue: 'valid' }
753
+ }
754
+ }
755
+ ]
756
+ },
757
+ Section: {
758
+ changes: [
759
+ {
760
+ description: 'If within Menu, update Section to be a MenuSection',
761
+ reason: 'Updated component structure',
762
+ function: {
763
+ name: 'updateComponentWithinCollection',
764
+ args: {
765
+ parentComponent: 'Menu',
766
+ newComponent: 'MenuSection'
767
+ }
768
+ }
769
+ },
770
+ {
771
+ description: 'If within Picker, update Section to be a PickerSection',
772
+ reason: 'Updated component structure',
773
+ function: {
774
+ name: 'updateComponentWithinCollection',
775
+ args: {
776
+ parentComponent: 'Picker',
777
+ newComponent: 'PickerSection'
778
+ }
779
+ }
780
+ },
781
+ {
782
+ description: 'If within ComboBox, update Section to be a ComboBoxSection',
783
+ reason: 'Updated component structure',
784
+ function: {
785
+ name: 'updateComponentWithinCollection',
786
+ args: {
787
+ parentComponent: 'ComboBox',
788
+ newComponent: 'ComboBoxSection'
789
+ }
790
+ }
791
+ },
792
+ {
793
+ description: 'Move title prop string to be a child of new Heading within a Header',
794
+ reason: 'Updated API',
795
+ function: {
796
+ name: 'movePropToNewChildComponent',
797
+ args: {
798
+ parentComponent: 'Menu',
799
+ childComponent: 'MenuSection',
800
+ propToMove: 'title',
801
+ newChildComponent: 'Header'
802
+ }
803
+ }
804
+ },
805
+ {
806
+ description: 'Move title prop string to be a child of new Heading within a Header',
807
+ reason: 'Updated API',
808
+ function: {
809
+ name: 'movePropToNewChildComponent',
810
+ args: {
811
+ parentComponent: 'Picker',
812
+ childComponent: 'PickerSection',
813
+ propToMove: 'title',
814
+ newChildComponent: 'Header'
815
+ }
816
+ }
817
+ },
818
+ {
819
+ description: 'Move title prop string to be a child of new Heading within a Header',
820
+ reason: 'Updated API',
821
+ function: {
822
+ name: 'movePropToNewChildComponent',
823
+ args: {
824
+ parentComponent: 'ComboBox',
825
+ childComponent: 'ComboBoxSection',
826
+ propToMove: 'title',
827
+ newChildComponent: 'Header'
828
+ }
829
+ }
830
+ },
831
+ {
832
+ description: 'Leave comment if we cannot determine parent collection component',
833
+ reason: 'No collection parent detected',
834
+ function: {
835
+ name: 'commentIfParentCollectionNotDetected',
836
+ args: {}
837
+ }
838
+ }
839
+ ]
840
+ },
841
+ Slider: {
842
+ changes: [
843
+ {
844
+ description: 'Remove isFilled',
845
+ reason: 'Slider is always filled in Spectrum 2',
846
+ function: { name: 'removeProp', args: { propToRemove: 'isFilled' } }
847
+ },
848
+ {
849
+ description: 'Remove trackGradient',
850
+ reason: 'It is no longer supported',
851
+ function: { name: 'removeProp', args: { propToRemove: 'trackGradient' } }
852
+ },
853
+ {
854
+ description: 'Remove showValueLabel',
855
+ reason: 'It was removed for accessibility reasons',
856
+ function: { name: 'removeProp', args: { propToRemove: 'showValueLabel' } }
857
+ },
858
+ {
859
+ description: 'Comment out getValueLabel',
860
+ reason: 'It has not been implemented yet',
861
+ function: {
862
+ name: 'commentOutProp',
863
+ args: { propToComment: 'getValueLabel' }
864
+ }
865
+ },
866
+ {
867
+ description: 'Comment out orientation',
868
+ reason: 'It has not been implemented yet',
869
+ function: {
870
+ name: 'commentOutProp',
871
+ args: { propToComment: 'orientation' }
872
+ }
873
+ }
874
+ ]
875
+ },
876
+ StatusLight: {
877
+ changes: [
878
+ {
879
+ description: 'Remove isDisabled',
880
+ reason: 'It is no longer supported',
881
+ function: { name: 'removeProp', args: { propToRemove: 'isDisabled' } }
882
+ },
883
+ {
884
+ description: "Change variant='info' to variant='informative'",
885
+ reason: 'Updated naming convention',
886
+ function: {
887
+ name: 'updatePropNameAndValue',
888
+ args: {
889
+ oldProp: 'variant',
890
+ oldValue: 'info',
891
+ newProp: 'variant',
892
+ newValue: 'informative'
893
+ }
894
+ }
895
+ }
896
+ ]
897
+ },
898
+ Tabs: {
899
+ changes: [
900
+ {
901
+ description: 'Remove TabPanels components and keep individual TabPanel components inside.',
902
+ reason: 'Updated collections API',
903
+ function: {
904
+ name: 'updateTabs',
905
+ args: {}
906
+ }
907
+ },
908
+ {
909
+ description: 'Remove isEmphasized',
910
+ reason: 'It is no longer supported',
911
+ function: { name: 'removeProp', args: { propToRemove: 'isEmphasized' } }
912
+ },
913
+ {
914
+ description: 'Remove isQuiet',
915
+ reason: 'It is no longer supported',
916
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
917
+ }
918
+ ]
919
+ },
920
+ TagGroup: {
921
+ changes: [
922
+ {
923
+ description: 'Change actionLabel to groupActionLabel',
924
+ reason: 'To match new onGroupAction prop',
925
+ function: {
926
+ name: 'updatePropName',
927
+ args: { oldProp: 'actionLabel', newProp: 'groupActionLabel' }
928
+ }
929
+ },
930
+ {
931
+ description: 'Change onAction to onGroupAction',
932
+ reason: 'To avoid confusion with existing onAction prop on other collection components',
933
+ function: {
934
+ name: 'updatePropName',
935
+ args: { oldProp: 'onAction', newProp: 'onGroupAction' }
936
+ }
937
+ },
938
+ {
939
+ description: "Change validationState='invalid' to isInvalid",
940
+ reason: 'Updated API',
941
+ function: {
942
+ name: 'updatePropNameAndValue',
943
+ args: {
944
+ oldProp: 'validationState',
945
+ oldValue: 'invalid',
946
+ newProp: 'isInvalid',
947
+ newValue: true
948
+ }
949
+ }
950
+ },
951
+ {
952
+ description: "Remove validationState='valid'",
953
+ reason: 'It is no longer supported',
954
+ function: {
955
+ name: 'removeProp',
956
+ args: { propToRemove: 'validationState', propValue: 'valid' }
957
+ }
958
+ }
959
+ ]
960
+ },
961
+ TextArea: {
962
+ changes: [
963
+ {
964
+ description: 'Comment out icon',
965
+ reason: 'It has not been implemented yet',
966
+ function: { name: 'commentOutProp', args: { propToComment: 'icon' } }
967
+ },
968
+ {
969
+ description: 'Remove isQuiet',
970
+ reason: 'It is no longer supported',
971
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
972
+ },
973
+ {
974
+ description: 'Remove placeholder',
975
+ reason: 'It has been removed for accessibility reasons',
976
+ function: { name: 'removeProp', args: { propToRemove: 'placeholder' } }
977
+ },
978
+ {
979
+ description: "Change validationState='invalid' to isInvalid",
980
+ reason: 'Updated API',
981
+ function: {
982
+ name: 'updatePropNameAndValue',
983
+ args: {
984
+ oldProp: 'validationState',
985
+ oldValue: 'invalid',
986
+ newProp: 'isInvalid',
987
+ newValue: true
988
+ }
989
+ }
990
+ },
991
+ {
992
+ description: "Remove validationState='valid'",
993
+ reason: 'It is no longer supported',
994
+ function: {
995
+ name: 'removeProp',
996
+ args: { propToRemove: 'validationState', propValue: 'valid' }
997
+ }
998
+ }
999
+ ]
1000
+ },
1001
+ TextField: {
1002
+ changes: [
1003
+ {
1004
+ description: 'Comment out icon',
1005
+ reason: 'It has not been implemented yet',
1006
+ function: { name: 'commentOutProp', args: { propToComment: 'icon' } }
1007
+ },
1008
+ {
1009
+ description: 'Remove isQuiet',
1010
+ reason: 'It is no longer supported',
1011
+ function: { name: 'removeProp', args: { propToRemove: 'isQuiet' } }
1012
+ },
1013
+ {
1014
+ description: 'Remove placeholder',
1015
+ reason: 'It has been removed for accessibility reasons',
1016
+ function: { name: 'removeProp', args: { propToRemove: 'placeholder' } }
1017
+ },
1018
+ {
1019
+ description: "Change validationState='invalid' to isInvalid",
1020
+ reason: 'Updated API',
1021
+ function: {
1022
+ name: 'updatePropNameAndValue',
1023
+ args: {
1024
+ oldProp: 'validationState',
1025
+ oldValue: 'invalid',
1026
+ newProp: 'isInvalid',
1027
+ newValue: true
1028
+ }
1029
+ }
1030
+ },
1031
+ {
1032
+ description: "Remove validationState='valid'",
1033
+ reason: 'It is no longer supported',
1034
+ function: {
1035
+ name: 'removeProp',
1036
+ args: { propToRemove: 'validationState', propValue: 'valid' }
1037
+ }
1038
+ }
1039
+ ]
1040
+ },
1041
+ Tooltip: {
1042
+ changes: [
1043
+ {
1044
+ description: 'Remove variant',
1045
+ reason: 'It is no longer supported',
1046
+ function: { name: 'removeProp', args: { propToRemove: 'variant' } }
1047
+ },
1048
+ {
1049
+ description: 'Remove placement and add to the parent TooltipTrigger instead',
1050
+ reason: 'Updated API',
1051
+ function: {
1052
+ name: 'movePropToParentComponent',
1053
+ args: {
1054
+ parentComponent: 'TooltipTrigger',
1055
+ childComponent: 'Tooltip',
1056
+ propToMove: 'placement'
1057
+ }
1058
+ }
1059
+ },
1060
+ {
1061
+ description: 'Remove showIcon',
1062
+ reason: 'It is no longer supported',
1063
+ function: { name: 'removeProp', args: { propToRemove: 'showIcon' } }
1064
+ },
1065
+ {
1066
+ description: 'Remove isOpen and add to the parent TooltipTrigger instead',
1067
+ reason: 'Updated API',
1068
+ function: {
1069
+ name: 'movePropToParentComponent',
1070
+ args: {
1071
+ parentComponent: 'TooltipTrigger',
1072
+ childComponent: 'Tooltip',
1073
+ propToMove: 'isOpen'
1074
+ }
1075
+ }
1076
+ }
1077
+ ]
1078
+ },
1079
+ TooltipTrigger: {
1080
+ changes: [
1081
+ {
1082
+ description: 'Update placement to use single value',
1083
+ reason: 'Updated API',
1084
+ function: {
1085
+ name: 'updatePlacementToSingleValue',
1086
+ args: {
1087
+ propToUpdate: 'placement',
1088
+ childComponent: 'Tooltip'
1089
+ }
1090
+ }
1091
+ }
1092
+ ]
1093
+ },
1094
+ View: {
1095
+ changes: [
1096
+ {
1097
+ description: 'Update View to be a div and apply styles using the style macro',
1098
+ reason: 'Updated API',
1099
+ function: {
1100
+ name: 'updateToNewComponent',
1101
+ args: { newComponent: 'div' }
1102
+ }
1103
+ }
1104
+ ]
1105
+ }
1106
+ };