aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
129 lines • 4.28 kB
TypeScript
import React from 'react';
export type AnimationType = 'fadeIn' | 'fadeOut' | 'slideIn' | 'slideOut' | 'scaleIn' | 'scaleOut' | 'bounce' | 'shake' | 'pulse' | 'rotate' | 'flip';
export type AnimationDirection = 'up' | 'down' | 'left' | 'right' | 'center';
export type EasingType = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'bounce' | 'elastic';
export interface AnimationConfig {
type: AnimationType;
direction?: AnimationDirection;
duration?: number;
delay?: number;
easing?: EasingType;
repeat?: number;
yoyo?: boolean;
amplitude?: number;
frequency?: number;
}
export interface MotionControllerProps {
/** Whether animations are globally enabled */
enabled?: boolean;
/** Global animation duration multiplier */
speed?: number;
/** Whether to reduce motion for accessibility */
reduceMotion?: boolean;
/** Whether to respect motion preferences */
respectMotionPreference?: boolean;
/** Children to animate */
children: React.ReactNode;
/** Additional CSS class */
className?: string;
/** ARIA label for the motion controller */
'aria-label'?: string;
}
interface MotionContextType {
enabled: boolean;
speed: number;
reduceMotion: boolean;
animate: (element: HTMLElement, config: AnimationConfig) => Promise<void>;
batchAnimate: (animations: Array<{
element: HTMLElement;
config: AnimationConfig;
}>) => Promise<void>;
}
export declare const useMotionController: () => MotionContextType;
export declare const GlassMotionController: React.ForwardRefExoticComponent<MotionControllerProps & React.RefAttributes<HTMLDivElement>>;
export interface GlassAnimatedProps {
animation?: AnimationConfig;
children: React.ReactNode;
className?: string;
trigger?: 'mount' | 'hover' | 'click' | 'manual';
/** Whether to respect motion preferences */
respectMotionPreference?: boolean;
/** ARIA label for the animated element */
'aria-label'?: string;
}
export declare const GlassAnimated: React.ForwardRefExoticComponent<GlassAnimatedProps & React.RefAttributes<HTMLDivElement>>;
export interface GlassAnimationSequenceProps {
children: React.ReactNode;
staggerDelay?: number;
className?: string;
/** Whether to respect motion preferences */
respectMotionPreference?: boolean;
/** ARIA label for the sequence */
'aria-label'?: string;
}
export declare const GlassAnimationSequence: React.ForwardRefExoticComponent<GlassAnimationSequenceProps & React.RefAttributes<HTMLDivElement>>;
export declare const animationPresets: {
fadeInUp: {
type: AnimationType;
direction: AnimationDirection;
duration: number;
easing: EasingType;
};
fadeInDown: {
type: AnimationType;
direction: AnimationDirection;
duration: number;
easing: EasingType;
};
slideInLeft: {
type: AnimationType;
direction: AnimationDirection;
duration: number;
easing: EasingType;
};
slideInRight: {
type: AnimationType;
direction: AnimationDirection;
duration: number;
easing: EasingType;
};
scaleIn: {
type: AnimationType;
duration: number;
easing: EasingType;
};
bounceIn: {
type: AnimationType;
duration: number;
easing: EasingType;
};
shake: {
type: AnimationType;
duration: number;
amplitude: number;
frequency: number;
};
pulse: {
type: AnimationType;
duration: number;
amplitude: number;
frequency: number;
repeat: number;
};
};
export interface GlassAnimationTimelineProps {
timeline: Array<{
selector: string;
animation: AnimationConfig;
startTime?: number;
}>;
children: React.ReactNode;
className?: string;
/** Whether to respect motion preferences */
respectMotionPreference?: boolean;
/** ARIA label for the timeline */
'aria-label'?: string;
}
export declare const GlassAnimationTimeline: React.ForwardRefExoticComponent<GlassAnimationTimelineProps & React.RefAttributes<HTMLDivElement>>;
export {};
//# sourceMappingURL=GlassMotionController.d.ts.map