@fy-/fws-vue 2.0.47 → 2.0.48
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 +32 -21
- package/package.json +1 -1
|
@@ -205,13 +205,32 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
205
205
|
</div>
|
|
206
206
|
</div>
|
|
207
207
|
-->
|
|
208
|
-
|
|
208
|
+
|
|
209
|
+
<div v-if="type == 'chips' || type == 'tags'">
|
|
209
210
|
<label
|
|
210
211
|
:for="id"
|
|
211
|
-
v-if="label"
|
|
212
|
+
v-if="label || placeholder"
|
|
212
213
|
class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
|
|
213
|
-
>{{ label }}
|
|
214
|
+
>{{ label ? label : placeholder }}
|
|
214
215
|
</label>
|
|
216
|
+
<!-- @vue-skip -->
|
|
217
|
+
<DefaultTagInput
|
|
218
|
+
v-model="model"
|
|
219
|
+
:id="id"
|
|
220
|
+
:disabled="disabled"
|
|
221
|
+
:color="color"
|
|
222
|
+
:error="checkErrors"
|
|
223
|
+
:help="help"
|
|
224
|
+
:max-lenght-per-tag="maxLengthPerTag"
|
|
225
|
+
/>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="group relative" v-else-if="type == 'textarea-grow'">
|
|
228
|
+
<label
|
|
229
|
+
v-if="label"
|
|
230
|
+
:for="id"
|
|
231
|
+
class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
|
|
232
|
+
>{{ label }}</label
|
|
233
|
+
>
|
|
215
234
|
<div class="grow-wrap">
|
|
216
235
|
<!-- @vue-skip -->
|
|
217
236
|
<textarea
|
|
@@ -242,24 +261,6 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
242
261
|
{{ model?.toString().length }} / {{ dpOptions.counterMax }}
|
|
243
262
|
</div>
|
|
244
263
|
</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
264
|
<div class="group relative" v-else-if="type == 'textarea'">
|
|
264
265
|
<label
|
|
265
266
|
v-if="label"
|
|
@@ -284,6 +285,16 @@ defineExpose({ focus, blur, getInputRef });
|
|
|
284
285
|
@blur="handleBlur"
|
|
285
286
|
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
287
|
></textarea>
|
|
288
|
+
<div
|
|
289
|
+
v-if="dpOptions.counterMax && model"
|
|
290
|
+
class="-mt-2 text-sm text-fv-neutral-500 dark:text-fv-neutral-400"
|
|
291
|
+
:class="{
|
|
292
|
+
'text-red-500 dark:text-red-300':
|
|
293
|
+
model?.toString().length > dpOptions.counterMax,
|
|
294
|
+
}"
|
|
295
|
+
>
|
|
296
|
+
{{ model?.toString().length }} / {{ dpOptions.counterMax }}
|
|
297
|
+
</div>
|
|
287
298
|
</div>
|
|
288
299
|
<div class="relative" v-else-if="type == 'select'">
|
|
289
300
|
<label
|