1 line
22 KiB
Plaintext
1 line
22 KiB
Plaintext
|
{"version":3,"file":"VTextarea.mjs","names":["VCounter","VField","filterFieldProps","makeVFieldProps","makeVInputProps","VInput","useFocus","forwardRefs","useProxiedModel","Intersect","computed","nextTick","onBeforeUnmount","onMounted","ref","shallowRef","watch","watchEffect","callEvent","clamp","convertToUnit","filterInputAttrs","genericComponent","propsFactory","useRender","makeVTextareaProps","autoGrow","Boolean","autofocus","counter","Number","String","counterValue","Function","prefix","placeholder","persistentPlaceholder","persistentCounter","noResize","rows","type","default","validator","v","isNaN","parseFloat","maxRows","suffix","modelModifiers","Object","VTextarea","name","directives","inheritAttrs","props","emits","e","focused","val","setup","_ref","attrs","emit","slots","model","isFocused","focus","blur","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","vInputRef","vFieldRef","controlHeight","textareaRef","isActive","active","onFocus","document","activeElement","onControlClick","onControlMousedown","onClear","stopPropagation","onInput","el","trim","caretPosition","selectionStart","selectionEnd","sizerRef","isPlainOrUnderlined","includes","variant","calculateInputHeight","style","getComputedStyle","fieldStyle","$el","padding","getPropertyValue","height","scrollHeight","lineHeight","minHeight","Math","maxHeight","Infinity","newHeight","floor","density","observer","ResizeObserver","observe","disconnect","hasCounter","hasDetails","details","rootAttrs","inputAttrs","modelValue","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","class","_ref2","id","isDisabled","isDirty","isReadonly","isValid","dirty","_ref3","fieldClass","slotProps","_Fragment","_withDirectives","_resolveDirective","handler","once","_vModelText"],"sources":["../../../src/components/VTextarea/VTextarea.tsx"],"sourcesContent":["// Styles\nimport './VTextarea.sass'\nimport '../VTextField/VTextField.sass'\n\n// Components\nimport { VCounter } from '@/components/VCounter/VCounter'\nimport { VField } from '@/components/VField'\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Utilities\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport { callEvent, clamp, convertToUnit, filterInputAttrs, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VCounterSlot } from '@/components/VCounter/VCounter'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport const makeVTextareaProps = propsFactory({\n autoGrow: Boolean,\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n noResize: Boolean,\n rows: {\n type: [Number, String],\n default: 5,\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n maxRows: {\n type: [Number, String],\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n suffix: String,\n modelModifiers: Object as PropType<Record<string, boolean>>,\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n}, 'VTextarea')\n\ntype VTextareaSlots = Omit<VInputSlots & VFieldSlots, 'default'> & {\n counter: VCounterSlot\n}\n\nexport const VTextarea = genericComponent<VTextareaSlots>()({\n name: 'VTextarea',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: makeVTextareaProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:con
|