You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
9.8 KiB
1 lines
9.8 KiB
{"ast":null,"code":"import { useSizeProp } from '../../../hooks/use-size/index.mjs';\nimport { iconPropType } from '../../../utils/vue/icon.mjs';\nimport { mutable } from '../../../utils/typescript.mjs';\nimport { useAriaProps } from '../../../hooks/use-aria/index.mjs';\nimport { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { isString } from '@vue/shared';\nconst inputProps = buildProps({\n id: {\n type: String,\n default: void 0\n },\n size: useSizeProp,\n disabled: Boolean,\n modelValue: {\n type: definePropType([String, Number, Object]),\n default: \"\"\n },\n maxlength: {\n type: [String, Number]\n },\n minlength: {\n type: [String, Number]\n },\n type: {\n type: String,\n default: \"text\"\n },\n resize: {\n type: String,\n values: [\"none\", \"both\", \"horizontal\", \"vertical\"]\n },\n autosize: {\n type: definePropType([Boolean, Object]),\n default: false\n },\n autocomplete: {\n type: String,\n default: \"off\"\n },\n formatter: {\n type: Function\n },\n parser: {\n type: Function\n },\n placeholder: {\n type: String\n },\n form: {\n type: String\n },\n readonly: Boolean,\n clearable: Boolean,\n showPassword: Boolean,\n showWordLimit: Boolean,\n suffixIcon: {\n type: iconPropType\n },\n prefixIcon: {\n type: iconPropType\n },\n containerRole: {\n type: String,\n default: void 0\n },\n tabindex: {\n type: [String, Number],\n default: 0\n },\n validateEvent: {\n type: Boolean,\n default: true\n },\n inputStyle: {\n type: definePropType([Object, Array, String]),\n default: () => mutable({})\n },\n autofocus: Boolean,\n rows: {\n type: Number,\n default: 2\n },\n ...useAriaProps([\"ariaLabel\"])\n});\nconst inputEmits = {\n [UPDATE_MODEL_EVENT]: value => isString(value),\n input: value => isString(value),\n change: value => isString(value),\n focus: evt => evt instanceof FocusEvent,\n blur: evt => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: evt => evt instanceof MouseEvent,\n mouseenter: evt => evt instanceof MouseEvent,\n keydown: evt => evt instanceof Event,\n compositionstart: evt => evt instanceof CompositionEvent,\n compositionupdate: evt => evt instanceof CompositionEvent,\n compositionend: evt => evt instanceof CompositionEvent\n};\nexport { inputEmits, inputProps };","map":{"version":3,"names":["inputProps","buildProps","id","type","String","default","size","useSizeProp","disabled","Boolean","modelValue","definePropType","Number","Object","maxlength","minlength","resize","values","autosize","autocomplete","formatter","Function","parser","placeholder","form","readonly","clearable","showPassword","showWordLimit","suffixIcon","iconPropType","prefixIcon","containerRole","tabindex","validateEvent","inputStyle","Array","mutable","autofocus","rows","useAriaProps","inputEmits","UPDATE_MODEL_EVENT","value","isString","input","change","focus","evt","FocusEvent","blur","clear","mouseleave","MouseEvent","mouseenter","keydown","Event","compositionstart","CompositionEvent","compositionupdate","compositionend"],"sources":["../../../../../../packages/components/input/src/input.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isString,\n mutable,\n} from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport type InputAutoSize = { minRows?: number; maxRows?: number } | boolean\n\nexport const inputProps = buildProps({\n /**\n * @description native input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description input box size\n */\n size: useSizeProp,\n /**\n * @description whether to disable\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<string | number | null | undefined>([\n String,\n Number,\n Object,\n ]),\n default: '',\n },\n /**\n * @description same as `maxlength` in native input\n */\n maxlength: {\n type: [String, Number],\n },\n /**\n * @description same as `minlength` in native input\n */\n minlength: {\n type: [String, Number],\n },\n /**\n * @description type of input\n */\n type: {\n type: String,\n default: 'text',\n },\n /**\n * @description control the resizability\n */\n resize: {\n type: String,\n values: ['none', 'both', 'horizontal', 'vertical'],\n },\n /**\n * @description whether textarea has an adaptive height\n */\n autosize: {\n type: definePropType<InputAutoSize>([Boolean, Object]),\n default: false,\n },\n /**\n * @description native input autocomplete\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description format content\n */\n formatter: {\n type: Function,\n },\n /**\n * @description parse content\n */\n parser: {\n type: Function,\n },\n /**\n * @description placeholder\n */\n placeholder: {\n type: String,\n },\n /**\n * @description native input form\n */\n form: {\n type: String,\n },\n /**\n * @description native input readonly\n */\n readonly: Boolean,\n /**\n * @description native input readonly\n */\n clearable: Boolean,\n /**\n * @description toggleable password input\n */\n showPassword: Boolean,\n /**\n * @description word count\n */\n showWordLimit: Boolean,\n /**\n * @description suffix icon\n */\n suffixIcon: {\n type: iconPropType,\n },\n /**\n * @description prefix icon\n */\n prefixIcon: {\n type: iconPropType,\n },\n /**\n * @description container role, internal properties provided for use by the picker component\n */\n containerRole: {\n type: String,\n default: undefined,\n },\n /**\n * @description input tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description input or textarea element style\n */\n inputStyle: {\n type: definePropType<StyleValue>([Object, Array, String]),\n default: () => mutable({} as const),\n },\n /**\n * @description native input autofocus\n */\n autofocus: Boolean,\n rows: {\n type: Number,\n default: 2,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type InputProps = ExtractPropTypes<typeof inputProps>\n\nexport const inputEmits = {\n [UPDATE_MODEL_EVENT]: (value: string) => isString(value),\n input: (value: string) => isString(value),\n change: (value: string) => isString(value),\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n // NOTE: when autofill by browser, the keydown event is instanceof Event, not KeyboardEvent\n // relative bug report https://github.com/element-plus/element-plus/issues/6665\n keydown: (evt: KeyboardEvent | Event) => evt instanceof Event,\n compositionstart: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionupdate: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n compositionend: (evt: CompositionEvent) => evt instanceof CompositionEvent,\n}\nexport type InputEmits = typeof inputEmits\n"],"mappings":";;;;;;;AASY,MAACA,UAAU,GAAGC,UAAU,CAAC;EACnCC,EAAE,EAAE;IACFC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE,KAAK;EAClB,CAAG;EACDC,IAAI,EAAEC,WAAW;EACjBC,QAAQ,EAAEC,OAAO;EACjBC,UAAU,EAAE;IACVP,IAAI,EAAEQ,cAAc,CAAC,CACnBP,MAAM,EACNQ,MAAM,EACNC,MAAM,CACP,CAAC;IACFR,OAAO,EAAE;EACb,CAAG;EACDS,SAAS,EAAE;IACTX,IAAI,EAAE,CAACC,MAAM,EAAEQ,MAAM;EACzB,CAAG;EACDG,SAAS,EAAE;IACTZ,IAAI,EAAE,CAACC,MAAM,EAAEQ,MAAM;EACzB,CAAG;EACDT,IAAI,EAAE;IACJA,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDW,MAAM,EAAE;IACNb,IAAI,EAAEC,MAAM;IACZa,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU;EACrD,CAAG;EACDC,QAAQ,EAAE;IACRf,IAAI,EAAEQ,cAAc,CAAC,CAACF,OAAO,EAAEI,MAAM,CAAC,CAAC;IACvCR,OAAO,EAAE;EACb,CAAG;EACDc,YAAY,EAAE;IACZhB,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACb,CAAG;EACDe,SAAS,EAAE;IACTjB,IAAI,EAAEkB;EACV,CAAG;EACDC,MAAM,EAAE;IACNnB,IAAI,EAAEkB;EACV,CAAG;EACDE,WAAW,EAAE;IACXpB,IAAI,EAAEC;EACV,CAAG;EACDoB,IAAI,EAAE;IACJrB,IAAI,EAAEC;EACV,CAAG;EACDqB,QAAQ,EAAEhB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