@bleakedev/bleake-components 0.0.1
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.cjs +2384 -0
- package/dist/index.d.cts +311 -0
- package/dist/index.d.ts +311 -0
- package/dist/index.js +2310 -0
- package/package.json +47 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2384 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lucideReact = require('lucide-react');
|
|
4
|
+
var bleakeCore = require('@bleakedev/bleake-core');
|
|
5
|
+
var radixUi = require('radix-ui');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var react$1 = require('react');
|
|
9
|
+
var reactDayPicker = require('react-day-picker');
|
|
10
|
+
var react = require('@base-ui/react');
|
|
11
|
+
var cmdk = require('cmdk');
|
|
12
|
+
var inputOtp = require('input-otp');
|
|
13
|
+
var framerMotion = require('framer-motion');
|
|
14
|
+
var sonner = require('sonner');
|
|
15
|
+
|
|
16
|
+
// src/primitives/actions-menu/index.tsx
|
|
17
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
18
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-xl border border-transparent bg-clip-padding text-sm/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: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 cursor-pointer gap-2 transition-all duration-300 rounded-lg",
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
variant: {
|
|
22
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
23
|
+
outline: "border-border bg-white hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",
|
|
24
|
+
secondary: "bg-orange-200/20 text-orange-600 border border-orange-400/40 hover:bg-orange-300/25 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
25
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
26
|
+
destructive: "bg-destructive text-white hover:bg-destructive/20",
|
|
27
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
28
|
+
success: "text-green-600 bg-green-200/50 hover:text-green-700 border border-green-500/40"
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
sm: "h-7 px-5",
|
|
32
|
+
default: "h-9 px-4 py-2",
|
|
33
|
+
lg: "h-11 px-6",
|
|
34
|
+
icon: "h-fit w-fit"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
variant: "default",
|
|
39
|
+
size: "default"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
var Button = ({
|
|
44
|
+
className,
|
|
45
|
+
variant = "default",
|
|
46
|
+
size = "default",
|
|
47
|
+
asChild = false,
|
|
48
|
+
...props
|
|
49
|
+
}) => {
|
|
50
|
+
const Comp = asChild ? radixUi.Slot.Root : "button";
|
|
51
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
+
Comp,
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "button",
|
|
55
|
+
"data-variant": variant,
|
|
56
|
+
"data-size": size,
|
|
57
|
+
className: bleakeCore.merge(buttonVariants({ variant, size, className })),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
var DropdownMenu = ({
|
|
63
|
+
...props
|
|
64
|
+
}) => {
|
|
65
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
+
radixUi.DropdownMenu.Root,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "dropdown-menu",
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
var DropdownMenuContent = ({
|
|
74
|
+
className,
|
|
75
|
+
align = "start",
|
|
76
|
+
sideOffset = 4,
|
|
77
|
+
...props
|
|
78
|
+
}) => {
|
|
79
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.DropdownMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
radixUi.DropdownMenu.Content,
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "dropdown-menu-content",
|
|
83
|
+
sideOffset,
|
|
84
|
+
align,
|
|
85
|
+
className: bleakeCore.merge(
|
|
86
|
+
"z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-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 data-[side=bottom]:slide-in-from-top-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-[state=closed]:overflow-hidden 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",
|
|
87
|
+
className
|
|
88
|
+
),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
) });
|
|
92
|
+
};
|
|
93
|
+
var DropdownMenuTrigger = ({
|
|
94
|
+
...props
|
|
95
|
+
}) => {
|
|
96
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
+
radixUi.DropdownMenu.Trigger,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "dropdown-menu-trigger",
|
|
100
|
+
...props
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
var ActionsMenu = ({
|
|
105
|
+
children,
|
|
106
|
+
align = "end",
|
|
107
|
+
triggerDirection = "vertical"
|
|
108
|
+
}) => {
|
|
109
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
111
|
+
Button,
|
|
112
|
+
{
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
size: "icon",
|
|
115
|
+
children: triggerDirection === "vertical" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EllipsisVertical, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EllipsisVertical, { className: "rotate-90" })
|
|
116
|
+
}
|
|
117
|
+
) }),
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
DropdownMenuContent,
|
|
120
|
+
{
|
|
121
|
+
className: "w-[--radix-dropdown-menu-trigger-width]",
|
|
122
|
+
side: "bottom",
|
|
123
|
+
sideOffset: 4,
|
|
124
|
+
align,
|
|
125
|
+
alignOffset: 1,
|
|
126
|
+
children
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] });
|
|
130
|
+
};
|
|
131
|
+
var AlertDialog = (props) => {
|
|
132
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
+
radixUi.AlertDialog.Root,
|
|
134
|
+
{
|
|
135
|
+
"data-slot": "alert-dialog",
|
|
136
|
+
...props
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
var AlertDialogAction = ({
|
|
141
|
+
className,
|
|
142
|
+
variant = "default",
|
|
143
|
+
size = "default",
|
|
144
|
+
...props
|
|
145
|
+
}) => {
|
|
146
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
147
|
+
Button,
|
|
148
|
+
{
|
|
149
|
+
variant,
|
|
150
|
+
size,
|
|
151
|
+
asChild: true,
|
|
152
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
+
radixUi.AlertDialog.Action,
|
|
154
|
+
{
|
|
155
|
+
"data-slot": "alert-dialog-action",
|
|
156
|
+
className: bleakeCore.merge(className),
|
|
157
|
+
...props
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
var AlertDialogCancel = ({
|
|
164
|
+
className,
|
|
165
|
+
variant = "outline",
|
|
166
|
+
size = "default",
|
|
167
|
+
...props
|
|
168
|
+
}) => {
|
|
169
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
170
|
+
Button,
|
|
171
|
+
{
|
|
172
|
+
variant,
|
|
173
|
+
size,
|
|
174
|
+
asChild: true,
|
|
175
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
176
|
+
radixUi.AlertDialog.Cancel,
|
|
177
|
+
{
|
|
178
|
+
"data-slot": "alert-dialog-cancel",
|
|
179
|
+
className: bleakeCore.merge(className),
|
|
180
|
+
...props
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
};
|
|
186
|
+
var AlertDialogOverlay = ({
|
|
187
|
+
className,
|
|
188
|
+
...props
|
|
189
|
+
}) => {
|
|
190
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
191
|
+
radixUi.AlertDialog.Overlay,
|
|
192
|
+
{
|
|
193
|
+
"data-slot": "alert-dialog-overlay",
|
|
194
|
+
className: bleakeCore.merge(
|
|
195
|
+
"fixed inset-0 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",
|
|
196
|
+
className
|
|
197
|
+
),
|
|
198
|
+
...props
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
var AlertDialogPortal = (props) => {
|
|
203
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
204
|
+
radixUi.AlertDialog.Portal,
|
|
205
|
+
{
|
|
206
|
+
"data-slot": "alert-dialog-portal",
|
|
207
|
+
...props
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
var AlertDialogContent = ({
|
|
212
|
+
className,
|
|
213
|
+
size = "default",
|
|
214
|
+
...props
|
|
215
|
+
}) => {
|
|
216
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
217
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
218
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
219
|
+
radixUi.AlertDialog.Content,
|
|
220
|
+
{
|
|
221
|
+
"data-slot": "alert-dialog-content",
|
|
222
|
+
"data-size": size,
|
|
223
|
+
className: bleakeCore.merge(
|
|
224
|
+
"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-4 rounded-lg bg-background p-6 ring-1 ring-foreground/10 duration-100 outline-none",
|
|
225
|
+
"data-[size=sm]:max-w-sm",
|
|
226
|
+
"data-[size=default]:max-w-sm",
|
|
227
|
+
"data-[size=default]:sm:max-w-lg",
|
|
228
|
+
"data-[size=lg]:max-w-2xl",
|
|
229
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
230
|
+
"data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
231
|
+
className
|
|
232
|
+
),
|
|
233
|
+
...props
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
] });
|
|
237
|
+
};
|
|
238
|
+
var AlertDialogDescription = ({
|
|
239
|
+
className,
|
|
240
|
+
...props
|
|
241
|
+
}) => {
|
|
242
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
243
|
+
radixUi.AlertDialog.Description,
|
|
244
|
+
{
|
|
245
|
+
"data-slot": "alert-dialog-description",
|
|
246
|
+
className: bleakeCore.merge(
|
|
247
|
+
"text-xs/relaxed text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
248
|
+
className
|
|
249
|
+
),
|
|
250
|
+
...props
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
var AlertDialogFooter = ({
|
|
255
|
+
className,
|
|
256
|
+
...props
|
|
257
|
+
}) => {
|
|
258
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
259
|
+
"div",
|
|
260
|
+
{
|
|
261
|
+
"data-slot": "alert-dialog-footer",
|
|
262
|
+
className: bleakeCore.merge(
|
|
263
|
+
"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",
|
|
264
|
+
className
|
|
265
|
+
),
|
|
266
|
+
...props
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
};
|
|
270
|
+
var AlertDialogHeader = ({
|
|
271
|
+
className,
|
|
272
|
+
...props
|
|
273
|
+
}) => {
|
|
274
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
275
|
+
"div",
|
|
276
|
+
{
|
|
277
|
+
"data-slot": "alert-dialog-header",
|
|
278
|
+
className: bleakeCore.merge(
|
|
279
|
+
"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]",
|
|
280
|
+
className
|
|
281
|
+
),
|
|
282
|
+
...props
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
var AlertDialogTitle = ({
|
|
287
|
+
className,
|
|
288
|
+
...props
|
|
289
|
+
}) => {
|
|
290
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
291
|
+
radixUi.AlertDialog.Title,
|
|
292
|
+
{
|
|
293
|
+
"data-slot": "alert-dialog-title",
|
|
294
|
+
className: bleakeCore.merge(
|
|
295
|
+
"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",
|
|
296
|
+
className
|
|
297
|
+
),
|
|
298
|
+
...props
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
};
|
|
302
|
+
var AlertDialogTrigger = (props) => {
|
|
303
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
304
|
+
radixUi.AlertDialog.Trigger,
|
|
305
|
+
{
|
|
306
|
+
"data-slot": "alert-dialog-trigger",
|
|
307
|
+
...props
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
};
|
|
311
|
+
var Separator = ({
|
|
312
|
+
className,
|
|
313
|
+
orientation = "horizontal",
|
|
314
|
+
decorative = true,
|
|
315
|
+
...props
|
|
316
|
+
}) => {
|
|
317
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
318
|
+
radixUi.Separator.Root,
|
|
319
|
+
{
|
|
320
|
+
"data-slot": "separator",
|
|
321
|
+
decorative,
|
|
322
|
+
orientation,
|
|
323
|
+
className: bleakeCore.merge(
|
|
324
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
325
|
+
className
|
|
326
|
+
),
|
|
327
|
+
...props
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
};
|
|
331
|
+
var Spinner = ({
|
|
332
|
+
className,
|
|
333
|
+
...props
|
|
334
|
+
}) => {
|
|
335
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
336
|
+
lucideReact.Loader2Icon,
|
|
337
|
+
{
|
|
338
|
+
role: "status",
|
|
339
|
+
"aria-label": "Loading",
|
|
340
|
+
className: bleakeCore.merge("size-4 animate-spin", className),
|
|
341
|
+
...props
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
};
|
|
345
|
+
var ConfirmDialog = ({
|
|
346
|
+
children,
|
|
347
|
+
title,
|
|
348
|
+
description,
|
|
349
|
+
confirmText = "Confirmar",
|
|
350
|
+
cancelText = "Cancelar",
|
|
351
|
+
variant = "destructive",
|
|
352
|
+
onConfirm,
|
|
353
|
+
loading = false,
|
|
354
|
+
disabled = false,
|
|
355
|
+
open: controlledOpen,
|
|
356
|
+
onOpenChange: setControlledOpen,
|
|
357
|
+
confirmIcon
|
|
358
|
+
}) => {
|
|
359
|
+
const ConfirmActionIcon = confirmIcon ?? lucideReact.Trash2;
|
|
360
|
+
const [internalOpen, setInternalOpen] = react$1.useState(false);
|
|
361
|
+
const open = controlledOpen ?? internalOpen;
|
|
362
|
+
const setOpen = setControlledOpen ?? setInternalOpen;
|
|
363
|
+
const handleConfirm = (e) => {
|
|
364
|
+
e.preventDefault();
|
|
365
|
+
const result = onConfirm();
|
|
366
|
+
if (result instanceof Promise) {
|
|
367
|
+
result.then(() => setOpen(false)).catch(() => void 0);
|
|
368
|
+
} else {
|
|
369
|
+
setOpen(false);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
373
|
+
AlertDialog,
|
|
374
|
+
{
|
|
375
|
+
open,
|
|
376
|
+
onOpenChange: setOpen,
|
|
377
|
+
children: [
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
+
AlertDialogTrigger,
|
|
380
|
+
{
|
|
381
|
+
asChild: true,
|
|
382
|
+
disabled,
|
|
383
|
+
children
|
|
384
|
+
}
|
|
385
|
+
),
|
|
386
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "max-w-md p-0 overflow-hidden", children: [
|
|
387
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "px-0 pt-6 pb-4 space-y-2", children: [
|
|
388
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { className: "px-6 text-base font-semibold text-gray-900", children: title }),
|
|
389
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
390
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(AlertDialogDescription, { className: "px-6 text-sm text-gray-500", children: description })
|
|
391
|
+
] }),
|
|
392
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
393
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogFooter, { className: "px-6 mb-3 flex flex-row justify-end gap-2", children: [
|
|
394
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
395
|
+
AlertDialogCancel,
|
|
396
|
+
{
|
|
397
|
+
variant: "outline",
|
|
398
|
+
disabled: loading,
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Ban, {}),
|
|
401
|
+
cancelText
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
406
|
+
AlertDialogAction,
|
|
407
|
+
{
|
|
408
|
+
variant,
|
|
409
|
+
className: "min-w-32",
|
|
410
|
+
disabled: loading,
|
|
411
|
+
onClick: handleConfirm,
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConfirmActionIcon, {}),
|
|
414
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : confirmText
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
)
|
|
418
|
+
] })
|
|
419
|
+
] })
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
};
|
|
424
|
+
var Glow = ({ className, background }) => {
|
|
425
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
426
|
+
"div",
|
|
427
|
+
{
|
|
428
|
+
className: bleakeCore.merge("absolute rounded-full", className),
|
|
429
|
+
style: { background }
|
|
430
|
+
}
|
|
431
|
+
);
|
|
432
|
+
};
|
|
433
|
+
var WaveLayer = ({
|
|
434
|
+
className,
|
|
435
|
+
path,
|
|
436
|
+
fill,
|
|
437
|
+
viewBox = "0 0 700 600",
|
|
438
|
+
transform
|
|
439
|
+
}) => {
|
|
440
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
441
|
+
"svg",
|
|
442
|
+
{
|
|
443
|
+
className,
|
|
444
|
+
viewBox,
|
|
445
|
+
fill: "none",
|
|
446
|
+
preserveAspectRatio: "none",
|
|
447
|
+
"aria-hidden": "true",
|
|
448
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
449
|
+
"path",
|
|
450
|
+
{
|
|
451
|
+
d: path,
|
|
452
|
+
fill,
|
|
453
|
+
transform
|
|
454
|
+
}
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
};
|
|
459
|
+
var Image = ({
|
|
460
|
+
url,
|
|
461
|
+
icon,
|
|
462
|
+
label,
|
|
463
|
+
className,
|
|
464
|
+
imageClassName,
|
|
465
|
+
previewClassName
|
|
466
|
+
}) => {
|
|
467
|
+
if (url === void 0) {
|
|
468
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
469
|
+
"div",
|
|
470
|
+
{
|
|
471
|
+
className: bleakeCore.merge(
|
|
472
|
+
"py-3 my-2 rounded-lg border flex items-center justify-center bg-gray-100/50 h-35",
|
|
473
|
+
className
|
|
474
|
+
),
|
|
475
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CameraOff, { className: "text-gray-400" })
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
const Icon = icon;
|
|
480
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: bleakeCore.merge("flex flex-col gap-1", className), children: [
|
|
481
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
|
|
482
|
+
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "text-gray-500 h-5 w-5" }),
|
|
483
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-500", children: label })
|
|
484
|
+
] }),
|
|
485
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
486
|
+
"div",
|
|
487
|
+
{
|
|
488
|
+
className: bleakeCore.merge("py-2 rounded-lg border flex items-center justify-center", imageClassName),
|
|
489
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
490
|
+
"img",
|
|
491
|
+
{
|
|
492
|
+
src: url,
|
|
493
|
+
alt: label ?? "",
|
|
494
|
+
className: bleakeCore.merge("max-h-full max-w-full object-contain", previewClassName)
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
] });
|
|
500
|
+
};
|
|
501
|
+
var DialogClose = ({
|
|
502
|
+
...props
|
|
503
|
+
}) => {
|
|
504
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
505
|
+
radixUi.Dialog.Close,
|
|
506
|
+
{
|
|
507
|
+
"data-slot": "dialog-close",
|
|
508
|
+
...props
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
};
|
|
512
|
+
var DialogOverlay = ({
|
|
513
|
+
className,
|
|
514
|
+
...props
|
|
515
|
+
}) => {
|
|
516
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
517
|
+
radixUi.Dialog.Overlay,
|
|
518
|
+
{
|
|
519
|
+
"data-slot": "dialog-overlay",
|
|
520
|
+
className: bleakeCore.merge(
|
|
521
|
+
"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",
|
|
522
|
+
className
|
|
523
|
+
),
|
|
524
|
+
...props
|
|
525
|
+
}
|
|
526
|
+
);
|
|
527
|
+
};
|
|
528
|
+
var DialogPortal = ({
|
|
529
|
+
...props
|
|
530
|
+
}) => {
|
|
531
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
+
radixUi.Dialog.Portal,
|
|
533
|
+
{
|
|
534
|
+
"data-slot": "dialog-portal",
|
|
535
|
+
...props
|
|
536
|
+
}
|
|
537
|
+
);
|
|
538
|
+
};
|
|
539
|
+
var DialogContent = ({
|
|
540
|
+
className,
|
|
541
|
+
children,
|
|
542
|
+
showCloseButton = true,
|
|
543
|
+
...props
|
|
544
|
+
}) => {
|
|
545
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
546
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
547
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
548
|
+
radixUi.Dialog.Content,
|
|
549
|
+
{
|
|
550
|
+
"data-slot": "dialog-content",
|
|
551
|
+
className: bleakeCore.merge(
|
|
552
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-xs/relaxed ring-1 ring-foreground/10 duration-100 outline-none 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",
|
|
553
|
+
className
|
|
554
|
+
),
|
|
555
|
+
...props,
|
|
556
|
+
children: [
|
|
557
|
+
children,
|
|
558
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
559
|
+
radixUi.Dialog.Close,
|
|
560
|
+
{
|
|
561
|
+
"data-slot": "dialog-close",
|
|
562
|
+
asChild: true,
|
|
563
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
564
|
+
Button,
|
|
565
|
+
{
|
|
566
|
+
variant: "ghost",
|
|
567
|
+
className: "absolute top-2 right-2",
|
|
568
|
+
size: "icon",
|
|
569
|
+
children: [
|
|
570
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
571
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
)
|
|
580
|
+
] });
|
|
581
|
+
};
|
|
582
|
+
var DialogDescription = ({
|
|
583
|
+
className,
|
|
584
|
+
...props
|
|
585
|
+
}) => {
|
|
586
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
587
|
+
radixUi.Dialog.Description,
|
|
588
|
+
{
|
|
589
|
+
"data-slot": "dialog-description",
|
|
590
|
+
className: bleakeCore.merge(
|
|
591
|
+
"text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
592
|
+
className
|
|
593
|
+
),
|
|
594
|
+
...props
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
};
|
|
598
|
+
var DialogFooter = ({
|
|
599
|
+
className,
|
|
600
|
+
showCloseButton = false,
|
|
601
|
+
children,
|
|
602
|
+
...props
|
|
603
|
+
}) => {
|
|
604
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
605
|
+
"div",
|
|
606
|
+
{
|
|
607
|
+
"data-slot": "dialog-footer",
|
|
608
|
+
className: bleakeCore.merge("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
609
|
+
...props,
|
|
610
|
+
children: [
|
|
611
|
+
children,
|
|
612
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", children: "Close" }) })
|
|
613
|
+
]
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
};
|
|
617
|
+
var DialogHeader = ({
|
|
618
|
+
className,
|
|
619
|
+
...props
|
|
620
|
+
}) => {
|
|
621
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
622
|
+
"div",
|
|
623
|
+
{
|
|
624
|
+
"data-slot": "dialog-header",
|
|
625
|
+
className: bleakeCore.merge("flex flex-col gap-1", className),
|
|
626
|
+
...props
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
};
|
|
630
|
+
var DialogTitle = ({
|
|
631
|
+
className,
|
|
632
|
+
...props
|
|
633
|
+
}) => {
|
|
634
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
635
|
+
radixUi.Dialog.Title,
|
|
636
|
+
{
|
|
637
|
+
"data-slot": "dialog-title",
|
|
638
|
+
className: bleakeCore.merge("text-sm font-medium", className),
|
|
639
|
+
...props
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
};
|
|
643
|
+
var DialogTrigger = ({
|
|
644
|
+
...props
|
|
645
|
+
}) => {
|
|
646
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
647
|
+
radixUi.Dialog.Trigger,
|
|
648
|
+
{
|
|
649
|
+
"data-slot": "dialog-trigger",
|
|
650
|
+
...props
|
|
651
|
+
}
|
|
652
|
+
);
|
|
653
|
+
};
|
|
654
|
+
var Dialog = ({
|
|
655
|
+
...props
|
|
656
|
+
}) => {
|
|
657
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
658
|
+
radixUi.Dialog.Root,
|
|
659
|
+
{
|
|
660
|
+
"data-slot": "dialog",
|
|
661
|
+
...props
|
|
662
|
+
}
|
|
663
|
+
);
|
|
664
|
+
};
|
|
665
|
+
var ICON_VARIANTS = {
|
|
666
|
+
orange: "bg-orange-50 ring-orange-200 text-orange-600",
|
|
667
|
+
neutral: "bg-neutral-100 ring-neutral-200 text-neutral-600",
|
|
668
|
+
amber: "bg-amber-50 ring-amber-200 text-amber-600",
|
|
669
|
+
red: "bg-red-50 ring-red-200 text-red-600"
|
|
670
|
+
};
|
|
671
|
+
var Modal = ({
|
|
672
|
+
children,
|
|
673
|
+
openModal = false,
|
|
674
|
+
setOpenModal,
|
|
675
|
+
showClose = true,
|
|
676
|
+
className,
|
|
677
|
+
title,
|
|
678
|
+
description,
|
|
679
|
+
icon: Icon,
|
|
680
|
+
iconVariant = "orange",
|
|
681
|
+
content,
|
|
682
|
+
actions,
|
|
683
|
+
showCancel = false
|
|
684
|
+
}) => {
|
|
685
|
+
const [open, setOpen] = react$1.useState(false);
|
|
686
|
+
const isControlled = openModal !== void 0 && setOpenModal !== void 0;
|
|
687
|
+
const handleClose = () => {
|
|
688
|
+
if (isControlled) setOpenModal?.(false);
|
|
689
|
+
else setOpen(false);
|
|
690
|
+
};
|
|
691
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
692
|
+
Dialog,
|
|
693
|
+
{
|
|
694
|
+
open: isControlled ? openModal : open,
|
|
695
|
+
onOpenChange: isControlled ? setOpenModal : setOpen,
|
|
696
|
+
children: [
|
|
697
|
+
children && /* @__PURE__ */ jsxRuntime.jsx(DialogTrigger, { asChild: true, children }),
|
|
698
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
699
|
+
DialogContent,
|
|
700
|
+
{
|
|
701
|
+
showCloseButton: showClose,
|
|
702
|
+
className: bleakeCore.merge("max-w-lg! p-0 overflow-hidden gap-0", className),
|
|
703
|
+
children: [
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "px-6 py-4 pb-3", children: [
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
706
|
+
Icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
707
|
+
"div",
|
|
708
|
+
{
|
|
709
|
+
className: bleakeCore.merge(
|
|
710
|
+
"flex size-8 items-center justify-center rounded-lg ring-1 shrink-0",
|
|
711
|
+
ICON_VARIANTS[iconVariant]
|
|
712
|
+
),
|
|
713
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" })
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-base font-semibold text-gray-900", children: title })
|
|
717
|
+
] }),
|
|
718
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: "text-sm text-gray-500", children: description })
|
|
719
|
+
] }),
|
|
720
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
721
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-4", children: content }),
|
|
722
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
723
|
+
(showCancel || actions) && /* @__PURE__ */ jsxRuntime.jsxs(DialogFooter, { className: "px-6 py-3 flex flex-row justify-end gap-2", children: [
|
|
724
|
+
showCancel && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
725
|
+
Button,
|
|
726
|
+
{
|
|
727
|
+
variant: "outline",
|
|
728
|
+
size: "sm",
|
|
729
|
+
onClick: handleClose,
|
|
730
|
+
children: [
|
|
731
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Ban, {}),
|
|
732
|
+
"Cancelar"
|
|
733
|
+
]
|
|
734
|
+
}
|
|
735
|
+
),
|
|
736
|
+
actions
|
|
737
|
+
] })
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
)
|
|
741
|
+
]
|
|
742
|
+
}
|
|
743
|
+
);
|
|
744
|
+
};
|
|
745
|
+
var StepItem = ({
|
|
746
|
+
step,
|
|
747
|
+
isCurrent,
|
|
748
|
+
isCompleted,
|
|
749
|
+
index,
|
|
750
|
+
totalSteps
|
|
751
|
+
}) => {
|
|
752
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Fragment, { children: [
|
|
753
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
754
|
+
"div",
|
|
755
|
+
{
|
|
756
|
+
className: bleakeCore.merge("flex flex-row items-center gap-2 opacity-60", isCurrent && "opacity-100"),
|
|
757
|
+
children: [
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
759
|
+
"div",
|
|
760
|
+
{
|
|
761
|
+
className: bleakeCore.merge(
|
|
762
|
+
"p-1 border border-transparent rounded-full flex items-center justify-center",
|
|
763
|
+
isCurrent && "border-orange-500"
|
|
764
|
+
),
|
|
765
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
766
|
+
"div",
|
|
767
|
+
{
|
|
768
|
+
className: bleakeCore.merge(
|
|
769
|
+
"h-10 w-10 flex items-center justify-center bg-gray-200 text-gray-500 rounded-full",
|
|
770
|
+
isCurrent ? "bg-orange-500 text-white opacity-100" : isCompleted ? "bg-orange-500 text-white" : ""
|
|
771
|
+
),
|
|
772
|
+
children: step.step
|
|
773
|
+
}
|
|
774
|
+
)
|
|
775
|
+
}
|
|
776
|
+
),
|
|
777
|
+
step.label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-900", children: step.label })
|
|
778
|
+
]
|
|
779
|
+
}
|
|
780
|
+
),
|
|
781
|
+
index < totalSteps - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "flex-1 mx-4 bg-gray-300" })
|
|
782
|
+
] });
|
|
783
|
+
};
|
|
784
|
+
var Bar = ({
|
|
785
|
+
steps,
|
|
786
|
+
currentStep,
|
|
787
|
+
label,
|
|
788
|
+
className
|
|
789
|
+
}) => {
|
|
790
|
+
const totalSteps = steps.length;
|
|
791
|
+
const progress = (currentStep - 1) / (totalSteps - 1) * 100;
|
|
792
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: bleakeCore.merge("w-full hidden sm:flex flex-col items-center", className), children: [
|
|
793
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-between w-full max-w-xs", children: [
|
|
794
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center px-10", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-1 bg-gray-300/50 rounded-full" }) }),
|
|
795
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
796
|
+
"div",
|
|
797
|
+
{
|
|
798
|
+
className: "absolute left-0 top-1/2 -translate-y-1/2 h-1 bg-orange-500 rounded-full transition-all",
|
|
799
|
+
style: { width: `${progress}%` }
|
|
800
|
+
}
|
|
801
|
+
),
|
|
802
|
+
steps.map((step, index) => {
|
|
803
|
+
const stepNumber = index + 1;
|
|
804
|
+
const isActive = stepNumber === currentStep;
|
|
805
|
+
const isCompleted = stepNumber < currentStep;
|
|
806
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
807
|
+
"div",
|
|
808
|
+
{
|
|
809
|
+
className: "relative z-10 flex items-center justify-center",
|
|
810
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
811
|
+
"div",
|
|
812
|
+
{
|
|
813
|
+
className: bleakeCore.merge(
|
|
814
|
+
"w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition",
|
|
815
|
+
isActive && "bg-orange-500 text-white",
|
|
816
|
+
isCompleted && "bg-orange-500 text-white",
|
|
817
|
+
!isActive && !isCompleted && "bg-gray-200 text-gray-500"
|
|
818
|
+
),
|
|
819
|
+
children: stepNumber
|
|
820
|
+
}
|
|
821
|
+
)
|
|
822
|
+
},
|
|
823
|
+
`${step.step}`
|
|
824
|
+
);
|
|
825
|
+
})
|
|
826
|
+
] }),
|
|
827
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-xs text-gray-500/80 font-light text-center", children: label })
|
|
828
|
+
] });
|
|
829
|
+
};
|
|
830
|
+
var Steps = ({
|
|
831
|
+
steps,
|
|
832
|
+
currentStep,
|
|
833
|
+
variant = "line",
|
|
834
|
+
label,
|
|
835
|
+
className
|
|
836
|
+
}) => {
|
|
837
|
+
if (variant === "bar") {
|
|
838
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
839
|
+
Bar,
|
|
840
|
+
{
|
|
841
|
+
steps,
|
|
842
|
+
currentStep,
|
|
843
|
+
label,
|
|
844
|
+
className
|
|
845
|
+
}
|
|
846
|
+
);
|
|
847
|
+
}
|
|
848
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
849
|
+
"div",
|
|
850
|
+
{
|
|
851
|
+
className: bleakeCore.merge(
|
|
852
|
+
"w-full hidden sm:flex items-center justify-center p-4 px-20 select-none",
|
|
853
|
+
className
|
|
854
|
+
),
|
|
855
|
+
children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
856
|
+
StepItem,
|
|
857
|
+
{
|
|
858
|
+
step,
|
|
859
|
+
isCurrent: step.step === currentStep,
|
|
860
|
+
isCompleted: step.step < currentStep,
|
|
861
|
+
index,
|
|
862
|
+
totalSteps: steps.length
|
|
863
|
+
},
|
|
864
|
+
step.label
|
|
865
|
+
))
|
|
866
|
+
}
|
|
867
|
+
);
|
|
868
|
+
};
|
|
869
|
+
var Tooltip = ({
|
|
870
|
+
...props
|
|
871
|
+
}) => {
|
|
872
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
873
|
+
radixUi.Tooltip.Root,
|
|
874
|
+
{
|
|
875
|
+
"data-slot": "tooltip",
|
|
876
|
+
...props
|
|
877
|
+
}
|
|
878
|
+
);
|
|
879
|
+
};
|
|
880
|
+
var TooltipContent = ({
|
|
881
|
+
className,
|
|
882
|
+
sideOffset = 0,
|
|
883
|
+
children,
|
|
884
|
+
...props
|
|
885
|
+
}) => {
|
|
886
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
887
|
+
radixUi.Tooltip.Content,
|
|
888
|
+
{
|
|
889
|
+
"data-slot": "tooltip-content",
|
|
890
|
+
sideOffset,
|
|
891
|
+
className: bleakeCore.merge(
|
|
892
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-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=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",
|
|
893
|
+
className
|
|
894
|
+
),
|
|
895
|
+
...props,
|
|
896
|
+
children: [
|
|
897
|
+
children,
|
|
898
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground" })
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
) });
|
|
902
|
+
};
|
|
903
|
+
var TooltipTrigger = ({
|
|
904
|
+
...props
|
|
905
|
+
}) => {
|
|
906
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
907
|
+
radixUi.Tooltip.Trigger,
|
|
908
|
+
{
|
|
909
|
+
"data-slot": "tooltip-trigger",
|
|
910
|
+
...props
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
};
|
|
914
|
+
var TruncatedText = ({
|
|
915
|
+
text,
|
|
916
|
+
className,
|
|
917
|
+
tooltipClassName
|
|
918
|
+
}) => {
|
|
919
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
920
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: bleakeCore.merge("block truncate min-w-0 w-full cursor-default", className), children: text }) }),
|
|
921
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: tooltipClassName, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: text }) })
|
|
922
|
+
] });
|
|
923
|
+
};
|
|
924
|
+
var Accordion = ({
|
|
925
|
+
className,
|
|
926
|
+
...props
|
|
927
|
+
}) => {
|
|
928
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
929
|
+
radixUi.Accordion.Root,
|
|
930
|
+
{
|
|
931
|
+
"data-slot": "accordion",
|
|
932
|
+
className: bleakeCore.merge("flex w-full flex-col overflow-hidden rounded-md border", className),
|
|
933
|
+
...props
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
};
|
|
937
|
+
var Avatar = ({
|
|
938
|
+
className,
|
|
939
|
+
size = "default",
|
|
940
|
+
...props
|
|
941
|
+
}) => {
|
|
942
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
943
|
+
radixUi.Avatar.Root,
|
|
944
|
+
{
|
|
945
|
+
"data-slot": "avatar",
|
|
946
|
+
"data-size": size,
|
|
947
|
+
className: bleakeCore.merge(
|
|
948
|
+
"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",
|
|
949
|
+
className
|
|
950
|
+
),
|
|
951
|
+
...props
|
|
952
|
+
}
|
|
953
|
+
);
|
|
954
|
+
};
|
|
955
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
956
|
+
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",
|
|
957
|
+
{
|
|
958
|
+
variants: {
|
|
959
|
+
variant: {
|
|
960
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80 font-semibold",
|
|
961
|
+
secondary: "bg-orange-50 border border-orange-200/50 backdrop-blur-sm text-orange-500",
|
|
962
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
963
|
+
outline: "border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
964
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
965
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
966
|
+
success: "bg-green-500/15 text-green-600 ring-1 ring-green-600/20 transition-colors [a&]:hover:bg-green-500/25",
|
|
967
|
+
warning: "bg-amber-500/15 text-amber-600 ring-1 ring-amber-600/20 transition-colors [a&]:hover:bg-amber-500/25",
|
|
968
|
+
error: "bg-red-500/15 text-red-600 ring-1 ring-red-600/20 transition-colors [a&]:hover:bg-red-500/25",
|
|
969
|
+
info: "bg-blue-500/15 text-blue-600 ring-1 ring-blue-600/20 transition-colors [a&]:hover:bg-blue-500/25"
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
defaultVariants: {
|
|
973
|
+
variant: "default"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
);
|
|
977
|
+
var Badge = ({
|
|
978
|
+
className,
|
|
979
|
+
variant = "default",
|
|
980
|
+
asChild = false,
|
|
981
|
+
...props
|
|
982
|
+
}) => {
|
|
983
|
+
const Comp = asChild ? radixUi.Slot.Root : "span";
|
|
984
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
985
|
+
Comp,
|
|
986
|
+
{
|
|
987
|
+
"data-slot": "badge",
|
|
988
|
+
"data-variant": variant,
|
|
989
|
+
className: bleakeCore.merge(badgeVariants({ variant }), className),
|
|
990
|
+
...props
|
|
991
|
+
}
|
|
992
|
+
);
|
|
993
|
+
};
|
|
994
|
+
var Breadcrumb = ({
|
|
995
|
+
className,
|
|
996
|
+
...props
|
|
997
|
+
}) => {
|
|
998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
999
|
+
"nav",
|
|
1000
|
+
{
|
|
1001
|
+
"aria-label": "breadcrumb",
|
|
1002
|
+
"data-slot": "breadcrumb",
|
|
1003
|
+
className: bleakeCore.merge(className),
|
|
1004
|
+
...props
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
};
|
|
1008
|
+
var buttonGroupVariants = classVarianceAuthority.cva(
|
|
1009
|
+
"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-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
1010
|
+
{
|
|
1011
|
+
variants: {
|
|
1012
|
+
orientation: {
|
|
1013
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md!",
|
|
1014
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md!"
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
defaultVariants: {
|
|
1018
|
+
orientation: "horizontal"
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
var ButtonGroup = ({
|
|
1023
|
+
className,
|
|
1024
|
+
orientation,
|
|
1025
|
+
...props
|
|
1026
|
+
}) => {
|
|
1027
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
+
"div",
|
|
1029
|
+
{
|
|
1030
|
+
"data-slot": "button-group",
|
|
1031
|
+
"data-orientation": orientation,
|
|
1032
|
+
className: bleakeCore.merge(buttonGroupVariants({ orientation }), className),
|
|
1033
|
+
...props
|
|
1034
|
+
}
|
|
1035
|
+
);
|
|
1036
|
+
};
|
|
1037
|
+
var CalendarDayButton = ({
|
|
1038
|
+
className,
|
|
1039
|
+
day,
|
|
1040
|
+
modifiers,
|
|
1041
|
+
locale,
|
|
1042
|
+
...props
|
|
1043
|
+
}) => {
|
|
1044
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
1045
|
+
const ref = react$1.useRef(null);
|
|
1046
|
+
react$1.useEffect(() => {
|
|
1047
|
+
if (modifiers.focused) ref.current?.focus();
|
|
1048
|
+
}, [modifiers.focused]);
|
|
1049
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1050
|
+
Button,
|
|
1051
|
+
{
|
|
1052
|
+
ref,
|
|
1053
|
+
variant: "ghost",
|
|
1054
|
+
size: "icon",
|
|
1055
|
+
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
1056
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
1057
|
+
"data-disabled": modifiers.disabled || void 0,
|
|
1058
|
+
"data-range-start": modifiers.range_start,
|
|
1059
|
+
"data-range-end": modifiers.range_end,
|
|
1060
|
+
"data-range-middle": modifiers.range_middle,
|
|
1061
|
+
className: bleakeCore.merge(
|
|
1062
|
+
"relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-middle=true]:bg-muted data-[range-start=true]:bg-primary data-[selected-single=true]:bg-orange-50 data-[selected-single=true]:text-orange-500 data-[selected-single=true]:border data-[selected-single=true]:border-orange-300/50! [&>span]:text-xs [&>span]:opacity-70 data-[disabled=true]:opacity-30 data-[disabled=true]:pointer-events-none data-[disabled=true]:line-through",
|
|
1063
|
+
defaultClassNames.day,
|
|
1064
|
+
className
|
|
1065
|
+
),
|
|
1066
|
+
...props
|
|
1067
|
+
}
|
|
1068
|
+
);
|
|
1069
|
+
};
|
|
1070
|
+
var Calendar = ({
|
|
1071
|
+
className,
|
|
1072
|
+
classNames,
|
|
1073
|
+
showOutsideDays = true,
|
|
1074
|
+
captionLayout = "label",
|
|
1075
|
+
buttonVariant = "ghost",
|
|
1076
|
+
locale,
|
|
1077
|
+
formatters,
|
|
1078
|
+
components,
|
|
1079
|
+
...props
|
|
1080
|
+
}) => {
|
|
1081
|
+
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
1082
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1083
|
+
reactDayPicker.DayPicker,
|
|
1084
|
+
{
|
|
1085
|
+
showOutsideDays,
|
|
1086
|
+
className: bleakeCore.merge(
|
|
1087
|
+
"group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(6)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
1088
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
1089
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
1090
|
+
className
|
|
1091
|
+
),
|
|
1092
|
+
captionLayout,
|
|
1093
|
+
locale,
|
|
1094
|
+
formatters: {
|
|
1095
|
+
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
1096
|
+
...formatters
|
|
1097
|
+
},
|
|
1098
|
+
classNames: {
|
|
1099
|
+
...defaultClassNames,
|
|
1100
|
+
root: bleakeCore.merge("w-full min-w-70", defaultClassNames.root),
|
|
1101
|
+
months: bleakeCore.merge("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
1102
|
+
month: bleakeCore.merge(
|
|
1103
|
+
"flex w-full flex-col justify-center items-center gap-6",
|
|
1104
|
+
defaultClassNames.month
|
|
1105
|
+
),
|
|
1106
|
+
caption_label: bleakeCore.merge("text-sm font-semibold text-gray-900 capitalize"),
|
|
1107
|
+
month_caption: bleakeCore.merge(
|
|
1108
|
+
"flex w-full items-center justify-center gap-2 py-1",
|
|
1109
|
+
defaultClassNames.month_caption
|
|
1110
|
+
),
|
|
1111
|
+
dropdowns: bleakeCore.merge("flex items-center gap-2", defaultClassNames.dropdowns),
|
|
1112
|
+
dropdown: bleakeCore.merge("relative", defaultClassNames.dropdown),
|
|
1113
|
+
dropdown_root: bleakeCore.merge("relative", defaultClassNames.dropdown_root),
|
|
1114
|
+
months_dropdown: bleakeCore.merge(
|
|
1115
|
+
"appearance-none cursor-pointer rounded-md border border-gray-200 bg-background px-2 py-1 pr-6 text-sm font-semibold text-gray-900 capitalize focus:outline-none focus:ring-2 focus:ring-orange-300"
|
|
1116
|
+
),
|
|
1117
|
+
years_dropdown: bleakeCore.merge(
|
|
1118
|
+
"appearance-none cursor-pointer rounded-md border border-gray-200 bg-background px-2 py-1 pr-6 text-sm font-semibold text-gray-900 focus:outline-none focus:ring-2 focus:ring-orange-300"
|
|
1119
|
+
),
|
|
1120
|
+
month_grid: bleakeCore.merge("w-full"),
|
|
1121
|
+
today: bleakeCore.merge("bg-gray-100 rounded-lg"),
|
|
1122
|
+
weekdays: bleakeCore.merge(" border-b border-orange-200 capitalize"),
|
|
1123
|
+
weekday: bleakeCore.merge("pb-2"),
|
|
1124
|
+
nav: bleakeCore.merge(
|
|
1125
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
1126
|
+
defaultClassNames.nav
|
|
1127
|
+
),
|
|
1128
|
+
button_previous: bleakeCore.merge(
|
|
1129
|
+
buttonVariants({ variant: buttonVariant }),
|
|
1130
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
1131
|
+
defaultClassNames.button_previous
|
|
1132
|
+
),
|
|
1133
|
+
button_next: bleakeCore.merge(
|
|
1134
|
+
buttonVariants({ variant: buttonVariant }),
|
|
1135
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
1136
|
+
defaultClassNames.button_next
|
|
1137
|
+
),
|
|
1138
|
+
...classNames
|
|
1139
|
+
},
|
|
1140
|
+
components: {
|
|
1141
|
+
Root: ({ className: className2, rootRef, ...props2 }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1142
|
+
"div",
|
|
1143
|
+
{
|
|
1144
|
+
"data-slot": "calendar",
|
|
1145
|
+
ref: rootRef,
|
|
1146
|
+
className: bleakeCore.merge(className2),
|
|
1147
|
+
...props2
|
|
1148
|
+
}
|
|
1149
|
+
),
|
|
1150
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
1151
|
+
if (orientation === "left")
|
|
1152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1153
|
+
lucideReact.ChevronLeftIcon,
|
|
1154
|
+
{
|
|
1155
|
+
className: bleakeCore.merge("size-4", className2),
|
|
1156
|
+
...props2
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
if (orientation === "right")
|
|
1160
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1161
|
+
lucideReact.ChevronRightIcon,
|
|
1162
|
+
{
|
|
1163
|
+
className: bleakeCore.merge("size-4", className2),
|
|
1164
|
+
...props2
|
|
1165
|
+
}
|
|
1166
|
+
);
|
|
1167
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1168
|
+
lucideReact.ChevronDownIcon,
|
|
1169
|
+
{
|
|
1170
|
+
className: bleakeCore.merge("size-4", className2),
|
|
1171
|
+
...props2
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
},
|
|
1175
|
+
Dropdown: ({ value, onChange, options, className: className2 }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative inline-flex items-center", children: [
|
|
1176
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1177
|
+
"select",
|
|
1178
|
+
{
|
|
1179
|
+
value,
|
|
1180
|
+
onChange,
|
|
1181
|
+
className: bleakeCore.merge(
|
|
1182
|
+
"appearance-none cursor-pointer rounded-md bg-transparent pl-2 pr-7 py-1 text-sm font-semibold text-gray-900 capitalize focus:outline-none",
|
|
1183
|
+
className2
|
|
1184
|
+
),
|
|
1185
|
+
children: options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1186
|
+
"option",
|
|
1187
|
+
{
|
|
1188
|
+
value: option.value,
|
|
1189
|
+
disabled: option.disabled,
|
|
1190
|
+
children: option.label
|
|
1191
|
+
},
|
|
1192
|
+
option.value
|
|
1193
|
+
))
|
|
1194
|
+
}
|
|
1195
|
+
),
|
|
1196
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "pointer-events-none absolute right-1.5 top-1/2 size-3.5 -translate-y-1/2 text-gray-500" })
|
|
1197
|
+
] }),
|
|
1198
|
+
DayButton: (props2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1199
|
+
CalendarDayButton,
|
|
1200
|
+
{
|
|
1201
|
+
locale,
|
|
1202
|
+
...props2
|
|
1203
|
+
}
|
|
1204
|
+
),
|
|
1205
|
+
...components
|
|
1206
|
+
},
|
|
1207
|
+
...props
|
|
1208
|
+
}
|
|
1209
|
+
);
|
|
1210
|
+
};
|
|
1211
|
+
var Card = ({
|
|
1212
|
+
className,
|
|
1213
|
+
size = "default",
|
|
1214
|
+
...props
|
|
1215
|
+
}) => {
|
|
1216
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1217
|
+
"div",
|
|
1218
|
+
{
|
|
1219
|
+
"data-slot": "card",
|
|
1220
|
+
"data-size": size,
|
|
1221
|
+
className: bleakeCore.merge(
|
|
1222
|
+
"group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",
|
|
1223
|
+
className
|
|
1224
|
+
),
|
|
1225
|
+
...props
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1228
|
+
};
|
|
1229
|
+
var Checkbox = ({
|
|
1230
|
+
className,
|
|
1231
|
+
...props
|
|
1232
|
+
}) => {
|
|
1233
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1234
|
+
radixUi.Checkbox.Root,
|
|
1235
|
+
{
|
|
1236
|
+
"data-slot": "checkbox",
|
|
1237
|
+
className: bleakeCore.merge(
|
|
1238
|
+
"bg-white peer relative flex size-4 shrink-0 items-center justify-center rounded-sm border border-input transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary cursor-pointer",
|
|
1239
|
+
className
|
|
1240
|
+
),
|
|
1241
|
+
...props,
|
|
1242
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
+
radixUi.Checkbox.Indicator,
|
|
1244
|
+
{
|
|
1245
|
+
"data-slot": "checkbox-indicator",
|
|
1246
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
1247
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {})
|
|
1248
|
+
}
|
|
1249
|
+
)
|
|
1250
|
+
}
|
|
1251
|
+
);
|
|
1252
|
+
};
|
|
1253
|
+
var Collapsible = ({
|
|
1254
|
+
...props
|
|
1255
|
+
}) => {
|
|
1256
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1257
|
+
radixUi.Collapsible.Root,
|
|
1258
|
+
{
|
|
1259
|
+
"data-slot": "collapsible",
|
|
1260
|
+
...props
|
|
1261
|
+
}
|
|
1262
|
+
);
|
|
1263
|
+
};
|
|
1264
|
+
var Combobox = react.Combobox.Root;
|
|
1265
|
+
var Command = ({
|
|
1266
|
+
className,
|
|
1267
|
+
...props
|
|
1268
|
+
}) => {
|
|
1269
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1270
|
+
cmdk.Command,
|
|
1271
|
+
{
|
|
1272
|
+
"data-slot": "command",
|
|
1273
|
+
className: bleakeCore.merge(
|
|
1274
|
+
"flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground",
|
|
1275
|
+
className
|
|
1276
|
+
),
|
|
1277
|
+
...props
|
|
1278
|
+
}
|
|
1279
|
+
);
|
|
1280
|
+
};
|
|
1281
|
+
var ContextMenu = ({
|
|
1282
|
+
...props
|
|
1283
|
+
}) => {
|
|
1284
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1285
|
+
radixUi.ContextMenu.Root,
|
|
1286
|
+
{
|
|
1287
|
+
"data-slot": "context-menu",
|
|
1288
|
+
...props
|
|
1289
|
+
}
|
|
1290
|
+
);
|
|
1291
|
+
};
|
|
1292
|
+
var HoverCard = ({
|
|
1293
|
+
...props
|
|
1294
|
+
}) => {
|
|
1295
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1296
|
+
radixUi.HoverCard.Root,
|
|
1297
|
+
{
|
|
1298
|
+
"data-slot": "hover-card",
|
|
1299
|
+
...props
|
|
1300
|
+
}
|
|
1301
|
+
);
|
|
1302
|
+
};
|
|
1303
|
+
var Input = ({
|
|
1304
|
+
className,
|
|
1305
|
+
type,
|
|
1306
|
+
...props
|
|
1307
|
+
}) => {
|
|
1308
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1309
|
+
"input",
|
|
1310
|
+
{
|
|
1311
|
+
type,
|
|
1312
|
+
"data-slot": "input",
|
|
1313
|
+
className: bleakeCore.merge(
|
|
1314
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-white px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
1315
|
+
className
|
|
1316
|
+
),
|
|
1317
|
+
...props
|
|
1318
|
+
}
|
|
1319
|
+
);
|
|
1320
|
+
};
|
|
1321
|
+
var inputGroupAddonVariants = classVarianceAuthority.cva(
|
|
1322
|
+
"flex h-auto cursor-text items-center justify-center gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-[calc(var(--radius-sm)-2px)] **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1 **:data-[slot=kbd]:text-[0.625rem] [&>svg:not([class*='size-'])]:size-3.5",
|
|
1323
|
+
{
|
|
1324
|
+
variants: {
|
|
1325
|
+
align: {
|
|
1326
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.275rem] has-[>kbd]:ml-[-0.275rem]",
|
|
1327
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.275rem] has-[>kbd]:mr-[-0.275rem]",
|
|
1328
|
+
"block-start": "order-first w-full justify-start px-2 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
1329
|
+
"block-end": "order-last w-full justify-start px-2 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
defaultVariants: {
|
|
1333
|
+
align: "inline-start"
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
);
|
|
1337
|
+
var inputGroupButtonVariants = classVarianceAuthority.cva(
|
|
1338
|
+
"flex items-center gap-2 rounded-md text-xs/relaxed shadow-none",
|
|
1339
|
+
{
|
|
1340
|
+
variants: {
|
|
1341
|
+
size: {
|
|
1342
|
+
xs: "h-5 gap-1 rounded-[calc(var(--radius-sm)-2px)] px-1 [&>svg:not([class*='size-'])]:size-3",
|
|
1343
|
+
sm: "gap-1",
|
|
1344
|
+
"icon-xs": "size-6 p-0 has-[>svg]:p-0",
|
|
1345
|
+
"icon-sm": "size-7 p-0 has-[>svg]:p-0"
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
defaultVariants: {
|
|
1349
|
+
size: "xs"
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
);
|
|
1353
|
+
var InputGroupAddon = ({
|
|
1354
|
+
className,
|
|
1355
|
+
align = "inline-start",
|
|
1356
|
+
...props
|
|
1357
|
+
}) => {
|
|
1358
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1359
|
+
"div",
|
|
1360
|
+
{
|
|
1361
|
+
"data-slot": "input-group-addon",
|
|
1362
|
+
"data-align": align,
|
|
1363
|
+
className: bleakeCore.merge(inputGroupAddonVariants({ align }), className),
|
|
1364
|
+
...props
|
|
1365
|
+
}
|
|
1366
|
+
);
|
|
1367
|
+
};
|
|
1368
|
+
var InputGroupButton = ({
|
|
1369
|
+
className,
|
|
1370
|
+
type = "button",
|
|
1371
|
+
variant = "ghost",
|
|
1372
|
+
size = "xs",
|
|
1373
|
+
...props
|
|
1374
|
+
}) => {
|
|
1375
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1376
|
+
Button,
|
|
1377
|
+
{
|
|
1378
|
+
type,
|
|
1379
|
+
"data-size": size,
|
|
1380
|
+
variant,
|
|
1381
|
+
className: bleakeCore.merge(inputGroupButtonVariants({ size }), className),
|
|
1382
|
+
...props
|
|
1383
|
+
}
|
|
1384
|
+
);
|
|
1385
|
+
};
|
|
1386
|
+
var InputGroupInput = ({
|
|
1387
|
+
className,
|
|
1388
|
+
...props
|
|
1389
|
+
}) => {
|
|
1390
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1391
|
+
Input,
|
|
1392
|
+
{
|
|
1393
|
+
"data-slot": "input-group-control",
|
|
1394
|
+
className: bleakeCore.merge(
|
|
1395
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
1396
|
+
className
|
|
1397
|
+
),
|
|
1398
|
+
...props
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
};
|
|
1402
|
+
var InputGroupText = ({
|
|
1403
|
+
className,
|
|
1404
|
+
...props
|
|
1405
|
+
}) => {
|
|
1406
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1407
|
+
"span",
|
|
1408
|
+
{
|
|
1409
|
+
className: bleakeCore.merge(
|
|
1410
|
+
"flex items-center gap-2 text-xs/relaxed text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
1411
|
+
className
|
|
1412
|
+
),
|
|
1413
|
+
...props
|
|
1414
|
+
}
|
|
1415
|
+
);
|
|
1416
|
+
};
|
|
1417
|
+
var Textarea = ({
|
|
1418
|
+
className,
|
|
1419
|
+
...props
|
|
1420
|
+
}) => {
|
|
1421
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1422
|
+
"textarea",
|
|
1423
|
+
{
|
|
1424
|
+
"data-slot": "textarea",
|
|
1425
|
+
className: bleakeCore.merge(
|
|
1426
|
+
"flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
1427
|
+
className
|
|
1428
|
+
),
|
|
1429
|
+
...props
|
|
1430
|
+
}
|
|
1431
|
+
);
|
|
1432
|
+
};
|
|
1433
|
+
var InputGroupTextarea = ({
|
|
1434
|
+
className,
|
|
1435
|
+
...props
|
|
1436
|
+
}) => {
|
|
1437
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1438
|
+
Textarea,
|
|
1439
|
+
{
|
|
1440
|
+
"data-slot": "input-group-control",
|
|
1441
|
+
className: bleakeCore.merge(
|
|
1442
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
1443
|
+
className
|
|
1444
|
+
),
|
|
1445
|
+
...props
|
|
1446
|
+
}
|
|
1447
|
+
);
|
|
1448
|
+
};
|
|
1449
|
+
var InputGroup = ({
|
|
1450
|
+
className,
|
|
1451
|
+
...props
|
|
1452
|
+
}) => {
|
|
1453
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1454
|
+
"div",
|
|
1455
|
+
{
|
|
1456
|
+
"data-slot": "input-group",
|
|
1457
|
+
className: bleakeCore.merge(
|
|
1458
|
+
"group/input-group relative flex h-7 w-full min-w-0 items-center rounded-md border border-input bg-input/20 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-md has-data-[align=block-start]:rounded-md has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-md has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
1459
|
+
className
|
|
1460
|
+
),
|
|
1461
|
+
...props
|
|
1462
|
+
}
|
|
1463
|
+
);
|
|
1464
|
+
};
|
|
1465
|
+
var InputOTP = ({
|
|
1466
|
+
className,
|
|
1467
|
+
containerClassName,
|
|
1468
|
+
...props
|
|
1469
|
+
}) => {
|
|
1470
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1471
|
+
inputOtp.OTPInput,
|
|
1472
|
+
{
|
|
1473
|
+
"data-slot": "input-otp",
|
|
1474
|
+
containerClassName: bleakeCore.merge(
|
|
1475
|
+
"cn-input-otp flex items-center has-disabled:opacity-50",
|
|
1476
|
+
containerClassName
|
|
1477
|
+
),
|
|
1478
|
+
spellCheck: false,
|
|
1479
|
+
className: bleakeCore.merge("disabled:cursor-not-allowed", className),
|
|
1480
|
+
...props
|
|
1481
|
+
}
|
|
1482
|
+
);
|
|
1483
|
+
};
|
|
1484
|
+
var itemVariants = classVarianceAuthority.cva(
|
|
1485
|
+
"group/item flex w-full flex-wrap items-center rounded-md border text-xs/relaxed transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
|
|
1486
|
+
{
|
|
1487
|
+
variants: {
|
|
1488
|
+
variant: {
|
|
1489
|
+
default: "border-transparent",
|
|
1490
|
+
outline: "border-border",
|
|
1491
|
+
muted: "border-gray-200/50 bg-muted/50"
|
|
1492
|
+
},
|
|
1493
|
+
size: {
|
|
1494
|
+
default: "gap-2.5 px-3 py-2.5",
|
|
1495
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
1496
|
+
xs: "gap-2.5 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
1497
|
+
}
|
|
1498
|
+
},
|
|
1499
|
+
defaultVariants: {
|
|
1500
|
+
variant: "default",
|
|
1501
|
+
size: "default"
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
);
|
|
1505
|
+
classVarianceAuthority.cva(
|
|
1506
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-center [&_svg]:pointer-events-none",
|
|
1507
|
+
{
|
|
1508
|
+
variants: {
|
|
1509
|
+
variant: {
|
|
1510
|
+
default: "bg-transparent",
|
|
1511
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
1512
|
+
image: "size-8 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
defaultVariants: {
|
|
1516
|
+
variant: "default"
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
);
|
|
1520
|
+
var Item = ({
|
|
1521
|
+
className,
|
|
1522
|
+
variant = "default",
|
|
1523
|
+
size = "default",
|
|
1524
|
+
asChild = false,
|
|
1525
|
+
...props
|
|
1526
|
+
}) => {
|
|
1527
|
+
const Comp = asChild ? radixUi.Slot.Root : "div";
|
|
1528
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1529
|
+
Comp,
|
|
1530
|
+
{
|
|
1531
|
+
"data-slot": "item",
|
|
1532
|
+
"data-variant": variant,
|
|
1533
|
+
"data-size": size,
|
|
1534
|
+
className: bleakeCore.merge(itemVariants({ variant, size, className })),
|
|
1535
|
+
...props
|
|
1536
|
+
}
|
|
1537
|
+
);
|
|
1538
|
+
};
|
|
1539
|
+
var Label = ({
|
|
1540
|
+
className,
|
|
1541
|
+
...props
|
|
1542
|
+
}) => {
|
|
1543
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1544
|
+
radixUi.Label.Root,
|
|
1545
|
+
{
|
|
1546
|
+
"data-slot": "label",
|
|
1547
|
+
className: bleakeCore.merge(
|
|
1548
|
+
"flex items-center gap-2 text-sm/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
1549
|
+
className
|
|
1550
|
+
),
|
|
1551
|
+
...props
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
};
|
|
1555
|
+
var Menubar = ({
|
|
1556
|
+
className,
|
|
1557
|
+
...props
|
|
1558
|
+
}) => {
|
|
1559
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1560
|
+
radixUi.Menubar.Root,
|
|
1561
|
+
{
|
|
1562
|
+
"data-slot": "menubar",
|
|
1563
|
+
className: bleakeCore.merge("flex h-9 items-center rounded-lg border p-1", className),
|
|
1564
|
+
...props
|
|
1565
|
+
}
|
|
1566
|
+
);
|
|
1567
|
+
};
|
|
1568
|
+
var Pagination = ({
|
|
1569
|
+
className,
|
|
1570
|
+
...props
|
|
1571
|
+
}) => {
|
|
1572
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1573
|
+
"nav",
|
|
1574
|
+
{
|
|
1575
|
+
"aria-label": "pagination",
|
|
1576
|
+
"data-slot": "pagination",
|
|
1577
|
+
className: bleakeCore.merge("mx-auto flex w-full justify-center", className),
|
|
1578
|
+
...props
|
|
1579
|
+
}
|
|
1580
|
+
);
|
|
1581
|
+
};
|
|
1582
|
+
var Popover = ({
|
|
1583
|
+
...props
|
|
1584
|
+
}) => {
|
|
1585
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1586
|
+
radixUi.Popover.Root,
|
|
1587
|
+
{
|
|
1588
|
+
"data-slot": "popover",
|
|
1589
|
+
...props
|
|
1590
|
+
}
|
|
1591
|
+
);
|
|
1592
|
+
};
|
|
1593
|
+
var Progress = ({ value, className }) => {
|
|
1594
|
+
const isIndeterminate = value === null;
|
|
1595
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: bleakeCore.merge("relative h-1 w-full overflow-hidden rounded-full bg-muted", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1596
|
+
"div",
|
|
1597
|
+
{
|
|
1598
|
+
className: bleakeCore.merge(
|
|
1599
|
+
"h-full rounded-full bg-[oklch(0.65_0.22_50)]",
|
|
1600
|
+
isIndeterminate ? "w-2/3 animate-pulse" : "motion-safe:transition-[width] duration-150 ease-out"
|
|
1601
|
+
),
|
|
1602
|
+
style: isIndeterminate ? void 0 : { width: `${Math.min(100, Math.max(0, value))}%` }
|
|
1603
|
+
}
|
|
1604
|
+
) });
|
|
1605
|
+
};
|
|
1606
|
+
var RadioGroup = ({
|
|
1607
|
+
className,
|
|
1608
|
+
...props
|
|
1609
|
+
}) => {
|
|
1610
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1611
|
+
radixUi.RadioGroup.Root,
|
|
1612
|
+
{
|
|
1613
|
+
"data-slot": "radio-group",
|
|
1614
|
+
className: bleakeCore.merge("grid w-full gap-3", className),
|
|
1615
|
+
...props
|
|
1616
|
+
}
|
|
1617
|
+
);
|
|
1618
|
+
};
|
|
1619
|
+
var SectionCardHeader = ({
|
|
1620
|
+
title,
|
|
1621
|
+
icon: Icon,
|
|
1622
|
+
action,
|
|
1623
|
+
titleElement,
|
|
1624
|
+
isCollapsable,
|
|
1625
|
+
open,
|
|
1626
|
+
onToggle,
|
|
1627
|
+
headerClassName
|
|
1628
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1629
|
+
"div",
|
|
1630
|
+
{
|
|
1631
|
+
className: bleakeCore.merge(
|
|
1632
|
+
"w-full px-4 py-3 border-b border-gray-200 flex items-center gap-4",
|
|
1633
|
+
headerClassName
|
|
1634
|
+
),
|
|
1635
|
+
children: [
|
|
1636
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1637
|
+
"button",
|
|
1638
|
+
{
|
|
1639
|
+
type: "button",
|
|
1640
|
+
onClick: onToggle,
|
|
1641
|
+
disabled: !isCollapsable,
|
|
1642
|
+
className: bleakeCore.merge(
|
|
1643
|
+
"flex flex-1 items-center gap-2 min-w-0 text-left",
|
|
1644
|
+
isCollapsable ? "cursor-pointer select-none" : "cursor-default"
|
|
1645
|
+
),
|
|
1646
|
+
children: [
|
|
1647
|
+
Icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4 text-orange-500 shrink-0" }),
|
|
1648
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-700 truncate", children: title }),
|
|
1649
|
+
titleElement && titleElement
|
|
1650
|
+
]
|
|
1651
|
+
}
|
|
1652
|
+
),
|
|
1653
|
+
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center shrink-0", children: action }),
|
|
1654
|
+
isCollapsable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1655
|
+
framerMotion.motion.button,
|
|
1656
|
+
{
|
|
1657
|
+
type: "button",
|
|
1658
|
+
onClick: onToggle,
|
|
1659
|
+
"aria-label": open ? "Contraer secci\xF3n" : "Expandir secci\xF3n",
|
|
1660
|
+
animate: { rotate: open ? 180 : 0 },
|
|
1661
|
+
transition: { duration: 0.2 },
|
|
1662
|
+
className: "shrink-0 cursor-pointer",
|
|
1663
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4 text-gray-500" })
|
|
1664
|
+
}
|
|
1665
|
+
)
|
|
1666
|
+
]
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
var SectionCard = ({
|
|
1670
|
+
title,
|
|
1671
|
+
icon: Icon,
|
|
1672
|
+
action,
|
|
1673
|
+
titleElement,
|
|
1674
|
+
children,
|
|
1675
|
+
className,
|
|
1676
|
+
contentClassName,
|
|
1677
|
+
headerClassName,
|
|
1678
|
+
mode = "card",
|
|
1679
|
+
defaultOpen = true,
|
|
1680
|
+
open: controlledOpen,
|
|
1681
|
+
onOpenChange
|
|
1682
|
+
}) => {
|
|
1683
|
+
const isCollapsable = mode === "collapsable";
|
|
1684
|
+
const [internalOpen, setInternalOpen] = react$1.useState(defaultOpen);
|
|
1685
|
+
const isControlled = controlledOpen !== void 0;
|
|
1686
|
+
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
1687
|
+
const handleToggle = () => {
|
|
1688
|
+
if (!isCollapsable) return;
|
|
1689
|
+
const next = !isOpen;
|
|
1690
|
+
if (isControlled) {
|
|
1691
|
+
onOpenChange?.(next);
|
|
1692
|
+
} else {
|
|
1693
|
+
setInternalOpen(next);
|
|
1694
|
+
}
|
|
1695
|
+
};
|
|
1696
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: bleakeCore.merge("pb-4 pt-0 gap-0 overflow-visible", className, isCollapsable && "pb-0"), children: [
|
|
1697
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1698
|
+
SectionCardHeader,
|
|
1699
|
+
{
|
|
1700
|
+
headerClassName,
|
|
1701
|
+
title,
|
|
1702
|
+
icon: Icon,
|
|
1703
|
+
action,
|
|
1704
|
+
isCollapsable,
|
|
1705
|
+
titleElement,
|
|
1706
|
+
open: isOpen,
|
|
1707
|
+
onToggle: handleToggle
|
|
1708
|
+
}
|
|
1709
|
+
),
|
|
1710
|
+
!isCollapsable && /* @__PURE__ */ jsxRuntime.jsx("div", { className: bleakeCore.merge("p-4 flex flex-col gap-4", contentClassName), children }),
|
|
1711
|
+
isCollapsable && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1712
|
+
framerMotion.motion.div,
|
|
1713
|
+
{
|
|
1714
|
+
initial: {
|
|
1715
|
+
height: 0,
|
|
1716
|
+
opacity: 0
|
|
1717
|
+
},
|
|
1718
|
+
animate: {
|
|
1719
|
+
height: "auto",
|
|
1720
|
+
opacity: 1
|
|
1721
|
+
},
|
|
1722
|
+
exit: {
|
|
1723
|
+
height: 0,
|
|
1724
|
+
opacity: 0
|
|
1725
|
+
},
|
|
1726
|
+
transition: {
|
|
1727
|
+
duration: 0.25,
|
|
1728
|
+
ease: "easeInOut"
|
|
1729
|
+
},
|
|
1730
|
+
className: "overflow-visible",
|
|
1731
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: bleakeCore.merge("p-4 flex flex-col gap-4", contentClassName), children })
|
|
1732
|
+
}
|
|
1733
|
+
) })
|
|
1734
|
+
] });
|
|
1735
|
+
};
|
|
1736
|
+
var SelectScrollDownButton = ({
|
|
1737
|
+
className,
|
|
1738
|
+
...props
|
|
1739
|
+
}) => {
|
|
1740
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1741
|
+
radixUi.Select.ScrollDownButton,
|
|
1742
|
+
{
|
|
1743
|
+
"data-slot": "select-scroll-down-button",
|
|
1744
|
+
className: bleakeCore.merge(
|
|
1745
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
1746
|
+
className
|
|
1747
|
+
),
|
|
1748
|
+
...props,
|
|
1749
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, {})
|
|
1750
|
+
}
|
|
1751
|
+
);
|
|
1752
|
+
};
|
|
1753
|
+
var SelectScrollUpButton = ({
|
|
1754
|
+
className,
|
|
1755
|
+
...props
|
|
1756
|
+
}) => {
|
|
1757
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1758
|
+
radixUi.Select.ScrollUpButton,
|
|
1759
|
+
{
|
|
1760
|
+
"data-slot": "select-scroll-up-button",
|
|
1761
|
+
className: bleakeCore.merge(
|
|
1762
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
|
|
1763
|
+
className
|
|
1764
|
+
),
|
|
1765
|
+
...props,
|
|
1766
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, {})
|
|
1767
|
+
}
|
|
1768
|
+
);
|
|
1769
|
+
};
|
|
1770
|
+
var SelectContent = ({
|
|
1771
|
+
className,
|
|
1772
|
+
children,
|
|
1773
|
+
position = "item-aligned",
|
|
1774
|
+
align = "center",
|
|
1775
|
+
...props
|
|
1776
|
+
}) => {
|
|
1777
|
+
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1778
|
+
radixUi.Select.Content,
|
|
1779
|
+
{
|
|
1780
|
+
"data-slot": "select-content",
|
|
1781
|
+
"data-align-trigger": position === "item-aligned",
|
|
1782
|
+
className: bleakeCore.merge(
|
|
1783
|
+
"relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-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:fade-out-0 data-closed:zoom-out-95",
|
|
1784
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1785
|
+
className
|
|
1786
|
+
),
|
|
1787
|
+
position,
|
|
1788
|
+
align,
|
|
1789
|
+
...props,
|
|
1790
|
+
children: [
|
|
1791
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
1792
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1793
|
+
radixUi.Select.Viewport,
|
|
1794
|
+
{
|
|
1795
|
+
"data-position": position,
|
|
1796
|
+
className: bleakeCore.merge(
|
|
1797
|
+
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)"
|
|
1798
|
+
),
|
|
1799
|
+
children
|
|
1800
|
+
}
|
|
1801
|
+
),
|
|
1802
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
1803
|
+
]
|
|
1804
|
+
}
|
|
1805
|
+
) });
|
|
1806
|
+
};
|
|
1807
|
+
var SelectGroup = ({
|
|
1808
|
+
className,
|
|
1809
|
+
...props
|
|
1810
|
+
}) => {
|
|
1811
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1812
|
+
radixUi.Select.Group,
|
|
1813
|
+
{
|
|
1814
|
+
"data-slot": "select-group",
|
|
1815
|
+
className: bleakeCore.merge("scroll-my-1 p-1", className),
|
|
1816
|
+
...props
|
|
1817
|
+
}
|
|
1818
|
+
);
|
|
1819
|
+
};
|
|
1820
|
+
var SelectItem = ({
|
|
1821
|
+
className,
|
|
1822
|
+
children,
|
|
1823
|
+
...props
|
|
1824
|
+
}) => {
|
|
1825
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1826
|
+
radixUi.Select.Item,
|
|
1827
|
+
{
|
|
1828
|
+
"data-slot": "select-item",
|
|
1829
|
+
className: bleakeCore.merge(
|
|
1830
|
+
"relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none border border-transparent focus:bg-orange-50 focus:border focus:border-orange-200/50 focus:text-orange-500! focus:cursor-pointer not-data-[variant=destructive]:focus:**:text-orange-500! data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1831
|
+
className
|
|
1832
|
+
),
|
|
1833
|
+
...props,
|
|
1834
|
+
children: [
|
|
1835
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "pointer-events-none" }) }) }),
|
|
1836
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { children })
|
|
1837
|
+
]
|
|
1838
|
+
}
|
|
1839
|
+
);
|
|
1840
|
+
};
|
|
1841
|
+
var SelectLabel = ({
|
|
1842
|
+
className,
|
|
1843
|
+
...props
|
|
1844
|
+
}) => {
|
|
1845
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1846
|
+
radixUi.Select.Label,
|
|
1847
|
+
{
|
|
1848
|
+
"data-slot": "select-label",
|
|
1849
|
+
className: bleakeCore.merge("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
1850
|
+
...props
|
|
1851
|
+
}
|
|
1852
|
+
);
|
|
1853
|
+
};
|
|
1854
|
+
var SelectSeparator = ({
|
|
1855
|
+
className,
|
|
1856
|
+
...props
|
|
1857
|
+
}) => {
|
|
1858
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1859
|
+
radixUi.Select.Separator,
|
|
1860
|
+
{
|
|
1861
|
+
"data-slot": "select-separator",
|
|
1862
|
+
className: bleakeCore.merge("pointer-events-none -mx-1 my-1 h-px bg-border/50", className),
|
|
1863
|
+
...props
|
|
1864
|
+
}
|
|
1865
|
+
);
|
|
1866
|
+
};
|
|
1867
|
+
var SelectTrigger = ({
|
|
1868
|
+
className,
|
|
1869
|
+
size = "default",
|
|
1870
|
+
children,
|
|
1871
|
+
...props
|
|
1872
|
+
}) => {
|
|
1873
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1874
|
+
radixUi.Select.Trigger,
|
|
1875
|
+
{
|
|
1876
|
+
"data-slot": "select-trigger",
|
|
1877
|
+
"data-size": size,
|
|
1878
|
+
className: bleakeCore.merge(
|
|
1879
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
1880
|
+
className
|
|
1881
|
+
),
|
|
1882
|
+
...props,
|
|
1883
|
+
children: [
|
|
1884
|
+
children,
|
|
1885
|
+
/* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "pointer-events-none size-3.5 text-muted-foreground" }) })
|
|
1886
|
+
]
|
|
1887
|
+
}
|
|
1888
|
+
);
|
|
1889
|
+
};
|
|
1890
|
+
var SelectValue = (props) => {
|
|
1891
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1892
|
+
radixUi.Select.Value,
|
|
1893
|
+
{
|
|
1894
|
+
"data-slot": "select-value",
|
|
1895
|
+
...props
|
|
1896
|
+
}
|
|
1897
|
+
);
|
|
1898
|
+
};
|
|
1899
|
+
var Select = (props) => {
|
|
1900
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1901
|
+
radixUi.Select.Root,
|
|
1902
|
+
{
|
|
1903
|
+
"data-slot": "select",
|
|
1904
|
+
...props
|
|
1905
|
+
}
|
|
1906
|
+
);
|
|
1907
|
+
};
|
|
1908
|
+
var Sheet = (props) => {
|
|
1909
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1910
|
+
radixUi.Dialog.Root,
|
|
1911
|
+
{
|
|
1912
|
+
"data-slot": "sheet",
|
|
1913
|
+
...props
|
|
1914
|
+
}
|
|
1915
|
+
);
|
|
1916
|
+
};
|
|
1917
|
+
var SheetOverlay = ({
|
|
1918
|
+
className,
|
|
1919
|
+
...props
|
|
1920
|
+
}) => {
|
|
1921
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
|
+
radixUi.Dialog.Overlay,
|
|
1923
|
+
{
|
|
1924
|
+
"data-slot": "sheet-overlay",
|
|
1925
|
+
className: bleakeCore.merge(
|
|
1926
|
+
"fixed inset-0 z-50 bg-black/20 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",
|
|
1927
|
+
className
|
|
1928
|
+
),
|
|
1929
|
+
...props
|
|
1930
|
+
}
|
|
1931
|
+
);
|
|
1932
|
+
};
|
|
1933
|
+
var SheetPortal = (props) => {
|
|
1934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1935
|
+
radixUi.Dialog.Portal,
|
|
1936
|
+
{
|
|
1937
|
+
"data-slot": "sheet-portal",
|
|
1938
|
+
...props
|
|
1939
|
+
}
|
|
1940
|
+
);
|
|
1941
|
+
};
|
|
1942
|
+
var SheetContent = ({
|
|
1943
|
+
className,
|
|
1944
|
+
children,
|
|
1945
|
+
side = "right",
|
|
1946
|
+
showCloseButton = true,
|
|
1947
|
+
...props
|
|
1948
|
+
}) => {
|
|
1949
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
1950
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
1951
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1952
|
+
radixUi.Dialog.Content,
|
|
1953
|
+
{
|
|
1954
|
+
"data-slot": "sheet-content",
|
|
1955
|
+
"data-side": side,
|
|
1956
|
+
className: bleakeCore.merge(
|
|
1957
|
+
"fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t 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=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=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
|
|
1958
|
+
className
|
|
1959
|
+
),
|
|
1960
|
+
...props,
|
|
1961
|
+
children: [
|
|
1962
|
+
children,
|
|
1963
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1964
|
+
radixUi.Dialog.Close,
|
|
1965
|
+
{
|
|
1966
|
+
"data-slot": "sheet-close",
|
|
1967
|
+
asChild: true,
|
|
1968
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1969
|
+
Button,
|
|
1970
|
+
{
|
|
1971
|
+
variant: "ghost",
|
|
1972
|
+
className: "absolute top-4 right-4",
|
|
1973
|
+
size: "icon",
|
|
1974
|
+
children: [
|
|
1975
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
1976
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1977
|
+
]
|
|
1978
|
+
}
|
|
1979
|
+
)
|
|
1980
|
+
}
|
|
1981
|
+
)
|
|
1982
|
+
]
|
|
1983
|
+
}
|
|
1984
|
+
)
|
|
1985
|
+
] });
|
|
1986
|
+
};
|
|
1987
|
+
var SheetDescription = ({
|
|
1988
|
+
className,
|
|
1989
|
+
...props
|
|
1990
|
+
}) => {
|
|
1991
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1992
|
+
radixUi.Dialog.Description,
|
|
1993
|
+
{
|
|
1994
|
+
"data-slot": "sheet-description",
|
|
1995
|
+
className: bleakeCore.merge("text-xs/relaxed text-muted-foreground", className),
|
|
1996
|
+
...props
|
|
1997
|
+
}
|
|
1998
|
+
);
|
|
1999
|
+
};
|
|
2000
|
+
var SheetHeader = ({
|
|
2001
|
+
className,
|
|
2002
|
+
...props
|
|
2003
|
+
}) => {
|
|
2004
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
|
+
"div",
|
|
2006
|
+
{
|
|
2007
|
+
"data-slot": "sheet-header",
|
|
2008
|
+
className: bleakeCore.merge("flex flex-col gap-1.5 p-6", className),
|
|
2009
|
+
...props
|
|
2010
|
+
}
|
|
2011
|
+
);
|
|
2012
|
+
};
|
|
2013
|
+
var SheetTitle = ({
|
|
2014
|
+
className,
|
|
2015
|
+
...props
|
|
2016
|
+
}) => {
|
|
2017
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2018
|
+
radixUi.Dialog.Title,
|
|
2019
|
+
{
|
|
2020
|
+
"data-slot": "sheet-title",
|
|
2021
|
+
className: bleakeCore.merge("text-sm font-medium text-foreground", className),
|
|
2022
|
+
...props
|
|
2023
|
+
}
|
|
2024
|
+
);
|
|
2025
|
+
};
|
|
2026
|
+
var SidebarContext = react$1.createContext(null);
|
|
2027
|
+
|
|
2028
|
+
// src/ui/sidebar/useSidebar/index.tsx
|
|
2029
|
+
var useSidebar = () => {
|
|
2030
|
+
const context = react$1.useContext(SidebarContext);
|
|
2031
|
+
if (!context) {
|
|
2032
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2033
|
+
}
|
|
2034
|
+
return context;
|
|
2035
|
+
};
|
|
2036
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2037
|
+
var Sidebar = ({
|
|
2038
|
+
side = "left",
|
|
2039
|
+
variant = "sidebar",
|
|
2040
|
+
collapsible = "offcanvas",
|
|
2041
|
+
className,
|
|
2042
|
+
children,
|
|
2043
|
+
dir,
|
|
2044
|
+
...props
|
|
2045
|
+
}) => {
|
|
2046
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
2047
|
+
if (collapsible === "none") {
|
|
2048
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2049
|
+
"div",
|
|
2050
|
+
{
|
|
2051
|
+
"data-slot": "sidebar",
|
|
2052
|
+
className: bleakeCore.merge(
|
|
2053
|
+
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
2054
|
+
className
|
|
2055
|
+
),
|
|
2056
|
+
...props,
|
|
2057
|
+
children
|
|
2058
|
+
}
|
|
2059
|
+
);
|
|
2060
|
+
}
|
|
2061
|
+
if (isMobile) {
|
|
2062
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2063
|
+
Sheet,
|
|
2064
|
+
{
|
|
2065
|
+
open: openMobile,
|
|
2066
|
+
onOpenChange: setOpenMobile,
|
|
2067
|
+
...props,
|
|
2068
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2069
|
+
SheetContent,
|
|
2070
|
+
{
|
|
2071
|
+
dir,
|
|
2072
|
+
"data-sidebar": "sidebar",
|
|
2073
|
+
"data-slot": "sidebar",
|
|
2074
|
+
"data-mobile": "true",
|
|
2075
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
2076
|
+
style: {
|
|
2077
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
2078
|
+
},
|
|
2079
|
+
side,
|
|
2080
|
+
children: [
|
|
2081
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { className: "sr-only", children: [
|
|
2082
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: "Sidebar" }),
|
|
2083
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
2084
|
+
] }),
|
|
2085
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
2086
|
+
]
|
|
2087
|
+
}
|
|
2088
|
+
)
|
|
2089
|
+
}
|
|
2090
|
+
);
|
|
2091
|
+
}
|
|
2092
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2093
|
+
"div",
|
|
2094
|
+
{
|
|
2095
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
2096
|
+
"data-state": state,
|
|
2097
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2098
|
+
"data-variant": variant,
|
|
2099
|
+
"data-side": side,
|
|
2100
|
+
"data-slot": "sidebar",
|
|
2101
|
+
children: [
|
|
2102
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2103
|
+
"div",
|
|
2104
|
+
{
|
|
2105
|
+
"data-slot": "sidebar-gap",
|
|
2106
|
+
className: bleakeCore.merge(
|
|
2107
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
2108
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
2109
|
+
"group-data-[side=right]:rotate-180",
|
|
2110
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
2111
|
+
)
|
|
2112
|
+
}
|
|
2113
|
+
),
|
|
2114
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2115
|
+
"div",
|
|
2116
|
+
{
|
|
2117
|
+
"data-slot": "sidebar-container",
|
|
2118
|
+
"data-side": side,
|
|
2119
|
+
className: bleakeCore.merge(
|
|
2120
|
+
"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",
|
|
2121
|
+
// Adjust the padding for floating and inset variants.
|
|
2122
|
+
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",
|
|
2123
|
+
className
|
|
2124
|
+
),
|
|
2125
|
+
...props,
|
|
2126
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2127
|
+
"div",
|
|
2128
|
+
{
|
|
2129
|
+
"data-sidebar": "sidebar",
|
|
2130
|
+
"data-slot": "sidebar-inner",
|
|
2131
|
+
className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",
|
|
2132
|
+
children
|
|
2133
|
+
}
|
|
2134
|
+
)
|
|
2135
|
+
}
|
|
2136
|
+
)
|
|
2137
|
+
]
|
|
2138
|
+
}
|
|
2139
|
+
);
|
|
2140
|
+
};
|
|
2141
|
+
var Skeleton = ({
|
|
2142
|
+
className,
|
|
2143
|
+
...props
|
|
2144
|
+
}) => {
|
|
2145
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2146
|
+
"div",
|
|
2147
|
+
{
|
|
2148
|
+
"data-slot": "skeleton",
|
|
2149
|
+
className: bleakeCore.merge("animate-pulse rounded-md bg-gray-200/50", className),
|
|
2150
|
+
...props
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
};
|
|
2154
|
+
var Toaster = ({ ...props }) => {
|
|
2155
|
+
const { theme = "system" } = bleakeCore.useTheme();
|
|
2156
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2157
|
+
sonner.Toaster,
|
|
2158
|
+
{
|
|
2159
|
+
theme,
|
|
2160
|
+
className: "toaster group",
|
|
2161
|
+
icons: {
|
|
2162
|
+
success: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckIcon, { className: "size-4" }),
|
|
2163
|
+
info: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "size-4" }),
|
|
2164
|
+
warning: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlertIcon, { className: "size-4" }),
|
|
2165
|
+
error: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.OctagonXIcon, { className: "size-4" }),
|
|
2166
|
+
loading: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2Icon, { className: "size-4 animate-spin" })
|
|
2167
|
+
},
|
|
2168
|
+
style: {
|
|
2169
|
+
"--normal-bg": "var(--popover)",
|
|
2170
|
+
"--normal-text": "var(--popover-foreground)",
|
|
2171
|
+
"--normal-border": "var(--border)",
|
|
2172
|
+
"--border-radius": "var(--radius)"
|
|
2173
|
+
},
|
|
2174
|
+
toastOptions: {
|
|
2175
|
+
classNames: {
|
|
2176
|
+
toast: "cn-toast"
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
...props
|
|
2180
|
+
}
|
|
2181
|
+
);
|
|
2182
|
+
};
|
|
2183
|
+
var Switch = ({
|
|
2184
|
+
className,
|
|
2185
|
+
size = "default",
|
|
2186
|
+
...props
|
|
2187
|
+
}) => {
|
|
2188
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2189
|
+
radixUi.Switch.Root,
|
|
2190
|
+
{
|
|
2191
|
+
"data-slot": "switch",
|
|
2192
|
+
"data-size": size,
|
|
2193
|
+
className: bleakeCore.merge(
|
|
2194
|
+
"cursor-pointer peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-[size=default]:h-[16.6px] data-[size=default]:w-7 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
2195
|
+
className
|
|
2196
|
+
),
|
|
2197
|
+
...props,
|
|
2198
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2199
|
+
radixUi.Switch.Thumb,
|
|
2200
|
+
{
|
|
2201
|
+
"data-slot": "switch-thumb",
|
|
2202
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-3.5 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
2203
|
+
}
|
|
2204
|
+
)
|
|
2205
|
+
}
|
|
2206
|
+
);
|
|
2207
|
+
};
|
|
2208
|
+
var Table = ({
|
|
2209
|
+
className,
|
|
2210
|
+
...props
|
|
2211
|
+
}) => {
|
|
2212
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2213
|
+
"div",
|
|
2214
|
+
{
|
|
2215
|
+
"data-slot": "table-container",
|
|
2216
|
+
className: "relative w-full overflow-x-auto",
|
|
2217
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2218
|
+
"table",
|
|
2219
|
+
{
|
|
2220
|
+
"data-slot": "table",
|
|
2221
|
+
className: bleakeCore.merge("w-full caption-bottom text-xs", className),
|
|
2222
|
+
...props
|
|
2223
|
+
}
|
|
2224
|
+
)
|
|
2225
|
+
}
|
|
2226
|
+
);
|
|
2227
|
+
};
|
|
2228
|
+
var Tabs = ({
|
|
2229
|
+
className,
|
|
2230
|
+
orientation = "horizontal",
|
|
2231
|
+
...props
|
|
2232
|
+
}) => {
|
|
2233
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2234
|
+
radixUi.Tabs.Root,
|
|
2235
|
+
{
|
|
2236
|
+
"data-slot": "tabs",
|
|
2237
|
+
"data-orientation": orientation,
|
|
2238
|
+
className: bleakeCore.merge("group/tabs flex gap-3 data-horizontal:flex-col", className),
|
|
2239
|
+
...props
|
|
2240
|
+
}
|
|
2241
|
+
);
|
|
2242
|
+
};
|
|
2243
|
+
var toggleVariants = classVarianceAuthority.cva(
|
|
2244
|
+
"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
|
|
2245
|
+
{
|
|
2246
|
+
variants: {
|
|
2247
|
+
variant: {
|
|
2248
|
+
default: "bg-transparent",
|
|
2249
|
+
outline: "border border-input bg-transparent hover:bg-muted"
|
|
2250
|
+
},
|
|
2251
|
+
size: {
|
|
2252
|
+
default: "h-7 min-w-7 px-2",
|
|
2253
|
+
sm: "h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-1.5 text-[0.625rem] [&_svg:not([class*='size-'])]:size-3",
|
|
2254
|
+
lg: "h-8 min-w-8 px-2"
|
|
2255
|
+
}
|
|
2256
|
+
},
|
|
2257
|
+
defaultVariants: {
|
|
2258
|
+
variant: "default",
|
|
2259
|
+
size: "default"
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
);
|
|
2263
|
+
var Toggle = ({
|
|
2264
|
+
className,
|
|
2265
|
+
variant = "default",
|
|
2266
|
+
size = "default",
|
|
2267
|
+
...props
|
|
2268
|
+
}) => {
|
|
2269
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2270
|
+
radixUi.Toggle.Root,
|
|
2271
|
+
{
|
|
2272
|
+
"data-slot": "toggle",
|
|
2273
|
+
className: bleakeCore.merge(toggleVariants({ variant, size, className })),
|
|
2274
|
+
...props
|
|
2275
|
+
}
|
|
2276
|
+
);
|
|
2277
|
+
};
|
|
2278
|
+
var ToggleGroupContext = react$1.createContext({
|
|
2279
|
+
size: "default",
|
|
2280
|
+
variant: "default",
|
|
2281
|
+
spacing: 0,
|
|
2282
|
+
orientation: "horizontal"
|
|
2283
|
+
});
|
|
2284
|
+
var ToggleGroup = ({
|
|
2285
|
+
className,
|
|
2286
|
+
variant,
|
|
2287
|
+
size,
|
|
2288
|
+
spacing = 0,
|
|
2289
|
+
orientation = "horizontal",
|
|
2290
|
+
children,
|
|
2291
|
+
...props
|
|
2292
|
+
}) => {
|
|
2293
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2294
|
+
radixUi.ToggleGroup.Root,
|
|
2295
|
+
{
|
|
2296
|
+
"data-slot": "toggle-group",
|
|
2297
|
+
"data-variant": variant,
|
|
2298
|
+
"data-size": size,
|
|
2299
|
+
"data-spacing": spacing,
|
|
2300
|
+
"data-orientation": orientation,
|
|
2301
|
+
style: { "--gap": spacing },
|
|
2302
|
+
className: bleakeCore.merge(
|
|
2303
|
+
"group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch",
|
|
2304
|
+
className
|
|
2305
|
+
),
|
|
2306
|
+
...props,
|
|
2307
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing, orientation }, children })
|
|
2308
|
+
}
|
|
2309
|
+
);
|
|
2310
|
+
};
|
|
2311
|
+
|
|
2312
|
+
exports.Accordion = Accordion;
|
|
2313
|
+
exports.ActionsMenu = ActionsMenu;
|
|
2314
|
+
exports.AlertDialog = AlertDialog;
|
|
2315
|
+
exports.Avatar = Avatar;
|
|
2316
|
+
exports.Badge = Badge;
|
|
2317
|
+
exports.Breadcrumb = Breadcrumb;
|
|
2318
|
+
exports.Button = Button;
|
|
2319
|
+
exports.ButtonGroup = ButtonGroup;
|
|
2320
|
+
exports.Calendar = Calendar;
|
|
2321
|
+
exports.Card = Card;
|
|
2322
|
+
exports.Checkbox = Checkbox;
|
|
2323
|
+
exports.Collapsible = Collapsible;
|
|
2324
|
+
exports.Combobox = Combobox;
|
|
2325
|
+
exports.Command = Command;
|
|
2326
|
+
exports.ConfirmDialog = ConfirmDialog;
|
|
2327
|
+
exports.ContextMenu = ContextMenu;
|
|
2328
|
+
exports.Dialog = Dialog;
|
|
2329
|
+
exports.DialogClose = DialogClose;
|
|
2330
|
+
exports.DialogContent = DialogContent;
|
|
2331
|
+
exports.DialogDescription = DialogDescription;
|
|
2332
|
+
exports.DialogFooter = DialogFooter;
|
|
2333
|
+
exports.DialogHeader = DialogHeader;
|
|
2334
|
+
exports.DialogOverlay = DialogOverlay;
|
|
2335
|
+
exports.DialogPortal = DialogPortal;
|
|
2336
|
+
exports.DialogTitle = DialogTitle;
|
|
2337
|
+
exports.DialogTrigger = DialogTrigger;
|
|
2338
|
+
exports.DropdownMenu = DropdownMenu;
|
|
2339
|
+
exports.Glow = Glow;
|
|
2340
|
+
exports.HoverCard = HoverCard;
|
|
2341
|
+
exports.Image = Image;
|
|
2342
|
+
exports.Input = Input;
|
|
2343
|
+
exports.InputGroup = InputGroup;
|
|
2344
|
+
exports.InputGroupAddon = InputGroupAddon;
|
|
2345
|
+
exports.InputGroupButton = InputGroupButton;
|
|
2346
|
+
exports.InputGroupInput = InputGroupInput;
|
|
2347
|
+
exports.InputGroupText = InputGroupText;
|
|
2348
|
+
exports.InputGroupTextarea = InputGroupTextarea;
|
|
2349
|
+
exports.InputOTP = InputOTP;
|
|
2350
|
+
exports.Item = Item;
|
|
2351
|
+
exports.Label = Label;
|
|
2352
|
+
exports.Menubar = Menubar;
|
|
2353
|
+
exports.Modal = Modal;
|
|
2354
|
+
exports.Pagination = Pagination;
|
|
2355
|
+
exports.Popover = Popover;
|
|
2356
|
+
exports.Progress = Progress;
|
|
2357
|
+
exports.RadioGroup = RadioGroup;
|
|
2358
|
+
exports.SectionCard = SectionCard;
|
|
2359
|
+
exports.Select = Select;
|
|
2360
|
+
exports.SelectContent = SelectContent;
|
|
2361
|
+
exports.SelectGroup = SelectGroup;
|
|
2362
|
+
exports.SelectItem = SelectItem;
|
|
2363
|
+
exports.SelectLabel = SelectLabel;
|
|
2364
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
2365
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
2366
|
+
exports.SelectSeparator = SelectSeparator;
|
|
2367
|
+
exports.SelectTrigger = SelectTrigger;
|
|
2368
|
+
exports.SelectValue = SelectValue;
|
|
2369
|
+
exports.Separator = Separator;
|
|
2370
|
+
exports.Sheet = Sheet;
|
|
2371
|
+
exports.Sidebar = Sidebar;
|
|
2372
|
+
exports.Skeleton = Skeleton;
|
|
2373
|
+
exports.Spinner = Spinner;
|
|
2374
|
+
exports.Steps = Steps;
|
|
2375
|
+
exports.Switch = Switch;
|
|
2376
|
+
exports.Table = Table;
|
|
2377
|
+
exports.Tabs = Tabs;
|
|
2378
|
+
exports.Textarea = Textarea;
|
|
2379
|
+
exports.Toaster = Toaster;
|
|
2380
|
+
exports.Toggle = Toggle;
|
|
2381
|
+
exports.ToggleGroup = ToggleGroup;
|
|
2382
|
+
exports.Tooltip = Tooltip;
|
|
2383
|
+
exports.TruncatedText = TruncatedText;
|
|
2384
|
+
exports.WaveLayer = WaveLayer;
|