@webilio-xyz/webilio-vue 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/dist/Input.js +111 -97
  2. package/package.json +1 -1
package/dist/Input.js CHANGED
@@ -1,5 +1,5 @@
1
- import { computed as y, withDirectives as O, openBlock as b, createElementBlock as S, vModelCheckbox as J, ref as I, onMounted as T, renderSlot as v, createCommentVNode as N, createElementVNode as U, unref as z, Fragment as se, createBlock as $, createVNode as L, normalizeClass as w, normalizeStyle as ue, createSlots as q, withCtx as h, createTextVNode as M, toDisplayString as A } from "vue";
2
- import { trans as oe, isLoaded as re, getActiveLanguage as ie } from "laravel-vue-i18n";
1
+ import { computed as y, withDirectives as U, openBlock as b, createElementBlock as S, vModelCheckbox as J, ref as I, onMounted as T, renderSlot as v, createCommentVNode as N, createElementVNode as D, normalizeClass as V, unref as z, Fragment as se, createBlock as C, createVNode as L, normalizeStyle as ue, createSlots as q, withCtx as h, createTextVNode as A, toDisplayString as M } from "vue";
2
+ import { trans as oe, isLoaded as ie, getActiveLanguage as re } from "laravel-vue-i18n";
3
3
  import de from "@vuepic/vue-datepicker";
4
4
  import { s as me, u as H, _ as K, E as Q } from "./LabelComponent-CfsH2P2a.js";
5
5
  import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -25,8 +25,8 @@ const Y = {
25
25
  l("update:checked", u), l("update:modelValue", u);
26
26
  }
27
27
  });
28
- return (u, r) => O((b(), S("input", {
29
- "onUpdate:modelValue": r[0] || (r[0] = (o) => s.value = o),
28
+ return (u, i) => U((b(), S("input", {
29
+ "onUpdate:modelValue": i[0] || (i[0] = (o) => s.value = o),
30
30
  type: "checkbox",
31
31
  class: "wv-input wv-checkbox-input rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
32
32
  }, null, 512)), [
@@ -35,11 +35,11 @@ const Y = {
35
35
  }
36
36
  };
37
37
  var be = Object.defineProperty, ye = (e, a, l) => a in e ? be(e, a, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[a] = l, R = (e, a, l) => ye(e, typeof a != "symbol" ? a + "" : a, l);
38
- const Z = {
38
+ const j = {
39
39
  "#": { pattern: /[0-9]/ },
40
40
  "@": { pattern: /[a-zA-Z]/ },
41
41
  "*": { pattern: /[a-zA-Z0-9]/ }
42
- }, j = (e, a, l) => e.replaceAll(a, "").replace(l, ".").replace("..", ".").replace(/[^.\d]/g, ""), G = (e, a, l) => {
42
+ }, Z = (e, a, l) => e.replaceAll(a, "").replace(l, ".").replace("..", ".").replace(/[^.\d]/g, ""), G = (e, a, l) => {
43
43
  var t;
44
44
  return new Intl.NumberFormat(((t = l.number) == null ? void 0 : t.locale) ?? "en", {
45
45
  minimumFractionDigits: e,
@@ -47,29 +47,29 @@ const Z = {
47
47
  roundingMode: "trunc"
48
48
  });
49
49
  }, ve = (e, a = !0, l) => {
50
- var t, s, u, r;
50
+ var t, s, u, i;
51
51
  const o = ((t = l.number) == null ? void 0 : t.unsigned) == null && e.startsWith("-") ? "-" : "", n = ((s = l.number) == null ? void 0 : s.fraction) ?? 0;
52
52
  let d = G(0, n, l);
53
- const f = d.formatToParts(1000.12), g = ((u = f.find((i) => i.type === "group")) == null ? void 0 : u.value) ?? " ", m = ((r = f.find((i) => i.type === "decimal")) == null ? void 0 : r.value) ?? ".", p = j(e, g, m);
53
+ const f = d.formatToParts(1000.12), g = ((u = f.find((r) => r.type === "group")) == null ? void 0 : u.value) ?? " ", m = ((i = f.find((r) => r.type === "decimal")) == null ? void 0 : i.value) ?? ".", p = Z(e, g, m);
54
54
  if (p === "" || Number.isNaN(p)) return o;
55
55
  const x = p.split(".");
56
56
  if (x[1] != null && x[1].length >= 1) {
57
- const i = x[1].length <= n ? x[1].length : n;
58
- d = G(i, n, l);
57
+ const r = x[1].length <= n ? x[1].length : n;
58
+ d = G(r, n, l);
59
59
  }
60
60
  let c = d.format(parseFloat(p));
61
- return a ? n > 0 && p.endsWith(".") && !p.slice(0, -1).includes(".") && (c += m) : c = j(c, g, m), o + c;
61
+ return a ? n > 0 && p.endsWith(".") && !p.slice(0, -1).includes(".") && (c += m) : c = Z(c, g, m), o + c;
62
62
  };
63
63
  class ke {
64
64
  constructor(a = {}) {
65
65
  R(this, "opts", {}), R(this, "memo", /* @__PURE__ */ new Map());
66
66
  const l = { ...a };
67
67
  if (l.tokens != null) {
68
- l.tokens = l.tokensReplace ? { ...l.tokens } : { ...Z, ...l.tokens };
68
+ l.tokens = l.tokensReplace ? { ...l.tokens } : { ...j, ...l.tokens };
69
69
  for (const t of Object.values(l.tokens))
70
70
  typeof t.pattern == "string" && (t.pattern = new RegExp(t.pattern));
71
71
  } else
72
- l.tokens = Z;
72
+ l.tokens = j;
73
73
  Array.isArray(l.mask) && (l.mask.length > 1 ? l.mask = [...l.mask].sort((t, s) => t.length - s.length) : l.mask = l.mask[0] ?? ""), l.mask === "" && (l.mask = null), this.opts = l;
74
74
  }
75
75
  masked(a) {
@@ -112,19 +112,19 @@ class ke {
112
112
  if (l == null) return a;
113
113
  const s = `v=${a},mr=${l},m=${t ? 1 : 0}`;
114
114
  if (this.memo.has(s)) return this.memo.get(s);
115
- const { mask: u, escaped: r } = this.escapeMask(l), o = [], n = this.opts.tokens != null ? this.opts.tokens : {}, d = this.isReversed() ? -1 : 1, f = this.isReversed() ? "unshift" : "push", g = this.isReversed() ? 0 : u.length - 1, m = this.isReversed() ? () => i > -1 && k > -1 : () => i < u.length && k < a.length, p = (C) => !this.isReversed() && C <= g || this.isReversed() && C >= g;
116
- let x, c = -1, i = this.isReversed() ? u.length - 1 : 0, k = this.isReversed() ? a.length - 1 : 0, F = !1;
115
+ const { mask: u, escaped: i } = this.escapeMask(l), o = [], n = this.opts.tokens != null ? this.opts.tokens : {}, d = this.isReversed() ? -1 : 1, f = this.isReversed() ? "unshift" : "push", g = this.isReversed() ? 0 : u.length - 1, m = this.isReversed() ? () => r > -1 && k > -1 : () => r < u.length && k < a.length, p = ($) => !this.isReversed() && $ <= g || this.isReversed() && $ >= g;
116
+ let x, c = -1, r = this.isReversed() ? u.length - 1 : 0, k = this.isReversed() ? a.length - 1 : 0, F = !1;
117
117
  for (; m(); ) {
118
- const C = u.charAt(i), V = n[C], E = (V == null ? void 0 : V.transform) != null ? V.transform(a.charAt(k)) : a.charAt(k);
119
- if (!r.includes(i) && V != null ? (E.match(V.pattern) != null ? (o[f](E), V.repeated ? (c === -1 ? c = i : i === g && i !== c && (i = c - d), g === c && (i -= d)) : V.multiple && (F = !0, i -= d), i += d) : V.multiple ? F && (i += d, k -= d, F = !1) : E === x ? x = void 0 : V.optional && (i += d, k -= d), k += d) : (t && !this.isEager() && o[f](C), E === C && !this.isEager() ? k += d : x = C, this.isEager() || (i += d)), this.isEager())
120
- for (; p(i) && (n[u.charAt(i)] == null || r.includes(i)); ) {
118
+ const $ = u.charAt(r), w = n[$], E = (w == null ? void 0 : w.transform) != null ? w.transform(a.charAt(k)) : a.charAt(k);
119
+ if (!i.includes(r) && w != null ? (E.match(w.pattern) != null ? (o[f](E), w.repeated ? (c === -1 ? c = r : r === g && r !== c && (r = c - d), g === c && (r -= d)) : w.multiple && (F = !0, r -= d), r += d) : w.multiple ? F && (r += d, k -= d, F = !1) : E === x ? x = void 0 : w.optional && (r += d, k -= d), k += d) : (t && !this.isEager() && o[f]($), E === $ && !this.isEager() ? k += d : x = $, this.isEager() || (r += d)), this.isEager())
120
+ for (; p(r) && (n[u.charAt(r)] == null || i.includes(r)); ) {
121
121
  if (t) {
122
- if (o[f](u.charAt(i)), a.charAt(k) === u.charAt(i)) {
123
- i += d, k += d;
122
+ if (o[f](u.charAt(r)), a.charAt(k) === u.charAt(r)) {
123
+ r += d, k += d;
124
124
  continue;
125
125
  }
126
- } else u.charAt(i) === a.charAt(k) && (k += d);
127
- i += d;
126
+ } else u.charAt(r) === a.charAt(k) && (k += d);
127
+ r += d;
128
128
  }
129
129
  }
130
130
  return this.memo.set(s, o.join("")), this.memo.get(s);
@@ -154,8 +154,8 @@ class Se {
154
154
  R(this, "items", /* @__PURE__ */ new Map()), R(this, "onInput", (t) => {
155
155
  if (t instanceof CustomEvent && t.type === "input")
156
156
  return;
157
- const s = t.target, u = this.items.get(s), r = "inputType" in t && t.inputType.startsWith("delete"), o = u.isEager(), n = r && o && u.unmasked(s.value) === "" ? "" : s.value;
158
- this.fixCursor(s, r, () => this.setValue(s, n));
157
+ const s = t.target, u = this.items.get(s), i = "inputType" in t && t.inputType.startsWith("delete"), o = u.isEager(), n = i && o && u.unmasked(s.value) === "" ? "" : s.value;
158
+ this.fixCursor(s, i, () => this.setValue(s, n));
159
159
  }), this.options = l, this.init(this.getInputs(a));
160
160
  }
161
161
  update(a = {}) {
@@ -187,9 +187,9 @@ class Se {
187
187
  fixCursor(a, l, t) {
188
188
  const s = a.selectionStart, u = a.value;
189
189
  if (t(), s === null || s === u.length && !l) return;
190
- const r = a.value, o = u.slice(0, s), n = r.slice(0, s), d = this.processInput(a, o).unmasked, f = this.processInput(a, n).unmasked;
190
+ const i = a.value, o = u.slice(0, s), n = i.slice(0, s), d = this.processInput(a, o).unmasked, f = this.processInput(a, n).unmasked;
191
191
  let g = s;
192
- o !== n && (g += l ? r.length - u.length : d.length - f.length), a.setSelectionRange(g, g);
192
+ o !== n && (g += l ? i.length - u.length : d.length - f.length), a.setSelectionRange(g, g);
193
193
  }
194
194
  setValue(a, l) {
195
195
  const t = this.processInput(a, l);
@@ -207,24 +207,24 @@ class Se {
207
207
  };
208
208
  }
209
209
  }
210
- const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
210
+ const O = /* @__PURE__ */ new WeakMap(), Ce = (e, a) => {
211
211
  if (e.arg == null || e.instance == null) return;
212
212
  const l = "setup" in e.instance.$.type;
213
213
  e.arg in e.instance ? e.instance[e.arg] = a : l && console.warn("Maska: please expose `%s` using defineExpose", e.arg);
214
- }, Ce = (e, a) => {
214
+ }, $e = (e, a) => {
215
215
  var l;
216
216
  const t = e instanceof HTMLInputElement ? e : e.querySelector("input");
217
217
  if (t == null || (t == null ? void 0 : t.type) === "file") return;
218
218
  let s = {};
219
219
  if (a.value != null && (s = typeof a.value == "string" ? { mask: a.value } : { ...a.value }), a.arg != null) {
220
- const u = (r) => {
221
- const o = a.modifiers.unmasked ? r.unmasked : a.modifiers.completed ? r.completed : r.masked;
222
- $e(a, o);
220
+ const u = (i) => {
221
+ const o = a.modifiers.unmasked ? i.unmasked : a.modifiers.completed ? i.completed : i.masked;
222
+ Ce(a, o);
223
223
  };
224
224
  s.onMaska = s.onMaska == null ? u : Array.isArray(s.onMaska) ? [...s.onMaska, u] : [s.onMaska, u];
225
225
  }
226
- P.has(t) ? (l = P.get(t)) == null || l.update(s) : P.set(t, new Se(t, s));
227
- }, Me = { class: "wv-text-input-wrapper flex items-center border border-gray-300 focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500 rounded-md shadow-sm" }, Ae = {
226
+ O.has(t) ? (l = O.get(t)) == null || l.update(s) : O.set(t, new Se(t, s));
227
+ }, Ae = { class: "wv-text-input-wrapper flex items-center border border-gray-300 focus-within:border-indigo-500 focus-within:ring-1 focus-within:ring-indigo-500 rounded-md shadow-sm" }, Me = {
228
228
  key: 0,
229
229
  class: "wv-text-input-prefix flex items-center pl-2"
230
230
  }, Ie = ["type", "inputmode", "value", "min", "max", "step"], Te = {
@@ -251,11 +251,15 @@ const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
251
251
  step: {
252
252
  type: [String, Number],
253
253
  default: null
254
+ },
255
+ inputClass: {
256
+ type: [String, Array, Object],
257
+ default: null
254
258
  }
255
259
  },
256
260
  emits: ["update:modelValue"],
257
261
  setup(e, { expose: a, emit: l }) {
258
- const t = e, s = l, u = y(() => t.type === "number"), r = y(() => u.value && t.precision !== null ? "text" : t.type), o = y(() => u.value && t.precision !== null ? "decimal" : null), n = y(() => t.step ? t.step : t.precision !== null ? Math.pow(10, -t.precision).toFixed(t.precision) : null), d = (m) => {
262
+ const t = e, s = l, u = y(() => t.type === "number"), i = y(() => u.value && t.precision !== null ? "text" : t.type), o = y(() => u.value && t.precision !== null ? "decimal" : null), n = y(() => t.step ? t.step : t.precision !== null ? Math.pow(10, -t.precision).toFixed(t.precision) : null), d = (m) => {
259
263
  if (!u.value || m === "" || m === "-" || m === "." || m === "-.") return m;
260
264
  const p = parseFloat(m);
261
265
  return isNaN(p) ? m : t.min !== null && p < parseFloat(t.min) ? t.min : t.max !== null && p > parseFloat(t.max) ? t.max : m;
@@ -272,23 +276,23 @@ const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
272
276
  }, g = I(null);
273
277
  return T(() => {
274
278
  g.value.hasAttribute("autofocus") && g.value.focus();
275
- }), a({ focus: () => g.value.focus() }), (m, p) => (b(), S("div", Me, [
276
- m.$slots.prefix ? (b(), S("div", Ae, [
279
+ }), a({ focus: () => g.value.focus() }), (m, p) => (b(), S("div", Ae, [
280
+ m.$slots.prefix ? (b(), S("div", Me, [
277
281
  v(m.$slots, "prefix")
278
282
  ])) : N("", !0),
279
- O(U("input", {
283
+ U(D("input", {
280
284
  ref_key: "input",
281
285
  ref: g,
282
- type: r.value,
286
+ type: i.value,
283
287
  inputmode: o.value,
284
- class: "wv-input wv-text-input flex-1 border-0 focus:ring-0 disabled:bg-gray-200 px-1",
288
+ class: V(["wv-input wv-text-input flex-1 border-0 focus:ring-0 disabled:bg-gray-200 px-1", e.inputClass]),
285
289
  value: e.modelValue,
286
290
  min: e.min,
287
291
  max: e.max,
288
292
  step: n.value,
289
293
  onInput: f
290
- }, null, 40, Ie), [
291
- [z(Ce), e.mask]
294
+ }, null, 42, Ie), [
295
+ [z($e), e.mask]
292
296
  ]),
293
297
  m.$slots.suffix ? (b(), S("div", Te, [
294
298
  v(m.$slots, "suffix")
@@ -328,25 +332,25 @@ const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
328
332
  ]));
329
333
  }, u = y(() => {
330
334
  let c = "yyyy/MM/dd";
331
- if (r.value && l)
335
+ if (i.value && l)
332
336
  try {
333
- const i = oe("date.format").toString(), k = l.parse("29/10/1989", "P", /* @__PURE__ */ new Date());
334
- l.format(k, i), c = i;
337
+ const r = oe("date.format").toString(), k = l.parse("29/10/1989", "P", /* @__PURE__ */ new Date());
338
+ l.format(k, r), c = r;
335
339
  } catch {
336
340
  }
337
341
  return c;
338
- }), r = I(!1);
342
+ }), i = I(!1);
339
343
  T(async () => {
340
344
  await s();
341
345
  const c = setInterval(() => {
342
- re() && (r.value = !0, clearInterval(c));
346
+ ie() && (i.value = !0, clearInterval(c));
343
347
  }, 50);
344
348
  });
345
- const o = y(() => ie()), n = e, d = a, f = (c) => !c || !t ? null : Array.isArray(c) ? c.map((i) => t.fromZonedTime(i, Intl.DateTimeFormat().resolvedOptions().timeZone)) : t.fromZonedTime(c, Intl.DateTimeFormat().resolvedOptions().timeZone), g = y(() => f(n.modelValue)), m = y(() => f(n.min)), p = y(() => f(n.max)), x = (c) => {
349
+ const o = y(() => re()), n = e, d = a, f = (c) => !c || !t ? null : Array.isArray(c) ? c.map((r) => t.fromZonedTime(r, Intl.DateTimeFormat().resolvedOptions().timeZone)) : t.fromZonedTime(c, Intl.DateTimeFormat().resolvedOptions().timeZone), g = y(() => f(n.modelValue)), m = y(() => f(n.min)), p = y(() => f(n.max)), x = (c) => {
346
350
  d("update:modelValue", c);
347
351
  };
348
- return (c, i) => (b(), S(se, null, [
349
- u.value ? (b(), $(z(de), {
352
+ return (c, r) => (b(), S(se, null, [
353
+ u.value ? (b(), C(z(de), {
350
354
  key: 0,
351
355
  class: "print:hidden wv-input wv-date-input",
352
356
  "model-value": g.value,
@@ -395,14 +399,14 @@ const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
395
399
  get() {
396
400
  return !!t.modelValue;
397
401
  },
398
- set(r) {
399
- t.disabled || (l("update:modelValue", r), l("update:checked", r));
402
+ set(i) {
403
+ t.disabled || (l("update:modelValue", i), l("update:checked", i));
400
404
  }
401
405
  });
402
- return (r, o) => (b(), S("label", {
403
- class: w(["inline-flex items-center", { "cursor-pointer": !e.disabled }])
406
+ return (i, o) => (b(), S("label", {
407
+ class: V(["inline-flex items-center", { "cursor-pointer": !e.disabled }])
404
408
  }, [
405
- O(U("input", {
409
+ U(D("input", {
406
410
  "onUpdate:modelValue": o[0] || (o[0] = (n) => u.value = n),
407
411
  type: "checkbox",
408
412
  value: "",
@@ -411,9 +415,9 @@ const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
411
415
  }, null, 8, Be), [
412
416
  [J, u.value]
413
417
  ]),
414
- U("div", {
418
+ D("div", {
415
419
  style: ue(s.value),
416
- class: w(["wv-input wv-toggle-input relative bg-gray-700 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all dark:border-gray-600 peer-checked:bg-blue-600", {
420
+ class: V(["wv-input wv-toggle-input relative bg-gray-700 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all dark:border-gray-600 peer-checked:bg-blue-600", {
417
421
  "after:bg-gray-300": e.disabled,
418
422
  "bg-gray-400": e.disabled,
419
423
  "peer-checked:bg-blue-400": e.disabled
@@ -424,11 +428,11 @@ const P = /* @__PURE__ */ new WeakMap(), $e = (e, a) => {
424
428
  }, te = /* @__PURE__ */ X(Ne, [["__scopeId", "data-v-d62d3d36"]]);
425
429
  function Le(e, a) {
426
430
  var l = -1, t = fe(e) ? Array(e.length) : [];
427
- return ge(e, function(s, u, r) {
428
- t[++l] = a(s, u, r);
431
+ return ge(e, function(s, u, i) {
432
+ t[++l] = a(s, u, i);
429
433
  }), t;
430
434
  }
431
- function D(e, a) {
435
+ function P(e, a) {
432
436
  var l = he(e) ? ce : Le;
433
437
  return l(e, pe(a));
434
438
  }
@@ -496,26 +500,26 @@ const ae = {
496
500
  if (!t.multiple)
497
501
  l("update:modelValue", n == null ? void 0 : n.value);
498
502
  else {
499
- const d = D(n, (f) => f == null ? void 0 : f.value);
503
+ const d = P(n, (f) => f == null ? void 0 : f.value);
500
504
  l("update:modelValue", d);
501
505
  }
502
506
  }
503
- }), u = y(() => D(t == null ? void 0 : t.options, (n) => typeof n == "string" ? {
507
+ }), u = y(() => P(t == null ? void 0 : t.options, (n) => typeof n == "string" ? {
504
508
  label: n,
505
509
  value: n
506
- } : n) ?? []), r = (n) => {
510
+ } : n) ?? []), i = (n) => {
507
511
  if (t.deselectable) {
508
512
  let d;
509
513
  if (t.multiple) {
510
514
  const f = n == null ? void 0 : n.value;
511
- d = D(s.value ?? [], (m) => m == null ? void 0 : m.value).filter((m) => m !== f);
515
+ d = P(s.value ?? [], (m) => m == null ? void 0 : m.value).filter((m) => m !== f);
512
516
  }
513
517
  l("update:modelValue", d);
514
518
  }
515
519
  }, o = (n) => {
516
520
  l("tag", n);
517
521
  };
518
- return (n, d) => (b(), $(z(me), {
522
+ return (n, d) => (b(), C(z(me), {
519
523
  id: "value",
520
524
  modelValue: s.value,
521
525
  "onUpdate:modelValue": d[0] || (d[0] = (f) => s.value = f),
@@ -534,19 +538,19 @@ const ae = {
534
538
  "group-label": e.groupLabel,
535
539
  taggable: e.taggable,
536
540
  onTag: o,
537
- onRemove: r
541
+ onRemove: i
538
542
  }, q({
539
543
  maxElements: h(() => [
540
- M(A(n.$tChoice("select.maxElements", e.max)), 1)
544
+ A(M(n.$tChoice("select.maxElements", e.max)), 1)
541
545
  ]),
542
546
  noResult: h(() => [
543
- M(A(n.$t("select.noResult")), 1)
547
+ A(M(n.$t("select.noResult")), 1)
544
548
  ]),
545
549
  noOptions: h(() => [
546
- M(A(n.$t("select.noOptions")), 1)
550
+ A(M(n.$t("select.noOptions")), 1)
547
551
  ]),
548
552
  tag: h(() => [
549
- M(A(n.$t("select.tag")), 1)
553
+ A(M(n.$t("select.tag")), 1)
550
554
  ]),
551
555
  _: 2
552
556
  }, [
@@ -700,6 +704,10 @@ const ae = {
700
704
  step: {
701
705
  type: [String, Number],
702
706
  default: null
707
+ },
708
+ inputClass: {
709
+ type: [String, Array, Object],
710
+ default: null
703
711
  }
704
712
  },
705
713
  emits: ["update:modelValue", "tag"],
@@ -709,12 +717,12 @@ const ae = {
709
717
  s.value = H("input_group_");
710
718
  });
711
719
  const u = y(() => l.type === "tel" ? "(###) ###-####" : null);
712
- return (r, o) => e.type === "checkbox" ? (b(), $(Y, {
720
+ return (i, o) => e.type === "checkbox" ? (b(), C(Y, {
713
721
  key: 0,
714
722
  id: s.value,
715
723
  name: e.name,
716
724
  "model-value": e.modelValue,
717
- class: w("size-10 " + e.customClass),
725
+ class: V("size-10 " + e.customClass),
718
726
  disabled: e.disabled,
719
727
  "onUpdate:modelValue": o[0] || (o[0] = (n) => t("update:modelValue", n))
720
728
  }, null, 8, ["id", "name", "model-value", "class", "disabled"])) : e.type === "toggle" ? (b(), S("div", Fe, [
@@ -723,16 +731,16 @@ const ae = {
723
731
  name: e.name,
724
732
  "model-value": !!e.modelValue,
725
733
  size: "15",
726
- class: w(e.customClass),
734
+ class: V(e.customClass),
727
735
  disabled: e.disabled,
728
736
  "onUpdate:modelValue": o[1] || (o[1] = (n) => t("update:modelValue", n))
729
737
  }, null, 8, ["id", "name", "model-value", "class", "disabled"])
730
- ])) : e.type === "select" ? (b(), $(ae, {
738
+ ])) : e.type === "select" ? (b(), C(ae, {
731
739
  key: 2,
732
740
  id: s.value,
733
741
  name: e.name,
734
742
  "model-value": e.modelValue,
735
- class: w("w-full " + e.customClass),
743
+ class: V("w-full " + e.customClass),
736
744
  options: e.options,
737
745
  disabled: e.disabled,
738
746
  multiple: e.multiple,
@@ -741,28 +749,28 @@ const ae = {
741
749
  deselectable: e.deselectable,
742
750
  "onUpdate:modelValue": o[2] || (o[2] = (n) => t("update:modelValue", n)),
743
751
  onTag: o[3] || (o[3] = (n) => t("tag", n))
744
- }, null, 8, ["id", "name", "model-value", "class", "options", "disabled", "multiple", "searchable", "taggable", "deselectable"])) : e.type === "textarea" ? (b(), $(le, {
752
+ }, null, 8, ["id", "name", "model-value", "class", "options", "disabled", "multiple", "searchable", "taggable", "deselectable"])) : e.type === "textarea" ? (b(), C(le, {
745
753
  key: 3,
746
754
  id: s.value,
747
755
  name: e.name,
748
756
  "model-value": e.modelValue,
749
- class: w("w-full " + e.customClass),
757
+ class: V("w-full " + e.customClass),
750
758
  placeholder: e.placeholder,
751
759
  disabled: e.disabled,
752
760
  "onUpdate:modelValue": o[4] || (o[4] = (n) => t("update:modelValue", n))
753
- }, null, 8, ["id", "name", "model-value", "class", "placeholder", "disabled"])) : e.type === "date" ? (b(), $(ee, {
761
+ }, null, 8, ["id", "name", "model-value", "class", "placeholder", "disabled"])) : e.type === "date" ? (b(), C(ee, {
754
762
  key: 4,
755
763
  id: s.value,
756
764
  name: e.name,
757
765
  "model-value": e.modelValue,
758
- class: w("w-full " + e.customClass),
766
+ class: V("w-full " + e.customClass),
759
767
  max: e.max,
760
768
  min: e.min,
761
769
  range: e.range,
762
770
  "enable-time-picker": e.enableTimePicker,
763
771
  disabled: e.disabled,
764
772
  "onUpdate:modelValue": o[5] || (o[5] = (n) => t("update:modelValue", n))
765
- }, null, 8, ["id", "name", "model-value", "class", "max", "min", "range", "enable-time-picker", "disabled"])) : (b(), $(W, {
773
+ }, null, 8, ["id", "name", "model-value", "class", "max", "min", "range", "enable-time-picker", "disabled"])) : (b(), C(W, {
766
774
  key: 5,
767
775
  id: s.value,
768
776
  type: e.type,
@@ -775,26 +783,27 @@ const ae = {
775
783
  mask: u.value,
776
784
  precision: e.precision,
777
785
  step: e.step,
778
- class: w("w-full " + e.customClass),
786
+ class: V("w-full " + e.customClass),
787
+ "input-class": e.inputClass,
779
788
  "onUpdate:modelValue": o[6] || (o[6] = (n) => t("update:modelValue", n))
780
789
  }, q({ _: 2 }, [
781
- r.$slots.prefix ? {
790
+ i.$slots.prefix ? {
782
791
  name: "prefix",
783
792
  fn: h(() => [
784
- v(r.$slots, "prefix")
793
+ v(i.$slots, "prefix")
785
794
  ]),
786
795
  key: "0"
787
796
  } : void 0,
788
- r.$slots.suffix ? {
797
+ i.$slots.suffix ? {
789
798
  name: "suffix",
790
799
  fn: h(() => [
791
- v(r.$slots, "suffix")
800
+ v(i.$slots, "suffix")
792
801
  ]),
793
802
  key: "1"
794
803
  } : void 0
795
- ]), 1032, ["id", "type", "name", "placeholder", "model-value", "disabled", "min", "max", "mask", "precision", "step", "class"]));
804
+ ]), 1032, ["id", "type", "name", "placeholder", "model-value", "disabled", "min", "max", "mask", "precision", "step", "class", "input-class"]));
796
805
  }
797
- }, Pe = {
806
+ }, Oe = {
798
807
  __name: "InputGroupComponent",
799
808
  props: {
800
809
  modelValue: String,
@@ -865,6 +874,10 @@ const ae = {
865
874
  step: {
866
875
  type: [String, Number],
867
876
  default: null
877
+ },
878
+ inputClass: {
879
+ type: [String, Array, Object],
880
+ default: null
868
881
  }
869
882
  },
870
883
  emits: ["update:modelValue", "tag"],
@@ -874,8 +887,8 @@ const ae = {
874
887
  s.value = H("input_group_");
875
888
  });
876
889
  const u = y(() => l.type === "tel" ? "(###) ###-####" : null);
877
- return (r, o) => (b(), S("div", {
878
- class: w(["w-full", { error: e.errors !== null && e.errors !== "" }])
890
+ return (i, o) => (b(), S("div", {
891
+ class: V(["w-full", { error: e.errors !== null && e.errors !== "" }])
879
892
  }, [
880
893
  L(K, {
881
894
  for: s.value,
@@ -884,7 +897,7 @@ const ae = {
884
897
  class: "w-full mb-2"
885
898
  }, {
886
899
  default: h(() => [
887
- M(A(e.label), 1)
900
+ A(M(e.label), 1)
888
901
  ]),
889
902
  _: 1
890
903
  }, 8, ["for", "value", "required"]),
@@ -908,25 +921,26 @@ const ae = {
908
921
  "custom-class": e.customClass,
909
922
  precision: e.precision,
910
923
  step: e.step,
924
+ "input-class": e.inputClass,
911
925
  "onUpdate:modelValue": o[0] || (o[0] = (n) => t("update:modelValue", n)),
912
926
  onTag: o[1] || (o[1] = (n) => t("tag", n))
913
927
  }, q({ _: 2 }, [
914
- r.$slots.prefix ? {
928
+ i.$slots.prefix ? {
915
929
  name: "prefix",
916
930
  fn: h(() => [
917
- v(r.$slots, "prefix")
931
+ v(i.$slots, "prefix")
918
932
  ]),
919
933
  key: "0"
920
934
  } : void 0,
921
- r.$slots.suffix ? {
935
+ i.$slots.suffix ? {
922
936
  name: "suffix",
923
937
  fn: h(() => [
924
- v(r.$slots, "suffix")
938
+ v(i.$slots, "suffix")
925
939
  ]),
926
940
  key: "1"
927
941
  } : void 0
928
- ]), 1032, ["id", "name", "type", "model-value", "disabled", "multiple", "options", "max", "min", "range", "mask", "searchable", "placeholder", "taggable", "deselectable", "enable-time-picker", "custom-class", "precision", "step"]),
929
- e.errors ? (b(), $(Q, {
942
+ ]), 1032, ["id", "name", "type", "model-value", "disabled", "multiple", "options", "max", "min", "range", "mask", "searchable", "placeholder", "taggable", "deselectable", "enable-time-picker", "custom-class", "precision", "step", "input-class"]),
943
+ e.errors ? (b(), C(Q, {
930
944
  key: 0,
931
945
  class: "mt-2",
932
946
  message: e.errors
@@ -938,7 +952,7 @@ const ae = {
938
952
  DateComponent: ee,
939
953
  ErrorComponent: Q,
940
954
  InputComponent: ne,
941
- InputGroupComponent: Pe,
955
+ InputGroupComponent: Oe,
942
956
  LabelComponent: K,
943
957
  SelectComponent: ae,
944
958
  TextareaComponent: le,
@@ -950,7 +964,7 @@ export {
950
964
  ee as DateComponent,
951
965
  Q as ErrorComponent,
952
966
  ne as InputComponent,
953
- Pe as InputGroupComponent,
967
+ Oe as InputGroupComponent,
954
968
  K as LabelComponent,
955
969
  ae as SelectComponent,
956
970
  W as TextInputComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webilio-xyz/webilio-vue",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host 0.0.0.0",