@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.
Files changed (162) hide show
  1. package/dist/index.d.ts +691 -261
  2. package/dist/index.mjs +7418 -4934
  3. package/package.json +11 -5
  4. package/plugin/index.d.ts +86 -0
  5. package/plugin/index.js +308 -0
  6. package/scripts/postbuild.js +27 -0
  7. package/scripts/postinstall.js +176 -23
  8. package/src/__tests__/use-intersection-observer.test.tsx +0 -216
  9. package/src/__tests__/use-local-storage.test.tsx +0 -174
  10. package/src/__tests__/use-pro-access.test.tsx +0 -183
  11. package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
  12. package/src/components/advanced-chart/index.tsx +0 -1242
  13. package/src/components/advanced-forms/index.tsx +0 -426
  14. package/src/components/animated-button/index.tsx +0 -385
  15. package/src/components/calendar/event-dialog.tsx +0 -372
  16. package/src/components/calendar/index.tsx +0 -1073
  17. package/src/components/calendar-pro/index.tsx +0 -1697
  18. package/src/components/color-picker/index.tsx +0 -432
  19. package/src/components/credit-card-input/index.tsx +0 -406
  20. package/src/components/dashboard/dashboard-grid.tsx +0 -462
  21. package/src/components/dashboard/demo.tsx +0 -425
  22. package/src/components/dashboard/index.tsx +0 -1046
  23. package/src/components/dashboard/time-range-picker.tsx +0 -336
  24. package/src/components/dashboard/types.ts +0 -222
  25. package/src/components/dashboard/widgets/activity-feed.tsx +0 -344
  26. package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
  27. package/src/components/dashboard/widgets/metric-card.tsx +0 -343
  28. package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
  29. package/src/components/data-table/data-table-column-toggle.tsx +0 -169
  30. package/src/components/data-table/data-table-export.ts +0 -156
  31. package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
  32. package/src/components/data-table/data-table.test.tsx +0 -187
  33. package/src/components/data-table/index.tsx +0 -845
  34. package/src/components/draggable-list/index.tsx +0 -100
  35. package/src/components/enhanced/badge.tsx +0 -191
  36. package/src/components/enhanced/button.tsx +0 -362
  37. package/src/components/enhanced/card.tsx +0 -266
  38. package/src/components/enhanced/dialog.tsx +0 -246
  39. package/src/components/enhanced/index.ts +0 -4
  40. package/src/components/error-boundary/index.tsx +0 -109
  41. package/src/components/file-upload/file-upload.test.tsx +0 -243
  42. package/src/components/file-upload/index.tsx +0 -1660
  43. package/src/components/floating-action-button/index.tsx +0 -206
  44. package/src/components/form-wizard/form-wizard-context.tsx +0 -307
  45. package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
  46. package/src/components/form-wizard/form-wizard-progress.tsx +0 -298
  47. package/src/components/form-wizard/form-wizard-step.tsx +0 -111
  48. package/src/components/form-wizard/index.tsx +0 -102
  49. package/src/components/form-wizard/types.ts +0 -76
  50. package/src/components/gesture-drawer/index.tsx +0 -551
  51. package/src/components/github-stars/github-api.ts +0 -426
  52. package/src/components/github-stars/hooks.ts +0 -516
  53. package/src/components/github-stars/index.tsx +0 -375
  54. package/src/components/github-stars/types.ts +0 -148
  55. package/src/components/github-stars/variants.tsx +0 -513
  56. package/src/components/health-check/index.tsx +0 -439
  57. package/src/components/hover-card-3d/index.tsx +0 -530
  58. package/src/components/index.ts +0 -128
  59. package/src/components/internal/index.ts +0 -78
  60. package/src/components/kanban/add-card-modal.tsx +0 -502
  61. package/src/components/kanban/card-detail-modal.tsx +0 -761
  62. package/src/components/kanban/index.ts +0 -13
  63. package/src/components/kanban/kanban.tsx +0 -1684
  64. package/src/components/kanban/types.ts +0 -168
  65. package/src/components/lazy-component/index.tsx +0 -823
  66. package/src/components/license-error/index.tsx +0 -29
  67. package/src/components/magnetic-button/index.tsx +0 -167
  68. package/src/components/memory-efficient-data/index.tsx +0 -1016
  69. package/src/components/moonui-quiz-form/index.tsx +0 -817
  70. package/src/components/optimized-image/index.tsx +0 -425
  71. package/src/components/performance-debugger/index.tsx +0 -589
  72. package/src/components/performance-monitor/index.tsx +0 -794
  73. package/src/components/phone-number-input/index.tsx +0 -338
  74. package/src/components/pinch-zoom/index.tsx +0 -566
  75. package/src/components/quiz-form/index.tsx +0 -479
  76. package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
  77. package/src/components/rich-text-editor/index.tsx +0 -2324
  78. package/src/components/rich-text-editor/slash-commands-extension.ts +0 -220
  79. package/src/components/rich-text-editor/slash-commands.css +0 -35
  80. package/src/components/rich-text-editor/table-styles.css +0 -65
  81. package/src/components/sidebar/index.tsx +0 -865
  82. package/src/components/spotlight-card/index.tsx +0 -191
  83. package/src/components/swipeable-card/index.tsx +0 -100
  84. package/src/components/timeline/index.tsx +0 -1148
  85. package/src/components/ui/accordion.tsx +0 -73
  86. package/src/components/ui/alert-dialog.tsx +0 -141
  87. package/src/components/ui/alert.tsx +0 -141
  88. package/src/components/ui/aspect-ratio.tsx +0 -245
  89. package/src/components/ui/avatar.tsx +0 -153
  90. package/src/components/ui/badge.tsx +0 -228
  91. package/src/components/ui/breadcrumb.tsx +0 -214
  92. package/src/components/ui/button.tsx +0 -222
  93. package/src/components/ui/calendar.tsx +0 -387
  94. package/src/components/ui/card.tsx +0 -214
  95. package/src/components/ui/checkbox.tsx +0 -259
  96. package/src/components/ui/collapsible.tsx +0 -135
  97. package/src/components/ui/color-picker.tsx +0 -97
  98. package/src/components/ui/command.tsx +0 -225
  99. package/src/components/ui/dialog.tsx +0 -334
  100. package/src/components/ui/dropdown-menu.tsx +0 -218
  101. package/src/components/ui/gesture-drawer.tsx +0 -11
  102. package/src/components/ui/hover-card.tsx +0 -29
  103. package/src/components/ui/index.ts +0 -190
  104. package/src/components/ui/input.tsx +0 -222
  105. package/src/components/ui/label.tsx +0 -29
  106. package/src/components/ui/lightbox.tsx +0 -606
  107. package/src/components/ui/magnetic-button.tsx +0 -129
  108. package/src/components/ui/media-gallery.tsx +0 -612
  109. package/src/components/ui/pagination.tsx +0 -123
  110. package/src/components/ui/popover.tsx +0 -185
  111. package/src/components/ui/progress.tsx +0 -30
  112. package/src/components/ui/radio-group.tsx +0 -257
  113. package/src/components/ui/scroll-area.tsx +0 -47
  114. package/src/components/ui/select.tsx +0 -374
  115. package/src/components/ui/separator.tsx +0 -145
  116. package/src/components/ui/sheet.tsx +0 -139
  117. package/src/components/ui/skeleton.tsx +0 -20
  118. package/src/components/ui/slider.tsx +0 -354
  119. package/src/components/ui/spotlight-card.tsx +0 -119
  120. package/src/components/ui/switch.tsx +0 -86
  121. package/src/components/ui/table.tsx +0 -329
  122. package/src/components/ui/tabs.tsx +0 -198
  123. package/src/components/ui/textarea.tsx +0 -28
  124. package/src/components/ui/toast.tsx +0 -317
  125. package/src/components/ui/toggle.tsx +0 -119
  126. package/src/components/ui/tooltip.tsx +0 -151
  127. package/src/components/virtual-list/index.tsx +0 -668
  128. package/src/hooks/use-chart.ts +0 -205
  129. package/src/hooks/use-data-table.ts +0 -182
  130. package/src/hooks/use-docs-pro-access.ts +0 -13
  131. package/src/hooks/use-license-check.ts +0 -65
  132. package/src/hooks/use-subscription.ts +0 -19
  133. package/src/hooks/use-toast.ts +0 -15
  134. package/src/index.ts +0 -14
  135. package/src/lib/ai-providers.ts +0 -377
  136. package/src/lib/component-metadata.ts +0 -18
  137. package/src/lib/micro-interactions.ts +0 -255
  138. package/src/lib/paddle.ts +0 -17
  139. package/src/lib/utils.ts +0 -6
  140. package/src/patterns/login-form/index.tsx +0 -276
  141. package/src/patterns/login-form/types.ts +0 -67
  142. package/src/setupTests.ts +0 -41
  143. package/src/styles/advanced-chart.css +0 -239
  144. package/src/styles/calendar.css +0 -35
  145. package/src/styles/design-system.css +0 -363
  146. package/src/styles/index.css +0 -85
  147. package/src/styles/tailwind.css +0 -7
  148. package/src/styles/tokens.css +0 -455
  149. package/src/types/moonui.d.ts +0 -22
  150. package/src/types/next-auth.d.ts +0 -21
  151. package/src/use-intersection-observer.tsx +0 -154
  152. package/src/use-local-storage.tsx +0 -71
  153. package/src/use-paddle.ts +0 -138
  154. package/src/use-performance-optimizer.ts +0 -389
  155. package/src/use-pro-access.ts +0 -141
  156. package/src/use-scroll-animation.ts +0 -219
  157. package/src/use-subscription.ts +0 -37
  158. package/src/use-toast.ts +0 -32
  159. package/src/utils/chart-helpers.ts +0 -357
  160. package/src/utils/cn.ts +0 -6
  161. package/src/utils/data-processing.ts +0 -151
  162. package/src/utils/license-validator.tsx +0 -183
@@ -1,374 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as SelectPrimitive from "@radix-ui/react-select"
5
- import { Check, ChevronDown, ChevronUp, Loader2, Search, X } from "lucide-react"
6
-
7
- import { cn } from "../../lib/utils"
8
-
9
- /**
10
- * Premium Select Component
11
- *
12
- * Advanced dropdown/select component with variants, sizes and accessibility features.
13
- * Compatible with dark and light mode, providing a modern user experience with smooth animations.
14
- */
15
-
16
- // Directly re-exporting the Root component
17
- const MoonUISelectPro = SelectPrimitive.Root
18
- MoonUISelectPro.displayName = "MoonUISelectPro"
19
-
20
- const MoonUISelectGroupPro = SelectPrimitive.Group
21
-
22
- const MoonUISelectValuePro = SelectPrimitive.Value
23
-
24
- type SelectTriggerVariant = "standard" | "outline" | "ghost" | "underline";
25
- type SelectTriggerSize = "sm" | "md" | "lg";
26
-
27
- interface MoonUISelectTriggerProProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
28
- /** Visual variant */
29
- variant?: SelectTriggerVariant;
30
- /** Size */
31
- size?: SelectTriggerSize;
32
- /** Error state */
33
- error?: boolean | string;
34
- /** Success state */
35
- success?: boolean;
36
- /** Loading state */
37
- loading?: boolean;
38
- /** Icon displayed on the left */
39
- leftIcon?: React.ReactNode;
40
- /** Icon displayed on the right (instead of default chevron) */
41
- rightIcon?: React.ReactNode;
42
- /** Enable clear button */
43
- clearable?: boolean;
44
- /** On clear callback */
45
- onClear?: () => void;
46
- /** Custom placeholder when value is selected */
47
- selectedPlaceholder?: string;
48
- }
49
-
50
- const MoonUISelectTriggerPro = React.forwardRef<
51
- React.ElementRef<typeof SelectPrimitive.Trigger>,
52
- MoonUISelectTriggerProProps
53
- >(({ className, children, variant = "standard", size = "md", error, success, loading, leftIcon, rightIcon, ...props }, ref) => (
54
- <SelectPrimitive.Trigger
55
- ref={ref}
56
- className={cn(
57
- /* Base styles */
58
- "flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200",
59
- "disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
60
- "focus-visible:outline-none",
61
- /* Error state */
62
- error && "border-error focus-visible:ring-error/30 focus-visible:border-error",
63
- /* Success state */
64
- success && "border-success focus-visible:ring-success/30 focus-visible:border-success",
65
- /* Size variants */
66
- size === "sm" && "h-8 text-xs px-2",
67
- size === "md" && "h-10 text-sm px-3",
68
- size === "lg" && "h-12 text-base px-4",
69
- /* Visual variants */
70
- variant === "standard" && "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",
71
- variant === "outline" && "border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",
72
- variant === "ghost" && "border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",
73
- variant === "underline" && "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 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",
74
- className
75
- )}
76
- {...props}
77
- disabled={props.disabled || loading}
78
- data-error={error ? true : undefined}
79
- data-success={success ? true : undefined}
80
- data-loading={loading ? true : undefined}
81
- >
82
- <div className="flex items-center flex-1 gap-2">
83
- {leftIcon && (
84
- <span className="flex items-center justify-center text-gray-500 dark:text-gray-400">
85
- {leftIcon}
86
- </span>
87
- )}
88
- {loading ? (
89
- <div className="flex items-center gap-2">
90
- <Loader2 className="h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400" />
91
- <span className="text-muted-foreground dark:text-gray-400">Loading...</span>
92
- </div>
93
- ) : children}
94
- </div>
95
- {!loading && (
96
- <SelectPrimitive.Icon asChild>
97
- {rightIcon ? (
98
- <span className="opacity-60">{rightIcon}</span>
99
- ) : (
100
- <ChevronDown className="h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" />
101
- )}
102
- </SelectPrimitive.Icon>
103
- )}
104
- </SelectPrimitive.Trigger>
105
- ))
106
- MoonUISelectTriggerPro.displayName = SelectPrimitive.Trigger.displayName
107
-
108
- /**
109
- * Scroll Up Button Component
110
- */
111
- const MoonUISelectScrollUpButtonPro = React.forwardRef<
112
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
113
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
114
- >(({ className, ...props }, ref) => (
115
- <SelectPrimitive.ScrollUpButton
116
- ref={ref}
117
- className={cn(
118
- "flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",
119
- className
120
- )}
121
- {...props}
122
- >
123
- <ChevronUp className="h-4 w-4" />
124
- </SelectPrimitive.ScrollUpButton>
125
- ))
126
- MoonUISelectScrollUpButtonPro.displayName = SelectPrimitive.ScrollUpButton.displayName
127
-
128
- /**
129
- * Scroll Down Button Component
130
- */
131
- const MoonUISelectScrollDownButtonPro = React.forwardRef<
132
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
133
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
134
- >(({ className, ...props }, ref) => (
135
- <SelectPrimitive.ScrollDownButton
136
- ref={ref}
137
- className={cn(
138
- "flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",
139
- className
140
- )}
141
- {...props}
142
- >
143
- <ChevronDown className="h-4 w-4" />
144
- </SelectPrimitive.ScrollDownButton>
145
- ))
146
- MoonUISelectScrollDownButtonPro.displayName =
147
- SelectPrimitive.ScrollDownButton.displayName
148
-
149
- interface MoonUISelectContentProProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> {
150
- /** Enable search functionality */
151
- enableSearch?: boolean;
152
- /** Search placeholder */
153
- searchPlaceholder?: string;
154
- /** No results text */
155
- noResultsText?: string;
156
- /** Loading search results */
157
- searchLoading?: boolean;
158
- /** Custom search icon */
159
- searchIcon?: React.ReactNode;
160
- }
161
-
162
- const MoonUISelectContentPro = React.forwardRef<
163
- React.ElementRef<typeof SelectPrimitive.Content>,
164
- MoonUISelectContentProProps
165
- >(({ className, children, position = "popper", enableSearch, searchPlaceholder = "Search...", noResultsText = "No results found", searchLoading, searchIcon, ...props }, ref) => {
166
- const [searchValue, setSearchValue] = React.useState("");
167
-
168
- // Filter children based on search
169
- const filteredChildren = React.useMemo(() => {
170
- if (!enableSearch || !searchValue) return children;
171
-
172
- const searchLower = searchValue.toLowerCase();
173
- return React.Children.toArray(children).filter((child) => {
174
- if (!React.isValidElement(child)) return true;
175
-
176
- // Keep groups and labels
177
- if (child.type === MoonUISelectGroupPro || child.type === MoonUISelectLabelPro || child.type === MoonUISelectSeparatorPro) {
178
- return true;
179
- }
180
-
181
- // Filter items
182
- if (child.type === MoonUISelectItemPro) {
183
- const reactChild = child as React.ReactElement<any>;
184
- const text = reactChild.props.children?.toString().toLowerCase() || "";
185
- return text.includes(searchLower);
186
- }
187
-
188
- return true;
189
- });
190
- }, [children, searchValue, enableSearch]);
191
-
192
- return (
193
- <SelectPrimitive.Portal>
194
- <SelectPrimitive.Content
195
- ref={ref}
196
- className={cn(
197
- ["relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
198
- "rounded-md border border-gray-200 dark:border-gray-700",
199
- "bg-white dark:bg-gray-900 text-foreground",
200
- "shadow-lg dark:shadow-gray-900/20",
201
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
202
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
203
- "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
204
- "data-[state=open]:duration-150"],
205
- position === "popper" &&
206
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
207
- className
208
- )}
209
- position={position}
210
- sideOffset={5}
211
- {...props}
212
- >
213
- {enableSearch && (
214
- <div className="p-2 border-b border-gray-200 dark:border-gray-700">
215
- <div className="flex items-center gap-2 px-2 py-1.5 rounded-md bg-gray-100 dark:bg-gray-800">
216
- {searchIcon || <Search className="h-4 w-4 text-gray-500 dark:text-gray-400" />}
217
- <input
218
- type="text"
219
- placeholder={searchPlaceholder}
220
- value={searchValue}
221
- onChange={(e) => setSearchValue(e.target.value)}
222
- className="flex-1 bg-transparent outline-none text-sm placeholder:text-gray-500 dark:placeholder:text-gray-400"
223
- onClick={(e) => e.stopPropagation()}
224
- onKeyDown={(e) => e.stopPropagation()}
225
- />
226
- {searchValue && (
227
- <button
228
- onClick={(e) => {
229
- e.stopPropagation();
230
- setSearchValue("");
231
- }}
232
- className="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
233
- >
234
- <X className="h-3 w-3" />
235
- </button>
236
- )}
237
- </div>
238
- </div>
239
- )}
240
- <MoonUISelectScrollUpButtonPro />
241
- <SelectPrimitive.Viewport
242
- className={cn(
243
- "p-1",
244
- position === "popper" &&
245
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
246
- )}
247
- >
248
- {searchLoading ? (
249
- <div className="flex items-center justify-center py-8">
250
- <Loader2 className="h-5 w-5 animate-spin text-gray-400" />
251
- </div>
252
- ) : filteredChildren && React.Children.count(filteredChildren) > 0 ? (
253
- filteredChildren
254
- ) : enableSearch ? (
255
- <div className="py-6 text-center text-sm text-gray-500 dark:text-gray-400">
256
- {noResultsText}
257
- </div>
258
- ) : (
259
- children
260
- )}
261
- </SelectPrimitive.Viewport>
262
- <MoonUISelectScrollDownButtonPro />
263
- </SelectPrimitive.Content>
264
- </SelectPrimitive.Portal>
265
- );
266
- })
267
- MoonUISelectContentPro.displayName = SelectPrimitive.Content.displayName
268
-
269
- const MoonUISelectLabelPro = React.forwardRef<
270
- React.ElementRef<typeof SelectPrimitive.Label>,
271
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
272
- >(({ className, ...props }, ref) => (
273
- <SelectPrimitive.Label
274
- ref={ref}
275
- className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
276
- {...props}
277
- />
278
- ))
279
- MoonUISelectLabelPro.displayName = SelectPrimitive.Label.displayName
280
-
281
- type SelectItemVariant = "default" | "subtle" | "destructive" | "success" | "warning";
282
- type SelectItemSize = "sm" | "md" | "lg";
283
-
284
- interface MoonUISelectItemProProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {
285
- /** Visual variant */
286
- variant?: SelectItemVariant;
287
- /** Size */
288
- size?: SelectItemSize;
289
- /** Icon displayed on the right */
290
- rightIcon?: React.ReactNode;
291
- /** Custom indicator icon (instead of default check) */
292
- customIndicator?: React.ReactNode;
293
- /** Enable hover scale animation */
294
- enableHoverScale?: boolean;
295
- /** Description text shown below the main text */
296
- description?: string;
297
- }
298
-
299
- const MoonUISelectItemPro = React.forwardRef<
300
- React.ElementRef<typeof SelectPrimitive.Item>,
301
- MoonUISelectItemProProps
302
- >(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, enableHoverScale, description, ...props }, ref) => (
303
- <SelectPrimitive.Item
304
- ref={ref}
305
- className={cn(
306
- "relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 transition-all duration-150",
307
-
308
- /* Size variants */
309
- size === "sm" && "py-1 pl-7 pr-2 text-xs",
310
- size === "md" && "py-1.5 pl-8 pr-2 text-sm",
311
- size === "lg" && "py-2 pl-9 pr-3 text-base",
312
-
313
- /* Color variants */
314
- variant === "default" && "focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",
315
- variant === "subtle" && "focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",
316
- variant === "destructive" && "text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",
317
- variant === "success" && "text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",
318
- variant === "warning" && "text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",
319
-
320
- /* Hover scale animation */
321
- enableHoverScale && "hover:scale-[1.02] hover:pl-9",
322
-
323
- className
324
- )}
325
- {...props}
326
- >
327
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
328
- <SelectPrimitive.ItemIndicator>
329
- {customIndicator || <Check className="h-4 w-4" />}
330
- </SelectPrimitive.ItemIndicator>
331
- </span>
332
-
333
- <div className="flex-1">
334
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
335
- {description && (
336
- <p className="text-xs text-gray-500 dark:text-gray-400 mt-0.5">{description}</p>
337
- )}
338
- </div>
339
-
340
- {rightIcon && (
341
- <span className="ml-auto pl-2 opacity-70">
342
- {rightIcon}
343
- </span>
344
- )}
345
- </SelectPrimitive.Item>
346
- ))
347
- MoonUISelectItemPro.displayName = SelectPrimitive.Item.displayName
348
-
349
- const MoonUISelectSeparatorPro = React.forwardRef<
350
- React.ElementRef<typeof SelectPrimitive.Separator>,
351
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
352
- >(({ className, ...props }, ref) => (
353
- <SelectPrimitive.Separator
354
- ref={ref}
355
- className={cn("-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className)}
356
- {...props}
357
- />
358
- ))
359
- MoonUISelectSeparatorPro.displayName = SelectPrimitive.Separator.displayName
360
-
361
- export { MoonUISelectPro,
362
- MoonUISelectGroupPro,
363
- MoonUISelectValuePro,
364
- MoonUISelectTriggerPro,
365
- MoonUISelectContentPro,
366
- MoonUISelectLabelPro,
367
- MoonUISelectItemPro,
368
- MoonUISelectSeparatorPro,
369
- MoonUISelectScrollUpButtonPro as SelectScrollUpButton,
370
- MoonUISelectScrollDownButtonPro as SelectScrollDownButton,
371
- };
372
-
373
- // Backward compatibility exports
374
- export { MoonUISelectPro as Select, MoonUISelectTriggerPro as SelectTrigger, MoonUISelectContentPro as SelectContent, MoonUISelectItemPro as SelectItem, MoonUISelectValuePro as SelectValue, MoonUISelectGroupPro as SelectGroup, MoonUISelectLabelPro as SelectLabel, MoonUISelectSeparatorPro as SelectSeparator }
@@ -1,145 +0,0 @@
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 moonUISeparatorVariantsPro = 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 MoonUISeparatorProProps
108
- extends Omit<React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>, 'orientation'>,
109
- VariantProps<typeof moonUISeparatorVariantsPro> {
110
- orientation?: "horizontal" | "vertical";
111
- }
112
-
113
- const MoonUISeparatorPro = React.forwardRef<
114
- React.ElementRef<typeof SeparatorPrimitive.Root>,
115
- MoonUISeparatorProProps
116
- >(
117
- (
118
- {
119
- className,
120
- orientation = "horizontal",
121
- variant = "default",
122
- size = "md",
123
- decorative = true,
124
- ...props
125
- },
126
- ref
127
- ) => (
128
- <SeparatorPrimitive.Root
129
- ref={ref}
130
- decorative={decorative}
131
- orientation={orientation}
132
- className={cn(
133
- moonUISeparatorVariantsPro({ orientation, variant, size }),
134
- className
135
- )}
136
- {...props}
137
- />
138
- )
139
- )
140
- MoonUISeparatorPro.displayName = SeparatorPrimitive.Root.displayName
141
-
142
- export { MoonUISeparatorPro, moonUISeparatorVariantsPro };
143
-
144
- // Backward compatibility exports
145
- export { MoonUISeparatorPro as Separator, moonUISeparatorVariantsPro as separatorVariants }
@@ -1,139 +0,0 @@
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
- }
@@ -1,20 +0,0 @@
1
- "use client"
2
-
3
- import { cn } from "../../lib/utils"
4
-
5
- interface MoonUISkeletonProProps extends React.HTMLAttributes<HTMLDivElement> {}
6
-
7
- export function MoonUISkeletonPro({
8
- className,
9
- ...props
10
- }: MoonUISkeletonProProps) {
11
- return (
12
- <div
13
- className={cn("animate-pulse rounded-md bg-muted", className)}
14
- {...props}
15
- />
16
- )
17
- }
18
-
19
- // Backward compatibility export
20
- export { MoonUISkeletonPro as Skeleton }