UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

465 lines (464 loc) 10.5 kB
import type { VariantProps } from 'tailwind-variants'; import type { AvatarProps, ButtonProps, IconComponent } from '../types'; declare const alert: import("tailwind-variants").TVReturnType<{ color: { default: { root: string[]; close: string; }; danger: { root: string[]; close: string; }; success: { root: string[]; close: string; }; warning: { root: string[]; close: string; }; primary: { root: string[]; close: string; }; secondary: { root: string[]; close: string; }; collab: { root: string[]; close: string; }; ai: { root: string[]; close: string; }; }; size: { sm: { root: string; title: string; description: string; avatarSize: string; }; md: { root: string; title: string; description: string; avatarSize: string; }; }; orientation: { horizontal: { root: string; actions: string; }; vertical: { root: string; actions: string; }; }; title: { true: { description: string; }; }; }, { root: string; wrapper: string; title: string; description: string; icon: string; avatar: string; avatarSize: string; actions: string; close: string; }, undefined, { color: { default: { root: string[]; close: string; }; danger: { root: string[]; close: string; }; success: { root: string[]; close: string; }; warning: { root: string[]; close: string; }; primary: { root: string[]; close: string; }; secondary: { root: string[]; close: string; }; collab: { root: string[]; close: string; }; ai: { root: string[]; close: string; }; }; size: { sm: { root: string; title: string; description: string; avatarSize: string; }; md: { root: string; title: string; description: string; avatarSize: string; }; }; orientation: { horizontal: { root: string; actions: string; }; vertical: { root: string; actions: string; }; }; title: { true: { description: string; }; }; }, { root: string; wrapper: string; title: string; description: string; icon: string; avatar: string; avatarSize: string; actions: string; close: string; }, import("tailwind-variants").TVReturnType<{ color: { default: { root: string[]; close: string; }; danger: { root: string[]; close: string; }; success: { root: string[]; close: string; }; warning: { root: string[]; close: string; }; primary: { root: string[]; close: string; }; secondary: { root: string[]; close: string; }; collab: { root: string[]; close: string; }; ai: { root: string[]; close: string; }; }; size: { sm: { root: string; title: string; description: string; avatarSize: string; }; md: { root: string; title: string; description: string; avatarSize: string; }; }; orientation: { horizontal: { root: string; actions: string; }; vertical: { root: string; actions: string; }; }; title: { true: { description: string; }; }; }, { root: string; wrapper: string; title: string; description: string; icon: string; avatar: string; avatarSize: string; actions: string; close: string; }, undefined, { color: { default: { root: string[]; close: string; }; danger: { root: string[]; close: string; }; success: { root: string[]; close: string; }; warning: { root: string[]; close: string; }; primary: { root: string[]; close: string; }; secondary: { root: string[]; close: string; }; collab: { root: string[]; close: string; }; ai: { root: string[]; close: string; }; }; size: { sm: { root: string; title: string; description: string; avatarSize: string; }; md: { root: string; title: string; description: string; avatarSize: string; }; }; orientation: { horizontal: { root: string; actions: string; }; vertical: { root: string; actions: string; }; }; title: { true: { description: string; }; }; }, { root: string; wrapper: string; title: string; description: string; icon: string; avatar: string; avatarSize: string; actions: string; close: string; }, import("tailwind-variants").TVReturnType<{ color: { default: { root: string[]; close: string; }; danger: { root: string[]; close: string; }; success: { root: string[]; close: string; }; warning: { root: string[]; close: string; }; primary: { root: string[]; close: string; }; secondary: { root: string[]; close: string; }; collab: { root: string[]; close: string; }; ai: { root: string[]; close: string; }; }; size: { sm: { root: string; title: string; description: string; avatarSize: string; }; md: { root: string; title: string; description: string; avatarSize: string; }; }; orientation: { horizontal: { root: string; actions: string; }; vertical: { root: string; actions: string; }; }; title: { true: { description: string; }; }; }, { root: string; wrapper: string; title: string; description: string; icon: string; avatar: string; avatarSize: string; actions: string; close: string; }, undefined, unknown, unknown, undefined>>>; type AlertVariants = VariantProps<typeof alert>; export interface AlertProps { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; title?: string; description?: string; /** * Display an icon on the left side. * @IconComponent */ icon?: IconComponent; avatar?: AvatarProps; /** * @defaultValue 'default' */ color?: AlertVariants['color']; /** * The orientation between the content and the actions. * @defaultValue 'vertical' */ orientation?: AlertVariants['orientation']; /** * @defaultValue 'md' */ size?: AlertVariants['size']; /** * Display a list of actions: * - under the title and description when orientation is `vertical` * - next to the close button when orientation is `horizontal` * `{ size: 'xs' }`{lang="ts"} */ actions?: ButtonProps[]; /** * Display a close button to dismiss the alert. * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts"} * @emits 'update:open' * @defaultValue false */ close?: boolean | Partial<ButtonProps>; /** * The icon displayed in the close button. * @defaultValue icons.close * @IconComponent */ closeIcon?: IconComponent; class?: any; b24ui?: Partial<typeof alert.slots>; } export interface AlertEmits { (e: 'update:open', value: boolean): void; } export interface AlertSlots { leading(props?: {}): any; title(props?: {}): any; description(props?: {}): any; actions(props?: {}): any; close(props: { b24ui: ReturnType<typeof alert>; }): any; } declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AlertProps>, { orientation: string; }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, { orientation: "horizontal" | "vertical"; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<AlertSlots> & AlertSlots>; export default _default; type __VLS_WithDefaults<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_NonUndefinedable<T> = T extends undefined ? never : T; type __VLS_TypePropsToOption<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>; } : { type: import('vue').PropType<T[K]>; required: true; }; }; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; }; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};