@coderabbitai/carrot-ui 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +253 -91
- package/dist/index.js +1720 -1422
- package/package.json +2 -1
- package/src/scales.css +29 -28
- package/src/theme.css +27 -37
package/dist/index.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { clsx as e } from "clsx";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { Switch as h } from "@base-ui/react/switch";
|
|
7
|
-
import { Checkbox as g } from "@base-ui/react/checkbox";
|
|
8
|
-
import { ArrowLeftIcon as _, ArrowRightStartOnRectangleIcon as v, CheckCircleIcon as y, CheckIcon as b, ChevronDoubleLeftIcon as x, ChevronDoubleRightIcon as S, ChevronDownIcon as C, ChevronLeftIcon as w, ChevronRightIcon as T, ChevronUpDownIcon as E, ChevronUpIcon as ee, ComputerDesktopIcon as D, ExclamationTriangleIcon as O, InformationCircleIcon as k, MagnifyingGlassIcon as A, MinusIcon as j, MoonIcon as te, PaintBrushIcon as ne, PlusCircleIcon as re, SunIcon as ie, XCircleIcon as ae, XMarkIcon as oe } from "@heroicons/react/16/solid";
|
|
2
|
+
import { extendTailwindMerge as t } from "tailwind-merge";
|
|
3
|
+
import { ArrowLeftIcon as n, ArrowRightStartOnRectangleIcon as r, ArrowTopRightOnSquareIcon as i, CheckCircleIcon as a, CheckIcon as o, ChevronDownIcon as s, ChevronLeftIcon as c, ChevronRightIcon as l, ChevronUpDownIcon as u, ChevronUpIcon as d, ComputerDesktopIcon as f, ExclamationTriangleIcon as p, InformationCircleIcon as m, MagnifyingGlassIcon as h, MinusIcon as g, MoonIcon as _, PlusCircleIcon as v, SunIcon as y, XCircleIcon as b, XMarkIcon as x } from "@heroicons/react/16/solid";
|
|
4
|
+
import { createContext as S, forwardRef as C, useCallback as w, useContext as ee, useEffect as te, useLayoutEffect as T, useMemo as E, useRef as D, useState as O } from "react";
|
|
5
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
9
6
|
import { Combobox as M } from "@base-ui/react/combobox";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
7
|
+
import { Button as ne } from "@base-ui/react/button";
|
|
8
|
+
import { Switch as re } from "@base-ui/react/switch";
|
|
9
|
+
import { Checkbox as ie } from "@base-ui/react/checkbox";
|
|
10
|
+
import { AnimatePresence as N, motion as P } from "motion/react";
|
|
11
|
+
import { Tooltip as F } from "@base-ui/react/tooltip";
|
|
12
|
+
import { Select as I } from "@base-ui/react/select";
|
|
13
|
+
import { Separator as ae } from "@base-ui/react/separator";
|
|
14
|
+
import { Field as L } from "@base-ui/react/field";
|
|
15
|
+
import { Menu as R } from "@base-ui/react/menu";
|
|
16
|
+
import { Dialog as z } from "@base-ui/react/dialog";
|
|
17
|
+
import { flexRender as oe, getCoreRowModel as se, getFilteredRowModel as ce, getPaginationRowModel as le, getSortedRowModel as ue, useReactTable as de } from "@tanstack/react-table";
|
|
18
|
+
import { Popover as B } from "@base-ui/react/popover";
|
|
19
|
+
import { AlertDialog as V } from "@base-ui/react/alert-dialog";
|
|
20
|
+
import { Accordion as fe } from "@base-ui/react/accordion";
|
|
21
|
+
import { Tabs as pe } from "@base-ui/react/tabs";
|
|
21
22
|
import { Drawer as H } from "@base-ui/react/drawer";
|
|
22
23
|
import { Command as U } from "cmdk";
|
|
23
24
|
import { Toggle as me } from "@base-ui/react/toggle";
|
|
@@ -25,12 +26,133 @@ import { ToggleGroup as he } from "@base-ui/react/toggle-group";
|
|
|
25
26
|
import { RadioGroup as ge } from "@base-ui/react/radio-group";
|
|
26
27
|
import { Radio as _e } from "@base-ui/react/radio";
|
|
27
28
|
//#region src/lib/cn.ts
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
var ve = t({ extend: { classGroups: {
|
|
30
|
+
"font-size": [{ "text-cui": [
|
|
31
|
+
"sm",
|
|
32
|
+
"base",
|
|
33
|
+
"lg",
|
|
34
|
+
"xl"
|
|
35
|
+
] }],
|
|
36
|
+
"text-color": [{ "text-cui": [
|
|
37
|
+
"primary",
|
|
38
|
+
"secondary",
|
|
39
|
+
"tertiary",
|
|
40
|
+
"inverse",
|
|
41
|
+
"accent",
|
|
42
|
+
"accent-on",
|
|
43
|
+
"danger",
|
|
44
|
+
"danger-on",
|
|
45
|
+
"warn",
|
|
46
|
+
"warn-on",
|
|
47
|
+
"success",
|
|
48
|
+
"success-on"
|
|
49
|
+
] }]
|
|
50
|
+
} } });
|
|
51
|
+
function W(...t) {
|
|
52
|
+
return ve(e(t));
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/hover/hover.tsx
|
|
56
|
+
var ye = S(null);
|
|
57
|
+
function be(e) {
|
|
58
|
+
return {
|
|
59
|
+
left: e.offsetLeft,
|
|
60
|
+
top: e.offsetTop,
|
|
61
|
+
width: e.offsetWidth,
|
|
62
|
+
height: e.offsetHeight
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function xe({ children: e, background: t = "bg-cui-subtle", borderRadius: n = "rounded-sm", className: r }) {
|
|
66
|
+
let i = D(/* @__PURE__ */ new Map()), [a, o] = O(null), s = D(null), [c, l] = O("idle"), u = w((e, t) => {
|
|
67
|
+
t ? i.current.set(e, t) : i.current.delete(e);
|
|
68
|
+
}, []), d = w((e) => {
|
|
69
|
+
let t = i.current.get(e);
|
|
70
|
+
if (!t) return;
|
|
71
|
+
let n = be(t);
|
|
72
|
+
l((e) => e === "idle" ? "fade" : "slide"), o(n);
|
|
73
|
+
}, []), f = w(() => {
|
|
74
|
+
l("idle"), o(null);
|
|
75
|
+
}, []), p = w(() => {
|
|
76
|
+
l("idle"), o(null);
|
|
77
|
+
}, []), m = a !== null, h = a ?? s.current;
|
|
78
|
+
a && (s.current = a);
|
|
79
|
+
let g = E(() => ({
|
|
80
|
+
registerItem: u,
|
|
81
|
+
onItemHover: d,
|
|
82
|
+
dismissHover: p
|
|
83
|
+
}), [
|
|
84
|
+
u,
|
|
85
|
+
d,
|
|
86
|
+
p
|
|
87
|
+
]);
|
|
88
|
+
return /* @__PURE__ */ A(ye.Provider, {
|
|
89
|
+
value: g,
|
|
90
|
+
children: /* @__PURE__ */ j("div", {
|
|
91
|
+
onPointerLeave: f,
|
|
92
|
+
className: W("group/h relative flex items-center", r),
|
|
93
|
+
children: [/* @__PURE__ */ A("div", {
|
|
94
|
+
"aria-hidden": !0,
|
|
95
|
+
className: W("pointer-events-none absolute left-0 top-0 z-0", "motion-reduce:transition-none", c === "slide" ? "transition-[translate,width,height,opacity,scale] duration-200 ease-cui-out-expo" : "transition-[opacity,scale] duration-200 ease-cui-out-expo", m ? "scale-100 opacity-100" : "scale-95 opacity-0"),
|
|
96
|
+
style: h ? {
|
|
97
|
+
width: h.width,
|
|
98
|
+
height: h.height,
|
|
99
|
+
translate: `${h.left}px ${h.top}px`
|
|
100
|
+
} : void 0,
|
|
101
|
+
children: /* @__PURE__ */ A("div", { className: W("absolute inset-0", t, n, "transition-[inset] duration-150 ease-cui-out-expo", "group-active/h:inset-px", "motion-reduce:transition-none") })
|
|
102
|
+
}), e]
|
|
103
|
+
})
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function G({ children: e, active: t = !1, background: n = "bg-cui-subtle", backgroundClassName: r, borderRadius: i = "rounded", focus: a = !0, interactive: o = !0, instantHover: s = !1, disabled: c = !1, fullWidth: l = !1, className: u, ...d }) {
|
|
107
|
+
let f = ee(ye);
|
|
108
|
+
return f ? /* @__PURE__ */ A(Se, {
|
|
109
|
+
group: f,
|
|
110
|
+
active: t,
|
|
111
|
+
background: n,
|
|
112
|
+
backgroundClassName: r,
|
|
113
|
+
borderRadius: i,
|
|
114
|
+
interactive: o,
|
|
115
|
+
disabled: c,
|
|
116
|
+
fullWidth: l,
|
|
117
|
+
className: u,
|
|
118
|
+
...d,
|
|
119
|
+
children: e
|
|
120
|
+
}) : /* @__PURE__ */ j("div", {
|
|
121
|
+
...d,
|
|
122
|
+
className: W("group/h relative flex min-w-0 items-center text-cui-primary text-cui-base", l ? "w-full" : "w-fit", u),
|
|
123
|
+
children: [/* @__PURE__ */ A("div", { className: W("absolute", s ? "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none" : "transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none", n, r, i, !c && "group-hover/h:inset-0 group-hover/h:opacity-100", o && !c && "group-active/h:inset-px", t ? "opacity-100 inset-0" : s ? "opacity-0 inset-0" : "opacity-0 inset-1", a && !c && "group-has-focus-visible/h:inset-0 group-has-focus-visible/h:opacity-100 group-has-focus-visible/h:ring-cui-focus group-has-focus-visible/h:ring-2 group-has-focus-visible/h:ring-offset-2") }), /* @__PURE__ */ A("div", {
|
|
124
|
+
className: "relative z-[2] flex w-full min-w-0 items-center gap-2",
|
|
125
|
+
children: e
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function Se({ children: e, group: t, active: n, background: r, backgroundClassName: i, borderRadius: a, interactive: o, disabled: s, fullWidth: c, className: l, ...u }) {
|
|
130
|
+
let d = D(null), f = D(null);
|
|
131
|
+
f.current === null && (f.current = Math.random());
|
|
132
|
+
let p = f.current, m = D(t);
|
|
133
|
+
m.current = t, T(() => {
|
|
134
|
+
let e = m.current;
|
|
135
|
+
return e.registerItem(p, d.current), () => e.registerItem(p, null);
|
|
136
|
+
}, [p]);
|
|
137
|
+
let h = D(n);
|
|
138
|
+
return T(() => {
|
|
139
|
+
n && !h.current && t.dismissHover(), h.current = n;
|
|
140
|
+
}, [n, t]), /* @__PURE__ */ j("div", {
|
|
141
|
+
...u,
|
|
142
|
+
ref: d,
|
|
143
|
+
onPointerEnter: (e) => {
|
|
144
|
+
u.onPointerEnter?.(e), !s && (n ? t.dismissHover() : t.onItemHover(p));
|
|
145
|
+
},
|
|
146
|
+
className: W("group/hi relative z-[1] flex items-center text-cui-primary text-cui-base", c ? "w-full" : "w-fit", l),
|
|
147
|
+
children: [/* @__PURE__ */ A("div", { className: W("absolute", r, i, a, "transition-[inset,opacity,scale] duration-150 ease-cui-out-expo", o && !s && "group-active/hi:inset-px", "motion-reduce:transition-none", n ? "inset-0 scale-100 opacity-100" : "inset-1 scale-95 opacity-0") }), /* @__PURE__ */ A("div", {
|
|
148
|
+
className: "relative z-[2] flex w-full min-w-0 items-center gap-2",
|
|
149
|
+
children: e
|
|
150
|
+
})]
|
|
151
|
+
});
|
|
30
152
|
}
|
|
31
153
|
//#endregion
|
|
32
154
|
//#region src/components/spinner/pixel-spinner.tsx
|
|
33
|
-
var
|
|
155
|
+
var Ce = [
|
|
34
156
|
0,
|
|
35
157
|
1,
|
|
36
158
|
2,
|
|
@@ -39,7 +161,7 @@ var ve = [
|
|
|
39
161
|
7,
|
|
40
162
|
6,
|
|
41
163
|
3
|
|
42
|
-
],
|
|
164
|
+
], we = [
|
|
43
165
|
0,
|
|
44
166
|
1,
|
|
45
167
|
2,
|
|
@@ -49,23 +171,23 @@ var ve = [
|
|
|
49
171
|
2,
|
|
50
172
|
3,
|
|
51
173
|
4
|
|
52
|
-
],
|
|
174
|
+
], Te = {
|
|
53
175
|
xs: 10,
|
|
54
176
|
sm: 14,
|
|
55
177
|
md: 20,
|
|
56
178
|
lg: 32
|
|
57
|
-
},
|
|
58
|
-
function
|
|
59
|
-
if (
|
|
179
|
+
}, Ee = !1;
|
|
180
|
+
function De() {
|
|
181
|
+
if (Ee || typeof document > "u") return;
|
|
60
182
|
let e = document.createElement("style");
|
|
61
|
-
e.setAttribute("data-pxs", ""), e.textContent = "\n@keyframes pxs-ring-on {\n 0% { opacity: var(--hi); }\n 12.5%, 100% { opacity: var(--lo); }\n}\n@keyframes pxs-ring-off {\n 0% { opacity: var(--lo); }\n 12.5%, 100% { opacity: var(--hi); }\n}\n@keyframes pxs-trail-5 {\n 0% { opacity: var(--hi); }\n 12.5% { opacity: 0.75; }\n 25% { opacity: var(--mid); }\n 37.5% { opacity: 0.25; }\n 50% { opacity: var(--lo); }\n 100% { opacity: var(--lo); }\n}\n@keyframes pxs-wave {\n 0%, 100% { opacity: var(--lo); }\n 40%, 60% { opacity: var(--hi); }\n}\n@keyframes pxs-radiate {\n 0%, 100% { opacity: var(--lo); }\n 20%, 40% { opacity: var(--hi); }\n}\n@keyframes pxs-pulse {\n 0%, 100% { opacity: var(--lo); }\n 50% { opacity: var(--hi); }\n}\n@keyframes pxs-flicker-a { 0%, 100% { opacity: var(--hi); } 33% { opacity: var(--lo); } 66% { opacity: var(--mid); } }\n@keyframes pxs-flicker-b { 0%, 100% { opacity: var(--lo); } 25% { opacity: var(--hi); } 75% { opacity: var(--mid); } }\n@keyframes pxs-flicker-c { 0%, 100% { opacity: var(--mid); } 40% { opacity: var(--hi); } 80% { opacity: var(--lo); } }\n@media (prefers-reduced-motion: reduce) {\n .pxs-cell { animation: none !important; opacity: var(--mid) !important; }\n}\n", document.head.appendChild(e),
|
|
183
|
+
e.setAttribute("data-pxs", ""), e.textContent = "\n@keyframes pxs-ring-on {\n 0% { opacity: var(--hi); }\n 12.5%, 100% { opacity: var(--lo); }\n}\n@keyframes pxs-ring-off {\n 0% { opacity: var(--lo); }\n 12.5%, 100% { opacity: var(--hi); }\n}\n@keyframes pxs-trail-5 {\n 0% { opacity: var(--hi); }\n 12.5% { opacity: 0.75; }\n 25% { opacity: var(--mid); }\n 37.5% { opacity: 0.25; }\n 50% { opacity: var(--lo); }\n 100% { opacity: var(--lo); }\n}\n@keyframes pxs-wave {\n 0%, 100% { opacity: var(--lo); }\n 40%, 60% { opacity: var(--hi); }\n}\n@keyframes pxs-radiate {\n 0%, 100% { opacity: var(--lo); }\n 20%, 40% { opacity: var(--hi); }\n}\n@keyframes pxs-pulse {\n 0%, 100% { opacity: var(--lo); }\n 50% { opacity: var(--hi); }\n}\n@keyframes pxs-flicker-a { 0%, 100% { opacity: var(--hi); } 33% { opacity: var(--lo); } 66% { opacity: var(--mid); } }\n@keyframes pxs-flicker-b { 0%, 100% { opacity: var(--lo); } 25% { opacity: var(--hi); } 75% { opacity: var(--mid); } }\n@keyframes pxs-flicker-c { 0%, 100% { opacity: var(--mid); } 40% { opacity: var(--hi); } 80% { opacity: var(--lo); } }\n@media (prefers-reduced-motion: reduce) {\n .pxs-cell { animation: none !important; opacity: var(--mid) !important; }\n}\n", document.head.appendChild(e), Ee = !0;
|
|
62
184
|
}
|
|
63
|
-
function
|
|
185
|
+
function Oe(e, t, n) {
|
|
64
186
|
let r = `${n}s`;
|
|
65
187
|
switch (e) {
|
|
66
|
-
case "hole": return t === 4 ? null : `pxs-ring-off ${r} ${(-(
|
|
67
|
-
case "trail": return t === 4 ? null : `pxs-trail-5 ${r} ${(-(
|
|
68
|
-
case "wave": return `pxs-wave ${r} ${(-((
|
|
188
|
+
case "hole": return t === 4 ? null : `pxs-ring-off ${r} ${(-(Ce.indexOf(t) / 8) * n).toFixed(3)}s steps(1) infinite`;
|
|
189
|
+
case "trail": return t === 4 ? null : `pxs-trail-5 ${r} ${(-(Ce.indexOf(t) / 8) * n).toFixed(3)}s linear infinite`;
|
|
190
|
+
case "wave": return `pxs-wave ${r} ${(-((we[t] ?? 0) / 5) * n).toFixed(3)}s ease-in-out infinite`;
|
|
69
191
|
case "radiate": return `pxs-radiate ${r} ${(-((t === 4 ? 0 : [
|
|
70
192
|
1,
|
|
71
193
|
3,
|
|
@@ -80,17 +202,17 @@ function Ce(e, t, n) {
|
|
|
80
202
|
][t % 3]} ${r} ${(-(t * .17 % 1) * n).toFixed(3)}s ease-in-out infinite`;
|
|
81
203
|
}
|
|
82
204
|
}
|
|
83
|
-
function
|
|
205
|
+
function ke(e, t) {
|
|
84
206
|
return t === 4 ? +(e === "hole") : 0;
|
|
85
207
|
}
|
|
86
|
-
function
|
|
87
|
-
typeof document < "u" &&
|
|
88
|
-
let a = typeof t == "number" ? t :
|
|
208
|
+
function Ae({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1.2, className: i }) {
|
|
209
|
+
typeof document < "u" && De();
|
|
210
|
+
let a = typeof t == "number" ? t : Te[t], o = a / (3 + 2 * n), s = o * (1 + n), c = Array.from({ length: 9 }, (e, t) => ({
|
|
89
211
|
row: Math.floor(t / 3),
|
|
90
212
|
col: t % 3,
|
|
91
213
|
cellIndex: t
|
|
92
214
|
}));
|
|
93
|
-
return /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ A("span", {
|
|
94
216
|
"aria-label": "Loading",
|
|
95
217
|
role: "status",
|
|
96
218
|
className: W("inline-block text-current", i),
|
|
@@ -101,14 +223,14 @@ function Te({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1
|
|
|
101
223
|
"--mid": "0.5",
|
|
102
224
|
"--hi": "1"
|
|
103
225
|
},
|
|
104
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ A("svg", {
|
|
105
227
|
width: a,
|
|
106
228
|
height: a,
|
|
107
229
|
viewBox: `0 0 ${a} ${a}`,
|
|
108
230
|
"aria-hidden": "true",
|
|
109
231
|
children: c.map(({ row: t, col: n, cellIndex: i }) => {
|
|
110
|
-
let a =
|
|
111
|
-
return /* @__PURE__ */
|
|
232
|
+
let a = Oe(e, i, r), c = ke(e, i);
|
|
233
|
+
return /* @__PURE__ */ A("rect", {
|
|
112
234
|
className: "pxs-cell",
|
|
113
235
|
x: n * s,
|
|
114
236
|
y: t * s,
|
|
@@ -126,24 +248,24 @@ function Te({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1
|
|
|
126
248
|
}
|
|
127
249
|
//#endregion
|
|
128
250
|
//#region src/components/spinner/spinner.tsx
|
|
129
|
-
var
|
|
251
|
+
var je = {
|
|
130
252
|
sm: 10,
|
|
131
253
|
md: 12
|
|
132
|
-
},
|
|
133
|
-
let s = r === "sm" ? "text-cui-sm" : "text-[13px]", c =
|
|
134
|
-
return /* @__PURE__ */
|
|
254
|
+
}, Me = C(function({ label: e, showDots: t = !0, showSpinner: n = !0, size: r = "md", variant: i = "wave", className: a }, o) {
|
|
255
|
+
let s = r === "sm" ? "text-cui-sm" : "text-[13px]", c = je[r];
|
|
256
|
+
return /* @__PURE__ */ j("span", {
|
|
135
257
|
ref: o,
|
|
136
258
|
className: W("inline-flex items-center gap-1.5", a),
|
|
137
|
-
children: [n && /* @__PURE__ */
|
|
259
|
+
children: [n && /* @__PURE__ */ A(Ae, {
|
|
138
260
|
variant: i,
|
|
139
261
|
size: c,
|
|
140
262
|
duration: 1.2
|
|
141
|
-
}), e && /* @__PURE__ */
|
|
263
|
+
}), e && /* @__PURE__ */ j("span", {
|
|
142
264
|
className: W("text-current", s),
|
|
143
|
-
children: [e, t && /* @__PURE__ */
|
|
265
|
+
children: [e, t && /* @__PURE__ */ A("span", { className: "after:animate-cui-dot-cycle inline-block w-[2ch] text-left after:content-['.']" })]
|
|
144
266
|
})]
|
|
145
267
|
});
|
|
146
|
-
}),
|
|
268
|
+
}), Ne = {
|
|
147
269
|
primary: {
|
|
148
270
|
active: !0,
|
|
149
271
|
bg: "bg-cui-inverse",
|
|
@@ -180,7 +302,7 @@ var Ee = {
|
|
|
180
302
|
bgClassName: "group-hover/btn:bg-cui-danger/30 group-active/btn:bg-cui-danger/50",
|
|
181
303
|
text: "text-cui-danger"
|
|
182
304
|
}
|
|
183
|
-
},
|
|
305
|
+
}, Pe = {
|
|
184
306
|
xs: {
|
|
185
307
|
height: "h-6",
|
|
186
308
|
padding: "px-1.5",
|
|
@@ -199,137 +321,319 @@ var Ee = {
|
|
|
199
321
|
textPadding: "px-1",
|
|
200
322
|
icon: "w-8"
|
|
201
323
|
}
|
|
202
|
-
},
|
|
203
|
-
let
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
ref:
|
|
206
|
-
disabled:
|
|
207
|
-
className: W("group/btn relative inline-flex min-w-fit cursor-pointer items-center justify-center", "rounded text-cui-base whitespace-pre select-none", "ring-cui-focus outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ",
|
|
208
|
-
...
|
|
324
|
+
}, K = C(function({ variant: e = "outline", size: t = "md", iconLeft: n, iconRight: r, loading: i = !1, disabled: a, className: o, children: s, ...c }, l) {
|
|
325
|
+
let u = Ne[e], d = Pe[t], f = !s && !r ? W(d.height, d.icon) : W(d.height, d.padding, "w-fit");
|
|
326
|
+
return /* @__PURE__ */ j(ne, {
|
|
327
|
+
ref: l,
|
|
328
|
+
disabled: a,
|
|
329
|
+
className: W("group/btn relative inline-flex min-w-fit cursor-pointer items-center justify-center", "rounded text-cui-base whitespace-pre select-none", "ring-cui-focus outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ", a && "pointer-events-none opacity-50", u.text, f, o),
|
|
330
|
+
...c,
|
|
209
331
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ A("div", { className: W("absolute rounded-[inherit]", u.bg, u.bgClassName, u.active ? "opacity-100 inset-0" : "opacity-0 inset-1", !a && [
|
|
211
333
|
"transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none",
|
|
212
334
|
"group-hover/btn:inset-0 group-hover/btn:opacity-100",
|
|
213
335
|
"group-active/btn:inset-px"
|
|
214
336
|
]) }),
|
|
215
|
-
|
|
216
|
-
className: W("relative z-[1] size-5 shrink-0 flex items-center justify-center [&>svg]:size-4",
|
|
217
|
-
children:
|
|
337
|
+
n && /* @__PURE__ */ A("span", {
|
|
338
|
+
className: W("relative z-[1] size-5 shrink-0 flex items-center justify-center [&>svg]:size-4", i && "opacity-0"),
|
|
339
|
+
children: n
|
|
218
340
|
}),
|
|
219
|
-
|
|
220
|
-
className: W("relative z-[1] inline",
|
|
221
|
-
children:
|
|
341
|
+
s && /* @__PURE__ */ A("span", {
|
|
342
|
+
className: W("relative z-[1] inline", d.textPadding, i && "opacity-0"),
|
|
343
|
+
children: s
|
|
222
344
|
}),
|
|
223
|
-
|
|
224
|
-
className: W("relative z-[1] size-5 shrink-0 flex items-center justify-center [&>svg]:size-4",
|
|
225
|
-
children:
|
|
345
|
+
r && /* @__PURE__ */ A("span", {
|
|
346
|
+
className: W("relative z-[1] size-5 shrink-0 flex items-center justify-center [&>svg]:size-4", i && "opacity-0"),
|
|
347
|
+
children: r
|
|
226
348
|
}),
|
|
227
|
-
|
|
349
|
+
i && /* @__PURE__ */ A("span", {
|
|
228
350
|
className: "absolute inset-0 z-[2] flex items-center justify-center",
|
|
229
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ A(Me, {
|
|
230
352
|
showDots: !1,
|
|
231
353
|
size: "sm"
|
|
232
354
|
})
|
|
233
355
|
})
|
|
234
356
|
]
|
|
235
357
|
});
|
|
236
|
-
}),
|
|
237
|
-
function
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
358
|
+
}), q = {
|
|
359
|
+
Panel: C(function({ minWidth: e, className: t, children: n, ...r }, i) {
|
|
360
|
+
return /* @__PURE__ */ A("div", {
|
|
361
|
+
ref: i,
|
|
362
|
+
className: W("flex flex-col bg-cui-base-2 border border-cui-neutral rounded-lg shadow-md p-1", e, "origin-[var(--transform-origin)] will-change-[transform,opacity]", "transition-[transform,scale,opacity] duration-200 ease-cui-out-expo", "data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", "motion-reduce:transition-none", t),
|
|
363
|
+
...r,
|
|
364
|
+
children: n
|
|
365
|
+
});
|
|
366
|
+
}),
|
|
367
|
+
Item: C(function({ icon: e, indicator: t, variant: n = "default", className: r, children: i, ...a }, o) {
|
|
368
|
+
return /* @__PURE__ */ j("div", {
|
|
369
|
+
ref: o,
|
|
370
|
+
className: W("group relative flex items-center gap-2 px-2 py-1.5 text-cui-base cursor-pointer rounded select-none outline-none", n === "danger" ? "text-cui-danger data-[highlighted]:text-cui-danger" : "text-cui-primary", r),
|
|
371
|
+
...a,
|
|
372
|
+
children: [
|
|
373
|
+
/* @__PURE__ */ A("div", { className: W("absolute inset-0 rounded-[inherit] bg-cui-subtle opacity-0", "group-data-[highlighted]:opacity-100", "group-data-[selected]:opacity-100", "group-data-[selected=true]:opacity-100", "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none", "group-active:inset-px") }),
|
|
374
|
+
e && /* @__PURE__ */ A("span", {
|
|
375
|
+
className: W("relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", n === "danger" ? "text-cui-danger" : "text-cui-tertiary group-data-[highlighted]:text-cui-primary group-data-[selected]:text-cui-primary group-data-[selected=true]:text-cui-primary"),
|
|
376
|
+
children: e
|
|
377
|
+
}),
|
|
378
|
+
i,
|
|
379
|
+
t && /* @__PURE__ */ A("span", {
|
|
380
|
+
className: "text-cui-accent relative z-[1] ml-auto [&>svg]:size-4",
|
|
381
|
+
children: t
|
|
382
|
+
})
|
|
383
|
+
]
|
|
384
|
+
});
|
|
385
|
+
}),
|
|
386
|
+
ItemIndicator: C(function({ className: e }, t) {
|
|
387
|
+
return /* @__PURE__ */ A("span", {
|
|
388
|
+
ref: t,
|
|
389
|
+
className: W("relative z-[1] ml-auto text-cui-secondary [&>svg]:size-4", e),
|
|
390
|
+
children: /* @__PURE__ */ A(o, {})
|
|
391
|
+
});
|
|
392
|
+
}),
|
|
393
|
+
List: C(function({ className: e, children: t, ...n }, r) {
|
|
394
|
+
return /* @__PURE__ */ A("div", {
|
|
395
|
+
ref: r,
|
|
396
|
+
className: W("flex max-h-[min(var(--available-height),280px)] flex-col gap-0.5 overflow-y-auto overscroll-contain outline-none", "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
|
|
397
|
+
...n,
|
|
398
|
+
children: t
|
|
399
|
+
});
|
|
400
|
+
}),
|
|
401
|
+
Separator: C(function({ className: e, ...t }, n) {
|
|
402
|
+
return /* @__PURE__ */ A("div", {
|
|
403
|
+
ref: n,
|
|
404
|
+
className: W("my-1 border-t border-cui-neutral", e),
|
|
405
|
+
...t
|
|
406
|
+
});
|
|
407
|
+
}),
|
|
408
|
+
GroupLabel: C(function({ className: e, children: t, ...n }, r) {
|
|
409
|
+
return /* @__PURE__ */ A("div", {
|
|
410
|
+
ref: r,
|
|
411
|
+
className: W("px-2 py-1.5 text-cui-sm font-medium text-cui-tertiary select-none", e),
|
|
412
|
+
...n,
|
|
413
|
+
children: t
|
|
414
|
+
});
|
|
415
|
+
}),
|
|
416
|
+
Positioner: C(function({ className: e, children: t, ...n }, r) {
|
|
417
|
+
return /* @__PURE__ */ A("div", {
|
|
418
|
+
ref: r,
|
|
419
|
+
className: W("z-50 outline-none", e),
|
|
420
|
+
...n,
|
|
421
|
+
children: t
|
|
422
|
+
});
|
|
423
|
+
}),
|
|
424
|
+
SearchInput: C(function({ className: e, children: t, ...n }, r) {
|
|
425
|
+
return /* @__PURE__ */ j("div", {
|
|
426
|
+
ref: r,
|
|
427
|
+
className: W("mb-0.5 flex items-center gap-2 rounded px-2 py-1.5", e),
|
|
428
|
+
...n,
|
|
429
|
+
children: [/* @__PURE__ */ A(h, { className: "text-cui-tertiary size-4 shrink-0" }), t]
|
|
430
|
+
});
|
|
431
|
+
}),
|
|
432
|
+
Empty: C(function({ className: e, children: t, ...n }, r) {
|
|
433
|
+
return /* @__PURE__ */ A("div", {
|
|
434
|
+
ref: r,
|
|
435
|
+
className: W("text-cui-secondary px-2 py-4 text-center text-cui-base empty:hidden", e),
|
|
436
|
+
...n,
|
|
437
|
+
children: t
|
|
438
|
+
});
|
|
439
|
+
})
|
|
440
|
+
};
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/components/combobox/combobox.tsx
|
|
443
|
+
function Fe({ value: e, defaultValue: t, onValueChange: n, items: r, children: i, className: a }) {
|
|
444
|
+
let [o, s] = O("");
|
|
445
|
+
return /* @__PURE__ */ A(M.Root, {
|
|
446
|
+
value: e,
|
|
447
|
+
defaultValue: t,
|
|
448
|
+
onValueChange: n ? (e) => {
|
|
449
|
+
e != null && n(e);
|
|
450
|
+
} : void 0,
|
|
451
|
+
items: r,
|
|
452
|
+
inputValue: o,
|
|
453
|
+
onInputValueChange: s,
|
|
454
|
+
onOpenChange: (e) => {
|
|
455
|
+
e && s("");
|
|
456
|
+
},
|
|
457
|
+
autoHighlight: !0,
|
|
458
|
+
children: a ? /* @__PURE__ */ A("div", {
|
|
459
|
+
className: a,
|
|
460
|
+
children: i
|
|
461
|
+
}) : i
|
|
462
|
+
});
|
|
244
463
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
registerItem: g,
|
|
261
|
-
onItemHover: _,
|
|
262
|
-
dismissHover: y
|
|
263
|
-
}), [
|
|
264
|
-
g,
|
|
265
|
-
_,
|
|
266
|
-
y
|
|
267
|
-
]);
|
|
268
|
-
return /* @__PURE__ */ p(Ae.Provider, {
|
|
269
|
-
value: S,
|
|
270
|
-
children: /* @__PURE__ */ m("div", {
|
|
271
|
-
onPointerLeave: v,
|
|
272
|
-
className: W("group/h relative flex items-center", r),
|
|
273
|
-
children: [/* @__PURE__ */ p("div", {
|
|
274
|
-
"aria-hidden": !0,
|
|
275
|
-
className: W("pointer-events-none absolute left-0 top-0 z-0", "motion-reduce:transition-none", f === "slide" ? "transition-[translate,width,height,opacity,scale] duration-200 ease-cui-out-expo" : "transition-[opacity,scale] duration-200 ease-cui-out-expo", b ? "scale-100 opacity-100" : "scale-95 opacity-0"),
|
|
276
|
-
style: x ? {
|
|
277
|
-
width: x.width,
|
|
278
|
-
height: x.height,
|
|
279
|
-
translate: `${x.left}px ${x.top}px`
|
|
280
|
-
} : void 0,
|
|
281
|
-
children: /* @__PURE__ */ p("div", { className: W("absolute inset-0", t, n, "transition-[inset] duration-150 ease-cui-out-expo", "group-active/h:inset-px", "motion-reduce:transition-none") })
|
|
282
|
-
}), e]
|
|
464
|
+
var Ie = C(function({ children: e, className: t }, n) {
|
|
465
|
+
return /* @__PURE__ */ A(M.Trigger, {
|
|
466
|
+
ref: n,
|
|
467
|
+
className: W("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
|
|
468
|
+
children: e
|
|
469
|
+
});
|
|
470
|
+
}), Le = C(function({ placeholder: e, size: t, className: n }, r) {
|
|
471
|
+
return /* @__PURE__ */ A(M.Trigger, {
|
|
472
|
+
ref: r,
|
|
473
|
+
render: /* @__PURE__ */ A(K, {
|
|
474
|
+
variant: "outline",
|
|
475
|
+
size: t,
|
|
476
|
+
iconRight: /* @__PURE__ */ A(u, {}),
|
|
477
|
+
className: n,
|
|
478
|
+
children: /* @__PURE__ */ A(M.Value, { placeholder: e })
|
|
283
479
|
})
|
|
284
480
|
});
|
|
481
|
+
});
|
|
482
|
+
function Re({ align: e = "start", searchPlaceholder: t = "Search...", emptyMessage: n = "No results found.", minWidth: r = "min-w-[220px]", children: i, className: a }) {
|
|
483
|
+
let o = i ?? ((e) => /* @__PURE__ */ A(ze, {
|
|
484
|
+
value: e.value,
|
|
485
|
+
icon: e.icon,
|
|
486
|
+
children: e.label
|
|
487
|
+
}, e.value));
|
|
488
|
+
return /* @__PURE__ */ A(M.Portal, { children: /* @__PURE__ */ A(M.Positioner, {
|
|
489
|
+
align: e,
|
|
490
|
+
sideOffset: 4,
|
|
491
|
+
render: /* @__PURE__ */ A(q.Positioner, {}),
|
|
492
|
+
children: /* @__PURE__ */ j(M.Popup, {
|
|
493
|
+
render: /* @__PURE__ */ A(q.Panel, {
|
|
494
|
+
minWidth: r,
|
|
495
|
+
className: a
|
|
496
|
+
}),
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ A(q.SearchInput, { children: /* @__PURE__ */ A(M.Input, {
|
|
499
|
+
placeholder: t,
|
|
500
|
+
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base flex-1 bg-transparent outline-none"
|
|
501
|
+
}) }),
|
|
502
|
+
/* @__PURE__ */ A(M.Empty, {
|
|
503
|
+
render: /* @__PURE__ */ A(q.Empty, {}),
|
|
504
|
+
children: n
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ A(M.List, {
|
|
507
|
+
render: /* @__PURE__ */ A(q.List, {}),
|
|
508
|
+
children: o
|
|
509
|
+
})
|
|
510
|
+
]
|
|
511
|
+
})
|
|
512
|
+
}) });
|
|
285
513
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
514
|
+
var ze = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
515
|
+
return /* @__PURE__ */ j(M.Item, {
|
|
516
|
+
ref: i,
|
|
517
|
+
value: e,
|
|
518
|
+
render: /* @__PURE__ */ A(q.Item, {
|
|
519
|
+
icon: t,
|
|
520
|
+
className: r
|
|
521
|
+
}),
|
|
522
|
+
children: [/* @__PURE__ */ A("span", {
|
|
523
|
+
className: "relative z-[1] flex-1",
|
|
524
|
+
children: n
|
|
525
|
+
}), /* @__PURE__ */ A(M.ItemIndicator, { render: /* @__PURE__ */ A(q.ItemIndicator, {}) })]
|
|
526
|
+
});
|
|
527
|
+
}), Be = C(function({ className: e, children: t }, n) {
|
|
528
|
+
return /* @__PURE__ */ A(M.Group, {
|
|
529
|
+
ref: n,
|
|
530
|
+
className: W("flex flex-col", e),
|
|
531
|
+
children: t
|
|
532
|
+
});
|
|
533
|
+
}), Ve = C(function({ className: e, children: t }, n) {
|
|
534
|
+
return /* @__PURE__ */ A(M.GroupLabel, {
|
|
535
|
+
ref: n,
|
|
536
|
+
render: /* @__PURE__ */ A(q.GroupLabel, { className: e }),
|
|
537
|
+
children: t
|
|
538
|
+
});
|
|
539
|
+
}), He = C(function({ className: e }, t) {
|
|
540
|
+
return /* @__PURE__ */ A(M.Separator, {
|
|
541
|
+
ref: t,
|
|
542
|
+
render: /* @__PURE__ */ A(q.Separator, { className: e })
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
//#endregion
|
|
546
|
+
//#region src/components/breadcrumb/breadcrumb.tsx
|
|
547
|
+
function Ue({ to: e, href: t, className: n, children: r }) {
|
|
548
|
+
return /* @__PURE__ */ A("a", {
|
|
549
|
+
href: e ?? t,
|
|
550
|
+
className: n,
|
|
551
|
+
children: r
|
|
305
552
|
});
|
|
306
553
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
554
|
+
function We() {
|
|
555
|
+
return /* @__PURE__ */ A("div", {
|
|
556
|
+
className: "flex w-4 shrink-0 items-center justify-center self-stretch",
|
|
557
|
+
children: /* @__PURE__ */ A("div", { className: "bg-cui-tertiary h-4 w-px rotate-[20deg] opacity-50" })
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
function Ge({ item: e, asLink: t, LinkEl: n }) {
|
|
561
|
+
let r = W("flex items-center gap-2 h-8 px-2 text-cui-base font-medium text-cui-primary select-none", t && "outline-none rounded focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2"), i = /* @__PURE__ */ j(k, { children: [e.icon && /* @__PURE__ */ A("span", {
|
|
562
|
+
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
563
|
+
children: e.icon
|
|
564
|
+
}), /* @__PURE__ */ A("span", { children: e.label })] });
|
|
565
|
+
return t && e.href ? /* @__PURE__ */ A(n, {
|
|
566
|
+
to: e.href,
|
|
567
|
+
href: e.href,
|
|
568
|
+
className: r,
|
|
569
|
+
children: i
|
|
570
|
+
}) : /* @__PURE__ */ A("span", {
|
|
571
|
+
className: r,
|
|
572
|
+
children: i
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
function Ke() {
|
|
576
|
+
return /* @__PURE__ */ A(Ie, {
|
|
577
|
+
className: "rounded-sm",
|
|
578
|
+
children: /* @__PURE__ */ A(G, {
|
|
579
|
+
background: "bg-cui-subtle",
|
|
580
|
+
interactive: !0,
|
|
581
|
+
children: /* @__PURE__ */ A("span", {
|
|
582
|
+
className: "flex h-8 items-center justify-center px-0.5 select-none",
|
|
583
|
+
children: /* @__PURE__ */ A(u, { className: "text-cui-tertiary size-4" })
|
|
584
|
+
})
|
|
585
|
+
})
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
function qe({ item: e, LinkEl: t }) {
|
|
589
|
+
return e.selector && e.options ? /* @__PURE__ */ j(Fe, {
|
|
590
|
+
value: e.value,
|
|
591
|
+
onValueChange: e.onSelect,
|
|
592
|
+
items: e.options,
|
|
593
|
+
children: [/* @__PURE__ */ j("span", {
|
|
594
|
+
className: "flex items-center",
|
|
595
|
+
children: [/* @__PURE__ */ A(G, {
|
|
596
|
+
background: "bg-cui-subtle",
|
|
597
|
+
interactive: !0,
|
|
598
|
+
children: /* @__PURE__ */ A(Ge, {
|
|
599
|
+
item: e,
|
|
600
|
+
asLink: !!e.href,
|
|
601
|
+
LinkEl: t
|
|
602
|
+
})
|
|
603
|
+
}), /* @__PURE__ */ A(Ke, {})]
|
|
604
|
+
}), /* @__PURE__ */ A(Re, { searchPlaceholder: "Search..." })]
|
|
605
|
+
}) : e.href ? /* @__PURE__ */ A(G, {
|
|
606
|
+
background: "bg-cui-subtle",
|
|
607
|
+
interactive: !0,
|
|
608
|
+
children: /* @__PURE__ */ A(Ge, {
|
|
609
|
+
item: e,
|
|
610
|
+
asLink: !0,
|
|
611
|
+
LinkEl: t
|
|
612
|
+
})
|
|
613
|
+
}) : /* @__PURE__ */ A(G, {
|
|
614
|
+
background: "bg-cui-subtle",
|
|
615
|
+
interactive: !0,
|
|
616
|
+
children: /* @__PURE__ */ A(Ge, {
|
|
617
|
+
item: e,
|
|
618
|
+
LinkEl: t
|
|
619
|
+
})
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
function Je({ items: e, linkComponent: t = Ue, className: n }) {
|
|
623
|
+
return /* @__PURE__ */ A("nav", {
|
|
624
|
+
className: W("flex items-center", n),
|
|
625
|
+
children: e.map((e, n) => /* @__PURE__ */ j("span", {
|
|
626
|
+
className: "flex items-center",
|
|
627
|
+
children: [n > 0 && /* @__PURE__ */ A(We, {}), /* @__PURE__ */ A(qe, {
|
|
628
|
+
item: e,
|
|
629
|
+
LinkEl: t
|
|
630
|
+
})]
|
|
631
|
+
}, e.label))
|
|
328
632
|
});
|
|
329
633
|
}
|
|
330
634
|
//#endregion
|
|
331
635
|
//#region src/components/toggle/toggle.tsx
|
|
332
|
-
var
|
|
636
|
+
var Ye = {
|
|
333
637
|
sm: {
|
|
334
638
|
track: "w-9 h-5",
|
|
335
639
|
thumb: "h-4 w-4 group-active/toggle:w-5"
|
|
@@ -338,9 +642,9 @@ var Pe = {
|
|
|
338
642
|
track: "w-11 h-6",
|
|
339
643
|
thumb: "h-5 w-5 group-active/toggle:w-6"
|
|
340
644
|
}
|
|
341
|
-
},
|
|
342
|
-
let c =
|
|
343
|
-
return /* @__PURE__ */
|
|
645
|
+
}, Xe = C(function({ checked: e, defaultChecked: t, onCheckedChange: n, disabled: r, size: i = "md", className: a, ...o }, s) {
|
|
646
|
+
let c = Ye[i];
|
|
647
|
+
return /* @__PURE__ */ A(re.Root, {
|
|
344
648
|
ref: s,
|
|
345
649
|
checked: e,
|
|
346
650
|
defaultChecked: t,
|
|
@@ -348,9 +652,9 @@ var Pe = {
|
|
|
348
652
|
disabled: r,
|
|
349
653
|
className: W("group/toggle relative inline-flex shrink-0 cursor-pointer items-center rounded-full", "bg-cui-subtle data-[checked]:bg-cui-accent", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "transition-colors duration-150 ease-cui-out-expo", r && "opacity-50 pointer-events-none", c.track, a),
|
|
350
654
|
...o,
|
|
351
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ A(re.Thumb, { className: W("block rounded-full bg-cui-accent-on shadow-sm", "translate-x-0.5 transition-all duration-150 ease-cui-out-expo", i === "sm" && "data-[checked]:translate-x-[18px] data-[checked]:group-active/toggle:translate-x-[14px]", i === "md" && "data-[checked]:translate-x-[22px] data-[checked]:group-active/toggle:translate-x-[18px]", c.thumb) })
|
|
352
656
|
});
|
|
353
|
-
}),
|
|
657
|
+
}), Ze = {
|
|
354
658
|
sm: {
|
|
355
659
|
root: "size-4 rounded-[4px]",
|
|
356
660
|
icon: "size-3",
|
|
@@ -361,85 +665,85 @@ var Pe = {
|
|
|
361
665
|
icon: "size-3.5",
|
|
362
666
|
label: "text-cui-base"
|
|
363
667
|
}
|
|
364
|
-
},
|
|
365
|
-
let
|
|
366
|
-
ref:
|
|
668
|
+
}, Qe = C(function({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r = !1, disabled: i = !1, required: a, size: s = "md", label: c, name: l, className: u, ...d }, f) {
|
|
669
|
+
let p = Ze[s], m = /* @__PURE__ */ A(ie.Root, {
|
|
670
|
+
ref: f,
|
|
367
671
|
checked: e,
|
|
368
672
|
defaultChecked: t,
|
|
369
673
|
onCheckedChange: n,
|
|
370
674
|
indeterminate: r,
|
|
371
675
|
disabled: i,
|
|
372
676
|
required: a,
|
|
373
|
-
name:
|
|
374
|
-
className: W("group/checkbox relative inline-flex shrink-0 items-center justify-center", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "transition-colors duration-150 ease-out", "motion-reduce:transition-none", "before:absolute before:inset-1/2 before:size-8 before:-translate-1/2", i ? "pointer-events-none cursor-not-allowed border border-cui-neutral bg-cui-subtle" : "cursor-pointer border border-cui-neutral bg-cui-base-2 data-[checked]:border-cui-accent data-[checked]:bg-cui-accent data-[indeterminate]:border-cui-neutral-strong data-[indeterminate]:bg-cui-subtle",
|
|
375
|
-
...
|
|
376
|
-
children: /* @__PURE__ */
|
|
677
|
+
name: l,
|
|
678
|
+
className: W("group/checkbox relative inline-flex shrink-0 items-center justify-center", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "transition-colors duration-150 ease-out", "motion-reduce:transition-none", "before:absolute before:inset-1/2 before:size-8 before:-translate-1/2", i ? "pointer-events-none cursor-not-allowed border border-cui-neutral bg-cui-subtle" : "cursor-pointer border border-cui-neutral bg-cui-base-2 data-[checked]:border-cui-accent data-[checked]:bg-cui-accent data-[indeterminate]:border-cui-neutral-strong data-[indeterminate]:bg-cui-subtle", p.root, !c && u),
|
|
679
|
+
...d,
|
|
680
|
+
children: /* @__PURE__ */ A(ie.Indicator, {
|
|
377
681
|
keepMounted: !0,
|
|
378
682
|
className: W("flex items-center justify-center", i ? "text-cui-tertiary" : "data-[checked]:text-cui-accent-on data-[indeterminate]:text-cui-secondary", "scale-100 opacity-100", "data-[unchecked]:scale-50 data-[unchecked]:opacity-0", "data-[starting-style]:scale-50 data-[starting-style]:opacity-0", "data-[ending-style]:scale-50 data-[ending-style]:opacity-0", "transition-[scale,opacity] duration-300 ease-cui-out-expo", "motion-reduce:transition-none"),
|
|
379
|
-
children:
|
|
683
|
+
children: A(r ? g : o, { className: p.icon })
|
|
380
684
|
})
|
|
381
685
|
});
|
|
382
|
-
return
|
|
383
|
-
className: W("inline-flex items-center gap-2 select-none", i ? "cursor-not-allowed" : "cursor-pointer",
|
|
384
|
-
children: [
|
|
385
|
-
className: W(
|
|
386
|
-
children:
|
|
686
|
+
return c ? /* @__PURE__ */ j("label", {
|
|
687
|
+
className: W("inline-flex items-center gap-2 select-none", i ? "cursor-not-allowed" : "cursor-pointer", u),
|
|
688
|
+
children: [m, /* @__PURE__ */ A("span", {
|
|
689
|
+
className: W(p.label, i ? "text-cui-tertiary" : "text-cui-primary"),
|
|
690
|
+
children: c
|
|
387
691
|
})]
|
|
388
|
-
}) :
|
|
389
|
-
}),
|
|
692
|
+
}) : m;
|
|
693
|
+
}), $e = {
|
|
390
694
|
default: "bg-cui-base-1 rounded-lg shadow-xs ring-1 ring-cui-neutral",
|
|
391
695
|
nested: "bg-cui-base-2 rounded-sm shadow-sm ring-1 ring-cui-neutral"
|
|
392
|
-
},
|
|
393
|
-
return /* @__PURE__ */
|
|
696
|
+
}, et = C(function({ className: e, children: t }, n) {
|
|
697
|
+
return /* @__PURE__ */ A("div", {
|
|
394
698
|
ref: n,
|
|
395
699
|
className: W("flex flex-col gap-1 p-1", e),
|
|
396
700
|
children: t
|
|
397
701
|
});
|
|
398
|
-
}),
|
|
399
|
-
return /* @__PURE__ */
|
|
702
|
+
}), tt = C(function({ className: e, children: t }, n) {
|
|
703
|
+
return /* @__PURE__ */ A("div", {
|
|
400
704
|
ref: n,
|
|
401
705
|
className: W("px-4 py-3", e),
|
|
402
706
|
children: t
|
|
403
707
|
});
|
|
404
|
-
}),
|
|
405
|
-
return /* @__PURE__ */
|
|
708
|
+
}), nt = C(function({ className: e, children: t }, n) {
|
|
709
|
+
return /* @__PURE__ */ A("div", {
|
|
406
710
|
ref: n,
|
|
407
711
|
className: W("p-4", e),
|
|
408
712
|
children: t
|
|
409
713
|
});
|
|
410
|
-
}),
|
|
411
|
-
return /* @__PURE__ */
|
|
714
|
+
}), rt = C(function({ className: e, children: t }, n) {
|
|
715
|
+
return /* @__PURE__ */ A("div", {
|
|
412
716
|
ref: n,
|
|
413
717
|
className: W("border-b border-cui-neutral last:border-b-0 p-4", e),
|
|
414
718
|
children: t
|
|
415
719
|
});
|
|
416
|
-
}),
|
|
417
|
-
return /* @__PURE__ */
|
|
720
|
+
}), J = C(function({ variant: e = "default", className: t, children: n }, r) {
|
|
721
|
+
return /* @__PURE__ */ A("div", {
|
|
418
722
|
ref: r,
|
|
419
|
-
className: W(
|
|
723
|
+
className: W($e[e], t),
|
|
420
724
|
children: n
|
|
421
725
|
});
|
|
422
726
|
});
|
|
423
|
-
|
|
727
|
+
J.Content = et, J.Header = tt, J.Body = nt, J.Section = rt;
|
|
424
728
|
//#endregion
|
|
425
729
|
//#region src/components/nav-link/nav-link.tsx
|
|
426
|
-
var
|
|
730
|
+
var it = {
|
|
427
731
|
sm: "h-7 px-1.5",
|
|
428
732
|
md: "h-8 px-1.5"
|
|
429
733
|
};
|
|
430
|
-
function
|
|
431
|
-
return /* @__PURE__ */
|
|
734
|
+
function at({ className: e, children: t }) {
|
|
735
|
+
return /* @__PURE__ */ A(xe, {
|
|
432
736
|
background: "bg-cui-subtle",
|
|
433
737
|
className: W("gap-1 p-2 flex-nowrap", e),
|
|
434
738
|
children: t
|
|
435
739
|
});
|
|
436
740
|
}
|
|
437
|
-
function
|
|
438
|
-
return /* @__PURE__ */
|
|
741
|
+
function ot({ active: e = !1, icon: t, href: n, onClick: r, size: i = "md", className: a, children: o }) {
|
|
742
|
+
return /* @__PURE__ */ A(G, {
|
|
439
743
|
active: e,
|
|
440
744
|
background: "bg-cui-subtle",
|
|
441
745
|
className: a,
|
|
442
|
-
children: /* @__PURE__ */
|
|
746
|
+
children: /* @__PURE__ */ j(n ? "a" : "button", {
|
|
443
747
|
...n ? {
|
|
444
748
|
href: n,
|
|
445
749
|
onClick: r
|
|
@@ -447,11 +751,11 @@ function Ge({ active: e = !1, icon: t, href: n, onClick: r, size: i = "md", clas
|
|
|
447
751
|
type: "button",
|
|
448
752
|
onClick: r
|
|
449
753
|
},
|
|
450
|
-
className: W("flex items-center text-cui-base font-medium cursor-pointer select-none whitespace-nowrap", "outline-none",
|
|
451
|
-
children: [t && /* @__PURE__ */
|
|
754
|
+
className: W("flex items-center text-cui-base font-medium cursor-pointer select-none whitespace-nowrap", "outline-none", it[i], e ? "text-cui-primary" : "text-cui-secondary"),
|
|
755
|
+
children: [t && /* @__PURE__ */ A("span", {
|
|
452
756
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
453
757
|
children: t
|
|
454
|
-
}), /* @__PURE__ */
|
|
758
|
+
}), /* @__PURE__ */ A("span", {
|
|
455
759
|
className: "px-1",
|
|
456
760
|
children: o
|
|
457
761
|
})]
|
|
@@ -460,8 +764,8 @@ function Ge({ active: e = !1, icon: t, href: n, onClick: r, size: i = "md", clas
|
|
|
460
764
|
}
|
|
461
765
|
//#endregion
|
|
462
766
|
//#region src/components/logo/logo.tsx
|
|
463
|
-
var
|
|
464
|
-
return e === "circle" ? /* @__PURE__ */
|
|
767
|
+
var st = C(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
768
|
+
return e === "circle" ? /* @__PURE__ */ j("svg", {
|
|
465
769
|
ref: r,
|
|
466
770
|
width: t,
|
|
467
771
|
height: t,
|
|
@@ -470,14 +774,14 @@ var Ke = i(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
|
470
774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
471
775
|
className: W("shrink-0", n),
|
|
472
776
|
"aria-label": "CodeRabbit",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ A("path", {
|
|
474
778
|
d: "M600.867 1200C932.238 1200 1200.87 931.37 1200.87 600C1200.87 268.629 932.238 -0.000488281 600.867 -0.000488281C269.496 -0.000488281 0.867188 268.629 0.867188 600C0.867188 931.37 269.496 1200 600.867 1200Z",
|
|
475
779
|
fill: "currentColor"
|
|
476
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ A("path", {
|
|
477
781
|
d: "M1008.3 500.615C1008.3 500.615 924.706 393.751 819.62 387.639C751.807 383.636 735.379 392.696 732.434 399.444C728.226 364.456 698.322 202.361 491.729 168.008C518.102 357.589 627.02 308.191 691.161 438.86C691.161 438.86 582.921 291.734 404.969 345.903C404.969 345.903 469.83 482.07 661.676 509.891C661.676 509.891 677.05 562.586 681.684 571.862C681.684 571.862 386.224 417.779 296.512 713.505C229.747 698.382 207.352 770.859 284.09 820.369C284.09 820.369 297.147 768.519 328.943 753.131C328.943 753.131 260.711 829.226 340.946 920.36H628.925C635.883 908.834 666.68 848.19 590.514 802.285C644.278 801.516 688.042 902.932 735.128 921.058H803.61C805.927 915.428 810.771 898.567 799.395 883.395C781.857 863.278 743.46 866.002 743.802 828.8C757.062 655.746 1016.55 708.888 1008.3 500.615Z",
|
|
478
782
|
fill: "var(--background-color-cui-base-1)"
|
|
479
783
|
})]
|
|
480
|
-
}) : /* @__PURE__ */
|
|
784
|
+
}) : /* @__PURE__ */ A("svg", {
|
|
481
785
|
ref: r,
|
|
482
786
|
width: t,
|
|
483
787
|
height: t,
|
|
@@ -486,181 +790,12 @@ var Ke = i(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
|
486
790
|
xmlns: "http://www.w3.org/2000/svg",
|
|
487
791
|
className: W("shrink-0", n),
|
|
488
792
|
"aria-label": "CodeRabbit",
|
|
489
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ A("path", {
|
|
490
794
|
d: "M17.9955 7.95021C17.9955 7.95021 16.0484 5.39587 13.6007 5.24977C12.0212 5.15411 11.6385 5.37067 11.5699 5.53194C11.4719 4.69563 10.7754 0.821109 5.96335 0C6.57764 4.53152 9.1146 3.35077 10.6086 6.47412C10.6086 6.47412 8.08743 2.9574 3.94251 4.25219C3.94251 4.25219 5.45327 7.50694 9.92182 8.17196C9.92182 8.17196 10.2799 9.43152 10.3879 9.65324C10.3879 9.65324 3.50589 5.97023 1.41629 13.0389C-0.138828 12.6774 -0.660461 14.4098 1.12695 15.5933C1.12695 15.5933 1.43108 14.3539 2.17168 13.9861C2.17168 13.9861 0.582397 15.805 2.45126 17.9833H9.15897C9.32104 17.7078 10.0384 16.2583 8.26429 15.161C9.51658 15.1426 10.5359 17.5667 11.6327 18H13.2278C13.2818 17.8654 13.3946 17.4624 13.1296 17.0998C12.7211 16.6189 11.8268 16.684 11.8347 15.7948C12.1436 11.6583 18.1877 12.9285 17.9955 7.95021Z",
|
|
491
795
|
fill: "currentColor"
|
|
492
796
|
})
|
|
493
797
|
});
|
|
494
|
-
}),
|
|
495
|
-
Panel: i(function({ minWidth: e, className: t, children: n, ...r }, i) {
|
|
496
|
-
return /* @__PURE__ */ p("div", {
|
|
497
|
-
ref: i,
|
|
498
|
-
className: W("flex flex-col bg-cui-base-2 border border-cui-neutral rounded-lg shadow-md p-1", e, "origin-[var(--transform-origin)] will-change-[transform,opacity]", "transition-[transform,scale,opacity] duration-200 ease-cui-out-expo", "data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", "motion-reduce:transition-none", t),
|
|
499
|
-
...r,
|
|
500
|
-
children: n
|
|
501
|
-
});
|
|
502
|
-
}),
|
|
503
|
-
Item: i(function({ icon: e, indicator: t, variant: n = "default", className: r, children: i, ...a }, o) {
|
|
504
|
-
return /* @__PURE__ */ m("div", {
|
|
505
|
-
ref: o,
|
|
506
|
-
className: W("group relative flex items-center gap-2 px-2 py-1.5 text-cui-base cursor-pointer rounded select-none outline-none", n === "danger" ? "text-cui-danger data-[highlighted]:text-cui-danger" : "text-cui-primary", r),
|
|
507
|
-
...a,
|
|
508
|
-
children: [
|
|
509
|
-
/* @__PURE__ */ p("div", { className: W("absolute inset-0 rounded-[inherit] bg-cui-subtle opacity-0", "group-data-[highlighted]:opacity-100", "group-data-[selected]:opacity-100", "group-data-[selected=true]:opacity-100", "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none", "group-active:inset-px") }),
|
|
510
|
-
e && /* @__PURE__ */ p("span", {
|
|
511
|
-
className: W("relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", n === "danger" ? "text-cui-danger" : "text-cui-tertiary group-data-[highlighted]:text-cui-primary group-data-[selected]:text-cui-primary group-data-[selected=true]:text-cui-primary"),
|
|
512
|
-
children: e
|
|
513
|
-
}),
|
|
514
|
-
i,
|
|
515
|
-
t && /* @__PURE__ */ p("span", {
|
|
516
|
-
className: "text-cui-accent relative z-[1] ml-auto [&>svg]:size-4",
|
|
517
|
-
children: t
|
|
518
|
-
})
|
|
519
|
-
]
|
|
520
|
-
});
|
|
521
|
-
}),
|
|
522
|
-
ItemIndicator: i(function({ className: e }, t) {
|
|
523
|
-
return /* @__PURE__ */ p("span", {
|
|
524
|
-
ref: t,
|
|
525
|
-
className: W("relative z-[1] ml-auto text-cui-secondary [&>svg]:size-4", e),
|
|
526
|
-
children: /* @__PURE__ */ p(b, {})
|
|
527
|
-
});
|
|
528
|
-
}),
|
|
529
|
-
List: i(function({ className: e, children: t, ...n }, r) {
|
|
530
|
-
return /* @__PURE__ */ p("div", {
|
|
531
|
-
ref: r,
|
|
532
|
-
className: W("flex max-h-[min(var(--available-height),280px)] flex-col gap-0.5 overflow-y-auto overscroll-contain outline-none", "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
|
|
533
|
-
...n,
|
|
534
|
-
children: t
|
|
535
|
-
});
|
|
536
|
-
}),
|
|
537
|
-
Separator: i(function({ className: e, ...t }, n) {
|
|
538
|
-
return /* @__PURE__ */ p("div", {
|
|
539
|
-
ref: n,
|
|
540
|
-
className: W("my-1 border-t border-cui-neutral", e),
|
|
541
|
-
...t
|
|
542
|
-
});
|
|
543
|
-
}),
|
|
544
|
-
GroupLabel: i(function({ className: e, children: t, ...n }, r) {
|
|
545
|
-
return /* @__PURE__ */ p("div", {
|
|
546
|
-
ref: r,
|
|
547
|
-
className: W("px-2 py-1.5 text-cui-sm font-medium text-cui-tertiary select-none", e),
|
|
548
|
-
...n,
|
|
549
|
-
children: t
|
|
550
|
-
});
|
|
551
|
-
}),
|
|
552
|
-
Positioner: i(function({ className: e, children: t, ...n }, r) {
|
|
553
|
-
return /* @__PURE__ */ p("div", {
|
|
554
|
-
ref: r,
|
|
555
|
-
className: W("z-50 outline-none", e),
|
|
556
|
-
...n,
|
|
557
|
-
children: t
|
|
558
|
-
});
|
|
559
|
-
}),
|
|
560
|
-
SearchInput: i(function({ className: e, children: t, ...n }, r) {
|
|
561
|
-
return /* @__PURE__ */ m("div", {
|
|
562
|
-
ref: r,
|
|
563
|
-
className: W("mb-0.5 flex items-center gap-2 rounded px-2 py-1.5", e),
|
|
564
|
-
...n,
|
|
565
|
-
children: [/* @__PURE__ */ p(A, { className: "text-cui-tertiary size-4 shrink-0" }), t]
|
|
566
|
-
});
|
|
567
|
-
}),
|
|
568
|
-
Empty: i(function({ className: e, children: t, ...n }, r) {
|
|
569
|
-
return /* @__PURE__ */ p("div", {
|
|
570
|
-
ref: r,
|
|
571
|
-
className: W("text-cui-secondary px-2 py-4 text-center text-cui-base empty:hidden", e),
|
|
572
|
-
...n,
|
|
573
|
-
children: t
|
|
574
|
-
});
|
|
575
|
-
})
|
|
576
|
-
};
|
|
577
|
-
//#endregion
|
|
578
|
-
//#region src/components/combobox/combobox.tsx
|
|
579
|
-
function qe({ value: e, defaultValue: t, onValueChange: n, items: r, children: i, className: a }) {
|
|
580
|
-
let [o, s] = d("");
|
|
581
|
-
return /* @__PURE__ */ p(M.Root, {
|
|
582
|
-
value: e,
|
|
583
|
-
defaultValue: t,
|
|
584
|
-
onValueChange: n ? (e) => {
|
|
585
|
-
e != null && n(e);
|
|
586
|
-
} : void 0,
|
|
587
|
-
items: r,
|
|
588
|
-
inputValue: o,
|
|
589
|
-
onInputValueChange: s,
|
|
590
|
-
onOpenChange: (e) => {
|
|
591
|
-
e && s("");
|
|
592
|
-
},
|
|
593
|
-
autoHighlight: !0,
|
|
594
|
-
children: a ? /* @__PURE__ */ p("div", {
|
|
595
|
-
className: a,
|
|
596
|
-
children: i
|
|
597
|
-
}) : i
|
|
598
|
-
});
|
|
599
|
-
}
|
|
600
|
-
var Je = i(function({ children: e, className: t }, n) {
|
|
601
|
-
return /* @__PURE__ */ p(M.Trigger, {
|
|
602
|
-
ref: n,
|
|
603
|
-
className: W("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
|
|
604
|
-
children: e
|
|
605
|
-
});
|
|
606
|
-
}), Ye = i(function({ placeholder: e, size: t, className: n }, r) {
|
|
607
|
-
return /* @__PURE__ */ p(M.Trigger, {
|
|
608
|
-
ref: r,
|
|
609
|
-
render: /* @__PURE__ */ p(G, {
|
|
610
|
-
variant: "outline",
|
|
611
|
-
size: t,
|
|
612
|
-
iconRight: /* @__PURE__ */ p(E, {}),
|
|
613
|
-
className: n,
|
|
614
|
-
children: /* @__PURE__ */ p(M.Value, { placeholder: e })
|
|
615
|
-
})
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
function Xe({ align: e = "start", searchPlaceholder: t = "Search...", emptyMessage: n = "No results found.", minWidth: r = "min-w-[220px]", children: i, className: a }) {
|
|
619
|
-
let o = i ?? ((e) => /* @__PURE__ */ p(Ze, {
|
|
620
|
-
value: e.value,
|
|
621
|
-
icon: e.icon,
|
|
622
|
-
children: e.label
|
|
623
|
-
}, e.value));
|
|
624
|
-
return /* @__PURE__ */ p(M.Portal, { children: /* @__PURE__ */ p(M.Positioner, {
|
|
625
|
-
align: e,
|
|
626
|
-
sideOffset: 4,
|
|
627
|
-
render: /* @__PURE__ */ p(J.Positioner, {}),
|
|
628
|
-
children: /* @__PURE__ */ m(M.Popup, {
|
|
629
|
-
render: /* @__PURE__ */ p(J.Panel, {
|
|
630
|
-
minWidth: r,
|
|
631
|
-
className: a
|
|
632
|
-
}),
|
|
633
|
-
children: [
|
|
634
|
-
/* @__PURE__ */ p(J.SearchInput, { children: /* @__PURE__ */ p(M.Input, {
|
|
635
|
-
placeholder: t,
|
|
636
|
-
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base flex-1 bg-transparent outline-none"
|
|
637
|
-
}) }),
|
|
638
|
-
/* @__PURE__ */ p(M.Empty, {
|
|
639
|
-
render: /* @__PURE__ */ p(J.Empty, {}),
|
|
640
|
-
children: n
|
|
641
|
-
}),
|
|
642
|
-
/* @__PURE__ */ p(M.List, {
|
|
643
|
-
render: /* @__PURE__ */ p(J.List, {}),
|
|
644
|
-
children: o
|
|
645
|
-
})
|
|
646
|
-
]
|
|
647
|
-
})
|
|
648
|
-
}) });
|
|
649
|
-
}
|
|
650
|
-
var Ze = i(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
651
|
-
return /* @__PURE__ */ m(M.Item, {
|
|
652
|
-
ref: i,
|
|
653
|
-
value: e,
|
|
654
|
-
render: /* @__PURE__ */ p(J.Item, {
|
|
655
|
-
icon: t,
|
|
656
|
-
className: r
|
|
657
|
-
}),
|
|
658
|
-
children: [/* @__PURE__ */ p("span", {
|
|
659
|
-
className: "relative z-[1] flex-1",
|
|
660
|
-
children: n
|
|
661
|
-
}), /* @__PURE__ */ p(M.ItemIndicator, { render: /* @__PURE__ */ p(J.ItemIndicator, {}) })]
|
|
662
|
-
});
|
|
663
|
-
}), Qe = {
|
|
798
|
+
}), ct = {
|
|
664
799
|
xs: {
|
|
665
800
|
outer: "size-5",
|
|
666
801
|
text: "text-[8px]",
|
|
@@ -683,13 +818,13 @@ var Ze = i(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
683
818
|
},
|
|
684
819
|
xl: {
|
|
685
820
|
outer: "size-16",
|
|
686
|
-
text: "text-cui-
|
|
821
|
+
text: "text-cui-lg",
|
|
687
822
|
px: 64
|
|
688
823
|
}
|
|
689
|
-
},
|
|
824
|
+
}, lt = {
|
|
690
825
|
circle: "rounded-full",
|
|
691
826
|
square: "rounded-md"
|
|
692
|
-
},
|
|
827
|
+
}, ut = {
|
|
693
828
|
neutral: "bg-cui-subtle text-cui-primary",
|
|
694
829
|
accent: "bg-cui-accent text-cui-accent-on",
|
|
695
830
|
danger: "bg-cui-danger text-cui-danger-on",
|
|
@@ -704,7 +839,7 @@ function Y(e, t = 0) {
|
|
|
704
839
|
}
|
|
705
840
|
return n = Math.imul(n ^ n >>> 16, 2246822507), n ^= Math.imul(r ^ r >>> 13, 3266489909), r = Math.imul(r ^ r >>> 16, 2246822507), r ^= Math.imul(n ^ n >>> 13, 3266489909), 4294967296 * (2097151 & r) + (n >>> 0);
|
|
706
841
|
}
|
|
707
|
-
function
|
|
842
|
+
function dt(e) {
|
|
708
843
|
return [
|
|
709
844
|
Y(e, 0),
|
|
710
845
|
Y(e, 1),
|
|
@@ -712,7 +847,7 @@ function tt(e) {
|
|
|
712
847
|
Y(e, 3)
|
|
713
848
|
];
|
|
714
849
|
}
|
|
715
|
-
function
|
|
850
|
+
function ft(e, t, n, r) {
|
|
716
851
|
let i = e.filter(Boolean).length, a = Math.ceil(t * n);
|
|
717
852
|
if (i >= a) return;
|
|
718
853
|
let o = a - i, s = 0;
|
|
@@ -721,8 +856,8 @@ function nt(e, t, n, r) {
|
|
|
721
856
|
e[i] || (e[i] = !0, o--), s++;
|
|
722
857
|
}
|
|
723
858
|
}
|
|
724
|
-
function
|
|
725
|
-
let n =
|
|
859
|
+
function pt(e, t) {
|
|
860
|
+
let n = dt(e), r = n[0] ?? 0, i = n[1] ?? r, a = n[2] ?? r, o = (e) => n[e % n.length] ?? r;
|
|
726
861
|
switch (t) {
|
|
727
862
|
case "grid": {
|
|
728
863
|
let e = [];
|
|
@@ -730,7 +865,7 @@ function rt(e, t) {
|
|
|
730
865
|
let n = o(Math.floor(t / 26));
|
|
731
866
|
e.push((n >> t % 26 & 1) == 1);
|
|
732
867
|
}
|
|
733
|
-
return
|
|
868
|
+
return ft(e, 25, .3, a), {
|
|
734
869
|
cols: 5,
|
|
735
870
|
rows: 5,
|
|
736
871
|
cells: e
|
|
@@ -849,53 +984,53 @@ function rt(e, t) {
|
|
|
849
984
|
}
|
|
850
985
|
}
|
|
851
986
|
}
|
|
852
|
-
function
|
|
987
|
+
function mt(e) {
|
|
853
988
|
return Y(e, 42) % 360;
|
|
854
989
|
}
|
|
855
|
-
function
|
|
990
|
+
function ht(e) {
|
|
856
991
|
return {
|
|
857
992
|
"--ga-pixel": `light-dark(oklch(0.55 0.15 ${e}), oklch(0.7 0.14 ${e}))`,
|
|
858
993
|
"--ga-bg": `light-dark(oklch(0.92 0.03 ${e}), oklch(0.25 0.03 ${e}))`
|
|
859
994
|
};
|
|
860
995
|
}
|
|
861
|
-
var
|
|
862
|
-
let { grid: o, hue: s } =
|
|
863
|
-
grid:
|
|
864
|
-
hue:
|
|
865
|
-
}), [e, t]), { cols: c, rows:
|
|
866
|
-
let t =
|
|
996
|
+
var gt = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a) {
|
|
997
|
+
let { grid: o, hue: s } = E(() => ({
|
|
998
|
+
grid: pt(e, t),
|
|
999
|
+
hue: mt(e)
|
|
1000
|
+
}), [e, t]), { cols: c, rows: l, cells: u } = o, d = t === "dense" || t === "quad-dense" ? 3 : 4, f = (100 - d * 2 - 3 * (c - 1)) / c, p = l * f + (l - 1) * 3, m = c * f + (c - 1) * 3, h = d + (100 - d * 2 - p) / 2, g = d + (100 - d * 2 - m) / 2, _ = Y(e, 99), v = (e) => .55 + (_ >> e % 26 & 3) * .15, y = `av-${Y(e + t, 7) >>> 0}`, b = ht(s), x = Y(e, 77), S = (e) => {
|
|
1001
|
+
let t = x >> e % 26 & 7, n = _ >> (e + 5) % 26 & 7;
|
|
867
1002
|
return {
|
|
868
1003
|
duration: 1.5 + t * .35,
|
|
869
1004
|
delay: n * .4
|
|
870
1005
|
};
|
|
871
|
-
},
|
|
872
|
-
return /* @__PURE__ */
|
|
1006
|
+
}, C = `ga-flk-${y}`;
|
|
1007
|
+
return /* @__PURE__ */ j("svg", {
|
|
873
1008
|
ref: a,
|
|
874
1009
|
width: n,
|
|
875
1010
|
height: n,
|
|
876
1011
|
viewBox: "0 0 100 100",
|
|
877
1012
|
className: W("shrink-0", i),
|
|
878
1013
|
style: {
|
|
879
|
-
...
|
|
1014
|
+
...b,
|
|
880
1015
|
"--ga-anim": "none"
|
|
881
1016
|
},
|
|
882
|
-
onMouseEnter: (e) => e.currentTarget.style.setProperty("--ga-anim",
|
|
1017
|
+
onMouseEnter: (e) => e.currentTarget.style.setProperty("--ga-anim", C),
|
|
883
1018
|
onMouseLeave: (e) => e.currentTarget.style.setProperty("--ga-anim", "none"),
|
|
884
1019
|
role: "img",
|
|
885
1020
|
"aria-label": `Avatar for ${e}`,
|
|
886
1021
|
children: [
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
@keyframes ${
|
|
1022
|
+
/* @__PURE__ */ A("style", { children: `
|
|
1023
|
+
@keyframes ${C} {
|
|
889
1024
|
0%, 100% { opacity: var(--ga-o); }
|
|
890
1025
|
50% { opacity: calc(var(--ga-o) * 0.25); }
|
|
891
1026
|
}
|
|
892
1027
|
` }),
|
|
893
|
-
r ? /* @__PURE__ */
|
|
1028
|
+
r ? /* @__PURE__ */ A("circle", {
|
|
894
1029
|
cx: 50,
|
|
895
1030
|
cy: 50,
|
|
896
1031
|
r: 50,
|
|
897
1032
|
fill: "var(--ga-bg)"
|
|
898
|
-
}) : /* @__PURE__ */
|
|
1033
|
+
}) : /* @__PURE__ */ A("rect", {
|
|
899
1034
|
x: 0,
|
|
900
1035
|
y: 0,
|
|
901
1036
|
width: 100,
|
|
@@ -903,13 +1038,13 @@ var ot = i(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
903
1038
|
rx: 8,
|
|
904
1039
|
fill: "var(--ga-bg)"
|
|
905
1040
|
}),
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
id:
|
|
908
|
-
children: r ? /* @__PURE__ */
|
|
1041
|
+
/* @__PURE__ */ A("defs", { children: /* @__PURE__ */ A("clipPath", {
|
|
1042
|
+
id: y,
|
|
1043
|
+
children: r ? /* @__PURE__ */ A("circle", {
|
|
909
1044
|
cx: 50,
|
|
910
1045
|
cy: 50,
|
|
911
1046
|
r: 50
|
|
912
|
-
}) : /* @__PURE__ */
|
|
1047
|
+
}) : /* @__PURE__ */ A("rect", {
|
|
913
1048
|
x: 0,
|
|
914
1049
|
y: 0,
|
|
915
1050
|
width: 100,
|
|
@@ -917,16 +1052,16 @@ var ot = i(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
917
1052
|
rx: 8
|
|
918
1053
|
})
|
|
919
1054
|
}) }),
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
clipPath: `url(#${
|
|
922
|
-
children:
|
|
1055
|
+
/* @__PURE__ */ A("g", {
|
|
1056
|
+
clipPath: `url(#${y})`,
|
|
1057
|
+
children: u.map((e, t) => {
|
|
923
1058
|
if (!e) return null;
|
|
924
|
-
let n = t % c, r = Math.floor(t / c), i =
|
|
925
|
-
return /* @__PURE__ */
|
|
926
|
-
x:
|
|
927
|
-
y:
|
|
928
|
-
width:
|
|
929
|
-
height:
|
|
1059
|
+
let n = t % c, r = Math.floor(t / c), i = v(t), { duration: a, delay: o } = S(t);
|
|
1060
|
+
return /* @__PURE__ */ A("rect", {
|
|
1061
|
+
x: g + n * (f + 3),
|
|
1062
|
+
y: h + r * (f + 3),
|
|
1063
|
+
width: f,
|
|
1064
|
+
height: f,
|
|
930
1065
|
fill: "var(--ga-pixel)",
|
|
931
1066
|
opacity: i,
|
|
932
1067
|
style: {
|
|
@@ -943,390 +1078,566 @@ var ot = i(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
943
1078
|
})
|
|
944
1079
|
]
|
|
945
1080
|
});
|
|
946
|
-
}),
|
|
947
|
-
let u =
|
|
948
|
-
return e ? /* @__PURE__ */
|
|
1081
|
+
}), _t = C(function({ src: e, initials: t, seed: n, generativePattern: r = "grid", alt: i, variant: a = "circle", size: o = "md", color: s = "neutral", className: c }, l) {
|
|
1082
|
+
let u = ct[o], d = lt[a];
|
|
1083
|
+
return e ? /* @__PURE__ */ A("img", {
|
|
949
1084
|
ref: l,
|
|
950
1085
|
src: e,
|
|
951
1086
|
alt: i ?? t ?? n ?? "",
|
|
952
1087
|
className: W("shrink-0 object-cover", u.outer, d, c)
|
|
953
|
-
}) : t ? /* @__PURE__ */
|
|
1088
|
+
}) : t ? /* @__PURE__ */ A("span", {
|
|
954
1089
|
ref: l,
|
|
955
|
-
className: W("flex shrink-0 items-center justify-center font-semibold select-none", u.outer, u.text, d,
|
|
1090
|
+
className: W("flex shrink-0 items-center justify-center font-semibold select-none", u.outer, u.text, d, ut[s], c),
|
|
956
1091
|
children: t
|
|
957
|
-
}) : n ? /* @__PURE__ */
|
|
1092
|
+
}) : n ? /* @__PURE__ */ A(gt, {
|
|
958
1093
|
ref: l,
|
|
959
1094
|
seed: n,
|
|
960
1095
|
pattern: r,
|
|
961
1096
|
px: u.px,
|
|
962
1097
|
isCircle: a === "circle",
|
|
963
1098
|
className: c
|
|
964
|
-
}) : /* @__PURE__ */
|
|
1099
|
+
}) : /* @__PURE__ */ A("span", {
|
|
965
1100
|
ref: l,
|
|
966
|
-
className: W("flex shrink-0 items-center justify-center font-semibold select-none", u.outer, u.text, d,
|
|
1101
|
+
className: W("flex shrink-0 items-center justify-center font-semibold select-none", u.outer, u.text, d, ut[s], c)
|
|
967
1102
|
});
|
|
968
1103
|
});
|
|
969
1104
|
//#endregion
|
|
970
1105
|
//#region src/components/app-header/app-header.tsx
|
|
971
|
-
function
|
|
972
|
-
return /* @__PURE__ */
|
|
1106
|
+
function vt({ to: e, href: t, className: n, children: r }) {
|
|
1107
|
+
return /* @__PURE__ */ A("a", {
|
|
973
1108
|
href: e ?? t,
|
|
974
1109
|
className: n,
|
|
975
1110
|
children: r
|
|
976
1111
|
});
|
|
977
1112
|
}
|
|
978
|
-
function
|
|
979
|
-
return /* @__PURE__ */
|
|
1113
|
+
function yt() {
|
|
1114
|
+
return /* @__PURE__ */ A("div", {
|
|
980
1115
|
className: "flex w-4 shrink-0 items-center justify-center self-stretch",
|
|
981
|
-
children: /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ A("div", { className: "bg-cui-tertiary h-4 w-px rotate-[20deg] opacity-50" })
|
|
982
1117
|
});
|
|
983
1118
|
}
|
|
984
|
-
function
|
|
985
|
-
|
|
986
|
-
className: "flex
|
|
987
|
-
children: e.icon
|
|
988
|
-
}), /* @__PURE__ */ p("span", { children: e.label })] });
|
|
989
|
-
return t && e.href ? /* @__PURE__ */ p(n, {
|
|
990
|
-
to: e.href,
|
|
991
|
-
href: e.href,
|
|
992
|
-
className: r,
|
|
993
|
-
children: i
|
|
994
|
-
}) : /* @__PURE__ */ p("span", {
|
|
995
|
-
className: r,
|
|
996
|
-
children: i
|
|
997
|
-
});
|
|
998
|
-
}
|
|
999
|
-
function dt() {
|
|
1000
|
-
return /* @__PURE__ */ p(Je, {
|
|
1001
|
-
className: "rounded-sm",
|
|
1002
|
-
children: /* @__PURE__ */ p(K, {
|
|
1003
|
-
background: "bg-cui-subtle",
|
|
1004
|
-
interactive: !0,
|
|
1005
|
-
children: /* @__PURE__ */ p("span", {
|
|
1006
|
-
className: "flex h-8 items-center justify-center px-0.5 select-none",
|
|
1007
|
-
children: /* @__PURE__ */ p(E, { className: "text-cui-tertiary size-4" })
|
|
1008
|
-
})
|
|
1009
|
-
})
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
function ft({ item: e, LinkEl: t }) {
|
|
1013
|
-
return e.selector && e.options ? /* @__PURE__ */ m(qe, {
|
|
1014
|
-
value: e.value,
|
|
1015
|
-
onValueChange: e.onSelect,
|
|
1016
|
-
items: e.options,
|
|
1017
|
-
children: [/* @__PURE__ */ m("span", {
|
|
1018
|
-
className: "flex items-center",
|
|
1019
|
-
children: [/* @__PURE__ */ p(K, {
|
|
1020
|
-
background: "bg-cui-subtle",
|
|
1021
|
-
interactive: !0,
|
|
1022
|
-
children: /* @__PURE__ */ p(ut, {
|
|
1023
|
-
item: e,
|
|
1024
|
-
asLink: !!e.href,
|
|
1025
|
-
LinkEl: t
|
|
1026
|
-
})
|
|
1027
|
-
}), /* @__PURE__ */ p(dt, {})]
|
|
1028
|
-
}), /* @__PURE__ */ p(Xe, { searchPlaceholder: "Search..." })]
|
|
1029
|
-
}) : e.href ? /* @__PURE__ */ p(K, {
|
|
1030
|
-
background: "bg-cui-subtle",
|
|
1031
|
-
interactive: !0,
|
|
1032
|
-
children: /* @__PURE__ */ p(ut, {
|
|
1033
|
-
item: e,
|
|
1034
|
-
asLink: !0,
|
|
1035
|
-
LinkEl: t
|
|
1036
|
-
})
|
|
1037
|
-
}) : /* @__PURE__ */ p(K, {
|
|
1038
|
-
background: "bg-cui-subtle",
|
|
1039
|
-
interactive: !0,
|
|
1040
|
-
children: /* @__PURE__ */ m("span", {
|
|
1041
|
-
className: "text-cui-primary text-cui-base flex h-8 items-center gap-2 px-2 font-medium select-none",
|
|
1042
|
-
children: [
|
|
1043
|
-
e.icon && /* @__PURE__ */ p("span", {
|
|
1044
|
-
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1045
|
-
children: e.icon
|
|
1046
|
-
}),
|
|
1047
|
-
/* @__PURE__ */ p("span", { children: e.label }),
|
|
1048
|
-
e.selector && /* @__PURE__ */ p(E, { className: "text-cui-tertiary size-4" })
|
|
1049
|
-
]
|
|
1050
|
-
})
|
|
1051
|
-
});
|
|
1052
|
-
}
|
|
1053
|
-
function pt({ items: e, linkComponent: t = ct, className: n }) {
|
|
1054
|
-
return /* @__PURE__ */ m("nav", {
|
|
1055
|
-
className: W("flex items-center gap-1", n),
|
|
1119
|
+
function bt({ items: e, linkComponent: t = vt, className: n }) {
|
|
1120
|
+
return /* @__PURE__ */ j("nav", {
|
|
1121
|
+
className: W("flex items-center", n),
|
|
1056
1122
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ A(t, {
|
|
1058
1124
|
to: "/",
|
|
1059
1125
|
href: "/",
|
|
1060
1126
|
className: "focus-visible:ring-cui-focus flex size-8 shrink-0 items-center justify-center rounded outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
1061
|
-
children: /* @__PURE__ */
|
|
1127
|
+
children: /* @__PURE__ */ A(st, {
|
|
1062
1128
|
variant: "circle",
|
|
1063
1129
|
className: "text-cui-primary"
|
|
1064
1130
|
})
|
|
1065
1131
|
}),
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
LinkEl: t
|
|
1072
|
-
})]
|
|
1073
|
-
}, e.label))
|
|
1132
|
+
/* @__PURE__ */ A(yt, {}),
|
|
1133
|
+
/* @__PURE__ */ A(Je, {
|
|
1134
|
+
items: e,
|
|
1135
|
+
linkComponent: t
|
|
1136
|
+
})
|
|
1074
1137
|
]
|
|
1075
1138
|
});
|
|
1076
1139
|
}
|
|
1077
|
-
var
|
|
1078
|
-
return /* @__PURE__ */
|
|
1140
|
+
var xt = C(function({ children: e, className: t }, n) {
|
|
1141
|
+
return /* @__PURE__ */ A("div", {
|
|
1079
1142
|
ref: n,
|
|
1080
1143
|
className: W("flex items-center gap-2", t),
|
|
1081
1144
|
children: e
|
|
1082
1145
|
});
|
|
1083
|
-
}),
|
|
1084
|
-
return /* @__PURE__ */
|
|
1146
|
+
}), St = C(function({ children: e, className: t }, n) {
|
|
1147
|
+
return /* @__PURE__ */ A("header", {
|
|
1085
1148
|
ref: n,
|
|
1086
1149
|
className: W("flex items-center justify-between px-3 py-2", t),
|
|
1087
1150
|
children: e
|
|
1088
1151
|
});
|
|
1089
1152
|
});
|
|
1090
|
-
|
|
1153
|
+
St.Breadcrumb = bt, St.Actions = xt, St.Avatar = _t;
|
|
1091
1154
|
//#endregion
|
|
1092
1155
|
//#region src/components/settings-card/settings-card.tsx
|
|
1093
|
-
var
|
|
1094
|
-
let [l, u] =
|
|
1095
|
-
function
|
|
1096
|
-
|
|
1156
|
+
var Ct = C(function({ title: e, description: t, toggle: n, toggled: r, onToggleChange: i, defaultToggled: a = !1, children: o, className: s }, c) {
|
|
1157
|
+
let [l, u] = O(a), d = r !== void 0, f = d ? r : l, p = n && f;
|
|
1158
|
+
function m(e) {
|
|
1159
|
+
d || u(e), i?.(e);
|
|
1097
1160
|
}
|
|
1098
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ A(J, {
|
|
1099
1162
|
ref: c,
|
|
1100
1163
|
className: s,
|
|
1101
|
-
children: /* @__PURE__ */
|
|
1164
|
+
children: /* @__PURE__ */ j(J.Content, { children: [(e || t || n) && /* @__PURE__ */ A(J.Header, { children: /* @__PURE__ */ j("div", {
|
|
1102
1165
|
className: "flex items-start justify-between gap-4",
|
|
1103
|
-
children: [/* @__PURE__ */
|
|
1166
|
+
children: [/* @__PURE__ */ j("div", {
|
|
1104
1167
|
className: "flex flex-1 flex-col",
|
|
1105
|
-
children: [e && /* @__PURE__ */
|
|
1168
|
+
children: [e && /* @__PURE__ */ A("span", {
|
|
1106
1169
|
className: "text-cui-primary text-cui-base font-medium",
|
|
1107
1170
|
children: e
|
|
1108
|
-
}), t && /* @__PURE__ */
|
|
1171
|
+
}), t && /* @__PURE__ */ A("p", {
|
|
1109
1172
|
className: "text-cui-secondary text-cui-base mt-1 leading-relaxed",
|
|
1110
1173
|
children: t
|
|
1111
1174
|
})]
|
|
1112
|
-
}), n && /* @__PURE__ */
|
|
1175
|
+
}), n && /* @__PURE__ */ A("div", {
|
|
1113
1176
|
className: "shrink-0 pt-0.5",
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1115
|
-
checked:
|
|
1116
|
-
onCheckedChange:
|
|
1177
|
+
children: /* @__PURE__ */ A(Xe, {
|
|
1178
|
+
checked: f,
|
|
1179
|
+
onCheckedChange: m
|
|
1117
1180
|
})
|
|
1118
1181
|
})]
|
|
1119
|
-
}) }), /* @__PURE__ */
|
|
1182
|
+
}) }), /* @__PURE__ */ A(J, {
|
|
1120
1183
|
variant: "nested",
|
|
1121
|
-
className: W("transition-opacity duration-150 ease-out",
|
|
1184
|
+
className: W("transition-opacity duration-150 ease-out", p && "opacity-50 pointer-events-none select-none"),
|
|
1122
1185
|
children: o
|
|
1123
1186
|
})] })
|
|
1124
1187
|
});
|
|
1125
|
-
}),
|
|
1126
|
-
return /* @__PURE__ */
|
|
1188
|
+
}), wt = C(function({ label: e, description: t, children: n, className: r }, i) {
|
|
1189
|
+
return /* @__PURE__ */ j(J.Section, {
|
|
1127
1190
|
ref: i,
|
|
1128
1191
|
className: W("flex justify-between items-start", r),
|
|
1129
|
-
children: [/* @__PURE__ */
|
|
1192
|
+
children: [/* @__PURE__ */ j("div", {
|
|
1130
1193
|
className: "mr-4 flex flex-1 flex-col gap-1",
|
|
1131
|
-
children: [/* @__PURE__ */
|
|
1194
|
+
children: [/* @__PURE__ */ A("span", {
|
|
1132
1195
|
className: "text-cui-primary text-cui-base font-medium",
|
|
1133
1196
|
children: e
|
|
1134
|
-
}), t && /* @__PURE__ */
|
|
1197
|
+
}), t && /* @__PURE__ */ A("span", {
|
|
1135
1198
|
className: "text-cui-secondary text-cui-base leading-relaxed",
|
|
1136
1199
|
children: t
|
|
1137
1200
|
})]
|
|
1138
|
-
}), n && /* @__PURE__ */
|
|
1139
|
-
className: "flex w-[340px] shrink-0 flex-col items-end",
|
|
1140
|
-
children: n
|
|
1141
|
-
})]
|
|
1142
|
-
});
|
|
1143
|
-
}), vt = r({
|
|
1144
|
-
collapsed: !1,
|
|
1145
|
-
toggle: () => {}
|
|
1146
|
-
});
|
|
1147
|
-
function X() {
|
|
1148
|
-
return o(vt);
|
|
1149
|
-
}
|
|
1150
|
-
//#endregion
|
|
1151
|
-
//#region src/components/sidebar/sidebar.tsx
|
|
1152
|
-
function yt({ defaultCollapsed: e = !1, className: t, children: n }) {
|
|
1153
|
-
let [r, i] = d(e), a = l(() => ({
|
|
1154
|
-
collapsed: r,
|
|
1155
|
-
toggle: () => i((e) => !e)
|
|
1156
|
-
}), [r]);
|
|
1157
|
-
return /* @__PURE__ */ p(vt.Provider, {
|
|
1158
|
-
value: a,
|
|
1159
|
-
children: /* @__PURE__ */ p("div", {
|
|
1160
|
-
className: W("flex h-full shrink-0 flex-col justify-between gap-0.5 p-2 transition-[width] duration-200", r ? "w-12" : "w-[264px]", t),
|
|
1201
|
+
}), n && /* @__PURE__ */ A("div", {
|
|
1202
|
+
className: "flex w-[340px] shrink-0 flex-col items-end",
|
|
1161
1203
|
children: n
|
|
1162
|
-
})
|
|
1204
|
+
})]
|
|
1163
1205
|
});
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
let { collapsed: i, toggle: a } = X();
|
|
1167
|
-
return /* @__PURE__ */ p("div", {
|
|
1206
|
+
}), Tt = C(function({ className: e, children: t, ...n }, r) {
|
|
1207
|
+
return /* @__PURE__ */ A("div", {
|
|
1168
1208
|
ref: r,
|
|
1169
|
-
|
|
1170
|
-
className: W("group/header flex items-center", i ? "cursor-pointer justify-center" : "gap-1", e),
|
|
1171
|
-
onClick: i ? a : void 0,
|
|
1172
|
-
onKeyDown: i ? (e) => {
|
|
1173
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
1174
|
-
} : void 0,
|
|
1175
|
-
role: i ? "button" : void 0,
|
|
1176
|
-
"aria-label": i ? "Expand sidebar" : void 0,
|
|
1209
|
+
className: W("flex shrink-0 items-center gap-6 px-1.5 py-1.5", e),
|
|
1177
1210
|
...n,
|
|
1178
|
-
children:
|
|
1179
|
-
className: "flex size-8 items-center justify-center group-hover/header:hidden",
|
|
1180
|
-
children: t
|
|
1181
|
-
}), /* @__PURE__ */ p("span", {
|
|
1182
|
-
className: "hidden size-8 items-center justify-center group-hover/header:flex",
|
|
1183
|
-
children: /* @__PURE__ */ p(S, { className: "text-cui-primary size-[18px]" })
|
|
1184
|
-
})] }) : t
|
|
1185
|
-
});
|
|
1186
|
-
});
|
|
1187
|
-
function xt({ className: e }) {
|
|
1188
|
-
let { collapsed: t, toggle: n } = X();
|
|
1189
|
-
return t ? null : /* @__PURE__ */ p("button", {
|
|
1190
|
-
type: "button",
|
|
1191
|
-
onClick: n,
|
|
1192
|
-
className: W("flex size-8 shrink-0 cursor-pointer items-center justify-center rounded", e),
|
|
1193
|
-
"aria-label": "Collapse sidebar",
|
|
1194
|
-
children: /* @__PURE__ */ p(x, { className: "text-cui-primary size-[18px]" })
|
|
1211
|
+
children: t
|
|
1195
1212
|
});
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
let { collapsed: i } = X();
|
|
1199
|
-
return i ? null : /* @__PURE__ */ p("span", {
|
|
1213
|
+
}), Et = C(function({ className: e, children: t, ...n }, r) {
|
|
1214
|
+
return /* @__PURE__ */ A("div", {
|
|
1200
1215
|
ref: r,
|
|
1201
|
-
className: e,
|
|
1216
|
+
className: W("flex min-h-0 flex-1 gap-6 overflow-auto px-3.5 py-3", e),
|
|
1202
1217
|
...n,
|
|
1203
1218
|
children: t
|
|
1204
1219
|
});
|
|
1205
|
-
})
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
children: t
|
|
1216
|
-
}), !i && /* @__PURE__ */ p("span", {
|
|
1217
|
-
className: "text-cui-secondary text-[13px]",
|
|
1218
|
-
children: e
|
|
1220
|
+
}), Dt = Object.assign(C(function({ sidebar: e, className: t, children: n }, r) {
|
|
1221
|
+
return /* @__PURE__ */ j("div", {
|
|
1222
|
+
ref: r,
|
|
1223
|
+
className: W("flex h-screen bg-cui-base-0", t),
|
|
1224
|
+
children: [e, /* @__PURE__ */ A("div", {
|
|
1225
|
+
className: "flex min-h-0 flex-1 flex-col pt-1 pr-1 pb-1",
|
|
1226
|
+
children: /* @__PURE__ */ A("div", {
|
|
1227
|
+
className: "bg-cui-base-1 ring-cui-neutral flex min-h-0 flex-1 flex-col rounded shadow-sm ring-1",
|
|
1228
|
+
children: n
|
|
1229
|
+
})
|
|
1219
1230
|
})]
|
|
1220
1231
|
});
|
|
1232
|
+
}), {
|
|
1233
|
+
Header: Tt,
|
|
1234
|
+
Body: Et
|
|
1235
|
+
});
|
|
1236
|
+
//#endregion
|
|
1237
|
+
//#region src/components/tooltip/tooltip.tsx
|
|
1238
|
+
function Ot(e) {
|
|
1239
|
+
return /* @__PURE__ */ A(F.Provider, { ...e });
|
|
1221
1240
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return /* @__PURE__ */
|
|
1224
|
-
|
|
1225
|
-
|
|
1241
|
+
function kt(e) {
|
|
1242
|
+
return /* @__PURE__ */ A(F.Root, { ...e });
|
|
1243
|
+
}
|
|
1244
|
+
var At = C(function({ className: e, ...t }, n) {
|
|
1245
|
+
return /* @__PURE__ */ A(F.Trigger, {
|
|
1246
|
+
ref: n,
|
|
1247
|
+
className: W("outline-none", e),
|
|
1248
|
+
...t
|
|
1249
|
+
});
|
|
1250
|
+
});
|
|
1251
|
+
function jt({ side: e = "top", align: t = "center", sideOffset: n = 6, className: r, children: i, ...a }) {
|
|
1252
|
+
return /* @__PURE__ */ A(F.Portal, { children: /* @__PURE__ */ A(F.Positioner, {
|
|
1253
|
+
side: e,
|
|
1254
|
+
align: t,
|
|
1255
|
+
sideOffset: n,
|
|
1256
|
+
className: W("z-50 outline-none", "h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)]", "transition-[top,left,right,bottom,transform] duration-350 ease-cui-out-expo", "data-[instant]:transition-none"),
|
|
1257
|
+
children: /* @__PURE__ */ A(F.Popup, {
|
|
1258
|
+
className: W("bg-cui-inverse text-cui-inverse rounded px-2 py-1 text-cui-sm font-medium", "max-w-[280px]", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity] duration-150 ease-cui-out-expo", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", "data-[instant]:transition-none", "motion-reduce:transition-none", r),
|
|
1259
|
+
...a,
|
|
1260
|
+
children: i
|
|
1261
|
+
})
|
|
1262
|
+
}) });
|
|
1263
|
+
}
|
|
1264
|
+
var Mt = C(function({ className: e, ...t }, n) {
|
|
1265
|
+
return /* @__PURE__ */ A(F.Viewport, {
|
|
1266
|
+
ref: n,
|
|
1267
|
+
className: W("relative h-full w-full overflow-clip", "[&_[data-previous]]:transition-[translate,opacity] [&_[data-previous]]:duration-350 [&_[data-previous]]:ease-cui-out-expo", "[&_[data-current]]:transition-[translate,opacity] [&_[data-current]]:duration-350 [&_[data-current]]:ease-cui-out-expo", "[&_[data-instant]_[data-current]]:transition-none [&_[data-instant]_[data-previous]]:transition-none", "[&[data-activation-direction*=left]_[data-current][data-starting-style]]:-translate-x-1/2 [&[data-activation-direction*=left]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=right]_[data-current][data-starting-style]]:translate-x-1/2 [&[data-activation-direction*=right]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=up]_[data-current][data-starting-style]]:-translate-y-1/2 [&[data-activation-direction*=up]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=down]_[data-current][data-starting-style]]:translate-y-1/2 [&[data-activation-direction*=down]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=left]_[data-previous][data-ending-style]]:translate-x-1/2 [&[data-activation-direction*=left]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=right]_[data-previous][data-ending-style]]:-translate-x-1/2 [&[data-activation-direction*=right]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=up]_[data-previous][data-ending-style]]:translate-y-1/2 [&[data-activation-direction*=up]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=down]_[data-previous][data-ending-style]]:-translate-y-1/2 [&[data-activation-direction*=down]_[data-previous][data-ending-style]]:opacity-0", "motion-reduce:[&_[data-current]]:!transition-none motion-reduce:[&_[data-previous]]:!transition-none", e),
|
|
1268
|
+
...t
|
|
1226
1269
|
});
|
|
1270
|
+
}), Nt = F.createHandle, X = {
|
|
1271
|
+
Provider: Ot,
|
|
1272
|
+
Root: kt,
|
|
1273
|
+
Trigger: At,
|
|
1274
|
+
Content: jt,
|
|
1275
|
+
Viewport: Mt,
|
|
1276
|
+
createHandle: F.createHandle
|
|
1277
|
+
}, Pt = S(null);
|
|
1278
|
+
function Z() {
|
|
1279
|
+
let e = ee(Pt);
|
|
1280
|
+
if (!e) throw Error("useSidebar must be used within a <Sidebar>");
|
|
1281
|
+
return e;
|
|
1227
1282
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
className: "flex size-8 shrink-0 items-center justify-center",
|
|
1251
|
-
children: /* @__PURE__ */ p(T, { className: "text-cui-primary size-[18px]" })
|
|
1283
|
+
//#endregion
|
|
1284
|
+
//#region src/components/sidebar/sidebar.tsx
|
|
1285
|
+
function Ft({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, className: r, children: i }) {
|
|
1286
|
+
let [a, o] = O(e), s = t !== void 0, c = s ? t : a, l = w(() => {
|
|
1287
|
+
let e = !c;
|
|
1288
|
+
s ? n?.(e) : o(e);
|
|
1289
|
+
}, [
|
|
1290
|
+
c,
|
|
1291
|
+
s,
|
|
1292
|
+
n
|
|
1293
|
+
]), u = E(() => ({
|
|
1294
|
+
collapsed: c,
|
|
1295
|
+
toggle: l
|
|
1296
|
+
}), [c, l]);
|
|
1297
|
+
return /* @__PURE__ */ A(Pt.Provider, {
|
|
1298
|
+
value: u,
|
|
1299
|
+
children: /* @__PURE__ */ A(X.Provider, {
|
|
1300
|
+
delay: 0,
|
|
1301
|
+
closeDelay: 0,
|
|
1302
|
+
children: /* @__PURE__ */ A("div", {
|
|
1303
|
+
className: W("relative flex h-full shrink-0 flex-col justify-between overflow-hidden px-2 py-1 transition-[width] duration-400 ease-cui-out-expo", c ? "w-12" : "w-[264px]", r),
|
|
1304
|
+
children: i
|
|
1252
1305
|
})
|
|
1253
|
-
|
|
1306
|
+
})
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
function It({ className: e, children: t }) {
|
|
1310
|
+
return /* @__PURE__ */ A("div", {
|
|
1311
|
+
className: W("flex w-full flex-col gap-0.5", e),
|
|
1312
|
+
children: t
|
|
1254
1313
|
});
|
|
1255
1314
|
}
|
|
1256
|
-
var
|
|
1257
|
-
let { collapsed: i } =
|
|
1258
|
-
return /* @__PURE__ */
|
|
1315
|
+
var Lt = C(function({ className: e, children: t, ...n }, r) {
|
|
1316
|
+
let { collapsed: i } = Z();
|
|
1317
|
+
return /* @__PURE__ */ A("div", {
|
|
1259
1318
|
ref: r,
|
|
1260
|
-
className: W("
|
|
1319
|
+
className: W("grid transition-all duration-400 ease-cui-out-expo", i ? "grid-rows-[0fr]" : "grid-rows-[1fr]"),
|
|
1261
1320
|
...n,
|
|
1262
|
-
children:
|
|
1321
|
+
children: /* @__PURE__ */ A("div", {
|
|
1322
|
+
className: "overflow-hidden",
|
|
1323
|
+
children: /* @__PURE__ */ A("div", {
|
|
1324
|
+
className: W("flex h-6 items-center px-2 text-cui-sm text-cui-secondary transition-all duration-400 ease-cui-out-expo", i ? "-translate-x-5 scale-80 opacity-0" : "opacity-100", e),
|
|
1325
|
+
children: t
|
|
1326
|
+
})
|
|
1327
|
+
})
|
|
1263
1328
|
});
|
|
1264
1329
|
});
|
|
1265
|
-
function
|
|
1266
|
-
let { collapsed:
|
|
1267
|
-
return /* @__PURE__ */
|
|
1330
|
+
function Rt({ className: e, children: t }) {
|
|
1331
|
+
let { collapsed: n } = Z();
|
|
1332
|
+
return /* @__PURE__ */ j("div", {
|
|
1333
|
+
className: W("flex items-center justify-center py-1.5 transition-all duration-400 ease-cui-out-expo", e),
|
|
1334
|
+
children: [/* @__PURE__ */ A(N, {
|
|
1335
|
+
mode: "popLayout",
|
|
1336
|
+
initial: !1,
|
|
1337
|
+
children: !n && /* @__PURE__ */ A(P.div, {
|
|
1338
|
+
initial: {
|
|
1339
|
+
opacity: 0,
|
|
1340
|
+
x: -320,
|
|
1341
|
+
scale: .5
|
|
1342
|
+
},
|
|
1343
|
+
animate: {
|
|
1344
|
+
opacity: 1,
|
|
1345
|
+
x: 0,
|
|
1346
|
+
scale: 1
|
|
1347
|
+
},
|
|
1348
|
+
exit: {
|
|
1349
|
+
opacity: 0,
|
|
1350
|
+
x: -320,
|
|
1351
|
+
scale: .5
|
|
1352
|
+
},
|
|
1353
|
+
transition: {
|
|
1354
|
+
duration: .4,
|
|
1355
|
+
type: "spring",
|
|
1356
|
+
bounce: 0
|
|
1357
|
+
},
|
|
1358
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
1359
|
+
children: t
|
|
1360
|
+
})
|
|
1361
|
+
}), /* @__PURE__ */ A(Ht, {})]
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1, external: s = !1, showIndicator: c = !1, onClick: u, className: d }) {
|
|
1365
|
+
let { collapsed: f } = Z(), p = n ?? (t ? "a" : "button"), m = n === "div" ? { onClick: u } : t ? {
|
|
1366
|
+
href: t,
|
|
1367
|
+
onClick: u,
|
|
1368
|
+
target: s ? "_blank" : void 0,
|
|
1369
|
+
rel: s ? "noopener noreferrer" : void 0
|
|
1370
|
+
} : {
|
|
1268
1371
|
type: "button",
|
|
1269
|
-
onClick:
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1372
|
+
onClick: u
|
|
1373
|
+
}, h = /* @__PURE__ */ A(G, {
|
|
1374
|
+
active: r,
|
|
1375
|
+
background: "bg-cui-subtle",
|
|
1376
|
+
borderRadius: "rounded",
|
|
1377
|
+
fullWidth: !0,
|
|
1378
|
+
className: W("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", f ? "w-8" : "w-full"),
|
|
1379
|
+
children: /* @__PURE__ */ j(p, {
|
|
1380
|
+
...m,
|
|
1381
|
+
"aria-label": f ? e : void 0,
|
|
1382
|
+
className: W("flex h-8 w-full cursor-pointer select-none items-center gap-2 p-2 text-left text-cui-base text-cui-secondary group-hover/h:text-cui-primary outline-none", r && "text-cui-primary", d),
|
|
1383
|
+
children: [
|
|
1384
|
+
a && /* @__PURE__ */ j("span", {
|
|
1385
|
+
className: "relative shrink-0",
|
|
1386
|
+
children: [/* @__PURE__ */ A("span", {
|
|
1387
|
+
className: W("flex size-4 items-center justify-center [&>svg]:size-4", r ? "text-cui-primary" : "text-cui-secondary group-hover/h:text-cui-primary"),
|
|
1388
|
+
children: a
|
|
1389
|
+
}), c && f && /* @__PURE__ */ A("span", {
|
|
1390
|
+
className: "bg-cui-accent-strong absolute -top-0.5 -right-0.5 size-2 rounded-full",
|
|
1391
|
+
children: /* @__PURE__ */ A("span", { className: "bg-cui-accent-strong absolute inset-0 animate-ping rounded-full opacity-75" })
|
|
1392
|
+
})]
|
|
1393
|
+
}),
|
|
1394
|
+
/* @__PURE__ */ A(N, {
|
|
1395
|
+
mode: "popLayout",
|
|
1396
|
+
initial: !1,
|
|
1397
|
+
children: !f && /* @__PURE__ */ A(P.span, {
|
|
1398
|
+
initial: {
|
|
1399
|
+
opacity: 0,
|
|
1400
|
+
scale: .8
|
|
1401
|
+
},
|
|
1402
|
+
animate: {
|
|
1403
|
+
opacity: 1,
|
|
1404
|
+
scale: 1
|
|
1405
|
+
},
|
|
1406
|
+
exit: {
|
|
1407
|
+
opacity: 0,
|
|
1408
|
+
scale: .8
|
|
1409
|
+
},
|
|
1410
|
+
transition: {
|
|
1411
|
+
duration: .2,
|
|
1412
|
+
ease: "easeOut"
|
|
1413
|
+
},
|
|
1414
|
+
className: "flex-1 origin-left truncate",
|
|
1415
|
+
children: e
|
|
1416
|
+
})
|
|
1417
|
+
}),
|
|
1418
|
+
/* @__PURE__ */ A(N, {
|
|
1419
|
+
mode: "popLayout",
|
|
1420
|
+
initial: !1,
|
|
1421
|
+
children: c && !f && /* @__PURE__ */ A(P.span, {
|
|
1422
|
+
initial: {
|
|
1423
|
+
opacity: 0,
|
|
1424
|
+
scale: .8
|
|
1425
|
+
},
|
|
1426
|
+
animate: {
|
|
1427
|
+
opacity: 1,
|
|
1428
|
+
scale: 1
|
|
1429
|
+
},
|
|
1430
|
+
exit: {
|
|
1431
|
+
opacity: 0,
|
|
1432
|
+
scale: .8
|
|
1433
|
+
},
|
|
1434
|
+
transition: {
|
|
1435
|
+
duration: .2,
|
|
1436
|
+
ease: "easeOut"
|
|
1437
|
+
},
|
|
1438
|
+
className: "flex shrink-0 origin-left items-center",
|
|
1439
|
+
children: /* @__PURE__ */ j("span", {
|
|
1440
|
+
className: "relative flex size-2",
|
|
1441
|
+
children: [/* @__PURE__ */ A("span", { className: "bg-cui-accent-strong absolute inline-flex size-full animate-ping rounded-full opacity-75" }), /* @__PURE__ */ A("span", { className: "bg-cui-accent-strong relative inline-flex size-2 rounded-full" })]
|
|
1442
|
+
})
|
|
1443
|
+
})
|
|
1444
|
+
}),
|
|
1445
|
+
/* @__PURE__ */ A(N, {
|
|
1446
|
+
mode: "popLayout",
|
|
1447
|
+
initial: !1,
|
|
1448
|
+
children: s && !f && /* @__PURE__ */ A(P.span, {
|
|
1449
|
+
initial: {
|
|
1450
|
+
opacity: 0,
|
|
1451
|
+
scale: .8
|
|
1452
|
+
},
|
|
1453
|
+
animate: {
|
|
1454
|
+
opacity: 1,
|
|
1455
|
+
scale: 1
|
|
1456
|
+
},
|
|
1457
|
+
exit: {
|
|
1458
|
+
opacity: 0,
|
|
1459
|
+
scale: .8
|
|
1460
|
+
},
|
|
1461
|
+
transition: {
|
|
1462
|
+
duration: .2,
|
|
1463
|
+
ease: "easeOut"
|
|
1464
|
+
},
|
|
1465
|
+
className: "origin-left",
|
|
1466
|
+
children: /* @__PURE__ */ A(i, { className: "text-cui-tertiary size-4 shrink-0" })
|
|
1467
|
+
})
|
|
1468
|
+
}),
|
|
1469
|
+
/* @__PURE__ */ A(N, {
|
|
1470
|
+
mode: "popLayout",
|
|
1471
|
+
initial: !1,
|
|
1472
|
+
children: o && !f && /* @__PURE__ */ A(P.span, {
|
|
1473
|
+
initial: {
|
|
1474
|
+
opacity: 0,
|
|
1475
|
+
scale: .8
|
|
1476
|
+
},
|
|
1477
|
+
animate: {
|
|
1478
|
+
opacity: 1,
|
|
1479
|
+
scale: 1
|
|
1480
|
+
},
|
|
1481
|
+
exit: {
|
|
1482
|
+
opacity: 0,
|
|
1483
|
+
scale: .8
|
|
1484
|
+
},
|
|
1485
|
+
transition: {
|
|
1486
|
+
duration: .2,
|
|
1487
|
+
ease: "easeOut"
|
|
1488
|
+
},
|
|
1489
|
+
className: "origin-left",
|
|
1490
|
+
children: /* @__PURE__ */ A(l, { className: "text-cui-tertiary size-4 shrink-0" })
|
|
1491
|
+
})
|
|
1492
|
+
})
|
|
1493
|
+
]
|
|
1494
|
+
})
|
|
1495
|
+
});
|
|
1496
|
+
return /* @__PURE__ */ j(X.Root, {
|
|
1497
|
+
disabled: !f,
|
|
1498
|
+
children: [/* @__PURE__ */ A(X.Trigger, { render: h }), /* @__PURE__ */ A(X.Content, {
|
|
1499
|
+
side: "right",
|
|
1500
|
+
children: e
|
|
1278
1501
|
})]
|
|
1279
1502
|
});
|
|
1280
1503
|
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1504
|
+
function Bt({ name: e, onClick: t, className: r }) {
|
|
1505
|
+
let { collapsed: i } = Z(), a = /* @__PURE__ */ A("div", {
|
|
1506
|
+
className: "flex items-center py-1.5",
|
|
1507
|
+
children: /* @__PURE__ */ A(G, {
|
|
1508
|
+
background: "bg-cui-subtle",
|
|
1509
|
+
borderRadius: "rounded",
|
|
1510
|
+
fullWidth: !0,
|
|
1511
|
+
className: W("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", i ? "w-8" : "w-full"),
|
|
1512
|
+
children: /* @__PURE__ */ j("button", {
|
|
1513
|
+
type: "button",
|
|
1514
|
+
onClick: t,
|
|
1515
|
+
"aria-label": i ? e : void 0,
|
|
1516
|
+
className: W("flex h-8 w-full cursor-pointer select-none items-center gap-2 p-2 text-left text-cui-base text-cui-secondary group-hover/h:text-cui-primary outline-none", r),
|
|
1517
|
+
children: [/* @__PURE__ */ A("span", {
|
|
1518
|
+
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1519
|
+
children: /* @__PURE__ */ A(n, {})
|
|
1520
|
+
}), /* @__PURE__ */ A(N, {
|
|
1521
|
+
mode: "popLayout",
|
|
1522
|
+
initial: !1,
|
|
1523
|
+
children: !i && /* @__PURE__ */ A(P.span, {
|
|
1524
|
+
initial: {
|
|
1525
|
+
opacity: 0,
|
|
1526
|
+
scale: .8
|
|
1527
|
+
},
|
|
1528
|
+
animate: {
|
|
1529
|
+
opacity: 1,
|
|
1530
|
+
scale: 1
|
|
1531
|
+
},
|
|
1532
|
+
exit: {
|
|
1533
|
+
opacity: 0,
|
|
1534
|
+
scale: .8
|
|
1535
|
+
},
|
|
1536
|
+
transition: {
|
|
1537
|
+
duration: .2,
|
|
1538
|
+
ease: "easeOut"
|
|
1539
|
+
},
|
|
1540
|
+
className: "flex-1 origin-left truncate",
|
|
1541
|
+
children: e
|
|
1542
|
+
})
|
|
1543
|
+
})]
|
|
1544
|
+
})
|
|
1545
|
+
})
|
|
1296
1546
|
});
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1547
|
+
return /* @__PURE__ */ j(X.Root, {
|
|
1548
|
+
disabled: !i,
|
|
1549
|
+
children: [/* @__PURE__ */ A(X.Trigger, { render: a }), /* @__PURE__ */ A(X.Content, {
|
|
1550
|
+
side: "right",
|
|
1551
|
+
children: e
|
|
1552
|
+
})]
|
|
1303
1553
|
});
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1554
|
+
}
|
|
1555
|
+
function Vt({ collapsed: e }) {
|
|
1556
|
+
return /* @__PURE__ */ j("svg", {
|
|
1557
|
+
width: "16",
|
|
1558
|
+
height: "16",
|
|
1559
|
+
viewBox: "0 0 16 16",
|
|
1560
|
+
fill: "none",
|
|
1561
|
+
className: "size-4",
|
|
1562
|
+
children: [/* @__PURE__ */ A("rect", {
|
|
1563
|
+
x: 2,
|
|
1564
|
+
y: 3,
|
|
1565
|
+
width: 12,
|
|
1566
|
+
height: 10,
|
|
1567
|
+
rx: 2,
|
|
1568
|
+
stroke: "currentColor",
|
|
1569
|
+
strokeWidth: 1.5
|
|
1570
|
+
}), /* @__PURE__ */ A("rect", {
|
|
1571
|
+
x: 4,
|
|
1572
|
+
y: 5,
|
|
1573
|
+
height: 6,
|
|
1574
|
+
rx: .75,
|
|
1575
|
+
fill: "currentColor",
|
|
1576
|
+
className: W("transition-[width] duration-300 ease-cui-out-expo", e ? "[width:1.5px] group-hover/btn:[width:3px]" : "[width:4px] group-hover/btn:[width:2.5px]")
|
|
1314
1577
|
})]
|
|
1315
1578
|
});
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1579
|
+
}
|
|
1580
|
+
function Ht({ className: e }) {
|
|
1581
|
+
let { collapsed: t, toggle: n } = Z();
|
|
1582
|
+
return /* @__PURE__ */ A(K, {
|
|
1583
|
+
variant: "transparent",
|
|
1584
|
+
size: "md",
|
|
1585
|
+
iconLeft: /* @__PURE__ */ A(Vt, { collapsed: t }),
|
|
1586
|
+
onClick: n,
|
|
1587
|
+
className: W("shrink-0", e),
|
|
1588
|
+
"aria-label": t ? "Expand sidebar" : "Collapse sidebar"
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
function Ut({ activeKey: e, direction: t = "forward", className: n, children: r }) {
|
|
1592
|
+
return /* @__PURE__ */ A("div", {
|
|
1593
|
+
className: W("relative min-h-0 flex-1", n),
|
|
1594
|
+
children: /* @__PURE__ */ A(N, {
|
|
1595
|
+
mode: "popLayout",
|
|
1596
|
+
initial: !1,
|
|
1597
|
+
custom: t,
|
|
1598
|
+
children: /* @__PURE__ */ A(P.div, {
|
|
1599
|
+
custom: t,
|
|
1600
|
+
variants: {
|
|
1601
|
+
enter: (e) => ({
|
|
1602
|
+
opacity: 0,
|
|
1603
|
+
x: e === "forward" ? 40 : -40
|
|
1604
|
+
}),
|
|
1605
|
+
center: {
|
|
1606
|
+
opacity: 1,
|
|
1607
|
+
x: 0
|
|
1608
|
+
},
|
|
1609
|
+
exit: (e) => ({
|
|
1610
|
+
opacity: 0,
|
|
1611
|
+
x: e === "forward" ? -40 : 40
|
|
1612
|
+
})
|
|
1613
|
+
},
|
|
1614
|
+
initial: "enter",
|
|
1615
|
+
animate: "center",
|
|
1616
|
+
exit: "exit",
|
|
1617
|
+
transition: {
|
|
1618
|
+
duration: .25,
|
|
1619
|
+
type: "spring",
|
|
1620
|
+
bounce: 0
|
|
1621
|
+
},
|
|
1622
|
+
className: "flex h-full flex-col",
|
|
1623
|
+
children: r
|
|
1624
|
+
}, e)
|
|
1625
|
+
})
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
var Wt = Object.assign(Ft, {
|
|
1629
|
+
Section: It,
|
|
1630
|
+
Header: Rt,
|
|
1631
|
+
Label: Lt,
|
|
1632
|
+
Link: zt,
|
|
1633
|
+
BackLink: Bt,
|
|
1634
|
+
CollapseButton: Ht,
|
|
1635
|
+
Layers: Ut
|
|
1325
1636
|
});
|
|
1326
1637
|
//#endregion
|
|
1327
1638
|
//#region src/components/select/select.tsx
|
|
1328
|
-
function
|
|
1329
|
-
return /* @__PURE__ */
|
|
1639
|
+
function Gt({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i, children: a, className: o }) {
|
|
1640
|
+
return /* @__PURE__ */ A(I.Root, {
|
|
1330
1641
|
value: e,
|
|
1331
1642
|
defaultValue: t,
|
|
1332
1643
|
onValueChange: n ? (e) => {
|
|
@@ -1334,120 +1645,120 @@ function jt({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i
|
|
|
1334
1645
|
} : void 0,
|
|
1335
1646
|
items: r,
|
|
1336
1647
|
disabled: i,
|
|
1337
|
-
children: o ? /* @__PURE__ */
|
|
1648
|
+
children: o ? /* @__PURE__ */ A("div", {
|
|
1338
1649
|
className: o,
|
|
1339
1650
|
children: a
|
|
1340
1651
|
}) : a
|
|
1341
1652
|
});
|
|
1342
1653
|
}
|
|
1343
|
-
var
|
|
1344
|
-
return /* @__PURE__ */
|
|
1654
|
+
var Kt = C(function({ children: e, className: t }, n) {
|
|
1655
|
+
return /* @__PURE__ */ A(I.Trigger, {
|
|
1345
1656
|
ref: n,
|
|
1346
1657
|
className: W("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
|
|
1347
1658
|
children: e
|
|
1348
1659
|
});
|
|
1349
|
-
}),
|
|
1350
|
-
return /* @__PURE__ */
|
|
1660
|
+
}), qt = C(function({ placeholder: e, size: t, className: n }, r) {
|
|
1661
|
+
return /* @__PURE__ */ A(I.Trigger, {
|
|
1351
1662
|
ref: r,
|
|
1352
|
-
render: /* @__PURE__ */
|
|
1663
|
+
render: /* @__PURE__ */ A(K, {
|
|
1353
1664
|
variant: "outline",
|
|
1354
1665
|
size: t,
|
|
1355
|
-
iconRight: /* @__PURE__ */
|
|
1666
|
+
iconRight: /* @__PURE__ */ A(u, {}),
|
|
1356
1667
|
className: n,
|
|
1357
|
-
children: /* @__PURE__ */
|
|
1668
|
+
children: /* @__PURE__ */ A(I.Value, { placeholder: e })
|
|
1358
1669
|
})
|
|
1359
1670
|
});
|
|
1360
1671
|
});
|
|
1361
|
-
function
|
|
1362
|
-
return /* @__PURE__ */
|
|
1672
|
+
function Jt({ align: e = "start", side: t = "bottom", sideOffset: n = 4, minWidth: r = "min-w-[220px]", children: i, className: a }) {
|
|
1673
|
+
return /* @__PURE__ */ A(I.Portal, { children: /* @__PURE__ */ A(I.Positioner, {
|
|
1363
1674
|
align: e,
|
|
1364
1675
|
side: t,
|
|
1365
1676
|
sideOffset: n,
|
|
1366
1677
|
alignItemWithTrigger: !1,
|
|
1367
|
-
render: /* @__PURE__ */
|
|
1368
|
-
children: /* @__PURE__ */
|
|
1369
|
-
render: /* @__PURE__ */
|
|
1678
|
+
render: /* @__PURE__ */ A(q.Positioner, {}),
|
|
1679
|
+
children: /* @__PURE__ */ A(I.Popup, {
|
|
1680
|
+
render: /* @__PURE__ */ A(q.Panel, {
|
|
1370
1681
|
minWidth: r,
|
|
1371
1682
|
className: a
|
|
1372
1683
|
}),
|
|
1373
|
-
children: /* @__PURE__ */
|
|
1374
|
-
render: /* @__PURE__ */
|
|
1684
|
+
children: /* @__PURE__ */ A(I.List, {
|
|
1685
|
+
render: /* @__PURE__ */ A(q.List, {}),
|
|
1375
1686
|
children: i
|
|
1376
1687
|
})
|
|
1377
1688
|
})
|
|
1378
1689
|
}) });
|
|
1379
1690
|
}
|
|
1380
|
-
var
|
|
1381
|
-
return /* @__PURE__ */
|
|
1691
|
+
var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
1692
|
+
return /* @__PURE__ */ j(I.Item, {
|
|
1382
1693
|
ref: i,
|
|
1383
1694
|
value: e,
|
|
1384
|
-
render: /* @__PURE__ */
|
|
1695
|
+
render: /* @__PURE__ */ A(q.Item, {
|
|
1385
1696
|
icon: t,
|
|
1386
1697
|
className: r
|
|
1387
1698
|
}),
|
|
1388
|
-
children: [/* @__PURE__ */
|
|
1699
|
+
children: [/* @__PURE__ */ A(I.ItemText, {
|
|
1389
1700
|
className: "relative z-[1] flex-1",
|
|
1390
1701
|
children: n
|
|
1391
|
-
}), /* @__PURE__ */
|
|
1702
|
+
}), /* @__PURE__ */ A(I.ItemIndicator, { render: /* @__PURE__ */ A(q.ItemIndicator, {}) })]
|
|
1392
1703
|
});
|
|
1393
|
-
}),
|
|
1394
|
-
return /* @__PURE__ */
|
|
1704
|
+
}), Xt = C(function({ className: e }, t) {
|
|
1705
|
+
return /* @__PURE__ */ A(I.Separator, {
|
|
1395
1706
|
ref: t,
|
|
1396
|
-
render: /* @__PURE__ */
|
|
1707
|
+
render: /* @__PURE__ */ A(q.Separator, { className: e })
|
|
1397
1708
|
});
|
|
1398
|
-
}),
|
|
1399
|
-
return /* @__PURE__ */
|
|
1709
|
+
}), Zt = C(function({ className: e, children: t }, n) {
|
|
1710
|
+
return /* @__PURE__ */ A(I.Group, {
|
|
1400
1711
|
ref: n,
|
|
1401
1712
|
className: W("flex flex-col", e),
|
|
1402
1713
|
children: t
|
|
1403
1714
|
});
|
|
1404
|
-
}),
|
|
1405
|
-
return /* @__PURE__ */
|
|
1715
|
+
}), Qt = C(function({ className: e, children: t }, n) {
|
|
1716
|
+
return /* @__PURE__ */ A(I.GroupLabel, {
|
|
1406
1717
|
ref: n,
|
|
1407
|
-
render: /* @__PURE__ */
|
|
1718
|
+
render: /* @__PURE__ */ A(q.GroupLabel, { className: e }),
|
|
1408
1719
|
children: t
|
|
1409
1720
|
});
|
|
1410
|
-
}),
|
|
1411
|
-
return /* @__PURE__ */
|
|
1721
|
+
}), $t = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
1722
|
+
return /* @__PURE__ */ A(ae, {
|
|
1412
1723
|
ref: r,
|
|
1413
1724
|
orientation: e,
|
|
1414
1725
|
className: W(e === "horizontal" ? "w-full border-t border-cui-neutral" : "self-stretch border-l border-cui-neutral", "shrink-0", t),
|
|
1415
1726
|
...n
|
|
1416
1727
|
});
|
|
1417
|
-
}),
|
|
1728
|
+
}), en = {
|
|
1418
1729
|
neutral: "bg-cui-subtle text-cui-secondary",
|
|
1419
1730
|
accent: "bg-cui-accent-subtle text-cui-accent",
|
|
1420
1731
|
danger: "bg-cui-danger-subtle text-cui-danger",
|
|
1421
1732
|
warn: "bg-cui-warn-subtle text-cui-warn",
|
|
1422
1733
|
success: "bg-cui-success-subtle text-cui-success"
|
|
1423
|
-
},
|
|
1734
|
+
}, tn = {
|
|
1424
1735
|
sm: "px-1.5 py-0.5 text-cui-sm",
|
|
1425
1736
|
md: "px-2 py-0.5 text-cui-base"
|
|
1426
|
-
},
|
|
1427
|
-
return /* @__PURE__ */
|
|
1737
|
+
}, nn = C(function({ variant: e = "neutral", size: t = "sm", className: n, children: r, ...i }, a) {
|
|
1738
|
+
return /* @__PURE__ */ A("span", {
|
|
1428
1739
|
ref: a,
|
|
1429
|
-
className: W("inline-flex items-center rounded-md font-medium leading-tight",
|
|
1740
|
+
className: W("inline-flex items-center rounded-md font-medium leading-tight", tn[t], en[e], n),
|
|
1430
1741
|
...i,
|
|
1431
1742
|
children: r
|
|
1432
1743
|
});
|
|
1433
|
-
}),
|
|
1434
|
-
return /* @__PURE__ */
|
|
1744
|
+
}), rn = C(function({ className: e, ...t }, n) {
|
|
1745
|
+
return /* @__PURE__ */ A(L.Root, {
|
|
1435
1746
|
ref: n,
|
|
1436
1747
|
className: W("flex flex-col gap-1.5", e),
|
|
1437
1748
|
...t
|
|
1438
1749
|
});
|
|
1439
|
-
}),
|
|
1440
|
-
return /* @__PURE__ */
|
|
1750
|
+
}), an = C(function({ required: e, className: t, children: n, ...r }, i) {
|
|
1751
|
+
return /* @__PURE__ */ j(L.Label, {
|
|
1441
1752
|
ref: i,
|
|
1442
1753
|
className: W("text-cui-base font-medium text-cui-primary", "data-[disabled]:text-cui-tertiary data-[disabled]:cursor-not-allowed", t),
|
|
1443
1754
|
...r,
|
|
1444
|
-
children: [n, e && /* @__PURE__ */
|
|
1755
|
+
children: [n, e && /* @__PURE__ */ A("span", {
|
|
1445
1756
|
className: "text-cui-danger ml-0.5",
|
|
1446
1757
|
"aria-hidden": "true",
|
|
1447
1758
|
children: "*"
|
|
1448
1759
|
})]
|
|
1449
1760
|
});
|
|
1450
|
-
}),
|
|
1761
|
+
}), on = [
|
|
1451
1762
|
"w-full rounded-md border border-cui-neutral bg-cui-base-2 px-3 py-1.5 text-cui-base text-cui-primary",
|
|
1452
1763
|
"outline-none",
|
|
1453
1764
|
"placeholder:text-cui-tertiary",
|
|
@@ -1457,7 +1768,7 @@ var Ft = i(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1457
1768
|
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1458
1769
|
"data-[invalid]:border-cui-danger data-[invalid]:focus:ring-cui-danger/30",
|
|
1459
1770
|
"data-[valid]:border-cui-success"
|
|
1460
|
-
],
|
|
1771
|
+
], sn = [
|
|
1461
1772
|
"rounded-md border border-cui-neutral bg-cui-base-2 py-1.5 text-cui-base",
|
|
1462
1773
|
"ring-cui-neutral ring-0 transition-[box-shadow,color,border-color] duration-150 ease-out",
|
|
1463
1774
|
"has-[:focus]:ring-2 has-[:focus]:border-cui-neutral-strong",
|
|
@@ -1465,43 +1776,43 @@ var Ft = i(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1465
1776
|
"has-[*[data-disabled]]:cursor-not-allowed has-[*[data-disabled]]:opacity-50",
|
|
1466
1777
|
"has-[*[data-invalid]]:border-cui-danger has-[*[data-invalid]:focus]:ring-cui-danger/30",
|
|
1467
1778
|
"has-[*[data-valid]]:border-cui-success"
|
|
1468
|
-
],
|
|
1469
|
-
Field:
|
|
1470
|
-
Label:
|
|
1471
|
-
Input:
|
|
1472
|
-
return e || t ? /* @__PURE__ */
|
|
1473
|
-
className: W("flex items-center gap-2 px-2.5",
|
|
1779
|
+
], cn = {
|
|
1780
|
+
Field: rn,
|
|
1781
|
+
Label: an,
|
|
1782
|
+
Input: C(function({ iconLeft: e, iconRight: t, wrapperClassName: n, className: r, ...i }, a) {
|
|
1783
|
+
return e || t ? /* @__PURE__ */ j("div", {
|
|
1784
|
+
className: W("flex items-center gap-2 px-2.5", sn, n),
|
|
1474
1785
|
children: [
|
|
1475
|
-
e && /* @__PURE__ */
|
|
1786
|
+
e && /* @__PURE__ */ A("span", {
|
|
1476
1787
|
className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1477
1788
|
children: e
|
|
1478
1789
|
}),
|
|
1479
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ A(L.Control, {
|
|
1480
1791
|
ref: a,
|
|
1481
1792
|
className: W("flex-1 min-w-0 h-full bg-transparent text-cui-base text-cui-primary outline-none placeholder:text-cui-tertiary", r),
|
|
1482
1793
|
...i
|
|
1483
1794
|
}),
|
|
1484
|
-
t && /* @__PURE__ */
|
|
1795
|
+
t && /* @__PURE__ */ A("span", {
|
|
1485
1796
|
className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1486
1797
|
children: t
|
|
1487
1798
|
})
|
|
1488
1799
|
]
|
|
1489
|
-
}) : /* @__PURE__ */
|
|
1800
|
+
}) : /* @__PURE__ */ A(L.Control, {
|
|
1490
1801
|
ref: a,
|
|
1491
|
-
className: W(
|
|
1802
|
+
className: W(on, r),
|
|
1492
1803
|
...i
|
|
1493
1804
|
});
|
|
1494
1805
|
}),
|
|
1495
|
-
Textarea:
|
|
1496
|
-
return /* @__PURE__ */
|
|
1806
|
+
Textarea: C(function({ className: e, ...t }, n) {
|
|
1807
|
+
return /* @__PURE__ */ A(L.Control, {
|
|
1497
1808
|
ref: n,
|
|
1498
|
-
render: /* @__PURE__ */
|
|
1499
|
-
className: W(
|
|
1809
|
+
render: /* @__PURE__ */ A("textarea", {}),
|
|
1810
|
+
className: W(on, "min-h-20 resize-y", e),
|
|
1500
1811
|
...t
|
|
1501
1812
|
});
|
|
1502
1813
|
}),
|
|
1503
|
-
Hint:
|
|
1504
|
-
return /* @__PURE__ */
|
|
1814
|
+
Hint: C(function({ className: e, ...t }, n) {
|
|
1815
|
+
return /* @__PURE__ */ A(L.Description, {
|
|
1505
1816
|
ref: n,
|
|
1506
1817
|
className: W("text-cui-sm text-cui-tertiary data-[invalid]:text-cui-danger", e),
|
|
1507
1818
|
...t
|
|
@@ -1510,74 +1821,74 @@ var Ft = i(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1510
1821
|
};
|
|
1511
1822
|
//#endregion
|
|
1512
1823
|
//#region src/components/flickering-grid/flickering-grid.tsx
|
|
1513
|
-
function
|
|
1824
|
+
function ln(e, t) {
|
|
1514
1825
|
let n = e.style.color;
|
|
1515
1826
|
e.style.color = t;
|
|
1516
1827
|
let r = getComputedStyle(e).color;
|
|
1517
1828
|
return e.style.color = n, r || "#000";
|
|
1518
1829
|
}
|
|
1519
|
-
function
|
|
1520
|
-
let
|
|
1521
|
-
return
|
|
1522
|
-
let
|
|
1523
|
-
if (!
|
|
1524
|
-
let
|
|
1525
|
-
if (!
|
|
1526
|
-
let
|
|
1527
|
-
function
|
|
1528
|
-
if (!
|
|
1529
|
-
x = window.devicePixelRatio || 1, S =
|
|
1830
|
+
function un({ squareSize: e = 6, gridGap: t = 0, flickerChance: n = .3, color: r = "currentColor", maxOpacity: i = .3, sweep: a = !1, sweepDirection: o = "left", sweepDuration: s = 2.5, sweepWidth: c = .15, sweepOnly: l = !1, sweepNoise: u = .12, className: d }) {
|
|
1831
|
+
let f = D(null), p = D(null);
|
|
1832
|
+
return te(() => {
|
|
1833
|
+
let d = f.current, m = p.current;
|
|
1834
|
+
if (!d || !m) return;
|
|
1835
|
+
let h = m.getContext("2d");
|
|
1836
|
+
if (!h) return;
|
|
1837
|
+
let g = ln(d, r), _ = 0, v = 0, y = new Float32Array(), b = new Float32Array(), x = 1, S = 0, C = 0, w = performance.now();
|
|
1838
|
+
function ee() {
|
|
1839
|
+
if (!m || !d) return;
|
|
1840
|
+
x = window.devicePixelRatio || 1, S = d.clientWidth, C = d.clientHeight, m.width = S * x, m.height = C * x, m.style.width = `${S}px`, m.style.height = `${C}px`;
|
|
1530
1841
|
let n = e + t;
|
|
1531
1842
|
_ = Math.max(1, Math.floor((S + t) / n)), v = Math.max(1, Math.floor((C + t) / n)), y = new Float32Array(_ * v), b = new Float32Array(_ * v);
|
|
1532
|
-
for (let e = 0; e < y.length; e++) y[e] = Math.random() * i, b[e] = (Math.random() - .5) * 2 *
|
|
1843
|
+
for (let e = 0; e < y.length; e++) y[e] = Math.random() * i, b[e] = (Math.random() - .5) * 2 * u;
|
|
1533
1844
|
}
|
|
1534
|
-
function
|
|
1535
|
-
if (!
|
|
1845
|
+
function te(e) {
|
|
1846
|
+
if (!l) for (let t = 0; t < y.length; t++) Math.random() < n * e && (y[t] = Math.random() * i);
|
|
1536
1847
|
}
|
|
1537
|
-
function
|
|
1538
|
-
if (!
|
|
1539
|
-
|
|
1540
|
-
let r = e + t,
|
|
1848
|
+
function T(n) {
|
|
1849
|
+
if (!h || !m) return;
|
|
1850
|
+
h.clearRect(0, 0, m.width, m.height), h.fillStyle = g;
|
|
1851
|
+
let r = e + t, u = 0;
|
|
1541
1852
|
if (a) {
|
|
1542
|
-
let e = (n - w) / 1e3 /
|
|
1543
|
-
|
|
1853
|
+
let e = (n - w) / 1e3 / s % 1;
|
|
1854
|
+
u = o === "left" ? 1 - e : e, u = u * (1 + c * 2) - c;
|
|
1544
1855
|
}
|
|
1545
1856
|
for (let t = 0; t < _; t++) for (let n = 0; n < v; n++) {
|
|
1546
|
-
let o = t * v + n,
|
|
1547
|
-
if (
|
|
1548
|
-
let e = (_ > 1 ? t / (_ - 1) : 0) + (b[o] ?? 0), n = Math.abs(e -
|
|
1549
|
-
|
|
1550
|
-
} else if (
|
|
1551
|
-
let e = _ > 1 ? t / (_ - 1) : 0, n = Math.abs(e -
|
|
1552
|
-
|
|
1857
|
+
let o = t * v + n, s;
|
|
1858
|
+
if (l && a) {
|
|
1859
|
+
let e = (_ > 1 ? t / (_ - 1) : 0) + (b[o] ?? 0), n = Math.abs(e - u), r = Math.max(0, 1 - n / c);
|
|
1860
|
+
s = r * r * (3 - 2 * r) * i;
|
|
1861
|
+
} else if (s = y[o] ?? 0, a) {
|
|
1862
|
+
let e = _ > 1 ? t / (_ - 1) : 0, n = Math.abs(e - u), r = Math.max(0, 1 - n / c), a = r * r * (3 - 2 * r);
|
|
1863
|
+
s = Math.min(i * 1.5, s + a * i);
|
|
1553
1864
|
}
|
|
1554
|
-
|
|
1865
|
+
s < .01 || (h.globalAlpha = s, h.fillRect(t * r * x, n * r * x, e * x, e * x));
|
|
1555
1866
|
}
|
|
1556
|
-
|
|
1867
|
+
h.globalAlpha = 1;
|
|
1557
1868
|
}
|
|
1558
|
-
|
|
1559
|
-
let
|
|
1560
|
-
function
|
|
1561
|
-
if (!
|
|
1562
|
-
let t = (e -
|
|
1563
|
-
|
|
1869
|
+
ee();
|
|
1870
|
+
let E = 0, D = performance.now(), O = !0;
|
|
1871
|
+
function k(e) {
|
|
1872
|
+
if (!O) return;
|
|
1873
|
+
let t = (e - D) / 1e3;
|
|
1874
|
+
D = e, te(t), T(e), E = requestAnimationFrame(k);
|
|
1564
1875
|
}
|
|
1565
|
-
let
|
|
1566
|
-
|
|
1876
|
+
let A = new ResizeObserver(() => {
|
|
1877
|
+
ee();
|
|
1567
1878
|
});
|
|
1568
|
-
|
|
1569
|
-
let
|
|
1570
|
-
|
|
1879
|
+
A.observe(d);
|
|
1880
|
+
let j = new IntersectionObserver(([e]) => {
|
|
1881
|
+
O = e?.isIntersecting ?? !1, O ? (D = performance.now(), E = requestAnimationFrame(k)) : cancelAnimationFrame(E);
|
|
1571
1882
|
}, { threshold: 0 });
|
|
1572
|
-
|
|
1573
|
-
let
|
|
1574
|
-
|
|
1883
|
+
j.observe(m);
|
|
1884
|
+
let M = new MutationObserver(() => {
|
|
1885
|
+
g = ln(d, r);
|
|
1575
1886
|
});
|
|
1576
|
-
return
|
|
1887
|
+
return M.observe(document.documentElement, {
|
|
1577
1888
|
attributes: !0,
|
|
1578
1889
|
attributeFilter: ["data-theme", "class"]
|
|
1579
1890
|
}), () => {
|
|
1580
|
-
cancelAnimationFrame(
|
|
1891
|
+
cancelAnimationFrame(E), A.disconnect(), j.disconnect(), M.disconnect();
|
|
1581
1892
|
};
|
|
1582
1893
|
}, [
|
|
1583
1894
|
e,
|
|
@@ -1587,25 +1898,25 @@ function Yt({ squareSize: e = 6, gridGap: t = 0, flickerChance: n = .3, color: r
|
|
|
1587
1898
|
i,
|
|
1588
1899
|
a,
|
|
1589
1900
|
o,
|
|
1901
|
+
s,
|
|
1590
1902
|
c,
|
|
1591
1903
|
l,
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
className: W("pointer-events-none size-full", m),
|
|
1904
|
+
u
|
|
1905
|
+
]), /* @__PURE__ */ A("div", {
|
|
1906
|
+
ref: f,
|
|
1907
|
+
className: W("pointer-events-none size-full", d),
|
|
1597
1908
|
"aria-hidden": "true",
|
|
1598
|
-
children: /* @__PURE__ */
|
|
1909
|
+
children: /* @__PURE__ */ A("canvas", { ref: p })
|
|
1599
1910
|
});
|
|
1600
1911
|
}
|
|
1601
1912
|
//#endregion
|
|
1602
1913
|
//#region src/components/skeleton/skeleton.tsx
|
|
1603
|
-
var
|
|
1604
|
-
return /* @__PURE__ */
|
|
1914
|
+
var dn = C(function({ circular: e, className: t }, n) {
|
|
1915
|
+
return /* @__PURE__ */ A("div", {
|
|
1605
1916
|
ref: n,
|
|
1606
1917
|
className: W("relative overflow-hidden bg-cui-subtle", e ? "rounded-full" : "rounded-xs", t),
|
|
1607
1918
|
"aria-hidden": "true",
|
|
1608
|
-
children: /* @__PURE__ */
|
|
1919
|
+
children: /* @__PURE__ */ A(un, {
|
|
1609
1920
|
squareSize: 4,
|
|
1610
1921
|
gridGap: 2,
|
|
1611
1922
|
color: "var(--text-color-cui-secondary)",
|
|
@@ -1621,8 +1932,8 @@ var Xt = i(function({ circular: e, className: t }, n) {
|
|
|
1621
1932
|
});
|
|
1622
1933
|
//#endregion
|
|
1623
1934
|
//#region src/components/dropdown-menu/dropdown-menu.tsx
|
|
1624
|
-
function
|
|
1625
|
-
return /* @__PURE__ */
|
|
1935
|
+
function fn({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children: i }) {
|
|
1936
|
+
return /* @__PURE__ */ A(R.Root, {
|
|
1626
1937
|
open: e,
|
|
1627
1938
|
defaultOpen: t,
|
|
1628
1939
|
onOpenChange: n ? (e) => n(e) : void 0,
|
|
@@ -1630,21 +1941,21 @@ function Zt({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children:
|
|
|
1630
1941
|
children: i
|
|
1631
1942
|
});
|
|
1632
1943
|
}
|
|
1633
|
-
var
|
|
1634
|
-
return /* @__PURE__ */
|
|
1944
|
+
var pn = C(function({ className: e, ...t }, n) {
|
|
1945
|
+
return /* @__PURE__ */ A(R.Trigger, {
|
|
1635
1946
|
ref: n,
|
|
1636
1947
|
className: W("cursor-pointer outline-none", e),
|
|
1637
1948
|
...t
|
|
1638
1949
|
});
|
|
1639
1950
|
});
|
|
1640
|
-
function
|
|
1641
|
-
return /* @__PURE__ */
|
|
1951
|
+
function mn({ side: e = "bottom", align: t = "end", sideOffset: n = 4, minWidth: r = "min-w-[180px]", className: i, children: a }) {
|
|
1952
|
+
return /* @__PURE__ */ A(R.Portal, { children: /* @__PURE__ */ A(R.Positioner, {
|
|
1642
1953
|
side: e,
|
|
1643
1954
|
align: t,
|
|
1644
1955
|
sideOffset: n,
|
|
1645
|
-
render: /* @__PURE__ */
|
|
1646
|
-
children: /* @__PURE__ */
|
|
1647
|
-
render: /* @__PURE__ */
|
|
1956
|
+
render: /* @__PURE__ */ A(q.Positioner, {}),
|
|
1957
|
+
children: /* @__PURE__ */ A(R.Popup, {
|
|
1958
|
+
render: /* @__PURE__ */ A(q.Panel, {
|
|
1648
1959
|
minWidth: r,
|
|
1649
1960
|
className: i
|
|
1650
1961
|
}),
|
|
@@ -1653,41 +1964,41 @@ function $t({ side: e = "bottom", align: t = "end", sideOffset: n = 4, minWidth:
|
|
|
1653
1964
|
}) });
|
|
1654
1965
|
}
|
|
1655
1966
|
var Q = {
|
|
1656
|
-
Root:
|
|
1657
|
-
Trigger:
|
|
1658
|
-
Content:
|
|
1659
|
-
Item:
|
|
1660
|
-
return /* @__PURE__ */
|
|
1967
|
+
Root: fn,
|
|
1968
|
+
Trigger: pn,
|
|
1969
|
+
Content: mn,
|
|
1970
|
+
Item: C(function({ variant: e = "default", icon: t, onClick: n, closeOnClick: r, disabled: i, className: a, children: o }, s) {
|
|
1971
|
+
return /* @__PURE__ */ A(R.Item, {
|
|
1661
1972
|
ref: s,
|
|
1662
1973
|
onClick: n,
|
|
1663
1974
|
closeOnClick: r,
|
|
1664
1975
|
disabled: i,
|
|
1665
|
-
render: /* @__PURE__ */
|
|
1976
|
+
render: /* @__PURE__ */ A(q.Item, {
|
|
1666
1977
|
icon: t,
|
|
1667
1978
|
variant: e,
|
|
1668
1979
|
className: a
|
|
1669
1980
|
}),
|
|
1670
|
-
children: /* @__PURE__ */
|
|
1671
|
-
className: "relative z-[1]",
|
|
1981
|
+
children: /* @__PURE__ */ A("span", {
|
|
1982
|
+
className: "relative z-[1] flex-1",
|
|
1672
1983
|
children: o
|
|
1673
1984
|
})
|
|
1674
1985
|
});
|
|
1675
1986
|
}),
|
|
1676
|
-
Separator:
|
|
1677
|
-
return /* @__PURE__ */
|
|
1987
|
+
Separator: C(function({ className: e }, t) {
|
|
1988
|
+
return /* @__PURE__ */ A(R.Separator, {
|
|
1678
1989
|
ref: t,
|
|
1679
|
-
render: /* @__PURE__ */
|
|
1990
|
+
render: /* @__PURE__ */ A(q.Separator, { className: e })
|
|
1680
1991
|
});
|
|
1681
1992
|
}),
|
|
1682
|
-
Label:
|
|
1683
|
-
return /* @__PURE__ */
|
|
1993
|
+
Label: C(function({ className: e, children: t }, n) {
|
|
1994
|
+
return /* @__PURE__ */ A(R.GroupLabel, {
|
|
1684
1995
|
ref: n,
|
|
1685
|
-
render: /* @__PURE__ */
|
|
1996
|
+
render: /* @__PURE__ */ A(q.GroupLabel, { className: e }),
|
|
1686
1997
|
children: t
|
|
1687
1998
|
});
|
|
1688
1999
|
}),
|
|
1689
|
-
Group:
|
|
1690
|
-
return /* @__PURE__ */
|
|
2000
|
+
Group: C(function({ className: e, children: t }, n) {
|
|
2001
|
+
return /* @__PURE__ */ A(R.Group, {
|
|
1691
2002
|
ref: n,
|
|
1692
2003
|
className: W("flex flex-col", e),
|
|
1693
2004
|
children: t
|
|
@@ -1696,117 +2007,111 @@ var Q = {
|
|
|
1696
2007
|
};
|
|
1697
2008
|
//#endregion
|
|
1698
2009
|
//#region src/components/dialog/dialog.tsx
|
|
1699
|
-
function
|
|
1700
|
-
return /* @__PURE__ */
|
|
2010
|
+
function hn({ ...e }) {
|
|
2011
|
+
return /* @__PURE__ */ A(z.Root, { ...e });
|
|
1701
2012
|
}
|
|
1702
|
-
var
|
|
1703
|
-
return /* @__PURE__ */
|
|
2013
|
+
var gn = C(function({ className: e, ...t }, n) {
|
|
2014
|
+
return /* @__PURE__ */ A(z.Trigger, {
|
|
1704
2015
|
ref: n,
|
|
1705
2016
|
className: W(e),
|
|
1706
2017
|
...t
|
|
1707
2018
|
});
|
|
1708
|
-
}),
|
|
1709
|
-
return /* @__PURE__ */
|
|
2019
|
+
}), _n = C(function({ className: e, ...t }, n) {
|
|
2020
|
+
return /* @__PURE__ */ A(z.Backdrop, {
|
|
1710
2021
|
ref: n,
|
|
1711
2022
|
className: W("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-150", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none", e),
|
|
1712
2023
|
...t
|
|
1713
2024
|
});
|
|
1714
|
-
}),
|
|
2025
|
+
}), vn = {
|
|
1715
2026
|
md: "max-w-[450px]",
|
|
1716
2027
|
lg: "max-w-[550px]"
|
|
1717
2028
|
};
|
|
1718
|
-
function
|
|
1719
|
-
return /* @__PURE__ */
|
|
1720
|
-
className: W("bg-cui-base-1 fixed top-1/2 left-1/2 z-50 max-h-[85vh] w-[90vw] -translate-x-1/2 -translate-y-1/2 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none",
|
|
2029
|
+
function yn({ size: e = "md", className: t, children: n, ...r }) {
|
|
2030
|
+
return /* @__PURE__ */ j(z.Portal, { children: [/* @__PURE__ */ A(_n, {}), /* @__PURE__ */ A(z.Popup, {
|
|
2031
|
+
className: W("bg-cui-base-1 fixed top-1/2 left-1/2 z-50 max-h-[85vh] w-[90vw] -translate-x-1/2 -translate-y-1/2 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none", vn[e], t),
|
|
1721
2032
|
...r,
|
|
1722
2033
|
children: n
|
|
1723
2034
|
})] });
|
|
1724
2035
|
}
|
|
1725
|
-
var
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
})
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
className: W("text-cui-secondary", e),
|
|
1768
|
-
...t
|
|
1769
|
-
});
|
|
1770
|
-
})
|
|
1771
|
-
}, $ = i(function({ className: e, children: t }, n) {
|
|
1772
|
-
return /* @__PURE__ */ p("div", {
|
|
2036
|
+
var bn = C(function({ className: e, children: t }, n) {
|
|
2037
|
+
return /* @__PURE__ */ A("div", {
|
|
2038
|
+
ref: n,
|
|
2039
|
+
className: W("bg-cui-base-2 border-cui-neutral rounded-md border", e),
|
|
2040
|
+
children: t
|
|
2041
|
+
});
|
|
2042
|
+
}), xn = C(function({ className: e, ...t }, n) {
|
|
2043
|
+
return /* @__PURE__ */ A(z.Title, {
|
|
2044
|
+
ref: n,
|
|
2045
|
+
className: W("text-cui-primary border-cui-neutral border-b px-4 py-3 text-cui-base font-medium", e),
|
|
2046
|
+
...t
|
|
2047
|
+
});
|
|
2048
|
+
}), Sn = C(function({ className: e, children: t }, n) {
|
|
2049
|
+
return /* @__PURE__ */ A("div", {
|
|
2050
|
+
ref: n,
|
|
2051
|
+
className: W("p-4", e),
|
|
2052
|
+
children: t
|
|
2053
|
+
});
|
|
2054
|
+
}), Cn = C(function({ className: e, children: t }, n) {
|
|
2055
|
+
return /* @__PURE__ */ A("div", {
|
|
2056
|
+
ref: n,
|
|
2057
|
+
className: W("flex items-center justify-between p-2", e),
|
|
2058
|
+
children: t
|
|
2059
|
+
});
|
|
2060
|
+
}), wn = C(function({ className: e, ...t }, n) {
|
|
2061
|
+
return /* @__PURE__ */ A(z.Close, {
|
|
2062
|
+
ref: n,
|
|
2063
|
+
className: W(e),
|
|
2064
|
+
...t
|
|
2065
|
+
});
|
|
2066
|
+
}), Tn = {
|
|
2067
|
+
Root: hn,
|
|
2068
|
+
Trigger: gn,
|
|
2069
|
+
Content: yn,
|
|
2070
|
+
Panel: bn,
|
|
2071
|
+
Title: xn,
|
|
2072
|
+
Description: z.Description,
|
|
2073
|
+
Body: Sn,
|
|
2074
|
+
Footer: Cn,
|
|
2075
|
+
Close: wn
|
|
2076
|
+
}, $ = C(function({ className: e, children: t }, n) {
|
|
2077
|
+
return /* @__PURE__ */ A("div", {
|
|
1773
2078
|
ref: n,
|
|
1774
2079
|
className: W("overflow-hidden rounded ring-1 ring-cui-neutral", e),
|
|
1775
|
-
children: /* @__PURE__ */
|
|
2080
|
+
children: /* @__PURE__ */ A("table", {
|
|
1776
2081
|
className: "w-full table-fixed border-separate border-spacing-0",
|
|
1777
2082
|
children: t
|
|
1778
2083
|
})
|
|
1779
2084
|
});
|
|
1780
|
-
}),
|
|
1781
|
-
return /* @__PURE__ */
|
|
2085
|
+
}), En = C(function({ className: e, children: t }, n) {
|
|
2086
|
+
return /* @__PURE__ */ A("thead", {
|
|
1782
2087
|
ref: n,
|
|
1783
|
-
className: W("[&>tr]:
|
|
2088
|
+
className: W("[&>tr]:text-cui-sm [&>tr]:font-medium [&>tr]:text-cui-secondary", e),
|
|
1784
2089
|
children: t
|
|
1785
2090
|
});
|
|
1786
|
-
}),
|
|
1787
|
-
return /* @__PURE__ */
|
|
2091
|
+
}), Dn = C(function({ className: e, children: t }, n) {
|
|
2092
|
+
return /* @__PURE__ */ A("tbody", {
|
|
1788
2093
|
ref: n,
|
|
1789
2094
|
className: W("[&>tr:not(:last-child)>td]:border-b [&>tr:not(:last-child)>td]:border-cui-neutral", e),
|
|
1790
2095
|
children: t
|
|
1791
2096
|
});
|
|
1792
|
-
}),
|
|
1793
|
-
return /* @__PURE__ */
|
|
2097
|
+
}), On = C(function({ className: e, children: t, onClick: n, ...r }, i) {
|
|
2098
|
+
return /* @__PURE__ */ A("tr", {
|
|
1794
2099
|
ref: i,
|
|
1795
2100
|
className: W("bg-cui-base-1 hover:bg-cui-subtle", "transition-colors duration-100 ease-out motion-reduce:transition-none", n && "cursor-pointer", e),
|
|
1796
2101
|
onClick: n,
|
|
1797
2102
|
...r,
|
|
1798
2103
|
children: t
|
|
1799
2104
|
});
|
|
1800
|
-
}),
|
|
1801
|
-
return /* @__PURE__ */
|
|
2105
|
+
}), kn = C(function({ width: e, colSpan: t, className: n, children: r }, i) {
|
|
2106
|
+
return /* @__PURE__ */ A("th", {
|
|
1802
2107
|
ref: i,
|
|
1803
2108
|
style: e == null ? void 0 : { width: e },
|
|
1804
2109
|
colSpan: t,
|
|
1805
|
-
className: W("px-4 py-2.5 text-left font-medium border-b border-cui-neutral", n),
|
|
2110
|
+
className: W("px-4 py-2.5 text-left text-cui-sm font-medium border-b border-cui-neutral", n),
|
|
1806
2111
|
children: r
|
|
1807
2112
|
});
|
|
1808
|
-
}),
|
|
1809
|
-
return /* @__PURE__ */
|
|
2113
|
+
}), An = C(function({ width: e, colSpan: t, className: n, children: r }, i) {
|
|
2114
|
+
return /* @__PURE__ */ A("td", {
|
|
1810
2115
|
ref: i,
|
|
1811
2116
|
style: e == null ? void 0 : { width: e },
|
|
1812
2117
|
colSpan: t,
|
|
@@ -1814,10 +2119,22 @@ var on = {
|
|
|
1814
2119
|
children: r
|
|
1815
2120
|
});
|
|
1816
2121
|
});
|
|
1817
|
-
|
|
2122
|
+
function jn({ columns: e, rows: t = 5, className: n }) {
|
|
2123
|
+
return /* @__PURE__ */ A("tbody", {
|
|
2124
|
+
className: n,
|
|
2125
|
+
children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ A("tr", {
|
|
2126
|
+
className: "bg-cui-base-1",
|
|
2127
|
+
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ A("td", {
|
|
2128
|
+
className: "px-4 py-3",
|
|
2129
|
+
children: /* @__PURE__ */ A(dn, { className: "h-4 w-full" })
|
|
2130
|
+
}, `skel-cell-${String(n)}-${String(t)}`))
|
|
2131
|
+
}, `skel-row-${String(n)}`))
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
$.Header = En, $.Body = Dn, $.Row = On, $.HeaderCell = kn, $.Cell = An, $.Skeleton = jn;
|
|
1818
2135
|
//#endregion
|
|
1819
2136
|
//#region src/components/pagination/pagination.tsx
|
|
1820
|
-
var
|
|
2137
|
+
var Mn = {
|
|
1821
2138
|
sm: {
|
|
1822
2139
|
button: "size-7",
|
|
1823
2140
|
icon: "size-4",
|
|
@@ -1829,32 +2146,32 @@ var fn = {
|
|
|
1829
2146
|
strip: "h-10"
|
|
1830
2147
|
}
|
|
1831
2148
|
};
|
|
1832
|
-
function
|
|
2149
|
+
function Nn(e, t) {
|
|
1833
2150
|
let n = [];
|
|
1834
2151
|
for (let r = e; r <= t; r++) n.push(r);
|
|
1835
2152
|
return n;
|
|
1836
2153
|
}
|
|
1837
|
-
function
|
|
1838
|
-
if (t <= n * 2 + 5) return
|
|
2154
|
+
function Pn(e, t, n) {
|
|
2155
|
+
if (t <= n * 2 + 5) return Nn(1, t);
|
|
1839
2156
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
1840
2157
|
return !a && o ? [
|
|
1841
|
-
...
|
|
2158
|
+
...Nn(1, n * 2 + 3),
|
|
1842
2159
|
"ellipsis-end",
|
|
1843
2160
|
t
|
|
1844
2161
|
] : a && !o ? [
|
|
1845
2162
|
1,
|
|
1846
2163
|
"ellipsis-start",
|
|
1847
|
-
...
|
|
2164
|
+
...Nn(t - (n * 2 + 3) + 1, t)
|
|
1848
2165
|
] : [
|
|
1849
2166
|
1,
|
|
1850
2167
|
"ellipsis-start",
|
|
1851
|
-
...
|
|
2168
|
+
...Nn(r, i),
|
|
1852
2169
|
"ellipsis-end",
|
|
1853
2170
|
t
|
|
1854
2171
|
];
|
|
1855
2172
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return /* @__PURE__ */
|
|
2173
|
+
function Fn({ page: e, active: t, onClick: n, buttonSize: r }) {
|
|
2174
|
+
return /* @__PURE__ */ A("button", {
|
|
1858
2175
|
type: "button",
|
|
1859
2176
|
"aria-current": t ? "page" : void 0,
|
|
1860
2177
|
onClick: n,
|
|
@@ -1862,90 +2179,90 @@ function hn({ page: e, active: t, onClick: n, buttonSize: r }) {
|
|
|
1862
2179
|
children: e
|
|
1863
2180
|
});
|
|
1864
2181
|
}
|
|
1865
|
-
function
|
|
1866
|
-
return /* @__PURE__ */
|
|
2182
|
+
function In({ buttonSize: e }) {
|
|
2183
|
+
return /* @__PURE__ */ A("span", {
|
|
1867
2184
|
className: W("text-cui-tertiary flex items-center justify-center text-cui-base select-none", e),
|
|
1868
2185
|
children: "..."
|
|
1869
2186
|
});
|
|
1870
2187
|
}
|
|
1871
|
-
function
|
|
1872
|
-
let a = e === "prev" ?
|
|
1873
|
-
return /* @__PURE__ */
|
|
2188
|
+
function Ln({ direction: e, disabled: t, onClick: n, buttonSize: r, iconSize: i }) {
|
|
2189
|
+
let a = e === "prev" ? c : l;
|
|
2190
|
+
return /* @__PURE__ */ A("button", {
|
|
1874
2191
|
type: "button",
|
|
1875
2192
|
"aria-label": e === "prev" ? "Previous page" : "Next page",
|
|
1876
2193
|
disabled: t,
|
|
1877
2194
|
onClick: n,
|
|
1878
2195
|
className: W("rounded-sm flex items-center justify-center cursor-pointer select-none", r, "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150 motion-reduce:transition-none", t ? "text-cui-tertiary pointer-events-none" : "text-cui-secondary hover:text-cui-primary hover:bg-cui-subtle"),
|
|
1879
|
-
children: /* @__PURE__ */
|
|
2196
|
+
children: /* @__PURE__ */ A(a, { className: i })
|
|
1880
2197
|
});
|
|
1881
2198
|
}
|
|
1882
|
-
var
|
|
2199
|
+
var Rn = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, rowsPerPage: i = 10, onRowsPerPageChange: a, rowOptions: o = [
|
|
1883
2200
|
10,
|
|
1884
2201
|
25,
|
|
1885
2202
|
50
|
|
1886
|
-
], siblingCount: s = 1, size: c = "sm", className: l },
|
|
1887
|
-
let
|
|
1888
|
-
if (!
|
|
1889
|
-
let
|
|
1890
|
-
return /* @__PURE__ */
|
|
1891
|
-
ref:
|
|
2203
|
+
], siblingCount: s = 1, size: c = "sm", className: l }, d) {
|
|
2204
|
+
let f = Mn[c], p = a !== void 0, m = r !== void 0, h = t > 1, g = (e - 1) * i + 1, _ = r ? Math.min(e * i, r) : e * i;
|
|
2205
|
+
if (!h && !p && !m) return null;
|
|
2206
|
+
let v = h ? Pn(e, t, s) : [];
|
|
2207
|
+
return /* @__PURE__ */ j("nav", {
|
|
2208
|
+
ref: d,
|
|
1892
2209
|
"aria-label": "Pagination",
|
|
1893
2210
|
className: W("flex items-center bg-cui-subtle rounded-md ring-1 ring-cui-neutral", l),
|
|
1894
2211
|
children: [
|
|
1895
|
-
|
|
1896
|
-
className: W("flex items-center gap-2 px-3",
|
|
1897
|
-
children: [/* @__PURE__ */
|
|
2212
|
+
p && /* @__PURE__ */ j("div", {
|
|
2213
|
+
className: W("flex items-center gap-2 px-3", f.strip),
|
|
2214
|
+
children: [/* @__PURE__ */ A("span", {
|
|
1898
2215
|
className: "text-cui-tertiary text-cui-base whitespace-nowrap",
|
|
1899
2216
|
children: "Rows per page"
|
|
1900
|
-
}), /* @__PURE__ */
|
|
2217
|
+
}), /* @__PURE__ */ j(Q.Root, { children: [/* @__PURE__ */ A(Q.Trigger, { children: /* @__PURE__ */ j("button", {
|
|
1901
2218
|
type: "button",
|
|
1902
2219
|
className: W("flex items-center gap-1 h-6 px-1.5 rounded-sm text-cui-base text-cui-primary tabular-nums cursor-pointer select-none", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "hover:bg-cui-subtle transition-colors duration-150 motion-reduce:transition-none"),
|
|
1903
|
-
children: [i, /* @__PURE__ */
|
|
1904
|
-
}) }), /* @__PURE__ */
|
|
2220
|
+
children: [i, /* @__PURE__ */ A(u, { className: "text-cui-tertiary size-3.5" })]
|
|
2221
|
+
}) }), /* @__PURE__ */ A(Q.Content, {
|
|
1905
2222
|
align: "start",
|
|
1906
2223
|
sideOffset: 4,
|
|
1907
2224
|
minWidth: "min-w-[80px]",
|
|
1908
|
-
children: o.map((e) => /* @__PURE__ */
|
|
2225
|
+
children: o.map((e) => /* @__PURE__ */ A(Q.Item, {
|
|
1909
2226
|
onClick: () => a?.(e),
|
|
1910
2227
|
children: e
|
|
1911
2228
|
}, e))
|
|
1912
2229
|
})] })]
|
|
1913
2230
|
}),
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
className: W("flex items-center gap-0.5 px-1.5",
|
|
2231
|
+
p && h && /* @__PURE__ */ A("div", { className: "bg-cui-neutral w-px self-stretch" }),
|
|
2232
|
+
h && /* @__PURE__ */ j("div", {
|
|
2233
|
+
className: W("flex items-center gap-0.5 px-1.5", f.strip),
|
|
1917
2234
|
children: [
|
|
1918
|
-
/* @__PURE__ */
|
|
2235
|
+
/* @__PURE__ */ A(Ln, {
|
|
1919
2236
|
direction: "prev",
|
|
1920
2237
|
disabled: e <= 1,
|
|
1921
2238
|
onClick: () => n?.(e - 1),
|
|
1922
|
-
buttonSize:
|
|
1923
|
-
iconSize:
|
|
2239
|
+
buttonSize: f.button,
|
|
2240
|
+
iconSize: f.icon
|
|
1924
2241
|
}),
|
|
1925
|
-
|
|
2242
|
+
v.map((t) => typeof t == "number" ? /* @__PURE__ */ A(Fn, {
|
|
1926
2243
|
page: t,
|
|
1927
2244
|
active: t === e,
|
|
1928
2245
|
onClick: () => n?.(t),
|
|
1929
|
-
buttonSize:
|
|
1930
|
-
}, t) : /* @__PURE__ */
|
|
1931
|
-
/* @__PURE__ */
|
|
2246
|
+
buttonSize: f.button
|
|
2247
|
+
}, t) : /* @__PURE__ */ A(In, { buttonSize: f.button }, t)),
|
|
2248
|
+
/* @__PURE__ */ A(Ln, {
|
|
1932
2249
|
direction: "next",
|
|
1933
2250
|
disabled: e >= t,
|
|
1934
2251
|
onClick: () => n?.(e + 1),
|
|
1935
|
-
buttonSize:
|
|
1936
|
-
iconSize:
|
|
2252
|
+
buttonSize: f.button,
|
|
2253
|
+
iconSize: f.icon
|
|
1937
2254
|
})
|
|
1938
2255
|
]
|
|
1939
2256
|
}),
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
className: W("flex items-center px-3",
|
|
1943
|
-
children: /* @__PURE__ */
|
|
2257
|
+
m && (h || p) && /* @__PURE__ */ A("div", { className: "bg-cui-neutral w-px self-stretch" }),
|
|
2258
|
+
m && /* @__PURE__ */ A("div", {
|
|
2259
|
+
className: W("flex items-center px-3", f.strip),
|
|
2260
|
+
children: /* @__PURE__ */ j("span", {
|
|
1944
2261
|
className: "text-cui-tertiary text-cui-base whitespace-nowrap tabular-nums",
|
|
1945
2262
|
children: [
|
|
1946
|
-
|
|
2263
|
+
g,
|
|
1947
2264
|
"–",
|
|
1948
|
-
|
|
2265
|
+
_,
|
|
1949
2266
|
" / ",
|
|
1950
2267
|
r
|
|
1951
2268
|
]
|
|
@@ -1956,24 +2273,24 @@ var vn = i(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, row
|
|
|
1956
2273
|
});
|
|
1957
2274
|
//#endregion
|
|
1958
2275
|
//#region src/components/data-table/data-table.tsx
|
|
1959
|
-
function
|
|
1960
|
-
return e === "asc" ? /* @__PURE__ */
|
|
2276
|
+
function zn({ direction: e }) {
|
|
2277
|
+
return e === "asc" ? /* @__PURE__ */ A(d, { className: "text-cui-primary size-3.5" }) : e === "desc" ? /* @__PURE__ */ A(s, { className: "text-cui-primary size-3.5" }) : /* @__PURE__ */ A(u, { className: "text-cui-tertiary size-3.5 opacity-0 transition-opacity group-hover:opacity-100" });
|
|
1961
2278
|
}
|
|
1962
|
-
function
|
|
2279
|
+
function Bn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize: i = 10, pageSizeOptions: a = [
|
|
1963
2280
|
10,
|
|
1964
2281
|
25,
|
|
1965
2282
|
50
|
|
1966
|
-
], selectable: o = !1, rowSelection: s, onRowSelectionChange: c, onRowClick: l,
|
|
1967
|
-
let [
|
|
1968
|
-
c(typeof e == "function" ? e(
|
|
1969
|
-
} :
|
|
2283
|
+
], selectable: o = !1, rowSelection: s, onRowSelectionChange: c, onRowClick: l, loading: u = !1, loadingRows: d = 5, emptyMessage: f = "No results.", className: p, tableOptions: m }) {
|
|
2284
|
+
let [h, g] = O([]), [_, v] = O([]), [y, b] = O({}), [x, S] = O({}), C = s ?? x, w = c ? (e) => {
|
|
2285
|
+
c(typeof e == "function" ? e(C) : e);
|
|
2286
|
+
} : S, ee = o ? [{
|
|
1970
2287
|
id: "_select",
|
|
1971
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
2288
|
+
header: ({ table: e }) => /* @__PURE__ */ A(Qe, {
|
|
1972
2289
|
checked: e.getIsAllPageRowsSelected(),
|
|
1973
2290
|
indeterminate: e.getIsSomePageRowsSelected(),
|
|
1974
2291
|
onCheckedChange: (t) => e.toggleAllPageRowsSelected(t)
|
|
1975
2292
|
}),
|
|
1976
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
2293
|
+
cell: ({ row: e }) => /* @__PURE__ */ A(Qe, {
|
|
1977
2294
|
checked: e.getIsSelected(),
|
|
1978
2295
|
disabled: !e.getCanSelect(),
|
|
1979
2296
|
onCheckedChange: (t) => e.toggleSelected(t)
|
|
@@ -1981,74 +2298,74 @@ function bn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize
|
|
|
1981
2298
|
enableSorting: !1,
|
|
1982
2299
|
enableHiding: !1,
|
|
1983
2300
|
size: 40
|
|
1984
|
-
}, ...e] : e, { state:
|
|
2301
|
+
}, ...e] : e, { state: te, ...T } = m ?? {}, E = de({
|
|
1985
2302
|
data: t,
|
|
1986
|
-
columns:
|
|
2303
|
+
columns: ee,
|
|
1987
2304
|
state: {
|
|
1988
|
-
sorting:
|
|
1989
|
-
columnFilters:
|
|
1990
|
-
columnVisibility:
|
|
1991
|
-
rowSelection:
|
|
1992
|
-
...
|
|
2305
|
+
sorting: h,
|
|
2306
|
+
columnFilters: _,
|
|
2307
|
+
columnVisibility: y,
|
|
2308
|
+
rowSelection: C,
|
|
2309
|
+
...te
|
|
1993
2310
|
},
|
|
1994
|
-
onSortingChange:
|
|
1995
|
-
onColumnFiltersChange:
|
|
1996
|
-
onColumnVisibilityChange:
|
|
1997
|
-
onRowSelectionChange:
|
|
1998
|
-
getCoreRowModel:
|
|
1999
|
-
getSortedRowModel:
|
|
2000
|
-
getFilteredRowModel:
|
|
2001
|
-
...r && { getPaginationRowModel:
|
|
2311
|
+
onSortingChange: g,
|
|
2312
|
+
onColumnFiltersChange: v,
|
|
2313
|
+
onColumnVisibilityChange: b,
|
|
2314
|
+
onRowSelectionChange: w,
|
|
2315
|
+
getCoreRowModel: se(),
|
|
2316
|
+
getSortedRowModel: ue(),
|
|
2317
|
+
getFilteredRowModel: ce(),
|
|
2318
|
+
...r && { getPaginationRowModel: le() },
|
|
2002
2319
|
enableRowSelection: o,
|
|
2003
2320
|
initialState: { pagination: { pageSize: i } },
|
|
2004
|
-
...
|
|
2005
|
-
}),
|
|
2006
|
-
return /* @__PURE__ */
|
|
2007
|
-
className: W("flex flex-col gap-3",
|
|
2008
|
-
children: [/* @__PURE__ */
|
|
2321
|
+
...T
|
|
2322
|
+
}), D = E.getPageCount(), k = E.getState().pagination.pageIndex + 1, M = E.getState().pagination.pageSize;
|
|
2323
|
+
return /* @__PURE__ */ j("div", {
|
|
2324
|
+
className: W("flex flex-col gap-3", p),
|
|
2325
|
+
children: [/* @__PURE__ */ j($, { children: [/* @__PURE__ */ A($.Header, { children: E.getHeaderGroups().map((e) => /* @__PURE__ */ A($.Row, { children: e.headers.map((e) => {
|
|
2009
2326
|
let t = n && e.column.getCanSort(), r = e.column.getIsSorted();
|
|
2010
|
-
return /* @__PURE__ */
|
|
2327
|
+
return /* @__PURE__ */ A($.HeaderCell, {
|
|
2011
2328
|
width: e.getSize() === 150 ? void 0 : e.getSize(),
|
|
2012
2329
|
className: W(t && "cursor-pointer select-none group"),
|
|
2013
|
-
children: e.isPlaceholder ? null : /* @__PURE__ */
|
|
2330
|
+
children: e.isPlaceholder ? null : /* @__PURE__ */ j("button", {
|
|
2014
2331
|
type: "button",
|
|
2015
2332
|
className: W("flex items-center gap-1", t && "cursor-pointer"),
|
|
2016
2333
|
onClick: t ? e.column.getToggleSortingHandler() : void 0,
|
|
2017
2334
|
tabIndex: t ? 0 : -1,
|
|
2018
|
-
children: [
|
|
2335
|
+
children: [oe(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */ A(zn, { direction: r })]
|
|
2019
2336
|
})
|
|
2020
2337
|
}, e.id);
|
|
2021
|
-
}) }, e.id)) }), /* @__PURE__ */
|
|
2338
|
+
}) }, e.id)) }), /* @__PURE__ */ A($.Body, { children: u ? Array.from({ length: d }, (e, t) => /* @__PURE__ */ A($.Row, { children: E.getVisibleLeafColumns().map((e, n) => /* @__PURE__ */ A($.Cell, { children: /* @__PURE__ */ A(dn, { className: "h-4 w-full" }) }, `skeleton-${String(t)}-${String(n)}`)) }, `skeleton-${String(t)}`)) : E.getRowModel().rows.length > 0 ? E.getRowModel().rows.map((e) => /* @__PURE__ */ A($.Row, {
|
|
2022
2339
|
onClick: l ? () => l(e) : void 0,
|
|
2023
2340
|
className: W(e.getIsSelected() && "bg-cui-subtle"),
|
|
2024
|
-
children: e.getVisibleCells().map((e) => /* @__PURE__ */
|
|
2341
|
+
children: e.getVisibleCells().map((e) => /* @__PURE__ */ A($.Cell, {
|
|
2025
2342
|
width: e.column.getSize() === 150 ? void 0 : e.column.getSize(),
|
|
2026
|
-
children:
|
|
2343
|
+
children: oe(e.column.columnDef.cell, e.getContext())
|
|
2027
2344
|
}, e.id))
|
|
2028
|
-
}, e.id)) : /* @__PURE__ */
|
|
2029
|
-
colSpan:
|
|
2345
|
+
}, e.id)) : /* @__PURE__ */ A($.Row, { children: /* @__PURE__ */ A($.Cell, {
|
|
2346
|
+
colSpan: ee.length,
|
|
2030
2347
|
className: "text-cui-tertiary py-8 text-center",
|
|
2031
|
-
children:
|
|
2032
|
-
}) }) })] }), r &&
|
|
2348
|
+
children: f
|
|
2349
|
+
}) }) })] }), r && D > 0 && /* @__PURE__ */ j("div", {
|
|
2033
2350
|
className: "flex items-center justify-between",
|
|
2034
|
-
children: [o && /* @__PURE__ */
|
|
2351
|
+
children: [o && /* @__PURE__ */ j("span", {
|
|
2035
2352
|
className: "text-cui-secondary text-cui-base",
|
|
2036
2353
|
children: [
|
|
2037
|
-
|
|
2354
|
+
E.getFilteredSelectedRowModel().rows.length,
|
|
2038
2355
|
" of",
|
|
2039
2356
|
" ",
|
|
2040
|
-
|
|
2357
|
+
E.getFilteredRowModel().rows.length,
|
|
2041
2358
|
" row(s) selected"
|
|
2042
2359
|
]
|
|
2043
|
-
}), /* @__PURE__ */
|
|
2360
|
+
}), /* @__PURE__ */ A("div", {
|
|
2044
2361
|
className: W(!o && "ml-auto"),
|
|
2045
|
-
children: /* @__PURE__ */
|
|
2046
|
-
page:
|
|
2047
|
-
pageCount:
|
|
2048
|
-
onPageChange: (e) =>
|
|
2049
|
-
totalItems:
|
|
2050
|
-
rowsPerPage:
|
|
2051
|
-
onRowsPerPageChange: (e) =>
|
|
2362
|
+
children: /* @__PURE__ */ A(Rn, {
|
|
2363
|
+
page: k,
|
|
2364
|
+
pageCount: D,
|
|
2365
|
+
onPageChange: (e) => E.setPageIndex(e - 1),
|
|
2366
|
+
totalItems: E.getFilteredRowModel().rows.length,
|
|
2367
|
+
rowsPerPage: M,
|
|
2368
|
+
onRowsPerPageChange: (e) => E.setPageSize(e),
|
|
2052
2369
|
rowOptions: a
|
|
2053
2370
|
})
|
|
2054
2371
|
})]
|
|
@@ -2057,90 +2374,90 @@ function bn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize
|
|
|
2057
2374
|
}
|
|
2058
2375
|
//#endregion
|
|
2059
2376
|
//#region src/components/data-table/data-table-toolbar.tsx
|
|
2060
|
-
var
|
|
2061
|
-
return /* @__PURE__ */
|
|
2377
|
+
var Vn = C(function({ children: e, className: t }, n) {
|
|
2378
|
+
return /* @__PURE__ */ A("div", {
|
|
2062
2379
|
ref: n,
|
|
2063
2380
|
className: W("flex flex-wrap items-center gap-2", t),
|
|
2064
2381
|
children: e
|
|
2065
2382
|
});
|
|
2066
|
-
}),
|
|
2067
|
-
let
|
|
2068
|
-
t(""),
|
|
2383
|
+
}), Hn = C(function({ value: e, onChange: t, placeholder: n = "Search...", className: r }, i) {
|
|
2384
|
+
let a = D(null), o = w(() => {
|
|
2385
|
+
t(""), a.current?.focus();
|
|
2069
2386
|
}, [t]);
|
|
2070
|
-
return /* @__PURE__ */
|
|
2387
|
+
return /* @__PURE__ */ j("div", {
|
|
2071
2388
|
ref: i,
|
|
2072
2389
|
className: W("border-cui-neutral bg-cui-base-2 flex h-8 max-w-sm items-center gap-2 rounded-md border px-2.5", "ring-cui-neutral ring-0 transition-[box-shadow,border-color] duration-150 ease-out", "has-[:focus]:ring-2 has-[:focus]:border-cui-neutral-strong", "motion-reduce:transition-none", r),
|
|
2073
2390
|
children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
ref:
|
|
2391
|
+
/* @__PURE__ */ A(h, { className: "text-cui-tertiary size-4 shrink-0" }),
|
|
2392
|
+
/* @__PURE__ */ A("input", {
|
|
2393
|
+
ref: a,
|
|
2077
2394
|
type: "text",
|
|
2078
2395
|
value: e,
|
|
2079
2396
|
onChange: (e) => t(e.target.value),
|
|
2080
2397
|
placeholder: n,
|
|
2081
2398
|
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base min-w-0 flex-1 bg-transparent outline-none"
|
|
2082
2399
|
}),
|
|
2083
|
-
e && /* @__PURE__ */
|
|
2400
|
+
e && /* @__PURE__ */ A("button", {
|
|
2084
2401
|
type: "button",
|
|
2085
|
-
onClick:
|
|
2402
|
+
onClick: o,
|
|
2086
2403
|
className: "text-cui-tertiary hover:text-cui-secondary shrink-0 rounded-sm p-0.5 transition-colors",
|
|
2087
|
-
children: /* @__PURE__ */
|
|
2404
|
+
children: /* @__PURE__ */ A(x, { className: "size-3.5" })
|
|
2088
2405
|
})
|
|
2089
2406
|
]
|
|
2090
2407
|
});
|
|
2091
2408
|
});
|
|
2092
2409
|
//#endregion
|
|
2093
2410
|
//#region src/components/popover/popover.tsx
|
|
2094
|
-
function
|
|
2095
|
-
return /* @__PURE__ */
|
|
2411
|
+
function Un(e) {
|
|
2412
|
+
return /* @__PURE__ */ A(B.Root, { ...e });
|
|
2096
2413
|
}
|
|
2097
|
-
var
|
|
2098
|
-
return /* @__PURE__ */
|
|
2414
|
+
var Wn = C(function({ className: e, ...t }, n) {
|
|
2415
|
+
return /* @__PURE__ */ A(B.Trigger, {
|
|
2099
2416
|
ref: n,
|
|
2100
2417
|
className: W("cursor-pointer outline-none", e),
|
|
2101
2418
|
...t
|
|
2102
2419
|
});
|
|
2103
2420
|
});
|
|
2104
|
-
function
|
|
2105
|
-
return /* @__PURE__ */
|
|
2421
|
+
function Gn({ side: e = "bottom", align: t = "center", sideOffset: n = 4, className: r, children: i, ...a }) {
|
|
2422
|
+
return /* @__PURE__ */ A(B.Portal, { children: /* @__PURE__ */ A(B.Positioner, {
|
|
2106
2423
|
side: e,
|
|
2107
2424
|
align: t,
|
|
2108
2425
|
sideOffset: n,
|
|
2109
2426
|
className: "z-50 outline-none",
|
|
2110
|
-
children: /* @__PURE__ */
|
|
2427
|
+
children: /* @__PURE__ */ A(B.Popup, {
|
|
2111
2428
|
className: W("bg-cui-base-2 border border-cui-neutral rounded-md shadow-md p-3", "origin-[var(--transform-origin)] will-change-[transform,opacity]", "transition-[transform,scale,opacity] duration-200 ease-cui-out-expo", "data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", "motion-reduce:transition-none", "focus:outline-none", r),
|
|
2112
2429
|
...a,
|
|
2113
2430
|
children: i
|
|
2114
2431
|
})
|
|
2115
2432
|
}) });
|
|
2116
2433
|
}
|
|
2117
|
-
var
|
|
2118
|
-
Root:
|
|
2119
|
-
Trigger:
|
|
2120
|
-
Content:
|
|
2121
|
-
Arrow:
|
|
2122
|
-
return /* @__PURE__ */
|
|
2434
|
+
var Kn = {
|
|
2435
|
+
Root: Un,
|
|
2436
|
+
Trigger: Wn,
|
|
2437
|
+
Content: Gn,
|
|
2438
|
+
Arrow: C(function({ className: e, ...t }, n) {
|
|
2439
|
+
return /* @__PURE__ */ A(B.Arrow, {
|
|
2123
2440
|
ref: n,
|
|
2124
2441
|
className: W("fill-cui-base-2 stroke-cui-neutral [stroke-width:1px]", "data-[side=top]:bottom-[-5px]", "data-[side=bottom]:top-[-5px]", "data-[side=left]:right-[-5px]", "data-[side=right]:left-[-5px]", e),
|
|
2125
2442
|
...t
|
|
2126
2443
|
});
|
|
2127
2444
|
}),
|
|
2128
|
-
Close:
|
|
2129
|
-
return /* @__PURE__ */
|
|
2445
|
+
Close: C(function({ className: e, ...t }, n) {
|
|
2446
|
+
return /* @__PURE__ */ A(B.Close, {
|
|
2130
2447
|
ref: n,
|
|
2131
2448
|
className: W(e),
|
|
2132
2449
|
...t
|
|
2133
2450
|
});
|
|
2134
2451
|
}),
|
|
2135
|
-
Title:
|
|
2136
|
-
return /* @__PURE__ */
|
|
2452
|
+
Title: C(function({ className: e, children: t }, n) {
|
|
2453
|
+
return /* @__PURE__ */ A("p", {
|
|
2137
2454
|
ref: n,
|
|
2138
2455
|
className: W("text-cui-primary text-cui-base font-medium", e),
|
|
2139
2456
|
children: t
|
|
2140
2457
|
});
|
|
2141
2458
|
}),
|
|
2142
|
-
Description:
|
|
2143
|
-
return /* @__PURE__ */
|
|
2459
|
+
Description: C(function({ className: e, ...t }, n) {
|
|
2460
|
+
return /* @__PURE__ */ A(B.Description, {
|
|
2144
2461
|
ref: n,
|
|
2145
2462
|
className: W("text-cui-secondary mt-1 text-cui-base", e),
|
|
2146
2463
|
...t
|
|
@@ -2149,89 +2466,89 @@ var En = {
|
|
|
2149
2466
|
};
|
|
2150
2467
|
//#endregion
|
|
2151
2468
|
//#region src/components/data-table/data-table-faceted-filter.tsx
|
|
2152
|
-
function
|
|
2153
|
-
let [a,
|
|
2154
|
-
function
|
|
2469
|
+
function qn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
2470
|
+
let [a, s] = O(""), c = D(null), l = e?.getFacetedUniqueValues(), u = r ?? e?.getFilterValue() ?? [], d = new Set(u), f = d.size > 0, p = a ? n.filter((e) => e.label.toLowerCase().includes(a.toLowerCase())) : n;
|
|
2471
|
+
function m(t) {
|
|
2155
2472
|
i ? i(t) : e?.setFilterValue(t.length ? t : void 0);
|
|
2156
2473
|
}
|
|
2157
|
-
function
|
|
2158
|
-
let t = new Set(
|
|
2159
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2474
|
+
function h(e) {
|
|
2475
|
+
let t = new Set(d);
|
|
2476
|
+
t.has(e) ? t.delete(e) : t.add(e), m(Array.from(t));
|
|
2160
2477
|
}
|
|
2161
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ j(Kn.Root, {
|
|
2162
2479
|
onOpenChange: (e) => {
|
|
2163
2480
|
e ? requestAnimationFrame(() => {
|
|
2164
|
-
|
|
2165
|
-
}) :
|
|
2481
|
+
c.current?.focus({ preventScroll: !0 });
|
|
2482
|
+
}) : s("");
|
|
2166
2483
|
},
|
|
2167
|
-
children: [/* @__PURE__ */
|
|
2168
|
-
render: /* @__PURE__ */
|
|
2169
|
-
className: W("border-cui-neutral inline-flex h-8 items-center rounded-md border text-cui-base",
|
|
2484
|
+
children: [/* @__PURE__ */ j(Kn.Trigger, {
|
|
2485
|
+
render: /* @__PURE__ */ A("button", { type: "button" }),
|
|
2486
|
+
className: W("border-cui-neutral inline-flex h-8 items-center rounded-md border text-cui-base", f ? "gap-1 border-solid py-1 pl-2.5 pr-2.5" : "gap-1.5 border-dashed px-3", "hover:bg-cui-subtle cursor-pointer transition-colors", "ring-cui-focus outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),
|
|
2170
2487
|
children: [
|
|
2171
|
-
/* @__PURE__ */
|
|
2172
|
-
/* @__PURE__ */
|
|
2488
|
+
/* @__PURE__ */ A(v, { className: "text-cui-tertiary size-4 shrink-0" }),
|
|
2489
|
+
/* @__PURE__ */ A("span", {
|
|
2173
2490
|
className: "text-cui-primary",
|
|
2174
2491
|
children: t
|
|
2175
2492
|
}),
|
|
2176
|
-
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
/* @__PURE__ */
|
|
2179
|
-
className: "rounded-sm px-1 font-
|
|
2180
|
-
children:
|
|
2493
|
+
f && /* @__PURE__ */ j(k, { children: [
|
|
2494
|
+
/* @__PURE__ */ A("div", { className: "border-cui-neutral mx-0.5 h-4 w-px border-l" }),
|
|
2495
|
+
/* @__PURE__ */ A(nn, {
|
|
2496
|
+
className: "rounded-sm px-1 font-medium lg:hidden",
|
|
2497
|
+
children: d.size
|
|
2181
2498
|
}),
|
|
2182
|
-
/* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ A("span", {
|
|
2183
2500
|
className: "hidden items-center gap-1 lg:flex",
|
|
2184
|
-
children:
|
|
2185
|
-
className: "rounded-sm px-1 font-
|
|
2186
|
-
children: [
|
|
2187
|
-
}) : n.filter((e) =>
|
|
2188
|
-
className: "rounded-sm px-1 font-
|
|
2501
|
+
children: d.size > 2 ? /* @__PURE__ */ j(nn, {
|
|
2502
|
+
className: "rounded-sm px-1 font-medium",
|
|
2503
|
+
children: [d.size, " selected"]
|
|
2504
|
+
}) : n.filter((e) => d.has(e.value)).map((e) => /* @__PURE__ */ A(nn, {
|
|
2505
|
+
className: "rounded-sm px-1 font-medium",
|
|
2189
2506
|
children: e.label
|
|
2190
2507
|
}, e.value))
|
|
2191
2508
|
})
|
|
2192
2509
|
] })
|
|
2193
2510
|
]
|
|
2194
|
-
}), /* @__PURE__ */
|
|
2511
|
+
}), /* @__PURE__ */ j(Kn.Content, {
|
|
2195
2512
|
side: "bottom",
|
|
2196
2513
|
align: "start",
|
|
2197
2514
|
sideOffset: 4,
|
|
2198
2515
|
className: "w-[220px] p-1",
|
|
2199
2516
|
children: [
|
|
2200
|
-
/* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ A(q.SearchInput, {
|
|
2201
2518
|
className: "mx-0 mt-0",
|
|
2202
|
-
children: /* @__PURE__ */
|
|
2203
|
-
ref:
|
|
2519
|
+
children: /* @__PURE__ */ A("input", {
|
|
2520
|
+
ref: c,
|
|
2204
2521
|
value: a,
|
|
2205
|
-
onChange: (e) =>
|
|
2522
|
+
onChange: (e) => s(e.target.value),
|
|
2206
2523
|
placeholder: t,
|
|
2207
2524
|
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base flex-1 bg-transparent outline-none"
|
|
2208
2525
|
})
|
|
2209
2526
|
}),
|
|
2210
|
-
/* @__PURE__ */
|
|
2211
|
-
let t =
|
|
2212
|
-
return /* @__PURE__ */
|
|
2213
|
-
onClick: () =>
|
|
2214
|
-
icon: /* @__PURE__ */
|
|
2527
|
+
/* @__PURE__ */ j(q.List, { children: [p.length === 0 && /* @__PURE__ */ A(q.Empty, { children: "No results found." }), p.map((e) => {
|
|
2528
|
+
let t = d.has(e.value);
|
|
2529
|
+
return /* @__PURE__ */ j(q.Item, {
|
|
2530
|
+
onClick: () => h(e.value),
|
|
2531
|
+
icon: /* @__PURE__ */ A("div", {
|
|
2215
2532
|
className: W("flex size-4 items-center justify-center rounded border", t ? "border-cui-accent bg-cui-accent text-cui-inverse" : "border-cui-neutral [&_svg]:invisible"),
|
|
2216
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ A(o, { className: "size-3" })
|
|
2217
2534
|
}),
|
|
2218
|
-
indicator:
|
|
2535
|
+
indicator: l?.get(e.value) == null ? void 0 : /* @__PURE__ */ A("span", {
|
|
2219
2536
|
className: "text-cui-tertiary font-cui-mono text-cui-sm",
|
|
2220
|
-
children:
|
|
2537
|
+
children: l.get(e.value)
|
|
2221
2538
|
}),
|
|
2222
|
-
children: [e.icon && /* @__PURE__ */
|
|
2539
|
+
children: [e.icon && /* @__PURE__ */ A("span", {
|
|
2223
2540
|
className: "text-cui-secondary flex size-4 shrink-0 items-center justify-center [&>svg]:size-3.5",
|
|
2224
2541
|
children: e.icon
|
|
2225
|
-
}), /* @__PURE__ */
|
|
2542
|
+
}), /* @__PURE__ */ A("span", {
|
|
2226
2543
|
className: "relative z-[1]",
|
|
2227
2544
|
children: e.label
|
|
2228
2545
|
})]
|
|
2229
2546
|
}, e.value);
|
|
2230
2547
|
})] }),
|
|
2231
|
-
|
|
2232
|
-
onClick: () =>
|
|
2548
|
+
f && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(q.Separator, {}), /* @__PURE__ */ A(q.Item, {
|
|
2549
|
+
onClick: () => m([]),
|
|
2233
2550
|
className: "justify-center",
|
|
2234
|
-
children: /* @__PURE__ */
|
|
2551
|
+
children: /* @__PURE__ */ A("span", {
|
|
2235
2552
|
className: "relative z-[1]",
|
|
2236
2553
|
children: "Clear filters"
|
|
2237
2554
|
})
|
|
@@ -2242,49 +2559,49 @@ function Dn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2242
2559
|
}
|
|
2243
2560
|
//#endregion
|
|
2244
2561
|
//#region src/components/segmented-group/segmented-group.tsx
|
|
2245
|
-
var
|
|
2246
|
-
let
|
|
2562
|
+
var Jn = C(function({ activeIndex: e, itemCount: t, layout: n = "fill", className: r, children: i }, a) {
|
|
2563
|
+
let o = n === "fill", s = D(null), [c, l] = O(null), u = D(!1), d = w(() => {
|
|
2247
2564
|
if (n !== "fit") return;
|
|
2248
|
-
let t =
|
|
2565
|
+
let t = s.current;
|
|
2249
2566
|
if (!t) return;
|
|
2250
2567
|
let r = t.querySelectorAll("[data-segmented-item]")[e];
|
|
2251
2568
|
if (!r) return;
|
|
2252
|
-
let i = !
|
|
2253
|
-
|
|
2569
|
+
let i = !u.current;
|
|
2570
|
+
u.current = !0, l({
|
|
2254
2571
|
left: r.offsetLeft,
|
|
2255
2572
|
width: r.offsetWidth
|
|
2256
2573
|
}), i && r.offsetHeight;
|
|
2257
2574
|
}, [e, n]);
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
let e =
|
|
2575
|
+
T(() => {
|
|
2576
|
+
d();
|
|
2577
|
+
let e = s.current;
|
|
2261
2578
|
if (!e || n !== "fit") return;
|
|
2262
|
-
let t = new ResizeObserver(
|
|
2579
|
+
let t = new ResizeObserver(d);
|
|
2263
2580
|
return t.observe(e), () => t.disconnect();
|
|
2264
|
-
}, [
|
|
2265
|
-
let
|
|
2581
|
+
}, [d, n]);
|
|
2582
|
+
let f = o ? {
|
|
2266
2583
|
width: `calc(100% / ${t})`,
|
|
2267
2584
|
transform: `translateX(${e * 100}%)`
|
|
2268
|
-
} :
|
|
2269
|
-
left:
|
|
2270
|
-
width:
|
|
2271
|
-
transition:
|
|
2585
|
+
} : c ? {
|
|
2586
|
+
left: c.left,
|
|
2587
|
+
width: c.width,
|
|
2588
|
+
transition: u.current ? void 0 : "none"
|
|
2272
2589
|
} : { opacity: 0 };
|
|
2273
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ j("div", {
|
|
2274
2591
|
ref: (e) => {
|
|
2275
|
-
|
|
2592
|
+
s.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
2276
2593
|
},
|
|
2277
|
-
className: W("relative bg-cui-base-0 rounded-md ring-1 ring-cui-neutral",
|
|
2278
|
-
style:
|
|
2279
|
-
children: [/* @__PURE__ */
|
|
2594
|
+
className: W("relative bg-cui-base-0 rounded-md ring-1 ring-cui-neutral", o ? "grid" : "inline-flex", r),
|
|
2595
|
+
style: o ? { gridTemplateColumns: `repeat(${t}, 1fr)` } : void 0,
|
|
2596
|
+
children: [/* @__PURE__ */ A("div", {
|
|
2280
2597
|
"aria-hidden": !0,
|
|
2281
|
-
className: W("absolute inset-y-0 p-0.5", "transition-all duration-200 ease-cui-out-expo", "motion-reduce:transition-none", !
|
|
2282
|
-
style:
|
|
2283
|
-
children: /* @__PURE__ */
|
|
2598
|
+
className: W("absolute inset-y-0 p-0.5", "transition-all duration-200 ease-cui-out-expo", "motion-reduce:transition-none", !o && !u.current && "transition-none"),
|
|
2599
|
+
style: f,
|
|
2600
|
+
children: /* @__PURE__ */ A("div", { className: "bg-cui-base-2 h-full rounded-sm shadow-sm" })
|
|
2284
2601
|
}), i]
|
|
2285
2602
|
});
|
|
2286
|
-
}),
|
|
2287
|
-
return /* @__PURE__ */
|
|
2603
|
+
}), Yn = C(function({ active: e = !1, className: t, children: n, ...r }, i) {
|
|
2604
|
+
return /* @__PURE__ */ A("button", {
|
|
2288
2605
|
ref: i,
|
|
2289
2606
|
type: "button",
|
|
2290
2607
|
"data-segmented-item": "",
|
|
@@ -2292,265 +2609,217 @@ var On = i(function({ activeIndex: e, itemCount: t, layout: n = "fill", classNam
|
|
|
2292
2609
|
...r,
|
|
2293
2610
|
children: n
|
|
2294
2611
|
});
|
|
2295
|
-
}),
|
|
2612
|
+
}), Xn = {
|
|
2296
2613
|
sm: "h-7 px-2.5",
|
|
2297
2614
|
md: "h-8 px-3"
|
|
2298
|
-
},
|
|
2299
|
-
let [c, l] =
|
|
2300
|
-
function
|
|
2615
|
+
}, Zn = C(function({ options: e, value: t, defaultValue: n, onValueChange: r, layout: i = "fill", size: a = "sm", className: o }, s) {
|
|
2616
|
+
let [c, l] = O(() => n ?? e[0]?.value ?? ""), u = t !== void 0, d = u ? t : c, f = e.findIndex((e) => e.value === d);
|
|
2617
|
+
function p(e) {
|
|
2301
2618
|
u || l(e), r?.(e);
|
|
2302
2619
|
}
|
|
2303
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ A(Jn, {
|
|
2304
2621
|
ref: s,
|
|
2305
|
-
activeIndex:
|
|
2622
|
+
activeIndex: f,
|
|
2306
2623
|
itemCount: e.length,
|
|
2307
2624
|
layout: i,
|
|
2308
2625
|
className: o,
|
|
2309
|
-
children: e.map((e) => /* @__PURE__ */
|
|
2310
|
-
active: e.value ===
|
|
2311
|
-
"aria-pressed": e.value ===
|
|
2312
|
-
onClick: () =>
|
|
2313
|
-
className:
|
|
2314
|
-
children: [e.icon && /* @__PURE__ */
|
|
2626
|
+
children: e.map((e) => /* @__PURE__ */ j(Yn, {
|
|
2627
|
+
active: e.value === d,
|
|
2628
|
+
"aria-pressed": e.value === d,
|
|
2629
|
+
onClick: () => p(e.value),
|
|
2630
|
+
className: Xn[a],
|
|
2631
|
+
children: [e.icon && /* @__PURE__ */ A("span", {
|
|
2315
2632
|
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2316
2633
|
children: e.icon
|
|
2317
|
-
}), e.label && /* @__PURE__ */
|
|
2634
|
+
}), e.label && /* @__PURE__ */ A("span", { children: e.label })]
|
|
2318
2635
|
}, e.value))
|
|
2319
2636
|
});
|
|
2320
|
-
}),
|
|
2637
|
+
}), Qn = [
|
|
2321
2638
|
{
|
|
2322
2639
|
value: "light",
|
|
2323
|
-
icon: /* @__PURE__ */
|
|
2640
|
+
icon: /* @__PURE__ */ A(y, {})
|
|
2324
2641
|
},
|
|
2325
2642
|
{
|
|
2326
2643
|
value: "dark",
|
|
2327
|
-
icon: /* @__PURE__ */
|
|
2644
|
+
icon: /* @__PURE__ */ A(_, {})
|
|
2328
2645
|
},
|
|
2329
2646
|
{
|
|
2330
2647
|
value: "system",
|
|
2331
|
-
icon: /* @__PURE__ */
|
|
2648
|
+
icon: /* @__PURE__ */ A(f, {})
|
|
2332
2649
|
}
|
|
2333
2650
|
];
|
|
2334
|
-
function
|
|
2335
|
-
return /* @__PURE__ */
|
|
2336
|
-
className:
|
|
2337
|
-
children:
|
|
2651
|
+
function $n({ user: e, theme: t = "system", onThemeChange: n, items: i, onLogout: a, children: o, side: s = "bottom", align: c = "end", className: l }) {
|
|
2652
|
+
return /* @__PURE__ */ j(Q.Root, { children: [/* @__PURE__ */ A(Q.Trigger, {
|
|
2653
|
+
className: l,
|
|
2654
|
+
children: o ?? /* @__PURE__ */ A(_t, {
|
|
2338
2655
|
initials: e.initials,
|
|
2339
2656
|
src: e.avatarUrl,
|
|
2340
2657
|
size: "sm",
|
|
2341
2658
|
className: "cursor-pointer"
|
|
2342
2659
|
})
|
|
2343
|
-
}), /* @__PURE__ */
|
|
2344
|
-
side:
|
|
2345
|
-
align:
|
|
2660
|
+
}), /* @__PURE__ */ j(Q.Content, {
|
|
2661
|
+
side: s,
|
|
2662
|
+
align: c,
|
|
2346
2663
|
sideOffset: 8,
|
|
2347
2664
|
minWidth: "min-w-[260px]",
|
|
2348
|
-
children: [
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2665
|
+
children: [
|
|
2666
|
+
/* @__PURE__ */ j("div", {
|
|
2667
|
+
className: "flex items-center gap-2 px-2 py-1.5",
|
|
2668
|
+
children: [/* @__PURE__ */ A(_t, {
|
|
2669
|
+
initials: e.initials,
|
|
2670
|
+
src: e.avatarUrl,
|
|
2671
|
+
size: "md"
|
|
2672
|
+
}), /* @__PURE__ */ j("div", {
|
|
2673
|
+
className: "flex flex-col gap-0.5",
|
|
2674
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2675
|
+
className: "text-cui-primary text-cui-base font-semibold",
|
|
2676
|
+
children: e.name
|
|
2677
|
+
}), e.org && /* @__PURE__ */ A("span", {
|
|
2678
|
+
className: "text-cui-tertiary text-cui-sm",
|
|
2679
|
+
children: e.org
|
|
2680
|
+
})]
|
|
2362
2681
|
})]
|
|
2363
|
-
})
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
/* @__PURE__ */
|
|
2368
|
-
className: "
|
|
2369
|
-
children:
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
onClick: e.onClick,
|
|
2388
|
-
children: e.label
|
|
2389
|
-
}, e.label)),
|
|
2390
|
-
i && /* @__PURE__ */ p(Q.Item, {
|
|
2391
|
-
className: "border-cui-neutral border-t",
|
|
2392
|
-
icon: /* @__PURE__ */ p(v, {}),
|
|
2393
|
-
onClick: i,
|
|
2394
|
-
children: "Log out"
|
|
2395
|
-
})
|
|
2396
|
-
]
|
|
2397
|
-
})]
|
|
2682
|
+
}),
|
|
2683
|
+
/* @__PURE__ */ A(Q.Separator, {}),
|
|
2684
|
+
/* @__PURE__ */ j("div", {
|
|
2685
|
+
className: "flex items-center justify-between px-2 py-1.5",
|
|
2686
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2687
|
+
className: "text-cui-primary text-cui-base",
|
|
2688
|
+
children: "Theme"
|
|
2689
|
+
}), /* @__PURE__ */ A(Zn, {
|
|
2690
|
+
options: Qn,
|
|
2691
|
+
value: t,
|
|
2692
|
+
onValueChange: n
|
|
2693
|
+
})]
|
|
2694
|
+
}),
|
|
2695
|
+
i && i.length > 0 && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Q.Separator, {}), i.map((e) => /* @__PURE__ */ A(Q.Item, {
|
|
2696
|
+
icon: e.icon,
|
|
2697
|
+
onClick: e.onClick,
|
|
2698
|
+
children: e.label
|
|
2699
|
+
}, e.label))] }),
|
|
2700
|
+
a && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Q.Separator, {}), /* @__PURE__ */ A(Q.Item, {
|
|
2701
|
+
icon: /* @__PURE__ */ A(r, {}),
|
|
2702
|
+
onClick: a,
|
|
2703
|
+
children: "Log out"
|
|
2704
|
+
})] })
|
|
2705
|
+
]
|
|
2398
2706
|
})] });
|
|
2399
2707
|
}
|
|
2400
2708
|
//#endregion
|
|
2401
|
-
//#region src/components/
|
|
2402
|
-
|
|
2403
|
-
return /* @__PURE__ */ p(R.Provider, { ...e });
|
|
2404
|
-
}
|
|
2405
|
-
function Fn(e) {
|
|
2406
|
-
return /* @__PURE__ */ p(R.Root, { ...e });
|
|
2407
|
-
}
|
|
2408
|
-
var In = i(function({ className: e, ...t }, n) {
|
|
2409
|
-
return /* @__PURE__ */ p(R.Trigger, {
|
|
2410
|
-
ref: n,
|
|
2411
|
-
className: W("outline-none", e),
|
|
2412
|
-
...t
|
|
2413
|
-
});
|
|
2414
|
-
});
|
|
2415
|
-
function Ln({ side: e = "top", align: t = "center", sideOffset: n = 6, className: r, children: i, ...a }) {
|
|
2416
|
-
return /* @__PURE__ */ p(R.Portal, { children: /* @__PURE__ */ p(R.Positioner, {
|
|
2417
|
-
side: e,
|
|
2418
|
-
align: t,
|
|
2419
|
-
sideOffset: n,
|
|
2420
|
-
className: W("z-50 outline-none", "h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)]", "transition-[top,left,right,bottom,transform] duration-350 ease-cui-out-expo", "data-[instant]:transition-none"),
|
|
2421
|
-
children: /* @__PURE__ */ p(R.Popup, {
|
|
2422
|
-
className: W("bg-cui-inverse text-cui-inverse rounded px-2 py-1 text-cui-sm font-medium", "max-w-[280px]", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity] duration-150 ease-cui-out-expo", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", "data-[instant]:transition-none", "motion-reduce:transition-none", r),
|
|
2423
|
-
...a,
|
|
2424
|
-
children: i
|
|
2425
|
-
})
|
|
2426
|
-
}) });
|
|
2427
|
-
}
|
|
2428
|
-
var Rn = i(function({ className: e, ...t }, n) {
|
|
2429
|
-
return /* @__PURE__ */ p(R.Viewport, {
|
|
2430
|
-
ref: n,
|
|
2431
|
-
className: W("relative h-full w-full overflow-clip", "[&_[data-previous]]:transition-[translate,opacity] [&_[data-previous]]:duration-350 [&_[data-previous]]:ease-cui-out-expo", "[&_[data-current]]:transition-[translate,opacity] [&_[data-current]]:duration-350 [&_[data-current]]:ease-cui-out-expo", "[&_[data-instant]_[data-current]]:transition-none [&_[data-instant]_[data-previous]]:transition-none", "[&[data-activation-direction*=left]_[data-current][data-starting-style]]:-translate-x-1/2 [&[data-activation-direction*=left]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=right]_[data-current][data-starting-style]]:translate-x-1/2 [&[data-activation-direction*=right]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=up]_[data-current][data-starting-style]]:-translate-y-1/2 [&[data-activation-direction*=up]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=down]_[data-current][data-starting-style]]:translate-y-1/2 [&[data-activation-direction*=down]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=left]_[data-previous][data-ending-style]]:translate-x-1/2 [&[data-activation-direction*=left]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=right]_[data-previous][data-ending-style]]:-translate-x-1/2 [&[data-activation-direction*=right]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=up]_[data-previous][data-ending-style]]:translate-y-1/2 [&[data-activation-direction*=up]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=down]_[data-previous][data-ending-style]]:-translate-y-1/2 [&[data-activation-direction*=down]_[data-previous][data-ending-style]]:opacity-0", "motion-reduce:[&_[data-current]]:!transition-none motion-reduce:[&_[data-previous]]:!transition-none", e),
|
|
2432
|
-
...t
|
|
2433
|
-
});
|
|
2434
|
-
}), zn = R.createHandle, Bn = {
|
|
2435
|
-
Provider: Pn,
|
|
2436
|
-
Root: Fn,
|
|
2437
|
-
Trigger: In,
|
|
2438
|
-
Content: Ln,
|
|
2439
|
-
Viewport: Rn,
|
|
2440
|
-
createHandle: R.createHandle
|
|
2441
|
-
}, Vn = {
|
|
2709
|
+
//#region src/components/alert/alert.tsx
|
|
2710
|
+
var er = {
|
|
2442
2711
|
accent: {
|
|
2443
2712
|
container: "bg-cui-accent-subtle",
|
|
2444
2713
|
icon: "text-cui-accent",
|
|
2445
2714
|
text: "text-cui-accent [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
|
|
2446
2715
|
pattern: "text-cui-accent",
|
|
2447
|
-
defaultIcon:
|
|
2716
|
+
defaultIcon: m
|
|
2448
2717
|
},
|
|
2449
2718
|
success: {
|
|
2450
2719
|
container: "bg-cui-success-subtle",
|
|
2451
2720
|
icon: "text-cui-success",
|
|
2452
2721
|
text: "text-cui-success [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
|
|
2453
2722
|
pattern: "text-cui-success",
|
|
2454
|
-
defaultIcon:
|
|
2723
|
+
defaultIcon: a
|
|
2455
2724
|
},
|
|
2456
2725
|
warn: {
|
|
2457
2726
|
container: "bg-cui-warn-subtle",
|
|
2458
2727
|
icon: "text-cui-warn",
|
|
2459
2728
|
text: "text-cui-warn [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
|
|
2460
2729
|
pattern: "text-cui-warn",
|
|
2461
|
-
defaultIcon:
|
|
2730
|
+
defaultIcon: p
|
|
2462
2731
|
},
|
|
2463
2732
|
danger: {
|
|
2464
2733
|
container: "bg-cui-danger-subtle",
|
|
2465
2734
|
icon: "text-cui-danger",
|
|
2466
2735
|
text: "text-cui-danger [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
|
|
2467
2736
|
pattern: "text-cui-danger",
|
|
2468
|
-
defaultIcon:
|
|
2737
|
+
defaultIcon: b
|
|
2469
2738
|
}
|
|
2470
|
-
},
|
|
2739
|
+
}, tr = {
|
|
2471
2740
|
maskImage: "linear-gradient(to left, black, transparent)",
|
|
2472
2741
|
WebkitMaskImage: "linear-gradient(to left, black, transparent)"
|
|
2473
|
-
},
|
|
2474
|
-
let c =
|
|
2475
|
-
return t === "banner" ? /* @__PURE__ */
|
|
2742
|
+
}, nr = C(function({ variant: e = "accent", layout: t = "inline", icon: n, action: r, onDismiss: i, className: a, children: o }, s) {
|
|
2743
|
+
let c = er[e], l = c.defaultIcon;
|
|
2744
|
+
return t === "banner" ? /* @__PURE__ */ j("div", {
|
|
2476
2745
|
ref: s,
|
|
2477
2746
|
role: "alert",
|
|
2478
2747
|
className: W("relative flex w-full items-center justify-center overflow-hidden px-4 py-3", c.container, a),
|
|
2479
2748
|
children: [
|
|
2480
|
-
/* @__PURE__ */
|
|
2749
|
+
/* @__PURE__ */ A("div", {
|
|
2481
2750
|
className: W("pointer-events-none absolute inset-0", c.pattern),
|
|
2482
2751
|
style: {
|
|
2483
2752
|
maskImage: "linear-gradient(to right, transparent, black 30%, black 70%, transparent)",
|
|
2484
2753
|
WebkitMaskImage: "linear-gradient(to right, transparent, black 30%, black 70%, transparent)"
|
|
2485
2754
|
},
|
|
2486
|
-
children: /* @__PURE__ */
|
|
2755
|
+
children: /* @__PURE__ */ A(un, {
|
|
2487
2756
|
squareSize: 4,
|
|
2488
2757
|
gridGap: 2,
|
|
2489
2758
|
flickerChance: .4,
|
|
2490
2759
|
maxOpacity: .15
|
|
2491
2760
|
})
|
|
2492
2761
|
}),
|
|
2493
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ j("div", {
|
|
2494
2763
|
className: "relative flex items-center gap-3",
|
|
2495
2764
|
children: [
|
|
2496
|
-
/* @__PURE__ */
|
|
2765
|
+
/* @__PURE__ */ A("span", {
|
|
2497
2766
|
className: W("flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", c.icon),
|
|
2498
|
-
children: n ?? /* @__PURE__ */
|
|
2767
|
+
children: n ?? /* @__PURE__ */ A(l, {})
|
|
2499
2768
|
}),
|
|
2500
|
-
/* @__PURE__ */
|
|
2769
|
+
/* @__PURE__ */ A("span", {
|
|
2501
2770
|
className: W("text-cui-base font-medium", c.text),
|
|
2502
2771
|
children: o
|
|
2503
2772
|
}),
|
|
2504
|
-
r && /* @__PURE__ */
|
|
2773
|
+
r && /* @__PURE__ */ A("div", {
|
|
2505
2774
|
className: "shrink-0",
|
|
2506
2775
|
children: r
|
|
2507
2776
|
})
|
|
2508
2777
|
]
|
|
2509
2778
|
}),
|
|
2510
|
-
i && /* @__PURE__ */
|
|
2779
|
+
i && /* @__PURE__ */ A("div", {
|
|
2511
2780
|
className: "absolute right-2",
|
|
2512
|
-
children: /* @__PURE__ */
|
|
2781
|
+
children: /* @__PURE__ */ A(K, {
|
|
2513
2782
|
variant: "transparent",
|
|
2514
2783
|
size: "xs",
|
|
2515
|
-
iconLeft: /* @__PURE__ */
|
|
2784
|
+
iconLeft: /* @__PURE__ */ A(x, {}),
|
|
2516
2785
|
onClick: i,
|
|
2517
2786
|
"aria-label": "Dismiss"
|
|
2518
2787
|
})
|
|
2519
2788
|
})
|
|
2520
2789
|
]
|
|
2521
|
-
}) : /* @__PURE__ */
|
|
2790
|
+
}) : /* @__PURE__ */ j("div", {
|
|
2522
2791
|
ref: s,
|
|
2523
2792
|
role: "alert",
|
|
2524
2793
|
className: W("relative flex min-h-10 items-center gap-3 overflow-hidden rounded-md py-1.5 pl-3 pr-1.5", c.container, a),
|
|
2525
2794
|
children: [
|
|
2526
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ A("div", {
|
|
2527
2796
|
className: W("pointer-events-none absolute top-0 right-0 h-full w-1/2", c.pattern),
|
|
2528
|
-
style:
|
|
2529
|
-
children: /* @__PURE__ */
|
|
2797
|
+
style: tr,
|
|
2798
|
+
children: /* @__PURE__ */ A(un, {
|
|
2530
2799
|
squareSize: 4,
|
|
2531
2800
|
gridGap: 2,
|
|
2532
2801
|
flickerChance: .4,
|
|
2533
2802
|
maxOpacity: .2
|
|
2534
2803
|
})
|
|
2535
2804
|
}),
|
|
2536
|
-
/* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ A("span", {
|
|
2537
2806
|
className: W("relative flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", c.icon),
|
|
2538
|
-
children: n ?? /* @__PURE__ */
|
|
2807
|
+
children: n ?? /* @__PURE__ */ A(l, {})
|
|
2539
2808
|
}),
|
|
2540
|
-
/* @__PURE__ */
|
|
2809
|
+
/* @__PURE__ */ A("span", {
|
|
2541
2810
|
className: W("relative flex-1 text-cui-base font-medium", c.text),
|
|
2542
2811
|
children: o
|
|
2543
2812
|
}),
|
|
2544
|
-
r && /* @__PURE__ */
|
|
2813
|
+
r && /* @__PURE__ */ A("div", {
|
|
2545
2814
|
className: "relative ml-auto shrink-0",
|
|
2546
2815
|
children: r
|
|
2547
2816
|
}),
|
|
2548
|
-
i && /* @__PURE__ */
|
|
2817
|
+
i && /* @__PURE__ */ A("div", {
|
|
2549
2818
|
className: "relative ml-auto shrink-0",
|
|
2550
|
-
children: /* @__PURE__ */
|
|
2819
|
+
children: /* @__PURE__ */ A(K, {
|
|
2551
2820
|
variant: "transparent",
|
|
2552
2821
|
size: "xs",
|
|
2553
|
-
iconLeft: /* @__PURE__ */
|
|
2822
|
+
iconLeft: /* @__PURE__ */ A(x, {}),
|
|
2554
2823
|
onClick: i,
|
|
2555
2824
|
"aria-label": "Dismiss"
|
|
2556
2825
|
})
|
|
@@ -2560,361 +2829,361 @@ var Rn = i(function({ className: e, ...t }, n) {
|
|
|
2560
2829
|
});
|
|
2561
2830
|
//#endregion
|
|
2562
2831
|
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
2563
|
-
function
|
|
2564
|
-
return /* @__PURE__ */
|
|
2832
|
+
function rr(e) {
|
|
2833
|
+
return /* @__PURE__ */ A(V.Root, { ...e });
|
|
2565
2834
|
}
|
|
2566
|
-
var
|
|
2567
|
-
return /* @__PURE__ */
|
|
2835
|
+
var ir = C(function({ className: e, ...t }, n) {
|
|
2836
|
+
return /* @__PURE__ */ A(V.Trigger, {
|
|
2568
2837
|
ref: n,
|
|
2569
2838
|
className: W(e),
|
|
2570
2839
|
...t
|
|
2571
2840
|
});
|
|
2572
|
-
}),
|
|
2573
|
-
return /* @__PURE__ */
|
|
2841
|
+
}), ar = C(function({ className: e, ...t }, n) {
|
|
2842
|
+
return /* @__PURE__ */ A(V.Backdrop, {
|
|
2574
2843
|
ref: n,
|
|
2575
2844
|
className: W("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-150", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none", e),
|
|
2576
2845
|
...t
|
|
2577
2846
|
});
|
|
2578
2847
|
});
|
|
2579
|
-
function
|
|
2580
|
-
return /* @__PURE__ */
|
|
2848
|
+
function or({ className: e, children: t, ...n }) {
|
|
2849
|
+
return /* @__PURE__ */ j(V.Portal, { children: [/* @__PURE__ */ A(ar, {}), /* @__PURE__ */ A(V.Popup, {
|
|
2581
2850
|
className: W("bg-cui-base-1 fixed top-1/2 left-1/2 z-50 max-h-[85vh] w-[90vw] max-w-[450px] -translate-x-1/2 -translate-y-1/2 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none", e),
|
|
2582
2851
|
...n,
|
|
2583
2852
|
children: t
|
|
2584
2853
|
})] });
|
|
2585
2854
|
}
|
|
2586
|
-
var
|
|
2587
|
-
Root:
|
|
2588
|
-
Trigger:
|
|
2589
|
-
Content:
|
|
2590
|
-
Panel:
|
|
2591
|
-
return /* @__PURE__ */
|
|
2855
|
+
var sr = {
|
|
2856
|
+
Root: rr,
|
|
2857
|
+
Trigger: ir,
|
|
2858
|
+
Content: or,
|
|
2859
|
+
Panel: C(function({ className: e, children: t }, n) {
|
|
2860
|
+
return /* @__PURE__ */ A("div", {
|
|
2592
2861
|
ref: n,
|
|
2593
2862
|
className: W("bg-cui-base-2 border-cui-neutral rounded-md border", e),
|
|
2594
2863
|
children: t
|
|
2595
2864
|
});
|
|
2596
2865
|
}),
|
|
2597
|
-
Title:
|
|
2598
|
-
return /* @__PURE__ */
|
|
2866
|
+
Title: C(function({ className: e, ...t }, n) {
|
|
2867
|
+
return /* @__PURE__ */ A(V.Title, {
|
|
2599
2868
|
ref: n,
|
|
2600
2869
|
className: W("text-cui-primary border-cui-neutral border-b px-4 py-3 text-cui-base font-medium", e),
|
|
2601
2870
|
...t
|
|
2602
2871
|
});
|
|
2603
2872
|
}),
|
|
2604
|
-
Description:
|
|
2605
|
-
return /* @__PURE__ */
|
|
2873
|
+
Description: C(function({ className: e, ...t }, n) {
|
|
2874
|
+
return /* @__PURE__ */ A(V.Description, {
|
|
2606
2875
|
ref: n,
|
|
2607
2876
|
className: W("text-cui-secondary p-4 text-cui-base", e),
|
|
2608
2877
|
...t
|
|
2609
2878
|
});
|
|
2610
2879
|
}),
|
|
2611
|
-
Actions:
|
|
2612
|
-
return /* @__PURE__ */
|
|
2880
|
+
Actions: C(function({ className: e, children: t }, n) {
|
|
2881
|
+
return /* @__PURE__ */ A("div", {
|
|
2613
2882
|
ref: n,
|
|
2614
2883
|
className: W("flex items-center justify-end gap-2 p-2", e),
|
|
2615
2884
|
children: t
|
|
2616
2885
|
});
|
|
2617
2886
|
}),
|
|
2618
|
-
Close:
|
|
2619
|
-
return /* @__PURE__ */
|
|
2887
|
+
Close: C(function({ className: e, ...t }, n) {
|
|
2888
|
+
return /* @__PURE__ */ A(V.Close, {
|
|
2620
2889
|
ref: n,
|
|
2621
2890
|
className: W(e),
|
|
2622
2891
|
...t
|
|
2623
2892
|
});
|
|
2624
2893
|
})
|
|
2625
|
-
},
|
|
2626
|
-
Root:
|
|
2627
|
-
return /* @__PURE__ */
|
|
2894
|
+
}, cr = {
|
|
2895
|
+
Root: C(function({ className: e, ...t }, n) {
|
|
2896
|
+
return /* @__PURE__ */ A(fe.Root, {
|
|
2628
2897
|
ref: n,
|
|
2629
2898
|
className: W("flex flex-col", e),
|
|
2630
2899
|
...t
|
|
2631
2900
|
});
|
|
2632
2901
|
}),
|
|
2633
|
-
Item:
|
|
2634
|
-
return /* @__PURE__ */
|
|
2902
|
+
Item: C(function({ className: e, ...t }, n) {
|
|
2903
|
+
return /* @__PURE__ */ A(fe.Item, {
|
|
2635
2904
|
ref: n,
|
|
2636
2905
|
className: W("border-cui-neutral border-b last:border-b-0", e),
|
|
2637
2906
|
...t
|
|
2638
2907
|
});
|
|
2639
2908
|
}),
|
|
2640
|
-
Trigger:
|
|
2641
|
-
return /* @__PURE__ */
|
|
2909
|
+
Trigger: C(function({ icon: e, className: t, children: n, ...r }, i) {
|
|
2910
|
+
return /* @__PURE__ */ j(fe.Trigger, {
|
|
2642
2911
|
ref: i,
|
|
2643
2912
|
className: W("group flex w-full cursor-pointer items-center gap-2 rounded-sm py-3 text-cui-base font-medium", "text-cui-primary hover:text-cui-primary", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", t),
|
|
2644
2913
|
...r,
|
|
2645
2914
|
children: [
|
|
2646
|
-
/* @__PURE__ */
|
|
2647
|
-
e && /* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ A(l, { className: W("text-cui-tertiary size-4 shrink-0", "transition-transform duration-200 ease-cui-out-expo", "group-data-[panel-open]:rotate-90", "motion-reduce:transition-none") }),
|
|
2916
|
+
e && /* @__PURE__ */ A("span", {
|
|
2648
2917
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2649
2918
|
children: e
|
|
2650
2919
|
}),
|
|
2651
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ A("span", {
|
|
2652
2921
|
className: "flex-1 text-left",
|
|
2653
2922
|
children: n
|
|
2654
2923
|
})
|
|
2655
2924
|
]
|
|
2656
2925
|
});
|
|
2657
2926
|
}),
|
|
2658
|
-
Content:
|
|
2659
|
-
return /* @__PURE__ */
|
|
2927
|
+
Content: C(function({ className: e, children: t, ...n }, r) {
|
|
2928
|
+
return /* @__PURE__ */ A(fe.Panel, {
|
|
2660
2929
|
ref: r,
|
|
2661
2930
|
className: W("overflow-hidden", "h-[var(--accordion-panel-height)]", "transition-[height] duration-200 ease-cui-out-expo", "data-[starting-style]:h-0", "data-[ending-style]:h-0", "motion-reduce:transition-none", e),
|
|
2662
2931
|
...n,
|
|
2663
|
-
children: /* @__PURE__ */
|
|
2932
|
+
children: /* @__PURE__ */ A("div", {
|
|
2664
2933
|
className: "text-cui-secondary text-cui-base pb-3",
|
|
2665
2934
|
children: t
|
|
2666
2935
|
})
|
|
2667
2936
|
});
|
|
2668
2937
|
})
|
|
2669
|
-
},
|
|
2670
|
-
return /* @__PURE__ */
|
|
2938
|
+
}, lr = C(function({ className: e, ...t }, n) {
|
|
2939
|
+
return /* @__PURE__ */ A(pe.Root, {
|
|
2671
2940
|
ref: n,
|
|
2672
2941
|
className: W("flex flex-col", e),
|
|
2673
2942
|
...t
|
|
2674
2943
|
});
|
|
2675
|
-
}),
|
|
2676
|
-
let
|
|
2677
|
-
let e =
|
|
2944
|
+
}), ur = C(function({ className: e, layout: t = "fit", children: n, ...r }, i) {
|
|
2945
|
+
let a = D(null), [o, s] = O(0), [c, l] = O(0), u = w(() => {
|
|
2946
|
+
let e = a.current;
|
|
2678
2947
|
if (!e) return;
|
|
2679
2948
|
let t = e.querySelectorAll("[role='tab']");
|
|
2680
|
-
|
|
2949
|
+
s(t.length);
|
|
2681
2950
|
let n = -1;
|
|
2682
2951
|
t.forEach((e, t) => {
|
|
2683
2952
|
(e.getAttribute("data-active") !== null || e.getAttribute("aria-selected") === "true") && (n = t);
|
|
2684
|
-
}), n < 0 && (n = 0),
|
|
2953
|
+
}), n < 0 && (n = 0), l(n);
|
|
2685
2954
|
}, []);
|
|
2686
|
-
return
|
|
2687
|
-
|
|
2688
|
-
let e =
|
|
2955
|
+
return T(() => {
|
|
2956
|
+
u();
|
|
2957
|
+
let e = a.current;
|
|
2689
2958
|
if (!e) return;
|
|
2690
|
-
let t = new MutationObserver(
|
|
2959
|
+
let t = new MutationObserver(u);
|
|
2691
2960
|
t.observe(e, {
|
|
2692
2961
|
attributes: !0,
|
|
2693
2962
|
attributeFilter: ["data-active", "aria-selected"],
|
|
2694
2963
|
subtree: !0
|
|
2695
2964
|
});
|
|
2696
|
-
let n = new ResizeObserver(
|
|
2965
|
+
let n = new ResizeObserver(u);
|
|
2697
2966
|
return n.observe(e), () => {
|
|
2698
2967
|
t.disconnect(), n.disconnect();
|
|
2699
2968
|
};
|
|
2700
|
-
}, [
|
|
2969
|
+
}, [u]), /* @__PURE__ */ A(Jn, {
|
|
2701
2970
|
ref: (e) => {
|
|
2702
|
-
|
|
2971
|
+
a.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
2703
2972
|
},
|
|
2704
|
-
activeIndex:
|
|
2705
|
-
itemCount:
|
|
2973
|
+
activeIndex: c,
|
|
2974
|
+
itemCount: o,
|
|
2706
2975
|
layout: t,
|
|
2707
2976
|
className: typeof e == "string" ? e : void 0,
|
|
2708
|
-
children: /* @__PURE__ */
|
|
2977
|
+
children: /* @__PURE__ */ A(pe.List, {
|
|
2709
2978
|
className: "contents",
|
|
2710
2979
|
...r,
|
|
2711
2980
|
children: n
|
|
2712
2981
|
})
|
|
2713
2982
|
});
|
|
2714
|
-
}),
|
|
2983
|
+
}), dr = {
|
|
2715
2984
|
sm: "h-7 px-2.5",
|
|
2716
2985
|
md: "h-8 px-3"
|
|
2717
|
-
},
|
|
2718
|
-
Root:
|
|
2719
|
-
List:
|
|
2720
|
-
Tab:
|
|
2721
|
-
return /* @__PURE__ */
|
|
2986
|
+
}, fr = {
|
|
2987
|
+
Root: lr,
|
|
2988
|
+
List: ur,
|
|
2989
|
+
Tab: C(function({ size: e = "sm", className: t, children: n, ...r }, i) {
|
|
2990
|
+
return /* @__PURE__ */ A(pe.Tab, {
|
|
2722
2991
|
ref: i,
|
|
2723
2992
|
"data-segmented-item": "",
|
|
2724
|
-
className: W("relative z-10 flex items-center justify-center gap-1.5 rounded-sm",
|
|
2993
|
+
className: W("relative z-10 flex items-center justify-center gap-1.5 rounded-sm", dr[e], "text-cui-base font-medium select-none cursor-pointer", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150", "motion-reduce:transition-none", "text-cui-tertiary hover:text-cui-secondary", "data-[active]:text-cui-primary", t),
|
|
2725
2994
|
...r,
|
|
2726
2995
|
children: n
|
|
2727
2996
|
});
|
|
2728
2997
|
}),
|
|
2729
|
-
Panel:
|
|
2730
|
-
return /* @__PURE__ */
|
|
2998
|
+
Panel: C(function({ className: e, ...t }, n) {
|
|
2999
|
+
return /* @__PURE__ */ A(pe.Panel, {
|
|
2731
3000
|
ref: n,
|
|
2732
3001
|
className: W("rounded-sm pt-3 outline-none", "focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", e),
|
|
2733
3002
|
...t
|
|
2734
3003
|
});
|
|
2735
3004
|
})
|
|
2736
|
-
},
|
|
3005
|
+
}, pr = {
|
|
2737
3006
|
right: "right",
|
|
2738
3007
|
left: "left",
|
|
2739
3008
|
bottom: "down",
|
|
2740
3009
|
top: "up"
|
|
2741
|
-
},
|
|
3010
|
+
}, mr = {
|
|
2742
3011
|
right: "inset-y-0 right-0 w-[min(420px,90vw)] p-2",
|
|
2743
3012
|
left: "inset-y-0 left-0 w-[min(420px,90vw)] p-2",
|
|
2744
3013
|
bottom: "inset-x-0 bottom-0 max-h-[85vh] p-2",
|
|
2745
3014
|
top: "inset-x-0 top-0 max-h-[85vh] p-2"
|
|
2746
3015
|
};
|
|
2747
|
-
function
|
|
2748
|
-
return /* @__PURE__ */
|
|
2749
|
-
swipeDirection:
|
|
3016
|
+
function hr({ side: e = "right", responsive: t, children: n, ...r }) {
|
|
3017
|
+
return /* @__PURE__ */ A(H.Root, {
|
|
3018
|
+
swipeDirection: pr[e],
|
|
2750
3019
|
...r,
|
|
2751
3020
|
children: n
|
|
2752
3021
|
});
|
|
2753
3022
|
}
|
|
2754
|
-
var
|
|
2755
|
-
return /* @__PURE__ */
|
|
3023
|
+
var gr = C(function({ className: e, ...t }, n) {
|
|
3024
|
+
return /* @__PURE__ */ A(H.Trigger, {
|
|
2756
3025
|
ref: n,
|
|
2757
3026
|
className: W(e),
|
|
2758
3027
|
...t
|
|
2759
3028
|
});
|
|
2760
|
-
}),
|
|
2761
|
-
return /* @__PURE__ */
|
|
3029
|
+
}), _r = C(function({ className: e, ...t }, n) {
|
|
3030
|
+
return /* @__PURE__ */ A(H.Backdrop, {
|
|
2762
3031
|
ref: n,
|
|
2763
3032
|
className: W("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-200", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none", e),
|
|
2764
3033
|
...t
|
|
2765
3034
|
});
|
|
2766
3035
|
});
|
|
2767
|
-
function
|
|
2768
|
-
return /* @__PURE__ */
|
|
2769
|
-
className: W("group/drawer fixed z-50 flex outline-none",
|
|
3036
|
+
function vr({ side: e = "right", responsive: t = !0, className: n, children: r, ...i }) {
|
|
3037
|
+
return /* @__PURE__ */ j(H.Portal, { children: [/* @__PURE__ */ A(_r, {}), /* @__PURE__ */ A(H.Popup, {
|
|
3038
|
+
className: W("group/drawer fixed z-50 flex outline-none", mr[e], "transition-transform duration-500 ease-cui-out-expo", e === "right" && ["data-[starting-style]:translate-x-[20%]", "data-[ending-style]:translate-x-[20%]"], e === "left" && ["data-[starting-style]:-translate-x-[20%]", "data-[ending-style]:-translate-x-[20%]"], e === "bottom" && ["data-[starting-style]:translate-y-[20%]", "data-[ending-style]:translate-y-[20%]"], e === "top" && ["data-[starting-style]:-translate-y-[20%]", "data-[ending-style]:-translate-y-[20%]"], "motion-reduce:transition-none", t && [
|
|
2770
3039
|
"max-md:inset-x-0 max-md:inset-y-auto max-md:bottom-0 max-md:right-auto max-md:left-auto",
|
|
2771
3040
|
"max-md:w-full max-md:max-h-[85vh]",
|
|
2772
3041
|
"max-md:data-[starting-style]:translate-x-0 max-md:data-[starting-style]:translate-y-[20%]",
|
|
2773
3042
|
"max-md:data-[ending-style]:translate-x-0 max-md:data-[ending-style]:translate-y-[20%]"
|
|
2774
3043
|
]),
|
|
2775
3044
|
...i,
|
|
2776
|
-
children: /* @__PURE__ */
|
|
3045
|
+
children: /* @__PURE__ */ A("div", {
|
|
2777
3046
|
className: W("bg-cui-base-1 flex min-h-0 flex-1 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-500 ease-cui-out-expo", "group-data-[starting-style]/drawer:scale-95 group-data-[starting-style]/drawer:opacity-0", "group-data-[ending-style]/drawer:scale-95 group-data-[ending-style]/drawer:opacity-0", "motion-reduce:transition-none", n),
|
|
2778
|
-
children: /* @__PURE__ */
|
|
3047
|
+
children: /* @__PURE__ */ A("div", {
|
|
2779
3048
|
className: "bg-cui-base-2 border-cui-neutral flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border",
|
|
2780
3049
|
children: r
|
|
2781
3050
|
})
|
|
2782
3051
|
})
|
|
2783
3052
|
})] });
|
|
2784
3053
|
}
|
|
2785
|
-
var
|
|
2786
|
-
Root:
|
|
2787
|
-
Trigger:
|
|
2788
|
-
Content:
|
|
2789
|
-
Header:
|
|
2790
|
-
return /* @__PURE__ */
|
|
3054
|
+
var yr = {
|
|
3055
|
+
Root: hr,
|
|
3056
|
+
Trigger: gr,
|
|
3057
|
+
Content: vr,
|
|
3058
|
+
Header: C(function({ className: e, children: t }, n) {
|
|
3059
|
+
return /* @__PURE__ */ A("div", {
|
|
2791
3060
|
ref: n,
|
|
2792
3061
|
className: W("border-cui-neutral flex items-center justify-between border-b px-4 py-3", e),
|
|
2793
3062
|
children: t
|
|
2794
3063
|
});
|
|
2795
3064
|
}),
|
|
2796
|
-
Title:
|
|
2797
|
-
return /* @__PURE__ */
|
|
3065
|
+
Title: C(function({ className: e, ...t }, n) {
|
|
3066
|
+
return /* @__PURE__ */ A(H.Title, {
|
|
2798
3067
|
ref: n,
|
|
2799
3068
|
className: W("text-cui-primary text-cui-base font-medium", e),
|
|
2800
3069
|
...t
|
|
2801
3070
|
});
|
|
2802
3071
|
}),
|
|
2803
|
-
Description:
|
|
2804
|
-
return /* @__PURE__ */
|
|
3072
|
+
Description: C(function({ className: e, ...t }, n) {
|
|
3073
|
+
return /* @__PURE__ */ A(H.Description, {
|
|
2805
3074
|
ref: n,
|
|
2806
3075
|
className: W("text-cui-secondary text-cui-base", e),
|
|
2807
3076
|
...t
|
|
2808
3077
|
});
|
|
2809
3078
|
}),
|
|
2810
|
-
Body:
|
|
2811
|
-
return /* @__PURE__ */
|
|
3079
|
+
Body: C(function({ className: e, children: t }, n) {
|
|
3080
|
+
return /* @__PURE__ */ A("div", {
|
|
2812
3081
|
ref: n,
|
|
2813
3082
|
className: W("flex-1 overflow-y-auto p-4", e),
|
|
2814
3083
|
children: t
|
|
2815
3084
|
});
|
|
2816
3085
|
}),
|
|
2817
|
-
Footer:
|
|
2818
|
-
return /* @__PURE__ */
|
|
3086
|
+
Footer: C(function({ className: e, children: t }, n) {
|
|
3087
|
+
return /* @__PURE__ */ A("div", {
|
|
2819
3088
|
ref: n,
|
|
2820
3089
|
className: W("border-cui-neutral flex items-center justify-end gap-2 border-t p-3", e),
|
|
2821
3090
|
children: t
|
|
2822
3091
|
});
|
|
2823
3092
|
}),
|
|
2824
|
-
Close:
|
|
2825
|
-
return e ?? !n ? /* @__PURE__ */
|
|
3093
|
+
Close: C(function({ asIcon: e, className: t, children: n, ...r }, i) {
|
|
3094
|
+
return e ?? !n ? /* @__PURE__ */ A(H.Close, {
|
|
2826
3095
|
ref: i,
|
|
2827
3096
|
className: W("text-cui-tertiary hover:text-cui-primary -m-1 flex size-7 cursor-pointer items-center justify-center rounded-sm outline-none", "transition-colors duration-150", "focus-visible:ring-2 focus-visible:ring-cui-focus", "motion-reduce:transition-none", t),
|
|
2828
3097
|
...r,
|
|
2829
|
-
children: /* @__PURE__ */
|
|
2830
|
-
}) : /* @__PURE__ */
|
|
3098
|
+
children: /* @__PURE__ */ A(x, { className: "size-4" })
|
|
3099
|
+
}) : /* @__PURE__ */ A(H.Close, {
|
|
2831
3100
|
ref: i,
|
|
2832
3101
|
className: W(t),
|
|
2833
3102
|
...r,
|
|
2834
3103
|
children: n
|
|
2835
3104
|
});
|
|
2836
3105
|
})
|
|
2837
|
-
},
|
|
2838
|
-
return /* @__PURE__ */
|
|
3106
|
+
}, br = C(function({ className: e, ...t }, n) {
|
|
3107
|
+
return /* @__PURE__ */ A(U, {
|
|
2839
3108
|
ref: n,
|
|
2840
3109
|
className: W("bg-cui-base-2 flex h-full w-full flex-col overflow-hidden rounded-lg", e),
|
|
2841
3110
|
...t
|
|
2842
3111
|
});
|
|
2843
|
-
}),
|
|
2844
|
-
return /* @__PURE__ */
|
|
3112
|
+
}), xr = C(function({ className: e, ...t }, n) {
|
|
3113
|
+
return /* @__PURE__ */ A(q.SearchInput, {
|
|
2845
3114
|
className: "mb-0 bg-transparent px-2",
|
|
2846
|
-
children: /* @__PURE__ */
|
|
3115
|
+
children: /* @__PURE__ */ A(U.Input, {
|
|
2847
3116
|
ref: n,
|
|
2848
3117
|
className: W("text-cui-primary placeholder:text-cui-tertiary flex-1 bg-transparent py-1.5 text-cui-base outline-none", e),
|
|
2849
3118
|
...t
|
|
2850
3119
|
})
|
|
2851
3120
|
});
|
|
2852
|
-
}),
|
|
2853
|
-
return /* @__PURE__ */
|
|
3121
|
+
}), Sr = C(function({ className: e, ...t }, n) {
|
|
3122
|
+
return /* @__PURE__ */ A(U.List, {
|
|
2854
3123
|
ref: n,
|
|
2855
3124
|
className: W("max-h-[300px] overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
|
|
2856
3125
|
...t
|
|
2857
3126
|
});
|
|
2858
|
-
}),
|
|
2859
|
-
return /* @__PURE__ */
|
|
3127
|
+
}), Cr = C(function({ className: e, ...t }, n) {
|
|
3128
|
+
return /* @__PURE__ */ A(U.Empty, {
|
|
2860
3129
|
ref: n,
|
|
2861
3130
|
className: W("text-cui-secondary px-2 py-4 text-center text-cui-base", e),
|
|
2862
3131
|
...t
|
|
2863
3132
|
});
|
|
2864
|
-
}),
|
|
2865
|
-
return /* @__PURE__ */
|
|
3133
|
+
}), wr = C(function({ className: e, ...t }, n) {
|
|
3134
|
+
return /* @__PURE__ */ A(U.Group, {
|
|
2866
3135
|
ref: n,
|
|
2867
3136
|
className: W("flex flex-col gap-0.5", "[&_[cmdk-group-heading]]:text-cui-tertiary [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:select-none", e),
|
|
2868
3137
|
...t
|
|
2869
3138
|
});
|
|
2870
|
-
}),
|
|
2871
|
-
return /* @__PURE__ */
|
|
3139
|
+
}), Tr = C(function({ icon: e, shortcut: t, className: n, children: r, ...i }, a) {
|
|
3140
|
+
return /* @__PURE__ */ j(U.Item, {
|
|
2872
3141
|
ref: a,
|
|
2873
3142
|
className: W("group relative flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-cui-base select-none outline-none", "text-cui-primary", "data-[disabled=true]:pointer-events-none data-[disabled=true]:text-cui-tertiary", n),
|
|
2874
3143
|
...i,
|
|
2875
3144
|
children: [
|
|
2876
|
-
/* @__PURE__ */
|
|
2877
|
-
e && /* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ A("div", { className: W("absolute inset-0 rounded-[inherit] bg-cui-subtle opacity-0", "group-data-[selected=true]:opacity-100", "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none", "group-active:inset-px") }),
|
|
3146
|
+
e && /* @__PURE__ */ A("span", {
|
|
2878
3147
|
className: W("relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", "text-cui-tertiary group-data-[selected=true]:text-cui-primary"),
|
|
2879
3148
|
children: e
|
|
2880
3149
|
}),
|
|
2881
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ A("span", {
|
|
2882
3151
|
className: "relative z-[1] flex-1",
|
|
2883
3152
|
children: r
|
|
2884
3153
|
}),
|
|
2885
|
-
t && /* @__PURE__ */
|
|
3154
|
+
t && /* @__PURE__ */ A("kbd", {
|
|
2886
3155
|
className: "text-cui-tertiary text-cui-sm pointer-events-none relative z-[1] ml-auto tracking-widest",
|
|
2887
3156
|
children: t
|
|
2888
3157
|
})
|
|
2889
3158
|
]
|
|
2890
3159
|
});
|
|
2891
|
-
}),
|
|
2892
|
-
return /* @__PURE__ */
|
|
3160
|
+
}), Er = C(function({ className: e, ...t }, n) {
|
|
3161
|
+
return /* @__PURE__ */ A(U.Separator, {
|
|
2893
3162
|
ref: n,
|
|
2894
3163
|
className: W("border-cui-neutral mx-2 my-1 border-t", e),
|
|
2895
3164
|
...t
|
|
2896
3165
|
});
|
|
2897
3166
|
});
|
|
2898
|
-
function
|
|
2899
|
-
return /* @__PURE__ */
|
|
3167
|
+
function Dr({ open: e, onOpenChange: t, children: n, className: r }) {
|
|
3168
|
+
return /* @__PURE__ */ A(z.Root, {
|
|
2900
3169
|
open: e,
|
|
2901
3170
|
onOpenChange: t,
|
|
2902
|
-
children: /* @__PURE__ */
|
|
3171
|
+
children: /* @__PURE__ */ j(z.Portal, { children: [/* @__PURE__ */ A(z.Backdrop, { className: W("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-150", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none") }), /* @__PURE__ */ A(z.Popup, {
|
|
2903
3172
|
className: W("bg-cui-base-1 fixed top-[20%] left-1/2 z-50 w-[90vw] max-w-[520px] -translate-x-1/2 rounded-lg p-1 shadow-lg", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none", r),
|
|
2904
3173
|
children: n
|
|
2905
3174
|
})] })
|
|
2906
3175
|
});
|
|
2907
3176
|
}
|
|
2908
|
-
var
|
|
2909
|
-
Root:
|
|
2910
|
-
Input:
|
|
2911
|
-
List:
|
|
2912
|
-
Empty:
|
|
2913
|
-
Group:
|
|
2914
|
-
Item:
|
|
2915
|
-
Separator:
|
|
2916
|
-
Dialog:
|
|
2917
|
-
},
|
|
3177
|
+
var Or = {
|
|
3178
|
+
Root: br,
|
|
3179
|
+
Input: xr,
|
|
3180
|
+
List: Sr,
|
|
3181
|
+
Empty: Cr,
|
|
3182
|
+
Group: wr,
|
|
3183
|
+
Item: Tr,
|
|
3184
|
+
Separator: Er,
|
|
3185
|
+
Dialog: Dr
|
|
3186
|
+
}, kr = {
|
|
2918
3187
|
xs: {
|
|
2919
3188
|
height: "h-6",
|
|
2920
3189
|
padding: "px-1.5",
|
|
@@ -2933,53 +3202,53 @@ var hr = {
|
|
|
2933
3202
|
textPadding: "px-1",
|
|
2934
3203
|
icon: "w-8"
|
|
2935
3204
|
}
|
|
2936
|
-
},
|
|
2937
|
-
let c =
|
|
2938
|
-
return /* @__PURE__ */
|
|
3205
|
+
}, Ar = C(function({ size: e = "md", iconLeft: t, iconRight: n, disabled: r, className: i, children: a, ...o }, s) {
|
|
3206
|
+
let c = kr[e];
|
|
3207
|
+
return /* @__PURE__ */ j(me, {
|
|
2939
3208
|
ref: s,
|
|
2940
3209
|
disabled: r,
|
|
2941
|
-
className: W("group/toggle-btn relative inline-flex cursor-pointer items-center justify-center", "rounded text-cui-base whitespace-pre select-none", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "text-cui-secondary", "data-[pressed]:text-cui-primary
|
|
3210
|
+
className: W("group/toggle-btn relative inline-flex cursor-pointer items-center justify-center", "rounded text-cui-base whitespace-pre select-none", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "text-cui-secondary", "data-[pressed]:text-cui-primary", r && "pointer-events-none opacity-50", !a && !n ? W(c.height, c.icon) : W(c.height, c.padding, "w-fit"), i),
|
|
2942
3211
|
...o,
|
|
2943
3212
|
children: [
|
|
2944
|
-
/* @__PURE__ */
|
|
2945
|
-
"transition-[inset,opacity] duration-150 ease-cui-out-expo motion-reduce:transition-none",
|
|
2946
|
-
"group-hover/toggle-btn:
|
|
3213
|
+
/* @__PURE__ */ A("div", { className: W("absolute rounded-[inherit] inset-0 opacity-100", "bg-cui-base-2 border border-cui-neutral shadow-xs", "group-data-[pressed]/toggle-btn:bg-cui-subtle group-data-[pressed]/toggle-btn:border-cui-neutral", !r && [
|
|
3214
|
+
"transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none",
|
|
3215
|
+
"group-hover/toggle-btn:bg-cui-subtle",
|
|
2947
3216
|
"group-active/toggle-btn:inset-px"
|
|
2948
3217
|
]) }),
|
|
2949
|
-
t && /* @__PURE__ */
|
|
3218
|
+
t && /* @__PURE__ */ A("span", {
|
|
2950
3219
|
className: "relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2951
3220
|
children: t
|
|
2952
3221
|
}),
|
|
2953
|
-
a && /* @__PURE__ */
|
|
3222
|
+
a && /* @__PURE__ */ A("span", {
|
|
2954
3223
|
className: W("relative z-[1] inline", c.textPadding),
|
|
2955
3224
|
children: a
|
|
2956
3225
|
}),
|
|
2957
|
-
n && /* @__PURE__ */
|
|
3226
|
+
n && /* @__PURE__ */ A("span", {
|
|
2958
3227
|
className: "relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2959
3228
|
children: n
|
|
2960
3229
|
})
|
|
2961
3230
|
]
|
|
2962
3231
|
});
|
|
2963
|
-
}),
|
|
2964
|
-
return /* @__PURE__ */
|
|
3232
|
+
}), jr = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
3233
|
+
return /* @__PURE__ */ A("div", {
|
|
2965
3234
|
ref: r,
|
|
2966
3235
|
role: "group",
|
|
2967
3236
|
className: W("inline-flex", e === "vertical" ? "flex-col" : "flex-row", e === "horizontal" ? ["[&>*]:rounded-none [&>*:first-child]:rounded-l [&>*:last-child]:rounded-r", "[&>*+*]:-ml-px"] : ["[&>*]:rounded-none [&>*:first-child]:rounded-t [&>*:last-child]:rounded-b", "[&>*+*]:-mt-px"], t),
|
|
2968
3237
|
...n
|
|
2969
3238
|
});
|
|
2970
|
-
}),
|
|
2971
|
-
return /* @__PURE__ */
|
|
3239
|
+
}), Mr = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
3240
|
+
return /* @__PURE__ */ A(he, {
|
|
2972
3241
|
ref: r,
|
|
2973
3242
|
className: W("inline-flex", e === "vertical" ? "flex-col" : "flex-row", e === "horizontal" ? ["[&>*]:rounded-none [&>*:first-child]:rounded-l [&>*:last-child]:rounded-r", "[&>*+*]:-ml-px"] : ["[&>*]:rounded-none [&>*:first-child]:rounded-t [&>*:last-child]:rounded-b", "[&>*+*]:-mt-px"], t),
|
|
2974
3243
|
...n
|
|
2975
3244
|
});
|
|
2976
|
-
}),
|
|
2977
|
-
return /* @__PURE__ */
|
|
2978
|
-
ref:
|
|
2979
|
-
className: W("flex flex-
|
|
2980
|
-
...
|
|
3245
|
+
}), Nr = C(function({ orientation: e = "vertical", className: t, ...n }, r) {
|
|
3246
|
+
return /* @__PURE__ */ A(ge, {
|
|
3247
|
+
ref: r,
|
|
3248
|
+
className: W("flex gap-2", e === "horizontal" ? "flex-row items-center" : "flex-col", t),
|
|
3249
|
+
...n
|
|
2981
3250
|
});
|
|
2982
|
-
}),
|
|
3251
|
+
}), Pr = {
|
|
2983
3252
|
sm: {
|
|
2984
3253
|
radio: "size-4",
|
|
2985
3254
|
indicator: "size-1.5",
|
|
@@ -2990,42 +3259,71 @@ var hr = {
|
|
|
2990
3259
|
indicator: "size-2",
|
|
2991
3260
|
label: "text-cui-base"
|
|
2992
3261
|
}
|
|
2993
|
-
},
|
|
2994
|
-
Root
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
className: W("
|
|
3005
|
-
children:
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3262
|
+
}, Fr = C(function({ size: e = "md", label: t, className: n, value: r, ...i }, a) {
|
|
3263
|
+
let o = Pr[e], s = /* @__PURE__ */ A(_e.Root, {
|
|
3264
|
+
ref: a,
|
|
3265
|
+
value: r,
|
|
3266
|
+
className: W("group/radio relative inline-flex shrink-0 items-center justify-center rounded-full", "border border-cui-neutral bg-cui-base-2", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "transition-colors duration-150 ease-out", "motion-reduce:transition-none", "cursor-pointer", "data-[checked]:border-cui-accent data-[checked]:bg-cui-accent", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "before:absolute before:inset-1/2 before:size-8 before:-translate-1/2", o.radio, !t && n),
|
|
3267
|
+
...i,
|
|
3268
|
+
children: /* @__PURE__ */ A(_e.Indicator, { className: W("rounded-full bg-cui-accent-on", "scale-100 opacity-100", "data-[unchecked]:scale-0 data-[unchecked]:opacity-0", "data-[starting-style]:scale-0 data-[starting-style]:opacity-0", "data-[ending-style]:scale-0 data-[ending-style]:opacity-0", "transition-[scale,opacity] duration-150 ease-cui-out-expo", "motion-reduce:transition-none", o.indicator) })
|
|
3269
|
+
});
|
|
3270
|
+
return t ? /* @__PURE__ */ j("label", {
|
|
3271
|
+
className: W("inline-flex items-center gap-2 select-none", "cursor-pointer data-[disabled]:cursor-not-allowed", n),
|
|
3272
|
+
children: [s, /* @__PURE__ */ A("span", {
|
|
3273
|
+
className: W("text-cui-primary", o.label),
|
|
3274
|
+
children: t
|
|
3275
|
+
})]
|
|
3276
|
+
}) : s;
|
|
3277
|
+
});
|
|
3278
|
+
function Ir({ value: e, title: t, description: n, icon: r, disabled: i, className: a }) {
|
|
3279
|
+
return /* @__PURE__ */ j("label", {
|
|
3280
|
+
className: W("group/card relative flex cursor-pointer items-start gap-3 rounded-lg p-3 ring-1 ring-cui-neutral select-none", "transition-all duration-150 ease-out", "hover:bg-cui-subtle/50", "has-[span[data-checked]]:ring-2 has-[span[data-checked]]:ring-cui-accent has-[span[data-checked]]:bg-cui-subtle", i && "pointer-events-none opacity-50", a),
|
|
3281
|
+
children: [
|
|
3282
|
+
r && /* @__PURE__ */ A("span", {
|
|
3283
|
+
className: "text-cui-secondary flex size-5 shrink-0 items-center justify-center [&>svg]:size-5",
|
|
3284
|
+
children: r
|
|
3285
|
+
}),
|
|
3286
|
+
/* @__PURE__ */ j("div", {
|
|
3287
|
+
className: "flex flex-1 flex-col gap-0.5",
|
|
3288
|
+
children: [/* @__PURE__ */ A("span", {
|
|
3289
|
+
className: "text-cui-primary text-cui-base font-medium",
|
|
3290
|
+
children: t
|
|
3291
|
+
}), n && /* @__PURE__ */ A("span", {
|
|
3292
|
+
className: "text-cui-secondary text-cui-sm",
|
|
3293
|
+
children: n
|
|
3294
|
+
})]
|
|
3295
|
+
}),
|
|
3296
|
+
/* @__PURE__ */ A(_e.Root, {
|
|
3297
|
+
value: e,
|
|
3298
|
+
disabled: i,
|
|
3299
|
+
className: W("group/radio relative mt-0.5 inline-flex size-[18px] shrink-0 items-center justify-center rounded-full", "border border-cui-neutral bg-cui-base-2", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "transition-colors duration-150 ease-out", "motion-reduce:transition-none", "data-[checked]:border-cui-accent data-[checked]:bg-cui-accent"),
|
|
3300
|
+
children: /* @__PURE__ */ A(_e.Indicator, { className: W("size-2 rounded-full bg-cui-accent-on", "scale-100 opacity-100", "data-[unchecked]:scale-0 data-[unchecked]:opacity-0", "data-[starting-style]:scale-0 data-[starting-style]:opacity-0", "data-[ending-style]:scale-0 data-[ending-style]:opacity-0", "transition-[scale,opacity] duration-150 ease-cui-out-expo", "motion-reduce:transition-none") })
|
|
3301
|
+
})
|
|
3302
|
+
]
|
|
3303
|
+
});
|
|
3304
|
+
}
|
|
3305
|
+
var Lr = {
|
|
3306
|
+
Root: Nr,
|
|
3307
|
+
Item: Fr,
|
|
3308
|
+
Card: Ir
|
|
3309
|
+
}, Rr = C(function({ show: e, message: t = "You have unsaved changes", discardLabel: n = "Reset", saveLabel: r = "Save changes", onDiscard: i, onSave: a, saving: o = !1, saveDisabled: s = !1, shake: c = !1, className: l }, u) {
|
|
3310
|
+
return /* @__PURE__ */ A("div", {
|
|
3013
3311
|
ref: u,
|
|
3014
3312
|
"aria-live": "polite",
|
|
3015
3313
|
className: W("pointer-events-none fixed inset-x-0 bottom-0 z-50 flex justify-center pb-6", l),
|
|
3016
|
-
children: /* @__PURE__ */
|
|
3314
|
+
children: /* @__PURE__ */ j("div", {
|
|
3017
3315
|
className: W("pointer-events-auto", "bg-cui-base-2 border-cui-neutral shadow-lg", "flex items-center gap-5 rounded-xl border py-1.5 pr-1.5 pl-3.5", "transition-all duration-500 ease-cui-out-expo", "motion-reduce:transition-none", e ? "translate-y-0 scale-100 opacity-100" : "pointer-events-none translate-y-4 scale-95 opacity-0", c && "animate-cui-shake"),
|
|
3018
|
-
children: [/* @__PURE__ */
|
|
3316
|
+
children: [/* @__PURE__ */ A("span", {
|
|
3019
3317
|
className: "text-cui-primary text-cui-base font-medium",
|
|
3020
3318
|
children: t
|
|
3021
|
-
}), /* @__PURE__ */
|
|
3319
|
+
}), /* @__PURE__ */ j("div", {
|
|
3022
3320
|
className: "flex items-center gap-1.5",
|
|
3023
|
-
children: [/* @__PURE__ */
|
|
3321
|
+
children: [/* @__PURE__ */ A(K, {
|
|
3024
3322
|
variant: "danger-light",
|
|
3025
3323
|
size: "sm",
|
|
3026
3324
|
onClick: i,
|
|
3027
3325
|
children: n
|
|
3028
|
-
}), /* @__PURE__ */
|
|
3326
|
+
}), /* @__PURE__ */ A(K, {
|
|
3029
3327
|
variant: "primary",
|
|
3030
3328
|
size: "sm",
|
|
3031
3329
|
onClick: a,
|
|
@@ -3036,19 +3334,19 @@ var hr = {
|
|
|
3036
3334
|
})]
|
|
3037
3335
|
})
|
|
3038
3336
|
});
|
|
3039
|
-
}),
|
|
3337
|
+
}), zr = {
|
|
3040
3338
|
narrow: "max-w-[800px]",
|
|
3041
3339
|
wide: "max-w-[1100px]"
|
|
3042
|
-
},
|
|
3043
|
-
return /* @__PURE__ */
|
|
3340
|
+
}, Br = C(function({ title: e, maxWidth: t = "narrow", leading: n, children: r, className: i }, a) {
|
|
3341
|
+
return /* @__PURE__ */ A("div", {
|
|
3044
3342
|
ref: a,
|
|
3045
3343
|
className: "flex flex-1 flex-col items-center gap-6 py-6",
|
|
3046
|
-
children: /* @__PURE__ */
|
|
3047
|
-
className: W("flex w-full flex-col gap-6 px-8",
|
|
3344
|
+
children: /* @__PURE__ */ j("div", {
|
|
3345
|
+
className: W("flex w-full flex-col gap-6 px-8", zr[t], i),
|
|
3048
3346
|
children: [
|
|
3049
3347
|
n,
|
|
3050
|
-
e && /* @__PURE__ */
|
|
3051
|
-
className: "text-cui-primary text-cui-
|
|
3348
|
+
e && /* @__PURE__ */ A("span", {
|
|
3349
|
+
className: "text-cui-primary text-cui-lg font-semibold",
|
|
3052
3350
|
children: e
|
|
3053
3351
|
}),
|
|
3054
3352
|
r
|
|
@@ -3058,26 +3356,26 @@ var hr = {
|
|
|
3058
3356
|
});
|
|
3059
3357
|
//#endregion
|
|
3060
3358
|
//#region src/lib/use-dirty-state.ts
|
|
3061
|
-
function
|
|
3062
|
-
let [t, n] =
|
|
3359
|
+
function Vr(e) {
|
|
3360
|
+
let [t, n] = O(e), [r, i] = O(e);
|
|
3063
3361
|
return {
|
|
3064
3362
|
draft: r,
|
|
3065
3363
|
saved: t,
|
|
3066
|
-
dirty:
|
|
3364
|
+
dirty: E(() => JSON.stringify(r) !== JSON.stringify(t), [r, t]),
|
|
3067
3365
|
setDraft: i,
|
|
3068
|
-
update:
|
|
3366
|
+
update: w((e, t) => {
|
|
3069
3367
|
i((n) => ({
|
|
3070
3368
|
...n,
|
|
3071
3369
|
[e]: t
|
|
3072
3370
|
}));
|
|
3073
3371
|
}, []),
|
|
3074
|
-
discard:
|
|
3372
|
+
discard: w(() => {
|
|
3075
3373
|
i(t);
|
|
3076
3374
|
}, [t]),
|
|
3077
|
-
save:
|
|
3375
|
+
save: w(() => {
|
|
3078
3376
|
n(r);
|
|
3079
3377
|
}, [r])
|
|
3080
3378
|
};
|
|
3081
3379
|
}
|
|
3082
3380
|
//#endregion
|
|
3083
|
-
export {
|
|
3381
|
+
export { cr as Accordion, nr as Alert, sr as AlertDialog, St as AppHeader, _t as Avatar, nn as Badge, Je as Breadcrumb, K as Button, jr as ButtonGroup, J as Card, Qe as Checkbox, Fe as Combobox, Le as ComboboxButton, Re as ComboboxContent, Be as ComboboxGroup, Ve as ComboboxGroupLabel, ze as ComboboxOption, He as ComboboxSeparator, Ie as ComboboxTrigger, Or as Command, Bn as DataTable, qn as DataTableFacetedFilter, Hn as DataTableSearch, Vn as DataTableToolbar, Tn as Dialog, yr as Drawer, Q as DropdownMenu, un as FlickeringGrid, cn as Form, G as Hover, xe as HoverGroup, st as Logo, ot as NavLink, at as NavLinks, Dt as PageLayout, Rn as Pagination, Ae as PixelSpinner, Kn as Popover, Lr as RadioGroup, Rr as SaveBar, Zn as SegmentedControl, Gt as Select, qt as SelectButton, Jt as SelectContent, Zt as SelectGroup, Qt as SelectGroupLabel, Yt as SelectOption, Xt as SelectSeparator, Kt as SelectTrigger, $t as Separator, Ct as SettingsCard, Br as SettingsPage, wt as SettingsRow, Wt as Sidebar, dn as Skeleton, Me as Spinner, $ as Table, fr as Tabs, Xe as Toggle, Ar as ToggleButton, Mr as ToggleButtonGroup, X as Tooltip, $n as UserMenu, W as cn, Nt as createTooltipHandle, Vr as useDirtyState, Z as useSidebar };
|