maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
127 lines (126 loc) • 4.56 kB
TypeScript
import type { PickerShortcut, PickerValue } from './MazPicker/types';
import type { Color, Position } from './types';
import { type HTMLAttributes } from 'vue';
export type { Color, PickerShortcut, PickerValue, Position };
export interface Props {
/** The id of the component */
id?: string;
/** The style of the component */
style?: HTMLAttributes['style'];
/** The class of the component */
class?: HTMLAttributes['class'];
/** The value of the component */
modelValue?: PickerValue;
/** The format of the date */
format?: string;
/** If true picker window will be open */
open?: boolean;
/** The label of the input */
label?: string;
/** The placeholder of the input */
placeholder?: string;
/** The style of the input date */
inputDateStyle?: Intl.DateTimeFormatOptions;
/**
* The transformer of the input date
* @type {(payload: { formattedDate?: string; value?: PickerValue; locale: string }) => string}
*/
inputDateTransformer?: (payload: {
formattedDate?: string;
value?: PickerValue;
locale: string;
}) => string;
/** The locale of the component */
locale?: string;
/** If true, the header will be hidden */
noHeader?: boolean;
/** If true, the component will be disabled */
disabled?: boolean;
/** The first day of the week (between 0 and 6) */
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
/** If true, the picker will close after a date selection */
autoClose?: boolean;
/** The selector of the custom element to trigger the picker */
customElementSelector?: string;
/** If true, the picker will be double */
double?: boolean;
/** If true, the picker will be inline */
inline?: boolean;
/** The color of the component */
color?: Color;
/** The position of the picker */
pickerPosition?: Position;
/** If true, the picker has a time picker */
time?: boolean;
/** If true, the picker will be a time picker */
onlyTime?: boolean;
/** The interval of the minutes */
minuteInterval?: number;
/** If true, the browser locale will be used */
noUseBrowserLocale?: boolean;
/** If true, the browser locale will not be fetched */
noFetchLocal?: boolean;
/** If true, the shortcuts will be hidden */
noShortcuts?: boolean;
/** The shortcuts of the picker */
shortcuts?: PickerShortcut[];
/** The shortcut of the picker */
shortcut?: string;
/** The min date of the picker */
minDate?: string;
/** The max date of the picker */
maxDate?: string;
/** The disabled weekly days of the picker */
disabledWeekly?: number[];
/** The disabled dates of the picker */
disabledDates?: string[];
/** The disabled hours of the time picker */
disabledHours?: number[];
/** The input will be displayed in full width */
block?: boolean;
}
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
close: (...args: any[]) => void;
"update:model-value": (...args: any[]) => void;
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
onClose?: ((...args: any[]) => any) | undefined;
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
}>, {
label: string;
style: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
time: boolean;
color: Color;
class: HTMLAttributes["class"];
disabled: boolean;
modelValue: string | Partial<import("./MazPicker/types").RangeValue>;
open: boolean;
locale: string;
double: boolean;
inline: boolean;
placeholder: string;
format: string;
noUseBrowserLocale: boolean;
minDate: string;
maxDate: string;
disabledWeekly: number[];
disabledDates: string[];
firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6;
shortcuts: PickerShortcut[];
shortcut: string;
noShortcuts: boolean;
minuteInterval: number;
disabledHours: number[];
noHeader: boolean;
inputDateStyle: Intl.DateTimeFormatOptions;
inputDateTransformer: (payload: {
formattedDate?: string;
value?: PickerValue;
locale: string;
}) => string;
autoClose: boolean;
customElementSelector: string;
pickerPosition: Position;
onlyTime: boolean;
noFetchLocal: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default _default;