@pantheon-systems/pds-toolkit-react 1.0.0-dev.25 → 1.0.0-dev.250
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 +36 -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/CodeBlock/CodeBlock.d.ts +61 -0
- package/_dist/components/CodeBlock/code-examples.d.ts +5 -0
- package/_dist/components/CodeBlock/themes/index.d.ts +2 -0
- package/_dist/components/CodeBlock/themes/pdsDark.d.ts +2 -0
- package/_dist/components/CodeBlock/themes/pdsLight.d.ts +2 -0
- package/_dist/components/ComparisonList/ComparisonList.d.ts +42 -0
- package/_dist/components/DashboardStat/DashboardStat.d.ts +28 -0
- package/_dist/components/FileDiff/FileDiff.d.ts +35 -0
- package/_dist/components/FlowSteps/FlowSteps.d.ts +33 -0
- package/_dist/components/FlowSteps/example-steps.d.ts +15 -0
- package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +31 -0
- package/_dist/components/Modal/Modal.d.ts +44 -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/Popover/Popover.d.ts +66 -0
- package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
- package/_dist/components/RefreshChecker/RefreshChecker.d.ts +54 -0
- package/_dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +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 +24 -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/ThemeSwitcher/ThemeSwitcher.d.ts +32 -0
- package/_dist/components/Tooltip/Tooltip.d.ts +51 -0
- package/_dist/components/VideoEmbed/VideoEmbed.d.ts +23 -0
- package/_dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +27 -0
- package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +35 -0
- package/_dist/components/badges/Tally/Tally.d.ts +38 -0
- package/_dist/components/buttons/Button/Button.d.ts +66 -0
- package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +48 -0
- package/_dist/components/buttons/ClipboardButton/ClipboardButton.d.ts +31 -0
- package/_dist/components/buttons/CloseButton/CloseButton.d.ts +27 -0
- package/_dist/components/buttons/IconButton/IconButton.d.ts +50 -0
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +75 -0
- package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +63 -0
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +37 -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/PaymentCard/PaymentCard.d.ts +47 -0
- package/_dist/components/cards/PricingCard/PricingCard.d.ts +90 -0
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +45 -0
- package/_dist/components/empty-states/CompactEmptyState/CompactEmptyState.d.ts +37 -0
- package/_dist/components/empty-states/HorizontalEmptyState/HorizontalEmptyState.d.ts +57 -0
- package/_dist/components/empty-states/VerticalEmptyState/VerticalEmptyState.d.ts +39 -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/icons/Icon/Icon.d.ts +718 -0
- package/_dist/components/icons/PaymentIcon/PaymentIcon.d.ts +21 -0
- package/_dist/components/icons/PaymentIcon/svgData.d.ts +8 -0
- package/_dist/components/icons/PlatformIcon/PlatformIcon.d.ts +12 -0
- package/_dist/components/inputs/Checkbox/Checkbox.d.ts +96 -0
- package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +64 -0
- package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +80 -0
- package/_dist/components/inputs/Combobox/Combobox.d.ts +138 -0
- package/_dist/components/inputs/ComboboxMultiselect/ComboboxMultiselect.d.ts +83 -0
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +93 -0
- package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
- package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +104 -0
- package/_dist/components/inputs/Select/Select.d.ts +122 -0
- package/_dist/components/inputs/Switch/Switch.d.ts +74 -0
- package/_dist/components/inputs/TextInput/TextInput.d.ts +139 -0
- package/_dist/components/inputs/Textarea/Textarea.d.ts +110 -0
- package/_dist/components/inputs/input-types.d.ts +1 -0
- package/_dist/components/inputs/input-utilities.d.ts +96 -0
- package/_dist/components/navigation/Breadcrumb/Breadcrumb.d.ts +23 -0
- package/_dist/components/navigation/ButtonNav/ButtonNav.d.ts +29 -0
- package/_dist/components/navigation/DashboardNav/DashboardNav.d.ts +35 -0
- package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +25 -0
- package/_dist/components/navigation/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 +89 -0
- package/_dist/components/navigation/navigation-types.d.ts +33 -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 +14 -0
- package/_dist/components/panels/ExpansionPanel/ExpansionPanel.d.ts +32 -0
- package/_dist/components/panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +24 -0
- package/_dist/components/panels/Panel/Panel.d.ts +35 -0
- package/_dist/components/panels/PanelList/PanelList.d.ts +28 -0
- package/_dist/components/panels/PanelList/PanelRow.d.ts +27 -0
- package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +53 -0
- package/_dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +41 -0
- package/_dist/components/progress-indicators/Spinner/Spinner.d.ts +32 -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-nav.css +1 -0
- package/_dist/css/component-css/pds-button.css +45 -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-clipboard-button.css +0 -0
- package/_dist/css/component-css/pds-close-button.css +1 -0
- package/_dist/css/component-css/pds-code-block.css +1 -0
- package/_dist/css/component-css/pds-combobox-multiselect.css +2 -0
- package/_dist/css/component-css/pds-combobox.css +1 -0
- package/_dist/css/component-css/pds-compact-empty-state.css +1 -0
- package/_dist/css/component-css/pds-comparison-list.css +1 -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-flow-steps.css +1 -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-horizontal-empty-state.css +1 -0
- package/_dist/css/component-css/pds-icon-button.css +13 -0
- package/_dist/css/component-css/pds-icon-story-only.css +1 -0
- package/_dist/css/component-css/pds-index.css +115 -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 +5 -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-payment-card.css +1 -0
- package/_dist/css/component-css/pds-payment-icon.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 +1 -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-theme-switcher.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-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-vertical-empty-state.css +1 -0
- package/_dist/css/component-css/pds-video-embed.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 +206 -0
- package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +315 -0
- package/_dist/css/design-tokens/pds-design-tokens.css +131 -0
- package/_dist/css/pds-components.css +102 -94
- package/_dist/css/pds-core.css +6 -2
- package/_dist/css/pds-layouts.css +8 -1
- package/_dist/index.css +1 -0
- package/_dist/index.d.ts +115 -0
- package/_dist/index.js +11822 -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 +29 -0
- package/_dist/layouts/DocsLayout/DocsLayout.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 +5 -0
- package/_dist/libs/types/custom-types.d.ts +104 -0
- package/_dist/mocks/data/navigation-items.d.ts +388 -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 +10 -0
- package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
- package/_dist/utilities/hooks/useClipboard.d.ts +6 -0
- package/_dist/utilities/hooks/useKeyPress.d.ts +1 -0
- package/_dist/utilities/hooks/useWindowWidth.d.ts +1 -0
- package/_dist/vars/animation.d.ts +5 -0
- package/_dist/vars/spacing.d.ts +17 -0
- package/_dist/vars/z-index.d.ts +5 -0
- package/package.json +91 -44
- 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,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type NavigationItem = {
|
|
3
|
+
/**
|
|
4
|
+
* A boolean indicating whether the item is the active item.
|
|
5
|
+
*/
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Link content — a fully-formed link element using the router of your choice. If a string is provided instead, the item will be rendered as a link that navigates to the first child item.
|
|
9
|
+
*/
|
|
10
|
+
linkContent: JSX.Element | string;
|
|
11
|
+
/**
|
|
12
|
+
* Submenu items.
|
|
13
|
+
*/
|
|
14
|
+
links?: NavigationItem[];
|
|
15
|
+
/**
|
|
16
|
+
* A boolean indicating whether the item is a submenu.
|
|
17
|
+
*/
|
|
18
|
+
path?: string;
|
|
19
|
+
};
|
|
20
|
+
export type FlattenedNavigationItem = {
|
|
21
|
+
/**
|
|
22
|
+
* A boolean indicating whether the item is the active item.
|
|
23
|
+
*/
|
|
24
|
+
isActive?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Link content — a fully-formed link element using the router of your choice.
|
|
27
|
+
*/
|
|
28
|
+
linkContent: JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Nesting level of the item.
|
|
31
|
+
*/
|
|
32
|
+
level: 'top-level' | 'second-level' | 'third-level' | 'fourth-level';
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
3
|
+
export declare const isActiveItem: (item: NavigationItem) => boolean;
|
|
4
|
+
export declare const isActiveTrail: (item: NavigationItem) => boolean;
|
|
5
|
+
export declare const getActiveLink: (items: NavigationItem[]) => JSX.Element | null;
|
|
6
|
+
export declare const getLinkContentString: (linkContent: JSX.Element | string) => string;
|
|
7
|
+
export declare const processNavLinkContent: (linkContent: JSX.Element | string, links?: NavigationItem[]) => JSX.Element | string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './banner.css';
|
|
3
|
+
type Banner = {
|
|
4
|
+
id: string;
|
|
5
|
+
isDismissible?: boolean;
|
|
6
|
+
message: string | React.ReactNode;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
type?: 'info' | 'warning' | 'critical';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for Banner
|
|
12
|
+
*/
|
|
13
|
+
export interface BannerProps extends ComponentPropsWithoutRef<'div'> {
|
|
14
|
+
/**
|
|
15
|
+
* Array of banner objects
|
|
16
|
+
*/
|
|
17
|
+
banners: Banner[];
|
|
18
|
+
/**
|
|
19
|
+
* Label for the dismiss button
|
|
20
|
+
*/
|
|
21
|
+
dismissLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Label for the next message button
|
|
24
|
+
*/
|
|
25
|
+
labelNext?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Label for the previous message button
|
|
28
|
+
*/
|
|
29
|
+
labelPrevious?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Type labels
|
|
32
|
+
*/
|
|
33
|
+
typeLabels?: {
|
|
34
|
+
info: string;
|
|
35
|
+
warning: string;
|
|
36
|
+
critical: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Additional class names
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Banner UI component
|
|
45
|
+
*/
|
|
46
|
+
export declare const Banner: ({ banners, dismissLabel, labelNext, labelPrevious, typeLabels, className, ...props }: BannerProps) => React.JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './inline-message.css';
|
|
3
|
+
/**
|
|
4
|
+
* The type of message to display.
|
|
5
|
+
*/
|
|
6
|
+
type MessageType = 'info' | 'success' | 'warning' | 'critical' | 'working';
|
|
7
|
+
/**
|
|
8
|
+
* Labels for each message type.
|
|
9
|
+
*/
|
|
10
|
+
type TypeLabels = Record<MessageType, string>;
|
|
11
|
+
export interface InlineMessageProps extends ComponentPropsWithoutRef<'div'> {
|
|
12
|
+
/**
|
|
13
|
+
* Title text.
|
|
14
|
+
*/
|
|
15
|
+
title: string;
|
|
16
|
+
/**
|
|
17
|
+
* Secondary text.
|
|
18
|
+
*/
|
|
19
|
+
secondaryText?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Message type.
|
|
22
|
+
*/
|
|
23
|
+
type: MessageType;
|
|
24
|
+
/**
|
|
25
|
+
* Message type labels. Provide translation strings if needed.
|
|
26
|
+
*/
|
|
27
|
+
typeLabels?: TypeLabels;
|
|
28
|
+
/**
|
|
29
|
+
* Additional class names
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* InlineMessage UI component
|
|
35
|
+
*/
|
|
36
|
+
export declare const InlineMessage: ({ title, secondaryText, type, typeLabels, className, ...props }: InlineMessageProps) => React.JSX.Element;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import './section-message.css';
|
|
3
|
+
type MessageType = 'info' | 'success' | 'warning' | 'critical' | 'discovery';
|
|
4
|
+
type TypeLabels = Record<MessageType, string>;
|
|
5
|
+
export interface SectionMessageProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Label for dismiss button. Provide a translation string if needed.
|
|
8
|
+
*/
|
|
9
|
+
dismissLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Unique id of message.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Includes dismiss functionality.
|
|
16
|
+
*/
|
|
17
|
+
isDismissible?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Message text.
|
|
20
|
+
*/
|
|
21
|
+
message: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Callback function when message is dismissed.
|
|
24
|
+
*/
|
|
25
|
+
onDismiss?: (event: MouseEvent<HTMLButtonElement>, id: string) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Message title.
|
|
28
|
+
*/
|
|
29
|
+
title?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Message type.
|
|
32
|
+
*/
|
|
33
|
+
type: MessageType;
|
|
34
|
+
/**
|
|
35
|
+
* Message type labels. Provide translation strings if needed.
|
|
36
|
+
*/
|
|
37
|
+
typeLabels?: TypeLabels;
|
|
38
|
+
/**
|
|
39
|
+
* Additional class names.
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* SectionMessage UI component
|
|
45
|
+
*/
|
|
46
|
+
export declare const SectionMessage: ({ dismissLabel, id, isDismissible, onDismiss, message, title, type, typeLabels, className, ...props }: SectionMessageProps) => React.JSX.Element;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './toaster.css';
|
|
3
|
+
declare const iconTypes: {
|
|
4
|
+
readonly info: "circleInfo";
|
|
5
|
+
readonly success: "check";
|
|
6
|
+
readonly warning: "triangleExclamation";
|
|
7
|
+
readonly critical: "diamondExclamation";
|
|
8
|
+
};
|
|
9
|
+
type IconType = keyof typeof iconTypes;
|
|
10
|
+
declare const defaultTypeLabels: {
|
|
11
|
+
readonly info: "Information";
|
|
12
|
+
readonly success: "Success";
|
|
13
|
+
readonly warning: "Warning";
|
|
14
|
+
readonly critical: "Critical";
|
|
15
|
+
readonly working: "Working...";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Prop types for Toast
|
|
19
|
+
*/
|
|
20
|
+
interface ToastProps extends ComponentPropsWithoutRef<'div'> {
|
|
21
|
+
/**
|
|
22
|
+
* Toast message content.
|
|
23
|
+
*/
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* ID of individual toast.
|
|
27
|
+
*/
|
|
28
|
+
id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Type of toast to show.
|
|
31
|
+
*/
|
|
32
|
+
type?: IconType | 'working';
|
|
33
|
+
/**
|
|
34
|
+
* Toast type labels. Provide translation strings if needed.
|
|
35
|
+
*/
|
|
36
|
+
typeLabels?: Partial<typeof defaultTypeLabels>;
|
|
37
|
+
/**
|
|
38
|
+
* Additional class names
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Toast UI component
|
|
44
|
+
*/
|
|
45
|
+
export declare const Toast: ({ children, id, type, typeLabels, className, }: ToastProps) => React.JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import 'react-toastify/dist/ReactToastify.css';
|
|
3
|
+
import './toaster.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for Toast
|
|
6
|
+
*/
|
|
7
|
+
interface ToasterProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Duration in milliseconds before the toast will auto-close.
|
|
10
|
+
*/
|
|
11
|
+
autoCloseDuration?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum number of toasts that can be displayed at once.
|
|
14
|
+
*/
|
|
15
|
+
limit?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Location toast objects will show in the UI.
|
|
18
|
+
*/
|
|
19
|
+
position?: 'bottom-right' | 'top-right';
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Toaster UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const Toaster: ({ autoCloseDuration, limit, position, className, }: ToasterProps) => React.JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { cssTransition, toast as toastApi, ToastOptions } from 'react-toastify';
|
|
3
|
+
export declare enum ToastType {
|
|
4
|
+
Critical = "critical",
|
|
5
|
+
Warning = "warning",
|
|
6
|
+
Working = "working",
|
|
7
|
+
Success = "success",
|
|
8
|
+
Info = "info"
|
|
9
|
+
}
|
|
10
|
+
export declare const useToast: () => [
|
|
11
|
+
(type: ToastType, message: string | ReactElement, options?: ToastOptions) => string | number,
|
|
12
|
+
typeof toastApi,
|
|
13
|
+
ReturnType<typeof cssTransition>
|
|
14
|
+
];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './expansion-panel.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for ExpansionPanel
|
|
5
|
+
*/
|
|
6
|
+
interface ExpansionPanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the expansion panel.
|
|
9
|
+
*/
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The ID of the expansion panel. If not provided, a unique ID will be generated.
|
|
13
|
+
*/
|
|
14
|
+
id?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the expansion panel is open or not.
|
|
17
|
+
*/
|
|
18
|
+
isOpen?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The summary label of the expansion panel.
|
|
21
|
+
*/
|
|
22
|
+
summary?: string | ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Additional class names
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* ExpansionPanel UI component
|
|
30
|
+
*/
|
|
31
|
+
export declare const ExpansionPanel: ({ children, id, isOpen, summary, className, ...props }: ExpansionPanelProps) => React.JSX.Element;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './expansion-panel-group.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for ExpansionPanelGroup
|
|
5
|
+
*/
|
|
6
|
+
interface ExpansionPanelGroupProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* The content of the expansion panel group. This should be a series of ExpansionPanel components.
|
|
9
|
+
*/
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* The display type of the expansion panel group.
|
|
13
|
+
*/
|
|
14
|
+
displayType?: 'standard' | 'no-border' | 'stacked';
|
|
15
|
+
/**
|
|
16
|
+
* Additional class names
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* ExpansionPanelGroup UI component
|
|
22
|
+
*/
|
|
23
|
+
export declare const ExpansionPanelGroup: ({ children, displayType, className, ...props }: ExpansionPanelGroupProps) => React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './panel.css';
|
|
3
|
+
import { GridGapOptions } from '@layouts/layout-types';
|
|
4
|
+
type StatusType = 'info' | 'success' | 'warning' | 'critical' | 'neutral';
|
|
5
|
+
export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Panel content.
|
|
8
|
+
*/
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Should the panel show a status indicator.
|
|
12
|
+
*/
|
|
13
|
+
hasStatusIndicator?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Padding for the panel.
|
|
16
|
+
*/
|
|
17
|
+
padding?: GridGapOptions;
|
|
18
|
+
/**
|
|
19
|
+
* Status type for panel. Only renders if `hasStatusIndicator` is true.
|
|
20
|
+
*/
|
|
21
|
+
statusType?: StatusType;
|
|
22
|
+
/**
|
|
23
|
+
* Which variant of panel to render
|
|
24
|
+
*/
|
|
25
|
+
variant?: 'default' | 'sunken' | 'raised' | 'overlay' | 'critical';
|
|
26
|
+
/**
|
|
27
|
+
* Additional class names
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Panel UI component
|
|
33
|
+
*/
|
|
34
|
+
export declare const Panel: ({ children, hasStatusIndicator, padding, statusType, variant, className, ...props }: PanelProps) => React.JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './panel-list.css';
|
|
3
|
+
export type PanelListBackground = 'default' | 'secondary' | 'transparent';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for PanelList
|
|
6
|
+
*/
|
|
7
|
+
export interface PanelListProps extends ComponentPropsWithoutRef<'ul'> {
|
|
8
|
+
/**
|
|
9
|
+
* Background color for the panel list.
|
|
10
|
+
*/
|
|
11
|
+
background?: PanelListBackground;
|
|
12
|
+
/**
|
|
13
|
+
* Children components. These will only render if PanelRow components are used.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to have an outside border. There will always be a border between rows.
|
|
18
|
+
*/
|
|
19
|
+
hasBorder?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names.
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* PanelList UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const PanelList: ({ background, children, hasBorder, className, ...props }: PanelListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './panel-list.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for PanelRow
|
|
5
|
+
*/
|
|
6
|
+
export interface PanelRowProps extends ComponentPropsWithoutRef<'li'> {
|
|
7
|
+
/**
|
|
8
|
+
* Child elements to be assigned to named slots.
|
|
9
|
+
*/
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Additional class names.
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the panel row is expandable.
|
|
17
|
+
*/
|
|
18
|
+
isExpandable?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Aria-label for the expand button.
|
|
21
|
+
*/
|
|
22
|
+
expandButtonAriaLabel?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* PanelRow UI component
|
|
26
|
+
*/
|
|
27
|
+
export declare const PanelRow: ({ children, className, isExpandable, expandButtonAriaLabel, ...props }: PanelRowProps) => React.JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './progress-bar.css';
|
|
3
|
+
interface ProgressBarBreakpoint {
|
|
4
|
+
colorType: 'neutral' | 'info' | 'success' | 'warning' | 'critical';
|
|
5
|
+
percentage: number;
|
|
6
|
+
}
|
|
7
|
+
interface ProgressBarProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Array of color breakpoints. Each breakpoint should have a `colorType` and `percentage` value.
|
|
10
|
+
*/
|
|
11
|
+
colorBreakpoints: ProgressBarBreakpoint[];
|
|
12
|
+
/**
|
|
13
|
+
* ID of the Progress Bar. If not provided, a unique ID will be generated.
|
|
14
|
+
*/
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Progress Bar label. Will be available to screen readers if `showLabel` is false.
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
/**
|
|
21
|
+
* Message or description used to help clarify the usage of the progress bar.
|
|
22
|
+
*/
|
|
23
|
+
message?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Position of the message relative to the progress bar.
|
|
26
|
+
*/
|
|
27
|
+
messagePosition?: 'above' | 'below';
|
|
28
|
+
/**
|
|
29
|
+
* Percent complete.
|
|
30
|
+
*/
|
|
31
|
+
percentage: number;
|
|
32
|
+
/**
|
|
33
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
34
|
+
*/
|
|
35
|
+
showLabel?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Should the percentage label be visible?
|
|
38
|
+
*/
|
|
39
|
+
showPercentage?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Size of the progress bar.
|
|
42
|
+
*/
|
|
43
|
+
size?: 'sm' | 'md' | 'lg';
|
|
44
|
+
/**
|
|
45
|
+
* Additional class names
|
|
46
|
+
*/
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* ProgressBar UI component
|
|
51
|
+
*/
|
|
52
|
+
export declare const ProgressBar: ({ colorBreakpoints, id, label, message, messagePosition, percentage, showLabel, showPercentage, size, className, ...props }: ProgressBarProps) => React.JSX.Element;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import './progress-ring.css';
|
|
3
|
+
interface ProgressRingProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* ID of the Progress Ring. If not provided, a unique ID will be generated.
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Inner label for the Progress Ring. May be used for showing a percentage or a count of steps.
|
|
10
|
+
*/
|
|
11
|
+
innerLabel?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Label for the Progress Ring. Will be available to screen readers if `showLabel` is false.
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Percentage of progress.
|
|
18
|
+
*/
|
|
19
|
+
percentage: number;
|
|
20
|
+
/**
|
|
21
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
22
|
+
*/
|
|
23
|
+
showLabel?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Should the percentage be visible? Will be overridden by `innerLabel` if one is provided.
|
|
26
|
+
*/
|
|
27
|
+
showPercentage?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Size of the progress ring.
|
|
30
|
+
*/
|
|
31
|
+
size?: 'sm' | 'md' | 'lg';
|
|
32
|
+
/**
|
|
33
|
+
* Additional class names
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* ProgressRing UI component
|
|
39
|
+
*/
|
|
40
|
+
export declare const ProgressRing: ({ id, innerLabel, label, percentage, showLabel, showPercentage, size, className, ...props }: ProgressRingProps) => React.JSX.Element;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './spinner.css';
|
|
3
|
+
export interface SpinnerProps extends ComponentPropsWithoutRef<'span'> {
|
|
4
|
+
/**
|
|
5
|
+
* Spinner color
|
|
6
|
+
*/
|
|
7
|
+
colorType?: 'full-color' | 'monochromatic' | 'monochromatic-reverse';
|
|
8
|
+
/**
|
|
9
|
+
* Should the spinner be an inline element? If true, it will be displayed inline-block without a visible label.
|
|
10
|
+
*/
|
|
11
|
+
isInline?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Spinner label. Will be displayed below the Spinner if `showLabel` is true.
|
|
14
|
+
*/
|
|
15
|
+
label?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
18
|
+
*/
|
|
19
|
+
showLabel?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Spinner size
|
|
22
|
+
*/
|
|
23
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
|
|
24
|
+
/**
|
|
25
|
+
* Additional class names
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Spinner UI component
|
|
31
|
+
*/
|
|
32
|
+
export declare const Spinner: ({ colorType, isInline, label, showLabel, size, className, ...props }: SpinnerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import '../tiles-common.css';
|
|
3
|
+
import './avatar-tile-list.css';
|
|
4
|
+
export type AvatarTileListItem = {
|
|
5
|
+
image?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
org?: string;
|
|
10
|
+
linkContent?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Prop types for AvatarTileList
|
|
14
|
+
*/
|
|
15
|
+
export interface AvatarTileListProps extends ComponentPropsWithoutRef<'div'> {
|
|
16
|
+
/**
|
|
17
|
+
* List of items for each tile.
|
|
18
|
+
*/
|
|
19
|
+
listItems: AvatarTileListItem[];
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* AvatarTileList UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const AvatarTileList: ({ listItems, className, ...props }: AvatarTileListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { HeadingLevelCommon } from '@libs/types/custom-types';
|
|
3
|
+
import './../tiles-common.css';
|
|
4
|
+
import './tile.css';
|
|
5
|
+
export type TileDisplayType = 'border' | 'clean' | 'clean-static';
|
|
6
|
+
/**
|
|
7
|
+
* Prop types for Tile
|
|
8
|
+
*/
|
|
9
|
+
export interface TileProps extends ComponentPropsWithoutRef<'div'> {
|
|
10
|
+
/**
|
|
11
|
+
* Display type.
|
|
12
|
+
*/
|
|
13
|
+
displayType?: TileDisplayType;
|
|
14
|
+
/**
|
|
15
|
+
* Heading level or `span`.
|
|
16
|
+
*/
|
|
17
|
+
headingLevel?: HeadingLevelCommon;
|
|
18
|
+
/**
|
|
19
|
+
* Heading text.
|
|
20
|
+
*/
|
|
21
|
+
headingText?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Image source.
|
|
24
|
+
*/
|
|
25
|
+
imageSrc?: string;
|
|
26
|
+
/**
|
|
27
|
+
* A link element using the router of your choice.
|
|
28
|
+
*/
|
|
29
|
+
linkContent?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Summary paragraph.
|
|
32
|
+
*/
|
|
33
|
+
summary?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Additional class names
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Tile UI component
|
|
41
|
+
*/
|
|
42
|
+
export declare const Tile: ({ displayType, headingLevel, headingText, imageSrc, linkContent, summary, className, ...props }: TileProps) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { TileDisplayType, TileProps } from '@components/tiles/Tile/Tile';
|
|
3
|
+
import { HeadingLevelCommon } from '@libs/types/custom-types';
|
|
4
|
+
import './../tiles-common.css';
|
|
5
|
+
/**
|
|
6
|
+
* Prop types for TileGrid
|
|
7
|
+
*/
|
|
8
|
+
export interface TileGridProps extends ComponentPropsWithoutRef<'div'> {
|
|
9
|
+
/**
|
|
10
|
+
* Display type.
|
|
11
|
+
*/
|
|
12
|
+
displayType?: TileDisplayType;
|
|
13
|
+
/**
|
|
14
|
+
* Heading level or `span`. All tiles in the grid will use this heading level.
|
|
15
|
+
*/
|
|
16
|
+
headingLevel?: HeadingLevelCommon;
|
|
17
|
+
/**
|
|
18
|
+
* Array of Tiles.
|
|
19
|
+
*/
|
|
20
|
+
tiles: TileProps[];
|
|
21
|
+
/**
|
|
22
|
+
* Additional class names
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* TileGrid UI component
|
|
28
|
+
*/
|
|
29
|
+
export declare const TileGrid: ({ displayType, headingLevel, tiles, className, ...props }: TileGridProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pds-avatar-tile-list a{cursor:pointer;text-decoration:none}.pds-tile-list__image{margin-block-end:1rem}.pds-tile-list__image--avatar img{border-radius:50%;height:auto;width:11rem}.pds-tile-list__name{color:var(--pds-color-foreground-default);font-size:1.44rem;font-weight:700}.pds-tile-list__title{color:var(--pds-color-foreground-default-secondary);font-size:1rem;font-weight:600;margin-block-start:.41rem}.pds-tile-list__org{color:var(--pds-color-foreground-default);font-size:.833rem;font-weight:400;margin-block-start:.125rem}.pds-tile-list__item:focus-visible{outline-width:2px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pds-avatar{--avatar-size:1.953rem;--avatar-icon-size:1.125rem;align-items:center;border:1px solid transparent;border-radius:100%;display:inline-flex;justify-content:center}.pds-avatar__content{border-radius:100%;display:flex;height:var(--avatar-size);width:var(--avatar-size)}.pds-avatar__content--link:hover{cursor:pointer;outline:1px solid var(--pds-color-interactive-link-hover);outline-offset:2px}.pds-avatar__content--link:focus-visible{outline:1px solid var(--pds-color-interactive-focus);outline-offset:2px}.pds-avatar--image{border-color:var(--pds-color-border-default)}.pds-avatar--image .pds-avatar__image{border-radius:100%;height:100%;margin:auto;object-fit:cover;width:100%}.pds-avatar__user-icon{color:var(--pds-color-foreground-reverse);height:var(--avatar-icon-size);width:var(--avatar-icon-size)}.pds-avatar--xs{--avatar-size:1rem;--avatar-icon-size:0.5625rem}.pds-avatar--sm{--avatar-size:1.563rem;--avatar-icon-size:0.875rem}.pds-avatar--md{--avatar-size:1.953rem;--avatar-icon-size:1.125rem}.pds-avatar--lg{--avatar-size:2.441rem;--avatar-icon-size:1.375rem}.pds-avatar--xl{--avatar-size:3.815rem;--avatar-icon-size:2.25rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pds-banner-group{--banner-background:var(--pds-color-banner-info-background);--banner-foreground:var(--pds-color-banner-info-foreground);--banner-height:4.678rem;--nav-button-size:1.953rem;min-height:var(--banner-height);position:relative}@media (min-width:641px){.pds-banner-group{--banner-height:3.815rem}}.pds-banner--critical,.pds-banner-group--critical{--banner-background:var(--pds-color-banner-critical-background);--banner-foreground:var(--pds-color-banner-critical-foreground)}.pds-banner--info,.pds-banner-group--info{--banner-background:var(--pds-color-banner-info-background);--banner-foreground:var(--pds-color-banner-info-foreground)}.pds-banner--warning,.pds-banner-group--warning{--banner-background:var(--pds-color-banner-warning-background);--banner-foreground:var(--pds-color-banner-warning-foreground)}.pds-banner{background:var(--banner-background);box-sizing:border-box;color:var(--banner-foreground);font-size:.833rem;height:var(--banner-height);justify-content:space-between;padding-inline:1.953rem;position:absolute;width:100%}.pds-banner,.pds-banner__content{align-items:center;display:flex;gap:.8rem}.pds-banner__icon{flex-grow:0;flex-shrink:0}.pds-banner__message p{all:unset}.pds-banner__message a{color:var(--banner-foreground);padding:.125rem;text-decoration:underline}.pds-banner__message a:hover{background-color:hsla(0,0%,100%,.2);color:var(--banner-foreground);text-decoration:none;transition:all .2s ease-in-out 0s}.pds-banner__message a:focus-visible{outline:1px solid var(--banner-foreground);outline-offset:0}.pds-banner__dismiss-button{all:unset;border-radius:.1875rem;cursor:pointer;padding:.328rem .512rem;transition:all .2s ease-in-out 0s}.pds-banner__dismiss-button:hover{background-color:hsla(0,0%,100%,.2)}.pds-banner__dismiss-button:focus-visible{outline:1px solid var(--banner-foreground);outline-offset:0}.pds-banner-group--multiple .pds-banner{padding-inline:3.052rem}.pds-banner__navigation{display:flex;justify-content:space-between;width:100%}button.pds-banner__nav-button{color:var(--banner-foreground);height:var(--nav-button-size);margin-block:1.375rem;margin-inline:.512rem;min-width:unset;padding:0;transition:all .2s ease-in-out 0s;width:var(--nav-button-size);z-index:calc(var(--pds-z-index-notifications) + 10)}@media (min-width:641px){button.pds-banner__nav-button{margin-block:.9375rem}}button.pds-banner__nav-button:hover:enabled{background-color:hsla(0,0%,100%,.2)}button.pds-banner__nav-button:focus-visible{outline:1px solid var(--banner-foreground);outline-offset:0}.pds-banner--dismissing,.pds-banner--fading{animation:hideBannerAnimation .2s ease-in;animation-fill-mode:forwards}@keyframes hideBannerAnimation{to{opacity:0}0%{opacity:1}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pds-branch-diff{display:flex;height:2rem;max-width:100%;width:100%}.pds-branch-diff .pds-branch-diff__behind{padding-bottom:4px;position:relative;text-align:right;width:50%}.pds-branch-diff .pds-branch-diff__behind .pds-branch-diff__behind-number{display:block;font-size:.833rem;font-weight:400;line-height:120%;padding-inline:.25rem;position:relative;top:-1px}.pds-branch-diff .pds-branch-diff__behind .pds-branch-diff__behind-line{background-color:var(--pds-color-neutral-300);border-bottom-left-radius:6.25rem;border-top-left-radius:6.25rem;height:8px;min-width:1px;position:absolute;right:0;transition:width .3s ease;width:41.95%}.pds-branch-diff .pds-branch-diff__ahead{border-color:var(--pds-color-neutral-400);border-left-style:solid;border-left-width:1px;padding-bottom:4px;position:relative;text-align:left;width:50%}.pds-branch-diff .pds-branch-diff__ahead .pds-branch-diff__ahead-number{display:block;font-size:.833rem;font-weight:400;line-height:120%;padding-inline:.25rem;position:relative;top:-1px}.pds-branch-diff .pds-branch-diff__ahead .pds-branch-diff__ahead-line{background-color:var(--pds-color-neutral-400);border-bottom-right-radius:6.25rem;border-top-right-radius:6.25rem;height:8px;left:0;min-width:1px;position:absolute;transition:width .3s ease;width:41.95%}.pds-branch-diff .pds-branch-diff__tooltip{padding-inline:0}
|