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