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