@teammodlr/ui-kit 2.2.1 → 2.2.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.
package/lib/index.es.js CHANGED
@@ -1905,8 +1905,8 @@ function pt(e, t) {
1905
1905
  if (f === it && b) {
1906
1906
  var B = b[a];
1907
1907
  Object.keys(A).forEach(function(N) {
1908
- var K = [Re, Be].indexOf(N) >= 0 ? 1 : -1, D = [ke, Be].indexOf(N) >= 0 ? "y" : "x";
1909
- A[N] += B[D] * K;
1908
+ var G = [Re, Be].indexOf(N) >= 0 ? 1 : -1, D = [ke, Be].indexOf(N) >= 0 ? "y" : "x";
1909
+ A[N] += B[D] * G;
1910
1910
  });
1911
1911
  }
1912
1912
  return A;
@@ -1950,13 +1950,13 @@ function Bi(e) {
1950
1950
  allowedAutoPlacements: T
1951
1951
  }) : ve);
1952
1952
  }, []), $ = t.rects.reference, R = t.rects.popper, O = /* @__PURE__ */ new Map(), j = !0, L = k[0], A = 0; A < k.length; A++) {
1953
- var b = k[A], B = Le(b), N = at(b) === tt, K = [ke, Be].indexOf(B) >= 0, D = K ? "width" : "height", U = pt(t, {
1953
+ var b = k[A], B = Le(b), N = at(b) === tt, G = [ke, Be].indexOf(B) >= 0, D = G ? "width" : "height", U = pt(t, {
1954
1954
  placement: b,
1955
1955
  boundary: d,
1956
1956
  rootBoundary: c,
1957
1957
  altBoundary: f,
1958
1958
  padding: l
1959
- }), V = K ? N ? Re : Se : N ? Be : ke;
1959
+ }), V = G ? N ? Re : Se : N ? Be : ke;
1960
1960
  $[D] > R[D] && (V = zt(V));
1961
1961
  var oe = zt(V), W = [];
1962
1962
  if (o && W.push(U[B] <= 0), i && W.push(U[V] <= 0, U[oe] <= 0), W.every(function(ze) {
@@ -2098,14 +2098,14 @@ function Fi(e) {
2098
2098
  };
2099
2099
  if (R) {
2100
2100
  if (o) {
2101
- var N, K = k === "y" ? ke : Se, D = k === "y" ? Be : Re, U = k === "y" ? "height" : "width", V = R[k], oe = V + C[K], W = V - C[D], Ce = m ? -j[U] / 2 : 0, fe = E === tt ? O[U] : j[U], ie = E === tt ? -j[U] : -O[U], pe = t.elements.arrow, ze = m && pe ? kn(pe) : {
2101
+ var N, G = k === "y" ? ke : Se, D = k === "y" ? Be : Re, U = k === "y" ? "height" : "width", V = R[k], oe = V + C[G], W = V - C[D], Ce = m ? -j[U] / 2 : 0, fe = E === tt ? O[U] : j[U], ie = E === tt ? -j[U] : -O[U], pe = t.elements.arrow, ze = m && pe ? kn(pe) : {
2102
2102
  width: 0,
2103
2103
  height: 0
2104
- }, ve = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : xr(), Pe = ve[K], xe = ve[D], Ie = ut(0, O[U], ze[U]), X = z ? O[U] / 2 - Ce - Ie - Pe - A.mainAxis : fe - Ie - Pe - A.mainAxis, de = z ? -O[U] / 2 + Ce + Ie + xe + A.mainAxis : ie + Ie + xe + A.mainAxis, me = t.elements.arrow && yt(t.elements.arrow), Te = me ? k === "y" ? me.clientTop || 0 : me.clientLeft || 0 : 0, bt = (N = b == null ? void 0 : b[k]) != null ? N : 0, xt = V + X - bt - Te, H = V + de - bt, te = ut(m ? Dt(oe, xt) : oe, V, m ? Ke(W, H) : W);
2104
+ }, ve = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : xr(), Pe = ve[G], xe = ve[D], Ie = ut(0, O[U], ze[U]), X = z ? O[U] / 2 - Ce - Ie - Pe - A.mainAxis : fe - Ie - Pe - A.mainAxis, de = z ? -O[U] / 2 + Ce + Ie + xe + A.mainAxis : ie + Ie + xe + A.mainAxis, me = t.elements.arrow && yt(t.elements.arrow), Te = me ? k === "y" ? me.clientTop || 0 : me.clientLeft || 0 : 0, bt = (N = b == null ? void 0 : b[k]) != null ? N : 0, xt = V + X - bt - Te, H = V + de - bt, te = ut(m ? Dt(oe, xt) : oe, V, m ? Ke(W, H) : W);
2105
2105
  R[k] = te, B[k] = te - V;
2106
2106
  }
2107
2107
  if (i) {
2108
- var G, Me = k === "x" ? ke : Se, st = k === "x" ? Be : Re, qe = R[$], wt = $ === "y" ? "height" : "width", Rn = qe + C[Me], zn = qe - C[st], qt = [ke, Se].indexOf(M) !== -1, In = (G = b == null ? void 0 : b[$]) != null ? G : 0, jn = qt ? Rn : qe - O[wt] - j[wt] - In + A.altAxis, Ln = qt ? qe + O[wt] + j[wt] - In - A.altAxis : zn, Dn = m && qt ? di(jn, qe, Ln) : ut(m ? jn : Rn, qe, m ? Ln : zn);
2108
+ var K, Me = k === "x" ? ke : Se, st = k === "x" ? Be : Re, qe = R[$], wt = $ === "y" ? "height" : "width", Rn = qe + C[Me], zn = qe - C[st], qt = [ke, Se].indexOf(M) !== -1, In = (K = b == null ? void 0 : b[$]) != null ? K : 0, jn = qt ? Rn : qe - O[wt] - j[wt] - In + A.altAxis, Ln = qt ? qe + O[wt] + j[wt] - In - A.altAxis : zn, Dn = m && qt ? di(jn, qe, Ln) : ut(m ? jn : Rn, qe, m ? Ln : zn);
2109
2109
  R[$] = Dn, B[$] = Dn - qe;
2110
2110
  }
2111
2111
  t.modifiersData[r] = B;
@@ -2602,7 +2602,7 @@ const bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2602
2602
  Qr[e.size],
2603
2603
  {
2604
2604
  [It]: e.block,
2605
- [ta]: K.value
2605
+ [ta]: G.value
2606
2606
  }
2607
2607
  ]), N = p(() => [
2608
2608
  Jr,
@@ -2612,7 +2612,7 @@ const bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2612
2612
  [na]: E.value,
2613
2613
  [ra]: z.value
2614
2614
  }
2615
- ]), K = p(() => m.value || e.error), D = () => {
2615
+ ]), G = p(() => m.value || e.error), D = () => {
2616
2616
  n("update:modelValue", "");
2617
2617
  };
2618
2618
  return r({
@@ -2634,7 +2634,7 @@ const bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2634
2634
  hasSuffix: $,
2635
2635
  hasPrefix: k,
2636
2636
  hasHelpMessage: R,
2637
- inputError: K,
2637
+ inputError: G,
2638
2638
  style: bu,
2639
2639
  onClear: D,
2640
2640
  validate: c,
@@ -2752,7 +2752,7 @@ const aa = /* @__PURE__ */ F(wu, [["render", ku]]), Su = _({
2752
2752
  const h = w(), T = w(), C = w(), M = ee(e, "transfer"), E = ee(e, "placement"), z = w(), k = w(0), $ = w(100), R = w(!1), O = Ae({
2753
2753
  x: 0,
2754
2754
  y: 0
2755
- }), j = w(e.zIndex ?? s()), { elementX: L, elementY: A } = Bl(h), { pressed: b } = Rl(), { popper: B, transferTo: N, updatePopper: K } = Ht({
2755
+ }), j = w(e.zIndex ?? s()), { elementX: L, elementY: A } = Bl(h), { pressed: b } = Rl(), { popper: B, transferTo: N, updatePopper: G } = Ht({
2756
2756
  reference: C,
2757
2757
  placement: E,
2758
2758
  transfer: M,
@@ -3357,16 +3357,15 @@ const Uu = /* @__PURE__ */ _({
3357
3357
  A();
3358
3358
  });
3359
3359
  function A() {
3360
- var K, D;
3361
3360
  if (!s.value || !f.value) {
3362
3361
  L.value = "auto";
3363
3362
  return;
3364
3363
  }
3365
- let b = (K = f.value) == null ? void 0 : K.getBoundingClientRect().height, B = (D = f.value) == null ? void 0 : D.getBoundingClientRect().top;
3366
- if (!b || !B)
3364
+ const b = f.value.$el.getBoundingClientRect(), B = b.height, N = b.top;
3365
+ if (!B || !N)
3367
3366
  return;
3368
- let N = window.innerHeight;
3369
- L.value = `${N - b - B - 30}px`;
3367
+ let G = window.innerHeight;
3368
+ L.value = `${G - B - N - 30}px`;
3370
3369
  }
3371
3370
  return {
3372
3371
  wrapper: l,
@@ -4115,8 +4114,8 @@ const dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4115
4114
  function j() {
4116
4115
  let A = window, b = A.document.documentElement, B = A.innerWidth - b.clientWidth;
4117
4116
  if (b.style.overflow = "hidden", B > 0) {
4118
- let N = b.clientWidth - b.offsetWidth, K = B - N;
4119
- b.style.paddingRight = `${K}px`;
4117
+ let N = b.clientWidth - b.offsetWidth, G = B - N;
4118
+ b.style.paddingRight = `${G}px`;
4120
4119
  }
4121
4120
  }
4122
4121
  function L() {
@@ -4946,10 +4945,10 @@ const Nf = _({
4946
4945
  const r = w(null), a = w(), o = w(), s = w(), i = w(), u = w(0), l = w(!1), d = w(!1), c = w(""), f = w("bottom-start"), m = w(!1), h = w(0), T = w(!1), { nextZIndex: C } = Je();
4947
4946
  function M(H, te) {
4948
4947
  const {
4949
- "onUpdate:value": G,
4948
+ "onUpdate:value": K,
4950
4949
  onUpdateValue: Me
4951
4950
  } = e;
4952
- Me && sn(Me, H, te), G && sn(G, H, te);
4951
+ Me && sn(Me, H, te), K && sn(K, H, te);
4953
4952
  }
4954
4953
  const E = w(e.zIndex ?? C()), { focus: z, blur: k } = we(r), {
4955
4954
  id: $,
@@ -4964,7 +4963,7 @@ const Nf = _({
4964
4963
  reference: r,
4965
4964
  wrapper: a,
4966
4965
  offset: [0, 5]
4967
- }), N = p(() => L || e.disabled), K = p(() => A || e.loading), D = p({
4966
+ }), N = p(() => L || e.disabled), G = p(() => A || e.loading), D = p({
4968
4967
  get() {
4969
4968
  return e.multiple ? e.modelValue ? Array.isArray(e.modelValue) ? e.modelValue : [e.modelValue] : [] : e.modelValue || null;
4970
4969
  },
@@ -4981,15 +4980,15 @@ const Nf = _({
4981
4980
  if (!e.options || e.options.length == 0)
4982
4981
  return [];
4983
4982
  if (e.searchable && c.value) {
4984
- let te = e.options.filter((G) => G[e.optionLabel].toLowerCase().includes(c.value.toLowerCase())).map((G) => {
4985
- if (G[e.optionValue] === void 0)
4983
+ let te = e.options.filter((K) => K[e.optionLabel].toLowerCase().includes(c.value.toLowerCase())).map((K) => {
4984
+ if (K[e.optionValue] === void 0)
4986
4985
  throw new Error("Option value is undefined");
4987
- if (G[e.optionLabel] === void 0)
4986
+ if (K[e.optionLabel] === void 0)
4988
4987
  throw new Error("Option label is undefined");
4989
- let Me = G[e.optionValue], st;
4988
+ let Me = K[e.optionValue], st;
4990
4989
  return e.multiple && Array.isArray(D.value) ? st = D.value.includes(Me) : st = D.value === Me, {
4991
4990
  value: Me,
4992
- label: G[e.optionLabel],
4991
+ label: K[e.optionLabel],
4993
4992
  active: st,
4994
4993
  onClick: () => pe(Me)
4995
4994
  };
@@ -5006,12 +5005,12 @@ const Nf = _({
5006
5005
  throw new Error("Option value is undefined");
5007
5006
  if (te[e.optionLabel] === void 0)
5008
5007
  throw new Error("Option label is undefined");
5009
- let G = te[e.optionValue], Me;
5010
- return e.multiple && Array.isArray(D.value) ? Me = D.value.includes(G) : Me = D.value === G, {
5011
- value: G,
5008
+ let K = te[e.optionValue], Me;
5009
+ return e.multiple && Array.isArray(D.value) ? Me = D.value.includes(K) : Me = D.value === K, {
5010
+ value: K,
5012
5011
  label: te[e.optionLabel],
5013
5012
  active: Me,
5014
- onClick: () => pe(G)
5013
+ onClick: () => pe(K)
5015
5014
  };
5016
5015
  });
5017
5016
  return e.allowBlank && H.unshift({
@@ -5027,7 +5026,7 @@ const Nf = _({
5027
5026
  ) : D.value = []);
5028
5027
  }
5029
5028
  function fe() {
5030
- if (!(N.value || K.value)) {
5029
+ if (!(N.value || G.value)) {
5031
5030
  if (l.value) {
5032
5031
  l.value = !1;
5033
5032
  return;
@@ -5037,21 +5036,21 @@ const Nf = _({
5037
5036
  }
5038
5037
  function ie(H, te = "down") {
5039
5038
  if (typeof H > "u" && (H = te === "down" ? -1 : 1), te === "down") {
5040
- let G = H + 1;
5041
- G > W.value.length - 1 && (G = 0), u.value = G;
5039
+ let K = H + 1;
5040
+ K > W.value.length - 1 && (K = 0), u.value = K;
5042
5041
  } else {
5043
- let G = H - 1;
5044
- G < 0 && (G = W.value.length - 1), u.value = G;
5042
+ let K = H - 1;
5043
+ K < 0 && (K = W.value.length - 1), u.value = K;
5045
5044
  }
5046
5045
  }
5047
5046
  function pe(H) {
5048
5047
  if (W.value.find(
5049
- (G) => G.value === H
5048
+ (K) => K.value === H
5050
5049
  ))
5051
5050
  if (e.multiple) {
5052
5051
  if (Array.isArray(D.value)) {
5053
- const G = D.value.indexOf(H);
5054
- G !== -1 ? D.value.splice(G, 1) : (D.value.push(H), t("update:modelValue", D.value));
5052
+ const K = D.value.indexOf(H);
5053
+ K !== -1 ? D.value.splice(K, 1) : (D.value.push(H), t("update:modelValue", D.value));
5055
5054
  } else
5056
5055
  D.value = [H];
5057
5056
  B();
@@ -5060,8 +5059,8 @@ const Nf = _({
5060
5059
  }
5061
5060
  function ze(H, te) {
5062
5061
  if (H.preventDefault(), H.stopPropagation(), !!e.multiple && Array.isArray(D.value)) {
5063
- const G = D.value.indexOf(te);
5064
- G !== -1 && D.value.splice(G, 1), B();
5062
+ const K = D.value.indexOf(te);
5063
+ K !== -1 && D.value.splice(K, 1), B();
5065
5064
  }
5066
5065
  }
5067
5066
  re("resize", () => {
@@ -5118,7 +5117,7 @@ const Nf = _({
5118
5117
  [za]: e.multiple && Array.isArray(D.value) && D.value.length > 0,
5119
5118
  [on]: l.value,
5120
5119
  // [`m-select--${props.size}`]: props.size,
5121
- "m-select--disabled": N.value || K.value,
5120
+ "m-select--disabled": N.value || G.value,
5122
5121
  "m-select--focused": l.value,
5123
5122
  "m-select--multiple": e.multiple,
5124
5123
  "m-select--error": j.value
@@ -5126,7 +5125,7 @@ const Nf = _({
5126
5125
  ]);
5127
5126
  function de(H) {
5128
5127
  const te = e.options.find(
5129
- (G) => G[e.optionValue] === H
5128
+ (K) => K[e.optionValue] === H
5130
5129
  );
5131
5130
  return te ? te[e.optionLabel] : null;
5132
5131
  }
@@ -5147,7 +5146,7 @@ const Nf = _({
5147
5146
  _e(() => {
5148
5147
  if (H || (c.value = ""), e.searchable && s.value && s.value.focus(), H && o.value) {
5149
5148
  const te = W.value.findIndex(
5150
- (G) => G.value === D.value
5149
+ (K) => K.value === D.value
5151
5150
  );
5152
5151
  te !== -1 && (o.value[te].scrollIntoView({
5153
5152
  block: "nearest"
@@ -7773,23 +7772,23 @@ const th = Ut(".v-vl", {
7773
7772
  });
7774
7773
  const a = p(() => {
7775
7774
  const b = /* @__PURE__ */ new Map(), { keyField: B } = e;
7776
- return e.items.forEach((N, K) => {
7777
- b.set(N[B], K);
7775
+ return e.items.forEach((N, G) => {
7776
+ b.set(N[B], G);
7778
7777
  }), b;
7779
7778
  }), o = w(null), s = w(void 0), i = /* @__PURE__ */ new Map(), u = p(() => {
7780
- const { items: b, itemSize: B, keyField: N } = e, K = new Rm(b.length, B);
7779
+ const { items: b, itemSize: B, keyField: N } = e, G = new Rm(b.length, B);
7781
7780
  return b.forEach((D, U) => {
7782
7781
  const V = D[N], oe = i.get(V);
7783
- oe !== void 0 && K.add(U, oe);
7784
- }), K;
7782
+ oe !== void 0 && G.add(U, oe);
7783
+ }), G;
7785
7784
  }), l = w(0);
7786
7785
  let d = 0;
7787
7786
  const c = w(0), f = Mr(() => Math.max(u.value.getBound(c.value - er(e.paddingTop)) - 1, 0)), m = p(() => {
7788
7787
  const { value: b } = s;
7789
7788
  if (b === void 0)
7790
7789
  return [];
7791
- const { items: B, itemSize: N } = e, K = f.value, D = Math.min(K + Math.ceil(b / N + 1), B.length - 1), U = [];
7792
- for (let V = K; V <= D; ++V)
7790
+ const { items: B, itemSize: N } = e, G = f.value, D = Math.min(G + Math.ceil(b / N + 1), B.length - 1), U = [];
7791
+ for (let V = G; V <= D; ++V)
7793
7792
  U.push(B[V]);
7794
7793
  return U;
7795
7794
  }), h = (b, B) => {
@@ -7797,9 +7796,9 @@ const th = Ut(".v-vl", {
7797
7796
  E(b, B, "auto");
7798
7797
  return;
7799
7798
  }
7800
- const { left: N, top: K, index: D, key: U, position: V, behavior: oe, debounce: W = !0 } = b;
7801
- if (N !== void 0 || K !== void 0)
7802
- E(N, K, oe);
7799
+ const { left: N, top: G, index: D, key: U, position: V, behavior: oe, debounce: W = !0 } = b;
7800
+ if (N !== void 0 || G !== void 0)
7801
+ E(N, G, oe);
7803
7802
  else if (D !== void 0)
7804
7803
  M(D, oe, W);
7805
7804
  else if (U !== void 0) {
@@ -7809,7 +7808,7 @@ const th = Ut(".v-vl", {
7809
7808
  };
7810
7809
  let T, C = null;
7811
7810
  function M(b, B, N) {
7812
- const { value: K } = u, D = K.sum(b) + er(e.paddingTop);
7811
+ const { value: G } = u, D = G.sum(b) + er(e.paddingTop);
7813
7812
  if (!N)
7814
7813
  o.value.scrollTo({
7815
7814
  left: 0,
@@ -7822,7 +7821,7 @@ const th = Ut(".v-vl", {
7822
7821
  }, 16);
7823
7822
  const { scrollTop: U, offsetHeight: V } = o.value;
7824
7823
  if (D > U) {
7825
- const oe = K.get(b);
7824
+ const oe = G.get(b);
7826
7825
  D + oe <= U + V || o.value.scrollTo({
7827
7826
  left: 0,
7828
7827
  top: D + oe - V,
@@ -7844,10 +7843,10 @@ const th = Ut(".v-vl", {
7844
7843
  });
7845
7844
  }
7846
7845
  function z(b, B) {
7847
- var N, K, D;
7846
+ var N, G, D;
7848
7847
  if (n || e.ignoreItemResize || A(B.target))
7849
7848
  return;
7850
- const { value: U } = u, V = a.value.get(b), oe = U.get(V), W = (D = (K = (N = B.borderBoxSize) === null || N === void 0 ? void 0 : N[0]) === null || K === void 0 ? void 0 : K.blockSize) !== null && D !== void 0 ? D : B.contentRect.height;
7849
+ const { value: U } = u, V = a.value.get(b), oe = U.get(V), W = (D = (G = (N = B.borderBoxSize) === null || N === void 0 ? void 0 : N[0]) === null || G === void 0 ? void 0 : G.blockSize) !== null && D !== void 0 ? D : B.contentRect.height;
7851
7850
  if (W === oe)
7852
7851
  return;
7853
7852
  W - e.itemSize === 0 ? i.delete(b) : i.set(b, W - e.itemSize);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammodlr/ui-kit",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -293,10 +293,12 @@ export default defineComponent({
293
293
  maxHeight.value = 'auto';
294
294
  return;
295
295
  }
296
- let referenceHeight =
297
- reference.value?.getBoundingClientRect().height;
298
296
 
299
- let referenceTop = reference.value?.getBoundingClientRect().top;
297
+ // @ts-ignore
298
+ const referenceElement = reference.value.$el.getBoundingClientRect()
299
+ const referenceHeight = referenceElement.height;
300
+
301
+ const referenceTop = referenceElement.top;
300
302
  if (!referenceHeight || !referenceTop) {
301
303
  return;
302
304
  }