@viglet/viglet-design-system 2026.3.12 → 2026.3.13
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 +39 -10
- package/dist/bento/bento-calendar.d.ts +52 -0
- package/dist/bento/bento-calendar.d.ts.map +1 -0
- package/dist/bento/bento-change-mark.d.ts +21 -0
- package/dist/bento/bento-change-mark.d.ts.map +1 -0
- package/dist/bento/bento-data-table.d.ts +8 -1
- package/dist/bento/bento-data-table.d.ts.map +1 -1
- package/dist/bento/bento-diff.d.ts +10 -1
- package/dist/bento/bento-diff.d.ts.map +1 -1
- package/dist/bento/bento-split-page.d.ts +31 -0
- package/dist/bento/bento-split-page.d.ts.map +1 -0
- package/dist/bento/bento-version-rail.d.ts.map +1 -1
- package/dist/bento/index.d.ts +4 -1
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +4 -4
- package/dist/bento.es.js +1430 -787
- package/dist/catalogue.json +189 -1
- package/dist/components/ui/viglet-assistant.d.ts +7 -1
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -1
- package/dist/exports.json +14 -1
- package/dist/i18n/index.d.ts +44 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/bento.json.d.ts +22 -0
- package/dist/i18n/locales/pt/bento.json.d.ts +22 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +40 -0
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +971 -1083
- package/dist/preset.css +1 -1
- package/dist/{user.context-BXQ7lgg5.js → user.context-D3kmD3_y.js} +285 -169
- package/dist/user.context-gQvBxcwr.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/docs/BENTO-AUTHORING.md +13 -2
- package/docs/reference/README.md +2 -1
- package/docs/reference/canvas.json +10 -1
- package/docs/reference/split.dc.html +164 -0
- package/package.json +1 -1
- package/scripts/lib/contrast.mjs +29 -3
- package/scripts/page-reference.mjs +3 -3
- package/dist/user.context-D01CI8gq.cjs +0 -1
|
@@ -6,17 +6,19 @@ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
|
6
6
|
import * as b from "@radix-ui/react-avatar";
|
|
7
7
|
import { Slot as x } from "@radix-ui/react-slot";
|
|
8
8
|
import { cva as S } from "class-variance-authority";
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import { IconChevronDown as
|
|
13
|
-
import { Icon as
|
|
14
|
-
import { Popover as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
9
|
+
import { useTranslation as te } from "react-i18next";
|
|
10
|
+
import * as C from "@radix-ui/react-checkbox";
|
|
11
|
+
import * as w from "@radix-ui/react-dropdown-menu";
|
|
12
|
+
import { IconChevronDown as T, IconLoader2 as ne, IconSearch as re, IconSparkles as ie, IconTrash as ae } from "@tabler/icons-react";
|
|
13
|
+
import { Icon as E } from "@iconify/react";
|
|
14
|
+
import { Popover as D } from "radix-ui";
|
|
15
|
+
import { Group as O, Panel as k, Separator as A } from "react-resizable-panels";
|
|
16
|
+
import * as j from "@radix-ui/react-tooltip";
|
|
17
|
+
import { useTheme as M } from "next-themes";
|
|
18
|
+
import { Toaster as N, toast as P } from "sonner";
|
|
19
|
+
import * as F from "@radix-ui/react-tabs";
|
|
18
20
|
//#region node_modules/lucide-react/dist/esm/icons/check.mjs
|
|
19
|
-
var
|
|
21
|
+
var I = {
|
|
20
22
|
name: "check",
|
|
21
23
|
size: 24,
|
|
22
24
|
node: [["path", {
|
|
@@ -24,8 +26,8 @@ var P = {
|
|
|
24
26
|
key: "1gmf2c"
|
|
25
27
|
}]]
|
|
26
28
|
};
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
+
I.node;
|
|
30
|
+
var L = t(I), R = {
|
|
29
31
|
name: "chevron-right",
|
|
30
32
|
size: 24,
|
|
31
33
|
node: [["path", {
|
|
@@ -33,8 +35,8 @@ var F = t(P), I = {
|
|
|
33
35
|
key: "mthhwq"
|
|
34
36
|
}]]
|
|
35
37
|
};
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
+
R.node;
|
|
39
|
+
var z = t(R), B = {
|
|
38
40
|
name: "circle-check",
|
|
39
41
|
size: 24,
|
|
40
42
|
node: [["circle", {
|
|
@@ -48,8 +50,8 @@ var L = t(I), R = {
|
|
|
48
50
|
}]],
|
|
49
51
|
aliases: ["check-circle-2"]
|
|
50
52
|
};
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
+
B.node;
|
|
54
|
+
var oe = t(B), V = {
|
|
53
55
|
name: "circle",
|
|
54
56
|
size: 24,
|
|
55
57
|
node: [["circle", {
|
|
@@ -59,8 +61,51 @@ var z = t(R), B = {
|
|
|
59
61
|
key: "1mglay"
|
|
60
62
|
}]]
|
|
61
63
|
};
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
+
V.node;
|
|
65
|
+
var se = t(V), H = {
|
|
66
|
+
name: "grip-vertical",
|
|
67
|
+
size: 24,
|
|
68
|
+
node: [
|
|
69
|
+
["circle", {
|
|
70
|
+
cx: "9",
|
|
71
|
+
cy: "12",
|
|
72
|
+
r: "1",
|
|
73
|
+
key: "1vctgf"
|
|
74
|
+
}],
|
|
75
|
+
["circle", {
|
|
76
|
+
cx: "9",
|
|
77
|
+
cy: "5",
|
|
78
|
+
r: "1",
|
|
79
|
+
key: "hp0tcf"
|
|
80
|
+
}],
|
|
81
|
+
["circle", {
|
|
82
|
+
cx: "9",
|
|
83
|
+
cy: "19",
|
|
84
|
+
r: "1",
|
|
85
|
+
key: "fkjjf6"
|
|
86
|
+
}],
|
|
87
|
+
["circle", {
|
|
88
|
+
cx: "15",
|
|
89
|
+
cy: "12",
|
|
90
|
+
r: "1",
|
|
91
|
+
key: "1tmaij"
|
|
92
|
+
}],
|
|
93
|
+
["circle", {
|
|
94
|
+
cx: "15",
|
|
95
|
+
cy: "5",
|
|
96
|
+
r: "1",
|
|
97
|
+
key: "19l28e"
|
|
98
|
+
}],
|
|
99
|
+
["circle", {
|
|
100
|
+
cx: "15",
|
|
101
|
+
cy: "19",
|
|
102
|
+
r: "1",
|
|
103
|
+
key: "f4zoj3"
|
|
104
|
+
}]
|
|
105
|
+
]
|
|
106
|
+
};
|
|
107
|
+
H.node;
|
|
108
|
+
var ce = t(H), U = {
|
|
64
109
|
name: "info",
|
|
65
110
|
size: 24,
|
|
66
111
|
node: [
|
|
@@ -80,8 +125,8 @@ var V = t(B), H = {
|
|
|
80
125
|
}]
|
|
81
126
|
]
|
|
82
127
|
};
|
|
83
|
-
|
|
84
|
-
var
|
|
128
|
+
U.node;
|
|
129
|
+
var le = t(U), W = {
|
|
85
130
|
name: "loader-circle",
|
|
86
131
|
size: 24,
|
|
87
132
|
node: [["path", {
|
|
@@ -90,8 +135,8 @@ var ie = t(H), U = {
|
|
|
90
135
|
}]],
|
|
91
136
|
aliases: ["loader-2"]
|
|
92
137
|
};
|
|
93
|
-
|
|
94
|
-
var
|
|
138
|
+
W.node;
|
|
139
|
+
var ue = t(W), G = {
|
|
95
140
|
name: "octagon-x",
|
|
96
141
|
size: 24,
|
|
97
142
|
node: [
|
|
@@ -110,8 +155,8 @@ var ae = t(U), W = {
|
|
|
110
155
|
],
|
|
111
156
|
aliases: ["x-octagon"]
|
|
112
157
|
};
|
|
113
|
-
|
|
114
|
-
var
|
|
158
|
+
G.node;
|
|
159
|
+
var de = t(G), K = {
|
|
115
160
|
name: "triangle-alert",
|
|
116
161
|
size: 24,
|
|
117
162
|
node: [
|
|
@@ -130,8 +175,8 @@ var oe = t(W), G = {
|
|
|
130
175
|
],
|
|
131
176
|
aliases: ["alert-triangle"]
|
|
132
177
|
};
|
|
133
|
-
|
|
134
|
-
var
|
|
178
|
+
K.node;
|
|
179
|
+
var fe = t(K), q = S("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none 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", {
|
|
135
180
|
variants: {
|
|
136
181
|
variant: {
|
|
137
182
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -155,11 +200,11 @@ var se = t(G), K = S("inline-flex items-center justify-center gap-2 whitespace-n
|
|
|
155
200
|
size: "default"
|
|
156
201
|
}
|
|
157
202
|
});
|
|
158
|
-
function
|
|
203
|
+
function pe({ className: t, variant: n, size: r, asChild: i = !1, loading: a = !1, onClick: o, children: s, ...u }) {
|
|
159
204
|
let d = i ? x : "button", f = l(a, u["aria-disabled"], o);
|
|
160
205
|
return /* @__PURE__ */ v(d, {
|
|
161
206
|
"data-slot": "button",
|
|
162
|
-
className: e(
|
|
207
|
+
className: e(q({
|
|
163
208
|
variant: n,
|
|
164
209
|
size: r,
|
|
165
210
|
className: t
|
|
@@ -171,54 +216,54 @@ function ce({ className: t, variant: n, size: r, asChild: i = !1, loading: a = !
|
|
|
171
216
|
}
|
|
172
217
|
//#endregion
|
|
173
218
|
//#region src/components/ui/checkbox.tsx
|
|
174
|
-
function
|
|
175
|
-
return /* @__PURE__ */ v(
|
|
219
|
+
function me({ className: t, ...n }) {
|
|
220
|
+
return /* @__PURE__ */ v(C.Root, {
|
|
176
221
|
"data-slot": "checkbox",
|
|
177
222
|
className: e("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
178
223
|
...n,
|
|
179
|
-
children: /* @__PURE__ */ v(
|
|
224
|
+
children: /* @__PURE__ */ v(C.Indicator, {
|
|
180
225
|
"data-slot": "checkbox-indicator",
|
|
181
226
|
className: "grid place-content-center text-current transition-none",
|
|
182
|
-
children: /* @__PURE__ */ v(
|
|
227
|
+
children: /* @__PURE__ */ v(L, { className: "size-3.5" })
|
|
183
228
|
})
|
|
184
229
|
});
|
|
185
230
|
}
|
|
186
231
|
//#endregion
|
|
187
232
|
//#region src/components/ui/dropdown-menu.tsx
|
|
188
|
-
function
|
|
189
|
-
return /* @__PURE__ */ v(
|
|
233
|
+
function he({ ...e }) {
|
|
234
|
+
return /* @__PURE__ */ v(w.Root, {
|
|
190
235
|
"data-slot": "dropdown-menu",
|
|
191
236
|
...e
|
|
192
237
|
});
|
|
193
238
|
}
|
|
194
|
-
function
|
|
195
|
-
return /* @__PURE__ */ v(
|
|
239
|
+
function ge({ ...e }) {
|
|
240
|
+
return /* @__PURE__ */ v(w.Portal, {
|
|
196
241
|
"data-slot": "dropdown-menu-portal",
|
|
197
242
|
...e
|
|
198
243
|
});
|
|
199
244
|
}
|
|
200
|
-
function
|
|
201
|
-
return /* @__PURE__ */ v(
|
|
245
|
+
function _e({ ...e }) {
|
|
246
|
+
return /* @__PURE__ */ v(w.Trigger, {
|
|
202
247
|
"data-slot": "dropdown-menu-trigger",
|
|
203
248
|
...e
|
|
204
249
|
});
|
|
205
250
|
}
|
|
206
|
-
function
|
|
207
|
-
return /* @__PURE__ */ v(
|
|
251
|
+
function ve({ className: t, sideOffset: n = 4, ...r }) {
|
|
252
|
+
return /* @__PURE__ */ v(w.Portal, { children: /* @__PURE__ */ v(w.Content, {
|
|
208
253
|
"data-slot": "dropdown-menu-content",
|
|
209
254
|
sideOffset: n,
|
|
210
255
|
className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", t),
|
|
211
256
|
...r
|
|
212
257
|
}) });
|
|
213
258
|
}
|
|
214
|
-
function
|
|
215
|
-
return /* @__PURE__ */ v(
|
|
259
|
+
function ye({ ...e }) {
|
|
260
|
+
return /* @__PURE__ */ v(w.Group, {
|
|
216
261
|
"data-slot": "dropdown-menu-group",
|
|
217
262
|
...e
|
|
218
263
|
});
|
|
219
264
|
}
|
|
220
|
-
function
|
|
221
|
-
return /* @__PURE__ */ v(
|
|
265
|
+
function be({ className: t, inset: n, variant: r = "default", ...i }) {
|
|
266
|
+
return /* @__PURE__ */ v(w.Item, {
|
|
222
267
|
"data-slot": "dropdown-menu-item",
|
|
223
268
|
"data-inset": n,
|
|
224
269
|
"data-variant": r,
|
|
@@ -226,74 +271,74 @@ function he({ className: t, inset: n, variant: r = "default", ...i }) {
|
|
|
226
271
|
...i
|
|
227
272
|
});
|
|
228
273
|
}
|
|
229
|
-
function
|
|
230
|
-
return /* @__PURE__ */ y(
|
|
274
|
+
function xe({ className: t, children: n, checked: r, ...i }) {
|
|
275
|
+
return /* @__PURE__ */ y(w.CheckboxItem, {
|
|
231
276
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
232
277
|
className: e("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
233
278
|
checked: r,
|
|
234
279
|
...i,
|
|
235
280
|
children: [/* @__PURE__ */ v("span", {
|
|
236
281
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
237
|
-
children: /* @__PURE__ */ v(
|
|
282
|
+
children: /* @__PURE__ */ v(w.ItemIndicator, { children: /* @__PURE__ */ v(L, { className: "size-4" }) })
|
|
238
283
|
}), n]
|
|
239
284
|
});
|
|
240
285
|
}
|
|
241
|
-
function
|
|
242
|
-
return /* @__PURE__ */ v(
|
|
286
|
+
function Se({ ...e }) {
|
|
287
|
+
return /* @__PURE__ */ v(w.RadioGroup, {
|
|
243
288
|
"data-slot": "dropdown-menu-radio-group",
|
|
244
289
|
...e
|
|
245
290
|
});
|
|
246
291
|
}
|
|
247
|
-
function
|
|
248
|
-
return /* @__PURE__ */ y(
|
|
292
|
+
function Ce({ className: t, children: n, ...r }) {
|
|
293
|
+
return /* @__PURE__ */ y(w.RadioItem, {
|
|
249
294
|
"data-slot": "dropdown-menu-radio-item",
|
|
250
295
|
className: e("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
251
296
|
...r,
|
|
252
297
|
children: [/* @__PURE__ */ v("span", {
|
|
253
298
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
254
|
-
children: /* @__PURE__ */ v(
|
|
299
|
+
children: /* @__PURE__ */ v(w.ItemIndicator, { children: /* @__PURE__ */ v(se, { className: "size-2 fill-current" }) })
|
|
255
300
|
}), n]
|
|
256
301
|
});
|
|
257
302
|
}
|
|
258
|
-
function
|
|
259
|
-
return /* @__PURE__ */ v(
|
|
303
|
+
function we({ className: t, inset: n, ...r }) {
|
|
304
|
+
return /* @__PURE__ */ v(w.Label, {
|
|
260
305
|
"data-slot": "dropdown-menu-label",
|
|
261
306
|
"data-inset": n,
|
|
262
307
|
className: e("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", t),
|
|
263
308
|
...r
|
|
264
309
|
});
|
|
265
310
|
}
|
|
266
|
-
function
|
|
267
|
-
return /* @__PURE__ */ v(
|
|
311
|
+
function Te({ className: t, ...n }) {
|
|
312
|
+
return /* @__PURE__ */ v(w.Separator, {
|
|
268
313
|
"data-slot": "dropdown-menu-separator",
|
|
269
314
|
className: e("bg-border -mx-1 my-1 h-px", t),
|
|
270
315
|
...n
|
|
271
316
|
});
|
|
272
317
|
}
|
|
273
|
-
function
|
|
318
|
+
function Ee({ className: t, ...n }) {
|
|
274
319
|
return /* @__PURE__ */ v("span", {
|
|
275
320
|
"data-slot": "dropdown-menu-shortcut",
|
|
276
321
|
className: e("text-muted-foreground ml-auto text-xs tracking-widest", t),
|
|
277
322
|
...n
|
|
278
323
|
});
|
|
279
324
|
}
|
|
280
|
-
function
|
|
281
|
-
return /* @__PURE__ */ v(
|
|
325
|
+
function De({ ...e }) {
|
|
326
|
+
return /* @__PURE__ */ v(w.Sub, {
|
|
282
327
|
"data-slot": "dropdown-menu-sub",
|
|
283
328
|
...e
|
|
284
329
|
});
|
|
285
330
|
}
|
|
286
|
-
function
|
|
287
|
-
return /* @__PURE__ */ y(
|
|
331
|
+
function Oe({ className: t, inset: n, children: r, ...i }) {
|
|
332
|
+
return /* @__PURE__ */ y(w.SubTrigger, {
|
|
288
333
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
289
334
|
"data-inset": n,
|
|
290
335
|
className: e("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
291
336
|
...i,
|
|
292
|
-
children: [r, /* @__PURE__ */ v(
|
|
337
|
+
children: [r, /* @__PURE__ */ v(z, { className: "ml-auto size-4" })]
|
|
293
338
|
});
|
|
294
339
|
}
|
|
295
|
-
function
|
|
296
|
-
return /* @__PURE__ */ v(
|
|
340
|
+
function ke({ className: t, ...n }) {
|
|
341
|
+
return /* @__PURE__ */ v(w.SubContent, {
|
|
297
342
|
"data-slot": "dropdown-menu-sub-content",
|
|
298
343
|
className: e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", t),
|
|
299
344
|
...n
|
|
@@ -301,53 +346,53 @@ function we({ className: t, ...n }) {
|
|
|
301
346
|
}
|
|
302
347
|
//#endregion
|
|
303
348
|
//#region src/components/ui/icon-picker-dialog.tsx
|
|
304
|
-
var
|
|
349
|
+
var J = [
|
|
305
350
|
"lucide",
|
|
306
351
|
"tabler",
|
|
307
352
|
"mdi",
|
|
308
353
|
"ph",
|
|
309
354
|
"solar",
|
|
310
355
|
"heroicons"
|
|
311
|
-
],
|
|
312
|
-
async function
|
|
356
|
+
], Ae = J.join(",");
|
|
357
|
+
async function Y(e, t, n) {
|
|
313
358
|
try {
|
|
314
|
-
let r = await fetch(`https://api.iconify.design/search?query=${encodeURIComponent(e)}&limit=${t}&prefixes=${
|
|
359
|
+
let r = await fetch(`https://api.iconify.design/search?query=${encodeURIComponent(e)}&limit=${t}&prefixes=${Ae}`, { signal: n });
|
|
315
360
|
if (r.ok) return (await r.json()).icons ?? [];
|
|
316
361
|
} catch {}
|
|
317
362
|
return [];
|
|
318
363
|
}
|
|
319
|
-
function
|
|
320
|
-
let { t: _ } =
|
|
321
|
-
let n = ++
|
|
364
|
+
function je({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title: d, description: f, suggestKeywords: p }) {
|
|
365
|
+
let { t: _ } = te(), [b, x] = g(""), [S, C] = g([]), [w, T] = g(!1), D = h(null), [O, k] = g(!1), [A, j] = g([]), M = h(0), [N, P] = g(null), F = ee(async (e, t) => {
|
|
366
|
+
let n = ++M.current, r = () => n === M.current && !t.aborted;
|
|
322
367
|
if (!e.trim()) {
|
|
323
|
-
|
|
368
|
+
C([]);
|
|
324
369
|
return;
|
|
325
370
|
}
|
|
326
|
-
|
|
371
|
+
T(!0);
|
|
327
372
|
try {
|
|
328
|
-
let n = await
|
|
329
|
-
r() &&
|
|
373
|
+
let n = await Y(e, 60, t);
|
|
374
|
+
r() && C(n);
|
|
330
375
|
} catch {
|
|
331
|
-
r() &&
|
|
376
|
+
r() && C([]);
|
|
332
377
|
} finally {
|
|
333
|
-
r() &&
|
|
378
|
+
r() && T(!1);
|
|
334
379
|
}
|
|
335
380
|
}, []);
|
|
336
381
|
m(() => {
|
|
337
382
|
let e = new AbortController();
|
|
338
|
-
return
|
|
339
|
-
|
|
383
|
+
return D.current && clearTimeout(D.current), D.current = setTimeout(() => F(b, e.signal), 350), () => {
|
|
384
|
+
D.current && clearTimeout(D.current), e.abort();
|
|
340
385
|
};
|
|
341
|
-
}, [b,
|
|
342
|
-
let
|
|
343
|
-
m(() => () =>
|
|
344
|
-
function
|
|
345
|
-
l(e), t(!1), x(""),
|
|
386
|
+
}, [b, F]);
|
|
387
|
+
let I = h(null);
|
|
388
|
+
m(() => () => I.current?.abort(), []);
|
|
389
|
+
function L(e) {
|
|
390
|
+
l(e), t(!1), x(""), C([]), j([]), P(null);
|
|
346
391
|
}
|
|
347
|
-
async function
|
|
348
|
-
if (!p ||
|
|
392
|
+
async function R() {
|
|
393
|
+
if (!p || O) return;
|
|
349
394
|
let e = new AbortController();
|
|
350
|
-
|
|
395
|
+
I.current = e, k(!0), j([]), P(null);
|
|
351
396
|
try {
|
|
352
397
|
let t = (await p({
|
|
353
398
|
title: d,
|
|
@@ -357,17 +402,17 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
357
402
|
if (e.signal.aborted) return;
|
|
358
403
|
n.push({
|
|
359
404
|
keyword: r.trim(),
|
|
360
|
-
icons: await
|
|
405
|
+
icons: await Y(r.trim(), 30, e.signal)
|
|
361
406
|
});
|
|
362
407
|
}
|
|
363
|
-
e.signal.aborted ||
|
|
408
|
+
e.signal.aborted || j(n);
|
|
364
409
|
} catch {
|
|
365
|
-
e.signal.aborted ||
|
|
410
|
+
e.signal.aborted || j([]);
|
|
366
411
|
} finally {
|
|
367
|
-
e.signal.aborted ||
|
|
412
|
+
e.signal.aborted || k(!1);
|
|
368
413
|
}
|
|
369
414
|
}
|
|
370
|
-
let
|
|
415
|
+
let z = N ? A.find((e) => e.keyword === N)?.icons ?? [] : A.flatMap((e) => e.icons.slice(0, 3)), B = !!p && !!(d?.trim() ?? f?.trim());
|
|
371
416
|
return /* @__PURE__ */ v(r, {
|
|
372
417
|
open: e,
|
|
373
418
|
onOpenChange: t,
|
|
@@ -379,36 +424,36 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
379
424
|
className: "flex gap-2",
|
|
380
425
|
children: [/* @__PURE__ */ y("div", {
|
|
381
426
|
className: "relative flex-1",
|
|
382
|
-
children: [/* @__PURE__ */ v(
|
|
427
|
+
children: [/* @__PURE__ */ v(re, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ v(n, {
|
|
383
428
|
value: b,
|
|
384
429
|
onChange: (e) => x(e.target.value),
|
|
385
430
|
placeholder: _("forms.iconPicker.searchIcons", { defaultValue: "Search icons" }),
|
|
386
431
|
className: "pl-9",
|
|
387
432
|
autoFocus: !0
|
|
388
433
|
})]
|
|
389
|
-
}),
|
|
434
|
+
}), B && /* @__PURE__ */ y(a, {
|
|
390
435
|
type: "button",
|
|
391
436
|
size: "sm",
|
|
392
437
|
variant: "outline",
|
|
393
|
-
onClick:
|
|
394
|
-
disabled:
|
|
438
|
+
onClick: R,
|
|
439
|
+
disabled: O,
|
|
395
440
|
className: "shrink-0 gap-1.5",
|
|
396
|
-
children: [
|
|
441
|
+
children: [O ? /* @__PURE__ */ v(ne, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(ie, { className: "size-4" }), _("forms.iconPicker.aiSuggest", { defaultValue: "Suggest" })]
|
|
397
442
|
})]
|
|
398
443
|
}),
|
|
399
|
-
|
|
444
|
+
A.length > 0 && /* @__PURE__ */ y("div", {
|
|
400
445
|
className: "rounded-lg border border-[var(--vg-accent-line)] bg-[var(--vg-accent-surface)] p-3",
|
|
401
446
|
children: [
|
|
402
447
|
/* @__PURE__ */ y("div", {
|
|
403
448
|
className: "mb-2 flex items-center gap-1.5 text-xs font-medium vg-accent-text",
|
|
404
|
-
children: [/* @__PURE__ */ v(
|
|
449
|
+
children: [/* @__PURE__ */ v(ie, { className: "size-3.5" }), _("forms.iconPicker.aiSuggestions", { defaultValue: "Suggestions" })]
|
|
405
450
|
}),
|
|
406
451
|
/* @__PURE__ */ v("div", {
|
|
407
452
|
className: "mb-3 flex flex-wrap gap-1.5",
|
|
408
|
-
children:
|
|
453
|
+
children: A.map((e) => /* @__PURE__ */ y("button", {
|
|
409
454
|
type: "button",
|
|
410
|
-
onClick: () =>
|
|
411
|
-
className: `cursor-pointer rounded-full px-3 py-1 text-xs font-medium transition-all ${
|
|
455
|
+
onClick: () => P(N === e.keyword ? null : e.keyword),
|
|
456
|
+
className: `cursor-pointer rounded-full px-3 py-1 text-xs font-medium transition-all ${N === e.keyword ? "vg-accent-solid text-white" : "bg-[var(--vg-accent-surface)] text-[var(--vg-accent-fg)] hover:bg-[var(--vg-accent-surface-strong)]"}`,
|
|
412
457
|
children: [e.keyword, /* @__PURE__ */ v("span", {
|
|
413
458
|
className: "ml-1 opacity-60",
|
|
414
459
|
children: e.icons.length
|
|
@@ -417,12 +462,12 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
417
462
|
}),
|
|
418
463
|
/* @__PURE__ */ v("div", {
|
|
419
464
|
className: "flex max-h-60 flex-wrap gap-2 overflow-y-auto",
|
|
420
|
-
children:
|
|
465
|
+
children: z.map((e) => /* @__PURE__ */ y("button", {
|
|
421
466
|
type: "button",
|
|
422
|
-
onClick: () =>
|
|
467
|
+
onClick: () => L(e),
|
|
423
468
|
className: `flex cursor-pointer flex-col items-center gap-1 rounded-lg p-2 transition-all hover:bg-[var(--vg-accent-surface)] ${c === e ? "border border-[var(--vg-accent-line)] bg-[var(--vg-accent-surface-strong)] vg-accent-text" : "border border-[var(--vg-accent-line)]"}`,
|
|
424
469
|
title: e,
|
|
425
|
-
children: [/* @__PURE__ */ v(
|
|
470
|
+
children: [/* @__PURE__ */ v(E, {
|
|
426
471
|
icon: e,
|
|
427
472
|
className: "size-7"
|
|
428
473
|
}), /* @__PURE__ */ v("span", {
|
|
@@ -436,23 +481,23 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
436
481
|
/* @__PURE__ */ y("div", {
|
|
437
482
|
className: "max-h-[400px] min-h-[200px] flex-1 overflow-y-auto",
|
|
438
483
|
children: [
|
|
439
|
-
|
|
484
|
+
w && /* @__PURE__ */ v("div", {
|
|
440
485
|
className: "flex h-32 items-center justify-center text-sm text-muted-foreground",
|
|
441
486
|
children: _("forms.iconPicker.searching", { defaultValue: "Searching…" })
|
|
442
487
|
}),
|
|
443
|
-
!
|
|
488
|
+
!w && b && S.length === 0 && /* @__PURE__ */ v("div", {
|
|
444
489
|
className: "flex h-32 items-center justify-center text-sm text-muted-foreground",
|
|
445
490
|
children: _("forms.iconPicker.noIconsFound", {
|
|
446
491
|
query: b,
|
|
447
492
|
defaultValue: "No icons found for “{{query}}”"
|
|
448
493
|
})
|
|
449
494
|
}),
|
|
450
|
-
!
|
|
495
|
+
!w && !b && S.length === 0 && A.length === 0 && /* @__PURE__ */ y("div", {
|
|
451
496
|
className: "flex h-32 flex-col items-center justify-center gap-2 px-4 text-center text-sm text-muted-foreground",
|
|
452
497
|
children: [/* @__PURE__ */ v("span", { children: _("forms.iconPicker.typeToSearch", {
|
|
453
|
-
count:
|
|
498
|
+
count: J.length,
|
|
454
499
|
defaultValue: "Type to search {{count}} icon collections"
|
|
455
|
-
}) }),
|
|
500
|
+
}) }), B && /* @__PURE__ */ v("span", {
|
|
456
501
|
className: "text-xs leading-relaxed",
|
|
457
502
|
children: _("forms.iconPicker.orClickAi", { defaultValue: "…or let the title and description suggest some" })
|
|
458
503
|
})]
|
|
@@ -461,10 +506,10 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
461
506
|
className: "grid grid-cols-6 gap-1.5 p-1",
|
|
462
507
|
children: S.map((e) => /* @__PURE__ */ y("button", {
|
|
463
508
|
type: "button",
|
|
464
|
-
onClick: () =>
|
|
509
|
+
onClick: () => L(e),
|
|
465
510
|
className: `flex cursor-pointer flex-col items-center justify-center gap-1 rounded-lg p-2 transition-all hover:bg-muted ${c === e ? "border border-[var(--vg-accent-line)] bg-[var(--vg-accent-surface)] vg-accent-text" : "border border-transparent hover:border-border"}`,
|
|
466
511
|
title: e,
|
|
467
|
-
children: [/* @__PURE__ */ v(
|
|
512
|
+
children: [/* @__PURE__ */ v(E, {
|
|
468
513
|
icon: e,
|
|
469
514
|
className: "size-6"
|
|
470
515
|
}), /* @__PURE__ */ v("span", {
|
|
@@ -479,7 +524,7 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
479
524
|
className: "flex items-center justify-between border-t pt-2",
|
|
480
525
|
children: [/* @__PURE__ */ y("div", {
|
|
481
526
|
className: "flex items-center gap-2",
|
|
482
|
-
children: [/* @__PURE__ */ v(
|
|
527
|
+
children: [/* @__PURE__ */ v(E, {
|
|
483
528
|
icon: c,
|
|
484
529
|
className: "size-5"
|
|
485
530
|
}), /* @__PURE__ */ v("span", {
|
|
@@ -495,7 +540,7 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
495
540
|
onClick: () => {
|
|
496
541
|
u(), t(!1);
|
|
497
542
|
},
|
|
498
|
-
children: [/* @__PURE__ */ v(
|
|
543
|
+
children: [/* @__PURE__ */ v(ae, { className: "size-4" }), _("forms.common.remove", { defaultValue: "Remove" })]
|
|
499
544
|
}), /* @__PURE__ */ v(a, {
|
|
500
545
|
size: "sm",
|
|
501
546
|
type: "button",
|
|
@@ -510,20 +555,20 @@ function Ee({ open: e, onOpenChange: t, value: c, onSelect: l, onClear: u, title
|
|
|
510
555
|
}
|
|
511
556
|
//#endregion
|
|
512
557
|
//#region src/components/ui/popover.tsx
|
|
513
|
-
function
|
|
514
|
-
return /* @__PURE__ */ v(
|
|
558
|
+
function Me({ ...e }) {
|
|
559
|
+
return /* @__PURE__ */ v(D.Root, {
|
|
515
560
|
"data-slot": "popover",
|
|
516
561
|
...e
|
|
517
562
|
});
|
|
518
563
|
}
|
|
519
|
-
function
|
|
520
|
-
return /* @__PURE__ */ v(
|
|
564
|
+
function Ne({ ...e }) {
|
|
565
|
+
return /* @__PURE__ */ v(D.Trigger, {
|
|
521
566
|
"data-slot": "popover-trigger",
|
|
522
567
|
...e
|
|
523
568
|
});
|
|
524
569
|
}
|
|
525
|
-
function
|
|
526
|
-
return /* @__PURE__ */ v(
|
|
570
|
+
function Pe({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
|
|
571
|
+
return /* @__PURE__ */ v(D.Portal, { children: /* @__PURE__ */ v(D.Content, {
|
|
527
572
|
"data-slot": "popover-content",
|
|
528
573
|
align: n,
|
|
529
574
|
sideOffset: r,
|
|
@@ -531,27 +576,27 @@ function ke({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
|
|
|
531
576
|
...i
|
|
532
577
|
}) });
|
|
533
578
|
}
|
|
534
|
-
function
|
|
535
|
-
return /* @__PURE__ */ v(
|
|
579
|
+
function Fe({ ...e }) {
|
|
580
|
+
return /* @__PURE__ */ v(D.Anchor, {
|
|
536
581
|
"data-slot": "popover-anchor",
|
|
537
582
|
...e
|
|
538
583
|
});
|
|
539
584
|
}
|
|
540
|
-
function
|
|
585
|
+
function Ie({ className: t, ...n }) {
|
|
541
586
|
return /* @__PURE__ */ v("div", {
|
|
542
587
|
"data-slot": "popover-header",
|
|
543
588
|
className: e("flex flex-col gap-1 text-sm", t),
|
|
544
589
|
...n
|
|
545
590
|
});
|
|
546
591
|
}
|
|
547
|
-
function
|
|
592
|
+
function Le({ className: t, ...n }) {
|
|
548
593
|
return /* @__PURE__ */ v("div", {
|
|
549
594
|
"data-slot": "popover-title",
|
|
550
595
|
className: e("font-medium", t),
|
|
551
596
|
...n
|
|
552
597
|
});
|
|
553
598
|
}
|
|
554
|
-
function
|
|
599
|
+
function Re({ className: t, ...n }) {
|
|
555
600
|
return /* @__PURE__ */ v("p", {
|
|
556
601
|
"data-slot": "popover-description",
|
|
557
602
|
className: e("text-muted-foreground", t),
|
|
@@ -559,8 +604,36 @@ function Ne({ className: t, ...n }) {
|
|
|
559
604
|
});
|
|
560
605
|
}
|
|
561
606
|
//#endregion
|
|
607
|
+
//#region src/components/ui/resizable.tsx
|
|
608
|
+
function ze({ className: t, ...n }) {
|
|
609
|
+
return /* @__PURE__ */ v(O, {
|
|
610
|
+
"data-slot": "resizable-panel-group",
|
|
611
|
+
className: e("flex h-full w-full", t),
|
|
612
|
+
...n
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
function Be({ overflowHidden: t, className: n, ...r }) {
|
|
616
|
+
return /* @__PURE__ */ v(k, {
|
|
617
|
+
"data-slot": "resizable-panel",
|
|
618
|
+
className: e(t && "[&>div]:overflow-hidden!", n),
|
|
619
|
+
style: t ? { overflow: "hidden" } : void 0,
|
|
620
|
+
...r
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
function Ve({ withHandle: t, className: n, ...r }) {
|
|
624
|
+
return /* @__PURE__ */ v(A, {
|
|
625
|
+
"data-slot": "resizable-handle",
|
|
626
|
+
className: e("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:-left-2 after:-right-2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden", "[&[aria-orientation=horizontal]]:h-px [&[aria-orientation=horizontal]]:w-full [&[aria-orientation=horizontal]]:after:inset-x-0 [&[aria-orientation=horizontal]]:after:-top-2 [&[aria-orientation=horizontal]]:after:-bottom-2 [&[aria-orientation=horizontal]>div]:rotate-90", n),
|
|
627
|
+
...r,
|
|
628
|
+
children: t && /* @__PURE__ */ v("div", {
|
|
629
|
+
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
|
630
|
+
children: /* @__PURE__ */ v(ce, { className: "size-2.5" })
|
|
631
|
+
})
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
//#endregion
|
|
562
635
|
//#region src/components/ui/section-card.tsx
|
|
563
|
-
var
|
|
636
|
+
var X = {
|
|
564
637
|
blue: {
|
|
565
638
|
color: "text-blue-600 dark:text-blue-400",
|
|
566
639
|
bg: "from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20",
|
|
@@ -601,14 +674,14 @@ var Y = {
|
|
|
601
674
|
bg: "from-slate-500/10 to-gray-500/10 dark:from-slate-500/20 dark:to-gray-500/20",
|
|
602
675
|
ring: "ring-slate-500/10 dark:ring-slate-400/10"
|
|
603
676
|
}
|
|
604
|
-
},
|
|
677
|
+
}, Z = f({
|
|
605
678
|
open: !0,
|
|
606
679
|
toggle: () => {},
|
|
607
680
|
variant: "blue"
|
|
608
681
|
});
|
|
609
|
-
function
|
|
682
|
+
function Q({ variant: t = "blue", defaultOpen: n = !0, children: r, className: i }) {
|
|
610
683
|
let [a, o] = g(n);
|
|
611
|
-
return /* @__PURE__ */ v(
|
|
684
|
+
return /* @__PURE__ */ v(Z.Provider, {
|
|
612
685
|
value: {
|
|
613
686
|
open: a,
|
|
614
687
|
toggle: () => o((e) => !e),
|
|
@@ -620,8 +693,8 @@ function Z({ variant: t = "blue", defaultOpen: n = !0, children: r, className: i
|
|
|
620
693
|
})
|
|
621
694
|
});
|
|
622
695
|
}
|
|
623
|
-
function
|
|
624
|
-
let { open: a, toggle: o, variant: s } = p(
|
|
696
|
+
function He({ icon: t, title: n, description: r, className: i }) {
|
|
697
|
+
let { open: a, toggle: o, variant: s } = p(Z), c = X[s];
|
|
625
698
|
return /* @__PURE__ */ y("button", {
|
|
626
699
|
type: "button",
|
|
627
700
|
onClick: o,
|
|
@@ -641,12 +714,12 @@ function Pe({ icon: t, title: n, description: r, className: i }) {
|
|
|
641
714
|
children: r
|
|
642
715
|
})]
|
|
643
716
|
}),
|
|
644
|
-
/* @__PURE__ */ v(
|
|
717
|
+
/* @__PURE__ */ v(T, { className: e("ml-auto size-4 text-muted-foreground shrink-0 transition-transform duration-200", a && "rotate-180") })
|
|
645
718
|
]
|
|
646
719
|
});
|
|
647
720
|
}
|
|
648
|
-
function
|
|
649
|
-
let { variant: a } = p(
|
|
721
|
+
function Ue({ icon: t, title: n, description: r, className: i }) {
|
|
722
|
+
let { variant: a } = p(Z), o = X[a];
|
|
650
723
|
return /* @__PURE__ */ y("div", {
|
|
651
724
|
className: e("flex items-center gap-3 px-5 py-4 bg-muted/40 border-b", i),
|
|
652
725
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -664,63 +737,76 @@ function Fe({ icon: t, title: n, description: r, className: i }) {
|
|
|
664
737
|
})]
|
|
665
738
|
});
|
|
666
739
|
}
|
|
667
|
-
function
|
|
668
|
-
let { open: r } = p(
|
|
740
|
+
function We({ children: t, className: n }) {
|
|
741
|
+
let { open: r } = p(Z);
|
|
669
742
|
return r ? /* @__PURE__ */ v("div", {
|
|
670
743
|
className: e("p-5 space-y-6", n),
|
|
671
744
|
children: t
|
|
672
745
|
}) : null;
|
|
673
746
|
}
|
|
674
|
-
|
|
747
|
+
Q.Header = He, Q.StaticHeader = Ue, Q.Content = We;
|
|
675
748
|
//#endregion
|
|
676
749
|
//#region src/components/ui/tooltip.tsx
|
|
677
|
-
var
|
|
678
|
-
function
|
|
679
|
-
return /* @__PURE__ */ v(
|
|
750
|
+
var Ge = u.createContext(!1);
|
|
751
|
+
function Ke({ delayDuration: e = 0, ...t }) {
|
|
752
|
+
return /* @__PURE__ */ v(Ge, {
|
|
680
753
|
value: !0,
|
|
681
|
-
children: /* @__PURE__ */ v(
|
|
754
|
+
children: /* @__PURE__ */ v(j.Provider, {
|
|
682
755
|
"data-slot": "tooltip-provider",
|
|
683
756
|
delayDuration: e,
|
|
684
757
|
...t
|
|
685
758
|
})
|
|
686
759
|
});
|
|
687
760
|
}
|
|
688
|
-
function
|
|
689
|
-
let t = u.useContext(
|
|
761
|
+
function qe({ ...e }) {
|
|
762
|
+
let t = u.useContext(Ge), n = /* @__PURE__ */ v(j.Root, {
|
|
690
763
|
"data-slot": "tooltip",
|
|
691
764
|
...e
|
|
692
765
|
});
|
|
693
|
-
return t ? n : /* @__PURE__ */ v(
|
|
766
|
+
return t ? n : /* @__PURE__ */ v(Ke, { children: n });
|
|
694
767
|
}
|
|
695
|
-
function
|
|
696
|
-
return /* @__PURE__ */ v(
|
|
768
|
+
function Je({ ...e }) {
|
|
769
|
+
return /* @__PURE__ */ v(j.Trigger, {
|
|
697
770
|
"data-slot": "tooltip-trigger",
|
|
698
771
|
...e
|
|
699
772
|
});
|
|
700
773
|
}
|
|
701
|
-
function
|
|
702
|
-
return /* @__PURE__ */ v(
|
|
774
|
+
function Ye({ className: t, sideOffset: n = 0, children: r, ...i }) {
|
|
775
|
+
return /* @__PURE__ */ v(j.Portal, { children: /* @__PURE__ */ y(j.Content, {
|
|
703
776
|
"data-slot": "tooltip-content",
|
|
704
777
|
sideOffset: n,
|
|
705
778
|
className: e("bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", t),
|
|
706
779
|
...i,
|
|
707
|
-
children: [r, /* @__PURE__ */ v(
|
|
780
|
+
children: [r, /* @__PURE__ */ v(j.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
708
781
|
}) });
|
|
709
782
|
}
|
|
710
783
|
//#endregion
|
|
784
|
+
//#region src/hooks/use-mobile.ts
|
|
785
|
+
var Xe = "(max-width: 767px)";
|
|
786
|
+
function Ze() {
|
|
787
|
+
return window.matchMedia(Xe);
|
|
788
|
+
}
|
|
789
|
+
function Qe(e) {
|
|
790
|
+
let t = Ze();
|
|
791
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
792
|
+
}
|
|
793
|
+
function $e() {
|
|
794
|
+
return u.useSyncExternalStore(Qe, () => Ze().matches, () => !1);
|
|
795
|
+
}
|
|
796
|
+
//#endregion
|
|
711
797
|
//#region src/components/ui/sonner.tsx
|
|
712
|
-
var
|
|
713
|
-
let { theme: t = "system" } =
|
|
714
|
-
return /* @__PURE__ */ v(
|
|
798
|
+
var et = ({ ...e }) => {
|
|
799
|
+
let { theme: t = "system" } = M(), { t: n } = te();
|
|
800
|
+
return /* @__PURE__ */ v(N, {
|
|
715
801
|
theme: t,
|
|
716
802
|
className: "toaster group",
|
|
717
803
|
containerAriaLabel: n("common.notifications", { defaultValue: "Notifications" }),
|
|
718
804
|
icons: {
|
|
719
|
-
success: /* @__PURE__ */ v(
|
|
720
|
-
info: /* @__PURE__ */ v(
|
|
721
|
-
warning: /* @__PURE__ */ v(
|
|
722
|
-
error: /* @__PURE__ */ v(
|
|
723
|
-
loading: /* @__PURE__ */ v(
|
|
805
|
+
success: /* @__PURE__ */ v(oe, { className: "size-4" }),
|
|
806
|
+
info: /* @__PURE__ */ v(le, { className: "size-4" }),
|
|
807
|
+
warning: /* @__PURE__ */ v(fe, { className: "size-4" }),
|
|
808
|
+
error: /* @__PURE__ */ v(de, { className: "size-4" }),
|
|
809
|
+
loading: /* @__PURE__ */ v(ue, { className: "size-4 animate-spin" })
|
|
724
810
|
},
|
|
725
811
|
style: {
|
|
726
812
|
"--normal-bg": "var(--vg-popover)",
|
|
@@ -732,8 +818,38 @@ var Be = ({ ...e }) => {
|
|
|
732
818
|
});
|
|
733
819
|
};
|
|
734
820
|
//#endregion
|
|
821
|
+
//#region src/components/ui/tabs.tsx
|
|
822
|
+
function tt({ className: t, ...n }) {
|
|
823
|
+
return /* @__PURE__ */ v(F.Root, {
|
|
824
|
+
"data-slot": "tabs",
|
|
825
|
+
className: e("flex flex-col gap-2", t),
|
|
826
|
+
...n
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
function nt({ className: t, ...n }) {
|
|
830
|
+
return /* @__PURE__ */ v(F.List, {
|
|
831
|
+
"data-slot": "tabs-list",
|
|
832
|
+
className: e("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", t),
|
|
833
|
+
...n
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
function rt({ className: t, ...n }) {
|
|
837
|
+
return /* @__PURE__ */ v(F.Trigger, {
|
|
838
|
+
"data-slot": "tabs-trigger",
|
|
839
|
+
className: e("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
840
|
+
...n
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
function it({ className: t, ...n }) {
|
|
844
|
+
return /* @__PURE__ */ v(F.Content, {
|
|
845
|
+
"data-slot": "tabs-content",
|
|
846
|
+
className: e("flex-1 outline-none", t),
|
|
847
|
+
...n
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
//#endregion
|
|
735
851
|
//#region src/components/ui/user-avatar.tsx
|
|
736
|
-
function
|
|
852
|
+
function at({ givenName: e, familyName: t, name: n }) {
|
|
737
853
|
let r = (e ?? "").trim(), i = (t ?? "").trim();
|
|
738
854
|
if (r || i) {
|
|
739
855
|
let e = r ? r[0] : "", t = i.split(/\s+/).filter(Boolean), n = `${e}${t.length > 0 ? t[t.length - 1][0] : ""}`.toUpperCase();
|
|
@@ -746,8 +862,8 @@ function Ve({ givenName: e, familyName: t, name: n }) {
|
|
|
746
862
|
}
|
|
747
863
|
return "U";
|
|
748
864
|
}
|
|
749
|
-
function
|
|
750
|
-
let l =
|
|
865
|
+
function ot({ className: t, givenName: n, familyName: r, name: i, src: a, alt: o, children: s, ...c }) {
|
|
866
|
+
let l = at({
|
|
751
867
|
givenName: n,
|
|
752
868
|
familyName: r,
|
|
753
869
|
name: i
|
|
@@ -771,14 +887,14 @@ function He({ className: t, givenName: n, familyName: r, name: i, src: a, alt: o
|
|
|
771
887
|
}
|
|
772
888
|
//#endregion
|
|
773
889
|
//#region src/lib/corner-slot.ts
|
|
774
|
-
var
|
|
775
|
-
function
|
|
776
|
-
return p(
|
|
890
|
+
var st = f(!1);
|
|
891
|
+
function ct() {
|
|
892
|
+
return p(st);
|
|
777
893
|
}
|
|
778
894
|
//#endregion
|
|
779
895
|
//#region src/contexts/user.context.tsx
|
|
780
|
-
var
|
|
781
|
-
function
|
|
896
|
+
var $ = d.createContext(null);
|
|
897
|
+
function lt({ children: e, fetchUser: t }) {
|
|
782
898
|
let [n, r] = d.useState({}), [i, a] = d.useState("loading"), [o, s] = d.useState(null), c = d.useRef(0), l = d.useCallback(() => {
|
|
783
899
|
let e = ++c.current;
|
|
784
900
|
t().then((t) => {
|
|
@@ -801,15 +917,15 @@ function Ke({ children: e, fetchUser: t }) {
|
|
|
801
917
|
i,
|
|
802
918
|
o
|
|
803
919
|
]);
|
|
804
|
-
return /* @__PURE__ */ v(
|
|
920
|
+
return /* @__PURE__ */ v($, {
|
|
805
921
|
value: u,
|
|
806
922
|
children: e
|
|
807
923
|
});
|
|
808
924
|
}
|
|
809
|
-
function
|
|
810
|
-
let e = d.useContext(
|
|
925
|
+
function ut() {
|
|
926
|
+
let e = d.useContext($);
|
|
811
927
|
if (!e) throw Error("useCurrentUser must be used within UserProvider");
|
|
812
928
|
return e;
|
|
813
929
|
}
|
|
814
930
|
//#endregion
|
|
815
|
-
export {
|
|
931
|
+
export { je as A, Te as B, Me as C, Ie as D, Re as E, be as F, _e as G, De as H, we as I, q as J, me as K, ge as L, xe as M, ve as N, Le as O, ye as P, Se as R, ze as S, Pe as T, ke as U, Ee as V, Oe as W, L as X, z as Y, Je as _, ot as a, Ve as b, it as c, et as d, P as f, Ke as g, Ye as h, ct as i, he as j, Ne as k, nt as l, qe as m, ut as n, at as o, $e as p, pe as q, st as r, tt as s, lt as t, rt as u, Q as v, Fe as w, Be as x, X as y, Ce as z };
|