adminium 1.0.1-patch.3 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +641 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -26
- package/dist/index.d.ts +227 -26
- package/dist/index.js +618 -65
- package/dist/index.js.map +1 -1
- package/dist/styles/adminium.css +431 -25
- package/package.json +15 -3
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { ChevronDown, X, Check, Minus, ChevronRight, Circle, ChevronUp, ChevronLeftIcon, ChevronRightIcon, ArrowDown, ArrowUp, ChevronsUpDown, ArrowLeftToLine, ArrowRightToLine, ArrowLeft, ArrowRight, Settings2, PinOff } from 'lucide-react';
|
|
5
|
+
import { Loader2Icon, ChevronDown, X, Check, Minus, ChevronRight, Circle, ChevronUp, ChevronLeftIcon, ChevronRightIcon, MoreHorizontal, ArrowDown, ArrowUp, ChevronsUpDown, ArrowLeftToLine, ArrowRightToLine, ArrowLeft, ArrowRight, Settings2, PinOff } from 'lucide-react';
|
|
6
6
|
import * as SlotPrimitive2 from '@radix-ui/react-slot';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Popover as Popover$1, Avatar as Avatar$1, Select as Select$1, Label, ScrollArea as ScrollArea$1 } from 'radix-ui';
|
|
8
|
+
import { AlertDialog as AlertDialog$1, Dialog as Dialog$1, Popover as Popover$1, Avatar as Avatar$1, Select as Select$1, Slot, Tabs as Tabs$1, Label, Switch as Switch$1, ScrollArea as ScrollArea$1, AspectRatio as AspectRatio$1 } from 'radix-ui';
|
|
9
9
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
10
10
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
11
11
|
import * as React from 'react';
|
|
@@ -20,67 +20,79 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
|
20
20
|
function cn(...inputs) {
|
|
21
21
|
return twMerge(clsx(inputs));
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
23
|
+
function Spinner({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Loader2Icon,
|
|
26
|
+
{
|
|
27
|
+
role: "status",
|
|
28
|
+
"aria-label": "Loading",
|
|
29
|
+
className: cn("size-4 animate-spin", className),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
var buttonVariantConfig = {
|
|
35
|
+
variant: {
|
|
36
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90 data-[state=open]:bg-primary/90",
|
|
37
|
+
mono: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black hover:bg-zinc-950/90 dark:hover:bg-zinc-300/90 data-[state=open]:bg-zinc-950/90 dark:data-[state=open]:bg-zinc-300/90",
|
|
38
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 data-[state=open]:bg-destructive/90",
|
|
39
|
+
success: "bg-emerald-500 text-white hover:bg-emerald-600 data-[state=open]:bg-emerald-600",
|
|
40
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/90 data-[state=open]:bg-secondary/90",
|
|
41
|
+
outline: "bg-background text-accent-foreground border border-input hover:bg-accent data-[state=open]:bg-accent",
|
|
42
|
+
dashed: "text-accent-foreground border border-input border-dashed bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:text-accent-foreground",
|
|
43
|
+
ghost: "text-accent-foreground hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
44
|
+
dim: "text-muted-foreground hover:text-foreground data-[state=open]:text-foreground",
|
|
45
|
+
foreground: "",
|
|
46
|
+
inverse: ""
|
|
47
|
+
},
|
|
48
|
+
appearance: {
|
|
49
|
+
default: "",
|
|
50
|
+
ghost: ""
|
|
51
|
+
},
|
|
52
|
+
underline: {
|
|
53
|
+
solid: "",
|
|
54
|
+
dashed: ""
|
|
55
|
+
},
|
|
56
|
+
underlined: {
|
|
57
|
+
solid: "",
|
|
58
|
+
dashed: ""
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
lg: "h-10 rounded-md px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",
|
|
62
|
+
md: "h-8.5 rounded-md px-3 gap-1.5 text-[0.8125rem] leading-[var(--text-sm--line-height)] [&_svg:not([class*=size-])]:size-4",
|
|
63
|
+
sm: "h-7 rounded-md px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",
|
|
64
|
+
icon: "size-8.5 rounded-md [&_svg:not([class*=size-])]:size-4 shrink-0"
|
|
65
|
+
},
|
|
66
|
+
autoHeight: {
|
|
67
|
+
true: "",
|
|
68
|
+
false: ""
|
|
69
|
+
},
|
|
70
|
+
shape: {
|
|
71
|
+
default: "",
|
|
72
|
+
circle: "rounded-full"
|
|
73
|
+
},
|
|
74
|
+
mode: {
|
|
75
|
+
default: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
76
|
+
icon: "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 shrink-0",
|
|
77
|
+
link: "text-primary h-auto p-0 bg-transparent rounded-none hover:bg-transparent data-[state=open]:bg-transparent",
|
|
78
|
+
input: `
|
|
79
|
+
justify-start font-normal hover:bg-background [&_svg]:transition-colors [&_svg]:hover:text-foreground data-[state=open]:bg-background
|
|
80
|
+
focus-visible:border-ring focus-visible:outline-hidden focus-visible:ring-[3px] focus-visible:ring-ring/30
|
|
81
|
+
[[data-state=open]>&]:border-ring [[data-state=open]>&]:outline-hidden [[data-state=open]>&]:ring-[3px]
|
|
82
|
+
[[data-state=open]>&]:ring-ring/30
|
|
75
83
|
aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
|
|
76
84
|
in-data-[invalid=true]:border-destructive/60 in-data-[invalid=true]:ring-destructive/10 dark:in-data-[invalid=true]:border-destructive dark:in-data-[invalid=true]:ring-destructive/20
|
|
77
85
|
`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
},
|
|
87
|
+
placeholder: {
|
|
88
|
+
true: "text-muted-foreground",
|
|
89
|
+
false: ""
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
var buttonVariants = cva(
|
|
93
|
+
"cursor-pointer group whitespace-nowrap focus-visible:outline-hidden inline-flex items-center justify-center has-data-[arrow=true]:justify-between whitespace-nowrap text-sm font-medium ring-offset-background transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-60 [&_svg]:shrink-0",
|
|
94
|
+
{
|
|
95
|
+
variants: buttonVariantConfig,
|
|
84
96
|
compoundVariants: [
|
|
85
97
|
// Icons opacity for default mode
|
|
86
98
|
{
|
|
@@ -366,6 +378,10 @@ function Button({
|
|
|
366
378
|
underline,
|
|
367
379
|
asChild = false,
|
|
368
380
|
placeholder = false,
|
|
381
|
+
loading = false,
|
|
382
|
+
children,
|
|
383
|
+
disabled,
|
|
384
|
+
onClick,
|
|
369
385
|
...props
|
|
370
386
|
}) {
|
|
371
387
|
const Comp = asChild ? SlotPrimitive2.Slot : "button";
|
|
@@ -386,10 +402,19 @@ function Button({
|
|
|
386
402
|
underline,
|
|
387
403
|
className
|
|
388
404
|
}),
|
|
389
|
-
asChild &&
|
|
405
|
+
asChild && (disabled || loading) && "pointer-events-none opacity-50",
|
|
406
|
+
loading && !asChild && !disabled && "pointer-events-none"
|
|
390
407
|
),
|
|
408
|
+
disabled: asChild ? void 0 : disabled,
|
|
409
|
+
"aria-busy": loading || void 0,
|
|
410
|
+
"aria-disabled": loading || void 0,
|
|
391
411
|
...selected && { "data-state": "open" },
|
|
392
|
-
|
|
412
|
+
onClick: loading ? void 0 : onClick,
|
|
413
|
+
...props,
|
|
414
|
+
children: asChild ? children : loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
415
|
+
/* @__PURE__ */ jsx(Spinner, {}),
|
|
416
|
+
/* @__PURE__ */ jsx("span", { className: "contents [&>svg]:hidden", children })
|
|
417
|
+
] }) : children
|
|
393
418
|
}
|
|
394
419
|
);
|
|
395
420
|
}
|
|
@@ -3079,6 +3104,271 @@ function BadgeDot({ className, ...props }) {
|
|
|
3079
3104
|
}
|
|
3080
3105
|
);
|
|
3081
3106
|
}
|
|
3107
|
+
function Breadcrumb({
|
|
3108
|
+
...props
|
|
3109
|
+
}) {
|
|
3110
|
+
return /* @__PURE__ */ jsx("nav", { "data-slot": "breadcrumb", "aria-label": "breadcrumb", ...props });
|
|
3111
|
+
}
|
|
3112
|
+
function BreadcrumbList({ className, ...props }) {
|
|
3113
|
+
return /* @__PURE__ */ jsx(
|
|
3114
|
+
"ol",
|
|
3115
|
+
{
|
|
3116
|
+
"data-slot": "breadcrumb-list",
|
|
3117
|
+
className: cn(
|
|
3118
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground",
|
|
3119
|
+
className
|
|
3120
|
+
),
|
|
3121
|
+
...props
|
|
3122
|
+
}
|
|
3123
|
+
);
|
|
3124
|
+
}
|
|
3125
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
3126
|
+
return /* @__PURE__ */ jsx(
|
|
3127
|
+
"li",
|
|
3128
|
+
{
|
|
3129
|
+
"data-slot": "breadcrumb-item",
|
|
3130
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
3131
|
+
...props
|
|
3132
|
+
}
|
|
3133
|
+
);
|
|
3134
|
+
}
|
|
3135
|
+
function BreadcrumbLink({
|
|
3136
|
+
asChild,
|
|
3137
|
+
className,
|
|
3138
|
+
...props
|
|
3139
|
+
}) {
|
|
3140
|
+
const Comp = asChild ? Slot.Slot : "a";
|
|
3141
|
+
return /* @__PURE__ */ jsx(
|
|
3142
|
+
Comp,
|
|
3143
|
+
{
|
|
3144
|
+
"data-slot": "breadcrumb-link",
|
|
3145
|
+
className: cn("transition-colors hover:text-foreground", className),
|
|
3146
|
+
...props
|
|
3147
|
+
}
|
|
3148
|
+
);
|
|
3149
|
+
}
|
|
3150
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
3151
|
+
return /* @__PURE__ */ jsx(
|
|
3152
|
+
"span",
|
|
3153
|
+
{
|
|
3154
|
+
"data-slot": "breadcrumb-page",
|
|
3155
|
+
role: "link",
|
|
3156
|
+
"aria-disabled": "true",
|
|
3157
|
+
"aria-current": "page",
|
|
3158
|
+
className: cn("font-normal text-foreground", className),
|
|
3159
|
+
...props
|
|
3160
|
+
}
|
|
3161
|
+
);
|
|
3162
|
+
}
|
|
3163
|
+
var BreadcrumbSeparator = ({
|
|
3164
|
+
children,
|
|
3165
|
+
className,
|
|
3166
|
+
...props
|
|
3167
|
+
}) => /* @__PURE__ */ jsx(
|
|
3168
|
+
"li",
|
|
3169
|
+
{
|
|
3170
|
+
"data-slot": "breadcrumb-separator",
|
|
3171
|
+
role: "presentation",
|
|
3172
|
+
"aria-hidden": "true",
|
|
3173
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
|
|
3174
|
+
...props,
|
|
3175
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, { className: "rtl:rotate-180" })
|
|
3176
|
+
}
|
|
3177
|
+
);
|
|
3178
|
+
var BreadcrumbEllipsis = ({
|
|
3179
|
+
className,
|
|
3180
|
+
...props
|
|
3181
|
+
}) => /* @__PURE__ */ jsxs(
|
|
3182
|
+
"span",
|
|
3183
|
+
{
|
|
3184
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
3185
|
+
role: "presentation",
|
|
3186
|
+
"aria-hidden": "true",
|
|
3187
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3188
|
+
...props,
|
|
3189
|
+
children: [
|
|
3190
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
|
|
3191
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
3192
|
+
]
|
|
3193
|
+
}
|
|
3194
|
+
);
|
|
3195
|
+
var tabsListVariantConfig = {
|
|
3196
|
+
variant: {
|
|
3197
|
+
default: "bg-accent p-1",
|
|
3198
|
+
button: "",
|
|
3199
|
+
line: "border-b border-border"
|
|
3200
|
+
},
|
|
3201
|
+
shape: {
|
|
3202
|
+
default: "",
|
|
3203
|
+
pill: ""
|
|
3204
|
+
},
|
|
3205
|
+
size: {
|
|
3206
|
+
lg: "gap-2.5",
|
|
3207
|
+
md: "gap-2",
|
|
3208
|
+
sm: "gap-1.5",
|
|
3209
|
+
xs: "gap-1"
|
|
3210
|
+
}
|
|
3211
|
+
};
|
|
3212
|
+
var tabsListVariants = cva("flex items-center shrink-0", {
|
|
3213
|
+
variants: tabsListVariantConfig,
|
|
3214
|
+
compoundVariants: [
|
|
3215
|
+
{ variant: "default", size: "lg", className: "p-1.5 gap-2.5" },
|
|
3216
|
+
{ variant: "default", size: "md", className: "p-1 gap-2" },
|
|
3217
|
+
{ variant: "default", size: "sm", className: "p-1 gap-1.5" },
|
|
3218
|
+
{ variant: "default", size: "xs", className: "p-1 gap-1" },
|
|
3219
|
+
{
|
|
3220
|
+
variant: "default",
|
|
3221
|
+
shape: "default",
|
|
3222
|
+
size: "lg",
|
|
3223
|
+
className: "rounded-lg"
|
|
3224
|
+
},
|
|
3225
|
+
{
|
|
3226
|
+
variant: "default",
|
|
3227
|
+
shape: "default",
|
|
3228
|
+
size: "md",
|
|
3229
|
+
className: "rounded-lg"
|
|
3230
|
+
},
|
|
3231
|
+
{
|
|
3232
|
+
variant: "default",
|
|
3233
|
+
shape: "default",
|
|
3234
|
+
size: "sm",
|
|
3235
|
+
className: "rounded-md"
|
|
3236
|
+
},
|
|
3237
|
+
{
|
|
3238
|
+
variant: "default",
|
|
3239
|
+
shape: "default",
|
|
3240
|
+
size: "xs",
|
|
3241
|
+
className: "rounded-md"
|
|
3242
|
+
},
|
|
3243
|
+
{ variant: "line", size: "lg", className: "gap-9" },
|
|
3244
|
+
{ variant: "line", size: "md", className: "gap-8" },
|
|
3245
|
+
{ variant: "line", size: "sm", className: "gap-4" },
|
|
3246
|
+
{ variant: "line", size: "xs", className: "gap-4" },
|
|
3247
|
+
{
|
|
3248
|
+
variant: "default",
|
|
3249
|
+
shape: "pill",
|
|
3250
|
+
className: "rounded-full [&_[role=tab]]:rounded-full"
|
|
3251
|
+
},
|
|
3252
|
+
{
|
|
3253
|
+
variant: "button",
|
|
3254
|
+
shape: "pill",
|
|
3255
|
+
className: "rounded-full [&_[role=tab]]:rounded-full"
|
|
3256
|
+
}
|
|
3257
|
+
],
|
|
3258
|
+
defaultVariants: {
|
|
3259
|
+
variant: "default",
|
|
3260
|
+
size: "md"
|
|
3261
|
+
}
|
|
3262
|
+
});
|
|
3263
|
+
var tabsTriggerVariants = cva(
|
|
3264
|
+
"shrink-0 cursor-pointer whitespace-nowrap inline-flex justify-center items-center font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:shrink-0 [&_svg]:text-muted-foreground [&:hover_svg]:text-primary [&[data-state=active]_svg]:text-primary",
|
|
3265
|
+
{
|
|
3266
|
+
variants: {
|
|
3267
|
+
variant: {
|
|
3268
|
+
default: "text-muted-foreground data-[state=active]:bg-background hover:text-foreground data-[state=active]:text-foreground data-[state=active]:shadow-xs data-[state=active]:shadow-black/5",
|
|
3269
|
+
button: "rounded-lg text-accent-foreground hover:text-foreground data-[state=active]:bg-accent data-[state=active]:text-foreground",
|
|
3270
|
+
line: "border-b-2 text-muted-foreground border-transparent data-[state=active]:border-primary hover:text-primary data-[state=active]:text-primary"
|
|
3271
|
+
},
|
|
3272
|
+
size: {
|
|
3273
|
+
lg: "gap-2.5 [&_svg]:size-5 text-sm",
|
|
3274
|
+
md: "gap-2 [&_svg]:size-4 text-sm",
|
|
3275
|
+
sm: "gap-1.5 [&_svg]:size-3.5 text-xs",
|
|
3276
|
+
xs: "gap-1 [&_svg]:size-3.5 text-xs"
|
|
3277
|
+
}
|
|
3278
|
+
},
|
|
3279
|
+
compoundVariants: [
|
|
3280
|
+
{ variant: "default", size: "lg", className: "py-2.5 px-4 rounded-md" },
|
|
3281
|
+
{ variant: "default", size: "md", className: "py-1.5 px-3 rounded-md" },
|
|
3282
|
+
{ variant: "default", size: "sm", className: "py-1.5 px-2.5 rounded-sm" },
|
|
3283
|
+
{ variant: "default", size: "xs", className: "py-1 px-2 rounded-sm" },
|
|
3284
|
+
{ variant: "button", size: "lg", className: "py-3 px-4 rounded-lg" },
|
|
3285
|
+
{ variant: "button", size: "md", className: "py-2.5 px-3 rounded-lg" },
|
|
3286
|
+
{ variant: "button", size: "sm", className: "py-2 px-2.5 rounded-md" },
|
|
3287
|
+
{ variant: "button", size: "xs", className: "py-1.5 px-2 rounded-md" },
|
|
3288
|
+
{ variant: "line", size: "lg", className: "py-3" },
|
|
3289
|
+
{ variant: "line", size: "md", className: "py-2.5" },
|
|
3290
|
+
{ variant: "line", size: "sm", className: "py-2" },
|
|
3291
|
+
{ variant: "line", size: "xs", className: "py-1.5" }
|
|
3292
|
+
],
|
|
3293
|
+
defaultVariants: {
|
|
3294
|
+
variant: "default",
|
|
3295
|
+
size: "md"
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
);
|
|
3299
|
+
var tabsContentVariants = cva(
|
|
3300
|
+
"mt-2.5 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
3301
|
+
{
|
|
3302
|
+
variants: {
|
|
3303
|
+
variant: {
|
|
3304
|
+
default: ""
|
|
3305
|
+
}
|
|
3306
|
+
},
|
|
3307
|
+
defaultVariants: {
|
|
3308
|
+
variant: "default"
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
);
|
|
3312
|
+
var TabsContext = React.createContext({
|
|
3313
|
+
variant: "default",
|
|
3314
|
+
size: "md"
|
|
3315
|
+
});
|
|
3316
|
+
function Tabs({
|
|
3317
|
+
className,
|
|
3318
|
+
...props
|
|
3319
|
+
}) {
|
|
3320
|
+
return /* @__PURE__ */ jsx(Tabs$1.Root, { "data-slot": "tabs", className, ...props });
|
|
3321
|
+
}
|
|
3322
|
+
function TabsList({
|
|
3323
|
+
className,
|
|
3324
|
+
variant = "default",
|
|
3325
|
+
shape = "default",
|
|
3326
|
+
size = "md",
|
|
3327
|
+
...props
|
|
3328
|
+
}) {
|
|
3329
|
+
return /* @__PURE__ */ jsx(
|
|
3330
|
+
TabsContext.Provider,
|
|
3331
|
+
{
|
|
3332
|
+
value: { variant: variant || "default", size: size || "md" },
|
|
3333
|
+
children: /* @__PURE__ */ jsx(
|
|
3334
|
+
Tabs$1.List,
|
|
3335
|
+
{
|
|
3336
|
+
"data-slot": "tabs-list",
|
|
3337
|
+
className: cn(tabsListVariants({ variant, shape, size }), className),
|
|
3338
|
+
...props
|
|
3339
|
+
}
|
|
3340
|
+
)
|
|
3341
|
+
}
|
|
3342
|
+
);
|
|
3343
|
+
}
|
|
3344
|
+
function TabsTrigger({
|
|
3345
|
+
className,
|
|
3346
|
+
...props
|
|
3347
|
+
}) {
|
|
3348
|
+
const { variant, size } = React.useContext(TabsContext);
|
|
3349
|
+
return /* @__PURE__ */ jsx(
|
|
3350
|
+
Tabs$1.Trigger,
|
|
3351
|
+
{
|
|
3352
|
+
"data-slot": "tabs-trigger",
|
|
3353
|
+
className: cn(tabsTriggerVariants({ variant, size }), className),
|
|
3354
|
+
...props
|
|
3355
|
+
}
|
|
3356
|
+
);
|
|
3357
|
+
}
|
|
3358
|
+
function TabsContent({
|
|
3359
|
+
className,
|
|
3360
|
+
variant,
|
|
3361
|
+
...props
|
|
3362
|
+
}) {
|
|
3363
|
+
return /* @__PURE__ */ jsx(
|
|
3364
|
+
Tabs$1.Content,
|
|
3365
|
+
{
|
|
3366
|
+
"data-slot": "tabs-content",
|
|
3367
|
+
className: cn(tabsContentVariants({ variant }), className),
|
|
3368
|
+
...props
|
|
3369
|
+
}
|
|
3370
|
+
);
|
|
3371
|
+
}
|
|
3082
3372
|
var CardContext = React.createContext({
|
|
3083
3373
|
variant: "default"
|
|
3084
3374
|
// Default value
|
|
@@ -3838,9 +4128,11 @@ function FieldContent({ className, ...props }) {
|
|
|
3838
4128
|
}
|
|
3839
4129
|
function FieldLabel({
|
|
3840
4130
|
className,
|
|
4131
|
+
required = false,
|
|
4132
|
+
children,
|
|
3841
4133
|
...props
|
|
3842
4134
|
}) {
|
|
3843
|
-
return /* @__PURE__ */
|
|
4135
|
+
return /* @__PURE__ */ jsxs(
|
|
3844
4136
|
Label2,
|
|
3845
4137
|
{
|
|
3846
4138
|
"data-slot": "field-label",
|
|
@@ -3850,7 +4142,11 @@ function FieldLabel({
|
|
|
3850
4142
|
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
3851
4143
|
className
|
|
3852
4144
|
),
|
|
3853
|
-
...props
|
|
4145
|
+
...props,
|
|
4146
|
+
children: [
|
|
4147
|
+
children,
|
|
4148
|
+
required && /* @__PURE__ */ jsx("span", { className: "text-destructive", children: "*" })
|
|
4149
|
+
]
|
|
3854
4150
|
}
|
|
3855
4151
|
);
|
|
3856
4152
|
}
|
|
@@ -3945,6 +4241,177 @@ function FieldError({
|
|
|
3945
4241
|
}
|
|
3946
4242
|
);
|
|
3947
4243
|
}
|
|
4244
|
+
var SwitchContext = React.createContext({
|
|
4245
|
+
permanent: false
|
|
4246
|
+
});
|
|
4247
|
+
var useSwitchContext = () => {
|
|
4248
|
+
const context = React.useContext(SwitchContext);
|
|
4249
|
+
if (!context) {
|
|
4250
|
+
throw new Error("SwitchIndicator must be used within a Switch component");
|
|
4251
|
+
}
|
|
4252
|
+
return context;
|
|
4253
|
+
};
|
|
4254
|
+
var switchShapes = {
|
|
4255
|
+
pill: "rounded-full",
|
|
4256
|
+
square: "rounded-md"
|
|
4257
|
+
};
|
|
4258
|
+
var switchSizes = {
|
|
4259
|
+
xs: "h-4 w-7",
|
|
4260
|
+
sm: "h-5 w-8",
|
|
4261
|
+
md: "h-6 w-10",
|
|
4262
|
+
lg: "h-8 w-14",
|
|
4263
|
+
xl: "h-9 w-16"
|
|
4264
|
+
};
|
|
4265
|
+
var switchVariants = cva(
|
|
4266
|
+
`
|
|
4267
|
+
relative peer inline-flex shrink-0 cursor-pointer items-center rounded-full transition-colors
|
|
4268
|
+
focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background
|
|
4269
|
+
disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-input
|
|
4270
|
+
aria-invalid:border aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
|
|
4271
|
+
[[data-invalid=true]_&]:border [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20
|
|
4272
|
+
`,
|
|
4273
|
+
{
|
|
4274
|
+
variants: {
|
|
4275
|
+
shape: switchShapes,
|
|
4276
|
+
size: switchSizes,
|
|
4277
|
+
permanent: {
|
|
4278
|
+
true: "bg-input",
|
|
4279
|
+
false: "data-[state=checked]:bg-primary"
|
|
4280
|
+
}
|
|
4281
|
+
},
|
|
4282
|
+
defaultVariants: {
|
|
4283
|
+
shape: "pill",
|
|
4284
|
+
permanent: false,
|
|
4285
|
+
size: "md"
|
|
4286
|
+
}
|
|
4287
|
+
}
|
|
4288
|
+
);
|
|
4289
|
+
var switchThumbVariants = cva(
|
|
4290
|
+
"pointer-events-none block bg-white w-1/2 h-[calc(100%-4px)] shadow-lg ring-0 transition-transform start-0 data-[state=unchecked]:translate-x-[2px] data-[state=checked]:translate-x-[calc(100%-2px)] rtl:data-[state=unchecked]:-translate-x-[2px] rtl:data-[state=checked]:-translate-x-[calc(100%-2px)]",
|
|
4291
|
+
{
|
|
4292
|
+
variants: {
|
|
4293
|
+
shape: {
|
|
4294
|
+
pill: "rounded-full",
|
|
4295
|
+
square: "rounded-md"
|
|
4296
|
+
},
|
|
4297
|
+
size: {
|
|
4298
|
+
xs: "",
|
|
4299
|
+
sm: "",
|
|
4300
|
+
md: "",
|
|
4301
|
+
lg: "",
|
|
4302
|
+
xl: ""
|
|
4303
|
+
}
|
|
4304
|
+
},
|
|
4305
|
+
compoundVariants: [
|
|
4306
|
+
{
|
|
4307
|
+
shape: "square",
|
|
4308
|
+
size: "xs",
|
|
4309
|
+
className: "rounded-sm"
|
|
4310
|
+
}
|
|
4311
|
+
],
|
|
4312
|
+
defaultVariants: {
|
|
4313
|
+
shape: "pill",
|
|
4314
|
+
size: "md"
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
);
|
|
4318
|
+
var switchIndicatorVariants = cva(
|
|
4319
|
+
"text-sm font-medium absolute mx-[2px] top-1/2 w-1/2 -translate-y-1/2 flex pointer-events-none items-center justify-center text-center transition-transform duration-300 [transition-timing-function:cubic-bezier(0.16,1,0.3,1)]",
|
|
4320
|
+
{
|
|
4321
|
+
variants: {
|
|
4322
|
+
state: {
|
|
4323
|
+
on: "start-0",
|
|
4324
|
+
off: "end-0"
|
|
4325
|
+
},
|
|
4326
|
+
permanent: {
|
|
4327
|
+
true: "",
|
|
4328
|
+
false: ""
|
|
4329
|
+
}
|
|
4330
|
+
},
|
|
4331
|
+
compoundVariants: [
|
|
4332
|
+
{
|
|
4333
|
+
state: "on",
|
|
4334
|
+
permanent: false,
|
|
4335
|
+
className: "text-primary-foreground peer-data-[state=unchecked]:invisible peer-data-[state=unchecked]:translate-x-full rtl:peer-data-[state=unchecked]:-translate-x-full"
|
|
4336
|
+
},
|
|
4337
|
+
{
|
|
4338
|
+
state: "off",
|
|
4339
|
+
permanent: false,
|
|
4340
|
+
className: "peer-data-[state=checked]:invisible -translate-x-full rtl:translate-x-full peer-data-[state=unchecked]:translate-x-0"
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
state: "on",
|
|
4344
|
+
permanent: true,
|
|
4345
|
+
className: "start-0"
|
|
4346
|
+
},
|
|
4347
|
+
{
|
|
4348
|
+
state: "off",
|
|
4349
|
+
permanent: true,
|
|
4350
|
+
className: "end-0"
|
|
4351
|
+
}
|
|
4352
|
+
],
|
|
4353
|
+
defaultVariants: {
|
|
4354
|
+
state: "off",
|
|
4355
|
+
permanent: false
|
|
4356
|
+
}
|
|
4357
|
+
}
|
|
4358
|
+
);
|
|
4359
|
+
function SwitchWrapper({
|
|
4360
|
+
className,
|
|
4361
|
+
children,
|
|
4362
|
+
permanent = false,
|
|
4363
|
+
...props
|
|
4364
|
+
}) {
|
|
4365
|
+
return /* @__PURE__ */ jsx(SwitchContext.Provider, { value: { permanent }, children: /* @__PURE__ */ jsx(
|
|
4366
|
+
"div",
|
|
4367
|
+
{
|
|
4368
|
+
"data-slot": "switch-wrapper",
|
|
4369
|
+
className: cn("relative inline-flex items-center", className),
|
|
4370
|
+
...props,
|
|
4371
|
+
children
|
|
4372
|
+
}
|
|
4373
|
+
) });
|
|
4374
|
+
}
|
|
4375
|
+
function Switch({
|
|
4376
|
+
className,
|
|
4377
|
+
thumbClassName = "",
|
|
4378
|
+
shape,
|
|
4379
|
+
size,
|
|
4380
|
+
...props
|
|
4381
|
+
}) {
|
|
4382
|
+
const context = useSwitchContext();
|
|
4383
|
+
const permanent = context?.permanent ?? false;
|
|
4384
|
+
return /* @__PURE__ */ jsx(
|
|
4385
|
+
Switch$1.Root,
|
|
4386
|
+
{
|
|
4387
|
+
"data-slot": "switch",
|
|
4388
|
+
className: cn(switchVariants({ shape, size, permanent }), className),
|
|
4389
|
+
...props,
|
|
4390
|
+
children: /* @__PURE__ */ jsx(
|
|
4391
|
+
Switch$1.Thumb,
|
|
4392
|
+
{
|
|
4393
|
+
className: cn(switchThumbVariants({ shape, size }), thumbClassName)
|
|
4394
|
+
}
|
|
4395
|
+
)
|
|
4396
|
+
}
|
|
4397
|
+
);
|
|
4398
|
+
}
|
|
4399
|
+
function SwitchIndicator({
|
|
4400
|
+
className,
|
|
4401
|
+
state,
|
|
4402
|
+
...props
|
|
4403
|
+
}) {
|
|
4404
|
+
const context = useSwitchContext();
|
|
4405
|
+
const permanent = context?.permanent ?? false;
|
|
4406
|
+
return /* @__PURE__ */ jsx(
|
|
4407
|
+
"span",
|
|
4408
|
+
{
|
|
4409
|
+
"data-slot": "switch-indicator",
|
|
4410
|
+
className: cn(switchIndicatorVariants({ state, permanent }), className),
|
|
4411
|
+
...props
|
|
4412
|
+
}
|
|
4413
|
+
);
|
|
4414
|
+
}
|
|
3948
4415
|
function ScrollArea({
|
|
3949
4416
|
className,
|
|
3950
4417
|
viewportClassName,
|
|
@@ -4135,6 +4602,92 @@ function Scrollspy({
|
|
|
4135
4602
|
]);
|
|
4136
4603
|
return /* @__PURE__ */ jsx("div", { "data-slot": "scrollspy", className, ref: selfRef, children });
|
|
4137
4604
|
}
|
|
4605
|
+
function AspectRatio(props) {
|
|
4606
|
+
return /* @__PURE__ */ jsx(AspectRatio$1.Root, { "data-slot": "aspect-ratio", ...props });
|
|
4607
|
+
}
|
|
4608
|
+
var headings = {
|
|
4609
|
+
h1: "h1",
|
|
4610
|
+
h2: "h2",
|
|
4611
|
+
h3: "h3",
|
|
4612
|
+
h4: "h4",
|
|
4613
|
+
h5: "h5",
|
|
4614
|
+
h6: "h6"
|
|
4615
|
+
};
|
|
4616
|
+
function Toolbar({
|
|
4617
|
+
className,
|
|
4618
|
+
...props
|
|
4619
|
+
}) {
|
|
4620
|
+
return /* @__PURE__ */ jsx(
|
|
4621
|
+
"div",
|
|
4622
|
+
{
|
|
4623
|
+
"data-slot": "toolbar",
|
|
4624
|
+
className: cn(
|
|
4625
|
+
"flex items-center justify-between grow gap-2.5 pb-5",
|
|
4626
|
+
className
|
|
4627
|
+
),
|
|
4628
|
+
...props
|
|
4629
|
+
}
|
|
4630
|
+
);
|
|
4631
|
+
}
|
|
4632
|
+
function ToolbarHeading({
|
|
4633
|
+
className,
|
|
4634
|
+
...props
|
|
4635
|
+
}) {
|
|
4636
|
+
return /* @__PURE__ */ jsx(
|
|
4637
|
+
"div",
|
|
4638
|
+
{
|
|
4639
|
+
"data-slot": "toolbar-heading",
|
|
4640
|
+
className: cn("flex flex-col flex-wrap gap-px", className),
|
|
4641
|
+
...props
|
|
4642
|
+
}
|
|
4643
|
+
);
|
|
4644
|
+
}
|
|
4645
|
+
function ToolbarTitle({
|
|
4646
|
+
className,
|
|
4647
|
+
as: Component = "h1",
|
|
4648
|
+
...props
|
|
4649
|
+
}) {
|
|
4650
|
+
return /* @__PURE__ */ jsx(
|
|
4651
|
+
Component,
|
|
4652
|
+
{
|
|
4653
|
+
"data-slot": "toolbar-title",
|
|
4654
|
+
className: cn("font-semibold text-foreground text-lg", className),
|
|
4655
|
+
...props
|
|
4656
|
+
}
|
|
4657
|
+
);
|
|
4658
|
+
}
|
|
4659
|
+
function ToolbarDescription({
|
|
4660
|
+
className,
|
|
4661
|
+
...props
|
|
4662
|
+
}) {
|
|
4663
|
+
return /* @__PURE__ */ jsx(
|
|
4664
|
+
"div",
|
|
4665
|
+
{
|
|
4666
|
+
"data-slot": "toolbar-description",
|
|
4667
|
+
className: cn(
|
|
4668
|
+
"flex items-center gap-2 text-sm font-normal text-secondary-foreground",
|
|
4669
|
+
className
|
|
4670
|
+
),
|
|
4671
|
+
...props
|
|
4672
|
+
}
|
|
4673
|
+
);
|
|
4674
|
+
}
|
|
4675
|
+
function ToolbarActions({
|
|
4676
|
+
className,
|
|
4677
|
+
...props
|
|
4678
|
+
}) {
|
|
4679
|
+
return /* @__PURE__ */ jsx(
|
|
4680
|
+
"div",
|
|
4681
|
+
{
|
|
4682
|
+
"data-slot": "toolbar-actions",
|
|
4683
|
+
className: cn(
|
|
4684
|
+
"flex items-center flex-wrap gap-1.5 lg:gap-3.5",
|
|
4685
|
+
className
|
|
4686
|
+
),
|
|
4687
|
+
...props
|
|
4688
|
+
}
|
|
4689
|
+
);
|
|
4690
|
+
}
|
|
4138
4691
|
var MOBILE_BREAKPOINT = 992;
|
|
4139
4692
|
function useIsMobile() {
|
|
4140
4693
|
const [isMobile, setIsMobile] = React.useState(
|
|
@@ -4181,6 +4734,6 @@ function useMounted() {
|
|
|
4181
4734
|
return mounted;
|
|
4182
4735
|
}
|
|
4183
4736
|
|
|
4184
|
-
export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, DataGridColumnHeader, DataGridColumnVisibility, DataGridContainer, DataGridPagination, DataGridProvider, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label2 as Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, useCopyToClipboard, useDataGrid, useIsMobile, useMounted };
|
|
4737
|
+
export { Alert, AlertContent, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AlertToolbar, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DataGrid, DataGridColumnHeader, DataGridColumnVisibility, DataGridContainer, DataGridPagination, DataGridProvider, DataGridTable, DataGridTableBase, DataGridTableBody, DataGridTableBodyRow, DataGridTableBodyRowCell, DataGridTableBodyRowExpanded, DataGridTableBodyRowSkeleton, DataGridTableBodyRowSkeletonCell, DataGridTableEmpty, DataGridTableHead, DataGridTableHeadRow, DataGridTableHeadRowCell, DataGridTableHeadRowCellResize, DataGridTableLoader, DataGridTableRowSelect, DataGridTableRowSelectAll, DataGridTableRowSpacer, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Label2 as Label, Popover, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Scrollspy, Select, SelectContent, SelectGroup, SelectIndicator, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Spinner, Switch, SwitchIndicator, SwitchWrapper, Tabs, TabsContent, TabsList, TabsTrigger, Toolbar, ToolbarActions, ToolbarDescription, ToolbarHeading, ToolbarTitle, avatarStatusVariants, badgeVariants, buttonVariantConfig, buttonVariants, cn, headings, inputAddonVariants, inputVariants, labelVariants, selectTriggerVariants, switchShapes, switchSizes, tabsListVariantConfig, useCopyToClipboard, useDataGrid, useIsMobile, useMounted };
|
|
4185
4738
|
//# sourceMappingURL=index.js.map
|
|
4186
4739
|
//# sourceMappingURL=index.js.map
|