@facto-to/design-system 0.1.0-beta.5 → 0.1.0-beta.7
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/AI.md +5 -1
- package/README.md +44 -4
- package/dist/ai/SKILL.md +5 -1
- package/dist/ai/references/api.d.ts +304 -91
- package/dist/ai/references/catalog.json +27 -2
- package/dist/ai/references/component-adoption.json +4 -0
- package/dist/ai/references/components.md +26 -0
- package/dist/ai/references/design.md +4 -2
- package/dist/ai/references/integration.md +1 -1
- package/dist/ai/references/standard-target.json +5 -0
- package/dist/ai/references/standard-version.json +9 -0
- package/dist/ai/references/tokens.css +2 -0
- package/dist/ai/references/ui-standard-reference.md +498 -0
- package/dist/ai/references/ui-standard.md +195 -0
- package/dist/ai/references/version.json +12 -3
- package/dist/index.d.ts +304 -91
- package/dist/index.js +845 -437
- package/dist/styles.css +1 -1
- package/dist/tokens.css +2 -0
- package/package.json +8 -4
package/dist/index.js
CHANGED
|
@@ -1,124 +1,475 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
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) {
|
|
14
16
|
const e = Array.from(t.ownerDocument.body.children).filter(
|
|
15
17
|
(o) => o instanceof HTMLElement && !o.hasAttribute("data-radix-focus-guard") && !o.contains(t)
|
|
16
18
|
);
|
|
17
19
|
for (const o of e) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
+
const i = Q.get(o);
|
|
21
|
+
i ? i.count += 1 : (Q.set(o, { count: 1, wasInert: o.inert }), o.inert = !0);
|
|
20
22
|
}
|
|
21
|
-
let
|
|
23
|
+
let a = !0;
|
|
22
24
|
return () => {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
+
if (a) {
|
|
26
|
+
a = !1;
|
|
25
27
|
for (const o of e) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
+
const i = Q.get(o);
|
|
29
|
+
i && (i.count -= 1, i.count === 0 && (i.wasInert || (o.inert = !1), Q.delete(o)));
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
|
-
const
|
|
33
|
-
|
|
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 })
|
|
40
|
+
] }),
|
|
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 })
|
|
44
|
+
] }),
|
|
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 });
|
|
50
|
+
}
|
|
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 });
|
|
54
|
+
}
|
|
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 });
|
|
57
|
+
});
|
|
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 })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
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: [
|
|
78
|
+
"+",
|
|
79
|
+
r
|
|
80
|
+
] })
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
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 })
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
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 })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
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: [
|
|
103
|
+
o.label,
|
|
104
|
+
c === "complete" && /* @__PURE__ */ n("span", { className: "facto-visually-hidden", children: ", completed" })
|
|
105
|
+
] }),
|
|
106
|
+
o.description != null && /* @__PURE__ */ n("small", { children: o.description })
|
|
107
|
+
] })
|
|
108
|
+
] }, i);
|
|
109
|
+
}) });
|
|
110
|
+
}
|
|
111
|
+
const G = (...t) => t.filter(Boolean).join(" "), pt = (...t) => t.filter(Boolean).join(" ") || void 0;
|
|
112
|
+
function jt({
|
|
113
|
+
label: t,
|
|
114
|
+
leading: e,
|
|
115
|
+
trailing: a,
|
|
116
|
+
children: o,
|
|
117
|
+
invalid: i,
|
|
118
|
+
inputId: c,
|
|
119
|
+
className: r,
|
|
120
|
+
...m
|
|
121
|
+
}) {
|
|
122
|
+
return /* @__PURE__ */ f(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
...m,
|
|
126
|
+
className: G("facto-inset-field", i && "facto-inset-field--invalid", r),
|
|
127
|
+
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 })
|
|
133
|
+
] })
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
const nt = (t, e) => t.replace(/\D/g, "").slice(0, e);
|
|
139
|
+
function Et({
|
|
140
|
+
value: t,
|
|
141
|
+
onValueChange: e,
|
|
142
|
+
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
|
|
159
|
+
}) {
|
|
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) {
|
|
166
|
+
E.current = void 0;
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
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($);
|
|
179
|
+
};
|
|
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(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
className: G("facto-otp__cells", !!g && "facto-otp__cells--error", v),
|
|
186
|
+
"data-disabled": k ? "" : void 0,
|
|
187
|
+
"data-pending": c ? "" : void 0,
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ n(
|
|
190
|
+
"input",
|
|
191
|
+
{
|
|
192
|
+
...u,
|
|
193
|
+
id: h,
|
|
194
|
+
className: "facto-otp__input",
|
|
195
|
+
type: "text",
|
|
196
|
+
inputMode: "numeric",
|
|
197
|
+
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")));
|
|
210
|
+
},
|
|
211
|
+
onFocus: x,
|
|
212
|
+
onBlur: s
|
|
213
|
+
}
|
|
214
|
+
),
|
|
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[$]}`) }, $)) })
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
(g || d) && /* @__PURE__ */ n(
|
|
220
|
+
"span",
|
|
221
|
+
{
|
|
222
|
+
id: _,
|
|
223
|
+
className: G("facto-otp__message", !!g && "facto-otp__message--error"),
|
|
224
|
+
role: g ? "alert" : void 0,
|
|
225
|
+
children: g ?? d
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
c && /* @__PURE__ */ n("span", { className: "facto-otp__pending", id: `${h}-pending`, role: "status", children: r })
|
|
229
|
+
] });
|
|
230
|
+
}
|
|
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({
|
|
233
|
+
deadline: t,
|
|
234
|
+
pending: e,
|
|
235
|
+
disabled: a,
|
|
236
|
+
children: o = "Resend code",
|
|
237
|
+
formatCountdown: i = vt,
|
|
238
|
+
className: c,
|
|
239
|
+
onClick: r,
|
|
240
|
+
...m
|
|
241
|
+
}) {
|
|
242
|
+
const [d, g] = H(null), p = d === null ? 0 : gt(t, d);
|
|
243
|
+
L(() => {
|
|
244
|
+
let w;
|
|
245
|
+
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)));
|
|
250
|
+
};
|
|
251
|
+
return k(), () => window.clearTimeout(w);
|
|
252
|
+
}, [t]);
|
|
253
|
+
const v = d === null ? Y(t) > 0 : p > 0;
|
|
254
|
+
return /* @__PURE__ */ f(
|
|
255
|
+
"button",
|
|
256
|
+
{
|
|
257
|
+
...m,
|
|
258
|
+
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,
|
|
263
|
+
children: [
|
|
264
|
+
e && /* @__PURE__ */ n("span", { className: "facto-resend-code__spinner", "aria-hidden": "true" }),
|
|
265
|
+
v && d !== null ? i(p) : o
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
const ct = it(null);
|
|
271
|
+
function At({
|
|
272
|
+
children: t,
|
|
273
|
+
duration: e,
|
|
274
|
+
maxVisible: a = 3,
|
|
275
|
+
label: o = "Notifications ({hotkey})"
|
|
276
|
+
}) {
|
|
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);
|
|
279
|
+
}, []);
|
|
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
|
|
306
|
+
}));
|
|
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,
|
|
323
|
+
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,
|
|
329
|
+
tone: "error",
|
|
330
|
+
duration: b?.duration ?? p
|
|
331
|
+
}, h.generation), _;
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
}), [w, p, T, y, k]);
|
|
336
|
+
return /* @__PURE__ */ n(ct.Provider, { value: x, children: /* @__PURE__ */ f(kt, { duration: e, children: [
|
|
337
|
+
t,
|
|
338
|
+
i.map((s) => /* @__PURE__ */ f(
|
|
339
|
+
yt,
|
|
340
|
+
{
|
|
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",
|
|
345
|
+
open: !0,
|
|
346
|
+
onOpenChange: (u) => {
|
|
347
|
+
u || T(s.id, s.generation);
|
|
348
|
+
},
|
|
349
|
+
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, {})
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
`${s.id}-${s.generation}`
|
|
358
|
+
)),
|
|
359
|
+
/* @__PURE__ */ n(Mt, { label: o })
|
|
360
|
+
] }) });
|
|
361
|
+
}
|
|
362
|
+
function Ot() {
|
|
363
|
+
const t = S(ct);
|
|
364
|
+
if (!t) throw new Error("useToast must be used within a NotificationsProvider");
|
|
365
|
+
return t;
|
|
366
|
+
}
|
|
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)
|
|
34
369
|
);
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
}
|
|
39
|
-
function
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/* @__PURE__ */
|
|
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" })
|
|
381
|
+
] }),
|
|
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" })
|
|
49
385
|
] }),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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" })
|
|
394
|
+
] }),
|
|
395
|
+
warning: /* @__PURE__ */ f(q, { children: [
|
|
396
|
+
/* @__PURE__ */ n("path", { d: "m12 3 10 18H2L12 3Z" }),
|
|
397
|
+
/* @__PURE__ */ n("path", { d: "M12 9v5M12 17v1" })
|
|
53
398
|
] })
|
|
54
399
|
}[t] });
|
|
55
400
|
}
|
|
56
|
-
function
|
|
57
|
-
return /* @__PURE__ */
|
|
401
|
+
function Ht({ className: t, ...e }) {
|
|
402
|
+
return /* @__PURE__ */ n("div", { ...e, className: l("facto-modal-header", t) });
|
|
58
403
|
}
|
|
59
|
-
function
|
|
60
|
-
return /* @__PURE__ */
|
|
404
|
+
function Vt({ className: t, ...e }) {
|
|
405
|
+
return /* @__PURE__ */ n("div", { ...e, className: l("facto-modal-footer", t) });
|
|
61
406
|
}
|
|
62
|
-
const
|
|
407
|
+
const qt = Z(
|
|
63
408
|
function({
|
|
64
409
|
variant: e = "primary",
|
|
65
|
-
size:
|
|
410
|
+
size: a = "md",
|
|
66
411
|
fullWidth: o,
|
|
67
|
-
loading:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
412
|
+
loading: i,
|
|
413
|
+
leadingIcon: c,
|
|
414
|
+
trailingIcon: r,
|
|
415
|
+
className: m,
|
|
416
|
+
children: d,
|
|
417
|
+
disabled: g,
|
|
418
|
+
type: p = "button",
|
|
419
|
+
...v
|
|
420
|
+
}, w) {
|
|
421
|
+
return /* @__PURE__ */ f(
|
|
75
422
|
"button",
|
|
76
423
|
{
|
|
77
|
-
...
|
|
78
|
-
ref:
|
|
79
|
-
type:
|
|
80
|
-
disabled:
|
|
81
|
-
"aria-busy":
|
|
82
|
-
className:
|
|
424
|
+
...v,
|
|
425
|
+
ref: w,
|
|
426
|
+
type: p,
|
|
427
|
+
disabled: g || i,
|
|
428
|
+
"aria-busy": i || void 0,
|
|
429
|
+
className: l(
|
|
83
430
|
"facto-button",
|
|
84
431
|
`facto-button--${e}`,
|
|
85
|
-
`facto-button--${
|
|
432
|
+
`facto-button--${a}`,
|
|
86
433
|
o && "facto-button--full",
|
|
87
|
-
|
|
434
|
+
m
|
|
88
435
|
),
|
|
89
436
|
children: [
|
|
90
|
-
|
|
91
|
-
|
|
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
|
|
441
|
+
] }),
|
|
442
|
+
i && /* @__PURE__ */ n("span", { className: "facto-button__spinner", "aria-hidden": "true" })
|
|
92
443
|
]
|
|
93
444
|
}
|
|
94
445
|
);
|
|
95
446
|
}
|
|
96
|
-
),
|
|
97
|
-
function({ ariaLabel: e, size:
|
|
98
|
-
return /* @__PURE__ */
|
|
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(
|
|
99
450
|
"button",
|
|
100
451
|
{
|
|
101
|
-
...
|
|
102
|
-
ref:
|
|
103
|
-
type:
|
|
452
|
+
...m,
|
|
453
|
+
ref: d,
|
|
454
|
+
type: c,
|
|
104
455
|
"aria-label": e,
|
|
105
|
-
title:
|
|
106
|
-
className:
|
|
456
|
+
title: i ?? e,
|
|
457
|
+
className: l(
|
|
107
458
|
"facto-icon-button",
|
|
108
|
-
`facto-icon-button--${
|
|
459
|
+
`facto-icon-button--${a}`,
|
|
109
460
|
o
|
|
110
461
|
),
|
|
111
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ n("span", { className: "facto-icon-button__visual", children: r })
|
|
112
463
|
}
|
|
113
464
|
);
|
|
114
465
|
}
|
|
115
466
|
);
|
|
116
|
-
function
|
|
117
|
-
return /* @__PURE__ */
|
|
467
|
+
function rt({ padding: t = "lg", className: e, ...a }) {
|
|
468
|
+
return /* @__PURE__ */ n(
|
|
118
469
|
"div",
|
|
119
470
|
{
|
|
120
|
-
...
|
|
121
|
-
className:
|
|
471
|
+
...a,
|
|
472
|
+
className: l(
|
|
122
473
|
"facto-surface",
|
|
123
474
|
`facto-surface--padding-${t}`,
|
|
124
475
|
e
|
|
@@ -126,16 +477,16 @@ function q({ padding: t = "lg", className: e, ...n }) {
|
|
|
126
477
|
}
|
|
127
478
|
);
|
|
128
479
|
}
|
|
129
|
-
function
|
|
130
|
-
return /* @__PURE__ */
|
|
480
|
+
function Kt(t) {
|
|
481
|
+
return /* @__PURE__ */ n(rt, { ...t });
|
|
131
482
|
}
|
|
132
|
-
function
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
|
|
483
|
+
function Ut({ span: t = 1, className: e, ...a }) {
|
|
484
|
+
return /* @__PURE__ */ n(
|
|
485
|
+
rt,
|
|
135
486
|
{
|
|
136
|
-
...
|
|
487
|
+
...a,
|
|
137
488
|
padding: "md",
|
|
138
|
-
className:
|
|
489
|
+
className: l(
|
|
139
490
|
"facto-widget",
|
|
140
491
|
t === 2 && "facto-widget--span-2",
|
|
141
492
|
e
|
|
@@ -143,629 +494,686 @@ function lt({ span: t = 1, className: e, ...n }) {
|
|
|
143
494
|
}
|
|
144
495
|
);
|
|
145
496
|
}
|
|
146
|
-
function
|
|
147
|
-
return /* @__PURE__ */
|
|
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 }) });
|
|
148
499
|
}
|
|
149
|
-
function
|
|
150
|
-
return /* @__PURE__ */
|
|
500
|
+
function Jt({ withAction: t, className: e, ...a }) {
|
|
501
|
+
return /* @__PURE__ */ n(
|
|
151
502
|
"div",
|
|
152
503
|
{
|
|
153
|
-
...
|
|
154
|
-
className:
|
|
504
|
+
...a,
|
|
505
|
+
className: l("facto-widget-head", t && "facto-widget-head--with-action", e)
|
|
155
506
|
}
|
|
156
507
|
);
|
|
157
508
|
}
|
|
158
|
-
function
|
|
159
|
-
return /* @__PURE__ */
|
|
509
|
+
function Qt({ className: t, ...e }) {
|
|
510
|
+
return /* @__PURE__ */ n("div", { ...e, className: l("facto-widget-list", t) });
|
|
160
511
|
}
|
|
161
|
-
function
|
|
162
|
-
return /* @__PURE__ */
|
|
512
|
+
function Xt({ className: t, ...e }) {
|
|
513
|
+
return /* @__PURE__ */ n("div", { ...e, className: l("facto-widget-kv", t) });
|
|
163
514
|
}
|
|
164
|
-
function
|
|
165
|
-
return /* @__PURE__ */
|
|
515
|
+
function Yt({ className: t, ...e }) {
|
|
516
|
+
return /* @__PURE__ */ n("div", { ...e, className: l("facto-widget-amount", t) });
|
|
166
517
|
}
|
|
167
|
-
function
|
|
168
|
-
const e =
|
|
518
|
+
function te(t) {
|
|
519
|
+
const e = l("facto-widget-action", t.dark && "facto-widget-action--dark", t.className);
|
|
169
520
|
if (typeof t.href == "string") {
|
|
170
|
-
const { dark: r, className:
|
|
171
|
-
return /* @__PURE__ */
|
|
521
|
+
const { dark: r, className: m, ...d } = t;
|
|
522
|
+
return /* @__PURE__ */ n("a", { ...d, className: e });
|
|
172
523
|
}
|
|
173
|
-
const { dark:
|
|
174
|
-
return /* @__PURE__ */
|
|
524
|
+
const { dark: a, className: o, type: i = "button", ...c } = t;
|
|
525
|
+
return /* @__PURE__ */ n("button", { ...c, type: i, className: e });
|
|
175
526
|
}
|
|
176
|
-
function
|
|
527
|
+
function ee({
|
|
177
528
|
className: t,
|
|
178
529
|
type: e = "button",
|
|
179
|
-
...
|
|
530
|
+
...a
|
|
180
531
|
}) {
|
|
181
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ n(
|
|
182
533
|
"button",
|
|
183
534
|
{
|
|
184
|
-
...
|
|
535
|
+
...a,
|
|
185
536
|
type: e,
|
|
186
|
-
className:
|
|
537
|
+
className: l("facto-widget-row", t)
|
|
187
538
|
}
|
|
188
539
|
);
|
|
189
540
|
}
|
|
190
|
-
function
|
|
541
|
+
function Nt({
|
|
191
542
|
label: t,
|
|
192
543
|
helperText: e,
|
|
193
|
-
error:
|
|
544
|
+
error: a,
|
|
194
545
|
id: o,
|
|
195
|
-
containerClassName:
|
|
196
|
-
className:
|
|
546
|
+
containerClassName: i,
|
|
547
|
+
className: c,
|
|
197
548
|
...r
|
|
198
549
|
}) {
|
|
199
|
-
const
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
-
t && /* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
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(
|
|
203
554
|
"input",
|
|
204
555
|
{
|
|
205
556
|
...r,
|
|
206
|
-
id:
|
|
207
|
-
"aria-invalid": !!
|
|
208
|
-
"aria-describedby":
|
|
209
|
-
className:
|
|
557
|
+
id: d,
|
|
558
|
+
"aria-invalid": !!a || r["aria-invalid"],
|
|
559
|
+
"aria-describedby": V(r["aria-describedby"], g),
|
|
560
|
+
className: l(
|
|
210
561
|
"facto-input",
|
|
211
|
-
!!
|
|
212
|
-
|
|
562
|
+
!!a && "facto-input--error",
|
|
563
|
+
c
|
|
213
564
|
)
|
|
214
565
|
}
|
|
215
566
|
),
|
|
216
|
-
(
|
|
567
|
+
(a || e) && /* @__PURE__ */ n(
|
|
217
568
|
"span",
|
|
218
569
|
{
|
|
219
|
-
id:
|
|
220
|
-
className:
|
|
570
|
+
id: g,
|
|
571
|
+
className: l(
|
|
221
572
|
"facto-field__message",
|
|
222
|
-
!!
|
|
573
|
+
!!a && "facto-field__message--error"
|
|
223
574
|
),
|
|
224
|
-
children:
|
|
575
|
+
children: a ?? e
|
|
225
576
|
}
|
|
226
577
|
)
|
|
227
578
|
] });
|
|
228
579
|
}
|
|
229
|
-
function
|
|
580
|
+
function ne({
|
|
230
581
|
label: t,
|
|
231
582
|
helperText: e,
|
|
232
|
-
error:
|
|
583
|
+
error: a,
|
|
233
584
|
id: o,
|
|
234
|
-
containerClassName:
|
|
235
|
-
className:
|
|
585
|
+
containerClassName: i,
|
|
586
|
+
className: c,
|
|
236
587
|
...r
|
|
237
588
|
}) {
|
|
238
|
-
const
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
-
t && /* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
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(
|
|
242
593
|
"textarea",
|
|
243
594
|
{
|
|
244
595
|
...r,
|
|
245
|
-
id:
|
|
246
|
-
"aria-invalid": !!
|
|
247
|
-
"aria-describedby":
|
|
248
|
-
className:
|
|
596
|
+
id: d,
|
|
597
|
+
"aria-invalid": !!a || r["aria-invalid"],
|
|
598
|
+
"aria-describedby": V(r["aria-describedby"], g),
|
|
599
|
+
className: l(
|
|
249
600
|
"facto-textarea",
|
|
250
|
-
!!
|
|
251
|
-
|
|
601
|
+
!!a && "facto-input--error",
|
|
602
|
+
c
|
|
252
603
|
)
|
|
253
604
|
}
|
|
254
605
|
),
|
|
255
|
-
(
|
|
606
|
+
(a || e) && /* @__PURE__ */ n(
|
|
256
607
|
"span",
|
|
257
608
|
{
|
|
258
|
-
id:
|
|
259
|
-
className:
|
|
609
|
+
id: g,
|
|
610
|
+
className: l(
|
|
260
611
|
"facto-field__message",
|
|
261
|
-
!!
|
|
612
|
+
!!a && "facto-field__message--error"
|
|
262
613
|
),
|
|
263
|
-
children:
|
|
614
|
+
children: a ?? e
|
|
264
615
|
}
|
|
265
616
|
)
|
|
266
617
|
] });
|
|
267
618
|
}
|
|
268
|
-
function
|
|
269
|
-
return /* @__PURE__ */
|
|
619
|
+
function ae({ tone: t = "neutral", className: e, ...a }) {
|
|
620
|
+
return /* @__PURE__ */ n(
|
|
270
621
|
"span",
|
|
271
622
|
{
|
|
272
|
-
...
|
|
273
|
-
className:
|
|
623
|
+
...a,
|
|
624
|
+
className: l("facto-badge", `facto-badge--${t}`, e)
|
|
274
625
|
}
|
|
275
626
|
);
|
|
276
627
|
}
|
|
277
|
-
function
|
|
628
|
+
function oe({
|
|
278
629
|
options: t,
|
|
279
630
|
value: e,
|
|
280
|
-
defaultValue:
|
|
631
|
+
defaultValue: a,
|
|
281
632
|
onValueChange: o,
|
|
282
|
-
placeholder:
|
|
283
|
-
label:
|
|
633
|
+
placeholder: i = "Select an option",
|
|
634
|
+
label: c,
|
|
284
635
|
error: r,
|
|
285
|
-
disabled:
|
|
286
|
-
name:
|
|
287
|
-
id:
|
|
288
|
-
ariaLabel:
|
|
289
|
-
"aria-describedby":
|
|
290
|
-
className:
|
|
636
|
+
disabled: m,
|
|
637
|
+
name: d,
|
|
638
|
+
id: g,
|
|
639
|
+
ariaLabel: p,
|
|
640
|
+
"aria-describedby": v,
|
|
641
|
+
className: w
|
|
291
642
|
}) {
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
}, []),
|
|
295
|
-
(
|
|
296
|
-
|
|
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));
|
|
297
648
|
},
|
|
298
|
-
[
|
|
649
|
+
[u]
|
|
299
650
|
);
|
|
300
|
-
return
|
|
301
|
-
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
-
|
|
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,
|
|
304
655
|
{
|
|
305
656
|
value: e,
|
|
306
|
-
defaultValue:
|
|
657
|
+
defaultValue: a,
|
|
307
658
|
onValueChange: o,
|
|
308
|
-
disabled:
|
|
309
|
-
name:
|
|
659
|
+
disabled: m,
|
|
660
|
+
name: d,
|
|
310
661
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
|
|
662
|
+
/* @__PURE__ */ f(
|
|
663
|
+
D.Trigger,
|
|
313
664
|
{
|
|
314
|
-
id:
|
|
315
|
-
className:
|
|
316
|
-
"aria-label":
|
|
317
|
-
"aria-describedby":
|
|
665
|
+
id: T,
|
|
666
|
+
className: l("facto-select", !!r && "facto-input--error"),
|
|
667
|
+
"aria-label": p,
|
|
668
|
+
"aria-describedby": V(v, x),
|
|
318
669
|
"aria-invalid": !!r,
|
|
319
670
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ n(D.Value, { placeholder: i }),
|
|
672
|
+
/* @__PURE__ */ n(D.Icon, { className: "facto-select__chevron", children: /* @__PURE__ */ n(z, { name: "chevronDown", size: 16 }) })
|
|
322
673
|
]
|
|
323
674
|
}
|
|
324
675
|
),
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
|
|
676
|
+
/* @__PURE__ */ n(D.Portal, { children: /* @__PURE__ */ n(
|
|
677
|
+
D.Content,
|
|
327
678
|
{
|
|
328
|
-
ref:
|
|
679
|
+
ref: b,
|
|
329
680
|
className: "facto-theme facto-select-content",
|
|
330
|
-
style:
|
|
681
|
+
style: k,
|
|
331
682
|
position: "popper",
|
|
332
683
|
side: "bottom",
|
|
333
684
|
align: "start",
|
|
334
685
|
sideOffset: 8,
|
|
335
686
|
collisionPadding: 16,
|
|
336
|
-
onCloseAutoFocus:
|
|
337
|
-
children: /* @__PURE__ */
|
|
338
|
-
|
|
687
|
+
onCloseAutoFocus: u,
|
|
688
|
+
children: /* @__PURE__ */ n(D.Viewport, { children: t.map((h) => /* @__PURE__ */ f(
|
|
689
|
+
D.Item,
|
|
339
690
|
{
|
|
340
|
-
value:
|
|
341
|
-
disabled:
|
|
691
|
+
value: h.value,
|
|
692
|
+
disabled: h.disabled,
|
|
342
693
|
className: "facto-select-item",
|
|
343
694
|
children: [
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ n(D.ItemText, { children: h.label }),
|
|
696
|
+
/* @__PURE__ */ n(D.ItemIndicator, { children: /* @__PURE__ */ n(z, { name: "check", size: 16 }) })
|
|
346
697
|
]
|
|
347
698
|
},
|
|
348
|
-
|
|
699
|
+
h.value
|
|
349
700
|
)) })
|
|
350
701
|
}
|
|
351
702
|
) })
|
|
352
703
|
]
|
|
353
704
|
}
|
|
354
705
|
),
|
|
355
|
-
r && /* @__PURE__ */
|
|
706
|
+
r && /* @__PURE__ */ n(
|
|
356
707
|
"span",
|
|
357
708
|
{
|
|
358
|
-
id:
|
|
709
|
+
id: x,
|
|
359
710
|
className: "facto-field__message facto-field__message--error",
|
|
360
711
|
children: r
|
|
361
712
|
}
|
|
362
713
|
)
|
|
363
714
|
] });
|
|
364
715
|
}
|
|
365
|
-
function
|
|
716
|
+
function ie({
|
|
366
717
|
label: t,
|
|
367
718
|
description: e,
|
|
368
|
-
className:
|
|
719
|
+
className: a,
|
|
369
720
|
id: o,
|
|
370
|
-
...
|
|
721
|
+
...i
|
|
371
722
|
}) {
|
|
372
|
-
const
|
|
373
|
-
|
|
723
|
+
const c = j(), r = o ?? c, m = e ? `${r}-description` : void 0, d = /* @__PURE__ */ n(
|
|
724
|
+
et.Root,
|
|
374
725
|
{
|
|
375
|
-
...
|
|
726
|
+
...i,
|
|
376
727
|
id: r,
|
|
377
|
-
"aria-describedby":
|
|
378
|
-
className:
|
|
379
|
-
children: /* @__PURE__ */
|
|
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" }) })
|
|
380
731
|
}
|
|
381
732
|
);
|
|
382
|
-
return t ? /* @__PURE__ */
|
|
383
|
-
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
e && /* @__PURE__ */
|
|
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 })
|
|
387
738
|
] })
|
|
388
|
-
] }) :
|
|
739
|
+
] }) : d;
|
|
389
740
|
}
|
|
390
|
-
function
|
|
741
|
+
function ce({
|
|
391
742
|
label: t,
|
|
392
743
|
description: e,
|
|
393
|
-
className:
|
|
744
|
+
className: a,
|
|
394
745
|
id: o,
|
|
395
|
-
...
|
|
746
|
+
...i
|
|
396
747
|
}) {
|
|
397
|
-
const
|
|
398
|
-
|
|
748
|
+
const c = j(), r = o ?? c, m = e ? `${r}-description` : void 0, d = /* @__PURE__ */ n(
|
|
749
|
+
tt.Root,
|
|
399
750
|
{
|
|
400
|
-
...
|
|
751
|
+
...i,
|
|
401
752
|
id: r,
|
|
402
|
-
"aria-describedby":
|
|
403
|
-
className:
|
|
404
|
-
children: /* @__PURE__ */
|
|
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 }) }) })
|
|
405
756
|
}
|
|
406
757
|
);
|
|
407
|
-
return t ? /* @__PURE__ */
|
|
408
|
-
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
e && /* @__PURE__ */
|
|
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 })
|
|
412
763
|
] })
|
|
413
|
-
] }) :
|
|
764
|
+
] }) : d;
|
|
414
765
|
}
|
|
415
|
-
const
|
|
416
|
-
function
|
|
766
|
+
const re = X.Root;
|
|
767
|
+
function se({
|
|
417
768
|
className: t,
|
|
418
769
|
...e
|
|
419
770
|
}) {
|
|
420
|
-
return /* @__PURE__ */
|
|
421
|
-
|
|
771
|
+
return /* @__PURE__ */ n(
|
|
772
|
+
X.List,
|
|
422
773
|
{
|
|
423
774
|
...e,
|
|
424
|
-
className:
|
|
775
|
+
className: l("facto-tabs-list", t)
|
|
425
776
|
}
|
|
426
777
|
);
|
|
427
778
|
}
|
|
428
|
-
function
|
|
779
|
+
function le({
|
|
429
780
|
className: t,
|
|
430
781
|
...e
|
|
431
782
|
}) {
|
|
432
|
-
return /* @__PURE__ */
|
|
433
|
-
|
|
783
|
+
return /* @__PURE__ */ n(
|
|
784
|
+
X.Trigger,
|
|
434
785
|
{
|
|
435
786
|
...e,
|
|
436
|
-
className:
|
|
787
|
+
className: l("facto-tabs-trigger", t)
|
|
437
788
|
}
|
|
438
789
|
);
|
|
439
790
|
}
|
|
440
|
-
function
|
|
791
|
+
function de({
|
|
441
792
|
className: t,
|
|
442
793
|
...e
|
|
443
794
|
}) {
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
|
|
795
|
+
return /* @__PURE__ */ n(
|
|
796
|
+
X.Content,
|
|
446
797
|
{
|
|
447
798
|
...e,
|
|
448
|
-
className:
|
|
799
|
+
className: l("facto-tabs-content", t)
|
|
449
800
|
}
|
|
450
801
|
);
|
|
451
802
|
}
|
|
452
|
-
const
|
|
453
|
-
function({ className: e, children:
|
|
454
|
-
const r =
|
|
455
|
-
if (r.current =
|
|
456
|
-
const
|
|
457
|
-
if (typeof
|
|
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")
|
|
458
809
|
return () => {
|
|
459
|
-
r.current ===
|
|
810
|
+
r.current === p && (r.current = null), v();
|
|
460
811
|
};
|
|
461
|
-
} else
|
|
462
|
-
}, [
|
|
463
|
-
return
|
|
464
|
-
const
|
|
465
|
-
if (!
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
const
|
|
469
|
-
return
|
|
470
|
-
|
|
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();
|
|
471
822
|
};
|
|
472
|
-
}, [
|
|
823
|
+
}, [a]), /* @__PURE__ */ n(M.Title, { ...i, ref: g, tabIndex: m ? o ?? 0 : o, className: l("facto-modal-title", e), children: a });
|
|
473
824
|
}
|
|
474
|
-
),
|
|
475
|
-
return /* @__PURE__ */
|
|
825
|
+
), wt = Z(function({ className: e, ...a }, o) {
|
|
826
|
+
return /* @__PURE__ */ n(M.Description, { ...a, ref: o, className: l("facto-modal-description", e) });
|
|
476
827
|
});
|
|
477
|
-
function
|
|
828
|
+
function he({
|
|
478
829
|
size: t = "sm",
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
830
|
+
motionVariant: e = "auto",
|
|
831
|
+
className: a,
|
|
832
|
+
style: o,
|
|
833
|
+
children: i,
|
|
482
834
|
...c
|
|
483
835
|
}) {
|
|
484
|
-
const
|
|
485
|
-
return /* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
/* @__PURE__ */
|
|
488
|
-
|
|
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,
|
|
489
841
|
{
|
|
490
842
|
...c,
|
|
491
|
-
|
|
492
|
-
|
|
843
|
+
"data-motion": e,
|
|
844
|
+
style: { ...r, ...o },
|
|
845
|
+
className: l(
|
|
493
846
|
"facto-theme",
|
|
494
847
|
"facto-dialog",
|
|
495
848
|
`facto-dialog--${t}`,
|
|
496
|
-
|
|
849
|
+
a
|
|
497
850
|
),
|
|
498
|
-
children:
|
|
851
|
+
children: i
|
|
499
852
|
}
|
|
500
853
|
)
|
|
501
854
|
] });
|
|
502
855
|
}
|
|
503
|
-
const
|
|
504
|
-
function
|
|
856
|
+
const pe = M.Root, ge = M.Trigger, ve = M.Close, _e = bt, Ne = wt;
|
|
857
|
+
function be({
|
|
505
858
|
side: t = "center",
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
859
|
+
motionVariant: e = "auto",
|
|
860
|
+
className: a,
|
|
861
|
+
style: o,
|
|
862
|
+
children: i,
|
|
509
863
|
...c
|
|
510
864
|
}) {
|
|
511
|
-
const
|
|
512
|
-
return /* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
|
|
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,
|
|
516
870
|
{
|
|
517
871
|
...c,
|
|
518
|
-
|
|
519
|
-
|
|
872
|
+
"data-motion": e,
|
|
873
|
+
style: { ...r, ...o },
|
|
874
|
+
className: l(
|
|
520
875
|
"facto-theme",
|
|
521
876
|
"facto-sheet",
|
|
522
877
|
`facto-sheet--${t}`,
|
|
523
|
-
|
|
878
|
+
a
|
|
524
879
|
),
|
|
525
|
-
children:
|
|
880
|
+
children: i
|
|
526
881
|
}
|
|
527
882
|
)
|
|
528
883
|
] });
|
|
529
884
|
}
|
|
530
|
-
function
|
|
885
|
+
function at({
|
|
531
886
|
width: t,
|
|
532
887
|
height: e,
|
|
533
|
-
circle:
|
|
888
|
+
circle: a,
|
|
534
889
|
className: o,
|
|
535
|
-
style:
|
|
536
|
-
...
|
|
890
|
+
style: i,
|
|
891
|
+
...c
|
|
537
892
|
}) {
|
|
538
|
-
return /* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ n(
|
|
539
894
|
"span",
|
|
540
895
|
{
|
|
541
|
-
...
|
|
896
|
+
...c,
|
|
542
897
|
"aria-hidden": "true",
|
|
543
|
-
className:
|
|
898
|
+
className: l(
|
|
544
899
|
"facto-skeleton",
|
|
545
|
-
|
|
900
|
+
a && "facto-skeleton--circle",
|
|
546
901
|
o
|
|
547
902
|
),
|
|
548
|
-
style: { ...
|
|
903
|
+
style: { ...i, width: t, height: e }
|
|
549
904
|
}
|
|
550
905
|
);
|
|
551
906
|
}
|
|
552
|
-
function
|
|
907
|
+
function we({
|
|
553
908
|
title: t,
|
|
554
909
|
description: e,
|
|
555
|
-
action:
|
|
910
|
+
action: a,
|
|
556
911
|
icon: o,
|
|
557
|
-
className:
|
|
558
|
-
...
|
|
912
|
+
className: i,
|
|
913
|
+
...c
|
|
559
914
|
}) {
|
|
560
|
-
return /* @__PURE__ */
|
|
561
|
-
o && /* @__PURE__ */
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
e && /* @__PURE__ */
|
|
564
|
-
|
|
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 })
|
|
565
920
|
] });
|
|
566
921
|
}
|
|
567
|
-
function
|
|
922
|
+
function ke({
|
|
568
923
|
tone: t = "info",
|
|
569
924
|
title: e,
|
|
570
|
-
description:
|
|
925
|
+
description: a,
|
|
571
926
|
action: o,
|
|
572
|
-
className:
|
|
573
|
-
...
|
|
927
|
+
className: i,
|
|
928
|
+
...c
|
|
574
929
|
}) {
|
|
575
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ f(
|
|
576
931
|
"div",
|
|
577
932
|
{
|
|
578
|
-
...
|
|
933
|
+
...c,
|
|
579
934
|
role: t === "danger" ? "alert" : "status",
|
|
580
|
-
className:
|
|
935
|
+
className: l("facto-notice", `facto-notice--${t}`, i),
|
|
581
936
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
|
|
937
|
+
/* @__PURE__ */ f("div", { children: [
|
|
938
|
+
/* @__PURE__ */ n("strong", { children: e }),
|
|
939
|
+
a && /* @__PURE__ */ n("span", { children: a })
|
|
585
940
|
] }),
|
|
586
941
|
o
|
|
587
942
|
]
|
|
588
943
|
}
|
|
589
944
|
);
|
|
590
945
|
}
|
|
591
|
-
function
|
|
946
|
+
function ye({
|
|
592
947
|
gap: t = 3,
|
|
593
948
|
direction: e = "vertical",
|
|
594
|
-
align:
|
|
949
|
+
align: a = "stretch",
|
|
595
950
|
justify: o = "start",
|
|
596
|
-
className:
|
|
597
|
-
...
|
|
951
|
+
className: i,
|
|
952
|
+
...c
|
|
598
953
|
}) {
|
|
599
|
-
return /* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ n(
|
|
600
955
|
"div",
|
|
601
956
|
{
|
|
602
|
-
...
|
|
603
|
-
className:
|
|
957
|
+
...c,
|
|
958
|
+
className: l(
|
|
604
959
|
"facto-stack",
|
|
605
960
|
`facto-stack--${e}`,
|
|
606
961
|
`facto-stack--gap-${t}`,
|
|
607
|
-
`facto-stack--align-${
|
|
962
|
+
`facto-stack--align-${a}`,
|
|
608
963
|
`facto-stack--justify-${o}`,
|
|
609
|
-
|
|
964
|
+
i
|
|
610
965
|
)
|
|
611
966
|
}
|
|
612
967
|
);
|
|
613
968
|
}
|
|
614
|
-
function
|
|
615
|
-
return /* @__PURE__ */
|
|
969
|
+
function Te({ delayDuration: t = 300, ...e }) {
|
|
970
|
+
return /* @__PURE__ */ n(U.Provider, { ...e, delayDuration: t });
|
|
616
971
|
}
|
|
617
|
-
const
|
|
618
|
-
function
|
|
619
|
-
const
|
|
620
|
-
return /* @__PURE__ */
|
|
621
|
-
|
|
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,
|
|
622
977
|
{
|
|
623
|
-
...
|
|
978
|
+
...r,
|
|
624
979
|
sideOffset: o,
|
|
625
|
-
|
|
626
|
-
|
|
980
|
+
collisionPadding: i,
|
|
981
|
+
className: l("facto-theme", "facto-tooltip", t === "content" && "facto-tooltip--content", e),
|
|
982
|
+
style: { ...m, ...a },
|
|
627
983
|
children: c
|
|
628
984
|
}
|
|
629
985
|
) });
|
|
630
986
|
}
|
|
631
|
-
function
|
|
632
|
-
return /* @__PURE__ */
|
|
987
|
+
function kt({ duration: t = 2600, ...e }) {
|
|
988
|
+
return /* @__PURE__ */ n(W.Provider, { ...e, duration: t });
|
|
633
989
|
}
|
|
634
|
-
function
|
|
635
|
-
const
|
|
636
|
-
return /* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
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 })
|
|
639
995
|
] });
|
|
640
996
|
}
|
|
641
|
-
function
|
|
642
|
-
return /* @__PURE__ */
|
|
997
|
+
function Tt({ className: t, ...e }) {
|
|
998
|
+
return /* @__PURE__ */ n(W.Title, { ...e, className: l("facto-toast__title", t) });
|
|
643
999
|
}
|
|
644
|
-
function
|
|
645
|
-
return /* @__PURE__ */
|
|
1000
|
+
function ot({ className: t, ...e }) {
|
|
1001
|
+
return /* @__PURE__ */ n(W.Description, { ...e, className: l("facto-toast__description", t) });
|
|
646
1002
|
}
|
|
647
|
-
function
|
|
648
|
-
return /* @__PURE__ */
|
|
1003
|
+
function Ct({ className: t, ...e }) {
|
|
1004
|
+
return /* @__PURE__ */ n(W.Action, { ...e, className: l("facto-button", "facto-button--secondary", "facto-button--sm", t) });
|
|
649
1005
|
}
|
|
650
|
-
function
|
|
651
|
-
return /* @__PURE__ */
|
|
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 });
|
|
652
1008
|
}
|
|
653
|
-
function
|
|
654
|
-
const o =
|
|
655
|
-
return
|
|
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;
|
|
656
1012
|
}
|
|
657
|
-
function
|
|
658
|
-
const
|
|
659
|
-
|
|
660
|
-
const _ =
|
|
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;
|
|
661
1017
|
if (!_ || t !== void 0) return;
|
|
662
|
-
const
|
|
1018
|
+
const C = (N) => {
|
|
663
1019
|
queueMicrotask(() => {
|
|
664
|
-
|
|
1020
|
+
N.defaultPrevented || (s(e), a?.(e));
|
|
665
1021
|
});
|
|
666
1022
|
};
|
|
667
|
-
return _.addEventListener("reset",
|
|
668
|
-
}, [e, t,
|
|
669
|
-
const
|
|
670
|
-
t === void 0 &&
|
|
1023
|
+
return _.addEventListener("reset", C), () => _.removeEventListener("reset", C);
|
|
1024
|
+
}, [e, t, a]);
|
|
1025
|
+
const h = (_) => {
|
|
1026
|
+
t === void 0 && s(_), a?.(_);
|
|
671
1027
|
};
|
|
672
|
-
return /* @__PURE__ */
|
|
673
|
-
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
/* @__PURE__ */
|
|
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" })
|
|
678
1034
|
] }),
|
|
679
|
-
/* @__PURE__ */
|
|
1035
|
+
/* @__PURE__ */ n(
|
|
680
1036
|
"input",
|
|
681
1037
|
{
|
|
682
|
-
...
|
|
683
|
-
ref:
|
|
684
|
-
id:
|
|
1038
|
+
...w,
|
|
1039
|
+
ref: b,
|
|
1040
|
+
id: y,
|
|
685
1041
|
type: "search",
|
|
686
|
-
disabled:
|
|
687
|
-
readOnly:
|
|
688
|
-
value:
|
|
689
|
-
onChange: (_) =>
|
|
690
|
-
"aria-invalid": !!r ||
|
|
691
|
-
"aria-describedby":
|
|
692
|
-
className:
|
|
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)
|
|
693
1049
|
}
|
|
694
1050
|
),
|
|
695
|
-
|
|
1051
|
+
u && !v && /* @__PURE__ */ n(
|
|
696
1052
|
"button",
|
|
697
1053
|
{
|
|
698
1054
|
type: "button",
|
|
699
1055
|
className: "facto-search__clear",
|
|
700
|
-
disabled:
|
|
1056
|
+
disabled: p,
|
|
701
1057
|
"aria-label": o,
|
|
702
1058
|
onClick: () => {
|
|
703
|
-
|
|
1059
|
+
h(""), b.current?.focus();
|
|
704
1060
|
},
|
|
705
|
-
children: /* @__PURE__ */
|
|
1061
|
+
children: /* @__PURE__ */ n(z, { name: "close", size: 16 })
|
|
706
1062
|
}
|
|
707
1063
|
)
|
|
708
1064
|
] }),
|
|
709
|
-
(r ||
|
|
1065
|
+
(r || c) && /* @__PURE__ */ n("span", { id: T, className: l("facto-field__message", !!r && "facto-field__message--error"), children: r ?? c })
|
|
710
1066
|
] });
|
|
711
1067
|
}
|
|
712
|
-
function
|
|
713
|
-
return /* @__PURE__ */
|
|
1068
|
+
function $e({ className: t, ...e }) {
|
|
1069
|
+
return /* @__PURE__ */ n(Nt, { ...e, type: "search", className: l("facto-search-field", t) });
|
|
1070
|
+
}
|
|
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 } }) });
|
|
1075
|
+
}
|
|
1076
|
+
function Le({ modal: t = !1, ...e }) {
|
|
1077
|
+
return /* @__PURE__ */ n(O.Root, { ...e, modal: t });
|
|
1078
|
+
}
|
|
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 } }) });
|
|
1083
|
+
}
|
|
1084
|
+
function je({ className: t, ...e }) {
|
|
1085
|
+
return /* @__PURE__ */ n(O.Item, { ...e, className: l("facto-menu-item", t) });
|
|
1086
|
+
}
|
|
1087
|
+
function Ee({ className: t, ...e }) {
|
|
1088
|
+
return /* @__PURE__ */ n(O.Separator, { ...e, className: l("facto-menu-separator", t) });
|
|
1089
|
+
}
|
|
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) });
|
|
1092
|
+
}
|
|
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)) });
|
|
714
1099
|
}
|
|
715
1100
|
export {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
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
|
|
771
1179
|
};
|