@oalacea/chaosui 0.1.0 → 0.5.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 +105 -13
- package/components/backgrounds/glow-orbs/index.tsx +1 -1
- package/components/buttons/chaos-button/chaos-button.module.css +3 -2
- package/components/buttons/cta-brutal/cta-brutal.module.css +81 -0
- package/components/buttons/cta-brutal/index.tsx +56 -0
- package/components/buttons/dead-button/dead-button.module.css +111 -0
- package/components/buttons/dead-button/index.tsx +47 -0
- package/components/buttons/deeper-button/deeper-button.module.css +76 -0
- package/components/buttons/deeper-button/index.tsx +51 -0
- package/components/buttons/dual-choice/dual-choice.module.css +90 -0
- package/components/buttons/dual-choice/index.tsx +54 -0
- package/components/buttons/glitch-button/glitch-button.module.css +7 -7
- package/components/buttons/tension-bar/index.tsx +79 -0
- package/components/buttons/tension-bar/tension-bar.module.css +105 -0
- 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/decorative/coffee-stain/coffee-stain.module.css +24 -0
- package/components/decorative/coffee-stain/index.tsx +55 -0
- package/components/decorative/ornaments/index.tsx +51 -0
- package/components/decorative/ornaments/ornaments.module.css +33 -0
- package/components/decorative/rune-symbols/index.tsx +55 -0
- package/components/decorative/rune-symbols/rune-symbols.module.css +22 -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/layout/horizontal-scroll/horizontal-scroll.module.css +30 -0
- package/components/layout/horizontal-scroll/index.tsx +78 -0
- package/components/layout/spec-grid/index.tsx +56 -0
- package/components/layout/spec-grid/spec-grid.module.css +21 -0
- package/components/layout/tower-pricing/index.tsx +56 -0
- package/components/layout/tower-pricing/tower-pricing.module.css +27 -0
- package/components/layout/tracklist/index.tsx +45 -0
- package/components/layout/tracklist/tracklist.module.css +24 -0
- package/components/layout/void-frame/index.tsx +32 -0
- package/components/layout/void-frame/void-frame.module.css +38 -0
- package/components/navigation/brutal-nav/brutal-nav.module.css +85 -0
- package/components/navigation/brutal-nav/index.tsx +71 -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/navigation/progress-dots/index.tsx +55 -0
- package/components/navigation/progress-dots/progress-dots.module.css +91 -0
- package/components/navigation/scattered-nav/index.tsx +59 -0
- package/components/navigation/scattered-nav/scattered-nav.module.css +113 -0
- package/components/navigation/scroll-indicator/index.tsx +58 -0
- package/components/navigation/scroll-indicator/scroll-indicator.module.css +82 -0
- package/components/navigation/vertical-nav/index.tsx +59 -0
- package/components/navigation/vertical-nav/vertical-nav.module.css +98 -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/ascii-art/css/ascii-art.module.css +173 -0
- package/components/text/ascii-art/css/index.tsx +116 -0
- package/components/text/ascii-art/tailwind/index.tsx +124 -0
- package/components/text/blood-drip/css/blood-drip.module.css +142 -0
- package/components/text/blood-drip/css/index.tsx +113 -0
- package/components/text/blood-drip/tailwind/index.tsx +133 -0
- package/components/text/char-glitch/css/char-glitch.module.css +124 -0
- package/components/text/char-glitch/css/index.tsx +153 -0
- package/components/text/char-glitch/tailwind/index.tsx +126 -0
- package/components/text/countdown-display/css/countdown-display.module.css +179 -0
- package/components/text/countdown-display/css/index.tsx +190 -0
- package/components/text/countdown-display/tailwind/index.tsx +155 -0
- package/components/text/giant-layers/css/giant-layers.module.css +156 -0
- package/components/text/giant-layers/css/index.tsx +97 -0
- package/components/text/giant-layers/tailwind/index.tsx +111 -0
- package/components/text/glitch-text/glitch-text.module.css +2 -2
- package/components/text/reveal-text/css/index.tsx +180 -0
- package/components/text/reveal-text/css/reveal-text.module.css +129 -0
- package/components/text/reveal-text/tailwind/index.tsx +135 -0
- package/components/text/rotate-text/css/index.tsx +139 -0
- package/components/text/rotate-text/css/rotate-text.module.css +162 -0
- package/components/text/rotate-text/tailwind/index.tsx +127 -0
- package/components/text/strike-reveal/css/index.tsx +124 -0
- package/components/text/strike-reveal/css/strike-reveal.module.css +139 -0
- package/components/text/strike-reveal/tailwind/index.tsx +138 -0
- package/components/text/terminal-output/css/index.tsx +179 -0
- package/components/text/terminal-output/css/terminal-output.module.css +203 -0
- package/components/text/terminal-output/tailwind/index.tsx +174 -0
- package/components/text/typing-text/css/index.tsx +115 -0
- package/components/text/typing-text/css/typing-text.module.css +84 -0
- package/components/text/typing-text/tailwind/index.tsx +126 -0
- 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,45 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
import styles from './glowing-border.module.css';
|
|
5
|
+
|
|
6
|
+
export interface GlowingBorderProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** Neon color variant */
|
|
8
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple' | 'rainbow';
|
|
9
|
+
/** Pulse animation */
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
/** Glow intensity */
|
|
12
|
+
intensity?: 'low' | 'medium' | 'high';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const GlowingBorder = forwardRef<HTMLDivElement, GlowingBorderProps>(
|
|
16
|
+
(
|
|
17
|
+
{
|
|
18
|
+
children,
|
|
19
|
+
variant = 'cyan',
|
|
20
|
+
animated = true,
|
|
21
|
+
intensity = 'medium',
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
},
|
|
25
|
+
ref
|
|
26
|
+
) => {
|
|
27
|
+
const classes = [
|
|
28
|
+
styles.container,
|
|
29
|
+
styles[variant],
|
|
30
|
+
styles[intensity],
|
|
31
|
+
animated && styles.animated,
|
|
32
|
+
className,
|
|
33
|
+
].filter(Boolean).join(' ');
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div ref={ref} className={classes} {...props}>
|
|
37
|
+
<div className={styles.content}>{children}</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
GlowingBorder.displayName = 'GlowingBorder';
|
|
44
|
+
|
|
45
|
+
export default GlowingBorder;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface GlowingBorderProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple';
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const variantStyles = {
|
|
11
|
+
cyan: 'bg-cyan-400 shadow-[0_0_15px_#00f0ff]',
|
|
12
|
+
pink: 'bg-fuchsia-500 shadow-[0_0_15px_#ff00ff]',
|
|
13
|
+
green: 'bg-emerald-400 shadow-[0_0_15px_#00ff88]',
|
|
14
|
+
purple: 'bg-purple-500 shadow-[0_0_15px_#a855f7]',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const GlowingBorder = forwardRef<HTMLDivElement, GlowingBorderProps>(
|
|
18
|
+
({ children, variant = 'cyan', animated = true, className = '', ...props }, ref) => {
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={`
|
|
23
|
+
relative p-0.5 rounded-lg
|
|
24
|
+
${variantStyles[variant]}
|
|
25
|
+
${animated ? 'animate-pulse' : ''}
|
|
26
|
+
hover:brightness-125 transition-all duration-300
|
|
27
|
+
${className}
|
|
28
|
+
`}
|
|
29
|
+
{...props}
|
|
30
|
+
>
|
|
31
|
+
<div className="relative bg-[#0a0a0f] rounded-md">
|
|
32
|
+
{children}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
GlowingBorder.displayName = 'GlowingBorder';
|
|
40
|
+
export default GlowingBorder;
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
|
|
47
47
|
@keyframes glitch-distort-1 {
|
|
48
48
|
0%, 85%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
|
|
49
|
-
86% { opacity: 1; clip-path: inset(20% 0 60% 0); transform: translateX(var(--shift, -5px)); background:
|
|
49
|
+
86% { opacity: 1; clip-path: inset(20% 0 60% 0); transform: translateX(var(--shift, -5px)); background: hsl(var(--primary, 347 100% 50%) / 0.1); }
|
|
50
50
|
88% { opacity: 1; clip-path: inset(50% 0 30% 0); transform: translateX(var(--shift, 5px)); }
|
|
51
51
|
90% { opacity: 0; }
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
@keyframes glitch-distort-2 {
|
|
55
55
|
0%, 85%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
|
|
56
|
-
87% { opacity: 1; clip-path: inset(40% 0 40% 0); transform: translateX(var(--shift, 3px)); background:
|
|
56
|
+
87% { opacity: 1; clip-path: inset(40% 0 40% 0); transform: translateX(var(--shift, 3px)); background: hsl(var(--secondary, 180 100% 50%) / 0.1); }
|
|
57
57
|
89% { opacity: 1; clip-path: inset(70% 0 10% 0); transform: translateX(var(--shift, -3px)); }
|
|
58
58
|
91% { opacity: 0; }
|
|
59
59
|
}
|
|
@@ -22,8 +22,8 @@ export const WarningTape = forwardRef<HTMLDivElement, WarningTapeProps>(
|
|
|
22
22
|
(
|
|
23
23
|
{
|
|
24
24
|
children,
|
|
25
|
-
bgColor
|
|
26
|
-
textColor
|
|
25
|
+
bgColor,
|
|
26
|
+
textColor,
|
|
27
27
|
duration = 20,
|
|
28
28
|
rotation = -1,
|
|
29
29
|
reverse = false,
|
|
@@ -41,8 +41,8 @@ export const WarningTape = forwardRef<HTMLDivElement, WarningTapeProps>(
|
|
|
41
41
|
ref={ref}
|
|
42
42
|
className={`${styles.tape} ${className || ''}`}
|
|
43
43
|
style={{
|
|
44
|
-
backgroundColor: bgColor,
|
|
45
|
-
color: textColor,
|
|
44
|
+
...(bgColor && { backgroundColor: bgColor }),
|
|
45
|
+
...(textColor && { color: textColor }),
|
|
46
46
|
transform: `rotate(${rotation}deg) scale(1.1)`,
|
|
47
47
|
...style,
|
|
48
48
|
}}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
--grid-color: #00f0ff;
|
|
3
|
+
|
|
4
|
+
width: 100%;
|
|
5
|
+
font-family: var(--font-mono, 'Share Tech Mono', monospace);
|
|
6
|
+
background: rgba(0, 0, 0, 0.5);
|
|
7
|
+
border: 1px solid var(--grid-color);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.cyan { --grid-color: #00f0ff; }
|
|
12
|
+
.green { --grid-color: #00ff88; }
|
|
13
|
+
.amber { --grid-color: #ffaa00; }
|
|
14
|
+
|
|
15
|
+
.table {
|
|
16
|
+
width: 100%;
|
|
17
|
+
border-collapse: collapse;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.headerRow {
|
|
21
|
+
background: rgba(0, 240, 255, 0.1);
|
|
22
|
+
border-bottom: 1px solid var(--grid-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.header {
|
|
26
|
+
padding: 0.75rem 1rem;
|
|
27
|
+
font-size: 0.6875rem;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
text-align: left;
|
|
30
|
+
text-transform: uppercase;
|
|
31
|
+
letter-spacing: 0.125em;
|
|
32
|
+
color: var(--grid-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.row {
|
|
36
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
37
|
+
transition: background 0.2s ease;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.striped:nth-child(even) {
|
|
41
|
+
background: rgba(255, 255, 255, 0.02);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.hoverable:hover {
|
|
45
|
+
background: rgba(0, 240, 255, 0.1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cell {
|
|
49
|
+
padding: 0.625rem 1rem;
|
|
50
|
+
font-size: 0.8125rem;
|
|
51
|
+
color: rgba(255, 255, 255, 0.8);
|
|
52
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, TableHTMLAttributes } from 'react';
|
|
4
|
+
import styles from './data-grid.module.css';
|
|
5
|
+
|
|
6
|
+
export interface DataGridColumn<T> {
|
|
7
|
+
key: keyof T;
|
|
8
|
+
header: string;
|
|
9
|
+
width?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface DataGridProps<T extends Record<string, unknown>> extends Omit<TableHTMLAttributes<HTMLTableElement>, 'children'> {
|
|
13
|
+
/** Column definitions */
|
|
14
|
+
columns: DataGridColumn<T>[];
|
|
15
|
+
/** Data rows */
|
|
16
|
+
data: T[];
|
|
17
|
+
/** Color variant */
|
|
18
|
+
variant?: 'cyan' | 'green' | 'amber';
|
|
19
|
+
/** Striped rows */
|
|
20
|
+
striped?: boolean;
|
|
21
|
+
/** Hoverable rows */
|
|
22
|
+
hoverable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function DataGridInner<T extends Record<string, unknown>>(
|
|
26
|
+
{
|
|
27
|
+
columns,
|
|
28
|
+
data,
|
|
29
|
+
variant = 'cyan',
|
|
30
|
+
striped = true,
|
|
31
|
+
hoverable = true,
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: DataGridProps<T>,
|
|
35
|
+
ref: React.ForwardedRef<HTMLTableElement>
|
|
36
|
+
) {
|
|
37
|
+
return (
|
|
38
|
+
<div className={`${styles.container} ${styles[variant]} ${className || ''}`}>
|
|
39
|
+
<table ref={ref} className={styles.table} {...props}>
|
|
40
|
+
<thead>
|
|
41
|
+
<tr className={styles.headerRow}>
|
|
42
|
+
{columns.map((col) => (
|
|
43
|
+
<th
|
|
44
|
+
key={String(col.key)}
|
|
45
|
+
className={styles.header}
|
|
46
|
+
style={{ width: col.width }}
|
|
47
|
+
>
|
|
48
|
+
{col.header}
|
|
49
|
+
</th>
|
|
50
|
+
))}
|
|
51
|
+
</tr>
|
|
52
|
+
</thead>
|
|
53
|
+
<tbody>
|
|
54
|
+
{data.map((row, i) => (
|
|
55
|
+
<tr
|
|
56
|
+
key={i}
|
|
57
|
+
className={`${styles.row} ${striped ? styles.striped : ''} ${hoverable ? styles.hoverable : ''}`}
|
|
58
|
+
>
|
|
59
|
+
{columns.map((col) => (
|
|
60
|
+
<td key={String(col.key)} className={styles.cell}>
|
|
61
|
+
{String(row[col.key])}
|
|
62
|
+
</td>
|
|
63
|
+
))}
|
|
64
|
+
</tr>
|
|
65
|
+
))}
|
|
66
|
+
</tbody>
|
|
67
|
+
</table>
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const DataGrid = forwardRef(DataGridInner) as <T extends Record<string, unknown>>(
|
|
73
|
+
props: DataGridProps<T> & { ref?: React.ForwardedRef<HTMLTableElement> }
|
|
74
|
+
) => JSX.Element;
|
|
75
|
+
|
|
76
|
+
export default DataGrid;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, TableHTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface DataGridColumn<T> {
|
|
6
|
+
key: keyof T;
|
|
7
|
+
header: string;
|
|
8
|
+
width?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface DataGridProps<T extends Record<string, unknown>> extends Omit<TableHTMLAttributes<HTMLTableElement>, 'children'> {
|
|
12
|
+
columns: DataGridColumn<T>[];
|
|
13
|
+
data: T[];
|
|
14
|
+
variant?: 'cyan' | 'green' | 'amber';
|
|
15
|
+
striped?: boolean;
|
|
16
|
+
hoverable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const variantStyles = {
|
|
20
|
+
cyan: { border: 'border-cyan-400', header: 'text-cyan-400 bg-cyan-400/10', hover: 'hover:bg-cyan-400/10' },
|
|
21
|
+
green: { border: 'border-emerald-400', header: 'text-emerald-400 bg-emerald-400/10', hover: 'hover:bg-emerald-400/10' },
|
|
22
|
+
amber: { border: 'border-amber-400', header: 'text-amber-400 bg-amber-400/10', hover: 'hover:bg-amber-400/10' },
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function DataGridInner<T extends Record<string, unknown>>(
|
|
26
|
+
{ columns, data, variant = 'cyan', striped = true, hoverable = true, className = '', ...props }: DataGridProps<T>,
|
|
27
|
+
ref: React.ForwardedRef<HTMLTableElement>
|
|
28
|
+
) {
|
|
29
|
+
const colors = variantStyles[variant];
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className={`w-full font-['Share_Tech_Mono',monospace] bg-black/50 border ${colors.border} overflow-hidden ${className}`}>
|
|
33
|
+
<table ref={ref} className="w-full border-collapse" {...props}>
|
|
34
|
+
<thead>
|
|
35
|
+
<tr className={`${colors.header} border-b ${colors.border}`}>
|
|
36
|
+
{columns.map((col) => (
|
|
37
|
+
<th
|
|
38
|
+
key={String(col.key)}
|
|
39
|
+
className="px-4 py-3 text-left text-[11px] font-bold uppercase tracking-widest"
|
|
40
|
+
style={{ width: col.width }}
|
|
41
|
+
>
|
|
42
|
+
{col.header}
|
|
43
|
+
</th>
|
|
44
|
+
))}
|
|
45
|
+
</tr>
|
|
46
|
+
</thead>
|
|
47
|
+
<tbody>
|
|
48
|
+
{data.map((row, i) => (
|
|
49
|
+
<tr
|
|
50
|
+
key={i}
|
|
51
|
+
className={`
|
|
52
|
+
border-b border-white/5 transition-colors duration-200
|
|
53
|
+
${striped && i % 2 === 1 ? 'bg-white/[0.02]' : ''}
|
|
54
|
+
${hoverable ? colors.hover : ''}
|
|
55
|
+
`}
|
|
56
|
+
>
|
|
57
|
+
{columns.map((col) => (
|
|
58
|
+
<td key={String(col.key)} className="px-4 py-2.5 text-[13px] text-white/80">
|
|
59
|
+
{String(row[col.key])}
|
|
60
|
+
</td>
|
|
61
|
+
))}
|
|
62
|
+
</tr>
|
|
63
|
+
))}
|
|
64
|
+
</tbody>
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const DataGrid = forwardRef(DataGridInner) as <T extends Record<string, unknown>>(
|
|
71
|
+
props: DataGridProps<T> & { ref?: React.ForwardedRef<HTMLTableElement> }
|
|
72
|
+
) => JSX.Element;
|
|
73
|
+
|
|
74
|
+
export default DataGrid;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
.card {
|
|
2
|
+
--holo-color: #00f0ff;
|
|
3
|
+
--holo-bg: rgba(0, 240, 255, 0.05);
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
padding: 1.5rem;
|
|
7
|
+
background: var(--holo-bg);
|
|
8
|
+
border: 1px solid var(--holo-color);
|
|
9
|
+
border-radius: 0.25rem;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.card::before {
|
|
14
|
+
content: '';
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 0;
|
|
17
|
+
left: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
height: 2px;
|
|
20
|
+
background: linear-gradient(90deg, transparent, var(--holo-color), transparent);
|
|
21
|
+
animation: scan-line 3s linear infinite;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes scan-line {
|
|
25
|
+
0% { top: 0; opacity: 1; }
|
|
26
|
+
50% { opacity: 0.5; }
|
|
27
|
+
100% { top: 100%; opacity: 1; }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Variants */
|
|
31
|
+
.cyan {
|
|
32
|
+
--holo-color: #00f0ff;
|
|
33
|
+
--holo-bg: rgba(0, 240, 255, 0.05);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pink {
|
|
37
|
+
--holo-color: #ff00ff;
|
|
38
|
+
--holo-bg: rgba(255, 0, 255, 0.05);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.green {
|
|
42
|
+
--holo-color: #00ff88;
|
|
43
|
+
--holo-bg: rgba(0, 255, 136, 0.05);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.purple {
|
|
47
|
+
--holo-color: #a855f7;
|
|
48
|
+
--holo-bg: rgba(168, 85, 247, 0.05);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.content {
|
|
52
|
+
position: relative;
|
|
53
|
+
z-index: 2;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.scanlines {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
background: repeating-linear-gradient(
|
|
63
|
+
0deg,
|
|
64
|
+
transparent,
|
|
65
|
+
transparent 2px,
|
|
66
|
+
rgba(0, 0, 0, 0.1) 2px,
|
|
67
|
+
rgba(0, 0, 0, 0.1) 4px
|
|
68
|
+
);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
z-index: 3;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.glow {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: -50%;
|
|
76
|
+
left: -50%;
|
|
77
|
+
width: 200%;
|
|
78
|
+
height: 200%;
|
|
79
|
+
background: radial-gradient(circle, var(--holo-bg) 0%, transparent 70%);
|
|
80
|
+
opacity: 0.5;
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
z-index: 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.flicker {
|
|
86
|
+
animation: hologram-flicker 4s infinite;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@keyframes hologram-flicker {
|
|
90
|
+
0%, 100% { opacity: 1; }
|
|
91
|
+
92% { opacity: 1; }
|
|
92
|
+
93% { opacity: 0.8; }
|
|
93
|
+
94% { opacity: 1; }
|
|
94
|
+
95% { opacity: 0.9; }
|
|
95
|
+
96% { opacity: 1; }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.card:hover {
|
|
99
|
+
box-shadow:
|
|
100
|
+
0 0 20px var(--holo-color),
|
|
101
|
+
inset 0 0 20px rgba(0, 240, 255, 0.1);
|
|
102
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes } from 'react';
|
|
4
|
+
import styles from './hologram-card.module.css';
|
|
5
|
+
|
|
6
|
+
export interface HologramCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** Neon color variant */
|
|
8
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple';
|
|
9
|
+
/** Show CRT scanlines */
|
|
10
|
+
scanlines?: boolean;
|
|
11
|
+
/** Flicker effect */
|
|
12
|
+
flicker?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const HologramCard = forwardRef<HTMLDivElement, HologramCardProps>(
|
|
16
|
+
(
|
|
17
|
+
{
|
|
18
|
+
children,
|
|
19
|
+
variant = 'cyan',
|
|
20
|
+
scanlines = true,
|
|
21
|
+
flicker = false,
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
},
|
|
25
|
+
ref
|
|
26
|
+
) => {
|
|
27
|
+
const classes = [
|
|
28
|
+
styles.card,
|
|
29
|
+
styles[variant],
|
|
30
|
+
flicker && styles.flicker,
|
|
31
|
+
className,
|
|
32
|
+
].filter(Boolean).join(' ');
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div ref={ref} className={classes} {...props}>
|
|
36
|
+
<div className={styles.content}>{children}</div>
|
|
37
|
+
{scanlines && <div className={styles.scanlines} />}
|
|
38
|
+
<div className={styles.glow} />
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
HologramCard.displayName = 'HologramCard';
|
|
45
|
+
|
|
46
|
+
export default HologramCard;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes, useId } from 'react';
|
|
4
|
+
|
|
5
|
+
export interface HologramCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
variant?: 'cyan' | 'pink' | 'green' | 'purple';
|
|
7
|
+
scanlines?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const variantStyles = {
|
|
11
|
+
cyan: { border: 'border-cyan-400', bg: 'bg-cyan-400/5', glow: 'hover:shadow-[0_0_20px_#00f0ff]', color: '#00f0ff' },
|
|
12
|
+
pink: { border: 'border-fuchsia-500', bg: 'bg-fuchsia-500/5', glow: 'hover:shadow-[0_0_20px_#ff00ff]', color: '#ff00ff' },
|
|
13
|
+
green: { border: 'border-emerald-400', bg: 'bg-emerald-400/5', glow: 'hover:shadow-[0_0_20px_#00ff88]', color: '#00ff88' },
|
|
14
|
+
purple: { border: 'border-purple-500', bg: 'bg-purple-500/5', glow: 'hover:shadow-[0_0_20px_#a855f7]', color: '#a855f7' },
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const HologramCard = forwardRef<HTMLDivElement, HologramCardProps>(
|
|
18
|
+
({ children, variant = 'cyan', scanlines = true, className = '', ...props }, ref) => {
|
|
19
|
+
const id = useId();
|
|
20
|
+
const styles = variantStyles[variant];
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
<style>{`
|
|
25
|
+
@keyframes scan-${id} {
|
|
26
|
+
0% { top: 0; opacity: 1; }
|
|
27
|
+
50% { opacity: 0.5; }
|
|
28
|
+
100% { top: 100%; opacity: 1; }
|
|
29
|
+
}
|
|
30
|
+
`}</style>
|
|
31
|
+
<div
|
|
32
|
+
ref={ref}
|
|
33
|
+
className={`
|
|
34
|
+
relative p-6 rounded border ${styles.border} ${styles.bg}
|
|
35
|
+
overflow-hidden transition-shadow duration-300 ${styles.glow}
|
|
36
|
+
${className}
|
|
37
|
+
`}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
<div
|
|
41
|
+
className="absolute left-0 right-0 h-0.5"
|
|
42
|
+
style={{
|
|
43
|
+
background: `linear-gradient(90deg, transparent, ${styles.color}, transparent)`,
|
|
44
|
+
animation: `scan-${id} 3s linear infinite`,
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
<div className="relative z-10">{children}</div>
|
|
48
|
+
{scanlines && (
|
|
49
|
+
<div
|
|
50
|
+
className="absolute inset-0 pointer-events-none z-20"
|
|
51
|
+
style={{ background: 'repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px)' }}
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
</>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
HologramCard.displayName = 'HologramCard';
|
|
61
|
+
export default HologramCard;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
--scroll-accent: #00f0ff;
|
|
3
|
+
--scroll-bg: rgba(0, 0, 0, 0.3);
|
|
4
|
+
--panel-gap: 2rem;
|
|
5
|
+
width: 100%;
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
overflow-y: hidden;
|
|
8
|
+
scroll-snap-type: x mandatory;
|
|
9
|
+
scroll-behavior: smooth;
|
|
10
|
+
-webkit-overflow-scrolling: touch;
|
|
11
|
+
scrollbar-width: thin;
|
|
12
|
+
scrollbar-color: var(--scroll-accent) var(--scroll-bg);
|
|
13
|
+
}
|
|
14
|
+
.container::-webkit-scrollbar { height: 4px; }
|
|
15
|
+
.container::-webkit-scrollbar-track { background: var(--scroll-bg); }
|
|
16
|
+
.container::-webkit-scrollbar-thumb { background: var(--scroll-accent); border-radius: 2px; }
|
|
17
|
+
.track { display: flex; gap: var(--panel-gap); padding: 1rem 0; width: max-content; }
|
|
18
|
+
.panel { flex: 0 0 auto; scroll-snap-align: start; }
|
|
19
|
+
.cyan { --scroll-accent: #00f0ff; }
|
|
20
|
+
.green { --scroll-accent: #00ff88; }
|
|
21
|
+
.amber { --scroll-accent: #ffaa00; }
|
|
22
|
+
.blood { --scroll-accent: #8b1a1a; }
|
|
23
|
+
.panelFull { width: 100vw; }
|
|
24
|
+
.panelLarge { width: 80vw; }
|
|
25
|
+
.panelMedium { width: 60vw; }
|
|
26
|
+
.panelSmall { width: 40vw; }
|
|
27
|
+
.fadeEdges { mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%); }
|
|
28
|
+
.indicators { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
|
|
29
|
+
.indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--scroll-bg); border: 1px solid var(--scroll-accent); cursor: pointer; transition: all 0.3s ease; }
|
|
30
|
+
.indicator:hover, .indicatorActive { background: var(--scroll-accent); box-shadow: 0 0 10px var(--scroll-accent); }
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { forwardRef, HTMLAttributes, ReactNode, useRef, useState, useEffect } from 'react';
|
|
4
|
+
import styles from './horizontal-scroll.module.css';
|
|
5
|
+
|
|
6
|
+
export interface HorizontalScrollProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
variant?: 'cyan' | 'green' | 'amber' | 'blood';
|
|
9
|
+
panelSize?: 'full' | 'large' | 'medium' | 'small';
|
|
10
|
+
fadeEdges?: boolean;
|
|
11
|
+
showIndicators?: boolean;
|
|
12
|
+
gap?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const HorizontalScroll = forwardRef<HTMLDivElement, HorizontalScrollProps>(
|
|
16
|
+
({ children, variant = 'cyan', panelSize = 'large', fadeEdges = false, showIndicators = false, gap = 2, className, style, ...props }, ref) => {
|
|
17
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
18
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
19
|
+
const [panelCount, setPanelCount] = useState(0);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const container = containerRef.current;
|
|
23
|
+
if (!container) return;
|
|
24
|
+
const panels = container.querySelectorAll(`.${styles.panel}`);
|
|
25
|
+
setPanelCount(panels.length);
|
|
26
|
+
|
|
27
|
+
const handleScroll = () => {
|
|
28
|
+
if (!container) return;
|
|
29
|
+
const panelWidth = container.scrollWidth / panels.length;
|
|
30
|
+
setActiveIndex(Math.round(container.scrollLeft / panelWidth));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
container.addEventListener('scroll', handleScroll, { passive: true });
|
|
34
|
+
return () => container.removeEventListener('scroll', handleScroll);
|
|
35
|
+
}, [children]);
|
|
36
|
+
|
|
37
|
+
const scrollToPanel = (index: number) => {
|
|
38
|
+
const container = containerRef.current;
|
|
39
|
+
if (!container) return;
|
|
40
|
+
const panelWidth = container.scrollWidth / panelCount;
|
|
41
|
+
container.scrollTo({ left: panelWidth * index, behavior: 'smooth' });
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const panelSizeClass = { full: styles.panelFull, large: styles.panelLarge, medium: styles.panelMedium, small: styles.panelSmall }[panelSize];
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div className={className}>
|
|
48
|
+
<div
|
|
49
|
+
ref={(node) => {
|
|
50
|
+
(containerRef as React.MutableRefObject<HTMLDivElement | null>).current = node;
|
|
51
|
+
if (typeof ref === 'function') ref(node);
|
|
52
|
+
else if (ref) ref.current = node;
|
|
53
|
+
}}
|
|
54
|
+
className={`${styles.container} ${styles[variant]} ${fadeEdges ? styles.fadeEdges : ''}`}
|
|
55
|
+
style={{ '--panel-gap': `${gap}rem`, ...style } as React.CSSProperties}
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
<div className={styles.track}>
|
|
59
|
+
{Array.isArray(children)
|
|
60
|
+
? children.map((child, i) => <div key={i} className={`${styles.panel} ${panelSizeClass}`}>{child}</div>)
|
|
61
|
+
: <div className={`${styles.panel} ${panelSizeClass}`}>{children}</div>
|
|
62
|
+
}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
{showIndicators && panelCount > 1 && (
|
|
66
|
+
<div className={styles.indicators}>
|
|
67
|
+
{Array.from({ length: panelCount }).map((_, i) => (
|
|
68
|
+
<button key={i} className={`${styles.indicator} ${i === activeIndex ? styles.indicatorActive : ''}`} onClick={() => scrollToPanel(i)} aria-label={`Go to panel ${i + 1}`} />
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
HorizontalScroll.displayName = 'HorizontalScroll';
|
|
78
|
+
export default HorizontalScroll;
|