@mlw-packages/react-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -0
- package/dist/index.css +2759 -0
- package/dist/index.d.mts +520 -0
- package/dist/index.d.ts +520 -0
- package/dist/index.js +3350 -0
- package/dist/index.mjs +3165 -0
- package/package.json +86 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3165 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
|
|
3
|
+
// src/components/ui/AlertDialogBase.tsx
|
|
4
|
+
import * as React2 from "react";
|
|
5
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
6
|
+
|
|
7
|
+
// src/lib/utils.ts
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { twMerge } from "tailwind-merge";
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return twMerge(clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// src/components/ui/ButtonBase.tsx
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
17
|
+
import { cva } from "class-variance-authority";
|
|
18
|
+
import { jsx } from "react/jsx-runtime";
|
|
19
|
+
var buttonVariantsBase = cva(
|
|
20
|
+
`
|
|
21
|
+
inline-flex items-center justify-center gap-2
|
|
22
|
+
whitespace-nowrap rounded-md text-sm font-medium
|
|
23
|
+
transition-all duration-200
|
|
24
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
25
|
+
disabled:pointer-events-none disabled:opacity-50
|
|
26
|
+
active:scale-[0.97]
|
|
27
|
+
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
28
|
+
`,
|
|
29
|
+
{
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
default: `
|
|
33
|
+
bg-primary text-primary-foreground shadow
|
|
34
|
+
hover:opacity-90
|
|
35
|
+
hover:shadow-md
|
|
36
|
+
`,
|
|
37
|
+
destructive: `
|
|
38
|
+
bg-destructive text-destructive-foreground shadow-sm
|
|
39
|
+
hover:bg-destructive/90 hover:shadow-md
|
|
40
|
+
`,
|
|
41
|
+
outline: `
|
|
42
|
+
border border-input bg-background shadow-sm
|
|
43
|
+
hover:bg-accent hover:text-accent-foreground hover:shadow-md
|
|
44
|
+
`,
|
|
45
|
+
secondary: `
|
|
46
|
+
bg-secondary text-secondary-foreground shadow-sm
|
|
47
|
+
hover:opacity-80 hover:shadow-md
|
|
48
|
+
`,
|
|
49
|
+
ghost: `
|
|
50
|
+
hover:bg-accent hover:text-accent-foreground
|
|
51
|
+
`,
|
|
52
|
+
link: `
|
|
53
|
+
text-primary underline-offset-4
|
|
54
|
+
hover:underline
|
|
55
|
+
`
|
|
56
|
+
},
|
|
57
|
+
size: {
|
|
58
|
+
default: "h-9 px-4 py-1.5",
|
|
59
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
60
|
+
lg: "h-10 rounded-md px-8",
|
|
61
|
+
icon: "h-9 w-9"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
variant: "default",
|
|
66
|
+
size: "default"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
var ButtonBase = React.forwardRef(
|
|
71
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
72
|
+
const Comp = asChild ? Slot : "button";
|
|
73
|
+
return /* @__PURE__ */ jsx(
|
|
74
|
+
Comp,
|
|
75
|
+
{
|
|
76
|
+
className: cn(buttonVariantsBase({ variant, size, className })),
|
|
77
|
+
ref,
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
ButtonBase.displayName = "Button";
|
|
84
|
+
|
|
85
|
+
// src/components/ui/AlertDialogBase.tsx
|
|
86
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
87
|
+
var AlertDialogBase = AlertDialogPrimitive.Root;
|
|
88
|
+
var AlertDialogTriggerBase = AlertDialogPrimitive.Trigger;
|
|
89
|
+
var AlertDialogPortalBase = AlertDialogPrimitive.Portal;
|
|
90
|
+
var AlertDialogOverlayBase = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
91
|
+
AlertDialogPrimitive.Overlay,
|
|
92
|
+
{
|
|
93
|
+
className: cn(
|
|
94
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
95
|
+
className
|
|
96
|
+
),
|
|
97
|
+
...props,
|
|
98
|
+
ref
|
|
99
|
+
}
|
|
100
|
+
));
|
|
101
|
+
AlertDialogOverlayBase.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
102
|
+
var AlertDialogContentBase = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortalBase, { children: [
|
|
103
|
+
/* @__PURE__ */ jsx2(AlertDialogOverlayBase, {}),
|
|
104
|
+
/* @__PURE__ */ jsx2(
|
|
105
|
+
AlertDialogPrimitive.Content,
|
|
106
|
+
{
|
|
107
|
+
ref,
|
|
108
|
+
className: cn(
|
|
109
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
110
|
+
className
|
|
111
|
+
),
|
|
112
|
+
...props
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
] }));
|
|
116
|
+
AlertDialogContentBase.displayName = AlertDialogPrimitive.Content.displayName;
|
|
117
|
+
var AlertDialogHeaderBase = ({
|
|
118
|
+
className,
|
|
119
|
+
...props
|
|
120
|
+
}) => /* @__PURE__ */ jsx2(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
className: cn(
|
|
124
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
125
|
+
className
|
|
126
|
+
),
|
|
127
|
+
...props
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
AlertDialogHeaderBase.displayName = "AlertDialogHeaderBase";
|
|
131
|
+
var AlertDialogFooterBase = ({
|
|
132
|
+
className,
|
|
133
|
+
...props
|
|
134
|
+
}) => /* @__PURE__ */ jsx2(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: cn(
|
|
138
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
139
|
+
className
|
|
140
|
+
),
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
AlertDialogFooterBase.displayName = "AlertDialogFooterBase";
|
|
145
|
+
var AlertDialogTitleBase = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
146
|
+
AlertDialogPrimitive.Title,
|
|
147
|
+
{
|
|
148
|
+
ref,
|
|
149
|
+
className: cn("text-lg font-semibold", className),
|
|
150
|
+
...props
|
|
151
|
+
}
|
|
152
|
+
));
|
|
153
|
+
AlertDialogTitleBase.displayName = AlertDialogPrimitive.Title.displayName;
|
|
154
|
+
var AlertDialogDescriptionBase = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
155
|
+
AlertDialogPrimitive.Description,
|
|
156
|
+
{
|
|
157
|
+
ref,
|
|
158
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
159
|
+
...props
|
|
160
|
+
}
|
|
161
|
+
));
|
|
162
|
+
AlertDialogDescriptionBase.displayName = AlertDialogPrimitive.Description.displayName;
|
|
163
|
+
var AlertDialogActionBase = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
164
|
+
AlertDialogPrimitive.Action,
|
|
165
|
+
{
|
|
166
|
+
ref,
|
|
167
|
+
className: cn(buttonVariantsBase(), className),
|
|
168
|
+
...props
|
|
169
|
+
}
|
|
170
|
+
));
|
|
171
|
+
AlertDialogActionBase.displayName = AlertDialogPrimitive.Action.displayName;
|
|
172
|
+
var AlertDialogCancelBase = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
173
|
+
AlertDialogPrimitive.Cancel,
|
|
174
|
+
{
|
|
175
|
+
ref,
|
|
176
|
+
className: cn(
|
|
177
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
178
|
+
"mt-2 sm:mt-0",
|
|
179
|
+
className
|
|
180
|
+
),
|
|
181
|
+
...props
|
|
182
|
+
}
|
|
183
|
+
));
|
|
184
|
+
AlertDialogCancelBase.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
185
|
+
|
|
186
|
+
// src/components/ui/AvatarBase.tsx
|
|
187
|
+
import * as React3 from "react";
|
|
188
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
189
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
190
|
+
var AvatarBase = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
191
|
+
AvatarPrimitive.Root,
|
|
192
|
+
{
|
|
193
|
+
ref,
|
|
194
|
+
className: cn(
|
|
195
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
196
|
+
className
|
|
197
|
+
),
|
|
198
|
+
...props
|
|
199
|
+
}
|
|
200
|
+
));
|
|
201
|
+
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
202
|
+
var AvatarImageBase = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
203
|
+
AvatarPrimitive.Image,
|
|
204
|
+
{
|
|
205
|
+
ref,
|
|
206
|
+
className: cn("aspect-square h-full w-full", className),
|
|
207
|
+
...props
|
|
208
|
+
}
|
|
209
|
+
));
|
|
210
|
+
AvatarImageBase.displayName = AvatarPrimitive.Image.displayName;
|
|
211
|
+
var AvatarFallbackBase = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
212
|
+
AvatarPrimitive.Fallback,
|
|
213
|
+
{
|
|
214
|
+
ref,
|
|
215
|
+
className: cn(
|
|
216
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
217
|
+
className
|
|
218
|
+
),
|
|
219
|
+
...props
|
|
220
|
+
}
|
|
221
|
+
));
|
|
222
|
+
AvatarFallbackBase.displayName = AvatarPrimitive.Fallback.displayName;
|
|
223
|
+
|
|
224
|
+
// src/components/date-time-picker/DateTimePicker.tsx
|
|
225
|
+
import { add, format } from "date-fns";
|
|
226
|
+
|
|
227
|
+
// src/components/date-time-picker/calendar.tsx
|
|
228
|
+
import { CaretLeft, CaretRight } from "phosphor-react";
|
|
229
|
+
import { DayPicker } from "react-day-picker";
|
|
230
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
231
|
+
function CalendarBase({
|
|
232
|
+
className,
|
|
233
|
+
classNames,
|
|
234
|
+
showOutsideDays = true,
|
|
235
|
+
...props
|
|
236
|
+
}) {
|
|
237
|
+
return /* @__PURE__ */ jsx4(
|
|
238
|
+
DayPicker,
|
|
239
|
+
{
|
|
240
|
+
showOutsideDays,
|
|
241
|
+
className: cn("bg-background p-3", className),
|
|
242
|
+
classNames: {
|
|
243
|
+
months: "flex items-center flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
244
|
+
month: "space-y-4",
|
|
245
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
246
|
+
caption_label: "text-sm font-medium",
|
|
247
|
+
nav: "space-x-1 flex items-center",
|
|
248
|
+
nav_button: cn(
|
|
249
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
250
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
251
|
+
),
|
|
252
|
+
nav_button_previous: "absolute left-1",
|
|
253
|
+
nav_button_next: "absolute right-1",
|
|
254
|
+
table: "w-full border-collapse space-y-1",
|
|
255
|
+
head_row: "flex",
|
|
256
|
+
head_cell: "text-slate-500 rounded-md w-9 font-normal text-[0.8rem] dark:text-slate-400",
|
|
257
|
+
row: "flex w-full mt-2",
|
|
258
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-slate-100/50 [&:has([aria-selected])]:bg-slate-100 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 dark:[&:has([aria-selected].day-outside)]:bg-slate-800/50 dark:[&:has([aria-selected])]:bg-slate-800",
|
|
259
|
+
day: cn(
|
|
260
|
+
buttonVariantsBase({ variant: "ghost" }),
|
|
261
|
+
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
262
|
+
),
|
|
263
|
+
day_range_end: "day-range-end",
|
|
264
|
+
day_selected: "bg-purple text-slate-50 hover:bg-primary hover:text-slate-50 focus:bg-purple-500 focus:text-slate-50 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50 dark:hover:text-slate-900 dark:focus:bg-slate-50 dark:focus:text-slate-900",
|
|
265
|
+
day_today: "bg-slate-100 text-slate-900 dark:bg-primary dark:text-slate-50",
|
|
266
|
+
day_outside: "day-outside text-slate-500 opacity-50 aria-selected:bg-slate-100/50 aria-selected:text-slate-500 aria-selected:opacity-30 dark:text-slate-400 dark:aria-selected:bg-slate-800/50 dark:aria-selected:text-slate-400",
|
|
267
|
+
day_disabled: "text-slate-500 opacity-50 dark:text-slate-400",
|
|
268
|
+
day_range_middle: "aria-selected:bg-slate-100 aria-selected:text-slate-900 dark:aria-selected:bg-primary dark:aria-selected:text-primary",
|
|
269
|
+
day_hidden: "invisible",
|
|
270
|
+
...classNames
|
|
271
|
+
},
|
|
272
|
+
components: {
|
|
273
|
+
IconLeft: () => /* @__PURE__ */ jsx4(CaretLeft, { className: "h-4 w-4" }),
|
|
274
|
+
IconRight: () => /* @__PURE__ */ jsx4(CaretRight, { className: "h-4 w-4" })
|
|
275
|
+
},
|
|
276
|
+
...props
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
CalendarBase.displayName = "Calendar";
|
|
281
|
+
|
|
282
|
+
// src/components/date-time-picker/DateTimePicker.tsx
|
|
283
|
+
import { Calendar } from "phosphor-react";
|
|
284
|
+
import { ptBR } from "date-fns/locale";
|
|
285
|
+
import { useEffect, useState } from "react";
|
|
286
|
+
|
|
287
|
+
// src/components/ui/DialogBase.tsx
|
|
288
|
+
import * as React4 from "react";
|
|
289
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
290
|
+
import { X } from "phosphor-react";
|
|
291
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
292
|
+
var DialogBase = DialogPrimitive.Root;
|
|
293
|
+
var DialogTriggerBase = DialogPrimitive.Trigger;
|
|
294
|
+
var DialogPortalBase = DialogPrimitive.Portal;
|
|
295
|
+
var DialogCloseBase = DialogPrimitive.Close;
|
|
296
|
+
var DialogOverlayBase = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
297
|
+
DialogPrimitive.Overlay,
|
|
298
|
+
{
|
|
299
|
+
ref,
|
|
300
|
+
className: cn(
|
|
301
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
302
|
+
className
|
|
303
|
+
),
|
|
304
|
+
...props
|
|
305
|
+
}
|
|
306
|
+
));
|
|
307
|
+
DialogOverlayBase.displayName = DialogPrimitive.Overlay.displayName;
|
|
308
|
+
var DialogContentBase = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs2(DialogPortalBase, { children: [
|
|
309
|
+
/* @__PURE__ */ jsx5(DialogOverlayBase, {}),
|
|
310
|
+
/* @__PURE__ */ jsxs2(
|
|
311
|
+
DialogPrimitive.Content,
|
|
312
|
+
{
|
|
313
|
+
ref,
|
|
314
|
+
className: cn(
|
|
315
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
316
|
+
className
|
|
317
|
+
),
|
|
318
|
+
...props,
|
|
319
|
+
children: [
|
|
320
|
+
children,
|
|
321
|
+
/* @__PURE__ */ jsxs2(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
322
|
+
/* @__PURE__ */ jsx5(X, { className: "h-4 w-4" }),
|
|
323
|
+
/* @__PURE__ */ jsx5("span", { className: "sr-only", children: "Close" })
|
|
324
|
+
] })
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
] }));
|
|
329
|
+
DialogContentBase.displayName = DialogPrimitive.Content.displayName;
|
|
330
|
+
var DialogHeaderBase = ({
|
|
331
|
+
className,
|
|
332
|
+
...props
|
|
333
|
+
}) => /* @__PURE__ */ jsx5(
|
|
334
|
+
"div",
|
|
335
|
+
{
|
|
336
|
+
className: cn(
|
|
337
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
338
|
+
className
|
|
339
|
+
),
|
|
340
|
+
...props
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
DialogHeaderBase.displayName = "DialogHeader";
|
|
344
|
+
var DialogFooterBase = ({
|
|
345
|
+
className,
|
|
346
|
+
...props
|
|
347
|
+
}) => /* @__PURE__ */ jsx5(
|
|
348
|
+
"div",
|
|
349
|
+
{
|
|
350
|
+
className: cn(
|
|
351
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
352
|
+
className
|
|
353
|
+
),
|
|
354
|
+
...props
|
|
355
|
+
}
|
|
356
|
+
);
|
|
357
|
+
DialogFooterBase.displayName = "DialogFooter";
|
|
358
|
+
var DialogTitleBase = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
359
|
+
DialogPrimitive.Title,
|
|
360
|
+
{
|
|
361
|
+
ref,
|
|
362
|
+
className: cn(
|
|
363
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
364
|
+
className
|
|
365
|
+
),
|
|
366
|
+
...props
|
|
367
|
+
}
|
|
368
|
+
));
|
|
369
|
+
DialogTitleBase.displayName = DialogPrimitive.Title.displayName;
|
|
370
|
+
var DialogDescriptionBase = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
371
|
+
DialogPrimitive.Description,
|
|
372
|
+
{
|
|
373
|
+
ref,
|
|
374
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
375
|
+
...props
|
|
376
|
+
}
|
|
377
|
+
));
|
|
378
|
+
DialogDescriptionBase.displayName = DialogPrimitive.Description.displayName;
|
|
379
|
+
|
|
380
|
+
// src/components/ui/LabelBase.tsx
|
|
381
|
+
import * as React5 from "react";
|
|
382
|
+
import { Label as RadixLabel } from "@radix-ui/react-label";
|
|
383
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
384
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
385
|
+
var LabelBase = React5.forwardRef(
|
|
386
|
+
({ className, asChild = false, ...props }, ref) => {
|
|
387
|
+
const Comp = asChild ? Slot2 : "label";
|
|
388
|
+
return /* @__PURE__ */ jsx6(RadixLabel, { asChild: true, children: /* @__PURE__ */ jsx6(
|
|
389
|
+
Comp,
|
|
390
|
+
{
|
|
391
|
+
ref,
|
|
392
|
+
className: cn(
|
|
393
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
394
|
+
className
|
|
395
|
+
),
|
|
396
|
+
...props
|
|
397
|
+
}
|
|
398
|
+
) });
|
|
399
|
+
}
|
|
400
|
+
);
|
|
401
|
+
LabelBase.displayName = "LabelBase";
|
|
402
|
+
var LabelBase_default = LabelBase;
|
|
403
|
+
|
|
404
|
+
// src/components/date-time-picker/TimePicker.tsx
|
|
405
|
+
import { Clock } from "phosphor-react";
|
|
406
|
+
import * as React8 from "react";
|
|
407
|
+
|
|
408
|
+
// src/components/ui/InputBase.tsx
|
|
409
|
+
import * as React6 from "react";
|
|
410
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
411
|
+
var InputBase = React6.forwardRef(
|
|
412
|
+
({ className, type = "text", label, leftIcon, rightIcon, ...props }, ref) => {
|
|
413
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
414
|
+
label && /* @__PURE__ */ jsx7(LabelBase_default, { children: label }),
|
|
415
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center rounded-md border border-input transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring", children: [
|
|
416
|
+
leftIcon && /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
417
|
+
/* @__PURE__ */ jsx7(
|
|
418
|
+
"input",
|
|
419
|
+
{
|
|
420
|
+
type,
|
|
421
|
+
className: cn(
|
|
422
|
+
" w-full flex-1 bg-transparent px-3 py-1 text-base placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
423
|
+
className
|
|
424
|
+
),
|
|
425
|
+
ref,
|
|
426
|
+
...props
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
rightIcon && /* @__PURE__ */ jsx7("div", { className: "flex items-center justify-center px-2", children: rightIcon })
|
|
430
|
+
] })
|
|
431
|
+
] });
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
InputBase.displayName = "Input";
|
|
435
|
+
|
|
436
|
+
// src/components/date-time-picker/TimePickerInput.tsx
|
|
437
|
+
import React7 from "react";
|
|
438
|
+
|
|
439
|
+
// src/components/date-time-picker/time-picker-utils.ts
|
|
440
|
+
function isValidHour(value) {
|
|
441
|
+
return /^(0[0-9]|1[0-9]|2[0-3])$/.test(value);
|
|
442
|
+
}
|
|
443
|
+
function isValid12Hour(value) {
|
|
444
|
+
return /^(0[1-9]|1[0-2])$/.test(value);
|
|
445
|
+
}
|
|
446
|
+
function isValidMinuteOrSecond(value) {
|
|
447
|
+
return /^[0-5][0-9]$/.test(value);
|
|
448
|
+
}
|
|
449
|
+
function getValidNumber(value, { max, min = 0, loop = false }) {
|
|
450
|
+
let numericValue = parseInt(value, 10);
|
|
451
|
+
if (!isNaN(numericValue)) {
|
|
452
|
+
if (!loop) {
|
|
453
|
+
if (numericValue > max) numericValue = max;
|
|
454
|
+
if (numericValue < min) numericValue = min;
|
|
455
|
+
} else {
|
|
456
|
+
if (numericValue > max) numericValue = min;
|
|
457
|
+
if (numericValue < min) numericValue = max;
|
|
458
|
+
}
|
|
459
|
+
return numericValue.toString().padStart(2, "0");
|
|
460
|
+
}
|
|
461
|
+
return "00";
|
|
462
|
+
}
|
|
463
|
+
function getValidHour(value) {
|
|
464
|
+
if (isValidHour(value)) return value;
|
|
465
|
+
return getValidNumber(value, { max: 23 });
|
|
466
|
+
}
|
|
467
|
+
function getValid12Hour(value) {
|
|
468
|
+
if (isValid12Hour(value)) return value;
|
|
469
|
+
return getValidNumber(value, { min: 1, max: 12 });
|
|
470
|
+
}
|
|
471
|
+
function getValidMinuteOrSecond(value) {
|
|
472
|
+
if (isValidMinuteOrSecond(value)) return value;
|
|
473
|
+
return getValidNumber(value, { max: 59 });
|
|
474
|
+
}
|
|
475
|
+
function getValidArrowNumber(value, { min, max, step }) {
|
|
476
|
+
let numericValue = parseInt(value, 10);
|
|
477
|
+
if (!isNaN(numericValue)) {
|
|
478
|
+
numericValue += step;
|
|
479
|
+
return getValidNumber(String(numericValue), { min, max, loop: true });
|
|
480
|
+
}
|
|
481
|
+
return "00";
|
|
482
|
+
}
|
|
483
|
+
function getValidArrowHour(value, step) {
|
|
484
|
+
return getValidArrowNumber(value, { min: 0, max: 23, step });
|
|
485
|
+
}
|
|
486
|
+
function getValidArrow12Hour(value, step) {
|
|
487
|
+
return getValidArrowNumber(value, { min: 1, max: 12, step });
|
|
488
|
+
}
|
|
489
|
+
function getValidArrowMinuteOrSecond(value, step) {
|
|
490
|
+
return getValidArrowNumber(value, { min: 0, max: 59, step });
|
|
491
|
+
}
|
|
492
|
+
function setMinutes(date, value) {
|
|
493
|
+
const minutes = getValidMinuteOrSecond(value);
|
|
494
|
+
date.setMinutes(parseInt(minutes, 10));
|
|
495
|
+
return date;
|
|
496
|
+
}
|
|
497
|
+
function setSeconds(date, value) {
|
|
498
|
+
const seconds = getValidMinuteOrSecond(value);
|
|
499
|
+
date.setSeconds(parseInt(seconds, 10));
|
|
500
|
+
return date;
|
|
501
|
+
}
|
|
502
|
+
function setHours(date, value) {
|
|
503
|
+
const hours = getValidHour(value);
|
|
504
|
+
date.setHours(parseInt(hours, 10));
|
|
505
|
+
return date;
|
|
506
|
+
}
|
|
507
|
+
function set12Hours(date, value, period) {
|
|
508
|
+
const hours = parseInt(getValid12Hour(value), 10);
|
|
509
|
+
const convertedHours = convert12HourTo24Hour(hours, period);
|
|
510
|
+
date.setHours(convertedHours);
|
|
511
|
+
return date;
|
|
512
|
+
}
|
|
513
|
+
function setDateByType(date, value, type, period) {
|
|
514
|
+
switch (type) {
|
|
515
|
+
case "minutes":
|
|
516
|
+
return setMinutes(date, value);
|
|
517
|
+
case "seconds":
|
|
518
|
+
return setSeconds(date, value);
|
|
519
|
+
case "hours":
|
|
520
|
+
return setHours(date, value);
|
|
521
|
+
case "12hours": {
|
|
522
|
+
if (!period) return date;
|
|
523
|
+
return set12Hours(date, value, period);
|
|
524
|
+
}
|
|
525
|
+
default:
|
|
526
|
+
return date;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
function getDateByType(date, type) {
|
|
530
|
+
switch (type) {
|
|
531
|
+
case "minutes":
|
|
532
|
+
return getValidMinuteOrSecond(String(date.getMinutes()));
|
|
533
|
+
case "seconds":
|
|
534
|
+
return getValidMinuteOrSecond(String(date.getSeconds()));
|
|
535
|
+
case "hours":
|
|
536
|
+
return getValidHour(String(date.getHours()));
|
|
537
|
+
case "12hours":
|
|
538
|
+
const hours = display12HourValue(date.getHours());
|
|
539
|
+
return getValid12Hour(String(hours));
|
|
540
|
+
default:
|
|
541
|
+
return "00";
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function getArrowByType(value, step, type) {
|
|
545
|
+
switch (type) {
|
|
546
|
+
case "minutes":
|
|
547
|
+
return getValidArrowMinuteOrSecond(value, step);
|
|
548
|
+
case "seconds":
|
|
549
|
+
return getValidArrowMinuteOrSecond(value, step);
|
|
550
|
+
case "hours":
|
|
551
|
+
return getValidArrowHour(value, step);
|
|
552
|
+
case "12hours":
|
|
553
|
+
return getValidArrow12Hour(value, step);
|
|
554
|
+
default:
|
|
555
|
+
return "00";
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
function convert12HourTo24Hour(hour, period) {
|
|
559
|
+
if (period === "PM") {
|
|
560
|
+
if (hour <= 11) {
|
|
561
|
+
return hour + 12;
|
|
562
|
+
} else {
|
|
563
|
+
return hour;
|
|
564
|
+
}
|
|
565
|
+
} else if (period === "AM") {
|
|
566
|
+
if (hour === 12) return 0;
|
|
567
|
+
return hour;
|
|
568
|
+
}
|
|
569
|
+
return hour;
|
|
570
|
+
}
|
|
571
|
+
function display12HourValue(hours) {
|
|
572
|
+
if (hours === 0 || hours === 12) return "12";
|
|
573
|
+
if (hours >= 22) return `${hours - 12}`;
|
|
574
|
+
if (hours % 12 > 9) return `${hours}`;
|
|
575
|
+
return `0${hours % 12}`;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// src/components/date-time-picker/TimePickerInput.tsx
|
|
579
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
580
|
+
var TimePickerInput = React7.forwardRef(
|
|
581
|
+
({
|
|
582
|
+
className,
|
|
583
|
+
type = "tel",
|
|
584
|
+
value,
|
|
585
|
+
id,
|
|
586
|
+
name,
|
|
587
|
+
date = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)),
|
|
588
|
+
setDate,
|
|
589
|
+
onChange,
|
|
590
|
+
onKeyDown,
|
|
591
|
+
picker,
|
|
592
|
+
period,
|
|
593
|
+
onLeftFocus,
|
|
594
|
+
onRightFocus,
|
|
595
|
+
...props
|
|
596
|
+
}, ref) => {
|
|
597
|
+
const [flag, setFlag] = React7.useState(false);
|
|
598
|
+
const [prevIntKey, setPrevIntKey] = React7.useState("0");
|
|
599
|
+
React7.useEffect(() => {
|
|
600
|
+
if (flag) {
|
|
601
|
+
const timer = setTimeout(() => {
|
|
602
|
+
setFlag(false);
|
|
603
|
+
}, 2e3);
|
|
604
|
+
return () => clearTimeout(timer);
|
|
605
|
+
}
|
|
606
|
+
}, [flag]);
|
|
607
|
+
const calculatedValue = React7.useMemo(() => {
|
|
608
|
+
return getDateByType(date, picker);
|
|
609
|
+
}, [date, picker]);
|
|
610
|
+
const calculateNewValue = (key) => {
|
|
611
|
+
if (picker === "12hours") {
|
|
612
|
+
if (flag && calculatedValue.slice(1, 2) === "1" && prevIntKey === "0")
|
|
613
|
+
return "0" + key;
|
|
614
|
+
}
|
|
615
|
+
return !flag ? "0" + key : calculatedValue.slice(1, 2) + key;
|
|
616
|
+
};
|
|
617
|
+
const handleKeyDown = (e) => {
|
|
618
|
+
if (e.key === "Tab") return;
|
|
619
|
+
e.preventDefault();
|
|
620
|
+
if (e.key === "ArrowRight") onRightFocus?.();
|
|
621
|
+
if (e.key === "ArrowLeft") onLeftFocus?.();
|
|
622
|
+
if (["ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
623
|
+
const step = e.key === "ArrowUp" ? 1 : -1;
|
|
624
|
+
const newValue = getArrowByType(calculatedValue, step, picker);
|
|
625
|
+
if (flag) setFlag(false);
|
|
626
|
+
const tempDate = new Date(date);
|
|
627
|
+
setDate(setDateByType(tempDate, newValue, picker, period));
|
|
628
|
+
}
|
|
629
|
+
if (e.key >= "0" && e.key <= "9") {
|
|
630
|
+
if (picker === "12hours") setPrevIntKey(e.key);
|
|
631
|
+
const newValue = calculateNewValue(e.key);
|
|
632
|
+
if (flag) onRightFocus?.();
|
|
633
|
+
setFlag((prev) => !prev);
|
|
634
|
+
const tempDate = new Date(date);
|
|
635
|
+
setDate(setDateByType(tempDate, newValue, picker, period));
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
return /* @__PURE__ */ jsx8(
|
|
639
|
+
InputBase,
|
|
640
|
+
{
|
|
641
|
+
ref,
|
|
642
|
+
id: id || picker,
|
|
643
|
+
name: name || picker,
|
|
644
|
+
className: cn(
|
|
645
|
+
"focus:bg-accent focus:text-accent-foreground w-[48px] text-center font-mono text-base tabular-nums caret-transparent [&::-webkit-inner-spin-button]:appearance-none",
|
|
646
|
+
className
|
|
647
|
+
),
|
|
648
|
+
value: value || calculatedValue,
|
|
649
|
+
onChange: (e) => {
|
|
650
|
+
e.preventDefault();
|
|
651
|
+
onChange?.(e);
|
|
652
|
+
},
|
|
653
|
+
type,
|
|
654
|
+
inputMode: "decimal",
|
|
655
|
+
onKeyDown: (e) => {
|
|
656
|
+
onKeyDown?.(e);
|
|
657
|
+
handleKeyDown(e);
|
|
658
|
+
},
|
|
659
|
+
...props
|
|
660
|
+
}
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
);
|
|
664
|
+
TimePickerInput.displayName = "TimePickerInput";
|
|
665
|
+
|
|
666
|
+
// src/components/date-time-picker/TimePicker.tsx
|
|
667
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
668
|
+
function TimePicker({ date, setDate, hideSeconds }) {
|
|
669
|
+
const minuteRef = React8.useRef(null);
|
|
670
|
+
const hourRef = React8.useRef(null);
|
|
671
|
+
const secondRef = React8.useRef(null);
|
|
672
|
+
return /* @__PURE__ */ jsxs4("div", { className: "flex items-end gap-2", children: [
|
|
673
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid gap-1 text-center", children: [
|
|
674
|
+
/* @__PURE__ */ jsx9(LabelBase_default, { htmlFor: "hours", className: "text-xs", children: "Horas" }),
|
|
675
|
+
/* @__PURE__ */ jsx9(
|
|
676
|
+
TimePickerInput,
|
|
677
|
+
{
|
|
678
|
+
picker: "hours",
|
|
679
|
+
date,
|
|
680
|
+
setDate,
|
|
681
|
+
ref: hourRef,
|
|
682
|
+
onRightFocus: () => minuteRef.current?.focus()
|
|
683
|
+
}
|
|
684
|
+
)
|
|
685
|
+
] }),
|
|
686
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid gap-1 text-center", children: [
|
|
687
|
+
/* @__PURE__ */ jsx9(LabelBase_default, { htmlFor: "minutes", className: "text-xs", children: "Minutos" }),
|
|
688
|
+
/* @__PURE__ */ jsx9(
|
|
689
|
+
TimePickerInput,
|
|
690
|
+
{
|
|
691
|
+
picker: "minutes",
|
|
692
|
+
date,
|
|
693
|
+
setDate,
|
|
694
|
+
ref: minuteRef,
|
|
695
|
+
onLeftFocus: () => hourRef.current?.focus(),
|
|
696
|
+
onRightFocus: () => secondRef.current?.focus()
|
|
697
|
+
}
|
|
698
|
+
)
|
|
699
|
+
] }),
|
|
700
|
+
!hideSeconds && /* @__PURE__ */ jsxs4("div", { className: "grid gap-1 text-center", children: [
|
|
701
|
+
/* @__PURE__ */ jsx9(LabelBase_default, { htmlFor: "seconds", className: "text-xs", children: "Segundos" }),
|
|
702
|
+
/* @__PURE__ */ jsx9(
|
|
703
|
+
TimePickerInput,
|
|
704
|
+
{
|
|
705
|
+
picker: "seconds",
|
|
706
|
+
date,
|
|
707
|
+
setDate,
|
|
708
|
+
ref: secondRef,
|
|
709
|
+
onLeftFocus: () => minuteRef.current?.focus()
|
|
710
|
+
}
|
|
711
|
+
)
|
|
712
|
+
] }),
|
|
713
|
+
/* @__PURE__ */ jsx9("div", { className: "flex h-10 items-center", children: /* @__PURE__ */ jsx9(Clock, { className: "ml-2 h-4 w-4" }) })
|
|
714
|
+
] });
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// src/components/date-time-picker/DateTimePicker.tsx
|
|
718
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
719
|
+
function DateTimePicker({
|
|
720
|
+
label,
|
|
721
|
+
date,
|
|
722
|
+
onChange,
|
|
723
|
+
hideSeconds,
|
|
724
|
+
fromDate,
|
|
725
|
+
toDate,
|
|
726
|
+
disabled,
|
|
727
|
+
dialogTitle
|
|
728
|
+
}) {
|
|
729
|
+
const [internalDate, setInternalDate] = useState(date);
|
|
730
|
+
const handleSelect = (newDay) => {
|
|
731
|
+
if (!newDay) return;
|
|
732
|
+
if (!internalDate) {
|
|
733
|
+
setInternalDate(newDay);
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
const diff = newDay.getTime() - internalDate.getTime();
|
|
737
|
+
const diffInDays = diff / (1e3 * 60 * 60 * 24);
|
|
738
|
+
const newDateFull = add(internalDate, { days: Math.ceil(diffInDays) });
|
|
739
|
+
setInternalDate(newDateFull);
|
|
740
|
+
};
|
|
741
|
+
const [open, setOpen] = useState(false);
|
|
742
|
+
useEffect(() => {
|
|
743
|
+
if (date) {
|
|
744
|
+
setInternalDate(date);
|
|
745
|
+
}
|
|
746
|
+
}, [date, open]);
|
|
747
|
+
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
748
|
+
label && /* @__PURE__ */ jsx10(LabelBase_default, { className: "mb-[-1rem] pl-2", children: label }),
|
|
749
|
+
/* @__PURE__ */ jsxs5(DialogBase, { open, onOpenChange: setOpen, children: [
|
|
750
|
+
/* @__PURE__ */ jsx10(DialogTriggerBase, { disabled, asChild: true, children: /* @__PURE__ */ jsxs5(
|
|
751
|
+
ButtonBase,
|
|
752
|
+
{
|
|
753
|
+
variant: "default",
|
|
754
|
+
size: "lg",
|
|
755
|
+
className: cn(
|
|
756
|
+
"w-full justify-start text-left font-normal text-zinc-950",
|
|
757
|
+
!date && "text-muted-foreground"
|
|
758
|
+
),
|
|
759
|
+
children: [
|
|
760
|
+
date ? format(date, "PPP - HH:mm", { locale: ptBR }) : /* @__PURE__ */ jsx10("span", { className: "text-zinc-400", children: "Pick a date" }),
|
|
761
|
+
/* @__PURE__ */ jsx10(Calendar, { className: "ml-auto text-gray-500", size: 24 })
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
) }),
|
|
765
|
+
/* @__PURE__ */ jsxs5(DialogContentBase, { children: [
|
|
766
|
+
/* @__PURE__ */ jsx10(DialogHeaderBase, { children: /* @__PURE__ */ jsx10(DialogTitleBase, { className: "text-xl font-semibold", children: dialogTitle ?? "Selecione a data" }) }),
|
|
767
|
+
/* @__PURE__ */ jsx10(
|
|
768
|
+
CalendarBase,
|
|
769
|
+
{
|
|
770
|
+
mode: "single",
|
|
771
|
+
locale: ptBR,
|
|
772
|
+
selected: internalDate,
|
|
773
|
+
onSelect: (d) => handleSelect(d),
|
|
774
|
+
initialFocus: true,
|
|
775
|
+
fromDate,
|
|
776
|
+
toDate
|
|
777
|
+
}
|
|
778
|
+
),
|
|
779
|
+
/* @__PURE__ */ jsx10("div", { className: "border-border flex justify-center border-t p-3", children: /* @__PURE__ */ jsx10(
|
|
780
|
+
TimePicker,
|
|
781
|
+
{
|
|
782
|
+
setDate: setInternalDate,
|
|
783
|
+
date: internalDate,
|
|
784
|
+
hideSeconds
|
|
785
|
+
}
|
|
786
|
+
) }),
|
|
787
|
+
/* @__PURE__ */ jsx10(
|
|
788
|
+
ButtonBase,
|
|
789
|
+
{
|
|
790
|
+
onClick: () => {
|
|
791
|
+
onChange(internalDate);
|
|
792
|
+
setOpen(false);
|
|
793
|
+
},
|
|
794
|
+
children: "Salvar"
|
|
795
|
+
}
|
|
796
|
+
)
|
|
797
|
+
] })
|
|
798
|
+
] })
|
|
799
|
+
] });
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// src/hooks/use-mobile.tsx
|
|
803
|
+
import * as React9 from "react";
|
|
804
|
+
var MOBILE_BREAKPOINT = 768;
|
|
805
|
+
function useIsMobile() {
|
|
806
|
+
const [isMobile, setIsMobile] = React9.useState(void 0);
|
|
807
|
+
React9.useEffect(() => {
|
|
808
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
809
|
+
const onChange = () => {
|
|
810
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
811
|
+
};
|
|
812
|
+
mql.addEventListener("change", onChange);
|
|
813
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
814
|
+
return () => mql.removeEventListener("change", onChange);
|
|
815
|
+
}, []);
|
|
816
|
+
return !!isMobile;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// src/components/mode-toggle.tsx
|
|
820
|
+
import { Check as Check2, Moon, Sun } from "phosphor-react";
|
|
821
|
+
|
|
822
|
+
// src/components/ui/DropDownMenuBase.tsx
|
|
823
|
+
import * as React10 from "react";
|
|
824
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
825
|
+
import { Check, CaretRight as CaretRight2, Circle } from "phosphor-react";
|
|
826
|
+
import { motion, AnimatePresence } from "framer-motion";
|
|
827
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
828
|
+
var DropDownMenuBase = DropdownMenuPrimitive.Root;
|
|
829
|
+
var DropDownMenuTriggerBase = DropdownMenuPrimitive.Trigger;
|
|
830
|
+
var DropDownMenuGroupBase = DropdownMenuPrimitive.Group;
|
|
831
|
+
var DropDownMenuPortalBase = DropdownMenuPrimitive.Portal;
|
|
832
|
+
var DropDownMenuSubBase = DropdownMenuPrimitive.Sub;
|
|
833
|
+
var DropDownMenuRadioGroupBase = DropdownMenuPrimitive.RadioGroup;
|
|
834
|
+
var DropDownMenuSubTriggerBase = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
835
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
836
|
+
{
|
|
837
|
+
ref,
|
|
838
|
+
className: cn(
|
|
839
|
+
"flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
840
|
+
inset && "pl-8",
|
|
841
|
+
className
|
|
842
|
+
),
|
|
843
|
+
...props,
|
|
844
|
+
children: [
|
|
845
|
+
children,
|
|
846
|
+
/* @__PURE__ */ jsx11(CaretRight2, { className: "ml-auto" })
|
|
847
|
+
]
|
|
848
|
+
}
|
|
849
|
+
));
|
|
850
|
+
DropDownMenuSubTriggerBase.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
851
|
+
var DropDownMenuSubContentBase = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
852
|
+
DropdownMenuPrimitive.SubContent,
|
|
853
|
+
{
|
|
854
|
+
ref,
|
|
855
|
+
className: cn(
|
|
856
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
|
|
857
|
+
className
|
|
858
|
+
),
|
|
859
|
+
...props
|
|
860
|
+
}
|
|
861
|
+
));
|
|
862
|
+
DropDownMenuSubContentBase.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
863
|
+
var DropDownMenuContentBase = React10.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx11(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx11(AnimatePresence, { children: /* @__PURE__ */ jsx11(
|
|
864
|
+
DropdownMenuPrimitive.Content,
|
|
865
|
+
{
|
|
866
|
+
asChild: true,
|
|
867
|
+
sideOffset,
|
|
868
|
+
forceMount: true,
|
|
869
|
+
ref,
|
|
870
|
+
...props,
|
|
871
|
+
children: /* @__PURE__ */ jsx11(
|
|
872
|
+
motion.div,
|
|
873
|
+
{
|
|
874
|
+
initial: { opacity: 0, scale: 0.95, y: 5 },
|
|
875
|
+
animate: { opacity: 1, scale: 1, y: 0 },
|
|
876
|
+
exit: { opacity: 0, scale: 0.95, y: 5 },
|
|
877
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
878
|
+
className: cn(
|
|
879
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
880
|
+
className
|
|
881
|
+
),
|
|
882
|
+
children: props.children
|
|
883
|
+
}
|
|
884
|
+
)
|
|
885
|
+
}
|
|
886
|
+
) }) }));
|
|
887
|
+
DropDownMenuContentBase.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
888
|
+
var DropDownMenuItemBase = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
889
|
+
DropdownMenuPrimitive.Item,
|
|
890
|
+
{
|
|
891
|
+
ref,
|
|
892
|
+
className: cn(
|
|
893
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
894
|
+
inset && "pl-8",
|
|
895
|
+
className
|
|
896
|
+
),
|
|
897
|
+
...props
|
|
898
|
+
}
|
|
899
|
+
));
|
|
900
|
+
DropDownMenuItemBase.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
901
|
+
var DropDownMenuCheckboxItemBase = React10.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
902
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
903
|
+
{
|
|
904
|
+
ref,
|
|
905
|
+
className: cn(
|
|
906
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
907
|
+
className
|
|
908
|
+
),
|
|
909
|
+
checked,
|
|
910
|
+
...props,
|
|
911
|
+
children: [
|
|
912
|
+
/* @__PURE__ */ jsx11("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx11(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx11(Check, { className: "h-4 w-4" }) }) }),
|
|
913
|
+
children
|
|
914
|
+
]
|
|
915
|
+
}
|
|
916
|
+
));
|
|
917
|
+
DropDownMenuCheckboxItemBase.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
918
|
+
var DropDownMenuRadioItemBase = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
919
|
+
DropdownMenuPrimitive.RadioItem,
|
|
920
|
+
{
|
|
921
|
+
ref,
|
|
922
|
+
className: cn(
|
|
923
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
924
|
+
className
|
|
925
|
+
),
|
|
926
|
+
...props,
|
|
927
|
+
children: [
|
|
928
|
+
/* @__PURE__ */ jsx11("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx11(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx11(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
929
|
+
children
|
|
930
|
+
]
|
|
931
|
+
}
|
|
932
|
+
));
|
|
933
|
+
DropDownMenuRadioItemBase.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
934
|
+
var DropDownMenuLabelBase = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
935
|
+
DropdownMenuPrimitive.Label,
|
|
936
|
+
{
|
|
937
|
+
ref,
|
|
938
|
+
className: cn(
|
|
939
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
940
|
+
inset && "pl-8",
|
|
941
|
+
className
|
|
942
|
+
),
|
|
943
|
+
...props
|
|
944
|
+
}
|
|
945
|
+
));
|
|
946
|
+
DropDownMenuLabelBase.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
947
|
+
var DropDownMenuSeparatorBase = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
948
|
+
DropdownMenuPrimitive.Separator,
|
|
949
|
+
{
|
|
950
|
+
ref,
|
|
951
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
952
|
+
...props
|
|
953
|
+
}
|
|
954
|
+
));
|
|
955
|
+
DropDownMenuSeparatorBase.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
956
|
+
var DropDownMenuShortcutBase = ({
|
|
957
|
+
className,
|
|
958
|
+
...props
|
|
959
|
+
}) => {
|
|
960
|
+
return /* @__PURE__ */ jsx11(
|
|
961
|
+
"span",
|
|
962
|
+
{
|
|
963
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
964
|
+
...props
|
|
965
|
+
}
|
|
966
|
+
);
|
|
967
|
+
};
|
|
968
|
+
DropDownMenuShortcutBase.displayName = "DropDownMenuShortcutBase";
|
|
969
|
+
|
|
970
|
+
// src/components/theme-provider.tsx
|
|
971
|
+
import { createContext, useContext, useEffect as useEffect3, useState as useState3 } from "react";
|
|
972
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
973
|
+
var initialState = {
|
|
974
|
+
theme: "system",
|
|
975
|
+
setTheme: () => null
|
|
976
|
+
};
|
|
977
|
+
var ThemeProviderContext = createContext(initialState);
|
|
978
|
+
function ThemeProviderBase({
|
|
979
|
+
children,
|
|
980
|
+
defaultTheme = "system",
|
|
981
|
+
storageKey = "vite-ui-theme",
|
|
982
|
+
...props
|
|
983
|
+
}) {
|
|
984
|
+
const [theme, setTheme] = useState3(() => defaultTheme || defaultTheme);
|
|
985
|
+
useEffect3(() => {
|
|
986
|
+
const root = window.document.documentElement;
|
|
987
|
+
root.classList.remove(
|
|
988
|
+
"light",
|
|
989
|
+
"light-purple",
|
|
990
|
+
"light-green",
|
|
991
|
+
"light-blue",
|
|
992
|
+
"dark",
|
|
993
|
+
"dark-purple",
|
|
994
|
+
"dark-green",
|
|
995
|
+
"dark-blue",
|
|
996
|
+
"system"
|
|
997
|
+
);
|
|
998
|
+
if (theme === "system") {
|
|
999
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
1000
|
+
root.classList.add(systemTheme);
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
root.classList.add(theme);
|
|
1004
|
+
}, [theme]);
|
|
1005
|
+
const value = {
|
|
1006
|
+
theme,
|
|
1007
|
+
setTheme: (theme2) => {
|
|
1008
|
+
localStorage.setItem(storageKey, theme2);
|
|
1009
|
+
setTheme(theme2);
|
|
1010
|
+
}
|
|
1011
|
+
};
|
|
1012
|
+
return /* @__PURE__ */ jsx12(ThemeProviderContext.Provider, { ...props, value, children });
|
|
1013
|
+
}
|
|
1014
|
+
var useTheme = () => {
|
|
1015
|
+
const context = useContext(ThemeProviderContext);
|
|
1016
|
+
if (context === void 0)
|
|
1017
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
1018
|
+
return context;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
// src/components/mode-toggle.tsx
|
|
1022
|
+
import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1023
|
+
var themeLabels = {
|
|
1024
|
+
light: "Light",
|
|
1025
|
+
dark: "Dark",
|
|
1026
|
+
system: "System",
|
|
1027
|
+
"light-purple": "Light Purple",
|
|
1028
|
+
"dark-purple": "Dark Purple",
|
|
1029
|
+
"light-blue": "Light Blue",
|
|
1030
|
+
"dark-blue": "Dark Blue",
|
|
1031
|
+
"light-green": "Light Green",
|
|
1032
|
+
"dark-green": "Dark Green"
|
|
1033
|
+
};
|
|
1034
|
+
function ModeToggleBase({
|
|
1035
|
+
themes = ["light", "dark", "system"]
|
|
1036
|
+
}) {
|
|
1037
|
+
const { setTheme, theme: currentTheme } = useTheme();
|
|
1038
|
+
return /* @__PURE__ */ jsxs7(DropDownMenuBase, { children: [
|
|
1039
|
+
/* @__PURE__ */ jsx13(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs7(
|
|
1040
|
+
ButtonBase,
|
|
1041
|
+
{
|
|
1042
|
+
variant: "ghost",
|
|
1043
|
+
size: "icon",
|
|
1044
|
+
className: "relative overflow-hidden border-transparent",
|
|
1045
|
+
children: [
|
|
1046
|
+
/* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1047
|
+
/* @__PURE__ */ jsx13(Sun, { className: "h-[1.2rem] w-[1.2rem] transition-transform duration-300 rotate-0 scale-100" }),
|
|
1048
|
+
/* @__PURE__ */ jsx13(Moon, { className: "absolute top-0 left-0 h-[1.2rem] w-[1.2rem] transition-transform duration-300 rotate-90 scale-0" })
|
|
1049
|
+
] }),
|
|
1050
|
+
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Toggle theme" })
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
) }),
|
|
1054
|
+
/* @__PURE__ */ jsx13(DropDownMenuContentBase, { align: "end", className: "dark:border-transparent", children: themes.map((theme) => /* @__PURE__ */ jsxs7(
|
|
1055
|
+
DropDownMenuItemBase,
|
|
1056
|
+
{
|
|
1057
|
+
onClick: () => setTheme(theme),
|
|
1058
|
+
className: "flex items-center justify-between",
|
|
1059
|
+
children: [
|
|
1060
|
+
themeLabels[theme],
|
|
1061
|
+
currentTheme === theme && /* @__PURE__ */ jsx13(Check2, { className: "h-4 w-4 opacity-100" })
|
|
1062
|
+
]
|
|
1063
|
+
},
|
|
1064
|
+
theme
|
|
1065
|
+
)) })
|
|
1066
|
+
] });
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
// src/components/selects/Combobox.tsx
|
|
1070
|
+
import { useCallback, useMemo } from "react";
|
|
1071
|
+
|
|
1072
|
+
// src/components/ui/CommandBase.tsx
|
|
1073
|
+
import * as React11 from "react";
|
|
1074
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1075
|
+
import { MagnifyingGlass } from "phosphor-react";
|
|
1076
|
+
import { motion as motion2, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
1077
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1078
|
+
var CommandBase = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1079
|
+
CommandPrimitive,
|
|
1080
|
+
{
|
|
1081
|
+
ref,
|
|
1082
|
+
className: cn(
|
|
1083
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-background text-popover-foreground",
|
|
1084
|
+
className
|
|
1085
|
+
),
|
|
1086
|
+
...props
|
|
1087
|
+
}
|
|
1088
|
+
));
|
|
1089
|
+
CommandBase.displayName = CommandPrimitive.displayName;
|
|
1090
|
+
var dialogVariants = {
|
|
1091
|
+
hidden: { opacity: 0, scale: 0.95, y: -20 },
|
|
1092
|
+
visible: { opacity: 1, scale: 1, y: 0 },
|
|
1093
|
+
exit: { opacity: 0, scale: 0.95, y: -20 }
|
|
1094
|
+
};
|
|
1095
|
+
var CommandDialogBase = ({ children, open, ...props }) => {
|
|
1096
|
+
return /* @__PURE__ */ jsx14(DialogBase, { open, ...props, children: /* @__PURE__ */ jsx14(AnimatePresence2, { children: open && /* @__PURE__ */ jsx14(DialogContentBase, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx14(
|
|
1097
|
+
motion2.div,
|
|
1098
|
+
{
|
|
1099
|
+
initial: "hidden",
|
|
1100
|
+
animate: "visible",
|
|
1101
|
+
exit: "exit",
|
|
1102
|
+
variants: dialogVariants,
|
|
1103
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
1104
|
+
className: "overflow-hidden p-0",
|
|
1105
|
+
children: /* @__PURE__ */ jsx14(CommandBase, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
1106
|
+
},
|
|
1107
|
+
"command-dialog"
|
|
1108
|
+
) }) }) });
|
|
1109
|
+
};
|
|
1110
|
+
var CommandInputBase = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs8("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1111
|
+
/* @__PURE__ */ jsx14(MagnifyingGlass, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
|
|
1112
|
+
/* @__PURE__ */ jsx14(
|
|
1113
|
+
CommandPrimitive.Input,
|
|
1114
|
+
{
|
|
1115
|
+
ref,
|
|
1116
|
+
className: cn(
|
|
1117
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none text-primary placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1118
|
+
className
|
|
1119
|
+
),
|
|
1120
|
+
...props
|
|
1121
|
+
}
|
|
1122
|
+
)
|
|
1123
|
+
] }));
|
|
1124
|
+
CommandInputBase.displayName = CommandPrimitive.Input.displayName;
|
|
1125
|
+
var CommandListBase = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1126
|
+
CommandPrimitive.List,
|
|
1127
|
+
{
|
|
1128
|
+
ref,
|
|
1129
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
1130
|
+
...props
|
|
1131
|
+
}
|
|
1132
|
+
));
|
|
1133
|
+
CommandListBase.displayName = CommandPrimitive.List.displayName;
|
|
1134
|
+
var CommandEmptyBase = React11.forwardRef((props, ref) => /* @__PURE__ */ jsx14(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
1135
|
+
CommandEmptyBase.displayName = CommandPrimitive.Empty.displayName;
|
|
1136
|
+
var CommandGroupBase = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1137
|
+
CommandPrimitive.Group,
|
|
1138
|
+
{
|
|
1139
|
+
ref,
|
|
1140
|
+
className: cn(
|
|
1141
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
1142
|
+
className
|
|
1143
|
+
),
|
|
1144
|
+
...props
|
|
1145
|
+
}
|
|
1146
|
+
));
|
|
1147
|
+
CommandGroupBase.displayName = CommandPrimitive.Group.displayName;
|
|
1148
|
+
var CommandSeparatorBase = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(CommandPrimitive.Separator, { ref, className: cn("-mx-1 h-px bg-border", className), ...props }));
|
|
1149
|
+
CommandSeparatorBase.displayName = CommandPrimitive.Separator.displayName;
|
|
1150
|
+
var CommandItemBase = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1151
|
+
CommandPrimitive.Item,
|
|
1152
|
+
{
|
|
1153
|
+
ref,
|
|
1154
|
+
className: cn(
|
|
1155
|
+
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary data-[selected=true]:text-background data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-[1.02] active:scale-[0.98]",
|
|
1156
|
+
className
|
|
1157
|
+
),
|
|
1158
|
+
...props
|
|
1159
|
+
}
|
|
1160
|
+
));
|
|
1161
|
+
CommandItemBase.displayName = CommandPrimitive.Item.displayName;
|
|
1162
|
+
var CommandShortcutBase = ({ className, ...props }) => {
|
|
1163
|
+
return /* @__PURE__ */ jsx14("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
1164
|
+
};
|
|
1165
|
+
CommandShortcutBase.displayName = "CommandShortcut";
|
|
1166
|
+
|
|
1167
|
+
// src/components/ui/PopoverBase.tsx
|
|
1168
|
+
import * as React12 from "react";
|
|
1169
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1170
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1171
|
+
var PopoverBase = PopoverPrimitive.Root;
|
|
1172
|
+
var PopoverTriggerBase = PopoverPrimitive.Trigger;
|
|
1173
|
+
var PopoverAnchorBase = PopoverPrimitive.Anchor;
|
|
1174
|
+
var PopoverContentBase = React12.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx15(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx15(
|
|
1175
|
+
PopoverPrimitive.Content,
|
|
1176
|
+
{
|
|
1177
|
+
ref,
|
|
1178
|
+
align,
|
|
1179
|
+
sideOffset,
|
|
1180
|
+
className: cn(
|
|
1181
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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",
|
|
1182
|
+
className
|
|
1183
|
+
),
|
|
1184
|
+
...props
|
|
1185
|
+
}
|
|
1186
|
+
) }));
|
|
1187
|
+
PopoverContentBase.displayName = PopoverPrimitive.Content.displayName;
|
|
1188
|
+
|
|
1189
|
+
// src/components/selects/ComboboxBase.tsx
|
|
1190
|
+
import { CaretDown, Check as Check3 } from "phosphor-react";
|
|
1191
|
+
import { useState as useState4 } from "react";
|
|
1192
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1193
|
+
function ComboboxBase({
|
|
1194
|
+
items,
|
|
1195
|
+
renderSelected,
|
|
1196
|
+
handleSelection,
|
|
1197
|
+
checkIsSelected,
|
|
1198
|
+
searchPlaceholder,
|
|
1199
|
+
errorMessage
|
|
1200
|
+
}) {
|
|
1201
|
+
const [open, setOpen] = useState4(false);
|
|
1202
|
+
return /* @__PURE__ */ jsx16("div", { className: "col-span-1 w-full ", children: /* @__PURE__ */ jsxs9(PopoverBase, { open, onOpenChange: setOpen, modal: true, children: [
|
|
1203
|
+
/* @__PURE__ */ jsx16(PopoverTriggerBase, { asChild: true, className: "flex w-full justify-between dark:bg-[hsl(231,15%,19%)]", children: /* @__PURE__ */ jsxs9(
|
|
1204
|
+
ButtonBase,
|
|
1205
|
+
{
|
|
1206
|
+
variant: "outline",
|
|
1207
|
+
role: "combobox",
|
|
1208
|
+
"aria-expanded": open,
|
|
1209
|
+
children: [
|
|
1210
|
+
renderSelected,
|
|
1211
|
+
/* @__PURE__ */ jsx16("span", { children: /* @__PURE__ */ jsx16(CaretDown, { size: 16 }) }),
|
|
1212
|
+
errorMessage && /* @__PURE__ */ jsx16("span", { className: "text-red-500", children: errorMessage })
|
|
1213
|
+
]
|
|
1214
|
+
}
|
|
1215
|
+
) }),
|
|
1216
|
+
/* @__PURE__ */ jsx16(PopoverContentBase, { className: "max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0", children: /* @__PURE__ */ jsxs9(CommandBase, { className: "dark:text-white", children: [
|
|
1217
|
+
/* @__PURE__ */ jsx16(
|
|
1218
|
+
CommandInputBase,
|
|
1219
|
+
{
|
|
1220
|
+
tabIndex: -1,
|
|
1221
|
+
placeholder: searchPlaceholder ?? "Busque uma op\xE7\xE3o..."
|
|
1222
|
+
}
|
|
1223
|
+
),
|
|
1224
|
+
/* @__PURE__ */ jsxs9(CommandListBase, { children: [
|
|
1225
|
+
/* @__PURE__ */ jsx16(CommandEmptyBase, { children: "Nenhum dado encontrado" }),
|
|
1226
|
+
/* @__PURE__ */ jsx16(CommandGroupBase, { children: items.map((item) => /* @__PURE__ */ jsxs9(
|
|
1227
|
+
CommandItemBase,
|
|
1228
|
+
{
|
|
1229
|
+
keywords: [item.label],
|
|
1230
|
+
value: item.value,
|
|
1231
|
+
onSelect: (value) => {
|
|
1232
|
+
handleSelection(value);
|
|
1233
|
+
setOpen(false);
|
|
1234
|
+
},
|
|
1235
|
+
children: [
|
|
1236
|
+
item.label,
|
|
1237
|
+
/* @__PURE__ */ jsx16(
|
|
1238
|
+
Check3,
|
|
1239
|
+
{
|
|
1240
|
+
className: cn(
|
|
1241
|
+
"ml-auto",
|
|
1242
|
+
checkIsSelected(item.value) ? "opacity-100" : "opacity-0"
|
|
1243
|
+
)
|
|
1244
|
+
}
|
|
1245
|
+
)
|
|
1246
|
+
]
|
|
1247
|
+
},
|
|
1248
|
+
item.value
|
|
1249
|
+
)) })
|
|
1250
|
+
] })
|
|
1251
|
+
] }) })
|
|
1252
|
+
] }) });
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
// src/components/selects/Combobox.tsx
|
|
1256
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1257
|
+
function Combobox({
|
|
1258
|
+
items,
|
|
1259
|
+
selected,
|
|
1260
|
+
onChange,
|
|
1261
|
+
placeholder,
|
|
1262
|
+
searchPlaceholder,
|
|
1263
|
+
label
|
|
1264
|
+
}) {
|
|
1265
|
+
const selectedItem = items.find((item) => item.value === selected);
|
|
1266
|
+
const renderSelected = useMemo(
|
|
1267
|
+
() => selectedItem?.label ?? placeholder ?? "Selecione uma op\xE7\xE3o...",
|
|
1268
|
+
[placeholder, selectedItem]
|
|
1269
|
+
);
|
|
1270
|
+
const checkIsSelected = useCallback(
|
|
1271
|
+
(value) => selected == null ? false : selected == value,
|
|
1272
|
+
[selected]
|
|
1273
|
+
);
|
|
1274
|
+
const handleSelection = useCallback(
|
|
1275
|
+
(value) => {
|
|
1276
|
+
onChange(value === selected ? null : value);
|
|
1277
|
+
},
|
|
1278
|
+
[selected, onChange]
|
|
1279
|
+
);
|
|
1280
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1281
|
+
label && /* @__PURE__ */ jsx17(LabelBase_default, { children: label }),
|
|
1282
|
+
/* @__PURE__ */ jsx17(
|
|
1283
|
+
ComboboxBase,
|
|
1284
|
+
{
|
|
1285
|
+
items,
|
|
1286
|
+
renderSelected,
|
|
1287
|
+
handleSelection,
|
|
1288
|
+
checkIsSelected,
|
|
1289
|
+
searchPlaceholder
|
|
1290
|
+
}
|
|
1291
|
+
)
|
|
1292
|
+
] });
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
// src/components/selects/MultiCombobox.tsx
|
|
1296
|
+
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
1297
|
+
import { X as X2 } from "phosphor-react";
|
|
1298
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1299
|
+
function MultiCombobox({
|
|
1300
|
+
items,
|
|
1301
|
+
selected,
|
|
1302
|
+
onChange,
|
|
1303
|
+
placeholder,
|
|
1304
|
+
searchPlaceholder,
|
|
1305
|
+
label
|
|
1306
|
+
}) {
|
|
1307
|
+
const selectedItems = items.filter((item) => selected.includes(item.value));
|
|
1308
|
+
const checkIsSelected = useCallback2(
|
|
1309
|
+
(value) => selected.includes(value),
|
|
1310
|
+
[selected]
|
|
1311
|
+
);
|
|
1312
|
+
const handleSelection = useCallback2(
|
|
1313
|
+
(value) => {
|
|
1314
|
+
const isSelected = selected.includes(value);
|
|
1315
|
+
if (isSelected) {
|
|
1316
|
+
onChange(selected.filter((item) => item !== value));
|
|
1317
|
+
} else {
|
|
1318
|
+
onChange([...selected, value]);
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
[selected, onChange]
|
|
1322
|
+
);
|
|
1323
|
+
const renderSelected = useMemo2(() => {
|
|
1324
|
+
if (selectedItems.length === 0)
|
|
1325
|
+
return placeholder ?? "Selecione uma op\xE7\xE3o...";
|
|
1326
|
+
const items2 = selectedItems.map((item) => /* @__PURE__ */ jsxs11(
|
|
1327
|
+
"div",
|
|
1328
|
+
{
|
|
1329
|
+
className: "flex items-center gap-1 rounded-md border p-1",
|
|
1330
|
+
children: [
|
|
1331
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate whitespace-break-spaces text-xs", children: item.label }),
|
|
1332
|
+
/* @__PURE__ */ jsx18(
|
|
1333
|
+
X2,
|
|
1334
|
+
{
|
|
1335
|
+
size: 14,
|
|
1336
|
+
onClick: (e) => {
|
|
1337
|
+
e.stopPropagation();
|
|
1338
|
+
handleSelection(item.value);
|
|
1339
|
+
},
|
|
1340
|
+
className: "cursor-pointer"
|
|
1341
|
+
}
|
|
1342
|
+
)
|
|
1343
|
+
]
|
|
1344
|
+
},
|
|
1345
|
+
item.value
|
|
1346
|
+
));
|
|
1347
|
+
return /* @__PURE__ */ jsx18("div", { className: "flex flex-wrap gap-2", children: items2 });
|
|
1348
|
+
}, [handleSelection, placeholder, selectedItems]);
|
|
1349
|
+
return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1350
|
+
label && /* @__PURE__ */ jsx18(LabelBase_default, { children: label }),
|
|
1351
|
+
/* @__PURE__ */ jsx18(
|
|
1352
|
+
ComboboxBase,
|
|
1353
|
+
{
|
|
1354
|
+
items,
|
|
1355
|
+
renderSelected,
|
|
1356
|
+
handleSelection,
|
|
1357
|
+
checkIsSelected,
|
|
1358
|
+
searchPlaceholder
|
|
1359
|
+
}
|
|
1360
|
+
)
|
|
1361
|
+
] });
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// src/components/ui/SelectBase.tsx
|
|
1365
|
+
import * as React13 from "react";
|
|
1366
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1367
|
+
import { Check as Check4, CaretDown as CaretDown2, CaretUp } from "phosphor-react";
|
|
1368
|
+
import { motion as motion3, AnimatePresence as AnimatePresence3 } from "framer-motion";
|
|
1369
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1370
|
+
var SelectBase = SelectPrimitive.Root;
|
|
1371
|
+
var SelectGroupBase = SelectPrimitive.Group;
|
|
1372
|
+
var SelectValueBase = SelectPrimitive.Value;
|
|
1373
|
+
var SelectTriggerBase = React13.forwardRef(({ className, children, open, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1374
|
+
SelectPrimitive.Trigger,
|
|
1375
|
+
{
|
|
1376
|
+
ref,
|
|
1377
|
+
className: cn(
|
|
1378
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1379
|
+
className
|
|
1380
|
+
),
|
|
1381
|
+
...props,
|
|
1382
|
+
children: [
|
|
1383
|
+
children,
|
|
1384
|
+
/* @__PURE__ */ jsx19(
|
|
1385
|
+
motion3.span,
|
|
1386
|
+
{
|
|
1387
|
+
animate: { rotate: open ? 180 : 0 },
|
|
1388
|
+
transition: { duration: 0.3 },
|
|
1389
|
+
className: "flex items-center",
|
|
1390
|
+
children: /* @__PURE__ */ jsx19(CaretDown2, { className: "h-4 w-4 opacity-50" })
|
|
1391
|
+
}
|
|
1392
|
+
)
|
|
1393
|
+
]
|
|
1394
|
+
}
|
|
1395
|
+
));
|
|
1396
|
+
SelectTriggerBase.displayName = SelectPrimitive.Trigger.displayName;
|
|
1397
|
+
var SelectScrollUpButtonBase = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1398
|
+
SelectPrimitive.ScrollUpButton,
|
|
1399
|
+
{
|
|
1400
|
+
ref,
|
|
1401
|
+
className: cn(
|
|
1402
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1403
|
+
className
|
|
1404
|
+
),
|
|
1405
|
+
...props,
|
|
1406
|
+
children: /* @__PURE__ */ jsx19(CaretUp, { className: "h-4 w-4" })
|
|
1407
|
+
}
|
|
1408
|
+
));
|
|
1409
|
+
SelectScrollUpButtonBase.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1410
|
+
var SelectScrollDownButtonBase = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1411
|
+
SelectPrimitive.ScrollDownButton,
|
|
1412
|
+
{
|
|
1413
|
+
ref,
|
|
1414
|
+
className: cn(
|
|
1415
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1416
|
+
className
|
|
1417
|
+
),
|
|
1418
|
+
...props,
|
|
1419
|
+
children: /* @__PURE__ */ jsx19(CaretDown2, { className: "h-4 w-4" })
|
|
1420
|
+
}
|
|
1421
|
+
));
|
|
1422
|
+
SelectScrollDownButtonBase.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1423
|
+
var SelectContentBase = React13.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx19(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx19(AnimatePresence3, { children: /* @__PURE__ */ jsx19(
|
|
1424
|
+
SelectPrimitive.Content,
|
|
1425
|
+
{
|
|
1426
|
+
ref,
|
|
1427
|
+
className: cn(
|
|
1428
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
1429
|
+
className
|
|
1430
|
+
),
|
|
1431
|
+
position,
|
|
1432
|
+
...props,
|
|
1433
|
+
asChild: true,
|
|
1434
|
+
children: /* @__PURE__ */ jsx19(
|
|
1435
|
+
motion3.div,
|
|
1436
|
+
{
|
|
1437
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
1438
|
+
animate: { opacity: 1, scale: 1 },
|
|
1439
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
1440
|
+
transition: { duration: 0.2 },
|
|
1441
|
+
children: /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
1442
|
+
/* @__PURE__ */ jsx19(SelectScrollUpButtonBase, {}),
|
|
1443
|
+
/* @__PURE__ */ jsx19(
|
|
1444
|
+
SelectPrimitive.Viewport,
|
|
1445
|
+
{
|
|
1446
|
+
className: cn(
|
|
1447
|
+
"p-1",
|
|
1448
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1449
|
+
),
|
|
1450
|
+
children
|
|
1451
|
+
}
|
|
1452
|
+
),
|
|
1453
|
+
/* @__PURE__ */ jsx19(SelectScrollDownButtonBase, {})
|
|
1454
|
+
] })
|
|
1455
|
+
}
|
|
1456
|
+
)
|
|
1457
|
+
}
|
|
1458
|
+
) }) }));
|
|
1459
|
+
SelectContentBase.displayName = SelectPrimitive.Content.displayName;
|
|
1460
|
+
var SelectLabelBase = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1461
|
+
SelectPrimitive.Label,
|
|
1462
|
+
{
|
|
1463
|
+
ref,
|
|
1464
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
1465
|
+
...props
|
|
1466
|
+
}
|
|
1467
|
+
));
|
|
1468
|
+
SelectLabelBase.displayName = SelectPrimitive.Label.displayName;
|
|
1469
|
+
var SelectItemBase = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1470
|
+
SelectPrimitive.Item,
|
|
1471
|
+
{
|
|
1472
|
+
ref,
|
|
1473
|
+
className: cn(
|
|
1474
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1475
|
+
className
|
|
1476
|
+
),
|
|
1477
|
+
...props,
|
|
1478
|
+
children: [
|
|
1479
|
+
/* @__PURE__ */ jsx19("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx19(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx19(Check4, { className: "h-4 w-4" }) }) }),
|
|
1480
|
+
/* @__PURE__ */ jsx19(SelectPrimitive.ItemText, { children })
|
|
1481
|
+
]
|
|
1482
|
+
}
|
|
1483
|
+
));
|
|
1484
|
+
SelectItemBase.displayName = SelectPrimitive.Item.displayName;
|
|
1485
|
+
var SelectSeparatorBase = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1486
|
+
SelectPrimitive.Separator,
|
|
1487
|
+
{
|
|
1488
|
+
ref,
|
|
1489
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1490
|
+
...props
|
|
1491
|
+
}
|
|
1492
|
+
));
|
|
1493
|
+
SelectSeparatorBase.displayName = SelectPrimitive.Separator.displayName;
|
|
1494
|
+
|
|
1495
|
+
// src/components/ui/ScrollareaBase.tsx
|
|
1496
|
+
import * as React14 from "react";
|
|
1497
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1498
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1499
|
+
var ScrollAreaBase = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
|
|
1500
|
+
ScrollAreaPrimitive.Root,
|
|
1501
|
+
{
|
|
1502
|
+
ref,
|
|
1503
|
+
className: cn("relative overflow-hidden", className),
|
|
1504
|
+
...props,
|
|
1505
|
+
children: [
|
|
1506
|
+
/* @__PURE__ */ jsx20(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
1507
|
+
/* @__PURE__ */ jsx20(ScrollBarBase, {}),
|
|
1508
|
+
/* @__PURE__ */ jsx20(ScrollAreaPrimitive.Corner, {})
|
|
1509
|
+
]
|
|
1510
|
+
}
|
|
1511
|
+
));
|
|
1512
|
+
ScrollAreaBase.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1513
|
+
var ScrollBarBase = React14.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1514
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1515
|
+
{
|
|
1516
|
+
ref,
|
|
1517
|
+
orientation,
|
|
1518
|
+
className: cn(
|
|
1519
|
+
"flex touch-none select-none transition-colors",
|
|
1520
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
1521
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
1522
|
+
className
|
|
1523
|
+
),
|
|
1524
|
+
...props,
|
|
1525
|
+
children: /* @__PURE__ */ jsx20(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1526
|
+
}
|
|
1527
|
+
));
|
|
1528
|
+
ScrollBarBase.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1529
|
+
|
|
1530
|
+
// src/components/selects/Select.tsx
|
|
1531
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1532
|
+
function Select({
|
|
1533
|
+
items,
|
|
1534
|
+
groupItems,
|
|
1535
|
+
placeholder,
|
|
1536
|
+
onChange,
|
|
1537
|
+
errorMessage
|
|
1538
|
+
}) {
|
|
1539
|
+
return /* @__PURE__ */ jsxs14("div", { children: [
|
|
1540
|
+
/* @__PURE__ */ jsxs14(SelectBase, { onValueChange: onChange, children: [
|
|
1541
|
+
/* @__PURE__ */ jsx21(
|
|
1542
|
+
SelectTriggerBase,
|
|
1543
|
+
{
|
|
1544
|
+
className: cn(
|
|
1545
|
+
"flex h-12 w-full content-start text-lg shadow-md",
|
|
1546
|
+
errorMessage && "border-red-500"
|
|
1547
|
+
),
|
|
1548
|
+
children: /* @__PURE__ */ jsx21(SelectValueBase, { placeholder })
|
|
1549
|
+
}
|
|
1550
|
+
),
|
|
1551
|
+
/* @__PURE__ */ jsx21(ScrollAreaBase, { children: /* @__PURE__ */ jsx21(SelectContentBase, { children: groupItems ? /* @__PURE__ */ jsx21(Fragment4, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */ jsxs14(SelectGroupBase, { children: [
|
|
1552
|
+
/* @__PURE__ */ jsx21(SelectLabelBase, { children: key }),
|
|
1553
|
+
groupItems[key].map((item) => /* @__PURE__ */ jsx21(SelectItemBase, { value: item.value, children: item.label }, item.value))
|
|
1554
|
+
] }, key)) }) : /* @__PURE__ */ jsx21(SelectGroupBase, { children: items.map((item) => /* @__PURE__ */ jsx21(SelectItemBase, { value: item.value, children: item.label }, item.value)) }) }) })
|
|
1555
|
+
] }),
|
|
1556
|
+
errorMessage && /* @__PURE__ */ jsx21("p", { className: "text-sm text-red-500", children: errorMessage })
|
|
1557
|
+
] });
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
// src/components/ui/CalendarBase.tsx
|
|
1561
|
+
import { CaretLeft as CaretLeft2, CaretRight as CaretRight3 } from "phosphor-react";
|
|
1562
|
+
import { DayPicker as DayPicker2 } from "react-day-picker";
|
|
1563
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1564
|
+
function CalendarBase2({
|
|
1565
|
+
className,
|
|
1566
|
+
classNames,
|
|
1567
|
+
showOutsideDays = true,
|
|
1568
|
+
...props
|
|
1569
|
+
}) {
|
|
1570
|
+
return /* @__PURE__ */ jsx22(
|
|
1571
|
+
DayPicker2,
|
|
1572
|
+
{
|
|
1573
|
+
showOutsideDays,
|
|
1574
|
+
className: cn("bg-black-50 p-3", className),
|
|
1575
|
+
classNames: {
|
|
1576
|
+
months: "flex items-center flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
1577
|
+
month: "space-y-4",
|
|
1578
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
1579
|
+
caption_label: "text-sm font-medium",
|
|
1580
|
+
nav: "space-x-1 flex items-center",
|
|
1581
|
+
nav_button: cn(
|
|
1582
|
+
/* @__PURE__ */ jsx22(ButtonBase, { variant: "outline" }),
|
|
1583
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
1584
|
+
),
|
|
1585
|
+
nav_button_previous: "absolute left-1",
|
|
1586
|
+
nav_button_next: "absolute right-1",
|
|
1587
|
+
table: "w-full border-collapse space-y-1",
|
|
1588
|
+
head_row: "flex",
|
|
1589
|
+
head_cell: "text-slate-500 rounded-md w-9 font-normal text-[0.8rem] dark:text-slate-400",
|
|
1590
|
+
row: "flex w-full mt-2",
|
|
1591
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-slate-100/50 [&:has([aria-selected])]:bg-slate-100 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 dark:[&:has([aria-selected].day-outside)]:bg-slate-800/50 dark:[&:has([aria-selected])]:bg-slate-800",
|
|
1592
|
+
day: cn(
|
|
1593
|
+
/* @__PURE__ */ jsx22(ButtonBase, { variant: "ghost" }),
|
|
1594
|
+
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
1595
|
+
),
|
|
1596
|
+
day_range_end: "day-range-end",
|
|
1597
|
+
day_selected: "bg-purple text-slate-50 hover:bg-slate-900 hover:text-slate-50 focus:bg-purple-500 focus:text-slate-50 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50 dark:hover:text-slate-900 dark:focus:bg-slate-50 dark:focus:text-slate-900",
|
|
1598
|
+
day_today: "bg-slate-100 text-slate-900 dark:bg-slate-800 dark:text-slate-50",
|
|
1599
|
+
day_outside: "day-outside text-slate-500 opacity-50 aria-selected:bg-slate-100/50 aria-selected:text-slate-500 aria-selected:opacity-30 dark:text-slate-400 dark:aria-selected:bg-slate-800/50 dark:aria-selected:text-slate-400",
|
|
1600
|
+
day_disabled: "text-slate-500 opacity-50 dark:text-slate-400",
|
|
1601
|
+
day_range_middle: "aria-selected:bg-slate-100 aria-selected:text-slate-900 dark:aria-selected:bg-slate-800 dark:aria-selected:text-slate-50",
|
|
1602
|
+
day_hidden: "invisible",
|
|
1603
|
+
...classNames
|
|
1604
|
+
},
|
|
1605
|
+
components: {
|
|
1606
|
+
IconLeft: () => /* @__PURE__ */ jsx22(CaretLeft2, { className: "h-4 w-4" }),
|
|
1607
|
+
IconRight: () => /* @__PURE__ */ jsx22(CaretRight3, { className: "h-4 w-4" })
|
|
1608
|
+
},
|
|
1609
|
+
...props
|
|
1610
|
+
}
|
|
1611
|
+
);
|
|
1612
|
+
}
|
|
1613
|
+
CalendarBase2.displayName = "CalendarBase";
|
|
1614
|
+
|
|
1615
|
+
// src/components/ui/CardBase.tsx
|
|
1616
|
+
import * as React15 from "react";
|
|
1617
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1618
|
+
var CardBase = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1619
|
+
"div",
|
|
1620
|
+
{
|
|
1621
|
+
ref,
|
|
1622
|
+
className: cn(
|
|
1623
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
1624
|
+
className
|
|
1625
|
+
),
|
|
1626
|
+
...props
|
|
1627
|
+
}
|
|
1628
|
+
));
|
|
1629
|
+
CardBase.displayName = "Card";
|
|
1630
|
+
var CardHeaderBase = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1631
|
+
"div",
|
|
1632
|
+
{
|
|
1633
|
+
ref,
|
|
1634
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
1635
|
+
...props
|
|
1636
|
+
}
|
|
1637
|
+
));
|
|
1638
|
+
CardHeaderBase.displayName = "CardHeader";
|
|
1639
|
+
var CardTitleBase = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1640
|
+
"div",
|
|
1641
|
+
{
|
|
1642
|
+
ref,
|
|
1643
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
1644
|
+
...props
|
|
1645
|
+
}
|
|
1646
|
+
));
|
|
1647
|
+
CardTitleBase.displayName = "CardTitle";
|
|
1648
|
+
var CardDescriptionBase = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1649
|
+
"div",
|
|
1650
|
+
{
|
|
1651
|
+
ref,
|
|
1652
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1653
|
+
...props
|
|
1654
|
+
}
|
|
1655
|
+
));
|
|
1656
|
+
CardDescriptionBase.displayName = "CardDescription";
|
|
1657
|
+
var CardContentBase = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
1658
|
+
CardContentBase.displayName = "CardContent";
|
|
1659
|
+
var CardFooterBase = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1660
|
+
"div",
|
|
1661
|
+
{
|
|
1662
|
+
ref,
|
|
1663
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
1664
|
+
...props
|
|
1665
|
+
}
|
|
1666
|
+
));
|
|
1667
|
+
CardFooterBase.displayName = "CardFooter";
|
|
1668
|
+
|
|
1669
|
+
// src/components/ui/CheckBoxBase.tsx
|
|
1670
|
+
import * as React16 from "react";
|
|
1671
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1672
|
+
import { Check as Check5 } from "phosphor-react";
|
|
1673
|
+
import { motion as motion4 } from "framer-motion";
|
|
1674
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1675
|
+
var CheckboxBase = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1676
|
+
CheckboxPrimitive.Root,
|
|
1677
|
+
{
|
|
1678
|
+
ref,
|
|
1679
|
+
className: cn(
|
|
1680
|
+
"peer h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground transition-colors",
|
|
1681
|
+
className
|
|
1682
|
+
),
|
|
1683
|
+
...props,
|
|
1684
|
+
children: /* @__PURE__ */ jsx24(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx24(
|
|
1685
|
+
motion4.div,
|
|
1686
|
+
{
|
|
1687
|
+
initial: { scale: 0, opacity: 0, rotate: -90 },
|
|
1688
|
+
animate: { scale: 1, opacity: 1, rotate: 0 },
|
|
1689
|
+
exit: { scale: 0, opacity: 0, rotate: 90 },
|
|
1690
|
+
transition: { type: "spring", stiffness: 500, damping: 30 },
|
|
1691
|
+
className: "flex items-center justify-center text-current",
|
|
1692
|
+
children: /* @__PURE__ */ jsx24(Check5, { className: "h-4 w-4", weight: "bold" })
|
|
1693
|
+
}
|
|
1694
|
+
) })
|
|
1695
|
+
}
|
|
1696
|
+
));
|
|
1697
|
+
CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
|
|
1698
|
+
|
|
1699
|
+
// src/components/ui/FormBase.tsx
|
|
1700
|
+
import * as React17 from "react";
|
|
1701
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1702
|
+
import {
|
|
1703
|
+
Controller,
|
|
1704
|
+
FormProvider,
|
|
1705
|
+
useFormContext
|
|
1706
|
+
} from "react-hook-form";
|
|
1707
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1708
|
+
var FormBase = FormProvider;
|
|
1709
|
+
var FormFieldBaseContext = React17.createContext(
|
|
1710
|
+
{}
|
|
1711
|
+
);
|
|
1712
|
+
var FormFieldBase = ({
|
|
1713
|
+
...props
|
|
1714
|
+
}) => {
|
|
1715
|
+
return /* @__PURE__ */ jsx25(FormFieldBaseContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx25(Controller, { ...props }) });
|
|
1716
|
+
};
|
|
1717
|
+
var useFormFieldBase = () => {
|
|
1718
|
+
const fieldContext = React17.useContext(FormFieldBaseContext);
|
|
1719
|
+
const itemContext = React17.useContext(FormItemBaseContext);
|
|
1720
|
+
const { getFieldState, formState } = useFormContext();
|
|
1721
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
1722
|
+
if (!fieldContext) {
|
|
1723
|
+
throw new Error("useFormFieldBase should be used within <FormFieldBase>");
|
|
1724
|
+
}
|
|
1725
|
+
const { id } = itemContext;
|
|
1726
|
+
return {
|
|
1727
|
+
id,
|
|
1728
|
+
name: fieldContext.name,
|
|
1729
|
+
FormItemId: `${id}-form-item`,
|
|
1730
|
+
FormDescriptionId: `${id}-form-item-description`,
|
|
1731
|
+
FormMessageId: `${id}-form-item-message`,
|
|
1732
|
+
...fieldState
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
var FormItemBaseContext = React17.createContext(
|
|
1736
|
+
{}
|
|
1737
|
+
);
|
|
1738
|
+
var FormItemBase = React17.forwardRef(({ className, ...props }, ref) => {
|
|
1739
|
+
const id = React17.useId();
|
|
1740
|
+
return /* @__PURE__ */ jsx25(FormItemBaseContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx25("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
1741
|
+
});
|
|
1742
|
+
FormItemBase.displayName = "FormItemBase";
|
|
1743
|
+
var FormLabelBase = React17.forwardRef(
|
|
1744
|
+
({ className, ...props }, ref) => {
|
|
1745
|
+
const { error, FormItemId } = useFormFieldBase();
|
|
1746
|
+
return /* @__PURE__ */ jsx25(
|
|
1747
|
+
LabelBase_default,
|
|
1748
|
+
{
|
|
1749
|
+
ref,
|
|
1750
|
+
className: cn(error && "text-destructive", className),
|
|
1751
|
+
htmlFor: FormItemId,
|
|
1752
|
+
...props
|
|
1753
|
+
}
|
|
1754
|
+
);
|
|
1755
|
+
}
|
|
1756
|
+
);
|
|
1757
|
+
FormLabelBase.displayName = "FormLabelBase";
|
|
1758
|
+
var FormControlBase = React17.forwardRef(({ ...props }, ref) => {
|
|
1759
|
+
const { error, FormItemId, FormDescriptionId, FormMessageId } = useFormFieldBase();
|
|
1760
|
+
return /* @__PURE__ */ jsx25(
|
|
1761
|
+
Slot3,
|
|
1762
|
+
{
|
|
1763
|
+
ref,
|
|
1764
|
+
id: FormItemId,
|
|
1765
|
+
"aria-describedby": !error ? `${FormDescriptionId}` : `${FormDescriptionId} ${FormMessageId}`,
|
|
1766
|
+
"aria-invalid": !!error,
|
|
1767
|
+
...props
|
|
1768
|
+
}
|
|
1769
|
+
);
|
|
1770
|
+
});
|
|
1771
|
+
FormControlBase.displayName = "FormControlBase";
|
|
1772
|
+
var FormDescriptionBase = React17.forwardRef(({ className, ...props }, ref) => {
|
|
1773
|
+
const { FormDescriptionId } = useFormFieldBase();
|
|
1774
|
+
return /* @__PURE__ */ jsx25(
|
|
1775
|
+
"p",
|
|
1776
|
+
{
|
|
1777
|
+
ref,
|
|
1778
|
+
id: FormDescriptionId,
|
|
1779
|
+
className: cn("text-[0.8rem] text-muted-foreground", className),
|
|
1780
|
+
...props
|
|
1781
|
+
}
|
|
1782
|
+
);
|
|
1783
|
+
});
|
|
1784
|
+
FormDescriptionBase.displayName = "FormDescriptionBase";
|
|
1785
|
+
var FormMessageBase = React17.forwardRef(({ className, children, ...props }, ref) => {
|
|
1786
|
+
const { error, FormMessageId } = useFormFieldBase();
|
|
1787
|
+
const body = error ? String(error?.message) : children;
|
|
1788
|
+
if (!body) {
|
|
1789
|
+
return null;
|
|
1790
|
+
}
|
|
1791
|
+
return /* @__PURE__ */ jsx25(
|
|
1792
|
+
"p",
|
|
1793
|
+
{
|
|
1794
|
+
ref,
|
|
1795
|
+
id: FormMessageId,
|
|
1796
|
+
className: cn("text-[0.8rem] font-medium text-destructive", className),
|
|
1797
|
+
...props,
|
|
1798
|
+
children: body
|
|
1799
|
+
}
|
|
1800
|
+
);
|
|
1801
|
+
});
|
|
1802
|
+
FormMessageBase.displayName = "FormMessageBase";
|
|
1803
|
+
|
|
1804
|
+
// src/components/ui/ProgressBase.tsx
|
|
1805
|
+
import * as React18 from "react";
|
|
1806
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1807
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1808
|
+
var ProgressBase = React18.forwardRef(
|
|
1809
|
+
({
|
|
1810
|
+
className,
|
|
1811
|
+
value,
|
|
1812
|
+
label,
|
|
1813
|
+
leftIcon,
|
|
1814
|
+
rightIcon,
|
|
1815
|
+
showValue = false,
|
|
1816
|
+
...props
|
|
1817
|
+
}, ref) => {
|
|
1818
|
+
return /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
1819
|
+
label && /* @__PURE__ */ jsx26(LabelBase_default, { className: "py-2", children: label }),
|
|
1820
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
1821
|
+
leftIcon && /* @__PURE__ */ jsx26("div", { className: "flex items-center", children: leftIcon }),
|
|
1822
|
+
/* @__PURE__ */ jsxs15("div", { className: "relative w-full", children: [
|
|
1823
|
+
/* @__PURE__ */ jsx26(
|
|
1824
|
+
ProgressPrimitive.Root,
|
|
1825
|
+
{
|
|
1826
|
+
ref,
|
|
1827
|
+
className: cn(
|
|
1828
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
1829
|
+
className
|
|
1830
|
+
),
|
|
1831
|
+
value,
|
|
1832
|
+
...props,
|
|
1833
|
+
children: /* @__PURE__ */ jsx26(
|
|
1834
|
+
ProgressPrimitive.Indicator,
|
|
1835
|
+
{
|
|
1836
|
+
className: "h-full w-full flex-1 bg-primary transition-all ",
|
|
1837
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1838
|
+
}
|
|
1839
|
+
)
|
|
1840
|
+
}
|
|
1841
|
+
),
|
|
1842
|
+
showValue && /* @__PURE__ */ jsxs15("span", { className: "absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground", children: [
|
|
1843
|
+
Math.round(value ?? 0),
|
|
1844
|
+
"%"
|
|
1845
|
+
] })
|
|
1846
|
+
] }),
|
|
1847
|
+
rightIcon && /* @__PURE__ */ jsx26("div", { className: "flex items-center", children: rightIcon })
|
|
1848
|
+
] })
|
|
1849
|
+
] });
|
|
1850
|
+
}
|
|
1851
|
+
);
|
|
1852
|
+
ProgressBase.displayName = "ProgressBase";
|
|
1853
|
+
|
|
1854
|
+
// src/components/ui/SeparatorBase.tsx
|
|
1855
|
+
import * as React19 from "react";
|
|
1856
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1857
|
+
import { motion as motion5 } from "framer-motion";
|
|
1858
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1859
|
+
var SeparatorBase = React19.forwardRef(
|
|
1860
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
|
|
1861
|
+
const isHorizontal = orientation === "horizontal";
|
|
1862
|
+
return /* @__PURE__ */ jsx27(
|
|
1863
|
+
SeparatorPrimitive.Root,
|
|
1864
|
+
{
|
|
1865
|
+
ref,
|
|
1866
|
+
decorative,
|
|
1867
|
+
orientation,
|
|
1868
|
+
asChild: true,
|
|
1869
|
+
...props,
|
|
1870
|
+
children: /* @__PURE__ */ jsx27(
|
|
1871
|
+
motion5.div,
|
|
1872
|
+
{
|
|
1873
|
+
className: cn(
|
|
1874
|
+
"shrink-0 bg-border",
|
|
1875
|
+
isHorizontal ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1876
|
+
className
|
|
1877
|
+
),
|
|
1878
|
+
initial: { scaleX: isHorizontal ? 0 : 1, scaleY: isHorizontal ? 1 : 0 },
|
|
1879
|
+
animate: { scaleX: 1, scaleY: 1 },
|
|
1880
|
+
transition: { duration: 0.2, ease: "easeInOut" }
|
|
1881
|
+
}
|
|
1882
|
+
)
|
|
1883
|
+
}
|
|
1884
|
+
);
|
|
1885
|
+
}
|
|
1886
|
+
);
|
|
1887
|
+
SeparatorBase.displayName = SeparatorPrimitive.Root.displayName;
|
|
1888
|
+
|
|
1889
|
+
// src/components/ui/SheetBase.tsx
|
|
1890
|
+
import * as React20 from "react";
|
|
1891
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
1892
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
1893
|
+
import { X as X3 } from "phosphor-react";
|
|
1894
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1895
|
+
var SheetBase = SheetPrimitive.Root;
|
|
1896
|
+
var SheetTriggerBase = SheetPrimitive.Trigger;
|
|
1897
|
+
var SheetCloseBase = SheetPrimitive.Close;
|
|
1898
|
+
var SheetPortalBase = SheetPrimitive.Portal;
|
|
1899
|
+
var SheetOverlayBase = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1900
|
+
SheetPrimitive.Overlay,
|
|
1901
|
+
{
|
|
1902
|
+
className: cn(
|
|
1903
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1904
|
+
className
|
|
1905
|
+
),
|
|
1906
|
+
...props,
|
|
1907
|
+
ref
|
|
1908
|
+
}
|
|
1909
|
+
));
|
|
1910
|
+
SheetOverlayBase.displayName = SheetPrimitive.Overlay.displayName;
|
|
1911
|
+
var sheetVariants = cva2(
|
|
1912
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1913
|
+
{
|
|
1914
|
+
variants: {
|
|
1915
|
+
side: {
|
|
1916
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1917
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1918
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1919
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
defaultVariants: {
|
|
1923
|
+
side: "right"
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
);
|
|
1927
|
+
var SheetContentBase = React20.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs16(SheetPortalBase, { children: [
|
|
1928
|
+
/* @__PURE__ */ jsx28(SheetOverlayBase, {}),
|
|
1929
|
+
/* @__PURE__ */ jsxs16(
|
|
1930
|
+
SheetPrimitive.Content,
|
|
1931
|
+
{
|
|
1932
|
+
ref,
|
|
1933
|
+
className: cn(sheetVariants({ side }), className),
|
|
1934
|
+
...props,
|
|
1935
|
+
children: [
|
|
1936
|
+
/* @__PURE__ */ jsxs16(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1937
|
+
/* @__PURE__ */ jsx28(X3, { className: "h-4 w-4" }),
|
|
1938
|
+
/* @__PURE__ */ jsx28("span", { className: "sr-only", children: "Close" })
|
|
1939
|
+
] }),
|
|
1940
|
+
children
|
|
1941
|
+
]
|
|
1942
|
+
}
|
|
1943
|
+
)
|
|
1944
|
+
] }));
|
|
1945
|
+
SheetContentBase.displayName = SheetPrimitive.Content.displayName;
|
|
1946
|
+
var SheetHeaderBase = ({
|
|
1947
|
+
className,
|
|
1948
|
+
...props
|
|
1949
|
+
}) => /* @__PURE__ */ jsx28(
|
|
1950
|
+
"div",
|
|
1951
|
+
{
|
|
1952
|
+
className: cn(
|
|
1953
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1954
|
+
className
|
|
1955
|
+
),
|
|
1956
|
+
...props
|
|
1957
|
+
}
|
|
1958
|
+
);
|
|
1959
|
+
SheetHeaderBase.displayName = "SheetHeaderBase";
|
|
1960
|
+
var SheetFooterBase = ({
|
|
1961
|
+
className,
|
|
1962
|
+
...props
|
|
1963
|
+
}) => /* @__PURE__ */ jsx28(
|
|
1964
|
+
"div",
|
|
1965
|
+
{
|
|
1966
|
+
className: cn(
|
|
1967
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1968
|
+
className
|
|
1969
|
+
),
|
|
1970
|
+
...props
|
|
1971
|
+
}
|
|
1972
|
+
);
|
|
1973
|
+
SheetFooterBase.displayName = "SheetFooterBase";
|
|
1974
|
+
var SheetTitleBase = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1975
|
+
SheetPrimitive.Title,
|
|
1976
|
+
{
|
|
1977
|
+
ref,
|
|
1978
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
1979
|
+
...props
|
|
1980
|
+
}
|
|
1981
|
+
));
|
|
1982
|
+
SheetTitleBase.displayName = SheetPrimitive.Title.displayName;
|
|
1983
|
+
var SheetDescriptionBase = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1984
|
+
SheetPrimitive.Description,
|
|
1985
|
+
{
|
|
1986
|
+
ref,
|
|
1987
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1988
|
+
...props
|
|
1989
|
+
}
|
|
1990
|
+
));
|
|
1991
|
+
SheetDescriptionBase.displayName = SheetPrimitive.Description.displayName;
|
|
1992
|
+
|
|
1993
|
+
// src/components/ui/SidebarBase.tsx
|
|
1994
|
+
import * as React22 from "react";
|
|
1995
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
1996
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
1997
|
+
|
|
1998
|
+
// src/components/ui/SkeletonBase.tsx
|
|
1999
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2000
|
+
function SkeletonBase({
|
|
2001
|
+
className,
|
|
2002
|
+
...props
|
|
2003
|
+
}) {
|
|
2004
|
+
return /* @__PURE__ */ jsx29(
|
|
2005
|
+
"div",
|
|
2006
|
+
{
|
|
2007
|
+
className: cn("animate-pulse bg-primary/10", className),
|
|
2008
|
+
...props
|
|
2009
|
+
}
|
|
2010
|
+
);
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
// src/components/ui/SidebarBase.tsx
|
|
2014
|
+
import { SidebarSimple } from "phosphor-react";
|
|
2015
|
+
|
|
2016
|
+
// src/components/ui/TooltipBase.tsx
|
|
2017
|
+
import * as React21 from "react";
|
|
2018
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2019
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2020
|
+
var TooltipProviderBase = TooltipPrimitive.Provider;
|
|
2021
|
+
var TooltipBase = TooltipPrimitive.Root;
|
|
2022
|
+
var TooltipTriggerBase = TooltipPrimitive.Trigger;
|
|
2023
|
+
var TooltipContentBase = React21.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx30(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx30(
|
|
2024
|
+
TooltipPrimitive.Content,
|
|
2025
|
+
{
|
|
2026
|
+
ref,
|
|
2027
|
+
sideOffset,
|
|
2028
|
+
className: cn(
|
|
2029
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
|
|
2030
|
+
className
|
|
2031
|
+
),
|
|
2032
|
+
...props
|
|
2033
|
+
}
|
|
2034
|
+
) }));
|
|
2035
|
+
TooltipContentBase.displayName = TooltipPrimitive.Content.displayName;
|
|
2036
|
+
|
|
2037
|
+
// src/components/ui/SidebarBase.tsx
|
|
2038
|
+
import { jsx as jsx31, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2039
|
+
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
2040
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
2041
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
2042
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2043
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
2044
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
2045
|
+
var SidebarContext = React22.createContext(null);
|
|
2046
|
+
function UseSideBarBase() {
|
|
2047
|
+
const context = React22.useContext(SidebarContext);
|
|
2048
|
+
if (!context) {
|
|
2049
|
+
throw new Error(
|
|
2050
|
+
"UseSideBarBase must be used within a SidebarProviderBase."
|
|
2051
|
+
);
|
|
2052
|
+
}
|
|
2053
|
+
return context;
|
|
2054
|
+
}
|
|
2055
|
+
var SidebarProviderBase = React22.forwardRef(
|
|
2056
|
+
({
|
|
2057
|
+
defaultOpen = true,
|
|
2058
|
+
open: openProp,
|
|
2059
|
+
onOpenChange: setOpenProp,
|
|
2060
|
+
className,
|
|
2061
|
+
style,
|
|
2062
|
+
children,
|
|
2063
|
+
...props
|
|
2064
|
+
}, ref) => {
|
|
2065
|
+
const isMobile = useIsMobile();
|
|
2066
|
+
const [openMobile, setOpenMobile] = React22.useState(false);
|
|
2067
|
+
const [_open, _setOpen] = React22.useState(defaultOpen);
|
|
2068
|
+
const open = openProp ?? _open;
|
|
2069
|
+
const setOpen = React22.useCallback(
|
|
2070
|
+
(value) => {
|
|
2071
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
2072
|
+
if (setOpenProp) {
|
|
2073
|
+
setOpenProp(openState);
|
|
2074
|
+
} else {
|
|
2075
|
+
_setOpen(openState);
|
|
2076
|
+
}
|
|
2077
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
2078
|
+
},
|
|
2079
|
+
[setOpenProp, open]
|
|
2080
|
+
);
|
|
2081
|
+
const toggleSidebar = React22.useCallback(() => {
|
|
2082
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
2083
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
2084
|
+
React22.useEffect(() => {
|
|
2085
|
+
const handleKeyDown = (event) => {
|
|
2086
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
2087
|
+
event.preventDefault();
|
|
2088
|
+
toggleSidebar();
|
|
2089
|
+
}
|
|
2090
|
+
};
|
|
2091
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
2092
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2093
|
+
}, [toggleSidebar]);
|
|
2094
|
+
const state = open ? "expanded" : "collapsed";
|
|
2095
|
+
const contextValue = React22.useMemo(
|
|
2096
|
+
() => ({
|
|
2097
|
+
state,
|
|
2098
|
+
open,
|
|
2099
|
+
setOpen,
|
|
2100
|
+
isMobile,
|
|
2101
|
+
openMobile,
|
|
2102
|
+
setOpenMobile,
|
|
2103
|
+
toggleSidebar
|
|
2104
|
+
}),
|
|
2105
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
2106
|
+
);
|
|
2107
|
+
return /* @__PURE__ */ jsx31(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx31(TooltipProviderBase, { delayDuration: 0, children: /* @__PURE__ */ jsx31(
|
|
2108
|
+
"div",
|
|
2109
|
+
{
|
|
2110
|
+
style: {
|
|
2111
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2112
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2113
|
+
...style
|
|
2114
|
+
},
|
|
2115
|
+
className: cn(
|
|
2116
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
2117
|
+
className
|
|
2118
|
+
),
|
|
2119
|
+
ref,
|
|
2120
|
+
...props,
|
|
2121
|
+
children
|
|
2122
|
+
}
|
|
2123
|
+
) }) });
|
|
2124
|
+
}
|
|
2125
|
+
);
|
|
2126
|
+
SidebarProviderBase.displayName = "SidebarProviderBase";
|
|
2127
|
+
var SidebarBase = React22.forwardRef(
|
|
2128
|
+
({
|
|
2129
|
+
side = "left",
|
|
2130
|
+
variant = "sidebar",
|
|
2131
|
+
collapsible = "offcanvas",
|
|
2132
|
+
className,
|
|
2133
|
+
children,
|
|
2134
|
+
...props
|
|
2135
|
+
}, ref) => {
|
|
2136
|
+
const { isMobile, state, openMobile, setOpenMobile } = UseSideBarBase();
|
|
2137
|
+
if (collapsible === "none") {
|
|
2138
|
+
return /* @__PURE__ */ jsx31(
|
|
2139
|
+
"div",
|
|
2140
|
+
{
|
|
2141
|
+
className: cn(
|
|
2142
|
+
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
2143
|
+
className
|
|
2144
|
+
),
|
|
2145
|
+
ref,
|
|
2146
|
+
...props,
|
|
2147
|
+
children
|
|
2148
|
+
}
|
|
2149
|
+
);
|
|
2150
|
+
}
|
|
2151
|
+
if (isMobile) {
|
|
2152
|
+
return /* @__PURE__ */ jsx31(SheetBase, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx31(
|
|
2153
|
+
SheetContentBase,
|
|
2154
|
+
{
|
|
2155
|
+
"data-sidebar": "sidebar",
|
|
2156
|
+
"data-mobile": "true",
|
|
2157
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
2158
|
+
style: {
|
|
2159
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
2160
|
+
},
|
|
2161
|
+
side,
|
|
2162
|
+
children: /* @__PURE__ */ jsx31("div", { className: "flex h-full w-full flex-col", children })
|
|
2163
|
+
}
|
|
2164
|
+
) });
|
|
2165
|
+
}
|
|
2166
|
+
return /* @__PURE__ */ jsxs17(
|
|
2167
|
+
"div",
|
|
2168
|
+
{
|
|
2169
|
+
ref,
|
|
2170
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
2171
|
+
"data-state": state,
|
|
2172
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2173
|
+
"data-variant": variant,
|
|
2174
|
+
"data-side": side,
|
|
2175
|
+
children: [
|
|
2176
|
+
/* @__PURE__ */ jsx31(
|
|
2177
|
+
"div",
|
|
2178
|
+
{
|
|
2179
|
+
className: cn(
|
|
2180
|
+
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
2181
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
2182
|
+
"group-data-[side=right]:rotate-180",
|
|
2183
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
2184
|
+
)
|
|
2185
|
+
}
|
|
2186
|
+
),
|
|
2187
|
+
/* @__PURE__ */ jsx31(
|
|
2188
|
+
"div",
|
|
2189
|
+
{
|
|
2190
|
+
className: cn(
|
|
2191
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
2192
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
2193
|
+
// Adjust the padding for floating and inset variants.
|
|
2194
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
2195
|
+
className
|
|
2196
|
+
),
|
|
2197
|
+
...props,
|
|
2198
|
+
children: /* @__PURE__ */ jsx31(
|
|
2199
|
+
"div",
|
|
2200
|
+
{
|
|
2201
|
+
"data-sidebar": "sidebar",
|
|
2202
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
2203
|
+
children
|
|
2204
|
+
}
|
|
2205
|
+
)
|
|
2206
|
+
}
|
|
2207
|
+
)
|
|
2208
|
+
]
|
|
2209
|
+
}
|
|
2210
|
+
);
|
|
2211
|
+
}
|
|
2212
|
+
);
|
|
2213
|
+
SidebarBase.displayName = "SidebarBase";
|
|
2214
|
+
var SidebarTriggerBase = React22.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
2215
|
+
const { toggleSidebar } = UseSideBarBase();
|
|
2216
|
+
return /* @__PURE__ */ jsx31("div", { children: /* @__PURE__ */ jsxs17(
|
|
2217
|
+
ButtonBase,
|
|
2218
|
+
{
|
|
2219
|
+
ref,
|
|
2220
|
+
"data-sidebar": "trigger",
|
|
2221
|
+
variant: "ghost",
|
|
2222
|
+
size: "icon",
|
|
2223
|
+
className: cn("h-7 w-7", className),
|
|
2224
|
+
onClick: (event) => {
|
|
2225
|
+
onClick?.(event);
|
|
2226
|
+
toggleSidebar();
|
|
2227
|
+
},
|
|
2228
|
+
...props,
|
|
2229
|
+
children: [
|
|
2230
|
+
/* @__PURE__ */ jsx31("span", { className: "sr-only", children: "Toggle SidebarBase" }),
|
|
2231
|
+
/* @__PURE__ */ jsx31(SidebarSimple, {})
|
|
2232
|
+
]
|
|
2233
|
+
}
|
|
2234
|
+
) });
|
|
2235
|
+
});
|
|
2236
|
+
SidebarTriggerBase.displayName = "SidebarTriggerBase";
|
|
2237
|
+
var SidebarRailBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2238
|
+
const { toggleSidebar } = UseSideBarBase();
|
|
2239
|
+
return /* @__PURE__ */ jsx31(
|
|
2240
|
+
"button",
|
|
2241
|
+
{
|
|
2242
|
+
ref,
|
|
2243
|
+
"data-sidebar": "rail",
|
|
2244
|
+
"aria-label": "Toggle SidebarBase",
|
|
2245
|
+
tabIndex: -1,
|
|
2246
|
+
onClick: toggleSidebar,
|
|
2247
|
+
title: "Toggle SidebarBase",
|
|
2248
|
+
className: cn(
|
|
2249
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
2250
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
2251
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
2252
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
2253
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
2254
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
2255
|
+
className
|
|
2256
|
+
),
|
|
2257
|
+
...props
|
|
2258
|
+
}
|
|
2259
|
+
);
|
|
2260
|
+
});
|
|
2261
|
+
SidebarRailBase.displayName = "SidebarRailBase";
|
|
2262
|
+
var SidebarInsetBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2263
|
+
return /* @__PURE__ */ jsx31(
|
|
2264
|
+
"main",
|
|
2265
|
+
{
|
|
2266
|
+
ref,
|
|
2267
|
+
className: cn(
|
|
2268
|
+
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
2269
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
2270
|
+
className
|
|
2271
|
+
),
|
|
2272
|
+
...props
|
|
2273
|
+
}
|
|
2274
|
+
);
|
|
2275
|
+
});
|
|
2276
|
+
SidebarInsetBase.displayName = "SidebarInsetBase";
|
|
2277
|
+
var SidebarInputBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2278
|
+
return /* @__PURE__ */ jsx31(
|
|
2279
|
+
InputBase,
|
|
2280
|
+
{
|
|
2281
|
+
ref,
|
|
2282
|
+
"data-sidebar": "input",
|
|
2283
|
+
className: cn(
|
|
2284
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
2285
|
+
className
|
|
2286
|
+
),
|
|
2287
|
+
...props
|
|
2288
|
+
}
|
|
2289
|
+
);
|
|
2290
|
+
});
|
|
2291
|
+
SidebarInputBase.displayName = "SidebarInputBase";
|
|
2292
|
+
var SidebarHeaderBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2293
|
+
return /* @__PURE__ */ jsx31(
|
|
2294
|
+
"div",
|
|
2295
|
+
{
|
|
2296
|
+
ref,
|
|
2297
|
+
"data-sidebar": "header",
|
|
2298
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
2299
|
+
...props
|
|
2300
|
+
}
|
|
2301
|
+
);
|
|
2302
|
+
});
|
|
2303
|
+
SidebarHeaderBase.displayName = "SidebarHeaderBase";
|
|
2304
|
+
var SidebarFooterBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2305
|
+
return /* @__PURE__ */ jsx31(
|
|
2306
|
+
"div",
|
|
2307
|
+
{
|
|
2308
|
+
ref,
|
|
2309
|
+
"data-sidebar": "footer",
|
|
2310
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
2311
|
+
...props
|
|
2312
|
+
}
|
|
2313
|
+
);
|
|
2314
|
+
});
|
|
2315
|
+
SidebarFooterBase.displayName = "SidebarFooterBase";
|
|
2316
|
+
var SidebarSeparatorBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2317
|
+
return /* @__PURE__ */ jsx31(
|
|
2318
|
+
SeparatorBase,
|
|
2319
|
+
{
|
|
2320
|
+
ref,
|
|
2321
|
+
"data-sidebar": "separator",
|
|
2322
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
2323
|
+
...props
|
|
2324
|
+
}
|
|
2325
|
+
);
|
|
2326
|
+
});
|
|
2327
|
+
SidebarSeparatorBase.displayName = "SidebarSeparatorBase";
|
|
2328
|
+
var SidebarContentBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2329
|
+
return /* @__PURE__ */ jsx31(
|
|
2330
|
+
"div",
|
|
2331
|
+
{
|
|
2332
|
+
ref,
|
|
2333
|
+
"data-sidebar": "content",
|
|
2334
|
+
className: cn(
|
|
2335
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
2336
|
+
className
|
|
2337
|
+
),
|
|
2338
|
+
...props
|
|
2339
|
+
}
|
|
2340
|
+
);
|
|
2341
|
+
});
|
|
2342
|
+
SidebarContentBase.displayName = "SidebarContentBase";
|
|
2343
|
+
var SidebarGroupBase = React22.forwardRef(({ className, ...props }, ref) => {
|
|
2344
|
+
return /* @__PURE__ */ jsx31(
|
|
2345
|
+
"div",
|
|
2346
|
+
{
|
|
2347
|
+
ref,
|
|
2348
|
+
"data-sidebar": "group",
|
|
2349
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2350
|
+
...props
|
|
2351
|
+
}
|
|
2352
|
+
);
|
|
2353
|
+
});
|
|
2354
|
+
SidebarGroupBase.displayName = "SidebarGroupBase";
|
|
2355
|
+
var SidebarGroupLabelBase = React22.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2356
|
+
const Comp = asChild ? Slot4 : "div";
|
|
2357
|
+
return /* @__PURE__ */ jsx31(
|
|
2358
|
+
Comp,
|
|
2359
|
+
{
|
|
2360
|
+
ref,
|
|
2361
|
+
"data-sidebar": "group-label",
|
|
2362
|
+
className: cn(
|
|
2363
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2364
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
2365
|
+
className
|
|
2366
|
+
),
|
|
2367
|
+
...props
|
|
2368
|
+
}
|
|
2369
|
+
);
|
|
2370
|
+
});
|
|
2371
|
+
SidebarGroupLabelBase.displayName = "SidebarGroupLabelBase";
|
|
2372
|
+
var SidebarGroupActionBase = React22.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2373
|
+
const Comp = asChild ? Slot4 : "button";
|
|
2374
|
+
return /* @__PURE__ */ jsx31(
|
|
2375
|
+
Comp,
|
|
2376
|
+
{
|
|
2377
|
+
ref,
|
|
2378
|
+
"data-sidebar": "group-action",
|
|
2379
|
+
className: cn(
|
|
2380
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2381
|
+
// Increases the hit area of the button on mobile.
|
|
2382
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
2383
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2384
|
+
className
|
|
2385
|
+
),
|
|
2386
|
+
...props
|
|
2387
|
+
}
|
|
2388
|
+
);
|
|
2389
|
+
});
|
|
2390
|
+
SidebarGroupActionBase.displayName = "SidebarGroupActionBase";
|
|
2391
|
+
var SidebarGroupContentBase = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2392
|
+
"div",
|
|
2393
|
+
{
|
|
2394
|
+
ref,
|
|
2395
|
+
"data-sidebar": "group-content",
|
|
2396
|
+
className: cn("w-full text-sm", className),
|
|
2397
|
+
...props
|
|
2398
|
+
}
|
|
2399
|
+
));
|
|
2400
|
+
SidebarGroupContentBase.displayName = "SidebarGroupContentBase";
|
|
2401
|
+
var SidebarMenuBase = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2402
|
+
"ul",
|
|
2403
|
+
{
|
|
2404
|
+
ref,
|
|
2405
|
+
"data-sidebar": "menu",
|
|
2406
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
2407
|
+
...props
|
|
2408
|
+
}
|
|
2409
|
+
));
|
|
2410
|
+
SidebarMenuBase.displayName = "SidebarMenuBase";
|
|
2411
|
+
var SidebarMenuItemBase = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2412
|
+
"li",
|
|
2413
|
+
{
|
|
2414
|
+
ref,
|
|
2415
|
+
"data-sidebar": "menu-item",
|
|
2416
|
+
className: cn("group/menu-item relative", className),
|
|
2417
|
+
...props
|
|
2418
|
+
}
|
|
2419
|
+
));
|
|
2420
|
+
SidebarMenuItemBase.displayName = "SidebarMenuItemBase";
|
|
2421
|
+
var sidebarMenuButtonVariants = cva3(
|
|
2422
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2423
|
+
{
|
|
2424
|
+
variants: {
|
|
2425
|
+
variant: {
|
|
2426
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2427
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
2428
|
+
},
|
|
2429
|
+
size: {
|
|
2430
|
+
default: "h-8 text-sm",
|
|
2431
|
+
sm: "h-7 text-xs",
|
|
2432
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
2433
|
+
}
|
|
2434
|
+
},
|
|
2435
|
+
defaultVariants: {
|
|
2436
|
+
variant: "default",
|
|
2437
|
+
size: "default"
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
);
|
|
2441
|
+
var SidebarMenuButtonBase = React22.forwardRef(
|
|
2442
|
+
({
|
|
2443
|
+
asChild = false,
|
|
2444
|
+
isActive = false,
|
|
2445
|
+
variant = "default",
|
|
2446
|
+
size = "default",
|
|
2447
|
+
tooltip,
|
|
2448
|
+
className,
|
|
2449
|
+
...props
|
|
2450
|
+
}, ref) => {
|
|
2451
|
+
const Comp = asChild ? Slot4 : "button";
|
|
2452
|
+
const { isMobile, state } = UseSideBarBase();
|
|
2453
|
+
const button = /* @__PURE__ */ jsx31(
|
|
2454
|
+
Comp,
|
|
2455
|
+
{
|
|
2456
|
+
ref,
|
|
2457
|
+
"data-sidebar": "menu-button",
|
|
2458
|
+
"data-size": size,
|
|
2459
|
+
"data-active": isActive,
|
|
2460
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
2461
|
+
...props
|
|
2462
|
+
}
|
|
2463
|
+
);
|
|
2464
|
+
if (!tooltip) {
|
|
2465
|
+
return button;
|
|
2466
|
+
}
|
|
2467
|
+
if (typeof tooltip === "string") {
|
|
2468
|
+
tooltip = {
|
|
2469
|
+
children: tooltip
|
|
2470
|
+
};
|
|
2471
|
+
}
|
|
2472
|
+
return /* @__PURE__ */ jsxs17(TooltipBase, { children: [
|
|
2473
|
+
/* @__PURE__ */ jsx31(TooltipTriggerBase, { asChild: true, children: button }),
|
|
2474
|
+
/* @__PURE__ */ jsx31(
|
|
2475
|
+
TooltipContentBase,
|
|
2476
|
+
{
|
|
2477
|
+
side: "right",
|
|
2478
|
+
align: "center",
|
|
2479
|
+
hidden: state !== "collapsed" || isMobile,
|
|
2480
|
+
...tooltip
|
|
2481
|
+
}
|
|
2482
|
+
)
|
|
2483
|
+
] });
|
|
2484
|
+
}
|
|
2485
|
+
);
|
|
2486
|
+
SidebarMenuButtonBase.displayName = "SidebarMenuButtonBase";
|
|
2487
|
+
var SidebarMenuActionBase = React22.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2488
|
+
const Comp = asChild ? Slot4 : "button";
|
|
2489
|
+
return /* @__PURE__ */ jsx31(
|
|
2490
|
+
Comp,
|
|
2491
|
+
{
|
|
2492
|
+
ref,
|
|
2493
|
+
"data-sidebar": "menu-action",
|
|
2494
|
+
className: cn(
|
|
2495
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2496
|
+
// Increases the hit area of the button on mobile.
|
|
2497
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
2498
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2499
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2500
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2501
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2502
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
2503
|
+
className
|
|
2504
|
+
),
|
|
2505
|
+
...props
|
|
2506
|
+
}
|
|
2507
|
+
);
|
|
2508
|
+
});
|
|
2509
|
+
SidebarMenuActionBase.displayName = "SidebarMenuActionBase";
|
|
2510
|
+
var SidebarMenuBadgeBase = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2511
|
+
"div",
|
|
2512
|
+
{
|
|
2513
|
+
ref,
|
|
2514
|
+
"data-sidebar": "menu-badge",
|
|
2515
|
+
className: cn(
|
|
2516
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
2517
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
2518
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
2519
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2520
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2521
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2522
|
+
className
|
|
2523
|
+
),
|
|
2524
|
+
...props
|
|
2525
|
+
}
|
|
2526
|
+
));
|
|
2527
|
+
SidebarMenuBadgeBase.displayName = "SidebarMenuBadgeBase";
|
|
2528
|
+
var SidebarMenuSkeletonBase = React22.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
2529
|
+
const width = React22.useMemo(() => {
|
|
2530
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2531
|
+
}, []);
|
|
2532
|
+
return /* @__PURE__ */ jsxs17(
|
|
2533
|
+
"div",
|
|
2534
|
+
{
|
|
2535
|
+
ref,
|
|
2536
|
+
"data-sidebar": "menu-skeleton",
|
|
2537
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2538
|
+
...props,
|
|
2539
|
+
children: [
|
|
2540
|
+
showIcon && /* @__PURE__ */ jsx31(
|
|
2541
|
+
SkeletonBase,
|
|
2542
|
+
{
|
|
2543
|
+
className: "size-4 rounded-md",
|
|
2544
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
2545
|
+
}
|
|
2546
|
+
),
|
|
2547
|
+
/* @__PURE__ */ jsx31(
|
|
2548
|
+
SkeletonBase,
|
|
2549
|
+
{
|
|
2550
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
2551
|
+
"data-sidebar": "menu-skeleton-text",
|
|
2552
|
+
style: {
|
|
2553
|
+
"--skeleton-width": width
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
)
|
|
2557
|
+
]
|
|
2558
|
+
}
|
|
2559
|
+
);
|
|
2560
|
+
});
|
|
2561
|
+
SidebarMenuSkeletonBase.displayName = "SidebarMenuSkeletonBase";
|
|
2562
|
+
var SidebarMenuSubBase = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2563
|
+
"ul",
|
|
2564
|
+
{
|
|
2565
|
+
ref,
|
|
2566
|
+
"data-sidebar": "menu-sub",
|
|
2567
|
+
className: cn(
|
|
2568
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
2569
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2570
|
+
className
|
|
2571
|
+
),
|
|
2572
|
+
...props
|
|
2573
|
+
}
|
|
2574
|
+
));
|
|
2575
|
+
SidebarMenuSubBase.displayName = "SidebarMenuSubBase";
|
|
2576
|
+
var SidebarMenuSubItemBase = React22.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx31("li", { ref, ...props }));
|
|
2577
|
+
SidebarMenuSubItemBase.displayName = "SidebarMenuSubItemBase";
|
|
2578
|
+
var SidebarMenuSubButtonBase = React22.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
2579
|
+
const Comp = asChild ? Slot4 : "a";
|
|
2580
|
+
return /* @__PURE__ */ jsx31(
|
|
2581
|
+
Comp,
|
|
2582
|
+
{
|
|
2583
|
+
ref,
|
|
2584
|
+
"data-sidebar": "menu-sub-button",
|
|
2585
|
+
"data-size": size,
|
|
2586
|
+
"data-active": isActive,
|
|
2587
|
+
className: cn(
|
|
2588
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
2589
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
2590
|
+
size === "sm" && "text-xs",
|
|
2591
|
+
size === "md" && "text-sm",
|
|
2592
|
+
"group-data-[collapsible=icon]:hidden",
|
|
2593
|
+
className
|
|
2594
|
+
),
|
|
2595
|
+
...props
|
|
2596
|
+
}
|
|
2597
|
+
);
|
|
2598
|
+
});
|
|
2599
|
+
SidebarMenuSubButtonBase.displayName = "SidebarMenuSubButtonBase";
|
|
2600
|
+
|
|
2601
|
+
// src/components/ui/SliderBase.tsx
|
|
2602
|
+
import * as React23 from "react";
|
|
2603
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
2604
|
+
import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2605
|
+
var SlideBase = React23.forwardRef(
|
|
2606
|
+
({
|
|
2607
|
+
className,
|
|
2608
|
+
orientation = "horizontal",
|
|
2609
|
+
label,
|
|
2610
|
+
leftIcon,
|
|
2611
|
+
rightIcon,
|
|
2612
|
+
...props
|
|
2613
|
+
}, ref) => {
|
|
2614
|
+
const isVertical = orientation === "vertical";
|
|
2615
|
+
return /* @__PURE__ */ jsxs18(
|
|
2616
|
+
"div",
|
|
2617
|
+
{
|
|
2618
|
+
className: cn(
|
|
2619
|
+
"flex flex-col gap-1",
|
|
2620
|
+
isVertical ? "h-full " : "w-full"
|
|
2621
|
+
),
|
|
2622
|
+
children: [
|
|
2623
|
+
label && /* @__PURE__ */ jsx32(LabelBase_default, { className: "py-2", children: label }),
|
|
2624
|
+
/* @__PURE__ */ jsxs18(
|
|
2625
|
+
"div",
|
|
2626
|
+
{
|
|
2627
|
+
className: cn(
|
|
2628
|
+
"flex gap-2",
|
|
2629
|
+
isVertical ? "flex-col h-full" : "flex-row items-center w-full"
|
|
2630
|
+
),
|
|
2631
|
+
children: [
|
|
2632
|
+
leftIcon && /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center", children: leftIcon }),
|
|
2633
|
+
/* @__PURE__ */ jsxs18(
|
|
2634
|
+
SliderPrimitive.Root,
|
|
2635
|
+
{
|
|
2636
|
+
ref,
|
|
2637
|
+
orientation,
|
|
2638
|
+
className: cn(
|
|
2639
|
+
"relative flex touch-none select-none items-center",
|
|
2640
|
+
isVertical ? "flex-col h-full" : "flex-row w-full",
|
|
2641
|
+
className
|
|
2642
|
+
),
|
|
2643
|
+
...props,
|
|
2644
|
+
children: [
|
|
2645
|
+
/* @__PURE__ */ jsx32(
|
|
2646
|
+
SliderPrimitive.Track,
|
|
2647
|
+
{
|
|
2648
|
+
className: cn(
|
|
2649
|
+
"relative overflow-hidden bg-primary/20 rounded-full",
|
|
2650
|
+
isVertical ? "w-1.5 h-full" : "h-1.5 w-full"
|
|
2651
|
+
),
|
|
2652
|
+
children: /* @__PURE__ */ jsx32(
|
|
2653
|
+
SliderPrimitive.Range,
|
|
2654
|
+
{
|
|
2655
|
+
className: cn(
|
|
2656
|
+
"absolute bg-primary",
|
|
2657
|
+
isVertical ? "w-full" : "h-full"
|
|
2658
|
+
)
|
|
2659
|
+
}
|
|
2660
|
+
)
|
|
2661
|
+
}
|
|
2662
|
+
),
|
|
2663
|
+
/* @__PURE__ */ jsx32(
|
|
2664
|
+
SliderPrimitive.Thumb,
|
|
2665
|
+
{
|
|
2666
|
+
className: cn(
|
|
2667
|
+
"block h-4 w-4 rounded-full border border-primary/70 bg-background shadow-md transition-transform",
|
|
2668
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
2669
|
+
"hover:scale-125 active:scale-125"
|
|
2670
|
+
)
|
|
2671
|
+
}
|
|
2672
|
+
)
|
|
2673
|
+
]
|
|
2674
|
+
}
|
|
2675
|
+
),
|
|
2676
|
+
rightIcon && /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-center", children: rightIcon })
|
|
2677
|
+
]
|
|
2678
|
+
}
|
|
2679
|
+
)
|
|
2680
|
+
]
|
|
2681
|
+
}
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2684
|
+
);
|
|
2685
|
+
SlideBase.displayName = "SlideBase";
|
|
2686
|
+
|
|
2687
|
+
// src/components/ui/SonnerBase.tsx
|
|
2688
|
+
import { useTheme as useTheme2 } from "next-themes";
|
|
2689
|
+
import { Toaster as Sonner } from "sonner";
|
|
2690
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2691
|
+
var Toaster = ({ ...props }) => {
|
|
2692
|
+
const { theme = "system" } = useTheme2();
|
|
2693
|
+
return /* @__PURE__ */ jsx33(
|
|
2694
|
+
Sonner,
|
|
2695
|
+
{
|
|
2696
|
+
theme,
|
|
2697
|
+
className: "toaster group",
|
|
2698
|
+
toastOptions: {
|
|
2699
|
+
classNames: {
|
|
2700
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
2701
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
2702
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
2703
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
2704
|
+
}
|
|
2705
|
+
},
|
|
2706
|
+
...props
|
|
2707
|
+
}
|
|
2708
|
+
);
|
|
2709
|
+
};
|
|
2710
|
+
|
|
2711
|
+
// src/components/ui/SwitchBase.tsx
|
|
2712
|
+
import * as React24 from "react";
|
|
2713
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
2714
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2715
|
+
var SwitchBase = React24.forwardRef(({ className, ...props }, ref) => {
|
|
2716
|
+
return /* @__PURE__ */ jsx34(
|
|
2717
|
+
SwitchPrimitives.Root,
|
|
2718
|
+
{
|
|
2719
|
+
...props,
|
|
2720
|
+
ref,
|
|
2721
|
+
className: cn(
|
|
2722
|
+
"peer relative inline-flex h-[16px] w-12 cursor-pointer items-center rounded-full border-2 border-transparent shadow-md transition-colors duration-300 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input data-[state=checked]:shadow-[0_0_15px_4px_var(--tw-shadow-color)] data-[state=checked]:shadow-primary/30",
|
|
2723
|
+
className
|
|
2724
|
+
),
|
|
2725
|
+
children: /* @__PURE__ */ jsx34(
|
|
2726
|
+
SwitchPrimitives.Thumb,
|
|
2727
|
+
{
|
|
2728
|
+
className: cn(
|
|
2729
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-xl ring-0 transition-transform duration-350 ease-out peer-focus:shadow-lg peer-focus:ring-2 peer-focus:ring-primary/70 data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-7 data-[state=checked]:animate-bounce-thumb"
|
|
2730
|
+
),
|
|
2731
|
+
style: {
|
|
2732
|
+
transformOrigin: "center",
|
|
2733
|
+
transition: "transform 350ms cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
)
|
|
2737
|
+
}
|
|
2738
|
+
);
|
|
2739
|
+
});
|
|
2740
|
+
SwitchBase.displayName = SwitchPrimitives.Root.displayName;
|
|
2741
|
+
|
|
2742
|
+
// src/components/ui/TableBase.tsx
|
|
2743
|
+
import * as React25 from "react";
|
|
2744
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2745
|
+
var TableBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx35(
|
|
2746
|
+
"table",
|
|
2747
|
+
{
|
|
2748
|
+
ref,
|
|
2749
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
2750
|
+
...props
|
|
2751
|
+
}
|
|
2752
|
+
) }));
|
|
2753
|
+
TableBase.displayName = "TableBase";
|
|
2754
|
+
var TableHeaderBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2755
|
+
TableHeaderBase.displayName = "TableHeaderBase";
|
|
2756
|
+
var TableBodyBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2757
|
+
"tbody",
|
|
2758
|
+
{
|
|
2759
|
+
ref,
|
|
2760
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
2761
|
+
...props
|
|
2762
|
+
}
|
|
2763
|
+
));
|
|
2764
|
+
TableBodyBase.displayName = "TableBodyBase";
|
|
2765
|
+
var TableFooterBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2766
|
+
"tfoot",
|
|
2767
|
+
{
|
|
2768
|
+
ref,
|
|
2769
|
+
className: cn(
|
|
2770
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
2771
|
+
className
|
|
2772
|
+
),
|
|
2773
|
+
...props
|
|
2774
|
+
}
|
|
2775
|
+
));
|
|
2776
|
+
TableFooterBase.displayName = "TableFooterBase";
|
|
2777
|
+
var TableRowBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2778
|
+
"tr",
|
|
2779
|
+
{
|
|
2780
|
+
ref,
|
|
2781
|
+
className: cn(
|
|
2782
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
2783
|
+
className
|
|
2784
|
+
),
|
|
2785
|
+
...props
|
|
2786
|
+
}
|
|
2787
|
+
));
|
|
2788
|
+
TableRowBase.displayName = "TableRowBase";
|
|
2789
|
+
var TableHeadBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2790
|
+
"th",
|
|
2791
|
+
{
|
|
2792
|
+
ref,
|
|
2793
|
+
className: cn(
|
|
2794
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2795
|
+
className
|
|
2796
|
+
),
|
|
2797
|
+
...props
|
|
2798
|
+
}
|
|
2799
|
+
));
|
|
2800
|
+
TableHeadBase.displayName = "TableHeadBase";
|
|
2801
|
+
var TableCellBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2802
|
+
"td",
|
|
2803
|
+
{
|
|
2804
|
+
ref,
|
|
2805
|
+
className: cn(
|
|
2806
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2807
|
+
className
|
|
2808
|
+
),
|
|
2809
|
+
...props
|
|
2810
|
+
}
|
|
2811
|
+
));
|
|
2812
|
+
TableCellBase.displayName = "TableCellBase";
|
|
2813
|
+
var TableCaptionBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
2814
|
+
"caption",
|
|
2815
|
+
{
|
|
2816
|
+
ref,
|
|
2817
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
2818
|
+
...props
|
|
2819
|
+
}
|
|
2820
|
+
));
|
|
2821
|
+
TableCaptionBase.displayName = "TableCaptionBase";
|
|
2822
|
+
|
|
2823
|
+
// src/components/ui/TabsBase.tsx
|
|
2824
|
+
import * as React26 from "react";
|
|
2825
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2826
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2827
|
+
var TabsBase = TabsPrimitive.Root;
|
|
2828
|
+
var TabsListBase = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2829
|
+
TabsPrimitive.List,
|
|
2830
|
+
{
|
|
2831
|
+
ref,
|
|
2832
|
+
className: cn(
|
|
2833
|
+
"relative flex w-full items-center justify-start gap-4 border-b-2 border-border",
|
|
2834
|
+
className
|
|
2835
|
+
),
|
|
2836
|
+
...props
|
|
2837
|
+
}
|
|
2838
|
+
));
|
|
2839
|
+
TabsListBase.displayName = TabsPrimitive.List.displayName;
|
|
2840
|
+
var TabsTriggerBase = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2841
|
+
TabsPrimitive.Trigger,
|
|
2842
|
+
{
|
|
2843
|
+
ref,
|
|
2844
|
+
className: cn(
|
|
2845
|
+
"relative inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm font-medium transition-colors",
|
|
2846
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-3",
|
|
2847
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
2848
|
+
"data-[state=active]:text-primary",
|
|
2849
|
+
"after:absolute after:bottom-0 after:left-0 after:h-[1.5px] after:w-full",
|
|
2850
|
+
"after:scale-x-0 after:bg-primary after:origin-left",
|
|
2851
|
+
"after:transition-transform after:duration-300 after:ease-[cubic-bezier(0.65,0,0.35,1)]",
|
|
2852
|
+
"data-[state=active]:after:scale-x-100",
|
|
2853
|
+
className
|
|
2854
|
+
),
|
|
2855
|
+
...props
|
|
2856
|
+
}
|
|
2857
|
+
));
|
|
2858
|
+
var TabsContentBase = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
2859
|
+
TabsPrimitive.Content,
|
|
2860
|
+
{
|
|
2861
|
+
ref,
|
|
2862
|
+
className: cn(
|
|
2863
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2864
|
+
"animate-fade-in",
|
|
2865
|
+
className
|
|
2866
|
+
),
|
|
2867
|
+
...props
|
|
2868
|
+
}
|
|
2869
|
+
));
|
|
2870
|
+
TabsContentBase.displayName = TabsPrimitive.Content.displayName;
|
|
2871
|
+
|
|
2872
|
+
// src/components/ui/TextAreaBase.tsx
|
|
2873
|
+
import * as React27 from "react";
|
|
2874
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2875
|
+
var TextAreaBase = React27.forwardRef(({ className, ...props }, ref) => {
|
|
2876
|
+
return /* @__PURE__ */ jsx37(
|
|
2877
|
+
"textarea",
|
|
2878
|
+
{
|
|
2879
|
+
className: cn(
|
|
2880
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2881
|
+
className
|
|
2882
|
+
),
|
|
2883
|
+
ref,
|
|
2884
|
+
...props
|
|
2885
|
+
}
|
|
2886
|
+
);
|
|
2887
|
+
});
|
|
2888
|
+
TextAreaBase.displayName = "TextAreaBase";
|
|
2889
|
+
|
|
2890
|
+
// src/utils/stringHelpers.ts
|
|
2891
|
+
var cleanString = (str) => str.toString().trim().replace(/[^a-zA-Z0-9\s]/g, "").toLowerCase();
|
|
2892
|
+
function includes(input, query) {
|
|
2893
|
+
return cleanString(input).includes(cleanString(query));
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
// src/components/filter/services/apply-filter.ts
|
|
2897
|
+
function applyfilter({
|
|
2898
|
+
condition,
|
|
2899
|
+
filterValue,
|
|
2900
|
+
valueType,
|
|
2901
|
+
value
|
|
2902
|
+
}) {
|
|
2903
|
+
if (!valueType || value === void 0) return true;
|
|
2904
|
+
if (valueType === "string") {
|
|
2905
|
+
if (!filterValue) return true;
|
|
2906
|
+
switch (condition) {
|
|
2907
|
+
case "$eq":
|
|
2908
|
+
return value === filterValue;
|
|
2909
|
+
case "$startsWith":
|
|
2910
|
+
return cleanString(value).startsWith(cleanString(filterValue));
|
|
2911
|
+
case "$endsWith":
|
|
2912
|
+
return cleanString(value).endsWith(cleanString(filterValue));
|
|
2913
|
+
case "$contains":
|
|
2914
|
+
return includes(value, String(filterValue));
|
|
2915
|
+
default:
|
|
2916
|
+
return false;
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
if (valueType === "boolean") {
|
|
2920
|
+
switch (condition) {
|
|
2921
|
+
case "$exists":
|
|
2922
|
+
return Boolean(value) === true;
|
|
2923
|
+
case "$notExists":
|
|
2924
|
+
return Boolean(value) === false;
|
|
2925
|
+
default:
|
|
2926
|
+
return false;
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
if (valueType === "select") {
|
|
2930
|
+
if (!filterValue) return true;
|
|
2931
|
+
switch (condition) {
|
|
2932
|
+
case "$eq":
|
|
2933
|
+
return cleanString(value) === cleanString(filterValue);
|
|
2934
|
+
case "$ne":
|
|
2935
|
+
return cleanString(value) !== cleanString(filterValue);
|
|
2936
|
+
default:
|
|
2937
|
+
return false;
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
if (valueType === "multi-select") {
|
|
2941
|
+
if (!filterValue || !Array.isArray(filterValue)) return true;
|
|
2942
|
+
const filterValues = filterValue.map((value2) => cleanString(value2));
|
|
2943
|
+
switch (condition) {
|
|
2944
|
+
case "$eq":
|
|
2945
|
+
return filterValues.includes(cleanString(value));
|
|
2946
|
+
case "$ne":
|
|
2947
|
+
return !filterValues.includes(cleanString(value));
|
|
2948
|
+
default:
|
|
2949
|
+
return false;
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
|
|
2954
|
+
// src/components/filter/services/default-conditions.ts
|
|
2955
|
+
var defaultStringConditions = [
|
|
2956
|
+
{
|
|
2957
|
+
conditionId: "$contains",
|
|
2958
|
+
conditionName: "cont\xE9m",
|
|
2959
|
+
valueType: "string"
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
conditionId: "$startsWith",
|
|
2963
|
+
conditionName: "come\xE7a com",
|
|
2964
|
+
valueType: "string"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
conditionId: "$endsWith",
|
|
2968
|
+
conditionName: "termina com",
|
|
2969
|
+
valueType: "string"
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
conditionId: "$eq",
|
|
2973
|
+
conditionName: "\xE9 igual a",
|
|
2974
|
+
valueType: "string"
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
conditionId: "$ne",
|
|
2978
|
+
conditionName: "n\xE3o \xE9 igual a",
|
|
2979
|
+
valueType: "string"
|
|
2980
|
+
}
|
|
2981
|
+
];
|
|
2982
|
+
|
|
2983
|
+
// src/components/filter/utils/build-summary.ts
|
|
2984
|
+
function buildFilterSummary(filter, availableFilters) {
|
|
2985
|
+
if (!filter) return null;
|
|
2986
|
+
const foundFilter = availableFilters.find((f) => f.filterId == filter.id);
|
|
2987
|
+
if (!foundFilter) return null;
|
|
2988
|
+
const foundCondition = foundFilter.conditions.find(
|
|
2989
|
+
(c) => c.conditionId == filter.conditionId
|
|
2990
|
+
);
|
|
2991
|
+
if (!foundCondition) return null;
|
|
2992
|
+
if (filter.conditionId === "$exists" || filter.conditionId === "$notExists") {
|
|
2993
|
+
return `${foundFilter.filterName} ${foundCondition.conditionName}`;
|
|
2994
|
+
}
|
|
2995
|
+
if (!filter.value) return null;
|
|
2996
|
+
let value = filter.value.toString();
|
|
2997
|
+
switch (foundCondition.valueType) {
|
|
2998
|
+
case "select": {
|
|
2999
|
+
const selected = foundCondition.selectValues?.find(
|
|
3000
|
+
(s) => s.value == filter.value
|
|
3001
|
+
);
|
|
3002
|
+
if (selected) {
|
|
3003
|
+
value = selected.label;
|
|
3004
|
+
}
|
|
3005
|
+
break;
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
return `${foundFilter.filterName} ${foundCondition.conditionName} '${value}'`;
|
|
3009
|
+
}
|
|
3010
|
+
export {
|
|
3011
|
+
AlertDialogActionBase,
|
|
3012
|
+
AlertDialogBase,
|
|
3013
|
+
AlertDialogCancelBase,
|
|
3014
|
+
AlertDialogContentBase,
|
|
3015
|
+
AlertDialogDescriptionBase,
|
|
3016
|
+
AlertDialogFooterBase,
|
|
3017
|
+
AlertDialogHeaderBase,
|
|
3018
|
+
AlertDialogOverlayBase,
|
|
3019
|
+
AlertDialogPortalBase,
|
|
3020
|
+
AlertDialogTitleBase,
|
|
3021
|
+
AlertDialogTriggerBase,
|
|
3022
|
+
AvatarBase,
|
|
3023
|
+
AvatarFallbackBase,
|
|
3024
|
+
AvatarImageBase,
|
|
3025
|
+
ButtonBase,
|
|
3026
|
+
CalendarBase2 as CalendarBase,
|
|
3027
|
+
CardBase,
|
|
3028
|
+
CardContentBase,
|
|
3029
|
+
CardDescriptionBase,
|
|
3030
|
+
CardFooterBase,
|
|
3031
|
+
CardHeaderBase,
|
|
3032
|
+
CardTitleBase,
|
|
3033
|
+
CheckboxBase,
|
|
3034
|
+
Combobox,
|
|
3035
|
+
CommandBase,
|
|
3036
|
+
CommandDialogBase,
|
|
3037
|
+
CommandEmptyBase,
|
|
3038
|
+
CommandGroupBase,
|
|
3039
|
+
CommandInputBase,
|
|
3040
|
+
CommandItemBase,
|
|
3041
|
+
CommandListBase,
|
|
3042
|
+
CommandSeparatorBase,
|
|
3043
|
+
CommandShortcutBase,
|
|
3044
|
+
DateTimePicker,
|
|
3045
|
+
DialogBase,
|
|
3046
|
+
DialogCloseBase,
|
|
3047
|
+
DialogContentBase,
|
|
3048
|
+
DialogDescriptionBase,
|
|
3049
|
+
DialogFooterBase,
|
|
3050
|
+
DialogHeaderBase,
|
|
3051
|
+
DialogOverlayBase,
|
|
3052
|
+
DialogPortalBase,
|
|
3053
|
+
DialogTitleBase,
|
|
3054
|
+
DialogTriggerBase,
|
|
3055
|
+
DropDownMenuBase,
|
|
3056
|
+
DropDownMenuCheckboxItemBase,
|
|
3057
|
+
DropDownMenuContentBase,
|
|
3058
|
+
DropDownMenuGroupBase,
|
|
3059
|
+
DropDownMenuItemBase,
|
|
3060
|
+
DropDownMenuLabelBase,
|
|
3061
|
+
DropDownMenuPortalBase,
|
|
3062
|
+
DropDownMenuRadioGroupBase,
|
|
3063
|
+
DropDownMenuRadioItemBase,
|
|
3064
|
+
DropDownMenuSeparatorBase,
|
|
3065
|
+
DropDownMenuShortcutBase,
|
|
3066
|
+
DropDownMenuSubBase,
|
|
3067
|
+
DropDownMenuSubContentBase,
|
|
3068
|
+
DropDownMenuSubTriggerBase,
|
|
3069
|
+
DropDownMenuTriggerBase,
|
|
3070
|
+
FormBase,
|
|
3071
|
+
FormControlBase,
|
|
3072
|
+
FormDescriptionBase,
|
|
3073
|
+
FormFieldBase,
|
|
3074
|
+
FormItemBase,
|
|
3075
|
+
FormLabelBase,
|
|
3076
|
+
FormMessageBase,
|
|
3077
|
+
InputBase,
|
|
3078
|
+
LabelBase_default as LabelBase,
|
|
3079
|
+
ModeToggleBase,
|
|
3080
|
+
MultiCombobox,
|
|
3081
|
+
PopoverAnchorBase,
|
|
3082
|
+
PopoverBase,
|
|
3083
|
+
PopoverContentBase,
|
|
3084
|
+
PopoverTriggerBase,
|
|
3085
|
+
ProgressBase,
|
|
3086
|
+
ScrollAreaBase,
|
|
3087
|
+
ScrollBarBase,
|
|
3088
|
+
Select,
|
|
3089
|
+
SelectBase,
|
|
3090
|
+
SelectContentBase,
|
|
3091
|
+
SelectGroupBase,
|
|
3092
|
+
SelectItemBase,
|
|
3093
|
+
SelectLabelBase,
|
|
3094
|
+
SelectScrollDownButtonBase,
|
|
3095
|
+
SelectScrollUpButtonBase,
|
|
3096
|
+
SelectSeparatorBase,
|
|
3097
|
+
SelectTriggerBase,
|
|
3098
|
+
SelectValueBase,
|
|
3099
|
+
SeparatorBase,
|
|
3100
|
+
SheetBase,
|
|
3101
|
+
SheetCloseBase,
|
|
3102
|
+
SheetContentBase,
|
|
3103
|
+
SheetDescriptionBase,
|
|
3104
|
+
SheetFooterBase,
|
|
3105
|
+
SheetHeaderBase,
|
|
3106
|
+
SheetOverlayBase,
|
|
3107
|
+
SheetPortalBase,
|
|
3108
|
+
SheetTitleBase,
|
|
3109
|
+
SheetTriggerBase,
|
|
3110
|
+
SidebarBase,
|
|
3111
|
+
SidebarContentBase,
|
|
3112
|
+
SidebarFooterBase,
|
|
3113
|
+
SidebarGroupActionBase,
|
|
3114
|
+
SidebarGroupBase,
|
|
3115
|
+
SidebarGroupContentBase,
|
|
3116
|
+
SidebarGroupLabelBase,
|
|
3117
|
+
SidebarHeaderBase,
|
|
3118
|
+
SidebarInputBase,
|
|
3119
|
+
SidebarInsetBase,
|
|
3120
|
+
SidebarMenuActionBase,
|
|
3121
|
+
SidebarMenuBadgeBase,
|
|
3122
|
+
SidebarMenuBase,
|
|
3123
|
+
SidebarMenuButtonBase,
|
|
3124
|
+
SidebarMenuItemBase,
|
|
3125
|
+
SidebarMenuSkeletonBase,
|
|
3126
|
+
SidebarMenuSubBase,
|
|
3127
|
+
SidebarMenuSubButtonBase,
|
|
3128
|
+
SidebarMenuSubItemBase,
|
|
3129
|
+
SidebarProviderBase,
|
|
3130
|
+
SidebarRailBase,
|
|
3131
|
+
SidebarSeparatorBase,
|
|
3132
|
+
SidebarTriggerBase,
|
|
3133
|
+
SkeletonBase,
|
|
3134
|
+
SlideBase,
|
|
3135
|
+
SwitchBase,
|
|
3136
|
+
TableBase,
|
|
3137
|
+
TableBodyBase,
|
|
3138
|
+
TableCaptionBase,
|
|
3139
|
+
TableCellBase,
|
|
3140
|
+
TableFooterBase,
|
|
3141
|
+
TableHeadBase,
|
|
3142
|
+
TableHeaderBase,
|
|
3143
|
+
TableRowBase,
|
|
3144
|
+
TabsBase,
|
|
3145
|
+
TabsContentBase,
|
|
3146
|
+
TabsListBase,
|
|
3147
|
+
TabsTriggerBase,
|
|
3148
|
+
TextAreaBase,
|
|
3149
|
+
ThemeProviderBase,
|
|
3150
|
+
TimePicker,
|
|
3151
|
+
TimePickerInput,
|
|
3152
|
+
Toaster,
|
|
3153
|
+
TooltipBase,
|
|
3154
|
+
TooltipContentBase,
|
|
3155
|
+
TooltipProviderBase,
|
|
3156
|
+
TooltipTriggerBase,
|
|
3157
|
+
UseSideBarBase,
|
|
3158
|
+
applyfilter,
|
|
3159
|
+
buildFilterSummary,
|
|
3160
|
+
buttonVariantsBase,
|
|
3161
|
+
defaultStringConditions,
|
|
3162
|
+
useFormFieldBase,
|
|
3163
|
+
useIsMobile,
|
|
3164
|
+
useTheme
|
|
3165
|
+
};
|