@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,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codemod: prop-renames
|
|
3
|
+
*
|
|
4
|
+
* Renames PDS v1 prop names to their v2 names on JSX elements.
|
|
5
|
+
* Driven entirely by props.renames in mappings.json.
|
|
6
|
+
*
|
|
7
|
+
* Usage (all renames):
|
|
8
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/prop-renames.js \
|
|
9
|
+
* --extensions=tsx,ts,jsx,js \
|
|
10
|
+
* src/
|
|
11
|
+
*
|
|
12
|
+
* Usage (single component — recommended for by-component migrations):
|
|
13
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/prop-renames.js \
|
|
14
|
+
* --only=Button \
|
|
15
|
+
* --extensions=tsx,ts,jsx,js \
|
|
16
|
+
* src/
|
|
17
|
+
*
|
|
18
|
+
* Usage (multiple components):
|
|
19
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/prop-renames.js \
|
|
20
|
+
* --only=Button,Icon \
|
|
21
|
+
* --extensions=tsx,ts,jsx,js \
|
|
22
|
+
* src/
|
|
23
|
+
*
|
|
24
|
+
* --only accepts a comma-separated list of component names.
|
|
25
|
+
*
|
|
26
|
+
* Limitations:
|
|
27
|
+
* - Renames where `from` is a nested path (e.g. `options[].description`)
|
|
28
|
+
* cannot be transformed at the JSX attribute level and are skipped.
|
|
29
|
+
* These require manual review.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const path = require('path');
|
|
33
|
+
const mappings = require(path.join(__dirname, '../mappings.json'));
|
|
34
|
+
|
|
35
|
+
// Build lookup: { 'ComponentName.oldPropName': 'newPropName' }
|
|
36
|
+
// Skips entries where `from` is a nested path (contains '.' or '[]').
|
|
37
|
+
function buildRenamesLookup() {
|
|
38
|
+
const lookup = {};
|
|
39
|
+
for (const entry of mappings.props.renames) {
|
|
40
|
+
const { component, from, to } = entry;
|
|
41
|
+
if (!component || !from || !to) continue;
|
|
42
|
+
// Skip nested paths — these can't be transformed at the attribute level
|
|
43
|
+
if (from.includes('.') || from.includes('[')) continue;
|
|
44
|
+
lookup[`${component}.${from}`] = to;
|
|
45
|
+
}
|
|
46
|
+
return lookup;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const ALL_RENAMES = buildRenamesLookup();
|
|
50
|
+
|
|
51
|
+
module.exports = function transform(file, api, options) {
|
|
52
|
+
const j = api.jscodeshift;
|
|
53
|
+
const root = j(file.source);
|
|
54
|
+
|
|
55
|
+
// Parse --only flag: comma-separated component names
|
|
56
|
+
const onlyComponents =
|
|
57
|
+
options && options.only
|
|
58
|
+
? new Set(
|
|
59
|
+
options.only
|
|
60
|
+
.split(',')
|
|
61
|
+
.map((s) => s.trim())
|
|
62
|
+
.filter(Boolean),
|
|
63
|
+
)
|
|
64
|
+
: null;
|
|
65
|
+
|
|
66
|
+
// Map local import name → exported component name
|
|
67
|
+
const localToExported = new Map();
|
|
68
|
+
|
|
69
|
+
root.find(j.ImportDeclaration).forEach((nodePath) => {
|
|
70
|
+
if (nodePath.node.source.value !== '@pantheon-systems/pds-toolkit-react')
|
|
71
|
+
return;
|
|
72
|
+
nodePath.node.specifiers.forEach((spec) => {
|
|
73
|
+
if (spec.type === 'ImportSpecifier') {
|
|
74
|
+
localToExported.set(spec.local.name, spec.imported.name);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (localToExported.size === 0) return;
|
|
80
|
+
|
|
81
|
+
let changed = false;
|
|
82
|
+
|
|
83
|
+
root.find(j.JSXOpeningElement).forEach((nodePath) => {
|
|
84
|
+
const nameNode = nodePath.node.name;
|
|
85
|
+
if (nameNode.type !== 'JSXIdentifier') return;
|
|
86
|
+
|
|
87
|
+
const exportedName = localToExported.get(nameNode.name);
|
|
88
|
+
if (!exportedName) return;
|
|
89
|
+
|
|
90
|
+
if (onlyComponents && !onlyComponents.has(exportedName)) return;
|
|
91
|
+
|
|
92
|
+
nodePath.node.attributes.forEach((attr) => {
|
|
93
|
+
if (attr.type !== 'JSXAttribute') return;
|
|
94
|
+
|
|
95
|
+
const propName = attr.name.name;
|
|
96
|
+
if (typeof propName !== 'string') return;
|
|
97
|
+
|
|
98
|
+
const newPropName = ALL_RENAMES[`${exportedName}.${propName}`];
|
|
99
|
+
if (!newPropName) return;
|
|
100
|
+
|
|
101
|
+
attr.name = j.jsxIdentifier(newPropName);
|
|
102
|
+
changed = true;
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return changed ? root.toSource() : undefined;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
module.exports.parser = 'tsx';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codemod: prop-value-standardization
|
|
3
|
+
*
|
|
4
|
+
* Standardizes size-related prop values across PDS v1→v2.
|
|
5
|
+
* Driven entirely by props.typeChanges[].migration in mappings.json.
|
|
6
|
+
*
|
|
7
|
+
* Usage (all components):
|
|
8
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/prop-value-standardization.js \
|
|
9
|
+
* --extensions=tsx,ts,jsx,js \
|
|
10
|
+
* src/
|
|
11
|
+
*
|
|
12
|
+
* Usage (single component — recommended for by-component migrations):
|
|
13
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/prop-value-standardization.js \
|
|
14
|
+
* --only=Spinner \
|
|
15
|
+
* --extensions=tsx,ts,jsx,js \
|
|
16
|
+
* src/
|
|
17
|
+
*
|
|
18
|
+
* Usage (multiple components):
|
|
19
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/prop-value-standardization.js \
|
|
20
|
+
* --only=Spinner,Avatar \
|
|
21
|
+
* --extensions=tsx,ts,jsx,js \
|
|
22
|
+
* src/
|
|
23
|
+
*
|
|
24
|
+
* --only accepts a comma-separated list of exported component names. When
|
|
25
|
+
* provided, only rules for those components are applied. This prevents the
|
|
26
|
+
* transform from rewriting size values on components that are still on V1.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
const path = require('path');
|
|
30
|
+
const mappings = require(path.join(__dirname, '../mappings.json'));
|
|
31
|
+
|
|
32
|
+
// Build lookup: { 'ComponentName.propName': { oldValue: newValue } }
|
|
33
|
+
// Skips entries that are notes or no-ops.
|
|
34
|
+
function buildMigrationLookup() {
|
|
35
|
+
const lookup = {};
|
|
36
|
+
|
|
37
|
+
for (const entry of mappings.props.typeChanges) {
|
|
38
|
+
const { component, prop, migration } = entry;
|
|
39
|
+
if (!migration || typeof migration !== 'object' || Array.isArray(migration))
|
|
40
|
+
continue;
|
|
41
|
+
|
|
42
|
+
const map = {};
|
|
43
|
+
for (const [from, to] of Object.entries(migration)) {
|
|
44
|
+
if (from === 'note') continue;
|
|
45
|
+
// Strip parenthetical notes e.g. "s (removed, use 's' instead)" → "s"
|
|
46
|
+
const cleanTo = to.split(' ')[0];
|
|
47
|
+
// Skip no-op entries where value is unchanged
|
|
48
|
+
if (cleanTo === from) continue;
|
|
49
|
+
map[from] = cleanTo;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (Object.keys(map).length > 0) {
|
|
53
|
+
lookup[`${component}.${prop}`] = map;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return lookup;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const MIGRATION_LOOKUP = buildMigrationLookup();
|
|
61
|
+
|
|
62
|
+
module.exports = function transform(file, api, options) {
|
|
63
|
+
const j = api.jscodeshift;
|
|
64
|
+
const root = j(file.source);
|
|
65
|
+
|
|
66
|
+
// Parse --only flag into a Set of component names for O(1) lookup.
|
|
67
|
+
// Accepts comma-separated values: --only=Spinner,Avatar
|
|
68
|
+
const onlyComponents =
|
|
69
|
+
options && options.only
|
|
70
|
+
? new Set(
|
|
71
|
+
options.only
|
|
72
|
+
.split(',')
|
|
73
|
+
.map((s) => s.trim())
|
|
74
|
+
.filter(Boolean),
|
|
75
|
+
)
|
|
76
|
+
: null;
|
|
77
|
+
|
|
78
|
+
// Map local import name → exported component name
|
|
79
|
+
// Handles aliased imports: import { Spinner as MySpinner } → { MySpinner: 'Spinner' }
|
|
80
|
+
const localToExported = new Map();
|
|
81
|
+
|
|
82
|
+
root.find(j.ImportDeclaration).forEach((nodePath) => {
|
|
83
|
+
if (nodePath.node.source.value !== '@pantheon-systems/pds-toolkit-react')
|
|
84
|
+
return;
|
|
85
|
+
nodePath.node.specifiers.forEach((spec) => {
|
|
86
|
+
if (spec.type === 'ImportSpecifier') {
|
|
87
|
+
localToExported.set(spec.local.name, spec.imported.name);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
if (localToExported.size === 0) return;
|
|
93
|
+
|
|
94
|
+
let changed = false;
|
|
95
|
+
|
|
96
|
+
root.find(j.JSXOpeningElement).forEach((nodePath) => {
|
|
97
|
+
const nameNode = nodePath.node.name;
|
|
98
|
+
// Skip member expressions like <Foo.Bar />
|
|
99
|
+
if (nameNode.type !== 'JSXIdentifier') return;
|
|
100
|
+
|
|
101
|
+
const exportedName = localToExported.get(nameNode.name);
|
|
102
|
+
if (!exportedName) return;
|
|
103
|
+
|
|
104
|
+
// Skip this component if --only is set and it isn't in the list
|
|
105
|
+
if (onlyComponents && !onlyComponents.has(exportedName)) return;
|
|
106
|
+
|
|
107
|
+
nodePath.node.attributes.forEach((attr) => {
|
|
108
|
+
if (attr.type !== 'JSXAttribute' || !attr.value) return;
|
|
109
|
+
|
|
110
|
+
const propName = attr.name.name;
|
|
111
|
+
if (typeof propName !== 'string') return;
|
|
112
|
+
|
|
113
|
+
const map = MIGRATION_LOOKUP[`${exportedName}.${propName}`];
|
|
114
|
+
if (!map) return;
|
|
115
|
+
|
|
116
|
+
// size="sm"
|
|
117
|
+
if (attr.value.type === 'StringLiteral') {
|
|
118
|
+
const newValue = map[attr.value.value];
|
|
119
|
+
if (newValue) {
|
|
120
|
+
attr.value = j.stringLiteral(newValue);
|
|
121
|
+
changed = true;
|
|
122
|
+
}
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// size={"sm"}
|
|
127
|
+
if (
|
|
128
|
+
attr.value.type === 'JSXExpressionContainer' &&
|
|
129
|
+
attr.value.expression.type === 'StringLiteral'
|
|
130
|
+
) {
|
|
131
|
+
const newValue = map[attr.value.expression.value];
|
|
132
|
+
if (newValue) {
|
|
133
|
+
attr.value.expression = j.stringLiteral(newValue);
|
|
134
|
+
changed = true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
return changed ? root.toSource() : undefined;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
module.exports.parser = 'tsx';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codemod: removed-prop-values
|
|
3
|
+
*
|
|
4
|
+
* Handles props that were removed or had specific values removed in PDS v1→v2.
|
|
5
|
+
* Driven entirely by props.removals in mappings.json.
|
|
6
|
+
*
|
|
7
|
+
* Two kinds of change:
|
|
8
|
+
*
|
|
9
|
+
* 1. Value rewrites (entries with `oldValue`):
|
|
10
|
+
* The prop stays but a specific string value changes.
|
|
11
|
+
* e.g. Button variant="brand-secondary" → variant="secondary"
|
|
12
|
+
*
|
|
13
|
+
* 2. Prop removals (all other entries):
|
|
14
|
+
* - Plain removals: the prop is removed unconditionally.
|
|
15
|
+
* e.g. <Panel hasStatusIndicator> → <Panel>
|
|
16
|
+
* - Conditional removals (entries with `removedValues`): the prop is
|
|
17
|
+
* removed only when its value is in the removed set; other values are
|
|
18
|
+
* left untouched.
|
|
19
|
+
* e.g. Card background="mint-gradient" → prop removed
|
|
20
|
+
* Card background="default" → unchanged
|
|
21
|
+
*
|
|
22
|
+
* Usage (all components):
|
|
23
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/removed-prop-values.js \
|
|
24
|
+
* --extensions=tsx,ts,jsx,js \
|
|
25
|
+
* src/
|
|
26
|
+
*
|
|
27
|
+
* Usage (single component — recommended for by-component migrations):
|
|
28
|
+
* npx jscodeshift -t codemods/v1-to-v2/transforms/removed-prop-values.js \
|
|
29
|
+
* --only=Button \
|
|
30
|
+
* --extensions=tsx,ts,jsx,js \
|
|
31
|
+
* src/
|
|
32
|
+
*
|
|
33
|
+
* Limitations:
|
|
34
|
+
* - Only static string literals and boolean shorthand attributes are
|
|
35
|
+
* transformed. Dynamic values (variables, expressions) are left as-is
|
|
36
|
+
* and need manual review.
|
|
37
|
+
* - Table.headers is skipped — its removal requires a structural object
|
|
38
|
+
* shape change that cannot be automated at the attribute level.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
const path = require('path');
|
|
42
|
+
const mappings = require(path.join(__dirname, '../mappings.json'));
|
|
43
|
+
|
|
44
|
+
// Entries that are too complex to automate
|
|
45
|
+
const SKIP_PROPS = new Set(['Table.headers']);
|
|
46
|
+
|
|
47
|
+
function buildLookups() {
|
|
48
|
+
// { 'Component.prop.oldValue': 'newValue' }
|
|
49
|
+
const valueRewrites = {};
|
|
50
|
+
// { 'Component.prop': null | Set<removedValues> }
|
|
51
|
+
// null → remove the prop unconditionally
|
|
52
|
+
// Set → remove only when value is in the set
|
|
53
|
+
const propRemovals = {};
|
|
54
|
+
|
|
55
|
+
for (const entry of mappings.props.removals) {
|
|
56
|
+
const { component, prop } = entry;
|
|
57
|
+
if (!component || !prop) continue;
|
|
58
|
+
|
|
59
|
+
const key = `${component}.${prop}`;
|
|
60
|
+
if (SKIP_PROPS.has(key)) continue;
|
|
61
|
+
|
|
62
|
+
if (entry.oldValue) {
|
|
63
|
+
// Value rewrite: derive new value from the replacement text
|
|
64
|
+
// Replacement is prose like "Use variant=\"secondary\""
|
|
65
|
+
// Extract the first quoted value found, e.g. "secondary"
|
|
66
|
+
const match =
|
|
67
|
+
entry.replacement && entry.replacement.match(/["']([^"']+)["']/);
|
|
68
|
+
const newValue = match ? match[1] : null;
|
|
69
|
+
if (newValue) {
|
|
70
|
+
valueRewrites[`${key}.${entry.oldValue}`] = newValue;
|
|
71
|
+
}
|
|
72
|
+
} else if (entry.removedValues) {
|
|
73
|
+
// Conditional removal: remove only when value is in the set
|
|
74
|
+
propRemovals[key] = new Set(entry.removedValues);
|
|
75
|
+
} else {
|
|
76
|
+
// Unconditional removal
|
|
77
|
+
propRemovals[key] = null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return { valueRewrites, propRemovals };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const { valueRewrites: ALL_VALUE_REWRITES, propRemovals: ALL_PROP_REMOVALS } =
|
|
85
|
+
buildLookups();
|
|
86
|
+
|
|
87
|
+
module.exports = function transform(file, api, options) {
|
|
88
|
+
const j = api.jscodeshift;
|
|
89
|
+
const root = j(file.source);
|
|
90
|
+
|
|
91
|
+
// Parse --only flag: comma-separated component names
|
|
92
|
+
const onlyComponents =
|
|
93
|
+
options && options.only
|
|
94
|
+
? new Set(
|
|
95
|
+
options.only
|
|
96
|
+
.split(',')
|
|
97
|
+
.map((s) => s.trim())
|
|
98
|
+
.filter(Boolean),
|
|
99
|
+
)
|
|
100
|
+
: null;
|
|
101
|
+
|
|
102
|
+
// Map local import name → exported component name
|
|
103
|
+
const localToExported = new Map();
|
|
104
|
+
|
|
105
|
+
root.find(j.ImportDeclaration).forEach((nodePath) => {
|
|
106
|
+
if (nodePath.node.source.value !== '@pantheon-systems/pds-toolkit-react')
|
|
107
|
+
return;
|
|
108
|
+
nodePath.node.specifiers.forEach((spec) => {
|
|
109
|
+
if (spec.type === 'ImportSpecifier') {
|
|
110
|
+
localToExported.set(spec.local.name, spec.imported.name);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
if (localToExported.size === 0) return;
|
|
116
|
+
|
|
117
|
+
let changed = false;
|
|
118
|
+
|
|
119
|
+
root.find(j.JSXOpeningElement).forEach((nodePath) => {
|
|
120
|
+
const nameNode = nodePath.node.name;
|
|
121
|
+
if (nameNode.type !== 'JSXIdentifier') return;
|
|
122
|
+
|
|
123
|
+
const exportedName = localToExported.get(nameNode.name);
|
|
124
|
+
if (!exportedName) return;
|
|
125
|
+
|
|
126
|
+
if (onlyComponents && !onlyComponents.has(exportedName)) return;
|
|
127
|
+
|
|
128
|
+
const attrsToRemove = [];
|
|
129
|
+
|
|
130
|
+
nodePath.node.attributes.forEach((attr) => {
|
|
131
|
+
if (attr.type !== 'JSXAttribute') return;
|
|
132
|
+
|
|
133
|
+
const propName = attr.name.name;
|
|
134
|
+
if (typeof propName !== 'string') return;
|
|
135
|
+
|
|
136
|
+
const key = `${exportedName}.${propName}`;
|
|
137
|
+
|
|
138
|
+
// --- Value rewrites ---
|
|
139
|
+
// String literal: variant="brand-secondary"
|
|
140
|
+
if (attr.value && attr.value.type === 'StringLiteral') {
|
|
141
|
+
const rewriteKey = `${key}.${attr.value.value}`;
|
|
142
|
+
const newValue = ALL_VALUE_REWRITES[rewriteKey];
|
|
143
|
+
if (newValue) {
|
|
144
|
+
attr.value = j.stringLiteral(newValue);
|
|
145
|
+
changed = true;
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// JSX expression container: variant={"brand-secondary"}
|
|
150
|
+
if (
|
|
151
|
+
attr.value &&
|
|
152
|
+
attr.value.type === 'JSXExpressionContainer' &&
|
|
153
|
+
attr.value.expression.type === 'StringLiteral'
|
|
154
|
+
) {
|
|
155
|
+
const rewriteKey = `${key}.${attr.value.expression.value}`;
|
|
156
|
+
const newValue = ALL_VALUE_REWRITES[rewriteKey];
|
|
157
|
+
if (newValue) {
|
|
158
|
+
attr.value.expression = j.stringLiteral(newValue);
|
|
159
|
+
changed = true;
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// --- Prop removals ---
|
|
165
|
+
if (!(key in ALL_PROP_REMOVALS)) return;
|
|
166
|
+
const removedValues = ALL_PROP_REMOVALS[key];
|
|
167
|
+
|
|
168
|
+
if (removedValues === null) {
|
|
169
|
+
// Unconditional removal (boolean shorthand or any value)
|
|
170
|
+
attrsToRemove.push(attr);
|
|
171
|
+
changed = true;
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Conditional removal — only remove when value is in the removed set
|
|
176
|
+
let attrValue = null;
|
|
177
|
+
if (!attr.value) {
|
|
178
|
+
// Boolean shorthand e.g. <Card background> — unlikely but handle it
|
|
179
|
+
attrValue = 'true';
|
|
180
|
+
} else if (attr.value.type === 'StringLiteral') {
|
|
181
|
+
attrValue = attr.value.value;
|
|
182
|
+
} else if (
|
|
183
|
+
attr.value.type === 'JSXExpressionContainer' &&
|
|
184
|
+
attr.value.expression.type === 'StringLiteral'
|
|
185
|
+
) {
|
|
186
|
+
attrValue = attr.value.expression.value;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (attrValue !== null && removedValues.has(attrValue)) {
|
|
190
|
+
attrsToRemove.push(attr);
|
|
191
|
+
changed = true;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
// Remove collected attributes
|
|
196
|
+
if (attrsToRemove.length > 0) {
|
|
197
|
+
nodePath.node.attributes = nodePath.node.attributes.filter(
|
|
198
|
+
(attr) => !attrsToRemove.includes(attr),
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return changed ? root.toSource() : undefined;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
module.exports.parser = 'tsx';
|
|
@@ -21,10 +21,14 @@ export interface AvatarProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
21
21
|
* A link element using the router of your choice. Leave empty for no link.
|
|
22
22
|
*/
|
|
23
23
|
linkContent?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Avatar shape.
|
|
26
|
+
*/
|
|
27
|
+
shape?: 'circle' | 'square';
|
|
24
28
|
/**
|
|
25
29
|
* Avatar size.
|
|
26
30
|
*/
|
|
27
|
-
size?: 'xs' | '
|
|
31
|
+
size?: 'xs' | 's' | 'm' | 'l';
|
|
28
32
|
/**
|
|
29
33
|
* Unique ID associated with the avatar. Can be workspace ID, user ID, email, etc.
|
|
30
34
|
*/
|
|
@@ -33,4 +37,4 @@ export interface AvatarProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
33
37
|
/**
|
|
34
38
|
* Avatar UI component
|
|
35
39
|
*/
|
|
36
|
-
export declare const Avatar: ({ ariaLabel, className, hasUserFallback, imageSrc, linkContent, size, uniqueId, ...props }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const Avatar: ({ ariaLabel, className, hasUserFallback, imageSrc, linkContent, shape, size, uniqueId, ...props }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { StatusType } from '../../libs/types/custom-types';
|
|
2
|
+
import { HeadingLevelCommon, StatusType } from '../../libs/types/custom-types';
|
|
3
3
|
import './callout.css';
|
|
4
4
|
type CalloutType = StatusType | 'code' | 'earlyAccess';
|
|
5
5
|
type TypeLabels = Record<CalloutType, string>;
|
|
@@ -12,6 +12,10 @@ export interface CalloutProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
12
12
|
* Additional class names
|
|
13
13
|
*/
|
|
14
14
|
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Semantic element for the title. Styles are identical regardless of element chosen.
|
|
17
|
+
*/
|
|
18
|
+
headingLevel?: HeadingLevelCommon;
|
|
15
19
|
/**
|
|
16
20
|
* Callout title.
|
|
17
21
|
*/
|
|
@@ -28,5 +32,5 @@ export interface CalloutProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
28
32
|
/**
|
|
29
33
|
* Callout UI component
|
|
30
34
|
*/
|
|
31
|
-
export declare const Callout: ({ children, className, title, type, typeLabels, ...props }: CalloutProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const Callout: ({ children, className, headingLevel, title, type, typeLabels, ...props }: CalloutProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
36
|
export {};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import 'prismjs/components/prism-markup';
|
|
3
|
+
import 'prismjs/components/prism-css';
|
|
4
|
+
import 'prismjs/components/prism-clike';
|
|
5
|
+
import 'prismjs/components/prism-javascript';
|
|
6
|
+
import 'prismjs/components/prism-typescript';
|
|
7
|
+
import 'prismjs/components/prism-jsx';
|
|
8
|
+
import 'prismjs/components/prism-tsx';
|
|
9
|
+
import 'prismjs/components/prism-json';
|
|
10
|
+
import 'prismjs/components/prism-yaml';
|
|
2
11
|
import 'prismjs/components/prism-bash';
|
|
3
12
|
import 'prismjs/components/prism-diff';
|
|
4
13
|
import './code-block.css';
|
|
@@ -16,10 +25,6 @@ export interface CodeBlockProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
16
25
|
* Code to display.
|
|
17
26
|
*/
|
|
18
27
|
code: string;
|
|
19
|
-
/**
|
|
20
|
-
* Color type. Default is dark.
|
|
21
|
-
*/
|
|
22
|
-
colorType?: 'dark' | 'light';
|
|
23
28
|
/**
|
|
24
29
|
* Copy button label. Aria-label and tooltip text for the copy button.
|
|
25
30
|
*/
|
|
@@ -81,5 +86,5 @@ export interface CodeBlockProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
81
86
|
/**
|
|
82
87
|
* CodeBlock UI component
|
|
83
88
|
*/
|
|
84
|
-
export declare const CodeBlock: ({ className, code,
|
|
89
|
+
export declare const CodeBlock: ({ className, code, copyButtonLabel, hasCopyButton, hasLineNumbers, hasPrompt, height, isLoading, language, loadingLineCount, maxHeight, promptSymbol, renderAsLegacy, shouldWrap, ...props }: CodeBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
85
90
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const logExample = "Already have image (with digest): us-docker.pkg.dev/prod-decoupled-shared/build-tools/pantheon-build:v1.0.8-node20\nThe framework expected according to the configuration is: gatsby.\nThe framework detected from the code is: vite\nERROR: Invalid option: false\ndeprecated-tools [options]\nUsage:\n deprecated-tools -t node --min-version 18 [--max-version 20] --message-format \"Node version should be between %s and %s\" --message-data \"18 20\"\n deprecated-tools -f .nvmrc --message-format \"The file %s is deprecated\" --message-data \".nvmrc\"\n\n -t, --tool <tool> Check if a tool is deprecated\n --min-version <ver> Minimum version supported for the tool\n --max-version <ver> Max version supported for the tool\n --message-format <format> Format of the deprecation message\n --message-data <data> Array of data to use in the deprecation message\n -f, --file <file> Check if a file is deprecated\n --message-format <format> Format of the deprecation message\n --message-data <data> Array of data to use in the deprecation message\n -h, --help Display this help message\nnpm WARN deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported\nnpm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported\n\n> @pantheon-systems/pds-toolkit-react@1.0.0-dev.213 prepare\n> husky install\n\nhusky - Git hooks installed";
|
|
2
2
|
export declare const reactExample = "export const ControlledExample = () => {\n const defaultValue = 'This is a default value';\n const [value, setValue] = useState(defaultValue);\n\n // This is a comment for this component.\n return (\n <TextInput\n id='text-input-controlled-example'\n label='Controlled Input example'\n type='text'\n hasClearButton={true}\n onClear={() => {\n setValue('');\n }}\n onChange={(event: ChangeEvent<HTMLInputElement>) => setValue(event.target.value)}\n value={value}\n />\n );\n};";
|
|
3
|
-
export declare const cssExample = ".pds-file-diff {\n align-items: center;\n display: flex;\n gap: 0.25rem;\n height: 1.0625rem;\n max-width: 100%;\n width: 100%;\n\n .pds-file-diff__total-changes {\n color: var(--pds-color-
|
|
3
|
+
export declare const cssExample = ".pds-file-diff {\n align-items: center;\n display: flex;\n gap: 0.25rem;\n height: 1.0625rem;\n max-width: 100%;\n width: 100%;\n\n .pds-file-diff__total-changes {\n color: var(--pds-color-foreground-default-secondary);\n font-size: var(--pds-typography-size-xs);\n }\n\n .pds-file-diff__bars {\n align-items: center;\n display: flex;\n gap: 0.125rem;\n width: 100%;\n }\n\n .pds-file-diff__behind {\n position: relative;\n\n .pds-file-diff__behind-bar {\n background-color: var(--pds-color-status-critical-utility);\n border-bottom-left-radius: 6.25rem;\n border-top-left-radius: 6.25rem;\n height: 8px;\n min-width: 1px;\n right: 0px;\n transition: width 0.3s ease;\n width: 100%;\n }\n }\n\n .pds-file-diff__ahead {\n position: relative;\n\n .pds-file-diff__ahead-bar {\n background-color: var(--pds-color-status-success-utility);\n border-bottom-right-radius: 6.25rem;\n border-top-right-radius: 6.25rem;\n height: 8px;\n left: 0px;\n min-width: 1px;\n transition: width 0.3s ease;\n width: 100%;\n }\n }\n\n .pds-file-diff__tooltip {\n display: block;\n padding-inline: 0;\n }\n}\n";
|
|
4
4
|
export declare const diffExample = "diff --git a/influitive/index.css b/influitive/index.css\nindex 2069af6..b347ca3 100644\n--- a/influitive/index.css\n+++ b/influitive/index.css\n@@ -1,4 +1,4 @@\n #nav-container ul li.c-nav-list-item a.c-nav-item {\n font-weight: 500 !important;\n- font-family: 'Poppins', san-serif !important;\n+ font-family: 'Poppins', sans-serif !important;\n }";
|
|
5
5
|
export declare const twigExample = "<div class=\"pds-status-badge pds-status-badge--{{ color|default('transparent')}}{% if extra_classes %} {{ extra_classes }}{% endif %}\">\n\n {% if has_status_indicator %}\n <span class=\"pds-status-badge__status pds-status-badge__status--{{ status_type }}\">\n {% if status_type %}\n <span class=\"visually-hidden\">Status: {{ status_type }}</span>\n {% endif %}\n </span>\n {% endif %}\n\n <span class=\"pds-status-badge__label\">{{ label }}</span>\n</div>";
|
|
6
|
+
export declare const jsonExample = "{\n \"site\": {\n \"id\": \"26d20ebf-b2fb-466e-9db3-4c001db441d6\",\n \"name\": \"my-awesome-site\",\n \"framework\": \"wordpress\",\n \"region\": \"United States\",\n \"created_at\": \"2024-01-15T08:30:00+00:00\",\n \"php_version\": \"8.3\",\n \"upstream\": {\n \"id\": \"e8fe8550-1ab9-4964-8838-2b9abdccf4bf\",\n \"label\": \"WordPress\",\n \"type\": \"core\"\n },\n \"environments\": [\"dev\", \"test\", \"live\"],\n \"frozen\": false,\n \"max_num_cdes\": 10\n }\n}";
|
|
6
7
|
export declare const legacyExample = "Composer version 2.8.6 2025-02-25 13:03:50<br>PHP version 8.3.21 (/opt/pantheon/php8.3/php)<br>Run the "diagnose" command to get more detailed diagnostics output.<br>Cache directory does not exist (cache-vcs-dir):<br>Cache directory does not exist (cache-repo-dir):<br>Cache directory does not exist (cache-files-dir):<br>Clearing cache (cache-dir): /home/pantheon-app/.composer/cache<br>All caches cleared.<br>Running composer install...<br>composer --no-interaction --no-progress --prefer-dist --ansi install<br><span class=\"term-fg32\">No patches supplied.</span><br><span class=\"term-fg32\">Installing dependencies from lock file (including require-dev)</span><br><span class=\"term-fg32\">Verifying lock file contents can be installed on current platform.</span><br>Nothing to install, update or remove<br><span class=\"term-fg32\">Generating autoload files</span><br><span class=\"term-fg32\">89 packages you are using are looking for funding.</span><br><span class=\"term-fg32\">Use the `composer fund` command to find out more!</span><br><span class=\"term-fg32\">phpstan/extension-installer:</span> Extensions installed";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './pdsLight';
|
|
1
|
+
export * from './pds';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PrismTheme } from 'prism-react-renderer';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const pds: PrismTheme;
|
|
@@ -9,6 +9,7 @@ export interface ListItems {
|
|
|
9
9
|
text: string;
|
|
10
10
|
type: 'included' | 'notIncluded' | 'addon';
|
|
11
11
|
}
|
|
12
|
+
export type ComparisonListSize = 's' | 'm';
|
|
12
13
|
export interface ComparisonListProps extends ComponentPropsWithoutRef<'div'> {
|
|
13
14
|
/**
|
|
14
15
|
* Additional class names
|
|
@@ -34,6 +35,10 @@ export interface ComparisonListProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
34
35
|
* Whether to show the border on list items.
|
|
35
36
|
*/
|
|
36
37
|
showBorder?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Size variant.
|
|
40
|
+
*/
|
|
41
|
+
size?: ComparisonListSize;
|
|
37
42
|
/**
|
|
38
43
|
* Icon labels
|
|
39
44
|
*/
|
|
@@ -42,5 +47,5 @@ export interface ComparisonListProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
42
47
|
/**
|
|
43
48
|
* ComparisonList UI component
|
|
44
49
|
*/
|
|
45
|
-
export declare const ComparisonList: ({ className, listItems, listLabel, moreLink, renderTypeLabels, showBorder, typeLabels, ...props }: ComparisonListProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const ComparisonList: ({ className, listItems, listLabel, moreLink, renderTypeLabels, showBorder, size, typeLabels, ...props }: ComparisonListProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
51
|
export {};
|