@pantheon-systems/pds-toolkit-react 2.0.0-beta.17 → 2.0.0-beta.19

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.
@@ -0,0 +1,29 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import type { TimelineSubtitlePosition, TimelineVariant } from './TimelineItem';
3
+ import './timeline.css';
4
+ /**
5
+ * Prop types for Timeline
6
+ */
7
+ export interface TimelineProps extends ComponentPropsWithoutRef<'ol'> {
8
+ /**
9
+ * Children components. These should be TimelineItem components.
10
+ */
11
+ children?: ReactNode;
12
+ /**
13
+ * Additional class names
14
+ */
15
+ className?: string;
16
+ /**
17
+ * Where each timeline item's subtitle goes: above or below its title.
18
+ */
19
+ subtitlePosition?: TimelineSubtitlePosition;
20
+ /**
21
+ * Whether timeline items sit on a card or directly on the line. A timeline item can
22
+ * override this.
23
+ */
24
+ variant?: TimelineVariant;
25
+ }
26
+ /**
27
+ * Timeline UI component
28
+ */
29
+ export declare const Timeline: ({ children, className, subtitlePosition, variant, ...props }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { HeadingLevelCommon } from '../../libs/types/custom-types.js';
3
+ import { BadgeColor } from '../badges/Badge/Badge.js';
4
+ import { PDSIcon } from '../icons/Icon/Icon.js';
5
+ import './timeline.css';
6
+ export type TimelineSubtitlePosition = 'above' | 'below';
7
+ export type TimelineVariant = 'card' | 'flat';
8
+ /**
9
+ * Prop types for TimelineItem
10
+ */
11
+ export interface TimelineItemProps extends Omit<ComponentPropsWithoutRef<'li'>, 'title'> {
12
+ /**
13
+ * Color of the badge beside the subtitle. Only used when `badgeLabel` is set.
14
+ */
15
+ badgeColor?: BadgeColor;
16
+ /**
17
+ * Optional leading icon for the badge. Only shown when `badgeLabel` is set.
18
+ */
19
+ badgeIcon?: PDSIcon;
20
+ /**
21
+ * Optional badge text shown beside the subtitle, such as "You're here" or a
22
+ * status.
23
+ */
24
+ badgeLabel?: string;
25
+ /**
26
+ * Content under the title. Plain text is styled as a paragraph. Blocks
27
+ * inside it sit a small, fixed distance apart.
28
+ */
29
+ children?: ReactNode;
30
+ /**
31
+ * Additional class names
32
+ */
33
+ className?: string;
34
+ /**
35
+ * Heading level of the title. Pick the one that fits the page's outline, or
36
+ * `span` to render the title without a heading.
37
+ */
38
+ headingLevel?: HeadingLevelCommon;
39
+ /**
40
+ * Whether this is the timeline item in focus, such as the current step. Gives
41
+ * the dot an accent fill and ring, and sets `aria-current='step'`.
42
+ */
43
+ isActive?: boolean;
44
+ /**
45
+ * Short label hanging beside the dot, left of the line, such as a date. The
46
+ * list makes room for it automatically. On small screens it moves above the
47
+ * title.
48
+ */
49
+ sideLabel?: ReactNode;
50
+ /**
51
+ * Quiet line next to the title, such as a stage or a description. Its
52
+ * position comes from the list's `subtitlePosition`.
53
+ */
54
+ subtitle?: ReactNode;
55
+ /**
56
+ * Title of the timeline item.
57
+ */
58
+ title: ReactNode;
59
+ /**
60
+ * Whether the timeline item sits on a card or directly on the line. Overrides
61
+ * the list's `variant`.
62
+ */
63
+ variant?: TimelineVariant;
64
+ }
65
+ /**
66
+ * TimelineItem UI component
67
+ */
68
+ export declare const TimelineItem: ({ badgeColor, badgeIcon, badgeLabel, children, className, headingLevel, isActive, sideLabel, subtitle, title, variant: variantProp, ...props }: TimelineItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { TimelineSubtitlePosition, TimelineVariant } from './TimelineItem';
2
+ export interface TimelineContextValue {
3
+ subtitlePosition: TimelineSubtitlePosition;
4
+ variant: TimelineVariant;
5
+ }
6
+ export declare const TimelineContext: import("react").Context<TimelineContextValue>;
@@ -0,0 +1,62 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import type { ColorPalette, TooltipPayload } from '../shared/types';
3
+ import '../shared/chart-wrapper.css';
4
+ import './sparkline.css';
5
+ export interface SparklineDataPoint {
6
+ /** Label for this point, such as a date or time */
7
+ label: string;
8
+ /** Numeric value at this point */
9
+ value: number;
10
+ }
11
+ export interface SparklineScrubPayload extends SparklineDataPoint {
12
+ /** Position of the point in `data` */
13
+ index: number;
14
+ }
15
+ export interface SparklineLabelStrings {
16
+ /** Accessible description for the hidden data table. */
17
+ accessibleTableDescription?: string;
18
+ /** Loading label for screen readers. */
19
+ loadingLabel?: string;
20
+ /** Accessible name for the scrubber. */
21
+ scrubberLabel?: string;
22
+ /** Column header for the value in the hidden data table. */
23
+ valueLabel?: string;
24
+ }
25
+ export interface SparklineProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
26
+ /** Position of the dot, as an index into `data`. Makes the position controlled. Defaults to the last point until the user scrubs. */
27
+ activeIndex?: number;
28
+ /** Height of the chart in pixels (default: 60) */
29
+ chartHeight?: number;
30
+ /** Maximum width of the chart in pixels. The chart is responsive and shrinks within this constraint. */
31
+ chartWidth?: number;
32
+ /** Line and dot color (CSS custom property or hex). Not theme-aware — use `paletteIndex` for theme-aware overrides. */
33
+ color?: string;
34
+ /** Color palette used to pick the line color (default: 'categorical') */
35
+ colorPalette?: ColorPalette;
36
+ /** Chart data points */
37
+ data: SparklineDataPoint[];
38
+ /** Show loading state */
39
+ isLoading?: boolean;
40
+ /** Translatable UI strings. Provide overrides for i18n. */
41
+ labelStrings?: SparklineLabelStrings;
42
+ /** Called when the user moves the dot to a different point */
43
+ onScrub?: (point: SparklineScrubPayload) => void;
44
+ /** Pick a specific color from the selected palette by position (1-based). Theme-aware. */
45
+ paletteIndex?: number;
46
+ /** Show accessible data table (visually hidden). Defaults to true. */
47
+ showAccessibleTable?: boolean;
48
+ /** Show the tooltip with the selected point's label and value (default: true) */
49
+ showTooltip?: boolean;
50
+ /** Custom tooltip renderer. Receives the selected point and replaces the built-in tooltip. */
51
+ tooltipContent?: (payload: TooltipPayload) => ReactNode;
52
+ /** Formats values for screen readers and the accessible table */
53
+ valueFormatter?: (value: number) => string;
54
+ }
55
+ /**
56
+ * Sparkline UI component
57
+ *
58
+ * A compact trend line with a dot the user drags to read the value at any
59
+ * point. There is no tooltip; the consumer shows the scrubbed value elsewhere
60
+ * via `onScrub`.
61
+ */
62
+ export declare const Sparkline: ({ activeIndex, chartHeight, chartWidth, className, color, colorPalette, data, isLoading, labelStrings, onScrub, paletteIndex, showAccessibleTable, showTooltip, tooltipContent, valueFormatter, ...props }: SparklineProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generated by: npm run generate:icon-data
5
5
  * Source: icon-registry.ts + Font Awesome packages + custom-icons.tsx
6
- * Generated: 2026-11-02T19:18:20.983Z
6
+ * Generated: 2026-11-05T20:09:05.109Z
7
7
  */
8
8
  import { customIcons } from './custom-icons';
9
9
  export { customIcons };
@@ -120,6 +120,13 @@ export declare const iconData: {
120
120
  readonly svgPathData: "M224 0c13.3 0 24 10.7 24 24l0 190.3 164-95.1c11.5-6.7 26.2-2.7 32.8 8.7s2.7 26.2-8.7 32.8L271.8 256 436 351.2c11.5 6.6 15.4 21.3 8.7 32.8s-21.3 15.4-32.8 8.7L248 297.7 248 488c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-190.3-164 95.1c-11.5 6.7-26.2 2.7-32.8-8.7S.5 357.9 12 351.2L176.2 256 12 160.8C.5 154.1-3.4 139.4 3.2 128s21.3-15.4 32.8-8.7L200 214.3 200 24c0-13.3 10.7-24 24-24z";
121
121
  readonly width: 448;
122
122
  };
123
+ readonly badgePercent: {
124
+ readonly aliases: readonly ["discount", "sale"];
125
+ readonly categories: readonly ["financial"];
126
+ readonly height: 512;
127
+ readonly svgPathData: "M200.3 81.5C210.9 61.5 231.9 48 256 48s45.1 13.5 55.7 33.5c5.4 10.2 17.2 15.1 28.2 11.7 21.6-6.6 46.1-1.4 63.1 15.7s22.3 41.5 15.7 63.1c-3.4 11 1.5 22.9 11.7 28.2 20 10.6 33.5 31.6 33.5 55.7s-13.5 45.1-33.5 55.7c-10.2 5.4-15.1 17.2-11.7 28.2 6.6 21.6 1.4 46.1-15.7 63.1s-41.5 22.3-63.1 15.7c-11-3.4-22.9 1.5-28.2 11.7-10.6 20-31.6 33.5-55.7 33.5s-45.1-13.5-55.7-33.5c-5.4-10.2-17.2-15.1-28.2-11.7-21.6 6.6-46.1 1.4-63.1-15.7S86.6 361.6 93.2 340c3.4-11-1.5-22.9-11.7-28.2-20-10.6-33.5-31.6-33.5-55.7s13.5-45.1 33.5-55.7c10.2-5.4 15.1-17.2 11.7-28.2-6.6-21.6-1.4-46.1 15.7-63.1S150.4 86.6 172 93.2c11 3.4 22.9-1.5 28.2-11.7zM256 0c-35.9 0-67.8 17-88.1 43.4-33-4.3-67.6 6.2-93 31.6s-35.9 60-31.6 93C17 188.2 0 220.1 0 256s17 67.8 43.4 88.1c-4.3 33 6.2 67.6 31.6 93s60 35.9 93 31.6C188.2 495 220.1 512 256 512s67.8-17 88.1-43.4c33 4.3 67.6-6.2 93-31.6s35.9-60 31.6-93C495 323.8 512 291.9 512 256s-17-67.8-43.4-88.1c4.3-33-6.2-67.6-31.6-93s-60-35.9-93-31.6C323.8 17 291.9 0 256 0zM192 224a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM320 352a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm17-177c-9.4-9.4-24.6-9.4-33.9 0L175 303c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0L337 209c9.4-9.4 9.4-24.6 0-33.9z";
128
+ readonly width: 512;
129
+ };
123
130
  readonly banBug: {
124
131
  readonly aliases: readonly ["no bugs", "debug"];
125
132
  readonly categories: readonly ["development", "security"];
@@ -407,6 +414,13 @@ export declare const iconData: {
407
414
  readonly svgPathData: "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-464a208 208 0 1 0 0 416 208 208 0 1 0 0-416zm70.7 121.9c7.8-10.7 22.8-13.1 33.5-5.3 10.7 7.8 13.1 22.8 5.3 33.5L243.4 366.1c-4.1 5.7-10.5 9.3-17.5 9.8-7 .5-13.9-2-18.8-6.9l-55.9-55.9c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l36 36 105.6-145.2z";
408
415
  readonly width: 512;
409
416
  };
417
+ readonly circleDollar: {
418
+ readonly aliases: readonly ["coin", "money"];
419
+ readonly categories: readonly ["financial"];
420
+ readonly height: 512;
421
+ readonly svgPathData: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm24-368c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 8.3c-31.5 3.3-56 29.9-56 62.2 0 31.1 22.9 57.5 53.7 61.9l45.8 6.5c7.2 1 12.5 7.2 12.5 14.4 0 8-6.5 14.6-14.6 14.6L208 312c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8.3c31.5-3.3 56-29.9 56-62.2 0-31.1-22.9-57.5-53.7-61.9L236.5 229c-7.2-1-12.5-7.2-12.5-14.4 0-8 6.5-14.6 14.6-14.6l57.4 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0-8z";
422
+ readonly width: 512;
423
+ };
410
424
  readonly circleExclamation: {
411
425
  readonly aliases: readonly ["warning", "error", "alert"];
412
426
  readonly categories: readonly ["status"];
@@ -841,6 +855,13 @@ export declare const iconData: {
841
855
  readonly svgPathData: "M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 392c0 30.9 25.1 56 56 56l184 0 0-48-184 0c-4.4 0-8-3.6-8-8l0-232 192 0 0-48-192 0 0-88zM385.5 48l31.9 21.3c10.5 7 22.9 10.7 35.5 10.7l75.2 0 0 96-192 0 0-128 49.5 0zM288 48l0 128c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-75.2 0c-3.2 0-6.2-.9-8.9-2.7L412.1 8.1C404.2 2.8 394.9 0 385.5 0L336 0c-26.5 0-48 21.5-48 48zm97.5 288l33.9 22.6c9.2 6.1 20 9.4 31.1 9.4l77.6 0 0 96-192 0 0-128 49.5 0zM288 336l0 128c0 26.5 21.5 48 48 48l192 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-77.6 0c-1.6 0-3.1-.5-4.4-1.3l-33.9-22.6c-7.9-5.3-17.1-8.1-26.6-8.1L336 288c-26.5 0-48 21.5-48 48z";
842
856
  readonly width: 576;
843
857
  };
858
+ readonly gaugeSimpleHigh: {
859
+ readonly aliases: readonly ["speedometer", "dashboard"];
860
+ readonly categories: readonly ["data", "status"];
861
+ readonly height: 512;
862
+ readonly svgPathData: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm56-160c0-14.4-5.4-27.5-14.4-37.5l60.5-145.3c5.1-12.2-.7-26.3-12.9-31.4s-26.3 .7-31.4 12.9L253.3 296.1c-29.7 1.4-53.3 25.9-53.3 55.9 0 30.9 25.1 56 56 56s56-25.1 56-56z";
863
+ readonly width: 512;
864
+ };
844
865
  readonly gear: {
845
866
  readonly aliases: readonly ["settings", "preferences", "config"];
846
867
  readonly categories: readonly ["actions", "objects"];
@@ -1689,7 +1710,7 @@ export declare const iconData: {
1689
1710
  readonly width: 374;
1690
1711
  };
1691
1712
  };
1692
- export declare const iconList: readonly ["angleDown", "angleLeft", "angleRight", "anglesDown", "anglesLeft", "anglesRight", "anglesUp", "angleUp", "arrowDownToLine", "arrowDownWideShort", "arrowLeft", "arrowRight", "arrowRightArrowLeft", "arrowsRetweet", "arrowUpShortWide", "asterisk", "banBug", "bars", "barsFilter", "barsStaggered", "bell", "billboard", "bitbucket", "bluesky", "bolt", "boltPantheon", "boltSolid", "book", "bookmark", "bookmarkSolid", "books", "box", "bracketRight", "bracketsSquare", "brainCircuit", "broomWide", "building", "buildings", "bullhorn", "calendarDays", "caretDown", "caretLeft", "caretRight", "caretUp", "ccAmex", "ccApplePay", "ccDiscover", "ccGeneric", "ccMC", "ccPaypal", "ccVisa", "chartLine", "chartNetwork", "chartSimple", "check", "circle", "circleCheck", "circleExclamation", "circleExclamationSolid", "circleHalfStroke", "circleInfo", "circleInfoSolid", "circleMinus", "circleNotch", "circlePlus", "circleQuestion", "circleQuestionSolid", "circleUser", "circleXmark", "claude", "clock", "cloud", "cloudArrowDown", "cloudArrowUp", "cloudPlus", "code", "codeBranch", "codeMerge", "collapseToCenter", "command", "comment", "compress", "copy", "desktop", "diagramVenn", "diamondExclamation", "diamonds4", "discourse", "display", "dollarSign", "download", "drupal", "ellipsis", "ellipsisVertical", "emptySet", "envelope", "envelopeOpen", "exclamation", "expand", "expandFromCenter", "externalLink", "eye", "eyeSlash", "facebook", "file", "fileCheck", "fileContract", "fileCSV", "fileDiff", "fileExport", "fileImport", "fileLines", "filePDF", "files", "fileZip", "floppyDisk", "folder", "folders", "folderTree", "gear", "gem", "github", "gitlab", "globe", "graduationCap", "grid", "grid2", "gripDots", "gripDotsVertical", "handWave", "heart", "heartSolid", "house", "idCard", "image", "inputText", "instagram", "keySkeleton", "landmark", "laptop", "laptopCode", "leaf", "lifeRing", "link", "linkedin", "list", "listCheck", "locationCrosshairs", "lock", "lockOpen", "magnifyingGlass", "medal", "memo", "messages", "minus", "moon", "move", "nextJs", "octagonExclamation", "openai", "paperclip", "paperPlane", "pause", "pen", "penField", "penPaintbrush", "phone", "play", "plus", "question", "quotesLeft", "quotesRight", "rectangleList", "rectanglesMixed", "reply", "robot", "rocketLaunch", "rotate", "rotateClock", "rotateLeft", "rotateRight", "rss", "save", "server", "shareNodes", "shield", "shieldQuartered", "shovel", "sidebar", "siren", "sirenOn", "sitemap", "slack", "slashForward", "slider", "slidersSimple", "snowflake", "sparkles", "sparklesSolid", "squareCheck", "squareCode", "squareDashed", "squareMinus", "squarePen", "squareQuestion", "squareTerminal", "star", "starSolid", "sun", "sunBright", "table", "tableColumns", "tableRows", "terminal", "text", "threads", "thumbsDown", "thumbsUp", "trash", "triangleExclamation", "twitter", "unlink", "upload", "user", "userAstronaut", "userGear", "userPlus", "users", "userSolid", "video", "wavePulse", "windowRestore", "wordpress", "wreathLaurel", "wrench", "xmark", "xmarkLarge", "xTwitter", "youtube", "zappy"];
1713
+ export declare const iconList: readonly ["angleDown", "angleLeft", "angleRight", "anglesDown", "anglesLeft", "anglesRight", "anglesUp", "angleUp", "arrowDownToLine", "arrowDownWideShort", "arrowLeft", "arrowRight", "arrowRightArrowLeft", "arrowsRetweet", "arrowUpShortWide", "asterisk", "badgePercent", "banBug", "bars", "barsFilter", "barsStaggered", "bell", "billboard", "bitbucket", "bluesky", "bolt", "boltPantheon", "boltSolid", "book", "bookmark", "bookmarkSolid", "books", "box", "bracketRight", "bracketsSquare", "brainCircuit", "broomWide", "building", "buildings", "bullhorn", "calendarDays", "caretDown", "caretLeft", "caretRight", "caretUp", "ccAmex", "ccApplePay", "ccDiscover", "ccGeneric", "ccMC", "ccPaypal", "ccVisa", "chartLine", "chartNetwork", "chartSimple", "check", "circle", "circleCheck", "circleDollar", "circleExclamation", "circleExclamationSolid", "circleHalfStroke", "circleInfo", "circleInfoSolid", "circleMinus", "circleNotch", "circlePlus", "circleQuestion", "circleQuestionSolid", "circleUser", "circleXmark", "claude", "clock", "cloud", "cloudArrowDown", "cloudArrowUp", "cloudPlus", "code", "codeBranch", "codeMerge", "collapseToCenter", "command", "comment", "compress", "copy", "desktop", "diagramVenn", "diamondExclamation", "diamonds4", "discourse", "display", "dollarSign", "download", "drupal", "ellipsis", "ellipsisVertical", "emptySet", "envelope", "envelopeOpen", "exclamation", "expand", "expandFromCenter", "externalLink", "eye", "eyeSlash", "facebook", "file", "fileCheck", "fileContract", "fileCSV", "fileDiff", "fileExport", "fileImport", "fileLines", "filePDF", "files", "fileZip", "floppyDisk", "folder", "folders", "folderTree", "gaugeSimpleHigh", "gear", "gem", "github", "gitlab", "globe", "graduationCap", "grid", "grid2", "gripDots", "gripDotsVertical", "handWave", "heart", "heartSolid", "house", "idCard", "image", "inputText", "instagram", "keySkeleton", "landmark", "laptop", "laptopCode", "leaf", "lifeRing", "link", "linkedin", "list", "listCheck", "locationCrosshairs", "lock", "lockOpen", "magnifyingGlass", "medal", "memo", "messages", "minus", "moon", "move", "nextJs", "octagonExclamation", "openai", "paperclip", "paperPlane", "pause", "pen", "penField", "penPaintbrush", "phone", "play", "plus", "question", "quotesLeft", "quotesRight", "rectangleList", "rectanglesMixed", "reply", "robot", "rocketLaunch", "rotate", "rotateClock", "rotateLeft", "rotateRight", "rss", "save", "server", "shareNodes", "shield", "shieldQuartered", "shovel", "sidebar", "siren", "sirenOn", "sitemap", "slack", "slashForward", "slider", "slidersSimple", "snowflake", "sparkles", "sparklesSolid", "squareCheck", "squareCode", "squareDashed", "squareMinus", "squarePen", "squareQuestion", "squareTerminal", "star", "starSolid", "sun", "sunBright", "table", "tableColumns", "tableRows", "terminal", "text", "threads", "thumbsDown", "thumbsUp", "trash", "triangleExclamation", "twitter", "unlink", "upload", "user", "userAstronaut", "userGear", "userPlus", "users", "userSolid", "video", "wavePulse", "windowRestore", "wordpress", "wreathLaurel", "wrench", "xmark", "xmarkLarge", "xTwitter", "youtube", "zappy"];
1693
1714
  export type PDSIconName = (typeof iconList)[number];
1694
1715
  export declare const categoryList: readonly ["actions", "arrows", "brands", "communication", "custom", "data", "development", "documents", "financial", "media", "navigation", "objects", "security", "status", "users"];
1695
1716
  export type IconCategory = (typeof categoryList)[number];
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generated by: npm run generate:illustration-data
5
5
  * Source: illustration-registry.ts + illustrations/*.svg
6
- * Generated: 2026-11-02T19:18:21.420Z
6
+ * Generated: 2026-11-05T20:09:05.514Z
7
7
  */
8
8
  import React from 'react';
9
9
  export interface IllustrationData {
@@ -1,11 +1,25 @@
1
1
  import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
2
- import { StatusType } from '../../../libs/types/custom-types.js';
2
+ import { AgenticIcon, StatusType } from '../../../libs/types/custom-types.js';
3
3
  import { Button } from '../../buttons/Button/Button.js';
4
4
  import { PDSIcon } from '../../icons/Icon/Icon.js';
5
5
  import './section-message.css';
6
- export type SectionMessageType = StatusType;
7
- type TypeLabels = Record<SectionMessageType, string>;
6
+ export type SectionMessageType = StatusType | 'agentic';
7
+ export type SectionMessageBackground = 'default' | 'secondary';
8
+ type TypeLabels = Record<StatusType, string> & {
9
+ agentic?: string;
10
+ };
8
11
  export interface SectionMessageProps extends ComponentPropsWithoutRef<'div'> {
12
+ /**
13
+ * Icon inside the agent avatar of the `agentic` type: `zappy` for Pantheon
14
+ * agents, `sparklesSolid` for other (third-party) agents. Ignored for other
15
+ * types.
16
+ */
17
+ agenticIconName?: AgenticIcon;
18
+ /**
19
+ * Fill color of the `agentic` type. Use `secondary` on a default-colored
20
+ * surface so the message stands out. Ignored for other types.
21
+ */
22
+ background?: SectionMessageBackground;
9
23
  /**
10
24
  * Optional leading icon for the title badge. Only shown when `badgeLabel`
11
25
  * is also set.
@@ -13,7 +27,7 @@ export interface SectionMessageProps extends ComponentPropsWithoutRef<'div'> {
13
27
  badgeIcon?: PDSIcon;
14
28
  /**
15
29
  * Optional badge text shown beside the title. Requires `title`. The badge
16
- * color always matches `type`.
30
+ * color matches `type`, except for `agentic`, which uses a neutral color.
17
31
  */
18
32
  badgeLabel?: string;
19
33
  /**
@@ -65,12 +79,13 @@ export interface SectionMessageProps extends ComponentPropsWithoutRef<'div'> {
65
79
  */
66
80
  type: SectionMessageType;
67
81
  /**
68
- * Message type labels. Provide translation strings if needed.
82
+ * Message type labels. Provide translation strings if needed. `agentic` is
83
+ * optional and falls back to its English label.
69
84
  */
70
85
  typeLabels?: TypeLabels;
71
86
  }
72
87
  /**
73
88
  * SectionMessage UI component
74
89
  */
75
- export declare const SectionMessage: ({ badgeIcon, badgeLabel, className, ctaButton, ctaIcon, dismissLabel, id, isDismissible, message, onDismiss, secondaryCta, title, type, typeLabels, ...props }: SectionMessageProps) => import("react/jsx-runtime").JSX.Element;
90
+ export declare const SectionMessage: ({ agenticIconName, background, badgeIcon, badgeLabel, className, ctaButton, ctaIcon, dismissLabel, id, isDismissible, message, onDismiss, secondaryCta, title, type, typeLabels, ...props }: SectionMessageProps) => import("react/jsx-runtime").JSX.Element;
76
91
  export {};
@@ -1,6 +1,8 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import { PaddingScale } from '../../../libs/types/layout-types.js';
3
3
  import './panel.css';
4
+ export type PanelAgenticVariant = 'agentic-default' | 'agentic-raised' | 'agentic-sunken';
5
+ export type PanelVariant = PanelAgenticVariant | 'critical' | 'default' | 'discovery' | 'info' | 'overlay' | 'raised' | 'success' | 'sunken' | 'warning';
4
6
  export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
5
7
  /**
6
8
  * Panel content.
@@ -10,16 +12,23 @@ export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
10
12
  * Additional class names
11
13
  */
12
14
  className?: string;
15
+ /**
16
+ * Animate the agentic border while the agent is working. Ignored unless
17
+ * `variant` is an `agentic-*` value. Off for reduced motion.
18
+ */
19
+ isAnimated?: boolean;
13
20
  /**
14
21
  * Padding for the panel.
15
22
  */
16
23
  padding?: PaddingScale;
17
24
  /**
18
- * Which variant of panel to render
25
+ * Which variant of panel to render. The `agentic-*` variants have the fill
26
+ * and shadow of the matching variant (`default`, `raised`, `sunken`) with an
27
+ * AI gradient border, to mark content an agent produced or is acting on.
19
28
  */
20
- variant?: 'default' | 'sunken' | 'raised' | 'overlay' | 'critical' | 'info' | 'warning' | 'success' | 'discovery';
29
+ variant?: PanelVariant;
21
30
  }
22
31
  /**
23
32
  * Panel UI component
24
33
  */
25
- export declare const Panel: ({ children, className, padding, variant, ...props }: PanelProps) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const Panel: ({ children, className, isAnimated, padding, variant, ...props }: PanelProps) => import("react/jsx-runtime").JSX.Element;
@@ -68,4 +68,4 @@
68
68
  --pds-color-button-reverse-secondary-foreground
69
69
  );--button-border-color:var(--pds-color-button-reverse-secondary-border);--button-border-color-hover:var(--pds-color-button-reverse-secondary-border);--button-border-color-active:var(
70
70
  --pds-color-button-reverse-secondary-border
71
- )}.pds-button--link{background-color:transparent;border:none;border-radius:0;color:var(--pds-color-interactive-link-default);height:unset;justify-content:unset;letter-spacing:0;max-height:unset;padding:0;transition:var(--pds-animation-transition-button)}.pds-button--link:hover:enabled,a.pds-button--link:hover{color:var(--pds-color-interactive-link-hover);text-decoration:underline}.pds-button--link:active:enabled,a.pds-button--link:active{box-shadow:none;color:var(--pds-color-interactive-link-active)}.pds-button--link .pds-button-link__icon,.pds-button--link .pds-button__icon{transform:scale(.9)}.pds-button--loading{cursor:not-allowed}.pds-button--loading:active,.pds-button--loading:hover:enabled{--button-background-color:var(--pulse-regular-base-color);--button-border-color:var(--pulse-regular-base-color)}.pds-button--loading.pds-pulse{background-color:var(--pulse-regular-base-color);border-color:var(--pulse-regular-base-color);color:transparent}.pds-button--loading .pds-button__icon,.pds-button--loading .pds-button__tally,.pds-button--loading .pds-button__working-indicator{opacity:0}.pds-button-group{display:flex;flex-direction:column;row-gap:var(--pds-spacing-m);width:100%}.pds-button-group--inline{column-gap:var(--pds-spacing-s);flex-direction:row;flex-wrap:wrap;row-gap:var(--pds-spacing-s);width:unset}@media(min-width:768px){.pds-button-group{column-gap:var(--pds-spacing-s);flex-direction:row;width:unset}.pds-button-group--l{column-gap:var(--pds-spacing-m)}}}
71
+ )}.pds-button--link{background-color:transparent;border:none;border-radius:0;color:var(--pds-color-interactive-link-default);height:unset;justify-content:unset;letter-spacing:0;max-height:unset;padding:0;transition:var(--pds-animation-transition-button)}.pds-button--link:hover:enabled,a.pds-button--link:hover{color:var(--pds-color-interactive-link-hover);text-decoration:underline}.pds-button--link:active:enabled,a.pds-button--link:active{box-shadow:none;color:var(--pds-color-interactive-link-active)}.pds-button--link .pds-button-link__icon,.pds-button--link .pds-button__icon{transform:scale(.9)}.pds-button--loading{cursor:not-allowed}.pds-button--loading:active,.pds-button--loading:hover:enabled{--button-background-color:var(--pulse-regular-base-color);--button-border-color:var(--pulse-regular-base-color)}.pds-button--loading.pds-pulse{background-color:var(--pulse-regular-base-color);border-color:var(--pulse-regular-base-color);color:transparent}.pds-button--loading .pds-button__icon,.pds-button--loading .pds-button__tally,.pds-button--loading .pds-button__working-indicator{opacity:0}.pds-button-group{display:flex;flex-direction:column;row-gap:var(--pds-spacing-m);width:100%}.pds-button-group--inline{column-gap:var(--pds-spacing-s);flex-direction:row;flex-wrap:wrap;row-gap:var(--pds-spacing-s);width:unset}.pds-button-group:not(.pds-button-group--inline) .pds-tooltip,.pds-button-group:not(.pds-button-group--inline) .pds-tooltip__trigger-custom{display:flex;width:100%}.pds-button-group:not(.pds-button-group--inline) .pds-tooltip__trigger-custom .pds-button{flex:1}@media(min-width:768px){.pds-button-group{column-gap:var(--pds-spacing-s);flex-direction:row;width:unset}.pds-button-group:not(.pds-button-group--inline) .pds-tooltip{display:inline-flex;width:unset}.pds-button-group:not(.pds-button-group--inline) .pds-tooltip__trigger-custom{display:revert;width:unset}.pds-button-group:not(.pds-button-group--inline) .pds-tooltip__trigger-custom .pds-button{flex:unset}.pds-button-group--l{column-gap:var(--pds-spacing-m)}}}
@@ -1 +1 @@
1
- @layer pds-v1, pds-v2;@layer pds-v2{.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-foreground-default);text-decoration:none}.pds-dropdown-menu__heading a:hover{color:var(--pds-color-interactive-foreground-hover)}.pds-dropdown-menu__trigger{align-items:center;background-color:var(--pds-color-surface-default);border:var(--pds-border-width-default) solid var(--pds-color-border-input);border-radius:var(--pds-border-radius-input);color:var(--pds-color-foreground-default);cursor:pointer;display:flex;font-size:var(--pds-typography-size-s);height:var(--pds-spacing-input-height-s);justify-content:space-between;padding-inline:var(--pds-spacing-xs);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-foreground-default-secondary);transition:var(--pds-animation-transition-rotation)}.pds-dropdown-menu__trigger[aria-expanded=true] .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}.pds-dropdown-menu__dropdown .pds-dropdown__item>a{align-items:center;color:inherit;display:flex;flex:1;gap:var(--pds-spacing-2xs);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{align-items:center;display:flex;gap:var(--pds-spacing-2xs)}.pds-dropdown-menu__separator{background-color:var(--pds-color-border-default);block-size:1px;margin-block:token("spacing.XS" to rem);pointer-events:none}}
1
+ @layer pds-v1, pds-v2;@layer pds-v2{.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-foreground-default);text-decoration:none}.pds-dropdown-menu__heading a:hover{color:var(--pds-color-interactive-foreground-hover)}.pds-dropdown-menu__trigger{align-items:center;background-color:var(--pds-color-surface-default);border:var(--pds-border-width-default) solid var(--pds-color-border-input);border-radius:var(--pds-border-radius-input);color:var(--pds-color-foreground-default);cursor:pointer;display:flex;font-size:var(--pds-typography-size-s);height:var(--pds-spacing-input-height-s);justify-content:space-between;padding-inline:var(--pds-spacing-xs);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-foreground-default-secondary);transition:var(--pds-animation-transition-rotation)}.pds-dropdown-menu__trigger[aria-expanded=true] .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}.pds-dropdown-menu__dropdown .pds-dropdown__item>a{align-items:center;color:inherit;display:flex;flex:1;gap:var(--pds-spacing-2xs);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{align-items:center;display:flex;gap:var(--pds-spacing-2xs)}.pds-dropdown-menu__separator{background-color:var(--pds-color-border-default);block-size:1px;margin-block:var(--pds-spacing-xs);pointer-events:none}}