@alfadocs/ui-kit 0.32.2 → 0.32.3
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/{benefit-card-_Sc-MGha.js → benefit-card-Xnxj4Gmo.js} +17 -17
- package/dist/_chunks/{stat-DhAA5ltU.js → stat-Bs80Z6Yv.js} +25 -18
- package/dist/agent-catalog.json +1 -1
- package/dist/components/benefit-card/index.js +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as v, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as b, useContext as k, Children as w, createContext as y } from "react";
|
|
3
3
|
import { c as s } from "./index-D2ZczOXr.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = [
|
|
5
5
|
"violet",
|
|
6
6
|
"purple",
|
|
7
7
|
"magenta",
|
|
@@ -44,17 +44,17 @@ const b = [
|
|
|
44
44
|
// matches Card.elevated and PublicFooter compact. The thicker
|
|
45
45
|
// line reads as a deliberate boundary rather than a hairline.
|
|
46
46
|
//
|
|
47
|
-
// 0.
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
//
|
|
56
|
-
elevated: "ds:shadow-[var(--shadow-card)] ds:border ds:border-
|
|
57
|
-
outlined: "ds:border ds:border-
|
|
47
|
+
// 0.32.3: restored full 4-sided border. 0.31.9 dropped
|
|
48
|
+
// `border-top` so the accent strip would be the card's literal
|
|
49
|
+
// top edge — but with `border-radius: lg` on all 4 corners the
|
|
50
|
+
// side borders curve toward a non-existent top edge, leaving
|
|
51
|
+
// the top corners visually "open" (visible page-bg slivers
|
|
52
|
+
// where the rounded corner outline should close). The 1px
|
|
53
|
+
// hairline above the accent strip is the cheaper visual cost
|
|
54
|
+
// — subtle in light theme (14% black) and matches dark-theme
|
|
55
|
+
// chrome where shadow alone loses contrast.
|
|
56
|
+
elevated: "ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
57
|
+
outlined: "ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
defaultVariants: { variant: "elevated" }
|
|
@@ -153,9 +153,9 @@ const b = [
|
|
|
153
153
|
}
|
|
154
154
|
);
|
|
155
155
|
function S(a, o) {
|
|
156
|
-
return a !== "auto" ? a : o ?
|
|
156
|
+
return a !== "auto" ? a : o ? _[o.index % _.length] : "primary";
|
|
157
157
|
}
|
|
158
|
-
const p =
|
|
158
|
+
const p = b(
|
|
159
159
|
({ columns: a = 3, children: o, className: c, ...d }, l) => {
|
|
160
160
|
const i = w.toArray(o);
|
|
161
161
|
return /* @__PURE__ */ r(
|
|
@@ -171,7 +171,7 @@ const p = _(
|
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
173
|
p.displayName = "BenefitCard.Row";
|
|
174
|
-
const x =
|
|
174
|
+
const x = b(
|
|
175
175
|
({
|
|
176
176
|
step: a,
|
|
177
177
|
icon: o,
|
|
@@ -241,4 +241,4 @@ const H = Object.assign(x, {
|
|
|
241
241
|
export {
|
|
242
242
|
H as B
|
|
243
243
|
};
|
|
244
|
-
//# sourceMappingURL=benefit-card-
|
|
244
|
+
//# sourceMappingURL=benefit-card-Xnxj4Gmo.js.map
|
|
@@ -14,14 +14,21 @@ const P = V("ds:flex ds:flex-col ds:h-full", {
|
|
|
14
14
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
15
15
|
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
|
|
16
16
|
].join(" "),
|
|
17
|
-
// White card surface with the shared card shadow —
|
|
18
|
-
// `Card variant="elevated"`
|
|
19
|
-
//
|
|
20
|
-
//
|
|
17
|
+
// White card surface with the shared card shadow + border —
|
|
18
|
+
// matches `Card variant="elevated"` and `BenefitCard.elevated`
|
|
19
|
+
// tokens (`--card`, `--card-border`, `--shadow-card`,
|
|
20
|
+
// `--radius-lg`) so a grid of elevated Stats reads as a set of
|
|
21
|
+
// shaded panels without nesting a Card around each one. The
|
|
22
|
+
// border is essential in dark mode: shadow alone on a dark
|
|
23
|
+
// surface loses contrast and the card boundary disappears.
|
|
24
|
+
// Accessible theme bumps to `border-2` to match Card / Benefit-
|
|
25
|
+
// Card's 0.31.5 accessibility uplift.
|
|
21
26
|
elevated: [
|
|
22
27
|
"ds:gap-[var(--spacing-xs)]",
|
|
23
28
|
"ds:bg-[var(--card)]",
|
|
24
29
|
"ds:text-[var(--card-foreground)]",
|
|
30
|
+
"ds:border ds:border-[color:var(--card-border)]",
|
|
31
|
+
"ds:[.theme-accessible_&]:border-2",
|
|
25
32
|
"ds:shadow-[var(--shadow-card)]",
|
|
26
33
|
"ds:rounded-[var(--radius-lg)]",
|
|
27
34
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
@@ -144,8 +151,8 @@ function dt(d, t) {
|
|
|
144
151
|
l && (o = l[0], e = e.slice(0, -1).trimEnd());
|
|
145
152
|
let u = "", m = ".";
|
|
146
153
|
try {
|
|
147
|
-
const
|
|
148
|
-
for (const n of
|
|
154
|
+
const b = new Intl.NumberFormat(t).formatToParts(12345.6);
|
|
155
|
+
for (const n of b)
|
|
149
156
|
n.type === "group" ? u = n.value : n.type === "decimal" && (m = n.value);
|
|
150
157
|
} catch {
|
|
151
158
|
}
|
|
@@ -174,9 +181,9 @@ const ct = X(
|
|
|
174
181
|
loading: g = !1,
|
|
175
182
|
animate: s = !1,
|
|
176
183
|
animateOnEveryView: v = !1,
|
|
177
|
-
animateDurationMs:
|
|
184
|
+
animateDurationMs: b = 1600,
|
|
178
185
|
animateLocale: n,
|
|
179
|
-
animateSeparators:
|
|
186
|
+
animateSeparators: x,
|
|
180
187
|
variant: h = "default",
|
|
181
188
|
size: y = "md",
|
|
182
189
|
align: I = "start",
|
|
@@ -184,7 +191,7 @@ const ct = X(
|
|
|
184
191
|
className: j,
|
|
185
192
|
...k
|
|
186
193
|
}, R) => {
|
|
187
|
-
const { i18n: K } = B(), T = Z(), f = e ?? K.language,
|
|
194
|
+
const { i18n: K } = B(), T = Z(), f = e ?? K.language, _ = O(() => {
|
|
188
195
|
if (typeof t == "string") return t;
|
|
189
196
|
switch (c) {
|
|
190
197
|
case "currency":
|
|
@@ -205,7 +212,7 @@ const ct = X(
|
|
|
205
212
|
}
|
|
206
213
|
}, [t, c, f, a])(), N = n ?? f;
|
|
207
214
|
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]),
|
|
215
|
+
const r = et(() => s ? typeof t == "number" ? Number.isFinite(t) ? { target: t, sign: "", suffix: "" } : null : dt(t, N) : null, [s, t, N]), Y = 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(
|
|
209
216
|
(w) => {
|
|
210
217
|
const E = (() => {
|
|
211
218
|
try {
|
|
@@ -218,15 +225,15 @@ const ct = X(
|
|
|
218
225
|
})();
|
|
219
226
|
let p;
|
|
220
227
|
if (E)
|
|
221
|
-
if (
|
|
222
|
-
const A = Math.abs(w), D = Math.trunc(A), G = A - D, J =
|
|
228
|
+
if (x) {
|
|
229
|
+
const A = Math.abs(w), D = Math.trunc(A), G = A - D, J = x.thousand ?? "", S = String(D).replace(
|
|
223
230
|
/\B(?=(\d{3})+(?!\d))/g,
|
|
224
231
|
J
|
|
225
232
|
);
|
|
226
233
|
if (G === 0)
|
|
227
234
|
p = S;
|
|
228
235
|
else {
|
|
229
|
-
const L = G.toFixed(6).replace(/0+$/, "").slice(2), Q =
|
|
236
|
+
const L = G.toFixed(6).replace(/0+$/, "").slice(2), Q = x.decimal ?? ".";
|
|
230
237
|
p = L ? S + Q + L : S;
|
|
231
238
|
}
|
|
232
239
|
} else
|
|
@@ -236,11 +243,11 @@ const ct = X(
|
|
|
236
243
|
let W = F;
|
|
237
244
|
return F === "" && w < 0 && (W = "-"), `${W}${p}${$}`;
|
|
238
245
|
},
|
|
239
|
-
[N,
|
|
246
|
+
[N, x, F, $]
|
|
240
247
|
), C = st({
|
|
241
248
|
to: q,
|
|
242
249
|
from: 0,
|
|
243
|
-
durationMs:
|
|
250
|
+
durationMs: b,
|
|
244
251
|
startOnVisible: !0,
|
|
245
252
|
retriggerOnReEntry: v,
|
|
246
253
|
// `formatter` is the only path we use — it owns both the locale
|
|
@@ -298,7 +305,7 @@ const ct = X(
|
|
|
298
305
|
}
|
|
299
306
|
)
|
|
300
307
|
] }),
|
|
301
|
-
|
|
308
|
+
Y ? (
|
|
302
309
|
// The animated number is wrapped in an `aria-live="off"` span
|
|
303
310
|
// so screen readers don't announce every interpolated frame.
|
|
304
311
|
// The `role="group"` ancestor (with `aria-labelledby` pointing
|
|
@@ -313,7 +320,7 @@ const ct = X(
|
|
|
313
320
|
children: C.value
|
|
314
321
|
}
|
|
315
322
|
)
|
|
316
|
-
) : /* @__PURE__ */ i("span", { className: U({ size: y, variant: h, intent: M }), children:
|
|
323
|
+
) : /* @__PURE__ */ i("span", { className: U({ size: y, variant: h, intent: M }), children: _ }),
|
|
317
324
|
o != null && l != null && /* @__PURE__ */ i(
|
|
318
325
|
it,
|
|
319
326
|
{
|
|
@@ -332,4 +339,4 @@ ct.displayName = "Stat";
|
|
|
332
339
|
export {
|
|
333
340
|
ct as S
|
|
334
341
|
};
|
|
335
|
-
//# sourceMappingURL=stat-
|
|
342
|
+
//# sourceMappingURL=stat-Bs80Z6Yv.js.map
|
package/dist/agent-catalog.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import { T as Te, t as be } from "./_chunks/time-picker-B5umYwfv.js";
|
|
|
44
44
|
import { A as Re, a as Ie, b as he, c as Fe, d as Ee } from "./_chunks/accordion-bSU21uTV.js";
|
|
45
45
|
import { A as Ne, g as ke, n as Oe } from "./_chunks/avatar-BNQNhoyL.js";
|
|
46
46
|
import { B as ye } from "./_chunks/badge-zsf5i5bH.js";
|
|
47
|
-
import { B as Me } from "./_chunks/benefit-card-
|
|
47
|
+
import { B as Me } from "./_chunks/benefit-card-Xnxj4Gmo.js";
|
|
48
48
|
import { C as we } from "./_chunks/card-DPmk26CL.js";
|
|
49
49
|
import { C as ve, c as He } from "./_chunks/carousel.agent-DrX96W-1.js";
|
|
50
50
|
import { C as Ge } from "./_chunks/contact-card-Cf8Ktyt3.js";
|
|
@@ -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-Bs80Z6Yv.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";
|