@oalacea/chaosui 0.1.0 → 0.4.0
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/bin/cli.js +75 -13
- package/components/backgrounds/glow-orbs/index.tsx +1 -1
- package/components/buttons/chaos-button/chaos-button.module.css +3 -2
- package/components/buttons/glitch-button/glitch-button.module.css +7 -7
- package/components/chaos-vars.css +27 -0
- package/components/cyber/cyber-avatar/css/cyber-avatar.module.css +60 -0
- package/components/cyber/cyber-avatar/css/index.tsx +28 -0
- package/components/cyber/cyber-avatar/tailwind/index.tsx +46 -0
- package/components/cyber/cyber-input/css/cyber-input.module.css +87 -0
- package/components/cyber/cyber-input/css/index.tsx +49 -0
- package/components/cyber/cyber-input/tailwind/index.tsx +55 -0
- package/components/cyber/cyber-loader/css/cyber-loader.module.css +102 -0
- package/components/cyber/cyber-loader/css/index.tsx +58 -0
- package/components/cyber/cyber-loader/tailwind/index.tsx +63 -0
- package/components/cyber/cyber-modal/css/cyber-modal.module.css +124 -0
- package/components/cyber/cyber-modal/css/index.tsx +75 -0
- package/components/cyber/cyber-modal/tailwind/index.tsx +87 -0
- package/components/cyber/cyber-slider/css/cyber-slider.module.css +61 -0
- package/components/cyber/cyber-slider/css/index.tsx +41 -0
- package/components/cyber/cyber-slider/tailwind/index.tsx +51 -0
- package/components/cyber/cyber-tooltip/css/cyber-tooltip.module.css +67 -0
- package/components/cyber/cyber-tooltip/css/index.tsx +36 -0
- package/components/cyber/cyber-tooltip/tailwind/index.tsx +48 -0
- package/components/effects/glitch-image/css/glitch-image.module.css +64 -0
- package/components/effects/glitch-image/css/index.tsx +25 -0
- package/components/effects/glitch-image/tailwind/index.tsx +49 -0
- package/components/effects/glowing-border/css/glowing-border.module.css +73 -0
- package/components/effects/glowing-border/css/index.tsx +45 -0
- package/components/effects/glowing-border/tailwind/index.tsx +40 -0
- package/components/effects/screen-distortion/screen-distortion.module.css +2 -2
- package/components/effects/warning-tape/index.tsx +4 -4
- package/components/effects/warning-tape/warning-tape.module.css +2 -0
- package/components/layout/data-grid/css/data-grid.module.css +52 -0
- package/components/layout/data-grid/css/index.tsx +76 -0
- package/components/layout/data-grid/tailwind/index.tsx +74 -0
- package/components/layout/hologram-card/css/hologram-card.module.css +102 -0
- package/components/layout/hologram-card/css/index.tsx +46 -0
- package/components/layout/hologram-card/tailwind/index.tsx +61 -0
- package/components/navigation/hexagon-menu/css/hexagon-menu.module.css +55 -0
- package/components/navigation/hexagon-menu/css/index.tsx +35 -0
- package/components/navigation/hexagon-menu/tailwind/index.tsx +53 -0
- package/components/neon/neon-alert/css/index.tsx +53 -0
- package/components/neon/neon-alert/css/neon-alert.module.css +60 -0
- package/components/neon/neon-alert/tailwind/index.tsx +59 -0
- package/components/neon/neon-badge/css/index.tsx +49 -0
- package/components/neon/neon-badge/css/neon-badge.module.css +53 -0
- package/components/neon/neon-badge/tailwind/index.tsx +50 -0
- package/components/neon/neon-button/css/index.tsx +54 -0
- package/components/neon/neon-button/css/neon-button.module.css +114 -0
- package/components/neon/neon-button/tailwind/index.tsx +51 -0
- package/components/neon/neon-divider/css/index.tsx +26 -0
- package/components/neon/neon-divider/css/neon-divider.module.css +43 -0
- package/components/neon/neon-divider/tailwind/index.tsx +36 -0
- package/components/neon/neon-progress/css/index.tsx +65 -0
- package/components/neon/neon-progress/css/neon-progress.module.css +88 -0
- package/components/neon/neon-progress/tailwind/index.tsx +46 -0
- package/components/neon/neon-tabs/css/index.tsx +41 -0
- package/components/neon/neon-tabs/css/neon-tabs.module.css +45 -0
- package/components/neon/neon-tabs/tailwind/index.tsx +53 -0
- package/components/neon/neon-toggle/css/index.tsx +58 -0
- package/components/neon/neon-toggle/css/neon-toggle.module.css +79 -0
- package/components/neon/neon-toggle/tailwind/index.tsx +57 -0
- package/components/text/glitch-text/glitch-text.module.css +2 -2
- package/package.json +1 -1
- package/components/glow-orbs/glow-orbs.module.css +0 -31
- package/components/glow-orbs/index.tsx +0 -87
- package/components/light-beams/index.tsx +0 -80
- package/components/light-beams/light-beams.module.css +0 -27
- package/components/noise-canvas/index.tsx +0 -113
- package/components/noise-canvas/noise-canvas.module.css +0 -8
- package/components/package.json +0 -13
- package/components/particle-field/index.tsx +0 -81
- package/components/particle-field/particle-field.module.css +0 -31
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, ButtonHTMLAttributes } from 'react';
|
|
4
|
+
import styles from './neon-button.module.css';
|
|
5
|
+
|
|
6
|
+
export interface NeonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
/** Neon color variant */
|
|
8
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple' | 'red' | 'yellow';
|
|
9
|
+
/** Button size */
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
/** Continuous glow pulse animation */
|
|
12
|
+
glowing?: boolean;
|
|
13
|
+
/** Animated gradient border */
|
|
14
|
+
animated?: boolean;
|
|
15
|
+
/** Cut corner style */
|
|
16
|
+
cut?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const NeonButton = forwardRef<HTMLButtonElement, NeonButtonProps>(
|
|
20
|
+
(
|
|
21
|
+
{
|
|
22
|
+
children,
|
|
23
|
+
variant = 'cyan',
|
|
24
|
+
size = 'md',
|
|
25
|
+
glowing = false,
|
|
26
|
+
animated = false,
|
|
27
|
+
cut = false,
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
},
|
|
31
|
+
ref
|
|
32
|
+
) => {
|
|
33
|
+
const classes = [
|
|
34
|
+
styles.button,
|
|
35
|
+
styles[variant],
|
|
36
|
+
styles[size],
|
|
37
|
+
glowing && styles.glowing,
|
|
38
|
+
animated && styles.animated,
|
|
39
|
+
cut && styles.cut,
|
|
40
|
+
className,
|
|
41
|
+
].filter(Boolean).join(' ');
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<button ref={ref} className={classes} {...props}>
|
|
45
|
+
<span className={styles.text}>{children}</span>
|
|
46
|
+
<span className={styles.glow} aria-hidden="true" />
|
|
47
|
+
</button>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
NeonButton.displayName = 'NeonButton';
|
|
53
|
+
|
|
54
|
+
export default NeonButton;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
--neon-color: #00f0ff;
|
|
3
|
+
--neon-glow: 0 0 10px var(--neon-color), 0 0 20px var(--neon-color), 0 0 40px var(--neon-color);
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
padding: 0.75rem 2rem;
|
|
10
|
+
font-family: var(--font-display, 'Orbitron', sans-serif);
|
|
11
|
+
font-size: 0.875rem;
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
text-transform: uppercase;
|
|
14
|
+
letter-spacing: 0.125em;
|
|
15
|
+
color: var(--neon-color);
|
|
16
|
+
background: transparent;
|
|
17
|
+
border: 2px solid var(--neon-color);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
transition: all 0.3s ease;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.button:hover {
|
|
24
|
+
background: var(--neon-color);
|
|
25
|
+
color: hsl(var(--background, 0 0% 4%));
|
|
26
|
+
box-shadow: var(--neon-glow);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.button:active {
|
|
30
|
+
transform: scale(0.98);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Variants */
|
|
34
|
+
.cyan { --neon-color: #00f0ff; }
|
|
35
|
+
.pink { --neon-color: #ff00ff; }
|
|
36
|
+
.green { --neon-color: #00ff88; }
|
|
37
|
+
.purple { --neon-color: #a855f7; }
|
|
38
|
+
.red { --neon-color: #ff0040; }
|
|
39
|
+
.yellow { --neon-color: #ffff00; }
|
|
40
|
+
|
|
41
|
+
/* Sizes */
|
|
42
|
+
.sm {
|
|
43
|
+
padding: 0.5rem 1.25rem;
|
|
44
|
+
font-size: 0.75rem;
|
|
45
|
+
letter-spacing: 0.0625em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.lg {
|
|
49
|
+
padding: 1rem 3rem;
|
|
50
|
+
font-size: 1rem;
|
|
51
|
+
letter-spacing: 0.1875em;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Glowing animation */
|
|
55
|
+
.glowing {
|
|
56
|
+
animation: neon-pulse 2s ease-in-out infinite;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes neon-pulse {
|
|
60
|
+
0%, 100% { box-shadow: 0 0 5px var(--neon-color); }
|
|
61
|
+
50% { box-shadow: var(--neon-glow); }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Animated gradient border */
|
|
65
|
+
.animated {
|
|
66
|
+
border: none;
|
|
67
|
+
background:
|
|
68
|
+
linear-gradient(hsl(var(--background, 0 0% 4%)), hsl(var(--background, 0 0% 4%))) padding-box,
|
|
69
|
+
linear-gradient(90deg, #00f0ff, #ff00ff, #00f0ff) border-box;
|
|
70
|
+
border: 2px solid transparent;
|
|
71
|
+
background-size: 100% 100%, 200% 100%;
|
|
72
|
+
animation: border-flow 3s linear infinite;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.animated:hover {
|
|
76
|
+
background:
|
|
77
|
+
linear-gradient(90deg, #00f0ff, #ff00ff) padding-box,
|
|
78
|
+
linear-gradient(90deg, #00f0ff, #ff00ff, #00f0ff) border-box;
|
|
79
|
+
color: hsl(var(--background, 0 0% 4%));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@keyframes border-flow {
|
|
83
|
+
0% { background-position: 0 0, 0% 50%; }
|
|
84
|
+
100% { background-position: 0 0, 200% 50%; }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Cut corners */
|
|
88
|
+
.cut {
|
|
89
|
+
clip-path: polygon(
|
|
90
|
+
0 0, calc(100% - 12px) 0, 100% 12px,
|
|
91
|
+
100% 100%, 12px 100%, 0 calc(100% - 12px)
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Glow sweep element */
|
|
96
|
+
.glow {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: -100%;
|
|
100
|
+
width: 100%;
|
|
101
|
+
height: 100%;
|
|
102
|
+
background: linear-gradient(90deg, transparent, var(--neon-color), transparent);
|
|
103
|
+
opacity: 0.3;
|
|
104
|
+
transition: left 0.5s ease;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.button:hover .glow {
|
|
108
|
+
left: 100%;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.text {
|
|
112
|
+
position: relative;
|
|
113
|
+
z-index: 1;
|
|
114
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, ButtonHTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface NeonButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple' | 'red' | 'yellow';
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
glowing?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const variantStyles = {
|
|
12
|
+
cyan: 'text-cyan-400 border-cyan-400 hover:bg-cyan-400 hover:shadow-[0_0_20px_#00f0ff,0_0_40px_#00f0ff]',
|
|
13
|
+
pink: 'text-fuchsia-500 border-fuchsia-500 hover:bg-fuchsia-500 hover:shadow-[0_0_20px_#ff00ff,0_0_40px_#ff00ff]',
|
|
14
|
+
green: 'text-emerald-400 border-emerald-400 hover:bg-emerald-400 hover:shadow-[0_0_20px_#00ff88,0_0_40px_#00ff88]',
|
|
15
|
+
purple: 'text-purple-500 border-purple-500 hover:bg-purple-500 hover:shadow-[0_0_20px_#a855f7,0_0_40px_#a855f7]',
|
|
16
|
+
red: 'text-rose-500 border-rose-500 hover:bg-rose-500 hover:shadow-[0_0_20px_#ff0040,0_0_40px_#ff0040]',
|
|
17
|
+
yellow: 'text-yellow-400 border-yellow-400 hover:bg-yellow-400 hover:shadow-[0_0_20px_#ffff00,0_0_40px_#ffff00]',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const sizeStyles = {
|
|
21
|
+
sm: 'px-5 py-2 text-xs tracking-wide',
|
|
22
|
+
md: 'px-8 py-3 text-sm tracking-wider',
|
|
23
|
+
lg: 'px-12 py-4 text-base tracking-widest',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const NeonButton = forwardRef<HTMLButtonElement, NeonButtonProps>(
|
|
27
|
+
({ children, variant = 'cyan', size = 'md', glowing = false, className = '', ...props }, ref) => {
|
|
28
|
+
return (
|
|
29
|
+
<button
|
|
30
|
+
ref={ref}
|
|
31
|
+
className={`
|
|
32
|
+
relative inline-flex items-center justify-center
|
|
33
|
+
font-['Orbitron',sans-serif] font-bold uppercase
|
|
34
|
+
bg-transparent border-2 cursor-pointer overflow-hidden
|
|
35
|
+
transition-all duration-300 ease-out
|
|
36
|
+
hover:text-[#0a0a0f] active:scale-[0.98]
|
|
37
|
+
${variantStyles[variant]}
|
|
38
|
+
${sizeStyles[size]}
|
|
39
|
+
${glowing ? 'animate-pulse' : ''}
|
|
40
|
+
${className}
|
|
41
|
+
`}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
{children}
|
|
45
|
+
</button>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
NeonButton.displayName = 'NeonButton';
|
|
51
|
+
export default NeonButton;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
import styles from './neon-divider.module.css';
|
|
5
|
+
|
|
6
|
+
export interface NeonDividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple' | 'gradient';
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
text?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const NeonDivider = forwardRef<HTMLDivElement, NeonDividerProps>(
|
|
13
|
+
({ variant = 'cyan', animated = false, text, className, ...props }, ref) => {
|
|
14
|
+
const classes = [styles.divider, styles[variant], animated && styles.animated, className].filter(Boolean).join(' ');
|
|
15
|
+
return (
|
|
16
|
+
<div ref={ref} className={classes} {...props}>
|
|
17
|
+
<span className={styles.line} />
|
|
18
|
+
{text && <span className={styles.text}>{text}</span>}
|
|
19
|
+
<span className={styles.line} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
NeonDivider.displayName = 'NeonDivider';
|
|
26
|
+
export default NeonDivider;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.divider {
|
|
2
|
+
--divider-color: #00f0ff;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 1rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.cyan { --divider-color: #00f0ff; }
|
|
9
|
+
.pink { --divider-color: #ff00ff; }
|
|
10
|
+
.green { --divider-color: #00ff88; }
|
|
11
|
+
.purple { --divider-color: #a855f7; }
|
|
12
|
+
|
|
13
|
+
.line {
|
|
14
|
+
flex: 1;
|
|
15
|
+
height: 1px;
|
|
16
|
+
background: linear-gradient(90deg, transparent, var(--divider-color), transparent);
|
|
17
|
+
box-shadow: 0 0 8px var(--divider-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.gradient .line {
|
|
21
|
+
height: 2px;
|
|
22
|
+
background: linear-gradient(90deg, #00f0ff, #ff00ff, #00ff88);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.text {
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
padding: 0 0.5rem;
|
|
28
|
+
font-family: var(--font-display, 'Orbitron', sans-serif);
|
|
29
|
+
font-size: 0.6875rem;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
letter-spacing: 0.1875em;
|
|
33
|
+
color: var(--divider-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.animated .line {
|
|
37
|
+
animation: divider-pulse 2s ease-in-out infinite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes divider-pulse {
|
|
41
|
+
0%, 100% { box-shadow: 0 0 5px var(--divider-color); }
|
|
42
|
+
50% { box-shadow: 0 0 15px var(--divider-color); }
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface NeonDividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple' | 'gradient';
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const variantStyles = {
|
|
11
|
+
cyan: { line: 'from-transparent via-cyan-400 to-transparent shadow-[0_0_8px_#00f0ff]', text: 'text-cyan-400' },
|
|
12
|
+
pink: { line: 'from-transparent via-fuchsia-500 to-transparent shadow-[0_0_8px_#ff00ff]', text: 'text-fuchsia-500' },
|
|
13
|
+
green: { line: 'from-transparent via-emerald-400 to-transparent shadow-[0_0_8px_#00ff88]', text: 'text-emerald-400' },
|
|
14
|
+
purple: { line: 'from-transparent via-purple-500 to-transparent shadow-[0_0_8px_#a855f7]', text: 'text-purple-500' },
|
|
15
|
+
gradient: { line: 'from-cyan-400 via-fuchsia-500 to-emerald-400', text: 'text-white' },
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const NeonDivider = forwardRef<HTMLDivElement, NeonDividerProps>(
|
|
19
|
+
({ variant = 'cyan', text, className = '', ...props }, ref) => {
|
|
20
|
+
const styles = variantStyles[variant];
|
|
21
|
+
return (
|
|
22
|
+
<div ref={ref} className={`flex items-center gap-4 ${className}`} {...props}>
|
|
23
|
+
<span className={`flex-1 h-px bg-gradient-to-r ${styles.line}`} />
|
|
24
|
+
{text && (
|
|
25
|
+
<span className={`flex-shrink-0 px-2 font-['Orbitron',sans-serif] text-[11px] font-semibold uppercase tracking-widest ${styles.text}`}>
|
|
26
|
+
{text}
|
|
27
|
+
</span>
|
|
28
|
+
)}
|
|
29
|
+
<span className={`flex-1 h-px bg-gradient-to-r ${styles.line}`} />
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
NeonDivider.displayName = 'NeonDivider';
|
|
36
|
+
export default NeonDivider;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
import styles from './neon-progress.module.css';
|
|
5
|
+
|
|
6
|
+
export interface NeonProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** Current progress value */
|
|
8
|
+
value: number;
|
|
9
|
+
/** Maximum value */
|
|
10
|
+
max?: number;
|
|
11
|
+
/** Neon color variant */
|
|
12
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple' | 'rainbow';
|
|
13
|
+
/** Bar size */
|
|
14
|
+
size?: 'sm' | 'md' | 'lg';
|
|
15
|
+
/** Shimmer animation */
|
|
16
|
+
animated?: boolean;
|
|
17
|
+
/** Show percentage value */
|
|
18
|
+
showValue?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const NeonProgress = forwardRef<HTMLDivElement, NeonProgressProps>(
|
|
22
|
+
(
|
|
23
|
+
{
|
|
24
|
+
value,
|
|
25
|
+
max = 100,
|
|
26
|
+
variant = 'cyan',
|
|
27
|
+
size = 'md',
|
|
28
|
+
animated = true,
|
|
29
|
+
showValue = false,
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
},
|
|
33
|
+
ref
|
|
34
|
+
) => {
|
|
35
|
+
const percentage = Math.min((value / max) * 100, 100);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div
|
|
39
|
+
ref={ref}
|
|
40
|
+
className={`${styles.container} ${className || ''}`}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
<div className={`${styles.track} ${styles[size]}`}>
|
|
44
|
+
<div
|
|
45
|
+
className={`${styles.bar} ${styles[variant]} ${animated ? styles.animated : ''}`}
|
|
46
|
+
style={{ width: `${percentage}%` }}
|
|
47
|
+
/>
|
|
48
|
+
<div
|
|
49
|
+
className={styles.glow}
|
|
50
|
+
style={{ width: `${percentage}%` }}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
{showValue && (
|
|
54
|
+
<span className={`${styles.value} ${styles[variant]}`}>
|
|
55
|
+
{Math.round(percentage)}%
|
|
56
|
+
</span>
|
|
57
|
+
)}
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
NeonProgress.displayName = 'NeonProgress';
|
|
64
|
+
|
|
65
|
+
export default NeonProgress;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 0.75rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.track {
|
|
8
|
+
position: relative;
|
|
9
|
+
flex: 1;
|
|
10
|
+
height: 0.5rem;
|
|
11
|
+
background: rgba(255, 255, 255, 0.1);
|
|
12
|
+
border-radius: 0.25rem;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sm { height: 0.25rem; }
|
|
17
|
+
.md { height: 0.5rem; }
|
|
18
|
+
.lg { height: 0.75rem; }
|
|
19
|
+
|
|
20
|
+
.bar {
|
|
21
|
+
--progress-color: #00f0ff;
|
|
22
|
+
height: 100%;
|
|
23
|
+
background: var(--progress-color);
|
|
24
|
+
border-radius: 0.25rem;
|
|
25
|
+
transition: width 0.5s ease;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Variants */
|
|
29
|
+
.cyan { --progress-color: #00f0ff; }
|
|
30
|
+
.pink { --progress-color: #ff00ff; }
|
|
31
|
+
.green { --progress-color: #00ff88; }
|
|
32
|
+
.purple { --progress-color: #a855f7; }
|
|
33
|
+
|
|
34
|
+
.rainbow {
|
|
35
|
+
background: linear-gradient(90deg, #00f0ff, #ff00ff, #00ff88, #00f0ff);
|
|
36
|
+
background-size: 200% 100%;
|
|
37
|
+
animation: rainbow-shift 3s linear infinite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes rainbow-shift {
|
|
41
|
+
0% { background-position: 0% 50%; }
|
|
42
|
+
100% { background-position: 200% 50%; }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Shimmer animation */
|
|
46
|
+
.animated {
|
|
47
|
+
position: relative;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.animated::after {
|
|
52
|
+
content: '';
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0;
|
|
55
|
+
left: -100%;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
|
|
59
|
+
animation: shimmer 2s infinite;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes shimmer {
|
|
63
|
+
0% { left: -100%; }
|
|
64
|
+
100% { left: 100%; }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Glow effect */
|
|
68
|
+
.glow {
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 50%;
|
|
71
|
+
left: 0;
|
|
72
|
+
height: 1.25rem;
|
|
73
|
+
background: var(--progress-color, #00f0ff);
|
|
74
|
+
filter: blur(0.5rem);
|
|
75
|
+
opacity: 0.5;
|
|
76
|
+
transform: translateY(-50%);
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Value display */
|
|
81
|
+
.value {
|
|
82
|
+
font-family: var(--font-display, 'Orbitron', monospace);
|
|
83
|
+
font-size: 0.75rem;
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
color: var(--progress-color, #00f0ff);
|
|
86
|
+
min-width: 2.5rem;
|
|
87
|
+
text-align: right;
|
|
88
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface NeonProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
value: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple';
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
showValue?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const variantStyles = {
|
|
14
|
+
cyan: { bg: 'bg-cyan-400', text: 'text-cyan-400', glow: 'shadow-[0_0_10px_#00f0ff]' },
|
|
15
|
+
pink: { bg: 'bg-fuchsia-500', text: 'text-fuchsia-500', glow: 'shadow-[0_0_10px_#ff00ff]' },
|
|
16
|
+
green: { bg: 'bg-emerald-400', text: 'text-emerald-400', glow: 'shadow-[0_0_10px_#00ff88]' },
|
|
17
|
+
purple: { bg: 'bg-purple-500', text: 'text-purple-500', glow: 'shadow-[0_0_10px_#a855f7]' },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const sizeStyles = { sm: 'h-1', md: 'h-2', lg: 'h-3' };
|
|
21
|
+
|
|
22
|
+
export const NeonProgress = forwardRef<HTMLDivElement, NeonProgressProps>(
|
|
23
|
+
({ value, max = 100, variant = 'cyan', size = 'md', showValue = false, className = '', ...props }, ref) => {
|
|
24
|
+
const percentage = Math.min((value / max) * 100, 100);
|
|
25
|
+
const styles = variantStyles[variant];
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div ref={ref} className={`flex items-center gap-3 ${className}`} {...props}>
|
|
29
|
+
<div className={`relative flex-1 ${sizeStyles[size]} bg-white/10 rounded-full overflow-hidden`}>
|
|
30
|
+
<div
|
|
31
|
+
className={`h-full ${styles.bg} ${styles.glow} rounded-full transition-all duration-500 ease-out`}
|
|
32
|
+
style={{ width: `${percentage}%` }}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
{showValue && (
|
|
36
|
+
<span className={`font-['Orbitron',sans-serif] text-xs font-bold ${styles.text} min-w-[40px] text-right`}>
|
|
37
|
+
{Math.round(percentage)}%
|
|
38
|
+
</span>
|
|
39
|
+
)}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
NeonProgress.displayName = 'NeonProgress';
|
|
46
|
+
export default NeonProgress;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
import styles from './neon-tabs.module.css';
|
|
5
|
+
|
|
6
|
+
export interface NeonTab {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface NeonTabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
tabs: NeonTab[];
|
|
14
|
+
activeTab: string;
|
|
15
|
+
onChange: (tabId: string) => void;
|
|
16
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const NeonTabs = forwardRef<HTMLDivElement, NeonTabsProps>(
|
|
20
|
+
({ tabs, activeTab, onChange, variant = 'cyan', className, ...props }, ref) => {
|
|
21
|
+
return (
|
|
22
|
+
<div ref={ref} className={`${styles.tabs} ${styles[variant]} ${className || ''}`} role="tablist" {...props}>
|
|
23
|
+
{tabs.map((tab) => (
|
|
24
|
+
<button
|
|
25
|
+
key={tab.id}
|
|
26
|
+
role="tab"
|
|
27
|
+
aria-selected={activeTab === tab.id}
|
|
28
|
+
className={`${styles.tab} ${activeTab === tab.id ? styles.active : ''}`}
|
|
29
|
+
onClick={() => onChange(tab.id)}
|
|
30
|
+
>
|
|
31
|
+
{tab.icon && <span className={styles.icon}>{tab.icon}</span>}
|
|
32
|
+
<span className={styles.label}>{tab.label}</span>
|
|
33
|
+
</button>
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
NeonTabs.displayName = 'NeonTabs';
|
|
41
|
+
export default NeonTabs;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.tabs {
|
|
2
|
+
--tabs-color: #00f0ff;
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 0.25rem;
|
|
5
|
+
padding: 0.25rem;
|
|
6
|
+
background: rgba(0, 0, 0, 0.5);
|
|
7
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.cyan { --tabs-color: #00f0ff; }
|
|
11
|
+
.pink { --tabs-color: #ff00ff; }
|
|
12
|
+
.green { --tabs-color: #00ff88; }
|
|
13
|
+
.purple { --tabs-color: #a855f7; }
|
|
14
|
+
|
|
15
|
+
.tab {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 0.5rem;
|
|
19
|
+
padding: 0.625rem 1.25rem;
|
|
20
|
+
font-family: var(--font-display, 'Orbitron', sans-serif);
|
|
21
|
+
font-size: 0.75rem;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
text-transform: uppercase;
|
|
24
|
+
letter-spacing: 0.0625em;
|
|
25
|
+
color: rgba(255, 255, 255, 0.5);
|
|
26
|
+
background: transparent;
|
|
27
|
+
border: 1px solid transparent;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: all 0.3s ease;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tab:hover {
|
|
33
|
+
color: rgba(255, 255, 255, 0.8);
|
|
34
|
+
background: rgba(255, 255, 255, 0.05);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.active {
|
|
38
|
+
color: var(--tabs-color);
|
|
39
|
+
background: rgba(0, 240, 255, 0.1);
|
|
40
|
+
border-color: var(--tabs-color);
|
|
41
|
+
box-shadow: 0 0 10px var(--tabs-color), inset 0 0 10px rgba(0, 240, 255, 0.1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.icon { font-size: 0.875rem; }
|
|
45
|
+
.label { white-space: nowrap; }
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface NeonTab {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface NeonTabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
tabs: NeonTab[];
|
|
13
|
+
activeTab: string;
|
|
14
|
+
onChange: (tabId: string) => void;
|
|
15
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const variantStyles = {
|
|
19
|
+
cyan: { active: 'text-cyan-400 bg-cyan-400/10 border-cyan-400 shadow-[0_0_10px_#00f0ff]' },
|
|
20
|
+
pink: { active: 'text-fuchsia-500 bg-fuchsia-500/10 border-fuchsia-500 shadow-[0_0_10px_#ff00ff]' },
|
|
21
|
+
green: { active: 'text-emerald-400 bg-emerald-400/10 border-emerald-400 shadow-[0_0_10px_#00ff88]' },
|
|
22
|
+
purple: { active: 'text-purple-500 bg-purple-500/10 border-purple-500 shadow-[0_0_10px_#a855f7]' },
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const NeonTabs = forwardRef<HTMLDivElement, NeonTabsProps>(
|
|
26
|
+
({ tabs, activeTab, onChange, variant = 'cyan', className = '', ...props }, ref) => {
|
|
27
|
+
const colors = variantStyles[variant];
|
|
28
|
+
return (
|
|
29
|
+
<div ref={ref} className={`flex gap-1 p-1 bg-black/50 border border-white/10 ${className}`} role="tablist" {...props}>
|
|
30
|
+
{tabs.map((tab) => (
|
|
31
|
+
<button
|
|
32
|
+
key={tab.id}
|
|
33
|
+
role="tab"
|
|
34
|
+
aria-selected={activeTab === tab.id}
|
|
35
|
+
className={`
|
|
36
|
+
flex items-center gap-2 px-5 py-2.5
|
|
37
|
+
font-['Orbitron',sans-serif] text-xs font-semibold uppercase tracking-wide
|
|
38
|
+
border transition-all duration-300 cursor-pointer
|
|
39
|
+
${activeTab === tab.id ? colors.active : 'text-white/50 bg-transparent border-transparent hover:text-white/80 hover:bg-white/5'}
|
|
40
|
+
`}
|
|
41
|
+
onClick={() => onChange(tab.id)}
|
|
42
|
+
>
|
|
43
|
+
{tab.icon && <span className="text-sm">{tab.icon}</span>}
|
|
44
|
+
<span className="whitespace-nowrap">{tab.label}</span>
|
|
45
|
+
</button>
|
|
46
|
+
))}
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
NeonTabs.displayName = 'NeonTabs';
|
|
53
|
+
export default NeonTabs;
|