@exegia/corpora-ui 0.16.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/components/blocks/nav/sidebar-block.d.ts +1 -1
- package/dist-lib/components/blocks/scaffold/__tests__/scaffold.test.d.ts +1 -0
- package/dist-lib/components/blocks/scaffold/constants.d.ts +20 -0
- package/dist-lib/components/blocks/scaffold/index.d.ts +25 -0
- package/dist-lib/components/blocks/scaffold/panel-close-button.d.ts +4 -0
- package/dist-lib/components/blocks/scaffold/panel-menu-button.d.ts +7 -0
- package/dist-lib/components/blocks/scaffold/scaffold-actions.d.ts +9 -0
- package/dist-lib/components/blocks/scaffold/scaffold-canvas.d.ts +7 -0
- package/dist-lib/components/blocks/scaffold/scaffold-context.d.ts +5 -0
- package/dist-lib/components/blocks/scaffold/scaffold-inspector.d.ts +9 -0
- package/dist-lib/components/blocks/scaffold/scaffold-main.d.ts +8 -0
- package/dist-lib/components/blocks/scaffold/scaffold-panel.d.ts +10 -0
- package/dist-lib/components/blocks/scaffold/scaffold-root.d.ts +8 -0
- package/dist-lib/components/blocks/scaffold/scaffold-sidebar.d.ts +7 -0
- package/dist-lib/components/blocks/scaffold/scaffold-sub-panel.d.ts +3 -0
- package/dist-lib/components/blocks/scaffold/type.d.ts +133 -0
- package/dist-lib/components/blocks/scaffold/use-scaffold.d.ts +8 -0
- package/dist-lib/components/blocks/scaffold/utils.d.ts +15 -0
- package/dist-lib/components/blocks/shell/animated-panel-inset.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-panel-provider.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-panel-trigger.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-panel.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-content.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-footer.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-group-content.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-group-label.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-group.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-header.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-menu-button.d.ts +3 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-menu-item.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-menu-sub-button.d.ts +3 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-menu-sub-item.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-menu-sub.d.ts +2 -0
- package/dist-lib/components/blocks/shell/animated-sidebar-menu.d.ts +2 -0
- package/dist-lib/components/blocks/shell/index.d.ts +16 -0
- package/dist-lib/components/blocks/shell/shell-layout.d.ts +1 -1
- package/dist-lib/components/blocks/shell/type.d.ts +91 -4
- package/dist-lib/components/blocks/shell/utils.d.ts +37 -0
- package/dist-lib/components/motion/index.d.ts +1 -0
- package/dist-lib/components/motion/overflow-actions.d.ts +35 -0
- package/dist-lib/components/ui/button-group.d.ts +11 -0
- package/dist-lib/components/ui/glasscn/glass-button-group.d.ts +5 -0
- package/dist-lib/components/ui/glasscn/glass-container.d.ts +7 -0
- package/dist-lib/components/ui/glasscn/glass-separator.d.ts +5 -0
- package/dist-lib/components/ui/group.d.ts +17 -0
- package/dist-lib/components/ui/separator.d.ts +2 -3
- package/dist-lib/components/ui/sheet.d.ts +14 -0
- package/dist-lib/components/ui/tooltip.d.ts +6 -0
- package/dist-lib/index.d.ts +2 -1
- package/dist-lib/index.js +1432 -932
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/ease.d.ts +3 -0
- package/dist-lib/lib/hooks/use-hover-capable.d.ts +6 -0
- package/package.json +2 -1
- package/src/components/beste/piece/browser-frame.tsx +2 -2
- package/src/components/blocks/nav/sidebar-block.tsx +5 -5
- package/src/components/blocks/nav/sidebar-nav-row.tsx +4 -5
- package/src/components/blocks/scaffold/__tests__/scaffold.test.tsx +203 -0
- package/src/components/blocks/scaffold/constants.ts +28 -0
- package/src/components/blocks/scaffold/index.ts +38 -0
- package/src/components/blocks/scaffold/panel-close-button.tsx +36 -0
- package/src/components/blocks/scaffold/panel-menu-button.tsx +240 -0
- package/src/components/blocks/scaffold/scaffold-actions.tsx +97 -0
- package/src/components/blocks/scaffold/scaffold-canvas.tsx +29 -0
- package/src/components/blocks/scaffold/scaffold-context.ts +18 -0
- package/src/components/blocks/scaffold/scaffold-inspector.tsx +57 -0
- package/src/components/blocks/scaffold/scaffold-main.tsx +28 -0
- package/src/components/blocks/scaffold/scaffold-panel.tsx +98 -0
- package/src/components/blocks/scaffold/scaffold-root.tsx +68 -0
- package/src/components/blocks/scaffold/scaffold-sidebar.tsx +31 -0
- package/src/components/blocks/scaffold/scaffold-sub-panel.tsx +51 -0
- package/src/components/blocks/scaffold/type.ts +171 -0
- package/src/components/blocks/scaffold/use-scaffold.ts +48 -0
- package/src/components/blocks/scaffold/utils.ts +30 -0
- package/src/components/blocks/shell/__tests__/shell-layout.test.tsx +3 -3
- package/src/components/blocks/shell/animated-panel-inset.tsx +23 -0
- package/src/components/blocks/shell/animated-panel-provider.tsx +155 -0
- package/src/components/blocks/shell/animated-panel-trigger.tsx +42 -0
- package/src/components/blocks/shell/animated-panel.tsx +135 -0
- package/src/components/blocks/shell/animated-sidebar-content.tsx +19 -0
- package/src/components/blocks/shell/animated-sidebar-footer.tsx +19 -0
- package/src/components/blocks/shell/animated-sidebar-group-content.tsx +16 -0
- package/src/components/blocks/shell/animated-sidebar-group-label.tsx +29 -0
- package/src/components/blocks/shell/animated-sidebar-group.tsx +16 -0
- package/src/components/blocks/shell/animated-sidebar-header.tsx +16 -0
- package/src/components/blocks/shell/animated-sidebar-menu-button.tsx +151 -0
- package/src/components/blocks/shell/animated-sidebar-menu-item.tsx +20 -0
- package/src/components/blocks/shell/animated-sidebar-menu-sub-button.tsx +85 -0
- package/src/components/blocks/shell/animated-sidebar-menu-sub-item.tsx +19 -0
- package/src/components/blocks/shell/animated-sidebar-menu-sub.tsx +44 -0
- package/src/components/blocks/shell/animated-sidebar-menu.tsx +26 -0
- package/src/components/blocks/shell/index.ts +18 -0
- package/src/components/blocks/shell/shell-layout.tsx +44 -64
- package/src/components/blocks/shell/type.ts +113 -6
- package/src/components/blocks/shell/use-shell-panels.ts +1 -1
- package/src/components/blocks/shell/utils.ts +142 -1
- package/src/components/docs/demo-controls.tsx +1 -1
- package/src/components/motion/index.ts +0 -0
- package/src/components/motion/overflow-actions.tsx +376 -0
- package/src/components/ui/button-group.tsx +88 -0
- package/src/components/ui/button.tsx +3 -3
- package/src/components/ui/glasscn/glass-button-group.tsx +48 -0
- package/src/components/ui/glasscn/glass-container.tsx +125 -0
- package/src/components/ui/glasscn/glass-separator.tsx +39 -0
- package/src/components/ui/glasscn/liquid-glass.tsx +250 -210
- package/src/components/ui/group.tsx +92 -0
- package/src/components/ui/separator.tsx +11 -11
- package/src/components/ui/sheet.tsx +135 -0
- package/src/components/ui/tooltip.tsx +66 -0
- package/src/index.css +1 -1
- package/src/index.ts +13 -1
- package/src/lib/ease.ts +26 -0
- package/src/lib/hooks/use-hover-capable.ts +23 -0
- package/dist-lib/components/motion/animated-sidebar.d.ts +0 -109
- package/src/components/motion/animated-sidebar.tsx +0 -1196
package/dist-lib/index.js
CHANGED
|
@@ -5,41 +5,43 @@ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
|
5
5
|
import { mergeProps as o } from "@base-ui/react/merge-props";
|
|
6
6
|
import { useRender as s } from "@base-ui/react/use-render";
|
|
7
7
|
import { cva as c } from "class-variance-authority";
|
|
8
|
-
import { ArrowLeftIcon as l, Bookmark as u, CheckIcon as d, ChevronRight as f, ChevronRightIcon as p, ChevronsUpDownIcon as m, EyeIcon as h, EyeOffIcon as g, FileText as _, FingerprintIcon as v, Folder as y, FolderOpen as b, KeyRoundIcon as x, Loader2Icon as S, LogOutIcon as C,
|
|
9
|
-
import * as
|
|
10
|
-
import { Children as
|
|
11
|
-
import { Checkbox as
|
|
12
|
-
import { bind as
|
|
13
|
-
import { Field as
|
|
14
|
-
import { Input as
|
|
15
|
-
import { Menu as
|
|
16
|
-
import { OTPField as
|
|
17
|
-
import { Separator as
|
|
18
|
-
import { AnimatePresence as
|
|
19
|
-
import { RiAppleFill as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
8
|
+
import { ArrowLeftIcon as l, Bookmark as u, CheckIcon as d, ChevronRight as f, ChevronRightIcon as p, ChevronsUpDownIcon as m, EyeIcon as h, EyeOffIcon as g, FileText as _, FingerprintIcon as v, Folder as y, FolderOpen as b, KeyRoundIcon as x, Loader2Icon as S, LogOutIcon as C, LucideArrowUpDown as w, LucideChevronDown as T, LucidePlus as E, MailIcon as D, MoreHorizontal as O, PanelLeftIcon as k, Pencil as A, SettingsIcon as j, SmartphoneIcon as M, UserIcon as N, UserPlusIcon as ee, UsersIcon as te, XIcon as ne } from "lucide-react";
|
|
9
|
+
import * as P from "react";
|
|
10
|
+
import { Children as F, cloneElement as I, createContext as L, createElement as re, forwardRef as R, isValidElement as ie, useCallback as z, useContext as ae, useEffect as oe, useId as se, useLayoutEffect as ce, useMemo as le, useRef as B, useState as V, useSyncExternalStore as ue } from "react";
|
|
11
|
+
import { Checkbox as de } from "@base-ui/react/checkbox";
|
|
12
|
+
import { bind as fe, play as pe, play as me, setEnabled as he, setVolume as ge, sounds as _e } from "cuelume";
|
|
13
|
+
import { Field as ve, Field as ye } from "@base-ui/react/field";
|
|
14
|
+
import { Input as be } from "@base-ui/react/input";
|
|
15
|
+
import { Menu as H } from "@base-ui/react/menu";
|
|
16
|
+
import { OTPField as xe } from "@base-ui/react/otp-field";
|
|
17
|
+
import { Separator as Se } from "@base-ui/react/separator";
|
|
18
|
+
import { AnimatePresence as U, MotionConfig as Ce, motion as W, useReducedMotion as G } from "motion/react";
|
|
19
|
+
import { RiAppleFill as we, RiCloseLine as Te, RiGithubFill as Ee, RiGoogleFill as De, RiTwitterXFill as Oe } from "@remixicon/react";
|
|
20
|
+
import { MotionIcon as ke } from "motion-icons-react";
|
|
21
|
+
import { createPortal as Ae } from "react-dom";
|
|
22
|
+
import { More as je } from "iconsax-reactjs";
|
|
23
|
+
import { motion as Me, useReducedMotion as Ne } from "framer-motion";
|
|
22
24
|
//#region src/lib/utils.ts
|
|
23
25
|
function K(...e) {
|
|
24
26
|
return n(t(e));
|
|
25
27
|
}
|
|
26
28
|
//#endregion
|
|
27
29
|
//#region src/components/ui/avatar.tsx
|
|
28
|
-
function
|
|
30
|
+
function Pe({ className: t, ...n }) {
|
|
29
31
|
return /* @__PURE__ */ i(e.Root, {
|
|
30
32
|
className: K("inline-flex size-8 shrink-0 select-none items-center justify-center overflow-hidden rounded-full bg-background align-middle font-medium text-xs", t),
|
|
31
33
|
"data-slot": "avatar",
|
|
32
34
|
...n
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function Fe({ className: t, ...n }) {
|
|
36
38
|
return /* @__PURE__ */ i(e.Image, {
|
|
37
39
|
className: K("size-full object-cover", t),
|
|
38
40
|
"data-slot": "avatar-image",
|
|
39
41
|
...n
|
|
40
42
|
});
|
|
41
43
|
}
|
|
42
|
-
function
|
|
44
|
+
function Ie({ className: t, ...n }) {
|
|
43
45
|
return /* @__PURE__ */ i(e.Fallback, {
|
|
44
46
|
className: K("flex size-full items-center justify-center rounded-full bg-muted", t),
|
|
45
47
|
"data-slot": "avatar-fallback",
|
|
@@ -48,7 +50,7 @@ function ke({ className: t, ...n }) {
|
|
|
48
50
|
}
|
|
49
51
|
//#endregion
|
|
50
52
|
//#region src/components/ui/spinner.tsx
|
|
51
|
-
function
|
|
53
|
+
function Le({ className: e, ...t }) {
|
|
52
54
|
return /* @__PURE__ */ i(S, {
|
|
53
55
|
"aria-label": "Loading",
|
|
54
56
|
className: K("animate-spin", e),
|
|
@@ -58,16 +60,16 @@ function Ae({ className: e, ...t }) {
|
|
|
58
60
|
}
|
|
59
61
|
//#endregion
|
|
60
62
|
//#region src/components/ui/glasscn/liquid-glass.tsx
|
|
61
|
-
var
|
|
62
|
-
function
|
|
63
|
+
var Re = 480, ze = 1.25, Be = /* @__PURE__ */ new Map();
|
|
64
|
+
function Ve() {
|
|
63
65
|
if (typeof navigator > "u") return !1;
|
|
64
66
|
let e = navigator.userAgent;
|
|
65
67
|
return (/Chrom(e|ium)/.test(e) || /Edg\//.test(e)) && !/Firefox/.test(e);
|
|
66
68
|
}
|
|
67
|
-
function
|
|
68
|
-
let i = `${e}:${t}:${n}:${r}`, a =
|
|
69
|
+
function He({ width: e, height: t, radius: n, bezel: r }) {
|
|
70
|
+
let i = `${e}:${t}:${n}:${r}`, a = Be.get(i);
|
|
69
71
|
if (a !== void 0) return a;
|
|
70
|
-
let o = Math.min(1,
|
|
72
|
+
let o = Math.min(1, Re / Math.max(e, t)), s = Math.max(2, Math.round(e * o)), c = Math.max(2, Math.round(t * o)), l = document.createElement("canvas");
|
|
71
73
|
l.width = s, l.height = c;
|
|
72
74
|
let u = l.getContext("2d");
|
|
73
75
|
if (!u) return "";
|
|
@@ -83,23 +85,21 @@ function Fe({ width: e, height: t, radius: n, bezel: r }) {
|
|
|
83
85
|
f[v] = 128, f[v + 1] = 128, f[v + 2] = 128, f[v + 3] = 255;
|
|
84
86
|
continue;
|
|
85
87
|
}
|
|
86
|
-
let b = 1 -
|
|
87
|
-
b *= Math.min(1, y /
|
|
88
|
+
let b = 1 - Ue(Math.min(1, y / g));
|
|
89
|
+
b *= Math.min(1, y / ze), f[v] = Math.round(128 + d * b * 127), f[v + 1] = Math.round(128 + _ * b * 127), f[v + 2] = 128, f[v + 3] = 255;
|
|
88
90
|
}
|
|
89
91
|
u.putImageData(d, 0, 0);
|
|
90
92
|
let _ = l.toDataURL("image/png");
|
|
91
|
-
return
|
|
93
|
+
return Be.set(i, _), _;
|
|
92
94
|
}
|
|
93
|
-
function
|
|
95
|
+
function Ue(e) {
|
|
94
96
|
return (1 - (1 - e) ** 4) ** .25;
|
|
95
97
|
}
|
|
96
|
-
var
|
|
97
|
-
let p =
|
|
98
|
-
console.log(n);
|
|
99
|
-
let h = V(null), g = R((e) => {
|
|
98
|
+
var We = R(function({ blur: e = 2, refraction: t = 15, mapSize: n, bezel: o = .34, saturation: s = 1.28, className: c, style: l, children: u, ...d }, f) {
|
|
99
|
+
let p = se(), m = le(() => `liquid-glass-${p.replace(/:/g, "")}`, [p]), h = B(null), g = z((e) => {
|
|
100
100
|
h.current = e, typeof f == "function" ? f(e) : f && (f.current = e);
|
|
101
|
-
}, [f]), [_, v] =
|
|
102
|
-
|
|
101
|
+
}, [f]), [_, v] = V(null);
|
|
102
|
+
oe(() => {
|
|
103
103
|
let e = h.current;
|
|
104
104
|
if (!e) return;
|
|
105
105
|
let t = () => {
|
|
@@ -117,9 +117,9 @@ var Le = I(function({ blur: e = 2, refraction: t = 15, mapSize: n, bezel: o = .3
|
|
|
117
117
|
let n = new ResizeObserver(t);
|
|
118
118
|
return n.observe(e), () => n.disconnect();
|
|
119
119
|
}, [o]);
|
|
120
|
-
let y =
|
|
121
|
-
|
|
122
|
-
x(
|
|
120
|
+
let y = le(() => _ ? He(_) : "", [_]), [b, x] = V(!1);
|
|
121
|
+
oe(() => {
|
|
122
|
+
x(Ve());
|
|
123
123
|
}, []);
|
|
124
124
|
let S = b && y !== "", C = S ? `url(#${m}) blur(${e}px) saturate(${s})` : `blur(${e + 2}px) saturate(${s})`;
|
|
125
125
|
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
@@ -177,7 +177,7 @@ var Le = I(function({ blur: e = 2, refraction: t = 15, mapSize: n, bezel: o = .3
|
|
|
177
177
|
]
|
|
178
178
|
})
|
|
179
179
|
})] });
|
|
180
|
-
}),
|
|
180
|
+
}), Ge = {
|
|
181
181
|
clear: [
|
|
182
182
|
"backdrop-blur-[2px] backdrop-saturate-[1.9]",
|
|
183
183
|
"bg-white/[0.25] dark:bg-black/[0.25]",
|
|
@@ -211,7 +211,7 @@ var Le = I(function({ blur: e = 2, refraction: t = 15, mapSize: n, bezel: o = .3
|
|
|
211
211
|
"[will-change:background-position]"
|
|
212
212
|
].join(" "),
|
|
213
213
|
"liquid-refract": ""
|
|
214
|
-
},
|
|
214
|
+
}, Ke = c("relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base outline-none transition-[scale,box-shadow,width,height,background-color,border-color] [transition-duration:150ms,150ms,300ms,300ms,150ms,150ms] ease-smooth-out active:scale-97 data-pressed:scale-97 motion-reduce:transition-none motion-reduce:active:scale-100 motion-reduce:data-pressed:scale-100 [&_svg]:transition-transform [&_svg]:duration-150 [&_svg]:ease-smooth-out motion-reduce:[&_svg]:transition-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 data-loading:select-none sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", {
|
|
215
215
|
compoundVariants: [{
|
|
216
216
|
class: "h-auto border-0 px-0 align-middle sm:h-auto",
|
|
217
217
|
size: [
|
|
@@ -231,9 +231,9 @@ var Le = I(function({ blur: e = 2, refraction: t = 15, mapSize: n, bezel: o = .3
|
|
|
231
231
|
size: {
|
|
232
232
|
default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
|
|
233
233
|
icon: "size-9 sm:size-8",
|
|
234
|
-
"icon-lg": "size-
|
|
235
|
-
"icon-sm": "size-
|
|
236
|
-
"icon-xl": "size-
|
|
234
|
+
"icon-lg": "size-8 sm:size-8",
|
|
235
|
+
"icon-sm": "size-7 sm:size-6",
|
|
236
|
+
"icon-xl": "size-10 sm:size-9 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
237
237
|
"icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
|
|
238
238
|
lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
|
|
239
239
|
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7",
|
|
@@ -261,18 +261,18 @@ function q({ className: e, variant: t, size: n, render: c, children: l, loading:
|
|
|
261
261
|
"aria-hidden": !u || void 0,
|
|
262
262
|
"data-slot": "button-loading-indicator",
|
|
263
263
|
className: K("pointer-events-none inline-flex shrink-0 items-center overflow-hidden transition-[max-width,margin-inline-start,opacity,filter] duration-300 ease-smooth-out motion-reduce:transition-none", u ? "max-w-6" : K("max-w-0 opacity-0 blur-[2px]", n === "xs" ? "-ms-1" : n === "sm" ? "-ms-1.5" : "-ms-2")),
|
|
264
|
-
children: /* @__PURE__ */ i(
|
|
264
|
+
children: /* @__PURE__ */ i(Le, { className: u ? void 0 : "animate-none" })
|
|
265
265
|
}),
|
|
266
266
|
l,
|
|
267
|
-
u && y && /* @__PURE__ */ i(
|
|
267
|
+
u && y && /* @__PURE__ */ i(Le, {
|
|
268
268
|
className: "pointer-events-none absolute",
|
|
269
269
|
"data-slot": "button-loading-indicator"
|
|
270
270
|
})
|
|
271
271
|
] }),
|
|
272
|
-
className: K(
|
|
272
|
+
className: K(Ke({
|
|
273
273
|
size: n,
|
|
274
274
|
variant: t
|
|
275
|
-
}), !y && "hover:[&_svg:not([class*='animate-'])]:scale-110 motion-reduce:hover:[&_svg]:scale-100", u && y && "data-loading:text-transparent", _ &&
|
|
275
|
+
}), !y && "hover:[&_svg:not([class*='animate-'])]:scale-110 motion-reduce:hover:[&_svg]:scale-100", u && y && "data-loading:text-transparent", _ && Ge[_], v && "bg-transparent border-0 shadow-none", e),
|
|
276
276
|
"aria-disabled": u || void 0,
|
|
277
277
|
"data-cuelume-press": p ? "" : void 0,
|
|
278
278
|
"data-cuelume-release": p ? "" : void 0,
|
|
@@ -284,11 +284,11 @@ function q({ className: e, variant: t, size: n, render: c, children: l, loading:
|
|
|
284
284
|
}, m),
|
|
285
285
|
render: c
|
|
286
286
|
});
|
|
287
|
-
return v ? /* @__PURE__ */ i(
|
|
287
|
+
return v ? /* @__PURE__ */ i(We, { children: b }) : b;
|
|
288
288
|
}
|
|
289
289
|
//#endregion
|
|
290
290
|
//#region src/components/ui/card.tsx
|
|
291
|
-
function
|
|
291
|
+
function qe({ className: e, render: t, ...n }) {
|
|
292
292
|
return s({
|
|
293
293
|
defaultTagName: "div",
|
|
294
294
|
props: o({
|
|
@@ -298,7 +298,7 @@ function Be({ className: e, render: t, ...n }) {
|
|
|
298
298
|
render: t
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function Je({ className: e, render: t, ...n }) {
|
|
302
302
|
return s({
|
|
303
303
|
defaultTagName: "div",
|
|
304
304
|
props: o({
|
|
@@ -308,7 +308,7 @@ function Ve({ className: e, render: t, ...n }) {
|
|
|
308
308
|
render: t
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Ye({ className: e, render: t, ...n }) {
|
|
312
312
|
return s({
|
|
313
313
|
defaultTagName: "div",
|
|
314
314
|
props: o({
|
|
@@ -318,7 +318,7 @@ function He({ className: e, render: t, ...n }) {
|
|
|
318
318
|
render: t
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function Xe({ className: e, render: t, ...n }) {
|
|
322
322
|
return s({
|
|
323
323
|
defaultTagName: "div",
|
|
324
324
|
props: o({
|
|
@@ -328,7 +328,7 @@ function Ue({ className: e, render: t, ...n }) {
|
|
|
328
328
|
render: t
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Ze({ className: e, render: t, ...n }) {
|
|
332
332
|
return s({
|
|
333
333
|
defaultTagName: "div",
|
|
334
334
|
props: o({
|
|
@@ -338,7 +338,7 @@ function We({ className: e, render: t, ...n }) {
|
|
|
338
338
|
render: t
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Qe({ className: e, render: t, ...n }) {
|
|
342
342
|
return s({
|
|
343
343
|
defaultTagName: "div",
|
|
344
344
|
props: o({
|
|
@@ -348,7 +348,7 @@ function Ge({ className: e, render: t, ...n }) {
|
|
|
348
348
|
render: t
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function $e({ className: e, render: t, ...n }) {
|
|
352
352
|
return s({
|
|
353
353
|
defaultTagName: "div",
|
|
354
354
|
props: o({
|
|
@@ -358,7 +358,7 @@ function Ke({ className: e, render: t, ...n }) {
|
|
|
358
358
|
render: t
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function et({ className: e, render: t, ...n }) {
|
|
362
362
|
return s({
|
|
363
363
|
defaultTagName: "div",
|
|
364
364
|
props: o({
|
|
@@ -368,7 +368,7 @@ function qe({ className: e, render: t, ...n }) {
|
|
|
368
368
|
render: t
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function tt({ className: e, render: t, ...n }) {
|
|
372
372
|
return s({
|
|
373
373
|
defaultTagName: "div",
|
|
374
374
|
props: o({
|
|
@@ -378,7 +378,7 @@ function Je({ className: e, render: t, ...n }) {
|
|
|
378
378
|
render: t
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function nt({ className: e, render: t, ...n }) {
|
|
382
382
|
return s({
|
|
383
383
|
defaultTagName: "div",
|
|
384
384
|
props: o({
|
|
@@ -388,7 +388,7 @@ function Ye({ className: e, render: t, ...n }) {
|
|
|
388
388
|
render: t
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function rt({ className: e, render: t, ...n }) {
|
|
392
392
|
return s({
|
|
393
393
|
defaultTagName: "div",
|
|
394
394
|
props: o({
|
|
@@ -398,7 +398,7 @@ function Xe({ className: e, render: t, ...n }) {
|
|
|
398
398
|
render: t
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function it({ className: e, render: t, ...n }) {
|
|
402
402
|
return s({
|
|
403
403
|
defaultTagName: "div",
|
|
404
404
|
props: o({
|
|
@@ -408,7 +408,7 @@ function Ze({ className: e, render: t, ...n }) {
|
|
|
408
408
|
render: t
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function at({ className: e, render: t, ...n }) {
|
|
412
412
|
return s({
|
|
413
413
|
defaultTagName: "div",
|
|
414
414
|
props: o({
|
|
@@ -420,24 +420,24 @@ function Qe({ className: e, render: t, ...n }) {
|
|
|
420
420
|
}
|
|
421
421
|
//#endregion
|
|
422
422
|
//#region src/lib/sound.ts
|
|
423
|
-
var
|
|
424
|
-
function
|
|
425
|
-
|
|
423
|
+
var ot = !1;
|
|
424
|
+
function st(e) {
|
|
425
|
+
ot = !0, fe(e);
|
|
426
426
|
}
|
|
427
|
-
function
|
|
428
|
-
|
|
427
|
+
function ct(e, t) {
|
|
428
|
+
ot && pe(e, t);
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
431
|
//#region src/components/ui/checkbox.tsx
|
|
432
|
-
function
|
|
433
|
-
return /* @__PURE__ */ i(
|
|
432
|
+
function lt({ className: e, sound: t = !0, onCheckedChange: n, ...r }) {
|
|
433
|
+
return /* @__PURE__ */ i(de.Root, {
|
|
434
434
|
onCheckedChange: (e, r) => {
|
|
435
|
-
t &&
|
|
435
|
+
t && ct("toggle"), n?.(e, r);
|
|
436
436
|
},
|
|
437
437
|
className: K("relative inline-flex size-4.5 shrink-0 cursor-pointer items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none ring-ring transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 data-disabled:cursor-not-allowed data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none", e),
|
|
438
438
|
"data-slot": "checkbox",
|
|
439
439
|
...r,
|
|
440
|
-
children: /* @__PURE__ */ i(
|
|
440
|
+
children: /* @__PURE__ */ i(de.Indicator, {
|
|
441
441
|
className: "absolute -inset-px flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground",
|
|
442
442
|
"data-slot": "checkbox-indicator",
|
|
443
443
|
render: (e, t) => /* @__PURE__ */ i("span", {
|
|
@@ -476,79 +476,79 @@ function nt({ className: e, sound: t = !0, onCheckedChange: n, ...r }) {
|
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/components/ui/field.tsx
|
|
478
478
|
function J({ className: e, ...t }) {
|
|
479
|
-
return /* @__PURE__ */ i(
|
|
479
|
+
return /* @__PURE__ */ i(ye.Root, {
|
|
480
480
|
className: K("flex flex-col items-start gap-2", e),
|
|
481
481
|
"data-slot": "field",
|
|
482
482
|
...t
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
function Y({ className: e, ...t }) {
|
|
486
|
-
return /* @__PURE__ */ i(
|
|
486
|
+
return /* @__PURE__ */ i(ye.Label, {
|
|
487
487
|
className: K("inline-flex cursor-pointer items-center gap-2 font-medium text-base/4 text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-64 sm:text-xs/3.5 ml-3", e),
|
|
488
488
|
"data-slot": "field-label",
|
|
489
489
|
...t
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
return /* @__PURE__ */ i(
|
|
492
|
+
function ut({ className: e, ...t }) {
|
|
493
|
+
return /* @__PURE__ */ i(ye.Item, {
|
|
494
494
|
className: K("flex", e),
|
|
495
495
|
"data-slot": "field-item",
|
|
496
496
|
...t
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
return /* @__PURE__ */ i(
|
|
499
|
+
function dt({ className: e, ...t }) {
|
|
500
|
+
return /* @__PURE__ */ i(ye.Description, {
|
|
501
501
|
className: K("overflow-hidden text-muted-foreground text-xs transition-[height,opacity,filter,translate] duration-300 ease-smooth-out starting:h-0 starting:translate-y-1 starting:opacity-0 starting:blur-[2px] motion-reduce:transition-none", e),
|
|
502
502
|
"data-slot": "field-description",
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
return /* @__PURE__ */ i(
|
|
506
|
+
function ft({ className: e, ...t }) {
|
|
507
|
+
return /* @__PURE__ */ i(ye.Error, {
|
|
508
508
|
className: K("overflow-hidden text-destructive-foreground text-xs transition-[height,opacity,filter,translate] duration-300 ease-smooth-out starting:h-0 starting:translate-y-1 starting:opacity-0 starting:blur-[2px] motion-reduce:transition-none", e),
|
|
509
509
|
"data-slot": "field-error",
|
|
510
510
|
...t
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
|
-
var
|
|
513
|
+
var pt = ye.Control, mt = ye.Validity;
|
|
514
514
|
//#endregion
|
|
515
515
|
//#region src/components/ui/frame.tsx
|
|
516
|
-
function
|
|
516
|
+
function ht({ className: e, ...t }) {
|
|
517
517
|
return /* @__PURE__ */ i("div", {
|
|
518
518
|
className: K("relative flex flex-col rounded-2xl bg-muted/72 p-1", "*:[[data-slot=frame-panel]+[data-slot=frame-panel]]:mt-1", e),
|
|
519
519
|
"data-slot": "frame",
|
|
520
520
|
...t
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function gt({ className: e, ...t }) {
|
|
524
524
|
return /* @__PURE__ */ i("div", {
|
|
525
525
|
className: K("relative rounded-xl border bg-background bg-clip-padding p-5 shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", e),
|
|
526
526
|
"data-slot": "frame-panel",
|
|
527
527
|
...t
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function _t({ className: e, ...t }) {
|
|
531
531
|
return /* @__PURE__ */ i("header", {
|
|
532
532
|
className: K("flex flex-col px-5 py-4", e),
|
|
533
533
|
"data-slot": "frame-panel-header",
|
|
534
534
|
...t
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function vt({ className: e, ...t }) {
|
|
538
538
|
return /* @__PURE__ */ i("div", {
|
|
539
539
|
className: K("font-semibold text-sm", e),
|
|
540
540
|
"data-slot": "frame-panel-title",
|
|
541
541
|
...t
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function yt({ className: e, ...t }) {
|
|
545
545
|
return /* @__PURE__ */ i("div", {
|
|
546
546
|
className: K("text-muted-foreground text-sm", e),
|
|
547
547
|
"data-slot": "frame-panel-description",
|
|
548
548
|
...t
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function bt({ className: e, ...t }) {
|
|
552
552
|
return /* @__PURE__ */ i("footer", {
|
|
553
553
|
className: K("px-5 py-4", e),
|
|
554
554
|
"data-slot": "frame-panel-footer",
|
|
@@ -557,7 +557,7 @@ function pt({ className: e, ...t }) {
|
|
|
557
557
|
}
|
|
558
558
|
//#endregion
|
|
559
559
|
//#region src/components/ui/input.tsx
|
|
560
|
-
function
|
|
560
|
+
function xt({ className: e, size: t = "default", unstyled: n = !1, nativeInput: r = !1, style: a, ...o }) {
|
|
561
561
|
let s = K("h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none [transition:background-color_5000000s_ease-in-out_0s,height_300ms_var(--ease-smooth-out),line-height_300ms_var(--ease-smooth-out),padding_300ms_var(--ease-smooth-out),font-size_300ms_var(--ease-smooth-out)] placeholder:text-muted-foreground/72 motion-reduce:[transition:background-color_5000000s_ease-in-out_0s] sm:h-7.5 sm:leading-7.5", t === "sm" && "h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5", t === "lg" && "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5", o.type === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none", o.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm");
|
|
562
562
|
return /* @__PURE__ */ i("span", {
|
|
563
563
|
className: K(!n && "relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-[box-shadow,border-color] duration-150 ease-smooth-out has-aria-invalid:animate-input-shake motion-reduce:animate-none motion-reduce:transition-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-autofill:bg-foreground/4 has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", e) || void 0,
|
|
@@ -569,7 +569,7 @@ function mt({ className: e, size: t = "default", unstyled: n = !1, nativeInput:
|
|
|
569
569
|
size: typeof t == "number" ? t : void 0,
|
|
570
570
|
style: typeof a == "function" ? void 0 : a,
|
|
571
571
|
...o
|
|
572
|
-
}) : /* @__PURE__ */ i(
|
|
572
|
+
}) : /* @__PURE__ */ i(be, {
|
|
573
573
|
className: s,
|
|
574
574
|
"data-slot": "input",
|
|
575
575
|
size: typeof t == "number" ? t : void 0,
|
|
@@ -580,12 +580,12 @@ function mt({ className: e, size: t = "default", unstyled: n = !1, nativeInput:
|
|
|
580
580
|
}
|
|
581
581
|
//#endregion
|
|
582
582
|
//#region src/components/ui/textarea.tsx
|
|
583
|
-
function
|
|
583
|
+
function St({ className: e, size: t = "default", unstyled: n = !1, ref: r, ...a }) {
|
|
584
584
|
return /* @__PURE__ */ i("span", {
|
|
585
585
|
className: K(!n && "relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", e) || void 0,
|
|
586
586
|
"data-size": t,
|
|
587
587
|
"data-slot": "textarea-control",
|
|
588
|
-
children: /* @__PURE__ */ i(
|
|
588
|
+
children: /* @__PURE__ */ i(ve.Control, {
|
|
589
589
|
ref: r,
|
|
590
590
|
value: a.value,
|
|
591
591
|
defaultValue: a.defaultValue,
|
|
@@ -602,7 +602,7 @@ function ht({ className: e, size: t = "default", unstyled: n = !1, ref: r, ...a
|
|
|
602
602
|
}
|
|
603
603
|
//#endregion
|
|
604
604
|
//#region src/components/ui/input-group.tsx
|
|
605
|
-
var
|
|
605
|
+
var Ct = c("flex h-auto cursor-text select-none items-center justify-center gap-2 leading-none [&>kbd]:rounded-[calc(var(--radius)-5px)] in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 [&_svg]:-mx-0.5 not-has-[button]:**:[svg:not([class*='opacity-'])]:opacity-80", {
|
|
606
606
|
defaultVariants: { align: "inline-start" },
|
|
607
607
|
variants: { align: {
|
|
608
608
|
"block-end": "order-last w-full justify-start px-[calc(--spacing(3)-1px)] pb-[calc(--spacing(3)-1px)] [.border-t]:pt-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]",
|
|
@@ -611,7 +611,7 @@ var gt = c("flex h-auto cursor-text select-none items-center justify-center gap-
|
|
|
611
611
|
"inline-start": "order-first ps-[calc(--spacing(3)-1px)] has-[>:last-child[data-slot=badge]]:-ms-1.5 has-[>button]:-ms-2 has-[>kbd:last-child]:ms-[-0.35rem] [[data-size=sm]+&]:ps-[calc(--spacing(2.5)-1px)]"
|
|
612
612
|
} }
|
|
613
613
|
});
|
|
614
|
-
function
|
|
614
|
+
function wt({ className: e, ...t }) {
|
|
615
615
|
return /* @__PURE__ */ i("div", {
|
|
616
616
|
className: K("relative inline-flex w-full min-w-0 items-center rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_1px_--theme(--color-black/4%)] has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/64 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/16 has-[textarea]:h-auto has-data-[align=block-end]:h-auto has-data-[align=block-start]:h-auto has-data-[align=block-end]:flex-col has-data-[align=block-start]:flex-col has-[input:focus-visible,textarea:focus-visible]:border-ring has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/36 has-autofill:bg-foreground/4 has-[input:disabled,textarea:disabled]:opacity-64 has-[input:disabled,textarea:disabled,input:focus-visible,textarea:focus-visible,input[aria-invalid],textarea[aria-invalid]]:shadow-none has-[input:focus-visible,textarea:focus-visible]:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/24 dark:not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_-1px_--theme(--color-white/6%)] has-data-[align=inline-start]:**:[[data-size=sm]_input]:ps-1.5 has-data-[align=inline-end]:**:[[data-size=sm]_input]:pe-1.5 *:[[data-slot=input-control],[data-slot=textarea-control]]:contents *:[[data-slot=input-control],[data-slot=textarea-control]]:before:hidden has-[[data-align=block-start],[data-align=block-end]]:**:[input]:h-auto has-data-[align=inline-start]:**:[input]:ps-2 has-data-[align=inline-end]:**:[input]:pe-2 has-data-[align=block-end]:**:[input]:pt-1.5 has-data-[align=block-start]:**:[input]:pb-1.5 **:[textarea]:min-h-20.5 **:[textarea]:resize-none **:[textarea]:py-[calc(--spacing(3)-1px)] **:[textarea]:max-sm:min-h-23.5 **:[textarea_button]:rounded-[calc(var(--radius-md)-1px)]", e),
|
|
617
617
|
"data-slot": "input-group",
|
|
@@ -619,9 +619,9 @@ function _t({ className: e, ...t }) {
|
|
|
619
619
|
...t
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Tt({ className: e, align: t = "inline-start", ...n }) {
|
|
623
623
|
return /* @__PURE__ */ i("div", {
|
|
624
|
-
className: K(
|
|
624
|
+
className: K(Ct({ align: t }), e),
|
|
625
625
|
"data-align": t,
|
|
626
626
|
"data-slot": "input-group-addon",
|
|
627
627
|
onMouseDown: (e) => {
|
|
@@ -633,21 +633,21 @@ function vt({ className: e, align: t = "inline-start", ...n }) {
|
|
|
633
633
|
...n
|
|
634
634
|
});
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Et({ className: e, ...t }) {
|
|
637
637
|
return /* @__PURE__ */ i("span", {
|
|
638
638
|
className: K("line-clamp-1 flex items-center gap-2 whitespace-nowrap text-muted-foreground leading-none in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5", e),
|
|
639
639
|
...t
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
return /* @__PURE__ */ i(
|
|
642
|
+
function Dt({ className: e, ...t }) {
|
|
643
|
+
return /* @__PURE__ */ i(xt, {
|
|
644
644
|
className: e,
|
|
645
645
|
unstyled: !0,
|
|
646
646
|
...t
|
|
647
647
|
});
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return /* @__PURE__ */ i(
|
|
649
|
+
function Ot({ className: e, ...t }) {
|
|
650
|
+
return /* @__PURE__ */ i(St, {
|
|
651
651
|
className: e,
|
|
652
652
|
unstyled: !0,
|
|
653
653
|
...t
|
|
@@ -655,7 +655,7 @@ function xt({ className: e, ...t }) {
|
|
|
655
655
|
}
|
|
656
656
|
//#endregion
|
|
657
657
|
//#region src/components/ui/label.tsx
|
|
658
|
-
function
|
|
658
|
+
function kt({ className: e, render: t, sound: n = !1, ...r }) {
|
|
659
659
|
return s({
|
|
660
660
|
defaultTagName: "label",
|
|
661
661
|
props: o({
|
|
@@ -668,19 +668,19 @@ function St({ className: e, render: t, sound: n = !1, ...r }) {
|
|
|
668
668
|
}
|
|
669
669
|
//#endregion
|
|
670
670
|
//#region src/components/ui/menu.tsx
|
|
671
|
-
var
|
|
672
|
-
function
|
|
673
|
-
return /* @__PURE__ */ i(
|
|
671
|
+
var At = H.createHandle, jt = H.Root, Mt = H.Portal;
|
|
672
|
+
function Nt({ className: e, children: t, ...n }) {
|
|
673
|
+
return /* @__PURE__ */ i(H.Trigger, {
|
|
674
674
|
className: e,
|
|
675
675
|
"data-slot": "menu-trigger",
|
|
676
676
|
...n,
|
|
677
677
|
children: t
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
function
|
|
681
|
-
return /* @__PURE__ */ i(
|
|
680
|
+
function Pt({ children: e, className: t, sideOffset: n = 4, align: r = "center", alignOffset: a, side: o = "bottom", anchor: s, portalProps: c, ...l }) {
|
|
681
|
+
return /* @__PURE__ */ i(Mt, {
|
|
682
682
|
...c,
|
|
683
|
-
children: /* @__PURE__ */ i(
|
|
683
|
+
children: /* @__PURE__ */ i(H.Positioner, {
|
|
684
684
|
align: r,
|
|
685
685
|
alignOffset: a,
|
|
686
686
|
anchor: s,
|
|
@@ -688,7 +688,7 @@ function Dt({ children: e, className: t, sideOffset: n = 4, align: r = "center",
|
|
|
688
688
|
"data-slot": "menu-positioner",
|
|
689
689
|
side: o,
|
|
690
690
|
sideOffset: n,
|
|
691
|
-
children: /* @__PURE__ */ i(
|
|
691
|
+
children: /* @__PURE__ */ i(H.Popup, {
|
|
692
692
|
className: K("relative flex not-[class*='w-']:min-w-32 origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 outline-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] focus:outline-none dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", t),
|
|
693
693
|
"data-slot": "menu-popup",
|
|
694
694
|
...l,
|
|
@@ -700,14 +700,14 @@ function Dt({ children: e, className: t, sideOffset: n = 4, align: r = "center",
|
|
|
700
700
|
})
|
|
701
701
|
});
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return /* @__PURE__ */ i(
|
|
703
|
+
function Ft(e) {
|
|
704
|
+
return /* @__PURE__ */ i(H.Group, {
|
|
705
705
|
"data-slot": "menu-group",
|
|
706
706
|
...e
|
|
707
707
|
});
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return /* @__PURE__ */ i(
|
|
709
|
+
function It({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
710
|
+
return /* @__PURE__ */ i(H.Item, {
|
|
711
711
|
className: K("flex min-h-8 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-inset:ps-8 data-[variant=destructive]:text-destructive-foreground data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0", e),
|
|
712
712
|
"data-inset": t,
|
|
713
713
|
"data-slot": "menu-item",
|
|
@@ -715,8 +715,8 @@ function kt({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
715
715
|
...r
|
|
716
716
|
});
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
return /* @__PURE__ */ i(
|
|
718
|
+
function Lt({ className: e, inset: t, variant: n = "default", closeOnClick: r = !0, ...a }) {
|
|
719
|
+
return /* @__PURE__ */ i(H.LinkItem, {
|
|
720
720
|
className: K("flex min-h-8 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-inset:ps-8 data-[variant=destructive]:text-destructive-foreground data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0", e),
|
|
721
721
|
closeOnClick: r,
|
|
722
722
|
"data-inset": t,
|
|
@@ -725,8 +725,8 @@ function At({ className: e, inset: t, variant: n = "default", closeOnClick: r =
|
|
|
725
725
|
...a
|
|
726
726
|
});
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return /* @__PURE__ */ i(
|
|
728
|
+
function Rt({ className: e, children: t, checked: n, variant: o = "default", ...s }) {
|
|
729
|
+
return /* @__PURE__ */ i(H.CheckboxItem, {
|
|
730
730
|
checked: n,
|
|
731
731
|
className: K("grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default items-center gap-2 rounded-sm py-1 ps-2 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", o === "switch" ? "grid-cols-[1fr_auto] gap-4 pe-1.5" : "grid-cols-[.75rem_1fr] pe-4", e),
|
|
732
732
|
"data-slot": "menu-checkbox-item",
|
|
@@ -734,11 +734,11 @@ function jt({ className: e, children: t, checked: n, variant: o = "default", ...
|
|
|
734
734
|
children: o === "switch" ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("span", {
|
|
735
735
|
className: "col-start-1",
|
|
736
736
|
children: t
|
|
737
|
-
}), /* @__PURE__ */ i(
|
|
737
|
+
}), /* @__PURE__ */ i(H.CheckboxItemIndicator, {
|
|
738
738
|
className: "inset-shadow-[0_1px_--theme(--color-black/4%)] inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200 [--thumb-size:--spacing(4)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:opacity-64 sm:[--thumb-size:--spacing(3)]",
|
|
739
739
|
keepMounted: !0,
|
|
740
740
|
children: /* @__PURE__ */ i("span", { className: "pointer-events-none block aspect-square h-full in-[[data-slot=menu-checkbox-item][data-checked]]:origin-[var(--thumb-size)_50%] origin-left in-[[data-slot=menu-checkbox-item][data-checked]]:translate-x-[calc(var(--thumb-size)-4px)] in-[[data-slot=menu-checkbox-item]:active]:not-data-disabled:scale-x-110 in-[[data-slot=menu-checkbox-item]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)] rounded-(--thumb-size) bg-background shadow-sm/5 will-change-transform [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s]" })
|
|
741
|
-
})] }) : /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(
|
|
741
|
+
})] }) : /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(H.CheckboxItemIndicator, {
|
|
742
742
|
className: "col-start-1 -ms-0.5",
|
|
743
743
|
children: /* @__PURE__ */ i("svg", {
|
|
744
744
|
"aria-hidden": "true",
|
|
@@ -759,18 +759,18 @@ function jt({ className: e, children: t, checked: n, variant: o = "default", ...
|
|
|
759
759
|
})] })
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
return /* @__PURE__ */ i(
|
|
762
|
+
function zt(e) {
|
|
763
|
+
return /* @__PURE__ */ i(H.RadioGroup, {
|
|
764
764
|
"data-slot": "menu-radio-group",
|
|
765
765
|
...e
|
|
766
766
|
});
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
return /* @__PURE__ */ a(
|
|
768
|
+
function Bt({ className: e, children: t, ...n }) {
|
|
769
|
+
return /* @__PURE__ */ a(H.RadioItem, {
|
|
770
770
|
className: K("grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[.75rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
|
|
771
771
|
"data-slot": "menu-radio-item",
|
|
772
772
|
...n,
|
|
773
|
-
children: [/* @__PURE__ */ i(
|
|
773
|
+
children: [/* @__PURE__ */ i(H.RadioItemIndicator, {
|
|
774
774
|
className: "col-start-1 -ms-0.5",
|
|
775
775
|
children: /* @__PURE__ */ i("svg", {
|
|
776
776
|
"aria-hidden": "true",
|
|
@@ -791,36 +791,36 @@ function Nt({ className: e, children: t, ...n }) {
|
|
|
791
791
|
})]
|
|
792
792
|
});
|
|
793
793
|
}
|
|
794
|
-
function
|
|
795
|
-
return /* @__PURE__ */ i(
|
|
794
|
+
function Vt({ className: e, inset: t, ...n }) {
|
|
795
|
+
return /* @__PURE__ */ i(H.GroupLabel, {
|
|
796
796
|
className: K("px-2 py-1.5 font-medium text-muted-foreground text-xs data-inset:ps-9 sm:data-inset:ps-8", e),
|
|
797
797
|
"data-inset": t,
|
|
798
798
|
"data-slot": "menu-label",
|
|
799
799
|
...n
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
return /* @__PURE__ */ i(
|
|
802
|
+
function Ht({ className: e, ...t }) {
|
|
803
|
+
return /* @__PURE__ */ i(H.Separator, {
|
|
804
804
|
className: K("mx-2 my-1 h-px bg-border", e),
|
|
805
805
|
"data-slot": "menu-separator",
|
|
806
806
|
...t
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
function
|
|
809
|
+
function Ut({ className: e, ...t }) {
|
|
810
810
|
return /* @__PURE__ */ i("kbd", {
|
|
811
811
|
className: K("ms-auto font-medium font-sans text-muted-foreground/72 text-xs tracking-widest", e),
|
|
812
812
|
"data-slot": "menu-shortcut",
|
|
813
813
|
...t
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
|
-
function
|
|
817
|
-
return /* @__PURE__ */ i(
|
|
816
|
+
function Wt(e) {
|
|
817
|
+
return /* @__PURE__ */ i(H.SubmenuRoot, {
|
|
818
818
|
"data-slot": "menu-sub",
|
|
819
819
|
...e
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
return /* @__PURE__ */ a(
|
|
822
|
+
function Gt({ className: e, inset: t, children: n, ...r }) {
|
|
823
|
+
return /* @__PURE__ */ a(H.SubmenuTrigger, {
|
|
824
824
|
className: K("flex min-h-8 items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-popup-open:bg-accent data-inset:ps-8 data-highlighted:text-accent-foreground data-popup-open:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not(:last-child)]:-mx-0.5 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none", e),
|
|
825
825
|
"data-inset": t,
|
|
826
826
|
"data-slot": "menu-sub-trigger",
|
|
@@ -828,8 +828,8 @@ function Rt({ className: e, inset: t, children: n, ...r }) {
|
|
|
828
828
|
children: [n, /* @__PURE__ */ i(p, { className: "ms-auto -me-0.5 opacity-80" })]
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
|
-
function
|
|
832
|
-
return /* @__PURE__ */ i(
|
|
831
|
+
function Kt({ className: e, sideOffset: t = 0, alignOffset: n, align: r = "start", ...a }) {
|
|
832
|
+
return /* @__PURE__ */ i(Pt, {
|
|
833
833
|
align: r,
|
|
834
834
|
alignOffset: n ?? (r === "center" ? void 0 : -5),
|
|
835
835
|
className: e,
|
|
@@ -841,38 +841,38 @@ function zt({ className: e, sideOffset: t = 0, alignOffset: n, align: r = "start
|
|
|
841
841
|
}
|
|
842
842
|
//#endregion
|
|
843
843
|
//#region src/components/ui/separator.tsx
|
|
844
|
-
function
|
|
845
|
-
return /* @__PURE__ */ i(
|
|
846
|
-
className: K("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch", e),
|
|
844
|
+
function qt({ className: e, orientation: t = "horizontal", ...n }) {
|
|
845
|
+
return /* @__PURE__ */ i(Se, {
|
|
847
846
|
"data-slot": "separator",
|
|
848
847
|
orientation: t,
|
|
848
|
+
className: K("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", e),
|
|
849
849
|
...n
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
852
|
//#endregion
|
|
853
853
|
//#region src/components/ui/otp-field.tsx
|
|
854
|
-
function
|
|
855
|
-
let o =
|
|
856
|
-
return /* @__PURE__ */ i(
|
|
854
|
+
function Jt({ className: e, size: t = "default", sound: n = !0, onValueChange: r, ...a }) {
|
|
855
|
+
let o = P.useRef(String(a.value ?? a.defaultValue ?? "").length);
|
|
856
|
+
return /* @__PURE__ */ i(xe.Root, {
|
|
857
857
|
className: K("flex items-center gap-2 has-disabled:opacity-64 has-disabled:**:data-[slot=otp-field-input]:shadow-none has-disabled:**:data-[slot=otp-field-input]:before:shadow-none!", e),
|
|
858
858
|
"data-size": t,
|
|
859
859
|
"data-slot": "otp-field",
|
|
860
860
|
onValueChange: (e, ...t) => {
|
|
861
|
-
n && e.length > o.current &&
|
|
861
|
+
n && e.length > o.current && ct("tick"), o.current = e.length, r?.(e, ...t);
|
|
862
862
|
},
|
|
863
863
|
...a
|
|
864
864
|
});
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
return /* @__PURE__ */ i(
|
|
866
|
+
function Yt({ className: e, ...t }) {
|
|
867
|
+
return /* @__PURE__ */ i(xe.Input, {
|
|
868
868
|
className: K("relative in-[[data-slot=otp-field][data-size=lg]]:size-10 size-9 min-w-0 rounded-lg border border-input bg-background not-dark:bg-clip-padding text-center in-[[data-slot=otp-field][data-size=lg]]:text-lg text-base text-foreground in-[[data-slot=otp-field][data-size=lg]]:leading-10 leading-9 shadow-xs/5 outline-none ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-focus-visible:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:z-10 focus-visible:border-ring focus-visible:shadow-none focus-visible:ring-[3px] focus-visible:ring-ring/24 aria-invalid:border-destructive/36 aria-invalid:shadow-none aria-invalid:focus-visible:border-destructive/64 aria-invalid:focus-visible:ring-destructive/16 sm:in-[[data-slot=otp-field][data-size=lg]]:size-9 sm:size-8 sm:in-[[data-slot=otp-field][data-size=lg]]:text-base sm:text-sm sm:in-[[data-slot=otp-field][data-size=lg]]:leading-9 sm:leading-8 dark:bg-input/32 dark:aria-invalid:focus-visible:ring-destructive/24 dark:not-focus-visible:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", e),
|
|
869
869
|
"data-slot": "otp-field-input",
|
|
870
870
|
spellCheck: !1,
|
|
871
871
|
...t
|
|
872
872
|
});
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
return /* @__PURE__ */ i(
|
|
874
|
+
function Xt({ className: e, ...t }) {
|
|
875
|
+
return /* @__PURE__ */ i(xe.Separator, { render: /* @__PURE__ */ i(qt, {
|
|
876
876
|
className: K("rounded-full bg-input data-[orientation=horizontal]:h-0.5 data-[orientation=horizontal]:w-3", e),
|
|
877
877
|
orientation: "horizontal",
|
|
878
878
|
...t
|
|
@@ -880,7 +880,7 @@ function Ut({ className: e, ...t }) {
|
|
|
880
880
|
}
|
|
881
881
|
//#endregion
|
|
882
882
|
//#region src/components/ui/skeleton.tsx
|
|
883
|
-
function
|
|
883
|
+
function Zt({ className: e, ...t }) {
|
|
884
884
|
return /* @__PURE__ */ i("div", {
|
|
885
885
|
className: K("animate-skeleton rounded-sm [--skeleton-highlight:--alpha(var(--color-white)/64%)] [background:linear-gradient(120deg,transparent_40%,var(--skeleton-highlight),transparent_60%)_var(--color-muted)_0_0/200%_100%_fixed] dark:[--skeleton-highlight:--alpha(var(--color-white)/4%)]", e),
|
|
886
886
|
"data-slot": "skeleton",
|
|
@@ -889,12 +889,12 @@ function Wt({ className: e, ...t }) {
|
|
|
889
889
|
}
|
|
890
890
|
//#endregion
|
|
891
891
|
//#region src/components/composed/password-input.tsx
|
|
892
|
-
var
|
|
892
|
+
var Qt = [
|
|
893
893
|
.22,
|
|
894
894
|
1,
|
|
895
895
|
.36,
|
|
896
896
|
1
|
|
897
|
-
],
|
|
897
|
+
], $t = [
|
|
898
898
|
{
|
|
899
899
|
regex: /.{8,}/,
|
|
900
900
|
text: "At least 8 characters"
|
|
@@ -912,21 +912,21 @@ var Gt = [
|
|
|
912
912
|
text: "At least 1 uppercase letter"
|
|
913
913
|
}
|
|
914
914
|
];
|
|
915
|
-
function
|
|
916
|
-
return
|
|
915
|
+
function en(e) {
|
|
916
|
+
return $t.filter((t) => t.regex.test(e)).length;
|
|
917
917
|
}
|
|
918
|
-
var
|
|
918
|
+
var tn = [
|
|
919
919
|
"bg-border",
|
|
920
920
|
"bg-red-500",
|
|
921
921
|
"bg-orange-500",
|
|
922
922
|
"bg-amber-500",
|
|
923
923
|
"bg-emerald-500"
|
|
924
924
|
];
|
|
925
|
-
function
|
|
926
|
-
let [u, f] =
|
|
925
|
+
function nn({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, className: r, value: o, defaultValue: s, onChange: c, ...l }) {
|
|
926
|
+
let [u, f] = P.useState(!1), [p, m] = P.useState(String(s ?? "")), _ = o === void 0 ? p : String(o), v = en(_);
|
|
927
927
|
return /* @__PURE__ */ a("div", {
|
|
928
928
|
className: K("flex w-full flex-col gap-3", r),
|
|
929
|
-
children: [/* @__PURE__ */ a(
|
|
929
|
+
children: [/* @__PURE__ */ a(wt, { children: [/* @__PURE__ */ i(Dt, {
|
|
930
930
|
placeholder: "Enter your password",
|
|
931
931
|
...l,
|
|
932
932
|
type: u ? "text" : "password",
|
|
@@ -934,20 +934,20 @@ function Yt({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, cla
|
|
|
934
934
|
onChange: (e) => {
|
|
935
935
|
m(e.target.value), c?.(e);
|
|
936
936
|
}
|
|
937
|
-
}), e && /* @__PURE__ */ i(
|
|
937
|
+
}), e && /* @__PURE__ */ i(Tt, {
|
|
938
938
|
align: "inline-end",
|
|
939
939
|
children: /* @__PURE__ */ i(q, {
|
|
940
940
|
"aria-label": u ? "Hide password" : "Show password",
|
|
941
941
|
onClick: () => {
|
|
942
|
-
n &&
|
|
942
|
+
n && ct(u ? "droplet" : "bloom"), f((e) => !e);
|
|
943
943
|
},
|
|
944
944
|
size: "icon-xs",
|
|
945
945
|
variant: "ghost",
|
|
946
946
|
sound: !1,
|
|
947
|
-
children: /* @__PURE__ */ i(
|
|
947
|
+
children: /* @__PURE__ */ i(U, {
|
|
948
948
|
mode: "wait",
|
|
949
949
|
initial: !1,
|
|
950
|
-
children: /* @__PURE__ */ i(
|
|
950
|
+
children: /* @__PURE__ */ i(W.span, {
|
|
951
951
|
className: "inline-flex",
|
|
952
952
|
initial: {
|
|
953
953
|
opacity: 0,
|
|
@@ -966,15 +966,15 @@ function Yt({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, cla
|
|
|
966
966
|
},
|
|
967
967
|
transition: {
|
|
968
968
|
duration: .15,
|
|
969
|
-
ease:
|
|
969
|
+
ease: Qt
|
|
970
970
|
},
|
|
971
971
|
children: i(u ? g : h, { "aria-hidden": "true" })
|
|
972
972
|
}, u ? "off" : "on")
|
|
973
973
|
})
|
|
974
974
|
})
|
|
975
|
-
})] }), /* @__PURE__ */ i(
|
|
975
|
+
})] }), /* @__PURE__ */ i(U, {
|
|
976
976
|
initial: !1,
|
|
977
|
-
children: t && /* @__PURE__ */ a(
|
|
977
|
+
children: t && /* @__PURE__ */ a(W.div, {
|
|
978
978
|
className: "flex flex-col gap-2 overflow-hidden",
|
|
979
979
|
initial: {
|
|
980
980
|
height: 0,
|
|
@@ -990,7 +990,7 @@ function Yt({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, cla
|
|
|
990
990
|
},
|
|
991
991
|
transition: {
|
|
992
992
|
duration: .25,
|
|
993
|
-
ease:
|
|
993
|
+
ease: Qt
|
|
994
994
|
},
|
|
995
995
|
children: [/* @__PURE__ */ i("div", {
|
|
996
996
|
"aria-label": "Password strength",
|
|
@@ -999,25 +999,25 @@ function Yt({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, cla
|
|
|
999
999
|
"aria-valuenow": v,
|
|
1000
1000
|
className: "h-1 w-full overflow-hidden rounded-full bg-border",
|
|
1001
1001
|
role: "progressbar",
|
|
1002
|
-
children: /* @__PURE__ */ i(
|
|
1003
|
-
className: K("h-full rounded-full",
|
|
1002
|
+
children: /* @__PURE__ */ i(W.div, {
|
|
1003
|
+
className: K("h-full rounded-full", tn[v]),
|
|
1004
1004
|
animate: { width: `${v / 4 * 100}%` },
|
|
1005
1005
|
transition: {
|
|
1006
1006
|
duration: .4,
|
|
1007
|
-
ease:
|
|
1007
|
+
ease: Qt
|
|
1008
1008
|
}
|
|
1009
1009
|
})
|
|
1010
1010
|
}), /* @__PURE__ */ i("ul", {
|
|
1011
1011
|
"aria-label": "Password requirements",
|
|
1012
1012
|
className: "flex flex-col gap-1",
|
|
1013
|
-
children:
|
|
1013
|
+
children: $t.map((e) => {
|
|
1014
1014
|
let t = e.regex.test(_);
|
|
1015
1015
|
return /* @__PURE__ */ a("li", {
|
|
1016
1016
|
className: "flex items-center gap-2 text-xs",
|
|
1017
1017
|
children: [t ? /* @__PURE__ */ i(d, {
|
|
1018
1018
|
"aria-hidden": "true",
|
|
1019
1019
|
className: "size-3.5 text-emerald-500"
|
|
1020
|
-
}) : /* @__PURE__ */ i(
|
|
1020
|
+
}) : /* @__PURE__ */ i(ne, {
|
|
1021
1021
|
"aria-hidden": "true",
|
|
1022
1022
|
className: "size-3.5 text-muted-foreground/80"
|
|
1023
1023
|
}), /* @__PURE__ */ a("span", {
|
|
@@ -1036,7 +1036,7 @@ function Yt({ visibilityToggle: e = !0, showStrength: t = !1, sound: n = !0, cla
|
|
|
1036
1036
|
}
|
|
1037
1037
|
//#endregion
|
|
1038
1038
|
//#region src/components/composed/social-providers.tsx
|
|
1039
|
-
function
|
|
1039
|
+
function rn(e) {
|
|
1040
1040
|
return /* @__PURE__ */ a("svg", {
|
|
1041
1041
|
viewBox: "0 0 24 24",
|
|
1042
1042
|
fill: "none",
|
|
@@ -1061,37 +1061,37 @@ function Xt(e) {
|
|
|
1061
1061
|
]
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
|
-
var
|
|
1064
|
+
var an = {
|
|
1065
1065
|
google: {
|
|
1066
1066
|
label: "Google",
|
|
1067
|
-
Icon:
|
|
1068
|
-
BrandIcon:
|
|
1067
|
+
Icon: De,
|
|
1068
|
+
BrandIcon: rn,
|
|
1069
1069
|
brandClassName: ""
|
|
1070
1070
|
},
|
|
1071
1071
|
apple: {
|
|
1072
1072
|
label: "Apple",
|
|
1073
|
-
Icon:
|
|
1074
|
-
BrandIcon:
|
|
1073
|
+
Icon: we,
|
|
1074
|
+
BrandIcon: we,
|
|
1075
1075
|
brandClassName: "text-foreground"
|
|
1076
1076
|
},
|
|
1077
1077
|
github: {
|
|
1078
1078
|
label: "GitHub",
|
|
1079
|
-
Icon:
|
|
1080
|
-
BrandIcon:
|
|
1079
|
+
Icon: Ee,
|
|
1080
|
+
BrandIcon: Ee,
|
|
1081
1081
|
brandClassName: "text-foreground"
|
|
1082
1082
|
},
|
|
1083
1083
|
x: {
|
|
1084
1084
|
label: "X",
|
|
1085
|
-
Icon:
|
|
1086
|
-
BrandIcon:
|
|
1085
|
+
Icon: Oe,
|
|
1086
|
+
BrandIcon: Oe,
|
|
1087
1087
|
brandClassName: "text-foreground"
|
|
1088
1088
|
}
|
|
1089
|
-
},
|
|
1089
|
+
}, on = {
|
|
1090
1090
|
login: "Login with",
|
|
1091
1091
|
signup: "Sign up with",
|
|
1092
1092
|
continue: "Continue with"
|
|
1093
1093
|
};
|
|
1094
|
-
function
|
|
1094
|
+
function sn({ providers: e = [
|
|
1095
1095
|
"google",
|
|
1096
1096
|
"apple",
|
|
1097
1097
|
"github"
|
|
@@ -1100,19 +1100,19 @@ function $t({ providers: e = [
|
|
|
1100
1100
|
return /* @__PURE__ */ i("div", {
|
|
1101
1101
|
className: K("flex w-full gap-2", l ? "flex-row justify-center" : "flex-col", c),
|
|
1102
1102
|
children: e.map((e) => {
|
|
1103
|
-
let { label: n, Icon: c } =
|
|
1103
|
+
let { label: n, Icon: c } = an[e];
|
|
1104
1104
|
return /* @__PURE__ */ a(q, {
|
|
1105
1105
|
variant: "outline",
|
|
1106
1106
|
size: l ? "icon" : "default",
|
|
1107
1107
|
className: l ? void 0 : "w-full",
|
|
1108
|
-
"aria-label": `${
|
|
1108
|
+
"aria-label": `${on[t]} ${n}`,
|
|
1109
1109
|
loading: r === e,
|
|
1110
1110
|
disabled: o || r !== null && r !== e,
|
|
1111
1111
|
onClick: () => s?.(e),
|
|
1112
1112
|
children: [/* @__PURE__ */ i(c, { "aria-hidden": "true" }), !l && /* @__PURE__ */ a("span", {
|
|
1113
1113
|
className: "flex-1",
|
|
1114
1114
|
children: [
|
|
1115
|
-
|
|
1115
|
+
on[t],
|
|
1116
1116
|
" ",
|
|
1117
1117
|
n
|
|
1118
1118
|
]
|
|
@@ -1123,30 +1123,30 @@ function $t({ providers: e = [
|
|
|
1123
1123
|
}
|
|
1124
1124
|
//#endregion
|
|
1125
1125
|
//#region src/components/composed/user-avatar.tsx
|
|
1126
|
-
function
|
|
1126
|
+
function cn(e) {
|
|
1127
1127
|
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
1128
1128
|
return t.length === 0 ? "" : ((t[0]?.[0] ?? "") + (t.length > 1 ? t.at(-1)?.[0] ?? "" : "")).toUpperCase();
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
let [l, u] =
|
|
1132
|
-
return /* @__PURE__ */ a(
|
|
1130
|
+
function ln({ src: e, name: t = "", initials: n, alt: r, loading: o, className: s, ...c }) {
|
|
1131
|
+
let [l, u] = P.useState("idle"), d = o ?? (e !== void 0 && (l === "idle" || l === "loading"));
|
|
1132
|
+
return /* @__PURE__ */ a(Pe, {
|
|
1133
1133
|
className: K("size-8", s),
|
|
1134
1134
|
"data-loading": d || void 0,
|
|
1135
1135
|
"data-slot": "user-avatar",
|
|
1136
1136
|
...c,
|
|
1137
|
-
children: [e === void 0 || o === !0 ? null : /* @__PURE__ */ i(
|
|
1137
|
+
children: [e === void 0 || o === !0 ? null : /* @__PURE__ */ i(Fe, {
|
|
1138
1138
|
alt: r ?? t,
|
|
1139
1139
|
onLoadingStatusChange: u,
|
|
1140
1140
|
src: e
|
|
1141
|
-
}), /* @__PURE__ */ i(
|
|
1141
|
+
}), /* @__PURE__ */ i(Ie, { children: d ? /* @__PURE__ */ i(Zt, {
|
|
1142
1142
|
className: "size-full rounded-full",
|
|
1143
1143
|
"data-slot": "avatar-skeleton"
|
|
1144
|
-
}) : n ??
|
|
1144
|
+
}) : n ?? cn(t) })]
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
1147
1147
|
//#endregion
|
|
1148
1148
|
//#region src/lib/auth-accent.ts
|
|
1149
|
-
var
|
|
1149
|
+
var un = {
|
|
1150
1150
|
corpora: {
|
|
1151
1151
|
"--auth-accent": "#E8B124",
|
|
1152
1152
|
"--auth-accent-image": "none",
|
|
@@ -1157,38 +1157,38 @@ var nn = {
|
|
|
1157
1157
|
"--auth-accent-image": "linear-gradient(44deg in oklab, rgba(29,0,202,0.66) 3%, #3B0080 37%, rgba(36,0,72,0.86) 98%)",
|
|
1158
1158
|
"--auth-accent-foreground": "oklch(0.985 0 0)"
|
|
1159
1159
|
}
|
|
1160
|
-
},
|
|
1160
|
+
}, dn = "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]", X = [
|
|
1161
1161
|
.22,
|
|
1162
1162
|
1,
|
|
1163
1163
|
.36,
|
|
1164
1164
|
1
|
|
1165
1165
|
];
|
|
1166
|
-
function
|
|
1167
|
-
return /* @__PURE__ */ i(
|
|
1166
|
+
function fn({ title: e, description: t, children: n, footer: r, className: o, logo: s, accent: c }) {
|
|
1167
|
+
return /* @__PURE__ */ i(Ce, {
|
|
1168
1168
|
reducedMotion: "user",
|
|
1169
|
-
children: /* @__PURE__ */ i(
|
|
1169
|
+
children: /* @__PURE__ */ i(ht, {
|
|
1170
1170
|
className: K("w-full max-w-sm", o),
|
|
1171
1171
|
"data-accent": c,
|
|
1172
|
-
style: c ?
|
|
1173
|
-
children: /* @__PURE__ */ a(
|
|
1172
|
+
style: c ? un[c] : void 0,
|
|
1173
|
+
children: /* @__PURE__ */ a(W.div, {
|
|
1174
1174
|
layout: !0,
|
|
1175
1175
|
transition: {
|
|
1176
1176
|
duration: .3,
|
|
1177
1177
|
ease: X
|
|
1178
1178
|
},
|
|
1179
1179
|
className: "flex flex-col",
|
|
1180
|
-
children: [/* @__PURE__ */ a(
|
|
1180
|
+
children: [/* @__PURE__ */ a(qe, { children: [/* @__PURE__ */ a(et, { children: [
|
|
1181
1181
|
s && /* @__PURE__ */ i("div", {
|
|
1182
1182
|
className: "mb-1.5 flex items-center [&_img:not([class*='h-'])]:h-8 [&_img]:w-auto [&_svg:not([class*='size-'])]:size-8",
|
|
1183
1183
|
"data-slot": "auth-logo",
|
|
1184
1184
|
children: s
|
|
1185
1185
|
}),
|
|
1186
|
-
/* @__PURE__ */ i(
|
|
1187
|
-
t && /* @__PURE__ */ i(
|
|
1188
|
-
] }), /* @__PURE__ */ i(
|
|
1186
|
+
/* @__PURE__ */ i(tt, { children: e }),
|
|
1187
|
+
t && /* @__PURE__ */ i(nt, { children: t })
|
|
1188
|
+
] }), /* @__PURE__ */ i(it, {
|
|
1189
1189
|
className: "overflow-hidden",
|
|
1190
1190
|
children: n
|
|
1191
|
-
})] }), r && /* @__PURE__ */ i(
|
|
1191
|
+
})] }), r && /* @__PURE__ */ i(bt, {
|
|
1192
1192
|
className: "text-center text-sm text-muted-foreground",
|
|
1193
1193
|
children: r
|
|
1194
1194
|
})]
|
|
@@ -1196,11 +1196,11 @@ function an({ title: e, description: t, children: n, footer: r, className: o, lo
|
|
|
1196
1196
|
})
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return /* @__PURE__ */ i(
|
|
1199
|
+
function pn({ step: e, children: t, className: n }) {
|
|
1200
|
+
return /* @__PURE__ */ i(U, {
|
|
1201
1201
|
mode: "popLayout",
|
|
1202
1202
|
initial: !1,
|
|
1203
|
-
children: /* @__PURE__ */ i(
|
|
1203
|
+
children: /* @__PURE__ */ i(W.div, {
|
|
1204
1204
|
className: n,
|
|
1205
1205
|
initial: {
|
|
1206
1206
|
opacity: 0,
|
|
@@ -1226,16 +1226,16 @@ function on({ step: e, children: t, className: n }) {
|
|
|
1226
1226
|
});
|
|
1227
1227
|
}
|
|
1228
1228
|
function Z({ show: e, children: t, className: n }) {
|
|
1229
|
-
let [r, a] =
|
|
1229
|
+
let [r, a] = P.useState({
|
|
1230
1230
|
show: e,
|
|
1231
1231
|
settled: e
|
|
1232
1232
|
});
|
|
1233
1233
|
return r.show !== e && a({
|
|
1234
1234
|
show: e,
|
|
1235
1235
|
settled: !1
|
|
1236
|
-
}), /* @__PURE__ */ i(
|
|
1236
|
+
}), /* @__PURE__ */ i(U, {
|
|
1237
1237
|
initial: !1,
|
|
1238
|
-
children: e && /* @__PURE__ */ i(
|
|
1238
|
+
children: e && /* @__PURE__ */ i(W.div, {
|
|
1239
1239
|
className: K(!r.settled && "overflow-hidden", n),
|
|
1240
1240
|
initial: {
|
|
1241
1241
|
height: 0,
|
|
@@ -1268,9 +1268,9 @@ function Z({ show: e, children: t, className: n }) {
|
|
|
1268
1268
|
});
|
|
1269
1269
|
}
|
|
1270
1270
|
function Q({ message: e }) {
|
|
1271
|
-
return /* @__PURE__ */ i(
|
|
1271
|
+
return /* @__PURE__ */ i(U, {
|
|
1272
1272
|
initial: !1,
|
|
1273
|
-
children: e && /* @__PURE__ */ i(
|
|
1273
|
+
children: e && /* @__PURE__ */ i(W.p, {
|
|
1274
1274
|
role: "alert",
|
|
1275
1275
|
className: "text-sm text-destructive-foreground",
|
|
1276
1276
|
initial: {
|
|
@@ -1305,11 +1305,11 @@ function Q({ message: e }) {
|
|
|
1305
1305
|
}, e)
|
|
1306
1306
|
});
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function mn({ title: e, description: t, children: n }) {
|
|
1309
1309
|
return /* @__PURE__ */ a("div", {
|
|
1310
1310
|
className: "flex flex-col items-center gap-3 py-4 text-center",
|
|
1311
1311
|
children: [
|
|
1312
|
-
/* @__PURE__ */ i(
|
|
1312
|
+
/* @__PURE__ */ i(W.span, {
|
|
1313
1313
|
className: "flex size-12 items-center justify-center rounded-full bg-emerald-500/12 text-emerald-600",
|
|
1314
1314
|
initial: {
|
|
1315
1315
|
scale: .6,
|
|
@@ -1332,7 +1332,7 @@ function sn({ title: e, description: t, children: n }) {
|
|
|
1332
1332
|
strokeWidth: "2.5",
|
|
1333
1333
|
strokeLinecap: "round",
|
|
1334
1334
|
strokeLinejoin: "round",
|
|
1335
|
-
children: /* @__PURE__ */ i(
|
|
1335
|
+
children: /* @__PURE__ */ i(W.path, {
|
|
1336
1336
|
d: "M4 12.5l5 5L20 6.5",
|
|
1337
1337
|
initial: { pathLength: 0 },
|
|
1338
1338
|
animate: { pathLength: 1 },
|
|
@@ -1358,21 +1358,21 @@ function sn({ title: e, description: t, children: n }) {
|
|
|
1358
1358
|
]
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function hn({ label: e = "Or" }) {
|
|
1362
1362
|
return /* @__PURE__ */ a("div", {
|
|
1363
1363
|
className: "flex items-center gap-3",
|
|
1364
1364
|
children: [
|
|
1365
|
-
/* @__PURE__ */ i(
|
|
1365
|
+
/* @__PURE__ */ i(qt, { className: "flex-1" }),
|
|
1366
1366
|
/* @__PURE__ */ i("span", {
|
|
1367
1367
|
className: "text-xs text-muted-foreground uppercase",
|
|
1368
1368
|
children: e
|
|
1369
1369
|
}),
|
|
1370
|
-
/* @__PURE__ */ i(
|
|
1370
|
+
/* @__PURE__ */ i(qt, { className: "flex-1" })
|
|
1371
1371
|
]
|
|
1372
1372
|
});
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
let [n, r] =
|
|
1374
|
+
function gn(e, t) {
|
|
1375
|
+
let [n, r] = P.useState({
|
|
1376
1376
|
restartKey: t,
|
|
1377
1377
|
seconds: e,
|
|
1378
1378
|
remaining: e
|
|
@@ -1381,7 +1381,7 @@ function ln(e, t) {
|
|
|
1381
1381
|
restartKey: t,
|
|
1382
1382
|
seconds: e,
|
|
1383
1383
|
remaining: e
|
|
1384
|
-
}),
|
|
1384
|
+
}), P.useEffect(() => {
|
|
1385
1385
|
if (e <= 0) return;
|
|
1386
1386
|
let t = window.setInterval(() => {
|
|
1387
1387
|
r((e) => e.remaining <= 0 ? e : {
|
|
@@ -1394,8 +1394,8 @@ function ln(e, t) {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
//#endregion
|
|
1396
1396
|
//#region src/components/blocks/auth/code-auth-block.tsx
|
|
1397
|
-
function
|
|
1398
|
-
let [p, m] =
|
|
1397
|
+
function _n({ channel: e = "email", logo: t, accent: n, destination: o, length: s = 6, autoSubmit: c = !0, resendSeconds: l = 30, onVerify: u, onResend: d, onBack: f }) {
|
|
1398
|
+
let [p, m] = P.useState("idle"), [h, g] = P.useState(null), [_, v] = P.useState(""), [y, b] = P.useState(0), x = gn(l, y), S = e === "sms" ? M : D, C = e === "sms" ? "phone" : "email", w = P.useCallback(async (e) => {
|
|
1399
1399
|
g(null), m("loading");
|
|
1400
1400
|
try {
|
|
1401
1401
|
await u?.(e), m("success");
|
|
@@ -1403,13 +1403,13 @@ function un({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
1403
1403
|
m("idle"), v(""), g(e instanceof Error ? e.message : "Invalid code.");
|
|
1404
1404
|
}
|
|
1405
1405
|
}, [u]);
|
|
1406
|
-
function
|
|
1407
|
-
v(e), h && g(null), c && e.length === s && p === "idle" &&
|
|
1406
|
+
function T(e) {
|
|
1407
|
+
v(e), h && g(null), c && e.length === s && p === "idle" && w(e);
|
|
1408
1408
|
}
|
|
1409
|
-
async function
|
|
1409
|
+
async function E() {
|
|
1410
1410
|
b((e) => e + 1), v(""), g(null), await d?.();
|
|
1411
1411
|
}
|
|
1412
|
-
return /* @__PURE__ */ i(
|
|
1412
|
+
return /* @__PURE__ */ i(fn, {
|
|
1413
1413
|
title: "Enter verification code",
|
|
1414
1414
|
logo: t,
|
|
1415
1415
|
accent: n,
|
|
@@ -1432,15 +1432,15 @@ function un({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
1432
1432
|
onClick: f,
|
|
1433
1433
|
children: ["Use a different ", C]
|
|
1434
1434
|
}),
|
|
1435
|
-
children: /* @__PURE__ */ i(
|
|
1435
|
+
children: /* @__PURE__ */ i(pn, {
|
|
1436
1436
|
step: p === "success" ? "success" : "form",
|
|
1437
|
-
children: p === "success" ? /* @__PURE__ */ i(
|
|
1437
|
+
children: p === "success" ? /* @__PURE__ */ i(mn, {
|
|
1438
1438
|
title: "Verified",
|
|
1439
1439
|
description: "Your identity has been confirmed."
|
|
1440
1440
|
}) : /* @__PURE__ */ a("div", {
|
|
1441
1441
|
className: "flex flex-col items-center gap-4",
|
|
1442
1442
|
children: [
|
|
1443
|
-
/* @__PURE__ */ i(
|
|
1443
|
+
/* @__PURE__ */ i(W.div, {
|
|
1444
1444
|
animate: h ? { x: [
|
|
1445
1445
|
0,
|
|
1446
1446
|
-8,
|
|
@@ -1453,12 +1453,12 @@ function un({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
1453
1453
|
duration: .4,
|
|
1454
1454
|
ease: "easeInOut"
|
|
1455
1455
|
},
|
|
1456
|
-
children: /* @__PURE__ */ i(
|
|
1456
|
+
children: /* @__PURE__ */ i(Jt, {
|
|
1457
1457
|
length: s,
|
|
1458
1458
|
value: _,
|
|
1459
|
-
onValueChange:
|
|
1459
|
+
onValueChange: T,
|
|
1460
1460
|
disabled: p === "loading",
|
|
1461
|
-
children: Array.from({ length: s }, (e, t) => /* @__PURE__ */ i(
|
|
1461
|
+
children: Array.from({ length: s }, (e, t) => /* @__PURE__ */ i(Yt, {
|
|
1462
1462
|
"aria-invalid": h ? !0 : void 0,
|
|
1463
1463
|
"aria-label": `Digit ${t + 1} of ${s}`
|
|
1464
1464
|
}, `slot-${t}`))
|
|
@@ -1469,10 +1469,10 @@ function un({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
1469
1469
|
className: K("w-full", n && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
|
|
1470
1470
|
loading: p === "loading",
|
|
1471
1471
|
disabled: _.length !== s,
|
|
1472
|
-
onClick: () => void
|
|
1472
|
+
onClick: () => void w(_),
|
|
1473
1473
|
children: "Verify"
|
|
1474
1474
|
}),
|
|
1475
|
-
/* @__PURE__ */ i(
|
|
1475
|
+
/* @__PURE__ */ i(W.p, {
|
|
1476
1476
|
layout: !0,
|
|
1477
1477
|
transition: {
|
|
1478
1478
|
duration: .25,
|
|
@@ -1489,7 +1489,7 @@ function un({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
1489
1489
|
] }) : /* @__PURE__ */ i(q, {
|
|
1490
1490
|
variant: "link",
|
|
1491
1491
|
disabled: p === "loading",
|
|
1492
|
-
onClick: () => void
|
|
1492
|
+
onClick: () => void E(),
|
|
1493
1493
|
children: "Resend code"
|
|
1494
1494
|
})
|
|
1495
1495
|
})
|
|
@@ -1500,8 +1500,8 @@ function un({ channel: e = "email", logo: t, accent: n, destination: o, length:
|
|
|
1500
1500
|
}
|
|
1501
1501
|
//#endregion
|
|
1502
1502
|
//#region src/components/blocks/auth/forgot-password-block.tsx
|
|
1503
|
-
function
|
|
1504
|
-
let u =
|
|
1503
|
+
function vn({ title: e = "Reset your password", logo: t, accent: n, description: o = "Enter your email and we will send you a reset link", onSubmit: s, onBackToLogin: c }) {
|
|
1504
|
+
let u = P.useId(), [d, f] = P.useState("idle"), [p, m] = P.useState(null), [h, g] = P.useState("");
|
|
1505
1505
|
async function _(e) {
|
|
1506
1506
|
e.preventDefault(), m(null), f("loading");
|
|
1507
1507
|
try {
|
|
@@ -1510,7 +1510,7 @@ function dn({ title: e = "Reset your password", logo: t, accent: n, description:
|
|
|
1510
1510
|
f("idle"), m(e instanceof Error ? e.message : "Unable to send reset link.");
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
-
return /* @__PURE__ */ i(
|
|
1513
|
+
return /* @__PURE__ */ i(fn, {
|
|
1514
1514
|
title: e,
|
|
1515
1515
|
description: o,
|
|
1516
1516
|
logo: t,
|
|
@@ -1521,9 +1521,9 @@ function dn({ title: e = "Reset your password", logo: t, accent: n, description:
|
|
|
1521
1521
|
onClick: c,
|
|
1522
1522
|
children: [/* @__PURE__ */ i(l, { className: "size-3.5" }), "Back to login"]
|
|
1523
1523
|
}),
|
|
1524
|
-
children: /* @__PURE__ */ i(
|
|
1524
|
+
children: /* @__PURE__ */ i(pn, {
|
|
1525
1525
|
step: d === "success" ? "success" : "form",
|
|
1526
|
-
children: d === "success" ? /* @__PURE__ */ i(
|
|
1526
|
+
children: d === "success" ? /* @__PURE__ */ i(mn, {
|
|
1527
1527
|
title: "Check your inbox",
|
|
1528
1528
|
description: /* @__PURE__ */ a(r, { children: [
|
|
1529
1529
|
"We sent a password reset link to",
|
|
@@ -1549,7 +1549,7 @@ function dn({ title: e = "Reset your password", logo: t, accent: n, description:
|
|
|
1549
1549
|
children: [/* @__PURE__ */ i(Y, {
|
|
1550
1550
|
htmlFor: u,
|
|
1551
1551
|
children: "Email"
|
|
1552
|
-
}), /* @__PURE__ */ i(
|
|
1552
|
+
}), /* @__PURE__ */ i(xt, {
|
|
1553
1553
|
id: u,
|
|
1554
1554
|
name: "email",
|
|
1555
1555
|
type: "email",
|
|
@@ -1575,13 +1575,13 @@ function dn({ title: e = "Reset your password", logo: t, accent: n, description:
|
|
|
1575
1575
|
}
|
|
1576
1576
|
//#endregion
|
|
1577
1577
|
//#region src/components/blocks/auth/linked-accounts-block.tsx
|
|
1578
|
-
var
|
|
1579
|
-
function
|
|
1578
|
+
var yn = "This is your only way to sign in, so it can't be disconnected.";
|
|
1579
|
+
function bn({ title: e = "Connected accounts", description: t = "Manage the accounts you can use to sign in.", identities: n = [], providers: r = [
|
|
1580
1580
|
"google",
|
|
1581
1581
|
"apple",
|
|
1582
1582
|
"github"
|
|
1583
1583
|
], loading: o = !1, hasOtherSignInMethods: s = !1, onLink: c, onUnlink: l, className: u }) {
|
|
1584
|
-
let d =
|
|
1584
|
+
let d = P.useId(), [f, p] = P.useState(null), [m, h] = P.useState(null), [g, _] = P.useState(null), v = new Set(n.map((e) => e.provider)), y = r.filter((e) => !v.has(e)), b = m !== null || g !== null, x = !s && n.length <= 1;
|
|
1585
1585
|
async function S(e) {
|
|
1586
1586
|
if (!b) {
|
|
1587
1587
|
p(null), h(e);
|
|
@@ -1606,15 +1606,15 @@ function pn({ title: e = "Connected accounts", description: t = "Manage the acco
|
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
return /* @__PURE__ */ i(
|
|
1609
|
+
return /* @__PURE__ */ i(Ce, {
|
|
1610
1610
|
reducedMotion: "user",
|
|
1611
|
-
children: /* @__PURE__ */ a(
|
|
1611
|
+
children: /* @__PURE__ */ a(qe, {
|
|
1612
1612
|
className: K("w-full", u),
|
|
1613
1613
|
"data-slot": "auth-block",
|
|
1614
|
-
children: [/* @__PURE__ */ a(
|
|
1614
|
+
children: [/* @__PURE__ */ a(et, { children: [/* @__PURE__ */ i(tt, { children: e }), /* @__PURE__ */ i(nt, { children: t })] }), /* @__PURE__ */ i(it, { children: o ? /* @__PURE__ */ a("div", {
|
|
1615
1615
|
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
1616
|
-
children: [/* @__PURE__ */ i(
|
|
1617
|
-
}) : /* @__PURE__ */ a(
|
|
1616
|
+
children: [/* @__PURE__ */ i(Le, { className: "size-4" }), "Loading connected accounts…"]
|
|
1617
|
+
}) : /* @__PURE__ */ a(W.div, {
|
|
1618
1618
|
layout: !0,
|
|
1619
1619
|
transition: {
|
|
1620
1620
|
duration: .3,
|
|
@@ -1626,11 +1626,11 @@ function pn({ title: e = "Connected accounts", description: t = "Manage the acco
|
|
|
1626
1626
|
n.length > 0 ? /* @__PURE__ */ i("ul", {
|
|
1627
1627
|
"aria-label": "Connected accounts",
|
|
1628
1628
|
className: "flex flex-col gap-2",
|
|
1629
|
-
children: /* @__PURE__ */ i(
|
|
1629
|
+
children: /* @__PURE__ */ i(U, {
|
|
1630
1630
|
initial: !1,
|
|
1631
1631
|
children: n.map((e, t) => {
|
|
1632
|
-
let { label: n, BrandIcon: r, brandClassName: o } =
|
|
1633
|
-
return /* @__PURE__ */ a(
|
|
1632
|
+
let { label: n, BrandIcon: r, brandClassName: o } = an[e.provider];
|
|
1633
|
+
return /* @__PURE__ */ a(W.li, {
|
|
1634
1634
|
layout: !0,
|
|
1635
1635
|
className: "flex items-center justify-between gap-3 rounded-lg border px-3 py-2",
|
|
1636
1636
|
initial: {
|
|
@@ -1686,10 +1686,10 @@ function pn({ title: e = "Connected accounts", description: t = "Manage the acco
|
|
|
1686
1686
|
x && n.length > 0 && /* @__PURE__ */ i("p", {
|
|
1687
1687
|
className: "text-xs text-muted-foreground",
|
|
1688
1688
|
id: d,
|
|
1689
|
-
children:
|
|
1689
|
+
children: yn
|
|
1690
1690
|
}),
|
|
1691
1691
|
y.map((e) => {
|
|
1692
|
-
let { label: t, BrandIcon: n, brandClassName: r } =
|
|
1692
|
+
let { label: t, BrandIcon: n, brandClassName: r } = an[e];
|
|
1693
1693
|
return /* @__PURE__ */ a(q, {
|
|
1694
1694
|
className: "w-full",
|
|
1695
1695
|
type: "button",
|
|
@@ -1713,14 +1713,14 @@ function pn({ title: e = "Connected accounts", description: t = "Manage the acco
|
|
|
1713
1713
|
}
|
|
1714
1714
|
//#endregion
|
|
1715
1715
|
//#region src/components/blocks/auth/login-block.tsx
|
|
1716
|
-
function
|
|
1716
|
+
function xn({ title: e = "Login to your account", description: t = "Enter your email and password to login", logo: n, accent: o, providers: s = [
|
|
1717
1717
|
"google",
|
|
1718
1718
|
"apple",
|
|
1719
1719
|
"github"
|
|
1720
1720
|
], showRememberMe: c = !0, showForgotPassword: l = !0, onSubmit: u, onProviderSelect: d, onForgotPassword: f, onSignup: p }) {
|
|
1721
|
-
let m =
|
|
1722
|
-
async function
|
|
1723
|
-
if (e.preventDefault(), !
|
|
1721
|
+
let m = P.useId(), h = P.useId(), [g, _] = P.useState("idle"), [v, y] = P.useState(null), [b, x] = P.useState(null), [S, C] = P.useState(!1), [w, T] = P.useState(""), [E, D] = P.useState(!1), [O, k] = P.useState(""), A = g === "loading" || b !== null, j = O.trim().length > 0, M = E && j;
|
|
1722
|
+
async function N(e) {
|
|
1723
|
+
if (e.preventDefault(), !M) return;
|
|
1724
1724
|
let t = new FormData(e.currentTarget);
|
|
1725
1725
|
y(null), _("loading");
|
|
1726
1726
|
try {
|
|
@@ -1733,7 +1733,7 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1733
1733
|
_("idle"), y(e instanceof Error ? e.message : "Unable to login.");
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
async function
|
|
1736
|
+
async function ee(e) {
|
|
1737
1737
|
y(null), x(e);
|
|
1738
1738
|
try {
|
|
1739
1739
|
await d?.(e), _("success");
|
|
@@ -1743,7 +1743,7 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1743
1743
|
x(null);
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
|
-
return /* @__PURE__ */ i(
|
|
1746
|
+
return /* @__PURE__ */ i(fn, {
|
|
1747
1747
|
title: e,
|
|
1748
1748
|
description: t,
|
|
1749
1749
|
logo: n,
|
|
@@ -1757,23 +1757,23 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1757
1757
|
children: "Sign up"
|
|
1758
1758
|
})
|
|
1759
1759
|
] }),
|
|
1760
|
-
children: /* @__PURE__ */ i(
|
|
1760
|
+
children: /* @__PURE__ */ i(pn, {
|
|
1761
1761
|
step: g === "success" ? "success" : "form",
|
|
1762
|
-
children: g === "success" ? /* @__PURE__ */ i(
|
|
1762
|
+
children: g === "success" ? /* @__PURE__ */ i(mn, {
|
|
1763
1763
|
title: "Welcome back",
|
|
1764
1764
|
description: "You are now logged in."
|
|
1765
1765
|
}) : /* @__PURE__ */ a("div", {
|
|
1766
1766
|
className: "flex flex-col gap-4",
|
|
1767
1767
|
children: [/* @__PURE__ */ a("form", {
|
|
1768
1768
|
className: "flex flex-col gap-4",
|
|
1769
|
-
onSubmit:
|
|
1769
|
+
onSubmit: N,
|
|
1770
1770
|
children: [
|
|
1771
1771
|
/* @__PURE__ */ a(J, {
|
|
1772
1772
|
name: "email",
|
|
1773
1773
|
children: [/* @__PURE__ */ i(Y, {
|
|
1774
1774
|
htmlFor: m,
|
|
1775
1775
|
children: "Email"
|
|
1776
|
-
}), /* @__PURE__ */ i(
|
|
1776
|
+
}), /* @__PURE__ */ i(xt, {
|
|
1777
1777
|
id: m,
|
|
1778
1778
|
"aria-label": "Email",
|
|
1779
1779
|
name: "email",
|
|
@@ -1797,7 +1797,7 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1797
1797
|
htmlFor: "password",
|
|
1798
1798
|
children: "Password"
|
|
1799
1799
|
}),
|
|
1800
|
-
/* @__PURE__ */ i(
|
|
1800
|
+
/* @__PURE__ */ i(nn, {
|
|
1801
1801
|
id: "password",
|
|
1802
1802
|
name: "password",
|
|
1803
1803
|
autoComplete: "current-password",
|
|
@@ -1818,12 +1818,12 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1818
1818
|
}),
|
|
1819
1819
|
c && /* @__PURE__ */ a("div", {
|
|
1820
1820
|
className: "flex items-center gap-2",
|
|
1821
|
-
children: [/* @__PURE__ */ i(
|
|
1821
|
+
children: [/* @__PURE__ */ i(lt, {
|
|
1822
1822
|
id: h,
|
|
1823
1823
|
checked: S,
|
|
1824
1824
|
onCheckedChange: (e) => C(e),
|
|
1825
1825
|
disabled: A
|
|
1826
|
-
}), /* @__PURE__ */ i(
|
|
1826
|
+
}), /* @__PURE__ */ i(kt, {
|
|
1827
1827
|
htmlFor: h,
|
|
1828
1828
|
className: "font-normal",
|
|
1829
1829
|
children: "Remember me"
|
|
@@ -1831,7 +1831,7 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1831
1831
|
}),
|
|
1832
1832
|
/* @__PURE__ */ i(Q, { message: v }),
|
|
1833
1833
|
/* @__PURE__ */ i(Z, {
|
|
1834
|
-
show:
|
|
1834
|
+
show: M,
|
|
1835
1835
|
children: /* @__PURE__ */ i(q, {
|
|
1836
1836
|
className: K("w-full", o && "border-transparent bg-[var(--auth-accent)] bg-[image:var(--auth-accent-image)] text-[var(--auth-accent-foreground)] shadow-none hover:bg-[var(--auth-accent)] hover:brightness-110 data-pressed:bg-[var(--auth-accent)] data-pressed:brightness-110 *:data-[slot=button-loading-indicator]:text-[var(--auth-accent-foreground)]"),
|
|
1837
1837
|
type: "submit",
|
|
@@ -1842,14 +1842,14 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1842
1842
|
})
|
|
1843
1843
|
]
|
|
1844
1844
|
}), s.length > 0 && /* @__PURE__ */ a(Z, {
|
|
1845
|
-
show: !
|
|
1845
|
+
show: !M,
|
|
1846
1846
|
className: "flex flex-col gap-4",
|
|
1847
|
-
children: [/* @__PURE__ */ i(
|
|
1847
|
+
children: [/* @__PURE__ */ i(hn, { label: "Or continue with" }), /* @__PURE__ */ i(sn, {
|
|
1848
1848
|
providers: s,
|
|
1849
1849
|
action: "login",
|
|
1850
1850
|
loadingProvider: b,
|
|
1851
1851
|
disabled: g === "loading",
|
|
1852
|
-
onSelect:
|
|
1852
|
+
onSelect: ee
|
|
1853
1853
|
})]
|
|
1854
1854
|
})]
|
|
1855
1855
|
})
|
|
@@ -1858,10 +1858,10 @@ function mn({ title: e = "Login to your account", description: t = "Enter your e
|
|
|
1858
1858
|
}
|
|
1859
1859
|
//#endregion
|
|
1860
1860
|
//#region src/components/blocks/auth/onboarding/profile-step.tsx
|
|
1861
|
-
function
|
|
1861
|
+
function Sn(e, t) {
|
|
1862
1862
|
return e.kind === "checkbox" ? typeof t == "boolean" && t : typeof t == "string" ? t : "";
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1864
|
+
function Cn(e, t) {
|
|
1865
1865
|
let n = e.required === !0;
|
|
1866
1866
|
if (e.kind === "checkbox") return n && t !== !0 ? `${e.label} is required` : null;
|
|
1867
1867
|
let r = typeof t == "string" ? t.trim() : "";
|
|
@@ -1873,8 +1873,8 @@ function gn(e, t) {
|
|
|
1873
1873
|
}
|
|
1874
1874
|
return e.kind === "select" && r.length > 0 && !e.options.map((e) => e.value).includes(r) ? `Choose a valid option for ${e.label}` : e.validate?.(r) ?? null;
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1877
|
-
let l =
|
|
1876
|
+
function wn({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit: o, onBack: s, onDraftChange: c }) {
|
|
1877
|
+
let l = P.useId(), [u, d] = P.useState(() => Object.fromEntries(e.fields.map((e) => [e.name, Sn(e, t[e.name])]))), [f, p] = P.useState({});
|
|
1878
1878
|
function m(e, t) {
|
|
1879
1879
|
d((n) => ({
|
|
1880
1880
|
...n,
|
|
@@ -1888,7 +1888,7 @@ function _n({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
1888
1888
|
if (t.preventDefault(), n) return;
|
|
1889
1889
|
let r = {};
|
|
1890
1890
|
for (let t of e.fields) {
|
|
1891
|
-
let e =
|
|
1891
|
+
let e = Cn(t, u[t.name]);
|
|
1892
1892
|
e && (r[t.name] = e);
|
|
1893
1893
|
}
|
|
1894
1894
|
if (Object.keys(r).length > 0) {
|
|
@@ -1915,17 +1915,17 @@ function _n({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
1915
1915
|
className: "gap-1.5",
|
|
1916
1916
|
children: [/* @__PURE__ */ a("div", {
|
|
1917
1917
|
className: "flex items-center gap-2",
|
|
1918
|
-
children: [/* @__PURE__ */ i(
|
|
1918
|
+
children: [/* @__PURE__ */ i(lt, {
|
|
1919
1919
|
id: r,
|
|
1920
1920
|
checked: o === !0,
|
|
1921
1921
|
disabled: n,
|
|
1922
1922
|
onCheckedChange: (t) => m(e.name, t)
|
|
1923
|
-
}), /* @__PURE__ */ i(
|
|
1923
|
+
}), /* @__PURE__ */ i(kt, {
|
|
1924
1924
|
htmlFor: r,
|
|
1925
1925
|
className: "font-normal",
|
|
1926
1926
|
children: e.label
|
|
1927
1927
|
})]
|
|
1928
|
-
}), t && /* @__PURE__ */ i(
|
|
1928
|
+
}), t && /* @__PURE__ */ i(ft, {
|
|
1929
1929
|
match: !0,
|
|
1930
1930
|
children: t
|
|
1931
1931
|
})]
|
|
@@ -1937,7 +1937,7 @@ function _n({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
1937
1937
|
htmlFor: r,
|
|
1938
1938
|
children: e.label
|
|
1939
1939
|
}),
|
|
1940
|
-
e.kind === "textarea" ? /* @__PURE__ */ i(
|
|
1940
|
+
e.kind === "textarea" ? /* @__PURE__ */ i(St, {
|
|
1941
1941
|
id: r,
|
|
1942
1942
|
"aria-invalid": t ? !0 : void 0,
|
|
1943
1943
|
disabled: n,
|
|
@@ -1958,7 +1958,7 @@ function _n({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
1958
1958
|
value: e.value,
|
|
1959
1959
|
children: e.label
|
|
1960
1960
|
}, e.value))]
|
|
1961
|
-
}) : /* @__PURE__ */ i(
|
|
1961
|
+
}) : /* @__PURE__ */ i(xt, {
|
|
1962
1962
|
id: r,
|
|
1963
1963
|
"aria-invalid": t ? !0 : void 0,
|
|
1964
1964
|
disabled: n,
|
|
@@ -1967,7 +1967,7 @@ function _n({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
1967
1967
|
value: String(o ?? ""),
|
|
1968
1968
|
onChange: (t) => m(e.name, t.target.value)
|
|
1969
1969
|
}),
|
|
1970
|
-
t && /* @__PURE__ */ i(
|
|
1970
|
+
t && /* @__PURE__ */ i(ft, {
|
|
1971
1971
|
match: !0,
|
|
1972
1972
|
children: t
|
|
1973
1973
|
})
|
|
@@ -1992,7 +1992,7 @@ function _n({ step: e, values: t, submitting: n = !1, submitLabel: r, onSubmit:
|
|
|
1992
1992
|
}
|
|
1993
1993
|
//#endregion
|
|
1994
1994
|
//#region src/components/blocks/auth/onboarding-block.tsx
|
|
1995
|
-
var
|
|
1995
|
+
var Tn = [{
|
|
1996
1996
|
id: "profile",
|
|
1997
1997
|
title: "Your profile",
|
|
1998
1998
|
fields: [{
|
|
@@ -2002,9 +2002,9 @@ var vn = [{
|
|
|
2002
2002
|
required: !0
|
|
2003
2003
|
}]
|
|
2004
2004
|
}];
|
|
2005
|
-
function
|
|
2006
|
-
let l =
|
|
2007
|
-
|
|
2005
|
+
function En({ steps: e = Tn, logo: t, accent: n, onStepSubmit: r, onComplete: o, showCompleteScreen: s = !0, className: c }) {
|
|
2006
|
+
let l = P.useRef(null), u = P.useRef({}), [d, f] = P.useState({}), [p, m] = P.useState(0), [h, g] = P.useState({}), [_, v] = P.useState("idle"), [y, b] = P.useState(null), x = _ === "success", S = e[p], C = p >= e.length - 1;
|
|
2007
|
+
P.useEffect(() => {
|
|
2008
2008
|
y || l.current?.focus();
|
|
2009
2009
|
}, [
|
|
2010
2010
|
p,
|
|
@@ -2024,15 +2024,15 @@ function yn({ steps: e = vn, logo: t, accent: n, onStepSubmit: r, onComplete: o,
|
|
|
2024
2024
|
v("idle"), b(e instanceof Error ? e.message : "Unable to save your profile.");
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
return x && !s ? null : /* @__PURE__ */ i(
|
|
2027
|
+
return x && !s ? null : /* @__PURE__ */ i(fn, {
|
|
2028
2028
|
title: x ? "You're all set" : S?.title ?? "Your profile",
|
|
2029
2029
|
description: x ? void 0 : S?.description,
|
|
2030
2030
|
logo: t,
|
|
2031
2031
|
accent: n,
|
|
2032
2032
|
className: c,
|
|
2033
|
-
children: /* @__PURE__ */ i(
|
|
2033
|
+
children: /* @__PURE__ */ i(pn, {
|
|
2034
2034
|
step: x ? "done" : `step-${p}`,
|
|
2035
|
-
children: x ? /* @__PURE__ */ i(
|
|
2035
|
+
children: x ? /* @__PURE__ */ i(mn, {
|
|
2036
2036
|
title: "Profile saved",
|
|
2037
2037
|
description: "Your account is ready and your profile has been saved."
|
|
2038
2038
|
}) : S ? /* @__PURE__ */ a("div", {
|
|
@@ -2059,7 +2059,7 @@ function yn({ steps: e = vn, logo: t, accent: n, onStepSubmit: r, onComplete: o,
|
|
|
2059
2059
|
children: S.title
|
|
2060
2060
|
}),
|
|
2061
2061
|
/* @__PURE__ */ i(Q, { message: y }),
|
|
2062
|
-
/* @__PURE__ */ i(
|
|
2062
|
+
/* @__PURE__ */ i(wn, {
|
|
2063
2063
|
step: S,
|
|
2064
2064
|
values: {
|
|
2065
2065
|
...h,
|
|
@@ -2085,14 +2085,14 @@ function yn({ steps: e = vn, logo: t, accent: n, onStepSubmit: r, onComplete: o,
|
|
|
2085
2085
|
}
|
|
2086
2086
|
//#endregion
|
|
2087
2087
|
//#region src/components/blocks/auth/passkey-manager-block.tsx
|
|
2088
|
-
var
|
|
2089
|
-
function
|
|
2088
|
+
var Dn = 120, On = "This is your last passkey. After deleting it you won't be able to sign in with a passkey until you register a new one.";
|
|
2089
|
+
function kn(e) {
|
|
2090
2090
|
if (!e) return null;
|
|
2091
2091
|
let t = new Date(e);
|
|
2092
2092
|
return Number.isNaN(t.getTime()) ? null : t.toLocaleDateString();
|
|
2093
2093
|
}
|
|
2094
|
-
function
|
|
2095
|
-
let [d, f] =
|
|
2094
|
+
function An({ title: e = "Passkeys", description: t = "Sign in without a password using your device's biometrics or security key.", passkeys: n = [], available: r = !0, loading: o = !1, onRegister: s, onRename: c, onDelete: l, className: u }) {
|
|
2095
|
+
let [d, f] = P.useState(null), [p, m] = P.useState(!1), [h, g] = P.useState(!1), [_, v] = P.useState(null), [y, b] = P.useState(""), [S, C] = P.useState(null), [w, T] = P.useState(null), E = n.length === 1;
|
|
2096
2096
|
async function D(e) {
|
|
2097
2097
|
if (p) return { ok: !1 };
|
|
2098
2098
|
f(null), m(!0);
|
|
@@ -2115,25 +2115,25 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2115
2115
|
}
|
|
2116
2116
|
async function A(e) {
|
|
2117
2117
|
let t = y.trim();
|
|
2118
|
-
if (t.length < 1 || t.length >
|
|
2119
|
-
C(`Name must be between 1 and ${
|
|
2118
|
+
if (t.length < 1 || t.length > Dn) {
|
|
2119
|
+
C(`Name must be between 1 and ${Dn} characters.`);
|
|
2120
2120
|
return;
|
|
2121
2121
|
}
|
|
2122
2122
|
(await D(() => c?.(e, t))).ok && (v(null), C(null));
|
|
2123
2123
|
}
|
|
2124
|
-
async function
|
|
2124
|
+
async function j(e) {
|
|
2125
2125
|
let t = await D(() => l?.(e));
|
|
2126
2126
|
T(null), t.ok && _ === e && v(null);
|
|
2127
2127
|
}
|
|
2128
|
-
return /* @__PURE__ */ i(
|
|
2128
|
+
return /* @__PURE__ */ i(Ce, {
|
|
2129
2129
|
reducedMotion: "user",
|
|
2130
|
-
children: /* @__PURE__ */ a(
|
|
2130
|
+
children: /* @__PURE__ */ a(qe, {
|
|
2131
2131
|
className: K("w-full", u),
|
|
2132
2132
|
"data-slot": "auth-block",
|
|
2133
|
-
children: [/* @__PURE__ */ a(
|
|
2133
|
+
children: [/* @__PURE__ */ a(et, { children: [/* @__PURE__ */ i(tt, { children: e }), /* @__PURE__ */ i(nt, { children: t })] }), /* @__PURE__ */ i(it, { children: r ? o ? /* @__PURE__ */ a("div", {
|
|
2134
2134
|
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
2135
|
-
children: [/* @__PURE__ */ i(
|
|
2136
|
-
}) : /* @__PURE__ */ a(
|
|
2135
|
+
children: [/* @__PURE__ */ i(Le, { className: "size-4" }), "Loading passkeys…"]
|
|
2136
|
+
}) : /* @__PURE__ */ a(W.div, {
|
|
2137
2137
|
layout: !0,
|
|
2138
2138
|
transition: {
|
|
2139
2139
|
duration: .3,
|
|
@@ -2145,11 +2145,11 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2145
2145
|
n.length > 0 ? /* @__PURE__ */ i("ul", {
|
|
2146
2146
|
"aria-label": "Passkeys",
|
|
2147
2147
|
className: "flex flex-col gap-2",
|
|
2148
|
-
children: /* @__PURE__ */ i(
|
|
2148
|
+
children: /* @__PURE__ */ i(U, {
|
|
2149
2149
|
initial: !1,
|
|
2150
2150
|
children: n.map((e, t) => {
|
|
2151
|
-
let n = e.name ?? "Passkey", r =
|
|
2152
|
-
return /* @__PURE__ */ a(
|
|
2151
|
+
let n = e.name ?? "Passkey", r = kn(e.createdAt), o = kn(e.lastUsedAt);
|
|
2152
|
+
return /* @__PURE__ */ a(W.li, {
|
|
2153
2153
|
layout: !0,
|
|
2154
2154
|
className: "flex flex-col gap-2 rounded-lg border px-3 py-2",
|
|
2155
2155
|
initial: {
|
|
@@ -2231,7 +2231,7 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2231
2231
|
className: "sr-only",
|
|
2232
2232
|
children: "Passkey name"
|
|
2233
2233
|
}),
|
|
2234
|
-
/* @__PURE__ */ i(
|
|
2234
|
+
/* @__PURE__ */ i(xt, {
|
|
2235
2235
|
"aria-label": "Passkey name",
|
|
2236
2236
|
"aria-invalid": S ? !0 : void 0,
|
|
2237
2237
|
autoFocus: !0,
|
|
@@ -2240,7 +2240,7 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2240
2240
|
value: y,
|
|
2241
2241
|
onChange: (e) => b(e.target.value)
|
|
2242
2242
|
}),
|
|
2243
|
-
S && /* @__PURE__ */ i(
|
|
2243
|
+
S && /* @__PURE__ */ i(ft, {
|
|
2244
2244
|
match: !0,
|
|
2245
2245
|
children: S
|
|
2246
2246
|
})
|
|
@@ -2276,7 +2276,7 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2276
2276
|
}),
|
|
2277
2277
|
E && /* @__PURE__ */ i("p", {
|
|
2278
2278
|
className: "text-xs text-destructive-foreground",
|
|
2279
|
-
children:
|
|
2279
|
+
children: On
|
|
2280
2280
|
}),
|
|
2281
2281
|
/* @__PURE__ */ a("div", {
|
|
2282
2282
|
className: "flex gap-2",
|
|
@@ -2285,7 +2285,7 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2285
2285
|
type: "button",
|
|
2286
2286
|
variant: "destructive",
|
|
2287
2287
|
loading: p,
|
|
2288
|
-
onClick: () => void
|
|
2288
|
+
onClick: () => void j(e.id),
|
|
2289
2289
|
children: "Delete passkey"
|
|
2290
2290
|
}), /* @__PURE__ */ i(q, {
|
|
2291
2291
|
size: "sm",
|
|
@@ -2326,8 +2326,8 @@ function Cn({ title: e = "Passkeys", description: t = "Sign in without a passwor
|
|
|
2326
2326
|
}
|
|
2327
2327
|
//#endregion
|
|
2328
2328
|
//#region src/components/blocks/auth/passkey-sign-in-block.tsx
|
|
2329
|
-
function
|
|
2330
|
-
let [s, c] =
|
|
2329
|
+
function jn({ available: e = !0, label: t = "Sign in with a passkey", onSignIn: n, fallbackHint: r = "You can still sign in with your other methods below.", className: o }) {
|
|
2330
|
+
let [s, c] = P.useState(null), [l, u] = P.useState(!1);
|
|
2331
2331
|
if (!e) return null;
|
|
2332
2332
|
async function d() {
|
|
2333
2333
|
if (!l) {
|
|
@@ -2368,22 +2368,22 @@ function wn({ available: e = !0, label: t = "Sign in with a passkey", onSignIn:
|
|
|
2368
2368
|
}
|
|
2369
2369
|
//#endregion
|
|
2370
2370
|
//#region src/components/blocks/auth/signup-block.tsx
|
|
2371
|
-
function
|
|
2371
|
+
function Mn({ title: e = "Create your account", description: t = "Start exploring manuscripts in minutes", logo: n, accent: o, providers: s = [
|
|
2372
2372
|
"google",
|
|
2373
2373
|
"apple",
|
|
2374
2374
|
"github"
|
|
2375
2375
|
], showNameField: c = !0, showTerms: l = !0, termsChecked: u, defaultTermsChecked: d = !1, onTermsCheckedChange: f, enforceStrongPassword: p = !0, onSubmit: m, termsComponent: h, onProviderSelect: g, onLogin: _, onTerms: v }) {
|
|
2376
|
-
let y =
|
|
2377
|
-
function
|
|
2378
|
-
u === void 0 &&
|
|
2376
|
+
let y = P.useId(), b = P.useId(), x = P.useId(), S = P.useId(), [C, w] = P.useState("idle"), [T, E] = P.useState(null), [D, O] = P.useState(null), [k, A] = P.useState(""), [j, M] = P.useState(d), N = u ?? j;
|
|
2377
|
+
function ee(e) {
|
|
2378
|
+
u === void 0 && M(e), f?.(e);
|
|
2379
2379
|
}
|
|
2380
|
-
let [
|
|
2381
|
-
async function
|
|
2382
|
-
if (e.preventDefault(), E(null), !
|
|
2380
|
+
let [te, ne] = P.useState(!1), [F, I] = P.useState(!1), L = C === "loading" || D !== null, re = !p || en(k) === $t.length, R = k.trim().length > 0 && re, ie = (!c || F) && te && R;
|
|
2381
|
+
async function z(e) {
|
|
2382
|
+
if (e.preventDefault(), E(null), !re) {
|
|
2383
2383
|
E("Please meet all password requirements.");
|
|
2384
2384
|
return;
|
|
2385
2385
|
}
|
|
2386
|
-
if (l && !
|
|
2386
|
+
if (l && !N) {
|
|
2387
2387
|
E("Please accept the terms to continue.");
|
|
2388
2388
|
return;
|
|
2389
2389
|
}
|
|
@@ -2399,7 +2399,7 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2399
2399
|
w("idle"), E(e instanceof Error ? e.message : "Unable to create account.");
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
|
-
async function
|
|
2402
|
+
async function ae(e) {
|
|
2403
2403
|
E(null), O(e);
|
|
2404
2404
|
try {
|
|
2405
2405
|
await g?.(e), w("success");
|
|
@@ -2409,7 +2409,7 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2409
2409
|
O(null);
|
|
2410
2410
|
}
|
|
2411
2411
|
}
|
|
2412
|
-
return /* @__PURE__ */ i(
|
|
2412
|
+
return /* @__PURE__ */ i(fn, {
|
|
2413
2413
|
title: e,
|
|
2414
2414
|
description: t,
|
|
2415
2415
|
logo: n,
|
|
@@ -2423,33 +2423,33 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2423
2423
|
children: "Login"
|
|
2424
2424
|
})
|
|
2425
2425
|
] }),
|
|
2426
|
-
children: /* @__PURE__ */ i(
|
|
2426
|
+
children: /* @__PURE__ */ i(pn, {
|
|
2427
2427
|
step: C === "success" ? "success" : "form",
|
|
2428
|
-
children: C === "success" ? /* @__PURE__ */ i(
|
|
2428
|
+
children: C === "success" ? /* @__PURE__ */ i(mn, {
|
|
2429
2429
|
title: "Account created",
|
|
2430
2430
|
description: "Check your inbox to confirm your email address."
|
|
2431
2431
|
}) : /* @__PURE__ */ a("div", {
|
|
2432
2432
|
className: "flex flex-col gap-4",
|
|
2433
2433
|
children: [s.length > 0 && /* @__PURE__ */ a(Z, {
|
|
2434
|
-
show: !
|
|
2434
|
+
show: !ie,
|
|
2435
2435
|
className: "flex flex-col gap-4",
|
|
2436
|
-
children: [/* @__PURE__ */ i(
|
|
2436
|
+
children: [/* @__PURE__ */ i(sn, {
|
|
2437
2437
|
providers: s,
|
|
2438
2438
|
action: "signup",
|
|
2439
2439
|
loadingProvider: D,
|
|
2440
2440
|
disabled: C === "loading",
|
|
2441
|
-
onSelect:
|
|
2442
|
-
}), /* @__PURE__ */ i(
|
|
2441
|
+
onSelect: ae
|
|
2442
|
+
}), /* @__PURE__ */ i(hn, { label: "Or with email" })]
|
|
2443
2443
|
}), /* @__PURE__ */ a("form", {
|
|
2444
2444
|
className: "flex flex-col gap-4",
|
|
2445
|
-
onSubmit:
|
|
2445
|
+
onSubmit: z,
|
|
2446
2446
|
children: [
|
|
2447
2447
|
c && /* @__PURE__ */ a(J, {
|
|
2448
2448
|
name: "name",
|
|
2449
2449
|
children: [/* @__PURE__ */ i(Y, {
|
|
2450
2450
|
htmlFor: y,
|
|
2451
2451
|
children: "Name"
|
|
2452
|
-
}), /* @__PURE__ */ i(
|
|
2452
|
+
}), /* @__PURE__ */ i(xt, {
|
|
2453
2453
|
"aria-label": "Name",
|
|
2454
2454
|
id: y,
|
|
2455
2455
|
name: "name",
|
|
@@ -2465,7 +2465,7 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2465
2465
|
children: [/* @__PURE__ */ i(Y, {
|
|
2466
2466
|
htmlFor: b,
|
|
2467
2467
|
children: "Email"
|
|
2468
|
-
}), /* @__PURE__ */ i(
|
|
2468
|
+
}), /* @__PURE__ */ i(xt, {
|
|
2469
2469
|
id: b,
|
|
2470
2470
|
name: "email",
|
|
2471
2471
|
type: "email",
|
|
@@ -2474,17 +2474,17 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2474
2474
|
placeholder: "you@example.com",
|
|
2475
2475
|
required: !0,
|
|
2476
2476
|
disabled: L,
|
|
2477
|
-
onChange: (e) =>
|
|
2477
|
+
onChange: (e) => ne(e.currentTarget.validity.valid)
|
|
2478
2478
|
})]
|
|
2479
2479
|
}),
|
|
2480
2480
|
/* @__PURE__ */ i(Z, {
|
|
2481
|
-
show:
|
|
2481
|
+
show: te,
|
|
2482
2482
|
children: /* @__PURE__ */ a(J, {
|
|
2483
2483
|
name: "password",
|
|
2484
2484
|
children: [/* @__PURE__ */ i(Y, {
|
|
2485
2485
|
htmlFor: x,
|
|
2486
2486
|
children: "Password"
|
|
2487
|
-
}), /* @__PURE__ */ i(
|
|
2487
|
+
}), /* @__PURE__ */ i(nn, {
|
|
2488
2488
|
id: x,
|
|
2489
2489
|
name: "password",
|
|
2490
2490
|
"aria-label": "Password",
|
|
@@ -2500,12 +2500,12 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2500
2500
|
}),
|
|
2501
2501
|
l && /* @__PURE__ */ a("div", {
|
|
2502
2502
|
className: "flex items-center gap-2",
|
|
2503
|
-
children: [/* @__PURE__ */ i(
|
|
2503
|
+
children: [/* @__PURE__ */ i(lt, {
|
|
2504
2504
|
id: S,
|
|
2505
|
-
checked:
|
|
2506
|
-
onCheckedChange: (e) =>
|
|
2505
|
+
checked: N,
|
|
2506
|
+
onCheckedChange: (e) => ee(e === !0),
|
|
2507
2507
|
disabled: L
|
|
2508
|
-
}), /* @__PURE__ */ a(
|
|
2508
|
+
}), /* @__PURE__ */ a(kt, {
|
|
2509
2509
|
htmlFor: S,
|
|
2510
2510
|
className: "font-normal",
|
|
2511
2511
|
children: [
|
|
@@ -2536,8 +2536,8 @@ function Tn({ title: e = "Create your account", description: t = "Start explorin
|
|
|
2536
2536
|
}
|
|
2537
2537
|
//#endregion
|
|
2538
2538
|
//#region src/components/blocks/auth/update-password-block.tsx
|
|
2539
|
-
function
|
|
2540
|
-
let l =
|
|
2539
|
+
function Nn({ title: e = "Update your password", description: t = "Choose a new password for your account", logo: n, accent: r, minStrength: o = 4, onSubmit: s, onDone: c }) {
|
|
2540
|
+
let l = P.useId(), u = P.useId(), [d, f] = P.useState("idle"), [p, m] = P.useState(null), [h, g] = P.useState(""), [_, v] = P.useState(""), y = en(h) >= o, b = _.length > 0 && _ === h, x = y && b, S = _.length > 0 && !h.startsWith(_);
|
|
2541
2541
|
async function C(e) {
|
|
2542
2542
|
if (e.preventDefault(), x) {
|
|
2543
2543
|
m(null), f("loading");
|
|
@@ -2548,14 +2548,14 @@ function En({ title: e = "Update your password", description: t = "Choose a new
|
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
|
-
return /* @__PURE__ */ i(
|
|
2551
|
+
return /* @__PURE__ */ i(fn, {
|
|
2552
2552
|
title: e,
|
|
2553
2553
|
description: t,
|
|
2554
2554
|
logo: n,
|
|
2555
2555
|
accent: r,
|
|
2556
|
-
children: /* @__PURE__ */ i(
|
|
2556
|
+
children: /* @__PURE__ */ i(pn, {
|
|
2557
2557
|
step: d === "success" ? "success" : "form",
|
|
2558
|
-
children: d === "success" ? /* @__PURE__ */ i(
|
|
2558
|
+
children: d === "success" ? /* @__PURE__ */ i(mn, {
|
|
2559
2559
|
title: "Password updated",
|
|
2560
2560
|
description: "Your password has been changed successfully.",
|
|
2561
2561
|
children: c && /* @__PURE__ */ i(q, {
|
|
@@ -2572,7 +2572,7 @@ function En({ title: e = "Update your password", description: t = "Choose a new
|
|
|
2572
2572
|
children: [/* @__PURE__ */ i(Y, {
|
|
2573
2573
|
htmlFor: l,
|
|
2574
2574
|
children: "New password"
|
|
2575
|
-
}), /* @__PURE__ */ i(
|
|
2575
|
+
}), /* @__PURE__ */ i(nn, {
|
|
2576
2576
|
id: l,
|
|
2577
2577
|
name: "password",
|
|
2578
2578
|
autoComplete: "new-password",
|
|
@@ -2590,7 +2590,7 @@ function En({ title: e = "Update your password", description: t = "Choose a new
|
|
|
2590
2590
|
children: [/* @__PURE__ */ i(Y, {
|
|
2591
2591
|
htmlFor: u,
|
|
2592
2592
|
children: "Confirm new password"
|
|
2593
|
-
}), /* @__PURE__ */ i(
|
|
2593
|
+
}), /* @__PURE__ */ i(nn, {
|
|
2594
2594
|
id: u,
|
|
2595
2595
|
name: "confirmPassword",
|
|
2596
2596
|
autoComplete: "new-password",
|
|
@@ -2623,123 +2623,92 @@ var $ = [
|
|
|
2623
2623
|
1,
|
|
2624
2624
|
.3,
|
|
2625
2625
|
1
|
|
2626
|
-
],
|
|
2626
|
+
], Pn = [
|
|
2627
2627
|
.77,
|
|
2628
2628
|
0,
|
|
2629
2629
|
.175,
|
|
2630
2630
|
1
|
|
2631
|
-
],
|
|
2631
|
+
], Fn = [
|
|
2632
2632
|
.32,
|
|
2633
2633
|
.72,
|
|
2634
2634
|
0,
|
|
2635
2635
|
1
|
|
2636
|
-
],
|
|
2636
|
+
], In = "cubic-bezier(0.16, 1, 0.3, 1)", Ln = {
|
|
2637
2637
|
type: "spring",
|
|
2638
2638
|
stiffness: 500,
|
|
2639
2639
|
damping: 30,
|
|
2640
2640
|
mass: .6
|
|
2641
|
-
},
|
|
2641
|
+
}, Rn = {
|
|
2642
2642
|
type: "spring",
|
|
2643
2643
|
stiffness: 460,
|
|
2644
2644
|
damping: 30,
|
|
2645
2645
|
mass: .55
|
|
2646
|
-
},
|
|
2646
|
+
}, zn = {
|
|
2647
2647
|
type: "spring",
|
|
2648
2648
|
stiffness: 420,
|
|
2649
2649
|
damping: 40,
|
|
2650
2650
|
mass: .5
|
|
2651
|
-
},
|
|
2651
|
+
}, Bn = {
|
|
2652
2652
|
type: "spring",
|
|
2653
2653
|
stiffness: 360,
|
|
2654
2654
|
damping: 32,
|
|
2655
2655
|
mass: .6
|
|
2656
|
-
},
|
|
2656
|
+
}, Vn = {
|
|
2657
2657
|
stiffness: 200,
|
|
2658
2658
|
damping: 15,
|
|
2659
2659
|
mass: .3
|
|
2660
|
-
},
|
|
2660
|
+
}, Hn = {
|
|
2661
2661
|
stiffness: 700,
|
|
2662
2662
|
damping: 50,
|
|
2663
2663
|
mass: .5
|
|
2664
|
-
},
|
|
2665
|
-
|
|
2664
|
+
}, Un = {
|
|
2665
|
+
type: "spring",
|
|
2666
|
+
stiffness: 220,
|
|
2667
|
+
damping: 17,
|
|
2668
|
+
mass: .85
|
|
2669
|
+
}, Wn = {
|
|
2670
|
+
hidden: {
|
|
2666
2671
|
opacity: 0,
|
|
2667
|
-
filter: "blur(
|
|
2672
|
+
filter: "blur(3px)"
|
|
2668
2673
|
},
|
|
2669
|
-
|
|
2674
|
+
visible: {
|
|
2670
2675
|
opacity: 1,
|
|
2671
|
-
filter: "blur(0px)"
|
|
2676
|
+
filter: "blur(0px)",
|
|
2677
|
+
transition: {
|
|
2678
|
+
duration: .18,
|
|
2679
|
+
ease: $
|
|
2680
|
+
}
|
|
2672
2681
|
},
|
|
2673
|
-
exit:
|
|
2682
|
+
exit: {
|
|
2674
2683
|
opacity: 0,
|
|
2675
|
-
filter: "blur(
|
|
2684
|
+
filter: "blur(3px)",
|
|
2685
|
+
transition: {
|
|
2686
|
+
duration: .18,
|
|
2687
|
+
ease: $
|
|
2688
|
+
}
|
|
2676
2689
|
}
|
|
2677
|
-
},
|
|
2678
|
-
initial: { opacity: 0 },
|
|
2679
|
-
animate: { opacity: 1 },
|
|
2680
|
-
exit: (e) => e ? {} : { opacity: 0 }
|
|
2681
|
-
}, Rn = I(function({ children: e, as: t = "div", className: n, onMouseLeave: o, pillClassName: s, pillContainerClassName: c, inset: l = 20, ...u }, d) {
|
|
2682
|
-
let [f, p] = H(null), m = re(), h = be(), g = te.toArray(e).filter(L).map((e, t) => {
|
|
2683
|
-
let n = e, o = n.key ? String(n.key) : `item-${t}`;
|
|
2684
|
-
return ne(n, {
|
|
2685
|
-
key: o,
|
|
2686
|
-
className: K("relative", n.props.className),
|
|
2687
|
-
onMouseEnter: () => {
|
|
2688
|
-
n.props.onMouseEnter?.(), p(o);
|
|
2689
|
-
}
|
|
2690
|
-
}, /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(W, {
|
|
2691
|
-
custom: f !== null,
|
|
2692
|
-
children: f === null ? null : /* @__PURE__ */ i(G.div, {
|
|
2693
|
-
variants: h ? Ln : In,
|
|
2694
|
-
initial: "initial",
|
|
2695
|
-
animate: "animate",
|
|
2696
|
-
exit: "exit",
|
|
2697
|
-
custom: f !== null,
|
|
2698
|
-
className: K("pointer-events-none absolute inset-y-0", c),
|
|
2699
|
-
style: {
|
|
2700
|
-
left: -l,
|
|
2701
|
-
right: -l
|
|
2702
|
-
},
|
|
2703
|
-
children: f === o ? /* @__PURE__ */ i(G.div, {
|
|
2704
|
-
layoutId: `shared-bg-${m}`,
|
|
2705
|
-
transition: h ? { duration: 0 } : Nn,
|
|
2706
|
-
className: K("pointer-events-none h-full w-full rounded-2xl bg-primary/[0.06]", s)
|
|
2707
|
-
}) : null
|
|
2708
|
-
})
|
|
2709
|
-
}), /* @__PURE__ */ i("div", {
|
|
2710
|
-
className: "relative z-10",
|
|
2711
|
-
children: n.props.children
|
|
2712
|
-
})] }));
|
|
2713
|
-
}), _ = (e) => {
|
|
2714
|
-
p(null), o?.(e);
|
|
2715
|
-
};
|
|
2716
|
-
return i(t === "ul" ? G.ul : G.div, {
|
|
2717
|
-
...u,
|
|
2718
|
-
ref: d,
|
|
2719
|
-
layoutRoot: !0,
|
|
2720
|
-
onMouseLeave: _,
|
|
2721
|
-
className: K("flex w-full flex-col", n),
|
|
2722
|
-
children: g
|
|
2723
|
-
});
|
|
2724
|
-
}), zn = "(max-width: 767px)", Bn = "b", Vn = {
|
|
2725
|
-
duration: .36,
|
|
2726
|
-
ease: On
|
|
2727
|
-
}, Hn = {
|
|
2690
|
+
}, Gn = 48, Kn = {
|
|
2728
2691
|
type: "spring",
|
|
2729
2692
|
stiffness: 380,
|
|
2730
2693
|
damping: 35,
|
|
2731
2694
|
mass: .75
|
|
2732
|
-
},
|
|
2695
|
+
}, qn = {
|
|
2733
2696
|
duration: .2,
|
|
2734
2697
|
delay: .08,
|
|
2735
2698
|
ease: $
|
|
2736
|
-
},
|
|
2699
|
+
}, Jn = {
|
|
2737
2700
|
duration: .12,
|
|
2738
2701
|
ease: $
|
|
2739
|
-
},
|
|
2702
|
+
}, Yn = {
|
|
2703
|
+
duration: .36,
|
|
2704
|
+
ease: Fn
|
|
2705
|
+
}, Xn = {
|
|
2706
|
+
duration: .16,
|
|
2707
|
+
ease: $
|
|
2708
|
+
}, Zn = {
|
|
2740
2709
|
duration: .18,
|
|
2741
2710
|
ease: $
|
|
2742
|
-
},
|
|
2711
|
+
}, Qn = {
|
|
2743
2712
|
closed: {
|
|
2744
2713
|
opacity: 0,
|
|
2745
2714
|
clipPath: "inset(0 0 100% 0 round 8px)",
|
|
@@ -2760,7 +2729,7 @@ var $ = [
|
|
|
2760
2729
|
staggerChildren: .045
|
|
2761
2730
|
}
|
|
2762
2731
|
}
|
|
2763
|
-
},
|
|
2732
|
+
}, $n = {
|
|
2764
2733
|
closed: {
|
|
2765
2734
|
opacity: 0,
|
|
2766
2735
|
y: -6,
|
|
@@ -2770,65 +2739,121 @@ var $ = [
|
|
|
2770
2739
|
opacity: 1,
|
|
2771
2740
|
y: 0,
|
|
2772
2741
|
filter: "blur(0px)",
|
|
2773
|
-
transition:
|
|
2742
|
+
transition: Zn
|
|
2774
2743
|
}
|
|
2775
|
-
},
|
|
2776
|
-
duration: .16,
|
|
2777
|
-
ease: $
|
|
2778
|
-
}, Yn = [
|
|
2744
|
+
}, er = [
|
|
2779
2745
|
"a[href]",
|
|
2780
2746
|
"button:not([disabled])",
|
|
2781
2747
|
"input:not([disabled])",
|
|
2782
2748
|
"select:not([disabled])",
|
|
2783
2749
|
"textarea:not([disabled])",
|
|
2784
2750
|
"[tabindex]:not([tabindex='-1'])"
|
|
2785
|
-
].join(",");
|
|
2786
|
-
function
|
|
2787
|
-
let
|
|
2751
|
+
].join(","), tr = "(max-width: 767px)", nr = "b", rr = L(null), ir = L(null);
|
|
2752
|
+
function ar() {
|
|
2753
|
+
let e = ae(rr);
|
|
2754
|
+
if (!e) throw Error("useAnimatedSidebar must be used inside AnimatedPanelProvider.");
|
|
2755
|
+
return e;
|
|
2756
|
+
}
|
|
2757
|
+
function or(e) {
|
|
2758
|
+
let t = window.matchMedia(tr);
|
|
2788
2759
|
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
2789
2760
|
}
|
|
2790
|
-
function
|
|
2791
|
-
return window.matchMedia(
|
|
2761
|
+
function sr() {
|
|
2762
|
+
return window.matchMedia(tr).matches;
|
|
2792
2763
|
}
|
|
2793
|
-
function
|
|
2764
|
+
function cr() {
|
|
2794
2765
|
return !1;
|
|
2795
2766
|
}
|
|
2796
|
-
function
|
|
2797
|
-
return
|
|
2767
|
+
function lr() {
|
|
2768
|
+
return ue(or, sr, cr);
|
|
2798
2769
|
}
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
if (!e) throw Error("useAnimatedSidebar must be used inside AnimatedSidebarProvider.");
|
|
2770
|
+
function ur() {
|
|
2771
|
+
let e = ae(ir);
|
|
2772
|
+
if (!e) throw Error("Animated Sidebar parts must be used inside AnimatedPanel.");
|
|
2803
2773
|
return e;
|
|
2804
2774
|
}
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2775
|
+
//#endregion
|
|
2776
|
+
//#region src/components/blocks/shell/animated-panel.tsx
|
|
2777
|
+
function dr({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon", ariaLabel: r = "Sidebar", children: o, className: s, panelClassName: c, style: l, ref: u, ...d }) {
|
|
2778
|
+
let f = ar(), p = f.open[e], m = n !== "none" && !p, h = m && n === "offcanvas", g = h ? "0px" : m ? "var(--sidebar-width-icon)" : "var(--sidebar-width)";
|
|
2779
|
+
return f.isMobile ? /* @__PURE__ */ i("div", { children: "TODO: Create Mobile nav experience" }) : /* @__PURE__ */ a(W.aside, {
|
|
2780
|
+
...d,
|
|
2781
|
+
ref: u,
|
|
2782
|
+
initial: !1,
|
|
2783
|
+
"aria-label": r,
|
|
2784
|
+
"data-slot": "sidebar",
|
|
2785
|
+
"data-state": m ? "collapsed" : "expanded",
|
|
2786
|
+
"data-collapsible": n,
|
|
2787
|
+
"data-variant": t,
|
|
2788
|
+
"data-side": e,
|
|
2789
|
+
animate: {
|
|
2790
|
+
width: g,
|
|
2791
|
+
...e === "right" ? { marginLeft: h ? "-0.5rem" : "0rem" } : { marginRight: h ? "-0.5rem" : "0rem" }
|
|
2792
|
+
},
|
|
2793
|
+
transition: f.reduce ? { duration: 0 } : Kn,
|
|
2794
|
+
style: l,
|
|
2795
|
+
className: K("group/sidebar relative hidden h-full shrink-0 will-change-[width] md:block", "peer flex!", e === "right" && "order-last", s),
|
|
2796
|
+
children: [e === "right" && !m && /* @__PURE__ */ i(W.div, {
|
|
2797
|
+
className: "absolute inset-y-0 -left-2 z-10 w-2 cursor-col-resize",
|
|
2798
|
+
initial: "idle",
|
|
2799
|
+
whileHover: "hover",
|
|
2800
|
+
children: /* @__PURE__ */ i(W.div, {
|
|
2801
|
+
variants: {
|
|
2802
|
+
idle: { scaleY: 0 },
|
|
2803
|
+
hover: { scaleY: 1 }
|
|
2804
|
+
},
|
|
2805
|
+
transition: f.reduce ? { duration: 0 } : {
|
|
2806
|
+
duration: .2,
|
|
2807
|
+
ease: $
|
|
2808
|
+
},
|
|
2809
|
+
className: "h-full w-full bg-radial/decreasing from-amber-300/70 to-amber-500/0 to-40%"
|
|
2810
|
+
})
|
|
2811
|
+
}), /* @__PURE__ */ i("div", {
|
|
2812
|
+
className: n === "offcanvas" ? "absolute inset-0 overflow-hidden rounded-[inherit]" : "contents",
|
|
2813
|
+
children: /* @__PURE__ */ i(W.div, {
|
|
2814
|
+
initial: !1,
|
|
2815
|
+
animate: {
|
|
2816
|
+
opacity: +!h,
|
|
2817
|
+
x: h ? e === "left" ? "-100%" : "100%" : "0%"
|
|
2818
|
+
},
|
|
2819
|
+
transition: f.reduce ? Xn : Yn,
|
|
2820
|
+
className: K("sticky top-0 flex flex-col overflow-hidden", e === "right" && "ml-auto", t === "floating" && "mx-2 mt-2 h-[calc(100%-0.5rem)]", t === "inset" && "mt-2 h-[calc(100%-0.5rem)]", c),
|
|
2821
|
+
children: /* @__PURE__ */ i(ir.Provider, {
|
|
2822
|
+
value: {
|
|
2823
|
+
collapsed: m,
|
|
2824
|
+
collapsible: n,
|
|
2825
|
+
side: e
|
|
2826
|
+
},
|
|
2827
|
+
children: o
|
|
2828
|
+
})
|
|
2829
|
+
})
|
|
2830
|
+
})]
|
|
2831
|
+
});
|
|
2809
2832
|
}
|
|
2810
|
-
|
|
2811
|
-
|
|
2833
|
+
//#endregion
|
|
2834
|
+
//#region src/components/blocks/shell/animated-panel-provider.tsx
|
|
2835
|
+
function fr({ children: e, open: t, defaultOpen: n, onOpenChange: r, openMobile: a, defaultOpenMobile: o, onOpenMobileChange: s, className: c, style: l, ...u }) {
|
|
2836
|
+
let [d, f] = V(() => ({
|
|
2812
2837
|
left: n?.left ?? !0,
|
|
2813
2838
|
right: n?.right ?? !1
|
|
2814
|
-
})), [p, m] =
|
|
2839
|
+
})), [p, m] = V(() => ({
|
|
2815
2840
|
left: o?.left ?? !1,
|
|
2816
2841
|
right: o?.right ?? !1
|
|
2817
|
-
})), h =
|
|
2842
|
+
})), h = lr(), g = G() ?? !1, _ = se(), v = B(null), y = B(null), b = t?.left, x = t?.right, S = a?.left, C = a?.right, w = le(() => ({
|
|
2818
2843
|
left: b ?? d.left,
|
|
2819
2844
|
right: x ?? d.right
|
|
2820
2845
|
}), [
|
|
2821
2846
|
b,
|
|
2822
2847
|
x,
|
|
2823
2848
|
d
|
|
2824
|
-
]), T =
|
|
2849
|
+
]), T = le(() => ({
|
|
2825
2850
|
left: S ?? p.left,
|
|
2826
2851
|
right: C ?? p.right
|
|
2827
2852
|
}), [
|
|
2828
2853
|
S,
|
|
2829
2854
|
C,
|
|
2830
2855
|
p
|
|
2831
|
-
]), E =
|
|
2856
|
+
]), E = z((e, t) => {
|
|
2832
2857
|
(t === "left" ? b : x) === void 0 && f((n) => n[t] === e ? n : {
|
|
2833
2858
|
...n,
|
|
2834
2859
|
[t]: e
|
|
@@ -2837,7 +2862,7 @@ function ir({ children: e, open: t, defaultOpen: n, onOpenChange: r, openMobile:
|
|
|
2837
2862
|
b,
|
|
2838
2863
|
x,
|
|
2839
2864
|
r
|
|
2840
|
-
]), D =
|
|
2865
|
+
]), D = z((e, t) => {
|
|
2841
2866
|
(t === "left" ? S : C) === void 0 && m((n) => n[t] === e ? n : {
|
|
2842
2867
|
...n,
|
|
2843
2868
|
[t]: e
|
|
@@ -2846,7 +2871,7 @@ function ir({ children: e, open: t, defaultOpen: n, onOpenChange: r, openMobile:
|
|
|
2846
2871
|
S,
|
|
2847
2872
|
C,
|
|
2848
2873
|
s
|
|
2849
|
-
]), O =
|
|
2874
|
+
]), O = z((e) => {
|
|
2850
2875
|
h ? D(!T[e], e) : E(!w[e], e);
|
|
2851
2876
|
}, [
|
|
2852
2877
|
h,
|
|
@@ -2854,16 +2879,16 @@ function ir({ children: e, open: t, defaultOpen: n, onOpenChange: r, openMobile:
|
|
|
2854
2879
|
w,
|
|
2855
2880
|
E,
|
|
2856
2881
|
D
|
|
2857
|
-
]), k =
|
|
2882
|
+
]), k = le(() => ({
|
|
2858
2883
|
left: v,
|
|
2859
2884
|
right: y
|
|
2860
2885
|
}), []);
|
|
2861
|
-
return
|
|
2886
|
+
return oe(() => {
|
|
2862
2887
|
let e = (e) => {
|
|
2863
|
-
e.key.toLowerCase() ===
|
|
2888
|
+
e.key.toLowerCase() === "b" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), O("left"));
|
|
2864
2889
|
};
|
|
2865
2890
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
2866
|
-
}, [O]), /* @__PURE__ */ i(
|
|
2891
|
+
}, [O]), /* @__PURE__ */ i(rr.Provider, {
|
|
2867
2892
|
value: {
|
|
2868
2893
|
isMobile: h,
|
|
2869
2894
|
layoutId: `${_}-active`,
|
|
@@ -2886,205 +2911,179 @@ function ir({ children: e, open: t, defaultOpen: n, onOpenChange: r, openMobile:
|
|
|
2886
2911
|
"--sidebar-width-mobile": "18rem",
|
|
2887
2912
|
...l
|
|
2888
2913
|
},
|
|
2889
|
-
className: K("group/sidebar-wrapper flex
|
|
2914
|
+
className: K("group/sidebar-wrapper flex w-full min-w-0 gap-x-2", c),
|
|
2890
2915
|
children: e
|
|
2891
2916
|
})
|
|
2892
2917
|
});
|
|
2893
2918
|
}
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
overflow: e.style.overflow,
|
|
2901
|
-
position: e.style.position,
|
|
2902
|
-
right: e.style.right,
|
|
2903
|
-
top: e.style.top
|
|
2904
|
-
};
|
|
2905
|
-
e.style.position = "fixed", e.style.top = `-${t}px`, e.style.left = "0", e.style.right = "0", e.style.overflow = "hidden";
|
|
2906
|
-
let i = requestAnimationFrame(() => {
|
|
2907
|
-
(u.current?.querySelector(Yn) ?? u.current)?.focus({ preventScroll: !0 });
|
|
2908
|
-
});
|
|
2909
|
-
return () => {
|
|
2910
|
-
cancelAnimationFrame(i), e.style.position = r.position, e.style.top = r.top, e.style.left = r.left, e.style.right = r.right, e.style.overflow = r.overflow, window.scrollTo(0, t), n?.focus({ preventScroll: !0 });
|
|
2911
|
-
};
|
|
2912
|
-
}, [s, l]), d ? Te(/* @__PURE__ */ a("div", {
|
|
2913
|
-
className: K("pointer-events-none fixed inset-0 z-50 md:hidden", s ? "visible" : "invisible"),
|
|
2914
|
-
children: [/* @__PURE__ */ i(G.button, {
|
|
2915
|
-
type: "button",
|
|
2916
|
-
"aria-label": "Close sidebar",
|
|
2917
|
-
tabIndex: s ? 0 : -1,
|
|
2918
|
-
initial: !1,
|
|
2919
|
-
animate: { opacity: +!!s },
|
|
2920
|
-
transition: o.reduce ? Jn : Vn,
|
|
2921
|
-
onClick: () => c(!1),
|
|
2922
|
-
className: K("absolute inset-0", s ? "pointer-events-auto" : "pointer-events-none")
|
|
2923
|
-
}), /* @__PURE__ */ i(G.div, {
|
|
2924
|
-
ref: u,
|
|
2925
|
-
role: "dialog",
|
|
2926
|
-
"aria-modal": "true",
|
|
2927
|
-
"aria-label": e,
|
|
2928
|
-
"aria-hidden": !s,
|
|
2929
|
-
inert: !s,
|
|
2930
|
-
tabIndex: -1,
|
|
2931
|
-
"data-mobile": "true",
|
|
2932
|
-
"data-state": s ? "expanded" : "collapsed",
|
|
2933
|
-
"data-side": r,
|
|
2934
|
-
initial: !1,
|
|
2935
|
-
animate: {
|
|
2936
|
-
opacity: o.reduce ? +!!s : 1,
|
|
2937
|
-
x: o.reduce ? 0 : s ? "0%" : r === "left" ? "-100%" : "100%"
|
|
2938
|
-
},
|
|
2939
|
-
transition: o.reduce ? Jn : Vn,
|
|
2940
|
-
onKeyDown: (e) => {
|
|
2941
|
-
if (e.key === "Escape") {
|
|
2942
|
-
e.preventDefault(), c(!1);
|
|
2943
|
-
return;
|
|
2944
|
-
}
|
|
2945
|
-
if (e.key !== "Tab") return;
|
|
2946
|
-
let t = u.current ? Array.from(u.current.querySelectorAll(Yn)) : [];
|
|
2947
|
-
if (t.length === 0) {
|
|
2948
|
-
e.preventDefault(), u.current?.focus();
|
|
2949
|
-
return;
|
|
2950
|
-
}
|
|
2951
|
-
let n = t[0], r = t[t.length - 1];
|
|
2952
|
-
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
2953
|
-
},
|
|
2954
|
-
className: K("pointer-events-auto absolute inset-y-0 flex h-dvh w-(--sidebar-width-mobile) max-w-[88vw] flex-col overflow-hidden", "will-change-transform", r === "left" ? "left-0 border-r" : "right-0", !s && "pointer-events-none", n),
|
|
2955
|
-
children: /* @__PURE__ */ i(tr.Provider, {
|
|
2956
|
-
value: {
|
|
2957
|
-
collapsed: !1,
|
|
2958
|
-
collapsible: "none",
|
|
2959
|
-
side: r
|
|
2960
|
-
},
|
|
2961
|
-
children: t
|
|
2962
|
-
})
|
|
2963
|
-
})]
|
|
2964
|
-
}), document.body) : null;
|
|
2965
|
-
}
|
|
2966
|
-
var or = I(function({ side: e = "left", variant: t = "sidebar", collapsible: n = "icon", ariaLabel: r = "Sidebar", children: o, className: s, panelClassName: c, style: l, ...u }, d) {
|
|
2967
|
-
let f = nr(), p = f.open[e], m = n !== "none" && !p, h = m && n === "offcanvas", g = h ? "0px" : m ? "var(--sidebar-width-icon)" : "var(--sidebar-width)";
|
|
2968
|
-
return f.isMobile ? /* @__PURE__ */ i(ar, {
|
|
2969
|
-
ariaLabel: r,
|
|
2970
|
-
className: s,
|
|
2971
|
-
side: e,
|
|
2972
|
-
children: o
|
|
2973
|
-
}) : /* @__PURE__ */ a(G.aside, {
|
|
2974
|
-
...u,
|
|
2975
|
-
ref: d,
|
|
2976
|
-
initial: !1,
|
|
2977
|
-
"aria-label": r,
|
|
2978
|
-
"data-slot": "sidebar",
|
|
2979
|
-
"data-state": m ? "collapsed" : "expanded",
|
|
2980
|
-
"data-collapsible": n,
|
|
2981
|
-
"data-variant": t,
|
|
2982
|
-
"data-side": e,
|
|
2983
|
-
animate: { width: g },
|
|
2984
|
-
transition: f.reduce ? { duration: 0 } : Hn,
|
|
2985
|
-
style: l,
|
|
2986
|
-
className: K("group/sidebar relative hidden h-auto shrink-0 will-change-[width] md:block", "peer flex!", n === "offcanvas" && "overflow-x-visible [overflow-clip-margin:1rem]", e === "right" && "order-last", s),
|
|
2987
|
-
children: [e === "right" && !m && /* @__PURE__ */ i(G.div, { className: "h-full p-0.5 flex flex-1 bg-radial/decreasing from-amber-400 to-0% hover:to-50% ease-smooth-out to-amber-500/0 cursor-col-resize transition-colors duration-1000 animate-in" }), /* @__PURE__ */ i(G.div, {
|
|
2988
|
-
initial: !1,
|
|
2989
|
-
animate: {
|
|
2990
|
-
opacity: +!h,
|
|
2991
|
-
x: h ? e === "left" ? "-100%" : "100%" : "0%"
|
|
2992
|
-
},
|
|
2993
|
-
transition: f.reduce ? Jn : Vn,
|
|
2994
|
-
className: K("sticky top-0 flex h-svh w-full flex-col overflow-hidden", n === "offcanvas" && "w-(--sidebar-width)", t === "floating" && "m-2 h-[calc(100svh-1rem)]", t === "inset" && "m-2 h-[calc(100svh-1rem)]", c),
|
|
2995
|
-
children: /* @__PURE__ */ i(tr.Provider, {
|
|
2996
|
-
value: {
|
|
2997
|
-
collapsed: m,
|
|
2998
|
-
collapsible: n,
|
|
2999
|
-
side: e
|
|
3000
|
-
},
|
|
3001
|
-
children: o
|
|
3002
|
-
})
|
|
3003
|
-
})]
|
|
3004
|
-
});
|
|
3005
|
-
}), sr = I(function({ className: e, onClick: t, side: n = "left", type: r = "button", ...a }, o) {
|
|
3006
|
-
let s = nr(), c = s.isMobile ? s.openMobile[n] : s.open[n], l = s.triggerRefs[n];
|
|
3007
|
-
return /* @__PURE__ */ i("button", {
|
|
3008
|
-
...a,
|
|
2919
|
+
//#endregion
|
|
2920
|
+
//#region src/components/blocks/shell/animated-panel-trigger.tsx
|
|
2921
|
+
var pr = R(function({ onClick: e, side: t = "left", type: n = "button", ...r }, a) {
|
|
2922
|
+
let o = ar(), s = o.isMobile ? o.openMobile[t] : o.open[t], c = o.triggerRefs[t];
|
|
2923
|
+
return /* @__PURE__ */ i(q, {
|
|
2924
|
+
...r,
|
|
3009
2925
|
ref: (e) => {
|
|
3010
|
-
|
|
3011
|
-
},
|
|
3012
|
-
type: r,
|
|
3013
|
-
"aria-label": a["aria-label"] ?? "Toggle sidebar",
|
|
3014
|
-
"aria-expanded": c,
|
|
3015
|
-
"data-slot": "sidebar-trigger",
|
|
3016
|
-
"data-side": n,
|
|
3017
|
-
"data-state": c ? "expanded" : "collapsed",
|
|
3018
|
-
onClick: (e) => {
|
|
3019
|
-
t?.(e), !e.defaultPrevented && s.toggleSidebar(n);
|
|
2926
|
+
c.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
3020
2927
|
},
|
|
3021
|
-
className: K("inline-flex size-10 shrink-0 items-center justify-center rounded-xl outline-none", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", e)
|
|
3022
|
-
});
|
|
3023
|
-
}), cr = I(function({ className: e, onClick: t, side: n = "left", type: r = "button", ...a }, o) {
|
|
3024
|
-
let s = nr();
|
|
3025
|
-
return /* @__PURE__ */ i("button", {
|
|
3026
|
-
...a,
|
|
3027
|
-
ref: o,
|
|
3028
|
-
type: r,
|
|
3029
|
-
"data-side": n,
|
|
3030
|
-
"aria-label": a["aria-label"] ?? "Close sidebar",
|
|
3031
|
-
onClick: (e) => {
|
|
3032
|
-
t?.(e), !e.defaultPrevented && (s.isMobile ? s.setOpenMobile(!1, n) : s.setOpen(!1, n));
|
|
3033
|
-
},
|
|
3034
|
-
className: K("inline-flex size-10 shrink-0 items-center justify-center rounded-xl outline-none", "focus-visible:ring-2 focus-visible:ring-ring", e)
|
|
3035
|
-
});
|
|
3036
|
-
}), lr = I(function({ className: e, onClick: t, type: n = "button", ...r }, a) {
|
|
3037
|
-
let o = nr(), s = rr();
|
|
3038
|
-
return /* @__PURE__ */ i("button", {
|
|
3039
|
-
...r,
|
|
3040
|
-
ref: a,
|
|
3041
2928
|
type: n,
|
|
3042
|
-
"
|
|
2929
|
+
variant: "ghost",
|
|
2930
|
+
size: "icon-xl",
|
|
3043
2931
|
"aria-label": r["aria-label"] ?? "Toggle sidebar",
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
2932
|
+
"aria-expanded": s,
|
|
2933
|
+
"data-slot": "sidebar-trigger",
|
|
2934
|
+
"data-side": t,
|
|
2935
|
+
"data-state": s ? "expanded" : "collapsed",
|
|
2936
|
+
onClick: (n) => {
|
|
2937
|
+
e?.(n), !n.defaultPrevented && o.toggleSidebar(t);
|
|
2938
|
+
}
|
|
3050
2939
|
});
|
|
3051
|
-
}),
|
|
3052
|
-
return /* @__PURE__ */ i(
|
|
2940
|
+
}), mr = R(function({ className: e, ...t }, n) {
|
|
2941
|
+
return /* @__PURE__ */ i(W.main, {
|
|
3053
2942
|
...t,
|
|
3054
2943
|
ref: n,
|
|
3055
2944
|
"data-slot": "sidebar-inset",
|
|
3056
|
-
className: K("relative flex min-w-0 flex-1 flex-col bg-
|
|
2945
|
+
className: K("relative flex min-w-0 flex-1 flex-col bg-neutral-50 dark:bg-neutral-900", "outline-offset-0.5 overflow-hidden border-t-3 border-white outline-neutral-100 dark:border-neutral-800 dark:inset-ring-black", "rounded-lg shadow-md shadow-neutral-200 dark:shadow-neutral-950", e)
|
|
2946
|
+
});
|
|
2947
|
+
});
|
|
2948
|
+
//#endregion
|
|
2949
|
+
//#region src/components/blocks/shell/shell-layout.tsx
|
|
2950
|
+
function hr({ children: e, variant: t = "desktop", panels: n, className: r, header: o, defaultOpen: s, ...c }) {
|
|
2951
|
+
let l = {
|
|
2952
|
+
...n?.left && { left: n.left.defaultOpen ?? !0 },
|
|
2953
|
+
...n?.right && { right: n.right.defaultOpen ?? !1 },
|
|
2954
|
+
...s
|
|
2955
|
+
};
|
|
2956
|
+
return /* @__PURE__ */ a(fr, {
|
|
2957
|
+
...c,
|
|
2958
|
+
defaultOpen: l,
|
|
2959
|
+
className: K("relative h-full min-h-0 pb-2", r, "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950"),
|
|
2960
|
+
style: { paddingTop: t === "desktop" ? 48 : 0 },
|
|
2961
|
+
children: [
|
|
2962
|
+
/* @__PURE__ */ i(dr, {
|
|
2963
|
+
ariaLabel: "Primary navigation",
|
|
2964
|
+
collapsible: "icon",
|
|
2965
|
+
role: "navigation",
|
|
2966
|
+
variant: "inset",
|
|
2967
|
+
children: n?.left?.component
|
|
2968
|
+
}),
|
|
2969
|
+
/* @__PURE__ */ a(mr, {
|
|
2970
|
+
className: "min-w-24",
|
|
2971
|
+
children: [/* @__PURE__ */ a("header", {
|
|
2972
|
+
className: "flex h-12 items-center justify-between gap-2 border-b px-2",
|
|
2973
|
+
children: [
|
|
2974
|
+
/* @__PURE__ */ i("div", {
|
|
2975
|
+
className: "flex min-w-0 items-center gap-2",
|
|
2976
|
+
children: /* @__PURE__ */ i(pr, { children: n?.left?.trigger ?? /* @__PURE__ */ i(ke, {
|
|
2977
|
+
name: "PanelLeft",
|
|
2978
|
+
size: 24,
|
|
2979
|
+
animation: "press"
|
|
2980
|
+
}) })
|
|
2981
|
+
}),
|
|
2982
|
+
o && /* @__PURE__ */ i("div", {
|
|
2983
|
+
className: "flex flex-1 items-center",
|
|
2984
|
+
children: o
|
|
2985
|
+
}),
|
|
2986
|
+
/* @__PURE__ */ i("div", {
|
|
2987
|
+
className: "flex shrink-0 items-center gap-2",
|
|
2988
|
+
children: /* @__PURE__ */ i(pr, {
|
|
2989
|
+
"aria-label": "Toggle panel",
|
|
2990
|
+
side: "right",
|
|
2991
|
+
children: n?.right?.trigger ?? /* @__PURE__ */ i(ke, {
|
|
2992
|
+
className: "opacity-70",
|
|
2993
|
+
name: "PanelRight",
|
|
2994
|
+
size: 24
|
|
2995
|
+
})
|
|
2996
|
+
})
|
|
2997
|
+
})
|
|
2998
|
+
]
|
|
2999
|
+
}), /* @__PURE__ */ i("div", {
|
|
3000
|
+
className: "min-h-24 flex-1 overflow-auto",
|
|
3001
|
+
children: e
|
|
3002
|
+
})]
|
|
3003
|
+
}),
|
|
3004
|
+
/* @__PURE__ */ i(dr, {
|
|
3005
|
+
ariaLabel: n?.right?.name ?? "Secondary panel",
|
|
3006
|
+
className: K("mr-2 bg-neutral-50 dark:border-neutral-800 dark:bg-neutral-900", "outline-offset-0.5 border-t-3 border-white outline-neutral-100 dark:inset-ring-black", "rounded-lg shadow-md shadow-neutral-200 dark:shadow-neutral-950"),
|
|
3007
|
+
collapsible: "offcanvas",
|
|
3008
|
+
role: "complementary",
|
|
3009
|
+
side: "right",
|
|
3010
|
+
variant: "inset",
|
|
3011
|
+
children: n?.right?.component
|
|
3012
|
+
})
|
|
3013
|
+
]
|
|
3057
3014
|
});
|
|
3058
|
-
}
|
|
3015
|
+
}
|
|
3016
|
+
//#endregion
|
|
3017
|
+
//#region src/components/blocks/shell/use-shell-panels.ts
|
|
3018
|
+
function gr({ defaultOpen: e, defaultOpenMobile: t, onPanelChange: n } = {}) {
|
|
3019
|
+
let [r, i] = V(() => ({
|
|
3020
|
+
left: e?.left ?? !0,
|
|
3021
|
+
right: e?.right ?? !1
|
|
3022
|
+
})), [a, o] = V(() => ({
|
|
3023
|
+
left: t?.left ?? !1,
|
|
3024
|
+
right: t?.right ?? !1
|
|
3025
|
+
})), s = z((e, t) => {
|
|
3026
|
+
i((n) => n[t] === e ? n : {
|
|
3027
|
+
...n,
|
|
3028
|
+
[t]: e
|
|
3029
|
+
}), n?.(e, t);
|
|
3030
|
+
}, [n]), c = z((e, t) => {
|
|
3031
|
+
o((n) => n[t] === e ? n : {
|
|
3032
|
+
...n,
|
|
3033
|
+
[t]: e
|
|
3034
|
+
}), n?.(e, t);
|
|
3035
|
+
}, [n]);
|
|
3036
|
+
return {
|
|
3037
|
+
open: r,
|
|
3038
|
+
openMobile: a,
|
|
3039
|
+
setOpen: s,
|
|
3040
|
+
setOpenMobile: c,
|
|
3041
|
+
toggle: z((e) => s(!r[e], e), [r, s]),
|
|
3042
|
+
providerProps: le(() => ({
|
|
3043
|
+
open: r,
|
|
3044
|
+
onOpenChange: s,
|
|
3045
|
+
openMobile: a,
|
|
3046
|
+
onOpenMobileChange: c
|
|
3047
|
+
}), [
|
|
3048
|
+
r,
|
|
3049
|
+
a,
|
|
3050
|
+
s,
|
|
3051
|
+
c
|
|
3052
|
+
])
|
|
3053
|
+
};
|
|
3054
|
+
}
|
|
3055
|
+
//#endregion
|
|
3056
|
+
//#region src/components/blocks/shell/animated-sidebar-header.tsx
|
|
3057
|
+
var _r = R(function({ className: e, ...t }, n) {
|
|
3059
3058
|
return /* @__PURE__ */ i("div", {
|
|
3060
3059
|
...t,
|
|
3061
3060
|
ref: n,
|
|
3062
3061
|
"data-slot": "sidebar-header",
|
|
3063
3062
|
className: K("flex shrink-0 flex-col gap-2 p-3", e)
|
|
3064
3063
|
});
|
|
3065
|
-
}),
|
|
3064
|
+
}), vr = R(function({ className: e, ...t }, n) {
|
|
3066
3065
|
return /* @__PURE__ */ i("div", {
|
|
3067
3066
|
...t,
|
|
3068
3067
|
ref: n,
|
|
3069
3068
|
"data-slot": "sidebar-content",
|
|
3070
3069
|
className: K("flex min-h-0 flex-1 flex-col gap-2 overflow-x-hidden overflow-y-auto overscroll-contain px-2 py-2", e)
|
|
3071
3070
|
});
|
|
3072
|
-
}),
|
|
3071
|
+
}), yr = R(function({ className: e, ...t }, n) {
|
|
3073
3072
|
return /* @__PURE__ */ i("div", {
|
|
3074
3073
|
...t,
|
|
3075
3074
|
ref: n,
|
|
3076
3075
|
"data-slot": "sidebar-footer",
|
|
3077
3076
|
className: K("flex shrink-0 flex-col gap-2 border-t border-border p-3 pb-[max(0.75rem,env(safe-area-inset-bottom))]", e)
|
|
3078
3077
|
});
|
|
3079
|
-
}),
|
|
3078
|
+
}), br = R(function({ className: e, ...t }, n) {
|
|
3080
3079
|
return /* @__PURE__ */ i("div", {
|
|
3081
3080
|
...t,
|
|
3082
3081
|
ref: n,
|
|
3083
3082
|
"data-slot": "sidebar-group",
|
|
3084
3083
|
className: K("flex w-full min-w-0 flex-col px-1 py-1.5", e)
|
|
3085
3084
|
});
|
|
3086
|
-
}),
|
|
3087
|
-
let { collapsed: a } =
|
|
3085
|
+
}), xr = R(function({ children: e, className: t, ...n }, r) {
|
|
3086
|
+
let { collapsed: a } = ur();
|
|
3088
3087
|
return /* @__PURE__ */ i("div", {
|
|
3089
3088
|
...n,
|
|
3090
3089
|
ref: r,
|
|
@@ -3093,15 +3092,75 @@ var or = I(function({ side: e = "left", variant: t = "sidebar", collapsible: n =
|
|
|
3093
3092
|
className: K("mb-1 h-7 overflow-hidden px-2 text-[10px] font-medium tracking-[0.14em] text-muted-foreground uppercase transition-opacity", a ? "opacity-0" : "opacity-100", t),
|
|
3094
3093
|
children: e
|
|
3095
3094
|
});
|
|
3096
|
-
}),
|
|
3095
|
+
}), Sr = R(function({ className: e, ...t }, n) {
|
|
3097
3096
|
return /* @__PURE__ */ i("div", {
|
|
3098
3097
|
...t,
|
|
3099
3098
|
ref: n,
|
|
3100
3099
|
"data-slot": "sidebar-group-content",
|
|
3101
3100
|
className: K("w-full min-w-0", e)
|
|
3102
3101
|
});
|
|
3103
|
-
}),
|
|
3104
|
-
|
|
3102
|
+
}), Cr = {
|
|
3103
|
+
initial: {
|
|
3104
|
+
opacity: 0,
|
|
3105
|
+
filter: "blur(6px)"
|
|
3106
|
+
},
|
|
3107
|
+
animate: {
|
|
3108
|
+
opacity: 1,
|
|
3109
|
+
filter: "blur(0px)"
|
|
3110
|
+
},
|
|
3111
|
+
exit: (e) => e ? {} : {
|
|
3112
|
+
opacity: 0,
|
|
3113
|
+
filter: "blur(6px)"
|
|
3114
|
+
}
|
|
3115
|
+
}, wr = {
|
|
3116
|
+
initial: { opacity: 0 },
|
|
3117
|
+
animate: { opacity: 1 },
|
|
3118
|
+
exit: (e) => e ? {} : { opacity: 0 }
|
|
3119
|
+
}, Tr = R(function({ children: e, as: t = "div", className: n, onMouseLeave: o, pillClassName: s, pillContainerClassName: c, inset: l = 20, ...u }, d) {
|
|
3120
|
+
let [f, p] = V(null), m = se(), h = G(), g = F.toArray(e).filter(ie).map((e, t) => {
|
|
3121
|
+
let n = e, o = n.key ? String(n.key) : `item-${t}`;
|
|
3122
|
+
return I(n, {
|
|
3123
|
+
key: o,
|
|
3124
|
+
className: K("relative", n.props.className),
|
|
3125
|
+
onMouseEnter: () => {
|
|
3126
|
+
n.props.onMouseEnter?.(), p(o);
|
|
3127
|
+
}
|
|
3128
|
+
}, /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(U, {
|
|
3129
|
+
custom: f !== null,
|
|
3130
|
+
children: f === null ? null : /* @__PURE__ */ i(W.div, {
|
|
3131
|
+
variants: h ? wr : Cr,
|
|
3132
|
+
initial: "initial",
|
|
3133
|
+
animate: "animate",
|
|
3134
|
+
exit: "exit",
|
|
3135
|
+
custom: f !== null,
|
|
3136
|
+
className: K("pointer-events-none absolute inset-y-0", c),
|
|
3137
|
+
style: {
|
|
3138
|
+
left: -l,
|
|
3139
|
+
right: -l
|
|
3140
|
+
},
|
|
3141
|
+
children: f === o ? /* @__PURE__ */ i(W.div, {
|
|
3142
|
+
layoutId: `shared-bg-${m}`,
|
|
3143
|
+
transition: h ? { duration: 0 } : Bn,
|
|
3144
|
+
className: K("pointer-events-none h-full w-full rounded-2xl bg-primary/[0.06]", s)
|
|
3145
|
+
}) : null
|
|
3146
|
+
})
|
|
3147
|
+
}), /* @__PURE__ */ i("div", {
|
|
3148
|
+
className: "relative z-10",
|
|
3149
|
+
children: n.props.children
|
|
3150
|
+
})] }));
|
|
3151
|
+
}), _ = (e) => {
|
|
3152
|
+
p(null), o?.(e);
|
|
3153
|
+
};
|
|
3154
|
+
return i(t === "ul" ? W.ul : W.div, {
|
|
3155
|
+
...u,
|
|
3156
|
+
ref: d,
|
|
3157
|
+
layoutRoot: !0,
|
|
3158
|
+
onMouseLeave: _,
|
|
3159
|
+
className: K("flex w-full flex-col", n),
|
|
3160
|
+
children: g
|
|
3161
|
+
});
|
|
3162
|
+
}), Er = R(function({ children: e, className: t, ...n }, r) {
|
|
3163
|
+
return /* @__PURE__ */ i(Tr, {
|
|
3105
3164
|
...n,
|
|
3106
3165
|
ref: r,
|
|
3107
3166
|
as: "ul",
|
|
@@ -3112,25 +3171,25 @@ var or = I(function({ side: e = "left", variant: t = "sidebar", collapsible: n =
|
|
|
3112
3171
|
className: K("flex w-full min-w-0 list-none flex-col gap-0.5", t),
|
|
3113
3172
|
children: e
|
|
3114
3173
|
});
|
|
3115
|
-
}),
|
|
3116
|
-
return /* @__PURE__ */ i(
|
|
3174
|
+
}), Dr = R(function({ className: e, ...t }, n) {
|
|
3175
|
+
return /* @__PURE__ */ i(W.li, {
|
|
3117
3176
|
...t,
|
|
3118
3177
|
ref: n,
|
|
3119
3178
|
layout: "position",
|
|
3120
|
-
transition:
|
|
3179
|
+
transition: Bn,
|
|
3121
3180
|
"data-slot": "sidebar-menu-item",
|
|
3122
3181
|
className: K("relative", e)
|
|
3123
3182
|
});
|
|
3124
|
-
}),
|
|
3125
|
-
let o =
|
|
3126
|
-
return /* @__PURE__ */ i(
|
|
3183
|
+
}), Or = R(function({ open: e, children: t, className: n, ...r }, a) {
|
|
3184
|
+
let o = ar(), s = ur();
|
|
3185
|
+
return /* @__PURE__ */ i(U, {
|
|
3127
3186
|
initial: !1,
|
|
3128
3187
|
mode: "popLayout",
|
|
3129
|
-
children: e && !s.collapsed ? /* @__PURE__ */
|
|
3188
|
+
children: e && !s.collapsed ? /* @__PURE__ */ re(W.ul, {
|
|
3130
3189
|
...r,
|
|
3131
3190
|
ref: a,
|
|
3132
3191
|
key: "sidebar-submenu",
|
|
3133
|
-
variants: o.reduce ? void 0 :
|
|
3192
|
+
variants: o.reduce ? void 0 : Qn,
|
|
3134
3193
|
initial: !o.reduce && "closed",
|
|
3135
3194
|
animate: o.reduce ? { opacity: 1 } : "open",
|
|
3136
3195
|
exit: o.reduce ? { opacity: 0 } : "closed",
|
|
@@ -3139,17 +3198,19 @@ var or = I(function({ side: e = "left", variant: t = "sidebar", collapsible: n =
|
|
|
3139
3198
|
className: K("relative mt-1 ml-5 flex min-w-0 flex-col gap-0.5 border-l border-border pl-3", n)
|
|
3140
3199
|
}, t) : null
|
|
3141
3200
|
});
|
|
3142
|
-
}),
|
|
3143
|
-
return /* @__PURE__ */ i(
|
|
3201
|
+
}), kr = R(function({ className: e, ...t }, n) {
|
|
3202
|
+
return /* @__PURE__ */ i(W.li, {
|
|
3144
3203
|
...t,
|
|
3145
3204
|
ref: n,
|
|
3146
|
-
variants:
|
|
3205
|
+
variants: $n,
|
|
3147
3206
|
"data-slot": "sidebar-menu-sub-item",
|
|
3148
3207
|
className: K("relative min-w-0", e)
|
|
3149
3208
|
});
|
|
3150
3209
|
});
|
|
3151
|
-
|
|
3152
|
-
|
|
3210
|
+
//#endregion
|
|
3211
|
+
//#region src/components/blocks/shell/animated-sidebar-menu-sub-button.tsx
|
|
3212
|
+
function Ar({ children: e, icon: t, href: n, isActive: o = !1, disabled: s = !1, closeOnSelect: c = !0, target: l, rel: u, onSelect: d, className: f }) {
|
|
3213
|
+
let p = ar(), m = ur(), h = (e) => {
|
|
3153
3214
|
if (s) {
|
|
3154
3215
|
e.preventDefault();
|
|
3155
3216
|
return;
|
|
@@ -3163,7 +3224,7 @@ function xr({ children: e, icon: t, href: n, isActive: o = !1, disabled: s = !1,
|
|
|
3163
3224
|
className: "min-w-0 flex-1 truncate",
|
|
3164
3225
|
children: e
|
|
3165
3226
|
})] }), _ = K("flex min-h-8 w-full min-w-0 items-center gap-2 rounded-lg px-2 text-left text-xs outline-none", "text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground", "focus-visible:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring", o && "bg-muted/70 text-foreground", s && "cursor-not-allowed opacity-40", f);
|
|
3166
|
-
return n ? /* @__PURE__ */ i(
|
|
3227
|
+
return n ? /* @__PURE__ */ i(W.a, {
|
|
3167
3228
|
href: n,
|
|
3168
3229
|
target: l,
|
|
3169
3230
|
rel: u ?? (l === "_blank" ? "noreferrer noopener" : void 0),
|
|
@@ -3172,22 +3233,24 @@ function xr({ children: e, icon: t, href: n, isActive: o = !1, disabled: s = !1,
|
|
|
3172
3233
|
tabIndex: s ? -1 : void 0,
|
|
3173
3234
|
onClick: h,
|
|
3174
3235
|
whileTap: p.reduce || s ? void 0 : { scale: .98 },
|
|
3175
|
-
transition:
|
|
3236
|
+
transition: Ln,
|
|
3176
3237
|
className: _,
|
|
3177
3238
|
children: g
|
|
3178
|
-
}) : /* @__PURE__ */ i(
|
|
3239
|
+
}) : /* @__PURE__ */ i(W.button, {
|
|
3179
3240
|
type: "button",
|
|
3180
3241
|
disabled: s,
|
|
3181
3242
|
"aria-current": o ? "page" : void 0,
|
|
3182
3243
|
onClick: h,
|
|
3183
3244
|
whileTap: p.reduce || s ? void 0 : { scale: .98 },
|
|
3184
|
-
transition:
|
|
3245
|
+
transition: Ln,
|
|
3185
3246
|
className: _,
|
|
3186
3247
|
children: g
|
|
3187
3248
|
});
|
|
3188
3249
|
}
|
|
3189
|
-
|
|
3190
|
-
|
|
3250
|
+
//#endregion
|
|
3251
|
+
//#region src/components/blocks/shell/animated-sidebar-menu-button.tsx
|
|
3252
|
+
function jr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExpanded: c, disabled: l = !1, closeOnSelect: u, target: d, rel: p, onSelect: m, className: h }) {
|
|
3253
|
+
let g = ar(), _ = ur(), v = typeof e == "string" ? e : void 0, y = (e) => {
|
|
3191
3254
|
if (l) {
|
|
3192
3255
|
e.preventDefault();
|
|
3193
3256
|
return;
|
|
@@ -3196,9 +3259,9 @@ function Sr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExp
|
|
|
3196
3259
|
let t = u ?? c === void 0;
|
|
3197
3260
|
g.isMobile && t && g.setOpenMobile(!1, _.side);
|
|
3198
3261
|
}, b = /* @__PURE__ */ a(r, { children: [
|
|
3199
|
-
s ? /* @__PURE__ */ i(
|
|
3262
|
+
s ? /* @__PURE__ */ i(W.span, {
|
|
3200
3263
|
layoutId: g.layoutId,
|
|
3201
|
-
transition: g.reduce ? { duration: 0 } :
|
|
3264
|
+
transition: g.reduce ? { duration: 0 } : Bn,
|
|
3202
3265
|
className: "absolute inset-0 rounded-xl bg-muted"
|
|
3203
3266
|
}) : null,
|
|
3204
3267
|
t ? /* @__PURE__ */ i("span", {
|
|
@@ -3206,13 +3269,13 @@ function Sr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExp
|
|
|
3206
3269
|
className: "relative z-10 grid size-5 shrink-0 place-items-center",
|
|
3207
3270
|
children: t
|
|
3208
3271
|
}) : null,
|
|
3209
|
-
/* @__PURE__ */ i(
|
|
3272
|
+
/* @__PURE__ */ i(W.span, {
|
|
3210
3273
|
initial: !1,
|
|
3211
3274
|
animate: {
|
|
3212
3275
|
opacity: +!_.collapsed,
|
|
3213
3276
|
x: _.collapsed ? -4 : 0
|
|
3214
3277
|
},
|
|
3215
|
-
transition: g.reduce ?
|
|
3278
|
+
transition: g.reduce ? Xn : _.collapsed ? Jn : qn,
|
|
3216
3279
|
"aria-hidden": _.collapsed,
|
|
3217
3280
|
className: K("relative z-10 min-w-0 flex-1 truncate", _.collapsed && "pointer-events-none"),
|
|
3218
3281
|
children: e
|
|
@@ -3221,7 +3284,7 @@ function Sr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExp
|
|
|
3221
3284
|
className: "relative z-10 shrink-0 text-xs text-muted-foreground",
|
|
3222
3285
|
children: n
|
|
3223
3286
|
}) : null,
|
|
3224
|
-
c === void 0 ? null : /* @__PURE__ */ i(
|
|
3287
|
+
c === void 0 ? null : /* @__PURE__ */ i(W.span, {
|
|
3225
3288
|
"aria-hidden": "true",
|
|
3226
3289
|
initial: !1,
|
|
3227
3290
|
animate: {
|
|
@@ -3229,12 +3292,12 @@ function Sr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExp
|
|
|
3229
3292
|
rotate: c ? 90 : 0,
|
|
3230
3293
|
x: _.collapsed ? 4 : 0
|
|
3231
3294
|
},
|
|
3232
|
-
transition: g.reduce ? { duration: 0 } :
|
|
3295
|
+
transition: g.reduce ? { duration: 0 } : Bn,
|
|
3233
3296
|
className: "relative z-10 grid size-4 shrink-0 place-items-center text-muted-foreground",
|
|
3234
3297
|
children: /* @__PURE__ */ i(f, { className: "size-3.5" })
|
|
3235
3298
|
})
|
|
3236
3299
|
] }), x = K("relative flex min-h-9 w-full min-w-0 items-center gap-2.5 overflow-hidden rounded-xl px-3 text-left text-sm font-medium outline-none", "text-muted-foreground transition-colors hover:text-foreground", "focus-visible:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring", s && "text-foreground", l && "cursor-not-allowed opacity-40", h);
|
|
3237
|
-
return o ? /* @__PURE__ */ i(
|
|
3300
|
+
return o ? /* @__PURE__ */ i(W.a, {
|
|
3238
3301
|
href: o,
|
|
3239
3302
|
target: d,
|
|
3240
3303
|
rel: p ?? (d === "_blank" ? "noreferrer noopener" : void 0),
|
|
@@ -3246,10 +3309,10 @@ function Sr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExp
|
|
|
3246
3309
|
tabIndex: l ? -1 : void 0,
|
|
3247
3310
|
onClick: y,
|
|
3248
3311
|
whileTap: g.reduce || l ? void 0 : { scale: .98 },
|
|
3249
|
-
transition:
|
|
3312
|
+
transition: Ln,
|
|
3250
3313
|
className: x,
|
|
3251
3314
|
children: b
|
|
3252
|
-
}) : /* @__PURE__ */ i(
|
|
3315
|
+
}) : /* @__PURE__ */ i(W.button, {
|
|
3253
3316
|
type: "button",
|
|
3254
3317
|
disabled: l,
|
|
3255
3318
|
"aria-current": s ? "page" : void 0,
|
|
@@ -3258,32 +3321,32 @@ function Sr({ children: e, icon: t, badge: n, href: o, isActive: s = !1, ariaExp
|
|
|
3258
3321
|
title: _.collapsed ? v : void 0,
|
|
3259
3322
|
onClick: y,
|
|
3260
3323
|
whileTap: g.reduce || l ? void 0 : { scale: .98 },
|
|
3261
|
-
transition:
|
|
3324
|
+
transition: Ln,
|
|
3262
3325
|
className: x,
|
|
3263
3326
|
children: b
|
|
3264
3327
|
});
|
|
3265
3328
|
}
|
|
3266
3329
|
//#endregion
|
|
3267
3330
|
//#region src/components/blocks/nav/utils.ts
|
|
3268
|
-
function
|
|
3331
|
+
function Mr(e, t) {
|
|
3269
3332
|
return t !== void 0 && e === t;
|
|
3270
3333
|
}
|
|
3271
3334
|
//#endregion
|
|
3272
3335
|
//#region src/components/blocks/nav/sidebar-nav-row.tsx
|
|
3273
|
-
function
|
|
3274
|
-
let r = e.items ?? [], o = r.length > 0, s = r.some((e) =>
|
|
3336
|
+
function Nr({ item: e, activeId: t, onNavigate: n }) {
|
|
3337
|
+
let r = e.items ?? [], o = r.length > 0, s = r.some((e) => Mr(e.id, t)), [c, l] = P.useState(null), [u, d] = P.useState(s);
|
|
3275
3338
|
s !== u && (d(s), s && l(null));
|
|
3276
3339
|
let f = c ?? e.defaultOpen ?? s;
|
|
3277
3340
|
function p(e) {
|
|
3278
3341
|
e.onSelect?.(), n?.(e);
|
|
3279
3342
|
}
|
|
3280
|
-
return /* @__PURE__ */ a(
|
|
3343
|
+
return /* @__PURE__ */ a(Dr, { children: [/* @__PURE__ */ i(jr, {
|
|
3281
3344
|
ariaExpanded: o ? f : void 0,
|
|
3282
3345
|
badge: e.badge,
|
|
3283
3346
|
disabled: e.disabled,
|
|
3284
3347
|
href: o ? void 0 : e.href,
|
|
3285
3348
|
icon: e.icon,
|
|
3286
|
-
isActive:
|
|
3349
|
+
isActive: Mr(e.id, t),
|
|
3287
3350
|
onSelect: () => {
|
|
3288
3351
|
if (o) {
|
|
3289
3352
|
l(!f);
|
|
@@ -3293,13 +3356,13 @@ function wr({ item: e, activeId: t, onNavigate: n }) {
|
|
|
3293
3356
|
},
|
|
3294
3357
|
target: e.target,
|
|
3295
3358
|
children: e.label
|
|
3296
|
-
}), o ? /* @__PURE__ */ i(
|
|
3359
|
+
}), o ? /* @__PURE__ */ i(Or, {
|
|
3297
3360
|
open: f,
|
|
3298
|
-
children: r.map((e) => /* @__PURE__ */ i(
|
|
3361
|
+
children: r.map((e) => /* @__PURE__ */ i(kr, { children: /* @__PURE__ */ i(Ar, {
|
|
3299
3362
|
disabled: e.disabled,
|
|
3300
3363
|
href: e.href,
|
|
3301
3364
|
icon: e.icon,
|
|
3302
|
-
isActive:
|
|
3365
|
+
isActive: Mr(e.id, t),
|
|
3303
3366
|
onSelect: () => p(e),
|
|
3304
3367
|
target: e.target,
|
|
3305
3368
|
children: e.label
|
|
@@ -3308,8 +3371,8 @@ function wr({ item: e, activeId: t, onNavigate: n }) {
|
|
|
3308
3371
|
}
|
|
3309
3372
|
//#endregion
|
|
3310
3373
|
//#region src/components/blocks/nav/sidebar-block.tsx
|
|
3311
|
-
function
|
|
3312
|
-
return /* @__PURE__ */ i(
|
|
3374
|
+
function Pr({ sections: e, activeId: t, onNavigate: n, header: r, footer: o, showTrigger: s = !0, side: c = "left", variant: l = "sidebar", collapsible: u = "icon", open: d, defaultOpen: f, onOpenChange: p, openMobile: m, defaultOpenMobile: h, onOpenMobileChange: g, width: _, iconWidth: v, mobileWidth: y, ariaLabel: b = "Main", className: x }) {
|
|
3375
|
+
return /* @__PURE__ */ i(fr, {
|
|
3313
3376
|
className: "h-full min-h-0 w-auto",
|
|
3314
3377
|
defaultOpen: { [c]: f ?? !0 },
|
|
3315
3378
|
defaultOpenMobile: h === void 0 ? void 0 : { [c]: h },
|
|
@@ -3326,7 +3389,7 @@ function Tr({ sections: e, activeId: t, onNavigate: n, header: r, footer: o, sho
|
|
|
3326
3389
|
...v ? { "--sidebar-width-icon": v } : null,
|
|
3327
3390
|
...y ? { "--sidebar-width-mobile": y } : null
|
|
3328
3391
|
},
|
|
3329
|
-
children: /* @__PURE__ */ a(
|
|
3392
|
+
children: /* @__PURE__ */ a(dr, {
|
|
3330
3393
|
ariaLabel: b,
|
|
3331
3394
|
className: K("h-full", x),
|
|
3332
3395
|
collapsible: u,
|
|
@@ -3335,56 +3398,56 @@ function Tr({ sections: e, activeId: t, onNavigate: n, header: r, footer: o, sho
|
|
|
3335
3398
|
side: c,
|
|
3336
3399
|
variant: l,
|
|
3337
3400
|
children: [
|
|
3338
|
-
r || s && /* @__PURE__ */ i(
|
|
3401
|
+
r || s && /* @__PURE__ */ i(_r, { children: /* @__PURE__ */ a("div", {
|
|
3339
3402
|
className: "flex min-w-0 items-center justify-between gap-2",
|
|
3340
3403
|
children: [r && /* @__PURE__ */ i("div", {
|
|
3341
3404
|
className: "min-w-0 flex-1",
|
|
3342
3405
|
children: r
|
|
3343
|
-
}), s && /* @__PURE__ */ i(
|
|
3406
|
+
}), s && /* @__PURE__ */ i(pr, {
|
|
3344
3407
|
className: "text-muted-foreground hover:text-foreground",
|
|
3345
|
-
children: /* @__PURE__ */ i(
|
|
3408
|
+
children: /* @__PURE__ */ i(k, { className: "size-4.5" })
|
|
3346
3409
|
})]
|
|
3347
3410
|
}) }),
|
|
3348
|
-
/* @__PURE__ */ i(
|
|
3411
|
+
/* @__PURE__ */ i(vr, { children: e.map((e) => /* @__PURE__ */ a(br, { children: [e.label && /* @__PURE__ */ i(xr, { children: e.label }), /* @__PURE__ */ i(Sr, { children: /* @__PURE__ */ i(Er, { children: e.items.map((e) => /* @__PURE__ */ i(Nr, {
|
|
3349
3412
|
activeId: t,
|
|
3350
3413
|
item: e,
|
|
3351
3414
|
onNavigate: n
|
|
3352
3415
|
}, e.id)) }) })] }, e.id)) }),
|
|
3353
|
-
o && /* @__PURE__ */ i(
|
|
3416
|
+
o && /* @__PURE__ */ i(yr, { children: o })
|
|
3354
3417
|
]
|
|
3355
3418
|
})
|
|
3356
3419
|
});
|
|
3357
3420
|
}
|
|
3358
3421
|
//#endregion
|
|
3359
3422
|
//#region src/components/blocks/nav/sidebar/utils.ts
|
|
3360
|
-
var
|
|
3423
|
+
var Fr = {
|
|
3361
3424
|
duration: .16,
|
|
3362
3425
|
ease: $
|
|
3363
3426
|
};
|
|
3364
|
-
function
|
|
3427
|
+
function Ir(e) {
|
|
3365
3428
|
return e.kind === "folder" || e.kind === "project";
|
|
3366
3429
|
}
|
|
3367
|
-
function
|
|
3430
|
+
function Lr(e, t, n = 0, r = null) {
|
|
3368
3431
|
return e.flatMap((e) => {
|
|
3369
3432
|
let i = {
|
|
3370
3433
|
item: e,
|
|
3371
3434
|
depth: n,
|
|
3372
3435
|
parentId: r
|
|
3373
3436
|
};
|
|
3374
|
-
return !e.children?.length || !t.has(e.id) ? [i] : [i, ...
|
|
3437
|
+
return !e.children?.length || !t.has(e.id) ? [i] : [i, ...Lr(e.children, t, n + 1, e.id)];
|
|
3375
3438
|
});
|
|
3376
3439
|
}
|
|
3377
|
-
function
|
|
3440
|
+
function Rr(e, t) {
|
|
3378
3441
|
for (let n of e) {
|
|
3379
3442
|
if (n.id === t) return n;
|
|
3380
|
-
let e = n.children ?
|
|
3443
|
+
let e = n.children ? Rr(n.children, t) : void 0;
|
|
3381
3444
|
if (e) return e;
|
|
3382
3445
|
}
|
|
3383
3446
|
}
|
|
3384
|
-
function
|
|
3385
|
-
return e.id === t || e.children?.some((e) =>
|
|
3447
|
+
function zr(e, t) {
|
|
3448
|
+
return e.id === t || e.children?.some((e) => zr(e, t)) === !0;
|
|
3386
3449
|
}
|
|
3387
|
-
function
|
|
3450
|
+
function Br(e, t) {
|
|
3388
3451
|
let n, r = [];
|
|
3389
3452
|
for (let i of e) {
|
|
3390
3453
|
if (i.id === t) {
|
|
@@ -3392,7 +3455,7 @@ function jr(e, t) {
|
|
|
3392
3455
|
continue;
|
|
3393
3456
|
}
|
|
3394
3457
|
if (i.children?.length) {
|
|
3395
|
-
let e =
|
|
3458
|
+
let e = Br(i.children, t);
|
|
3396
3459
|
if (e.removed) {
|
|
3397
3460
|
n = e.removed, r.push({
|
|
3398
3461
|
...i,
|
|
@@ -3408,7 +3471,7 @@ function jr(e, t) {
|
|
|
3408
3471
|
removed: n
|
|
3409
3472
|
};
|
|
3410
3473
|
}
|
|
3411
|
-
function
|
|
3474
|
+
function Vr(e, t, n, r) {
|
|
3412
3475
|
if (n === null) return [...e, t];
|
|
3413
3476
|
let i = [];
|
|
3414
3477
|
for (let a of e) {
|
|
@@ -3421,77 +3484,77 @@ function Mr(e, t, n, r) {
|
|
|
3421
3484
|
}
|
|
3422
3485
|
a.children?.length ? i.push({
|
|
3423
3486
|
...a,
|
|
3424
|
-
children:
|
|
3487
|
+
children: Vr(a.children, t, n, r)
|
|
3425
3488
|
}) : i.push(a);
|
|
3426
3489
|
}
|
|
3427
3490
|
return i;
|
|
3428
3491
|
}
|
|
3429
|
-
function
|
|
3430
|
-
let n =
|
|
3431
|
-
if (!n || n.disabled || t.targetId &&
|
|
3432
|
-
let r = t.targetId ?
|
|
3433
|
-
if (t.position === "inside" && (!r || r.disabled || !
|
|
3434
|
-
let i =
|
|
3435
|
-
return i.removed ?
|
|
3492
|
+
function Hr(e, t) {
|
|
3493
|
+
let n = Rr(e, t.itemId);
|
|
3494
|
+
if (!n || n.disabled || t.targetId && zr(n, t.targetId)) return null;
|
|
3495
|
+
let r = t.targetId ? Rr(e, t.targetId) : void 0;
|
|
3496
|
+
if (t.position === "inside" && (!r || r.disabled || !Ir(r))) return null;
|
|
3497
|
+
let i = Br(e, t.itemId);
|
|
3498
|
+
return i.removed ? Vr(i.items, i.removed, t.targetId, t.position) : null;
|
|
3436
3499
|
}
|
|
3437
|
-
function
|
|
3500
|
+
function Ur(e, t, n) {
|
|
3438
3501
|
return e.map((e) => ({
|
|
3439
3502
|
...e,
|
|
3440
3503
|
label: e.id === t ? n : e.label,
|
|
3441
|
-
children: e.children ?
|
|
3504
|
+
children: e.children ? Ur(e.children, t, n) : void 0
|
|
3442
3505
|
}));
|
|
3443
3506
|
}
|
|
3444
3507
|
//#endregion
|
|
3445
3508
|
//#region src/components/blocks/nav/sidebar/use-ai-sidebar.ts
|
|
3446
|
-
function
|
|
3447
|
-
let [u, d] =
|
|
3509
|
+
function Wr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMoveError: i, onRename: a, activeId: o, defaultActiveId: s = null, onActiveChange: c, defaultExpandedIds: l = [] }) {
|
|
3510
|
+
let [u, d] = V(e ?? t), [f, p] = V(s), [m, h] = V(() => new Set(l)), [g, _] = V(o ?? s), [v, y] = V(null), [b, x] = V(null), [S, C] = V(null), [w, T] = V(null), [E, D] = V(null), O = se(), [k, A] = V(""), j = B(/* @__PURE__ */ new Map()), M = B(!1), N = u, ee = o ?? f, [te, ne] = V(e);
|
|
3448
3511
|
e !== te && (ne(e), e && d(e));
|
|
3449
|
-
let P =
|
|
3512
|
+
let P = le(() => Lr(N, m), [m, N]);
|
|
3450
3513
|
if (!(g !== null && P.some((e) => e.item.id === g))) {
|
|
3451
3514
|
let e = P[0]?.item.id ?? null;
|
|
3452
3515
|
g !== e && _(e);
|
|
3453
3516
|
}
|
|
3454
|
-
|
|
3517
|
+
oe(() => {
|
|
3455
3518
|
if (!S) return;
|
|
3456
3519
|
let e = requestAnimationFrame(() => {
|
|
3457
3520
|
Array.from(document.querySelectorAll("[data-sidebar-resource-menu]")).find((e) => e.dataset.sidebarResourceMenu === S)?.querySelector("button, a[href]")?.focus();
|
|
3458
3521
|
});
|
|
3459
3522
|
return () => cancelAnimationFrame(e);
|
|
3460
3523
|
}, [S]);
|
|
3461
|
-
let F =
|
|
3524
|
+
let F = z((e) => {
|
|
3462
3525
|
d(e), n?.(e);
|
|
3463
|
-
}, [n]), I =
|
|
3464
|
-
if (
|
|
3526
|
+
}, [n]), I = z(async (e) => {
|
|
3527
|
+
if (M.current) {
|
|
3465
3528
|
A("Wait for the current move to finish.");
|
|
3466
3529
|
return;
|
|
3467
3530
|
}
|
|
3468
|
-
let t =
|
|
3531
|
+
let t = N, n = Hr(t, e);
|
|
3469
3532
|
if (!n || n === t) return;
|
|
3470
|
-
|
|
3471
|
-
let a =
|
|
3533
|
+
M.current = !0, F(n), x(null), y(null);
|
|
3534
|
+
let a = Rr(t, e.itemId), o = e.targetId ? Rr(t, e.targetId) : null;
|
|
3472
3535
|
A(o ? `Moved ${a?.label ?? "item"} ${e.position} ${o.label}.` : `Moved ${a?.label ?? "item"} to the top level.`);
|
|
3473
3536
|
try {
|
|
3474
3537
|
await r?.(e);
|
|
3475
3538
|
} catch (n) {
|
|
3476
3539
|
F(t), A(`Move failed. ${a?.label ?? "Item"} was restored.`), i?.(n, e);
|
|
3477
3540
|
} finally {
|
|
3478
|
-
|
|
3541
|
+
M.current = !1;
|
|
3479
3542
|
}
|
|
3480
3543
|
}, [
|
|
3481
3544
|
r,
|
|
3482
3545
|
i,
|
|
3483
|
-
|
|
3546
|
+
N,
|
|
3484
3547
|
F
|
|
3485
|
-
]), L =
|
|
3486
|
-
_(e), requestAnimationFrame(() =>
|
|
3487
|
-
}, []),
|
|
3548
|
+
]), L = z((e) => {
|
|
3549
|
+
_(e), requestAnimationFrame(() => j.current.get(e)?.focus());
|
|
3550
|
+
}, []), re = z((e) => {
|
|
3488
3551
|
o === void 0 && p(e), c?.(e);
|
|
3489
|
-
}, [o, c]),
|
|
3552
|
+
}, [o, c]), R = z((e) => {
|
|
3490
3553
|
h((t) => {
|
|
3491
3554
|
let n = new Set(t);
|
|
3492
3555
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3493
3556
|
});
|
|
3494
|
-
}, []),
|
|
3557
|
+
}, []), ie = z((e, t) => {
|
|
3495
3558
|
let n = P.findIndex(({ item: e }) => e.id === t.item.id), r = P[n - 1], i = P[n + 1], a = e.altKey && e.shiftKey;
|
|
3496
3559
|
if (e.key === "ArrowDown" && !a && i) {
|
|
3497
3560
|
e.preventDefault(), L(i.item.id);
|
|
@@ -3535,7 +3598,7 @@ function Fr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
|
|
|
3535
3598
|
});
|
|
3536
3599
|
return;
|
|
3537
3600
|
}
|
|
3538
|
-
if (a && e.key === "ArrowRight" && r &&
|
|
3601
|
+
if (a && e.key === "ArrowRight" && r && Ir(r.item)) {
|
|
3539
3602
|
e.preventDefault(), h((e) => new Set(e).add(r.item.id)), I({
|
|
3540
3603
|
itemId: t.item.id,
|
|
3541
3604
|
targetId: r.item.id,
|
|
@@ -3551,20 +3614,20 @@ function Fr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
|
|
|
3551
3614
|
});
|
|
3552
3615
|
return;
|
|
3553
3616
|
}
|
|
3554
|
-
e.key === "ArrowRight" &&
|
|
3617
|
+
e.key === "ArrowRight" && Ir(t.item) ? (e.preventDefault(), m.has(t.item.id) ? i?.parentId === t.item.id && L(i.item.id) : R(t.item.id)) : e.key === "ArrowLeft" ? (e.preventDefault(), m.has(t.item.id) ? R(t.item.id) : t.parentId && L(t.parentId)) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), Ir(t.item) ? R(t.item.id) : re(t.item.id)) : e.key === "F2" ? (e.preventDefault(), T(t.item.id)) : (e.key === "ContextMenu" || e.shiftKey && e.key === "F10") && (e.preventDefault(), C(t.item.id));
|
|
3555
3618
|
}, [
|
|
3556
3619
|
m,
|
|
3557
3620
|
P,
|
|
3558
3621
|
L,
|
|
3559
3622
|
I,
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
]),
|
|
3623
|
+
re,
|
|
3624
|
+
R
|
|
3625
|
+
]), ae = z((e) => {
|
|
3563
3626
|
!v || e.target !== e.currentTarget || (e.preventDefault(), x({
|
|
3564
3627
|
id: null,
|
|
3565
3628
|
position: "after"
|
|
3566
3629
|
}));
|
|
3567
|
-
}, [v]), ce =
|
|
3630
|
+
}, [v]), ce = z((e) => {
|
|
3568
3631
|
e.preventDefault(), e.stopPropagation(), v && b && I({
|
|
3569
3632
|
itemId: v,
|
|
3570
3633
|
targetId: b.id,
|
|
@@ -3574,37 +3637,37 @@ function Fr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
|
|
|
3574
3637
|
v,
|
|
3575
3638
|
b,
|
|
3576
3639
|
I
|
|
3577
|
-
]),
|
|
3640
|
+
]), ue = z((e, t) => {
|
|
3578
3641
|
y(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", t);
|
|
3579
|
-
}, []),
|
|
3642
|
+
}, []), de = z(() => {
|
|
3580
3643
|
y(null), x(null);
|
|
3581
|
-
}, []),
|
|
3644
|
+
}, []), fe = z((e, t) => {
|
|
3582
3645
|
if (!v || v === t.item.id) return;
|
|
3583
|
-
let n =
|
|
3584
|
-
if (n &&
|
|
3646
|
+
let n = Rr(N, v);
|
|
3647
|
+
if (n && zr(n, t.item.id)) return;
|
|
3585
3648
|
e.preventDefault(), e.stopPropagation();
|
|
3586
|
-
let r = e.currentTarget.getBoundingClientRect(), i = (e.clientY - r.top) / r.height, a = !t.item.disabled &&
|
|
3649
|
+
let r = e.currentTarget.getBoundingClientRect(), i = (e.clientY - r.top) / r.height, a = !t.item.disabled && Ir(t.item) && i >= .25 && i <= .75 ? "inside" : i < .5 ? "before" : "after";
|
|
3587
3650
|
x({
|
|
3588
3651
|
id: t.item.id,
|
|
3589
3652
|
position: a
|
|
3590
3653
|
});
|
|
3591
|
-
}, [v,
|
|
3654
|
+
}, [v, N]), pe = z((e, t) => {
|
|
3592
3655
|
let n = t.trim();
|
|
3593
3656
|
if (T(null), !n || n === e.item.label) return;
|
|
3594
|
-
let r =
|
|
3595
|
-
F(
|
|
3657
|
+
let r = N;
|
|
3658
|
+
F(Ur(r, e.item.id, n)), Promise.resolve(a?.(e.item, n)).catch(() => {
|
|
3596
3659
|
F(r), A(`Rename failed. ${e.item.label} was restored.`);
|
|
3597
3660
|
});
|
|
3598
3661
|
}, [
|
|
3599
3662
|
a,
|
|
3600
|
-
|
|
3663
|
+
N,
|
|
3601
3664
|
F
|
|
3602
|
-
]),
|
|
3665
|
+
]), me = z((e, t) => {
|
|
3603
3666
|
C(t ? e.item.id : null), t || L(e.item.id);
|
|
3604
3667
|
}, [L]);
|
|
3605
3668
|
return {
|
|
3606
3669
|
flat: P,
|
|
3607
|
-
selectedId:
|
|
3670
|
+
selectedId: ee,
|
|
3608
3671
|
expandedIds: m,
|
|
3609
3672
|
focusedId: g,
|
|
3610
3673
|
setFocusedId: _,
|
|
@@ -3612,39 +3675,39 @@ function Fr({ items: e, defaultItems: t = [], onItemsChange: n, onMove: r, onMov
|
|
|
3612
3675
|
dropTarget: b,
|
|
3613
3676
|
hoveredId: E,
|
|
3614
3677
|
hoverLayoutId: O,
|
|
3615
|
-
handleRowHover:
|
|
3678
|
+
handleRowHover: z((e, t) => {
|
|
3616
3679
|
D((n) => t ? e : n === e ? null : n);
|
|
3617
3680
|
}, []),
|
|
3618
|
-
clearHover:
|
|
3681
|
+
clearHover: z(() => D(null), []),
|
|
3619
3682
|
menuOpenId: S,
|
|
3620
3683
|
renamingId: w,
|
|
3621
3684
|
setRenamingId: T,
|
|
3622
3685
|
announcement: k,
|
|
3623
|
-
select:
|
|
3624
|
-
toggle:
|
|
3625
|
-
handleKeyDown:
|
|
3626
|
-
handleRootDragOver:
|
|
3686
|
+
select: re,
|
|
3687
|
+
toggle: R,
|
|
3688
|
+
handleKeyDown: ie,
|
|
3689
|
+
handleRootDragOver: ae,
|
|
3627
3690
|
handleDrop: ce,
|
|
3628
|
-
handleRowDragStart:
|
|
3629
|
-
handleRowDragEnd:
|
|
3630
|
-
handleRowDragOver:
|
|
3631
|
-
commitRename:
|
|
3632
|
-
handleMenuOpenChange:
|
|
3633
|
-
setRowRef:
|
|
3634
|
-
t ?
|
|
3691
|
+
handleRowDragStart: ue,
|
|
3692
|
+
handleRowDragEnd: de,
|
|
3693
|
+
handleRowDragOver: fe,
|
|
3694
|
+
commitRename: pe,
|
|
3695
|
+
handleMenuOpenChange: me,
|
|
3696
|
+
setRowRef: z((e, t) => {
|
|
3697
|
+
t ? j.current.set(e, t) : j.current.delete(e);
|
|
3635
3698
|
}, [])
|
|
3636
3699
|
};
|
|
3637
3700
|
}
|
|
3638
3701
|
//#endregion
|
|
3639
3702
|
//#region src/components/blocks/nav/sidebar/sidebar-icon.tsx
|
|
3640
|
-
function
|
|
3703
|
+
function Gr(e, t) {
|
|
3641
3704
|
return /* @__PURE__ */ i(e.kind === "folder" || e.kind === "project" ? t ? b : y : e.kind === "bookmark" ? u : _, { className: "size-4" });
|
|
3642
3705
|
}
|
|
3643
3706
|
//#endregion
|
|
3644
3707
|
//#region src/components/blocks/nav/sidebar/marquee-label.tsx
|
|
3645
|
-
function
|
|
3646
|
-
let n =
|
|
3647
|
-
|
|
3708
|
+
function Kr({ active: e, children: t }) {
|
|
3709
|
+
let n = G() ?? !1, r = B(null), o = B(null), [s, c] = V(0);
|
|
3710
|
+
oe(() => {
|
|
3648
3711
|
let e = () => {
|
|
3649
3712
|
let e = r.current, t = o.current;
|
|
3650
3713
|
!e || !t || c(t.scrollWidth > e.clientWidth ? t.scrollWidth + 24 : 0);
|
|
@@ -3657,7 +3720,7 @@ function Lr({ active: e, children: t }) {
|
|
|
3657
3720
|
return /* @__PURE__ */ i("span", {
|
|
3658
3721
|
ref: r,
|
|
3659
3722
|
className: "relative block min-w-0 flex-1 overflow-hidden",
|
|
3660
|
-
children: /* @__PURE__ */ a(
|
|
3723
|
+
children: /* @__PURE__ */ a(W.span, {
|
|
3661
3724
|
className: "flex w-max items-center gap-6 whitespace-nowrap",
|
|
3662
3725
|
animate: { x: l ? [0, -s] : 0 },
|
|
3663
3726
|
transition: l ? {
|
|
@@ -3665,7 +3728,7 @@ function Lr({ active: e, children: t }) {
|
|
|
3665
3728
|
ease: "linear",
|
|
3666
3729
|
repeat: Infinity,
|
|
3667
3730
|
repeatDelay: 2
|
|
3668
|
-
} :
|
|
3731
|
+
} : Fr,
|
|
3669
3732
|
children: [/* @__PURE__ */ i("span", {
|
|
3670
3733
|
ref: o,
|
|
3671
3734
|
children: t
|
|
@@ -3678,11 +3741,11 @@ function Lr({ active: e, children: t }) {
|
|
|
3678
3741
|
}
|
|
3679
3742
|
//#endregion
|
|
3680
3743
|
//#region src/components/motion/popover-position.ts
|
|
3681
|
-
function
|
|
3744
|
+
function qr(e, t) {
|
|
3682
3745
|
return e?.trigger.left === t.trigger.left && e.trigger.top === t.trigger.top && e.trigger.width === t.trigger.width && e.trigger.height === t.trigger.height && e.content.width === t.content.width && e.content.height === t.content.height;
|
|
3683
3746
|
}
|
|
3684
|
-
function
|
|
3685
|
-
let [r, i] =
|
|
3747
|
+
function Jr(e, t, n) {
|
|
3748
|
+
let [r, i] = V(null), a = z(() => {
|
|
3686
3749
|
let n = e.current, r = t.current;
|
|
3687
3750
|
if (!n || !r) return;
|
|
3688
3751
|
let a = n.getBoundingClientRect(), o = {
|
|
@@ -3697,9 +3760,9 @@ function zr(e, t, n) {
|
|
|
3697
3760
|
height: r.offsetHeight
|
|
3698
3761
|
}
|
|
3699
3762
|
};
|
|
3700
|
-
i((e) =>
|
|
3763
|
+
i((e) => qr(e, o) ? e : o);
|
|
3701
3764
|
}, [t, e]);
|
|
3702
|
-
return
|
|
3765
|
+
return ce(() => {
|
|
3703
3766
|
if (a(), !n) return;
|
|
3704
3767
|
let r = e.current, i = t.current, o = new ResizeObserver(a);
|
|
3705
3768
|
return r && o.observe(r), i && o.observe(i), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), () => {
|
|
@@ -3714,17 +3777,17 @@ function zr(e, t, n) {
|
|
|
3714
3777
|
}
|
|
3715
3778
|
//#endregion
|
|
3716
3779
|
//#region src/components/motion/popover-morph.tsx
|
|
3717
|
-
var
|
|
3718
|
-
function
|
|
3719
|
-
let t =
|
|
3780
|
+
var Yr = L(null);
|
|
3781
|
+
function Xr(e) {
|
|
3782
|
+
let t = ae(Yr);
|
|
3720
3783
|
if (!t) throw Error(`${e} must be used within <MorphPopover>`);
|
|
3721
3784
|
return t;
|
|
3722
3785
|
}
|
|
3723
|
-
function
|
|
3724
|
-
let o =
|
|
3786
|
+
function Zr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, className: a }) {
|
|
3787
|
+
let o = se(), s = B(null), c = B(null), l = B(null), [u, d] = V(n), f = t !== void 0, p = f ? t : u, m = z((e) => {
|
|
3725
3788
|
f || d(e), r?.(e);
|
|
3726
|
-
}, [f, r]), h =
|
|
3727
|
-
|
|
3789
|
+
}, [f, r]), h = z(() => m(!p), [m, p]);
|
|
3790
|
+
oe(() => {
|
|
3728
3791
|
if (!p) return;
|
|
3729
3792
|
let e = (e) => e.key === "Escape" && m(!1), t = (e) => {
|
|
3730
3793
|
let t = e.target;
|
|
@@ -3734,7 +3797,7 @@ function Hr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
|
|
|
3734
3797
|
window.removeEventListener("keydown", e), window.removeEventListener("pointerdown", t);
|
|
3735
3798
|
};
|
|
3736
3799
|
}, [p, m]);
|
|
3737
|
-
let g =
|
|
3800
|
+
let g = le(() => ({
|
|
3738
3801
|
open: p,
|
|
3739
3802
|
setOpen: m,
|
|
3740
3803
|
toggle: h,
|
|
@@ -3751,7 +3814,7 @@ function Hr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
|
|
|
3751
3814
|
h,
|
|
3752
3815
|
o
|
|
3753
3816
|
]);
|
|
3754
|
-
return /* @__PURE__ */ i(
|
|
3817
|
+
return /* @__PURE__ */ i(Yr.Provider, {
|
|
3755
3818
|
value: g,
|
|
3756
3819
|
children: /* @__PURE__ */ i("div", {
|
|
3757
3820
|
ref: s,
|
|
@@ -3760,18 +3823,18 @@ function Hr({ children: e, open: t, defaultOpen: n = !1, onOpenChange: r, classN
|
|
|
3760
3823
|
})
|
|
3761
3824
|
});
|
|
3762
3825
|
}
|
|
3763
|
-
function
|
|
3826
|
+
function Qr(...e) {
|
|
3764
3827
|
return (t) => {
|
|
3765
3828
|
for (let n of e) typeof n == "function" ? n(t) : n && typeof n == "object" && (n.current = t);
|
|
3766
3829
|
};
|
|
3767
3830
|
}
|
|
3768
|
-
function
|
|
3769
|
-
let t =
|
|
3770
|
-
if (!
|
|
3831
|
+
function $r({ children: e }) {
|
|
3832
|
+
let t = Xr("MorphPopoverTrigger");
|
|
3833
|
+
if (!ie(e)) return e;
|
|
3771
3834
|
let n = e, r = n.props.onClick, i = n.props.ref;
|
|
3772
|
-
return
|
|
3835
|
+
return I(n, {
|
|
3773
3836
|
id: t.triggerId,
|
|
3774
|
-
ref:
|
|
3837
|
+
ref: Qr(i, (e) => {
|
|
3775
3838
|
t.triggerRef.current = e;
|
|
3776
3839
|
}),
|
|
3777
3840
|
onClick: (e) => {
|
|
@@ -3782,39 +3845,39 @@ function Wr({ children: e }) {
|
|
|
3782
3845
|
"aria-controls": t.open ? t.contentId : void 0
|
|
3783
3846
|
});
|
|
3784
3847
|
}
|
|
3785
|
-
var
|
|
3786
|
-
function
|
|
3848
|
+
var ei = (e, t) => `${e === "bottom" ? "top" : "bottom"} ${t === "end" ? "right" : "left"}`;
|
|
3849
|
+
function ti(e, t, n) {
|
|
3787
3850
|
return `inset(${e === "bottom" ? "0%" : "92%"} ${t === "end" ? "0%" : "92%"} ${e === "bottom" ? "92%" : "0%"} ${t === "end" ? "92%" : "0%"} round ${n}px)`;
|
|
3788
3851
|
}
|
|
3789
|
-
var
|
|
3852
|
+
var ni = (e) => `inset(0% 0% 0% 0% round ${e}px)`, ri = {
|
|
3790
3853
|
duration: .32,
|
|
3791
3854
|
ease: $
|
|
3792
3855
|
};
|
|
3793
|
-
function
|
|
3794
|
-
let s =
|
|
3795
|
-
|
|
3856
|
+
function ii({ children: e, side: t = "bottom", align: n = "end", sideOffset: r = 8, radius: a = 16, className: o }) {
|
|
3857
|
+
let s = Xr("MorphPopoverContent"), { contentId: c, setContentRef: l, triggerId: u } = s, d = G() ?? !1, [f, p] = V(!1), m = Jr(s.triggerRef, s.contentRef, f && s.open);
|
|
3858
|
+
oe(() => p(!0), []);
|
|
3796
3859
|
let h = m ? n === "end" ? m.trigger.left + m.trigger.width - m.content.width : m.trigger.left : 0, g = m ? t === "bottom" ? m.trigger.top + m.trigger.height + r : m.trigger.top - m.content.height - r : 0, _ = d ? void 0 : {
|
|
3797
3860
|
hidden: {
|
|
3798
3861
|
opacity: 0,
|
|
3799
3862
|
scale: .96,
|
|
3800
|
-
transition:
|
|
3863
|
+
transition: zn
|
|
3801
3864
|
},
|
|
3802
3865
|
show: {
|
|
3803
3866
|
opacity: 1,
|
|
3804
3867
|
scale: 1,
|
|
3805
|
-
transition:
|
|
3868
|
+
transition: zn
|
|
3806
3869
|
}
|
|
3807
3870
|
}, v = d ? void 0 : {
|
|
3808
3871
|
hidden: {
|
|
3809
|
-
clipPath:
|
|
3810
|
-
transition:
|
|
3872
|
+
clipPath: ti(t, n, a),
|
|
3873
|
+
transition: ri
|
|
3811
3874
|
},
|
|
3812
3875
|
show: {
|
|
3813
|
-
clipPath:
|
|
3814
|
-
transition:
|
|
3876
|
+
clipPath: ni(a),
|
|
3877
|
+
transition: ri
|
|
3815
3878
|
}
|
|
3816
3879
|
};
|
|
3817
|
-
return f ?
|
|
3880
|
+
return f ? Ae(/* @__PURE__ */ i(U, { children: s.open ? /* @__PURE__ */ i(W.div, {
|
|
3818
3881
|
"data-morph-popover-portal": "",
|
|
3819
3882
|
variants: _,
|
|
3820
3883
|
initial: d ? { opacity: 0 } : "hidden",
|
|
@@ -3825,10 +3888,10 @@ function Yr({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
|
|
|
3825
3888
|
left: h,
|
|
3826
3889
|
top: g,
|
|
3827
3890
|
visibility: m ? "visible" : "hidden",
|
|
3828
|
-
transformOrigin:
|
|
3891
|
+
transformOrigin: ei(t, n)
|
|
3829
3892
|
},
|
|
3830
3893
|
className: "fixed z-[9999] [filter:drop-shadow(0_10px_18px_rgba(0,0,0,0.14))]",
|
|
3831
|
-
children: /* @__PURE__ */ i(
|
|
3894
|
+
children: /* @__PURE__ */ i(W.div, {
|
|
3832
3895
|
ref: l,
|
|
3833
3896
|
id: c,
|
|
3834
3897
|
role: "dialog",
|
|
@@ -3842,7 +3905,7 @@ function Yr({ children: e, side: t = "bottom", align: n = "end", sideOffset: r =
|
|
|
3842
3905
|
}
|
|
3843
3906
|
//#endregion
|
|
3844
3907
|
//#region src/components/blocks/nav/sidebar/sidebar-row.tsx
|
|
3845
|
-
var
|
|
3908
|
+
var ai = {
|
|
3846
3909
|
initial: {
|
|
3847
3910
|
opacity: 0,
|
|
3848
3911
|
filter: "blur(6px)"
|
|
@@ -3855,19 +3918,19 @@ var Xr = {
|
|
|
3855
3918
|
opacity: 0,
|
|
3856
3919
|
filter: "blur(6px)"
|
|
3857
3920
|
}
|
|
3858
|
-
},
|
|
3921
|
+
}, oi = {
|
|
3859
3922
|
initial: { opacity: 0 },
|
|
3860
3923
|
animate: { opacity: 1 },
|
|
3861
3924
|
exit: (e) => e ? {} : { opacity: 0 }
|
|
3862
3925
|
};
|
|
3863
|
-
function
|
|
3864
|
-
let
|
|
3865
|
-
|
|
3866
|
-
l && (
|
|
3867
|
-
|
|
3926
|
+
function si({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTarget: s, menuOpen: c, renaming: l, onDragEnd: u, onDragOver: d, onDragStart: p, onDrop: m, onFocus: h, onKeyDown: g, onMenuOpenChange: _, onRenameCancel: v, onRenameCommit: y, onRenameStart: b, onSelect: x, onToggle: S, hoverActive: C = !1, hoverPill: w = !1, hoverLayoutId: T, onHoverChange: E, renderIcon: D, renderMenu: k, renderActionsTrigger: j, setRef: M }) {
|
|
3927
|
+
let N = G() ?? !1, [ee, te] = V(!1), ne = B(null), P = B(!1), F = B(!1), [L, re] = V(e.item.label), R = Ir(e.item), ie = o === e.item.id, z = s?.id === e.item.id ? s.position : null;
|
|
3928
|
+
oe(() => {
|
|
3929
|
+
l && (P.current = !1, requestAnimationFrame(() => {
|
|
3930
|
+
ne.current?.focus(), ne.current?.select();
|
|
3868
3931
|
}));
|
|
3869
3932
|
}, [l, e.item.label]);
|
|
3870
|
-
let ae =
|
|
3933
|
+
let ae = k?.(e.item, {
|
|
3871
3934
|
close: () => _(!1),
|
|
3872
3935
|
rename: () => {
|
|
3873
3936
|
_(!1), b();
|
|
@@ -3878,65 +3941,65 @@ function Qr({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
|
|
|
3878
3941
|
_(!1), b();
|
|
3879
3942
|
},
|
|
3880
3943
|
className: "flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-xs text-foreground transition-colors outline-none hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
|
|
3881
|
-
children: [/* @__PURE__ */ i(
|
|
3944
|
+
children: [/* @__PURE__ */ i(A, {
|
|
3882
3945
|
"aria-hidden": "true",
|
|
3883
3946
|
className: "size-3.5"
|
|
3884
3947
|
}), "Rename"]
|
|
3885
3948
|
});
|
|
3886
|
-
return /* @__PURE__ */ a(
|
|
3887
|
-
ref:
|
|
3949
|
+
return /* @__PURE__ */ a(W.div, {
|
|
3950
|
+
ref: M,
|
|
3888
3951
|
layout: "position",
|
|
3889
|
-
transition:
|
|
3952
|
+
transition: N ? { duration: 0 } : Bn,
|
|
3890
3953
|
role: "treeitem",
|
|
3891
3954
|
"aria-level": e.depth + 1,
|
|
3892
|
-
"aria-selected":
|
|
3893
|
-
"aria-expanded":
|
|
3955
|
+
"aria-selected": R ? void 0 : t,
|
|
3956
|
+
"aria-expanded": R ? n : void 0,
|
|
3894
3957
|
"aria-disabled": e.item.disabled || void 0,
|
|
3895
3958
|
tabIndex: r ? 0 : -1,
|
|
3896
3959
|
draggable: !e.item.disabled && !l,
|
|
3897
3960
|
"data-menu-open": c || void 0,
|
|
3898
|
-
"data-drop":
|
|
3899
|
-
"data-dragging":
|
|
3961
|
+
"data-drop": z ?? void 0,
|
|
3962
|
+
"data-dragging": ie || void 0,
|
|
3900
3963
|
onFocus: h,
|
|
3901
3964
|
onKeyDown: g,
|
|
3902
3965
|
onClick: (t) => {
|
|
3903
|
-
t.defaultPrevented ||
|
|
3966
|
+
t.defaultPrevented || F.current || l || e.item.disabled || (R ? S() : x());
|
|
3904
3967
|
},
|
|
3905
3968
|
onDoubleClick: (t) => {
|
|
3906
|
-
|
|
3969
|
+
R || e.item.disabled || (t.preventDefault(), b());
|
|
3907
3970
|
},
|
|
3908
3971
|
onMouseEnter: () => {
|
|
3909
|
-
te(!0),
|
|
3972
|
+
te(!0), E?.(!0);
|
|
3910
3973
|
},
|
|
3911
3974
|
onMouseLeave: () => {
|
|
3912
|
-
te(!1),
|
|
3975
|
+
te(!1), E?.(!1);
|
|
3913
3976
|
},
|
|
3914
3977
|
onDragStartCapture: (t) => {
|
|
3915
|
-
|
|
3978
|
+
F.current = !0, p(t, e.item.id);
|
|
3916
3979
|
},
|
|
3917
3980
|
onDragEndCapture: () => {
|
|
3918
3981
|
u(), requestAnimationFrame(() => {
|
|
3919
|
-
|
|
3982
|
+
F.current = !1;
|
|
3920
3983
|
});
|
|
3921
3984
|
},
|
|
3922
3985
|
onDragOver: (t) => d(t, e),
|
|
3923
3986
|
onDrop: m,
|
|
3924
|
-
className: K("group/resource relative flex min-h-9 min-w-0 cursor-pointer items-center gap-2.5 rounded-md pr-3 text-sm outline-none", "text-muted-foreground transition-[color,background-color,scale] duration-150 ease-smooth-out hover:text-foreground motion-reduce:transition-none", !e.item.disabled && !l && "active:scale-97 motion-reduce:active:scale-100",
|
|
3987
|
+
className: K("group/resource relative flex min-h-9 min-w-0 cursor-pointer items-center gap-2.5 rounded-md pr-3 text-sm outline-none", "text-muted-foreground transition-[color,background-color,scale] duration-150 ease-smooth-out hover:text-foreground motion-reduce:transition-none", !e.item.disabled && !l && "active:scale-97 motion-reduce:active:scale-100", T === void 0 && "hover:bg-muted", "focus-visible:bg-muted/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", "data-[menu-open=true]:bg-muted data-[menu-open=true]:text-foreground", "data-[dragging=true]:opacity-40", "data-[drop=inside]:bg-primary/10 data-[drop=inside]:ring-1 data-[drop=inside]:ring-primary/45", "data-[drop=before]:before:absolute data-[drop=before]:before:-top-0.5 data-[drop=before]:before:right-2 data-[drop=before]:before:left-2 data-[drop=before]:before:h-0.5 data-[drop=before]:before:rounded-full data-[drop=before]:before:bg-primary", "data-[drop=after]:after:absolute data-[drop=after]:after:right-2 data-[drop=after]:after:-bottom-0.5 data-[drop=after]:after:left-2 data-[drop=after]:after:h-0.5 data-[drop=after]:after:rounded-full data-[drop=after]:after:bg-primary", !R && t && "bg-primary/10 text-primary dark:bg-primary/25 dark:text-primary-foreground", e.item.disabled && "cursor-not-allowed opacity-45"),
|
|
3925
3988
|
style: { paddingLeft: `${12 + e.depth * 16}px` },
|
|
3926
3989
|
children: [
|
|
3927
|
-
|
|
3990
|
+
T ? /* @__PURE__ */ i(U, {
|
|
3928
3991
|
custom: C,
|
|
3929
|
-
children: C ? /* @__PURE__ */ i(
|
|
3992
|
+
children: C ? /* @__PURE__ */ i(W.span, {
|
|
3930
3993
|
"aria-hidden": "true",
|
|
3931
|
-
variants:
|
|
3994
|
+
variants: N ? oi : ai,
|
|
3932
3995
|
initial: "initial",
|
|
3933
3996
|
animate: "animate",
|
|
3934
3997
|
exit: "exit",
|
|
3935
3998
|
custom: C,
|
|
3936
3999
|
className: "pointer-events-none absolute inset-0",
|
|
3937
|
-
children: w ? /* @__PURE__ */ i(
|
|
3938
|
-
layoutId:
|
|
3939
|
-
transition:
|
|
4000
|
+
children: w ? /* @__PURE__ */ i(W.span, {
|
|
4001
|
+
layoutId: T,
|
|
4002
|
+
transition: N ? { duration: 0 } : Bn,
|
|
3940
4003
|
className: "block h-full w-full rounded-md bg-foreground/8 dark:bg-muted/50"
|
|
3941
4004
|
}) : null
|
|
3942
4005
|
}) : null
|
|
@@ -3944,35 +4007,35 @@ function Qr({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
|
|
|
3944
4007
|
/* @__PURE__ */ i("span", {
|
|
3945
4008
|
"aria-hidden": "true",
|
|
3946
4009
|
className: "relative grid size-5 shrink-0 place-items-center",
|
|
3947
|
-
children:
|
|
4010
|
+
children: D?.(e.item) ?? Gr(e.item, n)
|
|
3948
4011
|
}),
|
|
3949
4012
|
l ? /* @__PURE__ */ i("input", {
|
|
3950
|
-
ref:
|
|
4013
|
+
ref: ne,
|
|
3951
4014
|
value: L,
|
|
3952
4015
|
"aria-label": `Rename ${e.item.label}`,
|
|
3953
|
-
onChange: (e) =>
|
|
4016
|
+
onChange: (e) => re(e.target.value),
|
|
3954
4017
|
draggable: !1,
|
|
3955
4018
|
onClick: (e) => e.stopPropagation(),
|
|
3956
4019
|
onDoubleClick: (e) => e.stopPropagation(),
|
|
3957
4020
|
onBlur: () => {
|
|
3958
|
-
|
|
4021
|
+
P.current || y(L);
|
|
3959
4022
|
},
|
|
3960
4023
|
onKeyDown: (e) => {
|
|
3961
|
-
e.stopPropagation(), e.key === "Enter" && (
|
|
4024
|
+
e.stopPropagation(), e.key === "Enter" && (P.current = !0, y(L)), e.key === "Escape" && (P.current = !0, v());
|
|
3962
4025
|
},
|
|
3963
4026
|
className: "relative h-7 min-w-0 flex-1 text-sm text-foreground outline-none focus-visible:ring-0 focus-visible:ring-ring"
|
|
3964
|
-
}) : /* @__PURE__ */ i(
|
|
3965
|
-
active:
|
|
4027
|
+
}) : /* @__PURE__ */ i(Kr, {
|
|
4028
|
+
active: ee || c,
|
|
3966
4029
|
children: e.item.label
|
|
3967
4030
|
}),
|
|
3968
|
-
!l && !e.item.disabled ? /* @__PURE__ */ a(
|
|
4031
|
+
!l && !e.item.disabled ? /* @__PURE__ */ a(Zr, {
|
|
3969
4032
|
open: c,
|
|
3970
4033
|
onOpenChange: _,
|
|
3971
|
-
children: [/* @__PURE__ */ i(
|
|
3972
|
-
let t =
|
|
4034
|
+
children: [/* @__PURE__ */ i($r, { children: (() => {
|
|
4035
|
+
let t = j?.(e.item);
|
|
3973
4036
|
if (t) {
|
|
3974
4037
|
let e = t.props.onClick;
|
|
3975
|
-
return
|
|
4038
|
+
return I(t, {
|
|
3976
4039
|
draggable: !1,
|
|
3977
4040
|
onClick: (t) => {
|
|
3978
4041
|
t.stopPropagation(), e?.(t);
|
|
@@ -3986,12 +4049,12 @@ function Qr({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
|
|
|
3986
4049
|
"aria-label": `Actions for ${e.item.label}`,
|
|
3987
4050
|
onClick: (e) => e.stopPropagation(),
|
|
3988
4051
|
className: "relative grid size-7 shrink-0 place-items-center rounded-lg opacity-0 transition-opacity duration-150 ease-smooth-out outline-none group-hover/resource:opacity-80 group-hover/resource:delay-150 group-data-[menu-open=true]/resource:opacity-100 hover:bg-foreground/5 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
|
|
3989
|
-
children: /* @__PURE__ */ i(
|
|
4052
|
+
children: /* @__PURE__ */ i(O, {
|
|
3990
4053
|
"aria-hidden": "true",
|
|
3991
4054
|
className: "size-4"
|
|
3992
4055
|
})
|
|
3993
4056
|
});
|
|
3994
|
-
})() }), /* @__PURE__ */ i(
|
|
4057
|
+
})() }), /* @__PURE__ */ i(ii, {
|
|
3995
4058
|
side: "bottom",
|
|
3996
4059
|
align: "end",
|
|
3997
4060
|
sideOffset: 8,
|
|
@@ -4003,7 +4066,7 @@ function Qr({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
|
|
|
4003
4066
|
})
|
|
4004
4067
|
})]
|
|
4005
4068
|
}) : null,
|
|
4006
|
-
e.depth === 0 &&
|
|
4069
|
+
e.depth === 0 && R && (e.item.children?.length ?? 0) > 0 ? /* @__PURE__ */ i(f, {
|
|
4007
4070
|
"aria-hidden": "true",
|
|
4008
4071
|
className: K("relative size-3.5 shrink-0 text-muted-foreground transition-transform duration-200 ease-smooth-out motion-reduce:transition-none", n && "rotate-90")
|
|
4009
4072
|
}) : null
|
|
@@ -4012,8 +4075,8 @@ function Qr({ row: e, active: t, expanded: n, focused: r, draggingId: o, dropTar
|
|
|
4012
4075
|
}
|
|
4013
4076
|
//#endregion
|
|
4014
4077
|
//#region src/components/blocks/nav/sidebar/ai-sidebar.tsx
|
|
4015
|
-
function
|
|
4016
|
-
let { flat: l, selectedId: u, expandedIds: d, focusedId: f, setFocusedId: p, draggingId: m, dropTarget: h, hoveredId: g, hoverLayoutId: _, handleRowHover: v, clearHover: y, menuOpenId: b, renamingId: x, setRenamingId: S, announcement: C, select: w, toggle: T, handleKeyDown: E, handleRootDragOver: D, handleDrop: O, handleRowDragStart: k, handleRowDragEnd: A, handleRowDragOver:
|
|
4078
|
+
function ci({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel: o = "Resources", className: s, ...c }) {
|
|
4079
|
+
let { flat: l, selectedId: u, expandedIds: d, focusedId: f, setFocusedId: p, draggingId: m, dropTarget: h, hoveredId: g, hoverLayoutId: _, handleRowHover: v, clearHover: y, menuOpenId: b, renamingId: x, setRenamingId: S, announcement: C, select: w, toggle: T, handleKeyDown: E, handleRootDragOver: D, handleDrop: O, handleRowDragStart: k, handleRowDragEnd: A, handleRowDragOver: j, commitRename: M, handleMenuOpenChange: N, setRowRef: ee } = Wr(c);
|
|
4017
4080
|
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
4018
4081
|
role: "tree",
|
|
4019
4082
|
"aria-label": o,
|
|
@@ -4022,9 +4085,9 @@ function $r({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel:
|
|
|
4022
4085
|
onDrop: O,
|
|
4023
4086
|
onMouseLeave: y,
|
|
4024
4087
|
className: K("relative min-w-0 flex-col gap-0.5 [overflow-anchor:none] group-data-[state=collapsed]/sidebar:hidden", m && "pb-9 select-none", s),
|
|
4025
|
-
children: [/* @__PURE__ */ i(
|
|
4088
|
+
children: [/* @__PURE__ */ i(U, {
|
|
4026
4089
|
initial: !1,
|
|
4027
|
-
children: l.map((r) => /* @__PURE__ */ i(
|
|
4090
|
+
children: l.map((r) => /* @__PURE__ */ i(si, {
|
|
4028
4091
|
row: r,
|
|
4029
4092
|
active: u === r.item.id,
|
|
4030
4093
|
expanded: d.has(r.item.id),
|
|
@@ -4043,16 +4106,16 @@ function $r({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel:
|
|
|
4043
4106
|
onKeyDown: (e) => E(e, r),
|
|
4044
4107
|
onRenameStart: () => S(r.item.id),
|
|
4045
4108
|
onRenameCancel: () => S(null),
|
|
4046
|
-
onRenameCommit: (e) =>
|
|
4047
|
-
onMenuOpenChange: (e) =>
|
|
4109
|
+
onRenameCommit: (e) => M(r, e),
|
|
4110
|
+
onMenuOpenChange: (e) => N(r, e),
|
|
4048
4111
|
onDragStart: k,
|
|
4049
4112
|
onDragEnd: A,
|
|
4050
|
-
onDragOver:
|
|
4113
|
+
onDragOver: j,
|
|
4051
4114
|
onDrop: O,
|
|
4052
4115
|
renderIcon: e,
|
|
4053
4116
|
renderMenu: t,
|
|
4054
4117
|
renderActionsTrigger: n,
|
|
4055
|
-
setRef: (e) =>
|
|
4118
|
+
setRef: (e) => ee(r.item.id, e)
|
|
4056
4119
|
}, r.item.id))
|
|
4057
4120
|
}), m && /* @__PURE__ */ i("div", {
|
|
4058
4121
|
"aria-hidden": "true",
|
|
@@ -4068,125 +4131,562 @@ function $r({ renderIcon: e, renderMenu: t, renderActionsTrigger: n, ariaLabel:
|
|
|
4068
4131
|
}
|
|
4069
4132
|
//#endregion
|
|
4070
4133
|
//#region src/components/blocks/nav/sidebar/index.ts
|
|
4071
|
-
var
|
|
4072
|
-
Wrapper:
|
|
4073
|
-
MarqueeLabel:
|
|
4074
|
-
Row:
|
|
4075
|
-
Icon:
|
|
4076
|
-
},
|
|
4134
|
+
var li = {
|
|
4135
|
+
Wrapper: ci,
|
|
4136
|
+
MarqueeLabel: Kr,
|
|
4137
|
+
Row: si,
|
|
4138
|
+
Icon: Gr
|
|
4139
|
+
}, ui = "transition-[opacity,scale,box-shadow] duration-200 ease-smooth-out hover:text-neutral-900 hover:shadow-md active:scale-97 dark:bg-neutral-800/95 dark:text-neutral-300 dark:inset-ring-white/10 dark:hover:text-white motion-reduce:transition-none motion-reduce:active:scale-100 z-20", di = "opacity-0 scale-95 group-hover/panel:opacity-100 group-hover/panel:scale-100 focus-visible:opacity-100 focus-visible:scale-100 pointer-coarse:opacity-100 pointer-coarse:scale-100", fi = {
|
|
4140
|
+
card: "bg-neutral-50 dark:bg-neutral-900 rounded-md border-t border-b border-t-white dark:border-t-neutral-700/50 border-b-neutral-900/10 dark:border-b-black/70 shadow-sm shadow-neutral-900/10 dark:shadow-black/50 inset-shadow-sm inset-shadow-white dark:inset-shadow-neutral-800",
|
|
4141
|
+
subtle: "bg-neutral-100 dark:bg-neutral-800",
|
|
4142
|
+
inset: "bg-neutral-200 dark:bg-neutral-700"
|
|
4143
|
+
};
|
|
4077
4144
|
//#endregion
|
|
4078
|
-
//#region src/components/blocks/
|
|
4079
|
-
function
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4145
|
+
//#region src/components/blocks/scaffold/panel-close-button.tsx
|
|
4146
|
+
function pi({ onClick: e, label: t, sound: n = !0, className: r }) {
|
|
4147
|
+
return /* @__PURE__ */ i("button", {
|
|
4148
|
+
id: "scaffold-panel-close-button",
|
|
4149
|
+
"aria-label": t,
|
|
4150
|
+
className: K(ui, di, "absolute top-4 right-3.5 z-10", r),
|
|
4151
|
+
"data-cuelume-press": n ? "" : void 0,
|
|
4152
|
+
"data-cuelume-release": n ? "" : void 0,
|
|
4153
|
+
"data-slot": "scaffold-panel-close",
|
|
4154
|
+
onClick: e,
|
|
4155
|
+
type: "button",
|
|
4156
|
+
children: /* @__PURE__ */ i(Te, {
|
|
4157
|
+
"aria-hidden": !0,
|
|
4158
|
+
className: "size-4"
|
|
4159
|
+
})
|
|
4160
|
+
});
|
|
4161
|
+
}
|
|
4162
|
+
//#endregion
|
|
4163
|
+
//#region src/components/ui/button-group.tsx
|
|
4164
|
+
var mi = c("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
4165
|
+
variants: { orientation: {
|
|
4166
|
+
horizontal: "*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
4167
|
+
vertical: "flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
4168
|
+
} },
|
|
4169
|
+
defaultVariants: { orientation: "horizontal" }
|
|
4170
|
+
});
|
|
4171
|
+
function hi({ className: e, orientation: t, ...n }) {
|
|
4172
|
+
return /* @__PURE__ */ i(Me.div, {
|
|
4173
|
+
role: "group",
|
|
4174
|
+
"data-slot": "button-group",
|
|
4175
|
+
"data-orientation": t,
|
|
4176
|
+
className: K(mi({ orientation: t }), e),
|
|
4177
|
+
...n
|
|
4178
|
+
});
|
|
4179
|
+
}
|
|
4180
|
+
//#endregion
|
|
4181
|
+
//#region src/components/ui/glasscn/glass-button-group.tsx
|
|
4182
|
+
function gi({ className: e, glassVariant: t = "liquid-refract", children: n, ...r }) {
|
|
4183
|
+
return t === "liquid-refract" ? /* @__PURE__ */ i(We, {
|
|
4184
|
+
className: K("", e),
|
|
4185
|
+
children: /* @__PURE__ */ i(hi, {
|
|
4186
|
+
"data-slot": "glass-button-group",
|
|
4187
|
+
"data-glass-variant": t,
|
|
4188
|
+
className: K("bg-transparent", e),
|
|
4189
|
+
...r,
|
|
4190
|
+
children: n
|
|
4191
|
+
})
|
|
4192
|
+
}) : /* @__PURE__ */ i(hi, {
|
|
4193
|
+
"data-slot": "glass-button-group",
|
|
4194
|
+
"data-glass-variant": t,
|
|
4195
|
+
className: K("rounded-lg", Ge[t], e),
|
|
4196
|
+
...r,
|
|
4197
|
+
children: n
|
|
4198
|
+
});
|
|
4199
|
+
}
|
|
4200
|
+
//#endregion
|
|
4201
|
+
//#region src/lib/hooks/use-hover-capable.ts
|
|
4202
|
+
function _i() {
|
|
4203
|
+
let [e, t] = V(!1);
|
|
4204
|
+
return oe(() => {
|
|
4205
|
+
if (typeof window > "u" || !window.matchMedia) return;
|
|
4206
|
+
let e = window.matchMedia("(hover: hover) and (pointer: fine)"), n = () => t(e.matches);
|
|
4207
|
+
return n(), e.addEventListener?.("change", n), () => e.removeEventListener?.("change", n);
|
|
4208
|
+
}, []), e;
|
|
4209
|
+
}
|
|
4210
|
+
//#endregion
|
|
4211
|
+
//#region src/components/blocks/scaffold/constants.ts
|
|
4212
|
+
var vi = 64, yi = 272, bi = 10, xi = 52, Si = 52, Ci = 10, wi = 4e3, Ti = .3, Ei = [
|
|
4213
|
+
.22,
|
|
4214
|
+
1,
|
|
4215
|
+
.36,
|
|
4216
|
+
1
|
|
4217
|
+
], Di = {
|
|
4218
|
+
hidden: {
|
|
4219
|
+
opacity: 0,
|
|
4220
|
+
filter: "blur(4px)"
|
|
4221
|
+
},
|
|
4222
|
+
visible: {
|
|
4223
|
+
opacity: 1,
|
|
4224
|
+
filter: "blur(0px)"
|
|
4225
|
+
},
|
|
4226
|
+
exit: {
|
|
4227
|
+
opacity: 0,
|
|
4228
|
+
filter: "blur(4px)",
|
|
4229
|
+
transition: {
|
|
4230
|
+
duration: .18,
|
|
4231
|
+
ease: $
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
};
|
|
4235
|
+
function Oi({ onClick: e, onExpand: t, secondaryExpanded: n = !1, label: r, sound: o = !0, className: s }) {
|
|
4236
|
+
let c = G(), l = _i(), u = P.useId(), d = P.useRef(null), f = P.useRef(null), p = P.useRef(0), [m, h] = P.useState(!1), g = c ? { duration: 0 } : Bn, _ = P.useRef(void 0), v = P.useRef(0), y = P.useRef(!1);
|
|
4237
|
+
P.useEffect(() => () => clearTimeout(_.current), []);
|
|
4238
|
+
let b = P.useCallback(() => {
|
|
4239
|
+
clearTimeout(_.current);
|
|
4240
|
+
}, []), x = P.useCallback(() => {
|
|
4241
|
+
l && (clearTimeout(_.current), _.current = setTimeout(() => {
|
|
4242
|
+
d.current?.contains(document.activeElement) || h(!1);
|
|
4243
|
+
}, wi));
|
|
4244
|
+
}, [l]);
|
|
4245
|
+
P.useEffect(() => {
|
|
4246
|
+
if (!m || !l) return;
|
|
4247
|
+
let e = document.documentElement;
|
|
4248
|
+
return e.addEventListener("pointerleave", x), window.addEventListener("blur", x), () => {
|
|
4249
|
+
e.removeEventListener("pointerleave", x), window.removeEventListener("blur", x);
|
|
4250
|
+
};
|
|
4251
|
+
}, [
|
|
4252
|
+
m,
|
|
4253
|
+
l,
|
|
4254
|
+
x
|
|
4255
|
+
]), P.useEffect(() => {
|
|
4256
|
+
!m || !y.current || (y.current = !1, f.current?.querySelector("button")?.focus());
|
|
4257
|
+
}, [m]);
|
|
4258
|
+
let S = () => {
|
|
4259
|
+
v.current = Date.now() + 600, h(!1);
|
|
4260
|
+
}, C = (e) => {
|
|
4261
|
+
e?.(), S();
|
|
4084
4262
|
};
|
|
4085
|
-
return
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4263
|
+
return P.useLayoutEffect(() => {
|
|
4264
|
+
let e = f.current;
|
|
4265
|
+
if (e) {
|
|
4266
|
+
if (!m) {
|
|
4267
|
+
e.style.left = `${p.current - e.getBoundingClientRect().left}px`;
|
|
4268
|
+
return;
|
|
4269
|
+
}
|
|
4270
|
+
e.style.left = "", p.current = e.getBoundingClientRect().left;
|
|
4271
|
+
}
|
|
4272
|
+
}, [m]), /* @__PURE__ */ i(gi, {
|
|
4273
|
+
ref: d,
|
|
4274
|
+
layout: !0,
|
|
4275
|
+
transition: g,
|
|
4276
|
+
onPointerEnter: b,
|
|
4277
|
+
onPointerLeave: x,
|
|
4278
|
+
glassVariant: "subtle",
|
|
4279
|
+
className: K(ui, di, "absolute top-1/2 z-10 -translate-y-1/2 overflow-visible!", s),
|
|
4280
|
+
children: /* @__PURE__ */ i(U, {
|
|
4281
|
+
mode: "popLayout",
|
|
4282
|
+
initial: !1,
|
|
4283
|
+
children: m ? /* @__PURE__ */ a(W.div, {
|
|
4284
|
+
ref: f,
|
|
4285
|
+
id: u,
|
|
4286
|
+
layout: !0,
|
|
4287
|
+
variants: Di,
|
|
4288
|
+
initial: c ? { opacity: 0 } : "hidden",
|
|
4289
|
+
animate: c ? { opacity: 1 } : "visible",
|
|
4290
|
+
exit: c ? { opacity: 0 } : "exit",
|
|
4291
|
+
transition: g,
|
|
4292
|
+
className: "relative flex w-max items-stretch",
|
|
4293
|
+
children: [/* @__PURE__ */ a(q, {
|
|
4294
|
+
id: "scaffold-panel-menu-expand",
|
|
4295
|
+
size: "sm",
|
|
4296
|
+
variant: "ghost",
|
|
4297
|
+
sound: o,
|
|
4298
|
+
"data-slot": "scaffold-panel-menu-swap",
|
|
4299
|
+
className: "rounded-r-none",
|
|
4300
|
+
onClick: () => C(t),
|
|
4301
|
+
children: [/* @__PURE__ */ i(T, {
|
|
4302
|
+
size: 16,
|
|
4303
|
+
className: K(n && "rotate-180")
|
|
4304
|
+
}), "Expand"]
|
|
4305
|
+
}), /* @__PURE__ */ a(q, {
|
|
4306
|
+
id: "scaffold-panel-menu-swap",
|
|
4307
|
+
size: "sm",
|
|
4308
|
+
variant: "ghost",
|
|
4309
|
+
sound: o,
|
|
4310
|
+
"data-slot": "scaffold-panel-menu-swap",
|
|
4311
|
+
className: "rounded-l-none border-l-0",
|
|
4312
|
+
onClick: () => C(e),
|
|
4313
|
+
children: [/* @__PURE__ */ i(w, { size: 16 }), "Swap"]
|
|
4314
|
+
})]
|
|
4315
|
+
}, "menu-actions") : /* @__PURE__ */ i(W.div, {
|
|
4316
|
+
layout: !0,
|
|
4317
|
+
variants: Di,
|
|
4318
|
+
initial: c ? { opacity: 0 } : "hidden",
|
|
4319
|
+
animate: c ? { opacity: 1 } : "visible",
|
|
4320
|
+
exit: c ? { opacity: 0 } : "exit",
|
|
4321
|
+
transition: g,
|
|
4322
|
+
className: "flex shrink-0",
|
|
4323
|
+
children: /* @__PURE__ */ i(q, {
|
|
4324
|
+
id: "scaffold-panel-menu-toggle-button",
|
|
4325
|
+
"aria-label": r,
|
|
4326
|
+
"aria-expanded": m,
|
|
4327
|
+
size: "icon-sm",
|
|
4328
|
+
variant: "ghost",
|
|
4329
|
+
sound: o,
|
|
4330
|
+
"data-slot": "scaffold-panel-menu-toggle",
|
|
4331
|
+
onClick: () => {
|
|
4332
|
+
d.current?.contains(document.activeElement) && (y.current = !0), h(!0);
|
|
4333
|
+
},
|
|
4334
|
+
onPointerEnter: () => {
|
|
4335
|
+
!l || Date.now() < v.current || (b(), h(!0));
|
|
4336
|
+
},
|
|
4337
|
+
children: /* @__PURE__ */ i(je, { size: 16 })
|
|
4338
|
+
})
|
|
4339
|
+
}, "menu-toggle")
|
|
4340
|
+
})
|
|
4341
|
+
});
|
|
4342
|
+
}
|
|
4343
|
+
//#endregion
|
|
4344
|
+
//#region src/components/blocks/scaffold/scaffold-context.ts
|
|
4345
|
+
var ki = P.createContext(null);
|
|
4346
|
+
function Ai() {
|
|
4347
|
+
let e = P.useContext(ki);
|
|
4348
|
+
if (!e) throw Error("useScaffoldContext must be used within <Scaffold.Root>");
|
|
4349
|
+
return e;
|
|
4350
|
+
}
|
|
4351
|
+
c("flex w-fit *:focus-visible:z-1 *:has-focus-visible:z-1 has-[>[data-slot=group]]:gap-2 dark:*:[[data-slot=separator]:has(~button:hover):not(:has(~[data-slot=separator]~[data-slot]:hover)),[data-slot=separator]:has(~[data-slot][data-pressed]):not(:has(~[data-slot=separator]~[data-slot][data-pressed]))]:before:bg-input/64 dark:*:[button:hover~[data-slot=separator]:not([data-slot]:hover~[data-slot=separator]~[data-slot=separator]),[data-slot][data-pressed]~[data-slot=separator]:not([data-slot][data-pressed]~[data-slot=separator]~[data-slot=separator])]:before:bg-input/64", {
|
|
4352
|
+
defaultVariants: { orientation: "horizontal" },
|
|
4353
|
+
variants: { orientation: {
|
|
4354
|
+
horizontal: "*:data-slot:has-[~[data-slot]]:rounded-e-none *:data-slot:has-[~[data-slot]]:border-e-0 *:data-slot:has-[~[data-slot]]:before:rounded-e-none *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:-end-[0.5px] *:pointer-coarse:after:min-w-auto *:[[data-slot]~[data-slot]]:rounded-s-none *:[[data-slot]~[data-slot]]:border-s-0 *:[[data-slot]~[data-slot]]:before:rounded-s-none *:[[data-slot]~[data-slot]:not([data-slot=separator])]:before:-start-[0.5px]",
|
|
4355
|
+
vertical: "flex-col *:data-slot:has-[~[data-slot]]:rounded-b-none *:data-slot:has-[~[data-slot]]:border-b-0 *:data-slot:has-[~[data-slot]]:before:rounded-b-none *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:-bottom-[0.5px] *:data-slot:not-data-[slot=separator]:has-[~[data-slot]]:before:hidden dark:*:first:before:block dark:*:last:before:hidden *:pointer-coarse:after:min-h-auto *:[[data-slot]~[data-slot]]:rounded-t-none *:[[data-slot]~[data-slot]]:border-t-0 *:[[data-slot]~[data-slot]]:before:rounded-t-none *:[[data-slot]~[data-slot]:not([data-slot=separator])]:before:-top-[0.5px]"
|
|
4356
|
+
} }
|
|
4357
|
+
});
|
|
4358
|
+
function ji({ className: e, orientation: t = "vertical", ...n }) {
|
|
4359
|
+
return /* @__PURE__ */ i(qt, {
|
|
4360
|
+
className: K("pointer-events-none relative z-2 bg-input before:absolute before:inset-0 has-[+[data-slot=input-control]:focus-within,+[data-slot=input-group]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:translate-x-px has-[+[data-slot=input-control]:focus-within,+[data-slot=input-group]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:bg-ring dark:before:bg-input/32 [[data-slot=input-control]:focus-within+&,[data-slot=input-group]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+&,[data-slot=number-field]:focus-within+input+&]:bg-ring [[data-slot=input-control]:focus-within+&,[data-slot=input-group]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+input+&]:-translate-x-px", e),
|
|
4361
|
+
orientation: t,
|
|
4362
|
+
...n
|
|
4363
|
+
});
|
|
4364
|
+
}
|
|
4365
|
+
//#endregion
|
|
4366
|
+
//#region src/components/blocks/scaffold/scaffold-actions.tsx
|
|
4367
|
+
function Mi({ onAdd: e, addLabel: t = "Panel", addIcon: n, overflowCount: r, onBrowse: o, browseLabel: s = "Browse panels", sound: c = !0, className: l, children: u, ...d }) {
|
|
4368
|
+
let { inspectorOpen: f, inspectorWidth: p } = Ai(), m = G(), h = {
|
|
4369
|
+
"data-cuelume-press": c ? "" : void 0,
|
|
4370
|
+
"data-cuelume-release": c ? "" : void 0
|
|
4371
|
+
}, g = r !== void 0 || o !== void 0;
|
|
4372
|
+
return /* @__PURE__ */ a(W.div, {
|
|
4373
|
+
id: "scaffold-actions",
|
|
4374
|
+
animate: { x: f ? -(p + 10) : 0 },
|
|
4375
|
+
className: K("sticky inline-flex items-center gap-0.5 h-12", "justify-end", l),
|
|
4376
|
+
"data-slot": "scaffold-actions",
|
|
4377
|
+
initial: !1,
|
|
4378
|
+
transition: {
|
|
4379
|
+
duration: m ? 0 : Ti,
|
|
4380
|
+
ease: Ei
|
|
4381
|
+
},
|
|
4382
|
+
...d,
|
|
4383
|
+
children: [u, /* @__PURE__ */ a(gi, {
|
|
4384
|
+
glassVariant: "liquid-refract",
|
|
4385
|
+
className: "rounded-md",
|
|
4386
|
+
children: [
|
|
4387
|
+
/* @__PURE__ */ a(q, {
|
|
4388
|
+
onClick: e,
|
|
4389
|
+
size: "sm",
|
|
4390
|
+
variant: "ghost",
|
|
4391
|
+
children: [n ?? /* @__PURE__ */ i(E, { className: "stroke-3" }), t]
|
|
4392
|
+
}),
|
|
4393
|
+
!g && /* @__PURE__ */ i(ji, {}),
|
|
4394
|
+
g && /* @__PURE__ */ i("button", {
|
|
4395
|
+
"aria-label": s,
|
|
4396
|
+
className: K("flex h-[30px] items-center rounded-full text-neutral-700 transition-[background-color,color,scale,box-shadow] duration-150 ease-smooth-out hover:bg-white hover:text-neutral-900 hover:shadow-xs active:scale-97 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:hover:text-white motion-reduce:transition-none motion-reduce:active:scale-100", "gap-0.5 px-2"),
|
|
4397
|
+
onClick: o,
|
|
4398
|
+
type: "button",
|
|
4399
|
+
...h,
|
|
4400
|
+
children: /* @__PURE__ */ i("span", {
|
|
4401
|
+
className: "relative",
|
|
4402
|
+
children: r !== void 0 && r > 0 && /* @__PURE__ */ i("span", {
|
|
4403
|
+
className: "absolute -top-1.5 -right-1.5 flex size-3.5 items-center justify-center rounded-full bg-neutral-700 text-[9px] font-semibold text-white dark:bg-neutral-200 dark:text-neutral-900",
|
|
4404
|
+
children: r
|
|
4405
|
+
})
|
|
4406
|
+
})
|
|
4407
|
+
}),
|
|
4408
|
+
u
|
|
4409
|
+
]
|
|
4410
|
+
})]
|
|
4411
|
+
});
|
|
4412
|
+
}
|
|
4413
|
+
//#endregion
|
|
4414
|
+
//#region src/components/blocks/scaffold/scaffold-canvas.tsx
|
|
4415
|
+
function Ni({ className: e, children: t, ...n }) {
|
|
4416
|
+
return /* @__PURE__ */ i("div", {
|
|
4417
|
+
className: K("relative flex w-full flex-1 gap-2", e),
|
|
4418
|
+
"data-slot": "scaffold-canvas",
|
|
4419
|
+
...n,
|
|
4420
|
+
children: /* @__PURE__ */ i(U, {
|
|
4421
|
+
initial: !1,
|
|
4422
|
+
mode: "popLayout",
|
|
4423
|
+
children: t
|
|
4424
|
+
})
|
|
4425
|
+
});
|
|
4426
|
+
}
|
|
4427
|
+
//#endregion
|
|
4428
|
+
//#region src/components/ui/glasscn/glass-container.tsx
|
|
4429
|
+
var Pi = {
|
|
4430
|
+
clear: [
|
|
4431
|
+
"[--sidebar:rgba(255,255,255,0.18)]",
|
|
4432
|
+
"[--sidebar-foreground:oklch(0.145_0_0)]",
|
|
4433
|
+
"[--sidebar-accent:rgba(255,255,255,0.48)]",
|
|
4434
|
+
"[--sidebar-accent-foreground:oklch(0.145_0_0)]",
|
|
4435
|
+
"[--sidebar-border:rgba(255,255,255,0.34)]",
|
|
4436
|
+
"[--sidebar-ring:rgba(255,255,255,0.38)]",
|
|
4437
|
+
"dark:[--sidebar:rgba(0,0,0,0.28)]",
|
|
4438
|
+
"dark:[--sidebar-foreground:oklch(0.985_0_0)]",
|
|
4439
|
+
"dark:[--sidebar-accent:rgba(255,255,255,0.1)]",
|
|
4440
|
+
"dark:[--sidebar-accent-foreground:oklch(0.985_0_0)]",
|
|
4441
|
+
"dark:[--sidebar-border:rgba(255,255,255,0.12)]",
|
|
4442
|
+
"dark:[--sidebar-ring:rgba(255,255,255,0.16)]"
|
|
4443
|
+
].join(" "),
|
|
4444
|
+
frosted: [
|
|
4445
|
+
"[--sidebar:rgba(255,255,255,0.4)]",
|
|
4446
|
+
"[--sidebar-foreground:oklch(0.145_0_0)]",
|
|
4447
|
+
"[--sidebar-accent:rgba(255,255,255,0.62)]",
|
|
4448
|
+
"[--sidebar-accent-foreground:oklch(0.145_0_0)]",
|
|
4449
|
+
"[--sidebar-border:rgba(255,255,255,0.3)]",
|
|
4450
|
+
"[--sidebar-ring:rgba(255,255,255,0.32)]",
|
|
4451
|
+
"dark:[--sidebar:rgba(0,0,0,0.38)]",
|
|
4452
|
+
"dark:[--sidebar-foreground:oklch(0.985_0_0)]",
|
|
4453
|
+
"dark:[--sidebar-accent:rgba(255,255,255,0.14)]",
|
|
4454
|
+
"dark:[--sidebar-accent-foreground:oklch(0.985_0_0)]",
|
|
4455
|
+
"dark:[--sidebar-border:rgba(255,255,255,0.1)]",
|
|
4456
|
+
"dark:[--sidebar-ring:rgba(255,255,255,0.14)]"
|
|
4457
|
+
].join(" "),
|
|
4458
|
+
subtle: [
|
|
4459
|
+
"[--sidebar:rgba(255,255,255,0.14)]",
|
|
4460
|
+
"[--sidebar-foreground:oklch(0.145_0_0)]",
|
|
4461
|
+
"[--sidebar-accent:rgba(255,255,255,0.28)]",
|
|
4462
|
+
"[--sidebar-accent-foreground:oklch(0.145_0_0)]",
|
|
4463
|
+
"[--sidebar-border:rgba(0,0,0,0.05)]",
|
|
4464
|
+
"[--sidebar-ring:rgba(255,255,255,0.28)]",
|
|
4465
|
+
"dark:[--sidebar:rgba(255,255,255,0.05)]",
|
|
4466
|
+
"dark:[--sidebar-foreground:oklch(0.985_0_0)]",
|
|
4467
|
+
"dark:[--sidebar-accent:rgba(255,255,255,0.08)]",
|
|
4468
|
+
"dark:[--sidebar-accent-foreground:oklch(0.985_0_0)]",
|
|
4469
|
+
"dark:[--sidebar-border:rgba(255,255,255,0.08)]",
|
|
4470
|
+
"dark:[--sidebar-ring:rgba(255,255,255,0.12)]"
|
|
4471
|
+
].join(" "),
|
|
4472
|
+
liquid: [
|
|
4473
|
+
"[--sidebar:rgba(255,255,255,0.22)]",
|
|
4474
|
+
"[--sidebar-foreground:oklch(0.145_0_0)]",
|
|
4475
|
+
"[--sidebar-accent:rgba(255,255,255,0.55)]",
|
|
4476
|
+
"[--sidebar-accent-foreground:oklch(0.145_0_0)]",
|
|
4477
|
+
"[--sidebar-border:rgba(255,255,255,0.42)]",
|
|
4478
|
+
"[--sidebar-ring:rgba(255,255,255,0.45)]",
|
|
4479
|
+
"dark:[--sidebar:rgba(255,255,255,0.06)]",
|
|
4480
|
+
"dark:[--sidebar-foreground:oklch(0.985_0_0)]",
|
|
4481
|
+
"dark:[--sidebar-accent:rgba(255,255,255,0.12)]",
|
|
4482
|
+
"dark:[--sidebar-accent-foreground:oklch(0.985_0_0)]",
|
|
4483
|
+
"dark:[--sidebar-border:rgba(255,255,255,0.16)]",
|
|
4484
|
+
"dark:[--sidebar-ring:rgba(255,255,255,0.20)]"
|
|
4485
|
+
].join(" "),
|
|
4486
|
+
"liquid-refract": [
|
|
4487
|
+
"[--sidebar:rgba(255,255,255,0.18)]",
|
|
4488
|
+
"[--sidebar-foreground:oklch(0.145_0_0)]",
|
|
4489
|
+
"[--sidebar-accent:rgba(255,255,255,0.48)]",
|
|
4490
|
+
"[--sidebar-accent-foreground:oklch(0.145_0_0)]",
|
|
4491
|
+
"[--sidebar-border:rgba(255,255,255,0.34)]",
|
|
4492
|
+
"[--sidebar-ring:rgba(255,255,255,0.38)]",
|
|
4493
|
+
"dark:[--sidebar-foreground:oklch(0.985_0_0)]",
|
|
4494
|
+
"dark:[--sidebar-accent:rgba(255,255,255,0.12)]",
|
|
4495
|
+
"dark:[--sidebar-accent-foreground:oklch(0.985_0_0)]",
|
|
4496
|
+
"dark:[--sidebar-border:rgba(255,255,255,0.15)]",
|
|
4497
|
+
"dark:[--sidebar-ring:rgba(255,255,255,0.18)]"
|
|
4498
|
+
].join(" ")
|
|
4499
|
+
};
|
|
4500
|
+
function Fi(e) {
|
|
4501
|
+
return K(Ge[e], Pi[e], "overflow-hidden", "shadow-[0_24px_80px_rgba(15,23,42,0.08)] dark:shadow-[0_24px_80px_rgba(0,0,0,0.28)]");
|
|
4502
|
+
}
|
|
4503
|
+
function Ii({ glassVariant: e = "liquid-refract", className: t, children: n, ...r }) {
|
|
4504
|
+
return /* @__PURE__ */ i(We, {
|
|
4505
|
+
className: K("rounded-[1.75rem]", t),
|
|
4506
|
+
blur: 5,
|
|
4507
|
+
refraction: 50,
|
|
4508
|
+
children: /* @__PURE__ */ i("div", {
|
|
4509
|
+
className: K(Fi(e), e === "liquid-refract" && "border-0 bg-transparent shadow-none", t),
|
|
4510
|
+
...r,
|
|
4511
|
+
children: n
|
|
4512
|
+
})
|
|
4513
|
+
});
|
|
4514
|
+
}
|
|
4515
|
+
//#endregion
|
|
4516
|
+
//#region src/components/blocks/scaffold/scaffold-inspector.tsx
|
|
4517
|
+
function Li({ children: e, name: t = "Inspector", className: n, ...r }) {
|
|
4518
|
+
let { inspectorOpen: a, inspectorWidth: o } = Ai(), s = G(), c = o + 10 + 12;
|
|
4519
|
+
return /* @__PURE__ */ i(W.aside, {
|
|
4520
|
+
id: "scaffold-inspector",
|
|
4521
|
+
animate: { x: a ? 0 : c },
|
|
4522
|
+
"aria-hidden": !a || void 0,
|
|
4523
|
+
"aria-label": t,
|
|
4524
|
+
className: K("absolute right-0 w-80 z-20 my-2 flex h-full max-h-[calc(100%-1rem)] flex-col", !a && "pointer-events-none", n),
|
|
4525
|
+
"data-slot": "scaffold-inspector",
|
|
4526
|
+
inert: !a || void 0,
|
|
4527
|
+
initial: !1,
|
|
4528
|
+
role: "complementary",
|
|
4529
|
+
style: { width: o },
|
|
4530
|
+
transition: {
|
|
4531
|
+
duration: s ? 0 : Ti,
|
|
4532
|
+
ease: Ei
|
|
4533
|
+
},
|
|
4534
|
+
...r,
|
|
4535
|
+
children: /* @__PURE__ */ i(Ii, {
|
|
4536
|
+
className: "flex flex-col shadow-inner shadow-md rounded-md flex-1 border-t border-white dark:border-neutral-900 bg-neutral-50/10 dark:bg-black/10",
|
|
4537
|
+
glassVariant: "subtle",
|
|
4538
|
+
children: e
|
|
4539
|
+
})
|
|
4540
|
+
});
|
|
4541
|
+
}
|
|
4542
|
+
//#endregion
|
|
4543
|
+
//#region src/components/blocks/scaffold/scaffold-main.tsx
|
|
4544
|
+
function Ri({ className: e, children: t, ...n }) {
|
|
4545
|
+
return /* @__PURE__ */ i("div", {
|
|
4546
|
+
id: "scaffold-main",
|
|
4547
|
+
className: K("relative flex h-full min-w-0 flex-1 flex-col", e),
|
|
4548
|
+
"data-slot": "scaffold-main",
|
|
4549
|
+
...n,
|
|
4550
|
+
children: t
|
|
4551
|
+
});
|
|
4552
|
+
}
|
|
4553
|
+
//#endregion
|
|
4554
|
+
//#region src/components/blocks/scaffold/scaffold-sub-panel.tsx
|
|
4555
|
+
function zi({ className: e, children: t, variant: n = "card", primary: r = !1, expanded: a, ...o }) {
|
|
4556
|
+
let s = Ne(), c = a ?? r;
|
|
4557
|
+
return /* @__PURE__ */ i(Me.div, {
|
|
4558
|
+
layout: "size",
|
|
4559
|
+
id: `scaffold-sub-panel-${n}`,
|
|
4560
|
+
initial: !1,
|
|
4561
|
+
animate: { flexGrow: +!!c },
|
|
4562
|
+
transition: s ? { duration: 0 } : {
|
|
4563
|
+
duration: Ti,
|
|
4564
|
+
ease: Ei
|
|
4565
|
+
},
|
|
4566
|
+
className: K("flex w-full flex-col", fi[n], r ? "basis-14 min-h-14 overflow-clip" : "basis-auto min-h-14", e),
|
|
4567
|
+
"data-slot": `scaffold-sub-panel-${n}`,
|
|
4568
|
+
"data-expanded": c ? "" : void 0,
|
|
4569
|
+
...o,
|
|
4570
|
+
children: t
|
|
4571
|
+
});
|
|
4572
|
+
}
|
|
4573
|
+
//#endregion
|
|
4574
|
+
//#region src/components/blocks/scaffold/scaffold-panel.tsx
|
|
4575
|
+
function Bi({ children: e, SecondaryPanel: t, onClose: n, onSwap: r, name: o, closeLabel: s = "Close panel", swapLabel: c = "Swap panel content", sound: l = !0, className: u }) {
|
|
4576
|
+
let d = {
|
|
4577
|
+
duration: G() ? 0 : Ti,
|
|
4578
|
+
ease: Ei
|
|
4579
|
+
}, [f, p] = V("top"), [m, h] = V(!1);
|
|
4580
|
+
return /* @__PURE__ */ a(W.section, {
|
|
4581
|
+
id: "scaffold-panel",
|
|
4582
|
+
animate: { flexDirection: m ? "column-reverse" : "column" },
|
|
4583
|
+
"aria-label": o,
|
|
4584
|
+
className: K("group/panel relative flex min-w-80 flex-1 flex-col", u),
|
|
4585
|
+
layout: !0,
|
|
4586
|
+
"data-slot": "scaffold-panel",
|
|
4587
|
+
"data-swapped": m ? "" : void 0,
|
|
4588
|
+
transition: d,
|
|
4090
4589
|
children: [
|
|
4091
|
-
/* @__PURE__ */ i(
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
children: n?.left?.component
|
|
4590
|
+
/* @__PURE__ */ i(zi, {
|
|
4591
|
+
id: "top",
|
|
4592
|
+
expanded: f === "top",
|
|
4593
|
+
primary: !0,
|
|
4594
|
+
children: e
|
|
4097
4595
|
}),
|
|
4098
|
-
/* @__PURE__ */
|
|
4099
|
-
className:
|
|
4100
|
-
children:
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
children: /* @__PURE__ */ i(sr, {
|
|
4112
|
-
"aria-label": "Toggle panel",
|
|
4113
|
-
side: "right",
|
|
4114
|
-
children: n?.right?.trigger ?? /* @__PURE__ */ i(Ee, {
|
|
4115
|
-
name: "PanelRight",
|
|
4116
|
-
size: 24,
|
|
4117
|
-
animation: "press"
|
|
4118
|
-
})
|
|
4119
|
-
})
|
|
4120
|
-
})]
|
|
4121
|
-
}), /* @__PURE__ */ i("div", {
|
|
4122
|
-
className: "min-h-24 flex-1 overflow-auto",
|
|
4123
|
-
children: e ?? /* @__PURE__ */ i(ri, {})
|
|
4124
|
-
})]
|
|
4596
|
+
r && t && /* @__PURE__ */ i("div", {
|
|
4597
|
+
className: "relative flex items-center justify-center h-2",
|
|
4598
|
+
children: /* @__PURE__ */ i(Oi, {
|
|
4599
|
+
label: c,
|
|
4600
|
+
onClick: () => {
|
|
4601
|
+
h((e) => !e), r?.();
|
|
4602
|
+
},
|
|
4603
|
+
onExpand: () => {
|
|
4604
|
+
p((e) => e === "top" ? "bottom" : "top");
|
|
4605
|
+
},
|
|
4606
|
+
secondaryExpanded: f === "bottom",
|
|
4607
|
+
sound: l
|
|
4608
|
+
})
|
|
4125
4609
|
}),
|
|
4126
|
-
/* @__PURE__ */ i(
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4610
|
+
t && /* @__PURE__ */ i(zi, {
|
|
4611
|
+
id: "bottom",
|
|
4612
|
+
expanded: f === "bottom",
|
|
4613
|
+
children: t
|
|
4614
|
+
}),
|
|
4615
|
+
n && /* @__PURE__ */ i(pi, {
|
|
4616
|
+
label: s,
|
|
4617
|
+
onClick: n,
|
|
4618
|
+
sound: l
|
|
4135
4619
|
})
|
|
4136
4620
|
]
|
|
4137
4621
|
});
|
|
4138
4622
|
}
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4623
|
+
//#endregion
|
|
4624
|
+
//#region src/components/blocks/scaffold/scaffold-root.tsx
|
|
4625
|
+
function Vi({ inspectorOpen: e, defaultInspectorOpen: t, onInspectorOpenChange: n, inspectorWidth: r = 272, className: a, children: o, ...s }) {
|
|
4626
|
+
let [c, l] = P.useState(t ?? !1), u = e ?? c, d = P.useCallback((t) => {
|
|
4627
|
+
e === void 0 && l(t), n?.(t);
|
|
4628
|
+
}, [e, n]), f = P.useCallback(() => d(!u), [u, d]), p = P.useMemo(() => ({
|
|
4629
|
+
inspectorOpen: u,
|
|
4630
|
+
inspectorWidth: r,
|
|
4631
|
+
setInspectorOpen: d,
|
|
4632
|
+
toggleInspector: f
|
|
4633
|
+
}), [
|
|
4634
|
+
u,
|
|
4635
|
+
r,
|
|
4636
|
+
d,
|
|
4637
|
+
f
|
|
4638
|
+
]);
|
|
4639
|
+
return /* @__PURE__ */ i(ki.Provider, {
|
|
4640
|
+
value: p,
|
|
4641
|
+
children: /* @__PURE__ */ i("div", {
|
|
4642
|
+
id: "scaffold-root",
|
|
4643
|
+
className: K("relative isolate flex h-full w-full flex-1 overflow-clip pr-2 pb-2", "bg-linear-to-tr/increasing from-neutral-200 via-neutral-100 to-stone-200 dark:from-neutral-900 dark:via-neutral-950 dark:to-stone-950", a),
|
|
4644
|
+
"data-slot": "scaffold",
|
|
4645
|
+
...s,
|
|
4646
|
+
children: o
|
|
4647
|
+
})
|
|
4146
4648
|
});
|
|
4147
4649
|
}
|
|
4148
4650
|
//#endregion
|
|
4149
|
-
//#region src/components/blocks/
|
|
4150
|
-
function
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
}), n?.(e, t);
|
|
4167
|
-
}, [n]);
|
|
4651
|
+
//#region src/components/blocks/scaffold/scaffold-sidebar.tsx
|
|
4652
|
+
function Hi({ className: e, children: t, ...n }) {
|
|
4653
|
+
return /* @__PURE__ */ i("nav", {
|
|
4654
|
+
id: "scaffold-sidebar",
|
|
4655
|
+
"aria-label": "Primary",
|
|
4656
|
+
className: K("flex min-w-20 shrink-0 flex-col items-center gap-1 pt-8 pb-2", e),
|
|
4657
|
+
"data-slot": "scaffold-sidebar",
|
|
4658
|
+
...n,
|
|
4659
|
+
children: t
|
|
4660
|
+
});
|
|
4661
|
+
}
|
|
4662
|
+
//#endregion
|
|
4663
|
+
//#region src/components/blocks/scaffold/use-scaffold.ts
|
|
4664
|
+
function Ui({ defaultInspectorOpen: e, onInspectorChange: t } = {}) {
|
|
4665
|
+
let [n, r] = V(e ?? !1), i = z((e) => {
|
|
4666
|
+
r((n) => (n !== e && t?.(e), e));
|
|
4667
|
+
}, [t]);
|
|
4168
4668
|
return {
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
onOpenChange: s,
|
|
4177
|
-
openMobile: a,
|
|
4178
|
-
onOpenMobileChange: c
|
|
4179
|
-
}), [
|
|
4180
|
-
r,
|
|
4181
|
-
a,
|
|
4182
|
-
s,
|
|
4183
|
-
c
|
|
4184
|
-
])
|
|
4669
|
+
inspectorOpen: n,
|
|
4670
|
+
setInspectorOpen: i,
|
|
4671
|
+
toggleInspector: z(() => i(!n), [n, i]),
|
|
4672
|
+
providerProps: le(() => ({
|
|
4673
|
+
inspectorOpen: n,
|
|
4674
|
+
onInspectorOpenChange: i
|
|
4675
|
+
}), [n, i])
|
|
4185
4676
|
};
|
|
4186
4677
|
}
|
|
4187
4678
|
//#endregion
|
|
4188
|
-
//#region src/components/blocks/
|
|
4189
|
-
var
|
|
4679
|
+
//#region src/components/blocks/scaffold/index.ts
|
|
4680
|
+
var Wi = {
|
|
4681
|
+
Root: Vi,
|
|
4682
|
+
Sidebar: Hi,
|
|
4683
|
+
Main: Ri,
|
|
4684
|
+
Actions: Mi,
|
|
4685
|
+
Canvas: Ni,
|
|
4686
|
+
Panel: Bi,
|
|
4687
|
+
Inspector: Li,
|
|
4688
|
+
SubPanel: zi
|
|
4689
|
+
}, Gi = { Main: hr }, Ki = [
|
|
4190
4690
|
{
|
|
4191
4691
|
type: "label",
|
|
4192
4692
|
label: "Management"
|
|
@@ -4194,18 +4694,18 @@ var ai = { Main: ni }, oi = [
|
|
|
4194
4694
|
{
|
|
4195
4695
|
id: "profile",
|
|
4196
4696
|
label: "Profile",
|
|
4197
|
-
icon: /* @__PURE__ */ i(
|
|
4697
|
+
icon: /* @__PURE__ */ i(N, { "aria-hidden": "true" })
|
|
4198
4698
|
},
|
|
4199
4699
|
{
|
|
4200
4700
|
id: "settings",
|
|
4201
4701
|
label: "Settings",
|
|
4202
|
-
icon: /* @__PURE__ */ i(
|
|
4702
|
+
icon: /* @__PURE__ */ i(j, { "aria-hidden": "true" })
|
|
4203
4703
|
},
|
|
4204
4704
|
{ type: "separator" },
|
|
4205
4705
|
{
|
|
4206
4706
|
id: "teams",
|
|
4207
4707
|
label: "Teams",
|
|
4208
|
-
icon: /* @__PURE__ */ i(
|
|
4708
|
+
icon: /* @__PURE__ */ i(te, { "aria-hidden": "true" })
|
|
4209
4709
|
},
|
|
4210
4710
|
{
|
|
4211
4711
|
id: "invite",
|
|
@@ -4220,17 +4720,17 @@ var ai = { Main: ni }, oi = [
|
|
|
4220
4720
|
variant: "destructive"
|
|
4221
4721
|
}
|
|
4222
4722
|
];
|
|
4223
|
-
function
|
|
4723
|
+
function qi(e) {
|
|
4224
4724
|
let t = [], n = { actions: [] };
|
|
4225
4725
|
for (let r of e) r.type === "separator" ? (t.push(n), n = { actions: [] }) : r.type === "label" ? n.label = r.label : n.actions.push(r);
|
|
4226
4726
|
return t.push(n), t.filter((e) => e.actions.length > 0 || e.label !== void 0);
|
|
4227
4727
|
}
|
|
4228
|
-
function
|
|
4229
|
-
let [h, g] =
|
|
4230
|
-
|
|
4728
|
+
function Ji({ user: e, items: t = Ki, align: n = "center", side: r = "bottom", sideOffset: o = 8, menuWidth: s = "content", open: c, defaultOpen: l, onOpenChange: u, sound: d = !0, onError: f, className: p }) {
|
|
4729
|
+
let [h, g] = P.useState(null), _ = P.useRef(!0);
|
|
4730
|
+
P.useEffect(() => (_.current = !0, () => {
|
|
4231
4731
|
_.current = !1;
|
|
4232
4732
|
}), []);
|
|
4233
|
-
let v =
|
|
4733
|
+
let v = P.useMemo(() => qi(t), [t]);
|
|
4234
4734
|
function y(e) {
|
|
4235
4735
|
let t = e.onSelect?.();
|
|
4236
4736
|
t instanceof Promise && (g(e.id), t.catch((e) => f?.(e)).finally(() => {
|
|
@@ -4238,13 +4738,13 @@ function ci({ user: e, items: t = oi, align: n = "center", side: r = "bottom", s
|
|
|
4238
4738
|
}));
|
|
4239
4739
|
}
|
|
4240
4740
|
let b = h !== null;
|
|
4241
|
-
return /* @__PURE__ */ a(
|
|
4741
|
+
return /* @__PURE__ */ a(jt, {
|
|
4242
4742
|
defaultOpen: l,
|
|
4243
4743
|
onOpenChange: (e, t) => {
|
|
4244
|
-
d &&
|
|
4744
|
+
d && ct(e ? "bloom" : "droplet"), u?.(e, t);
|
|
4245
4745
|
},
|
|
4246
4746
|
open: c,
|
|
4247
|
-
children: [/* @__PURE__ */ i(
|
|
4747
|
+
children: [/* @__PURE__ */ i(Nt, {
|
|
4248
4748
|
disabled: b,
|
|
4249
4749
|
render: /* @__PURE__ */ a(q, {
|
|
4250
4750
|
"aria-label": `${e.name}${e.username ? ` ${e.username}` : ""}, account menu`,
|
|
@@ -4255,7 +4755,7 @@ function ci({ user: e, items: t = oi, align: n = "center", side: r = "bottom", s
|
|
|
4255
4755
|
variant: "ghost",
|
|
4256
4756
|
children: [/* @__PURE__ */ a("span", {
|
|
4257
4757
|
className: "flex w-full min-w-0 items-center justify-start gap-2",
|
|
4258
|
-
children: [/* @__PURE__ */ i(
|
|
4758
|
+
children: [/* @__PURE__ */ i(ln, {
|
|
4259
4759
|
alt: "",
|
|
4260
4760
|
initials: e.initials,
|
|
4261
4761
|
name: e.name,
|
|
@@ -4275,25 +4775,25 @@ function ci({ user: e, items: t = oi, align: n = "center", side: r = "bottom", s
|
|
|
4275
4775
|
className: "size-3.5"
|
|
4276
4776
|
})]
|
|
4277
4777
|
})
|
|
4278
|
-
}), /* @__PURE__ */ i(
|
|
4778
|
+
}), /* @__PURE__ */ i(Pt, {
|
|
4279
4779
|
align: n,
|
|
4280
4780
|
className: K(s === "card" ? "w-(--anchor-width)" : "min-w-44!", "origin-(--transform-origin) transition-[opacity,scale,translate] duration-150 ease-smooth-out data-ending-style:scale-98 data-ending-style:opacity-0 data-ending-style:duration-100 data-starting-style:scale-98 data-starting-style:opacity-0 data-[side=bottom]:data-ending-style:-translate-y-1 data-[side=bottom]:data-starting-style:-translate-y-1 data-[side=top]:data-ending-style:translate-y-1 data-[side=top]:data-starting-style:translate-y-1 motion-reduce:transition-none"),
|
|
4281
4781
|
side: r,
|
|
4282
4782
|
sideOffset: o,
|
|
4283
|
-
children: v.map((e, t) => /* @__PURE__ */ a(
|
|
4783
|
+
children: v.map((e, t) => /* @__PURE__ */ a(P.Fragment, { children: [t > 0 ? /* @__PURE__ */ i(Ht, {}) : null, /* @__PURE__ */ a(Ft, { children: [e.label ? /* @__PURE__ */ i(Vt, { children: e.label }) : null, e.actions.map((e) => /* @__PURE__ */ a(It, {
|
|
4284
4784
|
disabled: e.disabled,
|
|
4285
4785
|
onClick: () => y(e),
|
|
4286
4786
|
variant: e.variant,
|
|
4287
4787
|
children: [
|
|
4288
4788
|
e.icon,
|
|
4289
4789
|
/* @__PURE__ */ i("span", { children: e.label }),
|
|
4290
|
-
e.shortcut ? /* @__PURE__ */ i(
|
|
4790
|
+
e.shortcut ? /* @__PURE__ */ i(Ut, { children: e.shortcut }) : null
|
|
4291
4791
|
]
|
|
4292
4792
|
}, e.id))] })] }, e.label ?? `group-${e.actions[0]?.id}`))
|
|
4293
4793
|
})]
|
|
4294
4794
|
});
|
|
4295
4795
|
}
|
|
4296
4796
|
//#endregion
|
|
4297
|
-
export {
|
|
4797
|
+
export { ci as AISidebar, dr as AnimatedPanel, dr as AnimatedSidebar, mr as AnimatedPanelInset, mr as AnimatedSidebarInset, fr as AnimatedPanelProvider, fr as AnimatedSidebarProvider, pr as AnimatedPanelTrigger, pr as AnimatedSidebarTrigger, vr as AnimatedSidebarContent, rr as AnimatedSidebarContext, yr as AnimatedSidebarFooter, br as AnimatedSidebarGroup, Sr as AnimatedSidebarGroupContent, xr as AnimatedSidebarGroupLabel, _r as AnimatedSidebarHeader, Er as AnimatedSidebarMenu, jr as AnimatedSidebarMenuButton, Dr as AnimatedSidebarMenuItem, Or as AnimatedSidebarMenuSub, Ar as AnimatedSidebarMenuSubButton, kr as AnimatedSidebarMenuSubItem, ir as AnimatedSidebarPanelContext, fn as AuthCard, Q as AuthError, hn as AuthSeparator, mn as AuthSuccess, Pe as Avatar, Ie as AvatarFallback, Fe as AvatarImage, e as AvatarPrimitive, q as Button, qe as Card, rt as CardAction, it as CardContent, it as CardPanel, nt as CardDescription, at as CardFooter, Je as CardFrame, Qe as CardFrameAction, Ze as CardFrameDescription, $e as CardFrameFooter, Ye as CardFrameHeader, Xe as CardFrameTitle, et as CardHeader, tt as CardTitle, lt as Checkbox, de as CheckboxPrimitive, _n as CodeAuthBlock, Tn as DEFAULT_ONBOARDING_STEPS, jt as DropdownMenu, jt as Menu, Rt as DropdownMenuCheckboxItem, Rt as MenuCheckboxItem, Pt as DropdownMenuContent, Pt as MenuPopup, At as DropdownMenuCreateHandle, At as MenuCreateHandle, Ft as DropdownMenuGroup, Ft as MenuGroup, It as DropdownMenuItem, It as MenuItem, Vt as DropdownMenuLabel, Vt as MenuGroupLabel, Mt as DropdownMenuPortal, Mt as MenuPortal, zt as DropdownMenuRadioGroup, zt as MenuRadioGroup, Bt as DropdownMenuRadioItem, Bt as MenuRadioItem, Ht as DropdownMenuSeparator, Ht as MenuSeparator, Ut as DropdownMenuShortcut, Ut as MenuShortcut, Wt as DropdownMenuSub, Wt as MenuSub, Kt as DropdownMenuSubContent, Kt as MenuSubPopup, Gt as DropdownMenuSubTrigger, Gt as MenuSubTrigger, Nt as DropdownMenuTrigger, Nt as MenuTrigger, X as EASE, Fn as EASE_DRAWER, Pn as EASE_IN_OUT, $ as EASE_OUT, In as EASE_OUT_CSS, er as FOCUSABLE_SELECTOR, J as Field, pt as FieldControl, dt as FieldDescription, ft as FieldError, ut as FieldItem, Y as FieldLabel, mt as FieldValidity, vn as ForgotPasswordBlock, ht as Frame, yt as FrameDescription, bt as FrameFooter, _t as FrameHeader, gt as FramePanel, vt as FrameTitle, Wn as ICON_VARIANTS, xt as Input, wt as InputGroup, Tt as InputGroupAddon, Dt as InputGroupInput, Et as InputGroupText, Ot as InputGroupTextarea, be as InputPrimitive, qn as LABEL_ENTER_TRANSITION, Jn as LABEL_EXIT_TRANSITION, kt as Label, Gi as Layout, bn as LinkedAccountsBlock, xn as LoginBlock, tr as MOBILE_QUERY, Kr as MarqueeLabel, Lt as MenuLinkItem, H as MenuPrimitive, pn as MorphStep, Jt as OTPField, Yt as OTPFieldInput, xe as OTPFieldPrimitive, Xt as OTPFieldSeparator, En as OnboardingBlock, Yn as PANEL_TRANSITION, pi as PanelCloseButton, Oi as PanelMenuButton, An as PasskeyManagerBlock, jn as PasskeySignInBlock, nn as PasswordInput, Ji as ProfileCardBlock, Xn as REDUCED_TRANSITION, si as ResourceRow, Z as Reveal, Ei as SCAFFOLD_EASE, bi as SCAFFOLD_EDGE_GUTTER, xi as SCAFFOLD_HEADER_HEIGHT, yi as SCAFFOLD_INSPECTOR_WIDTH, wi as SCAFFOLD_MENU_COLLAPSE_DELAY, Ti as SCAFFOLD_MORPH_DURATION, Ci as SCAFFOLD_PANEL_GAP, Si as SCAFFOLD_SECONDARY_HEIGHT, vi as SCAFFOLD_SIDEBAR_WIDTH, Un as SHELL_TRANSITION, nr as SIDEBAR_KEYBOARD_SHORTCUT, Kn as SIDEBAR_MORPH_TRANSITION, an as SOCIAL_PROVIDERS, Hn as SPRING_GLIDE, Bn as SPRING_LAYOUT, Vn as SPRING_MOUSE, zn as SPRING_PANEL, Ln as SPRING_PRESS, Rn as SPRING_SWAP, $n as SUBMENU_ITEM_VARIANTS, Qn as SUBMENU_VARIANTS, Wi as Scaffold, Mi as ScaffoldActions, Ni as ScaffoldCanvas, Li as ScaffoldInspector, Ri as ScaffoldMain, Bi as ScaffoldPanel, Vi as ScaffoldRoot, Hi as ScaffoldSidebar, qt as Separator, Tr as SharedLayoutBg, hr as ShellLayout, li as Sidebar, Pr as SidebarBlock, Gr as SidebarIcon, Mn as SignupBlock, Zt as Skeleton, sn as SocialProviders, Le as Spinner, Gn as TITLE_BAR_HEIGHT, St as Textarea, Nn as UpdatePasswordBlock, ln as UserAvatar, dn as authAccentActionStyles, un as authAccentVars, st as bindSounds, Ke as buttonVariants, K as cn, Ki as defaultProfileCardItems, sr as getMobileSnapshot, en as getPasswordStrength, cr as getServerMobileSnapshot, cn as initialsFrom, $t as passwordRequirements, ct as playCue, me as playSound, he as setSoundEnabled, ge as setSoundVolume, _e as sounds, Wr as useAISidebar, ar as useAnimatedSidebar, ur as useAnimatedSidebarPanel, gn as useCountdown, lr as useIsMobile, Ui as useScaffold, Ai as useScaffoldContext, gr as useShellPanels };
|
|
4298
4798
|
|
|
4299
4799
|
//# sourceMappingURL=index.js.map
|