@moontra/moonui-pro 2.20.2 → 2.20.4

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 (153) hide show
  1. package/package.json +8 -3
  2. package/plugin/index.d.ts +86 -0
  3. package/plugin/index.js +308 -0
  4. package/scripts/postinstall.js +191 -23
  5. package/src/components/advanced-chart/index.tsx +0 -1246
  6. package/src/components/advanced-forms/index.tsx +0 -585
  7. package/src/components/animated-button/index.tsx +0 -385
  8. package/src/components/calendar/event-dialog.tsx +0 -377
  9. package/src/components/calendar/index.tsx +0 -1220
  10. package/src/components/calendar-pro/index.tsx +0 -1697
  11. package/src/components/color-picker/index.tsx +0 -432
  12. package/src/components/credit-card-input/index.tsx +0 -406
  13. package/src/components/dashboard/dashboard-grid.tsx +0 -480
  14. package/src/components/dashboard/demo.tsx +0 -425
  15. package/src/components/dashboard/index.tsx +0 -1046
  16. package/src/components/dashboard/time-range-picker.tsx +0 -336
  17. package/src/components/dashboard/types.ts +0 -225
  18. package/src/components/dashboard/widgets/activity-feed.tsx +0 -349
  19. package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
  20. package/src/components/dashboard/widgets/comparison-widget.tsx +0 -177
  21. package/src/components/dashboard/widgets/index.ts +0 -5
  22. package/src/components/dashboard/widgets/metric-card.tsx +0 -363
  23. package/src/components/dashboard/widgets/progress-widget.tsx +0 -113
  24. package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
  25. package/src/components/data-table/data-table-column-toggle.tsx +0 -169
  26. package/src/components/data-table/data-table-export.ts +0 -156
  27. package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
  28. package/src/components/data-table/index.tsx +0 -845
  29. package/src/components/draggable-list/index.tsx +0 -100
  30. package/src/components/error-boundary/index.tsx +0 -232
  31. package/src/components/file-upload/index.tsx +0 -1660
  32. package/src/components/floating-action-button/index.tsx +0 -206
  33. package/src/components/form-wizard/form-wizard-context.tsx +0 -335
  34. package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
  35. package/src/components/form-wizard/form-wizard-progress.tsx +0 -329
  36. package/src/components/form-wizard/form-wizard-step.tsx +0 -111
  37. package/src/components/form-wizard/index.tsx +0 -102
  38. package/src/components/form-wizard/types.ts +0 -77
  39. package/src/components/gesture-drawer/index.tsx +0 -551
  40. package/src/components/github-stars/github-api.ts +0 -426
  41. package/src/components/github-stars/hooks.ts +0 -517
  42. package/src/components/github-stars/index.tsx +0 -375
  43. package/src/components/github-stars/types.ts +0 -148
  44. package/src/components/github-stars/variants.tsx +0 -515
  45. package/src/components/health-check/index.tsx +0 -439
  46. package/src/components/hover-card-3d/index.tsx +0 -529
  47. package/src/components/index.ts +0 -130
  48. package/src/components/internal/index.ts +0 -78
  49. package/src/components/kanban/add-card-modal.tsx +0 -502
  50. package/src/components/kanban/card-detail-modal.tsx +0 -761
  51. package/src/components/kanban/index.ts +0 -13
  52. package/src/components/kanban/kanban.tsx +0 -1689
  53. package/src/components/kanban/types.ts +0 -168
  54. package/src/components/lazy-component/index.tsx +0 -823
  55. package/src/components/license-error/index.tsx +0 -31
  56. package/src/components/magnetic-button/index.tsx +0 -216
  57. package/src/components/memory-efficient-data/index.tsx +0 -1018
  58. package/src/components/moonui-quiz-form/index.tsx +0 -817
  59. package/src/components/navbar/index.tsx +0 -781
  60. package/src/components/optimized-image/index.tsx +0 -425
  61. package/src/components/performance-debugger/index.tsx +0 -613
  62. package/src/components/performance-monitor/index.tsx +0 -808
  63. package/src/components/phone-number-input/index.tsx +0 -343
  64. package/src/components/phone-number-input/phone-number-input-simple.tsx +0 -167
  65. package/src/components/pinch-zoom/index.tsx +0 -566
  66. package/src/components/quiz-form/index.tsx +0 -479
  67. package/src/components/rich-text-editor/index.tsx +0 -2322
  68. package/src/components/rich-text-editor/slash-commands-extension.ts +0 -230
  69. package/src/components/rich-text-editor/slash-commands.css +0 -35
  70. package/src/components/rich-text-editor/table-styles.css +0 -65
  71. package/src/components/sidebar/index.tsx +0 -884
  72. package/src/components/spotlight-card/index.tsx +0 -191
  73. package/src/components/swipeable-card/index.tsx +0 -100
  74. package/src/components/timeline/index.tsx +0 -1183
  75. package/src/components/ui/accordion.tsx +0 -581
  76. package/src/components/ui/alert-dialog.tsx +0 -141
  77. package/src/components/ui/alert.tsx +0 -141
  78. package/src/components/ui/aspect-ratio.tsx +0 -245
  79. package/src/components/ui/avatar.tsx +0 -155
  80. package/src/components/ui/badge.tsx +0 -230
  81. package/src/components/ui/breadcrumb.tsx +0 -216
  82. package/src/components/ui/button.tsx +0 -228
  83. package/src/components/ui/calendar.tsx +0 -387
  84. package/src/components/ui/card.tsx +0 -216
  85. package/src/components/ui/checkbox.tsx +0 -259
  86. package/src/components/ui/collapsible.tsx +0 -631
  87. package/src/components/ui/color-picker.tsx +0 -97
  88. package/src/components/ui/command.tsx +0 -948
  89. package/src/components/ui/dialog.tsx +0 -752
  90. package/src/components/ui/dropdown-menu.tsx +0 -706
  91. package/src/components/ui/gesture-drawer.tsx +0 -11
  92. package/src/components/ui/hover-card.tsx +0 -29
  93. package/src/components/ui/index.ts +0 -222
  94. package/src/components/ui/input.tsx +0 -224
  95. package/src/components/ui/label.tsx +0 -29
  96. package/src/components/ui/lightbox.tsx +0 -606
  97. package/src/components/ui/magnetic-button.tsx +0 -129
  98. package/src/components/ui/media-gallery.tsx +0 -611
  99. package/src/components/ui/navigation-menu.tsx +0 -130
  100. package/src/components/ui/pagination.tsx +0 -125
  101. package/src/components/ui/popover.tsx +0 -185
  102. package/src/components/ui/progress.tsx +0 -30
  103. package/src/components/ui/radio-group.tsx +0 -257
  104. package/src/components/ui/scroll-area.tsx +0 -47
  105. package/src/components/ui/select.tsx +0 -378
  106. package/src/components/ui/separator.tsx +0 -145
  107. package/src/components/ui/sheet.tsx +0 -139
  108. package/src/components/ui/skeleton.tsx +0 -20
  109. package/src/components/ui/slider.tsx +0 -354
  110. package/src/components/ui/spotlight-card.tsx +0 -119
  111. package/src/components/ui/switch.tsx +0 -86
  112. package/src/components/ui/table.tsx +0 -331
  113. package/src/components/ui/tabs-pro.tsx +0 -542
  114. package/src/components/ui/tabs.tsx +0 -54
  115. package/src/components/ui/textarea.tsx +0 -28
  116. package/src/components/ui/toast.tsx +0 -317
  117. package/src/components/ui/toggle.tsx +0 -119
  118. package/src/components/ui/tooltip.tsx +0 -151
  119. package/src/components/virtual-list/index.tsx +0 -668
  120. package/src/hooks/use-chart.ts +0 -205
  121. package/src/hooks/use-data-table.ts +0 -182
  122. package/src/hooks/use-docs-pro-access.ts +0 -13
  123. package/src/hooks/use-license-check.ts +0 -65
  124. package/src/hooks/use-subscription.ts +0 -19
  125. package/src/hooks/use-toast.ts +0 -15
  126. package/src/index.ts +0 -22
  127. package/src/lib/ai-providers.ts +0 -377
  128. package/src/lib/component-metadata.ts +0 -18
  129. package/src/lib/micro-interactions.ts +0 -255
  130. package/src/lib/paddle.ts +0 -17
  131. package/src/lib/utils.ts +0 -6
  132. package/src/patterns/login-form/index.tsx +0 -276
  133. package/src/patterns/login-form/types.ts +0 -67
  134. package/src/setupTests.ts +0 -41
  135. package/src/styles/advanced-chart.css +0 -239
  136. package/src/styles/calendar.css +0 -35
  137. package/src/styles/design-system.css +0 -363
  138. package/src/styles/index.css +0 -681
  139. package/src/styles/tailwind.css +0 -7
  140. package/src/styles/tokens.css +0 -455
  141. package/src/types/next-auth.d.ts +0 -21
  142. package/src/use-intersection-observer.tsx +0 -154
  143. package/src/use-local-storage.tsx +0 -71
  144. package/src/use-paddle.ts +0 -138
  145. package/src/use-performance-optimizer.ts +0 -389
  146. package/src/use-pro-access.ts +0 -141
  147. package/src/use-scroll-animation.ts +0 -219
  148. package/src/use-subscription.ts +0 -37
  149. package/src/use-toast.ts +0 -32
  150. package/src/utils/chart-helpers.ts +0 -357
  151. package/src/utils/cn.ts +0 -6
  152. package/src/utils/data-processing.ts +0 -151
  153. package/src/utils/license-validator.tsx +0 -183
@@ -1,230 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "../../lib/utils";
6
-
7
- /**
8
- * Premium Badge Component
9
- *
10
- * Durum, kategori ve etiketleme için yüksek kaliteli badge bileşeni.
11
- * Dark ve light modda uyumlu, erişilebilir ve çeşitli varyantlar sunar.
12
- */
13
-
14
- const moonUIBadgeVariantsPro = cva(
15
- ["inline-flex items-center gap-1.5",
16
- "font-medium transition-colors duration-200",
17
- "border focus:outline-none",
18
- "focus-visible:ring-2 focus-visible:ring-offset-1"],
19
- {
20
- variants: {
21
- variant: {
22
- primary: [
23
- "border-transparent bg-primary text-primary-foreground",
24
- "hover:bg-primary-hover dark:hover:bg-primary/90",
25
- "focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40",
26
- "dark:bg-primary/90 dark:text-white dark:shadow-inner dark:shadow-primary/10",
27
- ],
28
- secondary: [
29
- "border-transparent bg-secondary text-secondary-foreground",
30
- "hover:bg-gray-200 dark:hover:bg-gray-700/90",
31
- "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
32
- "dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",
33
- ],
34
- outline: [
35
- "border-gray-200 dark:border-gray-700",
36
- "bg-transparent text-foreground",
37
- "hover:border-gray-300 dark:hover:border-gray-600",
38
- "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
39
- "dark:text-gray-200 dark:bg-transparent dark:backdrop-blur-sm",
40
- ],
41
- destructive: [
42
- "border-transparent bg-error text-white",
43
- "hover:bg-error/90 dark:hover:bg-error/80",
44
- "focus-visible:ring-error/30 dark:focus-visible:ring-error/25",
45
- "dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10",
46
- ],
47
- success: [
48
- "border-transparent bg-success text-white",
49
- "hover:bg-success/90 dark:hover:bg-success/80",
50
- "focus-visible:ring-success/30 dark:focus-visible:ring-success/25",
51
- "dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10",
52
- ],
53
- warning: [
54
- "border-transparent bg-warning text-white",
55
- "hover:bg-warning/90 dark:hover:bg-warning/80",
56
- "focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25",
57
- "dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10",
58
- ],
59
- ghost: [
60
- "border-transparent bg-transparent text-foreground",
61
- "hover:bg-gray-100 dark:hover:bg-gray-800/80",
62
- "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
63
- "dark:text-gray-200 dark:backdrop-blur-sm",
64
- "transition-colors duration-200",
65
- ],
66
- pro: [
67
- "border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white",
68
- "hover:from-purple-700 hover:to-pink-700",
69
- "focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40",
70
- "shadow-md dark:shadow-lg dark:shadow-purple-500/10",
71
- ],
72
- admin: [
73
- "border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white",
74
- "hover:from-purple-700 hover:to-pink-700",
75
- "focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40",
76
- "shadow-md dark:shadow-lg dark:shadow-purple-500/10",
77
- ],
78
- },
79
- size: {
80
- sm: "h-5 px-2 text-xs",
81
- md: "h-6 px-3 text-sm",
82
- lg: "h-8 px-4 text-base",
83
- },
84
- radius: {
85
- default: "rounded-full",
86
- sm: "rounded-md",
87
- lg: "rounded-xl",
88
- none: "rounded-none",
89
- }
90
- },
91
- defaultVariants: {
92
- variant: "primary",
93
- size: "md",
94
- radius: "default",
95
- },
96
- }
97
- );
98
-
99
- export interface MoonUIBadgeProProps
100
- extends React.HTMLAttributes<HTMLDivElement>,
101
- Omit<VariantProps<typeof moonUIBadgeVariantsPro>, 'variant'> {
102
- withDot?: boolean;
103
- dotColor?: string;
104
- removable?: boolean;
105
- onRemove?: () => void;
106
- leftIcon?: React.ReactNode;
107
- rightIcon?: React.ReactNode;
108
- variant?: 'primary' | 'secondary' | 'destructive' | 'outline' | 'success' | 'warning' | 'ghost' | 'pro' | 'admin';
109
- }
110
-
111
- /**
112
- * Premium Badge Component
113
- *
114
- * @param props - Badge bileşeni özellikleri
115
- * @param props.variant - Badgenin görsel varyantı
116
- * @param props.size - Badge boyutu
117
- * @param props.radius - Köşe yuvarlama stili
118
- * @param props.withDot - Başında nokta gösterimi
119
- * @param props.dotColor - Noktanın rengi (özel)
120
- * @param props.removable - Kaldırılabilir badge (X simgesi ile)
121
- * @param props.onRemove - Kaldırma işlevi
122
- * @param props.leftIcon - Badge'in solunda görüntülenecek ikon
123
- * @param props.rightIcon - Badge'in sağında görüntülenecek ikon
124
- */
125
- function MoonUIBadgePro({
126
- className,
127
- variant,
128
- size,
129
- radius,
130
- withDot,
131
- dotColor,
132
- removable,
133
- onRemove,
134
- leftIcon,
135
- rightIcon,
136
- children,
137
- ...props
138
- }: MoonUIBadgeProProps) {
139
- // Auto-assign icons and content for special variants
140
- let autoLeftIcon = leftIcon;
141
- let autoChildren = children;
142
-
143
- if (variant === 'pro') {
144
- // Auto Sparkles icon for pro
145
- autoLeftIcon = leftIcon || (
146
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" className="w-3 h-3">
147
- <path d="M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z" fill="currentColor"/>
148
- <path d="M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z" fill="currentColor"/>
149
- <path d="M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z" fill="currentColor"/>
150
- </svg>
151
- );
152
- autoChildren = children || 'Pro';
153
- }
154
-
155
- if (variant === 'admin') {
156
- // Auto CheckCircle icon for admin
157
- autoLeftIcon = leftIcon || (
158
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" className="w-3 h-3">
159
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor"/>
160
- </svg>
161
- );
162
- autoChildren = children || 'Admin Pro';
163
- }
164
-
165
- return (
166
- <div
167
- className={cn(moonUIBadgeVariantsPro({ variant, size, radius }), className)}
168
- data-removable={removable ? "" : undefined}
169
- {...props}
170
- >
171
- {withDot && (
172
- <span
173
- className={cn(
174
- "h-2 w-2 rounded-full",
175
- dotColor ||
176
- (variant === "destructive" ? "bg-white" :
177
- variant === "success" ? "bg-white" :
178
- variant === "warning" ? "bg-white" :
179
- variant === "secondary" ? "bg-secondary-foreground" :
180
- variant === "outline" ? "bg-foreground" :
181
- variant === "ghost" ? "bg-foreground" :
182
- variant === "pro" ? "bg-white" :
183
- variant === "admin" ? "bg-white" :
184
- "bg-primary-foreground")
185
- )}
186
- aria-hidden="true"
187
- />
188
- )}
189
- {autoLeftIcon && (
190
- <span className="inline-flex shrink-0">
191
- {autoLeftIcon}
192
- </span>
193
- )}
194
- <span className="truncate">{autoChildren}</span>
195
- {rightIcon && (
196
- <span className="inline-flex shrink-0">
197
- {rightIcon}
198
- </span>
199
- )}
200
- {removable && onRemove && (
201
- <button
202
- type="button"
203
- className="ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10"
204
- onClick={(e) => {
205
- e.stopPropagation();
206
- onRemove();
207
- }}
208
- aria-label="Remove badge"
209
- >
210
- <svg
211
- width="8"
212
- height="8"
213
- viewBox="0 0 8 8"
214
- fill="none"
215
- xmlns="http://www.w3.org/2000/svg"
216
- className="opacity-70"
217
- aria-hidden="true"
218
- >
219
- <path d="M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
220
- </svg>
221
- </button>
222
- )}
223
- </div>
224
- );
225
- }
226
-
227
- export { MoonUIBadgePro, moonUIBadgeVariantsPro };
228
-
229
- // Backward compatibility exports
230
- export { MoonUIBadgePro as Badge, moonUIBadgeVariantsPro as badgeVariants };
@@ -1,216 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react";
4
- import { ChevronRight, MoreHorizontal } from "lucide-react";
5
- import { cva, type VariantProps } from "class-variance-authority";
6
-
7
- import { cn } from "../../lib/utils";
8
-
9
- const MoonUIbreadcrumbVariantsPro = cva(
10
- "flex items-center gap-1.5 text-sm",
11
- {
12
- variants: {
13
- variant: {
14
- default: "dark:text-gray-100 transition-colors",
15
- muted: "text-muted-foreground dark:text-gray-400 transition-colors",
16
- ghost: "text-foreground/60 dark:text-gray-300/60 transition-colors",
17
- },
18
- size: {
19
- default: "text-sm",
20
- sm: "text-xs",
21
- lg: "text-base",
22
- },
23
- },
24
- defaultVariants: {
25
- variant: "default",
26
- size: "default",
27
- },
28
- }
29
- );
30
-
31
- interface BreadcrumbProps
32
- extends React.HTMLAttributes<HTMLElement>,
33
- VariantProps<typeof MoonUIbreadcrumbVariantsPro> {
34
- separator?: React.ReactNode;
35
- showHomeIcon?: boolean;
36
- }
37
-
38
- interface BreadcrumbListProps extends React.HTMLAttributes<HTMLOListElement> {
39
- collapsed?: boolean;
40
- collapsedWidth?: number;
41
- }
42
-
43
- interface BreadcrumbItemProps extends React.HTMLAttributes<HTMLLIElement> {
44
- isCurrent?: boolean;
45
- href?: string;
46
- asChild?: boolean;
47
- }
48
-
49
- interface BreadcrumbSeparatorProps extends React.HTMLAttributes<HTMLSpanElement> {
50
- /** Custom separator icon or text */
51
- icon?: React.ReactNode;
52
- }
53
-
54
- interface BreadcrumbEllipsisProps extends React.HTMLAttributes<HTMLSpanElement> {
55
- /** Custom ellipsis icon */
56
- icon?: React.ReactNode;
57
- }
58
-
59
- const MoonUIBreadcrumbPro = React.forwardRef<HTMLElement, BreadcrumbProps>(
60
- ({ className, variant, size, ...props }, ref) => (
61
- <nav
62
- ref={ref}
63
- className={cn(MoonUIbreadcrumbVariantsPro({ variant, size }), className)}
64
- aria-label="breadcrumb"
65
- {...props}
66
- />
67
- )
68
- );
69
- MoonUIBreadcrumbPro.displayName = "BreadcrumbPro";
70
-
71
- const MoonUIBreadcrumbListPro = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(
72
- ({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
73
- const MoonUIchildrenArrayPro = React.Children.toArray(props.children).filter(Boolean);
74
- const MoonUIchildCountPro = MoonUIchildrenArrayPro.length;
75
-
76
- if (collapsed && MoonUIchildCountPro > collapsedWidth) {
77
- const MoonUIfirstItemPro = MoonUIchildrenArrayPro[0];
78
- // const MoonUImiddleItemsPro = childrenArray.slice(1, -2); // Uncomment when needed
79
- const MoonUIlastTwoItemsPro = MoonUIchildrenArrayPro.slice(-2);
80
-
81
- return (
82
- <ol
83
- ref={ref}
84
- className={cn(
85
- "flex flex-wrap items-center gap-1.5 sm:gap-2.5",
86
- className
87
- )}
88
- {...props}
89
- >
90
- {MoonUIfirstItemPro}
91
- <MoonUIBreadcrumbEllipsisPro />
92
- {MoonUIlastTwoItemsPro}
93
- </ol>
94
- );
95
- }
96
-
97
- return (
98
- <ol
99
- ref={ref}
100
- className={cn(
101
- "flex flex-wrap items-center gap-1.5 sm:gap-2.5",
102
- className
103
- )}
104
- {...props}
105
- />
106
- );
107
- }
108
- );
109
- MoonUIBreadcrumbListPro.displayName = "BreadcrumbListPro";
110
-
111
- const MoonUIBreadcrumbItemPro = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(
112
- ({ className, isCurrent, href, asChild = false, ...props }, ref) => {
113
- const MoonUICompPro = asChild ? React.Fragment : href ? "a" : "span";
114
- const MoonUIitemPropsPro = asChild ? {} : href ? { href } : {};
115
-
116
- return (
117
- <li
118
- ref={ref}
119
- className={cn("inline-flex items-center gap-1.5", className)}
120
- aria-current={isCurrent ? "page" : undefined}
121
- {...props}
122
- >
123
- <MoonUICompPro
124
- className={cn(
125
- "transition-colors duration-200 hover:text-foreground",
126
- isCurrent
127
- ? "font-medium text-foreground dark:text-white dark:text-opacity-95"
128
- : "text-muted-foreground hover:text-foreground dark:text-gray-400 dark:hover:text-gray-200 dark:hover:text-opacity-95 hover:underline hover:underline-offset-4 hover:decoration-gray-300/30"
129
- )}
130
- {...MoonUIitemPropsPro}
131
- >
132
- {props.children}
133
- </MoonUICompPro>
134
- </li>
135
- );
136
- }
137
- );
138
- MoonUIBreadcrumbItemPro.displayName = "BreadcrumbItemPro";
139
-
140
- const MoonUIBreadcrumbSeparatorPro = ({
141
- children,
142
- className,
143
- ...props
144
- }: BreadcrumbSeparatorProps) => (
145
- <span
146
- role="presentation"
147
- aria-hidden="true"
148
- className={cn("text-muted-foreground dark:text-gray-500 opacity-70", className)}
149
- {...props}
150
- >
151
- {children || <ChevronRight className="h-3.5 w-3.5" />}
152
- </span>
153
- );
154
- MoonUIBreadcrumbSeparatorPro.displayName = "BreadcrumbSeparatorPro";
155
-
156
- const MoonUIBreadcrumbEllipsisPro = ({
157
- className,
158
- ...props
159
- }: BreadcrumbEllipsisProps) => (
160
- <span
161
- role="presentation"
162
- aria-hidden="true"
163
- className={cn("flex items-center text-muted-foreground dark:text-gray-500 dark:hover:text-gray-400 transition-colors duration-200", className)}
164
- {...props}
165
- >
166
- <MoreHorizontal className="h-4 w-4" />
167
- <span className="sr-only">More pages</span>
168
- </span>
169
- );
170
- MoonUIBreadcrumbEllipsisPro.displayName = "BreadcrumbEllipsisPro";
171
-
172
- const MoonUIBreadcrumbLinkPro = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(
173
- ({ className, href, ...props }, ref) => (
174
- <a
175
- ref={ref}
176
- href={href}
177
- className={cn(
178
- "transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-gray-300/30 dark:text-gray-400 dark:hover:text-gray-200",
179
- className
180
- )}
181
- {...props}
182
- />
183
- )
184
- );
185
- MoonUIBreadcrumbLinkPro.displayName = "BreadcrumbLinkPro";
186
-
187
- const MoonUIBreadcrumbPagePro = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(
188
- ({ className, ...props }, ref) => (
189
- <span
190
- ref={ref}
191
- className={cn(
192
- "font-medium text-foreground dark:text-white dark:text-opacity-95",
193
- className
194
- )}
195
- {...props}
196
- />
197
- )
198
- );
199
- MoonUIBreadcrumbPagePro.displayName = "BreadcrumbPagePro";
200
-
201
-
202
- // Internal aliases for Pro component usage
203
- export const breadcrumbVariantsInternal = MoonUIbreadcrumbVariantsPro
204
- export const BreadcrumbInternal = MoonUIBreadcrumbPro
205
- export const BreadcrumbListInternal = MoonUIBreadcrumbListPro
206
- export const BreadcrumbItemInternal = MoonUIBreadcrumbItemPro
207
- export const BreadcrumbSeparatorInternal = MoonUIBreadcrumbSeparatorPro
208
- export const BreadcrumbEllipsisInternal = MoonUIBreadcrumbEllipsisPro
209
- export const BreadcrumbLinkInternal = MoonUIBreadcrumbLinkPro
210
- export const BreadcrumbPageInternal = MoonUIBreadcrumbPagePro
211
-
212
- // Pro exports
213
- export { MoonUIbreadcrumbVariantsPro, MoonUIBreadcrumbPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbSeparatorPro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbPagePro }
214
-
215
- // Clean exports (without MoonUI prefix for easier usage)
216
- export { MoonUIbreadcrumbVariantsPro as breadcrumbVariants, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbPagePro as BreadcrumbPage };
@@ -1,228 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "../../lib/utils";
6
- import { Loader2 } from "lucide-react";
7
-
8
- /**
9
- * MoonUI Button Pro Component
10
- *
11
- * A world-class, accessible, and versatile button component.
12
- * Pixel-perfect design with extensive variants and states.
13
- */
14
- const moonUIButtonProVariants = cva(
15
- ["inline-flex items-center justify-center gap-2 whitespace-nowrap",
16
- "font-medium relative",
17
- "transition-all duration-200 ease-out",
18
- "transform active:scale-[0.98]",
19
- "focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
20
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],
21
- {
22
- variants: {
23
- variant: {
24
- primary: [
25
- "bg-primary text-primary-foreground",
26
- "dark:bg-primary dark:text-primary-foreground",
27
- "hover:bg-primary/90 dark:hover:bg-primary/90",
28
- "active:bg-primary/80 dark:active:bg-primary/80",
29
- "shadow-sm hover:shadow-md",
30
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
31
- "transition-all duration-200",
32
- ],
33
- secondary: [
34
- "bg-gray-100 text-gray-900",
35
- "dark:bg-gray-800 dark:text-gray-100",
36
- "hover:bg-gray-200 dark:hover:bg-gray-700",
37
- "active:bg-gray-300 dark:active:bg-gray-600",
38
- "border border-gray-200 dark:border-gray-700",
39
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
40
- "shadow-sm hover:shadow-md",
41
- ],
42
- outline: [
43
- "bg-background text-foreground",
44
- "dark:bg-background dark:text-foreground",
45
- "border border-input dark:border-input",
46
- "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",
47
- "active:bg-accent/80 dark:active:bg-accent/80",
48
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
49
- "transition-all duration-200",
50
- ],
51
- ghost: [
52
- "text-gray-700",
53
- "dark:text-gray-300",
54
- "hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100",
55
- "active:bg-gray-200 dark:active:bg-gray-700",
56
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
57
- "transition-all duration-200",
58
- ],
59
- destructive: [
60
- "bg-destructive text-destructive-foreground",
61
- "dark:bg-destructive dark:text-destructive-foreground",
62
- "hover:bg-destructive/90 dark:hover:bg-destructive/90",
63
- "active:bg-destructive/80 dark:active:bg-destructive/80",
64
- "shadow-sm hover:shadow-md",
65
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
66
- "transition-all duration-200",
67
- ],
68
- success: [
69
- "bg-success text-success-foreground",
70
- "dark:bg-success dark:text-success-foreground",
71
- "hover:bg-success/90 dark:hover:bg-success/90",
72
- "active:bg-success/80 dark:active:bg-success/80",
73
- "shadow-sm hover:shadow-md",
74
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
75
- "transition-all duration-200",
76
- ],
77
- link: [
78
- "text-primary bg-transparent",
79
- "underline-offset-4 hover:underline",
80
- "hover:text-primary/80 active:text-primary/70",
81
- "p-0 h-auto",
82
- "transition-colors duration-200",
83
- ],
84
- gradient: [
85
- "bg-gradient-to-r from-purple-500 to-pink-500 text-white",
86
- "hover:from-purple-600 hover:to-pink-600",
87
- "active:from-purple-700 active:to-pink-700",
88
- "shadow-xl shadow-purple-500/40",
89
- "hover:shadow-2xl hover:shadow-purple-500/50",
90
- "focus-visible:ring-purple-500/50",
91
- "transition-all duration-300",
92
- ],
93
- glow: [
94
- "bg-blue-500 text-white",
95
- "shadow-[0_0_30px_rgba(59,130,246,0.5)]",
96
- "hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]",
97
- "active:shadow-[0_0_20px_rgba(59,130,246,0.4)]",
98
- "hover:bg-blue-600",
99
- "focus-visible:ring-blue-500/50",
100
- "transition-all duration-300",
101
- ],
102
- soft: [
103
- "bg-primary/10 text-primary",
104
- "hover:bg-primary/20",
105
- "active:bg-primary/30",
106
- "focus-visible:ring-primary/50",
107
- "dark:bg-primary/20 dark:text-primary-foreground",
108
- "dark:hover:bg-primary/30 dark:active:bg-primary/40",
109
- "transition-colors duration-200",
110
- ],
111
- glass: [
112
- "bg-white/10 backdrop-blur-md text-foreground",
113
- "border border-white/20",
114
- "hover:bg-white/20 hover:border-white/30",
115
- "active:bg-white/30",
116
- "shadow-lg",
117
- "focus-visible:ring-white/50",
118
- "dark:bg-gray-800/10 dark:border-gray-700/20",
119
- "dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30",
120
- "transition-all duration-200",
121
- ],
122
- neon: [
123
- "bg-transparent text-green-400",
124
- "border-2 border-green-400",
125
- "hover:bg-green-400 hover:text-gray-900",
126
- "hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]",
127
- "active:shadow-[0_0_15px_rgba(74,222,128,0.4)]",
128
- "focus-visible:ring-green-400/50",
129
- "transition-all duration-300",
130
- ],
131
- },
132
- size: {
133
- xs: "h-7 px-2.5 text-xs",
134
- sm: "h-8 px-3 text-sm",
135
- md: "h-10 px-4 text-base",
136
- lg: "h-12 px-6 text-lg",
137
- xl: "h-14 px-8 text-xl",
138
- icon: "h-10 w-10 p-2",
139
- "icon-sm": "h-8 w-8 p-1.5",
140
- "icon-lg": "h-12 w-12 p-3",
141
- },
142
- rounded: {
143
- default: "rounded-xl",
144
- full: "rounded-full",
145
- none: "rounded-none",
146
- sm: "rounded-lg",
147
- lg: "rounded-2xl",
148
- },
149
- fullWidth: {
150
- true: "w-full",
151
- },
152
- },
153
- defaultVariants: {
154
- variant: "primary",
155
- size: "md",
156
- rounded: "default",
157
- fullWidth: false,
158
- },
159
- }
160
- );
161
-
162
- // MoonUI Button Pro component props
163
- export interface MoonUIButtonProProps
164
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
165
- VariantProps<typeof moonUIButtonProVariants> {
166
- asChild?: boolean;
167
- loading?: boolean;
168
- leftIcon?: React.ReactNode;
169
- rightIcon?: React.ReactNode;
170
- }
171
-
172
- /**
173
- * MoonUI Button Pro Component
174
- *
175
- * @param props - MoonUI Button Pro component properties
176
- * @param props.variant - Visual variant (primary, secondary, ghost, etc.)
177
- * @param props.size - Button size (xs, sm, md, lg, xl)
178
- * @param props.loading - Loading state display
179
- * @param props.leftIcon - Icon on the left side
180
- * @param props.rightIcon - Icon on the right side
181
- * @param props.fullWidth - Full width display
182
- * @param props.rounded - Corner rounding style (default, full, none)
183
- * @param props.asChild - For Radix UI polymorphic component
184
- */
185
- const MoonUIButtonPro = React.forwardRef<HTMLButtonElement, MoonUIButtonProProps>(
186
- ({
187
- className,
188
- variant,
189
- size,
190
- rounded,
191
- fullWidth,
192
- asChild = false,
193
- loading = false,
194
- leftIcon,
195
- rightIcon,
196
- children,
197
- disabled,
198
- ...props
199
- }, ref) => {
200
- // Radix UI'ın asChild pattern'i için - "as" prop yerine
201
- const Comp = asChild ? "button" : "button";
202
-
203
- return (
204
- <Comp
205
- className={cn(moonUIButtonProVariants({ variant, size, rounded, fullWidth, className }))}
206
- ref={ref}
207
- disabled={disabled || loading}
208
- data-loading={loading ? "" : undefined}
209
- {...props}
210
- >
211
- {loading && (
212
- <Loader2 className="w-4 h-4 animate-spin" aria-hidden="true" />
213
- )}
214
- {!loading && leftIcon}
215
- {children}
216
- {!loading && rightIcon}
217
- </Comp>
218
- );
219
- }
220
- );
221
-
222
- MoonUIButtonPro.displayName = "MoonUIButtonPro";
223
-
224
- export { MoonUIButtonPro, moonUIButtonProVariants };
225
-
226
- // Backward compatibility exports
227
- export { MoonUIButtonPro as Button, moonUIButtonProVariants as buttonVariants };
228
- export type { MoonUIButtonProProps as ButtonProps };