UNPKG

hongluan-ui

Version:
116 lines (113 loc) 2.49 kB
import { isString } from '@vue/shared'; import '../../../constants/index.mjs'; import '../../../utils/index.mjs'; import '../../../hooks/index.mjs'; import { isValidComponentSize, isValidComponentType } from '../../../utils/vue/validator.mjs'; import { useAriaProps } from '../../../hooks/use-aria/index.mjs'; import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs'; const inputProps = { id: { type: String, default: void 0 }, modelValue: { type: [String, Number, Object], default: "" }, maxlength: { type: [String, Number] }, minlength: { type: [String, Number] }, nativeType: { type: String, default: "text" }, size: { type: String, validator: isValidComponentSize }, resize: { type: String, validator: (val) => ["none", "both", "horizontal", "vertical"].includes(val) }, rows: { type: Number, default: 3 }, autosize: { type: [Boolean, Object], default: false }, autocomplete: { type: String, default: "off" }, type: { type: String, validator: isValidComponentType }, formatter: { type: Function }, parser: { type: Function }, placeholder: { type: String }, form: { type: String }, disabled: { type: Boolean, default: false }, readonly: Boolean, clearable: Boolean, showPassword: Boolean, showWordLimit: Boolean, block: Boolean, label: { type: String, default: void 0 }, containerRole: { type: String, default: void 0 }, tabindex: { type: [String, Number], default: 0 }, validateEvent: { type: Boolean, default: true }, round: Boolean, fill: Boolean, thin: Boolean, inputStyle: { type: Object, default: () => ({}) }, autofocus: Boolean, ...useAriaProps(["ariaLabel"]) }; const inputEmits = { [UPDATE_MODEL_EVENT]: (value) => isString(value), input: (value) => isString(value), change: (value) => isString(value), focus: (evt) => evt instanceof FocusEvent, blur: (evt) => evt instanceof FocusEvent, clear: () => true, mouseleave: (evt) => evt instanceof MouseEvent, mouseenter: (evt) => evt instanceof MouseEvent, keydown: (evt) => evt instanceof Event, compositionstart: (evt) => evt instanceof CompositionEvent, compositionupdate: (evt) => evt instanceof CompositionEvent, compositionend: (evt) => evt instanceof CompositionEvent }; export { inputEmits, inputProps }; //# sourceMappingURL=input.mjs.map