@pantheon-systems/pds-toolkit-react 2.0.0-alpha.4 → 2.0.0-alpha.41
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/bin/pds-codemod.cjs +58 -0
- package/codemods/v1-to-v2/mappings.json +1602 -0
- 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.input.tsx +36 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.output.tsx +36 -0
- 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 +16 -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 +143 -0
- package/codemods/v1-to-v2/transforms/removed-prop-values.js +206 -0
- package/dist/components/Avatar/Avatar.d.ts +6 -2
- package/dist/components/Callout/Callout.d.ts +6 -2
- package/dist/components/CodeBlock/CodeBlock.d.ts +10 -5
- package/dist/components/CodeBlock/code-examples.d.ts +2 -1
- package/dist/components/CodeBlock/themes/index.d.ts +1 -2
- package/dist/components/CodeBlock/themes/{pdsDark.d.ts → pds.d.ts} +1 -1
- package/dist/components/ComparisonList/ComparisonList.d.ts +6 -1
- package/dist/components/Dropdown/Dropdown.d.ts +186 -0
- package/dist/components/Dropdown/DropdownSelectedIcon.d.ts +7 -0
- package/dist/components/FileDiff/FileDiff.d.ts +2 -2
- package/dist/components/IdentityBlock/IdentityBlock.d.ts +37 -0
- package/dist/components/PantheonLogo/PantheonLogo.d.ts +5 -4
- package/dist/components/Popover/Popover.d.ts +5 -1
- package/dist/components/SiteFooter/SiteFooter.d.ts +41 -0
- package/dist/components/{navigation/DashboardSearch/DashboardSearch.d.ts → SiteSearch/SiteSearch.d.ts} +6 -11
- package/dist/components/SortableList/SortableList.d.ts +8 -0
- package/dist/components/SortableList/SortableListHeader.d.ts +7 -0
- package/dist/components/SortableList/SortableRow.d.ts +16 -0
- package/dist/components/SortableList/sortable-utils.d.ts +19 -0
- package/dist/components/SortableList/types.d.ts +142 -0
- package/dist/components/SortableList/useSortableTree.d.ts +18 -0
- package/dist/components/{RefreshChecker/RefreshChecker.d.ts → StatusChecker/StatusChecker.d.ts} +5 -19
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +8 -5
- package/dist/components/Table/Table.d.ts +247 -17
- package/dist/components/TableOfContents/TableOfContents.d.ts +1 -5
- package/dist/components/Tag/Tag.d.ts +17 -3
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +29 -8
- package/dist/components/Tooltip/Tooltip.d.ts +6 -2
- package/dist/components/UtilityBar/UtilityBar.d.ts +26 -0
- package/dist/components/badges/Badge/Badge.d.ts +28 -0
- package/dist/components/badges/StatusBadge/StatusBadge.d.ts +2 -1
- package/dist/components/buttons/Button/Button.d.ts +15 -0
- package/dist/components/buttons/ButtonLink/ButtonLink.d.ts +1 -3
- package/dist/components/buttons/ClipboardButton/ClipboardButton.d.ts +5 -1
- package/dist/components/buttons/CloseButton/CloseButton.d.ts +4 -4
- package/dist/components/buttons/FilterButton/FilterButton.d.ts +82 -0
- package/dist/components/buttons/IconButton/IconButton.d.ts +12 -0
- package/dist/components/buttons/MenuButton/MenuButton.d.ts +21 -13
- package/dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +44 -8
- package/dist/components/cards/ActionCard/ActionCard.d.ts +64 -0
- package/dist/components/cards/Card/Card.d.ts +11 -4
- package/dist/components/cards/{CardSelectGroup/CardSelectGroup.d.ts → CardSelect/CardSelect.d.ts} +13 -8
- package/dist/components/charts/BarChart/BarChart.d.ts +21 -0
- package/dist/components/charts/LineChart/LineChart.d.ts +22 -0
- package/dist/components/charts/PieChart/PieChart.d.ts +59 -0
- package/dist/components/charts/ProportionBar/ProportionBar.d.ts +57 -0
- package/dist/components/charts/shared/ChartAccessibleTable.d.ts +17 -0
- package/dist/components/charts/shared/ChartLegend.d.ts +25 -0
- package/dist/components/charts/shared/ChartSkeleton.d.ts +11 -0
- package/dist/components/charts/shared/chart-colors.d.ts +30 -0
- package/dist/components/charts/shared/chart-styles.d.ts +16 -0
- package/dist/components/charts/shared/formatters.d.ts +12 -0
- package/dist/components/charts/shared/types.d.ts +128 -0
- package/dist/components/empty-states/HorizontalEmptyState/HorizontalEmptyState.d.ts +1 -1
- package/dist/components/icons/Icon/Icon.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 +191 -16
- package/dist/components/icons/PaymentIcon/PaymentIcon.d.ts +7 -3
- package/dist/components/icons/PlatformIcon/PlatformIcon.d.ts +6 -6
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/inputs/Combobox/Combobox.d.ts +17 -7
- package/dist/components/inputs/ComboboxMultiselect/ComboboxMultiselect.d.ts +10 -5
- package/dist/components/inputs/Datepicker/Datepicker.d.ts +31 -8
- package/dist/components/inputs/FileUpload/FileUpload.d.ts +6 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/inputs/Select/Select.d.ts +11 -2
- package/dist/components/inputs/Select/select-sample-data.d.ts +1 -0
- package/dist/components/inputs/Switch/Switch.d.ts +1 -17
- package/dist/components/inputs/TagsInput/TagsInput.d.ts +6 -1
- package/dist/components/inputs/TextInput/TextInput.d.ts +5 -1
- package/dist/components/inputs/Textarea/Textarea.d.ts +5 -1
- package/dist/components/inputs/input-utilities.d.ts +5 -4
- package/dist/components/{CTALink → links/CTALink}/CTALink.d.ts +1 -1
- package/dist/components/{LinkNewWindow → links/LinkNewWindow}/LinkNewWindow.d.ts +1 -1
- package/dist/components/loading-indicators/Spinner/Spinner.d.ts +5 -4
- package/dist/components/navigation/ButtonNav/ButtonNav.d.ts +5 -5
- package/dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +1 -0
- package/dist/components/navigation/Navbar/Navbar.d.ts +9 -21
- package/dist/components/navigation/SideNav/SideNav.d.ts +7 -1
- package/dist/components/navigation/SideNavGlobal/SideNavGlobal.d.ts +5 -15
- package/dist/components/navigation/SideNavGlobal/SideNavGlobalItem.d.ts +15 -1
- package/dist/components/navigation/SiteMenu/SiteMenu.d.ts +26 -0
- package/dist/components/navigation/SiteMenu/SiteMenuDropdown.d.ts +23 -0
- package/dist/components/navigation/TreeNav/TreeNav.d.ts +48 -0
- package/dist/components/navigation/UserMenu/UserMenu.d.ts +20 -5
- package/dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +2 -17
- package/dist/components/navigation/navigation-utilities.d.ts +12 -0
- package/dist/components/notifications/Banner/Banner.d.ts +6 -2
- package/dist/components/notifications/SectionMessage/SectionMessage.d.ts +6 -2
- package/dist/components/notifications/Toaster/Toast.d.ts +12 -1
- package/dist/components/notifications/Toaster/Toaster.d.ts +16 -7
- package/dist/components/notifications/Toaster/useToast.d.ts +2 -0
- package/dist/components/overlays/Drawer/Drawer.d.ts +58 -0
- package/dist/components/overlays/FullScreenOverlay/FullScreenOverlay.d.ts +45 -0
- package/dist/components/{Modal → overlays/Modal}/Modal.d.ts +1 -1
- package/dist/components/{Pagination → pagination/Pagination}/Pagination.d.ts +7 -2
- package/dist/components/pagination/PaginationCompact/PaginationCompact.d.ts +49 -0
- package/dist/components/pagination/PaginationMini/PaginationMini.d.ts +55 -0
- package/dist/components/panels/ExpansionPanel/ExpansionPanel.d.ts +1 -2
- package/dist/components/panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +1 -2
- package/dist/components/panels/Panel/Panel.d.ts +4 -21
- package/dist/components/panels/PanelList/PanelList.d.ts +1 -1
- package/dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +4 -5
- package/dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +12 -4
- package/dist/components/{FlowSteps/FlowSteps.d.ts → steppers/StepList/StepList.d.ts} +7 -7
- package/dist/css/component-css/pds-action-card.css +1 -0
- package/dist/css/component-css/pds-avatar.css +1 -1
- package/dist/css/component-css/pds-badge.css +1 -0
- package/dist/css/component-css/pds-banner.css +1 -1
- package/dist/css/component-css/pds-bar-chart.css +1 -0
- package/dist/css/component-css/pds-branch-diff.css +1 -1
- package/dist/css/component-css/pds-breadcrumb.css +1 -1
- package/dist/css/component-css/pds-button-link.css +1 -1
- package/dist/css/component-css/pds-button-nav.css +1 -1
- package/dist/css/component-css/pds-button.css +44 -12
- package/dist/css/component-css/pds-callout.css +1 -1
- package/dist/css/component-css/pds-card-select.css +1 -0
- package/dist/css/component-css/pds-card.css +1 -1
- package/dist/css/component-css/pds-chart-legend.css +1 -0
- package/dist/css/component-css/pds-chart-wrapper.css +1 -0
- 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-code-block.css +1 -1
- package/dist/css/component-css/pds-combobox-multiselect.css +3 -2
- package/dist/css/component-css/pds-combobox.css +1 -1
- package/dist/css/component-css/pds-compact-empty-state.css +1 -1
- package/dist/css/component-css/pds-comparison-list.css +1 -1
- package/dist/css/component-css/pds-cta-link.css +1 -1
- package/dist/css/component-css/pds-datepicker.css +5 -3
- package/dist/css/component-css/pds-drawer.css +1 -0
- package/dist/css/component-css/pds-dropdown-menu.css +2 -2
- package/dist/css/component-css/pds-dropdown.css +2 -0
- package/dist/css/component-css/pds-expansion-panel.css +1 -1
- package/dist/css/component-css/pds-file-diff.css +1 -1
- package/dist/css/component-css/pds-file-upload.css +3 -3
- package/dist/css/component-css/pds-filter-button.css +1 -0
- package/dist/css/component-css/pds-full-screen-overlay.css +1 -0
- package/dist/css/component-css/pds-horizontal-empty-state.css +1 -1
- package/dist/css/component-css/pds-icon-button.css +6 -4
- package/dist/css/component-css/pds-icon.css +1 -1
- package/dist/css/component-css/pds-identity-block.css +1 -0
- package/dist/css/component-css/pds-index.css +150 -70
- package/dist/css/component-css/pds-inline-message.css +1 -1
- package/dist/css/component-css/pds-input-group.css +1 -1
- package/dist/css/component-css/pds-input-utilities.css +1 -1
- package/dist/css/component-css/pds-line-chart.css +1 -0
- package/dist/css/component-css/pds-link-new-window.css +1 -1
- package/dist/css/component-css/pds-menu-button.css +7 -1
- package/dist/css/component-css/pds-modal.css +1 -1
- package/dist/css/component-css/pds-nav-menu.css +1 -5
- package/dist/css/component-css/pds-navbar.css +4 -1
- package/dist/css/component-css/pds-pagination-compact.css +1 -0
- package/dist/css/component-css/pds-pagination-mini.css +3 -0
- package/dist/css/component-css/pds-pagination.css +1 -1
- package/dist/css/component-css/pds-panel-list.css +1 -1
- package/dist/css/component-css/pds-panel.css +1 -1
- package/dist/css/component-css/pds-pantheon-logo.css +1 -1
- package/dist/css/component-css/pds-payment-icon.css +1 -1
- package/dist/css/component-css/pds-pie-chart.css +1 -0
- package/dist/css/component-css/pds-platform-icon.css +1 -1
- package/dist/css/component-css/pds-popover.css +1 -1
- package/dist/css/component-css/pds-progress-bar.css +1 -1
- package/dist/css/component-css/pds-progress-ring.css +1 -1
- package/dist/css/component-css/pds-proportion-bar.css +1 -0
- package/dist/css/component-css/pds-radio-group.css +1 -1
- package/dist/css/component-css/pds-section-message.css +1 -1
- package/dist/css/component-css/pds-segmented-button.css +2 -1
- package/dist/css/component-css/pds-select.css +1 -1
- package/dist/css/component-css/pds-side-nav-global.css +2 -4
- package/dist/css/component-css/pds-side-nav.css +3 -1
- package/dist/css/component-css/pds-site-footer.css +1 -1
- package/dist/css/component-css/pds-site-search.css +1 -0
- package/dist/css/component-css/pds-skeleton.css +1 -1
- package/dist/css/component-css/pds-skiplink.css +1 -1
- package/dist/css/component-css/pds-sortable-list.css +8 -0
- package/dist/css/component-css/pds-spinner.css +1 -1
- package/dist/css/component-css/pds-split-button.css +1 -1
- package/dist/css/component-css/pds-sso-button.css +1 -1
- package/dist/css/component-css/pds-status-badge.css +1 -1
- package/dist/css/component-css/pds-status-checker.css +1 -0
- package/dist/css/component-css/pds-status-indicator.css +1 -1
- package/dist/css/component-css/pds-step-list.css +1 -0
- package/dist/css/component-css/pds-stepper.css +3 -1
- package/dist/css/component-css/pds-switch.css +4 -11
- package/dist/css/component-css/pds-tab-menu.css +2 -2
- package/dist/css/component-css/pds-table-of-contents.css +1 -1
- package/dist/css/component-css/pds-table.css +3 -1
- package/dist/css/component-css/pds-tabs.css +1 -1
- package/dist/css/component-css/pds-tag.css +1 -1
- package/dist/css/component-css/pds-tags-input.css +1 -1
- package/dist/css/component-css/pds-tally.css +1 -1
- package/dist/css/component-css/pds-text-input.css +1 -1
- package/dist/css/component-css/pds-textarea.css +1 -1
- package/dist/css/component-css/pds-theme-switcher.css +1 -1
- package/dist/css/component-css/pds-toaster.css +1 -1
- package/dist/css/component-css/pds-tooltip.css +1 -1
- package/dist/css/component-css/pds-tree-nav.css +1 -0
- package/dist/css/component-css/pds-user-menu.css +32 -1
- package/dist/css/component-css/pds-utility-bar.css +1 -0
- package/dist/css/component-css/pds-utility-button.css +3 -1
- package/dist/css/component-css/pds-vertical-empty-state.css +1 -1
- package/dist/css/component-css/pds-vertical-stepper.css +1 -1
- package/dist/css/component-css/pds-workspace-selector.css +26 -1
- package/dist/css/design-tokens/variables.dark.css +405 -239
- package/dist/css/design-tokens/variables.global.css +8 -15
- package/dist/css/design-tokens/variables.light.css +361 -217
- package/dist/css/design-tokens/variables.typography.css +3 -2
- package/dist/css/layout-css/pds-app-layout.css +6 -2
- package/dist/css/layout-css/pds-docs-layout.css +1 -1
- package/dist/css/layout-css/pds-index.css +6 -9
- package/dist/css/layout-css/pds-sidebar-layout.css +5 -0
- package/dist/css/layout-css/pds-stepper-layout.css +1 -1
- package/dist/css/pds-components.css +150 -70
- package/dist/css/pds-core.css +3 -2
- package/dist/css/pds-layouts.css +6 -9
- package/dist/index.css +1 -1
- package/dist/index.d.ts +95 -6
- package/dist/index.js +12112 -4520
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +39 -42
- package/dist/layouts/AppLayout/AppLayout.d.ts +68 -7
- package/dist/layouts/DocsLayout/DocsLayout.d.ts +9 -7
- package/dist/layouts/SidebarLayout/SidebarLayout.d.ts +16 -6
- package/dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +3 -3
- package/dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +3 -3
- package/dist/libs/components/NavAccordion/NavAccordion.d.ts +27 -0
- package/dist/libs/components/StatusDot/StatusDot.d.ts +15 -0
- package/dist/libs/components/utils.d.ts +0 -1
- package/dist/libs/types/custom-types.d.ts +12 -6
- package/dist/libs/types/layout-types.d.ts +2 -1
- package/dist/libs/types/navigation-types.d.ts +9 -1
- package/dist/svg/anglesDown.svg +3 -0
- package/dist/svg/anglesUp.svg +3 -0
- package/dist/svg/barsStaggered.svg +3 -0
- package/dist/svg/circleExclamationSolid.svg +3 -0
- package/dist/svg/circleHalfStroke.svg +3 -0
- package/dist/svg/circleInfoSolid.svg +3 -0
- package/dist/svg/circleQuestionSolid.svg +3 -0
- package/dist/svg/claude.svg +3 -0
- package/dist/svg/clock.svg +3 -0
- package/dist/svg/collapseToCenter.svg +3 -0
- package/dist/svg/compress.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/landmark.svg +3 -0
- package/dist/svg/locationCrosshairs.svg +3 -0
- package/dist/svg/move.svg +3 -0
- package/dist/svg/octagonExclamation.svg +3 -0
- package/dist/svg/openai.svg +3 -0
- package/dist/svg/pause.svg +3 -0
- package/dist/svg/sidebar.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/svg/userSolid.svg +3 -0
- package/dist/{layouts → utilities}/FlexContainer/FlexContainer.d.ts +6 -6
- package/dist/utilities/GlobalWrapper/GlobalWrapper.d.ts +21 -0
- package/dist/utilities/grid/Grid.d.ts +58 -0
- package/dist/utilities/grid/GridItem.d.ts +57 -0
- package/dist/utilities/hooks/useDropdown/index.d.ts +1 -0
- package/dist/utilities/hooks/useDropdown/useDropdown.d.ts +121 -0
- package/package.json +68 -41
- package/tailwind/README.md +220 -0
- package/tailwind/TESTING.md +457 -0
- package/tailwind/v3/preset.cjs +258 -0
- package/tailwind/v4/theme.css +230 -0
- package/dist/components/CTASlice/CTASlice.d.ts +0 -43
- package/dist/components/CodeBlock/themes/pdsLight.d.ts +0 -2
- package/dist/components/DashboardStat/DashboardStat.d.ts +0 -28
- package/dist/components/PullQuote/PullQuote.d.ts +0 -34
- package/dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +0 -62
- package/dist/components/SocialLinks/SocialLinks.d.ts +0 -23
- package/dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +0 -27
- package/dist/components/cards/CardHeading/CardHeading.d.ts +0 -31
- package/dist/components/cards/EmptyStateCard/EmptyStateCard.d.ts +0 -36
- package/dist/components/cards/LinksCard/LinksCard.d.ts +0 -29
- package/dist/components/cards/LinksCard/links-card-sample-data.d.ts +0 -2
- package/dist/components/cards/NewSiteCard/NewSiteCard.d.ts +0 -61
- package/dist/components/cards/PaymentCard/PaymentCard.d.ts +0 -47
- package/dist/components/cards/PricingCard/PricingCard.d.ts +0 -90
- package/dist/components/cards/SiteCard/SiteCard.d.ts +0 -50
- package/dist/components/footer/FooterHeading/FooterHeading.d.ts +0 -22
- package/dist/components/footer/FooterLinks/FooterLinks.d.ts +0 -26
- package/dist/components/footer/SiteFooter/SiteFooter.d.ts +0 -30
- package/dist/components/footer/SiteFooter/footer-content.d.ts +0 -1
- package/dist/components/navigation/DashboardNav/DashboardNav.d.ts +0 -35
- package/dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +0 -24
- package/dist/components/navigation/NavMenu/NavMenu.d.ts +0 -33
- package/dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +0 -24
- package/dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +0 -53
- package/dist/components/notifications/NotificationHubIcon/NotificationHubIcon.d.ts +0 -38
- package/dist/components/notifications/NotificationsPopover/NotificationsPopover.d.ts +0 -118
- package/dist/components/tiles/AvatarTileList/AvatarTileList.d.ts +0 -28
- package/dist/components/tiles/Tile/Tile.d.ts +0 -42
- package/dist/components/tiles/TileGrid/TileGrid.d.ts +0 -29
- package/dist/css/component-css/pds-avatar-tile-list.css +0 -1
- package/dist/css/component-css/pds-card-heading.css +0 -1
- package/dist/css/component-css/pds-card-select-group.css +0 -1
- package/dist/css/component-css/pds-cta-slice.css +0 -1
- package/dist/css/component-css/pds-dashboard-nav.css +0 -5
- package/dist/css/component-css/pds-dashboard-search.css +0 -1
- package/dist/css/component-css/pds-dashboard-stat.css +0 -1
- package/dist/css/component-css/pds-empty-state-card.css +0 -1
- package/dist/css/component-css/pds-flow-steps.css +0 -1
- package/dist/css/component-css/pds-footer-heading.css +0 -1
- package/dist/css/component-css/pds-footer-links.css +0 -1
- package/dist/css/component-css/pds-indicator-badge.css +0 -25
- package/dist/css/component-css/pds-links-card.css +0 -1
- package/dist/css/component-css/pds-new-site-card.css +0 -1
- package/dist/css/component-css/pds-notification-hub-icon.css +0 -1
- package/dist/css/component-css/pds-notifications-popover.css +0 -1
- package/dist/css/component-css/pds-payment-card.css +0 -1
- package/dist/css/component-css/pds-pricing-card-local.css +0 -1
- package/dist/css/component-css/pds-pricing-card.css +0 -1
- package/dist/css/component-css/pds-pull-quote.css +0 -1
- package/dist/css/component-css/pds-refresh-checker.css +0 -1
- package/dist/css/component-css/pds-side-nav-compact.css +0 -1
- package/dist/css/component-css/pds-site-card.css +0 -1
- package/dist/css/component-css/pds-site-dashboard-heading.css +0 -1
- package/dist/css/component-css/pds-social-links.css +0 -1
- package/dist/css/component-css/pds-tile.css +0 -1
- package/dist/css/component-css/pds-tiles-common.css +0 -1
- package/dist/css/layout-css/pds-dashboard-global.css +0 -8
- package/dist/css/layout-css/pds-dashboard-inner.css +0 -1
- package/dist/css/layout-css/pds-flex-container.css +0 -1
- package/dist/layouts/DashboardGlobal/DashboardGlobal.d.ts +0 -57
- package/dist/layouts/DashboardInner/DashboardInner.d.ts +0 -30
- package/dist/layouts/GlobalWrapper/GlobalWrapper.d.ts +0 -19
- package/dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +0 -6
- /package/dist/components/{Skiplink → links/Skiplink}/Skiplink.d.ts +0 -0
- /package/dist/components/{Picture → media/Picture}/Picture.d.ts +0 -0
- /package/dist/components/{VideoEmbed → media/VideoEmbed}/VideoEmbed.d.ts +0 -0
- /package/dist/components/{Pagination → pagination/Pagination}/usePagination.d.ts +0 -0
- /package/dist/components/{FlowSteps → steppers/StepList}/example-steps.d.ts +0 -0
- /package/dist/svg/{linkSimple.svg → link.svg} +0 -0
- /package/dist/svg/{linkSimpleSlash.svg → unlink.svg} +0 -0
- /package/dist/{layouts → utilities}/Container/Container.d.ts +0 -0
|
@@ -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' />;
|
|
@@ -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="circlePlus" />;
|
|
6
|
+
|
|
7
|
+
// Button — not in --only list, should be left alone
|
|
8
|
+
const B = () => <Button iconName='circlePlusOutline' label='Add' />;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
CloseButton,
|
|
5
|
+
FileDiff,
|
|
6
|
+
GlobalWrapper,
|
|
7
|
+
Icon,
|
|
8
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
9
|
+
// Aliased import
|
|
10
|
+
import { Icon as PdsIcon } from '@pantheon-systems/pds-toolkit-react';
|
|
11
|
+
|
|
12
|
+
// Simple renames
|
|
13
|
+
const A = () => <Button isLoading />;
|
|
14
|
+
const B = () => <GlobalWrapper mobileMenuMaxWidth={767} />;
|
|
15
|
+
const C = () => <FileDiff labelStrings={{ add: 'Added', remove: 'Removed' }} />;
|
|
16
|
+
|
|
17
|
+
// Same old prop name, different components — both should rename
|
|
18
|
+
const D = () => <Icon iconSize='m' iconName='star' />;
|
|
19
|
+
const E = () => <CloseButton iconSize='l' />;
|
|
20
|
+
|
|
21
|
+
// Aliased import — should still rename
|
|
22
|
+
const F = () => <PdsIcon iconSize='s' iconName='gear' />;
|
|
23
|
+
|
|
24
|
+
// Already correct — should be left alone
|
|
25
|
+
const G = () => <Button isWorking />;
|
|
26
|
+
|
|
27
|
+
// Non-PDS component — should be left alone
|
|
28
|
+
const H = () => <div isLoading />;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
CloseButton,
|
|
5
|
+
FileDiff,
|
|
6
|
+
GlobalWrapper,
|
|
7
|
+
Icon,
|
|
8
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
9
|
+
// Aliased import
|
|
10
|
+
import { Icon as PdsIcon } from '@pantheon-systems/pds-toolkit-react';
|
|
11
|
+
|
|
12
|
+
// Simple renames
|
|
13
|
+
const A = () => <Button isWorking />;
|
|
14
|
+
const B = () => <GlobalWrapper mobileMaxWidth={767} />;
|
|
15
|
+
const C = () => <FileDiff translationStrings={{ add: 'Added', remove: 'Removed' }} />;
|
|
16
|
+
|
|
17
|
+
// Same old prop name, different components — both should rename
|
|
18
|
+
const D = () => <Icon size='m' iconName='star' />;
|
|
19
|
+
const E = () => <CloseButton size='l' />;
|
|
20
|
+
|
|
21
|
+
// Aliased import — should still rename
|
|
22
|
+
const F = () => <PdsIcon size='s' iconName='gear' />;
|
|
23
|
+
|
|
24
|
+
// Already correct — should be left alone
|
|
25
|
+
const G = () => <Button isWorking />;
|
|
26
|
+
|
|
27
|
+
// Non-PDS component — should be left alone
|
|
28
|
+
const H = () => <div isLoading />;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Icon } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// Button — matches --only=Button, should be renamed
|
|
5
|
+
const A = () => <Button isLoading />;
|
|
6
|
+
|
|
7
|
+
// Icon — not in --only list, should be left alone
|
|
8
|
+
const B = () => <Icon iconSize='m' iconName='star' />;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Icon } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// Button — matches --only=Button, should be renamed
|
|
5
|
+
const A = () => <Button isWorking />;
|
|
6
|
+
|
|
7
|
+
// Icon — not in --only list, should be left alone
|
|
8
|
+
const B = () => <Icon iconSize='m' iconName='star' />;
|
package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.input.tsx
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Spinner,
|
|
4
|
+
Avatar,
|
|
5
|
+
StatusIndicator,
|
|
6
|
+
Badge,
|
|
7
|
+
Tooltip,
|
|
8
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
9
|
+
import { IconButton as PdsIconButton } from '@pantheon-systems/pds-toolkit-react';
|
|
10
|
+
|
|
11
|
+
// String literals — should be updated
|
|
12
|
+
const A = () => <Spinner size='sm' />;
|
|
13
|
+
const B = () => <Spinner size='md' />;
|
|
14
|
+
const C = () => <Spinner size='lg' />;
|
|
15
|
+
const D = () => <Avatar size='sm' />;
|
|
16
|
+
const E = () => <Avatar size='lg' />;
|
|
17
|
+
// StatusIndicator has a different mapping: sm→xs, md→s
|
|
18
|
+
const F = () => <StatusIndicator size='sm' />;
|
|
19
|
+
const G = () => <StatusIndicator size='md' />;
|
|
20
|
+
// Aliased import
|
|
21
|
+
const H = () => <PdsIconButton size='sm' />;
|
|
22
|
+
|
|
23
|
+
// JSX expression container — should also be updated
|
|
24
|
+
const I = () => <Badge size={'sm'} />;
|
|
25
|
+
|
|
26
|
+
// Already correct — should be left alone
|
|
27
|
+
const J = () => <Spinner size='s' />;
|
|
28
|
+
// Variable — cannot be transformed at compile time, leave as-is
|
|
29
|
+
const mySize = 'sm';
|
|
30
|
+
const K = () => <Spinner size={mySize} />;
|
|
31
|
+
|
|
32
|
+
// Non-PDS component — should be left alone
|
|
33
|
+
const L = () => <div size='sm' />;
|
|
34
|
+
|
|
35
|
+
// Tooltip uses a different prop name: triggerIconSize
|
|
36
|
+
const M = () => <Tooltip triggerIconSize='sm' />;
|
package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.output.tsx
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Spinner,
|
|
4
|
+
Avatar,
|
|
5
|
+
StatusIndicator,
|
|
6
|
+
Badge,
|
|
7
|
+
Tooltip,
|
|
8
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
9
|
+
import { IconButton as PdsIconButton } from '@pantheon-systems/pds-toolkit-react';
|
|
10
|
+
|
|
11
|
+
// String literals — should be updated
|
|
12
|
+
const A = () => <Spinner size="s" />;
|
|
13
|
+
const B = () => <Spinner size="m" />;
|
|
14
|
+
const C = () => <Spinner size="l" />;
|
|
15
|
+
const D = () => <Avatar size="s" />;
|
|
16
|
+
const E = () => <Avatar size="m" />;
|
|
17
|
+
// StatusIndicator has a different mapping: sm→xs, md→s
|
|
18
|
+
const F = () => <StatusIndicator size="xs" />;
|
|
19
|
+
const G = () => <StatusIndicator size="s" />;
|
|
20
|
+
// Aliased import
|
|
21
|
+
const H = () => <PdsIconButton size="s" />;
|
|
22
|
+
|
|
23
|
+
// JSX expression container — should also be updated
|
|
24
|
+
const I = () => <Badge size={"s"} />;
|
|
25
|
+
|
|
26
|
+
// Already correct — should be left alone
|
|
27
|
+
const J = () => <Spinner size='s' />;
|
|
28
|
+
// Variable — cannot be transformed at compile time, leave as-is
|
|
29
|
+
const mySize = 'sm';
|
|
30
|
+
const K = () => <Spinner size={mySize} />;
|
|
31
|
+
|
|
32
|
+
// Non-PDS component — should be left alone
|
|
33
|
+
const L = () => <div size='sm' />;
|
|
34
|
+
|
|
35
|
+
// Tooltip uses a different prop name: triggerIconSize
|
|
36
|
+
const M = () => <Tooltip triggerIconSize="s" />;
|
package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/only.input.tsx
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Spinner,
|
|
4
|
+
Avatar,
|
|
5
|
+
StatusIndicator,
|
|
6
|
+
Badge,
|
|
7
|
+
Tooltip,
|
|
8
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
9
|
+
import { IconButton as PdsIconButton } from '@pantheon-systems/pds-toolkit-react';
|
|
10
|
+
|
|
11
|
+
// Spinner — matches --only=Spinner, should be updated
|
|
12
|
+
const A = () => <Spinner size='sm' />;
|
|
13
|
+
const B = () => <Spinner size='md' />;
|
|
14
|
+
const C = () => <Spinner size='lg' />;
|
|
15
|
+
|
|
16
|
+
// Other PDS components — not in --only list, should be left alone
|
|
17
|
+
const D = () => <Avatar size='sm' />;
|
|
18
|
+
const E = () => <StatusIndicator size='sm' />;
|
|
19
|
+
const F = () => <Badge size={'sm'} />;
|
|
20
|
+
const G = () => <PdsIconButton size='sm' />;
|
|
21
|
+
const H = () => <Tooltip triggerIconSize='sm' />;
|
package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/only.output.tsx
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Spinner,
|
|
4
|
+
Avatar,
|
|
5
|
+
StatusIndicator,
|
|
6
|
+
Badge,
|
|
7
|
+
Tooltip,
|
|
8
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
9
|
+
import { IconButton as PdsIconButton } from '@pantheon-systems/pds-toolkit-react';
|
|
10
|
+
|
|
11
|
+
// Spinner — matches --only=Spinner, should be updated
|
|
12
|
+
const A = () => <Spinner size="s" />;
|
|
13
|
+
const B = () => <Spinner size="m" />;
|
|
14
|
+
const C = () => <Spinner size="l" />;
|
|
15
|
+
|
|
16
|
+
// Other PDS components — not in --only list, should be left alone
|
|
17
|
+
const D = () => <Avatar size='sm' />;
|
|
18
|
+
const E = () => <StatusIndicator size='sm' />;
|
|
19
|
+
const F = () => <Badge size={'sm'} />;
|
|
20
|
+
const G = () => <PdsIconButton size='sm' />;
|
|
21
|
+
const H = () => <Tooltip triggerIconSize='sm' />;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Avatar,
|
|
4
|
+
Button,
|
|
5
|
+
Card,
|
|
6
|
+
CodeBlock,
|
|
7
|
+
IconButton,
|
|
8
|
+
MenuButton,
|
|
9
|
+
Panel,
|
|
10
|
+
Spinner,
|
|
11
|
+
Switch,
|
|
12
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
13
|
+
|
|
14
|
+
// Value rewrites — prop stays, value changes
|
|
15
|
+
const A = () => <Button variant='brand-secondary'>Click</Button>;
|
|
16
|
+
const B = () => <Button variant='navbar'>Click</Button>;
|
|
17
|
+
const C = () => (
|
|
18
|
+
<MenuButton variant='navbar' id='menu' label='Menu' menuItems={[]} />
|
|
19
|
+
);
|
|
20
|
+
const D = () => (
|
|
21
|
+
<IconButton variant='critical-hover' iconName='x' label='Close' />
|
|
22
|
+
);
|
|
23
|
+
const E = () => <Avatar size='xl' />;
|
|
24
|
+
|
|
25
|
+
// JSX expression container value rewrite
|
|
26
|
+
const F = () => <Button variant={'brand-secondary'}>Click</Button>;
|
|
27
|
+
|
|
28
|
+
// Unconditional prop removals
|
|
29
|
+
const G = () => <Spinner colorType='full-color' />;
|
|
30
|
+
const H = () => <CodeBlock colorType='dark' />;
|
|
31
|
+
const I = () => (
|
|
32
|
+
<Panel
|
|
33
|
+
hasStatusIndicator
|
|
34
|
+
statusType='success'
|
|
35
|
+
typeLabels={{ success: 'OK' }}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
const J = () => (
|
|
39
|
+
<Switch
|
|
40
|
+
showStatusLabel
|
|
41
|
+
statusLabelPlacement='end'
|
|
42
|
+
onLabel='On'
|
|
43
|
+
offLabel='Off'
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// Conditional removal — remove only deprecated gradient values, leave valid values alone
|
|
48
|
+
const K = () => <Card background='mint-gradient' />;
|
|
49
|
+
const L = () => <Card background='sundown-gradient' />;
|
|
50
|
+
const M = () => <Card background='default' />;
|
|
51
|
+
|
|
52
|
+
// Already correct — should be left alone
|
|
53
|
+
const N = () => <Button variant='secondary'>Click</Button>;
|
|
54
|
+
|
|
55
|
+
// Non-PDS component — should be left alone
|
|
56
|
+
const O = () => <div variant='brand-secondary' />;
|
|
57
|
+
|
|
58
|
+
// Dynamic value — cannot transform, leave as-is
|
|
59
|
+
const myVariant = 'brand-secondary';
|
|
60
|
+
const P = () => <Button variant={myVariant}>Click</Button>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Avatar,
|
|
4
|
+
Button,
|
|
5
|
+
Card,
|
|
6
|
+
CodeBlock,
|
|
7
|
+
IconButton,
|
|
8
|
+
MenuButton,
|
|
9
|
+
Panel,
|
|
10
|
+
Spinner,
|
|
11
|
+
Switch,
|
|
12
|
+
} from '@pantheon-systems/pds-toolkit-react';
|
|
13
|
+
|
|
14
|
+
// Value rewrites — prop stays, value changes
|
|
15
|
+
const A = () => <Button variant="secondary">Click</Button>;
|
|
16
|
+
const B = () => <Button variant="subtle">Click</Button>;
|
|
17
|
+
const C = () => (
|
|
18
|
+
<MenuButton variant="subtle" id='menu' label='Menu' menuItems={[]} />
|
|
19
|
+
);
|
|
20
|
+
const D = () => (
|
|
21
|
+
<IconButton variant="critical" iconName='x' label='Close' />
|
|
22
|
+
);
|
|
23
|
+
const E = () => <Avatar size="l" />;
|
|
24
|
+
|
|
25
|
+
// JSX expression container value rewrite
|
|
26
|
+
const F = () => <Button variant={"secondary"}>Click</Button>;
|
|
27
|
+
|
|
28
|
+
// Unconditional prop removals
|
|
29
|
+
const G = () => <Spinner />;
|
|
30
|
+
const H = () => <CodeBlock />;
|
|
31
|
+
const I = () => (
|
|
32
|
+
<Panel />
|
|
33
|
+
);
|
|
34
|
+
const J = () => (
|
|
35
|
+
<Switch />
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Conditional removal — remove only deprecated gradient values, leave valid values alone
|
|
39
|
+
const K = () => <Card />;
|
|
40
|
+
const L = () => <Card />;
|
|
41
|
+
const M = () => <Card background='default' />;
|
|
42
|
+
|
|
43
|
+
// Already correct — should be left alone
|
|
44
|
+
const N = () => <Button variant='secondary'>Click</Button>;
|
|
45
|
+
|
|
46
|
+
// Non-PDS component — should be left alone
|
|
47
|
+
const O = () => <div variant='brand-secondary' />;
|
|
48
|
+
|
|
49
|
+
// Dynamic value — cannot transform, leave as-is
|
|
50
|
+
const myVariant = 'brand-secondary';
|
|
51
|
+
const P = () => <Button variant={myVariant}>Click</Button>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Spinner } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// Button — matches --only=Button, should be transformed
|
|
5
|
+
const A = () => <Button variant='brand-secondary'>Click</Button>;
|
|
6
|
+
|
|
7
|
+
// Spinner — not in --only list, should be left alone
|
|
8
|
+
const B = () => <Spinner colorType='full-color' />;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Spinner } from '@pantheon-systems/pds-toolkit-react';
|
|
3
|
+
|
|
4
|
+
// Button — matches --only=Button, should be transformed
|
|
5
|
+
const A = () => <Button variant="secondary">Click</Button>;
|
|
6
|
+
|
|
7
|
+
// Spinner — not in --only list, should be left alone
|
|
8
|
+
const B = () => <Spinner colorType='full-color' />;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { defineTest } = require('jscodeshift/src/testUtils');
|
|
2
|
+
|
|
3
|
+
const transform = 'component-renames';
|
|
4
|
+
|
|
5
|
+
// Unfiltered: renames all components
|
|
6
|
+
defineTest(__dirname, transform, null, `${transform}/basic`, { parser: 'tsx' });
|
|
7
|
+
|
|
8
|
+
// --only=IndicatorBadge: renames only IndicatorBadge; all other components untouched
|
|
9
|
+
defineTest(
|
|
10
|
+
__dirname,
|
|
11
|
+
transform,
|
|
12
|
+
{ only: 'IndicatorBadge' },
|
|
13
|
+
`${transform}/only`,
|
|
14
|
+
{ parser: 'tsx' },
|
|
15
|
+
);
|