@ichaingo/ui 1.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/.babelrc +12 -0
- package/README.md +103 -0
- package/components.json +21 -0
- package/dist/accordion.d.ts +13 -0
- package/dist/accordion.mjs +64 -0
- package/dist/alert-dialog.d.ts +27 -0
- package/dist/alert-dialog.mjs +146 -0
- package/dist/alert.d.ts +16 -0
- package/dist/alert.mjs +66 -0
- package/dist/aspect-ratio.d.ts +6 -0
- package/dist/aspect-ratio.mjs +10 -0
- package/dist/avatar.d.ts +11 -0
- package/dist/avatar.mjs +53 -0
- package/dist/badge.d.ts +14 -0
- package/dist/badge.mjs +39 -0
- package/dist/breadcrumb.d.ts +20 -0
- package/dist/breadcrumb.mjs +102 -0
- package/dist/button.d.ts +15 -0
- package/dist/button.mjs +49 -0
- package/dist/calendar.d.ts +23 -0
- package/dist/calendar.mjs +173 -0
- package/dist/card.d.ts +18 -0
- package/dist/card.mjs +90 -0
- package/dist/carousel.d.ts +42 -0
- package/dist/carousel.mjs +177 -0
- package/dist/checkbox.d.ts +7 -0
- package/dist/checkbox.mjs +31 -0
- package/dist/collapsible.d.ts +10 -0
- package/dist/collapsible.mjs +34 -0
- package/dist/command.d.ts +31 -0
- package/dist/command.mjs +170 -0
- package/dist/context-menu.d.ts +42 -0
- package/dist/context-menu.mjs +223 -0
- package/dist/dialog.d.ts +27 -0
- package/dist/dialog.mjs +136 -0
- package/dist/dropdown-menu.d.ts +42 -0
- package/dist/dropdown-menu.mjs +231 -0
- package/dist/form.d.ts +38 -0
- package/dist/form.mjs +101 -0
- package/dist/hover-card.d.ts +11 -0
- package/dist/hover-card.mjs +38 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.mjs +21 -0
- package/dist/label.d.ts +7 -0
- package/dist/label.mjs +23 -0
- package/dist/menubar.d.ts +44 -0
- package/dist/menubar.mjs +251 -0
- package/dist/navigation-menu.d.ts +26 -0
- package/dist/navigation-menu.mjs +170 -0
- package/dist/pagination.d.ts +33 -0
- package/dist/pagination.mjs +116 -0
- package/dist/popover.d.ts +13 -0
- package/dist/popover.mjs +44 -0
- package/dist/progress.d.ts +7 -0
- package/dist/progress.mjs +31 -0
- package/dist/radio-group.d.ts +9 -0
- package/dist/radio-group.mjs +45 -0
- package/dist/resizable.d.ts +13 -0
- package/dist/resizable.mjs +48 -0
- package/dist/scroll-area.d.ts +9 -0
- package/dist/scroll-area.mjs +60 -0
- package/dist/select.d.ts +27 -0
- package/dist/select.mjs +169 -0
- package/dist/separator.d.ts +7 -0
- package/dist/separator.mjs +26 -0
- package/dist/sheet.d.ts +23 -0
- package/dist/sheet.mjs +126 -0
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.mjs +15 -0
- package/dist/slider.d.ts +7 -0
- package/dist/slider.mjs +63 -0
- package/dist/sonner.d.ts +6 -0
- package/dist/sonner.mjs +22 -0
- package/dist/switch.d.ts +7 -0
- package/dist/switch.mjs +31 -0
- package/dist/table.d.ts +20 -0
- package/dist/table.mjs +114 -0
- package/dist/tabs.d.ts +13 -0
- package/dist/tabs.mjs +67 -0
- package/dist/textarea.d.ts +6 -0
- package/dist/textarea.mjs +18 -0
- package/dist/toggle-group.d.ts +16 -0
- package/dist/toggle-group.mjs +62 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.mjs +43 -0
- package/dist/tooltip.d.ts +13 -0
- package/dist/tooltip.mjs +55 -0
- package/dist/utils-B7J70Nno.js +8 -0
- package/eslint.config.mjs +12 -0
- package/package.json +273 -0
- package/postcss.config.js +6 -0
- package/src/components/ui/accordion.tsx +64 -0
- package/src/components/ui/alert-dialog.tsx +155 -0
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/aspect-ratio.tsx +9 -0
- package/src/components/ui/avatar.tsx +51 -0
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/breadcrumb.tsx +109 -0
- package/src/components/ui/button.tsx +59 -0
- package/src/components/ui/calendar.tsx +211 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/carousel.tsx +239 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/command.tsx +182 -0
- package/src/components/ui/context-menu.tsx +250 -0
- package/src/components/ui/dialog.tsx +141 -0
- package/src/components/ui/dropdown-menu.tsx +255 -0
- package/src/components/ui/form.tsx +165 -0
- package/src/components/ui/hover-card.tsx +42 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +274 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/pagination.tsx +125 -0
- package/src/components/ui/popover.tsx +46 -0
- package/src/components/ui/progress.tsx +29 -0
- package/src/components/ui/radio-group.tsx +43 -0
- package/src/components/ui/resizable.tsx +54 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +183 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +137 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +61 -0
- package/src/components/ui/sonner.tsx +23 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/tabs.tsx +64 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +71 -0
- package/src/components/ui/toggle.tsx +45 -0
- package/src/components/ui/tooltip.tsx +59 -0
- package/src/index.ts +46 -0
- package/src/lib/utils.ts +6 -0
- package/src/style.css +0 -0
- package/tailwind.config.js +52 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +54 -0
- package/tsconfig.spec.json +32 -0
- package/vite.config.ts +136 -0
package/dist/dialog.mjs
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-dialog";
|
|
3
|
+
import { XIcon as r } from "lucide-react";
|
|
4
|
+
import { c as n } from "./utils-B7J70Nno.js";
|
|
5
|
+
function m({
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a(o.Root, { "data-slot": "dialog", ...t });
|
|
9
|
+
}
|
|
10
|
+
function p({
|
|
11
|
+
...t
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ a(o.Trigger, { "data-slot": "dialog-trigger", ...t });
|
|
14
|
+
}
|
|
15
|
+
function d({
|
|
16
|
+
...t
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ a(o.Portal, { "data-slot": "dialog-portal", ...t });
|
|
19
|
+
}
|
|
20
|
+
function x({
|
|
21
|
+
...t
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ a(o.Close, { "data-slot": "dialog-close", ...t });
|
|
24
|
+
}
|
|
25
|
+
function c({
|
|
26
|
+
className: t,
|
|
27
|
+
...e
|
|
28
|
+
}) {
|
|
29
|
+
return /* @__PURE__ */ a(
|
|
30
|
+
o.Overlay,
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "dialog-overlay",
|
|
33
|
+
className: n(
|
|
34
|
+
"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",
|
|
35
|
+
t
|
|
36
|
+
),
|
|
37
|
+
...e
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function v({
|
|
42
|
+
className: t,
|
|
43
|
+
children: e,
|
|
44
|
+
showCloseButton: l = !0,
|
|
45
|
+
...s
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ i(d, { "data-slot": "dialog-portal", children: [
|
|
48
|
+
/* @__PURE__ */ a(c, {}),
|
|
49
|
+
/* @__PURE__ */ i(
|
|
50
|
+
o.Content,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "dialog-content",
|
|
53
|
+
className: n(
|
|
54
|
+
"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
55
|
+
t
|
|
56
|
+
),
|
|
57
|
+
...s,
|
|
58
|
+
children: [
|
|
59
|
+
e,
|
|
60
|
+
l && /* @__PURE__ */ i(
|
|
61
|
+
o.Close,
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "dialog-close",
|
|
64
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ a(r, {}),
|
|
67
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
function D({ className: t, ...e }) {
|
|
77
|
+
return /* @__PURE__ */ a(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
"data-slot": "dialog-header",
|
|
81
|
+
className: n("flex flex-col gap-2 text-center sm:text-left", t),
|
|
82
|
+
...e
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function b({ className: t, ...e }) {
|
|
87
|
+
return /* @__PURE__ */ a(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
"data-slot": "dialog-footer",
|
|
91
|
+
className: n(
|
|
92
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
93
|
+
t
|
|
94
|
+
),
|
|
95
|
+
...e
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function h({
|
|
100
|
+
className: t,
|
|
101
|
+
...e
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ a(
|
|
104
|
+
o.Title,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "dialog-title",
|
|
107
|
+
className: n("text-lg leading-none font-semibold", t),
|
|
108
|
+
...e
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
function y({
|
|
113
|
+
className: t,
|
|
114
|
+
...e
|
|
115
|
+
}) {
|
|
116
|
+
return /* @__PURE__ */ a(
|
|
117
|
+
o.Description,
|
|
118
|
+
{
|
|
119
|
+
"data-slot": "dialog-description",
|
|
120
|
+
className: n("text-muted-foreground text-sm", t),
|
|
121
|
+
...e
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
m as Dialog,
|
|
127
|
+
x as DialogClose,
|
|
128
|
+
v as DialogContent,
|
|
129
|
+
y as DialogDescription,
|
|
130
|
+
b as DialogFooter,
|
|
131
|
+
D as DialogHeader,
|
|
132
|
+
c as DialogOverlay,
|
|
133
|
+
d as DialogPortal,
|
|
134
|
+
h as DialogTitle,
|
|
135
|
+
p as DialogTrigger
|
|
136
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
|
|
5
|
+
export declare function DropdownMenu({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare function DropdownMenuContent({ className, sideOffset, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Content>): JSX.Element;
|
|
10
|
+
|
|
11
|
+
export declare function DropdownMenuGroup({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Group>): JSX.Element;
|
|
12
|
+
|
|
13
|
+
export declare function DropdownMenuItem({ className, inset, variant, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
14
|
+
inset?: boolean;
|
|
15
|
+
variant?: "default" | "destructive";
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
|
|
18
|
+
export declare function DropdownMenuLabel({ className, inset, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
19
|
+
inset?: boolean;
|
|
20
|
+
}): JSX.Element;
|
|
21
|
+
|
|
22
|
+
export declare function DropdownMenuPortal({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Portal>): JSX.Element;
|
|
23
|
+
|
|
24
|
+
export declare function DropdownMenuRadioGroup({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): JSX.Element;
|
|
25
|
+
|
|
26
|
+
export declare function DropdownMenuRadioItem({ className, children, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): JSX.Element;
|
|
27
|
+
|
|
28
|
+
export declare function DropdownMenuSeparator({ className, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Separator>): JSX.Element;
|
|
29
|
+
|
|
30
|
+
export declare function DropdownMenuShortcut({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
|
|
31
|
+
|
|
32
|
+
export declare function DropdownMenuSub({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Sub>): JSX.Element;
|
|
33
|
+
|
|
34
|
+
export declare function DropdownMenuSubContent({ className, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): JSX.Element;
|
|
35
|
+
|
|
36
|
+
export declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
37
|
+
inset?: boolean;
|
|
38
|
+
}): JSX.Element;
|
|
39
|
+
|
|
40
|
+
export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
|
|
41
|
+
|
|
42
|
+
export { }
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
import { CheckIcon as i, CircleIcon as u, ChevronRightIcon as c } from "lucide-react";
|
|
4
|
+
import { c as r } from "./utils-B7J70Nno.js";
|
|
5
|
+
function f({
|
|
6
|
+
...e
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ t(n.Root, { "data-slot": "dropdown-menu", ...e });
|
|
9
|
+
}
|
|
10
|
+
function g({
|
|
11
|
+
...e
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ t(n.Portal, { "data-slot": "dropdown-menu-portal", ...e });
|
|
14
|
+
}
|
|
15
|
+
function v({
|
|
16
|
+
...e
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ t(
|
|
19
|
+
n.Trigger,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "dropdown-menu-trigger",
|
|
22
|
+
...e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function w({
|
|
27
|
+
className: e,
|
|
28
|
+
sideOffset: o = 4,
|
|
29
|
+
...a
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
32
|
+
n.Content,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "dropdown-menu-content",
|
|
35
|
+
sideOffset: o,
|
|
36
|
+
className: r(
|
|
37
|
+
"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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
38
|
+
e
|
|
39
|
+
),
|
|
40
|
+
...a
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
function x({
|
|
45
|
+
...e
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ t(n.Group, { "data-slot": "dropdown-menu-group", ...e });
|
|
48
|
+
}
|
|
49
|
+
function b({
|
|
50
|
+
className: e,
|
|
51
|
+
inset: o,
|
|
52
|
+
variant: a = "default",
|
|
53
|
+
...d
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ t(
|
|
56
|
+
n.Item,
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "dropdown-menu-item",
|
|
59
|
+
"data-inset": o,
|
|
60
|
+
"data-variant": a,
|
|
61
|
+
className: r(
|
|
62
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
63
|
+
e
|
|
64
|
+
),
|
|
65
|
+
...d
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function h({
|
|
70
|
+
className: e,
|
|
71
|
+
children: o,
|
|
72
|
+
checked: a,
|
|
73
|
+
...d
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ s(
|
|
76
|
+
n.CheckboxItem,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
79
|
+
className: r(
|
|
80
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
81
|
+
e
|
|
82
|
+
),
|
|
83
|
+
checked: a,
|
|
84
|
+
...d,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(i, { className: "size-4" }) }) }),
|
|
87
|
+
o
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function z({
|
|
93
|
+
...e
|
|
94
|
+
}) {
|
|
95
|
+
return /* @__PURE__ */ t(
|
|
96
|
+
n.RadioGroup,
|
|
97
|
+
{
|
|
98
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
99
|
+
...e
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
function D({
|
|
104
|
+
className: e,
|
|
105
|
+
children: o,
|
|
106
|
+
...a
|
|
107
|
+
}) {
|
|
108
|
+
return /* @__PURE__ */ s(
|
|
109
|
+
n.RadioItem,
|
|
110
|
+
{
|
|
111
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
112
|
+
className: r(
|
|
113
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
114
|
+
e
|
|
115
|
+
),
|
|
116
|
+
...a,
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(u, { className: "size-2 fill-current" }) }) }),
|
|
119
|
+
o
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function M({
|
|
125
|
+
className: e,
|
|
126
|
+
inset: o,
|
|
127
|
+
...a
|
|
128
|
+
}) {
|
|
129
|
+
return /* @__PURE__ */ t(
|
|
130
|
+
n.Label,
|
|
131
|
+
{
|
|
132
|
+
"data-slot": "dropdown-menu-label",
|
|
133
|
+
"data-inset": o,
|
|
134
|
+
className: r(
|
|
135
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
136
|
+
e
|
|
137
|
+
),
|
|
138
|
+
...a
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
function N({
|
|
143
|
+
className: e,
|
|
144
|
+
...o
|
|
145
|
+
}) {
|
|
146
|
+
return /* @__PURE__ */ t(
|
|
147
|
+
n.Separator,
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "dropdown-menu-separator",
|
|
150
|
+
className: r("bg-border -mx-1 my-1 h-px", e),
|
|
151
|
+
...o
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
function I({
|
|
156
|
+
className: e,
|
|
157
|
+
...o
|
|
158
|
+
}) {
|
|
159
|
+
return /* @__PURE__ */ t(
|
|
160
|
+
"span",
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
163
|
+
className: r(
|
|
164
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
165
|
+
e
|
|
166
|
+
),
|
|
167
|
+
...o
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
function y({
|
|
172
|
+
...e
|
|
173
|
+
}) {
|
|
174
|
+
return /* @__PURE__ */ t(n.Sub, { "data-slot": "dropdown-menu-sub", ...e });
|
|
175
|
+
}
|
|
176
|
+
function _({
|
|
177
|
+
className: e,
|
|
178
|
+
inset: o,
|
|
179
|
+
children: a,
|
|
180
|
+
...d
|
|
181
|
+
}) {
|
|
182
|
+
return /* @__PURE__ */ s(
|
|
183
|
+
n.SubTrigger,
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
186
|
+
"data-inset": o,
|
|
187
|
+
className: r(
|
|
188
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
189
|
+
e
|
|
190
|
+
),
|
|
191
|
+
...d,
|
|
192
|
+
children: [
|
|
193
|
+
a,
|
|
194
|
+
/* @__PURE__ */ t(c, { className: "ml-auto size-4" })
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
function k({
|
|
200
|
+
className: e,
|
|
201
|
+
...o
|
|
202
|
+
}) {
|
|
203
|
+
return /* @__PURE__ */ t(
|
|
204
|
+
n.SubContent,
|
|
205
|
+
{
|
|
206
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
207
|
+
className: r(
|
|
208
|
+
"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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
209
|
+
e
|
|
210
|
+
),
|
|
211
|
+
...o
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
export {
|
|
216
|
+
f as DropdownMenu,
|
|
217
|
+
h as DropdownMenuCheckboxItem,
|
|
218
|
+
w as DropdownMenuContent,
|
|
219
|
+
x as DropdownMenuGroup,
|
|
220
|
+
b as DropdownMenuItem,
|
|
221
|
+
M as DropdownMenuLabel,
|
|
222
|
+
g as DropdownMenuPortal,
|
|
223
|
+
z as DropdownMenuRadioGroup,
|
|
224
|
+
D as DropdownMenuRadioItem,
|
|
225
|
+
N as DropdownMenuSeparator,
|
|
226
|
+
I as DropdownMenuShortcut,
|
|
227
|
+
y as DropdownMenuSub,
|
|
228
|
+
k as DropdownMenuSubContent,
|
|
229
|
+
_ as DropdownMenuSubTrigger,
|
|
230
|
+
v as DropdownMenuTrigger
|
|
231
|
+
};
|
package/dist/form.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ControllerProps } from 'react-hook-form';
|
|
2
|
+
import { FieldError } from 'react-hook-form';
|
|
3
|
+
import { FieldPath } from 'react-hook-form';
|
|
4
|
+
import { FieldValues } from 'react-hook-form';
|
|
5
|
+
import { FormProviderProps } from 'react-hook-form';
|
|
6
|
+
import { JSX } from 'react/jsx-runtime';
|
|
7
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
8
|
+
import * as React_2 from 'react';
|
|
9
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
10
|
+
|
|
11
|
+
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export declare function FormControl({ ...props }: React_2.ComponentProps<typeof Slot>): JSX.Element;
|
|
14
|
+
|
|
15
|
+
export declare function FormDescription({ className, ...props }: React_2.ComponentProps<"p">): JSX.Element;
|
|
16
|
+
|
|
17
|
+
export declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => JSX.Element;
|
|
18
|
+
|
|
19
|
+
export declare function FormItem({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
|
20
|
+
|
|
21
|
+
export declare function FormLabel({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
|
|
22
|
+
|
|
23
|
+
export declare function FormMessage({ className, ...props }: React_2.ComponentProps<"p">): JSX.Element | null;
|
|
24
|
+
|
|
25
|
+
export declare const useFormField: () => {
|
|
26
|
+
invalid: boolean;
|
|
27
|
+
isDirty: boolean;
|
|
28
|
+
isTouched: boolean;
|
|
29
|
+
isValidating: boolean;
|
|
30
|
+
error?: FieldError;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
formItemId: string;
|
|
34
|
+
formDescriptionId: string;
|
|
35
|
+
formMessageId: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { }
|
package/dist/form.mjs
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { Slot as f } from "@radix-ui/react-slot";
|
|
4
|
+
import { FormProvider as u, useFormContext as F, useFormState as x, Controller as I } from "react-hook-form";
|
|
5
|
+
import { c as a } from "./utils-B7J70Nno.js";
|
|
6
|
+
import { Label as g } from "./label.mjs";
|
|
7
|
+
const S = u, c = s.createContext(
|
|
8
|
+
{}
|
|
9
|
+
), $ = ({
|
|
10
|
+
...t
|
|
11
|
+
}) => /* @__PURE__ */ m(c.Provider, { value: { name: t.name }, children: /* @__PURE__ */ m(I, { ...t }) }), d = () => {
|
|
12
|
+
const t = s.useContext(c), o = s.useContext(l), { getFieldState: e } = F(), r = x({ name: t.name }), n = e(t.name, r);
|
|
13
|
+
if (!t)
|
|
14
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
15
|
+
const { id: i } = o;
|
|
16
|
+
return {
|
|
17
|
+
id: i,
|
|
18
|
+
name: t.name,
|
|
19
|
+
formItemId: `${i}-form-item`,
|
|
20
|
+
formDescriptionId: `${i}-form-item-description`,
|
|
21
|
+
formMessageId: `${i}-form-item-message`,
|
|
22
|
+
...n
|
|
23
|
+
};
|
|
24
|
+
}, l = s.createContext(
|
|
25
|
+
{}
|
|
26
|
+
);
|
|
27
|
+
function D({ className: t, ...o }) {
|
|
28
|
+
const e = s.useId();
|
|
29
|
+
return /* @__PURE__ */ m(l.Provider, { value: { id: e }, children: /* @__PURE__ */ m(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "form-item",
|
|
33
|
+
className: a("grid gap-2", t),
|
|
34
|
+
...o
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
function M({
|
|
39
|
+
className: t,
|
|
40
|
+
...o
|
|
41
|
+
}) {
|
|
42
|
+
const { error: e, formItemId: r } = d();
|
|
43
|
+
return /* @__PURE__ */ m(
|
|
44
|
+
g,
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "form-label",
|
|
47
|
+
"data-error": !!e,
|
|
48
|
+
className: a("data-[error=true]:text-destructive", t),
|
|
49
|
+
htmlFor: r,
|
|
50
|
+
...o
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
function N({ ...t }) {
|
|
55
|
+
const { error: o, formItemId: e, formDescriptionId: r, formMessageId: n } = d();
|
|
56
|
+
return /* @__PURE__ */ m(
|
|
57
|
+
f,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "form-control",
|
|
60
|
+
id: e,
|
|
61
|
+
"aria-describedby": o ? `${r} ${n}` : `${r}`,
|
|
62
|
+
"aria-invalid": !!o,
|
|
63
|
+
...t
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function w({ className: t, ...o }) {
|
|
68
|
+
const { formDescriptionId: e } = d();
|
|
69
|
+
return /* @__PURE__ */ m(
|
|
70
|
+
"p",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "form-description",
|
|
73
|
+
id: e,
|
|
74
|
+
className: a("text-muted-foreground text-sm", t),
|
|
75
|
+
...o
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function P({ className: t, ...o }) {
|
|
80
|
+
const { error: e, formMessageId: r } = d(), n = e ? String((e == null ? void 0 : e.message) ?? "") : o.children;
|
|
81
|
+
return n ? /* @__PURE__ */ m(
|
|
82
|
+
"p",
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "form-message",
|
|
85
|
+
id: r,
|
|
86
|
+
className: a("text-destructive text-sm", t),
|
|
87
|
+
...o,
|
|
88
|
+
children: n
|
|
89
|
+
}
|
|
90
|
+
) : null;
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
S as Form,
|
|
94
|
+
N as FormControl,
|
|
95
|
+
w as FormDescription,
|
|
96
|
+
$ as FormField,
|
|
97
|
+
D as FormItem,
|
|
98
|
+
M as FormLabel,
|
|
99
|
+
P as FormMessage,
|
|
100
|
+
d as useFormField
|
|
101
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
|
|
5
|
+
export declare function HoverCard({ ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare function HoverCardContent({ className, align, sideOffset, ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Content>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare function HoverCardTrigger({ ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Trigger>): JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "@radix-ui/react-hover-card";
|
|
3
|
+
import { c as i } from "./utils-B7J70Nno.js";
|
|
4
|
+
function m({
|
|
5
|
+
...t
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ o(r.Root, { "data-slot": "hover-card", ...t });
|
|
8
|
+
}
|
|
9
|
+
function c({
|
|
10
|
+
...t
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ o(r.Trigger, { "data-slot": "hover-card-trigger", ...t });
|
|
13
|
+
}
|
|
14
|
+
function l({
|
|
15
|
+
className: t,
|
|
16
|
+
align: e = "center",
|
|
17
|
+
sideOffset: a = 4,
|
|
18
|
+
...d
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ o(r.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ o(
|
|
21
|
+
r.Content,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "hover-card-content",
|
|
24
|
+
align: e,
|
|
25
|
+
sideOffset: a,
|
|
26
|
+
className: i(
|
|
27
|
+
"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",
|
|
28
|
+
t
|
|
29
|
+
),
|
|
30
|
+
...d
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
m as HoverCard,
|
|
36
|
+
l as HoverCardContent,
|
|
37
|
+
c as HoverCardTrigger
|
|
38
|
+
};
|
package/dist/input.d.ts
ADDED
package/dist/input.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "./utils-B7J70Nno.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 flex 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
|
+
};
|
package/dist/label.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
|
|
5
|
+
export declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { }
|
package/dist/label.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as a from "@radix-ui/react-label";
|
|
4
|
+
import { c as r } from "./utils-B7J70Nno.js";
|
|
5
|
+
function l({
|
|
6
|
+
className: e,
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ o(
|
|
10
|
+
a.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "label",
|
|
13
|
+
className: r(
|
|
14
|
+
"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",
|
|
15
|
+
e
|
|
16
|
+
),
|
|
17
|
+
...t
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
l as Label
|
|
23
|
+
};
|