| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
- import { ComponentSize } from "../../../constants/size.js";
- import _default from "./input-number.vue.js";
- import * as _$vue from "vue";
- import { ExtractPublicPropTypes, HTMLAttributes } from "vue";
- //#region ../../packages/components/input-number/src/input-number.d.ts
- /**
- * @description input-number component props
- */
- interface InputNumberProps {
- /**
- * @description same as `id` in native input
- */
- id?: string;
- /**
- * @description incremental step
- */
- step?: number;
- /**
- * @description whether input value can only be multiple of step
- */
- stepStrictly?: boolean;
- /**
- * @description the maximum allowed value
- */
- max?: number;
- /**
- * @description the minimum allowed value
- */
- min?: number;
- /**
- * @description binding value
- */
- modelValue?: number | null;
- /**
- * @description same as `readonly` in native input
- */
- readonly?: boolean;
- /**
- * @description whether the component is disabled
- */
- disabled?: boolean;
- /**
- * @description size of the component
- */
- size?: ComponentSize;
- /**
- * @description whether to enable the control buttons
- */
- controls?: boolean;
- /**
- * @description position of the control buttons
- */
- controlsPosition?: '' | 'right';
- /**
- * @description value should be set when input box is cleared
- */
- valueOnClear?: 'min' | 'max' | number | null;
- /**
- * @description same as `name` in native input
- */
- name?: string;
- /**
- * @description same as `placeholder` in native input
- */
- placeholder?: string;
- /**
- * @description precision of input value
- */
- precision?: number;
- /**
- * @description whether to trigger form validation
- */
- validateEvent?: boolean;
- /**
- * @description native aria-label attribute
- */
- ariaLabel?: string;
- /**
- * @description native input mode for virtual keyboards
- */
- inputmode?: HTMLAttributes['inputmode'];
- /**
- * @description alignment for the inner input text
- */
- align?: 'left' | 'right' | 'center';
- /**
- * @description whether to disable scientific notation input (e.g. 'e', 'E')
- */
- disabledScientific?: boolean;
- /**
- * @description specifies the format of the value presented in the input
- */
- formatter?: (value: string) => string;
- /**
- * @description specifies the value extracted from the formatted input
- */
- parser?: (value: string) => string;
- /**
- * @description same as `tabindex` in native input
- */
- tabindex?: string | number;
- }
- /**
- * @deprecated Removed after 3.0.0, Use `InputNumberProps` instead.
- */
- declare const inputNumberProps: {
- readonly inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "none" | "text" | "url" | "email" | "tel" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "none" | "text" | "url" | "email" | "tel" | "numeric" | "decimal") | (() => "search" | "none" | "text" | "url" | "email" | "tel" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
- readonly align: EpPropFinalized<(new (...args: any[]) => "right" | "left" | "center") | (() => "right" | "left" | "center") | (((new (...args: any[]) => "right" | "left" | "center") | (() => "right" | "left" | "center")) | null)[], unknown, unknown, "center", boolean>;
- readonly disabledScientific: BooleanConstructor;
- readonly formatter: {
- readonly type: _$vue.PropType<Function>;
- readonly required: false;
- readonly validator: ((val: unknown) => boolean) | undefined;
- __epPropKey: true;
- };
- readonly parser: {
- readonly type: _$vue.PropType<Function>;
- readonly required: false;
- readonly validator: ((val: unknown) => boolean) | undefined;
- __epPropKey: true;
- };
- readonly tabindex: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
- readonly ariaLabel: StringConstructor;
- readonly id: EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
- readonly step: EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
- readonly stepStrictly: BooleanConstructor;
- readonly max: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
- readonly min: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
- readonly modelValue: {
- readonly type: _$vue.PropType<EpPropMergeType<readonly [NumberConstructor, null], unknown, unknown>>;
- readonly required: false;
- readonly validator: ((val: unknown) => boolean) | undefined;
- __epPropKey: true;
- };
- readonly readonly: BooleanConstructor;
- readonly disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
- readonly size: {
- readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
- readonly required: false;
- readonly validator: ((val: unknown) => boolean) | undefined;
- __epPropKey: true;
- };
- readonly controls: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
- readonly controlsPosition: EpPropFinalized<StringConstructor, "" | "right", unknown, "", boolean>;
- readonly valueOnClear: EpPropFinalized<(new (...args: any[]) => number | "min" | "max") | (() => number | "min" | "max" | null) | (((new (...args: any[]) => number | "min" | "max") | (() => number | "min" | "max" | null)) | null)[], unknown, unknown, null, boolean>;
- readonly name: StringConstructor;
- readonly placeholder: StringConstructor;
- readonly precision: {
- readonly type: _$vue.PropType<number>;
- readonly required: false;
- readonly validator: ((val: unknown) => boolean) | undefined;
- __epPropKey: true;
- };
- readonly validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
- };
- /**
- * @deprecated Removed after 3.0.0, Use `InputNumberProps` instead.
- */
- type InputNumberPropsPublic = ExtractPublicPropTypes<typeof inputNumberProps>;
- declare const inputNumberEmits: {
- change: (cur: number | undefined, prev: number | undefined) => boolean;
- blur: (e: FocusEvent) => boolean;
- focus: (e: FocusEvent) => boolean;
- input: (val: number | null | undefined) => boolean;
- "update:modelValue": (val: number | undefined) => boolean;
- };
- type InputNumberEmits = typeof inputNumberEmits;
- type InputNumberInstance = InstanceType<typeof _default> & unknown;
- //#endregion
- export { InputNumberEmits, InputNumberInstance, InputNumberProps, InputNumberPropsPublic, inputNumberEmits, inputNumberProps };
|