@mzc-fe/design-system 0.0.8 → 0.0.9-rc.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/dist/components/accordion/accordion.js +52 -0
- package/dist/components/alert/alert.js +56 -0
- package/dist/components/alert-dialog/alert-dialog.js +107 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +10 -0
- package/dist/components/avatar/avatar.js +54 -0
- package/dist/components/badge/badge.js +41 -0
- package/dist/components/breadcrumb/breadcrumb.js +103 -0
- package/dist/components/button/button.js +72 -0
- package/dist/components/button-group/button-group.js +75 -0
- package/dist/components/calendar/calendar.js +173 -0
- package/dist/components/card/card.js +62 -0
- package/dist/components/carousel/carousel.js +177 -0
- package/dist/components/chart/chart.js +213 -0
- package/dist/components/checkbox/checkbox.js +32 -0
- package/dist/components/collapsible/collapsible.js +34 -0
- package/dist/components/combobox/combobox.js +332 -0
- package/dist/components/command/command.js +121 -0
- package/dist/components/context-menu/context-menu.js +199 -0
- package/dist/components/dialog/dialog.js +158 -0
- package/dist/components/drawer/drawer.js +123 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +225 -0
- package/dist/components/empty/empty.js +102 -0
- package/dist/components/field/field.js +200 -0
- package/dist/components/form/form.js +101 -0
- package/dist/components/hover-card/hover-card.js +44 -0
- package/dist/components/input/input.js +22 -0
- package/dist/components/input-group/input-group.d.ts +21 -9
- package/dist/components/input-group/input-group.js +177 -0
- package/dist/components/input-otp/input-otp.js +65 -0
- package/dist/components/item/item.js +149 -0
- package/dist/components/kbd/kbd.js +31 -0
- package/dist/components/label/label.js +23 -0
- package/dist/components/menubar/menubar.js +229 -0
- package/dist/components/navigation-menu/navigation-menu.js +160 -0
- package/dist/components/pagination/pagination.js +119 -0
- package/dist/components/popover/popover.js +115 -0
- package/dist/components/progress/progress.js +32 -0
- package/dist/components/radio-group/radio-group.js +46 -0
- package/dist/components/resizable/resizable.js +41 -0
- package/dist/components/scroll-area/scroll-area.js +61 -0
- package/dist/components/select/select.d.ts +17 -12
- package/dist/components/select/select.js +175 -0
- package/dist/components/separator/separator.js +27 -0
- package/dist/components/sheet/sheet.js +100 -0
- package/dist/components/sidebar/sidebar.js +593 -0
- package/dist/components/skeleton/skeleton.js +15 -0
- package/dist/components/slider/slider.js +63 -0
- package/dist/components/sonner/sonner.js +31 -0
- package/dist/components/spinner/spinner.js +20 -0
- package/dist/components/stepper/stepper.js +205 -0
- package/dist/components/switch/switch.js +32 -0
- package/dist/components/table/table.js +74 -0
- package/dist/components/tabs/tabs.js +126 -0
- package/dist/components/textarea/textarea.js +19 -0
- package/dist/components/toggle/toggle.js +44 -0
- package/dist/components/toggle-group/toggle-group.js +69 -0
- package/dist/components/tooltip/tooltip.js +56 -0
- package/dist/design-system.css +1 -1
- package/dist/foundations/ThemeProvider.js +35 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +364 -0
- package/dist/lib/utils.js +8 -0
- package/package.json +7 -5
- package/dist/design-system.es.js +0 -5362
- package/dist/design-system.umd.js +0 -7
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import * as r from "@radix-ui/react-accordion";
|
|
4
|
+
import { ChevronDownIcon as s } from "lucide-react";
|
|
5
|
+
import { cn as i } from "../../lib/utils.js";
|
|
6
|
+
function f({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ o(r.Root, { "data-slot": "accordion", ...e });
|
|
8
|
+
}
|
|
9
|
+
function u({ className: e, ...t }) {
|
|
10
|
+
return /* @__PURE__ */ o(
|
|
11
|
+
r.Item,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "accordion-item",
|
|
14
|
+
className: i("border-border border-b last:border-b-0", e),
|
|
15
|
+
...t
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function p({ className: e, children: t, ...n }) {
|
|
20
|
+
return /* @__PURE__ */ o(r.Header, { className: "flex", children: /* @__PURE__ */ a(
|
|
21
|
+
r.Trigger,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "accordion-trigger",
|
|
24
|
+
className: i(
|
|
25
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
26
|
+
e
|
|
27
|
+
),
|
|
28
|
+
...n,
|
|
29
|
+
children: [
|
|
30
|
+
t,
|
|
31
|
+
/* @__PURE__ */ o(s, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}
|
|
36
|
+
function b({ className: e, children: t, ...n }) {
|
|
37
|
+
return /* @__PURE__ */ o(
|
|
38
|
+
r.Content,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "accordion-content",
|
|
41
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
42
|
+
...n,
|
|
43
|
+
children: /* @__PURE__ */ o("div", { className: i("pt-0 pb-4", e), children: t })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
f as Accordion,
|
|
49
|
+
b as AccordionContent,
|
|
50
|
+
u as AccordionItem,
|
|
51
|
+
p as AccordionTrigger
|
|
52
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { cva as i } from "class-variance-authority";
|
|
4
|
+
import { cn as a } from "../../lib/utils.js";
|
|
5
|
+
const l = i(
|
|
6
|
+
[
|
|
7
|
+
"relative w-full grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr]",
|
|
8
|
+
"px-4 py-3 gap-y-0.5 has-[>svg]:gap-x-3",
|
|
9
|
+
"border-border border rounded-lg",
|
|
10
|
+
"text-sm",
|
|
11
|
+
"items-start",
|
|
12
|
+
"[&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current"
|
|
13
|
+
],
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "bg-card text-card-foreground",
|
|
18
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function g({ className: t, variant: r, ...s }) {
|
|
27
|
+
return /* @__PURE__ */ e("div", { "data-slot": "alert", role: "alert", className: a(l({ variant: r }), t), ...s });
|
|
28
|
+
}
|
|
29
|
+
function u({ className: t, ...r }) {
|
|
30
|
+
return /* @__PURE__ */ e(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "alert-title",
|
|
34
|
+
className: a("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", t),
|
|
35
|
+
...r
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function m({ className: t, ...r }) {
|
|
40
|
+
return /* @__PURE__ */ e(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "alert-description",
|
|
44
|
+
className: a(
|
|
45
|
+
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
46
|
+
t
|
|
47
|
+
),
|
|
48
|
+
...r
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
g as Alert,
|
|
54
|
+
m as AlertDescription,
|
|
55
|
+
u as AlertTitle
|
|
56
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import * as o from "@radix-ui/react-alert-dialog";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
|
+
import { buttonVariants as r } from "../button/button.js";
|
|
6
|
+
function m({ ...t }) {
|
|
7
|
+
return /* @__PURE__ */ e(o.Root, { "data-slot": "alert-dialog", ...t });
|
|
8
|
+
}
|
|
9
|
+
function f({ ...t }) {
|
|
10
|
+
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
|
|
11
|
+
}
|
|
12
|
+
function n({ ...t }) {
|
|
13
|
+
return /* @__PURE__ */ e(o.Portal, { "data-slot": "alert-dialog-portal", ...t });
|
|
14
|
+
}
|
|
15
|
+
function s({ className: t, ...a }) {
|
|
16
|
+
return /* @__PURE__ */ e(
|
|
17
|
+
o.Overlay,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "alert-dialog-overlay",
|
|
20
|
+
className: l(
|
|
21
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
22
|
+
t
|
|
23
|
+
),
|
|
24
|
+
...a
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function p({ className: t, ...a }) {
|
|
29
|
+
return /* @__PURE__ */ i(n, { children: [
|
|
30
|
+
/* @__PURE__ */ e(s, {}),
|
|
31
|
+
/* @__PURE__ */ e(
|
|
32
|
+
o.Content,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "alert-dialog-content",
|
|
35
|
+
className: l(
|
|
36
|
+
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 sm:max-w-lg",
|
|
37
|
+
"bg-background border-border rounded-lg border p-6 shadow-lg",
|
|
38
|
+
"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 duration-200",
|
|
39
|
+
t
|
|
40
|
+
),
|
|
41
|
+
...a
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
function x({ className: t, ...a }) {
|
|
47
|
+
return /* @__PURE__ */ e(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "alert-dialog-header",
|
|
51
|
+
className: l("flex flex-col gap-2 text-center sm:text-left", t),
|
|
52
|
+
...a
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function A({ className: t, ...a }) {
|
|
57
|
+
return /* @__PURE__ */ e(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "alert-dialog-footer",
|
|
61
|
+
className: l("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t),
|
|
62
|
+
...a
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function D({ className: t, ...a }) {
|
|
67
|
+
return /* @__PURE__ */ e(
|
|
68
|
+
o.Title,
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "alert-dialog-title",
|
|
71
|
+
className: l("text-lg font-semibold", t),
|
|
72
|
+
...a
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function b({
|
|
77
|
+
className: t,
|
|
78
|
+
...a
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ e(
|
|
81
|
+
o.Description,
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "alert-dialog-description",
|
|
84
|
+
className: l("text-muted-foreground text-sm", t),
|
|
85
|
+
...a
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function v({ className: t, ...a }) {
|
|
90
|
+
return /* @__PURE__ */ e(o.Action, { className: l(r(), t), ...a });
|
|
91
|
+
}
|
|
92
|
+
function N({ className: t, ...a }) {
|
|
93
|
+
return /* @__PURE__ */ e(o.Cancel, { className: l(r({ variant: "outline" }), t), ...a });
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
m as AlertDialog,
|
|
97
|
+
v as AlertDialogAction,
|
|
98
|
+
N as AlertDialogCancel,
|
|
99
|
+
p as AlertDialogContent,
|
|
100
|
+
b as AlertDialogDescription,
|
|
101
|
+
A as AlertDialogFooter,
|
|
102
|
+
x as AlertDialogHeader,
|
|
103
|
+
s as AlertDialogOverlay,
|
|
104
|
+
n as AlertDialogPortal,
|
|
105
|
+
D as AlertDialogTitle,
|
|
106
|
+
f as AlertDialogTrigger
|
|
107
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import * as r from "@radix-ui/react-avatar";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
|
+
function m({
|
|
6
|
+
className: a,
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ e(
|
|
10
|
+
r.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "avatar",
|
|
13
|
+
className: l(
|
|
14
|
+
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
15
|
+
a
|
|
16
|
+
),
|
|
17
|
+
...t
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function n({
|
|
22
|
+
className: a,
|
|
23
|
+
...t
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ e(
|
|
26
|
+
r.Image,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "avatar-image",
|
|
29
|
+
className: l("aspect-square size-full", a),
|
|
30
|
+
...t
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function f({
|
|
35
|
+
className: a,
|
|
36
|
+
...t
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ e(
|
|
39
|
+
r.Fallback,
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "avatar-fallback",
|
|
42
|
+
className: l(
|
|
43
|
+
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
44
|
+
a
|
|
45
|
+
),
|
|
46
|
+
...t
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
m as Avatar,
|
|
52
|
+
f as AvatarFallback,
|
|
53
|
+
n as AvatarImage
|
|
54
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Slot as o } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { cn as s } from "../../lib/utils.js";
|
|
6
|
+
const d = n(
|
|
7
|
+
[
|
|
8
|
+
"inline-flex items-center justify-center px-2 py-0.5 w-fit shrink-0 gap-1 overflow-hidden",
|
|
9
|
+
"text-xs font-medium whitespace-nowrap",
|
|
10
|
+
"rounded-full border border-border",
|
|
11
|
+
"transition-[color,box-shadow]",
|
|
12
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
13
|
+
"aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
|
|
14
|
+
"dark:aria-invalid:ring-destructive/40",
|
|
15
|
+
"[&>svg]:size-3 [&>svg]:pointer-events-none"
|
|
16
|
+
],
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: ["border-transparent bg-primary text-primary-foreground", "[a&]:hover:bg-primary/90"],
|
|
21
|
+
secondary: ["border-transparent bg-secondary text-secondary-foreground", "[a&]:hover:bg-secondary/90"],
|
|
22
|
+
destructive: [
|
|
23
|
+
"border-transparent bg-destructive text-white",
|
|
24
|
+
"[a&]:hover:bg-destructive/90",
|
|
25
|
+
"focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
|
|
26
|
+
],
|
|
27
|
+
outline: ["text-foreground", "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "default"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
function l({ className: r, variant: e, asChild: t = !1, ...i }) {
|
|
36
|
+
return /* @__PURE__ */ a(t ? o : "span", { "data-slot": "badge", className: s(d({ variant: e }), r), ...i });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
l as Badge,
|
|
40
|
+
d as badgeVariants
|
|
41
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Slot as s } from "@radix-ui/react-slot";
|
|
4
|
+
import { ChevronRight as i, MoreHorizontal as l } from "lucide-react";
|
|
5
|
+
import { cn as t } from "../../lib/utils.js";
|
|
6
|
+
function f({ ...r }) {
|
|
7
|
+
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...r });
|
|
8
|
+
}
|
|
9
|
+
function g({ className: r, ...e }) {
|
|
10
|
+
return /* @__PURE__ */ a(
|
|
11
|
+
"ol",
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "breadcrumb-list",
|
|
14
|
+
className: t(
|
|
15
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
16
|
+
r
|
|
17
|
+
),
|
|
18
|
+
...e
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function x({ className: r, ...e }) {
|
|
23
|
+
return /* @__PURE__ */ a(
|
|
24
|
+
"li",
|
|
25
|
+
{
|
|
26
|
+
"data-slot": "breadcrumb-item",
|
|
27
|
+
className: t("inline-flex items-center gap-1.5", r),
|
|
28
|
+
...e
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function h({
|
|
33
|
+
asChild: r,
|
|
34
|
+
className: e,
|
|
35
|
+
...n
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ a(
|
|
38
|
+
r ? s : "a",
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "breadcrumb-link",
|
|
41
|
+
className: t("hover:text-foreground transition-colors", e),
|
|
42
|
+
...n
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function N({ className: r, ...e }) {
|
|
47
|
+
return /* @__PURE__ */ a(
|
|
48
|
+
"span",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "breadcrumb-page",
|
|
51
|
+
role: "link",
|
|
52
|
+
"aria-disabled": "true",
|
|
53
|
+
"aria-current": "page",
|
|
54
|
+
className: t("text-foreground font-normal", r),
|
|
55
|
+
...e
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function B({
|
|
60
|
+
children: r,
|
|
61
|
+
className: e,
|
|
62
|
+
...n
|
|
63
|
+
}) {
|
|
64
|
+
return /* @__PURE__ */ a(
|
|
65
|
+
"li",
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "breadcrumb-separator",
|
|
68
|
+
role: "presentation",
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
className: t("[&>svg]:size-3.5", e),
|
|
71
|
+
...n,
|
|
72
|
+
children: r ?? /* @__PURE__ */ a(i, {})
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
function k({
|
|
77
|
+
className: r,
|
|
78
|
+
...e
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ o(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
84
|
+
role: "presentation",
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
className: t("flex size-9 items-center justify-center", r),
|
|
87
|
+
...e,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ a(l, { className: "size-4" }),
|
|
90
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
f as Breadcrumb,
|
|
97
|
+
k as BreadcrumbEllipsis,
|
|
98
|
+
x as BreadcrumbItem,
|
|
99
|
+
h as BreadcrumbLink,
|
|
100
|
+
g as BreadcrumbList,
|
|
101
|
+
N as BreadcrumbPage,
|
|
102
|
+
B as BreadcrumbSeparator
|
|
103
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { Slot as a } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as s } from "class-variance-authority";
|
|
5
|
+
import { cn as d } from "../../lib/utils.js";
|
|
6
|
+
const u = s(
|
|
7
|
+
[
|
|
8
|
+
"inline-flex items-center justify-center gap-2 shrink-0 rounded-md",
|
|
9
|
+
"whitespace-nowrap text-sm font-medium",
|
|
10
|
+
"transition-all",
|
|
11
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
12
|
+
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
13
|
+
"outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
14
|
+
"aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
|
|
15
|
+
"dark:aria-invalid:ring-destructive/40"
|
|
16
|
+
],
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: ["bg-primary text-primary-foreground", "hover:bg-primary/90"],
|
|
21
|
+
destructive: [
|
|
22
|
+
"bg-destructive text-white",
|
|
23
|
+
"hover:bg-destructive/90",
|
|
24
|
+
"focus-visible:ring-destructive/20",
|
|
25
|
+
"dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
|
|
26
|
+
],
|
|
27
|
+
outline: [
|
|
28
|
+
"border border-border bg-background shadow-xs",
|
|
29
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
30
|
+
"dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
|
|
31
|
+
],
|
|
32
|
+
secondary: ["bg-secondary text-secondary-foreground", "hover:bg-secondary/80"],
|
|
33
|
+
ghost: ["hover:bg-accent hover:text-accent-foreground", "dark:hover:bg-accent/50"],
|
|
34
|
+
link: ["text-primary underline-offset-4", "hover:underline"]
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
default: ["h-9 px-4 py-2", "has-[>svg]:px-3"],
|
|
38
|
+
sm: ["h-8 rounded-md gap-1.5 px-3", "has-[>svg]:px-2.5"],
|
|
39
|
+
lg: ["h-10 rounded-md px-6", "has-[>svg]:px-4"],
|
|
40
|
+
icon: ["size-9"],
|
|
41
|
+
"icon-sm": ["size-8"],
|
|
42
|
+
"icon-lg": ["size-10"]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
variant: "default",
|
|
47
|
+
size: "default"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
function f({
|
|
52
|
+
className: t,
|
|
53
|
+
variant: e = "default",
|
|
54
|
+
size: r = "default",
|
|
55
|
+
asChild: i = !1,
|
|
56
|
+
...n
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ o(
|
|
59
|
+
i ? a : "button",
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "button",
|
|
62
|
+
"data-variant": e,
|
|
63
|
+
"data-size": r,
|
|
64
|
+
className: d(u({ variant: e, size: r, className: t })),
|
|
65
|
+
...n
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
f as Button,
|
|
71
|
+
u as buttonVariants
|
|
72
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as a } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as i } from "class-variance-authority";
|
|
4
|
+
import { cn as n } from "../../lib/utils.js";
|
|
5
|
+
import { Separator as s } from "../separator/separator.js";
|
|
6
|
+
const l = i(
|
|
7
|
+
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
12
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
function h({
|
|
21
|
+
className: o,
|
|
22
|
+
orientation: t,
|
|
23
|
+
...r
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ e(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
role: "group",
|
|
29
|
+
"data-slot": "button-group",
|
|
30
|
+
"data-orientation": t,
|
|
31
|
+
className: n(l({ orientation: t }), o),
|
|
32
|
+
...r
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function g({
|
|
37
|
+
className: o,
|
|
38
|
+
asChild: t = !1,
|
|
39
|
+
...r
|
|
40
|
+
}) {
|
|
41
|
+
return /* @__PURE__ */ e(
|
|
42
|
+
t ? a : "div",
|
|
43
|
+
{
|
|
44
|
+
className: n(
|
|
45
|
+
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
46
|
+
o
|
|
47
|
+
),
|
|
48
|
+
...r
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function v({
|
|
53
|
+
className: o,
|
|
54
|
+
orientation: t = "vertical",
|
|
55
|
+
...r
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */ e(
|
|
58
|
+
s,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "button-group-separator",
|
|
61
|
+
orientation: t,
|
|
62
|
+
className: n(
|
|
63
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
64
|
+
o
|
|
65
|
+
),
|
|
66
|
+
...r
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
h as ButtonGroup,
|
|
72
|
+
v as ButtonGroupSeparator,
|
|
73
|
+
g as ButtonGroupText,
|
|
74
|
+
l as buttonGroupVariants
|
|
75
|
+
};
|