@prediktif/ui 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +38 -86
- package/dist/index.d.ts +38 -86
- package/dist/index.js +710 -430
- package/dist/index.mjs +708 -404
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31,30 +31,229 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
// src/components/composed/
|
|
34
|
+
// src/components/composed/app-sidebar.tsx
|
|
35
|
+
import { ChevronsUpDown, Command, LockIcon } from "lucide-react";
|
|
36
|
+
import Link from "next/link";
|
|
37
|
+
import { usePathname } from "next/navigation";
|
|
35
38
|
import { memo } from "react";
|
|
36
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
37
|
-
var HeaderTitle = memo(function HeaderTitle2({
|
|
38
|
-
title,
|
|
39
|
-
subtitle,
|
|
40
|
-
children
|
|
41
|
-
}) {
|
|
42
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-4", children: [
|
|
43
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
44
|
-
/* @__PURE__ */ jsx("h1", { className: "font-semibold", children: title }),
|
|
45
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: subtitle })
|
|
46
|
-
] }),
|
|
47
|
-
children
|
|
48
|
-
] });
|
|
49
|
-
});
|
|
50
39
|
|
|
51
|
-
// src/components/
|
|
52
|
-
import {
|
|
40
|
+
// src/components/ui/alert-dialog.tsx
|
|
41
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
42
|
+
import { cn as cn2 } from "cn";
|
|
43
|
+
|
|
44
|
+
// src/components/ui/button.tsx
|
|
45
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
46
|
+
import { cva } from "class-variance-authority";
|
|
47
|
+
import { cn } from "cn";
|
|
48
|
+
import { jsx } from "react/jsx-runtime";
|
|
49
|
+
var buttonVariants = cva(
|
|
50
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
51
|
+
{
|
|
52
|
+
variants: {
|
|
53
|
+
variant: {
|
|
54
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
55
|
+
outline: "border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",
|
|
56
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
57
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
58
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
59
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
60
|
+
},
|
|
61
|
+
size: {
|
|
62
|
+
default: "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
63
|
+
xs: "h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",
|
|
64
|
+
sm: "h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
65
|
+
lg: "h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",
|
|
66
|
+
icon: "size-7 [&_svg:not([class*='size-'])]:size-3.5",
|
|
67
|
+
"icon-xs": "size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5",
|
|
68
|
+
"icon-sm": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
69
|
+
"icon-lg": "size-8 [&_svg:not([class*='size-'])]:size-4"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
variant: "default",
|
|
74
|
+
size: "default"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
function Button(_a) {
|
|
79
|
+
var _b = _a, {
|
|
80
|
+
className,
|
|
81
|
+
variant = "default",
|
|
82
|
+
size = "default"
|
|
83
|
+
} = _b, props = __objRest(_b, [
|
|
84
|
+
"className",
|
|
85
|
+
"variant",
|
|
86
|
+
"size"
|
|
87
|
+
]);
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
89
|
+
ButtonPrimitive,
|
|
90
|
+
__spreadValues({
|
|
91
|
+
"data-slot": "button",
|
|
92
|
+
className: cn(buttonVariants({ variant, size, className }))
|
|
93
|
+
}, props)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// src/components/ui/alert-dialog.tsx
|
|
98
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
99
|
+
function AlertDialog(_a) {
|
|
100
|
+
var props = __objRest(_a, []);
|
|
101
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Root, __spreadValues({ "data-slot": "alert-dialog" }, props));
|
|
102
|
+
}
|
|
103
|
+
function AlertDialogTrigger(_a) {
|
|
104
|
+
var props = __objRest(_a, []);
|
|
105
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Trigger, __spreadValues({ "data-slot": "alert-dialog-trigger" }, props));
|
|
106
|
+
}
|
|
107
|
+
function AlertDialogPortal(_a) {
|
|
108
|
+
var props = __objRest(_a, []);
|
|
109
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Portal, __spreadValues({ "data-slot": "alert-dialog-portal" }, props));
|
|
110
|
+
}
|
|
111
|
+
function AlertDialogOverlay(_a) {
|
|
112
|
+
var _b = _a, {
|
|
113
|
+
className
|
|
114
|
+
} = _b, props = __objRest(_b, [
|
|
115
|
+
"className"
|
|
116
|
+
]);
|
|
117
|
+
return /* @__PURE__ */ jsx2(
|
|
118
|
+
AlertDialogPrimitive.Backdrop,
|
|
119
|
+
__spreadValues({
|
|
120
|
+
"data-slot": "alert-dialog-overlay",
|
|
121
|
+
className: cn2(
|
|
122
|
+
"fixed inset-0 isolate z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
123
|
+
className
|
|
124
|
+
)
|
|
125
|
+
}, props)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
function AlertDialogContent(_a) {
|
|
129
|
+
var _b = _a, {
|
|
130
|
+
className,
|
|
131
|
+
size = "default"
|
|
132
|
+
} = _b, props = __objRest(_b, [
|
|
133
|
+
"className",
|
|
134
|
+
"size"
|
|
135
|
+
]);
|
|
136
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
137
|
+
/* @__PURE__ */ jsx2(AlertDialogOverlay, {}),
|
|
138
|
+
/* @__PURE__ */ jsx2(
|
|
139
|
+
AlertDialogPrimitive.Popup,
|
|
140
|
+
__spreadValues({
|
|
141
|
+
"data-slot": "alert-dialog-content",
|
|
142
|
+
"data-size": size,
|
|
143
|
+
className: cn2(
|
|
144
|
+
"group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-3 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-64 data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
145
|
+
className
|
|
146
|
+
)
|
|
147
|
+
}, props)
|
|
148
|
+
)
|
|
149
|
+
] });
|
|
150
|
+
}
|
|
151
|
+
function AlertDialogHeader(_a) {
|
|
152
|
+
var _b = _a, {
|
|
153
|
+
className
|
|
154
|
+
} = _b, props = __objRest(_b, [
|
|
155
|
+
"className"
|
|
156
|
+
]);
|
|
157
|
+
return /* @__PURE__ */ jsx2(
|
|
158
|
+
"div",
|
|
159
|
+
__spreadValues({
|
|
160
|
+
"data-slot": "alert-dialog-header",
|
|
161
|
+
className: cn2(
|
|
162
|
+
"grid grid-rows-[auto_1fr] place-items-center gap-1 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
|
|
163
|
+
className
|
|
164
|
+
)
|
|
165
|
+
}, props)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
function AlertDialogFooter(_a) {
|
|
169
|
+
var _b = _a, {
|
|
170
|
+
className
|
|
171
|
+
} = _b, props = __objRest(_b, [
|
|
172
|
+
"className"
|
|
173
|
+
]);
|
|
174
|
+
return /* @__PURE__ */ jsx2(
|
|
175
|
+
"div",
|
|
176
|
+
__spreadValues({
|
|
177
|
+
"data-slot": "alert-dialog-footer",
|
|
178
|
+
className: cn2(
|
|
179
|
+
"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
180
|
+
className
|
|
181
|
+
)
|
|
182
|
+
}, props)
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
function AlertDialogTitle(_a) {
|
|
186
|
+
var _b = _a, {
|
|
187
|
+
className
|
|
188
|
+
} = _b, props = __objRest(_b, [
|
|
189
|
+
"className"
|
|
190
|
+
]);
|
|
191
|
+
return /* @__PURE__ */ jsx2(
|
|
192
|
+
AlertDialogPrimitive.Title,
|
|
193
|
+
__spreadValues({
|
|
194
|
+
"data-slot": "alert-dialog-title",
|
|
195
|
+
className: cn2(
|
|
196
|
+
"font-heading text-sm font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
197
|
+
className
|
|
198
|
+
)
|
|
199
|
+
}, props)
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
function AlertDialogDescription(_a) {
|
|
203
|
+
var _b = _a, {
|
|
204
|
+
className
|
|
205
|
+
} = _b, props = __objRest(_b, [
|
|
206
|
+
"className"
|
|
207
|
+
]);
|
|
208
|
+
return /* @__PURE__ */ jsx2(
|
|
209
|
+
AlertDialogPrimitive.Description,
|
|
210
|
+
__spreadValues({
|
|
211
|
+
"data-slot": "alert-dialog-description",
|
|
212
|
+
className: cn2(
|
|
213
|
+
"text-xs/relaxed text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
214
|
+
className
|
|
215
|
+
)
|
|
216
|
+
}, props)
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function AlertDialogAction(_a) {
|
|
220
|
+
var _b = _a, {
|
|
221
|
+
className
|
|
222
|
+
} = _b, props = __objRest(_b, [
|
|
223
|
+
"className"
|
|
224
|
+
]);
|
|
225
|
+
return /* @__PURE__ */ jsx2(
|
|
226
|
+
Button,
|
|
227
|
+
__spreadValues({
|
|
228
|
+
"data-slot": "alert-dialog-action",
|
|
229
|
+
className: cn2(className)
|
|
230
|
+
}, props)
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
function AlertDialogCancel(_a) {
|
|
234
|
+
var _b = _a, {
|
|
235
|
+
className,
|
|
236
|
+
variant = "outline",
|
|
237
|
+
size = "default"
|
|
238
|
+
} = _b, props = __objRest(_b, [
|
|
239
|
+
"className",
|
|
240
|
+
"variant",
|
|
241
|
+
"size"
|
|
242
|
+
]);
|
|
243
|
+
return /* @__PURE__ */ jsx2(
|
|
244
|
+
AlertDialogPrimitive.Close,
|
|
245
|
+
__spreadValues({
|
|
246
|
+
"data-slot": "alert-dialog-cancel",
|
|
247
|
+
className: cn2(className),
|
|
248
|
+
render: /* @__PURE__ */ jsx2(Button, { variant, size })
|
|
249
|
+
}, props)
|
|
250
|
+
);
|
|
251
|
+
}
|
|
53
252
|
|
|
54
253
|
// src/components/ui/avatar.tsx
|
|
55
254
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
56
|
-
import { cn } from "cn";
|
|
57
|
-
import { jsx as
|
|
255
|
+
import { cn as cn3 } from "cn";
|
|
256
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
58
257
|
function Avatar(_a) {
|
|
59
258
|
var _b = _a, {
|
|
60
259
|
className,
|
|
@@ -63,12 +262,12 @@ function Avatar(_a) {
|
|
|
63
262
|
"className",
|
|
64
263
|
"size"
|
|
65
264
|
]);
|
|
66
|
-
return /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ jsx3(
|
|
67
266
|
AvatarPrimitive.Root,
|
|
68
267
|
__spreadValues({
|
|
69
268
|
"data-slot": "avatar",
|
|
70
269
|
"data-size": size,
|
|
71
|
-
className:
|
|
270
|
+
className: cn3(
|
|
72
271
|
"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
73
272
|
className
|
|
74
273
|
)
|
|
@@ -77,11 +276,11 @@ function Avatar(_a) {
|
|
|
77
276
|
}
|
|
78
277
|
function AvatarImage(_a) {
|
|
79
278
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
80
|
-
return /* @__PURE__ */
|
|
279
|
+
return /* @__PURE__ */ jsx3(
|
|
81
280
|
AvatarPrimitive.Image,
|
|
82
281
|
__spreadValues({
|
|
83
282
|
"data-slot": "avatar-image",
|
|
84
|
-
className:
|
|
283
|
+
className: cn3(
|
|
85
284
|
"aspect-square size-full rounded-full object-cover",
|
|
86
285
|
className
|
|
87
286
|
)
|
|
@@ -94,11 +293,11 @@ function AvatarFallback(_a) {
|
|
|
94
293
|
} = _b, props = __objRest(_b, [
|
|
95
294
|
"className"
|
|
96
295
|
]);
|
|
97
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ jsx3(
|
|
98
297
|
AvatarPrimitive.Fallback,
|
|
99
298
|
__spreadValues({
|
|
100
299
|
"data-slot": "avatar-fallback",
|
|
101
|
-
className:
|
|
300
|
+
className: cn3(
|
|
102
301
|
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
103
302
|
className
|
|
104
303
|
)
|
|
@@ -106,80 +305,192 @@ function AvatarFallback(_a) {
|
|
|
106
305
|
);
|
|
107
306
|
}
|
|
108
307
|
|
|
109
|
-
// src/components/ui/
|
|
308
|
+
// src/components/ui/breadcrumb.tsx
|
|
110
309
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
111
310
|
import { useRender } from "@base-ui/react/use-render";
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
311
|
+
import { cn as cn4 } from "cn";
|
|
312
|
+
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
313
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
314
|
+
function Breadcrumb(_a) {
|
|
315
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
316
|
+
return /* @__PURE__ */ jsx4(
|
|
317
|
+
"nav",
|
|
318
|
+
__spreadValues({
|
|
319
|
+
"aria-label": "breadcrumb",
|
|
320
|
+
"data-slot": "breadcrumb",
|
|
321
|
+
className: cn4(className)
|
|
322
|
+
}, props)
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
function BreadcrumbList(_a) {
|
|
326
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
327
|
+
return /* @__PURE__ */ jsx4(
|
|
328
|
+
"ol",
|
|
329
|
+
__spreadValues({
|
|
330
|
+
"data-slot": "breadcrumb-list",
|
|
331
|
+
className: cn4(
|
|
332
|
+
"flex flex-wrap items-center gap-1.5 text-xs/relaxed wrap-break-word text-muted-foreground",
|
|
333
|
+
className
|
|
334
|
+
)
|
|
335
|
+
}, props)
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
function BreadcrumbItem(_a) {
|
|
339
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
340
|
+
return /* @__PURE__ */ jsx4(
|
|
341
|
+
"li",
|
|
342
|
+
__spreadValues({
|
|
343
|
+
"data-slot": "breadcrumb-item",
|
|
344
|
+
className: cn4("inline-flex items-center gap-1", className)
|
|
345
|
+
}, props)
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
function BreadcrumbLink(_a) {
|
|
349
|
+
var _b = _a, {
|
|
350
|
+
className,
|
|
351
|
+
render
|
|
352
|
+
} = _b, props = __objRest(_b, [
|
|
353
|
+
"className",
|
|
354
|
+
"render"
|
|
355
|
+
]);
|
|
356
|
+
return useRender({
|
|
357
|
+
defaultTagName: "a",
|
|
358
|
+
props: mergeProps(
|
|
359
|
+
{
|
|
360
|
+
className: cn4("transition-colors hover:text-foreground", className)
|
|
133
361
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
362
|
+
props
|
|
363
|
+
),
|
|
364
|
+
render,
|
|
365
|
+
state: {
|
|
366
|
+
slot: "breadcrumb-link"
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
function BreadcrumbPage(_a) {
|
|
371
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
372
|
+
return /* @__PURE__ */ jsx4(
|
|
373
|
+
"span",
|
|
374
|
+
__spreadValues({
|
|
375
|
+
"data-slot": "breadcrumb-page",
|
|
376
|
+
role: "link",
|
|
377
|
+
"aria-disabled": "true",
|
|
378
|
+
"aria-current": "page",
|
|
379
|
+
className: cn4("font-normal text-foreground", className)
|
|
380
|
+
}, props)
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
function BreadcrumbSeparator(_a) {
|
|
384
|
+
var _b = _a, {
|
|
385
|
+
children,
|
|
386
|
+
className
|
|
387
|
+
} = _b, props = __objRest(_b, [
|
|
388
|
+
"children",
|
|
389
|
+
"className"
|
|
390
|
+
]);
|
|
391
|
+
return /* @__PURE__ */ jsx4(
|
|
392
|
+
"li",
|
|
393
|
+
__spreadProps(__spreadValues({
|
|
394
|
+
"data-slot": "breadcrumb-separator",
|
|
395
|
+
role: "presentation",
|
|
396
|
+
"aria-hidden": "true",
|
|
397
|
+
className: cn4("[&>svg]:size-3.5", className)
|
|
398
|
+
}, props), {
|
|
399
|
+
children: children != null ? children : /* @__PURE__ */ jsx4(ChevronRightIcon, {})
|
|
400
|
+
})
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// src/components/ui/dropdown-menu.tsx
|
|
405
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
406
|
+
import { cn as cn5 } from "cn";
|
|
407
|
+
import { CheckIcon, ChevronRightIcon as ChevronRightIcon2 } from "lucide-react";
|
|
408
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
409
|
+
function DropdownMenu(_a) {
|
|
410
|
+
var props = __objRest(_a, []);
|
|
411
|
+
return /* @__PURE__ */ jsx5(MenuPrimitive.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
|
|
412
|
+
}
|
|
413
|
+
function DropdownMenuTrigger(_a) {
|
|
414
|
+
var props = __objRest(_a, []);
|
|
415
|
+
return /* @__PURE__ */ jsx5(MenuPrimitive.Trigger, __spreadValues({ "data-slot": "dropdown-menu-trigger" }, props));
|
|
416
|
+
}
|
|
417
|
+
function DropdownMenuContent(_a) {
|
|
418
|
+
var _b = _a, {
|
|
419
|
+
align = "start",
|
|
420
|
+
alignOffset = 0,
|
|
421
|
+
side = "bottom",
|
|
422
|
+
sideOffset = 4,
|
|
423
|
+
className
|
|
424
|
+
} = _b, props = __objRest(_b, [
|
|
425
|
+
"align",
|
|
426
|
+
"alignOffset",
|
|
427
|
+
"side",
|
|
428
|
+
"sideOffset",
|
|
429
|
+
"className"
|
|
430
|
+
]);
|
|
431
|
+
return /* @__PURE__ */ jsx5(MenuPrimitive.Portal, { children: /* @__PURE__ */ jsx5(
|
|
432
|
+
MenuPrimitive.Positioner,
|
|
433
|
+
{
|
|
434
|
+
className: "isolate z-50 outline-none",
|
|
435
|
+
align,
|
|
436
|
+
alignOffset,
|
|
437
|
+
side,
|
|
438
|
+
sideOffset,
|
|
439
|
+
children: /* @__PURE__ */ jsx5(
|
|
440
|
+
MenuPrimitive.Popup,
|
|
441
|
+
__spreadValues({
|
|
442
|
+
"data-slot": "dropdown-menu-content",
|
|
443
|
+
className: cn5(
|
|
444
|
+
"z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
445
|
+
className
|
|
446
|
+
)
|
|
447
|
+
}, props)
|
|
448
|
+
)
|
|
148
449
|
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function
|
|
450
|
+
) });
|
|
451
|
+
}
|
|
452
|
+
function DropdownMenuGroup(_a) {
|
|
453
|
+
var props = __objRest(_a, []);
|
|
454
|
+
return /* @__PURE__ */ jsx5(MenuPrimitive.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
455
|
+
}
|
|
456
|
+
function DropdownMenuLabel(_a) {
|
|
152
457
|
var _b = _a, {
|
|
153
458
|
className,
|
|
154
|
-
|
|
155
|
-
size = "default"
|
|
459
|
+
inset
|
|
156
460
|
} = _b, props = __objRest(_b, [
|
|
157
461
|
"className",
|
|
158
|
-
"
|
|
159
|
-
"size"
|
|
462
|
+
"inset"
|
|
160
463
|
]);
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
|
|
464
|
+
return /* @__PURE__ */ jsx5(
|
|
465
|
+
MenuPrimitive.GroupLabel,
|
|
163
466
|
__spreadValues({
|
|
164
|
-
"data-slot": "
|
|
165
|
-
|
|
467
|
+
"data-slot": "dropdown-menu-label",
|
|
468
|
+
"data-inset": inset,
|
|
469
|
+
className: cn5(
|
|
470
|
+
"px-2 py-1.5 text-xs text-muted-foreground data-inset:pl-7.5",
|
|
471
|
+
className
|
|
472
|
+
)
|
|
166
473
|
}, props)
|
|
167
474
|
);
|
|
168
475
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
476
|
+
function DropdownMenuItem(_a) {
|
|
477
|
+
var _b = _a, {
|
|
478
|
+
className,
|
|
479
|
+
inset,
|
|
480
|
+
variant = "default"
|
|
481
|
+
} = _b, props = __objRest(_b, [
|
|
482
|
+
"className",
|
|
483
|
+
"inset",
|
|
484
|
+
"variant"
|
|
485
|
+
]);
|
|
486
|
+
return /* @__PURE__ */ jsx5(
|
|
487
|
+
MenuPrimitive.Item,
|
|
178
488
|
__spreadValues({
|
|
179
|
-
|
|
180
|
-
"data-
|
|
181
|
-
|
|
182
|
-
|
|
489
|
+
"data-slot": "dropdown-menu-item",
|
|
490
|
+
"data-inset": inset,
|
|
491
|
+
"data-variant": variant,
|
|
492
|
+
className: cn5(
|
|
493
|
+
"group/dropdown-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
183
494
|
className
|
|
184
495
|
)
|
|
185
496
|
}, props)
|
|
@@ -188,8 +499,8 @@ function Input(_a) {
|
|
|
188
499
|
|
|
189
500
|
// src/components/ui/separator.tsx
|
|
190
501
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
191
|
-
import { cn as
|
|
192
|
-
import { jsx as
|
|
502
|
+
import { cn as cn6 } from "cn";
|
|
503
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
193
504
|
function Separator(_a) {
|
|
194
505
|
var _b = _a, {
|
|
195
506
|
className,
|
|
@@ -198,12 +509,12 @@ function Separator(_a) {
|
|
|
198
509
|
"className",
|
|
199
510
|
"orientation"
|
|
200
511
|
]);
|
|
201
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ jsx6(
|
|
202
513
|
SeparatorPrimitive,
|
|
203
514
|
__spreadValues({
|
|
204
515
|
"data-slot": "separator",
|
|
205
516
|
orientation,
|
|
206
|
-
className:
|
|
517
|
+
className: cn6(
|
|
207
518
|
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
208
519
|
className
|
|
209
520
|
)
|
|
@@ -211,26 +522,39 @@ function Separator(_a) {
|
|
|
211
522
|
);
|
|
212
523
|
}
|
|
213
524
|
|
|
525
|
+
// src/components/ui/sidebar.tsx
|
|
526
|
+
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
527
|
+
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
528
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
529
|
+
import { cn as cn11 } from "cn";
|
|
530
|
+
import { PanelLeftIcon } from "lucide-react";
|
|
531
|
+
import * as React2 from "react";
|
|
532
|
+
|
|
533
|
+
// src/components/ui/input.tsx
|
|
534
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
535
|
+
import { cn as cn7 } from "cn";
|
|
536
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
537
|
+
|
|
214
538
|
// src/components/ui/sheet.tsx
|
|
215
539
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
216
|
-
import { cn as
|
|
540
|
+
import { cn as cn8 } from "cn";
|
|
217
541
|
import { XIcon } from "lucide-react";
|
|
218
|
-
import { jsx as
|
|
542
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
219
543
|
function Sheet(_a) {
|
|
220
544
|
var props = __objRest(_a, []);
|
|
221
|
-
return /* @__PURE__ */
|
|
545
|
+
return /* @__PURE__ */ jsx8(SheetPrimitive.Root, __spreadValues({ "data-slot": "sheet" }, props));
|
|
222
546
|
}
|
|
223
547
|
function SheetPortal(_a) {
|
|
224
548
|
var props = __objRest(_a, []);
|
|
225
|
-
return /* @__PURE__ */
|
|
549
|
+
return /* @__PURE__ */ jsx8(SheetPrimitive.Portal, __spreadValues({ "data-slot": "sheet-portal" }, props));
|
|
226
550
|
}
|
|
227
551
|
function SheetOverlay(_a) {
|
|
228
552
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
229
|
-
return /* @__PURE__ */
|
|
553
|
+
return /* @__PURE__ */ jsx8(
|
|
230
554
|
SheetPrimitive.Backdrop,
|
|
231
555
|
__spreadValues({
|
|
232
556
|
"data-slot": "sheet-overlay",
|
|
233
|
-
className:
|
|
557
|
+
className: cn8(
|
|
234
558
|
"fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
|
235
559
|
className
|
|
236
560
|
)
|
|
@@ -249,25 +573,25 @@ function SheetContent(_a) {
|
|
|
249
573
|
"side",
|
|
250
574
|
"showCloseButton"
|
|
251
575
|
]);
|
|
252
|
-
return /* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
576
|
+
return /* @__PURE__ */ jsxs4(SheetPortal, { children: [
|
|
577
|
+
/* @__PURE__ */ jsx8(SheetOverlay, {}),
|
|
578
|
+
/* @__PURE__ */ jsxs4(
|
|
255
579
|
SheetPrimitive.Popup,
|
|
256
580
|
__spreadProps(__spreadValues({
|
|
257
581
|
"data-slot": "sheet-content",
|
|
258
582
|
"data-side": side,
|
|
259
|
-
className:
|
|
583
|
+
className: cn8(
|
|
260
584
|
"fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
261
585
|
className
|
|
262
586
|
)
|
|
263
587
|
}, props), {
|
|
264
588
|
children: [
|
|
265
589
|
children,
|
|
266
|
-
showCloseButton && /* @__PURE__ */
|
|
590
|
+
showCloseButton && /* @__PURE__ */ jsxs4(
|
|
267
591
|
SheetPrimitive.Close,
|
|
268
592
|
{
|
|
269
593
|
"data-slot": "sheet-close",
|
|
270
|
-
render: /* @__PURE__ */
|
|
594
|
+
render: /* @__PURE__ */ jsx8(
|
|
271
595
|
Button,
|
|
272
596
|
{
|
|
273
597
|
variant: "ghost",
|
|
@@ -276,8 +600,8 @@ function SheetContent(_a) {
|
|
|
276
600
|
}
|
|
277
601
|
),
|
|
278
602
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ jsx8(XIcon, {}),
|
|
604
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Close" })
|
|
281
605
|
]
|
|
282
606
|
}
|
|
283
607
|
)
|
|
@@ -288,21 +612,21 @@ function SheetContent(_a) {
|
|
|
288
612
|
}
|
|
289
613
|
function SheetHeader(_a) {
|
|
290
614
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
291
|
-
return /* @__PURE__ */
|
|
615
|
+
return /* @__PURE__ */ jsx8(
|
|
292
616
|
"div",
|
|
293
617
|
__spreadValues({
|
|
294
618
|
"data-slot": "sheet-header",
|
|
295
|
-
className:
|
|
619
|
+
className: cn8("flex flex-col gap-1.5 p-6", className)
|
|
296
620
|
}, props)
|
|
297
621
|
);
|
|
298
622
|
}
|
|
299
623
|
function SheetTitle(_a) {
|
|
300
624
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
301
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ jsx8(
|
|
302
626
|
SheetPrimitive.Title,
|
|
303
627
|
__spreadValues({
|
|
304
628
|
"data-slot": "sheet-title",
|
|
305
|
-
className:
|
|
629
|
+
className: cn8(
|
|
306
630
|
"font-heading text-sm font-medium text-foreground",
|
|
307
631
|
className
|
|
308
632
|
)
|
|
@@ -315,40 +639,30 @@ function SheetDescription(_a) {
|
|
|
315
639
|
} = _b, props = __objRest(_b, [
|
|
316
640
|
"className"
|
|
317
641
|
]);
|
|
318
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ jsx8(
|
|
319
643
|
SheetPrimitive.Description,
|
|
320
644
|
__spreadValues({
|
|
321
645
|
"data-slot": "sheet-description",
|
|
322
|
-
className:
|
|
646
|
+
className: cn8("text-xs/relaxed text-muted-foreground", className)
|
|
323
647
|
}, props)
|
|
324
648
|
);
|
|
325
649
|
}
|
|
326
650
|
|
|
327
651
|
// src/components/ui/skeleton.tsx
|
|
328
|
-
import { cn as
|
|
329
|
-
import { jsx as
|
|
330
|
-
function Skeleton(_a) {
|
|
331
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
332
|
-
return /* @__PURE__ */ jsx7(
|
|
333
|
-
"div",
|
|
334
|
-
__spreadValues({
|
|
335
|
-
"data-slot": "skeleton",
|
|
336
|
-
className: cn6("animate-pulse rounded-md bg-muted", className)
|
|
337
|
-
}, props)
|
|
338
|
-
);
|
|
339
|
-
}
|
|
652
|
+
import { cn as cn9 } from "cn";
|
|
653
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
340
654
|
|
|
341
655
|
// src/components/ui/tooltip.tsx
|
|
342
656
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
343
|
-
import { cn as
|
|
344
|
-
import { jsx as
|
|
657
|
+
import { cn as cn10 } from "cn";
|
|
658
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
345
659
|
function Tooltip(_a) {
|
|
346
660
|
var props = __objRest(_a, []);
|
|
347
|
-
return /* @__PURE__ */
|
|
661
|
+
return /* @__PURE__ */ jsx10(TooltipPrimitive.Root, __spreadValues({ "data-slot": "tooltip" }, props));
|
|
348
662
|
}
|
|
349
663
|
function TooltipTrigger(_a) {
|
|
350
664
|
var props = __objRest(_a, []);
|
|
351
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ jsx10(TooltipPrimitive.Trigger, __spreadValues({ "data-slot": "tooltip-trigger" }, props));
|
|
352
666
|
}
|
|
353
667
|
function TooltipContent(_a) {
|
|
354
668
|
var _b = _a, {
|
|
@@ -366,7 +680,7 @@ function TooltipContent(_a) {
|
|
|
366
680
|
"alignOffset",
|
|
367
681
|
"children"
|
|
368
682
|
]);
|
|
369
|
-
return /* @__PURE__ */
|
|
683
|
+
return /* @__PURE__ */ jsx10(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx10(
|
|
370
684
|
TooltipPrimitive.Positioner,
|
|
371
685
|
{
|
|
372
686
|
align,
|
|
@@ -374,18 +688,18 @@ function TooltipContent(_a) {
|
|
|
374
688
|
side,
|
|
375
689
|
sideOffset,
|
|
376
690
|
className: "isolate z-50",
|
|
377
|
-
children: /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ jsxs5(
|
|
378
692
|
TooltipPrimitive.Popup,
|
|
379
693
|
__spreadProps(__spreadValues({
|
|
380
694
|
"data-slot": "tooltip-content",
|
|
381
|
-
className:
|
|
695
|
+
className: cn10(
|
|
382
696
|
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
383
697
|
className
|
|
384
698
|
)
|
|
385
699
|
}, props), {
|
|
386
700
|
children: [
|
|
387
701
|
children,
|
|
388
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ jsx10(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
389
703
|
]
|
|
390
704
|
})
|
|
391
705
|
)
|
|
@@ -413,7 +727,7 @@ function useIsMobile() {
|
|
|
413
727
|
}
|
|
414
728
|
|
|
415
729
|
// src/components/ui/sidebar.tsx
|
|
416
|
-
import { jsx as
|
|
730
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
417
731
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
418
732
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
419
733
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -486,7 +800,7 @@ function SidebarProvider(_a) {
|
|
|
486
800
|
}),
|
|
487
801
|
[state, open, setOpen, isMobile, openMobile, toggleSidebar]
|
|
488
802
|
);
|
|
489
|
-
return /* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsx11(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx11(
|
|
490
804
|
"div",
|
|
491
805
|
__spreadProps(__spreadValues({
|
|
492
806
|
"data-slot": "sidebar-wrapper",
|
|
@@ -494,7 +808,7 @@ function SidebarProvider(_a) {
|
|
|
494
808
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
495
809
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON
|
|
496
810
|
}, style),
|
|
497
|
-
className:
|
|
811
|
+
className: cn11(
|
|
498
812
|
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
499
813
|
className
|
|
500
814
|
)
|
|
@@ -521,11 +835,11 @@ function Sidebar(_a) {
|
|
|
521
835
|
]);
|
|
522
836
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
523
837
|
if (collapsible === "none") {
|
|
524
|
-
return /* @__PURE__ */
|
|
838
|
+
return /* @__PURE__ */ jsx11(
|
|
525
839
|
"div",
|
|
526
840
|
__spreadProps(__spreadValues({
|
|
527
841
|
"data-slot": "sidebar",
|
|
528
|
-
className:
|
|
842
|
+
className: cn11(
|
|
529
843
|
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
530
844
|
className
|
|
531
845
|
)
|
|
@@ -535,7 +849,7 @@ function Sidebar(_a) {
|
|
|
535
849
|
);
|
|
536
850
|
}
|
|
537
851
|
if (isMobile) {
|
|
538
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ jsx11(Sheet, __spreadProps(__spreadValues({ open: openMobile, onOpenChange: setOpenMobile }, props), { children: /* @__PURE__ */ jsxs6(
|
|
539
853
|
SheetContent,
|
|
540
854
|
{
|
|
541
855
|
dir,
|
|
@@ -548,16 +862,16 @@ function Sidebar(_a) {
|
|
|
548
862
|
},
|
|
549
863
|
side,
|
|
550
864
|
children: [
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */
|
|
553
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ jsxs6(SheetHeader, { className: "sr-only", children: [
|
|
866
|
+
/* @__PURE__ */ jsx11(SheetTitle, { children: "Sidebar" }),
|
|
867
|
+
/* @__PURE__ */ jsx11(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
554
868
|
] }),
|
|
555
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ jsx11("div", { className: "flex h-full w-full flex-col", children })
|
|
556
870
|
]
|
|
557
871
|
}
|
|
558
872
|
) }));
|
|
559
873
|
}
|
|
560
|
-
return /* @__PURE__ */
|
|
874
|
+
return /* @__PURE__ */ jsxs6(
|
|
561
875
|
"div",
|
|
562
876
|
{
|
|
563
877
|
className: "group peer hidden text-sidebar-foreground md:block",
|
|
@@ -567,11 +881,11 @@ function Sidebar(_a) {
|
|
|
567
881
|
"data-side": side,
|
|
568
882
|
"data-slot": "sidebar",
|
|
569
883
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ jsx11(
|
|
571
885
|
"div",
|
|
572
886
|
{
|
|
573
887
|
"data-slot": "sidebar-gap",
|
|
574
|
-
className:
|
|
888
|
+
className: cn11(
|
|
575
889
|
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
576
890
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
577
891
|
"group-data-[side=right]:rotate-180",
|
|
@@ -579,19 +893,19 @@ function Sidebar(_a) {
|
|
|
579
893
|
)
|
|
580
894
|
}
|
|
581
895
|
),
|
|
582
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ jsx11(
|
|
583
897
|
"div",
|
|
584
898
|
__spreadProps(__spreadValues({
|
|
585
899
|
"data-slot": "sidebar-container",
|
|
586
900
|
"data-side": side,
|
|
587
|
-
className:
|
|
901
|
+
className: cn11(
|
|
588
902
|
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
|
|
589
903
|
// Adjust the padding for floating and inset variants.
|
|
590
904
|
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
591
905
|
className
|
|
592
906
|
)
|
|
593
907
|
}, props), {
|
|
594
|
-
children: /* @__PURE__ */
|
|
908
|
+
children: /* @__PURE__ */ jsx11(
|
|
595
909
|
"div",
|
|
596
910
|
{
|
|
597
911
|
"data-sidebar": "sidebar",
|
|
@@ -615,22 +929,22 @@ function SidebarTrigger(_a) {
|
|
|
615
929
|
"onClick"
|
|
616
930
|
]);
|
|
617
931
|
const { toggleSidebar } = useSidebar();
|
|
618
|
-
return /* @__PURE__ */
|
|
932
|
+
return /* @__PURE__ */ jsxs6(
|
|
619
933
|
Button,
|
|
620
934
|
__spreadProps(__spreadValues({
|
|
621
935
|
"data-sidebar": "trigger",
|
|
622
936
|
"data-slot": "sidebar-trigger",
|
|
623
937
|
variant: "ghost",
|
|
624
938
|
size: "icon-sm",
|
|
625
|
-
className:
|
|
939
|
+
className: cn11(className),
|
|
626
940
|
onClick: (event) => {
|
|
627
941
|
onClick == null ? void 0 : onClick(event);
|
|
628
942
|
toggleSidebar();
|
|
629
943
|
}
|
|
630
944
|
}, props), {
|
|
631
945
|
children: [
|
|
632
|
-
/* @__PURE__ */
|
|
633
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ jsx11(PanelLeftIcon, {}),
|
|
947
|
+
/* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
634
948
|
]
|
|
635
949
|
})
|
|
636
950
|
);
|
|
@@ -638,7 +952,7 @@ function SidebarTrigger(_a) {
|
|
|
638
952
|
function SidebarRail(_a) {
|
|
639
953
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
640
954
|
const { toggleSidebar } = useSidebar();
|
|
641
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ jsx11(
|
|
642
956
|
"button",
|
|
643
957
|
__spreadValues({
|
|
644
958
|
"data-sidebar": "rail",
|
|
@@ -647,7 +961,7 @@ function SidebarRail(_a) {
|
|
|
647
961
|
tabIndex: -1,
|
|
648
962
|
onClick: toggleSidebar,
|
|
649
963
|
title: "Toggle Sidebar",
|
|
650
|
-
className:
|
|
964
|
+
className: cn11(
|
|
651
965
|
"absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2",
|
|
652
966
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
653
967
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -661,80 +975,47 @@ function SidebarRail(_a) {
|
|
|
661
975
|
}
|
|
662
976
|
function SidebarInset(_a) {
|
|
663
977
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
664
|
-
return /* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ jsx11(
|
|
665
979
|
"main",
|
|
666
980
|
__spreadValues({
|
|
667
981
|
"data-slot": "sidebar-inset",
|
|
668
|
-
className:
|
|
982
|
+
className: cn11(
|
|
669
983
|
"relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
670
984
|
className
|
|
671
985
|
)
|
|
672
986
|
}, props)
|
|
673
987
|
);
|
|
674
988
|
}
|
|
675
|
-
function SidebarInput(_a) {
|
|
676
|
-
var _b = _a, {
|
|
677
|
-
className
|
|
678
|
-
} = _b, props = __objRest(_b, [
|
|
679
|
-
"className"
|
|
680
|
-
]);
|
|
681
|
-
return /* @__PURE__ */ jsx9(
|
|
682
|
-
Input,
|
|
683
|
-
__spreadValues({
|
|
684
|
-
"data-slot": "sidebar-input",
|
|
685
|
-
"data-sidebar": "input",
|
|
686
|
-
className: cn8(
|
|
687
|
-
"h-8 w-full border-input bg-muted/20 dark:bg-muted/30",
|
|
688
|
-
className
|
|
689
|
-
)
|
|
690
|
-
}, props)
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
989
|
function SidebarHeader(_a) {
|
|
694
990
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
695
|
-
return /* @__PURE__ */
|
|
991
|
+
return /* @__PURE__ */ jsx11(
|
|
696
992
|
"div",
|
|
697
993
|
__spreadValues({
|
|
698
994
|
"data-slot": "sidebar-header",
|
|
699
995
|
"data-sidebar": "header",
|
|
700
|
-
className:
|
|
996
|
+
className: cn11("flex flex-col gap-2 p-2", className)
|
|
701
997
|
}, props)
|
|
702
998
|
);
|
|
703
999
|
}
|
|
704
1000
|
function SidebarFooter(_a) {
|
|
705
1001
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
706
|
-
return /* @__PURE__ */
|
|
1002
|
+
return /* @__PURE__ */ jsx11(
|
|
707
1003
|
"div",
|
|
708
1004
|
__spreadValues({
|
|
709
1005
|
"data-slot": "sidebar-footer",
|
|
710
1006
|
"data-sidebar": "footer",
|
|
711
|
-
className:
|
|
712
|
-
}, props)
|
|
713
|
-
);
|
|
714
|
-
}
|
|
715
|
-
function SidebarSeparator(_a) {
|
|
716
|
-
var _b = _a, {
|
|
717
|
-
className
|
|
718
|
-
} = _b, props = __objRest(_b, [
|
|
719
|
-
"className"
|
|
720
|
-
]);
|
|
721
|
-
return /* @__PURE__ */ jsx9(
|
|
722
|
-
Separator,
|
|
723
|
-
__spreadValues({
|
|
724
|
-
"data-slot": "sidebar-separator",
|
|
725
|
-
"data-sidebar": "separator",
|
|
726
|
-
className: cn8("mx-2 w-auto bg-sidebar-border", className)
|
|
1007
|
+
className: cn11("flex flex-col gap-2 p-2", className)
|
|
727
1008
|
}, props)
|
|
728
1009
|
);
|
|
729
1010
|
}
|
|
730
1011
|
function SidebarContent(_a) {
|
|
731
1012
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
732
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsx11(
|
|
733
1014
|
"div",
|
|
734
1015
|
__spreadValues({
|
|
735
1016
|
"data-slot": "sidebar-content",
|
|
736
1017
|
"data-sidebar": "content",
|
|
737
|
-
className:
|
|
1018
|
+
className: cn11(
|
|
738
1019
|
"no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
739
1020
|
className
|
|
740
1021
|
)
|
|
@@ -743,12 +1024,12 @@ function SidebarContent(_a) {
|
|
|
743
1024
|
}
|
|
744
1025
|
function SidebarGroup(_a) {
|
|
745
1026
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
746
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ jsx11(
|
|
747
1028
|
"div",
|
|
748
1029
|
__spreadValues({
|
|
749
1030
|
"data-slot": "sidebar-group",
|
|
750
1031
|
"data-sidebar": "group",
|
|
751
|
-
className:
|
|
1032
|
+
className: cn11(
|
|
752
1033
|
"relative flex w-full min-w-0 flex-col px-2 py-1",
|
|
753
1034
|
className
|
|
754
1035
|
)
|
|
@@ -763,11 +1044,11 @@ function SidebarGroupLabel(_a) {
|
|
|
763
1044
|
"className",
|
|
764
1045
|
"render"
|
|
765
1046
|
]);
|
|
766
|
-
return
|
|
1047
|
+
return useRender2({
|
|
767
1048
|
defaultTagName: "div",
|
|
768
|
-
props:
|
|
1049
|
+
props: mergeProps2(
|
|
769
1050
|
{
|
|
770
|
-
className:
|
|
1051
|
+
className: cn11(
|
|
771
1052
|
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
772
1053
|
className
|
|
773
1054
|
)
|
|
@@ -781,66 +1062,40 @@ function SidebarGroupLabel(_a) {
|
|
|
781
1062
|
}
|
|
782
1063
|
});
|
|
783
1064
|
}
|
|
784
|
-
function SidebarGroupAction(_a) {
|
|
785
|
-
var _b = _a, {
|
|
786
|
-
className,
|
|
787
|
-
render
|
|
788
|
-
} = _b, props = __objRest(_b, [
|
|
789
|
-
"className",
|
|
790
|
-
"render"
|
|
791
|
-
]);
|
|
792
|
-
return useRender({
|
|
793
|
-
defaultTagName: "button",
|
|
794
|
-
props: mergeProps(
|
|
795
|
-
{
|
|
796
|
-
className: cn8(
|
|
797
|
-
"absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
798
|
-
className
|
|
799
|
-
)
|
|
800
|
-
},
|
|
801
|
-
props
|
|
802
|
-
),
|
|
803
|
-
render,
|
|
804
|
-
state: {
|
|
805
|
-
slot: "sidebar-group-action",
|
|
806
|
-
sidebar: "group-action"
|
|
807
|
-
}
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
1065
|
function SidebarGroupContent(_a) {
|
|
811
1066
|
var _b = _a, {
|
|
812
1067
|
className
|
|
813
1068
|
} = _b, props = __objRest(_b, [
|
|
814
1069
|
"className"
|
|
815
1070
|
]);
|
|
816
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ jsx11(
|
|
817
1072
|
"div",
|
|
818
1073
|
__spreadValues({
|
|
819
1074
|
"data-slot": "sidebar-group-content",
|
|
820
1075
|
"data-sidebar": "group-content",
|
|
821
|
-
className:
|
|
1076
|
+
className: cn11("w-full text-xs", className)
|
|
822
1077
|
}, props)
|
|
823
1078
|
);
|
|
824
1079
|
}
|
|
825
1080
|
function SidebarMenu(_a) {
|
|
826
1081
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
827
|
-
return /* @__PURE__ */
|
|
1082
|
+
return /* @__PURE__ */ jsx11(
|
|
828
1083
|
"ul",
|
|
829
1084
|
__spreadValues({
|
|
830
1085
|
"data-slot": "sidebar-menu",
|
|
831
1086
|
"data-sidebar": "menu",
|
|
832
|
-
className:
|
|
1087
|
+
className: cn11("flex w-full min-w-0 flex-col gap-px", className)
|
|
833
1088
|
}, props)
|
|
834
1089
|
);
|
|
835
1090
|
}
|
|
836
1091
|
function SidebarMenuItem(_a) {
|
|
837
1092
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
838
|
-
return /* @__PURE__ */
|
|
1093
|
+
return /* @__PURE__ */ jsx11(
|
|
839
1094
|
"li",
|
|
840
1095
|
__spreadValues({
|
|
841
1096
|
"data-slot": "sidebar-menu-item",
|
|
842
1097
|
"data-sidebar": "menu-item",
|
|
843
|
-
className:
|
|
1098
|
+
className: cn11("group/menu-item relative", className)
|
|
844
1099
|
}, props)
|
|
845
1100
|
);
|
|
846
1101
|
}
|
|
@@ -881,15 +1136,15 @@ function SidebarMenuButton(_a) {
|
|
|
881
1136
|
"className"
|
|
882
1137
|
]);
|
|
883
1138
|
const { isMobile, state } = useSidebar();
|
|
884
|
-
const comp =
|
|
1139
|
+
const comp = useRender2({
|
|
885
1140
|
defaultTagName: "button",
|
|
886
|
-
props:
|
|
1141
|
+
props: mergeProps2(
|
|
887
1142
|
{
|
|
888
|
-
className:
|
|
1143
|
+
className: cn11(sidebarMenuButtonVariants({ variant, size }), className)
|
|
889
1144
|
},
|
|
890
1145
|
props
|
|
891
1146
|
),
|
|
892
|
-
render: !tooltip ? render : /* @__PURE__ */
|
|
1147
|
+
render: !tooltip ? render : /* @__PURE__ */ jsx11(TooltipTrigger, { render }),
|
|
893
1148
|
state: {
|
|
894
1149
|
slot: "sidebar-menu-button",
|
|
895
1150
|
sidebar: "menu-button",
|
|
@@ -905,9 +1160,9 @@ function SidebarMenuButton(_a) {
|
|
|
905
1160
|
children: tooltip
|
|
906
1161
|
};
|
|
907
1162
|
}
|
|
908
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ jsxs6(Tooltip, { children: [
|
|
909
1164
|
comp,
|
|
910
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ jsx11(
|
|
911
1166
|
TooltipContent,
|
|
912
1167
|
__spreadValues({
|
|
913
1168
|
side: "right",
|
|
@@ -917,200 +1172,249 @@ function SidebarMenuButton(_a) {
|
|
|
917
1172
|
)
|
|
918
1173
|
] });
|
|
919
1174
|
}
|
|
920
|
-
function SidebarMenuAction(_a) {
|
|
921
|
-
var _b = _a, {
|
|
922
|
-
className,
|
|
923
|
-
render,
|
|
924
|
-
showOnHover = false
|
|
925
|
-
} = _b, props = __objRest(_b, [
|
|
926
|
-
"className",
|
|
927
|
-
"render",
|
|
928
|
-
"showOnHover"
|
|
929
|
-
]);
|
|
930
|
-
return useRender({
|
|
931
|
-
defaultTagName: "button",
|
|
932
|
-
props: mergeProps(
|
|
933
|
-
{
|
|
934
|
-
className: cn8(
|
|
935
|
-
"absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-[calc(var(--radius-sm)-2px)] p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",
|
|
936
|
-
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",
|
|
937
|
-
className
|
|
938
|
-
)
|
|
939
|
-
},
|
|
940
|
-
props
|
|
941
|
-
),
|
|
942
|
-
render,
|
|
943
|
-
state: {
|
|
944
|
-
slot: "sidebar-menu-action",
|
|
945
|
-
sidebar: "menu-action"
|
|
946
|
-
}
|
|
947
|
-
});
|
|
948
|
-
}
|
|
949
1175
|
function SidebarMenuBadge(_a) {
|
|
950
1176
|
var _b = _a, {
|
|
951
1177
|
className
|
|
952
1178
|
} = _b, props = __objRest(_b, [
|
|
953
1179
|
"className"
|
|
954
1180
|
]);
|
|
955
|
-
return /* @__PURE__ */
|
|
1181
|
+
return /* @__PURE__ */ jsx11(
|
|
956
1182
|
"div",
|
|
957
1183
|
__spreadValues({
|
|
958
1184
|
"data-slot": "sidebar-menu-badge",
|
|
959
1185
|
"data-sidebar": "menu-badge",
|
|
960
|
-
className:
|
|
1186
|
+
className: cn11(
|
|
961
1187
|
"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-[calc(var(--radius-sm)-2px)] px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",
|
|
962
1188
|
className
|
|
963
1189
|
)
|
|
964
1190
|
}, props)
|
|
965
1191
|
);
|
|
966
1192
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
return /* @__PURE__ */ jsxs4(
|
|
979
|
-
"div",
|
|
980
|
-
__spreadProps(__spreadValues({
|
|
981
|
-
"data-slot": "sidebar-menu-skeleton",
|
|
982
|
-
"data-sidebar": "menu-skeleton",
|
|
983
|
-
className: cn8("flex h-8 items-center gap-2 rounded-md px-2", className)
|
|
984
|
-
}, props), {
|
|
985
|
-
children: [
|
|
986
|
-
showIcon && /* @__PURE__ */ jsx9(
|
|
987
|
-
Skeleton,
|
|
988
|
-
{
|
|
989
|
-
className: "size-4 rounded-md",
|
|
990
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
991
|
-
}
|
|
992
|
-
),
|
|
993
|
-
/* @__PURE__ */ jsx9(
|
|
994
|
-
Skeleton,
|
|
995
|
-
{
|
|
996
|
-
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
997
|
-
"data-sidebar": "menu-skeleton-text",
|
|
998
|
-
style: {
|
|
999
|
-
"--skeleton-width": width
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
)
|
|
1003
|
-
]
|
|
1004
|
-
})
|
|
1005
|
-
);
|
|
1006
|
-
}
|
|
1007
|
-
function SidebarMenuSub(_a) {
|
|
1008
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1009
|
-
return /* @__PURE__ */ jsx9(
|
|
1010
|
-
"ul",
|
|
1011
|
-
__spreadValues({
|
|
1012
|
-
"data-slot": "sidebar-menu-sub",
|
|
1013
|
-
"data-sidebar": "menu-sub",
|
|
1014
|
-
className: cn8(
|
|
1015
|
-
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",
|
|
1016
|
-
className
|
|
1017
|
-
)
|
|
1018
|
-
}, props)
|
|
1019
|
-
);
|
|
1020
|
-
}
|
|
1021
|
-
function SidebarMenuSubItem(_a) {
|
|
1022
|
-
var _b = _a, {
|
|
1023
|
-
className
|
|
1024
|
-
} = _b, props = __objRest(_b, [
|
|
1025
|
-
"className"
|
|
1026
|
-
]);
|
|
1027
|
-
return /* @__PURE__ */ jsx9(
|
|
1028
|
-
"li",
|
|
1029
|
-
__spreadValues({
|
|
1030
|
-
"data-slot": "sidebar-menu-sub-item",
|
|
1031
|
-
"data-sidebar": "menu-sub-item",
|
|
1032
|
-
className: cn8("group/menu-sub-item relative", className)
|
|
1033
|
-
}, props)
|
|
1034
|
-
);
|
|
1193
|
+
|
|
1194
|
+
// src/components/composed/app-sidebar.tsx
|
|
1195
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1196
|
+
function formatSegment(segment, subHref, navMainItems = [], navSecondaryItems = []) {
|
|
1197
|
+
if (subHref) {
|
|
1198
|
+
const matched = [...navMainItems, ...navSecondaryItems].find(
|
|
1199
|
+
(item) => item.url === subHref
|
|
1200
|
+
);
|
|
1201
|
+
if (matched) return matched.title;
|
|
1202
|
+
}
|
|
1203
|
+
return segment.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
1035
1204
|
}
|
|
1036
|
-
function
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
className
|
|
1042
|
-
} = _b, props = __objRest(_b, [
|
|
1043
|
-
"render",
|
|
1044
|
-
"size",
|
|
1045
|
-
"isActive",
|
|
1046
|
-
"className"
|
|
1047
|
-
]);
|
|
1048
|
-
return useRender({
|
|
1049
|
-
defaultTagName: "a",
|
|
1050
|
-
props: mergeProps(
|
|
1051
|
-
{
|
|
1052
|
-
className: cn8(
|
|
1053
|
-
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-xs data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
1054
|
-
className
|
|
1055
|
-
)
|
|
1056
|
-
},
|
|
1057
|
-
props
|
|
1058
|
-
),
|
|
1059
|
-
render,
|
|
1060
|
-
state: {
|
|
1061
|
-
slot: "sidebar-menu-sub-button",
|
|
1062
|
-
sidebar: "menu-sub-button",
|
|
1063
|
-
size,
|
|
1064
|
-
active: isActive
|
|
1065
|
-
}
|
|
1066
|
-
});
|
|
1205
|
+
function isRouteActive(url, pathname) {
|
|
1206
|
+
if (!pathname) return false;
|
|
1207
|
+
if (url === "/") return pathname === "/";
|
|
1208
|
+
const rootPrefix = `/${url.split("/")[1]}`;
|
|
1209
|
+
return pathname === url || pathname.startsWith(rootPrefix);
|
|
1067
1210
|
}
|
|
1068
|
-
|
|
1069
|
-
// src/components/composed/nav-user.tsx
|
|
1070
|
-
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1071
|
-
var NavUser = memo2(function NavUser2({
|
|
1211
|
+
var AppSidebar = memo(function AppSidebar2({
|
|
1072
1212
|
name,
|
|
1073
1213
|
email,
|
|
1214
|
+
orgRole,
|
|
1215
|
+
brand = "Prediktif",
|
|
1216
|
+
href,
|
|
1217
|
+
confirmDialog = false,
|
|
1218
|
+
headerDropdown = false,
|
|
1074
1219
|
image,
|
|
1075
|
-
|
|
1220
|
+
defaultOpen = true,
|
|
1221
|
+
navMainItems,
|
|
1222
|
+
navSecondaryItems = [],
|
|
1223
|
+
organizations,
|
|
1224
|
+
activeOrg,
|
|
1225
|
+
setActiveOrg,
|
|
1226
|
+
children
|
|
1076
1227
|
}) {
|
|
1228
|
+
const _isMobile = useIsMobile();
|
|
1229
|
+
const pathname = usePathname();
|
|
1230
|
+
const segments = pathname ? pathname.split("/").filter(Boolean) : [];
|
|
1077
1231
|
const initials = name ? name.trim().split(" ").map((n) => n[0]).join("").substring(0, 2).toUpperCase() : "U";
|
|
1078
|
-
return /* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
|
|
1232
|
+
return /* @__PURE__ */ jsxs7(SidebarProvider, { defaultOpen, children: [
|
|
1233
|
+
/* @__PURE__ */ jsxs7(Sidebar, { collapsible: "icon", children: [
|
|
1234
|
+
/* @__PURE__ */ jsx12(SidebarHeader, { children: headerDropdown ? /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
|
|
1235
|
+
/* @__PURE__ */ jsx12(
|
|
1236
|
+
DropdownMenuTrigger,
|
|
1237
|
+
{
|
|
1238
|
+
render: /* @__PURE__ */ jsxs7(
|
|
1239
|
+
SidebarMenuButton,
|
|
1240
|
+
{
|
|
1241
|
+
size: "lg",
|
|
1242
|
+
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
1243
|
+
children: [
|
|
1244
|
+
/* @__PURE__ */ jsx12("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ jsx12(Command, { className: "size-4" }) }),
|
|
1245
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
1246
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: (activeOrg == null ? void 0 : activeOrg.name) || brand }),
|
|
1247
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate text-xs", children: (activeOrg == null ? void 0 : activeOrg.plan) || orgRole })
|
|
1248
|
+
] }),
|
|
1249
|
+
/* @__PURE__ */ jsx12(ChevronsUpDown, { className: "ml-auto" })
|
|
1250
|
+
]
|
|
1251
|
+
}
|
|
1252
|
+
)
|
|
1253
|
+
}
|
|
1254
|
+
),
|
|
1255
|
+
/* @__PURE__ */ jsx12(
|
|
1256
|
+
DropdownMenuContent,
|
|
1257
|
+
{
|
|
1258
|
+
className: "w-(--radix-dropdown-menu-trigger-width) min-w-60 rounded-lg",
|
|
1259
|
+
align: "start",
|
|
1260
|
+
side: "bottom",
|
|
1261
|
+
sideOffset: 4,
|
|
1262
|
+
children: /* @__PURE__ */ jsxs7(DropdownMenuGroup, { children: [
|
|
1263
|
+
/* @__PURE__ */ jsx12(DropdownMenuLabel, { className: "text-xs text-muted-foreground", children: "Organizations" }),
|
|
1264
|
+
(organizations || []).map((org) => {
|
|
1265
|
+
return /* @__PURE__ */ jsxs7(
|
|
1266
|
+
DropdownMenuItem,
|
|
1267
|
+
{
|
|
1268
|
+
onClick: () => setActiveOrg == null ? void 0 : setActiveOrg(org),
|
|
1269
|
+
className: "gap-2 p-2",
|
|
1270
|
+
children: [
|
|
1271
|
+
/* @__PURE__ */ jsx12("div", { className: "flex size-6 items-center justify-center rounded-md border", children: /* @__PURE__ */ jsx12(Command, { className: "size-3.5 shrink-0" }) }),
|
|
1272
|
+
org.name
|
|
1273
|
+
]
|
|
1274
|
+
},
|
|
1275
|
+
org.name
|
|
1276
|
+
);
|
|
1277
|
+
})
|
|
1278
|
+
] })
|
|
1279
|
+
}
|
|
1280
|
+
)
|
|
1281
|
+
] }) }) }) : /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: /* @__PURE__ */ jsxs7(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ jsx12(Link, { href: "/" }), children: [
|
|
1282
|
+
/* @__PURE__ */ jsx12("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ jsx12(Command, { className: "size-4" }) }),
|
|
1283
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
1284
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: brand }),
|
|
1285
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate text-xs", children: orgRole })
|
|
1286
|
+
] })
|
|
1287
|
+
] }) }) }) }),
|
|
1288
|
+
/* @__PURE__ */ jsxs7(SidebarContent, { children: [
|
|
1289
|
+
/* @__PURE__ */ jsxs7(SidebarGroup, { children: [
|
|
1290
|
+
/* @__PURE__ */ jsx12(SidebarGroupLabel, { children: "Platform" }),
|
|
1291
|
+
/* @__PURE__ */ jsx12(SidebarMenu, { children: navMainItems.map(({ title, url, icon: Icon, locked }) => {
|
|
1292
|
+
const isActive = isRouteActive(url, pathname);
|
|
1293
|
+
return /* @__PURE__ */ jsxs7(SidebarMenuItem, { children: [
|
|
1294
|
+
/* @__PURE__ */ jsxs7(
|
|
1295
|
+
SidebarMenuButton,
|
|
1296
|
+
{
|
|
1297
|
+
isActive,
|
|
1298
|
+
tooltip: title,
|
|
1299
|
+
render: /* @__PURE__ */ jsx12(Link, { href: url }),
|
|
1300
|
+
children: [
|
|
1301
|
+
/* @__PURE__ */ jsx12(Icon, {}),
|
|
1302
|
+
/* @__PURE__ */ jsx12("span", { children: title })
|
|
1303
|
+
]
|
|
1304
|
+
}
|
|
1305
|
+
),
|
|
1306
|
+
locked && /* @__PURE__ */ jsx12(SidebarMenuBadge, { children: /* @__PURE__ */ jsx12(LockIcon, { size: 12 }) })
|
|
1307
|
+
] }, title);
|
|
1308
|
+
}) })
|
|
1309
|
+
] }),
|
|
1310
|
+
/* @__PURE__ */ jsx12(SidebarGroup, { className: "mt-auto", children: /* @__PURE__ */ jsx12(SidebarGroupContent, { children: /* @__PURE__ */ jsx12(SidebarMenu, { children: navSecondaryItems.map(({ title, url, icon: Icon, locked }) => {
|
|
1311
|
+
const isActive = isRouteActive(url, pathname);
|
|
1312
|
+
return /* @__PURE__ */ jsxs7(SidebarMenuItem, { children: [
|
|
1313
|
+
/* @__PURE__ */ jsxs7(
|
|
1314
|
+
SidebarMenuButton,
|
|
1315
|
+
{
|
|
1316
|
+
size: "sm",
|
|
1317
|
+
isActive,
|
|
1318
|
+
tooltip: title,
|
|
1319
|
+
render: /* @__PURE__ */ jsx12(Link, { href: url }),
|
|
1320
|
+
children: [
|
|
1321
|
+
/* @__PURE__ */ jsx12(Icon, {}),
|
|
1322
|
+
/* @__PURE__ */ jsx12("span", { children: title })
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
),
|
|
1326
|
+
locked && /* @__PURE__ */ jsx12(SidebarMenuBadge, { children: /* @__PURE__ */ jsx12(LockIcon, { size: 12 }) })
|
|
1327
|
+
] }, title);
|
|
1328
|
+
}) }) }) })
|
|
1329
|
+
] }),
|
|
1330
|
+
/* @__PURE__ */ jsx12(SidebarFooter, { children: /* @__PURE__ */ jsx12(SidebarMenu, { children: /* @__PURE__ */ jsx12(SidebarMenuItem, { children: confirmDialog ? /* @__PURE__ */ jsxs7(AlertDialog, { children: [
|
|
1331
|
+
/* @__PURE__ */ jsx12(
|
|
1332
|
+
AlertDialogTrigger,
|
|
1333
|
+
{
|
|
1334
|
+
render: /* @__PURE__ */ jsxs7(SidebarMenuButton, { size: "lg", children: [
|
|
1335
|
+
/* @__PURE__ */ jsxs7(Avatar, { children: [
|
|
1336
|
+
/* @__PURE__ */ jsx12(AvatarImage, { src: image || "", alt: name || "" }),
|
|
1337
|
+
/* @__PURE__ */ jsx12(AvatarFallback, { children: initials })
|
|
1338
|
+
] }),
|
|
1339
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
1340
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: name }),
|
|
1341
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate text-xs text-muted-foreground", children: email })
|
|
1342
|
+
] })
|
|
1343
|
+
] })
|
|
1344
|
+
}
|
|
1345
|
+
),
|
|
1346
|
+
/* @__PURE__ */ jsxs7(AlertDialogContent, { children: [
|
|
1347
|
+
/* @__PURE__ */ jsxs7(AlertDialogHeader, { children: [
|
|
1348
|
+
/* @__PURE__ */ jsx12(AlertDialogTitle, { children: "Manage Account in Identity" }),
|
|
1349
|
+
/* @__PURE__ */ jsx12(AlertDialogDescription, { children: "You will be redirected to the Identity website to manage your profile, account, and settings." })
|
|
1350
|
+
] }),
|
|
1351
|
+
/* @__PURE__ */ jsxs7(AlertDialogFooter, { children: [
|
|
1352
|
+
/* @__PURE__ */ jsx12(AlertDialogCancel, { children: "Cancel" }),
|
|
1353
|
+
/* @__PURE__ */ jsx12(
|
|
1354
|
+
AlertDialogAction,
|
|
1355
|
+
{
|
|
1356
|
+
nativeButton: false,
|
|
1357
|
+
render: /* @__PURE__ */ jsx12(Link, { href, target: "_blank" }),
|
|
1358
|
+
children: "Continue"
|
|
1359
|
+
}
|
|
1360
|
+
)
|
|
1361
|
+
] })
|
|
1362
|
+
] })
|
|
1363
|
+
] }) : /* @__PURE__ */ jsxs7(SidebarMenuButton, { size: "lg", render: /* @__PURE__ */ jsx12(Link, { href }), children: [
|
|
1364
|
+
/* @__PURE__ */ jsxs7(Avatar, { children: [
|
|
1365
|
+
/* @__PURE__ */ jsx12(AvatarImage, { src: image || "", alt: name || "" }),
|
|
1366
|
+
/* @__PURE__ */ jsx12(AvatarFallback, { children: initials })
|
|
1367
|
+
] }),
|
|
1368
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
|
|
1369
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate font-medium", children: name }),
|
|
1370
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate text-xs text-muted-foreground", children: email })
|
|
1371
|
+
] })
|
|
1372
|
+
] }) }) }) }),
|
|
1373
|
+
/* @__PURE__ */ jsx12(SidebarRail, {})
|
|
1082
1374
|
] }),
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
-
|
|
1375
|
+
/* @__PURE__ */ jsxs7(SidebarInset, { children: [
|
|
1376
|
+
/* @__PURE__ */ jsx12("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 px-4", children: [
|
|
1377
|
+
/* @__PURE__ */ jsx12(SidebarTrigger, { className: "-ml-1" }),
|
|
1378
|
+
/* @__PURE__ */ jsx12(
|
|
1379
|
+
Separator,
|
|
1380
|
+
{
|
|
1381
|
+
orientation: "vertical",
|
|
1382
|
+
className: "mr-2 data-vertical:h-4 data-vertical:self-auto"
|
|
1383
|
+
}
|
|
1384
|
+
),
|
|
1385
|
+
/* @__PURE__ */ jsx12(Breadcrumb, { children: /* @__PURE__ */ jsxs7(BreadcrumbList, { children: [
|
|
1386
|
+
/* @__PURE__ */ jsx12(BreadcrumbItem, { children: /* @__PURE__ */ jsx12(BreadcrumbLink, { render: /* @__PURE__ */ jsx12(Link, { href: "/" }), children: "Platform" }) }),
|
|
1387
|
+
/* @__PURE__ */ jsx12(BreadcrumbSeparator, {}),
|
|
1388
|
+
/* @__PURE__ */ jsx12(BreadcrumbItem, { children: /* @__PURE__ */ jsx12(BreadcrumbPage, { children: segments.length === 0 ? "Overview" : formatSegment(
|
|
1389
|
+
segments[segments.length - 1],
|
|
1390
|
+
`/${segments.join("/")}`,
|
|
1391
|
+
navMainItems,
|
|
1392
|
+
navSecondaryItems
|
|
1393
|
+
) }) })
|
|
1394
|
+
] }) })
|
|
1395
|
+
] }) }),
|
|
1396
|
+
/* @__PURE__ */ jsx12("div", { className: "p-4 pt-0", children })
|
|
1086
1397
|
] })
|
|
1087
|
-
] })
|
|
1398
|
+
] });
|
|
1399
|
+
});
|
|
1400
|
+
|
|
1401
|
+
// src/components/composed/header-title.tsx
|
|
1402
|
+
import { memo as memo2 } from "react";
|
|
1403
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1404
|
+
var HeaderTitle = memo2(function HeaderTitle2({
|
|
1405
|
+
title,
|
|
1406
|
+
subtitle,
|
|
1407
|
+
children
|
|
1408
|
+
}) {
|
|
1409
|
+
return /* @__PURE__ */ jsxs8("div", { className: "w-full space-y-4", children: [
|
|
1410
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
1411
|
+
/* @__PURE__ */ jsx13("h1", { className: "font-semibold", children: title }),
|
|
1412
|
+
/* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground", children: subtitle })
|
|
1413
|
+
] }),
|
|
1414
|
+
children
|
|
1415
|
+
] });
|
|
1088
1416
|
});
|
|
1089
1417
|
export {
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
Sidebar,
|
|
1093
|
-
SidebarContent,
|
|
1094
|
-
SidebarFooter,
|
|
1095
|
-
SidebarGroup,
|
|
1096
|
-
SidebarGroupAction,
|
|
1097
|
-
SidebarGroupContent,
|
|
1098
|
-
SidebarGroupLabel,
|
|
1099
|
-
SidebarHeader,
|
|
1100
|
-
SidebarInput,
|
|
1101
|
-
SidebarInset,
|
|
1102
|
-
SidebarMenu,
|
|
1103
|
-
SidebarMenuAction,
|
|
1104
|
-
SidebarMenuBadge,
|
|
1105
|
-
SidebarMenuButton,
|
|
1106
|
-
SidebarMenuItem,
|
|
1107
|
-
SidebarMenuSkeleton,
|
|
1108
|
-
SidebarMenuSub,
|
|
1109
|
-
SidebarMenuSubButton,
|
|
1110
|
-
SidebarMenuSubItem,
|
|
1111
|
-
SidebarProvider,
|
|
1112
|
-
SidebarRail,
|
|
1113
|
-
SidebarSeparator,
|
|
1114
|
-
SidebarTrigger,
|
|
1115
|
-
useSidebar
|
|
1418
|
+
AppSidebar,
|
|
1419
|
+
HeaderTitle
|
|
1116
1420
|
};
|