UNPKG

@bitrix24/b24ui-nuxt

Version:

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

104 lines (103 loc) 3 kB
import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/countdown'; import type { UseComponentIconsProps } from '../composables/useComponentIcons'; import type { ComponentConfig } from '../types/tv'; type Countdown = ComponentConfig<typeof theme, AppConfig, 'countdown'>; export interface CountdownData { days: number; hours: number; minutes: number; seconds: number; milliseconds: number; totalDays: number; totalHours: number; totalMinutes: number; totalSeconds: number; totalMilliseconds: number; } export interface CountdownProps extends Omit<UseComponentIconsProps, 'loading' | 'trailing' | 'trailingIcon'> { /** * The element or component this component should render as * @defaultValue 'span' */ as?: any; /** * @defaultValue 'md' */ size?: Countdown['variants']['size']; /** * Emits the countdown events * @defaultValue true */ emitEvents?: boolean; /** * Number of seconds to countdown * @defaultValue 0 */ seconds?: number | string; /** * Should seconds be divided into minutes? * @defaultValue true */ showMinutes?: boolean; /** * Shows a `Circle` around the countdown * @defaultValue false */ useCircle?: boolean; /** * The interval time (in milliseconds) of the countdown progress * @defaultValue 1000 */ interval?: number; /** * Starts the countdown automatically when initialized * @defaultValue true */ needStartImmediately?: boolean; /** * Generate the current time of a specific time zone * @defaultValue Date.now() */ now?: () => number; class?: any; b24ui?: Countdown['slots']; } export interface CountdownEmits { start: []; end: []; abort: []; progress: [value: CountdownData]; } export interface CountdownSlots { leading(props: { b24ui: Countdown['b24ui']; }): any; default(props: CountdownData & { formatTime: string; b24ui: Countdown['b24ui']; }): any; } declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CountdownProps, { start: () => void; abort: () => void; stop: () => void; restart: () => void; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { end: () => any; abort: () => any; progress: (value: CountdownData) => any; start: () => any; }, string, import("vue").PublicProps, Readonly<CountdownProps> & Readonly<{ onEnd?: (() => any) | undefined; onAbort?: (() => any) | undefined; onProgress?: ((value: CountdownData) => any) | undefined; onStart?: (() => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CountdownSlots>; declare const _default: typeof __VLS_export; export default _default; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; };