@coderabbitai/carrot-ui 0.1.22 → 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 +46 -1
- package/dist/index.js +1000 -959
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { clsx as e } from "clsx";
|
|
2
2
|
import { extendTailwindMerge as t } from "tailwind-merge";
|
|
3
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
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { Combobox as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Switch as
|
|
9
|
-
import { Checkbox as
|
|
10
|
-
import { AnimatePresence as
|
|
11
|
-
import { Tooltip as
|
|
12
|
-
import { Select as
|
|
13
|
-
import { Separator as
|
|
14
|
-
import { Field as
|
|
15
|
-
import { Menu as
|
|
16
|
-
import { Dialog as
|
|
17
|
-
import { flexRender as
|
|
18
|
-
import { Popover as
|
|
19
|
-
import { AlertDialog as
|
|
20
|
-
import { Accordion as
|
|
21
|
-
import { Tabs as
|
|
22
|
-
import { Drawer as
|
|
23
|
-
import { Command as
|
|
24
|
-
import { Toggle as
|
|
25
|
-
import { ToggleGroup as
|
|
26
|
-
import { RadioGroup as
|
|
27
|
-
import { Radio as
|
|
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";
|
|
6
|
+
import { Combobox as M } from "@base-ui/react/combobox";
|
|
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";
|
|
22
|
+
import { Drawer as H } from "@base-ui/react/drawer";
|
|
23
|
+
import { Command as U } from "cmdk";
|
|
24
|
+
import { Toggle as me } from "@base-ui/react/toggle";
|
|
25
|
+
import { ToggleGroup as he } from "@base-ui/react/toggle-group";
|
|
26
|
+
import { RadioGroup as ge } from "@base-ui/react/radio-group";
|
|
27
|
+
import { Radio as _e } from "@base-ui/react/radio";
|
|
28
28
|
//#region src/lib/cn.ts
|
|
29
|
-
var
|
|
29
|
+
var ve = t({ extend: { classGroups: {
|
|
30
30
|
"font-size": [{ "text-cui": [
|
|
31
31
|
"sm",
|
|
32
32
|
"base",
|
|
@@ -48,13 +48,13 @@ var _e = t({ extend: { classGroups: {
|
|
|
48
48
|
"success-on"
|
|
49
49
|
] }]
|
|
50
50
|
} } });
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
function W(...t) {
|
|
52
|
+
return ve(e(t));
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/components/hover/hover.tsx
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var ye = S(null);
|
|
57
|
+
function be(e) {
|
|
58
58
|
return {
|
|
59
59
|
left: e.offsetLeft,
|
|
60
60
|
top: e.offsetTop,
|
|
@@ -62,13 +62,13 @@ function ye(e) {
|
|
|
62
62
|
height: e.offsetHeight
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
let i =
|
|
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
67
|
t ? i.current.set(e, t) : i.current.delete(e);
|
|
68
68
|
}, []), d = w((e) => {
|
|
69
69
|
let t = i.current.get(e);
|
|
70
70
|
if (!t) return;
|
|
71
|
-
let n =
|
|
71
|
+
let n = be(t);
|
|
72
72
|
l((e) => e === "idle" ? "fade" : "slide"), o(n);
|
|
73
73
|
}, []), f = w(() => {
|
|
74
74
|
l("idle"), o(null);
|
|
@@ -76,7 +76,7 @@ function be({ children: e, background: t = "bg-cui-subtle", borderRadius: n = "r
|
|
|
76
76
|
l("idle"), o(null);
|
|
77
77
|
}, []), m = a !== null, h = a ?? s.current;
|
|
78
78
|
a && (s.current = a);
|
|
79
|
-
let g =
|
|
79
|
+
let g = E(() => ({
|
|
80
80
|
registerItem: u,
|
|
81
81
|
onItemHover: d,
|
|
82
82
|
dismissHover: p
|
|
@@ -85,27 +85,27 @@ function be({ children: e, background: t = "bg-cui-subtle", borderRadius: n = "r
|
|
|
85
85
|
d,
|
|
86
86
|
p
|
|
87
87
|
]);
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ A(ye.Provider, {
|
|
89
89
|
value: g,
|
|
90
|
-
children: /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ j("div", {
|
|
91
91
|
onPointerLeave: f,
|
|
92
|
-
className:
|
|
93
|
-
children: [/* @__PURE__ */
|
|
92
|
+
className: W("group/h relative flex items-center", r),
|
|
93
|
+
children: [/* @__PURE__ */ A("div", {
|
|
94
94
|
"aria-hidden": !0,
|
|
95
|
-
className:
|
|
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
96
|
style: h ? {
|
|
97
97
|
width: h.width,
|
|
98
98
|
height: h.height,
|
|
99
99
|
translate: `${h.left}px ${h.top}px`
|
|
100
100
|
} : void 0,
|
|
101
|
-
children: /* @__PURE__ */
|
|
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
102
|
}), e]
|
|
103
103
|
})
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
let f = ee(
|
|
108
|
-
return f ? /* @__PURE__ */
|
|
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
109
|
group: f,
|
|
110
110
|
active: t,
|
|
111
111
|
background: n,
|
|
@@ -117,34 +117,34 @@ function K({ children: e, active: t = !1, background: n = "bg-cui-subtle", backg
|
|
|
117
117
|
className: u,
|
|
118
118
|
...d,
|
|
119
119
|
children: e
|
|
120
|
-
}) : /* @__PURE__ */
|
|
120
|
+
}) : /* @__PURE__ */ j("div", {
|
|
121
121
|
...d,
|
|
122
|
-
className:
|
|
123
|
-
children: [/* @__PURE__ */
|
|
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
124
|
className: "relative z-[2] flex w-full min-w-0 items-center gap-2",
|
|
125
125
|
children: e
|
|
126
126
|
})]
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
let d =
|
|
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
131
|
f.current === null && (f.current = Math.random());
|
|
132
|
-
let p = f.current, m =
|
|
133
|
-
m.current = t,
|
|
132
|
+
let p = f.current, m = D(t);
|
|
133
|
+
m.current = t, T(() => {
|
|
134
134
|
let e = m.current;
|
|
135
135
|
return e.registerItem(p, d.current), () => e.registerItem(p, null);
|
|
136
136
|
}, [p]);
|
|
137
|
-
let h =
|
|
138
|
-
return
|
|
137
|
+
let h = D(n);
|
|
138
|
+
return T(() => {
|
|
139
139
|
n && !h.current && t.dismissHover(), h.current = n;
|
|
140
|
-
}, [n, t]), /* @__PURE__ */
|
|
140
|
+
}, [n, t]), /* @__PURE__ */ j("div", {
|
|
141
141
|
...u,
|
|
142
142
|
ref: d,
|
|
143
143
|
onPointerEnter: (e) => {
|
|
144
144
|
u.onPointerEnter?.(e), !s && (n ? t.dismissHover() : t.onItemHover(p));
|
|
145
145
|
},
|
|
146
|
-
className:
|
|
147
|
-
children: [/* @__PURE__ */
|
|
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
148
|
className: "relative z-[2] flex w-full min-w-0 items-center gap-2",
|
|
149
149
|
children: e
|
|
150
150
|
})]
|
|
@@ -152,7 +152,7 @@ function xe({ children: e, group: t, active: n, background: r, backgroundClassNa
|
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/components/spinner/pixel-spinner.tsx
|
|
155
|
-
var
|
|
155
|
+
var Ce = [
|
|
156
156
|
0,
|
|
157
157
|
1,
|
|
158
158
|
2,
|
|
@@ -161,7 +161,7 @@ var Se = [
|
|
|
161
161
|
7,
|
|
162
162
|
6,
|
|
163
163
|
3
|
|
164
|
-
],
|
|
164
|
+
], we = [
|
|
165
165
|
0,
|
|
166
166
|
1,
|
|
167
167
|
2,
|
|
@@ -171,23 +171,23 @@ var Se = [
|
|
|
171
171
|
2,
|
|
172
172
|
3,
|
|
173
173
|
4
|
|
174
|
-
],
|
|
174
|
+
], Te = {
|
|
175
175
|
xs: 10,
|
|
176
176
|
sm: 14,
|
|
177
177
|
md: 20,
|
|
178
178
|
lg: 32
|
|
179
|
-
},
|
|
180
|
-
function
|
|
181
|
-
if (
|
|
179
|
+
}, Ee = !1;
|
|
180
|
+
function De() {
|
|
181
|
+
if (Ee || typeof document > "u") return;
|
|
182
182
|
let e = document.createElement("style");
|
|
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),
|
|
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;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Oe(e, t, n) {
|
|
186
186
|
let r = `${n}s`;
|
|
187
187
|
switch (e) {
|
|
188
|
-
case "hole": return t === 4 ? null : `pxs-ring-off ${r} ${(-(
|
|
189
|
-
case "trail": return t === 4 ? null : `pxs-trail-5 ${r} ${(-(
|
|
190
|
-
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`;
|
|
191
191
|
case "radiate": return `pxs-radiate ${r} ${(-((t === 4 ? 0 : [
|
|
192
192
|
1,
|
|
193
193
|
3,
|
|
@@ -202,20 +202,20 @@ function De(e, t, n) {
|
|
|
202
202
|
][t % 3]} ${r} ${(-(t * .17 % 1) * n).toFixed(3)}s ease-in-out infinite`;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ke(e, t) {
|
|
206
206
|
return t === 4 ? +(e === "hole") : 0;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
209
|
-
typeof document < "u" &&
|
|
210
|
-
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) => ({
|
|
211
211
|
row: Math.floor(t / 3),
|
|
212
212
|
col: t % 3,
|
|
213
213
|
cellIndex: t
|
|
214
214
|
}));
|
|
215
|
-
return /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ A("span", {
|
|
216
216
|
"aria-label": "Loading",
|
|
217
217
|
role: "status",
|
|
218
|
-
className:
|
|
218
|
+
className: W("inline-block text-current", i),
|
|
219
219
|
style: {
|
|
220
220
|
width: a,
|
|
221
221
|
height: a,
|
|
@@ -223,14 +223,14 @@ function ke({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1
|
|
|
223
223
|
"--mid": "0.5",
|
|
224
224
|
"--hi": "1"
|
|
225
225
|
},
|
|
226
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ A("svg", {
|
|
227
227
|
width: a,
|
|
228
228
|
height: a,
|
|
229
229
|
viewBox: `0 0 ${a} ${a}`,
|
|
230
230
|
"aria-hidden": "true",
|
|
231
231
|
children: c.map(({ row: t, col: n, cellIndex: i }) => {
|
|
232
|
-
let a =
|
|
233
|
-
return /* @__PURE__ */
|
|
232
|
+
let a = Oe(e, i, r), c = ke(e, i);
|
|
233
|
+
return /* @__PURE__ */ A("rect", {
|
|
234
234
|
className: "pxs-cell",
|
|
235
235
|
x: n * s,
|
|
236
236
|
y: t * s,
|
|
@@ -248,24 +248,24 @@ function ke({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1
|
|
|
248
248
|
}
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/components/spinner/spinner.tsx
|
|
251
|
-
var
|
|
251
|
+
var je = {
|
|
252
252
|
sm: 10,
|
|
253
253
|
md: 12
|
|
254
|
-
},
|
|
255
|
-
let s = r === "sm" ? "text-cui-sm" : "text-[13px]", c =
|
|
256
|
-
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", {
|
|
257
257
|
ref: o,
|
|
258
|
-
className:
|
|
259
|
-
children: [n && /* @__PURE__ */
|
|
258
|
+
className: W("inline-flex items-center gap-1.5", a),
|
|
259
|
+
children: [n && /* @__PURE__ */ A(Ae, {
|
|
260
260
|
variant: i,
|
|
261
261
|
size: c,
|
|
262
262
|
duration: 1.2
|
|
263
|
-
}), e && /* @__PURE__ */
|
|
264
|
-
className:
|
|
265
|
-
children: [e, t && /* @__PURE__ */
|
|
263
|
+
}), e && /* @__PURE__ */ j("span", {
|
|
264
|
+
className: W("text-current", s),
|
|
265
|
+
children: [e, t && /* @__PURE__ */ A("span", { className: "after:animate-cui-dot-cycle inline-block w-[2ch] text-left after:content-['.']" })]
|
|
266
266
|
})]
|
|
267
267
|
});
|
|
268
|
-
}),
|
|
268
|
+
}), Ne = {
|
|
269
269
|
primary: {
|
|
270
270
|
active: !0,
|
|
271
271
|
bg: "bg-cui-inverse",
|
|
@@ -302,7 +302,7 @@ var Ae = {
|
|
|
302
302
|
bgClassName: "group-hover/btn:bg-cui-danger/30 group-active/btn:bg-cui-danger/50",
|
|
303
303
|
text: "text-cui-danger"
|
|
304
304
|
}
|
|
305
|
-
},
|
|
305
|
+
}, Pe = {
|
|
306
306
|
xs: {
|
|
307
307
|
height: "h-6",
|
|
308
308
|
padding: "px-1.5",
|
|
@@ -321,62 +321,62 @@ var Ae = {
|
|
|
321
321
|
textPadding: "px-1",
|
|
322
322
|
icon: "w-8"
|
|
323
323
|
}
|
|
324
|
-
},
|
|
325
|
-
let u =
|
|
326
|
-
return /* @__PURE__ */
|
|
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
327
|
ref: l,
|
|
328
328
|
disabled: a,
|
|
329
|
-
className:
|
|
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
330
|
...c,
|
|
331
331
|
children: [
|
|
332
|
-
/* @__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 && [
|
|
333
333
|
"transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none",
|
|
334
334
|
"group-hover/btn:inset-0 group-hover/btn:opacity-100",
|
|
335
335
|
"group-active/btn:inset-px"
|
|
336
336
|
]) }),
|
|
337
|
-
n && /* @__PURE__ */
|
|
338
|
-
className:
|
|
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
339
|
children: n
|
|
340
340
|
}),
|
|
341
|
-
s && /* @__PURE__ */
|
|
342
|
-
className:
|
|
341
|
+
s && /* @__PURE__ */ A("span", {
|
|
342
|
+
className: W("relative z-[1] inline", d.textPadding, i && "opacity-0"),
|
|
343
343
|
children: s
|
|
344
344
|
}),
|
|
345
|
-
r && /* @__PURE__ */
|
|
346
|
-
className:
|
|
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
347
|
children: r
|
|
348
348
|
}),
|
|
349
|
-
i && /* @__PURE__ */
|
|
349
|
+
i && /* @__PURE__ */ A("span", {
|
|
350
350
|
className: "absolute inset-0 z-[2] flex items-center justify-center",
|
|
351
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ A(Me, {
|
|
352
352
|
showDots: !1,
|
|
353
353
|
size: "sm"
|
|
354
354
|
})
|
|
355
355
|
})
|
|
356
356
|
]
|
|
357
357
|
});
|
|
358
|
-
}),
|
|
358
|
+
}), q = {
|
|
359
359
|
Panel: C(function({ minWidth: e, className: t, children: n, ...r }, i) {
|
|
360
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ A("div", {
|
|
361
361
|
ref: i,
|
|
362
|
-
className:
|
|
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
363
|
...r,
|
|
364
364
|
children: n
|
|
365
365
|
});
|
|
366
366
|
}),
|
|
367
367
|
Item: C(function({ icon: e, indicator: t, variant: n = "default", className: r, children: i, ...a }, o) {
|
|
368
|
-
return /* @__PURE__ */
|
|
368
|
+
return /* @__PURE__ */ j("div", {
|
|
369
369
|
ref: o,
|
|
370
|
-
className:
|
|
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
371
|
...a,
|
|
372
372
|
children: [
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
e && /* @__PURE__ */
|
|
375
|
-
className:
|
|
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
376
|
children: e
|
|
377
377
|
}),
|
|
378
378
|
i,
|
|
379
|
-
t && /* @__PURE__ */
|
|
379
|
+
t && /* @__PURE__ */ A("span", {
|
|
380
380
|
className: "text-cui-accent relative z-[1] ml-auto [&>svg]:size-4",
|
|
381
381
|
children: t
|
|
382
382
|
})
|
|
@@ -384,55 +384,55 @@ var Ae = {
|
|
|
384
384
|
});
|
|
385
385
|
}),
|
|
386
386
|
ItemIndicator: C(function({ className: e }, t) {
|
|
387
|
-
return /* @__PURE__ */
|
|
387
|
+
return /* @__PURE__ */ A("span", {
|
|
388
388
|
ref: t,
|
|
389
|
-
className:
|
|
390
|
-
children: /* @__PURE__ */
|
|
389
|
+
className: W("relative z-[1] ml-auto text-cui-secondary [&>svg]:size-4", e),
|
|
390
|
+
children: /* @__PURE__ */ A(o, {})
|
|
391
391
|
});
|
|
392
392
|
}),
|
|
393
393
|
List: C(function({ className: e, children: t, ...n }, r) {
|
|
394
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ A("div", {
|
|
395
395
|
ref: r,
|
|
396
|
-
className:
|
|
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
397
|
...n,
|
|
398
398
|
children: t
|
|
399
399
|
});
|
|
400
400
|
}),
|
|
401
401
|
Separator: C(function({ className: e, ...t }, n) {
|
|
402
|
-
return /* @__PURE__ */
|
|
402
|
+
return /* @__PURE__ */ A("div", {
|
|
403
403
|
ref: n,
|
|
404
|
-
className:
|
|
404
|
+
className: W("my-1 border-t border-cui-neutral", e),
|
|
405
405
|
...t
|
|
406
406
|
});
|
|
407
407
|
}),
|
|
408
408
|
GroupLabel: C(function({ className: e, children: t, ...n }, r) {
|
|
409
|
-
return /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ A("div", {
|
|
410
410
|
ref: r,
|
|
411
|
-
className:
|
|
411
|
+
className: W("px-2 py-1.5 text-cui-sm font-medium text-cui-tertiary select-none", e),
|
|
412
412
|
...n,
|
|
413
413
|
children: t
|
|
414
414
|
});
|
|
415
415
|
}),
|
|
416
416
|
Positioner: C(function({ className: e, children: t, ...n }, r) {
|
|
417
|
-
return /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ A("div", {
|
|
418
418
|
ref: r,
|
|
419
|
-
className:
|
|
419
|
+
className: W("z-50 outline-none", e),
|
|
420
420
|
...n,
|
|
421
421
|
children: t
|
|
422
422
|
});
|
|
423
423
|
}),
|
|
424
424
|
SearchInput: C(function({ className: e, children: t, ...n }, r) {
|
|
425
|
-
return /* @__PURE__ */
|
|
425
|
+
return /* @__PURE__ */ j("div", {
|
|
426
426
|
ref: r,
|
|
427
|
-
className:
|
|
427
|
+
className: W("mb-0.5 flex items-center gap-2 rounded px-2 py-1.5", e),
|
|
428
428
|
...n,
|
|
429
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ A(h, { className: "text-cui-tertiary size-4 shrink-0" }), t]
|
|
430
430
|
});
|
|
431
431
|
}),
|
|
432
432
|
Empty: C(function({ className: e, children: t, ...n }, r) {
|
|
433
|
-
return /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ A("div", {
|
|
434
434
|
ref: r,
|
|
435
|
-
className:
|
|
435
|
+
className: W("text-cui-secondary px-2 py-4 text-center text-cui-base empty:hidden", e),
|
|
436
436
|
...n,
|
|
437
437
|
children: t
|
|
438
438
|
});
|
|
@@ -440,9 +440,9 @@ var Ae = {
|
|
|
440
440
|
};
|
|
441
441
|
//#endregion
|
|
442
442
|
//#region src/components/combobox/combobox.tsx
|
|
443
|
-
function
|
|
444
|
-
let [o, s] =
|
|
445
|
-
return /* @__PURE__ */
|
|
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
446
|
value: e,
|
|
447
447
|
defaultValue: t,
|
|
448
448
|
onValueChange: n ? (e) => {
|
|
@@ -455,176 +455,176 @@ function Pe({ value: e, defaultValue: t, onValueChange: n, items: r, children: i
|
|
|
455
455
|
e && s("");
|
|
456
456
|
},
|
|
457
457
|
autoHighlight: !0,
|
|
458
|
-
children: a ? /* @__PURE__ */
|
|
458
|
+
children: a ? /* @__PURE__ */ A("div", {
|
|
459
459
|
className: a,
|
|
460
460
|
children: i
|
|
461
461
|
}) : i
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
return /* @__PURE__ */
|
|
464
|
+
var Ie = C(function({ children: e, className: t }, n) {
|
|
465
|
+
return /* @__PURE__ */ A(M.Trigger, {
|
|
466
466
|
ref: n,
|
|
467
|
-
className:
|
|
467
|
+
className: W("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
|
|
468
468
|
children: e
|
|
469
469
|
});
|
|
470
|
-
}),
|
|
471
|
-
return /* @__PURE__ */
|
|
470
|
+
}), Le = C(function({ placeholder: e, size: t, className: n }, r) {
|
|
471
|
+
return /* @__PURE__ */ A(M.Trigger, {
|
|
472
472
|
ref: r,
|
|
473
|
-
render: /* @__PURE__ */
|
|
473
|
+
render: /* @__PURE__ */ A(K, {
|
|
474
474
|
variant: "outline",
|
|
475
475
|
size: t,
|
|
476
|
-
iconRight: /* @__PURE__ */
|
|
476
|
+
iconRight: /* @__PURE__ */ A(u, {}),
|
|
477
477
|
className: n,
|
|
478
|
-
children: /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ A(M.Value, { placeholder: e })
|
|
479
479
|
})
|
|
480
480
|
});
|
|
481
481
|
});
|
|
482
|
-
function
|
|
483
|
-
let o = i ?? ((e) => /* @__PURE__ */
|
|
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
484
|
value: e.value,
|
|
485
485
|
icon: e.icon,
|
|
486
486
|
children: e.label
|
|
487
487
|
}, e.value));
|
|
488
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ A(M.Portal, { children: /* @__PURE__ */ A(M.Positioner, {
|
|
489
489
|
align: e,
|
|
490
490
|
sideOffset: 4,
|
|
491
|
-
render: /* @__PURE__ */
|
|
492
|
-
children: /* @__PURE__ */ M
|
|
493
|
-
render: /* @__PURE__ */
|
|
491
|
+
render: /* @__PURE__ */ A(q.Positioner, {}),
|
|
492
|
+
children: /* @__PURE__ */ j(M.Popup, {
|
|
493
|
+
render: /* @__PURE__ */ A(q.Panel, {
|
|
494
494
|
minWidth: r,
|
|
495
495
|
className: a
|
|
496
496
|
}),
|
|
497
497
|
children: [
|
|
498
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ A(q.SearchInput, { children: /* @__PURE__ */ A(M.Input, {
|
|
499
499
|
placeholder: t,
|
|
500
500
|
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base flex-1 bg-transparent outline-none"
|
|
501
501
|
}) }),
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
render: /* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ A(M.Empty, {
|
|
503
|
+
render: /* @__PURE__ */ A(q.Empty, {}),
|
|
504
504
|
children: n
|
|
505
505
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
render: /* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ A(M.List, {
|
|
507
|
+
render: /* @__PURE__ */ A(q.List, {}),
|
|
508
508
|
children: o
|
|
509
509
|
})
|
|
510
510
|
]
|
|
511
511
|
})
|
|
512
512
|
}) });
|
|
513
513
|
}
|
|
514
|
-
var
|
|
515
|
-
return /* @__PURE__ */ M
|
|
514
|
+
var ze = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
515
|
+
return /* @__PURE__ */ j(M.Item, {
|
|
516
516
|
ref: i,
|
|
517
517
|
value: e,
|
|
518
|
-
render: /* @__PURE__ */
|
|
518
|
+
render: /* @__PURE__ */ A(q.Item, {
|
|
519
519
|
icon: t,
|
|
520
520
|
className: r
|
|
521
521
|
}),
|
|
522
|
-
children: [/* @__PURE__ */
|
|
522
|
+
children: [/* @__PURE__ */ A("span", {
|
|
523
523
|
className: "relative z-[1] flex-1",
|
|
524
524
|
children: n
|
|
525
|
-
}), /* @__PURE__ */
|
|
525
|
+
}), /* @__PURE__ */ A(M.ItemIndicator, { render: /* @__PURE__ */ A(q.ItemIndicator, {}) })]
|
|
526
526
|
});
|
|
527
|
-
}),
|
|
528
|
-
return /* @__PURE__ */
|
|
527
|
+
}), Be = C(function({ className: e, children: t }, n) {
|
|
528
|
+
return /* @__PURE__ */ A(M.Group, {
|
|
529
529
|
ref: n,
|
|
530
|
-
className:
|
|
530
|
+
className: W("flex flex-col", e),
|
|
531
531
|
children: t
|
|
532
532
|
});
|
|
533
|
-
}),
|
|
534
|
-
return /* @__PURE__ */
|
|
533
|
+
}), Ve = C(function({ className: e, children: t }, n) {
|
|
534
|
+
return /* @__PURE__ */ A(M.GroupLabel, {
|
|
535
535
|
ref: n,
|
|
536
|
-
render: /* @__PURE__ */
|
|
536
|
+
render: /* @__PURE__ */ A(q.GroupLabel, { className: e }),
|
|
537
537
|
children: t
|
|
538
538
|
});
|
|
539
|
-
}),
|
|
540
|
-
return /* @__PURE__ */
|
|
539
|
+
}), He = C(function({ className: e }, t) {
|
|
540
|
+
return /* @__PURE__ */ A(M.Separator, {
|
|
541
541
|
ref: t,
|
|
542
|
-
render: /* @__PURE__ */
|
|
542
|
+
render: /* @__PURE__ */ A(q.Separator, { className: e })
|
|
543
543
|
});
|
|
544
544
|
});
|
|
545
545
|
//#endregion
|
|
546
546
|
//#region src/components/breadcrumb/breadcrumb.tsx
|
|
547
|
-
function
|
|
548
|
-
return /* @__PURE__ */
|
|
547
|
+
function Ue({ to: e, href: t, className: n, children: r }) {
|
|
548
|
+
return /* @__PURE__ */ A("a", {
|
|
549
549
|
href: e ?? t,
|
|
550
550
|
className: n,
|
|
551
551
|
children: r
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
return /* @__PURE__ */
|
|
554
|
+
function We() {
|
|
555
|
+
return /* @__PURE__ */ A("div", {
|
|
556
556
|
className: "flex w-4 shrink-0 items-center justify-center self-stretch",
|
|
557
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ A("div", { className: "bg-cui-tertiary h-4 w-px rotate-[20deg] opacity-50" })
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let r =
|
|
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
562
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
563
563
|
children: e.icon
|
|
564
|
-
}), /* @__PURE__ */
|
|
565
|
-
return t && e.href ? /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ A("span", { children: e.label })] });
|
|
565
|
+
return t && e.href ? /* @__PURE__ */ A(n, {
|
|
566
566
|
to: e.href,
|
|
567
567
|
href: e.href,
|
|
568
568
|
className: r,
|
|
569
569
|
children: i
|
|
570
|
-
}) : /* @__PURE__ */
|
|
570
|
+
}) : /* @__PURE__ */ A("span", {
|
|
571
571
|
className: r,
|
|
572
572
|
children: i
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
return /* @__PURE__ */
|
|
575
|
+
function Ke() {
|
|
576
|
+
return /* @__PURE__ */ A(Ie, {
|
|
577
577
|
className: "rounded-sm",
|
|
578
|
-
children: /* @__PURE__ */
|
|
578
|
+
children: /* @__PURE__ */ A(G, {
|
|
579
579
|
background: "bg-cui-subtle",
|
|
580
580
|
interactive: !0,
|
|
581
|
-
children: /* @__PURE__ */
|
|
581
|
+
children: /* @__PURE__ */ A("span", {
|
|
582
582
|
className: "flex h-8 items-center justify-center px-0.5 select-none",
|
|
583
|
-
children: /* @__PURE__ */
|
|
583
|
+
children: /* @__PURE__ */ A(u, { className: "text-cui-tertiary size-4" })
|
|
584
584
|
})
|
|
585
585
|
})
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return e.selector && e.options ? /* @__PURE__ */
|
|
588
|
+
function qe({ item: e, LinkEl: t }) {
|
|
589
|
+
return e.selector && e.options ? /* @__PURE__ */ j(Fe, {
|
|
590
590
|
value: e.value,
|
|
591
591
|
onValueChange: e.onSelect,
|
|
592
592
|
items: e.options,
|
|
593
|
-
children: [/* @__PURE__ */
|
|
593
|
+
children: [/* @__PURE__ */ j("span", {
|
|
594
594
|
className: "flex items-center",
|
|
595
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ A(G, {
|
|
596
596
|
background: "bg-cui-subtle",
|
|
597
597
|
interactive: !0,
|
|
598
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */ A(Ge, {
|
|
599
599
|
item: e,
|
|
600
600
|
asLink: !!e.href,
|
|
601
601
|
LinkEl: t
|
|
602
602
|
})
|
|
603
|
-
}), /* @__PURE__ */
|
|
604
|
-
}), /* @__PURE__ */
|
|
605
|
-
}) : e.href ? /* @__PURE__ */
|
|
603
|
+
}), /* @__PURE__ */ A(Ke, {})]
|
|
604
|
+
}), /* @__PURE__ */ A(Re, { searchPlaceholder: "Search..." })]
|
|
605
|
+
}) : e.href ? /* @__PURE__ */ A(G, {
|
|
606
606
|
background: "bg-cui-subtle",
|
|
607
607
|
interactive: !0,
|
|
608
|
-
children: /* @__PURE__ */
|
|
608
|
+
children: /* @__PURE__ */ A(Ge, {
|
|
609
609
|
item: e,
|
|
610
610
|
asLink: !0,
|
|
611
611
|
LinkEl: t
|
|
612
612
|
})
|
|
613
|
-
}) : /* @__PURE__ */
|
|
613
|
+
}) : /* @__PURE__ */ A(G, {
|
|
614
614
|
background: "bg-cui-subtle",
|
|
615
615
|
interactive: !0,
|
|
616
|
-
children: /* @__PURE__ */
|
|
616
|
+
children: /* @__PURE__ */ A(Ge, {
|
|
617
617
|
item: e,
|
|
618
618
|
LinkEl: t
|
|
619
619
|
})
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return /* @__PURE__ */
|
|
624
|
-
className:
|
|
625
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
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
626
|
className: "flex items-center",
|
|
627
|
-
children: [n > 0 && /* @__PURE__ */
|
|
627
|
+
children: [n > 0 && /* @__PURE__ */ A(We, {}), /* @__PURE__ */ A(qe, {
|
|
628
628
|
item: e,
|
|
629
629
|
LinkEl: t
|
|
630
630
|
})]
|
|
@@ -633,7 +633,7 @@ function qe({ items: e, linkComponent: t = He, className: n }) {
|
|
|
633
633
|
}
|
|
634
634
|
//#endregion
|
|
635
635
|
//#region src/components/toggle/toggle.tsx
|
|
636
|
-
var
|
|
636
|
+
var Ye = {
|
|
637
637
|
sm: {
|
|
638
638
|
track: "w-9 h-5",
|
|
639
639
|
thumb: "h-4 w-4 group-active/toggle:w-5"
|
|
@@ -642,19 +642,19 @@ var Je = {
|
|
|
642
642
|
track: "w-11 h-6",
|
|
643
643
|
thumb: "h-5 w-5 group-active/toggle:w-6"
|
|
644
644
|
}
|
|
645
|
-
},
|
|
646
|
-
let c =
|
|
647
|
-
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, {
|
|
648
648
|
ref: s,
|
|
649
649
|
checked: e,
|
|
650
650
|
defaultChecked: t,
|
|
651
651
|
onCheckedChange: n,
|
|
652
652
|
disabled: r,
|
|
653
|
-
className:
|
|
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),
|
|
654
654
|
...o,
|
|
655
|
-
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) })
|
|
656
656
|
});
|
|
657
|
-
}),
|
|
657
|
+
}), Ze = {
|
|
658
658
|
sm: {
|
|
659
659
|
root: "size-4 rounded-[4px]",
|
|
660
660
|
icon: "size-3",
|
|
@@ -665,8 +665,8 @@ var Je = {
|
|
|
665
665
|
icon: "size-3.5",
|
|
666
666
|
label: "text-cui-base"
|
|
667
667
|
}
|
|
668
|
-
},
|
|
669
|
-
let p =
|
|
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
670
|
ref: f,
|
|
671
671
|
checked: e,
|
|
672
672
|
defaultChecked: t,
|
|
@@ -675,75 +675,75 @@ var Je = {
|
|
|
675
675
|
disabled: i,
|
|
676
676
|
required: a,
|
|
677
677
|
name: l,
|
|
678
|
-
className:
|
|
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
679
|
...d,
|
|
680
|
-
children: /* @__PURE__ */
|
|
680
|
+
children: /* @__PURE__ */ A(ie.Indicator, {
|
|
681
681
|
keepMounted: !0,
|
|
682
|
-
className:
|
|
683
|
-
children:
|
|
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"),
|
|
683
|
+
children: A(r ? g : o, { className: p.icon })
|
|
684
684
|
})
|
|
685
685
|
});
|
|
686
|
-
return c ? /* @__PURE__ */
|
|
687
|
-
className:
|
|
688
|
-
children: [m, /* @__PURE__ */
|
|
689
|
-
className:
|
|
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
690
|
children: c
|
|
691
691
|
})]
|
|
692
692
|
}) : m;
|
|
693
|
-
}),
|
|
693
|
+
}), $e = {
|
|
694
694
|
default: "bg-cui-base-1 rounded-lg shadow-xs ring-1 ring-cui-neutral",
|
|
695
695
|
nested: "bg-cui-base-2 rounded-sm shadow-sm ring-1 ring-cui-neutral"
|
|
696
|
-
},
|
|
697
|
-
return /* @__PURE__ */
|
|
696
|
+
}, et = C(function({ className: e, children: t }, n) {
|
|
697
|
+
return /* @__PURE__ */ A("div", {
|
|
698
698
|
ref: n,
|
|
699
|
-
className:
|
|
699
|
+
className: W("flex flex-col gap-1 p-1", e),
|
|
700
700
|
children: t
|
|
701
701
|
});
|
|
702
|
-
}),
|
|
703
|
-
return /* @__PURE__ */
|
|
702
|
+
}), tt = C(function({ className: e, children: t }, n) {
|
|
703
|
+
return /* @__PURE__ */ A("div", {
|
|
704
704
|
ref: n,
|
|
705
|
-
className:
|
|
705
|
+
className: W("px-4 py-3", e),
|
|
706
706
|
children: t
|
|
707
707
|
});
|
|
708
|
-
}),
|
|
709
|
-
return /* @__PURE__ */
|
|
708
|
+
}), nt = C(function({ className: e, children: t }, n) {
|
|
709
|
+
return /* @__PURE__ */ A("div", {
|
|
710
710
|
ref: n,
|
|
711
|
-
className:
|
|
711
|
+
className: W("p-4", e),
|
|
712
712
|
children: t
|
|
713
713
|
});
|
|
714
|
-
}),
|
|
715
|
-
return /* @__PURE__ */
|
|
714
|
+
}), rt = C(function({ className: e, children: t }, n) {
|
|
715
|
+
return /* @__PURE__ */ A("div", {
|
|
716
716
|
ref: n,
|
|
717
|
-
className:
|
|
717
|
+
className: W("border-b border-cui-neutral last:border-b-0 p-4", e),
|
|
718
718
|
children: t
|
|
719
719
|
});
|
|
720
|
-
}),
|
|
721
|
-
return /* @__PURE__ */
|
|
720
|
+
}), J = C(function({ variant: e = "default", className: t, children: n }, r) {
|
|
721
|
+
return /* @__PURE__ */ A("div", {
|
|
722
722
|
ref: r,
|
|
723
|
-
className:
|
|
723
|
+
className: W($e[e], t),
|
|
724
724
|
children: n
|
|
725
725
|
});
|
|
726
726
|
});
|
|
727
|
-
|
|
727
|
+
J.Content = et, J.Header = tt, J.Body = nt, J.Section = rt;
|
|
728
728
|
//#endregion
|
|
729
729
|
//#region src/components/nav-link/nav-link.tsx
|
|
730
|
-
var
|
|
730
|
+
var it = {
|
|
731
731
|
sm: "h-7 px-1.5",
|
|
732
732
|
md: "h-8 px-1.5"
|
|
733
733
|
};
|
|
734
|
-
function
|
|
735
|
-
return /* @__PURE__ */
|
|
734
|
+
function at({ className: e, children: t }) {
|
|
735
|
+
return /* @__PURE__ */ A(xe, {
|
|
736
736
|
background: "bg-cui-subtle",
|
|
737
|
-
className:
|
|
737
|
+
className: W("gap-1 p-2 flex-nowrap", e),
|
|
738
738
|
children: t
|
|
739
739
|
});
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
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, {
|
|
743
743
|
active: e,
|
|
744
744
|
background: "bg-cui-subtle",
|
|
745
745
|
className: a,
|
|
746
|
-
children: /* @__PURE__ */
|
|
746
|
+
children: /* @__PURE__ */ j(n ? "a" : "button", {
|
|
747
747
|
...n ? {
|
|
748
748
|
href: n,
|
|
749
749
|
onClick: r
|
|
@@ -751,11 +751,11 @@ function at({ active: e = !1, icon: t, href: n, onClick: r, size: i = "md", clas
|
|
|
751
751
|
type: "button",
|
|
752
752
|
onClick: r
|
|
753
753
|
},
|
|
754
|
-
className:
|
|
755
|
-
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", {
|
|
756
756
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
757
757
|
children: t
|
|
758
|
-
}), /* @__PURE__ */
|
|
758
|
+
}), /* @__PURE__ */ A("span", {
|
|
759
759
|
className: "px-1",
|
|
760
760
|
children: o
|
|
761
761
|
})]
|
|
@@ -764,38 +764,38 @@ function at({ active: e = !1, icon: t, href: n, onClick: r, size: i = "md", clas
|
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region src/components/logo/logo.tsx
|
|
767
|
-
var
|
|
768
|
-
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", {
|
|
769
769
|
ref: r,
|
|
770
770
|
width: t,
|
|
771
771
|
height: t,
|
|
772
772
|
viewBox: "0 0 1201 1200",
|
|
773
773
|
fill: "none",
|
|
774
774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
775
|
-
className:
|
|
775
|
+
className: W("shrink-0", n),
|
|
776
776
|
"aria-label": "CodeRabbit",
|
|
777
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ A("path", {
|
|
778
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",
|
|
779
779
|
fill: "currentColor"
|
|
780
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ A("path", {
|
|
781
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",
|
|
782
782
|
fill: "var(--background-color-cui-base-1)"
|
|
783
783
|
})]
|
|
784
|
-
}) : /* @__PURE__ */
|
|
784
|
+
}) : /* @__PURE__ */ A("svg", {
|
|
785
785
|
ref: r,
|
|
786
786
|
width: t,
|
|
787
787
|
height: t,
|
|
788
788
|
viewBox: "0 0 18 18",
|
|
789
789
|
fill: "none",
|
|
790
790
|
xmlns: "http://www.w3.org/2000/svg",
|
|
791
|
-
className:
|
|
791
|
+
className: W("shrink-0", n),
|
|
792
792
|
"aria-label": "CodeRabbit",
|
|
793
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ A("path", {
|
|
794
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",
|
|
795
795
|
fill: "currentColor"
|
|
796
796
|
})
|
|
797
797
|
});
|
|
798
|
-
}),
|
|
798
|
+
}), ct = {
|
|
799
799
|
xs: {
|
|
800
800
|
outer: "size-5",
|
|
801
801
|
text: "text-[8px]",
|
|
@@ -821,17 +821,17 @@ var ot = C(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
|
821
821
|
text: "text-cui-lg",
|
|
822
822
|
px: 64
|
|
823
823
|
}
|
|
824
|
-
},
|
|
824
|
+
}, lt = {
|
|
825
825
|
circle: "rounded-full",
|
|
826
826
|
square: "rounded-md"
|
|
827
|
-
},
|
|
827
|
+
}, ut = {
|
|
828
828
|
neutral: "bg-cui-subtle text-cui-primary",
|
|
829
829
|
accent: "bg-cui-accent text-cui-accent-on",
|
|
830
830
|
danger: "bg-cui-danger text-cui-danger-on",
|
|
831
831
|
warn: "bg-cui-warn text-cui-warn-on",
|
|
832
832
|
success: "bg-cui-success text-cui-success-on"
|
|
833
833
|
};
|
|
834
|
-
function
|
|
834
|
+
function Y(e, t = 0) {
|
|
835
835
|
let n = 3735928559 ^ t, r = 1103547991 ^ t;
|
|
836
836
|
for (let t = 0; t < e.length; t++) {
|
|
837
837
|
let i = e.charCodeAt(t);
|
|
@@ -839,15 +839,15 @@ function X(e, t = 0) {
|
|
|
839
839
|
}
|
|
840
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);
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function dt(e) {
|
|
843
843
|
return [
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
844
|
+
Y(e, 0),
|
|
845
|
+
Y(e, 1),
|
|
846
|
+
Y(e, 2),
|
|
847
|
+
Y(e, 3)
|
|
848
848
|
];
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function ft(e, t, n, r) {
|
|
851
851
|
let i = e.filter(Boolean).length, a = Math.ceil(t * n);
|
|
852
852
|
if (i >= a) return;
|
|
853
853
|
let o = a - i, s = 0;
|
|
@@ -856,8 +856,8 @@ function dt(e, t, n, r) {
|
|
|
856
856
|
e[i] || (e[i] = !0, o--), s++;
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
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;
|
|
861
861
|
switch (t) {
|
|
862
862
|
case "grid": {
|
|
863
863
|
let e = [];
|
|
@@ -865,7 +865,7 @@ function ft(e, t) {
|
|
|
865
865
|
let n = o(Math.floor(t / 26));
|
|
866
866
|
e.push((n >> t % 26 & 1) == 1);
|
|
867
867
|
}
|
|
868
|
-
return
|
|
868
|
+
return ft(e, 25, .3, a), {
|
|
869
869
|
cols: 5,
|
|
870
870
|
rows: 5,
|
|
871
871
|
cells: e
|
|
@@ -984,32 +984,32 @@ function ft(e, t) {
|
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
-
function pt(e) {
|
|
988
|
-
return X(e, 42) % 360;
|
|
989
|
-
}
|
|
990
987
|
function mt(e) {
|
|
988
|
+
return Y(e, 42) % 360;
|
|
989
|
+
}
|
|
990
|
+
function ht(e) {
|
|
991
991
|
return {
|
|
992
992
|
"--ga-pixel": `light-dark(oklch(0.55 0.15 ${e}), oklch(0.7 0.14 ${e}))`,
|
|
993
993
|
"--ga-bg": `light-dark(oklch(0.92 0.03 ${e}), oklch(0.25 0.03 ${e}))`
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
var
|
|
997
|
-
let { grid: o, hue: s } =
|
|
998
|
-
grid:
|
|
999
|
-
hue:
|
|
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, _ =
|
|
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
1001
|
let t = x >> e % 26 & 7, n = _ >> (e + 5) % 26 & 7;
|
|
1002
1002
|
return {
|
|
1003
1003
|
duration: 1.5 + t * .35,
|
|
1004
1004
|
delay: n * .4
|
|
1005
1005
|
};
|
|
1006
1006
|
}, C = `ga-flk-${y}`;
|
|
1007
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ j("svg", {
|
|
1008
1008
|
ref: a,
|
|
1009
1009
|
width: n,
|
|
1010
1010
|
height: n,
|
|
1011
1011
|
viewBox: "0 0 100 100",
|
|
1012
|
-
className:
|
|
1012
|
+
className: W("shrink-0", i),
|
|
1013
1013
|
style: {
|
|
1014
1014
|
...b,
|
|
1015
1015
|
"--ga-anim": "none"
|
|
@@ -1019,18 +1019,18 @@ var ht = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
1019
1019
|
role: "img",
|
|
1020
1020
|
"aria-label": `Avatar for ${e}`,
|
|
1021
1021
|
children: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1022
|
+
/* @__PURE__ */ A("style", { children: `
|
|
1023
1023
|
@keyframes ${C} {
|
|
1024
1024
|
0%, 100% { opacity: var(--ga-o); }
|
|
1025
1025
|
50% { opacity: calc(var(--ga-o) * 0.25); }
|
|
1026
1026
|
}
|
|
1027
1027
|
` }),
|
|
1028
|
-
r ? /* @__PURE__ */
|
|
1028
|
+
r ? /* @__PURE__ */ A("circle", {
|
|
1029
1029
|
cx: 50,
|
|
1030
1030
|
cy: 50,
|
|
1031
1031
|
r: 50,
|
|
1032
1032
|
fill: "var(--ga-bg)"
|
|
1033
|
-
}) : /* @__PURE__ */
|
|
1033
|
+
}) : /* @__PURE__ */ A("rect", {
|
|
1034
1034
|
x: 0,
|
|
1035
1035
|
y: 0,
|
|
1036
1036
|
width: 100,
|
|
@@ -1038,13 +1038,13 @@ var ht = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
1038
1038
|
rx: 8,
|
|
1039
1039
|
fill: "var(--ga-bg)"
|
|
1040
1040
|
}),
|
|
1041
|
-
/* @__PURE__ */
|
|
1041
|
+
/* @__PURE__ */ A("defs", { children: /* @__PURE__ */ A("clipPath", {
|
|
1042
1042
|
id: y,
|
|
1043
|
-
children: r ? /* @__PURE__ */
|
|
1043
|
+
children: r ? /* @__PURE__ */ A("circle", {
|
|
1044
1044
|
cx: 50,
|
|
1045
1045
|
cy: 50,
|
|
1046
1046
|
r: 50
|
|
1047
|
-
}) : /* @__PURE__ */
|
|
1047
|
+
}) : /* @__PURE__ */ A("rect", {
|
|
1048
1048
|
x: 0,
|
|
1049
1049
|
y: 0,
|
|
1050
1050
|
width: 100,
|
|
@@ -1052,12 +1052,12 @@ var ht = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
1052
1052
|
rx: 8
|
|
1053
1053
|
})
|
|
1054
1054
|
}) }),
|
|
1055
|
-
/* @__PURE__ */
|
|
1055
|
+
/* @__PURE__ */ A("g", {
|
|
1056
1056
|
clipPath: `url(#${y})`,
|
|
1057
1057
|
children: u.map((e, t) => {
|
|
1058
1058
|
if (!e) return null;
|
|
1059
1059
|
let n = t % c, r = Math.floor(t / c), i = v(t), { duration: a, delay: o } = S(t);
|
|
1060
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ A("rect", {
|
|
1061
1061
|
x: g + n * (f + 3),
|
|
1062
1062
|
y: h + r * (f + 3),
|
|
1063
1063
|
width: f,
|
|
@@ -1078,263 +1078,263 @@ var ht = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
1078
1078
|
})
|
|
1079
1079
|
]
|
|
1080
1080
|
});
|
|
1081
|
-
}),
|
|
1082
|
-
let u =
|
|
1083
|
-
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", {
|
|
1084
1084
|
ref: l,
|
|
1085
1085
|
src: e,
|
|
1086
1086
|
alt: i ?? t ?? n ?? "",
|
|
1087
|
-
className:
|
|
1088
|
-
}) : t ? /* @__PURE__ */
|
|
1087
|
+
className: W("shrink-0 object-cover", u.outer, d, c)
|
|
1088
|
+
}) : t ? /* @__PURE__ */ A("span", {
|
|
1089
1089
|
ref: l,
|
|
1090
|
-
className:
|
|
1090
|
+
className: W("flex shrink-0 items-center justify-center font-semibold select-none", u.outer, u.text, d, ut[s], c),
|
|
1091
1091
|
children: t
|
|
1092
|
-
}) : n ? /* @__PURE__ */
|
|
1092
|
+
}) : n ? /* @__PURE__ */ A(gt, {
|
|
1093
1093
|
ref: l,
|
|
1094
1094
|
seed: n,
|
|
1095
1095
|
pattern: r,
|
|
1096
1096
|
px: u.px,
|
|
1097
1097
|
isCircle: a === "circle",
|
|
1098
1098
|
className: c
|
|
1099
|
-
}) : /* @__PURE__ */
|
|
1099
|
+
}) : /* @__PURE__ */ A("span", {
|
|
1100
1100
|
ref: l,
|
|
1101
|
-
className:
|
|
1101
|
+
className: W("flex shrink-0 items-center justify-center font-semibold select-none", u.outer, u.text, d, ut[s], c)
|
|
1102
1102
|
});
|
|
1103
1103
|
});
|
|
1104
1104
|
//#endregion
|
|
1105
1105
|
//#region src/components/app-header/app-header.tsx
|
|
1106
|
-
function
|
|
1107
|
-
return /* @__PURE__ */
|
|
1106
|
+
function vt({ to: e, href: t, className: n, children: r }) {
|
|
1107
|
+
return /* @__PURE__ */ A("a", {
|
|
1108
1108
|
href: e ?? t,
|
|
1109
1109
|
className: n,
|
|
1110
1110
|
children: r
|
|
1111
1111
|
});
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1114
|
-
return /* @__PURE__ */
|
|
1113
|
+
function yt() {
|
|
1114
|
+
return /* @__PURE__ */ A("div", {
|
|
1115
1115
|
className: "flex w-4 shrink-0 items-center justify-center self-stretch",
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ A("div", { className: "bg-cui-tertiary h-4 w-px rotate-[20deg] opacity-50" })
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return /* @__PURE__ */
|
|
1121
|
-
className:
|
|
1119
|
+
function bt({ items: e, linkComponent: t = vt, className: n }) {
|
|
1120
|
+
return /* @__PURE__ */ j("nav", {
|
|
1121
|
+
className: W("flex items-center", n),
|
|
1122
1122
|
children: [
|
|
1123
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ A(t, {
|
|
1124
1124
|
to: "/",
|
|
1125
1125
|
href: "/",
|
|
1126
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",
|
|
1127
|
-
children: /* @__PURE__ */
|
|
1127
|
+
children: /* @__PURE__ */ A(st, {
|
|
1128
1128
|
variant: "circle",
|
|
1129
1129
|
className: "text-cui-primary"
|
|
1130
1130
|
})
|
|
1131
1131
|
}),
|
|
1132
|
-
/* @__PURE__ */
|
|
1133
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ A(yt, {}),
|
|
1133
|
+
/* @__PURE__ */ A(Je, {
|
|
1134
1134
|
items: e,
|
|
1135
1135
|
linkComponent: t
|
|
1136
1136
|
})
|
|
1137
1137
|
]
|
|
1138
1138
|
});
|
|
1139
1139
|
}
|
|
1140
|
-
var
|
|
1141
|
-
return /* @__PURE__ */
|
|
1140
|
+
var xt = C(function({ children: e, className: t }, n) {
|
|
1141
|
+
return /* @__PURE__ */ A("div", {
|
|
1142
1142
|
ref: n,
|
|
1143
|
-
className:
|
|
1143
|
+
className: W("flex items-center gap-2", t),
|
|
1144
1144
|
children: e
|
|
1145
1145
|
});
|
|
1146
|
-
}),
|
|
1147
|
-
return /* @__PURE__ */
|
|
1146
|
+
}), St = C(function({ children: e, className: t }, n) {
|
|
1147
|
+
return /* @__PURE__ */ A("header", {
|
|
1148
1148
|
ref: n,
|
|
1149
|
-
className:
|
|
1149
|
+
className: W("flex items-center justify-between px-3 py-2", t),
|
|
1150
1150
|
children: e
|
|
1151
1151
|
});
|
|
1152
1152
|
});
|
|
1153
|
-
|
|
1153
|
+
St.Breadcrumb = bt, St.Actions = xt, St.Avatar = _t;
|
|
1154
1154
|
//#endregion
|
|
1155
1155
|
//#region src/components/settings-card/settings-card.tsx
|
|
1156
|
-
var
|
|
1157
|
-
let [l, u] =
|
|
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
1158
|
function m(e) {
|
|
1159
1159
|
d || u(e), i?.(e);
|
|
1160
1160
|
}
|
|
1161
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ A(J, {
|
|
1162
1162
|
ref: c,
|
|
1163
1163
|
className: s,
|
|
1164
|
-
children: /* @__PURE__ */
|
|
1164
|
+
children: /* @__PURE__ */ j(J.Content, { children: [(e || t || n) && /* @__PURE__ */ A(J.Header, { children: /* @__PURE__ */ j("div", {
|
|
1165
1165
|
className: "flex items-start justify-between gap-4",
|
|
1166
|
-
children: [/* @__PURE__ */
|
|
1166
|
+
children: [/* @__PURE__ */ j("div", {
|
|
1167
1167
|
className: "flex flex-1 flex-col",
|
|
1168
|
-
children: [e && /* @__PURE__ */
|
|
1168
|
+
children: [e && /* @__PURE__ */ A("span", {
|
|
1169
1169
|
className: "text-cui-primary text-cui-base font-medium",
|
|
1170
1170
|
children: e
|
|
1171
|
-
}), t && /* @__PURE__ */
|
|
1171
|
+
}), t && /* @__PURE__ */ A("p", {
|
|
1172
1172
|
className: "text-cui-secondary text-cui-base mt-1 leading-relaxed",
|
|
1173
1173
|
children: t
|
|
1174
1174
|
})]
|
|
1175
|
-
}), n && /* @__PURE__ */
|
|
1175
|
+
}), n && /* @__PURE__ */ A("div", {
|
|
1176
1176
|
className: "shrink-0 pt-0.5",
|
|
1177
|
-
children: /* @__PURE__ */
|
|
1177
|
+
children: /* @__PURE__ */ A(Xe, {
|
|
1178
1178
|
checked: f,
|
|
1179
1179
|
onCheckedChange: m
|
|
1180
1180
|
})
|
|
1181
1181
|
})]
|
|
1182
|
-
}) }), /* @__PURE__ */
|
|
1182
|
+
}) }), /* @__PURE__ */ A(J, {
|
|
1183
1183
|
variant: "nested",
|
|
1184
|
-
className:
|
|
1184
|
+
className: W("transition-opacity duration-150 ease-out", p && "opacity-50 pointer-events-none select-none"),
|
|
1185
1185
|
children: o
|
|
1186
1186
|
})] })
|
|
1187
1187
|
});
|
|
1188
|
-
}),
|
|
1189
|
-
return /* @__PURE__ */
|
|
1188
|
+
}), wt = C(function({ label: e, description: t, children: n, className: r }, i) {
|
|
1189
|
+
return /* @__PURE__ */ j(J.Section, {
|
|
1190
1190
|
ref: i,
|
|
1191
|
-
className:
|
|
1192
|
-
children: [/* @__PURE__ */
|
|
1191
|
+
className: W("flex justify-between items-start", r),
|
|
1192
|
+
children: [/* @__PURE__ */ j("div", {
|
|
1193
1193
|
className: "mr-4 flex flex-1 flex-col gap-1",
|
|
1194
|
-
children: [/* @__PURE__ */
|
|
1194
|
+
children: [/* @__PURE__ */ A("span", {
|
|
1195
1195
|
className: "text-cui-primary text-cui-base font-medium",
|
|
1196
1196
|
children: e
|
|
1197
|
-
}), t && /* @__PURE__ */
|
|
1197
|
+
}), t && /* @__PURE__ */ A("span", {
|
|
1198
1198
|
className: "text-cui-secondary text-cui-base leading-relaxed",
|
|
1199
1199
|
children: t
|
|
1200
1200
|
})]
|
|
1201
|
-
}), n && /* @__PURE__ */
|
|
1201
|
+
}), n && /* @__PURE__ */ A("div", {
|
|
1202
1202
|
className: "flex w-[340px] shrink-0 flex-col items-end",
|
|
1203
1203
|
children: n
|
|
1204
1204
|
})]
|
|
1205
1205
|
});
|
|
1206
|
-
}),
|
|
1207
|
-
return /* @__PURE__ */
|
|
1206
|
+
}), Tt = C(function({ className: e, children: t, ...n }, r) {
|
|
1207
|
+
return /* @__PURE__ */ A("div", {
|
|
1208
1208
|
ref: r,
|
|
1209
|
-
className:
|
|
1209
|
+
className: W("flex shrink-0 items-center gap-6 px-1.5 py-1.5", e),
|
|
1210
1210
|
...n,
|
|
1211
1211
|
children: t
|
|
1212
1212
|
});
|
|
1213
|
-
}),
|
|
1214
|
-
return /* @__PURE__ */
|
|
1213
|
+
}), Et = C(function({ className: e, children: t, ...n }, r) {
|
|
1214
|
+
return /* @__PURE__ */ A("div", {
|
|
1215
1215
|
ref: r,
|
|
1216
|
-
className:
|
|
1216
|
+
className: W("flex min-h-0 flex-1 gap-6 overflow-auto px-3.5 py-3", e),
|
|
1217
1217
|
...n,
|
|
1218
1218
|
children: t
|
|
1219
1219
|
});
|
|
1220
|
-
}),
|
|
1221
|
-
return /* @__PURE__ */
|
|
1220
|
+
}), Dt = Object.assign(C(function({ sidebar: e, className: t, children: n }, r) {
|
|
1221
|
+
return /* @__PURE__ */ j("div", {
|
|
1222
1222
|
ref: r,
|
|
1223
|
-
className:
|
|
1224
|
-
children: [e, /* @__PURE__ */
|
|
1223
|
+
className: W("flex h-screen bg-cui-base-0", t),
|
|
1224
|
+
children: [e, /* @__PURE__ */ A("div", {
|
|
1225
1225
|
className: "flex min-h-0 flex-1 flex-col pt-1 pr-1 pb-1",
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1226
|
+
children: /* @__PURE__ */ A("div", {
|
|
1227
1227
|
className: "bg-cui-base-1 ring-cui-neutral flex min-h-0 flex-1 flex-col rounded shadow-sm ring-1",
|
|
1228
1228
|
children: n
|
|
1229
1229
|
})
|
|
1230
1230
|
})]
|
|
1231
1231
|
});
|
|
1232
1232
|
}), {
|
|
1233
|
-
Header:
|
|
1234
|
-
Body:
|
|
1233
|
+
Header: Tt,
|
|
1234
|
+
Body: Et
|
|
1235
1235
|
});
|
|
1236
1236
|
//#endregion
|
|
1237
1237
|
//#region src/components/tooltip/tooltip.tsx
|
|
1238
|
-
function Dt(e) {
|
|
1239
|
-
return /* @__PURE__ */ j(I.Provider, { ...e });
|
|
1240
|
-
}
|
|
1241
1238
|
function Ot(e) {
|
|
1242
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ A(F.Provider, { ...e });
|
|
1240
|
+
}
|
|
1241
|
+
function kt(e) {
|
|
1242
|
+
return /* @__PURE__ */ A(F.Root, { ...e });
|
|
1243
1243
|
}
|
|
1244
|
-
var
|
|
1245
|
-
return /* @__PURE__ */
|
|
1244
|
+
var At = C(function({ className: e, ...t }, n) {
|
|
1245
|
+
return /* @__PURE__ */ A(F.Trigger, {
|
|
1246
1246
|
ref: n,
|
|
1247
|
-
className:
|
|
1247
|
+
className: W("outline-none", e),
|
|
1248
1248
|
...t
|
|
1249
1249
|
});
|
|
1250
1250
|
});
|
|
1251
|
-
function
|
|
1252
|
-
return /* @__PURE__ */
|
|
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
1253
|
side: e,
|
|
1254
1254
|
align: t,
|
|
1255
1255
|
sideOffset: n,
|
|
1256
|
-
className:
|
|
1257
|
-
children: /* @__PURE__ */
|
|
1258
|
-
className:
|
|
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
1259
|
...a,
|
|
1260
1260
|
children: i
|
|
1261
1261
|
})
|
|
1262
1262
|
}) });
|
|
1263
1263
|
}
|
|
1264
|
-
var
|
|
1265
|
-
return /* @__PURE__ */
|
|
1264
|
+
var Mt = C(function({ className: e, ...t }, n) {
|
|
1265
|
+
return /* @__PURE__ */ A(F.Viewport, {
|
|
1266
1266
|
ref: n,
|
|
1267
|
-
className:
|
|
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
1268
|
...t
|
|
1269
1269
|
});
|
|
1270
|
-
}),
|
|
1271
|
-
Provider:
|
|
1272
|
-
Root:
|
|
1273
|
-
Trigger:
|
|
1274
|
-
Content:
|
|
1275
|
-
Viewport:
|
|
1276
|
-
createHandle:
|
|
1277
|
-
},
|
|
1278
|
-
function
|
|
1279
|
-
let e = ee(
|
|
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
1280
|
if (!e) throw Error("useSidebar must be used within a <Sidebar>");
|
|
1281
1281
|
return e;
|
|
1282
1282
|
}
|
|
1283
1283
|
//#endregion
|
|
1284
1284
|
//#region src/components/sidebar/sidebar.tsx
|
|
1285
1285
|
function Ft({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, className: r, children: i }) {
|
|
1286
|
-
let [a, o] =
|
|
1286
|
+
let [a, o] = O(e), s = t !== void 0, c = s ? t : a, l = w(() => {
|
|
1287
1287
|
let e = !c;
|
|
1288
1288
|
s ? n?.(e) : o(e);
|
|
1289
1289
|
}, [
|
|
1290
1290
|
c,
|
|
1291
1291
|
s,
|
|
1292
1292
|
n
|
|
1293
|
-
]), u =
|
|
1293
|
+
]), u = E(() => ({
|
|
1294
1294
|
collapsed: c,
|
|
1295
1295
|
toggle: l
|
|
1296
1296
|
}), [c, l]);
|
|
1297
|
-
return /* @__PURE__ */
|
|
1297
|
+
return /* @__PURE__ */ A(Pt.Provider, {
|
|
1298
1298
|
value: u,
|
|
1299
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ A(X.Provider, {
|
|
1300
1300
|
delay: 0,
|
|
1301
1301
|
closeDelay: 0,
|
|
1302
|
-
children: /* @__PURE__ */
|
|
1303
|
-
className:
|
|
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
1304
|
children: i
|
|
1305
1305
|
})
|
|
1306
1306
|
})
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
1309
|
function It({ className: e, children: t }) {
|
|
1310
|
-
return /* @__PURE__ */
|
|
1311
|
-
className:
|
|
1310
|
+
return /* @__PURE__ */ A("div", {
|
|
1311
|
+
className: W("flex w-full flex-col gap-0.5", e),
|
|
1312
1312
|
children: t
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
1315
|
var Lt = C(function({ className: e, children: t, ...n }, r) {
|
|
1316
|
-
let { collapsed: i } =
|
|
1317
|
-
return /* @__PURE__ */
|
|
1316
|
+
let { collapsed: i } = Z();
|
|
1317
|
+
return /* @__PURE__ */ A("div", {
|
|
1318
1318
|
ref: r,
|
|
1319
|
-
className:
|
|
1319
|
+
className: W("grid transition-all duration-400 ease-cui-out-expo", i ? "grid-rows-[0fr]" : "grid-rows-[1fr]"),
|
|
1320
1320
|
...n,
|
|
1321
|
-
children: /* @__PURE__ */
|
|
1321
|
+
children: /* @__PURE__ */ A("div", {
|
|
1322
1322
|
className: "overflow-hidden",
|
|
1323
|
-
children: /* @__PURE__ */
|
|
1324
|
-
className:
|
|
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
1325
|
children: t
|
|
1326
1326
|
})
|
|
1327
1327
|
})
|
|
1328
1328
|
});
|
|
1329
1329
|
});
|
|
1330
1330
|
function Rt({ className: e, children: t }) {
|
|
1331
|
-
let { collapsed: n } =
|
|
1332
|
-
return /* @__PURE__ */
|
|
1333
|
-
className:
|
|
1334
|
-
children: [/* @__PURE__ */
|
|
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
1335
|
mode: "popLayout",
|
|
1336
1336
|
initial: !1,
|
|
1337
|
-
children: !n && /* @__PURE__ */
|
|
1337
|
+
children: !n && /* @__PURE__ */ A(P.div, {
|
|
1338
1338
|
initial: {
|
|
1339
1339
|
opacity: 0,
|
|
1340
1340
|
x: -320,
|
|
@@ -1358,11 +1358,11 @@ function Rt({ className: e, children: t }) {
|
|
|
1358
1358
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
1359
1359
|
children: t
|
|
1360
1360
|
})
|
|
1361
|
-
}), /* @__PURE__ */
|
|
1361
|
+
}), /* @__PURE__ */ A(Ht, {})]
|
|
1362
1362
|
});
|
|
1363
1363
|
}
|
|
1364
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 } =
|
|
1365
|
+
let { collapsed: f } = Z(), p = n ?? (t ? "a" : "button"), m = n === "div" ? { onClick: u } : t ? {
|
|
1366
1366
|
href: t,
|
|
1367
1367
|
onClick: u,
|
|
1368
1368
|
target: s ? "_blank" : void 0,
|
|
@@ -1370,31 +1370,31 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1370
1370
|
} : {
|
|
1371
1371
|
type: "button",
|
|
1372
1372
|
onClick: u
|
|
1373
|
-
}, h = /* @__PURE__ */
|
|
1373
|
+
}, h = /* @__PURE__ */ A(G, {
|
|
1374
1374
|
active: r,
|
|
1375
1375
|
background: "bg-cui-subtle",
|
|
1376
1376
|
borderRadius: "rounded",
|
|
1377
1377
|
fullWidth: !0,
|
|
1378
|
-
className:
|
|
1379
|
-
children: /* @__PURE__ */
|
|
1378
|
+
className: W("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", f ? "w-8" : "w-full"),
|
|
1379
|
+
children: /* @__PURE__ */ j(p, {
|
|
1380
1380
|
...m,
|
|
1381
1381
|
"aria-label": f ? e : void 0,
|
|
1382
|
-
className:
|
|
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
1383
|
children: [
|
|
1384
|
-
a && /* @__PURE__ */
|
|
1384
|
+
a && /* @__PURE__ */ j("span", {
|
|
1385
1385
|
className: "relative shrink-0",
|
|
1386
|
-
children: [/* @__PURE__ */
|
|
1387
|
-
className:
|
|
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
1388
|
children: a
|
|
1389
|
-
}), c && f && /* @__PURE__ */
|
|
1389
|
+
}), c && f && /* @__PURE__ */ A("span", {
|
|
1390
1390
|
className: "bg-cui-accent-strong absolute -top-0.5 -right-0.5 size-2 rounded-full",
|
|
1391
|
-
children: /* @__PURE__ */
|
|
1391
|
+
children: /* @__PURE__ */ A("span", { className: "bg-cui-accent-strong absolute inset-0 animate-ping rounded-full opacity-75" })
|
|
1392
1392
|
})]
|
|
1393
1393
|
}),
|
|
1394
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ A(N, {
|
|
1395
1395
|
mode: "popLayout",
|
|
1396
1396
|
initial: !1,
|
|
1397
|
-
children: !f && /* @__PURE__ */
|
|
1397
|
+
children: !f && /* @__PURE__ */ A(P.span, {
|
|
1398
1398
|
initial: {
|
|
1399
1399
|
opacity: 0,
|
|
1400
1400
|
scale: .8
|
|
@@ -1415,10 +1415,10 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1415
1415
|
children: e
|
|
1416
1416
|
})
|
|
1417
1417
|
}),
|
|
1418
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ A(N, {
|
|
1419
1419
|
mode: "popLayout",
|
|
1420
1420
|
initial: !1,
|
|
1421
|
-
children: c && !f && /* @__PURE__ */
|
|
1421
|
+
children: c && !f && /* @__PURE__ */ A(P.span, {
|
|
1422
1422
|
initial: {
|
|
1423
1423
|
opacity: 0,
|
|
1424
1424
|
scale: .8
|
|
@@ -1436,16 +1436,16 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1436
1436
|
ease: "easeOut"
|
|
1437
1437
|
},
|
|
1438
1438
|
className: "flex shrink-0 origin-left items-center",
|
|
1439
|
-
children: /* @__PURE__ */
|
|
1439
|
+
children: /* @__PURE__ */ j("span", {
|
|
1440
1440
|
className: "relative flex size-2",
|
|
1441
|
-
children: [/* @__PURE__ */
|
|
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
1442
|
})
|
|
1443
1443
|
})
|
|
1444
1444
|
}),
|
|
1445
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ A(N, {
|
|
1446
1446
|
mode: "popLayout",
|
|
1447
1447
|
initial: !1,
|
|
1448
|
-
children: s && !f && /* @__PURE__ */
|
|
1448
|
+
children: s && !f && /* @__PURE__ */ A(P.span, {
|
|
1449
1449
|
initial: {
|
|
1450
1450
|
opacity: 0,
|
|
1451
1451
|
scale: .8
|
|
@@ -1463,13 +1463,13 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1463
1463
|
ease: "easeOut"
|
|
1464
1464
|
},
|
|
1465
1465
|
className: "origin-left",
|
|
1466
|
-
children: /* @__PURE__ */
|
|
1466
|
+
children: /* @__PURE__ */ A(i, { className: "text-cui-tertiary size-4 shrink-0" })
|
|
1467
1467
|
})
|
|
1468
1468
|
}),
|
|
1469
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ A(N, {
|
|
1470
1470
|
mode: "popLayout",
|
|
1471
1471
|
initial: !1,
|
|
1472
|
-
children: o && !f && /* @__PURE__ */
|
|
1472
|
+
children: o && !f && /* @__PURE__ */ A(P.span, {
|
|
1473
1473
|
initial: {
|
|
1474
1474
|
opacity: 0,
|
|
1475
1475
|
scale: .8
|
|
@@ -1487,40 +1487,40 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1487
1487
|
ease: "easeOut"
|
|
1488
1488
|
},
|
|
1489
1489
|
className: "origin-left",
|
|
1490
|
-
children: /* @__PURE__ */
|
|
1490
|
+
children: /* @__PURE__ */ A(l, { className: "text-cui-tertiary size-4 shrink-0" })
|
|
1491
1491
|
})
|
|
1492
1492
|
})
|
|
1493
1493
|
]
|
|
1494
1494
|
})
|
|
1495
1495
|
});
|
|
1496
|
-
return /* @__PURE__ */
|
|
1496
|
+
return /* @__PURE__ */ j(X.Root, {
|
|
1497
1497
|
disabled: !f,
|
|
1498
|
-
children: [/* @__PURE__ */
|
|
1498
|
+
children: [/* @__PURE__ */ A(X.Trigger, { render: h }), /* @__PURE__ */ A(X.Content, {
|
|
1499
1499
|
side: "right",
|
|
1500
1500
|
children: e
|
|
1501
1501
|
})]
|
|
1502
1502
|
});
|
|
1503
1503
|
}
|
|
1504
1504
|
function Bt({ name: e, onClick: t, className: r }) {
|
|
1505
|
-
let { collapsed: i } =
|
|
1505
|
+
let { collapsed: i } = Z(), a = /* @__PURE__ */ A("div", {
|
|
1506
1506
|
className: "flex items-center py-1.5",
|
|
1507
|
-
children: /* @__PURE__ */
|
|
1507
|
+
children: /* @__PURE__ */ A(G, {
|
|
1508
1508
|
background: "bg-cui-subtle",
|
|
1509
1509
|
borderRadius: "rounded",
|
|
1510
1510
|
fullWidth: !0,
|
|
1511
|
-
className:
|
|
1512
|
-
children: /* @__PURE__ */
|
|
1511
|
+
className: W("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", i ? "w-8" : "w-full"),
|
|
1512
|
+
children: /* @__PURE__ */ j("button", {
|
|
1513
1513
|
type: "button",
|
|
1514
1514
|
onClick: t,
|
|
1515
1515
|
"aria-label": i ? e : void 0,
|
|
1516
|
-
className:
|
|
1517
|
-
children: [/* @__PURE__ */
|
|
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
1518
|
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1519
|
-
children: /* @__PURE__ */
|
|
1520
|
-
}), /* @__PURE__ */
|
|
1519
|
+
children: /* @__PURE__ */ A(n, {})
|
|
1520
|
+
}), /* @__PURE__ */ A(N, {
|
|
1521
1521
|
mode: "popLayout",
|
|
1522
1522
|
initial: !1,
|
|
1523
|
-
children: !i && /* @__PURE__ */
|
|
1523
|
+
children: !i && /* @__PURE__ */ A(P.span, {
|
|
1524
1524
|
initial: {
|
|
1525
1525
|
opacity: 0,
|
|
1526
1526
|
scale: .8
|
|
@@ -1544,22 +1544,22 @@ function Bt({ name: e, onClick: t, className: r }) {
|
|
|
1544
1544
|
})
|
|
1545
1545
|
})
|
|
1546
1546
|
});
|
|
1547
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ j(X.Root, {
|
|
1548
1548
|
disabled: !i,
|
|
1549
|
-
children: [/* @__PURE__ */
|
|
1549
|
+
children: [/* @__PURE__ */ A(X.Trigger, { render: a }), /* @__PURE__ */ A(X.Content, {
|
|
1550
1550
|
side: "right",
|
|
1551
1551
|
children: e
|
|
1552
1552
|
})]
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
function Vt({ collapsed: e }) {
|
|
1556
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ j("svg", {
|
|
1557
1557
|
width: "16",
|
|
1558
1558
|
height: "16",
|
|
1559
1559
|
viewBox: "0 0 16 16",
|
|
1560
1560
|
fill: "none",
|
|
1561
1561
|
className: "size-4",
|
|
1562
|
-
children: [/* @__PURE__ */
|
|
1562
|
+
children: [/* @__PURE__ */ A("rect", {
|
|
1563
1563
|
x: 2,
|
|
1564
1564
|
y: 3,
|
|
1565
1565
|
width: 12,
|
|
@@ -1567,35 +1567,35 @@ function Vt({ collapsed: e }) {
|
|
|
1567
1567
|
rx: 2,
|
|
1568
1568
|
stroke: "currentColor",
|
|
1569
1569
|
strokeWidth: 1.5
|
|
1570
|
-
}), /* @__PURE__ */
|
|
1570
|
+
}), /* @__PURE__ */ A("rect", {
|
|
1571
1571
|
x: 4,
|
|
1572
1572
|
y: 5,
|
|
1573
1573
|
height: 6,
|
|
1574
1574
|
rx: .75,
|
|
1575
1575
|
fill: "currentColor",
|
|
1576
|
-
className:
|
|
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]")
|
|
1577
1577
|
})]
|
|
1578
1578
|
});
|
|
1579
1579
|
}
|
|
1580
1580
|
function Ht({ className: e }) {
|
|
1581
|
-
let { collapsed: t, toggle: n } =
|
|
1582
|
-
return /* @__PURE__ */
|
|
1581
|
+
let { collapsed: t, toggle: n } = Z();
|
|
1582
|
+
return /* @__PURE__ */ A(K, {
|
|
1583
1583
|
variant: "transparent",
|
|
1584
1584
|
size: "md",
|
|
1585
|
-
iconLeft: /* @__PURE__ */
|
|
1585
|
+
iconLeft: /* @__PURE__ */ A(Vt, { collapsed: t }),
|
|
1586
1586
|
onClick: n,
|
|
1587
|
-
className:
|
|
1587
|
+
className: W("shrink-0", e),
|
|
1588
1588
|
"aria-label": t ? "Expand sidebar" : "Collapse sidebar"
|
|
1589
1589
|
});
|
|
1590
1590
|
}
|
|
1591
1591
|
function Ut({ activeKey: e, direction: t = "forward", className: n, children: r }) {
|
|
1592
|
-
return /* @__PURE__ */
|
|
1593
|
-
className:
|
|
1594
|
-
children: /* @__PURE__ */
|
|
1592
|
+
return /* @__PURE__ */ A("div", {
|
|
1593
|
+
className: W("relative min-h-0 flex-1", n),
|
|
1594
|
+
children: /* @__PURE__ */ A(N, {
|
|
1595
1595
|
mode: "popLayout",
|
|
1596
1596
|
initial: !1,
|
|
1597
1597
|
custom: t,
|
|
1598
|
-
children: /* @__PURE__ */
|
|
1598
|
+
children: /* @__PURE__ */ A(P.div, {
|
|
1599
1599
|
custom: t,
|
|
1600
1600
|
variants: {
|
|
1601
1601
|
enter: (e) => ({
|
|
@@ -1637,7 +1637,7 @@ var Wt = Object.assign(Ft, {
|
|
|
1637
1637
|
//#endregion
|
|
1638
1638
|
//#region src/components/select/select.tsx
|
|
1639
1639
|
function Gt({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i, children: a, className: o }) {
|
|
1640
|
-
return /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ A(I.Root, {
|
|
1641
1641
|
value: e,
|
|
1642
1642
|
defaultValue: t,
|
|
1643
1643
|
onValueChange: n ? (e) => {
|
|
@@ -1645,84 +1645,84 @@ function Gt({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i
|
|
|
1645
1645
|
} : void 0,
|
|
1646
1646
|
items: r,
|
|
1647
1647
|
disabled: i,
|
|
1648
|
-
children: o ? /* @__PURE__ */
|
|
1648
|
+
children: o ? /* @__PURE__ */ A("div", {
|
|
1649
1649
|
className: o,
|
|
1650
1650
|
children: a
|
|
1651
1651
|
}) : a
|
|
1652
1652
|
});
|
|
1653
1653
|
}
|
|
1654
1654
|
var Kt = C(function({ children: e, className: t }, n) {
|
|
1655
|
-
return /* @__PURE__ */
|
|
1655
|
+
return /* @__PURE__ */ A(I.Trigger, {
|
|
1656
1656
|
ref: n,
|
|
1657
|
-
className:
|
|
1657
|
+
className: W("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
|
|
1658
1658
|
children: e
|
|
1659
1659
|
});
|
|
1660
1660
|
}), qt = C(function({ placeholder: e, size: t, className: n }, r) {
|
|
1661
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ A(I.Trigger, {
|
|
1662
1662
|
ref: r,
|
|
1663
|
-
render: /* @__PURE__ */
|
|
1663
|
+
render: /* @__PURE__ */ A(K, {
|
|
1664
1664
|
variant: "outline",
|
|
1665
1665
|
size: t,
|
|
1666
|
-
iconRight: /* @__PURE__ */
|
|
1666
|
+
iconRight: /* @__PURE__ */ A(u, {}),
|
|
1667
1667
|
className: n,
|
|
1668
|
-
children: /* @__PURE__ */
|
|
1668
|
+
children: /* @__PURE__ */ A(I.Value, { placeholder: e })
|
|
1669
1669
|
})
|
|
1670
1670
|
});
|
|
1671
1671
|
});
|
|
1672
1672
|
function Jt({ align: e = "start", side: t = "bottom", sideOffset: n = 4, minWidth: r = "min-w-[220px]", children: i, className: a }) {
|
|
1673
|
-
return /* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ A(I.Portal, { children: /* @__PURE__ */ A(I.Positioner, {
|
|
1674
1674
|
align: e,
|
|
1675
1675
|
side: t,
|
|
1676
1676
|
sideOffset: n,
|
|
1677
1677
|
alignItemWithTrigger: !1,
|
|
1678
|
-
render: /* @__PURE__ */
|
|
1679
|
-
children: /* @__PURE__ */
|
|
1680
|
-
render: /* @__PURE__ */
|
|
1678
|
+
render: /* @__PURE__ */ A(q.Positioner, {}),
|
|
1679
|
+
children: /* @__PURE__ */ A(I.Popup, {
|
|
1680
|
+
render: /* @__PURE__ */ A(q.Panel, {
|
|
1681
1681
|
minWidth: r,
|
|
1682
1682
|
className: a
|
|
1683
1683
|
}),
|
|
1684
|
-
children: /* @__PURE__ */
|
|
1685
|
-
render: /* @__PURE__ */
|
|
1684
|
+
children: /* @__PURE__ */ A(I.List, {
|
|
1685
|
+
render: /* @__PURE__ */ A(q.List, {}),
|
|
1686
1686
|
children: i
|
|
1687
1687
|
})
|
|
1688
1688
|
})
|
|
1689
1689
|
}) });
|
|
1690
1690
|
}
|
|
1691
1691
|
var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
1692
|
-
return /* @__PURE__ */
|
|
1692
|
+
return /* @__PURE__ */ j(I.Item, {
|
|
1693
1693
|
ref: i,
|
|
1694
1694
|
value: e,
|
|
1695
|
-
render: /* @__PURE__ */
|
|
1695
|
+
render: /* @__PURE__ */ A(q.Item, {
|
|
1696
1696
|
icon: t,
|
|
1697
1697
|
className: r
|
|
1698
1698
|
}),
|
|
1699
|
-
children: [/* @__PURE__ */
|
|
1699
|
+
children: [/* @__PURE__ */ A(I.ItemText, {
|
|
1700
1700
|
className: "relative z-[1] flex-1",
|
|
1701
1701
|
children: n
|
|
1702
|
-
}), /* @__PURE__ */
|
|
1702
|
+
}), /* @__PURE__ */ A(I.ItemIndicator, { render: /* @__PURE__ */ A(q.ItemIndicator, {}) })]
|
|
1703
1703
|
});
|
|
1704
1704
|
}), Xt = C(function({ className: e }, t) {
|
|
1705
|
-
return /* @__PURE__ */
|
|
1705
|
+
return /* @__PURE__ */ A(I.Separator, {
|
|
1706
1706
|
ref: t,
|
|
1707
|
-
render: /* @__PURE__ */
|
|
1707
|
+
render: /* @__PURE__ */ A(q.Separator, { className: e })
|
|
1708
1708
|
});
|
|
1709
1709
|
}), Zt = C(function({ className: e, children: t }, n) {
|
|
1710
|
-
return /* @__PURE__ */
|
|
1710
|
+
return /* @__PURE__ */ A(I.Group, {
|
|
1711
1711
|
ref: n,
|
|
1712
|
-
className:
|
|
1712
|
+
className: W("flex flex-col", e),
|
|
1713
1713
|
children: t
|
|
1714
1714
|
});
|
|
1715
1715
|
}), Qt = C(function({ className: e, children: t }, n) {
|
|
1716
|
-
return /* @__PURE__ */
|
|
1716
|
+
return /* @__PURE__ */ A(I.GroupLabel, {
|
|
1717
1717
|
ref: n,
|
|
1718
|
-
render: /* @__PURE__ */
|
|
1718
|
+
render: /* @__PURE__ */ A(q.GroupLabel, { className: e }),
|
|
1719
1719
|
children: t
|
|
1720
1720
|
});
|
|
1721
1721
|
}), $t = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
1722
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ A(ae, {
|
|
1723
1723
|
ref: r,
|
|
1724
1724
|
orientation: e,
|
|
1725
|
-
className:
|
|
1725
|
+
className: W(e === "horizontal" ? "w-full border-t border-cui-neutral" : "self-stretch border-l border-cui-neutral", "shrink-0", t),
|
|
1726
1726
|
...n
|
|
1727
1727
|
});
|
|
1728
1728
|
}), en = {
|
|
@@ -1735,24 +1735,24 @@ var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1735
1735
|
sm: "px-1.5 py-0.5 text-cui-sm",
|
|
1736
1736
|
md: "px-2 py-0.5 text-cui-base"
|
|
1737
1737
|
}, nn = C(function({ variant: e = "neutral", size: t = "sm", className: n, children: r, ...i }, a) {
|
|
1738
|
-
return /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ A("span", {
|
|
1739
1739
|
ref: a,
|
|
1740
|
-
className:
|
|
1740
|
+
className: W("inline-flex items-center rounded-md font-medium leading-tight", tn[t], en[e], n),
|
|
1741
1741
|
...i,
|
|
1742
1742
|
children: r
|
|
1743
1743
|
});
|
|
1744
1744
|
}), rn = C(function({ className: e, ...t }, n) {
|
|
1745
|
-
return /* @__PURE__ */
|
|
1745
|
+
return /* @__PURE__ */ A(L.Root, {
|
|
1746
1746
|
ref: n,
|
|
1747
|
-
className:
|
|
1747
|
+
className: W("flex flex-col gap-1.5", e),
|
|
1748
1748
|
...t
|
|
1749
1749
|
});
|
|
1750
1750
|
}), an = C(function({ required: e, className: t, children: n, ...r }, i) {
|
|
1751
|
-
return /* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ j(L.Label, {
|
|
1752
1752
|
ref: i,
|
|
1753
|
-
className:
|
|
1753
|
+
className: W("text-cui-base font-medium text-cui-primary", "data-[disabled]:text-cui-tertiary data-[disabled]:cursor-not-allowed", t),
|
|
1754
1754
|
...r,
|
|
1755
|
-
children: [n, e && /* @__PURE__ */
|
|
1755
|
+
children: [n, e && /* @__PURE__ */ A("span", {
|
|
1756
1756
|
className: "text-cui-danger ml-0.5",
|
|
1757
1757
|
"aria-hidden": "true",
|
|
1758
1758
|
children: "*"
|
|
@@ -1780,41 +1780,41 @@ var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1780
1780
|
Field: rn,
|
|
1781
1781
|
Label: an,
|
|
1782
1782
|
Input: C(function({ iconLeft: e, iconRight: t, wrapperClassName: n, className: r, ...i }, a) {
|
|
1783
|
-
return e || t ? /* @__PURE__ */
|
|
1784
|
-
className:
|
|
1783
|
+
return e || t ? /* @__PURE__ */ j("div", {
|
|
1784
|
+
className: W("flex items-center gap-2 px-2.5", sn, n),
|
|
1785
1785
|
children: [
|
|
1786
|
-
e && /* @__PURE__ */
|
|
1786
|
+
e && /* @__PURE__ */ A("span", {
|
|
1787
1787
|
className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1788
1788
|
children: e
|
|
1789
1789
|
}),
|
|
1790
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ A(L.Control, {
|
|
1791
1791
|
ref: a,
|
|
1792
|
-
className:
|
|
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),
|
|
1793
1793
|
...i
|
|
1794
1794
|
}),
|
|
1795
|
-
t && /* @__PURE__ */
|
|
1795
|
+
t && /* @__PURE__ */ A("span", {
|
|
1796
1796
|
className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1797
1797
|
children: t
|
|
1798
1798
|
})
|
|
1799
1799
|
]
|
|
1800
|
-
}) : /* @__PURE__ */
|
|
1800
|
+
}) : /* @__PURE__ */ A(L.Control, {
|
|
1801
1801
|
ref: a,
|
|
1802
|
-
className:
|
|
1802
|
+
className: W(on, r),
|
|
1803
1803
|
...i
|
|
1804
1804
|
});
|
|
1805
1805
|
}),
|
|
1806
1806
|
Textarea: C(function({ className: e, ...t }, n) {
|
|
1807
|
-
return /* @__PURE__ */
|
|
1807
|
+
return /* @__PURE__ */ A(L.Control, {
|
|
1808
1808
|
ref: n,
|
|
1809
|
-
render: /* @__PURE__ */
|
|
1810
|
-
className:
|
|
1809
|
+
render: /* @__PURE__ */ A("textarea", {}),
|
|
1810
|
+
className: W(on, "min-h-20 resize-y", e),
|
|
1811
1811
|
...t
|
|
1812
1812
|
});
|
|
1813
1813
|
}),
|
|
1814
1814
|
Hint: C(function({ className: e, ...t }, n) {
|
|
1815
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ A(L.Description, {
|
|
1816
1816
|
ref: n,
|
|
1817
|
-
className:
|
|
1817
|
+
className: W("text-cui-sm text-cui-tertiary data-[invalid]:text-cui-danger", e),
|
|
1818
1818
|
...t
|
|
1819
1819
|
});
|
|
1820
1820
|
})
|
|
@@ -1828,8 +1828,8 @@ function ln(e, t) {
|
|
|
1828
1828
|
return e.style.color = n, r || "#000";
|
|
1829
1829
|
}
|
|
1830
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 =
|
|
1832
|
-
return
|
|
1831
|
+
let f = D(null), p = D(null);
|
|
1832
|
+
return te(() => {
|
|
1833
1833
|
let d = f.current, m = p.current;
|
|
1834
1834
|
if (!d || !m) return;
|
|
1835
1835
|
let h = m.getContext("2d");
|
|
@@ -1842,10 +1842,10 @@ function un({ squareSize: e = 6, gridGap: t = 0, flickerChance: n = .3, color: r
|
|
|
1842
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);
|
|
1843
1843
|
for (let e = 0; e < y.length; e++) y[e] = Math.random() * i, b[e] = (Math.random() - .5) * 2 * u;
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1845
|
+
function te(e) {
|
|
1846
1846
|
if (!l) for (let t = 0; t < y.length; t++) Math.random() < n * e && (y[t] = Math.random() * i);
|
|
1847
1847
|
}
|
|
1848
|
-
function
|
|
1848
|
+
function T(n) {
|
|
1849
1849
|
if (!h || !m) return;
|
|
1850
1850
|
h.clearRect(0, 0, m.width, m.height), h.fillStyle = g;
|
|
1851
1851
|
let r = e + t, u = 0;
|
|
@@ -1867,28 +1867,28 @@ function un({ squareSize: e = 6, gridGap: t = 0, flickerChance: n = .3, color: r
|
|
|
1867
1867
|
h.globalAlpha = 1;
|
|
1868
1868
|
}
|
|
1869
1869
|
ee();
|
|
1870
|
-
let
|
|
1871
|
-
function
|
|
1872
|
-
if (!
|
|
1873
|
-
let t = (e -
|
|
1874
|
-
|
|
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);
|
|
1875
1875
|
}
|
|
1876
|
-
let
|
|
1876
|
+
let A = new ResizeObserver(() => {
|
|
1877
1877
|
ee();
|
|
1878
1878
|
});
|
|
1879
|
-
|
|
1880
|
-
let
|
|
1881
|
-
|
|
1879
|
+
A.observe(d);
|
|
1880
|
+
let j = new IntersectionObserver(([e]) => {
|
|
1881
|
+
O = e?.isIntersecting ?? !1, O ? (D = performance.now(), E = requestAnimationFrame(k)) : cancelAnimationFrame(E);
|
|
1882
1882
|
}, { threshold: 0 });
|
|
1883
|
-
|
|
1884
|
-
let
|
|
1883
|
+
j.observe(m);
|
|
1884
|
+
let M = new MutationObserver(() => {
|
|
1885
1885
|
g = ln(d, r);
|
|
1886
1886
|
});
|
|
1887
|
-
return
|
|
1887
|
+
return M.observe(document.documentElement, {
|
|
1888
1888
|
attributes: !0,
|
|
1889
1889
|
attributeFilter: ["data-theme", "class"]
|
|
1890
1890
|
}), () => {
|
|
1891
|
-
cancelAnimationFrame(
|
|
1891
|
+
cancelAnimationFrame(E), A.disconnect(), j.disconnect(), M.disconnect();
|
|
1892
1892
|
};
|
|
1893
1893
|
}, [
|
|
1894
1894
|
e,
|
|
@@ -1902,21 +1902,21 @@ function un({ squareSize: e = 6, gridGap: t = 0, flickerChance: n = .3, color: r
|
|
|
1902
1902
|
c,
|
|
1903
1903
|
l,
|
|
1904
1904
|
u
|
|
1905
|
-
]), /* @__PURE__ */
|
|
1905
|
+
]), /* @__PURE__ */ A("div", {
|
|
1906
1906
|
ref: f,
|
|
1907
|
-
className:
|
|
1907
|
+
className: W("pointer-events-none size-full", d),
|
|
1908
1908
|
"aria-hidden": "true",
|
|
1909
|
-
children: /* @__PURE__ */
|
|
1909
|
+
children: /* @__PURE__ */ A("canvas", { ref: p })
|
|
1910
1910
|
});
|
|
1911
1911
|
}
|
|
1912
1912
|
//#endregion
|
|
1913
1913
|
//#region src/components/skeleton/skeleton.tsx
|
|
1914
1914
|
var dn = C(function({ circular: e, className: t }, n) {
|
|
1915
|
-
return /* @__PURE__ */
|
|
1915
|
+
return /* @__PURE__ */ A("div", {
|
|
1916
1916
|
ref: n,
|
|
1917
|
-
className:
|
|
1917
|
+
className: W("relative overflow-hidden bg-cui-subtle", e ? "rounded-full" : "rounded-xs", t),
|
|
1918
1918
|
"aria-hidden": "true",
|
|
1919
|
-
children: /* @__PURE__ */
|
|
1919
|
+
children: /* @__PURE__ */ A(un, {
|
|
1920
1920
|
squareSize: 4,
|
|
1921
1921
|
gridGap: 2,
|
|
1922
1922
|
color: "var(--text-color-cui-secondary)",
|
|
@@ -1933,7 +1933,7 @@ var dn = C(function({ circular: e, className: t }, n) {
|
|
|
1933
1933
|
//#endregion
|
|
1934
1934
|
//#region src/components/dropdown-menu/dropdown-menu.tsx
|
|
1935
1935
|
function fn({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children: i }) {
|
|
1936
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ A(R.Root, {
|
|
1937
1937
|
open: e,
|
|
1938
1938
|
defaultOpen: t,
|
|
1939
1939
|
onOpenChange: n ? (e) => n(e) : void 0,
|
|
@@ -1942,20 +1942,20 @@ function fn({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children:
|
|
|
1942
1942
|
});
|
|
1943
1943
|
}
|
|
1944
1944
|
var pn = C(function({ className: e, ...t }, n) {
|
|
1945
|
-
return /* @__PURE__ */
|
|
1945
|
+
return /* @__PURE__ */ A(R.Trigger, {
|
|
1946
1946
|
ref: n,
|
|
1947
|
-
className:
|
|
1947
|
+
className: W("cursor-pointer outline-none", e),
|
|
1948
1948
|
...t
|
|
1949
1949
|
});
|
|
1950
1950
|
});
|
|
1951
1951
|
function mn({ side: e = "bottom", align: t = "end", sideOffset: n = 4, minWidth: r = "min-w-[180px]", className: i, children: a }) {
|
|
1952
|
-
return /* @__PURE__ */
|
|
1952
|
+
return /* @__PURE__ */ A(R.Portal, { children: /* @__PURE__ */ A(R.Positioner, {
|
|
1953
1953
|
side: e,
|
|
1954
1954
|
align: t,
|
|
1955
1955
|
sideOffset: n,
|
|
1956
|
-
render: /* @__PURE__ */
|
|
1957
|
-
children: /* @__PURE__ */
|
|
1958
|
-
render: /* @__PURE__ */
|
|
1956
|
+
render: /* @__PURE__ */ A(q.Positioner, {}),
|
|
1957
|
+
children: /* @__PURE__ */ A(R.Popup, {
|
|
1958
|
+
render: /* @__PURE__ */ A(q.Panel, {
|
|
1959
1959
|
minWidth: r,
|
|
1960
1960
|
className: i
|
|
1961
1961
|
}),
|
|
@@ -1968,39 +1968,39 @@ var Q = {
|
|
|
1968
1968
|
Trigger: pn,
|
|
1969
1969
|
Content: mn,
|
|
1970
1970
|
Item: C(function({ variant: e = "default", icon: t, onClick: n, closeOnClick: r, disabled: i, className: a, children: o }, s) {
|
|
1971
|
-
return /* @__PURE__ */
|
|
1971
|
+
return /* @__PURE__ */ A(R.Item, {
|
|
1972
1972
|
ref: s,
|
|
1973
1973
|
onClick: n,
|
|
1974
1974
|
closeOnClick: r,
|
|
1975
1975
|
disabled: i,
|
|
1976
|
-
render: /* @__PURE__ */
|
|
1976
|
+
render: /* @__PURE__ */ A(q.Item, {
|
|
1977
1977
|
icon: t,
|
|
1978
1978
|
variant: e,
|
|
1979
1979
|
className: a
|
|
1980
1980
|
}),
|
|
1981
|
-
children: /* @__PURE__ */
|
|
1981
|
+
children: /* @__PURE__ */ A("span", {
|
|
1982
1982
|
className: "relative z-[1] flex-1",
|
|
1983
1983
|
children: o
|
|
1984
1984
|
})
|
|
1985
1985
|
});
|
|
1986
1986
|
}),
|
|
1987
1987
|
Separator: C(function({ className: e }, t) {
|
|
1988
|
-
return /* @__PURE__ */
|
|
1988
|
+
return /* @__PURE__ */ A(R.Separator, {
|
|
1989
1989
|
ref: t,
|
|
1990
|
-
render: /* @__PURE__ */
|
|
1990
|
+
render: /* @__PURE__ */ A(q.Separator, { className: e })
|
|
1991
1991
|
});
|
|
1992
1992
|
}),
|
|
1993
1993
|
Label: C(function({ className: e, children: t }, n) {
|
|
1994
|
-
return /* @__PURE__ */
|
|
1994
|
+
return /* @__PURE__ */ A(R.GroupLabel, {
|
|
1995
1995
|
ref: n,
|
|
1996
|
-
render: /* @__PURE__ */
|
|
1996
|
+
render: /* @__PURE__ */ A(q.GroupLabel, { className: e }),
|
|
1997
1997
|
children: t
|
|
1998
1998
|
});
|
|
1999
1999
|
}),
|
|
2000
2000
|
Group: C(function({ className: e, children: t }, n) {
|
|
2001
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ A(R.Group, {
|
|
2002
2002
|
ref: n,
|
|
2003
|
-
className:
|
|
2003
|
+
className: W("flex flex-col", e),
|
|
2004
2004
|
children: t
|
|
2005
2005
|
});
|
|
2006
2006
|
})
|
|
@@ -2008,18 +2008,18 @@ var Q = {
|
|
|
2008
2008
|
//#endregion
|
|
2009
2009
|
//#region src/components/dialog/dialog.tsx
|
|
2010
2010
|
function hn({ ...e }) {
|
|
2011
|
-
return /* @__PURE__ */
|
|
2011
|
+
return /* @__PURE__ */ A(z.Root, { ...e });
|
|
2012
2012
|
}
|
|
2013
2013
|
var gn = C(function({ className: e, ...t }, n) {
|
|
2014
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ A(z.Trigger, {
|
|
2015
2015
|
ref: n,
|
|
2016
|
-
className:
|
|
2016
|
+
className: W(e),
|
|
2017
2017
|
...t
|
|
2018
2018
|
});
|
|
2019
2019
|
}), _n = C(function({ className: e, ...t }, n) {
|
|
2020
|
-
return /* @__PURE__ */
|
|
2020
|
+
return /* @__PURE__ */ A(z.Backdrop, {
|
|
2021
2021
|
ref: n,
|
|
2022
|
-
className:
|
|
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),
|
|
2023
2023
|
...t
|
|
2024
2024
|
});
|
|
2025
2025
|
}), vn = {
|
|
@@ -2027,40 +2027,40 @@ var gn = C(function({ className: e, ...t }, n) {
|
|
|
2027
2027
|
lg: "max-w-[550px]"
|
|
2028
2028
|
};
|
|
2029
2029
|
function yn({ size: e = "md", className: t, children: n, ...r }) {
|
|
2030
|
-
return /* @__PURE__ */
|
|
2031
|
-
className:
|
|
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),
|
|
2032
2032
|
...r,
|
|
2033
2033
|
children: n
|
|
2034
2034
|
})] });
|
|
2035
2035
|
}
|
|
2036
2036
|
var bn = C(function({ className: e, children: t }, n) {
|
|
2037
|
-
return /* @__PURE__ */
|
|
2037
|
+
return /* @__PURE__ */ A("div", {
|
|
2038
2038
|
ref: n,
|
|
2039
|
-
className:
|
|
2039
|
+
className: W("bg-cui-base-2 border-cui-neutral rounded-md border", e),
|
|
2040
2040
|
children: t
|
|
2041
2041
|
});
|
|
2042
2042
|
}), xn = C(function({ className: e, ...t }, n) {
|
|
2043
|
-
return /* @__PURE__ */
|
|
2043
|
+
return /* @__PURE__ */ A(z.Title, {
|
|
2044
2044
|
ref: n,
|
|
2045
|
-
className:
|
|
2045
|
+
className: W("text-cui-primary border-cui-neutral border-b px-4 py-3 text-cui-base font-medium", e),
|
|
2046
2046
|
...t
|
|
2047
2047
|
});
|
|
2048
2048
|
}), Sn = C(function({ className: e, children: t }, n) {
|
|
2049
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ A("div", {
|
|
2050
2050
|
ref: n,
|
|
2051
|
-
className:
|
|
2051
|
+
className: W("p-4", e),
|
|
2052
2052
|
children: t
|
|
2053
2053
|
});
|
|
2054
2054
|
}), Cn = C(function({ className: e, children: t }, n) {
|
|
2055
|
-
return /* @__PURE__ */
|
|
2055
|
+
return /* @__PURE__ */ A("div", {
|
|
2056
2056
|
ref: n,
|
|
2057
|
-
className:
|
|
2057
|
+
className: W("flex items-center justify-between p-2", e),
|
|
2058
2058
|
children: t
|
|
2059
2059
|
});
|
|
2060
2060
|
}), wn = C(function({ className: e, ...t }, n) {
|
|
2061
|
-
return /* @__PURE__ */
|
|
2061
|
+
return /* @__PURE__ */ A(z.Close, {
|
|
2062
2062
|
ref: n,
|
|
2063
|
-
className:
|
|
2063
|
+
className: W(e),
|
|
2064
2064
|
...t
|
|
2065
2065
|
});
|
|
2066
2066
|
}), Tn = {
|
|
@@ -2069,60 +2069,72 @@ var bn = C(function({ className: e, children: t }, n) {
|
|
|
2069
2069
|
Content: yn,
|
|
2070
2070
|
Panel: bn,
|
|
2071
2071
|
Title: xn,
|
|
2072
|
-
Description:
|
|
2072
|
+
Description: z.Description,
|
|
2073
2073
|
Body: Sn,
|
|
2074
2074
|
Footer: Cn,
|
|
2075
2075
|
Close: wn
|
|
2076
2076
|
}, $ = C(function({ className: e, children: t }, n) {
|
|
2077
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ A("div", {
|
|
2078
2078
|
ref: n,
|
|
2079
|
-
className:
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2079
|
+
className: W("overflow-hidden rounded ring-1 ring-cui-neutral", e),
|
|
2080
|
+
children: /* @__PURE__ */ A("table", {
|
|
2081
2081
|
className: "w-full table-fixed border-separate border-spacing-0",
|
|
2082
2082
|
children: t
|
|
2083
2083
|
})
|
|
2084
2084
|
});
|
|
2085
2085
|
}), En = C(function({ className: e, children: t }, n) {
|
|
2086
|
-
return /* @__PURE__ */
|
|
2086
|
+
return /* @__PURE__ */ A("thead", {
|
|
2087
2087
|
ref: n,
|
|
2088
|
-
className:
|
|
2088
|
+
className: W("[&>tr]:text-cui-sm [&>tr]:font-medium [&>tr]:text-cui-secondary", e),
|
|
2089
2089
|
children: t
|
|
2090
2090
|
});
|
|
2091
2091
|
}), Dn = C(function({ className: e, children: t }, n) {
|
|
2092
|
-
return /* @__PURE__ */
|
|
2092
|
+
return /* @__PURE__ */ A("tbody", {
|
|
2093
2093
|
ref: n,
|
|
2094
|
-
className:
|
|
2094
|
+
className: W("[&>tr:not(:last-child)>td]:border-b [&>tr:not(:last-child)>td]:border-cui-neutral", e),
|
|
2095
2095
|
children: t
|
|
2096
2096
|
});
|
|
2097
2097
|
}), On = C(function({ className: e, children: t, onClick: n, ...r }, i) {
|
|
2098
|
-
return /* @__PURE__ */
|
|
2098
|
+
return /* @__PURE__ */ A("tr", {
|
|
2099
2099
|
ref: i,
|
|
2100
|
-
className:
|
|
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),
|
|
2101
2101
|
onClick: n,
|
|
2102
2102
|
...r,
|
|
2103
2103
|
children: t
|
|
2104
2104
|
});
|
|
2105
2105
|
}), kn = C(function({ width: e, colSpan: t, className: n, children: r }, i) {
|
|
2106
|
-
return /* @__PURE__ */
|
|
2106
|
+
return /* @__PURE__ */ A("th", {
|
|
2107
2107
|
ref: i,
|
|
2108
2108
|
style: e == null ? void 0 : { width: e },
|
|
2109
2109
|
colSpan: t,
|
|
2110
|
-
className:
|
|
2110
|
+
className: W("px-4 py-2.5 text-left text-cui-sm font-medium border-b border-cui-neutral", n),
|
|
2111
2111
|
children: r
|
|
2112
2112
|
});
|
|
2113
2113
|
}), An = C(function({ width: e, colSpan: t, className: n, children: r }, i) {
|
|
2114
|
-
return /* @__PURE__ */
|
|
2114
|
+
return /* @__PURE__ */ A("td", {
|
|
2115
2115
|
ref: i,
|
|
2116
2116
|
style: e == null ? void 0 : { width: e },
|
|
2117
2117
|
colSpan: t,
|
|
2118
|
-
className:
|
|
2118
|
+
className: W("px-4 py-3 text-cui-base", n),
|
|
2119
2119
|
children: r
|
|
2120
2120
|
});
|
|
2121
2121
|
});
|
|
2122
|
-
|
|
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;
|
|
2123
2135
|
//#endregion
|
|
2124
2136
|
//#region src/components/pagination/pagination.tsx
|
|
2125
|
-
var
|
|
2137
|
+
var Mn = {
|
|
2126
2138
|
sm: {
|
|
2127
2139
|
button: "size-7",
|
|
2128
2140
|
icon: "size-4",
|
|
@@ -2134,106 +2146,106 @@ var jn = {
|
|
|
2134
2146
|
strip: "h-10"
|
|
2135
2147
|
}
|
|
2136
2148
|
};
|
|
2137
|
-
function
|
|
2149
|
+
function Nn(e, t) {
|
|
2138
2150
|
let n = [];
|
|
2139
2151
|
for (let r = e; r <= t; r++) n.push(r);
|
|
2140
2152
|
return n;
|
|
2141
2153
|
}
|
|
2142
|
-
function
|
|
2143
|
-
if (t <= n * 2 + 5) return
|
|
2154
|
+
function Pn(e, t, n) {
|
|
2155
|
+
if (t <= n * 2 + 5) return Nn(1, t);
|
|
2144
2156
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
2145
2157
|
return !a && o ? [
|
|
2146
|
-
...
|
|
2158
|
+
...Nn(1, n * 2 + 3),
|
|
2147
2159
|
"ellipsis-end",
|
|
2148
2160
|
t
|
|
2149
2161
|
] : a && !o ? [
|
|
2150
2162
|
1,
|
|
2151
2163
|
"ellipsis-start",
|
|
2152
|
-
...
|
|
2164
|
+
...Nn(t - (n * 2 + 3) + 1, t)
|
|
2153
2165
|
] : [
|
|
2154
2166
|
1,
|
|
2155
2167
|
"ellipsis-start",
|
|
2156
|
-
...
|
|
2168
|
+
...Nn(r, i),
|
|
2157
2169
|
"ellipsis-end",
|
|
2158
2170
|
t
|
|
2159
2171
|
];
|
|
2160
2172
|
}
|
|
2161
|
-
function
|
|
2162
|
-
return /* @__PURE__ */
|
|
2173
|
+
function Fn({ page: e, active: t, onClick: n, buttonSize: r }) {
|
|
2174
|
+
return /* @__PURE__ */ A("button", {
|
|
2163
2175
|
type: "button",
|
|
2164
2176
|
"aria-current": t ? "page" : void 0,
|
|
2165
2177
|
onClick: n,
|
|
2166
|
-
className:
|
|
2178
|
+
className: W("rounded-sm flex items-center justify-center text-cui-base tabular-nums select-none cursor-pointer", r, "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150 motion-reduce:transition-none", t ? "bg-cui-base-2 text-cui-primary font-medium shadow-sm" : "text-cui-secondary hover:text-cui-primary hover:bg-cui-subtle"),
|
|
2167
2179
|
children: e
|
|
2168
2180
|
});
|
|
2169
2181
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return /* @__PURE__ */
|
|
2172
|
-
className:
|
|
2182
|
+
function In({ buttonSize: e }) {
|
|
2183
|
+
return /* @__PURE__ */ A("span", {
|
|
2184
|
+
className: W("text-cui-tertiary flex items-center justify-center text-cui-base select-none", e),
|
|
2173
2185
|
children: "..."
|
|
2174
2186
|
});
|
|
2175
2187
|
}
|
|
2176
|
-
function
|
|
2188
|
+
function Ln({ direction: e, disabled: t, onClick: n, buttonSize: r, iconSize: i }) {
|
|
2177
2189
|
let a = e === "prev" ? c : l;
|
|
2178
|
-
return /* @__PURE__ */
|
|
2190
|
+
return /* @__PURE__ */ A("button", {
|
|
2179
2191
|
type: "button",
|
|
2180
2192
|
"aria-label": e === "prev" ? "Previous page" : "Next page",
|
|
2181
2193
|
disabled: t,
|
|
2182
2194
|
onClick: n,
|
|
2183
|
-
className:
|
|
2184
|
-
children: /* @__PURE__ */
|
|
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"),
|
|
2196
|
+
children: /* @__PURE__ */ A(a, { className: i })
|
|
2185
2197
|
});
|
|
2186
2198
|
}
|
|
2187
|
-
var
|
|
2199
|
+
var Rn = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, rowsPerPage: i = 10, onRowsPerPageChange: a, rowOptions: o = [
|
|
2188
2200
|
10,
|
|
2189
2201
|
25,
|
|
2190
2202
|
50
|
|
2191
2203
|
], siblingCount: s = 1, size: c = "sm", className: l }, d) {
|
|
2192
|
-
let f =
|
|
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;
|
|
2193
2205
|
if (!h && !p && !m) return null;
|
|
2194
|
-
let v = h ?
|
|
2195
|
-
return /* @__PURE__ */
|
|
2206
|
+
let v = h ? Pn(e, t, s) : [];
|
|
2207
|
+
return /* @__PURE__ */ j("nav", {
|
|
2196
2208
|
ref: d,
|
|
2197
2209
|
"aria-label": "Pagination",
|
|
2198
|
-
className:
|
|
2210
|
+
className: W("flex items-center bg-cui-subtle rounded-md ring-1 ring-cui-neutral", l),
|
|
2199
2211
|
children: [
|
|
2200
|
-
p && /* @__PURE__ */
|
|
2201
|
-
className:
|
|
2202
|
-
children: [/* @__PURE__ */
|
|
2212
|
+
p && /* @__PURE__ */ j("div", {
|
|
2213
|
+
className: W("flex items-center gap-2 px-3", f.strip),
|
|
2214
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2203
2215
|
className: "text-cui-tertiary text-cui-base whitespace-nowrap",
|
|
2204
2216
|
children: "Rows per page"
|
|
2205
|
-
}), /* @__PURE__ */
|
|
2217
|
+
}), /* @__PURE__ */ j(Q.Root, { children: [/* @__PURE__ */ A(Q.Trigger, { children: /* @__PURE__ */ j("button", {
|
|
2206
2218
|
type: "button",
|
|
2207
|
-
className:
|
|
2208
|
-
children: [i, /* @__PURE__ */
|
|
2209
|
-
}) }), /* @__PURE__ */
|
|
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"),
|
|
2220
|
+
children: [i, /* @__PURE__ */ A(u, { className: "text-cui-tertiary size-3.5" })]
|
|
2221
|
+
}) }), /* @__PURE__ */ A(Q.Content, {
|
|
2210
2222
|
align: "start",
|
|
2211
2223
|
sideOffset: 4,
|
|
2212
2224
|
minWidth: "min-w-[80px]",
|
|
2213
|
-
children: o.map((e) => /* @__PURE__ */
|
|
2225
|
+
children: o.map((e) => /* @__PURE__ */ A(Q.Item, {
|
|
2214
2226
|
onClick: () => a?.(e),
|
|
2215
2227
|
children: e
|
|
2216
2228
|
}, e))
|
|
2217
2229
|
})] })]
|
|
2218
2230
|
}),
|
|
2219
|
-
p && h && /* @__PURE__ */
|
|
2220
|
-
h && /* @__PURE__ */
|
|
2221
|
-
className:
|
|
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),
|
|
2222
2234
|
children: [
|
|
2223
|
-
/* @__PURE__ */
|
|
2235
|
+
/* @__PURE__ */ A(Ln, {
|
|
2224
2236
|
direction: "prev",
|
|
2225
2237
|
disabled: e <= 1,
|
|
2226
2238
|
onClick: () => n?.(e - 1),
|
|
2227
2239
|
buttonSize: f.button,
|
|
2228
2240
|
iconSize: f.icon
|
|
2229
2241
|
}),
|
|
2230
|
-
v.map((t) => typeof t == "number" ? /* @__PURE__ */
|
|
2242
|
+
v.map((t) => typeof t == "number" ? /* @__PURE__ */ A(Fn, {
|
|
2231
2243
|
page: t,
|
|
2232
2244
|
active: t === e,
|
|
2233
2245
|
onClick: () => n?.(t),
|
|
2234
2246
|
buttonSize: f.button
|
|
2235
|
-
}, t) : /* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
2247
|
+
}, t) : /* @__PURE__ */ A(In, { buttonSize: f.button }, t)),
|
|
2248
|
+
/* @__PURE__ */ A(Ln, {
|
|
2237
2249
|
direction: "next",
|
|
2238
2250
|
disabled: e >= t,
|
|
2239
2251
|
onClick: () => n?.(e + 1),
|
|
@@ -2242,10 +2254,10 @@ var Ln = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, row
|
|
|
2242
2254
|
})
|
|
2243
2255
|
]
|
|
2244
2256
|
}),
|
|
2245
|
-
m && (h || p) && /* @__PURE__ */
|
|
2246
|
-
m && /* @__PURE__ */
|
|
2247
|
-
className:
|
|
2248
|
-
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", {
|
|
2249
2261
|
className: "text-cui-tertiary text-cui-base whitespace-nowrap tabular-nums",
|
|
2250
2262
|
children: [
|
|
2251
2263
|
g,
|
|
@@ -2261,24 +2273,24 @@ var Ln = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, row
|
|
|
2261
2273
|
});
|
|
2262
2274
|
//#endregion
|
|
2263
2275
|
//#region src/components/data-table/data-table.tsx
|
|
2264
|
-
function
|
|
2265
|
-
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" });
|
|
2266
2278
|
}
|
|
2267
|
-
function
|
|
2279
|
+
function Bn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize: i = 10, pageSizeOptions: a = [
|
|
2268
2280
|
10,
|
|
2269
2281
|
25,
|
|
2270
2282
|
50
|
|
2271
|
-
], selectable: o = !1, rowSelection: s, onRowSelectionChange: c, onRowClick: l,
|
|
2272
|
-
let [
|
|
2273
|
-
c(typeof e == "function" ? e(
|
|
2274
|
-
} :
|
|
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 ? [{
|
|
2275
2287
|
id: "_select",
|
|
2276
|
-
header: ({ table: e }) => /* @__PURE__ */
|
|
2288
|
+
header: ({ table: e }) => /* @__PURE__ */ A(Qe, {
|
|
2277
2289
|
checked: e.getIsAllPageRowsSelected(),
|
|
2278
2290
|
indeterminate: e.getIsSomePageRowsSelected(),
|
|
2279
2291
|
onCheckedChange: (t) => e.toggleAllPageRowsSelected(t)
|
|
2280
2292
|
}),
|
|
2281
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
2293
|
+
cell: ({ row: e }) => /* @__PURE__ */ A(Qe, {
|
|
2282
2294
|
checked: e.getIsSelected(),
|
|
2283
2295
|
disabled: !e.getCanSelect(),
|
|
2284
2296
|
onCheckedChange: (t) => e.toggleSelected(t)
|
|
@@ -2286,74 +2298,74 @@ function zn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize
|
|
|
2286
2298
|
enableSorting: !1,
|
|
2287
2299
|
enableHiding: !1,
|
|
2288
2300
|
size: 40
|
|
2289
|
-
}, ...e] : e, { state:
|
|
2301
|
+
}, ...e] : e, { state: te, ...T } = m ?? {}, E = de({
|
|
2290
2302
|
data: t,
|
|
2291
|
-
columns:
|
|
2303
|
+
columns: ee,
|
|
2292
2304
|
state: {
|
|
2293
|
-
sorting:
|
|
2294
|
-
columnFilters:
|
|
2295
|
-
columnVisibility:
|
|
2296
|
-
rowSelection:
|
|
2297
|
-
...
|
|
2305
|
+
sorting: h,
|
|
2306
|
+
columnFilters: _,
|
|
2307
|
+
columnVisibility: y,
|
|
2308
|
+
rowSelection: C,
|
|
2309
|
+
...te
|
|
2298
2310
|
},
|
|
2299
|
-
onSortingChange:
|
|
2300
|
-
onColumnFiltersChange:
|
|
2301
|
-
onColumnVisibilityChange:
|
|
2302
|
-
onRowSelectionChange:
|
|
2303
|
-
getCoreRowModel:
|
|
2304
|
-
getSortedRowModel:
|
|
2305
|
-
getFilteredRowModel:
|
|
2306
|
-
...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() },
|
|
2307
2319
|
enableRowSelection: o,
|
|
2308
2320
|
initialState: { pagination: { pageSize: i } },
|
|
2309
|
-
...
|
|
2310
|
-
}),
|
|
2311
|
-
return /* @__PURE__ */
|
|
2312
|
-
className:
|
|
2313
|
-
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) => {
|
|
2314
2326
|
let t = n && e.column.getCanSort(), r = e.column.getIsSorted();
|
|
2315
|
-
return /* @__PURE__ */
|
|
2327
|
+
return /* @__PURE__ */ A($.HeaderCell, {
|
|
2316
2328
|
width: e.getSize() === 150 ? void 0 : e.getSize(),
|
|
2317
|
-
className:
|
|
2318
|
-
children: e.isPlaceholder ? null : /* @__PURE__ */
|
|
2329
|
+
className: W(t && "cursor-pointer select-none group"),
|
|
2330
|
+
children: e.isPlaceholder ? null : /* @__PURE__ */ j("button", {
|
|
2319
2331
|
type: "button",
|
|
2320
|
-
className:
|
|
2332
|
+
className: W("flex items-center gap-1", t && "cursor-pointer"),
|
|
2321
2333
|
onClick: t ? e.column.getToggleSortingHandler() : void 0,
|
|
2322
2334
|
tabIndex: t ? 0 : -1,
|
|
2323
|
-
children: [
|
|
2335
|
+
children: [oe(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */ A(zn, { direction: r })]
|
|
2324
2336
|
})
|
|
2325
2337
|
}, e.id);
|
|
2326
|
-
}) }, 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, {
|
|
2327
2339
|
onClick: l ? () => l(e) : void 0,
|
|
2328
|
-
className:
|
|
2329
|
-
children: e.getVisibleCells().map((e) => /* @__PURE__ */
|
|
2340
|
+
className: W(e.getIsSelected() && "bg-cui-subtle"),
|
|
2341
|
+
children: e.getVisibleCells().map((e) => /* @__PURE__ */ A($.Cell, {
|
|
2330
2342
|
width: e.column.getSize() === 150 ? void 0 : e.column.getSize(),
|
|
2331
|
-
children:
|
|
2343
|
+
children: oe(e.column.columnDef.cell, e.getContext())
|
|
2332
2344
|
}, e.id))
|
|
2333
|
-
}, e.id)) : /* @__PURE__ */
|
|
2334
|
-
colSpan:
|
|
2345
|
+
}, e.id)) : /* @__PURE__ */ A($.Row, { children: /* @__PURE__ */ A($.Cell, {
|
|
2346
|
+
colSpan: ee.length,
|
|
2335
2347
|
className: "text-cui-tertiary py-8 text-center",
|
|
2336
|
-
children:
|
|
2337
|
-
}) }) })] }), r &&
|
|
2348
|
+
children: f
|
|
2349
|
+
}) }) })] }), r && D > 0 && /* @__PURE__ */ j("div", {
|
|
2338
2350
|
className: "flex items-center justify-between",
|
|
2339
|
-
children: [o && /* @__PURE__ */
|
|
2351
|
+
children: [o && /* @__PURE__ */ j("span", {
|
|
2340
2352
|
className: "text-cui-secondary text-cui-base",
|
|
2341
2353
|
children: [
|
|
2342
|
-
|
|
2354
|
+
E.getFilteredSelectedRowModel().rows.length,
|
|
2343
2355
|
" of",
|
|
2344
2356
|
" ",
|
|
2345
|
-
|
|
2357
|
+
E.getFilteredRowModel().rows.length,
|
|
2346
2358
|
" row(s) selected"
|
|
2347
2359
|
]
|
|
2348
|
-
}), /* @__PURE__ */
|
|
2349
|
-
className:
|
|
2350
|
-
children: /* @__PURE__ */
|
|
2351
|
-
page:
|
|
2352
|
-
pageCount:
|
|
2353
|
-
onPageChange: (e) =>
|
|
2354
|
-
totalItems:
|
|
2355
|
-
rowsPerPage:
|
|
2356
|
-
onRowsPerPageChange: (e) =>
|
|
2360
|
+
}), /* @__PURE__ */ A("div", {
|
|
2361
|
+
className: W(!o && "ml-auto"),
|
|
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),
|
|
2357
2369
|
rowOptions: a
|
|
2358
2370
|
})
|
|
2359
2371
|
})]
|
|
@@ -2362,22 +2374,22 @@ function zn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize
|
|
|
2362
2374
|
}
|
|
2363
2375
|
//#endregion
|
|
2364
2376
|
//#region src/components/data-table/data-table-toolbar.tsx
|
|
2365
|
-
var
|
|
2366
|
-
return /* @__PURE__ */
|
|
2377
|
+
var Vn = C(function({ children: e, className: t }, n) {
|
|
2378
|
+
return /* @__PURE__ */ A("div", {
|
|
2367
2379
|
ref: n,
|
|
2368
|
-
className:
|
|
2380
|
+
className: W("flex flex-wrap items-center gap-2", t),
|
|
2369
2381
|
children: e
|
|
2370
2382
|
});
|
|
2371
|
-
}),
|
|
2372
|
-
let a =
|
|
2383
|
+
}), Hn = C(function({ value: e, onChange: t, placeholder: n = "Search...", className: r }, i) {
|
|
2384
|
+
let a = D(null), o = w(() => {
|
|
2373
2385
|
t(""), a.current?.focus();
|
|
2374
2386
|
}, [t]);
|
|
2375
|
-
return /* @__PURE__ */
|
|
2387
|
+
return /* @__PURE__ */ j("div", {
|
|
2376
2388
|
ref: i,
|
|
2377
|
-
className:
|
|
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),
|
|
2378
2390
|
children: [
|
|
2379
|
-
/* @__PURE__ */
|
|
2380
|
-
/* @__PURE__ */
|
|
2391
|
+
/* @__PURE__ */ A(h, { className: "text-cui-tertiary size-4 shrink-0" }),
|
|
2392
|
+
/* @__PURE__ */ A("input", {
|
|
2381
2393
|
ref: a,
|
|
2382
2394
|
type: "text",
|
|
2383
2395
|
value: e,
|
|
@@ -2385,77 +2397,77 @@ var Bn = C(function({ children: e, className: t }, n) {
|
|
|
2385
2397
|
placeholder: n,
|
|
2386
2398
|
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base min-w-0 flex-1 bg-transparent outline-none"
|
|
2387
2399
|
}),
|
|
2388
|
-
e && /* @__PURE__ */
|
|
2400
|
+
e && /* @__PURE__ */ A("button", {
|
|
2389
2401
|
type: "button",
|
|
2390
2402
|
onClick: o,
|
|
2391
2403
|
className: "text-cui-tertiary hover:text-cui-secondary shrink-0 rounded-sm p-0.5 transition-colors",
|
|
2392
|
-
children: /* @__PURE__ */
|
|
2404
|
+
children: /* @__PURE__ */ A(x, { className: "size-3.5" })
|
|
2393
2405
|
})
|
|
2394
2406
|
]
|
|
2395
2407
|
});
|
|
2396
2408
|
});
|
|
2397
2409
|
//#endregion
|
|
2398
2410
|
//#region src/components/popover/popover.tsx
|
|
2399
|
-
function
|
|
2400
|
-
return /* @__PURE__ */
|
|
2411
|
+
function Un(e) {
|
|
2412
|
+
return /* @__PURE__ */ A(B.Root, { ...e });
|
|
2401
2413
|
}
|
|
2402
|
-
var
|
|
2403
|
-
return /* @__PURE__ */
|
|
2414
|
+
var Wn = C(function({ className: e, ...t }, n) {
|
|
2415
|
+
return /* @__PURE__ */ A(B.Trigger, {
|
|
2404
2416
|
ref: n,
|
|
2405
|
-
className:
|
|
2417
|
+
className: W("cursor-pointer outline-none", e),
|
|
2406
2418
|
...t
|
|
2407
2419
|
});
|
|
2408
2420
|
});
|
|
2409
|
-
function
|
|
2410
|
-
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, {
|
|
2411
2423
|
side: e,
|
|
2412
2424
|
align: t,
|
|
2413
2425
|
sideOffset: n,
|
|
2414
2426
|
className: "z-50 outline-none",
|
|
2415
|
-
children: /* @__PURE__ */
|
|
2416
|
-
className:
|
|
2427
|
+
children: /* @__PURE__ */ A(B.Popup, {
|
|
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),
|
|
2417
2429
|
...a,
|
|
2418
2430
|
children: i
|
|
2419
2431
|
})
|
|
2420
2432
|
}) });
|
|
2421
2433
|
}
|
|
2422
|
-
var
|
|
2423
|
-
Root:
|
|
2424
|
-
Trigger:
|
|
2425
|
-
Content:
|
|
2434
|
+
var Kn = {
|
|
2435
|
+
Root: Un,
|
|
2436
|
+
Trigger: Wn,
|
|
2437
|
+
Content: Gn,
|
|
2426
2438
|
Arrow: C(function({ className: e, ...t }, n) {
|
|
2427
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ A(B.Arrow, {
|
|
2428
2440
|
ref: n,
|
|
2429
|
-
className:
|
|
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),
|
|
2430
2442
|
...t
|
|
2431
2443
|
});
|
|
2432
2444
|
}),
|
|
2433
2445
|
Close: C(function({ className: e, ...t }, n) {
|
|
2434
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ A(B.Close, {
|
|
2435
2447
|
ref: n,
|
|
2436
|
-
className:
|
|
2448
|
+
className: W(e),
|
|
2437
2449
|
...t
|
|
2438
2450
|
});
|
|
2439
2451
|
}),
|
|
2440
2452
|
Title: C(function({ className: e, children: t }, n) {
|
|
2441
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ A("p", {
|
|
2442
2454
|
ref: n,
|
|
2443
|
-
className:
|
|
2455
|
+
className: W("text-cui-primary text-cui-base font-medium", e),
|
|
2444
2456
|
children: t
|
|
2445
2457
|
});
|
|
2446
2458
|
}),
|
|
2447
2459
|
Description: C(function({ className: e, ...t }, n) {
|
|
2448
|
-
return /* @__PURE__ */
|
|
2460
|
+
return /* @__PURE__ */ A(B.Description, {
|
|
2449
2461
|
ref: n,
|
|
2450
|
-
className:
|
|
2462
|
+
className: W("text-cui-secondary mt-1 text-cui-base", e),
|
|
2451
2463
|
...t
|
|
2452
2464
|
});
|
|
2453
2465
|
})
|
|
2454
2466
|
};
|
|
2455
2467
|
//#endregion
|
|
2456
2468
|
//#region src/components/data-table/data-table-faceted-filter.tsx
|
|
2457
|
-
function
|
|
2458
|
-
let [a, s] =
|
|
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;
|
|
2459
2471
|
function m(t) {
|
|
2460
2472
|
i ? i(t) : e?.setFilterValue(t.length ? t : void 0);
|
|
2461
2473
|
}
|
|
@@ -2463,48 +2475,48 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2463
2475
|
let t = new Set(d);
|
|
2464
2476
|
t.has(e) ? t.delete(e) : t.add(e), m(Array.from(t));
|
|
2465
2477
|
}
|
|
2466
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ j(Kn.Root, {
|
|
2467
2479
|
onOpenChange: (e) => {
|
|
2468
2480
|
e ? requestAnimationFrame(() => {
|
|
2469
2481
|
c.current?.focus({ preventScroll: !0 });
|
|
2470
2482
|
}) : s("");
|
|
2471
2483
|
},
|
|
2472
|
-
children: [/* @__PURE__ */
|
|
2473
|
-
render: /* @__PURE__ */
|
|
2474
|
-
className:
|
|
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"),
|
|
2475
2487
|
children: [
|
|
2476
|
-
/* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2488
|
+
/* @__PURE__ */ A(v, { className: "text-cui-tertiary size-4 shrink-0" }),
|
|
2489
|
+
/* @__PURE__ */ A("span", {
|
|
2478
2490
|
className: "text-cui-primary",
|
|
2479
2491
|
children: t
|
|
2480
2492
|
}),
|
|
2481
|
-
f && /* @__PURE__ */
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
/* @__PURE__ */
|
|
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, {
|
|
2484
2496
|
className: "rounded-sm px-1 font-medium lg:hidden",
|
|
2485
2497
|
children: d.size
|
|
2486
2498
|
}),
|
|
2487
|
-
/* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ A("span", {
|
|
2488
2500
|
className: "hidden items-center gap-1 lg:flex",
|
|
2489
|
-
children: d.size > 2 ? /* @__PURE__ */
|
|
2501
|
+
children: d.size > 2 ? /* @__PURE__ */ j(nn, {
|
|
2490
2502
|
className: "rounded-sm px-1 font-medium",
|
|
2491
2503
|
children: [d.size, " selected"]
|
|
2492
|
-
}) : n.filter((e) => d.has(e.value)).map((e) => /* @__PURE__ */
|
|
2504
|
+
}) : n.filter((e) => d.has(e.value)).map((e) => /* @__PURE__ */ A(nn, {
|
|
2493
2505
|
className: "rounded-sm px-1 font-medium",
|
|
2494
2506
|
children: e.label
|
|
2495
2507
|
}, e.value))
|
|
2496
2508
|
})
|
|
2497
2509
|
] })
|
|
2498
2510
|
]
|
|
2499
|
-
}), /* @__PURE__ */
|
|
2511
|
+
}), /* @__PURE__ */ j(Kn.Content, {
|
|
2500
2512
|
side: "bottom",
|
|
2501
2513
|
align: "start",
|
|
2502
2514
|
sideOffset: 4,
|
|
2503
2515
|
className: "w-[220px] p-1",
|
|
2504
2516
|
children: [
|
|
2505
|
-
/* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ A(q.SearchInput, {
|
|
2506
2518
|
className: "mx-0 mt-0",
|
|
2507
|
-
children: /* @__PURE__ */
|
|
2519
|
+
children: /* @__PURE__ */ A("input", {
|
|
2508
2520
|
ref: c,
|
|
2509
2521
|
value: a,
|
|
2510
2522
|
onChange: (e) => s(e.target.value),
|
|
@@ -2512,31 +2524,31 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2512
2524
|
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base flex-1 bg-transparent outline-none"
|
|
2513
2525
|
})
|
|
2514
2526
|
}),
|
|
2515
|
-
/* @__PURE__ */
|
|
2527
|
+
/* @__PURE__ */ j(q.List, { children: [p.length === 0 && /* @__PURE__ */ A(q.Empty, { children: "No results found." }), p.map((e) => {
|
|
2516
2528
|
let t = d.has(e.value);
|
|
2517
|
-
return /* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ j(q.Item, {
|
|
2518
2530
|
onClick: () => h(e.value),
|
|
2519
|
-
icon: /* @__PURE__ */
|
|
2520
|
-
className:
|
|
2521
|
-
children: /* @__PURE__ */
|
|
2531
|
+
icon: /* @__PURE__ */ A("div", {
|
|
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"),
|
|
2533
|
+
children: /* @__PURE__ */ A(o, { className: "size-3" })
|
|
2522
2534
|
}),
|
|
2523
|
-
indicator: l?.get(e.value) == null ? void 0 : /* @__PURE__ */
|
|
2535
|
+
indicator: l?.get(e.value) == null ? void 0 : /* @__PURE__ */ A("span", {
|
|
2524
2536
|
className: "text-cui-tertiary font-cui-mono text-cui-sm",
|
|
2525
2537
|
children: l.get(e.value)
|
|
2526
2538
|
}),
|
|
2527
|
-
children: [e.icon && /* @__PURE__ */
|
|
2539
|
+
children: [e.icon && /* @__PURE__ */ A("span", {
|
|
2528
2540
|
className: "text-cui-secondary flex size-4 shrink-0 items-center justify-center [&>svg]:size-3.5",
|
|
2529
2541
|
children: e.icon
|
|
2530
|
-
}), /* @__PURE__ */
|
|
2542
|
+
}), /* @__PURE__ */ A("span", {
|
|
2531
2543
|
className: "relative z-[1]",
|
|
2532
2544
|
children: e.label
|
|
2533
2545
|
})]
|
|
2534
2546
|
}, e.value);
|
|
2535
2547
|
})] }),
|
|
2536
|
-
f && /* @__PURE__ */
|
|
2548
|
+
f && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(q.Separator, {}), /* @__PURE__ */ A(q.Item, {
|
|
2537
2549
|
onClick: () => m([]),
|
|
2538
2550
|
className: "justify-center",
|
|
2539
|
-
children: /* @__PURE__ */
|
|
2551
|
+
children: /* @__PURE__ */ A("span", {
|
|
2540
2552
|
className: "relative z-[1]",
|
|
2541
2553
|
children: "Clear filters"
|
|
2542
2554
|
})
|
|
@@ -2547,8 +2559,8 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2547
2559
|
}
|
|
2548
2560
|
//#endregion
|
|
2549
2561
|
//#region src/components/segmented-group/segmented-group.tsx
|
|
2550
|
-
var
|
|
2551
|
-
let o = n === "fill", s =
|
|
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(() => {
|
|
2552
2564
|
if (n !== "fit") return;
|
|
2553
2565
|
let t = s.current;
|
|
2554
2566
|
if (!t) return;
|
|
@@ -2560,7 +2572,7 @@ var qn = C(function({ activeIndex: e, itemCount: t, layout: n = "fill", classNam
|
|
|
2560
2572
|
width: r.offsetWidth
|
|
2561
2573
|
}), i && r.offsetHeight;
|
|
2562
2574
|
}, [e, n]);
|
|
2563
|
-
|
|
2575
|
+
T(() => {
|
|
2564
2576
|
d();
|
|
2565
2577
|
let e = s.current;
|
|
2566
2578
|
if (!e || n !== "fit") return;
|
|
@@ -2575,118 +2587,118 @@ var qn = C(function({ activeIndex: e, itemCount: t, layout: n = "fill", classNam
|
|
|
2575
2587
|
width: c.width,
|
|
2576
2588
|
transition: u.current ? void 0 : "none"
|
|
2577
2589
|
} : { opacity: 0 };
|
|
2578
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ j("div", {
|
|
2579
2591
|
ref: (e) => {
|
|
2580
2592
|
s.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
2581
2593
|
},
|
|
2582
|
-
className:
|
|
2594
|
+
className: W("relative bg-cui-base-0 rounded-md ring-1 ring-cui-neutral", o ? "grid" : "inline-flex", r),
|
|
2583
2595
|
style: o ? { gridTemplateColumns: `repeat(${t}, 1fr)` } : void 0,
|
|
2584
|
-
children: [/* @__PURE__ */
|
|
2596
|
+
children: [/* @__PURE__ */ A("div", {
|
|
2585
2597
|
"aria-hidden": !0,
|
|
2586
|
-
className:
|
|
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"),
|
|
2587
2599
|
style: f,
|
|
2588
|
-
children: /* @__PURE__ */
|
|
2600
|
+
children: /* @__PURE__ */ A("div", { className: "bg-cui-base-2 h-full rounded-sm shadow-sm" })
|
|
2589
2601
|
}), i]
|
|
2590
2602
|
});
|
|
2591
|
-
}),
|
|
2592
|
-
return /* @__PURE__ */
|
|
2603
|
+
}), Yn = C(function({ active: e = !1, className: t, children: n, ...r }, i) {
|
|
2604
|
+
return /* @__PURE__ */ A("button", {
|
|
2593
2605
|
ref: i,
|
|
2594
2606
|
type: "button",
|
|
2595
2607
|
"data-segmented-item": "",
|
|
2596
|
-
className:
|
|
2608
|
+
className: W("relative z-10 flex items-center justify-center gap-1.5 px-2.5 h-7 rounded-sm", "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", e ? "text-cui-primary" : "text-cui-tertiary hover:text-cui-secondary", t),
|
|
2597
2609
|
...r,
|
|
2598
2610
|
children: n
|
|
2599
2611
|
});
|
|
2600
|
-
}),
|
|
2612
|
+
}), Xn = {
|
|
2601
2613
|
sm: "h-7 px-2.5",
|
|
2602
2614
|
md: "h-8 px-3"
|
|
2603
|
-
},
|
|
2604
|
-
let [c, l] =
|
|
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);
|
|
2605
2617
|
function p(e) {
|
|
2606
2618
|
u || l(e), r?.(e);
|
|
2607
2619
|
}
|
|
2608
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ A(Jn, {
|
|
2609
2621
|
ref: s,
|
|
2610
2622
|
activeIndex: f,
|
|
2611
2623
|
itemCount: e.length,
|
|
2612
2624
|
layout: i,
|
|
2613
2625
|
className: o,
|
|
2614
|
-
children: e.map((e) => /* @__PURE__ */
|
|
2626
|
+
children: e.map((e) => /* @__PURE__ */ j(Yn, {
|
|
2615
2627
|
active: e.value === d,
|
|
2616
2628
|
"aria-pressed": e.value === d,
|
|
2617
2629
|
onClick: () => p(e.value),
|
|
2618
|
-
className:
|
|
2619
|
-
children: [e.icon && /* @__PURE__ */
|
|
2630
|
+
className: Xn[a],
|
|
2631
|
+
children: [e.icon && /* @__PURE__ */ A("span", {
|
|
2620
2632
|
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2621
2633
|
children: e.icon
|
|
2622
|
-
}), e.label && /* @__PURE__ */
|
|
2634
|
+
}), e.label && /* @__PURE__ */ A("span", { children: e.label })]
|
|
2623
2635
|
}, e.value))
|
|
2624
2636
|
});
|
|
2625
|
-
}),
|
|
2637
|
+
}), Qn = [
|
|
2626
2638
|
{
|
|
2627
2639
|
value: "light",
|
|
2628
|
-
icon: /* @__PURE__ */
|
|
2640
|
+
icon: /* @__PURE__ */ A(y, {})
|
|
2629
2641
|
},
|
|
2630
2642
|
{
|
|
2631
2643
|
value: "dark",
|
|
2632
|
-
icon: /* @__PURE__ */
|
|
2644
|
+
icon: /* @__PURE__ */ A(_, {})
|
|
2633
2645
|
},
|
|
2634
2646
|
{
|
|
2635
2647
|
value: "system",
|
|
2636
|
-
icon: /* @__PURE__ */
|
|
2648
|
+
icon: /* @__PURE__ */ A(f, {})
|
|
2637
2649
|
}
|
|
2638
2650
|
];
|
|
2639
|
-
function
|
|
2640
|
-
return /* @__PURE__ */
|
|
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, {
|
|
2641
2653
|
className: l,
|
|
2642
|
-
children: o ?? /* @__PURE__ */
|
|
2654
|
+
children: o ?? /* @__PURE__ */ A(_t, {
|
|
2643
2655
|
initials: e.initials,
|
|
2644
2656
|
src: e.avatarUrl,
|
|
2645
2657
|
size: "sm",
|
|
2646
2658
|
className: "cursor-pointer"
|
|
2647
2659
|
})
|
|
2648
|
-
}), /* @__PURE__ */
|
|
2660
|
+
}), /* @__PURE__ */ j(Q.Content, {
|
|
2649
2661
|
side: s,
|
|
2650
2662
|
align: c,
|
|
2651
2663
|
sideOffset: 8,
|
|
2652
2664
|
minWidth: "min-w-[260px]",
|
|
2653
2665
|
children: [
|
|
2654
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ j("div", {
|
|
2655
2667
|
className: "flex items-center gap-2 px-2 py-1.5",
|
|
2656
|
-
children: [/* @__PURE__ */
|
|
2668
|
+
children: [/* @__PURE__ */ A(_t, {
|
|
2657
2669
|
initials: e.initials,
|
|
2658
2670
|
src: e.avatarUrl,
|
|
2659
2671
|
size: "md"
|
|
2660
|
-
}), /* @__PURE__ */
|
|
2672
|
+
}), /* @__PURE__ */ j("div", {
|
|
2661
2673
|
className: "flex flex-col gap-0.5",
|
|
2662
|
-
children: [/* @__PURE__ */
|
|
2674
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2663
2675
|
className: "text-cui-primary text-cui-base font-semibold",
|
|
2664
2676
|
children: e.name
|
|
2665
|
-
}), e.org && /* @__PURE__ */
|
|
2677
|
+
}), e.org && /* @__PURE__ */ A("span", {
|
|
2666
2678
|
className: "text-cui-tertiary text-cui-sm",
|
|
2667
2679
|
children: e.org
|
|
2668
2680
|
})]
|
|
2669
2681
|
})]
|
|
2670
2682
|
}),
|
|
2671
|
-
/* @__PURE__ */
|
|
2672
|
-
/* @__PURE__ */
|
|
2683
|
+
/* @__PURE__ */ A(Q.Separator, {}),
|
|
2684
|
+
/* @__PURE__ */ j("div", {
|
|
2673
2685
|
className: "flex items-center justify-between px-2 py-1.5",
|
|
2674
|
-
children: [/* @__PURE__ */
|
|
2686
|
+
children: [/* @__PURE__ */ A("span", {
|
|
2675
2687
|
className: "text-cui-primary text-cui-base",
|
|
2676
2688
|
children: "Theme"
|
|
2677
|
-
}), /* @__PURE__ */
|
|
2678
|
-
options:
|
|
2689
|
+
}), /* @__PURE__ */ A(Zn, {
|
|
2690
|
+
options: Qn,
|
|
2679
2691
|
value: t,
|
|
2680
2692
|
onValueChange: n
|
|
2681
2693
|
})]
|
|
2682
2694
|
}),
|
|
2683
|
-
i && i.length > 0 && /* @__PURE__ */
|
|
2695
|
+
i && i.length > 0 && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Q.Separator, {}), i.map((e) => /* @__PURE__ */ A(Q.Item, {
|
|
2684
2696
|
icon: e.icon,
|
|
2685
2697
|
onClick: e.onClick,
|
|
2686
2698
|
children: e.label
|
|
2687
2699
|
}, e.label))] }),
|
|
2688
|
-
a && /* @__PURE__ */
|
|
2689
|
-
icon: /* @__PURE__ */
|
|
2700
|
+
a && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Q.Separator, {}), /* @__PURE__ */ A(Q.Item, {
|
|
2701
|
+
icon: /* @__PURE__ */ A(r, {}),
|
|
2690
2702
|
onClick: a,
|
|
2691
2703
|
children: "Log out"
|
|
2692
2704
|
})] })
|
|
@@ -2695,7 +2707,7 @@ function Qn({ user: e, theme: t = "system", onThemeChange: n, items: i, onLogout
|
|
|
2695
2707
|
}
|
|
2696
2708
|
//#endregion
|
|
2697
2709
|
//#region src/components/alert/alert.tsx
|
|
2698
|
-
var
|
|
2710
|
+
var er = {
|
|
2699
2711
|
accent: {
|
|
2700
2712
|
container: "bg-cui-accent-subtle",
|
|
2701
2713
|
icon: "text-cui-accent",
|
|
@@ -2724,90 +2736,90 @@ var $n = {
|
|
|
2724
2736
|
pattern: "text-cui-danger",
|
|
2725
2737
|
defaultIcon: b
|
|
2726
2738
|
}
|
|
2727
|
-
},
|
|
2739
|
+
}, tr = {
|
|
2728
2740
|
maskImage: "linear-gradient(to left, black, transparent)",
|
|
2729
2741
|
WebkitMaskImage: "linear-gradient(to left, black, transparent)"
|
|
2730
|
-
},
|
|
2731
|
-
let c =
|
|
2732
|
-
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", {
|
|
2733
2745
|
ref: s,
|
|
2734
2746
|
role: "alert",
|
|
2735
|
-
className:
|
|
2747
|
+
className: W("relative flex w-full items-center justify-center overflow-hidden px-4 py-3", c.container, a),
|
|
2736
2748
|
children: [
|
|
2737
|
-
/* @__PURE__ */
|
|
2738
|
-
className:
|
|
2749
|
+
/* @__PURE__ */ A("div", {
|
|
2750
|
+
className: W("pointer-events-none absolute inset-0", c.pattern),
|
|
2739
2751
|
style: {
|
|
2740
2752
|
maskImage: "linear-gradient(to right, transparent, black 30%, black 70%, transparent)",
|
|
2741
2753
|
WebkitMaskImage: "linear-gradient(to right, transparent, black 30%, black 70%, transparent)"
|
|
2742
2754
|
},
|
|
2743
|
-
children: /* @__PURE__ */
|
|
2755
|
+
children: /* @__PURE__ */ A(un, {
|
|
2744
2756
|
squareSize: 4,
|
|
2745
2757
|
gridGap: 2,
|
|
2746
2758
|
flickerChance: .4,
|
|
2747
2759
|
maxOpacity: .15
|
|
2748
2760
|
})
|
|
2749
2761
|
}),
|
|
2750
|
-
/* @__PURE__ */
|
|
2762
|
+
/* @__PURE__ */ j("div", {
|
|
2751
2763
|
className: "relative flex items-center gap-3",
|
|
2752
2764
|
children: [
|
|
2753
|
-
/* @__PURE__ */
|
|
2754
|
-
className:
|
|
2755
|
-
children: n ?? /* @__PURE__ */
|
|
2765
|
+
/* @__PURE__ */ A("span", {
|
|
2766
|
+
className: W("flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", c.icon),
|
|
2767
|
+
children: n ?? /* @__PURE__ */ A(l, {})
|
|
2756
2768
|
}),
|
|
2757
|
-
/* @__PURE__ */
|
|
2758
|
-
className:
|
|
2769
|
+
/* @__PURE__ */ A("span", {
|
|
2770
|
+
className: W("text-cui-base font-medium", c.text),
|
|
2759
2771
|
children: o
|
|
2760
2772
|
}),
|
|
2761
|
-
r && /* @__PURE__ */
|
|
2773
|
+
r && /* @__PURE__ */ A("div", {
|
|
2762
2774
|
className: "shrink-0",
|
|
2763
2775
|
children: r
|
|
2764
2776
|
})
|
|
2765
2777
|
]
|
|
2766
2778
|
}),
|
|
2767
|
-
i && /* @__PURE__ */
|
|
2779
|
+
i && /* @__PURE__ */ A("div", {
|
|
2768
2780
|
className: "absolute right-2",
|
|
2769
|
-
children: /* @__PURE__ */
|
|
2781
|
+
children: /* @__PURE__ */ A(K, {
|
|
2770
2782
|
variant: "transparent",
|
|
2771
2783
|
size: "xs",
|
|
2772
|
-
iconLeft: /* @__PURE__ */
|
|
2784
|
+
iconLeft: /* @__PURE__ */ A(x, {}),
|
|
2773
2785
|
onClick: i,
|
|
2774
2786
|
"aria-label": "Dismiss"
|
|
2775
2787
|
})
|
|
2776
2788
|
})
|
|
2777
2789
|
]
|
|
2778
|
-
}) : /* @__PURE__ */
|
|
2790
|
+
}) : /* @__PURE__ */ j("div", {
|
|
2779
2791
|
ref: s,
|
|
2780
2792
|
role: "alert",
|
|
2781
|
-
className:
|
|
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),
|
|
2782
2794
|
children: [
|
|
2783
|
-
/* @__PURE__ */
|
|
2784
|
-
className:
|
|
2785
|
-
style:
|
|
2786
|
-
children: /* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ A("div", {
|
|
2796
|
+
className: W("pointer-events-none absolute top-0 right-0 h-full w-1/2", c.pattern),
|
|
2797
|
+
style: tr,
|
|
2798
|
+
children: /* @__PURE__ */ A(un, {
|
|
2787
2799
|
squareSize: 4,
|
|
2788
2800
|
gridGap: 2,
|
|
2789
2801
|
flickerChance: .4,
|
|
2790
2802
|
maxOpacity: .2
|
|
2791
2803
|
})
|
|
2792
2804
|
}),
|
|
2793
|
-
/* @__PURE__ */
|
|
2794
|
-
className:
|
|
2795
|
-
children: n ?? /* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ A("span", {
|
|
2806
|
+
className: W("relative flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", c.icon),
|
|
2807
|
+
children: n ?? /* @__PURE__ */ A(l, {})
|
|
2796
2808
|
}),
|
|
2797
|
-
/* @__PURE__ */
|
|
2798
|
-
className:
|
|
2809
|
+
/* @__PURE__ */ A("span", {
|
|
2810
|
+
className: W("relative flex-1 text-cui-base font-medium", c.text),
|
|
2799
2811
|
children: o
|
|
2800
2812
|
}),
|
|
2801
|
-
r && /* @__PURE__ */
|
|
2813
|
+
r && /* @__PURE__ */ A("div", {
|
|
2802
2814
|
className: "relative ml-auto shrink-0",
|
|
2803
2815
|
children: r
|
|
2804
2816
|
}),
|
|
2805
|
-
i && /* @__PURE__ */
|
|
2817
|
+
i && /* @__PURE__ */ A("div", {
|
|
2806
2818
|
className: "relative ml-auto shrink-0",
|
|
2807
|
-
children: /* @__PURE__ */
|
|
2819
|
+
children: /* @__PURE__ */ A(K, {
|
|
2808
2820
|
variant: "transparent",
|
|
2809
2821
|
size: "xs",
|
|
2810
|
-
iconLeft: /* @__PURE__ */
|
|
2822
|
+
iconLeft: /* @__PURE__ */ A(x, {}),
|
|
2811
2823
|
onClick: i,
|
|
2812
2824
|
"aria-label": "Dismiss"
|
|
2813
2825
|
})
|
|
@@ -2817,95 +2829,95 @@ var $n = {
|
|
|
2817
2829
|
});
|
|
2818
2830
|
//#endregion
|
|
2819
2831
|
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
2820
|
-
function
|
|
2821
|
-
return /* @__PURE__ */
|
|
2832
|
+
function rr(e) {
|
|
2833
|
+
return /* @__PURE__ */ A(V.Root, { ...e });
|
|
2822
2834
|
}
|
|
2823
|
-
var
|
|
2824
|
-
return /* @__PURE__ */
|
|
2835
|
+
var ir = C(function({ className: e, ...t }, n) {
|
|
2836
|
+
return /* @__PURE__ */ A(V.Trigger, {
|
|
2825
2837
|
ref: n,
|
|
2826
|
-
className:
|
|
2838
|
+
className: W(e),
|
|
2827
2839
|
...t
|
|
2828
2840
|
});
|
|
2829
|
-
}),
|
|
2830
|
-
return /* @__PURE__ */
|
|
2841
|
+
}), ar = C(function({ className: e, ...t }, n) {
|
|
2842
|
+
return /* @__PURE__ */ A(V.Backdrop, {
|
|
2831
2843
|
ref: n,
|
|
2832
|
-
className:
|
|
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),
|
|
2833
2845
|
...t
|
|
2834
2846
|
});
|
|
2835
2847
|
});
|
|
2836
|
-
function
|
|
2837
|
-
return /* @__PURE__ */
|
|
2838
|
-
className:
|
|
2848
|
+
function or({ className: e, children: t, ...n }) {
|
|
2849
|
+
return /* @__PURE__ */ j(V.Portal, { children: [/* @__PURE__ */ A(ar, {}), /* @__PURE__ */ A(V.Popup, {
|
|
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),
|
|
2839
2851
|
...n,
|
|
2840
2852
|
children: t
|
|
2841
2853
|
})] });
|
|
2842
2854
|
}
|
|
2843
|
-
var
|
|
2844
|
-
Root:
|
|
2845
|
-
Trigger:
|
|
2846
|
-
Content:
|
|
2855
|
+
var sr = {
|
|
2856
|
+
Root: rr,
|
|
2857
|
+
Trigger: ir,
|
|
2858
|
+
Content: or,
|
|
2847
2859
|
Panel: C(function({ className: e, children: t }, n) {
|
|
2848
|
-
return /* @__PURE__ */
|
|
2860
|
+
return /* @__PURE__ */ A("div", {
|
|
2849
2861
|
ref: n,
|
|
2850
|
-
className:
|
|
2862
|
+
className: W("bg-cui-base-2 border-cui-neutral rounded-md border", e),
|
|
2851
2863
|
children: t
|
|
2852
2864
|
});
|
|
2853
2865
|
}),
|
|
2854
2866
|
Title: C(function({ className: e, ...t }, n) {
|
|
2855
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ A(V.Title, {
|
|
2856
2868
|
ref: n,
|
|
2857
|
-
className:
|
|
2869
|
+
className: W("text-cui-primary border-cui-neutral border-b px-4 py-3 text-cui-base font-medium", e),
|
|
2858
2870
|
...t
|
|
2859
2871
|
});
|
|
2860
2872
|
}),
|
|
2861
2873
|
Description: C(function({ className: e, ...t }, n) {
|
|
2862
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ A(V.Description, {
|
|
2863
2875
|
ref: n,
|
|
2864
|
-
className:
|
|
2876
|
+
className: W("text-cui-secondary p-4 text-cui-base", e),
|
|
2865
2877
|
...t
|
|
2866
2878
|
});
|
|
2867
2879
|
}),
|
|
2868
2880
|
Actions: C(function({ className: e, children: t }, n) {
|
|
2869
|
-
return /* @__PURE__ */
|
|
2881
|
+
return /* @__PURE__ */ A("div", {
|
|
2870
2882
|
ref: n,
|
|
2871
|
-
className:
|
|
2883
|
+
className: W("flex items-center justify-end gap-2 p-2", e),
|
|
2872
2884
|
children: t
|
|
2873
2885
|
});
|
|
2874
2886
|
}),
|
|
2875
2887
|
Close: C(function({ className: e, ...t }, n) {
|
|
2876
|
-
return /* @__PURE__ */
|
|
2888
|
+
return /* @__PURE__ */ A(V.Close, {
|
|
2877
2889
|
ref: n,
|
|
2878
|
-
className:
|
|
2890
|
+
className: W(e),
|
|
2879
2891
|
...t
|
|
2880
2892
|
});
|
|
2881
2893
|
})
|
|
2882
|
-
},
|
|
2894
|
+
}, cr = {
|
|
2883
2895
|
Root: C(function({ className: e, ...t }, n) {
|
|
2884
|
-
return /* @__PURE__ */
|
|
2896
|
+
return /* @__PURE__ */ A(fe.Root, {
|
|
2885
2897
|
ref: n,
|
|
2886
|
-
className:
|
|
2898
|
+
className: W("flex flex-col", e),
|
|
2887
2899
|
...t
|
|
2888
2900
|
});
|
|
2889
2901
|
}),
|
|
2890
2902
|
Item: C(function({ className: e, ...t }, n) {
|
|
2891
|
-
return /* @__PURE__ */
|
|
2903
|
+
return /* @__PURE__ */ A(fe.Item, {
|
|
2892
2904
|
ref: n,
|
|
2893
|
-
className:
|
|
2905
|
+
className: W("border-cui-neutral border-b last:border-b-0", e),
|
|
2894
2906
|
...t
|
|
2895
2907
|
});
|
|
2896
2908
|
}),
|
|
2897
2909
|
Trigger: C(function({ icon: e, className: t, children: n, ...r }, i) {
|
|
2898
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ j(fe.Trigger, {
|
|
2899
2911
|
ref: i,
|
|
2900
|
-
className:
|
|
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),
|
|
2901
2913
|
...r,
|
|
2902
2914
|
children: [
|
|
2903
|
-
/* @__PURE__ */
|
|
2904
|
-
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", {
|
|
2905
2917
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2906
2918
|
children: e
|
|
2907
2919
|
}),
|
|
2908
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ A("span", {
|
|
2909
2921
|
className: "flex-1 text-left",
|
|
2910
2922
|
children: n
|
|
2911
2923
|
})
|
|
@@ -2913,24 +2925,24 @@ var or = {
|
|
|
2913
2925
|
});
|
|
2914
2926
|
}),
|
|
2915
2927
|
Content: C(function({ className: e, children: t, ...n }, r) {
|
|
2916
|
-
return /* @__PURE__ */
|
|
2928
|
+
return /* @__PURE__ */ A(fe.Panel, {
|
|
2917
2929
|
ref: r,
|
|
2918
|
-
className:
|
|
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),
|
|
2919
2931
|
...n,
|
|
2920
|
-
children: /* @__PURE__ */
|
|
2932
|
+
children: /* @__PURE__ */ A("div", {
|
|
2921
2933
|
className: "text-cui-secondary text-cui-base pb-3",
|
|
2922
2934
|
children: t
|
|
2923
2935
|
})
|
|
2924
2936
|
});
|
|
2925
2937
|
})
|
|
2926
|
-
},
|
|
2927
|
-
return /* @__PURE__ */
|
|
2938
|
+
}, lr = C(function({ className: e, ...t }, n) {
|
|
2939
|
+
return /* @__PURE__ */ A(pe.Root, {
|
|
2928
2940
|
ref: n,
|
|
2929
|
-
className:
|
|
2941
|
+
className: W("flex flex-col", e),
|
|
2930
2942
|
...t
|
|
2931
2943
|
});
|
|
2932
|
-
}),
|
|
2933
|
-
let a =
|
|
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(() => {
|
|
2934
2946
|
let e = a.current;
|
|
2935
2947
|
if (!e) return;
|
|
2936
2948
|
let t = e.querySelectorAll("[role='tab']");
|
|
@@ -2940,7 +2952,7 @@ var or = {
|
|
|
2940
2952
|
(e.getAttribute("data-active") !== null || e.getAttribute("aria-selected") === "true") && (n = t);
|
|
2941
2953
|
}), n < 0 && (n = 0), l(n);
|
|
2942
2954
|
}, []);
|
|
2943
|
-
return
|
|
2955
|
+
return T(() => {
|
|
2944
2956
|
u();
|
|
2945
2957
|
let e = a.current;
|
|
2946
2958
|
if (!e) return;
|
|
@@ -2954,7 +2966,7 @@ var or = {
|
|
|
2954
2966
|
return n.observe(e), () => {
|
|
2955
2967
|
t.disconnect(), n.disconnect();
|
|
2956
2968
|
};
|
|
2957
|
-
}, [u]), /* @__PURE__ */
|
|
2969
|
+
}, [u]), /* @__PURE__ */ A(Jn, {
|
|
2958
2970
|
ref: (e) => {
|
|
2959
2971
|
a.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
2960
2972
|
},
|
|
@@ -2962,216 +2974,216 @@ var or = {
|
|
|
2962
2974
|
itemCount: o,
|
|
2963
2975
|
layout: t,
|
|
2964
2976
|
className: typeof e == "string" ? e : void 0,
|
|
2965
|
-
children: /* @__PURE__ */
|
|
2977
|
+
children: /* @__PURE__ */ A(pe.List, {
|
|
2966
2978
|
className: "contents",
|
|
2967
2979
|
...r,
|
|
2968
2980
|
children: n
|
|
2969
2981
|
})
|
|
2970
2982
|
});
|
|
2971
|
-
}),
|
|
2983
|
+
}), dr = {
|
|
2972
2984
|
sm: "h-7 px-2.5",
|
|
2973
2985
|
md: "h-8 px-3"
|
|
2974
|
-
},
|
|
2975
|
-
Root:
|
|
2976
|
-
List:
|
|
2986
|
+
}, fr = {
|
|
2987
|
+
Root: lr,
|
|
2988
|
+
List: ur,
|
|
2977
2989
|
Tab: C(function({ size: e = "sm", className: t, children: n, ...r }, i) {
|
|
2978
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ A(pe.Tab, {
|
|
2979
2991
|
ref: i,
|
|
2980
2992
|
"data-segmented-item": "",
|
|
2981
|
-
className:
|
|
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),
|
|
2982
2994
|
...r,
|
|
2983
2995
|
children: n
|
|
2984
2996
|
});
|
|
2985
2997
|
}),
|
|
2986
2998
|
Panel: C(function({ className: e, ...t }, n) {
|
|
2987
|
-
return /* @__PURE__ */
|
|
2999
|
+
return /* @__PURE__ */ A(pe.Panel, {
|
|
2988
3000
|
ref: n,
|
|
2989
|
-
className:
|
|
3001
|
+
className: W("rounded-sm pt-3 outline-none", "focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", e),
|
|
2990
3002
|
...t
|
|
2991
3003
|
});
|
|
2992
3004
|
})
|
|
2993
|
-
},
|
|
3005
|
+
}, pr = {
|
|
2994
3006
|
right: "right",
|
|
2995
3007
|
left: "left",
|
|
2996
3008
|
bottom: "down",
|
|
2997
3009
|
top: "up"
|
|
2998
|
-
},
|
|
3010
|
+
}, mr = {
|
|
2999
3011
|
right: "inset-y-0 right-0 w-[min(420px,90vw)] p-2",
|
|
3000
3012
|
left: "inset-y-0 left-0 w-[min(420px,90vw)] p-2",
|
|
3001
3013
|
bottom: "inset-x-0 bottom-0 max-h-[85vh] p-2",
|
|
3002
3014
|
top: "inset-x-0 top-0 max-h-[85vh] p-2"
|
|
3003
3015
|
};
|
|
3004
|
-
function
|
|
3005
|
-
return /* @__PURE__ */
|
|
3006
|
-
swipeDirection:
|
|
3016
|
+
function hr({ side: e = "right", responsive: t, children: n, ...r }) {
|
|
3017
|
+
return /* @__PURE__ */ A(H.Root, {
|
|
3018
|
+
swipeDirection: pr[e],
|
|
3007
3019
|
...r,
|
|
3008
3020
|
children: n
|
|
3009
3021
|
});
|
|
3010
3022
|
}
|
|
3011
|
-
var
|
|
3012
|
-
return /* @__PURE__ */
|
|
3023
|
+
var gr = C(function({ className: e, ...t }, n) {
|
|
3024
|
+
return /* @__PURE__ */ A(H.Trigger, {
|
|
3013
3025
|
ref: n,
|
|
3014
|
-
className:
|
|
3026
|
+
className: W(e),
|
|
3015
3027
|
...t
|
|
3016
3028
|
});
|
|
3017
|
-
}),
|
|
3018
|
-
return /* @__PURE__ */
|
|
3029
|
+
}), _r = C(function({ className: e, ...t }, n) {
|
|
3030
|
+
return /* @__PURE__ */ A(H.Backdrop, {
|
|
3019
3031
|
ref: n,
|
|
3020
|
-
className:
|
|
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),
|
|
3021
3033
|
...t
|
|
3022
3034
|
});
|
|
3023
3035
|
});
|
|
3024
|
-
function
|
|
3025
|
-
return /* @__PURE__ */
|
|
3026
|
-
className:
|
|
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 && [
|
|
3027
3039
|
"max-md:inset-x-0 max-md:inset-y-auto max-md:bottom-0 max-md:right-auto max-md:left-auto",
|
|
3028
3040
|
"max-md:w-full max-md:max-h-[85vh]",
|
|
3029
3041
|
"max-md:data-[starting-style]:translate-x-0 max-md:data-[starting-style]:translate-y-[20%]",
|
|
3030
3042
|
"max-md:data-[ending-style]:translate-x-0 max-md:data-[ending-style]:translate-y-[20%]"
|
|
3031
3043
|
]),
|
|
3032
3044
|
...i,
|
|
3033
|
-
children: /* @__PURE__ */
|
|
3034
|
-
className:
|
|
3035
|
-
children: /* @__PURE__ */
|
|
3045
|
+
children: /* @__PURE__ */ A("div", {
|
|
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),
|
|
3047
|
+
children: /* @__PURE__ */ A("div", {
|
|
3036
3048
|
className: "bg-cui-base-2 border-cui-neutral flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border",
|
|
3037
3049
|
children: r
|
|
3038
3050
|
})
|
|
3039
3051
|
})
|
|
3040
3052
|
})] });
|
|
3041
3053
|
}
|
|
3042
|
-
var
|
|
3043
|
-
Root:
|
|
3044
|
-
Trigger:
|
|
3045
|
-
Content:
|
|
3054
|
+
var yr = {
|
|
3055
|
+
Root: hr,
|
|
3056
|
+
Trigger: gr,
|
|
3057
|
+
Content: vr,
|
|
3046
3058
|
Header: C(function({ className: e, children: t }, n) {
|
|
3047
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ A("div", {
|
|
3048
3060
|
ref: n,
|
|
3049
|
-
className:
|
|
3061
|
+
className: W("border-cui-neutral flex items-center justify-between border-b px-4 py-3", e),
|
|
3050
3062
|
children: t
|
|
3051
3063
|
});
|
|
3052
3064
|
}),
|
|
3053
3065
|
Title: C(function({ className: e, ...t }, n) {
|
|
3054
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ A(H.Title, {
|
|
3055
3067
|
ref: n,
|
|
3056
|
-
className:
|
|
3068
|
+
className: W("text-cui-primary text-cui-base font-medium", e),
|
|
3057
3069
|
...t
|
|
3058
3070
|
});
|
|
3059
3071
|
}),
|
|
3060
3072
|
Description: C(function({ className: e, ...t }, n) {
|
|
3061
|
-
return /* @__PURE__ */
|
|
3073
|
+
return /* @__PURE__ */ A(H.Description, {
|
|
3062
3074
|
ref: n,
|
|
3063
|
-
className:
|
|
3075
|
+
className: W("text-cui-secondary text-cui-base", e),
|
|
3064
3076
|
...t
|
|
3065
3077
|
});
|
|
3066
3078
|
}),
|
|
3067
3079
|
Body: C(function({ className: e, children: t }, n) {
|
|
3068
|
-
return /* @__PURE__ */
|
|
3080
|
+
return /* @__PURE__ */ A("div", {
|
|
3069
3081
|
ref: n,
|
|
3070
|
-
className:
|
|
3082
|
+
className: W("flex-1 overflow-y-auto p-4", e),
|
|
3071
3083
|
children: t
|
|
3072
3084
|
});
|
|
3073
3085
|
}),
|
|
3074
3086
|
Footer: C(function({ className: e, children: t }, n) {
|
|
3075
|
-
return /* @__PURE__ */
|
|
3087
|
+
return /* @__PURE__ */ A("div", {
|
|
3076
3088
|
ref: n,
|
|
3077
|
-
className:
|
|
3089
|
+
className: W("border-cui-neutral flex items-center justify-end gap-2 border-t p-3", e),
|
|
3078
3090
|
children: t
|
|
3079
3091
|
});
|
|
3080
3092
|
}),
|
|
3081
3093
|
Close: C(function({ asIcon: e, className: t, children: n, ...r }, i) {
|
|
3082
|
-
return e ?? !n ? /* @__PURE__ */
|
|
3094
|
+
return e ?? !n ? /* @__PURE__ */ A(H.Close, {
|
|
3083
3095
|
ref: i,
|
|
3084
|
-
className:
|
|
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),
|
|
3085
3097
|
...r,
|
|
3086
|
-
children: /* @__PURE__ */
|
|
3087
|
-
}) : /* @__PURE__ */
|
|
3098
|
+
children: /* @__PURE__ */ A(x, { className: "size-4" })
|
|
3099
|
+
}) : /* @__PURE__ */ A(H.Close, {
|
|
3088
3100
|
ref: i,
|
|
3089
|
-
className:
|
|
3101
|
+
className: W(t),
|
|
3090
3102
|
...r,
|
|
3091
3103
|
children: n
|
|
3092
3104
|
});
|
|
3093
3105
|
})
|
|
3094
|
-
},
|
|
3095
|
-
return /* @__PURE__ */
|
|
3106
|
+
}, br = C(function({ className: e, ...t }, n) {
|
|
3107
|
+
return /* @__PURE__ */ A(U, {
|
|
3096
3108
|
ref: n,
|
|
3097
|
-
className:
|
|
3109
|
+
className: W("bg-cui-base-2 flex h-full w-full flex-col overflow-hidden rounded-lg", e),
|
|
3098
3110
|
...t
|
|
3099
3111
|
});
|
|
3100
|
-
}),
|
|
3101
|
-
return /* @__PURE__ */
|
|
3112
|
+
}), xr = C(function({ className: e, ...t }, n) {
|
|
3113
|
+
return /* @__PURE__ */ A(q.SearchInput, {
|
|
3102
3114
|
className: "mb-0 bg-transparent px-2",
|
|
3103
|
-
children: /* @__PURE__ */
|
|
3115
|
+
children: /* @__PURE__ */ A(U.Input, {
|
|
3104
3116
|
ref: n,
|
|
3105
|
-
className:
|
|
3117
|
+
className: W("text-cui-primary placeholder:text-cui-tertiary flex-1 bg-transparent py-1.5 text-cui-base outline-none", e),
|
|
3106
3118
|
...t
|
|
3107
3119
|
})
|
|
3108
3120
|
});
|
|
3109
|
-
}),
|
|
3110
|
-
return /* @__PURE__ */
|
|
3121
|
+
}), Sr = C(function({ className: e, ...t }, n) {
|
|
3122
|
+
return /* @__PURE__ */ A(U.List, {
|
|
3111
3123
|
ref: n,
|
|
3112
|
-
className:
|
|
3124
|
+
className: W("max-h-[300px] overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
|
|
3113
3125
|
...t
|
|
3114
3126
|
});
|
|
3115
|
-
}),
|
|
3116
|
-
return /* @__PURE__ */
|
|
3127
|
+
}), Cr = C(function({ className: e, ...t }, n) {
|
|
3128
|
+
return /* @__PURE__ */ A(U.Empty, {
|
|
3117
3129
|
ref: n,
|
|
3118
|
-
className:
|
|
3130
|
+
className: W("text-cui-secondary px-2 py-4 text-center text-cui-base", e),
|
|
3119
3131
|
...t
|
|
3120
3132
|
});
|
|
3121
|
-
}),
|
|
3122
|
-
return /* @__PURE__ */
|
|
3133
|
+
}), wr = C(function({ className: e, ...t }, n) {
|
|
3134
|
+
return /* @__PURE__ */ A(U.Group, {
|
|
3123
3135
|
ref: n,
|
|
3124
|
-
className:
|
|
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),
|
|
3125
3137
|
...t
|
|
3126
3138
|
});
|
|
3127
|
-
}),
|
|
3128
|
-
return /* @__PURE__ */
|
|
3139
|
+
}), Tr = C(function({ icon: e, shortcut: t, className: n, children: r, ...i }, a) {
|
|
3140
|
+
return /* @__PURE__ */ j(U.Item, {
|
|
3129
3141
|
ref: a,
|
|
3130
|
-
className:
|
|
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),
|
|
3131
3143
|
...i,
|
|
3132
3144
|
children: [
|
|
3133
|
-
/* @__PURE__ */
|
|
3134
|
-
e && /* @__PURE__ */
|
|
3135
|
-
className:
|
|
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", {
|
|
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"),
|
|
3136
3148
|
children: e
|
|
3137
3149
|
}),
|
|
3138
|
-
/* @__PURE__ */
|
|
3150
|
+
/* @__PURE__ */ A("span", {
|
|
3139
3151
|
className: "relative z-[1] flex-1",
|
|
3140
3152
|
children: r
|
|
3141
3153
|
}),
|
|
3142
|
-
t && /* @__PURE__ */
|
|
3154
|
+
t && /* @__PURE__ */ A("kbd", {
|
|
3143
3155
|
className: "text-cui-tertiary text-cui-sm pointer-events-none relative z-[1] ml-auto tracking-widest",
|
|
3144
3156
|
children: t
|
|
3145
3157
|
})
|
|
3146
3158
|
]
|
|
3147
3159
|
});
|
|
3148
|
-
}),
|
|
3149
|
-
return /* @__PURE__ */
|
|
3160
|
+
}), Er = C(function({ className: e, ...t }, n) {
|
|
3161
|
+
return /* @__PURE__ */ A(U.Separator, {
|
|
3150
3162
|
ref: n,
|
|
3151
|
-
className:
|
|
3163
|
+
className: W("border-cui-neutral mx-2 my-1 border-t", e),
|
|
3152
3164
|
...t
|
|
3153
3165
|
});
|
|
3154
3166
|
});
|
|
3155
|
-
function
|
|
3156
|
-
return /* @__PURE__ */
|
|
3167
|
+
function Dr({ open: e, onOpenChange: t, children: n, className: r }) {
|
|
3168
|
+
return /* @__PURE__ */ A(z.Root, {
|
|
3157
3169
|
open: e,
|
|
3158
3170
|
onOpenChange: t,
|
|
3159
|
-
children: /* @__PURE__ */
|
|
3160
|
-
className:
|
|
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, {
|
|
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),
|
|
3161
3173
|
children: n
|
|
3162
3174
|
})] })
|
|
3163
3175
|
});
|
|
3164
3176
|
}
|
|
3165
|
-
var
|
|
3166
|
-
Root:
|
|
3167
|
-
Input:
|
|
3168
|
-
List:
|
|
3169
|
-
Empty:
|
|
3170
|
-
Group:
|
|
3171
|
-
Item:
|
|
3172
|
-
Separator:
|
|
3173
|
-
Dialog:
|
|
3174
|
-
},
|
|
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 = {
|
|
3175
3187
|
xs: {
|
|
3176
3188
|
height: "h-6",
|
|
3177
3189
|
padding: "px-1.5",
|
|
@@ -3190,53 +3202,53 @@ var Dr = {
|
|
|
3190
3202
|
textPadding: "px-1",
|
|
3191
3203
|
icon: "w-8"
|
|
3192
3204
|
}
|
|
3193
|
-
},
|
|
3194
|
-
let c =
|
|
3195
|
-
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, {
|
|
3196
3208
|
ref: s,
|
|
3197
3209
|
disabled: r,
|
|
3198
|
-
className:
|
|
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),
|
|
3199
3211
|
...o,
|
|
3200
3212
|
children: [
|
|
3201
|
-
/* @__PURE__ */
|
|
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 && [
|
|
3202
3214
|
"transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none",
|
|
3203
3215
|
"group-hover/toggle-btn:bg-cui-subtle",
|
|
3204
3216
|
"group-active/toggle-btn:inset-px"
|
|
3205
3217
|
]) }),
|
|
3206
|
-
t && /* @__PURE__ */
|
|
3218
|
+
t && /* @__PURE__ */ A("span", {
|
|
3207
3219
|
className: "relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
3208
3220
|
children: t
|
|
3209
3221
|
}),
|
|
3210
|
-
a && /* @__PURE__ */
|
|
3211
|
-
className:
|
|
3222
|
+
a && /* @__PURE__ */ A("span", {
|
|
3223
|
+
className: W("relative z-[1] inline", c.textPadding),
|
|
3212
3224
|
children: a
|
|
3213
3225
|
}),
|
|
3214
|
-
n && /* @__PURE__ */
|
|
3226
|
+
n && /* @__PURE__ */ A("span", {
|
|
3215
3227
|
className: "relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
3216
3228
|
children: n
|
|
3217
3229
|
})
|
|
3218
3230
|
]
|
|
3219
3231
|
});
|
|
3220
|
-
}),
|
|
3221
|
-
return /* @__PURE__ */
|
|
3232
|
+
}), jr = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
3233
|
+
return /* @__PURE__ */ A("div", {
|
|
3222
3234
|
ref: r,
|
|
3223
3235
|
role: "group",
|
|
3224
|
-
className:
|
|
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),
|
|
3225
3237
|
...n
|
|
3226
3238
|
});
|
|
3227
|
-
}),
|
|
3228
|
-
return /* @__PURE__ */
|
|
3239
|
+
}), Mr = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
3240
|
+
return /* @__PURE__ */ A(he, {
|
|
3229
3241
|
ref: r,
|
|
3230
|
-
className:
|
|
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),
|
|
3231
3243
|
...n
|
|
3232
3244
|
});
|
|
3233
|
-
}),
|
|
3234
|
-
return /* @__PURE__ */
|
|
3235
|
-
ref:
|
|
3236
|
-
className:
|
|
3237
|
-
...
|
|
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
|
|
3238
3250
|
});
|
|
3239
|
-
}),
|
|
3251
|
+
}), Pr = {
|
|
3240
3252
|
sm: {
|
|
3241
3253
|
radio: "size-4",
|
|
3242
3254
|
indicator: "size-1.5",
|
|
@@ -3247,42 +3259,71 @@ var Dr = {
|
|
|
3247
3259
|
indicator: "size-2",
|
|
3248
3260
|
label: "text-cui-base"
|
|
3249
3261
|
}
|
|
3250
|
-
},
|
|
3251
|
-
Root
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
className:
|
|
3262
|
-
children:
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
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", {
|
|
3270
3311
|
ref: u,
|
|
3271
3312
|
"aria-live": "polite",
|
|
3272
|
-
className:
|
|
3273
|
-
children: /* @__PURE__ */
|
|
3274
|
-
className:
|
|
3275
|
-
children: [/* @__PURE__ */
|
|
3313
|
+
className: W("pointer-events-none fixed inset-x-0 bottom-0 z-50 flex justify-center pb-6", l),
|
|
3314
|
+
children: /* @__PURE__ */ j("div", {
|
|
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"),
|
|
3316
|
+
children: [/* @__PURE__ */ A("span", {
|
|
3276
3317
|
className: "text-cui-primary text-cui-base font-medium",
|
|
3277
3318
|
children: t
|
|
3278
|
-
}), /* @__PURE__ */
|
|
3319
|
+
}), /* @__PURE__ */ j("div", {
|
|
3279
3320
|
className: "flex items-center gap-1.5",
|
|
3280
|
-
children: [/* @__PURE__ */
|
|
3321
|
+
children: [/* @__PURE__ */ A(K, {
|
|
3281
3322
|
variant: "danger-light",
|
|
3282
3323
|
size: "sm",
|
|
3283
3324
|
onClick: i,
|
|
3284
3325
|
children: n
|
|
3285
|
-
}), /* @__PURE__ */
|
|
3326
|
+
}), /* @__PURE__ */ A(K, {
|
|
3286
3327
|
variant: "primary",
|
|
3287
3328
|
size: "sm",
|
|
3288
3329
|
onClick: a,
|
|
@@ -3293,18 +3334,18 @@ var Dr = {
|
|
|
3293
3334
|
})]
|
|
3294
3335
|
})
|
|
3295
3336
|
});
|
|
3296
|
-
}),
|
|
3337
|
+
}), zr = {
|
|
3297
3338
|
narrow: "max-w-[800px]",
|
|
3298
3339
|
wide: "max-w-[1100px]"
|
|
3299
|
-
},
|
|
3300
|
-
return /* @__PURE__ */
|
|
3340
|
+
}, Br = C(function({ title: e, maxWidth: t = "narrow", leading: n, children: r, className: i }, a) {
|
|
3341
|
+
return /* @__PURE__ */ A("div", {
|
|
3301
3342
|
ref: a,
|
|
3302
3343
|
className: "flex flex-1 flex-col items-center gap-6 py-6",
|
|
3303
|
-
children: /* @__PURE__ */
|
|
3304
|
-
className:
|
|
3344
|
+
children: /* @__PURE__ */ j("div", {
|
|
3345
|
+
className: W("flex w-full flex-col gap-6 px-8", zr[t], i),
|
|
3305
3346
|
children: [
|
|
3306
3347
|
n,
|
|
3307
|
-
e && /* @__PURE__ */
|
|
3348
|
+
e && /* @__PURE__ */ A("span", {
|
|
3308
3349
|
className: "text-cui-primary text-cui-lg font-semibold",
|
|
3309
3350
|
children: e
|
|
3310
3351
|
}),
|
|
@@ -3315,12 +3356,12 @@ var Dr = {
|
|
|
3315
3356
|
});
|
|
3316
3357
|
//#endregion
|
|
3317
3358
|
//#region src/lib/use-dirty-state.ts
|
|
3318
|
-
function
|
|
3319
|
-
let [t, n] =
|
|
3359
|
+
function Vr(e) {
|
|
3360
|
+
let [t, n] = O(e), [r, i] = O(e);
|
|
3320
3361
|
return {
|
|
3321
3362
|
draft: r,
|
|
3322
3363
|
saved: t,
|
|
3323
|
-
dirty:
|
|
3364
|
+
dirty: E(() => JSON.stringify(r) !== JSON.stringify(t), [r, t]),
|
|
3324
3365
|
setDraft: i,
|
|
3325
3366
|
update: w((e, t) => {
|
|
3326
3367
|
i((n) => ({
|
|
@@ -3337,4 +3378,4 @@ function Rr(e) {
|
|
|
3337
3378
|
};
|
|
3338
3379
|
}
|
|
3339
3380
|
//#endregion
|
|
3340
|
-
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 };
|