@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
|
@@ -1,27 +1,257 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import './table.css';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
3
|
+
export type SortOrder = 'asc' | 'desc';
|
|
4
|
+
export type DetailPanelContext = {
|
|
5
|
+
/** Whether there is a next row to navigate to. */
|
|
6
|
+
hasNext: boolean;
|
|
7
|
+
/** Whether there is a previous row to navigate to. */
|
|
8
|
+
hasPrev: boolean;
|
|
9
|
+
/** Close the detail panel. */
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
/** Navigate to the next row. */
|
|
12
|
+
onNext: () => void;
|
|
13
|
+
/** Navigate to the previous row. */
|
|
14
|
+
onPrev: () => void;
|
|
15
|
+
/** Stable ID of the currently inspected row. */
|
|
16
|
+
rowId: string;
|
|
17
|
+
};
|
|
18
|
+
export interface TableColumn {
|
|
19
|
+
/** Content to display in the header cell. */
|
|
20
|
+
header: ReactNode;
|
|
21
|
+
/** Stable identifier used for rendering cell content from rowData. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** When true, renders a sort button next to the header label. */
|
|
24
|
+
sortable?: boolean;
|
|
7
25
|
/**
|
|
8
|
-
*
|
|
26
|
+
* Key to use for sorting instead of `id`. Use when the cell renders a
|
|
27
|
+
* ReactNode but a separate plain-text field in rowData should drive the sort.
|
|
9
28
|
*/
|
|
29
|
+
sortKey?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TableProps extends ComponentPropsWithoutRef<'table'> {
|
|
32
|
+
/** Additional class names */
|
|
10
33
|
className?: string;
|
|
11
34
|
/**
|
|
12
|
-
*
|
|
35
|
+
* Accessible label for the detail panel close button.
|
|
36
|
+
* Defaults to `'Close detail panel'`. Override for translation.
|
|
37
|
+
*/
|
|
38
|
+
closeDetailPanelLabel?: string;
|
|
39
|
+
/** Column definitions. Each column requires a stable `id`. */
|
|
40
|
+
columns: TableColumn[];
|
|
41
|
+
/**
|
|
42
|
+
* Current page number (1-based). Providing this alongside `onPageChange`
|
|
43
|
+
* enables controlled pagination mode.
|
|
44
|
+
*/
|
|
45
|
+
currentPage?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Column id to sort by on initial render. Only applies in uncontrolled sort mode.
|
|
48
|
+
* Like `defaultValue` in HTML inputs, this is mount-only — changing it after mount
|
|
49
|
+
* has no effect. Use `sortKey` + `onSort` for controlled sort.
|
|
50
|
+
*/
|
|
51
|
+
defaultSortKey?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Initial sort direction when `defaultSortKey` is set. Defaults to `'asc'`.
|
|
54
|
+
* Only applies in uncontrolled sort mode.
|
|
55
|
+
*/
|
|
56
|
+
defaultSortOrder?: SortOrder;
|
|
57
|
+
/**
|
|
58
|
+
* When `true` (default), renders built-in prev/next navigation buttons in
|
|
59
|
+
* the detail panel footer. Set to `false` to hide the footer entirely.
|
|
60
|
+
* Has no effect when `renderDetailPanelFooter` is provided — the custom
|
|
61
|
+
* footer always takes precedence.
|
|
62
|
+
*/
|
|
63
|
+
detailPanelNav?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Optional title displayed in the detail panel header, to the left of the
|
|
66
|
+
* close button.
|
|
67
|
+
*/
|
|
68
|
+
detailPanelTitle?: ReactNode;
|
|
69
|
+
/**
|
|
70
|
+
* Custom width for the detail panel. Accepts any valid CSS value (e.g. `'20rem'`, `'400px'`).
|
|
71
|
+
* Defaults to `'20rem'`.
|
|
72
|
+
*/
|
|
73
|
+
detailPanelWidth?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Custom empty state rendered when `rowData` is empty and `isLoading` is false.
|
|
76
|
+
* When provided, takes precedence over `emptyStateHeading` and `emptyStateMessage`.
|
|
77
|
+
*/
|
|
78
|
+
emptyState?: ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* Heading text for the default empty state. Defaults to `"No results found."`
|
|
81
|
+
* Override for translation or context-specific messaging.
|
|
82
|
+
*/
|
|
83
|
+
emptyStateHeading?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Optional message displayed below the heading in the default empty state.
|
|
86
|
+
*/
|
|
87
|
+
emptyStateMessage?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Optional content rendered below the table, outside the scroll area.
|
|
90
|
+
* Use for status bars, custom controls, or other table-level UI. Renders
|
|
91
|
+
* independently of and below the pagination footer when both are present.
|
|
92
|
+
*/
|
|
93
|
+
footer?: ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Returns the accessible label for each option in the rows-per-page selector.
|
|
96
|
+
* Defaults to `(size) => \`Show ${size} rows per page\``.
|
|
97
|
+
* Override for translation.
|
|
98
|
+
*/
|
|
99
|
+
getPageSizeLabel?: (size: number) => string;
|
|
100
|
+
/**
|
|
101
|
+
* Returns an additional CSS class name to apply to a row's `<tr>` element.
|
|
102
|
+
* Use for per-row status coloring or other conditional styling.
|
|
103
|
+
* Receives the row data object and its stable row ID (from `getRowId`).
|
|
104
|
+
*/
|
|
105
|
+
getRowClassName?: (row: Record<string, ReactNode>, rowId: string) => string | null | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Derives a stable string ID from a row object for selection tracking.
|
|
108
|
+
* Defaults to the row's array index. Provide this when using pagination
|
|
109
|
+
* to preserve selection across page changes.
|
|
110
|
+
*/
|
|
111
|
+
getRowId?: (row: Record<string, ReactNode>) => string;
|
|
112
|
+
/**
|
|
113
|
+
* Returns the visually hidden accessible label for each row's checkbox.
|
|
114
|
+
* Receives the row object and its 1-based display index.
|
|
115
|
+
* Defaults to `(_row, index) => \`Select row ${index}\``.
|
|
116
|
+
* Override to include a meaningful identifier (e.g. the site name) for
|
|
117
|
+
* screen reader users who navigate through checkboxes.
|
|
118
|
+
*/
|
|
119
|
+
getSelectRowLabel?: (row: Record<string, ReactNode>, index: number) => string;
|
|
120
|
+
/**
|
|
121
|
+
* Returns the accessible label for a column's sort button.
|
|
122
|
+
* Defaults to `(columnHeader) => \`Sort by ${columnHeader}\``.
|
|
123
|
+
* Override for translation.
|
|
124
|
+
*/
|
|
125
|
+
getSortLabel?: (columnHeader: string) => string;
|
|
126
|
+
/**
|
|
127
|
+
* ID of the currently inspected row. When provided, that row receives a
|
|
128
|
+
* highlighted background. Use the same ID space as `getRowId`. Only
|
|
129
|
+
* meaningful when `onRowInspect` or `renderDetailPanel` is also provided.
|
|
130
|
+
*/
|
|
131
|
+
inspectedRowId?: string;
|
|
132
|
+
/**
|
|
133
|
+
* When true, renders skeleton rows instead of data. Use while data is loading.
|
|
134
|
+
*/
|
|
135
|
+
isLoading?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Number of items per page. Required to enable pagination.
|
|
138
|
+
* In uncontrolled pagination mode the Table slices `rowData` internally.
|
|
139
|
+
* In controlled mode the consumer passes the current page slice as `rowData`.
|
|
140
|
+
*/
|
|
141
|
+
itemsPerPage?: number;
|
|
142
|
+
/**
|
|
143
|
+
* Number of skeleton rows to render when `isLoading` is true. Defaults to 5.
|
|
144
|
+
*/
|
|
145
|
+
loadingRowCount?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Accessible label for the detail panel "next row" button.
|
|
148
|
+
* Defaults to `'Next row'`. Override for translation.
|
|
149
|
+
*/
|
|
150
|
+
nextDetailPanelRowLabel?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Called after the detail panel navigates to the next row. Use for side
|
|
153
|
+
* effects (fetching data, analytics) — the built-in navigation still runs.
|
|
154
|
+
*/
|
|
155
|
+
onDetailPanelNext?: (row: Record<string, ReactNode>, rowId: string) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Called after the detail panel navigates to the previous row. Use for side
|
|
158
|
+
* effects (fetching data, analytics) — the built-in navigation still runs.
|
|
159
|
+
*/
|
|
160
|
+
onDetailPanelPrev?: (row: Record<string, ReactNode>, rowId: string) => void;
|
|
161
|
+
/**
|
|
162
|
+
* Callback fired when the user navigates to a new page. Receives the new
|
|
163
|
+
* 1-based page number. Providing this prop enables controlled pagination mode.
|
|
164
|
+
*/
|
|
165
|
+
onPageChange?: (page: number) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Callback fired when the user changes the rows-per-page value.
|
|
168
|
+
* When provided alongside `pageSizeOptions`, enables controlled page size mode.
|
|
169
|
+
* In uncontrolled mode the Table manages page size internally.
|
|
170
|
+
*/
|
|
171
|
+
onPageSizeChange?: (size: number) => void;
|
|
172
|
+
/**
|
|
173
|
+
* Callback fired when a row is clicked for inspection. Providing this prop
|
|
174
|
+
* makes rows clickable and enables the row detail drawer pattern.
|
|
175
|
+
* Receives the row data object and its stable row ID (from `getRowId`).
|
|
176
|
+
*/
|
|
177
|
+
onRowInspect?: (row: Record<string, ReactNode>, rowId: string) => void;
|
|
178
|
+
/**
|
|
179
|
+
* Callback fired when row selection changes. Providing this prop enables
|
|
180
|
+
* the checkbox column. Receives the full array of currently selected row IDs.
|
|
181
|
+
* Note: in uncontrolled selection mode, IDs of rows removed from `rowData`
|
|
182
|
+
* (e.g. after filtering) remain in the internal selection set. Clear selection
|
|
183
|
+
* explicitly when filtering if stale IDs are a concern.
|
|
184
|
+
*/
|
|
185
|
+
onRowSelectionChange?: (ids: string[]) => void;
|
|
186
|
+
/**
|
|
187
|
+
* Callback fired when a sortable header is clicked. Providing this prop
|
|
188
|
+
* enables controlled sort mode — the component will not sort `rowData`
|
|
189
|
+
* internally and expects the parent to pass pre-sorted data.
|
|
190
|
+
*/
|
|
191
|
+
onSort?: (key: string, order: SortOrder) => void;
|
|
192
|
+
/**
|
|
193
|
+
* Render prop for the detail panel content. When provided, clicking a row
|
|
194
|
+
* slides in an inline detail panel alongside the table. Receives the row
|
|
195
|
+
* data and a context object with navigation callbacks and state.
|
|
196
|
+
* See the [Row detail panel](/docs/components-table--row-detail-panel) story.
|
|
197
|
+
*/
|
|
198
|
+
/**
|
|
199
|
+
* Available page size options rendered in the rows-per-page selector.
|
|
200
|
+
* When provided, the selector is shown to the left of the pagination controls.
|
|
201
|
+
*/
|
|
202
|
+
pageSizeOptions?: number[];
|
|
203
|
+
/**
|
|
204
|
+
* When true, renders the table inside a Panel with no padding. Automatically
|
|
205
|
+
* applies first-column spacing and removes the last row's bottom border so
|
|
206
|
+
* it doesn't double up against the footer border.
|
|
207
|
+
*/
|
|
208
|
+
panel?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Accessible label for the detail panel "previous row" button.
|
|
211
|
+
* Defaults to `'Previous row'`. Override for translation.
|
|
212
|
+
*/
|
|
213
|
+
prevDetailPanelRowLabel?: string;
|
|
214
|
+
/**
|
|
215
|
+
* Render prop for the detail panel content. When provided, clicking a row
|
|
216
|
+
* slides in an inline detail panel alongside the table. Receives the row
|
|
217
|
+
* data and a context object with navigation callbacks and state.
|
|
218
|
+
* See the [Row detail panel](/docs/components-table--row-detail-panel) story.
|
|
219
|
+
*/
|
|
220
|
+
renderDetailPanel?: (row: Record<string, ReactNode>, context: DetailPanelContext) => ReactNode;
|
|
221
|
+
/**
|
|
222
|
+
* Optional content rendered at the bottom of the detail panel, outside the
|
|
223
|
+
* scrollable content area. Use for navigation controls, action buttons, or
|
|
224
|
+
* other panel-level UI. The consumer is responsible for all styling including
|
|
225
|
+
* any separator between content and footer.
|
|
226
|
+
*/
|
|
227
|
+
renderDetailPanelFooter?: (row: Record<string, ReactNode>, context: DetailPanelContext) => ReactNode;
|
|
228
|
+
/**
|
|
229
|
+
* Row data as an array of records keyed by column id.
|
|
230
|
+
* In controlled pagination mode, pass only the current page's rows.
|
|
231
|
+
*/
|
|
232
|
+
rowData: Array<Record<string, ReactNode>>;
|
|
233
|
+
/**
|
|
234
|
+
* Visually hidden accessible label for the select-all header checkbox.
|
|
235
|
+
* Defaults to `'Select all rows'`. Override for translation.
|
|
236
|
+
*/
|
|
237
|
+
selectAllLabel?: string;
|
|
238
|
+
/**
|
|
239
|
+
* Controlled selected row IDs. When provided alongside `onRowSelectionChange`,
|
|
240
|
+
* enables controlled selection mode.
|
|
241
|
+
*/
|
|
242
|
+
selectedRows?: string[];
|
|
243
|
+
/**
|
|
244
|
+
* Controlled sort column id. Only used when `onSort` is provided.
|
|
245
|
+
*/
|
|
246
|
+
sortKey?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Controlled sort direction. Only used when `onSort` is provided.
|
|
13
249
|
*/
|
|
14
|
-
|
|
15
|
-
sortable?: boolean;
|
|
16
|
-
title: ReactNode;
|
|
17
|
-
}>;
|
|
250
|
+
sortOrder?: SortOrder;
|
|
18
251
|
/**
|
|
19
|
-
*
|
|
252
|
+
* Total number of items across all pages. Required in controlled pagination
|
|
253
|
+
* mode so the Pagination component can compute the page count.
|
|
20
254
|
*/
|
|
21
|
-
|
|
255
|
+
totalItemCount?: number;
|
|
22
256
|
}
|
|
23
|
-
|
|
24
|
-
* Table UI component
|
|
25
|
-
*/
|
|
26
|
-
export declare const Table: ({ className, headers, rowData, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export {};
|
|
257
|
+
export declare const Table: ({ className, closeDetailPanelLabel, columns, currentPage, defaultSortKey, defaultSortOrder, detailPanelNav, detailPanelTitle, detailPanelWidth, emptyState, emptyStateHeading, emptyStateMessage, footer, getPageSizeLabel, getRowClassName, getRowId, getSelectRowLabel, getSortLabel, inspectedRowId, isLoading, itemsPerPage, loadingRowCount, nextDetailPanelRowLabel, onDetailPanelNext, onDetailPanelPrev, onPageChange, onPageSizeChange, onRowInspect, onRowSelectionChange, onSort, pageSizeOptions, panel, prevDetailPanelRowLabel, renderDetailPanel, renderDetailPanelFooter, rowData, selectAllLabel, selectedRows, sortKey, sortOrder, totalItemCount, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { HeadingLevelCommon } from '../../libs/types/custom-types';
|
|
3
3
|
import './table-of-contents.css';
|
|
4
|
-
|
|
5
|
-
* Prop types for TableOfContents
|
|
6
|
-
*/
|
|
7
|
-
interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {
|
|
4
|
+
export interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {
|
|
8
5
|
/**
|
|
9
6
|
* Whether to append the id to the URL when a link is clicked.
|
|
10
7
|
*/
|
|
@@ -42,4 +39,3 @@ interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {
|
|
|
42
39
|
* TableOfContents UI component
|
|
43
40
|
*/
|
|
44
41
|
export declare const TableOfContents: ({ appendIds, ariaLabel, className, headingLevel, headingText, ignoreClass, showHeading, sourceID, ...props }: TableOfContentsProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import './tag.css';
|
|
3
|
-
export declare const tagColors:
|
|
4
|
-
type
|
|
3
|
+
export declare const tagColors: readonly ["orange", "stone", "gold", "lime", "mint", "teal", "sky", "slate", "indigo", "purple", "magenta", "rose", "red", "silver"];
|
|
4
|
+
type TagMutedColor = (typeof tagColors)[number];
|
|
5
|
+
export declare const tagSolidColors: readonly ["orange-solid", "teal-solid", "indigo-solid", "magenta-solid", "rose-solid", "success-solid", "warning-solid", "critical-solid", "info-solid", "discovery-solid"];
|
|
6
|
+
type TagSolidColor = (typeof tagSolidColors)[number];
|
|
7
|
+
export type TagColor = TagMutedColor | TagSolidColor;
|
|
8
|
+
export type TagSize = 'xs' | 's' | 'm';
|
|
5
9
|
interface TagProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
10
|
/**
|
|
7
11
|
* Additional class names
|
|
@@ -23,6 +27,10 @@ interface TagProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
23
27
|
* Label for the remove button. Tag text will be appended to this label.
|
|
24
28
|
*/
|
|
25
29
|
removeLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Size of the tag.
|
|
32
|
+
*/
|
|
33
|
+
size?: TagSize;
|
|
26
34
|
/**
|
|
27
35
|
* Tag color. Will use random color if not selected.
|
|
28
36
|
*/
|
|
@@ -31,9 +39,15 @@ interface TagProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
31
39
|
* Tag text
|
|
32
40
|
*/
|
|
33
41
|
tagLabel: string;
|
|
42
|
+
/**
|
|
43
|
+
* Maximum number of characters before truncation. Set to 0 to disable
|
|
44
|
+
* truncation entirely. Defaults to 20. Most use cases should keep the
|
|
45
|
+
* default, especially in multi-tag contexts.
|
|
46
|
+
*/
|
|
47
|
+
truncationLength?: number;
|
|
34
48
|
}
|
|
35
49
|
/**
|
|
36
50
|
* Tag UI component
|
|
37
51
|
*/
|
|
38
|
-
export declare const Tag: ({ className, isRemovable, linkContent, onRemove, removeLabel, tagColor, tagLabel, ...props }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare const Tag: ({ className, isRemovable, linkContent, onRemove, removeLabel, size, tagColor, tagLabel, truncationLength, ...props }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
53
|
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SegmentedButtonSize } from '../buttons/SegmentedButton/SegmentedButton';
|
|
2
3
|
import './theme-switcher.css';
|
|
4
|
+
type Theme = 'light' | 'dark' | 'system';
|
|
5
|
+
type ThemeSwitcherVariant = 'dropdown' | 'toggle';
|
|
3
6
|
/**
|
|
4
7
|
* Prop types for ThemeSwitcher
|
|
5
8
|
*/
|
|
@@ -9,24 +12,42 @@ export interface ThemeSwitcherProps extends Omit<ComponentPropsWithoutRef<'div'>
|
|
|
9
12
|
*/
|
|
10
13
|
className?: string;
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
13
|
-
*/
|
|
14
|
-
onChange?: (theme: 'light' | 'dark' | 'system') => void;
|
|
15
|
-
/**
|
|
16
|
-
* The current theme
|
|
15
|
+
* ID for the menu button. Must be unique if multiple ThemeSwitchers are rendered.
|
|
17
16
|
*/
|
|
18
|
-
|
|
17
|
+
id?: string;
|
|
19
18
|
/**
|
|
20
19
|
* Translation strings for theme options
|
|
21
20
|
*/
|
|
22
|
-
|
|
21
|
+
labelStrings?: {
|
|
23
22
|
dark: string;
|
|
24
23
|
light: string;
|
|
25
24
|
system: string;
|
|
26
25
|
tooltip?: string;
|
|
27
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Callback triggered when the theme changes
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (theme: Theme) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Size of the control. Only applies to the `'toggle'` variant, where it is
|
|
33
|
+
* passed through to the underlying SegmentedButton. Defaults to `'m'`.
|
|
34
|
+
*/
|
|
35
|
+
size?: SegmentedButtonSize;
|
|
36
|
+
/**
|
|
37
|
+
* The current theme
|
|
38
|
+
*/
|
|
39
|
+
theme?: Theme;
|
|
40
|
+
/**
|
|
41
|
+
* Presentation of the switcher. `'toggle'` (default) renders an icon-only
|
|
42
|
+
* segmented control — best for authenticated apps where the choice persists
|
|
43
|
+
* (for example, nested in the user menu). `'dropdown'` renders an icon-only
|
|
44
|
+
* menu button with a tooltip — best for global navigation and anonymous
|
|
45
|
+
* users who can't persist a preference.
|
|
46
|
+
*/
|
|
47
|
+
variant?: ThemeSwitcherVariant;
|
|
28
48
|
}
|
|
29
49
|
/**
|
|
30
50
|
* ThemeSwitcher UI component
|
|
31
51
|
*/
|
|
32
|
-
export declare const ThemeSwitcher: ({ className, onChange, theme,
|
|
52
|
+
export declare const ThemeSwitcher: ({ className, id, labelStrings, onChange, size, theme, variant, ...props }: ThemeSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export {};
|
|
@@ -15,6 +15,10 @@ interface TooltipProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
15
15
|
* String or HTML content to use as the trigger instead of an icon. Leave null to use the icon.
|
|
16
16
|
*/
|
|
17
17
|
customTrigger?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* When true, the tooltip will not show on focus — only on hover.
|
|
20
|
+
*/
|
|
21
|
+
disableFocusTrigger?: boolean;
|
|
18
22
|
/**
|
|
19
23
|
* The spacing between the trigger and the tooltip in pixels. Use the default value (in most cases) when using an icon trigger.
|
|
20
24
|
*/
|
|
@@ -30,7 +34,7 @@ interface TooltipProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
30
34
|
/**
|
|
31
35
|
* Icon to trigger tooltip
|
|
32
36
|
*/
|
|
33
|
-
triggerIcon?: 'circleInfo' | 'circleQuestion' | '
|
|
37
|
+
triggerIcon?: 'circleExclamation' | 'circleExclamationSolid' | 'circleInfo' | 'circleInfoSolid' | 'circleQuestion' | 'circleQuestionSolid';
|
|
34
38
|
/**
|
|
35
39
|
* Color of the trigger icon. Uses PDS default text color options.
|
|
36
40
|
*/
|
|
@@ -47,5 +51,5 @@ interface TooltipProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
47
51
|
/**
|
|
48
52
|
* Tooltip UI component
|
|
49
53
|
*/
|
|
50
|
-
export declare const Tooltip: ({ className, content, customTrigger, offsetValue, preferredPlacement, triggerAccessibleText, triggerIcon, triggerIconColor, triggerIconSize, zIndex, ...props }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare const Tooltip: ({ className, content, customTrigger, disableFocusTrigger, offsetValue, preferredPlacement, triggerAccessibleText, triggerIcon, triggerIconColor, triggerIconSize, zIndex, ...props }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
55
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { PaddingScale } from '../../libs/types/layout-types';
|
|
3
|
+
import './utility-bar.css';
|
|
4
|
+
type UtilityBarBackground = 'default' | 'default-secondary' | 'transparent';
|
|
5
|
+
export interface UtilityBarProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Background color of the utility bar.
|
|
8
|
+
*/
|
|
9
|
+
backgroundColor?: UtilityBarBackground;
|
|
10
|
+
/**
|
|
11
|
+
* Child elements assigned to named slots.
|
|
12
|
+
* - `items-left` — left-side content (e.g. search input)
|
|
13
|
+
* - `items-right` — right-side controls (e.g. icon buttons)
|
|
14
|
+
*/
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Additional class names.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Internal padding. Defaults to 'none'.
|
|
22
|
+
*/
|
|
23
|
+
padding?: PaddingScale;
|
|
24
|
+
}
|
|
25
|
+
export declare const UtilityBar: ({ backgroundColor, children, className, padding, ...props }: UtilityBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './badge.css';
|
|
3
|
+
export type BadgeColor = 'brand' | 'brand-muted' | 'critical' | 'critical-muted' | 'discovery' | 'discovery-muted' | 'gold' | 'gold-muted' | 'indigo' | 'indigo-muted' | 'info' | 'info-muted' | 'ink' | 'ink-muted' | 'lime' | 'lime-muted' | 'orange' | 'orange-muted' | 'rose' | 'rose-muted' | 'silver' | 'silver-muted' | 'sky' | 'sky-muted' | 'slate' | 'slate-muted' | 'stone' | 'stone-muted' | 'success' | 'success-muted' | 'warning' | 'warning-muted';
|
|
4
|
+
/**
|
|
5
|
+
* Badge component props
|
|
6
|
+
*/
|
|
7
|
+
export interface BadgeProps extends ComponentPropsWithoutRef<'span'> {
|
|
8
|
+
/**
|
|
9
|
+
* Additional class names
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Badge color
|
|
14
|
+
*/
|
|
15
|
+
color: BadgeColor;
|
|
16
|
+
/**
|
|
17
|
+
* Badge text or content.
|
|
18
|
+
*/
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Badge size
|
|
22
|
+
*/
|
|
23
|
+
size?: 'xs' | 's' | 'm';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Badge UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const Badge: ({ className, color, label, size, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,8 +27,9 @@ export interface StatusBadgeProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
27
27
|
statusIndicatorText?: string;
|
|
28
28
|
/**
|
|
29
29
|
* Status type for badge. Only renders if `hasStatusIndicator` is true.
|
|
30
|
+
* Use `'working'` to show a spinner in place of the status dot.
|
|
30
31
|
*/
|
|
31
|
-
statusType?: StatusType | 'frozen' | 'disabled';
|
|
32
|
+
statusType?: StatusType | 'frozen' | 'disabled' | 'working';
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
35
|
* StatusBadge UI component
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { StatusDotType } from '../../../libs/components/StatusDot/StatusDot';
|
|
2
3
|
import { ButtonDisplayType, ButtonSize, ButtonType, ButtonVariant } from '../../../libs/types/custom-types';
|
|
4
|
+
import { TallyProps } from '../../badges/Tally/Tally';
|
|
3
5
|
import { PDSIcon } from '../../icons/Icon/Icon';
|
|
4
6
|
import './button.css';
|
|
5
7
|
interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
@@ -56,6 +58,19 @@ interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
56
58
|
* @default 's'
|
|
57
59
|
*/
|
|
58
60
|
size?: ButtonSize;
|
|
61
|
+
/**
|
|
62
|
+
* A status dot displayed in the left icon slot. Mutually exclusive with `iconName` when `displayType` is `icon-start`.
|
|
63
|
+
* Only valid on `primary`, `secondary`, and `subtle` variants.
|
|
64
|
+
*/
|
|
65
|
+
statusDot?: StatusDotType;
|
|
66
|
+
/**
|
|
67
|
+
* A tally badge displayed in the right icon slot. Mutually exclusive with `iconName` when `displayType` is `icon-end`.
|
|
68
|
+
* Only valid on `primary`, `secondary`, `subtle`, and `highlight` variants.
|
|
69
|
+
*/
|
|
70
|
+
tally?: {
|
|
71
|
+
label: TallyProps['label'];
|
|
72
|
+
type: TallyProps['type'];
|
|
73
|
+
};
|
|
59
74
|
/**
|
|
60
75
|
* Text for an optional tooltip to be displayed when the button is `disabled`, `isLoading`, or `isWorking`.
|
|
61
76
|
*/
|
|
@@ -3,7 +3,6 @@ import { ButtonDisplayType, ButtonSize, ButtonVariant } from '../../../libs/type
|
|
|
3
3
|
import { PDSIcon } from '../../icons/Icon/Icon';
|
|
4
4
|
import '../Button/button.css';
|
|
5
5
|
import './button-link.css';
|
|
6
|
-
type ButtonLinkVariant = Exclude<ButtonVariant, 'navbar' | 'inline'>;
|
|
7
6
|
/**
|
|
8
7
|
* Prop types for ButtonLink
|
|
9
8
|
*/
|
|
@@ -39,10 +38,9 @@ export interface ButtonLinkProps extends ComponentPropsWithoutRef<'span'> {
|
|
|
39
38
|
/**
|
|
40
39
|
* Variant of the button.
|
|
41
40
|
*/
|
|
42
|
-
variant?:
|
|
41
|
+
variant?: ButtonVariant;
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
44
|
* ButtonLink UI component
|
|
46
45
|
*/
|
|
47
46
|
export declare const ButtonLink: ({ className, disabled, displayType, iconName, linkContent, size, tooltipText, variant, ...props }: ButtonLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export {};
|
|
@@ -19,6 +19,10 @@ export interface ClipboardButtonProps extends ComponentPropsWithoutRef<'button'>
|
|
|
19
19
|
* Is the button disabled?
|
|
20
20
|
*/
|
|
21
21
|
disabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Show a visible border around the button.
|
|
24
|
+
*/
|
|
25
|
+
hasBorder?: boolean;
|
|
22
26
|
/**
|
|
23
27
|
* Which variant of button to render.
|
|
24
28
|
*/
|
|
@@ -27,4 +31,4 @@ export interface ClipboardButtonProps extends ComponentPropsWithoutRef<'button'>
|
|
|
27
31
|
/**
|
|
28
32
|
* ClipboardButton UI component
|
|
29
33
|
*/
|
|
30
|
-
export declare const ClipboardButton: ({ ariaLabel, className, clipboardText, disabled, variant, ...props }: ClipboardButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const ClipboardButton: ({ ariaLabel, className, clipboardText, disabled, hasBorder, variant, ...props }: ClipboardButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import './close-button.css';
|
|
3
3
|
/**
|
|
4
4
|
* Prop types for CloseButton
|
|
@@ -15,11 +15,11 @@ export interface CloseButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
15
15
|
/**
|
|
16
16
|
* Click event callback function.
|
|
17
17
|
*/
|
|
18
|
-
onClick?: () => void;
|
|
18
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
19
19
|
/**
|
|
20
|
-
* Size of the
|
|
20
|
+
* Size of the button.
|
|
21
21
|
*/
|
|
22
|
-
size?: '
|
|
22
|
+
size?: 's' | 'm' | 'l';
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* CloseButton UI component
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import './filter-button.css';
|
|
2
|
+
/**
|
|
3
|
+
* A single option the FilterButton can filter by.
|
|
4
|
+
*/
|
|
5
|
+
export interface FilterButtonOption {
|
|
6
|
+
/**
|
|
7
|
+
* Whether this option is disabled.
|
|
8
|
+
*/
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Visible label for the option.
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Unique value used for selection.
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Prop types for FilterButton
|
|
21
|
+
*/
|
|
22
|
+
export interface FilterButtonProps {
|
|
23
|
+
/**
|
|
24
|
+
* Additional class names.
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Text for the clear action in the panel footer.
|
|
29
|
+
*/
|
|
30
|
+
clearLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Disable the entire control.
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The filter key/dimension name shown in the trigger (e.g. "Status").
|
|
37
|
+
*/
|
|
38
|
+
filterKey: string;
|
|
39
|
+
/**
|
|
40
|
+
* id applied to the trigger button.
|
|
41
|
+
*/
|
|
42
|
+
id?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Show the in-menu search input once the number of options reaches this
|
|
45
|
+
* threshold. Defaults to `8`. Set to `0` to always show it.
|
|
46
|
+
*/
|
|
47
|
+
minFilterItems?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Text shown when the search finds no matching options.
|
|
50
|
+
*/
|
|
51
|
+
noResultsText?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Called with the next selected values whenever the selection changes.
|
|
54
|
+
*/
|
|
55
|
+
onSelectionChange: (values: string[]) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Options the user can filter by.
|
|
58
|
+
*/
|
|
59
|
+
options: FilterButtonOption[];
|
|
60
|
+
/**
|
|
61
|
+
* Accessible label for the search input.
|
|
62
|
+
*/
|
|
63
|
+
searchLabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Placeholder for the search input.
|
|
66
|
+
*/
|
|
67
|
+
searchPlaceholder?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Currently selected option values (controlled).
|
|
70
|
+
*/
|
|
71
|
+
selectedValues: string[];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* FilterButton — a multiselect filter with a stateful trigger, designed to sit
|
|
75
|
+
* in a UtilityBar above a Table. Composes the Dropdown compound component
|
|
76
|
+
* (checkbox items + a search row + a Clear footer) behind a trigger with three
|
|
77
|
+
* states: default, single selection, and multiple selections (with a count).
|
|
78
|
+
*
|
|
79
|
+
* Selection is controlled: pass `selectedValues` and handle `onSelectionChange`.
|
|
80
|
+
* The consuming app owns filtering the data with those values.
|
|
81
|
+
*/
|
|
82
|
+
export declare const FilterButton: ({ className, clearLabel, disabled, filterKey, id, minFilterItems, noResultsText, onSelectionChange, options, searchLabel, searchPlaceholder, selectedValues, }: FilterButtonProps) => import("react/jsx-runtime").JSX.Element;
|