UNPKG

@kahi-ui/framework

Version:

Straight-forward Svelte UI for the Web

50 lines (49 loc) 1.61 kB
declare type IPropPrimitive = boolean | null | number | string | undefined; /** * Represents props passable to HTML elements that can be stringified */ export declare type IProps = Record<string, IPropPrimitive | IPropPrimitive[]>; /** * Returns all the CSS variables concated * @param props * @returns */ export declare function format_css_variables(props: IProps): string; /** * Returns the mapped the input [[props]] to output props, filtering out props with * falsy values or not matched against the input [[set]] of valid props. Also prefixes * attributes with the given [[prefix]] string if available * * @param props * @param set * @param prefix * @returns */ export declare function map_attributes(props: IProps, set?: Set<string>, prefix?: string): IProps; /** * Returns the mapped the input [[props]] to output props, wrapper around [[map_attributes]] * but with `aria-` prefixed to the output attribute keys * * @param props * @param set * @returns */ export declare function map_aria_attributes(props: IProps, set?: Set<string>): IProps; /** * Returns the mapped the input [[props]] to output props, wrapper around [[map_attributes]] * but with `data-` prefixed to the output attribute keys * * @param props * @param set * @returns */ export declare function map_data_attributes(props: IProps, set?: Set<string>): IProps; /** * Returns the mapped input [[props]] to output props, automatically filtering for globally * available props like `class` or `id` * * @param props * @returns */ export declare function map_global_attributes(props: IProps): IProps; export {};