UNPKG

vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

156 lines (155 loc) 8.73 kB
import { ExtractPropTypes, PropType } from 'vue'; import { ConfigurableProps, LocaleConfig } from '@vexip-ui/config'; import { Dateable } from '@vexip-ui/utils'; import { DatePickerFormatFn, DatePickerSlots, DateShortcut, DateTimeType, TimePickerSlots, TimeShortcut, TimeType } from './symbol'; export interface DatePickerShortcutEvent { (name: string, value: Dateable | Dateable[]): void; (name: string, value: Dateable): void; (name: string, value: Dateable[]): void; } export declare const datePickerProps: { inherit: PropType<boolean>; size: PropType<"default" | "small" | "large">; state: PropType<"default" | "success" | "error" | "warning">; locale: PropType<Partial<LocaleConfig["calendar"] & LocaleConfig["datePicker"]>>; type: PropType<"year" | "month" | "date" | "datetime">; visible: PropType<boolean>; placement: PropType<"bottom" | "top" | "right" | "left" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | "right-start" | "right-end" | "left-start" | "left-end">; transfer: PropType<string | boolean>; value: PropType<string | number | Date | Dateable[]>; format: PropType<string>; valueFormat: PropType<string | string[] | DatePickerFormatFn>; filler: PropType<string>; clearable: PropType<boolean>; noAction: PropType<boolean>; labels: PropType<Partial<Record<DateTimeType, string>>>; dateSeparator: PropType<string>; timeSeparator: PropType<string>; shortcuts: PropType<DateShortcut[]>; disabledDate: PropType<(date: Date) => boolean>; steps: PropType<number[]>; ctrlSteps: PropType<number[]>; prefix: PropType<any>; prefixColor: PropType<string>; suffix: PropType<any>; suffixColor: PropType<string>; noSuffix: PropType<boolean>; disabled: PropType<boolean>; transitionName: PropType<string>; confirmText: PropType<string>; cancelText: PropType<string>; today: PropType<string | number | Date>; range: PropType<boolean>; loading: PropType<boolean>; loadingIcon: PropType<any>; loadingLock: PropType<boolean>; loadingEffect: PropType<string>; min: PropType<string | number | Date>; max: PropType<string | number | Date>; outsideClose: PropType<boolean>; outsideCancel: PropType<boolean>; placeholder: PropType<string | string[]>; unitReadonly: PropType<boolean>; weekStart: PropType<number>; popperAlive: PropType<boolean>; shortcutsPlacement: PropType<"bottom" | "top" | "right" | "left">; slots: PropType<DatePickerSlots>; onInput: PropType<((type: DateTimeType, value: number) => void) | ((type: DateTimeType, value: number) => void)[]>; onPlus: PropType<((type: DateTimeType, value: number) => void) | ((type: DateTimeType, value: number) => void)[]>; onMinus: PropType<((type: DateTimeType, value: number) => void) | ((type: DateTimeType, value: number) => void)[]>; onEnter: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onCancel: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onChange: PropType<((value: number) => void) | ((value: number | number[]) => void) | ((value: number[]) => void) | ((value: null) => void) | ((value: number[] | null) => void) | ((value: number | null) => void) | ((value: number | number[] | null) => void) | (((value: number) => void) | ((value: number | number[]) => void) | ((value: number[]) => void) | ((value: null) => void) | ((value: number[] | null) => void) | ((value: number | null) => void) | ((value: number | number[] | null) => void))[]>; onClear: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onShortcut: PropType<DatePickerShortcutEvent | DatePickerShortcutEvent[]>; onToggle: PropType<((visible: boolean) => void) | ((visible: boolean) => void)[]>; onFocus: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onBlur: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onChangeCol: PropType<((type: DateTimeType | null, inputType: "start" | "end") => void) | ((type: DateTimeType | null, inputType: "start" | "end") => void)[]>; onClickOutside: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onOutsideClose: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; }; export type DatePickerProps = ExtractPropTypes<typeof datePickerProps>; export type DatePickerCProps = ConfigurableProps<DatePickerProps>; export interface TimePickerShortcutEvent { (name: string, value: string | string[]): void; (name: string, value: string): void; (name: string, value: string[]): void; } export declare const timePickerProps: { inherit: PropType<boolean>; size: PropType<"default" | "small" | "large">; state: PropType<"default" | "success" | "error" | "warning">; locale: PropType<Partial<{ confirm: string; cancel: string; placeholder: { time: string; start: string; end: string; select: string; }; ariaLabel: { clear: string; hour: string; minute: string; second: string; }; }>>; visible: PropType<boolean>; placement: PropType<"bottom" | "top" | "right" | "left" | "bottom-start" | "bottom-end" | "top-start" | "top-end" | "right-start" | "right-end" | "left-start" | "left-end">; transfer: PropType<string | boolean>; format: PropType<string>; separator: PropType<string>; value: PropType<string | string[]>; filler: PropType<string>; clearable: PropType<boolean>; noAction: PropType<boolean>; noArrow: PropType<boolean>; pointer: PropType<boolean>; candidate: PropType<0 | 1 | 2 | 3>; steps: PropType<number[]>; labels: PropType<Partial<Record<TimeType, string>>>; shortcuts: PropType<TimeShortcut[]>; range: PropType<boolean>; disabled: PropType<boolean>; transitionName: PropType<string>; confirmText: PropType<string>; cancelText: PropType<string>; ctrlSteps: PropType<number[]>; prefix: PropType<any>; prefixColor: PropType<string>; suffix: PropType<any>; suffixColor: PropType<string>; noSuffix: PropType<boolean>; exchange: PropType<boolean>; loading: PropType<boolean>; loadingIcon: PropType<any>; loadingLock: PropType<boolean>; loadingEffect: PropType<string>; min: PropType<string>; max: PropType<string>; outsideClose: PropType<boolean>; outsideCancel: PropType<boolean>; unitReadonly: PropType<boolean>; popperAlive: PropType<boolean>; shortcutsPlacement: PropType<"bottom" | "top" | "right" | "left">; placeholder: PropType<string | string[]>; slots: PropType<TimePickerSlots>; onInput: PropType<((type: TimeType, value: number) => void) | ((type: TimeType, value: number) => void)[]>; onPlus: PropType<((type: TimeType, value: number) => void) | ((type: TimeType, value: number) => void)[]>; onMinus: PropType<((type: TimeType, value: number) => void) | ((type: TimeType, value: number) => void)[]>; onEnter: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onCancel: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onChange: PropType<((value: string) => void) | ((value: string[]) => void) | ((value: string | string[]) => void) | (((value: string) => void) | ((value: string[]) => void) | ((value: string | string[]) => void))[]>; onClear: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onShortcut: PropType<TimePickerShortcutEvent | TimePickerShortcutEvent[]>; onToggle: PropType<((visible: boolean) => void) | ((visible: boolean) => void)[]>; onFocus: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onBlur: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onChangeCol: PropType<((type: TimeType | null, inputType: "start" | "end") => void) | ((type: TimeType | null, inputType: "start" | "end") => void)[]>; onClickOutside: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; onOutsideClose: PropType<import('@vexip-ui/config').AnyFunction | import('@vexip-ui/config').AnyFunction[]>; }; export type TimePickerProps = ExtractPropTypes<typeof timePickerProps>; export type TimePickerCProps = ConfigurableProps<TimePickerProps>;