reend-components 0.1.0 → 0.3.0
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/README.md +106 -8
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.cjs.map +1 -1
- package/dist/lib/index.d.ts +376 -0
- package/dist/lib/index.mjs +1810 -150
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/style.css +1 -1
- package/package.json +44 -12
- package/src/styles/variables.css +71 -1
- package/src/tailwind-preset.ts +189 -2
package/dist/lib/index.mjs
CHANGED
|
@@ -1,42 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import { twMerge as
|
|
6
|
-
import * as
|
|
7
|
-
import { cva as
|
|
8
|
-
import { X as
|
|
9
|
-
import { Toaster as
|
|
10
|
-
import { toast as
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import * as A from "@radix-ui/react-tooltip";
|
|
4
|
+
import { clsx as ne } from "clsx";
|
|
5
|
+
import { twMerge as se } from "tailwind-merge";
|
|
6
|
+
import * as v from "@radix-ui/react-toast";
|
|
7
|
+
import { cva as h } from "class-variance-authority";
|
|
8
|
+
import { X as ie, Crosshair as le, Terminal as de, AlertTriangle as ce } from "lucide-react";
|
|
9
|
+
import { Toaster as pe } from "sonner";
|
|
10
|
+
import { toast as mr } from "sonner";
|
|
11
|
+
import { Slot as fe } from "@radix-ui/react-slot";
|
|
12
|
+
import * as M from "@radix-ui/react-checkbox";
|
|
13
|
+
import * as W from "@radix-ui/react-radio-group";
|
|
14
|
+
import * as F from "@radix-ui/react-switch";
|
|
15
|
+
import * as x from "@radix-ui/react-select";
|
|
16
|
+
import * as j from "@radix-ui/react-avatar";
|
|
17
|
+
import * as G from "@radix-ui/react-progress";
|
|
18
|
+
import * as k from "@radix-ui/react-accordion";
|
|
19
|
+
import * as P from "@radix-ui/react-tabs";
|
|
20
|
+
import * as R from "@radix-ui/react-popover";
|
|
21
|
+
import * as y from "@radix-ui/react-dialog";
|
|
22
|
+
import * as me from "@radix-ui/react-separator";
|
|
23
|
+
import { AnimatePresence as ue, motion as V, useInView as ge } from "framer-motion";
|
|
24
|
+
function i(...e) {
|
|
25
|
+
return se(ne(e));
|
|
13
26
|
}
|
|
14
|
-
const
|
|
15
|
-
|
|
27
|
+
const sr = A.Provider, ir = A.Root, lr = A.Trigger, be = n.forwardRef(({ className: e, sideOffset: t = 4, ...r }, o) => /* @__PURE__ */ a(
|
|
28
|
+
A.Content,
|
|
16
29
|
{
|
|
17
|
-
ref:
|
|
18
|
-
sideOffset:
|
|
19
|
-
className:
|
|
30
|
+
ref: o,
|
|
31
|
+
sideOffset: t,
|
|
32
|
+
className: i(
|
|
20
33
|
"z-50 overflow-hidden border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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",
|
|
21
|
-
|
|
34
|
+
e
|
|
22
35
|
),
|
|
23
|
-
...
|
|
36
|
+
...r
|
|
24
37
|
}
|
|
25
38
|
));
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
39
|
+
be.displayName = A.Content.displayName;
|
|
40
|
+
const xe = v.Provider, Y = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
41
|
+
v.Viewport,
|
|
29
42
|
{
|
|
30
|
-
ref:
|
|
31
|
-
className:
|
|
43
|
+
ref: r,
|
|
44
|
+
className: i(
|
|
32
45
|
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
33
|
-
|
|
46
|
+
e
|
|
34
47
|
),
|
|
35
|
-
...
|
|
48
|
+
...t
|
|
36
49
|
}
|
|
37
50
|
));
|
|
38
|
-
|
|
39
|
-
const
|
|
51
|
+
Y.displayName = v.Viewport.displayName;
|
|
52
|
+
const he = h(
|
|
40
53
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
41
54
|
{
|
|
42
55
|
variants: {
|
|
@@ -49,170 +62,170 @@ const D = A(
|
|
|
49
62
|
variant: "default"
|
|
50
63
|
}
|
|
51
64
|
}
|
|
52
|
-
),
|
|
53
|
-
|
|
65
|
+
), X = n.forwardRef(({ className: e, variant: t, ...r }, o) => /* @__PURE__ */ a(
|
|
66
|
+
v.Root,
|
|
54
67
|
{
|
|
55
|
-
ref:
|
|
56
|
-
className:
|
|
57
|
-
...
|
|
68
|
+
ref: o,
|
|
69
|
+
className: i(he({ variant: t }), e),
|
|
70
|
+
...r
|
|
58
71
|
}
|
|
59
72
|
));
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
73
|
+
X.displayName = v.Root.displayName;
|
|
74
|
+
const ve = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
75
|
+
v.Action,
|
|
63
76
|
{
|
|
64
|
-
ref:
|
|
65
|
-
className:
|
|
77
|
+
ref: r,
|
|
78
|
+
className: i(
|
|
66
79
|
"inline-flex h-8 shrink-0 items-center justify-center border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",
|
|
67
|
-
|
|
80
|
+
e
|
|
68
81
|
),
|
|
69
|
-
...
|
|
82
|
+
...t
|
|
70
83
|
}
|
|
71
84
|
));
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
85
|
+
ve.displayName = v.Action.displayName;
|
|
86
|
+
const K = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
87
|
+
v.Close,
|
|
75
88
|
{
|
|
76
|
-
ref:
|
|
77
|
-
className:
|
|
89
|
+
ref: r,
|
|
90
|
+
className: i(
|
|
78
91
|
"absolute right-2 top-2 p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
|
|
79
|
-
|
|
92
|
+
e
|
|
80
93
|
),
|
|
81
94
|
"toast-close": "",
|
|
82
|
-
...
|
|
83
|
-
children: /* @__PURE__ */
|
|
95
|
+
...t,
|
|
96
|
+
children: /* @__PURE__ */ a(ie, { className: "h-4 w-4" })
|
|
84
97
|
}
|
|
85
98
|
));
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
|
|
99
|
+
K.displayName = v.Close.displayName;
|
|
100
|
+
const q = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
101
|
+
v.Title,
|
|
89
102
|
{
|
|
90
|
-
ref:
|
|
91
|
-
className:
|
|
92
|
-
...
|
|
103
|
+
ref: r,
|
|
104
|
+
className: i("text-sm font-semibold", e),
|
|
105
|
+
...t
|
|
93
106
|
}
|
|
94
107
|
));
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
|
|
108
|
+
q.displayName = v.Title.displayName;
|
|
109
|
+
const Q = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
110
|
+
v.Description,
|
|
98
111
|
{
|
|
99
|
-
ref:
|
|
100
|
-
className:
|
|
101
|
-
...
|
|
112
|
+
ref: r,
|
|
113
|
+
className: i("text-sm opacity-90", e),
|
|
114
|
+
...t
|
|
102
115
|
}
|
|
103
116
|
));
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
let
|
|
107
|
-
function
|
|
108
|
-
return
|
|
117
|
+
Q.displayName = v.Description.displayName;
|
|
118
|
+
const ye = 1, Ne = 5e3;
|
|
119
|
+
let _ = 0;
|
|
120
|
+
function we() {
|
|
121
|
+
return _ = (_ + 1) % Number.MAX_SAFE_INTEGER, _.toString();
|
|
109
122
|
}
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
123
|
+
const $ = /* @__PURE__ */ new Map(), H = (e) => {
|
|
124
|
+
if ($.has(e))
|
|
112
125
|
return;
|
|
113
|
-
const
|
|
114
|
-
|
|
126
|
+
const t = setTimeout(() => {
|
|
127
|
+
$.delete(e), S({
|
|
115
128
|
type: "REMOVE_TOAST",
|
|
116
|
-
toastId:
|
|
129
|
+
toastId: e
|
|
117
130
|
});
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
switch (
|
|
131
|
+
}, Ne);
|
|
132
|
+
$.set(e, t);
|
|
133
|
+
}, Te = (e, t) => {
|
|
134
|
+
switch (t.type) {
|
|
122
135
|
case "ADD_TOAST":
|
|
123
136
|
return {
|
|
124
|
-
...
|
|
125
|
-
toasts: [
|
|
137
|
+
...e,
|
|
138
|
+
toasts: [t.toast, ...e.toasts].slice(0, ye)
|
|
126
139
|
};
|
|
127
140
|
case "UPDATE_TOAST":
|
|
128
141
|
return {
|
|
129
|
-
...
|
|
130
|
-
toasts:
|
|
131
|
-
(
|
|
142
|
+
...e,
|
|
143
|
+
toasts: e.toasts.map(
|
|
144
|
+
(r) => r.id === t.toast.id ? { ...r, ...t.toast } : r
|
|
132
145
|
)
|
|
133
146
|
};
|
|
134
147
|
case "DISMISS_TOAST": {
|
|
135
|
-
const { toastId:
|
|
136
|
-
return
|
|
137
|
-
|
|
148
|
+
const { toastId: r } = t;
|
|
149
|
+
return r ? H(r) : e.toasts.forEach((o) => {
|
|
150
|
+
H(o.id);
|
|
138
151
|
}), {
|
|
139
|
-
...
|
|
140
|
-
toasts:
|
|
141
|
-
(
|
|
142
|
-
...
|
|
152
|
+
...e,
|
|
153
|
+
toasts: e.toasts.map(
|
|
154
|
+
(o) => o.id === r || r === void 0 ? {
|
|
155
|
+
...o,
|
|
143
156
|
open: !1
|
|
144
|
-
} :
|
|
157
|
+
} : o
|
|
145
158
|
)
|
|
146
159
|
};
|
|
147
160
|
}
|
|
148
161
|
case "REMOVE_TOAST":
|
|
149
|
-
return
|
|
150
|
-
...
|
|
162
|
+
return t.toastId === void 0 ? {
|
|
163
|
+
...e,
|
|
151
164
|
toasts: []
|
|
152
165
|
} : {
|
|
153
|
-
...
|
|
154
|
-
toasts:
|
|
166
|
+
...e,
|
|
167
|
+
toasts: e.toasts.filter((r) => r.id !== t.toastId)
|
|
155
168
|
};
|
|
156
169
|
}
|
|
157
|
-
},
|
|
158
|
-
let
|
|
159
|
-
function
|
|
160
|
-
|
|
161
|
-
|
|
170
|
+
}, D = [];
|
|
171
|
+
let I = { toasts: [] };
|
|
172
|
+
function S(e) {
|
|
173
|
+
I = Te(I, e), D.forEach((t) => {
|
|
174
|
+
t(I);
|
|
162
175
|
});
|
|
163
176
|
}
|
|
164
|
-
function
|
|
165
|
-
const
|
|
177
|
+
function Se({ ...e }) {
|
|
178
|
+
const t = we(), r = (s) => S({
|
|
166
179
|
type: "UPDATE_TOAST",
|
|
167
|
-
toast: { ...
|
|
168
|
-
}),
|
|
169
|
-
return
|
|
180
|
+
toast: { ...s, id: t }
|
|
181
|
+
}), o = () => S({ type: "DISMISS_TOAST", toastId: t });
|
|
182
|
+
return S({
|
|
170
183
|
type: "ADD_TOAST",
|
|
171
184
|
toast: {
|
|
172
|
-
...
|
|
173
|
-
id:
|
|
185
|
+
...e,
|
|
186
|
+
id: t,
|
|
174
187
|
open: !0,
|
|
175
|
-
onOpenChange: (
|
|
176
|
-
|
|
188
|
+
onOpenChange: (s) => {
|
|
189
|
+
s || o();
|
|
177
190
|
}
|
|
178
191
|
}
|
|
179
192
|
}), {
|
|
180
|
-
id:
|
|
181
|
-
dismiss:
|
|
182
|
-
update:
|
|
193
|
+
id: t,
|
|
194
|
+
dismiss: o,
|
|
195
|
+
update: r
|
|
183
196
|
};
|
|
184
197
|
}
|
|
185
|
-
function
|
|
186
|
-
const [
|
|
187
|
-
return
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
}), [
|
|
191
|
-
...
|
|
192
|
-
toast:
|
|
193
|
-
dismiss: (
|
|
198
|
+
function ke() {
|
|
199
|
+
const [e, t] = n.useState(I);
|
|
200
|
+
return n.useEffect(() => (D.push(t), () => {
|
|
201
|
+
const r = D.indexOf(t);
|
|
202
|
+
r > -1 && D.splice(r, 1);
|
|
203
|
+
}), [e]), {
|
|
204
|
+
...e,
|
|
205
|
+
toast: Se,
|
|
206
|
+
dismiss: (r) => S({ type: "DISMISS_TOAST", toastId: r })
|
|
194
207
|
};
|
|
195
208
|
}
|
|
196
|
-
function
|
|
197
|
-
const { toasts:
|
|
198
|
-
return /* @__PURE__ */
|
|
199
|
-
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
function dr() {
|
|
210
|
+
const { toasts: e } = ke();
|
|
211
|
+
return /* @__PURE__ */ l(xe, { children: [
|
|
212
|
+
e.map(function({ id: t, title: r, description: o, action: s, ...d }) {
|
|
213
|
+
return /* @__PURE__ */ l(X, { ...d, children: [
|
|
214
|
+
/* @__PURE__ */ l("div", { className: "grid gap-1", children: [
|
|
215
|
+
r && /* @__PURE__ */ a(q, { children: r }),
|
|
216
|
+
o && /* @__PURE__ */ a(Q, { children: o })
|
|
204
217
|
] }),
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */
|
|
207
|
-
] },
|
|
218
|
+
s,
|
|
219
|
+
/* @__PURE__ */ a(K, {})
|
|
220
|
+
] }, t);
|
|
208
221
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ a(Y, {})
|
|
210
223
|
] });
|
|
211
224
|
}
|
|
212
|
-
const
|
|
213
|
-
|
|
225
|
+
const cr = ({ theme: e = "dark", ...t }) => /* @__PURE__ */ a(
|
|
226
|
+
pe,
|
|
214
227
|
{
|
|
215
|
-
theme:
|
|
228
|
+
theme: e,
|
|
216
229
|
className: "toaster group",
|
|
217
230
|
toastOptions: {
|
|
218
231
|
classNames: {
|
|
@@ -222,26 +235,1673 @@ const q = ({ theme: t = "dark", ...e }) => /* @__PURE__ */ r(
|
|
|
222
235
|
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
223
236
|
}
|
|
224
237
|
},
|
|
225
|
-
...
|
|
238
|
+
...t
|
|
239
|
+
}
|
|
240
|
+
), U = h(
|
|
241
|
+
"inline-flex items-center justify-center gap-2 font-display font-bold uppercase tracking-[0.1em] transition-all duration-150 select-none whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-40",
|
|
242
|
+
{
|
|
243
|
+
variants: {
|
|
244
|
+
variant: {
|
|
245
|
+
primary: "clip-corner bg-primary text-primary-foreground hover:brightness-110 hover:shadow-glow active:brightness-90",
|
|
246
|
+
secondary: "clip-corner border border-white/25 text-card-foreground bg-transparent hover:border-primary/60 hover:text-primary active:bg-primary/5",
|
|
247
|
+
ghost: "bg-transparent text-muted-foreground hover:text-primary hover:bg-primary/5 active:bg-primary/10",
|
|
248
|
+
danger: "clip-corner bg-destructive text-destructive-foreground hover:brightness-110 active:brightness-90",
|
|
249
|
+
link: "bg-transparent text-primary underline-offset-4 hover:underline h-auto p-0",
|
|
250
|
+
icon: "bg-white/5 border border-white/10 text-muted-foreground hover:border-primary/30 hover:bg-primary/10 hover:text-primary"
|
|
251
|
+
},
|
|
252
|
+
size: {
|
|
253
|
+
xs: "h-7 px-3 text-[11px]",
|
|
254
|
+
sm: "h-8 px-4 text-xs",
|
|
255
|
+
md: "h-11 px-7 text-sm",
|
|
256
|
+
lg: "h-[52px] px-9 text-base",
|
|
257
|
+
xl: "h-[60px] px-12 text-lg",
|
|
258
|
+
icon: "h-10 w-10 p-0"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
defaultVariants: {
|
|
262
|
+
variant: "primary",
|
|
263
|
+
size: "md"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
), Re = n.forwardRef(
|
|
267
|
+
({
|
|
268
|
+
className: e,
|
|
269
|
+
variant: t,
|
|
270
|
+
size: r,
|
|
271
|
+
asChild: o = !1,
|
|
272
|
+
loading: s = !1,
|
|
273
|
+
disabled: d,
|
|
274
|
+
children: c,
|
|
275
|
+
type: p = "button",
|
|
276
|
+
...f
|
|
277
|
+
}, m) => o ? /* @__PURE__ */ a(
|
|
278
|
+
fe,
|
|
279
|
+
{
|
|
280
|
+
ref: m,
|
|
281
|
+
className: i(U({ variant: t, size: r }), e),
|
|
282
|
+
"aria-disabled": d || void 0,
|
|
283
|
+
...f,
|
|
284
|
+
children: c
|
|
285
|
+
}
|
|
286
|
+
) : /* @__PURE__ */ l(
|
|
287
|
+
"button",
|
|
288
|
+
{
|
|
289
|
+
ref: m,
|
|
290
|
+
type: p,
|
|
291
|
+
className: i(
|
|
292
|
+
U({ variant: t, size: r }),
|
|
293
|
+
s && "pointer-events-none opacity-80",
|
|
294
|
+
e
|
|
295
|
+
),
|
|
296
|
+
disabled: d || s,
|
|
297
|
+
"aria-busy": s || void 0,
|
|
298
|
+
...f,
|
|
299
|
+
children: [
|
|
300
|
+
s && /* @__PURE__ */ a(
|
|
301
|
+
"span",
|
|
302
|
+
{
|
|
303
|
+
className: "h-4 w-4 shrink-0 border-2 border-current clip-corner-sm animate-diamond-spin",
|
|
304
|
+
"aria-hidden": "true"
|
|
305
|
+
}
|
|
306
|
+
),
|
|
307
|
+
c
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
)
|
|
311
|
+
);
|
|
312
|
+
Re.displayName = "Button";
|
|
313
|
+
const Ae = h(
|
|
314
|
+
"inline-flex items-center gap-1.5 border px-2.5 py-0.5 font-mono text-[10px] font-semibold tracking-[0.12em] uppercase transition-colors",
|
|
315
|
+
{
|
|
316
|
+
variants: {
|
|
317
|
+
variant: {
|
|
318
|
+
default: "border-white/15 text-muted-foreground bg-white/5",
|
|
319
|
+
primary: "border-primary/40 text-primary bg-primary/10",
|
|
320
|
+
info: "border-ef-blue/40 text-ef-blue bg-ef-blue/10",
|
|
321
|
+
success: "border-ef-green/40 text-ef-green bg-ef-green/10",
|
|
322
|
+
warning: "border-ef-orange/40 text-ef-orange bg-ef-orange/10",
|
|
323
|
+
danger: "border-destructive/40 text-destructive bg-destructive/10",
|
|
324
|
+
purple: "border-ef-purple/40 text-ef-purple bg-ef-purple/10"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
defaultVariants: {
|
|
328
|
+
variant: "default"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
), Ce = n.forwardRef(
|
|
332
|
+
({ className: e, variant: t, removable: r, onRemove: o, children: s, ...d }, c) => /* @__PURE__ */ l(
|
|
333
|
+
"span",
|
|
334
|
+
{
|
|
335
|
+
ref: c,
|
|
336
|
+
className: i(Ae({ variant: t }), r && "pr-1", e),
|
|
337
|
+
...d,
|
|
338
|
+
children: [
|
|
339
|
+
s,
|
|
340
|
+
r && /* @__PURE__ */ a(
|
|
341
|
+
"button",
|
|
342
|
+
{
|
|
343
|
+
type: "button",
|
|
344
|
+
onClick: (p) => {
|
|
345
|
+
p.stopPropagation(), o == null || o();
|
|
346
|
+
},
|
|
347
|
+
className: "ml-0.5 inline-flex items-center justify-center leading-none opacity-50 hover:opacity-100 transition-opacity focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-current",
|
|
348
|
+
"aria-label": "Remove",
|
|
349
|
+
tabIndex: 0,
|
|
350
|
+
children: "×"
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
)
|
|
356
|
+
);
|
|
357
|
+
Ce.displayName = "Badge";
|
|
358
|
+
const De = "before:content-[''] before:absolute before:-top-px before:-left-px before:w-6 before:h-6 before:border-t-2 before:border-l-2 before:border-primary/40 before:pointer-events-none after:content-[''] after:absolute after:-bottom-px after:-right-px after:w-6 after:h-6 after:border-b-2 after:border-r-2 after:border-primary/40 after:pointer-events-none", Ie = h(
|
|
359
|
+
[
|
|
360
|
+
"relative bg-surface-1 border border-border transition-all duration-300",
|
|
361
|
+
De
|
|
362
|
+
].join(" "),
|
|
363
|
+
{
|
|
364
|
+
variants: {
|
|
365
|
+
hoverable: {
|
|
366
|
+
true: [
|
|
367
|
+
"cursor-pointer",
|
|
368
|
+
"hover:-translate-y-1",
|
|
369
|
+
"hover:shadow-[0_16px_48px_rgba(0,0,0,0.5)]",
|
|
370
|
+
"hover:border-primary/20",
|
|
371
|
+
"hover:before:border-primary/60",
|
|
372
|
+
"hover:after:border-primary/60"
|
|
373
|
+
].join(" "),
|
|
374
|
+
false: ""
|
|
375
|
+
},
|
|
376
|
+
selected: {
|
|
377
|
+
true: "border-2 border-primary/40 bg-primary/[0.06]",
|
|
378
|
+
false: ""
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
defaultVariants: {
|
|
382
|
+
hoverable: !1,
|
|
383
|
+
selected: !1
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
), Pe = n.forwardRef(
|
|
387
|
+
({ className: e, hoverable: t, selected: r, ...o }, s) => /* @__PURE__ */ a(
|
|
388
|
+
"div",
|
|
389
|
+
{
|
|
390
|
+
ref: s,
|
|
391
|
+
className: i(Ie({ hoverable: t, selected: r }), e),
|
|
392
|
+
...o
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
);
|
|
396
|
+
Pe.displayName = "Card";
|
|
397
|
+
const Ee = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
398
|
+
"div",
|
|
399
|
+
{
|
|
400
|
+
ref: r,
|
|
401
|
+
className: i("flex items-start justify-between gap-4 p-5", e),
|
|
402
|
+
...t
|
|
403
|
+
}
|
|
404
|
+
));
|
|
405
|
+
Ee.displayName = "CardHeader";
|
|
406
|
+
const _e = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
407
|
+
"p",
|
|
408
|
+
{
|
|
409
|
+
ref: r,
|
|
410
|
+
className: i(
|
|
411
|
+
"font-mono text-[10px] tracking-[0.15em] uppercase text-primary mb-2",
|
|
412
|
+
e
|
|
413
|
+
),
|
|
414
|
+
...t
|
|
415
|
+
}
|
|
416
|
+
));
|
|
417
|
+
_e.displayName = "CardMeta";
|
|
418
|
+
const $e = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
419
|
+
"h3",
|
|
420
|
+
{
|
|
421
|
+
ref: r,
|
|
422
|
+
className: i(
|
|
423
|
+
"font-display text-sm font-bold tracking-[0.02em] uppercase text-foreground",
|
|
424
|
+
e
|
|
425
|
+
),
|
|
426
|
+
...t
|
|
427
|
+
}
|
|
428
|
+
));
|
|
429
|
+
$e.displayName = "CardTitle";
|
|
430
|
+
const Ve = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
431
|
+
"p",
|
|
432
|
+
{
|
|
433
|
+
ref: r,
|
|
434
|
+
className: i("text-sm text-muted-foreground leading-relaxed", e),
|
|
435
|
+
...t
|
|
436
|
+
}
|
|
437
|
+
));
|
|
438
|
+
Ve.displayName = "CardDescription";
|
|
439
|
+
const je = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a("div", { ref: r, className: i("p-5", e), ...t }));
|
|
440
|
+
je.displayName = "CardBody";
|
|
441
|
+
const Oe = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
442
|
+
"div",
|
|
443
|
+
{
|
|
444
|
+
ref: r,
|
|
445
|
+
className: i(
|
|
446
|
+
"flex items-center gap-3 px-5 py-4 border-t border-border",
|
|
447
|
+
e
|
|
448
|
+
),
|
|
449
|
+
...t
|
|
450
|
+
}
|
|
451
|
+
));
|
|
452
|
+
Oe.displayName = "CardFooter";
|
|
453
|
+
const Le = h(
|
|
454
|
+
"relative flex items-center border transition-all duration-150 bg-surface-1",
|
|
455
|
+
{
|
|
456
|
+
variants: {
|
|
457
|
+
state: {
|
|
458
|
+
default: [
|
|
459
|
+
"border-white/[0.12]",
|
|
460
|
+
"hover:border-white/20",
|
|
461
|
+
"focus-within:border-primary",
|
|
462
|
+
"focus-within:shadow-[0_0_0_3px_rgba(255,212,41,0.1)]"
|
|
463
|
+
].join(" "),
|
|
464
|
+
error: [
|
|
465
|
+
"border-ef-red",
|
|
466
|
+
"focus-within:shadow-[0_0_0_3px_rgba(255,71,87,0.1)]"
|
|
467
|
+
].join(" "),
|
|
468
|
+
success: "border-ef-green"
|
|
469
|
+
},
|
|
470
|
+
size: {
|
|
471
|
+
sm: "h-8",
|
|
472
|
+
md: "h-11",
|
|
473
|
+
lg: "h-[52px]"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
defaultVariants: {
|
|
477
|
+
state: "default",
|
|
478
|
+
size: "md"
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
), ze = n.forwardRef(
|
|
482
|
+
({
|
|
483
|
+
className: e,
|
|
484
|
+
state: t = "default",
|
|
485
|
+
size: r = "md",
|
|
486
|
+
leftElement: o,
|
|
487
|
+
rightElement: s,
|
|
488
|
+
disabled: d,
|
|
489
|
+
...c
|
|
490
|
+
}, p) => {
|
|
491
|
+
const f = o || r === "sm" ? "pl-2" : "pl-3", m = s || r === "sm" ? "pr-2" : "pr-3";
|
|
492
|
+
return /* @__PURE__ */ l(
|
|
493
|
+
"div",
|
|
494
|
+
{
|
|
495
|
+
className: i(
|
|
496
|
+
Le({ state: t, size: r }),
|
|
497
|
+
d && "opacity-40 cursor-not-allowed pointer-events-none bg-background",
|
|
498
|
+
e
|
|
499
|
+
),
|
|
500
|
+
children: [
|
|
501
|
+
o && /* @__PURE__ */ a("span", { className: "pl-3 flex-shrink-0 text-muted-foreground flex items-center", children: o }),
|
|
502
|
+
/* @__PURE__ */ a(
|
|
503
|
+
"input",
|
|
504
|
+
{
|
|
505
|
+
ref: p,
|
|
506
|
+
disabled: d,
|
|
507
|
+
className: i(
|
|
508
|
+
"h-full flex-1 min-w-0 bg-transparent text-foreground text-sm font-mono",
|
|
509
|
+
"placeholder:text-muted-foreground focus:outline-none",
|
|
510
|
+
f,
|
|
511
|
+
m
|
|
512
|
+
),
|
|
513
|
+
...c
|
|
514
|
+
}
|
|
515
|
+
),
|
|
516
|
+
s && /* @__PURE__ */ a("span", { className: "pr-3 flex-shrink-0 text-muted-foreground flex items-center", children: s })
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
ze.displayName = "Input";
|
|
523
|
+
const Be = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
524
|
+
"label",
|
|
525
|
+
{
|
|
526
|
+
ref: r,
|
|
527
|
+
className: i(
|
|
528
|
+
"font-display text-[11px] font-semibold uppercase tracking-widest text-muted-foreground",
|
|
529
|
+
e
|
|
530
|
+
),
|
|
531
|
+
...t
|
|
532
|
+
}
|
|
533
|
+
));
|
|
534
|
+
Be.displayName = "Label";
|
|
535
|
+
const Me = n.forwardRef(
|
|
536
|
+
({ className: e, state: t = "default", ...r }, o) => /* @__PURE__ */ a(
|
|
537
|
+
"p",
|
|
538
|
+
{
|
|
539
|
+
ref: o,
|
|
540
|
+
className: i(
|
|
541
|
+
"text-[12px] leading-tight",
|
|
542
|
+
t === "error" && "text-destructive",
|
|
543
|
+
t === "success" && "text-ef-green",
|
|
544
|
+
t === "default" && "text-muted-foreground",
|
|
545
|
+
e
|
|
546
|
+
),
|
|
547
|
+
...r
|
|
548
|
+
}
|
|
549
|
+
)
|
|
550
|
+
);
|
|
551
|
+
Me.displayName = "HelperText";
|
|
552
|
+
const Fe = h(
|
|
553
|
+
[
|
|
554
|
+
"w-full resize-y border bg-surface-1 text-foreground",
|
|
555
|
+
"placeholder:text-muted-foreground font-mono text-sm",
|
|
556
|
+
"transition-all duration-150 focus:outline-none",
|
|
557
|
+
"min-h-[120px] px-3 py-2.5",
|
|
558
|
+
"disabled:opacity-40 disabled:cursor-not-allowed disabled:bg-background disabled:pointer-events-none"
|
|
559
|
+
].join(" "),
|
|
560
|
+
{
|
|
561
|
+
variants: {
|
|
562
|
+
state: {
|
|
563
|
+
default: [
|
|
564
|
+
"border-white/[0.12]",
|
|
565
|
+
"hover:border-white/20",
|
|
566
|
+
"focus:border-primary",
|
|
567
|
+
"focus:shadow-[0_0_0_3px_rgba(255,212,41,0.1)]"
|
|
568
|
+
].join(" "),
|
|
569
|
+
error: [
|
|
570
|
+
"border-ef-red",
|
|
571
|
+
"focus:shadow-[0_0_0_3px_rgba(255,71,87,0.1)]"
|
|
572
|
+
].join(" "),
|
|
573
|
+
success: "border-ef-green"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
defaultVariants: {
|
|
577
|
+
state: "default"
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
), Ge = n.forwardRef(
|
|
581
|
+
({ className: e, state: t = "default", showCount: r, maxLength: o, onChange: s, ...d }, c) => {
|
|
582
|
+
const [p, f] = n.useState(() => {
|
|
583
|
+
const g = d.value ?? d.defaultValue ?? "";
|
|
584
|
+
return String(g).length;
|
|
585
|
+
});
|
|
586
|
+
n.useEffect(() => {
|
|
587
|
+
d.value !== void 0 && f(String(d.value).length);
|
|
588
|
+
}, [d.value]);
|
|
589
|
+
const m = () => o !== void 0 && p > o ? "text-destructive" : o !== void 0 && p / o >= 0.8 ? "text-ef-orange" : "text-muted-foreground";
|
|
590
|
+
return /* @__PURE__ */ l("div", { className: "relative", children: [
|
|
591
|
+
/* @__PURE__ */ a(
|
|
592
|
+
"textarea",
|
|
593
|
+
{
|
|
594
|
+
ref: c,
|
|
595
|
+
maxLength: o,
|
|
596
|
+
onChange: (g) => {
|
|
597
|
+
f(g.target.value.length), s == null || s(g);
|
|
598
|
+
},
|
|
599
|
+
className: i(
|
|
600
|
+
Fe({ state: t }),
|
|
601
|
+
r && "pb-7",
|
|
602
|
+
e
|
|
603
|
+
),
|
|
604
|
+
...d
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
r && /* @__PURE__ */ a(
|
|
608
|
+
"span",
|
|
609
|
+
{
|
|
610
|
+
className: i(
|
|
611
|
+
"absolute bottom-2 right-3 font-mono text-[11px] pointer-events-none select-none",
|
|
612
|
+
m()
|
|
613
|
+
),
|
|
614
|
+
children: o !== void 0 ? `${p}/${o}` : p
|
|
615
|
+
}
|
|
616
|
+
)
|
|
617
|
+
] });
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
Ge.displayName = "Textarea";
|
|
621
|
+
const He = n.forwardRef(({ className: e, label: t, helperText: r, id: o, ...s }, d) => {
|
|
622
|
+
const c = n.useId(), p = o ?? c;
|
|
623
|
+
return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
|
|
624
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
625
|
+
/* @__PURE__ */ a(
|
|
626
|
+
M.Root,
|
|
627
|
+
{
|
|
628
|
+
ref: d,
|
|
629
|
+
id: p,
|
|
630
|
+
className: i(
|
|
631
|
+
"group peer h-[18px] w-[18px] shrink-0 border-2 border-white/25 bg-transparent",
|
|
632
|
+
"cursor-pointer transition-all duration-150",
|
|
633
|
+
"hover:border-primary/60",
|
|
634
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
635
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
636
|
+
"data-[state=checked]:bg-primary data-[state=checked]:border-primary",
|
|
637
|
+
"data-[state=indeterminate]:bg-primary/50 data-[state=indeterminate]:border-primary",
|
|
638
|
+
e
|
|
639
|
+
),
|
|
640
|
+
...s,
|
|
641
|
+
children: /* @__PURE__ */ l(M.Indicator, { className: "flex items-center justify-center", children: [
|
|
642
|
+
/* @__PURE__ */ a("span", { className: "hidden group-data-[state=checked]:inline leading-none text-primary-foreground text-[10px] font-bold select-none", children: "◆" }),
|
|
643
|
+
/* @__PURE__ */ a("span", { className: "hidden group-data-[state=indeterminate]:inline leading-none text-primary-foreground text-sm font-bold select-none", children: "−" })
|
|
644
|
+
] })
|
|
645
|
+
}
|
|
646
|
+
),
|
|
647
|
+
t && /* @__PURE__ */ a(
|
|
648
|
+
"label",
|
|
649
|
+
{
|
|
650
|
+
htmlFor: p,
|
|
651
|
+
className: "text-sm text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-40 select-none leading-none",
|
|
652
|
+
children: t
|
|
653
|
+
}
|
|
654
|
+
)
|
|
655
|
+
] }),
|
|
656
|
+
r && /* @__PURE__ */ a("p", { className: "text-[12px] text-muted-foreground pl-[30px]", children: r })
|
|
657
|
+
] });
|
|
658
|
+
});
|
|
659
|
+
He.displayName = "Checkbox";
|
|
660
|
+
const Ue = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
661
|
+
W.Root,
|
|
662
|
+
{
|
|
663
|
+
ref: r,
|
|
664
|
+
className: i("flex flex-col gap-3", e),
|
|
665
|
+
...t
|
|
666
|
+
}
|
|
667
|
+
));
|
|
668
|
+
Ue.displayName = "RadioGroup";
|
|
669
|
+
const We = n.forwardRef(({ className: e, label: t, helperText: r, id: o, ...s }, d) => {
|
|
670
|
+
const c = n.useId(), p = o ?? c;
|
|
671
|
+
return /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: [
|
|
672
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
673
|
+
/* @__PURE__ */ l(
|
|
674
|
+
W.Item,
|
|
675
|
+
{
|
|
676
|
+
ref: d,
|
|
677
|
+
id: p,
|
|
678
|
+
className: i(
|
|
679
|
+
"group peer cursor-pointer shrink-0 flex items-center justify-center",
|
|
680
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
681
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
682
|
+
e
|
|
683
|
+
),
|
|
684
|
+
...s,
|
|
685
|
+
children: [
|
|
686
|
+
/* @__PURE__ */ a("span", { className: "text-[18px] leading-none select-none transition-colors duration-150 group-data-[state=unchecked]:inline group-data-[state=checked]:hidden text-muted-foreground/50 group-hover:text-muted-foreground group-data-[disabled]:pointer-events-none", children: "◇" }),
|
|
687
|
+
/* @__PURE__ */ a("span", { className: "text-[18px] leading-none select-none transition-colors duration-150 group-data-[state=checked]:inline group-data-[state=unchecked]:hidden text-primary", children: "◆" })
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
),
|
|
691
|
+
t && /* @__PURE__ */ a(
|
|
692
|
+
"label",
|
|
693
|
+
{
|
|
694
|
+
htmlFor: p,
|
|
695
|
+
className: "text-sm text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-40 select-none leading-none",
|
|
696
|
+
children: t
|
|
697
|
+
}
|
|
698
|
+
)
|
|
699
|
+
] }),
|
|
700
|
+
r && /* @__PURE__ */ a("p", { className: "text-[12px] text-muted-foreground pl-[30px]", children: r })
|
|
701
|
+
] });
|
|
702
|
+
});
|
|
703
|
+
We.displayName = "RadioGroupItem";
|
|
704
|
+
const Ye = n.forwardRef(({ className: e, label: t, offLabel: r, onLabel: o, id: s, checked: d, ...c }, p) => {
|
|
705
|
+
const f = n.useId(), m = s ?? f;
|
|
706
|
+
return /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
707
|
+
(r || o) && /* @__PURE__ */ a("span", { className: "text-[11px] font-mono uppercase tracking-widest text-muted-foreground select-none min-w-[32px] text-right", children: d ? o : r }),
|
|
708
|
+
/* @__PURE__ */ a(
|
|
709
|
+
F.Root,
|
|
710
|
+
{
|
|
711
|
+
ref: p,
|
|
712
|
+
id: m,
|
|
713
|
+
checked: d,
|
|
714
|
+
className: i(
|
|
715
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-none",
|
|
716
|
+
"border border-white/15 bg-white/10",
|
|
717
|
+
"transition-all duration-200",
|
|
718
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
719
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
720
|
+
"data-[state=checked]:bg-primary data-[state=checked]:border-primary",
|
|
721
|
+
e
|
|
722
|
+
),
|
|
723
|
+
...c,
|
|
724
|
+
children: /* @__PURE__ */ a(
|
|
725
|
+
F.Thumb,
|
|
726
|
+
{
|
|
727
|
+
className: i(
|
|
728
|
+
"pointer-events-none block h-5 w-5 bg-white shadow-sm ring-0",
|
|
729
|
+
"transition-transform duration-200",
|
|
730
|
+
"data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0.5"
|
|
731
|
+
)
|
|
732
|
+
}
|
|
733
|
+
)
|
|
734
|
+
}
|
|
735
|
+
),
|
|
736
|
+
t && /* @__PURE__ */ a(
|
|
737
|
+
"label",
|
|
738
|
+
{
|
|
739
|
+
htmlFor: m,
|
|
740
|
+
className: "text-sm text-foreground cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-40 select-none",
|
|
741
|
+
children: t
|
|
742
|
+
}
|
|
743
|
+
)
|
|
744
|
+
] });
|
|
745
|
+
});
|
|
746
|
+
Ye.displayName = "Switch";
|
|
747
|
+
const Xe = x.Root;
|
|
748
|
+
Xe.displayName = "Select";
|
|
749
|
+
const Ke = x.Group;
|
|
750
|
+
Ke.displayName = "SelectGroup";
|
|
751
|
+
const qe = x.Value;
|
|
752
|
+
qe.displayName = "SelectValue";
|
|
753
|
+
const Qe = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ l(
|
|
754
|
+
x.Trigger,
|
|
755
|
+
{
|
|
756
|
+
ref: o,
|
|
757
|
+
className: i(
|
|
758
|
+
"relative flex h-11 w-full items-center justify-between",
|
|
759
|
+
"border border-white/[0.12] bg-surface-1 px-3",
|
|
760
|
+
"font-mono text-sm text-foreground",
|
|
761
|
+
"transition-all duration-150",
|
|
762
|
+
"hover:border-white/20",
|
|
763
|
+
"focus:outline-none focus:border-primary focus:shadow-[0_0_0_3px_rgba(255,212,41,0.1)]",
|
|
764
|
+
"disabled:cursor-not-allowed disabled:opacity-40 disabled:pointer-events-none",
|
|
765
|
+
"data-[placeholder]:text-muted-foreground",
|
|
766
|
+
"[&>span]:line-clamp-1",
|
|
767
|
+
e
|
|
768
|
+
),
|
|
769
|
+
...r,
|
|
770
|
+
children: [
|
|
771
|
+
t,
|
|
772
|
+
/* @__PURE__ */ a(x.Icon, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "shrink-0 text-muted-foreground text-xs ml-2 select-none", children: "▾" }) })
|
|
773
|
+
]
|
|
774
|
+
}
|
|
775
|
+
));
|
|
776
|
+
Qe.displayName = "SelectTrigger";
|
|
777
|
+
const Z = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
778
|
+
x.ScrollUpButton,
|
|
779
|
+
{
|
|
780
|
+
ref: r,
|
|
781
|
+
className: i(
|
|
782
|
+
"flex cursor-default items-center justify-center py-1 text-muted-foreground text-xs",
|
|
783
|
+
e
|
|
784
|
+
),
|
|
785
|
+
...t,
|
|
786
|
+
children: "▴"
|
|
787
|
+
}
|
|
788
|
+
));
|
|
789
|
+
Z.displayName = "SelectScrollUpButton";
|
|
790
|
+
const J = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
791
|
+
x.ScrollDownButton,
|
|
792
|
+
{
|
|
793
|
+
ref: r,
|
|
794
|
+
className: i(
|
|
795
|
+
"flex cursor-default items-center justify-center py-1 text-muted-foreground text-xs",
|
|
796
|
+
e
|
|
797
|
+
),
|
|
798
|
+
...t,
|
|
799
|
+
children: "▾"
|
|
800
|
+
}
|
|
801
|
+
));
|
|
802
|
+
J.displayName = "SelectScrollDownButton";
|
|
803
|
+
const Ze = n.forwardRef(({ className: e, children: t, position: r = "popper", ...o }, s) => /* @__PURE__ */ a(x.Portal, { children: /* @__PURE__ */ l(
|
|
804
|
+
x.Content,
|
|
805
|
+
{
|
|
806
|
+
ref: s,
|
|
807
|
+
className: i(
|
|
808
|
+
"relative z-[var(--z-overlay,50)] min-w-[8rem] overflow-hidden",
|
|
809
|
+
"bg-surface-2 border border-white/10 shadow-lg",
|
|
810
|
+
"data-[state=open]:animate-fade-in-up",
|
|
811
|
+
"data-[state=closed]:animate-fade-in-up",
|
|
812
|
+
r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
|
|
813
|
+
e
|
|
814
|
+
),
|
|
815
|
+
position: r,
|
|
816
|
+
...o,
|
|
817
|
+
children: [
|
|
818
|
+
/* @__PURE__ */ a(Z, {}),
|
|
819
|
+
/* @__PURE__ */ a(
|
|
820
|
+
x.Viewport,
|
|
821
|
+
{
|
|
822
|
+
className: i(
|
|
823
|
+
"p-1",
|
|
824
|
+
r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
825
|
+
),
|
|
826
|
+
children: t
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
/* @__PURE__ */ a(J, {})
|
|
830
|
+
]
|
|
831
|
+
}
|
|
832
|
+
) }));
|
|
833
|
+
Ze.displayName = "SelectContent";
|
|
834
|
+
const Je = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
835
|
+
x.Label,
|
|
836
|
+
{
|
|
837
|
+
ref: r,
|
|
838
|
+
className: i(
|
|
839
|
+
"font-mono text-[10px] uppercase tracking-widest text-muted-foreground/60 px-4 py-1.5",
|
|
840
|
+
e
|
|
841
|
+
),
|
|
842
|
+
...t
|
|
843
|
+
}
|
|
844
|
+
));
|
|
845
|
+
Je.displayName = "SelectLabel";
|
|
846
|
+
const et = n.forwardRef(({ className: e, children: t, danger: r, ...o }, s) => /* @__PURE__ */ a(
|
|
847
|
+
x.Item,
|
|
848
|
+
{
|
|
849
|
+
ref: s,
|
|
850
|
+
className: i(
|
|
851
|
+
"relative flex w-full cursor-pointer select-none items-center px-4 py-2 text-sm text-muted-foreground",
|
|
852
|
+
"outline-none transition-colors duration-100",
|
|
853
|
+
"focus:bg-primary/6 focus:text-primary",
|
|
854
|
+
"data-[state=checked]:text-primary data-[state=checked]:font-medium",
|
|
855
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
|
|
856
|
+
r ? "hover:bg-destructive/6 hover:text-destructive focus:bg-destructive/6 focus:text-destructive" : "hover:bg-primary/6 hover:text-primary",
|
|
857
|
+
e
|
|
858
|
+
),
|
|
859
|
+
...o,
|
|
860
|
+
children: /* @__PURE__ */ a(x.ItemText, { children: t })
|
|
861
|
+
}
|
|
862
|
+
));
|
|
863
|
+
et.displayName = "SelectItem";
|
|
864
|
+
const tt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
865
|
+
x.Separator,
|
|
866
|
+
{
|
|
867
|
+
ref: r,
|
|
868
|
+
className: i("my-1 h-px bg-white/8", e),
|
|
869
|
+
...t
|
|
870
|
+
}
|
|
871
|
+
));
|
|
872
|
+
tt.displayName = "SelectSeparator";
|
|
873
|
+
const rt = h(
|
|
874
|
+
"relative inline-flex shrink-0 overflow-hidden clip-corner-sm",
|
|
875
|
+
{
|
|
876
|
+
variants: {
|
|
877
|
+
size: {
|
|
878
|
+
xs: "h-6 w-6",
|
|
879
|
+
sm: "h-8 w-8",
|
|
880
|
+
md: "h-10 w-10",
|
|
881
|
+
lg: "h-14 w-14",
|
|
882
|
+
xl: "h-20 w-20",
|
|
883
|
+
"2xl": "h-[120px] w-[120px]"
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
defaultVariants: { size: "md" }
|
|
887
|
+
}
|
|
888
|
+
), at = {
|
|
889
|
+
online: "text-ef-green",
|
|
890
|
+
offline: "text-muted-foreground/50",
|
|
891
|
+
busy: "text-destructive",
|
|
892
|
+
away: "text-ef-orange"
|
|
893
|
+
}, ot = n.forwardRef(({ className: e, size: t, status: r, ...o }, s) => /* @__PURE__ */ l("div", { className: "relative inline-flex shrink-0", children: [
|
|
894
|
+
/* @__PURE__ */ a(
|
|
895
|
+
j.Root,
|
|
896
|
+
{
|
|
897
|
+
ref: s,
|
|
898
|
+
className: i(rt({ size: t }), e),
|
|
899
|
+
...o
|
|
900
|
+
}
|
|
901
|
+
),
|
|
902
|
+
r && /* @__PURE__ */ a(
|
|
903
|
+
"span",
|
|
904
|
+
{
|
|
905
|
+
className: i(
|
|
906
|
+
"absolute -bottom-0.5 -right-0.5 text-[10px] leading-none select-none",
|
|
907
|
+
at[r]
|
|
908
|
+
),
|
|
909
|
+
"aria-label": r,
|
|
910
|
+
children: "◆"
|
|
911
|
+
}
|
|
912
|
+
)
|
|
913
|
+
] }));
|
|
914
|
+
ot.displayName = "Avatar";
|
|
915
|
+
const nt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
916
|
+
j.Image,
|
|
917
|
+
{
|
|
918
|
+
ref: r,
|
|
919
|
+
className: i("aspect-square h-full w-full object-cover", e),
|
|
920
|
+
...t
|
|
921
|
+
}
|
|
922
|
+
));
|
|
923
|
+
nt.displayName = "AvatarImage";
|
|
924
|
+
const st = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
925
|
+
j.Fallback,
|
|
926
|
+
{
|
|
927
|
+
ref: r,
|
|
928
|
+
className: i(
|
|
929
|
+
"flex h-full w-full items-center justify-center",
|
|
930
|
+
"bg-surface-2 font-display text-muted-foreground uppercase text-center",
|
|
931
|
+
"text-[clamp(8px,35%,28px)]",
|
|
932
|
+
e
|
|
933
|
+
),
|
|
934
|
+
...t
|
|
935
|
+
}
|
|
936
|
+
));
|
|
937
|
+
st.displayName = "AvatarFallback";
|
|
938
|
+
const it = h(
|
|
939
|
+
"relative w-full overflow-hidden bg-white/8",
|
|
940
|
+
{
|
|
941
|
+
variants: {
|
|
942
|
+
size: {
|
|
943
|
+
sm: "h-1",
|
|
944
|
+
md: "h-1.5",
|
|
945
|
+
lg: "h-2.5"
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
defaultVariants: { size: "md" }
|
|
949
|
+
}
|
|
950
|
+
), lt = h(
|
|
951
|
+
"h-full w-full flex-1 transition-all duration-500 ease-smooth origin-left",
|
|
952
|
+
{
|
|
953
|
+
variants: {
|
|
954
|
+
variant: {
|
|
955
|
+
default: "bg-primary",
|
|
956
|
+
success: "bg-ef-green",
|
|
957
|
+
danger: "bg-destructive",
|
|
958
|
+
info: "bg-ef-blue"
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
defaultVariants: { variant: "default" }
|
|
962
|
+
}
|
|
963
|
+
), dt = n.forwardRef(({ className: e, value: t, showLabel: r, size: o, variant: s, ...d }, c) => {
|
|
964
|
+
const p = t == null, f = p ? void 0 : Math.min(100, Math.max(0, t));
|
|
965
|
+
return /* @__PURE__ */ l("div", { className: "w-full space-y-1", children: [
|
|
966
|
+
r && !p && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ l("span", { className: "font-mono text-[11px] text-muted-foreground", children: [
|
|
967
|
+
f,
|
|
968
|
+
"%"
|
|
969
|
+
] }) }),
|
|
970
|
+
/* @__PURE__ */ a(
|
|
971
|
+
G.Root,
|
|
972
|
+
{
|
|
973
|
+
ref: c,
|
|
974
|
+
className: i(it({ size: o }), e),
|
|
975
|
+
value: f,
|
|
976
|
+
...d,
|
|
977
|
+
children: /* @__PURE__ */ a(
|
|
978
|
+
G.Indicator,
|
|
979
|
+
{
|
|
980
|
+
className: i(
|
|
981
|
+
p ? "h-full animate-skeleton" : lt({ variant: s })
|
|
982
|
+
),
|
|
983
|
+
style: p ? void 0 : { transform: `translateX(-${100 - (f ?? 0)}%)` }
|
|
984
|
+
}
|
|
985
|
+
)
|
|
986
|
+
}
|
|
987
|
+
)
|
|
988
|
+
] });
|
|
989
|
+
});
|
|
990
|
+
dt.displayName = "Progress";
|
|
991
|
+
const ct = k.Root;
|
|
992
|
+
ct.displayName = "Accordion";
|
|
993
|
+
const pt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
994
|
+
k.Item,
|
|
995
|
+
{
|
|
996
|
+
ref: r,
|
|
997
|
+
className: i("border border-white/6", e),
|
|
998
|
+
...t
|
|
999
|
+
}
|
|
1000
|
+
));
|
|
1001
|
+
pt.displayName = "AccordionItem";
|
|
1002
|
+
const ft = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ a(k.Header, { className: "flex", children: /* @__PURE__ */ l(
|
|
1003
|
+
k.Trigger,
|
|
1004
|
+
{
|
|
1005
|
+
ref: o,
|
|
1006
|
+
className: i(
|
|
1007
|
+
"group flex flex-1 items-center justify-between px-4 py-3",
|
|
1008
|
+
"font-display text-[13px] font-semibold uppercase tracking-wider text-foreground",
|
|
1009
|
+
"transition-all duration-200",
|
|
1010
|
+
"hover:text-primary hover:bg-white/[0.02]",
|
|
1011
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
|
|
1012
|
+
"disabled:cursor-not-allowed disabled:opacity-40",
|
|
1013
|
+
e
|
|
1014
|
+
),
|
|
1015
|
+
...r,
|
|
1016
|
+
children: [
|
|
1017
|
+
t,
|
|
1018
|
+
/* @__PURE__ */ a(
|
|
1019
|
+
"span",
|
|
1020
|
+
{
|
|
1021
|
+
className: i(
|
|
1022
|
+
"font-mono text-base leading-none select-none shrink-0 ml-2",
|
|
1023
|
+
"text-muted-foreground transition-colors duration-200",
|
|
1024
|
+
"group-hover:text-primary",
|
|
1025
|
+
"group-data-[state=open]:hidden group-data-[state=closed]:inline"
|
|
1026
|
+
),
|
|
1027
|
+
"aria-hidden": !0,
|
|
1028
|
+
children: "+"
|
|
1029
|
+
}
|
|
1030
|
+
),
|
|
1031
|
+
/* @__PURE__ */ a(
|
|
1032
|
+
"span",
|
|
1033
|
+
{
|
|
1034
|
+
className: i(
|
|
1035
|
+
"font-mono text-base leading-none select-none shrink-0 ml-2",
|
|
1036
|
+
"text-primary transition-colors duration-200",
|
|
1037
|
+
"group-data-[state=open]:inline group-data-[state=closed]:hidden"
|
|
1038
|
+
),
|
|
1039
|
+
"aria-hidden": !0,
|
|
1040
|
+
children: "−"
|
|
1041
|
+
}
|
|
1042
|
+
)
|
|
1043
|
+
]
|
|
1044
|
+
}
|
|
1045
|
+
) }));
|
|
1046
|
+
ft.displayName = "AccordionTrigger";
|
|
1047
|
+
const mt = n.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ a(
|
|
1048
|
+
k.Content,
|
|
1049
|
+
{
|
|
1050
|
+
ref: o,
|
|
1051
|
+
className: "overflow-hidden data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up",
|
|
1052
|
+
...r,
|
|
1053
|
+
children: /* @__PURE__ */ a("div", { className: i("px-4 pb-4 pt-1 text-sm text-muted-foreground", e), children: t })
|
|
1054
|
+
}
|
|
1055
|
+
));
|
|
1056
|
+
mt.displayName = "AccordionContent";
|
|
1057
|
+
const ut = P.Root;
|
|
1058
|
+
ut.displayName = "Tabs";
|
|
1059
|
+
const gt = h("inline-flex items-center", {
|
|
1060
|
+
variants: {
|
|
1061
|
+
variant: {
|
|
1062
|
+
underline: "border-b border-white/10 gap-0",
|
|
1063
|
+
pill: "gap-1 bg-surface-1 p-1",
|
|
1064
|
+
bordered: "border border-white/10 gap-0"
|
|
1065
|
+
}
|
|
1066
|
+
},
|
|
1067
|
+
defaultVariants: { variant: "underline" }
|
|
1068
|
+
}), bt = n.forwardRef(({ className: e, variant: t, ...r }, o) => /* @__PURE__ */ a(
|
|
1069
|
+
P.List,
|
|
1070
|
+
{
|
|
1071
|
+
ref: o,
|
|
1072
|
+
className: i(gt({ variant: t }), e),
|
|
1073
|
+
...r
|
|
1074
|
+
}
|
|
1075
|
+
));
|
|
1076
|
+
bt.displayName = "TabsList";
|
|
1077
|
+
const xt = h(
|
|
1078
|
+
[
|
|
1079
|
+
"font-display text-[13px] font-semibold uppercase tracking-wider",
|
|
1080
|
+
"transition-all duration-150 cursor-pointer",
|
|
1081
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
|
|
1082
|
+
"disabled:cursor-not-allowed disabled:opacity-40"
|
|
1083
|
+
],
|
|
1084
|
+
{
|
|
1085
|
+
variants: {
|
|
1086
|
+
variant: {
|
|
1087
|
+
underline: [
|
|
1088
|
+
"px-4 py-2.5 text-muted-foreground border-b-2 border-transparent -mb-px",
|
|
1089
|
+
"hover:text-foreground",
|
|
1090
|
+
"data-[state=active]:text-primary data-[state=active]:border-b-primary"
|
|
1091
|
+
],
|
|
1092
|
+
pill: [
|
|
1093
|
+
"px-4 py-1.5 text-muted-foreground",
|
|
1094
|
+
"hover:text-foreground",
|
|
1095
|
+
"data-[state=active]:bg-surface-3 data-[state=active]:text-primary"
|
|
1096
|
+
],
|
|
1097
|
+
bordered: [
|
|
1098
|
+
"px-4 py-2.5 text-muted-foreground border-r border-white/10 last:border-r-0",
|
|
1099
|
+
"hover:text-foreground hover:bg-white/[0.03]",
|
|
1100
|
+
"data-[state=active]:text-primary data-[state=active]:bg-white/[0.05]"
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1104
|
+
defaultVariants: { variant: "underline" }
|
|
1105
|
+
}
|
|
1106
|
+
), ht = n.forwardRef(({ className: e, variant: t, ...r }, o) => /* @__PURE__ */ a(
|
|
1107
|
+
P.Trigger,
|
|
1108
|
+
{
|
|
1109
|
+
ref: o,
|
|
1110
|
+
className: i(xt({ variant: t }), e),
|
|
1111
|
+
...r
|
|
1112
|
+
}
|
|
1113
|
+
));
|
|
1114
|
+
ht.displayName = "TabsTrigger";
|
|
1115
|
+
const vt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1116
|
+
P.Content,
|
|
1117
|
+
{
|
|
1118
|
+
ref: r,
|
|
1119
|
+
className: i(
|
|
1120
|
+
"mt-4 text-sm text-muted-foreground",
|
|
1121
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
1122
|
+
e
|
|
1123
|
+
),
|
|
1124
|
+
...t
|
|
1125
|
+
}
|
|
1126
|
+
));
|
|
1127
|
+
vt.displayName = "TabsContent";
|
|
1128
|
+
const yt = R.Root;
|
|
1129
|
+
yt.displayName = "Popover";
|
|
1130
|
+
const Nt = R.Trigger;
|
|
1131
|
+
Nt.displayName = "PopoverTrigger";
|
|
1132
|
+
const wt = R.Anchor;
|
|
1133
|
+
wt.displayName = "PopoverAnchor";
|
|
1134
|
+
const Tt = n.forwardRef(({ className: e, align: t = "center", sideOffset: r = 6, ...o }, s) => /* @__PURE__ */ a(R.Portal, { children: /* @__PURE__ */ a(
|
|
1135
|
+
R.Content,
|
|
1136
|
+
{
|
|
1137
|
+
ref: s,
|
|
1138
|
+
align: t,
|
|
1139
|
+
sideOffset: r,
|
|
1140
|
+
className: i(
|
|
1141
|
+
"z-50 min-w-[200px]",
|
|
1142
|
+
"bg-surface-2 border border-white/10 shadow-lg",
|
|
1143
|
+
"p-4",
|
|
1144
|
+
"data-[state=open]:animate-fade-in-up",
|
|
1145
|
+
"data-[state=closed]:animate-fade-in-up",
|
|
1146
|
+
"focus:outline-none",
|
|
1147
|
+
e
|
|
1148
|
+
),
|
|
1149
|
+
...o
|
|
1150
|
+
}
|
|
1151
|
+
) }));
|
|
1152
|
+
Tt.displayName = "PopoverContent";
|
|
1153
|
+
const St = y.Root;
|
|
1154
|
+
St.displayName = "Dialog";
|
|
1155
|
+
const kt = y.Trigger;
|
|
1156
|
+
kt.displayName = "DialogTrigger";
|
|
1157
|
+
const ee = y.Portal;
|
|
1158
|
+
ee.displayName = "DialogPortal";
|
|
1159
|
+
const Rt = y.Close;
|
|
1160
|
+
Rt.displayName = "DialogClose";
|
|
1161
|
+
const te = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1162
|
+
y.Overlay,
|
|
1163
|
+
{
|
|
1164
|
+
ref: r,
|
|
1165
|
+
className: i(
|
|
1166
|
+
"fixed inset-0 z-50 bg-black/75 backdrop-blur-sm",
|
|
1167
|
+
"data-[state=open]:animate-fade-in-up",
|
|
1168
|
+
e
|
|
1169
|
+
),
|
|
1170
|
+
...t
|
|
1171
|
+
}
|
|
1172
|
+
));
|
|
1173
|
+
te.displayName = "DialogOverlay";
|
|
1174
|
+
const At = h(
|
|
1175
|
+
[
|
|
1176
|
+
"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
|
|
1177
|
+
"bg-surface-2 border border-white/10 shadow-xl",
|
|
1178
|
+
"flex flex-col",
|
|
1179
|
+
"data-[state=open]:animate-fade-in-up",
|
|
1180
|
+
"focus:outline-none"
|
|
1181
|
+
],
|
|
1182
|
+
{
|
|
1183
|
+
variants: {
|
|
1184
|
+
size: {
|
|
1185
|
+
sm: "w-full max-w-sm",
|
|
1186
|
+
md: "w-full max-w-lg",
|
|
1187
|
+
lg: "w-full max-w-2xl",
|
|
1188
|
+
xl: "w-full max-w-4xl",
|
|
1189
|
+
fullscreen: "w-screen h-screen max-w-none"
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
defaultVariants: { size: "md" }
|
|
1193
|
+
}
|
|
1194
|
+
), Ct = n.forwardRef(({ className: e, size: t, children: r, ...o }, s) => /* @__PURE__ */ l(ee, { children: [
|
|
1195
|
+
/* @__PURE__ */ a(te, {}),
|
|
1196
|
+
/* @__PURE__ */ a(
|
|
1197
|
+
y.Content,
|
|
1198
|
+
{
|
|
1199
|
+
ref: s,
|
|
1200
|
+
className: i(At({ size: t }), e),
|
|
1201
|
+
...o,
|
|
1202
|
+
children: r
|
|
1203
|
+
}
|
|
1204
|
+
)
|
|
1205
|
+
] }));
|
|
1206
|
+
Ct.displayName = "DialogContent";
|
|
1207
|
+
function Dt({
|
|
1208
|
+
className: e,
|
|
1209
|
+
...t
|
|
1210
|
+
}) {
|
|
1211
|
+
return /* @__PURE__ */ a(
|
|
1212
|
+
"div",
|
|
1213
|
+
{
|
|
1214
|
+
className: i(
|
|
1215
|
+
"flex shrink-0 items-center justify-between border-b border-white/8 px-6 py-4",
|
|
1216
|
+
e
|
|
1217
|
+
),
|
|
1218
|
+
...t
|
|
1219
|
+
}
|
|
1220
|
+
);
|
|
1221
|
+
}
|
|
1222
|
+
Dt.displayName = "DialogHeader";
|
|
1223
|
+
function It({
|
|
1224
|
+
className: e,
|
|
1225
|
+
...t
|
|
1226
|
+
}) {
|
|
1227
|
+
return /* @__PURE__ */ a(
|
|
1228
|
+
"div",
|
|
1229
|
+
{
|
|
1230
|
+
className: i(
|
|
1231
|
+
"flex shrink-0 items-center justify-end gap-3 border-t border-white/8 px-6 py-4",
|
|
1232
|
+
e
|
|
1233
|
+
),
|
|
1234
|
+
...t
|
|
1235
|
+
}
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1238
|
+
It.displayName = "DialogFooter";
|
|
1239
|
+
const Pt = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1240
|
+
y.Title,
|
|
1241
|
+
{
|
|
1242
|
+
ref: r,
|
|
1243
|
+
className: i(
|
|
1244
|
+
"font-display text-base font-semibold uppercase tracking-wider text-foreground",
|
|
1245
|
+
e
|
|
1246
|
+
),
|
|
1247
|
+
...t
|
|
1248
|
+
}
|
|
1249
|
+
));
|
|
1250
|
+
Pt.displayName = "DialogTitle";
|
|
1251
|
+
const Et = n.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
|
|
1252
|
+
y.Description,
|
|
1253
|
+
{
|
|
1254
|
+
ref: r,
|
|
1255
|
+
className: i("flex-1 overflow-y-auto px-6 py-4 text-sm text-muted-foreground", e),
|
|
1256
|
+
...t
|
|
1257
|
+
}
|
|
1258
|
+
));
|
|
1259
|
+
Et.displayName = "DialogDescription";
|
|
1260
|
+
const _t = h("shrink-0", {
|
|
1261
|
+
variants: {
|
|
1262
|
+
variant: {
|
|
1263
|
+
default: "bg-white/10",
|
|
1264
|
+
subtle: "bg-white/5",
|
|
1265
|
+
strong: "bg-white/25",
|
|
1266
|
+
glow: "bg-gradient-to-r from-transparent via-primary/40 to-transparent",
|
|
1267
|
+
accent: "bg-primary/30"
|
|
1268
|
+
},
|
|
1269
|
+
orientation: {
|
|
1270
|
+
horizontal: "h-px w-full",
|
|
1271
|
+
vertical: "w-px h-full"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
defaultVariants: {
|
|
1275
|
+
variant: "default",
|
|
1276
|
+
orientation: "horizontal"
|
|
1277
|
+
}
|
|
1278
|
+
}), $t = n.forwardRef(({ className: e, orientation: t = "horizontal", variant: r, decorative: o = !0, ...s }, d) => {
|
|
1279
|
+
const c = t ?? "horizontal";
|
|
1280
|
+
return /* @__PURE__ */ a(
|
|
1281
|
+
me.Root,
|
|
1282
|
+
{
|
|
1283
|
+
ref: d,
|
|
1284
|
+
decorative: o,
|
|
1285
|
+
orientation: c,
|
|
1286
|
+
className: i(
|
|
1287
|
+
_t({ variant: r, orientation: c }),
|
|
1288
|
+
e
|
|
1289
|
+
),
|
|
1290
|
+
...s
|
|
1291
|
+
}
|
|
1292
|
+
);
|
|
1293
|
+
});
|
|
1294
|
+
$t.displayName = "Separator";
|
|
1295
|
+
const Vt = n.forwardRef(
|
|
1296
|
+
({ children: e, className: t = "" }, r) => /* @__PURE__ */ l("span", { ref: r, className: `relative inline-block ${t}`, children: [
|
|
1297
|
+
/* @__PURE__ */ a("span", { className: "relative z-10", children: e }),
|
|
1298
|
+
/* @__PURE__ */ a(
|
|
1299
|
+
"span",
|
|
1300
|
+
{
|
|
1301
|
+
"aria-hidden": !0,
|
|
1302
|
+
className: "absolute inset-0 text-ef-cyan opacity-70 animate-glitch",
|
|
1303
|
+
style: {
|
|
1304
|
+
clipPath: "inset(20% 0 50% 0)",
|
|
1305
|
+
transform: "translate(-2px, 0)"
|
|
1306
|
+
},
|
|
1307
|
+
children: e
|
|
1308
|
+
}
|
|
1309
|
+
),
|
|
1310
|
+
/* @__PURE__ */ a(
|
|
1311
|
+
"span",
|
|
1312
|
+
{
|
|
1313
|
+
"aria-hidden": !0,
|
|
1314
|
+
className: "absolute inset-0 text-ef-red opacity-70 animate-glitch",
|
|
1315
|
+
style: {
|
|
1316
|
+
clipPath: "inset(50% 0 20% 0)",
|
|
1317
|
+
transform: "translate(2px, 0)",
|
|
1318
|
+
animationDelay: "0.1s"
|
|
1319
|
+
},
|
|
1320
|
+
children: e
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
] })
|
|
1324
|
+
);
|
|
1325
|
+
Vt.displayName = "GlitchText";
|
|
1326
|
+
const jt = { sm: 16, md: 28, lg: 44 }, Ot = n.forwardRef(({ size: e = "md", label: t, className: r }, o) => {
|
|
1327
|
+
const s = jt[e];
|
|
1328
|
+
return /* @__PURE__ */ l(
|
|
1329
|
+
"div",
|
|
1330
|
+
{
|
|
1331
|
+
ref: o,
|
|
1332
|
+
className: `flex flex-col items-center gap-3${r ? ` ${r}` : ""}`,
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ a("div", { className: "relative", style: { width: s * 2, height: s * 2 }, children: [0, 1, 2].map((d) => /* @__PURE__ */ a(
|
|
1335
|
+
"div",
|
|
1336
|
+
{
|
|
1337
|
+
className: "absolute inset-0 border-2 border-primary",
|
|
1338
|
+
style: {
|
|
1339
|
+
transform: `rotate(45deg) scale(${1 - d * 0.25})`,
|
|
1340
|
+
animation: `diamondSpin ${1.2 + d * 0.4}s linear infinite${d === 1 ? " reverse" : ""}`,
|
|
1341
|
+
opacity: 1 - d * 0.25
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
d
|
|
1345
|
+
)) }),
|
|
1346
|
+
t && /* @__PURE__ */ a("span", { className: "font-mono text-xs text-muted-foreground tracking-[0.15em] uppercase", children: t })
|
|
1347
|
+
]
|
|
1348
|
+
}
|
|
1349
|
+
);
|
|
1350
|
+
});
|
|
1351
|
+
Ot.displayName = "DiamondLoader";
|
|
1352
|
+
const Lt = {
|
|
1353
|
+
online: "ONLINE",
|
|
1354
|
+
warning: "CAUTION",
|
|
1355
|
+
offline: "OFFLINE",
|
|
1356
|
+
scanning: "SCANNING"
|
|
1357
|
+
}, zt = {
|
|
1358
|
+
online: "bg-ef-green",
|
|
1359
|
+
warning: "bg-ef-yellow",
|
|
1360
|
+
offline: "bg-ef-red",
|
|
1361
|
+
scanning: "bg-ef-cyan animate-pulse"
|
|
1362
|
+
}, Bt = n.forwardRef(({ title: e, status: t = "online", children: r, className: o }, s) => /* @__PURE__ */ l(
|
|
1363
|
+
"div",
|
|
1364
|
+
{
|
|
1365
|
+
ref: s,
|
|
1366
|
+
className: `relative border border-border bg-surface-1 scanline-overlay${o ? ` ${o}` : ""}`,
|
|
1367
|
+
children: [
|
|
1368
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between px-4 py-2.5 border-b border-border bg-surface-0", children: [
|
|
1369
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
1370
|
+
/* @__PURE__ */ a(le, { className: "w-3.5 h-3.5 text-primary" }),
|
|
1371
|
+
/* @__PURE__ */ a("span", { className: "font-display text-[11px] font-bold tracking-[0.15em] uppercase text-foreground", children: e })
|
|
1372
|
+
] }),
|
|
1373
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
1374
|
+
/* @__PURE__ */ a(
|
|
1375
|
+
"div",
|
|
1376
|
+
{
|
|
1377
|
+
className: `w-2 h-2 ${zt[t]}`,
|
|
1378
|
+
style: { clipPath: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)" }
|
|
1379
|
+
}
|
|
1380
|
+
),
|
|
1381
|
+
/* @__PURE__ */ a("span", { className: "font-mono text-[10px] tracking-[0.1em] text-muted-foreground", children: Lt[t] })
|
|
1382
|
+
] })
|
|
1383
|
+
] }),
|
|
1384
|
+
/* @__PURE__ */ a("div", { className: "absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-primary/40 pointer-events-none" }),
|
|
1385
|
+
/* @__PURE__ */ a("div", { className: "absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-primary/40 pointer-events-none" }),
|
|
1386
|
+
/* @__PURE__ */ a("div", { className: "absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-primary/40 pointer-events-none" }),
|
|
1387
|
+
/* @__PURE__ */ a("div", { className: "absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-primary/40 pointer-events-none" }),
|
|
1388
|
+
/* @__PURE__ */ a("div", { className: "p-5", children: r })
|
|
1389
|
+
]
|
|
1390
|
+
}
|
|
1391
|
+
));
|
|
1392
|
+
Bt.displayName = "TacticalPanel";
|
|
1393
|
+
const Mt = n.forwardRef(
|
|
1394
|
+
({ title: e, subtitle: t, icon: r, value: o, className: s }, d) => {
|
|
1395
|
+
const [c, p] = n.useState(!1);
|
|
1396
|
+
return /* @__PURE__ */ l(
|
|
1397
|
+
"div",
|
|
1398
|
+
{
|
|
1399
|
+
ref: d,
|
|
1400
|
+
className: `relative clip-corner border border-border bg-surface-1 p-6 overflow-hidden group cursor-pointer transition-all duration-500 hover:border-primary/30${s ? ` ${s}` : ""}`,
|
|
1401
|
+
onMouseEnter: () => p(!0),
|
|
1402
|
+
onMouseLeave: () => p(!1),
|
|
1403
|
+
children: [
|
|
1404
|
+
/* @__PURE__ */ a(
|
|
1405
|
+
"div",
|
|
1406
|
+
{
|
|
1407
|
+
className: "absolute left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent pointer-events-none transition-all",
|
|
1408
|
+
style: {
|
|
1409
|
+
top: c ? "100%" : "-10%",
|
|
1410
|
+
opacity: c ? 1 : 0,
|
|
1411
|
+
transitionDuration: "2000ms"
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
),
|
|
1415
|
+
/* @__PURE__ */ a(
|
|
1416
|
+
"div",
|
|
1417
|
+
{
|
|
1418
|
+
className: "absolute inset-0 pointer-events-none transition-opacity duration-500",
|
|
1419
|
+
style: {
|
|
1420
|
+
background: "linear-gradient(135deg, transparent 0%, hsl(var(--primary) / 0.03) 40%, transparent 60%)",
|
|
1421
|
+
opacity: c ? 1 : 0
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
),
|
|
1425
|
+
/* @__PURE__ */ l("div", { className: "relative z-10", children: [
|
|
1426
|
+
/* @__PURE__ */ a(r, { className: "w-5 h-5 text-primary mb-4 group-hover:drop-shadow-[0_0_8px_hsl(var(--primary)/0.5)] transition-all" }),
|
|
1427
|
+
o && /* @__PURE__ */ a("p", { className: "font-display text-3xl font-bold text-primary mb-1", children: o }),
|
|
1428
|
+
/* @__PURE__ */ a("h4", { className: "font-display text-sm font-bold tracking-[0.05em] uppercase text-foreground mb-1", children: e }),
|
|
1429
|
+
/* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: t })
|
|
1430
|
+
] }),
|
|
1431
|
+
/* @__PURE__ */ a("div", { className: "absolute bottom-3 right-3 text-primary/20 group-hover:text-primary/60 transition-colors text-xs", children: "◆" })
|
|
1432
|
+
]
|
|
1433
|
+
}
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1436
|
+
);
|
|
1437
|
+
Mt.displayName = "HoloCard";
|
|
1438
|
+
const Ft = [
|
|
1439
|
+
"[SYS] Initializing ENDFIELD protocol...",
|
|
1440
|
+
"[NET] Connection established — latency: 12ms",
|
|
1441
|
+
"[SEC] Authentication verified ◆ Level: ALPHA",
|
|
1442
|
+
"[DAT] Loading design tokens: 94 variables mapped",
|
|
1443
|
+
"[GPU] Render pipeline: Optimized (60fps locked)",
|
|
1444
|
+
"[SYS] Component registry: 70 modules online",
|
|
1445
|
+
"[NET] Sync complete — all nodes operational",
|
|
1446
|
+
"[DAT] Color system: HSL-based, 9 neutrals, 9 accents",
|
|
1447
|
+
"[SEC] Encryption: AES-256 ◆ Status: ACTIVE",
|
|
1448
|
+
"[SYS] ENDFIELD DESIGN SYSTEM v2.0 ◆ READY"
|
|
1449
|
+
], Gt = n.forwardRef(
|
|
1450
|
+
({ messages: e = Ft, className: t }, r) => {
|
|
1451
|
+
const [o, s] = n.useState([]), d = n.useRef(null);
|
|
1452
|
+
return n.useEffect(() => {
|
|
1453
|
+
let c = 0;
|
|
1454
|
+
const p = setInterval(() => {
|
|
1455
|
+
s((f) => {
|
|
1456
|
+
const m = [...f, e[c % e.length]];
|
|
1457
|
+
return m.length > 8 ? m.slice(-8) : m;
|
|
1458
|
+
}), c++;
|
|
1459
|
+
}, 1200);
|
|
1460
|
+
return () => clearInterval(p);
|
|
1461
|
+
}, [e]), n.useEffect(() => {
|
|
1462
|
+
d.current && (d.current.scrollTop = d.current.scrollHeight);
|
|
1463
|
+
}, [o]), /* @__PURE__ */ l(
|
|
1464
|
+
"div",
|
|
1465
|
+
{
|
|
1466
|
+
ref: r,
|
|
1467
|
+
className: `border border-border bg-background clip-corner overflow-hidden${t ? ` ${t}` : ""}`,
|
|
1468
|
+
children: [
|
|
1469
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2 px-4 py-2 border-b border-border bg-surface-0", children: [
|
|
1470
|
+
/* @__PURE__ */ a(de, { className: "w-3.5 h-3.5 text-primary" }),
|
|
1471
|
+
/* @__PURE__ */ a("span", { className: "font-mono text-[10px] tracking-[0.1em] text-muted-foreground uppercase", children: "LIVE FEED" }),
|
|
1472
|
+
/* @__PURE__ */ l("div", { className: "ml-auto flex items-center gap-1.5", children: [
|
|
1473
|
+
/* @__PURE__ */ a(
|
|
1474
|
+
"div",
|
|
1475
|
+
{
|
|
1476
|
+
className: "w-1.5 h-1.5 bg-ef-green animate-pulse",
|
|
1477
|
+
style: { clipPath: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)" }
|
|
1478
|
+
}
|
|
1479
|
+
),
|
|
1480
|
+
/* @__PURE__ */ a("span", { className: "font-mono text-[10px] text-ef-green", children: "ACTIVE" })
|
|
1481
|
+
] })
|
|
1482
|
+
] }),
|
|
1483
|
+
/* @__PURE__ */ l(
|
|
1484
|
+
"div",
|
|
1485
|
+
{
|
|
1486
|
+
ref: d,
|
|
1487
|
+
className: "p-4 h-48 overflow-y-auto font-mono text-xs space-y-1",
|
|
1488
|
+
children: [
|
|
1489
|
+
/* @__PURE__ */ a(ue, { children: o.map((c, p) => /* @__PURE__ */ a(
|
|
1490
|
+
V.div,
|
|
1491
|
+
{
|
|
1492
|
+
initial: { opacity: 0, x: -10 },
|
|
1493
|
+
animate: { opacity: 1, x: 0 },
|
|
1494
|
+
className: c.includes("[SEC]") ? "text-ef-green" : c.includes("[NET]") ? "text-ef-blue" : c.includes("[DAT]") ? "text-ef-cyan" : c.includes("[GPU]") ? "text-ef-purple" : "text-muted-foreground",
|
|
1495
|
+
children: c
|
|
1496
|
+
},
|
|
1497
|
+
`${c}-${p}`
|
|
1498
|
+
)) }),
|
|
1499
|
+
/* @__PURE__ */ a("span", { className: "inline-block w-2 h-4 bg-primary animate-cursor-blink" })
|
|
1500
|
+
]
|
|
1501
|
+
}
|
|
1502
|
+
)
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
);
|
|
1506
|
+
}
|
|
1507
|
+
);
|
|
1508
|
+
Gt.displayName = "DataStream";
|
|
1509
|
+
const Ht = h(
|
|
1510
|
+
"inline-flex items-center gap-1.5 clip-corner-sm border px-3 py-1 font-display text-[10px] font-bold tracking-[0.15em] uppercase",
|
|
1511
|
+
{
|
|
1512
|
+
variants: {
|
|
1513
|
+
variant: {
|
|
1514
|
+
default: "border-primary/40 text-primary bg-primary/10",
|
|
1515
|
+
success: "border-ef-green/40 text-ef-green bg-ef-green/10",
|
|
1516
|
+
warning: "border-ef-yellow/40 text-ef-yellow bg-ef-yellow/10",
|
|
1517
|
+
danger: "border-ef-red/40 text-ef-red bg-ef-red/10",
|
|
1518
|
+
info: "border-ef-cyan/40 text-ef-cyan bg-ef-cyan/10"
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
defaultVariants: {
|
|
1522
|
+
variant: "default"
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
), Ut = n.forwardRef(({ variant: e, className: t, children: r, ...o }, s) => /* @__PURE__ */ l(
|
|
1526
|
+
"span",
|
|
1527
|
+
{
|
|
1528
|
+
ref: s,
|
|
1529
|
+
className: i(Ht({ variant: e }), t),
|
|
1530
|
+
...o,
|
|
1531
|
+
children: [
|
|
1532
|
+
/* @__PURE__ */ a("span", { style: { fontSize: "6px" }, children: "◆" }),
|
|
1533
|
+
r
|
|
1534
|
+
]
|
|
1535
|
+
}
|
|
1536
|
+
));
|
|
1537
|
+
Ut.displayName = "TacticalBadge";
|
|
1538
|
+
const Wt = {
|
|
1539
|
+
caution: {
|
|
1540
|
+
border: "border-ef-yellow/30",
|
|
1541
|
+
bg: "bg-ef-yellow/5",
|
|
1542
|
+
icon: "text-ef-yellow",
|
|
1543
|
+
label: "CAUTION"
|
|
1544
|
+
},
|
|
1545
|
+
alert: {
|
|
1546
|
+
border: "border-ef-orange/30",
|
|
1547
|
+
bg: "bg-ef-orange/5",
|
|
1548
|
+
icon: "text-ef-orange",
|
|
1549
|
+
label: "ALERT"
|
|
1550
|
+
},
|
|
1551
|
+
critical: {
|
|
1552
|
+
border: "border-ef-red/30",
|
|
1553
|
+
bg: "bg-ef-red/5",
|
|
1554
|
+
icon: "text-ef-red",
|
|
1555
|
+
label: "CRITICAL"
|
|
1556
|
+
}
|
|
1557
|
+
}, Yt = n.forwardRef(({ level: e = "caution", children: t, className: r }, o) => {
|
|
1558
|
+
const s = Wt[e];
|
|
1559
|
+
return /* @__PURE__ */ l(
|
|
1560
|
+
"div",
|
|
1561
|
+
{
|
|
1562
|
+
ref: o,
|
|
1563
|
+
className: `clip-corner border ${s.border} ${s.bg} p-4 flex items-start gap-3${r ? ` ${r}` : ""}`,
|
|
1564
|
+
children: [
|
|
1565
|
+
/* @__PURE__ */ a(ce, { className: `w-5 h-5 ${s.icon} shrink-0 mt-0.5` }),
|
|
1566
|
+
/* @__PURE__ */ l("div", { children: [
|
|
1567
|
+
/* @__PURE__ */ a(
|
|
1568
|
+
"span",
|
|
1569
|
+
{
|
|
1570
|
+
className: `font-display text-[11px] font-bold tracking-[0.15em] ${s.icon}`,
|
|
1571
|
+
children: s.label
|
|
1572
|
+
}
|
|
1573
|
+
),
|
|
1574
|
+
/* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground mt-1", children: t })
|
|
1575
|
+
] })
|
|
1576
|
+
]
|
|
1577
|
+
}
|
|
1578
|
+
);
|
|
1579
|
+
});
|
|
1580
|
+
Yt.displayName = "WarningBanner";
|
|
1581
|
+
const Xt = n.forwardRef(
|
|
1582
|
+
({ label: e, className: t }, r) => /* @__PURE__ */ l(
|
|
1583
|
+
"div",
|
|
1584
|
+
{
|
|
1585
|
+
ref: r,
|
|
1586
|
+
className: `relative flex items-center gap-4 py-2${t ? ` ${t}` : ""}`,
|
|
1587
|
+
children: [
|
|
1588
|
+
/* @__PURE__ */ a("div", { className: "flex-1 h-px bg-gradient-to-r from-transparent via-primary/30 to-transparent" }),
|
|
1589
|
+
e && /* @__PURE__ */ l("span", { className: "font-display text-[10px] font-bold tracking-[0.2em] uppercase text-primary/60 flex items-center gap-2", children: [
|
|
1590
|
+
/* @__PURE__ */ a("span", { style: { fontSize: "6px" }, children: "◆" }),
|
|
1591
|
+
" ",
|
|
1592
|
+
e,
|
|
1593
|
+
" ",
|
|
1594
|
+
/* @__PURE__ */ a("span", { style: { fontSize: "6px" }, children: "◆" })
|
|
1595
|
+
] }),
|
|
1596
|
+
/* @__PURE__ */ a("div", { className: "flex-1 h-px bg-gradient-to-r from-transparent via-primary/30 to-transparent" })
|
|
1597
|
+
]
|
|
1598
|
+
}
|
|
1599
|
+
)
|
|
1600
|
+
);
|
|
1601
|
+
Xt.displayName = "ScanDivider";
|
|
1602
|
+
const Kt = n.forwardRef(({ label: e, value: t, unit: r, className: o }, s) => /* @__PURE__ */ l(
|
|
1603
|
+
"div",
|
|
1604
|
+
{
|
|
1605
|
+
ref: s,
|
|
1606
|
+
className: `inline-flex items-center border border-border bg-surface-0 overflow-hidden${o ? ` ${o}` : ""}`,
|
|
1607
|
+
children: [
|
|
1608
|
+
/* @__PURE__ */ a("span", { className: "font-mono text-[10px] tracking-[0.1em] uppercase text-muted-foreground bg-surface-2 px-2.5 py-1.5 border-r border-border", children: e }),
|
|
1609
|
+
/* @__PURE__ */ a("span", { className: "font-mono text-xs text-primary px-2.5 py-1.5 font-bold", children: t }),
|
|
1610
|
+
r && /* @__PURE__ */ a("span", { className: "font-mono text-[10px] text-muted-foreground pr-2.5", children: r })
|
|
1611
|
+
]
|
|
1612
|
+
}
|
|
1613
|
+
));
|
|
1614
|
+
Kt.displayName = "CoordinateTag";
|
|
1615
|
+
const qt = n.forwardRef(
|
|
1616
|
+
({ data: e, size: t = 260, color: r = "primary", className: o }, s) => {
|
|
1617
|
+
const d = n.useRef(null), c = ge(d, { once: !0 }), p = n.useCallback(
|
|
1618
|
+
(u) => {
|
|
1619
|
+
d.current = u, typeof s == "function" ? s(u) : s && (s.current = u);
|
|
1620
|
+
},
|
|
1621
|
+
[s]
|
|
1622
|
+
), f = t / 2, m = t / 2, g = t * 0.38, w = 4, re = e.length, O = Math.PI * 2 / re, T = r === "cyan" ? "--ef-cyan" : "--primary", C = (u, b) => ({
|
|
1623
|
+
x: f + b * Math.sin(u * O),
|
|
1624
|
+
y: m - b * Math.cos(u * O)
|
|
1625
|
+
}), ae = Array.from({ length: w }, (u, b) => {
|
|
1626
|
+
const N = g * ((b + 1) / w);
|
|
1627
|
+
return e.map((E, oe) => C(oe, N)).map((E) => `${E.x},${E.y}`).join(" ");
|
|
1628
|
+
}), L = e.map((u, b) => C(b, u.value / 100 * g)), z = L.map((u) => `${u.x},${u.y}`).join(" "), B = e.map(() => `${f},${m}`).join(" ");
|
|
1629
|
+
return /* @__PURE__ */ a(
|
|
1630
|
+
"div",
|
|
1631
|
+
{
|
|
1632
|
+
ref: p,
|
|
1633
|
+
className: `flex flex-col items-center w-full${o ? ` ${o}` : ""}`,
|
|
1634
|
+
children: /* @__PURE__ */ l(
|
|
1635
|
+
"svg",
|
|
1636
|
+
{
|
|
1637
|
+
viewBox: `0 0 ${t} ${t}`,
|
|
1638
|
+
className: "w-full max-w-[260px] h-auto overflow-visible",
|
|
1639
|
+
children: [
|
|
1640
|
+
ae.map((u, b) => /* @__PURE__ */ a(
|
|
1641
|
+
"polygon",
|
|
1642
|
+
{
|
|
1643
|
+
points: u,
|
|
1644
|
+
fill: "none",
|
|
1645
|
+
stroke: "hsl(var(--border))",
|
|
1646
|
+
strokeWidth: 1,
|
|
1647
|
+
opacity: 0.5
|
|
1648
|
+
},
|
|
1649
|
+
b
|
|
1650
|
+
)),
|
|
1651
|
+
e.map((u, b) => {
|
|
1652
|
+
const N = C(b, g);
|
|
1653
|
+
return /* @__PURE__ */ a(
|
|
1654
|
+
"line",
|
|
1655
|
+
{
|
|
1656
|
+
x1: f,
|
|
1657
|
+
y1: m,
|
|
1658
|
+
x2: N.x,
|
|
1659
|
+
y2: N.y,
|
|
1660
|
+
stroke: "hsl(var(--border))",
|
|
1661
|
+
strokeWidth: 1,
|
|
1662
|
+
opacity: 0.3
|
|
1663
|
+
},
|
|
1664
|
+
b
|
|
1665
|
+
);
|
|
1666
|
+
}),
|
|
1667
|
+
/* @__PURE__ */ a(
|
|
1668
|
+
V.polygon,
|
|
1669
|
+
{
|
|
1670
|
+
points: c ? z : B,
|
|
1671
|
+
fill: `hsl(var(${T}) / 0.15)`,
|
|
1672
|
+
stroke: `hsl(var(${T}))`,
|
|
1673
|
+
strokeWidth: 2,
|
|
1674
|
+
initial: !1,
|
|
1675
|
+
animate: { points: c ? z : B },
|
|
1676
|
+
transition: { duration: 0.8, ease: [0.25, 0.8, 0.25, 1] },
|
|
1677
|
+
style: {
|
|
1678
|
+
filter: `drop-shadow(0 0 8px hsl(var(${T}) / 0.3))`
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
),
|
|
1682
|
+
L.map((u, b) => /* @__PURE__ */ a(
|
|
1683
|
+
V.circle,
|
|
1684
|
+
{
|
|
1685
|
+
cx: f,
|
|
1686
|
+
cy: m,
|
|
1687
|
+
r: 4,
|
|
1688
|
+
fill: `hsl(var(${T}))`,
|
|
1689
|
+
stroke: "hsl(var(--background))",
|
|
1690
|
+
strokeWidth: 2,
|
|
1691
|
+
initial: !1,
|
|
1692
|
+
animate: { cx: c ? u.x : f, cy: c ? u.y : m },
|
|
1693
|
+
transition: { duration: 0.8, delay: b * 0.05 },
|
|
1694
|
+
style: {
|
|
1695
|
+
filter: `drop-shadow(0 0 4px hsl(var(${T}) / 0.5))`
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
b
|
|
1699
|
+
)),
|
|
1700
|
+
e.map((u, b) => {
|
|
1701
|
+
const N = C(b, g + 20);
|
|
1702
|
+
return /* @__PURE__ */ a(
|
|
1703
|
+
"text",
|
|
1704
|
+
{
|
|
1705
|
+
x: N.x,
|
|
1706
|
+
y: N.y,
|
|
1707
|
+
textAnchor: "middle",
|
|
1708
|
+
dominantBaseline: "middle",
|
|
1709
|
+
className: "font-display text-[9px] font-bold tracking-[0.1em] uppercase",
|
|
1710
|
+
fill: "hsl(var(--muted-foreground))",
|
|
1711
|
+
children: u.label
|
|
1712
|
+
},
|
|
1713
|
+
b
|
|
1714
|
+
);
|
|
1715
|
+
})
|
|
1716
|
+
]
|
|
1717
|
+
}
|
|
1718
|
+
)
|
|
1719
|
+
}
|
|
1720
|
+
);
|
|
1721
|
+
}
|
|
1722
|
+
);
|
|
1723
|
+
qt.displayName = "RadarChart";
|
|
1724
|
+
const Qt = n.forwardRef(
|
|
1725
|
+
({
|
|
1726
|
+
children: e,
|
|
1727
|
+
systemLabel: t = "SYS::ENDFIELD v2.0",
|
|
1728
|
+
lat: r = "LAT 37.7749°N",
|
|
1729
|
+
lon: o = "LON 122.4194°W",
|
|
1730
|
+
showCoords: s = !0,
|
|
1731
|
+
showCrosshair: d = !0,
|
|
1732
|
+
className: c
|
|
1733
|
+
}, p) => {
|
|
1734
|
+
const [f, m] = n.useState("");
|
|
1735
|
+
return n.useEffect(() => {
|
|
1736
|
+
const g = () => m((/* @__PURE__ */ new Date()).toLocaleTimeString("en-GB"));
|
|
1737
|
+
g();
|
|
1738
|
+
const w = setInterval(g, 1e3);
|
|
1739
|
+
return () => clearInterval(w);
|
|
1740
|
+
}, []), /* @__PURE__ */ l(
|
|
1741
|
+
"div",
|
|
1742
|
+
{
|
|
1743
|
+
ref: p,
|
|
1744
|
+
className: `relative border border-border bg-surface-0 aspect-video flex items-center justify-center overflow-hidden${c ? ` ${c}` : ""}`,
|
|
1745
|
+
children: [
|
|
1746
|
+
/* @__PURE__ */ a("div", { className: "absolute inset-0 scanline-overlay" }),
|
|
1747
|
+
[
|
|
1748
|
+
"top-3 left-3 border-t-2 border-l-2",
|
|
1749
|
+
"top-3 right-3 border-t-2 border-r-2",
|
|
1750
|
+
"bottom-3 left-3 border-b-2 border-l-2",
|
|
1751
|
+
"bottom-3 right-3 border-b-2 border-r-2"
|
|
1752
|
+
].map((g, w) => /* @__PURE__ */ a(
|
|
1753
|
+
"div",
|
|
1754
|
+
{
|
|
1755
|
+
className: `absolute w-8 h-8 ${g} border-primary/40 pointer-events-none`
|
|
1756
|
+
},
|
|
1757
|
+
w
|
|
1758
|
+
)),
|
|
1759
|
+
d && /* @__PURE__ */ l("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none", children: [
|
|
1760
|
+
/* @__PURE__ */ a(
|
|
1761
|
+
"div",
|
|
1762
|
+
{
|
|
1763
|
+
className: "w-6 h-px bg-primary/20",
|
|
1764
|
+
style: { position: "absolute", top: "50%", left: "-12px" }
|
|
1765
|
+
}
|
|
1766
|
+
),
|
|
1767
|
+
/* @__PURE__ */ a(
|
|
1768
|
+
"div",
|
|
1769
|
+
{
|
|
1770
|
+
className: "h-6 w-px bg-primary/20",
|
|
1771
|
+
style: { position: "absolute", left: "50%", top: "-12px" }
|
|
1772
|
+
}
|
|
1773
|
+
)
|
|
1774
|
+
] }),
|
|
1775
|
+
s && /* @__PURE__ */ l("div", { className: "absolute top-4 left-12 font-mono text-[9px] text-muted-foreground/60 space-y-0.5", children: [
|
|
1776
|
+
/* @__PURE__ */ a("div", { children: t }),
|
|
1777
|
+
/* @__PURE__ */ a("div", { className: "text-primary/60", children: f })
|
|
1778
|
+
] }),
|
|
1779
|
+
s && /* @__PURE__ */ l("div", { className: "absolute top-4 right-12 font-mono text-[9px] text-muted-foreground/60 text-right space-y-0.5", children: [
|
|
1780
|
+
/* @__PURE__ */ a("div", { children: r }),
|
|
1781
|
+
/* @__PURE__ */ a("div", { children: o })
|
|
1782
|
+
] }),
|
|
1783
|
+
/* @__PURE__ */ l("div", { className: "absolute bottom-4 left-12 right-12 flex items-center justify-between", children: [
|
|
1784
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
1785
|
+
/* @__PURE__ */ a(
|
|
1786
|
+
"div",
|
|
1787
|
+
{
|
|
1788
|
+
className: "w-1.5 h-1.5 bg-ef-green",
|
|
1789
|
+
style: { clipPath: "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)" }
|
|
1790
|
+
}
|
|
1791
|
+
),
|
|
1792
|
+
/* @__PURE__ */ a("span", { className: "font-mono text-[9px] text-ef-green/80", children: "LINK ACTIVE" })
|
|
1793
|
+
] }),
|
|
1794
|
+
/* @__PURE__ */ a("div", { className: "flex gap-4", children: ["FPS:60", "MEM:47%", "NET:12ms"].map((g) => /* @__PURE__ */ a(
|
|
1795
|
+
"span",
|
|
1796
|
+
{
|
|
1797
|
+
className: "font-mono text-[9px] text-muted-foreground/50",
|
|
1798
|
+
children: g
|
|
1799
|
+
},
|
|
1800
|
+
g
|
|
1801
|
+
)) })
|
|
1802
|
+
] }),
|
|
1803
|
+
/* @__PURE__ */ a("div", { className: "relative z-10", children: e })
|
|
1804
|
+
]
|
|
1805
|
+
}
|
|
1806
|
+
);
|
|
226
1807
|
}
|
|
227
1808
|
);
|
|
1809
|
+
Qt.displayName = "HUDOverlay";
|
|
228
1810
|
export {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
1811
|
+
ct as Accordion,
|
|
1812
|
+
mt as AccordionContent,
|
|
1813
|
+
pt as AccordionItem,
|
|
1814
|
+
ft as AccordionTrigger,
|
|
1815
|
+
ot as Avatar,
|
|
1816
|
+
st as AvatarFallback,
|
|
1817
|
+
nt as AvatarImage,
|
|
1818
|
+
Ce as Badge,
|
|
1819
|
+
Re as Button,
|
|
1820
|
+
Pe as Card,
|
|
1821
|
+
je as CardBody,
|
|
1822
|
+
Ve as CardDescription,
|
|
1823
|
+
Oe as CardFooter,
|
|
1824
|
+
Ee as CardHeader,
|
|
1825
|
+
_e as CardMeta,
|
|
1826
|
+
$e as CardTitle,
|
|
1827
|
+
He as Checkbox,
|
|
1828
|
+
Kt as CoordinateTag,
|
|
1829
|
+
Gt as DataStream,
|
|
1830
|
+
St as Dialog,
|
|
1831
|
+
Rt as DialogClose,
|
|
1832
|
+
Ct as DialogContent,
|
|
1833
|
+
Et as DialogDescription,
|
|
1834
|
+
It as DialogFooter,
|
|
1835
|
+
Dt as DialogHeader,
|
|
1836
|
+
te as DialogOverlay,
|
|
1837
|
+
ee as DialogPortal,
|
|
1838
|
+
Pt as DialogTitle,
|
|
1839
|
+
kt as DialogTrigger,
|
|
1840
|
+
Ot as DiamondLoader,
|
|
1841
|
+
Vt as GlitchText,
|
|
1842
|
+
Qt as HUDOverlay,
|
|
1843
|
+
Me as HelperText,
|
|
1844
|
+
Mt as HoloCard,
|
|
1845
|
+
ze as Input,
|
|
1846
|
+
Be as Label,
|
|
1847
|
+
yt as Popover,
|
|
1848
|
+
wt as PopoverAnchor,
|
|
1849
|
+
Tt as PopoverContent,
|
|
1850
|
+
Nt as PopoverTrigger,
|
|
1851
|
+
dt as Progress,
|
|
1852
|
+
qt as RadarChart,
|
|
1853
|
+
Ue as RadioGroup,
|
|
1854
|
+
We as RadioGroupItem,
|
|
1855
|
+
Xt as ScanDivider,
|
|
1856
|
+
Xe as Select,
|
|
1857
|
+
Ze as SelectContent,
|
|
1858
|
+
Ke as SelectGroup,
|
|
1859
|
+
et as SelectItem,
|
|
1860
|
+
Je as SelectLabel,
|
|
1861
|
+
J as SelectScrollDownButton,
|
|
1862
|
+
Z as SelectScrollUpButton,
|
|
1863
|
+
tt as SelectSeparator,
|
|
1864
|
+
Qe as SelectTrigger,
|
|
1865
|
+
qe as SelectValue,
|
|
1866
|
+
$t as Separator,
|
|
1867
|
+
cr as SonnerToaster,
|
|
1868
|
+
Ye as Switch,
|
|
1869
|
+
ut as Tabs,
|
|
1870
|
+
vt as TabsContent,
|
|
1871
|
+
bt as TabsList,
|
|
1872
|
+
ht as TabsTrigger,
|
|
1873
|
+
Ut as TacticalBadge,
|
|
1874
|
+
Bt as TacticalPanel,
|
|
1875
|
+
Ge as Textarea,
|
|
1876
|
+
X as Toast,
|
|
1877
|
+
ve as ToastAction,
|
|
1878
|
+
K as ToastClose,
|
|
1879
|
+
Q as ToastDescription,
|
|
1880
|
+
xe as ToastProvider,
|
|
1881
|
+
q as ToastTitle,
|
|
1882
|
+
Y as ToastViewport,
|
|
1883
|
+
dr as Toaster,
|
|
1884
|
+
ir as Tooltip,
|
|
1885
|
+
be as TooltipContent,
|
|
1886
|
+
sr as TooltipProvider,
|
|
1887
|
+
lr as TooltipTrigger,
|
|
1888
|
+
Yt as WarningBanner,
|
|
1889
|
+
rt as avatarVariants,
|
|
1890
|
+
Ae as badgeVariants,
|
|
1891
|
+
U as buttonVariants,
|
|
1892
|
+
Ie as cardVariants,
|
|
1893
|
+
i as cn,
|
|
1894
|
+
At as dialogContentVariants,
|
|
1895
|
+
Le as inputWrapperVariants,
|
|
1896
|
+
lt as progressFillVariants,
|
|
1897
|
+
it as progressTrackVariants,
|
|
1898
|
+
_t as separatorVariants,
|
|
1899
|
+
gt as tabsListVariants,
|
|
1900
|
+
xt as tabsTriggerVariants,
|
|
1901
|
+
Ht as tacticalBadgeVariants,
|
|
1902
|
+
Fe as textareaVariants,
|
|
1903
|
+
mr as toast,
|
|
1904
|
+
Se as toastAction,
|
|
1905
|
+
ke as useToast
|
|
246
1906
|
};
|
|
247
1907
|
//# sourceMappingURL=index.mjs.map
|