@pantheon-systems/pds-toolkit-react 1.0.0-dev.21 → 1.0.0-dev.211
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 +37 -0
- package/_dist/components/BranchDiff/BranchDiff.d.ts +35 -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/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/Heading/Heading.d.ts +15 -0
- package/_dist/components/Icon/Icon.d.ts +674 -0
- package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +31 -0
- package/_dist/components/Modal/Modal.d.ts +40 -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/PlatformIcon/PlatformIcon.d.ts +12 -0
- package/_dist/components/Popover/Popover.d.ts +58 -0
- package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
- package/_dist/components/RefreshChecker/RefreshChecker.d.ts +46 -0
- package/_dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +28 -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 +20 -0
- package/_dist/components/Stepper/Stepper.d.ts +49 -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/Tooltip/Tooltip.d.ts +51 -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 +62 -0
- package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +44 -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 +58 -0
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +37 -0
- package/_dist/components/buttons/ToggleButton/ToggleButton.d.ts +39 -0
- package/_dist/components/buttons/UtilityButton/UtilityButton.d.ts +48 -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/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/PricingCard/PricingCard.d.ts +90 -0
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +45 -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 +26 -0
- package/_dist/components/footer/SiteFooter/footer-content.d.ts +2 -0
- package/_dist/components/inputs/Checkbox/Checkbox.d.ts +96 -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 +134 -0
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +81 -0
- package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
- package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +92 -0
- package/_dist/components/inputs/Select/Select.d.ts +118 -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 +106 -0
- package/_dist/components/inputs/input-types.d.ts +1 -0
- package/_dist/components/inputs/input-utilities.d.ts +90 -0
- package/_dist/components/navigation/Breadcrumb/Breadcrumb.d.ts +23 -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/DashboardNav/dashboard-nav-utilities.d.ts +4 -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 +47 -0
- package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +47 -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 +80 -0
- package/_dist/components/navigation/navigation-types.d.ts +29 -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 +46 -0
- package/_dist/components/notifications/Toaster/Toaster.d.ts +29 -0
- package/_dist/components/notifications/Toaster/useToast.d.ts +13 -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 +19 -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 +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 -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-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 -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-heading.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-dashboard-stat.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-diff.css +1 -0
- package/_dist/css/component-css/pds-file-upload.css +7 -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 +7 -0
- package/_dist/css/component-css/pds-icon-story-only.css +1 -0
- package/_dist/css/component-css/pds-index.css +154 -0
- package/_dist/css/component-css/pds-indicator-badge.css +39 -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-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 -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 +7 -0
- package/_dist/css/component-css/pds-navbar.css +1 -0
- package/_dist/css/component-css/pds-new-site-card.css +1 -0
- 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 -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-refresh-checker.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-dashboard-heading.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-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-tab-menu.css +2 -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-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-utility-button.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 +250 -0
- package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +334 -0
- package/_dist/css/design-tokens/pds-design-tokens.css +114 -0
- package/_dist/css/pds-components.css +117 -70
- package/_dist/css/pds-core.css +6 -2
- package/_dist/css/pds-layouts.css +6 -1
- package/_dist/index.css +1 -0
- package/_dist/index.d.ts +101 -0
- package/_dist/index.js +8955 -0
- package/_dist/index.js.map +1 -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 +20 -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/utility-components.d.ts +15 -0
- package/_dist/libs/components/utils.d.ts +4 -0
- package/_dist/libs/types/custom-types.d.ts +103 -0
- package/_dist/mocks/data/navigation-items.d.ts +375 -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 +7 -0
- package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
- package/_dist/utilities/hooks/useWindowWidth.d.ts +1 -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,60 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './card-select-group.css';
|
|
3
|
+
export interface CardOption {
|
|
4
|
+
/**
|
|
5
|
+
* Unique ID for the option
|
|
6
|
+
* @default ''
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Option label
|
|
11
|
+
*/
|
|
12
|
+
label: string | ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Option description
|
|
15
|
+
*/
|
|
16
|
+
description?: string | ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Option value
|
|
19
|
+
*/
|
|
20
|
+
value: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> {
|
|
23
|
+
/**
|
|
24
|
+
* Optional initial selected option value
|
|
25
|
+
*/
|
|
26
|
+
defaultValue?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Unique ID for the card select group
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Label for the card select group
|
|
33
|
+
*/
|
|
34
|
+
label: string;
|
|
35
|
+
/**
|
|
36
|
+
* Display of the component label. `hidden` visually hides the label but keeps it accessible to screen readers.
|
|
37
|
+
*/
|
|
38
|
+
labelDisplay?: 'left' | 'center' | 'hidden';
|
|
39
|
+
/**
|
|
40
|
+
* Column layout of the cards at breakpoints medium and above.
|
|
41
|
+
*/
|
|
42
|
+
layout?: 'auto' | 'twoAcross' | 'threeAcross';
|
|
43
|
+
/**
|
|
44
|
+
* Callback function that will return the updated value from the instance when it changes.
|
|
45
|
+
* Function should have the shape of: `(value) => { <do stuff here> } `.
|
|
46
|
+
*/
|
|
47
|
+
onChange?: (value: string) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Array of card options
|
|
50
|
+
*/
|
|
51
|
+
options?: CardOption[];
|
|
52
|
+
/**
|
|
53
|
+
* Additional class names
|
|
54
|
+
*/
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* CardSelectGroup UI component
|
|
59
|
+
*/
|
|
60
|
+
export declare const CardSelectGroup: ({ id, defaultValue, label, labelDisplay, layout, onChange, options, className, ...props }: CardSelectGroupProps) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import './links-card.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for LinksCard
|
|
6
|
+
*/
|
|
7
|
+
interface LinksCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Heading level
|
|
10
|
+
*/
|
|
11
|
+
headingLevel?: HeadingLevel;
|
|
12
|
+
/**
|
|
13
|
+
* Link Card heading
|
|
14
|
+
*/
|
|
15
|
+
headingText: string;
|
|
16
|
+
/**
|
|
17
|
+
* Array of links
|
|
18
|
+
*/
|
|
19
|
+
linkItems?: ReactNode[];
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Links Card UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const LinksCard: ({ linkItems, headingLevel, headingText, className, ...props }: LinksCardProps) => React.JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
+
import { BadgeColor } from '@libs/types/custom-types';
|
|
3
|
+
import './new-site-card.css';
|
|
4
|
+
interface BadgeValueType {
|
|
5
|
+
label: string;
|
|
6
|
+
color: BadgeColor;
|
|
7
|
+
}
|
|
8
|
+
export declare const badgeTypes: {
|
|
9
|
+
[key: string]: BadgeValueType;
|
|
10
|
+
};
|
|
11
|
+
type IconType = 'drupal' | 'wordpress' | 'gatsby' | 'next' | 'import-custom' | 'next-drupal' | 'gatsby-wp' | 'next-wp';
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for NewSiteCard
|
|
14
|
+
*/
|
|
15
|
+
interface NewSiteCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
16
|
+
/**
|
|
17
|
+
* Optional indicator badge type. Choose from only early-access at this time.
|
|
18
|
+
*/
|
|
19
|
+
badge?: 'early-access';
|
|
20
|
+
/**
|
|
21
|
+
* Icon. Choose from only Platform Icons at this time.
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconType;
|
|
24
|
+
/**
|
|
25
|
+
* Text for screen readers when link opens in new window
|
|
26
|
+
*/
|
|
27
|
+
newWindowString?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Card title
|
|
30
|
+
*/
|
|
31
|
+
title: string;
|
|
32
|
+
/**
|
|
33
|
+
* Card subtitle
|
|
34
|
+
*/
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Card summary
|
|
38
|
+
*/
|
|
39
|
+
summary?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The primary link for the selection card.
|
|
42
|
+
*/
|
|
43
|
+
selectionLink: ReactElement;
|
|
44
|
+
/**
|
|
45
|
+
* Array of supplemental links. Maximum of 2.
|
|
46
|
+
*/
|
|
47
|
+
supplementalLinks?: ReactElement[];
|
|
48
|
+
/**
|
|
49
|
+
* Additional class names
|
|
50
|
+
*/
|
|
51
|
+
className?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* NewSiteCard UI component
|
|
55
|
+
*/
|
|
56
|
+
export declare const NewSiteCard: ({ badge, icon, newWindowString, title, subtitle, summary, selectionLink, supplementalLinks, className, ...props }: NewSiteCardProps) => React.JSX.Element;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ListItems } from '@components/ComparisonList/ComparisonList';
|
|
3
|
+
import './pricing-card.css';
|
|
4
|
+
interface PrimaryCallToAction {
|
|
5
|
+
type?: 'button' | 'link';
|
|
6
|
+
variant?: 'primary' | 'secondary';
|
|
7
|
+
label?: string;
|
|
8
|
+
buttonAction?: () => void;
|
|
9
|
+
linkUrl?: string;
|
|
10
|
+
linkTarget?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface SecondaryCallToAction {
|
|
14
|
+
type?: 'button' | 'link';
|
|
15
|
+
label?: string;
|
|
16
|
+
buttonAction?: () => void;
|
|
17
|
+
linkUrl?: string;
|
|
18
|
+
linkTarget?: string;
|
|
19
|
+
}
|
|
20
|
+
interface PlanPricingData {
|
|
21
|
+
customActionLabel?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
pricePrefix?: string;
|
|
24
|
+
price?: string;
|
|
25
|
+
priceDetails?: string;
|
|
26
|
+
savingsBadgeLabel?: string;
|
|
27
|
+
savingsDetails?: string;
|
|
28
|
+
listLabel?: string;
|
|
29
|
+
listItems?: ListItems[];
|
|
30
|
+
}
|
|
31
|
+
interface StatusBadgeLabels {
|
|
32
|
+
currentPlan?: string;
|
|
33
|
+
mostPopular?: string;
|
|
34
|
+
}
|
|
35
|
+
interface PricingCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
36
|
+
/**
|
|
37
|
+
* The primary call to action.
|
|
38
|
+
*/
|
|
39
|
+
actionPrimary?: PrimaryCallToAction;
|
|
40
|
+
/**
|
|
41
|
+
* An optional secondary call to action.
|
|
42
|
+
*/
|
|
43
|
+
actionSecondary?: SecondaryCallToAction;
|
|
44
|
+
/**
|
|
45
|
+
* Has comparison list. Will be rendered below the card if true.
|
|
46
|
+
* Add corresponding `comparisonListId` to each planPricingData object.
|
|
47
|
+
*/
|
|
48
|
+
hasComparisonList?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional function to handle the change event of the select input. Only valid when multiple tiers of planPricingData are present.
|
|
51
|
+
*/
|
|
52
|
+
onTierChange?: (value: any) => void;
|
|
53
|
+
/**
|
|
54
|
+
* A brief description of the plan.
|
|
55
|
+
*/
|
|
56
|
+
planDescription?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The name of the plan.
|
|
59
|
+
*/
|
|
60
|
+
planName?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Plan pricing data. An array of objects.
|
|
63
|
+
*/
|
|
64
|
+
planPricingData: PlanPricingData[];
|
|
65
|
+
/**
|
|
66
|
+
* Label for the plan size select dropdown. Available to screen readers only. Provide translation string if needed.
|
|
67
|
+
*/
|
|
68
|
+
selectLabel?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Status badge labels. Provide translation strings if needed.
|
|
71
|
+
*/
|
|
72
|
+
statusBadgeLabels: StatusBadgeLabels;
|
|
73
|
+
/**
|
|
74
|
+
* Status badge type. Leave empty for no badge. Only one badge of each type should be used in a group of Pricing Cards.
|
|
75
|
+
*/
|
|
76
|
+
statusBadgeType?: 'currentPlan' | 'mostPopular';
|
|
77
|
+
/**
|
|
78
|
+
* Additional class names for the card item.
|
|
79
|
+
*/
|
|
80
|
+
className?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Additional class names for the card container.
|
|
83
|
+
*/
|
|
84
|
+
containerClassName?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* PricingCard UI component
|
|
88
|
+
*/
|
|
89
|
+
export declare const PricingCard: ({ actionPrimary, actionSecondary, hasComparisonList, onTierChange, planDescription, planName, planPricingData, statusBadgeLabels, selectLabel, statusBadgeType, className, ...props }: PricingCardProps) => React.JSX.Element;
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import { SiteStatus } from '@libs/types/custom-types';
|
|
4
|
+
import './site-card.css';
|
|
5
|
+
/**
|
|
6
|
+
* Prop types for SiteCard
|
|
7
|
+
*/
|
|
8
|
+
export interface SiteCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
9
|
+
/**
|
|
10
|
+
* Translatable text for the "Go to" link.
|
|
11
|
+
*/
|
|
12
|
+
gotoText?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Heading level of the card title.
|
|
15
|
+
*/
|
|
16
|
+
headingLevel?: HeadingLevel;
|
|
17
|
+
/**
|
|
18
|
+
* Image URL for the site.
|
|
19
|
+
*/
|
|
20
|
+
siteImage?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Link to the site dashboard.
|
|
23
|
+
*/
|
|
24
|
+
siteLink: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Name of the site.
|
|
27
|
+
*/
|
|
28
|
+
siteName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Plan of the site.
|
|
31
|
+
*/
|
|
32
|
+
sitePlan?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Status of the site.
|
|
35
|
+
*/
|
|
36
|
+
siteStatus?: SiteStatus;
|
|
37
|
+
/**
|
|
38
|
+
* Additional class names
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* SiteCard UI component
|
|
44
|
+
*/
|
|
45
|
+
export declare const SiteCard: ({ gotoText, headingLevel, siteImage, siteLink, siteName, sitePlan, siteStatus, className, ...props }: SiteCardProps) => React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './footer-heading.css';
|
|
3
|
+
import type { HeadingLevel } from '@libs/types/custom-types';
|
|
4
|
+
interface FooterHeadingProps {
|
|
5
|
+
/**
|
|
6
|
+
* Heading level
|
|
7
|
+
*/
|
|
8
|
+
headingLevel?: HeadingLevel;
|
|
9
|
+
/**
|
|
10
|
+
* Heading text
|
|
11
|
+
*/
|
|
12
|
+
headingText: string;
|
|
13
|
+
/**
|
|
14
|
+
* Additional class names
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Footer Heading UI component
|
|
20
|
+
*/
|
|
21
|
+
export declare const FooterHeading: ({ headingLevel, headingText, className, ...props }: FooterHeadingProps & ComponentPropsWithoutRef<HeadingLevel>) => React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './footer-links.css';
|
|
3
|
+
import type { HeadingLevel } from '@libs/types/custom-types';
|
|
4
|
+
interface FooterLinksProps extends ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
/**
|
|
6
|
+
* Heading level
|
|
7
|
+
*/
|
|
8
|
+
headingLevel?: HeadingLevel;
|
|
9
|
+
/**
|
|
10
|
+
* Heading text
|
|
11
|
+
*/
|
|
12
|
+
headingText: string;
|
|
13
|
+
/**
|
|
14
|
+
* Array of links
|
|
15
|
+
*/
|
|
16
|
+
linkItems?: ReactNode[];
|
|
17
|
+
/**
|
|
18
|
+
* Additional class names
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Footer Links UI component
|
|
24
|
+
*/
|
|
25
|
+
export declare const FooterLinks: ({ headingLevel, headingText, linkItems, className, ...props }: FooterLinksProps) => React.JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ContainerWidth } from '@libs/types/custom-types';
|
|
3
|
+
import './site-footer.css';
|
|
4
|
+
interface SiteFooterProps extends ComponentPropsWithoutRef<'footer'> {
|
|
5
|
+
/**
|
|
6
|
+
* PDS container width.
|
|
7
|
+
*/
|
|
8
|
+
containerWidth?: ContainerWidth;
|
|
9
|
+
/**
|
|
10
|
+
* Footer content.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Legal policy links.
|
|
15
|
+
*/
|
|
16
|
+
legalLinks?: Array<'privacy' | 'dataSubjectRequest' | 'cookiePolicy' | 'termsOfUse' | 'acceptableUse' | 'accessibilityStatement'>;
|
|
17
|
+
/**
|
|
18
|
+
* Additional class names
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* SiteFooter UI component
|
|
24
|
+
*/
|
|
25
|
+
export declare const SiteFooter: ({ containerWidth, children, legalLinks, className, ...props }: SiteFooterProps) => React.JSX.Element;
|
|
26
|
+
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;
|
|
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,60 @@
|
|
|
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
|
+
* 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, 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
|
+
* 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;
|