@alexandretav/aleui 1.0.0 → 1.1.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/cli.js +125 -0
- package/package.json +10 -8
- package/src/components/accordion/accordion.tsx +103 -0
- package/src/components/accordion/index.ts +2 -0
- package/src/components/aero-bubble/aero-bubble.tsx +51 -0
- package/src/components/aero-bubble/index.ts +2 -0
- package/src/components/aero-button/aero-button.tsx +49 -0
- package/src/components/aero-button/index.ts +2 -0
- package/src/components/aero-button/shiny-button.tsx +83 -0
- package/src/components/aero-card/aero-card.tsx +43 -0
- package/src/components/aero-card/index.ts +2 -0
- package/src/components/aero-input/aero-input.tsx +41 -0
- package/src/components/aero-input/index.ts +2 -0
- package/src/components/button/button.tsx +50 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/card/card.tsx +43 -0
- package/src/components/card/index.ts +2 -0
- package/src/components/index.ts +30 -0
- package/src/components/input/index.ts +2 -0
- package/src/components/input/input.tsx +49 -0
- package/src/components/modal/index.ts +2 -0
- package/src/components/modal/modal.tsx +82 -0
- package/src/theme/glass.ts +124 -0
- package/src/utils/index.ts +39 -0
- package/dist/index.d.mts +0 -137
- package/dist/index.d.ts +0 -137
- package/dist/index.js +0 -417
- package/dist/index.mjs +0 -371
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getGlassClasses, GlassVariantType } from '@/theme/glass';
|
|
3
|
+
|
|
4
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
variant?: GlassVariantType;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Input: React.FC<InputProps> = ({
|
|
11
|
+
variant = 'light',
|
|
12
|
+
fullWidth = false,
|
|
13
|
+
label,
|
|
14
|
+
className = '',
|
|
15
|
+
id,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const glassClasses = getGlassClasses(variant);
|
|
19
|
+
const widthClass = fullWidth ? 'w-full' : '';
|
|
20
|
+
const inputId = id || label?.toLowerCase().replace(/\s+/g, '-');
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className={`flex flex-col gap-2 ${widthClass}`}>
|
|
24
|
+
{label && (
|
|
25
|
+
<label
|
|
26
|
+
htmlFor={inputId}
|
|
27
|
+
className="text-white text-sm font-medium pl-1"
|
|
28
|
+
>
|
|
29
|
+
{label}
|
|
30
|
+
</label>
|
|
31
|
+
)}
|
|
32
|
+
<input
|
|
33
|
+
id={inputId}
|
|
34
|
+
className={`
|
|
35
|
+
${glassClasses}
|
|
36
|
+
${widthClass}
|
|
37
|
+
px-4 py-3
|
|
38
|
+
text-white placeholder-white/50
|
|
39
|
+
transition-all duration-300
|
|
40
|
+
focus:outline-none focus:ring-2 focus:ring-white/50
|
|
41
|
+
${className}
|
|
42
|
+
`}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default Input;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { getGlassClasses, GlassVariantType } from '@/theme/glass';
|
|
3
|
+
|
|
4
|
+
export interface ModalProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
variant?: GlassVariantType;
|
|
8
|
+
title?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const sizeClasses = {
|
|
14
|
+
sm: 'max-w-sm',
|
|
15
|
+
md: 'max-w-md',
|
|
16
|
+
lg: 'max-w-lg',
|
|
17
|
+
xl: 'max-w-xl',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const Modal: React.FC<ModalProps> = ({
|
|
21
|
+
isOpen,
|
|
22
|
+
onClose,
|
|
23
|
+
variant = 'medium',
|
|
24
|
+
title,
|
|
25
|
+
children,
|
|
26
|
+
size = 'md',
|
|
27
|
+
}) => {
|
|
28
|
+
if (!isOpen) return null;
|
|
29
|
+
|
|
30
|
+
const glassClasses = getGlassClasses(variant);
|
|
31
|
+
const sizeClass = sizeClasses[size];
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className="fixed inset-0 z-50 flex items-center justify-center p-4 animate-fadeIn"
|
|
36
|
+
onClick={onClose}
|
|
37
|
+
>
|
|
38
|
+
{/* Backdrop */}
|
|
39
|
+
<div className="absolute inset-0 bg-black/50 backdrop-blur-sm" />
|
|
40
|
+
|
|
41
|
+
{/* Modal */}
|
|
42
|
+
<div
|
|
43
|
+
className={`
|
|
44
|
+
${glassClasses}
|
|
45
|
+
${sizeClass}
|
|
46
|
+
w-full p-6 relative z-10
|
|
47
|
+
animate-scaleIn
|
|
48
|
+
`}
|
|
49
|
+
onClick={(e) => e.stopPropagation()}
|
|
50
|
+
>
|
|
51
|
+
{/* Header */}
|
|
52
|
+
{title && (
|
|
53
|
+
<div className="flex items-center justify-between mb-4">
|
|
54
|
+
<h2 className="text-2xl font-bold text-white">{title}</h2>
|
|
55
|
+
<button
|
|
56
|
+
onClick={onClose}
|
|
57
|
+
className="text-white/70 hover:text-white transition-colors p-1"
|
|
58
|
+
aria-label="Close modal"
|
|
59
|
+
>
|
|
60
|
+
<svg
|
|
61
|
+
className="w-6 h-6"
|
|
62
|
+
fill="none"
|
|
63
|
+
strokeLinecap="round"
|
|
64
|
+
strokeLinejoin="round"
|
|
65
|
+
strokeWidth="2"
|
|
66
|
+
viewBox="0 0 24 24"
|
|
67
|
+
stroke="currentColor"
|
|
68
|
+
>
|
|
69
|
+
<path d="M6 18L18 6M6 6l12 12" />
|
|
70
|
+
</svg>
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{/* Content */}
|
|
76
|
+
<div className="text-white">{children}</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default Modal;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glassmorphism Theme Configuration
|
|
3
|
+
* Define reusable glassmorphism styles and variants
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface GlassVariant {
|
|
7
|
+
background: string;
|
|
8
|
+
backdropBlur: string;
|
|
9
|
+
border: string;
|
|
10
|
+
shadow: string;
|
|
11
|
+
hover: string;
|
|
12
|
+
focus: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AeroVariant {
|
|
16
|
+
background: string;
|
|
17
|
+
backdropBlur: string;
|
|
18
|
+
border: string;
|
|
19
|
+
shadow: string;
|
|
20
|
+
hover: string;
|
|
21
|
+
focus: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Traditional Glassmorphism styles
|
|
25
|
+
export const glassVariants = {
|
|
26
|
+
light: {
|
|
27
|
+
background: 'bg-white/5',
|
|
28
|
+
backdropBlur: 'backdrop-blur-[2px]',
|
|
29
|
+
border: 'border border-white/15',
|
|
30
|
+
shadow: 'shadow-lg',
|
|
31
|
+
hover: 'hover:bg-white/10 hover:shadow-xl',
|
|
32
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-white/10',
|
|
33
|
+
},
|
|
34
|
+
medium: {
|
|
35
|
+
background: 'bg-white/20',
|
|
36
|
+
backdropBlur: 'backdrop-blur-lg',
|
|
37
|
+
border: 'border border-white/30',
|
|
38
|
+
shadow: 'shadow-xl',
|
|
39
|
+
hover: 'hover:bg-white/30 hover:shadow-2xl',
|
|
40
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-white/50',
|
|
41
|
+
},
|
|
42
|
+
dark: {
|
|
43
|
+
background: 'bg-black/20',
|
|
44
|
+
backdropBlur: 'backdrop-blur-md',
|
|
45
|
+
border: 'border border-white/10',
|
|
46
|
+
shadow: 'shadow-lg',
|
|
47
|
+
hover: 'hover:bg-black/30 hover:shadow-xl',
|
|
48
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-white/40',
|
|
49
|
+
},
|
|
50
|
+
colored: {
|
|
51
|
+
background: 'bg-gradient-to-br from-white/20 to-white/10',
|
|
52
|
+
backdropBlur: 'backdrop-blur-xl',
|
|
53
|
+
border: 'border border-white/25',
|
|
54
|
+
shadow: 'shadow-2xl',
|
|
55
|
+
hover: 'hover:from-white/30 hover:to-white/20 hover:shadow-[0_8px_32px_0_rgba(255,255,255,0.37)]',
|
|
56
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-white/60',
|
|
57
|
+
},
|
|
58
|
+
} as const;
|
|
59
|
+
|
|
60
|
+
// Frutiger Aero specific styles
|
|
61
|
+
export const aeroVariants = {
|
|
62
|
+
light: {
|
|
63
|
+
background: 'bg-gradient-to-br from-cyan-400/20 to-blue-400/10',
|
|
64
|
+
backdropBlur: 'backdrop-blur-md',
|
|
65
|
+
border: 'border border-cyan-300/30',
|
|
66
|
+
shadow: 'shadow-aero',
|
|
67
|
+
hover: 'hover:from-cyan-400/30 hover:to-blue-400/20 hover:shadow-aero-lg',
|
|
68
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-cyan-300/50',
|
|
69
|
+
},
|
|
70
|
+
medium: {
|
|
71
|
+
background: 'bg-gradient-to-br from-sky-400/25 to-cyan-400/15',
|
|
72
|
+
backdropBlur: 'backdrop-blur-lg',
|
|
73
|
+
border: 'border border-sky-300/40',
|
|
74
|
+
shadow: 'shadow-aero-lg',
|
|
75
|
+
hover: 'hover:from-sky-400/35 hover:to-cyan-400/25 hover:shadow-[0_8px_32px_0_rgba(56,189,248,0.37)]',
|
|
76
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-sky-300/60',
|
|
77
|
+
},
|
|
78
|
+
dark: {
|
|
79
|
+
background: 'bg-gradient-to-br from-blue-500/30 to-cyan-500/20',
|
|
80
|
+
backdropBlur: 'backdrop-blur-md',
|
|
81
|
+
border: 'border border-blue-300/30',
|
|
82
|
+
shadow: 'shadow-aero',
|
|
83
|
+
hover: 'hover:from-blue-500/40 hover:to-cyan-500/30 hover:shadow-aero-lg',
|
|
84
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-blue-300/50',
|
|
85
|
+
},
|
|
86
|
+
colored: {
|
|
87
|
+
background: 'bg-gradient-to-br from-lime-400/25 via-cyan-400/20 to-blue-400/15',
|
|
88
|
+
backdropBlur: 'backdrop-blur-xl',
|
|
89
|
+
border: 'border border-lime-300/35',
|
|
90
|
+
shadow: 'shadow-aero-lg',
|
|
91
|
+
hover: 'hover:from-lime-400/35 hover:via-cyan-400/30 hover:to-blue-400/25 hover:shadow-[0_8px_32px_0_rgba(163,230,53,0.37)]',
|
|
92
|
+
focus: 'focus:outline-none focus:ring-2 focus:ring-lime-300/60',
|
|
93
|
+
},
|
|
94
|
+
} as const;
|
|
95
|
+
|
|
96
|
+
export type GlassVariantType = keyof typeof glassVariants;
|
|
97
|
+
export type AeroVariantType = keyof typeof aeroVariants;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Generate glassmorphism class string
|
|
101
|
+
*/
|
|
102
|
+
export const getGlassClasses = (
|
|
103
|
+
variant: GlassVariantType = 'light',
|
|
104
|
+
rounded: string = 'rounded-xl',
|
|
105
|
+
includeInteractions: boolean = true
|
|
106
|
+
): string => {
|
|
107
|
+
const v = glassVariants[variant];
|
|
108
|
+
const interactions = includeInteractions ? `transition-all duration-300 ${v.hover} ${v.focus} active:scale-95` : '';
|
|
109
|
+
return `${v.background} ${v.backdropBlur} ${v.border} ${v.shadow} ${rounded} ${interactions}`;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Generate Frutiger Aero class string
|
|
114
|
+
*/
|
|
115
|
+
export const getAeroClasses = (
|
|
116
|
+
variant: AeroVariantType = 'light',
|
|
117
|
+
rounded: string = 'rounded-xl',
|
|
118
|
+
includeInteractions: boolean = true
|
|
119
|
+
): string => {
|
|
120
|
+
const v = aeroVariants[variant];
|
|
121
|
+
const interactions = includeInteractions ? `transition-all duration-300 ${v.hover} ${v.focus} active:scale-95` : '';
|
|
122
|
+
return `${v.background} ${v.backdropBlur} ${v.border} ${v.shadow} ${rounded} ${interactions}`;
|
|
123
|
+
};
|
|
124
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for the glassmorphism UI library
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Combine multiple class names, filtering out falsy values
|
|
7
|
+
*/
|
|
8
|
+
export const cn = (...classes: (string | undefined | null | false)[]): string => {
|
|
9
|
+
return classes.filter(Boolean).join(' ');
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generate random gradient colors for backgrounds
|
|
14
|
+
*/
|
|
15
|
+
export const getRandomGradient = (): string => {
|
|
16
|
+
const gradients = [
|
|
17
|
+
'from-purple-600 via-pink-500 to-orange-400',
|
|
18
|
+
'from-blue-600 via-cyan-500 to-teal-400',
|
|
19
|
+
'from-pink-500 via-red-500 to-yellow-500',
|
|
20
|
+
'from-indigo-600 via-purple-500 to-pink-500',
|
|
21
|
+
'from-green-500 via-teal-500 to-blue-500',
|
|
22
|
+
];
|
|
23
|
+
return gradients[Math.floor(Math.random() * gradients.length)];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Debounce function for performance optimization
|
|
28
|
+
*/
|
|
29
|
+
export const debounce = <T extends (...args: any[]) => any>(
|
|
30
|
+
func: T,
|
|
31
|
+
wait: number
|
|
32
|
+
): ((...args: Parameters<T>) => void) => {
|
|
33
|
+
let timeout: NodeJS.Timeout | null = null;
|
|
34
|
+
|
|
35
|
+
return (...args: Parameters<T>) => {
|
|
36
|
+
if (timeout) clearTimeout(timeout);
|
|
37
|
+
timeout = setTimeout(() => func(...args), wait);
|
|
38
|
+
};
|
|
39
|
+
};
|
package/dist/index.d.mts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
declare const glassVariants: {
|
|
4
|
-
readonly light: {
|
|
5
|
-
readonly background: "bg-white/5";
|
|
6
|
-
readonly backdropBlur: "backdrop-blur-[2px]";
|
|
7
|
-
readonly border: "border border-white/15";
|
|
8
|
-
readonly shadow: "shadow-lg";
|
|
9
|
-
readonly hover: "hover:bg-white/10 hover:shadow-xl";
|
|
10
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/10";
|
|
11
|
-
};
|
|
12
|
-
readonly medium: {
|
|
13
|
-
readonly background: "bg-white/20";
|
|
14
|
-
readonly backdropBlur: "backdrop-blur-lg";
|
|
15
|
-
readonly border: "border border-white/30";
|
|
16
|
-
readonly shadow: "shadow-xl";
|
|
17
|
-
readonly hover: "hover:bg-white/30 hover:shadow-2xl";
|
|
18
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/50";
|
|
19
|
-
};
|
|
20
|
-
readonly dark: {
|
|
21
|
-
readonly background: "bg-black/20";
|
|
22
|
-
readonly backdropBlur: "backdrop-blur-md";
|
|
23
|
-
readonly border: "border border-white/10";
|
|
24
|
-
readonly shadow: "shadow-lg";
|
|
25
|
-
readonly hover: "hover:bg-black/30 hover:shadow-xl";
|
|
26
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/40";
|
|
27
|
-
};
|
|
28
|
-
readonly colored: {
|
|
29
|
-
readonly background: "bg-gradient-to-br from-white/20 to-white/10";
|
|
30
|
-
readonly backdropBlur: "backdrop-blur-xl";
|
|
31
|
-
readonly border: "border border-white/25";
|
|
32
|
-
readonly shadow: "shadow-2xl";
|
|
33
|
-
readonly hover: "hover:from-white/30 hover:to-white/20 hover:shadow-[0_8px_32px_0_rgba(255,255,255,0.37)]";
|
|
34
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/60";
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
declare const aeroVariants: {
|
|
38
|
-
readonly light: {
|
|
39
|
-
readonly background: "bg-gradient-to-br from-cyan-400/20 to-blue-400/10";
|
|
40
|
-
readonly backdropBlur: "backdrop-blur-md";
|
|
41
|
-
readonly border: "border border-cyan-300/30";
|
|
42
|
-
readonly shadow: "shadow-aero";
|
|
43
|
-
readonly hover: "hover:from-cyan-400/30 hover:to-blue-400/20 hover:shadow-aero-lg";
|
|
44
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-cyan-300/50";
|
|
45
|
-
};
|
|
46
|
-
readonly medium: {
|
|
47
|
-
readonly background: "bg-gradient-to-br from-sky-400/25 to-cyan-400/15";
|
|
48
|
-
readonly backdropBlur: "backdrop-blur-lg";
|
|
49
|
-
readonly border: "border border-sky-300/40";
|
|
50
|
-
readonly shadow: "shadow-aero-lg";
|
|
51
|
-
readonly hover: "hover:from-sky-400/35 hover:to-cyan-400/25 hover:shadow-[0_8px_32px_0_rgba(56,189,248,0.37)]";
|
|
52
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-sky-300/60";
|
|
53
|
-
};
|
|
54
|
-
readonly dark: {
|
|
55
|
-
readonly background: "bg-gradient-to-br from-blue-500/30 to-cyan-500/20";
|
|
56
|
-
readonly backdropBlur: "backdrop-blur-md";
|
|
57
|
-
readonly border: "border border-blue-300/30";
|
|
58
|
-
readonly shadow: "shadow-aero";
|
|
59
|
-
readonly hover: "hover:from-blue-500/40 hover:to-cyan-500/30 hover:shadow-aero-lg";
|
|
60
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-blue-300/50";
|
|
61
|
-
};
|
|
62
|
-
readonly colored: {
|
|
63
|
-
readonly background: "bg-gradient-to-br from-lime-400/25 via-cyan-400/20 to-blue-400/15";
|
|
64
|
-
readonly backdropBlur: "backdrop-blur-xl";
|
|
65
|
-
readonly border: "border border-lime-300/35";
|
|
66
|
-
readonly shadow: "shadow-aero-lg";
|
|
67
|
-
readonly hover: "hover:from-lime-400/35 hover:via-cyan-400/30 hover:to-blue-400/25 hover:shadow-[0_8px_32px_0_rgba(163,230,53,0.37)]";
|
|
68
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-lime-300/60";
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
type GlassVariantType = keyof typeof glassVariants;
|
|
72
|
-
type AeroVariantType = keyof typeof aeroVariants;
|
|
73
|
-
/**
|
|
74
|
-
* Generate glassmorphism class string
|
|
75
|
-
*/
|
|
76
|
-
declare const getGlassClasses: (variant?: GlassVariantType, rounded?: string, includeInteractions?: boolean) => string;
|
|
77
|
-
/**
|
|
78
|
-
* Generate Frutiger Aero class string
|
|
79
|
-
*/
|
|
80
|
-
declare const getAeroClasses: (variant?: AeroVariantType, rounded?: string, includeInteractions?: boolean) => string;
|
|
81
|
-
|
|
82
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
83
|
-
variant?: GlassVariantType;
|
|
84
|
-
size?: 'sm' | 'md' | 'lg';
|
|
85
|
-
fullWidth?: boolean;
|
|
86
|
-
children: React.ReactNode;
|
|
87
|
-
}
|
|
88
|
-
declare const Button: React.FC<ButtonProps>;
|
|
89
|
-
|
|
90
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
91
|
-
variant?: GlassVariantType;
|
|
92
|
-
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
93
|
-
enableInteractions?: boolean;
|
|
94
|
-
children: React.ReactNode;
|
|
95
|
-
}
|
|
96
|
-
declare const Card: React.FC<CardProps>;
|
|
97
|
-
|
|
98
|
-
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
99
|
-
variant?: GlassVariantType;
|
|
100
|
-
fullWidth?: boolean;
|
|
101
|
-
label?: string;
|
|
102
|
-
}
|
|
103
|
-
declare const Input: React.FC<InputProps>;
|
|
104
|
-
|
|
105
|
-
interface ModalProps {
|
|
106
|
-
isOpen: boolean;
|
|
107
|
-
onClose: () => void;
|
|
108
|
-
variant?: GlassVariantType;
|
|
109
|
-
title?: string;
|
|
110
|
-
children: React.ReactNode;
|
|
111
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
112
|
-
}
|
|
113
|
-
declare const Modal: React.FC<ModalProps>;
|
|
114
|
-
|
|
115
|
-
interface AeroBubbleProps {
|
|
116
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
117
|
-
color?: 'cyan' | 'blue' | 'lime' | 'sky';
|
|
118
|
-
className?: string;
|
|
119
|
-
}
|
|
120
|
-
declare const AeroBubble: React.FC<AeroBubbleProps>;
|
|
121
|
-
|
|
122
|
-
interface AccordionItemProps {
|
|
123
|
-
id: string;
|
|
124
|
-
title: string;
|
|
125
|
-
content: React.ReactNode;
|
|
126
|
-
icon?: React.ReactNode;
|
|
127
|
-
}
|
|
128
|
-
interface AccordionProps {
|
|
129
|
-
items: AccordionItemProps[];
|
|
130
|
-
variant?: GlassVariantType;
|
|
131
|
-
allowMultiple?: boolean;
|
|
132
|
-
defaultOpen?: string[];
|
|
133
|
-
className?: string;
|
|
134
|
-
}
|
|
135
|
-
declare const Accordion: React.FC<AccordionProps>;
|
|
136
|
-
|
|
137
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, AeroBubble, type AeroBubbleProps, type AeroVariantType, Button, type ButtonProps, Card, type CardProps, type GlassVariantType, Input, type InputProps, Modal, type ModalProps, aeroVariants, getAeroClasses, getGlassClasses, glassVariants };
|
package/dist/index.d.ts
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
declare const glassVariants: {
|
|
4
|
-
readonly light: {
|
|
5
|
-
readonly background: "bg-white/5";
|
|
6
|
-
readonly backdropBlur: "backdrop-blur-[2px]";
|
|
7
|
-
readonly border: "border border-white/15";
|
|
8
|
-
readonly shadow: "shadow-lg";
|
|
9
|
-
readonly hover: "hover:bg-white/10 hover:shadow-xl";
|
|
10
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/10";
|
|
11
|
-
};
|
|
12
|
-
readonly medium: {
|
|
13
|
-
readonly background: "bg-white/20";
|
|
14
|
-
readonly backdropBlur: "backdrop-blur-lg";
|
|
15
|
-
readonly border: "border border-white/30";
|
|
16
|
-
readonly shadow: "shadow-xl";
|
|
17
|
-
readonly hover: "hover:bg-white/30 hover:shadow-2xl";
|
|
18
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/50";
|
|
19
|
-
};
|
|
20
|
-
readonly dark: {
|
|
21
|
-
readonly background: "bg-black/20";
|
|
22
|
-
readonly backdropBlur: "backdrop-blur-md";
|
|
23
|
-
readonly border: "border border-white/10";
|
|
24
|
-
readonly shadow: "shadow-lg";
|
|
25
|
-
readonly hover: "hover:bg-black/30 hover:shadow-xl";
|
|
26
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/40";
|
|
27
|
-
};
|
|
28
|
-
readonly colored: {
|
|
29
|
-
readonly background: "bg-gradient-to-br from-white/20 to-white/10";
|
|
30
|
-
readonly backdropBlur: "backdrop-blur-xl";
|
|
31
|
-
readonly border: "border border-white/25";
|
|
32
|
-
readonly shadow: "shadow-2xl";
|
|
33
|
-
readonly hover: "hover:from-white/30 hover:to-white/20 hover:shadow-[0_8px_32px_0_rgba(255,255,255,0.37)]";
|
|
34
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-white/60";
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
declare const aeroVariants: {
|
|
38
|
-
readonly light: {
|
|
39
|
-
readonly background: "bg-gradient-to-br from-cyan-400/20 to-blue-400/10";
|
|
40
|
-
readonly backdropBlur: "backdrop-blur-md";
|
|
41
|
-
readonly border: "border border-cyan-300/30";
|
|
42
|
-
readonly shadow: "shadow-aero";
|
|
43
|
-
readonly hover: "hover:from-cyan-400/30 hover:to-blue-400/20 hover:shadow-aero-lg";
|
|
44
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-cyan-300/50";
|
|
45
|
-
};
|
|
46
|
-
readonly medium: {
|
|
47
|
-
readonly background: "bg-gradient-to-br from-sky-400/25 to-cyan-400/15";
|
|
48
|
-
readonly backdropBlur: "backdrop-blur-lg";
|
|
49
|
-
readonly border: "border border-sky-300/40";
|
|
50
|
-
readonly shadow: "shadow-aero-lg";
|
|
51
|
-
readonly hover: "hover:from-sky-400/35 hover:to-cyan-400/25 hover:shadow-[0_8px_32px_0_rgba(56,189,248,0.37)]";
|
|
52
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-sky-300/60";
|
|
53
|
-
};
|
|
54
|
-
readonly dark: {
|
|
55
|
-
readonly background: "bg-gradient-to-br from-blue-500/30 to-cyan-500/20";
|
|
56
|
-
readonly backdropBlur: "backdrop-blur-md";
|
|
57
|
-
readonly border: "border border-blue-300/30";
|
|
58
|
-
readonly shadow: "shadow-aero";
|
|
59
|
-
readonly hover: "hover:from-blue-500/40 hover:to-cyan-500/30 hover:shadow-aero-lg";
|
|
60
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-blue-300/50";
|
|
61
|
-
};
|
|
62
|
-
readonly colored: {
|
|
63
|
-
readonly background: "bg-gradient-to-br from-lime-400/25 via-cyan-400/20 to-blue-400/15";
|
|
64
|
-
readonly backdropBlur: "backdrop-blur-xl";
|
|
65
|
-
readonly border: "border border-lime-300/35";
|
|
66
|
-
readonly shadow: "shadow-aero-lg";
|
|
67
|
-
readonly hover: "hover:from-lime-400/35 hover:via-cyan-400/30 hover:to-blue-400/25 hover:shadow-[0_8px_32px_0_rgba(163,230,53,0.37)]";
|
|
68
|
-
readonly focus: "focus:outline-none focus:ring-2 focus:ring-lime-300/60";
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
type GlassVariantType = keyof typeof glassVariants;
|
|
72
|
-
type AeroVariantType = keyof typeof aeroVariants;
|
|
73
|
-
/**
|
|
74
|
-
* Generate glassmorphism class string
|
|
75
|
-
*/
|
|
76
|
-
declare const getGlassClasses: (variant?: GlassVariantType, rounded?: string, includeInteractions?: boolean) => string;
|
|
77
|
-
/**
|
|
78
|
-
* Generate Frutiger Aero class string
|
|
79
|
-
*/
|
|
80
|
-
declare const getAeroClasses: (variant?: AeroVariantType, rounded?: string, includeInteractions?: boolean) => string;
|
|
81
|
-
|
|
82
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
83
|
-
variant?: GlassVariantType;
|
|
84
|
-
size?: 'sm' | 'md' | 'lg';
|
|
85
|
-
fullWidth?: boolean;
|
|
86
|
-
children: React.ReactNode;
|
|
87
|
-
}
|
|
88
|
-
declare const Button: React.FC<ButtonProps>;
|
|
89
|
-
|
|
90
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
91
|
-
variant?: GlassVariantType;
|
|
92
|
-
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
93
|
-
enableInteractions?: boolean;
|
|
94
|
-
children: React.ReactNode;
|
|
95
|
-
}
|
|
96
|
-
declare const Card: React.FC<CardProps>;
|
|
97
|
-
|
|
98
|
-
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
99
|
-
variant?: GlassVariantType;
|
|
100
|
-
fullWidth?: boolean;
|
|
101
|
-
label?: string;
|
|
102
|
-
}
|
|
103
|
-
declare const Input: React.FC<InputProps>;
|
|
104
|
-
|
|
105
|
-
interface ModalProps {
|
|
106
|
-
isOpen: boolean;
|
|
107
|
-
onClose: () => void;
|
|
108
|
-
variant?: GlassVariantType;
|
|
109
|
-
title?: string;
|
|
110
|
-
children: React.ReactNode;
|
|
111
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
112
|
-
}
|
|
113
|
-
declare const Modal: React.FC<ModalProps>;
|
|
114
|
-
|
|
115
|
-
interface AeroBubbleProps {
|
|
116
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
117
|
-
color?: 'cyan' | 'blue' | 'lime' | 'sky';
|
|
118
|
-
className?: string;
|
|
119
|
-
}
|
|
120
|
-
declare const AeroBubble: React.FC<AeroBubbleProps>;
|
|
121
|
-
|
|
122
|
-
interface AccordionItemProps {
|
|
123
|
-
id: string;
|
|
124
|
-
title: string;
|
|
125
|
-
content: React.ReactNode;
|
|
126
|
-
icon?: React.ReactNode;
|
|
127
|
-
}
|
|
128
|
-
interface AccordionProps {
|
|
129
|
-
items: AccordionItemProps[];
|
|
130
|
-
variant?: GlassVariantType;
|
|
131
|
-
allowMultiple?: boolean;
|
|
132
|
-
defaultOpen?: string[];
|
|
133
|
-
className?: string;
|
|
134
|
-
}
|
|
135
|
-
declare const Accordion: React.FC<AccordionProps>;
|
|
136
|
-
|
|
137
|
-
export { Accordion, type AccordionItemProps, type AccordionProps, AeroBubble, type AeroBubbleProps, type AeroVariantType, Button, type ButtonProps, Card, type CardProps, type GlassVariantType, Input, type InputProps, Modal, type ModalProps, aeroVariants, getAeroClasses, getGlassClasses, glassVariants };
|