@pantheon-systems/pds-toolkit-react 2.0.0-alpha.30 → 2.0.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/{navigation/DashboardSearch/DashboardSearch.d.ts → SiteSearch/SiteSearch.d.ts} +6 -11
- package/dist/components/cards/ActionCard/ActionCard.d.ts +64 -0
- package/dist/components/cards/Card/Card.d.ts +8 -1
- package/dist/components/cards/{CardSelectGroup/CardSelectGroup.d.ts → CardSelect/CardSelect.d.ts} +13 -8
- package/dist/components/charts/PieChart/PieChart.d.ts +59 -0
- package/dist/components/charts/ProportionBar/ProportionBar.d.ts +57 -0
- package/dist/components/charts/shared/ChartSkeleton.d.ts +5 -1
- package/dist/components/links/CTALink/CTALink.d.ts +1 -1
- package/dist/components/navigation/SideNav/SideNav.d.ts +7 -1
- package/dist/components/navigation/TreeNav/TreeNav.d.ts +48 -0
- package/dist/css/component-css/pds-action-card.css +1 -0
- package/dist/css/component-css/pds-breadcrumb.css +1 -1
- package/dist/css/component-css/pds-card-select.css +1 -0
- package/dist/css/component-css/pds-card.css +1 -1
- package/dist/css/component-css/pds-chart-wrapper.css +1 -1
- package/dist/css/component-css/pds-cta-link.css +1 -1
- package/dist/css/component-css/pds-dropdown-menu.css +1 -1
- package/dist/css/component-css/pds-index.css +8 -16
- package/dist/css/component-css/pds-nav-menu.css +1 -5
- package/dist/css/component-css/pds-pie-chart.css +1 -0
- package/dist/css/component-css/pds-proportion-bar.css +1 -0
- package/dist/css/component-css/pds-side-nav-global.css +1 -7
- package/dist/css/component-css/pds-side-nav.css +3 -1
- package/dist/css/component-css/pds-site-search.css +1 -0
- package/dist/css/component-css/pds-tree-nav.css +1 -0
- package/dist/css/layout-css/pds-app-layout.css +2 -2
- package/dist/css/layout-css/pds-index.css +2 -2
- package/dist/css/layout-css/pds-stepper-layout.css +1 -1
- package/dist/css/pds-components.css +8 -16
- package/dist/css/pds-core.css +1 -1
- package/dist/css/pds-layouts.css +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +5559 -4675
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +6 -11
- package/dist/libs/types/custom-types.d.ts +0 -2
- package/package.json +2 -2
- package/dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +0 -62
- package/dist/components/cards/CardHeading/CardHeading.d.ts +0 -31
- package/dist/components/cards/EmptyStateCard/EmptyStateCard.d.ts +0 -36
- package/dist/components/cards/LinksCard/LinksCard.d.ts +0 -29
- package/dist/components/cards/LinksCard/links-card-sample-data.d.ts +0 -2
- package/dist/components/cards/NewSiteCard/NewSiteCard.d.ts +0 -61
- package/dist/components/cards/PaymentCard/PaymentCard.d.ts +0 -47
- package/dist/components/cards/PricingCard/PricingCard.d.ts +0 -95
- package/dist/components/cards/SiteCard/SiteCard.d.ts +0 -50
- package/dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +0 -53
- package/dist/css/component-css/pds-card-heading.css +0 -1
- package/dist/css/component-css/pds-card-select-group.css +0 -1
- package/dist/css/component-css/pds-dashboard-search.css +0 -1
- package/dist/css/component-css/pds-empty-state-card.css +0 -1
- package/dist/css/component-css/pds-links-card.css +0 -1
- package/dist/css/component-css/pds-new-site-card.css +0 -1
- package/dist/css/component-css/pds-payment-card.css +0 -1
- package/dist/css/component-css/pds-pricing-card-local.css +0 -1
- package/dist/css/component-css/pds-pricing-card.css +0 -1
- package/dist/css/component-css/pds-side-nav-compact.css +0 -1
- package/dist/css/component-css/pds-site-card.css +0 -1
- package/dist/css/component-css/pds-site-dashboard-heading.css +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { SiteOption } from '
|
|
3
|
-
import './
|
|
2
|
+
import { SiteOption } from '../../libs/components/SiteOptionDisplay/SiteOptionDisplay';
|
|
3
|
+
import './site-search.css';
|
|
4
4
|
type LabelStrings = {
|
|
5
5
|
clearButton?: string;
|
|
6
6
|
inputInstructions?: string;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* Prop types for
|
|
9
|
+
* Prop types for SiteSearch
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface SiteSearchProps extends ComponentPropsWithoutRef<'div'> {
|
|
12
12
|
/**
|
|
13
13
|
* Additional class names
|
|
14
14
|
*/
|
|
@@ -17,11 +17,6 @@ export interface DashboardSearchProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
17
17
|
* Is the search input disabled?
|
|
18
18
|
*/
|
|
19
19
|
disabled?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Offset for the starting right position for the search input in rems.
|
|
22
|
-
* @deprecated This prop is no longer used since absolute positioning was removed.
|
|
23
|
-
*/
|
|
24
|
-
horizontalOffset?: number;
|
|
25
20
|
/**
|
|
26
21
|
* ID for the component.
|
|
27
22
|
*/
|
|
@@ -64,7 +59,7 @@ export interface DashboardSearchProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
64
59
|
siteList?: SiteOption[];
|
|
65
60
|
}
|
|
66
61
|
/**
|
|
67
|
-
*
|
|
62
|
+
* SiteSearch UI component
|
|
68
63
|
*/
|
|
69
|
-
export declare const
|
|
64
|
+
export declare const SiteSearch: ({ className, disabled, id, isLoading, label, labelStrings, loadingText, noResultsText, onFocus, onOptionSelect, placeholder, siteList, ...props }: SiteSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
65
|
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { GridGapOptions } from '../../../libs/types/layout-types';
|
|
3
|
+
import { CardBackground, CardImageVariant } from '../../cards/Card/Card';
|
|
4
|
+
import './action-card.css';
|
|
5
|
+
export interface ActionCardPrimaryAction {
|
|
6
|
+
/**
|
|
7
|
+
* Accessible label for the card-level action. Required — read by screen readers
|
|
8
|
+
* as the name of the interactive element that covers the card.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* For link-based actions: pass a native `<a>` or framework link element (e.g.
|
|
13
|
+
* React Router `<Link>`). The component clones the element and injects the
|
|
14
|
+
* required class and aria-label. Mutually exclusive with `onClick`.
|
|
15
|
+
*/
|
|
16
|
+
linkContent?: ReactElement;
|
|
17
|
+
/**
|
|
18
|
+
* For button-based actions: callback fired when the card is activated.
|
|
19
|
+
* Mutually exclusive with `linkContent`.
|
|
20
|
+
*/
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Prop types for ActionCard
|
|
25
|
+
*/
|
|
26
|
+
export interface ActionCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
27
|
+
/**
|
|
28
|
+
* Background color of the card.
|
|
29
|
+
*/
|
|
30
|
+
background?: CardBackground;
|
|
31
|
+
/**
|
|
32
|
+
* Card content. Supports `image`, `main`, and `footer` named slots.
|
|
33
|
+
* Any interactive elements placed inside children (secondary actions) are
|
|
34
|
+
* naturally positioned above the card-level primary action.
|
|
35
|
+
*/
|
|
36
|
+
children?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Additional class names
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Controls how the image slot is presented.
|
|
43
|
+
* - `bleed` (default): image extends to card edges, top corners rounded only.
|
|
44
|
+
* - `inset`: image has padding on all sides, all corners rounded.
|
|
45
|
+
*/
|
|
46
|
+
imageVariant?: CardImageVariant;
|
|
47
|
+
/**
|
|
48
|
+
* Relative padding for the `main` and `footer` slots.
|
|
49
|
+
*/
|
|
50
|
+
padding?: GridGapOptions;
|
|
51
|
+
/**
|
|
52
|
+
* The card-level primary action. Provide either `linkContent` (for links) or
|
|
53
|
+
* `onClick` (for button actions), plus a required accessible `label`.
|
|
54
|
+
*/
|
|
55
|
+
primaryAction: ActionCardPrimaryAction;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* ActionCard UI component
|
|
59
|
+
*
|
|
60
|
+
* A fully-clickable card where the entire surface activates a primary action.
|
|
61
|
+
* Supports both link and button actions. Secondary interactive elements can be
|
|
62
|
+
* placed inside children and remain independently clickable above the card action.
|
|
63
|
+
*/
|
|
64
|
+
export declare const ActionCard: ({ background, children, className, imageVariant, padding, primaryAction, ...props }: ActionCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
|
2
2
|
import { GridGapOptions } from '../../../libs/types/layout-types';
|
|
3
3
|
import './card.css';
|
|
4
4
|
export type CardBackground = 'default' | 'transparent';
|
|
5
|
+
export type CardImageVariant = 'bleed' | 'inset';
|
|
5
6
|
/**
|
|
6
7
|
* Prop types for Card
|
|
7
8
|
*/
|
|
@@ -18,6 +19,12 @@ export interface CardProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
18
19
|
* Additional class names
|
|
19
20
|
*/
|
|
20
21
|
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Controls how the image fills the card top.
|
|
24
|
+
* - `bleed` (default): image extends to the card edges, top corners rounded only.
|
|
25
|
+
* - `inset`: image has padding on all sides, all corners rounded.
|
|
26
|
+
*/
|
|
27
|
+
imageVariant?: CardImageVariant;
|
|
21
28
|
/**
|
|
22
29
|
* Relative padding for the `main` slot.
|
|
23
30
|
*/
|
|
@@ -26,4 +33,4 @@ export interface CardProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
26
33
|
/**
|
|
27
34
|
* Card UI component
|
|
28
35
|
*/
|
|
29
|
-
export declare const Card: ({ background, children, className, padding, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const Card: ({ background, children, className, imageVariant, padding, ...props }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/components/cards/{CardSelectGroup/CardSelectGroup.d.ts → CardSelect/CardSelect.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import './card-select
|
|
2
|
+
import './card-select.css';
|
|
3
3
|
export interface CardOption {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Composable content rendered inside the card below the label.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
children?: ReactNode;
|
|
8
8
|
/**
|
|
9
9
|
* Unique ID for the option
|
|
10
10
|
* @default ''
|
|
@@ -19,7 +19,8 @@ export interface CardOption {
|
|
|
19
19
|
*/
|
|
20
20
|
value: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type CardSelectSize = 'm' | 'l';
|
|
23
|
+
export interface CardSelectProps extends Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> {
|
|
23
24
|
/**
|
|
24
25
|
* Additional class names
|
|
25
26
|
*/
|
|
@@ -29,11 +30,11 @@ export interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fie
|
|
|
29
30
|
*/
|
|
30
31
|
defaultValue?: string;
|
|
31
32
|
/**
|
|
32
|
-
* Unique ID for the card select
|
|
33
|
+
* Unique ID for the card select
|
|
33
34
|
*/
|
|
34
35
|
id: string;
|
|
35
36
|
/**
|
|
36
|
-
* Label for the card select group
|
|
37
|
+
* Label for the card select group. Renders as the fieldset legend.
|
|
37
38
|
*/
|
|
38
39
|
label: string;
|
|
39
40
|
/**
|
|
@@ -53,8 +54,12 @@ export interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fie
|
|
|
53
54
|
* Array of card options
|
|
54
55
|
*/
|
|
55
56
|
options?: CardOption[];
|
|
57
|
+
/**
|
|
58
|
+
* Size of the card label and indicator. Defaults to `'m'`.
|
|
59
|
+
*/
|
|
60
|
+
size?: CardSelectSize;
|
|
56
61
|
}
|
|
57
62
|
/**
|
|
58
|
-
*
|
|
63
|
+
* CardSelect UI component
|
|
59
64
|
*/
|
|
60
|
-
export declare const
|
|
65
|
+
export declare const CardSelect: ({ className, defaultValue, id, label, labelDisplay, layout, onChange, options, size, ...props }: CardSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ColorPalette, LegendVariant } from '../shared/types';
|
|
3
|
+
import '../shared/chart-wrapper.css';
|
|
4
|
+
import './pie-chart.css';
|
|
5
|
+
export type PieChartVariant = 'donut' | 'pie';
|
|
6
|
+
export interface PieSlice {
|
|
7
|
+
/** Override default token color (CSS custom property or hex). Not theme-aware — use paletteIndex instead when possible. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Display label for legend and tooltip */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Pick a specific color from the selected palette by position (1-based). Theme-aware — automatically adjusts for light/dark mode. */
|
|
12
|
+
paletteIndex?: number;
|
|
13
|
+
/** Numeric value for this slice */
|
|
14
|
+
value: number;
|
|
15
|
+
}
|
|
16
|
+
export interface PieChartLabelStrings {
|
|
17
|
+
/** Accessible description for the hidden data table */
|
|
18
|
+
accessibleTableDescription?: string;
|
|
19
|
+
/** Heading for the empty state */
|
|
20
|
+
emptyStateHeading?: string;
|
|
21
|
+
/** Message body for the empty state */
|
|
22
|
+
emptyStateMessage?: string;
|
|
23
|
+
/** Loading label for screen readers */
|
|
24
|
+
loadingLabel?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PieChartProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
27
|
+
/** Height of the chart area in pixels. Default: 300; 80 when isThumbnail. */
|
|
28
|
+
chartHeight?: number;
|
|
29
|
+
/** Maximum width of the component in pixels. Default: 80 when isThumbnail. */
|
|
30
|
+
chartWidth?: number;
|
|
31
|
+
/** Color palette to use for slice colors (default: 'categorical') */
|
|
32
|
+
colorPalette?: ColorPalette;
|
|
33
|
+
/** Slice data */
|
|
34
|
+
data: PieSlice[];
|
|
35
|
+
/** Show loading skeleton */
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
/** Thumbnail mode — hides legend and tooltip, renders at a small fixed size. Individual show* props can override. */
|
|
38
|
+
isThumbnail?: boolean;
|
|
39
|
+
/** Translatable UI strings for i18n. Keys: accessibleTableDescription, emptyStateHeading, emptyStateMessage, loadingLabel. */
|
|
40
|
+
labelStrings?: PieChartLabelStrings;
|
|
41
|
+
/** Legend display style (default: 'inline') */
|
|
42
|
+
legendVariant?: LegendVariant;
|
|
43
|
+
/** Show accessible data table (visually hidden). Defaults to true. */
|
|
44
|
+
showAccessibleTable?: boolean;
|
|
45
|
+
/** Show legend below the chart. Defaults to true; false when isThumbnail is set. */
|
|
46
|
+
showLegend?: boolean;
|
|
47
|
+
/** Show tooltip on hover. Defaults to true; false when isThumbnail is set. */
|
|
48
|
+
showTooltip?: boolean;
|
|
49
|
+
/** Custom value formatter for legend items. Receives the slice value, total, and label. Defaults to showing percentage. */
|
|
50
|
+
valueFormatter?: (value: number, total: number, label: string) => string;
|
|
51
|
+
/** Chart variant (default: 'pie') */
|
|
52
|
+
variant?: PieChartVariant;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* PieChart UI component
|
|
56
|
+
*
|
|
57
|
+
* Renders a responsive pie or donut chart showing proportional data across categories.
|
|
58
|
+
*/
|
|
59
|
+
export declare const PieChart: ({ chartHeight, chartWidth, className, colorPalette, data, isLoading, isThumbnail, labelStrings, legendVariant, showAccessibleTable, showLegend, showTooltip, valueFormatter, variant, ...props }: PieChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ColorPalette } from '../shared/types';
|
|
3
|
+
import '../shared/chart-wrapper.css';
|
|
4
|
+
import './proportion-bar.css';
|
|
5
|
+
export interface ProportionSegment {
|
|
6
|
+
/** Override default token color (CSS custom property or hex). Not theme-aware — use paletteIndex instead when possible. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Display label for legend and tooltip */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Pick a specific color from the selected palette by position (1-based). Theme-aware — automatically adjusts for light/dark mode. */
|
|
11
|
+
paletteIndex?: number;
|
|
12
|
+
/** Numeric value for this segment */
|
|
13
|
+
value: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ProportionBarLabelStrings {
|
|
16
|
+
/** Accessible description for the hidden data table */
|
|
17
|
+
accessibleTableDescription?: string;
|
|
18
|
+
/** Heading for the empty state */
|
|
19
|
+
emptyStateHeading?: string;
|
|
20
|
+
/** Message body for the empty state */
|
|
21
|
+
emptyStateMessage?: string;
|
|
22
|
+
/** Loading label for screen readers */
|
|
23
|
+
loadingLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ProportionBarProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
26
|
+
/** Height of the bar track in pixels (default: 16) */
|
|
27
|
+
barHeight?: number;
|
|
28
|
+
/** Maximum width of the component in pixels. The component is responsive and will shrink within this constraint. */
|
|
29
|
+
chartWidth?: number;
|
|
30
|
+
/** Color palette to use for segment colors (default: 'categorical') */
|
|
31
|
+
colorPalette?: ColorPalette;
|
|
32
|
+
/** Segment data — each segment has a label, numeric value, and optional color override */
|
|
33
|
+
data: ProportionSegment[];
|
|
34
|
+
/** Show loading skeleton */
|
|
35
|
+
isLoading?: boolean;
|
|
36
|
+
/** Thumbnail mode — hides legend and tooltip. Individual show* props can override. */
|
|
37
|
+
isThumbnail?: boolean;
|
|
38
|
+
/** Translatable UI strings for i18n. Keys: accessibleTableDescription, emptyStateHeading, emptyStateMessage, loadingLabel. */
|
|
39
|
+
labelStrings?: ProportionBarLabelStrings;
|
|
40
|
+
/** Alignment of the legend (default: 'left') */
|
|
41
|
+
legendAlignment?: 'center' | 'left';
|
|
42
|
+
/** Show accessible data table (visually hidden). Defaults to true. */
|
|
43
|
+
showAccessibleTable?: boolean;
|
|
44
|
+
/** Show legend below the bar. Defaults to true; false when isThumbnail is set. */
|
|
45
|
+
showLegend?: boolean;
|
|
46
|
+
/** Show tooltip on hover. Defaults to true; false when isThumbnail is set. */
|
|
47
|
+
showTooltip?: boolean;
|
|
48
|
+
/** Custom value formatter for legend items. Receives the segment value, total, and label. Defaults to showing percentage. */
|
|
49
|
+
valueFormatter?: (value: number, total: number, label: string) => string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* ProportionBar UI component
|
|
53
|
+
*
|
|
54
|
+
* Renders a single horizontal bar divided into colored segments, showing
|
|
55
|
+
* the composition of a total. Functions as a linearized pie chart.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ProportionBar: ({ barHeight, chartWidth, className, colorPalette, data, isLoading, isThumbnail, labelStrings, legendAlignment, showAccessibleTable, showLegend, showTooltip, valueFormatter, ...props }: ProportionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { LegendVariant } from './types';
|
|
2
2
|
export interface ChartSkeletonProps {
|
|
3
|
+
/** Optional border radius for the skeleton bar area (e.g. 'var(--pds-border-radius-bar)'). When provided, a rectangular skeleton is clipped to this radius. */
|
|
4
|
+
borderRadius?: string;
|
|
3
5
|
height: number;
|
|
6
|
+
/** Alignment of the inline legend skeleton (default: 'center') */
|
|
7
|
+
legendAlignment?: 'center' | 'left';
|
|
4
8
|
legendVariant?: LegendVariant;
|
|
5
9
|
showLegend?: boolean;
|
|
6
10
|
}
|
|
7
|
-
export declare const ChartSkeleton: ({ height, legendVariant, showLegend, }: ChartSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ChartSkeleton: ({ borderRadius, height, legendAlignment, legendVariant, showLegend, }: ChartSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,12 @@ export interface SideNavProps extends ComponentPropsWithoutRef<'nav'> {
|
|
|
13
13
|
* Additional class names
|
|
14
14
|
*/
|
|
15
15
|
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* When true, renders a dropdown menu in place of the standard navigation at mobile viewports.
|
|
18
|
+
* The mobile breakpoint is controlled by the `mobileBreakpoint` prop on `GlobalWrapper`.
|
|
19
|
+
* Defaults to `false` — the standard navigation is shown at all breakpoints.
|
|
20
|
+
*/
|
|
21
|
+
hasMobileDropdown?: boolean;
|
|
16
22
|
/**
|
|
17
23
|
* Heading text. If a link is passed, it will be rendered as a link.
|
|
18
24
|
*/
|
|
@@ -36,4 +42,4 @@ export interface SideNavProps extends ComponentPropsWithoutRef<'nav'> {
|
|
|
36
42
|
/**
|
|
37
43
|
* SideNav UI component
|
|
38
44
|
*/
|
|
39
|
-
export declare const SideNav: ({ ariaLabel, className, headingText, labels, menuItems, mobileMenuSelectTextFallback, ...props }: SideNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const SideNav: ({ ariaLabel, className, hasMobileDropdown, headingText, labels, menuItems, mobileMenuSelectTextFallback, ...props }: SideNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
+
import { NavigationItem } from '../../../libs/types/navigation-types';
|
|
3
|
+
import './tree-nav.css';
|
|
4
|
+
export type TreeNavItem = NavigationItem & {
|
|
5
|
+
/**
|
|
6
|
+
* A unique identifier for this item — typically its route or URL path (e.g. `/guides/overview`).
|
|
7
|
+
*
|
|
8
|
+
* Required on any item that has children (`links` array). The component uses this to
|
|
9
|
+
* re-find the item's DOM node after a re-render and restore its expanded/collapsed state.
|
|
10
|
+
* Without it, a user-opened nested submenu will collapse whenever the component re-renders.
|
|
11
|
+
*
|
|
12
|
+
* Leaf items (no `links`) do not need `path`.
|
|
13
|
+
*/
|
|
14
|
+
path?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Prop types for TreeNav
|
|
18
|
+
*/
|
|
19
|
+
export interface TreeNavProps extends ComponentPropsWithoutRef<'nav'> {
|
|
20
|
+
/**
|
|
21
|
+
* Aria label for the navigation.
|
|
22
|
+
*/
|
|
23
|
+
ariaLabel: string;
|
|
24
|
+
/**
|
|
25
|
+
* Additional class names
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Heading text. If a link is passed, it will be rendered as a link.
|
|
30
|
+
*/
|
|
31
|
+
headingText?: string | ReactElement;
|
|
32
|
+
/**
|
|
33
|
+
* Labels for translatable strings.
|
|
34
|
+
*/
|
|
35
|
+
labels?: {
|
|
36
|
+
submenu: string;
|
|
37
|
+
toggle: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Menu items to render.
|
|
41
|
+
*/
|
|
42
|
+
menuItems: TreeNavItem[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* TreeNav UI component — a multi-level collapsible tree navigation for dense
|
|
46
|
+
* hierarchical content such as documentation sites.
|
|
47
|
+
*/
|
|
48
|
+
export declare const TreeNav: ({ ariaLabel, className, headingText, labels, menuItems, ...props }: TreeNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pds-action-card{background-color:var(--pds-color-card-background);border-radius:var(--pds-border-radius-card);box-shadow:var(--pds-elevation-raised);color:var(--pds-color-fg-default);cursor:pointer;display:flex;flex-direction:column;height:100%;position:relative}.pds-action-card:hover{box-shadow:var(--pds-elevation-overlay)}.pds-action-card__primary{background:transparent;border:none;border-radius:inherit;font:inherit;inset:0;padding:0;position:absolute;z-index:0}.pds-action-card__primary:focus-visible{outline:none}.pds-action-card__primary:focus-visible:after{border:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus);border-radius:inherit;bottom:0;content:"";left:0;position:absolute;right:0;top:0;transition:var(--pds-animation-transition-button)}.pds-action-card__inner{display:flex;flex-direction:column;flex-grow:1;pointer-events:none;position:relative;z-index:1}.pds-action-card__inner [role=button],.pds-action-card__inner [tabindex],.pds-action-card__inner a,.pds-action-card__inner button,.pds-action-card__inner input,.pds-action-card__inner select,.pds-action-card__inner textarea{pointer-events:auto}.pds-action-card__image{border-radius:var(--pds-border-radius-card) var(--pds-border-radius-card) 0 0;display:block;overflow:hidden}.pds-action-card__image img{display:block;width:100%}.pds-action-card__main{flex-grow:1;padding:var(--pds-spacing-l) var(--pds-spacing-xl)}.pds-action-card__footer{padding:0 var(--pds-spacing-xl) var(--pds-spacing-l)}.pds-action-card--transparent{background-color:transparent}.pds-action-card--image-inset .pds-action-card__image{border-radius:var(--pds-border-radius-card);margin:var(--pds-spacing-m) var(--pds-spacing-m) 0;overflow:hidden;width:auto}.pds-action-card--pad-narrow .pds-action-card__main{padding:var(--pds-spacing-m)}.pds-action-card--pad-narrow .pds-action-card__footer{padding:0 var(--pds-spacing-m) var(--pds-spacing-m)}.pds-action-card--pad-wide .pds-action-card__main{padding:var(--pds-spacing-xl) var(--pds-spacing-2xl)}.pds-action-card--pad-wide .pds-action-card__footer{padding:0 var(--pds-spacing-2xl) var(--pds-spacing-xl)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-breadcrumb{color:var(--pds-color-fg-default-secondary);font-family:var(--pds-typography-ff-default);font-size:var(--pds-typography-size-s);font-weight:var(--pds-typography-fw-regular)}.pds-breadcrumb a{color:var(--pds-color-interactive-link-default);text-decoration:none;transition:var(--pds-animation-transition-link)}.pds-breadcrumb a:hover{color:var(--pds-color-interactive-link-hover);text-decoration:underline}.pds-breadcrumb a:active{color:var(--pds-color-interactive-link-active);outline:none}.pds-breadcrumb a:focus-visible{outline:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus);outline-offset:.125rem;text-decoration:none;transition:var(--pds-animation-transition-focus)}.pds-breadcrumb__crumbs{display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0;row-gap:var(--pds-spacing-xs)}.pds-breadcrumb__crumb{align-items:center;display:flex}.pds-breadcrumb__crumb:not(:last-child):after{color:var(--pds-color-border-separator);content:"/";font-size:var(--pds-typography-size-xs);margin-inline:var(--pds-spacing-2xs)}.pds-breadcrumb__crumb--current a{color:var(--pds-color-fg-default-secondary)}
|
|
1
|
+
.pds-breadcrumb{color:var(--pds-color-fg-default-secondary);font-family:var(--pds-typography-ff-default);font-size:var(--pds-typography-size-s);font-weight:var(--pds-typography-fw-regular)}.pds-breadcrumb a{color:var(--pds-color-interactive-link-default);text-decoration:none;transition:var(--pds-animation-transition-link)}.pds-breadcrumb a:hover{color:var(--pds-color-interactive-link-hover);text-decoration:underline}.pds-breadcrumb a:active{color:var(--pds-color-interactive-link-active);outline:none}.pds-breadcrumb a:focus-visible{outline:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus);outline-offset:.125rem;text-decoration:none;transition:var(--pds-animation-transition-focus)}.pds-breadcrumb__crumbs{display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0;row-gap:var(--pds-spacing-xs)}.pds-breadcrumb__crumb{align-items:center;display:flex}.pds-breadcrumb__crumb:not(:last-child):after{color:var(--pds-color-border-separator);content:"/";font-size:var(--pds-typography-size-xs);margin-inline:var(--pds-spacing-2xs)}.pds-breadcrumb__crumb--current a{color:var(--pds-color-fg-default-secondary)}.pds-breadcrumb__crumb--current a:hover{color:var(--pds-color-interactive-ui-hover);text-decoration:underline}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.pds-card-select{--label-font-size:var(--pds-typography-size-m);--indicator-size:1.25rem;border:none;color:var(--pds-color-fg-default);display:flex;flex-direction:column;font-family:var(--pds-typography-ff-default);margin-inline:0;padding:0}.pds-card-select--l{--label-font-size:var(--pds-typography-size-l);--indicator-size:1.375rem}.pds-card-select__legend{display:block;font-size:var(--pds-typography-size-m);font-weight:var(--pds-typography-fw-semibold);margin-block-end:0;text-align:left}.pds-card-select__legend--center{text-align:center}.pds-card-select__option input[type=radio]{appearance:none}.pds-card-select__option-label{align-items:center;background-color:var(--pds-color-card-background);border-radius:var(--pds-border-radius-card);box-shadow:var(--pds-elevation-raised);column-gap:var(--pds-spacing-xs);display:grid;font-size:var(--label-font-size);font-weight:var(--pds-typography-fw-semibold);grid-template-columns:var(--indicator-size) 1fr;height:100%;margin-block-end:0;padding:var(--pds-spacing-m);width:100%}.pds-card-select__option-label-indicator .pds-icon{height:var(--indicator-size);width:var(--indicator-size)}.pds-card-select__option-label:hover{box-shadow:var(--pds-elevation-overlay);cursor:pointer}.pds-card-select__option-icon{color:var(--pds-color-border-input)}.pds-card-select__option-icon--selected{color:var(--pds-color-status-success-foreground)}.pds-card-select__option-children{color:var(--pds-color-fg-default-secondary);font-size:var(--pds-typography-size-s);font-weight:var(--pds-typography-fw-regular);grid-column:2;line-height:var(--pds-typography-lh-m);margin-block-start:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-card{background-color:var(--pds-color-card-background);border-radius:var(--pds-border-radius-card);box-shadow:var(--pds-elevation-raised);color:var(--pds-color-fg-default);display:flex;flex-direction:column;min-height:8rem}.pds-card__image{border-radius:var(--pds-border-radius-card) var(--pds-border-radius-card) 0 0;display:block;overflow:hidden}.pds-card__image img{display:block;width:100%}.pds-card__main{flex-grow:1;padding:var(--pds-spacing-l) var(--pds-spacing-xl)}.pds-card--transparent{background-color:transparent}.pds-card--pad-narrow .pds-card__main{padding:var(--pds-spacing-m)}.pds-card--pad-wide .pds-card__main{padding:var(--pds-spacing-xl) var(--pds-spacing-2xl)}
|
|
1
|
+
.pds-card{background-color:var(--pds-color-card-background);border-radius:var(--pds-border-radius-card);box-shadow:var(--pds-elevation-raised);color:var(--pds-color-fg-default);display:flex;flex-direction:column;height:100%;min-height:8rem}.pds-card__image{border-radius:var(--pds-border-radius-card) var(--pds-border-radius-card) 0 0;display:block;overflow:hidden}.pds-card__image img{display:block;width:100%}.pds-card__main{flex-grow:1;padding:var(--pds-spacing-l) var(--pds-spacing-xl)}.pds-card__footer{padding:0 var(--pds-spacing-xl) var(--pds-spacing-l)}.pds-card--transparent{background-color:transparent}.pds-card--image-inset .pds-card__image{border-radius:var(--pds-border-radius-card);margin:var(--pds-spacing-m) var(--pds-spacing-m) 0;overflow:hidden;width:auto}.pds-card--pad-narrow .pds-card__main{padding:var(--pds-spacing-m)}.pds-card--pad-narrow .pds-card__footer{padding:0 var(--pds-spacing-m) var(--pds-spacing-m)}.pds-card--pad-wide .pds-card__main{padding:var(--pds-spacing-xl) var(--pds-spacing-2xl)}.pds-card--pad-wide .pds-card__footer{padding:0 var(--pds-spacing-2xl) var(--pds-spacing-xl)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-chart{font-family:var(--pds-typography-ff-default);position:relative;width:100%}.pds-chart__header{align-items:center;display:flex;justify-content:flex-end;margin-block-end:var(--pds-spacing-m)}.pds-chart--loading{display:block}.pds-chart__skeleton{display:flex;flex-direction:column;gap:var(--pds-spacing-m);height:100%;width:100%}.pds-chart__skeleton-area{flex-shrink:0}.pds-chart__skeleton-legend{align-items:center;display:flex;gap:var(--pds-spacing-s)}.pds-chart__skeleton-legend--inline{justify-content:center}.pds-chart__skeleton-legend--table{width:100%}.pds-chart--empty{align-items:center;display:flex;justify-content:center}.recharts-default-tooltip{background-color:var(--pds-color-bg-default)!important;border:var(--pds-border-width-default) solid var(--pds-color-border-default)!important;border-radius:var(--pds-border-radius-container)!important;box-shadow:var(--pds-elevation-overlay)!important;font-family:var(--pds-typography-ff-default)!important;font-size:var(--pds-typography-size-xs)!important;padding:var(--pds-spacing-4xs) var(--pds-spacing-xs)!important}.recharts-tooltip-label{color:var(--pds-color-fg-default)!important;font-weight:var(--pds-typography-fw-semibold)!important;margin:0!important}.recharts-tooltip-item-list li{padding-block:0!important}.recharts-tooltip-item-list{padding:0!important}.recharts-tooltip-item{align-items:center;color:var(--pds-color-fg-default)!important;display:flex;font-size:var(--pds-typography-size-xs)!important;gap:var(--pds-spacing-3xs);margin:0!important;padding:var(--pds-spacing-6xs) 0!important}.recharts-tooltip-item__color{border-radius:2px;display:inline-block;flex-shrink:0;height:8px;width:8px}.pds-bar-chart [aria-hidden=true]:focus,.pds-line-chart [aria-hidden=true]:focus,.recharts-surface:focus,.recharts-wrapper :focus,.recharts-wrapper:focus{outline:none}
|
|
1
|
+
.pds-chart{font-family:var(--pds-typography-ff-default);position:relative;width:100%}.pds-chart__header{align-items:center;display:flex;justify-content:flex-end;margin-block-end:var(--pds-spacing-m)}.pds-chart--loading{display:block}.pds-chart__skeleton{display:flex;flex-direction:column;gap:var(--pds-spacing-m);height:100%;width:100%}.pds-chart__skeleton-area{flex-shrink:0}.pds-chart__skeleton-legend{align-items:center;display:flex;gap:var(--pds-spacing-s)}.pds-chart__skeleton-legend--inline{justify-content:center}.pds-chart__skeleton-legend--inline-left{justify-content:flex-start}.pds-chart__skeleton-legend--table{width:100%}.pds-chart--empty{align-items:center;display:flex;justify-content:center}.recharts-default-tooltip{background-color:var(--pds-color-bg-default)!important;border:var(--pds-border-width-default) solid var(--pds-color-border-default)!important;border-radius:var(--pds-border-radius-container)!important;box-shadow:var(--pds-elevation-overlay)!important;font-family:var(--pds-typography-ff-default)!important;font-size:var(--pds-typography-size-xs)!important;padding:var(--pds-spacing-4xs) var(--pds-spacing-xs)!important}.recharts-tooltip-label{color:var(--pds-color-fg-default)!important;font-weight:var(--pds-typography-fw-semibold)!important;margin:0!important}.recharts-tooltip-item-list li{padding-block:0!important}.recharts-tooltip-item-list{padding:0!important}.recharts-tooltip-item{align-items:center;color:var(--pds-color-fg-default)!important;display:flex;font-size:var(--pds-typography-size-xs)!important;gap:var(--pds-spacing-3xs);margin:0!important;padding:var(--pds-spacing-6xs) 0!important}.recharts-tooltip-item__color{border-radius:2px;display:inline-block;flex-shrink:0;height:8px;width:8px}.pds-bar-chart [aria-hidden=true]:focus,.pds-line-chart [aria-hidden=true]:focus,.recharts-surface:focus,.recharts-wrapper :focus,.recharts-wrapper:focus{outline:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-cta-link{--cta-link-size:var(--pds-typography-size-m);--cta-link-color:var(--pds-color-interactive-link-default);--cta-link-gap:var(--pds-spacing-3xs);align-items:center;display:inline-flex;gap:var(--cta-link-gap);padding:.25rem 0}.pds-cta-link a,.pds-cta-link button{color:var(--cta-link-color);font-family:var(--pds-typography-ff-default);font-size:var(--cta-link-size);font-weight:var(--pds-typography-fw-bold);letter-spacing:var(--pds-typography-ls-s);line-height:var(--pds-typography-lh-s);text-decoration:none;transition:var(--pds-animation-transition-link)}.pds-cta-link a:focus-visible,.pds-cta-link button:focus-visible{border-radius:var(--pds-border-radius-default);outline:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus);outline-offset:.25rem;text-decoration:none}.pds-cta-link button{background:none;border:none;cursor:pointer;padding:0}.pds-cta-link .pds-cta-link__icon{color:var(--cta-link-color);transition:var(--pds-animation-transition-link)}.pds-cta-link:hover{--cta-link-color:var(--pds-color-interactive-link-hover)}.pds-cta-link:active{--cta-link-color:var(--pds-color-interactive-link-active);outline:none;text-decoration:none}.pds-cta-link--m{--cta-link-gap:var(--pds-spacing-2xs);--cta-link-size:var(--pds-typography-size-l)}.pds-link-group{display:flex;flex-direction:column;row-gap:var(--pds-spacing-m)}
|
|
1
|
+
.pds-cta-link{--cta-link-size:var(--pds-typography-size-m);--cta-link-color:var(--pds-color-interactive-link-default);--cta-link-gap:var(--pds-spacing-3xs);align-items:center;display:inline-flex;gap:var(--cta-link-gap);padding:.25rem 0}.pds-cta-link a,.pds-cta-link button{color:var(--cta-link-color);font-family:var(--pds-typography-ff-default);font-size:var(--cta-link-size);font-weight:var(--pds-typography-fw-bold);letter-spacing:var(--pds-typography-ls-s);line-height:var(--pds-typography-lh-s);text-decoration:none;transition:var(--pds-animation-transition-link)}.pds-cta-link a:focus-visible,.pds-cta-link button:focus-visible{border-radius:var(--pds-border-radius-default);outline:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus);outline-offset:.25rem;text-decoration:none}.pds-cta-link button{background:none;border:none;cursor:pointer;padding:0}.pds-cta-link .pds-cta-link__icon{color:var(--cta-link-color);transition:var(--pds-animation-transition-link)}.pds-cta-link:hover{--cta-link-color:var(--pds-color-interactive-link-hover)}.pds-cta-link:active{--cta-link-color:var(--pds-color-interactive-link-active);outline:none;text-decoration:none}.pds-cta-link--xs{--cta-link-gap:var(--pds-spacing-3xs);--cta-link-size:var(--pds-typography-size-s)}.pds-cta-link--m{--cta-link-gap:var(--pds-spacing-2xs);--cta-link-size:var(--pds-typography-size-l)}.pds-link-group{display:flex;flex-direction:column;row-gap:var(--pds-spacing-m)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.pds-dropdown-menu{position:relative}.pds-dropdown-menu__heading{font-weight:var(--pds-typography-fw-semibold);margin-block-end:var(--pds-spacing-s)}.pds-dropdown-menu__heading a{color:var(--pds-color-fg-default);text-decoration:none}.pds-dropdown-menu__heading a:hover{color:var(--pds-color-interactive-ui-hover)}.pds-dropdown-menu__trigger{align-items:center;background-color:var(--pds-color-bg-default);border:var(--pds-border-width-default) solid var(--pds-color-border-input);border-radius:var(--pds-border-radius-input);color:var(--pds-color-fg-default);cursor:pointer;display:flex;height:var(--pds-spacing-input-height-m);justify-content:space-between;padding:0 var(--pds-spacing-s);text-align:left;width:100%}.pds-dropdown-menu__trigger:focus-visible{outline:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus)}.pds-dropdown-menu__trigger-icon{color:var(--pds-color-fg-default-secondary);transition:var(--pds-animation-transition-rotation)}.pds-dropdown-menu__trigger[aria-expanded=true]
|
|
1
|
+
.pds-dropdown-menu{position:relative}.pds-dropdown-menu__heading{font-size:var(--pds-typography-size-m);font-weight:var(--pds-typography-fw-semibold);margin-block-end:var(--pds-spacing-s)}.pds-dropdown-menu__heading a{color:var(--pds-color-fg-default);text-decoration:none}.pds-dropdown-menu__heading a:hover{color:var(--pds-color-interactive-ui-hover)}.pds-dropdown-menu__trigger{align-items:center;background-color:var(--pds-color-bg-default);border:var(--pds-border-width-default) solid var(--pds-color-border-input);border-radius:var(--pds-border-radius-input);color:var(--pds-color-fg-default);cursor:pointer;display:flex;height:var(--pds-spacing-input-height-m);justify-content:space-between;padding:0 var(--pds-spacing-s);text-align:left;width:100%}.pds-dropdown-menu__trigger:focus-visible{outline:var(--pds-border-width-outline) solid var(--pds-color-interactive-focus)}.pds-dropdown-menu__trigger-icon{color:var(--pds-color-fg-default-secondary);transition:var(--pds-animation-transition-rotation)}.pds-dropdown-menu__trigger[aria-expanded=true]
|
|
2
2
|
.pds-dropdown-menu__trigger-icon{transform:rotate(180deg);transition:var(--pds-animation-transition-rotation)}.pds-dropdown-menu__dropdown{margin-block-start:var(--pds-spacing-xs);max-height:30rem;overflow-y:auto;width:100%}.pds-dropdown-menu__dropdown .pds-dropdown__item>a{color:inherit;flex:1;text-decoration:none}.pds-dropdown-menu__item--second-level>a{padding-inline-start:var(--pds-spacing-2xl)}.pds-dropdown-menu__item--third-level>a{padding-inline-start:calc(var(--pds-spacing-2xl) + var(--pds-spacing-xl))}.pds-dropdown-menu__item--fourth-level>a{padding-inline-start:calc(var(--pds-spacing-2xl) + var(--pds-spacing-xl) + var(--pds-spacing-xl))}.pds-dropdown-menu__active-label{display:flex}.pds-dropdown-menu__active-icon{margin-inline:var(--pds-spacing-m)}.pds-dropdown-menu__separator{background-color:var(--pds-color-border-default);block-size:1px;margin-block:token("spacing.XS" to rem);pointer-events:none}
|