@pantheon-systems/pds-toolkit-react 2.0.0-alpha.4 → 2.0.0-alpha.40
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 +1572 -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 +2 -2
- 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 +14 -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 +32 -7
- 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 +1 -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/{NavMenu/NavMenu.d.ts → SiteMenu/SiteMenu.d.ts} +5 -8
- 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 +1 -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 +12075 -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/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
|
@@ -20,6 +20,10 @@ interface IconButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
20
20
|
* Is the button disabled?
|
|
21
21
|
*/
|
|
22
22
|
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Show a visible border around the button.
|
|
25
|
+
*/
|
|
26
|
+
hasBorder?: boolean;
|
|
23
27
|
/**
|
|
24
28
|
* Show tooltip on hover. If false, the title attribute will be used.
|
|
25
29
|
*/
|
|
@@ -32,10 +36,18 @@ interface IconButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
32
36
|
* Which icon to render.
|
|
33
37
|
*/
|
|
34
38
|
iconName: PDSIcon;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the button is in a pressed/active toggle state. Maps to aria-pressed.
|
|
41
|
+
*/
|
|
42
|
+
isPressed?: boolean;
|
|
35
43
|
/**
|
|
36
44
|
* Click event handler callback.
|
|
37
45
|
*/
|
|
38
46
|
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Icon to display when isPressed is true. When not set, iconName is used in both states.
|
|
49
|
+
*/
|
|
50
|
+
pressedIconName?: PDSIcon;
|
|
39
51
|
/**
|
|
40
52
|
* Which size of button to render.
|
|
41
53
|
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { StatusDotType } from '../../../libs/components/StatusDot/StatusDot';
|
|
2
3
|
import { ButtonVariant, HeadingItemType, LinkItemType, MenuItemType, NodeItemType, SeparatorItemType } from '../../../libs/types/custom-types';
|
|
4
|
+
import { TallyProps } from '../../badges/Tally/Tally';
|
|
3
5
|
import { PDSIcon } from '../../icons/Icon/Icon';
|
|
6
|
+
import '@components/Dropdown/dropdown.css';
|
|
4
7
|
import './menu-button.css';
|
|
5
8
|
type MenuButtonSize = 's' | 'm';
|
|
6
9
|
/**
|
|
@@ -16,13 +19,13 @@ export interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
|
16
19
|
*/
|
|
17
20
|
disabled?: boolean;
|
|
18
21
|
/**
|
|
19
|
-
*
|
|
22
|
+
* Icon name for icon-only mode.
|
|
20
23
|
*/
|
|
21
|
-
|
|
24
|
+
iconName?: PDSIcon;
|
|
22
25
|
/**
|
|
23
|
-
*
|
|
26
|
+
* Render as an icon-only button (no label, no angle-down). Not compatible with `tally` or `statusDot`.
|
|
24
27
|
*/
|
|
25
|
-
|
|
28
|
+
iconOnly?: boolean;
|
|
26
29
|
/**
|
|
27
30
|
* ID value for this component.
|
|
28
31
|
*/
|
|
@@ -51,6 +54,17 @@ export interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
|
51
54
|
* Which size of button to render.
|
|
52
55
|
*/
|
|
53
56
|
size?: MenuButtonSize;
|
|
57
|
+
/**
|
|
58
|
+
* A status dot displayed in the left icon slot. Not available in `iconOnly` mode.
|
|
59
|
+
*/
|
|
60
|
+
statusDot?: StatusDotType;
|
|
61
|
+
/**
|
|
62
|
+
* A tally badge displayed between the label and the angle-down icon. Not available in `iconOnly` mode.
|
|
63
|
+
*/
|
|
64
|
+
tally?: {
|
|
65
|
+
label: TallyProps['label'];
|
|
66
|
+
type: TallyProps['type'];
|
|
67
|
+
};
|
|
54
68
|
/**
|
|
55
69
|
* Optional `data-testid` value for this component.
|
|
56
70
|
*/
|
|
@@ -60,18 +74,12 @@ export interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
|
60
74
|
*/
|
|
61
75
|
undefinedLabel?: string;
|
|
62
76
|
/**
|
|
63
|
-
* Which variant of button to render
|
|
64
|
-
*/
|
|
65
|
-
variant?: Extract<ButtonVariant, 'primary' | 'secondary' | 'navbar'>;
|
|
66
|
-
/**
|
|
67
|
-
* Is this button located with the Navbar component?
|
|
68
|
-
* This will adjust the styling and position of the dropdown.
|
|
69
|
-
* Omit this prop for the Dashboard application. It only applies to the standard Navbar component with a bottom border.
|
|
77
|
+
* Which variant of button to render. Not available in `iconOnly` mode.
|
|
70
78
|
*/
|
|
71
|
-
|
|
79
|
+
variant?: Extract<ButtonVariant, 'primary' | 'secondary' | 'subtle'>;
|
|
72
80
|
}
|
|
73
81
|
/**
|
|
74
82
|
* MenuButton UI component
|
|
75
83
|
*/
|
|
76
|
-
export declare const MenuButton: ({ className, disabled,
|
|
84
|
+
export declare const MenuButton: ({ className, disabled, iconName, iconOnly, id, isSplitButton, label, menuItems, menuPosition, onClick, size, statusDot, tally, testId, undefinedLabel, variant, ...props }: MenuButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
77
85
|
export {};
|
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
import { PDSIcon } from '../../icons/Icon/Icon';
|
|
2
2
|
import './segmented-button.css';
|
|
3
|
+
export type SegmentedButtonSize = 's' | 'xs';
|
|
3
4
|
/**
|
|
4
5
|
* Structure for each option in the SegmentedButton component.
|
|
5
6
|
*/
|
|
6
7
|
interface OptionType {
|
|
8
|
+
/**
|
|
9
|
+
* Disables this individual option.
|
|
10
|
+
*/
|
|
7
11
|
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Optional icon rendered before the label.
|
|
14
|
+
*/
|
|
8
15
|
iconName?: PDSIcon;
|
|
16
|
+
/**
|
|
17
|
+
* Optional unique ID for the option. Falls back to a generated ID.
|
|
18
|
+
*/
|
|
9
19
|
id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Shows a spinner before the label to indicate the option is loading.
|
|
22
|
+
*/
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Visible text for the option.
|
|
26
|
+
*/
|
|
10
27
|
label: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional tally badge rendered after the label.
|
|
30
|
+
*/
|
|
11
31
|
tally?: {
|
|
12
32
|
label: string | number;
|
|
13
33
|
type: 'neutral' | 'critical' | 'warning' | 'info' | 'success';
|
|
14
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Value submitted when this option is selected.
|
|
37
|
+
*/
|
|
15
38
|
value: string;
|
|
16
39
|
}
|
|
17
40
|
/**
|
|
@@ -19,7 +42,7 @@ interface OptionType {
|
|
|
19
42
|
*/
|
|
20
43
|
export interface SegmentedButtonProps {
|
|
21
44
|
/**
|
|
22
|
-
* Additional class names
|
|
45
|
+
* Additional class names.
|
|
23
46
|
*/
|
|
24
47
|
className?: string;
|
|
25
48
|
/**
|
|
@@ -27,7 +50,7 @@ export interface SegmentedButtonProps {
|
|
|
27
50
|
*/
|
|
28
51
|
defaultValue?: string;
|
|
29
52
|
/**
|
|
30
|
-
*
|
|
53
|
+
* Disables all options in the SegmentedButton.
|
|
31
54
|
*/
|
|
32
55
|
disabled?: boolean;
|
|
33
56
|
/**
|
|
@@ -39,19 +62,21 @@ export interface SegmentedButtonProps {
|
|
|
39
62
|
*/
|
|
40
63
|
label: string;
|
|
41
64
|
/**
|
|
42
|
-
* Callback
|
|
65
|
+
* Callback fired when the selected option changes.
|
|
43
66
|
*/
|
|
44
67
|
onChange?: (value: string) => void;
|
|
45
68
|
/**
|
|
46
|
-
* Array of button options — must be between 2 and 6 options.
|
|
69
|
+
* Array of button options — must be between 2 and 6 options. Each option may
|
|
70
|
+
* include an optional icon or spinner before the label and a tally after it.
|
|
47
71
|
*/
|
|
48
72
|
options: OptionType[];
|
|
49
73
|
/**
|
|
50
|
-
* Size of the
|
|
74
|
+
* Size of the segmented button. `'s'` matches the small button height (32px);
|
|
75
|
+
* `'xs'` matches the extra-small button height (24px).
|
|
51
76
|
*/
|
|
52
|
-
size?:
|
|
77
|
+
size?: SegmentedButtonSize;
|
|
53
78
|
/**
|
|
54
|
-
*
|
|
79
|
+
* Controlled value. Cannot be used together with `defaultValue`.
|
|
55
80
|
*/
|
|
56
81
|
value?: string;
|
|
57
82
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { PaddingScale } from '../../../libs/types/layout-types';
|
|
3
|
+
import { CardBackground, CardImageVariant } from '../../cards/Card/Card';
|
|
4
|
+
import './action-card.css';
|
|
5
|
+
export interface ActionCardPrimaryAction {
|
|
6
|
+
/**
|
|
7
|
+
* Accessible label for the card-level action. Required — read by screen readers
|
|
8
|
+
* as the name of the interactive element that covers the card.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* For link-based actions: pass a native `<a>` or framework link element (e.g.
|
|
13
|
+
* React Router `<Link>`). The component clones the element and injects the
|
|
14
|
+
* required class and aria-label. Mutually exclusive with `onClick`.
|
|
15
|
+
*/
|
|
16
|
+
linkContent?: ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* For button-based actions: callback fired when the card is activated.
|
|
19
|
+
* Mutually exclusive with `linkContent`.
|
|
20
|
+
*/
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Prop types for ActionCard
|
|
25
|
+
*/
|
|
26
|
+
export interface ActionCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
27
|
+
/**
|
|
28
|
+
* Background color of the card.
|
|
29
|
+
*/
|
|
30
|
+
background?: CardBackground;
|
|
31
|
+
/**
|
|
32
|
+
* Card content. Supports `image`, `main`, and `footer` named slots.
|
|
33
|
+
* Any interactive elements placed inside children (secondary actions) are
|
|
34
|
+
* naturally positioned above the card-level primary action.
|
|
35
|
+
*/
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Additional class names
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Controls how the image slot is presented.
|
|
43
|
+
* - `bleed` (default): image extends to card edges, top corners rounded only.
|
|
44
|
+
* - `inset`: image has padding on all sides, all corners rounded.
|
|
45
|
+
*/
|
|
46
|
+
imageVariant?: CardImageVariant;
|
|
47
|
+
/**
|
|
48
|
+
* Relative padding for the `main` and `footer` slots.
|
|
49
|
+
*/
|
|
50
|
+
padding?: PaddingScale;
|
|
51
|
+
/**
|
|
52
|
+
* The card-level primary action. Provide either `linkContent` (for links) or
|
|
53
|
+
* `onClick` (for button actions), plus a required accessible `label`.
|
|
54
|
+
*/
|
|
55
|
+
primaryAction: ActionCardPrimaryAction;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* ActionCard UI component
|
|
59
|
+
*
|
|
60
|
+
* A fully-clickable card where the entire surface activates a primary action.
|
|
61
|
+
* Supports both link and button actions. Secondary interactive elements can be
|
|
62
|
+
* placed inside children and remain independently clickable above the card action.
|
|
63
|
+
*/
|
|
64
|
+
export declare const ActionCard: ({ background, children, className, imageVariant, padding, primaryAction, ...props }: ActionCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PaddingScale } from '../../../libs/types/layout-types';
|
|
3
3
|
import './card.css';
|
|
4
|
-
export type CardBackground = 'default' | '
|
|
4
|
+
export type CardBackground = 'default' | 'transparent';
|
|
5
|
+
export type CardImageVariant = 'bleed' | 'inset';
|
|
5
6
|
/**
|
|
6
7
|
* Prop types for Card
|
|
7
8
|
*/
|
|
@@ -18,12 +19,18 @@ export interface CardProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
18
19
|
* Additional class names
|
|
19
20
|
*/
|
|
20
21
|
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Controls how the image fills the card top.
|
|
24
|
+
* - `bleed` (default): image extends to the card edges, top corners rounded only.
|
|
25
|
+
* - `inset`: image has padding on all sides, all corners rounded.
|
|
26
|
+
*/
|
|
27
|
+
imageVariant?: CardImageVariant;
|
|
21
28
|
/**
|
|
22
29
|
* Relative padding for the `main` slot.
|
|
23
30
|
*/
|
|
24
|
-
padding?:
|
|
31
|
+
padding?: PaddingScale;
|
|
25
32
|
}
|
|
26
33
|
/**
|
|
27
34
|
* Card UI component
|
|
28
35
|
*/
|
|
29
|
-
export declare const Card: ({ background, children, className, padding, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const Card: ({ background, children, className, imageVariant, padding, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/components/cards/{CardSelectGroup/CardSelectGroup.d.ts → CardSelect/CardSelect.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import './card-select
|
|
2
|
+
import './card-select.css';
|
|
3
3
|
export interface CardOption {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Composable content rendered inside the card below the label.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
children?: ReactNode;
|
|
8
8
|
/**
|
|
9
9
|
* Unique ID for the option
|
|
10
10
|
* @default ''
|
|
@@ -19,7 +19,8 @@ export interface CardOption {
|
|
|
19
19
|
*/
|
|
20
20
|
value: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type CardSelectSize = 'm' | 'l';
|
|
23
|
+
export interface CardSelectProps extends Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> {
|
|
23
24
|
/**
|
|
24
25
|
* Additional class names
|
|
25
26
|
*/
|
|
@@ -29,11 +30,11 @@ export interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fie
|
|
|
29
30
|
*/
|
|
30
31
|
defaultValue?: string;
|
|
31
32
|
/**
|
|
32
|
-
* Unique ID for the card select
|
|
33
|
+
* Unique ID for the card select
|
|
33
34
|
*/
|
|
34
35
|
id: string;
|
|
35
36
|
/**
|
|
36
|
-
* Label for the card select group
|
|
37
|
+
* Label for the card select group. Renders as the fieldset legend.
|
|
37
38
|
*/
|
|
38
39
|
label: string;
|
|
39
40
|
/**
|
|
@@ -53,8 +54,12 @@ export interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fie
|
|
|
53
54
|
* Array of card options
|
|
54
55
|
*/
|
|
55
56
|
options?: CardOption[];
|
|
57
|
+
/**
|
|
58
|
+
* Size of the card label and indicator. Defaults to `'m'`.
|
|
59
|
+
*/
|
|
60
|
+
size?: CardSelectSize;
|
|
56
61
|
}
|
|
57
62
|
/**
|
|
58
|
-
*
|
|
63
|
+
* CardSelect UI component
|
|
59
64
|
*/
|
|
60
|
-
export declare const
|
|
65
|
+
export declare const CardSelect: ({ className, defaultValue, id, label, labelDisplay, layout, onChange, options, size, ...props }: CardSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { BaseChartProps } from '../shared/types';
|
|
3
|
+
import '../shared/chart-wrapper.css';
|
|
4
|
+
import './bar-chart.css';
|
|
5
|
+
export type BarChartLayout = 'horizontal' | 'vertical';
|
|
6
|
+
export type BarChartVariant = 'grouped' | 'stacked';
|
|
7
|
+
export interface BarChartProps extends BaseChartProps, Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
8
|
+
/** Border radius on bars (default: 2) */
|
|
9
|
+
barRadius?: number;
|
|
10
|
+
/** Bar orientation — horizontal (default, bars go up) or vertical (bars go sideways) */
|
|
11
|
+
layout?: BarChartLayout;
|
|
12
|
+
/** Bar layout variant (default: 'stacked') */
|
|
13
|
+
variant?: BarChartVariant;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* BarChart UI component
|
|
17
|
+
*
|
|
18
|
+
* Renders a responsive bar chart with support for stacked or grouped layouts,
|
|
19
|
+
* multiple series, tooltips, and an accessible data table.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BarChart: ({ barRadius, chartHeight, chartWidth, className, colorPalette, data, isLoading, isThumbnail, labelStrings, layout, legendVariant, onTimePeriodChange, selectedTimePeriod, series, showAccessibleTable, showAxisLines, showGrid, showLegend, showTooltip, timePeriodOptions, tooltipContent, variant, xAxisLabel, xAxisTickInterval, yAxisDomain, yAxisFormatter, yAxisLabel, yAxisTickInterval, ...props }: BarChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { AnnotationConfig, BaseChartProps, ReferenceLineConfig } from '../shared/types';
|
|
3
|
+
import '../shared/chart-wrapper.css';
|
|
4
|
+
import './line-chart.css';
|
|
5
|
+
export type LineStyle = 'smooth' | 'straight';
|
|
6
|
+
export interface LineChartProps extends BaseChartProps, Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
7
|
+
/** Annotation markers (e.g., "TODAY") */
|
|
8
|
+
annotations?: AnnotationConfig[];
|
|
9
|
+
/** Line curve style (default: 'smooth') */
|
|
10
|
+
lineStyle?: LineStyle;
|
|
11
|
+
/** Reference lines (e.g., contract limit) */
|
|
12
|
+
referenceLines?: ReferenceLineConfig[];
|
|
13
|
+
/** Show data points on lines (default: true) */
|
|
14
|
+
showDataPoints?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* LineChart UI component
|
|
18
|
+
*
|
|
19
|
+
* Renders a responsive line chart with support for multiple series,
|
|
20
|
+
* reference lines, annotations, tooltips, and an accessible data table.
|
|
21
|
+
*/
|
|
22
|
+
export declare const LineChart: ({ annotations, chartHeight, chartWidth, className, colorPalette, data, isLoading, isThumbnail, labelStrings, legendVariant, lineStyle, onTimePeriodChange, referenceLines, selectedTimePeriod, series, showAccessibleTable, showAxisLines, showDataPoints, showGrid, showLegend, showTooltip, timePeriodOptions, tooltipContent, xAxisLabel, xAxisTickInterval, yAxisDomain, yAxisFormatter, yAxisLabel, yAxisTickInterval, ...props }: LineChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ColorPalette, LegendVariant } from '../shared/types';
|
|
3
|
+
import '../shared/chart-wrapper.css';
|
|
4
|
+
import './pie-chart.css';
|
|
5
|
+
export type PieChartVariant = 'donut' | 'pie';
|
|
6
|
+
export interface PieSlice {
|
|
7
|
+
/** Override default token color (CSS custom property or hex). Not theme-aware — use paletteIndex instead when possible. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Display label for legend and tooltip */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Pick a specific color from the selected palette by position (1-based). Theme-aware — automatically adjusts for light/dark mode. */
|
|
12
|
+
paletteIndex?: number;
|
|
13
|
+
/** Numeric value for this slice */
|
|
14
|
+
value: number;
|
|
15
|
+
}
|
|
16
|
+
export interface PieChartLabelStrings {
|
|
17
|
+
/** Accessible description for the hidden data table */
|
|
18
|
+
accessibleTableDescription?: string;
|
|
19
|
+
/** Heading for the empty state */
|
|
20
|
+
emptyStateHeading?: string;
|
|
21
|
+
/** Message body for the empty state */
|
|
22
|
+
emptyStateMessage?: string;
|
|
23
|
+
/** Loading label for screen readers */
|
|
24
|
+
loadingLabel?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PieChartProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
27
|
+
/** Height of the chart area in pixels. Default: 300; 80 when isThumbnail. */
|
|
28
|
+
chartHeight?: number;
|
|
29
|
+
/** Maximum width of the component in pixels. Default: 80 when isThumbnail. */
|
|
30
|
+
chartWidth?: number;
|
|
31
|
+
/** Color palette to use for slice colors (default: 'categorical') */
|
|
32
|
+
colorPalette?: ColorPalette;
|
|
33
|
+
/** Slice data */
|
|
34
|
+
data: PieSlice[];
|
|
35
|
+
/** Show loading skeleton */
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
/** Thumbnail mode — hides legend and tooltip, renders at a small fixed size. Individual show* props can override. */
|
|
38
|
+
isThumbnail?: boolean;
|
|
39
|
+
/** Translatable UI strings for i18n. Keys: accessibleTableDescription, emptyStateHeading, emptyStateMessage, loadingLabel. */
|
|
40
|
+
labelStrings?: PieChartLabelStrings;
|
|
41
|
+
/** Legend display style (default: 'inline') */
|
|
42
|
+
legendVariant?: LegendVariant;
|
|
43
|
+
/** Show accessible data table (visually hidden). Defaults to true. */
|
|
44
|
+
showAccessibleTable?: boolean;
|
|
45
|
+
/** Show legend below the chart. Defaults to true; false when isThumbnail is set. */
|
|
46
|
+
showLegend?: boolean;
|
|
47
|
+
/** Show tooltip on hover. Defaults to true; false when isThumbnail is set. */
|
|
48
|
+
showTooltip?: boolean;
|
|
49
|
+
/** Custom value formatter for legend items. Receives the slice value, total, and label. Defaults to showing percentage. */
|
|
50
|
+
valueFormatter?: (value: number, total: number, label: string) => string;
|
|
51
|
+
/** Chart variant (default: 'pie') */
|
|
52
|
+
variant?: PieChartVariant;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* PieChart UI component
|
|
56
|
+
*
|
|
57
|
+
* Renders a responsive pie or donut chart showing proportional data across categories.
|
|
58
|
+
*/
|
|
59
|
+
export declare const PieChart: ({ chartHeight, chartWidth, className, colorPalette, data, isLoading, isThumbnail, labelStrings, legendVariant, showAccessibleTable, showLegend, showTooltip, valueFormatter, variant, ...props }: PieChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ColorPalette } from '../shared/types';
|
|
3
|
+
import '../shared/chart-wrapper.css';
|
|
4
|
+
import './proportion-bar.css';
|
|
5
|
+
export interface ProportionSegment {
|
|
6
|
+
/** Override default token color (CSS custom property or hex). Not theme-aware — use paletteIndex instead when possible. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Display label for legend and tooltip */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Pick a specific color from the selected palette by position (1-based). Theme-aware — automatically adjusts for light/dark mode. */
|
|
11
|
+
paletteIndex?: number;
|
|
12
|
+
/** Numeric value for this segment */
|
|
13
|
+
value: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ProportionBarLabelStrings {
|
|
16
|
+
/** Accessible description for the hidden data table */
|
|
17
|
+
accessibleTableDescription?: string;
|
|
18
|
+
/** Heading for the empty state */
|
|
19
|
+
emptyStateHeading?: string;
|
|
20
|
+
/** Message body for the empty state */
|
|
21
|
+
emptyStateMessage?: string;
|
|
22
|
+
/** Loading label for screen readers */
|
|
23
|
+
loadingLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ProportionBarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
26
|
+
/** Height of the bar track in pixels (default: 16) */
|
|
27
|
+
barHeight?: number;
|
|
28
|
+
/** Maximum width of the component in pixels. The component is responsive and will shrink within this constraint. */
|
|
29
|
+
chartWidth?: number;
|
|
30
|
+
/** Color palette to use for segment colors (default: 'categorical') */
|
|
31
|
+
colorPalette?: ColorPalette;
|
|
32
|
+
/** Segment data — each segment has a label, numeric value, and optional color override */
|
|
33
|
+
data: ProportionSegment[];
|
|
34
|
+
/** Show loading skeleton */
|
|
35
|
+
isLoading?: boolean;
|
|
36
|
+
/** Thumbnail mode — hides legend and tooltip. Individual show* props can override. */
|
|
37
|
+
isThumbnail?: boolean;
|
|
38
|
+
/** Translatable UI strings for i18n. Keys: accessibleTableDescription, emptyStateHeading, emptyStateMessage, loadingLabel. */
|
|
39
|
+
labelStrings?: ProportionBarLabelStrings;
|
|
40
|
+
/** Alignment of the legend (default: 'left') */
|
|
41
|
+
legendAlignment?: 'center' | 'left';
|
|
42
|
+
/** Show accessible data table (visually hidden). Defaults to true. */
|
|
43
|
+
showAccessibleTable?: boolean;
|
|
44
|
+
/** Show legend below the bar. Defaults to true; false when isThumbnail is set. */
|
|
45
|
+
showLegend?: boolean;
|
|
46
|
+
/** Show tooltip on hover. Defaults to true; false when isThumbnail is set. */
|
|
47
|
+
showTooltip?: boolean;
|
|
48
|
+
/** Custom value formatter for legend items. Receives the segment value, total, and label. Defaults to showing percentage. */
|
|
49
|
+
valueFormatter?: (value: number, total: number, label: string) => string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* ProportionBar UI component
|
|
53
|
+
*
|
|
54
|
+
* Renders a single horizontal bar divided into colored segments, showing
|
|
55
|
+
* the composition of a total. Functions as a linearized pie chart.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ProportionBar: ({ barHeight, chartWidth, className, colorPalette, data, isLoading, isThumbnail, labelStrings, legendAlignment, showAccessibleTable, showLegend, showTooltip, valueFormatter, ...props }: ProportionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ChartDataPoint, SeriesConfig } from './types';
|
|
2
|
+
interface ChartAccessibleTableProps {
|
|
3
|
+
/** Chart data points */
|
|
4
|
+
data: ChartDataPoint[];
|
|
5
|
+
/** Accessible description for the table */
|
|
6
|
+
description: string;
|
|
7
|
+
/** Series definitions */
|
|
8
|
+
series: SeriesConfig[];
|
|
9
|
+
/** Optional value formatter */
|
|
10
|
+
valueFormatter?: (value: number) => string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders a visually-hidden HTML table containing chart data
|
|
14
|
+
* for screen reader accessibility.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ChartAccessibleTable: ({ data, description, series, valueFormatter, }: ChartAccessibleTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChartDataPoint, SeriesConfig } from './types';
|
|
2
|
+
import './chart-legend.css';
|
|
3
|
+
export type LegendVariant = 'inline' | 'table';
|
|
4
|
+
interface ChartLegendProps {
|
|
5
|
+
/** Chart data — used to calculate totals for table variant */
|
|
6
|
+
data?: ChartDataPoint[];
|
|
7
|
+
/** Series definitions */
|
|
8
|
+
series: SeriesConfig[];
|
|
9
|
+
/** Colors resolved from tokens */
|
|
10
|
+
seriesColors: string[];
|
|
11
|
+
/** Table header for the totals column */
|
|
12
|
+
tableHeader?: string;
|
|
13
|
+
/** Formatter for total values in table variant */
|
|
14
|
+
valueFormatter?: (value: number) => string;
|
|
15
|
+
/** Legend display style (default: 'inline') */
|
|
16
|
+
variant?: LegendVariant;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* ChartLegend component
|
|
20
|
+
*
|
|
21
|
+
* Renders a chart legend in either inline (horizontal list) or
|
|
22
|
+
* table (rows with totals) format.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ChartLegend: ({ data, series, seriesColors, tableHeader, valueFormatter, variant, }: ChartLegendProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LegendVariant } from './types';
|
|
2
|
+
export interface ChartSkeletonProps {
|
|
3
|
+
/** Optional border radius for the skeleton bar area (e.g. 'var(--pds-border-radius-bar)'). When provided, a rectangular skeleton is clipped to this radius. */
|
|
4
|
+
borderRadius?: string;
|
|
5
|
+
height: number;
|
|
6
|
+
/** Alignment of the inline legend skeleton (default: 'center') */
|
|
7
|
+
legendAlignment?: 'center' | 'left';
|
|
8
|
+
legendVariant?: LegendVariant;
|
|
9
|
+
showLegend?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ChartSkeleton: ({ borderRadius, height, legendAlignment, legendVariant, showLegend, }: ChartSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import type { ColorPalette } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Strips fill-only steps from palettes that have them, returning only standalone-safe colors.
|
|
5
|
+
* Bar and line charts should always use this before rendering series colors.
|
|
6
|
+
*/
|
|
7
|
+
export declare const toStandaloneColors: (palette: ColorPalette, colors: string[]) => string[];
|
|
8
|
+
/**
|
|
9
|
+
* Normalizes a paletteIndex for palettes that have fill-only steps.
|
|
10
|
+
* Clamps fill-only step numbers (e.g. 1–2 on sequential-iris/multi) to the first safe step,
|
|
11
|
+
* then adjusts for the slice offset so the number still maps correctly into the sliced array.
|
|
12
|
+
* Non-restricted palettes pass through unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export declare const clampPaletteIndex: (palette: ColorPalette, paletteIndex: number | undefined) => number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Get color for a series by index, cycling through palette if needed.
|
|
17
|
+
* Priority: customColor (hex) > paletteIndex (theme-aware) > auto-assigned.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getSeriesColor: (index: number, palette: string[], customColor?: string, paletteIndex?: number) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve palette token colors from computed styles on an element.
|
|
22
|
+
* Falls back to hex values if tokens are not available.
|
|
23
|
+
*/
|
|
24
|
+
export declare const resolveTokenColors: (element: HTMLElement | null, paletteName: ColorPalette) => string[];
|
|
25
|
+
/**
|
|
26
|
+
* Hook to resolve chart colors from design tokens at runtime.
|
|
27
|
+
* Falls back to hex values when tokens are not loaded (e.g., SSR).
|
|
28
|
+
* Re-resolves when the theme changes (via data-theme attribute).
|
|
29
|
+
*/
|
|
30
|
+
export declare const useChartColors: (containerRef: RefObject<HTMLElement | null>, paletteName?: ColorPalette) => string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Recharts style configuration using PDS design tokens.
|
|
3
|
+
* Keeps all chart styling in one place rather than split between CSS and JS.
|
|
4
|
+
*/
|
|
5
|
+
export declare const axisTickStyle: {
|
|
6
|
+
fill: string;
|
|
7
|
+
fontFamily: string;
|
|
8
|
+
fontSize: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const axisLabelStyle: {
|
|
11
|
+
fill: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
fontSize: string;
|
|
14
|
+
fontWeight: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const gridStroke = "var(--pds-color-border-default)";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format a number with K/M/B suffixes for chart axis labels.
|
|
3
|
+
*/
|
|
4
|
+
export declare const formatCompactNumber: (value: number) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Format a number with locale-aware thousand separators.
|
|
7
|
+
*/
|
|
8
|
+
export declare const formatLocaleNumber: (value: number) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Format a number as a percentage.
|
|
11
|
+
*/
|
|
12
|
+
export declare const formatPercent: (value: number) => string;
|