@fy-/fws-vue 2.0.45 → 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.
@@ -205,53 +205,63 @@ defineExpose({ focus, blur, getInputRef });
205
205
  </div>
206
206
  </div>
207
207
  -->
208
- <div v-if="type == 'textrea-grow'">
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
- <input
217
- ref="inputRef"
218
- type="textarea"
235
+ <!-- @vue-skip -->
236
+ <textarea
219
237
  :id="id"
220
238
  :name="id"
239
+ ref="inputRef"
221
240
  :class="{
222
241
  error: checkErrors,
223
242
  }"
224
243
  v-model="model"
225
- :autocomplete="autocomplete"
226
244
  :placeholder="placeholder"
227
245
  :disabled="disabled"
228
246
  :aria-describedby="help ? `${id}-help` : id"
229
- class="bg-fv-neutral-50 border border-fv-neutral-300 text-fv-neutral-900 text-sm rounded-lg focus:ring-fv-primary-500 focus:border-fv-primary-500 block w-full p-2.5 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"
230
247
  :required="req"
231
248
  @focus="handleFocus"
232
249
  @blur="handleBlur"
233
- />
250
+ 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"
251
+ ></textarea>
252
+ </div>
253
+ <div
254
+ v-if="dpOptions.counterMax && model"
255
+ class="-mt-2 text-sm text-fv-neutral-500 dark:text-fv-neutral-400"
256
+ :class="{
257
+ 'text-red-500 dark:text-red-300':
258
+ model?.toString().length > dpOptions.counterMax,
259
+ }"
260
+ >
261
+ {{ model?.toString().length }} / {{ dpOptions.counterMax }}
234
262
  </div>
235
263
  </div>
236
- <div v-if="type == 'chips' || type == 'tags'">
237
- <label
238
- :for="id"
239
- v-if="label || placeholder"
240
- class="block mb-2 text-sm font-medium text-fv-neutral-900 dark:text-white"
241
- >{{ label ? label : placeholder }}
242
- </label>
243
- <!-- @vue-skip -->
244
- <DefaultTagInput
245
- v-model="model"
246
- :id="id"
247
- :disabled="disabled"
248
- :color="color"
249
- :error="checkErrors"
250
- :help="help"
251
- :max-lenght-per-tag="maxLengthPerTag"
252
- />
253
- </div>
254
- <div class="group relative" v-else-if="type == 'textarea-g'">
264
+ <div class="group relative" v-else-if="type == 'textarea'">
255
265
  <label
256
266
  v-if="label"
257
267
  :for="id"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.0.45",
3
+ "version": "2.0.48",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {