@moontra/moonui-pro 2.4.6 → 2.5.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.
@@ -0,0 +1,47 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
5
+ import { cn } from "../../lib/utils"
6
+
7
+ const ScrollArea = React.forwardRef<
8
+ React.ElementRef<typeof ScrollAreaPrimitive.Root>,
9
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
10
+ >(({ className, children, ...props }, ref) => (
11
+ <ScrollAreaPrimitive.Root
12
+ ref={ref}
13
+ className={cn("relative overflow-hidden", className)}
14
+ {...props}
15
+ >
16
+ <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
17
+ {children}
18
+ </ScrollAreaPrimitive.Viewport>
19
+ <ScrollBar />
20
+ <ScrollAreaPrimitive.Corner />
21
+ </ScrollAreaPrimitive.Root>
22
+ ))
23
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
24
+
25
+ const ScrollBar = React.forwardRef<
26
+ React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
27
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
28
+ >(({ className, orientation = "vertical", ...props }, ref) => (
29
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
30
+ ref={ref}
31
+ orientation={orientation}
32
+ className={cn(
33
+ "flex touch-none select-none transition-colors",
34
+ orientation === "vertical" &&
35
+ "h-full w-2.5 border-l border-l-transparent p-[1px]",
36
+ orientation === "horizontal" &&
37
+ "h-2.5 flex-col border-t border-t-transparent p-[1px]",
38
+ className
39
+ )}
40
+ {...props}
41
+ >
42
+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
43
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
44
+ ))
45
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
46
+
47
+ export { ScrollArea, ScrollBar }
@@ -0,0 +1,139 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import * as SheetPrimitive from "@radix-ui/react-dialog"
5
+ import { cva, type VariantProps } from "class-variance-authority"
6
+ import { X } from "lucide-react"
7
+ import { cn } from "../../lib/utils"
8
+
9
+ const Sheet = SheetPrimitive.Root
10
+
11
+ const SheetTrigger = SheetPrimitive.Trigger
12
+
13
+ const SheetClose = SheetPrimitive.Close
14
+
15
+ const SheetPortal = SheetPrimitive.Portal
16
+
17
+ const SheetOverlay = React.forwardRef<
18
+ React.ElementRef<typeof SheetPrimitive.Overlay>,
19
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
20
+ >(({ className, ...props }, ref) => (
21
+ <SheetPrimitive.Overlay
22
+ className={cn(
23
+ "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
24
+ className
25
+ )}
26
+ {...props}
27
+ ref={ref}
28
+ />
29
+ ))
30
+ SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
31
+
32
+ const sheetVariants = cva(
33
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
34
+ {
35
+ variants: {
36
+ side: {
37
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
38
+ bottom:
39
+ "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
40
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
41
+ right:
42
+ "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
43
+ },
44
+ },
45
+ defaultVariants: {
46
+ side: "right",
47
+ },
48
+ }
49
+ )
50
+
51
+ interface SheetContentProps
52
+ extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
53
+ VariantProps<typeof sheetVariants> {}
54
+
55
+ const SheetContent = React.forwardRef<
56
+ React.ElementRef<typeof SheetPrimitive.Content>,
57
+ SheetContentProps
58
+ >(({ side = "right", className, children, ...props }, ref) => (
59
+ <SheetPortal>
60
+ <SheetOverlay />
61
+ <SheetPrimitive.Content
62
+ ref={ref}
63
+ className={cn(sheetVariants({ side }), className)}
64
+ {...props}
65
+ >
66
+ {children}
67
+ <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
68
+ <X className="h-4 w-4" />
69
+ <span className="sr-only">Close</span>
70
+ </SheetPrimitive.Close>
71
+ </SheetPrimitive.Content>
72
+ </SheetPortal>
73
+ ))
74
+ SheetContent.displayName = SheetPrimitive.Content.displayName
75
+
76
+ const SheetHeader = ({
77
+ className,
78
+ ...props
79
+ }: React.HTMLAttributes<HTMLDivElement>) => (
80
+ <div
81
+ className={cn(
82
+ "flex flex-col space-y-2 text-center sm:text-left",
83
+ className
84
+ )}
85
+ {...props}
86
+ />
87
+ )
88
+ SheetHeader.displayName = "SheetHeader"
89
+
90
+ const SheetFooter = ({
91
+ className,
92
+ ...props
93
+ }: React.HTMLAttributes<HTMLDivElement>) => (
94
+ <div
95
+ className={cn(
96
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
97
+ className
98
+ )}
99
+ {...props}
100
+ />
101
+ )
102
+ SheetFooter.displayName = "SheetFooter"
103
+
104
+ const SheetTitle = React.forwardRef<
105
+ React.ElementRef<typeof SheetPrimitive.Title>,
106
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
107
+ >(({ className, ...props }, ref) => (
108
+ <SheetPrimitive.Title
109
+ ref={ref}
110
+ className={cn("text-lg font-semibold text-foreground", className)}
111
+ {...props}
112
+ />
113
+ ))
114
+ SheetTitle.displayName = SheetPrimitive.Title.displayName
115
+
116
+ const SheetDescription = React.forwardRef<
117
+ React.ElementRef<typeof SheetPrimitive.Description>,
118
+ React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
119
+ >(({ className, ...props }, ref) => (
120
+ <SheetPrimitive.Description
121
+ ref={ref}
122
+ className={cn("text-sm text-muted-foreground", className)}
123
+ {...props}
124
+ />
125
+ ))
126
+ SheetDescription.displayName = SheetPrimitive.Description.displayName
127
+
128
+ export {
129
+ Sheet,
130
+ SheetPortal,
131
+ SheetOverlay,
132
+ SheetTrigger,
133
+ SheetClose,
134
+ SheetContent,
135
+ SheetHeader,
136
+ SheetFooter,
137
+ SheetTitle,
138
+ SheetDescription,
139
+ }
@@ -2,4 +2,72 @@
2
2
  @import "./tailwind.css";
3
3
  @import "./tokens.css";
4
4
  @import "./design-system.css";
5
- @import "./advanced-chart.css";
5
+ @import "./advanced-chart.css";
6
+
7
+ /* React Grid Layout - Required for Dashboard component */
8
+ @import "react-grid-layout/css/styles.css";
9
+ @import "react-resizable/css/styles.css";
10
+
11
+ /* Dashboard Grid Layout Overrides */
12
+ .react-grid-layout {
13
+ position: relative !important;
14
+ transition: height 200ms ease;
15
+ }
16
+
17
+ .react-grid-item {
18
+ transition: all 200ms ease;
19
+ transition-property: left, top, width, height;
20
+ }
21
+
22
+ .react-grid-item > div {
23
+ height: 100%;
24
+ display: flex;
25
+ flex-direction: column;
26
+ }
27
+
28
+ .react-grid-item.cssTransforms {
29
+ transition-property: transform, width, height;
30
+ }
31
+
32
+ .react-grid-item.resizing {
33
+ transition: none;
34
+ z-index: 1;
35
+ will-change: width, height;
36
+ }
37
+
38
+ .react-grid-item.react-draggable-dragging {
39
+ transition: none;
40
+ z-index: 3;
41
+ will-change: transform;
42
+ }
43
+
44
+ /* Prevent overflow on small screens */
45
+ @media (max-width: 768px) {
46
+ .react-grid-layout {
47
+ overflow-x: hidden !important;
48
+ height: auto !important;
49
+ }
50
+
51
+ .react-grid-item {
52
+ position: relative !important;
53
+ transform: none !important;
54
+ margin-bottom: 24px !important;
55
+ width: 100% !important;
56
+ left: 0 !important;
57
+ right: 0 !important;
58
+ }
59
+
60
+ .react-grid-item:last-child {
61
+ margin-bottom: 0 !important;
62
+ }
63
+
64
+ /* React grid layout'u mobilde devre dışı bırak */
65
+ .react-grid-item.cssTransforms {
66
+ position: relative !important;
67
+ transform: none !important;
68
+ }
69
+
70
+ .react-grid-placeholder {
71
+ display: none !important;
72
+ }
73
+ }