aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
125 lines • 2.97 kB
TypeScript
import React from "react";
export interface WizardStep {
id: string;
title: string;
description?: string;
icon?: React.ReactNode;
content: React.ReactNode;
validation?: () => boolean | Promise<boolean>;
optional?: boolean;
disabled?: boolean;
}
export interface GlassWizardProps {
/**
* Wizard steps
*/
steps?: WizardStep[];
/**
* Current step index
*/
currentStep?: number;
/**
* Callback when step changes
*/
onStepChange?: (stepIndex: number) => void;
/**
* Callback when wizard completes
*/
onComplete?: (data?: any) => void;
/**
* Callback when wizard is cancelled
*/
onCancel?: () => void;
/**
* Wizard title
*/
title?: string;
/**
* Wizard description
*/
description?: string;
/**
* Show step navigation
*/
showStepNavigation?: boolean;
/**
* Show step progress
*/
showProgress?: boolean;
/**
* Allow step skipping
*/
allowSkip?: boolean;
/**
* Custom next button text
*/
nextButtonText?: string;
/**
* Custom previous button text
*/
previousButtonText?: string;
/**
* Custom complete button text
*/
completeButtonText?: string;
/**
* Custom cancel button text
*/
cancelButtonText?: string;
/**
* Loading state
*/
loading?: boolean;
/**
* Custom className
*/
className?: string;
/**
* Step validation mode
*/
validationMode?: "onChange" | "onNext";
}
interface WizardContextValue {
currentStep: number;
steps: WizardStep[];
goToStep: (stepIndex: number) => void;
goToNext: () => void;
goToPrevious: () => void;
isStepValid: (stepIndex: number) => boolean;
isStepCompleted: (stepIndex: number) => boolean;
completeWizard: () => void;
cancelWizard: () => void;
data: Record<string, any>;
setData: (data: Record<string, any>) => void;
}
export declare const useWizard: () => WizardContextValue | {
currentStep: number;
totalSteps: number;
nextStep: () => void;
previousStep: () => void;
goToStep: () => void;
isFirstStep: boolean;
isLastStep: boolean;
data: {};
setData: () => void;
};
/**
* GlassWizard component
* A multi-step form wizard with glassmorphism styling and comprehensive features
*/
export declare const GlassWizard: React.FC<GlassWizardProps>;
export interface GlassWizardStepProps {
step: WizardStep;
children: React.ReactNode;
className?: string;
}
export declare const GlassWizardStep: React.FC<GlassWizardStepProps>;
export interface GlassWizardStepperProps {
steps: WizardStep[];
currentStep: number;
completedSteps?: Set<number>;
className?: string;
}
export declare const GlassWizardStepper: React.FC<GlassWizardStepperProps>;
export default GlassWizard;
//# sourceMappingURL=GlassWizard.d.ts.map