@moontra/moonui 2.0.8 → 2.0.10
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 +9 -2
- package/src/__tests__/use-intersection-observer.test.tsx +216 -0
- package/src/__tests__/use-local-storage.test.tsx +174 -0
- package/src/__tests__/use-pro-access.test.tsx +183 -0
- package/src/components/ui/__tests__/accordion.test.tsx +571 -0
- package/src/components/ui/__tests__/alert.test.tsx +484 -0
- package/src/components/ui/__tests__/aspect-ratio.test.tsx +492 -0
- package/src/components/ui/__tests__/avatar.test.tsx +382 -0
- package/src/components/ui/__tests__/badge.test.tsx +364 -0
- package/src/components/ui/__tests__/breadcrumb.test.tsx +687 -0
- package/src/components/ui/__tests__/button.test.tsx +91 -0
- package/src/components/ui/__tests__/card.test.tsx +104 -0
- package/src/components/ui/__tests__/checkbox.test.tsx +591 -0
- package/src/components/ui/__tests__/collapsible.test.tsx +592 -0
- package/src/components/ui/__tests__/color-picker.test.tsx +365 -0
- package/src/components/ui/__tests__/command.test.tsx +677 -0
- package/src/components/ui/__tests__/data-table.test.tsx +256 -0
- package/src/components/ui/__tests__/date-picker.test.tsx +320 -0
- package/src/components/ui/__tests__/dialog.test.tsx +764 -0
- package/src/components/ui/__tests__/input.test.tsx +318 -0
- package/src/components/ui/__tests__/label.test.tsx +103 -0
- package/src/components/ui/__tests__/popover.test.tsx +637 -0
- package/src/components/ui/__tests__/progress.test.tsx +382 -0
- package/src/components/ui/__tests__/radio-group.test.tsx +555 -0
- package/src/components/ui/__tests__/select.test.tsx +705 -0
- package/src/components/ui/__tests__/skeleton.test.tsx +253 -0
- package/src/components/ui/__tests__/slider.test.tsx +493 -0
- package/src/components/ui/__tests__/switch.test.tsx +372 -0
- package/src/components/ui/__tests__/table.test.tsx +824 -0
- package/src/components/ui/__tests__/tabs.test.tsx +887 -0
- package/src/components/ui/__tests__/toast.test.tsx +458 -0
- package/src/components/ui/__tests__/tooltip.test.tsx +583 -0
- package/src/components/ui/accordion.tsx +63 -0
- package/src/components/ui/alert.tsx +130 -0
- package/src/components/ui/aspect-ratio.tsx +72 -0
- package/src/components/ui/avatar.tsx +135 -0
- package/src/components/ui/badge.tsx +225 -0
- package/src/components/ui/breadcrumb.tsx +207 -0
- package/src/components/ui/button.stories.tsx +162 -0
- package/src/components/ui/button.tsx +221 -0
- package/src/components/ui/calendar.tsx +262 -0
- package/src/components/ui/card.stories.tsx +208 -0
- package/src/components/ui/card.tsx +141 -0
- package/src/components/ui/checkbox.tsx +256 -0
- package/src/components/ui/collapsible.tsx +129 -0
- package/src/components/ui/color-picker.tsx +664 -0
- package/src/components/ui/command.tsx +218 -0
- package/src/components/ui/data-table.stories.tsx +509 -0
- package/src/components/ui/data-table.tsx +623 -0
- package/src/components/ui/date-picker.stories.tsx +321 -0
- package/src/components/ui/date-picker.tsx +603 -0
- package/src/components/ui/dialog.tsx +332 -0
- package/src/components/ui/dropdown-menu.tsx +200 -0
- package/src/components/ui/file-upload.tsx +400 -0
- package/src/components/ui/github-stars.tsx +201 -0
- package/src/components/ui/index.ts +12 -0
- package/src/components/ui/input.stories.tsx +255 -0
- package/src/components/ui/input.tsx +219 -0
- package/src/components/ui/label.tsx +26 -0
- package/src/components/ui/locked-component.tsx +215 -0
- package/src/components/ui/moon-logo.tsx +97 -0
- package/src/components/ui/pagination.tsx +116 -0
- package/src/components/ui/popover.tsx +183 -0
- package/src/components/ui/progress.tsx +182 -0
- package/src/components/ui/radio-group.tsx +243 -0
- package/src/components/ui/select.tsx +273 -0
- package/src/components/ui/separator.tsx +140 -0
- package/src/components/ui/simple-editor.tsx +652 -0
- package/src/components/ui/skeleton.tsx +351 -0
- package/src/components/ui/slider.tsx +351 -0
- package/src/components/ui/switch.tsx +83 -0
- package/src/components/ui/table.tsx +322 -0
- package/src/components/ui/tabs.tsx +195 -0
- package/src/components/ui/textarea.tsx +46 -0
- package/src/components/ui/toast.tsx +313 -0
- package/src/components/ui/toggle.tsx +47 -0
- package/src/components/ui/tooltip.tsx +152 -0
- package/src/docs/theme-system.md +1194 -0
- package/src/index.tsx +39 -0
- package/src/lib/micro-interactions.ts +255 -0
- package/src/lib/theme.tsx +398 -0
- package/src/lib/utils.ts +69 -0
- package/src/styles/design-system.css +365 -0
- package/src/styles/index.css +4 -0
- package/src/styles/tailwind.css +6 -0
- package/src/styles/tokens.css +453 -0
- package/src/use-intersection-observer.tsx +154 -0
- package/src/use-local-storage.tsx +71 -0
- package/src/use-paddle.ts +138 -0
- package/src/use-performance-optimizer.ts +379 -0
- package/src/use-pro-access.ts +141 -0
- package/src/use-scroll-animation.ts +221 -0
- package/src/use-subscription.ts +37 -0
- package/src/use-toast.ts +32 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../../lib/utils"
|
|
8
|
+
|
|
9
|
+
const separatorVariants = cva(
|
|
10
|
+
"shrink-0 bg-border",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
orientation: {
|
|
14
|
+
horizontal: "h-[1px] w-full",
|
|
15
|
+
vertical: "h-full w-[1px]",
|
|
16
|
+
},
|
|
17
|
+
variant: {
|
|
18
|
+
default: "bg-border",
|
|
19
|
+
dashed: "border-dashed border-border bg-transparent",
|
|
20
|
+
dotted: "border-dotted border-border bg-transparent",
|
|
21
|
+
gradient: "bg-gradient-to-r from-transparent via-border to-transparent",
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
sm: "",
|
|
25
|
+
md: "",
|
|
26
|
+
lg: "",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
{
|
|
31
|
+
orientation: "horizontal",
|
|
32
|
+
variant: "dashed",
|
|
33
|
+
className: "border-t h-0",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
orientation: "vertical",
|
|
37
|
+
variant: "dashed",
|
|
38
|
+
className: "border-l w-0",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
orientation: "horizontal",
|
|
42
|
+
variant: "dotted",
|
|
43
|
+
className: "border-t h-0",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
orientation: "vertical",
|
|
47
|
+
variant: "dotted",
|
|
48
|
+
className: "border-l w-0",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
orientation: "horizontal",
|
|
52
|
+
size: "sm",
|
|
53
|
+
variant: ["dashed", "dotted"],
|
|
54
|
+
className: "border-t-[0.5px]",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
orientation: "horizontal",
|
|
58
|
+
size: "lg",
|
|
59
|
+
variant: ["dashed", "dotted"],
|
|
60
|
+
className: "border-t-2",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
orientation: "vertical",
|
|
64
|
+
size: "sm",
|
|
65
|
+
variant: ["dashed", "dotted"],
|
|
66
|
+
className: "border-l-[0.5px]",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
orientation: "vertical",
|
|
70
|
+
size: "lg",
|
|
71
|
+
variant: ["dashed", "dotted"],
|
|
72
|
+
className: "border-l-2",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
orientation: "horizontal",
|
|
76
|
+
size: "sm",
|
|
77
|
+
variant: ["default", "gradient"],
|
|
78
|
+
className: "h-[0.5px]",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
orientation: "horizontal",
|
|
82
|
+
size: "lg",
|
|
83
|
+
variant: ["default", "gradient"],
|
|
84
|
+
className: "h-[2px]",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
orientation: "vertical",
|
|
88
|
+
size: "sm",
|
|
89
|
+
variant: ["default", "gradient"],
|
|
90
|
+
className: "w-[0.5px]",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
orientation: "vertical",
|
|
94
|
+
size: "lg",
|
|
95
|
+
variant: ["default", "gradient"],
|
|
96
|
+
className: "w-[2px]",
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
defaultVariants: {
|
|
100
|
+
orientation: "horizontal",
|
|
101
|
+
variant: "default",
|
|
102
|
+
size: "md",
|
|
103
|
+
},
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
export interface SeparatorProps
|
|
108
|
+
extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>,
|
|
109
|
+
VariantProps<typeof separatorVariants> {}
|
|
110
|
+
|
|
111
|
+
const Separator = React.forwardRef<
|
|
112
|
+
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
113
|
+
SeparatorProps
|
|
114
|
+
>(
|
|
115
|
+
(
|
|
116
|
+
{
|
|
117
|
+
className,
|
|
118
|
+
orientation = "horizontal",
|
|
119
|
+
variant = "default",
|
|
120
|
+
size = "md",
|
|
121
|
+
decorative = true,
|
|
122
|
+
...props
|
|
123
|
+
},
|
|
124
|
+
ref
|
|
125
|
+
) => (
|
|
126
|
+
<SeparatorPrimitive.Root
|
|
127
|
+
ref={ref}
|
|
128
|
+
decorative={decorative}
|
|
129
|
+
orientation={orientation}
|
|
130
|
+
className={cn(
|
|
131
|
+
separatorVariants({ orientation, variant, size }),
|
|
132
|
+
className
|
|
133
|
+
)}
|
|
134
|
+
{...props}
|
|
135
|
+
/>
|
|
136
|
+
)
|
|
137
|
+
)
|
|
138
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName
|
|
139
|
+
|
|
140
|
+
export { Separator, separatorVariants }
|