UNPKG

@buddhacognitivelab/theme-glassmorphic

Version:

Enhanced glassmorphic theme package with dual-mode support, advanced glass effects, interactive UI components, and gesture-based interactions

89 lines (88 loc) 3.04 kB
/** * @fileoverview Micro-Interaction Components - Phase 5 * Advanced interactive components with sophisticated visual feedback */ import React from 'react'; import { MicroInteractionType } from '../theme/animationSystem'; export type { MicroInteractionType }; export type FeedbackType = 'visual' | 'haptic' | 'audio' | 'combined'; export type IntensityLevel = 'subtle' | 'moderate' | 'intense'; export interface MicroInteractionProps { /** Type of micro-interaction */ type?: MicroInteractionType; /** Feedback intensity */ intensity?: IntensityLevel; /** Enable haptic feedback */ enableHaptics?: boolean; /** Enable sound feedback */ enableSound?: boolean; /** Custom animation duration */ duration?: number; /** Disable all interactions */ disabled?: boolean; /** Theme mode override */ themeMode?: 'light' | 'dark'; /** Glass effect intensity */ glassIntensity?: 'subtle' | 'moderate' | 'intense'; /** Children */ children?: React.ReactNode; /** Custom styles */ style?: React.CSSProperties; /** CSS class name */ className?: string; } export interface InteractiveButtonProps extends MicroInteractionProps { /** Button variant */ variant?: 'primary' | 'secondary' | 'ghost' | 'glass'; /** Button size */ size?: 'small' | 'medium' | 'large'; /** Loading state */ loading?: boolean; /** Success state */ success?: boolean; /** Error state */ error?: boolean; /** Click handler */ onClick?: (event: React.MouseEvent) => void; /** Icon element */ icon?: React.ReactNode; /** Icon position */ iconPosition?: 'left' | 'right'; } export interface FloatingActionButtonProps extends MicroInteractionProps { /** FAB size */ size?: 'small' | 'medium' | 'large'; /** Position */ position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'; /** Extended state */ extended?: boolean; /** Label for extended FAB */ label?: string; /** Click handler */ onClick?: (event: React.MouseEvent) => void; /** Icon */ icon: React.ReactNode; } export interface ProgressIndicatorProps extends MicroInteractionProps { /** Progress value (0-100) */ value?: number; /** Indeterminate state */ indeterminate?: boolean; /** Progress variant */ variant?: 'linear' | 'circular' | 'glass'; /** Size */ size?: 'small' | 'medium' | 'large'; /** Show percentage */ showPercentage?: boolean; /** Custom color */ color?: string; } export declare const InteractiveButton: React.FC<InteractiveButtonProps>; export declare const FloatingActionButton: React.FC<FloatingActionButtonProps>; export declare const ProgressIndicator: React.FC<ProgressIndicatorProps>; export declare const MicroInteractions: { InteractiveButton: React.FC<InteractiveButtonProps>; FloatingActionButton: React.FC<FloatingActionButtonProps>; ProgressIndicator: React.FC<ProgressIndicatorProps>; }; export default MicroInteractions;