UNPKG

@volverjs/ui-vue

Version:

@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.

105 lines (104 loc) 2.79 kB
import type { ExtractPropTypes, PropType } from 'vue'; import type { AlertModifier } from '@/types'; import { AlertRole } from '@/constants'; export declare const VvAlertProps: { /** * Component BEM modifiers */ modifiers: { type: PropType<AlertModifier | AlertModifier[]>; default: undefined; }; /** * The alert is dismissable * @default false * @type boolean */ dismissable: { type: BooleanConstructor; default: boolean; }; /** * The alert auto close after the specified time in milliseconds * @default 0 * @type number */ autoClose: { type: NumberConstructor; default: number; }; /** * The alert close label * @default 'Close' * @type string */ closeLabel: { type: StringConstructor; default: string; }; /** * The alert title * @default '' * @type string */ title: { type: StringConstructor; default: undefined; }; /** * The alert content * @default '' * @type string */ content: { type: StringConstructor; default: undefined; }; /** * The alert footer * @default '' * @type string */ footer: { type: StringConstructor; default: undefined; }; /** * The alert role * @default 'alert' * @type string * @values 'alert', 'alertdialog' * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alert_Role * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alertdialog_role */ role: { type: PropType<`${AlertRole}`>; default: AlertRole; }; icon: { type: PropType<string | import("../VvIcon").VvIconProps>; default: undefined; }; iconPosition: { type: PropType<`${import("@/constants").Position}`>; default: import("@/constants").Position; validation: (value: import("@/constants").Position) => boolean; }; id: (StringConstructor | NumberConstructor)[]; }; export declare const VvAlertEvents: string[]; export declare function useVvAlert(props: Readonly<ExtractPropTypes<typeof VvAlertProps>>, emit: (event: string, ...args: unknown[]) => void): { close: () => void; hasIcon: globalThis.ComputedRef<import("../VvIcon").VvIconProps | undefined>; hasTitleId: globalThis.ComputedRef<string>; hasProps: globalThis.ComputedRef<{ onMouseover: () => void; onMouseleave: () => void; class: Record<string, boolean>; style: { '--alert-duration': string; }; role: "alert" | "alertdialog"; 'aria-labelledby': string; }>; };