@codefast/ui 0.3.15 → 0.3.16-canary.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/CHANGELOG.md +14 -0
- package/dist/components/accordion.d.mts +30 -0
- package/dist/components/accordion.mjs +15 -0
- package/dist/components/alert-dialog.d.mts +60 -0
- package/dist/components/alert-dialog.mjs +30 -0
- package/dist/components/alert.d.mts +21 -0
- package/dist/components/alert.mjs +12 -0
- package/dist/components/aspect-ratio.d.mts +6 -0
- package/dist/components/aspect-ratio.mjs +3 -0
- package/dist/components/avatar.d.mts +18 -0
- package/dist/components/avatar.mjs +9 -0
- package/dist/components/badge.d.mts +9 -0
- package/dist/components/badge.mjs +6 -0
- package/dist/components/breadcrumb.d.mts +42 -0
- package/dist/components/breadcrumb.mjs +21 -0
- package/dist/components/button-group.d.mts +21 -0
- package/dist/components/button-group.mjs +12 -0
- package/dist/components/button.d.mts +9 -0
- package/dist/components/button.mjs +6 -0
- package/dist/components/calendar.d.mts +12 -0
- package/dist/components/calendar.mjs +7 -1
- package/dist/components/card.d.mts +42 -0
- package/dist/components/card.mjs +21 -0
- package/dist/components/carousel.d.mts +33 -0
- package/dist/components/carousel.mjs +15 -0
- package/dist/components/chart.d.mts +40 -1
- package/dist/components/chart.mjs +18 -0
- package/dist/components/checkbox-cards.d.mts +12 -0
- package/dist/components/checkbox-cards.mjs +6 -0
- package/dist/components/checkbox-group.d.mts +12 -0
- package/dist/components/checkbox-group.mjs +6 -0
- package/dist/components/checkbox.d.mts +6 -0
- package/dist/components/checkbox.mjs +3 -0
- package/dist/components/collapsible.d.mts +18 -0
- package/dist/components/collapsible.mjs +9 -0
- package/dist/components/command.d.mts +60 -0
- package/dist/components/command.mjs +30 -0
- package/dist/components/context-menu.d.mts +90 -0
- package/dist/components/context-menu.mjs +45 -0
- package/dist/components/dialog.d.mts +54 -0
- package/dist/components/dialog.mjs +27 -0
- package/dist/components/drawer.d.mts +54 -0
- package/dist/components/drawer.mjs +27 -0
- package/dist/components/dropdown-menu.d.mts +90 -0
- package/dist/components/dropdown-menu.mjs +45 -0
- package/dist/components/empty.d.mts +39 -0
- package/dist/components/empty.mjs +21 -0
- package/dist/components/field.d.mts +64 -1
- package/dist/components/field.mjs +33 -0
- package/dist/components/form.d.mts +42 -0
- package/dist/components/form.mjs +21 -0
- package/dist/components/hover-card.d.mts +24 -0
- package/dist/components/hover-card.mjs +12 -0
- package/dist/components/input-group.d.mts +45 -0
- package/dist/components/input-group.mjs +27 -0
- package/dist/components/input-number.d.mts +6 -0
- package/dist/components/input-number.mjs +3 -0
- package/dist/components/input-otp.d.mts +24 -0
- package/dist/components/input-otp.mjs +12 -0
- package/dist/components/input-password.d.mts +6 -0
- package/dist/components/input-password.mjs +3 -0
- package/dist/components/input-search.d.mts +6 -0
- package/dist/components/input-search.mjs +3 -0
- package/dist/components/input.d.mts +6 -0
- package/dist/components/input.mjs +3 -0
- package/dist/components/item.d.mts +66 -0
- package/dist/components/item.mjs +36 -0
- package/dist/components/kbd.d.mts +12 -0
- package/dist/components/kbd.mjs +6 -0
- package/dist/components/label.d.mts +6 -0
- package/dist/components/label.mjs +3 -0
- package/dist/components/menubar.d.mts +96 -0
- package/dist/components/menubar.mjs +48 -0
- package/dist/components/native-select.d.mts +18 -0
- package/dist/components/native-select.mjs +9 -0
- package/dist/components/navigation-menu.d.mts +39 -0
- package/dist/components/navigation-menu.mjs +21 -0
- package/dist/components/pagination.d.mts +42 -0
- package/dist/components/pagination.mjs +21 -0
- package/dist/components/popover.d.mts +30 -0
- package/dist/components/popover.mjs +15 -0
- package/dist/components/progress-circle.d.mts +9 -0
- package/dist/components/progress-circle.mjs +6 -0
- package/dist/components/progress.d.mts +6 -0
- package/dist/components/progress.mjs +3 -0
- package/dist/components/radio-cards.d.mts +12 -0
- package/dist/components/radio-cards.mjs +6 -0
- package/dist/components/radio-group.d.mts +12 -0
- package/dist/components/radio-group.mjs +6 -0
- package/dist/components/radio.d.mts +6 -0
- package/dist/components/radio.mjs +3 -0
- package/dist/components/resizable.d.mts +18 -0
- package/dist/components/resizable.mjs +9 -0
- package/dist/components/scroll-area.d.mts +15 -0
- package/dist/components/scroll-area.mjs +9 -0
- package/dist/components/select.d.mts +60 -0
- package/dist/components/select.mjs +30 -0
- package/dist/components/separator.d.mts +15 -0
- package/dist/components/separator.mjs +9 -0
- package/dist/components/sheet.d.mts +57 -0
- package/dist/components/sheet.mjs +30 -0
- package/dist/components/sidebar.d.mts +141 -0
- package/dist/components/sidebar.mjs +72 -0
- package/dist/components/skeleton.d.mts +6 -0
- package/dist/components/skeleton.mjs +3 -0
- package/dist/components/slider.d.mts +6 -0
- package/dist/components/slider.mjs +3 -0
- package/dist/components/sonner.d.mts +6 -0
- package/dist/components/sonner.mjs +3 -0
- package/dist/components/spinner.d.mts +6 -0
- package/dist/components/spinner.mjs +3 -0
- package/dist/components/switch.d.mts +6 -0
- package/dist/components/switch.mjs +3 -0
- package/dist/components/table.d.mts +48 -0
- package/dist/components/table.mjs +24 -0
- package/dist/components/tabs.d.mts +24 -0
- package/dist/components/tabs.mjs +12 -0
- package/dist/components/textarea.d.mts +6 -0
- package/dist/components/textarea.mjs +3 -0
- package/dist/components/toggle-group.d.mts +12 -0
- package/dist/components/toggle-group.mjs +6 -0
- package/dist/components/toggle.d.mts +12 -0
- package/dist/components/toggle.mjs +6 -0
- package/dist/components/tooltip.d.mts +30 -0
- package/dist/components/tooltip.mjs +15 -0
- package/dist/hooks/use-animated-value.d.mts +2 -0
- package/dist/hooks/use-animated-value.mjs +2 -0
- package/dist/hooks/use-copy-to-clipboard.d.mts +2 -0
- package/dist/hooks/use-copy-to-clipboard.mjs +2 -0
- package/dist/hooks/use-is-mobile.d.mts +2 -0
- package/dist/hooks/use-is-mobile.mjs +2 -0
- package/dist/hooks/use-media-query.d.mts +2 -0
- package/dist/hooks/use-media-query.mjs +2 -0
- package/dist/hooks/use-mutation-observer.d.mts +2 -0
- package/dist/hooks/use-mutation-observer.mjs +2 -0
- package/dist/hooks/use-pagination.d.mts +8 -1
- package/dist/hooks/use-pagination.mjs +4 -0
- package/dist/lib/utils.d.mts +1 -1
- package/dist/primitives/checkbox-group.d.mts +15 -3
- package/dist/primitives/checkbox-group.mjs +6 -0
- package/dist/primitives/input-number.d.mts +22 -0
- package/dist/primitives/input-number.mjs +12 -0
- package/dist/primitives/input.d.mts +10 -0
- package/dist/primitives/input.mjs +6 -0
- package/dist/primitives/progress-circle.d.mts +31 -1
- package/dist/primitives/progress-circle.mjs +12 -0
- package/package.json +17 -9
|
@@ -4,36 +4,54 @@ import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
6
6
|
//#region src/components/context-menu.tsx
|
|
7
|
+
/**
|
|
8
|
+
* @since 0.3.16-canary.0
|
|
9
|
+
*/
|
|
7
10
|
function ContextMenu({ ...props }) {
|
|
8
11
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, {
|
|
9
12
|
"data-slot": "context-menu",
|
|
10
13
|
...props
|
|
11
14
|
});
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* @since 0.3.16-canary.0
|
|
18
|
+
*/
|
|
13
19
|
function ContextMenuTrigger({ ...props }) {
|
|
14
20
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, {
|
|
15
21
|
"data-slot": "context-menu-trigger",
|
|
16
22
|
...props
|
|
17
23
|
});
|
|
18
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @since 0.3.16-canary.0
|
|
27
|
+
*/
|
|
19
28
|
function ContextMenuGroup({ ...props }) {
|
|
20
29
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, {
|
|
21
30
|
"data-slot": "context-menu-group",
|
|
22
31
|
...props
|
|
23
32
|
});
|
|
24
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @since 0.3.16-canary.0
|
|
36
|
+
*/
|
|
25
37
|
function ContextMenuSub({ ...props }) {
|
|
26
38
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, {
|
|
27
39
|
"data-slot": "context-menu-sub",
|
|
28
40
|
...props
|
|
29
41
|
});
|
|
30
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* @since 0.3.16-canary.0
|
|
45
|
+
*/
|
|
31
46
|
function ContextMenuRadioGroup({ ...props }) {
|
|
32
47
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.RadioGroup, {
|
|
33
48
|
"data-slot": "context-menu-radio-group",
|
|
34
49
|
...props
|
|
35
50
|
});
|
|
36
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* @since 0.3.16-canary.0
|
|
54
|
+
*/
|
|
37
55
|
function ContextMenuSubTrigger({ children, className, inset, ...props }) {
|
|
38
56
|
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, {
|
|
39
57
|
className: cn("flex items-center gap-x-2", "px-2 py-1.5", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "data-inset:pl-8", "data-open:bg-accent data-open:text-accent-foreground", "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -43,6 +61,9 @@ function ContextMenuSubTrigger({ children, className, inset, ...props }) {
|
|
|
43
61
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("size-4", "ml-auto") })]
|
|
44
62
|
});
|
|
45
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* @since 0.3.16-canary.0
|
|
66
|
+
*/
|
|
46
67
|
function ContextMenuSubContent({ className, ...props }) {
|
|
47
68
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
|
|
48
69
|
className: cn("z-50", "min-w-32 overflow-hidden p-1", "rounded-lg border", "bg-popover text-popover-foreground shadow-lg", "ease-ui data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-open:data-side-top:slide-in-from-bottom-2", "data-open:data-side-right:slide-in-from-left-2", "data-open:data-side-bottom:slide-in-from-top-2", "data-open:data-side-left:slide-in-from-right-2", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "data-closed:data-side-top:slide-out-to-bottom-2", "data-closed:data-side-right:slide-out-to-left-2", "data-closed:data-side-bottom:slide-out-to-top-2", "data-closed:data-side-left:slide-out-to-right-2", "origin-(--radix-context-menu-content-transform-origin)", className),
|
|
@@ -50,6 +71,9 @@ function ContextMenuSubContent({ className, ...props }) {
|
|
|
50
71
|
...props
|
|
51
72
|
}) });
|
|
52
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* @since 0.3.16-canary.0
|
|
76
|
+
*/
|
|
53
77
|
function ContextMenuContent({ className, ...props }) {
|
|
54
78
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, {
|
|
55
79
|
className: cn("z-50", "max-h-(--radix-context-menu-content-available-height) min-w-32 overflow-x-hidden overflow-y-auto p-1", "rounded-lg border", "bg-popover text-popover-foreground shadow-lg", "ease-ui data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-open:data-side-top:slide-in-from-bottom-2", "data-open:data-side-right:slide-in-from-left-2", "data-open:data-side-bottom:slide-in-from-top-2", "data-open:data-side-left:slide-in-from-right-2", "origin-(--radix-context-menu-content-transform-origin)", className),
|
|
@@ -57,6 +81,9 @@ function ContextMenuContent({ className, ...props }) {
|
|
|
57
81
|
...props
|
|
58
82
|
}) });
|
|
59
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* @since 0.3.16-canary.0
|
|
86
|
+
*/
|
|
60
87
|
function ContextMenuItem({ className, inset, variant, ...props }) {
|
|
61
88
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, {
|
|
62
89
|
className: cn("group/context-menu-item relative flex items-center gap-x-2", "px-2 py-1.5", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "aria-disabled:opacity-50", "data-inset:pl-8", "data-[variant=destructive]:text-destructive", "data-[variant=destructive]:focus:bg-destructive/10", "dark:data-[variant=destructive]:focus:bg-destructive/20", "data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "[&_svg:not([class*='text-'])]:text-muted-foreground", className),
|
|
@@ -66,6 +93,9 @@ function ContextMenuItem({ className, inset, variant, ...props }) {
|
|
|
66
93
|
...props
|
|
67
94
|
});
|
|
68
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @since 0.3.16-canary.0
|
|
98
|
+
*/
|
|
69
99
|
function ContextMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
70
100
|
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, {
|
|
71
101
|
checked,
|
|
@@ -78,6 +108,9 @@ function ContextMenuCheckboxItem({ checked, children, className, ...props }) {
|
|
|
78
108
|
}), children]
|
|
79
109
|
});
|
|
80
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @since 0.3.16-canary.0
|
|
113
|
+
*/
|
|
81
114
|
function ContextMenuRadioItem({ children, className, ...props }) {
|
|
82
115
|
return /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, {
|
|
83
116
|
className: cn("group/context-menu-item relative flex items-center gap-x-2", "py-1.5 pr-2 pl-8", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "aria-disabled:opacity-50", "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -89,6 +122,9 @@ function ContextMenuRadioItem({ children, className, ...props }) {
|
|
|
89
122
|
}), children]
|
|
90
123
|
});
|
|
91
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @since 0.3.16-canary.0
|
|
127
|
+
*/
|
|
92
128
|
function ContextMenuLabel({ className, inset, ...props }) {
|
|
93
129
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, {
|
|
94
130
|
className: cn("flex items-center gap-x-2", "px-2 py-1.5", "text-sm font-semibold", "data-inset:pl-8", className),
|
|
@@ -97,6 +133,9 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
97
133
|
...props
|
|
98
134
|
});
|
|
99
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* @since 0.3.16-canary.0
|
|
138
|
+
*/
|
|
100
139
|
function ContextMenuSeparator({ className, ...props }) {
|
|
101
140
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, {
|
|
102
141
|
className: cn("mx-2 my-1 h-px", "bg-border", className),
|
|
@@ -104,6 +143,9 @@ function ContextMenuSeparator({ className, ...props }) {
|
|
|
104
143
|
...props
|
|
105
144
|
});
|
|
106
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* @since 0.3.16-canary.0
|
|
148
|
+
*/
|
|
107
149
|
function ContextMenuShortcut({ className, ...props }) {
|
|
108
150
|
return /* @__PURE__ */ jsx("span", {
|
|
109
151
|
className: cn("ml-auto", "text-xs tracking-widest text-muted-foreground", "group-data-[variant=destructive]/context-menu-item:text-destructive/80", className),
|
|
@@ -111,6 +153,9 @@ function ContextMenuShortcut({ className, ...props }) {
|
|
|
111
153
|
...props
|
|
112
154
|
});
|
|
113
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* @since 0.3.16-canary.0
|
|
158
|
+
*/
|
|
114
159
|
function ContextMenuArrow({ className, ...props }) {
|
|
115
160
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Arrow, {
|
|
116
161
|
className: cn("fill-popover", className),
|
|
@@ -4,14 +4,29 @@ import { ComponentProps, JSX } from "react";
|
|
|
4
4
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
5
|
|
|
6
6
|
//#region src/components/dialog.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* @since 0.3.16-canary.0
|
|
9
|
+
*/
|
|
7
10
|
type DialogProps = ComponentProps<typeof DialogPrimitive.Root>;
|
|
11
|
+
/**
|
|
12
|
+
* @since 0.3.16-canary.0
|
|
13
|
+
*/
|
|
8
14
|
declare function Dialog({
|
|
9
15
|
...props
|
|
10
16
|
}: DialogProps): JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* @since 0.3.16-canary.0
|
|
19
|
+
*/
|
|
11
20
|
type DialogTriggerProps = ComponentProps<typeof DialogPrimitive.Trigger>;
|
|
21
|
+
/**
|
|
22
|
+
* @since 0.3.16-canary.0
|
|
23
|
+
*/
|
|
12
24
|
declare function DialogTrigger({
|
|
13
25
|
...props
|
|
14
26
|
}: DialogTriggerProps): JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* @since 0.3.16-canary.0
|
|
29
|
+
*/
|
|
15
30
|
interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {
|
|
16
31
|
classNames?: {
|
|
17
32
|
close?: string;
|
|
@@ -20,41 +35,80 @@ interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Conte
|
|
|
20
35
|
wrapper?: string;
|
|
21
36
|
};
|
|
22
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @since 0.3.16-canary.0
|
|
40
|
+
*/
|
|
23
41
|
declare function DialogContent({
|
|
24
42
|
children,
|
|
25
43
|
className,
|
|
26
44
|
classNames,
|
|
27
45
|
...props
|
|
28
46
|
}: DialogContentProps): JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* @since 0.3.16-canary.0
|
|
49
|
+
*/
|
|
29
50
|
type DialogHeaderProps = ComponentProps<"div">;
|
|
51
|
+
/**
|
|
52
|
+
* @since 0.3.16-canary.0
|
|
53
|
+
*/
|
|
30
54
|
declare function DialogHeader({
|
|
31
55
|
className,
|
|
32
56
|
...props
|
|
33
57
|
}: DialogHeaderProps): JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* @since 0.3.16-canary.0
|
|
60
|
+
*/
|
|
34
61
|
type DialogBodyProps = ComponentProps<"div">;
|
|
62
|
+
/**
|
|
63
|
+
* @since 0.3.16-canary.0
|
|
64
|
+
*/
|
|
35
65
|
declare function DialogBody({
|
|
36
66
|
className,
|
|
37
67
|
...props
|
|
38
68
|
}: DialogBodyProps): JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* @since 0.3.16-canary.0
|
|
71
|
+
*/
|
|
39
72
|
type DialogFooterProps = ComponentProps<"div">;
|
|
73
|
+
/**
|
|
74
|
+
* @since 0.3.16-canary.0
|
|
75
|
+
*/
|
|
40
76
|
declare function DialogFooter({
|
|
41
77
|
className,
|
|
42
78
|
...props
|
|
43
79
|
}: DialogFooterProps): JSX.Element;
|
|
80
|
+
/**
|
|
81
|
+
* @since 0.3.16-canary.0
|
|
82
|
+
*/
|
|
44
83
|
type DialogTitleProps = ComponentProps<typeof DialogPrimitive.Title>;
|
|
84
|
+
/**
|
|
85
|
+
* @since 0.3.16-canary.0
|
|
86
|
+
*/
|
|
45
87
|
declare function DialogTitle({
|
|
46
88
|
className,
|
|
47
89
|
...props
|
|
48
90
|
}: DialogTitleProps): JSX.Element;
|
|
91
|
+
/**
|
|
92
|
+
* @since 0.3.16-canary.0
|
|
93
|
+
*/
|
|
49
94
|
type DialogDescriptionProps = ComponentProps<typeof DialogPrimitive.Description>;
|
|
95
|
+
/**
|
|
96
|
+
* @since 0.3.16-canary.0
|
|
97
|
+
*/
|
|
50
98
|
declare function DialogDescription({
|
|
51
99
|
className,
|
|
52
100
|
...props
|
|
53
101
|
}: DialogDescriptionProps): JSX.Element;
|
|
102
|
+
/**
|
|
103
|
+
* @since 0.3.16-canary.0
|
|
104
|
+
*/
|
|
54
105
|
interface DialogCloseProps extends Omit<ComponentProps<typeof DialogPrimitive.Close>, "ref"> {
|
|
55
106
|
size?: VariantProps<typeof buttonVariants>["size"];
|
|
56
107
|
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
57
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* @since 0.3.16-canary.0
|
|
111
|
+
*/
|
|
58
112
|
declare function DialogClose({
|
|
59
113
|
className,
|
|
60
114
|
size,
|
|
@@ -5,18 +5,27 @@ import { XIcon } from "lucide-react";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
7
7
|
//#region src/components/dialog.tsx
|
|
8
|
+
/**
|
|
9
|
+
* @since 0.3.16-canary.0
|
|
10
|
+
*/
|
|
8
11
|
function Dialog({ ...props }) {
|
|
9
12
|
return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
|
|
10
13
|
"data-slot": "dialog",
|
|
11
14
|
...props
|
|
12
15
|
});
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @since 0.3.16-canary.0
|
|
19
|
+
*/
|
|
14
20
|
function DialogTrigger({ ...props }) {
|
|
15
21
|
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
|
|
16
22
|
"data-slot": "dialog-trigger",
|
|
17
23
|
...props
|
|
18
24
|
});
|
|
19
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @since 0.3.16-canary.0
|
|
28
|
+
*/
|
|
20
29
|
function DialogContent({ children, className, classNames, ...props }) {
|
|
21
30
|
return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [/* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
|
|
22
31
|
className: cn("fixed inset-0 z-50", "bg-black/50", "ease-ui data-open:animate-in data-open:fade-in-0", "data-closed:animate-out data-closed:fade-out-0", classNames?.overlay),
|
|
@@ -43,6 +52,9 @@ function DialogContent({ children, className, classNames, ...props }) {
|
|
|
43
52
|
})
|
|
44
53
|
})] });
|
|
45
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* @since 0.3.16-canary.0
|
|
57
|
+
*/
|
|
46
58
|
function DialogHeader({ className, ...props }) {
|
|
47
59
|
return /* @__PURE__ */ jsx("header", {
|
|
48
60
|
className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-2 text-center", "sm:text-left", className),
|
|
@@ -50,6 +62,9 @@ function DialogHeader({ className, ...props }) {
|
|
|
50
62
|
...props
|
|
51
63
|
});
|
|
52
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* @since 0.3.16-canary.0
|
|
67
|
+
*/
|
|
53
68
|
function DialogBody({ className, ...props }) {
|
|
54
69
|
return /* @__PURE__ */ jsx("main", {
|
|
55
70
|
className: cn("overflow-auto", "px-6 py-2", className),
|
|
@@ -57,6 +72,9 @@ function DialogBody({ className, ...props }) {
|
|
|
57
72
|
...props
|
|
58
73
|
});
|
|
59
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* @since 0.3.16-canary.0
|
|
77
|
+
*/
|
|
60
78
|
function DialogFooter({ className, ...props }) {
|
|
61
79
|
return /* @__PURE__ */ jsx("footer", {
|
|
62
80
|
className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-2 pb-6", "sm:flex-row sm:justify-end", className),
|
|
@@ -64,6 +82,9 @@ function DialogFooter({ className, ...props }) {
|
|
|
64
82
|
...props
|
|
65
83
|
});
|
|
66
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* @since 0.3.16-canary.0
|
|
87
|
+
*/
|
|
67
88
|
function DialogTitle({ className, ...props }) {
|
|
68
89
|
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
69
90
|
className: cn("text-lg leading-none font-semibold tracking-tight", className),
|
|
@@ -71,6 +92,9 @@ function DialogTitle({ className, ...props }) {
|
|
|
71
92
|
...props
|
|
72
93
|
});
|
|
73
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* @since 0.3.16-canary.0
|
|
97
|
+
*/
|
|
74
98
|
function DialogDescription({ className, ...props }) {
|
|
75
99
|
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
76
100
|
className: cn("text-sm text-muted-foreground", className),
|
|
@@ -78,6 +102,9 @@ function DialogDescription({ className, ...props }) {
|
|
|
78
102
|
...props
|
|
79
103
|
});
|
|
80
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* @since 0.3.16-canary.0
|
|
107
|
+
*/
|
|
81
108
|
function DialogClose({ className, size, variant = "outline", ...props }) {
|
|
82
109
|
return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
83
110
|
className: buttonVariants({
|
|
@@ -4,15 +4,30 @@ import { ComponentProps, JSX } from "react";
|
|
|
4
4
|
import { Drawer as Drawer$1 } from "vaul";
|
|
5
5
|
|
|
6
6
|
//#region src/components/drawer.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* @since 0.3.16-canary.0
|
|
9
|
+
*/
|
|
7
10
|
type DrawerProps = ComponentProps<typeof Drawer$1.Root>;
|
|
11
|
+
/**
|
|
12
|
+
* @since 0.3.16-canary.0
|
|
13
|
+
*/
|
|
8
14
|
declare function Drawer({
|
|
9
15
|
shouldScaleBackground,
|
|
10
16
|
...props
|
|
11
17
|
}: DrawerProps): JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* @since 0.3.16-canary.0
|
|
20
|
+
*/
|
|
12
21
|
type DrawerTriggerProps = ComponentProps<typeof Drawer$1.Trigger>;
|
|
22
|
+
/**
|
|
23
|
+
* @since 0.3.16-canary.0
|
|
24
|
+
*/
|
|
13
25
|
declare function DrawerTrigger({
|
|
14
26
|
...props
|
|
15
27
|
}: DrawerTriggerProps): JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* @since 0.3.16-canary.0
|
|
30
|
+
*/
|
|
16
31
|
interface DrawerContentProps extends ComponentProps<typeof Drawer$1.Content> {
|
|
17
32
|
classNames?: {
|
|
18
33
|
content?: string;
|
|
@@ -20,41 +35,80 @@ interface DrawerContentProps extends ComponentProps<typeof Drawer$1.Content> {
|
|
|
20
35
|
overlay?: string;
|
|
21
36
|
};
|
|
22
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @since 0.3.16-canary.0
|
|
40
|
+
*/
|
|
23
41
|
declare function DrawerContent({
|
|
24
42
|
children,
|
|
25
43
|
className,
|
|
26
44
|
classNames,
|
|
27
45
|
...props
|
|
28
46
|
}: DrawerContentProps): JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* @since 0.3.16-canary.0
|
|
49
|
+
*/
|
|
29
50
|
type DrawerHeaderProps = ComponentProps<"div">;
|
|
51
|
+
/**
|
|
52
|
+
* @since 0.3.16-canary.0
|
|
53
|
+
*/
|
|
30
54
|
declare function DrawerHeader({
|
|
31
55
|
className,
|
|
32
56
|
...props
|
|
33
57
|
}: DrawerHeaderProps): JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* @since 0.3.16-canary.0
|
|
60
|
+
*/
|
|
34
61
|
type DrawerBodyProps = ComponentProps<"div">;
|
|
62
|
+
/**
|
|
63
|
+
* @since 0.3.16-canary.0
|
|
64
|
+
*/
|
|
35
65
|
declare function DrawerBody({
|
|
36
66
|
className,
|
|
37
67
|
...props
|
|
38
68
|
}: DrawerBodyProps): JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* @since 0.3.16-canary.0
|
|
71
|
+
*/
|
|
39
72
|
type DrawerFooterProps = ComponentProps<"div">;
|
|
73
|
+
/**
|
|
74
|
+
* @since 0.3.16-canary.0
|
|
75
|
+
*/
|
|
40
76
|
declare function DrawerFooter({
|
|
41
77
|
className,
|
|
42
78
|
...props
|
|
43
79
|
}: DrawerFooterProps): JSX.Element;
|
|
80
|
+
/**
|
|
81
|
+
* @since 0.3.16-canary.0
|
|
82
|
+
*/
|
|
44
83
|
type DrawerTitleProps = ComponentProps<typeof Drawer$1.Title>;
|
|
84
|
+
/**
|
|
85
|
+
* @since 0.3.16-canary.0
|
|
86
|
+
*/
|
|
45
87
|
declare function DrawerTitle({
|
|
46
88
|
className,
|
|
47
89
|
...props
|
|
48
90
|
}: DrawerTitleProps): JSX.Element;
|
|
91
|
+
/**
|
|
92
|
+
* @since 0.3.16-canary.0
|
|
93
|
+
*/
|
|
49
94
|
type DrawerDescriptionProps = ComponentProps<typeof Drawer$1.Description>;
|
|
95
|
+
/**
|
|
96
|
+
* @since 0.3.16-canary.0
|
|
97
|
+
*/
|
|
50
98
|
declare function DrawerDescription({
|
|
51
99
|
className,
|
|
52
100
|
...props
|
|
53
101
|
}: DrawerDescriptionProps): JSX.Element;
|
|
102
|
+
/**
|
|
103
|
+
* @since 0.3.16-canary.0
|
|
104
|
+
*/
|
|
54
105
|
interface DrawerCloseProps extends ComponentProps<typeof Drawer$1.Close> {
|
|
55
106
|
size?: VariantProps<typeof buttonVariants>["size"];
|
|
56
107
|
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
57
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* @since 0.3.16-canary.0
|
|
111
|
+
*/
|
|
58
112
|
declare function DrawerClose({
|
|
59
113
|
className,
|
|
60
114
|
size,
|
|
@@ -4,6 +4,9 @@ import { buttonVariants } from "./button.mjs";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Drawer as Drawer$1 } from "vaul";
|
|
6
6
|
//#region src/components/drawer.tsx
|
|
7
|
+
/**
|
|
8
|
+
* @since 0.3.16-canary.0
|
|
9
|
+
*/
|
|
7
10
|
function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
8
11
|
return /* @__PURE__ */ jsx(Drawer$1.Root, {
|
|
9
12
|
"data-slot": "drawer",
|
|
@@ -11,12 +14,18 @@ function Drawer({ shouldScaleBackground = true, ...props }) {
|
|
|
11
14
|
...props
|
|
12
15
|
});
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @since 0.3.16-canary.0
|
|
19
|
+
*/
|
|
14
20
|
function DrawerTrigger({ ...props }) {
|
|
15
21
|
return /* @__PURE__ */ jsx(Drawer$1.Trigger, {
|
|
16
22
|
"data-slot": "drawer-trigger",
|
|
17
23
|
...props
|
|
18
24
|
});
|
|
19
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @since 0.3.16-canary.0
|
|
28
|
+
*/
|
|
20
29
|
function DrawerContent({ children, className, classNames, ...props }) {
|
|
21
30
|
return /* @__PURE__ */ jsxs(Drawer$1.Portal, { children: [/* @__PURE__ */ jsx(Drawer$1.Overlay, {
|
|
22
31
|
className: cn("fixed inset-0 z-50", "bg-black/50", classNames?.overlay),
|
|
@@ -28,6 +37,9 @@ function DrawerContent({ children, className, classNames, ...props }) {
|
|
|
28
37
|
children: [/* @__PURE__ */ jsx("div", { className: cn("hidden", "mx-auto mt-4 h-1.5 w-12 shrink-0", "rounded-full", "bg-muted", "group-data-[vaul-drawer-direction=bottom]/drawer-content:block", classNames?.handle) }), children]
|
|
29
38
|
})] });
|
|
30
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* @since 0.3.16-canary.0
|
|
42
|
+
*/
|
|
31
43
|
function DrawerHeader({ className, ...props }) {
|
|
32
44
|
return /* @__PURE__ */ jsx("div", {
|
|
33
45
|
className: cn("flex flex-col gap-1.5", "p-4", className),
|
|
@@ -35,6 +47,9 @@ function DrawerHeader({ className, ...props }) {
|
|
|
35
47
|
...props
|
|
36
48
|
});
|
|
37
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @since 0.3.16-canary.0
|
|
52
|
+
*/
|
|
38
53
|
function DrawerBody({ className, ...props }) {
|
|
39
54
|
return /* @__PURE__ */ jsx("main", {
|
|
40
55
|
className: cn("overflow-auto", "px-6 py-2", className),
|
|
@@ -42,6 +57,9 @@ function DrawerBody({ className, ...props }) {
|
|
|
42
57
|
...props
|
|
43
58
|
});
|
|
44
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @since 0.3.16-canary.0
|
|
62
|
+
*/
|
|
45
63
|
function DrawerFooter({ className, ...props }) {
|
|
46
64
|
return /* @__PURE__ */ jsx("div", {
|
|
47
65
|
className: cn("flex flex-col gap-2", "mt-auto p-4", className),
|
|
@@ -49,6 +67,9 @@ function DrawerFooter({ className, ...props }) {
|
|
|
49
67
|
...props
|
|
50
68
|
});
|
|
51
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* @since 0.3.16-canary.0
|
|
72
|
+
*/
|
|
52
73
|
function DrawerTitle({ className, ...props }) {
|
|
53
74
|
return /* @__PURE__ */ jsx(Drawer$1.Title, {
|
|
54
75
|
className: cn("font-semibold text-foreground", className),
|
|
@@ -56,6 +77,9 @@ function DrawerTitle({ className, ...props }) {
|
|
|
56
77
|
...props
|
|
57
78
|
});
|
|
58
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* @since 0.3.16-canary.0
|
|
82
|
+
*/
|
|
59
83
|
function DrawerDescription({ className, ...props }) {
|
|
60
84
|
return /* @__PURE__ */ jsx(Drawer$1.Description, {
|
|
61
85
|
className: cn("text-sm text-muted-foreground", className),
|
|
@@ -63,6 +87,9 @@ function DrawerDescription({ className, ...props }) {
|
|
|
63
87
|
...props
|
|
64
88
|
});
|
|
65
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* @since 0.3.16-canary.0
|
|
92
|
+
*/
|
|
66
93
|
function DrawerClose({ className, size, variant = "outline", ...props }) {
|
|
67
94
|
return /* @__PURE__ */ jsx(Drawer$1.Close, {
|
|
68
95
|
className: buttonVariants({
|