@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
109 lines (108 loc) • 3.07 kB
TypeScript
import type { AppConfig } from '@nuxt/schema';
import theme from '#build/b24ui/countdown';
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
import type { ComponentConfig } from '../types/utils';
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?: {}): any;
default(props: CountdownData & {
formatTime: string;
}): any;
}
declare const _default: __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;
}>, {
as: any;
emitEvents: boolean;
seconds: number | string;
showMinutes: boolean;
useCircle: boolean;
interval: number;
needStartImmediately: boolean;
now: () => number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CountdownSlots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};