opsfuse-ui 0.1.20 → 0.1.22
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/LICENSE +17 -0
- package/README.md +76 -12
- package/dist/components/logo/LogoMaker.d.ts.map +1 -1
- package/dist/components/opsfuse-root.d.ts +2 -5
- package/dist/components/opsfuse-root.d.ts.map +1 -1
- package/dist/components/opsfuse-theme-provider.d.ts +8 -1
- package/dist/components/opsfuse-theme-provider.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/shadcn/shadcn-pagination.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/core.js +4 -3
- package/dist/date-fns-locale.js +1 -39647
- package/dist/date-fns.js +1 -3
- package/dist/extended.js +3 -2
- package/dist/hooks/use-mobile.d.ts +14 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/icons.js +1 -2
- package/dist/index.js +61 -2829
- package/dist/input-group-COKxQf1K.js +560 -0
- package/dist/input-otp-Cbt2uaq7.js +1181 -0
- package/dist/lib/document-dark-mode.d.ts.map +1 -1
- package/dist/lib/link.d.ts +13 -0
- package/dist/lib/link.d.ts.map +1 -0
- package/dist/lib/portaled-layer.d.ts.map +1 -1
- package/dist/public-api-core.d.ts +1 -0
- package/dist/public-api-core.d.ts.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/recharts.js +1 -2
- package/dist/style.css +50 -6
- package/dist/toggle-group-Cwi9rLMs.js +3174 -0
- package/package.json +41 -14
- package/theme.css +47 -3
- package/dist/chunk-Dqa2HsxW.js +0 -20
- package/dist/clsx-BWCAbrjV.js +0 -16
- package/dist/date-fns-DTKqTajJ.js +0 -3871
- package/dist/es6-CLjPx7Zx.js +0 -23996
- package/dist/input-group-BAkukY-L.js +0 -5463
- package/dist/input-otp-DyyXKjPp.js +0 -10792
- package/dist/isSameWeek-B6PEe-M_.js +0 -537
- package/dist/lucide-react-Dil0H3iN.js +0 -38770
- package/dist/toggle-group-BWtFIW07.js +0 -11063
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { B as e, E as t, L as n, M as r, R as i, T as a, _ as o, f as s, h as c, i as l, l as u, m as d, n as f, r as p, t as m, w as h, x as g, z as ee } from "./input-group-COKxQf1K.js";
|
|
3
|
+
import { CheckIcon as _, ChevronDownIcon as te, ChevronLeftIcon as v, ChevronRightIcon as ne, MinusIcon as y, SearchIcon as b, XIcon as re } from "lucide-react";
|
|
4
|
+
import * as x from "recharts";
|
|
5
|
+
import * as S from "react";
|
|
6
|
+
import C from "react";
|
|
7
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
8
|
+
import { Combobox as D } from "@base-ui/react";
|
|
9
|
+
import * as O from "react-dom";
|
|
10
|
+
import { DayPicker as k, getDefaultClassNames as A } from "react-day-picker";
|
|
11
|
+
import j from "embla-carousel-react";
|
|
12
|
+
import { Command as M } from "cmdk";
|
|
13
|
+
import { Drawer as N } from "vaul";
|
|
14
|
+
import { OTPInput as ie, OTPInputContext as ae } from "input-otp";
|
|
15
|
+
//#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
16
|
+
var P = Object.defineProperty, F = (e, t) => P(e, "name", {
|
|
17
|
+
value: t,
|
|
18
|
+
configurable: !0
|
|
19
|
+
});
|
|
20
|
+
function I(e, t) {
|
|
21
|
+
if (typeof e == "function") return e(t);
|
|
22
|
+
e != null && (e.current = t);
|
|
23
|
+
}
|
|
24
|
+
F(I, "setRef");
|
|
25
|
+
function L(...e) {
|
|
26
|
+
return (t) => {
|
|
27
|
+
let n = !1, r = e.map((e) => {
|
|
28
|
+
let r = I(e, t);
|
|
29
|
+
return !n && typeof r == "function" && (n = !0), r;
|
|
30
|
+
});
|
|
31
|
+
if (n) return () => {
|
|
32
|
+
for (let t = 0; t < r.length; t++) {
|
|
33
|
+
let n = r[t];
|
|
34
|
+
typeof n == "function" ? n() : I(e[t], null);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
F(L, "composeRefs");
|
|
40
|
+
function R(...e) {
|
|
41
|
+
return S.useCallback(L(...e), e);
|
|
42
|
+
}
|
|
43
|
+
F(R, "useComposedRefs");
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
46
|
+
var z = Object.defineProperty, B = (e, t) => z(e, "name", {
|
|
47
|
+
value: t,
|
|
48
|
+
configurable: !0
|
|
49
|
+
});
|
|
50
|
+
// @__NO_SIDE_EFFECTS__
|
|
51
|
+
function V(e) {
|
|
52
|
+
let t = S.forwardRef((t, n) => {
|
|
53
|
+
let { children: r, ...i } = t, a = null, o = !1, s = [];
|
|
54
|
+
W(r) && typeof J == "function" && (r = J(r._payload)), S.Children.forEach(r, (e) => {
|
|
55
|
+
if (le(e)) {
|
|
56
|
+
o = !0;
|
|
57
|
+
let t = e, n = "child" in t.props ? t.props.child : t.props.children;
|
|
58
|
+
W(n) && typeof J == "function" && (n = J(n._payload)), a = U(t, n), s.push(a?.props?.children);
|
|
59
|
+
} else s.push(e);
|
|
60
|
+
}), a ? a = S.cloneElement(a, void 0, s) : !o && S.Children.count(r) === 1 && S.isValidElement(r) && (a = r);
|
|
61
|
+
let c = a ? ce(a) : void 0, l = R(n, c);
|
|
62
|
+
if (!a) {
|
|
63
|
+
if (r || r === 0) throw Error(o ? q(e) : K(e));
|
|
64
|
+
return r;
|
|
65
|
+
}
|
|
66
|
+
let u = se(i, a.props ?? {});
|
|
67
|
+
return a.type !== S.Fragment && (u.ref = n ? l : c), S.cloneElement(a, u);
|
|
68
|
+
});
|
|
69
|
+
return t.displayName = `${e}.Slot`, t;
|
|
70
|
+
}
|
|
71
|
+
B(V, "createSlot");
|
|
72
|
+
var H = Symbol.for("radix.slottable");
|
|
73
|
+
// @__NO_SIDE_EFFECTS__
|
|
74
|
+
function oe(e) {
|
|
75
|
+
let t = /* @__PURE__ */ B((e) => "child" in e ? e.children(e.child) : e.children, "Slottable");
|
|
76
|
+
return t.displayName = `${e}.Slottable`, t.__radixId = H, t;
|
|
77
|
+
}
|
|
78
|
+
B(oe, "createSlottable");
|
|
79
|
+
var U = /* @__PURE__ */ B((e, t) => {
|
|
80
|
+
if ("child" in e.props) {
|
|
81
|
+
let t = e.props.child;
|
|
82
|
+
return S.isValidElement(t) ? S.cloneElement(t, void 0, e.props.children(t.props.children)) : null;
|
|
83
|
+
}
|
|
84
|
+
return S.isValidElement(t) ? t : null;
|
|
85
|
+
}, "getSlottableElementFromSlottable");
|
|
86
|
+
function se(e, t) {
|
|
87
|
+
let n = { ...t };
|
|
88
|
+
for (let r in t) {
|
|
89
|
+
let i = e[r], a = t[r];
|
|
90
|
+
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
91
|
+
let t = a(...e);
|
|
92
|
+
return i(...e), t;
|
|
93
|
+
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
94
|
+
...i,
|
|
95
|
+
...a
|
|
96
|
+
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
...e,
|
|
100
|
+
...n
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
B(se, "mergeProps");
|
|
104
|
+
function ce(e) {
|
|
105
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
106
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
107
|
+
}
|
|
108
|
+
B(ce, "getElementRef");
|
|
109
|
+
function le(e) {
|
|
110
|
+
return S.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === H;
|
|
111
|
+
}
|
|
112
|
+
B(le, "isSlottable");
|
|
113
|
+
var ue = Symbol.for("react.lazy");
|
|
114
|
+
function W(e) {
|
|
115
|
+
return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === ue && "_payload" in e && G(e._payload);
|
|
116
|
+
}
|
|
117
|
+
B(W, "isLazyComponent");
|
|
118
|
+
function G(e) {
|
|
119
|
+
return typeof e == "object" && !!e && "then" in e;
|
|
120
|
+
}
|
|
121
|
+
B(G, "isPromiseLike");
|
|
122
|
+
var K = /* @__PURE__ */ B((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), q = /* @__PURE__ */ B((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), J = S.use, Y = Object.defineProperty, de = (e, t) => Y(e, "name", {
|
|
123
|
+
value: t,
|
|
124
|
+
configurable: !0
|
|
125
|
+
}), X = [
|
|
126
|
+
"a",
|
|
127
|
+
"button",
|
|
128
|
+
"div",
|
|
129
|
+
"form",
|
|
130
|
+
"h2",
|
|
131
|
+
"h3",
|
|
132
|
+
"img",
|
|
133
|
+
"input",
|
|
134
|
+
"label",
|
|
135
|
+
"li",
|
|
136
|
+
"nav",
|
|
137
|
+
"ol",
|
|
138
|
+
"p",
|
|
139
|
+
"select",
|
|
140
|
+
"span",
|
|
141
|
+
"svg",
|
|
142
|
+
"ul"
|
|
143
|
+
].reduce((e, t) => {
|
|
144
|
+
let n = /* @__PURE__ */ V(`Primitive.${t}`), r = S.forwardRef((e, r) => {
|
|
145
|
+
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
146
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ T(o, {
|
|
147
|
+
...a,
|
|
148
|
+
ref: r
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
return r.displayName = `Primitive.${t}`, {
|
|
152
|
+
...e,
|
|
153
|
+
[t]: r
|
|
154
|
+
};
|
|
155
|
+
}, {});
|
|
156
|
+
function fe(e, t) {
|
|
157
|
+
e && O.flushSync(() => e.dispatchEvent(t));
|
|
158
|
+
}
|
|
159
|
+
de(fe, "dispatchDiscreteCustomEvent");
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
162
|
+
var pe = Object.defineProperty, me = (e, t) => pe(e, "name", {
|
|
163
|
+
value: t,
|
|
164
|
+
configurable: !0
|
|
165
|
+
});
|
|
166
|
+
function Z(e) {
|
|
167
|
+
let t = S.useRef(e);
|
|
168
|
+
return S.useEffect(() => {
|
|
169
|
+
t.current = e;
|
|
170
|
+
}), S.useMemo(() => ((...e) => t.current?.(...e)), []);
|
|
171
|
+
}
|
|
172
|
+
me(Z, "useCallbackRef");
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
175
|
+
var he = Object.defineProperty, Q = (e, t) => he(e, "name", {
|
|
176
|
+
value: t,
|
|
177
|
+
configurable: !0
|
|
178
|
+
}), ge = "dismissableLayer.update", _e = "dismissableLayer.pointerDownOutside", ve = "dismissableLayer.focusOutside", ye = S.createContext({
|
|
179
|
+
layers: /* @__PURE__ */ new Set(),
|
|
180
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
181
|
+
branches: /* @__PURE__ */ new Set(),
|
|
182
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
183
|
+
}), be = /* @__PURE__ */ S.forwardRef(/* @__PURE__ */ Q(function(e, t) {
|
|
184
|
+
let n = S.useContext(ye), r = S.useRef(null), i = R(t, r);
|
|
185
|
+
return S.useEffect(() => {
|
|
186
|
+
let e = r.current;
|
|
187
|
+
if (e) return n.branches.add(e), () => {
|
|
188
|
+
n.branches.delete(e);
|
|
189
|
+
};
|
|
190
|
+
}, [n.branches]), /* @__PURE__ */ T(X.div, {
|
|
191
|
+
...e,
|
|
192
|
+
ref: i
|
|
193
|
+
});
|
|
194
|
+
}, "DismissableLayerBranch"));
|
|
195
|
+
function xe() {
|
|
196
|
+
let e = S.useContext(ye), [t, n] = S.useState(null);
|
|
197
|
+
return S.useEffect(() => {
|
|
198
|
+
if (t) return e.dismissableSurfaces.add(t), () => {
|
|
199
|
+
e.dismissableSurfaces.delete(t);
|
|
200
|
+
};
|
|
201
|
+
}, [t, e.dismissableSurfaces]), n;
|
|
202
|
+
}
|
|
203
|
+
Q(xe, "useDismissableLayerSurface");
|
|
204
|
+
var Se = /* @__PURE__ */ Q(() => !0, "IS_TRUE");
|
|
205
|
+
function Ce(e, t) {
|
|
206
|
+
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = Se } = t, s = Z(e), c = S.useRef(!1), l = S.useRef(!1), u = S.useRef(/* @__PURE__ */ new Map()), d = S.useRef(() => {});
|
|
207
|
+
return S.useEffect(() => {
|
|
208
|
+
function e() {
|
|
209
|
+
l.current = !1, i.current = !1, u.current.clear();
|
|
210
|
+
}
|
|
211
|
+
Q(e, "resetOutsideInteraction");
|
|
212
|
+
function t() {
|
|
213
|
+
return Array.from(u.current.values()).some(Boolean);
|
|
214
|
+
}
|
|
215
|
+
Q(t, "isOutsideInteractionIntercepted");
|
|
216
|
+
function f(e) {
|
|
217
|
+
if (!l.current) return;
|
|
218
|
+
let t = e.target;
|
|
219
|
+
t instanceof Node && [...a].some((e) => e.contains(t)) || u.current.set(e.type, !0), e.type === "click" && window.setTimeout(() => {
|
|
220
|
+
l.current && d.current();
|
|
221
|
+
}, 0);
|
|
222
|
+
}
|
|
223
|
+
Q(f, "handleInteractionCapture");
|
|
224
|
+
function p(e) {
|
|
225
|
+
l.current && u.current.set(e.type, !1);
|
|
226
|
+
}
|
|
227
|
+
Q(p, "handleInteractionBubble");
|
|
228
|
+
let m = /* @__PURE__ */ Q((a) => {
|
|
229
|
+
if (a.target && !c.current) {
|
|
230
|
+
let f = function() {
|
|
231
|
+
n.removeEventListener("click", d.current);
|
|
232
|
+
let r = t();
|
|
233
|
+
e(), r || Ee(_e, s, p, { discrete: !0 });
|
|
234
|
+
};
|
|
235
|
+
if (Q(f, "handleAndDispatchPointerDownOutsideEvent"), !o(a.target)) {
|
|
236
|
+
n.removeEventListener("click", d.current), e(), c.current = !1;
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
let p = { originalEvent: a };
|
|
240
|
+
l.current = !0, i.current = r && a.button === 0, u.current.clear(), !r || a.button !== 0 ? f() : (n.removeEventListener("click", d.current), d.current = f, n.addEventListener("click", d.current, { once: !0 }));
|
|
241
|
+
} else n.removeEventListener("click", d.current), e();
|
|
242
|
+
c.current = !1;
|
|
243
|
+
}, "handlePointerDown"), h = [
|
|
244
|
+
"pointerup",
|
|
245
|
+
"mousedown",
|
|
246
|
+
"mouseup",
|
|
247
|
+
"touchstart",
|
|
248
|
+
"touchend",
|
|
249
|
+
"click"
|
|
250
|
+
];
|
|
251
|
+
for (let e of h) n.addEventListener(e, f, !0), n.addEventListener(e, p);
|
|
252
|
+
let g = window.setTimeout(() => {
|
|
253
|
+
n.addEventListener("pointerdown", m);
|
|
254
|
+
}, 0);
|
|
255
|
+
return () => {
|
|
256
|
+
window.clearTimeout(g), n.removeEventListener("pointerdown", m), n.removeEventListener("click", d.current);
|
|
257
|
+
for (let e of h) n.removeEventListener(e, f, !0), n.removeEventListener(e, p);
|
|
258
|
+
};
|
|
259
|
+
}, [
|
|
260
|
+
n,
|
|
261
|
+
s,
|
|
262
|
+
r,
|
|
263
|
+
i,
|
|
264
|
+
a,
|
|
265
|
+
o
|
|
266
|
+
]), { onPointerDownCapture: /* @__PURE__ */ Q(() => c.current = !0, "onPointerDownCapture") };
|
|
267
|
+
}
|
|
268
|
+
Q(Ce, "usePointerDownOutside");
|
|
269
|
+
function we(e, t = globalThis?.document) {
|
|
270
|
+
let n = Z(e), r = S.useRef(!1);
|
|
271
|
+
return S.useEffect(() => {
|
|
272
|
+
let e = /* @__PURE__ */ Q((e) => {
|
|
273
|
+
e.target && !r.current && Ee(ve, n, { originalEvent: e }, { discrete: !1 });
|
|
274
|
+
}, "handleFocus");
|
|
275
|
+
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
276
|
+
}, [t, n]), {
|
|
277
|
+
onFocusCapture: /* @__PURE__ */ Q(() => r.current = !0, "onFocusCapture"),
|
|
278
|
+
onBlurCapture: /* @__PURE__ */ Q(() => r.current = !1, "onBlurCapture")
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
Q(we, "useFocusOutside");
|
|
282
|
+
function Te() {
|
|
283
|
+
let e = new CustomEvent(ge);
|
|
284
|
+
document.dispatchEvent(e);
|
|
285
|
+
}
|
|
286
|
+
Q(Te, "dispatchUpdate");
|
|
287
|
+
function Ee(e, t, n, { discrete: r }) {
|
|
288
|
+
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
289
|
+
bubbles: !1,
|
|
290
|
+
cancelable: !0,
|
|
291
|
+
detail: n
|
|
292
|
+
});
|
|
293
|
+
t && i.addEventListener(e, t, { once: !0 }), r ? fe(i, a) : i.dispatchEvent(a);
|
|
294
|
+
}
|
|
295
|
+
Q(Ee, "handleAndDispatchCustomEvent");
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/components/ui/shadcn/shadcn-combobox.tsx
|
|
298
|
+
function De({ modal: e = !0, ...t }) {
|
|
299
|
+
return /* @__PURE__ */ T(D.Root, {
|
|
300
|
+
modal: e,
|
|
301
|
+
...t
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
function Oe({ ...e }) {
|
|
305
|
+
return /* @__PURE__ */ T(D.Value, {
|
|
306
|
+
"data-slot": "combobox-value",
|
|
307
|
+
...e
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
function ke({ className: t, children: n, ...r }) {
|
|
311
|
+
return /* @__PURE__ */ E(D.Trigger, {
|
|
312
|
+
"data-slot": "combobox-trigger",
|
|
313
|
+
className: e("[&_svg:not([class*='size-'])]:size-4", t),
|
|
314
|
+
...r,
|
|
315
|
+
children: [n, /* @__PURE__ */ T(te, { className: "pointer-events-none size-4 text-muted-foreground" })]
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
function Ae({ className: t, ...n }) {
|
|
319
|
+
return /* @__PURE__ */ T(D.Clear, {
|
|
320
|
+
"data-slot": "combobox-clear",
|
|
321
|
+
render: /* @__PURE__ */ T(p, {
|
|
322
|
+
variant: "ghost",
|
|
323
|
+
size: "icon-xs"
|
|
324
|
+
}),
|
|
325
|
+
className: e(t),
|
|
326
|
+
...n,
|
|
327
|
+
children: /* @__PURE__ */ T(re, { className: "pointer-events-none" })
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
function je({ className: t, children: n, disabled: r = !1, showTrigger: i = !0, showClear: a = !1, ...o }) {
|
|
331
|
+
return /* @__PURE__ */ T("div", {
|
|
332
|
+
className: e("combobox-pointer-field [&_[data-slot=input-group-control]]:text-sm [&_[data-slot=input-group-control]]:placeholder:text-sm [&_[data-slot=input-group]_input]:cursor-pointer! **:data-[slot=input-group-addon]:cursor-pointer!"),
|
|
333
|
+
children: /* @__PURE__ */ E(m, {
|
|
334
|
+
className: e("w-auto text-sm", t),
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ T(D.Input, {
|
|
337
|
+
render: /* @__PURE__ */ T(l, {
|
|
338
|
+
disabled: r,
|
|
339
|
+
className: "text-sm placeholder:text-sm"
|
|
340
|
+
}),
|
|
341
|
+
...o
|
|
342
|
+
}),
|
|
343
|
+
/* @__PURE__ */ E(f, {
|
|
344
|
+
align: "inline-end",
|
|
345
|
+
children: [i && /* @__PURE__ */ T(p, {
|
|
346
|
+
size: "icon-xs",
|
|
347
|
+
variant: "ghost",
|
|
348
|
+
asChild: !0,
|
|
349
|
+
"data-slot": "input-group-button",
|
|
350
|
+
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
351
|
+
disabled: r,
|
|
352
|
+
children: /* @__PURE__ */ T(ke, {})
|
|
353
|
+
}), a && /* @__PURE__ */ T(Ae, { disabled: r })]
|
|
354
|
+
}),
|
|
355
|
+
n
|
|
356
|
+
]
|
|
357
|
+
})
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
function Me({ className: t, side: n = "bottom", sideOffset: i = 6, align: o = "start", alignOffset: s = 0, anchor: c, style: l, ...u }) {
|
|
361
|
+
let d = r();
|
|
362
|
+
return /* @__PURE__ */ T(D.Portal, { children: /* @__PURE__ */ T(be, {
|
|
363
|
+
style: { pointerEvents: "auto" },
|
|
364
|
+
children: /* @__PURE__ */ T(D.Positioner, {
|
|
365
|
+
"data-slot": "combobox-positioner",
|
|
366
|
+
side: n,
|
|
367
|
+
sideOffset: i,
|
|
368
|
+
align: o,
|
|
369
|
+
alignOffset: s,
|
|
370
|
+
anchor: c,
|
|
371
|
+
style: a,
|
|
372
|
+
children: /* @__PURE__ */ T(D.Popup, {
|
|
373
|
+
"data-slot": "combobox-content",
|
|
374
|
+
"data-chips": !!c,
|
|
375
|
+
style: {
|
|
376
|
+
...d.style,
|
|
377
|
+
...l
|
|
378
|
+
},
|
|
379
|
+
...h,
|
|
380
|
+
className: e(d.className, "group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", t),
|
|
381
|
+
...u
|
|
382
|
+
})
|
|
383
|
+
})
|
|
384
|
+
}) });
|
|
385
|
+
}
|
|
386
|
+
function Ne({ className: t, ...n }) {
|
|
387
|
+
return /* @__PURE__ */ T(D.List, {
|
|
388
|
+
"data-slot": "combobox-list",
|
|
389
|
+
className: e("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", t),
|
|
390
|
+
...h,
|
|
391
|
+
...n
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
function Pe({ className: t, children: n, ...r }) {
|
|
395
|
+
return /* @__PURE__ */ E(D.Item, {
|
|
396
|
+
"data-slot": "combobox-item",
|
|
397
|
+
className: e("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
398
|
+
...r,
|
|
399
|
+
children: [n, /* @__PURE__ */ T(D.ItemIndicator, {
|
|
400
|
+
render: /* @__PURE__ */ T("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
401
|
+
children: /* @__PURE__ */ T(_, { className: "pointer-events-none" })
|
|
402
|
+
})]
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
function Fe({ className: t, ...n }) {
|
|
406
|
+
return /* @__PURE__ */ T(D.Group, {
|
|
407
|
+
"data-slot": "combobox-group",
|
|
408
|
+
className: e(t),
|
|
409
|
+
...n
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
function Ie({ className: t, ...n }) {
|
|
413
|
+
return /* @__PURE__ */ T(D.GroupLabel, {
|
|
414
|
+
"data-slot": "combobox-label",
|
|
415
|
+
className: e("px-2 py-1.5 text-xs text-muted-foreground", t),
|
|
416
|
+
...n
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
function Le({ ...e }) {
|
|
420
|
+
return /* @__PURE__ */ T(D.Collection, {
|
|
421
|
+
"data-slot": "combobox-collection",
|
|
422
|
+
...e
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function Re({ className: t, ...n }) {
|
|
426
|
+
return /* @__PURE__ */ T(D.Empty, {
|
|
427
|
+
"data-slot": "combobox-empty",
|
|
428
|
+
className: e("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", t),
|
|
429
|
+
...n
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
function ze({ className: t, ...n }) {
|
|
433
|
+
return /* @__PURE__ */ T(D.Status, {
|
|
434
|
+
"data-slot": "combobox-status",
|
|
435
|
+
className: e("px-2 py-1.5 text-center text-sm text-muted-foreground empty:hidden", t),
|
|
436
|
+
...n
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
function Be({ className: t, ...n }) {
|
|
440
|
+
return /* @__PURE__ */ T(D.Separator, {
|
|
441
|
+
"data-slot": "combobox-separator",
|
|
442
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
443
|
+
...n
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function Ve({ className: t, ...n }) {
|
|
447
|
+
return /* @__PURE__ */ T(D.Chips, {
|
|
448
|
+
"data-slot": "combobox-chips",
|
|
449
|
+
className: e("flex min-h-9 flex-wrap items-center gap-1 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", t),
|
|
450
|
+
...n
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
function He({ className: t, children: r, showRemove: i = !0, ...a }) {
|
|
454
|
+
return /* @__PURE__ */ E(D.Chip, {
|
|
455
|
+
"data-slot": "combobox-chip",
|
|
456
|
+
className: e("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", t),
|
|
457
|
+
...a,
|
|
458
|
+
children: [r, i && /* @__PURE__ */ T(D.ChipRemove, {
|
|
459
|
+
render: /* @__PURE__ */ T(n, {
|
|
460
|
+
variant: "ghost",
|
|
461
|
+
size: "icon-xs"
|
|
462
|
+
}),
|
|
463
|
+
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
464
|
+
"data-slot": "combobox-chip-remove",
|
|
465
|
+
children: /* @__PURE__ */ T(re, { className: "pointer-events-none" })
|
|
466
|
+
})]
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
function Ue({ className: t, ...n }) {
|
|
470
|
+
return /* @__PURE__ */ T(D.Input, {
|
|
471
|
+
"data-slot": "combobox-chip-input",
|
|
472
|
+
className: e("min-w-16 flex-1 text-sm outline-none ring-0!", t),
|
|
473
|
+
...n
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
function We() {
|
|
477
|
+
return S.useRef(null);
|
|
478
|
+
}
|
|
479
|
+
function Ge({ label: t, helperText: n, error: r = !1, className: i, children: a }) {
|
|
480
|
+
return /* @__PURE__ */ E("div", {
|
|
481
|
+
className: e("w-full flex flex-col gap-2", i),
|
|
482
|
+
children: [
|
|
483
|
+
t && /* @__PURE__ */ T(u, { children: t }),
|
|
484
|
+
a,
|
|
485
|
+
n && /* @__PURE__ */ T("p", {
|
|
486
|
+
className: `text-caption ${r ? "text-destructive" : "text-muted-foreground"}`,
|
|
487
|
+
children: n
|
|
488
|
+
})
|
|
489
|
+
]
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region src/components/ui/combobox.tsx
|
|
494
|
+
function Ke(e, t) {
|
|
495
|
+
let [n, r] = C.useState(e);
|
|
496
|
+
return C.useEffect(() => {
|
|
497
|
+
let n = window.setTimeout(() => r(e), t);
|
|
498
|
+
return () => window.clearTimeout(n);
|
|
499
|
+
}, [e, t]), n;
|
|
500
|
+
}
|
|
501
|
+
function qe(e, t, n) {
|
|
502
|
+
let r = n ? t ?? [] : t ? [t] : [];
|
|
503
|
+
if (r.length === 0) return e;
|
|
504
|
+
let i = [...e];
|
|
505
|
+
for (let e of r) i.some((t) => t.value === e.value) || i.push(e);
|
|
506
|
+
return i;
|
|
507
|
+
}
|
|
508
|
+
function Je({ option: e }) {
|
|
509
|
+
let t = e.iconPosition ?? "inline-start";
|
|
510
|
+
return /* @__PURE__ */ E(C.Fragment, { children: [e.separator ? /* @__PURE__ */ T(Be, {}) : null, /* @__PURE__ */ E(Pe, {
|
|
511
|
+
value: e,
|
|
512
|
+
disabled: e.disabled,
|
|
513
|
+
children: [
|
|
514
|
+
e.icon && t === "inline-start" ? /* @__PURE__ */ T("span", {
|
|
515
|
+
"data-icon": "inline-start",
|
|
516
|
+
className: "contents",
|
|
517
|
+
children: e.icon
|
|
518
|
+
}) : null,
|
|
519
|
+
e.label,
|
|
520
|
+
e.icon && t === "inline-end" ? /* @__PURE__ */ T("span", {
|
|
521
|
+
"data-icon": "inline-end",
|
|
522
|
+
className: "contents",
|
|
523
|
+
children: e.icon
|
|
524
|
+
}) : null
|
|
525
|
+
]
|
|
526
|
+
})] }, e.value);
|
|
527
|
+
}
|
|
528
|
+
var Ye = ({ options: n = [], placeholder: r = "Search...", placeholderIcon: i, groupLabel: a, fieldLabel: o, helperText: s, error: c = !1, emptyMessage: l = "No results found.", disabled: u, multiple: d, showTrigger: p = !0, showClear: m = !1, showBadges: h = !1, fieldClassName: g, inputClassName: _, contentClassName: te, onSearch: v, searchDebounce: ne = 300, fetchOnOpen: y = !1, loadingMessage: b = "Searching…", loadMoreMessage: re = "Loading more…", searchPromptMessage: x = "Start typing to search…", scrollLoadThreshold: S = 48, modal: w = !0, onValueChange: D, onOpenChange: O, value: k, defaultValue: A, open: j, ...M }) => {
|
|
529
|
+
let N = !!v, ie = We(), [ae, P] = C.useState(() => N ? n : []), [F, I] = C.useState(""), [L, R] = C.useState(!1), [z, B] = C.useState(!1), [V, H] = C.useState(null), [oe, U] = C.useState(!1), [se, ce] = C.useState(!1), [le, ue] = C.useState(A ?? null), W = C.useRef(1), G = C.useRef(null), K = j ?? se;
|
|
530
|
+
t(K && w);
|
|
531
|
+
let q = k === void 0 ? le : k, J = Ke(F, ne), Y = J.trim(), de = N ? qe(ae, q, d) : n, X = C.useCallback(async (e, t, n) => {
|
|
532
|
+
if (!v) return;
|
|
533
|
+
G.current?.abort();
|
|
534
|
+
let r = new AbortController();
|
|
535
|
+
G.current = r, n ? B(!0) : R(!0), H(null);
|
|
536
|
+
try {
|
|
537
|
+
let i = await v({
|
|
538
|
+
query: e,
|
|
539
|
+
page: t,
|
|
540
|
+
signal: r.signal
|
|
541
|
+
});
|
|
542
|
+
if (r.signal.aborted) return;
|
|
543
|
+
P((e) => n ? [...e, ...i.options] : i.options), U(i.hasMore ?? !1), W.current = t;
|
|
544
|
+
} catch (e) {
|
|
545
|
+
if (r.signal.aborted || e instanceof DOMException && e.name === "AbortError") return;
|
|
546
|
+
H(e instanceof Error ? e.message : "Failed to load options."), n || (P([]), U(!1));
|
|
547
|
+
} finally {
|
|
548
|
+
r.signal.aborted || (R(!1), B(!1));
|
|
549
|
+
}
|
|
550
|
+
}, [v]);
|
|
551
|
+
C.useEffect(() => {
|
|
552
|
+
!N || !K || Y === "" && !y || (W.current = 1, queueMicrotask(() => {
|
|
553
|
+
X(Y, 1, !1);
|
|
554
|
+
}));
|
|
555
|
+
}, [
|
|
556
|
+
J,
|
|
557
|
+
y,
|
|
558
|
+
N,
|
|
559
|
+
K,
|
|
560
|
+
X,
|
|
561
|
+
Y
|
|
562
|
+
]);
|
|
563
|
+
let fe = C.useCallback((e) => {
|
|
564
|
+
j === void 0 && ce(e), O?.(e);
|
|
565
|
+
}, [O, j]), pe = C.useCallback((e) => {
|
|
566
|
+
!e && N && (P(d ? (q ?? []).slice() : q ? [q] : []), I(""), H(null), U(!1), W.current = 1, G.current?.abort());
|
|
567
|
+
}, [
|
|
568
|
+
N,
|
|
569
|
+
d,
|
|
570
|
+
q
|
|
571
|
+
]), me = C.useCallback((e) => {
|
|
572
|
+
k === void 0 && ue(e), D?.(e), N && (I(""), H(null));
|
|
573
|
+
}, [
|
|
574
|
+
N,
|
|
575
|
+
D,
|
|
576
|
+
k
|
|
577
|
+
]), Z = C.useCallback((e, t) => {
|
|
578
|
+
N && (I(e), t.reason !== "item-press" && e.trim() === "" && !y && (G.current?.abort(), P([]), U(!1), H(null), R(!1), B(!1), W.current = 1));
|
|
579
|
+
}, [y, N]), he = C.useCallback((e) => {
|
|
580
|
+
if (!N || !oe || L || z) return;
|
|
581
|
+
let t = e.currentTarget;
|
|
582
|
+
t.scrollHeight - t.scrollTop - t.clientHeight <= S && X(Y, W.current + 1, !0);
|
|
583
|
+
}, [
|
|
584
|
+
oe,
|
|
585
|
+
N,
|
|
586
|
+
z,
|
|
587
|
+
L,
|
|
588
|
+
X,
|
|
589
|
+
S,
|
|
590
|
+
Y
|
|
591
|
+
]), Q = C.useMemo(() => N ? L ? /* @__PURE__ */ E("span", {
|
|
592
|
+
className: "inline-flex items-center justify-center gap-2",
|
|
593
|
+
children: [/* @__PURE__ */ T(ee, {}), b]
|
|
594
|
+
}) : V || (Y === "" && !y ? (d ? (q?.length ?? 0) > 0 : q) ? null : x : null) : null, [
|
|
595
|
+
y,
|
|
596
|
+
N,
|
|
597
|
+
L,
|
|
598
|
+
b,
|
|
599
|
+
d,
|
|
600
|
+
V,
|
|
601
|
+
x,
|
|
602
|
+
q,
|
|
603
|
+
Y
|
|
604
|
+
]);
|
|
605
|
+
return /* @__PURE__ */ T(Ge, {
|
|
606
|
+
label: o,
|
|
607
|
+
helperText: s,
|
|
608
|
+
error: c,
|
|
609
|
+
className: e("w-full", g),
|
|
610
|
+
children: /* @__PURE__ */ E(De, {
|
|
611
|
+
items: de,
|
|
612
|
+
multiple: d,
|
|
613
|
+
disabled: u,
|
|
614
|
+
modal: w,
|
|
615
|
+
isItemEqualToValue: (e, t) => e?.value === t?.value,
|
|
616
|
+
...M,
|
|
617
|
+
filter: N ? null : void 0,
|
|
618
|
+
open: j,
|
|
619
|
+
defaultValue: A,
|
|
620
|
+
value: k,
|
|
621
|
+
onOpenChange: fe,
|
|
622
|
+
onOpenChangeComplete: pe,
|
|
623
|
+
onInputValueChange: N ? Z : void 0,
|
|
624
|
+
onValueChange: me,
|
|
625
|
+
children: [d ? /* @__PURE__ */ E(Ve, {
|
|
626
|
+
ref: ie,
|
|
627
|
+
className: e("w-full", _),
|
|
628
|
+
children: [i ? /* @__PURE__ */ T("span", {
|
|
629
|
+
"data-icon": "inline-start",
|
|
630
|
+
className: "contents text-muted-foreground [&>svg:not([class*='size-'])]:size-4",
|
|
631
|
+
children: i
|
|
632
|
+
}) : null, /* @__PURE__ */ T(Oe, { children: (e) => {
|
|
633
|
+
let t = e ?? [];
|
|
634
|
+
return /* @__PURE__ */ E(C.Fragment, { children: [h ? t.map((e) => /* @__PURE__ */ T(He, { children: e.label }, e.value)) : t.length > 0 ? /* @__PURE__ */ E("span", {
|
|
635
|
+
className: "text-sm text-muted-foreground",
|
|
636
|
+
children: [t.length, " selected"]
|
|
637
|
+
}) : null, /* @__PURE__ */ T(Ue, {
|
|
638
|
+
placeholder: t.length > 0 ? "" : r || o,
|
|
639
|
+
disabled: u
|
|
640
|
+
})] });
|
|
641
|
+
} })]
|
|
642
|
+
}) : /* @__PURE__ */ T(je, {
|
|
643
|
+
placeholder: r || o,
|
|
644
|
+
showTrigger: p,
|
|
645
|
+
showClear: m,
|
|
646
|
+
disabled: u,
|
|
647
|
+
className: _,
|
|
648
|
+
children: i ? /* @__PURE__ */ T(f, {
|
|
649
|
+
align: "inline-start",
|
|
650
|
+
children: i
|
|
651
|
+
}) : null
|
|
652
|
+
}), /* @__PURE__ */ E(Me, {
|
|
653
|
+
anchor: d ? ie : void 0,
|
|
654
|
+
className: te,
|
|
655
|
+
"aria-busy": N && (L || z) ? !0 : void 0,
|
|
656
|
+
children: [
|
|
657
|
+
N ? /* @__PURE__ */ T(ze, { children: Q }) : null,
|
|
658
|
+
/* @__PURE__ */ T(Re, { children: l }),
|
|
659
|
+
/* @__PURE__ */ E(Ne, {
|
|
660
|
+
onScroll: N ? he : void 0,
|
|
661
|
+
children: [/* @__PURE__ */ E(Fe, { children: [a ? /* @__PURE__ */ T(Ie, { children: a }) : null, /* @__PURE__ */ T(Le, { children: (e) => /* @__PURE__ */ T(Je, { option: e }) })] }), N && z ? /* @__PURE__ */ E("div", {
|
|
662
|
+
className: "flex items-center justify-center gap-2 py-2 text-sm text-muted-foreground",
|
|
663
|
+
children: [/* @__PURE__ */ T(ee, {}), re]
|
|
664
|
+
}) : null]
|
|
665
|
+
})
|
|
666
|
+
]
|
|
667
|
+
})]
|
|
668
|
+
})
|
|
669
|
+
});
|
|
670
|
+
};
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region src/components/ui/calendar.tsx
|
|
673
|
+
function Xe({ className: t, classNames: n, showOutsideDays: r = !0, captionLayout: a = "label", buttonVariant: o = "ghost", locale: s, formatters: c, components: l, ...u }) {
|
|
674
|
+
let d = A();
|
|
675
|
+
return /* @__PURE__ */ T(k, {
|
|
676
|
+
showOutsideDays: r,
|
|
677
|
+
className: e("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, t),
|
|
678
|
+
captionLayout: a,
|
|
679
|
+
locale: s,
|
|
680
|
+
formatters: {
|
|
681
|
+
formatMonthDropdown: (e) => e.toLocaleString(s?.code, { month: "short" }),
|
|
682
|
+
...c
|
|
683
|
+
},
|
|
684
|
+
classNames: {
|
|
685
|
+
root: e("w-fit", d.root),
|
|
686
|
+
months: e("relative flex flex-col gap-4 md:flex-row", d.months),
|
|
687
|
+
month: e("flex w-full flex-col gap-4", d.month),
|
|
688
|
+
nav: e("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", d.nav),
|
|
689
|
+
button_previous: e(i({ variant: o }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", d.button_previous),
|
|
690
|
+
button_next: e(i({ variant: o }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", d.button_next),
|
|
691
|
+
month_caption: e("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", d.month_caption),
|
|
692
|
+
dropdowns: e("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", d.dropdowns),
|
|
693
|
+
dropdown_root: e("relative rounded-(--cell-radius)", d.dropdown_root),
|
|
694
|
+
dropdown: e("absolute inset-0 bg-popover opacity-0", d.dropdown),
|
|
695
|
+
caption_label: e("font-medium select-none", a === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", d.caption_label),
|
|
696
|
+
table: "w-full border-collapse",
|
|
697
|
+
weekdays: e("flex", d.weekdays),
|
|
698
|
+
weekday: e("flex-1 rounded-(--cell-radius) text-xs font-normal text-muted-foreground select-none", d.weekday),
|
|
699
|
+
week: e("mt-2 flex w-full", d.week),
|
|
700
|
+
week_number_header: e("w-(--cell-size) select-none", d.week_number_header),
|
|
701
|
+
week_number: e("text-xs text-muted-foreground select-none", d.week_number),
|
|
702
|
+
day: e("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", u.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", d.day),
|
|
703
|
+
range_start: e("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", d.range_start),
|
|
704
|
+
range_middle: e("rounded-none", d.range_middle),
|
|
705
|
+
range_end: e("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", d.range_end),
|
|
706
|
+
today: e("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", d.today),
|
|
707
|
+
outside: e("text-muted-foreground aria-selected:text-muted-foreground", d.outside),
|
|
708
|
+
disabled: e("text-muted-foreground opacity-50", d.disabled),
|
|
709
|
+
hidden: e("invisible", d.hidden),
|
|
710
|
+
...n
|
|
711
|
+
},
|
|
712
|
+
components: {
|
|
713
|
+
Root: ({ className: t, rootRef: n, ...r }) => /* @__PURE__ */ T("div", {
|
|
714
|
+
"data-slot": "calendar",
|
|
715
|
+
ref: n,
|
|
716
|
+
className: e(t),
|
|
717
|
+
...r
|
|
718
|
+
}),
|
|
719
|
+
Chevron: ({ className: t, orientation: n, ...r }) => T(n === "left" ? v : n === "right" ? ne : te, {
|
|
720
|
+
className: e("size-4", t),
|
|
721
|
+
...r
|
|
722
|
+
}),
|
|
723
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ T(Ze, {
|
|
724
|
+
locale: s,
|
|
725
|
+
...e
|
|
726
|
+
}),
|
|
727
|
+
WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ T("td", {
|
|
728
|
+
...t,
|
|
729
|
+
children: /* @__PURE__ */ T("div", {
|
|
730
|
+
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
731
|
+
children: e
|
|
732
|
+
})
|
|
733
|
+
}),
|
|
734
|
+
...l
|
|
735
|
+
},
|
|
736
|
+
...u
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
function Ze({ className: t, day: r, modifiers: i, locale: a, ...o }) {
|
|
740
|
+
let s = A(), c = S.useRef(null);
|
|
741
|
+
return S.useEffect(() => {
|
|
742
|
+
i.focused && c.current?.focus();
|
|
743
|
+
}, [i.focused]), /* @__PURE__ */ T(n, {
|
|
744
|
+
ref: c,
|
|
745
|
+
variant: "ghost",
|
|
746
|
+
size: "icon",
|
|
747
|
+
"data-day": r.date.toLocaleDateString(a?.code),
|
|
748
|
+
"data-selected-single": i.selected && !i.range_start && !i.range_end && !i.range_middle,
|
|
749
|
+
"data-range-start": i.range_start,
|
|
750
|
+
"data-range-end": i.range_end,
|
|
751
|
+
"data-range-middle": i.range_middle,
|
|
752
|
+
className: e("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", s.day, t),
|
|
753
|
+
...o
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
//#endregion
|
|
757
|
+
//#region src/components/ui/carousel.tsx
|
|
758
|
+
var Qe = S.createContext(null);
|
|
759
|
+
function $() {
|
|
760
|
+
let e = S.useContext(Qe);
|
|
761
|
+
if (!e) throw Error("useCarousel must be used within a <Carousel />");
|
|
762
|
+
return e;
|
|
763
|
+
}
|
|
764
|
+
function $e({ orientation: t = "horizontal", opts: n, setApi: r, plugins: i, className: a, children: o, ...s }) {
|
|
765
|
+
let [c, l] = j({
|
|
766
|
+
...n,
|
|
767
|
+
axis: t === "horizontal" ? "x" : "y"
|
|
768
|
+
}, i), [u, d] = S.useState(!1), [f, p] = S.useState(!1), m = S.useCallback((e) => {
|
|
769
|
+
e && (d(e.canScrollPrev()), p(e.canScrollNext()));
|
|
770
|
+
}, []), h = S.useCallback(() => {
|
|
771
|
+
l?.scrollPrev();
|
|
772
|
+
}, [l]), g = S.useCallback(() => {
|
|
773
|
+
l?.scrollNext();
|
|
774
|
+
}, [l]), ee = S.useCallback((e) => {
|
|
775
|
+
e.key === "ArrowLeft" ? (e.preventDefault(), h()) : e.key === "ArrowRight" && (e.preventDefault(), g());
|
|
776
|
+
}, [h, g]);
|
|
777
|
+
return S.useEffect(() => {
|
|
778
|
+
!l || !r || r(l);
|
|
779
|
+
}, [l, r]), S.useEffect(() => {
|
|
780
|
+
if (l) return m(l), l.on("reInit", m), l.on("select", m), () => {
|
|
781
|
+
l?.off("select", m);
|
|
782
|
+
};
|
|
783
|
+
}, [l, m]), /* @__PURE__ */ T(Qe.Provider, {
|
|
784
|
+
value: {
|
|
785
|
+
carouselRef: c,
|
|
786
|
+
api: l,
|
|
787
|
+
opts: n,
|
|
788
|
+
orientation: t || (n?.axis === "y" ? "vertical" : "horizontal"),
|
|
789
|
+
scrollPrev: h,
|
|
790
|
+
scrollNext: g,
|
|
791
|
+
canScrollPrev: u,
|
|
792
|
+
canScrollNext: f
|
|
793
|
+
},
|
|
794
|
+
children: /* @__PURE__ */ T("div", {
|
|
795
|
+
onKeyDownCapture: ee,
|
|
796
|
+
className: e("relative", a),
|
|
797
|
+
role: "region",
|
|
798
|
+
"aria-roledescription": "carousel",
|
|
799
|
+
"data-slot": "carousel",
|
|
800
|
+
...s,
|
|
801
|
+
children: o
|
|
802
|
+
})
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
function et({ className: t, ...n }) {
|
|
806
|
+
let { carouselRef: r, orientation: i } = $();
|
|
807
|
+
return /* @__PURE__ */ T("div", {
|
|
808
|
+
ref: r,
|
|
809
|
+
className: "overflow-hidden",
|
|
810
|
+
"data-slot": "carousel-content",
|
|
811
|
+
children: /* @__PURE__ */ T("div", {
|
|
812
|
+
className: e("flex", i === "horizontal" ? "-ml-4" : "-mt-4 flex-col", t),
|
|
813
|
+
...n
|
|
814
|
+
})
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
function tt({ className: t, ...n }) {
|
|
818
|
+
let { orientation: r } = $();
|
|
819
|
+
return /* @__PURE__ */ T("div", {
|
|
820
|
+
role: "group",
|
|
821
|
+
"aria-roledescription": "slide",
|
|
822
|
+
"data-slot": "carousel-item",
|
|
823
|
+
className: e("min-w-0 shrink-0 grow-0 basis-full", r === "horizontal" ? "pl-4" : "pt-4", t),
|
|
824
|
+
...n
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function nt({ className: t, variant: r = "outline", size: i = "icon-sm", ...a }) {
|
|
828
|
+
let { orientation: o, scrollPrev: s, canScrollPrev: c } = $();
|
|
829
|
+
return /* @__PURE__ */ E(n, {
|
|
830
|
+
"data-slot": "carousel-previous",
|
|
831
|
+
variant: r,
|
|
832
|
+
size: i,
|
|
833
|
+
className: e("absolute touch-manipulation rounded-full", o === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", t),
|
|
834
|
+
disabled: !c,
|
|
835
|
+
onClick: s,
|
|
836
|
+
...a,
|
|
837
|
+
children: [/* @__PURE__ */ T(v, {}), /* @__PURE__ */ T("span", {
|
|
838
|
+
className: "sr-only",
|
|
839
|
+
children: "Previous slide"
|
|
840
|
+
})]
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
function rt({ className: t, variant: r = "outline", size: i = "icon-sm", ...a }) {
|
|
844
|
+
let { orientation: o, scrollNext: s, canScrollNext: c } = $();
|
|
845
|
+
return /* @__PURE__ */ E(n, {
|
|
846
|
+
"data-slot": "carousel-next",
|
|
847
|
+
variant: r,
|
|
848
|
+
size: i,
|
|
849
|
+
className: e("absolute touch-manipulation rounded-full", o === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", t),
|
|
850
|
+
disabled: !c,
|
|
851
|
+
onClick: s,
|
|
852
|
+
...a,
|
|
853
|
+
children: [/* @__PURE__ */ T(ne, {}), /* @__PURE__ */ T("span", {
|
|
854
|
+
className: "sr-only",
|
|
855
|
+
children: "Next slide"
|
|
856
|
+
})]
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
//#endregion
|
|
860
|
+
//#region src/components/ui/chart.tsx
|
|
861
|
+
var it = {
|
|
862
|
+
light: "",
|
|
863
|
+
dark: ".dark"
|
|
864
|
+
}, at = {
|
|
865
|
+
width: 320,
|
|
866
|
+
height: 200
|
|
867
|
+
}, ot = S.createContext(null);
|
|
868
|
+
function st() {
|
|
869
|
+
let e = S.useContext(ot);
|
|
870
|
+
if (!e) throw Error("useChart must be used within a <ChartContainer />");
|
|
871
|
+
return e;
|
|
872
|
+
}
|
|
873
|
+
function ct({ id: t, className: n, children: r, config: i, initialDimension: a = at, ...o }) {
|
|
874
|
+
let s = S.useId(), c = `chart-${t ?? s.replace(/:/g, "")}`;
|
|
875
|
+
return /* @__PURE__ */ T(ot.Provider, {
|
|
876
|
+
value: { config: i },
|
|
877
|
+
children: /* @__PURE__ */ E("div", {
|
|
878
|
+
"data-slot": "chart",
|
|
879
|
+
"data-chart": c,
|
|
880
|
+
className: e("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", n),
|
|
881
|
+
...o,
|
|
882
|
+
children: [/* @__PURE__ */ T(lt, {
|
|
883
|
+
id: c,
|
|
884
|
+
config: i
|
|
885
|
+
}), /* @__PURE__ */ T(x.ResponsiveContainer, {
|
|
886
|
+
initialDimension: a,
|
|
887
|
+
children: r
|
|
888
|
+
})]
|
|
889
|
+
})
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
var lt = ({ id: e, config: t }) => {
|
|
893
|
+
let n = Object.entries(t).filter(([, e]) => e.theme ?? e.color);
|
|
894
|
+
return n.length ? /* @__PURE__ */ T("style", { dangerouslySetInnerHTML: { __html: Object.entries(it).map(([t, r]) => `
|
|
895
|
+
${r} [data-chart=${e}] {
|
|
896
|
+
${n.map(([e, n]) => {
|
|
897
|
+
let r = n.theme?.[t] ?? n.color;
|
|
898
|
+
return r ? ` --color-${e}: ${r};` : null;
|
|
899
|
+
}).join("\n")}
|
|
900
|
+
}
|
|
901
|
+
`).join("\n") } }) : null;
|
|
902
|
+
}, ut = x.Tooltip;
|
|
903
|
+
function dt({ active: t, payload: n, className: r, indicator: i = "dot", hideLabel: a = !1, hideIndicator: o = !1, label: s, labelFormatter: c, labelClassName: l, formatter: u, color: d, nameKey: f, labelKey: p }) {
|
|
904
|
+
let { config: m } = st(), h = S.useMemo(() => {
|
|
905
|
+
if (a || !n?.length) return null;
|
|
906
|
+
let [t] = n, r = `${p ?? t?.dataKey ?? t?.name ?? "value"}`, i = mt(m, t, r), o = !p && typeof s == "string" ? m[s]?.label ?? s : i?.label;
|
|
907
|
+
return c ? /* @__PURE__ */ T("div", {
|
|
908
|
+
className: e("font-medium", l),
|
|
909
|
+
children: c(o, n)
|
|
910
|
+
}) : o ? /* @__PURE__ */ T("div", {
|
|
911
|
+
className: e("font-medium", l),
|
|
912
|
+
children: o
|
|
913
|
+
}) : null;
|
|
914
|
+
}, [
|
|
915
|
+
s,
|
|
916
|
+
c,
|
|
917
|
+
n,
|
|
918
|
+
a,
|
|
919
|
+
l,
|
|
920
|
+
m,
|
|
921
|
+
p
|
|
922
|
+
]);
|
|
923
|
+
if (!t || !n?.length) return null;
|
|
924
|
+
let g = n.length === 1 && i !== "dot";
|
|
925
|
+
return /* @__PURE__ */ E("div", {
|
|
926
|
+
className: e("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", r),
|
|
927
|
+
children: [g ? null : h, /* @__PURE__ */ T("div", {
|
|
928
|
+
className: "grid gap-1.5",
|
|
929
|
+
children: n.filter((e) => e.type !== "none").map((t, n) => {
|
|
930
|
+
let r = `${f ?? t.name ?? t.dataKey ?? "value"}`, a = mt(m, t, r), s = d ?? t.payload?.fill ?? t.color;
|
|
931
|
+
return /* @__PURE__ */ T("div", {
|
|
932
|
+
className: e("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", i === "dot" && "items-center"),
|
|
933
|
+
children: u && t?.value !== void 0 && t.name ? u(t.value, t.name, t, n, t.payload) : /* @__PURE__ */ E(w, { children: [a?.icon ? /* @__PURE__ */ T(a.icon, {}) : !o && /* @__PURE__ */ T("div", {
|
|
934
|
+
className: e("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
935
|
+
"h-2.5 w-2.5": i === "dot",
|
|
936
|
+
"w-1": i === "line",
|
|
937
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": i === "dashed",
|
|
938
|
+
"my-0.5": g && i === "dashed"
|
|
939
|
+
}),
|
|
940
|
+
style: {
|
|
941
|
+
"--color-bg": s,
|
|
942
|
+
"--color-border": s
|
|
943
|
+
}
|
|
944
|
+
}), /* @__PURE__ */ E("div", {
|
|
945
|
+
className: e("flex flex-1 justify-between leading-none", g ? "items-end" : "items-center"),
|
|
946
|
+
children: [/* @__PURE__ */ E("div", {
|
|
947
|
+
className: "grid gap-1.5",
|
|
948
|
+
children: [g ? h : null, /* @__PURE__ */ T("span", {
|
|
949
|
+
className: "text-muted-foreground",
|
|
950
|
+
children: a?.label ?? t.name
|
|
951
|
+
})]
|
|
952
|
+
}), t.value != null && /* @__PURE__ */ T("span", {
|
|
953
|
+
className: "font-mono font-medium text-foreground tabular-nums",
|
|
954
|
+
children: typeof t.value == "number" ? t.value.toLocaleString() : String(t.value)
|
|
955
|
+
})]
|
|
956
|
+
})] })
|
|
957
|
+
}, n);
|
|
958
|
+
})
|
|
959
|
+
})]
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
var ft = x.Legend;
|
|
963
|
+
function pt({ className: t, hideIcon: n = !1, payload: r, verticalAlign: i = "bottom", nameKey: a }) {
|
|
964
|
+
let { config: o } = st();
|
|
965
|
+
return r?.length ? /* @__PURE__ */ T("div", {
|
|
966
|
+
className: e("flex items-center justify-center gap-4", i === "top" ? "pb-3" : "pt-3", t),
|
|
967
|
+
children: r.filter((e) => e.type !== "none").map((t, r) => {
|
|
968
|
+
let i = `${a ?? t.dataKey ?? "value"}`, s = mt(o, t, i);
|
|
969
|
+
return /* @__PURE__ */ E("div", {
|
|
970
|
+
className: e("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
|
|
971
|
+
children: [s?.icon && !n ? /* @__PURE__ */ T(s.icon, {}) : /* @__PURE__ */ T("div", {
|
|
972
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
973
|
+
style: { backgroundColor: t.color }
|
|
974
|
+
}), s?.label]
|
|
975
|
+
}, r);
|
|
976
|
+
})
|
|
977
|
+
}) : null;
|
|
978
|
+
}
|
|
979
|
+
function mt(e, t, n) {
|
|
980
|
+
if (typeof t != "object" || !t) return;
|
|
981
|
+
let r = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, i = n;
|
|
982
|
+
return n in t && typeof t[n] == "string" ? i = t[n] : r && n in r && typeof r[n] == "string" && (i = r[n]), i in e ? e[i] : e[n];
|
|
983
|
+
}
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region src/components/ui/command.tsx
|
|
986
|
+
function ht({ className: t, ...n }) {
|
|
987
|
+
return /* @__PURE__ */ T(M, {
|
|
988
|
+
"data-slot": "command",
|
|
989
|
+
className: e("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground", t),
|
|
990
|
+
...n
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
function gt({ title: t = "Command Palette", description: n = "Search for a command to run...", children: r, className: i, showCloseButton: a = !1, ...l }) {
|
|
994
|
+
return /* @__PURE__ */ E(s, {
|
|
995
|
+
...l,
|
|
996
|
+
children: [/* @__PURE__ */ E(o, {
|
|
997
|
+
className: "sr-only",
|
|
998
|
+
children: [/* @__PURE__ */ T(g, { children: t }), /* @__PURE__ */ T(c, { children: n })]
|
|
999
|
+
}), /* @__PURE__ */ T(d, {
|
|
1000
|
+
className: e("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0", i),
|
|
1001
|
+
showCloseButton: a,
|
|
1002
|
+
children: r
|
|
1003
|
+
})]
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
function _t({ className: t, ...n }) {
|
|
1007
|
+
return /* @__PURE__ */ T("div", {
|
|
1008
|
+
"data-slot": "command-input-wrapper",
|
|
1009
|
+
className: "p-1 pb-0",
|
|
1010
|
+
children: /* @__PURE__ */ E(m, {
|
|
1011
|
+
className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
|
|
1012
|
+
children: [/* @__PURE__ */ T(M.Input, {
|
|
1013
|
+
"data-slot": "command-input",
|
|
1014
|
+
className: e("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
1015
|
+
...n
|
|
1016
|
+
}), /* @__PURE__ */ T(f, { children: /* @__PURE__ */ T(b, { className: "size-4 shrink-0 opacity-50" }) })]
|
|
1017
|
+
})
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function vt({ className: t, ...n }) {
|
|
1021
|
+
return /* @__PURE__ */ T(M.List, {
|
|
1022
|
+
"data-slot": "command-list",
|
|
1023
|
+
className: e("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", t),
|
|
1024
|
+
...n
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
function yt({ className: t, ...n }) {
|
|
1028
|
+
return /* @__PURE__ */ T(M.Empty, {
|
|
1029
|
+
"data-slot": "command-empty",
|
|
1030
|
+
className: e("py-6 text-center text-sm", t),
|
|
1031
|
+
...n
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
function bt({ className: t, ...n }) {
|
|
1035
|
+
return /* @__PURE__ */ T(M.Group, {
|
|
1036
|
+
"data-slot": "command-group",
|
|
1037
|
+
className: e("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", t),
|
|
1038
|
+
...n
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
function xt({ className: t, ...n }) {
|
|
1042
|
+
return /* @__PURE__ */ T(M.Separator, {
|
|
1043
|
+
"data-slot": "command-separator",
|
|
1044
|
+
className: e("-mx-1 h-px bg-border", t),
|
|
1045
|
+
...n
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
function St({ className: t, children: n, ...r }) {
|
|
1049
|
+
return /* @__PURE__ */ E(M.Item, {
|
|
1050
|
+
"data-slot": "command-item",
|
|
1051
|
+
className: e("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground", t),
|
|
1052
|
+
...r,
|
|
1053
|
+
children: [n, /* @__PURE__ */ T(_, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })]
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
function Ct({ className: t, ...n }) {
|
|
1057
|
+
return /* @__PURE__ */ T("span", {
|
|
1058
|
+
"data-slot": "command-shortcut",
|
|
1059
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", t),
|
|
1060
|
+
...n
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
//#endregion
|
|
1064
|
+
//#region src/components/ui/drawer.tsx
|
|
1065
|
+
function wt({ ...e }) {
|
|
1066
|
+
return /* @__PURE__ */ T(N.Root, {
|
|
1067
|
+
"data-slot": "drawer",
|
|
1068
|
+
...e
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
function Tt({ ...e }) {
|
|
1072
|
+
return /* @__PURE__ */ T(N.Trigger, {
|
|
1073
|
+
"data-slot": "drawer-trigger",
|
|
1074
|
+
...e
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
function Et({ ...e }) {
|
|
1078
|
+
return /* @__PURE__ */ T(N.Portal, {
|
|
1079
|
+
"data-slot": "drawer-portal",
|
|
1080
|
+
...e
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
function Dt({ ...e }) {
|
|
1084
|
+
return /* @__PURE__ */ T(N.Close, {
|
|
1085
|
+
"data-slot": "drawer-close",
|
|
1086
|
+
...e
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
function Ot({ className: t, ...n }) {
|
|
1090
|
+
return /* @__PURE__ */ T(N.Overlay, {
|
|
1091
|
+
"data-slot": "drawer-overlay",
|
|
1092
|
+
className: e("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", t),
|
|
1093
|
+
...n
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
function kt({ className: t, children: n, style: i, ...a }) {
|
|
1097
|
+
let o = r();
|
|
1098
|
+
return /* @__PURE__ */ E(Et, {
|
|
1099
|
+
"data-slot": "drawer-portal",
|
|
1100
|
+
children: [/* @__PURE__ */ T(Ot, {}), /* @__PURE__ */ E(N.Content, {
|
|
1101
|
+
"data-slot": "drawer-content",
|
|
1102
|
+
style: {
|
|
1103
|
+
...o.style,
|
|
1104
|
+
...i
|
|
1105
|
+
},
|
|
1106
|
+
className: e(o.className, "group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", t),
|
|
1107
|
+
...a,
|
|
1108
|
+
children: [/* @__PURE__ */ T("div", { className: "mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), n]
|
|
1109
|
+
})]
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
function At({ className: t, ...n }) {
|
|
1113
|
+
return /* @__PURE__ */ T("div", {
|
|
1114
|
+
"data-slot": "drawer-header",
|
|
1115
|
+
className: e("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left", t),
|
|
1116
|
+
...n
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
function jt({ className: t, ...n }) {
|
|
1120
|
+
return /* @__PURE__ */ T("div", {
|
|
1121
|
+
"data-slot": "drawer-footer",
|
|
1122
|
+
className: e("mt-auto flex flex-col gap-2 p-4", t),
|
|
1123
|
+
...n
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
function Mt({ className: t, ...n }) {
|
|
1127
|
+
return /* @__PURE__ */ T(N.Title, {
|
|
1128
|
+
"data-slot": "drawer-title",
|
|
1129
|
+
className: e("font-heading text-base font-medium text-foreground", t),
|
|
1130
|
+
...n
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
function Nt({ className: t, ...n }) {
|
|
1134
|
+
return /* @__PURE__ */ T(N.Description, {
|
|
1135
|
+
"data-slot": "drawer-description",
|
|
1136
|
+
className: e("text-sm text-muted-foreground", t),
|
|
1137
|
+
...n
|
|
1138
|
+
});
|
|
1139
|
+
}
|
|
1140
|
+
//#endregion
|
|
1141
|
+
//#region src/components/ui/input-otp.tsx
|
|
1142
|
+
function Pt({ className: t, containerClassName: n, ...r }) {
|
|
1143
|
+
return /* @__PURE__ */ T(ie, {
|
|
1144
|
+
"data-slot": "input-otp",
|
|
1145
|
+
containerClassName: e("cn-input-otp flex items-center has-disabled:opacity-50", n),
|
|
1146
|
+
spellCheck: !1,
|
|
1147
|
+
className: e("disabled:cursor-not-allowed", t),
|
|
1148
|
+
...r
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
function Ft({ className: t, ...n }) {
|
|
1152
|
+
return /* @__PURE__ */ T("div", {
|
|
1153
|
+
"data-slot": "input-otp-group",
|
|
1154
|
+
className: e("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", t),
|
|
1155
|
+
...n
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
function It({ index: t, className: n, ...r }) {
|
|
1159
|
+
let { char: i, hasFakeCaret: a, isActive: o } = S.useContext(ae)?.slots[t] ?? {};
|
|
1160
|
+
return /* @__PURE__ */ E("div", {
|
|
1161
|
+
"data-slot": "input-otp-slot",
|
|
1162
|
+
"data-active": o,
|
|
1163
|
+
className: e("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", n),
|
|
1164
|
+
...r,
|
|
1165
|
+
children: [i, a && /* @__PURE__ */ T("div", {
|
|
1166
|
+
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
1167
|
+
children: /* @__PURE__ */ T("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
|
|
1168
|
+
})]
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
function Lt({ ...e }) {
|
|
1172
|
+
return /* @__PURE__ */ T("div", {
|
|
1173
|
+
"data-slot": "input-otp-separator",
|
|
1174
|
+
className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
|
|
1175
|
+
role: "separator",
|
|
1176
|
+
...e,
|
|
1177
|
+
children: /* @__PURE__ */ T(y, {})
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
//#endregion
|
|
1181
|
+
export { ze as $, $e as A, He as B, Ct as C, lt as D, pt as E, $ as F, Re as G, Ue as H, Xe as I, je as J, Ge as K, Ze as L, tt as M, rt as N, ut as O, nt as P, Be as Q, Ye as R, xt as S, ft as T, Le as U, Ve as V, Me as W, Ie as X, Pe as Y, Ne as Z, yt as _, wt as a, St as b, Nt as c, Ot as d, ke as et, Et as f, gt as g, ht as h, It as i, et as j, dt as k, jt as l, Tt as m, Ft as n, We as nt, Dt as o, Mt as p, Fe as q, Lt as r, kt as s, Pt as t, Oe as tt, At as u, bt as v, ct as w, vt as x, _t as y, De as z };
|