@djangocfg/ui-nextjs 1.4.45
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/LICENSE +21 -0
- package/README.md +152 -0
- package/package.json +110 -0
- package/src/animations/AnimatedBackground.tsx +645 -0
- package/src/animations/index.ts +2 -0
- package/src/blocks/ArticleCard.tsx +94 -0
- package/src/blocks/ArticleList.tsx +95 -0
- package/src/blocks/CTASection.tsx +136 -0
- package/src/blocks/FeatureSection.tsx +104 -0
- package/src/blocks/Hero.tsx +102 -0
- package/src/blocks/NewsletterSection.tsx +119 -0
- package/src/blocks/StatsSection.tsx +103 -0
- package/src/blocks/SuperHero.tsx +328 -0
- package/src/blocks/TestimonialSection.tsx +122 -0
- package/src/blocks/index.ts +9 -0
- package/src/components/README.md +2018 -0
- package/src/components/breadcrumb-navigation.tsx +127 -0
- package/src/components/breadcrumb.tsx +132 -0
- package/src/components/button-download.tsx +275 -0
- package/src/components/dropdown-menu.tsx +219 -0
- package/src/components/index.ts +86 -0
- package/src/components/markdown/MarkdownMessage.tsx +338 -0
- package/src/components/markdown/index.ts +5 -0
- package/src/components/menubar.tsx +274 -0
- package/src/components/multi-select-pro/async.tsx +608 -0
- package/src/components/multi-select-pro/helpers.tsx +84 -0
- package/src/components/multi-select-pro/index.tsx +622 -0
- package/src/components/navigation-menu.tsx +153 -0
- package/src/components/pagination-static.tsx +348 -0
- package/src/components/pagination.tsx +138 -0
- package/src/components/phone-input.tsx +276 -0
- package/src/components/sidebar.tsx +866 -0
- package/src/components/sonner.tsx +31 -0
- package/src/components/ssr-pagination.tsx +237 -0
- package/src/hooks/index.ts +19 -0
- package/src/hooks/useCfgRouter.ts +153 -0
- package/src/hooks/useLocalStorage.ts +221 -0
- package/src/hooks/useQueryParams.ts +73 -0
- package/src/hooks/useSessionStorage.ts +188 -0
- package/src/hooks/useTheme.ts +57 -0
- package/src/index.ts +24 -0
- package/src/lib/index.ts +2 -0
- package/src/styles/index.css +2 -0
- package/src/theme/ForceTheme.tsx +115 -0
- package/src/theme/ThemeProvider.tsx +82 -0
- package/src/theme/ThemeToggle.tsx +52 -0
- package/src/theme/index.ts +3 -0
- package/src/tools/JsonForm/JsonSchemaForm.tsx +199 -0
- package/src/tools/JsonForm/examples/BotConfigExample.tsx +245 -0
- package/src/tools/JsonForm/examples/RealBotConfigExample.tsx +157 -0
- package/src/tools/JsonForm/index.ts +46 -0
- package/src/tools/JsonForm/templates/ArrayFieldItemTemplate.tsx +46 -0
- package/src/tools/JsonForm/templates/ArrayFieldTemplate.tsx +73 -0
- package/src/tools/JsonForm/templates/BaseInputTemplate.tsx +106 -0
- package/src/tools/JsonForm/templates/ErrorListTemplate.tsx +34 -0
- package/src/tools/JsonForm/templates/FieldTemplate.tsx +61 -0
- package/src/tools/JsonForm/templates/ObjectFieldTemplate.tsx +43 -0
- package/src/tools/JsonForm/templates/index.ts +12 -0
- package/src/tools/JsonForm/types.ts +83 -0
- package/src/tools/JsonForm/utils.ts +212 -0
- package/src/tools/JsonForm/widgets/CheckboxWidget.tsx +36 -0
- package/src/tools/JsonForm/widgets/NumberWidget.tsx +88 -0
- package/src/tools/JsonForm/widgets/SelectWidget.tsx +100 -0
- package/src/tools/JsonForm/widgets/SwitchWidget.tsx +34 -0
- package/src/tools/JsonForm/widgets/TextWidget.tsx +95 -0
- package/src/tools/JsonForm/widgets/index.ts +12 -0
- package/src/tools/JsonTree/index.tsx +252 -0
- package/src/tools/LottiePlayer/LottiePlayer.client.tsx +212 -0
- package/src/tools/LottiePlayer/index.tsx +54 -0
- package/src/tools/LottiePlayer/types.ts +108 -0
- package/src/tools/LottiePlayer/useLottie.ts +163 -0
- package/src/tools/Mermaid/Mermaid.client.tsx +341 -0
- package/src/tools/Mermaid/index.tsx +40 -0
- package/src/tools/OpenapiViewer/components/EndpointInfo.tsx +144 -0
- package/src/tools/OpenapiViewer/components/EndpointsLibrary.tsx +255 -0
- package/src/tools/OpenapiViewer/components/PlaygroundLayout.tsx +123 -0
- package/src/tools/OpenapiViewer/components/PlaygroundStepper.tsx +98 -0
- package/src/tools/OpenapiViewer/components/RequestBuilder.tsx +164 -0
- package/src/tools/OpenapiViewer/components/RequestParametersForm.tsx +253 -0
- package/src/tools/OpenapiViewer/components/ResponseViewer.tsx +169 -0
- package/src/tools/OpenapiViewer/components/VersionSelector.tsx +64 -0
- package/src/tools/OpenapiViewer/components/index.ts +14 -0
- package/src/tools/OpenapiViewer/constants.ts +39 -0
- package/src/tools/OpenapiViewer/context/PlaygroundContext.tsx +338 -0
- package/src/tools/OpenapiViewer/hooks/index.ts +8 -0
- package/src/tools/OpenapiViewer/hooks/useMobile.ts +10 -0
- package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +203 -0
- package/src/tools/OpenapiViewer/index.tsx +36 -0
- package/src/tools/OpenapiViewer/types.ts +152 -0
- package/src/tools/OpenapiViewer/utils/apiKeyManager.ts +149 -0
- package/src/tools/OpenapiViewer/utils/formatters.ts +71 -0
- package/src/tools/OpenapiViewer/utils/index.ts +9 -0
- package/src/tools/OpenapiViewer/utils/versionManager.ts +161 -0
- package/src/tools/PrettyCode/PrettyCode.client.tsx +217 -0
- package/src/tools/PrettyCode/index.tsx +43 -0
- package/src/tools/VideoPlayer/README.md +239 -0
- package/src/tools/VideoPlayer/VideoControls.tsx +138 -0
- package/src/tools/VideoPlayer/VideoPlayer.tsx +230 -0
- package/src/tools/VideoPlayer/index.ts +9 -0
- package/src/tools/VideoPlayer/types.ts +62 -0
- package/src/tools/index.ts +43 -0
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { cn } from '@djangocfg/ui-core/lib';
|
|
5
|
+
|
|
6
|
+
export type BackgroundVariant =
|
|
7
|
+
| 'aurora-borealis'
|
|
8
|
+
| 'mesh-gradient'
|
|
9
|
+
| 'floating-orbs'
|
|
10
|
+
| 'geometric-flow'
|
|
11
|
+
| 'liquid-gradient'
|
|
12
|
+
| 'spotlight'
|
|
13
|
+
| 'none'
|
|
14
|
+
// Legacy aliases
|
|
15
|
+
| 'gradient-mesh'
|
|
16
|
+
| 'dot-matrix'
|
|
17
|
+
| 'grid-lines'
|
|
18
|
+
| 'aurora'
|
|
19
|
+
| 'particles'
|
|
20
|
+
| 'waves';
|
|
21
|
+
|
|
22
|
+
interface AnimatedBackgroundProps {
|
|
23
|
+
variant?: BackgroundVariant;
|
|
24
|
+
className?: string;
|
|
25
|
+
intensity?: 'subtle' | 'medium' | 'strong';
|
|
26
|
+
/** Color scheme - 'vibrant' uses multiple colors, 'monochrome' uses primary only */
|
|
27
|
+
colorScheme?: 'vibrant' | 'monochrome' | 'cool' | 'warm';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Map legacy variants to new ones
|
|
31
|
+
const variantMap: Record<string, BackgroundVariant> = {
|
|
32
|
+
'gradient-mesh': 'mesh-gradient',
|
|
33
|
+
'dot-matrix': 'geometric-flow',
|
|
34
|
+
'grid-lines': 'geometric-flow',
|
|
35
|
+
'aurora': 'aurora-borealis',
|
|
36
|
+
'particles': 'floating-orbs',
|
|
37
|
+
'waves': 'liquid-gradient',
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const AnimatedBackground: React.FC<AnimatedBackgroundProps> = ({
|
|
41
|
+
variant = 'mesh-gradient',
|
|
42
|
+
className,
|
|
43
|
+
intensity = 'medium',
|
|
44
|
+
colorScheme = 'vibrant',
|
|
45
|
+
}) => {
|
|
46
|
+
// Map legacy variants
|
|
47
|
+
const resolvedVariant = variantMap[variant] || variant;
|
|
48
|
+
|
|
49
|
+
const intensityConfig = useMemo(() => ({
|
|
50
|
+
subtle: { opacity: 0.15, blur: 'blur-3xl', scale: 0.8 },
|
|
51
|
+
medium: { opacity: 0.25, blur: 'blur-2xl', scale: 1 },
|
|
52
|
+
strong: { opacity: 0.4, blur: 'blur-xl', scale: 1.2 },
|
|
53
|
+
}[intensity]), [intensity]);
|
|
54
|
+
|
|
55
|
+
// Color palettes using CSS variables
|
|
56
|
+
const colors = useMemo(() => {
|
|
57
|
+
const palettes = {
|
|
58
|
+
vibrant: [
|
|
59
|
+
'hsl(var(--chart-1))', // Blue
|
|
60
|
+
'hsl(var(--chart-2))', // Green
|
|
61
|
+
'hsl(var(--chart-3))', // Purple
|
|
62
|
+
'hsl(var(--chart-4))', // Orange
|
|
63
|
+
'hsl(var(--chart-5))', // Red
|
|
64
|
+
],
|
|
65
|
+
monochrome: [
|
|
66
|
+
'hsl(var(--primary))',
|
|
67
|
+
'hsl(var(--primary) / 0.8)',
|
|
68
|
+
'hsl(var(--primary) / 0.6)',
|
|
69
|
+
],
|
|
70
|
+
cool: [
|
|
71
|
+
'hsl(var(--chart-1))', // Blue
|
|
72
|
+
'hsl(var(--chart-3))', // Purple
|
|
73
|
+
'hsl(210 100% 50%)', // Bright blue
|
|
74
|
+
'hsl(260 100% 60%)', // Violet
|
|
75
|
+
],
|
|
76
|
+
warm: [
|
|
77
|
+
'hsl(var(--chart-4))', // Orange
|
|
78
|
+
'hsl(var(--chart-5))', // Red
|
|
79
|
+
'hsl(35 100% 55%)', // Gold
|
|
80
|
+
'hsl(350 100% 60%)', // Rose
|
|
81
|
+
],
|
|
82
|
+
};
|
|
83
|
+
return palettes[colorScheme];
|
|
84
|
+
}, [colorScheme]);
|
|
85
|
+
|
|
86
|
+
if (resolvedVariant === 'none') {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
className={cn("absolute overflow-hidden pointer-events-none", className)}
|
|
93
|
+
style={{ inset: 0, width: '100%', height: '100%' }}
|
|
94
|
+
>
|
|
95
|
+
{resolvedVariant === 'aurora-borealis' && (
|
|
96
|
+
<AuroraBorealis colors={colors} intensity={intensityConfig} />
|
|
97
|
+
)}
|
|
98
|
+
|
|
99
|
+
{resolvedVariant === 'mesh-gradient' && (
|
|
100
|
+
<MeshGradient colors={colors} intensity={intensityConfig} />
|
|
101
|
+
)}
|
|
102
|
+
|
|
103
|
+
{resolvedVariant === 'floating-orbs' && (
|
|
104
|
+
<FloatingOrbs colors={colors} intensity={intensityConfig} />
|
|
105
|
+
)}
|
|
106
|
+
|
|
107
|
+
{resolvedVariant === 'geometric-flow' && (
|
|
108
|
+
<GeometricFlow colors={colors} intensity={intensityConfig} />
|
|
109
|
+
)}
|
|
110
|
+
|
|
111
|
+
{resolvedVariant === 'liquid-gradient' && (
|
|
112
|
+
<LiquidGradient colors={colors} intensity={intensityConfig} />
|
|
113
|
+
)}
|
|
114
|
+
|
|
115
|
+
{resolvedVariant === 'spotlight' && (
|
|
116
|
+
<Spotlight colors={colors} intensity={intensityConfig} />
|
|
117
|
+
)}
|
|
118
|
+
|
|
119
|
+
<AnimationStyles />
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// =============================================================================
|
|
125
|
+
// Aurora Borealis - Flowing northern lights effect
|
|
126
|
+
// =============================================================================
|
|
127
|
+
|
|
128
|
+
interface VariantProps {
|
|
129
|
+
colors: string[];
|
|
130
|
+
intensity: { opacity: number; blur: string; scale: number };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const AuroraBorealis: React.FC<VariantProps> = ({ colors, intensity }) => (
|
|
134
|
+
<>
|
|
135
|
+
{/* Base layer - subtle gradient */}
|
|
136
|
+
<div
|
|
137
|
+
className="absolute inset-0"
|
|
138
|
+
style={{
|
|
139
|
+
background: `linear-gradient(135deg, ${colors[0]} 0%, transparent 50%, ${colors[1]} 100%)`,
|
|
140
|
+
opacity: intensity.opacity * 0.3,
|
|
141
|
+
}}
|
|
142
|
+
/>
|
|
143
|
+
|
|
144
|
+
{/* Aurora bands */}
|
|
145
|
+
<div
|
|
146
|
+
className={cn("absolute inset-0", intensity.blur)}
|
|
147
|
+
style={{
|
|
148
|
+
background: `linear-gradient(110deg,
|
|
149
|
+
transparent 0%,
|
|
150
|
+
${colors[0]} 20%,
|
|
151
|
+
${colors[2] || colors[0]} 35%,
|
|
152
|
+
${colors[1]} 50%,
|
|
153
|
+
${colors[3] || colors[1]} 65%,
|
|
154
|
+
${colors[0]} 80%,
|
|
155
|
+
transparent 100%
|
|
156
|
+
)`,
|
|
157
|
+
opacity: intensity.opacity,
|
|
158
|
+
animation: 'aurora-shift 15s ease-in-out infinite',
|
|
159
|
+
transform: `translateY(-30%) scaleY(${intensity.scale})`,
|
|
160
|
+
}}
|
|
161
|
+
/>
|
|
162
|
+
|
|
163
|
+
{/* Secondary aurora layer */}
|
|
164
|
+
<div
|
|
165
|
+
className={cn("absolute inset-0", intensity.blur)}
|
|
166
|
+
style={{
|
|
167
|
+
background: `linear-gradient(70deg,
|
|
168
|
+
transparent 0%,
|
|
169
|
+
${colors[1]} 25%,
|
|
170
|
+
${colors[2] || colors[0]} 50%,
|
|
171
|
+
${colors[0]} 75%,
|
|
172
|
+
transparent 100%
|
|
173
|
+
)`,
|
|
174
|
+
opacity: intensity.opacity * 0.7,
|
|
175
|
+
animation: 'aurora-shift 20s ease-in-out infinite reverse',
|
|
176
|
+
animationDelay: '-5s',
|
|
177
|
+
transform: `translateY(-20%) scaleY(${intensity.scale * 0.8})`,
|
|
178
|
+
}}
|
|
179
|
+
/>
|
|
180
|
+
|
|
181
|
+
{/* Shimmer overlay */}
|
|
182
|
+
<div
|
|
183
|
+
className="absolute inset-0"
|
|
184
|
+
style={{
|
|
185
|
+
background: `radial-gradient(ellipse 100% 50% at 50% 0%,
|
|
186
|
+
${colors[2] || colors[0]} 0%,
|
|
187
|
+
transparent 70%
|
|
188
|
+
)`,
|
|
189
|
+
opacity: intensity.opacity * 0.4,
|
|
190
|
+
animation: 'aurora-shimmer 8s ease-in-out infinite',
|
|
191
|
+
}}
|
|
192
|
+
/>
|
|
193
|
+
</>
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
// =============================================================================
|
|
197
|
+
// Mesh Gradient - Modern Apple-style gradient mesh
|
|
198
|
+
// =============================================================================
|
|
199
|
+
|
|
200
|
+
const MeshGradient: React.FC<VariantProps> = ({ colors, intensity }) => (
|
|
201
|
+
<>
|
|
202
|
+
{/* Large gradient orbs with different colors */}
|
|
203
|
+
<div
|
|
204
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
205
|
+
style={{
|
|
206
|
+
width: '60%',
|
|
207
|
+
height: '60%',
|
|
208
|
+
top: '-10%',
|
|
209
|
+
right: '-10%',
|
|
210
|
+
background: `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)`,
|
|
211
|
+
opacity: intensity.opacity,
|
|
212
|
+
animation: 'mesh-float-1 25s ease-in-out infinite',
|
|
213
|
+
transform: `scale(${intensity.scale})`,
|
|
214
|
+
}}
|
|
215
|
+
/>
|
|
216
|
+
<div
|
|
217
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
218
|
+
style={{
|
|
219
|
+
width: '50%',
|
|
220
|
+
height: '50%',
|
|
221
|
+
bottom: '-5%',
|
|
222
|
+
left: '-5%',
|
|
223
|
+
background: `radial-gradient(circle, ${colors[1]} 0%, transparent 70%)`,
|
|
224
|
+
opacity: intensity.opacity,
|
|
225
|
+
animation: 'mesh-float-2 30s ease-in-out infinite',
|
|
226
|
+
transform: `scale(${intensity.scale})`,
|
|
227
|
+
}}
|
|
228
|
+
/>
|
|
229
|
+
<div
|
|
230
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
231
|
+
style={{
|
|
232
|
+
width: '40%',
|
|
233
|
+
height: '40%',
|
|
234
|
+
top: '30%',
|
|
235
|
+
left: '25%',
|
|
236
|
+
background: `radial-gradient(circle, ${colors[2] || colors[0]} 0%, transparent 70%)`,
|
|
237
|
+
opacity: intensity.opacity * 0.8,
|
|
238
|
+
animation: 'mesh-float-3 20s ease-in-out infinite',
|
|
239
|
+
transform: `scale(${intensity.scale})`,
|
|
240
|
+
}}
|
|
241
|
+
/>
|
|
242
|
+
{colors[3] && (
|
|
243
|
+
<div
|
|
244
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
245
|
+
style={{
|
|
246
|
+
width: '35%',
|
|
247
|
+
height: '35%',
|
|
248
|
+
bottom: '20%',
|
|
249
|
+
right: '15%',
|
|
250
|
+
background: `radial-gradient(circle, ${colors[3]} 0%, transparent 70%)`,
|
|
251
|
+
opacity: intensity.opacity * 0.6,
|
|
252
|
+
animation: 'mesh-float-4 22s ease-in-out infinite',
|
|
253
|
+
transform: `scale(${intensity.scale})`,
|
|
254
|
+
}}
|
|
255
|
+
/>
|
|
256
|
+
)}
|
|
257
|
+
</>
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
// =============================================================================
|
|
261
|
+
// Floating Orbs - Animated glowing spheres
|
|
262
|
+
// =============================================================================
|
|
263
|
+
|
|
264
|
+
const FloatingOrbs: React.FC<VariantProps> = ({ colors, intensity }) => {
|
|
265
|
+
const orbs = useMemo(() => {
|
|
266
|
+
return Array.from({ length: 12 }).map((_, i) => ({
|
|
267
|
+
id: i,
|
|
268
|
+
size: 60 + (i % 4) * 40,
|
|
269
|
+
x: (i * 23) % 100,
|
|
270
|
+
y: (i * 31) % 100,
|
|
271
|
+
color: colors[i % colors.length],
|
|
272
|
+
duration: 15 + (i % 5) * 5,
|
|
273
|
+
delay: i * 1.5,
|
|
274
|
+
}));
|
|
275
|
+
}, [colors]);
|
|
276
|
+
|
|
277
|
+
return (
|
|
278
|
+
<>
|
|
279
|
+
{orbs.map((orb) => (
|
|
280
|
+
<div
|
|
281
|
+
key={orb.id}
|
|
282
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
283
|
+
style={{
|
|
284
|
+
width: `${orb.size * intensity.scale}px`,
|
|
285
|
+
height: `${orb.size * intensity.scale}px`,
|
|
286
|
+
left: `${orb.x}%`,
|
|
287
|
+
top: `${orb.y}%`,
|
|
288
|
+
background: `radial-gradient(circle at 30% 30%, ${orb.color}, transparent 70%)`,
|
|
289
|
+
opacity: intensity.opacity * (0.5 + (orb.id % 3) * 0.2),
|
|
290
|
+
animation: `orb-float-${(orb.id % 4) + 1} ${orb.duration}s ease-in-out infinite`,
|
|
291
|
+
animationDelay: `${orb.delay}s`,
|
|
292
|
+
}}
|
|
293
|
+
/>
|
|
294
|
+
))}
|
|
295
|
+
</>
|
|
296
|
+
);
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
// =============================================================================
|
|
300
|
+
// Geometric Flow - Clean geometric patterns
|
|
301
|
+
// =============================================================================
|
|
302
|
+
|
|
303
|
+
const GeometricFlow: React.FC<VariantProps> = ({ colors, intensity }) => (
|
|
304
|
+
<>
|
|
305
|
+
{/* Gradient base */}
|
|
306
|
+
<div
|
|
307
|
+
className="absolute inset-0"
|
|
308
|
+
style={{
|
|
309
|
+
background: `linear-gradient(135deg,
|
|
310
|
+
${colors[0]} 0%,
|
|
311
|
+
transparent 30%,
|
|
312
|
+
transparent 70%,
|
|
313
|
+
${colors[1]} 100%
|
|
314
|
+
)`,
|
|
315
|
+
opacity: intensity.opacity * 0.3,
|
|
316
|
+
}}
|
|
317
|
+
/>
|
|
318
|
+
|
|
319
|
+
{/* Animated grid */}
|
|
320
|
+
<div
|
|
321
|
+
className="absolute inset-0"
|
|
322
|
+
style={{
|
|
323
|
+
backgroundImage: `
|
|
324
|
+
linear-gradient(${colors[0]}20 1px, transparent 1px),
|
|
325
|
+
linear-gradient(90deg, ${colors[0]}20 1px, transparent 1px)
|
|
326
|
+
`,
|
|
327
|
+
backgroundSize: '60px 60px',
|
|
328
|
+
animation: 'grid-drift 30s linear infinite',
|
|
329
|
+
opacity: intensity.opacity,
|
|
330
|
+
}}
|
|
331
|
+
/>
|
|
332
|
+
|
|
333
|
+
{/* Diagonal lines */}
|
|
334
|
+
<div
|
|
335
|
+
className="absolute inset-0"
|
|
336
|
+
style={{
|
|
337
|
+
backgroundImage: `repeating-linear-gradient(
|
|
338
|
+
45deg,
|
|
339
|
+
transparent,
|
|
340
|
+
transparent 80px,
|
|
341
|
+
${colors[2] || colors[0]}10 80px,
|
|
342
|
+
${colors[2] || colors[0]}10 82px
|
|
343
|
+
)`,
|
|
344
|
+
animation: 'diagonal-shift 20s linear infinite',
|
|
345
|
+
opacity: intensity.opacity,
|
|
346
|
+
}}
|
|
347
|
+
/>
|
|
348
|
+
|
|
349
|
+
{/* Glowing intersection points */}
|
|
350
|
+
<div
|
|
351
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
352
|
+
style={{
|
|
353
|
+
width: '40%',
|
|
354
|
+
height: '40%',
|
|
355
|
+
top: '20%',
|
|
356
|
+
left: '50%',
|
|
357
|
+
transform: 'translateX(-50%)',
|
|
358
|
+
background: `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)`,
|
|
359
|
+
opacity: intensity.opacity * 0.5,
|
|
360
|
+
animation: 'pulse-glow 8s ease-in-out infinite',
|
|
361
|
+
}}
|
|
362
|
+
/>
|
|
363
|
+
</>
|
|
364
|
+
);
|
|
365
|
+
|
|
366
|
+
// =============================================================================
|
|
367
|
+
// Liquid Gradient - Smooth flowing liquid effect
|
|
368
|
+
// =============================================================================
|
|
369
|
+
|
|
370
|
+
const LiquidGradient: React.FC<VariantProps> = ({ colors, intensity }) => (
|
|
371
|
+
<>
|
|
372
|
+
{/* Base gradient */}
|
|
373
|
+
<div
|
|
374
|
+
className="absolute inset-0"
|
|
375
|
+
style={{
|
|
376
|
+
background: `linear-gradient(180deg,
|
|
377
|
+
transparent 0%,
|
|
378
|
+
${colors[0]}15 30%,
|
|
379
|
+
${colors[1]}20 50%,
|
|
380
|
+
${colors[2] || colors[0]}15 70%,
|
|
381
|
+
transparent 100%
|
|
382
|
+
)`,
|
|
383
|
+
opacity: intensity.opacity,
|
|
384
|
+
}}
|
|
385
|
+
/>
|
|
386
|
+
|
|
387
|
+
{/* Liquid blob 1 */}
|
|
388
|
+
<div
|
|
389
|
+
className={cn("absolute", intensity.blur)}
|
|
390
|
+
style={{
|
|
391
|
+
width: '120%',
|
|
392
|
+
height: '50%',
|
|
393
|
+
bottom: '-10%',
|
|
394
|
+
left: '-10%',
|
|
395
|
+
background: `linear-gradient(90deg,
|
|
396
|
+
${colors[0]} 0%,
|
|
397
|
+
${colors[1]} 33%,
|
|
398
|
+
${colors[2] || colors[0]} 66%,
|
|
399
|
+
${colors[0]} 100%
|
|
400
|
+
)`,
|
|
401
|
+
opacity: intensity.opacity,
|
|
402
|
+
borderRadius: '50% 50% 0 0',
|
|
403
|
+
animation: 'liquid-flow-1 12s ease-in-out infinite',
|
|
404
|
+
transform: `scaleY(${intensity.scale})`,
|
|
405
|
+
}}
|
|
406
|
+
/>
|
|
407
|
+
|
|
408
|
+
{/* Liquid blob 2 */}
|
|
409
|
+
<div
|
|
410
|
+
className={cn("absolute", intensity.blur)}
|
|
411
|
+
style={{
|
|
412
|
+
width: '100%',
|
|
413
|
+
height: '40%',
|
|
414
|
+
bottom: '-5%',
|
|
415
|
+
left: '0',
|
|
416
|
+
background: `linear-gradient(90deg,
|
|
417
|
+
${colors[1]} 0%,
|
|
418
|
+
${colors[2] || colors[0]} 50%,
|
|
419
|
+
${colors[3] || colors[1]} 100%
|
|
420
|
+
)`,
|
|
421
|
+
opacity: intensity.opacity * 0.8,
|
|
422
|
+
borderRadius: '60% 40% 0 0',
|
|
423
|
+
animation: 'liquid-flow-2 15s ease-in-out infinite',
|
|
424
|
+
transform: `scaleY(${intensity.scale * 0.9})`,
|
|
425
|
+
}}
|
|
426
|
+
/>
|
|
427
|
+
|
|
428
|
+
{/* Floating bubbles */}
|
|
429
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
430
|
+
<div
|
|
431
|
+
key={i}
|
|
432
|
+
className="absolute rounded-full"
|
|
433
|
+
style={{
|
|
434
|
+
width: `${12 + i * 4}px`,
|
|
435
|
+
height: `${12 + i * 4}px`,
|
|
436
|
+
left: `${15 + i * 15}%`,
|
|
437
|
+
bottom: '10%',
|
|
438
|
+
background: `radial-gradient(circle at 30% 30%,
|
|
439
|
+
${colors[i % colors.length]}80,
|
|
440
|
+
${colors[i % colors.length]}20
|
|
441
|
+
)`,
|
|
442
|
+
border: `1px solid ${colors[i % colors.length]}40`,
|
|
443
|
+
opacity: intensity.opacity,
|
|
444
|
+
animation: `bubble-float ${8 + i * 2}s ease-in-out infinite`,
|
|
445
|
+
animationDelay: `${i * 2}s`,
|
|
446
|
+
}}
|
|
447
|
+
/>
|
|
448
|
+
))}
|
|
449
|
+
</>
|
|
450
|
+
);
|
|
451
|
+
|
|
452
|
+
// =============================================================================
|
|
453
|
+
// Spotlight - Dramatic spotlight effect
|
|
454
|
+
// =============================================================================
|
|
455
|
+
|
|
456
|
+
const Spotlight: React.FC<VariantProps> = ({ colors, intensity }) => (
|
|
457
|
+
<>
|
|
458
|
+
{/* Main spotlight */}
|
|
459
|
+
<div
|
|
460
|
+
className={cn("absolute", intensity.blur)}
|
|
461
|
+
style={{
|
|
462
|
+
width: '80%',
|
|
463
|
+
height: '80%',
|
|
464
|
+
top: '-20%',
|
|
465
|
+
left: '50%',
|
|
466
|
+
transform: 'translateX(-50%)',
|
|
467
|
+
background: `conic-gradient(from 180deg at 50% 50%,
|
|
468
|
+
${colors[0]} 0deg,
|
|
469
|
+
${colors[1]} 60deg,
|
|
470
|
+
${colors[2] || colors[0]} 120deg,
|
|
471
|
+
${colors[3] || colors[1]} 180deg,
|
|
472
|
+
${colors[0]} 240deg,
|
|
473
|
+
${colors[1]} 300deg,
|
|
474
|
+
${colors[0]} 360deg
|
|
475
|
+
)`,
|
|
476
|
+
opacity: intensity.opacity,
|
|
477
|
+
animation: 'spotlight-rotate 30s linear infinite',
|
|
478
|
+
}}
|
|
479
|
+
/>
|
|
480
|
+
|
|
481
|
+
{/* Center fade */}
|
|
482
|
+
<div
|
|
483
|
+
className="absolute inset-0"
|
|
484
|
+
style={{
|
|
485
|
+
background: `radial-gradient(circle at 50% 30%,
|
|
486
|
+
transparent 0%,
|
|
487
|
+
hsl(var(--background)) 70%
|
|
488
|
+
)`,
|
|
489
|
+
}}
|
|
490
|
+
/>
|
|
491
|
+
|
|
492
|
+
{/* Accent glow */}
|
|
493
|
+
<div
|
|
494
|
+
className={cn("absolute rounded-full", intensity.blur)}
|
|
495
|
+
style={{
|
|
496
|
+
width: '50%',
|
|
497
|
+
height: '50%',
|
|
498
|
+
top: '10%',
|
|
499
|
+
left: '25%',
|
|
500
|
+
background: `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)`,
|
|
501
|
+
opacity: intensity.opacity * 0.5,
|
|
502
|
+
animation: 'pulse-glow 6s ease-in-out infinite',
|
|
503
|
+
}}
|
|
504
|
+
/>
|
|
505
|
+
</>
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
// =============================================================================
|
|
509
|
+
// Animation Styles
|
|
510
|
+
// =============================================================================
|
|
511
|
+
|
|
512
|
+
const AnimationStyles: React.FC = () => (
|
|
513
|
+
<style>{`
|
|
514
|
+
@keyframes aurora-shift {
|
|
515
|
+
0%, 100% {
|
|
516
|
+
transform: translateX(-10%) translateY(-30%) scaleX(1.1);
|
|
517
|
+
}
|
|
518
|
+
50% {
|
|
519
|
+
transform: translateX(10%) translateY(-25%) scaleX(0.9);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
@keyframes aurora-shimmer {
|
|
524
|
+
0%, 100% {
|
|
525
|
+
opacity: 0.2;
|
|
526
|
+
transform: scale(1);
|
|
527
|
+
}
|
|
528
|
+
50% {
|
|
529
|
+
opacity: 0.4;
|
|
530
|
+
transform: scale(1.05);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
@keyframes mesh-float-1 {
|
|
535
|
+
0%, 100% { transform: translate(0, 0) scale(1); }
|
|
536
|
+
25% { transform: translate(-5%, 10%) scale(1.05); }
|
|
537
|
+
50% { transform: translate(5%, 5%) scale(0.95); }
|
|
538
|
+
75% { transform: translate(-3%, -5%) scale(1.02); }
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@keyframes mesh-float-2 {
|
|
542
|
+
0%, 100% { transform: translate(0, 0) scale(1); }
|
|
543
|
+
33% { transform: translate(8%, -8%) scale(1.08); }
|
|
544
|
+
66% { transform: translate(-6%, 6%) scale(0.92); }
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
@keyframes mesh-float-3 {
|
|
548
|
+
0%, 100% { transform: translate(0, 0) scale(1); }
|
|
549
|
+
50% { transform: translate(10%, 10%) scale(1.1); }
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
@keyframes mesh-float-4 {
|
|
553
|
+
0%, 100% { transform: translate(0, 0) scale(1); }
|
|
554
|
+
25% { transform: translate(5%, -10%) scale(0.95); }
|
|
555
|
+
75% { transform: translate(-8%, 5%) scale(1.05); }
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
@keyframes orb-float-1 {
|
|
559
|
+
0%, 100% { transform: translate(0, 0); }
|
|
560
|
+
50% { transform: translate(30px, -40px); }
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
@keyframes orb-float-2 {
|
|
564
|
+
0%, 100% { transform: translate(0, 0); }
|
|
565
|
+
50% { transform: translate(-25px, 35px); }
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
@keyframes orb-float-3 {
|
|
569
|
+
0%, 100% { transform: translate(0, 0); }
|
|
570
|
+
33% { transform: translate(40px, 20px); }
|
|
571
|
+
66% { transform: translate(-20px, -30px); }
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
@keyframes orb-float-4 {
|
|
575
|
+
0%, 100% { transform: translate(0, 0); }
|
|
576
|
+
25% { transform: translate(-35px, -25px); }
|
|
577
|
+
75% { transform: translate(25px, 40px); }
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
@keyframes grid-drift {
|
|
581
|
+
0% { transform: translate(0, 0); }
|
|
582
|
+
100% { transform: translate(60px, 60px); }
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
@keyframes diagonal-shift {
|
|
586
|
+
0% { transform: translateX(0); }
|
|
587
|
+
100% { transform: translateX(160px); }
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
@keyframes pulse-glow {
|
|
591
|
+
0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
|
|
592
|
+
50% { opacity: 0.6; transform: translateX(-50%) scale(1.1); }
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
@keyframes liquid-flow-1 {
|
|
596
|
+
0%, 100% {
|
|
597
|
+
transform: translateY(0) scaleX(1);
|
|
598
|
+
border-radius: 50% 50% 0 0;
|
|
599
|
+
}
|
|
600
|
+
25% {
|
|
601
|
+
transform: translateY(-30px) scaleX(1.05);
|
|
602
|
+
border-radius: 45% 55% 0 0;
|
|
603
|
+
}
|
|
604
|
+
50% {
|
|
605
|
+
transform: translateY(-50px) scaleX(0.95);
|
|
606
|
+
border-radius: 55% 45% 0 0;
|
|
607
|
+
}
|
|
608
|
+
75% {
|
|
609
|
+
transform: translateY(-25px) scaleX(1.02);
|
|
610
|
+
border-radius: 48% 52% 0 0;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
@keyframes liquid-flow-2 {
|
|
615
|
+
0%, 100% {
|
|
616
|
+
transform: translateY(0) scaleX(1);
|
|
617
|
+
border-radius: 60% 40% 0 0;
|
|
618
|
+
}
|
|
619
|
+
33% {
|
|
620
|
+
transform: translateY(-40px) scaleX(1.08);
|
|
621
|
+
border-radius: 40% 60% 0 0;
|
|
622
|
+
}
|
|
623
|
+
66% {
|
|
624
|
+
transform: translateY(-60px) scaleX(0.92);
|
|
625
|
+
border-radius: 55% 45% 0 0;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
@keyframes bubble-float {
|
|
630
|
+
0%, 100% {
|
|
631
|
+
transform: translateY(0) scale(1);
|
|
632
|
+
opacity: 0.6;
|
|
633
|
+
}
|
|
634
|
+
50% {
|
|
635
|
+
transform: translateY(-100px) scale(1.2);
|
|
636
|
+
opacity: 0.3;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
@keyframes spotlight-rotate {
|
|
641
|
+
0% { transform: translateX(-50%) rotate(0deg); }
|
|
642
|
+
100% { transform: translateX(-50%) rotate(360deg); }
|
|
643
|
+
}
|
|
644
|
+
`}</style>
|
|
645
|
+
);
|