@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.
- package/package.json +8 -3
- package/plugin/index.d.ts +86 -0
- package/plugin/index.js +308 -0
- package/scripts/postinstall.js +191 -23
- package/src/components/advanced-chart/index.tsx +0 -1246
- package/src/components/advanced-forms/index.tsx +0 -585
- package/src/components/animated-button/index.tsx +0 -385
- package/src/components/calendar/event-dialog.tsx +0 -377
- package/src/components/calendar/index.tsx +0 -1220
- 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 -480
- 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 -225
- package/src/components/dashboard/widgets/activity-feed.tsx +0 -349
- package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
- package/src/components/dashboard/widgets/comparison-widget.tsx +0 -177
- package/src/components/dashboard/widgets/index.ts +0 -5
- package/src/components/dashboard/widgets/metric-card.tsx +0 -363
- package/src/components/dashboard/widgets/progress-widget.tsx +0 -113
- 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/index.tsx +0 -845
- package/src/components/draggable-list/index.tsx +0 -100
- package/src/components/error-boundary/index.tsx +0 -232
- 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 -335
- package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
- package/src/components/form-wizard/form-wizard-progress.tsx +0 -329
- 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 -77
- 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 -517
- 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 -515
- package/src/components/health-check/index.tsx +0 -439
- package/src/components/hover-card-3d/index.tsx +0 -529
- package/src/components/index.ts +0 -130
- 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 -1689
- 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 -31
- package/src/components/magnetic-button/index.tsx +0 -216
- package/src/components/memory-efficient-data/index.tsx +0 -1018
- package/src/components/moonui-quiz-form/index.tsx +0 -817
- package/src/components/navbar/index.tsx +0 -781
- package/src/components/optimized-image/index.tsx +0 -425
- package/src/components/performance-debugger/index.tsx +0 -613
- package/src/components/performance-monitor/index.tsx +0 -808
- package/src/components/phone-number-input/index.tsx +0 -343
- package/src/components/phone-number-input/phone-number-input-simple.tsx +0 -167
- 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.tsx +0 -2322
- package/src/components/rich-text-editor/slash-commands-extension.ts +0 -230
- 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 -884
- 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 -1183
- package/src/components/ui/accordion.tsx +0 -581
- 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 -155
- package/src/components/ui/badge.tsx +0 -230
- package/src/components/ui/breadcrumb.tsx +0 -216
- package/src/components/ui/button.tsx +0 -228
- package/src/components/ui/calendar.tsx +0 -387
- package/src/components/ui/card.tsx +0 -216
- package/src/components/ui/checkbox.tsx +0 -259
- package/src/components/ui/collapsible.tsx +0 -631
- package/src/components/ui/color-picker.tsx +0 -97
- package/src/components/ui/command.tsx +0 -948
- package/src/components/ui/dialog.tsx +0 -752
- package/src/components/ui/dropdown-menu.tsx +0 -706
- 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 -222
- package/src/components/ui/input.tsx +0 -224
- 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 -611
- package/src/components/ui/navigation-menu.tsx +0 -130
- package/src/components/ui/pagination.tsx +0 -125
- 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 -378
- 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 -331
- package/src/components/ui/tabs-pro.tsx +0 -542
- package/src/components/ui/tabs.tsx +0 -54
- 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 -22
- 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 -681
- package/src/styles/tailwind.css +0 -7
- package/src/styles/tokens.css +0 -455
- 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
package/src/styles/tokens.css
DELETED
|
@@ -1,455 +0,0 @@
|
|
|
1
|
-
/* MoonUI Design Tokens */
|
|
2
|
-
|
|
3
|
-
/* Scoped to moonui-pro components only */
|
|
4
|
-
.moonui-pro {
|
|
5
|
-
/* === COLOR SYSTEM === */
|
|
6
|
-
|
|
7
|
-
/* Primary Colors */
|
|
8
|
-
--primary-50: 240 249 255;
|
|
9
|
-
--primary-100: 224 242 254;
|
|
10
|
-
--primary-200: 186 230 253;
|
|
11
|
-
--primary-300: 125 211 252;
|
|
12
|
-
--primary-400: 56 189 248;
|
|
13
|
-
--primary-500: 14 165 233;
|
|
14
|
-
--primary-600: 2 132 199;
|
|
15
|
-
--primary-700: 3 105 161;
|
|
16
|
-
--primary-800: 7 89 133;
|
|
17
|
-
--primary-900: 12 74 110;
|
|
18
|
-
--primary-950: 8 47 73;
|
|
19
|
-
|
|
20
|
-
/* Secondary Colors */
|
|
21
|
-
--secondary-50: 248 250 252;
|
|
22
|
-
--secondary-100: 241 245 249;
|
|
23
|
-
--secondary-200: 226 232 240;
|
|
24
|
-
--secondary-300: 203 213 225;
|
|
25
|
-
--secondary-400: 148 163 184;
|
|
26
|
-
--secondary-500: 100 116 139;
|
|
27
|
-
--secondary-600: 71 85 105;
|
|
28
|
-
--secondary-700: 51 65 85;
|
|
29
|
-
--secondary-800: 30 41 59;
|
|
30
|
-
--secondary-900: 15 23 42;
|
|
31
|
-
--secondary-950: 2 6 23;
|
|
32
|
-
|
|
33
|
-
/* Semantic Colors */
|
|
34
|
-
--success-50: 240 253 244;
|
|
35
|
-
--success-100: 220 252 231;
|
|
36
|
-
--success-200: 187 247 208;
|
|
37
|
-
--success-300: 134 239 172;
|
|
38
|
-
--success-400: 74 222 128;
|
|
39
|
-
--success-500: 34 197 94;
|
|
40
|
-
--success-600: 22 163 74;
|
|
41
|
-
--success-700: 21 128 61;
|
|
42
|
-
--success-800: 22 101 52;
|
|
43
|
-
--success-900: 20 83 45;
|
|
44
|
-
--success-950: 5 46 22;
|
|
45
|
-
|
|
46
|
-
--warning-50: 254 252 232;
|
|
47
|
-
--warning-100: 254 249 195;
|
|
48
|
-
--warning-200: 254 240 138;
|
|
49
|
-
--warning-300: 253 224 71;
|
|
50
|
-
--warning-400: 250 204 21;
|
|
51
|
-
--warning-500: 234 179 8;
|
|
52
|
-
--warning-600: 202 138 4;
|
|
53
|
-
--warning-700: 161 98 7;
|
|
54
|
-
--warning-800: 133 77 14;
|
|
55
|
-
--warning-900: 113 63 18;
|
|
56
|
-
--warning-950: 66 32 6;
|
|
57
|
-
|
|
58
|
-
--error-50: 254 242 242;
|
|
59
|
-
--error-100: 254 226 226;
|
|
60
|
-
--error-200: 254 202 202;
|
|
61
|
-
--error-300: 252 165 165;
|
|
62
|
-
--error-400: 248 113 113;
|
|
63
|
-
--error-500: 239 68 68;
|
|
64
|
-
--error-600: 220 38 38;
|
|
65
|
-
--error-700: 185 28 28;
|
|
66
|
-
--error-800: 153 27 27;
|
|
67
|
-
--error-900: 127 29 29;
|
|
68
|
-
--error-950: 69 10 10;
|
|
69
|
-
|
|
70
|
-
/* Theme Colors */
|
|
71
|
-
--background: 0 0% 100%;
|
|
72
|
-
--foreground: 222.2 47.4% 11.2%;
|
|
73
|
-
--card: 0 0% 100%;
|
|
74
|
-
--card-foreground: 222.2 47.4% 11.2%;
|
|
75
|
-
--popover: 0 0% 100%;
|
|
76
|
-
--popover-foreground: 222.2 47.4% 11.2%;
|
|
77
|
-
--primary: 222.2 47.4% 11.2%;
|
|
78
|
-
--primary-foreground: 210 40% 98%;
|
|
79
|
-
--secondary: 210 40% 96%;
|
|
80
|
-
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
81
|
-
--muted: 210 40% 96%;
|
|
82
|
-
--muted-foreground: 215.4 16.3% 46.9%;
|
|
83
|
-
--accent: 210 40% 96%;
|
|
84
|
-
--accent-foreground: 222.2 47.4% 11.2%;
|
|
85
|
-
--destructive: 0 100% 50%;
|
|
86
|
-
--destructive-foreground: 210 40% 98%;
|
|
87
|
-
--border: 214.3 31.8% 91.4%;
|
|
88
|
-
--input: 214.3 31.8% 91.4%;
|
|
89
|
-
--ring: 215 20.2% 65.1%;
|
|
90
|
-
--chart-1: 12 76% 61%;
|
|
91
|
-
--chart-2: 173 58% 39%;
|
|
92
|
-
--chart-3: 197 37% 24%;
|
|
93
|
-
--chart-4: 43 74% 66%;
|
|
94
|
-
--chart-5: 27 87% 67%;
|
|
95
|
-
|
|
96
|
-
/* === TYPOGRAPHY === */
|
|
97
|
-
|
|
98
|
-
/* Font Families */
|
|
99
|
-
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
100
|
-
--font-serif: 'Crimson Text', Georgia, 'Times New Roman', serif;
|
|
101
|
-
--font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
|
|
102
|
-
|
|
103
|
-
/* Font Sizes */
|
|
104
|
-
--text-xs: 0.75rem; /* 12px */
|
|
105
|
-
--text-sm: 0.875rem; /* 14px */
|
|
106
|
-
--text-base: 1rem; /* 16px */
|
|
107
|
-
--text-lg: 1.125rem; /* 18px */
|
|
108
|
-
--text-xl: 1.25rem; /* 20px */
|
|
109
|
-
--text-2xl: 1.5rem; /* 24px */
|
|
110
|
-
--text-3xl: 1.875rem; /* 30px */
|
|
111
|
-
--text-4xl: 2.25rem; /* 36px */
|
|
112
|
-
--text-5xl: 3rem; /* 48px */
|
|
113
|
-
--text-6xl: 3.75rem; /* 60px */
|
|
114
|
-
--text-7xl: 4.5rem; /* 72px */
|
|
115
|
-
--text-8xl: 6rem; /* 96px */
|
|
116
|
-
--text-9xl: 8rem; /* 128px */
|
|
117
|
-
|
|
118
|
-
/* Line Heights */
|
|
119
|
-
--leading-none: 1;
|
|
120
|
-
--leading-tight: 1.25;
|
|
121
|
-
--leading-snug: 1.375;
|
|
122
|
-
--leading-normal: 1.5;
|
|
123
|
-
--leading-relaxed: 1.625;
|
|
124
|
-
--leading-loose: 2;
|
|
125
|
-
|
|
126
|
-
/* Font Weights */
|
|
127
|
-
--font-thin: 100;
|
|
128
|
-
--font-extralight: 200;
|
|
129
|
-
--font-light: 300;
|
|
130
|
-
--font-normal: 400;
|
|
131
|
-
--font-medium: 500;
|
|
132
|
-
--font-semibold: 600;
|
|
133
|
-
--font-bold: 700;
|
|
134
|
-
--font-extrabold: 800;
|
|
135
|
-
--font-black: 900;
|
|
136
|
-
|
|
137
|
-
/* === SPACING SYSTEM === */
|
|
138
|
-
|
|
139
|
-
--spacing-0: 0;
|
|
140
|
-
--spacing-px: 1px;
|
|
141
|
-
--spacing-0-5: 0.125rem; /* 2px */
|
|
142
|
-
--spacing-1: 0.25rem; /* 4px */
|
|
143
|
-
--spacing-1-5: 0.375rem; /* 6px */
|
|
144
|
-
--spacing-2: 0.5rem; /* 8px */
|
|
145
|
-
--spacing-2-5: 0.625rem; /* 10px */
|
|
146
|
-
--spacing-3: 0.75rem; /* 12px */
|
|
147
|
-
--spacing-3-5: 0.875rem; /* 14px */
|
|
148
|
-
--spacing-4: 1rem; /* 16px */
|
|
149
|
-
--spacing-5: 1.25rem; /* 20px */
|
|
150
|
-
--spacing-6: 1.5rem; /* 24px */
|
|
151
|
-
--spacing-7: 1.75rem; /* 28px */
|
|
152
|
-
--spacing-8: 2rem; /* 32px */
|
|
153
|
-
--spacing-9: 2.25rem; /* 36px */
|
|
154
|
-
--spacing-10: 2.5rem; /* 40px */
|
|
155
|
-
--spacing-11: 2.75rem; /* 44px */
|
|
156
|
-
--spacing-12: 3rem; /* 48px */
|
|
157
|
-
--spacing-14: 3.5rem; /* 56px */
|
|
158
|
-
--spacing-16: 4rem; /* 64px */
|
|
159
|
-
--spacing-20: 5rem; /* 80px */
|
|
160
|
-
--spacing-24: 6rem; /* 96px */
|
|
161
|
-
--spacing-28: 7rem; /* 112px */
|
|
162
|
-
--spacing-32: 8rem; /* 128px */
|
|
163
|
-
--spacing-36: 9rem; /* 144px */
|
|
164
|
-
--spacing-40: 10rem; /* 160px */
|
|
165
|
-
--spacing-44: 11rem; /* 176px */
|
|
166
|
-
--spacing-48: 12rem; /* 192px */
|
|
167
|
-
--spacing-52: 13rem; /* 208px */
|
|
168
|
-
--spacing-56: 14rem; /* 224px */
|
|
169
|
-
--spacing-60: 15rem; /* 240px */
|
|
170
|
-
--spacing-64: 16rem; /* 256px */
|
|
171
|
-
--spacing-72: 18rem; /* 288px */
|
|
172
|
-
--spacing-80: 20rem; /* 320px */
|
|
173
|
-
--spacing-96: 24rem; /* 384px */
|
|
174
|
-
|
|
175
|
-
/* === BORDER RADIUS === */
|
|
176
|
-
|
|
177
|
-
--radius-none: 0;
|
|
178
|
-
--radius-sm: 0.125rem; /* 2px */
|
|
179
|
-
--radius-base: 0.25rem; /* 4px */
|
|
180
|
-
--radius-md: 0.375rem; /* 6px */
|
|
181
|
-
--radius-lg: 0.5rem; /* 8px */
|
|
182
|
-
--radius-xl: 0.75rem; /* 12px */
|
|
183
|
-
--radius-2xl: 1rem; /* 16px */
|
|
184
|
-
--radius-3xl: 1.5rem; /* 24px */
|
|
185
|
-
--radius-full: 9999px;
|
|
186
|
-
|
|
187
|
-
/* === SHADOWS & ELEVATION === */
|
|
188
|
-
|
|
189
|
-
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
190
|
-
--shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
|
191
|
-
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
192
|
-
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
193
|
-
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
194
|
-
--shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
195
|
-
--shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
|
|
196
|
-
--shadow-none: 0 0 #0000;
|
|
197
|
-
|
|
198
|
-
/* Elevation System */
|
|
199
|
-
--elevation-0: var(--shadow-none);
|
|
200
|
-
--elevation-1: var(--shadow-sm);
|
|
201
|
-
--elevation-2: var(--shadow-base);
|
|
202
|
-
--elevation-3: var(--shadow-md);
|
|
203
|
-
--elevation-4: var(--shadow-lg);
|
|
204
|
-
--elevation-5: var(--shadow-xl);
|
|
205
|
-
--elevation-6: var(--shadow-2xl);
|
|
206
|
-
|
|
207
|
-
/* === ANIMATION SYSTEM === */
|
|
208
|
-
|
|
209
|
-
/* Duration Scale */
|
|
210
|
-
--duration-75: 75ms;
|
|
211
|
-
--duration-100: 100ms;
|
|
212
|
-
--duration-150: 150ms;
|
|
213
|
-
--duration-200: 200ms;
|
|
214
|
-
--duration-300: 300ms;
|
|
215
|
-
--duration-500: 500ms;
|
|
216
|
-
--duration-700: 700ms;
|
|
217
|
-
--duration-1000: 1000ms;
|
|
218
|
-
|
|
219
|
-
/* Easing Functions */
|
|
220
|
-
--ease-linear: linear;
|
|
221
|
-
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
222
|
-
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
223
|
-
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
224
|
-
--ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
225
|
-
--ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
226
|
-
|
|
227
|
-
/* Animation Presets */
|
|
228
|
-
--animate-fade-in: fadeIn var(--duration-300) var(--ease-out);
|
|
229
|
-
--animate-fade-out: fadeOut var(--duration-300) var(--ease-in);
|
|
230
|
-
--animate-slide-in-up: slideInUp var(--duration-300) var(--ease-out);
|
|
231
|
-
--animate-slide-in-down: slideInDown var(--duration-300) var(--ease-out);
|
|
232
|
-
--animate-slide-in-left: slideInLeft var(--duration-300) var(--ease-out);
|
|
233
|
-
--animate-slide-in-right: slideInRight var(--duration-300) var(--ease-out);
|
|
234
|
-
--animate-scale-in: scaleIn var(--duration-200) var(--ease-out);
|
|
235
|
-
--animate-scale-out: scaleOut var(--duration-200) var(--ease-in);
|
|
236
|
-
--animate-bounce: bounce var(--duration-500) var(--ease-bounce);
|
|
237
|
-
--animate-pulse: pulse var(--duration-1000) var(--ease-in-out) infinite;
|
|
238
|
-
--animate-spin: spin var(--duration-1000) var(--ease-linear) infinite;
|
|
239
|
-
|
|
240
|
-
/* === BREAKPOINTS === */
|
|
241
|
-
|
|
242
|
-
--breakpoint-sm: 640px;
|
|
243
|
-
--breakpoint-md: 768px;
|
|
244
|
-
--breakpoint-lg: 1024px;
|
|
245
|
-
--breakpoint-xl: 1280px;
|
|
246
|
-
--breakpoint-2xl: 1536px;
|
|
247
|
-
|
|
248
|
-
/* Container Sizes */
|
|
249
|
-
--container-sm: 640px;
|
|
250
|
-
--container-md: 768px;
|
|
251
|
-
--container-lg: 1024px;
|
|
252
|
-
--container-xl: 1280px;
|
|
253
|
-
--container-2xl: 1536px;
|
|
254
|
-
|
|
255
|
-
/* === Z-INDEX SCALE === */
|
|
256
|
-
|
|
257
|
-
--z-0: 0;
|
|
258
|
-
--z-10: 10;
|
|
259
|
-
--z-20: 20;
|
|
260
|
-
--z-30: 30;
|
|
261
|
-
--z-40: 40;
|
|
262
|
-
--z-50: 50;
|
|
263
|
-
--z-auto: auto;
|
|
264
|
-
|
|
265
|
-
/* Semantic Z-Index */
|
|
266
|
-
--z-dropdown: 1000;
|
|
267
|
-
--z-sticky: 1020;
|
|
268
|
-
--z-fixed: 1030;
|
|
269
|
-
--z-modal-backdrop: 1040;
|
|
270
|
-
--z-modal: 1050;
|
|
271
|
-
--z-popover: 1060;
|
|
272
|
-
--z-tooltip: 1070;
|
|
273
|
-
--z-toast: 1080;
|
|
274
|
-
|
|
275
|
-
/* === COMPONENT-SPECIFIC TOKENS === */
|
|
276
|
-
|
|
277
|
-
/* Button Tokens */
|
|
278
|
-
--button-height-sm: 2rem; /* 32px */
|
|
279
|
-
--button-height-md: 2.5rem; /* 40px */
|
|
280
|
-
--button-height-lg: 3rem; /* 48px */
|
|
281
|
-
--button-height-xl: 3.5rem; /* 56px */
|
|
282
|
-
|
|
283
|
-
--button-padding-sm: 0.5rem 0.75rem;
|
|
284
|
-
--button-padding-md: 0.625rem 1rem;
|
|
285
|
-
--button-padding-lg: 0.75rem 1.25rem;
|
|
286
|
-
--button-padding-xl: 1rem 1.5rem;
|
|
287
|
-
|
|
288
|
-
--button-font-size-sm: var(--text-sm);
|
|
289
|
-
--button-font-size-md: var(--text-base);
|
|
290
|
-
--button-font-size-lg: var(--text-lg);
|
|
291
|
-
--button-font-size-xl: var(--text-xl);
|
|
292
|
-
|
|
293
|
-
/* Input Tokens */
|
|
294
|
-
--input-height-sm: 2rem; /* 32px */
|
|
295
|
-
--input-height-md: 2.5rem; /* 40px */
|
|
296
|
-
--input-height-lg: 3rem; /* 48px */
|
|
297
|
-
--input-height-xl: 3.5rem; /* 56px */
|
|
298
|
-
|
|
299
|
-
--input-padding-sm: 0.5rem 0.75rem;
|
|
300
|
-
--input-padding-md: 0.625rem 1rem;
|
|
301
|
-
--input-padding-lg: 0.75rem 1.25rem;
|
|
302
|
-
--input-padding-xl: 1rem 1.5rem;
|
|
303
|
-
|
|
304
|
-
--input-border-width: 1px;
|
|
305
|
-
--input-border-radius: var(--radius-md);
|
|
306
|
-
--input-focus-ring-width: 2px;
|
|
307
|
-
--input-focus-ring-offset: 2px;
|
|
308
|
-
|
|
309
|
-
/* Card Tokens */
|
|
310
|
-
--card-padding-sm: 1rem;
|
|
311
|
-
--card-padding-md: 1.5rem;
|
|
312
|
-
--card-padding-lg: 2rem;
|
|
313
|
-
--card-padding-xl: 2.5rem;
|
|
314
|
-
|
|
315
|
-
--card-border-radius: var(--radius-lg);
|
|
316
|
-
--card-border-width: 1px;
|
|
317
|
-
--card-shadow: var(--elevation-1);
|
|
318
|
-
--card-hover-shadow: var(--elevation-2);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/* === DARK MODE === */
|
|
322
|
-
|
|
323
|
-
.moonui-pro.dark,
|
|
324
|
-
.dark .moonui-pro {
|
|
325
|
-
--background: 224 71% 4%;
|
|
326
|
-
--foreground: 213 31% 91%;
|
|
327
|
-
--card: 224 71% 4%;
|
|
328
|
-
--card-foreground: 213 31% 91%;
|
|
329
|
-
--popover: 224 71% 4%;
|
|
330
|
-
--popover-foreground: 213 31% 91%;
|
|
331
|
-
--primary: 210 40% 98%;
|
|
332
|
-
--primary-foreground: 222.2 47.4% 1.2%;
|
|
333
|
-
--secondary: 222.2 84% 4.9%;
|
|
334
|
-
--secondary-foreground: 210 40% 98%;
|
|
335
|
-
--muted: 223 47% 11%;
|
|
336
|
-
--muted-foreground: 215.4 16.3% 56.9%;
|
|
337
|
-
--accent: 216 34% 17%;
|
|
338
|
-
--accent-foreground: 210 40% 98%;
|
|
339
|
-
--destructive: 0 63% 31%;
|
|
340
|
-
--destructive-foreground: 210 40% 98%;
|
|
341
|
-
--border: 216 34% 17%;
|
|
342
|
-
--input: 216 34% 17%;
|
|
343
|
-
--ring: 216 34% 17%;
|
|
344
|
-
--chart-1: 220 70% 50%;
|
|
345
|
-
--chart-2: 160 60% 45%;
|
|
346
|
-
--chart-3: 30 80% 55%;
|
|
347
|
-
--chart-4: 280 65% 60%;
|
|
348
|
-
--chart-5: 340 75% 55%;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/* === KEYFRAMES === */
|
|
352
|
-
|
|
353
|
-
@keyframes fadeIn {
|
|
354
|
-
from { opacity: 0; }
|
|
355
|
-
to { opacity: 1; }
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
@keyframes fadeOut {
|
|
359
|
-
from { opacity: 1; }
|
|
360
|
-
to { opacity: 0; }
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
@keyframes slideInUp {
|
|
364
|
-
from { transform: translateY(100%); opacity: 0; }
|
|
365
|
-
to { transform: translateY(0); opacity: 1; }
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
@keyframes slideInDown {
|
|
369
|
-
from { transform: translateY(-100%); opacity: 0; }
|
|
370
|
-
to { transform: translateY(0); opacity: 1; }
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
@keyframes slideInLeft {
|
|
374
|
-
from { transform: translateX(-100%); opacity: 0; }
|
|
375
|
-
to { transform: translateX(0); opacity: 1; }
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
@keyframes slideInRight {
|
|
379
|
-
from { transform: translateX(100%); opacity: 0; }
|
|
380
|
-
to { transform: translateX(0); opacity: 1; }
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
@keyframes scaleIn {
|
|
384
|
-
from { transform: scale(0.95); opacity: 0; }
|
|
385
|
-
to { transform: scale(1); opacity: 1; }
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
@keyframes scaleOut {
|
|
389
|
-
from { transform: scale(1); opacity: 1; }
|
|
390
|
-
to { transform: scale(0.95); opacity: 0; }
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
@keyframes bounce {
|
|
394
|
-
0%, 20%, 53%, 80%, 100% {
|
|
395
|
-
transform: translate3d(0, 0, 0);
|
|
396
|
-
}
|
|
397
|
-
40%, 43% {
|
|
398
|
-
transform: translate3d(0, -30px, 0);
|
|
399
|
-
}
|
|
400
|
-
70% {
|
|
401
|
-
transform: translate3d(0, -15px, 0);
|
|
402
|
-
}
|
|
403
|
-
90% {
|
|
404
|
-
transform: translate3d(0, -4px, 0);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
@keyframes pulse {
|
|
409
|
-
0%, 100% { opacity: 1; }
|
|
410
|
-
50% { opacity: 0.5; }
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
@keyframes spin {
|
|
414
|
-
to { transform: rotate(360deg); }
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/* === UTILITY CLASSES === */
|
|
418
|
-
|
|
419
|
-
.animate-fade-in { animation: var(--animate-fade-in); }
|
|
420
|
-
.animate-fade-out { animation: var(--animate-fade-out); }
|
|
421
|
-
.animate-slide-in-up { animation: var(--animate-slide-in-up); }
|
|
422
|
-
.animate-slide-in-down { animation: var(--animate-slide-in-down); }
|
|
423
|
-
.animate-slide-in-left { animation: var(--animate-slide-in-left); }
|
|
424
|
-
.animate-slide-in-right { animation: var(--animate-slide-in-right); }
|
|
425
|
-
.animate-scale-in { animation: var(--animate-scale-in); }
|
|
426
|
-
.animate-scale-out { animation: var(--animate-scale-out); }
|
|
427
|
-
.animate-bounce { animation: var(--animate-bounce); }
|
|
428
|
-
.animate-pulse { animation: var(--animate-pulse); }
|
|
429
|
-
.animate-spin { animation: var(--animate-spin); }
|
|
430
|
-
|
|
431
|
-
/* === RESPONSIVE UTILITIES === */
|
|
432
|
-
|
|
433
|
-
@media (max-width: 639px) {
|
|
434
|
-
.container { max-width: 100%; }
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
@media (min-width: 640px) {
|
|
438
|
-
.container { max-width: var(--container-sm); }
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
@media (min-width: 768px) {
|
|
442
|
-
.container { max-width: var(--container-md); }
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
@media (min-width: 1024px) {
|
|
446
|
-
.container { max-width: var(--container-lg); }
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
@media (min-width: 1280px) {
|
|
450
|
-
.container { max-width: var(--container-xl); }
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
@media (min-width: 1536px) {
|
|
454
|
-
.container { max-width: var(--container-2xl); }
|
|
455
|
-
}
|
package/src/types/next-auth.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { DefaultSession } from "next-auth";
|
|
2
|
-
|
|
3
|
-
declare module "next-auth" {
|
|
4
|
-
interface User {
|
|
5
|
-
id: string;
|
|
6
|
-
email?: string | null;
|
|
7
|
-
name?: string | null;
|
|
8
|
-
image?: string | null;
|
|
9
|
-
role?: string;
|
|
10
|
-
subscription?: {
|
|
11
|
-
status: string;
|
|
12
|
-
plan?: string;
|
|
13
|
-
currentPeriodEnd?: string;
|
|
14
|
-
expiresAt?: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface Session extends DefaultSession {
|
|
19
|
-
user: User;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
interface UseIntersectionObserverOptions extends IntersectionObserverInit {
|
|
6
|
-
freezeOnceVisible?: boolean;
|
|
7
|
-
initialIsIntersecting?: boolean;
|
|
8
|
-
onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function useIntersectionObserver({
|
|
12
|
-
threshold = 0,
|
|
13
|
-
root = null,
|
|
14
|
-
rootMargin = "0%",
|
|
15
|
-
freezeOnceVisible = false,
|
|
16
|
-
initialIsIntersecting = false,
|
|
17
|
-
onChange,
|
|
18
|
-
}: UseIntersectionObserverOptions = {}) {
|
|
19
|
-
const [ref, setRef] = React.useState<Element | null>(null);
|
|
20
|
-
const [isIntersecting, setIsIntersecting] = React.useState(initialIsIntersecting);
|
|
21
|
-
const frozen = React.useRef(false);
|
|
22
|
-
|
|
23
|
-
React.useEffect(() => {
|
|
24
|
-
if (!ref || !window.IntersectionObserver || (frozen.current && freezeOnceVisible)) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const observer = new IntersectionObserver(
|
|
29
|
-
([entry]) => {
|
|
30
|
-
const isElementIntersecting = entry.isIntersecting;
|
|
31
|
-
setIsIntersecting(isElementIntersecting);
|
|
32
|
-
onChange?.(isElementIntersecting, entry);
|
|
33
|
-
|
|
34
|
-
if (isElementIntersecting && freezeOnceVisible) {
|
|
35
|
-
frozen.current = true;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{ threshold, root, rootMargin }
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
observer.observe(ref);
|
|
42
|
-
|
|
43
|
-
return () => observer.disconnect();
|
|
44
|
-
}, [ref, threshold, root, rootMargin, freezeOnceVisible, onChange]);
|
|
45
|
-
|
|
46
|
-
return { ref: setRef, isIntersecting };
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Lazy load component wrapper
|
|
50
|
-
interface LazyLoadProps {
|
|
51
|
-
children: React.ReactNode;
|
|
52
|
-
placeholder?: React.ReactNode;
|
|
53
|
-
threshold?: number;
|
|
54
|
-
rootMargin?: string;
|
|
55
|
-
className?: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function LazyLoad({
|
|
59
|
-
children,
|
|
60
|
-
placeholder = <div className="h-20 bg-muted animate-pulse rounded" />,
|
|
61
|
-
threshold = 0.1,
|
|
62
|
-
rootMargin = "50px",
|
|
63
|
-
className,
|
|
64
|
-
}: LazyLoadProps) {
|
|
65
|
-
const { ref, isIntersecting } = useIntersectionObserver({
|
|
66
|
-
threshold,
|
|
67
|
-
rootMargin,
|
|
68
|
-
freezeOnceVisible: true,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div ref={ref} className={className}>
|
|
73
|
-
{isIntersecting ? children : placeholder}
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Image lazy loading hook
|
|
79
|
-
export function useLazyImageLoading(
|
|
80
|
-
imageSrc: string,
|
|
81
|
-
options?: UseIntersectionObserverOptions
|
|
82
|
-
) {
|
|
83
|
-
const [src, setSrc] = React.useState<string | undefined>(undefined);
|
|
84
|
-
const { ref, isIntersecting } = useIntersectionObserver({
|
|
85
|
-
threshold: 0.01,
|
|
86
|
-
rootMargin: "50px",
|
|
87
|
-
...options,
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
React.useEffect(() => {
|
|
91
|
-
if (isIntersecting && imageSrc) {
|
|
92
|
-
const img = new Image();
|
|
93
|
-
img.src = imageSrc;
|
|
94
|
-
img.onload = () => setSrc(imageSrc);
|
|
95
|
-
}
|
|
96
|
-
}, [isIntersecting, imageSrc]);
|
|
97
|
-
|
|
98
|
-
return { ref, src, isLoaded: !!src };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Viewport visibility hook
|
|
102
|
-
export function useIsInViewport(options?: UseIntersectionObserverOptions) {
|
|
103
|
-
return useIntersectionObserver(options);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// Multiple elements observer
|
|
107
|
-
export function useMultipleIntersectionObserver(
|
|
108
|
-
options: UseIntersectionObserverOptions = {}
|
|
109
|
-
) {
|
|
110
|
-
const [elements, setElements] = React.useState<Map<Element, boolean>>(new Map());
|
|
111
|
-
const observer = React.useRef<IntersectionObserver | null>(null);
|
|
112
|
-
|
|
113
|
-
React.useEffect(() => {
|
|
114
|
-
if (!window.IntersectionObserver) return;
|
|
115
|
-
|
|
116
|
-
observer.current = new IntersectionObserver(
|
|
117
|
-
(entries) => {
|
|
118
|
-
setElements((prev) => {
|
|
119
|
-
const next = new Map(prev);
|
|
120
|
-
entries.forEach((entry) => {
|
|
121
|
-
next.set(entry.target, entry.isIntersecting);
|
|
122
|
-
});
|
|
123
|
-
return next;
|
|
124
|
-
});
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
threshold: options.threshold || 0,
|
|
128
|
-
root: options.root || null,
|
|
129
|
-
rootMargin: options.rootMargin || "0%",
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
return () => observer.current?.disconnect();
|
|
134
|
-
}, [options.threshold, options.root, options.rootMargin]);
|
|
135
|
-
|
|
136
|
-
const observe = React.useCallback((element: Element | null) => {
|
|
137
|
-
if (element && observer.current) {
|
|
138
|
-
observer.current.observe(element);
|
|
139
|
-
}
|
|
140
|
-
}, []);
|
|
141
|
-
|
|
142
|
-
const unobserve = React.useCallback((element: Element | null) => {
|
|
143
|
-
if (element && observer.current) {
|
|
144
|
-
observer.current.unobserve(element);
|
|
145
|
-
setElements((prev) => {
|
|
146
|
-
const next = new Map(prev);
|
|
147
|
-
next.delete(element);
|
|
148
|
-
return next;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}, []);
|
|
152
|
-
|
|
153
|
-
return { observe, unobserve, elements };
|
|
154
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react'
|
|
2
|
-
|
|
3
|
-
// Local storage hook with error handling and SSR support
|
|
4
|
-
export function useLocalStorage<T>(
|
|
5
|
-
key: string,
|
|
6
|
-
initialValue: T
|
|
7
|
-
): [T | undefined, (value: T | undefined | ((val: T | undefined) => T | undefined)) => void] {
|
|
8
|
-
// State to store our value
|
|
9
|
-
// Pass initial state function to useState so logic is only executed once
|
|
10
|
-
const [storedValue, setStoredValue] = useState<T | undefined>(() => {
|
|
11
|
-
if (typeof window === 'undefined') {
|
|
12
|
-
return initialValue
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
// Get from local storage by key
|
|
17
|
-
const item = window.localStorage.getItem(key)
|
|
18
|
-
// Parse stored json or if none return initialValue
|
|
19
|
-
return item ? JSON.parse(item) : initialValue
|
|
20
|
-
} catch (error) {
|
|
21
|
-
// If error also return initialValue
|
|
22
|
-
console.error(`Error reading localStorage key "${key}":`, error)
|
|
23
|
-
return initialValue
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
// Return a wrapped version of useState's setter function that persists the new value to localStorage
|
|
28
|
-
const setValue = (value: T | undefined | ((val: T | undefined) => T | undefined)) => {
|
|
29
|
-
try {
|
|
30
|
-
// Allow value to be a function so we have the same API as useState
|
|
31
|
-
const valueToStore = value instanceof Function ? value(storedValue) : value
|
|
32
|
-
|
|
33
|
-
// Save state
|
|
34
|
-
setStoredValue(valueToStore)
|
|
35
|
-
|
|
36
|
-
// Save to local storage
|
|
37
|
-
if (typeof window !== 'undefined') {
|
|
38
|
-
if (valueToStore === undefined) {
|
|
39
|
-
window.localStorage.removeItem(key)
|
|
40
|
-
} else {
|
|
41
|
-
window.localStorage.setItem(key, JSON.stringify(valueToStore))
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
} catch (error) {
|
|
45
|
-
// A more advanced implementation would handle the error case
|
|
46
|
-
console.error(`Error setting localStorage key "${key}":`, error)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Listen for changes to localStorage from other tabs/windows
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (typeof window === 'undefined') {
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const handleStorageChange = (e: StorageEvent) => {
|
|
57
|
-
if (e.key === key && e.newValue !== null) {
|
|
58
|
-
try {
|
|
59
|
-
setStoredValue(JSON.parse(e.newValue))
|
|
60
|
-
} catch (error) {
|
|
61
|
-
console.error(`Error parsing localStorage value for key "${key}":`, error)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
window.addEventListener('storage', handleStorageChange)
|
|
67
|
-
return () => window.removeEventListener('storage', handleStorageChange)
|
|
68
|
-
}, [key])
|
|
69
|
-
|
|
70
|
-
return [storedValue, setValue]
|
|
71
|
-
}
|