@six-vallees/ui-react 0.4.0 → 0.5.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/dist/charts/bar-chart.js +2 -2
- package/dist/charts/lib/series.d.ts +4 -2
- package/dist/charts/lib/series.js +1 -1
- package/dist/charts/line-chart.js +2 -2
- package/dist/charts/ring.d.ts +1 -1
- package/dist/charts/ring.js +2 -2
- package/dist/charts/segmented-bar.js +2 -2
- package/dist/{chunk-OHY4VIKZ.js → chunk-CZ3JB37A.js} +3 -4
- package/dist/chunk-CZ3JB37A.js.map +1 -0
- package/dist/{chunk-TI5GM4IR.js → chunk-G2XJK244.js} +7 -7
- package/dist/{chunk-TI5GM4IR.js.map → chunk-G2XJK244.js.map} +1 -1
- package/dist/{chunk-N2DFXOTF.js → chunk-OWIUMX76.js} +2 -2
- package/dist/{chunk-PIFHG2WO.js → chunk-S4HVXD6Z.js} +8 -6
- package/dist/chunk-S4HVXD6Z.js.map +1 -0
- package/dist/{chunk-65VQL6R2.js → chunk-YX6MSLUB.js} +2 -2
- package/dist/chunk-YX6MSLUB.js.map +1 -0
- package/dist/index.js +11 -11
- package/package.json +1 -1
- package/dist/chunk-65VQL6R2.js.map +0 -1
- package/dist/chunk-OHY4VIKZ.js.map +0 -1
- package/dist/chunk-PIFHG2WO.js.map +0 -1
- /package/dist/{chunk-N2DFXOTF.js.map → chunk-OWIUMX76.js.map} +0 -0
package/dist/charts/bar-chart.js
CHANGED
|
@@ -44,8 +44,10 @@ declare function sequentialOn(i: number, n: number): string;
|
|
|
44
44
|
declare function categoricalNeedsEdge(i: number): boolean;
|
|
45
45
|
/** True when `sequential(i, n)` needs a keyline. */
|
|
46
46
|
declare function sequentialNeedsEdge(i: number, n: number): boolean;
|
|
47
|
-
/** True when a mono `tone` fill needs a keyline.
|
|
48
|
-
|
|
47
|
+
/** True when a mono `tone` fill needs a keyline. None do: `muted` moved to neutral.500 and now
|
|
48
|
+
* clears 3:1 on its own (4.5:1 light / 3.7:1 dark), so mono marks draw no border at all. Kept as
|
|
49
|
+
* a function rather than inlined, so a future tone that IS pale has one place to declare it. */
|
|
50
|
+
declare function toneNeedsEdge(_tone: 'ink' | 'muted' | 'accent'): boolean;
|
|
49
51
|
/** The keyline itself, or `undefined` when the mark carries its own contrast. Feed straight to
|
|
50
52
|
* a style `boxShadow`, so a component never hand-writes the inset shadow. */
|
|
51
53
|
declare function markEdge(needed: boolean): string | undefined;
|
package/dist/charts/ring.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface RingProps {
|
|
|
11
11
|
tone?: 'ink' | 'accent';
|
|
12
12
|
/**
|
|
13
13
|
* Explicit arc colour (a token / CSS colour), overrides `tone`. Pass only colours that
|
|
14
|
-
* clear 3:1 against the surface as a thin stroke, ink, blue, or a dark graphite.
|
|
14
|
+
* clear 3:1 against the surface as a thin stroke, ink, blue, or a dark graphite. Silver
|
|
15
15
|
* and mid-gray are fill-only (they fail as a line); see AGENTS.md rule 9.
|
|
16
16
|
*/
|
|
17
17
|
color?: string;
|
package/dist/charts/ring.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sequentialNeedsEdge,
|
|
9
9
|
sequentialOn,
|
|
10
10
|
toneNeedsEdge
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G2XJK244.js";
|
|
12
12
|
import {
|
|
13
13
|
cn
|
|
14
14
|
} from "./chunk-DXRY7AS4.js";
|
|
@@ -28,8 +28,7 @@ function SegmentedBar({ data, height = 40, scale = "mono", showLegend = true, cl
|
|
|
28
28
|
const onFill = (d, i) => {
|
|
29
29
|
if (scale === "categorical") return categoricalOn(i);
|
|
30
30
|
if (scale === "sequential") return sequentialOn(i, data.length);
|
|
31
|
-
|
|
32
|
-
return d.active ? "var(--sv-sys-color-on-primary)" : "var(--sv-sys-color-on-surface)";
|
|
31
|
+
return "var(--sv-sys-color-on-primary)";
|
|
33
32
|
};
|
|
34
33
|
const edge = (d, i) => {
|
|
35
34
|
if (scale === "categorical") return markEdge(categoricalNeedsEdge(i));
|
|
@@ -70,4 +69,4 @@ SegmentedBar.displayName = "SegmentedBar";
|
|
|
70
69
|
export {
|
|
71
70
|
SegmentedBar
|
|
72
71
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-CZ3JB37A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/segmented-bar.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport {\n categorical, categoricalOn, categoricalNeedsEdge,\n sequential, sequentialOn, sequentialNeedsEdge,\n toneNeedsEdge, markEdge, chartToken,\n} from './lib/series';\n\nexport interface Segment {\n label: string;\n value: number;\n /** Pull this segment forward (ink) and others recede. */\n active?: boolean;\n}\n\nexport interface SegmentedBarProps {\n data: Segment[];\n /** Bar thickness in px. */\n height?: number;\n /**\n * How segments get colour:\n * - `mono` (default): grayscale, active segment is ink, the rest are muted tints.\n * - `categorical`: the capped unordered palette (≤4 meaningful categories).\n * - `sequential`: single-hue magnitude ramp, in data order.\n */\n scale?: 'mono' | 'categorical' | 'sequential';\n /** Show the label + value row beneath the bar. */\n showLegend?: boolean;\n className?: string;\n}\n\n/**\n * Cairn SegmentedBar, a single horizontal bar split into labelled parts (a share-of-total\n * / stacked bar). Grayscale by default; hue is opt-in via `scale`. Every segment carries a\n * text label + value, so meaning never rests on colour alone (WCAG-safe). Zero-dependency.\n */\nexport function SegmentedBar({ data, height = 40, scale = 'mono', showLegend = true, className }: SegmentedBarProps) {\n // Negative / non-finite segment values would produce invalid or overflowing widths; clamp to 0.\n const safe = (v: number) => (Number.isFinite(v) && v > 0 ? v : 0);\n const total = data.reduce((s, d) => s + safe(d.value), 0) || 1;\n const hasActive = data.some((d) => d.active);\n\n const fill = (d: Segment, i: number): string => {\n if (scale === 'categorical') return categorical(i);\n if (scale === 'sequential') return sequential(i, data.length);\n // mono: ink for the active (or all, when none is active), muted tints otherwise.\n if (!hasActive) return chartToken.ink;\n return d.active ? chartToken.ink : chartToken.muted;\n };\n\n // Accessible foreground paired to each fill, WCAG AA, never a blend mode that guesses.\n const onFill = (d: Segment, i: number): string => {\n if (scale === 'categorical') return categoricalOn(i);\n if (scale === 'sequential') return sequentialOn(i, data.length);\n // mono: white throughout. `muted` is neutral.500 now (it had to darken to carry its own 3:1\n // shape contrast), so it takes white at 4.5:1 — ink on it would be 3.7:1 and fail.\n return 'var(--sv-sys-color-on-primary)';\n };\n\n // A keyline only where the fill cannot carry its own 3:1 shape contrast. Since mono and\n // categorical fills were darkened to clear 3:1 unaided, in practice this fires ONLY on the\n // pale low end of the sequential ramp — every other segment draws no border at all, because\n // boxing every segment turns the bar into a table (rule 9, AGENTS.md).\n const edge = (d: Segment, i: number): string | undefined => {\n if (scale === 'categorical') return markEdge(categoricalNeedsEdge(i));\n if (scale === 'sequential') return markEdge(sequentialNeedsEdge(i, data.length));\n return markEdge(toneNeedsEdge(!hasActive || d.active ? 'ink' : 'muted'));\n };\n\n return (\n <div className={cn('w-full', className)}>\n {/* A thin gap separates adjacent segments, so the keyline is not needed for that job: it\n appears only under a pale fill, which cannot carry the 3:1 shape contrast against the\n surface on its own (AGENTS.md rule 9). */}\n <div\n className=\"flex w-full\"\n style={{ height, gap: 2 }}\n role=\"img\"\n aria-label={data.map((d) => `${d.label} ${d.value}`).join(', ')}\n >\n {data.map((d, i) => (\n <div\n key={d.label}\n className=\"flex items-center justify-end px-2 first:rounded-l-control last:rounded-r-control\"\n style={{\n width: `${(safe(d.value) / total) * 100}%`,\n background: fill(d, i),\n boxShadow: edge(d, i),\n }}\n >\n <span className=\"truncate sv-body-xs font-medium tabular-nums\" style={{ color: onFill(d, i) }}>{d.value}</span>\n </div>\n ))}\n </div>\n {showLegend && (\n <ul className=\"mt-3 flex flex-wrap gap-x-4 gap-y-1\">\n {data.map((d, i) => (\n <li key={d.label} className={cn('flex items-center gap-1.5 sv-body-sm', d.active ? 'text-on-surface' : 'text-on-surface-variant')}>\n <span className=\"size-2 shrink-0 rounded-swatch\" style={{ background: fill(d, i) }} aria-hidden=\"true\" />\n {d.label}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\nSegmentedBar.displayName = 'SegmentedBar';\n"],"mappings":";;;;;;;;;;;;;;;;AAyFY,cAOA,YAPA;AAtDL,SAAS,aAAa,EAAE,MAAM,SAAS,IAAI,QAAQ,QAAQ,aAAa,MAAM,UAAU,GAAsB;AAEnH,QAAM,OAAO,CAAC,MAAe,OAAO,SAAS,CAAC,KAAK,IAAI,IAAI,IAAI;AAC/D,QAAM,QAAQ,KAAK,OAAO,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,KAAK,GAAG,CAAC,KAAK;AAC7D,QAAM,YAAY,KAAK,KAAK,CAAC,MAAM,EAAE,MAAM;AAE3C,QAAM,OAAO,CAAC,GAAY,MAAsB;AAC9C,QAAI,UAAU,cAAe,QAAO,YAAY,CAAC;AACjD,QAAI,UAAU,aAAc,QAAO,WAAW,GAAG,KAAK,MAAM;AAE5D,QAAI,CAAC,UAAW,QAAO,WAAW;AAClC,WAAO,EAAE,SAAS,WAAW,MAAM,WAAW;AAAA,EAChD;AAGA,QAAM,SAAS,CAAC,GAAY,MAAsB;AAChD,QAAI,UAAU,cAAe,QAAO,cAAc,CAAC;AACnD,QAAI,UAAU,aAAc,QAAO,aAAa,GAAG,KAAK,MAAM;AAG9D,WAAO;AAAA,EACT;AAMA,QAAM,OAAO,CAAC,GAAY,MAAkC;AAC1D,QAAI,UAAU,cAAe,QAAO,SAAS,qBAAqB,CAAC,CAAC;AACpE,QAAI,UAAU,aAAc,QAAO,SAAS,oBAAoB,GAAG,KAAK,MAAM,CAAC;AAC/E,WAAO,SAAS,cAAc,CAAC,aAAa,EAAE,SAAS,QAAQ,OAAO,CAAC;AAAA,EACzE;AAEA,SACE,qBAAC,SAAI,WAAW,GAAG,UAAU,SAAS,GAIpC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,QAAQ,KAAK,EAAE;AAAA,QACxB,MAAK;AAAA,QACL,cAAY,KAAK,IAAI,CAAC,MAAM,GAAG,EAAE,KAAK,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,IAAI;AAAA,QAE7D,eAAK,IAAI,CAAC,GAAG,MACZ;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO;AAAA,cACL,OAAO,GAAI,KAAK,EAAE,KAAK,IAAI,QAAS,GAAG;AAAA,cACvC,YAAY,KAAK,GAAG,CAAC;AAAA,cACrB,WAAW,KAAK,GAAG,CAAC;AAAA,YACtB;AAAA,YAEA,8BAAC,UAAK,WAAU,gDAA+C,OAAO,EAAE,OAAO,OAAO,GAAG,CAAC,EAAE,GAAI,YAAE,OAAM;AAAA;AAAA,UARnG,EAAE;AAAA,QAST,CACD;AAAA;AAAA,IACH;AAAA,IACC,cACC,oBAAC,QAAG,WAAU,uCACX,eAAK,IAAI,CAAC,GAAG,MACZ,qBAAC,QAAiB,WAAW,GAAG,wCAAwC,EAAE,SAAS,oBAAoB,yBAAyB,GAC9H;AAAA,0BAAC,UAAK,WAAU,kCAAiC,OAAO,EAAE,YAAY,KAAK,GAAG,CAAC,EAAE,GAAG,eAAY,QAAO;AAAA,MACtG,EAAE;AAAA,SAFI,EAAE,KAGX,CACD,GACH;AAAA,KAEJ;AAEJ;AACA,aAAa,cAAc;","names":[]}
|
|
@@ -27,10 +27,10 @@ var CATEGORICAL_ON = [
|
|
|
27
27
|
// white, on neutral.900 (16.6:1)
|
|
28
28
|
"var(--sv-sys-color-on-primary)",
|
|
29
29
|
// white, on main.700 (6.0:1)
|
|
30
|
-
"var(--sv-sys-color-on-
|
|
31
|
-
//
|
|
30
|
+
"var(--sv-sys-color-on-primary)",
|
|
31
|
+
// white, on neutral.500 (4.5:1)
|
|
32
32
|
"var(--sv-sys-color-on-surface)"
|
|
33
|
-
// ink, on main.
|
|
33
|
+
// ink, on main.400 (5.0:1)
|
|
34
34
|
];
|
|
35
35
|
var SEQUENTIAL_ON = [
|
|
36
36
|
"var(--sv-sys-color-on-surface)",
|
|
@@ -64,7 +64,7 @@ function sequential(i, n) {
|
|
|
64
64
|
function sequentialOn(i, n) {
|
|
65
65
|
return SEQUENTIAL_ON[rampIndex(i, n)];
|
|
66
66
|
}
|
|
67
|
-
var CATEGORICAL_PALE = [false, false,
|
|
67
|
+
var CATEGORICAL_PALE = [false, false, false, false];
|
|
68
68
|
var SEQUENTIAL_PALE = [true, true, false, false, false];
|
|
69
69
|
function categoricalNeedsEdge(i) {
|
|
70
70
|
return CATEGORICAL_PALE[wrap(i, CATEGORICAL_MAX)];
|
|
@@ -72,8 +72,8 @@ function categoricalNeedsEdge(i) {
|
|
|
72
72
|
function sequentialNeedsEdge(i, n) {
|
|
73
73
|
return SEQUENTIAL_PALE[rampIndex(i, n)];
|
|
74
74
|
}
|
|
75
|
-
function toneNeedsEdge(
|
|
76
|
-
return
|
|
75
|
+
function toneNeedsEdge(_tone) {
|
|
76
|
+
return false;
|
|
77
77
|
}
|
|
78
78
|
function markEdge(needed) {
|
|
79
79
|
return needed ? `inset 0 0 0 1px ${chartToken.markEdge}` : void 0;
|
|
@@ -93,4 +93,4 @@ export {
|
|
|
93
93
|
toneNeedsEdge,
|
|
94
94
|
markEdge
|
|
95
95
|
};
|
|
96
|
-
//# sourceMappingURL=chunk-
|
|
96
|
+
//# sourceMappingURL=chunk-G2XJK244.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/charts/lib/series.ts"],"sourcesContent":["/**\n * Cairn data-viz colour, the single place a series gets a colour.\n *\n * Rule: grayscale first. A single series is `ink`; a comparison series is `muted`.\n * Reach for hue only when categories are genuinely unordered (`categorical`, capped\n * at 4) or encode magnitude (`sequential`, single-hue). Never hand-pick a hex, every\n * value here is a `sys.chart.*` token resolved at runtime via its CSS variable, so a\n * theme swap (light↔dark) recolours the charts for free.\n */\n\n/** Semantic chart roles → their CSS variable. The single place a chart hue is named;\n * components consume these, never the raw `--sv-sys-chart-*` var. `accent` is the one\n * opt-in hue (the signature accent) a fixed-shape chart may promote a value to. */\nexport const chartToken = {\n ink: 'var(--sv-sys-chart-ink)',\n muted: 'var(--sv-sys-chart-muted)',\n markEdge: 'var(--sv-sys-chart-mark-edge)',\n accent: 'var(--sv-sys-chart-categorical-2)',\n grid: 'var(--sv-sys-chart-grid)',\n axis: 'var(--sv-sys-chart-axis)',\n track: 'var(--sv-sys-chart-track)',\n} as const;\n\n/** The unordered-category palette. HARD CAP at 4, a 5th category needs a pattern or\n * label, never a 5th hue. Indices wrap so a longer series degrades loudly, not silently. */\nconst CATEGORICAL = [\n 'var(--sv-sys-chart-categorical-1)',\n 'var(--sv-sys-chart-categorical-2)',\n 'var(--sv-sys-chart-categorical-3)',\n 'var(--sv-sys-chart-categorical-4)',\n] as const;\n\n/** Single-hue magnitude ramp (low → high). */\nconst SEQUENTIAL = [\n 'var(--sv-sys-chart-sequential-1)',\n 'var(--sv-sys-chart-sequential-2)',\n 'var(--sv-sys-chart-sequential-3)',\n 'var(--sv-sys-chart-sequential-4)',\n 'var(--sv-sys-chart-sequential-5)',\n] as const;\n\nexport const CATEGORICAL_MAX = CATEGORICAL.length;\n\n/** Accessible foreground for text/marks laid ON each categorical fill. Every pair below\n * clears WCAG AA (≥4.5:1). The accent category is main.700, not the brand main.600: a chart\n * fill carries a small value label, and 600 only clears the 3:1 large-text bar (ink 4.
|
|
1
|
+
{"version":3,"sources":["../src/charts/lib/series.ts"],"sourcesContent":["/**\n * Cairn data-viz colour, the single place a series gets a colour.\n *\n * Rule: grayscale first. A single series is `ink`; a comparison series is `muted`.\n * Reach for hue only when categories are genuinely unordered (`categorical`, capped\n * at 4) or encode magnitude (`sequential`, single-hue). Never hand-pick a hex, every\n * value here is a `sys.chart.*` token resolved at runtime via its CSS variable, so a\n * theme swap (light↔dark) recolours the charts for free.\n */\n\n/** Semantic chart roles → their CSS variable. The single place a chart hue is named;\n * components consume these, never the raw `--sv-sys-chart-*` var. `accent` is the one\n * opt-in hue (the signature accent) a fixed-shape chart may promote a value to. */\nexport const chartToken = {\n ink: 'var(--sv-sys-chart-ink)',\n muted: 'var(--sv-sys-chart-muted)',\n markEdge: 'var(--sv-sys-chart-mark-edge)',\n accent: 'var(--sv-sys-chart-categorical-2)',\n grid: 'var(--sv-sys-chart-grid)',\n axis: 'var(--sv-sys-chart-axis)',\n track: 'var(--sv-sys-chart-track)',\n} as const;\n\n/** The unordered-category palette. HARD CAP at 4, a 5th category needs a pattern or\n * label, never a 5th hue. Indices wrap so a longer series degrades loudly, not silently. */\nconst CATEGORICAL = [\n 'var(--sv-sys-chart-categorical-1)',\n 'var(--sv-sys-chart-categorical-2)',\n 'var(--sv-sys-chart-categorical-3)',\n 'var(--sv-sys-chart-categorical-4)',\n] as const;\n\n/** Single-hue magnitude ramp (low → high). */\nconst SEQUENTIAL = [\n 'var(--sv-sys-chart-sequential-1)',\n 'var(--sv-sys-chart-sequential-2)',\n 'var(--sv-sys-chart-sequential-3)',\n 'var(--sv-sys-chart-sequential-4)',\n 'var(--sv-sys-chart-sequential-5)',\n] as const;\n\nexport const CATEGORICAL_MAX = CATEGORICAL.length;\n\n/** Accessible foreground for text/marks laid ON each categorical fill. Every pair below\n * clears WCAG AA (≥4.5:1). The accent category is main.700, not the brand main.600: a chart\n * fill carries a small value label, and 600 only clears the 3:1 large-text bar (ink 4.04:1).\n * Index-matched to CATEGORICAL, never guess contrast at runtime. */\nconst CATEGORICAL_ON = [\n 'var(--sv-sys-color-on-primary)', // white, on neutral.900 (16.6:1)\n 'var(--sv-sys-color-on-primary)', // white, on main.700 (6.0:1)\n 'var(--sv-sys-color-on-primary)', // white, on neutral.500 (4.5:1)\n 'var(--sv-sys-color-on-surface)', // ink, on main.400 (5.0:1)\n] as const;\n\n/** Accessible foreground per sequential step. The ramp is the accent, so it stays legible\n * under ink further up than a blue ramp would: main.100/300/500 take ink, only the darker\n * main.700/900 take white. Index-matched to SEQUENTIAL. */\nconst SEQUENTIAL_ON = [\n 'var(--sv-sys-color-on-surface)', // ink, on main.100 (12.4:1)\n 'var(--sv-sys-color-on-surface)', // ink, on main.300 (6.9:1)\n 'var(--sv-sys-color-on-surface)', // ink, on main.500 (4.8:1)\n 'var(--sv-sys-color-on-primary)', // white, on main.700 (6.0:1)\n 'var(--sv-sys-color-on-primary)', // white, on main.900 (11.4:1)\n] as const;\n\n/** Chart line-mark weights, in px. The single stroke scale for the family: every line mark\n * (sparkline, area line, trend line) uses `line`; reference/guide lines use `guide`. Radial\n * gauges (Ring) set their own arc thickness. Lives here beside `chartToken` so the whole\n * chart visual language (colour + stroke) has one home. */\nexport const chartStroke = { line: 2, guide: 1 } as const;\n\n/** The mono tone of a chart mark → its `sys.chart.*` colour. `ink` = the single/active series,\n * `muted` = a comparison/secondary series, `accent` = the one opt-in hue (the signature accent).\n * The single definition of the `tone` option, shared by every chart in the family. */\nexport function toneFill(tone: 'ink' | 'muted' | 'accent'): string {\n if (tone === 'accent') return chartToken.accent;\n if (tone === 'muted') return chartToken.muted;\n return chartToken.ink;\n}\n\nconst wrap = (i: number, n: number) => ((i % n) + n) % n;\nconst rampIndex = (i: number, n: number) =>\n n <= 1 ? SEQUENTIAL.length - 1 : Math.round(Math.min(Math.max(i / (n - 1), 0), 1) * (SEQUENTIAL.length - 1));\n\n/** Colour for category `i` (0-based). Wraps past the cap, pair with a label/pattern. */\nexport function categorical(i: number): string {\n return CATEGORICAL[wrap(i, CATEGORICAL_MAX)];\n}\n\n/** WCAG-AA foreground for text drawn on `categorical(i)`. */\nexport function categoricalOn(i: number): string {\n return CATEGORICAL_ON[wrap(i, CATEGORICAL_MAX)];\n}\n\n/** Colour for the `i`-th of `n` steps on the single-hue magnitude ramp. */\nexport function sequential(i: number, n: number): string {\n return SEQUENTIAL[rampIndex(i, n)];\n}\n\n/** WCAG-AA foreground for text drawn on `sequential(i, n)`. */\nexport function sequentialOn(i: number, n: number): string {\n return SEQUENTIAL_ON[rampIndex(i, n)];\n}\n\n/** Which fills sit under 3:1 against the surface and therefore need a `mark-edge` keyline to\n * carry their shape contrast (rule 9). Everything else already clears 3:1 on its own and takes\n * **no border at all**: a keyline on a dark or saturated fill is decoration, not accessibility,\n * and a chart where every mark is boxed reads as a table, not as data. Measured per value,\n * index-matched, never guessed at runtime.\n *\n * Mono and categorical fills were DARKENED so every one of them clears 3:1 unaided — that is why\n * bars and segments carry no border at all any more. categorical: neutral.900 (16.6:1),\n * main.700 (6.0:1), neutral.500 (4.5:1), main.400 (3.3:1) all pass.\n *\n * `sequential` is the one exception, and it is structural rather than an oversight: a magnitude\n * ramp has to start pale, so main.100 (1.4:1) and main.300 (2.6:1) cannot be darkened without\n * destroying the very thing the ramp encodes. Those two keep a keyline; main.500 (3.7:1) up\n * carry themselves. */\nconst CATEGORICAL_PALE = [false, false, false, false] as const;\nconst SEQUENTIAL_PALE = [true, true, false, false, false] as const;\n\n/** True when `categorical(i)` needs a keyline. */\nexport function categoricalNeedsEdge(i: number): boolean {\n return CATEGORICAL_PALE[wrap(i, CATEGORICAL_MAX)];\n}\n\n/** True when `sequential(i, n)` needs a keyline. */\nexport function sequentialNeedsEdge(i: number, n: number): boolean {\n return SEQUENTIAL_PALE[rampIndex(i, n)];\n}\n\n/** True when a mono `tone` fill needs a keyline. None do: `muted` moved to neutral.500 and now\n * clears 3:1 on its own (4.5:1 light / 3.7:1 dark), so mono marks draw no border at all. Kept as\n * a function rather than inlined, so a future tone that IS pale has one place to declare it. */\nexport function toneNeedsEdge(_tone: 'ink' | 'muted' | 'accent'): boolean {\n return false;\n}\n\n/** The keyline itself, or `undefined` when the mark carries its own contrast. Feed straight to\n * a style `boxShadow`, so a component never hand-writes the inset shadow. */\nexport function markEdge(needed: boolean): string | undefined {\n return needed ? `inset 0 0 0 1px ${chartToken.markEdge}` : undefined;\n}\n"],"mappings":";AAaO,IAAM,aAAa;AAAA,EACxB,KAAK;AAAA,EACL,OAAO;AAAA,E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,CAAC,MAAM,MAAM,OAAO,OAAO,KAAK;AAGjD,SAAS,qBAAqB,GAAoB;AACvD,SAAO,iBAAiB,KAAK,GAAG,eAAe,CAAC;AAClD;AAGO,SAAS,oBAAoB,GAAW,GAAoB;AACjE,SAAO,gBAAgB,UAAU,GAAG,CAAC,CAAC;AACxC;AAKO,SAAS,cAAc,OAA4C;AACxE,SAAO;AACT;AAIO,SAAS,SAAS,QAAqC;AAC5D,SAAO,SAAS,mBAAmB,WAAW,QAAQ,KAAK;AAC7D;","names":[]}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
chartStroke,
|
|
8
8
|
chartToken,
|
|
9
9
|
toneFill
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-G2XJK244.js";
|
|
11
11
|
import {
|
|
12
12
|
cn
|
|
13
13
|
} from "./chunk-DXRY7AS4.js";
|
|
@@ -88,4 +88,4 @@ LineChart.displayName = "LineChart";
|
|
|
88
88
|
export {
|
|
89
89
|
LineChart
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=chunk-
|
|
91
|
+
//# sourceMappingURL=chunk-OWIUMX76.js.map
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import {
|
|
4
4
|
chartToken,
|
|
5
5
|
markEdge,
|
|
6
|
-
toneFill
|
|
7
|
-
|
|
6
|
+
toneFill,
|
|
7
|
+
toneNeedsEdge
|
|
8
|
+
} from "./chunk-G2XJK244.js";
|
|
8
9
|
import {
|
|
9
10
|
cn
|
|
10
11
|
} from "./chunk-DXRY7AS4.js";
|
|
@@ -57,9 +58,10 @@ function BarChart({ data, height = 200, showValue = true, tone = "ink", classNam
|
|
|
57
58
|
style: {
|
|
58
59
|
height: `${Math.max(2, h / max * 100)}%`,
|
|
59
60
|
background: on ? activeFill : mutedFill,
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
|
|
61
|
+
// No keyline: `muted` is neutral.500 now and clears 3:1 against the surface on
|
|
62
|
+
// its own, as does the active ink bar. Routed through `toneNeedsEdge` rather
|
|
63
|
+
// than hardcoded so the pale-fill decision stays in one place (rule 9).
|
|
64
|
+
boxShadow: markEdge(toneNeedsEdge(on ? "ink" : "muted"))
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
)
|
|
@@ -87,4 +89,4 @@ BarChart.displayName = "BarChart";
|
|
|
87
89
|
export {
|
|
88
90
|
BarChart
|
|
89
91
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-S4HVXD6Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/bar-chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { chartToken, toneFill, markEdge, toneNeedsEdge } from './lib/series';\n\nexport interface BarDatum {\n label: string;\n value: number;\n /** Highlight this bar (ink) and show its value by default. */\n active?: boolean;\n}\n\nexport interface BarChartProps {\n data: BarDatum[];\n height?: number;\n showValue?: boolean;\n /** Colour of the promoted bar. Defaults to ink; `accent` uses the signature accent. */\n tone?: 'ink' | 'accent';\n className?: string;\n}\n\n/**\n * Cairn BarChart, grayscale-first: muted neutral bars, the active bar promoted to ink\n * (or the signature accent via `tone=\"accent\"`) with a value pill. Interactive: hover any\n * bar to promote it and reveal its value. Colours resolve from `sys.chart.*` tokens (via\n * `chartToken`), so a theme swap recolours the chart for free. The chart carries a text\n * `aria-label` listing every label/value, so the data is never mouse-only (WCAG-safe).\n */\nexport function BarChart({ data, height = 200, showValue = true, tone = 'ink', className }: BarChartProps) {\n const max = Math.max(...data.map((d) => (Number.isFinite(d.value) ? d.value : 0)), 1);\n const [hover, setHover] = React.useState<number | null>(null);\n\n const activeFill = toneFill(tone);\n const mutedFill = chartToken.muted;\n\n return (\n <div className={cn('w-full', className)} role=\"group\" aria-label=\"Bar chart\">\n <div className=\"flex items-end gap-2\" style={{ height }} onMouseLeave={() => setHover(null)}>\n {data.map((d, i) => {\n const on = d.active || hover === i;\n const dim = hover != null && hover !== i;\n const h = Number.isFinite(d.value) ? d.value : 0;\n return (\n // Each bar is a focusable graphical object: keyboard + screen-reader parity with hover,\n // so its value is never mouse-only (rule 9). Focus mirrors hover to reveal the pill.\n <div\n key={d.label}\n role=\"img\"\n aria-label={`${d.label}: ${d.value}`}\n tabIndex={0}\n className=\"flex h-full flex-1 flex-col items-center justify-end gap-2 rounded-control outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus\"\n onMouseEnter={() => setHover(i)}\n onFocus={() => setHover(i)}\n onBlur={() => setHover(null)}\n >\n <span\n className={cn(\n 'rounded-pill px-2 py-0.5 sv-body-xs font-medium tabular-nums transition-opacity duration-150',\n on && showValue ? 'opacity-100' : 'opacity-0'\n )}\n style={{ background: activeFill, color: 'var(--sv-sys-color-on-primary)' }}\n >\n {d.value}\n </span>\n <div\n className={cn(\n 'w-full rounded-t-control transition-[height,background-color,opacity] duration-500 ease-out',\n dim && 'opacity-60'\n )}\n style={{\n height: `${Math.max(2, (h / max) * 100)}%`,\n background: on ? activeFill : mutedFill,\n // No keyline: `muted` is neutral.500 now and clears 3:1 against the surface on\n // its own, as does the active ink bar. Routed through `toneNeedsEdge` rather\n // than hardcoded so the pale-fill decision stays in one place (rule 9).\n boxShadow: markEdge(toneNeedsEdge(on ? 'ink' : 'muted')),\n }}\n />\n </div>\n );\n })}\n </div>\n <div className=\"mt-3 flex gap-2\" aria-hidden=\"true\">\n {data.map((d, i) => (\n <span\n key={d.label}\n className={cn(\n 'flex-1 text-center sv-body-sm transition-colors',\n d.active || hover === i ? 'text-on-surface' : 'text-on-surface-variant'\n )}\n >\n {d.label}\n </span>\n ))}\n </div>\n </div>\n );\n}\nBarChart.displayName = 'BarChart';\n"],"mappings":";;;;;;;;;;;AACA,YAAY,WAAW;AA4CX,SAUE,KAVF;AAjBL,SAAS,SAAS,EAAE,MAAM,SAAS,KAAK,YAAY,MAAM,OAAO,OAAO,UAAU,GAA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aAAa;AAAA;AAAA;AAAA;AAAA,oBAI9B,WAAW,SAAS,cAAc,KAAK,QAAQ,OAAO,CAAC;AAAA,kBACzD;AAAA;AAAA,cACF;AAAA;AAAA;AAAA,UA/BK,EAAE;AAAA,QAgCT;AAAA;AAAA,IAEJ,CAAC,GACH;AAAA,IACA,oBAAC,SAAI,WAAU,mBAAkB,eAAY,QAC1C,eAAK,IAAI,CAAC,GAAG,MACZ;AAAA,MAAC;AAAA;AAAA,QAEC,WAAW;AAAA,UACT;AAAA,UACA,EAAE,UAAU,UAAU,IAAI,oBAAoB;AAAA,QAChD;AAAA,QAEC,YAAE;AAAA;AAAA,MANE,EAAE;AAAA,IAOT,CACD,GACH;AAAA,KACF;AAEJ;AACA,SAAS,cAAc;","names":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
chartToken,
|
|
5
5
|
toneFill
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-G2XJK244.js";
|
|
7
7
|
import {
|
|
8
8
|
cn
|
|
9
9
|
} from "./chunk-DXRY7AS4.js";
|
|
@@ -95,4 +95,4 @@ Ring.displayName = "Ring";
|
|
|
95
95
|
export {
|
|
96
96
|
Ring
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
98
|
+
//# sourceMappingURL=chunk-YX6MSLUB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/charts/ring.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { chartToken, toneFill } from './lib/series';\n\nexport interface RingProps {\n /** Progress, 0-100. */\n value: number;\n /** Outer diameter in px. */\n size?: number;\n /** Ring thickness in px. */\n thickness?: number;\n /** Colour of the filled arc. Defaults to ink; `accent` uses the signature accent. */\n tone?: 'ink' | 'accent';\n /**\n * Explicit arc colour (a token / CSS colour), overrides `tone`. Pass only colours that\n * clear 3:1 against the surface as a thin stroke, ink, blue, or a dark graphite. Silver\n * and mid-gray are fill-only (they fail as a line); see AGENTS.md rule 9.\n */\n color?: string;\n /**\n * Draw a darker keyline under the arc so a light, low-contrast colour (a pale accent step) stays\n * perceptible, the rim carries the 3:1 shape contrast the fill can't (AGENTS.md rule 9).\n * `true` uses ink; pass a colour (e.g. `sys.color.accent-edge`) for a tonal, in-family rim.\n */\n casing?: boolean | string;\n /** Fill the arc from empty on mount. Honours `prefers-reduced-motion`. */\n animate?: boolean;\n /** Centre content, e.g. the value. Omit for a bare ring. */\n children?: React.ReactNode;\n /** Accessible label; falls back to \"<value>%\". */\n 'aria-label'?: string;\n className?: string;\n}\n\n/**\n * Cairn Ring, single-value radial progress. Grayscale by default (ink arc on a\n * neutral track); `tone=\"accent\"` opts into the signature accent, or pass an explicit\n * `color`. The arc fills from empty on mount (rounded cap, 12 o'clock, clockwise).\n * Zero-dependency SVG. A client component (`'use client'`): the mount animation uses state;\n * pass `animate={false}` to render it statically.\n */\nexport function Ring({\n value,\n size = 160,\n thickness = 14,\n tone = 'ink',\n color,\n casing = false,\n animate = true,\n children,\n className,\n 'aria-label': ariaLabel,\n}: RingProps) {\n const pct = Math.min(Math.max(Number.isFinite(value) ? value : 0, 0), 100);\n const r = (size - thickness) / 2;\n const c = 2 * Math.PI * r;\n\n // Fill from empty on mount: first client paint is 0, then rAF advances to the value so the\n // CSS transition animates. Under prefers-reduced-motion we jump straight to the value with the\n // transition removed — self-contained, never relying on a global reduced-motion rule existing.\n const [progress, setProgress] = React.useState(animate ? 0 : pct);\n const [instant, setInstant] = React.useState(!animate);\n React.useEffect(() => {\n if (!animate) {\n setProgress(pct);\n return;\n }\n const reduce =\n typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n if (reduce) {\n setInstant(true);\n setProgress(pct);\n return;\n }\n setInstant(false);\n const id = requestAnimationFrame(() => setProgress(pct));\n return () => cancelAnimationFrame(id);\n }, [pct, animate]);\n\n const arc = (progress / 100) * c;\n const motion = instant ? undefined : 'transition-[stroke-dasharray] duration-[900ms] ease-out';\n const stroke = color ?? toneFill(tone);\n return (\n <div\n className={cn('relative inline-grid place-items-center', className)}\n style={{ width: size, height: size }}\n role=\"img\"\n aria-label={ariaLabel ?? `${Math.round(pct)}%`}\n >\n <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} className=\"rotate-[-90deg]\" aria-hidden=\"true\">\n <circle cx={size / 2} cy={size / 2} r={r} fill=\"none\" stroke={chartToken.track} strokeWidth={thickness} />\n {casing && (\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={typeof casing === 'string' ? casing : 'var(--sv-sys-color-on-surface)'}\n strokeWidth={thickness + 2}\n strokeLinecap=\"round\"\n strokeDasharray={`${arc} ${c - arc}`}\n className={motion}\n />\n )}\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={thickness}\n strokeLinecap=\"round\"\n strokeDasharray={`${arc} ${c - arc}`}\n className={motion}\n />\n </svg>\n {children != null && <div className=\"absolute inset-0 grid place-items-center\">{children}</div>}\n </div>\n );\n}\nRing.displayName = 'Ring';\n"],"mappings":";;;;;;;;;AAEA,YAAY,WAAW;AAyFjB,SACE,KADF;AAhDC,SAAS,KAAK;AAAA,EACnB;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA,SAAS;AAAA,EACT,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,cAAc;AAChB,GAAc;AACZ,QAAM,MAAM,KAAK,IAAI,KAAK,IAAI,OAAO,SAAS,KAAK,IAAI,QAAQ,GAAG,CAAC,GAAG,GAAG;AACzE,QAAM,KAAK,OAAO,aAAa;AAC/B,QAAM,IAAI,IAAI,KAAK,KAAK;AAKxB,QAAM,CAAC,UAAU,WAAW,IAAU,eAAS,UAAU,IAAI,GAAG;AAChE,QAAM,CAAC,SAAS,UAAU,IAAU,eAAS,CAAC,OAAO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ACX;AAAA,cACA,MAAK;AAAA,cACL;AAAA,cACA,aAAa;AAAA,cACb,eAAc;AAAA,cACd,iBAAiB,GAAG,GAAG,IAAI,IAAI,GAAG;AAAA,cAClC,WAAW;AAAA;AAAA,UACb;AAAA,WACF;AAAA,QACC,YAAY,QAAQ,oBAAC,SAAI,WAAU,4CAA4C,UAAS;AAAA;AAAA;AAAA,EAC3F;AAEJ;AACA,KAAK,cAAc;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
Button,
|
|
3
|
+
buttonVariants
|
|
4
|
+
} from "./chunk-BWYWI4BC.js";
|
|
4
5
|
import {
|
|
5
6
|
LogoMark
|
|
6
7
|
} from "./chunk-IVQKYAL6.js";
|
|
7
8
|
import {
|
|
8
9
|
Logo
|
|
9
10
|
} from "./chunk-QZYA5GS2.js";
|
|
10
|
-
import {
|
|
11
|
-
Button,
|
|
12
|
-
buttonVariants
|
|
13
|
-
} from "./chunk-BWYWI4BC.js";
|
|
14
11
|
import {
|
|
15
12
|
Card,
|
|
16
13
|
CardContent,
|
|
@@ -21,17 +18,17 @@ import {
|
|
|
21
18
|
} from "./chunk-7GXL7U5X.js";
|
|
22
19
|
import {
|
|
23
20
|
BarChart
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-S4HVXD6Z.js";
|
|
25
22
|
import {
|
|
26
23
|
LineChart
|
|
27
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OWIUMX76.js";
|
|
28
25
|
import "./chunk-27MWE4F5.js";
|
|
29
26
|
import {
|
|
30
27
|
Ring
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-YX6MSLUB.js";
|
|
32
29
|
import {
|
|
33
30
|
SegmentedBar
|
|
34
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CZ3JB37A.js";
|
|
35
32
|
import {
|
|
36
33
|
CATEGORICAL_MAX,
|
|
37
34
|
categorical,
|
|
@@ -41,10 +38,13 @@ import {
|
|
|
41
38
|
sequential,
|
|
42
39
|
sequentialOn,
|
|
43
40
|
toneFill
|
|
44
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-G2XJK244.js";
|
|
45
42
|
import {
|
|
46
43
|
Stat
|
|
47
44
|
} from "./chunk-XGYKA3GE.js";
|
|
45
|
+
import {
|
|
46
|
+
Icon
|
|
47
|
+
} from "./chunk-N5ZJZ7I3.js";
|
|
48
48
|
import "./chunk-DXRY7AS4.js";
|
|
49
49
|
export {
|
|
50
50
|
BarChart,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/charts/ring.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { chartToken, toneFill } from './lib/series';\n\nexport interface RingProps {\n /** Progress, 0-100. */\n value: number;\n /** Outer diameter in px. */\n size?: number;\n /** Ring thickness in px. */\n thickness?: number;\n /** Colour of the filled arc. Defaults to ink; `accent` uses the signature accent. */\n tone?: 'ink' | 'accent';\n /**\n * Explicit arc colour (a token / CSS colour), overrides `tone`. Pass only colours that\n * clear 3:1 against the surface as a thin stroke, ink, blue, or a dark graphite. Acid\n * and mid-gray are fill-only (they fail as a line); see AGENTS.md rule 9.\n */\n color?: string;\n /**\n * Draw a darker keyline under the arc so a light, low-contrast colour (a pale accent step) stays\n * perceptible, the rim carries the 3:1 shape contrast the fill can't (AGENTS.md rule 9).\n * `true` uses ink; pass a colour (e.g. `sys.color.accent-edge`) for a tonal, in-family rim.\n */\n casing?: boolean | string;\n /** Fill the arc from empty on mount. Honours `prefers-reduced-motion`. */\n animate?: boolean;\n /** Centre content, e.g. the value. Omit for a bare ring. */\n children?: React.ReactNode;\n /** Accessible label; falls back to \"<value>%\". */\n 'aria-label'?: string;\n className?: string;\n}\n\n/**\n * Cairn Ring, single-value radial progress. Grayscale by default (ink arc on a\n * neutral track); `tone=\"accent\"` opts into the signature accent, or pass an explicit\n * `color`. The arc fills from empty on mount (rounded cap, 12 o'clock, clockwise).\n * Zero-dependency SVG. A client component (`'use client'`): the mount animation uses state;\n * pass `animate={false}` to render it statically.\n */\nexport function Ring({\n value,\n size = 160,\n thickness = 14,\n tone = 'ink',\n color,\n casing = false,\n animate = true,\n children,\n className,\n 'aria-label': ariaLabel,\n}: RingProps) {\n const pct = Math.min(Math.max(Number.isFinite(value) ? value : 0, 0), 100);\n const r = (size - thickness) / 2;\n const c = 2 * Math.PI * r;\n\n // Fill from empty on mount: first client paint is 0, then rAF advances to the value so the\n // CSS transition animates. Under prefers-reduced-motion we jump straight to the value with the\n // transition removed — self-contained, never relying on a global reduced-motion rule existing.\n const [progress, setProgress] = React.useState(animate ? 0 : pct);\n const [instant, setInstant] = React.useState(!animate);\n React.useEffect(() => {\n if (!animate) {\n setProgress(pct);\n return;\n }\n const reduce =\n typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n if (reduce) {\n setInstant(true);\n setProgress(pct);\n return;\n }\n setInstant(false);\n const id = requestAnimationFrame(() => setProgress(pct));\n return () => cancelAnimationFrame(id);\n }, [pct, animate]);\n\n const arc = (progress / 100) * c;\n const motion = instant ? undefined : 'transition-[stroke-dasharray] duration-[900ms] ease-out';\n const stroke = color ?? toneFill(tone);\n return (\n <div\n className={cn('relative inline-grid place-items-center', className)}\n style={{ width: size, height: size }}\n role=\"img\"\n aria-label={ariaLabel ?? `${Math.round(pct)}%`}\n >\n <svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} className=\"rotate-[-90deg]\" aria-hidden=\"true\">\n <circle cx={size / 2} cy={size / 2} r={r} fill=\"none\" stroke={chartToken.track} strokeWidth={thickness} />\n {casing && (\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={typeof casing === 'string' ? casing : 'var(--sv-sys-color-on-surface)'}\n strokeWidth={thickness + 2}\n strokeLinecap=\"round\"\n strokeDasharray={`${arc} ${c - arc}`}\n className={motion}\n />\n )}\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={thickness}\n strokeLinecap=\"round\"\n strokeDasharray={`${arc} ${c - arc}`}\n className={motion}\n />\n </svg>\n {children != null && <div className=\"absolute inset-0 grid place-items-center\">{children}</div>}\n </div>\n );\n}\nRing.displayName = 'Ring';\n"],"mappings":";;;;;;;;;AAEA,YAAY,WAAW;AAyFjB,SACE,KADF;AAhDC,SAAS,KAAK;AAAA,EACnB;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA,SAAS;AAAA,EACT,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,cAAc;AAChB,GAAc;AACZ,QAAM,MAAM,KAAK,IAAI,KAAK,IAAI,OAAO,SAAS,KAAK,IAAI,QAAQ,GAAG,CAAC,GAAG,GAAG;AACzE,QAAM,KAAK,OAAO,aAAa;AAC/B,QAAM,IAAI,IAAI,KAAK,KAAK;AAKxB,QAAM,CAAC,UAAU,WAAW,IAAU,eAAS,UAAU,IAAI,GAAG;AAChE,QAAM,CAAC,SAAS,UAAU,IAAU,eAAS,CAAC,OAAO;AACrD,EAAM,gBAAU,MAAM;AACpB,QAAI,CAAC,SAAS;AACZ,kBAAY,GAAG;AACf;AAAA,IACF;AACA,UAAM,SACJ,OAAO,WAAW,eAAe,OAAO,aAAa,kCAAkC,EAAE;AAC3F,QAAI,QAAQ;AACV,iBAAW,IAAI;AACf,kBAAY,GAAG;AACf;AAAA,IACF;AACA,eAAW,KAAK;AAChB,UAAM,KAAK,sBAAsB,MAAM,YAAY,GAAG,CAAC;AACvD,WAAO,MAAM,qBAAqB,EAAE;AAAA,EACtC,GAAG,CAAC,KAAK,OAAO,CAAC;AAEjB,QAAM,MAAO,WAAW,MAAO;AAC/B,QAAM,SAAS,UAAU,SAAY;AACrC,QAAM,SAAS,SAAS,SAAS,IAAI;AACrC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,2CAA2C,SAAS;AAAA,MAClE,OAAO,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,MACnC,MAAK;AAAA,MACL,cAAY,aAAa,GAAG,KAAK,MAAM,GAAG,CAAC;AAAA,MAE3C;AAAA,6BAAC,SAAI,OAAO,MAAM,QAAQ,MAAM,SAAS,OAAO,IAAI,IAAI,IAAI,IAAI,WAAU,mBAAkB,eAAY,QACtG;AAAA,8BAAC,YAAO,IAAI,OAAO,GAAG,IAAI,OAAO,GAAG,GAAM,MAAK,QAAO,QAAQ,WAAW,OAAO,aAAa,WAAW;AAAA,UACvG,UACC;AAAA,YAAC;AAAA;AAAA,cACC,IAAI,OAAO;AAAA,cACX,IAAI,OAAO;AAAA,cACX;AAAA,cACA,MAAK;AAAA,cACL,QAAQ,OAAO,WAAW,WAAW,SAAS;AAAA,cAC9C,aAAa,YAAY;AAAA,cACzB,eAAc;AAAA,cACd,iBAAiB,GAAG,GAAG,IAAI,IAAI,GAAG;AAAA,cAClC,WAAW;AAAA;AAAA,UACb;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,IAAI,OAAO;AAAA,cACX,IAAI,OAAO;AAAA,cACX;AAAA,cACA,MAAK;AAAA,cACL;AAAA,cACA,aAAa;AAAA,cACb,eAAc;AAAA,cACd,iBAAiB,GAAG,GAAG,IAAI,IAAI,GAAG;AAAA,cAClC,WAAW;AAAA;AAAA,UACb;AAAA,WACF;AAAA,QACC,YAAY,QAAQ,oBAAC,SAAI,WAAU,4CAA4C,UAAS;AAAA;AAAA;AAAA,EAC3F;AAEJ;AACA,KAAK,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/charts/segmented-bar.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport {\n categorical, categoricalOn, categoricalNeedsEdge,\n sequential, sequentialOn, sequentialNeedsEdge,\n toneNeedsEdge, markEdge, chartToken,\n} from './lib/series';\n\nexport interface Segment {\n label: string;\n value: number;\n /** Pull this segment forward (ink) and others recede. */\n active?: boolean;\n}\n\nexport interface SegmentedBarProps {\n data: Segment[];\n /** Bar thickness in px. */\n height?: number;\n /**\n * How segments get colour:\n * - `mono` (default): grayscale, active segment is ink, the rest are muted tints.\n * - `categorical`: the capped unordered palette (≤4 meaningful categories).\n * - `sequential`: single-hue magnitude ramp, in data order.\n */\n scale?: 'mono' | 'categorical' | 'sequential';\n /** Show the label + value row beneath the bar. */\n showLegend?: boolean;\n className?: string;\n}\n\n/**\n * Cairn SegmentedBar, a single horizontal bar split into labelled parts (a share-of-total\n * / stacked bar). Grayscale by default; hue is opt-in via `scale`. Every segment carries a\n * text label + value, so meaning never rests on colour alone (WCAG-safe). Zero-dependency.\n */\nexport function SegmentedBar({ data, height = 40, scale = 'mono', showLegend = true, className }: SegmentedBarProps) {\n // Negative / non-finite segment values would produce invalid or overflowing widths; clamp to 0.\n const safe = (v: number) => (Number.isFinite(v) && v > 0 ? v : 0);\n const total = data.reduce((s, d) => s + safe(d.value), 0) || 1;\n const hasActive = data.some((d) => d.active);\n\n const fill = (d: Segment, i: number): string => {\n if (scale === 'categorical') return categorical(i);\n if (scale === 'sequential') return sequential(i, data.length);\n // mono: ink for the active (or all, when none is active), muted tints otherwise.\n if (!hasActive) return chartToken.ink;\n return d.active ? chartToken.ink : chartToken.muted;\n };\n\n // Accessible foreground paired to each fill, WCAG AA, never a blend mode that guesses.\n const onFill = (d: Segment, i: number): string => {\n if (scale === 'categorical') return categoricalOn(i);\n if (scale === 'sequential') return sequentialOn(i, data.length);\n // mono: white on ink fills, ink on the light muted tint.\n if (!hasActive) return 'var(--sv-sys-color-on-primary)';\n return d.active ? 'var(--sv-sys-color-on-primary)' : 'var(--sv-sys-color-on-surface)';\n };\n\n // A keyline only where the fill cannot carry its own 3:1 shape contrast. Dark and saturated\n // segments get none: boxing every segment turns the bar into a table (rule 9, AGENTS.md).\n const edge = (d: Segment, i: number): string | undefined => {\n if (scale === 'categorical') return markEdge(categoricalNeedsEdge(i));\n if (scale === 'sequential') return markEdge(sequentialNeedsEdge(i, data.length));\n return markEdge(toneNeedsEdge(!hasActive || d.active ? 'ink' : 'muted'));\n };\n\n return (\n <div className={cn('w-full', className)}>\n {/* A thin gap separates adjacent segments, so the keyline is not needed for that job: it\n appears only under a pale fill, which cannot carry the 3:1 shape contrast against the\n surface on its own (AGENTS.md rule 9). */}\n <div\n className=\"flex w-full\"\n style={{ height, gap: 2 }}\n role=\"img\"\n aria-label={data.map((d) => `${d.label} ${d.value}`).join(', ')}\n >\n {data.map((d, i) => (\n <div\n key={d.label}\n className=\"flex items-center justify-end px-2 first:rounded-l-control last:rounded-r-control\"\n style={{\n width: `${(safe(d.value) / total) * 100}%`,\n background: fill(d, i),\n boxShadow: edge(d, i),\n }}\n >\n <span className=\"truncate sv-body-xs font-medium tabular-nums\" style={{ color: onFill(d, i) }}>{d.value}</span>\n </div>\n ))}\n </div>\n {showLegend && (\n <ul className=\"mt-3 flex flex-wrap gap-x-4 gap-y-1\">\n {data.map((d, i) => (\n <li key={d.label} className={cn('flex items-center gap-1.5 sv-body-sm', d.active ? 'text-on-surface' : 'text-on-surface-variant')}>\n <span className=\"size-2 shrink-0 rounded-swatch\" style={{ background: fill(d, i) }} aria-hidden=\"true\" />\n {d.label}\n </li>\n ))}\n </ul>\n )}\n </div>\n );\n}\nSegmentedBar.displayName = 'SegmentedBar';\n"],"mappings":";;;;;;;;;;;;;;;;AAuFY,cAOA,YAPA;AApDL,SAAS,aAAa,EAAE,MAAM,SAAS,IAAI,QAAQ,QAAQ,aAAa,MAAM,UAAU,GAAsB;AAEnH,QAAM,OAAO,CAAC,MAAe,OAAO,SAAS,CAAC,KAAK,IAAI,IAAI,IAAI;AAC/D,QAAM,QAAQ,KAAK,OAAO,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,KAAK,GAAG,CAAC,KAAK;AAC7D,QAAM,YAAY,KAAK,KAAK,C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gDAA+C,OAAO,EAAE,OAAO,OAAO,GAAG,CAAC,EAAE,GAAI,YAAE,OAAM;AAAA;AAAA,UARnG,EAAE;AAAA,QAST,CACD;AAAA;AAAA,IACH;AAAA,IACC,cACC,oBAAC,QAAG,WAAU,uCACX,eAAK,IAAI,CAAC,GAAG,MACZ,qBAAC,QAAiB,WAAW,GAAG,wCAAwC,EAAE,SAAS,oBAAoB,yBAAyB,GAC9H;AAAA,0BAAC,UAAK,WAAU,kCAAiC,OAAO,EAAE,YAAY,KAAK,GAAG,CAAC,EAAE,GAAG,eAAY,QAAO;AAAA,MACtG,EAAE;AAAA,SAFI,EAAE,KAGX,CACD,GACH;AAAA,KAEJ;AAEJ;AACA,aAAa,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/charts/bar-chart.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { chartToken, toneFill, markEdge } from './lib/series';\n\nexport interface BarDatum {\n label: string;\n value: number;\n /** Highlight this bar (ink) and show its value by default. */\n active?: boolean;\n}\n\nexport interface BarChartProps {\n data: BarDatum[];\n height?: number;\n showValue?: boolean;\n /** Colour of the promoted bar. Defaults to ink; `accent` uses the signature accent. */\n tone?: 'ink' | 'accent';\n className?: string;\n}\n\n/**\n * Cairn BarChart, grayscale-first: muted neutral bars, the active bar promoted to ink\n * (or the signature accent via `tone=\"accent\"`) with a value pill. Interactive: hover any\n * bar to promote it and reveal its value. Colours resolve from `sys.chart.*` tokens (via\n * `chartToken`), so a theme swap recolours the chart for free. The chart carries a text\n * `aria-label` listing every label/value, so the data is never mouse-only (WCAG-safe).\n */\nexport function BarChart({ data, height = 200, showValue = true, tone = 'ink', className }: BarChartProps) {\n const max = Math.max(...data.map((d) => (Number.isFinite(d.value) ? d.value : 0)), 1);\n const [hover, setHover] = React.useState<number | null>(null);\n\n const activeFill = toneFill(tone);\n const mutedFill = chartToken.muted;\n\n return (\n <div className={cn('w-full', className)} role=\"group\" aria-label=\"Bar chart\">\n <div className=\"flex items-end gap-2\" style={{ height }} onMouseLeave={() => setHover(null)}>\n {data.map((d, i) => {\n const on = d.active || hover === i;\n const dim = hover != null && hover !== i;\n const h = Number.isFinite(d.value) ? d.value : 0;\n return (\n // Each bar is a focusable graphical object: keyboard + screen-reader parity with hover,\n // so its value is never mouse-only (rule 9). Focus mirrors hover to reveal the pill.\n <div\n key={d.label}\n role=\"img\"\n aria-label={`${d.label}: ${d.value}`}\n tabIndex={0}\n className=\"flex h-full flex-1 flex-col items-center justify-end gap-2 rounded-control outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus\"\n onMouseEnter={() => setHover(i)}\n onFocus={() => setHover(i)}\n onBlur={() => setHover(null)}\n >\n <span\n className={cn(\n 'rounded-pill px-2 py-0.5 sv-body-xs font-medium tabular-nums transition-opacity duration-150',\n on && showValue ? 'opacity-100' : 'opacity-0'\n )}\n style={{ background: activeFill, color: 'var(--sv-sys-color-on-primary)' }}\n >\n {d.value}\n </span>\n <div\n className={cn(\n 'w-full rounded-t-control transition-[height,background-color,opacity] duration-500 ease-out',\n dim && 'opacity-60'\n )}\n style={{\n height: `${Math.max(2, (h / max) * 100)}%`,\n background: on ? activeFill : mutedFill,\n // Only the pale muted fill (< 3:1 vs the surface) takes a keyline; the active\n // ink bar carries its own shape contrast and stays bare (AGENTS.md rule 9).\n boxShadow: markEdge(!on),\n }}\n />\n </div>\n );\n })}\n </div>\n <div className=\"mt-3 flex gap-2\" aria-hidden=\"true\">\n {data.map((d, i) => (\n <span\n key={d.label}\n className={cn(\n 'flex-1 text-center sv-body-sm transition-colors',\n d.active || hover === i ? 'text-on-surface' : 'text-on-surface-variant'\n )}\n >\n {d.label}\n </span>\n ))}\n </div>\n </div>\n );\n}\nBarChart.displayName = 'BarChart';\n"],"mappings":";;;;;;;;;;AACA,YAAY,WAAW;AA4CX,SAUE,KAVF;AAjBL,SAAS,SAAS,EAAE,MAAM,SA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