claude-web/node_modules/primevue/textarea/index.mjs.map

1 line
9.5 KiB
Plaintext
Raw Permalink Normal View History

2026-02-23 02:23:38 +00:00
{"version":3,"file":"index.mjs","sources":["../../src/textarea/BaseTextarea.vue","../../src/textarea/Textarea.vue","../../src/textarea/Textarea.vue?vue&type=template&id=3392f7fb&lang.js"],"sourcesContent":["<script>\nimport BaseInput from '@primevue/core/baseinput';\nimport TextareaStyle from 'primevue/textarea/style';\n\nexport default {\n name: 'BaseTextarea',\n extends: BaseInput,\n props: {\n autoResize: Boolean\n },\n style: TextareaStyle,\n provide() {\n return {\n $pcTextarea: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <textarea :class=\"cx('root')\" :value=\"d_value\" :name=\"name\" :disabled=\"disabled\" :aria-invalid=\"invalid || undefined\" :data-p=\"dataP\" @input=\"onInput\" v-bind=\"attrs\"></textarea>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { mergeProps } from 'vue';\nimport BaseTextarea from './BaseTextarea.vue';\n\nexport default {\n name: 'Textarea',\n extends: BaseTextarea,\n inheritAttrs: false,\n observer: null,\n mounted() {\n if (this.autoResize) {\n this.observer = new ResizeObserver(() => {\n // Firefox has issues without the requestAnimationFrame - ResizeObserver loop completed with undelivered notifications.\n requestAnimationFrame(() => {\n this.resize();\n });\n });\n this.observer.observe(this.$el);\n }\n },\n updated() {\n if (this.autoResize) {\n this.resize();\n }\n },\n beforeUnmount() {\n if (this.observer) {\n this.observer.disconnect();\n }\n },\n methods: {\n resize() {\n if (!this.$el.offsetParent) return;\n\n const currentHeight = this.$el.style.height;\n const currentHeightValue = parseInt(currentHeight) || 0;\n const initialScrollHeight = this.$el.scrollHeight;\n\n const needsExpanding = !currentHeightValue || initialScrollHeight > currentHeightValue;\n const needsShrinking = currentHeightValue && initialScrollHeight < currentHeightValue;\n\n if (needsShrinking) {\n this.$el.style.height = 'auto';\n this.$el.style.height = `${this.$el.scrollHeight}px`;\n } else if (needsExpanding) {\n this.$el.style.height = `${initialScrollHeight}px`;\n }\n },\n onInput(event) {\n if (this.autoResize) {\n this.resize();\n }\n\n this.writeValue(event.target.value, event);\n }\n },\n computed: {\n attrs() {\n return mergeProps(\n this.ptmi('root', {\n context: {\n filled: this.$filled,\n disabled: this.disabled\n }\n }),\n this.formField\n );\n },\n dataP() {\n return cn({\n invalid: this.$invalid,\n fluid: this.$fluid,\n filled: this.$variant === 'filled',\n [this.size]: this.size\n });\n }\n }\n};\n</script>\n","<template>\n <textarea :class=\"cx('root')\" :value=\"d_value\" :name=\"name\" :disabled=\"disabled\" :aria-invalid=\"invalid || undefined\" :data-p=\"dataP\" @input=\"onInput\" v-bind=\"attrs\"></textarea>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { mergeProps } from 'vue';\nimport BaseTextarea from './BaseTextarea.vue';\n\nexport default {\n name: 'Textarea',\n extends: BaseTextarea,\n inheritAttrs: false,\n observer: null,\n mounted() {\n if (this.autoResize) {\n this.observer = new ResizeObserver(() => {\n // Firefox has issues without the requestAnimationFrame - ResizeObserver loop completed with undelivered notifications.\n requestAnimationFrame(() => {\n this.resize();\n