UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

48 lines 2.36 kB
import { default as React } from 'react'; /** * Comprehensive styling options for the Zoom transition. Mirrors the legacy * theme-module shape so callers do not need to change their call sites. */ export interface ZoomStyles { /** Theme variant: 'light' (default), 'dark', or 'sacred' — changes only the default transition/hidden-scale values. */ theme?: 'light' | 'dark' | 'sacred'; /** Visibility toggle: false zooms out, anything else (including unset) shows the content. */ in?: boolean; /** Zoom duration in milliseconds; wins over transitionDuration. */ timeout?: number; /** CSS transform-origin for the scale animation. */ transformOrigin?: string; /** Visible-state scale (default 1); superseded by scaleEnter. */ scale?: number; /** Visible-state scale; wins over `scale`. */ scaleEnter?: number; /** Hidden-state scale (otherwise the per-theme CSS default applies). */ scaleExit?: number; /** Full CSS transition shorthand; replaces the computed transition verbatim. */ transition?: string; /** Zoom duration as a CSS time (default '0.3s' once any styles are passed); superseded by timeout. */ transitionDuration?: string; /** Transition delay. */ transitionDelay?: string; /** Transition timing function (default 'ease' once any styles are passed). */ transitionTimingFunction?: string; /** Renders the disabled treatment (data-disabled) — purely visual. */ disabled?: boolean; } export interface ZoomProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style'> { /** The content to be wrapped with zoom transition. */ children: React.ReactNode; /** Comprehensive styling options including theme, animation timing, and transform properties. */ styles?: ZoomStyles; } /** * A zoom transition component with theming support for smooth scale animations. * * Theme/state are expressed as data-attributes consumed by Zoom.module.css; * caller-supplied dynamic values (custom scale, transform-origin, transition, * delay, or a timeout/timing override) are forwarded as CSS custom properties * so the selectors stay in CSS while the scalar values come from props. */ declare const Zoom: React.ForwardRefExoticComponent<ZoomProps & React.RefAttributes<HTMLDivElement>>; export default Zoom; //# sourceMappingURL=index.d.ts.map