UNPKG

@bitrix24/b24ui-nuxt

Version:

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

75 lines (74 loc) 2.28 kB
import type { SwitchRootProps } from 'reka-ui'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/switch'; import type { IconComponent } from '../types'; import type { ComponentConfig } from '../types/utils'; type Switch = ComponentConfig<typeof theme, AppConfig, 'switch'>; export interface SwitchProps extends Pick<SwitchRootProps, 'disabled' | 'id' | 'name' | 'required' | 'value' | 'defaultValue'> { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; /** * @defaultValue 'air-primary' */ color?: Switch['variants']['color']; /** * @defaultValue 'md' */ size?: Switch['variants']['size']; /** * When `true`, the loading icon will be displayed * @defaultValue false */ loading?: boolean; /** * The icon when the `loading` prop is `true`. * @defaultValue icons.refresh * @IconComponent */ loadingIcon?: IconComponent; /** * Display an icon when the switch is checked. * @IconComponent */ checkedIcon?: IconComponent; /** * Display an icon when the switch is unchecked. * @IconComponent */ uncheckedIcon?: IconComponent; label?: string; description?: string; class?: any; b24ui?: Switch['slots']; } export type SwitchEmits = { change: [event: Event]; }; export interface SwitchSlots { label(props: { label?: string; }): any; description(props: { description?: string; }): any; } declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SwitchProps & { modelValue?: boolean; }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { change: (event: Event) => any; "update:modelValue": (value: boolean) => any; }, string, import("vue").PublicProps, Readonly<SwitchProps & { modelValue?: boolean; }> & Readonly<{ onChange?: ((event: Event) => any) | undefined; "onUpdate:modelValue"?: ((value: boolean) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SwitchSlots>; export default _default; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; };