@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,329 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
export type SortDirection = "asc" | "desc" | null;
|
|
7
|
-
|
|
8
|
-
const MoonUItableVariantsPro = cva(
|
|
9
|
-
"w-full caption-bottom text-sm",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "dark:text-gray-200",
|
|
14
|
-
bordered: "border border-border dark:border-gray-700",
|
|
15
|
-
striped: "dark:text-gray-200",
|
|
16
|
-
card: "border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",
|
|
17
|
-
minimal: "border-none dark:text-gray-200",
|
|
18
|
-
},
|
|
19
|
-
size: {
|
|
20
|
-
sm: "text-xs",
|
|
21
|
-
default: "text-sm",
|
|
22
|
-
lg: "text-base",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
variant: "default",
|
|
27
|
-
size: "default",
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
export interface ColumnDefinition<T> {
|
|
33
|
-
id: string;
|
|
34
|
-
header: React.ReactNode;
|
|
35
|
-
accessorKey?: keyof T;
|
|
36
|
-
cell?: (row: T) => React.ReactNode;
|
|
37
|
-
sortable?: boolean;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface TableProps<T>
|
|
41
|
-
extends React.HTMLAttributes<HTMLTableElement>,
|
|
42
|
-
VariantProps<typeof MoonUItableVariantsPro> {
|
|
43
|
-
/** Veri yükleniyor durumunu gösterir */
|
|
44
|
-
loading?: boolean;
|
|
45
|
-
/** Sıralama için kullanılan sütun */
|
|
46
|
-
sortColumn?: string;
|
|
47
|
-
/** Sıralama yönü */
|
|
48
|
-
sortDirection?: SortDirection;
|
|
49
|
-
/** Sıralama değiştiğinde çağrılacak fonksiyon */
|
|
50
|
-
onSortChange?: (column: string, direction: SortDirection) => void;
|
|
51
|
-
/** Boş durum için özel içerik */
|
|
52
|
-
emptyContent?: React.ReactNode;
|
|
53
|
-
/** Seçili satır id'leri */
|
|
54
|
-
selectedRowIds?: string[];
|
|
55
|
-
/** Satır seçim değiştiğinde çağrılacak fonksiyon */
|
|
56
|
-
onRowSelectionChange?: (selectedRowIds: string[]) => void;
|
|
57
|
-
/** Satır seçim devre dışı */
|
|
58
|
-
disableRowSelection?: boolean;
|
|
59
|
-
/** Her satır için benzersiz id çıkarma fonksiyonu */
|
|
60
|
-
getRowId?: (row: T) => string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Tip parametresiz Table bileşeni için varsayılan tip, herhangi bir veri tipini kabul edebilmesi için
|
|
64
|
-
const MoonUITablePro = React.forwardRef<
|
|
65
|
-
HTMLTableElement,
|
|
66
|
-
TableProps<unknown>
|
|
67
|
-
>(({
|
|
68
|
-
className,
|
|
69
|
-
variant,
|
|
70
|
-
size,
|
|
71
|
-
loading,
|
|
72
|
-
emptyContent,
|
|
73
|
-
// Kullanılmayan özellikleri yoruma alarak lint uyarılarını önlüyoruz
|
|
74
|
-
// sortColumn,
|
|
75
|
-
// sortDirection,
|
|
76
|
-
// onSortChange,
|
|
77
|
-
// selectedRowIds,
|
|
78
|
-
// onRowSelectionChange,
|
|
79
|
-
// disableRowSelection,
|
|
80
|
-
// getRowId,
|
|
81
|
-
...props
|
|
82
|
-
}, ref) => {
|
|
83
|
-
// Apply striped styles to the tbody via a class name
|
|
84
|
-
const MoonUIstripedPro = variant === "striped";
|
|
85
|
-
|
|
86
|
-
// Çocukları güvenli bir şekilde işle ve tip kontrollerini doğru yap
|
|
87
|
-
const MoonUIchildrenWithPropsPro = React.Children.map(props.children, (child) => {
|
|
88
|
-
if (React.isValidElement(child)) {
|
|
89
|
-
if (child.type === "tbody") {
|
|
90
|
-
// Tip güvenliği için props'ları düzgün şekilde ele alıyoruz
|
|
91
|
-
const MoonUItbodyPropsPro = child.props as Record<string, unknown>;
|
|
92
|
-
return React.cloneElement(child as React.ReactElement<React.HTMLAttributes<HTMLTableSectionElement>>, {
|
|
93
|
-
className: cn(MoonUItbodyPropsPro.className as string | undefined, MoonUIstripedPro && "even:[&>tr]:bg-muted/50")
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return child;
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<div className="relative w-full overflow-auto">
|
|
102
|
-
{/* Yükleniyor durumu için overlay */}
|
|
103
|
-
{loading && (
|
|
104
|
-
<div className="absolute inset-0 bg-background/60 flex items-center justify-center z-10">
|
|
105
|
-
<div className="h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"></div>
|
|
106
|
-
</div>
|
|
107
|
-
)}
|
|
108
|
-
|
|
109
|
-
<table
|
|
110
|
-
ref={ref}
|
|
111
|
-
className={cn(
|
|
112
|
-
MoonUItableVariantsPro({ variant, size }),
|
|
113
|
-
loading && "opacity-70",
|
|
114
|
-
className
|
|
115
|
-
)}
|
|
116
|
-
{...props}
|
|
117
|
-
>
|
|
118
|
-
{MoonUIchildrenWithPropsPro}
|
|
119
|
-
</table>
|
|
120
|
-
|
|
121
|
-
</div>
|
|
122
|
-
);
|
|
123
|
-
});
|
|
124
|
-
MoonUITablePro.displayName = "TablePro";
|
|
125
|
-
|
|
126
|
-
const MoonUITableHeaderPro = React.forwardRef<
|
|
127
|
-
HTMLTableSectionElement,
|
|
128
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
129
|
-
>(({ className, ...props }, ref) => (
|
|
130
|
-
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
131
|
-
));
|
|
132
|
-
MoonUITableHeaderPro.displayName = "TableHeaderPro";
|
|
133
|
-
|
|
134
|
-
interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
135
|
-
/** Veri yoksa gösterilecek boş durum içeriği */
|
|
136
|
-
emptyContent?: React.ReactNode;
|
|
137
|
-
/** Varsayılan boş durum mesajı */
|
|
138
|
-
emptyMessage?: string;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const MoonUITableBodyPro = React.forwardRef<
|
|
142
|
-
HTMLTableSectionElement,
|
|
143
|
-
TableBodyProps
|
|
144
|
-
>(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
145
|
-
// Çocuk elementlerin varlığını kontrol et
|
|
146
|
-
const MoonUIhasChildrenPro = React.Children.count(children) > 0;
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
<tbody
|
|
150
|
-
ref={ref}
|
|
151
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
152
|
-
{...props}
|
|
153
|
-
>
|
|
154
|
-
{MoonUIhasChildrenPro ? (
|
|
155
|
-
children
|
|
156
|
-
) : (
|
|
157
|
-
<tr>
|
|
158
|
-
<td colSpan={100} className="h-24 text-center">
|
|
159
|
-
{emptyContent || (
|
|
160
|
-
<div className="py-6 text-muted-foreground">
|
|
161
|
-
<div className="text-sm">
|
|
162
|
-
{emptyMessage}
|
|
163
|
-
</div>
|
|
164
|
-
</div>
|
|
165
|
-
)}
|
|
166
|
-
</td>
|
|
167
|
-
</tr>
|
|
168
|
-
)}
|
|
169
|
-
</tbody>
|
|
170
|
-
)
|
|
171
|
-
});
|
|
172
|
-
MoonUITableBodyPro.displayName = "TableBodyPro";
|
|
173
|
-
|
|
174
|
-
const MoonUITableFooterPro = React.forwardRef<
|
|
175
|
-
HTMLTableSectionElement,
|
|
176
|
-
React.HTMLAttributes<HTMLTableSectionElement>
|
|
177
|
-
>(({ className, ...props }, ref) => (
|
|
178
|
-
<tfoot
|
|
179
|
-
ref={ref}
|
|
180
|
-
className={cn("bg-primary text-primary-foreground font-medium", className)}
|
|
181
|
-
{...props}
|
|
182
|
-
/>
|
|
183
|
-
));
|
|
184
|
-
MoonUITableFooterPro.displayName = "TableFooterPro";
|
|
185
|
-
|
|
186
|
-
const MoonUITableRowPro = React.forwardRef<
|
|
187
|
-
HTMLTableRowElement,
|
|
188
|
-
React.HTMLAttributes<HTMLTableRowElement>
|
|
189
|
-
>(({ className, ...props }, ref) => (
|
|
190
|
-
<tr
|
|
191
|
-
ref={ref}
|
|
192
|
-
className={cn(
|
|
193
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
194
|
-
className
|
|
195
|
-
)}
|
|
196
|
-
{...props}
|
|
197
|
-
/>
|
|
198
|
-
));
|
|
199
|
-
MoonUITableRowPro.displayName = "TableRowPro";
|
|
200
|
-
|
|
201
|
-
interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
202
|
-
/** Bu sütun için sıralama durumu */
|
|
203
|
-
sortable?: boolean;
|
|
204
|
-
/** Bu sütunun sıralanma durumu */
|
|
205
|
-
sorted?: SortDirection;
|
|
206
|
-
/** Sıralama değiştiğinde çağrılacak fonksiyon */
|
|
207
|
-
onSort?: () => void;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const MoonUITableHeadPro = React.forwardRef<HTMLTableCellElement, TableHeadProps>(
|
|
211
|
-
({ className, sortable, sorted, onSort, children, ...props }, ref) => {
|
|
212
|
-
// Sıralama için simgeler
|
|
213
|
-
const MoonUIrenderSortIconPro = () => {
|
|
214
|
-
if (!sortable) return null;
|
|
215
|
-
|
|
216
|
-
if (sorted === "asc") {
|
|
217
|
-
return (
|
|
218
|
-
<svg
|
|
219
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
220
|
-
className="ml-1 h-4 w-4 inline-block"
|
|
221
|
-
viewBox="0 0 20 20"
|
|
222
|
-
fill="currentColor"
|
|
223
|
-
>
|
|
224
|
-
<path
|
|
225
|
-
fillRule="evenodd"
|
|
226
|
-
d="M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z"
|
|
227
|
-
clipRule="evenodd"
|
|
228
|
-
/>
|
|
229
|
-
</svg>
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (sorted === "desc") {
|
|
234
|
-
return (
|
|
235
|
-
<svg
|
|
236
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
237
|
-
className="ml-1 h-4 w-4 inline-block"
|
|
238
|
-
viewBox="0 0 20 20"
|
|
239
|
-
fill="currentColor"
|
|
240
|
-
>
|
|
241
|
-
<path
|
|
242
|
-
fillRule="evenodd"
|
|
243
|
-
d="M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z"
|
|
244
|
-
clipRule="evenodd"
|
|
245
|
-
/>
|
|
246
|
-
</svg>
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
return (
|
|
251
|
-
<svg
|
|
252
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
253
|
-
className="ml-1 h-4 w-4 inline-block opacity-30"
|
|
254
|
-
viewBox="0 0 20 20"
|
|
255
|
-
fill="currentColor"
|
|
256
|
-
>
|
|
257
|
-
<path
|
|
258
|
-
fillRule="evenodd"
|
|
259
|
-
d="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z"
|
|
260
|
-
clipRule="evenodd"
|
|
261
|
-
/>
|
|
262
|
-
</svg>
|
|
263
|
-
);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
return (
|
|
267
|
-
<th
|
|
268
|
-
ref={ref}
|
|
269
|
-
className={cn(
|
|
270
|
-
"h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
271
|
-
sortable && "cursor-pointer hover:text-foreground select-none",
|
|
272
|
-
className
|
|
273
|
-
)}
|
|
274
|
-
onClick={sortable ? onSort : undefined}
|
|
275
|
-
{...props}
|
|
276
|
-
>
|
|
277
|
-
<div className="flex items-center">
|
|
278
|
-
{children}
|
|
279
|
-
{sortable && MoonUIrenderSortIconPro()}
|
|
280
|
-
</div>
|
|
281
|
-
</th>
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
);
|
|
285
|
-
MoonUITableHeadPro.displayName = "TableHeadPro";
|
|
286
|
-
|
|
287
|
-
const MoonUITableCellPro = React.forwardRef<
|
|
288
|
-
HTMLTableCellElement,
|
|
289
|
-
React.TdHTMLAttributes<HTMLTableCellElement>
|
|
290
|
-
>(({ className, ...props }, ref) => (
|
|
291
|
-
<td
|
|
292
|
-
ref={ref}
|
|
293
|
-
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
|
|
294
|
-
{...props}
|
|
295
|
-
/>
|
|
296
|
-
));
|
|
297
|
-
MoonUITableCellPro.displayName = "TableCellPro";
|
|
298
|
-
|
|
299
|
-
const MoonUITableCaptionPro = React.forwardRef<
|
|
300
|
-
HTMLTableCaptionElement,
|
|
301
|
-
React.HTMLAttributes<HTMLTableCaptionElement>
|
|
302
|
-
>(({ className, ...props }, ref) => (
|
|
303
|
-
<caption
|
|
304
|
-
ref={ref}
|
|
305
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
306
|
-
{...props}
|
|
307
|
-
/>
|
|
308
|
-
));
|
|
309
|
-
MoonUITableCaptionPro.displayName = "TableCaptionPro";
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
// Internal aliases for Pro component usage
|
|
313
|
-
export const tableVariantsInternal = MoonUItableVariantsPro
|
|
314
|
-
export const TableInternal = MoonUITablePro
|
|
315
|
-
export const TableHeaderInternal = MoonUITableHeaderPro
|
|
316
|
-
export const TableBodyInternal = MoonUITableBodyPro
|
|
317
|
-
export const TableFooterInternal = MoonUITableFooterPro
|
|
318
|
-
export const TableRowInternal = MoonUITableRowPro
|
|
319
|
-
export const TableHeadInternal = MoonUITableHeadPro
|
|
320
|
-
export const TableCellInternal = MoonUITableCellPro
|
|
321
|
-
export const TableCaptionInternal = MoonUITableCaptionPro
|
|
322
|
-
|
|
323
|
-
// Pro exports
|
|
324
|
-
export { MoonUItableVariantsPro, MoonUITablePro, MoonUITableHeaderPro, MoonUITableBodyPro, MoonUITableFooterPro, MoonUITableRowPro, MoonUITableHeadPro, MoonUITableCellPro, MoonUITableCaptionPro }
|
|
325
|
-
|
|
326
|
-
// Clean exports (without MoonUI prefix for easier usage)
|
|
327
|
-
export { MoonUItableVariantsPro as tableVariants, MoonUITablePro as Table, MoonUITableHeaderPro as TableHeader, MoonUITableBodyPro as TableBody, MoonUITableFooterPro as TableFooter, MoonUITableRowPro as TableRow, MoonUITableHeadPro as TableHead, MoonUITableCellPro as TableCell, MoonUITableCaptionPro as TableCaption };
|
|
328
|
-
|
|
329
|
-
export type { TableBodyProps };
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
/* -------------------------------------------------------------------------------------------------
|
|
8
|
-
* Tabs Root
|
|
9
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
10
|
-
interface MoonUITabsProProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
|
|
11
|
-
/** Mobil görünümde dikey düzen için */
|
|
12
|
-
vertical?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const MoonUITabsPro = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof TabsPrimitive.Root>,
|
|
17
|
-
MoonUITabsProProps
|
|
18
|
-
>(({ vertical = false, ...props }, ref) => (
|
|
19
|
-
<TabsPrimitive.Root
|
|
20
|
-
ref={ref}
|
|
21
|
-
orientation={vertical ? "vertical" : "horizontal"}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
));
|
|
25
|
-
|
|
26
|
-
MoonUITabsPro.displayName = TabsPrimitive.Root.displayName;
|
|
27
|
-
|
|
28
|
-
/* -------------------------------------------------------------------------------------------------
|
|
29
|
-
* TabsList
|
|
30
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
31
|
-
const tabsListVariants = cva(
|
|
32
|
-
"flex items-center justify-start transition-all duration-200",
|
|
33
|
-
{
|
|
34
|
-
variants: {
|
|
35
|
-
variant: {
|
|
36
|
-
default: "bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",
|
|
37
|
-
pills: "bg-transparent gap-2 p-0 dark:text-gray-400",
|
|
38
|
-
underline: "bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",
|
|
39
|
-
cards: "bg-transparent gap-2 p-0 dark:text-gray-400",
|
|
40
|
-
minimal: "bg-transparent gap-1 p-0 dark:text-gray-400",
|
|
41
|
-
},
|
|
42
|
-
orientation: {
|
|
43
|
-
horizontal: "flex-row",
|
|
44
|
-
vertical: "flex-col items-start gap-1"
|
|
45
|
-
},
|
|
46
|
-
fullWidth: {
|
|
47
|
-
true: "w-full"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
variant: "default",
|
|
52
|
-
orientation: "horizontal",
|
|
53
|
-
fullWidth: false
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
interface MoonUITabsListProProps
|
|
59
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>,
|
|
60
|
-
VariantProps<typeof tabsListVariants> {
|
|
61
|
-
/** Dikey düzende göster */
|
|
62
|
-
orientation?: "horizontal" | "vertical";
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const MoonUITabsListPro = React.forwardRef<
|
|
66
|
-
React.ElementRef<typeof TabsPrimitive.List>,
|
|
67
|
-
MoonUITabsListProProps
|
|
68
|
-
>(({ className, variant, orientation, fullWidth, ...props }, ref) => (
|
|
69
|
-
<TabsPrimitive.List
|
|
70
|
-
ref={ref}
|
|
71
|
-
className={cn(tabsListVariants({ variant, orientation, fullWidth, className }))}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
));
|
|
75
|
-
|
|
76
|
-
MoonUITabsListPro.displayName = TabsPrimitive.List.displayName;
|
|
77
|
-
|
|
78
|
-
/* -------------------------------------------------------------------------------------------------
|
|
79
|
-
* TabsTrigger
|
|
80
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
81
|
-
const tabsTriggerVariants = cva(
|
|
82
|
-
"inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
83
|
-
{
|
|
84
|
-
variants: {
|
|
85
|
-
variant: {
|
|
86
|
-
default: "rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",
|
|
87
|
-
underline: "rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",
|
|
88
|
-
pills: "rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",
|
|
89
|
-
cards: "rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",
|
|
90
|
-
minimal: "rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200",
|
|
91
|
-
},
|
|
92
|
-
size: {
|
|
93
|
-
sm: "h-7 px-2 text-xs",
|
|
94
|
-
md: "h-9 px-3 py-1.5 text-sm",
|
|
95
|
-
lg: "h-10 px-4 py-2 text-base",
|
|
96
|
-
},
|
|
97
|
-
orientation: {
|
|
98
|
-
horizontal: "",
|
|
99
|
-
vertical: "justify-start w-full text-left"
|
|
100
|
-
},
|
|
101
|
-
fullWidth: {
|
|
102
|
-
true: "w-full"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
defaultVariants: {
|
|
106
|
-
variant: "default",
|
|
107
|
-
size: "md",
|
|
108
|
-
orientation: "horizontal",
|
|
109
|
-
fullWidth: false
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
interface MoonUITabsTriggerProProps
|
|
115
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>,
|
|
116
|
-
VariantProps<typeof tabsTriggerVariants> {
|
|
117
|
-
/** İkon konumu */
|
|
118
|
-
iconPosition?: "left" | "right" | "none";
|
|
119
|
-
/** İkon */
|
|
120
|
-
icon?: React.ReactNode;
|
|
121
|
-
/** Badge içeriği */
|
|
122
|
-
badge?: React.ReactNode;
|
|
123
|
-
/** Aktif olmayan durumda yarı saydam */
|
|
124
|
-
fadeTabs?: boolean;
|
|
125
|
-
/** Dikey düzende göster */
|
|
126
|
-
orientation?: "horizontal" | "vertical";
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const MoonUITabsTriggerPro = React.forwardRef<
|
|
130
|
-
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
131
|
-
MoonUITabsTriggerProProps
|
|
132
|
-
>(({
|
|
133
|
-
className,
|
|
134
|
-
variant,
|
|
135
|
-
size,
|
|
136
|
-
icon,
|
|
137
|
-
iconPosition = "left",
|
|
138
|
-
badge,
|
|
139
|
-
fadeTabs = false,
|
|
140
|
-
orientation,
|
|
141
|
-
fullWidth,
|
|
142
|
-
children,
|
|
143
|
-
...props
|
|
144
|
-
}, ref) => (
|
|
145
|
-
<TabsPrimitive.Trigger
|
|
146
|
-
ref={ref}
|
|
147
|
-
className={cn(
|
|
148
|
-
tabsTriggerVariants({ variant, size, orientation, fullWidth }),
|
|
149
|
-
fadeTabs && "data-[state=inactive]:opacity-60",
|
|
150
|
-
className
|
|
151
|
-
)}
|
|
152
|
-
{...props}
|
|
153
|
-
>
|
|
154
|
-
{icon && iconPosition === "left" && (
|
|
155
|
-
<span className="mr-2">{icon}</span>
|
|
156
|
-
)}
|
|
157
|
-
{children}
|
|
158
|
-
{icon && iconPosition === "right" && (
|
|
159
|
-
<span className="ml-2">{icon}</span>
|
|
160
|
-
)}
|
|
161
|
-
{badge && (
|
|
162
|
-
<span className="ml-2">{badge}</span>
|
|
163
|
-
)}
|
|
164
|
-
</TabsPrimitive.Trigger>
|
|
165
|
-
));
|
|
166
|
-
|
|
167
|
-
MoonUITabsTriggerPro.displayName = TabsPrimitive.Trigger.displayName;
|
|
168
|
-
|
|
169
|
-
/* -------------------------------------------------------------------------------------------------
|
|
170
|
-
* TabsContent
|
|
171
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
172
|
-
interface MoonUITabsContentProProps
|
|
173
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
|
|
174
|
-
/** İçerik animasyonu */
|
|
175
|
-
animated?: boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const MoonUITabsContentPro = React.forwardRef<
|
|
179
|
-
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
180
|
-
MoonUITabsContentProProps
|
|
181
|
-
>(({ className, animated = false, ...props }, ref) => (
|
|
182
|
-
<TabsPrimitive.Content
|
|
183
|
-
ref={ref}
|
|
184
|
-
className={cn(
|
|
185
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
186
|
-
animated && "data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",
|
|
187
|
-
className
|
|
188
|
-
)}
|
|
189
|
-
{...props}
|
|
190
|
-
/>
|
|
191
|
-
));
|
|
192
|
-
|
|
193
|
-
MoonUITabsContentPro.displayName = TabsPrimitive.Content.displayName;
|
|
194
|
-
|
|
195
|
-
export { MoonUITabsPro, MoonUITabsListPro, MoonUITabsTriggerPro, MoonUITabsContentPro };
|
|
196
|
-
|
|
197
|
-
// Backward compatibility exports
|
|
198
|
-
export { MoonUITabsPro as Tabs, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITabsContentPro as TabsContent };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import React from "react"
|
|
4
|
-
import { cn } from "../../lib/utils"
|
|
5
|
-
|
|
6
|
-
export interface MoonUITextareaProProps
|
|
7
|
-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
8
|
-
|
|
9
|
-
const MoonUITextareaPro = React.forwardRef<HTMLTextAreaElement, MoonUITextareaProProps>(
|
|
10
|
-
({ className, ...props }, ref) => {
|
|
11
|
-
return (
|
|
12
|
-
<textarea
|
|
13
|
-
className={cn(
|
|
14
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
-
className
|
|
16
|
-
)}
|
|
17
|
-
ref={ref}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
MoonUITextareaPro.displayName = "MoonUITextareaPro"
|
|
24
|
-
|
|
25
|
-
export { MoonUITextareaPro };
|
|
26
|
-
|
|
27
|
-
// Backward compatibility exports
|
|
28
|
-
export { MoonUITextareaPro as Textarea }
|