@moontra/moonui 2.1.3 → 2.1.5
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/dist/index.js +180 -219
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +174 -192
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/avatar.tsx +13 -13
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/checkbox.tsx +7 -7
- package/src/components/ui/collapsible.tsx +2 -2
- package/src/components/ui/command.tsx +7 -7
- package/src/components/ui/dialog.tsx +8 -8
- package/src/components/ui/dropdown-menu.tsx +8 -8
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/pagination.tsx +12 -12
- package/src/components/ui/popover.tsx +7 -7
- package/src/components/ui/radio-group.tsx +4 -4
- package/src/components/ui/select.tsx +9 -9
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/skeleton.tsx +6 -6
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +4 -4
- package/src/components/ui/toast.tsx +11 -11
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +5 -5
|
@@ -183,7 +183,7 @@ export interface SkeletonTextProps extends Omit<SkeletonProps, "children" | "isL
|
|
|
183
183
|
randomWidths?: boolean;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
export const
|
|
186
|
+
export const MoonUISkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(
|
|
187
187
|
({
|
|
188
188
|
className,
|
|
189
189
|
lines = 3,
|
|
@@ -228,7 +228,7 @@ export const SkeletonText = React.forwardRef<HTMLDivElement, SkeletonTextProps>(
|
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
|
-
|
|
231
|
+
MoonUISkeletonText.displayName = "SkeletonText";
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
234
|
* Avatar Skeleton Component
|
|
@@ -240,7 +240,7 @@ export interface SkeletonAvatarProps extends Omit<SkeletonProps, "shape" | "size
|
|
|
240
240
|
size?: string | number;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
export const
|
|
243
|
+
export const MoonUISkeletonAvatar = React.forwardRef<HTMLDivElement, SkeletonAvatarProps>(
|
|
244
244
|
({
|
|
245
245
|
className,
|
|
246
246
|
size = "2.5rem",
|
|
@@ -264,7 +264,7 @@ export const SkeletonAvatar = React.forwardRef<HTMLDivElement, SkeletonAvatarPro
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
|
-
|
|
267
|
+
MoonUISkeletonAvatar.displayName = "SkeletonAvatar";
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
270
|
* Card Skeleton Component
|
|
@@ -284,7 +284,7 @@ export interface SkeletonCardProps extends Omit<SkeletonProps, "children" | "isL
|
|
|
284
284
|
showFooter?: boolean;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
export const
|
|
287
|
+
export const MoonUISkeletonCard = React.forwardRef<HTMLDivElement, SkeletonCardProps>(
|
|
288
288
|
({
|
|
289
289
|
className,
|
|
290
290
|
showHeader = true,
|
|
@@ -346,7 +346,7 @@ export const SkeletonCard = React.forwardRef<HTMLDivElement, SkeletonCardProps>(
|
|
|
346
346
|
);
|
|
347
347
|
}
|
|
348
348
|
);
|
|
349
|
-
|
|
349
|
+
MoonUISkeletonCard.displayName = "SkeletonCard";
|
|
350
350
|
|
|
351
351
|
export { moonUISkeletonVariants };
|
|
352
352
|
|
|
@@ -77,7 +77,7 @@ const MoonUISwitch = React.forwardRef<
|
|
|
77
77
|
{description && <span className="text-sm text-muted-foreground">{description}</span>}
|
|
78
78
|
</div>
|
|
79
79
|
))
|
|
80
|
-
|
|
80
|
+
MoonUISwitch.displayName = SwitchPrimitives.Root.displayName
|
|
81
81
|
|
|
82
82
|
export { MoonUISwitch };
|
|
83
83
|
|
|
@@ -23,7 +23,7 @@ const MoonUITabs = React.forwardRef<
|
|
|
23
23
|
/>
|
|
24
24
|
));
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
MoonUITabs.displayName = TabsPrimitive.Root.displayName;
|
|
27
27
|
|
|
28
28
|
/* -------------------------------------------------------------------------------------------------
|
|
29
29
|
* TabsList
|
|
@@ -73,7 +73,7 @@ const MoonUITabsList = React.forwardRef<
|
|
|
73
73
|
/>
|
|
74
74
|
));
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
MoonUITabsList.displayName = TabsPrimitive.List.displayName;
|
|
77
77
|
|
|
78
78
|
/* -------------------------------------------------------------------------------------------------
|
|
79
79
|
* TabsTrigger
|
|
@@ -164,7 +164,7 @@ const MoonUITabsTrigger = React.forwardRef<
|
|
|
164
164
|
</TabsPrimitive.Trigger>
|
|
165
165
|
));
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
MoonUITabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
168
168
|
|
|
169
169
|
/* -------------------------------------------------------------------------------------------------
|
|
170
170
|
* TabsContent
|
|
@@ -190,7 +190,7 @@ const MoonUITabsContent = React.forwardRef<
|
|
|
190
190
|
/>
|
|
191
191
|
));
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
MoonUITabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
194
194
|
|
|
195
195
|
export { MoonUITabs, MoonUITabsList, MoonUITabsTrigger, MoonUITabsContent };
|
|
196
196
|
|
|
@@ -8,7 +8,7 @@ import { cn } from "../../lib/utils";
|
|
|
8
8
|
|
|
9
9
|
const ToastProvider = ToastPrimitives.Provider;
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MoonUIToastViewport = React.forwardRef<
|
|
12
12
|
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
13
13
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
|
|
14
14
|
>(({ className, ...props }, ref) => (
|
|
@@ -21,7 +21,7 @@ const ToastViewport = React.forwardRef<
|
|
|
21
21
|
{...props}
|
|
22
22
|
/>
|
|
23
23
|
));
|
|
24
|
-
|
|
24
|
+
MoonUIToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
25
25
|
|
|
26
26
|
const moonUIToastVariants = cva(
|
|
27
27
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
@@ -62,9 +62,9 @@ const MoonUIToast = React.forwardRef<
|
|
|
62
62
|
/>
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
MoonUIToast.displayName = ToastPrimitives.Root.displayName;
|
|
66
66
|
|
|
67
|
-
const
|
|
67
|
+
const MoonUIToastAction = React.forwardRef<
|
|
68
68
|
React.ElementRef<typeof ToastPrimitives.Action>,
|
|
69
69
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
|
|
70
70
|
>(({ className, ...props }, ref) => (
|
|
@@ -77,9 +77,9 @@ const ToastAction = React.forwardRef<
|
|
|
77
77
|
{...props}
|
|
78
78
|
/>
|
|
79
79
|
));
|
|
80
|
-
|
|
80
|
+
MoonUIToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
81
81
|
|
|
82
|
-
const
|
|
82
|
+
const MoonUIToastClose = React.forwardRef<
|
|
83
83
|
React.ElementRef<typeof ToastPrimitives.Close>,
|
|
84
84
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
|
|
85
85
|
>(({ className, ...props }, ref) => (
|
|
@@ -95,9 +95,9 @@ const ToastClose = React.forwardRef<
|
|
|
95
95
|
<X className="h-4 w-4" />
|
|
96
96
|
</ToastPrimitives.Close>
|
|
97
97
|
));
|
|
98
|
-
|
|
98
|
+
MoonUIToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
99
99
|
|
|
100
|
-
const
|
|
100
|
+
const MoonUIToastTitle = React.forwardRef<
|
|
101
101
|
React.ElementRef<typeof ToastPrimitives.Title>,
|
|
102
102
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
|
|
103
103
|
>(({ className, ...props }, ref) => (
|
|
@@ -107,9 +107,9 @@ const ToastTitle = React.forwardRef<
|
|
|
107
107
|
{...props}
|
|
108
108
|
/>
|
|
109
109
|
));
|
|
110
|
-
|
|
110
|
+
MoonUIToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
111
111
|
|
|
112
|
-
const
|
|
112
|
+
const MoonUIToastDescription = React.forwardRef<
|
|
113
113
|
React.ElementRef<typeof ToastPrimitives.Description>,
|
|
114
114
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
|
|
115
115
|
>(({ className, ...props }, ref) => (
|
|
@@ -119,7 +119,7 @@ const ToastDescription = React.forwardRef<
|
|
|
119
119
|
{...props}
|
|
120
120
|
/>
|
|
121
121
|
));
|
|
122
|
-
|
|
122
|
+
MoonUIToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
123
123
|
|
|
124
124
|
type ToastData = {
|
|
125
125
|
id: string;
|
|
@@ -37,7 +37,7 @@ const MoonUITooltip = TooltipPrimitive.Root
|
|
|
37
37
|
|
|
38
38
|
const MoonUITooltipTrigger = TooltipPrimitive.Trigger
|
|
39
39
|
|
|
40
|
-
const
|
|
40
|
+
const MoonUITooltipArrow = React.forwardRef<
|
|
41
41
|
React.ElementRef<typeof TooltipPrimitive.Arrow>,
|
|
42
42
|
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>
|
|
43
43
|
>(({ className, ...props }, ref) => (
|
|
@@ -47,7 +47,7 @@ const TooltipArrow = React.forwardRef<
|
|
|
47
47
|
{...props}
|
|
48
48
|
/>
|
|
49
49
|
))
|
|
50
|
-
|
|
50
|
+
MoonUITooltipArrow.displayName = TooltipPrimitive.Arrow.displayName
|
|
51
51
|
|
|
52
52
|
export interface MoonUITooltipContentProps
|
|
53
53
|
extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,
|
|
@@ -69,7 +69,7 @@ const MoonUITooltipContent = React.forwardRef<
|
|
|
69
69
|
{showArrow && <TooltipArrow />}
|
|
70
70
|
</TooltipPrimitive.Content>
|
|
71
71
|
))
|
|
72
|
-
|
|
72
|
+
MoonUITooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
73
73
|
|
|
74
74
|
// Simplified Tooltip component for easy usage
|
|
75
75
|
export interface SimpleTooltipProps {
|
|
@@ -89,7 +89,7 @@ export interface SimpleTooltipProps {
|
|
|
89
89
|
onOpenChange?: (open: boolean) => void
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
const
|
|
92
|
+
const MoonUISimpleTooltip = React.forwardRef<
|
|
93
93
|
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
94
94
|
SimpleTooltipProps
|
|
95
95
|
>(
|
|
@@ -139,7 +139,7 @@ const SimpleTooltip = React.forwardRef<
|
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
)
|
|
142
|
-
|
|
142
|
+
MoonUISimpleTooltip.displayName = "SimpleTooltip"
|
|
143
143
|
|
|
144
144
|
export { MoonUITooltip,
|
|
145
145
|
MoonUITooltipProvider,
|