@vue-interface/input-field 1.0.0-beta.6 → 1.0.0-beta.7

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.
@@ -1,12 +1,78 @@
1
- import { defineComponent as E, inject as nt, openBlock as u, createElementBlock as o, normalizeClass as x, normalizeStyle as rt, createElementVNode as j, createBlock as T, resolveDynamicComponent as ut, createCommentVNode as a, toDisplayString as H, resolveComponent as st, resolveDirective as ot, renderSlot as d, withDirectives as at, mergeProps as lt, createVNode as dt, Transition as ct, withCtx as ht } from "vue";
2
- function c(t, e = "px") {
1
+ import { defineComponent as E, inject as nt, toRaw as rt, openBlock as u, createElementBlock as o, normalizeClass as x, normalizeStyle as ut, createElementVNode as j, createBlock as T, resolveDynamicComponent as st, toDisplayString as H, createCommentVNode as c, resolveComponent as ot, resolveDirective as at, renderSlot as l, withDirectives as lt, mergeProps as dt, createVNode as ct, Transition as ht, withCtx as ft } from "vue";
2
+ var pt = Object.defineProperty, vt = (t, e, i) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, yt = (t, e, i) => (vt(t, typeof e != "symbol" ? e + "" : e, i), i), C = function() {
3
+ return C = Object.assign || function(t) {
4
+ for (var e, i = 1, r = arguments.length; i < r; i++) {
5
+ e = arguments[i];
6
+ for (var n in e)
7
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
8
+ }
9
+ return t;
10
+ }, C.apply(this, arguments);
11
+ };
12
+ function gt(t) {
13
+ return t.toLowerCase();
14
+ }
15
+ var bt = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], mt = /[^A-Z0-9]+/gi;
16
+ function Ct(t, e) {
17
+ e === void 0 && (e = {});
18
+ for (var i = e.splitRegexp, r = i === void 0 ? bt : i, n = e.stripRegexp, s = n === void 0 ? mt : n, g = e.transform, $ = g === void 0 ? gt : g, a = e.delimiter, it = a === void 0 ? " " : a, b = k(k(t, r, "$1\0$2"), s, "\0"), A = 0, F = b.length; b.charAt(A) === "\0"; )
19
+ A++;
20
+ for (; b.charAt(F - 1) === "\0"; )
21
+ F--;
22
+ return b.slice(A, F).split("\0").map($).join(it);
23
+ }
24
+ function k(t, e, i) {
25
+ return e instanceof RegExp ? t.replace(e, i) : e.reduce(function(r, n) {
26
+ return r.replace(n, i);
27
+ }, t);
28
+ }
29
+ function Et(t, e) {
30
+ return e === void 0 && (e = {}), Ct(t, C({ delimiter: "." }, e));
31
+ }
32
+ function m(t, e) {
33
+ return e === void 0 && (e = {}), Et(t, C({ delimiter: "-" }, e));
34
+ }
35
+ class $t {
36
+ constructor(e = {}) {
37
+ yt(this, "components"), this.components = /* @__PURE__ */ new Map(), Object.entries(e).forEach(([i, r]) => {
38
+ this.register(i, r);
39
+ });
40
+ }
41
+ get(e) {
42
+ const i = this.components.get(
43
+ e = m(e)
44
+ );
45
+ if (i)
46
+ return i;
47
+ throw new Error(`"${e}" has not been registered yet!`);
48
+ }
49
+ register(e, i) {
50
+ return typeof e == "object" ? (Object.entries(e).forEach(([r, n]) => {
51
+ this.register(m(r), n);
52
+ }), this) : (this.components.set(m(e), i), this);
53
+ }
54
+ remove(e) {
55
+ return this.components.delete(m(e)), this;
56
+ }
57
+ reset() {
58
+ return this.components = /* @__PURE__ */ new Map(), this;
59
+ }
60
+ }
61
+ function At(t = {}) {
62
+ return new $t(t);
63
+ }
64
+ const Ft = At();
65
+ function d(t, e = "px") {
3
66
  return t != null && t !== !1 && isFinite(t) ? `${t}${e}` : t;
4
67
  }
5
- const ft = E({
68
+ const St = E({
6
69
  props: {
7
70
  absolute: Boolean,
8
71
  center: Boolean,
9
- label: String,
72
+ label: {
73
+ type: String,
74
+ default: void 0
75
+ },
10
76
  size: {
11
77
  type: String,
12
78
  default: "md"
@@ -16,24 +82,37 @@ const ft = E({
16
82
  default: "indicators"
17
83
  },
18
84
  type: {
19
- type: String,
85
+ type: [Object, String],
20
86
  required: !0
21
87
  },
22
- height: [String, Number],
23
- maxHeight: [String, Number],
24
- minHeight: [String, Number],
25
- width: [String, Number],
26
- maxWidth: [String, Number],
27
- minWidth: [String, Number]
88
+ height: {
89
+ type: [String, Number],
90
+ default: void 0
91
+ },
92
+ maxHeight: {
93
+ type: [String, Number],
94
+ default: void 0
95
+ },
96
+ minHeight: {
97
+ type: [String, Number],
98
+ default: void 0
99
+ },
100
+ width: {
101
+ type: [String, Number],
102
+ default: void 0
103
+ },
104
+ maxWidth: {
105
+ type: [String, Number],
106
+ default: void 0
107
+ },
108
+ minWidth: {
109
+ type: [String, Number],
110
+ default: void 0
111
+ }
28
112
  },
29
113
  data: () => ({
30
114
  is: null
31
115
  }),
32
- setup(t) {
33
- return {
34
- registryInstance: nt(t.registry || "indicators")
35
- };
36
- },
37
116
  computed: {
38
117
  classes() {
39
118
  return {
@@ -44,113 +123,48 @@ const ft = E({
44
123
  },
45
124
  style() {
46
125
  return {
47
- width: c(this.width),
48
- maxWidth: c(this.maxWidth),
49
- minWidth: c(this.minWidth),
50
- height: c(this.height),
51
- maxHeight: c(this.maxHeight),
52
- minHeight: c(this.minHeight)
126
+ width: d(this.width),
127
+ maxWidth: d(this.maxWidth),
128
+ minWidth: d(this.minWidth),
129
+ height: d(this.height),
130
+ maxHeight: d(this.maxHeight),
131
+ minHeight: d(this.minHeight)
53
132
  };
54
133
  }
55
134
  },
56
- async mounted() {
57
- const t = await this.component();
58
- this.is = () => t;
59
- },
60
135
  methods: {
61
- async component() {
62
- let t = this.registryInstance.get(this.type);
63
- return t instanceof Promise ? t : (typeof t == "function" && (t = await t()), t.default ? t.default : t);
136
+ componentFromRegistry(t) {
137
+ var e;
138
+ try {
139
+ return (e = nt(this.registry || "indicators", Ft)) == null ? void 0 : e.get(t);
140
+ } catch {
141
+ }
142
+ },
143
+ component() {
144
+ return typeof this.type == "string" ? this.componentFromRegistry(this.type) : rt(this.type);
64
145
  }
65
146
  }
66
- }), pt = (t, e) => {
147
+ }), xt = (t, e) => {
67
148
  const i = t.__vccOpts || t;
68
149
  for (const [r, n] of e)
69
150
  i[r] = n;
70
151
  return i;
71
- }, vt = { class: "activity-indicator-content" }, gt = {
72
- key: 1,
152
+ }, jt = { class: "activity-indicator-content" }, kt = {
153
+ key: 0,
73
154
  class: "activity-indicator-label"
74
155
  };
75
- function yt(t, e, i, r, n, s) {
156
+ function wt(t, e, i, r, n, s) {
76
157
  return u(), o("div", {
77
158
  class: x(["activity-indicator", t.classes]),
78
- style: rt(t.style)
159
+ style: ut(t.style)
79
160
  }, [
80
- j("div", vt, [
81
- t.is ? (u(), T(ut(t.is()), {
82
- key: 0,
83
- class: "mx-auto"
84
- })) : a("", !0),
85
- t.label ? (u(), o("div", gt, H(t.label), 1)) : a("", !0)
161
+ j("div", jt, [
162
+ (u(), T(st(t.component()), { class: "mx-auto" })),
163
+ t.label ? (u(), o("div", kt, H(t.label), 1)) : c("", !0)
86
164
  ])
87
165
  ], 6);
88
166
  }
89
- const bt = /* @__PURE__ */ pt(ft, [["render", yt]]);
90
- var mt = Object.defineProperty, Ct = (t, e, i) => e in t ? mt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, Et = (t, e, i) => (Ct(t, typeof e != "symbol" ? e + "" : e, i), i), C = function() {
91
- return C = Object.assign || function(t) {
92
- for (var e, i = 1, r = arguments.length; i < r; i++) {
93
- e = arguments[i];
94
- for (var n in e)
95
- Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
96
- }
97
- return t;
98
- }, C.apply(this, arguments);
99
- };
100
- function $t(t) {
101
- return t.toLowerCase();
102
- }
103
- var At = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], St = /[^A-Z0-9]+/gi;
104
- function Ft(t, e) {
105
- e === void 0 && (e = {});
106
- for (var i = e.splitRegexp, r = i === void 0 ? At : i, n = e.stripRegexp, s = n === void 0 ? St : n, y = e.transform, $ = y === void 0 ? $t : y, l = e.delimiter, it = l === void 0 ? " " : l, b = w(w(t, r, "$1\0$2"), s, "\0"), A = 0, S = b.length; b.charAt(A) === "\0"; )
107
- A++;
108
- for (; b.charAt(S - 1) === "\0"; )
109
- S--;
110
- return b.slice(A, S).split("\0").map($).join(it);
111
- }
112
- function w(t, e, i) {
113
- return e instanceof RegExp ? t.replace(e, i) : e.reduce(function(r, n) {
114
- return r.replace(n, i);
115
- }, t);
116
- }
117
- function xt(t, e) {
118
- return e === void 0 && (e = {}), Ft(t, C({ delimiter: "." }, e));
119
- }
120
- function m(t, e) {
121
- return e === void 0 && (e = {}), xt(t, C({ delimiter: "-" }, e));
122
- }
123
- class jt {
124
- constructor(e = {}) {
125
- Et(this, "components"), this.components = /* @__PURE__ */ new Map(), Object.entries(e).forEach(([i, r]) => {
126
- this.register(i, r);
127
- });
128
- }
129
- get(e) {
130
- const i = this.components.get(
131
- e = m(e)
132
- );
133
- if (i)
134
- return i;
135
- throw new Error(`"${e}" has not been registered yet!`);
136
- }
137
- register(e, i) {
138
- return typeof e == "object" ? (Object.entries(e).forEach(([r, n]) => {
139
- this.register(m(r), n);
140
- }), this) : (this.components.set(m(e), i), this);
141
- }
142
- remove(e) {
143
- return this.components.delete(m(e)), this;
144
- }
145
- reset() {
146
- return this.components = /* @__PURE__ */ new Map(), this;
147
- }
148
- }
149
- function wt(t = {}) {
150
- return new jt(t);
151
- }
152
- wt();
153
- const p = {};
167
+ const Dt = /* @__PURE__ */ xt(St, [["render", wt]]), p = {};
154
168
  function v(...t) {
155
169
  if (!t.length)
156
170
  return p;
@@ -159,7 +173,7 @@ function v(...t) {
159
173
  [n]: p[n]
160
174
  }), {}) : Object.assign(p, ...t);
161
175
  }
162
- const Dt = E({
176
+ const Ot = E({
163
177
  props: {
164
178
  dropShadow: {
165
179
  type: [Boolean, String],
@@ -188,71 +202,71 @@ const Dt = E({
188
202
  }
189
203
  }
190
204
  });
191
- var kt = typeof global == "object" && global && global.Object === Object && global;
192
- const Ot = kt;
193
- var zt = typeof self == "object" && self && self.Object === Object && self, Bt = Ot || zt || Function("return this")();
194
- const It = Bt;
195
- var Lt = It.Symbol;
196
- const f = Lt;
197
- var Z = Object.prototype, Nt = Z.hasOwnProperty, Tt = Z.toString, g = f ? f.toStringTag : void 0;
198
- function Ht(t) {
199
- var e = Nt.call(t, g), i = t[g];
205
+ var zt = typeof global == "object" && global && global.Object === Object && global;
206
+ const Bt = zt;
207
+ var It = typeof self == "object" && self && self.Object === Object && self, Lt = Bt || It || Function("return this")();
208
+ const Nt = Lt;
209
+ var Tt = Nt.Symbol;
210
+ const f = Tt;
211
+ var R = Object.prototype, Ht = R.hasOwnProperty, Rt = R.toString, y = f ? f.toStringTag : void 0;
212
+ function Zt(t) {
213
+ var e = Ht.call(t, y), i = t[y];
200
214
  try {
201
- t[g] = void 0;
215
+ t[y] = void 0;
202
216
  var r = !0;
203
217
  } catch {
204
218
  }
205
- var n = Tt.call(t);
206
- return r && (e ? t[g] = i : delete t[g]), n;
219
+ var n = Rt.call(t);
220
+ return r && (e ? t[y] = i : delete t[y]), n;
207
221
  }
208
- var Zt = Object.prototype, Mt = Zt.toString;
209
- function Rt(t) {
210
- return Mt.call(t);
222
+ var Mt = Object.prototype, Ut = Mt.toString;
223
+ function Pt(t) {
224
+ return Ut.call(t);
211
225
  }
212
- var Ut = "[object Null]", Pt = "[object Undefined]", D = f ? f.toStringTag : void 0;
213
- function Vt(t) {
214
- return t == null ? t === void 0 ? Pt : Ut : D && D in Object(t) ? Ht(t) : Rt(t);
226
+ var Vt = "[object Null]", Wt = "[object Undefined]", w = f ? f.toStringTag : void 0;
227
+ function Gt(t) {
228
+ return t == null ? t === void 0 ? Wt : Vt : w && w in Object(t) ? Zt(t) : Pt(t);
215
229
  }
216
- function Wt(t) {
230
+ function qt(t) {
217
231
  return t != null && typeof t == "object";
218
232
  }
219
- var Gt = "[object Symbol]";
220
- function qt(t) {
221
- return typeof t == "symbol" || Wt(t) && Vt(t) == Gt;
233
+ var Yt = "[object Symbol]";
234
+ function Jt(t) {
235
+ return typeof t == "symbol" || qt(t) && Gt(t) == Yt;
222
236
  }
223
- function Yt(t, e) {
237
+ function Kt(t, e) {
224
238
  for (var i = -1, r = t == null ? 0 : t.length, n = Array(r); ++i < r; )
225
239
  n[i] = e(t[i], i, t);
226
240
  return n;
227
241
  }
228
- var _t = Array.isArray;
229
- const Jt = _t;
230
- var Kt = 1 / 0, k = f ? f.prototype : void 0, O = k ? k.toString : void 0;
231
- function M(t) {
242
+ var Xt = Array.isArray;
243
+ const Qt = Xt;
244
+ var _t = 1 / 0, D = f ? f.prototype : void 0, O = D ? D.toString : void 0;
245
+ function Z(t) {
232
246
  if (typeof t == "string")
233
247
  return t;
248
+ if (Qt(t))
249
+ return Kt(t, Z) + "";
234
250
  if (Jt(t))
235
- return Yt(t, M) + "";
236
- if (qt(t))
237
251
  return O ? O.call(t) : "";
238
252
  var e = t + "";
239
- return e == "0" && 1 / t == -Kt ? "-0" : e;
253
+ return e == "0" && 1 / t == -_t ? "-0" : e;
240
254
  }
241
- function R(t) {
242
- return t == null ? "" : M(t);
255
+ function M(t) {
256
+ return t == null ? "" : Z(t);
243
257
  }
244
- function Qt(t, e, i, r) {
258
+ function te(t, e, i, r) {
245
259
  var n = -1, s = t == null ? 0 : t.length;
246
260
  for (r && s && (i = t[++n]); ++n < s; )
247
261
  i = e(i, t[n], n, t);
248
262
  return i;
249
263
  }
250
- function Xt(t) {
264
+ function ee(t) {
251
265
  return function(e) {
252
266
  return t == null ? void 0 : t[e];
253
267
  };
254
268
  }
255
- var te = {
269
+ var ie = {
256
270
  \u00C0: "A",
257
271
  \u00C1: "A",
258
272
  \u00C2: "A",
@@ -443,47 +457,47 @@ var te = {
443
457
  \u0153: "oe",
444
458
  \u0149: "'n",
445
459
  \u017F: "s"
446
- }, ee = Xt(te);
447
- const ie = ee;
448
- var ne = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, re = "\\u0300-\\u036f", ue = "\\ufe20-\\ufe2f", se = "\\u20d0-\\u20ff", oe = re + ue + se, ae = "[" + oe + "]", le = RegExp(ae, "g");
449
- function de(t) {
450
- return t = R(t), t && t.replace(ne, ie).replace(le, "");
451
- }
452
- var ce = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
460
+ }, ne = ee(ie);
461
+ const re = ne;
462
+ var ue = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, se = "\\u0300-\\u036f", oe = "\\ufe20-\\ufe2f", ae = "\\u20d0-\\u20ff", le = se + oe + ae, de = "[" + le + "]", ce = RegExp(de, "g");
453
463
  function he(t) {
454
- return t.match(ce) || [];
464
+ return t = M(t), t && t.replace(ue, re).replace(ce, "");
455
465
  }
456
- var fe = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
466
+ var fe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
457
467
  function pe(t) {
458
- return fe.test(t);
468
+ return t.match(fe) || [];
469
+ }
470
+ var ve = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
471
+ function ye(t) {
472
+ return ve.test(t);
459
473
  }
460
- var U = "\\ud800-\\udfff", ve = "\\u0300-\\u036f", ge = "\\ufe20-\\ufe2f", ye = "\\u20d0-\\u20ff", be = ve + ge + ye, P = "\\u2700-\\u27bf", V = "a-z\\xdf-\\xf6\\xf8-\\xff", me = "\\xac\\xb1\\xd7\\xf7", Ce = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Ee = "\\u2000-\\u206f", $e = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", W = "A-Z\\xc0-\\xd6\\xd8-\\xde", Ae = "\\ufe0e\\ufe0f", G = me + Ce + Ee + $e, q = "['\u2019]", z = "[" + G + "]", Se = "[" + be + "]", Y = "\\d+", Fe = "[" + P + "]", _ = "[" + V + "]", J = "[^" + U + G + Y + P + V + W + "]", xe = "\\ud83c[\\udffb-\\udfff]", je = "(?:" + Se + "|" + xe + ")", we = "[^" + U + "]", K = "(?:\\ud83c[\\udde6-\\uddff]){2}", Q = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "[" + W + "]", De = "\\u200d", B = "(?:" + _ + "|" + J + ")", ke = "(?:" + h + "|" + J + ")", I = "(?:" + q + "(?:d|ll|m|re|s|t|ve))?", L = "(?:" + q + "(?:D|LL|M|RE|S|T|VE))?", X = je + "?", tt = "[" + Ae + "]?", Oe = "(?:" + De + "(?:" + [we, K, Q].join("|") + ")" + tt + X + ")*", ze = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Be = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Ie = tt + X + Oe, Le = "(?:" + [Fe, K, Q].join("|") + ")" + Ie, Ne = RegExp([
461
- h + "?" + _ + "+" + I + "(?=" + [z, h, "$"].join("|") + ")",
462
- ke + "+" + L + "(?=" + [z, h + B, "$"].join("|") + ")",
474
+ var U = "\\ud800-\\udfff", ge = "\\u0300-\\u036f", be = "\\ufe20-\\ufe2f", me = "\\u20d0-\\u20ff", Ce = ge + be + me, P = "\\u2700-\\u27bf", V = "a-z\\xdf-\\xf6\\xf8-\\xff", Ee = "\\xac\\xb1\\xd7\\xf7", $e = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Ae = "\\u2000-\\u206f", Fe = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", W = "A-Z\\xc0-\\xd6\\xd8-\\xde", Se = "\\ufe0e\\ufe0f", G = Ee + $e + Ae + Fe, q = "['\u2019]", z = "[" + G + "]", xe = "[" + Ce + "]", Y = "\\d+", je = "[" + P + "]", J = "[" + V + "]", K = "[^" + U + G + Y + P + V + W + "]", ke = "\\ud83c[\\udffb-\\udfff]", we = "(?:" + xe + "|" + ke + ")", De = "[^" + U + "]", X = "(?:\\ud83c[\\udde6-\\uddff]){2}", Q = "[\\ud800-\\udbff][\\udc00-\\udfff]", h = "[" + W + "]", Oe = "\\u200d", B = "(?:" + J + "|" + K + ")", ze = "(?:" + h + "|" + K + ")", I = "(?:" + q + "(?:d|ll|m|re|s|t|ve))?", L = "(?:" + q + "(?:D|LL|M|RE|S|T|VE))?", _ = we + "?", tt = "[" + Se + "]?", Be = "(?:" + Oe + "(?:" + [De, X, Q].join("|") + ")" + tt + _ + ")*", Ie = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Le = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Ne = tt + _ + Be, Te = "(?:" + [je, X, Q].join("|") + ")" + Ne, He = RegExp([
475
+ h + "?" + J + "+" + I + "(?=" + [z, h, "$"].join("|") + ")",
476
+ ze + "+" + L + "(?=" + [z, h + B, "$"].join("|") + ")",
463
477
  h + "?" + B + "+" + I,
464
478
  h + "+" + L,
465
- Be,
466
- ze,
479
+ Le,
480
+ Ie,
467
481
  Y,
468
- Le
482
+ Te
469
483
  ].join("|"), "g");
470
- function Te(t) {
471
- return t.match(Ne) || [];
484
+ function Re(t) {
485
+ return t.match(He) || [];
472
486
  }
473
- function He(t, e, i) {
474
- return t = R(t), e = i ? void 0 : e, e === void 0 ? pe(t) ? Te(t) : he(t) : t.match(e) || [];
487
+ function Ze(t, e, i) {
488
+ return t = M(t), e = i ? void 0 : e, e === void 0 ? ye(t) ? Re(t) : pe(t) : t.match(e) || [];
475
489
  }
476
- var Ze = "['\u2019]", Me = RegExp(Ze, "g");
477
- function Re(t) {
490
+ var Me = "['\u2019]", Ue = RegExp(Me, "g");
491
+ function Pe(t) {
478
492
  return function(e) {
479
- return Qt(He(de(e).replace(Me, "")), t, "");
493
+ return te(Ze(he(e).replace(Ue, "")), t, "");
480
494
  };
481
495
  }
482
- var Ue = Re(function(t, e, i) {
496
+ var Ve = Pe(function(t, e, i) {
483
497
  return t + (i ? "-" : "") + e.toLowerCase();
484
498
  });
485
- const et = Ue;
486
- function F(t, e, i = "-") {
499
+ const et = Ve;
500
+ function S(t, e, i = "-") {
487
501
  const r = String(e).replace(new RegExp(`^${t}${i}?`), "");
488
502
  return [
489
503
  et(r),
@@ -493,10 +507,7 @@ function F(t, e, i = "-") {
493
507
  function N(t) {
494
508
  return !Array.isArray(t) && typeof t == "object";
495
509
  }
496
- function Pe(t) {
497
- return t === void 0;
498
- }
499
- const Ve = E({
510
+ const We = E({
500
511
  directives: {
501
512
  bindEvents: {
502
513
  beforeMount(t, e) {
@@ -506,10 +517,13 @@ const Ve = E({
506
517
  }
507
518
  },
508
519
  mixins: [
509
- Dt
520
+ Ot
510
521
  ],
511
522
  inheritAttrs: !1,
512
523
  props: {
524
+ modelValue: {
525
+ default: void 0
526
+ },
513
527
  activity: {
514
528
  type: Boolean,
515
529
  default: !1
@@ -569,9 +583,6 @@ const Ve = E({
569
583
  type: [Object, String],
570
584
  default: () => v("labelClass", "form-label")
571
585
  },
572
- modelValue: {
573
- default: void 0
574
- },
575
586
  pill: Boolean,
576
587
  plaintext: Boolean,
577
588
  size: {
@@ -584,6 +595,16 @@ const Ve = E({
584
595
  },
585
596
  valid: Boolean
586
597
  },
598
+ emits: [
599
+ "blur",
600
+ "change",
601
+ "click",
602
+ "focus",
603
+ "keydown",
604
+ "keypress",
605
+ "keyup",
606
+ "update:modelValue"
607
+ ],
587
608
  data() {
588
609
  return {
589
610
  defaultEmpty: !1,
@@ -603,7 +624,8 @@ const Ve = E({
603
624
  return Object.fromEntries(
604
625
  Object.entries(this.$attrs).concat([
605
626
  ["id", this.id],
606
- ["class", this.controlClasses]
627
+ ["class", this.controlClasses],
628
+ ["value", this.modelValue]
607
629
  ])
608
630
  );
609
631
  },
@@ -611,15 +633,15 @@ const Ve = E({
611
633
  return this.defaultControlClass;
612
634
  },
613
635
  controlSizeClass() {
614
- return F(this.size, this.controlClass);
636
+ return S(this.size, this.controlClass);
615
637
  },
616
638
  formGroupClasses() {
617
639
  return Object.assign({
618
- [this.size && F(this.size, this.componentName)]: !!this.size,
640
+ [this.size && S(this.size, this.componentName)]: !!this.size,
619
641
  animated: this.animated,
620
642
  "default-empty": this.defaultEmpty,
621
643
  "form-group": this.group,
622
- [this.size && F(this.size, "form-group")]: !!this.size,
644
+ [this.size && S(this.size, "form-group")]: !!this.size,
623
645
  "has-activity": this.activity,
624
646
  "has-changed": this.hasChanged,
625
647
  "has-focus": this.hasFocus,
@@ -679,7 +701,7 @@ const Ve = E({
679
701
  var i;
680
702
  e || (e = this.onInput);
681
703
  const r = t instanceof HTMLSelectElement ? (i = t.querySelectorAll("option")) == null ? void 0 : i[t.selectedIndex] : null;
682
- Pe(this.modelValue) ? r && (t.value = r == null ? void 0 : r.value) : t.value = this.modelValue, t.value && e(t.value), this.hasChanged = !!t.value, this.isEmpty = !t.value, t.addEventListener("focus", () => {
704
+ r && (t.value = r == null ? void 0 : r.value), t.value && e(t.value), this.hasChanged = !!t.value, this.isEmpty = !t.value, t.addEventListener("focus", () => {
683
705
  this.hasFocus = !0;
684
706
  }), t.addEventListener("blur", () => {
685
707
  this.hasFocus = !1;
@@ -716,38 +738,38 @@ const Ve = E({
716
738
  this.$emit("update:modelValue", t);
717
739
  }
718
740
  }
719
- }), We = E({
741
+ }), Ge = E({
720
742
  name: "InputField",
721
743
  components: {
722
- ActivityIndicator: bt
744
+ ActivityIndicator: Dt
723
745
  },
724
746
  mixins: [
725
- Ve
747
+ We
726
748
  ]
727
749
  });
728
- const Ge = (t, e) => {
750
+ const qe = (t, e) => {
729
751
  const i = t.__vccOpts || t;
730
752
  for (const [r, n] of e)
731
753
  i[r] = n;
732
754
  return i;
733
- }, qe = ["for", "innerHTML"], Ye = { class: "form-group-inner" }, _e = ["innerHTML"], Je = ["innerHTML"];
734
- function Ke(t, e, i, r, n, s) {
735
- const y = st("activity-indicator"), $ = ot("bind-events");
755
+ }, Ye = ["for", "innerHTML"], Je = { class: "form-group-inner" }, Ke = ["innerHTML"], Xe = ["innerHTML"];
756
+ function Qe(t, e, i, r, n, s) {
757
+ const g = ot("activity-indicator"), $ = at("bind-events");
736
758
  return u(), o("div", {
737
759
  class: x(t.formGroupClasses)
738
760
  }, [
739
- d(t.$slots, "label", {}, () => [
761
+ l(t.$slots, "label", {}, () => [
740
762
  t.label ? (u(), o("label", {
741
763
  key: 0,
742
764
  ref: "label",
743
765
  for: t.id,
744
766
  class: x(t.labelClass),
745
- onClick: e[0] || (e[0] = (...l) => t.focus && t.focus(...l)),
767
+ onClick: e[0] || (e[0] = (...a) => t.focus && t.focus(...a)),
746
768
  innerHTML: t.label
747
- }, null, 10, qe)) : a("", !0)
769
+ }, null, 10, Ye)) : c("", !0)
748
770
  ]),
749
- j("div", Ye, [
750
- d(t.$slots, "control", {
771
+ j("div", Je, [
772
+ l(t.$slots, "control", {
751
773
  bindEvents: t.bindEvents,
752
774
  controlAttributes: t.controlAttributes,
753
775
  focus: t.focus
@@ -755,51 +777,51 @@ function Ke(t, e, i, r, n, s) {
755
777
  t.$slots.icon ? (u(), o("div", {
756
778
  key: 0,
757
779
  class: "form-group-inner-icon",
758
- onClick: e[1] || (e[1] = (...l) => t.focus && t.focus(...l))
780
+ onClick: e[1] || (e[1] = (...a) => t.focus && t.focus(...a))
759
781
  }, [
760
- d(t.$slots, "icon")
761
- ])) : a("", !0),
762
- at(j("input", lt({ ref: "field" }, t.controlAttributes), null, 16), [
782
+ l(t.$slots, "icon")
783
+ ])) : c("", !0),
784
+ lt(j("input", dt({ ref: "field" }, t.controlAttributes), null, 16), [
763
785
  [$]
764
786
  ])
765
787
  ]),
766
- d(t.$slots, "activity", {}, () => [
767
- dt(ct, { name: "input-field-fade" }, {
768
- default: ht(() => [
769
- t.activity ? (u(), T(y, {
788
+ l(t.$slots, "activity", {}, () => [
789
+ ct(ht, { name: "input-field-fade" }, {
790
+ default: ft(() => [
791
+ t.activity ? (u(), T(g, {
770
792
  key: "activity",
771
793
  ref: "activity",
772
794
  type: t.indicator,
773
795
  size: t.indicatorSize || t.size
774
- }, null, 8, ["type", "size"])) : a("", !0)
796
+ }, null, 8, ["type", "size"])) : c("", !0)
775
797
  ]),
776
798
  _: 1
777
799
  })
778
800
  ])
779
801
  ]),
780
- d(t.$slots, "feedback", {}, () => [
802
+ l(t.$slots, "feedback", {}, () => [
781
803
  t.invalidFeedback ? (u(), o("div", {
782
804
  key: 0,
783
805
  class: "invalid-feedback",
784
806
  invalid: "",
785
807
  innerHTML: t.invalidFeedback
786
- }, null, 8, _e)) : t.validFeedback ? (u(), o("div", {
808
+ }, null, 8, Ke)) : t.validFeedback ? (u(), o("div", {
787
809
  key: 1,
788
810
  class: "valid-feedback",
789
811
  valid: "",
790
812
  innerHTML: t.validFeedback
791
- }, null, 8, Je)) : a("", !0)
813
+ }, null, 8, Xe)) : c("", !0)
792
814
  ]),
793
- d(t.$slots, "help", {}, () => [
815
+ l(t.$slots, "help", {}, () => [
794
816
  t.helpText ? (u(), o("small", {
795
817
  key: 0,
796
818
  ref: "help"
797
- }, H(t.helpText), 513)) : a("", !0)
819
+ }, H(t.helpText), 513)) : c("", !0)
798
820
  ])
799
821
  ], 2);
800
822
  }
801
- const Xe = /* @__PURE__ */ Ge(We, [["render", Ke]]);
823
+ const ti = /* @__PURE__ */ qe(Ge, [["render", Qe]]);
802
824
  export {
803
- Xe as InputField
825
+ ti as InputField
804
826
  };
805
827
  //# sourceMappingURL=input-field.js.map