@tioelvis/next-template 2.2.6 → 2.2.7
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/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
function Popover({
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
11
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function PopoverTrigger({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
18
|
+
return (
|
|
19
|
+
<PopoverPrimitive.Trigger
|
|
20
|
+
data-slot="popover-trigger"
|
|
21
|
+
className={cn("cursor-pointer", className)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function PopoverContent({
|
|
28
|
+
className,
|
|
29
|
+
align = "center",
|
|
30
|
+
sideOffset = 4,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
33
|
+
return (
|
|
34
|
+
<PopoverPrimitive.Portal>
|
|
35
|
+
<PopoverPrimitive.Content
|
|
36
|
+
data-slot="popover-content"
|
|
37
|
+
align={align}
|
|
38
|
+
sideOffset={sideOffset}
|
|
39
|
+
className={cn(
|
|
40
|
+
"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-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
</PopoverPrimitive.Portal>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function PopoverAnchor({
|
|
50
|
+
...props
|
|
51
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
52
|
+
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|