maz-ui
Version:
A standalone components library for Vue.Js 3 & Nuxt.Js 3
126 lines (125 loc) • 3.64 kB
TypeScript
import { HTMLAttributes } from 'vue';
import { MazInputProps } from './MazInput.vue';
import { MazSize } from './types';
export interface MazInputNumberProps {
/**
* The inline style object for the component.
* @type {HTMLAttributes['style']}
*/
style?: HTMLAttributes['style'];
/**
* The CSS class name for the component.
* @type {HTMLAttributes['class']}
*/
class?: HTMLAttributes['class'];
/**
* The value of the component (v-model).
* @model
* @type {number}
*/
modelValue?: number;
/**
* Whether the input number is disabled or not.
* @type {boolean}
*/
disabled?: boolean;
/**
* The maximum value allowed for the input number.
* @type {number}
* @default Number.POSITIVE_INFINITY
*/
max?: number;
/**
* The minimum value allowed for the input number.
* @type {number}
* @default Number.NEGATIVE_INFINITY
*/
min?: number;
/**
* The step value for incrementing or decrementing the input number.
* @type {number}
* @default 1
*/
step?: number;
/**
* The size of the input number component.
* @type {MazSize}
* @default 'md'
*/
size?: MazSize;
/**
* Whether to hide the increment and decrement buttons or not.
* @type {boolean}
* @default false
*/
hideButtons?: boolean;
/**
* Whether to center the text inside the input or not.
* @type {boolean}
* @default true
*/
textCenter?: boolean;
/**
* The inputmode attribute for the input.
* @type {HTMLAttributes['inputmode']}
*/
inputmode?: HTMLAttributes['inputmode'];
/**
* The input will be displayed in full width
* @type {boolean}
*/
block?: boolean;
/**
* Will display the input in error state.
* @type {boolean}
* @default false
*/
error?: boolean;
/**
* The hint text to display below the input.
* @type {string}
*/
hint?: string;
/**
* Will display the input in success state.
* @type {boolean}
* @default false
*/
success?: boolean;
/**
* Will display the input in warning state.
* @type {boolean}
* @default false
*/
warning?: boolean;
/**
* The props for the input component.
* @type {MazInputProps}
*/
inputProps?: MazInputProps;
}
declare const _default: import('vue').DefineComponent<MazInputNumberProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
blur: (value: Event) => any;
change: (value: Event) => any;
click: (value: Event) => any;
focus: (value: Event) => any;
"update:model-value": (value?: number | undefined) => any;
}, string, import('vue').PublicProps, Readonly<MazInputNumberProps> & Readonly<{
onBlur?: ((value: Event) => any) | undefined;
onChange?: ((value: Event) => any) | undefined;
onClick?: ((value: Event) => any) | undefined;
onFocus?: ((value: Event) => any) | undefined;
"onUpdate:model-value"?: ((value?: number | undefined) => any) | undefined;
}>, {
size: MazSize;
style: string | false | import('vue').CSSProperties | import('vue').StyleValue[] | null;
class: HTMLAttributes["class"];
disabled: boolean;
max: number;
min: number;
modelValue: number;
step: number;
inputmode: "search" | "text" | "none" | "decimal" | "email" | "url" | "tel" | "numeric";
textCenter: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
export default _default;