@pantheon-systems/pds-toolkit-react 2.0.0-alpha.37 → 2.0.0-alpha.39
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/codemods/v1-to-v2/mappings.json +217 -28
- package/codemods/v1-to-v2/transforms/__testfixtures__/component-renames/basic.input.tsx +33 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/component-renames/basic.output.tsx +33 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/component-renames/only.input.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/component-renames/only.output.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-removals/basic.input.tsx +31 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-removals/basic.output.tsx +31 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-renames/basic.input.tsx +31 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-renames/basic.output.tsx +31 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/icon-name-updates/basic.input.tsx +35 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/icon-name-updates/basic.output.tsx +35 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/icon-name-updates/only.input.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/icon-name-updates/only.output.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-renames/basic.input.tsx +28 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-renames/basic.output.tsx +28 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-renames/only.input.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-renames/only.output.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.output.tsx +10 -10
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/only.input.tsx +21 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/only.output.tsx +21 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/removed-prop-values/basic.input.tsx +60 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/removed-prop-values/basic.output.tsx +51 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/removed-prop-values/only.input.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/removed-prop-values/only.output.tsx +8 -0
- package/codemods/v1-to-v2/transforms/__tests__/component-renames.test.js +15 -0
- package/codemods/v1-to-v2/transforms/__tests__/css-class-removals.test.js +6 -0
- package/codemods/v1-to-v2/transforms/__tests__/css-class-renames.test.js +6 -0
- package/codemods/v1-to-v2/transforms/__tests__/icon-name-updates.test.js +15 -0
- package/codemods/v1-to-v2/transforms/__tests__/prop-renames.test.js +15 -0
- package/codemods/v1-to-v2/transforms/__tests__/prop-value-standardization.test.js +10 -0
- package/codemods/v1-to-v2/transforms/__tests__/removed-prop-values.test.js +15 -0
- package/codemods/v1-to-v2/transforms/component-renames.js +166 -0
- package/codemods/v1-to-v2/transforms/css-class-removals.js +192 -0
- package/codemods/v1-to-v2/transforms/css-class-renames.js +114 -0
- package/codemods/v1-to-v2/transforms/icon-name-updates.js +124 -0
- package/codemods/v1-to-v2/transforms/prop-renames.js +109 -0
- package/codemods/v1-to-v2/transforms/prop-value-standardization.js +33 -2
- package/codemods/v1-to-v2/transforms/removed-prop-values.js +206 -0
- package/dist/components/Dropdown/Dropdown.d.ts +46 -0
- package/dist/components/SiteFooter/SiteFooter.d.ts +4 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/UtilityBar/UtilityBar.d.ts +2 -3
- package/dist/components/buttons/ButtonLink/ButtonLink.d.ts +1 -3
- package/dist/components/buttons/CloseButton/CloseButton.d.ts +2 -2
- package/dist/components/buttons/FilterButton/FilterButton.d.ts +82 -0
- package/dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +7 -1
- package/dist/components/cards/ActionCard/ActionCard.d.ts +2 -2
- package/dist/components/cards/Card/Card.d.ts +2 -2
- package/dist/components/icons/Icon/custom-icons.d.ts +1 -1
- package/dist/components/icons/Icon/generated-icon-data.d.ts +107 -30
- package/dist/components/navigation/Navbar/Navbar.d.ts +10 -1
- package/dist/components/panels/Panel/Panel.d.ts +2 -2
- package/dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +10 -1
- package/dist/css/component-css/pds-action-card.css +1 -1
- package/dist/css/component-css/pds-button-link.css +1 -1
- package/dist/css/component-css/pds-button.css +1 -1
- package/dist/css/component-css/pds-card.css +1 -1
- package/dist/css/component-css/pds-checkbox.css +1 -1
- package/dist/css/component-css/pds-close-button.css +1 -1
- package/dist/css/component-css/pds-dropdown.css +2 -2
- package/dist/css/component-css/pds-filter-button.css +1 -0
- package/dist/css/component-css/pds-icon.css +1 -1
- package/dist/css/component-css/pds-index.css +23 -23
- package/dist/css/component-css/pds-panel.css +1 -1
- package/dist/css/component-css/pds-progress-ring.css +1 -1
- package/dist/css/component-css/pds-radio-group.css +1 -1
- package/dist/css/component-css/pds-segmented-button.css +1 -1
- package/dist/css/component-css/pds-side-nav-global.css +1 -1
- package/dist/css/component-css/pds-site-footer.css +1 -1
- package/dist/css/component-css/pds-site-search.css +1 -1
- package/dist/css/component-css/pds-skeleton.css +1 -1
- package/dist/css/component-css/pds-switch.css +2 -2
- package/dist/css/component-css/pds-utility-bar.css +1 -1
- package/dist/css/component-css/pds-vertical-empty-state.css +1 -1
- package/dist/css/design-tokens/variables.dark.css +6 -2
- package/dist/css/design-tokens/variables.global.css +0 -1
- package/dist/css/design-tokens/variables.light.css +4 -0
- package/dist/css/layout-css/pds-app-layout.css +5 -2
- package/dist/css/layout-css/pds-index.css +5 -2
- package/dist/css/layout-css/pds-sidebar-layout.css +1 -1
- package/dist/css/pds-components.css +23 -23
- package/dist/css/pds-core.css +2 -2
- package/dist/css/pds-layouts.css +5 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1340 -1032
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +3 -0
- package/dist/layouts/AppLayout/AppLayout.d.ts +22 -2
- package/dist/layouts/SidebarLayout/SidebarLayout.d.ts +4 -3
- package/dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +3 -3
- package/dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +3 -3
- package/dist/libs/types/custom-types.d.ts +2 -2
- package/dist/libs/types/layout-types.d.ts +2 -1
- package/dist/svg/circleHalfStroke.svg +3 -0
- package/dist/svg/claude.svg +3 -0
- package/dist/svg/clock.svg +3 -0
- package/dist/svg/diagramVenn.svg +3 -0
- package/dist/svg/floppyDisk.svg +3 -0
- package/dist/svg/grid.svg +2 -2
- package/dist/svg/grid2.svg +3 -0
- package/dist/svg/octagonExclamation.svg +3 -0
- package/dist/svg/openai.svg +3 -0
- package/dist/svg/slider.svg +3 -0
- package/dist/svg/squareDashed.svg +3 -0
- package/dist/svg/tableColumns.svg +3 -0
- package/dist/utilities/FlexContainer/FlexContainer.d.ts +5 -6
- package/dist/utilities/grid/Grid.d.ts +58 -0
- package/dist/utilities/grid/GridItem.d.ts +57 -0
- package/package.json +5 -7
- /package/dist/svg/{arrowDownLeftAndArrowUpRightToCenter.svg → collapseToCenter.svg} +0 -0
- /package/dist/svg/{linkSimple.svg → link.svg} +0 -0
- /package/dist/svg/{arrowsUpDownLeftRight.svg → move.svg} +0 -0
- /package/dist/svg/{linkSimpleSlash.svg → unlink.svg} +0 -0
|
@@ -153,6 +153,24 @@
|
|
|
153
153
|
"prop": "size",
|
|
154
154
|
"description": "New size prop controls logo scale. The wordmark height is the sizing basis and maps to PDS typography size tokens: s = --pds-typography-size-s, m = --pds-typography-size-m, l = --pds-typography-size-l. The full and icon variants scale proportionally so the fist matches the wordmark height.",
|
|
155
155
|
"usage": "Use size='s' for compact contexts (e.g. navbar), size='m' for default, size='l' for hero or marketing use."
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"component": "AppLayout",
|
|
159
|
+
"prop": "header slot",
|
|
160
|
+
"description": "New header named slot renders a full-width region (typically a Navbar) above the sidebar and main content. When present, AppLayout stacks the header on top and positions the sidebar directly below it, so consumers no longer need an external flex-column wrapper to combine a Navbar with AppLayout.",
|
|
161
|
+
"usage": "Pass a component such as <Navbar slot='header'>...</Navbar> as a child of AppLayout."
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"component": "AppLayout",
|
|
165
|
+
"prop": "footer slot",
|
|
166
|
+
"description": "New footer named slot renders a region (typically a SiteFooter) below the main content and aligned with it, while the sidebar spans the full height alongside the main + footer column. Gives the footer its own landmark instead of nesting it inside the main element.",
|
|
167
|
+
"usage": "Pass a component such as <SiteFooter as='footer' slot='footer' /> as a child of AppLayout."
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"component": "Navbar",
|
|
171
|
+
"prop": "inlinePadding",
|
|
172
|
+
"description": "New inlinePadding prop overrides the desktop bar's horizontal (inline) padding with any CSS length, applied symmetrically. Defaults to the Container's standard gutter, so existing navbars are unaffected.",
|
|
173
|
+
"usage": "Set inlinePadding (e.g. 'var(--pds-spacing-m)') to align the navbar content with an adjacent app shell, such as the AppLayout sidebar when the navbar is in a header slot."
|
|
156
174
|
}
|
|
157
175
|
],
|
|
158
176
|
"deprecations": [
|
|
@@ -237,13 +255,13 @@
|
|
|
237
255
|
"component": "Icon",
|
|
238
256
|
"from": "iconSize",
|
|
239
257
|
"to": "size",
|
|
240
|
-
"reason": "The iconSize prop has been renamed to size for consistency across V2 icon components. The
|
|
258
|
+
"reason": "The iconSize prop has been renamed to size for consistency across V2 icon components. The default ('l') is unchanged, but the 'xs' (10px) value has been removed (see props.typeChanges) — use 's' instead."
|
|
241
259
|
},
|
|
242
260
|
{
|
|
243
261
|
"component": "CloseButton",
|
|
244
262
|
"from": "iconSize",
|
|
245
263
|
"to": "size",
|
|
246
|
-
"reason": "The iconSize prop has been renamed to size for consistency with other button components.
|
|
264
|
+
"reason": "The iconSize prop has been renamed to size for consistency with other button components. Size values have also been standardized to 's', 'm', 'l' (see props.typeChanges)."
|
|
247
265
|
},
|
|
248
266
|
{
|
|
249
267
|
"component": "PlatformIcon",
|
|
@@ -271,6 +289,12 @@
|
|
|
271
289
|
}
|
|
272
290
|
],
|
|
273
291
|
"additions": [
|
|
292
|
+
{
|
|
293
|
+
"component": "ButtonLink",
|
|
294
|
+
"prop": "variant",
|
|
295
|
+
"description": "ButtonLink now supports the full Button variant set, including the new 'link' variant (a text-link appearance on a real anchor). Previously the 'inline' variant was excluded.",
|
|
296
|
+
"usage": "Use variant=\"link\" for an anchor styled as an inline text link — e.g. the account-tier links in a dashboard workspace header."
|
|
297
|
+
},
|
|
274
298
|
{
|
|
275
299
|
"component": "Card",
|
|
276
300
|
"prop": "imageVariant",
|
|
@@ -325,6 +349,12 @@
|
|
|
325
349
|
"description": "New size prop adds two tab height variants. Defaults to 's' (32px). 'm' gives 40px tabs with larger text and icons.",
|
|
326
350
|
"usage": "Use size='s' (default) for standard navigation, size='m' for more prominent tab navigation."
|
|
327
351
|
},
|
|
352
|
+
{
|
|
353
|
+
"component": "SegmentedButton",
|
|
354
|
+
"prop": "size",
|
|
355
|
+
"description": "New size prop adds two height/font-size variants. Defaults to 's' (32px, matching the small button height). 'xs' gives 24px segments for compact layouts.",
|
|
356
|
+
"usage": "Use size='s' (default) for standard usage, size='xs' for dense or space-constrained layouts."
|
|
357
|
+
},
|
|
328
358
|
{
|
|
329
359
|
"component": "ComboboxMultiselect",
|
|
330
360
|
"prop": "size",
|
|
@@ -491,12 +521,6 @@
|
|
|
491
521
|
"replacement": "Remove the prop. TabMenu now renders at a single size equivalent to the former size='m'.",
|
|
492
522
|
"reason": "The size prop has been removed in v2. The component now renders at one size only. Remove any size='s' or size='m' usage."
|
|
493
523
|
},
|
|
494
|
-
{
|
|
495
|
-
"component": "SegmentedButton",
|
|
496
|
-
"prop": "size",
|
|
497
|
-
"replacement": "Remove the prop. SegmentedButton now renders at a single size equivalent to the former size='s'.",
|
|
498
|
-
"reason": "The size prop and the medium size have been removed in v2. The component now renders at one size only. Remove any size='s' or size='m' usage. A smaller size may be reintroduced later if a need arises."
|
|
499
|
-
},
|
|
500
524
|
{
|
|
501
525
|
"component": "ButtonNav",
|
|
502
526
|
"prop": "size",
|
|
@@ -534,6 +558,13 @@
|
|
|
534
558
|
"replacement": "Use variant=\"subtle\"",
|
|
535
559
|
"reason": "The navbar variant has been removed in v2. It was visually identical to subtle — replace with subtle."
|
|
536
560
|
},
|
|
561
|
+
{
|
|
562
|
+
"component": "Button",
|
|
563
|
+
"prop": "variant",
|
|
564
|
+
"oldValue": "inline",
|
|
565
|
+
"replacement": "Use variant=\"link\"",
|
|
566
|
+
"reason": "The 'inline' button variant has been renamed to 'link' to describe its appearance (a text link) rather than its placement, and is no longer treated as legacy."
|
|
567
|
+
},
|
|
537
568
|
{
|
|
538
569
|
"component": "MenuButton",
|
|
539
570
|
"prop": "variant",
|
|
@@ -729,6 +760,132 @@
|
|
|
729
760
|
}
|
|
730
761
|
],
|
|
731
762
|
"typeChanges": [
|
|
763
|
+
{
|
|
764
|
+
"component": "Icon",
|
|
765
|
+
"prop": "size",
|
|
766
|
+
"description": "The 'xs' size value has been removed",
|
|
767
|
+
"v1Type": "'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl'",
|
|
768
|
+
"v2Type": "'s' | 'm' | 'l' | 'xl' | '2xl' | '3xl'",
|
|
769
|
+
"migration": {
|
|
770
|
+
"xs": "s (removed, use 's' instead)"
|
|
771
|
+
},
|
|
772
|
+
"reason": "The 10px 'xs' icon size has been removed in v2. It had a single internal usage (the TagsInput remove button, now 's'/12px) and is superseded by 's'. Use size='s' instead."
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"component": "FlexContainer",
|
|
776
|
+
"prop": "gap",
|
|
777
|
+
"description": "The named gap scale was replaced by the numbered spacing scale (`GapScale`). Fixed at all breakpoints; use `mobileGap` to change the gap on small screens.",
|
|
778
|
+
"v1Type": "'minimal' | 'narrow' | 'standard' | 'wide' | 'none'",
|
|
779
|
+
"v2Type": "'none' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'",
|
|
780
|
+
"migration": {
|
|
781
|
+
"minimal": "s",
|
|
782
|
+
"narrow": "m",
|
|
783
|
+
"standard": "xl",
|
|
784
|
+
"wide": "3xl"
|
|
785
|
+
},
|
|
786
|
+
"reason": "Unifies gap onto one predictable, fixed spacing scale across FlexContainer, Grid, and the layout components."
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"component": "FlexContainer",
|
|
790
|
+
"prop": "mobileGap",
|
|
791
|
+
"description": "The named gap scale was replaced by the numbered spacing scale (`GapScale`).",
|
|
792
|
+
"v1Type": "'minimal' | 'narrow' | 'standard' | 'wide' | 'none'",
|
|
793
|
+
"v2Type": "'none' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'",
|
|
794
|
+
"migration": {
|
|
795
|
+
"minimal": "s",
|
|
796
|
+
"narrow": "m",
|
|
797
|
+
"standard": "xl",
|
|
798
|
+
"wide": "3xl"
|
|
799
|
+
},
|
|
800
|
+
"reason": "Unifies gap onto one predictable, fixed spacing scale across FlexContainer, Grid, and the layout components."
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"component": "SidebarLayout",
|
|
804
|
+
"prop": "gridGap",
|
|
805
|
+
"description": "The named gap scale was replaced by the numbered spacing scale (`GapScale`).",
|
|
806
|
+
"v1Type": "'narrow' | 'standard' | 'wide' | 'none'",
|
|
807
|
+
"v2Type": "'none' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'",
|
|
808
|
+
"migration": {
|
|
809
|
+
"narrow": "m",
|
|
810
|
+
"standard": "xl",
|
|
811
|
+
"wide": "3xl"
|
|
812
|
+
},
|
|
813
|
+
"reason": "Unifies gap onto one predictable, fixed spacing scale across FlexContainer, Grid, and the layout components."
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"component": "TwoItemLayout",
|
|
817
|
+
"prop": "gridGap",
|
|
818
|
+
"description": "The named gap scale was replaced by the numbered spacing scale (`GapScale`).",
|
|
819
|
+
"v1Type": "'narrow' | 'standard' | 'wide' | 'none'",
|
|
820
|
+
"v2Type": "'none' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'",
|
|
821
|
+
"migration": {
|
|
822
|
+
"narrow": "m",
|
|
823
|
+
"standard": "xl",
|
|
824
|
+
"wide": "3xl"
|
|
825
|
+
},
|
|
826
|
+
"reason": "Unifies gap onto one predictable, fixed spacing scale across FlexContainer, Grid, and the layout components."
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"component": "ThreeItemLayout",
|
|
830
|
+
"prop": "gridGap",
|
|
831
|
+
"description": "The named gap scale was replaced by the numbered spacing scale (`GapScale`).",
|
|
832
|
+
"v1Type": "'narrow' | 'standard' | 'wide' | 'none'",
|
|
833
|
+
"v2Type": "'none' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl'",
|
|
834
|
+
"migration": {
|
|
835
|
+
"narrow": "m",
|
|
836
|
+
"standard": "xl",
|
|
837
|
+
"wide": "3xl"
|
|
838
|
+
},
|
|
839
|
+
"reason": "Unifies gap onto one predictable, fixed spacing scale across FlexContainer, Grid, and the layout components."
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"component": "Panel",
|
|
843
|
+
"prop": "padding",
|
|
844
|
+
"description": "The padding prop moved from the shared GridGapOptions scale to a dedicated, curated PaddingScale. Values were renamed: narrow → condensed, wide → spacious. standard and none are unchanged. The underlying spacing values are preserved.",
|
|
845
|
+
"v1Type": "'wide' | 'standard' | 'narrow' | 'none'",
|
|
846
|
+
"v2Type": "'none' | 'condensed' | 'standard' | 'spacious'",
|
|
847
|
+
"migration": {
|
|
848
|
+
"narrow": "condensed",
|
|
849
|
+
"wide": "spacious"
|
|
850
|
+
},
|
|
851
|
+
"reason": "Padding is a container-internal concern with its own curated semantic scale, separated from the numbered gap scale used for layout spacing."
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"component": "Card",
|
|
855
|
+
"prop": "padding",
|
|
856
|
+
"description": "The padding prop moved from the shared GridGapOptions scale to a dedicated, curated PaddingScale. Values were renamed: narrow → condensed, wide → spacious. standard and none are unchanged. The underlying spacing values are preserved.",
|
|
857
|
+
"v1Type": "'wide' | 'standard' | 'narrow' | 'none'",
|
|
858
|
+
"v2Type": "'none' | 'condensed' | 'standard' | 'spacious'",
|
|
859
|
+
"migration": {
|
|
860
|
+
"narrow": "condensed",
|
|
861
|
+
"wide": "spacious"
|
|
862
|
+
},
|
|
863
|
+
"reason": "Padding is a container-internal concern with its own curated semantic scale, separated from the numbered gap scale used for layout spacing."
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"component": "ActionCard",
|
|
867
|
+
"prop": "padding",
|
|
868
|
+
"description": "The padding prop moved from the shared GridGapOptions scale to a dedicated, curated PaddingScale. Values were renamed: narrow → condensed, wide → spacious. standard and none are unchanged. The underlying spacing values are preserved.",
|
|
869
|
+
"v1Type": "'wide' | 'standard' | 'narrow' | 'none'",
|
|
870
|
+
"v2Type": "'none' | 'condensed' | 'standard' | 'spacious'",
|
|
871
|
+
"migration": {
|
|
872
|
+
"narrow": "condensed",
|
|
873
|
+
"wide": "spacious"
|
|
874
|
+
},
|
|
875
|
+
"reason": "Padding is a container-internal concern with its own curated semantic scale, separated from the numbered gap scale used for layout spacing."
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"component": "UtilityBar",
|
|
879
|
+
"prop": "padding",
|
|
880
|
+
"description": "The padding prop moved from the shared GridGapOptions scale to a dedicated, curated PaddingScale. Values were renamed: narrow → condensed, wide → spacious. standard and none are unchanged. The underlying spacing values are preserved.",
|
|
881
|
+
"v1Type": "'wide' | 'standard' | 'narrow' | 'none'",
|
|
882
|
+
"v2Type": "'none' | 'condensed' | 'standard' | 'spacious'",
|
|
883
|
+
"migration": {
|
|
884
|
+
"narrow": "condensed",
|
|
885
|
+
"wide": "spacious"
|
|
886
|
+
},
|
|
887
|
+
"reason": "Padding is a container-internal concern with its own curated semantic scale, separated from the numbered gap scale used for layout spacing."
|
|
888
|
+
},
|
|
732
889
|
{
|
|
733
890
|
"component": "StepList",
|
|
734
891
|
"prop": "steps",
|
|
@@ -807,15 +964,15 @@
|
|
|
807
964
|
{
|
|
808
965
|
"component": "CloseButton",
|
|
809
966
|
"prop": "size",
|
|
810
|
-
"description": "Prop renamed from iconSize to size, and size naming convention
|
|
967
|
+
"description": "Prop renamed from iconSize to size, and size naming convention standardized to s/m/l",
|
|
811
968
|
"v1Type": "'md' | 'lg' | 'xl' (on iconSize prop)",
|
|
812
|
-
"v2Type": "'
|
|
969
|
+
"v2Type": "'s' | 'm' | 'l' (on size prop)",
|
|
813
970
|
"migration": {
|
|
814
|
-
"md": "
|
|
815
|
-
"lg": "
|
|
816
|
-
"xl": "
|
|
971
|
+
"md": "s",
|
|
972
|
+
"lg": "m",
|
|
973
|
+
"xl": "l"
|
|
817
974
|
},
|
|
818
|
-
"reason": "Prop renamed from iconSize to size for consistency with other button components. Size
|
|
975
|
+
"reason": "Prop renamed from iconSize to size for consistency with other button components. Size values standardized to the single-letter s/m/l scale used across V2 (smallest rung is now 's'); pixel sizes are unchanged, only the labels shifted (md→s, lg→m, xl→l)."
|
|
819
976
|
},
|
|
820
977
|
{
|
|
821
978
|
"component": "Icon",
|
|
@@ -828,6 +985,18 @@
|
|
|
828
985
|
},
|
|
829
986
|
"reason": "The 'Outline' and 'Line' suffixed icon names have been removed. The base names (circlePlus, circleMinus, globe) now render the outlined/regular style by default."
|
|
830
987
|
},
|
|
988
|
+
{
|
|
989
|
+
"component": "Icon",
|
|
990
|
+
"prop": "iconName",
|
|
991
|
+
"description": "Several verbose icon names were shortened for clarity.",
|
|
992
|
+
"migration": {
|
|
993
|
+
"arrowDownLeftAndArrowUpRightToCenter": "collapseToCenter",
|
|
994
|
+
"arrowsUpDownLeftRight": "move",
|
|
995
|
+
"linkSimple": "link",
|
|
996
|
+
"linkSimpleSlash": "unlink"
|
|
997
|
+
},
|
|
998
|
+
"reason": "Renamed for brevity and clarity: 'arrowDownLeftAndArrowUpRightToCenter' → 'collapseToCenter' (pairs with 'expandFromCenter'), 'arrowsUpDownLeftRight' → 'move', 'linkSimple' → 'link', 'linkSimpleSlash' → 'unlink'. Run the icon-name-updates codemod to migrate."
|
|
999
|
+
},
|
|
831
1000
|
{
|
|
832
1001
|
"component": "Tooltip",
|
|
833
1002
|
"prop": "triggerIconSize",
|
|
@@ -916,14 +1085,14 @@
|
|
|
916
1085
|
{
|
|
917
1086
|
"component": "CTALink",
|
|
918
1087
|
"prop": "size",
|
|
919
|
-
"description": "Size naming convention updated
|
|
1088
|
+
"description": "Size naming convention updated (sm → s, md → m), default changed from 'md' to 's', and an 'xs' variant added. v2 accepts 'xs' | 's' | 'm'.",
|
|
920
1089
|
"v1Type": "'sm' | 'md'",
|
|
921
|
-
"v2Type": "'s' | 'm'",
|
|
1090
|
+
"v2Type": "'xs' | 's' | 'm'",
|
|
922
1091
|
"migration": {
|
|
923
1092
|
"sm": "s",
|
|
924
1093
|
"md": "m"
|
|
925
1094
|
},
|
|
926
|
-
"reason": "Standardized size naming
|
|
1095
|
+
"reason": "Standardized size naming and added 'xs' to support compact contexts such as the Payment Card pattern footer."
|
|
927
1096
|
},
|
|
928
1097
|
{
|
|
929
1098
|
"component": "LinkNewWindow",
|
|
@@ -1012,17 +1181,6 @@
|
|
|
1012
1181
|
"newType": "(key: string, order: SortOrder) => void",
|
|
1013
1182
|
"reason": "The sort callback now receives a column id string instead of a positional index."
|
|
1014
1183
|
},
|
|
1015
|
-
{
|
|
1016
|
-
"component": "CTALink",
|
|
1017
|
-
"prop": "size",
|
|
1018
|
-
"description": "Added xs size variant. The size prop now accepts xs | s | m (previously s | m).",
|
|
1019
|
-
"v1Type": "'s' | 'm'",
|
|
1020
|
-
"v2Type": "'xs' | 's' | 'm'",
|
|
1021
|
-
"migration": {
|
|
1022
|
-
"note": "Backwards compatible — existing size values are unchanged. Use size=\"xs\" when a smaller CTA link is needed."
|
|
1023
|
-
},
|
|
1024
|
-
"reason": "Added to support compact contexts such as the Payment Card pattern footer."
|
|
1025
|
-
},
|
|
1026
1184
|
{
|
|
1027
1185
|
"component": "MenuButton",
|
|
1028
1186
|
"prop": "displayType",
|
|
@@ -1060,6 +1218,16 @@
|
|
|
1060
1218
|
},
|
|
1061
1219
|
"cssClasses": {
|
|
1062
1220
|
"renames": [
|
|
1221
|
+
{
|
|
1222
|
+
"old": "pds-grid--narrow",
|
|
1223
|
+
"new": "pds-grid--gap-m",
|
|
1224
|
+
"reason": "The grid gap moved to the numbered spacing scale. The old responsive `narrow` gutter maps to a fixed `m` (16px) gap."
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"old": "pds-grid--wide",
|
|
1228
|
+
"new": "pds-grid--gap-3xl",
|
|
1229
|
+
"reason": "The grid gap moved to the numbered spacing scale. The old responsive `wide` gutter maps to a fixed `3xl` (40px) gap."
|
|
1230
|
+
},
|
|
1063
1231
|
{
|
|
1064
1232
|
"old": "pds-overline-text",
|
|
1065
1233
|
"new": "pds-overline-m",
|
|
@@ -1156,6 +1324,27 @@
|
|
|
1156
1324
|
"removals": []
|
|
1157
1325
|
},
|
|
1158
1326
|
"behaviorChanges": [
|
|
1327
|
+
{
|
|
1328
|
+
"component": "Container",
|
|
1329
|
+
"prop": "full width",
|
|
1330
|
+
"description": "The 'full' container width is now edge-to-edge with no inline padding.",
|
|
1331
|
+
"v1Behavior": "containerWidth='full' (class pds-container--full) removed the max-width but kept the standard 2xl inline padding, so full-width sections still had a gutter.",
|
|
1332
|
+
"v2Behavior": "The 'full' width now has no inline padding (padding-inline: 0), so content spans edge-to-edge. Add your own padding for full-width sections that need a gutter.",
|
|
1333
|
+
"migration": "If you used containerWidth='full' (or the pds-container--full class) and relied on its inline padding, add the padding yourself (e.g. a spacing utility or wrapper).",
|
|
1334
|
+
"affectedAreas": [
|
|
1335
|
+
"Container",
|
|
1336
|
+
"Any full-width sections using pds-container--full"
|
|
1337
|
+
]
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"component": "SiteFooter",
|
|
1341
|
+
"prop": "containerWidth",
|
|
1342
|
+
"description": "Default containerWidth changed from 'standard' to 'full'; the footer no longer applies its own inline padding or max-width by default.",
|
|
1343
|
+
"v1Behavior": "SiteFooter wrapped its content in a standard Container, applying a max-width and inline padding (gutter) by default, plus 2xl vertical padding.",
|
|
1344
|
+
"v2Behavior": "SiteFooter defaults to containerWidth='full', which is now edge-to-edge (no max-width, no inline padding); the containing layout or app provides the gutter. Vertical padding is reduced to xl.",
|
|
1345
|
+
"migration": "If you relied on the footer's built-in gutter or max-width, set containerWidth explicitly (e.g. 'x-wide') or wrap the footer in your layout's container. When placing SiteFooter in AppLayout's footer slot, the region provides the inline padding.",
|
|
1346
|
+
"affectedAreas": ["SiteFooter", "Footers in app and docs layouts"]
|
|
1347
|
+
},
|
|
1159
1348
|
{
|
|
1160
1349
|
"component": "TextInput, RadioGroup, FileUpload, Combobox, ComboboxMultiselect, Select, Textarea, Checkbox, Switch, TagsInput, Datepicker",
|
|
1161
1350
|
"prop": "inputWidth",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
IndicatorBadge,
|
|
4
|
+
NavMenu,
|
|
5
|
+
RefreshChecker,
|
|
6
|
+
FlowSteps,
|
|
7
|
+
CardSelectGroup,
|
|
8
|
+
DashboardSearch,
|
|
9
|
+
SideNavCompact,
|
|
10
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
11
|
+
// Aliased import — imported name changes, local alias and JSX stay the same
|
|
12
|
+
import { IndicatorBadge as LegacyBadge } from '@pantheon-systems/pds-toolkit-react';
|
|
13
|
+
// Non-PDS import with the same name — untouched
|
|
14
|
+
import { IndicatorBadge as ThirdPartyBadge } from 'some-other-library';
|
|
15
|
+
// Deep path import — path and specifier name should both be updated
|
|
16
|
+
import { IndicatorBadge as DeepBadge } from '@pantheon-systems/pds-toolkit-react/components/badges/IndicatorBadge/IndicatorBadge';
|
|
17
|
+
// Deep path aliased import — path and imported name updated, local alias preserved
|
|
18
|
+
import { IndicatorBadge as LegacyDeepBadge } from '@pantheon-systems/pds-toolkit-react/components/badges/IndicatorBadge/IndicatorBadge';
|
|
19
|
+
|
|
20
|
+
// Non-aliased — both import specifier and JSX tags should be renamed
|
|
21
|
+
const A = () => <IndicatorBadge color='blue' label='v1 badge' />;
|
|
22
|
+
const B = () => <NavMenu ariaLabel='Main nav' menuItems={[]} />;
|
|
23
|
+
const C = () => <RefreshChecker />;
|
|
24
|
+
const D = () => <FlowSteps steps={[]} />;
|
|
25
|
+
const E = () => <CardSelectGroup options={[]} />;
|
|
26
|
+
const F = () => <DashboardSearch id='search' label='Search' siteList={[]} />;
|
|
27
|
+
const G = () => <SideNavCompact items={[]} />;
|
|
28
|
+
|
|
29
|
+
// Aliased — only the import specifier changes, JSX stays as <LegacyBadge>
|
|
30
|
+
const H = () => <LegacyBadge color='blue' label='aliased' />;
|
|
31
|
+
|
|
32
|
+
// Non-PDS import — untouched
|
|
33
|
+
const I = () => <ThirdPartyBadge />;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Badge,
|
|
4
|
+
SiteMenu,
|
|
5
|
+
StatusChecker,
|
|
6
|
+
StepList,
|
|
7
|
+
CardSelect,
|
|
8
|
+
SiteSearch,
|
|
9
|
+
TreeNav,
|
|
10
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
11
|
+
// Aliased import — imported name changes, local alias and JSX stay the same
|
|
12
|
+
import { Badge as LegacyBadge } from '@pantheon-systems/pds-toolkit-react';
|
|
13
|
+
// Non-PDS import with the same name — untouched
|
|
14
|
+
import { IndicatorBadge as ThirdPartyBadge } from 'some-other-library';
|
|
15
|
+
// Deep path import — path and specifier name should both be updated
|
|
16
|
+
import { Badge as DeepBadge } from "@pantheon-systems/pds-toolkit-react/components/badges/Badge/Badge";
|
|
17
|
+
// Deep path aliased import — path and imported name updated, local alias preserved
|
|
18
|
+
import { Badge as LegacyDeepBadge } from "@pantheon-systems/pds-toolkit-react/components/badges/Badge/Badge";
|
|
19
|
+
|
|
20
|
+
// Non-aliased — both import specifier and JSX tags should be renamed
|
|
21
|
+
const A = () => <Badge color='blue' label='v1 badge' />;
|
|
22
|
+
const B = () => <SiteMenu ariaLabel='Main nav' menuItems={[]} />;
|
|
23
|
+
const C = () => <StatusChecker />;
|
|
24
|
+
const D = () => <StepList steps={[]} />;
|
|
25
|
+
const E = () => <CardSelect options={[]} />;
|
|
26
|
+
const F = () => <SiteSearch id='search' label='Search' siteList={[]} />;
|
|
27
|
+
const G = () => <TreeNav items={[]} />;
|
|
28
|
+
|
|
29
|
+
// Aliased — only the import specifier changes, JSX stays as <LegacyBadge>
|
|
30
|
+
const H = () => <LegacyBadge color='blue' label='aliased' />;
|
|
31
|
+
|
|
32
|
+
// Non-PDS import — untouched
|
|
33
|
+
const I = () => <ThirdPartyBadge />;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IndicatorBadge, NavMenu } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// IndicatorBadge — matches --only=IndicatorBadge, should be renamed
|
|
5
|
+
const A = () => <IndicatorBadge color='blue' label='v1 badge' />;
|
|
6
|
+
|
|
7
|
+
// NavMenu — not in --only list, should be left alone
|
|
8
|
+
const B = () => <NavMenu ariaLabel='Main nav' menuItems={[]} />;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Badge, NavMenu } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// IndicatorBadge — matches --only=IndicatorBadge, should be renamed
|
|
5
|
+
const A = () => <Badge color='blue' label='v1 badge' />;
|
|
6
|
+
|
|
7
|
+
// NavMenu — not in --only list, should be left alone
|
|
8
|
+
const B = () => <NavMenu ariaLabel='Main nav' menuItems={[]} />;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// Direct renames — replaced automatically
|
|
4
|
+
const A = () => <div className='pds-button--navbar' />;
|
|
5
|
+
const B = () => <div className='pds-ts-9xl heading' />;
|
|
6
|
+
|
|
7
|
+
// Safe removal — removed automatically (product is now the default context)
|
|
8
|
+
const C = () => <div className='pds-typography--product body-text' />;
|
|
9
|
+
|
|
10
|
+
// Mixed: rename + safe removal in one className
|
|
11
|
+
const D = () => <div className='pds-button--navbar pds-typography--product foo' />;
|
|
12
|
+
|
|
13
|
+
// Template literal with direct rename
|
|
14
|
+
const E = ({ active }: { active: boolean }) => (
|
|
15
|
+
<div className={`pds-button--navbar ${active ? 'is-active' : ''}`} />
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
// Flag only — left in place, warning emitted
|
|
19
|
+
const F = () => <div className='pds-color-bg-brand header' />;
|
|
20
|
+
const G = () => <div className='pds-lead-text intro' />;
|
|
21
|
+
const H = () => <div className='pds-quote-text pullquote' />;
|
|
22
|
+
|
|
23
|
+
// JSX expression container
|
|
24
|
+
const I = () => <div className={'pds-button--navbar extra'} />;
|
|
25
|
+
|
|
26
|
+
// Already correct — should be left alone
|
|
27
|
+
const J = () => <div className='pds-button--subtle' />;
|
|
28
|
+
|
|
29
|
+
// Dynamic class — cannot transform, leave as-is
|
|
30
|
+
const cls = 'pds-button--navbar';
|
|
31
|
+
const K = () => <div className={cls} />;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// Direct renames — replaced automatically
|
|
4
|
+
const A = () => <div className="pds-button--subtle" />;
|
|
5
|
+
const B = () => <div className="pds-ts-8xl heading" />;
|
|
6
|
+
|
|
7
|
+
// Safe removal — removed automatically (product is now the default context)
|
|
8
|
+
const C = () => <div className="body-text" />;
|
|
9
|
+
|
|
10
|
+
// Mixed: rename + safe removal in one className
|
|
11
|
+
const D = () => <div className="pds-button--subtle foo" />;
|
|
12
|
+
|
|
13
|
+
// Template literal with direct rename
|
|
14
|
+
const E = ({ active }: { active: boolean }) => (
|
|
15
|
+
<div className={`pds-button--subtle ${active ? 'is-active' : ''}`} />
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
// Flag only — left in place, warning emitted
|
|
19
|
+
const F = () => <div className='pds-color-bg-brand header' />;
|
|
20
|
+
const G = () => <div className='pds-lead-text intro' />;
|
|
21
|
+
const H = () => <div className='pds-quote-text pullquote' />;
|
|
22
|
+
|
|
23
|
+
// JSX expression container
|
|
24
|
+
const I = () => <div className={"pds-button--subtle extra"} />;
|
|
25
|
+
|
|
26
|
+
// Already correct — should be left alone
|
|
27
|
+
const J = () => <div className='pds-button--subtle' />;
|
|
28
|
+
|
|
29
|
+
// Dynamic class — cannot transform, leave as-is
|
|
30
|
+
const cls = 'pds-button--navbar';
|
|
31
|
+
const K = () => <div className={cls} />;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// String literal — single class
|
|
4
|
+
const A = () => <div className='pds-overline-text' />;
|
|
5
|
+
|
|
6
|
+
// String literal — multiple classes, variant classes must not be mangled
|
|
7
|
+
const B = () => <div className='pds-overline-text--sm foo pds-overline-text--lg' />;
|
|
8
|
+
|
|
9
|
+
// String literal — old and variant together
|
|
10
|
+
const C = () => <div className='pds-overline-text pds-overline-text--sm bar' />;
|
|
11
|
+
|
|
12
|
+
// JSX expression container with string literal
|
|
13
|
+
const D = () => <div className={'pds-overline-text'} />;
|
|
14
|
+
|
|
15
|
+
// Template literal — static part
|
|
16
|
+
const E = () => <div className={`pds-overline-text extra-class`} />;
|
|
17
|
+
|
|
18
|
+
// Template literal — with interpolation
|
|
19
|
+
const F = ({ active }: { active: boolean }) => (
|
|
20
|
+
<div className={`pds-overline-text--lg ${active ? 'is-active' : ''}`} />
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Already correct — should be left alone
|
|
24
|
+
const G = () => <div className='pds-overline-m' />;
|
|
25
|
+
|
|
26
|
+
// Dynamic class — cannot transform, leave as-is
|
|
27
|
+
const cls = 'pds-overline-text';
|
|
28
|
+
const H = () => <div className={cls} />;
|
|
29
|
+
|
|
30
|
+
// Non-className attribute — should be left alone
|
|
31
|
+
const I = () => <div id='pds-overline-text' />;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// String literal — single class
|
|
4
|
+
const A = () => <div className="pds-overline-m" />;
|
|
5
|
+
|
|
6
|
+
// String literal — multiple classes, variant classes must not be mangled
|
|
7
|
+
const B = () => <div className="pds-overline-s foo pds-overline-l" />;
|
|
8
|
+
|
|
9
|
+
// String literal — old and variant together
|
|
10
|
+
const C = () => <div className="pds-overline-m pds-overline-s bar" />;
|
|
11
|
+
|
|
12
|
+
// JSX expression container with string literal
|
|
13
|
+
const D = () => <div className={"pds-overline-m"} />;
|
|
14
|
+
|
|
15
|
+
// Template literal — static part
|
|
16
|
+
const E = () => <div className={`pds-overline-m extra-class`} />;
|
|
17
|
+
|
|
18
|
+
// Template literal — with interpolation
|
|
19
|
+
const F = ({ active }: { active: boolean }) => (
|
|
20
|
+
<div className={`pds-overline-l ${active ? 'is-active' : ''}`} />
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Already correct — should be left alone
|
|
24
|
+
const G = () => <div className='pds-overline-m' />;
|
|
25
|
+
|
|
26
|
+
// Dynamic class — cannot transform, leave as-is
|
|
27
|
+
const cls = 'pds-overline-text';
|
|
28
|
+
const H = () => <div className={cls} />;
|
|
29
|
+
|
|
30
|
+
// Non-className attribute — should be left alone
|
|
31
|
+
const I = () => <div id='pds-overline-text' />;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
ButtonLink,
|
|
5
|
+
Icon,
|
|
6
|
+
IconButton,
|
|
7
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
8
|
+
// Aliased import
|
|
9
|
+
import { Icon as PdsIcon } from '@pantheon-systems/pds-toolkit-react';
|
|
10
|
+
|
|
11
|
+
// Icon component — renamed icons should be updated
|
|
12
|
+
const A = () => <Icon iconName='circlePlusOutline' />;
|
|
13
|
+
const B = () => <Icon iconName='circleMinusOutline' />;
|
|
14
|
+
const C = () => <Icon iconName='globeLine' />;
|
|
15
|
+
|
|
16
|
+
// Other PDS components using the same registry — should also be updated
|
|
17
|
+
const D = () => <Button iconName='circlePlusOutline' label='Add' />;
|
|
18
|
+
const E = () => <ButtonLink iconName='globeLine' linkContent={<a href='/'>Home</a>} />;
|
|
19
|
+
const F = () => <IconButton iconName='circleMinusOutline' label='Remove' />;
|
|
20
|
+
|
|
21
|
+
// JSX expression container — should also be updated
|
|
22
|
+
const G = () => <Icon iconName={'circlePlusOutline'} />;
|
|
23
|
+
|
|
24
|
+
// Aliased import — should still be updated
|
|
25
|
+
const H = () => <PdsIcon iconName='globeLine' />;
|
|
26
|
+
|
|
27
|
+
// Already correct — should be left alone
|
|
28
|
+
const I = () => <Icon iconName='circlePlus' />;
|
|
29
|
+
|
|
30
|
+
// Dynamic value — cannot transform, leave as-is
|
|
31
|
+
const myIcon = 'circlePlusOutline';
|
|
32
|
+
const J = () => <Icon iconName={myIcon} />;
|
|
33
|
+
|
|
34
|
+
// Non-PDS component — should be left alone
|
|
35
|
+
const K = () => <div iconName='circlePlusOutline' />;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
ButtonLink,
|
|
5
|
+
Icon,
|
|
6
|
+
IconButton,
|
|
7
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
8
|
+
// Aliased import
|
|
9
|
+
import { Icon as PdsIcon } from '@pantheon-systems/pds-toolkit-react';
|
|
10
|
+
|
|
11
|
+
// Icon component — renamed icons should be updated
|
|
12
|
+
const A = () => <Icon iconName="circlePlus" />;
|
|
13
|
+
const B = () => <Icon iconName="circleMinus" />;
|
|
14
|
+
const C = () => <Icon iconName="globe" />;
|
|
15
|
+
|
|
16
|
+
// Other PDS components using the same registry — should also be updated
|
|
17
|
+
const D = () => <Button iconName="circlePlus" label='Add' />;
|
|
18
|
+
const E = () => <ButtonLink iconName="globe" linkContent={<a href='/'>Home</a>} />;
|
|
19
|
+
const F = () => <IconButton iconName="circleMinus" label='Remove' />;
|
|
20
|
+
|
|
21
|
+
// JSX expression container — should also be updated
|
|
22
|
+
const G = () => <Icon iconName={"circlePlus"} />;
|
|
23
|
+
|
|
24
|
+
// Aliased import — should still be updated
|
|
25
|
+
const H = () => <PdsIcon iconName="globe" />;
|
|
26
|
+
|
|
27
|
+
// Already correct — should be left alone
|
|
28
|
+
const I = () => <Icon iconName='circlePlus' />;
|
|
29
|
+
|
|
30
|
+
// Dynamic value — cannot transform, leave as-is
|
|
31
|
+
const myIcon = 'circlePlusOutline';
|
|
32
|
+
const J = () => <Icon iconName={myIcon} />;
|
|
33
|
+
|
|
34
|
+
// Non-PDS component — should be left alone
|
|
35
|
+
const K = () => <div iconName='circlePlusOutline' />;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon, Button } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// Icon — matches --only=Icon, should be updated
|
|
5
|
+
const A = () => <Icon iconName='circlePlusOutline' />;
|
|
6
|
+
|
|
7
|
+
// Button — not in --only list, should be left alone
|
|
8
|
+
const B = () => <Button iconName='circlePlusOutline' label='Add' />;
|