UNPKG

@vuesax-alpha/nightly

Version:
89 lines (86 loc) 2.17 kB
import { isNil } from 'lodash-unified'; import '../../../constants/index.mjs'; import '../../../hooks/index.mjs'; import '../../../utils/index.mjs'; import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs'; import { useColorProp } from '../../../hooks/use-common-props/index.mjs'; import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs'; import { isString } from '@vue/shared'; import { isNumber } from '../../../utils/types.mjs'; const inputProps = buildProps({ clearable: { type: Boolean, default: false }, color: useColorProp, disabled: { type: Boolean }, iconAfter: { type: Boolean }, id: { type: String, default: null }, inputStyle: { type: String, values: ["border", "shadow", "transparent"], default: null }, labelFloat: { type: Boolean, default: false }, label: { type: String, default: null }, loading: { type: Boolean }, modelValue: { type: definePropType([String, Number]), default: "" }, placeholder: { type: String, default: null }, progress: { type: Number }, shape: { type: String, values: ["rounded", "square"], default: "rounded" }, showPassword: { type: Boolean, default: false }, state: useColorProp, textWhite: { type: Boolean }, type: { type: String, default: "text" }, wrapClasses: { type: String }, wrapStyles: { type: definePropType([String, Object, Array]) }, block: { type: Boolean }, border: Boolean, labelPlaceholder: String, shadow: Boolean, square: Boolean, transparent: Boolean }); const inputEmits = { [UPDATE_MODEL_EVENT]: (text) => isString(text) || isNumber(text) || isNil(text), clickIcon: (evt) => evt instanceof Event, mouseleave: (evt) => evt instanceof MouseEvent, mouseenter: (evt) => evt instanceof MouseEvent, clear: () => true, input: (value) => !isNil(value), change: (value) => isString(value), focus: (evt) => evt instanceof FocusEvent, blur: (evt) => evt instanceof FocusEvent, keydown: (evt) => evt instanceof Event }; export { inputEmits, inputProps }; //# sourceMappingURL=input.mjs.map