@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
122 lines (121 loc) • 3.86 kB
text/typescript
import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui';
import type { AppConfig } from '@nuxt/schema';
import theme from '#build/b24ui/slideover';
import type { ButtonProps, IconComponent, LinkPropsKeys } from '../types';
import type { EmitsToProps } from '../types/utils';
import type { ComponentConfig } from '../types/tv';
type Slideover = ComponentConfig<typeof theme, AppConfig, 'slideover'>;
export interface SlideoverProps extends DialogRootProps {
title?: string;
description?: string;
/** The content of the slideover. */
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>;
/**
* Render an overlay behind the slideover.
* @defaultValue true
*/
overlay?: boolean;
/**
* Render an overlay blur behind the slideover.
* `auto` use `motion-safe`.
* @defaultValue 'off'
*/
overlayBlur?: Slideover['variants']['overlayBlur'];
/**
* Animate the slideover when opening or closing.
* @defaultValue true
*/
transition?: boolean;
/**
* The side of the slideover.
* @defaultValue 'bottom'
*/
side?: Slideover['variants']['side'];
/**
* Whether to inset the slideover from the edges.
* @defaultValue false
*/
inset?: boolean;
/**
* Render the slideover in a portal.
* @defaultValue true
*/
portal?: boolean | string | HTMLElement;
/**
* Display a close button to dismiss the slideover.
* `{ color: 'air-primary' }`{lang="ts"} for `left`, `right`, `bottom`
* `{ color: 'air-tertiary' }`{lang="ts"} for `top`
* @defaultValue true
*/
close?: boolean | Omit<ButtonProps, LinkPropsKeys>;
/**
* The icon displayed in the close button.
* @defaultValue icons.close
* @IconComponent
*/
closeIcon?: IconComponent;
/**
* When `false`, the slideover will not close when clicking outside or pressing escape.
* @defaultValue false
*/
dismissible?: boolean;
/**
* The content is placed on a light background.
* @defaultValue 'true'
*/
useLightContent?: boolean;
class?: any;
b24ui?: Slideover['slots'];
}
export interface SlideoverEmits extends DialogRootEmits {
'after:leave': [];
'after:enter': [];
'close:prevent': [];
}
export interface SlideoverSlots {
default(props: {
open: boolean;
}): any;
content(props: {
close: () => void;
}): any;
sidebar(props: {
close: () => void;
}): any;
navbar(props: {
close: () => void;
}): any;
header(props: {
close: () => void;
}): any;
title(props?: {}): any;
description(props?: {}): any;
actions(props?: {}): any;
close(props: {
b24ui: Slideover['b24ui'];
}): any;
body(props: {
close: () => void;
}): any;
footer(props: {
close: () => void;
}): any;
}
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<SlideoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
"update:open": (value: boolean) => any;
"after:leave": () => any;
"after:enter": () => any;
"close:prevent": () => any;
}, string, import("vue").PublicProps, Readonly<SlideoverProps> & Readonly<{
"onUpdate:open"?: ((value: boolean) => any) | undefined;
"onAfter:leave"?: (() => any) | undefined;
"onAfter:enter"?: (() => any) | undefined;
"onClose:prevent"?: (() => any) | undefined;
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SlideoverSlots>;
declare const _default: typeof __VLS_export;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};