@pantheon-systems/pds-toolkit-react 2.0.0-alpha.2 → 2.0.0-alpha.20
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/README.md +3 -3
- package/dist/components/Avatar/Avatar.d.ts +6 -2
- package/dist/components/ComparisonList/ComparisonList.d.ts +10 -1
- package/dist/components/Drawer/Drawer.d.ts +58 -0
- package/dist/components/Dropdown/Dropdown.d.ts +140 -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/Modal/Modal.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts +5 -1
- package/dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +1 -1
- 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 +10 -19
- package/dist/components/Tabs/Tabs.d.ts +6 -1
- package/dist/components/Tag/Tag.d.ts +7 -2
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +14 -8
- package/dist/components/Tooltip/Tooltip.d.ts +5 -1
- package/dist/components/badges/Badge/Badge.d.ts +28 -0
- package/dist/components/buttons/CloseButton/CloseButton.d.ts +6 -6
- package/dist/components/buttons/IconButton/IconButton.d.ts +4 -0
- package/dist/components/buttons/MenuButton/MenuButton.d.ts +2 -7
- package/dist/components/cards/Card/Card.d.ts +1 -1
- package/dist/components/cards/NewSiteCard/NewSiteCard.d.ts +1 -1
- package/dist/components/cards/PricingCard/PricingCard.d.ts +6 -1
- package/dist/components/charts/BarChart/BarChart.d.ts +21 -0
- package/dist/components/charts/LineChart/LineChart.d.ts +22 -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 +7 -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/footer/SiteFooter/SiteFooter.d.ts +5 -1
- package/dist/components/icons/Icon/Icon.d.ts +11 -731
- package/dist/components/icons/Icon/IconSearch.d.ts +1 -0
- package/dist/components/icons/Icon/custom-icons.d.ts +46 -0
- package/dist/components/icons/Icon/generated-icon-data.d.ts +1450 -0
- package/dist/components/icons/Icon/icon-registry.d.ts +34 -0
- 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 +2 -2
- package/dist/components/inputs/Combobox/Combobox.d.ts +16 -6
- package/dist/components/inputs/ComboboxMultiselect/ComboboxMultiselect.d.ts +32 -5
- package/dist/components/inputs/Datepicker/Datepicker.d.ts +15 -1
- package/dist/components/inputs/FileUpload/FileUpload.d.ts +5 -0
- package/dist/components/inputs/Select/Select.d.ts +10 -1
- package/dist/components/inputs/Select/select-sample-data.d.ts +1 -0
- package/dist/components/inputs/Switch/Switch.d.ts +0 -16
- package/dist/components/inputs/TagsInput/TagsInput.d.ts +100 -0
- package/dist/components/inputs/TextInput/TextInput.d.ts +4 -0
- package/dist/components/inputs/Textarea/Textarea.d.ts +4 -0
- package/dist/components/inputs/input-utilities.d.ts +4 -3
- 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/navigation/DropdownMenu/DropdownMenu.d.ts +1 -0
- package/dist/components/navigation/Navbar/Navbar.d.ts +1 -1
- package/dist/components/navigation/SideNavGlobal/SideNavGlobal.d.ts +5 -15
- package/dist/components/navigation/SideNavGlobal/SideNavGlobalItem.d.ts +5 -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/TabMenu/TabMenu.d.ts +6 -1
- package/dist/components/navigation/UserMenu/UserMenu.d.ts +1 -5
- package/dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +8 -12
- package/dist/components/notifications/Banner/Banner.d.ts +32 -12
- package/dist/components/notifications/NotificationsPopover/NotificationsPopover.d.ts +2 -7
- package/dist/components/notifications/SectionMessage/SectionMessage.d.ts +6 -2
- package/dist/components/notifications/Toaster/Toast.d.ts +13 -2
- package/dist/components/notifications/Toaster/Toaster.d.ts +16 -7
- package/dist/components/notifications/Toaster/useToast.d.ts +2 -0
- 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 +6 -3
- package/dist/components/panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +1 -2
- package/dist/components/panels/Panel/Panel.d.ts +1 -18
- package/dist/components/panels/PanelList/PanelList.d.ts +1 -1
- package/dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +3 -4
- package/dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +2 -3
- package/dist/css/component-css/pds-avatar-tile-list.css +1 -1
- 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 +9 -3
- package/dist/css/component-css/pds-callout.css +1 -1
- package/dist/css/component-css/pds-card-select-group.css +1 -1
- 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-combobox-multiselect.css +4 -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-dashboard-search.css +1 -1
- package/dist/css/component-css/pds-datepicker.css +1 -1
- 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-empty-state-card.css +1 -1
- 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 +2 -2
- package/dist/css/component-css/pds-flow-steps.css +1 -1
- package/dist/css/component-css/pds-footer-links.css +1 -1
- package/dist/css/component-css/pds-horizontal-empty-state.css +1 -1
- package/dist/css/component-css/pds-icon-button.css +4 -4
- package/dist/css/component-css/pds-icon-story-only.css +1 -1
- package/dist/css/component-css/pds-icon.css +1 -0
- package/dist/css/component-css/pds-identity-block.css +1 -0
- package/dist/css/component-css/pds-index.css +96 -57
- 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 +4 -1
- package/dist/css/component-css/pds-modal.css +1 -1
- package/dist/css/component-css/pds-nav-menu.css +2 -2
- package/dist/css/component-css/pds-navbar.css +4 -1
- package/dist/css/component-css/pds-new-site-card.css +1 -1
- package/dist/css/component-css/pds-notification-hub-icon.css +1 -1
- package/dist/css/component-css/pds-notifications-popover.css +13 -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-card.css +1 -1
- package/dist/css/component-css/pds-payment-icon.css +1 -1
- 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-pricing-card.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-pull-quote.css +1 -1
- 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 +1 -1
- package/dist/css/component-css/pds-select.css +1 -1
- package/dist/css/component-css/pds-side-nav-compact.css +1 -1
- package/dist/css/component-css/pds-side-nav-global.css +6 -4
- package/dist/css/component-css/pds-side-nav.css +1 -1
- package/dist/css/component-css/pds-site-card.css +1 -1
- package/dist/css/component-css/pds-site-footer.css +1 -1
- package/dist/css/component-css/pds-skiplink.css +1 -1
- package/dist/css/component-css/pds-spinner.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-stepper.css +1 -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 +1 -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 -0
- 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-user-menu.css +29 -1
- package/dist/css/component-css/pds-utility-button.css +1 -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 +16 -1
- package/dist/css/design-tokens/fonts.css +1 -1
- package/dist/css/design-tokens/variables.dark.css +232 -49
- package/dist/css/design-tokens/variables.global.css +8 -11
- package/dist/css/design-tokens/variables.light.css +207 -46
- package/dist/css/design-tokens/variables.typography.css +9 -6
- package/dist/css/layout-css/pds-app-layout.css +2 -0
- package/dist/css/layout-css/pds-docs-layout.css +1 -0
- package/dist/css/layout-css/pds-index.css +2 -0
- package/dist/css/layout-css/pds-sidebar-layout.css +5 -0
- package/dist/css/layout-css/pds-stepper-layout.css +1 -0
- package/dist/css/layout-css/pds-three-item-layout.css +1 -0
- package/dist/css/layout-css/pds-two-item-layout.css +1 -0
- package/dist/css/pds-components.css +96 -57
- package/dist/css/pds-core.css +2 -2
- package/dist/css/pds-layouts.css +2 -9
- package/dist/index.css +1 -1
- package/dist/index.d.ts +88 -6
- package/dist/index.js +11161 -1809
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +21 -16
- package/dist/layouts/AppLayout/AppLayout.d.ts +47 -6
- package/dist/layouts/DocsLayout/DocsLayout.d.ts +9 -7
- package/dist/layouts/SidebarLayout/SidebarLayout.d.ts +12 -3
- package/dist/libs/components/NavAccordion/NavAccordion.d.ts +27 -0
- package/dist/libs/types/custom-types.d.ts +10 -2
- package/dist/libs/types/navigation-types.d.ts +1 -1
- package/dist/svg/angleDown.svg +3 -0
- package/dist/svg/angleLeft.svg +3 -0
- package/dist/svg/angleRight.svg +3 -0
- package/dist/svg/angleUp.svg +3 -0
- package/dist/svg/anglesLeft.svg +3 -0
- package/dist/svg/anglesRight.svg +3 -0
- package/dist/svg/arrowDownToLine.svg +3 -0
- package/dist/svg/arrowLeft.svg +3 -0
- package/dist/svg/arrowRight.svg +3 -0
- package/dist/svg/arrowsRetweet.svg +3 -0
- package/dist/svg/asterisk.svg +3 -0
- package/dist/svg/banBug.svg +3 -0
- package/dist/svg/bars.svg +3 -0
- package/dist/svg/barsFilter.svg +3 -0
- package/dist/svg/bell.svg +3 -0
- package/dist/svg/billboard.svg +3 -0
- package/dist/svg/bitbucket.svg +3 -0
- package/dist/svg/bluesky.svg +3 -0
- package/dist/svg/bolt.svg +3 -0
- package/dist/svg/boltPantheon.svg +3 -0
- package/dist/svg/boltSolid.svg +3 -0
- package/dist/svg/book.svg +3 -0
- package/dist/svg/books.svg +3 -0
- package/dist/svg/bracketRight.svg +3 -0
- package/dist/svg/bracketsSquare.svg +3 -0
- package/dist/svg/brainCircuit.svg +3 -0
- package/dist/svg/broomWide.svg +3 -0
- package/dist/svg/building.svg +3 -0
- package/dist/svg/buildings.svg +3 -0
- package/dist/svg/bullhorn.svg +3 -0
- package/dist/svg/calendarDays.svg +3 -0
- package/dist/svg/caretDown.svg +3 -0
- package/dist/svg/caretLeft.svg +3 -0
- package/dist/svg/caretRight.svg +3 -0
- package/dist/svg/caretUp.svg +3 -0
- package/dist/svg/ccAmex.svg +3 -0
- package/dist/svg/ccApplePay.svg +3 -0
- package/dist/svg/ccDiscover.svg +3 -0
- package/dist/svg/ccGeneric.svg +3 -0
- package/dist/svg/ccMC.svg +3 -0
- package/dist/svg/ccPaypal.svg +3 -0
- package/dist/svg/ccVisa.svg +3 -0
- package/dist/svg/chartLine.svg +3 -0
- package/dist/svg/chartNetwork.svg +3 -0
- package/dist/svg/chartSimple.svg +3 -0
- package/dist/svg/check.svg +3 -0
- package/dist/svg/circle.svg +3 -0
- package/dist/svg/circleCheck.svg +3 -0
- package/dist/svg/circleExclamation.svg +3 -0
- package/dist/svg/circleInfo.svg +3 -0
- package/dist/svg/circleMinus.svg +3 -0
- package/dist/svg/circleNotch.svg +3 -0
- package/dist/svg/circlePlus.svg +3 -0
- package/dist/svg/circleQuestion.svg +3 -0
- package/dist/svg/circleUser.svg +3 -0
- package/dist/svg/circleXmark.svg +3 -0
- package/dist/svg/cloud.svg +3 -0
- package/dist/svg/cloudArrowDown.svg +3 -0
- package/dist/svg/cloudArrowUp.svg +3 -0
- package/dist/svg/cloudPlus.svg +3 -0
- package/dist/svg/code.svg +3 -0
- package/dist/svg/codeBranch.svg +3 -0
- package/dist/svg/codeMerge.svg +3 -0
- package/dist/svg/command.svg +3 -0
- package/dist/svg/comment.svg +3 -0
- package/dist/svg/copy.svg +3 -0
- package/dist/svg/desktop.svg +3 -0
- package/dist/svg/diamondExclamation.svg +3 -0
- package/dist/svg/diamonds4.svg +3 -0
- package/dist/svg/discourse.svg +3 -0
- package/dist/svg/display.svg +3 -0
- package/dist/svg/dollarSign.svg +3 -0
- package/dist/svg/download.svg +3 -0
- package/dist/svg/drupal.svg +3 -0
- package/dist/svg/ellipsis.svg +3 -0
- package/dist/svg/ellipsisVertical.svg +3 -0
- package/dist/svg/emptySet.svg +3 -0
- package/dist/svg/envelope.svg +3 -0
- package/dist/svg/envelopeOpen.svg +3 -0
- package/dist/svg/exclamation.svg +3 -0
- package/dist/svg/expand.svg +3 -0
- package/dist/svg/expandFromCenter.svg +3 -0
- package/dist/svg/externalLink.svg +3 -0
- package/dist/svg/eye.svg +3 -0
- package/dist/svg/eyeSlash.svg +3 -0
- package/dist/svg/facebook.svg +3 -0
- package/dist/svg/file.svg +3 -0
- package/dist/svg/fileCSV.svg +3 -0
- package/dist/svg/fileCheck.svg +3 -0
- package/dist/svg/fileContract.svg +3 -0
- package/dist/svg/fileDiff.svg +3 -0
- package/dist/svg/fileExport.svg +3 -0
- package/dist/svg/fileImport.svg +3 -0
- package/dist/svg/fileLines.svg +3 -0
- package/dist/svg/filePDF.svg +3 -0
- package/dist/svg/fileZip.svg +3 -0
- package/dist/svg/folder.svg +3 -0
- package/dist/svg/folderTree.svg +3 -0
- package/dist/svg/gear.svg +3 -0
- package/dist/svg/gem.svg +3 -0
- package/dist/svg/github.svg +3 -0
- package/dist/svg/gitlab.svg +3 -0
- package/dist/svg/globe.svg +3 -0
- package/dist/svg/graduationCap.svg +3 -0
- package/dist/svg/grid.svg +3 -0
- package/dist/svg/gripDots.svg +3 -0
- package/dist/svg/gripDotsVertical.svg +3 -0
- package/dist/svg/heart.svg +3 -0
- package/dist/svg/heartSolid.svg +3 -0
- package/dist/svg/house.svg +3 -0
- package/dist/svg/idCard.svg +3 -0
- package/dist/svg/image.svg +3 -0
- package/dist/svg/inputText.svg +3 -0
- package/dist/svg/instagram.svg +3 -0
- package/dist/svg/keySkeleton.svg +3 -0
- package/dist/svg/landmark.svg +3 -0
- package/dist/svg/laptop.svg +3 -0
- package/dist/svg/laptopCode.svg +3 -0
- package/dist/svg/leaf.svg +3 -0
- package/dist/svg/lifeRing.svg +3 -0
- package/dist/svg/linkSimple.svg +3 -0
- package/dist/svg/linkSimpleSlash.svg +3 -0
- package/dist/svg/linkedin.svg +3 -0
- package/dist/svg/listCheck.svg +3 -0
- package/dist/svg/locationCrosshairs.svg +3 -0
- package/dist/svg/lock.svg +3 -0
- package/dist/svg/lockOpen.svg +3 -0
- package/dist/svg/magnifyingGlass.svg +3 -0
- package/dist/svg/medal.svg +3 -0
- package/dist/svg/memo.svg +3 -0
- package/dist/svg/messages.svg +3 -0
- package/dist/svg/minus.svg +3 -0
- package/dist/svg/moon.svg +3 -0
- package/dist/svg/nextJs.svg +3 -0
- package/dist/svg/paperPlane.svg +3 -0
- package/dist/svg/paperclip.svg +3 -0
- package/dist/svg/pause.svg +3 -0
- package/dist/svg/pen.svg +3 -0
- package/dist/svg/penField.svg +3 -0
- package/dist/svg/phone.svg +3 -0
- package/dist/svg/play.svg +3 -0
- package/dist/svg/plus.svg +3 -0
- package/dist/svg/question.svg +3 -0
- package/dist/svg/quotesLeft.svg +3 -0
- package/dist/svg/quotesRight.svg +3 -0
- package/dist/svg/rectangleList.svg +3 -0
- package/dist/svg/reply.svg +3 -0
- package/dist/svg/robot.svg +3 -0
- package/dist/svg/rocketLaunch.svg +3 -0
- package/dist/svg/rotate.svg +3 -0
- package/dist/svg/rotateClock.svg +3 -0
- package/dist/svg/rotateLeft.svg +3 -0
- package/dist/svg/rotateRight.svg +3 -0
- package/dist/svg/rss.svg +3 -0
- package/dist/svg/save.svg +3 -0
- package/dist/svg/server.svg +3 -0
- package/dist/svg/shareNodes.svg +3 -0
- package/dist/svg/shield.svg +3 -0
- package/dist/svg/shieldQuartered.svg +3 -0
- package/dist/svg/shovel.svg +3 -0
- package/dist/svg/sidebar.svg +3 -0
- package/dist/svg/siren.svg +3 -0
- package/dist/svg/sirenOn.svg +3 -0
- package/dist/svg/sitemap.svg +3 -0
- package/dist/svg/slack.svg +3 -0
- package/dist/svg/slashForward.svg +3 -0
- package/dist/svg/slidersSimple.svg +3 -0
- package/dist/svg/snowflake.svg +3 -0
- package/dist/svg/sparkles.svg +3 -0
- package/dist/svg/squareCheck.svg +3 -0
- package/dist/svg/squareCode.svg +3 -0
- package/dist/svg/squareMinus.svg +3 -0
- package/dist/svg/squarePen.svg +3 -0
- package/dist/svg/squareQuestion.svg +3 -0
- package/dist/svg/squareTerminal.svg +3 -0
- package/dist/svg/star.svg +3 -0
- package/dist/svg/starSolid.svg +3 -0
- package/dist/svg/sun.svg +3 -0
- package/dist/svg/sunBright.svg +3 -0
- package/dist/svg/table.svg +3 -0
- package/dist/svg/tableRows.svg +3 -0
- package/dist/svg/terminal.svg +3 -0
- package/dist/svg/text.svg +3 -0
- package/dist/svg/threads.svg +3 -0
- package/dist/svg/thumbsDown.svg +3 -0
- package/dist/svg/thumbsUp.svg +3 -0
- package/dist/svg/trash.svg +3 -0
- package/dist/svg/triangleExclamation.svg +3 -0
- package/dist/svg/twitter.svg +3 -0
- package/dist/svg/upload.svg +3 -0
- package/dist/svg/user.svg +3 -0
- package/dist/svg/userAstronaut.svg +3 -0
- package/dist/svg/userGear.svg +3 -0
- package/dist/svg/userPlus.svg +3 -0
- package/dist/svg/users.svg +3 -0
- package/dist/svg/video.svg +3 -0
- package/dist/svg/wavePulse.svg +3 -0
- package/dist/svg/windowRestore.svg +3 -0
- package/dist/svg/wordpress.svg +3 -0
- package/dist/svg/wreathLaurel.svg +3 -0
- package/dist/svg/wrench.svg +3 -0
- package/dist/svg/xTwitter.svg +3 -0
- package/dist/svg/xmark.svg +3 -0
- package/dist/svg/xmarkLarge.svg +3 -0
- package/dist/svg/youtube.svg +3 -0
- package/dist/{layouts → utilities}/FlexContainer/FlexContainer.d.ts +1 -1
- package/dist/utilities/GlobalWrapper/GlobalWrapper.d.ts +21 -0
- package/dist/utilities/hooks/useDropdown/index.d.ts +1 -0
- package/dist/utilities/hooks/useDropdown/useDropdown.d.ts +121 -0
- package/package.json +67 -44
- 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/badges/IndicatorBadge/IndicatorBadge.d.ts +0 -27
- 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/css/component-css/pds-dashboard-nav.css +0 -5
- package/dist/css/component-css/pds-indicator-badge.css +0 -25
- package/dist/css/component-css/pds-refresh-checker.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/{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/{layouts → utilities}/Container/Container.d.ts +0 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/react';
|
|
2
|
+
import { useFloating, useInteractions } from '@floating-ui/react';
|
|
3
|
+
export type DropdownRole = 'menu' | 'listbox';
|
|
4
|
+
export type DropdownVariant = 'default' | 'input';
|
|
5
|
+
export interface UseDropdownOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Allow keyboard navigation to escape the list (move past first/last item).
|
|
8
|
+
* Useful for combobox inputs where focus should return to the input.
|
|
9
|
+
*/
|
|
10
|
+
allowEscape?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Enable click-to-toggle interaction via useClick.
|
|
13
|
+
* Set to false for combobox-type inputs where open/close is managed
|
|
14
|
+
* by input events (typing, focus) rather than a click toggle.
|
|
15
|
+
*/
|
|
16
|
+
enableClick?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Enable keyboard list navigation via useListNavigation.
|
|
19
|
+
* Set to false if keyboard nav is managed externally.
|
|
20
|
+
*/
|
|
21
|
+
enableListNavigation?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Enable shift middleware to keep the dropdown within viewport bounds.
|
|
24
|
+
* Set to false for inputs where the dropdown should align flush with the trigger.
|
|
25
|
+
*/
|
|
26
|
+
enableShift?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Enable transition animations on the dropdown panel.
|
|
29
|
+
*/
|
|
30
|
+
enableTransition?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Enable typeahead character search via useTypeahead.
|
|
33
|
+
*/
|
|
34
|
+
enableTypeahead?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Offset distance in pixels between the trigger and the dropdown panel.
|
|
37
|
+
* Ignored when variant is 'input' (uses dynamic offset based on placement).
|
|
38
|
+
*/
|
|
39
|
+
offsetValue?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Open the dropdown on hover (desktop navigation menus).
|
|
42
|
+
* Enables useHover with safePolygon.
|
|
43
|
+
*/
|
|
44
|
+
openOnHover?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Preferred placement of the dropdown panel relative to the trigger.
|
|
47
|
+
*/
|
|
48
|
+
placement?: Placement;
|
|
49
|
+
/**
|
|
50
|
+
* ARIA role for the dropdown container.
|
|
51
|
+
*/
|
|
52
|
+
role?: DropdownRole;
|
|
53
|
+
/**
|
|
54
|
+
* Index of the currently selected item. Used by typeahead to maintain
|
|
55
|
+
* selection context. Only needed for selection-style dropdowns (Select).
|
|
56
|
+
*/
|
|
57
|
+
selectedIndex?: number | null;
|
|
58
|
+
/**
|
|
59
|
+
* Dropdown variant. 'input' applies input-specific positioning: dynamic
|
|
60
|
+
* offset based on placement direction and size constraints with min/max height.
|
|
61
|
+
* Use for Select, Combobox, and other input-attached dropdowns.
|
|
62
|
+
*/
|
|
63
|
+
variant?: DropdownVariant;
|
|
64
|
+
/**
|
|
65
|
+
* Use virtual focus (aria-activedescendant) instead of roving tabindex.
|
|
66
|
+
* Appropriate for combobox-type inputs where focus must stay on the input.
|
|
67
|
+
*/
|
|
68
|
+
virtual?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface UseDropdownReturn {
|
|
71
|
+
/**
|
|
72
|
+
* Index of the currently active/focused item in the list.
|
|
73
|
+
*/
|
|
74
|
+
activeIndex: number | null;
|
|
75
|
+
/**
|
|
76
|
+
* Styles to apply to the floating panel element.
|
|
77
|
+
*/
|
|
78
|
+
floatingStyles: ReturnType<typeof useFloating>['floatingStyles'];
|
|
79
|
+
/**
|
|
80
|
+
* Props to spread on the floating panel element.
|
|
81
|
+
*/
|
|
82
|
+
getFloatingProps: ReturnType<typeof useInteractions>['getFloatingProps'];
|
|
83
|
+
/**
|
|
84
|
+
* Props to spread on each item element.
|
|
85
|
+
*/
|
|
86
|
+
getItemProps: ReturnType<typeof useInteractions>['getItemProps'];
|
|
87
|
+
/**
|
|
88
|
+
* Props to spread on the trigger/reference element.
|
|
89
|
+
*/
|
|
90
|
+
getReferenceProps: ReturnType<typeof useInteractions>['getReferenceProps'];
|
|
91
|
+
/**
|
|
92
|
+
* Whether the floating panel should be mounted in the DOM
|
|
93
|
+
* (accounts for transition animations).
|
|
94
|
+
*/
|
|
95
|
+
isMounted: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the dropdown is currently open.
|
|
98
|
+
*/
|
|
99
|
+
isOpen: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Ref array for list item DOM nodes (used by useListNavigation).
|
|
102
|
+
*/
|
|
103
|
+
listRef: React.MutableRefObject<any[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Floating UI refs for the reference and floating elements.
|
|
106
|
+
*/
|
|
107
|
+
refs: ReturnType<typeof useFloating>['refs'];
|
|
108
|
+
/**
|
|
109
|
+
* Set the active/focused item index.
|
|
110
|
+
*/
|
|
111
|
+
setActiveIndex: React.Dispatch<React.SetStateAction<number | null>>;
|
|
112
|
+
/**
|
|
113
|
+
* Set the open state of the dropdown.
|
|
114
|
+
*/
|
|
115
|
+
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
116
|
+
/**
|
|
117
|
+
* Transition styles to apply to the floating panel element.
|
|
118
|
+
*/
|
|
119
|
+
transitionStyles: React.CSSProperties;
|
|
120
|
+
}
|
|
121
|
+
export declare const useDropdown: ({ allowEscape, enableClick, enableListNavigation, enableShift, enableTransition, enableTypeahead, offsetValue, openOnHover, placement, role, selectedIndex, variant, virtual, }?: UseDropdownOptions) => UseDropdownReturn;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pantheon-systems/pds-toolkit-react",
|
|
3
3
|
"technology": "React",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.20",
|
|
5
5
|
"description": "PDS toolkit built using the React framework",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"author": "Pantheon Systems",
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=18.0.0 <=
|
|
17
|
+
"node": ">=18.0.0 <=24.x"
|
|
18
18
|
},
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/pantheon-systems/pds-toolkit-react/issues"
|
|
@@ -27,32 +27,35 @@
|
|
|
27
27
|
"types": "./dist/index.d.ts",
|
|
28
28
|
"import": "./dist/index.js"
|
|
29
29
|
},
|
|
30
|
+
"./tailwind/v3/preset": "./tailwind/v3/preset.cjs",
|
|
31
|
+
"./tailwind/v4/theme.css": "./tailwind/v4/theme.css",
|
|
30
32
|
"./*": "./dist/*"
|
|
31
33
|
},
|
|
32
34
|
"files": [
|
|
33
|
-
"dist"
|
|
35
|
+
"dist",
|
|
36
|
+
"tailwind"
|
|
34
37
|
],
|
|
35
38
|
"sideEffects": [
|
|
36
39
|
"*.css"
|
|
37
40
|
],
|
|
38
41
|
"type": "module",
|
|
39
42
|
"scripts": {
|
|
40
|
-
"prebuild:lib": "node scripts/filter-exports-by-tags.js --filter",
|
|
43
|
+
"prebuild:lib": "node scripts/generate-icon-data.js && node scripts/filter-exports-by-tags.js --filter",
|
|
41
44
|
"build:lib": "vite build && npm run build:types",
|
|
42
45
|
"build:types": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
43
|
-
"postbuild:lib": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss",
|
|
46
|
+
"postbuild:lib": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss && npm run generate:svg-icons",
|
|
44
47
|
"build:css": "postcss src/core.css -o dist/css/pds-core.css",
|
|
45
48
|
"build:css:components": "postcss src/components/index.css -o dist/css/pds-components.css",
|
|
46
49
|
"build:css:layouts": "postcss src/layouts/index.css -o dist/css/pds-layouts.css",
|
|
47
50
|
"build:css:packageExtraCss": "node scripts/package-extra-css.js",
|
|
48
51
|
"build:css:watch": "npm run build:css -- -w",
|
|
49
|
-
"prestorybook": "node scripts/filter-exports-by-tags.js && npm run build:css && npm run generate:ux-writing-search-index && npm run generate:ux-writing-guide",
|
|
52
|
+
"prestorybook": "node scripts/filter-exports-by-tags.js && npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run generate:ux-writing-search-index && npm run generate:ux-writing-guide",
|
|
50
53
|
"storybook": "storybook dev -p 6006",
|
|
51
|
-
"prebuild": "npm run build:css && npm run generate:ux-writing-search-index && npm run generate:ux-writing-guide",
|
|
52
|
-
"build": "NODE_ENV=production storybook build",
|
|
54
|
+
"prebuild": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss && npm run generate:ux-writing-search-index && npm run generate:ux-writing-guide",
|
|
55
|
+
"build": "NODE_OPTIONS=--max-old-space-size=4096 NODE_ENV=production storybook build",
|
|
53
56
|
"build-storybook": "NODE_ENV=production storybook build",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
57
|
+
"postbuild": "node scripts/copy-mcp-assets.js && node scripts/build-starter-template.js && node scripts/generate-html-docs.js && node scripts/verify-mcp-build.js",
|
|
58
|
+
"verify:mcp": "node scripts/verify-mcp-build.js",
|
|
56
59
|
"start": "node index.js",
|
|
57
60
|
"develop": "npm run storybook",
|
|
58
61
|
"typecheck": "npm run typecheck:attw && npm run typecheck:publint && npm run typecheck:tsc",
|
|
@@ -69,10 +72,13 @@
|
|
|
69
72
|
"test:a11y:generate": "DISABLE_A11Y_ADDON=true npm run build && node __tests__/a11y/a11y.generate-tests.js",
|
|
70
73
|
"test:a11y": "USE_STATIC_STORYBOOK=true DISABLE_A11Y_ADDON=true playwright test --project 'a11y'",
|
|
71
74
|
"test:a11y:results": "npx http-server ./__tests__/a11y/results/",
|
|
72
|
-
"eslint": "eslint
|
|
73
|
-
"eslint:all": "eslint src --
|
|
75
|
+
"eslint": "eslint",
|
|
76
|
+
"eslint:all": "eslint src --cache",
|
|
74
77
|
"format:fix": "prettier . --write && npm run eslint:all -- --fix",
|
|
75
78
|
"generate:component": "plop component",
|
|
79
|
+
"generate:icon": "plop icon",
|
|
80
|
+
"generate:icon-data": "node scripts/generate-icon-data.js",
|
|
81
|
+
"generate:svg-icons": "node scripts/generate-svg-files.js",
|
|
76
82
|
"generate:layout": "plop layout",
|
|
77
83
|
"generate:foundation": "plop foundation",
|
|
78
84
|
"generate:pattern": "plop pattern",
|
|
@@ -81,6 +87,7 @@
|
|
|
81
87
|
"generate:migration": "node codemods/v1-to-v2/generate-migration-guide.js",
|
|
82
88
|
"generate:ux-writing-search-index": "node scripts/generate-search-index.js",
|
|
83
89
|
"generate:ux-writing-guide": "node scripts/generate-ux-writing-guide.js",
|
|
90
|
+
"generate:html-docs": "node scripts/generate-html-docs.js",
|
|
84
91
|
"test:version-switcher": "bash scripts/test-version-switcher.sh",
|
|
85
92
|
"pack:local": "bash scripts/pack-local.sh",
|
|
86
93
|
"prepare": "husky install",
|
|
@@ -88,85 +95,101 @@
|
|
|
88
95
|
},
|
|
89
96
|
"devDependencies": {
|
|
90
97
|
"@arethetypeswrong/cli": "^0.15.3",
|
|
91
|
-
"@axe-core/playwright": "^4.11.
|
|
92
|
-
"@babel/preset-env": "^7.
|
|
98
|
+
"@axe-core/playwright": "^4.11.3",
|
|
99
|
+
"@babel/preset-env": "^7.29.5",
|
|
93
100
|
"@babel/preset-react": "^7.18.6",
|
|
94
101
|
"@babel/preset-typescript": "^7.28.5",
|
|
95
102
|
"@csstools/postcss-design-tokens": "^2.0.4",
|
|
96
103
|
"@csstools/postcss-global-data": "^1.0.3",
|
|
97
|
-
"@playwright/test": "
|
|
98
|
-
"@storybook/addon-a11y": "^10.
|
|
99
|
-
"@storybook/addon-docs": "^10.
|
|
100
|
-
"@storybook/addon-links": "^10.
|
|
101
|
-
"@storybook/addon-mcp": "^0.
|
|
102
|
-
"@storybook/addon-webpack5-compiler-swc": "^4.0.
|
|
103
|
-
"@storybook/react-vite": "^10.
|
|
104
|
-
"@storybook/react-webpack5": "^10.
|
|
105
|
-
"@types/prismjs": "^1.26.
|
|
106
|
-
"@types/react": "^19.2.
|
|
107
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
108
|
-
"@typescript-eslint/parser": "^8.
|
|
104
|
+
"@playwright/test": "1.56.1",
|
|
105
|
+
"@storybook/addon-a11y": "^10.4.0",
|
|
106
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
107
|
+
"@storybook/addon-links": "^10.4.0",
|
|
108
|
+
"@storybook/addon-mcp": "^0.6.0",
|
|
109
|
+
"@storybook/addon-webpack5-compiler-swc": "^4.0.3",
|
|
110
|
+
"@storybook/react-vite": "^10.4.0",
|
|
111
|
+
"@storybook/react-webpack5": "^10.4.0",
|
|
112
|
+
"@types/prismjs": "^1.26.6",
|
|
113
|
+
"@types/react": "^19.2.14",
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
115
|
+
"@typescript-eslint/parser": "^8.59.3",
|
|
109
116
|
"@vitejs/plugin-react": "^4.3.0",
|
|
110
117
|
"@vueless/storybook-dark-mode": "^9.0.9",
|
|
111
118
|
"axe-html-reporter": "^2.2.3",
|
|
112
119
|
"chromatic": "^13.3.4",
|
|
113
120
|
"concurrently": "^8.0.1",
|
|
114
121
|
"cssnano": "^6.0.1",
|
|
115
|
-
"eslint": "^
|
|
122
|
+
"eslint": "^9.39.4",
|
|
116
123
|
"eslint-config-prettier": "^9.1.0",
|
|
117
124
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
118
125
|
"eslint-plugin-import": "^2.32.0",
|
|
119
|
-
"eslint-plugin-prettier": "^5.
|
|
126
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
120
127
|
"eslint-plugin-react": "^7.32.2",
|
|
121
128
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
122
129
|
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
123
|
-
"eslint-plugin-storybook": "^10.
|
|
130
|
+
"eslint-plugin-storybook": "^10.4.0",
|
|
124
131
|
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
125
132
|
"fast-glob": "^3.3.2",
|
|
126
133
|
"husky": "^8.0.3",
|
|
127
134
|
"lint-staged": "^13.2.3",
|
|
135
|
+
"pino-pretty": "^13.1.3",
|
|
128
136
|
"plop": "^3.1.2",
|
|
129
|
-
"postcss": "^8.
|
|
137
|
+
"postcss": "^8.5.14",
|
|
130
138
|
"postcss-cli": "^10.1.0",
|
|
131
139
|
"postcss-custom-media": "^9.1.3",
|
|
132
140
|
"postcss-import": "^15.1.0",
|
|
133
141
|
"postcss-insert": "^1.0.0",
|
|
134
|
-
"postcss-loader": "^8.
|
|
142
|
+
"postcss-loader": "^8.2.1",
|
|
135
143
|
"postcss-nested": "^6.0.1",
|
|
136
|
-
"prettier": "3.
|
|
137
|
-
"prettier-plugin-css-order": "^2.
|
|
144
|
+
"prettier": "^3.8.3",
|
|
145
|
+
"prettier-plugin-css-order": "^2.2.0",
|
|
138
146
|
"react": "^18.2.0",
|
|
139
147
|
"react-dom": "^18.2.0",
|
|
140
|
-
"
|
|
141
|
-
"
|
|
148
|
+
"react-router-dom": "^6.13.0",
|
|
149
|
+
"storybook": "^10.4.0",
|
|
150
|
+
"tsc-alias": "^1.8.17",
|
|
142
151
|
"typescript": "^5.4.5",
|
|
143
|
-
"vite": "^7.
|
|
152
|
+
"vite": "^7.3.3",
|
|
144
153
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
145
154
|
"vite-tsconfig-paths": "^4.3.2"
|
|
146
155
|
},
|
|
147
156
|
"peerDependencies": {
|
|
148
|
-
"react": "^
|
|
149
|
-
"react-dom": "^
|
|
157
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
158
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
150
159
|
},
|
|
151
160
|
"dependencies": {
|
|
152
161
|
"@floating-ui/react": "^0.24.3",
|
|
153
162
|
"@floating-ui/react-dom": "~1.3.0",
|
|
154
|
-
"@pantheon-systems/pds-design-tokens": "^2.0.0-alpha.
|
|
163
|
+
"@pantheon-systems/pds-design-tokens": "^2.0.0-alpha.38",
|
|
155
164
|
"@reactuses/core": "^5.0.15",
|
|
156
165
|
"date-fns": "^4.1.0",
|
|
157
|
-
"downshift": "^9.
|
|
158
|
-
"express": "^4.22.
|
|
159
|
-
"express-rate-limit": "^8.2
|
|
166
|
+
"downshift": "^9.3.2",
|
|
167
|
+
"express": "^4.22.2",
|
|
168
|
+
"express-rate-limit": "^8.5.2",
|
|
160
169
|
"focus-trap-react": "^10.2.1",
|
|
161
170
|
"hash-sum": "^2.0.0",
|
|
162
171
|
"modern-normalize": "^3.0.1",
|
|
172
|
+
"pino": "^10.3.1",
|
|
173
|
+
"pino-http": "^11.0.0",
|
|
163
174
|
"prism-react-renderer": "^2.4.1",
|
|
164
175
|
"prismjs": "^1.29.0",
|
|
165
176
|
"react-code-block": "^1.1.1",
|
|
166
177
|
"react-day-picker": "^9.11.1",
|
|
167
178
|
"react-device-detect": "^2.2.3",
|
|
168
|
-
"react-
|
|
169
|
-
"react-toastify": "^
|
|
179
|
+
"react-hotkeys-hook": "^4.5.1",
|
|
180
|
+
"react-toastify": "^10.0.6",
|
|
181
|
+
"recharts": "^3.8.1"
|
|
182
|
+
},
|
|
183
|
+
"optionalDependencies": {
|
|
184
|
+
"@fortawesome/free-brands-svg-icons": "^7.2.0",
|
|
185
|
+
"@fortawesome/pro-regular-svg-icons": "^7.2.0",
|
|
186
|
+
"@fortawesome/pro-solid-svg-icons": "^7.2.0"
|
|
187
|
+
},
|
|
188
|
+
"overrides": {
|
|
189
|
+
"@babel/plugin-transform-modules-systemjs": "^7.29.4",
|
|
190
|
+
"fast-uri": "^3.1.2",
|
|
191
|
+
"hono": "^4.12.18",
|
|
192
|
+
"ip-address": "^10.1.1"
|
|
170
193
|
},
|
|
171
194
|
"lint-staged": {
|
|
172
195
|
"*": "prettier --write --ignore-unknown",
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# PDS Tailwind Configuration
|
|
2
|
+
|
|
3
|
+
Tailwind CSS configs that map Pantheon Design System tokens to Tailwind utilities. Available for both Tailwind v3 and v4.
|
|
4
|
+
|
|
5
|
+
> **Note:** Using Tailwind CSS alongside PDS is not the recommended approach. PDS components handle their own styling. This configuration is provided so that UI built outside the scope of PDS components uses correct design system values rather than arbitrary ones.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
Both configs require `pds-core.css` to be loaded globally in your app. This provides the `--pds-*` CSS custom properties that the Tailwind utilities reference at runtime.
|
|
12
|
+
|
|
13
|
+
Import it as a JavaScript import in your app's root layout — this ensures reliable module resolution via the package `exports` map:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import '@pantheon-systems/pds-toolkit-react/css/pds-core.css';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
> **Note:** Use `css/pds-core.css`, not `dist/css/pds-core.css`. The package exports map handles the `dist/` prefix automatically. Using a CSS `@import` instead of a JS import can cause resolution failures in some bundlers (including Next.js with Turbopack).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Tailwind v4
|
|
24
|
+
|
|
25
|
+
**Recommended for new projects.**
|
|
26
|
+
|
|
27
|
+
### Setup
|
|
28
|
+
|
|
29
|
+
In `app/layout.tsx` (or your root layout):
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import '@pantheon-systems/pds-toolkit-react/css/pds-core.css';
|
|
33
|
+
import './globals.css';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
In `app/globals.css`:
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
/* Tailwind layers — imported separately to exclude preflight */
|
|
40
|
+
@import 'tailwindcss/theme' layer(theme);
|
|
41
|
+
@import 'tailwindcss/utilities' layer(utilities);
|
|
42
|
+
|
|
43
|
+
/* PDS theme overrides */
|
|
44
|
+
@import '@pantheon-systems/pds-toolkit-react/tailwind/v4/theme.css';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> **Why not `@import "tailwindcss"`?**
|
|
48
|
+
> The single `@import "tailwindcss"` shorthand includes Tailwind's preflight CSS reset, which conflicts with PDS base styles. Importing the layers individually lets you skip preflight.
|
|
49
|
+
|
|
50
|
+
No `tailwind.config.js` is needed.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Tailwind v3
|
|
55
|
+
|
|
56
|
+
### Setup
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm install tailwindcss@3
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`tailwind.config.js`:
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
/** @type {import('tailwindcss').Config} */
|
|
66
|
+
module.exports = {
|
|
67
|
+
presets: [require('@pantheon-systems/pds-toolkit-react/tailwind/v3/preset')],
|
|
68
|
+
content: ['./src/**/*.{js,ts,jsx,tsx}'],
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
In `app/layout.tsx` (or your root layout):
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import '@pantheon-systems/pds-toolkit-react/css/pds-core.css';
|
|
76
|
+
import './globals.css';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`app/globals.css`:
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
/* Tailwind directives */
|
|
83
|
+
@tailwind base;
|
|
84
|
+
@tailwind components;
|
|
85
|
+
@tailwind utilities;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Preflight is disabled automatically by the preset.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## What's included
|
|
93
|
+
|
|
94
|
+
### Colors
|
|
95
|
+
|
|
96
|
+
All values reference PDS CSS custom properties — dark mode works automatically.
|
|
97
|
+
|
|
98
|
+
| Group | Example utility | PDS token |
|
|
99
|
+
| ------------------- | ------------------------------ | --------------------------------------- |
|
|
100
|
+
| `bg-*` | `bg-bg-default` | `--pds-color-bg-default` |
|
|
101
|
+
| `fg-*` | `text-fg-default` | `--pds-color-fg-default` |
|
|
102
|
+
| `text-*` | `text-text-secondary` | `--pds-color-text-default-secondary` |
|
|
103
|
+
| `border-*` | `border-border-input` | `--pds-color-border-input` |
|
|
104
|
+
| `interactive-*` | `text-interactive-link` | `--pds-color-interactive-link-default` |
|
|
105
|
+
| `status-{type}-*` | `bg-status-success-background` | `--pds-color-status-success-background` |
|
|
106
|
+
| `brand-primary-*` | `bg-brand-primary-400` | `--pds-color-brand-primary-400` |
|
|
107
|
+
| `brand-secondary-*` | `bg-brand-secondary` | `--pds-color-brand-secondary-default` |
|
|
108
|
+
| `brand-accent-*` | `text-brand-accent` | `--pds-color-brand-accent-default` |
|
|
109
|
+
|
|
110
|
+
### Spacing
|
|
111
|
+
|
|
112
|
+
The PDS named scale replaces Tailwind's default numeric scale. Use semantic keys like `p-m`, `gap-xl`, `mt-2xl`.
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<div class="p-m gap-xl mt-2xl">...</div>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Common Tailwind numeric values are also aliased to their nearest PDS equivalent, so `p-4` still works and stays in sync with the token:
|
|
119
|
+
|
|
120
|
+
| Tailwind | PDS key | Value |
|
|
121
|
+
| -------- | ------- | ------- |
|
|
122
|
+
| `p-1` | `p-4xs` | 0.25rem |
|
|
123
|
+
| `p-2` | `p-2xs` | 0.5rem |
|
|
124
|
+
| `p-3` | `p-s` | 0.75rem |
|
|
125
|
+
| `p-4` | `p-m` | 1rem |
|
|
126
|
+
| `p-5` | `p-l` | 1.25rem |
|
|
127
|
+
| `p-6` | `p-xl` | 1.5rem |
|
|
128
|
+
| `p-8` | `p-2xl` | 2rem |
|
|
129
|
+
| `p-10` | `p-3xl` | 2.5rem |
|
|
130
|
+
| `p-12` | `p-4xl` | 3rem |
|
|
131
|
+
| `p-16` | `p-5xl` | 4rem |
|
|
132
|
+
|
|
133
|
+
Values like `p-7`, `p-9`, `p-11` (which don't have a clean PDS equivalent) are not aliased and will not generate any CSS.
|
|
134
|
+
|
|
135
|
+
> **Numeric aliases use CSS variable references**, not hardcoded values. If a PDS spacing token ever changes, `p-4` will automatically reflect the new value — no config update needed.
|
|
136
|
+
|
|
137
|
+
### Typography
|
|
138
|
+
|
|
139
|
+
```html
|
|
140
|
+
<p class="font-sans text-m font-normal leading-m">Body text</p>
|
|
141
|
+
<h2 class="font-sans text-2xl font-semibold leading-s">Heading</h2>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
| Scale | Font size | Font family | Font weight | Line height | Letter spacing |
|
|
145
|
+
| ----- | ------------ | ----------------------- | ----------------------------------------------- | ------------------- | ------------------- |
|
|
146
|
+
| Keys | `xs` – `9xl` | `sans`, `serif`, `mono` | `light`, `normal`, `medium`, `semibold`, `bold` | `s`, `m`, `l`, `xl` | `s`, `m`, `l`, `xl` |
|
|
147
|
+
|
|
148
|
+
### Border radius
|
|
149
|
+
|
|
150
|
+
```html
|
|
151
|
+
<div class="rounded-container">Card</div>
|
|
152
|
+
<button class="rounded-button">Button</button>
|
|
153
|
+
<input class="rounded-input" />
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Keys: `none`, `DEFAULT` (`rounded`), `button`, `input`, `container`, `bar`, `full`
|
|
157
|
+
|
|
158
|
+
### Z-index
|
|
159
|
+
|
|
160
|
+
```html
|
|
161
|
+
<div class="z-modal">Modal</div>
|
|
162
|
+
<nav class="z-navigation">Nav</nav>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Keys: `navigation`, `dropdown`, `notifications`, `overlay`, `modal`, `max`
|
|
166
|
+
|
|
167
|
+
### Max width
|
|
168
|
+
|
|
169
|
+
Matches PDS `Container` component breakpoints. Use when building layout sections outside PDS container components.
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<div class="max-w-standard mx-auto px-m">...</div>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Keys: `narrow` (1024px), `standard` (1200px), `wide` (1440px), `x-wide` (1600px)
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Important caveats
|
|
180
|
+
|
|
181
|
+
### Borders require an explicit border-style
|
|
182
|
+
|
|
183
|
+
The PDS preset resets `border-style` to `none` on all elements so that borders are fully opt-in. This prevents phantom borders on elements that pick up a non-zero `border-width` from PDS components, inheritance, or browser defaults. When adding borders with Tailwind, always include a border-style class (`border-solid`, `border-dashed`, or `border-dotted`):
|
|
184
|
+
|
|
185
|
+
```html
|
|
186
|
+
<div class="border border-solid border-border-default">...</div>
|
|
187
|
+
<div class="border-b border-solid border-border-separator">Divider</div>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Opacity modifiers are not supported
|
|
191
|
+
|
|
192
|
+
Tailwind's opacity modifier syntax (`bg-bg-default/50`) does not work with CSS variable color references. This is a known Tailwind limitation — the compiler cannot decompose a CSS variable into RGB channels. Avoid using opacity modifiers with PDS colors.
|
|
193
|
+
|
|
194
|
+
### Apply Tailwind utilities to your own elements, not PDS components
|
|
195
|
+
|
|
196
|
+
PDS components are styled with scoped BEM classes. Do not use Tailwind utilities to override PDS component styles — use component props and the `className` prop for layout adjustments only. Applying Tailwind utility classes to PDS component internals will lead to unpredictable results.
|
|
197
|
+
|
|
198
|
+
```jsx
|
|
199
|
+
// ✅ Tailwind for your layout, PDS for the component
|
|
200
|
+
<div class="flex gap-m items-center">
|
|
201
|
+
<Button label="Save" variant="primary" />
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
// ❌ Don't override PDS component internals with Tailwind
|
|
205
|
+
<Button label="Save" className="text-red-500 bg-blue-200" />
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Import order matters
|
|
209
|
+
|
|
210
|
+
`pds-core.css` must be imported before Tailwind. If Tailwind's utilities load before PDS variables are defined, the CSS custom property references will resolve to empty values.
|
|
211
|
+
|
|
212
|
+
### Scanning for class names (`@source` in v4)
|
|
213
|
+
|
|
214
|
+
Tailwind v4 automatically scans your project files for class names. If your source files are outside the default scan path (common in monorepos), add a `@source` directive to your CSS entry point:
|
|
215
|
+
|
|
216
|
+
```css
|
|
217
|
+
@source './src/**/*.{js,ts,jsx,tsx}';
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
This is your project's responsibility — the PDS package does not need to be scanned (PDS components do not use Tailwind class names internally).
|