UNPKG

ranui

Version:

A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.

33 lines (32 loc) 1.82 kB
import { ElementBuilder } from './core'; export declare const View: <T extends HTMLElement = HTMLElement>(tag: string) => ElementBuilder<T>; export declare const Div: () => ElementBuilder<HTMLDivElement>; /** * An element in the SVG namespace. * * `View()` already infers it for tags that only exist in SVG (`path`, `circle`, * `g`, …), so this is for the ones SVG shares with HTML -- `a`, `script`, * `style`, `title` -- where guessing would break the commoner HTML case. * * ```ts * View('svg').attrs({ viewBox: '0 0 16 16' }).children( * Svg('a').attr('href', '#').children(View('path').attr('d', 'M1 1').build()).build(), * ); * ``` */ export declare const Svg: <T extends HTMLElement = HTMLElement>(tag: string) => ElementBuilder<T>; export declare const Span: () => ElementBuilder<HTMLSpanElement>; export declare const Slot: () => ElementBuilder<HTMLSlotElement>; export declare const ButtonBuilder: () => ElementBuilder<HTMLButtonElement>; export declare const InputBuilder: () => ElementBuilder<HTMLInputElement>; export declare const Style: () => ElementBuilder<HTMLStyleElement>; export declare const Label: () => ElementBuilder<HTMLLabelElement>; export declare const Ul: () => ElementBuilder<HTMLUListElement>; export declare const Li: () => ElementBuilder<HTMLLIElement>; export declare const Section: () => ElementBuilder<HTMLElement>; export declare const Article: () => ElementBuilder<HTMLElement>; export declare const Nav: () => ElementBuilder<HTMLElement>; export declare const Header: () => ElementBuilder<HTMLElement>; export declare const Footer: () => ElementBuilder<HTMLElement>; export declare const Main: () => ElementBuilder<HTMLElement>; export declare const DeclarativeShadow: (mode?: 'open' | 'closed', delegatesFocus?: boolean) => ElementBuilder<HTMLTemplateElement>;