@facto-to/design-system 0.1.0-beta.7 → 0.1.0-beta.9

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/index.js CHANGED
@@ -1,1179 +1,2118 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as f, Fragment as q } from "react/jsx-runtime";
3
- import * as K from "@radix-ui/react-popover";
4
- import * as O from "@radix-ui/react-dropdown-menu";
5
- import * as U from "@radix-ui/react-tooltip";
6
- import * as W from "@radix-ui/react-toast";
7
- import { createPortal as st } from "react-dom";
8
- import * as tt from "@radix-ui/react-checkbox";
9
- import * as M from "@radix-ui/react-dialog";
10
- import * as D from "@radix-ui/react-select";
11
- import * as et from "@radix-ui/react-switch";
12
- import * as X from "@radix-ui/react-tabs";
13
- import { useState as H, useEffect as L, useId as j, forwardRef as Z, Children as lt, isValidElement as dt, cloneElement as ut, useRef as F, useCallback as R, useMemo as ft, useContext as S, createContext as it } from "react";
14
- const Q = /* @__PURE__ */ new WeakMap();
15
- function mt(t) {
16
- const e = Array.from(t.ownerDocument.body.children).filter(
2
+ import { jsx as e, jsxs as u, Fragment as et } from "react/jsx-runtime";
3
+ import * as it from "@radix-ui/react-popover";
4
+ import * as at from "@radix-ui/react-dropdown-menu";
5
+ import * as st from "@radix-ui/react-tooltip";
6
+ import * as J from "@radix-ui/react-toast";
7
+ import { createPortal as Kt } from "react-dom";
8
+ import * as St from "@radix-ui/react-checkbox";
9
+ import * as F from "@radix-ui/react-dialog";
10
+ import * as V from "@radix-ui/react-select";
11
+ import * as Mt from "@radix-ui/react-switch";
12
+ import * as vt from "@radix-ui/react-tabs";
13
+ import { useContext as W, useSyncExternalStore as Yt, createContext as wt, useRef as x, useLayoutEffect as Z, useState as A, useEffect as q, useId as G, forwardRef as dt, Children as Qt, isValidElement as Xt, cloneElement as Zt, Fragment as Jt, useCallback as X, useMemo as te } from "react";
14
+ const z = {
15
+ duration: { feedback: 160, content: 180, surface: 220, overlay: 240 },
16
+ easing: { standard: "cubic-bezier(.22, 1, .36, 1)" }
17
+ }, It = wt("auto"), Bt = "(prefers-reduced-motion: reduce)", ee = (t) => {
18
+ const n = window.matchMedia?.(Bt);
19
+ return n?.addEventListener("change", t), () => n?.removeEventListener("change", t);
20
+ }, ne = () => typeof window < "u" && !!window.matchMedia?.(Bt).matches, ae = () => !0;
21
+ function ut(t) {
22
+ const n = W(It), a = Yt(ee, ne, ae), o = t ?? n;
23
+ return { motion: o, reduced: a, enabled: o === "auto" && !a };
24
+ }
25
+ function Y(t) {
26
+ const { enabled: n } = ut(t);
27
+ return { "--facto-motion-scale": n ? 1 : 0 };
28
+ }
29
+ function gt({ motion: t, children: n }) {
30
+ const a = ut(t);
31
+ return /* @__PURE__ */ e(It.Provider, { value: a.motion, children: /* @__PURE__ */ e("div", { "data-facto-motion": a.motion, style: { display: "contents", "--facto-motion-scale": a.enabled ? 1 : 0 }, children: n }) });
32
+ }
33
+ const bt = (...t) => t.filter(Boolean).join(" ");
34
+ function H(t, n) {
35
+ n.current?.cancel(), n.current = null, t.style.height = "", t.style.overflow = "";
36
+ }
37
+ function _t(t) {
38
+ return ut(t).enabled;
39
+ }
40
+ function Et(t, n, a) {
41
+ const o = x(null), r = x(null), i = x(t), c = x(!1), l = x(0), [s, h] = A(t);
42
+ return Z(() => {
43
+ const f = o.current;
44
+ if (!f) return;
45
+ const p = i.current !== t;
46
+ if (i.current = t, !n) {
47
+ c.current = !1, H(f, r), h(t);
48
+ return;
49
+ }
50
+ if (p && (l.current = f.getBoundingClientRect().height, H(f, r), c.current = !0, t && !s)) {
51
+ h(!0);
52
+ return;
53
+ }
54
+ if (!c.current || !s) return;
55
+ c.current = !1;
56
+ const v = t ? l.current || 0 : l.current, k = t ? f.scrollHeight : 0;
57
+ if (!f.animate || Math.abs(k - v) < 1) {
58
+ H(f, r), t || h(!1);
59
+ return;
60
+ }
61
+ f.style.height = `${v}px`, f.style.overflow = "hidden";
62
+ const w = f.animate(
63
+ [{ height: `${v}px`, opacity: t ? 0.85 : 1 }, { height: `${k}px`, opacity: t ? 1 : 0 }],
64
+ { duration: a, easing: z.easing.standard, fill: "forwards" }
65
+ );
66
+ r.current = w, w.onfinish = () => {
67
+ r.current === w && (H(f, r), t || h(!1));
68
+ };
69
+ }, [n, s, t, a]), Z(() => () => {
70
+ const f = o.current;
71
+ f && H(f, r);
72
+ }, []), { rootRef: o, mounted: s };
73
+ }
74
+ function oe({ stepKey: t, children: n, motion: a, className: o, ...r }) {
75
+ const i = _t(a), c = x(null), l = x(null), s = x(null), h = x(null), f = x(t), p = x(null), v = x(null), k = x(null), w = () => {
76
+ const g = c.current, d = l.current;
77
+ !g || !d || (H(g, s), p.current = d.getBoundingClientRect().height, v.current = null);
78
+ }, C = (g, d) => {
79
+ const m = c.current;
80
+ if (!m || !i || !m.animate || Math.abs(d - g) < 1) {
81
+ w();
82
+ return;
83
+ }
84
+ H(m, s), m.style.height = `${g}px`, m.style.overflow = "hidden", v.current = d;
85
+ const y = m.animate(
86
+ [{ height: `${g}px` }, { height: `${d}px` }],
87
+ { duration: z.duration.surface, easing: z.easing.standard, fill: "forwards" }
88
+ );
89
+ s.current = y, y.onfinish = () => {
90
+ s.current === y && w();
91
+ };
92
+ };
93
+ return Z(() => {
94
+ const g = c.current, d = l.current;
95
+ if (!g || !d) return;
96
+ const m = f.current !== t;
97
+ if (f.current = t, !i) {
98
+ H(g, s), h.current?.cancel(), h.current = null, p.current = d.getBoundingClientRect().height, v.current = null;
99
+ return;
100
+ }
101
+ if (!m) {
102
+ s.current || (p.current = d.getBoundingClientRect().height);
103
+ return;
104
+ }
105
+ const y = s.current ? g.getBoundingClientRect().height : p.current ?? g.getBoundingClientRect().height;
106
+ H(g, s), h.current?.cancel(), h.current = null;
107
+ const b = d.getBoundingClientRect().height;
108
+ if (p.current == null) {
109
+ p.current = b;
110
+ return;
111
+ }
112
+ C(y, b);
113
+ const N = d.animate?.(
114
+ [{ opacity: 0.35, transform: "translateY(6px)" }, { opacity: 1, transform: "translateY(0)" }],
115
+ { duration: z.duration.content, easing: z.easing.standard }
116
+ );
117
+ h.current = N ?? null, N?.addEventListener("finish", () => {
118
+ h.current === N && (N.cancel(), h.current = null);
119
+ }, { once: !0 });
120
+ }, [n, i, t]), Z(() => {
121
+ if (!c.current || typeof ResizeObserver > "u") return;
122
+ const d = new ResizeObserver(() => k.current?.()), m = l.current;
123
+ if (m)
124
+ return d.observe(m), () => d.disconnect();
125
+ }, []), k.current = () => {
126
+ const g = c.current, d = l.current;
127
+ if (!g || !d) return;
128
+ const m = d.getBoundingClientRect().height;
129
+ if (!s.current) {
130
+ p.current = m;
131
+ return;
132
+ }
133
+ v.current != null && Math.abs(m - v.current) >= 1 && C(g.getBoundingClientRect().height, m);
134
+ }, Z(() => () => {
135
+ const g = c.current;
136
+ g && H(g, s), h.current?.cancel(), h.current = null;
137
+ }, []), /* @__PURE__ */ e("div", { ...r, ref: c, className: bt("facto-step-transition", o), children: /* @__PURE__ */ e("div", { ref: l, className: "facto-step-transition__content", children: n }) });
138
+ }
139
+ function Re({ open: t, children: n, motion: a, className: o, ...r }) {
140
+ const { rootRef: i, mounted: c } = Et(t, _t(a), z.duration.content);
141
+ return /* @__PURE__ */ e("div", { ...r, ref: i, className: bt("facto-animated-disclosure", o), "aria-hidden": t ? void 0 : !0, inert: !t, hidden: !c, children: n });
142
+ }
143
+ function $e({ show: t, children: n, motion: a, className: o, role: r = "alert", ...i }) {
144
+ const { rootRef: c, mounted: l } = Et(t, _t(a), z.duration.feedback);
145
+ return /* @__PURE__ */ e("div", { ...i, ref: c, className: bt("facto-animated-feedback", o), role: t ? r : void 0, "aria-hidden": t ? void 0 : !0, inert: !t, hidden: !l, children: n });
146
+ }
147
+ function Le({ children: t, ready: n = !0, motion: a, className: o, ...r }) {
148
+ const i = _t(a), c = x(null), l = x(n);
149
+ return Z(() => {
150
+ const s = c.current, h = !l.current && n;
151
+ if (l.current = n, !s || !h || !i || !s.animate) return;
152
+ const f = s.animate([{ opacity: 0.85 }, { opacity: 1 }], { duration: z.duration.content, easing: z.easing.standard });
153
+ return f.addEventListener("finish", () => f.cancel(), { once: !0 }), () => f.cancel();
154
+ }, [i, n]), /* @__PURE__ */ e("div", { ...r, ref: c, className: bt("facto-content-reveal", o), "aria-busy": n ? void 0 : !0, children: t });
155
+ }
156
+ const Rt = (t) => {
157
+ t.forEach((n) => n.cancel()), t.length = 0;
158
+ };
159
+ function Ie(t, n, { motion: a } = {}) {
160
+ const { enabled: o } = ut(a), r = x(/* @__PURE__ */ new Map()), i = x(/* @__PURE__ */ new Set()), c = x(null), l = x([]), s = JSON.stringify(n);
161
+ Z(() => {
162
+ const h = t.current, f = () => {
163
+ if (!h) return /* @__PURE__ */ new Map();
164
+ const C = h.getBoundingClientRect();
165
+ return new Map(
166
+ Array.from(h.querySelectorAll("[data-list-motion-key]")).map((g) => {
167
+ const d = g.dataset.listMotionKey, m = g.getBoundingClientRect();
168
+ return d === void 0 ? null : [d, {
169
+ left: m.left - C.left + h.scrollLeft,
170
+ top: m.top - C.top + h.scrollTop
171
+ }];
172
+ }).filter((g) => g !== null)
173
+ );
174
+ };
175
+ Rt(l.current);
176
+ const p = f();
177
+ if (!h || !o) {
178
+ r.current = p, i.current = new Set(p.keys()), c.current = s;
179
+ return;
180
+ }
181
+ const v = c.current !== null && c.current !== s, k = r.current, w = i.current;
182
+ if (v) {
183
+ const C = new Map(
184
+ Array.from(h.querySelectorAll("[data-list-motion-key]")).map((g) => [g.dataset.listMotionKey, g]).filter((g) => g[0] !== void 0)
185
+ );
186
+ for (const [g, d] of p) {
187
+ const m = C.get(g);
188
+ if (!m || typeof m.animate != "function") continue;
189
+ const y = w.has(g) ? k.get(g) : void 0, b = y ? (() => {
190
+ const N = y.left - d.left, T = y.top - d.top;
191
+ return Math.abs(N) > 0.5 || Math.abs(T) > 0.5 ? [{ transform: `translate(${N}px, ${T}px)` }, { transform: "none" }] : null;
192
+ })() : [{ opacity: 0, transform: "translateY(-4px)" }, { opacity: 1, transform: "none" }];
193
+ b && l.current.push(m.animate(b, {
194
+ duration: y ? z.duration.content : z.duration.feedback,
195
+ easing: z.easing.standard
196
+ }));
197
+ }
198
+ }
199
+ return r.current = p, i.current = new Set(p.keys()), c.current = s, () => Rt(l.current);
200
+ }, [o, t, s]);
201
+ }
202
+ function Be({ motion: t, className: n, children: a, ...o }) {
203
+ const { enabled: r } = ut(t), i = x(null), c = x(null), l = x(null), s = x(null);
204
+ return Z(() => {
205
+ const h = i.current, f = c.current;
206
+ if (!h || !f) return;
207
+ const p = (d) => {
208
+ const m = h.querySelector('[aria-pressed="true"], [aria-selected="true"]');
209
+ if (!m) {
210
+ s.current?.cancel(), s.current = null, f.hidden = !0, l.current = null;
211
+ return;
212
+ }
213
+ const y = h.getBoundingClientRect(), b = m.getBoundingClientRect(), N = l.current, T = !f.hidden && s.current ? f.getBoundingClientRect() : N;
214
+ s.current?.cancel(), s.current = null, f.hidden = !1, Object.assign(f.style, {
215
+ left: `${b.left - y.left + h.scrollLeft}px`,
216
+ top: `${b.top - y.top + h.scrollTop}px`,
217
+ width: `${b.width}px`,
218
+ height: `${b.height}px`
219
+ }), d && r && T && b.width > 0 && b.height > 0 && typeof f.animate == "function" && (s.current = f.animate([
220
+ {
221
+ transform: `translate(${T.left - b.left}px, ${T.top - b.top}px) scale(${T.width / b.width}, ${T.height / b.height})`
222
+ },
223
+ { transform: "none" }
224
+ ], { duration: z.duration.surface, easing: z.easing.standard })), l.current = b;
225
+ }, v = typeof ResizeObserver > "u" ? null : new ResizeObserver(() => p(!1)), k = /* @__PURE__ */ new Set(), w = () => {
226
+ k.forEach((d) => {
227
+ h.contains(d) || (v?.unobserve(d), k.delete(d));
228
+ }), h.querySelectorAll("[aria-pressed], [aria-selected]").forEach((d) => {
229
+ k.has(d) || (k.add(d), v?.observe(d));
230
+ });
231
+ };
232
+ p(!1), w();
233
+ const C = new MutationObserver((d) => {
234
+ const m = d.some(
235
+ (y) => y.type === "attributes" && (y.attributeName === "aria-pressed" || y.attributeName === "aria-selected")
236
+ );
237
+ w(), p(m);
238
+ });
239
+ C.observe(h, {
240
+ subtree: !0,
241
+ childList: !0,
242
+ characterData: !0,
243
+ attributes: !0,
244
+ attributeFilter: ["aria-pressed", "aria-selected"]
245
+ }), v?.observe(h);
246
+ const g = () => p(!1);
247
+ return window.addEventListener("resize", g), () => {
248
+ s.current?.cancel(), s.current = null, C.disconnect(), v?.disconnect(), window.removeEventListener("resize", g);
249
+ };
250
+ }, [r]), /* @__PURE__ */ u("div", { ...o, ref: i, className: ["facto-selection-motion", n].filter(Boolean).join(" "), children: [
251
+ /* @__PURE__ */ e("span", { ref: c, className: "facto-selection-motion__indicator", "aria-hidden": "true", hidden: !0 }),
252
+ a
253
+ ] });
254
+ }
255
+ function Pt() {
256
+ const [t, n] = A(null);
257
+ return q(() => {
258
+ const a = window.visualViewport;
259
+ if (!t || !a) return;
260
+ let o = 0;
261
+ const r = () => {
262
+ delete t.dataset.keyboardOpen, t.style.removeProperty("--facto-visible-height"), t.style.removeProperty("--facto-visible-top");
263
+ }, i = () => {
264
+ cancelAnimationFrame(o), o = requestAnimationFrame(() => {
265
+ const c = document.activeElement, l = c instanceof HTMLElement && t.contains(c) && c.matches('input, textarea, [contenteditable="true"]'), s = (window.innerWidth <= 700 || window.matchMedia?.("(pointer: coarse)").matches) && a.scale === 1 && window.innerHeight - a.height > 120, h = t.dataset.keyboardOpen === "true" && c instanceof HTMLElement && t.contains(c);
266
+ if (!s || !l && !h) {
267
+ r();
268
+ return;
269
+ }
270
+ if (t.dataset.keyboardOpen = "true", t.style.setProperty("--facto-visible-height", `${a.height}px`), t.style.setProperty("--facto-visible-top", `${a.offsetTop}px`), l) {
271
+ const f = c.getBoundingClientRect();
272
+ (f.top < a.offsetTop + 12 || f.bottom > a.offsetTop + a.height - 12) && c.scrollIntoView({ block: "nearest", behavior: "instant" });
273
+ }
274
+ });
275
+ };
276
+ return a.addEventListener("resize", i), a.addEventListener("scroll", i), t.addEventListener("focusin", i), t.addEventListener("focusout", i), i(), () => {
277
+ cancelAnimationFrame(o), a.removeEventListener("resize", i), a.removeEventListener("scroll", i), t.removeEventListener("focusin", i), t.removeEventListener("focusout", i), r();
278
+ };
279
+ }, [t]), n;
280
+ }
281
+ const ht = /* @__PURE__ */ new WeakMap();
282
+ function ce(t) {
283
+ const n = Array.from(t.ownerDocument.body.children).filter(
17
284
  (o) => o instanceof HTMLElement && !o.hasAttribute("data-radix-focus-guard") && !o.contains(t)
18
285
  );
19
- for (const o of e) {
20
- const i = Q.get(o);
21
- i ? i.count += 1 : (Q.set(o, { count: 1, wasInert: o.inert }), o.inert = !0);
286
+ for (const o of n) {
287
+ const r = ht.get(o);
288
+ r ? r.count += 1 : (ht.set(o, { count: 1, wasInert: o.inert }), o.inert = !0);
22
289
  }
23
290
  let a = !0;
24
291
  return () => {
25
292
  if (a) {
26
293
  a = !1;
27
- for (const o of e) {
28
- const i = Q.get(o);
29
- i && (i.count -= 1, i.count === 0 && (i.wasInert || (o.inert = !1), Q.delete(o)));
294
+ for (const o of n) {
295
+ const r = ht.get(o);
296
+ r && (r.count -= 1, r.count === 0 && (r.wasInert || (o.inert = !1), ht.delete(o)));
30
297
  }
31
298
  }
32
299
  };
33
300
  }
34
- const A = (...t) => t.filter(Boolean).join(" "), Bt = Z(function(e, a) {
35
- const { leading: o, title: i, description: c, value: r, status: m, trailing: d, className: g } = e, p = /* @__PURE__ */ f(q, { children: [
36
- o != null && /* @__PURE__ */ n("span", { className: "facto-list-row__leading", children: o }),
37
- /* @__PURE__ */ f("span", { className: "facto-list-row__copy", children: [
38
- /* @__PURE__ */ n("span", { className: "facto-list-row__title", children: i }),
39
- c != null && /* @__PURE__ */ n("span", { className: "facto-list-row__description", children: c })
301
+ const tt = (...t) => t.filter(Boolean).join(" "), Ee = dt(function(n, a) {
302
+ const { leading: o, title: r, description: i, value: c, status: l, trailing: s, className: h } = n, f = /* @__PURE__ */ u(et, { children: [
303
+ o != null && /* @__PURE__ */ e("span", { className: "facto-list-row__leading", children: o }),
304
+ /* @__PURE__ */ u("span", { className: "facto-list-row__copy", children: [
305
+ /* @__PURE__ */ e("span", { className: "facto-list-row__title", children: r }),
306
+ i != null && /* @__PURE__ */ e("span", { className: "facto-list-row__description", children: i })
40
307
  ] }),
41
- (r != null || m != null) && /* @__PURE__ */ f("span", { className: "facto-list-row__meta", children: [
42
- r != null && /* @__PURE__ */ n("span", { className: "facto-list-row__value", children: r }),
43
- m != null && /* @__PURE__ */ n("span", { className: "facto-list-row__status", children: m })
308
+ (c != null || l != null) && /* @__PURE__ */ u("span", { className: "facto-list-row__meta", children: [
309
+ c != null && /* @__PURE__ */ e("span", { className: "facto-list-row__value", children: c }),
310
+ l != null && /* @__PURE__ */ e("span", { className: "facto-list-row__status", children: l })
44
311
  ] }),
45
- d != null && /* @__PURE__ */ n("span", { className: "facto-list-row__trailing", children: d })
46
- ] }), v = A("facto-list-row", g);
47
- if ("href" in e && typeof e.href == "string") {
48
- const { leading: h, title: _, description: C, value: N, status: E, trailing: P, className: J, ...I } = e;
49
- return /* @__PURE__ */ n("a", { ...I, ref: a, className: v, children: p });
312
+ s != null && /* @__PURE__ */ e("span", { className: "facto-list-row__trailing", children: s })
313
+ ] }), p = tt("facto-list-row", h);
314
+ if ("href" in n && typeof n.href == "string") {
315
+ const { leading: b, title: N, description: T, value: L, status: j, trailing: P, className: O, ...M } = n;
316
+ return /* @__PURE__ */ e("a", { ...M, ref: a, className: p, children: f });
50
317
  }
51
- if ("onClick" in e && typeof e.onClick == "function") {
52
- const { leading: h, title: _, description: C, value: N, status: E, trailing: P, className: J, type: I = "button", ...$ } = e;
53
- return /* @__PURE__ */ n("button", { ...$, ref: a, type: I, className: v, children: p });
318
+ if ("onClick" in n && typeof n.onClick == "function") {
319
+ const { leading: b, title: N, description: T, value: L, status: j, trailing: P, className: O, type: M = "button", ...I } = n;
320
+ return /* @__PURE__ */ e("button", { ...I, ref: a, type: M, className: p, children: f });
54
321
  }
55
- const { leading: w, title: k, description: y, value: T, status: x, trailing: s, className: u, ...b } = e;
56
- return /* @__PURE__ */ n("div", { ...b, ref: a, className: v, children: p });
322
+ const { leading: v, title: k, description: w, value: C, status: g, trailing: d, className: m, ...y } = n;
323
+ return /* @__PURE__ */ e("div", { ...y, ref: a, className: p, children: f });
57
324
  });
58
- function St({ heading: t, children: e, className: a, ...o }) {
59
- const i = j();
60
- return /* @__PURE__ */ f("section", { ...o, className: A("facto-list-group", a), "aria-labelledby": t ? i : o["aria-labelledby"], children: [
61
- t && /* @__PURE__ */ n("h2", { id: i, className: "facto-list-group__heading", children: t }),
62
- /* @__PURE__ */ n("div", { className: "facto-list-group__rows", children: e })
325
+ function Pe({ heading: t, children: n, className: a, ...o }) {
326
+ const r = G();
327
+ return /* @__PURE__ */ u("section", { ...o, className: tt("facto-list-group", a), "aria-labelledby": t ? r : o["aria-labelledby"], children: [
328
+ t && /* @__PURE__ */ e("h2", { id: r, className: "facto-list-group__heading", children: t }),
329
+ /* @__PURE__ */ e("div", { className: "facto-list-group__rows", children: n })
63
330
  ] });
64
331
  }
65
- function ht({ src: t, alt: e = "", fallback: a, size: o = "md", className: i, onError: c, ...r }) {
66
- const [m, d] = H(!1);
67
- L(() => d(!1), [t]);
68
- const g = a ?? (e ? e.slice(0, 1).toUpperCase() : null);
69
- return /* @__PURE__ */ n("span", { className: A("facto-avatar", `facto-avatar--${o}`, i), children: t && !m ? /* @__PURE__ */ n("img", { ...r, src: t, alt: e, onError: (p) => {
70
- d(!0), c?.(p);
71
- } }) : /* @__PURE__ */ n("span", { className: "facto-avatar__fallback", role: e ? "img" : void 0, "aria-label": e || void 0, "aria-hidden": e ? void 0 : !0, children: g }) });
72
- }
73
- function xt({ logos: t, size: e = "md", max: a, className: o, ...i }) {
74
- const c = a === void 0 ? t : t.slice(0, a), r = t.length - c.length;
75
- return /* @__PURE__ */ f("div", { ...i, className: A("facto-logo-stack", `facto-logo-stack--${e}`, o), children: [
76
- c.map((m, d) => /* @__PURE__ */ n(ht, { ...m, size: e }, `${m.src ?? "fallback"}-${d}`)),
77
- r > 0 && /* @__PURE__ */ f("span", { className: "facto-logo-stack__more", "aria-label": `${r} more logos`, children: [
332
+ function re({ src: t, alt: n = "", fallback: a, size: o = "md", className: r, onError: i, ...c }) {
333
+ const [l, s] = A(!1);
334
+ q(() => s(!1), [t]);
335
+ const h = a ?? (n ? n.slice(0, 1).toUpperCase() : null);
336
+ return /* @__PURE__ */ e("span", { className: tt("facto-avatar", `facto-avatar--${o}`, r), children: t && !l ? /* @__PURE__ */ e("img", { ...c, src: t, alt: n, onError: (f) => {
337
+ s(!0), i?.(f);
338
+ } }) : /* @__PURE__ */ e("span", { className: "facto-avatar__fallback", role: n ? "img" : void 0, "aria-label": n || void 0, "aria-hidden": n ? void 0 : !0, children: h }) });
339
+ }
340
+ function De({ logos: t, size: n = "md", max: a, className: o, ...r }) {
341
+ const i = a === void 0 ? t : t.slice(0, a), c = t.length - i.length;
342
+ return /* @__PURE__ */ u("div", { ...r, className: tt("facto-logo-stack", `facto-logo-stack--${n}`, o), children: [
343
+ i.map((l, s) => /* @__PURE__ */ e(re, { ...l, size: n }, `${l.src ?? "fallback"}-${s}`)),
344
+ c > 0 && /* @__PURE__ */ u("span", { className: "facto-logo-stack__more", "aria-label": `${c} more logos`, children: [
78
345
  "+",
79
- r
346
+ c
80
347
  ] })
81
348
  ] });
82
349
  }
83
- function Lt({ title: t, description: e, retryLabel: a = "Try again", onRetry: o, className: i, ...c }) {
84
- return /* @__PURE__ */ f("div", { ...c, className: A("facto-error-state", i), role: "alert", children: [
85
- /* @__PURE__ */ n("strong", { children: t }),
86
- e && /* @__PURE__ */ n("p", { children: e }),
87
- o && /* @__PURE__ */ n("button", { type: "button", className: "facto-error-state__retry", onClick: o, children: a })
350
+ function Ae({ title: t, description: n, retryLabel: a = "Try again", onRetry: o, className: r, ...i }) {
351
+ return /* @__PURE__ */ u("div", { ...i, className: tt("facto-error-state", r), role: "alert", children: [
352
+ /* @__PURE__ */ e("strong", { children: t }),
353
+ n && /* @__PURE__ */ e("p", { children: n }),
354
+ o && /* @__PURE__ */ e("button", { type: "button", className: "facto-error-state__retry", onClick: o, children: a })
88
355
  ] });
89
356
  }
90
- function Rt({ label: t = "Loading more", className: e, ...a }) {
91
- return /* @__PURE__ */ f("div", { ...a, className: A("facto-loading-more", e), role: "status", "aria-live": "polite", children: [
92
- /* @__PURE__ */ n("span", { className: "facto-loading-more__spinner", "aria-hidden": "true" }),
93
- /* @__PURE__ */ n("span", { children: t })
357
+ function ze({ label: t = "Loading more", className: n, ...a }) {
358
+ return /* @__PURE__ */ u("div", { ...a, className: tt("facto-loading-more", n), role: "status", "aria-live": "polite", children: [
359
+ /* @__PURE__ */ e("span", { className: "facto-loading-more__spinner", "aria-hidden": "true" }),
360
+ /* @__PURE__ */ e("span", { children: t })
94
361
  ] });
95
362
  }
96
- function Ft({ steps: t, className: e, ...a }) {
97
- return /* @__PURE__ */ n("ol", { ...a, className: A("facto-step-checklist", e), children: t.map((o, i) => {
98
- const c = o.state ?? "upcoming";
99
- return /* @__PURE__ */ f("li", { className: `facto-step-checklist__item facto-step-checklist__item--${c}`, "aria-current": c === "current" ? "step" : void 0, children: [
100
- /* @__PURE__ */ n("span", { className: "facto-step-checklist__marker", "aria-hidden": "true", children: c === "complete" ? "✓" : i + 1 }),
101
- /* @__PURE__ */ f("span", { className: "facto-step-checklist__copy", children: [
102
- /* @__PURE__ */ f("span", { children: [
363
+ function Fe({ steps: t, className: n, ...a }) {
364
+ return /* @__PURE__ */ e("ol", { ...a, className: tt("facto-step-checklist", n), children: t.map((o, r) => {
365
+ const i = o.state ?? "upcoming";
366
+ return /* @__PURE__ */ u("li", { className: `facto-step-checklist__item facto-step-checklist__item--${i}`, "aria-current": i === "current" ? "step" : void 0, children: [
367
+ /* @__PURE__ */ e("span", { className: "facto-step-checklist__marker", "aria-hidden": "true", children: i === "complete" ? "✓" : r + 1 }),
368
+ /* @__PURE__ */ u("span", { className: "facto-step-checklist__copy", children: [
369
+ /* @__PURE__ */ u("span", { children: [
103
370
  o.label,
104
- c === "complete" && /* @__PURE__ */ n("span", { className: "facto-visually-hidden", children: ", completed" })
371
+ i === "complete" && /* @__PURE__ */ e("span", { className: "facto-visually-hidden", children: ", completed" })
105
372
  ] }),
106
- o.description != null && /* @__PURE__ */ n("small", { children: o.description })
373
+ o.description != null && /* @__PURE__ */ e("small", { children: o.description })
107
374
  ] })
108
- ] }, i);
375
+ ] }, r);
109
376
  }) });
110
377
  }
111
- const G = (...t) => t.filter(Boolean).join(" "), pt = (...t) => t.filter(Boolean).join(" ") || void 0;
112
- function jt({
378
+ const nt = (...t) => t.filter(Boolean).join(" "), ie = (...t) => t.filter(Boolean).join(" ") || void 0;
379
+ function je({
113
380
  label: t,
114
- leading: e,
381
+ leading: n,
115
382
  trailing: a,
116
383
  children: o,
117
- invalid: i,
118
- inputId: c,
119
- className: r,
120
- ...m
384
+ invalid: r,
385
+ inputId: i,
386
+ className: c,
387
+ ...l
121
388
  }) {
122
- return /* @__PURE__ */ f(
389
+ return /* @__PURE__ */ u(
123
390
  "div",
124
391
  {
125
- ...m,
126
- className: G("facto-inset-field", i && "facto-inset-field--invalid", r),
392
+ ...l,
393
+ className: nt("facto-inset-field", r && "facto-inset-field--invalid", c),
127
394
  children: [
128
- t && /* @__PURE__ */ n("label", { className: "facto-inset-field__label", htmlFor: c, children: t }),
129
- /* @__PURE__ */ f("span", { className: "facto-inset-field__control", children: [
130
- e && /* @__PURE__ */ n("span", { className: "facto-inset-field__slot facto-inset-field__slot--leading", children: e }),
131
- lt.map(o, (d) => dt(d) && typeof d.type == "string" && ["input", "textarea", "select"].includes(d.type) ? ut(d, { id: c, "aria-invalid": i || d.props["aria-invalid"] }) : d),
132
- a && /* @__PURE__ */ n("span", { className: "facto-inset-field__slot facto-inset-field__slot--trailing", children: a })
395
+ t && /* @__PURE__ */ e("label", { className: "facto-inset-field__label", htmlFor: i, children: t }),
396
+ /* @__PURE__ */ u("span", { className: "facto-inset-field__control", children: [
397
+ n && /* @__PURE__ */ e("span", { className: "facto-inset-field__slot facto-inset-field__slot--leading", children: n }),
398
+ Qt.map(o, (s) => Xt(s) && typeof s.type == "string" && ["input", "textarea", "select"].includes(s.type) ? Zt(s, { id: i, "aria-invalid": r || s.props["aria-invalid"] }) : s),
399
+ a && /* @__PURE__ */ e("span", { className: "facto-inset-field__slot facto-inset-field__slot--trailing", children: a })
133
400
  ] })
134
401
  ]
135
402
  }
136
403
  );
137
404
  }
138
- const nt = (t, e) => t.replace(/\D/g, "").slice(0, e);
139
- function Et({
405
+ const mt = (t, n, a = !1) => (a ? t.replace(/[^a-z0-9]/gi, "").toUpperCase() : t.replace(/\D/g, "")).slice(0, n);
406
+ function pt({
140
407
  value: t,
141
- onValueChange: e,
408
+ onValueChange: n,
142
409
  length: a = 6,
143
- onComplete: o,
144
- completionDelay: i = 300,
145
- pending: c,
146
- pendingLabel: r = "Verifying code…",
147
- label: m,
148
- helperText: d,
149
- error: g,
150
- id: p,
151
- className: v,
152
- containerClassName: w,
153
- disabled: k,
154
- readOnly: y,
155
- onPaste: T,
156
- onFocus: x,
157
- onBlur: s,
158
- ...u
410
+ split: o = !1,
411
+ alphanumeric: r = !1,
412
+ verified: i = !1,
413
+ onComplete: c,
414
+ completionDelay: l = 300,
415
+ pending: s,
416
+ pendingLabel: h = "Verifying code…",
417
+ label: f,
418
+ helperText: p,
419
+ error: v,
420
+ id: k,
421
+ className: w,
422
+ containerClassName: C,
423
+ disabled: g,
424
+ readOnly: d,
425
+ onPaste: m,
426
+ onFocus: y,
427
+ onBlur: b,
428
+ onSelect: N,
429
+ onClick: T,
430
+ ...L
159
431
  }) {
160
- const b = j(), h = p ?? b, _ = g || d ? `${h}-description` : void 0, C = Number.isFinite(a) ? Math.min(32, Math.max(1, Math.floor(a))) : 6, N = nt(t, C), E = F(void 0), P = F(o);
161
- L(() => {
162
- P.current = o;
163
- }, [o]), L(() => {
164
- if (k || y || c) return;
165
- if (N.length !== C) {
432
+ const j = G(), P = k ?? j, O = v || p ? `${P}-description` : void 0, M = Number.isFinite(a) ? Math.min(32, Math.max(1, Math.floor(a))) : 6, I = mt(t, M, r), [B, R] = A({ start: 0, end: 0 }), E = x(void 0), rt = x(c);
433
+ q(() => {
434
+ rt.current = c;
435
+ }, [c]), q(() => {
436
+ if (g || d || s) return;
437
+ if (I.length !== M) {
166
438
  E.current = void 0;
167
439
  return;
168
440
  }
169
- if (E.current === N) return;
170
- const I = window.setTimeout(() => {
171
- E.current = N, P.current?.(N);
172
- }, Math.max(0, i));
173
- return () => window.clearTimeout(I);
174
- }, [i, k, C, N, c, y]);
175
- const J = (I) => {
176
- if (k || y || c) return;
177
- const $ = nt(I, C);
178
- $ !== N && e($);
441
+ if (E.current === I) return;
442
+ const S = window.setTimeout(() => {
443
+ E.current = I, rt.current?.(I);
444
+ }, Math.max(0, l));
445
+ return () => window.clearTimeout(S);
446
+ }, [l, g, M, I, s, d]);
447
+ const Ct = (S) => {
448
+ if (g || d || s) return;
449
+ const $ = mt(S, M, r);
450
+ $ !== I && n($);
451
+ }, Tt = o && M === 6 ? 2 : o && M === 8 ? 3 : -1, jt = M >= 8 ? 42 : M <= 4 ? 56 : 54, Nt = M >= 8 ? 6 : 8, Ot = Tt >= 0 ? Nt + 6 : 0, Wt = M * jt + (M - 1) * Nt + Ot, Vt = M >= 8 ? 19 : 22, Ht = Math.min(B.start, I.length, M - 1), qt = {
452
+ "--facto-otp-max-width": `${Wt}px`,
453
+ "--facto-otp-gap": `${Nt}px`,
454
+ "--facto-otp-font-size": `${Vt}px`
179
455
  };
180
- return /* @__PURE__ */ f("div", { className: G("facto-otp", w), children: [
181
- m && /* @__PURE__ */ n("label", { className: "facto-otp__label", htmlFor: h, children: m }),
182
- /* @__PURE__ */ f(
456
+ return /* @__PURE__ */ u("div", { className: nt("facto-otp", C), children: [
457
+ f && /* @__PURE__ */ e("label", { className: "facto-otp__label", htmlFor: P, children: f }),
458
+ /* @__PURE__ */ u(
183
459
  "div",
184
460
  {
185
- className: G("facto-otp__cells", !!g && "facto-otp__cells--error", v),
186
- "data-disabled": k ? "" : void 0,
187
- "data-pending": c ? "" : void 0,
461
+ className: nt(
462
+ "facto-otp__cells",
463
+ !!v && "facto-otp__cells--error",
464
+ i && !v && "facto-otp__cells--verified",
465
+ w
466
+ ),
467
+ style: qt,
468
+ "data-disabled": g ? "" : void 0,
469
+ "data-pending": s ? "" : void 0,
188
470
  children: [
189
- /* @__PURE__ */ n(
471
+ /* @__PURE__ */ e(
190
472
  "input",
191
473
  {
192
- ...u,
193
- id: h,
474
+ ...L,
475
+ id: P,
194
476
  className: "facto-otp__input",
195
477
  type: "text",
196
- inputMode: "numeric",
478
+ inputMode: r ? "text" : "numeric",
197
479
  autoComplete: "one-time-code",
198
- pattern: "[0-9]*",
199
- maxLength: C,
200
- disabled: k || c,
201
- readOnly: y,
202
- value: N,
203
- "aria-invalid": !!g || u["aria-invalid"],
204
- "aria-busy": c || void 0,
205
- "aria-describedby": pt(u["aria-describedby"], _, c ? `${h}-pending` : void 0),
206
- "aria-errormessage": g ? _ : void 0,
207
- onChange: (I) => J(I.currentTarget.value),
208
- onPaste: (I) => {
209
- T?.(I), !I.defaultPrevented && (I.preventDefault(), J(I.clipboardData.getData("text")));
480
+ autoCapitalize: r ? "characters" : "off",
481
+ spellCheck: !1,
482
+ pattern: r ? "[A-Za-z0-9]*" : "[0-9]*",
483
+ maxLength: M,
484
+ disabled: g || s,
485
+ readOnly: d,
486
+ value: I,
487
+ "aria-invalid": !!v || L["aria-invalid"],
488
+ "aria-busy": s || void 0,
489
+ "aria-describedby": ie(L["aria-describedby"], O, s ? `${P}-pending` : void 0),
490
+ "aria-errormessage": v ? O : void 0,
491
+ onChange: (S) => {
492
+ const $ = S.currentTarget.selectionStart ?? S.currentTarget.value.length, Q = mt(S.currentTarget.value.slice(0, $), M, r).length;
493
+ R({ start: Q, end: Q }), Ct(S.currentTarget.value);
494
+ },
495
+ onSelect: (S) => {
496
+ R({
497
+ start: S.currentTarget.selectionStart ?? 0,
498
+ end: S.currentTarget.selectionEnd ?? 0
499
+ }), N?.(S);
210
500
  },
211
- onFocus: x,
212
- onBlur: s
501
+ onClick: (S) => {
502
+ T?.(S);
503
+ const $ = S.currentTarget;
504
+ if (S.detail !== 1 || S.shiftKey || $.selectionStart !== $.selectionEnd) return;
505
+ const Q = $.parentElement?.querySelectorAll(".facto-otp__cell");
506
+ if (!Q || Q.length === 0) return;
507
+ let K = -1;
508
+ if (Q.forEach((Ut, Gt) => {
509
+ const xt = Ut.getBoundingClientRect();
510
+ S.clientX >= xt.left && S.clientX <= xt.right && (K = Gt);
511
+ }), K >= 0 && K < I.length) {
512
+ $.setSelectionRange(K, K + 1), R({ start: K, end: K + 1 });
513
+ return;
514
+ }
515
+ const ft = I.length;
516
+ $.setSelectionRange(ft, ft), R({ start: ft, end: ft });
517
+ },
518
+ onPaste: (S) => {
519
+ if (m?.(S), S.defaultPrevented) return;
520
+ S.preventDefault();
521
+ const $ = mt(S.clipboardData.getData("text"), M, r);
522
+ R({ start: $.length, end: $.length }), Ct($);
523
+ },
524
+ onFocus: (S) => {
525
+ R({
526
+ start: S.currentTarget.selectionStart ?? I.length,
527
+ end: S.currentTarget.selectionEnd ?? I.length
528
+ }), y?.(S);
529
+ },
530
+ onBlur: b
213
531
  }
214
532
  ),
215
- /* @__PURE__ */ n("span", { className: "facto-otp__visual", style: { gridTemplateColumns: `repeat(${Math.min(C, 8)}, minmax(0, 1fr))` }, "aria-hidden": "true", children: Array.from({ length: C }, (I, $) => /* @__PURE__ */ n("span", { className: "facto-otp__cell", children: N[$] && /* @__PURE__ */ n("span", { className: "facto-otp__digit", children: N[$] }, `${$}-${N[$]}`) }, $)) })
533
+ /* @__PURE__ */ e("span", { className: "facto-otp__visual", "aria-hidden": "true", children: Array.from({ length: M }, (S, $) => {
534
+ const Q = B.end > B.start && $ >= B.start && $ < B.end, K = $ === Ht && B.start === B.end;
535
+ return /* @__PURE__ */ u(Jt, { children: [
536
+ /* @__PURE__ */ e(
537
+ "span",
538
+ {
539
+ className: nt(
540
+ "facto-otp__cell",
541
+ !!I[$] && "facto-otp__cell--filled",
542
+ K && "facto-otp__cell--active",
543
+ Q && "facto-otp__cell--selected"
544
+ ),
545
+ style: { "--facto-otp-index": $ },
546
+ children: I[$] ? /* @__PURE__ */ e("span", { className: "facto-otp__digit", children: I[$] }, `${$}-${I[$]}`) : null
547
+ }
548
+ ),
549
+ $ === Tt ? /* @__PURE__ */ e("span", { className: "facto-otp__sep" }) : null
550
+ ] }, $);
551
+ }) })
216
552
  ]
217
553
  }
218
554
  ),
219
- (g || d) && /* @__PURE__ */ n(
555
+ (v || p) && /* @__PURE__ */ e(
220
556
  "span",
221
557
  {
222
- id: _,
223
- className: G("facto-otp__message", !!g && "facto-otp__message--error"),
224
- role: g ? "alert" : void 0,
225
- children: g ?? d
558
+ id: O,
559
+ className: nt("facto-otp__message", !!v && "facto-otp__message--error"),
560
+ role: v ? "alert" : void 0,
561
+ children: v ?? p
226
562
  }
227
563
  ),
228
- c && /* @__PURE__ */ n("span", { className: "facto-otp__pending", id: `${h}-pending`, role: "status", children: r })
564
+ s && /* @__PURE__ */ e("span", { className: "facto-otp__pending", id: `${P}-pending`, role: "status", children: h })
229
565
  ] });
230
566
  }
231
- const Y = (t) => t instanceof Date ? t.getTime() : t ?? 0, gt = (t, e) => Math.max(0, Math.ceil((Y(t) - e) / 1e3)), vt = (t) => `Resend code in ${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
232
- function Wt({
567
+ const kt = (t) => t instanceof Date ? t.getTime() : t ?? 0, se = (t, n) => Math.max(0, Math.ceil((kt(t) - n) / 1e3)), le = (t) => `Resend code in ${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
568
+ function Dt({
233
569
  deadline: t,
234
- pending: e,
570
+ pending: n,
235
571
  disabled: a,
236
572
  children: o = "Resend code",
237
- formatCountdown: i = vt,
238
- className: c,
239
- onClick: r,
240
- ...m
573
+ formatCountdown: r = le,
574
+ className: i,
575
+ onClick: c,
576
+ ...l
241
577
  }) {
242
- const [d, g] = H(null), p = d === null ? 0 : gt(t, d);
243
- L(() => {
244
- let w;
578
+ const [s, h] = A(null), f = s === null ? 0 : se(t, s);
579
+ q(() => {
580
+ let v;
245
581
  const k = () => {
246
- const y = Date.now();
247
- g(y);
248
- const T = Y(t) - y;
249
- Number.isFinite(T) && T > 0 && (w = window.setTimeout(k, Math.min(T, 250)));
582
+ const w = Date.now();
583
+ h(w);
584
+ const C = kt(t) - w;
585
+ Number.isFinite(C) && C > 0 && (v = window.setTimeout(k, Math.min(C, 250)));
250
586
  };
251
- return k(), () => window.clearTimeout(w);
587
+ return k(), () => window.clearTimeout(v);
252
588
  }, [t]);
253
- const v = d === null ? Y(t) > 0 : p > 0;
254
- return /* @__PURE__ */ f(
589
+ const p = s === null ? kt(t) > 0 : f > 0;
590
+ return /* @__PURE__ */ u(
255
591
  "button",
256
592
  {
257
- ...m,
593
+ ...l,
258
594
  type: "button",
259
- className: G("facto-resend-code", e && "facto-resend-code--pending", c),
260
- disabled: !!(a || e || v),
261
- "aria-busy": e || void 0,
262
- onClick: r,
595
+ className: nt("facto-resend-code", n && "facto-resend-code--pending", i),
596
+ disabled: !!(a || n || p),
597
+ "aria-busy": n || void 0,
598
+ onClick: c,
263
599
  children: [
264
- e && /* @__PURE__ */ n("span", { className: "facto-resend-code__spinner", "aria-hidden": "true" }),
265
- v && d !== null ? i(p) : o
600
+ n && /* @__PURE__ */ e("span", { className: "facto-resend-code__spinner", "aria-hidden": "true" }),
601
+ p && s !== null ? r(f) : o
266
602
  ]
267
603
  }
268
604
  );
269
605
  }
270
- const ct = it(null);
271
- function At({
606
+ const At = wt(null);
607
+ function Oe({
272
608
  children: t,
273
- duration: e,
609
+ duration: n,
274
610
  maxVisible: a = 3,
275
611
  label: o = "Notifications ({hotkey})"
276
612
  }) {
277
- const [i, c] = H([]), r = F([]), m = F(0), d = F(0), g = Number.isFinite(a) ? Math.max(1, Math.floor(a)) : 3, p = e ?? 2600, v = R((s) => {
278
- r.current = s, c(s);
613
+ const [r, i] = A([]), c = x([]), l = x(0), s = x(0), h = Number.isFinite(a) ? Math.max(1, Math.floor(a)) : 3, f = n ?? 2600, p = X((d) => {
614
+ c.current = d, i(d);
279
615
  }, []);
280
- L(() => {
281
- v(r.current.slice(-g));
282
- }, [v, g]);
283
- const w = R((s, u, b = {}) => {
284
- const h = b.id ?? `toast-${++m.current}`, _ = ++d.current, C = {
285
- id: h,
286
- tone: s,
287
- title: u,
288
- description: b.description,
289
- action: b.action,
290
- duration: s === "loading" ? b.duration ?? 1 / 0 : b.duration,
291
- generation: _
292
- }, N = r.current, E = N.findIndex((P) => P.id === h);
293
- return v(E >= 0 ? N.map((P) => P.id === h ? { ...P, ...C } : P) : [...N, C].slice(-g)), { id: h, generation: _ };
294
- }, [v, g]), k = R((s, u, b) => {
295
- const h = r.current, _ = h.findIndex((N) => N.id === s);
296
- if (_ < 0 || b !== void 0 && h[_].generation !== b) return !1;
297
- const C = ++d.current;
298
- v(h.map((N) => N.id !== s ? N : {
299
- ...N,
300
- ...u.title === void 0 ? {} : { title: u.title },
301
- ...u.tone === void 0 ? {} : { tone: u.tone },
302
- ...u.description === void 0 ? {} : { description: u.description },
303
- ...u.action === void 0 ? {} : { action: u.action },
304
- duration: u.duration ?? (N.tone === "loading" && (u.tone ?? N.tone) !== "loading" ? p : (u.tone ?? N.tone) === "loading" ? 1 / 0 : N.duration),
305
- generation: C
616
+ q(() => {
617
+ p(c.current.slice(-h));
618
+ }, [p, h]);
619
+ const v = X((d, m, y = {}) => {
620
+ const b = y.id ?? `toast-${++l.current}`, N = ++s.current, T = {
621
+ id: b,
622
+ tone: d,
623
+ title: m,
624
+ description: y.description,
625
+ action: y.action,
626
+ duration: d === "loading" ? y.duration ?? 1 / 0 : y.duration,
627
+ generation: N
628
+ }, L = c.current, j = L.findIndex((P) => P.id === b);
629
+ return p(j >= 0 ? L.map((P) => P.id === b ? { ...P, ...T } : P) : [...L, T].slice(-h)), { id: b, generation: N };
630
+ }, [p, h]), k = X((d, m, y) => {
631
+ const b = c.current, N = b.findIndex((L) => L.id === d);
632
+ if (N < 0 || y !== void 0 && b[N].generation !== y) return !1;
633
+ const T = ++s.current;
634
+ p(b.map((L) => L.id !== d ? L : {
635
+ ...L,
636
+ ...m.title === void 0 ? {} : { title: m.title },
637
+ ...m.tone === void 0 ? {} : { tone: m.tone },
638
+ ...m.description === void 0 ? {} : { description: m.description },
639
+ ...m.action === void 0 ? {} : { action: m.action },
640
+ duration: m.duration ?? (L.tone === "loading" && (m.tone ?? L.tone) !== "loading" ? f : (m.tone ?? L.tone) === "loading" ? 1 / 0 : L.duration),
641
+ generation: T
306
642
  }));
307
- }, [v, p]), y = R((s, u) => (k(s, u), s), [k]), T = R((s, u) => {
308
- const b = r.current, h = s === void 0 ? void 0 : b.find((_) => _.id === s);
309
- s !== void 0 && (!h || u !== void 0 && h.generation !== u) || v(s === void 0 ? [] : b.filter((_) => _.id !== s));
310
- }, [v]), x = ft(() => ({
311
- success: (s, u) => w("success", s, u).id,
312
- error: (s, u) => w("error", s, u).id,
313
- warning: (s, u) => w("warning", s, u).id,
314
- info: (s, u) => w("info", s, u).id,
315
- loading: (s, u) => w("loading", s, u).id,
316
- update: y,
317
- dismiss: T,
318
- promise: (s, u, b) => {
319
- const h = w("loading", u.loading, b);
320
- return Promise.resolve(s).then(
321
- (_) => (k(h.id, {
322
- title: typeof u.success == "function" ? u.success(_) : u.success,
643
+ }, [p, f]), w = X((d, m) => (k(d, m), d), [k]), C = X((d, m) => {
644
+ const y = c.current, b = d === void 0 ? void 0 : y.find((N) => N.id === d);
645
+ d !== void 0 && (!b || m !== void 0 && b.generation !== m) || p(d === void 0 ? [] : y.filter((N) => N.id !== d));
646
+ }, [p]), g = te(() => ({
647
+ success: (d, m) => v("success", d, m).id,
648
+ error: (d, m) => v("error", d, m).id,
649
+ warning: (d, m) => v("warning", d, m).id,
650
+ info: (d, m) => v("info", d, m).id,
651
+ loading: (d, m) => v("loading", d, m).id,
652
+ update: w,
653
+ dismiss: C,
654
+ promise: (d, m, y) => {
655
+ const b = v("loading", m.loading, y);
656
+ return Promise.resolve(d).then(
657
+ (N) => (k(b.id, {
658
+ title: typeof m.success == "function" ? m.success(N) : m.success,
323
659
  tone: "success",
324
- duration: b?.duration ?? p
325
- }, h.generation), _),
326
- (_) => {
327
- throw k(h.id, {
328
- title: typeof u.error == "function" ? u.error(_) : u.error,
660
+ duration: y?.duration ?? f
661
+ }, b.generation), N),
662
+ (N) => {
663
+ throw k(b.id, {
664
+ title: typeof m.error == "function" ? m.error(N) : m.error,
329
665
  tone: "error",
330
- duration: b?.duration ?? p
331
- }, h.generation), _;
666
+ duration: y?.duration ?? f
667
+ }, b.generation), N;
332
668
  }
333
669
  );
334
670
  }
335
- }), [w, p, T, y, k]);
336
- return /* @__PURE__ */ n(ct.Provider, { value: x, children: /* @__PURE__ */ f(kt, { duration: e, children: [
671
+ }), [v, f, C, w, k]);
672
+ return /* @__PURE__ */ e(At.Provider, { value: g, children: /* @__PURE__ */ u(ye, { duration: n, children: [
337
673
  t,
338
- i.map((s) => /* @__PURE__ */ f(
339
- yt,
674
+ r.map((d) => /* @__PURE__ */ u(
675
+ Ne,
340
676
  {
341
- duration: s.duration,
342
- icon: s.tone === "loading" ? /* @__PURE__ */ n("span", { className: "facto-notification-spinner" }) : void 0,
343
- tone: s.tone === "error" ? "danger" : s.tone === "loading" ? "info" : s.tone,
344
- type: s.tone === "error" ? "foreground" : "background",
677
+ duration: d.duration,
678
+ icon: d.tone === "loading" ? /* @__PURE__ */ e("span", { className: "facto-notification-spinner" }) : void 0,
679
+ tone: d.tone === "error" ? "danger" : d.tone === "loading" ? "info" : d.tone,
680
+ type: d.tone === "error" ? "foreground" : "background",
345
681
  open: !0,
346
- onOpenChange: (u) => {
347
- u || T(s.id, s.generation);
682
+ onOpenChange: (m) => {
683
+ m || C(d.id, d.generation);
348
684
  },
349
685
  children: [
350
- /* @__PURE__ */ n(Tt, { children: s.title }),
351
- s.tone === "loading" && /* @__PURE__ */ n(ot, { children: /* @__PURE__ */ n("span", { role: "status", children: "Loading" }) }),
352
- s.description != null && /* @__PURE__ */ n(ot, { children: s.description }),
353
- s.action && /* @__PURE__ */ n(Ct, { altText: s.action.altText, onClick: s.action.onClick, children: s.action.label }),
354
- /* @__PURE__ */ n(It, {})
686
+ /* @__PURE__ */ e(ke, { children: d.title }),
687
+ d.tone === "loading" && /* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ e("span", { role: "status", children: "Loading" }) }),
688
+ d.description != null && /* @__PURE__ */ e(Lt, { children: d.description }),
689
+ d.action && /* @__PURE__ */ e(we, { altText: d.action.altText, onClick: d.action.onClick, children: d.action.label }),
690
+ /* @__PURE__ */ e(Ce, {})
355
691
  ]
356
692
  },
357
- `${s.id}-${s.generation}`
693
+ `${d.id}-${d.generation}`
358
694
  )),
359
- /* @__PURE__ */ n(Mt, { label: o })
695
+ /* @__PURE__ */ e(Te, { label: o })
360
696
  ] }) });
361
697
  }
362
- function Ot() {
363
- const t = S(ct);
698
+ function We() {
699
+ const t = W(At);
364
700
  if (!t) throw new Error("useToast must be used within a NotificationsProvider");
365
701
  return t;
366
702
  }
367
- const l = (...t) => t.filter(Boolean).join(" "), V = (...t) => t.filter(Boolean).join(" ") || void 0, B = it({}), _t = (t) => Object.fromEntries(
368
- Object.entries(t ?? {}).filter(([e, a]) => e.startsWith("--facto-") && a !== void 0 && a !== null)
703
+ const D = (...t) => t.filter(Boolean).join(" "), de = () => /* @__PURE__ */ u("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: [
704
+ /* @__PURE__ */ e("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2.5" }),
705
+ /* @__PURE__ */ e("path", { d: "M3.5 7l8.5 6 8.5-6" })
706
+ ] }), lt = ({ size: t = 16, className: n }) => /* @__PURE__ */ e("svg", { className: n, width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ e("path", { d: "M5 13l4 4L19 7" }) }), zt = () => /* @__PURE__ */ u("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: [
707
+ /* @__PURE__ */ e("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
708
+ /* @__PURE__ */ e("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
709
+ ] }), ue = () => /* @__PURE__ */ e("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ e("path", { d: "M12 3v12m0 0l-4-4m4 4l4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" }) }), fe = () => /* @__PURE__ */ u("svg", { width: "64", height: "64", viewBox: "0 0 64 64", fill: "none", "aria-hidden": "true", focusable: "false", children: [
710
+ /* @__PURE__ */ e("rect", { x: "8", y: "8", width: "48", height: "48", rx: "16", fill: "var(--facto-accent-soft)", stroke: "var(--facto-notice-success-border)" }),
711
+ /* @__PURE__ */ e("path", { d: "M24 29v-4a8 8 0 1 1 16 0v4", stroke: "var(--facto-accent-strong)", strokeWidth: "2.4", strokeLinecap: "round" }),
712
+ /* @__PURE__ */ e("rect", { x: "20", y: "29", width: "24", height: "18", rx: "5", fill: "var(--facto-surface)", stroke: "var(--facto-accent-strong)", strokeWidth: "2.2" }),
713
+ /* @__PURE__ */ e("circle", { cx: "32", cy: "37", r: "2.2", fill: "var(--facto-accent-strong)" }),
714
+ /* @__PURE__ */ e("path", { d: "M32 39.2V42", stroke: "var(--facto-accent-strong)", strokeWidth: "2.2", strokeLinecap: "round" })
715
+ ] });
716
+ function Ve({
717
+ surface: t = "page",
718
+ wide: n = !1,
719
+ stepKey: a,
720
+ motion: o,
721
+ brand: r,
722
+ badge: i,
723
+ children: c,
724
+ className: l,
725
+ ...s
726
+ }) {
727
+ const h = a !== void 0 ? /* @__PURE__ */ e(oe, { stepKey: a, motion: o, children: c }) : c;
728
+ return t === "plain" ? /* @__PURE__ */ e("div", { ...s, className: D("facto-auth-shell", "facto-auth-shell--plain", l), children: /* @__PURE__ */ e("div", { className: D("facto-auth-shell__column", n && "facto-auth-shell__column--wide"), children: h }) }) : /* @__PURE__ */ u("div", { ...s, className: D("facto-auth-shell", "facto-auth-shell--page", l), children: [
729
+ (r || i) && /* @__PURE__ */ u("header", { className: "facto-auth-shell__header", children: [
730
+ /* @__PURE__ */ e("div", { children: r }),
731
+ /* @__PURE__ */ e("div", { children: i })
732
+ ] }),
733
+ /* @__PURE__ */ e("div", { className: "facto-auth-shell__body", children: /* @__PURE__ */ e("div", { className: D("facto-auth-shell__column", n && "facto-auth-shell__column--wide"), children: h }) })
734
+ ] });
735
+ }
736
+ function yt({
737
+ current: t,
738
+ total: n,
739
+ label: a,
740
+ className: o,
741
+ ...r
742
+ }) {
743
+ const i = Math.max(1, Math.floor(n)), c = Math.min(i, Math.max(1, Math.floor(t))), l = a ?? `Step ${c} of ${i}`;
744
+ return /* @__PURE__ */ u(
745
+ "div",
746
+ {
747
+ ...r,
748
+ className: D("facto-step-progress", o),
749
+ role: "progressbar",
750
+ "aria-valuenow": c,
751
+ "aria-valuemin": 1,
752
+ "aria-valuemax": i,
753
+ "aria-label": typeof l == "string" ? l : `Step ${c} of ${i}`,
754
+ children: [
755
+ /* @__PURE__ */ e("div", { className: "facto-step-progress__bars", "aria-hidden": "true", children: Array.from({ length: i }, (s, h) => {
756
+ const f = h + 1;
757
+ return /* @__PURE__ */ e(
758
+ "span",
759
+ {
760
+ className: D(
761
+ "facto-step-progress__bar",
762
+ f < c && "facto-step-progress__bar--done",
763
+ f === c && "facto-step-progress__bar--active"
764
+ )
765
+ },
766
+ f
767
+ );
768
+ }) }),
769
+ /* @__PURE__ */ e("span", { className: "facto-step-progress__label", children: l })
770
+ ]
771
+ }
772
+ );
773
+ }
774
+ function he({
775
+ value: t,
776
+ onEdit: n,
777
+ editLabel: a = "Edit",
778
+ className: o,
779
+ ...r
780
+ }) {
781
+ return /* @__PURE__ */ u("div", { ...r, className: D("facto-identity-pill", o), children: [
782
+ /* @__PURE__ */ e("span", { className: "facto-identity-pill__value", children: t }),
783
+ n && /* @__PURE__ */ e(
784
+ "button",
785
+ {
786
+ type: "button",
787
+ className: "facto-auth-link-btn facto-auth-link-btn--accent",
788
+ style: { minHeight: 28, padding: "2px 4px" },
789
+ onClick: n,
790
+ children: a
791
+ }
792
+ )
793
+ ] });
794
+ }
795
+ function me({
796
+ value: t,
797
+ displayValue: n,
798
+ copyLabel: a = "Copy",
799
+ copiedLabel: o = "Copied",
800
+ onCopy: r,
801
+ className: i,
802
+ ariaLabel: c = "Copy setup key"
803
+ }) {
804
+ const [l, s] = A(!1), h = () => {
805
+ typeof navigator < "u" && navigator.clipboard?.writeText && navigator.clipboard.writeText(t).catch(() => {
806
+ }), s(!0), r?.(t), window.setTimeout(() => s(!1), 2e3);
807
+ };
808
+ return /* @__PURE__ */ u(
809
+ "button",
810
+ {
811
+ type: "button",
812
+ className: D("facto-secret-key", l && "facto-secret-key--copied", i),
813
+ "aria-label": c,
814
+ onClick: h,
815
+ children: [
816
+ /* @__PURE__ */ e("code", { className: "facto-secret-key__code", children: n ?? t }),
817
+ /* @__PURE__ */ u("span", { className: "facto-secret-key__action", children: [
818
+ l ? /* @__PURE__ */ e(lt, { size: 15, className: "facto-auth-check-pop" }) : /* @__PURE__ */ e(zt, {}),
819
+ /* @__PURE__ */ e("span", { children: l ? o : a })
820
+ ] })
821
+ ]
822
+ }
823
+ );
824
+ }
825
+ function He({
826
+ email: t,
827
+ code: n,
828
+ onCodeChange: a,
829
+ onSubmit: o,
830
+ onEmailChange: r,
831
+ onBack: i,
832
+ onResend: c,
833
+ resendDeadline: l,
834
+ resendPending: s,
835
+ step: h,
836
+ title: f = "Check your inbox",
837
+ description: p = "Enter the 6-digit code we sent to your email.",
838
+ helperText: v = "Code expires in 10 minutes",
839
+ error: k,
840
+ pending: w = !1,
841
+ verified: C = !1,
842
+ autoSubmit: g = !1,
843
+ length: d = 6,
844
+ alphanumeric: m = !1,
845
+ unreadCount: y = 1,
846
+ submitLabel: b = "Verify email",
847
+ backLabel: N = "Back",
848
+ className: T
849
+ }) {
850
+ const [L, j] = A(!1), [P, O] = A(t), M = G(), I = (R) => {
851
+ R.preventDefault(), n.length === d && !w && o?.(n);
852
+ }, B = (R) => {
853
+ R.preventDefault();
854
+ const E = P.trim();
855
+ E && (r?.(E), j(!1));
856
+ };
857
+ return /* @__PURE__ */ u("div", { className: D("facto-email-verify", T), children: [
858
+ h && /* @__PURE__ */ e(yt, { current: h.current, total: h.total, label: h.label }),
859
+ /* @__PURE__ */ u("div", { className: "facto-auth-head facto-auth-head--center", children: [
860
+ /* @__PURE__ */ u("div", { className: D("facto-mail-badge", C && "facto-mail-badge--verified"), "aria-hidden": "true", children: [
861
+ C ? /* @__PURE__ */ e(lt, { size: 22, className: "facto-auth-check-pop" }) : /* @__PURE__ */ e(de, {}),
862
+ /* @__PURE__ */ e("span", { className: "facto-mail-badge__count", children: C ? "✓" : y })
863
+ ] }),
864
+ /* @__PURE__ */ e("h1", { className: "facto-auth-head__title", children: f }),
865
+ p && /* @__PURE__ */ e("p", { className: "facto-auth-head__description", children: p })
866
+ ] }),
867
+ L && r ? /* @__PURE__ */ u("form", { className: "facto-email-verify__edit", onSubmit: B, children: [
868
+ /* @__PURE__ */ e("label", { htmlFor: M, className: "facto-visually-hidden", children: "Email address" }),
869
+ /* @__PURE__ */ e(
870
+ "input",
871
+ {
872
+ id: M,
873
+ type: "email",
874
+ className: "facto-email-verify__edit-input",
875
+ value: P,
876
+ onChange: (R) => O(R.target.value),
877
+ required: !0
878
+ }
879
+ ),
880
+ /* @__PURE__ */ u("div", { className: "facto-auth-actions-row", children: [
881
+ /* @__PURE__ */ e("button", { type: "button", className: "facto-auth-link-btn facto-auth-link-btn--muted", onClick: () => {
882
+ O(t), j(!1);
883
+ }, children: "Cancel" }),
884
+ /* @__PURE__ */ e("button", { type: "submit", className: "facto-auth-primary-btn", style: { width: "auto", minHeight: 36, padding: "6px 16px" }, children: "Save and resend" })
885
+ ] })
886
+ ] }) : /* @__PURE__ */ e(
887
+ he,
888
+ {
889
+ value: t,
890
+ onEdit: r ? () => {
891
+ O(t), j(!0);
892
+ } : void 0
893
+ }
894
+ ),
895
+ /* @__PURE__ */ u("form", { className: "facto-auth-stack", onSubmit: I, children: [
896
+ /* @__PURE__ */ e("div", { className: "facto-email-verify__otp", children: /* @__PURE__ */ e(
897
+ pt,
898
+ {
899
+ "aria-label": "Verification code",
900
+ value: n,
901
+ onValueChange: a,
902
+ onComplete: g ? o : void 0,
903
+ length: d,
904
+ split: d === 6 || d === 8,
905
+ alphanumeric: m,
906
+ pending: w,
907
+ verified: C,
908
+ error: k,
909
+ helperText: !k && !C ? v : void 0
910
+ }
911
+ ) }),
912
+ !g && /* @__PURE__ */ u(
913
+ "button",
914
+ {
915
+ type: "submit",
916
+ className: "facto-auth-primary-btn",
917
+ disabled: w || n.length < d,
918
+ "aria-busy": w || void 0,
919
+ children: [
920
+ w && /* @__PURE__ */ e("span", { className: "facto-auth-spinner", "aria-hidden": "true" }),
921
+ b
922
+ ]
923
+ }
924
+ )
925
+ ] }),
926
+ (i || c) && /* @__PURE__ */ u("div", { className: "facto-auth-actions-row", children: [
927
+ i ? /* @__PURE__ */ e("button", { type: "button", className: "facto-auth-link-btn facto-auth-link-btn--muted", onClick: i, children: N }) : /* @__PURE__ */ e("span", {}),
928
+ c ? /* @__PURE__ */ e(
929
+ Dt,
930
+ {
931
+ deadline: l,
932
+ pending: s,
933
+ onClick: c
934
+ }
935
+ ) : null
936
+ ] })
937
+ ] });
938
+ }
939
+ function qe({
940
+ step: t,
941
+ illustration: n,
942
+ title: a = "Secure your account",
943
+ description: o = "Add a passkey for faster, phishing-resistant sign-in on this device.",
944
+ capabilities: r = [
945
+ "Works with Touch ID, Face ID, or a hardware security key",
946
+ "Bound to this domain to protect against phishing links"
947
+ ],
948
+ ctaLabel: i = "Create passkey",
949
+ pendingLabel: c = "Waiting for your device…",
950
+ pending: l = !1,
951
+ verified: s = !1,
952
+ verifiedMessage: h = "Passkey registered on this device.",
953
+ error: f,
954
+ onCreatePasskey: p,
955
+ onSwitchAlternative: v,
956
+ alternativeLabel: k = "Use an authenticator app instead",
957
+ className: w
958
+ }) {
959
+ return /* @__PURE__ */ u("div", { className: D("facto-passkey-card", w), children: [
960
+ t && /* @__PURE__ */ e(yt, { current: t.current, total: t.total, label: t.label }),
961
+ /* @__PURE__ */ u("div", { className: "facto-auth-head facto-auth-head--center", children: [
962
+ /* @__PURE__ */ e(
963
+ "div",
964
+ {
965
+ className: D(
966
+ "facto-passkey-card__hero",
967
+ l && "facto-passkey-card__hero--pending",
968
+ s && !f && "facto-passkey-card__hero--verified"
969
+ ),
970
+ children: n ?? /* @__PURE__ */ e(fe, {})
971
+ }
972
+ ),
973
+ /* @__PURE__ */ e("h1", { className: "facto-auth-head__title", children: a }),
974
+ o && /* @__PURE__ */ e("p", { className: "facto-auth-head__description", children: o })
975
+ ] }),
976
+ r.length > 0 && /* @__PURE__ */ e("div", { className: "facto-passkey-card__panel", children: /* @__PURE__ */ e("ul", { className: "facto-passkey-card__list", children: r.map((C, g) => /* @__PURE__ */ u("li", { children: [
977
+ /* @__PURE__ */ e(lt, { size: 15, className: "facto-passkey-card__check" }),
978
+ /* @__PURE__ */ e("span", { children: C })
979
+ ] }, g)) }) }),
980
+ f && /* @__PURE__ */ e("div", { className: "facto-auth-alert", role: "alert", children: f }),
981
+ s && !f && /* @__PURE__ */ u("div", { className: "facto-auth-status", role: "status", children: [
982
+ /* @__PURE__ */ e(lt, { size: 15 }),
983
+ /* @__PURE__ */ e("span", { children: h })
984
+ ] }),
985
+ /* @__PURE__ */ u("div", { className: "facto-auth-stack facto-auth-stack--tight", children: [
986
+ /* @__PURE__ */ u(
987
+ "button",
988
+ {
989
+ type: "button",
990
+ className: "facto-auth-primary-btn",
991
+ disabled: l,
992
+ "aria-busy": l || void 0,
993
+ onClick: p,
994
+ children: [
995
+ l && /* @__PURE__ */ e("span", { className: "facto-auth-spinner", "aria-hidden": "true" }),
996
+ l ? c : i
997
+ ]
998
+ }
999
+ ),
1000
+ v && /* @__PURE__ */ e("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ e("button", { type: "button", className: "facto-auth-link-btn facto-auth-link-btn--muted", onClick: v, children: k }) })
1001
+ ] })
1002
+ ] });
1003
+ }
1004
+ function Ue({
1005
+ step: t,
1006
+ title: n = "Set up an authenticator app",
1007
+ description: a = "Scan the QR code in Google Authenticator, 1Password, or another TOTP app.",
1008
+ issuer: o,
1009
+ accountLabel: r,
1010
+ qrCode: i,
1011
+ manualKey: c,
1012
+ displayManualKey: l,
1013
+ code: s,
1014
+ onCodeChange: h,
1015
+ onSubmit: f,
1016
+ emailFactor: p,
1017
+ error: v,
1018
+ pending: k = !1,
1019
+ verified: w = !1,
1020
+ submitLabel: C = "Verify and continue",
1021
+ onSwitchAlternative: g,
1022
+ alternativeLabel: d = "Use a passkey instead",
1023
+ className: m
1024
+ }) {
1025
+ const y = !p || p.code.length === 6, b = s.length === 6 && y && !k, N = (T) => {
1026
+ T.preventDefault(), b && f(s);
1027
+ };
1028
+ return /* @__PURE__ */ u("div", { className: D("facto-totp-card", m), children: [
1029
+ t && /* @__PURE__ */ e(yt, { current: t.current, total: t.total, label: t.label }),
1030
+ /* @__PURE__ */ u("div", { className: "facto-auth-head", children: [
1031
+ /* @__PURE__ */ e("h1", { className: "facto-auth-head__title", children: n }),
1032
+ a && /* @__PURE__ */ e("p", { className: "facto-auth-head__description", children: a })
1033
+ ] }),
1034
+ /* @__PURE__ */ u("div", { className: "facto-totp-card__qr-row", children: [
1035
+ /* @__PURE__ */ e("div", { className: "facto-totp-card__qr-frame", children: i }),
1036
+ /* @__PURE__ */ u("div", { className: "facto-totp-card__qr-meta", children: [
1037
+ /* @__PURE__ */ u("div", { className: "facto-totp-card__issuer", children: [
1038
+ o,
1039
+ ": ",
1040
+ r
1041
+ ] }),
1042
+ /* @__PURE__ */ e("div", { className: "facto-totp-card__caption", children: "Scan this QR code or copy the setup key below." })
1043
+ ] })
1044
+ ] }),
1045
+ /* @__PURE__ */ e(me, { value: c, displayValue: l ?? c }),
1046
+ /* @__PURE__ */ u("form", { className: "facto-auth-stack", onSubmit: N, children: [
1047
+ p ? /* @__PURE__ */ u("div", { className: "facto-totp-card__dual", children: [
1048
+ /* @__PURE__ */ u("div", { className: "facto-totp-card__factor-row", children: [
1049
+ /* @__PURE__ */ u("div", { className: "facto-totp-card__factor-head", children: [
1050
+ /* @__PURE__ */ u("div", { children: [
1051
+ /* @__PURE__ */ e("div", { className: "facto-totp-card__factor-title", children: p.title ?? "Email verification code" }),
1052
+ /* @__PURE__ */ e("div", { className: "facto-totp-card__factor-sub", children: p.description ?? "Confirm your account email." })
1053
+ ] }),
1054
+ /* @__PURE__ */ e(
1055
+ Dt,
1056
+ {
1057
+ deadline: p.deadline,
1058
+ pending: p.sending,
1059
+ onClick: p.onSend,
1060
+ children: "Send code"
1061
+ }
1062
+ )
1063
+ ] }),
1064
+ /* @__PURE__ */ e(
1065
+ pt,
1066
+ {
1067
+ "aria-label": "Email verification code",
1068
+ value: p.code,
1069
+ onValueChange: p.onCodeChange,
1070
+ length: 6,
1071
+ split: !0,
1072
+ pending: k
1073
+ }
1074
+ )
1075
+ ] }),
1076
+ /* @__PURE__ */ u("div", { className: "facto-totp-card__factor-row", children: [
1077
+ /* @__PURE__ */ u("div", { children: [
1078
+ /* @__PURE__ */ e("div", { className: "facto-totp-card__factor-title", children: "Authenticator 6-digit code" }),
1079
+ /* @__PURE__ */ e("div", { className: "facto-totp-card__factor-sub", children: "Enter the current code from your authenticator app." })
1080
+ ] }),
1081
+ /* @__PURE__ */ e(
1082
+ pt,
1083
+ {
1084
+ "aria-label": "Authenticator 6-digit code",
1085
+ value: s,
1086
+ onValueChange: h,
1087
+ length: 6,
1088
+ split: !0,
1089
+ pending: k,
1090
+ verified: w,
1091
+ error: void 0
1092
+ }
1093
+ )
1094
+ ] })
1095
+ ] }) : /* @__PURE__ */ e(
1096
+ pt,
1097
+ {
1098
+ label: "6-digit authenticator code",
1099
+ value: s,
1100
+ onValueChange: h,
1101
+ length: 6,
1102
+ split: !0,
1103
+ pending: k,
1104
+ verified: w,
1105
+ error: v
1106
+ }
1107
+ ),
1108
+ p && v && /* @__PURE__ */ e("div", { className: "facto-auth-alert", role: "alert", children: v }),
1109
+ /* @__PURE__ */ u(
1110
+ "button",
1111
+ {
1112
+ type: "submit",
1113
+ className: "facto-auth-primary-btn",
1114
+ disabled: !b,
1115
+ "aria-busy": k || void 0,
1116
+ children: [
1117
+ k && /* @__PURE__ */ e("span", { className: "facto-auth-spinner", "aria-hidden": "true" }),
1118
+ C
1119
+ ]
1120
+ }
1121
+ )
1122
+ ] }),
1123
+ g && /* @__PURE__ */ e("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ e("button", { type: "button", className: "facto-auth-link-btn facto-auth-link-btn--muted", onClick: g, children: d }) })
1124
+ ] });
1125
+ }
1126
+ function pe(t, n = {}) {
1127
+ return [...[
1128
+ `${n.issuer ?? "Facto"} — Recovery Codes`,
1129
+ ...n.account ? [`Account: ${n.account}`] : [],
1130
+ "",
1131
+ "Each code can be used once to recover account access.",
1132
+ "Store these codes in a password manager or secure offline location.",
1133
+ ""
1134
+ ], ...t.map((o, r) => `${r + 1}. ${o}`), ""].join(`
1135
+ `);
1136
+ }
1137
+ function Ge({
1138
+ codes: t,
1139
+ usedIndices: n = [],
1140
+ variant: a = "onboarding",
1141
+ step: o,
1142
+ title: r,
1143
+ description: i,
1144
+ confirmationLabel: c = "I have saved these recovery codes in a safe place",
1145
+ continueLabel: l = "Continue",
1146
+ regenerateLabel: s = "Generate new codes",
1147
+ onCopyAll: h,
1148
+ onDownload: f,
1149
+ onContinue: p,
1150
+ onRegenerate: v,
1151
+ className: k
1152
+ }) {
1153
+ const [w, C] = A(!1), [g, d] = A(!1), [m, y] = A(null), b = G(), N = a === "manage", T = new Set(n), L = t.filter((B, R) => !T.has(R)).length, j = r ?? (N ? "Recovery codes" : "Save your recovery codes"), P = i ?? (N ? `${L} of ${t.length} one-time recovery codes remaining. Regenerating invalidates all existing codes.` : "Store these one-time codes somewhere safe. You will need one to register a replacement passkey if you lose this device."), O = (B, R) => {
1154
+ T.has(R) || (typeof navigator < "u" && navigator.clipboard?.writeText && navigator.clipboard.writeText(B).catch(() => {
1155
+ }), y(R), window.setTimeout(() => y((E) => E === R ? null : E), 1200));
1156
+ }, M = () => {
1157
+ typeof navigator < "u" && navigator.clipboard?.writeText && navigator.clipboard.writeText(t.join(`
1158
+ `)).catch(() => {
1159
+ }), d(!0), N || C(!0), h?.(t), window.setTimeout(() => d(!1), 2e3);
1160
+ }, I = () => {
1161
+ if (N || C(!0), f) {
1162
+ f(t);
1163
+ return;
1164
+ }
1165
+ if (typeof document > "u" || typeof URL > "u") return;
1166
+ const B = new Blob([pe(t)], { type: "text/plain;charset=utf-8" }), R = URL.createObjectURL(B), E = document.createElement("a");
1167
+ E.href = R, E.download = "facto-recovery-codes.txt", document.body.appendChild(E), E.click(), E.remove(), window.setTimeout(() => URL.revokeObjectURL(R), 1e3);
1168
+ };
1169
+ return /* @__PURE__ */ u("div", { className: D("facto-recovery-step", k), children: [
1170
+ o && /* @__PURE__ */ e(yt, { current: o.current, total: o.total, label: o.label }),
1171
+ /* @__PURE__ */ u("div", { className: "facto-auth-head", children: [
1172
+ /* @__PURE__ */ e("h1", { className: "facto-auth-head__title", children: j }),
1173
+ /* @__PURE__ */ e("p", { className: "facto-auth-head__description", children: P })
1174
+ ] }),
1175
+ /* @__PURE__ */ u("div", { className: "facto-recovery-step__panel", children: [
1176
+ /* @__PURE__ */ e("div", { className: "facto-recovery-step__grid", "aria-label": "Recovery codes", children: t.map((B, R) => {
1177
+ const E = N && T.has(R), rt = m === R;
1178
+ return /* @__PURE__ */ e(
1179
+ "button",
1180
+ {
1181
+ type: "button",
1182
+ className: D(
1183
+ "facto-recovery-step__code",
1184
+ E && "facto-recovery-step__code--used",
1185
+ rt && "facto-recovery-step__code--copied"
1186
+ ),
1187
+ disabled: E,
1188
+ "aria-label": E ? `${B}, used` : `Copy recovery code ${B}`,
1189
+ onClick: () => O(B, R),
1190
+ children: rt ? "Copied ✓" : B
1191
+ },
1192
+ `${B}-${R}`
1193
+ );
1194
+ }) }),
1195
+ /* @__PURE__ */ u("div", { className: "facto-recovery-step__toolbar", children: [
1196
+ /* @__PURE__ */ u("button", { type: "button", className: "facto-recovery-step__utility-btn", onClick: M, children: [
1197
+ g ? /* @__PURE__ */ e(lt, { size: 15, className: "facto-auth-check-pop" }) : /* @__PURE__ */ e(zt, {}),
1198
+ /* @__PURE__ */ e("span", { children: g ? "Copied all" : "Copy codes" })
1199
+ ] }),
1200
+ /* @__PURE__ */ u("button", { type: "button", className: "facto-recovery-step__utility-btn", onClick: I, children: [
1201
+ /* @__PURE__ */ e(ue, {}),
1202
+ /* @__PURE__ */ e("span", { children: "Download .txt" })
1203
+ ] })
1204
+ ] })
1205
+ ] }),
1206
+ N ? v ? /* @__PURE__ */ e("button", { type: "button", className: "facto-auth-primary-btn", onClick: v, children: s }) : null : /* @__PURE__ */ u(et, { children: [
1207
+ /* @__PURE__ */ u("label", { className: "facto-recovery-step__confirm", htmlFor: b, children: [
1208
+ /* @__PURE__ */ e(
1209
+ "input",
1210
+ {
1211
+ id: b,
1212
+ type: "checkbox",
1213
+ className: "facto-recovery-step__checkbox",
1214
+ checked: w,
1215
+ onChange: (B) => C(B.target.checked)
1216
+ }
1217
+ ),
1218
+ /* @__PURE__ */ e("span", { children: c })
1219
+ ] }),
1220
+ /* @__PURE__ */ e(
1221
+ "button",
1222
+ {
1223
+ type: "button",
1224
+ className: "facto-auth-primary-btn",
1225
+ disabled: !w,
1226
+ onClick: p,
1227
+ children: l
1228
+ }
1229
+ )
1230
+ ] })
1231
+ ] });
1232
+ }
1233
+ function Ke({
1234
+ options: t,
1235
+ value: n,
1236
+ onValueChange: a,
1237
+ columns: o = 2,
1238
+ ariaLabel: r,
1239
+ className: i,
1240
+ ...c
1241
+ }) {
1242
+ return /* @__PURE__ */ e(
1243
+ "div",
1244
+ {
1245
+ ...c,
1246
+ role: "radiogroup",
1247
+ "aria-label": r,
1248
+ className: D("facto-selection-group", o === 1 && "facto-selection-group--single", i),
1249
+ children: t.map((l) => {
1250
+ const s = l.value === n;
1251
+ return /* @__PURE__ */ u(
1252
+ "button",
1253
+ {
1254
+ type: "button",
1255
+ role: "radio",
1256
+ "aria-checked": s,
1257
+ disabled: l.disabled,
1258
+ className: D("facto-selection-card", s && "facto-selection-card--selected"),
1259
+ onClick: () => a(l.value),
1260
+ children: [
1261
+ /* @__PURE__ */ u("span", { className: "facto-selection-card__head", children: [
1262
+ /* @__PURE__ */ u("span", { className: "facto-selection-card__title", children: [
1263
+ l.icon,
1264
+ /* @__PURE__ */ e("span", { children: l.title })
1265
+ ] }),
1266
+ /* @__PURE__ */ e("span", { className: "facto-selection-card__radio", "aria-hidden": "true" })
1267
+ ] }),
1268
+ l.description && /* @__PURE__ */ e("p", { className: "facto-selection-card__desc", children: l.description }),
1269
+ l.meta && /* @__PURE__ */ e("span", { className: D("facto-selection-card__meta", l.metaTone === "accent" && "facto-selection-card__meta--accent"), children: l.meta })
1270
+ ]
1271
+ },
1272
+ l.value
1273
+ );
1274
+ })
1275
+ }
1276
+ );
1277
+ }
1278
+ const _ = (...t) => t.filter(Boolean).join(" "), ct = (...t) => t.filter(Boolean).join(" ") || void 0, U = wt({}), ve = (t) => Object.fromEntries(
1279
+ Object.entries(t ?? {}).filter(([n, a]) => n.startsWith("--facto-") && a !== void 0 && a !== null)
369
1280
  );
370
- function zt({ className: t, tokens: e, style: a, ...o }) {
371
- const i = S(B), c = { ...e, ...a }, r = { ...i, ..._t(c) };
372
- return /* @__PURE__ */ n(B.Provider, { value: r, children: /* @__PURE__ */ n("div", { ...o, style: c, className: l("facto-theme", t) }) });
373
- }
374
- function z({ name: t, size: e = 20, ...a }) {
375
- return /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", ...a, children: {
376
- plus: /* @__PURE__ */ n("path", { d: "M12 5v14M5 12h14" }),
377
- chevronLeft: /* @__PURE__ */ n("path", { d: "m15 6-6 6 6 6" }),
378
- copy: /* @__PURE__ */ f(q, { children: [
379
- /* @__PURE__ */ n("rect", { x: "8", y: "8", width: "12", height: "12", rx: "2" }),
380
- /* @__PURE__ */ n("path", { d: "M16 8V4H4v12h4" })
1281
+ function Ye({ className: t, tokens: n, style: a, motion: o, ...r }) {
1282
+ const i = W(U), c = { ...n, ...a }, l = { ...i, ...ve(c) };
1283
+ return /* @__PURE__ */ e(gt, { motion: o, children: /* @__PURE__ */ e(U.Provider, { value: l, children: /* @__PURE__ */ e("div", { ...r, style: c, className: _("facto-theme", t) }) }) });
1284
+ }
1285
+ function ot({ name: t, size: n = 20, ...a }) {
1286
+ return /* @__PURE__ */ e("svg", { width: n, height: n, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", ...a, children: {
1287
+ plus: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }),
1288
+ chevronLeft: /* @__PURE__ */ e("path", { d: "m15 6-6 6 6 6" }),
1289
+ copy: /* @__PURE__ */ u(et, { children: [
1290
+ /* @__PURE__ */ e("rect", { x: "8", y: "8", width: "12", height: "12", rx: "2" }),
1291
+ /* @__PURE__ */ e("path", { d: "M16 8V4H4v12h4" })
381
1292
  ] }),
382
- search: /* @__PURE__ */ f(q, { children: [
383
- /* @__PURE__ */ n("circle", { cx: "10", cy: "10", r: "6" }),
384
- /* @__PURE__ */ n("path", { d: "m15 15 5 5" })
1293
+ search: /* @__PURE__ */ u(et, { children: [
1294
+ /* @__PURE__ */ e("circle", { cx: "10", cy: "10", r: "6" }),
1295
+ /* @__PURE__ */ e("path", { d: "m15 15 5 5" })
385
1296
  ] }),
386
- close: /* @__PURE__ */ n("path", { d: "m6 6 12 12M18 6 6 18" }),
387
- arrowLeft: /* @__PURE__ */ n("path", { d: "m12 5-7 7 7 7M5 12h14" }),
388
- check: /* @__PURE__ */ n("path", { d: "m5 12 4 4L19 6" }),
389
- chevronDown: /* @__PURE__ */ n("path", { d: "m6 9 6 6 6-6" }),
390
- chevronRight: /* @__PURE__ */ n("path", { d: "m9 6 6 6-6 6" }),
391
- info: /* @__PURE__ */ f(q, { children: [
392
- /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "9" }),
393
- /* @__PURE__ */ n("path", { d: "M12 11v6M12 7v1" })
1297
+ close: /* @__PURE__ */ e("path", { d: "m6 6 12 12M18 6 6 18" }),
1298
+ arrowLeft: /* @__PURE__ */ e("path", { d: "m12 5-7 7 7 7M5 12h14" }),
1299
+ check: /* @__PURE__ */ e("path", { d: "m5 12 4 4L19 6" }),
1300
+ chevronDown: /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }),
1301
+ chevronRight: /* @__PURE__ */ e("path", { d: "m9 6 6 6-6 6" }),
1302
+ info: /* @__PURE__ */ u(et, { children: [
1303
+ /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "9" }),
1304
+ /* @__PURE__ */ e("path", { d: "M12 11v6M12 7v1" })
394
1305
  ] }),
395
- warning: /* @__PURE__ */ f(q, { children: [
396
- /* @__PURE__ */ n("path", { d: "m12 3 10 18H2L12 3Z" }),
397
- /* @__PURE__ */ n("path", { d: "M12 9v5M12 17v1" })
1306
+ warning: /* @__PURE__ */ u(et, { children: [
1307
+ /* @__PURE__ */ e("path", { d: "m12 3 10 18H2L12 3Z" }),
1308
+ /* @__PURE__ */ e("path", { d: "M12 9v5M12 17v1" })
398
1309
  ] })
399
1310
  }[t] });
400
1311
  }
401
- function Ht({ className: t, ...e }) {
402
- return /* @__PURE__ */ n("div", { ...e, className: l("facto-modal-header", t) });
1312
+ function Qe({ className: t, ...n }) {
1313
+ return /* @__PURE__ */ e("div", { ...n, className: _("facto-modal-header", t) });
403
1314
  }
404
- function Vt({ className: t, ...e }) {
405
- return /* @__PURE__ */ n("div", { ...e, className: l("facto-modal-footer", t) });
1315
+ function Xe({ className: t, ...n }) {
1316
+ return /* @__PURE__ */ e("div", { ...n, className: _("facto-modal-footer", t) });
406
1317
  }
407
- const qt = Z(
1318
+ const Ze = dt(
408
1319
  function({
409
- variant: e = "primary",
1320
+ variant: n = "primary",
410
1321
  size: a = "md",
411
1322
  fullWidth: o,
412
- loading: i,
413
- leadingIcon: c,
414
- trailingIcon: r,
415
- className: m,
416
- children: d,
417
- disabled: g,
418
- type: p = "button",
419
- ...v
1323
+ loading: r,
1324
+ motion: i,
1325
+ style: c,
1326
+ leadingIcon: l,
1327
+ trailingIcon: s,
1328
+ className: h,
1329
+ children: f,
1330
+ disabled: p,
1331
+ type: v = "button",
1332
+ ...k
420
1333
  }, w) {
421
- return /* @__PURE__ */ f(
1334
+ const C = Y(i);
1335
+ return /* @__PURE__ */ u(
422
1336
  "button",
423
1337
  {
424
- ...v,
1338
+ ...k,
425
1339
  ref: w,
426
- type: p,
427
- disabled: g || i,
428
- "aria-busy": i || void 0,
429
- className: l(
1340
+ style: { ...c, ...C },
1341
+ type: v,
1342
+ disabled: p || r,
1343
+ "aria-busy": r || void 0,
1344
+ className: _(
430
1345
  "facto-button",
431
- `facto-button--${e}`,
1346
+ `facto-button--${n}`,
432
1347
  `facto-button--${a}`,
433
1348
  o && "facto-button--full",
434
- m
1349
+ h
435
1350
  ),
436
1351
  children: [
437
- /* @__PURE__ */ f("span", { className: "facto-button__content", style: i ? { opacity: 0 } : void 0, children: [
438
- c,
439
- /* @__PURE__ */ n("span", { children: d }),
440
- r
1352
+ /* @__PURE__ */ u("span", { className: "facto-button__content", style: r ? { opacity: 0 } : void 0, children: [
1353
+ l,
1354
+ /* @__PURE__ */ e("span", { children: f }),
1355
+ s
441
1356
  ] }),
442
- i && /* @__PURE__ */ n("span", { className: "facto-button__spinner", "aria-hidden": "true" })
1357
+ r && /* @__PURE__ */ e("span", { className: "facto-button__spinner", "aria-hidden": "true" })
443
1358
  ]
444
1359
  }
445
1360
  );
446
1361
  }
447
- ), Gt = Z(
448
- function({ ariaLabel: e, size: a = "md", className: o, title: i, type: c = "button", children: r, ...m }, d) {
449
- return /* @__PURE__ */ n(
1362
+ ), Je = dt(
1363
+ function({ ariaLabel: n, size: a = "md", className: o, title: r, type: i = "button", children: c, ...l }, s) {
1364
+ return /* @__PURE__ */ e(
450
1365
  "button",
451
1366
  {
452
- ...m,
453
- ref: d,
454
- type: c,
455
- "aria-label": e,
456
- title: i ?? e,
457
- className: l(
1367
+ ...l,
1368
+ ref: s,
1369
+ type: i,
1370
+ "aria-label": n,
1371
+ title: r ?? n,
1372
+ className: _(
458
1373
  "facto-icon-button",
459
1374
  `facto-icon-button--${a}`,
460
1375
  o
461
1376
  ),
462
- children: /* @__PURE__ */ n("span", { className: "facto-icon-button__visual", children: r })
1377
+ children: /* @__PURE__ */ e("span", { className: "facto-icon-button__visual", children: c })
463
1378
  }
464
1379
  );
465
1380
  }
466
1381
  );
467
- function rt({ padding: t = "lg", className: e, ...a }) {
468
- return /* @__PURE__ */ n(
1382
+ function Ft({ padding: t = "lg", className: n, ...a }) {
1383
+ return /* @__PURE__ */ e(
469
1384
  "div",
470
1385
  {
471
1386
  ...a,
472
- className: l(
1387
+ className: _(
473
1388
  "facto-surface",
474
1389
  `facto-surface--padding-${t}`,
475
- e
1390
+ n
476
1391
  )
477
1392
  }
478
1393
  );
479
1394
  }
480
- function Kt(t) {
481
- return /* @__PURE__ */ n(rt, { ...t });
1395
+ function tn(t) {
1396
+ return /* @__PURE__ */ e(Ft, { ...t });
482
1397
  }
483
- function Ut({ span: t = 1, className: e, ...a }) {
484
- return /* @__PURE__ */ n(
485
- rt,
1398
+ function en({ span: t = 1, className: n, ...a }) {
1399
+ return /* @__PURE__ */ e(
1400
+ Ft,
486
1401
  {
487
1402
  ...a,
488
1403
  padding: "md",
489
- className: l(
1404
+ className: _(
490
1405
  "facto-widget",
491
1406
  t === 2 && "facto-widget--span-2",
492
- e
1407
+ n
493
1408
  )
494
1409
  }
495
1410
  );
496
1411
  }
497
- function Zt({ className: t, children: e, ...a }) {
498
- return /* @__PURE__ */ n("div", { ...a, className: l("facto-dashboard-container", t), children: /* @__PURE__ */ n("div", { className: "facto-dashboard-grid", children: e }) });
1412
+ function nn({ className: t, children: n, ...a }) {
1413
+ return /* @__PURE__ */ e("div", { ...a, className: _("facto-dashboard-container", t), children: /* @__PURE__ */ e("div", { className: "facto-dashboard-grid", children: n }) });
499
1414
  }
500
- function Jt({ withAction: t, className: e, ...a }) {
501
- return /* @__PURE__ */ n(
1415
+ function an({ withAction: t, className: n, ...a }) {
1416
+ return /* @__PURE__ */ e(
502
1417
  "div",
503
1418
  {
504
1419
  ...a,
505
- className: l("facto-widget-head", t && "facto-widget-head--with-action", e)
1420
+ className: _("facto-widget-head", t && "facto-widget-head--with-action", n)
506
1421
  }
507
1422
  );
508
1423
  }
509
- function Qt({ className: t, ...e }) {
510
- return /* @__PURE__ */ n("div", { ...e, className: l("facto-widget-list", t) });
1424
+ function on({ className: t, ...n }) {
1425
+ return /* @__PURE__ */ e("div", { ...n, className: _("facto-widget-list", t) });
511
1426
  }
512
- function Xt({ className: t, ...e }) {
513
- return /* @__PURE__ */ n("div", { ...e, className: l("facto-widget-kv", t) });
1427
+ function cn({ className: t, ...n }) {
1428
+ return /* @__PURE__ */ e("div", { ...n, className: _("facto-widget-kv", t) });
514
1429
  }
515
- function Yt({ className: t, ...e }) {
516
- return /* @__PURE__ */ n("div", { ...e, className: l("facto-widget-amount", t) });
1430
+ function rn({ className: t, ...n }) {
1431
+ return /* @__PURE__ */ e("div", { ...n, className: _("facto-widget-amount", t) });
517
1432
  }
518
- function te(t) {
519
- const e = l("facto-widget-action", t.dark && "facto-widget-action--dark", t.className);
1433
+ function sn(t) {
1434
+ const n = _("facto-widget-action", t.dark && "facto-widget-action--dark", t.className);
520
1435
  if (typeof t.href == "string") {
521
- const { dark: r, className: m, ...d } = t;
522
- return /* @__PURE__ */ n("a", { ...d, className: e });
1436
+ const { dark: c, className: l, ...s } = t;
1437
+ return /* @__PURE__ */ e("a", { ...s, className: n });
523
1438
  }
524
- const { dark: a, className: o, type: i = "button", ...c } = t;
525
- return /* @__PURE__ */ n("button", { ...c, type: i, className: e });
1439
+ const { dark: a, className: o, type: r = "button", ...i } = t;
1440
+ return /* @__PURE__ */ e("button", { ...i, type: r, className: n });
526
1441
  }
527
- function ee({
1442
+ function ln({
528
1443
  className: t,
529
- type: e = "button",
1444
+ type: n = "button",
530
1445
  ...a
531
1446
  }) {
532
- return /* @__PURE__ */ n(
1447
+ return /* @__PURE__ */ e(
533
1448
  "button",
534
1449
  {
535
1450
  ...a,
536
- type: e,
537
- className: l("facto-widget-row", t)
1451
+ type: n,
1452
+ className: _("facto-widget-row", t)
538
1453
  }
539
1454
  );
540
1455
  }
541
- function Nt({
1456
+ function ge({
542
1457
  label: t,
543
- helperText: e,
1458
+ helperText: n,
544
1459
  error: a,
545
1460
  id: o,
546
- containerClassName: i,
547
- className: c,
548
- ...r
1461
+ containerClassName: r,
1462
+ className: i,
1463
+ ...c
549
1464
  }) {
550
- const m = j(), d = o ?? m, g = a || e ? `${d}-description` : void 0;
551
- return /* @__PURE__ */ f("div", { className: l("facto-field", i), children: [
552
- t && /* @__PURE__ */ n("label", { className: "facto-field__label", htmlFor: d, children: t }),
553
- /* @__PURE__ */ n(
1465
+ const l = G(), s = o ?? l, h = a || n ? `${s}-description` : void 0;
1466
+ return /* @__PURE__ */ u("div", { className: _("facto-field", r), children: [
1467
+ t && /* @__PURE__ */ e("label", { className: "facto-field__label", htmlFor: s, children: t }),
1468
+ /* @__PURE__ */ e(
554
1469
  "input",
555
1470
  {
556
- ...r,
557
- id: d,
558
- "aria-invalid": !!a || r["aria-invalid"],
559
- "aria-describedby": V(r["aria-describedby"], g),
560
- className: l(
1471
+ ...c,
1472
+ id: s,
1473
+ "aria-invalid": !!a || c["aria-invalid"],
1474
+ "aria-describedby": ct(c["aria-describedby"], h),
1475
+ className: _(
561
1476
  "facto-input",
562
1477
  !!a && "facto-input--error",
563
- c
1478
+ i
564
1479
  )
565
1480
  }
566
1481
  ),
567
- (a || e) && /* @__PURE__ */ n(
1482
+ (a || n) && /* @__PURE__ */ e(
568
1483
  "span",
569
1484
  {
570
- id: g,
571
- className: l(
1485
+ id: h,
1486
+ className: _(
572
1487
  "facto-field__message",
573
1488
  !!a && "facto-field__message--error"
574
1489
  ),
575
- children: a ?? e
1490
+ children: a ?? n
576
1491
  }
577
1492
  )
578
1493
  ] });
579
1494
  }
580
- function ne({
1495
+ function dn({
581
1496
  label: t,
582
- helperText: e,
1497
+ helperText: n,
583
1498
  error: a,
584
1499
  id: o,
585
- containerClassName: i,
586
- className: c,
587
- ...r
1500
+ containerClassName: r,
1501
+ className: i,
1502
+ ...c
588
1503
  }) {
589
- const m = j(), d = o ?? m, g = a || e ? `${d}-description` : void 0;
590
- return /* @__PURE__ */ f("div", { className: l("facto-field", i), children: [
591
- t && /* @__PURE__ */ n("label", { className: "facto-field__label", htmlFor: d, children: t }),
592
- /* @__PURE__ */ n(
1504
+ const l = G(), s = o ?? l, h = a || n ? `${s}-description` : void 0;
1505
+ return /* @__PURE__ */ u("div", { className: _("facto-field", r), children: [
1506
+ t && /* @__PURE__ */ e("label", { className: "facto-field__label", htmlFor: s, children: t }),
1507
+ /* @__PURE__ */ e(
593
1508
  "textarea",
594
1509
  {
595
- ...r,
596
- id: d,
597
- "aria-invalid": !!a || r["aria-invalid"],
598
- "aria-describedby": V(r["aria-describedby"], g),
599
- className: l(
1510
+ ...c,
1511
+ id: s,
1512
+ "aria-invalid": !!a || c["aria-invalid"],
1513
+ "aria-describedby": ct(c["aria-describedby"], h),
1514
+ className: _(
600
1515
  "facto-textarea",
601
1516
  !!a && "facto-input--error",
602
- c
1517
+ i
603
1518
  )
604
1519
  }
605
1520
  ),
606
- (a || e) && /* @__PURE__ */ n(
1521
+ (a || n) && /* @__PURE__ */ e(
607
1522
  "span",
608
1523
  {
609
- id: g,
610
- className: l(
1524
+ id: h,
1525
+ className: _(
611
1526
  "facto-field__message",
612
1527
  !!a && "facto-field__message--error"
613
1528
  ),
614
- children: a ?? e
1529
+ children: a ?? n
615
1530
  }
616
1531
  )
617
1532
  ] });
618
1533
  }
619
- function ae({ tone: t = "neutral", className: e, ...a }) {
620
- return /* @__PURE__ */ n(
1534
+ function un({ tone: t = "neutral", className: n, ...a }) {
1535
+ return /* @__PURE__ */ e(
621
1536
  "span",
622
1537
  {
623
1538
  ...a,
624
- className: l("facto-badge", `facto-badge--${t}`, e)
1539
+ className: _("facto-badge", `facto-badge--${t}`, n)
625
1540
  }
626
1541
  );
627
1542
  }
628
- function oe({
1543
+ function fn({
629
1544
  options: t,
630
- value: e,
1545
+ value: n,
631
1546
  defaultValue: a,
632
1547
  onValueChange: o,
633
- placeholder: i = "Select an option",
634
- label: c,
635
- error: r,
636
- disabled: m,
637
- name: d,
638
- id: g,
1548
+ placeholder: r = "Select an option",
1549
+ label: i,
1550
+ error: c,
1551
+ disabled: l,
1552
+ bordered: s = !1,
1553
+ name: h,
1554
+ id: f,
639
1555
  ariaLabel: p,
640
1556
  "aria-describedby": v,
641
- className: w
1557
+ className: k
642
1558
  }) {
643
- const k = S(B), y = j(), T = g ?? y, x = r ? `${T}-description` : void 0, s = F(null), u = R(() => {
644
- s.current?.(), s.current = null;
645
- }, []), b = R(
646
- (h) => {
647
- u(), h && (s.current = mt(h));
1559
+ const w = W(U), C = Y(), g = G(), d = f ?? g, m = c ? `${d}-description` : void 0, y = x(null), b = X(() => {
1560
+ y.current?.(), y.current = null;
1561
+ }, []), N = X(
1562
+ (T) => {
1563
+ b(), T && (y.current = ce(T));
648
1564
  },
649
- [u]
1565
+ [b]
650
1566
  );
651
- return L(() => u, [u]), /* @__PURE__ */ f("div", { className: l("facto-field", w), children: [
652
- c && /* @__PURE__ */ n("label", { className: "facto-field__label", htmlFor: T, children: c }),
653
- /* @__PURE__ */ f(
654
- D.Root,
1567
+ return q(() => b, [b]), /* @__PURE__ */ u("div", { className: _("facto-field", k), children: [
1568
+ i && /* @__PURE__ */ e("label", { className: "facto-field__label", htmlFor: d, children: i }),
1569
+ /* @__PURE__ */ u(
1570
+ V.Root,
655
1571
  {
656
- value: e,
1572
+ value: n,
657
1573
  defaultValue: a,
658
1574
  onValueChange: o,
659
- disabled: m,
660
- name: d,
1575
+ disabled: l,
1576
+ name: h,
661
1577
  children: [
662
- /* @__PURE__ */ f(
663
- D.Trigger,
1578
+ /* @__PURE__ */ u(
1579
+ V.Trigger,
664
1580
  {
665
- id: T,
666
- className: l("facto-select", !!r && "facto-input--error"),
1581
+ id: d,
1582
+ className: _("facto-select", s && "facto-select--bordered", !!c && "facto-input--error"),
667
1583
  "aria-label": p,
668
- "aria-describedby": V(v, x),
669
- "aria-invalid": !!r,
1584
+ "aria-describedby": ct(v, m),
1585
+ "aria-invalid": !!c,
670
1586
  children: [
671
- /* @__PURE__ */ n(D.Value, { placeholder: i }),
672
- /* @__PURE__ */ n(D.Icon, { className: "facto-select__chevron", children: /* @__PURE__ */ n(z, { name: "chevronDown", size: 16 }) })
1587
+ /* @__PURE__ */ e(V.Value, { placeholder: r }),
1588
+ /* @__PURE__ */ e(V.Icon, { className: "facto-select__chevron", children: /* @__PURE__ */ e(ot, { name: "chevronDown", size: 16 }) })
673
1589
  ]
674
1590
  }
675
1591
  ),
676
- /* @__PURE__ */ n(D.Portal, { children: /* @__PURE__ */ n(
677
- D.Content,
1592
+ /* @__PURE__ */ e(V.Portal, { children: /* @__PURE__ */ e(
1593
+ V.Content,
678
1594
  {
679
- ref: b,
1595
+ ref: N,
680
1596
  className: "facto-theme facto-select-content",
681
- style: k,
1597
+ style: { ...w, ...C },
682
1598
  position: "popper",
683
1599
  side: "bottom",
684
1600
  align: "start",
685
1601
  sideOffset: 8,
686
1602
  collisionPadding: 16,
687
- onCloseAutoFocus: u,
688
- children: /* @__PURE__ */ n(D.Viewport, { children: t.map((h) => /* @__PURE__ */ f(
689
- D.Item,
1603
+ onCloseAutoFocus: b,
1604
+ children: /* @__PURE__ */ e(V.Viewport, { children: t.map((T) => /* @__PURE__ */ u(
1605
+ V.Item,
690
1606
  {
691
- value: h.value,
692
- disabled: h.disabled,
1607
+ value: T.value,
1608
+ disabled: T.disabled,
693
1609
  className: "facto-select-item",
694
1610
  children: [
695
- /* @__PURE__ */ n(D.ItemText, { children: h.label }),
696
- /* @__PURE__ */ n(D.ItemIndicator, { children: /* @__PURE__ */ n(z, { name: "check", size: 16 }) })
1611
+ /* @__PURE__ */ e(V.ItemText, { children: T.label }),
1612
+ /* @__PURE__ */ e(V.ItemIndicator, { children: /* @__PURE__ */ e(ot, { name: "check", size: 16 }) })
697
1613
  ]
698
1614
  },
699
- h.value
1615
+ T.value
700
1616
  )) })
701
1617
  }
702
1618
  ) })
703
1619
  ]
704
1620
  }
705
1621
  ),
706
- r && /* @__PURE__ */ n(
1622
+ c && /* @__PURE__ */ e(
707
1623
  "span",
708
1624
  {
709
- id: x,
1625
+ id: m,
710
1626
  className: "facto-field__message facto-field__message--error",
711
- children: r
1627
+ children: c
712
1628
  }
713
1629
  )
714
1630
  ] });
715
1631
  }
716
- function ie({
1632
+ function hn({
717
1633
  label: t,
718
- description: e,
1634
+ description: n,
719
1635
  className: a,
720
1636
  id: o,
721
- ...i
1637
+ ...r
722
1638
  }) {
723
- const c = j(), r = o ?? c, m = e ? `${r}-description` : void 0, d = /* @__PURE__ */ n(
724
- et.Root,
1639
+ const i = G(), c = o ?? i, l = n ? `${c}-description` : void 0, s = /* @__PURE__ */ e(
1640
+ Mt.Root,
725
1641
  {
726
- ...i,
727
- id: r,
728
- "aria-describedby": V(i["aria-describedby"], m),
729
- className: l("facto-switch", a),
730
- children: /* @__PURE__ */ n("span", { className: "facto-switch__track", "aria-hidden": "true", children: /* @__PURE__ */ n(et.Thumb, { className: "facto-switch__thumb" }) })
1642
+ ...r,
1643
+ id: c,
1644
+ "aria-describedby": ct(r["aria-describedby"], l),
1645
+ className: _("facto-switch", a),
1646
+ children: /* @__PURE__ */ e("span", { className: "facto-switch__track", "aria-hidden": "true", children: /* @__PURE__ */ e(Mt.Thumb, { className: "facto-switch__thumb" }) })
731
1647
  }
732
1648
  );
733
- return t ? /* @__PURE__ */ f("div", { className: "facto-check-field", children: [
734
- d,
735
- /* @__PURE__ */ f("span", { children: [
736
- /* @__PURE__ */ n("label", { htmlFor: r, children: /* @__PURE__ */ n("strong", { children: t }) }),
737
- e && /* @__PURE__ */ n("small", { id: m, children: e })
1649
+ return t ? /* @__PURE__ */ u("div", { className: "facto-check-field", children: [
1650
+ s,
1651
+ /* @__PURE__ */ u("span", { children: [
1652
+ /* @__PURE__ */ e("label", { htmlFor: c, children: /* @__PURE__ */ e("strong", { children: t }) }),
1653
+ n && /* @__PURE__ */ e("small", { id: l, children: n })
738
1654
  ] })
739
- ] }) : d;
1655
+ ] }) : s;
740
1656
  }
741
- function ce({
1657
+ function mn({
742
1658
  label: t,
743
- description: e,
1659
+ description: n,
744
1660
  className: a,
745
1661
  id: o,
746
- ...i
1662
+ ...r
747
1663
  }) {
748
- const c = j(), r = o ?? c, m = e ? `${r}-description` : void 0, d = /* @__PURE__ */ n(
749
- tt.Root,
1664
+ const i = G(), c = o ?? i, l = n ? `${c}-description` : void 0, s = /* @__PURE__ */ e(
1665
+ St.Root,
750
1666
  {
751
- ...i,
752
- id: r,
753
- "aria-describedby": V(i["aria-describedby"], m),
754
- className: l("facto-checkbox", a),
755
- children: /* @__PURE__ */ n("span", { className: "facto-checkbox__visual", "aria-hidden": "true", children: /* @__PURE__ */ n(tt.Indicator, { className: "facto-checkbox__indicator", children: /* @__PURE__ */ n(z, { name: "check", size: 16 }) }) })
1667
+ ...r,
1668
+ id: c,
1669
+ "aria-describedby": ct(r["aria-describedby"], l),
1670
+ className: _("facto-checkbox", a),
1671
+ children: /* @__PURE__ */ e("span", { className: "facto-checkbox__visual", "aria-hidden": "true", children: /* @__PURE__ */ e(St.Indicator, { className: "facto-checkbox__indicator", children: /* @__PURE__ */ e(ot, { name: "check", size: 16 }) }) })
756
1672
  }
757
1673
  );
758
- return t ? /* @__PURE__ */ f("div", { className: "facto-check-field", children: [
759
- d,
760
- /* @__PURE__ */ f("span", { children: [
761
- /* @__PURE__ */ n("label", { htmlFor: r, children: /* @__PURE__ */ n("strong", { children: t }) }),
762
- e && /* @__PURE__ */ n("small", { id: m, children: e })
1674
+ return t ? /* @__PURE__ */ u("div", { className: "facto-check-field", children: [
1675
+ s,
1676
+ /* @__PURE__ */ u("span", { children: [
1677
+ /* @__PURE__ */ e("label", { htmlFor: c, children: /* @__PURE__ */ e("strong", { children: t }) }),
1678
+ n && /* @__PURE__ */ e("small", { id: l, children: n })
763
1679
  ] })
764
- ] }) : d;
1680
+ ] }) : s;
765
1681
  }
766
- const re = X.Root;
767
- function se({
1682
+ const pn = vt.Root;
1683
+ function vn({
768
1684
  className: t,
769
- ...e
1685
+ ...n
770
1686
  }) {
771
- return /* @__PURE__ */ n(
772
- X.List,
1687
+ return /* @__PURE__ */ e(
1688
+ vt.List,
773
1689
  {
774
- ...e,
775
- className: l("facto-tabs-list", t)
1690
+ ...n,
1691
+ className: _("facto-tabs-list", t)
776
1692
  }
777
1693
  );
778
1694
  }
779
- function le({
1695
+ function gn({
780
1696
  className: t,
781
- ...e
1697
+ ...n
782
1698
  }) {
783
- return /* @__PURE__ */ n(
784
- X.Trigger,
1699
+ return /* @__PURE__ */ e(
1700
+ vt.Trigger,
785
1701
  {
786
- ...e,
787
- className: l("facto-tabs-trigger", t)
1702
+ ...n,
1703
+ className: _("facto-tabs-trigger", t)
788
1704
  }
789
1705
  );
790
1706
  }
791
- function de({
1707
+ function bn({
792
1708
  className: t,
793
- ...e
1709
+ ...n
794
1710
  }) {
795
- return /* @__PURE__ */ n(
796
- X.Content,
1711
+ return /* @__PURE__ */ e(
1712
+ vt.Content,
797
1713
  {
798
- ...e,
799
- className: l("facto-tabs-content", t)
1714
+ ...n,
1715
+ className: _("facto-tabs-content", t)
800
1716
  }
801
1717
  );
802
1718
  }
803
- const ue = M.Root, fe = M.Trigger, me = M.Close, bt = Z(
804
- function({ className: e, children: a, tabIndex: o, ...i }, c) {
805
- const r = F(null), [m, d] = H(!1), g = R((p) => {
806
- if (r.current = p, typeof c == "function") {
807
- const v = c(p);
808
- if (typeof v == "function")
1719
+ const _n = F.Root, yn = F.Trigger, Nn = F.Close, be = dt(
1720
+ function({ className: n, children: a, tabIndex: o, ...r }, i) {
1721
+ const c = x(null), [l, s] = A(!1), h = X((f) => {
1722
+ if (c.current = f, typeof i == "function") {
1723
+ const p = i(f);
1724
+ if (typeof p == "function")
809
1725
  return () => {
810
- r.current === p && (r.current = null), v();
1726
+ c.current === f && (c.current = null), p();
811
1727
  };
812
- } else c && (c.current = p);
813
- }, [c]);
814
- return L(() => {
815
- const p = r.current;
816
- if (!p) return;
817
- const v = () => d(p.scrollHeight > p.clientHeight + 1);
818
- v();
819
- const w = new ResizeObserver(v), k = new MutationObserver(v);
820
- return w.observe(p), k.observe(p, { childList: !0, characterData: !0, subtree: !0 }), () => {
821
- w.disconnect(), k.disconnect();
1728
+ } else i && (i.current = f);
1729
+ }, [i]);
1730
+ return q(() => {
1731
+ const f = c.current;
1732
+ if (!f) return;
1733
+ const p = () => s(f.scrollHeight > f.clientHeight + 1);
1734
+ p();
1735
+ const v = new ResizeObserver(p), k = new MutationObserver(p);
1736
+ return v.observe(f), k.observe(f, { childList: !0, characterData: !0, subtree: !0 }), () => {
1737
+ v.disconnect(), k.disconnect();
822
1738
  };
823
- }, [a]), /* @__PURE__ */ n(M.Title, { ...i, ref: g, tabIndex: m ? o ?? 0 : o, className: l("facto-modal-title", e), children: a });
1739
+ }, [a]), /* @__PURE__ */ e(F.Title, { ...r, ref: h, tabIndex: l ? o ?? 0 : o, className: _("facto-modal-title", n), children: a });
824
1740
  }
825
- ), wt = Z(function({ className: e, ...a }, o) {
826
- return /* @__PURE__ */ n(M.Description, { ...a, ref: o, className: l("facto-modal-description", e) });
1741
+ ), _e = dt(function({ className: n, ...a }, o) {
1742
+ return /* @__PURE__ */ e(F.Description, { ...a, ref: o, className: _("facto-modal-description", n) });
827
1743
  });
828
- function he({
1744
+ function kn({
829
1745
  size: t = "sm",
830
- motionVariant: e = "auto",
831
- className: a,
832
- style: o,
1746
+ motionVariant: n = "auto",
1747
+ motion: a,
1748
+ className: o,
1749
+ style: r,
833
1750
  children: i,
834
1751
  ...c
835
1752
  }) {
836
- const r = S(B);
837
- return /* @__PURE__ */ f(M.Portal, { children: [
838
- /* @__PURE__ */ n(M.Overlay, { className: "facto-dialog-overlay", "data-motion": e, style: r }),
839
- /* @__PURE__ */ n(
840
- M.Content,
1753
+ const l = W(U), s = Y(a), h = Pt();
1754
+ return /* @__PURE__ */ e(gt, { motion: a, children: /* @__PURE__ */ u(F.Portal, { children: [
1755
+ /* @__PURE__ */ e(F.Overlay, { className: "facto-dialog-overlay", "data-motion": n, style: { ...l, ...s } }),
1756
+ /* @__PURE__ */ e(
1757
+ F.Content,
841
1758
  {
842
1759
  ...c,
843
- "data-motion": e,
844
- style: { ...r, ...o },
845
- className: l(
1760
+ ref: h,
1761
+ "data-motion": n,
1762
+ style: { ...l, ...r, ...s },
1763
+ className: _(
846
1764
  "facto-theme",
847
1765
  "facto-dialog",
848
1766
  `facto-dialog--${t}`,
849
- a
1767
+ o
850
1768
  ),
851
1769
  children: i
852
1770
  }
853
1771
  )
854
- ] });
1772
+ ] }) });
855
1773
  }
856
- const pe = M.Root, ge = M.Trigger, ve = M.Close, _e = bt, Ne = wt;
857
- function be({
1774
+ const wn = F.Root, Cn = F.Trigger, Tn = F.Close, xn = be, Sn = _e;
1775
+ function Mn({
858
1776
  side: t = "center",
859
- motionVariant: e = "auto",
860
- className: a,
861
- style: o,
1777
+ motionVariant: n = "auto",
1778
+ motion: a,
1779
+ className: o,
1780
+ style: r,
862
1781
  children: i,
863
1782
  ...c
864
1783
  }) {
865
- const r = S(B);
866
- return /* @__PURE__ */ f(M.Portal, { children: [
867
- /* @__PURE__ */ n(M.Overlay, { className: "facto-dialog-overlay", "data-motion": e, style: r }),
868
- /* @__PURE__ */ n(
869
- M.Content,
1784
+ const l = W(U), s = Y(a), h = Pt();
1785
+ return /* @__PURE__ */ e(gt, { motion: a, children: /* @__PURE__ */ u(F.Portal, { children: [
1786
+ /* @__PURE__ */ e(F.Overlay, { className: "facto-dialog-overlay", "data-motion": n, style: { ...l, ...s } }),
1787
+ /* @__PURE__ */ e(
1788
+ F.Content,
870
1789
  {
871
1790
  ...c,
872
- "data-motion": e,
873
- style: { ...r, ...o },
874
- className: l(
1791
+ ref: h,
1792
+ "data-motion": n,
1793
+ style: { ...l, ...r, ...s },
1794
+ className: _(
875
1795
  "facto-theme",
876
1796
  "facto-sheet",
877
1797
  `facto-sheet--${t}`,
878
- a
1798
+ o
879
1799
  ),
880
1800
  children: i
881
1801
  }
882
1802
  )
883
- ] });
1803
+ ] }) });
884
1804
  }
885
- function at({
1805
+ function $t({
886
1806
  width: t,
887
- height: e,
1807
+ height: n,
888
1808
  circle: a,
889
1809
  className: o,
890
- style: i,
891
- ...c
1810
+ style: r,
1811
+ ...i
892
1812
  }) {
893
- return /* @__PURE__ */ n(
1813
+ return /* @__PURE__ */ e(
894
1814
  "span",
895
1815
  {
896
- ...c,
1816
+ ...i,
897
1817
  "aria-hidden": "true",
898
- className: l(
1818
+ className: _(
899
1819
  "facto-skeleton",
900
1820
  a && "facto-skeleton--circle",
901
1821
  o
902
1822
  ),
903
- style: { ...i, width: t, height: e }
1823
+ style: { ...r, width: t, height: n }
904
1824
  }
905
1825
  );
906
1826
  }
907
- function we({
1827
+ function Rn({
908
1828
  title: t,
909
- description: e,
1829
+ description: n,
910
1830
  action: a,
911
1831
  icon: o,
912
- className: i,
913
- ...c
1832
+ className: r,
1833
+ ...i
914
1834
  }) {
915
- return /* @__PURE__ */ f("div", { ...c, className: l("facto-empty-state", i), children: [
916
- o && /* @__PURE__ */ n("div", { className: "facto-empty-state__icon", "aria-hidden": "true", children: o }),
917
- /* @__PURE__ */ n("strong", { children: t }),
918
- e && /* @__PURE__ */ n("p", { children: e }),
919
- a && /* @__PURE__ */ n("div", { children: a })
1835
+ return /* @__PURE__ */ u("div", { ...i, className: _("facto-empty-state", r), children: [
1836
+ o && /* @__PURE__ */ e("div", { className: "facto-empty-state__icon", "aria-hidden": "true", children: o }),
1837
+ /* @__PURE__ */ e("strong", { children: t }),
1838
+ n && /* @__PURE__ */ e("p", { children: n }),
1839
+ a && /* @__PURE__ */ e("div", { children: a })
920
1840
  ] });
921
1841
  }
922
- function ke({
1842
+ function $n({
923
1843
  tone: t = "info",
924
- title: e,
1844
+ title: n,
925
1845
  description: a,
926
1846
  action: o,
927
- className: i,
928
- ...c
1847
+ className: r,
1848
+ ...i
929
1849
  }) {
930
- return /* @__PURE__ */ f(
1850
+ return /* @__PURE__ */ u(
931
1851
  "div",
932
1852
  {
933
- ...c,
1853
+ ...i,
934
1854
  role: t === "danger" ? "alert" : "status",
935
- className: l("facto-notice", `facto-notice--${t}`, i),
1855
+ className: _("facto-notice", `facto-notice--${t}`, r),
936
1856
  children: [
937
- /* @__PURE__ */ f("div", { children: [
938
- /* @__PURE__ */ n("strong", { children: e }),
939
- a && /* @__PURE__ */ n("span", { children: a })
1857
+ /* @__PURE__ */ u("div", { children: [
1858
+ /* @__PURE__ */ e("strong", { children: n }),
1859
+ a && /* @__PURE__ */ e("span", { children: a })
940
1860
  ] }),
941
1861
  o
942
1862
  ]
943
1863
  }
944
1864
  );
945
1865
  }
946
- function ye({
1866
+ function Ln({
947
1867
  gap: t = 3,
948
- direction: e = "vertical",
1868
+ direction: n = "vertical",
949
1869
  align: a = "stretch",
950
1870
  justify: o = "start",
951
- className: i,
952
- ...c
1871
+ className: r,
1872
+ ...i
953
1873
  }) {
954
- return /* @__PURE__ */ n(
1874
+ return /* @__PURE__ */ e(
955
1875
  "div",
956
1876
  {
957
- ...c,
958
- className: l(
1877
+ ...i,
1878
+ className: _(
959
1879
  "facto-stack",
960
- `facto-stack--${e}`,
1880
+ `facto-stack--${n}`,
961
1881
  `facto-stack--gap-${t}`,
962
1882
  `facto-stack--align-${a}`,
963
1883
  `facto-stack--justify-${o}`,
964
- i
1884
+ r
965
1885
  )
966
1886
  }
967
1887
  );
968
1888
  }
969
- function Te({ delayDuration: t = 300, ...e }) {
970
- return /* @__PURE__ */ n(U.Provider, { ...e, delayDuration: t });
1889
+ function In({ delayDuration: t = 300, ...n }) {
1890
+ return /* @__PURE__ */ e(st.Provider, { ...n, delayDuration: t });
971
1891
  }
972
- const Ce = U.Root, Ie = U.Trigger;
973
- function Me({ variant: t = "default", className: e, style: a, sideOffset: o = 6, collisionPadding: i = 16, children: c, ...r }) {
974
- const m = S(B);
975
- return /* @__PURE__ */ n(U.Portal, { children: /* @__PURE__ */ n(
976
- U.Content,
1892
+ const Bn = st.Root, En = st.Trigger;
1893
+ function Pn({ variant: t = "default", className: n, style: a, sideOffset: o = 6, collisionPadding: r = 16, children: i, ...c }) {
1894
+ const l = W(U), s = Y();
1895
+ return /* @__PURE__ */ e(st.Portal, { children: /* @__PURE__ */ e(
1896
+ st.Content,
977
1897
  {
978
- ...r,
1898
+ ...c,
979
1899
  sideOffset: o,
980
- collisionPadding: i,
981
- className: l("facto-theme", "facto-tooltip", t === "content" && "facto-tooltip--content", e),
982
- style: { ...m, ...a },
983
- children: c
1900
+ collisionPadding: r,
1901
+ className: _("facto-theme", "facto-tooltip", t === "content" && "facto-tooltip--content", n),
1902
+ style: { ...l, ...a, ...s },
1903
+ children: i
984
1904
  }
985
1905
  ) });
986
1906
  }
987
- function kt({ duration: t = 2600, ...e }) {
988
- return /* @__PURE__ */ n(W.Provider, { ...e, duration: t });
1907
+ function ye({ duration: t = 2600, ...n }) {
1908
+ return /* @__PURE__ */ e(J.Provider, { ...n, duration: t });
989
1909
  }
990
- function yt({ tone: t = "success", icon: e, className: a, style: o, children: i, ...c }) {
991
- const r = S(B);
992
- return /* @__PURE__ */ f(W.Root, { ...c, className: l("facto-theme", "facto-toast", `facto-toast--${t}`, a), style: { ...r, ...o }, children: [
993
- /* @__PURE__ */ n("span", { className: "facto-toast__icon", "aria-hidden": "true", children: e ?? /* @__PURE__ */ n(z, { name: t === "danger" ? "close" : t === "warning" ? "warning" : t === "info" ? "info" : "check" }) }),
994
- /* @__PURE__ */ n("div", { className: "facto-toast__copy", children: i })
995
- ] });
1910
+ function Ne({ tone: t = "success", icon: n, className: a, style: o, motion: r, children: i, ...c }) {
1911
+ const l = W(U), s = Y(r);
1912
+ return /* @__PURE__ */ e(gt, { motion: r, children: /* @__PURE__ */ u(J.Root, { ...c, className: _("facto-theme", "facto-toast", `facto-toast--${t}`, a), style: { ...l, ...o, ...s }, children: [
1913
+ /* @__PURE__ */ e("span", { className: "facto-toast__icon", "aria-hidden": "true", children: n ?? /* @__PURE__ */ e(ot, { name: t === "danger" ? "close" : t === "warning" ? "warning" : t === "info" ? "info" : "check" }) }),
1914
+ /* @__PURE__ */ e("div", { className: "facto-toast__copy", children: i })
1915
+ ] }) });
996
1916
  }
997
- function Tt({ className: t, ...e }) {
998
- return /* @__PURE__ */ n(W.Title, { ...e, className: l("facto-toast__title", t) });
1917
+ function ke({ className: t, ...n }) {
1918
+ return /* @__PURE__ */ e(J.Title, { ...n, className: _("facto-toast__title", t) });
999
1919
  }
1000
- function ot({ className: t, ...e }) {
1001
- return /* @__PURE__ */ n(W.Description, { ...e, className: l("facto-toast__description", t) });
1920
+ function Lt({ className: t, ...n }) {
1921
+ return /* @__PURE__ */ e(J.Description, { ...n, className: _("facto-toast__description", t) });
1002
1922
  }
1003
- function Ct({ className: t, ...e }) {
1004
- return /* @__PURE__ */ n(W.Action, { ...e, className: l("facto-button", "facto-button--secondary", "facto-button--sm", t) });
1923
+ function we({ className: t, ...n }) {
1924
+ return /* @__PURE__ */ e(J.Action, { ...n, className: _("facto-button", "facto-button--secondary", "facto-button--sm", t) });
1005
1925
  }
1006
- function It({ className: t, children: e = /* @__PURE__ */ n(z, { name: "close" }), "aria-label": a = "Dismiss notification", ...o }) {
1007
- return /* @__PURE__ */ n(W.Close, { ...o, "aria-label": a, className: l("facto-toast__close", t), children: e });
1926
+ function Ce({ className: t, children: n = /* @__PURE__ */ e(ot, { name: "close" }), "aria-label": a = "Dismiss notification", ...o }) {
1927
+ return /* @__PURE__ */ e(J.Close, { ...o, "aria-label": a, className: _("facto-toast__close", t), children: n });
1008
1928
  }
1009
- function Mt({ className: t, style: e, ...a }) {
1010
- const o = S(B), [i, c] = H(!1);
1011
- return L(() => c(!0), []), i ? st(/* @__PURE__ */ n(W.Viewport, { ...a, className: l("facto-toast-viewport", t), style: { ...o, ...e } }), document.body) : null;
1929
+ function Te({ className: t, style: n, ...a }) {
1930
+ const o = W(U), r = Y(), [i, c] = A(!1);
1931
+ return q(() => c(!0), []), i ? Kt(/* @__PURE__ */ e(J.Viewport, { ...a, className: _("facto-toast-viewport", t), style: { ...o, ...n, ...r } }), document.body) : null;
1012
1932
  }
1013
- function Pe({ value: t, defaultValue: e = "", onValueChange: a, clearLabel: o = "Clear search", label: i = "Search", helperText: c, error: r, id: m, containerClassName: d, className: g, disabled: p, readOnly: v, ...w }) {
1014
- const k = j(), y = m ?? k, T = r || c ? `${y}-description` : void 0, [x, s] = H(e), u = t ?? x, b = F(null);
1015
- L(() => {
1016
- const _ = b.current?.form;
1017
- if (!_ || t !== void 0) return;
1018
- const C = (N) => {
1933
+ function Dn({ value: t, defaultValue: n = "", onValueChange: a, clearLabel: o = "Clear search", label: r = "Search", helperText: i, error: c, id: l, containerClassName: s, className: h, disabled: f, readOnly: p, ...v }) {
1934
+ const k = G(), w = l ?? k, C = c || i ? `${w}-description` : void 0, [g, d] = A(n), m = t ?? g, y = x(null);
1935
+ q(() => {
1936
+ const N = y.current?.form;
1937
+ if (!N || t !== void 0) return;
1938
+ const T = (L) => {
1019
1939
  queueMicrotask(() => {
1020
- N.defaultPrevented || (s(e), a?.(e));
1940
+ L.defaultPrevented || (d(n), a?.(n));
1021
1941
  });
1022
1942
  };
1023
- return _.addEventListener("reset", C), () => _.removeEventListener("reset", C);
1024
- }, [e, t, a]);
1025
- const h = (_) => {
1026
- t === void 0 && s(_), a?.(_);
1943
+ return N.addEventListener("reset", T), () => N.removeEventListener("reset", T);
1944
+ }, [n, t, a]);
1945
+ const b = (N) => {
1946
+ t === void 0 && d(N), a?.(N);
1027
1947
  };
1028
- return /* @__PURE__ */ f("div", { className: l("facto-field", d), children: [
1029
- i && /* @__PURE__ */ n("label", { className: "facto-field__label", htmlFor: y, children: i }),
1030
- /* @__PURE__ */ f("div", { className: "facto-search", children: [
1031
- /* @__PURE__ */ f("svg", { className: "facto-search__icon", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", "aria-hidden": "true", children: [
1032
- /* @__PURE__ */ n("circle", { cx: "10.5", cy: "10.5", r: "6.5" }),
1033
- /* @__PURE__ */ n("path", { d: "m16 16 5 5" })
1948
+ return /* @__PURE__ */ u("div", { className: _("facto-field", s), children: [
1949
+ r && /* @__PURE__ */ e("label", { className: "facto-field__label", htmlFor: w, children: r }),
1950
+ /* @__PURE__ */ u("div", { className: "facto-search", children: [
1951
+ /* @__PURE__ */ u("svg", { className: "facto-search__icon", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", "aria-hidden": "true", children: [
1952
+ /* @__PURE__ */ e("circle", { cx: "10.5", cy: "10.5", r: "6.5" }),
1953
+ /* @__PURE__ */ e("path", { d: "m16 16 5 5" })
1034
1954
  ] }),
1035
- /* @__PURE__ */ n(
1955
+ /* @__PURE__ */ e(
1036
1956
  "input",
1037
1957
  {
1038
- ...w,
1039
- ref: b,
1040
- id: y,
1958
+ ...v,
1959
+ ref: y,
1960
+ id: w,
1041
1961
  type: "search",
1042
- disabled: p,
1043
- readOnly: v,
1044
- value: u,
1045
- onChange: (_) => h(_.target.value),
1046
- "aria-invalid": !!r || w["aria-invalid"],
1047
- "aria-describedby": V(w["aria-describedby"], T),
1048
- className: l("facto-input", "facto-search__input", !!r && "facto-input--error", g)
1962
+ disabled: f,
1963
+ readOnly: p,
1964
+ value: m,
1965
+ onChange: (N) => b(N.target.value),
1966
+ "aria-invalid": !!c || v["aria-invalid"],
1967
+ "aria-describedby": ct(v["aria-describedby"], C),
1968
+ className: _("facto-input", "facto-search__input", !!c && "facto-input--error", h)
1049
1969
  }
1050
1970
  ),
1051
- u && !v && /* @__PURE__ */ n(
1971
+ m && !p && /* @__PURE__ */ e(
1052
1972
  "button",
1053
1973
  {
1054
1974
  type: "button",
1055
1975
  className: "facto-search__clear",
1056
- disabled: p,
1976
+ disabled: f,
1057
1977
  "aria-label": o,
1058
1978
  onClick: () => {
1059
- h(""), b.current?.focus();
1979
+ b(""), y.current?.focus();
1060
1980
  },
1061
- children: /* @__PURE__ */ n(z, { name: "close", size: 16 })
1981
+ children: /* @__PURE__ */ e(ot, { name: "close", size: 16 })
1062
1982
  }
1063
1983
  )
1064
1984
  ] }),
1065
- (r || c) && /* @__PURE__ */ n("span", { id: T, className: l("facto-field__message", !!r && "facto-field__message--error"), children: r ?? c })
1985
+ (c || i) && /* @__PURE__ */ e("span", { id: C, className: _("facto-field__message", !!c && "facto-field__message--error"), children: c ?? i })
1066
1986
  ] });
1067
1987
  }
1068
- function $e({ className: t, ...e }) {
1069
- return /* @__PURE__ */ n(Nt, { ...e, type: "search", className: l("facto-search-field", t) });
1988
+ function An({ className: t, ...n }) {
1989
+ return /* @__PURE__ */ e(ge, { ...n, type: "search", className: _("facto-search-field", t) });
1070
1990
  }
1071
- const De = K.Root, Be = K.Trigger, Se = K.Close;
1072
- function xe({ className: t, style: e, sideOffset: a = 8, collisionPadding: o = 16, ...i }) {
1073
- const c = S(B);
1074
- return /* @__PURE__ */ n(K.Portal, { children: /* @__PURE__ */ n(K.Content, { ...i, sideOffset: a, collisionPadding: o, className: l("facto-theme", "facto-popover", t), style: { ...c, ...e } }) });
1991
+ const zn = it.Root, Fn = it.Trigger, jn = it.Close;
1992
+ function On({ className: t, style: n, sideOffset: a = 8, collisionPadding: o = 16, ...r }) {
1993
+ const i = W(U), c = Y();
1994
+ return /* @__PURE__ */ e(it.Portal, { children: /* @__PURE__ */ e(it.Content, { ...r, sideOffset: a, collisionPadding: o, className: _("facto-theme", "facto-popover", t), style: { ...i, ...n, ...c } }) });
1075
1995
  }
1076
- function Le({ modal: t = !1, ...e }) {
1077
- return /* @__PURE__ */ n(O.Root, { ...e, modal: t });
1996
+ function Wn({ modal: t = !1, ...n }) {
1997
+ return /* @__PURE__ */ e(at.Root, { ...n, modal: t });
1078
1998
  }
1079
- const Re = O.Trigger;
1080
- function Fe({ className: t, style: e, sideOffset: a = 8, collisionPadding: o = 16, ...i }) {
1081
- const c = S(B);
1082
- return /* @__PURE__ */ n(O.Portal, { children: /* @__PURE__ */ n(O.Content, { ...i, sideOffset: a, collisionPadding: o, className: l("facto-theme", "facto-menu", t), style: { ...c, ...e } }) });
1999
+ const Vn = at.Trigger;
2000
+ function Hn({ className: t, style: n, sideOffset: a = 8, collisionPadding: o = 16, ...r }) {
2001
+ const i = W(U), c = Y();
2002
+ return /* @__PURE__ */ e(at.Portal, { children: /* @__PURE__ */ e(at.Content, { ...r, sideOffset: a, collisionPadding: o, className: _("facto-theme", "facto-menu", t), style: { ...i, ...n, ...c } }) });
1083
2003
  }
1084
- function je({ className: t, ...e }) {
1085
- return /* @__PURE__ */ n(O.Item, { ...e, className: l("facto-menu-item", t) });
2004
+ function qn({ className: t, ...n }) {
2005
+ return /* @__PURE__ */ e(at.Item, { ...n, className: _("facto-menu-item", t) });
1086
2006
  }
1087
- function Ee({ className: t, ...e }) {
1088
- return /* @__PURE__ */ n(O.Separator, { ...e, className: l("facto-menu-separator", t) });
2007
+ function Un({ className: t, ...n }) {
2008
+ return /* @__PURE__ */ e(at.Separator, { ...n, className: _("facto-menu-separator", t) });
1089
2009
  }
1090
- function We({ selected: t = !1, className: e, type: a = "button", ...o }) {
1091
- return /* @__PURE__ */ n("button", { ...o, type: a, "aria-pressed": t, className: l("facto-filter-chip", e) });
2010
+ function Gn({ selected: t = !1, className: n, type: a = "button", ...o }) {
2011
+ return /* @__PURE__ */ e("button", { ...o, type: a, "aria-pressed": t, className: _("facto-filter-chip", n) });
1092
2012
  }
1093
- function Ae({ rows: t = 3, label: e = "Loading", className: a, ...o }) {
1094
- const i = Number.isFinite(t) ? Math.min(20, Math.max(1, Math.floor(t))) : 3;
1095
- return /* @__PURE__ */ n("div", { ...o, className: l("facto-list-skeleton", a), role: "status", "aria-label": e, children: Array.from({ length: i }, (c, r) => /* @__PURE__ */ f("div", { "aria-hidden": "true", className: "facto-list-skeleton__row", children: [
1096
- /* @__PURE__ */ n(at, { style: { width: 32, height: 32 } }),
1097
- /* @__PURE__ */ n(at, { style: { width: "60%", height: 16 } })
1098
- ] }, r)) });
2013
+ function Kn({ rows: t = 3, label: n = "Loading", className: a, ...o }) {
2014
+ const r = Number.isFinite(t) ? Math.min(20, Math.max(1, Math.floor(t))) : 3;
2015
+ return /* @__PURE__ */ e("div", { ...o, className: _("facto-list-skeleton", a), role: "status", "aria-label": n, children: Array.from({ length: r }, (i, c) => /* @__PURE__ */ u("div", { "aria-hidden": "true", className: "facto-list-skeleton__row", children: [
2016
+ /* @__PURE__ */ e($t, { style: { width: 32, height: 32 } }),
2017
+ /* @__PURE__ */ e($t, { style: { width: "60%", height: 16 } })
2018
+ ] }, c)) });
1099
2019
  }
1100
2020
  export {
1101
- ht as Avatar,
1102
- ae as Badge,
1103
- qt as Button,
1104
- Kt as Card,
1105
- ce as Checkbox,
1106
- Zt as DashboardGrid,
1107
- ue as Dialog,
1108
- me as DialogClose,
1109
- he as DialogContent,
1110
- wt as DialogDescription,
1111
- bt as DialogTitle,
1112
- fe as DialogTrigger,
1113
- Le as DropdownMenu,
1114
- Fe as DropdownMenuContent,
1115
- je as DropdownMenuItem,
1116
- Ee as DropdownMenuSeparator,
1117
- Re as DropdownMenuTrigger,
1118
- we as EmptyState,
1119
- Pe as EnhancedSearchField,
1120
- Lt as ErrorState,
1121
- zt as FactoTheme,
1122
- jt as Field,
1123
- We as FilterChip,
1124
- z as Icon,
1125
- Gt as IconButton,
1126
- St as ListGroup,
1127
- Bt as ListRow,
1128
- Ae as ListSkeleton,
1129
- Rt as LoadingMore,
1130
- xt as LogoStack,
1131
- Vt as ModalFooter,
1132
- Ht as ModalHeader,
1133
- ke as Notice,
1134
- At as NotificationsProvider,
1135
- Et as OtpInput,
1136
- De as Popover,
1137
- Se as PopoverClose,
1138
- xe as PopoverContent,
1139
- Be as PopoverTrigger,
1140
- Wt as ResendCodeButton,
1141
- $e as SearchField,
1142
- oe as Select,
1143
- pe as Sheet,
1144
- ve as SheetClose,
1145
- be as SheetContent,
1146
- Ne as SheetDescription,
1147
- _e as SheetTitle,
1148
- ge as SheetTrigger,
1149
- at as Skeleton,
1150
- ye as Stack,
1151
- Ft as StepChecklist,
1152
- rt as Surface,
1153
- ie as Switch,
1154
- re as Tabs,
1155
- de as TabsContent,
1156
- se as TabsList,
1157
- le as TabsTrigger,
1158
- Nt as TextField,
1159
- ne as Textarea,
1160
- yt as Toast,
1161
- Ct as ToastAction,
1162
- It as ToastClose,
1163
- ot as ToastDescription,
1164
- kt as ToastProvider,
1165
- Tt as ToastTitle,
1166
- Mt as ToastViewport,
1167
- Ce as Tooltip,
1168
- Me as TooltipContent,
1169
- Te as TooltipProvider,
1170
- Ie as TooltipTrigger,
1171
- Ut as Widget,
1172
- te as WidgetAction,
1173
- Yt as WidgetAmount,
1174
- Jt as WidgetHeader,
1175
- Xt as WidgetKeyValue,
1176
- Qt as WidgetList,
1177
- ee as WidgetRow,
1178
- Ot as useToast
2021
+ Re as AnimatedDisclosure,
2022
+ $e as AnimatedFeedback,
2023
+ Ve as AuthFlowShell,
2024
+ re as Avatar,
2025
+ un as Badge,
2026
+ Ze as Button,
2027
+ tn as Card,
2028
+ mn as Checkbox,
2029
+ Le as ContentReveal,
2030
+ me as CopyableSecretKey,
2031
+ nn as DashboardGrid,
2032
+ _n as Dialog,
2033
+ Nn as DialogClose,
2034
+ kn as DialogContent,
2035
+ _e as DialogDescription,
2036
+ be as DialogTitle,
2037
+ yn as DialogTrigger,
2038
+ Wn as DropdownMenu,
2039
+ Hn as DropdownMenuContent,
2040
+ qn as DropdownMenuItem,
2041
+ Un as DropdownMenuSeparator,
2042
+ Vn as DropdownMenuTrigger,
2043
+ He as EmailVerificationStep,
2044
+ Rn as EmptyState,
2045
+ Dn as EnhancedSearchField,
2046
+ Ae as ErrorState,
2047
+ gt as FactoMotionProvider,
2048
+ Ye as FactoTheme,
2049
+ je as Field,
2050
+ Gn as FilterChip,
2051
+ ot as Icon,
2052
+ Je as IconButton,
2053
+ he as IdentityEchoPill,
2054
+ Pe as ListGroup,
2055
+ Ee as ListRow,
2056
+ Kn as ListSkeleton,
2057
+ ze as LoadingMore,
2058
+ De as LogoStack,
2059
+ Xe as ModalFooter,
2060
+ Qe as ModalHeader,
2061
+ $n as Notice,
2062
+ Oe as NotificationsProvider,
2063
+ pt as OtpInput,
2064
+ qe as PasskeySetupCard,
2065
+ zn as Popover,
2066
+ jn as PopoverClose,
2067
+ On as PopoverContent,
2068
+ Fn as PopoverTrigger,
2069
+ Ge as RecoveryCodesStep,
2070
+ Dt as ResendCodeButton,
2071
+ An as SearchField,
2072
+ fn as Select,
2073
+ Ke as SelectionCardGroup,
2074
+ Be as SelectionMotion,
2075
+ wn as Sheet,
2076
+ Tn as SheetClose,
2077
+ Mn as SheetContent,
2078
+ Sn as SheetDescription,
2079
+ xn as SheetTitle,
2080
+ Cn as SheetTrigger,
2081
+ $t as Skeleton,
2082
+ Ln as Stack,
2083
+ Fe as StepChecklist,
2084
+ yt as StepProgress,
2085
+ oe as StepTransition,
2086
+ Ft as Surface,
2087
+ hn as Switch,
2088
+ pn as Tabs,
2089
+ bn as TabsContent,
2090
+ vn as TabsList,
2091
+ gn as TabsTrigger,
2092
+ ge as TextField,
2093
+ dn as Textarea,
2094
+ Ne as Toast,
2095
+ we as ToastAction,
2096
+ Ce as ToastClose,
2097
+ Lt as ToastDescription,
2098
+ ye as ToastProvider,
2099
+ ke as ToastTitle,
2100
+ Te as ToastViewport,
2101
+ Bn as Tooltip,
2102
+ Pn as TooltipContent,
2103
+ In as TooltipProvider,
2104
+ En as TooltipTrigger,
2105
+ Ue as TotpEnrollmentCard,
2106
+ en as Widget,
2107
+ sn as WidgetAction,
2108
+ rn as WidgetAmount,
2109
+ an as WidgetHeader,
2110
+ cn as WidgetKeyValue,
2111
+ on as WidgetList,
2112
+ ln as WidgetRow,
2113
+ pe as formatRecoveryCodesText,
2114
+ z as motionTokens,
2115
+ Ie as useKeyedListMotion,
2116
+ ut as useMotion,
2117
+ We as useToast
1179
2118
  };