@volverjs/ui-vue
Version:
@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.
105 lines (104 loc) • 3.39 kB
TypeScript
import type { Emitter } from 'mitt';
import type { InjectionKey, Ref } from 'vue';
import type { AccordionGroupState, AlertGroupState, ButtonGroupState, InputGroupState } from './types';
import type { Volver } from './Volver';
export declare const DEFAULT_ICONIFY_PROVIDER = "vv";
export declare enum StorageType {
local = "local",
session = "session"
}
export declare enum Strategy {
absolute = "absolute",
fixed = "fixed"
}
export declare enum Side {
left = "left",
right = "right",
top = "top",
bottom = "bottom"
}
export declare enum Placement {
topStart = "top-start",
topEnd = "top-end",
bottomStart = "bottom-start",
bottomEnd = "bottom-end",
leftStart = "left-start",
leftEnd = "left-end",
rightStart = "right-start",
rightEnd = "right-end"
}
export declare enum Position {
before = "before",
after = "after"
}
export declare enum ButtonType {
button = "button",
submit = "submit",
reset = "reset"
}
export declare enum ActionTag {
nuxtLink = "nuxt-link",
routerLink = "router-link",
a = "a",
button = "button"
}
export declare enum ActionRoles {
button = "button",
link = "link",
menuitem = "menuitem"
}
export declare enum DropdownRole {
listbox = "listbox",
menu = "menu"
}
export declare enum DropdownItemRole {
option = "option",
presentation = "presentation"
}
export declare enum AlertRole {
alert = "alert",
alertdialog = "alertdialog"
}
export declare const INJECTION_KEY_VOLVER: InjectionKey<Volver>;
export declare const INJECTION_KEY_BUTTON_GROUP: InjectionKey<ButtonGroupState>;
export declare const INJECTION_KEY_RADIO_GROUP: InjectionKey<InputGroupState>;
export declare const INJECTION_KEY_CHECK_GROUP: InjectionKey<InputGroupState>;
export declare const INJECTION_KEY_ACCORDION_GROUP: InjectionKey<AccordionGroupState>;
export type DropdownTriggerState = {
id?: Ref<string | number>;
reference?: Ref<HTMLElement | null | undefined>;
bus?: Emitter<{
click: Event;
mouseover: Event;
mouseleave: Event;
}>;
expanded?: Ref<boolean>;
aria?: Ref<{
'aria-controls': string;
'aria-haspopup': boolean;
'aria-expanded': boolean;
}>;
};
export declare const INJECTION_KEY_DROPDOWN_TRIGGER: InjectionKey<DropdownTriggerState>;
export type DropdownItemState = {
role?: Ref<`${DropdownItemRole}`>;
expanded?: Ref<boolean>;
focused?: Ref<boolean>;
hovered?: Ref<boolean>;
};
export declare const INJECTION_KEY_DROPDOWN_ITEM: InjectionKey<DropdownItemState>;
export type DropdownActionState = {
role?: Ref<`${ActionRoles}`>;
expanded?: Ref<boolean>;
};
export declare const INJECTION_KEY_DROPDOWN_ACTION: InjectionKey<DropdownActionState>;
export declare const INJECTION_KEY_ALERT_GROUP: InjectionKey<AlertGroupState>;
export declare const DEFAULT_ALERT_AUTO_CLOSE = 10000;
export declare const DEFAULT_ALERT_MODIFIERS = "info";
export declare const DEFAULT_ALERT_DISMISSABLE = true;
export declare const DEFAULT_ALERT_GROUP = "default";
export declare const DEFAULT_ALERT_INFO_ICON = "information";
export declare const DEFAULT_ALERT_SUCCESS_ICON = "check-circle";
export declare const DEFAULT_ALERT_WARNING_ICON = "warning";
export declare const DEFAULT_ALERT_DANGER_ICON = "error";
export declare const DefaultAlertIconMap: Map<string, string>;