UNPKG

@svelkit/spectre

Version:

spectre components as svelte actions and css modules

726 lines (699 loc) 23.8 kB
interface ActionResult<Options> { update: (options?: Options) => void; destroy?: () => void; } interface Action<Options> { (options?: Options): string; (node: Element, options?: Options): ActionResult<Options>; } declare type ClassFalsy = '' | 0 | false | typeof NaN | null | undefined; declare type ClassValue = string | ClassFalsy | Record<string, unknown> | ClassValue[]; //# sourceMappingURL=index.d.ts.map declare const classNames: { "baseline": string; "active": string; "h1": string; "h2": string; "h3": string; "h4": string; "h5": string; "h6": string; "table": string; "table-striped": string; "table-hover": string; "table-scroll": string; "btn": string; "loading": string; "disabled": string; "btn-primary": string; "btn-success": string; "btn-error": string; "btn-link": string; "btn-sm": string; "btn-lg": string; "btn-block": string; "btn-action": string; "btn-clear": string; "btn-group": string; "btn-group-block": string; "form-group": string; "form": string; "form-label": string; "label-sm": string; "label-lg": string; "form-input": string; "input-sm": string; "input-lg": string; "input-inline": string; "form-input-hint": string; "has-success": string; "is-success": string; "has-error": string; "is-error": string; "form-select": string; "select-sm": string; "select-lg": string; "has-icon-left": string; "has-icon-right": string; "form-icon": string; "form-checkbox": string; "form-radio": string; "form-switch": string; "input-group": string; "input-group-addon": string; "addon-sm": string; "addon-lg": string; "input-group-btn": string; "form-horizontal": string; "form-inline": string; "label": string; "label-rounded": string; "label-primary": string; "label-secondary": string; "label-success": string; "label-warning": string; "label-error": string; "img-responsive": string; "img-fit-cover": string; "img-fit-contain": string; "video-responsive": string; "video-responsive-4-3": string; "video-responsive-1-1": string; "figure": string; "figure-caption": string; "container": string; "grid-xl": string; "grid-lg": string; "grid-md": string; "grid-sm": string; "grid-xs": string; "show-xs": string; "show-sm": string; "show-md": string; "show-lg": string; "show-xl": string; "columns": string; "col-gapless": string; "column": string; "col-oneline": string; "col-12": string; "col-11": string; "col-10": string; "col-9": string; "col-8": string; "col-7": string; "col-6": string; "col-5": string; "col-4": string; "col-3": string; "col-2": string; "col-1": string; "col-auto": string; "col-mx-auto": string; "col-ml-auto": string; "col-mr-auto": string; "col-xl-12": string; "col-xl-11": string; "col-xl-10": string; "col-xl-9": string; "col-xl-8": string; "col-xl-7": string; "col-xl-6": string; "col-xl-5": string; "col-xl-4": string; "col-xl-3": string; "col-xl-2": string; "col-xl-1": string; "col-xl-auto": string; "hide-xl": string; "col-lg-12": string; "col-lg-11": string; "col-lg-10": string; "col-lg-9": string; "col-lg-8": string; "col-lg-7": string; "col-lg-6": string; "col-lg-5": string; "col-lg-4": string; "col-lg-3": string; "col-lg-2": string; "col-lg-1": string; "col-lg-auto": string; "hide-lg": string; "col-md-12": string; "col-md-11": string; "col-md-10": string; "col-md-9": string; "col-md-8": string; "col-md-7": string; "col-md-6": string; "col-md-5": string; "col-md-4": string; "col-md-3": string; "col-md-2": string; "col-md-1": string; "col-md-auto": string; "hide-md": string; "col-sm-12": string; "col-sm-11": string; "col-sm-10": string; "col-sm-9": string; "col-sm-8": string; "col-sm-7": string; "col-sm-6": string; "col-sm-5": string; "col-sm-4": string; "col-sm-3": string; "col-sm-2": string; "col-sm-1": string; "col-sm-auto": string; "hide-sm": string; "col-xs-12": string; "col-xs-11": string; "col-xs-10": string; "col-xs-9": string; "col-xs-8": string; "col-xs-7": string; "col-xs-6": string; "col-xs-5": string; "col-xs-4": string; "col-xs-3": string; "col-xs-2": string; "col-xs-1": string; "col-xs-auto": string; "hide-xs": string; "hero": string; "hero-sm": string; "hero-lg": string; "hero-body": string; "navbar": string; "navbar-section": string; "navbar-center": string; "navbar-brand": string; "avatar": string; "avatar-xs": string; "avatar-sm": string; "avatar-lg": string; "avatar-xl": string; "avatar-icon": string; "avatar-presence": string; "online": string; "busy": string; "away": string; "badge": string; "bar": string; "bar-sm": string; "bar-item": string; "bar-slider": string; "bar-slider-btn": string; "breadcrumb": string; "breadcrumb-item": string; "card": string; "card-shadow": string; "card-header": string; "card-body": string; "card-footer": string; "card-image": string; "chip": string; "dropdown": string; "menu": string; "slide-down": string; "dropdown-right": string; "dropdown-toggle": string; "empty": string; "empty-icon": string; "empty-title": string; "empty-subtitle": string; "empty-action": string; "menu-nav": string; "menu-item": string; "menu-badge": string; "modal": string; "modal-overlay": string; "modal-container": string; "modal-sm": string; "modal-lg": string; "modal-fullheight": string; "modal-header": string; "modal-body": string; "modal-footer": string; "nav": string; "nav-item": string; "tooltip": string; "tooltip-right": string; "tooltip-bottom": string; "tooltip-left": string; "text-primary": string; "text-secondary": string; "text-gray": string; "text-light": string; "text-dark": string; "text-success": string; "text-warning": string; "text-error": string; "bg-primary": string; "bg-secondary": string; "bg-dark": string; "bg-gray": string; "bg-success": string; "bg-warning": string; "bg-error": string; "c-hand": string; "c-move": string; "c-zoom-in": string; "c-zoom-out": string; "c-not-allowed": string; "c-auto": string; "d-block": string; "d-inline": string; "d-inline-block": string; "d-flex": string; "d-inline-flex": string; "d-none": string; "d-hide": string; "d-visible": string; "d-invisible": string; "text-hide": string; "text-assistive": string; "divider": string; "divider-vert": string; "loading-lg": string; "clearfix": string; "float-left": string; "float-right": string; "p-relative": string; "p-absolute": string; "p-fixed": string; "p-sticky": string; "p-centered": string; "flex-centered": string; "m-0": string; "mb-0": string; "ml-0": string; "mr-0": string; "mt-0": string; "mx-0": string; "my-0": string; "m-1": string; "mb-1": string; "ml-1": string; "mr-1": string; "mt-1": string; "mx-1": string; "my-1": string; "m-2": string; "mb-2": string; "ml-2": string; "mr-2": string; "mt-2": string; "mx-2": string; "my-2": string; "p-0": string; "pb-0": string; "pl-0": string; "pr-0": string; "pt-0": string; "px-0": string; "py-0": string; "p-1": string; "pb-1": string; "pl-1": string; "pr-1": string; "pt-1": string; "px-1": string; "py-1": string; "p-2": string; "pb-2": string; "pl-2": string; "pr-2": string; "pt-2": string; "px-2": string; "py-2": string; "s-rounded": string; "s-circle": string; "text-left": string; "text-right": string; "text-center": string; "text-justify": string; "text-lowercase": string; "text-uppercase": string; "text-capitalize": string; "text-normal": string; "text-bold": string; "text-italic": string; "text-large": string; "text-small": string; "text-tiny": string; "text-muted": string; "text-ellipsis": string; "text-clip": string; "text-break": string; "m-auto": string; "mb-auto": string; "ml-auto": string; "mr-auto": string; "mt-auto": string; "mx-auto": string; "my-auto": string; "p-auto": string; "pb-auto": string; "pl-auto": string; "pr-auto": string; "pt-auto": string; "px-auto": string; "py-auto": string }; declare const SIZES: readonly ["sm", "lg"]; declare const STATES: readonly ["active", "loading", "disabled"]; declare const FORM_STATES: readonly ["success", "error"]; declare type ActionVariants = Record<string, Action<any>>; declare type InferVariants<Variants extends ActionVariants | undefined> = { [K in keyof Variants]: Variants[K] extends Action<infer O> ? Action<O> : Variants[K]; };//# sourceMappingURL=index.d.ts.map declare const spectre: Action<string> & Action<ClassValue> & InferVariants<Record<string, Action<boolean>>>; //# sourceMappingURL=spectre.d.ts.map declare const baseline: ((node?: Element) => ActionResult<boolean>) & Action<boolean>; //# sourceMappingURL=baseline.d.ts.map declare type Heading = 1 | 2 | 3 | 4 | 5 | 6; declare const heading: Action<Heading> & InferVariants<Record<string, Action<boolean>>>; declare const h1: Action<boolean>; declare const h2: Action<boolean>; declare const h3: Action<boolean>; declare const h4: Action<boolean>; declare const h5: Action<boolean>; declare const h6: Action<boolean>; //# sourceMappingURL=headings.d.ts.map interface TableOptions { striped?: boolean; hover?: boolean; scroll?: boolean; } declare const table: Action<TableOptions> & InferVariants<Record<string, Action<boolean>>>; //# sourceMappingURL=tables.d.ts.map declare const BUTTON_VARIANTS: readonly ["primary", "success", "error", "link", "clear"]; interface ButtonOptions { state?: typeof STATES[number]; variant?: typeof BUTTON_VARIANTS[number]; size?: typeof SIZES[number]; block?: boolean; action?: boolean; } interface ButtonGroupOptions { block?: boolean; } declare const btn: Action<string | ClassValue[] | ButtonOptions> & InferVariants<{ group: Action<ButtonGroupOptions | "block"> & InferVariants<Record<string, Action<boolean>>>; }>;//# sourceMappingURL=buttons.d.ts.map declare const FORM_VARIANTS: readonly ["horizontal", "inline"]; interface FormOptions { variant?: typeof FORM_VARIANTS[number]; } interface FormSizeOptions { size?: typeof SIZES[number]; } interface FormGroupOptions { state?: typeof FORM_STATES[number]; } interface FormFieldOptions { size?: typeof SIZES[number]; state?: typeof FORM_STATES[number]; disabled?: boolean; inline?: boolean; } interface FormInputGroupOptions { inline?: boolean; } declare const form: Action<FormOptions> & InferVariants<{ group: Action<FormGroupOptions>; label: Action<FormSizeOptions> & InferVariants<Record<"sm" | "lg", Action<boolean>>>; input: (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; }>) | (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; } & { hint: Action<boolean>; group: Action<FormInputGroupOptions> & InferVariants<{ inline: Action<boolean>; addon: Action<FormSizeOptions> & InferVariants<Record<"sm" | "lg", Action<boolean>>>; btn: Action<boolean>; }>; }>); select: (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; }>) | (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; } & Record<string, Action<any>>>); checkbox: (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; }>) | (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; } & Record<string, Action<any>>>); radio: (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; }>) | (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; } & Record<string, Action<any>>>); switch: (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; }>) | (Action<FormFieldOptions> & InferVariants<{ inline: Action<boolean>; sm: Action<boolean>; lg: Action<boolean>; } & Record<string, Action<any>>>); icon: Action<boolean>; horizontal: Action<boolean>; inline: Action<boolean>; }>; declare const has: Action<"success" | "error"> & InferVariants<{ icon: Action<"right" | "left"> & InferVariants<Record<"right" | "left", Action<boolean>>>; success: Action<boolean>; error: Action<boolean>; }>; declare const is: Action<"success" | "error"> & InferVariants<Record<"success" | "error", Action<boolean>>>;//# sourceMappingURL=forms.d.ts.map declare const LABEL_VARIANTS: readonly ["primary", "secondary", "success", "warning", "error"]; interface LabelOptions { variant?: typeof LABEL_VARIANTS[number]; rounded?: boolean; } declare const label: Action<"success" | "error" | "primary" | "secondary" | "warning" | LabelOptions> & InferVariants<Record<string, Action<boolean>>>;//# sourceMappingURL=labels.d.ts.map declare const IMG_FITS: readonly ["cover", "contain"]; interface ImgOptions { responsive?: boolean; fit?: typeof IMG_FITS[number]; } declare const img: Action<ImgOptions | "responsive"> & InferVariants<{ responsive: Action<boolean>; fit: Action<"cover" | "contain"> & Action<ClassValue> & InferVariants<Record<"cover" | "contain", Action<boolean>>>; }>; interface VideoOptions { responsive?: boolean; ratio?: '4:3' | '1:1' | '4-3' | '1-1' | '4_3' | '1_1'; } declare const video: Action<"responsive" | VideoOptions> & InferVariants<{ responsive: Action<string> & InferVariants<{ '4_3': Action<boolean>; '1_1': Action<boolean>; }>; }>; declare const figure: Action<boolean> & InferVariants<{ caption: Action<boolean>; }>;//# sourceMappingURL=media.d.ts.map declare const BREAKPOINTS: readonly ["xs", "sm", "md", "lg", "xl"]; declare type Breakpoint = typeof BREAKPOINTS[number]; interface Breakpoints<Config> extends Partial<Record<Breakpoint, Config>> { default?: Config; } declare type Responsive<Config> = [/* default: */ Config] | [/* default: */ Config, /* xs: */ Config] | [/* default: */ Config, /* xs: */ Config, /* sm: */ Config] | [/* default: */ Config, /* xs: */ Config, /* sm: */ Config, /* md: */ Config] | [/* default: */ Config, /* xs: */ Config, /* sm: */ Config, /* md: */ Config, /* lg: */ Config] | [ Config, Config, Config, Config, Config, Config ] | Config[]; declare const container: Action<"sm" | "lg" | "xs" | "xl" | "md"> & InferVariants<Record<"sm" | "lg" | "xs" | "xl" | "md", Action<boolean>>>; interface ColumnsOptions { gapless?: boolean; oneline?: boolean; } declare const columns: Action<ColumnsOptions | "gapless" | "oneline"> & InferVariants<{ gapless: Action<boolean> & InferVariants<{ oneline: Action<boolean>; }>; oneline: Action<boolean> & InferVariants<{ gapless: Action<boolean>; }>; }>; declare const cols: Action<ColumnsOptions | "gapless" | "oneline"> & InferVariants<{ gapless: Action<boolean> & InferVariants<{ oneline: Action<boolean>; }>; oneline: Action<boolean> & InferVariants<{ gapless: Action<boolean>; }>; }>; declare const row: Action<ColumnsOptions | "gapless" | "oneline"> & InferVariants<{ gapless: Action<boolean> & InferVariants<{ oneline: Action<boolean>; }>; oneline: Action<boolean> & InferVariants<{ gapless: Action<boolean>; }>; }>; declare type ColumnSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'hide' | 'show'; declare type ColumnMargin = 'auto' | 'left' | 'right'; declare const column: Action<2 | 3 | 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto" | "hide" | "show" | [ColumnSize] | [ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize, ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize, ColumnSize, ColumnSize, ColumnSize] | ColumnSize[] | Breakpoints<ColumnSize>> & InferVariants<{ xs: Action<ColumnSize>; sm: Action<ColumnSize>; md: Action<ColumnSize>; lg: Action<ColumnSize>; xl: Action<ColumnSize>; margin: Action<ColumnMargin>; }>; declare const col: Action<2 | 3 | 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto" | "hide" | "show" | [ColumnSize] | [ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize, ColumnSize, ColumnSize] | [ColumnSize, ColumnSize, ColumnSize, ColumnSize, ColumnSize, ColumnSize] | ColumnSize[] | Breakpoints<ColumnSize>> & InferVariants<{ xs: Action<ColumnSize>; sm: Action<ColumnSize>; md: Action<ColumnSize>; lg: Action<ColumnSize>; xl: Action<ColumnSize>; margin: Action<ColumnMargin>; }>;//# sourceMappingURL=layout.d.ts.map interface HeroOptions { size?: typeof SIZES[number]; } declare const hero: Action<"sm" | "lg" | HeroOptions> & InferVariants<{ body: Action<boolean>; }>; //# sourceMappingURL=hero.d.ts.map declare const AVATAR_SIZES: readonly ["xs", "sm", "lg", "xl"]; interface AvatarOptions { size?: typeof AVATAR_SIZES[number]; initial?: string; } declare type AvatarParameter = AvatarOptions['size'] | AvatarOptions; declare const avatar: Action<"sm" | "lg" | "xs" | "xl" | AvatarOptions> & InferVariants<{ online: Action<boolean>; busy: Action<boolean>; away: Action<boolean>; xs: Action<string>; sm: Action<string>; md: Action<string>; lg: Action<string>; xl: Action<string>; icon: Action<boolean>; presence: Action<"online" | "busy" | "away">; }>;//# sourceMappingURL=avatars.d.ts.map declare const badge: Action<string | number>; //# sourceMappingURL=badges.d.ts.map interface BarOptions { size?: 'sm'; slider?: boolean; } interface BarItemOptions { value: number; min?: number; max?: number; role?: string; } interface BarSliderButtonOptions { state?: ButtonOptions['state']; variant?: ButtonOptions['variant']; } declare const bar: Action<"sm" | BarOptions | "slider"> & InferVariants<{ slider: Action<"sm">; btn: Action<BarSliderButtonOptions>; item: Action<number | BarItemOptions>; }>; //# sourceMappingURL=bars.d.ts.map declare const breadcrumb: Action<boolean> & InferVariants<{ item: Action<boolean>; }>; //# sourceMappingURL=breadcrumbs.d.ts.map declare const CARD_VARIANTS: readonly ["image", "header", "body", "footer"]; interface CardOptions { shadow?: boolean; } declare type CardParameter = undefined | 'shadow' | typeof CARD_VARIANTS[number] | CardOptions; declare const card: Action<"image" | "header" | "body" | "footer" | CardOptions | "shadow"> & InferVariants<{ shadow: Action<boolean>; image: Action<boolean>; header: Action<boolean>; body: Action<boolean>; footer: Action<boolean>; }>;//# sourceMappingURL=cards.d.ts.map interface ChipOptions { active?: boolean; } declare const chip: Action<ChipOptions> & InferVariants<{ active: Action<boolean>; }>; //# sourceMappingURL=chips.d.ts.map interface DropdownOptions { direction?: 'right'; active?: boolean; } declare const dropdown: Action<boolean | DropdownOptions | "right"> & InferVariants<Record<string, Action<boolean>>>; //# sourceMappingURL=dropdowns.d.ts.map declare const empty: Action<"action" | "icon" | "title" | "subtitle"> & InferVariants<Record<"action" | "icon" | "title" | "subtitle", Action<boolean>>>; //# sourceMappingURL=empty.d.ts.map declare const menu: Action<"nav"> & InferVariants<Record<"badge" | "item", Action<boolean>>>; //# sourceMappingURL=menus.d.ts.map interface ModalOptions { active?: boolean; size?: typeof SIZES[number]; } interface ModalContainerOptions { fullheight?: boolean; } declare const modal: Action<boolean | "sm" | "lg" | ModalOptions> & InferVariants<{ container: Action<boolean | ModalContainerOptions> & InferVariants<Record<string, Action<boolean>>>; }>; //# sourceMappingURL=modals.d.ts.map interface NavItemOptions { active?: boolean; } declare const nav: Action<boolean> & InferVariants<{ item: Action<boolean | NavItemOptions> & InferVariants<Record<string, Action<boolean>>>; }>; //# sourceMappingURL=navs.d.ts.map interface TooltipOptions { position?: 'right' | 'bottom' | 'left' | 'top'; value?: string | number; } declare const tooltip: Action<string | number | TooltipOptions>; //# sourceMappingURL=tooltips.d.ts.map declare const text: Action<"success" | "error" | "bold" | "small" | "primary" | "right" | "left" | "secondary" | "warning" | "hide" | "gray" | "light" | "dark" | "assistive" | "center" | "justify" | "lowercase" | "uppercase" | "capitalize" | "normal" | "italic" | "large" | "tiny" | "muted" | "ellipsis" | "clip" | "break"> & Action<ClassValue> & InferVariants<Record<"success" | "error" | "bold" | "small" | "primary" | "right" | "left" | "secondary" | "warning" | "hide" | "gray" | "light" | "dark" | "assistive" | "center" | "justify" | "lowercase" | "uppercase" | "capitalize" | "normal" | "italic" | "large" | "tiny" | "muted" | "ellipsis" | "clip" | "break", Action<boolean>>>; declare const bg: Action<"success" | "error" | "primary" | "secondary" | "warning" | "gray" | "light" | "dark"> & Action<ClassValue> & InferVariants<Record<"success" | "error" | "primary" | "secondary" | "warning" | "gray" | "light" | "dark", Action<boolean>>>; declare const cursor: Action<"auto" | "hand" | "move" | "zoom-in" | "zoom-out" | "not-allowed"> & Action<ClassValue> & InferVariants<Record<"auto" | "hand" | "move" | "zoom-in" | "zoom-out" | "not-allowed", Action<boolean>>>; declare const centered: Action<"block" | "p" | "flex"> & Action<ClassValue> & InferVariants<Record<"block" | "p" | "flex", Action<boolean>>>; declare const clearfix: Action<boolean>; interface LoadingOptions { enable?: boolean; lg?: boolean; } declare const loading: Action<boolean | "lg" | LoadingOptions>; declare const divider: Action<string> & { vert: Action<string>; }; declare const shape: Action<"rounded" | "circle"> & Action<ClassValue> & InferVariants<Record<"rounded" | "circle", Action<boolean>>>; //# sourceMappingURL=utilities.d.ts.map export { Action, ActionResult, AvatarOptions, AvatarParameter, BarItemOptions, BarOptions, BarSliderButtonOptions, Breakpoint, Breakpoints, ButtonGroupOptions, ButtonOptions, CardOptions, CardParameter, ChipOptions, ClassFalsy, ClassValue, ColumnMargin, ColumnSize, ColumnsOptions, DropdownOptions, FormFieldOptions, FormGroupOptions, FormInputGroupOptions, FormOptions, FormSizeOptions, Heading, HeroOptions, ImgOptions, LabelOptions, LoadingOptions, ModalContainerOptions, ModalOptions, NavItemOptions, Responsive, TableOptions, TooltipOptions, VideoOptions, avatar, badge, bar, baseline, bg, breadcrumb, btn, card, centered, chip, classNames, clearfix, col, cols, column, columns, container, cursor, divider, dropdown, empty, figure, form, h1, h2, h3, h4, h5, h6, has, heading, hero, img, is, label, loading, menu, modal, nav, row, shape, spectre, table, text, tooltip, video }; //# sourceMappingURL=spectre.d.ts.map