@moontra/moonui-pro 2.20.1 → 2.20.3
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.d.ts +691 -261
- package/dist/index.mjs +7418 -4934
- package/package.json +11 -5
- package/plugin/index.d.ts +86 -0
- package/plugin/index.js +308 -0
- package/scripts/postbuild.js +27 -0
- package/scripts/postinstall.js +176 -23
- package/src/__tests__/use-intersection-observer.test.tsx +0 -216
- package/src/__tests__/use-local-storage.test.tsx +0 -174
- package/src/__tests__/use-pro-access.test.tsx +0 -183
- package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
- package/src/components/advanced-chart/index.tsx +0 -1242
- package/src/components/advanced-forms/index.tsx +0 -426
- package/src/components/animated-button/index.tsx +0 -385
- package/src/components/calendar/event-dialog.tsx +0 -372
- package/src/components/calendar/index.tsx +0 -1073
- package/src/components/calendar-pro/index.tsx +0 -1697
- package/src/components/color-picker/index.tsx +0 -432
- package/src/components/credit-card-input/index.tsx +0 -406
- package/src/components/dashboard/dashboard-grid.tsx +0 -462
- package/src/components/dashboard/demo.tsx +0 -425
- package/src/components/dashboard/index.tsx +0 -1046
- package/src/components/dashboard/time-range-picker.tsx +0 -336
- package/src/components/dashboard/types.ts +0 -222
- package/src/components/dashboard/widgets/activity-feed.tsx +0 -344
- package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
- package/src/components/dashboard/widgets/metric-card.tsx +0 -343
- package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
- package/src/components/data-table/data-table-column-toggle.tsx +0 -169
- package/src/components/data-table/data-table-export.ts +0 -156
- package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
- package/src/components/data-table/data-table.test.tsx +0 -187
- package/src/components/data-table/index.tsx +0 -845
- package/src/components/draggable-list/index.tsx +0 -100
- package/src/components/enhanced/badge.tsx +0 -191
- package/src/components/enhanced/button.tsx +0 -362
- package/src/components/enhanced/card.tsx +0 -266
- package/src/components/enhanced/dialog.tsx +0 -246
- package/src/components/enhanced/index.ts +0 -4
- package/src/components/error-boundary/index.tsx +0 -109
- package/src/components/file-upload/file-upload.test.tsx +0 -243
- package/src/components/file-upload/index.tsx +0 -1660
- package/src/components/floating-action-button/index.tsx +0 -206
- package/src/components/form-wizard/form-wizard-context.tsx +0 -307
- package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
- package/src/components/form-wizard/form-wizard-progress.tsx +0 -298
- package/src/components/form-wizard/form-wizard-step.tsx +0 -111
- package/src/components/form-wizard/index.tsx +0 -102
- package/src/components/form-wizard/types.ts +0 -76
- package/src/components/gesture-drawer/index.tsx +0 -551
- package/src/components/github-stars/github-api.ts +0 -426
- package/src/components/github-stars/hooks.ts +0 -516
- package/src/components/github-stars/index.tsx +0 -375
- package/src/components/github-stars/types.ts +0 -148
- package/src/components/github-stars/variants.tsx +0 -513
- package/src/components/health-check/index.tsx +0 -439
- package/src/components/hover-card-3d/index.tsx +0 -530
- package/src/components/index.ts +0 -128
- package/src/components/internal/index.ts +0 -78
- package/src/components/kanban/add-card-modal.tsx +0 -502
- package/src/components/kanban/card-detail-modal.tsx +0 -761
- package/src/components/kanban/index.ts +0 -13
- package/src/components/kanban/kanban.tsx +0 -1684
- package/src/components/kanban/types.ts +0 -168
- package/src/components/lazy-component/index.tsx +0 -823
- package/src/components/license-error/index.tsx +0 -29
- package/src/components/magnetic-button/index.tsx +0 -167
- package/src/components/memory-efficient-data/index.tsx +0 -1016
- package/src/components/moonui-quiz-form/index.tsx +0 -817
- package/src/components/optimized-image/index.tsx +0 -425
- package/src/components/performance-debugger/index.tsx +0 -589
- package/src/components/performance-monitor/index.tsx +0 -794
- package/src/components/phone-number-input/index.tsx +0 -338
- package/src/components/pinch-zoom/index.tsx +0 -566
- package/src/components/quiz-form/index.tsx +0 -479
- package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
- package/src/components/rich-text-editor/index.tsx +0 -2324
- package/src/components/rich-text-editor/slash-commands-extension.ts +0 -220
- package/src/components/rich-text-editor/slash-commands.css +0 -35
- package/src/components/rich-text-editor/table-styles.css +0 -65
- package/src/components/sidebar/index.tsx +0 -865
- package/src/components/spotlight-card/index.tsx +0 -191
- package/src/components/swipeable-card/index.tsx +0 -100
- package/src/components/timeline/index.tsx +0 -1148
- package/src/components/ui/accordion.tsx +0 -73
- package/src/components/ui/alert-dialog.tsx +0 -141
- package/src/components/ui/alert.tsx +0 -141
- package/src/components/ui/aspect-ratio.tsx +0 -245
- package/src/components/ui/avatar.tsx +0 -153
- package/src/components/ui/badge.tsx +0 -228
- package/src/components/ui/breadcrumb.tsx +0 -214
- package/src/components/ui/button.tsx +0 -222
- package/src/components/ui/calendar.tsx +0 -387
- package/src/components/ui/card.tsx +0 -214
- package/src/components/ui/checkbox.tsx +0 -259
- package/src/components/ui/collapsible.tsx +0 -135
- package/src/components/ui/color-picker.tsx +0 -97
- package/src/components/ui/command.tsx +0 -225
- package/src/components/ui/dialog.tsx +0 -334
- package/src/components/ui/dropdown-menu.tsx +0 -218
- package/src/components/ui/gesture-drawer.tsx +0 -11
- package/src/components/ui/hover-card.tsx +0 -29
- package/src/components/ui/index.ts +0 -190
- package/src/components/ui/input.tsx +0 -222
- package/src/components/ui/label.tsx +0 -29
- package/src/components/ui/lightbox.tsx +0 -606
- package/src/components/ui/magnetic-button.tsx +0 -129
- package/src/components/ui/media-gallery.tsx +0 -612
- package/src/components/ui/pagination.tsx +0 -123
- package/src/components/ui/popover.tsx +0 -185
- package/src/components/ui/progress.tsx +0 -30
- package/src/components/ui/radio-group.tsx +0 -257
- package/src/components/ui/scroll-area.tsx +0 -47
- package/src/components/ui/select.tsx +0 -374
- package/src/components/ui/separator.tsx +0 -145
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/skeleton.tsx +0 -20
- package/src/components/ui/slider.tsx +0 -354
- package/src/components/ui/spotlight-card.tsx +0 -119
- package/src/components/ui/switch.tsx +0 -86
- package/src/components/ui/table.tsx +0 -329
- package/src/components/ui/tabs.tsx +0 -198
- package/src/components/ui/textarea.tsx +0 -28
- package/src/components/ui/toast.tsx +0 -317
- package/src/components/ui/toggle.tsx +0 -119
- package/src/components/ui/tooltip.tsx +0 -151
- package/src/components/virtual-list/index.tsx +0 -668
- package/src/hooks/use-chart.ts +0 -205
- package/src/hooks/use-data-table.ts +0 -182
- package/src/hooks/use-docs-pro-access.ts +0 -13
- package/src/hooks/use-license-check.ts +0 -65
- package/src/hooks/use-subscription.ts +0 -19
- package/src/hooks/use-toast.ts +0 -15
- package/src/index.ts +0 -14
- package/src/lib/ai-providers.ts +0 -377
- package/src/lib/component-metadata.ts +0 -18
- package/src/lib/micro-interactions.ts +0 -255
- package/src/lib/paddle.ts +0 -17
- package/src/lib/utils.ts +0 -6
- package/src/patterns/login-form/index.tsx +0 -276
- package/src/patterns/login-form/types.ts +0 -67
- package/src/setupTests.ts +0 -41
- package/src/styles/advanced-chart.css +0 -239
- package/src/styles/calendar.css +0 -35
- package/src/styles/design-system.css +0 -363
- package/src/styles/index.css +0 -85
- package/src/styles/tailwind.css +0 -7
- package/src/styles/tokens.css +0 -455
- package/src/types/moonui.d.ts +0 -22
- package/src/types/next-auth.d.ts +0 -21
- package/src/use-intersection-observer.tsx +0 -154
- package/src/use-local-storage.tsx +0 -71
- package/src/use-paddle.ts +0 -138
- package/src/use-performance-optimizer.ts +0 -389
- package/src/use-pro-access.ts +0 -141
- package/src/use-scroll-animation.ts +0 -219
- package/src/use-subscription.ts +0 -37
- package/src/use-toast.ts +0 -32
- package/src/utils/chart-helpers.ts +0 -357
- package/src/utils/cn.ts +0 -6
- package/src/utils/data-processing.ts +0 -151
- package/src/utils/license-validator.tsx +0 -183
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
|
5
|
-
import { Check, ChevronRight, Circle } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils"
|
|
8
|
-
|
|
9
|
-
const MoonUIDropdownMenuPro = DropdownMenuPrimitive.Root
|
|
10
|
-
|
|
11
|
-
const MoonUIDropdownMenuTriggerPro = DropdownMenuPrimitive.Trigger
|
|
12
|
-
|
|
13
|
-
const MoonUIDropdownMenuGroupPro = DropdownMenuPrimitive.Group
|
|
14
|
-
|
|
15
|
-
const MoonUIDropdownMenuPortalPro = DropdownMenuPrimitive.Portal
|
|
16
|
-
|
|
17
|
-
const MoonUIDropdownMenuSubPro = DropdownMenuPrimitive.Sub
|
|
18
|
-
|
|
19
|
-
const MoonUIDropdownMenuRadioGroupPro = DropdownMenuPrimitive.RadioGroup
|
|
20
|
-
|
|
21
|
-
const MoonUIDropdownMenuSubTriggerPro = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
-
inset?: boolean
|
|
25
|
-
}
|
|
26
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
27
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn(
|
|
30
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
31
|
-
inset && "pl-8",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...props}
|
|
35
|
-
>
|
|
36
|
-
{children}
|
|
37
|
-
<ChevronRight className="ml-auto h-4 w-4" />
|
|
38
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
39
|
-
))
|
|
40
|
-
MoonUIDropdownMenuSubTriggerPro.displayName =
|
|
41
|
-
DropdownMenuPrimitive.SubTrigger.displayName
|
|
42
|
-
|
|
43
|
-
const MoonUIDropdownMenuSubContentPro = React.forwardRef<
|
|
44
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
45
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
46
|
-
>(({ className, ...props }, ref) => (
|
|
47
|
-
<DropdownMenuPrimitive.SubContent
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={cn(
|
|
50
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
|
|
51
|
-
className
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
))
|
|
56
|
-
MoonUIDropdownMenuSubContentPro.displayName =
|
|
57
|
-
DropdownMenuPrimitive.SubContent.displayName
|
|
58
|
-
|
|
59
|
-
const MoonUIDropdownMenuContentPro = React.forwardRef<
|
|
60
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
61
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
62
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
63
|
-
<DropdownMenuPrimitive.Portal>
|
|
64
|
-
<DropdownMenuPrimitive.Content
|
|
65
|
-
ref={ref}
|
|
66
|
-
sideOffset={sideOffset}
|
|
67
|
-
className={cn(
|
|
68
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
|
|
69
|
-
className
|
|
70
|
-
)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
</DropdownMenuPrimitive.Portal>
|
|
74
|
-
))
|
|
75
|
-
MoonUIDropdownMenuContentPro.displayName = DropdownMenuPrimitive.Content.displayName
|
|
76
|
-
|
|
77
|
-
const MoonUIDropdownMenuItemPro = React.forwardRef<
|
|
78
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
79
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
80
|
-
inset?: boolean
|
|
81
|
-
}
|
|
82
|
-
>(({ className, inset, ...props }, ref) => (
|
|
83
|
-
<DropdownMenuPrimitive.Item
|
|
84
|
-
ref={ref}
|
|
85
|
-
className={cn(
|
|
86
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
87
|
-
inset && "pl-8",
|
|
88
|
-
className
|
|
89
|
-
)}
|
|
90
|
-
{...props}
|
|
91
|
-
/>
|
|
92
|
-
))
|
|
93
|
-
MoonUIDropdownMenuItemPro.displayName = DropdownMenuPrimitive.Item.displayName
|
|
94
|
-
|
|
95
|
-
const MoonUIDropdownMenuCheckboxItemPro = React.forwardRef<
|
|
96
|
-
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
97
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
98
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
99
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
100
|
-
ref={ref}
|
|
101
|
-
className={cn(
|
|
102
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
103
|
-
className
|
|
104
|
-
)}
|
|
105
|
-
checked={checked}
|
|
106
|
-
{...props}
|
|
107
|
-
>
|
|
108
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
109
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
110
|
-
<Check className="h-4 w-4" />
|
|
111
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
112
|
-
</span>
|
|
113
|
-
{children}
|
|
114
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
115
|
-
))
|
|
116
|
-
MoonUIDropdownMenuCheckboxItemPro.displayName =
|
|
117
|
-
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
118
|
-
|
|
119
|
-
const MoonUIDropdownMenuRadioItemPro = React.forwardRef<
|
|
120
|
-
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
121
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
122
|
-
>(({ className, children, ...props }, ref) => (
|
|
123
|
-
<DropdownMenuPrimitive.RadioItem
|
|
124
|
-
ref={ref}
|
|
125
|
-
className={cn(
|
|
126
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
127
|
-
className
|
|
128
|
-
)}
|
|
129
|
-
{...props}
|
|
130
|
-
>
|
|
131
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
132
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
133
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
134
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
135
|
-
</span>
|
|
136
|
-
{children}
|
|
137
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
138
|
-
))
|
|
139
|
-
MoonUIDropdownMenuRadioItemPro.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
140
|
-
|
|
141
|
-
const MoonUIDropdownMenuLabelPro = React.forwardRef<
|
|
142
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
143
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
144
|
-
inset?: boolean
|
|
145
|
-
}
|
|
146
|
-
>(({ className, inset, ...props }, ref) => (
|
|
147
|
-
<DropdownMenuPrimitive.Label
|
|
148
|
-
ref={ref}
|
|
149
|
-
className={cn(
|
|
150
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
151
|
-
inset && "pl-8",
|
|
152
|
-
className
|
|
153
|
-
)}
|
|
154
|
-
{...props}
|
|
155
|
-
/>
|
|
156
|
-
))
|
|
157
|
-
MoonUIDropdownMenuLabelPro.displayName = DropdownMenuPrimitive.Label.displayName
|
|
158
|
-
|
|
159
|
-
const MoonUIDropdownMenuSeparatorPro = React.forwardRef<
|
|
160
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
161
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
162
|
-
>(({ className, ...props }, ref) => (
|
|
163
|
-
<DropdownMenuPrimitive.Separator
|
|
164
|
-
ref={ref}
|
|
165
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
166
|
-
{...props}
|
|
167
|
-
/>
|
|
168
|
-
))
|
|
169
|
-
MoonUIDropdownMenuSeparatorPro.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
170
|
-
|
|
171
|
-
const MoonUIDropdownMenuShortcutPro = ({
|
|
172
|
-
className,
|
|
173
|
-
...props
|
|
174
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
175
|
-
return (
|
|
176
|
-
<span
|
|
177
|
-
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
178
|
-
{...props}
|
|
179
|
-
/>
|
|
180
|
-
)
|
|
181
|
-
}
|
|
182
|
-
MoonUIDropdownMenuShortcutPro.displayName = "MoonUIDropdownMenuShortcutPro"
|
|
183
|
-
|
|
184
|
-
export { MoonUIDropdownMenuPro,
|
|
185
|
-
MoonUIDropdownMenuTriggerPro,
|
|
186
|
-
MoonUIDropdownMenuContentPro,
|
|
187
|
-
MoonUIDropdownMenuItemPro,
|
|
188
|
-
MoonUIDropdownMenuCheckboxItemPro,
|
|
189
|
-
MoonUIDropdownMenuRadioItemPro,
|
|
190
|
-
MoonUIDropdownMenuLabelPro,
|
|
191
|
-
MoonUIDropdownMenuSeparatorPro,
|
|
192
|
-
MoonUIDropdownMenuShortcutPro,
|
|
193
|
-
MoonUIDropdownMenuGroupPro,
|
|
194
|
-
MoonUIDropdownMenuPortalPro,
|
|
195
|
-
MoonUIDropdownMenuSubPro,
|
|
196
|
-
MoonUIDropdownMenuSubContentPro,
|
|
197
|
-
MoonUIDropdownMenuSubTriggerPro,
|
|
198
|
-
MoonUIDropdownMenuRadioGroupPro,
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
// Clean exports (only dropdown-menu specific)
|
|
202
|
-
export {
|
|
203
|
-
MoonUIDropdownMenuPro as DropdownMenu,
|
|
204
|
-
MoonUIDropdownMenuTriggerPro as DropdownMenuTrigger,
|
|
205
|
-
MoonUIDropdownMenuContentPro as DropdownMenuContent,
|
|
206
|
-
MoonUIDropdownMenuItemPro as DropdownMenuItem,
|
|
207
|
-
MoonUIDropdownMenuCheckboxItemPro as DropdownMenuCheckboxItem,
|
|
208
|
-
MoonUIDropdownMenuRadioItemPro as DropdownMenuRadioItem,
|
|
209
|
-
MoonUIDropdownMenuLabelPro as DropdownMenuLabel,
|
|
210
|
-
MoonUIDropdownMenuSeparatorPro as DropdownMenuSeparator,
|
|
211
|
-
MoonUIDropdownMenuShortcutPro as DropdownMenuShortcut,
|
|
212
|
-
MoonUIDropdownMenuGroupPro as DropdownMenuGroup,
|
|
213
|
-
MoonUIDropdownMenuPortalPro as DropdownMenuPortal,
|
|
214
|
-
MoonUIDropdownMenuSubPro as DropdownMenuSub,
|
|
215
|
-
MoonUIDropdownMenuSubContentPro as DropdownMenuSubContent,
|
|
216
|
-
MoonUIDropdownMenuSubTriggerPro as DropdownMenuSubTrigger,
|
|
217
|
-
MoonUIDropdownMenuRadioGroupPro as DropdownMenuRadioGroup
|
|
218
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
MoonUIGestureDrawerPro,
|
|
5
|
-
GestureDrawer,
|
|
6
|
-
type MoonUIGestureDrawerProProps,
|
|
7
|
-
type GestureDrawerProps,
|
|
8
|
-
moonUIGestureDrawerProVariants
|
|
9
|
-
} from "../gesture-drawer/index"
|
|
10
|
-
|
|
11
|
-
export { MoonUIGestureDrawerPro as default } from "../gesture-drawer/index"
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils"
|
|
7
|
-
|
|
8
|
-
const HoverCard = HoverCardPrimitive.Root
|
|
9
|
-
|
|
10
|
-
const HoverCardTrigger = HoverCardPrimitive.Trigger
|
|
11
|
-
|
|
12
|
-
const HoverCardContent = React.forwardRef<
|
|
13
|
-
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
14
|
-
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
15
|
-
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
16
|
-
<HoverCardPrimitive.Content
|
|
17
|
-
ref={ref}
|
|
18
|
-
align={align}
|
|
19
|
-
sideOffset={sideOffset}
|
|
20
|
-
className={cn(
|
|
21
|
-
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",
|
|
22
|
-
className
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
))
|
|
27
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
|
|
28
|
-
|
|
29
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent }
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
// Core UI Components - Only MoonUI*Pro exports to avoid conflicts
|
|
2
|
-
export {
|
|
3
|
-
MoonUIAccordionPro, MoonUIAccordionItemPro, MoonUIAccordionTriggerPro, MoonUIAccordionContentPro,
|
|
4
|
-
Accordion, AccordionItem, AccordionTrigger, AccordionContent
|
|
5
|
-
} from './accordion';
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
MoonUIalertVariantsPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAlertDescriptionPro,
|
|
9
|
-
alertVariants, Alert, AlertTitle, AlertDescription
|
|
10
|
-
} from './alert';
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
MoonUIaspectRatioVariantsPro, MoonUIAspectRatioPro,
|
|
14
|
-
aspectRatioVariants, AspectRatio
|
|
15
|
-
} from './aspect-ratio';
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
MoonUIAvatarPro, MoonUIAvatarImagePro, MoonUIAvatarFallbackPro,
|
|
19
|
-
Avatar, AvatarImage, AvatarFallback
|
|
20
|
-
} from './avatar';
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
MoonUIBadgePro, moonUIBadgeVariantsPro,
|
|
24
|
-
Badge, badgeVariants
|
|
25
|
-
} from './badge';
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
MoonUIbreadcrumbVariantsPro, MoonUIBreadcrumbPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbSeparatorPro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbPagePro,
|
|
29
|
-
breadcrumbVariants, Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbSeparator, BreadcrumbEllipsis, BreadcrumbLink, BreadcrumbPage
|
|
30
|
-
} from './breadcrumb';
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
MoonUIButtonPro, moonUIButtonProVariants,
|
|
34
|
-
Button, buttonVariants
|
|
35
|
-
} from './button';
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
Calendar
|
|
39
|
-
} from './calendar';
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
MoonUICardPro, MoonUICardHeaderPro, MoonUICardFooterPro, MoonUICardTitlePro, MoonUICardDescriptionPro, MoonUICardContentPro,
|
|
43
|
-
Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent
|
|
44
|
-
} from './card';
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
MoonUICheckboxPro,
|
|
48
|
-
Checkbox
|
|
49
|
-
} from './checkbox';
|
|
50
|
-
|
|
51
|
-
export {
|
|
52
|
-
MoonUICollapsiblePro, MoonUIcollapsibleTriggerVariantsPro, MoonUICollapsibleTriggerPro, MoonUIcollapsibleContentVariantsPro, MoonUICollapsibleContentPro,
|
|
53
|
-
Collapsible, collapsibleTriggerVariants, CollapsibleTrigger, collapsibleContentVariants, CollapsibleContent
|
|
54
|
-
} from './collapsible';
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
MoonUIColorPickerPro,
|
|
58
|
-
ColorPicker
|
|
59
|
-
} from './color-picker';
|
|
60
|
-
|
|
61
|
-
export {
|
|
62
|
-
MoonUIcommandVariantsPro, MoonUICommandPro, MoonUICommandDialogPro, MoonUICommandInputPro, MoonUICommandListPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandItemPro, MoonUICommandShortcutPro, MoonUICommandSeparatorPro,
|
|
63
|
-
commandVariants, Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator
|
|
64
|
-
} from './command';
|
|
65
|
-
|
|
66
|
-
export {
|
|
67
|
-
MoonUIDialogPro, MoonUIDialogContentPro, MoonUIDialogHeaderPro, MoonUIDialogFooterPro, MoonUIDialogTitlePro, MoonUIDialogDescriptionPro, MoonUIDialogTriggerPro, MoonUIDialogClosePro,
|
|
68
|
-
Dialog, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogTrigger, DialogClose
|
|
69
|
-
} from './dialog';
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
MoonUIDropdownMenuPro, MoonUIDropdownMenuTriggerPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuRadioGroupPro,
|
|
73
|
-
DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup
|
|
74
|
-
} from './dropdown-menu';
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
MoonUIInputPro,
|
|
78
|
-
Input
|
|
79
|
-
} from './input';
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
MoonUILabelPro,
|
|
83
|
-
Label
|
|
84
|
-
} from './label';
|
|
85
|
-
|
|
86
|
-
export {
|
|
87
|
-
MoonUIPaginationPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro,
|
|
88
|
-
Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious
|
|
89
|
-
} from './pagination';
|
|
90
|
-
|
|
91
|
-
export {
|
|
92
|
-
MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIPopoverContentPro,
|
|
93
|
-
Popover, PopoverTrigger, PopoverContent
|
|
94
|
-
} from './popover';
|
|
95
|
-
|
|
96
|
-
export {
|
|
97
|
-
MoonUIProgressPro,
|
|
98
|
-
Progress
|
|
99
|
-
} from './progress';
|
|
100
|
-
|
|
101
|
-
export {
|
|
102
|
-
MoonUIradioGroupItemVariantsPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupPro, MoonUIRadioGroupItemPro, MoonUIRadioLabelPro, MoonUIRadioItemWithLabelPro,
|
|
103
|
-
radioGroupItemVariants, RadioGroupContext, RadioGroup, RadioGroupItem, RadioLabel, RadioItemWithLabel
|
|
104
|
-
} from './radio-group';
|
|
105
|
-
|
|
106
|
-
export {
|
|
107
|
-
ScrollArea, ScrollBar
|
|
108
|
-
} from './scroll-area';
|
|
109
|
-
|
|
110
|
-
export {
|
|
111
|
-
MoonUISelectPro, MoonUISelectTriggerPro, MoonUISelectContentPro, MoonUISelectItemPro, MoonUISelectValuePro, MoonUISelectGroupPro, MoonUISelectLabelPro, MoonUISelectSeparatorPro,
|
|
112
|
-
Select, SelectTrigger, SelectContent, SelectItem, SelectValue, SelectGroup, SelectLabel, SelectSeparator
|
|
113
|
-
} from './select';
|
|
114
|
-
|
|
115
|
-
export {
|
|
116
|
-
MoonUISeparatorPro, moonUISeparatorVariantsPro,
|
|
117
|
-
Separator, separatorVariants
|
|
118
|
-
} from './separator';
|
|
119
|
-
|
|
120
|
-
export {
|
|
121
|
-
Sheet, SheetTrigger, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetClose, SheetPortal, SheetOverlay
|
|
122
|
-
} from './sheet';
|
|
123
|
-
|
|
124
|
-
export {
|
|
125
|
-
MoonUISkeletonPro,
|
|
126
|
-
Skeleton
|
|
127
|
-
} from './skeleton';
|
|
128
|
-
|
|
129
|
-
export {
|
|
130
|
-
MoonUISliderPro,
|
|
131
|
-
Slider
|
|
132
|
-
} from './slider';
|
|
133
|
-
|
|
134
|
-
export {
|
|
135
|
-
MoonUISwitchPro,
|
|
136
|
-
Switch
|
|
137
|
-
} from './switch';
|
|
138
|
-
|
|
139
|
-
export {
|
|
140
|
-
MoonUItableVariantsPro, MoonUITablePro, MoonUITableHeaderPro, MoonUITableBodyPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableRowPro, MoonUITableCellPro, MoonUITableCaptionPro,
|
|
141
|
-
tableVariants, Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption
|
|
142
|
-
} from './table';
|
|
143
|
-
|
|
144
|
-
export {
|
|
145
|
-
MoonUITabsPro, MoonUITabsListPro, MoonUITabsTriggerPro, MoonUITabsContentPro,
|
|
146
|
-
Tabs, TabsList, TabsTrigger, TabsContent
|
|
147
|
-
} from './tabs';
|
|
148
|
-
|
|
149
|
-
export {
|
|
150
|
-
MoonUITextareaPro,
|
|
151
|
-
Textarea
|
|
152
|
-
} from './textarea';
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
MoonUIToastPro,
|
|
156
|
-
Toast
|
|
157
|
-
} from './toast';
|
|
158
|
-
|
|
159
|
-
export {
|
|
160
|
-
MoonUItoggleVariantsPro, MoonUITogglePro,
|
|
161
|
-
toggleVariants, Toggle
|
|
162
|
-
} from './toggle';
|
|
163
|
-
|
|
164
|
-
export {
|
|
165
|
-
MoonUITooltipPro, MoonUITooltipTriggerPro, MoonUITooltipContentPro, MoonUITooltipProviderPro,
|
|
166
|
-
Tooltip, TooltipTrigger, TooltipContent, TooltipProvider
|
|
167
|
-
} from './tooltip';
|
|
168
|
-
|
|
169
|
-
export {
|
|
170
|
-
HoverCard, HoverCardTrigger, HoverCardContent
|
|
171
|
-
} from './hover-card';
|
|
172
|
-
|
|
173
|
-
// HoverCard3D is exported from components/hover-card-3d/index.tsx
|
|
174
|
-
|
|
175
|
-
// Note: Micro-interaction components are exported from their individual directories
|
|
176
|
-
|
|
177
|
-
// Gesture Drawer
|
|
178
|
-
export {
|
|
179
|
-
MoonUIGestureDrawerPro,
|
|
180
|
-
GestureDrawer,
|
|
181
|
-
type MoonUIGestureDrawerProProps,
|
|
182
|
-
type GestureDrawerProps,
|
|
183
|
-
moonUIGestureDrawerProVariants
|
|
184
|
-
} from './gesture-drawer';
|
|
185
|
-
|
|
186
|
-
// Lightbox
|
|
187
|
-
export * from './lightbox';
|
|
188
|
-
|
|
189
|
-
// Media Gallery
|
|
190
|
-
export * from './media-gallery';
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
import { Loader2 } from "lucide-react";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Premium Input Component
|
|
8
|
-
*
|
|
9
|
-
* Erişilebilir, estetik ve işlevsel input bileşeni.
|
|
10
|
-
* İkon desteği, hata gösterimi ve çeşitli varyantlar sunar.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const inputWrapperVariants = cva(
|
|
14
|
-
"group relative flex items-center w-full transition-colors",
|
|
15
|
-
{
|
|
16
|
-
variants: {
|
|
17
|
-
size: {
|
|
18
|
-
sm: "",
|
|
19
|
-
md: "",
|
|
20
|
-
lg: "",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
size: "md",
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const moonUIInputVariantsPro = cva(
|
|
30
|
-
[
|
|
31
|
-
"w-full bg-background transition-all duration-200",
|
|
32
|
-
"text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
|
|
33
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
34
|
-
"file:border-0 file:bg-transparent file:font-medium",
|
|
35
|
-
"focus-visible:outline-none dark:text-gray-200"
|
|
36
|
-
],
|
|
37
|
-
{
|
|
38
|
-
variants: {
|
|
39
|
-
variant: {
|
|
40
|
-
standard: "border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",
|
|
41
|
-
filled: "border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",
|
|
42
|
-
ghost: "border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
|
|
43
|
-
underline: "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300",
|
|
44
|
-
},
|
|
45
|
-
size: {
|
|
46
|
-
sm: "h-8 text-xs",
|
|
47
|
-
md: "h-10 text-sm",
|
|
48
|
-
lg: "h-12 text-base",
|
|
49
|
-
},
|
|
50
|
-
hasLeftIcon: {
|
|
51
|
-
true: "pl-10",
|
|
52
|
-
false: "",
|
|
53
|
-
},
|
|
54
|
-
hasRightIcon: {
|
|
55
|
-
true: "pr-10",
|
|
56
|
-
false: "",
|
|
57
|
-
},
|
|
58
|
-
hasRightButton: {
|
|
59
|
-
true: "pr-10",
|
|
60
|
-
false: "",
|
|
61
|
-
},
|
|
62
|
-
isError: {
|
|
63
|
-
true: "border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",
|
|
64
|
-
false: "",
|
|
65
|
-
},
|
|
66
|
-
isSuccess: {
|
|
67
|
-
true: "border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",
|
|
68
|
-
false: "",
|
|
69
|
-
},
|
|
70
|
-
isDisabled: {
|
|
71
|
-
true: "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",
|
|
72
|
-
false: "",
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
defaultVariants: {
|
|
76
|
-
variant: "standard",
|
|
77
|
-
size: "md",
|
|
78
|
-
isError: false,
|
|
79
|
-
isSuccess: false,
|
|
80
|
-
isDisabled: false,
|
|
81
|
-
hasLeftIcon: false,
|
|
82
|
-
hasRightIcon: false,
|
|
83
|
-
hasRightButton: false,
|
|
84
|
-
},
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
export interface MoonUIInputProProps
|
|
89
|
-
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">,
|
|
90
|
-
Omit<VariantProps<typeof moonUIInputVariantsPro>, "isDisabled" | "hasLeftIcon" | "hasRightIcon" | "hasRightButton"> {
|
|
91
|
-
/** Hata mesajı */
|
|
92
|
-
error?: string;
|
|
93
|
-
/** Başarı mesajı */
|
|
94
|
-
success?: string;
|
|
95
|
-
/** Yükleniyor durumu */
|
|
96
|
-
loading?: boolean;
|
|
97
|
-
/** Sol tarafta gösterilecek ikon */
|
|
98
|
-
leftIcon?: React.ReactNode;
|
|
99
|
-
/** Sağ tarafta gösterilecek ikon */
|
|
100
|
-
rightIcon?: React.ReactNode;
|
|
101
|
-
/** Sağ tarafta gösterilecek buton (password show/hide vb. için) */
|
|
102
|
-
rightButton?: React.ReactNode;
|
|
103
|
-
/** Mesajın görünürlüğü (true: her zaman görünür, false: sadece hata/başarı durumunda) */
|
|
104
|
-
alwaysShowMessage?: boolean;
|
|
105
|
-
/** Input wrapper için ek sınıflar */
|
|
106
|
-
wrapperClassName?: string;
|
|
107
|
-
/** Mesaj için ek sınıflar */
|
|
108
|
-
messageClassName?: string;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Premium Input Component
|
|
113
|
-
*
|
|
114
|
-
* @param props - Input bileşeni özellikleri
|
|
115
|
-
* @param props.variant - Görsel varyant (standard, filled, ghost, underline)
|
|
116
|
-
* @param props.size - Boyut (sm, md, lg)
|
|
117
|
-
* @param props.error - Hata mesajı
|
|
118
|
-
* @param props.success - Başarı mesajı
|
|
119
|
-
* @param props.loading - Yükleniyor durumu
|
|
120
|
-
* @param props.leftIcon - Sol tarafta gösterilecek ikon
|
|
121
|
-
* @param props.rightIcon - Sağ tarafta gösterilecek ikon
|
|
122
|
-
* @param props.rightButton - Sağ tarafta gösterilecek buton
|
|
123
|
-
* @param props.alwaysShowMessage - Mesajın her zaman görünür olması
|
|
124
|
-
*/
|
|
125
|
-
const MoonUIInputPro = React.forwardRef<HTMLInputElement, MoonUIInputProProps>(
|
|
126
|
-
({
|
|
127
|
-
className,
|
|
128
|
-
wrapperClassName,
|
|
129
|
-
messageClassName,
|
|
130
|
-
variant,
|
|
131
|
-
size,
|
|
132
|
-
isError,
|
|
133
|
-
disabled,
|
|
134
|
-
error,
|
|
135
|
-
success,
|
|
136
|
-
loading,
|
|
137
|
-
leftIcon,
|
|
138
|
-
rightIcon,
|
|
139
|
-
rightButton,
|
|
140
|
-
alwaysShowMessage = false,
|
|
141
|
-
...props
|
|
142
|
-
}, ref) => {
|
|
143
|
-
// Mesajı göster/gizle
|
|
144
|
-
const showMessage = alwaysShowMessage || error || success;
|
|
145
|
-
const messageType = error ? "error" : success ? "success" : "normal";
|
|
146
|
-
|
|
147
|
-
return (
|
|
148
|
-
<div className="space-y-1.5 w-full">
|
|
149
|
-
<div className={cn(inputWrapperVariants({ size }), wrapperClassName)}>
|
|
150
|
-
{leftIcon && (
|
|
151
|
-
<div className="absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none">
|
|
152
|
-
{loading ? <Loader2 className="h-4 w-4 animate-spin" /> : leftIcon}
|
|
153
|
-
</div>
|
|
154
|
-
)}
|
|
155
|
-
|
|
156
|
-
<input
|
|
157
|
-
className={cn(
|
|
158
|
-
moonUIInputVariantsPro({
|
|
159
|
-
variant,
|
|
160
|
-
size,
|
|
161
|
-
isError: !!error || isError,
|
|
162
|
-
isSuccess: !!success,
|
|
163
|
-
isDisabled: disabled || loading,
|
|
164
|
-
hasLeftIcon: !!leftIcon || loading,
|
|
165
|
-
hasRightIcon: !!rightIcon,
|
|
166
|
-
hasRightButton: !!rightButton,
|
|
167
|
-
}),
|
|
168
|
-
className
|
|
169
|
-
)}
|
|
170
|
-
ref={ref}
|
|
171
|
-
disabled={disabled || loading}
|
|
172
|
-
data-loading={loading ? "" : undefined}
|
|
173
|
-
data-error={!!error ? "" : undefined}
|
|
174
|
-
data-success={!!success ? "" : undefined}
|
|
175
|
-
aria-invalid={!!error || !!isError || undefined}
|
|
176
|
-
aria-describedby={error ? `${props.id || ''}-error` : success ? `${props.id || ''}-success` : undefined}
|
|
177
|
-
{...props}
|
|
178
|
-
/>
|
|
179
|
-
|
|
180
|
-
{rightIcon && !loading && (
|
|
181
|
-
<div className="absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none">
|
|
182
|
-
{rightIcon}
|
|
183
|
-
</div>
|
|
184
|
-
)}
|
|
185
|
-
|
|
186
|
-
{rightButton && (
|
|
187
|
-
<div className="absolute right-3">
|
|
188
|
-
{rightButton}
|
|
189
|
-
</div>
|
|
190
|
-
)}
|
|
191
|
-
|
|
192
|
-
{loading && !leftIcon && (
|
|
193
|
-
<div className="absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none">
|
|
194
|
-
<Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
|
|
195
|
-
</div>
|
|
196
|
-
)}
|
|
197
|
-
</div>
|
|
198
|
-
|
|
199
|
-
{showMessage && (
|
|
200
|
-
<p
|
|
201
|
-
className={cn(
|
|
202
|
-
"text-xs transition-all",
|
|
203
|
-
messageType === "error" && "text-error",
|
|
204
|
-
messageType === "success" && "text-success",
|
|
205
|
-
messageType === "normal" && "text-muted-foreground",
|
|
206
|
-
messageClassName
|
|
207
|
-
)}
|
|
208
|
-
id={error ? `${props.id || ''}-error` : success ? `${props.id || ''}-success` : undefined}
|
|
209
|
-
>
|
|
210
|
-
{error || success || ""}
|
|
211
|
-
</p>
|
|
212
|
-
)}
|
|
213
|
-
</div>
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
MoonUIInputPro.displayName = "MoonUIInputPro";
|
|
218
|
-
|
|
219
|
-
export { MoonUIInputPro };
|
|
220
|
-
|
|
221
|
-
// Backward compatibility exports
|
|
222
|
-
export { MoonUIInputPro as Input };
|