Muthukumarank commited on
Commit
8bb99f8
Β·
verified Β·
1 Parent(s): 0a82242

Upload components/ui/PremiumComponents.tsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/ui/PremiumComponents.tsx +159 -0
components/ui/PremiumComponents.tsx ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use client';
2
+
3
+ import { CSSProperties, ReactNode } from 'react';
4
+ import { cn } from '@/lib/utils';
5
+
6
+ // ═══ Border Beam β€” Animated gradient border sweep (21st.dev style) ═══
7
+ export function BorderBeam({
8
+ size = 80,
9
+ duration = 8,
10
+ colorFrom = '#ef4444',
11
+ colorTo = '#3b82f6',
12
+ borderWidth = 1.5,
13
+ className = '',
14
+ }: {
15
+ size?: number; duration?: number; colorFrom?: string; colorTo?: string;
16
+ borderWidth?: number; className?: string;
17
+ }) {
18
+ return (
19
+ <div className={cn('pointer-events-none absolute inset-0 rounded-[inherit]', className)}
20
+ style={{ '--border-width': `${borderWidth}px` } as CSSProperties}
21
+ >
22
+ <div
23
+ className="absolute inset-0 rounded-[inherit]"
24
+ style={{
25
+ padding: `${borderWidth}px`,
26
+ background: `conic-gradient(from 0deg, transparent, ${colorFrom}, ${colorTo}, transparent)`,
27
+ mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
28
+ maskComposite: 'exclude',
29
+ WebkitMaskComposite: 'xor',
30
+ animation: `spin ${duration}s linear infinite`,
31
+ }}
32
+ />
33
+ </div>
34
+ );
35
+ }
36
+
37
+ // ═══ Shine Border β€” Rotating conic gradient border ═══
38
+ export function ShineBorder({
39
+ children,
40
+ shineColor = ['#ef4444', '#3b82f6', '#a855f7'],
41
+ borderWidth = 1,
42
+ duration = 14,
43
+ className = '',
44
+ }: {
45
+ children: ReactNode; shineColor?: string[]; borderWidth?: number;
46
+ duration?: number; className?: string;
47
+ }) {
48
+ return (
49
+ <div className={cn('relative rounded-2xl overflow-hidden', className)}>
50
+ <div
51
+ className="absolute inset-0 rounded-[inherit] animate-[shine_var(--duration)_linear_infinite]"
52
+ style={{
53
+ '--duration': `${duration}s`,
54
+ backgroundImage: `conic-gradient(from 0deg, transparent, ${shineColor.join(',')}, transparent)`,
55
+ padding: `${borderWidth}px`,
56
+ mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
57
+ maskComposite: 'exclude',
58
+ WebkitMaskComposite: 'xor',
59
+ } as CSSProperties}
60
+ />
61
+ <div className="relative rounded-[inherit] bg-forensic-bg">
62
+ {children}
63
+ </div>
64
+ </div>
65
+ );
66
+ }
67
+
68
+ // ═══ Glass Card β€” Premium glassmorphism ═══
69
+ export function GlassCard({
70
+ children,
71
+ className = '',
72
+ hover = true,
73
+ glow = false,
74
+ glowColor = 'rgba(239,68,68,0.15)',
75
+ }: {
76
+ children: ReactNode; className?: string; hover?: boolean;
77
+ glow?: boolean; glowColor?: string;
78
+ }) {
79
+ return (
80
+ <div className={cn(
81
+ 'relative rounded-2xl bg-white/[0.03] backdrop-blur-xl border border-white/[0.08]',
82
+ 'shadow-[0_8px_32px_rgba(0,0,0,0.3),inset_0_1px_0_rgba(255,255,255,0.05)]',
83
+ hover && 'transition-all duration-300 hover:bg-white/[0.05] hover:border-white/[0.12] hover:shadow-[0_16px_48px_rgba(0,0,0,0.4)]',
84
+ glow && 'hover:shadow-[0_0_40px_var(--glow-color)]',
85
+ className
86
+ )} style={{ '--glow-color': glowColor } as CSSProperties}>
87
+ {children}
88
+ </div>
89
+ );
90
+ }
91
+
92
+ // ═══ Gradient Text ═══
93
+ export function GradientText({
94
+ children,
95
+ from = '#ef4444',
96
+ to = '#f59e0b',
97
+ className = '',
98
+ }: {
99
+ children: ReactNode; from?: string; to?: string; className?: string;
100
+ }) {
101
+ return (
102
+ <span className={cn('bg-clip-text text-transparent', className)}
103
+ style={{ backgroundImage: `linear-gradient(135deg, ${from}, ${to})` }}
104
+ >
105
+ {children}
106
+ </span>
107
+ );
108
+ }
109
+
110
+ // ═══ Glow Badge ═══
111
+ export function GlowBadge({
112
+ children,
113
+ color = '#ef4444',
114
+ className = '',
115
+ }: {
116
+ children: ReactNode; color?: string; className?: string;
117
+ }) {
118
+ return (
119
+ <span className={cn(
120
+ 'inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium',
121
+ 'border backdrop-blur-sm',
122
+ className
123
+ )} style={{
124
+ backgroundColor: `${color}10`,
125
+ borderColor: `${color}30`,
126
+ color: color,
127
+ boxShadow: `0 0 12px ${color}20`,
128
+ }}>
129
+ {children}
130
+ </span>
131
+ );
132
+ }
133
+
134
+ // ═══ Animated Grid Background ═══
135
+ export function GridBackground({ className = '' }: { className?: string }) {
136
+ return (
137
+ <div className={cn('absolute inset-0 -z-10', className)}>
138
+ <div className="absolute inset-0"
139
+ style={{
140
+ backgroundImage: `linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px)`,
141
+ backgroundSize: '60px 60px',
142
+ }}
143
+ />
144
+ <div className="absolute inset-0 bg-gradient-to-b from-transparent via-transparent to-forensic-bg" />
145
+ </div>
146
+ );
147
+ }
148
+
149
+ // ═══ Status Indicator ═══
150
+ export function StatusDot({ status }: { status: 'active' | 'warning' | 'critical' | 'inactive' }) {
151
+ const colors = { active: '#22c55e', warning: '#f59e0b', critical: '#ef4444', inactive: '#6b7280' };
152
+ return (
153
+ <span className="relative flex h-3 w-3">
154
+ <span className="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75"
155
+ style={{ backgroundColor: colors[status] }} />
156
+ <span className="relative inline-flex rounded-full h-3 w-3" style={{ backgroundColor: colors[status] }} />
157
+ </span>
158
+ );
159
+ }