@alfadocs/ui-kit-debug 0.32.1 → 0.32.2
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/_chunks/{stat-EC2Papj7.js → stat-DhAA5ltU.js} +97 -79
- package/dist/_chunks/stat-DhAA5ltU.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +9 -0
- package/dist/components/stat/stat.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/stat-EC2Papj7.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as z, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as X, useId as Z, useCallback as O, useRef as tt, useMemo as et } from "react";
|
|
3
3
|
import { c as V } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
4
|
+
import { useTranslation as B } from "react-i18next";
|
|
5
|
+
import { u as st } from "./use-count-up-BLLetaZ8.js";
|
|
6
|
+
const P = V("ds:flex ds:flex-col ds:h-full", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: "ds:gap-[var(--spacing-xs)]",
|
|
@@ -48,7 +48,7 @@ const O = V("ds:flex ds:flex-col ds:h-full", {
|
|
|
48
48
|
size: "md",
|
|
49
49
|
align: "start"
|
|
50
50
|
}
|
|
51
|
-
}),
|
|
51
|
+
}), U = V("type-metric", {
|
|
52
52
|
variants: {
|
|
53
53
|
size: {
|
|
54
54
|
sm: "ds:[--type-metric-size:var(--font-size-xl)]",
|
|
@@ -60,6 +60,22 @@ const O = V("ds:flex ds:flex-col ds:h-full", {
|
|
|
60
60
|
outlined: "",
|
|
61
61
|
elevated: "",
|
|
62
62
|
compact: ""
|
|
63
|
+
},
|
|
64
|
+
// Colour of the headline metric value. Defaults to `--foreground`
|
|
65
|
+
// (the existing render). `primary` / `accent` are the brand intents
|
|
66
|
+
// — use for hero / marketing stats where the number IS the visual
|
|
67
|
+
// marker. `success` / `destructive` / `info` / `warning` map to the
|
|
68
|
+
// semantic tokens for KPI tiles that want to signal status via the
|
|
69
|
+
// value colour itself (e.g. revenue green, debt red). The trend
|
|
70
|
+
// chevron and the label colour are independent of this prop.
|
|
71
|
+
intent: {
|
|
72
|
+
foreground: "ds:text-[var(--foreground)]",
|
|
73
|
+
primary: "ds:text-[var(--primary)]",
|
|
74
|
+
accent: "ds:text-[var(--accent)]",
|
|
75
|
+
success: "ds:text-[var(--success)]",
|
|
76
|
+
destructive: "ds:text-[var(--destructive)]",
|
|
77
|
+
info: "ds:text-[var(--info)]",
|
|
78
|
+
warning: "ds:text-[var(--warning)]"
|
|
63
79
|
}
|
|
64
80
|
},
|
|
65
81
|
compoundVariants: [
|
|
@@ -81,9 +97,10 @@ const O = V("ds:flex ds:flex-col ds:h-full", {
|
|
|
81
97
|
],
|
|
82
98
|
defaultVariants: {
|
|
83
99
|
size: "md",
|
|
84
|
-
variant: "default"
|
|
100
|
+
variant: "default",
|
|
101
|
+
intent: "foreground"
|
|
85
102
|
}
|
|
86
|
-
}),
|
|
103
|
+
}), rt = V(
|
|
87
104
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-label",
|
|
88
105
|
{
|
|
89
106
|
variants: {
|
|
@@ -97,76 +114,77 @@ const O = V("ds:flex ds:flex-col ds:h-full", {
|
|
|
97
114
|
trend: "flat"
|
|
98
115
|
}
|
|
99
116
|
}
|
|
100
|
-
),
|
|
117
|
+
), at = { up: "↑", down: "↓", flat: "→" }, nt = {
|
|
101
118
|
up: "stat.trend.up",
|
|
102
119
|
down: "stat.trend.down",
|
|
103
120
|
flat: "stat.trend.flat"
|
|
104
121
|
};
|
|
105
|
-
function
|
|
122
|
+
function it({
|
|
106
123
|
trend: d,
|
|
107
124
|
delta: t,
|
|
108
125
|
deltaFormat: c = "decimal",
|
|
109
126
|
locale: a
|
|
110
127
|
}) {
|
|
111
|
-
const { t: e, i18n:
|
|
128
|
+
const { t: e, i18n: o } = B(), l = typeof t == "string" ? t : new Intl.NumberFormat(a ?? o.language, {
|
|
112
129
|
style: c === "percent" ? "percent" : "decimal"
|
|
113
130
|
}).format(c === "percent" ? t / 100 : t);
|
|
114
|
-
return /* @__PURE__ */ z("span", { className:
|
|
115
|
-
/* @__PURE__ */ i("span", { "aria-hidden": "true", children:
|
|
116
|
-
/* @__PURE__ */ i("span", { className: "ds:sr-only", children: e(
|
|
117
|
-
|
|
131
|
+
return /* @__PURE__ */ z("span", { className: rt({ trend: d }), children: [
|
|
132
|
+
/* @__PURE__ */ i("span", { "aria-hidden": "true", children: at[d] }),
|
|
133
|
+
/* @__PURE__ */ i("span", { className: "ds:sr-only", children: e(nt[d]) }),
|
|
134
|
+
l
|
|
118
135
|
] });
|
|
119
136
|
}
|
|
120
|
-
function
|
|
137
|
+
function dt(d, t) {
|
|
121
138
|
const c = d.trim();
|
|
122
139
|
if (c === "") return null;
|
|
123
140
|
let a = "", e = c;
|
|
124
141
|
e.startsWith("+") ? (a = "+", e = e.slice(1).trimStart()) : (e.startsWith("-") || e.startsWith("−")) && (a = "-", e = e.slice(1).trimStart());
|
|
125
|
-
let
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
let
|
|
142
|
+
let o = "";
|
|
143
|
+
const l = e.match(/[KMB]$/i);
|
|
144
|
+
l && (o = l[0], e = e.slice(0, -1).trimEnd());
|
|
145
|
+
let u = "", m = ".";
|
|
129
146
|
try {
|
|
130
|
-
const
|
|
131
|
-
for (const n of
|
|
132
|
-
n.type === "group" ?
|
|
147
|
+
const x = new Intl.NumberFormat(t).formatToParts(12345.6);
|
|
148
|
+
for (const n of x)
|
|
149
|
+
n.type === "group" ? u = n.value : n.type === "decimal" && (m = n.value);
|
|
133
150
|
} catch {
|
|
134
151
|
}
|
|
135
152
|
const g = e.match(/^(\d+)\.(\d+)$/);
|
|
136
|
-
if (g && !(g[2].length === 3 &&
|
|
153
|
+
if (g && !(g[2].length === 3 && u === ".")) {
|
|
137
154
|
const n = Number.parseFloat(e);
|
|
138
155
|
if (Number.isFinite(n))
|
|
139
|
-
return { target: n, sign: a, suffix:
|
|
156
|
+
return { target: n, sign: a, suffix: o };
|
|
140
157
|
}
|
|
141
158
|
let s = e;
|
|
142
|
-
|
|
159
|
+
u !== "" && (s = s.split(u).join("")), m !== "." && (s = s.split(m).join(".")), s = s.replace(/[\s\u00A0\u202F]/g, "");
|
|
143
160
|
const v = Number.parseFloat(s);
|
|
144
|
-
return Number.isFinite(v) ? { target: v, sign: a, suffix:
|
|
161
|
+
return Number.isFinite(v) ? { target: v, sign: a, suffix: o } : null;
|
|
145
162
|
}
|
|
146
|
-
const
|
|
163
|
+
const ct = X(
|
|
147
164
|
({
|
|
148
165
|
label: d,
|
|
149
166
|
value: t,
|
|
150
167
|
format: c,
|
|
151
168
|
currency: a,
|
|
152
169
|
locale: e,
|
|
153
|
-
trend:
|
|
154
|
-
delta:
|
|
155
|
-
deltaFormat:
|
|
156
|
-
icon:
|
|
170
|
+
trend: o,
|
|
171
|
+
delta: l,
|
|
172
|
+
deltaFormat: u = "decimal",
|
|
173
|
+
icon: m,
|
|
157
174
|
loading: g = !1,
|
|
158
175
|
animate: s = !1,
|
|
159
176
|
animateOnEveryView: v = !1,
|
|
160
|
-
animateDurationMs:
|
|
177
|
+
animateDurationMs: x = 1600,
|
|
161
178
|
animateLocale: n,
|
|
162
|
-
animateSeparators:
|
|
163
|
-
variant:
|
|
179
|
+
animateSeparators: b,
|
|
180
|
+
variant: h = "default",
|
|
164
181
|
size: y = "md",
|
|
165
182
|
align: I = "start",
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
183
|
+
intent: M = "foreground",
|
|
184
|
+
className: j,
|
|
185
|
+
...k
|
|
186
|
+
}, R) => {
|
|
187
|
+
const { i18n: K } = B(), T = Z(), f = e ?? K.language, Y = O(() => {
|
|
170
188
|
if (typeof t == "string") return t;
|
|
171
189
|
switch (c) {
|
|
172
190
|
case "currency":
|
|
@@ -186,10 +204,10 @@ const dt = Q(
|
|
|
186
204
|
return new Intl.NumberFormat(f).format(t);
|
|
187
205
|
}
|
|
188
206
|
}, [t, c, f, a])(), N = n ?? f;
|
|
189
|
-
|
|
190
|
-
const r =
|
|
207
|
+
tt(!1);
|
|
208
|
+
const r = et(() => s ? typeof t == "number" ? Number.isFinite(t) ? { target: t, sign: "", suffix: "" } : null : dt(t, N) : null, [s, t, N]), _ = s && r !== null, q = (r == null ? void 0 : r.target) ?? 0, F = (r == null ? void 0 : r.sign) ?? "", $ = (r == null ? void 0 : r.suffix) ?? "", H = O(
|
|
191
209
|
(w) => {
|
|
192
|
-
const
|
|
210
|
+
const E = (() => {
|
|
193
211
|
try {
|
|
194
212
|
return new Intl.NumberFormat(N, {
|
|
195
213
|
useGrouping: !0
|
|
@@ -199,46 +217,46 @@ const dt = Q(
|
|
|
199
217
|
}
|
|
200
218
|
})();
|
|
201
219
|
let p;
|
|
202
|
-
if (
|
|
203
|
-
if (
|
|
204
|
-
const
|
|
220
|
+
if (E)
|
|
221
|
+
if (b) {
|
|
222
|
+
const A = Math.abs(w), D = Math.trunc(A), G = A - D, J = b.thousand ?? "", S = String(D).replace(
|
|
205
223
|
/\B(?=(\d{3})+(?!\d))/g,
|
|
206
|
-
|
|
224
|
+
J
|
|
207
225
|
);
|
|
208
|
-
if (
|
|
226
|
+
if (G === 0)
|
|
209
227
|
p = S;
|
|
210
228
|
else {
|
|
211
|
-
const
|
|
212
|
-
p =
|
|
229
|
+
const L = G.toFixed(6).replace(/0+$/, "").slice(2), Q = b.decimal ?? ".";
|
|
230
|
+
p = L ? S + Q + L : S;
|
|
213
231
|
}
|
|
214
232
|
} else
|
|
215
|
-
p =
|
|
233
|
+
p = E.format(Math.abs(w));
|
|
216
234
|
else
|
|
217
235
|
p = String(Math.abs(w));
|
|
218
|
-
let
|
|
219
|
-
return F === "" && w < 0 && (
|
|
236
|
+
let W = F;
|
|
237
|
+
return F === "" && w < 0 && (W = "-"), `${W}${p}${$}`;
|
|
220
238
|
},
|
|
221
|
-
[N,
|
|
222
|
-
),
|
|
223
|
-
to:
|
|
239
|
+
[N, b, F, $]
|
|
240
|
+
), C = st({
|
|
241
|
+
to: q,
|
|
224
242
|
from: 0,
|
|
225
|
-
durationMs:
|
|
243
|
+
durationMs: x,
|
|
226
244
|
startOnVisible: !0,
|
|
227
245
|
retriggerOnReEntry: v,
|
|
228
246
|
// `formatter` is the only path we use — it owns both the locale
|
|
229
247
|
// formatting and the sign/suffix re-application.
|
|
230
|
-
formatter:
|
|
248
|
+
formatter: H
|
|
231
249
|
});
|
|
232
250
|
return g ? /* @__PURE__ */ z(
|
|
233
251
|
"div",
|
|
234
252
|
{
|
|
235
|
-
ref:
|
|
253
|
+
ref: R,
|
|
236
254
|
role: "group",
|
|
237
255
|
"aria-busy": "true",
|
|
238
256
|
"aria-label": d,
|
|
239
257
|
"data-component": "stat",
|
|
240
|
-
className:
|
|
241
|
-
...
|
|
258
|
+
className: P({ variant: h, size: y, align: I, className: j }),
|
|
259
|
+
...k,
|
|
242
260
|
children: [
|
|
243
261
|
/* @__PURE__ */ i("div", { className: "ds:h-[var(--skeleton-label-h)] ds:w-[var(--skeleton-label-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]" }),
|
|
244
262
|
/* @__PURE__ */ i("div", { className: "ds:h-[var(--skeleton-value-h)] ds:w-[var(--skeleton-value-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]" })
|
|
@@ -247,15 +265,15 @@ const dt = Q(
|
|
|
247
265
|
) : /* @__PURE__ */ z(
|
|
248
266
|
"div",
|
|
249
267
|
{
|
|
250
|
-
ref:
|
|
268
|
+
ref: R,
|
|
251
269
|
role: "group",
|
|
252
|
-
"aria-labelledby":
|
|
270
|
+
"aria-labelledby": T,
|
|
253
271
|
"data-component": "stat",
|
|
254
|
-
className:
|
|
255
|
-
...
|
|
272
|
+
className: P({ variant: h, size: y, align: I, className: j }),
|
|
273
|
+
...k,
|
|
256
274
|
children: [
|
|
257
275
|
/* @__PURE__ */ z("span", { className: "ds:inline-flex ds:items-center", children: [
|
|
258
|
-
|
|
276
|
+
m && /* @__PURE__ */ i(
|
|
259
277
|
"span",
|
|
260
278
|
{
|
|
261
279
|
"aria-hidden": "true",
|
|
@@ -268,19 +286,19 @@ const dt = Q(
|
|
|
268
286
|
"ds:text-[color:var(--accent)]",
|
|
269
287
|
"ds:forced-colors:text-[CanvasText]"
|
|
270
288
|
].join(" "),
|
|
271
|
-
children:
|
|
289
|
+
children: m
|
|
272
290
|
}
|
|
273
291
|
),
|
|
274
292
|
/* @__PURE__ */ i(
|
|
275
293
|
"span",
|
|
276
294
|
{
|
|
277
|
-
id:
|
|
295
|
+
id: T,
|
|
278
296
|
className: "type-label ds:text-[var(--muted-foreground)]",
|
|
279
297
|
children: d
|
|
280
298
|
}
|
|
281
299
|
)
|
|
282
300
|
] }),
|
|
283
|
-
|
|
301
|
+
_ ? (
|
|
284
302
|
// The animated number is wrapped in an `aria-live="off"` span
|
|
285
303
|
// so screen readers don't announce every interpolated frame.
|
|
286
304
|
// The `role="group"` ancestor (with `aria-labelledby` pointing
|
|
@@ -289,19 +307,19 @@ const dt = Q(
|
|
|
289
307
|
/* @__PURE__ */ i(
|
|
290
308
|
"span",
|
|
291
309
|
{
|
|
292
|
-
ref:
|
|
310
|
+
ref: C.ref,
|
|
293
311
|
"aria-live": "off",
|
|
294
|
-
className:
|
|
295
|
-
children:
|
|
312
|
+
className: U({ size: y, variant: h, intent: M }),
|
|
313
|
+
children: C.value
|
|
296
314
|
}
|
|
297
315
|
)
|
|
298
|
-
) : /* @__PURE__ */ i("span", { className:
|
|
299
|
-
|
|
300
|
-
|
|
316
|
+
) : /* @__PURE__ */ i("span", { className: U({ size: y, variant: h, intent: M }), children: Y }),
|
|
317
|
+
o != null && l != null && /* @__PURE__ */ i(
|
|
318
|
+
it,
|
|
301
319
|
{
|
|
302
|
-
trend:
|
|
303
|
-
delta:
|
|
304
|
-
deltaFormat:
|
|
320
|
+
trend: o,
|
|
321
|
+
delta: l,
|
|
322
|
+
deltaFormat: u,
|
|
305
323
|
locale: e
|
|
306
324
|
}
|
|
307
325
|
)
|
|
@@ -310,8 +328,8 @@ const dt = Q(
|
|
|
310
328
|
);
|
|
311
329
|
}
|
|
312
330
|
);
|
|
313
|
-
|
|
331
|
+
ct.displayName = "Stat";
|
|
314
332
|
export {
|
|
315
|
-
|
|
333
|
+
ct as S
|
|
316
334
|
};
|
|
317
|
-
//# sourceMappingURL=stat-
|
|
335
|
+
//# sourceMappingURL=stat-DhAA5ltU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-DhAA5ltU.js","sources":["../../src/components/stat/stat.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useId,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { useCountUp } from '../../hooks/use-count-up';\n\n/* ------------------------------------------------------------------ */\n/* CVA — stat root */\n/* ------------------------------------------------------------------ */\n\n// `h-full` lets Stats grow to fill a flex / grid parent's cell, so a\n// row paired with taller cards (BenefitCard, Card, etc.) reads as a\n// matching set instead of mismatched heights. In a non-stretching\n// parent (block flow, inline) it's a no-op — block-size defers to\n// content as before. The flex-col inside still pins label/icon row\n// at the top and the number below, so growing the card adds the\n// extra space below the number instead of inserting it between\n// label and value.\nconst statVariants = cva('ds:flex ds:flex-col ds:h-full', {\n variants: {\n variant: {\n default: 'ds:gap-[var(--spacing-xs)]',\n outlined: [\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:border ds:border-[color:var(--border)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n ].join(' '),\n // White card surface with the shared card shadow — matches\n // `Card variant=\"elevated\"` tokens (`--card` + `--shadow-card`) so\n // a grid of elevated Stats reads as a set of shaded panels without\n // nesting a Card around each one.\n elevated: [\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:bg-[var(--card)]',\n 'ds:text-[var(--card-foreground)]',\n 'ds:shadow-[var(--shadow-card)]',\n 'ds:rounded-[var(--radius-lg)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n // Forced-colors: UA strips shadow, so render a border as the\n // separation cue — mirrors Card's forced-colors behaviour.\n 'ds:forced-colors:border ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n compact: 'ds:gap-[var(--spacing-none)]',\n },\n size: {\n sm: '',\n md: '',\n lg: '',\n },\n align: {\n start: 'ds:items-start ds:text-start',\n center: 'ds:items-center ds:text-center',\n end: 'ds:items-end ds:text-end',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n align: 'start',\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — value element */\n/* ------------------------------------------------------------------ */\n\nconst valueVariants = cva('type-metric', {\n variants: {\n size: {\n sm: 'ds:[--type-metric-size:var(--font-size-xl)]',\n md: 'ds:[--type-metric-size:var(--font-size-3xl)]',\n lg: 'ds:[--type-metric-size:var(--font-size-5xl)]',\n },\n variant: {\n default: '',\n outlined: '',\n elevated: '',\n compact: '',\n },\n // Colour of the headline metric value. Defaults to `--foreground`\n // (the existing render). `primary` / `accent` are the brand intents\n // — use for hero / marketing stats where the number IS the visual\n // marker. `success` / `destructive` / `info` / `warning` map to the\n // semantic tokens for KPI tiles that want to signal status via the\n // value colour itself (e.g. revenue green, debt red). The trend\n // chevron and the label colour are independent of this prop.\n intent: {\n foreground: 'ds:text-[var(--foreground)]',\n primary: 'ds:text-[var(--primary)]',\n accent: 'ds:text-[var(--accent)]',\n success: 'ds:text-[var(--success)]',\n destructive: 'ds:text-[var(--destructive)]',\n info: 'ds:text-[var(--info)]',\n warning: 'ds:text-[var(--warning)]',\n },\n },\n compoundVariants: [\n {\n variant: 'compact',\n size: 'sm',\n className: 'ds:[--type-metric-size:var(--font-size-lg)]',\n },\n {\n variant: 'compact',\n size: 'md',\n className: 'ds:[--type-metric-size:var(--font-size-xl)]',\n },\n {\n variant: 'compact',\n size: 'lg',\n className: 'ds:[--type-metric-size:var(--font-size-2xl)]',\n },\n ],\n defaultVariants: {\n size: 'md',\n variant: 'default',\n intent: 'foreground',\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — trend element */\n/* ------------------------------------------------------------------ */\n\nconst trendVariants = cva(\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-label',\n {\n variants: {\n trend: {\n up: 'ds:text-[var(--success)]',\n down: 'ds:text-[var(--destructive)]',\n flat: 'ds:text-[var(--muted-foreground)]',\n },\n },\n defaultVariants: {\n trend: 'flat',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* StatTrend (internal — not exported) */\n/* ------------------------------------------------------------------ */\n\ninterface StatTrendProps {\n trend: 'up' | 'down' | 'flat';\n delta: number | string;\n deltaFormat?: 'decimal' | 'percent';\n locale?: string;\n}\n\nconst ARROW = { up: '↑', down: '↓', flat: '→' } as const;\nconst TREND_KEY = {\n up: 'stat.trend.up',\n down: 'stat.trend.down',\n flat: 'stat.trend.flat',\n} as const;\n\nfunction StatTrend({\n trend,\n delta,\n deltaFormat = 'decimal',\n locale,\n}: StatTrendProps) {\n const { t, i18n } = useTranslation();\n\n const formattedDelta =\n typeof delta === 'string'\n ? delta\n : new Intl.NumberFormat(locale ?? i18n.language, {\n style: deltaFormat === 'percent' ? 'percent' : 'decimal',\n }).format(deltaFormat === 'percent' ? delta / 100 : delta);\n\n return (\n <span className={trendVariants({ trend })}>\n <span aria-hidden=\"true\">{ARROW[trend]}</span>\n <span className=\"ds:sr-only\">{t(TREND_KEY[trend])}</span>\n {formattedDelta}\n </span>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Parse a string value into a numeric target for the count-up */\n/* ------------------------------------------------------------------ */\n\ntype ParsedValue = {\n /** Numeric target for the count-up. */\n target: number;\n /** Leading sign captured from the input string (e.g. \"+\" / \"-\"). */\n sign: '' | '+' | '-';\n /** Trailing shorthand suffix (e.g. \"K\" / \"M\" / \"B\") to re-append. */\n suffix: string;\n};\n\n/**\n * Strip locale-aware separators, a leading sign, and the K/M/B\n * shorthand suffix from a pre-formatted string so the count-up has a\n * pure numeric target to animate towards. Returns `null` for any input\n * that can't be parsed — the caller short-circuits to static rendering\n * in that case.\n */\nfunction parseStatValue(raw: string, locale: string): ParsedValue | null {\n const trimmed = raw.trim();\n if (trimmed === '') return null;\n\n // Capture leading sign so we can re-attach it every frame. Stat's\n // marketing usage (\"+500.000\", \"-12\") often relies on it.\n let sign: '' | '+' | '-' = '';\n let body = trimmed;\n if (body.startsWith('+')) {\n sign = '+';\n body = body.slice(1).trimStart();\n } else if (body.startsWith('-') || body.startsWith('−')) {\n // Hyphen-minus or the typographic minus sign — both treated as -.\n sign = '-';\n body = body.slice(1).trimStart();\n }\n\n // Trailing K / M / B shorthand (case-insensitive). Re-append verbatim\n // so \"+1.5K\" renders as \"+1.5K\" at every frame.\n let suffix = '';\n const suffixMatch = body.match(/[KMB]$/i);\n if (suffixMatch) {\n suffix = suffixMatch[0];\n body = body.slice(0, -1).trimEnd();\n }\n\n // Discover the locale's group + decimal glyphs from a probe value.\n // formatToParts is the canonical way; we fall back to `.` decimal /\n // `,` group if Intl can't tell us (no-locale envs).\n let group = '';\n let decimal = '.';\n try {\n const probe = new Intl.NumberFormat(locale).formatToParts(12345.6);\n for (const part of probe) {\n if (part.type === 'group') group = part.value;\n else if (part.type === 'decimal') decimal = part.value;\n }\n } catch {\n /* swallow — defaults already set */\n }\n\n // Heuristic for input strings that look like JS-native decimals\n // (e.g. `\"1500.25\"`) regardless of the requested locale: if the body\n // is a clean US-style decimal AND the fraction after the `.` is NOT\n // a three-digit thousands group in a locale that uses `.` as the\n // group separator, treat it as a direct numeric literal. This covers\n // the common case where a caller types `value=\"1500.25\"` and expects\n // the count-up to land on 1500.25 even though the output locale is\n // it-IT (which uses `.` for thousands).\n const usStyleMatch = body.match(/^(\\d+)\\.(\\d+)$/);\n if (usStyleMatch) {\n const fractionLen = usStyleMatch[2].length;\n if (!(fractionLen === 3 && group === '.')) {\n const direct = Number.parseFloat(body);\n if (Number.isFinite(direct)) {\n return { target: direct, sign, suffix };\n }\n }\n }\n\n // Strip every group separator we discovered, then normalise the\n // decimal separator to `.` so JS can parseFloat the result.\n // Note: when the locale's group separator is empty (e.g. some\n // numbering systems) the replace is a no-op.\n let normalised = body;\n if (group !== '') {\n normalised = normalised.split(group).join('');\n }\n if (decimal !== '.') {\n normalised = normalised.split(decimal).join('.');\n }\n\n // Defence-in-depth: strip whitespace plus NBSP (U+00A0) and NARROW\n // NO-BREAK SPACE (U+202F) that some locales (fr-FR, it-IT) use as\n // thousand separators. Hex escapes keep this source ASCII-clean.\n normalised = normalised.replace(/[\\s\\u00A0\\u202F]/g, '');\n\n const numeric = Number.parseFloat(normalised);\n if (!Number.isFinite(numeric)) return null;\n\n return { target: numeric, sign, suffix };\n}\n\n/* ------------------------------------------------------------------ */\n/* StatProps */\n/* ------------------------------------------------------------------ */\n\nexport interface StatProps\n extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof statVariants> {\n /** Metric label rendered above the value. */\n label: string;\n /** Numeric or pre-formatted string value. */\n value: number | string;\n /** Number formatting style. Omit to use default decimal formatting. */\n format?: 'decimal' | 'currency' | 'percent';\n /** ISO 4217 currency code — required when format=\"currency\". */\n currency?: string;\n /** BCP 47 locale override. Defaults to the active i18n language. */\n locale?: string;\n /** Trend direction. Requires `delta` to render the trend row. */\n trend?: 'up' | 'down' | 'flat';\n /** Trend delta magnitude, e.g. 12 for \"↑ 12%\". */\n delta?: number | string;\n /** Number formatting style for the delta. Default \"decimal\". */\n deltaFormat?: 'decimal' | 'percent';\n /** Optional leading icon rendered at the start of the label row. */\n icon?: ReactNode;\n /**\n * Colour of the headline value. Defaults to `foreground`. Brand\n * intents (`primary`, `accent`) are for hero / marketing stats where\n * the number is the visual marker. Semantic intents\n * (`success`, `destructive`, `info`, `warning`) signal status via\n * the value colour itself — e.g. revenue green, debt red on KPI\n * tiles. Trend chevron and label colour are independent.\n */\n intent?:\n | 'foreground'\n | 'primary'\n | 'accent'\n | 'success'\n | 'destructive'\n | 'info'\n | 'warning';\n /** Renders animated skeleton placeholders instead of content. */\n loading?: boolean;\n /**\n * Animate the numeric value from 0 (or from the captured leading\n * sign) to the final value when the Stat first scrolls into view.\n * Default `false`. Marketing surfaces opt in; dashboards leave it\n * off so live metrics render immediately.\n */\n animate?: boolean;\n /**\n * When `true`, the count-up re-plays every time the Stat scrolls\n * out of view and back in. Default `false` — animate once per\n * element per session, matching the booking-website hero pattern.\n * Ignored under `prefers-reduced-motion: reduce`.\n */\n animateOnEveryView?: boolean;\n /** Animation duration in milliseconds. Default 1600. */\n animateDurationMs?: number;\n /**\n * BCP 47 locale used for the per-frame count-up formatting. Falls\n * back to `locale`, then to the active i18n language.\n */\n animateLocale?: string;\n /**\n * Override the locale's thousand / decimal glyphs for the count-up.\n * Wins over locale defaults. Pass partial overrides — `decimal`\n * alone is valid; the unspecified separator stays at the locale\n * default.\n */\n animateSeparators?: {\n thousand?: string;\n decimal?: string;\n };\n}\n\n/* ------------------------------------------------------------------ */\n/* Stat */\n/* ------------------------------------------------------------------ */\n\nexport const Stat = forwardRef<HTMLDivElement, StatProps>(\n (\n {\n label,\n value,\n format,\n currency,\n locale,\n trend,\n delta,\n deltaFormat = 'decimal',\n icon,\n loading = false,\n animate = false,\n animateOnEveryView = false,\n animateDurationMs = 1600,\n animateLocale,\n animateSeparators,\n variant = 'default',\n size = 'md',\n align = 'start',\n intent = 'foreground',\n className,\n ...props\n },\n ref,\n ) => {\n const { i18n } = useTranslation();\n const labelId = useId();\n const lang = locale ?? i18n.language;\n\n /* -------------------------------------------------- */\n /* Static formatting — the value as it would appear */\n /* in the non-animated (or post-animation) state. */\n /* -------------------------------------------------- */\n\n const formatValue = useCallback((): string => {\n if (typeof value === 'string') return value;\n\n switch (format) {\n case 'currency':\n return new Intl.NumberFormat(lang, {\n style: 'currency',\n currency: currency ?? 'USD',\n }).format(value);\n case 'percent':\n return new Intl.NumberFormat(lang, { style: 'percent' }).format(\n value,\n );\n case 'decimal':\n return new Intl.NumberFormat(lang, { style: 'decimal' }).format(\n value,\n );\n default:\n return new Intl.NumberFormat(lang).format(value);\n }\n }, [value, format, lang, currency]);\n\n const staticValue = formatValue();\n\n /* -------------------------------------------------- */\n /* Parse the value into a numeric target for the */\n /* count-up. Numeric values use `value` directly; */\n /* string values are stripped of sign / shorthand / */\n /* locale separators and re-decorated each frame. */\n /* -------------------------------------------------- */\n\n const animationLocale = animateLocale ?? lang;\n const hasWarnedRef = useRef<boolean>(false);\n\n const parsed = useMemo<ParsedValue | null>(() => {\n if (!animate) return null;\n if (typeof value === 'number') {\n // Numeric: target is the number itself; no sign / suffix to\n // re-attach.\n return Number.isFinite(value)\n ? { target: value, sign: '', suffix: '' }\n : null;\n }\n return parseStatValue(value, animationLocale);\n }, [animate, value, animationLocale]);\n\n // Dev-mode warning when an animate-flagged Stat has an unparseable\n // string value. Render static, no throw — one warn per component.\n if (\n animate &&\n typeof value === 'string' &&\n parsed === null &&\n import.meta.env.DEV &&\n !hasWarnedRef.current\n ) {\n hasWarnedRef.current = true;\n console.warn(\n `Stat: value=\"${value}\" couldn't be parsed for the count-up animation. Rendering static.`,\n );\n }\n\n const shouldAnimate = animate && parsed !== null;\n\n /* -------------------------------------------------- */\n /* Wire the hook unconditionally — rules-of-hooks. */\n /* When `shouldAnimate` is false the hook still runs */\n /* but `to === from` so it's a no-op visually. */\n /* -------------------------------------------------- */\n\n const target = parsed?.target ?? 0;\n const sign = parsed?.sign ?? '';\n const suffix = parsed?.suffix ?? '';\n\n // Wrap the count-up formatter so the captured sign + suffix are\n // re-applied every frame. The hook hands us the locale-formatted\n // magnitude; we own the decoration around it.\n const formatter = useCallback(\n (n: number) => {\n // Use the absolute value for the magnitude so the captured\n // sign is the sole source of the rendered sign. Negative\n // numbers passed in (e.g. `to: -12`) come through unsigned;\n // we re-apply via `sign`. Always force `useGrouping: true` so\n // ICU's locale-default `min2` doesn't suppress the thousand\n // glyph on 4-digit values like 1.000 (it-IT). The user wrote\n // a stat value — they want it grouped.\n const magnitudeNF = (() => {\n try {\n return new Intl.NumberFormat(animationLocale, {\n useGrouping: true,\n });\n } catch {\n return null;\n }\n })();\n\n let magnitudeStr: string;\n if (magnitudeNF) {\n if (animateSeparators) {\n // Hand-build the grouped magnitude so we don't depend on\n // ICU's locale-by-locale grouping defaults (which differ\n // between engines and can drop the group at 4-digit\n // thresholds even with `useGrouping: true`). Locale only\n // influences sign handling, which we apply separately.\n const abs = Math.abs(n);\n const intPart = Math.trunc(abs);\n const fracPart = abs - intPart;\n const groupGlyph = animateSeparators.thousand ?? '';\n const intStr = String(intPart).replace(\n /\\B(?=(\\d{3})+(?!\\d))/g,\n groupGlyph,\n );\n if (fracPart === 0) {\n magnitudeStr = intStr;\n } else {\n const fracStr = fracPart.toFixed(6).replace(/0+$/, '').slice(2);\n const decimalGlyph = animateSeparators.decimal ?? '.';\n magnitudeStr = fracStr ? intStr + decimalGlyph + fracStr : intStr;\n }\n } else {\n magnitudeStr = magnitudeNF.format(Math.abs(n));\n }\n } else {\n magnitudeStr = String(Math.abs(n));\n }\n\n // Re-derive the sign every frame: the captured sign wins, but\n // a negative `to` with no leading sign in the source still\n // renders with a leading \"-\" so the final formatted output\n // matches locale conventions.\n let resolvedSign: string = sign;\n if (sign === '' && n < 0) resolvedSign = '-';\n\n return `${resolvedSign}${magnitudeStr}${suffix}`;\n },\n [animationLocale, animateSeparators, sign, suffix],\n );\n\n const countUp = useCountUp({\n to: target,\n from: 0,\n durationMs: animateDurationMs,\n startOnVisible: true,\n retriggerOnReEntry: animateOnEveryView,\n // `formatter` is the only path we use — it owns both the locale\n // formatting and the sign/suffix re-application.\n formatter,\n });\n\n /* -------------------------------------------------- */\n /* Loading state */\n /* -------------------------------------------------- */\n\n if (loading) {\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-busy=\"true\"\n aria-label={label}\n data-component=\"stat\"\n className={statVariants({ variant, size, align, className })}\n {...props}\n >\n <div className=\"ds:h-[var(--skeleton-label-h)] ds:w-[var(--skeleton-label-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]\" />\n <div className=\"ds:h-[var(--skeleton-value-h)] ds:w-[var(--skeleton-value-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]\" />\n </div>\n );\n }\n\n /* -------------------------------------------------- */\n /* Render */\n /* -------------------------------------------------- */\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-labelledby={labelId}\n data-component=\"stat\"\n className={statVariants({ variant, size, align, className })}\n {...props}\n >\n <span className=\"ds:inline-flex ds:items-center\">\n {icon && (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:me-[var(--spacing-xs)] ds:inline-flex ds:shrink-0',\n // Accent tint on the leading icon. The icon is decorative\n // (aria-hidden), so magenta-500's 3.2:1 contrast on white\n // is acceptable here — the Stat label + value still\n // carry the accessible name at `--foreground`.\n 'ds:text-[color:var(--accent)]',\n 'ds:forced-colors:text-[CanvasText]',\n ].join(' ')}\n >\n {icon}\n </span>\n )}\n <span\n id={labelId}\n className=\"type-label ds:text-[var(--muted-foreground)]\"\n >\n {label}\n </span>\n </span>\n {shouldAnimate ? (\n // The animated number is wrapped in an `aria-live=\"off\"` span\n // so screen readers don't announce every interpolated frame.\n // The `role=\"group\"` ancestor (with `aria-labelledby` pointing\n // at the label) carries the final accessible reading — the\n // animated frames are decorative only.\n <span\n ref={countUp.ref}\n aria-live=\"off\"\n className={valueVariants({ size, variant, intent })}\n >\n {countUp.value}\n </span>\n ) : (\n <span className={valueVariants({ size, variant, intent })}>\n {staticValue}\n </span>\n )}\n {trend != null && delta != null && (\n <StatTrend\n trend={trend}\n delta={delta}\n deltaFormat={deltaFormat}\n locale={locale}\n />\n )}\n </div>\n );\n },\n);\n\nStat.displayName = 'Stat';\n"],"names":["statVariants","cva","valueVariants","trendVariants","ARROW","TREND_KEY","StatTrend","trend","delta","deltaFormat","locale","t","i18n","useTranslation","formattedDelta","jsx","parseStatValue","raw","trimmed","sign","body","suffix","suffixMatch","group","decimal","probe","part","usStyleMatch","direct","normalised","numeric","Stat","forwardRef","label","value","format","currency","icon","loading","animate","animateOnEveryView","animateDurationMs","animateLocale","animateSeparators","variant","size","align","intent","className","props","ref","labelId","useId","lang","staticValue","useCallback","animationLocale","useRef","parsed","useMemo","shouldAnimate","target","formatter","n","magnitudeNF","magnitudeStr","abs","intPart","fracPart","groupGlyph","intStr","fracStr","decimalGlyph","resolvedSign","countUp","useCountUp","jsxs"],"mappings":";;;;;AAyBA,MAAMA,IAAeC,EAAI,iCAAiC;AAAA,EACxD,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,EACA,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,MAKV,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,QAGA;AAAA,MAAA,EACA,KAAK,GAAG;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,IAEX,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,KAAK;AAAA,IAAA;AAAA,EACP;AAAA,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,UAAAO,GACH;AAAA,UAED/C,KAAS,QAAQC,KAAS,QACzB,gBAAAO;AAAA,YAACT;AAAA,YAAA;AAAA,cACC,OAAAC;AAAA,cACA,OAAAC;AAAA,cACA,aAAAC;AAAA,cACA,QAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAqB,GAAK,cAAc;"}
|
package/dist/agent-catalog.json
CHANGED
|
@@ -24,6 +24,15 @@ export interface StatProps extends HTMLAttributes<HTMLDivElement>, VariantProps<
|
|
|
24
24
|
deltaFormat?: 'decimal' | 'percent';
|
|
25
25
|
/** Optional leading icon rendered at the start of the label row. */
|
|
26
26
|
icon?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Colour of the headline value. Defaults to `foreground`. Brand
|
|
29
|
+
* intents (`primary`, `accent`) are for hero / marketing stats where
|
|
30
|
+
* the number is the visual marker. Semantic intents
|
|
31
|
+
* (`success`, `destructive`, `info`, `warning`) signal status via
|
|
32
|
+
* the value colour itself — e.g. revenue green, debt red on KPI
|
|
33
|
+
* tiles. Trend chevron and label colour are independent.
|
|
34
|
+
*/
|
|
35
|
+
intent?: 'foreground' | 'primary' | 'accent' | 'success' | 'destructive' | 'info' | 'warning';
|
|
27
36
|
/** Renders animated skeleton placeholders instead of content. */
|
|
28
37
|
loading?: boolean;
|
|
29
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../src/components/stat/stat.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAgBlE,QAAA,MAAM,YAAY;;;;8EA6ChB,CAAC;
|
|
1
|
+
{"version":3,"file":"stat.d.ts","sourceRoot":"","sources":["../../../src/components/stat/stat.tsx"],"names":[],"mappings":"AAAA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AAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAMD,eAAO,MAAM,IAAI,sGA+QhB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ import { M as vr } from "./_chunks/map-view-knHSNLoe.js";
|
|
|
60
60
|
import { R as Wr } from "./_chunks/rating-BRD7O74e.js";
|
|
61
61
|
import { S as Ur } from "./_chunks/skeleton-CZbwyJAA.js";
|
|
62
62
|
import { S as Yr, s as jr, u as zr } from "./_chunks/sparkline-DEROcSl0.js";
|
|
63
|
-
import { S as Qr } from "./_chunks/stat-
|
|
63
|
+
import { S as Qr } from "./_chunks/stat-DhAA5ltU.js";
|
|
64
64
|
import { T as Xr } from "./_chunks/tag-CyoaEmf_.js";
|
|
65
65
|
import { T as $r, t as ao } from "./_chunks/timeline-DQa5Tyz4.js";
|
|
66
66
|
import { T as ro } from "./_chunks/timestamp-BV2lC-wV.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit-debug",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stat-EC2Papj7.js","sources":["../../src/components/stat/stat.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useId,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { useCountUp } from '../../hooks/use-count-up';\n\n/* ------------------------------------------------------------------ */\n/* CVA — stat root */\n/* ------------------------------------------------------------------ */\n\n// `h-full` lets Stats grow to fill a flex / grid parent's cell, so a\n// row paired with taller cards (BenefitCard, Card, etc.) reads as a\n// matching set instead of mismatched heights. In a non-stretching\n// parent (block flow, inline) it's a no-op — block-size defers to\n// content as before. The flex-col inside still pins label/icon row\n// at the top and the number below, so growing the card adds the\n// extra space below the number instead of inserting it between\n// label and value.\nconst statVariants = cva('ds:flex ds:flex-col ds:h-full', {\n variants: {\n variant: {\n default: 'ds:gap-[var(--spacing-xs)]',\n outlined: [\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:border ds:border-[color:var(--border)]',\n 'ds:rounded-[var(--radius-md)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n ].join(' '),\n // White card surface with the shared card shadow — matches\n // `Card variant=\"elevated\"` tokens (`--card` + `--shadow-card`) so\n // a grid of elevated Stats reads as a set of shaded panels without\n // nesting a Card around each one.\n elevated: [\n 'ds:gap-[var(--spacing-xs)]',\n 'ds:bg-[var(--card)]',\n 'ds:text-[var(--card-foreground)]',\n 'ds:shadow-[var(--shadow-card)]',\n 'ds:rounded-[var(--radius-lg)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n // Forced-colors: UA strips shadow, so render a border as the\n // separation cue — mirrors Card's forced-colors behaviour.\n 'ds:forced-colors:border ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n compact: 'ds:gap-[var(--spacing-none)]',\n },\n size: {\n sm: '',\n md: '',\n lg: '',\n },\n align: {\n start: 'ds:items-start ds:text-start',\n center: 'ds:items-center ds:text-center',\n end: 'ds:items-end ds:text-end',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n align: 'start',\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — value element */\n/* ------------------------------------------------------------------ */\n\nconst valueVariants = cva('type-metric ds:text-[var(--foreground)]', {\n variants: {\n size: {\n sm: 'ds:[--type-metric-size:var(--font-size-xl)]',\n md: 'ds:[--type-metric-size:var(--font-size-3xl)]',\n lg: 'ds:[--type-metric-size:var(--font-size-5xl)]',\n },\n variant: {\n default: '',\n outlined: '',\n elevated: '',\n compact: '',\n },\n },\n compoundVariants: [\n {\n variant: 'compact',\n size: 'sm',\n className: 'ds:[--type-metric-size:var(--font-size-lg)]',\n },\n {\n variant: 'compact',\n size: 'md',\n className: 'ds:[--type-metric-size:var(--font-size-xl)]',\n },\n {\n variant: 'compact',\n size: 'lg',\n className: 'ds:[--type-metric-size:var(--font-size-2xl)]',\n },\n ],\n defaultVariants: {\n size: 'md',\n variant: 'default',\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA — trend element */\n/* ------------------------------------------------------------------ */\n\nconst trendVariants = cva(\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-label',\n {\n variants: {\n trend: {\n up: 'ds:text-[var(--success)]',\n down: 'ds:text-[var(--destructive)]',\n flat: 'ds:text-[var(--muted-foreground)]',\n },\n },\n defaultVariants: {\n trend: 'flat',\n },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* StatTrend (internal — not exported) */\n/* ------------------------------------------------------------------ */\n\ninterface StatTrendProps {\n trend: 'up' | 'down' | 'flat';\n delta: number | string;\n deltaFormat?: 'decimal' | 'percent';\n locale?: string;\n}\n\nconst ARROW = { up: '↑', down: '↓', flat: '→' } as const;\nconst TREND_KEY = {\n up: 'stat.trend.up',\n down: 'stat.trend.down',\n flat: 'stat.trend.flat',\n} as const;\n\nfunction StatTrend({\n trend,\n delta,\n deltaFormat = 'decimal',\n locale,\n}: StatTrendProps) {\n const { t, i18n } = useTranslation();\n\n const formattedDelta =\n typeof delta === 'string'\n ? delta\n : new Intl.NumberFormat(locale ?? i18n.language, {\n style: deltaFormat === 'percent' ? 'percent' : 'decimal',\n }).format(deltaFormat === 'percent' ? delta / 100 : delta);\n\n return (\n <span className={trendVariants({ trend })}>\n <span aria-hidden=\"true\">{ARROW[trend]}</span>\n <span className=\"ds:sr-only\">{t(TREND_KEY[trend])}</span>\n {formattedDelta}\n </span>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Parse a string value into a numeric target for the count-up */\n/* ------------------------------------------------------------------ */\n\ntype ParsedValue = {\n /** Numeric target for the count-up. */\n target: number;\n /** Leading sign captured from the input string (e.g. \"+\" / \"-\"). */\n sign: '' | '+' | '-';\n /** Trailing shorthand suffix (e.g. \"K\" / \"M\" / \"B\") to re-append. */\n suffix: string;\n};\n\n/**\n * Strip locale-aware separators, a leading sign, and the K/M/B\n * shorthand suffix from a pre-formatted string so the count-up has a\n * pure numeric target to animate towards. Returns `null` for any input\n * that can't be parsed — the caller short-circuits to static rendering\n * in that case.\n */\nfunction parseStatValue(raw: string, locale: string): ParsedValue | null {\n const trimmed = raw.trim();\n if (trimmed === '') return null;\n\n // Capture leading sign so we can re-attach it every frame. Stat's\n // marketing usage (\"+500.000\", \"-12\") often relies on it.\n let sign: '' | '+' | '-' = '';\n let body = trimmed;\n if (body.startsWith('+')) {\n sign = '+';\n body = body.slice(1).trimStart();\n } else if (body.startsWith('-') || body.startsWith('−')) {\n // Hyphen-minus or the typographic minus sign — both treated as -.\n sign = '-';\n body = body.slice(1).trimStart();\n }\n\n // Trailing K / M / B shorthand (case-insensitive). Re-append verbatim\n // so \"+1.5K\" renders as \"+1.5K\" at every frame.\n let suffix = '';\n const suffixMatch = body.match(/[KMB]$/i);\n if (suffixMatch) {\n suffix = suffixMatch[0];\n body = body.slice(0, -1).trimEnd();\n }\n\n // Discover the locale's group + decimal glyphs from a probe value.\n // formatToParts is the canonical way; we fall back to `.` decimal /\n // `,` group if Intl can't tell us (no-locale envs).\n let group = '';\n let decimal = '.';\n try {\n const probe = new Intl.NumberFormat(locale).formatToParts(12345.6);\n for (const part of probe) {\n if (part.type === 'group') group = part.value;\n else if (part.type === 'decimal') decimal = part.value;\n }\n } catch {\n /* swallow — defaults already set */\n }\n\n // Heuristic for input strings that look like JS-native decimals\n // (e.g. `\"1500.25\"`) regardless of the requested locale: if the body\n // is a clean US-style decimal AND the fraction after the `.` is NOT\n // a three-digit thousands group in a locale that uses `.` as the\n // group separator, treat it as a direct numeric literal. This covers\n // the common case where a caller types `value=\"1500.25\"` and expects\n // the count-up to land on 1500.25 even though the output locale is\n // it-IT (which uses `.` for thousands).\n const usStyleMatch = body.match(/^(\\d+)\\.(\\d+)$/);\n if (usStyleMatch) {\n const fractionLen = usStyleMatch[2].length;\n if (!(fractionLen === 3 && group === '.')) {\n const direct = Number.parseFloat(body);\n if (Number.isFinite(direct)) {\n return { target: direct, sign, suffix };\n }\n }\n }\n\n // Strip every group separator we discovered, then normalise the\n // decimal separator to `.` so JS can parseFloat the result.\n // Note: when the locale's group separator is empty (e.g. some\n // numbering systems) the replace is a no-op.\n let normalised = body;\n if (group !== '') {\n normalised = normalised.split(group).join('');\n }\n if (decimal !== '.') {\n normalised = normalised.split(decimal).join('.');\n }\n\n // Defence-in-depth: strip whitespace plus NBSP (U+00A0) and NARROW\n // NO-BREAK SPACE (U+202F) that some locales (fr-FR, it-IT) use as\n // thousand separators. Hex escapes keep this source ASCII-clean.\n normalised = normalised.replace(/[\\s\\u00A0\\u202F]/g, '');\n\n const numeric = Number.parseFloat(normalised);\n if (!Number.isFinite(numeric)) return null;\n\n return { target: numeric, sign, suffix };\n}\n\n/* ------------------------------------------------------------------ */\n/* StatProps */\n/* ------------------------------------------------------------------ */\n\nexport interface StatProps\n extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof statVariants> {\n /** Metric label rendered above the value. */\n label: string;\n /** Numeric or pre-formatted string value. */\n value: number | string;\n /** Number formatting style. Omit to use default decimal formatting. */\n format?: 'decimal' | 'currency' | 'percent';\n /** ISO 4217 currency code — required when format=\"currency\". */\n currency?: string;\n /** BCP 47 locale override. Defaults to the active i18n language. */\n locale?: string;\n /** Trend direction. Requires `delta` to render the trend row. */\n trend?: 'up' | 'down' | 'flat';\n /** Trend delta magnitude, e.g. 12 for \"↑ 12%\". */\n delta?: number | string;\n /** Number formatting style for the delta. Default \"decimal\". */\n deltaFormat?: 'decimal' | 'percent';\n /** Optional leading icon rendered at the start of the label row. */\n icon?: ReactNode;\n /** Renders animated skeleton placeholders instead of content. */\n loading?: boolean;\n /**\n * Animate the numeric value from 0 (or from the captured leading\n * sign) to the final value when the Stat first scrolls into view.\n * Default `false`. Marketing surfaces opt in; dashboards leave it\n * off so live metrics render immediately.\n */\n animate?: boolean;\n /**\n * When `true`, the count-up re-plays every time the Stat scrolls\n * out of view and back in. Default `false` — animate once per\n * element per session, matching the booking-website hero pattern.\n * Ignored under `prefers-reduced-motion: reduce`.\n */\n animateOnEveryView?: boolean;\n /** Animation duration in milliseconds. Default 1600. */\n animateDurationMs?: number;\n /**\n * BCP 47 locale used for the per-frame count-up formatting. Falls\n * back to `locale`, then to the active i18n language.\n */\n animateLocale?: string;\n /**\n * Override the locale's thousand / decimal glyphs for the count-up.\n * Wins over locale defaults. Pass partial overrides — `decimal`\n * alone is valid; the unspecified separator stays at the locale\n * default.\n */\n animateSeparators?: {\n thousand?: string;\n decimal?: string;\n };\n}\n\n/* ------------------------------------------------------------------ */\n/* Stat */\n/* ------------------------------------------------------------------ */\n\nexport const Stat = forwardRef<HTMLDivElement, StatProps>(\n (\n {\n label,\n value,\n format,\n currency,\n locale,\n trend,\n delta,\n deltaFormat = 'decimal',\n icon,\n loading = false,\n animate = false,\n animateOnEveryView = false,\n animateDurationMs = 1600,\n animateLocale,\n animateSeparators,\n variant = 'default',\n size = 'md',\n align = 'start',\n className,\n ...props\n },\n ref,\n ) => {\n const { i18n } = useTranslation();\n const labelId = useId();\n const lang = locale ?? i18n.language;\n\n /* -------------------------------------------------- */\n /* Static formatting — the value as it would appear */\n /* in the non-animated (or post-animation) state. */\n /* -------------------------------------------------- */\n\n const formatValue = useCallback((): string => {\n if (typeof value === 'string') return value;\n\n switch (format) {\n case 'currency':\n return new Intl.NumberFormat(lang, {\n style: 'currency',\n currency: currency ?? 'USD',\n }).format(value);\n case 'percent':\n return new Intl.NumberFormat(lang, { style: 'percent' }).format(\n value,\n );\n case 'decimal':\n return new Intl.NumberFormat(lang, { style: 'decimal' }).format(\n value,\n );\n default:\n return new Intl.NumberFormat(lang).format(value);\n }\n }, [value, format, lang, currency]);\n\n const staticValue = formatValue();\n\n /* -------------------------------------------------- */\n /* Parse the value into a numeric target for the */\n /* count-up. Numeric values use `value` directly; */\n /* string values are stripped of sign / shorthand / */\n /* locale separators and re-decorated each frame. */\n /* -------------------------------------------------- */\n\n const animationLocale = animateLocale ?? lang;\n const hasWarnedRef = useRef<boolean>(false);\n\n const parsed = useMemo<ParsedValue | null>(() => {\n if (!animate) return null;\n if (typeof value === 'number') {\n // Numeric: target is the number itself; no sign / suffix to\n // re-attach.\n return Number.isFinite(value)\n ? { target: value, sign: '', suffix: '' }\n : null;\n }\n return parseStatValue(value, animationLocale);\n }, [animate, value, animationLocale]);\n\n // Dev-mode warning when an animate-flagged Stat has an unparseable\n // string value. Render static, no throw — one warn per component.\n if (\n animate &&\n typeof value === 'string' &&\n parsed === null &&\n import.meta.env.DEV &&\n !hasWarnedRef.current\n ) {\n hasWarnedRef.current = true;\n console.warn(\n `Stat: value=\"${value}\" couldn't be parsed for the count-up animation. Rendering static.`,\n );\n }\n\n const shouldAnimate = animate && parsed !== null;\n\n /* -------------------------------------------------- */\n /* Wire the hook unconditionally — rules-of-hooks. */\n /* When `shouldAnimate` is false the hook still runs */\n /* but `to === from` so it's a no-op visually. */\n /* -------------------------------------------------- */\n\n const target = parsed?.target ?? 0;\n const sign = parsed?.sign ?? '';\n const suffix = parsed?.suffix ?? '';\n\n // Wrap the count-up formatter so the captured sign + suffix are\n // re-applied every frame. The hook hands us the locale-formatted\n // magnitude; we own the decoration around it.\n const formatter = useCallback(\n (n: number) => {\n // Use the absolute value for the magnitude so the captured\n // sign is the sole source of the rendered sign. Negative\n // numbers passed in (e.g. `to: -12`) come through unsigned;\n // we re-apply via `sign`. Always force `useGrouping: true` so\n // ICU's locale-default `min2` doesn't suppress the thousand\n // glyph on 4-digit values like 1.000 (it-IT). The user wrote\n // a stat value — they want it grouped.\n const magnitudeNF = (() => {\n try {\n return new Intl.NumberFormat(animationLocale, {\n useGrouping: true,\n });\n } catch {\n return null;\n }\n })();\n\n let magnitudeStr: string;\n if (magnitudeNF) {\n if (animateSeparators) {\n // Hand-build the grouped magnitude so we don't depend on\n // ICU's locale-by-locale grouping defaults (which differ\n // between engines and can drop the group at 4-digit\n // thresholds even with `useGrouping: true`). Locale only\n // influences sign handling, which we apply separately.\n const abs = Math.abs(n);\n const intPart = Math.trunc(abs);\n const fracPart = abs - intPart;\n const groupGlyph = animateSeparators.thousand ?? '';\n const intStr = String(intPart).replace(\n /\\B(?=(\\d{3})+(?!\\d))/g,\n groupGlyph,\n );\n if (fracPart === 0) {\n magnitudeStr = intStr;\n } else {\n const fracStr = fracPart.toFixed(6).replace(/0+$/, '').slice(2);\n const decimalGlyph = animateSeparators.decimal ?? '.';\n magnitudeStr = fracStr ? intStr + decimalGlyph + fracStr : intStr;\n }\n } else {\n magnitudeStr = magnitudeNF.format(Math.abs(n));\n }\n } else {\n magnitudeStr = String(Math.abs(n));\n }\n\n // Re-derive the sign every frame: the captured sign wins, but\n // a negative `to` with no leading sign in the source still\n // renders with a leading \"-\" so the final formatted output\n // matches locale conventions.\n let resolvedSign: string = sign;\n if (sign === '' && n < 0) resolvedSign = '-';\n\n return `${resolvedSign}${magnitudeStr}${suffix}`;\n },\n [animationLocale, animateSeparators, sign, suffix],\n );\n\n const countUp = useCountUp({\n to: target,\n from: 0,\n durationMs: animateDurationMs,\n startOnVisible: true,\n retriggerOnReEntry: animateOnEveryView,\n // `formatter` is the only path we use — it owns both the locale\n // formatting and the sign/suffix re-application.\n formatter,\n });\n\n /* -------------------------------------------------- */\n /* Loading state */\n /* -------------------------------------------------- */\n\n if (loading) {\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-busy=\"true\"\n aria-label={label}\n data-component=\"stat\"\n className={statVariants({ variant, size, align, className })}\n {...props}\n >\n <div className=\"ds:h-[var(--skeleton-label-h)] ds:w-[var(--skeleton-label-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]\" />\n <div className=\"ds:h-[var(--skeleton-value-h)] ds:w-[var(--skeleton-value-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]\" />\n </div>\n );\n }\n\n /* -------------------------------------------------- */\n /* Render */\n /* -------------------------------------------------- */\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-labelledby={labelId}\n data-component=\"stat\"\n className={statVariants({ variant, size, align, className })}\n {...props}\n >\n <span className=\"ds:inline-flex ds:items-center\">\n {icon && (\n <span\n aria-hidden=\"true\"\n className={[\n 'ds:me-[var(--spacing-xs)] ds:inline-flex ds:shrink-0',\n // Accent tint on the leading icon. The icon is decorative\n // (aria-hidden), so magenta-500's 3.2:1 contrast on white\n // is acceptable here — the Stat label + value still\n // carry the accessible name at `--foreground`.\n 'ds:text-[color:var(--accent)]',\n 'ds:forced-colors:text-[CanvasText]',\n ].join(' ')}\n >\n {icon}\n </span>\n )}\n <span\n id={labelId}\n className=\"type-label ds:text-[var(--muted-foreground)]\"\n >\n {label}\n </span>\n </span>\n {shouldAnimate ? (\n // The animated number is wrapped in an `aria-live=\"off\"` span\n // so screen readers don't announce every interpolated frame.\n // The `role=\"group\"` ancestor (with `aria-labelledby` pointing\n // at the label) carries the final accessible reading — the\n // animated frames are decorative only.\n <span\n ref={countUp.ref}\n aria-live=\"off\"\n className={valueVariants({ size, variant })}\n >\n {countUp.value}\n </span>\n ) : (\n <span className={valueVariants({ size, variant })}>\n {staticValue}\n </span>\n )}\n {trend != null && delta != null && (\n <StatTrend\n trend={trend}\n delta={delta}\n deltaFormat={deltaFormat}\n locale={locale}\n />\n )}\n </div>\n );\n },\n);\n\nStat.displayName = 'Stat';\n"],"names":["statVariants","cva","valueVariants","trendVariants","ARROW","TREND_KEY","StatTrend","trend","delta","deltaFormat","locale","t","i18n","useTranslation","formattedDelta","jsx","parseStatValue","raw","trimmed","sign","body","suffix","suffixMatch","group","decimal","probe","part","usStyleMatch","direct","normalised","numeric","Stat","forwardRef","label","value","format","currency","icon","loading","animate","animateOnEveryView","animateDurationMs","animateLocale","animateSeparators","variant","size","align","className","props","ref","labelId","useId","lang","staticValue","useCallback","animationLocale","useRef","parsed","useMemo","shouldAnimate","target","formatter","n","magnitudeNF","magnitudeStr","abs","intPart","fracPart","groupGlyph","intStr","fracStr","decimalGlyph","resolvedSign","countUp","useCountUp","jsxs"],"mappings":";;;;;AAyBA,MAAMA,IAAeC,EAAI,iCAAiC;AAAA,EACxD,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,EACA,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,MAKV,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,QAGA;AAAA,MAAA,EACA,KAAK,GAAG;AAAA,MACV,SAAS;AAAA,IAAA;AAAA,IAEX,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,KAAK;AAAA,IAAA;AAAA,EACP;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAEX,CAAC,GAMKC,IAAgBD,EAAI,2CAA2C;AAAA,EACnE,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,SAAS;AAAA,MACP,SAAS;AAAA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