react-shadcn-kit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +113 -0
- package/dist/assets/global.css +1 -0
- package/dist/atoms/accordion.d.ts +7 -0
- package/dist/atoms/accordion.js +62 -0
- package/dist/atoms/alert-dialog.d.ts +14 -0
- package/dist/atoms/alert-dialog.js +127 -0
- package/dist/atoms/alert.d.ts +9 -0
- package/dist/atoms/alert.js +60 -0
- package/dist/atoms/aspect-ratio.d.ts +3 -0
- package/dist/atoms/aspect-ratio.js +8 -0
- package/dist/atoms/avatar.d.ts +6 -0
- package/dist/atoms/avatar.js +41 -0
- package/dist/atoms/badge.d.ts +9 -0
- package/dist/atoms/badge.js +32 -0
- package/dist/atoms/breadcrumb.d.ts +11 -0
- package/dist/atoms/breadcrumb.js +95 -0
- package/dist/atoms/button-group.d.ts +11 -0
- package/dist/atoms/button-group.js +75 -0
- package/dist/atoms/button.d.ts +10 -0
- package/dist/atoms/button.js +51 -0
- package/dist/atoms/calendar.d.ts +8 -0
- package/dist/atoms/calendar.js +144 -0
- package/dist/atoms/card.d.ts +9 -0
- package/dist/atoms/card.js +80 -0
- package/dist/atoms/carousel.d.ts +19 -0
- package/dist/atoms/carousel.js +165 -0
- package/dist/atoms/chart.d.ts +43 -0
- package/dist/atoms/chart.js +203 -0
- package/dist/atoms/checkbox.d.ts +4 -0
- package/dist/atoms/checkbox.js +28 -0
- package/dist/atoms/collapsible.d.ts +5 -0
- package/dist/atoms/collapsible.js +20 -0
- package/dist/atoms/command.d.ts +18 -0
- package/dist/atoms/command.js +143 -0
- package/dist/atoms/context-menu.d.ts +25 -0
- package/dist/atoms/context-menu.js +200 -0
- package/dist/atoms/dialog.d.ts +15 -0
- package/dist/atoms/dialog.js +122 -0
- package/dist/atoms/drawer.d.ts +13 -0
- package/dist/atoms/drawer.js +117 -0
- package/dist/atoms/dropdown-menu.d.ts +25 -0
- package/dist/atoms/dropdown-menu.js +204 -0
- package/dist/atoms/empty.d.ts +11 -0
- package/dist/atoms/empty.js +99 -0
- package/dist/atoms/field.d.ts +24 -0
- package/dist/atoms/field.js +208 -0
- package/dist/atoms/form.d.ts +24 -0
- package/dist/atoms/form.js +87 -0
- package/dist/atoms/hover-card.d.ts +6 -0
- package/dist/atoms/hover-card.js +34 -0
- package/dist/atoms/input-group.d.ts +16 -0
- package/dist/atoms/input-group.js +142 -0
- package/dist/atoms/input-otp.d.ts +11 -0
- package/dist/atoms/input-otp.js +55 -0
- package/dist/atoms/input.d.ts +3 -0
- package/dist/atoms/input.js +21 -0
- package/dist/atoms/item.d.ts +23 -0
- package/dist/atoms/item.js +164 -0
- package/dist/atoms/kbd.d.ts +3 -0
- package/dist/atoms/kbd.js +31 -0
- package/dist/atoms/label.d.ts +4 -0
- package/dist/atoms/label.js +19 -0
- package/dist/atoms/menubar.d.ts +26 -0
- package/dist/atoms/menubar.js +229 -0
- package/dist/atoms/navigation-menu.d.ts +14 -0
- package/dist/atoms/navigation-menu.js +159 -0
- package/dist/atoms/pagination.d.ts +13 -0
- package/dist/atoms/pagination.js +100 -0
- package/dist/atoms/popover.d.ts +7 -0
- package/dist/atoms/popover.js +38 -0
- package/dist/atoms/progress.d.ts +4 -0
- package/dist/atoms/progress.js +28 -0
- package/dist/atoms/radio-group.d.ts +5 -0
- package/dist/atoms/radio-group.js +45 -0
- package/dist/atoms/resizable.d.ts +8 -0
- package/dist/atoms/resizable.js +43 -0
- package/dist/atoms/scroll-area.d.ts +5 -0
- package/dist/atoms/scroll-area.js +60 -0
- package/dist/atoms/select.d.ts +15 -0
- package/dist/atoms/select.js +156 -0
- package/dist/atoms/separator.d.ts +4 -0
- package/dist/atoms/separator.js +26 -0
- package/dist/atoms/sheet.d.ts +13 -0
- package/dist/atoms/sheet.js +117 -0
- package/dist/atoms/sidebar.d.ts +69 -0
- package/dist/atoms/sidebar.js +570 -0
- package/dist/atoms/skeleton.d.ts +2 -0
- package/dist/atoms/skeleton.js +15 -0
- package/dist/atoms/slider.d.ts +4 -0
- package/dist/atoms/slider.js +63 -0
- package/dist/atoms/sonner.d.ts +3 -0
- package/dist/atoms/sonner.js +31 -0
- package/dist/atoms/spinner.d.ts +2 -0
- package/dist/atoms/spinner.js +17 -0
- package/dist/atoms/switch.d.ts +4 -0
- package/dist/atoms/switch.js +28 -0
- package/dist/atoms/table.d.ts +10 -0
- package/dist/atoms/table.js +94 -0
- package/dist/atoms/tabs.d.ts +7 -0
- package/dist/atoms/tabs.js +55 -0
- package/dist/atoms/textarea.d.ts +3 -0
- package/dist/atoms/textarea.js +18 -0
- package/dist/atoms/toggle-group.d.ts +9 -0
- package/dist/atoms/toggle-group.js +68 -0
- package/dist/atoms/toggle.d.ts +9 -0
- package/dist/atoms/toggle.js +43 -0
- package/dist/atoms/tooltip.d.ts +7 -0
- package/dist/atoms/tooltip.js +51 -0
- package/dist/config/default-navigation.js +136 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +347 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/molecules/app-navbar.d.ts +11 -0
- package/dist/molecules/app-navbar.js +117 -0
- package/dist/molecules/app-sidebar.d.ts +9 -0
- package/dist/molecules/app-sidebar.js +121 -0
- package/dist/organisms/layout.d.ts +3 -0
- package/dist/organisms/layout.js +16 -0
- package/package.json +120 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "@radix-ui/react-hover-card";
|
|
3
|
+
import { cn as i } from "../lib/utils.js";
|
|
4
|
+
function m({ ...t }) {
|
|
5
|
+
return /* @__PURE__ */ o(r.Root, { "data-slot": "hover-card", ...t });
|
|
6
|
+
}
|
|
7
|
+
function l({ ...t }) {
|
|
8
|
+
return /* @__PURE__ */ o(r.Trigger, { "data-slot": "hover-card-trigger", ...t });
|
|
9
|
+
}
|
|
10
|
+
function c({
|
|
11
|
+
className: t,
|
|
12
|
+
align: e = "center",
|
|
13
|
+
sideOffset: a = 4,
|
|
14
|
+
...d
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ o(r.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ o(
|
|
17
|
+
r.Content,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "hover-card-content",
|
|
20
|
+
align: e,
|
|
21
|
+
sideOffset: a,
|
|
22
|
+
className: i(
|
|
23
|
+
"bg-popover text-popover-foreground 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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
24
|
+
t
|
|
25
|
+
),
|
|
26
|
+
...d
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
m as HoverCard,
|
|
32
|
+
c as HoverCardContent,
|
|
33
|
+
l as HoverCardTrigger
|
|
34
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Button } from './button';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "icon-sm" | "xs" | "icon-xs" | null | undefined;
|
|
11
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cva as s } from "class-variance-authority";
|
|
3
|
+
import { cn as n } from "../lib/utils.js";
|
|
4
|
+
import { Button as u } from "./button.js";
|
|
5
|
+
import { Input as p } from "./input.js";
|
|
6
|
+
import { Textarea as l } from "./textarea.js";
|
|
7
|
+
function v({ className: a, ...t }) {
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "input-group",
|
|
12
|
+
role: "group",
|
|
13
|
+
className: n(
|
|
14
|
+
"group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none",
|
|
15
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
16
|
+
// Variants based on alignment.
|
|
17
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
18
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
19
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
20
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
21
|
+
// Focus state.
|
|
22
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
23
|
+
// Error state.
|
|
24
|
+
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
25
|
+
a
|
|
26
|
+
),
|
|
27
|
+
...t
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
const d = s(
|
|
32
|
+
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
align: {
|
|
36
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
37
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]",
|
|
38
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
39
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
align: "inline-start"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
function k({
|
|
48
|
+
className: a,
|
|
49
|
+
align: t = "inline-start",
|
|
50
|
+
...e
|
|
51
|
+
}) {
|
|
52
|
+
return /* @__PURE__ */ r(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
role: "group",
|
|
56
|
+
"data-slot": "input-group-addon",
|
|
57
|
+
"data-align": t,
|
|
58
|
+
className: n(d({ align: t }), a),
|
|
59
|
+
onClick: (o) => {
|
|
60
|
+
o.target.closest("button") || o.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
61
|
+
},
|
|
62
|
+
...e
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const c = s("text-sm shadow-none flex gap-2 items-center", {
|
|
67
|
+
variants: {
|
|
68
|
+
size: {
|
|
69
|
+
xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
70
|
+
sm: "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
71
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
72
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
size: "xs"
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
function z({
|
|
80
|
+
className: a,
|
|
81
|
+
type: t = "button",
|
|
82
|
+
variant: e = "ghost",
|
|
83
|
+
size: o = "xs",
|
|
84
|
+
...i
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ r(
|
|
87
|
+
u,
|
|
88
|
+
{
|
|
89
|
+
type: t,
|
|
90
|
+
"data-size": o,
|
|
91
|
+
variant: e,
|
|
92
|
+
className: n(c({ size: o }), a),
|
|
93
|
+
...i
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function w({ className: a, ...t }) {
|
|
98
|
+
return /* @__PURE__ */ r(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
className: n(
|
|
102
|
+
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
103
|
+
a
|
|
104
|
+
),
|
|
105
|
+
...t
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function G({ className: a, ...t }) {
|
|
110
|
+
return /* @__PURE__ */ r(
|
|
111
|
+
p,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "input-group-control",
|
|
114
|
+
className: n(
|
|
115
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
116
|
+
a
|
|
117
|
+
),
|
|
118
|
+
...t
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function I({ className: a, ...t }) {
|
|
123
|
+
return /* @__PURE__ */ r(
|
|
124
|
+
l,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "input-group-control",
|
|
127
|
+
className: n(
|
|
128
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
129
|
+
a
|
|
130
|
+
),
|
|
131
|
+
...t
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
v as InputGroup,
|
|
137
|
+
k as InputGroupAddon,
|
|
138
|
+
z as InputGroupButton,
|
|
139
|
+
G as InputGroupInput,
|
|
140
|
+
w as InputGroupText,
|
|
141
|
+
I as InputGroupTextarea
|
|
142
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OTPInput } from 'input-otp';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
|
|
8
|
+
index: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import { OTPInput as l, OTPInputContext as p } from "input-otp";
|
|
4
|
+
import { MinusIcon as m } from "lucide-react";
|
|
5
|
+
import { cn as a } from "../lib/utils.js";
|
|
6
|
+
function g({
|
|
7
|
+
className: t,
|
|
8
|
+
containerClassName: r,
|
|
9
|
+
...i
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
l,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "input-otp",
|
|
15
|
+
containerClassName: a("flex items-center gap-2 has-disabled:opacity-50", r),
|
|
16
|
+
className: a("disabled:cursor-not-allowed", t),
|
|
17
|
+
...i
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function h({ className: t, ...r }) {
|
|
22
|
+
return /* @__PURE__ */ e("div", { "data-slot": "input-otp-group", className: a("flex items-center", t), ...r });
|
|
23
|
+
}
|
|
24
|
+
function I({
|
|
25
|
+
index: t,
|
|
26
|
+
className: r,
|
|
27
|
+
...i
|
|
28
|
+
}) {
|
|
29
|
+
const n = c.useContext(p), { char: o, hasFakeCaret: s, isActive: d } = n?.slots[t] ?? {};
|
|
30
|
+
return /* @__PURE__ */ u(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "input-otp-slot",
|
|
34
|
+
"data-active": d,
|
|
35
|
+
className: a(
|
|
36
|
+
"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
|
|
37
|
+
r
|
|
38
|
+
),
|
|
39
|
+
...i,
|
|
40
|
+
children: [
|
|
41
|
+
o,
|
|
42
|
+
s && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function O({ ...t }) {
|
|
48
|
+
return /* @__PURE__ */ e("div", { "data-slot": "input-otp-separator", role: "separator", ...t, children: /* @__PURE__ */ e(m, {}) });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
g as InputOTP,
|
|
52
|
+
h as InputOTPGroup,
|
|
53
|
+
O as InputOTPSeparator,
|
|
54
|
+
I as InputOTPSlot
|
|
55
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../lib/utils.js";
|
|
3
|
+
function a({ className: e, type: i, ...r }) {
|
|
4
|
+
return /* @__PURE__ */ t(
|
|
5
|
+
"input",
|
|
6
|
+
{
|
|
7
|
+
type: i,
|
|
8
|
+
"data-slot": "input",
|
|
9
|
+
className: n(
|
|
10
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
12
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...r
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
a as Input
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Separator } from './separator';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const itemVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const itemMediaVariants: (props?: ({
|
|
14
|
+
variant?: "default" | "icon" | "image" | null | undefined;
|
|
15
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
16
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { Item, ItemMedia, ItemContent, ItemActions, ItemGroup, ItemSeparator, ItemTitle, ItemDescription, ItemHeader, ItemFooter, };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as l } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as n } from "class-variance-authority";
|
|
4
|
+
import { cn as i } from "../lib/utils.js";
|
|
5
|
+
import { Separator as m } from "./separator.js";
|
|
6
|
+
function b({ className: e, ...t }) {
|
|
7
|
+
return /* @__PURE__ */ a(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
role: "list",
|
|
11
|
+
"data-slot": "item-group",
|
|
12
|
+
className: i("group/item-group flex flex-col", e),
|
|
13
|
+
...t
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function I({ className: e, ...t }) {
|
|
18
|
+
return /* @__PURE__ */ a(
|
|
19
|
+
m,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "item-separator",
|
|
22
|
+
orientation: "horizontal",
|
|
23
|
+
className: i("my-0", e),
|
|
24
|
+
...t
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
const d = n(
|
|
29
|
+
"group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
variant: {
|
|
33
|
+
default: "bg-transparent",
|
|
34
|
+
outline: "border-border",
|
|
35
|
+
muted: "bg-muted/50"
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
default: "p-4 gap-4 ",
|
|
39
|
+
sm: "py-3 px-4 gap-2.5"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default",
|
|
44
|
+
size: "default"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
function N({
|
|
49
|
+
className: e,
|
|
50
|
+
variant: t = "default",
|
|
51
|
+
size: r = "default",
|
|
52
|
+
asChild: o = !1,
|
|
53
|
+
...s
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ a(
|
|
56
|
+
o ? l : "div",
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "item",
|
|
59
|
+
"data-variant": t,
|
|
60
|
+
"data-size": r,
|
|
61
|
+
className: i(d({ variant: t, size: r, className: e })),
|
|
62
|
+
...s
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const u = n(
|
|
67
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5",
|
|
68
|
+
{
|
|
69
|
+
variants: {
|
|
70
|
+
variant: {
|
|
71
|
+
default: "bg-transparent",
|
|
72
|
+
icon: "size-8 border rounded-sm bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
73
|
+
image: "size-10 rounded-sm overflow-hidden [&_img]:size-full [&_img]:object-cover"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
variant: "default"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
function h({
|
|
82
|
+
className: e,
|
|
83
|
+
variant: t = "default",
|
|
84
|
+
...r
|
|
85
|
+
}) {
|
|
86
|
+
return /* @__PURE__ */ a(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
"data-slot": "item-media",
|
|
90
|
+
"data-variant": t,
|
|
91
|
+
className: i(u({ variant: t, className: e })),
|
|
92
|
+
...r
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function z({ className: e, ...t }) {
|
|
97
|
+
return /* @__PURE__ */ a(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "item-content",
|
|
101
|
+
className: i("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", e),
|
|
102
|
+
...t
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function y({ className: e, ...t }) {
|
|
107
|
+
return /* @__PURE__ */ a(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "item-title",
|
|
111
|
+
className: i("flex w-fit items-center gap-2 text-sm leading-snug font-medium", e),
|
|
112
|
+
...t
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function j({ className: e, ...t }) {
|
|
117
|
+
return /* @__PURE__ */ a(
|
|
118
|
+
"p",
|
|
119
|
+
{
|
|
120
|
+
"data-slot": "item-description",
|
|
121
|
+
className: i(
|
|
122
|
+
"text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance",
|
|
123
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
124
|
+
e
|
|
125
|
+
),
|
|
126
|
+
...t
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function w({ className: e, ...t }) {
|
|
131
|
+
return /* @__PURE__ */ a("div", { "data-slot": "item-actions", className: i("flex items-center gap-2", e), ...t });
|
|
132
|
+
}
|
|
133
|
+
function V({ className: e, ...t }) {
|
|
134
|
+
return /* @__PURE__ */ a(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
"data-slot": "item-header",
|
|
138
|
+
className: i("flex basis-full items-center justify-between gap-2", e),
|
|
139
|
+
...t
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
function _({ className: e, ...t }) {
|
|
144
|
+
return /* @__PURE__ */ a(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
"data-slot": "item-footer",
|
|
148
|
+
className: i("flex basis-full items-center justify-between gap-2", e),
|
|
149
|
+
...t
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
N as Item,
|
|
155
|
+
w as ItemActions,
|
|
156
|
+
z as ItemContent,
|
|
157
|
+
j as ItemDescription,
|
|
158
|
+
_ as ItemFooter,
|
|
159
|
+
b as ItemGroup,
|
|
160
|
+
V as ItemHeader,
|
|
161
|
+
h as ItemMedia,
|
|
162
|
+
I as ItemSeparator,
|
|
163
|
+
y as ItemTitle
|
|
164
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../lib/utils.js";
|
|
3
|
+
function r({ className: t, ...e }) {
|
|
4
|
+
return /* @__PURE__ */ n(
|
|
5
|
+
"kbd",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "kbd",
|
|
8
|
+
className: o(
|
|
9
|
+
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none",
|
|
10
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
11
|
+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
12
|
+
t
|
|
13
|
+
),
|
|
14
|
+
...e
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function d({ className: t, ...e }) {
|
|
19
|
+
return /* @__PURE__ */ n(
|
|
20
|
+
"kbd",
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "kbd-group",
|
|
23
|
+
className: o("inline-flex items-center gap-1", t),
|
|
24
|
+
...e
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
r as Kbd,
|
|
30
|
+
d as KbdGroup
|
|
31
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "@radix-ui/react-label";
|
|
3
|
+
import { cn as r } from "../lib/utils.js";
|
|
4
|
+
function l({ className: e, ...t }) {
|
|
5
|
+
return /* @__PURE__ */ o(
|
|
6
|
+
a.Root,
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "label",
|
|
9
|
+
className: r(
|
|
10
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
11
|
+
e
|
|
12
|
+
),
|
|
13
|
+
...t
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
l as Label
|
|
19
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function MenubarItem({ className, inset, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function MenubarCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function MenubarRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function MenubarLabel({ className, inset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function MenubarSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { Menubar, MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, };
|