UNPKG

@bitrix24/b24ui-nuxt

Version:

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

439 lines (438 loc) 10.4 kB
import type { VariantProps } from 'tailwind-variants'; import type { ToastRootProps, ToastRootEmits } from 'reka-ui'; import type { AvatarProps, ButtonProps, IconComponent } from '../types'; import type { StringOrVNode } from '../types/utils'; declare const toast: import("tailwind-variants").TVReturnType<{ color: { default: { root: string; icon: string; progress: string; }; danger: { root: string; icon: string; progress: string; }; success: { root: string; icon: string; progress: string; }; warning: { root: string; icon: string; progress: string; }; primary: { root: string; icon: string; progress: string; }; secondary: { root: string; icon: string; progress: string; }; collab: { root: string; icon: string; progress: string; }; ai: { root: string; icon: string; progress: 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; progress: string; close: string; }, undefined, { color: { default: { root: string; icon: string; progress: string; }; danger: { root: string; icon: string; progress: string; }; success: { root: string; icon: string; progress: string; }; warning: { root: string; icon: string; progress: string; }; primary: { root: string; icon: string; progress: string; }; secondary: { root: string; icon: string; progress: string; }; collab: { root: string; icon: string; progress: string; }; ai: { root: string; icon: string; progress: 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; progress: string; close: string; }, import("tailwind-variants").TVReturnType<{ color: { default: { root: string; icon: string; progress: string; }; danger: { root: string; icon: string; progress: string; }; success: { root: string; icon: string; progress: string; }; warning: { root: string; icon: string; progress: string; }; primary: { root: string; icon: string; progress: string; }; secondary: { root: string; icon: string; progress: string; }; collab: { root: string; icon: string; progress: string; }; ai: { root: string; icon: string; progress: 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; progress: string; close: string; }, undefined, { color: { default: { root: string; icon: string; progress: string; }; danger: { root: string; icon: string; progress: string; }; success: { root: string; icon: string; progress: string; }; warning: { root: string; icon: string; progress: string; }; primary: { root: string; icon: string; progress: string; }; secondary: { root: string; icon: string; progress: string; }; collab: { root: string; icon: string; progress: string; }; ai: { root: string; icon: string; progress: 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; progress: string; close: string; }, import("tailwind-variants").TVReturnType<{ color: { default: { root: string; icon: string; progress: string; }; danger: { root: string; icon: string; progress: string; }; success: { root: string; icon: string; progress: string; }; warning: { root: string; icon: string; progress: string; }; primary: { root: string; icon: string; progress: string; }; secondary: { root: string; icon: string; progress: string; }; collab: { root: string; icon: string; progress: string; }; ai: { root: string; icon: string; progress: 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; progress: string; close: string; }, undefined, unknown, unknown, undefined>>>; type ToastVariants = VariantProps<typeof toast>; export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open' | 'type' | 'duration'> { /** * The element or component this component should render as. * @defaultValue 'li' */ as?: any; title?: StringOrVNode; description?: StringOrVNode; /** * @IconComponent */ icon?: IconComponent; avatar?: AvatarProps; /** * @defaultValue 'default' */ color?: ToastVariants['color']; /** * The orientation between the content and the actions * @defaultValue 'vertical' */ orientation?: ToastVariants['orientation']; /** * 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 toast. * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts"} * @defaultValue true */ close?: boolean | Partial<ButtonProps>; /** * The icon displayed in the close button. * @defaultValue icons.close * @IconComponent */ closeIcon?: IconComponent; class?: any; b24ui?: Partial<typeof toast.slots>; } export interface ToastEmits extends ToastRootEmits { } export interface ToastSlots { leading(props?: {}): any; title(props?: {}): any; description(props?: {}): any; actions(props?: {}): any; close(props: { b24ui: ReturnType<typeof toast>; }): any; } declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ToastProps>, { close: boolean; orientation: string; }>>, { height: import("vue").Ref<number, number>; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, { close: boolean | Partial<ButtonProps>; orientation: "horizontal" | "vertical"; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Readonly<ToastSlots> & ToastSlots>; 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]; } & {};