@rxxuzi/gumi
Version:
Clean & minimal design system with delightful interactions
119 lines (118 loc) • 4.06 kB
TypeScript
import * as dom from './core/dom';
import * as animation from './core/animation';
import { ThemeManager } from './components/theme';
import { Modal } from './components/modal';
import { Toast } from './components/toast';
import { Tabs } from './components/tabs';
import { Accordion } from './components/accordion';
import { Dropdown } from './components/dropdown';
import { Progress } from './components/progress';
import { FormValidator } from './components/form';
import { Sidebar } from './components/sidebar';
import { CodeCopy } from './components/code-copy';
import * as helpers from './utils/helpers';
import type { GumiOptions, AnimationOptions, ToastOptions, ModalOptions, ThemeOptions, ProgressOptions, DropdownOptions, AccordionOptions, TabOptions, FormValidationOptions, GumiElement } from './types';
declare class Gumi {
version: string;
private theme;
private modals;
private dropdowns;
private tabs;
private accordions;
private sidebars;
constructor();
/**
* Initialize Gumi.js
*/
private init;
/**
* Setup smooth scrolling for anchor links
*/
private setupSmoothScroll;
/**
* Setup enhanced focus rings
*/
private setupFocusRings;
/**
* Setup animations triggered by CSS classes
*/
private setupPreloadedAnimations;
/**
* Initialize all components
*/
private initializeComponents;
/**
* Setup switch/toggle functionality
*/
private setupSwitches;
$: typeof dom.$;
$$: typeof dom.$$;
ready: typeof dom.ready;
on: typeof dom.on;
off: typeof dom.off;
trigger: typeof dom.trigger;
createElement: typeof dom.createElement;
animate: typeof animation.animate;
fadeIn: typeof animation.fadeIn;
fadeOut: typeof animation.fadeOut;
slideUp: typeof animation.slideUp;
slideDown: typeof animation.slideDown;
scaleIn: typeof animation.scaleIn;
scaleOut: typeof animation.scaleOut;
slideIn: typeof animation.slideIn;
bounce: typeof animation.bounce;
shake: typeof animation.shake;
pulse: typeof animation.pulse;
setTheme(theme: 'light' | 'dark' | 'auto'): void;
toggleTheme(): void;
getTheme(): string;
modal(selector: string, options?: ModalOptions): void;
openModal(selector: string): void;
closeModal(selector: string): void;
toast(message: string, options?: ToastOptions): string;
setProgress(selector: GumiElement, value: number): void;
validateForm(selector: string): boolean;
dropdown(trigger: string, menu?: string, options?: DropdownOptions): void;
lazyLoad(selector?: string): void;
parallax(selector: string, options?: {
speed?: number;
}): void;
ripple(selector: string): void;
loading(element: string | HTMLElement, isLoading?: boolean): void;
show: typeof dom.show;
hide: typeof dom.hide;
toggle: typeof dom.toggle;
debounce: typeof helpers.debounce;
throttle: typeof helpers.throttle;
copyToClipboard: typeof helpers.copyToClipboard;
icons: {
check: string;
x: string;
info: string;
warning: string;
error: string;
success: string;
chevronDown: string;
chevronUp: string;
chevronLeft: string;
chevronRight: string;
moon: string;
sun: string;
loader: string;
menu: string;
search: string;
plus: string;
minus: string;
copy: string;
heart: string;
star: string;
};
sidebar(selector: string): Sidebar | null;
openSidebar(selector: string): void;
closeSidebar(selector: string): void;
toggleSidebar(selector: string): void;
}
declare const gumi: Gumi;
export default gumi;
export type { GumiOptions, AnimationOptions, ToastOptions, ModalOptions, ThemeOptions, ProgressOptions, DropdownOptions, AccordionOptions, TabOptions, FormValidationOptions };
export { ThemeManager, Modal, Toast, Tabs, Accordion, Dropdown, Progress, FormValidator, Sidebar, CodeCopy };