@pantheon-systems/pds-toolkit-react 1.0.0-dev.99 → 1.0.0-dev.9999
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/_dist/components/Avatar/Avatar.d.ts +36 -0
- package/_dist/components/BranchDiff/BranchDiff.d.ts +43 -0
- package/_dist/components/CTALink/CTALink.d.ts +20 -0
- package/_dist/components/CTASlice/CTASlice.d.ts +43 -0
- package/_dist/components/Callout/Callout.d.ts +31 -0
- package/_dist/components/Callout/sample-callout-content.d.ts +2 -0
- package/_dist/components/CodeBlock/CodeBlock.d.ts +85 -0
- package/_dist/components/CodeBlock/code-examples.d.ts +6 -0
- package/_dist/components/CodeBlock/themes/index.d.ts +2 -0
- package/_dist/components/CodeBlock/themes/pdsDark.d.ts +2 -0
- package/_dist/components/CodeBlock/themes/pdsLight.d.ts +2 -0
- package/_dist/components/ComparisonList/ComparisonList.d.ts +42 -0
- package/_dist/components/DashboardStat/DashboardStat.d.ts +28 -0
- package/_dist/components/FileDiff/FileDiff.d.ts +35 -0
- package/_dist/components/FlowSteps/FlowSteps.d.ts +37 -0
- package/_dist/components/FlowSteps/example-steps.d.ts +15 -0
- package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +35 -0
- package/_dist/components/Modal/Modal.d.ts +54 -0
- package/_dist/components/Pagination/Pagination.d.ts +54 -0
- package/_dist/components/Pagination/usePagination.d.ts +7 -0
- package/_dist/components/PantheonLogo/PantheonLogo.d.ts +32 -0
- package/_dist/components/PantheonLogo/pantheon-logo-data.d.ts +4 -0
- package/_dist/components/Picture/Picture.d.ts +37 -0
- package/_dist/components/Popover/Popover.d.ts +66 -0
- package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
- package/_dist/components/RefreshChecker/RefreshChecker.d.ts +54 -0
- package/_dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +57 -0
- package/_dist/components/Skiplink/Skiplink.d.ts +21 -0
- package/_dist/components/SocialLinks/SocialLinks.d.ts +23 -0
- package/_dist/components/StatusIndicator/StatusIndicator.d.ts +24 -0
- package/_dist/components/Table/Table.d.ts +27 -0
- package/_dist/components/TableOfContents/TableOfContents.d.ts +45 -0
- package/_dist/components/Tabs/Tabs.d.ts +63 -0
- package/_dist/components/Tag/Tag.d.ts +39 -0
- package/_dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +32 -0
- package/_dist/components/Tooltip/Tooltip.d.ts +51 -0
- package/_dist/components/VideoEmbed/VideoEmbed.d.ts +28 -0
- package/_dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +27 -0
- package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +35 -0
- package/_dist/components/badges/Tally/Tally.d.ts +38 -0
- package/_dist/components/buttons/Button/Button.d.ts +66 -0
- package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +48 -0
- package/_dist/components/buttons/ClipboardButton/ClipboardButton.d.ts +31 -0
- package/_dist/components/buttons/CloseButton/CloseButton.d.ts +27 -0
- package/_dist/components/buttons/IconButton/IconButton.d.ts +50 -0
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +75 -0
- package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +63 -0
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +41 -0
- package/_dist/components/buttons/SplitButton/split-button-sample-data.d.ts +17 -0
- package/_dist/components/buttons/UtilityButton/UtilityButton.d.ts +56 -0
- package/_dist/components/cards/Card/Card.d.ts +29 -0
- package/_dist/components/cards/CardHeading/CardHeading.d.ts +32 -0
- package/_dist/components/cards/CardSelectGroup/CardSelectGroup.d.ts +60 -0
- package/_dist/components/cards/EmptyStateCard/EmptyStateCard.d.ts +36 -0
- package/_dist/components/cards/LinksCard/LinksCard.d.ts +29 -0
- package/_dist/components/cards/LinksCard/links-card-sample-data.d.ts +2 -0
- package/_dist/components/cards/NewSiteCard/NewSiteCard.d.ts +57 -0
- package/_dist/components/cards/PaymentCard/PaymentCard.d.ts +47 -0
- package/_dist/components/cards/PricingCard/PricingCard.d.ts +90 -0
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +45 -0
- package/_dist/components/empty-states/CompactEmptyState/CompactEmptyState.d.ts +37 -0
- package/_dist/components/empty-states/HorizontalEmptyState/HorizontalEmptyState.d.ts +69 -0
- package/_dist/components/empty-states/VerticalEmptyState/VerticalEmptyState.d.ts +47 -0
- package/_dist/components/footer/FooterHeading/FooterHeading.d.ts +22 -0
- package/_dist/components/footer/FooterLinks/FooterLinks.d.ts +26 -0
- package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +30 -0
- package/_dist/components/footer/SiteFooter/footer-content.d.ts +2 -0
- package/_dist/components/icons/Icon/Icon.d.ts +732 -0
- package/_dist/components/icons/PaymentIcon/PaymentIcon.d.ts +21 -0
- package/_dist/components/icons/PaymentIcon/svgData.d.ts +8 -0
- package/_dist/components/icons/PlatformIcon/PlatformIcon.d.ts +12 -0
- package/_dist/components/inputs/Checkbox/Checkbox.d.ts +96 -0
- package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +64 -0
- package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +80 -0
- package/_dist/components/inputs/Combobox/Combobox.d.ts +138 -0
- package/_dist/components/inputs/ComboboxMultiselect/ComboboxMultiselect.d.ts +83 -0
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +93 -0
- package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
- package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +104 -0
- package/_dist/components/inputs/Select/Select.d.ts +122 -0
- package/_dist/components/inputs/Switch/Switch.d.ts +74 -0
- package/_dist/components/inputs/TextInput/TextInput.d.ts +139 -0
- package/_dist/components/inputs/Textarea/Textarea.d.ts +110 -0
- package/_dist/components/inputs/input-types.d.ts +1 -0
- package/_dist/components/inputs/input-utilities.d.ts +96 -0
- package/_dist/components/loading-indicators/Skeleton/Skeleton.d.ts +62 -0
- package/_dist/components/loading-indicators/Spinner/Spinner.d.ts +32 -0
- package/_dist/components/navigation/Breadcrumb/Breadcrumb.d.ts +23 -0
- package/_dist/components/navigation/ButtonNav/ButtonNav.d.ts +29 -0
- package/_dist/components/navigation/DashboardNav/DashboardNav.d.ts +35 -0
- package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +25 -0
- package/_dist/components/navigation/DashboardSearch/DashboardSearch.d.ts +70 -0
- package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +39 -0
- package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +28 -0
- package/_dist/components/navigation/NavMenu/NavMenu.d.ts +43 -0
- package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +24 -0
- package/_dist/components/navigation/Navbar/Navbar.d.ts +60 -0
- package/_dist/components/navigation/SideNav/SideNav.d.ts +39 -0
- package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +53 -0
- package/_dist/components/navigation/SideNavGlobal/SideNavGlobal.d.ts +50 -0
- package/_dist/components/navigation/SideNavGlobal/SideNavGlobalItem.d.ts +25 -0
- package/_dist/components/navigation/TabMenu/TabMenu.d.ts +43 -0
- package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +33 -0
- package/_dist/components/navigation/UserMenu/UserMenu.d.ts +69 -0
- package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +89 -0
- package/_dist/components/navigation/navigation-types.d.ts +29 -0
- package/_dist/components/navigation/navigation-utilities.d.ts +90 -0
- package/_dist/components/notifications/Banner/Banner.d.ts +47 -0
- package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +37 -0
- package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +53 -0
- package/_dist/components/notifications/Toaster/Toast.d.ts +46 -0
- package/_dist/components/notifications/Toaster/Toaster.d.ts +29 -0
- package/_dist/components/notifications/Toaster/useToast.d.ts +10 -0
- package/_dist/components/panels/ExpansionPanel/ExpansionPanel.d.ts +32 -0
- package/_dist/components/panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +24 -0
- package/_dist/components/panels/Panel/Panel.d.ts +35 -0
- package/_dist/components/panels/PanelList/PanelList.d.ts +28 -0
- package/_dist/components/panels/PanelList/PanelRow.d.ts +27 -0
- package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +53 -0
- package/_dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +41 -0
- package/_dist/components/steppers/Stepper/Stepper.d.ts +54 -0
- package/_dist/components/steppers/VerticalStepper/VerticalStep.d.ts +52 -0
- package/_dist/components/steppers/VerticalStepper/VerticalStepper.d.ts +28 -0
- package/_dist/components/steppers/VerticalStepper/vertical-stepper-sample-data.d.ts +27 -0
- package/_dist/components/tiles/AvatarTileList/AvatarTileList.d.ts +28 -0
- package/_dist/components/tiles/Tile/Tile.d.ts +42 -0
- package/_dist/components/tiles/TileGrid/TileGrid.d.ts +29 -0
- 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-banner.css +1 -1
- package/_dist/css/component-css/pds-branch-diff.css +1 -0
- package/_dist/css/component-css/pds-breadcrumb.css +1 -0
- package/_dist/css/component-css/pds-button-link.css +1 -1
- package/_dist/css/component-css/pds-button-nav.css +1 -0
- package/_dist/css/component-css/pds-button.css +33 -69
- package/_dist/css/component-css/pds-callout.css +1 -1
- package/_dist/css/component-css/pds-card-heading.css +1 -0
- 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-checkbox-group.css +1 -1
- package/_dist/css/component-css/pds-checkbox.css +1 -1
- package/_dist/css/component-css/pds-clipboard-button.css +0 -0
- package/_dist/css/component-css/pds-close-button.css +1 -0
- package/_dist/css/component-css/pds-code-block-legacy.css +1 -0
- package/_dist/css/component-css/pds-code-block.css +1 -0
- package/_dist/css/component-css/pds-combobox-multiselect.css +2 -0
- package/_dist/css/component-css/pds-combobox.css +1 -0
- package/_dist/css/component-css/pds-compact-empty-state.css +1 -0
- 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-cta-slice.css +1 -1
- package/_dist/css/component-css/pds-dashboard-nav.css +5 -0
- package/_dist/css/component-css/pds-dashboard-search.css +1 -0
- package/_dist/css/component-css/pds-dashboard-stat.css +1 -0
- package/_dist/css/component-css/pds-dropdown-menu.css +2 -0
- package/_dist/css/component-css/pds-empty-state-card.css +1 -0
- package/_dist/css/component-css/pds-expansion-panel-group.css +1 -1
- package/_dist/css/component-css/pds-expansion-panel.css +1 -1
- package/_dist/css/component-css/pds-file-diff.css +1 -0
- package/_dist/css/component-css/pds-file-upload.css +7 -0
- package/_dist/css/component-css/pds-flow-steps.css +1 -0
- package/_dist/css/component-css/pds-footer-heading.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 -0
- package/_dist/css/component-css/pds-icon-button.css +13 -5
- package/_dist/css/component-css/pds-icon-story-only.css +1 -1
- package/_dist/css/component-css/pds-index.css +83 -118
- package/_dist/css/component-css/pds-indicator-badge.css +15 -21
- package/_dist/css/component-css/pds-inline-message.css +1 -0
- package/_dist/css/component-css/pds-input-group.css +1 -1
- package/_dist/css/component-css/pds-input-utilities.css +1 -0
- package/_dist/css/component-css/pds-link-new-window.css +1 -0
- package/_dist/css/component-css/pds-links-card.css +1 -1
- package/_dist/css/component-css/pds-menu-button.css +2 -2
- package/_dist/css/component-css/pds-modal.css +1 -1
- package/_dist/css/component-css/pds-nav-menu.css +5 -1
- package/_dist/css/component-css/pds-navbar.css +1 -5
- package/_dist/css/component-css/pds-new-site-card.css +1 -1
- package/_dist/css/component-css/pds-pagination.css +1 -0
- package/_dist/css/component-css/pds-panel-list.css +1 -0
- 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 -0
- package/_dist/css/component-css/pds-payment-icon.css +1 -0
- package/_dist/css/component-css/pds-picture.css +1 -0
- 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-refresh-checker.css +1 -0
- package/_dist/css/component-css/pds-section-message.css +1 -1
- package/_dist/css/component-css/pds-segmented-button.css +1 -0
- package/_dist/css/component-css/pds-select.css +1 -4
- package/_dist/css/component-css/pds-side-nav-compact.css +1 -0
- package/_dist/css/component-css/pds-side-nav-global.css +5 -0
- package/_dist/css/component-css/pds-side-nav.css +2 -1
- package/_dist/css/component-css/pds-site-card.css +1 -1
- package/_dist/css/component-css/pds-site-dashboard-heading.css +1 -0
- package/_dist/css/component-css/pds-site-footer.css +1 -1
- package/_dist/css/component-css/pds-skeleton.css +1 -0
- package/_dist/css/component-css/pds-skiplink.css +1 -0
- package/_dist/css/component-css/pds-social-links.css +1 -1
- 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-status-badge.css +1 -9
- 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 +1 -0
- package/_dist/css/component-css/pds-tab-menu.css +2 -0
- 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-tally.css +1 -0
- package/_dist/css/component-css/pds-text-input.css +1 -0
- package/_dist/css/component-css/pds-textarea.css +1 -1
- package/_dist/css/component-css/pds-theme-switcher.css +1 -0
- package/_dist/css/component-css/pds-tile.css +1 -1
- package/_dist/css/component-css/pds-tiles-common.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-story-only.css +1 -0
- package/_dist/css/component-css/pds-user-menu.css +1 -0
- package/_dist/css/component-css/pds-utility-button.css +1 -0
- package/_dist/css/component-css/pds-vertical-empty-state.css +1 -0
- package/_dist/css/component-css/pds-vertical-stepper.css +1 -0
- package/_dist/css/component-css/pds-video-embed.css +1 -0
- package/_dist/css/component-css/pds-workspace-selector.css +1 -1
- package/_dist/css/design-tokens/pds-design-tokens-dark-mode.css +219 -0
- package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +328 -0
- package/_dist/css/design-tokens/pds-design-tokens.css +130 -0
- package/_dist/css/pds-components.css +83 -118
- package/_dist/css/pds-core.css +4 -4
- package/_dist/css/pds-layouts.css +9 -1
- package/_dist/index.css +1 -0
- package/_dist/index.d.ts +124 -0
- package/_dist/index.js +12518 -0
- package/_dist/index.js.map +1 -0
- package/_dist/layouts/AppLayout/AppLayout.d.ts +73 -0
- package/_dist/layouts/Container/Container.d.ts +25 -0
- package/_dist/layouts/DashboardGlobal/DashboardGlobal.d.ts +57 -0
- package/_dist/layouts/DashboardInner/DashboardInner.d.ts +29 -0
- package/_dist/layouts/DocsLayout/DocsLayout.d.ts +30 -0
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +72 -0
- package/_dist/layouts/GlobalWrapper/GlobalWrapper.d.ts +19 -0
- package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +36 -0
- package/_dist/layouts/StepperLayout/StepperLayout.d.ts +20 -0
- package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +30 -0
- package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +34 -0
- package/_dist/layouts/layout-types.d.ts +2 -0
- package/_dist/libs/components/sb-docs-toc-layout.d.ts +4 -0
- package/_dist/libs/components/utility-components.d.ts +15 -0
- package/_dist/libs/components/utils.d.ts +7 -0
- package/_dist/libs/types/custom-types.d.ts +107 -0
- package/_dist/mocks/data/navigation-items.d.ts +367 -0
- package/_dist/mocks/data/pagination-items.d.ts +16 -0
- package/_dist/mocks/markup/dashboard-main-content.d.ts +10 -0
- package/_dist/mocks/markup/dashboard-navigation.d.ts +11 -0
- package/_dist/mocks/markup/inputs.d.ts +2 -0
- package/_dist/mocks/markup/modal.d.ts +2 -0
- package/_dist/mocks/markup/panel-row-content.d.ts +16 -0
- package/_dist/utilities/color/color-preview-swatches.d.ts +13 -0
- package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
- package/_dist/utilities/hooks/useClipboard.d.ts +6 -0
- package/_dist/utilities/hooks/useKeyPress.d.ts +1 -0
- package/_dist/utilities/hooks/useWindowWidth.d.ts +1 -0
- package/_dist/vars/animation.d.ts +5 -0
- package/_dist/vars/spacing.d.ts +36 -0
- package/_dist/vars/type-scale.d.ts +28 -0
- package/_dist/vars/z-index.d.ts +16 -0
- package/package.json +83 -44
- package/_dist/cjs/index.js +0 -93
- package/_dist/cjs/index.js.map +0 -1
- package/_dist/css/component-css/pds-animated-button.css +0 -7
- package/_dist/css/component-css/pds-breadcrumbs.css +0 -1
- package/_dist/css/component-css/pds-heading.css +0 -1
- package/_dist/css/component-css/pds-inputs-common.css +0 -1
- package/_dist/css/component-css/pds-pager.css +0 -1
- package/_dist/css/component-css/pds-stats-tile-list.css +0 -1
- package/_dist/css/component-css/pds-toast.css +0 -1
- package/_dist/css/component-css/pds-toggle-button.css +0 -1
- package/_dist/css/component-css/pds-toggle-switch.css +0 -3
- package/_dist/esm/index.js +0 -93
- package/_dist/esm/index.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './payment-icon.css';
|
|
3
|
+
type PaymentType = 'visa' | 'mastercard' | 'amex' | 'discover' | 'generic';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for PaymentIcon
|
|
6
|
+
*/
|
|
7
|
+
export interface PaymentIconProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* The type of payment icon to display.
|
|
10
|
+
*/
|
|
11
|
+
paymentType: PaymentType;
|
|
12
|
+
/**
|
|
13
|
+
* Additional class names
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* PaymentIcon UI component
|
|
19
|
+
*/
|
|
20
|
+
export declare const PaymentIcon: ({ paymentType, className, ...props }: PaymentIconProps) => React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './platform-icon.css';
|
|
3
|
+
type PlatformType = 'drupal' | 'drupal7' | 'front-end-sites' | 'gatsby' | 'gatsby-wp' | 'import-custom' | 'next' | 'next-drupal' | 'next-wp' | 'wordpress';
|
|
4
|
+
interface PlatformIconProps extends ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
platformType: PlatformType;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* PlatformIcon UI component
|
|
10
|
+
*/
|
|
11
|
+
export declare const PlatformIcon: ({ platformType, className, ...props }: PlatformIconProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ChangeEvent, FocusEvent, ReactNode } from 'react';
|
|
2
|
+
import { ValidationStatus } from '../input-types';
|
|
3
|
+
import './checkbox.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for Checkbox
|
|
6
|
+
*/
|
|
7
|
+
export interface CheckboxProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Checked state of the input. Used to set the checked status of the input field when controlled. Cannot be used in conjunction with the `defaultChecked` prop.
|
|
10
|
+
*/
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Default checked state. Setting this prop automatically makes the input uncontrolled. Cannot be used with the checked prop.
|
|
14
|
+
*/
|
|
15
|
+
defaultChecked?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Is the field disabled?
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the checkbox.
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Indeterminate state
|
|
26
|
+
*/
|
|
27
|
+
indeterminate?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Additional props for the `<input>` element.
|
|
30
|
+
*/
|
|
31
|
+
inputProps?: ComponentPropsWithoutRef<'input'>;
|
|
32
|
+
/**
|
|
33
|
+
* Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
34
|
+
*/
|
|
35
|
+
inputWidth?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Input label.
|
|
38
|
+
*/
|
|
39
|
+
label: string | ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Input message. Used to provide supplemental text. Will be displayed below the input field.
|
|
42
|
+
*/
|
|
43
|
+
message?: string | ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Name attribute of the checkbox.
|
|
46
|
+
*/
|
|
47
|
+
name?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Indent level of the checkbox. Visual styles for creating nested checkboxes. Styles are only applied when the checkbox is an ancestor of a div with the class `pds-checkbox-group`.
|
|
50
|
+
*/
|
|
51
|
+
nestingLevel?: 0 | 1 | 2;
|
|
52
|
+
/**
|
|
53
|
+
* onBlur event handler
|
|
54
|
+
*/
|
|
55
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
56
|
+
/**
|
|
57
|
+
* onChange event handler
|
|
58
|
+
*/
|
|
59
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
60
|
+
/**
|
|
61
|
+
* onFocus event handler
|
|
62
|
+
*/
|
|
63
|
+
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Is the field required?
|
|
66
|
+
*/
|
|
67
|
+
required?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
70
|
+
*/
|
|
71
|
+
showLabel?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Size of the label and checkbox. Defaults to 'M'.
|
|
74
|
+
*/
|
|
75
|
+
size?: 'S' | 'M';
|
|
76
|
+
/**
|
|
77
|
+
* Validation message for the input field based on the validation status.
|
|
78
|
+
*/
|
|
79
|
+
validationMessage?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Validation status of the input field.
|
|
82
|
+
*/
|
|
83
|
+
validationStatus?: ValidationStatus;
|
|
84
|
+
/**
|
|
85
|
+
* Value attribute of the checkbox.
|
|
86
|
+
*/
|
|
87
|
+
value?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Additional class names
|
|
90
|
+
*/
|
|
91
|
+
className?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Checkbox UI component
|
|
95
|
+
*/
|
|
96
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { ValidationStatus } from '../input-types';
|
|
3
|
+
import '../CheckboxGroup/checkbox-group.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for CheckboxFieldset
|
|
6
|
+
*/
|
|
7
|
+
export interface CheckboxGroupWrapperProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Individual checkboxes to be rendered within the group.
|
|
10
|
+
*/
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Is the field disabled?
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Additional props for the `<fieldset>` element.
|
|
18
|
+
*/
|
|
19
|
+
fieldsetProps?: ComponentPropsWithoutRef<'fieldset'>;
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the checkbox group.
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Width of the field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
26
|
+
*/
|
|
27
|
+
inputWidth?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Field label. Will be rendered as the fieldset legend.
|
|
30
|
+
*/
|
|
31
|
+
label: string;
|
|
32
|
+
/**
|
|
33
|
+
* Input message. Used to provide supplemental text. Will be displayed below the field.
|
|
34
|
+
*/
|
|
35
|
+
message?: string | ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Is the field required?
|
|
38
|
+
*/
|
|
39
|
+
required?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Should the label (legend) be visible? If false, it will render for screen readers only.
|
|
42
|
+
*/
|
|
43
|
+
showLabel?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optional tooltip text to display additional information.
|
|
46
|
+
*/
|
|
47
|
+
tooltipText?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Validation message for the input field based on the validation status.
|
|
50
|
+
*/
|
|
51
|
+
validationMessage?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Validation status of the input field.
|
|
54
|
+
*/
|
|
55
|
+
validationStatus?: ValidationStatus;
|
|
56
|
+
/**
|
|
57
|
+
* Additional class names
|
|
58
|
+
*/
|
|
59
|
+
className?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* CheckboxFieldset UI component
|
|
63
|
+
*/
|
|
64
|
+
export declare const CheckboxFieldset: ({ children, disabled, fieldsetProps, id, inputWidth, label, message, required, showLabel, tooltipText, validationMessage, validationStatus, className, ...props }: CheckboxGroupWrapperProps) => React.JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { ValidationStatus } from '../input-types';
|
|
3
|
+
import './checkbox-group.css';
|
|
4
|
+
export type CheckboxOption = {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
id?: string;
|
|
8
|
+
label: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for CheckboxGroup
|
|
14
|
+
*/
|
|
15
|
+
export interface CheckboxGroupProps extends ComponentPropsWithoutRef<'div'> {
|
|
16
|
+
/**
|
|
17
|
+
* Is the field disabled?
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Additional props for the `<fieldset>` element.
|
|
22
|
+
*/
|
|
23
|
+
fieldsetProps?: ComponentPropsWithoutRef<'fieldset'>;
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the checkbox group.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Width of the field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
30
|
+
*/
|
|
31
|
+
inputWidth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Field label. Will be rendered as the fieldset legend.
|
|
34
|
+
*/
|
|
35
|
+
label: string;
|
|
36
|
+
/**
|
|
37
|
+
* Input message. Used to provide supplemental text. Will be displayed below the field.
|
|
38
|
+
*/
|
|
39
|
+
message?: string | ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* onGroupBlur function. Called when all checkboxes have lost focus. Provides an array of checked values.
|
|
42
|
+
*/
|
|
43
|
+
onGroupBlur?: (checkedOptions: string[]) => void;
|
|
44
|
+
/**
|
|
45
|
+
* onValueChange function. Called when the value of any checkbox changes. Provides an array of checked values.
|
|
46
|
+
*/
|
|
47
|
+
onValueChange?: (updatedOptions: string[]) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Array of checkbox options for group.
|
|
50
|
+
*/
|
|
51
|
+
options: CheckboxOption[];
|
|
52
|
+
/**
|
|
53
|
+
* Is the field required?
|
|
54
|
+
*/
|
|
55
|
+
required?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Should the label (legend) be visible? If false, it will render for screen readers only.
|
|
58
|
+
*/
|
|
59
|
+
showLabel?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Optional tooltip text to display additional information.
|
|
62
|
+
*/
|
|
63
|
+
tooltipText?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* Validation message for the input field based on the validation status.
|
|
66
|
+
*/
|
|
67
|
+
validationMessage?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Validation status of the input field.
|
|
70
|
+
*/
|
|
71
|
+
validationStatus?: ValidationStatus;
|
|
72
|
+
/**
|
|
73
|
+
* Additional class names
|
|
74
|
+
*/
|
|
75
|
+
className?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* CheckboxGroup UI component
|
|
79
|
+
*/
|
|
80
|
+
export declare const CheckboxGroup: ({ disabled, fieldsetProps, id, inputWidth, label, message, onGroupBlur, onValueChange, options, required, showLabel, tooltipText, validationMessage, validationStatus, className, ...props }: CheckboxGroupProps) => React.JSX.Element;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import React, { ChangeEvent, ComponentPropsWithoutRef, FocusEvent, ReactNode } from 'react';
|
|
2
|
+
import { ValidationStatus } from '../input-types';
|
|
3
|
+
import './combobox.css';
|
|
4
|
+
type LabelStrings = {
|
|
5
|
+
clearButton?: string;
|
|
6
|
+
inputInstructions?: string;
|
|
7
|
+
searchShortcut?: string;
|
|
8
|
+
triggerButton?: string;
|
|
9
|
+
};
|
|
10
|
+
export type ComboboxOption = {
|
|
11
|
+
label: string;
|
|
12
|
+
optionDisplay?: ReactNode;
|
|
13
|
+
searchIndex?: string[];
|
|
14
|
+
value: string;
|
|
15
|
+
[otherOptions: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Prop types for Combobox
|
|
19
|
+
*/
|
|
20
|
+
export interface ComboboxProps extends ComponentPropsWithoutRef<'div'> {
|
|
21
|
+
/**
|
|
22
|
+
* Optional default value for the field.
|
|
23
|
+
*/
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Is the field disabled?
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Should the combobox have a clear button?
|
|
31
|
+
*/
|
|
32
|
+
hasClearButton?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Should the combobox have a dropdown trigger?
|
|
35
|
+
*/
|
|
36
|
+
hasDropdownTrigger?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Should the combobox have a search icon?
|
|
39
|
+
*/
|
|
40
|
+
hasSearchIcon?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Should the combobox have a search shortcut?
|
|
43
|
+
*/
|
|
44
|
+
hasSearchShortcut?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* ID of the combobox
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
51
|
+
*/
|
|
52
|
+
inputWidth?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Are the options in the process of being loaded?
|
|
55
|
+
*/
|
|
56
|
+
isLoading?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Text to display when options are still loading.
|
|
59
|
+
*/
|
|
60
|
+
loadingText?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Field label.
|
|
63
|
+
*/
|
|
64
|
+
label: string;
|
|
65
|
+
/**
|
|
66
|
+
* Translation strings for various labels or other visually-hidden text.
|
|
67
|
+
*/
|
|
68
|
+
labelStrings?: LabelStrings;
|
|
69
|
+
/**
|
|
70
|
+
* Message or description used to help clarify the usage of the input.
|
|
71
|
+
*/
|
|
72
|
+
message?: string | ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Text to display when there are no results.
|
|
75
|
+
*/
|
|
76
|
+
noResultsText?: string;
|
|
77
|
+
/**
|
|
78
|
+
* onChange event handler.
|
|
79
|
+
*/
|
|
80
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
81
|
+
/**
|
|
82
|
+
* onBlur event handler.
|
|
83
|
+
*/
|
|
84
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Callback when the input is cleared.
|
|
87
|
+
*/
|
|
88
|
+
onClear?: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* onFocus event handler.
|
|
91
|
+
*/
|
|
92
|
+
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
93
|
+
/**
|
|
94
|
+
* Callback when an option is selected. Returns the selected option object.
|
|
95
|
+
*/
|
|
96
|
+
onOptionSelect?: (option: ComboboxOption) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Array of options to display in the dropdown.
|
|
99
|
+
*/
|
|
100
|
+
options?: ComboboxOption[];
|
|
101
|
+
/**
|
|
102
|
+
* Optional placeholder text to display when the input field is empty.
|
|
103
|
+
*/
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Is this field required?
|
|
107
|
+
*/
|
|
108
|
+
required?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
111
|
+
*/
|
|
112
|
+
showLabel?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Optional tooltip text to display additional information.
|
|
115
|
+
*/
|
|
116
|
+
tooltipText?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Value attribute of input
|
|
119
|
+
*/
|
|
120
|
+
value?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Validation message for the input field based on the validation status.
|
|
123
|
+
*/
|
|
124
|
+
validationMessage?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Validation status of the input field.
|
|
127
|
+
*/
|
|
128
|
+
validationStatus?: ValidationStatus;
|
|
129
|
+
/**
|
|
130
|
+
* Additional class names
|
|
131
|
+
*/
|
|
132
|
+
className?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Combobox UI component
|
|
136
|
+
*/
|
|
137
|
+
export declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLSpanElement>>;
|
|
138
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './combobox-multiselect.css';
|
|
3
|
+
type LabelStrings = {
|
|
4
|
+
inputInstructions?: string;
|
|
5
|
+
triggerButton?: string;
|
|
6
|
+
};
|
|
7
|
+
interface OptionProps {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
isAlreadySelected?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type DivProps = Omit<ComponentPropsWithoutRef<'div'>, 'onChange'>;
|
|
13
|
+
/**
|
|
14
|
+
* Prop types for ComboboxMultiselect
|
|
15
|
+
*/
|
|
16
|
+
export interface ComboboxMultiselectProps extends DivProps {
|
|
17
|
+
/**
|
|
18
|
+
* Is the field disabled?
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the combobox multiselect
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Initially selected options
|
|
27
|
+
*/
|
|
28
|
+
initialSelectedItems?: OptionProps[];
|
|
29
|
+
/**
|
|
30
|
+
* Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
31
|
+
*/
|
|
32
|
+
inputWidth?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Are the options in the process of being loaded?
|
|
35
|
+
*/
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Text to display when options are still loading.
|
|
39
|
+
*/
|
|
40
|
+
loadingText?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Label for the combobox multiselect
|
|
43
|
+
*/
|
|
44
|
+
label?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Translation strings for various labels or other visually-hidden text.
|
|
47
|
+
*/
|
|
48
|
+
labelStrings?: LabelStrings;
|
|
49
|
+
/**
|
|
50
|
+
* Text to display when there are no results.
|
|
51
|
+
*/
|
|
52
|
+
noResultsText?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Callback function to run when the selected items change
|
|
55
|
+
*/
|
|
56
|
+
onChange?: (selectedItems: OptionProps[]) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Array of all available options to select from
|
|
59
|
+
*/
|
|
60
|
+
options?: OptionProps[];
|
|
61
|
+
/**
|
|
62
|
+
* Placeholder text for the input
|
|
63
|
+
*/
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Is this field required?
|
|
67
|
+
*/
|
|
68
|
+
required?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
71
|
+
*/
|
|
72
|
+
showLabel?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Additional class names
|
|
75
|
+
*/
|
|
76
|
+
className?: string;
|
|
77
|
+
}
|
|
78
|
+
export declare const getFilteredOptions: (options: OptionProps[], selectedItems: OptionProps[], inputValue: string) => OptionProps[];
|
|
79
|
+
/**
|
|
80
|
+
* ComboboxMultiselect UI component
|
|
81
|
+
*/
|
|
82
|
+
export declare const ComboboxMultiselect: ({ disabled, id, initialSelectedItems, inputWidth, isLoading, label, labelStrings, loadingText, noResultsText, onChange, options, placeholder, required, showLabel, className, ...props }: ComboboxMultiselectProps) => React.JSX.Element;
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { ValidationStatus } from '../input-types';
|
|
3
|
+
import './file-upload.css';
|
|
4
|
+
type LabelStrings = {
|
|
5
|
+
chooseFile: string;
|
|
6
|
+
clearButton: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Prop types for FileUpload
|
|
10
|
+
*/
|
|
11
|
+
export interface FileUploadProps extends ComponentPropsWithoutRef<'div'> {
|
|
12
|
+
/**
|
|
13
|
+
* File types the input should accept. Leave null for all file types.
|
|
14
|
+
*/
|
|
15
|
+
accept?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Default value for the input field as a string that represents the path to a file.
|
|
18
|
+
*/
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Is the field disabled?
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Label to be rendered above the input field. Describes the fields purpose. Optional.
|
|
26
|
+
*/
|
|
27
|
+
fieldLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Input ID.
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional props for the `<input>` element.
|
|
34
|
+
*/
|
|
35
|
+
inputProps?: ComponentPropsWithoutRef<'input'>;
|
|
36
|
+
/**
|
|
37
|
+
* Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
38
|
+
*/
|
|
39
|
+
inputWidth?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Translation strings for various labels or other visually-hidden text.
|
|
42
|
+
*/
|
|
43
|
+
labelStrings?: LabelStrings;
|
|
44
|
+
/**
|
|
45
|
+
* Message or description used to help clarify the usage of the input.
|
|
46
|
+
*/
|
|
47
|
+
message?: string | ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Should the input accept multiple files?
|
|
50
|
+
*/
|
|
51
|
+
multiple?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Callback function that will run when the clear button is clicked.
|
|
54
|
+
*/
|
|
55
|
+
onClear?: () => void;
|
|
56
|
+
/**
|
|
57
|
+
* Callback function that will run when the file input changes.
|
|
58
|
+
*/
|
|
59
|
+
onFileChange?: (files: FileList) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Is the field required?
|
|
62
|
+
*/
|
|
63
|
+
required?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Should the full path of the file be displayed for the default value?
|
|
66
|
+
*/
|
|
67
|
+
showFullPath?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
70
|
+
*/
|
|
71
|
+
showLabel?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Optional tooltip text to display additional information.
|
|
74
|
+
*/
|
|
75
|
+
tooltipText?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Validation message for the input field based on the validation status.
|
|
78
|
+
*/
|
|
79
|
+
validationMessage?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Validation status of the input field.
|
|
82
|
+
*/
|
|
83
|
+
validationStatus?: ValidationStatus;
|
|
84
|
+
/**
|
|
85
|
+
* Additional class names
|
|
86
|
+
*/
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* FileUpload UI component
|
|
91
|
+
*/
|
|
92
|
+
export declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './input-group.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for InputGroup
|
|
5
|
+
*/
|
|
6
|
+
export interface InputGroupProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* Input and button elements
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Additional class names
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* InputGroup UI component
|
|
18
|
+
*/
|
|
19
|
+
export declare const InputGroup: ({ children, className, ...props }: InputGroupProps) => React.JSX.Element;
|