@coderabbitai/carrot-ui 0.1.22 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +111 -20
- package/dist/index.js +1136 -923
- 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
|
|
4
|
+
import { createContext as S, forwardRef as C, useCallback as w, useContext as T, useEffect as ee, useLayoutEffect as E, useMemo as D, useRef as O, useState as k, useSyncExternalStore as te } from "react";
|
|
5
5
|
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
6
6
|
import { Combobox as N } from "@base-ui/react/combobox";
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Switch as
|
|
9
|
-
import { Checkbox as
|
|
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
10
|
import { AnimatePresence as P, motion as F } from "motion/react";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { Drawer as I } from "@base-ui/react/drawer";
|
|
12
|
+
import { Tooltip as L } from "@base-ui/react/tooltip";
|
|
13
|
+
import { Select as R } from "@base-ui/react/select";
|
|
14
|
+
import { Separator as ae } from "@base-ui/react/separator";
|
|
15
|
+
import { Field as oe } from "@base-ui/react/field";
|
|
15
16
|
import { Menu as z } from "@base-ui/react/menu";
|
|
16
17
|
import { Dialog as B } from "@base-ui/react/dialog";
|
|
17
|
-
import { flexRender as
|
|
18
|
+
import { flexRender as se, getCoreRowModel as ce, getFilteredRowModel as le, getPaginationRowModel as ue, getSortedRowModel as de, useReactTable as fe } from "@tanstack/react-table";
|
|
18
19
|
import { Popover as V } from "@base-ui/react/popover";
|
|
19
20
|
import { AlertDialog as H } from "@base-ui/react/alert-dialog";
|
|
20
|
-
import { Accordion as
|
|
21
|
-
import { Tabs as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { Radio as ge } from "@base-ui/react/radio";
|
|
21
|
+
import { Accordion as pe } from "@base-ui/react/accordion";
|
|
22
|
+
import { Tabs as me } from "@base-ui/react/tabs";
|
|
23
|
+
import { Command as U } from "cmdk";
|
|
24
|
+
import { Toggle as he } from "@base-ui/react/toggle";
|
|
25
|
+
import { ToggleGroup as ge } from "@base-ui/react/toggle-group";
|
|
26
|
+
import { RadioGroup as _e } from "@base-ui/react/radio-group";
|
|
27
|
+
import { Radio as ve } from "@base-ui/react/radio";
|
|
28
28
|
//#region src/lib/cn.ts
|
|
29
|
-
var
|
|
29
|
+
var ye = 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 ye(e(t));
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/components/hover/hover.tsx
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var be = S(null);
|
|
57
|
+
function xe(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
|
|
65
|
+
function Se({ children: e, background: t = "bg-cui-subtle", borderRadius: n = "rounded-sm", className: r }) {
|
|
66
66
|
let i = O(/* @__PURE__ */ new Map()), [a, o] = k(null), s = O(null), [c, l] = k("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 = xe(t);
|
|
72
72
|
l((e) => e === "idle" ? "fade" : "slide"), o(n);
|
|
73
73
|
}, []), f = w(() => {
|
|
74
74
|
l("idle"), o(null);
|
|
@@ -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__ */ j(
|
|
88
|
+
return /* @__PURE__ */ j(be.Provider, {
|
|
89
89
|
value: g,
|
|
90
90
|
children: /* @__PURE__ */ M("div", {
|
|
91
91
|
onPointerLeave: f,
|
|
92
|
-
className:
|
|
92
|
+
className: W("group/h relative flex items-center", r),
|
|
93
93
|
children: [/* @__PURE__ */ j("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__ */ j("div", { className:
|
|
101
|
+
children: /* @__PURE__ */ j("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 =
|
|
108
|
-
return f ? /* @__PURE__ */ j(
|
|
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 = T(be);
|
|
108
|
+
return f ? /* @__PURE__ */ j(Ce, {
|
|
109
109
|
group: f,
|
|
110
110
|
active: t,
|
|
111
111
|
background: n,
|
|
@@ -119,14 +119,14 @@ function K({ children: e, active: t = !1, background: n = "bg-cui-subtle", backg
|
|
|
119
119
|
children: e
|
|
120
120
|
}) : /* @__PURE__ */ M("div", {
|
|
121
121
|
...d,
|
|
122
|
-
className:
|
|
123
|
-
children: [/* @__PURE__ */ j("div", { className:
|
|
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__ */ j("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__ */ j("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
|
|
129
|
+
function Ce({ children: e, group: t, active: n, background: r, backgroundClassName: i, borderRadius: a, interactive: o, disabled: s, fullWidth: c, className: l, ...u }) {
|
|
130
130
|
let d = O(null), f = O(null);
|
|
131
131
|
f.current === null && (f.current = Math.random());
|
|
132
132
|
let p = f.current, m = O(t);
|
|
@@ -141,10 +141,10 @@ function xe({ children: e, group: t, active: n, background: r, backgroundClassNa
|
|
|
141
141
|
...u,
|
|
142
142
|
ref: d,
|
|
143
143
|
onPointerEnter: (e) => {
|
|
144
|
-
u.onPointerEnter?.(e),
|
|
144
|
+
u.onPointerEnter?.(e), s || n ? t.dismissHover() : t.onItemHover(p);
|
|
145
145
|
},
|
|
146
|
-
className:
|
|
147
|
-
children: [/* @__PURE__ */ j("div", { className:
|
|
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__ */ j("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__ */ j("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 we = [
|
|
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
|
+
], Te = [
|
|
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
|
+
], Ee = {
|
|
175
175
|
xs: 10,
|
|
176
176
|
sm: 14,
|
|
177
177
|
md: 20,
|
|
178
178
|
lg: 32
|
|
179
|
-
},
|
|
180
|
-
function
|
|
181
|
-
if (
|
|
179
|
+
}, De = !1;
|
|
180
|
+
function Oe() {
|
|
181
|
+
if (De || 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), De = !0;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function ke(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} ${(-(we.indexOf(t) / 8) * n).toFixed(3)}s steps(1) infinite`;
|
|
189
|
+
case "trail": return t === 4 ? null : `pxs-trail-5 ${r} ${(-(we.indexOf(t) / 8) * n).toFixed(3)}s linear infinite`;
|
|
190
|
+
case "wave": return `pxs-wave ${r} ${(-((Te[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,12 +202,12 @@ 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 Ae(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 je({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1.2, className: i }) {
|
|
209
|
+
typeof document < "u" && Oe();
|
|
210
|
+
let a = typeof t == "number" ? t : Ee[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
|
|
@@ -215,7 +215,7 @@ function ke({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1
|
|
|
215
215
|
return /* @__PURE__ */ j("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,
|
|
@@ -229,7 +229,7 @@ function ke({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1
|
|
|
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 =
|
|
232
|
+
let a = ke(e, i, r), c = Ae(e, i);
|
|
233
233
|
return /* @__PURE__ */ j("rect", {
|
|
234
234
|
className: "pxs-cell",
|
|
235
235
|
x: n * 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 Me = {
|
|
252
252
|
sm: 10,
|
|
253
253
|
md: 12
|
|
254
|
-
},
|
|
255
|
-
let s = r === "sm" ? "text-cui-sm" : "text-[13px]", c =
|
|
254
|
+
}, Ne = 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 = Me[r];
|
|
256
256
|
return /* @__PURE__ */ M("span", {
|
|
257
257
|
ref: o,
|
|
258
|
-
className:
|
|
259
|
-
children: [n && /* @__PURE__ */ j(
|
|
258
|
+
className: W("inline-flex items-center gap-1.5", a),
|
|
259
|
+
children: [n && /* @__PURE__ */ j(je, {
|
|
260
260
|
variant: i,
|
|
261
261
|
size: c,
|
|
262
262
|
duration: 1.2
|
|
263
263
|
}), e && /* @__PURE__ */ M("span", {
|
|
264
|
-
className:
|
|
264
|
+
className: W("text-current", s),
|
|
265
265
|
children: [e, t && /* @__PURE__ */ j("span", { className: "after:animate-cui-dot-cycle inline-block w-[2ch] text-left after:content-['.']" })]
|
|
266
266
|
})]
|
|
267
267
|
});
|
|
268
|
-
}),
|
|
268
|
+
}), Pe = {
|
|
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
|
+
}, Fe = {
|
|
306
306
|
xs: {
|
|
307
307
|
height: "h-6",
|
|
308
308
|
padding: "px-1.5",
|
|
@@ -321,45 +321,45 @@ var Ae = {
|
|
|
321
321
|
textPadding: "px-1",
|
|
322
322
|
icon: "w-8"
|
|
323
323
|
}
|
|
324
|
-
},
|
|
325
|
-
let u =
|
|
326
|
-
return /* @__PURE__ */ M(
|
|
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 = Pe[e], d = Fe[t], f = !s && !r ? W(d.height, d.icon) : W(d.height, d.padding, "w-fit");
|
|
326
|
+
return /* @__PURE__ */ M(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__ */ j("div", { className:
|
|
332
|
+
/* @__PURE__ */ j("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
337
|
n && /* @__PURE__ */ j("span", {
|
|
338
|
-
className:
|
|
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
341
|
s && /* @__PURE__ */ j("span", {
|
|
342
|
-
className:
|
|
342
|
+
className: W("relative z-[1] inline", d.textPadding, i && "opacity-0"),
|
|
343
343
|
children: s
|
|
344
344
|
}),
|
|
345
345
|
r && /* @__PURE__ */ j("span", {
|
|
346
|
-
className:
|
|
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
349
|
i && /* @__PURE__ */ j("span", {
|
|
350
350
|
className: "absolute inset-0 z-[2] flex items-center justify-center",
|
|
351
|
-
children: /* @__PURE__ */ j(
|
|
351
|
+
children: /* @__PURE__ */ j(Ne, {
|
|
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
360
|
return /* @__PURE__ */ j("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
|
});
|
|
@@ -367,12 +367,12 @@ var Ae = {
|
|
|
367
367
|
Item: C(function({ icon: e, indicator: t, variant: n = "default", className: r, children: i, ...a }, o) {
|
|
368
368
|
return /* @__PURE__ */ M("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__ */ j("div", { className:
|
|
373
|
+
/* @__PURE__ */ j("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
374
|
e && /* @__PURE__ */ j("span", {
|
|
375
|
-
className:
|
|
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,
|
|
@@ -386,14 +386,14 @@ var Ae = {
|
|
|
386
386
|
ItemIndicator: C(function({ className: e }, t) {
|
|
387
387
|
return /* @__PURE__ */ j("span", {
|
|
388
388
|
ref: t,
|
|
389
|
-
className:
|
|
389
|
+
className: W("relative z-[1] ml-auto text-cui-secondary [&>svg]:size-4", e),
|
|
390
390
|
children: /* @__PURE__ */ j(o, {})
|
|
391
391
|
});
|
|
392
392
|
}),
|
|
393
393
|
List: C(function({ className: e, children: t, ...n }, r) {
|
|
394
394
|
return /* @__PURE__ */ j("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
|
});
|
|
@@ -401,14 +401,14 @@ var Ae = {
|
|
|
401
401
|
Separator: C(function({ className: e, ...t }, n) {
|
|
402
402
|
return /* @__PURE__ */ j("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
409
|
return /* @__PURE__ */ j("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
|
});
|
|
@@ -416,7 +416,7 @@ var Ae = {
|
|
|
416
416
|
Positioner: C(function({ className: e, children: t, ...n }, r) {
|
|
417
417
|
return /* @__PURE__ */ j("div", {
|
|
418
418
|
ref: r,
|
|
419
|
-
className:
|
|
419
|
+
className: W("z-50 outline-none", e),
|
|
420
420
|
...n,
|
|
421
421
|
children: t
|
|
422
422
|
});
|
|
@@ -424,7 +424,7 @@ var Ae = {
|
|
|
424
424
|
SearchInput: C(function({ className: e, children: t, ...n }, r) {
|
|
425
425
|
return /* @__PURE__ */ M("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
429
|
children: [/* @__PURE__ */ j(h, { className: "text-cui-tertiary size-4 shrink-0" }), t]
|
|
430
430
|
});
|
|
@@ -432,7 +432,7 @@ var Ae = {
|
|
|
432
432
|
Empty: C(function({ className: e, children: t, ...n }, r) {
|
|
433
433
|
return /* @__PURE__ */ j("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,7 +440,7 @@ var Ae = {
|
|
|
440
440
|
};
|
|
441
441
|
//#endregion
|
|
442
442
|
//#region src/components/combobox/combobox.tsx
|
|
443
|
-
function
|
|
443
|
+
function Ie({ value: e, defaultValue: t, onValueChange: n, items: r, children: i, className: a }) {
|
|
444
444
|
let [o, s] = k("");
|
|
445
445
|
return /* @__PURE__ */ j(N.Root, {
|
|
446
446
|
value: e,
|
|
@@ -461,16 +461,16 @@ function Pe({ value: e, defaultValue: t, onValueChange: n, items: r, children: i
|
|
|
461
461
|
}) : i
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
var
|
|
464
|
+
var Le = C(function({ children: e, className: t }, n) {
|
|
465
465
|
return /* @__PURE__ */ j(N.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
|
-
}),
|
|
470
|
+
}), Re = C(function({ placeholder: e, size: t, className: n }, r) {
|
|
471
471
|
return /* @__PURE__ */ j(N.Trigger, {
|
|
472
472
|
ref: r,
|
|
473
|
-
render: /* @__PURE__ */ j(
|
|
473
|
+
render: /* @__PURE__ */ j(K, {
|
|
474
474
|
variant: "outline",
|
|
475
475
|
size: t,
|
|
476
476
|
iconRight: /* @__PURE__ */ j(u, {}),
|
|
@@ -479,8 +479,8 @@ var Fe = C(function({ children: e, className: t }, n) {
|
|
|
479
479
|
})
|
|
480
480
|
});
|
|
481
481
|
});
|
|
482
|
-
function
|
|
483
|
-
let o = i ?? ((e) => /* @__PURE__ */ j(
|
|
482
|
+
function ze({ 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__ */ j(Be, {
|
|
484
484
|
value: e.value,
|
|
485
485
|
icon: e.icon,
|
|
486
486
|
children: e.label
|
|
@@ -488,77 +488,77 @@ function Le({ align: e = "start", searchPlaceholder: t = "Search...", emptyMessa
|
|
|
488
488
|
return /* @__PURE__ */ j(N.Portal, { children: /* @__PURE__ */ j(N.Positioner, {
|
|
489
489
|
align: e,
|
|
490
490
|
sideOffset: 4,
|
|
491
|
-
render: /* @__PURE__ */ j(
|
|
491
|
+
render: /* @__PURE__ */ j(q.Positioner, {}),
|
|
492
492
|
children: /* @__PURE__ */ M(N.Popup, {
|
|
493
|
-
render: /* @__PURE__ */ j(
|
|
493
|
+
render: /* @__PURE__ */ j(q.Panel, {
|
|
494
494
|
minWidth: r,
|
|
495
495
|
className: a
|
|
496
496
|
}),
|
|
497
497
|
children: [
|
|
498
|
-
/* @__PURE__ */ j(
|
|
498
|
+
/* @__PURE__ */ j(q.SearchInput, { children: /* @__PURE__ */ j(N.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
502
|
/* @__PURE__ */ j(N.Empty, {
|
|
503
|
-
render: /* @__PURE__ */ j(
|
|
503
|
+
render: /* @__PURE__ */ j(q.Empty, {}),
|
|
504
504
|
children: n
|
|
505
505
|
}),
|
|
506
506
|
/* @__PURE__ */ j(N.List, {
|
|
507
|
-
render: /* @__PURE__ */ j(
|
|
507
|
+
render: /* @__PURE__ */ j(q.List, {}),
|
|
508
508
|
children: o
|
|
509
509
|
})
|
|
510
510
|
]
|
|
511
511
|
})
|
|
512
512
|
}) });
|
|
513
513
|
}
|
|
514
|
-
var
|
|
514
|
+
var Be = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
515
515
|
return /* @__PURE__ */ M(N.Item, {
|
|
516
516
|
ref: i,
|
|
517
517
|
value: e,
|
|
518
|
-
render: /* @__PURE__ */ j(
|
|
518
|
+
render: /* @__PURE__ */ j(q.Item, {
|
|
519
519
|
icon: t,
|
|
520
520
|
className: r
|
|
521
521
|
}),
|
|
522
522
|
children: [/* @__PURE__ */ j("span", {
|
|
523
523
|
className: "relative z-[1] flex-1",
|
|
524
524
|
children: n
|
|
525
|
-
}), /* @__PURE__ */ j(N.ItemIndicator, { render: /* @__PURE__ */ j(
|
|
525
|
+
}), /* @__PURE__ */ j(N.ItemIndicator, { render: /* @__PURE__ */ j(q.ItemIndicator, {}) })]
|
|
526
526
|
});
|
|
527
|
-
}),
|
|
527
|
+
}), Ve = C(function({ className: e, children: t }, n) {
|
|
528
528
|
return /* @__PURE__ */ j(N.Group, {
|
|
529
529
|
ref: n,
|
|
530
|
-
className:
|
|
530
|
+
className: W("flex flex-col", e),
|
|
531
531
|
children: t
|
|
532
532
|
});
|
|
533
|
-
}),
|
|
533
|
+
}), He = C(function({ className: e, children: t }, n) {
|
|
534
534
|
return /* @__PURE__ */ j(N.GroupLabel, {
|
|
535
535
|
ref: n,
|
|
536
|
-
render: /* @__PURE__ */ j(
|
|
536
|
+
render: /* @__PURE__ */ j(q.GroupLabel, { className: e }),
|
|
537
537
|
children: t
|
|
538
538
|
});
|
|
539
|
-
}),
|
|
539
|
+
}), Ue = C(function({ className: e }, t) {
|
|
540
540
|
return /* @__PURE__ */ j(N.Separator, {
|
|
541
541
|
ref: t,
|
|
542
|
-
render: /* @__PURE__ */ j(
|
|
542
|
+
render: /* @__PURE__ */ j(q.Separator, { className: e })
|
|
543
543
|
});
|
|
544
544
|
});
|
|
545
545
|
//#endregion
|
|
546
546
|
//#region src/components/breadcrumb/breadcrumb.tsx
|
|
547
|
-
function
|
|
547
|
+
function We({ to: e, href: t, className: n, children: r }) {
|
|
548
548
|
return /* @__PURE__ */ j("a", {
|
|
549
549
|
href: e ?? t,
|
|
550
550
|
className: n,
|
|
551
551
|
children: r
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Ge() {
|
|
555
555
|
return /* @__PURE__ */ j("div", {
|
|
556
556
|
className: "flex w-4 shrink-0 items-center justify-center self-stretch",
|
|
557
557
|
children: /* @__PURE__ */ j("div", { className: "bg-cui-tertiary h-4 w-px rotate-[20deg] opacity-50" })
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let r =
|
|
560
|
+
function Ke({ 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__ */ M(A, { children: [e.icon && /* @__PURE__ */ j("span", {
|
|
562
562
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
563
563
|
children: e.icon
|
|
564
564
|
}), /* @__PURE__ */ j("span", { children: e.label })] });
|
|
@@ -572,10 +572,10 @@ function We({ item: e, asLink: t, LinkEl: n }) {
|
|
|
572
572
|
children: i
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
return /* @__PURE__ */ j(
|
|
575
|
+
function qe() {
|
|
576
|
+
return /* @__PURE__ */ j(Le, {
|
|
577
577
|
className: "rounded-sm",
|
|
578
|
-
children: /* @__PURE__ */ j(
|
|
578
|
+
children: /* @__PURE__ */ j(G, {
|
|
579
579
|
background: "bg-cui-subtle",
|
|
580
580
|
interactive: !0,
|
|
581
581
|
children: /* @__PURE__ */ j("span", {
|
|
@@ -585,46 +585,46 @@ function Ge() {
|
|
|
585
585
|
})
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return e.selector && e.options ? /* @__PURE__ */ M(
|
|
588
|
+
function Je({ item: e, LinkEl: t }) {
|
|
589
|
+
return e.selector && e.options ? /* @__PURE__ */ M(Ie, {
|
|
590
590
|
value: e.value,
|
|
591
591
|
onValueChange: e.onSelect,
|
|
592
592
|
items: e.options,
|
|
593
593
|
children: [/* @__PURE__ */ M("span", {
|
|
594
594
|
className: "flex items-center",
|
|
595
|
-
children: [/* @__PURE__ */ j(
|
|
595
|
+
children: [/* @__PURE__ */ j(G, {
|
|
596
596
|
background: "bg-cui-subtle",
|
|
597
597
|
interactive: !0,
|
|
598
|
-
children: /* @__PURE__ */ j(
|
|
598
|
+
children: /* @__PURE__ */ j(Ke, {
|
|
599
599
|
item: e,
|
|
600
600
|
asLink: !!e.href,
|
|
601
601
|
LinkEl: t
|
|
602
602
|
})
|
|
603
|
-
}), /* @__PURE__ */ j(
|
|
604
|
-
}), /* @__PURE__ */ j(
|
|
605
|
-
}) : e.href ? /* @__PURE__ */ j(
|
|
603
|
+
}), /* @__PURE__ */ j(qe, {})]
|
|
604
|
+
}), /* @__PURE__ */ j(ze, { searchPlaceholder: "Search..." })]
|
|
605
|
+
}) : e.href ? /* @__PURE__ */ j(G, {
|
|
606
606
|
background: "bg-cui-subtle",
|
|
607
607
|
interactive: !0,
|
|
608
|
-
children: /* @__PURE__ */ j(
|
|
608
|
+
children: /* @__PURE__ */ j(Ke, {
|
|
609
609
|
item: e,
|
|
610
610
|
asLink: !0,
|
|
611
611
|
LinkEl: t
|
|
612
612
|
})
|
|
613
|
-
}) : /* @__PURE__ */ j(
|
|
613
|
+
}) : /* @__PURE__ */ j(G, {
|
|
614
614
|
background: "bg-cui-subtle",
|
|
615
615
|
interactive: !0,
|
|
616
|
-
children: /* @__PURE__ */ j(
|
|
616
|
+
children: /* @__PURE__ */ j(Ke, {
|
|
617
617
|
item: e,
|
|
618
618
|
LinkEl: t
|
|
619
619
|
})
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Ye({ items: e, linkComponent: t = We, className: n }) {
|
|
623
623
|
return /* @__PURE__ */ j("nav", {
|
|
624
|
-
className:
|
|
624
|
+
className: W("flex items-center", n),
|
|
625
625
|
children: e.map((e, n) => /* @__PURE__ */ M("span", {
|
|
626
626
|
className: "flex items-center",
|
|
627
|
-
children: [n > 0 && /* @__PURE__ */ j(
|
|
627
|
+
children: [n > 0 && /* @__PURE__ */ j(Ge, {}), /* @__PURE__ */ j(Je, {
|
|
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 Xe = {
|
|
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__ */ j(
|
|
645
|
+
}, Ze = C(function({ checked: e, defaultChecked: t, onCheckedChange: n, disabled: r, size: i = "md", className: a, ...o }, s) {
|
|
646
|
+
let c = Xe[i];
|
|
647
|
+
return /* @__PURE__ */ j(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__ */ j(
|
|
655
|
+
children: /* @__PURE__ */ j(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
|
+
}), Qe = {
|
|
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
|
+
}, $e = 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 = Qe[s], m = /* @__PURE__ */ j(ie.Root, {
|
|
670
670
|
ref: f,
|
|
671
671
|
checked: e,
|
|
672
672
|
defaultChecked: t,
|
|
@@ -675,71 +675,71 @@ 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__ */ j(
|
|
680
|
+
children: /* @__PURE__ */ j(ie.Indicator, {
|
|
681
681
|
keepMounted: !0,
|
|
682
|
-
className:
|
|
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
683
|
children: j(r ? g : o, { className: p.icon })
|
|
684
684
|
})
|
|
685
685
|
});
|
|
686
686
|
return c ? /* @__PURE__ */ M("label", {
|
|
687
|
-
className:
|
|
687
|
+
className: W("inline-flex items-center gap-2 select-none", i ? "cursor-not-allowed" : "cursor-pointer", u),
|
|
688
688
|
children: [m, /* @__PURE__ */ j("span", {
|
|
689
|
-
className:
|
|
689
|
+
className: W(p.label, i ? "text-cui-tertiary" : "text-cui-primary"),
|
|
690
690
|
children: c
|
|
691
691
|
})]
|
|
692
692
|
}) : m;
|
|
693
|
-
}),
|
|
693
|
+
}), et = {
|
|
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
|
-
},
|
|
696
|
+
}, tt = C(function({ className: e, children: t }, n) {
|
|
697
697
|
return /* @__PURE__ */ j("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
|
-
}),
|
|
702
|
+
}), nt = C(function({ className: e, children: t }, n) {
|
|
703
703
|
return /* @__PURE__ */ j("div", {
|
|
704
704
|
ref: n,
|
|
705
|
-
className:
|
|
705
|
+
className: W("px-4 py-3", e),
|
|
706
706
|
children: t
|
|
707
707
|
});
|
|
708
|
-
}),
|
|
708
|
+
}), rt = C(function({ className: e, children: t }, n) {
|
|
709
709
|
return /* @__PURE__ */ j("div", {
|
|
710
710
|
ref: n,
|
|
711
|
-
className:
|
|
711
|
+
className: W("p-4", e),
|
|
712
712
|
children: t
|
|
713
713
|
});
|
|
714
|
-
}),
|
|
714
|
+
}), it = C(function({ className: e, children: t }, n) {
|
|
715
715
|
return /* @__PURE__ */ j("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
|
-
}),
|
|
720
|
+
}), J = C(function({ variant: e = "default", className: t, children: n }, r) {
|
|
721
721
|
return /* @__PURE__ */ j("div", {
|
|
722
722
|
ref: r,
|
|
723
|
-
className:
|
|
723
|
+
className: W(et[e], t),
|
|
724
724
|
children: n
|
|
725
725
|
});
|
|
726
726
|
});
|
|
727
|
-
|
|
727
|
+
J.Content = tt, J.Header = nt, J.Body = rt, J.Section = it;
|
|
728
728
|
//#endregion
|
|
729
729
|
//#region src/components/nav-link/nav-link.tsx
|
|
730
|
-
var
|
|
730
|
+
var at = {
|
|
731
731
|
sm: "h-7 px-1.5",
|
|
732
732
|
md: "h-8 px-1.5"
|
|
733
733
|
};
|
|
734
|
-
function
|
|
735
|
-
return /* @__PURE__ */ j(
|
|
734
|
+
function ot({ className: e, children: t }) {
|
|
735
|
+
return /* @__PURE__ */ j(Se, {
|
|
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__ */ j(
|
|
741
|
+
function st({ active: e = !1, icon: t, href: n, onClick: r, size: i = "md", className: a, children: o }) {
|
|
742
|
+
return /* @__PURE__ */ j(G, {
|
|
743
743
|
active: e,
|
|
744
744
|
background: "bg-cui-subtle",
|
|
745
745
|
className: a,
|
|
@@ -751,7 +751,7 @@ 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:
|
|
754
|
+
className: W("flex items-center text-cui-base font-medium cursor-pointer select-none whitespace-nowrap", "outline-none", at[i], e ? "text-cui-primary" : "text-cui-secondary"),
|
|
755
755
|
children: [t && /* @__PURE__ */ j("span", {
|
|
756
756
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
757
757
|
children: t
|
|
@@ -764,7 +764,7 @@ 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
|
|
767
|
+
var ct = C(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
768
768
|
return e === "circle" ? /* @__PURE__ */ M("svg", {
|
|
769
769
|
ref: r,
|
|
770
770
|
width: t,
|
|
@@ -772,7 +772,7 @@ var ot = C(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
|
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
777
|
children: [/* @__PURE__ */ j("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",
|
|
@@ -788,14 +788,14 @@ var ot = C(function({ variant: e = "mark", size: t = 18, className: n }, r) {
|
|
|
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
793
|
children: /* @__PURE__ */ j("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
|
+
}), lt = {
|
|
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
|
+
}, ut = {
|
|
825
825
|
circle: "rounded-full",
|
|
826
826
|
square: "rounded-md"
|
|
827
|
-
},
|
|
827
|
+
}, dt = {
|
|
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 ft(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 pt(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 mt(e, t) {
|
|
860
|
+
let n = ft(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 pt(e, 25, .3, a), {
|
|
869
869
|
cols: 5,
|
|
870
870
|
rows: 5,
|
|
871
871
|
cells: e
|
|
@@ -984,20 +984,20 @@ function ft(e, t) {
|
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
return
|
|
987
|
+
function ht(e) {
|
|
988
|
+
return Y(e, 42) % 360;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function gt(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
|
|
996
|
+
var _t = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a) {
|
|
997
997
|
let { grid: o, hue: s } = D(() => ({
|
|
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, _ =
|
|
998
|
+
grid: mt(e, t),
|
|
999
|
+
hue: ht(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 = gt(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,
|
|
@@ -1009,7 +1009,7 @@ var ht = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, 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"
|
|
@@ -1078,18 +1078,18 @@ 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 =
|
|
1081
|
+
}), vt = 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 = lt[o], d = ut[a];
|
|
1083
1083
|
return e ? /* @__PURE__ */ j("img", {
|
|
1084
1084
|
ref: l,
|
|
1085
1085
|
src: e,
|
|
1086
1086
|
alt: i ?? t ?? n ?? "",
|
|
1087
|
-
className:
|
|
1087
|
+
className: W("shrink-0 object-cover", u.outer, d, c)
|
|
1088
1088
|
}) : t ? /* @__PURE__ */ j("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, dt[s], c),
|
|
1091
1091
|
children: t
|
|
1092
|
-
}) : n ? /* @__PURE__ */ j(
|
|
1092
|
+
}) : n ? /* @__PURE__ */ j(_t, {
|
|
1093
1093
|
ref: l,
|
|
1094
1094
|
seed: n,
|
|
1095
1095
|
pattern: r,
|
|
@@ -1098,70 +1098,70 @@ var ht = C(function({ seed: e, pattern: t, px: n, isCircle: r, className: i }, a
|
|
|
1098
1098
|
className: c
|
|
1099
1099
|
}) : /* @__PURE__ */ j("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, dt[s], c)
|
|
1102
1102
|
});
|
|
1103
1103
|
});
|
|
1104
1104
|
//#endregion
|
|
1105
1105
|
//#region src/components/app-header/app-header.tsx
|
|
1106
|
-
function
|
|
1106
|
+
function yt({ to: e, href: t, className: n, children: r }) {
|
|
1107
1107
|
return /* @__PURE__ */ j("a", {
|
|
1108
1108
|
href: e ?? t,
|
|
1109
1109
|
className: n,
|
|
1110
1110
|
children: r
|
|
1111
1111
|
});
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function bt() {
|
|
1114
1114
|
return /* @__PURE__ */ j("div", {
|
|
1115
1115
|
className: "flex w-4 shrink-0 items-center justify-center self-stretch",
|
|
1116
1116
|
children: /* @__PURE__ */ j("div", { className: "bg-cui-tertiary h-4 w-px rotate-[20deg] opacity-50" })
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function xt({ items: e, linkComponent: t = yt, className: n }) {
|
|
1120
1120
|
return /* @__PURE__ */ M("nav", {
|
|
1121
|
-
className:
|
|
1121
|
+
className: W("flex items-center", n),
|
|
1122
1122
|
children: [
|
|
1123
1123
|
/* @__PURE__ */ j(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__ */ j(
|
|
1127
|
+
children: /* @__PURE__ */ j(ct, {
|
|
1128
1128
|
variant: "circle",
|
|
1129
1129
|
className: "text-cui-primary"
|
|
1130
1130
|
})
|
|
1131
1131
|
}),
|
|
1132
|
-
/* @__PURE__ */ j(
|
|
1133
|
-
/* @__PURE__ */ j(
|
|
1132
|
+
/* @__PURE__ */ j(bt, {}),
|
|
1133
|
+
/* @__PURE__ */ j(Ye, {
|
|
1134
1134
|
items: e,
|
|
1135
1135
|
linkComponent: t
|
|
1136
1136
|
})
|
|
1137
1137
|
]
|
|
1138
1138
|
});
|
|
1139
1139
|
}
|
|
1140
|
-
var
|
|
1140
|
+
var St = C(function({ children: e, className: t }, n) {
|
|
1141
1141
|
return /* @__PURE__ */ j("div", {
|
|
1142
1142
|
ref: n,
|
|
1143
|
-
className:
|
|
1143
|
+
className: W("flex items-center gap-2", t),
|
|
1144
1144
|
children: e
|
|
1145
1145
|
});
|
|
1146
|
-
}),
|
|
1146
|
+
}), Ct = C(function({ children: e, className: t }, n) {
|
|
1147
1147
|
return /* @__PURE__ */ j("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
|
+
Ct.Breadcrumb = xt, Ct.Actions = St, Ct.Avatar = vt;
|
|
1154
1154
|
//#endregion
|
|
1155
1155
|
//#region src/components/settings-card/settings-card.tsx
|
|
1156
|
-
var
|
|
1156
|
+
var wt = C(function({ title: e, description: t, toggle: n, toggled: r, onToggleChange: i, defaultToggled: a = !1, children: o, className: s }, c) {
|
|
1157
1157
|
let [l, u] = k(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__ */ j(
|
|
1161
|
+
return /* @__PURE__ */ j(J, {
|
|
1162
1162
|
ref: c,
|
|
1163
1163
|
className: s,
|
|
1164
|
-
children: /* @__PURE__ */ M(
|
|
1164
|
+
children: /* @__PURE__ */ M(J.Content, { children: [(e || t || n) && /* @__PURE__ */ j(J.Header, { children: /* @__PURE__ */ M("div", {
|
|
1165
1165
|
className: "flex items-start justify-between gap-4",
|
|
1166
1166
|
children: [/* @__PURE__ */ M("div", {
|
|
1167
1167
|
className: "flex flex-1 flex-col",
|
|
@@ -1174,21 +1174,21 @@ var St = C(function({ title: e, description: t, toggle: n, toggled: r, onToggleC
|
|
|
1174
1174
|
})]
|
|
1175
1175
|
}), n && /* @__PURE__ */ j("div", {
|
|
1176
1176
|
className: "shrink-0 pt-0.5",
|
|
1177
|
-
children: /* @__PURE__ */ j(
|
|
1177
|
+
children: /* @__PURE__ */ j(Ze, {
|
|
1178
1178
|
checked: f,
|
|
1179
1179
|
onCheckedChange: m
|
|
1180
1180
|
})
|
|
1181
1181
|
})]
|
|
1182
|
-
}) }), /* @__PURE__ */ j(
|
|
1182
|
+
}) }), /* @__PURE__ */ j(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__ */ M(
|
|
1188
|
+
}), Tt = C(function({ label: e, description: t, children: n, className: r }, i) {
|
|
1189
|
+
return /* @__PURE__ */ M(J.Section, {
|
|
1190
1190
|
ref: i,
|
|
1191
|
-
className:
|
|
1191
|
+
className: W("flex justify-between items-start", r),
|
|
1192
1192
|
children: [/* @__PURE__ */ M("div", {
|
|
1193
1193
|
className: "mr-4 flex flex-1 flex-col gap-1",
|
|
1194
1194
|
children: [/* @__PURE__ */ j("span", {
|
|
@@ -1203,24 +1203,24 @@ var St = C(function({ title: e, description: t, toggle: n, toggled: r, onToggleC
|
|
|
1203
1203
|
children: n
|
|
1204
1204
|
})]
|
|
1205
1205
|
});
|
|
1206
|
-
}),
|
|
1206
|
+
}), Et = C(function({ className: e, children: t, ...n }, r) {
|
|
1207
1207
|
return /* @__PURE__ */ j("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
|
-
}),
|
|
1213
|
+
}), Dt = C(function({ className: e, children: t, ...n }, r) {
|
|
1214
1214
|
return /* @__PURE__ */ j("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
|
-
}),
|
|
1220
|
+
}), Ot = Object.assign(C(function({ sidebar: e, className: t, children: n }, r) {
|
|
1221
1221
|
return /* @__PURE__ */ M("div", {
|
|
1222
1222
|
ref: r,
|
|
1223
|
-
className:
|
|
1223
|
+
className: W("flex h-screen bg-cui-base-0", t),
|
|
1224
1224
|
children: [e, /* @__PURE__ */ j("div", {
|
|
1225
1225
|
className: "flex min-h-0 flex-1 flex-col pt-1 pr-1 pb-1",
|
|
1226
1226
|
children: /* @__PURE__ */ j("div", {
|
|
@@ -1230,107 +1230,403 @@ var St = C(function({ title: e, description: t, toggle: n, toggled: r, onToggleC
|
|
|
1230
1230
|
})]
|
|
1231
1231
|
});
|
|
1232
1232
|
}), {
|
|
1233
|
-
Header:
|
|
1234
|
-
Body:
|
|
1233
|
+
Header: Et,
|
|
1234
|
+
Body: Dt
|
|
1235
|
+
}), kt = {
|
|
1236
|
+
right: "right",
|
|
1237
|
+
left: "left",
|
|
1238
|
+
bottom: "down",
|
|
1239
|
+
top: "up"
|
|
1240
|
+
}, At = {
|
|
1241
|
+
right: "inset-y-0 right-0 w-[min(420px,90vw)] p-2",
|
|
1242
|
+
left: "inset-y-0 left-0 w-[min(420px,90vw)] p-2",
|
|
1243
|
+
bottom: "inset-x-0 bottom-0 max-h-[85vh] p-2",
|
|
1244
|
+
top: "inset-x-0 top-0 max-h-[85vh] p-2"
|
|
1245
|
+
};
|
|
1246
|
+
function jt({ side: e = "right", responsive: t, children: n, ...r }) {
|
|
1247
|
+
return /* @__PURE__ */ j(I.Root, {
|
|
1248
|
+
swipeDirection: kt[e],
|
|
1249
|
+
...r,
|
|
1250
|
+
children: n
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
var Mt = C(function({ className: e, ...t }, n) {
|
|
1254
|
+
return /* @__PURE__ */ j(I.Trigger, {
|
|
1255
|
+
ref: n,
|
|
1256
|
+
className: W(e),
|
|
1257
|
+
...t
|
|
1258
|
+
});
|
|
1259
|
+
}), Nt = C(function({ className: e, ...t }, n) {
|
|
1260
|
+
return /* @__PURE__ */ j(I.Backdrop, {
|
|
1261
|
+
ref: n,
|
|
1262
|
+
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),
|
|
1263
|
+
...t
|
|
1264
|
+
});
|
|
1265
|
+
});
|
|
1266
|
+
function Pt({ side: e = "right", responsive: t = !0, className: n, children: r, ...i }) {
|
|
1267
|
+
return /* @__PURE__ */ M(I.Portal, { children: [/* @__PURE__ */ j(Nt, {}), /* @__PURE__ */ j(I.Popup, {
|
|
1268
|
+
className: W("group/drawer fixed z-50 flex outline-none", At[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 && [
|
|
1269
|
+
"max-md:inset-x-0 max-md:inset-y-auto max-md:bottom-0 max-md:right-auto max-md:left-auto",
|
|
1270
|
+
"max-md:w-full max-md:max-h-[85vh]",
|
|
1271
|
+
"max-md:data-[starting-style]:translate-x-0 max-md:data-[starting-style]:translate-y-[20%]",
|
|
1272
|
+
"max-md:data-[ending-style]:translate-x-0 max-md:data-[ending-style]:translate-y-[20%]"
|
|
1273
|
+
]),
|
|
1274
|
+
...i,
|
|
1275
|
+
children: /* @__PURE__ */ j("div", {
|
|
1276
|
+
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),
|
|
1277
|
+
children: /* @__PURE__ */ j("div", {
|
|
1278
|
+
className: "bg-cui-base-2 border-cui-neutral flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border",
|
|
1279
|
+
children: r
|
|
1280
|
+
})
|
|
1281
|
+
})
|
|
1282
|
+
})] });
|
|
1283
|
+
}
|
|
1284
|
+
var Ft = {
|
|
1285
|
+
Root: jt,
|
|
1286
|
+
Trigger: Mt,
|
|
1287
|
+
Content: Pt,
|
|
1288
|
+
Header: C(function({ className: e, children: t }, n) {
|
|
1289
|
+
return /* @__PURE__ */ j("div", {
|
|
1290
|
+
ref: n,
|
|
1291
|
+
className: W("border-cui-neutral flex items-center justify-between border-b px-4 py-3", e),
|
|
1292
|
+
children: t
|
|
1293
|
+
});
|
|
1294
|
+
}),
|
|
1295
|
+
Title: C(function({ className: e, ...t }, n) {
|
|
1296
|
+
return /* @__PURE__ */ j(I.Title, {
|
|
1297
|
+
ref: n,
|
|
1298
|
+
className: W("text-cui-primary text-cui-base font-medium", e),
|
|
1299
|
+
...t
|
|
1300
|
+
});
|
|
1301
|
+
}),
|
|
1302
|
+
Description: C(function({ className: e, ...t }, n) {
|
|
1303
|
+
return /* @__PURE__ */ j(I.Description, {
|
|
1304
|
+
ref: n,
|
|
1305
|
+
className: W("text-cui-secondary text-cui-base", e),
|
|
1306
|
+
...t
|
|
1307
|
+
});
|
|
1308
|
+
}),
|
|
1309
|
+
Body: C(function({ className: e, children: t }, n) {
|
|
1310
|
+
return /* @__PURE__ */ j("div", {
|
|
1311
|
+
ref: n,
|
|
1312
|
+
className: W("flex-1 overflow-y-auto p-4", e),
|
|
1313
|
+
children: t
|
|
1314
|
+
});
|
|
1315
|
+
}),
|
|
1316
|
+
Footer: C(function({ className: e, children: t }, n) {
|
|
1317
|
+
return /* @__PURE__ */ j("div", {
|
|
1318
|
+
ref: n,
|
|
1319
|
+
className: W("border-cui-neutral flex items-center justify-end gap-2 border-t p-3", e),
|
|
1320
|
+
children: t
|
|
1321
|
+
});
|
|
1322
|
+
}),
|
|
1323
|
+
Close: C(function({ asIcon: e, className: t, children: n, ...r }, i) {
|
|
1324
|
+
return e ?? !n ? /* @__PURE__ */ j(I.Close, {
|
|
1325
|
+
ref: i,
|
|
1326
|
+
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),
|
|
1327
|
+
...r,
|
|
1328
|
+
children: /* @__PURE__ */ j(x, { className: "size-4" })
|
|
1329
|
+
}) : /* @__PURE__ */ j(I.Close, {
|
|
1330
|
+
ref: i,
|
|
1331
|
+
className: W(t),
|
|
1332
|
+
...r,
|
|
1333
|
+
children: n
|
|
1334
|
+
});
|
|
1335
|
+
})
|
|
1336
|
+
};
|
|
1337
|
+
//#endregion
|
|
1338
|
+
//#region src/components/flickering-grid/flickering-grid.tsx
|
|
1339
|
+
function It(e, t) {
|
|
1340
|
+
let n = e.style.color;
|
|
1341
|
+
e.style.color = t;
|
|
1342
|
+
let r = getComputedStyle(e).color;
|
|
1343
|
+
return e.style.color = n, r || "#000";
|
|
1344
|
+
}
|
|
1345
|
+
function Lt({ 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 }) {
|
|
1346
|
+
let f = O(null), p = O(null);
|
|
1347
|
+
return ee(() => {
|
|
1348
|
+
let d = f.current, m = p.current;
|
|
1349
|
+
if (!d || !m) return;
|
|
1350
|
+
let h = m.getContext("2d");
|
|
1351
|
+
if (!h) return;
|
|
1352
|
+
let g = It(d, r), _ = 0, v = 0, y = new Float32Array(), b = new Float32Array(), x = 1, S = 0, C = 0, w = performance.now();
|
|
1353
|
+
function T() {
|
|
1354
|
+
if (!m || !d) return;
|
|
1355
|
+
x = window.devicePixelRatio || 1, S = d.clientWidth, C = d.clientHeight, m.width = S * x, m.height = C * x, m.style.width = `${S}px`, m.style.height = `${C}px`;
|
|
1356
|
+
let n = e + t;
|
|
1357
|
+
_ = 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);
|
|
1358
|
+
for (let e = 0; e < y.length; e++) y[e] = Math.random() * i, b[e] = (Math.random() - .5) * 2 * u;
|
|
1359
|
+
}
|
|
1360
|
+
function ee(e) {
|
|
1361
|
+
if (!l) for (let t = 0; t < y.length; t++) Math.random() < n * e && (y[t] = Math.random() * i);
|
|
1362
|
+
}
|
|
1363
|
+
function E(n) {
|
|
1364
|
+
if (!h || !m) return;
|
|
1365
|
+
h.clearRect(0, 0, m.width, m.height), h.fillStyle = g;
|
|
1366
|
+
let r = e + t, u = 0;
|
|
1367
|
+
if (a) {
|
|
1368
|
+
let e = (n - w) / 1e3 / s % 1;
|
|
1369
|
+
u = o === "left" ? 1 - e : e, u = u * (1 + c * 2) - c;
|
|
1370
|
+
}
|
|
1371
|
+
for (let t = 0; t < _; t++) for (let n = 0; n < v; n++) {
|
|
1372
|
+
let o = t * v + n, s;
|
|
1373
|
+
if (l && a) {
|
|
1374
|
+
let e = (_ > 1 ? t / (_ - 1) : 0) + (b[o] ?? 0), n = Math.abs(e - u), r = Math.max(0, 1 - n / c);
|
|
1375
|
+
s = r * r * (3 - 2 * r) * i;
|
|
1376
|
+
} else if (s = y[o] ?? 0, a) {
|
|
1377
|
+
let e = _ > 1 ? t / (_ - 1) : 0, n = Math.abs(e - u), r = Math.max(0, 1 - n / c), a = r * r * (3 - 2 * r);
|
|
1378
|
+
s = Math.min(i * 1.5, s + a * i);
|
|
1379
|
+
}
|
|
1380
|
+
s < .01 || (h.globalAlpha = s, h.fillRect(t * r * x, n * r * x, e * x, e * x));
|
|
1381
|
+
}
|
|
1382
|
+
h.globalAlpha = 1;
|
|
1383
|
+
}
|
|
1384
|
+
T();
|
|
1385
|
+
let D = 0, O = performance.now(), k = !0;
|
|
1386
|
+
function te(e) {
|
|
1387
|
+
if (!k) return;
|
|
1388
|
+
let t = (e - O) / 1e3;
|
|
1389
|
+
O = e, ee(t), E(e), D = requestAnimationFrame(te);
|
|
1390
|
+
}
|
|
1391
|
+
let A = new ResizeObserver(() => {
|
|
1392
|
+
T();
|
|
1393
|
+
});
|
|
1394
|
+
A.observe(d);
|
|
1395
|
+
let j = new IntersectionObserver(([e]) => {
|
|
1396
|
+
k = e?.isIntersecting ?? !1, k ? (O = performance.now(), D = requestAnimationFrame(te)) : cancelAnimationFrame(D);
|
|
1397
|
+
}, { threshold: 0 });
|
|
1398
|
+
j.observe(m);
|
|
1399
|
+
let M = new MutationObserver(() => {
|
|
1400
|
+
g = It(d, r);
|
|
1401
|
+
});
|
|
1402
|
+
return M.observe(document.documentElement, {
|
|
1403
|
+
attributes: !0,
|
|
1404
|
+
attributeFilter: ["data-theme", "class"]
|
|
1405
|
+
}), () => {
|
|
1406
|
+
cancelAnimationFrame(D), A.disconnect(), j.disconnect(), M.disconnect();
|
|
1407
|
+
};
|
|
1408
|
+
}, [
|
|
1409
|
+
e,
|
|
1410
|
+
t,
|
|
1411
|
+
n,
|
|
1412
|
+
r,
|
|
1413
|
+
i,
|
|
1414
|
+
a,
|
|
1415
|
+
o,
|
|
1416
|
+
s,
|
|
1417
|
+
c,
|
|
1418
|
+
l,
|
|
1419
|
+
u
|
|
1420
|
+
]), /* @__PURE__ */ j("div", {
|
|
1421
|
+
ref: f,
|
|
1422
|
+
className: W("pointer-events-none size-full", d),
|
|
1423
|
+
"aria-hidden": "true",
|
|
1424
|
+
children: /* @__PURE__ */ j("canvas", { ref: p })
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
//#endregion
|
|
1428
|
+
//#region src/components/skeleton/skeleton.tsx
|
|
1429
|
+
var Rt = C(function({ circular: e, className: t }, n) {
|
|
1430
|
+
return /* @__PURE__ */ j("div", {
|
|
1431
|
+
ref: n,
|
|
1432
|
+
className: W("relative overflow-hidden bg-cui-subtle", e ? "rounded-full" : "rounded-xs", t),
|
|
1433
|
+
"aria-hidden": "true",
|
|
1434
|
+
children: /* @__PURE__ */ j(Lt, {
|
|
1435
|
+
squareSize: 4,
|
|
1436
|
+
gridGap: 2,
|
|
1437
|
+
color: "var(--text-color-cui-secondary)",
|
|
1438
|
+
maxOpacity: .05,
|
|
1439
|
+
sweep: !0,
|
|
1440
|
+
sweepOnly: !0,
|
|
1441
|
+
sweepDirection: "right",
|
|
1442
|
+
sweepDuration: 1.5,
|
|
1443
|
+
sweepWidth: .4,
|
|
1444
|
+
sweepNoise: .1
|
|
1445
|
+
})
|
|
1446
|
+
});
|
|
1235
1447
|
});
|
|
1236
1448
|
//#endregion
|
|
1237
1449
|
//#region src/components/tooltip/tooltip.tsx
|
|
1238
|
-
function
|
|
1239
|
-
return /* @__PURE__ */ j(
|
|
1450
|
+
function zt(e) {
|
|
1451
|
+
return /* @__PURE__ */ j(L.Provider, { ...e });
|
|
1240
1452
|
}
|
|
1241
|
-
function
|
|
1242
|
-
return /* @__PURE__ */ j(
|
|
1453
|
+
function Bt(e) {
|
|
1454
|
+
return /* @__PURE__ */ j(L.Root, { ...e });
|
|
1243
1455
|
}
|
|
1244
|
-
var
|
|
1245
|
-
return /* @__PURE__ */ j(
|
|
1456
|
+
var Vt = C(function({ className: e, ...t }, n) {
|
|
1457
|
+
return /* @__PURE__ */ j(L.Trigger, {
|
|
1246
1458
|
ref: n,
|
|
1247
|
-
className:
|
|
1459
|
+
className: W("outline-none", e),
|
|
1248
1460
|
...t
|
|
1249
1461
|
});
|
|
1250
1462
|
});
|
|
1251
|
-
function
|
|
1252
|
-
return /* @__PURE__ */ j(
|
|
1463
|
+
function Ht({ side: e = "top", align: t = "center", sideOffset: n = 6, className: r, children: i, ...a }) {
|
|
1464
|
+
return /* @__PURE__ */ j(L.Portal, { children: /* @__PURE__ */ j(L.Positioner, {
|
|
1253
1465
|
side: e,
|
|
1254
1466
|
align: t,
|
|
1255
1467
|
sideOffset: n,
|
|
1256
|
-
className:
|
|
1257
|
-
children: /* @__PURE__ */ j(
|
|
1258
|
-
className:
|
|
1468
|
+
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"),
|
|
1469
|
+
children: /* @__PURE__ */ j(L.Popup, {
|
|
1470
|
+
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
1471
|
...a,
|
|
1260
1472
|
children: i
|
|
1261
1473
|
})
|
|
1262
1474
|
}) });
|
|
1263
1475
|
}
|
|
1264
|
-
var
|
|
1265
|
-
return /* @__PURE__ */ j(
|
|
1476
|
+
var Ut = C(function({ className: e, ...t }, n) {
|
|
1477
|
+
return /* @__PURE__ */ j(L.Viewport, {
|
|
1266
1478
|
ref: n,
|
|
1267
|
-
className:
|
|
1479
|
+
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
1480
|
...t
|
|
1269
1481
|
});
|
|
1270
|
-
}),
|
|
1271
|
-
Provider:
|
|
1272
|
-
Root:
|
|
1273
|
-
Trigger:
|
|
1274
|
-
Content:
|
|
1275
|
-
Viewport:
|
|
1276
|
-
createHandle:
|
|
1277
|
-
},
|
|
1278
|
-
function
|
|
1279
|
-
let e =
|
|
1280
|
-
if (!e) throw Error("useSidebar must be used within a <Sidebar>");
|
|
1482
|
+
}), Wt = L.createHandle, X = {
|
|
1483
|
+
Provider: zt,
|
|
1484
|
+
Root: Bt,
|
|
1485
|
+
Trigger: Vt,
|
|
1486
|
+
Content: Ht,
|
|
1487
|
+
Viewport: Ut,
|
|
1488
|
+
createHandle: L.createHandle
|
|
1489
|
+
}, Gt = S(null);
|
|
1490
|
+
function Z() {
|
|
1491
|
+
let e = T(Gt);
|
|
1492
|
+
if (!e) throw Error("useSidebar must be used within a <Sidebar> or <Sidebar.Provider>");
|
|
1281
1493
|
return e;
|
|
1282
1494
|
}
|
|
1495
|
+
function Kt() {
|
|
1496
|
+
return T(Gt);
|
|
1497
|
+
}
|
|
1283
1498
|
//#endregion
|
|
1284
1499
|
//#region src/components/sidebar/sidebar.tsx
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1500
|
+
var qt = "(max-width: 767px)";
|
|
1501
|
+
function Jt(e) {
|
|
1502
|
+
let t = window.matchMedia(qt);
|
|
1503
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
1504
|
+
}
|
|
1505
|
+
function Yt() {
|
|
1506
|
+
return window.matchMedia(qt).matches;
|
|
1507
|
+
}
|
|
1508
|
+
function Xt() {
|
|
1509
|
+
return !1;
|
|
1510
|
+
}
|
|
1511
|
+
function Zt() {
|
|
1512
|
+
return te(Jt, Yt, Xt);
|
|
1513
|
+
}
|
|
1514
|
+
function Qt({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, linkComponent: r, children: i }) {
|
|
1515
|
+
let a = Zt(), [o, s] = k(e), [c, l] = k(!1), u = t !== void 0, d = u ? t : o, f = w(() => {
|
|
1516
|
+
let e = !d;
|
|
1517
|
+
u ? n?.(e) : s(e);
|
|
1289
1518
|
}, [
|
|
1290
|
-
|
|
1291
|
-
|
|
1519
|
+
d,
|
|
1520
|
+
u,
|
|
1292
1521
|
n
|
|
1293
|
-
])
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1522
|
+
]);
|
|
1523
|
+
ee(() => {
|
|
1524
|
+
!a && c && l(!1);
|
|
1525
|
+
}, [a, c]);
|
|
1526
|
+
let p = D(() => ({
|
|
1527
|
+
collapsed: a ? !0 : d,
|
|
1528
|
+
toggle: f,
|
|
1529
|
+
linkComponent: r,
|
|
1530
|
+
mobile: a,
|
|
1531
|
+
mobileOpen: c,
|
|
1532
|
+
setMobileOpen: l
|
|
1533
|
+
}), [
|
|
1534
|
+
d,
|
|
1535
|
+
f,
|
|
1536
|
+
r,
|
|
1537
|
+
a,
|
|
1538
|
+
c
|
|
1539
|
+
]);
|
|
1540
|
+
return /* @__PURE__ */ j(Gt.Provider, {
|
|
1541
|
+
value: p,
|
|
1542
|
+
children: i
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
function $t({ defaultCollapsed: e = !1, collapsed: t, onCollapsedChange: n, linkComponent: r, className: i, children: a }) {
|
|
1546
|
+
let o = Kt();
|
|
1547
|
+
return o ? /* @__PURE__ */ j(tn, {
|
|
1548
|
+
className: i,
|
|
1549
|
+
ctx: o,
|
|
1550
|
+
children: a
|
|
1551
|
+
}) : /* @__PURE__ */ j(Qt, {
|
|
1552
|
+
defaultCollapsed: e,
|
|
1553
|
+
collapsed: t,
|
|
1554
|
+
onCollapsedChange: n,
|
|
1555
|
+
linkComponent: r,
|
|
1556
|
+
children: /* @__PURE__ */ j(en, {
|
|
1557
|
+
className: i,
|
|
1558
|
+
children: a
|
|
1306
1559
|
})
|
|
1307
1560
|
});
|
|
1308
1561
|
}
|
|
1309
|
-
function
|
|
1310
|
-
return /* @__PURE__ */ j(
|
|
1311
|
-
className:
|
|
1562
|
+
function en({ className: e, children: t }) {
|
|
1563
|
+
return /* @__PURE__ */ j(tn, {
|
|
1564
|
+
className: e,
|
|
1565
|
+
ctx: Z(),
|
|
1566
|
+
children: t
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
function tn({ className: e, ctx: t, children: n }) {
|
|
1570
|
+
let { collapsed: r, mobile: i, mobileOpen: a, setMobileOpen: o } = t, s = D(() => ({
|
|
1571
|
+
...t,
|
|
1572
|
+
collapsed: !1
|
|
1573
|
+
}), [t]);
|
|
1574
|
+
return /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(X.Provider, {
|
|
1575
|
+
delay: 0,
|
|
1576
|
+
closeDelay: 0,
|
|
1577
|
+
children: /* @__PURE__ */ j("div", {
|
|
1578
|
+
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", i || r ? "w-12" : "w-[264px]", e),
|
|
1579
|
+
children: n
|
|
1580
|
+
})
|
|
1581
|
+
}), i && /* @__PURE__ */ j(Ft.Root, {
|
|
1582
|
+
open: a,
|
|
1583
|
+
onOpenChange: o,
|
|
1584
|
+
side: "left",
|
|
1585
|
+
responsive: !1,
|
|
1586
|
+
children: /* @__PURE__ */ j(Ft.Content, {
|
|
1587
|
+
side: "left",
|
|
1588
|
+
responsive: !1,
|
|
1589
|
+
children: /* @__PURE__ */ j(Gt.Provider, {
|
|
1590
|
+
value: s,
|
|
1591
|
+
children: /* @__PURE__ */ j(X.Provider, {
|
|
1592
|
+
delay: 0,
|
|
1593
|
+
closeDelay: 0,
|
|
1594
|
+
children: /* @__PURE__ */ j("div", {
|
|
1595
|
+
className: "flex h-full w-full flex-col justify-between px-2 py-1",
|
|
1596
|
+
children: n
|
|
1597
|
+
})
|
|
1598
|
+
})
|
|
1599
|
+
})
|
|
1600
|
+
})
|
|
1601
|
+
})] });
|
|
1602
|
+
}
|
|
1603
|
+
function nn({ className: e, children: t }) {
|
|
1604
|
+
return /* @__PURE__ */ j(Se, {
|
|
1605
|
+
background: "bg-cui-subtle",
|
|
1606
|
+
borderRadius: "rounded",
|
|
1607
|
+
className: W("w-full flex-col items-stretch gap-0.5", e),
|
|
1312
1608
|
children: t
|
|
1313
1609
|
});
|
|
1314
1610
|
}
|
|
1315
|
-
var
|
|
1316
|
-
let { collapsed: i } =
|
|
1611
|
+
var rn = C(function({ className: e, children: t, ...n }, r) {
|
|
1612
|
+
let { collapsed: i } = Z();
|
|
1317
1613
|
return /* @__PURE__ */ j("div", {
|
|
1318
1614
|
ref: r,
|
|
1319
|
-
className:
|
|
1615
|
+
className: W("grid transition-all duration-400 ease-cui-out-expo", i ? "grid-rows-[0fr]" : "grid-rows-[1fr]"),
|
|
1320
1616
|
...n,
|
|
1321
1617
|
children: /* @__PURE__ */ j("div", {
|
|
1322
1618
|
className: "overflow-hidden",
|
|
1323
1619
|
children: /* @__PURE__ */ j("div", {
|
|
1324
|
-
className:
|
|
1620
|
+
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
1621
|
children: t
|
|
1326
1622
|
})
|
|
1327
1623
|
})
|
|
1328
1624
|
});
|
|
1329
1625
|
});
|
|
1330
|
-
function
|
|
1331
|
-
let { collapsed: n } =
|
|
1626
|
+
function an({ className: e, children: t }) {
|
|
1627
|
+
let { collapsed: n } = Z();
|
|
1332
1628
|
return /* @__PURE__ */ M("div", {
|
|
1333
|
-
className:
|
|
1629
|
+
className: W("flex items-center justify-center py-1.5 transition-all duration-400 ease-cui-out-expo", e),
|
|
1334
1630
|
children: [/* @__PURE__ */ j(P, {
|
|
1335
1631
|
mode: "popLayout",
|
|
1336
1632
|
initial: !1,
|
|
@@ -1358,35 +1654,76 @@ function Rt({ className: e, children: t }) {
|
|
|
1358
1654
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
1359
1655
|
children: t
|
|
1360
1656
|
})
|
|
1361
|
-
}), /* @__PURE__ */ j(
|
|
1657
|
+
}), /* @__PURE__ */ j(ln, {})]
|
|
1362
1658
|
});
|
|
1363
1659
|
}
|
|
1364
|
-
function
|
|
1365
|
-
let { collapsed:
|
|
1660
|
+
function on({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1, external: s = !1, showIndicator: c = !1, trailing: u, disabled: d = !1, loading: f = !1, onClick: p, className: m, ...h }) {
|
|
1661
|
+
let { collapsed: g, linkComponent: _, mobile: v, setMobileOpen: y } = Z();
|
|
1662
|
+
if (f) return /* @__PURE__ */ M("div", {
|
|
1663
|
+
className: W("flex h-8 w-full items-center gap-2 p-2 transition-[width] duration-400 ease-cui-out-expo", g ? "w-8" : "w-full"),
|
|
1664
|
+
children: [/* @__PURE__ */ j(Rt, { className: "size-4 shrink-0" }), /* @__PURE__ */ j(P, {
|
|
1665
|
+
mode: "popLayout",
|
|
1666
|
+
initial: !1,
|
|
1667
|
+
children: !g && /* @__PURE__ */ j(F.span, {
|
|
1668
|
+
initial: {
|
|
1669
|
+
opacity: 0,
|
|
1670
|
+
scale: .8
|
|
1671
|
+
},
|
|
1672
|
+
animate: {
|
|
1673
|
+
opacity: 1,
|
|
1674
|
+
scale: 1
|
|
1675
|
+
},
|
|
1676
|
+
exit: {
|
|
1677
|
+
opacity: 0,
|
|
1678
|
+
scale: .8
|
|
1679
|
+
},
|
|
1680
|
+
transition: {
|
|
1681
|
+
duration: .2,
|
|
1682
|
+
ease: "easeOut"
|
|
1683
|
+
},
|
|
1684
|
+
className: "flex-1 origin-left",
|
|
1685
|
+
children: /* @__PURE__ */ j(Rt, { className: "h-4 w-24" })
|
|
1686
|
+
})
|
|
1687
|
+
})]
|
|
1688
|
+
});
|
|
1689
|
+
let b = !!t && !s && !!_, x = n ?? (b ? _ : t ? "a" : "button"), S = d ? (e) => {
|
|
1690
|
+
e.preventDefault(), e.stopPropagation();
|
|
1691
|
+
} : v && g ? (e) => {
|
|
1692
|
+
e.preventDefault(), y(!0);
|
|
1693
|
+
} : () => {
|
|
1694
|
+
p?.(), y(!1);
|
|
1695
|
+
}, C = b ? {
|
|
1696
|
+
to: t,
|
|
1366
1697
|
href: t,
|
|
1367
|
-
onClick:
|
|
1698
|
+
onClick: S
|
|
1699
|
+
} : n === "div" ? { onClick: S } : t ? {
|
|
1700
|
+
href: t,
|
|
1701
|
+
onClick: S,
|
|
1368
1702
|
target: s ? "_blank" : void 0,
|
|
1369
1703
|
rel: s ? "noopener noreferrer" : void 0
|
|
1370
1704
|
} : {
|
|
1371
1705
|
type: "button",
|
|
1372
|
-
onClick:
|
|
1373
|
-
},
|
|
1706
|
+
onClick: S
|
|
1707
|
+
}, w = /* @__PURE__ */ j(G, {
|
|
1374
1708
|
active: r,
|
|
1709
|
+
disabled: d,
|
|
1375
1710
|
background: "bg-cui-subtle",
|
|
1376
1711
|
borderRadius: "rounded",
|
|
1377
1712
|
fullWidth: !0,
|
|
1378
|
-
className:
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1713
|
+
className: W("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", g ? "w-8" : "w-full"),
|
|
1714
|
+
...h,
|
|
1715
|
+
children: /* @__PURE__ */ M(x, {
|
|
1716
|
+
...C,
|
|
1717
|
+
"aria-label": g ? e : void 0,
|
|
1718
|
+
"aria-disabled": d || void 0,
|
|
1719
|
+
className: W("group/link flex h-8 w-full select-none items-center gap-2 p-2 text-left text-cui-base text-cui-secondary outline-none", !d && "cursor-pointer hover:text-cui-primary", r && "text-cui-primary", d && "cursor-default opacity-50", m),
|
|
1383
1720
|
children: [
|
|
1384
1721
|
a && /* @__PURE__ */ M("span", {
|
|
1385
1722
|
className: "relative shrink-0",
|
|
1386
1723
|
children: [/* @__PURE__ */ j("span", {
|
|
1387
|
-
className:
|
|
1724
|
+
className: W("flex size-4 items-center justify-center [&>svg]:size-4", r ? "text-cui-primary" : d ? "text-cui-tertiary" : "text-cui-secondary group-hover/link:text-cui-primary"),
|
|
1388
1725
|
children: a
|
|
1389
|
-
}), c &&
|
|
1726
|
+
}), c && g && /* @__PURE__ */ j("span", {
|
|
1390
1727
|
className: "bg-cui-accent-strong absolute -top-0.5 -right-0.5 size-2 rounded-full",
|
|
1391
1728
|
children: /* @__PURE__ */ j("span", { className: "bg-cui-accent-strong absolute inset-0 animate-ping rounded-full opacity-75" })
|
|
1392
1729
|
})]
|
|
@@ -1394,7 +1731,7 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1394
1731
|
/* @__PURE__ */ j(P, {
|
|
1395
1732
|
mode: "popLayout",
|
|
1396
1733
|
initial: !1,
|
|
1397
|
-
children: !
|
|
1734
|
+
children: !g && /* @__PURE__ */ j(F.span, {
|
|
1398
1735
|
initial: {
|
|
1399
1736
|
opacity: 0,
|
|
1400
1737
|
scale: .8
|
|
@@ -1418,7 +1755,7 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1418
1755
|
/* @__PURE__ */ j(P, {
|
|
1419
1756
|
mode: "popLayout",
|
|
1420
1757
|
initial: !1,
|
|
1421
|
-
children: c && !
|
|
1758
|
+
children: c && !g && /* @__PURE__ */ j(F.span, {
|
|
1422
1759
|
initial: {
|
|
1423
1760
|
opacity: 0,
|
|
1424
1761
|
scale: .8
|
|
@@ -1445,7 +1782,7 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1445
1782
|
/* @__PURE__ */ j(P, {
|
|
1446
1783
|
mode: "popLayout",
|
|
1447
1784
|
initial: !1,
|
|
1448
|
-
children:
|
|
1785
|
+
children: u && !g && /* @__PURE__ */ j(F.span, {
|
|
1449
1786
|
initial: {
|
|
1450
1787
|
opacity: 0,
|
|
1451
1788
|
scale: .8
|
|
@@ -1462,14 +1799,14 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1462
1799
|
duration: .2,
|
|
1463
1800
|
ease: "easeOut"
|
|
1464
1801
|
},
|
|
1465
|
-
className: "origin-left",
|
|
1466
|
-
children:
|
|
1802
|
+
className: "flex shrink-0 origin-left items-center",
|
|
1803
|
+
children: u
|
|
1467
1804
|
})
|
|
1468
1805
|
}),
|
|
1469
1806
|
/* @__PURE__ */ j(P, {
|
|
1470
1807
|
mode: "popLayout",
|
|
1471
1808
|
initial: !1,
|
|
1472
|
-
children:
|
|
1809
|
+
children: s && !g && /* @__PURE__ */ j(F.span, {
|
|
1473
1810
|
initial: {
|
|
1474
1811
|
opacity: 0,
|
|
1475
1812
|
scale: .8
|
|
@@ -1487,40 +1824,13 @@ function zt({ name: e, href: t, as: n, active: r = !1, icon: a, nested: o = !1,
|
|
|
1487
1824
|
ease: "easeOut"
|
|
1488
1825
|
},
|
|
1489
1826
|
className: "origin-left",
|
|
1490
|
-
children: /* @__PURE__ */ j(
|
|
1827
|
+
children: /* @__PURE__ */ j(i, { className: "text-cui-tertiary size-4 shrink-0" })
|
|
1491
1828
|
})
|
|
1492
|
-
})
|
|
1493
|
-
|
|
1494
|
-
})
|
|
1495
|
-
});
|
|
1496
|
-
return /* @__PURE__ */ M(Z.Root, {
|
|
1497
|
-
disabled: !f,
|
|
1498
|
-
children: [/* @__PURE__ */ j(Z.Trigger, { render: h }), /* @__PURE__ */ j(Z.Content, {
|
|
1499
|
-
side: "right",
|
|
1500
|
-
children: e
|
|
1501
|
-
})]
|
|
1502
|
-
});
|
|
1503
|
-
}
|
|
1504
|
-
function Bt({ name: e, onClick: t, className: r }) {
|
|
1505
|
-
let { collapsed: i } = Pt(), a = /* @__PURE__ */ j("div", {
|
|
1506
|
-
className: "flex items-center py-1.5",
|
|
1507
|
-
children: /* @__PURE__ */ j(K, {
|
|
1508
|
-
background: "bg-cui-subtle",
|
|
1509
|
-
borderRadius: "rounded",
|
|
1510
|
-
fullWidth: !0,
|
|
1511
|
-
className: G("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", i ? "w-8" : "w-full"),
|
|
1512
|
-
children: /* @__PURE__ */ M("button", {
|
|
1513
|
-
type: "button",
|
|
1514
|
-
onClick: t,
|
|
1515
|
-
"aria-label": i ? e : void 0,
|
|
1516
|
-
className: G("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__ */ j("span", {
|
|
1518
|
-
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1519
|
-
children: /* @__PURE__ */ j(n, {})
|
|
1520
|
-
}), /* @__PURE__ */ j(P, {
|
|
1829
|
+
}),
|
|
1830
|
+
/* @__PURE__ */ j(P, {
|
|
1521
1831
|
mode: "popLayout",
|
|
1522
1832
|
initial: !1,
|
|
1523
|
-
children: !
|
|
1833
|
+
children: o && !g && /* @__PURE__ */ j(F.span, {
|
|
1524
1834
|
initial: {
|
|
1525
1835
|
opacity: 0,
|
|
1526
1836
|
scale: .8
|
|
@@ -1537,22 +1847,81 @@ function Bt({ name: e, onClick: t, className: r }) {
|
|
|
1537
1847
|
duration: .2,
|
|
1538
1848
|
ease: "easeOut"
|
|
1539
1849
|
},
|
|
1540
|
-
className: "
|
|
1541
|
-
children:
|
|
1850
|
+
className: "origin-left",
|
|
1851
|
+
children: /* @__PURE__ */ j(l, { className: "text-cui-tertiary size-4 shrink-0" })
|
|
1542
1852
|
})
|
|
1543
|
-
})
|
|
1544
|
-
|
|
1853
|
+
})
|
|
1854
|
+
]
|
|
1545
1855
|
})
|
|
1546
1856
|
});
|
|
1547
|
-
return /* @__PURE__ */ M(
|
|
1857
|
+
return /* @__PURE__ */ M(X.Root, {
|
|
1858
|
+
disabled: !g || v,
|
|
1859
|
+
children: [/* @__PURE__ */ j(X.Trigger, {
|
|
1860
|
+
className: "w-full outline-none",
|
|
1861
|
+
render: /* @__PURE__ */ j("div", {}),
|
|
1862
|
+
children: w
|
|
1863
|
+
}), /* @__PURE__ */ j(X.Content, {
|
|
1864
|
+
side: "right",
|
|
1865
|
+
children: e
|
|
1866
|
+
})]
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
function sn({ name: e, onClick: t, className: r }) {
|
|
1870
|
+
let { collapsed: i } = Z();
|
|
1871
|
+
return /* @__PURE__ */ M(X.Root, {
|
|
1548
1872
|
disabled: !i,
|
|
1549
|
-
children: [/* @__PURE__ */ j(
|
|
1873
|
+
children: [/* @__PURE__ */ j(X.Trigger, {
|
|
1874
|
+
className: "w-full outline-none",
|
|
1875
|
+
render: /* @__PURE__ */ j("div", {}),
|
|
1876
|
+
children: /* @__PURE__ */ j("div", {
|
|
1877
|
+
className: "flex items-center py-1.5",
|
|
1878
|
+
children: /* @__PURE__ */ j(G, {
|
|
1879
|
+
background: "bg-cui-subtle",
|
|
1880
|
+
borderRadius: "rounded",
|
|
1881
|
+
fullWidth: !0,
|
|
1882
|
+
className: W("overflow-hidden transition-[width] duration-400 ease-cui-out-expo", i ? "w-8" : "w-full"),
|
|
1883
|
+
children: /* @__PURE__ */ M("button", {
|
|
1884
|
+
type: "button",
|
|
1885
|
+
onClick: t,
|
|
1886
|
+
"aria-label": i ? e : void 0,
|
|
1887
|
+
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 hover:text-cui-primary outline-none", r),
|
|
1888
|
+
children: [/* @__PURE__ */ j("span", {
|
|
1889
|
+
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1890
|
+
children: /* @__PURE__ */ j(n, {})
|
|
1891
|
+
}), /* @__PURE__ */ j(P, {
|
|
1892
|
+
mode: "popLayout",
|
|
1893
|
+
initial: !1,
|
|
1894
|
+
children: !i && /* @__PURE__ */ j(F.span, {
|
|
1895
|
+
initial: {
|
|
1896
|
+
opacity: 0,
|
|
1897
|
+
scale: .8
|
|
1898
|
+
},
|
|
1899
|
+
animate: {
|
|
1900
|
+
opacity: 1,
|
|
1901
|
+
scale: 1
|
|
1902
|
+
},
|
|
1903
|
+
exit: {
|
|
1904
|
+
opacity: 0,
|
|
1905
|
+
scale: .8
|
|
1906
|
+
},
|
|
1907
|
+
transition: {
|
|
1908
|
+
duration: .2,
|
|
1909
|
+
ease: "easeOut"
|
|
1910
|
+
},
|
|
1911
|
+
className: "flex-1 origin-left truncate",
|
|
1912
|
+
children: e
|
|
1913
|
+
})
|
|
1914
|
+
})]
|
|
1915
|
+
})
|
|
1916
|
+
})
|
|
1917
|
+
})
|
|
1918
|
+
}), /* @__PURE__ */ j(X.Content, {
|
|
1550
1919
|
side: "right",
|
|
1551
1920
|
children: e
|
|
1552
1921
|
})]
|
|
1553
1922
|
});
|
|
1554
1923
|
}
|
|
1555
|
-
function
|
|
1924
|
+
function cn({ collapsed: e }) {
|
|
1556
1925
|
return /* @__PURE__ */ M("svg", {
|
|
1557
1926
|
width: "16",
|
|
1558
1927
|
height: "16",
|
|
@@ -1573,24 +1942,38 @@ function Vt({ collapsed: e }) {
|
|
|
1573
1942
|
height: 6,
|
|
1574
1943
|
rx: .75,
|
|
1575
1944
|
fill: "currentColor",
|
|
1576
|
-
className:
|
|
1945
|
+
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
1946
|
})]
|
|
1578
1947
|
});
|
|
1579
1948
|
}
|
|
1580
|
-
function
|
|
1581
|
-
let { collapsed: t, toggle: n } =
|
|
1582
|
-
return /* @__PURE__ */ j(
|
|
1949
|
+
function ln({ className: e }) {
|
|
1950
|
+
let { collapsed: t, toggle: n, mobile: r, setMobileOpen: i } = Z();
|
|
1951
|
+
return r && !t ? /* @__PURE__ */ j(K, {
|
|
1952
|
+
variant: "transparent",
|
|
1953
|
+
size: "md",
|
|
1954
|
+
iconLeft: /* @__PURE__ */ j(x, {}),
|
|
1955
|
+
onClick: () => i(!1),
|
|
1956
|
+
className: W("shrink-0", e),
|
|
1957
|
+
"aria-label": "Close menu"
|
|
1958
|
+
}) : r ? /* @__PURE__ */ j(K, {
|
|
1959
|
+
variant: "transparent",
|
|
1960
|
+
size: "md",
|
|
1961
|
+
iconLeft: /* @__PURE__ */ j(cn, { collapsed: t }),
|
|
1962
|
+
onClick: () => i(!0),
|
|
1963
|
+
className: W("shrink-0", e),
|
|
1964
|
+
"aria-label": "Open menu"
|
|
1965
|
+
}) : /* @__PURE__ */ j(K, {
|
|
1583
1966
|
variant: "transparent",
|
|
1584
1967
|
size: "md",
|
|
1585
|
-
iconLeft: /* @__PURE__ */ j(
|
|
1968
|
+
iconLeft: /* @__PURE__ */ j(cn, { collapsed: t }),
|
|
1586
1969
|
onClick: n,
|
|
1587
|
-
className:
|
|
1970
|
+
className: W("shrink-0", e),
|
|
1588
1971
|
"aria-label": t ? "Expand sidebar" : "Collapse sidebar"
|
|
1589
1972
|
});
|
|
1590
1973
|
}
|
|
1591
|
-
function
|
|
1974
|
+
function un({ activeKey: e, direction: t = "forward", className: n, children: r }) {
|
|
1592
1975
|
return /* @__PURE__ */ j("div", {
|
|
1593
|
-
className:
|
|
1976
|
+
className: W("relative min-h-0 flex-1", n),
|
|
1594
1977
|
children: /* @__PURE__ */ j(P, {
|
|
1595
1978
|
mode: "popLayout",
|
|
1596
1979
|
initial: !1,
|
|
@@ -1625,19 +2008,20 @@ function Ut({ activeKey: e, direction: t = "forward", className: n, children: r
|
|
|
1625
2008
|
})
|
|
1626
2009
|
});
|
|
1627
2010
|
}
|
|
1628
|
-
var
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
2011
|
+
var dn = Object.assign($t, {
|
|
2012
|
+
Provider: Qt,
|
|
2013
|
+
Section: nn,
|
|
2014
|
+
Header: an,
|
|
2015
|
+
Label: rn,
|
|
2016
|
+
Link: on,
|
|
2017
|
+
BackLink: sn,
|
|
2018
|
+
CollapseButton: ln,
|
|
2019
|
+
Layers: un
|
|
1636
2020
|
});
|
|
1637
2021
|
//#endregion
|
|
1638
2022
|
//#region src/components/select/select.tsx
|
|
1639
|
-
function
|
|
1640
|
-
return /* @__PURE__ */ j(
|
|
2023
|
+
function fn({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i, children: a, className: o }) {
|
|
2024
|
+
return /* @__PURE__ */ j(R.Root, {
|
|
1641
2025
|
value: e,
|
|
1642
2026
|
defaultValue: t,
|
|
1643
2027
|
onValueChange: n ? (e) => {
|
|
@@ -1651,106 +2035,106 @@ function Gt({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i
|
|
|
1651
2035
|
}) : a
|
|
1652
2036
|
});
|
|
1653
2037
|
}
|
|
1654
|
-
var
|
|
1655
|
-
return /* @__PURE__ */ j(
|
|
2038
|
+
var pn = C(function({ children: e, className: t }, n) {
|
|
2039
|
+
return /* @__PURE__ */ j(R.Trigger, {
|
|
1656
2040
|
ref: n,
|
|
1657
|
-
className:
|
|
2041
|
+
className: W("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
|
|
1658
2042
|
children: e
|
|
1659
2043
|
});
|
|
1660
|
-
}),
|
|
1661
|
-
return /* @__PURE__ */ j(
|
|
2044
|
+
}), mn = C(function({ placeholder: e, size: t, className: n }, r) {
|
|
2045
|
+
return /* @__PURE__ */ j(R.Trigger, {
|
|
1662
2046
|
ref: r,
|
|
1663
|
-
render: /* @__PURE__ */ j(
|
|
2047
|
+
render: /* @__PURE__ */ j(K, {
|
|
1664
2048
|
variant: "outline",
|
|
1665
2049
|
size: t,
|
|
1666
2050
|
iconRight: /* @__PURE__ */ j(u, {}),
|
|
1667
2051
|
className: n,
|
|
1668
|
-
children: /* @__PURE__ */ j(
|
|
2052
|
+
children: /* @__PURE__ */ j(R.Value, { placeholder: e })
|
|
1669
2053
|
})
|
|
1670
2054
|
});
|
|
1671
2055
|
});
|
|
1672
|
-
function
|
|
1673
|
-
return /* @__PURE__ */ j(
|
|
2056
|
+
function hn({ align: e = "start", side: t = "bottom", sideOffset: n = 4, minWidth: r = "min-w-[220px]", children: i, className: a }) {
|
|
2057
|
+
return /* @__PURE__ */ j(R.Portal, { children: /* @__PURE__ */ j(R.Positioner, {
|
|
1674
2058
|
align: e,
|
|
1675
2059
|
side: t,
|
|
1676
2060
|
sideOffset: n,
|
|
1677
2061
|
alignItemWithTrigger: !1,
|
|
1678
|
-
render: /* @__PURE__ */ j(
|
|
1679
|
-
children: /* @__PURE__ */ j(
|
|
1680
|
-
render: /* @__PURE__ */ j(
|
|
2062
|
+
render: /* @__PURE__ */ j(q.Positioner, {}),
|
|
2063
|
+
children: /* @__PURE__ */ j(R.Popup, {
|
|
2064
|
+
render: /* @__PURE__ */ j(q.Panel, {
|
|
1681
2065
|
minWidth: r,
|
|
1682
2066
|
className: a
|
|
1683
2067
|
}),
|
|
1684
|
-
children: /* @__PURE__ */ j(
|
|
1685
|
-
render: /* @__PURE__ */ j(
|
|
2068
|
+
children: /* @__PURE__ */ j(R.List, {
|
|
2069
|
+
render: /* @__PURE__ */ j(q.List, {}),
|
|
1686
2070
|
children: i
|
|
1687
2071
|
})
|
|
1688
2072
|
})
|
|
1689
2073
|
}) });
|
|
1690
2074
|
}
|
|
1691
|
-
var
|
|
1692
|
-
return /* @__PURE__ */ M(
|
|
2075
|
+
var gn = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
2076
|
+
return /* @__PURE__ */ M(R.Item, {
|
|
1693
2077
|
ref: i,
|
|
1694
2078
|
value: e,
|
|
1695
|
-
render: /* @__PURE__ */ j(
|
|
2079
|
+
render: /* @__PURE__ */ j(q.Item, {
|
|
1696
2080
|
icon: t,
|
|
1697
2081
|
className: r
|
|
1698
2082
|
}),
|
|
1699
|
-
children: [/* @__PURE__ */ j(
|
|
2083
|
+
children: [/* @__PURE__ */ j(R.ItemText, {
|
|
1700
2084
|
className: "relative z-[1] flex-1",
|
|
1701
2085
|
children: n
|
|
1702
|
-
}), /* @__PURE__ */ j(
|
|
2086
|
+
}), /* @__PURE__ */ j(R.ItemIndicator, { render: /* @__PURE__ */ j(q.ItemIndicator, {}) })]
|
|
1703
2087
|
});
|
|
1704
|
-
}),
|
|
1705
|
-
return /* @__PURE__ */ j(
|
|
2088
|
+
}), _n = C(function({ className: e }, t) {
|
|
2089
|
+
return /* @__PURE__ */ j(R.Separator, {
|
|
1706
2090
|
ref: t,
|
|
1707
|
-
render: /* @__PURE__ */ j(
|
|
2091
|
+
render: /* @__PURE__ */ j(q.Separator, { className: e })
|
|
1708
2092
|
});
|
|
1709
|
-
}),
|
|
1710
|
-
return /* @__PURE__ */ j(
|
|
2093
|
+
}), vn = C(function({ className: e, children: t }, n) {
|
|
2094
|
+
return /* @__PURE__ */ j(R.Group, {
|
|
1711
2095
|
ref: n,
|
|
1712
|
-
className:
|
|
2096
|
+
className: W("flex flex-col", e),
|
|
1713
2097
|
children: t
|
|
1714
2098
|
});
|
|
1715
|
-
}),
|
|
1716
|
-
return /* @__PURE__ */ j(
|
|
2099
|
+
}), yn = C(function({ className: e, children: t }, n) {
|
|
2100
|
+
return /* @__PURE__ */ j(R.GroupLabel, {
|
|
1717
2101
|
ref: n,
|
|
1718
|
-
render: /* @__PURE__ */ j(
|
|
2102
|
+
render: /* @__PURE__ */ j(q.GroupLabel, { className: e }),
|
|
1719
2103
|
children: t
|
|
1720
2104
|
});
|
|
1721
|
-
}),
|
|
1722
|
-
return /* @__PURE__ */ j(
|
|
2105
|
+
}), bn = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
2106
|
+
return /* @__PURE__ */ j(ae, {
|
|
1723
2107
|
ref: r,
|
|
1724
2108
|
orientation: e,
|
|
1725
|
-
className:
|
|
2109
|
+
className: W(e === "horizontal" ? "w-full border-t border-cui-neutral" : "self-stretch border-l border-cui-neutral", "shrink-0", t),
|
|
1726
2110
|
...n
|
|
1727
2111
|
});
|
|
1728
|
-
}),
|
|
2112
|
+
}), xn = {
|
|
1729
2113
|
neutral: "bg-cui-subtle text-cui-secondary",
|
|
1730
2114
|
accent: "bg-cui-accent-subtle text-cui-accent",
|
|
1731
2115
|
danger: "bg-cui-danger-subtle text-cui-danger",
|
|
1732
2116
|
warn: "bg-cui-warn-subtle text-cui-warn",
|
|
1733
2117
|
success: "bg-cui-success-subtle text-cui-success"
|
|
1734
|
-
},
|
|
2118
|
+
}, Sn = {
|
|
1735
2119
|
sm: "px-1.5 py-0.5 text-cui-sm",
|
|
1736
2120
|
md: "px-2 py-0.5 text-cui-base"
|
|
1737
|
-
},
|
|
2121
|
+
}, Cn = C(function({ variant: e = "neutral", size: t = "sm", className: n, children: r, ...i }, a) {
|
|
1738
2122
|
return /* @__PURE__ */ j("span", {
|
|
1739
2123
|
ref: a,
|
|
1740
|
-
className:
|
|
2124
|
+
className: W("inline-flex items-center rounded-md font-medium leading-tight", Sn[t], xn[e], n),
|
|
1741
2125
|
...i,
|
|
1742
2126
|
children: r
|
|
1743
2127
|
});
|
|
1744
|
-
}),
|
|
1745
|
-
return /* @__PURE__ */ j(
|
|
2128
|
+
}), wn = C(function({ className: e, ...t }, n) {
|
|
2129
|
+
return /* @__PURE__ */ j(oe.Root, {
|
|
1746
2130
|
ref: n,
|
|
1747
|
-
className:
|
|
2131
|
+
className: W("flex flex-col gap-1.5", e),
|
|
1748
2132
|
...t
|
|
1749
2133
|
});
|
|
1750
|
-
}),
|
|
1751
|
-
return /* @__PURE__ */ M(
|
|
2134
|
+
}), Tn = C(function({ required: e, className: t, children: n, ...r }, i) {
|
|
2135
|
+
return /* @__PURE__ */ M(oe.Label, {
|
|
1752
2136
|
ref: i,
|
|
1753
|
-
className:
|
|
2137
|
+
className: W("text-cui-base font-medium text-cui-primary", "data-[disabled]:text-cui-tertiary data-[disabled]:cursor-not-allowed", t),
|
|
1754
2138
|
...r,
|
|
1755
2139
|
children: [n, e && /* @__PURE__ */ j("span", {
|
|
1756
2140
|
className: "text-cui-danger ml-0.5",
|
|
@@ -1758,7 +2142,7 @@ var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1758
2142
|
children: "*"
|
|
1759
2143
|
})]
|
|
1760
2144
|
});
|
|
1761
|
-
}),
|
|
2145
|
+
}), En = [
|
|
1762
2146
|
"w-full rounded-md border border-cui-neutral bg-cui-base-2 px-3 py-1.5 text-cui-base text-cui-primary",
|
|
1763
2147
|
"outline-none",
|
|
1764
2148
|
"placeholder:text-cui-tertiary",
|
|
@@ -1768,7 +2152,7 @@ var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1768
2152
|
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1769
2153
|
"data-[invalid]:border-cui-danger data-[invalid]:focus:ring-cui-danger/30",
|
|
1770
2154
|
"data-[valid]:border-cui-success"
|
|
1771
|
-
],
|
|
2155
|
+
], Dn = [
|
|
1772
2156
|
"rounded-md border border-cui-neutral bg-cui-base-2 py-1.5 text-cui-base",
|
|
1773
2157
|
"ring-cui-neutral ring-0 transition-[box-shadow,color,border-color] duration-150 ease-out",
|
|
1774
2158
|
"has-[:focus]:ring-2 has-[:focus]:border-cui-neutral-strong",
|
|
@@ -1776,20 +2160,20 @@ var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1776
2160
|
"has-[*[data-disabled]]:cursor-not-allowed has-[*[data-disabled]]:opacity-50",
|
|
1777
2161
|
"has-[*[data-invalid]]:border-cui-danger has-[*[data-invalid]:focus]:ring-cui-danger/30",
|
|
1778
2162
|
"has-[*[data-valid]]:border-cui-success"
|
|
1779
|
-
],
|
|
1780
|
-
Field:
|
|
1781
|
-
Label:
|
|
2163
|
+
], On = {
|
|
2164
|
+
Field: wn,
|
|
2165
|
+
Label: Tn,
|
|
1782
2166
|
Input: C(function({ iconLeft: e, iconRight: t, wrapperClassName: n, className: r, ...i }, a) {
|
|
1783
2167
|
return e || t ? /* @__PURE__ */ M("div", {
|
|
1784
|
-
className:
|
|
2168
|
+
className: W("flex items-center gap-2 px-2.5", Dn, n),
|
|
1785
2169
|
children: [
|
|
1786
2170
|
e && /* @__PURE__ */ j("span", {
|
|
1787
2171
|
className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
1788
2172
|
children: e
|
|
1789
2173
|
}),
|
|
1790
|
-
/* @__PURE__ */ j(
|
|
2174
|
+
/* @__PURE__ */ j(oe.Control, {
|
|
1791
2175
|
ref: a,
|
|
1792
|
-
className:
|
|
2176
|
+
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
2177
|
...i
|
|
1794
2178
|
}),
|
|
1795
2179
|
t && /* @__PURE__ */ j("span", {
|
|
@@ -1797,142 +2181,31 @@ var Yt = C(function({ value: e, icon: t, children: n, className: r }, i) {
|
|
|
1797
2181
|
children: t
|
|
1798
2182
|
})
|
|
1799
2183
|
]
|
|
1800
|
-
}) : /* @__PURE__ */ j(
|
|
2184
|
+
}) : /* @__PURE__ */ j(oe.Control, {
|
|
1801
2185
|
ref: a,
|
|
1802
|
-
className:
|
|
2186
|
+
className: W(En, r),
|
|
1803
2187
|
...i
|
|
1804
2188
|
});
|
|
1805
2189
|
}),
|
|
1806
2190
|
Textarea: C(function({ className: e, ...t }, n) {
|
|
1807
|
-
return /* @__PURE__ */ j(
|
|
2191
|
+
return /* @__PURE__ */ j(oe.Control, {
|
|
1808
2192
|
ref: n,
|
|
1809
2193
|
render: /* @__PURE__ */ j("textarea", {}),
|
|
1810
|
-
className:
|
|
2194
|
+
className: W(En, "min-h-20 resize-y", e),
|
|
1811
2195
|
...t
|
|
1812
2196
|
});
|
|
1813
2197
|
}),
|
|
1814
2198
|
Hint: C(function({ className: e, ...t }, n) {
|
|
1815
|
-
return /* @__PURE__ */ j(
|
|
2199
|
+
return /* @__PURE__ */ j(oe.Description, {
|
|
1816
2200
|
ref: n,
|
|
1817
|
-
className:
|
|
2201
|
+
className: W("text-cui-sm text-cui-tertiary data-[invalid]:text-cui-danger", e),
|
|
1818
2202
|
...t
|
|
1819
2203
|
});
|
|
1820
2204
|
})
|
|
1821
2205
|
};
|
|
1822
2206
|
//#endregion
|
|
1823
|
-
//#region src/components/flickering-grid/flickering-grid.tsx
|
|
1824
|
-
function ln(e, t) {
|
|
1825
|
-
let n = e.style.color;
|
|
1826
|
-
e.style.color = t;
|
|
1827
|
-
let r = getComputedStyle(e).color;
|
|
1828
|
-
return e.style.color = n, r || "#000";
|
|
1829
|
-
}
|
|
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 = O(null), p = O(null);
|
|
1832
|
-
return T(() => {
|
|
1833
|
-
let d = f.current, m = p.current;
|
|
1834
|
-
if (!d || !m) return;
|
|
1835
|
-
let h = m.getContext("2d");
|
|
1836
|
-
if (!h) return;
|
|
1837
|
-
let g = ln(d, r), _ = 0, v = 0, y = new Float32Array(), b = new Float32Array(), x = 1, S = 0, C = 0, w = performance.now();
|
|
1838
|
-
function ee() {
|
|
1839
|
-
if (!m || !d) return;
|
|
1840
|
-
x = window.devicePixelRatio || 1, S = d.clientWidth, C = d.clientHeight, m.width = S * x, m.height = C * x, m.style.width = `${S}px`, m.style.height = `${C}px`;
|
|
1841
|
-
let n = e + t;
|
|
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
|
-
for (let e = 0; e < y.length; e++) y[e] = Math.random() * i, b[e] = (Math.random() - .5) * 2 * u;
|
|
1844
|
-
}
|
|
1845
|
-
function T(e) {
|
|
1846
|
-
if (!l) for (let t = 0; t < y.length; t++) Math.random() < n * e && (y[t] = Math.random() * i);
|
|
1847
|
-
}
|
|
1848
|
-
function E(n) {
|
|
1849
|
-
if (!h || !m) return;
|
|
1850
|
-
h.clearRect(0, 0, m.width, m.height), h.fillStyle = g;
|
|
1851
|
-
let r = e + t, u = 0;
|
|
1852
|
-
if (a) {
|
|
1853
|
-
let e = (n - w) / 1e3 / s % 1;
|
|
1854
|
-
u = o === "left" ? 1 - e : e, u = u * (1 + c * 2) - c;
|
|
1855
|
-
}
|
|
1856
|
-
for (let t = 0; t < _; t++) for (let n = 0; n < v; n++) {
|
|
1857
|
-
let o = t * v + n, s;
|
|
1858
|
-
if (l && a) {
|
|
1859
|
-
let e = (_ > 1 ? t / (_ - 1) : 0) + (b[o] ?? 0), n = Math.abs(e - u), r = Math.max(0, 1 - n / c);
|
|
1860
|
-
s = r * r * (3 - 2 * r) * i;
|
|
1861
|
-
} else if (s = y[o] ?? 0, a) {
|
|
1862
|
-
let e = _ > 1 ? t / (_ - 1) : 0, n = Math.abs(e - u), r = Math.max(0, 1 - n / c), a = r * r * (3 - 2 * r);
|
|
1863
|
-
s = Math.min(i * 1.5, s + a * i);
|
|
1864
|
-
}
|
|
1865
|
-
s < .01 || (h.globalAlpha = s, h.fillRect(t * r * x, n * r * x, e * x, e * x));
|
|
1866
|
-
}
|
|
1867
|
-
h.globalAlpha = 1;
|
|
1868
|
-
}
|
|
1869
|
-
ee();
|
|
1870
|
-
let D = 0, O = performance.now(), k = !0;
|
|
1871
|
-
function A(e) {
|
|
1872
|
-
if (!k) return;
|
|
1873
|
-
let t = (e - O) / 1e3;
|
|
1874
|
-
O = e, T(t), E(e), D = requestAnimationFrame(A);
|
|
1875
|
-
}
|
|
1876
|
-
let j = new ResizeObserver(() => {
|
|
1877
|
-
ee();
|
|
1878
|
-
});
|
|
1879
|
-
j.observe(d);
|
|
1880
|
-
let M = new IntersectionObserver(([e]) => {
|
|
1881
|
-
k = e?.isIntersecting ?? !1, k ? (O = performance.now(), D = requestAnimationFrame(A)) : cancelAnimationFrame(D);
|
|
1882
|
-
}, { threshold: 0 });
|
|
1883
|
-
M.observe(m);
|
|
1884
|
-
let N = new MutationObserver(() => {
|
|
1885
|
-
g = ln(d, r);
|
|
1886
|
-
});
|
|
1887
|
-
return N.observe(document.documentElement, {
|
|
1888
|
-
attributes: !0,
|
|
1889
|
-
attributeFilter: ["data-theme", "class"]
|
|
1890
|
-
}), () => {
|
|
1891
|
-
cancelAnimationFrame(D), j.disconnect(), M.disconnect(), N.disconnect();
|
|
1892
|
-
};
|
|
1893
|
-
}, [
|
|
1894
|
-
e,
|
|
1895
|
-
t,
|
|
1896
|
-
n,
|
|
1897
|
-
r,
|
|
1898
|
-
i,
|
|
1899
|
-
a,
|
|
1900
|
-
o,
|
|
1901
|
-
s,
|
|
1902
|
-
c,
|
|
1903
|
-
l,
|
|
1904
|
-
u
|
|
1905
|
-
]), /* @__PURE__ */ j("div", {
|
|
1906
|
-
ref: f,
|
|
1907
|
-
className: G("pointer-events-none size-full", d),
|
|
1908
|
-
"aria-hidden": "true",
|
|
1909
|
-
children: /* @__PURE__ */ j("canvas", { ref: p })
|
|
1910
|
-
});
|
|
1911
|
-
}
|
|
1912
|
-
//#endregion
|
|
1913
|
-
//#region src/components/skeleton/skeleton.tsx
|
|
1914
|
-
var dn = C(function({ circular: e, className: t }, n) {
|
|
1915
|
-
return /* @__PURE__ */ j("div", {
|
|
1916
|
-
ref: n,
|
|
1917
|
-
className: G("relative overflow-hidden bg-cui-subtle", e ? "rounded-full" : "rounded-xs", t),
|
|
1918
|
-
"aria-hidden": "true",
|
|
1919
|
-
children: /* @__PURE__ */ j(un, {
|
|
1920
|
-
squareSize: 4,
|
|
1921
|
-
gridGap: 2,
|
|
1922
|
-
color: "var(--text-color-cui-secondary)",
|
|
1923
|
-
maxOpacity: .05,
|
|
1924
|
-
sweep: !0,
|
|
1925
|
-
sweepOnly: !0,
|
|
1926
|
-
sweepDirection: "right",
|
|
1927
|
-
sweepDuration: 1.5,
|
|
1928
|
-
sweepWidth: .4,
|
|
1929
|
-
sweepNoise: .1
|
|
1930
|
-
})
|
|
1931
|
-
});
|
|
1932
|
-
});
|
|
1933
|
-
//#endregion
|
|
1934
2207
|
//#region src/components/dropdown-menu/dropdown-menu.tsx
|
|
1935
|
-
function
|
|
2208
|
+
function kn({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children: i }) {
|
|
1936
2209
|
return /* @__PURE__ */ j(z.Root, {
|
|
1937
2210
|
open: e,
|
|
1938
2211
|
defaultOpen: t,
|
|
@@ -1941,21 +2214,21 @@ function fn({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children:
|
|
|
1941
2214
|
children: i
|
|
1942
2215
|
});
|
|
1943
2216
|
}
|
|
1944
|
-
var
|
|
2217
|
+
var An = C(function({ className: e, ...t }, n) {
|
|
1945
2218
|
return /* @__PURE__ */ j(z.Trigger, {
|
|
1946
2219
|
ref: n,
|
|
1947
|
-
className:
|
|
2220
|
+
className: W("cursor-pointer outline-none", e),
|
|
1948
2221
|
...t
|
|
1949
2222
|
});
|
|
1950
2223
|
});
|
|
1951
|
-
function
|
|
2224
|
+
function jn({ side: e = "bottom", align: t = "end", sideOffset: n = 4, minWidth: r = "min-w-[180px]", className: i, children: a }) {
|
|
1952
2225
|
return /* @__PURE__ */ j(z.Portal, { children: /* @__PURE__ */ j(z.Positioner, {
|
|
1953
2226
|
side: e,
|
|
1954
2227
|
align: t,
|
|
1955
2228
|
sideOffset: n,
|
|
1956
|
-
render: /* @__PURE__ */ j(
|
|
2229
|
+
render: /* @__PURE__ */ j(q.Positioner, {}),
|
|
1957
2230
|
children: /* @__PURE__ */ j(z.Popup, {
|
|
1958
|
-
render: /* @__PURE__ */ j(
|
|
2231
|
+
render: /* @__PURE__ */ j(q.Panel, {
|
|
1959
2232
|
minWidth: r,
|
|
1960
2233
|
className: i
|
|
1961
2234
|
}),
|
|
@@ -1964,16 +2237,16 @@ function mn({ side: e = "bottom", align: t = "end", sideOffset: n = 4, minWidth:
|
|
|
1964
2237
|
}) });
|
|
1965
2238
|
}
|
|
1966
2239
|
var Q = {
|
|
1967
|
-
Root:
|
|
1968
|
-
Trigger:
|
|
1969
|
-
Content:
|
|
2240
|
+
Root: kn,
|
|
2241
|
+
Trigger: An,
|
|
2242
|
+
Content: jn,
|
|
1970
2243
|
Item: C(function({ variant: e = "default", icon: t, onClick: n, closeOnClick: r, disabled: i, className: a, children: o }, s) {
|
|
1971
2244
|
return /* @__PURE__ */ j(z.Item, {
|
|
1972
2245
|
ref: s,
|
|
1973
2246
|
onClick: n,
|
|
1974
2247
|
closeOnClick: r,
|
|
1975
2248
|
disabled: i,
|
|
1976
|
-
render: /* @__PURE__ */ j(
|
|
2249
|
+
render: /* @__PURE__ */ j(q.Item, {
|
|
1977
2250
|
icon: t,
|
|
1978
2251
|
variant: e,
|
|
1979
2252
|
className: a
|
|
@@ -1987,142 +2260,154 @@ var Q = {
|
|
|
1987
2260
|
Separator: C(function({ className: e }, t) {
|
|
1988
2261
|
return /* @__PURE__ */ j(z.Separator, {
|
|
1989
2262
|
ref: t,
|
|
1990
|
-
render: /* @__PURE__ */ j(
|
|
2263
|
+
render: /* @__PURE__ */ j(q.Separator, { className: e })
|
|
1991
2264
|
});
|
|
1992
2265
|
}),
|
|
1993
2266
|
Label: C(function({ className: e, children: t }, n) {
|
|
1994
2267
|
return /* @__PURE__ */ j(z.GroupLabel, {
|
|
1995
2268
|
ref: n,
|
|
1996
|
-
render: /* @__PURE__ */ j(
|
|
2269
|
+
render: /* @__PURE__ */ j(q.GroupLabel, { className: e }),
|
|
1997
2270
|
children: t
|
|
1998
2271
|
});
|
|
1999
2272
|
}),
|
|
2000
2273
|
Group: C(function({ className: e, children: t }, n) {
|
|
2001
2274
|
return /* @__PURE__ */ j(z.Group, {
|
|
2002
2275
|
ref: n,
|
|
2003
|
-
className:
|
|
2276
|
+
className: W("flex flex-col", e),
|
|
2004
2277
|
children: t
|
|
2005
2278
|
});
|
|
2006
2279
|
})
|
|
2007
2280
|
};
|
|
2008
2281
|
//#endregion
|
|
2009
2282
|
//#region src/components/dialog/dialog.tsx
|
|
2010
|
-
function
|
|
2283
|
+
function Mn({ ...e }) {
|
|
2011
2284
|
return /* @__PURE__ */ j(B.Root, { ...e });
|
|
2012
2285
|
}
|
|
2013
|
-
var
|
|
2286
|
+
var Nn = C(function({ className: e, ...t }, n) {
|
|
2014
2287
|
return /* @__PURE__ */ j(B.Trigger, {
|
|
2015
2288
|
ref: n,
|
|
2016
|
-
className:
|
|
2289
|
+
className: W(e),
|
|
2017
2290
|
...t
|
|
2018
2291
|
});
|
|
2019
|
-
}),
|
|
2292
|
+
}), Pn = C(function({ className: e, ...t }, n) {
|
|
2020
2293
|
return /* @__PURE__ */ j(B.Backdrop, {
|
|
2021
2294
|
ref: n,
|
|
2022
|
-
className:
|
|
2295
|
+
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
2296
|
...t
|
|
2024
2297
|
});
|
|
2025
|
-
}),
|
|
2298
|
+
}), Fn = {
|
|
2026
2299
|
md: "max-w-[450px]",
|
|
2027
2300
|
lg: "max-w-[550px]"
|
|
2028
2301
|
};
|
|
2029
|
-
function
|
|
2030
|
-
return /* @__PURE__ */ M(B.Portal, { children: [/* @__PURE__ */ j(
|
|
2031
|
-
className:
|
|
2302
|
+
function In({ size: e = "md", className: t, children: n, ...r }) {
|
|
2303
|
+
return /* @__PURE__ */ M(B.Portal, { children: [/* @__PURE__ */ j(Pn, {}), /* @__PURE__ */ j(B.Popup, {
|
|
2304
|
+
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", Fn[e], t),
|
|
2032
2305
|
...r,
|
|
2033
2306
|
children: n
|
|
2034
2307
|
})] });
|
|
2035
2308
|
}
|
|
2036
|
-
var
|
|
2309
|
+
var Ln = C(function({ className: e, children: t }, n) {
|
|
2037
2310
|
return /* @__PURE__ */ j("div", {
|
|
2038
2311
|
ref: n,
|
|
2039
|
-
className:
|
|
2312
|
+
className: W("bg-cui-base-2 border-cui-neutral rounded-md border", e),
|
|
2040
2313
|
children: t
|
|
2041
2314
|
});
|
|
2042
|
-
}),
|
|
2315
|
+
}), Rn = C(function({ className: e, ...t }, n) {
|
|
2043
2316
|
return /* @__PURE__ */ j(B.Title, {
|
|
2044
2317
|
ref: n,
|
|
2045
|
-
className:
|
|
2318
|
+
className: W("text-cui-primary border-cui-neutral border-b px-4 py-3 text-cui-base font-medium", e),
|
|
2046
2319
|
...t
|
|
2047
2320
|
});
|
|
2048
|
-
}),
|
|
2321
|
+
}), zn = C(function({ className: e, children: t }, n) {
|
|
2049
2322
|
return /* @__PURE__ */ j("div", {
|
|
2050
2323
|
ref: n,
|
|
2051
|
-
className:
|
|
2324
|
+
className: W("p-4", e),
|
|
2052
2325
|
children: t
|
|
2053
2326
|
});
|
|
2054
|
-
}),
|
|
2327
|
+
}), Bn = C(function({ className: e, children: t }, n) {
|
|
2055
2328
|
return /* @__PURE__ */ j("div", {
|
|
2056
2329
|
ref: n,
|
|
2057
|
-
className:
|
|
2330
|
+
className: W("flex items-center justify-between p-2", e),
|
|
2058
2331
|
children: t
|
|
2059
2332
|
});
|
|
2060
|
-
}),
|
|
2333
|
+
}), Vn = C(function({ className: e, ...t }, n) {
|
|
2061
2334
|
return /* @__PURE__ */ j(B.Close, {
|
|
2062
2335
|
ref: n,
|
|
2063
|
-
className:
|
|
2336
|
+
className: W(e),
|
|
2064
2337
|
...t
|
|
2065
2338
|
});
|
|
2066
|
-
}),
|
|
2067
|
-
Root:
|
|
2068
|
-
Trigger:
|
|
2069
|
-
Content:
|
|
2070
|
-
Panel:
|
|
2071
|
-
Title:
|
|
2339
|
+
}), Hn = {
|
|
2340
|
+
Root: Mn,
|
|
2341
|
+
Trigger: Nn,
|
|
2342
|
+
Content: In,
|
|
2343
|
+
Panel: Ln,
|
|
2344
|
+
Title: Rn,
|
|
2072
2345
|
Description: B.Description,
|
|
2073
|
-
Body:
|
|
2074
|
-
Footer:
|
|
2075
|
-
Close:
|
|
2346
|
+
Body: zn,
|
|
2347
|
+
Footer: Bn,
|
|
2348
|
+
Close: Vn
|
|
2076
2349
|
}, $ = C(function({ className: e, children: t }, n) {
|
|
2077
2350
|
return /* @__PURE__ */ j("div", {
|
|
2078
2351
|
ref: n,
|
|
2079
|
-
className:
|
|
2352
|
+
className: W("overflow-hidden rounded ring-1 ring-cui-neutral", e),
|
|
2080
2353
|
children: /* @__PURE__ */ j("table", {
|
|
2081
2354
|
className: "w-full table-fixed border-separate border-spacing-0",
|
|
2082
2355
|
children: t
|
|
2083
2356
|
})
|
|
2084
2357
|
});
|
|
2085
|
-
}),
|
|
2358
|
+
}), Un = C(function({ className: e, children: t }, n) {
|
|
2086
2359
|
return /* @__PURE__ */ j("thead", {
|
|
2087
2360
|
ref: n,
|
|
2088
|
-
className:
|
|
2361
|
+
className: W("[&>tr]:text-cui-sm [&>tr]:font-medium [&>tr]:text-cui-secondary", e),
|
|
2089
2362
|
children: t
|
|
2090
2363
|
});
|
|
2091
|
-
}),
|
|
2364
|
+
}), Wn = C(function({ className: e, children: t }, n) {
|
|
2092
2365
|
return /* @__PURE__ */ j("tbody", {
|
|
2093
2366
|
ref: n,
|
|
2094
|
-
className:
|
|
2367
|
+
className: W("[&>tr:not(:last-child)>td]:border-b [&>tr:not(:last-child)>td]:border-cui-neutral", e),
|
|
2095
2368
|
children: t
|
|
2096
2369
|
});
|
|
2097
|
-
}),
|
|
2370
|
+
}), Gn = C(function({ className: e, children: t, onClick: n, ...r }, i) {
|
|
2098
2371
|
return /* @__PURE__ */ j("tr", {
|
|
2099
2372
|
ref: i,
|
|
2100
|
-
className:
|
|
2373
|
+
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
2374
|
onClick: n,
|
|
2102
2375
|
...r,
|
|
2103
2376
|
children: t
|
|
2104
2377
|
});
|
|
2105
|
-
}),
|
|
2378
|
+
}), Kn = C(function({ width: e, colSpan: t, className: n, children: r }, i) {
|
|
2106
2379
|
return /* @__PURE__ */ j("th", {
|
|
2107
2380
|
ref: i,
|
|
2108
2381
|
style: e == null ? void 0 : { width: e },
|
|
2109
2382
|
colSpan: t,
|
|
2110
|
-
className:
|
|
2383
|
+
className: W("px-4 py-2.5 text-left text-cui-sm font-medium border-b border-cui-neutral", n),
|
|
2111
2384
|
children: r
|
|
2112
2385
|
});
|
|
2113
|
-
}),
|
|
2386
|
+
}), qn = C(function({ width: e, colSpan: t, className: n, children: r }, i) {
|
|
2114
2387
|
return /* @__PURE__ */ j("td", {
|
|
2115
2388
|
ref: i,
|
|
2116
2389
|
style: e == null ? void 0 : { width: e },
|
|
2117
2390
|
colSpan: t,
|
|
2118
|
-
className:
|
|
2391
|
+
className: W("px-4 py-3 text-cui-base", n),
|
|
2119
2392
|
children: r
|
|
2120
2393
|
});
|
|
2121
2394
|
});
|
|
2122
|
-
|
|
2395
|
+
function Jn({ columns: e, rows: t = 5, className: n }) {
|
|
2396
|
+
return /* @__PURE__ */ j("tbody", {
|
|
2397
|
+
className: n,
|
|
2398
|
+
children: Array.from({ length: t }, (t, n) => /* @__PURE__ */ j("tr", {
|
|
2399
|
+
className: "bg-cui-base-1",
|
|
2400
|
+
children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ j("td", {
|
|
2401
|
+
className: "px-4 py-3",
|
|
2402
|
+
children: /* @__PURE__ */ j(Rt, { className: "h-4 w-full" })
|
|
2403
|
+
}, `skel-cell-${String(n)}-${String(t)}`))
|
|
2404
|
+
}, `skel-row-${String(n)}`))
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2407
|
+
$.Header = Un, $.Body = Wn, $.Row = Gn, $.HeaderCell = Kn, $.Cell = qn, $.Skeleton = Jn;
|
|
2123
2408
|
//#endregion
|
|
2124
2409
|
//#region src/components/pagination/pagination.tsx
|
|
2125
|
-
var
|
|
2410
|
+
var Yn = {
|
|
2126
2411
|
sm: {
|
|
2127
2412
|
button: "size-7",
|
|
2128
2413
|
icon: "size-4",
|
|
@@ -2134,77 +2419,77 @@ var jn = {
|
|
|
2134
2419
|
strip: "h-10"
|
|
2135
2420
|
}
|
|
2136
2421
|
};
|
|
2137
|
-
function
|
|
2422
|
+
function Xn(e, t) {
|
|
2138
2423
|
let n = [];
|
|
2139
2424
|
for (let r = e; r <= t; r++) n.push(r);
|
|
2140
2425
|
return n;
|
|
2141
2426
|
}
|
|
2142
|
-
function
|
|
2143
|
-
if (t <= n * 2 + 5) return
|
|
2427
|
+
function Zn(e, t, n) {
|
|
2428
|
+
if (t <= n * 2 + 5) return Xn(1, t);
|
|
2144
2429
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
2145
2430
|
return !a && o ? [
|
|
2146
|
-
...
|
|
2431
|
+
...Xn(1, n * 2 + 3),
|
|
2147
2432
|
"ellipsis-end",
|
|
2148
2433
|
t
|
|
2149
2434
|
] : a && !o ? [
|
|
2150
2435
|
1,
|
|
2151
2436
|
"ellipsis-start",
|
|
2152
|
-
...
|
|
2437
|
+
...Xn(t - (n * 2 + 3) + 1, t)
|
|
2153
2438
|
] : [
|
|
2154
2439
|
1,
|
|
2155
2440
|
"ellipsis-start",
|
|
2156
|
-
...
|
|
2441
|
+
...Xn(r, i),
|
|
2157
2442
|
"ellipsis-end",
|
|
2158
2443
|
t
|
|
2159
2444
|
];
|
|
2160
2445
|
}
|
|
2161
|
-
function
|
|
2446
|
+
function Qn({ page: e, active: t, onClick: n, buttonSize: r }) {
|
|
2162
2447
|
return /* @__PURE__ */ j("button", {
|
|
2163
2448
|
type: "button",
|
|
2164
2449
|
"aria-current": t ? "page" : void 0,
|
|
2165
2450
|
onClick: n,
|
|
2166
|
-
className:
|
|
2451
|
+
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
2452
|
children: e
|
|
2168
2453
|
});
|
|
2169
2454
|
}
|
|
2170
|
-
function
|
|
2455
|
+
function $n({ buttonSize: e }) {
|
|
2171
2456
|
return /* @__PURE__ */ j("span", {
|
|
2172
|
-
className:
|
|
2457
|
+
className: W("text-cui-tertiary flex items-center justify-center text-cui-base select-none", e),
|
|
2173
2458
|
children: "..."
|
|
2174
2459
|
});
|
|
2175
2460
|
}
|
|
2176
|
-
function
|
|
2461
|
+
function er({ direction: e, disabled: t, onClick: n, buttonSize: r, iconSize: i }) {
|
|
2177
2462
|
let a = e === "prev" ? c : l;
|
|
2178
2463
|
return /* @__PURE__ */ j("button", {
|
|
2179
2464
|
type: "button",
|
|
2180
2465
|
"aria-label": e === "prev" ? "Previous page" : "Next page",
|
|
2181
2466
|
disabled: t,
|
|
2182
2467
|
onClick: n,
|
|
2183
|
-
className:
|
|
2468
|
+
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"),
|
|
2184
2469
|
children: /* @__PURE__ */ j(a, { className: i })
|
|
2185
2470
|
});
|
|
2186
2471
|
}
|
|
2187
|
-
var
|
|
2472
|
+
var tr = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, rowsPerPage: i = 10, onRowsPerPageChange: a, rowOptions: o = [
|
|
2188
2473
|
10,
|
|
2189
2474
|
25,
|
|
2190
2475
|
50
|
|
2191
2476
|
], siblingCount: s = 1, size: c = "sm", className: l }, d) {
|
|
2192
|
-
let f =
|
|
2477
|
+
let f = Yn[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
2478
|
if (!h && !p && !m) return null;
|
|
2194
|
-
let v = h ?
|
|
2479
|
+
let v = h ? Zn(e, t, s) : [];
|
|
2195
2480
|
return /* @__PURE__ */ M("nav", {
|
|
2196
2481
|
ref: d,
|
|
2197
2482
|
"aria-label": "Pagination",
|
|
2198
|
-
className:
|
|
2483
|
+
className: W("flex items-center bg-cui-subtle rounded-md ring-1 ring-cui-neutral", l),
|
|
2199
2484
|
children: [
|
|
2200
2485
|
p && /* @__PURE__ */ M("div", {
|
|
2201
|
-
className:
|
|
2486
|
+
className: W("flex items-center gap-2 px-3", f.strip),
|
|
2202
2487
|
children: [/* @__PURE__ */ j("span", {
|
|
2203
2488
|
className: "text-cui-tertiary text-cui-base whitespace-nowrap",
|
|
2204
2489
|
children: "Rows per page"
|
|
2205
2490
|
}), /* @__PURE__ */ M(Q.Root, { children: [/* @__PURE__ */ j(Q.Trigger, { children: /* @__PURE__ */ M("button", {
|
|
2206
2491
|
type: "button",
|
|
2207
|
-
className:
|
|
2492
|
+
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"),
|
|
2208
2493
|
children: [i, /* @__PURE__ */ j(u, { className: "text-cui-tertiary size-3.5" })]
|
|
2209
2494
|
}) }), /* @__PURE__ */ j(Q.Content, {
|
|
2210
2495
|
align: "start",
|
|
@@ -2218,22 +2503,22 @@ var Ln = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, row
|
|
|
2218
2503
|
}),
|
|
2219
2504
|
p && h && /* @__PURE__ */ j("div", { className: "bg-cui-neutral w-px self-stretch" }),
|
|
2220
2505
|
h && /* @__PURE__ */ M("div", {
|
|
2221
|
-
className:
|
|
2506
|
+
className: W("flex items-center gap-0.5 px-1.5", f.strip),
|
|
2222
2507
|
children: [
|
|
2223
|
-
/* @__PURE__ */ j(
|
|
2508
|
+
/* @__PURE__ */ j(er, {
|
|
2224
2509
|
direction: "prev",
|
|
2225
2510
|
disabled: e <= 1,
|
|
2226
2511
|
onClick: () => n?.(e - 1),
|
|
2227
2512
|
buttonSize: f.button,
|
|
2228
2513
|
iconSize: f.icon
|
|
2229
2514
|
}),
|
|
2230
|
-
v.map((t) => typeof t == "number" ? /* @__PURE__ */ j(
|
|
2515
|
+
v.map((t) => typeof t == "number" ? /* @__PURE__ */ j(Qn, {
|
|
2231
2516
|
page: t,
|
|
2232
2517
|
active: t === e,
|
|
2233
2518
|
onClick: () => n?.(t),
|
|
2234
2519
|
buttonSize: f.button
|
|
2235
|
-
}, t) : /* @__PURE__ */ j(
|
|
2236
|
-
/* @__PURE__ */ j(
|
|
2520
|
+
}, t) : /* @__PURE__ */ j($n, { buttonSize: f.button }, t)),
|
|
2521
|
+
/* @__PURE__ */ j(er, {
|
|
2237
2522
|
direction: "next",
|
|
2238
2523
|
disabled: e >= t,
|
|
2239
2524
|
onClick: () => n?.(e + 1),
|
|
@@ -2244,7 +2529,7 @@ var Ln = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, row
|
|
|
2244
2529
|
}),
|
|
2245
2530
|
m && (h || p) && /* @__PURE__ */ j("div", { className: "bg-cui-neutral w-px self-stretch" }),
|
|
2246
2531
|
m && /* @__PURE__ */ j("div", {
|
|
2247
|
-
className:
|
|
2532
|
+
className: W("flex items-center px-3", f.strip),
|
|
2248
2533
|
children: /* @__PURE__ */ M("span", {
|
|
2249
2534
|
className: "text-cui-tertiary text-cui-base whitespace-nowrap tabular-nums",
|
|
2250
2535
|
children: [
|
|
@@ -2261,24 +2546,24 @@ var Ln = C(function({ page: e, pageCount: t, onPageChange: n, totalItems: r, row
|
|
|
2261
2546
|
});
|
|
2262
2547
|
//#endregion
|
|
2263
2548
|
//#region src/components/data-table/data-table.tsx
|
|
2264
|
-
function
|
|
2549
|
+
function nr({ direction: e }) {
|
|
2265
2550
|
return e === "asc" ? /* @__PURE__ */ j(d, { className: "text-cui-primary size-3.5" }) : e === "desc" ? /* @__PURE__ */ j(s, { className: "text-cui-primary size-3.5" }) : /* @__PURE__ */ j(u, { className: "text-cui-tertiary size-3.5 opacity-0 transition-opacity group-hover:opacity-100" });
|
|
2266
2551
|
}
|
|
2267
|
-
function
|
|
2552
|
+
function rr({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize: i = 10, pageSizeOptions: a = [
|
|
2268
2553
|
10,
|
|
2269
2554
|
25,
|
|
2270
2555
|
50
|
|
2271
|
-
], selectable: o = !1, rowSelection: s, onRowSelectionChange: c, onRowClick: l,
|
|
2272
|
-
let [
|
|
2273
|
-
c(typeof e == "function" ? e(
|
|
2274
|
-
} :
|
|
2556
|
+
], selectable: o = !1, rowSelection: s, onRowSelectionChange: c, onRowClick: l, loading: u = !1, loadingRows: d = 5, emptyMessage: f = "No results.", className: p, tableOptions: m }) {
|
|
2557
|
+
let [h, g] = k([]), [_, v] = k([]), [y, b] = k({}), [x, S] = k({}), C = s ?? x, w = c ? (e) => {
|
|
2558
|
+
c(typeof e == "function" ? e(C) : e);
|
|
2559
|
+
} : S, T = o ? [{
|
|
2275
2560
|
id: "_select",
|
|
2276
|
-
header: ({ table: e }) => /* @__PURE__ */ j(
|
|
2561
|
+
header: ({ table: e }) => /* @__PURE__ */ j($e, {
|
|
2277
2562
|
checked: e.getIsAllPageRowsSelected(),
|
|
2278
2563
|
indeterminate: e.getIsSomePageRowsSelected(),
|
|
2279
2564
|
onCheckedChange: (t) => e.toggleAllPageRowsSelected(t)
|
|
2280
2565
|
}),
|
|
2281
|
-
cell: ({ row: e }) => /* @__PURE__ */ j(
|
|
2566
|
+
cell: ({ row: e }) => /* @__PURE__ */ j($e, {
|
|
2282
2567
|
checked: e.getIsSelected(),
|
|
2283
2568
|
disabled: !e.getCanSelect(),
|
|
2284
2569
|
onCheckedChange: (t) => e.toggleSelected(t)
|
|
@@ -2286,74 +2571,74 @@ function zn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize
|
|
|
2286
2571
|
enableSorting: !1,
|
|
2287
2572
|
enableHiding: !1,
|
|
2288
2573
|
size: 40
|
|
2289
|
-
}, ...e] : e, { state:
|
|
2574
|
+
}, ...e] : e, { state: ee, ...E } = m ?? {}, D = fe({
|
|
2290
2575
|
data: t,
|
|
2291
|
-
columns:
|
|
2576
|
+
columns: T,
|
|
2292
2577
|
state: {
|
|
2293
|
-
sorting:
|
|
2294
|
-
columnFilters:
|
|
2295
|
-
columnVisibility:
|
|
2296
|
-
rowSelection:
|
|
2297
|
-
...
|
|
2578
|
+
sorting: h,
|
|
2579
|
+
columnFilters: _,
|
|
2580
|
+
columnVisibility: y,
|
|
2581
|
+
rowSelection: C,
|
|
2582
|
+
...ee
|
|
2298
2583
|
},
|
|
2299
|
-
onSortingChange:
|
|
2300
|
-
onColumnFiltersChange:
|
|
2301
|
-
onColumnVisibilityChange:
|
|
2302
|
-
onRowSelectionChange:
|
|
2303
|
-
getCoreRowModel:
|
|
2304
|
-
getSortedRowModel:
|
|
2305
|
-
getFilteredRowModel:
|
|
2306
|
-
...r && { getPaginationRowModel:
|
|
2584
|
+
onSortingChange: g,
|
|
2585
|
+
onColumnFiltersChange: v,
|
|
2586
|
+
onColumnVisibilityChange: b,
|
|
2587
|
+
onRowSelectionChange: w,
|
|
2588
|
+
getCoreRowModel: ce(),
|
|
2589
|
+
getSortedRowModel: de(),
|
|
2590
|
+
getFilteredRowModel: le(),
|
|
2591
|
+
...r && { getPaginationRowModel: ue() },
|
|
2307
2592
|
enableRowSelection: o,
|
|
2308
2593
|
initialState: { pagination: { pageSize: i } },
|
|
2309
|
-
...
|
|
2310
|
-
}),
|
|
2594
|
+
...E
|
|
2595
|
+
}), O = D.getPageCount(), te = D.getState().pagination.pageIndex + 1, A = D.getState().pagination.pageSize;
|
|
2311
2596
|
return /* @__PURE__ */ M("div", {
|
|
2312
|
-
className:
|
|
2313
|
-
children: [/* @__PURE__ */ M($, { children: [/* @__PURE__ */ j($.Header, { children:
|
|
2597
|
+
className: W("flex flex-col gap-3", p),
|
|
2598
|
+
children: [/* @__PURE__ */ M($, { children: [/* @__PURE__ */ j($.Header, { children: D.getHeaderGroups().map((e) => /* @__PURE__ */ j($.Row, { children: e.headers.map((e) => {
|
|
2314
2599
|
let t = n && e.column.getCanSort(), r = e.column.getIsSorted();
|
|
2315
2600
|
return /* @__PURE__ */ j($.HeaderCell, {
|
|
2316
2601
|
width: e.getSize() === 150 ? void 0 : e.getSize(),
|
|
2317
|
-
className:
|
|
2602
|
+
className: W(t && "cursor-pointer select-none group"),
|
|
2318
2603
|
children: e.isPlaceholder ? null : /* @__PURE__ */ M("button", {
|
|
2319
2604
|
type: "button",
|
|
2320
|
-
className:
|
|
2605
|
+
className: W("flex items-center gap-1", t && "cursor-pointer"),
|
|
2321
2606
|
onClick: t ? e.column.getToggleSortingHandler() : void 0,
|
|
2322
2607
|
tabIndex: t ? 0 : -1,
|
|
2323
|
-
children: [
|
|
2608
|
+
children: [se(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */ j(nr, { direction: r })]
|
|
2324
2609
|
})
|
|
2325
2610
|
}, e.id);
|
|
2326
|
-
}) }, e.id)) }), /* @__PURE__ */ j($.Body, { children:
|
|
2611
|
+
}) }, e.id)) }), /* @__PURE__ */ j($.Body, { children: u ? Array.from({ length: d }, (e, t) => /* @__PURE__ */ j($.Row, { children: D.getVisibleLeafColumns().map((e, n) => /* @__PURE__ */ j($.Cell, { children: /* @__PURE__ */ j(Rt, { className: "h-4 w-full" }) }, `skeleton-${String(t)}-${String(n)}`)) }, `skeleton-${String(t)}`)) : D.getRowModel().rows.length > 0 ? D.getRowModel().rows.map((e) => /* @__PURE__ */ j($.Row, {
|
|
2327
2612
|
onClick: l ? () => l(e) : void 0,
|
|
2328
|
-
className:
|
|
2613
|
+
className: W(e.getIsSelected() && "bg-cui-subtle"),
|
|
2329
2614
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ j($.Cell, {
|
|
2330
2615
|
width: e.column.getSize() === 150 ? void 0 : e.column.getSize(),
|
|
2331
|
-
children:
|
|
2616
|
+
children: se(e.column.columnDef.cell, e.getContext())
|
|
2332
2617
|
}, e.id))
|
|
2333
2618
|
}, e.id)) : /* @__PURE__ */ j($.Row, { children: /* @__PURE__ */ j($.Cell, {
|
|
2334
|
-
colSpan:
|
|
2619
|
+
colSpan: T.length,
|
|
2335
2620
|
className: "text-cui-tertiary py-8 text-center",
|
|
2336
|
-
children:
|
|
2337
|
-
}) }) })] }), r &&
|
|
2621
|
+
children: f
|
|
2622
|
+
}) }) })] }), r && O > 0 && /* @__PURE__ */ M("div", {
|
|
2338
2623
|
className: "flex items-center justify-between",
|
|
2339
2624
|
children: [o && /* @__PURE__ */ M("span", {
|
|
2340
2625
|
className: "text-cui-secondary text-cui-base",
|
|
2341
2626
|
children: [
|
|
2342
|
-
|
|
2627
|
+
D.getFilteredSelectedRowModel().rows.length,
|
|
2343
2628
|
" of",
|
|
2344
2629
|
" ",
|
|
2345
|
-
|
|
2630
|
+
D.getFilteredRowModel().rows.length,
|
|
2346
2631
|
" row(s) selected"
|
|
2347
2632
|
]
|
|
2348
2633
|
}), /* @__PURE__ */ j("div", {
|
|
2349
|
-
className:
|
|
2350
|
-
children: /* @__PURE__ */ j(
|
|
2351
|
-
page:
|
|
2352
|
-
pageCount:
|
|
2353
|
-
onPageChange: (e) =>
|
|
2354
|
-
totalItems:
|
|
2355
|
-
rowsPerPage:
|
|
2356
|
-
onRowsPerPageChange: (e) =>
|
|
2634
|
+
className: W(!o && "ml-auto"),
|
|
2635
|
+
children: /* @__PURE__ */ j(tr, {
|
|
2636
|
+
page: te,
|
|
2637
|
+
pageCount: O,
|
|
2638
|
+
onPageChange: (e) => D.setPageIndex(e - 1),
|
|
2639
|
+
totalItems: D.getFilteredRowModel().rows.length,
|
|
2640
|
+
rowsPerPage: A,
|
|
2641
|
+
onRowsPerPageChange: (e) => D.setPageSize(e),
|
|
2357
2642
|
rowOptions: a
|
|
2358
2643
|
})
|
|
2359
2644
|
})]
|
|
@@ -2362,19 +2647,19 @@ function zn({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize
|
|
|
2362
2647
|
}
|
|
2363
2648
|
//#endregion
|
|
2364
2649
|
//#region src/components/data-table/data-table-toolbar.tsx
|
|
2365
|
-
var
|
|
2650
|
+
var ir = C(function({ children: e, className: t }, n) {
|
|
2366
2651
|
return /* @__PURE__ */ j("div", {
|
|
2367
2652
|
ref: n,
|
|
2368
|
-
className:
|
|
2653
|
+
className: W("flex flex-wrap items-center gap-2", t),
|
|
2369
2654
|
children: e
|
|
2370
2655
|
});
|
|
2371
|
-
}),
|
|
2656
|
+
}), ar = C(function({ value: e, onChange: t, placeholder: n = "Search...", className: r }, i) {
|
|
2372
2657
|
let a = O(null), o = w(() => {
|
|
2373
2658
|
t(""), a.current?.focus();
|
|
2374
2659
|
}, [t]);
|
|
2375
2660
|
return /* @__PURE__ */ M("div", {
|
|
2376
2661
|
ref: i,
|
|
2377
|
-
className:
|
|
2662
|
+
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
2663
|
children: [
|
|
2379
2664
|
/* @__PURE__ */ j(h, { className: "text-cui-tertiary size-4 shrink-0" }),
|
|
2380
2665
|
/* @__PURE__ */ j("input", {
|
|
@@ -2396,65 +2681,65 @@ var Bn = C(function({ children: e, className: t }, n) {
|
|
|
2396
2681
|
});
|
|
2397
2682
|
//#endregion
|
|
2398
2683
|
//#region src/components/popover/popover.tsx
|
|
2399
|
-
function
|
|
2684
|
+
function or(e) {
|
|
2400
2685
|
return /* @__PURE__ */ j(V.Root, { ...e });
|
|
2401
2686
|
}
|
|
2402
|
-
var
|
|
2687
|
+
var sr = C(function({ className: e, ...t }, n) {
|
|
2403
2688
|
return /* @__PURE__ */ j(V.Trigger, {
|
|
2404
2689
|
ref: n,
|
|
2405
|
-
className:
|
|
2690
|
+
className: W("cursor-pointer outline-none", e),
|
|
2406
2691
|
...t
|
|
2407
2692
|
});
|
|
2408
2693
|
});
|
|
2409
|
-
function
|
|
2694
|
+
function cr({ side: e = "bottom", align: t = "center", sideOffset: n = 4, className: r, children: i, ...a }) {
|
|
2410
2695
|
return /* @__PURE__ */ j(V.Portal, { children: /* @__PURE__ */ j(V.Positioner, {
|
|
2411
2696
|
side: e,
|
|
2412
2697
|
align: t,
|
|
2413
2698
|
sideOffset: n,
|
|
2414
2699
|
className: "z-50 outline-none",
|
|
2415
2700
|
children: /* @__PURE__ */ j(V.Popup, {
|
|
2416
|
-
className:
|
|
2701
|
+
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
2702
|
...a,
|
|
2418
2703
|
children: i
|
|
2419
2704
|
})
|
|
2420
2705
|
}) });
|
|
2421
2706
|
}
|
|
2422
|
-
var
|
|
2423
|
-
Root:
|
|
2424
|
-
Trigger:
|
|
2425
|
-
Content:
|
|
2707
|
+
var lr = {
|
|
2708
|
+
Root: or,
|
|
2709
|
+
Trigger: sr,
|
|
2710
|
+
Content: cr,
|
|
2426
2711
|
Arrow: C(function({ className: e, ...t }, n) {
|
|
2427
2712
|
return /* @__PURE__ */ j(V.Arrow, {
|
|
2428
2713
|
ref: n,
|
|
2429
|
-
className:
|
|
2714
|
+
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
2715
|
...t
|
|
2431
2716
|
});
|
|
2432
2717
|
}),
|
|
2433
2718
|
Close: C(function({ className: e, ...t }, n) {
|
|
2434
2719
|
return /* @__PURE__ */ j(V.Close, {
|
|
2435
2720
|
ref: n,
|
|
2436
|
-
className:
|
|
2721
|
+
className: W(e),
|
|
2437
2722
|
...t
|
|
2438
2723
|
});
|
|
2439
2724
|
}),
|
|
2440
2725
|
Title: C(function({ className: e, children: t }, n) {
|
|
2441
2726
|
return /* @__PURE__ */ j("p", {
|
|
2442
2727
|
ref: n,
|
|
2443
|
-
className:
|
|
2728
|
+
className: W("text-cui-primary text-cui-base font-medium", e),
|
|
2444
2729
|
children: t
|
|
2445
2730
|
});
|
|
2446
2731
|
}),
|
|
2447
2732
|
Description: C(function({ className: e, ...t }, n) {
|
|
2448
2733
|
return /* @__PURE__ */ j(V.Description, {
|
|
2449
2734
|
ref: n,
|
|
2450
|
-
className:
|
|
2735
|
+
className: W("text-cui-secondary mt-1 text-cui-base", e),
|
|
2451
2736
|
...t
|
|
2452
2737
|
});
|
|
2453
2738
|
})
|
|
2454
2739
|
};
|
|
2455
2740
|
//#endregion
|
|
2456
2741
|
//#region src/components/data-table/data-table-faceted-filter.tsx
|
|
2457
|
-
function
|
|
2742
|
+
function ur({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
2458
2743
|
let [a, s] = k(""), c = O(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
2744
|
function m(t) {
|
|
2460
2745
|
i ? i(t) : e?.setFilterValue(t.length ? t : void 0);
|
|
@@ -2463,15 +2748,15 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2463
2748
|
let t = new Set(d);
|
|
2464
2749
|
t.has(e) ? t.delete(e) : t.add(e), m(Array.from(t));
|
|
2465
2750
|
}
|
|
2466
|
-
return /* @__PURE__ */ M(
|
|
2751
|
+
return /* @__PURE__ */ M(lr.Root, {
|
|
2467
2752
|
onOpenChange: (e) => {
|
|
2468
2753
|
e ? requestAnimationFrame(() => {
|
|
2469
2754
|
c.current?.focus({ preventScroll: !0 });
|
|
2470
2755
|
}) : s("");
|
|
2471
2756
|
},
|
|
2472
|
-
children: [/* @__PURE__ */ M(
|
|
2757
|
+
children: [/* @__PURE__ */ M(lr.Trigger, {
|
|
2473
2758
|
render: /* @__PURE__ */ j("button", { type: "button" }),
|
|
2474
|
-
className:
|
|
2759
|
+
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
2760
|
children: [
|
|
2476
2761
|
/* @__PURE__ */ j(v, { className: "text-cui-tertiary size-4 shrink-0" }),
|
|
2477
2762
|
/* @__PURE__ */ j("span", {
|
|
@@ -2480,29 +2765,29 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2480
2765
|
}),
|
|
2481
2766
|
f && /* @__PURE__ */ M(A, { children: [
|
|
2482
2767
|
/* @__PURE__ */ j("div", { className: "border-cui-neutral mx-0.5 h-4 w-px border-l" }),
|
|
2483
|
-
/* @__PURE__ */ j(
|
|
2768
|
+
/* @__PURE__ */ j(Cn, {
|
|
2484
2769
|
className: "rounded-sm px-1 font-medium lg:hidden",
|
|
2485
2770
|
children: d.size
|
|
2486
2771
|
}),
|
|
2487
2772
|
/* @__PURE__ */ j("span", {
|
|
2488
2773
|
className: "hidden items-center gap-1 lg:flex",
|
|
2489
|
-
children: d.size > 2 ? /* @__PURE__ */ M(
|
|
2774
|
+
children: d.size > 2 ? /* @__PURE__ */ M(Cn, {
|
|
2490
2775
|
className: "rounded-sm px-1 font-medium",
|
|
2491
2776
|
children: [d.size, " selected"]
|
|
2492
|
-
}) : n.filter((e) => d.has(e.value)).map((e) => /* @__PURE__ */ j(
|
|
2777
|
+
}) : n.filter((e) => d.has(e.value)).map((e) => /* @__PURE__ */ j(Cn, {
|
|
2493
2778
|
className: "rounded-sm px-1 font-medium",
|
|
2494
2779
|
children: e.label
|
|
2495
2780
|
}, e.value))
|
|
2496
2781
|
})
|
|
2497
2782
|
] })
|
|
2498
2783
|
]
|
|
2499
|
-
}), /* @__PURE__ */ M(
|
|
2784
|
+
}), /* @__PURE__ */ M(lr.Content, {
|
|
2500
2785
|
side: "bottom",
|
|
2501
2786
|
align: "start",
|
|
2502
2787
|
sideOffset: 4,
|
|
2503
2788
|
className: "w-[220px] p-1",
|
|
2504
2789
|
children: [
|
|
2505
|
-
/* @__PURE__ */ j(
|
|
2790
|
+
/* @__PURE__ */ j(q.SearchInput, {
|
|
2506
2791
|
className: "mx-0 mt-0",
|
|
2507
2792
|
children: /* @__PURE__ */ j("input", {
|
|
2508
2793
|
ref: c,
|
|
@@ -2512,12 +2797,12 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2512
2797
|
className: "text-cui-primary placeholder:text-cui-tertiary text-cui-base flex-1 bg-transparent outline-none"
|
|
2513
2798
|
})
|
|
2514
2799
|
}),
|
|
2515
|
-
/* @__PURE__ */ M(
|
|
2800
|
+
/* @__PURE__ */ M(q.List, { children: [p.length === 0 && /* @__PURE__ */ j(q.Empty, { children: "No results found." }), p.map((e) => {
|
|
2516
2801
|
let t = d.has(e.value);
|
|
2517
|
-
return /* @__PURE__ */ M(
|
|
2802
|
+
return /* @__PURE__ */ M(q.Item, {
|
|
2518
2803
|
onClick: () => h(e.value),
|
|
2519
2804
|
icon: /* @__PURE__ */ j("div", {
|
|
2520
|
-
className:
|
|
2805
|
+
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"),
|
|
2521
2806
|
children: /* @__PURE__ */ j(o, { className: "size-3" })
|
|
2522
2807
|
}),
|
|
2523
2808
|
indicator: l?.get(e.value) == null ? void 0 : /* @__PURE__ */ j("span", {
|
|
@@ -2533,7 +2818,7 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2533
2818
|
})]
|
|
2534
2819
|
}, e.value);
|
|
2535
2820
|
})] }),
|
|
2536
|
-
f && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(
|
|
2821
|
+
f && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(q.Separator, {}), /* @__PURE__ */ j(q.Item, {
|
|
2537
2822
|
onClick: () => m([]),
|
|
2538
2823
|
className: "justify-center",
|
|
2539
2824
|
children: /* @__PURE__ */ j("span", {
|
|
@@ -2547,7 +2832,7 @@ function Kn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
|
|
|
2547
2832
|
}
|
|
2548
2833
|
//#endregion
|
|
2549
2834
|
//#region src/components/segmented-group/segmented-group.tsx
|
|
2550
|
-
var
|
|
2835
|
+
var dr = C(function({ activeIndex: e, itemCount: t, layout: n = "fill", className: r, children: i }, a) {
|
|
2551
2836
|
let o = n === "fill", s = O(null), [c, l] = k(null), u = O(!1), d = w(() => {
|
|
2552
2837
|
if (n !== "fit") return;
|
|
2553
2838
|
let t = s.current;
|
|
@@ -2579,50 +2864,50 @@ var qn = C(function({ activeIndex: e, itemCount: t, layout: n = "fill", classNam
|
|
|
2579
2864
|
ref: (e) => {
|
|
2580
2865
|
s.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
2581
2866
|
},
|
|
2582
|
-
className:
|
|
2867
|
+
className: W("relative bg-cui-base-0 rounded-md ring-1 ring-cui-neutral", o ? "grid" : "inline-flex", r),
|
|
2583
2868
|
style: o ? { gridTemplateColumns: `repeat(${t}, 1fr)` } : void 0,
|
|
2584
2869
|
children: [/* @__PURE__ */ j("div", {
|
|
2585
2870
|
"aria-hidden": !0,
|
|
2586
|
-
className:
|
|
2871
|
+
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
2872
|
style: f,
|
|
2588
2873
|
children: /* @__PURE__ */ j("div", { className: "bg-cui-base-2 h-full rounded-sm shadow-sm" })
|
|
2589
2874
|
}), i]
|
|
2590
2875
|
});
|
|
2591
|
-
}),
|
|
2876
|
+
}), fr = C(function({ active: e = !1, className: t, children: n, ...r }, i) {
|
|
2592
2877
|
return /* @__PURE__ */ j("button", {
|
|
2593
2878
|
ref: i,
|
|
2594
2879
|
type: "button",
|
|
2595
2880
|
"data-segmented-item": "",
|
|
2596
|
-
className:
|
|
2881
|
+
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
2882
|
...r,
|
|
2598
2883
|
children: n
|
|
2599
2884
|
});
|
|
2600
|
-
}),
|
|
2885
|
+
}), pr = {
|
|
2601
2886
|
sm: "h-7 px-2.5",
|
|
2602
2887
|
md: "h-8 px-3"
|
|
2603
|
-
},
|
|
2888
|
+
}, mr = C(function({ options: e, value: t, defaultValue: n, onValueChange: r, layout: i = "fill", size: a = "sm", className: o }, s) {
|
|
2604
2889
|
let [c, l] = k(() => n ?? e[0]?.value ?? ""), u = t !== void 0, d = u ? t : c, f = e.findIndex((e) => e.value === d);
|
|
2605
2890
|
function p(e) {
|
|
2606
2891
|
u || l(e), r?.(e);
|
|
2607
2892
|
}
|
|
2608
|
-
return /* @__PURE__ */ j(
|
|
2893
|
+
return /* @__PURE__ */ j(dr, {
|
|
2609
2894
|
ref: s,
|
|
2610
2895
|
activeIndex: f,
|
|
2611
2896
|
itemCount: e.length,
|
|
2612
2897
|
layout: i,
|
|
2613
2898
|
className: o,
|
|
2614
|
-
children: e.map((e) => /* @__PURE__ */ M(
|
|
2899
|
+
children: e.map((e) => /* @__PURE__ */ M(fr, {
|
|
2615
2900
|
active: e.value === d,
|
|
2616
2901
|
"aria-pressed": e.value === d,
|
|
2617
2902
|
onClick: () => p(e.value),
|
|
2618
|
-
className:
|
|
2903
|
+
className: pr[a],
|
|
2619
2904
|
children: [e.icon && /* @__PURE__ */ j("span", {
|
|
2620
2905
|
className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2621
2906
|
children: e.icon
|
|
2622
2907
|
}), e.label && /* @__PURE__ */ j("span", { children: e.label })]
|
|
2623
2908
|
}, e.value))
|
|
2624
2909
|
});
|
|
2625
|
-
}),
|
|
2910
|
+
}), hr = [
|
|
2626
2911
|
{
|
|
2627
2912
|
value: "light",
|
|
2628
2913
|
icon: /* @__PURE__ */ j(y, {})
|
|
@@ -2636,10 +2921,10 @@ var qn = C(function({ activeIndex: e, itemCount: t, layout: n = "fill", classNam
|
|
|
2636
2921
|
icon: /* @__PURE__ */ j(f, {})
|
|
2637
2922
|
}
|
|
2638
2923
|
];
|
|
2639
|
-
function
|
|
2924
|
+
function gr({ user: e, theme: t = "system", onThemeChange: n, items: i, onLogout: a, children: o, side: s = "bottom", align: c = "end", className: l }) {
|
|
2640
2925
|
return /* @__PURE__ */ M(Q.Root, { children: [/* @__PURE__ */ j(Q.Trigger, {
|
|
2641
2926
|
className: l,
|
|
2642
|
-
children: o ?? /* @__PURE__ */ j(
|
|
2927
|
+
children: o ?? /* @__PURE__ */ j(vt, {
|
|
2643
2928
|
initials: e.initials,
|
|
2644
2929
|
src: e.avatarUrl,
|
|
2645
2930
|
size: "sm",
|
|
@@ -2653,7 +2938,7 @@ function Qn({ user: e, theme: t = "system", onThemeChange: n, items: i, onLogout
|
|
|
2653
2938
|
children: [
|
|
2654
2939
|
/* @__PURE__ */ M("div", {
|
|
2655
2940
|
className: "flex items-center gap-2 px-2 py-1.5",
|
|
2656
|
-
children: [/* @__PURE__ */ j(
|
|
2941
|
+
children: [/* @__PURE__ */ j(vt, {
|
|
2657
2942
|
initials: e.initials,
|
|
2658
2943
|
src: e.avatarUrl,
|
|
2659
2944
|
size: "md"
|
|
@@ -2674,8 +2959,8 @@ function Qn({ user: e, theme: t = "system", onThemeChange: n, items: i, onLogout
|
|
|
2674
2959
|
children: [/* @__PURE__ */ j("span", {
|
|
2675
2960
|
className: "text-cui-primary text-cui-base",
|
|
2676
2961
|
children: "Theme"
|
|
2677
|
-
}), /* @__PURE__ */ j(
|
|
2678
|
-
options:
|
|
2962
|
+
}), /* @__PURE__ */ j(mr, {
|
|
2963
|
+
options: hr,
|
|
2679
2964
|
value: t,
|
|
2680
2965
|
onValueChange: n
|
|
2681
2966
|
})]
|
|
@@ -2695,7 +2980,7 @@ function Qn({ user: e, theme: t = "system", onThemeChange: n, items: i, onLogout
|
|
|
2695
2980
|
}
|
|
2696
2981
|
//#endregion
|
|
2697
2982
|
//#region src/components/alert/alert.tsx
|
|
2698
|
-
var
|
|
2983
|
+
var _r = {
|
|
2699
2984
|
accent: {
|
|
2700
2985
|
container: "bg-cui-accent-subtle",
|
|
2701
2986
|
icon: "text-cui-accent",
|
|
@@ -2724,23 +3009,23 @@ var $n = {
|
|
|
2724
3009
|
pattern: "text-cui-danger",
|
|
2725
3010
|
defaultIcon: b
|
|
2726
3011
|
}
|
|
2727
|
-
},
|
|
3012
|
+
}, vr = {
|
|
2728
3013
|
maskImage: "linear-gradient(to left, black, transparent)",
|
|
2729
3014
|
WebkitMaskImage: "linear-gradient(to left, black, transparent)"
|
|
2730
|
-
},
|
|
2731
|
-
let c =
|
|
3015
|
+
}, yr = C(function({ variant: e = "accent", layout: t = "inline", icon: n, action: r, onDismiss: i, className: a, children: o }, s) {
|
|
3016
|
+
let c = _r[e], l = c.defaultIcon;
|
|
2732
3017
|
return t === "banner" ? /* @__PURE__ */ M("div", {
|
|
2733
3018
|
ref: s,
|
|
2734
3019
|
role: "alert",
|
|
2735
|
-
className:
|
|
3020
|
+
className: W("relative flex w-full items-center justify-center overflow-hidden px-4 py-3", c.container, a),
|
|
2736
3021
|
children: [
|
|
2737
3022
|
/* @__PURE__ */ j("div", {
|
|
2738
|
-
className:
|
|
3023
|
+
className: W("pointer-events-none absolute inset-0", c.pattern),
|
|
2739
3024
|
style: {
|
|
2740
3025
|
maskImage: "linear-gradient(to right, transparent, black 30%, black 70%, transparent)",
|
|
2741
3026
|
WebkitMaskImage: "linear-gradient(to right, transparent, black 30%, black 70%, transparent)"
|
|
2742
3027
|
},
|
|
2743
|
-
children: /* @__PURE__ */ j(
|
|
3028
|
+
children: /* @__PURE__ */ j(Lt, {
|
|
2744
3029
|
squareSize: 4,
|
|
2745
3030
|
gridGap: 2,
|
|
2746
3031
|
flickerChance: .4,
|
|
@@ -2751,11 +3036,11 @@ var $n = {
|
|
|
2751
3036
|
className: "relative flex items-center gap-3",
|
|
2752
3037
|
children: [
|
|
2753
3038
|
/* @__PURE__ */ j("span", {
|
|
2754
|
-
className:
|
|
3039
|
+
className: W("flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", c.icon),
|
|
2755
3040
|
children: n ?? /* @__PURE__ */ j(l, {})
|
|
2756
3041
|
}),
|
|
2757
3042
|
/* @__PURE__ */ j("span", {
|
|
2758
|
-
className:
|
|
3043
|
+
className: W("text-cui-base font-medium", c.text),
|
|
2759
3044
|
children: o
|
|
2760
3045
|
}),
|
|
2761
3046
|
r && /* @__PURE__ */ j("div", {
|
|
@@ -2766,7 +3051,7 @@ var $n = {
|
|
|
2766
3051
|
}),
|
|
2767
3052
|
i && /* @__PURE__ */ j("div", {
|
|
2768
3053
|
className: "absolute right-2",
|
|
2769
|
-
children: /* @__PURE__ */ j(
|
|
3054
|
+
children: /* @__PURE__ */ j(K, {
|
|
2770
3055
|
variant: "transparent",
|
|
2771
3056
|
size: "xs",
|
|
2772
3057
|
iconLeft: /* @__PURE__ */ j(x, {}),
|
|
@@ -2778,12 +3063,12 @@ var $n = {
|
|
|
2778
3063
|
}) : /* @__PURE__ */ M("div", {
|
|
2779
3064
|
ref: s,
|
|
2780
3065
|
role: "alert",
|
|
2781
|
-
className:
|
|
3066
|
+
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
3067
|
children: [
|
|
2783
3068
|
/* @__PURE__ */ j("div", {
|
|
2784
|
-
className:
|
|
2785
|
-
style:
|
|
2786
|
-
children: /* @__PURE__ */ j(
|
|
3069
|
+
className: W("pointer-events-none absolute top-0 right-0 h-full w-1/2", c.pattern),
|
|
3070
|
+
style: vr,
|
|
3071
|
+
children: /* @__PURE__ */ j(Lt, {
|
|
2787
3072
|
squareSize: 4,
|
|
2788
3073
|
gridGap: 2,
|
|
2789
3074
|
flickerChance: .4,
|
|
@@ -2791,11 +3076,11 @@ var $n = {
|
|
|
2791
3076
|
})
|
|
2792
3077
|
}),
|
|
2793
3078
|
/* @__PURE__ */ j("span", {
|
|
2794
|
-
className:
|
|
3079
|
+
className: W("relative flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", c.icon),
|
|
2795
3080
|
children: n ?? /* @__PURE__ */ j(l, {})
|
|
2796
3081
|
}),
|
|
2797
3082
|
/* @__PURE__ */ j("span", {
|
|
2798
|
-
className:
|
|
3083
|
+
className: W("relative flex-1 text-cui-base font-medium", c.text),
|
|
2799
3084
|
children: o
|
|
2800
3085
|
}),
|
|
2801
3086
|
r && /* @__PURE__ */ j("div", {
|
|
@@ -2804,7 +3089,7 @@ var $n = {
|
|
|
2804
3089
|
}),
|
|
2805
3090
|
i && /* @__PURE__ */ j("div", {
|
|
2806
3091
|
className: "relative ml-auto shrink-0",
|
|
2807
|
-
children: /* @__PURE__ */ j(
|
|
3092
|
+
children: /* @__PURE__ */ j(K, {
|
|
2808
3093
|
variant: "transparent",
|
|
2809
3094
|
size: "xs",
|
|
2810
3095
|
iconLeft: /* @__PURE__ */ j(x, {}),
|
|
@@ -2817,90 +3102,90 @@ var $n = {
|
|
|
2817
3102
|
});
|
|
2818
3103
|
//#endregion
|
|
2819
3104
|
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
2820
|
-
function
|
|
3105
|
+
function br(e) {
|
|
2821
3106
|
return /* @__PURE__ */ j(H.Root, { ...e });
|
|
2822
3107
|
}
|
|
2823
|
-
var
|
|
3108
|
+
var xr = C(function({ className: e, ...t }, n) {
|
|
2824
3109
|
return /* @__PURE__ */ j(H.Trigger, {
|
|
2825
3110
|
ref: n,
|
|
2826
|
-
className:
|
|
3111
|
+
className: W(e),
|
|
2827
3112
|
...t
|
|
2828
3113
|
});
|
|
2829
|
-
}),
|
|
3114
|
+
}), Sr = C(function({ className: e, ...t }, n) {
|
|
2830
3115
|
return /* @__PURE__ */ j(H.Backdrop, {
|
|
2831
3116
|
ref: n,
|
|
2832
|
-
className:
|
|
3117
|
+
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
3118
|
...t
|
|
2834
3119
|
});
|
|
2835
3120
|
});
|
|
2836
|
-
function
|
|
2837
|
-
return /* @__PURE__ */ M(H.Portal, { children: [/* @__PURE__ */ j(
|
|
2838
|
-
className:
|
|
3121
|
+
function Cr({ className: e, children: t, ...n }) {
|
|
3122
|
+
return /* @__PURE__ */ M(H.Portal, { children: [/* @__PURE__ */ j(Sr, {}), /* @__PURE__ */ j(H.Popup, {
|
|
3123
|
+
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
3124
|
...n,
|
|
2840
3125
|
children: t
|
|
2841
3126
|
})] });
|
|
2842
3127
|
}
|
|
2843
|
-
var
|
|
2844
|
-
Root:
|
|
2845
|
-
Trigger:
|
|
2846
|
-
Content:
|
|
3128
|
+
var wr = {
|
|
3129
|
+
Root: br,
|
|
3130
|
+
Trigger: xr,
|
|
3131
|
+
Content: Cr,
|
|
2847
3132
|
Panel: C(function({ className: e, children: t }, n) {
|
|
2848
3133
|
return /* @__PURE__ */ j("div", {
|
|
2849
3134
|
ref: n,
|
|
2850
|
-
className:
|
|
3135
|
+
className: W("bg-cui-base-2 border-cui-neutral rounded-md border", e),
|
|
2851
3136
|
children: t
|
|
2852
3137
|
});
|
|
2853
3138
|
}),
|
|
2854
3139
|
Title: C(function({ className: e, ...t }, n) {
|
|
2855
3140
|
return /* @__PURE__ */ j(H.Title, {
|
|
2856
3141
|
ref: n,
|
|
2857
|
-
className:
|
|
3142
|
+
className: W("text-cui-primary border-cui-neutral border-b px-4 py-3 text-cui-base font-medium", e),
|
|
2858
3143
|
...t
|
|
2859
3144
|
});
|
|
2860
3145
|
}),
|
|
2861
3146
|
Description: C(function({ className: e, ...t }, n) {
|
|
2862
3147
|
return /* @__PURE__ */ j(H.Description, {
|
|
2863
3148
|
ref: n,
|
|
2864
|
-
className:
|
|
3149
|
+
className: W("text-cui-secondary p-4 text-cui-base", e),
|
|
2865
3150
|
...t
|
|
2866
3151
|
});
|
|
2867
3152
|
}),
|
|
2868
3153
|
Actions: C(function({ className: e, children: t }, n) {
|
|
2869
3154
|
return /* @__PURE__ */ j("div", {
|
|
2870
3155
|
ref: n,
|
|
2871
|
-
className:
|
|
3156
|
+
className: W("flex items-center justify-end gap-2 p-2", e),
|
|
2872
3157
|
children: t
|
|
2873
3158
|
});
|
|
2874
3159
|
}),
|
|
2875
3160
|
Close: C(function({ className: e, ...t }, n) {
|
|
2876
3161
|
return /* @__PURE__ */ j(H.Close, {
|
|
2877
3162
|
ref: n,
|
|
2878
|
-
className:
|
|
3163
|
+
className: W(e),
|
|
2879
3164
|
...t
|
|
2880
3165
|
});
|
|
2881
3166
|
})
|
|
2882
|
-
},
|
|
3167
|
+
}, Tr = {
|
|
2883
3168
|
Root: C(function({ className: e, ...t }, n) {
|
|
2884
|
-
return /* @__PURE__ */ j(
|
|
3169
|
+
return /* @__PURE__ */ j(pe.Root, {
|
|
2885
3170
|
ref: n,
|
|
2886
|
-
className:
|
|
3171
|
+
className: W("flex flex-col", e),
|
|
2887
3172
|
...t
|
|
2888
3173
|
});
|
|
2889
3174
|
}),
|
|
2890
3175
|
Item: C(function({ className: e, ...t }, n) {
|
|
2891
|
-
return /* @__PURE__ */ j(
|
|
3176
|
+
return /* @__PURE__ */ j(pe.Item, {
|
|
2892
3177
|
ref: n,
|
|
2893
|
-
className:
|
|
3178
|
+
className: W("border-cui-neutral border-b last:border-b-0", e),
|
|
2894
3179
|
...t
|
|
2895
3180
|
});
|
|
2896
3181
|
}),
|
|
2897
3182
|
Trigger: C(function({ icon: e, className: t, children: n, ...r }, i) {
|
|
2898
|
-
return /* @__PURE__ */ M(
|
|
3183
|
+
return /* @__PURE__ */ M(pe.Trigger, {
|
|
2899
3184
|
ref: i,
|
|
2900
|
-
className:
|
|
3185
|
+
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
3186
|
...r,
|
|
2902
3187
|
children: [
|
|
2903
|
-
/* @__PURE__ */ j(l, { className:
|
|
3188
|
+
/* @__PURE__ */ j(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") }),
|
|
2904
3189
|
e && /* @__PURE__ */ j("span", {
|
|
2905
3190
|
className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
|
|
2906
3191
|
children: e
|
|
@@ -2913,9 +3198,9 @@ var or = {
|
|
|
2913
3198
|
});
|
|
2914
3199
|
}),
|
|
2915
3200
|
Content: C(function({ className: e, children: t, ...n }, r) {
|
|
2916
|
-
return /* @__PURE__ */ j(
|
|
3201
|
+
return /* @__PURE__ */ j(pe.Panel, {
|
|
2917
3202
|
ref: r,
|
|
2918
|
-
className:
|
|
3203
|
+
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
3204
|
...n,
|
|
2920
3205
|
children: /* @__PURE__ */ j("div", {
|
|
2921
3206
|
className: "text-cui-secondary text-cui-base pb-3",
|
|
@@ -2923,13 +3208,13 @@ var or = {
|
|
|
2923
3208
|
})
|
|
2924
3209
|
});
|
|
2925
3210
|
})
|
|
2926
|
-
},
|
|
2927
|
-
return /* @__PURE__ */ j(
|
|
3211
|
+
}, Er = C(function({ className: e, ...t }, n) {
|
|
3212
|
+
return /* @__PURE__ */ j(me.Root, {
|
|
2928
3213
|
ref: n,
|
|
2929
|
-
className:
|
|
3214
|
+
className: W("flex flex-col", e),
|
|
2930
3215
|
...t
|
|
2931
3216
|
});
|
|
2932
|
-
}),
|
|
3217
|
+
}), Dr = C(function({ className: e, layout: t = "fit", children: n, ...r }, i) {
|
|
2933
3218
|
let a = O(null), [o, s] = k(0), [c, l] = k(0), u = w(() => {
|
|
2934
3219
|
let e = a.current;
|
|
2935
3220
|
if (!e) return;
|
|
@@ -2954,7 +3239,7 @@ var or = {
|
|
|
2954
3239
|
return n.observe(e), () => {
|
|
2955
3240
|
t.disconnect(), n.disconnect();
|
|
2956
3241
|
};
|
|
2957
|
-
}, [u]), /* @__PURE__ */ j(
|
|
3242
|
+
}, [u]), /* @__PURE__ */ j(dr, {
|
|
2958
3243
|
ref: (e) => {
|
|
2959
3244
|
a.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
2960
3245
|
},
|
|
@@ -2962,177 +3247,76 @@ var or = {
|
|
|
2962
3247
|
itemCount: o,
|
|
2963
3248
|
layout: t,
|
|
2964
3249
|
className: typeof e == "string" ? e : void 0,
|
|
2965
|
-
children: /* @__PURE__ */ j(
|
|
3250
|
+
children: /* @__PURE__ */ j(me.List, {
|
|
2966
3251
|
className: "contents",
|
|
2967
3252
|
...r,
|
|
2968
3253
|
children: n
|
|
2969
3254
|
})
|
|
2970
3255
|
});
|
|
2971
|
-
}),
|
|
3256
|
+
}), Or = {
|
|
2972
3257
|
sm: "h-7 px-2.5",
|
|
2973
3258
|
md: "h-8 px-3"
|
|
2974
|
-
},
|
|
2975
|
-
Root:
|
|
2976
|
-
List:
|
|
3259
|
+
}, kr = {
|
|
3260
|
+
Root: Er,
|
|
3261
|
+
List: Dr,
|
|
2977
3262
|
Tab: C(function({ size: e = "sm", className: t, children: n, ...r }, i) {
|
|
2978
|
-
return /* @__PURE__ */ j(
|
|
3263
|
+
return /* @__PURE__ */ j(me.Tab, {
|
|
2979
3264
|
ref: i,
|
|
2980
3265
|
"data-segmented-item": "",
|
|
2981
|
-
className:
|
|
3266
|
+
className: W("relative z-10 flex items-center justify-center gap-1.5 rounded-sm", Or[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
3267
|
...r,
|
|
2983
3268
|
children: n
|
|
2984
3269
|
});
|
|
2985
3270
|
}),
|
|
2986
3271
|
Panel: C(function({ className: e, ...t }, n) {
|
|
2987
|
-
return /* @__PURE__ */ j(
|
|
2988
|
-
ref: n,
|
|
2989
|
-
className: G("rounded-sm pt-3 outline-none", "focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", e),
|
|
2990
|
-
...t
|
|
2991
|
-
});
|
|
2992
|
-
})
|
|
2993
|
-
}, fr = {
|
|
2994
|
-
right: "right",
|
|
2995
|
-
left: "left",
|
|
2996
|
-
bottom: "down",
|
|
2997
|
-
top: "up"
|
|
2998
|
-
}, pr = {
|
|
2999
|
-
right: "inset-y-0 right-0 w-[min(420px,90vw)] p-2",
|
|
3000
|
-
left: "inset-y-0 left-0 w-[min(420px,90vw)] p-2",
|
|
3001
|
-
bottom: "inset-x-0 bottom-0 max-h-[85vh] p-2",
|
|
3002
|
-
top: "inset-x-0 top-0 max-h-[85vh] p-2"
|
|
3003
|
-
};
|
|
3004
|
-
function mr({ side: e = "right", responsive: t, children: n, ...r }) {
|
|
3005
|
-
return /* @__PURE__ */ j(U.Root, {
|
|
3006
|
-
swipeDirection: fr[e],
|
|
3007
|
-
...r,
|
|
3008
|
-
children: n
|
|
3009
|
-
});
|
|
3010
|
-
}
|
|
3011
|
-
var hr = C(function({ className: e, ...t }, n) {
|
|
3012
|
-
return /* @__PURE__ */ j(U.Trigger, {
|
|
3013
|
-
ref: n,
|
|
3014
|
-
className: G(e),
|
|
3015
|
-
...t
|
|
3016
|
-
});
|
|
3017
|
-
}), gr = C(function({ className: e, ...t }, n) {
|
|
3018
|
-
return /* @__PURE__ */ j(U.Backdrop, {
|
|
3019
|
-
ref: n,
|
|
3020
|
-
className: G("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
|
-
...t
|
|
3022
|
-
});
|
|
3023
|
-
});
|
|
3024
|
-
function _r({ side: e = "right", responsive: t = !0, className: n, children: r, ...i }) {
|
|
3025
|
-
return /* @__PURE__ */ M(U.Portal, { children: [/* @__PURE__ */ j(gr, {}), /* @__PURE__ */ j(U.Popup, {
|
|
3026
|
-
className: G("group/drawer fixed z-50 flex outline-none", pr[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
|
-
"max-md:inset-x-0 max-md:inset-y-auto max-md:bottom-0 max-md:right-auto max-md:left-auto",
|
|
3028
|
-
"max-md:w-full max-md:max-h-[85vh]",
|
|
3029
|
-
"max-md:data-[starting-style]:translate-x-0 max-md:data-[starting-style]:translate-y-[20%]",
|
|
3030
|
-
"max-md:data-[ending-style]:translate-x-0 max-md:data-[ending-style]:translate-y-[20%]"
|
|
3031
|
-
]),
|
|
3032
|
-
...i,
|
|
3033
|
-
children: /* @__PURE__ */ j("div", {
|
|
3034
|
-
className: G("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),
|
|
3035
|
-
children: /* @__PURE__ */ j("div", {
|
|
3036
|
-
className: "bg-cui-base-2 border-cui-neutral flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border",
|
|
3037
|
-
children: r
|
|
3038
|
-
})
|
|
3039
|
-
})
|
|
3040
|
-
})] });
|
|
3041
|
-
}
|
|
3042
|
-
var vr = {
|
|
3043
|
-
Root: mr,
|
|
3044
|
-
Trigger: hr,
|
|
3045
|
-
Content: _r,
|
|
3046
|
-
Header: C(function({ className: e, children: t }, n) {
|
|
3047
|
-
return /* @__PURE__ */ j("div", {
|
|
3048
|
-
ref: n,
|
|
3049
|
-
className: G("border-cui-neutral flex items-center justify-between border-b px-4 py-3", e),
|
|
3050
|
-
children: t
|
|
3051
|
-
});
|
|
3052
|
-
}),
|
|
3053
|
-
Title: C(function({ className: e, ...t }, n) {
|
|
3054
|
-
return /* @__PURE__ */ j(U.Title, {
|
|
3055
|
-
ref: n,
|
|
3056
|
-
className: G("text-cui-primary text-cui-base font-medium", e),
|
|
3057
|
-
...t
|
|
3058
|
-
});
|
|
3059
|
-
}),
|
|
3060
|
-
Description: C(function({ className: e, ...t }, n) {
|
|
3061
|
-
return /* @__PURE__ */ j(U.Description, {
|
|
3272
|
+
return /* @__PURE__ */ j(me.Panel, {
|
|
3062
3273
|
ref: n,
|
|
3063
|
-
className:
|
|
3274
|
+
className: W("rounded-sm pt-3 outline-none", "focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", e),
|
|
3064
3275
|
...t
|
|
3065
3276
|
});
|
|
3066
|
-
}),
|
|
3067
|
-
Body: C(function({ className: e, children: t }, n) {
|
|
3068
|
-
return /* @__PURE__ */ j("div", {
|
|
3069
|
-
ref: n,
|
|
3070
|
-
className: G("flex-1 overflow-y-auto p-4", e),
|
|
3071
|
-
children: t
|
|
3072
|
-
});
|
|
3073
|
-
}),
|
|
3074
|
-
Footer: C(function({ className: e, children: t }, n) {
|
|
3075
|
-
return /* @__PURE__ */ j("div", {
|
|
3076
|
-
ref: n,
|
|
3077
|
-
className: G("border-cui-neutral flex items-center justify-end gap-2 border-t p-3", e),
|
|
3078
|
-
children: t
|
|
3079
|
-
});
|
|
3080
|
-
}),
|
|
3081
|
-
Close: C(function({ asIcon: e, className: t, children: n, ...r }, i) {
|
|
3082
|
-
return e ?? !n ? /* @__PURE__ */ j(U.Close, {
|
|
3083
|
-
ref: i,
|
|
3084
|
-
className: G("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
|
-
...r,
|
|
3086
|
-
children: /* @__PURE__ */ j(x, { className: "size-4" })
|
|
3087
|
-
}) : /* @__PURE__ */ j(U.Close, {
|
|
3088
|
-
ref: i,
|
|
3089
|
-
className: G(t),
|
|
3090
|
-
...r,
|
|
3091
|
-
children: n
|
|
3092
|
-
});
|
|
3093
3277
|
})
|
|
3094
|
-
},
|
|
3095
|
-
return /* @__PURE__ */ j(
|
|
3278
|
+
}, Ar = C(function({ className: e, ...t }, n) {
|
|
3279
|
+
return /* @__PURE__ */ j(U, {
|
|
3096
3280
|
ref: n,
|
|
3097
|
-
className:
|
|
3281
|
+
className: W("bg-cui-base-2 flex h-full w-full flex-col overflow-hidden rounded-lg", e),
|
|
3098
3282
|
...t
|
|
3099
3283
|
});
|
|
3100
|
-
}),
|
|
3101
|
-
return /* @__PURE__ */ j(
|
|
3284
|
+
}), jr = C(function({ className: e, ...t }, n) {
|
|
3285
|
+
return /* @__PURE__ */ j(q.SearchInput, {
|
|
3102
3286
|
className: "mb-0 bg-transparent px-2",
|
|
3103
|
-
children: /* @__PURE__ */ j(
|
|
3287
|
+
children: /* @__PURE__ */ j(U.Input, {
|
|
3104
3288
|
ref: n,
|
|
3105
|
-
className:
|
|
3289
|
+
className: W("text-cui-primary placeholder:text-cui-tertiary flex-1 bg-transparent py-1.5 text-cui-base outline-none", e),
|
|
3106
3290
|
...t
|
|
3107
3291
|
})
|
|
3108
3292
|
});
|
|
3109
|
-
}),
|
|
3110
|
-
return /* @__PURE__ */ j(
|
|
3293
|
+
}), Mr = C(function({ className: e, ...t }, n) {
|
|
3294
|
+
return /* @__PURE__ */ j(U.List, {
|
|
3111
3295
|
ref: n,
|
|
3112
|
-
className:
|
|
3296
|
+
className: W("max-h-[300px] overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
|
|
3113
3297
|
...t
|
|
3114
3298
|
});
|
|
3115
|
-
}),
|
|
3116
|
-
return /* @__PURE__ */ j(
|
|
3299
|
+
}), Nr = C(function({ className: e, ...t }, n) {
|
|
3300
|
+
return /* @__PURE__ */ j(U.Empty, {
|
|
3117
3301
|
ref: n,
|
|
3118
|
-
className:
|
|
3302
|
+
className: W("text-cui-secondary px-2 py-4 text-center text-cui-base", e),
|
|
3119
3303
|
...t
|
|
3120
3304
|
});
|
|
3121
|
-
}),
|
|
3122
|
-
return /* @__PURE__ */ j(
|
|
3305
|
+
}), Pr = C(function({ className: e, ...t }, n) {
|
|
3306
|
+
return /* @__PURE__ */ j(U.Group, {
|
|
3123
3307
|
ref: n,
|
|
3124
|
-
className:
|
|
3308
|
+
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
3309
|
...t
|
|
3126
3310
|
});
|
|
3127
|
-
}),
|
|
3128
|
-
return /* @__PURE__ */ M(
|
|
3311
|
+
}), Fr = C(function({ icon: e, shortcut: t, className: n, children: r, ...i }, a) {
|
|
3312
|
+
return /* @__PURE__ */ M(U.Item, {
|
|
3129
3313
|
ref: a,
|
|
3130
|
-
className:
|
|
3314
|
+
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
3315
|
...i,
|
|
3132
3316
|
children: [
|
|
3133
|
-
/* @__PURE__ */ j("div", { className:
|
|
3317
|
+
/* @__PURE__ */ j("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") }),
|
|
3134
3318
|
e && /* @__PURE__ */ j("span", {
|
|
3135
|
-
className:
|
|
3319
|
+
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
3320
|
children: e
|
|
3137
3321
|
}),
|
|
3138
3322
|
/* @__PURE__ */ j("span", {
|
|
@@ -3145,33 +3329,33 @@ var vr = {
|
|
|
3145
3329
|
})
|
|
3146
3330
|
]
|
|
3147
3331
|
});
|
|
3148
|
-
}),
|
|
3149
|
-
return /* @__PURE__ */ j(
|
|
3332
|
+
}), Ir = C(function({ className: e, ...t }, n) {
|
|
3333
|
+
return /* @__PURE__ */ j(U.Separator, {
|
|
3150
3334
|
ref: n,
|
|
3151
|
-
className:
|
|
3335
|
+
className: W("border-cui-neutral mx-2 my-1 border-t", e),
|
|
3152
3336
|
...t
|
|
3153
3337
|
});
|
|
3154
3338
|
});
|
|
3155
|
-
function
|
|
3339
|
+
function Lr({ open: e, onOpenChange: t, children: n, className: r }) {
|
|
3156
3340
|
return /* @__PURE__ */ j(B.Root, {
|
|
3157
3341
|
open: e,
|
|
3158
3342
|
onOpenChange: t,
|
|
3159
|
-
children: /* @__PURE__ */ M(B.Portal, { children: [/* @__PURE__ */ j(B.Backdrop, { className:
|
|
3160
|
-
className:
|
|
3343
|
+
children: /* @__PURE__ */ M(B.Portal, { children: [/* @__PURE__ */ j(B.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__ */ j(B.Popup, {
|
|
3344
|
+
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
3345
|
children: n
|
|
3162
3346
|
})] })
|
|
3163
3347
|
});
|
|
3164
3348
|
}
|
|
3165
|
-
var
|
|
3166
|
-
Root:
|
|
3167
|
-
Input:
|
|
3168
|
-
List:
|
|
3169
|
-
Empty:
|
|
3170
|
-
Group:
|
|
3171
|
-
Item:
|
|
3172
|
-
Separator:
|
|
3173
|
-
Dialog:
|
|
3174
|
-
},
|
|
3349
|
+
var Rr = {
|
|
3350
|
+
Root: Ar,
|
|
3351
|
+
Input: jr,
|
|
3352
|
+
List: Mr,
|
|
3353
|
+
Empty: Nr,
|
|
3354
|
+
Group: Pr,
|
|
3355
|
+
Item: Fr,
|
|
3356
|
+
Separator: Ir,
|
|
3357
|
+
Dialog: Lr
|
|
3358
|
+
}, zr = {
|
|
3175
3359
|
xs: {
|
|
3176
3360
|
height: "h-6",
|
|
3177
3361
|
padding: "px-1.5",
|
|
@@ -3190,15 +3374,15 @@ var Dr = {
|
|
|
3190
3374
|
textPadding: "px-1",
|
|
3191
3375
|
icon: "w-8"
|
|
3192
3376
|
}
|
|
3193
|
-
},
|
|
3194
|
-
let c =
|
|
3195
|
-
return /* @__PURE__ */ M(
|
|
3377
|
+
}, Br = C(function({ size: e = "md", iconLeft: t, iconRight: n, disabled: r, className: i, children: a, ...o }, s) {
|
|
3378
|
+
let c = zr[e];
|
|
3379
|
+
return /* @__PURE__ */ M(he, {
|
|
3196
3380
|
ref: s,
|
|
3197
3381
|
disabled: r,
|
|
3198
|
-
className:
|
|
3382
|
+
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
3383
|
...o,
|
|
3200
3384
|
children: [
|
|
3201
|
-
/* @__PURE__ */ j("div", { className:
|
|
3385
|
+
/* @__PURE__ */ j("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
3386
|
"transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none",
|
|
3203
3387
|
"group-hover/toggle-btn:bg-cui-subtle",
|
|
3204
3388
|
"group-active/toggle-btn:inset-px"
|
|
@@ -3208,7 +3392,7 @@ var Dr = {
|
|
|
3208
3392
|
children: t
|
|
3209
3393
|
}),
|
|
3210
3394
|
a && /* @__PURE__ */ j("span", {
|
|
3211
|
-
className:
|
|
3395
|
+
className: W("relative z-[1] inline", c.textPadding),
|
|
3212
3396
|
children: a
|
|
3213
3397
|
}),
|
|
3214
3398
|
n && /* @__PURE__ */ j("span", {
|
|
@@ -3217,26 +3401,26 @@ var Dr = {
|
|
|
3217
3401
|
})
|
|
3218
3402
|
]
|
|
3219
3403
|
});
|
|
3220
|
-
}),
|
|
3404
|
+
}), Vr = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
3221
3405
|
return /* @__PURE__ */ j("div", {
|
|
3222
3406
|
ref: r,
|
|
3223
3407
|
role: "group",
|
|
3224
|
-
className:
|
|
3408
|
+
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
3409
|
...n
|
|
3226
3410
|
});
|
|
3227
|
-
}),
|
|
3228
|
-
return /* @__PURE__ */ j(
|
|
3411
|
+
}), Hr = C(function({ orientation: e = "horizontal", className: t, ...n }, r) {
|
|
3412
|
+
return /* @__PURE__ */ j(ge, {
|
|
3229
3413
|
ref: r,
|
|
3230
|
-
className:
|
|
3414
|
+
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
3415
|
...n
|
|
3232
3416
|
});
|
|
3233
|
-
}),
|
|
3234
|
-
return /* @__PURE__ */ j(
|
|
3235
|
-
ref:
|
|
3236
|
-
className:
|
|
3237
|
-
...
|
|
3417
|
+
}), Ur = C(function({ orientation: e = "vertical", className: t, ...n }, r) {
|
|
3418
|
+
return /* @__PURE__ */ j(_e, {
|
|
3419
|
+
ref: r,
|
|
3420
|
+
className: W("flex gap-2", e === "horizontal" ? "flex-row items-center" : "flex-col", t),
|
|
3421
|
+
...n
|
|
3238
3422
|
});
|
|
3239
|
-
}),
|
|
3423
|
+
}), Wr = {
|
|
3240
3424
|
sm: {
|
|
3241
3425
|
radio: "size-4",
|
|
3242
3426
|
indicator: "size-1.5",
|
|
@@ -3247,42 +3431,71 @@ var Dr = {
|
|
|
3247
3431
|
indicator: "size-2",
|
|
3248
3432
|
label: "text-cui-base"
|
|
3249
3433
|
}
|
|
3250
|
-
},
|
|
3251
|
-
Root
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
className:
|
|
3262
|
-
children:
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3434
|
+
}, Gr = C(function({ size: e = "md", label: t, className: n, value: r, ...i }, a) {
|
|
3435
|
+
let o = Wr[e], s = /* @__PURE__ */ j(ve.Root, {
|
|
3436
|
+
ref: a,
|
|
3437
|
+
value: r,
|
|
3438
|
+
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),
|
|
3439
|
+
...i,
|
|
3440
|
+
children: /* @__PURE__ */ j(ve.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) })
|
|
3441
|
+
});
|
|
3442
|
+
return t ? /* @__PURE__ */ M("label", {
|
|
3443
|
+
className: W("inline-flex items-center gap-2 select-none", "cursor-pointer data-[disabled]:cursor-not-allowed", n),
|
|
3444
|
+
children: [s, /* @__PURE__ */ j("span", {
|
|
3445
|
+
className: W("text-cui-primary", o.label),
|
|
3446
|
+
children: t
|
|
3447
|
+
})]
|
|
3448
|
+
}) : s;
|
|
3449
|
+
});
|
|
3450
|
+
function Kr({ value: e, title: t, description: n, icon: r, disabled: i, className: a }) {
|
|
3451
|
+
return /* @__PURE__ */ M("label", {
|
|
3452
|
+
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),
|
|
3453
|
+
children: [
|
|
3454
|
+
r && /* @__PURE__ */ j("span", {
|
|
3455
|
+
className: "text-cui-secondary flex size-5 shrink-0 items-center justify-center [&>svg]:size-5",
|
|
3456
|
+
children: r
|
|
3457
|
+
}),
|
|
3458
|
+
/* @__PURE__ */ M("div", {
|
|
3459
|
+
className: "flex flex-1 flex-col gap-0.5",
|
|
3460
|
+
children: [/* @__PURE__ */ j("span", {
|
|
3461
|
+
className: "text-cui-primary text-cui-base font-medium",
|
|
3462
|
+
children: t
|
|
3463
|
+
}), n && /* @__PURE__ */ j("span", {
|
|
3464
|
+
className: "text-cui-secondary text-cui-sm",
|
|
3465
|
+
children: n
|
|
3466
|
+
})]
|
|
3467
|
+
}),
|
|
3468
|
+
/* @__PURE__ */ j(ve.Root, {
|
|
3469
|
+
value: e,
|
|
3470
|
+
disabled: i,
|
|
3471
|
+
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"),
|
|
3472
|
+
children: /* @__PURE__ */ j(ve.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") })
|
|
3473
|
+
})
|
|
3474
|
+
]
|
|
3475
|
+
});
|
|
3476
|
+
}
|
|
3477
|
+
var qr = {
|
|
3478
|
+
Root: Ur,
|
|
3479
|
+
Item: Gr,
|
|
3480
|
+
Card: Kr
|
|
3481
|
+
}, Jr = 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) {
|
|
3269
3482
|
return /* @__PURE__ */ j("div", {
|
|
3270
3483
|
ref: u,
|
|
3271
3484
|
"aria-live": "polite",
|
|
3272
|
-
className:
|
|
3485
|
+
className: W("pointer-events-none fixed inset-x-0 bottom-0 z-50 flex justify-center pb-6", l),
|
|
3273
3486
|
children: /* @__PURE__ */ M("div", {
|
|
3274
|
-
className:
|
|
3487
|
+
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"),
|
|
3275
3488
|
children: [/* @__PURE__ */ j("span", {
|
|
3276
3489
|
className: "text-cui-primary text-cui-base font-medium",
|
|
3277
3490
|
children: t
|
|
3278
3491
|
}), /* @__PURE__ */ M("div", {
|
|
3279
3492
|
className: "flex items-center gap-1.5",
|
|
3280
|
-
children: [/* @__PURE__ */ j(
|
|
3493
|
+
children: [/* @__PURE__ */ j(K, {
|
|
3281
3494
|
variant: "danger-light",
|
|
3282
3495
|
size: "sm",
|
|
3283
3496
|
onClick: i,
|
|
3284
3497
|
children: n
|
|
3285
|
-
}), /* @__PURE__ */ j(
|
|
3498
|
+
}), /* @__PURE__ */ j(K, {
|
|
3286
3499
|
variant: "primary",
|
|
3287
3500
|
size: "sm",
|
|
3288
3501
|
onClick: a,
|
|
@@ -3293,15 +3506,15 @@ var Dr = {
|
|
|
3293
3506
|
})]
|
|
3294
3507
|
})
|
|
3295
3508
|
});
|
|
3296
|
-
}),
|
|
3509
|
+
}), Yr = {
|
|
3297
3510
|
narrow: "max-w-[800px]",
|
|
3298
3511
|
wide: "max-w-[1100px]"
|
|
3299
|
-
},
|
|
3512
|
+
}, Xr = C(function({ title: e, maxWidth: t = "narrow", leading: n, children: r, className: i }, a) {
|
|
3300
3513
|
return /* @__PURE__ */ j("div", {
|
|
3301
3514
|
ref: a,
|
|
3302
3515
|
className: "flex flex-1 flex-col items-center gap-6 py-6",
|
|
3303
3516
|
children: /* @__PURE__ */ M("div", {
|
|
3304
|
-
className:
|
|
3517
|
+
className: W("flex w-full flex-col gap-6 px-8", Yr[t], i),
|
|
3305
3518
|
children: [
|
|
3306
3519
|
n,
|
|
3307
3520
|
e && /* @__PURE__ */ j("span", {
|
|
@@ -3315,7 +3528,7 @@ var Dr = {
|
|
|
3315
3528
|
});
|
|
3316
3529
|
//#endregion
|
|
3317
3530
|
//#region src/lib/use-dirty-state.ts
|
|
3318
|
-
function
|
|
3531
|
+
function Zr(e) {
|
|
3319
3532
|
let [t, n] = k(e), [r, i] = k(e);
|
|
3320
3533
|
return {
|
|
3321
3534
|
draft: r,
|
|
@@ -3337,4 +3550,4 @@ function Rr(e) {
|
|
|
3337
3550
|
};
|
|
3338
3551
|
}
|
|
3339
3552
|
//#endregion
|
|
3340
|
-
export {
|
|
3553
|
+
export { Tr as Accordion, yr as Alert, wr as AlertDialog, Ct as AppHeader, vt as Avatar, Cn as Badge, Ye as Breadcrumb, K as Button, Vr as ButtonGroup, J as Card, $e as Checkbox, Ie as Combobox, Re as ComboboxButton, ze as ComboboxContent, Ve as ComboboxGroup, He as ComboboxGroupLabel, Be as ComboboxOption, Ue as ComboboxSeparator, Le as ComboboxTrigger, Rr as Command, rr as DataTable, ur as DataTableFacetedFilter, ar as DataTableSearch, ir as DataTableToolbar, Hn as Dialog, Ft as Drawer, Q as DropdownMenu, Lt as FlickeringGrid, On as Form, G as Hover, Se as HoverGroup, ct as Logo, st as NavLink, ot as NavLinks, Ot as PageLayout, tr as Pagination, je as PixelSpinner, lr as Popover, qr as RadioGroup, Jr as SaveBar, mr as SegmentedControl, fn as Select, mn as SelectButton, hn as SelectContent, vn as SelectGroup, yn as SelectGroupLabel, gn as SelectOption, _n as SelectSeparator, pn as SelectTrigger, bn as Separator, wt as SettingsCard, Xr as SettingsPage, Tt as SettingsRow, dn as Sidebar, Rt as Skeleton, Ne as Spinner, $ as Table, kr as Tabs, Ze as Toggle, Br as ToggleButton, Hr as ToggleButtonGroup, X as Tooltip, gr as UserMenu, W as cn, Wt as createTooltipHandle, Zr as useDirtyState, Z as useSidebar };
|