UNPKG

@ryanhelsing/ry-ui

Version:

Framework-agnostic, Light DOM web components. CSS is the source of truth.

33 lines 860 B
/** * Shared types for ry-ui components */ export type ComponentState = 'open' | 'closed' | 'loading' | 'disabled'; export interface StateChangeDetail { oldState: string; newState: string; } export interface ChangeDetail { value: string; label?: string; } export type CleanupFn = () => void; export type ToastVariant = 'info' | 'success' | 'warning' | 'error'; export interface ToastOptions { message: string; variant?: ToastVariant; duration?: number; } export interface SelectOption { value: string; label: string; disabled: boolean; } declare global { interface HTMLElementEventMap { 'ry:state-change': CustomEvent<StateChangeDetail>; 'ry:change': CustomEvent<ChangeDetail>; 'ry:open': CustomEvent<void>; 'ry:close': CustomEvent<void>; } } //# sourceMappingURL=types.d.ts.map