@pantheon-systems/pds-toolkit-react 1.0.0-dev.16 → 1.0.0-dev.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -1
- package/_dist/components/Avatar/Avatar.d.ts +29 -0
- package/_dist/components/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/_dist/components/Breadcrumbs/BreadcrumbsContent.d.ts +12 -0
- package/_dist/components/Breadcrumbs/BreadcrumbsContext.d.ts +17 -0
- package/_dist/components/Breadcrumbs/ListItem.d.ts +14 -0
- package/_dist/components/Breadcrumbs/MobileCrumbs.d.ts +2 -0
- package/_dist/components/CTALink/CTALink.d.ts +20 -0
- package/_dist/components/CTASlice/CTASlice.d.ts +34 -0
- package/_dist/components/Callout/Callout.d.ts +24 -0
- package/_dist/components/Callout/sample-callout-content.d.ts +2 -0
- package/_dist/components/ComparisonList/ComparisonList.d.ts +42 -0
- package/_dist/components/Heading/Heading.d.ts +15 -0
- package/_dist/components/Icon/Icon.d.ts +624 -0
- package/_dist/components/Icon/iconList.d.ts +1 -0
- package/_dist/components/Modal/Modal.d.ts +40 -0
- package/_dist/components/Pager/AdvancedPagination.d.ts +4 -0
- package/_dist/components/Pager/BasicPagination.d.ts +4 -0
- package/_dist/components/Pager/MiniPagination.d.ts +4 -0
- package/_dist/components/Pager/NavigationButton.d.ts +13 -0
- package/_dist/components/Pager/Pager.d.ts +24 -0
- package/_dist/components/Pager/PagerContext.d.ts +23 -0
- package/_dist/components/Pager/PagerItem.d.ts +14 -0
- package/_dist/components/Pager/usePaginationUI.d.ts +1 -0
- package/_dist/components/Panel/Panel.d.ts +30 -0
- package/_dist/components/PantheonLogo/PantheonLogo.d.ts +25 -0
- package/_dist/components/PlatformIcon/PlatformIcon.d.ts +13 -0
- package/_dist/components/Popover/Popover.d.ts +57 -0
- package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
- package/_dist/components/Skiplink/Skiplink.d.ts +21 -0
- package/_dist/components/SocialLinks/SocialLinks.d.ts +13 -0
- package/_dist/components/StatusIndicator/StatusIndicator.d.ts +20 -0
- package/_dist/components/Stepper/Stepper.d.ts +46 -0
- package/_dist/components/Table/Table.d.ts +15 -0
- package/_dist/components/TableOfContents/TableOfContents.d.ts +25 -0
- package/_dist/components/Tabs/Tabs.d.ts +60 -0
- package/_dist/components/Tag/Tag.d.ts +39 -0
- package/_dist/components/Tooltip/Tooltip.d.ts +43 -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 +35 -0
- package/_dist/components/buttons/Button/Button.d.ts +5 -0
- package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +24 -0
- package/_dist/components/buttons/IconButton/IconButton.d.ts +50 -0
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +63 -0
- package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +54 -0
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +36 -0
- package/_dist/components/buttons/ToggleButton/ToggleButton.d.ts +35 -0
- package/_dist/components/cards/Card/Card.d.ts +30 -0
- package/_dist/components/cards/CardSelectGroup/CardSelectGroup.d.ts +38 -0
- package/_dist/components/cards/LinksCard/LinksCard.d.ts +17 -0
- package/_dist/components/cards/NewSiteCard/NewSiteCard.d.ts +25 -0
- package/_dist/components/cards/PricingCard/PricingCard.d.ts +64 -0
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +25 -0
- package/_dist/components/expansion-panels/ExpansionPanel/ExpansionPanel.d.ts +19 -0
- package/_dist/components/expansion-panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +15 -0
- package/_dist/components/footer/FooterHeading/FooterHeading.d.ts +15 -0
- package/_dist/components/footer/FooterLinks/FooterLinks.d.ts +17 -0
- package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +18 -0
- package/_dist/components/inputs/Checkbox/Checkbox.d.ts +92 -0
- package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +60 -0
- package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +76 -0
- package/_dist/components/inputs/Combobox/Combobox.d.ts +5 -0
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +37 -0
- package/_dist/components/inputs/InputFormatted/InputFormatted.d.ts +35 -0
- package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
- package/_dist/components/inputs/InputObscured/InputObscured.d.ts +33 -0
- package/_dist/components/inputs/InputText/InputText.d.ts +75 -0
- package/_dist/components/inputs/InputWrapper/InputWrapper.d.ts +5 -0
- package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +46 -0
- package/_dist/components/inputs/Select/Select.d.ts +45 -0
- package/_dist/components/inputs/Switch/Switch.d.ts +74 -0
- package/_dist/components/inputs/TextInput/TextInput.d.ts +127 -0
- package/_dist/components/inputs/Textarea/Textarea.d.ts +39 -0
- package/_dist/components/inputs/ToggleSwitch/ToggleSwitch.d.ts +33 -0
- package/_dist/components/inputs/input-types.d.ts +1 -0
- package/_dist/components/inputs/input-utilities.d.ts +55 -0
- package/_dist/components/inputs/inputs-common.d.ts +40 -0
- package/_dist/components/navigation/DashboardNav/DashboardNav.d.ts +42 -0
- package/_dist/components/navigation/DashboardNav/dashboard-nav-sample-content.d.ts +3 -0
- package/_dist/components/navigation/DashboardSearch/DashboardSearch.d.ts +69 -0
- package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +10 -0
- package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +28 -0
- package/_dist/components/navigation/NavMenu/NavMenu.d.ts +19 -0
- package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +14 -0
- package/_dist/components/navigation/Navbar/Navbar.d.ts +35 -0
- package/_dist/components/navigation/SideNav/SideNav.d.ts +47 -0
- package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +47 -0
- package/_dist/components/navigation/UserMenu/UserMenu.d.ts +69 -0
- package/_dist/components/navigation/UserMenu/user-menu-sample-content.d.ts +2 -0
- package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +58 -0
- package/_dist/components/navigation/navigation-types.d.ts +39 -0
- package/_dist/components/navigation/navigation-utilities.d.ts +7 -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 +47 -0
- package/_dist/components/notifications/Toaster/Toast.d.ts +30 -0
- package/_dist/components/notifications/Toaster/Toaster.d.ts +16 -0
- package/_dist/components/notifications/Toaster/useToast.d.ts +2 -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/progress-indicators/Spinner/Spinner.d.ts +33 -0
- package/_dist/components/tiles/AvatarTileList/AvatarTileList.d.ts +22 -0
- package/_dist/components/tiles/StatsTileList/StatsTileList.d.ts +26 -0
- package/_dist/components/tiles/Tile/Tile.d.ts +23 -0
- package/_dist/components/tiles/TileGrid/TileGrid.d.ts +38 -0
- package/_dist/css/component-css/pds-avatar-tile-list.css +1 -0
- package/_dist/css/component-css/pds-avatar.css +1 -0
- package/_dist/css/component-css/pds-banner.css +1 -0
- package/_dist/css/component-css/pds-breadcrumbs.css +1 -0
- package/_dist/css/component-css/pds-button-link.css +1 -0
- package/_dist/css/component-css/pds-button.css +81 -0
- package/_dist/css/component-css/pds-callout.css +1 -0
- package/_dist/css/component-css/pds-card-select-group.css +1 -0
- package/_dist/css/component-css/pds-card.css +1 -0
- package/_dist/css/component-css/pds-checkbox-group.css +1 -0
- package/_dist/css/component-css/pds-checkbox.css +1 -0
- package/_dist/css/component-css/pds-combobox.css +1 -0
- package/_dist/css/component-css/pds-comparison-list.css +1 -0
- package/_dist/css/component-css/pds-cta-link.css +1 -0
- package/_dist/css/component-css/pds-cta-slice.css +1 -0
- 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-dropdown-menu.css +2 -0
- package/_dist/css/component-css/pds-expansion-panel-group.css +1 -0
- package/_dist/css/component-css/pds-expansion-panel.css +1 -0
- package/_dist/css/component-css/pds-file-upload.css +5 -0
- package/_dist/css/component-css/pds-footer-heading.css +1 -0
- package/_dist/css/component-css/pds-footer-links.css +1 -0
- package/_dist/css/component-css/pds-heading.css +1 -0
- package/_dist/css/component-css/pds-icon-button.css +17 -0
- package/_dist/css/component-css/pds-icon-story-only.css +1 -0
- package/_dist/css/component-css/pds-index.css +157 -0
- package/_dist/css/component-css/pds-indicator-badge.css +37 -0
- package/_dist/css/component-css/pds-inline-message.css +1 -0
- package/_dist/css/component-css/pds-input-group.css +1 -0
- package/_dist/css/component-css/pds-input-text.css +1 -0
- package/_dist/css/component-css/pds-input-utilities.css +1 -0
- package/_dist/css/component-css/pds-input-wrapper.css +1 -0
- package/_dist/css/component-css/pds-inputs-common-deprecated.css +1 -0
- package/_dist/css/component-css/pds-inputs-common.css +1 -0
- package/_dist/css/component-css/pds-links-card.css +1 -0
- package/_dist/css/component-css/pds-menu-button.css +1 -0
- package/_dist/css/component-css/pds-modal.css +1 -0
- package/_dist/css/component-css/pds-nav-menu.css +1 -0
- package/_dist/css/component-css/pds-navbar.css +3 -0
- package/_dist/css/component-css/pds-new-site-card.css +1 -0
- package/_dist/css/component-css/pds-pager.css +1 -0
- package/_dist/css/component-css/pds-panel.css +1 -0
- package/_dist/css/component-css/pds-pantheon-logo.css +1 -0
- package/_dist/css/component-css/pds-platform-icon.css +1 -0
- package/_dist/css/component-css/pds-popover.css +1 -0
- package/_dist/css/component-css/pds-pricing-card-local.css +1 -0
- package/_dist/css/component-css/pds-pricing-card.css +1 -0
- package/_dist/css/component-css/pds-progress-bar.css +1 -0
- package/_dist/css/component-css/pds-progress-ring.css +1 -0
- package/_dist/css/component-css/pds-pull-quote.css +1 -0
- package/_dist/css/component-css/pds-radio-group.css +1 -0
- package/_dist/css/component-css/pds-section-message.css +1 -0
- package/_dist/css/component-css/pds-segmented-button.css +1 -0
- package/_dist/css/component-css/pds-select.css +1 -0
- package/_dist/css/component-css/pds-side-nav-compact.css +1 -0
- package/_dist/css/component-css/pds-side-nav.css +1 -0
- package/_dist/css/component-css/pds-site-card.css +1 -0
- package/_dist/css/component-css/pds-site-footer.css +1 -0
- package/_dist/css/component-css/pds-skiplink.css +1 -0
- package/_dist/css/component-css/pds-social-links.css +1 -0
- package/_dist/css/component-css/pds-spinner.css +1 -0
- package/_dist/css/component-css/pds-split-button.css +2 -0
- package/_dist/css/component-css/pds-stats-tile-list.css +1 -0
- package/_dist/css/component-css/pds-status-badge.css +9 -0
- package/_dist/css/component-css/pds-status-indicator.css +1 -0
- package/_dist/css/component-css/pds-stepper.css +1 -0
- package/_dist/css/component-css/pds-switch.css +3 -0
- package/_dist/css/component-css/pds-table-of-contents.css +1 -0
- package/_dist/css/component-css/pds-table.css +1 -0
- package/_dist/css/component-css/pds-tabs.css +1 -0
- package/_dist/css/component-css/pds-tag.css +1 -0
- 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 -0
- package/_dist/css/component-css/pds-tile.css +1 -0
- package/_dist/css/component-css/pds-tiles-common.css +1 -0
- package/_dist/css/component-css/pds-toaster.css +1 -0
- package/_dist/css/component-css/pds-toggle-button.css +1 -0
- package/_dist/css/component-css/pds-toggle-switch.css +3 -0
- package/_dist/css/component-css/pds-tooltip.css +1 -0
- 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-workspace-selector.css +1 -0
- package/_dist/css/design-tokens/pds-design-tokens-dark-mode.css +272 -0
- package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +333 -0
- package/_dist/css/design-tokens/pds-design-tokens.css +105 -0
- package/_dist/css/pds-components.css +120 -70
- package/_dist/css/pds-core.css +6 -2
- package/_dist/css/pds-layouts.css +2 -1
- package/_dist/index.css +1 -0
- package/_dist/index.d.ts +92 -0
- package/_dist/index.js +11374 -0
- package/_dist/index.js.map +1 -0
- package/_dist/layouts/Container/Container.d.ts +16 -0
- package/_dist/layouts/DashboardLayout/DashboardLayout.d.ts +44 -0
- package/_dist/layouts/DashboardLayout/DemoContent.d.ts +2 -0
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +27 -0
- package/_dist/layouts/GlobalWrapper/GlobalWrapper.d.ts +19 -0
- package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +21 -0
- package/_dist/layouts/StepperLayout/StepperLayout.d.ts +13 -0
- package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +15 -0
- package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +17 -0
- package/_dist/libs/components/custom-types.d.ts +5 -0
- package/_dist/libs/components/customPropTypes.d.ts +85 -0
- package/_dist/libs/components/utils.d.ts +3 -0
- package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
- package/_dist/vars/spacing.d.ts +17 -0
- package/_dist/vars/z-index.d.ts +5 -0
- package/package.json +85 -43
- package/_dist/cjs/index.js +0 -98
- package/_dist/cjs/index.js.map +0 -1
- package/_dist/esm/index.js +0 -98
- package/_dist/esm/index.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ChangeEvent, FocusEvent } 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;
|
|
40
|
+
/**
|
|
41
|
+
* Input message. Used to provide supplemental text. Will be displayed below the input field.
|
|
42
|
+
*/
|
|
43
|
+
message?: string;
|
|
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
|
+
* Validation message for the input field based on the validation status.
|
|
74
|
+
*/
|
|
75
|
+
validationMessage?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Validation status of the input field.
|
|
78
|
+
*/
|
|
79
|
+
validationStatus?: ValidationStatus;
|
|
80
|
+
/**
|
|
81
|
+
* Value attribute of the checkbox.
|
|
82
|
+
*/
|
|
83
|
+
value?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Additional class names
|
|
86
|
+
*/
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Checkbox UI component
|
|
91
|
+
*/
|
|
92
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } 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;
|
|
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
|
+
* Validation message for the input field based on the validation status.
|
|
46
|
+
*/
|
|
47
|
+
validationMessage?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Validation status of the input field.
|
|
50
|
+
*/
|
|
51
|
+
validationStatus?: ValidationStatus;
|
|
52
|
+
/**
|
|
53
|
+
* Additional class names
|
|
54
|
+
*/
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* CheckboxFieldset UI component
|
|
59
|
+
*/
|
|
60
|
+
export declare const CheckboxFieldset: ({ children, disabled, fieldsetProps, id, inputWidth, label, message, required, showLabel, validationMessage, validationStatus, className, ...props }: CheckboxGroupWrapperProps) => React.JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } 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;
|
|
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
|
+
* Validation message for the input field based on the validation status.
|
|
62
|
+
*/
|
|
63
|
+
validationMessage?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Validation status of the input field.
|
|
66
|
+
*/
|
|
67
|
+
validationStatus?: ValidationStatus;
|
|
68
|
+
/**
|
|
69
|
+
* Additional class names
|
|
70
|
+
*/
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* CheckboxGroup UI component
|
|
75
|
+
*/
|
|
76
|
+
export declare const CheckboxGroup: ({ disabled, fieldsetProps, id, inputWidth, label, message, onGroupBlur, onValueChange, options, required, showLabel, validationMessage, validationStatus, className, ...props }: CheckboxGroupProps) => React.JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export function FileUpload({ accept, chooseFileLabel, clearButtonLabel, disabled, fieldLabel, id, inputWidth, message, multiple, onFileChange, required, showLabel, validationFunction, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
accept: any;
|
|
4
|
+
chooseFileLabel?: string;
|
|
5
|
+
clearButtonLabel?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
fieldLabel: any;
|
|
8
|
+
id: any;
|
|
9
|
+
inputWidth: any;
|
|
10
|
+
message: any;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
onFileChange: any;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
showLabel?: boolean;
|
|
15
|
+
validationFunction: any;
|
|
16
|
+
className: any;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
export namespace FileUpload {
|
|
19
|
+
namespace propTypes {
|
|
20
|
+
let accept: PropTypes.Requireable<string>;
|
|
21
|
+
let chooseFileLabel: PropTypes.Requireable<string>;
|
|
22
|
+
let clearButtonLabel: PropTypes.Requireable<string>;
|
|
23
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
24
|
+
let fieldLabel: PropTypes.Requireable<string>;
|
|
25
|
+
let id: PropTypes.Validator<string>;
|
|
26
|
+
let inputWidth: PropTypes.Requireable<number>;
|
|
27
|
+
let message: PropTypes.Requireable<string>;
|
|
28
|
+
let multiple: PropTypes.Requireable<boolean>;
|
|
29
|
+
let onFileChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
let required: PropTypes.Requireable<boolean>;
|
|
31
|
+
let showLabel: PropTypes.Requireable<boolean>;
|
|
32
|
+
let validationFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
|
+
let className: PropTypes.Requireable<string>;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
import React from 'react';
|
|
37
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function InputFormatted({ disabled, formatting, hasClearButton, id, initialValue, label, message, onChange, placeholder, required, showLabel, validationFunction, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
formatting: any;
|
|
5
|
+
hasClearButton?: boolean;
|
|
6
|
+
id: any;
|
|
7
|
+
initialValue?: string;
|
|
8
|
+
label: any;
|
|
9
|
+
message: any;
|
|
10
|
+
onChange: any;
|
|
11
|
+
placeholder: any;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
showLabel?: boolean;
|
|
14
|
+
validationFunction: any;
|
|
15
|
+
className: any;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
export namespace InputFormatted {
|
|
18
|
+
namespace propTypes {
|
|
19
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
20
|
+
let formatting: PropTypes.Validator<string>;
|
|
21
|
+
let id: PropTypes.Validator<string>;
|
|
22
|
+
let hasClearButton: PropTypes.Requireable<boolean>;
|
|
23
|
+
let initialValue: PropTypes.Requireable<string>;
|
|
24
|
+
let label: PropTypes.Validator<string>;
|
|
25
|
+
let message: PropTypes.Requireable<string>;
|
|
26
|
+
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
let placeholder: PropTypes.Requireable<string>;
|
|
28
|
+
let required: PropTypes.Requireable<boolean>;
|
|
29
|
+
let showLabel: PropTypes.Requireable<boolean>;
|
|
30
|
+
let validationFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
let className: PropTypes.Requireable<string>;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
import React from 'react';
|
|
35
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } 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: React.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;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function InputObscured({ counterFunction, disabled, hasClearButton, id, initialValue, label, message, onChange, required, showLabel, validationFunction, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
counterFunction?: () => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
hasClearButton?: boolean;
|
|
6
|
+
id: any;
|
|
7
|
+
initialValue?: string;
|
|
8
|
+
label: any;
|
|
9
|
+
message: any;
|
|
10
|
+
onChange: any;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
showLabel?: boolean;
|
|
13
|
+
validationFunction: any;
|
|
14
|
+
className: any;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export namespace InputObscured {
|
|
17
|
+
namespace propTypes {
|
|
18
|
+
let counterFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
20
|
+
let hasClearButton: PropTypes.Requireable<boolean>;
|
|
21
|
+
let id: PropTypes.Validator<string>;
|
|
22
|
+
let initialValue: PropTypes.Requireable<string>;
|
|
23
|
+
let label: PropTypes.Validator<string>;
|
|
24
|
+
let message: PropTypes.Requireable<string>;
|
|
25
|
+
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
+
let required: PropTypes.Requireable<boolean>;
|
|
27
|
+
let showLabel: PropTypes.Requireable<boolean>;
|
|
28
|
+
let validationFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
let className: PropTypes.Requireable<string>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
import React from 'react';
|
|
33
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export function InputText({ autoComplete, counterFunction, disabled, hasClearButton, hasSearchShortcut, id, initialValue, inputWidth, label, labelStrings, message, onChange, onFocus, placeholder, readonly, required, showLabel, specialFormatting, specialFormattingValidation, toggleVisibility, type, validationFunction, validationMessages, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
autoComplete?: string;
|
|
4
|
+
counterFunction?: () => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
hasClearButton?: boolean;
|
|
7
|
+
hasSearchShortcut?: boolean;
|
|
8
|
+
id: any;
|
|
9
|
+
initialValue?: string;
|
|
10
|
+
inputWidth: any;
|
|
11
|
+
label: any;
|
|
12
|
+
labelStrings?: {
|
|
13
|
+
clearButton: string;
|
|
14
|
+
searchShortcut: string;
|
|
15
|
+
visibilityStatus: string;
|
|
16
|
+
visibilityToggleHide: string;
|
|
17
|
+
visibilityToggleShow: string;
|
|
18
|
+
};
|
|
19
|
+
message: any;
|
|
20
|
+
onChange: any;
|
|
21
|
+
onFocus: any;
|
|
22
|
+
placeholder: any;
|
|
23
|
+
readonly?: boolean;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
showLabel?: boolean;
|
|
26
|
+
specialFormatting: any;
|
|
27
|
+
specialFormattingValidation?: boolean;
|
|
28
|
+
toggleVisibility?: boolean;
|
|
29
|
+
type?: string;
|
|
30
|
+
validationFunction: any;
|
|
31
|
+
validationMessages?: {
|
|
32
|
+
creditCardError: string;
|
|
33
|
+
phoneError: string;
|
|
34
|
+
};
|
|
35
|
+
className: any;
|
|
36
|
+
}): React.JSX.Element;
|
|
37
|
+
export namespace InputText {
|
|
38
|
+
namespace propTypes {
|
|
39
|
+
let autoComplete: PropTypes.Requireable<string>;
|
|
40
|
+
let counterFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
42
|
+
let hasClearButton: PropTypes.Requireable<boolean>;
|
|
43
|
+
let hasSearchShortcut: PropTypes.Requireable<boolean>;
|
|
44
|
+
let id: PropTypes.Validator<string>;
|
|
45
|
+
let initialValue: PropTypes.Requireable<string>;
|
|
46
|
+
let inputWidth: PropTypes.Requireable<number>;
|
|
47
|
+
let label: PropTypes.Validator<string>;
|
|
48
|
+
let labelStrings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
49
|
+
clearButton: PropTypes.Requireable<string>;
|
|
50
|
+
searchShortcut: PropTypes.Requireable<string>;
|
|
51
|
+
visibilityStatus: PropTypes.Requireable<string>;
|
|
52
|
+
visibilityToggleHide: PropTypes.Requireable<string>;
|
|
53
|
+
visibilityToggleShow: PropTypes.Requireable<string>;
|
|
54
|
+
}>>;
|
|
55
|
+
let message: PropTypes.Requireable<string>;
|
|
56
|
+
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
57
|
+
let onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
58
|
+
let placeholder: PropTypes.Requireable<string>;
|
|
59
|
+
let readonly: PropTypes.Requireable<boolean>;
|
|
60
|
+
let required: PropTypes.Requireable<boolean>;
|
|
61
|
+
let showLabel: PropTypes.Requireable<boolean>;
|
|
62
|
+
let specialFormatting: PropTypes.Requireable<string>;
|
|
63
|
+
let specialFormattingValidation: PropTypes.Requireable<boolean>;
|
|
64
|
+
let toggleVisibility: PropTypes.Requireable<boolean>;
|
|
65
|
+
let type: PropTypes.Requireable<string>;
|
|
66
|
+
let validationFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
|
+
let validationMessages: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
|
+
creditCardError: PropTypes.Requireable<string>;
|
|
69
|
+
phoneError: PropTypes.Requireable<string>;
|
|
70
|
+
}>>;
|
|
71
|
+
let className: PropTypes.Requireable<string>;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
import React from 'react';
|
|
75
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export function RadioGroup({ disabled, id, initialSelection, inputWidth, label, message, onChange, options, required, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
id: any;
|
|
5
|
+
initialSelection: any;
|
|
6
|
+
inputWidth: any;
|
|
7
|
+
label: any;
|
|
8
|
+
message: any;
|
|
9
|
+
onChange: any;
|
|
10
|
+
options: any;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
className: any;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
export namespace RadioGroup {
|
|
15
|
+
namespace propTypes {
|
|
16
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
17
|
+
let id: PropTypes.Validator<string>;
|
|
18
|
+
let initialSelection: PropTypes.Requireable<string>;
|
|
19
|
+
let inputWidth: PropTypes.Requireable<number>;
|
|
20
|
+
let label: PropTypes.Validator<string>;
|
|
21
|
+
let message: PropTypes.Requireable<string>;
|
|
22
|
+
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
+
let options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
+
/**
|
|
25
|
+
* Is the option disabled?
|
|
26
|
+
*/
|
|
27
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Option unique ID
|
|
30
|
+
*/
|
|
31
|
+
id: PropTypes.Requireable<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Option label
|
|
34
|
+
*/
|
|
35
|
+
label: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
36
|
+
/**
|
|
37
|
+
* Option value
|
|
38
|
+
*/
|
|
39
|
+
value: PropTypes.Requireable<string>;
|
|
40
|
+
}>[]>;
|
|
41
|
+
let required: PropTypes.Requireable<boolean>;
|
|
42
|
+
let className: PropTypes.Requireable<string>;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
import React from 'react';
|
|
46
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export function Select({ disabled, id, initialValue, inputWidth, label, message, onOptionSelect, options, required, selectOptionsLabel, showLabel, validationFunction, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
id: any;
|
|
5
|
+
initialValue: any;
|
|
6
|
+
inputWidth: any;
|
|
7
|
+
label: any;
|
|
8
|
+
message: any;
|
|
9
|
+
onOptionSelect: any;
|
|
10
|
+
options: any;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
selectOptionsLabel?: string;
|
|
13
|
+
showLabel?: boolean;
|
|
14
|
+
validationFunction: any;
|
|
15
|
+
className: any;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
export namespace Select {
|
|
18
|
+
let displayName: string;
|
|
19
|
+
namespace propTypes {
|
|
20
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
21
|
+
let id: PropTypes.Validator<string>;
|
|
22
|
+
let initialValue: PropTypes.Requireable<string>;
|
|
23
|
+
let inputWidth: PropTypes.Requireable<number>;
|
|
24
|
+
let label: PropTypes.Validator<string>;
|
|
25
|
+
let message: PropTypes.Requireable<string>;
|
|
26
|
+
let onOptionSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
+
let options: PropTypes.Validator<PropTypes.InferProps<{
|
|
28
|
+
/**
|
|
29
|
+
* Option label.
|
|
30
|
+
*/
|
|
31
|
+
label: PropTypes.Validator<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Option value. Will default to label if not provided.
|
|
34
|
+
*/
|
|
35
|
+
value: PropTypes.Requireable<string>;
|
|
36
|
+
}>[]>;
|
|
37
|
+
let required: PropTypes.Requireable<boolean>;
|
|
38
|
+
let selectOptionsLabel: PropTypes.Requireable<string>;
|
|
39
|
+
let showLabel: PropTypes.Requireable<boolean>;
|
|
40
|
+
let validationFunction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
let className: PropTypes.Requireable<string>;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
import React from 'react';
|
|
45
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { ChangeEvent, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './switch.css';
|
|
3
|
+
type SwitchPlacement = 'right' | 'below';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for Switch
|
|
6
|
+
*/
|
|
7
|
+
export interface SwitchProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Is the field checked?
|
|
10
|
+
*/
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Initial value for the input field. Only valid if the input is uncontrolled. Cannot be used in conjunction with the `checked` prop.
|
|
14
|
+
*/
|
|
15
|
+
defaultChecked?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Is the field disabled?
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Input ID.
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Additional props for the `<input>` element.
|
|
26
|
+
*/
|
|
27
|
+
inputProps?: ComponentPropsWithoutRef<'input'>;
|
|
28
|
+
/**
|
|
29
|
+
* Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
30
|
+
*/
|
|
31
|
+
inputWidth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Label of the switch field.
|
|
34
|
+
*/
|
|
35
|
+
label: string;
|
|
36
|
+
/**
|
|
37
|
+
* Message or description used to help clarify the usage of the input.
|
|
38
|
+
*/
|
|
39
|
+
message?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Status text for when switch is off.
|
|
42
|
+
*/
|
|
43
|
+
offLabel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* onChange event handler. Controlled inputs should use this to manage the input value. Uncontrolled inputs will manage their own state, but may still use this to access the event object.
|
|
46
|
+
*/
|
|
47
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Status text for when switch is on.
|
|
50
|
+
*/
|
|
51
|
+
onLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Is this field required?
|
|
54
|
+
*/
|
|
55
|
+
required?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
58
|
+
*/
|
|
59
|
+
showLabel?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Show toggle status label next to switch. If false, icons will render and the text will still be available to screen readers.
|
|
62
|
+
*/
|
|
63
|
+
showStatusLabel?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Determines switch placement, default set to `right`.
|
|
66
|
+
*/
|
|
67
|
+
switchPlacement?: SwitchPlacement;
|
|
68
|
+
/**
|
|
69
|
+
* Additional class names for input.
|
|
70
|
+
*/
|
|
71
|
+
className?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
74
|
+
export {};
|