@stackone/malachite 2.103.0 → 2.105.0

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/COMPONENTS.md CHANGED
@@ -117,9 +117,11 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
117
117
  ## Data display
118
118
 
119
119
  - **`LevelMeter`** — Rising bars, shortest first, that picture how much of a scale is on — an access level in a level menu or on a level chip. Each step is `on` (a solid accent-green bar), `partial` (a green outline over a faint tint, for a step only some of whose actions are on) or `off` (an empty grey outline); every step keeps 3:1 against the surface, and colours come from the theme. Styled inline so it still draws inside an `ActionMenu`, which portals outside the shadow root and its stylesheet. Beside text that already names the level it is decorative and hidden from assistive tech; give it a `label` only when it stands alone and it reads as an image of that name. As an `ActionMenu` item `icon` or a `Button` `icon`, leave `label` off: the icon joins the item name, and the text already says the level. _Key props:_ `steps` (`LevelMeterStep[]`: `on` | `partial` | `off`), `label`, `className`.
120
+ - **`Hexagon`** — A filled hexagon in one status tone, the mark for an outcome as a `LinkCard` `icon` and the unit of a `HexagonScale`. Tones fill from the theme: `neutral` grey (`text.dimmed`), `success` green (`text.success`), `caution` pale amber (`warning.fillMuted`), `warning` amber (`warning.fill`), `error` red (`error.background`, as `TimeBarChart` fills it). `dimmed` draws it at 20% for a step of a scale that is not the current one. Always decorative and hidden from assistive tech, so the text beside it has to name the outcome. Styled inline so it still draws outside the shadow root’s stylesheet. _Key props:_ `tone` (`HexagonTone`: `neutral` | `success` | `caution` | `warning` | `error`; default `neutral`), `size` (`HexagonSize`: `small` 16px | `medium` 18px; default `medium`), `dimmed`, `className`.
121
+ - **`HexagonScale`** — A row of small hexagons, one per step of an ordered scale, with the `current` step at full strength and the rest dimmed to 20%; with no `current` every step is dimmed. Built for a `LinkCard`’s `trailing` slot, where it places an outcome on a scale such as allowed → redacted → monitored → denied. Beside text that already names the step it is decorative and hidden from assistive tech; give it a `label` only when it stands alone and it reads as an image of that name. Styled inline so it still draws inside an `ActionMenu`, which portals outside the shadow root. _Key props:_ `steps` (`HexagonTone[]`, in order), `current` (index of the step drawn at full strength), `label`, `className`.
120
122
  - **`TimeBarChart`** — Counts per time bucket as stacked bars on a UTC axis, the request-volume chart above a log list. Every bucket in `range` takes a slot whether or not it has data, so gaps read as gaps; a zone-less time string is read as UTC. Hover or arrow-key through buckets for a tooltip listing every series and the total; `highlightTime` shades the bucket holding a time from elsewhere on the page, such as the hovered log row. With `onRangeSelect`, dragging across bars reports the whole buckets covered, `end` exclusive so it goes straight back in as `range`, and whether the selection takes in the last bucket. `loading` dims bars already drawn rather than replacing them, and shows a spinner only when there is nothing to dim. Series colours follow the theme’s status tokens by `tone`, and failures always stack above successes whatever order `series` comes in, so position separates them where colour alone might not; a legend names them unless `legend={false}`. A visually hidden table carries the same numbers for screen readers. _Key props:_ `series` (`{ key, label, tone }[]`, stacked by tone with `error` on top; `TimeBarChartTone`: `success` | `error` | `neutral`), `buckets` (`{ start, values }[]`), `interval` (`{ unit, step }`; `TimeBarChartUnit`: `minute` | `hour` | `day` | `week` | `month`), `range` (`end` exclusive, as a selection reports it; at most 2,000 buckets, the newest kept), `TimeBarChartSize` (`small` | `medium` | `large`), `loading`, `error`, `errorTitle`, `errorSubTitle`, `valueLabel`, `legend`, `highlightTime`, `onRangeSelect`, `aria-label`, `aria-labelledby`, `className`, `style`.
121
123
  - **`TimeBarChartSwatch`** — The mark a `TimeBarChart` draws a series in, by its `tone`, for naming the series somewhere other than the chart's legend, such as a count beside the chart standing in for it. It matches the legend and the tooltip, and the bars draw the same colour at 40%; it follows the theme with them. Decorative: the label beside it does the naming. _Key props:_ `tone` (`TimeBarChartTone`).
122
- - **`Timeline`** — A vertical sequence of steps as an ordered list (`Timeline.Item`): a dot on a connecting line, a title, its timing at the right and a free-form body below, such as what happened to one API call. The dot is painted by `tone` from the theme’s text tokens (`neutral` is secondary text, the rest their status colours), or replaced by a decorative `marker` such as the caller’s logo. `stopped` puts an error badge (`stoppedLabel`, default "Stopped here") after the title of the step a flow ended on and paints its dot `error` unless a `tone` is set; the line ends at the last item. `meta` puts facts about a step in one wrapping row under its title, such as `calls` 2 and `status` 200, each label secondary and its value in the mono face, 18px apart, as a `dl`. `skipped` marks a step that never ran with a grey chevron in place of the dot; the title has to say so. For steps a person works through (complete, open, locked) use `StepList`. _Key props:_ `aria-label`, `aria-labelledby`; on `Timeline.Item`: `title`, `time`, `tone` (`TimelineTone`: `neutral` | `info` | `success` | `warning` | `error`), `marker` (fills the 24px circle in place of the ringed dot), `skipped`, `stopped`, `stoppedLabel`, `meta` (`TimelineMetaEntry[]`: `label`, `value`).
124
+ - **`Timeline`** — A vertical sequence of steps as an ordered list (`Timeline.Item`): a dot on a connecting line, a title, its timing at the right and a free-form body below, such as what happened to one API call. `titleCode` sets code after the title in the mono face as one phrase with it, such as `n8n called` then `Salesforce | Delete contact`. The dot is painted by `tone` from the theme’s text tokens (`neutral` is secondary text, the rest their status colours), or replaced by a decorative `marker` such as the caller’s logo. `icon` keeps the ring and draws a 12-14px glyph inside it in place of the dot, painted by `tone`, such as the call’s source type (MCP, API key, webhook); `skipped` beats `marker`, which beats `icon`. `stopped` puts an error badge (`stoppedLabel`, default "Stopped here") after the title of the step a flow ended on and paints its dot `error` unless a `tone` is set; the line ends at the last item. `meta` puts facts about a step in one wrapping row under its title, such as `calls` 2 and `status` 200, each label secondary and its value in the mono face, 18px apart, as a `dl`. `skipped` marks a step that never ran with a grey chevron in place of the dot; the title has to say so. For steps a person works through (complete, open, locked) use `StepList`. _Key props:_ `aria-label`, `aria-labelledby`; on `Timeline.Item`: `title`, `titleCode`, `time`, `tone` (`TimelineTone`: `neutral` | `info` | `success` | `warning` | `error`), `marker` (fills the 24px circle in place of the ringed dot), `icon` (a glyph inside the ring, painted by `tone`), `skipped`, `stopped`, `stoppedLabel`, `meta` (`TimelineMetaEntry[]`: `label`, `value`).
123
125
  - **`Table`** — Data table with columns, sizing, pagination and row selection. `column.align` places a column's header as well as its cells. What lands on the aligned edge is the last thing in the header row rather than the title: the sort caret on a sortable column, the info icon on one carrying `info` without a sorter. `headerVariant` picks the header layout, and only `inline` lines header and body up exactly, because both are cells of one `<table>`. `detached` builds them from flex rows, where a sortable header cell is 32px narrower than a non-sortable one — its padding sits on the inner button rather than on the flex item — so its header cells sit 15–17px off their column at any alignment; reach for `inline` where exact alignment matters. Sorting is internal, so the array passed as `data` is not the order rendered once a column is sorted: `onVisibleOrderChange` reports the rows in render order — the whole of `data`, compared by `rowKey` so an equal order never re-fires — for a consumer stepping a master-detail view the way the user sees it. On the detached header, `title`, `subtitle` and `extra` add a title row on the frame above the column headers, the row a `framed` `Card` draws, and it docks with them under `stickyHeaderTop` (with `showHeader={false}` nothing docks and it scrolls with the rows). The inline header has no frame, so it draws none of the three and warns in development. _Key props:_ `TableColumns` (incl. `align`), `TableSize`, `TableType`, `TableRowSelection`, `TablePaginationPosition` (`pagination.position`, in antd naming: a pager on each edge named, aligned as named, 16px from the rows; bottom right by default), `headerVariant`, `title`, `subtitle`, `extra`, `onVisibleOrderChange`, `scrollHeight` (a height, or `"fill"` for the room left in its scroller once the content above and below it fits, so the page itself never scrolls).
124
126
  - **`Statistic`** — Displays a statistic value with a label; primary/secondary sizes. _Key props:_ `StatisticValueSize`.
125
127
  - **`Avatar`** — Logo/initial avatar. Renders the image when available, otherwise a coloured tile with the first letter of `name`, or with `fallback="placeholder"` the generic "no logo available" tile. Encapsulates the fallback colour. _Key props:_ `src`, `name`, `size`, `shape="square" | "circle"`, `fallback="initial" | "placeholder"`.
@@ -0,0 +1,36 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const t = { small: 16, medium: 18 }, c = 0.2, n = {
3
+ neutral: "var(--malachite-text-dimmed, rgb(161, 161, 161))",
4
+ success: "var(--malachite-text-success, rgb(2, 122, 66))",
5
+ caution: "var(--malachite-warning-fill-muted, rgb(227, 196, 143))",
6
+ warning: "var(--malachite-warning-fill, rgb(201, 138, 46))",
7
+ error: "var(--malachite-error-background, rgb(197, 63, 63))"
8
+ }, s = ({
9
+ tone: a = "neutral",
10
+ size: r = "medium",
11
+ dimmed: l = !1,
12
+ className: i
13
+ }) => /* @__PURE__ */ e(
14
+ "svg",
15
+ {
16
+ width: t[r],
17
+ height: t[r],
18
+ viewBox: "0 0 24 24",
19
+ fill: "currentColor",
20
+ "aria-hidden": "true",
21
+ "data-tone": a,
22
+ className: i,
23
+ style: {
24
+ display: "block",
25
+ flexShrink: 0,
26
+ color: n[a],
27
+ opacity: l ? c : 1
28
+ },
29
+ children: /* @__PURE__ */ e("path", { d: "M12 2.5l8.2 4.75v9.5L12 21.5l-8.2-4.75v-9.5z" })
30
+ }
31
+ );
32
+ export {
33
+ s as Hexagon,
34
+ s as default
35
+ };
36
+ //# sourceMappingURL=Hexagon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hexagon.js","sources":["../../src/components/Hexagon.tsx"],"sourcesContent":["import type React from 'react';\n\nexport type HexagonTone = 'neutral' | 'success' | 'caution' | 'warning' | 'error';\nexport type HexagonSize = 'small' | 'medium';\n\nexport interface HexagonProps {\n tone?: HexagonTone;\n /** `small` is 16px, `medium` 18px. */\n size?: HexagonSize;\n /** Draws it at 20% strength, for a step of a scale that isn't the current one. */\n dimmed?: boolean;\n className?: string;\n}\n\nconst SIZES: Record<HexagonSize, number> = { small: 16, medium: 18 };\nconst DIMMED_OPACITY = 0.2;\n\n// `error` fills from `error-background`, as TimeBarChart's TONE_FILL does; `text-error` is\n// the brighter text red.\nconst TONE_FILL: Record<HexagonTone, string> = {\n neutral: 'var(--malachite-text-dimmed, rgb(161, 161, 161))',\n success: 'var(--malachite-text-success, rgb(2, 122, 66))',\n caution: 'var(--malachite-warning-fill-muted, rgb(227, 196, 143))',\n warning: 'var(--malachite-warning-fill, rgb(201, 138, 46))',\n error: 'var(--malachite-error-background, rgb(197, 63, 63))',\n};\n\n// Inline, not Tailwind: menus portal outside the shadow root's stylesheet. The fill rides on\n// `color` because the shadow root's `svg path` rule forces paths to `currentColor`.\nexport const Hexagon: React.FC<HexagonProps> = ({\n tone = 'neutral',\n size = 'medium',\n dimmed = false,\n className,\n}) => (\n <svg\n width={SIZES[size]}\n height={SIZES[size]}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n data-tone={tone}\n className={className}\n style={{\n display: 'block',\n flexShrink: 0,\n color: TONE_FILL[tone],\n opacity: dimmed ? DIMMED_OPACITY : 1,\n }}\n >\n <path d=\"M12 2.5l8.2 4.75v9.5L12 21.5l-8.2-4.75v-9.5z\" />\n </svg>\n);\n\nexport default Hexagon;\n"],"names":["SIZES","DIMMED_OPACITY","TONE_FILL","Hexagon","tone","size","dimmed","className","jsx"],"mappings":";AAcA,MAAMA,IAAqC,EAAE,OAAO,IAAI,QAAQ,GAAA,GAC1DC,IAAiB,KAIjBC,IAAyC;AAAA,EAC3C,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACX,GAIaC,IAAkC,CAAC;AAAA,EAC5C,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,QAAAC,IAAS;AAAA,EACT,WAAAC;AACJ,MACI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,OAAOR,EAAMK,CAAI;AAAA,IACjB,QAAQL,EAAMK,CAAI;AAAA,IAClB,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,eAAY;AAAA,IACZ,aAAWD;AAAA,IACX,WAAAG;AAAA,IACA,OAAO;AAAA,MACH,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,OAAOL,EAAUE,CAAI;AAAA,MACrB,SAASE,IAASL,IAAiB;AAAA,IAAA;AAAA,IAGvC,UAAA,gBAAAO,EAAC,QAAA,EAAK,GAAE,+CAAA,CAA+C;AAAA,EAAA;AAC3D;"}
@@ -0,0 +1,18 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Hexagon as n } from "./Hexagon.js";
3
+ const d = ({ steps: r, current: o, label: e, className: l }) => /* @__PURE__ */ a(
4
+ "span",
5
+ {
6
+ role: e ? "img" : void 0,
7
+ "aria-label": e,
8
+ "aria-hidden": e ? void 0 : !0,
9
+ className: l,
10
+ style: { display: "inline-flex", flexShrink: 0, alignItems: "center", gap: 2 },
11
+ children: r.map((m, i) => /* @__PURE__ */ a(n, { tone: m, size: "small", dimmed: i !== o }, i))
12
+ }
13
+ );
14
+ export {
15
+ d as HexagonScale,
16
+ d as default
17
+ };
18
+ //# sourceMappingURL=HexagonScale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HexagonScale.js","sources":["../../src/components/HexagonScale.tsx"],"sourcesContent":["import type React from 'react';\nimport Hexagon, { type HexagonTone } from './Hexagon';\n\nexport interface HexagonScaleProps {\n /** One hexagon per step, in order. */\n steps: readonly HexagonTone[];\n /** Index of the step drawn at full strength; the rest are dimmed. Omit to dim them all. */\n current?: number;\n /** Only when it stands alone; beside text naming the step it is decorative. */\n label?: string;\n className?: string;\n}\n\n// Inline, not Tailwind: menus portal outside the shadow root's stylesheet.\nexport const HexagonScale: React.FC<HexagonScaleProps> = ({ steps, current, label, className }) => (\n <span\n role={label ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label ? undefined : true}\n className={className}\n style={{ display: 'inline-flex', flexShrink: 0, alignItems: 'center', gap: 2 }}\n >\n {steps.map((tone, index) => (\n <Hexagon key={index} tone={tone} size=\"small\" dimmed={index !== current} />\n ))}\n </span>\n);\n\nexport default HexagonScale;\n"],"names":["HexagonScale","steps","current","label","className","jsx","tone","index","Hexagon"],"mappings":";;AAcO,MAAMA,IAA4C,CAAC,EAAE,OAAAC,GAAO,SAAAC,GAAS,OAAAC,GAAO,WAAAC,QAC/E,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,MAAMF,IAAQ,QAAQ;AAAA,IACtB,cAAYA;AAAA,IACZ,eAAaA,IAAQ,SAAY;AAAA,IACjC,WAAAC;AAAA,IACA,OAAO,EAAE,SAAS,eAAe,YAAY,GAAG,YAAY,UAAU,KAAK,EAAA;AAAA,IAE1E,UAAAH,EAAM,IAAI,CAACK,GAAMC,MACd,gBAAAF,EAACG,GAAA,EAAoB,MAAAF,GAAY,MAAK,SAAQ,QAAQC,MAAUL,EAAA,GAAlDK,CAA2D,CAC5E;AAAA,EAAA;AACL;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkCard.js","sources":["../../src/components/LinkCard.tsx"],"sourcesContent":["import type React from 'react';\nimport ForwardArrowIcon from './CustomIcons/ForwardArrowIcon';\nimport EllipsisText from './Typography/EllipsisText';\nimport Text from './Typography/Text';\nimport { devWarning } from './devWarning';\nimport { FOCUS_RING } from './focusRing';\nimport { isRenderableNode } from './renderableNode';\nimport { safeHref } from './safeHref';\n\nexport type LinkCardTone = 'neutral' | 'success' | 'warning' | 'error';\n\nexport interface LinkCardProps {\n title: string;\n /** One line under the title; truncated text shows in full on hover. */\n description?: string;\n /** Colours the title. */\n tone?: LinkCardTone;\n /** Decorative, before the title. Coloured paths need `data-malachite-shape`. */\n icon?: React.ReactNode;\n /** Decorative content before the action, e.g. a level scale. Must not be interactive. */\n trailing?: React.ReactNode;\n actionLabel?: string;\n onClick?: (event: React.MouseEvent<HTMLElement>) => void;\n /** Renders a link instead of a button; unsafe schemes are dropped. */\n href?: string;\n className?: string;\n}\n\nconst TITLE_COLOR = {\n neutral: 'primary',\n success: 'success',\n warning: 'warning',\n error: 'error',\n} as const;\n\nconst CARD_CLASSES =\n 'flex w-full items-center gap-[12px] rounded-[var(--malachite-radius-10,10px)] border border-solid border-[var(--malachite-card-border,rgb(232,232,232))] bg-[var(--malachite-card-background,rgb(255,255,255))] px-[12px] py-[10px] text-start text-[var(--malachite-text-primary,rgb(10,10,10))] no-underline';\n\nconst INTERACTIVE_CLASSES = `cursor-pointer transition-colors hover:border-[var(--malachite-secondary-border-hover,rgb(186,186,186))] hover:bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))] ${FOCUS_RING}`;\n\n/** A compact card that opens more detail elsewhere, such as another tab of a panel. */\nconst LinkCard: React.FC<LinkCardProps> = ({\n title,\n description,\n tone = 'neutral',\n icon,\n trailing,\n actionLabel = 'Open',\n onClick,\n href: rawHref,\n className = '',\n}) => {\n const href = safeHref(rawHref);\n if (rawHref && !href) {\n devWarning(\n `LinkCard.href:${rawHref}`,\n `LinkCard dropped the unsafe href \"${rawHref}\"; without an onClick it is a static card.`,\n );\n }\n const interactive = Boolean(href || onClick);\n const body = (\n <>\n {isRenderableNode(icon) && (\n <span aria-hidden=\"true\" className=\"flex flex-none items-center\">\n {icon}\n </span>\n )}\n <span className=\"flex min-w-0 flex-1 flex-col gap-[1px] leading-[15px]\">\n <Text\n size=\"small\"\n fontWeight=\"bold\"\n color={TITLE_COLOR[tone]}\n className=\"leading-[17px]\"\n >\n {title}\n </Text>\n {description && (\n <EllipsisText\n size=\"xsmall\"\n color=\"secondary\"\n tooltip={description}\n tooltipWhenTruncated\n inline\n >\n {description}\n </EllipsisText>\n )}\n </span>\n {isRenderableNode(trailing) && (\n <span aria-hidden=\"true\" className=\"flex flex-none items-center\">\n {trailing}\n </span>\n )}\n {interactive && (\n <span className=\"flex flex-none items-center gap-[3px] text-[var(--malachite-accent-foreground,rgb(2,122,66))]\">\n <Text size=\"xsmall\" fontWeight=\"semi-bold\" color=\"inherit\" wrap={false}>\n {actionLabel}\n </Text>\n <span aria-hidden=\"true\" className=\"flex\">\n <ForwardArrowIcon size={12} />\n </span>\n </span>\n )}\n </>\n );\n if (href) {\n return (\n <a\n href={href}\n onClick={onClick}\n className={`${CARD_CLASSES} ${INTERACTIVE_CLASSES} ${className}`}\n >\n {body}\n </a>\n );\n }\n if (onClick) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className={`m-0 appearance-none font-[inherit] ${CARD_CLASSES} ${INTERACTIVE_CLASSES} ${className}`}\n >\n {body}\n </button>\n );\n }\n return <div className={`${CARD_CLASSES} ${className}`}>{body}</div>;\n};\n\nexport default LinkCard;\nexport { LinkCard };\n"],"names":["TITLE_COLOR","CARD_CLASSES","INTERACTIVE_CLASSES","FOCUS_RING","LinkCard","title","description","tone","icon","trailing","actionLabel","onClick","rawHref","className","href","safeHref","devWarning","interactive","body","jsxs","Fragment","isRenderableNode","jsx","Text","EllipsisText","ForwardArrowIcon"],"mappings":";;;;;;;;AA4BA,MAAMA,IAAc;AAAA,EAChB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACX,GAEMC,IACF,kTAEEC,IAAsB,qLAAqLC,CAAU,IAGrNC,IAAoC,CAAC;AAAA,EACvC,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,SAAAC;AAAA,EACA,MAAMC;AAAA,EACN,WAAAC,IAAY;AAChB,MAAM;AACF,QAAMC,IAAOC,EAASH,CAAO;AAC7B,EAAIA,KAAW,CAACE,KACZE;AAAA,IACI,iBAAiBJ,CAAO;AAAA,IACxB,qCAAqCA,CAAO;AAAA,EAAA;AAGpD,QAAMK,IAAc,GAAQH,KAAQH,IAC9BO,IACF,gBAAAC,EAAAC,GAAA,EACK,UAAA;AAAA,IAAAC,EAAiBb,CAAI,KAClB,gBAAAc,EAAC,QAAA,EAAK,eAAY,QAAO,WAAU,+BAC9B,UAAAd,EAAA,CACL;AAAA,IAEJ,gBAAAW,EAAC,QAAA,EAAK,WAAU,yDACZ,UAAA;AAAA,MAAA,gBAAAG;AAAA,QAACC;AAAA,QAAA;AAAA,UACG,MAAK;AAAA,UACL,YAAW;AAAA,UACX,OAAOvB,EAAYO,CAAI;AAAA,UACvB,WAAU;AAAA,UAET,UAAAF;AAAA,QAAA;AAAA,MAAA;AAAA,MAEJC,KACG,gBAAAgB;AAAA,QAACE;AAAA,QAAA;AAAA,UACG,MAAK;AAAA,UACL,OAAM;AAAA,UACN,SAASlB;AAAA,UACT,sBAAoB;AAAA,UACpB,QAAM;AAAA,UAEL,UAAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACL,GAER;AAAA,IACCe,EAAiBZ,CAAQ,KACtB,gBAAAa,EAAC,UAAK,eAAY,QAAO,WAAU,+BAC9B,UAAAb,EAAA,CACL;AAAA,IAEHQ,KACG,gBAAAE,EAAC,QAAA,EAAK,WAAU,iGACZ,UAAA;AAAA,MAAA,gBAAAG,EAACC,GAAA,EAAK,MAAK,UAAS,YAAW,aAAY,OAAM,WAAU,MAAM,IAC5D,UAAAb,EAAA,CACL;AAAA,MACA,gBAAAY,EAAC,QAAA,EAAK,eAAY,QAAO,WAAU,QAC/B,UAAA,gBAAAA,EAACG,GAAA,EAAiB,MAAM,GAAA,CAAI,EAAA,CAChC;AAAA,IAAA,EAAA,CACJ;AAAA,EAAA,GAER;AAEJ,SAAIX,IAEI,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,MAAAR;AAAA,MACA,SAAAH;AAAA,MACA,WAAW,GAAGV,CAAY,IAAIC,CAAmB,IAAIW,CAAS;AAAA,MAE7D,UAAAK;AAAA,IAAA;AAAA,EAAA,IAITP,IAEI,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,MAAK;AAAA,MACL,SAAAX;AAAA,MACA,WAAW,sCAAsCV,CAAY,IAAIC,CAAmB,IAAIW,CAAS;AAAA,MAEhG,UAAAK;AAAA,IAAA;AAAA,EAAA,IAIN,gBAAAI,EAAC,SAAI,WAAW,GAAGrB,CAAY,IAAIY,CAAS,IAAK,UAAAK,EAAA,CAAK;AACjE;"}
1
+ {"version":3,"file":"LinkCard.js","sources":["../../src/components/LinkCard.tsx"],"sourcesContent":["import type React from 'react';\nimport ForwardArrowIcon from './CustomIcons/ForwardArrowIcon';\nimport EllipsisText from './Typography/EllipsisText';\nimport Text from './Typography/Text';\nimport { devWarning } from './devWarning';\nimport { FOCUS_RING } from './focusRing';\nimport { isRenderableNode } from './renderableNode';\nimport { safeHref } from './safeHref';\n\nexport type LinkCardTone = 'neutral' | 'success' | 'warning' | 'error';\n\nexport interface LinkCardProps {\n title: string;\n /** One line under the title; truncated text shows in full on hover. */\n description?: string;\n /** Colours the title. */\n tone?: LinkCardTone;\n /**\n * Decorative, before the title. Paths are filled with `currentColor`, so colour one through\n * `color`, as `Hexagon` does; a path keeping its own `fill` needs `data-malachite-shape`.\n */\n icon?: React.ReactNode;\n /** Decorative content before the action, e.g. a level scale. Must not be interactive. */\n trailing?: React.ReactNode;\n actionLabel?: string;\n onClick?: (event: React.MouseEvent<HTMLElement>) => void;\n /** Renders a link instead of a button; unsafe schemes are dropped. */\n href?: string;\n className?: string;\n}\n\nconst TITLE_COLOR = {\n neutral: 'primary',\n success: 'success',\n warning: 'warning',\n error: 'error',\n} as const;\n\nconst CARD_CLASSES =\n 'flex w-full items-center gap-[12px] rounded-[var(--malachite-radius-10,10px)] border border-solid border-[var(--malachite-card-border,rgb(232,232,232))] bg-[var(--malachite-card-background,rgb(255,255,255))] px-[12px] py-[10px] text-start text-[var(--malachite-text-primary,rgb(10,10,10))] no-underline';\n\nconst INTERACTIVE_CLASSES = `cursor-pointer transition-colors hover:border-[var(--malachite-secondary-border-hover,rgb(186,186,186))] hover:bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))] ${FOCUS_RING}`;\n\n/** A compact card that opens more detail elsewhere, such as another tab of a panel. */\nconst LinkCard: React.FC<LinkCardProps> = ({\n title,\n description,\n tone = 'neutral',\n icon,\n trailing,\n actionLabel = 'Open',\n onClick,\n href: rawHref,\n className = '',\n}) => {\n const href = safeHref(rawHref);\n if (rawHref && !href) {\n devWarning(\n `LinkCard.href:${rawHref}`,\n `LinkCard dropped the unsafe href \"${rawHref}\"; without an onClick it is a static card.`,\n );\n }\n const interactive = Boolean(href || onClick);\n const body = (\n <>\n {isRenderableNode(icon) && (\n <span aria-hidden=\"true\" className=\"flex flex-none items-center\">\n {icon}\n </span>\n )}\n <span className=\"flex min-w-0 flex-1 flex-col gap-[1px] leading-[15px]\">\n <Text\n size=\"small\"\n fontWeight=\"bold\"\n color={TITLE_COLOR[tone]}\n className=\"leading-[17px]\"\n >\n {title}\n </Text>\n {description && (\n <EllipsisText\n size=\"xsmall\"\n color=\"secondary\"\n tooltip={description}\n tooltipWhenTruncated\n inline\n >\n {description}\n </EllipsisText>\n )}\n </span>\n {isRenderableNode(trailing) && (\n <span aria-hidden=\"true\" className=\"flex flex-none items-center\">\n {trailing}\n </span>\n )}\n {interactive && (\n <span className=\"flex flex-none items-center gap-[3px] text-[var(--malachite-accent-foreground,rgb(2,122,66))]\">\n <Text size=\"xsmall\" fontWeight=\"semi-bold\" color=\"inherit\" wrap={false}>\n {actionLabel}\n </Text>\n <span aria-hidden=\"true\" className=\"flex\">\n <ForwardArrowIcon size={12} />\n </span>\n </span>\n )}\n </>\n );\n if (href) {\n return (\n <a\n href={href}\n onClick={onClick}\n className={`${CARD_CLASSES} ${INTERACTIVE_CLASSES} ${className}`}\n >\n {body}\n </a>\n );\n }\n if (onClick) {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n className={`m-0 appearance-none font-[inherit] ${CARD_CLASSES} ${INTERACTIVE_CLASSES} ${className}`}\n >\n {body}\n </button>\n );\n }\n return <div className={`${CARD_CLASSES} ${className}`}>{body}</div>;\n};\n\nexport default LinkCard;\nexport { LinkCard };\n"],"names":["TITLE_COLOR","CARD_CLASSES","INTERACTIVE_CLASSES","FOCUS_RING","LinkCard","title","description","tone","icon","trailing","actionLabel","onClick","rawHref","className","href","safeHref","devWarning","interactive","body","jsxs","Fragment","isRenderableNode","jsx","Text","EllipsisText","ForwardArrowIcon"],"mappings":";;;;;;;;AA+BA,MAAMA,IAAc;AAAA,EAChB,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACX,GAEMC,IACF,kTAEEC,IAAsB,qLAAqLC,CAAU,IAGrNC,IAAoC,CAAC;AAAA,EACvC,OAAAC;AAAA,EACA,aAAAC;AAAA,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AA,gBAAAA,EAACG,GAAA,EAAiB,MAAM,GAAA,CAAI,EAAA,CAChC;AAAA,IAAA,EAAA,CACJ;AAAA,EAAA,GAER;AAEJ,SAAIX,IAEI,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,MAAAR;AAAA,MACA,SAAAH;AAAA,MACA,WAAW,GAAGV,CAAY,IAAIC,CAAmB,IAAIW,CAAS;AAAA,MAE7D,UAAAK;AAAA,IAAA;AAAA,EAAA,IAITP,IAEI,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,MAAK;AAAA,MACL,SAAAX;AAAA,MACA,WAAW,sCAAsCV,CAAY,IAAIC,CAAmB,IAAIW,CAAS;AAAA,MAEhG,UAAAK;AAAA,IAAA;AAAA,EAAA,IAIN,gBAAAI,EAAC,SAAI,WAAW,GAAGrB,CAAY,IAAIY,CAAS,IAAK,UAAAK,EAAA,CAAK;AACjE;"}
@@ -1,13 +1,20 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { Tag as b } from "./Tag.js";
3
- import r from "./Typography/Text.js";
4
- const w = {
1
+ import { jsx as e, jsxs as l, Fragment as y } from "react/jsx-runtime";
2
+ import { Tag as N } from "./Tag.js";
3
+ import s from "./Typography/Text.js";
4
+ import { getFontWeight as T, getFontFamily as k } from "./Typography/textStyles.js";
5
+ const f = {
5
6
  neutral: "var(--malachite-text-secondary, rgb(123, 123, 123))",
6
7
  info: "var(--malachite-text-info, rgb(12, 88, 174))",
7
8
  success: "var(--malachite-text-success, rgb(2, 122, 66))",
8
9
  warning: "var(--malachite-text-warning, rgb(150, 88, 10))",
9
10
  error: "var(--malachite-text-error, rgb(237, 53, 54))"
10
- }, u = /* @__PURE__ */ e(
11
+ }, z = {
12
+ fontFamily: k("mono"),
13
+ fontWeight: T("semi-bold"),
14
+ fontSize: "0.92em",
15
+ wordSpacing: "-0.25em",
16
+ marginLeft: "0.08em"
17
+ }, S = /* @__PURE__ */ e(
11
18
  "svg",
12
19
  {
13
20
  "data-timeline-skipped": "",
@@ -28,23 +35,25 @@ const w = {
28
35
  }
29
36
  )
30
37
  }
31
- ), v = ({
32
- title: i,
38
+ ), j = ({
39
+ title: n,
40
+ titleCode: r,
33
41
  time: a,
34
- tone: n,
35
- marker: s,
36
- skipped: p = !1,
37
- stopped: t = !1,
38
- stoppedLabel: o,
39
- meta: d = [],
40
- children: h,
41
- className: f = ""
42
+ tone: t,
43
+ marker: g,
44
+ icon: d,
45
+ skipped: w = !1,
46
+ stopped: o = !1,
47
+ stoppedLabel: c,
48
+ meta: x = [],
49
+ children: b,
50
+ className: u = ""
42
51
  }) => {
43
- const m = n ?? (t ? "error" : "neutral"), x = p ? u : s;
52
+ const i = t ?? (o ? "error" : "neutral"), p = w ? S : g, h = r == null ? void 0 : r.trim();
44
53
  return /* @__PURE__ */ l(
45
54
  "li",
46
55
  {
47
- className: `relative m-0 flex gap-[14px] pb-[40px] last:pb-0 [&:last-child>[data-timeline-line]]:hidden ${f}`,
56
+ className: `relative m-0 flex gap-[14px] pb-[40px] last:pb-0 [&:last-child>[data-timeline-line]]:hidden ${u}`,
48
57
  children: [
49
58
  /* @__PURE__ */ e(
50
59
  "span",
@@ -58,26 +67,40 @@ const w = {
58
67
  "span",
59
68
  {
60
69
  "aria-hidden": "true",
61
- className: `flex h-[24px] w-[24px] flex-none items-center justify-center overflow-hidden rounded-full ${x ? "" : "border border-solid border-[var(--malachite-card-border,rgb(232,232,232))]"}`,
62
- children: x || /* @__PURE__ */ e(
70
+ className: `flex h-[24px] w-[24px] flex-none items-center justify-center overflow-hidden rounded-full ${p ? "" : "border border-solid border-[var(--malachite-card-border,rgb(232,232,232))]"}`,
71
+ children: p || (d ? /* @__PURE__ */ e(
63
72
  "span",
64
73
  {
65
- "data-timeline-dot": m,
74
+ "data-timeline-icon": i,
75
+ className: "flex h-[14px] w-[14px] items-center justify-center overflow-hidden [&>*]:max-h-full [&>*]:max-w-full [&_svg]:max-h-[14px] [&_svg]:max-w-[14px]",
76
+ style: { color: f[i] },
77
+ children: d
78
+ }
79
+ ) : /* @__PURE__ */ e(
80
+ "span",
81
+ {
82
+ "data-timeline-dot": i,
66
83
  className: "h-[8px] w-[8px] rounded-full",
67
- style: { backgroundColor: w[m] }
84
+ style: { backgroundColor: f[i] }
68
85
  }
69
- )
86
+ ))
70
87
  }
71
88
  ),
72
89
  /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col gap-[8px] pt-[2px]", children: [
73
90
  /* @__PURE__ */ l("div", { className: "flex items-start justify-between gap-[12px]", children: [
74
91
  /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-wrap items-center gap-x-[8px] gap-y-[4px] [overflow-wrap:anywhere]", children: [
75
- /* @__PURE__ */ e(r, { size: "small", fontWeight: "bold", className: "min-w-0 leading-[18px]", children: i }),
76
- t && /* @__PURE__ */ e("span", { className: "sr-only", children: ", " }),
77
- t && /* @__PURE__ */ e(
78
- b,
92
+ /* @__PURE__ */ l(s, { size: "small", fontWeight: "bold", className: "min-w-0 leading-[18px]", children: [
93
+ n,
94
+ h && /* @__PURE__ */ l(y, { children: [
95
+ n ? " " : null,
96
+ /* @__PURE__ */ e("span", { translate: "no", style: z, children: h })
97
+ ] })
98
+ ] }),
99
+ o && /* @__PURE__ */ e("span", { className: "sr-only", children: ", " }),
100
+ o && /* @__PURE__ */ e(
101
+ N,
79
102
  {
80
- value: (o == null ? void 0 : o.trim()) || "Stopped here",
103
+ value: (c == null ? void 0 : c.trim()) || "Stopped here",
81
104
  type: "error",
82
105
  fontSize: "xsmall",
83
106
  textTransform: "none",
@@ -87,7 +110,7 @@ const w = {
87
110
  ] }),
88
111
  (a || a === 0) && /* @__PURE__ */ e("span", { className: "sr-only", children: ", " }),
89
112
  (a || a === 0) && /* @__PURE__ */ e(
90
- r,
113
+ s,
91
114
  {
92
115
  size: "xsmall",
93
116
  color: "secondary",
@@ -98,40 +121,40 @@ const w = {
98
121
  }
99
122
  )
100
123
  ] }),
101
- d.length > 0 && /* @__PURE__ */ e("dl", { className: "m-0 flex flex-wrap gap-x-[18px] gap-y-[6px] leading-[16px]", children: d.map((c, g) => /* @__PURE__ */ l(
124
+ x.length > 0 && /* @__PURE__ */ e("dl", { className: "m-0 flex flex-wrap gap-x-[18px] gap-y-[6px] leading-[16px]", children: x.map((m, v) => /* @__PURE__ */ l(
102
125
  "div",
103
126
  {
104
127
  className: "flex min-w-0 items-baseline gap-[3px]",
105
128
  children: [
106
- /* @__PURE__ */ e("dt", { className: "flex", children: /* @__PURE__ */ e(r, { size: "xsmall", color: "secondary", children: c.label }) }),
107
- /* @__PURE__ */ e("dd", { className: "m-0 flex min-w-0 [overflow-wrap:anywhere]", children: /* @__PURE__ */ e(r, { size: "xsmall", font: "mono", children: c.value }) })
129
+ /* @__PURE__ */ e("dt", { className: "flex", children: /* @__PURE__ */ e(s, { size: "xsmall", color: "secondary", children: m.label }) }),
130
+ /* @__PURE__ */ e("dd", { className: "m-0 flex min-w-0 [overflow-wrap:anywhere]", children: /* @__PURE__ */ e(s, { size: "xsmall", font: "mono", children: m.value }) })
108
131
  ]
109
132
  },
110
- `${c.label}-${g}`
133
+ `${m.label}-${v}`
111
134
  )) }),
112
- h
135
+ b
113
136
  ] })
114
137
  ]
115
138
  }
116
139
  );
117
- }, N = ({
118
- children: i,
119
- className: a = "",
120
- "aria-label": n,
121
- "aria-labelledby": s
140
+ }, _ = ({
141
+ children: n,
142
+ className: r = "",
143
+ "aria-label": a,
144
+ "aria-labelledby": t
122
145
  }) => /* @__PURE__ */ e(
123
146
  "ol",
124
147
  {
125
148
  role: "list",
126
- "aria-label": n,
127
- "aria-labelledby": s,
128
- className: `m-0 list-none p-0 ${a}`,
129
- children: i
149
+ "aria-label": a,
150
+ "aria-labelledby": t,
151
+ className: `m-0 list-none p-0 ${r}`,
152
+ children: n
130
153
  }
131
154
  );
132
- N.Item = v;
155
+ _.Item = j;
133
156
  export {
134
- N as Timeline,
135
- N as default
157
+ _ as Timeline,
158
+ _ as default
136
159
  };
137
160
  //# sourceMappingURL=Timeline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.js","sources":["../../src/components/Timeline.tsx"],"sourcesContent":["import React from 'react';\nimport Tag from './Tag';\nimport Text from './Typography/Text';\n\nexport type TimelineTone = 'neutral' | 'info' | 'success' | 'warning' | 'error';\n\nexport interface TimelineProps {\n children: React.ReactNode;\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\nexport interface TimelineMetaEntry {\n label: string;\n value: React.ReactNode;\n}\n\nexport interface TimelineItemProps {\n title: React.ReactNode;\n /** When the step happened, shown at the right of the title, e.g. `+6 ms`. */\n time?: React.ReactNode;\n /**\n * Paints the dot: `error` on a `stopped` step, else `neutral`, unless set. Colour alone, so the\n * title has to say what happened. Ignored when `marker` is set.\n */\n tone?: TimelineTone;\n /** Replaces the ringed dot with a 24px circle of its own, e.g. the caller's logo at size 24. Decorative: hidden from assistive tech. */\n marker?: React.ReactNode;\n /** A step that never ran: a grey chevron replaces the dot, `tone` and `marker`. */\n skipped?: boolean;\n /** Marks the step the flow ended on, with a badge after the title. */\n stopped?: boolean;\n /** The badge's text when `stopped`. Empty falls back to \"Stopped here\". */\n stoppedLabel?: string;\n /** Label and value pairs in a wrapping row under the title. */\n meta?: readonly TimelineMetaEntry[];\n /**\n * The step's detail, below the title: tags, copy, payloads. Each child is a row of its own, 8px\n * apart, and unstyled, so wrap copy in `Typography.Text`.\n */\n children?: React.ReactNode;\n className?: string;\n}\n\n// The light theme's values as fallbacks: the dot paints before the theme reaches `:host`.\nconst DOT_COLOR: Record<TimelineTone, string> = {\n neutral: 'var(--malachite-text-secondary, rgb(123, 123, 123))',\n info: 'var(--malachite-text-info, rgb(12, 88, 174))',\n success: 'var(--malachite-text-success, rgb(2, 122, 66))',\n warning: 'var(--malachite-text-warning, rgb(150, 88, 10))',\n error: 'var(--malachite-text-error, rgb(237, 53, 54))',\n};\n\n// Stroked, so it opts out of the global path fill reset.\nconst SKIPPED_MARK = (\n <svg\n data-timeline-skipped=\"\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n className=\"block text-[var(--malachite-text-placeholder,rgb(187,187,187))]\"\n >\n <path\n data-malachite-shape=\"\"\n d=\"M6 9l6 6 6-6\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.4\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst Item: React.FC<TimelineItemProps> = ({\n title,\n time,\n tone,\n marker,\n skipped = false,\n stopped = false,\n stoppedLabel,\n meta = [],\n children,\n className = '',\n}) => {\n const dotTone = tone ?? (stopped ? 'error' : 'neutral');\n const shownMarker = skipped ? SKIPPED_MARK : marker;\n return (\n <li\n className={`relative m-0 flex gap-[14px] pb-[40px] last:pb-0 [&:last-child>[data-timeline-line]]:hidden ${className}`}\n >\n <span\n data-timeline-line=\"\"\n aria-hidden=\"true\"\n className=\"absolute start-[11px] top-[26px] bottom-[2px] w-[2px] bg-[var(--malachite-card-border,rgb(232,232,232))]\"\n />\n <span\n aria-hidden=\"true\"\n // The ring's border would cut into a marker, so a marker gets the full 24px circle instead.\n className={`flex h-[24px] w-[24px] flex-none items-center justify-center overflow-hidden rounded-full ${shownMarker ? '' : 'border border-solid border-[var(--malachite-card-border,rgb(232,232,232))]'}`}\n >\n {shownMarker || (\n <span\n data-timeline-dot={dotTone}\n className=\"h-[8px] w-[8px] rounded-full\"\n style={{ backgroundColor: DOT_COLOR[dotTone] }}\n />\n )}\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-[8px] pt-[2px]\">\n <div className=\"flex items-start justify-between gap-[12px]\">\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-[8px] gap-y-[4px] [overflow-wrap:anywhere]\">\n <Text size=\"small\" fontWeight=\"bold\" className=\"min-w-0 leading-[18px]\">\n {title}\n </Text>\n {stopped && <span className=\"sr-only\">, </span>}\n {stopped && (\n <Tag\n value={stoppedLabel?.trim() || 'Stopped here'}\n type=\"error\"\n fontSize=\"xsmall\"\n textTransform=\"none\"\n paddingSize=\"compact\"\n />\n )}\n </div>\n {(time || time === 0) && <span className=\"sr-only\">, </span>}\n {(time || time === 0) && (\n <Text\n size=\"xsmall\"\n color=\"secondary\"\n font=\"mono\"\n wrap={false}\n className=\"pt-[2px]\"\n >\n {time}\n </Text>\n )}\n </div>\n {meta.length > 0 && (\n <dl className=\"m-0 flex flex-wrap gap-x-[18px] gap-y-[6px] leading-[16px]\">\n {meta.map((entry, index) => (\n <div\n key={`${entry.label}-${index}`}\n className=\"flex min-w-0 items-baseline gap-[3px]\"\n >\n <dt className=\"flex\">\n <Text size=\"xsmall\" color=\"secondary\">\n {entry.label}\n </Text>\n </dt>\n <dd className=\"m-0 flex min-w-0 [overflow-wrap:anywhere]\">\n <Text size=\"xsmall\" font=\"mono\">\n {entry.value}\n </Text>\n </dd>\n </div>\n ))}\n </dl>\n )}\n {children}\n </div>\n </li>\n );\n};\n\n/** A vertical sequence of steps, each with a dot on a connecting line, a title, its timing and a body. */\nconst Timeline: React.FC<TimelineProps> & { Item: typeof Item } = ({\n children,\n className = '',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n}) => (\n <ol\n // list-style: none strips list semantics in WebKit, so VoiceOver would not announce the steps.\n role=\"list\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className={`m-0 list-none p-0 ${className}`}\n >\n {children}\n </ol>\n);\n\nTimeline.Item = Item;\n\nexport default Timeline;\nexport { Timeline };\n"],"names":["DOT_COLOR","SKIPPED_MARK","jsx","Item","title","time","tone","marker","skipped","stopped","stoppedLabel","meta","children","className","dotTone","shownMarker","jsxs","Text","Tag","entry","index","Timeline","ariaLabel","ariaLabelledBy"],"mappings":";;;AA8CA,MAAMA,IAA0C;AAAA,EAC5C,SAAS;AAAA,EACT,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACX,GAGMC,IACF,gBAAAC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cAAA;AAAA,YAAA;AAAA,YAZK,GAAGA,EAAM,KAAK,IAAIC,CAAK;AAAA,UAAA,CAcnC,GACL;AAAA,UAEHR;AAAA,QAAA,EAAA,CACL;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGZ,GAGMS,IAA4D,CAAC;AAAA,EAC/D,UAAAT;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,cAAcS;AAAA,EACd,mBAAmBC;AACvB,MACI,gBAAArB;AAAA,EAAC;AAAA,EAAA;AAAA,IAEG,MAAK;AAAA,IACL,cAAYoB;AAAA,IACZ,mBAAiBC;AAAA,IACjB,WAAW,qBAAqBV,CAAS;AAAA,IAExC,UAAAD;AAAA,EAAA;AACL;AAGJS,EAAS,OAAOlB;"}
1
+ {"version":3,"file":"Timeline.js","sources":["../../src/components/Timeline.tsx"],"sourcesContent":["import React from 'react';\nimport Tag from './Tag';\nimport Text from './Typography/Text';\nimport { getFontFamily, getFontWeight } from './Typography/textStyles';\n\nexport type TimelineTone = 'neutral' | 'info' | 'success' | 'warning' | 'error';\n\nexport interface TimelineProps {\n children: React.ReactNode;\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\nexport interface TimelineMetaEntry {\n label: string;\n value: React.ReactNode;\n}\n\nexport interface TimelineItemProps {\n title: React.ReactNode;\n /**\n * Code set after the title in the mono face, as one phrase with it, e.g. `title=\"n8n called\"`\n * with `titleCode=\"Salesforce | Delete contact\"`.\n */\n titleCode?: string;\n /** When the step happened, shown at the right of the title, e.g. `+6 ms`. */\n time?: React.ReactNode;\n /**\n * Paints the dot or the `icon`: `error` on a `stopped` step, else `neutral`, unless set. Colour\n * alone, so the title has to say what happened. Ignored when `marker` is set.\n */\n tone?: TimelineTone;\n /** Replaces the ringed dot with a 24px circle of its own, e.g. the caller's logo at size 24. Decorative: hidden from assistive tech. */\n marker?: React.ReactNode;\n /**\n * A 12-14px glyph drawn inside the ring in place of the dot, e.g. `<McpIcon size={13} />`, painted\n * by `tone` through `currentColor`. Use a filled glyph: inside the shadow root every unmarked svg\n * path is filled, so a stroke-only icon turns solid.\n * Decorative: hidden from assistive tech, so the title has to say what it stands for.\n * Precedence: `skipped`, then `marker`, then `icon`, then the dot.\n */\n icon?: React.ReactNode;\n /** A step that never ran: a grey chevron replaces the dot, `tone`, `marker` and `icon`. */\n skipped?: boolean;\n /** Marks the step the flow ended on, with a badge after the title. */\n stopped?: boolean;\n /** The badge's text when `stopped`. Empty falls back to \"Stopped here\". */\n stoppedLabel?: string;\n /** Label and value pairs in a wrapping row under the title. */\n meta?: readonly TimelineMetaEntry[];\n /**\n * The step's detail, below the title: tags, copy, payloads. Each child is a row of its own, 8px\n * apart, and unstyled, so wrap copy in `Typography.Text`.\n */\n children?: React.ReactNode;\n className?: string;\n}\n\n// The light theme's values as fallbacks: the dot paints before the theme reaches `:host`.\nconst DOT_COLOR: Record<TimelineTone, string> = {\n neutral: 'var(--malachite-text-secondary, rgb(123, 123, 123))',\n info: 'var(--malachite-text-info, rgb(12, 88, 174))',\n success: 'var(--malachite-text-success, rgb(2, 122, 66))',\n warning: 'var(--malachite-text-warning, rgb(150, 88, 10))',\n error: 'var(--malachite-text-error, rgb(237, 53, 54))',\n};\n\n// Mono runs wider than Inter, so it sits a touch under the title, at 0.92em of whatever size the\n// title is, and colour is the title's. A mono space is as wide as a letter, about twice the\n// title's, so the word spacing closes it to match, and a hair of margin evens the gap before it.\nconst TITLE_CODE_STYLE: React.CSSProperties = {\n fontFamily: getFontFamily('mono'),\n fontWeight: getFontWeight('semi-bold'),\n fontSize: '0.92em',\n wordSpacing: '-0.25em',\n marginLeft: '0.08em',\n};\n\n// Stroked, so it opts out of the global path fill reset.\nconst SKIPPED_MARK = (\n <svg\n data-timeline-skipped=\"\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n className=\"block text-[var(--malachite-text-placeholder,rgb(187,187,187))]\"\n >\n <path\n data-malachite-shape=\"\"\n d=\"M6 9l6 6 6-6\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.4\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst Item: React.FC<TimelineItemProps> = ({\n title,\n titleCode,\n time,\n tone,\n marker,\n icon,\n skipped = false,\n stopped = false,\n stoppedLabel,\n meta = [],\n children,\n className = '',\n}) => {\n const dotTone = tone ?? (stopped ? 'error' : 'neutral');\n const shownMarker = skipped ? SKIPPED_MARK : marker;\n const code = titleCode?.trim();\n return (\n <li\n className={`relative m-0 flex gap-[14px] pb-[40px] last:pb-0 [&:last-child>[data-timeline-line]]:hidden ${className}`}\n >\n <span\n data-timeline-line=\"\"\n aria-hidden=\"true\"\n className=\"absolute start-[11px] top-[26px] bottom-[2px] w-[2px] bg-[var(--malachite-card-border,rgb(232,232,232))]\"\n />\n <span\n aria-hidden=\"true\"\n // The ring's border would cut into a marker, so a marker gets the full 24px circle instead.\n className={`flex h-[24px] w-[24px] flex-none items-center justify-center overflow-hidden rounded-full ${shownMarker ? '' : 'border border-solid border-[var(--malachite-card-border,rgb(232,232,232))]'}`}\n >\n {shownMarker ||\n (icon ? (\n <span\n data-timeline-icon={dotTone}\n className=\"flex h-[14px] w-[14px] items-center justify-center overflow-hidden [&>*]:max-h-full [&>*]:max-w-full [&_svg]:max-h-[14px] [&_svg]:max-w-[14px]\"\n style={{ color: DOT_COLOR[dotTone] }}\n >\n {icon}\n </span>\n ) : (\n <span\n data-timeline-dot={dotTone}\n className=\"h-[8px] w-[8px] rounded-full\"\n style={{ backgroundColor: DOT_COLOR[dotTone] }}\n />\n ))}\n </span>\n <div className=\"flex min-w-0 flex-1 flex-col gap-[8px] pt-[2px]\">\n <div className=\"flex items-start justify-between gap-[12px]\">\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-[8px] gap-y-[4px] [overflow-wrap:anywhere]\">\n <Text size=\"small\" fontWeight=\"bold\" className=\"min-w-0 leading-[18px]\">\n {title}\n {code && (\n <>\n {title ? ' ' : null}\n <span translate=\"no\" style={TITLE_CODE_STYLE}>\n {code}\n </span>\n </>\n )}\n </Text>\n {stopped && <span className=\"sr-only\">, </span>}\n {stopped && (\n <Tag\n value={stoppedLabel?.trim() || 'Stopped here'}\n type=\"error\"\n fontSize=\"xsmall\"\n textTransform=\"none\"\n paddingSize=\"compact\"\n />\n )}\n </div>\n {(time || time === 0) && <span className=\"sr-only\">, </span>}\n {(time || time === 0) && (\n <Text\n size=\"xsmall\"\n color=\"secondary\"\n font=\"mono\"\n wrap={false}\n className=\"pt-[2px]\"\n >\n {time}\n </Text>\n )}\n </div>\n {meta.length > 0 && (\n <dl className=\"m-0 flex flex-wrap gap-x-[18px] gap-y-[6px] leading-[16px]\">\n {meta.map((entry, index) => (\n <div\n key={`${entry.label}-${index}`}\n className=\"flex min-w-0 items-baseline gap-[3px]\"\n >\n <dt className=\"flex\">\n <Text size=\"xsmall\" color=\"secondary\">\n {entry.label}\n </Text>\n </dt>\n <dd className=\"m-0 flex min-w-0 [overflow-wrap:anywhere]\">\n <Text size=\"xsmall\" font=\"mono\">\n {entry.value}\n </Text>\n </dd>\n </div>\n ))}\n </dl>\n )}\n {children}\n </div>\n </li>\n );\n};\n\n/** A vertical sequence of steps, each with a dot on a connecting line, a title, its timing and a body. */\nconst Timeline: React.FC<TimelineProps> & { Item: typeof Item } = ({\n children,\n className = '',\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n}) => (\n <ol\n // list-style: none strips list semantics in WebKit, so VoiceOver would not announce the steps.\n role=\"list\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className={`m-0 list-none p-0 ${className}`}\n >\n {children}\n </ol>\n);\n\nTimeline.Item = Item;\n\nexport default Timeline;\nexport { Timeline };\n"],"names":["DOT_COLOR","TITLE_CODE_STYLE","getFontFamily","getFontWeight","SKIPPED_MARK","jsx","Item","title","titleCode","time","tone","marker","icon","skipped","stopped","stoppedLabel","meta","children","className","dotTone","shownMarker","code","jsxs","Text","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OtB;"}
package/dist/index.d.ts CHANGED
@@ -2293,6 +2293,33 @@ export declare interface GroupedStepperProps extends StepperBaseProps {
2293
2293
  steps?: never;
2294
2294
  }
2295
2295
 
2296
+ export declare const Hexagon: default_2.FC<HexagonProps>;
2297
+
2298
+ export declare interface HexagonProps {
2299
+ tone?: HexagonTone;
2300
+ /** `small` is 16px, `medium` 18px. */
2301
+ size?: HexagonSize;
2302
+ /** Draws it at 20% strength, for a step of a scale that isn't the current one. */
2303
+ dimmed?: boolean;
2304
+ className?: string;
2305
+ }
2306
+
2307
+ export declare const HexagonScale: default_2.FC<HexagonScaleProps>;
2308
+
2309
+ export declare interface HexagonScaleProps {
2310
+ /** One hexagon per step, in order. */
2311
+ steps: readonly HexagonTone[];
2312
+ /** Index of the step drawn at full strength; the rest are dimmed. Omit to dim them all. */
2313
+ current?: number;
2314
+ /** Only when it stands alone; beside text naming the step it is decorative. */
2315
+ label?: string;
2316
+ className?: string;
2317
+ }
2318
+
2319
+ export declare type HexagonSize = 'small' | 'medium';
2320
+
2321
+ export declare type HexagonTone = 'neutral' | 'success' | 'caution' | 'warning' | 'error';
2322
+
2296
2323
  export declare const IconBadge: default_2.FC<IconBadgeProps>;
2297
2324
 
2298
2325
  export declare interface IconBadgeProps {
@@ -3377,7 +3404,10 @@ export declare interface LinkCardProps {
3377
3404
  description?: string;
3378
3405
  /** Colours the title. */
3379
3406
  tone?: LinkCardTone;
3380
- /** Decorative, before the title. Coloured paths need `data-malachite-shape`. */
3407
+ /**
3408
+ * Decorative, before the title. Paths are filled with `currentColor`, so colour one through
3409
+ * `color`, as `Hexagon` does; a path keeping its own `fill` needs `data-malachite-shape`.
3410
+ */
3381
3411
  icon?: default_2.ReactNode;
3382
3412
  /** Decorative content before the action, e.g. a level scale. Must not be interactive. */
3383
3413
  trailing?: default_2.ReactNode;
@@ -3649,6 +3679,10 @@ export declare interface MalachiteTheme {
3649
3679
  backgroundGlass: string;
3650
3680
  shadowLight: string;
3651
3681
  shadowMedium: string;
3682
+ /** Solid amber for a status shape, a step deeper than `fillMuted`. */
3683
+ fill: string;
3684
+ /** Pale amber for a milder status shape than `fill`. */
3685
+ fillMuted: string;
3652
3686
  };
3653
3687
  error: {
3654
3688
  background: string;
@@ -6144,16 +6178,29 @@ export declare const Timeline: default_2.FC<TimelineProps> & {
6144
6178
 
6145
6179
  export declare interface TimelineItemProps {
6146
6180
  title: default_2.ReactNode;
6181
+ /**
6182
+ * Code set after the title in the mono face, as one phrase with it, e.g. `title="n8n called"`
6183
+ * with `titleCode="Salesforce | Delete contact"`.
6184
+ */
6185
+ titleCode?: string;
6147
6186
  /** When the step happened, shown at the right of the title, e.g. `+6 ms`. */
6148
6187
  time?: default_2.ReactNode;
6149
6188
  /**
6150
- * Paints the dot: `error` on a `stopped` step, else `neutral`, unless set. Colour alone, so the
6151
- * title has to say what happened. Ignored when `marker` is set.
6189
+ * Paints the dot or the `icon`: `error` on a `stopped` step, else `neutral`, unless set. Colour
6190
+ * alone, so the title has to say what happened. Ignored when `marker` is set.
6152
6191
  */
6153
6192
  tone?: TimelineTone;
6154
6193
  /** Replaces the ringed dot with a 24px circle of its own, e.g. the caller's logo at size 24. Decorative: hidden from assistive tech. */
6155
6194
  marker?: default_2.ReactNode;
6156
- /** A step that never ran: a grey chevron replaces the dot, `tone` and `marker`. */
6195
+ /**
6196
+ * A 12-14px glyph drawn inside the ring in place of the dot, e.g. `<McpIcon size={13} />`, painted
6197
+ * by `tone` through `currentColor`. Use a filled glyph: inside the shadow root every unmarked svg
6198
+ * path is filled, so a stroke-only icon turns solid.
6199
+ * Decorative: hidden from assistive tech, so the title has to say what it stands for.
6200
+ * Precedence: `skipped`, then `marker`, then `icon`, then the dot.
6201
+ */
6202
+ icon?: default_2.ReactNode;
6203
+ /** A step that never ran: a grey chevron replaces the dot, `tone`, `marker` and `icon`. */
6157
6204
  skipped?: boolean;
6158
6205
  /** Marks the step the flow ended on, with a badge after the title. */
6159
6206
  stopped?: boolean;