{"version":3,"file":"VTextarea-C6abxQK3.js","sources":["../../../node_modules/.pnpm/vuetify@2.7.2_vue@2.7.16/node_modules/vuetify/lib/components/VTextarea/VTextarea.js"],"sourcesContent":["// Styles\nimport \"../../../src/components/VTextarea/VTextarea.sass\"; // Extensions\n\nimport VTextField from '../VTextField/VTextField'; // Utilities\n\nimport mixins from '../../util/mixins';\nconst baseMixins = mixins(VTextField);\n/* @vue/component */\n\nexport default baseMixins.extend({\n name: 'v-textarea',\n props: {\n autoGrow: Boolean,\n noResize: Boolean,\n rowHeight: {\n type: [Number, String],\n default: 24,\n validator: v => !isNaN(parseFloat(v))\n },\n rows: {\n type: [Number, String],\n default: 5,\n validator: v => !isNaN(parseInt(v, 10))\n }\n },\n computed: {\n classes() {\n return {\n 'v-textarea': true,\n 'v-textarea--auto-grow': this.autoGrow,\n 'v-textarea--no-resize': this.noResizeHandle,\n ...VTextField.options.computed.classes.call(this)\n };\n },\n\n noResizeHandle() {\n return this.noResize || this.autoGrow;\n }\n\n },\n watch: {\n autoGrow(val) {\n this.$nextTick(() => {\n var _a;\n\n val ? this.calculateInputHeight() : (_a = this.$refs.input) === null || _a === void 0 ? void 0 : _a.style.removeProperty('height');\n });\n },\n\n lazyValue() {\n this.autoGrow && this.$nextTick(this.calculateInputHeight);\n },\n\n rowHeight() {\n this.autoGrow && this.$nextTick(this.calculateInputHeight);\n }\n\n },\n\n mounted() {\n setTimeout(() => {\n this.autoGrow && this.calculateInputHeight();\n }, 0);\n },\n\n methods: {\n calculateInputHeight() {\n const input = this.$refs.input;\n if (!input) return;\n input.style.height = '0';\n const height = input.scrollHeight;\n const minHeight = parseInt(this.rows, 10) * parseFloat(this.rowHeight); // This has to be done ASAP, waiting for Vue\n // to update the DOM causes ugly layout jumping\n\n input.style.height = Math.max(minHeight, height) + 'px';\n },\n\n genInput() {\n const input = VTextField.options.methods.genInput.call(this);\n input.tag = 'textarea';\n delete input.data.attrs.type;\n input.data.attrs.rows = this.rows;\n return input;\n },\n\n onInput(e) {\n VTextField.options.methods.onInput.call(this, e);\n this.autoGrow && this.calculateInputHeight();\n },\n\n onKeyDown(e) {\n // Prevents closing of a\n // dialog when pressing\n // enter\n if (this.isFocused && e.keyCode === 13) {\n e.stopPropagation();\n }\n\n this.$emit('keydown', e);\n }\n\n }\n});\n//# sourceMappingURL=VTextarea.js.map"],"names":["baseMixins","mixins","VTextField","__unplugin_components_2","v","__spreadValues","val","_a","input","height","minHeight","e"],"mappings":"uzBAMA,MAAMA,EAAaC,EAAOC,CAAU,EAGrBC,EAAAH,EAAW,OAAO,CAC/B,KAAM,aACN,MAAO,CACL,SAAU,QACV,SAAU,QACV,UAAW,CACT,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,GACT,UAAWI,GAAK,CAAC,MAAM,WAAWA,CAAC,CAAC,CACrC,EACD,KAAM,CACJ,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,EACT,UAAWA,GAAK,CAAC,MAAM,SAASA,EAAG,EAAE,CAAC,CAC5C,CACG,EACD,SAAU,CACR,SAAU,CACR,OAAOC,EAAA,CACL,aAAc,GACd,wBAAyB,KAAK,SAC9B,wBAAyB,KAAK,gBAC3BH,EAAW,QAAQ,SAAS,QAAQ,KAAK,IAAI,EAEnD,EAED,gBAAiB,CACf,OAAO,KAAK,UAAY,KAAK,QACnC,CAEG,EACD,MAAO,CACL,SAASI,EAAK,CACZ,KAAK,UAAU,IAAM,CACnB,IAAIC,EAEJD,EAAM,KAAK,qBAAoB,GAAMC,EAAK,KAAK,MAAM,SAAW,MAAQA,IAAO,QAAkBA,EAAG,MAAM,eAAe,QAAQ,CACzI,CAAO,CACF,EAED,WAAY,CACV,KAAK,UAAY,KAAK,UAAU,KAAK,oBAAoB,CAC1D,EAED,WAAY,CACV,KAAK,UAAY,KAAK,UAAU,KAAK,oBAAoB,CAC/D,CAEG,EAED,SAAU,CACR,WAAW,IAAM,CACf,KAAK,UAAY,KAAK,qBAAsB,CAC7C,EAAE,CAAC,CACL,EAED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