@fy-/fws-vue 2.0.47 → 2.0.49
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/components/ui/DefaultInput.vue +33 -21
- package/package.json +1 -1
|
@@ -131,6 +131,7 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
131
131
|
'datetime',
|
|
132
132
|
'url',
|
|
133
133
|
'textarea',
|
|
134
|
+
'textarea-grow',
|
|
134
135
|
'select',
|
|
135
136
|
'phone',
|
|
136
137
|
'chips',
|
|
@@ -205,13 +206,32 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
205
206
|
</div>
|
|
206
207
|
</div>
|
|
207
208
|
-->
|
|
208
|
-
|
|
209
|
+
|
|
210
|
+
<div v-if="type == 'chips' || type == 'tags'">
|
|
209
211
|
<label
|
|
210
212
|
:for="id"
|
|
211
|
-
v-if="label"
|
|
213
|
+
v-if="label || placeholder"
|
|
212
214
|
class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
|
|
213
|
-
>{{ label }}
|
|
215
|
+
>{{ label ? label : placeholder }}
|
|
214
216
|
</label>
|
|
217
|
+
<!-- @vue-skip -->
|
|
218
|
+
<DefaultTagInput
|
|
219
|
+
v-model="model"
|
|
220
|
+
:id="id"
|
|
221
|
+
:disabled="disabled"
|
|
222
|
+
:color="color"
|
|
223
|
+
:error="checkErrors"
|
|
224
|
+
:help="help"
|
|
225
|
+
:max-lenght-per-tag="maxLengthPerTag"
|
|
226
|
+
/>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="group relative" v-else-if="type == 'textarea-grow'">
|
|
229
|
+
<label
|
|
230
|
+
v-if="label"
|
|
231
|
+
:for="id"
|
|
232
|
+
class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
|
|
233
|
+
>{{ label }}</label
|
|
234
|
+
>
|
|
215
235
|
<div class="grow-wrap">
|
|
216
236
|
<!-- @vue-skip -->
|
|
217
237
|
<textarea
|
|
@@ -242,24 +262,6 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
242
262
|
{{ model?.toString().length }} / {{ dpOptions.counterMax }}
|
|
243
263
|
</div>
|
|
244
264
|
</div>
|
|
245
|
-
<div v-if="type == 'chips' || type == 'tags'">
|
|
246
|
-
<label
|
|
247
|
-
:for="id"
|
|
248
|
-
v-if="label || placeholder"
|
|
249
|
-
class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
|
|
250
|
-
>{{ label ? label : placeholder }}
|
|
251
|
-
</label>
|
|
252
|
-
<!-- @vue-skip -->
|
|
253
|
-
<DefaultTagInput
|
|
254
|
-
v-model="model"
|
|
255
|
-
:id="id"
|
|
256
|
-
:disabled="disabled"
|
|
257
|
-
:color="color"
|
|
258
|
-
:error="checkErrors"
|
|
259
|
-
:help="help"
|
|
260
|
-
:max-lenght-per-tag="maxLengthPerTag"
|
|
261
|
-
/>
|
|
262
|
-
</div>
|
|
263
265
|
<div class="group relative" v-else-if="type == 'textarea'">
|
|
264
266
|
<label
|
|
265
267
|
v-if="label"
|
|
@@ -284,6 +286,16 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
284
286
|
@blur="handleBlur"
|
|
285
287
|
class="block p-2.5 w-full text-sm text-fv-neutral-900 bg-fv-neutral-50 rounded-lg border border-fv-neutral-300 focus:ring-fv-primary-500 focus:border-fv-primary-500 dark:bg-fv-neutral-700 dark:border-fv-neutral-600 dark:placeholder-fv-neutral-400 dark:text-white dark:focus:ring-fv-primary-500 dark:focus:border-fv-primary-500"
|
|
286
288
|
></textarea>
|
|
289
|
+
<div
|
|
290
|
+
v-if="dpOptions.counterMax && model"
|
|
291
|
+
class="-mt-2 text-sm text-fv-neutral-500 dark:text-fv-neutral-400"
|
|
292
|
+
:class="{
|
|
293
|
+
'text-red-500 dark:text-red-300':
|
|
294
|
+
model?.toString().length > dpOptions.counterMax,
|
|
295
|
+
}"
|
|
296
|
+
>
|
|
297
|
+
{{ model?.toString().length }} / {{ dpOptions.counterMax }}
|
|
298
|
+
</div>
|
|
287
299
|
</div>
|
|
288
300
|
<div class="relative" v-else-if="type == 'select'">
|
|
289
301
|
<label
|