@arolariu/components 0.0.39 → 0.0.40
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/CONTRIBUTING.md +371 -371
- package/DEBUGGING.md +401 -401
- package/EXAMPLES.md +1035 -1035
- package/{CHANGELOG.md → changelog.md} +7 -0
- package/dist/cjs/components/ui/bubble-background.cjs +1 -2
- package/dist/cjs/components/ui/bubble-background.cjs.map +1 -1
- package/dist/cjs/components/ui/calendar.cjs.map +1 -1
- package/dist/cjs/components/ui/chart.cjs.map +1 -1
- package/dist/cjs/components/ui/command.cjs +1 -1
- package/dist/cjs/components/ui/drawer.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdrawer.cjs.map +1 -1
- package/dist/cjs/components/ui/input.cjs.map +1 -1
- package/dist/cjs/components/ui/ripple-button.cjs.map +1 -1
- package/dist/cjs/components/ui/scratcher.cjs.map +1 -1
- package/dist/cjs/components/ui/sidebar.cjs +4 -4
- package/dist/cjs/components/ui/sonner.cjs +2 -2
- package/dist/cjs/components/ui/tooltip.cjs +1 -1
- package/dist/cjs/index.cjs +6 -6
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +1 -1
- package/dist/esm/components/ui/bubble-background.js +1 -2
- package/dist/esm/components/ui/bubble-background.js.map +1 -1
- package/dist/esm/components/ui/calendar.js.map +1 -1
- package/dist/esm/components/ui/chart.js.map +1 -1
- package/dist/esm/components/ui/drawer.js.map +1 -1
- package/dist/esm/components/ui/dropdrawer.js.map +1 -1
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/ripple-button.js.map +1 -1
- package/dist/esm/components/ui/scratcher.js.map +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +1 -1
- package/dist/index.css +1 -1
- package/dist/types/components/ui/bubble-background.d.ts.map +1 -1
- package/package.json +51 -52
- package/{README.md → readme.md} +627 -627
- package/src/components/ui/bubble-background.tsx +189 -187
- package/src/components/ui/calendar.tsx +213 -213
- package/src/components/ui/chart.tsx +380 -380
- package/src/components/ui/drawer.tsx +141 -141
- package/src/components/ui/dropdrawer.tsx +973 -973
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/ripple-button.tsx +111 -111
- package/src/components/ui/scratcher.tsx +171 -171
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
function Drawer({
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
11
|
-
return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function DrawerTrigger({
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
17
|
-
return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function DrawerPortal({
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
|
|
23
|
-
return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function DrawerClose({
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Close>) {
|
|
29
|
-
return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function DrawerOverlay({
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
36
|
-
return (
|
|
37
|
-
<DrawerPrimitive.Overlay
|
|
38
|
-
data-slot="drawer-overlay"
|
|
39
|
-
className={cn(
|
|
40
|
-
"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",
|
|
41
|
-
className,
|
|
42
|
-
)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function DrawerContent({
|
|
49
|
-
className,
|
|
50
|
-
children,
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
53
|
-
return (
|
|
54
|
-
<DrawerPortal data-slot="drawer-portal">
|
|
55
|
-
<DrawerOverlay />
|
|
56
|
-
<DrawerPrimitive.Content
|
|
57
|
-
data-slot="drawer-content"
|
|
58
|
-
className={cn(
|
|
59
|
-
"group/drawer-content bg-white fixed z-50 flex h-auto flex-col dark:bg-neutral-950",
|
|
60
|
-
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
61
|
-
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
62
|
-
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
63
|
-
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
64
|
-
className,
|
|
65
|
-
)}
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
<div className="bg-neutral-100 mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block dark:bg-neutral-800" />
|
|
69
|
-
{children}
|
|
70
|
-
</DrawerPrimitive.Content>
|
|
71
|
-
</DrawerPortal>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
76
|
-
return (
|
|
77
|
-
<div
|
|
78
|
-
data-slot="drawer-header"
|
|
79
|
-
className={cn(
|
|
80
|
-
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
81
|
-
className,
|
|
82
|
-
)}
|
|
83
|
-
{...props}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
89
|
-
return (
|
|
90
|
-
<div
|
|
91
|
-
data-slot="drawer-footer"
|
|
92
|
-
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
|
|
93
|
-
{...props}
|
|
94
|
-
/>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function DrawerTitle({
|
|
99
|
-
className,
|
|
100
|
-
...props
|
|
101
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
102
|
-
return (
|
|
103
|
-
<DrawerPrimitive.Title
|
|
104
|
-
data-slot="drawer-title"
|
|
105
|
-
className={cn(
|
|
106
|
-
"text-neutral-950 font-semibold dark:text-neutral-50",
|
|
107
|
-
className,
|
|
108
|
-
)}
|
|
109
|
-
{...props}
|
|
110
|
-
/>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function DrawerDescription({
|
|
115
|
-
className,
|
|
116
|
-
...props
|
|
117
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
118
|
-
return (
|
|
119
|
-
<DrawerPrimitive.Description
|
|
120
|
-
data-slot="drawer-description"
|
|
121
|
-
className={cn(
|
|
122
|
-
"text-neutral-500 text-sm dark:text-neutral-400",
|
|
123
|
-
className,
|
|
124
|
-
)}
|
|
125
|
-
{...props}
|
|
126
|
-
/>
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export {
|
|
131
|
-
Drawer,
|
|
132
|
-
DrawerPortal,
|
|
133
|
-
DrawerOverlay,
|
|
134
|
-
DrawerTrigger,
|
|
135
|
-
DrawerClose,
|
|
136
|
-
DrawerContent,
|
|
137
|
-
DrawerHeader,
|
|
138
|
-
DrawerFooter,
|
|
139
|
-
DrawerTitle,
|
|
140
|
-
DrawerDescription,
|
|
141
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
function Drawer({
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
11
|
+
return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function DrawerTrigger({
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
17
|
+
return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function DrawerPortal({
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
|
|
23
|
+
return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function DrawerClose({
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Close>) {
|
|
29
|
+
return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function DrawerOverlay({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
36
|
+
return (
|
|
37
|
+
<DrawerPrimitive.Overlay
|
|
38
|
+
data-slot="drawer-overlay"
|
|
39
|
+
className={cn(
|
|
40
|
+
"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",
|
|
41
|
+
className,
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function DrawerContent({
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
|
+
...props
|
|
52
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
53
|
+
return (
|
|
54
|
+
<DrawerPortal data-slot="drawer-portal">
|
|
55
|
+
<DrawerOverlay />
|
|
56
|
+
<DrawerPrimitive.Content
|
|
57
|
+
data-slot="drawer-content"
|
|
58
|
+
className={cn(
|
|
59
|
+
"group/drawer-content bg-white fixed z-50 flex h-auto flex-col dark:bg-neutral-950",
|
|
60
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
61
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
62
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
63
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
64
|
+
className,
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
<div className="bg-neutral-100 mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block dark:bg-neutral-800" />
|
|
69
|
+
{children}
|
|
70
|
+
</DrawerPrimitive.Content>
|
|
71
|
+
</DrawerPortal>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
76
|
+
return (
|
|
77
|
+
<div
|
|
78
|
+
data-slot="drawer-header"
|
|
79
|
+
className={cn(
|
|
80
|
+
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
81
|
+
className,
|
|
82
|
+
)}
|
|
83
|
+
{...props}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
89
|
+
return (
|
|
90
|
+
<div
|
|
91
|
+
data-slot="drawer-footer"
|
|
92
|
+
className={cn("mt-auto flex flex-col gap-2 p-4", className)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function DrawerTitle({
|
|
99
|
+
className,
|
|
100
|
+
...props
|
|
101
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
102
|
+
return (
|
|
103
|
+
<DrawerPrimitive.Title
|
|
104
|
+
data-slot="drawer-title"
|
|
105
|
+
className={cn(
|
|
106
|
+
"text-neutral-950 font-semibold dark:text-neutral-50",
|
|
107
|
+
className,
|
|
108
|
+
)}
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function DrawerDescription({
|
|
115
|
+
className,
|
|
116
|
+
...props
|
|
117
|
+
}: React.ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
118
|
+
return (
|
|
119
|
+
<DrawerPrimitive.Description
|
|
120
|
+
data-slot="drawer-description"
|
|
121
|
+
className={cn(
|
|
122
|
+
"text-neutral-500 text-sm dark:text-neutral-400",
|
|
123
|
+
className,
|
|
124
|
+
)}
|
|
125
|
+
{...props}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export {
|
|
131
|
+
Drawer,
|
|
132
|
+
DrawerPortal,
|
|
133
|
+
DrawerOverlay,
|
|
134
|
+
DrawerTrigger,
|
|
135
|
+
DrawerClose,
|
|
136
|
+
DrawerContent,
|
|
137
|
+
DrawerHeader,
|
|
138
|
+
DrawerFooter,
|
|
139
|
+
DrawerTitle,
|
|
140
|
+
DrawerDescription,
|
|
141
|
+
};
|