@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
package/README.md
CHANGED
|
@@ -1,7 +1,37 @@
|
|
|
1
1
|
# pds-toolkit-react
|
|
2
2
|
|
|
3
|
-
React Toolkit for the Pantheon Design System
|
|
3
|
+
## React Toolkit for the Pantheon Design System
|
|
4
4
|
|
|
5
5
|
This toolkit provides assets for use within a React project and a Storybook instance to preview the components.
|
|
6
6
|
|
|
7
7
|
[Published Storybook](https://live-pds-toolkit-react.appa.pantheon.site/)
|
|
8
|
+
|
|
9
|
+
## Toolkit philosophy and scope
|
|
10
|
+
|
|
11
|
+
The intent of this toolkit is to provide a React-based implementation of the Pantheon Design System (PDS) with a focus on semantics, accessibility, visual design, and user-interface design.
|
|
12
|
+
|
|
13
|
+
This toolkit should not contain processes or mechanisms used for data manipulation, business logic, or similar. Therefore, processes such as form handling, routing, and language translation should be handled within the application that is consuming the toolkit.
|
|
14
|
+
|
|
15
|
+
Each component will contain a documentation page within Storybook that provides usage notes, implementation instructions, and expected data structure for that particular component.
|
|
16
|
+
|
|
17
|
+
### Content within components
|
|
18
|
+
|
|
19
|
+
Content should not live within components with a few exceptions — the Social Links component and the links in the legal section of the SiteFooter component. To maintain consistency between all of our digital properties, these links will originate from the design system.
|
|
20
|
+
|
|
21
|
+
## Implementation instructions
|
|
22
|
+
|
|
23
|
+
The toolkit consists of a global stylesheet and React components. Both are required for the toolkit to function as intended.
|
|
24
|
+
|
|
25
|
+
The global stylesheet — `pds-core.css` — provides the base styles for the toolkit including foundations, utilities, and color variables. This stylesheet should be applied at the root of the application.
|
|
26
|
+
|
|
27
|
+
The React components are imported and used within the application as needed. Component-specific styles are imported and applied automatically when the component is used.
|
|
28
|
+
|
|
29
|
+
Components should be imported using named imports. For example:
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { Container, SidebarLayout } from '@pantheon-systems/pds-toolkit-react';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Avoid style conflicts
|
|
36
|
+
|
|
37
|
+
This toolkit is not intended to be used in conjunction with other CSS frameworks. Doing so may result in unexpected behavior and/or visual conflicts.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './avatar.css';
|
|
3
|
+
interface AvatarProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* Aria label for the avatar when used as a link. This is required if using a link.
|
|
6
|
+
*/
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/**
|
|
9
|
+
* If true, a user icon will be displayed with the fallback gradient when an image is not provided.
|
|
10
|
+
*/
|
|
11
|
+
hasUserFallback?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Avatar image.
|
|
14
|
+
*/
|
|
15
|
+
imageSrc?: string;
|
|
16
|
+
/**
|
|
17
|
+
* A link element using the router of your choice. Leave empty for no link.
|
|
18
|
+
*/
|
|
19
|
+
linkContent?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Avatar size.
|
|
22
|
+
*/
|
|
23
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
24
|
+
/**
|
|
25
|
+
* Unique ID associated with the avatar. Can be workspace ID, user ID, email, etc.
|
|
26
|
+
*/
|
|
27
|
+
uniqueId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Additional class names
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Avatar UI component
|
|
35
|
+
*/
|
|
36
|
+
export declare const Avatar: ({ ariaLabel, hasUserFallback, imageSrc, linkContent, size, uniqueId, className, ...props }: AvatarProps) => React.JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './branch-diff.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for BranchDiff
|
|
5
|
+
*/
|
|
6
|
+
export interface BranchDiffProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* The number of commits the current branch is ahead of its upstream branch.
|
|
9
|
+
*/
|
|
10
|
+
numberAhead: number;
|
|
11
|
+
/**
|
|
12
|
+
* A description for the `numberAhead` value.
|
|
13
|
+
*/
|
|
14
|
+
numberAheadDescription?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The number of commits the current branch is behind its upstream branch.
|
|
17
|
+
*/
|
|
18
|
+
numberBehind: number;
|
|
19
|
+
/**
|
|
20
|
+
* A description for the `numberBehind` value.
|
|
21
|
+
*/
|
|
22
|
+
numberBehindDescription?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Custom width in rems for the component. This will override the default.
|
|
25
|
+
*/
|
|
26
|
+
componentWidth?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Additional class names
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* BranchDiff UI component
|
|
34
|
+
*/
|
|
35
|
+
export declare const BranchDiff: ({ numberAhead, numberAheadDescription, numberBehind, numberBehindDescription, componentWidth, className, ...props }: BranchDiffProps) => React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './cta-link.css';
|
|
3
|
+
export interface CTALinkProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* A link element using the router of your choice.
|
|
6
|
+
*/
|
|
7
|
+
linkContent?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Size of link
|
|
10
|
+
*/
|
|
11
|
+
size?: 'sm' | 'md';
|
|
12
|
+
/**
|
|
13
|
+
* Additional class names
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* CTA Link UI component
|
|
19
|
+
*/
|
|
20
|
+
export declare const CTALink: ({ linkContent, size, className, ...props }: CTALinkProps) => React.JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { ContainerWidth, HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import './../buttons/Button/button.css';
|
|
4
|
+
import './cta-slice.css';
|
|
5
|
+
interface CTASliceProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Background color of slice
|
|
8
|
+
*/
|
|
9
|
+
backgroundColor?: 'default' | 'secondary';
|
|
10
|
+
/**
|
|
11
|
+
* PDS container width.
|
|
12
|
+
*/
|
|
13
|
+
containerWidth?: ContainerWidth;
|
|
14
|
+
/**
|
|
15
|
+
* Heading level
|
|
16
|
+
*/
|
|
17
|
+
headingLevel?: HeadingLevel;
|
|
18
|
+
/**
|
|
19
|
+
* Heading text
|
|
20
|
+
*/
|
|
21
|
+
headingText: string;
|
|
22
|
+
/**
|
|
23
|
+
* Further explain block
|
|
24
|
+
*/
|
|
25
|
+
leadText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Primary link content
|
|
28
|
+
*/
|
|
29
|
+
primaryLinkContent: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Optional secondary link content
|
|
32
|
+
*/
|
|
33
|
+
secondaryLinkContent?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Additional class names
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* CTA Slice UI component
|
|
41
|
+
*/
|
|
42
|
+
export declare const CTASlice: ({ backgroundColor, containerWidth, headingLevel, headingText, leadText, primaryLinkContent, secondaryLinkContent, className, ...props }: CTASliceProps) => React.JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './callout.css';
|
|
3
|
+
type CalloutType = 'info' | 'success' | 'warning' | 'critical' | 'discovery' | 'code' | 'earlyAccess';
|
|
4
|
+
type TypeLabels = Record<CalloutType, string>;
|
|
5
|
+
export interface CalloutProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Callout main content.
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Callout title.
|
|
12
|
+
*/
|
|
13
|
+
title: string;
|
|
14
|
+
/**
|
|
15
|
+
* Callout type.
|
|
16
|
+
*/
|
|
17
|
+
type?: CalloutType;
|
|
18
|
+
/**
|
|
19
|
+
* Callout type labels. Provide translation strings if necessary.
|
|
20
|
+
*/
|
|
21
|
+
typeLabels?: TypeLabels;
|
|
22
|
+
/**
|
|
23
|
+
* Additional class names
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Callout UI component
|
|
29
|
+
*/
|
|
30
|
+
export declare const Callout: ({ children, title, type, typeLabels, className, ...props }: CalloutProps) => React.JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './comparison-list.css';
|
|
3
|
+
interface TypeLabels {
|
|
4
|
+
included: string;
|
|
5
|
+
notIncluded: string;
|
|
6
|
+
addon: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListItems {
|
|
9
|
+
text: string;
|
|
10
|
+
type: 'included' | 'notIncluded' | 'addon';
|
|
11
|
+
}
|
|
12
|
+
export interface ComparisonListProps extends ComponentPropsWithoutRef<'div'> {
|
|
13
|
+
/**
|
|
14
|
+
* Icon labels
|
|
15
|
+
*/
|
|
16
|
+
typeLabels?: TypeLabels;
|
|
17
|
+
/**
|
|
18
|
+
* List items
|
|
19
|
+
*/
|
|
20
|
+
listItems?: ListItems[];
|
|
21
|
+
/**
|
|
22
|
+
* Text preceding the list. Optional.
|
|
23
|
+
*/
|
|
24
|
+
listLabel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A link element using the router of your choice. Will be displayed below the list. Optional.
|
|
27
|
+
*/
|
|
28
|
+
moreLink?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Render the icon labels for screen readers.
|
|
31
|
+
*/
|
|
32
|
+
renderTypeLabels?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Additional class names
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* ComparisonList UI component
|
|
40
|
+
*/
|
|
41
|
+
export declare const ComparisonList: ({ listItems, listLabel, moreLink, renderTypeLabels, typeLabels, className, ...props }: ComparisonListProps) => React.JSX.Element;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './dashboard-stat.css';
|
|
3
|
+
export type DashBoardStatStatus = 'success' | 'warning' | 'launch' | 'error' | 'ready' | 'notReady';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for DashboardStat
|
|
6
|
+
*/
|
|
7
|
+
export interface DashboardStatProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Title of the stat, displayed as the main heading of the component.
|
|
10
|
+
*/
|
|
11
|
+
title?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Status of the stat, which determines the icon and icon color.
|
|
14
|
+
*/
|
|
15
|
+
status?: DashBoardStatStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Value of the stat, displayed next to the status icon.
|
|
18
|
+
*/
|
|
19
|
+
stat?: string | number;
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names.
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* DashboardStat UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const DashboardStat: ({ title, status, stat, className, ...props }: DashboardStatProps) => React.JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './file-diff.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for FileDiff
|
|
5
|
+
*/
|
|
6
|
+
export interface FileDiffProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* Number of added lines (green bar).
|
|
9
|
+
*/
|
|
10
|
+
additions: number;
|
|
11
|
+
/**
|
|
12
|
+
* Number of removed lines (red bar).
|
|
13
|
+
*/
|
|
14
|
+
deletions: number;
|
|
15
|
+
/**
|
|
16
|
+
* Object with strings for tooltips and screen reader labels.
|
|
17
|
+
*/
|
|
18
|
+
labelStrings?: {
|
|
19
|
+
linesChanged?: string;
|
|
20
|
+
additions?: string;
|
|
21
|
+
deletions?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Custom width in rems for the component. This will override the default.
|
|
25
|
+
*/
|
|
26
|
+
componentWidth?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Additional class names
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* FileDiff UI component
|
|
34
|
+
*/
|
|
35
|
+
export declare const FileDiff: ({ additions, deletions, labelStrings, className, componentWidth, ...props }: FileDiffProps) => React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function Heading({ children, level, className, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
level: any;
|
|
5
|
+
className: any;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
export namespace Heading {
|
|
8
|
+
namespace propTypes {
|
|
9
|
+
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
10
|
+
let level: PropTypes.Validator<string>;
|
|
11
|
+
let className: PropTypes.Requireable<string>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import PropTypes from 'prop-types';
|