@pantheon-systems/pds-toolkit-react 2.0.0-alpha.9 → 2.0.0-alpha.91
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/css-token-renames.js +186 -0
- package/codemods/v1-to-v2/mappings.json +1824 -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 +55 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-removals/basic.output.tsx +55 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-renames/basic.input.tsx +60 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/css-class-renames/basic.output.tsx +60 -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 +37 -0
- package/codemods/v1-to-v2/transforms/__testfixtures__/prop-value-standardization/basic.output.tsx +37 -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 +262 -0
- package/codemods/v1-to-v2/transforms/css-class-renames.js +178 -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/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/prism-setup.d.ts +2 -0
- 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 +257 -0
- package/dist/components/Dropdown/DropdownSelectedIcon.d.ts +7 -0
- package/dist/components/FileDiff/FileDiff.d.ts +2 -2
- package/dist/components/PantheonLogo/PantheonLogo.d.ts +5 -4
- package/dist/components/Popover/Popover.d.ts +6 -2
- package/dist/components/ResultCount/ResultCount.d.ts +53 -0
- package/dist/components/RowActionsMenu/RowActionsMenu.d.ts +46 -0
- package/dist/components/SiteFooter/SiteFooter.d.ts +45 -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/StatPanel/StatPanel.d.ts +70 -0
- package/dist/components/{RefreshChecker/RefreshChecker.d.ts → StatusChecker/StatusChecker.d.ts} +6 -19
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +7 -4
- package/dist/components/StatusScrim/StatusScrim.d.ts +22 -0
- package/dist/components/Table/Table.d.ts +386 -17
- package/dist/components/TableOfContents/TableOfContents.d.ts +1 -5
- package/dist/components/Tag/Tag.d.ts +21 -3
- package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +29 -8
- package/dist/components/Tooltip/Tooltip.d.ts +15 -4
- package/dist/components/UtilityBar/UtilityBar.d.ts +26 -0
- package/dist/components/badges/Badge/Badge.d.ts +10 -3
- 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 +2 -2
- package/dist/components/buttons/FilterButton/FilterButton.d.ts +92 -0
- package/dist/components/buttons/IconButton/IconButton.d.ts +13 -1
- package/dist/components/buttons/MenuButton/MenuButton.d.ts +70 -20
- package/dist/components/buttons/SSOButton/SSOButton.d.ts +9 -1
- package/dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +44 -8
- package/dist/components/buttons/SelectButton/SelectButton.d.ts +81 -0
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +26 -1
- package/dist/components/cards/ActionCard/ActionCard.d.ts +64 -0
- package/dist/components/cards/Card/Card.d.ts +10 -4
- package/dist/components/cards/CardSelect/CardSelect.d.ts +100 -0
- 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 +31 -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 +24 -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 +13 -8
- package/dist/components/empty-states/VerticalEmptyState/VerticalEmptyState.d.ts +3 -2
- 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 +253 -15
- package/dist/components/icons/PaymentIcon/PaymentIcon.d.ts +7 -3
- package/dist/components/icons/PlatformIcon/PlatformIcon.d.ts +6 -6
- package/dist/components/{Avatar → identity/Avatar}/Avatar.d.ts +8 -3
- package/dist/components/identity/AvatarLabel/AvatarLabel.d.ts +42 -0
- package/dist/components/identity/IdentityBlock/IdentityBlock.d.ts +37 -0
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +11 -1
- package/dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +20 -2
- package/dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +20 -2
- package/dist/components/inputs/Combobox/Combobox.d.ts +33 -7
- package/dist/components/inputs/ComboboxMultiselect/ComboboxMultiselect.d.ts +26 -5
- package/dist/components/inputs/Datepicker/Datepicker.d.ts +280 -16
- package/dist/components/inputs/FileUpload/FileUpload.d.ts +16 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +20 -2
- package/dist/components/inputs/Select/Select.d.ts +35 -3
- package/dist/components/inputs/Switch/Switch.d.ts +15 -5
- package/dist/components/inputs/TagsInput/TagsInput.d.ts +16 -1
- package/dist/components/inputs/TextInput/TextInput.d.ts +14 -4
- package/dist/components/inputs/Textarea/Textarea.d.ts +12 -2
- package/dist/components/inputs/Timepicker/Timepicker.d.ts +104 -0
- package/dist/components/inputs/input-utilities.d.ts +16 -1
- package/dist/components/{CTALink → links/CTALink}/CTALink.d.ts +2 -2
- 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/BookmarksMenu/BookmarksMenu.d.ts +151 -0
- package/dist/components/navigation/ButtonNav/ButtonNav.d.ts +11 -5
- package/dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +1 -0
- package/dist/components/navigation/Navbar/Navbar.d.ts +16 -15
- 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 +31 -5
- package/dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +13 -16
- package/dist/components/navigation/navigation-utilities.d.ts +15 -2
- package/dist/components/notifications/SectionMessage/SectionMessage.d.ts +12 -4
- 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/BottomSheet/BottomSheet.d.ts +66 -0
- package/dist/components/overlays/BulkActionBar/BulkActionBar.d.ts +48 -0
- package/dist/components/{Drawer → overlays/Drawer}/Drawer.d.ts +4 -4
- package/dist/components/overlays/FullScreenOverlay/FullScreenOverlay.d.ts +45 -0
- package/dist/components/{Modal → overlays/Modal}/Modal.d.ts +3 -1
- package/dist/components/{Pagination → pagination/Pagination}/Pagination.d.ts +7 -2
- package/dist/components/pagination/PaginationChapter/PaginationChapter.d.ts +55 -0
- package/dist/components/pagination/PaginationCompact/PaginationCompact.d.ts +67 -0
- package/dist/components/panels/BookmarksPanel/BookmarksPanel.d.ts +67 -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/FeaturePanel/FeaturePanel.d.ts +72 -0
- package/dist/components/panels/Panel/Panel.d.ts +3 -3
- package/dist/components/panels/PanelList/PanelList.d.ts +2 -2
- package/dist/components/panels/PanelList/PanelRow.d.ts +9 -1
- package/dist/components/panels/PanelStack/PanelStack.d.ts +19 -0
- package/dist/components/panels/WidgetPanel/WidgetPanel.d.ts +39 -0
- package/dist/components/panels/WorkspaceSelectorPanel/WorkspaceSelectorPanel.d.ts +57 -0
- 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-Table.stories.css +1 -0
- package/dist/css/component-css/pds-action-card.css +1 -0
- package/dist/css/component-css/pds-avatar-label.css +1 -0
- package/dist/css/component-css/pds-avatar.css +1 -1
- package/dist/css/component-css/pds-badge.css +1 -1
- 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-bookmarks-menu.css +1 -0
- package/dist/css/component-css/pds-bookmarks-panel.css +1 -0
- package/dist/css/component-css/pds-bottom-sheet.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-bulk-action-bar.css +1 -0
- 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 +46 -14
- package/dist/css/component-css/pds-callout.css +1 -1
- package/dist/css/component-css/pds-card-select.css +2 -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-group.css +1 -1
- 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-legacy.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 +1 -3
- package/dist/css/component-css/pds-drawer.css +1 -1
- package/dist/css/component-css/pds-dropdown-menu.css +2 -2
- package/dist/css/component-css/pds-dropdown.css +3 -0
- package/dist/css/component-css/pds-expansion-panel-group.css +1 -1
- package/dist/css/component-css/pds-expansion-panel.css +2 -1
- package/dist/css/component-css/pds-feature-panel.css +15 -0
- package/dist/css/component-css/pds-file-diff.css +1 -1
- package/dist/css/component-css/pds-file-upload.css +1 -7
- 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 +22 -14
- package/dist/css/component-css/pds-icon-story-only.css +1 -1
- 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 +189 -63
- 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 +11 -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-chapter.css +3 -0
- package/dist/css/component-css/pds-pagination-compact.css +1 -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-stack.css +1 -0
- package/dist/css/component-css/pds-panel.css +2 -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-picture.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-result-count.css +1 -0
- package/dist/css/component-css/pds-row-actions-menu.css +2 -0
- 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-button.css +1 -0
- package/dist/css/component-css/pds-select.css +1 -1
- package/dist/css/component-css/pds-side-nav-global.css +3 -7
- 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 +2 -2
- package/dist/css/component-css/pds-stat-panel.css +1 -0
- 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-status-scrim.css +1 -0
- package/dist/css/component-css/pds-step-list.css +1 -0
- package/dist/css/component-css/pds-stepper.css +5 -1
- package/dist/css/component-css/pds-switch.css +6 -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 +7 -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-timepicker.css +1 -0
- 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-story-only.css +1 -1
- 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-video-embed.css +1 -1
- package/dist/css/component-css/pds-widget-panel.css +1 -0
- package/dist/css/component-css/pds-workspace-selector-panel.css +1 -0
- package/dist/css/component-css/pds-workspace-selector.css +23 -1
- package/dist/css/design-tokens/variables.dark.css +371 -340
- package/dist/css/design-tokens/variables.global.css +10 -19
- package/dist/css/design-tokens/variables.light.css +367 -316
- package/dist/css/design-tokens/variables.typography.css +1 -2
- package/dist/css/layout-css/pds-app-layout.css +3 -2
- package/dist/css/layout-css/pds-docs-layout.css +1 -1
- package/dist/css/layout-css/pds-index.css +3 -9
- package/dist/css/layout-css/pds-sidebar-layout.css +13 -0
- package/dist/css/layout-css/pds-stat-panel-group.css +1 -0
- package/dist/css/layout-css/pds-stepper-layout.css +1 -1
- package/dist/css/layout-css/pds-three-item-layout.css +1 -1
- package/dist/css/layout-css/pds-two-item-layout.css +1 -1
- package/dist/css/pds-components.css +189 -63
- package/dist/css/pds-core.css +3 -2
- package/dist/css/pds-layouts.css +3 -9
- package/dist/index.css +5 -1
- package/dist/index.d.ts +101 -9
- package/dist/index.js +13601 -6078
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +59 -42
- package/dist/layouts/AppLayout/AppLayout.d.ts +85 -10
- package/dist/layouts/DocsLayout/DocsLayout.d.ts +9 -7
- package/dist/layouts/SidebarLayout/SidebarLayout.d.ts +41 -7
- package/dist/layouts/StatPanelGroup/StatPanelGroup.d.ts +32 -0
- package/dist/layouts/StepperLayout/StepperLayout.d.ts +13 -1
- 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/NestedOverlayContext.d.ts +14 -0
- package/dist/libs/components/StatusDot/StatusDot.d.ts +15 -0
- package/dist/libs/components/WorkspaceListItem/WorkspaceListItem.d.ts +40 -0
- package/dist/libs/components/useOverlayZIndex.d.ts +16 -0
- package/dist/libs/components/utils.d.ts +1 -1
- package/dist/libs/types/custom-types.d.ts +11 -5
- package/dist/libs/types/layout-types.d.ts +6 -1
- package/dist/libs/types/navigation-types.d.ts +17 -1
- package/dist/svg/anglesDown.svg +3 -0
- package/dist/svg/anglesUp.svg +3 -0
- package/dist/svg/arrowDownWideShort.svg +3 -0
- package/dist/svg/arrowUpShortWide.svg +3 -0
- package/dist/svg/barsStaggered.svg +3 -0
- package/dist/svg/bookmark.svg +3 -0
- package/dist/svg/bookmarkSolid.svg +3 -0
- package/dist/svg/box.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/files.svg +3 -0
- package/dist/svg/floppyDisk.svg +3 -0
- package/dist/svg/folders.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/list.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/penPaintbrush.svg +3 -0
- package/dist/svg/rectanglesMixed.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 +7 -7
- package/dist/utilities/GlobalWrapper/GlobalWrapper.d.ts +35 -0
- package/dist/utilities/ai-visuals/AiVisualsDemo.d.ts +8 -0
- package/dist/utilities/auto-grid/AutoGrid.d.ts +48 -0
- package/dist/utilities/context-providers/ThemeContext/ThemeContext.d.ts +113 -0
- package/dist/utilities/grid/Grid.d.ts +56 -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 +154 -0
- package/dist/utilities/hooks/useIsMobile/useIsMobile.d.ts +16 -0
- package/dist/utilities/hooks/useKeyPress/useKeyPress.d.ts +6 -0
- package/dist/utilities/hooks/useKeyboardShortcut/useKeyboardShortcut.d.ts +29 -0
- package/package.json +82 -46
- 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/cards/CardHeading/CardHeading.d.ts +0 -31
- package/dist/components/cards/CardSelectGroup/CardSelectGroup.d.ts +0 -60
- 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 -95
- 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 -34
- 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-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,53 +1,190 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { Locale } from 'date-fns';
|
|
3
|
-
import {
|
|
4
|
-
import 'react-day-picker/dist/style.css';
|
|
3
|
+
import { ValidationStatus } from '../../../libs/types/input-types';
|
|
5
4
|
import './datepicker.css';
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* A date range, as plain native `Date` objects. Replaces `react-day-picker`'s
|
|
7
|
+
* `DateRange` type (which consumers previously imported directly from
|
|
8
|
+
* `react-day-picker`) now that Datepicker's calendar core is built on
|
|
9
|
+
* react-aria instead. See guides/DATEPICKER-CONSUMER-MIGRATION.md.
|
|
10
|
+
*/
|
|
11
|
+
export interface DateRange {
|
|
12
|
+
from?: Date;
|
|
13
|
+
to?: Date;
|
|
14
|
+
}
|
|
15
|
+
export type PresetType = 'today' | 'current-week' | 'current-month' | 'last-week' | 'last-month';
|
|
7
16
|
export interface CustomPresetConfig {
|
|
8
17
|
custom?: () => DateRange;
|
|
18
|
+
/**
|
|
19
|
+
* Whole-day window, inclusive of both ends and signed by direction:
|
|
20
|
+
* negative counts back from today (`-7` → the last 7 days, ending today),
|
|
21
|
+
* positive counts forward (`7` → today plus the next 6 days). A "last N
|
|
22
|
+
* days" preset therefore needs a *negative* value; `1` is today alone.
|
|
23
|
+
*/
|
|
9
24
|
days?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Rolling window measured from the current instant, signed by direction:
|
|
27
|
+
* negative reaches into the past (`-2` → the last 2 hours), positive into
|
|
28
|
+
* the future (`2` → the next 2 hours). A "Last 2 hours" preset needs
|
|
29
|
+
* `-2`; `2` describes a window that has not happened yet.
|
|
30
|
+
*/
|
|
31
|
+
hours?: number;
|
|
10
32
|
label: string;
|
|
33
|
+
/**
|
|
34
|
+
* Rolling window measured from the current instant, signed the same way
|
|
35
|
+
* as `hours` — negative for the recent past (`-15` → the last 15
|
|
36
|
+
* minutes), positive for the near future.
|
|
37
|
+
*/
|
|
38
|
+
minutes?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Whether this preset's own `label` (e.g. "Last 15 min") should replace the
|
|
41
|
+
* trigger's computed date/time text while this preset is active. Defaults
|
|
42
|
+
* to `true` for sub-day presets (`hours`/`minutes` set, no `days`/`type`)
|
|
43
|
+
* and `false` otherwise — rolling sub-day windows read better as their own
|
|
44
|
+
* label than as a precise, already-stale-by-the-time-you-read-it
|
|
45
|
+
* timestamp. Set explicitly to override the default either way.
|
|
46
|
+
*/
|
|
47
|
+
showLabelInTrigger?: boolean;
|
|
11
48
|
type?: PresetType;
|
|
12
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Options for `getPresetDateRange`. Both are optional and additive — omitting
|
|
52
|
+
* them preserves the function's original behavior (browser-local time zone,
|
|
53
|
+
* Sunday-first weeks).
|
|
54
|
+
*/
|
|
55
|
+
export interface GetPresetDateRangeOptions {
|
|
56
|
+
/**
|
|
57
|
+
* BCP-47 locale, used only for `current-week`/`last-week`'s week-start day
|
|
58
|
+
* (e.g. Monday-first in most of Europe vs. Sunday-first in the US).
|
|
59
|
+
* Defaults to `'en-US'` (Sunday-first), matching this function's original,
|
|
60
|
+
* locale-unaware behavior.
|
|
61
|
+
*/
|
|
62
|
+
locale?: string;
|
|
63
|
+
/**
|
|
64
|
+
* IANA time zone identifier. Determines which calendar day/week/month
|
|
65
|
+
* "today" resolves to for `days`/`type` presets — irrelevant for
|
|
66
|
+
* `hours`/`minutes` presets, which are absolute-time offsets from the
|
|
67
|
+
* current instant, not calendar-day boundaries. Defaults to the browser's
|
|
68
|
+
* local time zone.
|
|
69
|
+
*/
|
|
70
|
+
timeZone?: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Converts a preset config to a DateRange. Use this alongside an external
|
|
74
|
+
* SegmentedButton, Select, or other control to compose preset date pickers.
|
|
75
|
+
*/
|
|
76
|
+
export declare const getPresetDateRange: (preset: CustomPresetConfig, options?: GetPresetDateRangeOptions) => DateRange;
|
|
13
77
|
export interface DatepickerTranslationStrings {
|
|
14
78
|
clearButton?: string;
|
|
79
|
+
customPresetLabel?: string;
|
|
15
80
|
doneButton?: string;
|
|
81
|
+
endTimeLabel?: string;
|
|
82
|
+
localTimeZoneLabel?: string;
|
|
83
|
+
nextMonthLabel?: string;
|
|
16
84
|
noDateRangeSelected?: string;
|
|
17
85
|
noDateSelected?: string;
|
|
18
86
|
pleaseSelectEndDate?: string;
|
|
87
|
+
presetsGroupLabel?: string;
|
|
88
|
+
previousMonthLabel?: string;
|
|
19
89
|
selectedDate?: string;
|
|
20
90
|
selectedDateRange?: string;
|
|
21
91
|
selectedStartDate?: string;
|
|
92
|
+
startTimeLabel?: string;
|
|
93
|
+
timeLabel?: string;
|
|
94
|
+
timeZoneSwitcherLabel?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Separator between a range's endpoints in the screen-reader
|
|
97
|
+
* announcement only. The trigger uses a typographic en dash in its own
|
|
98
|
+
* styled span, which is decorative and not translated.
|
|
99
|
+
*/
|
|
22
100
|
to?: string;
|
|
101
|
+
todayButton?: string;
|
|
102
|
+
utcTimeZoneLabel?: string;
|
|
23
103
|
}
|
|
24
104
|
/**
|
|
25
105
|
* Prop types for Datepicker.
|
|
26
106
|
*/
|
|
27
107
|
type DatepickerHTMLProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'value'>;
|
|
28
|
-
|
|
108
|
+
interface DatepickerSharedProps extends DatepickerHTMLProps {
|
|
109
|
+
/**
|
|
110
|
+
* Whether the `presets` list includes its "Custom" entry (the one that
|
|
111
|
+
* hands date selection over to the calendar). Has no effect unless
|
|
112
|
+
* `presets` is also set. Defaults to `true`. Set to `false` to offer the
|
|
113
|
+
* fixed presets *only* — a consumer that wants a rolling-window picker
|
|
114
|
+
* with no arbitrary-range escape hatch (e.g. a launch that only supports
|
|
115
|
+
* 24h/7d/30d windows). Pair with `showPresetCalendar={false}` for a
|
|
116
|
+
* popover that is nothing but the preset list; on its own it just removes
|
|
117
|
+
* the entry, leaving the always-visible calendar alongside the list.
|
|
118
|
+
*/
|
|
119
|
+
allowCustomRange?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Whether range mode may select a span of days at all. Defaults to
|
|
122
|
+
* `true` — react-aria's two-click anchor-then-commit gesture. Set to
|
|
123
|
+
* `false` where a multi-day span would be meaningless or unsupported:
|
|
124
|
+
* a single click then selects that day as its own start and end, with no
|
|
125
|
+
* second click needed. The emitted value stays a `DateRange` (with
|
|
126
|
+
* `showTime`, the whole day: 00:00 through 23:59), so it keeps composing
|
|
127
|
+
* with `presets`, whose entries still compute multi-day ranges of their
|
|
128
|
+
* own. Has no effect in single mode, which already selects one date.
|
|
129
|
+
*/
|
|
130
|
+
allowDateRangeSelection?: boolean;
|
|
29
131
|
/**
|
|
30
132
|
* Additional class names.
|
|
31
133
|
*/
|
|
32
134
|
className?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Which `presets` entry (by its own `label`) starts out active, for a
|
|
137
|
+
* picker whose query already has a default window (e.g. a log viewer
|
|
138
|
+
* defaulting to the last 15 minutes). Its range seeds the selection, so
|
|
139
|
+
* the trigger reads as a real selection rather than a placeholder and the
|
|
140
|
+
* calendar opens on it. Works with either preset granularity.
|
|
141
|
+
*
|
|
142
|
+
* `onChange` is **not** called for this initial value — read that state
|
|
143
|
+
* from the same constant you pass here instead.
|
|
144
|
+
*
|
|
145
|
+
* Requires `presets` and `mode="range"`; an unmatched label is a no-op
|
|
146
|
+
* (dev warning only). A controlled `value` owns the range, leaving this
|
|
147
|
+
* to mark only the active preset. Like `defaultValue`, it is mount-only.
|
|
148
|
+
*/
|
|
149
|
+
defaultPresetLabel?: string;
|
|
33
150
|
/**
|
|
34
151
|
* Is the field disabled?
|
|
35
152
|
*/
|
|
36
153
|
disabled?: boolean;
|
|
37
154
|
/**
|
|
38
|
-
*
|
|
155
|
+
* Optional note rendered at the bottom of the calendar dropdown, below the
|
|
156
|
+
* `showTime` field(s) when present (otherwise directly below the calendar
|
|
157
|
+
* grid(s)) and above the footer actions. Accepts any `ReactNode` — e.g. an
|
|
158
|
+
* "Available window: [start] – [end]" constraint hint — this component
|
|
159
|
+
* doesn't prescribe what goes there.
|
|
160
|
+
*/
|
|
161
|
+
footerNote?: ReactNode;
|
|
162
|
+
/**
|
|
163
|
+
* Hour format for the `showTime` field(s), forwarded to each embedded
|
|
164
|
+
* `Timepicker`. `12` displays hour + AM/PM (e.g. "12:30 PM"); `24`
|
|
165
|
+
* displays a 24-hour hour segment with no AM/PM (e.g. "13:30"). Not
|
|
166
|
+
* derivable from `locale` — the embedded fields always receive an
|
|
167
|
+
* explicit `hourCycle`, which overrides locale-derived formatting.
|
|
39
168
|
*/
|
|
40
|
-
|
|
169
|
+
hourCycle?: 12 | 24;
|
|
41
170
|
/**
|
|
42
171
|
* Input ID.
|
|
43
172
|
*/
|
|
44
173
|
id: string;
|
|
45
174
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
175
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
176
|
+
* container up to this cap, then shrinks below it rather than
|
|
177
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
178
|
+
* fills its container with no cap.
|
|
49
179
|
*/
|
|
50
180
|
inputWidth?: number;
|
|
181
|
+
/**
|
|
182
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
183
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
184
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
185
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
186
|
+
*/
|
|
187
|
+
inputWidthMin?: number;
|
|
51
188
|
/**
|
|
52
189
|
* Input label.
|
|
53
190
|
*/
|
|
@@ -57,15 +194,33 @@ export interface DatepickerProps extends DatepickerHTMLProps {
|
|
|
57
194
|
*/
|
|
58
195
|
locale?: Locale;
|
|
59
196
|
/**
|
|
60
|
-
*
|
|
197
|
+
* Maximum selectable date.
|
|
198
|
+
*/
|
|
199
|
+
maxDate?: Date;
|
|
200
|
+
/**
|
|
201
|
+
* Helper text displayed below the input.
|
|
202
|
+
*/
|
|
203
|
+
message?: string | ReactNode;
|
|
204
|
+
/**
|
|
205
|
+
* Minimum selectable date.
|
|
61
206
|
*/
|
|
62
|
-
|
|
207
|
+
minDate?: Date;
|
|
63
208
|
/**
|
|
64
209
|
* Placeholder text for the trigger button.
|
|
65
210
|
*/
|
|
66
211
|
placeholder?: string;
|
|
67
212
|
/**
|
|
68
|
-
*
|
|
213
|
+
* Renders a preset list (each computed via `getPresetDateRange`) in a
|
|
214
|
+
* dedicated column to the left of the calendar, with a "Custom" entry
|
|
215
|
+
* below it for picking dates directly from the calendar. The calendar
|
|
216
|
+
* itself is always shown alongside the list, never hidden/collapsed.
|
|
217
|
+
* Selecting a preset drives the calendar's own selection; picking a date
|
|
218
|
+
* directly from the calendar (or editing a `showTime` field) marks
|
|
219
|
+
* "Custom" as active. Only meaningful in range mode (`mode="range"`) —
|
|
220
|
+
* every preset computes a `DateRange`. This is purely additive: the
|
|
221
|
+
* existing external-composition pattern (`getPresetDateRange` +
|
|
222
|
+
* `CustomPresetConfig` wired to an external `SegmentedButton`/`Select`)
|
|
223
|
+
* keeps working unchanged whether or not this prop is used.
|
|
69
224
|
*/
|
|
70
225
|
presets?: CustomPresetConfig[];
|
|
71
226
|
/**
|
|
@@ -76,6 +231,61 @@ export interface DatepickerProps extends DatepickerHTMLProps {
|
|
|
76
231
|
* Should the label be visible? If false, it will render for screen readers only.
|
|
77
232
|
*/
|
|
78
233
|
showLabel?: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the calendar (and, when `showTime` is on, the time fields) is
|
|
236
|
+
* shown alongside the `presets` list from the start, or only once "Custom"
|
|
237
|
+
* is clicked. Has no effect unless `presets` is also set. Defaults to
|
|
238
|
+
* `true` — the calendar is always visible, matching this component's
|
|
239
|
+
* original `presets` behavior. Set to `false` for a compact, list-only
|
|
240
|
+
* popover (e.g. a log viewer's rolling-window picker) that expands to
|
|
241
|
+
* reveal the calendar only when the viewer picks "Custom" — once
|
|
242
|
+
* expanded, it stays expanded for the rest of that popover session (even
|
|
243
|
+
* if the viewer clicks back to a different preset afterward); it only
|
|
244
|
+
* collapses again the next time the popover is freshly opened.
|
|
245
|
+
*/
|
|
246
|
+
showPresetCalendar?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Embeds Timepicker field(s) in the calendar dropdown (one in single mode,
|
|
249
|
+
* start/end in range mode) — the selected time-of-day is baked directly
|
|
250
|
+
* into the emitted `value`'s own `Date`(s); `value`/`onChange` stay plain
|
|
251
|
+
* `Date`/`DateRange`, no shape change.
|
|
252
|
+
*/
|
|
253
|
+
showTime?: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Renders an inline-labeled "UTC" / "Local" `SegmentedButton` below the
|
|
256
|
+
* embedded time field(s) that lets the viewer swap which zone the
|
|
257
|
+
* displayed (and subsequently entered) time-of-day is shown in. "Local" is
|
|
258
|
+
* whatever `timeZone` resolves to (the configured zone, not necessarily
|
|
259
|
+
* the browser's own). Only the *displayed/emitted time-of-day* changes
|
|
260
|
+
* when toggled — the selected calendar day never moves, even though, for
|
|
261
|
+
* a time near midnight, converting to a different zone can technically
|
|
262
|
+
* land in the neighboring day; this is an accepted, documented
|
|
263
|
+
* simplification rather than a full zoned re-derivation of the selected
|
|
264
|
+
* date. Has no effect unless `showTime` is also true.
|
|
265
|
+
*/
|
|
266
|
+
showTimeZoneSwitcher?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* Whether the calendar footer includes its "Today" button. Defaults to
|
|
269
|
+
* `true`. Set to `false` to leave only the end-aligned buttons —
|
|
270
|
+
* `Clear`, plus `Done` when `mode` is `'range'` or `showTime` is set.
|
|
271
|
+
* Blanking `translationStrings.todayButton` only empties the label,
|
|
272
|
+
* leaving the button itself in place.
|
|
273
|
+
*/
|
|
274
|
+
showTodayButton?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* IANA time zone identifier (e.g. "America/Los_Angeles", "UTC") used to
|
|
277
|
+
* combine the selected date with `showTime`'s entered time-of-day into a
|
|
278
|
+
* correct absolute instant. Passed straight through to each embedded
|
|
279
|
+
* `Timepicker`'s own `timeZone` prop as well. Defaults to the browser's
|
|
280
|
+
* local time zone. Also acts as the "Local" side of
|
|
281
|
+
* `showTimeZoneSwitcher`, when enabled. Independently of `showTime`, this
|
|
282
|
+
* is the zone every selected day is resolved in — the day the calendar
|
|
283
|
+
* highlights, the date the trigger renders, what "today" means, and the
|
|
284
|
+
* screen-reader announcements — so a picker pinned to another zone shows
|
|
285
|
+
* the day the viewer actually picked rather than whichever day that
|
|
286
|
+
* instant happens to fall on locally.
|
|
287
|
+
*/
|
|
288
|
+
timeZone?: string;
|
|
79
289
|
/**
|
|
80
290
|
* Optional tooltip text to display additional information.
|
|
81
291
|
*/
|
|
@@ -85,12 +295,66 @@ export interface DatepickerProps extends DatepickerHTMLProps {
|
|
|
85
295
|
*/
|
|
86
296
|
translationStrings?: DatepickerTranslationStrings;
|
|
87
297
|
/**
|
|
88
|
-
*
|
|
298
|
+
* Validation message that takes priority over `message` when set.
|
|
299
|
+
*/
|
|
300
|
+
validationMessage?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Validation status. Controls error/success styling and message display.
|
|
303
|
+
*/
|
|
304
|
+
validationStatus?: ValidationStatus;
|
|
305
|
+
/**
|
|
306
|
+
* Number of months shown side by side in range mode. Defaults to `2`.
|
|
307
|
+
* Fixed for the lifetime of a given `Datepicker` instance — it does not
|
|
308
|
+
* auto-adjust based on the selected range or active preset, matching the
|
|
309
|
+
* static layout shown in Figma's own "Edge logs" recipe (a one-month
|
|
310
|
+
* range+time+presets picker for short windows, since its calendar grid
|
|
311
|
+
* never needs to show more than a single month at once). Has no effect
|
|
312
|
+
* in single mode, which always shows one month.
|
|
89
313
|
*/
|
|
90
|
-
|
|
314
|
+
visibleMonths?: 1 | 2;
|
|
91
315
|
}
|
|
316
|
+
export interface SingleDatepickerProps extends DatepickerSharedProps {
|
|
317
|
+
/**
|
|
318
|
+
* Single-date selection (the default) — omit `mode` entirely, or set it
|
|
319
|
+
* explicitly to `'single'`.
|
|
320
|
+
*/
|
|
321
|
+
mode?: 'single';
|
|
322
|
+
/**
|
|
323
|
+
* onChange handler.
|
|
324
|
+
*/
|
|
325
|
+
onChange?: (value: Date | undefined) => void;
|
|
326
|
+
/**
|
|
327
|
+
* Selected date.
|
|
328
|
+
*/
|
|
329
|
+
value?: Date;
|
|
330
|
+
}
|
|
331
|
+
export interface RangeDatepickerProps extends DatepickerSharedProps {
|
|
332
|
+
/**
|
|
333
|
+
* Date-range selection: the calendar shows two months side-by-side and
|
|
334
|
+
* the selected span is visually highlighted.
|
|
335
|
+
*/
|
|
336
|
+
mode: 'range';
|
|
337
|
+
/**
|
|
338
|
+
* onChange handler.
|
|
339
|
+
*/
|
|
340
|
+
onChange?: (value: DateRange | undefined) => void;
|
|
341
|
+
/**
|
|
342
|
+
* Selected date range.
|
|
343
|
+
*/
|
|
344
|
+
value?: DateRange;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* `mode` is a discriminated union rather than a `hasDateRange` boolean —
|
|
348
|
+
* `value`/`onChange` narrow to the correct shape for the given mode at the
|
|
349
|
+
* type level, instead of relying on a boolean the compiler can't actually
|
|
350
|
+
* tie to the value's shape (which required internal `as DateRange`/`as Date`
|
|
351
|
+
* casts throughout). `mode` is optional and defaults to `'single'`, so
|
|
352
|
+
* existing single-date consumers (the common case) need no changes — only
|
|
353
|
+
* `hasDateRange` → `mode="range"` for range consumers.
|
|
354
|
+
*/
|
|
355
|
+
export type DatepickerProps = SingleDatepickerProps | RangeDatepickerProps;
|
|
92
356
|
/**
|
|
93
357
|
* Datepicker UI component.
|
|
94
358
|
*/
|
|
95
|
-
export declare const Datepicker: ({ className, disabled,
|
|
359
|
+
export declare const Datepicker: ({ allowCustomRange, allowDateRangeSelection, className, defaultPresetLabel, disabled, footerNote, hourCycle, id, inputWidth, inputWidthMin, label, locale, maxDate, message, minDate, mode, onChange, placeholder, presets, required, showLabel, showPresetCalendar, showTime, showTimeZoneSwitcher, showTodayButton, timeZone, tooltipText, translationStrings: translationStringsProp, validationMessage, validationStatus, value, visibleMonths, ...props }: DatepickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
96
360
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import { ValidationStatus } from '../../../libs/types/input-types';
|
|
3
3
|
import './file-upload.css';
|
|
4
|
+
export type FileUploadSize = 's' | 'm';
|
|
4
5
|
type LabelStrings = {
|
|
5
6
|
chooseFile: string;
|
|
6
7
|
clearButton: string;
|
|
@@ -38,9 +39,19 @@ export interface FileUploadProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
38
39
|
*/
|
|
39
40
|
inputProps?: ComponentPropsWithoutRef<'input'>;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
43
|
+
* container up to this cap, then shrinks below it rather than
|
|
44
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
45
|
+
* fills its container with no cap.
|
|
42
46
|
*/
|
|
43
47
|
inputWidth?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
50
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
51
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
52
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
53
|
+
*/
|
|
54
|
+
inputWidthMin?: number;
|
|
44
55
|
/**
|
|
45
56
|
* Translation strings for various labels or other visually-hidden text.
|
|
46
57
|
*/
|
|
@@ -73,6 +84,10 @@ export interface FileUploadProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
73
84
|
* Should the label be visible? If false, it will render for screen readers only.
|
|
74
85
|
*/
|
|
75
86
|
showLabel?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Size of the input field.
|
|
89
|
+
*/
|
|
90
|
+
size?: FileUploadSize;
|
|
76
91
|
/**
|
|
77
92
|
* Optional tooltip text to display additional information.
|
|
78
93
|
*/
|
|
@@ -44,13 +44,31 @@ export interface RadioGroupProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
44
44
|
*/
|
|
45
45
|
id: string;
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
48
|
+
* container up to this cap, then shrinks below it rather than
|
|
49
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
50
|
+
* fills its container with no cap.
|
|
48
51
|
*/
|
|
49
52
|
inputWidth?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
55
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
56
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
57
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
58
|
+
*/
|
|
59
|
+
inputWidthMin?: number;
|
|
50
60
|
/**
|
|
51
61
|
* Label for the radio group
|
|
52
62
|
*/
|
|
53
63
|
label: string;
|
|
64
|
+
/**
|
|
65
|
+
* Visual treatment of the legend. `'default'` matches other form field
|
|
66
|
+
* labels — use it when this group is one of several inputs on a form.
|
|
67
|
+
* `'heading'` is semibold with more room below it, for cases where the
|
|
68
|
+
* group reads as its own section label (e.g. a filter panel's category
|
|
69
|
+
* groups) rather than a form field among others.
|
|
70
|
+
*/
|
|
71
|
+
labelVariant?: 'default' | 'heading';
|
|
54
72
|
/**
|
|
55
73
|
* Input message
|
|
56
74
|
*/
|
|
@@ -101,4 +119,4 @@ export interface RadioGroupProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
101
119
|
/**
|
|
102
120
|
* RadioGroup UI component
|
|
103
121
|
*/
|
|
104
|
-
export declare const RadioGroup: ({ className, defaultValue, disabled, fieldsetProps, id, inputWidth, label, message, onBlur, onChange, onValueChange, options, required, showLabel, tooltipText, validationMessage, validationStatus, value, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
export declare const RadioGroup: ({ className, defaultValue, disabled, fieldsetProps, id, inputWidth, inputWidthMin, label, labelVariant, message, onBlur, onChange, onValueChange, options, required, showLabel, tooltipText, validationMessage, validationStatus, value, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { ValidationStatus } from '../../../libs/types/input-types';
|
|
|
3
3
|
import { PDSIcon } from '../../icons/Icon/Icon';
|
|
4
4
|
import './select.css';
|
|
5
5
|
export type SelectIconType = PDSIcon | 'google' | 'microsoft';
|
|
6
|
+
export type SelectSize = 's' | 'm';
|
|
6
7
|
type LabelStrings = {
|
|
7
8
|
selectOptionText: string;
|
|
8
9
|
triggerButton: string;
|
|
@@ -45,7 +46,13 @@ interface SelectOptionGroupProps {
|
|
|
45
46
|
*/
|
|
46
47
|
export interface SelectProps {
|
|
47
48
|
/**
|
|
48
|
-
* Automatically resize the select to fit the longest option label. Defaults
|
|
49
|
+
* Automatically resize the select to fit the longest option label. Defaults
|
|
50
|
+
* to false (width: 100%). Has no effect when `inputWidth` is set — the two
|
|
51
|
+
* are mutually exclusive: `autoWidth` sizes to the options' own content,
|
|
52
|
+
* `inputWidth` sizes to a cap you choose. Use `autoWidth` for a compact
|
|
53
|
+
* select whose size should track its options (e.g. a short list of terse
|
|
54
|
+
* values); use `inputWidth` (with `inputWidthMin` if the row wraps) when
|
|
55
|
+
* the select needs to fit a specific layout regardless of option length.
|
|
49
56
|
*/
|
|
50
57
|
autoWidth?: boolean;
|
|
51
58
|
/**
|
|
@@ -60,6 +67,12 @@ export interface SelectProps {
|
|
|
60
67
|
* Is the field disabled?
|
|
61
68
|
*/
|
|
62
69
|
disabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Persistent content rendered below the options list (e.g. a "Create new…"
|
|
72
|
+
* link). Unlike an option, it isn't selectable and stays visible
|
|
73
|
+
* regardless of the current options.
|
|
74
|
+
*/
|
|
75
|
+
footer?: ReactNode;
|
|
63
76
|
/**
|
|
64
77
|
* Optional icon to display before the placeholder text (selectOptionText). Only shows when no value is selected.
|
|
65
78
|
*/
|
|
@@ -69,9 +82,20 @@ export interface SelectProps {
|
|
|
69
82
|
*/
|
|
70
83
|
id: string;
|
|
71
84
|
/**
|
|
72
|
-
*
|
|
85
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
86
|
+
* container up to this cap, then shrinks below it rather than
|
|
87
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
88
|
+
* fills its container with no cap. Takes precedence over `autoWidth`
|
|
89
|
+
* when both are set — see `autoWidth` for when to use each.
|
|
73
90
|
*/
|
|
74
91
|
inputWidth?: number;
|
|
92
|
+
/**
|
|
93
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
94
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
95
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
96
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
97
|
+
*/
|
|
98
|
+
inputWidthMin?: number;
|
|
75
99
|
/**
|
|
76
100
|
* Field label.
|
|
77
101
|
*/
|
|
@@ -108,6 +132,14 @@ export interface SelectProps {
|
|
|
108
132
|
* Should the label be visible? If false, it will render for screen readers only.
|
|
109
133
|
*/
|
|
110
134
|
showLabel?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Should the selected option show a checkmark icon in the dropdown list? Defaults to true.
|
|
137
|
+
*/
|
|
138
|
+
showSelectedIcon?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Size of the select field.
|
|
141
|
+
*/
|
|
142
|
+
size?: SelectSize;
|
|
111
143
|
/**
|
|
112
144
|
* Optional tooltip text to display additional information.
|
|
113
145
|
*/
|
|
@@ -132,5 +164,5 @@ export declare const SelectOptionGroup: ({ children, label, }: SelectOptionGroup
|
|
|
132
164
|
/**
|
|
133
165
|
* Select UI component
|
|
134
166
|
*/
|
|
135
|
-
export declare const Select: ({ autoWidth, className, defaultValue, disabled, icon, id, inputWidth, label, labelStrings, message, onBlur, onFocus, onOptionSelect, options, required, showLabel, tooltipText, validationMessage, validationStatus, value, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
167
|
+
export declare const Select: ({ autoWidth, className, defaultValue, disabled, footer, icon, id, inputWidth, inputWidthMin, label, labelStrings, message, onBlur, onFocus, onOptionSelect, options, required, showLabel, showSelectedIcon, size, tooltipText, validationMessage, validationStatus, value, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
136
168
|
export {};
|
|
@@ -29,9 +29,19 @@ export interface SwitchProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
29
29
|
*/
|
|
30
30
|
inputProps?: ComponentPropsWithoutRef<'input'>;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
33
|
+
* container up to this cap, then shrinks below it rather than
|
|
34
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
35
|
+
* fills its container with no cap.
|
|
33
36
|
*/
|
|
34
37
|
inputWidth?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
40
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
41
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
42
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
43
|
+
*/
|
|
44
|
+
inputWidthMin?: number;
|
|
35
45
|
/**
|
|
36
46
|
* Label of the switch field.
|
|
37
47
|
*/
|
|
@@ -41,7 +51,7 @@ export interface SwitchProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
41
51
|
*/
|
|
42
52
|
message?: string | ReactNode;
|
|
43
53
|
/**
|
|
44
|
-
* Status text for when switch is off.
|
|
54
|
+
* Status text for when the switch is off. Visual only (not announced to screen readers, which rely on `role="switch"`).
|
|
45
55
|
*/
|
|
46
56
|
offLabel?: string;
|
|
47
57
|
/**
|
|
@@ -49,7 +59,7 @@ export interface SwitchProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
49
59
|
*/
|
|
50
60
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
51
61
|
/**
|
|
52
|
-
* Status text for when switch is on.
|
|
62
|
+
* Status text for when the switch is on. Visual only (not announced to screen readers, which rely on `role="switch"`).
|
|
53
63
|
*/
|
|
54
64
|
onLabel?: string;
|
|
55
65
|
/**
|
|
@@ -61,11 +71,11 @@ export interface SwitchProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
61
71
|
*/
|
|
62
72
|
showLabel?: boolean;
|
|
63
73
|
/**
|
|
64
|
-
* Show
|
|
74
|
+
* Show the on/off status label next to the switch. Visual only; state is always available to screen readers via `role="switch"`.
|
|
65
75
|
*/
|
|
66
76
|
showStatusLabel?: boolean;
|
|
67
77
|
/**
|
|
68
|
-
* Determines the placement of the
|
|
78
|
+
* Determines the placement of the status label relative to the switch. Default set to `right`.
|
|
69
79
|
*/
|
|
70
80
|
statusLabelPlacement?: 'right' | 'left';
|
|
71
81
|
/**
|
|
@@ -15,6 +15,7 @@ export type TagType = {
|
|
|
15
15
|
id: string;
|
|
16
16
|
value: string;
|
|
17
17
|
};
|
|
18
|
+
export type TagsInputSize = 's' | 'm';
|
|
18
19
|
type DivProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'>;
|
|
19
20
|
/**
|
|
20
21
|
* Prop types for TagsInput
|
|
@@ -41,9 +42,19 @@ export interface TagsInputProps extends DivProps {
|
|
|
41
42
|
*/
|
|
42
43
|
inputMinHeight?: number;
|
|
43
44
|
/**
|
|
44
|
-
*
|
|
45
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
46
|
+
* container up to this cap, then shrinks below it rather than
|
|
47
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
48
|
+
* fills its container with no cap.
|
|
45
49
|
*/
|
|
46
50
|
inputWidth?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
53
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
54
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
55
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
56
|
+
*/
|
|
57
|
+
inputWidthMin?: number;
|
|
47
58
|
/**
|
|
48
59
|
* Should tags be sortable via drag-and-drop and keyboard shortcuts? Defaults to false.
|
|
49
60
|
*/
|
|
@@ -72,6 +83,10 @@ export interface TagsInputProps extends DivProps {
|
|
|
72
83
|
* Should the label be visible? If false, it will render for screen readers only.
|
|
73
84
|
*/
|
|
74
85
|
showLabel?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Size of the input.
|
|
88
|
+
*/
|
|
89
|
+
size?: TagsInputSize;
|
|
75
90
|
/**
|
|
76
91
|
* Tags array. The component is controlled and requires managing state externally.
|
|
77
92
|
*/
|
|
@@ -9,7 +9,7 @@ type LabelStrings = {
|
|
|
9
9
|
visibilityToggleHide: string;
|
|
10
10
|
visibilityToggleShow: string;
|
|
11
11
|
};
|
|
12
|
-
type HtmlInputTypes = 'text' | 'number' | 'email' | 'password' | 'tel' | 'url' | 'search';
|
|
12
|
+
type HtmlInputTypes = 'text' | 'number' | 'email' | 'password' | 'tel' | 'time' | 'url' | 'search';
|
|
13
13
|
/**
|
|
14
14
|
* Prop types for TextInput
|
|
15
15
|
*/
|
|
@@ -56,9 +56,19 @@ export interface TextInputProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
56
56
|
*/
|
|
57
57
|
inputProps?: ComponentPropsWithoutRef<'input'>;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Maximum width of the input field in pixels. The input fills its
|
|
60
|
+
* container up to this cap, then shrinks below it rather than
|
|
61
|
+
* overflowing in a tight flex/grid layout. When omitted, the input
|
|
62
|
+
* fills its container with no cap.
|
|
60
63
|
*/
|
|
61
64
|
inputWidth?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Minimum width of the input field in pixels, in a tight flex/grid layout
|
|
67
|
+
* that wraps (e.g. flexWrap="wrap"). Gives the row a real point to wrap at
|
|
68
|
+
* instead of shrinking the input indefinitely. Has no effect without
|
|
69
|
+
* inputWidth, and no effect on its own without a wrapping layout.
|
|
70
|
+
*/
|
|
71
|
+
inputWidthMin?: number;
|
|
62
72
|
/**
|
|
63
73
|
* Input label.
|
|
64
74
|
*/
|
|
@@ -110,7 +120,7 @@ export interface TextInputProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
110
120
|
/**
|
|
111
121
|
* Input size.
|
|
112
122
|
*/
|
|
113
|
-
size?: 's' | 'm'
|
|
123
|
+
size?: 's' | 'm';
|
|
114
124
|
/**
|
|
115
125
|
* Optional tooltip text to display additional information.
|
|
116
126
|
*/
|
|
@@ -120,7 +130,7 @@ export interface TextInputProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
120
130
|
*/
|
|
121
131
|
translationStrings?: LabelStrings;
|
|
122
132
|
/**
|
|
123
|
-
* Type of input field to use.
|
|
133
|
+
* Type of input field to use. For `time`, prefer the Timepicker component when possible — it offers segmented entry, 12/24-hour display, and timezone support. Use TextInput's native `time` type only as a lightweight fallback where that complexity isn't warranted; note it renders with browser-native time picker UI that isn't fully styleable to match PDS.
|
|
124
134
|
*/
|
|
125
135
|
type?: HtmlInputTypes;
|
|
126
136
|
/**
|