@moontra/moonui-pro 2.20.0 → 2.20.2
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 +7419 -4935
- package/package.json +4 -3
- package/scripts/postbuild.js +27 -0
- package/src/components/advanced-chart/index.tsx +5 -1
- package/src/components/advanced-forms/index.tsx +175 -16
- package/src/components/calendar/event-dialog.tsx +18 -13
- package/src/components/calendar/index.tsx +197 -50
- package/src/components/dashboard/dashboard-grid.tsx +21 -3
- package/src/components/dashboard/types.ts +3 -0
- package/src/components/dashboard/widgets/activity-feed.tsx +6 -1
- package/src/components/dashboard/widgets/comparison-widget.tsx +177 -0
- package/src/components/dashboard/widgets/index.ts +5 -0
- package/src/components/dashboard/widgets/metric-card.tsx +21 -1
- package/src/components/dashboard/widgets/progress-widget.tsx +113 -0
- package/src/components/error-boundary/index.tsx +160 -37
- package/src/components/form-wizard/form-wizard-context.tsx +54 -26
- package/src/components/form-wizard/form-wizard-progress.tsx +33 -2
- package/src/components/form-wizard/types.ts +2 -1
- package/src/components/github-stars/hooks.ts +1 -0
- package/src/components/github-stars/variants.tsx +3 -1
- package/src/components/health-check/index.tsx +14 -14
- package/src/components/hover-card-3d/index.tsx +2 -3
- package/src/components/index.ts +5 -3
- package/src/components/kanban/kanban.tsx +23 -18
- package/src/components/license-error/index.tsx +2 -0
- package/src/components/magnetic-button/index.tsx +56 -7
- package/src/components/memory-efficient-data/index.tsx +117 -115
- package/src/components/navbar/index.tsx +781 -0
- package/src/components/performance-debugger/index.tsx +62 -38
- package/src/components/performance-monitor/index.tsx +47 -33
- package/src/components/phone-number-input/index.tsx +32 -27
- package/src/components/phone-number-input/phone-number-input-simple.tsx +167 -0
- package/src/components/rich-text-editor/index.tsx +26 -28
- package/src/components/rich-text-editor/slash-commands-extension.ts +15 -5
- package/src/components/sidebar/index.tsx +32 -13
- package/src/components/timeline/index.tsx +84 -49
- package/src/components/ui/accordion.tsx +550 -42
- package/src/components/ui/avatar.tsx +2 -0
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/breadcrumb.tsx +2 -0
- package/src/components/ui/button.tsx +39 -33
- package/src/components/ui/card.tsx +2 -0
- package/src/components/ui/collapsible.tsx +546 -50
- package/src/components/ui/command.tsx +790 -67
- package/src/components/ui/dialog.tsx +510 -92
- package/src/components/ui/dropdown-menu.tsx +540 -52
- package/src/components/ui/index.ts +37 -5
- package/src/components/ui/input.tsx +2 -0
- package/src/components/ui/magnetic-button.tsx +1 -1
- package/src/components/ui/media-gallery.tsx +1 -2
- package/src/components/ui/navigation-menu.tsx +130 -0
- package/src/components/ui/pagination.tsx +2 -0
- package/src/components/ui/select.tsx +6 -2
- package/src/components/ui/spotlight-card.tsx +1 -1
- package/src/components/ui/table.tsx +2 -0
- package/src/components/ui/tabs-pro.tsx +542 -0
- package/src/components/ui/tabs.tsx +23 -167
- package/src/components/ui/toggle.tsx +13 -13
- package/src/index.ts +11 -3
- package/src/styles/index.css +596 -0
- package/src/use-performance-optimizer.ts +1 -1
- package/src/utils/chart-helpers.ts +1 -1
- 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/data-table/data-table.test.tsx +0 -187
- 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/file-upload/file-upload.test.tsx +0 -243
- package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
- package/src/types/moonui.d.ts +0 -22
package/src/styles/index.css
CHANGED
|
@@ -20,6 +20,602 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/* Dialog Animation Keyframes */
|
|
24
|
+
@keyframes bounce-in {
|
|
25
|
+
0% {
|
|
26
|
+
transform: scale(0.8);
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
50% {
|
|
30
|
+
transform: scale(1.1);
|
|
31
|
+
}
|
|
32
|
+
100% {
|
|
33
|
+
transform: scale(1);
|
|
34
|
+
opacity: 1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes bounce-out {
|
|
39
|
+
0% {
|
|
40
|
+
transform: scale(1);
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
100% {
|
|
44
|
+
transform: scale(0.8);
|
|
45
|
+
opacity: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes rotate-in-90 {
|
|
50
|
+
from {
|
|
51
|
+
transform: rotate(-90deg) scale(0.9);
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
to {
|
|
55
|
+
transform: rotate(0) scale(1);
|
|
56
|
+
opacity: 1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes rotate-out-90 {
|
|
61
|
+
from {
|
|
62
|
+
transform: rotate(0) scale(1);
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
to {
|
|
66
|
+
transform: rotate(90deg) scale(0.9);
|
|
67
|
+
opacity: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes rotate-x-90 {
|
|
72
|
+
from {
|
|
73
|
+
transform: perspective(800px) rotateX(-90deg);
|
|
74
|
+
opacity: 0;
|
|
75
|
+
}
|
|
76
|
+
to {
|
|
77
|
+
transform: perspective(800px) rotateX(0);
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@keyframes spin-in-180 {
|
|
83
|
+
from {
|
|
84
|
+
transform: rotate(-540deg) scale(0);
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
to {
|
|
88
|
+
transform: rotate(0) scale(1);
|
|
89
|
+
opacity: 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@keyframes spin-out-180 {
|
|
94
|
+
from {
|
|
95
|
+
transform: rotate(0) scale(1);
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
to {
|
|
99
|
+
transform: rotate(540deg) scale(0);
|
|
100
|
+
opacity: 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes zoom-in-110 {
|
|
105
|
+
from {
|
|
106
|
+
transform: scale(0);
|
|
107
|
+
opacity: 0;
|
|
108
|
+
}
|
|
109
|
+
50% {
|
|
110
|
+
transform: scale(1.1);
|
|
111
|
+
}
|
|
112
|
+
to {
|
|
113
|
+
transform: scale(1);
|
|
114
|
+
opacity: 1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes elastic-in {
|
|
119
|
+
0% {
|
|
120
|
+
transform: scale(0.3);
|
|
121
|
+
opacity: 0;
|
|
122
|
+
}
|
|
123
|
+
50% {
|
|
124
|
+
transform: scale(1.15);
|
|
125
|
+
}
|
|
126
|
+
75% {
|
|
127
|
+
transform: scale(0.95);
|
|
128
|
+
}
|
|
129
|
+
100% {
|
|
130
|
+
transform: scale(1);
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes elastic-out {
|
|
136
|
+
0% {
|
|
137
|
+
transform: scale(1);
|
|
138
|
+
opacity: 1;
|
|
139
|
+
}
|
|
140
|
+
100% {
|
|
141
|
+
transform: scale(0.3);
|
|
142
|
+
opacity: 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes spring-in {
|
|
147
|
+
0% {
|
|
148
|
+
transform: scale(0.9) translateY(20px);
|
|
149
|
+
opacity: 0;
|
|
150
|
+
}
|
|
151
|
+
50% {
|
|
152
|
+
transform: scale(1.05) translateY(-10px);
|
|
153
|
+
}
|
|
154
|
+
100% {
|
|
155
|
+
transform: scale(1) translateY(0);
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@keyframes spring-out {
|
|
161
|
+
0% {
|
|
162
|
+
transform: scale(1) translateY(0);
|
|
163
|
+
opacity: 1;
|
|
164
|
+
}
|
|
165
|
+
100% {
|
|
166
|
+
transform: scale(0.9) translateY(20px);
|
|
167
|
+
opacity: 0;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* MoonUI Pro Component Styles - Standalone with Theming Support */
|
|
172
|
+
@layer components {
|
|
173
|
+
/* ======================
|
|
174
|
+
TOGGLE COMPONENT
|
|
175
|
+
====================== */
|
|
176
|
+
.moonui-toggle-base {
|
|
177
|
+
@apply inline-flex items-center justify-center rounded-md text-sm font-medium;
|
|
178
|
+
@apply ring-offset-background transition-all duration-200;
|
|
179
|
+
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
180
|
+
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
181
|
+
color: hsl(var(--foreground));
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.dark .moonui-toggle-base {
|
|
185
|
+
color: hsl(var(--foreground));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dark .moonui-toggle-default:hover {
|
|
189
|
+
background-color: hsl(var(--muted));
|
|
190
|
+
color: hsl(var(--muted-foreground));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.dark .moonui-toggle-default[data-state="on"] {
|
|
194
|
+
background-color: hsl(var(--accent));
|
|
195
|
+
color: hsl(var(--accent-foreground));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.dark .moonui-toggle-secondary:hover {
|
|
199
|
+
background-color: hsl(var(--accent) / 0.2);
|
|
200
|
+
color: hsl(var(--accent-foreground));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.dark .moonui-toggle-secondary[data-state="on"] {
|
|
204
|
+
background-color: hsl(var(--accent));
|
|
205
|
+
color: hsl(var(--accent-foreground));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* ======================
|
|
209
|
+
BUTTON COMPONENT
|
|
210
|
+
====================== */
|
|
211
|
+
.moonui-button-base {
|
|
212
|
+
@apply inline-flex items-center justify-center rounded-md text-sm font-medium;
|
|
213
|
+
@apply ring-offset-background transition-colors duration-200;
|
|
214
|
+
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
215
|
+
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* ======================
|
|
219
|
+
CARD COMPONENT
|
|
220
|
+
====================== */
|
|
221
|
+
.moonui-card-base {
|
|
222
|
+
@apply rounded-lg border bg-card text-card-foreground shadow-sm;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.moonui-card-header {
|
|
226
|
+
@apply flex flex-col space-y-1.5 p-6;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.moonui-card-title {
|
|
230
|
+
@apply text-2xl font-semibold leading-none tracking-tight;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.moonui-card-description {
|
|
234
|
+
@apply text-sm text-muted-foreground;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.moonui-card-content {
|
|
238
|
+
@apply p-6 pt-0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.moonui-card-footer {
|
|
242
|
+
@apply flex items-center p-6 pt-0;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* ======================
|
|
246
|
+
INPUT COMPONENT
|
|
247
|
+
====================== */
|
|
248
|
+
.moonui-input-base {
|
|
249
|
+
@apply flex h-10 w-full rounded-md border border-input bg-background px-3 py-2;
|
|
250
|
+
@apply text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium;
|
|
251
|
+
@apply placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2;
|
|
252
|
+
@apply focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* ======================
|
|
256
|
+
LABEL COMPONENT
|
|
257
|
+
====================== */
|
|
258
|
+
.moonui-label-base {
|
|
259
|
+
@apply text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* ======================
|
|
263
|
+
DIALOG COMPONENT
|
|
264
|
+
====================== */
|
|
265
|
+
.moonui-dialog-overlay {
|
|
266
|
+
@apply fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out;
|
|
267
|
+
@apply data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.moonui-dialog-content {
|
|
271
|
+
@apply fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%];
|
|
272
|
+
@apply gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in;
|
|
273
|
+
@apply data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0;
|
|
274
|
+
@apply data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2;
|
|
275
|
+
@apply data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2;
|
|
276
|
+
@apply data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* ======================
|
|
280
|
+
ALERT COMPONENT
|
|
281
|
+
====================== */
|
|
282
|
+
.moonui-alert-base {
|
|
283
|
+
@apply relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute;
|
|
284
|
+
@apply [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.moonui-alert-destructive {
|
|
288
|
+
@apply border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* ======================
|
|
292
|
+
BADGE COMPONENT
|
|
293
|
+
====================== */
|
|
294
|
+
.moonui-badge-base {
|
|
295
|
+
@apply inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold;
|
|
296
|
+
@apply transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.moonui-badge-default {
|
|
300
|
+
@apply border-transparent bg-primary text-primary-foreground hover:bg-primary/80;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.moonui-badge-secondary {
|
|
304
|
+
@apply border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.moonui-badge-destructive {
|
|
308
|
+
@apply border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.moonui-badge-outline {
|
|
312
|
+
@apply text-foreground;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* ======================
|
|
316
|
+
TABLE COMPONENT
|
|
317
|
+
====================== */
|
|
318
|
+
.moonui-table-base {
|
|
319
|
+
@apply w-full caption-bottom text-sm;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.moonui-table-header {
|
|
323
|
+
@apply [&_tr]:border-b;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.moonui-table-body {
|
|
327
|
+
@apply [&_tr:last-child]:border-0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.moonui-table-footer {
|
|
331
|
+
@apply border-t bg-muted/50 font-medium [&>tr]:last:border-b-0;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.moonui-table-row {
|
|
335
|
+
@apply border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.moonui-table-head {
|
|
339
|
+
@apply h-12 px-4 text-left align-middle font-medium text-muted-foreground;
|
|
340
|
+
@apply [&:has([role=checkbox])]:pr-0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.moonui-table-cell {
|
|
344
|
+
@apply p-4 align-middle [&:has([role=checkbox])]:pr-0;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* ======================
|
|
348
|
+
SHEET COMPONENT
|
|
349
|
+
====================== */
|
|
350
|
+
.moonui-sheet-overlay {
|
|
351
|
+
@apply fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out;
|
|
352
|
+
@apply data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.moonui-sheet-content {
|
|
356
|
+
@apply fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out;
|
|
357
|
+
@apply data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300;
|
|
358
|
+
@apply data-[state=open]:duration-500;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* ======================
|
|
362
|
+
TOOLTIP COMPONENT
|
|
363
|
+
====================== */
|
|
364
|
+
.moonui-tooltip-content {
|
|
365
|
+
@apply z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground;
|
|
366
|
+
@apply shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out;
|
|
367
|
+
@apply data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95;
|
|
368
|
+
@apply data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2;
|
|
369
|
+
@apply data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* ======================
|
|
373
|
+
SCROLL AREA COMPONENT
|
|
374
|
+
====================== */
|
|
375
|
+
.moonui-scrollbar {
|
|
376
|
+
@apply flex touch-none select-none transition-colors;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.moonui-scrollbar-vertical {
|
|
380
|
+
@apply h-full w-2.5 border-l border-l-transparent p-[1px];
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.moonui-scrollbar-horizontal {
|
|
384
|
+
@apply h-2.5 w-full border-t border-t-transparent p-[1px];
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.moonui-scrollbar-thumb {
|
|
388
|
+
@apply relative flex-1 rounded-full bg-border;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* ======================
|
|
392
|
+
PROGRESS COMPONENT
|
|
393
|
+
====================== */
|
|
394
|
+
.moonui-progress-base {
|
|
395
|
+
@apply relative h-4 w-full overflow-hidden rounded-full bg-secondary;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.moonui-progress-indicator {
|
|
399
|
+
@apply h-full w-full flex-1 bg-primary transition-all;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* ======================
|
|
403
|
+
SWITCH COMPONENT
|
|
404
|
+
====================== */
|
|
405
|
+
.moonui-switch-base {
|
|
406
|
+
@apply peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2;
|
|
407
|
+
@apply border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2;
|
|
408
|
+
@apply focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;
|
|
409
|
+
@apply disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary;
|
|
410
|
+
@apply data-[state=unchecked]:bg-input;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.moonui-switch-thumb {
|
|
414
|
+
@apply pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0;
|
|
415
|
+
@apply transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* ======================
|
|
419
|
+
PRO COMPONENTS
|
|
420
|
+
====================== */
|
|
421
|
+
|
|
422
|
+
/* File Upload Component */
|
|
423
|
+
.moonui-file-upload-base {
|
|
424
|
+
@apply relative flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2;
|
|
425
|
+
@apply border-dashed border-muted-foreground/25 p-6 text-center transition-colors;
|
|
426
|
+
@apply hover:border-muted-foreground/50 hover:bg-muted/25;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.moonui-file-upload-active {
|
|
430
|
+
@apply border-primary bg-primary/5;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/* Data Table Component */
|
|
434
|
+
.moonui-data-table-base {
|
|
435
|
+
@apply relative w-full overflow-auto;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.moonui-data-table-header {
|
|
439
|
+
@apply border-b bg-muted/50;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.moonui-data-table-row {
|
|
443
|
+
@apply border-b transition-colors hover:bg-muted/50;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.moonui-data-table-cell {
|
|
447
|
+
@apply p-4 align-middle;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* Calendar Pro Component */
|
|
451
|
+
.moonui-calendar-pro-base {
|
|
452
|
+
@apply flex h-full w-full bg-background;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.moonui-calendar-sidebar {
|
|
456
|
+
@apply border-r bg-muted/30 flex flex-col flex-shrink-0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.moonui-calendar-event {
|
|
460
|
+
@apply absolute left-0 right-0 rounded px-2 py-1 text-xs;
|
|
461
|
+
@apply cursor-pointer transition-colors hover:opacity-80;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* Chart Components */
|
|
465
|
+
.moonui-chart-container {
|
|
466
|
+
@apply relative w-full;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.moonui-chart-tooltip {
|
|
470
|
+
@apply rounded-lg border bg-background px-3 py-2 text-sm shadow-md;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.moonui-chart-legend {
|
|
474
|
+
@apply flex items-center justify-center gap-4 text-sm;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/* Gesture Drawer Component */
|
|
478
|
+
.moonui-gesture-drawer-base {
|
|
479
|
+
@apply fixed bg-background shadow-2xl overflow-hidden;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.moonui-gesture-drawer-handle {
|
|
483
|
+
@apply absolute bg-muted-foreground/20 transition-all duration-200;
|
|
484
|
+
@apply cursor-grab active:cursor-grabbing;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.moonui-gesture-drawer-backdrop {
|
|
488
|
+
@apply fixed inset-0 bg-black/50 backdrop-blur-sm;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* Hover Card 3D Component */
|
|
492
|
+
.moonui-hover-card-3d-base {
|
|
493
|
+
@apply relative rounded-lg border bg-card text-card-foreground shadow-sm;
|
|
494
|
+
@apply transition-all duration-200 will-change-transform;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/* Media Gallery Component */
|
|
498
|
+
.moonui-media-gallery-base {
|
|
499
|
+
@apply grid gap-4;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.moonui-media-gallery-item {
|
|
503
|
+
@apply relative overflow-hidden rounded-lg bg-muted;
|
|
504
|
+
@apply cursor-pointer transition-transform hover:scale-105;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.moonui-media-gallery-overlay {
|
|
508
|
+
@apply absolute inset-0 bg-black/60 opacity-0 transition-opacity;
|
|
509
|
+
@apply flex items-center justify-center hover:opacity-100;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* Tags Input Component */
|
|
513
|
+
.moonui-tags-input-base {
|
|
514
|
+
@apply min-h-10 w-full rounded-md border border-input bg-background px-3 py-2;
|
|
515
|
+
@apply text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring;
|
|
516
|
+
@apply focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.moonui-tags-input-tag {
|
|
520
|
+
@apply inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold;
|
|
521
|
+
@apply transition-colors bg-secondary text-secondary-foreground hover:bg-secondary/80;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.moonui-tags-input-remove {
|
|
525
|
+
@apply ml-1 h-3 w-3 rounded-full outline-none ring-offset-background;
|
|
526
|
+
@apply focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:bg-destructive hover:text-destructive-foreground;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/* Advanced Chart Components */
|
|
530
|
+
.moonui-advanced-chart-base {
|
|
531
|
+
@apply w-full rounded-lg border bg-card p-6;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.moonui-advanced-chart-header {
|
|
535
|
+
@apply mb-4 flex items-center justify-between;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.moonui-advanced-chart-title {
|
|
539
|
+
@apply text-lg font-semibold;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.moonui-advanced-chart-controls {
|
|
543
|
+
@apply flex items-center gap-2;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/* Pro Access Control */
|
|
547
|
+
.moonui-pro-upgrade-card {
|
|
548
|
+
@apply w-fit mx-auto rounded-lg border bg-card text-card-foreground shadow-sm;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.moonui-pro-upgrade-content {
|
|
552
|
+
@apply py-6 text-center;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.moonui-pro-upgrade-icon {
|
|
556
|
+
@apply rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.moonui-pro-upgrade-title {
|
|
560
|
+
@apply font-semibold text-sm mb-2;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.moonui-pro-upgrade-description {
|
|
564
|
+
@apply text-muted-foreground text-xs mb-4;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/* Loading States */
|
|
568
|
+
.moonui-loading-spinner {
|
|
569
|
+
@apply h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.moonui-loading-skeleton {
|
|
573
|
+
@apply animate-pulse rounded-md bg-muted;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/* Form Components */
|
|
577
|
+
.moonui-form-field {
|
|
578
|
+
@apply space-y-2;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.moonui-form-label {
|
|
582
|
+
@apply text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.moonui-form-description {
|
|
586
|
+
@apply text-sm text-muted-foreground;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.moonui-form-message {
|
|
590
|
+
@apply text-sm font-medium text-destructive;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/* Animation Utilities */
|
|
594
|
+
.moonui-fade-in {
|
|
595
|
+
@apply animate-in fade-in-0 duration-200;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.moonui-fade-out {
|
|
599
|
+
@apply animate-out fade-out-0 duration-200;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.moonui-slide-in-bottom {
|
|
603
|
+
@apply animate-in slide-in-from-bottom-2 duration-200;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.moonui-slide-out-bottom {
|
|
607
|
+
@apply animate-out slide-out-to-bottom-2 duration-200;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.moonui-zoom-in {
|
|
611
|
+
@apply animate-in zoom-in-95 duration-200;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.moonui-zoom-out {
|
|
615
|
+
@apply animate-out zoom-out-95 duration-200;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
23
619
|
/* Dashboard Grid Layout Overrides */
|
|
24
620
|
.react-grid-layout {
|
|
25
621
|
position: relative !important;
|
|
@@ -136,7 +136,7 @@ export function useDebouncePerformance<T extends (...args: any[]) => void>(
|
|
|
136
136
|
callback: T,
|
|
137
137
|
delay: number = 300
|
|
138
138
|
): T {
|
|
139
|
-
const timeoutRef = React.useRef<NodeJS.Timeout>();
|
|
139
|
+
const timeoutRef = React.useRef<NodeJS.Timeout | undefined>(undefined);
|
|
140
140
|
|
|
141
141
|
const debouncedCallback = React.useCallback(
|
|
142
142
|
(...args: Parameters<T>) => {
|