@mixd-id/web-scaffold 0.1.230406071 → 0.1.230406072
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/Textarea.vue +10 -4
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div :class="computedClass">
|
|
3
3
|
<slot name="start"></slot>
|
|
4
4
|
<textarea
|
|
5
|
-
:placeholder="placeholder" :rows="rows" ref="input" @blur="onBlur" @input="onInput"
|
|
6
|
-
:value="modelValue" />
|
|
5
|
+
:placeholder="placeholder" :rows="rows" ref="input" @focus="isActive = true" @blur="onBlur" @input="onInput"
|
|
6
|
+
:value="modelValue" :readonly="Boolean(readonly)" />
|
|
7
7
|
<div v-if="state === -2 && !!(errors)">
|
|
8
8
|
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
9
9
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 13.75C12.4142 13.75 12.75 13.4142 12.75 13V8.00001C12.75 7.5858 12.4142 7.25001 12 7.25001C11.5858 7.25001 11.25 7.5858 11.25 8.00001V13C11.25 13.4142 11.5858 13.75 12 13.75Z"/>
|
|
@@ -53,6 +53,8 @@ export default{
|
|
|
53
53
|
|
|
54
54
|
placeholder: String,
|
|
55
55
|
|
|
56
|
+
readonly: undefined,
|
|
57
|
+
|
|
56
58
|
rows: String,
|
|
57
59
|
|
|
58
60
|
},
|
|
@@ -89,6 +91,7 @@ export default{
|
|
|
89
91
|
this.$style['state-' + this.computedState],
|
|
90
92
|
this.isActive ? this.$style.active : '',
|
|
91
93
|
this.align ? this.$style['align-' + this.align] : '',
|
|
94
|
+
this.readonly ? this.$style.readonly : '',
|
|
92
95
|
this.size ? this.$style['size-' + this.size] : ''
|
|
93
96
|
].join(' ')
|
|
94
97
|
},
|
|
@@ -133,7 +136,7 @@ export default{
|
|
|
133
136
|
|
|
134
137
|
.textarea{
|
|
135
138
|
@apply min-h-[var(--h-cp)];
|
|
136
|
-
@apply flex items-start border-[1px] border-text-
|
|
139
|
+
@apply flex items-start border-[1px] border-text-200 bg-base-50 rounded-lg overflow-hidden;
|
|
137
140
|
@apply !max-h-[200px];
|
|
138
141
|
}
|
|
139
142
|
.textarea textarea{
|
|
@@ -147,6 +150,9 @@ export default{
|
|
|
147
150
|
.textarea>textarea::placeholder{
|
|
148
151
|
@apply text-text-200;
|
|
149
152
|
}
|
|
153
|
+
.textarea.readonly{
|
|
154
|
+
@apply bg-text-50;
|
|
155
|
+
}
|
|
150
156
|
|
|
151
157
|
.size-sm{ @apply min-h-[var(--h-cp-sm)]; }
|
|
152
158
|
.size-sm textarea{ @apply text-sm; }
|
|
@@ -173,4 +179,4 @@ export default{
|
|
|
173
179
|
@apply text-right
|
|
174
180
|
}
|
|
175
181
|
|
|
176
|
-
</style>
|
|
182
|
+
</style>
|