@stackone/malachite 2.104.0 → 2.105.1

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.
@@ -1,50 +1,66 @@
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 a, Fragment as $ } from "react/jsx-runtime";
2
+ import { useId as z } from "react";
3
+ import { Tag as I } from "./Tag.js";
4
+ import o from "./Typography/Text.js";
5
+ import { getFontWeight as _, getFontFamily as j } from "./Typography/textStyles.js";
6
+ import { devWarning as F } from "./devWarning.js";
7
+ const p = {
5
8
  neutral: "var(--malachite-text-secondary, rgb(123, 123, 123))",
6
9
  info: "var(--malachite-text-info, rgb(12, 88, 174))",
7
10
  success: "var(--malachite-text-success, rgb(2, 122, 66))",
8
11
  warning: "var(--malachite-text-warning, rgb(150, 88, 10))",
9
12
  error: "var(--malachite-text-error, rgb(237, 53, 54))"
10
- }, u = /* @__PURE__ */ e(
13
+ }, E = {
14
+ fontFamily: j("mono"),
15
+ fontWeight: _("semi-bold"),
16
+ fontSize: "0.92em",
17
+ wordSpacing: "-0.25em",
18
+ marginLeft: "0.08em"
19
+ }, O = /* @__PURE__ */ e(
11
20
  "svg",
12
21
  {
13
22
  "data-timeline-skipped": "",
14
23
  width: "14",
15
24
  height: "14",
16
25
  viewBox: "0 0 24 24",
17
- className: "block text-[var(--malachite-text-placeholder,rgb(187,187,187))]",
26
+ className: "block",
27
+ style: { color: p.neutral },
18
28
  children: /* @__PURE__ */ e(
19
29
  "path",
20
30
  {
21
- "data-malachite-shape": "",
22
- d: "M6 9l6 6 6-6",
23
- fill: "none",
24
- stroke: "currentColor",
25
- strokeWidth: "2.4",
26
- strokeLinecap: "round",
27
- strokeLinejoin: "round"
31
+ fill: "currentColor",
32
+ d: "M5.15 9.85l6 6a1.2 1.2 0 0 0 1.7 0l6-6A1.2 1.2 0 0 0 17.15 8.15L12 13.3 6.85 8.15A1.2 1.2 0 0 0 5.15 9.85Z"
28
33
  }
29
34
  )
30
35
  }
31
- ), v = ({
32
- title: i,
33
- 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 = ""
36
+ ), W = ({
37
+ title: n,
38
+ titleCode: t,
39
+ time: l,
40
+ tone: c,
41
+ marker: h,
42
+ icon: f,
43
+ skipped: s = !1,
44
+ stopped: g = !1,
45
+ stoppedLabel: m,
46
+ skippedLabel: d,
47
+ meta: w = [],
48
+ children: u,
49
+ className: v = ""
42
50
  }) => {
43
- const m = n ?? (t ? "error" : "neutral"), x = p ? u : s;
44
- return /* @__PURE__ */ l(
51
+ const y = z();
52
+ if (s && g) {
53
+ const r = typeof n == "string" ? n : "";
54
+ F(
55
+ `Timeline.Item.skipped+stopped:${r || y}`,
56
+ `Timeline.Item${r ? ` "${r}"` : " (with a non-string title)"} got both \`skipped\` and \`stopped\`; a step that never ran can't be the one the flow ended on, so the badge is dropped.`
57
+ );
58
+ }
59
+ const x = g && !s, i = c ?? (x ? "error" : "neutral"), N = s ? O : h, T = !s && !!h, b = t == null ? void 0 : t.trim();
60
+ return /* @__PURE__ */ a(
45
61
  "li",
46
62
  {
47
- className: `relative m-0 flex gap-[14px] pb-[40px] last:pb-0 [&:last-child>[data-timeline-line]]:hidden ${f}`,
63
+ className: `relative m-0 flex gap-[14px] pb-[40px] last:pb-0 [&:last-child>[data-timeline-line]]:hidden ${v}`,
48
64
  children: [
49
65
  /* @__PURE__ */ e(
50
66
  "span",
@@ -58,26 +74,44 @@ const w = {
58
74
  "span",
59
75
  {
60
76
  "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(
77
+ className: `flex h-[24px] w-[24px] flex-none items-center justify-center overflow-hidden rounded-full ${T ? "" : "border border-solid border-[var(--malachite-card-border,rgb(232,232,232))]"}`,
78
+ children: N || (f ? /* @__PURE__ */ e(
63
79
  "span",
64
80
  {
65
- "data-timeline-dot": m,
81
+ "data-timeline-icon": i,
82
+ 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]",
83
+ style: { color: p[i] },
84
+ children: f
85
+ }
86
+ ) : /* @__PURE__ */ e(
87
+ "span",
88
+ {
89
+ "data-timeline-dot": i,
66
90
  className: "h-[8px] w-[8px] rounded-full",
67
- style: { backgroundColor: w[m] }
91
+ style: { backgroundColor: p[i] }
68
92
  }
69
- )
93
+ ))
70
94
  }
71
95
  ),
72
- /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 flex-col gap-[8px] pt-[2px]", children: [
73
- /* @__PURE__ */ l("div", { className: "flex items-start justify-between gap-[12px]", children: [
74
- /* @__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,
96
+ /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-1 flex-col gap-[8px] pt-[2px]", children: [
97
+ /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-[12px]", children: [
98
+ /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-x-[8px] gap-y-[4px] [overflow-wrap:anywhere]", children: [
99
+ /* @__PURE__ */ a(o, { size: "small", fontWeight: "bold", className: "min-w-0 leading-[18px]", children: [
100
+ n,
101
+ b && /* @__PURE__ */ a($, { children: [
102
+ n ? " " : null,
103
+ /* @__PURE__ */ e("span", { translate: "no", style: E, children: b })
104
+ ] })
105
+ ] }),
106
+ s && /* @__PURE__ */ a("span", { className: "sr-only", children: [
107
+ ", ",
108
+ (d == null ? void 0 : d.trim()) || "skipped"
109
+ ] }),
110
+ x && /* @__PURE__ */ e("span", { className: "sr-only", children: ", " }),
111
+ x && /* @__PURE__ */ e(
112
+ I,
79
113
  {
80
- value: (o == null ? void 0 : o.trim()) || "Stopped here",
114
+ value: (m == null ? void 0 : m.trim()) || "Stopped here",
81
115
  type: "error",
82
116
  fontSize: "xsmall",
83
117
  textTransform: "none",
@@ -85,53 +119,53 @@ const w = {
85
119
  }
86
120
  )
87
121
  ] }),
88
- (a || a === 0) && /* @__PURE__ */ e("span", { className: "sr-only", children: ", " }),
89
- (a || a === 0) && /* @__PURE__ */ e(
90
- r,
122
+ (l || l === 0) && /* @__PURE__ */ e("span", { className: "sr-only", children: ", " }),
123
+ (l || l === 0) && /* @__PURE__ */ e(
124
+ o,
91
125
  {
92
126
  size: "xsmall",
93
127
  color: "secondary",
94
128
  font: "mono",
95
129
  wrap: !1,
96
130
  className: "pt-[2px]",
97
- children: a
131
+ children: l
98
132
  }
99
133
  )
100
134
  ] }),
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(
135
+ w.length > 0 && /* @__PURE__ */ e("dl", { className: "m-0 flex flex-wrap gap-x-[18px] gap-y-[6px] leading-[16px]", children: w.map((r, S) => /* @__PURE__ */ a(
102
136
  "div",
103
137
  {
104
138
  className: "flex min-w-0 items-baseline gap-[3px]",
105
139
  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 }) })
140
+ /* @__PURE__ */ e("dt", { className: "flex", children: /* @__PURE__ */ e(o, { size: "xsmall", color: "secondary", children: r.label }) }),
141
+ /* @__PURE__ */ e("dd", { className: "m-0 flex min-w-0 [overflow-wrap:anywhere]", children: /* @__PURE__ */ e(o, { size: "xsmall", font: "mono", children: r.value }) })
108
142
  ]
109
143
  },
110
- `${c.label}-${g}`
144
+ `${r.label}-${S}`
111
145
  )) }),
112
- h
146
+ u
113
147
  ] })
114
148
  ]
115
149
  }
116
150
  );
117
- }, N = ({
118
- children: i,
119
- className: a = "",
120
- "aria-label": n,
121
- "aria-labelledby": s
151
+ }, A = ({
152
+ children: n,
153
+ className: t = "",
154
+ "aria-label": l,
155
+ "aria-labelledby": c
122
156
  }) => /* @__PURE__ */ e(
123
157
  "ol",
124
158
  {
125
159
  role: "list",
126
- "aria-label": n,
127
- "aria-labelledby": s,
128
- className: `m-0 list-none p-0 ${a}`,
129
- children: i
160
+ "aria-label": l,
161
+ "aria-labelledby": c,
162
+ className: `m-0 list-none p-0 ${t}`,
163
+ children: n
130
164
  }
131
165
  );
132
- N.Item = v;
166
+ A.Item = W;
133
167
  export {
134
- N as Timeline,
135
- N as default
168
+ A as Timeline,
169
+ A as default
136
170
  };
137
171
  //# 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;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,yBAAsB;AAAA,IACtB,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,WAAU;AAAA,IAEV,UAAA,gBAAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,wBAAqB;AAAA,QACrB,GAAE;AAAA,QACF,MAAK;AAAA,QACL,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,eAAc;AAAA,QACd,gBAAe;AAAA,MAAA;AAAA,IAAA;AAAA,EACnB;AACJ,GAGEC,IAAoC,CAAC;AAAA,EACvC,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,cAAAC;AAAA,EACA,MAAAC,I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.tsx"],"sourcesContent":["import React, { useId } from 'react';\nimport Tag from './Tag';\nimport Text from './Typography/Text';\nimport { getFontFamily, getFontWeight } from './Typography/textStyles';\nimport { devWarning } from './devWarning';\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 `skipped` or `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`. Wins over `stopped`. */\n skipped?: boolean;\n /** Marks the step the flow ended on, with a badge after the title. Ignored when `skipped`. */\n stopped?: boolean;\n /** The badge's text when `stopped`. Empty falls back to \"Stopped here\". */\n stoppedLabel?: string;\n /** Read to assistive tech after the title when `skipped`. Empty falls back to \"skipped\". */\n skippedLabel?: 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\nconst SKIPPED_MARK = (\n <svg\n data-timeline-skipped=\"\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 24 24\"\n className=\"block\"\n style={{ color: DOT_COLOR.neutral }}\n >\n <path\n fill=\"currentColor\"\n d=\"M5.15 9.85l6 6a1.2 1.2 0 0 0 1.7 0l6-6A1.2 1.2 0 0 0 17.15 8.15L12 13.3 6.85 8.15A1.2 1.2 0 0 0 5.15 9.85Z\"\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 skippedLabel,\n meta = [],\n children,\n className = '',\n}) => {\n const id = useId();\n if (skipped && stopped) {\n const name = typeof title === 'string' ? title : '';\n devWarning(\n `Timeline.Item.skipped+stopped:${name || id}`,\n `Timeline.Item${name ? ` \"${name}\"` : ' (with a non-string title)'} got both \\`skipped\\` and \\`stopped\\`; a step that never ran can't be the one the flow ended on, so the badge is dropped.`,\n );\n }\n const isStopped = stopped && !skipped;\n const dotTone = tone ?? (isStopped ? 'error' : 'neutral');\n const shownMarker = skipped ? SKIPPED_MARK : marker;\n const ringless = !skipped && Boolean(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 ${ringless ? '' : '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 {skipped && (\n <span className=\"sr-only\">, {skippedLabel?.trim() || 'skipped'}</span>\n )}\n {isStopped && <span className=\"sr-only\">, </span>}\n {isStopped && (\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","skippedLabel","meta","children","className","id","useId","name","devWarning","isStopped","dotTone","shownMarker","ringless","code","jsxs","Text","Fragment","Tag","entry","index","Timeline","ariaLabel","ariaLabelledBy"],"mappings":";;;;;;AA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QAAA,EAAA,CACL;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGZ,GAGMiB,IAA4D,CAAC;AAAA,EAC/D,UAAAjB;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,cAAciB;AAAA,EACd,mBAAmBC;AACvB,MACI,gBAAAhC;AAAA,EAAC;AAAA,EAAA;AAAA,IAEG,MAAK;AAAA,IACL,cAAY+B;AAAA,IACZ,mBAAiBC;AAAA,IACjB,WAAW,qBAAqBlB,CAAS;AAAA,IAExC,UAAAD;AAAA,EAAA;AACL;AAGJiB,EAAS,OAAO7B;"}
@@ -1,6 +1,8 @@
1
- const r = "border-[var(--malachite-card-border,rgb(232,232,232))]", o = "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
1
+ const r = "border-[var(--malachite-card-border,rgb(232,232,232))]", o = "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden", t = "transition-colors hover:bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))]", a = "var(--malachite-buttonlist-hover-background,rgb(245,245,245))";
2
2
  export {
3
3
  r as BORDER,
4
- o as NO_SCROLLBAR
4
+ o as NO_SCROLLBAR,
5
+ t as ROW_HOVER,
6
+ a as ROW_HOVER_COLOR
5
7
  };
6
8
  //# sourceMappingURL=chromeStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chromeStyles.js","sources":["../../src/components/chromeStyles.ts"],"sourcesContent":["export const BORDER = 'border-[var(--malachite-card-border,rgb(232,232,232))]';\n\nexport const NO_SCROLLBAR = '[scrollbar-width:none] [&::-webkit-scrollbar]:hidden';\n"],"names":["BORDER","NO_SCROLLBAR"],"mappings":"AAAO,MAAMA,IAAS,0DAETC,IAAe;"}
1
+ {"version":3,"file":"chromeStyles.js","sources":["../../src/components/chromeStyles.ts"],"sourcesContent":["export const BORDER = 'border-[var(--malachite-card-border,rgb(232,232,232))]';\n\nexport const NO_SCROLLBAR = '[scrollbar-width:none] [&::-webkit-scrollbar]:hidden';\n\nexport const ROW_HOVER =\n 'transition-colors hover:bg-[var(--malachite-buttonlist-hover-background,rgb(245,245,245))]';\n\nexport const ROW_HOVER_COLOR = 'var(--malachite-buttonlist-hover-background,rgb(245,245,245))';\n"],"names":["BORDER","NO_SCROLLBAR","ROW_HOVER","ROW_HOVER_COLOR"],"mappings":"AAAO,MAAMA,IAAS,0DAETC,IAAe,wDAEfC,IACT,8FAESC,IAAkB;"}
@@ -1,12 +1,19 @@
1
- const e = "outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-text-primary)]", i = "outline-none focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:[outline-offset:-2px]", o = "pointer-events-none absolute inset-0 hidden [outline:2px_solid_var(--malachite-text-primary)] [outline-offset:-2px]", t = `${o} z-[2] group-focus-visible:block`, s = "outline-none has-[[role=radio]:focus-visible]:outline-offset-2 has-[[role=radio]:focus-visible]:[outline:2px_solid_var(--malachite-text-primary)]", n = "outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-selection-bar-foreground)]", l = "outline-none focus-visible:[outline:2px_solid_var(--malachite-inline-confirm-foreground)] focus-visible:[outline-offset:-2px]", u = "outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-close-button-inverse-hover-foreground,rgb(255,255,255))]";
1
+ const t = "outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-text-primary)]", s = "outline-none focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:[outline-offset:-2px]", i = "pointer-events-none absolute inset-0 hidden [outline:2px_solid_var(--malachite-text-primary)] [outline-offset:-2px]", n = `${i} z-[2] group-focus-visible:block`, l = "outline-none has-[[role=radio]:focus-visible]:outline-offset-2 has-[[role=radio]:focus-visible]:[outline:2px_solid_var(--malachite-text-primary)]", u = "outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-selection-bar-foreground)]", r = "outline-none focus-visible:[outline:2px_solid_var(--malachite-inline-confirm-foreground)] focus-visible:[outline-offset:-2px]", c = "outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-close-button-inverse-hover-foreground,rgb(255,255,255))]", _ = (o, e = !0) => {
2
+ try {
3
+ return o.matches(":focus-visible");
4
+ } catch {
5
+ return e;
6
+ }
7
+ };
2
8
  export {
3
- e as FOCUS_RING,
4
- u as FOCUS_RING_CLOSE_BUTTON_INVERSE,
5
- l as FOCUS_RING_INLINE_CONFIRM_INSET,
6
- i as FOCUS_RING_INSET,
7
- t as FOCUS_RING_INSET_OVERLAY,
8
- o as FOCUS_RING_INSET_OVERLAY_HIDDEN,
9
- n as FOCUS_RING_SELECTION_BAR,
10
- s as FOCUS_RING_WITHIN_RADIO
9
+ t as FOCUS_RING,
10
+ c as FOCUS_RING_CLOSE_BUTTON_INVERSE,
11
+ r as FOCUS_RING_INLINE_CONFIRM_INSET,
12
+ s as FOCUS_RING_INSET,
13
+ n as FOCUS_RING_INSET_OVERLAY,
14
+ i as FOCUS_RING_INSET_OVERLAY_HIDDEN,
15
+ u as FOCUS_RING_SELECTION_BAR,
16
+ l as FOCUS_RING_WITHIN_RADIO,
17
+ _ as isFocusVisible
11
18
  };
12
19
  //# sourceMappingURL=focusRing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusRing.js","sources":["../../src/components/focusRing.ts"],"sourcesContent":["// Shared keyboard focus indicator for interactive components.\n\n/** Standard focus ring — sits 2px outside the control. */\nexport const FOCUS_RING =\n 'outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-text-primary)]';\n\n/**\n * Inset focus ring — drawn 2px inside the element edge. Use for full-bleed elements\n * inside an `overflow-hidden` container (e.g. Surface.Row) where an outset outline\n * would be clipped.\n */\nexport const FOCUS_RING_INSET =\n 'outline-none focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:[outline-offset:-2px]';\n\nexport const FOCUS_RING_INSET_OVERLAY_HIDDEN =\n 'pointer-events-none absolute inset-0 hidden [outline:2px_solid_var(--malachite-text-primary)] [outline-offset:-2px]';\n\n/** `FOCUS_RING_INSET` drawn by an overlay while its `group` ancestor has keyboard focus. */\nexport const FOCUS_RING_INSET_OVERLAY = `${FOCUS_RING_INSET_OVERLAY_HIDDEN} z-[2] group-focus-visible:block`;\n\n/** Ring drawn on a wrapper when a control *inside* it takes focus. */\nexport const FOCUS_RING_WITHIN =\n 'outline-none has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:[outline:2px_solid_var(--malachite-text-primary)]';\n\n/**\n * As `FOCUS_RING_WITHIN`, for a card whose control is a `role=\"radio\"` beside its links:\n * `:has(:focus-visible)` would also match a focused link and draw a second ring.\n */\nexport const FOCUS_RING_WITHIN_RADIO =\n 'outline-none has-[[role=radio]:focus-visible]:outline-offset-2 has-[[role=radio]:focus-visible]:[outline:2px_solid_var(--malachite-text-primary)]';\n\n/** Ring for a control on the SelectionBar, where `FOCUS_RING` would be invisible. */\nexport const FOCUS_RING_SELECTION_BAR =\n 'outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-selection-bar-foreground)]';\n\n/** Inset ring for a control on the InlineConfirm chip. */\nexport const FOCUS_RING_INLINE_CONFIRM_INSET =\n 'outline-none focus-visible:[outline:2px_solid_var(--malachite-inline-confirm-foreground)] focus-visible:[outline-offset:-2px]';\n\n/** Ring for `CloseButton surface=\"inverse\"`, where `FOCUS_RING` would be invisible on the dark panel. */\nexport const FOCUS_RING_CLOSE_BUTTON_INVERSE =\n 'outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-close-button-inverse-hover-foreground,rgb(255,255,255))]';\n"],"names":["FOCUS_RING","FOCUS_RING_INSET","FOCUS_RING_INSET_OVERLAY_HIDDEN","FOCUS_RING_INSET_OVERLAY","FOCUS_RING_WITHIN_RADIO","FOCUS_RING_SELECTION_BAR","FOCUS_RING_INLINE_CONFIRM_INSET","FOCUS_RING_CLOSE_BUTTON_INVERSE"],"mappings":"AAGO,MAAMA,IACT,+GAOSC,IACT,oHAESC,IACT,uHAGSC,IAA2B,GAAGD,CAA+B,oCAU7DE,IACT,qJAGSC,IACT,2HAGSC,IACT,iIAGSC,IACT;"}
1
+ {"version":3,"file":"focusRing.js","sources":["../../src/components/focusRing.ts"],"sourcesContent":["// Shared keyboard focus indicator for interactive components.\n\n/** Standard focus ring — sits 2px outside the control. */\nexport const FOCUS_RING =\n 'outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-text-primary)]';\n\n/**\n * Inset focus ring — drawn 2px inside the element edge. Use for full-bleed elements\n * inside an `overflow-hidden` container (e.g. Surface.Row) where an outset outline\n * would be clipped.\n */\nexport const FOCUS_RING_INSET =\n 'outline-none focus-visible:[outline:2px_solid_var(--malachite-text-primary)] focus-visible:[outline-offset:-2px]';\n\nexport const FOCUS_RING_INSET_OVERLAY_HIDDEN =\n 'pointer-events-none absolute inset-0 hidden [outline:2px_solid_var(--malachite-text-primary)] [outline-offset:-2px]';\n\n/** `FOCUS_RING_INSET` drawn by an overlay while its `group` ancestor has keyboard focus. */\nexport const FOCUS_RING_INSET_OVERLAY = `${FOCUS_RING_INSET_OVERLAY_HIDDEN} z-[2] group-focus-visible:block`;\n\n/** Ring drawn on a wrapper when a control *inside* it takes focus. */\nexport const FOCUS_RING_WITHIN =\n 'outline-none has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:[outline:2px_solid_var(--malachite-text-primary)]';\n\n/**\n * As `FOCUS_RING_WITHIN`, for a card whose control is a `role=\"radio\"` beside its links:\n * `:has(:focus-visible)` would also match a focused link and draw a second ring.\n */\nexport const FOCUS_RING_WITHIN_RADIO =\n 'outline-none has-[[role=radio]:focus-visible]:outline-offset-2 has-[[role=radio]:focus-visible]:[outline:2px_solid_var(--malachite-text-primary)]';\n\n/** Ring for a control on the SelectionBar, where `FOCUS_RING` would be invisible. */\nexport const FOCUS_RING_SELECTION_BAR =\n 'outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-selection-bar-foreground)]';\n\n/** Inset ring for a control on the InlineConfirm chip. */\nexport const FOCUS_RING_INLINE_CONFIRM_INSET =\n 'outline-none focus-visible:[outline:2px_solid_var(--malachite-inline-confirm-foreground)] focus-visible:[outline-offset:-2px]';\n\n/** Ring for `CloseButton surface=\"inverse\"`, where `FOCUS_RING` would be invisible on the dark panel. */\nexport const FOCUS_RING_CLOSE_BUTTON_INVERSE =\n 'outline-none focus-visible:outline-offset-2 focus-visible:[outline:2px_solid_var(--malachite-close-button-inverse-hover-foreground,rgb(255,255,255))]';\n\n/** `fallback` is the answer where the browser can't match `:focus-visible`. */\nexport const isFocusVisible = (element: Element, fallback = true): boolean => {\n try {\n return element.matches(':focus-visible');\n } catch {\n return fallback;\n }\n};\n"],"names":["FOCUS_RING","FOCUS_RING_INSET","FOCUS_RING_INSET_OVERLAY_HIDDEN","FOCUS_RING_INSET_OVERLAY","FOCUS_RING_WITHIN_RADIO","FOCUS_RING_SELECTION_BAR","FOCUS_RING_INLINE_CONFIRM_INSET","FOCUS_RING_CLOSE_BUTTON_INVERSE","isFocusVisible","element","fallback"],"mappings":"AAGO,MAAMA,IACT,+GAOSC,IACT,oHAESC,IACT,uHAGSC,IAA2B,GAAGD,CAA+B,oCAU7DE,IACT,qJAGSC,IACT,2HAGSC,IACT,iIAGSC,IACT,yJAGSC,IAAiB,CAACC,GAAkBC,IAAW,OAAkB;AAC1E,MAAI;AACA,WAAOD,EAAQ,QAAQ,gBAAgB;AAAA,EAC3C,QAAQ;AACJ,WAAOC;AAAA,EACX;AACJ;"}
package/dist/index.d.ts CHANGED
@@ -3400,7 +3400,7 @@ export declare const LinkCard: default_2.FC<LinkCardProps>;
3400
3400
 
3401
3401
  export declare interface LinkCardProps {
3402
3402
  title: string;
3403
- /** One line under the title; truncated text shows in full on hover. */
3403
+ /** One line under the title; shown in full on hover, or when a clickable card takes keyboard focus. */
3404
3404
  description?: string;
3405
3405
  /** Colours the title. */
3406
3406
  tone?: LinkCardTone;
@@ -6178,21 +6178,36 @@ export declare const Timeline: default_2.FC<TimelineProps> & {
6178
6178
 
6179
6179
  export declare interface TimelineItemProps {
6180
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;
6181
6186
  /** When the step happened, shown at the right of the title, e.g. `+6 ms`. */
6182
6187
  time?: default_2.ReactNode;
6183
6188
  /**
6184
- * Paints the dot: `error` on a `stopped` step, else `neutral`, unless set. Colour alone, so the
6185
- * 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 `skipped` or `marker` is set.
6186
6191
  */
6187
6192
  tone?: TimelineTone;
6188
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. */
6189
6194
  marker?: default_2.ReactNode;
6190
- /** 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`. Wins over `stopped`. */
6191
6204
  skipped?: boolean;
6192
- /** Marks the step the flow ended on, with a badge after the title. */
6205
+ /** Marks the step the flow ended on, with a badge after the title. Ignored when `skipped`. */
6193
6206
  stopped?: boolean;
6194
6207
  /** The badge's text when `stopped`. Empty falls back to "Stopped here". */
6195
6208
  stoppedLabel?: string;
6209
+ /** Read to assistive tech after the title when `skipped`. Empty falls back to "skipped". */
6210
+ skippedLabel?: string;
6196
6211
  /** Label and value pairs in a wrapping row under the title. */
6197
6212
  meta?: readonly TimelineMetaEntry[];
6198
6213
  /**