UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

15 lines (14 loc) 836 B
import type { Generic } from 'adopted-style-sheets'; import type { AlertProps } from '../components'; import type { Stringified } from '../types'; export type MsgPropType = Omit<AlertProps, '_level' | '_on' | '_label' | '_hasCloser' | '_variant'> & { _description: string; }; export type PropMsg = { msg: Stringified<MsgPropType>; }; export declare const validateMsg: (component: Generic.Element.Component, value?: Stringified<MsgPropType>) => void; export declare function isMsgDefinedAndInputTouched(msg?: Stringified<MsgPropType>, touched?: boolean): boolean; export declare const checkHasMsg: typeof isMsgDefinedAndInputTouched; export declare function normalizeMsg(msg?: Stringified<MsgPropType>): MsgPropType | undefined; export declare function getMsgType(msg?: Stringified<MsgPropType>): MsgPropType['_type'] | 'error';