opsfuse-ui 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts +41 -3
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/core.js +3 -3
- package/dist/extended.js +2 -2
- package/dist/index.js +54 -54
- package/dist/input-group-BUy6rpQX.js +830 -0
- package/dist/{input-otp-BLC5gRJ_.js → input-otp-BVj0dmTF.js} +299 -299
- package/dist/style.css +1 -1
- package/dist/{toggle-group-DQGHlv1Q.js → toggle-group-CU4v7h-z.js} +1323 -1480
- package/package.json +1 -1
- package/dist/input-group-DWq_2G-K.js +0 -551
package/package.json
CHANGED
|
@@ -1,551 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Loader2Icon as e, XIcon as t } from "lucide-react";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import { cloneElement as r } from "react";
|
|
5
|
-
import { clsx as i } from "clsx";
|
|
6
|
-
import { twMerge as a } from "tailwind-merge";
|
|
7
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import { cva as l } from "class-variance-authority";
|
|
9
|
-
import { Dialog as u, Label as d, Slot as f } from "radix-ui";
|
|
10
|
-
import { Toaster as p, toast as m } from "sonner";
|
|
11
|
-
//#region src/lib/utils.ts
|
|
12
|
-
function h(...e) {
|
|
13
|
-
return a(i(e));
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/components/ui/spinner.tsx
|
|
17
|
-
function g({ className: t, ...n }) {
|
|
18
|
-
return /* @__PURE__ */ s(e, {
|
|
19
|
-
role: "status",
|
|
20
|
-
"aria-label": "Loading",
|
|
21
|
-
className: h("size-4 animate-spin", t),
|
|
22
|
-
...n
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/components/ui/button.tsx
|
|
27
|
-
var _ = l("cursor-pointer group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
28
|
-
variants: {
|
|
29
|
-
motion: {
|
|
30
|
-
default: "transition-all",
|
|
31
|
-
micro: "transition-micro",
|
|
32
|
-
smooth: "transition-smooth",
|
|
33
|
-
data: "transition-data"
|
|
34
|
-
},
|
|
35
|
-
variant: {
|
|
36
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
37
|
-
outline: "border-border text-foreground/90 bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
38
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
39
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
40
|
-
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
41
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
42
|
-
},
|
|
43
|
-
size: {
|
|
44
|
-
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
45
|
-
xs: "h-6 gap-1 rounded-sm px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
46
|
-
sm: "h-8 gap-1 rounded-md px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
47
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
48
|
-
icon: "size-9",
|
|
49
|
-
"icon-xs": "size-6 rounded-sm in-data-[slot=button-group]:rounded-sm [&_svg:not([class*='size-'])]:size-3",
|
|
50
|
-
"icon-sm": "size-8 rounded-md in-data-[slot=button-group]:rounded-md",
|
|
51
|
-
"icon-lg": "size-10"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
defaultVariants: {
|
|
55
|
-
motion: "default",
|
|
56
|
-
variant: "default",
|
|
57
|
-
size: "default"
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
function v({ className: e, variant: t = "default", size: n = "default", motion: r = "default", asChild: i = !1, loading: a = !1, loadingText: o = "Loading...", ...l }) {
|
|
61
|
-
let u = i ? f.Root : "button";
|
|
62
|
-
return /* @__PURE__ */ s(u, {
|
|
63
|
-
"data-slot": "button",
|
|
64
|
-
"data-variant": t,
|
|
65
|
-
"data-size": n,
|
|
66
|
-
"data-motion": r,
|
|
67
|
-
className: h(_({
|
|
68
|
-
variant: t,
|
|
69
|
-
size: n,
|
|
70
|
-
motion: r
|
|
71
|
-
}), e),
|
|
72
|
-
...l,
|
|
73
|
-
children: a ? /* @__PURE__ */ c("div", {
|
|
74
|
-
className: "flex items-center gap-2",
|
|
75
|
-
children: [/* @__PURE__ */ s(g, { className: "size-4 animate-spin" }), o]
|
|
76
|
-
}) : l.children
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/lib/brand-theme.ts
|
|
81
|
-
var y = [
|
|
82
|
-
"recruitsmartly",
|
|
83
|
-
"skillready",
|
|
84
|
-
"worklog",
|
|
85
|
-
"verity",
|
|
86
|
-
"lms"
|
|
87
|
-
], ee = "recruitsmartly";
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/lib/document-dark-mode.ts
|
|
90
|
-
function b() {
|
|
91
|
-
if (typeof document > "u") return !1;
|
|
92
|
-
let e = document.documentElement;
|
|
93
|
-
return e.classList.contains("dark") || e.getAttribute("data-theme") === "dark" || e.getAttribute("data-mode") === "dark" || e.getAttribute("data-color-mode") === "dark" || e.classList.contains("theme-dark") || (document.body?.classList.contains("dark") ?? !1);
|
|
94
|
-
}
|
|
95
|
-
function x() {
|
|
96
|
-
let [e, t] = n.useState(() => typeof document > "u" ? !1 : b());
|
|
97
|
-
return n.useEffect(() => {
|
|
98
|
-
let e = () => t(b());
|
|
99
|
-
e();
|
|
100
|
-
let n = new MutationObserver(e);
|
|
101
|
-
return n.observe(document.documentElement, {
|
|
102
|
-
attributes: !0,
|
|
103
|
-
attributeFilter: [
|
|
104
|
-
"class",
|
|
105
|
-
"data-theme",
|
|
106
|
-
"data-mode",
|
|
107
|
-
"data-color-mode"
|
|
108
|
-
]
|
|
109
|
-
}), document.body && n.observe(document.body, {
|
|
110
|
-
attributes: !0,
|
|
111
|
-
attributeFilter: ["class"]
|
|
112
|
-
}), () => n.disconnect();
|
|
113
|
-
}, []), e;
|
|
114
|
-
}
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region src/lib/theme-scope.ts
|
|
117
|
-
var S = "opsfuse-ui", C = {
|
|
118
|
-
"--color-background": "var(--background)",
|
|
119
|
-
"--color-foreground": "var(--foreground)",
|
|
120
|
-
"--color-card": "var(--card)",
|
|
121
|
-
"--color-card-foreground": "var(--card-foreground)",
|
|
122
|
-
"--color-popover": "var(--popover)",
|
|
123
|
-
"--color-popover-foreground": "var(--popover-foreground)",
|
|
124
|
-
"--color-muted": "var(--muted)",
|
|
125
|
-
"--color-muted-foreground": "var(--muted-foreground)",
|
|
126
|
-
"--color-accent": "var(--accent)",
|
|
127
|
-
"--color-accent-foreground": "var(--accent-foreground)",
|
|
128
|
-
"--color-secondary": "var(--secondary)",
|
|
129
|
-
"--color-secondary-foreground": "var(--secondary-foreground)",
|
|
130
|
-
"--color-subtle-foreground": "var(--subtle-foreground)",
|
|
131
|
-
"--color-disabled-foreground": "var(--disabled-foreground)",
|
|
132
|
-
"--color-text-disabled": "var(--disabled-foreground)",
|
|
133
|
-
"--color-text-input-placeholder": "var(--muted-foreground)",
|
|
134
|
-
"--color-primary": "var(--primary)",
|
|
135
|
-
"--color-primary-foreground": "var(--primary-foreground)",
|
|
136
|
-
"--color-primary-hover": "var(--primary-hover)",
|
|
137
|
-
"--color-primary-active": "var(--primary-active)",
|
|
138
|
-
"--color-primary-muted": "var(--primary-muted)",
|
|
139
|
-
"--color-primary-muted-hover": "var(--primary-muted-hover)",
|
|
140
|
-
"--color-primary-border": "var(--primary-border)",
|
|
141
|
-
"--color-primary-muted-foreground": "var(--primary-muted-foreground)",
|
|
142
|
-
"--color-ai": "var(--ai)",
|
|
143
|
-
"--color-ai-foreground": "var(--ai-foreground)",
|
|
144
|
-
"--color-ai-muted": "var(--ai-muted)",
|
|
145
|
-
"--color-ai-muted-hover": "var(--ai-muted-hover)",
|
|
146
|
-
"--color-ai-border": "var(--ai-border)",
|
|
147
|
-
"--color-ai-muted-foreground": "var(--ai-muted-foreground)",
|
|
148
|
-
"--color-success": "var(--success)",
|
|
149
|
-
"--color-success-foreground": "var(--success-foreground)",
|
|
150
|
-
"--color-success-muted": "var(--success-muted)",
|
|
151
|
-
"--color-success-border": "var(--success-border)",
|
|
152
|
-
"--color-success-muted-foreground": "var(--success-muted-foreground)",
|
|
153
|
-
"--color-warning": "var(--warning)",
|
|
154
|
-
"--color-warning-foreground": "var(--warning-foreground)",
|
|
155
|
-
"--color-warning-muted": "var(--warning-muted)",
|
|
156
|
-
"--color-warning-border": "var(--warning-border)",
|
|
157
|
-
"--color-warning-muted-foreground": "var(--warning-muted-foreground)",
|
|
158
|
-
"--color-destructive": "var(--destructive)",
|
|
159
|
-
"--color-destructive-foreground": "var(--destructive-foreground)",
|
|
160
|
-
"--color-destructive-muted": "var(--destructive-muted)",
|
|
161
|
-
"--color-destructive-border": "var(--destructive-border)",
|
|
162
|
-
"--color-destructive-muted-foreground": "var(--destructive-muted-foreground)",
|
|
163
|
-
"--color-info": "var(--info)",
|
|
164
|
-
"--color-info-foreground": "var(--info-foreground)",
|
|
165
|
-
"--color-info-muted": "var(--info-muted)",
|
|
166
|
-
"--color-info-border": "var(--info-border)",
|
|
167
|
-
"--color-info-muted-foreground": "var(--info-muted-foreground)",
|
|
168
|
-
"--color-border": "var(--border)",
|
|
169
|
-
"--color-border-subtle": "var(--border-subtle)",
|
|
170
|
-
"--color-border-strong": "var(--border-strong)",
|
|
171
|
-
"--color-input": "var(--input)",
|
|
172
|
-
"--color-ring": "var(--ring)",
|
|
173
|
-
"--color-sidebar": "var(--sidebar)",
|
|
174
|
-
"--color-sidebar-foreground": "var(--sidebar-foreground)",
|
|
175
|
-
"--color-sidebar-primary": "var(--sidebar-primary)",
|
|
176
|
-
"--color-sidebar-primary-foreground": "var(--sidebar-primary-foreground)",
|
|
177
|
-
"--color-sidebar-accent": "var(--sidebar-accent)",
|
|
178
|
-
"--color-sidebar-accent-foreground": "var(--sidebar-accent-foreground)",
|
|
179
|
-
"--color-sidebar-border": "var(--sidebar-border)",
|
|
180
|
-
"--color-sidebar-ring": "var(--sidebar-ring)",
|
|
181
|
-
"--color-score-excellent": "var(--score-excellent)",
|
|
182
|
-
"--color-score-good": "var(--score-good)",
|
|
183
|
-
"--color-score-average": "var(--score-average)",
|
|
184
|
-
"--color-score-below": "var(--score-below)",
|
|
185
|
-
"--color-score-poor": "var(--score-poor)",
|
|
186
|
-
"--color-chart-1": "var(--chart-1)",
|
|
187
|
-
"--color-chart-2": "var(--chart-2)",
|
|
188
|
-
"--color-chart-3": "var(--chart-3)",
|
|
189
|
-
"--color-chart-4": "var(--chart-4)",
|
|
190
|
-
"--color-chart-5": "var(--chart-5)",
|
|
191
|
-
"--color-chart-6": "var(--chart-6)",
|
|
192
|
-
"--color-chart-grid": "var(--chart-grid)",
|
|
193
|
-
"--color-chart-axis": "var(--chart-axis)"
|
|
194
|
-
}, w = n.createContext(null);
|
|
195
|
-
function te({ theme: e, children: t }) {
|
|
196
|
-
return /* @__PURE__ */ s(w.Provider, {
|
|
197
|
-
value: e,
|
|
198
|
-
children: t
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
function T() {
|
|
202
|
-
return n.useContext(w) ?? "recruitsmartly";
|
|
203
|
-
}
|
|
204
|
-
function E(e) {
|
|
205
|
-
return `brand-${e}`;
|
|
206
|
-
}
|
|
207
|
-
function D(e, t, n, r) {
|
|
208
|
-
return {
|
|
209
|
-
className: h(S, E(e), t && "dark", n),
|
|
210
|
-
style: {
|
|
211
|
-
...C,
|
|
212
|
-
...r
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
function O(e, t) {
|
|
217
|
-
return D(T(), x(), e, t);
|
|
218
|
-
}
|
|
219
|
-
//#endregion
|
|
220
|
-
//#region src/lib/portaled-layer.ts
|
|
221
|
-
var k = { zIndex: "var(--z-popover)" }, A = {
|
|
222
|
-
onWheel: (e) => {
|
|
223
|
-
e.stopPropagation();
|
|
224
|
-
},
|
|
225
|
-
onTouchMove: (e) => {
|
|
226
|
-
e.stopPropagation();
|
|
227
|
-
}
|
|
228
|
-
}, j = ["[data-slot=\"combobox-content\"]", "[data-slot=\"combobox-positioner\"]"].join(", "), M = [
|
|
229
|
-
j,
|
|
230
|
-
"[data-slot=\"combobox-list\"]",
|
|
231
|
-
"[data-slot=\"combobox-chips\"]",
|
|
232
|
-
"[data-slot=\"combobox-chip-input\"]",
|
|
233
|
-
"[data-popup-open]",
|
|
234
|
-
".combobox-pointer-field"
|
|
235
|
-
].join(", ");
|
|
236
|
-
function N(e) {
|
|
237
|
-
return e instanceof Element && !!e.closest(M);
|
|
238
|
-
}
|
|
239
|
-
function P(e) {
|
|
240
|
-
n.useEffect(() => {
|
|
241
|
-
if (!e) return;
|
|
242
|
-
let t = (e) => {
|
|
243
|
-
N(e.target) || e.preventDefault();
|
|
244
|
-
};
|
|
245
|
-
return document.addEventListener("wheel", t, {
|
|
246
|
-
passive: !1,
|
|
247
|
-
capture: !0
|
|
248
|
-
}), document.addEventListener("touchmove", t, {
|
|
249
|
-
passive: !1,
|
|
250
|
-
capture: !0
|
|
251
|
-
}), () => {
|
|
252
|
-
document.removeEventListener("wheel", t, { capture: !0 }), document.removeEventListener("touchmove", t, { capture: !0 });
|
|
253
|
-
};
|
|
254
|
-
}, [e]);
|
|
255
|
-
}
|
|
256
|
-
function F(e) {
|
|
257
|
-
return e instanceof Element && !!e.closest(j);
|
|
258
|
-
}
|
|
259
|
-
function ne(e) {
|
|
260
|
-
return F(e.detail.originalEvent.target);
|
|
261
|
-
}
|
|
262
|
-
function I() {
|
|
263
|
-
for (let e of document.querySelectorAll(j)) for (let t = e; t && t !== document.body; t = t.parentElement) t.getAttribute("aria-hidden") === "true" && t.removeAttribute("aria-hidden");
|
|
264
|
-
}
|
|
265
|
-
//#endregion
|
|
266
|
-
//#region src/components/ui/dialog.tsx
|
|
267
|
-
function L({ ...e }) {
|
|
268
|
-
return /* @__PURE__ */ s(u.Root, {
|
|
269
|
-
"data-slot": "dialog",
|
|
270
|
-
...e
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
function re({ ...e }) {
|
|
274
|
-
return /* @__PURE__ */ s(u.Trigger, {
|
|
275
|
-
"data-slot": "dialog-trigger",
|
|
276
|
-
...e
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
function R({ ...e }) {
|
|
280
|
-
return /* @__PURE__ */ s(u.Portal, {
|
|
281
|
-
"data-slot": "dialog-portal",
|
|
282
|
-
...e
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
function z({ ...e }) {
|
|
286
|
-
return /* @__PURE__ */ s(u.Close, {
|
|
287
|
-
"data-slot": "dialog-close",
|
|
288
|
-
...e
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
function B({ className: e, ...t }) {
|
|
292
|
-
return /* @__PURE__ */ s(u.Overlay, {
|
|
293
|
-
"data-slot": "dialog-overlay",
|
|
294
|
-
className: h("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", e),
|
|
295
|
-
...t
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
function V({ className: e, children: r, showCloseButton: i = !0, style: a, onPointerDownOutside: o, onFocusOutside: l, onInteractOutside: d, ...f }) {
|
|
299
|
-
let p = O(), m = n.useCallback((e, t) => {
|
|
300
|
-
if (ne(e)) {
|
|
301
|
-
e.preventDefault();
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
t?.(e);
|
|
305
|
-
}, []);
|
|
306
|
-
return n.useLayoutEffect(() => {
|
|
307
|
-
I();
|
|
308
|
-
let e = new MutationObserver(() => {
|
|
309
|
-
I();
|
|
310
|
-
});
|
|
311
|
-
return e.observe(document.body, {
|
|
312
|
-
subtree: !0,
|
|
313
|
-
attributes: !0,
|
|
314
|
-
attributeFilter: ["aria-hidden"]
|
|
315
|
-
}), () => e.disconnect();
|
|
316
|
-
}, []), /* @__PURE__ */ c(R, { children: [/* @__PURE__ */ s(B, {}), /* @__PURE__ */ c(u.Content, {
|
|
317
|
-
"data-slot": "dialog-content",
|
|
318
|
-
style: {
|
|
319
|
-
...p.style,
|
|
320
|
-
...a
|
|
321
|
-
},
|
|
322
|
-
className: h(p.className, "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md 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", e),
|
|
323
|
-
onPointerDownOutside: (e) => m(e, o),
|
|
324
|
-
onFocusOutside: (e) => m(e, l),
|
|
325
|
-
onInteractOutside: (e) => m(e, d),
|
|
326
|
-
...f,
|
|
327
|
-
children: [r, i && /* @__PURE__ */ s(u.Close, {
|
|
328
|
-
"data-slot": "dialog-close",
|
|
329
|
-
asChild: !0,
|
|
330
|
-
children: /* @__PURE__ */ c(v, {
|
|
331
|
-
variant: "ghost",
|
|
332
|
-
className: "absolute top-2 right-2",
|
|
333
|
-
size: "icon-sm",
|
|
334
|
-
children: [/* @__PURE__ */ s(t, {}), /* @__PURE__ */ s("span", {
|
|
335
|
-
className: "sr-only",
|
|
336
|
-
children: "Close"
|
|
337
|
-
})]
|
|
338
|
-
})
|
|
339
|
-
})]
|
|
340
|
-
})] });
|
|
341
|
-
}
|
|
342
|
-
function H({ className: e, ...t }) {
|
|
343
|
-
return /* @__PURE__ */ s("div", {
|
|
344
|
-
"data-slot": "dialog-header",
|
|
345
|
-
className: h("flex flex-col gap-2", e),
|
|
346
|
-
...t
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
function U({ className: e, showCloseButton: t = !1, children: n, ...r }) {
|
|
350
|
-
return /* @__PURE__ */ c("div", {
|
|
351
|
-
"data-slot": "dialog-footer",
|
|
352
|
-
className: h("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
353
|
-
...r,
|
|
354
|
-
children: [n, t && /* @__PURE__ */ s(u.Close, {
|
|
355
|
-
asChild: !0,
|
|
356
|
-
children: /* @__PURE__ */ s(v, {
|
|
357
|
-
variant: "outline",
|
|
358
|
-
children: "Close"
|
|
359
|
-
})
|
|
360
|
-
})]
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
function W({ className: e, ...t }) {
|
|
364
|
-
return /* @__PURE__ */ s(u.Title, {
|
|
365
|
-
"data-slot": "dialog-title",
|
|
366
|
-
className: h("font-heading text-base leading-none font-semibold", e),
|
|
367
|
-
...t
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
function G({ className: e, ...t }) {
|
|
371
|
-
return /* @__PURE__ */ s(u.Description, {
|
|
372
|
-
"data-slot": "dialog-description",
|
|
373
|
-
className: h("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
|
|
374
|
-
...t
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
var K = null;
|
|
378
|
-
function q(e) {
|
|
379
|
-
K?.(e);
|
|
380
|
-
}
|
|
381
|
-
function J({ children: e }) {
|
|
382
|
-
let [t, r] = n.useState(null);
|
|
383
|
-
n.useLayoutEffect(() => (K = (e) => r(e), () => {
|
|
384
|
-
K = null;
|
|
385
|
-
}), []);
|
|
386
|
-
let i = n.useCallback((e) => {
|
|
387
|
-
e || r((e) => (e && e.onClose?.(), null));
|
|
388
|
-
}, []);
|
|
389
|
-
return /* @__PURE__ */ c(o, { children: [e, t ? /* @__PURE__ */ s(L, {
|
|
390
|
-
open: !0,
|
|
391
|
-
onOpenChange: i,
|
|
392
|
-
children: /* @__PURE__ */ c(V, {
|
|
393
|
-
showCloseButton: t.showCloseButton ?? !0,
|
|
394
|
-
children: [/* @__PURE__ */ c(H, { children: [/* @__PURE__ */ s(W, { children: t.title }), /* @__PURE__ */ s(G, {
|
|
395
|
-
className: t.description ? void 0 : "sr-only",
|
|
396
|
-
children: t.description ?? t.title
|
|
397
|
-
})] }), t.children]
|
|
398
|
-
})
|
|
399
|
-
}) : null] });
|
|
400
|
-
}
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region src/components/ui/sonner.tsx
|
|
403
|
-
var Y = ({ style: e, className: t, ...n }) => {
|
|
404
|
-
let r = T(), i = x(), a = D(r, i);
|
|
405
|
-
return /* @__PURE__ */ s(p, {
|
|
406
|
-
theme: i ? "dark" : "light",
|
|
407
|
-
position: "bottom-right",
|
|
408
|
-
richColors: !0,
|
|
409
|
-
className: h("toaster group", a.className, t),
|
|
410
|
-
style: {
|
|
411
|
-
...a.style,
|
|
412
|
-
...e
|
|
413
|
-
},
|
|
414
|
-
...n
|
|
415
|
-
});
|
|
416
|
-
};
|
|
417
|
-
//#endregion
|
|
418
|
-
//#region src/components/ui/label.tsx
|
|
419
|
-
function X({ className: e, ...t }) {
|
|
420
|
-
return /* @__PURE__ */ s(d.Root, {
|
|
421
|
-
"data-slot": "label",
|
|
422
|
-
className: h("flex items-center text-foreground gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
423
|
-
...t
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/components/ui/input.tsx
|
|
428
|
-
function Z({ className: e, type: t, error: n = !1, label: i, helperText: a, startIcon: o, endIcon: l, appearance: u = "default", ...d }) {
|
|
429
|
-
let f = o ? r(o, { className: h("stroke-text-input-placeholder") }) : null, p = l ? r(l, { className: h("stroke-text-input-placeholder") }) : null;
|
|
430
|
-
return /* @__PURE__ */ c("div", {
|
|
431
|
-
className: "w-full flex flex-col gap-2 h-fit ",
|
|
432
|
-
children: [
|
|
433
|
-
!!i && /* @__PURE__ */ s(X, { children: i }),
|
|
434
|
-
/* @__PURE__ */ c("div", {
|
|
435
|
-
className: "w-full relative",
|
|
436
|
-
children: [
|
|
437
|
-
f && /* @__PURE__ */ s("div", {
|
|
438
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2",
|
|
439
|
-
children: f
|
|
440
|
-
}),
|
|
441
|
-
/* @__PURE__ */ s("input", {
|
|
442
|
-
...d,
|
|
443
|
-
type: t,
|
|
444
|
-
"data-slot": "input",
|
|
445
|
-
"data-appearance": u,
|
|
446
|
-
"aria-invalid": n ? !0 : d["aria-invalid"],
|
|
447
|
-
className: h(u === "themed" && "input-themed transition-smooth flex h-9 w-full min-w-0 py-1 text-base shadow-none outline-none md:text-sm", u === "default" && `file:text-foreground ${d?.placeholder ? "placeholder:text-text-disabled placeholder:text-sm placeholder:font-normal" : "placeholder:text-muted-foreground"} selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 ${f ? "pl-10" : "pl-3"} ${p ? "pr-10" : "pr-3"} py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-base-secondary-disabled md:text-sm`, u === "default" && "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", u === "themed" && (n || d["aria-invalid"] === !0 ? "input-error" : void 0), f && u === "themed" && "pl-10", !f && u === "themed" && "pl-3", p && u === "themed" && "pr-10", !p && u === "themed" && "pr-3", e)
|
|
448
|
-
}),
|
|
449
|
-
p && /* @__PURE__ */ s("div", {
|
|
450
|
-
className: "absolute right-3 top-1/2 -translate-y-1/2",
|
|
451
|
-
children: p
|
|
452
|
-
})
|
|
453
|
-
]
|
|
454
|
-
}),
|
|
455
|
-
a && /* @__PURE__ */ s("p", {
|
|
456
|
-
className: `text-caption ${n ? "text-destructive" : "text-muted-foreground"}`,
|
|
457
|
-
children: a
|
|
458
|
-
})
|
|
459
|
-
]
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
//#endregion
|
|
463
|
-
//#region src/components/ui/textarea.tsx
|
|
464
|
-
function Q({ className: e, error: t = !1, label: n, helperText: r, ...i }) {
|
|
465
|
-
return /* @__PURE__ */ c("div", {
|
|
466
|
-
className: "w-full flex flex-col gap-2",
|
|
467
|
-
children: [
|
|
468
|
-
n && /* @__PURE__ */ s(X, { children: n }),
|
|
469
|
-
/* @__PURE__ */ s("textarea", {
|
|
470
|
-
"data-slot": "textarea",
|
|
471
|
-
className: h("flex-1 border-input placeholder:text-text-disabled focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", e),
|
|
472
|
-
...i
|
|
473
|
-
}),
|
|
474
|
-
r && /* @__PURE__ */ s("p", {
|
|
475
|
-
className: `text-caption ${t ? "text-destructive" : "text-muted-foreground"}`,
|
|
476
|
-
children: r
|
|
477
|
-
})
|
|
478
|
-
]
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/components/ui/input-group.tsx
|
|
483
|
-
function ie({ className: e, ...t }) {
|
|
484
|
-
return /* @__PURE__ */ s("div", {
|
|
485
|
-
"data-slot": "input-group",
|
|
486
|
-
role: "group",
|
|
487
|
-
className: h("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", e),
|
|
488
|
-
...t
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
var ae = l("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
492
|
-
variants: { align: {
|
|
493
|
-
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
494
|
-
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
495
|
-
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
496
|
-
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
497
|
-
} },
|
|
498
|
-
defaultVariants: { align: "inline-start" }
|
|
499
|
-
});
|
|
500
|
-
function oe({ className: e, align: t = "inline-start", ...n }) {
|
|
501
|
-
return /* @__PURE__ */ s("div", {
|
|
502
|
-
role: "group",
|
|
503
|
-
"data-slot": "input-group-addon",
|
|
504
|
-
"data-align": t,
|
|
505
|
-
className: h(ae({ align: t }), e),
|
|
506
|
-
onClick: (e) => {
|
|
507
|
-
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
508
|
-
},
|
|
509
|
-
...n
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
var se = l("flex items-center gap-2 text-sm shadow-none", {
|
|
513
|
-
variants: { size: {
|
|
514
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
515
|
-
sm: "",
|
|
516
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
517
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
518
|
-
} },
|
|
519
|
-
defaultVariants: { size: "xs" }
|
|
520
|
-
});
|
|
521
|
-
function ce({ className: e, type: t = "button", variant: n = "ghost", size: r = "xs", ...i }) {
|
|
522
|
-
return /* @__PURE__ */ s(v, {
|
|
523
|
-
type: t,
|
|
524
|
-
"data-size": r,
|
|
525
|
-
variant: n,
|
|
526
|
-
className: h(se({ size: r }), e),
|
|
527
|
-
...i
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
function le({ className: e, ...t }) {
|
|
531
|
-
return /* @__PURE__ */ s("span", {
|
|
532
|
-
className: h("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", e),
|
|
533
|
-
...t
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
function $({ className: e, ...t }) {
|
|
537
|
-
return /* @__PURE__ */ s(Z, {
|
|
538
|
-
"data-slot": "input-group-control",
|
|
539
|
-
className: h("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
|
|
540
|
-
...t
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
function ue({ className: e, ...t }) {
|
|
544
|
-
return /* @__PURE__ */ s(Q, {
|
|
545
|
-
"data-slot": "input-group-control",
|
|
546
|
-
className: h("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", e),
|
|
547
|
-
...t
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
//#endregion
|
|
551
|
-
export { E as A, h as B, q as C, C as D, P as E, ee as F, y as I, v as L, O as M, S as N, te as O, b as P, _ as R, re as S, k as T, H as _, le as a, J as b, Z as c, m as d, L as f, U as g, G as h, $ as i, T as j, D as k, X as l, V as m, oe as n, ue as o, z as p, ce as r, Q as s, ie as t, Y as u, B as v, A as w, W as x, R as y, g as z };
|