@pos-360/horizon 0.1.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/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/animated-icons.d.mts +54 -0
- package/dist/animated-icons.d.ts +54 -0
- package/dist/animated-icons.js +28 -0
- package/dist/animated-icons.js.map +1 -0
- package/dist/animated-icons.mjs +3 -0
- package/dist/animated-icons.mjs.map +1 -0
- package/dist/chunk-2B2BWI5A.mjs +324 -0
- package/dist/chunk-2B2BWI5A.mjs.map +1 -0
- package/dist/chunk-6YAK6HNR.mjs +471 -0
- package/dist/chunk-6YAK6HNR.mjs.map +1 -0
- package/dist/chunk-7LVVOCBV.mjs +977 -0
- package/dist/chunk-7LVVOCBV.mjs.map +1 -0
- package/dist/chunk-AA25LTS4.js +4 -0
- package/dist/chunk-AA25LTS4.js.map +1 -0
- package/dist/chunk-J6RXKZE5.js +1080 -0
- package/dist/chunk-J6RXKZE5.js.map +1 -0
- package/dist/chunk-R5HAFV6M.js +350 -0
- package/dist/chunk-R5HAFV6M.js.map +1 -0
- package/dist/chunk-Y6G4VKJ3.mjs +3 -0
- package/dist/chunk-Y6G4VKJ3.mjs.map +1 -0
- package/dist/chunk-ZD6CMWPW.js +476 -0
- package/dist/chunk-ZD6CMWPW.js.map +1 -0
- package/dist/enhanced.d.mts +81 -0
- package/dist/enhanced.d.ts +81 -0
- package/dist/enhanced.js +24 -0
- package/dist/enhanced.js.map +1 -0
- package/dist/enhanced.mjs +3 -0
- package/dist/enhanced.mjs.map +1 -0
- package/dist/hooks.d.mts +2 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +6 -0
- package/dist/hooks.js.map +1 -0
- package/dist/hooks.mjs +3 -0
- package/dist/hooks.mjs.map +1 -0
- package/dist/index.d.mts +25 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.js +351 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -0
- package/dist/primitives.d.mts +168 -0
- package/dist/primitives.d.ts +168 -0
- package/dist/primitives.js +308 -0
- package/dist/primitives.js.map +1 -0
- package/dist/primitives.mjs +3 -0
- package/dist/primitives.mjs.map +1 -0
- package/dist/tailwind.d.mts +104 -0
- package/dist/tailwind.d.ts +104 -0
- package/dist/tailwind.js +75 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/tailwind.mjs +73 -0
- package/dist/tailwind.mjs.map +1 -0
- package/package.json +103 -0
- package/tailwind.config.js +105 -0
|
@@ -0,0 +1,977 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
import * as React9 from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
|
+
import { Check, X, ChevronRight, Circle, ChevronDown, ChevronUp } from 'lucide-react';
|
|
9
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
11
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
12
|
+
import { AnimatePresence, motion } from 'framer-motion';
|
|
13
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
14
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
15
|
+
|
|
16
|
+
function cn(...inputs) {
|
|
17
|
+
return twMerge(clsx(inputs));
|
|
18
|
+
}
|
|
19
|
+
var buttonVariants = cva(
|
|
20
|
+
"group inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: "bg-blue-600 text-white shadow hover:bg-blue-700 active:bg-blue-800",
|
|
25
|
+
destructive: "bg-red-600 text-white shadow-sm hover:bg-red-700 active:bg-red-800",
|
|
26
|
+
outline: "border border-gray-300 bg-white text-gray-700 shadow-sm hover:bg-gray-50 hover:text-gray-900 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-200 dark:hover:bg-neutral-700",
|
|
27
|
+
secondary: "bg-gray-100 text-gray-900 shadow-sm hover:bg-gray-200 dark:bg-neutral-700 dark:text-gray-100 dark:hover:bg-neutral-600",
|
|
28
|
+
ghost: "text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-neutral-800 dark:hover:text-gray-100",
|
|
29
|
+
link: "text-blue-600 underline-offset-4 hover:underline dark:text-blue-400"
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
default: "h-9 px-4 py-2",
|
|
33
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
34
|
+
lg: "h-10 rounded-md px-8",
|
|
35
|
+
icon: "h-9 w-9"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: "default",
|
|
40
|
+
size: "default"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
var Button = React9.forwardRef(
|
|
45
|
+
({
|
|
46
|
+
className,
|
|
47
|
+
variant,
|
|
48
|
+
size,
|
|
49
|
+
asChild = false,
|
|
50
|
+
leadingDecorator,
|
|
51
|
+
trailingDecorator,
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}, ref) => {
|
|
55
|
+
const Comp = asChild ? Slot : "button";
|
|
56
|
+
if (asChild) {
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
Comp,
|
|
59
|
+
{
|
|
60
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
61
|
+
ref,
|
|
62
|
+
...props,
|
|
63
|
+
children
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
const hasDecorator = leadingDecorator || trailingDecorator;
|
|
68
|
+
return /* @__PURE__ */ jsxs(
|
|
69
|
+
Comp,
|
|
70
|
+
{
|
|
71
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
72
|
+
ref,
|
|
73
|
+
...props,
|
|
74
|
+
children: [
|
|
75
|
+
leadingDecorator && /* @__PURE__ */ jsx("span", { className: "shrink-0 transition-transform duration-200 group-hover:-translate-x-0.5", children: leadingDecorator }),
|
|
76
|
+
hasDecorator ? /* @__PURE__ */ jsx("span", { children }) : children,
|
|
77
|
+
trailingDecorator && /* @__PURE__ */ jsx("span", { className: "shrink-0 transition-transform duration-200 group-hover:translate-x-0.5", children: trailingDecorator })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
Button.displayName = "Button";
|
|
84
|
+
var badgeVariants = cva(
|
|
85
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
86
|
+
{
|
|
87
|
+
variants: {
|
|
88
|
+
variant: {
|
|
89
|
+
default: "border-transparent bg-blue-600 text-white hover:bg-blue-700",
|
|
90
|
+
secondary: "border-transparent bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-neutral-700 dark:text-gray-100 dark:hover:bg-neutral-600",
|
|
91
|
+
destructive: "border-transparent bg-red-600 text-white hover:bg-red-700",
|
|
92
|
+
outline: "border-gray-300 text-gray-700 dark:border-neutral-600 dark:text-gray-300",
|
|
93
|
+
success: "border-transparent bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
|
|
94
|
+
warning: "border-transparent bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
|
|
95
|
+
info: "border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",
|
|
96
|
+
purple: "border-transparent bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400",
|
|
97
|
+
purpleOutline: "border-purple-300 dark:border-purple-600 bg-transparent text-purple-700 dark:text-purple-300 hover:bg-purple-50 dark:hover:bg-purple-900/20"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
defaultVariants: {
|
|
101
|
+
variant: "default"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
function Badge({ className, variant, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
107
|
+
}
|
|
108
|
+
var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
ref,
|
|
112
|
+
className: cn(
|
|
113
|
+
"rounded-lg border border-gray-200 bg-white text-gray-900 shadow dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-100",
|
|
114
|
+
className
|
|
115
|
+
),
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
));
|
|
119
|
+
Card.displayName = "Card";
|
|
120
|
+
var CardHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
ref,
|
|
124
|
+
className: cn("flex flex-col space-y-1.5 p-4", className),
|
|
125
|
+
...props
|
|
126
|
+
}
|
|
127
|
+
));
|
|
128
|
+
CardHeader.displayName = "CardHeader";
|
|
129
|
+
var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
130
|
+
"div",
|
|
131
|
+
{
|
|
132
|
+
ref,
|
|
133
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
134
|
+
...props
|
|
135
|
+
}
|
|
136
|
+
));
|
|
137
|
+
CardTitle.displayName = "CardTitle";
|
|
138
|
+
var CardDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
ref,
|
|
142
|
+
className: cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
));
|
|
146
|
+
CardDescription.displayName = "CardDescription";
|
|
147
|
+
var CardContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
ref,
|
|
151
|
+
className: cn("sm:p-6 p-4 sm:pt-0 pt-0", className),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
));
|
|
155
|
+
CardContent.displayName = "CardContent";
|
|
156
|
+
var CardFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
ref,
|
|
160
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
161
|
+
...props
|
|
162
|
+
}
|
|
163
|
+
));
|
|
164
|
+
CardFooter.displayName = "CardFooter";
|
|
165
|
+
var Checkbox = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
166
|
+
CheckboxPrimitive.Root,
|
|
167
|
+
{
|
|
168
|
+
ref,
|
|
169
|
+
className: cn(
|
|
170
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-gray-300 shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 data-[state=checked]:text-white dark:border-neutral-600 dark:data-[state=checked]:bg-blue-600",
|
|
171
|
+
className
|
|
172
|
+
),
|
|
173
|
+
...props,
|
|
174
|
+
children: /* @__PURE__ */ jsx(
|
|
175
|
+
CheckboxPrimitive.Indicator,
|
|
176
|
+
{
|
|
177
|
+
className: cn("flex items-center justify-center text-current"),
|
|
178
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5", strokeWidth: 3 })
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
));
|
|
183
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
184
|
+
var Dialog = DialogPrimitive.Root;
|
|
185
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
186
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
187
|
+
var DialogClose = DialogPrimitive.Close;
|
|
188
|
+
var DialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
189
|
+
DialogPrimitive.Overlay,
|
|
190
|
+
{
|
|
191
|
+
ref,
|
|
192
|
+
className: cn(
|
|
193
|
+
"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",
|
|
194
|
+
className
|
|
195
|
+
),
|
|
196
|
+
...props
|
|
197
|
+
}
|
|
198
|
+
));
|
|
199
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
200
|
+
var DialogContent = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
201
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
202
|
+
/* @__PURE__ */ jsxs(
|
|
203
|
+
DialogPrimitive.Content,
|
|
204
|
+
{
|
|
205
|
+
ref,
|
|
206
|
+
className: cn(
|
|
207
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white 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 dark:border-neutral-700 dark:bg-neutral-800",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props,
|
|
211
|
+
children: [
|
|
212
|
+
children,
|
|
213
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 dark:focus:ring-offset-gray-800 dark:data-[state=open]:bg-gray-700 dark:data-[state=open]:text-gray-400", children: [
|
|
214
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
215
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
216
|
+
] })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] }));
|
|
221
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
222
|
+
var DialogHeader = ({
|
|
223
|
+
className,
|
|
224
|
+
...props
|
|
225
|
+
}) => /* @__PURE__ */ jsx(
|
|
226
|
+
"div",
|
|
227
|
+
{
|
|
228
|
+
className: cn(
|
|
229
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
230
|
+
className
|
|
231
|
+
),
|
|
232
|
+
...props
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
DialogHeader.displayName = "DialogHeader";
|
|
236
|
+
var DialogFooter = ({
|
|
237
|
+
className,
|
|
238
|
+
...props
|
|
239
|
+
}) => /* @__PURE__ */ jsx(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
className: cn(
|
|
243
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
244
|
+
className
|
|
245
|
+
),
|
|
246
|
+
...props
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
DialogFooter.displayName = "DialogFooter";
|
|
250
|
+
var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
251
|
+
DialogPrimitive.Title,
|
|
252
|
+
{
|
|
253
|
+
ref,
|
|
254
|
+
className: cn(
|
|
255
|
+
"text-lg font-semibold leading-none tracking-tight text-gray-900 dark:text-gray-100",
|
|
256
|
+
className
|
|
257
|
+
),
|
|
258
|
+
...props
|
|
259
|
+
}
|
|
260
|
+
));
|
|
261
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
262
|
+
var DialogDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
263
|
+
DialogPrimitive.Description,
|
|
264
|
+
{
|
|
265
|
+
ref,
|
|
266
|
+
className: cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
267
|
+
...props
|
|
268
|
+
}
|
|
269
|
+
));
|
|
270
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
271
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
272
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
273
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
274
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
275
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
276
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
277
|
+
var DropdownMenuSubTrigger = React9.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
278
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
279
|
+
{
|
|
280
|
+
ref,
|
|
281
|
+
className: cn(
|
|
282
|
+
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-gray-100 data-[state=open]:bg-gray-100 dark:focus:bg-gray-700 dark:data-[state=open]:bg-gray-700 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
283
|
+
inset && "pl-8",
|
|
284
|
+
className
|
|
285
|
+
),
|
|
286
|
+
...props,
|
|
287
|
+
children: [
|
|
288
|
+
children,
|
|
289
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto" })
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
));
|
|
293
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
294
|
+
var DropdownMenuSubContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
295
|
+
DropdownMenuPrimitive.SubContent,
|
|
296
|
+
{
|
|
297
|
+
ref,
|
|
298
|
+
className: cn(
|
|
299
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-gray-200 bg-white p-1 text-gray-900 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 origin-[--radix-dropdown-menu-content-transform-origin] dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-100",
|
|
300
|
+
className
|
|
301
|
+
),
|
|
302
|
+
...props
|
|
303
|
+
}
|
|
304
|
+
));
|
|
305
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
306
|
+
var DropdownMenuContent = React9.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
307
|
+
DropdownMenuPrimitive.Content,
|
|
308
|
+
{
|
|
309
|
+
ref,
|
|
310
|
+
sideOffset,
|
|
311
|
+
className: cn(
|
|
312
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-gray-200 bg-white p-1 text-gray-900 shadow-md dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-100",
|
|
313
|
+
"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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
314
|
+
className
|
|
315
|
+
),
|
|
316
|
+
...props
|
|
317
|
+
}
|
|
318
|
+
) }));
|
|
319
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
320
|
+
var DropdownMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
321
|
+
DropdownMenuPrimitive.Item,
|
|
322
|
+
{
|
|
323
|
+
ref,
|
|
324
|
+
className: cn(
|
|
325
|
+
"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-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-700 dark:focus:text-gray-100 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
326
|
+
inset && "pl-8",
|
|
327
|
+
className
|
|
328
|
+
),
|
|
329
|
+
...props
|
|
330
|
+
}
|
|
331
|
+
));
|
|
332
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
333
|
+
var DropdownMenuCheckboxItem = React9.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
334
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
335
|
+
{
|
|
336
|
+
ref,
|
|
337
|
+
className: cn(
|
|
338
|
+
"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-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-700 dark:focus:text-gray-100",
|
|
339
|
+
className
|
|
340
|
+
),
|
|
341
|
+
checked,
|
|
342
|
+
...props,
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
345
|
+
children
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
));
|
|
349
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
350
|
+
var DropdownMenuRadioItem = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
351
|
+
DropdownMenuPrimitive.RadioItem,
|
|
352
|
+
{
|
|
353
|
+
ref,
|
|
354
|
+
className: cn(
|
|
355
|
+
"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-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-700 dark:focus:text-gray-100",
|
|
356
|
+
className
|
|
357
|
+
),
|
|
358
|
+
...props,
|
|
359
|
+
children: [
|
|
360
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
361
|
+
children
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
));
|
|
365
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
366
|
+
var DropdownMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
367
|
+
DropdownMenuPrimitive.Label,
|
|
368
|
+
{
|
|
369
|
+
ref,
|
|
370
|
+
className: cn(
|
|
371
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
372
|
+
inset && "pl-8",
|
|
373
|
+
className
|
|
374
|
+
),
|
|
375
|
+
...props
|
|
376
|
+
}
|
|
377
|
+
));
|
|
378
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
379
|
+
var DropdownMenuSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
380
|
+
DropdownMenuPrimitive.Separator,
|
|
381
|
+
{
|
|
382
|
+
ref,
|
|
383
|
+
className: cn("-mx-1 my-1 h-px bg-gray-100 dark:bg-neutral-700", className),
|
|
384
|
+
...props
|
|
385
|
+
}
|
|
386
|
+
));
|
|
387
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
388
|
+
var DropdownMenuShortcut = ({
|
|
389
|
+
className,
|
|
390
|
+
...props
|
|
391
|
+
}) => {
|
|
392
|
+
return /* @__PURE__ */ jsx(
|
|
393
|
+
"span",
|
|
394
|
+
{
|
|
395
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
396
|
+
...props
|
|
397
|
+
}
|
|
398
|
+
);
|
|
399
|
+
};
|
|
400
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
401
|
+
var PopoverContext = React9.createContext({ open: false });
|
|
402
|
+
var Popover = ({
|
|
403
|
+
children,
|
|
404
|
+
open: controlledOpen,
|
|
405
|
+
onOpenChange,
|
|
406
|
+
...props
|
|
407
|
+
}) => {
|
|
408
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React9.useState(false);
|
|
409
|
+
const isControlled = controlledOpen !== void 0;
|
|
410
|
+
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
411
|
+
const handleOpenChange = (newOpen) => {
|
|
412
|
+
if (!isControlled) {
|
|
413
|
+
setUncontrolledOpen(newOpen);
|
|
414
|
+
}
|
|
415
|
+
onOpenChange?.(newOpen);
|
|
416
|
+
};
|
|
417
|
+
return /* @__PURE__ */ jsx(PopoverContext.Provider, { value: { open }, children: /* @__PURE__ */ jsx(
|
|
418
|
+
PopoverPrimitive.Root,
|
|
419
|
+
{
|
|
420
|
+
open,
|
|
421
|
+
onOpenChange: handleOpenChange,
|
|
422
|
+
...props,
|
|
423
|
+
children
|
|
424
|
+
}
|
|
425
|
+
) });
|
|
426
|
+
};
|
|
427
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
428
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
429
|
+
var PopoverContent = React9.forwardRef(({ className, align = "center", sideOffset = 4, children, ...props }, ref) => {
|
|
430
|
+
const { open } = React9.useContext(PopoverContext);
|
|
431
|
+
const {
|
|
432
|
+
onOpenAutoFocus,
|
|
433
|
+
onCloseAutoFocus,
|
|
434
|
+
onEscapeKeyDown,
|
|
435
|
+
onPointerDownOutside,
|
|
436
|
+
onFocusOutside,
|
|
437
|
+
onInteractOutside,
|
|
438
|
+
side,
|
|
439
|
+
avoidCollisions,
|
|
440
|
+
collisionBoundary,
|
|
441
|
+
collisionPadding,
|
|
442
|
+
arrowPadding,
|
|
443
|
+
sticky,
|
|
444
|
+
hideWhenDetached
|
|
445
|
+
} = props;
|
|
446
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(
|
|
447
|
+
PopoverPrimitive.Content,
|
|
448
|
+
{
|
|
449
|
+
ref,
|
|
450
|
+
align,
|
|
451
|
+
sideOffset,
|
|
452
|
+
side,
|
|
453
|
+
avoidCollisions,
|
|
454
|
+
collisionBoundary,
|
|
455
|
+
collisionPadding,
|
|
456
|
+
arrowPadding,
|
|
457
|
+
sticky,
|
|
458
|
+
hideWhenDetached,
|
|
459
|
+
onOpenAutoFocus,
|
|
460
|
+
onCloseAutoFocus,
|
|
461
|
+
onEscapeKeyDown,
|
|
462
|
+
onPointerDownOutside,
|
|
463
|
+
onFocusOutside,
|
|
464
|
+
onInteractOutside,
|
|
465
|
+
asChild: true,
|
|
466
|
+
forceMount: true,
|
|
467
|
+
children: /* @__PURE__ */ jsx(
|
|
468
|
+
motion.div,
|
|
469
|
+
{
|
|
470
|
+
initial: { opacity: 0, scale: 0.96, y: -8 },
|
|
471
|
+
animate: { opacity: 1, scale: 1, y: 0 },
|
|
472
|
+
exit: { opacity: 0, scale: 0.96, y: -8 },
|
|
473
|
+
transition: {
|
|
474
|
+
type: "spring",
|
|
475
|
+
stiffness: 400,
|
|
476
|
+
damping: 25,
|
|
477
|
+
mass: 0.8
|
|
478
|
+
},
|
|
479
|
+
className: cn(
|
|
480
|
+
"z-50 w-72 rounded-xl border border-white/20 bg-white/80 backdrop-blur-xl p-4 text-gray-900 shadow-lg outline-none dark:border-neutral-700/50 dark:bg-neutral-900/80 dark:text-neutral-100 origin-[--radix-popover-content-transform-origin]",
|
|
481
|
+
className
|
|
482
|
+
),
|
|
483
|
+
children
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
}
|
|
487
|
+
) }) });
|
|
488
|
+
});
|
|
489
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
490
|
+
var SelectContext = React9.createContext({ open: false });
|
|
491
|
+
var Select = ({
|
|
492
|
+
children,
|
|
493
|
+
open: controlledOpen,
|
|
494
|
+
onOpenChange,
|
|
495
|
+
...props
|
|
496
|
+
}) => {
|
|
497
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React9.useState(false);
|
|
498
|
+
const isControlled = controlledOpen !== void 0;
|
|
499
|
+
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
500
|
+
const handleOpenChange = (newOpen) => {
|
|
501
|
+
if (!isControlled) {
|
|
502
|
+
setUncontrolledOpen(newOpen);
|
|
503
|
+
}
|
|
504
|
+
onOpenChange?.(newOpen);
|
|
505
|
+
};
|
|
506
|
+
return /* @__PURE__ */ jsx(SelectContext.Provider, { value: { open }, children: /* @__PURE__ */ jsx(
|
|
507
|
+
SelectPrimitive.Root,
|
|
508
|
+
{
|
|
509
|
+
open,
|
|
510
|
+
onOpenChange: handleOpenChange,
|
|
511
|
+
...props,
|
|
512
|
+
children
|
|
513
|
+
}
|
|
514
|
+
) });
|
|
515
|
+
};
|
|
516
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
517
|
+
var SelectValue = SelectPrimitive.Value;
|
|
518
|
+
var SelectTrigger = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
519
|
+
SelectPrimitive.Trigger,
|
|
520
|
+
{
|
|
521
|
+
ref,
|
|
522
|
+
className: cn(
|
|
523
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 dark:placeholder:text-gray-500 [&>span]:line-clamp-1",
|
|
524
|
+
className
|
|
525
|
+
),
|
|
526
|
+
...props,
|
|
527
|
+
children: [
|
|
528
|
+
children,
|
|
529
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
));
|
|
533
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
534
|
+
var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
535
|
+
SelectPrimitive.ScrollUpButton,
|
|
536
|
+
{
|
|
537
|
+
ref,
|
|
538
|
+
className: cn(
|
|
539
|
+
"flex cursor-default items-center justify-center py-1",
|
|
540
|
+
className
|
|
541
|
+
),
|
|
542
|
+
...props,
|
|
543
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
544
|
+
}
|
|
545
|
+
));
|
|
546
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
547
|
+
var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
548
|
+
SelectPrimitive.ScrollDownButton,
|
|
549
|
+
{
|
|
550
|
+
ref,
|
|
551
|
+
className: cn(
|
|
552
|
+
"flex cursor-default items-center justify-center py-1",
|
|
553
|
+
className
|
|
554
|
+
),
|
|
555
|
+
...props,
|
|
556
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
557
|
+
}
|
|
558
|
+
));
|
|
559
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
560
|
+
var SelectContent = React9.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
561
|
+
const { open } = React9.useContext(SelectContext);
|
|
562
|
+
const {
|
|
563
|
+
onCloseAutoFocus,
|
|
564
|
+
onEscapeKeyDown,
|
|
565
|
+
onPointerDownOutside,
|
|
566
|
+
side,
|
|
567
|
+
sideOffset,
|
|
568
|
+
align,
|
|
569
|
+
alignOffset,
|
|
570
|
+
avoidCollisions,
|
|
571
|
+
collisionBoundary,
|
|
572
|
+
collisionPadding,
|
|
573
|
+
arrowPadding,
|
|
574
|
+
sticky,
|
|
575
|
+
hideWhenDetached
|
|
576
|
+
} = props;
|
|
577
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
578
|
+
SelectPrimitive.Content,
|
|
579
|
+
{
|
|
580
|
+
ref,
|
|
581
|
+
position,
|
|
582
|
+
side,
|
|
583
|
+
sideOffset,
|
|
584
|
+
align,
|
|
585
|
+
alignOffset,
|
|
586
|
+
avoidCollisions,
|
|
587
|
+
collisionBoundary,
|
|
588
|
+
collisionPadding,
|
|
589
|
+
arrowPadding,
|
|
590
|
+
sticky,
|
|
591
|
+
hideWhenDetached,
|
|
592
|
+
onCloseAutoFocus,
|
|
593
|
+
onEscapeKeyDown,
|
|
594
|
+
onPointerDownOutside,
|
|
595
|
+
asChild: true,
|
|
596
|
+
children: /* @__PURE__ */ jsxs(
|
|
597
|
+
motion.div,
|
|
598
|
+
{
|
|
599
|
+
initial: { opacity: 0, scale: 0.96, y: -8 },
|
|
600
|
+
animate: { opacity: 1, scale: 1, y: 0 },
|
|
601
|
+
exit: { opacity: 0, scale: 0.96, y: -8 },
|
|
602
|
+
transition: {
|
|
603
|
+
type: "spring",
|
|
604
|
+
stiffness: 400,
|
|
605
|
+
damping: 25,
|
|
606
|
+
mass: 0.8
|
|
607
|
+
},
|
|
608
|
+
className: cn(
|
|
609
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-hidden rounded-xl border border-white/20 bg-white/80 backdrop-blur-xl text-gray-900 shadow-lg dark:border-neutral-700/50 dark:bg-neutral-900/80 dark:text-gray-100 origin-[--radix-select-content-transform-origin]",
|
|
610
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
611
|
+
className
|
|
612
|
+
),
|
|
613
|
+
children: [
|
|
614
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
615
|
+
/* @__PURE__ */ jsx(
|
|
616
|
+
SelectPrimitive.Viewport,
|
|
617
|
+
{
|
|
618
|
+
className: cn(
|
|
619
|
+
"p-1",
|
|
620
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
621
|
+
),
|
|
622
|
+
children
|
|
623
|
+
}
|
|
624
|
+
),
|
|
625
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
)
|
|
629
|
+
}
|
|
630
|
+
) }) });
|
|
631
|
+
});
|
|
632
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
633
|
+
var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
634
|
+
SelectPrimitive.Label,
|
|
635
|
+
{
|
|
636
|
+
ref,
|
|
637
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
638
|
+
...props
|
|
639
|
+
}
|
|
640
|
+
));
|
|
641
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
642
|
+
var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
643
|
+
SelectPrimitive.Item,
|
|
644
|
+
{
|
|
645
|
+
ref,
|
|
646
|
+
className: cn(
|
|
647
|
+
"relative flex w-full cursor-default select-none items-center rounded-lg py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-black/5 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-white/10 dark:focus:text-gray-100 transition-colors",
|
|
648
|
+
className
|
|
649
|
+
),
|
|
650
|
+
...props,
|
|
651
|
+
children: [
|
|
652
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
653
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
));
|
|
657
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
658
|
+
var SelectSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
659
|
+
SelectPrimitive.Separator,
|
|
660
|
+
{
|
|
661
|
+
ref,
|
|
662
|
+
className: cn("-mx-1 my-1 h-px bg-gray-200/50 dark:bg-neutral-700/50", className),
|
|
663
|
+
...props
|
|
664
|
+
}
|
|
665
|
+
));
|
|
666
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
667
|
+
function Skeleton({ className }) {
|
|
668
|
+
return /* @__PURE__ */ jsx(
|
|
669
|
+
"div",
|
|
670
|
+
{
|
|
671
|
+
className: cn(
|
|
672
|
+
"animate-pulse rounded-md bg-neutral-200 dark:bg-neutral-800",
|
|
673
|
+
className
|
|
674
|
+
)
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
function SkeletonText({ className }) {
|
|
679
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-4", className) });
|
|
680
|
+
}
|
|
681
|
+
function SkeletonTitle({ className }) {
|
|
682
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-6 w-48", className) });
|
|
683
|
+
}
|
|
684
|
+
function SkeletonSubtitle({ className }) {
|
|
685
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-3 w-64", className) });
|
|
686
|
+
}
|
|
687
|
+
function SkeletonAvatar({ className }) {
|
|
688
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("w-10 h-10 rounded", className) });
|
|
689
|
+
}
|
|
690
|
+
function SkeletonBadge({ className }) {
|
|
691
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-6 w-24", className) });
|
|
692
|
+
}
|
|
693
|
+
function SkeletonIcon({ className }) {
|
|
694
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("w-6 h-6 rounded", className) });
|
|
695
|
+
}
|
|
696
|
+
function SkeletonButton({ className }) {
|
|
697
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-10 w-24 rounded-md", className) });
|
|
698
|
+
}
|
|
699
|
+
function SkeletonInput({ className }) {
|
|
700
|
+
return /* @__PURE__ */ jsx(Skeleton, { className: cn("h-10 w-full rounded-md", className) });
|
|
701
|
+
}
|
|
702
|
+
function SkeletonTableRow({
|
|
703
|
+
columns = 4,
|
|
704
|
+
className
|
|
705
|
+
}) {
|
|
706
|
+
return /* @__PURE__ */ jsx("tr", { className, children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }) }, index)) });
|
|
707
|
+
}
|
|
708
|
+
function SkeletonTableRows({
|
|
709
|
+
count = 5,
|
|
710
|
+
columns = 4
|
|
711
|
+
}) {
|
|
712
|
+
return /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsx(SkeletonTableRow, { columns }, `skeleton-row-${index}`)) });
|
|
713
|
+
}
|
|
714
|
+
function SkeletonCard({ className }) {
|
|
715
|
+
return /* @__PURE__ */ jsxs(
|
|
716
|
+
"div",
|
|
717
|
+
{
|
|
718
|
+
className: cn(
|
|
719
|
+
"rounded-lg border bg-card p-6 space-y-4",
|
|
720
|
+
className
|
|
721
|
+
),
|
|
722
|
+
children: [
|
|
723
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-3/4" }),
|
|
724
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }),
|
|
725
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-5/6" }),
|
|
726
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2 pt-2", children: [
|
|
727
|
+
/* @__PURE__ */ jsx(SkeletonBadge, {}),
|
|
728
|
+
/* @__PURE__ */ jsx(SkeletonBadge, { className: "w-16" })
|
|
729
|
+
] })
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
var Table = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
735
|
+
"table",
|
|
736
|
+
{
|
|
737
|
+
ref,
|
|
738
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
739
|
+
...props
|
|
740
|
+
}
|
|
741
|
+
) }));
|
|
742
|
+
Table.displayName = "Table";
|
|
743
|
+
var TableHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
744
|
+
"thead",
|
|
745
|
+
{
|
|
746
|
+
ref,
|
|
747
|
+
className: cn("[&_tr]:border-b [&_tr]:border-gray-200 dark:[&_tr]:border-gray-700", className),
|
|
748
|
+
...props
|
|
749
|
+
}
|
|
750
|
+
));
|
|
751
|
+
TableHeader.displayName = "TableHeader";
|
|
752
|
+
var TableBody = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
753
|
+
"tbody",
|
|
754
|
+
{
|
|
755
|
+
ref,
|
|
756
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
757
|
+
...props
|
|
758
|
+
}
|
|
759
|
+
));
|
|
760
|
+
TableBody.displayName = "TableBody";
|
|
761
|
+
var TableFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
762
|
+
"tfoot",
|
|
763
|
+
{
|
|
764
|
+
ref,
|
|
765
|
+
className: cn(
|
|
766
|
+
"border-t border-gray-200 bg-gray-50 font-medium dark:border-neutral-700 dark:bg-neutral-800/50 [&>tr]:last:border-b-0",
|
|
767
|
+
className
|
|
768
|
+
),
|
|
769
|
+
...props
|
|
770
|
+
}
|
|
771
|
+
));
|
|
772
|
+
TableFooter.displayName = "TableFooter";
|
|
773
|
+
var TableRow = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
774
|
+
"tr",
|
|
775
|
+
{
|
|
776
|
+
ref,
|
|
777
|
+
className: cn(
|
|
778
|
+
"border-b border-gray-200 transition-colors hover:bg-gray-50 data-[state=selected]:bg-gray-100 dark:border-neutral-700 dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-gray-800",
|
|
779
|
+
className
|
|
780
|
+
),
|
|
781
|
+
...props
|
|
782
|
+
}
|
|
783
|
+
));
|
|
784
|
+
TableRow.displayName = "TableRow";
|
|
785
|
+
var TableHead = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
786
|
+
"th",
|
|
787
|
+
{
|
|
788
|
+
ref,
|
|
789
|
+
className: cn(
|
|
790
|
+
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400 [&:has([role=checkbox])]:pr-0",
|
|
791
|
+
className
|
|
792
|
+
),
|
|
793
|
+
...props
|
|
794
|
+
}
|
|
795
|
+
));
|
|
796
|
+
TableHead.displayName = "TableHead";
|
|
797
|
+
var TableCell = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
798
|
+
"td",
|
|
799
|
+
{
|
|
800
|
+
ref,
|
|
801
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
802
|
+
...props
|
|
803
|
+
}
|
|
804
|
+
));
|
|
805
|
+
TableCell.displayName = "TableCell";
|
|
806
|
+
var TableCaption = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
807
|
+
"caption",
|
|
808
|
+
{
|
|
809
|
+
ref,
|
|
810
|
+
className: cn("mt-4 text-sm text-gray-500 dark:text-gray-400", className),
|
|
811
|
+
...props
|
|
812
|
+
}
|
|
813
|
+
));
|
|
814
|
+
TableCaption.displayName = "TableCaption";
|
|
815
|
+
var TabsContext = React9.createContext(null);
|
|
816
|
+
var useTabsContext = () => {
|
|
817
|
+
const context = React9.useContext(TabsContext);
|
|
818
|
+
if (!context) {
|
|
819
|
+
throw new Error("Tabs components must be used within a Tabs provider");
|
|
820
|
+
}
|
|
821
|
+
return context;
|
|
822
|
+
};
|
|
823
|
+
var Tabs = React9.forwardRef(({ defaultValue, value, onValueChange, children, ...props }, ref) => {
|
|
824
|
+
const [activeTab, setActiveTabState] = React9.useState(value ?? defaultValue);
|
|
825
|
+
const tabRefs = React9.useRef(/* @__PURE__ */ new Map()).current;
|
|
826
|
+
const listRef = React9.useRef(null);
|
|
827
|
+
const setActiveTab = React9.useCallback(
|
|
828
|
+
(newValue) => {
|
|
829
|
+
setActiveTabState(newValue);
|
|
830
|
+
onValueChange?.(newValue);
|
|
831
|
+
},
|
|
832
|
+
[onValueChange]
|
|
833
|
+
);
|
|
834
|
+
React9.useEffect(() => {
|
|
835
|
+
if (value !== void 0) {
|
|
836
|
+
setActiveTabState(value);
|
|
837
|
+
}
|
|
838
|
+
}, [value]);
|
|
839
|
+
const registerTab = React9.useCallback(
|
|
840
|
+
(tabValue, element) => {
|
|
841
|
+
tabRefs.set(tabValue, element);
|
|
842
|
+
},
|
|
843
|
+
[tabRefs]
|
|
844
|
+
);
|
|
845
|
+
return /* @__PURE__ */ jsx(
|
|
846
|
+
TabsContext.Provider,
|
|
847
|
+
{
|
|
848
|
+
value: { activeTab, setActiveTab, registerTab, tabRefs, listRef },
|
|
849
|
+
children: /* @__PURE__ */ jsx(
|
|
850
|
+
TabsPrimitive.Root,
|
|
851
|
+
{
|
|
852
|
+
ref,
|
|
853
|
+
defaultValue,
|
|
854
|
+
value: activeTab,
|
|
855
|
+
onValueChange: setActiveTab,
|
|
856
|
+
...props,
|
|
857
|
+
children
|
|
858
|
+
}
|
|
859
|
+
)
|
|
860
|
+
}
|
|
861
|
+
);
|
|
862
|
+
});
|
|
863
|
+
Tabs.displayName = "Tabs";
|
|
864
|
+
var TabsList = React9.forwardRef(({ className, children, ...props }, ref) => {
|
|
865
|
+
const { activeTab, tabRefs, listRef } = useTabsContext();
|
|
866
|
+
const [indicatorStyle, setIndicatorStyle] = React9.useState(null);
|
|
867
|
+
React9.useEffect(() => {
|
|
868
|
+
const updateIndicator = () => {
|
|
869
|
+
if (!activeTab || !listRef.current) return;
|
|
870
|
+
const activeElement = tabRefs.get(activeTab);
|
|
871
|
+
if (!activeElement) return;
|
|
872
|
+
const listRect = listRef.current.getBoundingClientRect();
|
|
873
|
+
const tabRect = activeElement.getBoundingClientRect();
|
|
874
|
+
setIndicatorStyle({
|
|
875
|
+
left: tabRect.left - listRect.left,
|
|
876
|
+
width: tabRect.width
|
|
877
|
+
});
|
|
878
|
+
};
|
|
879
|
+
updateIndicator();
|
|
880
|
+
window.addEventListener("resize", updateIndicator);
|
|
881
|
+
return () => window.removeEventListener("resize", updateIndicator);
|
|
882
|
+
}, [activeTab, tabRefs, listRef]);
|
|
883
|
+
return /* @__PURE__ */ jsxs(
|
|
884
|
+
TabsPrimitive.List,
|
|
885
|
+
{
|
|
886
|
+
ref: (node) => {
|
|
887
|
+
if (typeof ref === "function") ref(node);
|
|
888
|
+
else if (ref) ref.current = node;
|
|
889
|
+
listRef.current = node;
|
|
890
|
+
},
|
|
891
|
+
className: cn(
|
|
892
|
+
"relative inline-flex h-10 items-center justify-center rounded-lg bg-gray-100 p-1 text-gray-500 dark:bg-neutral-800 dark:text-gray-400",
|
|
893
|
+
className
|
|
894
|
+
),
|
|
895
|
+
...props,
|
|
896
|
+
children: [
|
|
897
|
+
indicatorStyle && /* @__PURE__ */ jsx(
|
|
898
|
+
motion.div,
|
|
899
|
+
{
|
|
900
|
+
className: "absolute h-8 bg-white dark:bg-neutral-900 rounded-md shadow-sm",
|
|
901
|
+
initial: false,
|
|
902
|
+
animate: {
|
|
903
|
+
left: indicatorStyle.left,
|
|
904
|
+
width: indicatorStyle.width
|
|
905
|
+
},
|
|
906
|
+
transition: {
|
|
907
|
+
type: "spring",
|
|
908
|
+
stiffness: 500,
|
|
909
|
+
damping: 35
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
children
|
|
914
|
+
]
|
|
915
|
+
}
|
|
916
|
+
);
|
|
917
|
+
});
|
|
918
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
919
|
+
var TabsTrigger = React9.forwardRef(({ className, value, ...props }, ref) => {
|
|
920
|
+
const { registerTab, activeTab } = useTabsContext();
|
|
921
|
+
const triggerRef = React9.useRef(null);
|
|
922
|
+
React9.useEffect(() => {
|
|
923
|
+
registerTab(value, triggerRef.current);
|
|
924
|
+
return () => registerTab(value, null);
|
|
925
|
+
}, [value, registerTab]);
|
|
926
|
+
const isActive = activeTab === value;
|
|
927
|
+
return /* @__PURE__ */ jsx(
|
|
928
|
+
TabsPrimitive.Trigger,
|
|
929
|
+
{
|
|
930
|
+
ref: (node) => {
|
|
931
|
+
triggerRef.current = node;
|
|
932
|
+
if (typeof ref === "function") ref(node);
|
|
933
|
+
else if (ref) ref.current = node;
|
|
934
|
+
},
|
|
935
|
+
value,
|
|
936
|
+
className: cn(
|
|
937
|
+
"relative z-10 inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
938
|
+
isActive ? "text-gray-900 dark:text-gray-100" : "text-gray-500 dark:text-gray-400",
|
|
939
|
+
className
|
|
940
|
+
),
|
|
941
|
+
...props
|
|
942
|
+
}
|
|
943
|
+
);
|
|
944
|
+
});
|
|
945
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
946
|
+
var TabsContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
947
|
+
TabsPrimitive.Content,
|
|
948
|
+
{
|
|
949
|
+
ref,
|
|
950
|
+
className: cn(
|
|
951
|
+
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
|
|
952
|
+
className
|
|
953
|
+
),
|
|
954
|
+
...props
|
|
955
|
+
}
|
|
956
|
+
));
|
|
957
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
958
|
+
var Textarea = React9.forwardRef(
|
|
959
|
+
({ className, ...props }, ref) => {
|
|
960
|
+
return /* @__PURE__ */ jsx(
|
|
961
|
+
"textarea",
|
|
962
|
+
{
|
|
963
|
+
className: cn(
|
|
964
|
+
"flex min-h-[80px] w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 dark:placeholder:text-gray-500",
|
|
965
|
+
className
|
|
966
|
+
),
|
|
967
|
+
ref,
|
|
968
|
+
...props
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
Textarea.displayName = "Textarea";
|
|
974
|
+
|
|
975
|
+
export { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonButton, SkeletonCard, SkeletonIcon, SkeletonInput, SkeletonSubtitle, SkeletonTableRow, SkeletonTableRows, SkeletonText, SkeletonTitle, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, badgeVariants, buttonVariants, cn };
|
|
976
|
+
//# sourceMappingURL=chunk-7LVVOCBV.mjs.map
|
|
977
|
+
//# sourceMappingURL=chunk-7LVVOCBV.mjs.map
|