@teammodlr/ui-kit 2.3.15 → 2.3.16

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
@@ -1,5 +1,5 @@
1
1
  import * as hr from "vue";
2
- import { defineComponent as R, renderSlot as A, ref as w, readonly as co, watch as U, computed as g, provide as $e, openBlock as m, createElementBlock as x, normalizeStyle as le, normalizeClass as T, toRef as se, Fragment as ae, createElementVNode as I, createCommentVNode as H, withDirectives as on, vShow as ii, inject as ge, resolveComponent as ne, createTextVNode as me, toDisplayString as Q, createVNode as X, withCtx as D, toRefs as Qe, onMounted as ye, createBlock as z, mergeProps as ee, reactive as Ie, renderList as Ee, onBeforeUnmount as rn, resolveDynamicComponent as To, onUnmounted as Ot, vModelCheckbox as va, getCurrentScope as Eo, onScopeDispose as xo, unref as C, isRef as an, customRef as ma, getCurrentInstance as et, watchEffect as Ce, nextTick as ie, withModifiers as we, toHandlers as sn, Teleport as tt, Transition as Tt, withKeys as It, shallowRef as Ut, shallowReadonly as At, Comment as ha, cloneVNode as ga, h as Be, markRaw as ui, normalizeProps as fe, guardReactiveProps as pe, effectScope as ya, toHandlerKey as di, camelize as ba, mergeDefaults as wa, watchPostEffect as ci, onBeforeUpdate as fi, onUpdated as pi, TransitionGroup as vi, vModelRadio as mi, vModelText as hi, toRaw as gr, onActivated as gi, onDeactivated as yi } from "vue";
2
+ import { defineComponent as R, renderSlot as A, ref as w, readonly as co, watch as U, computed as g, provide as $e, openBlock as m, createElementBlock as x, normalizeStyle as ie, normalizeClass as T, toRef as se, Fragment as ae, createElementVNode as I, createCommentVNode as H, withDirectives as on, vShow as ii, inject as ge, resolveComponent as ne, createTextVNode as me, toDisplayString as Q, createVNode as X, withCtx as D, toRefs as Qe, onMounted as ye, createBlock as z, mergeProps as ee, reactive as Ie, renderList as Ee, onBeforeUnmount as rn, resolveDynamicComponent as To, onUnmounted as Ot, vModelCheckbox as va, getCurrentScope as Eo, onScopeDispose as xo, unref as C, isRef as an, customRef as ma, getCurrentInstance as et, watchEffect as Ce, nextTick as ue, withModifiers as we, toHandlers as sn, Teleport as tt, Transition as Tt, withKeys as It, shallowRef as Ut, shallowReadonly as At, Comment as ha, cloneVNode as ga, h as Be, markRaw as ui, normalizeProps as fe, guardReactiveProps as pe, effectScope as ya, toHandlerKey as di, camelize as ba, mergeDefaults as wa, watchPostEffect as ci, onBeforeUpdate as fi, onUpdated as pi, TransitionGroup as vi, vModelRadio as mi, vModelText as hi, toRaw as gr, onActivated as gi, onDeactivated as yi } from "vue";
3
3
  const bi = {
4
4
  h: {
5
5
  type: Function,
@@ -129,7 +129,7 @@ const Bi = {
129
129
  };
130
130
  function Ri(e, t, n, o, r, a) {
131
131
  return m(), x("div", {
132
- style: le({ height: `${e.height}px` }),
132
+ style: ie({ height: `${e.height}px` }),
133
133
  class: T(e.computedWrapperClass)
134
134
  }, [
135
135
  A(e.$slots, "default")
@@ -366,7 +366,7 @@ const [Ki, qi] = Sa("ConfigProvider"), Ui = {
366
366
  function Zi(e, t, n, o, r, a) {
367
367
  return m(), x("img", {
368
368
  class: T(e.computedClasses),
369
- style: le(e.computedStyles),
369
+ style: ie(e.computedStyles),
370
370
  src: e.source,
371
371
  alt: e.alt
372
372
  }, null, 14, Yi);
@@ -491,7 +491,7 @@ function du(e, t, n, o, r, a) {
491
491
  class: T(e.style.item)
492
492
  }, [
493
493
  I("div", {
494
- style: le([{ display: "inline-block", position: "relative", outline: "0" }, { zIndex: e.avatars.length - u }])
494
+ style: ie([{ display: "inline-block", position: "relative", outline: "0" }, { zIndex: e.avatars.length - u }])
495
495
  }, [
496
496
  X(s, {
497
497
  src: l.src,
@@ -2102,7 +2102,7 @@ function Ec(e) {
2102
2102
  var N, V = S === "y" ? Ae : Re, F = S === "y" ? Ne : Ve, G = S === "y" ? "height" : "width", W = P[S], oe = W + h[V], Y = W - h[F], ke = p ? -L[G] / 2 : 0, Se = O === jt ? B[G] : L[G], ve = O === jt ? -L[G] : -B[G], Me = t.elements.arrow, qe = p && Me ? jo(Me) : {
2103
2103
  width: 0,
2104
2104
  height: 0
2105
- }, Oe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Na(), nt = Oe[V], ut = Oe[F], We = Gt(0, B[G], qe[G]), He = E ? B[G] / 2 - ke - We - nt - M.mainAxis : Se - We - nt - M.mainAxis, pn = E ? -B[G] / 2 + ke + We + ut + M.mainAxis : ve + We + ut + M.mainAxis, Z = t.elements.arrow && dn(t.elements.arrow), ue = Z ? S === "y" ? Z.clientTop || 0 : Z.clientLeft || 0 : 0, de = (N = $ == null ? void 0 : $[S]) != null ? N : 0, be = W + He - de - ue, q = W + pn - de, re = Gt(p ? Pn(oe, be) : oe, W, p ? Ct(Y, q) : Y);
2105
+ }, Oe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Na(), nt = Oe[V], ut = Oe[F], We = Gt(0, B[G], qe[G]), He = E ? B[G] / 2 - ke - We - nt - M.mainAxis : Se - We - nt - M.mainAxis, pn = E ? -B[G] / 2 + ke + We + ut + M.mainAxis : ve + We + ut + M.mainAxis, Z = t.elements.arrow && dn(t.elements.arrow), de = Z ? S === "y" ? Z.clientTop || 0 : Z.clientLeft || 0 : 0, le = (N = $ == null ? void 0 : $[S]) != null ? N : 0, be = W + He - le - de, q = W + pn - le, re = Gt(p ? Pn(oe, be) : oe, W, p ? Ct(Y, q) : Y);
2106
2106
  P[S] = re, _[S] = re - W;
2107
2107
  }
2108
2108
  if (l) {
@@ -2373,10 +2373,10 @@ function Hn(e) {
2373
2373
  n && U(n, (b) => {
2374
2374
  v(b), f();
2375
2375
  }), ye(() => {
2376
- ie(p);
2376
+ ue(p);
2377
2377
  }), rn(h);
2378
2378
  function f() {
2379
- ie(() => {
2379
+ ue(() => {
2380
2380
  i && i.forceUpdate(), o.value && (d.value = o.value.clientWidth);
2381
2381
  });
2382
2382
  }
@@ -2493,7 +2493,7 @@ function Zc(e, t, n, o, r, a) {
2493
2493
  I("div", {
2494
2494
  ref: "slider",
2495
2495
  class: T(e.style.sliderBar),
2496
- style: le({ background: e.background }),
2496
+ style: ie({ background: e.background }),
2497
2497
  onMousedown: t[0] || (t[0] = (...s) => e.handleMouseDown && e.handleMouseDown(...s)),
2498
2498
  onTouchstart: t[1] || (t[1] = we((...s) => e.handleMouseDown && e.handleMouseDown(...s), ["prevent"]))
2499
2499
  }, null, 38)
@@ -2505,7 +2505,7 @@ function Zc(e, t, n, o, r, a) {
2505
2505
  }, [
2506
2506
  I("div", {
2507
2507
  class: T(e.style.hueSliderThumb),
2508
- style: le({ left: `${e.modelValue}%` })
2508
+ style: ie({ left: `${e.modelValue}%` })
2509
2509
  }, null, 6)
2510
2510
  ], 32)
2511
2511
  ], 2);
@@ -2765,42 +2765,42 @@ const ts = /* @__PURE__ */ K(uf, [["render", ff]]), pf = R({
2765
2765
  isDrop: !1,
2766
2766
  offset: [-2, 2]
2767
2767
  }), F = g(() => 1 - B.y), G = g(() => B.x), W = g(() => i.value === "inherit" ? { r: 0, g: 0, b: 0, a: 0 } : Id(S.value * 3.6, F.value, G.value, k.value / 100)), oe = g(() => _d(S.value * 3.6, k.value / 100)), Y = () => {
2768
- t("update:modelValue", i.value), t("onColorChange", i.value);
2769
- }, ke = () => {
2770
- i.value !== "inherit" && (i.value = mn(W.value.r, W.value.g, W.value.b, W.value.a)), d.value = W.value.r.toString(), c.value = W.value.g.toString(), f.value = W.value.b.toString(), p.value = W.value.a.toFixed(2).toString(), n.lazy || Y();
2768
+ t("update:modelValue", i.value);
2769
+ }, ke = (Z = !0) => {
2770
+ i.value !== "inherit" && (i.value = mn(W.value.r, W.value.g, W.value.b, W.value.a)), d.value = W.value.r.toString(), c.value = W.value.g.toString(), f.value = W.value.b.toString(), p.value = W.value.a.toFixed(2).toString(), Z && !n.lazy && Y();
2771
2771
  };
2772
2772
  U(() => W.value, () => {
2773
- ke();
2773
+ ke(!1);
2774
2774
  }), U(() => e.color, (Z) => {
2775
2775
  Z && Z !== i.value && (i.value = Z, ve());
2776
2776
  });
2777
- const Se = (Z, ue) => {
2778
- B.x = Z.s, B.y = 1 - Z.v, S.value = 1 / 360 * Z.h * 100, k.value = ue * 100, ke();
2777
+ const Se = (Z, de, le = !0) => {
2778
+ B.x = Z.s, B.y = 1 - Z.v, S.value = 1 / 360 * Z.h * 100, k.value = de * 100, ke(le);
2779
2779
  }, ve = (Z = !0) => {
2780
2780
  if (i.value === "inherit") {
2781
2781
  Z && n.lazy && Y();
2782
2782
  return;
2783
2783
  }
2784
- let ue = i.value.replace("#", "");
2785
- ue.length === 3 && (ue = ue.split("").map((be) => be + be).join(""));
2786
- const de = Rd(`#${ue}`);
2787
- de.a === 0 && (de.a = 0, k.value = 0), Se(br(de.r, de.g, de.b), de.a), Z && n.lazy && Y();
2784
+ let de = i.value.replace("#", "");
2785
+ de.length === 3 && (de = de.split("").map((be) => be + be).join(""));
2786
+ const le = Rd(`#${de}`);
2787
+ le.a === 0 && (le.a = 0, k.value = 0), Se(br(le.r, le.g, le.b), le.a, Z), Z && n.lazy && Y();
2788
2788
  }, Me = () => {
2789
2789
  e.modelValue === "inherit" ? i.value = "#FFFFFF" : i.value = "inherit", Y();
2790
2790
  }, qe = () => {
2791
2791
  let Z = parseInt(d.value);
2792
2792
  (isNaN(Z) || Z > 255 || Z < 0) && (Z = W.value.r);
2793
- let ue = parseInt(c.value);
2794
- (isNaN(ue) || ue > 255 || ue < 0) && (ue = W.value.g);
2795
- let de = parseInt(f.value);
2796
- (isNaN(de) || de > 255 || de < 0) && (de = W.value.b);
2793
+ let de = parseInt(c.value);
2794
+ (isNaN(de) || de > 255 || de < 0) && (de = W.value.g);
2795
+ let le = parseInt(f.value);
2796
+ (isNaN(le) || le > 255 || le < 0) && (le = W.value.b);
2797
2797
  let be = parseFloat(p.value);
2798
- (isNaN(be) || be > 1 || be < 0) && (be = W.value.a), Se(br(Z, ue, de), be), i.value === "inherit" ? (i.value = mn(Z, ue, de, be), Y()) : n.lazy && Y();
2798
+ (isNaN(be) || be > 1 || be < 0) && (be = W.value.a), Se(br(Z, de, le), be), i.value === "inherit" ? (i.value = mn(Z, de, le, be), Y()) : n.lazy && Y();
2799
2799
  };
2800
2800
  U(() => $.value, () => {
2801
2801
  $.value || (P.value = !1);
2802
- }), U(() => P.value, (Z, ue) => {
2803
- ue && !Z && n.lazy && Y();
2802
+ }), U(() => P.value, (Z, de) => {
2803
+ de && !Z && n.lazy && Y();
2804
2804
  }), U(() => [j.value, M.value], () => {
2805
2805
  P.value && Oe();
2806
2806
  }), U(() => e.modelValue, () => {
@@ -2808,21 +2808,21 @@ const ts = /* @__PURE__ */ K(uf, [["render", ff]]), pf = R({
2808
2808
  (!Z || Z.trim() === "") && (Z = e.defaultColor ?? "#FFFFFF"), i.value = Z, ve(!1);
2809
2809
  });
2810
2810
  const Oe = () => {
2811
- var Z, ue, de, be;
2812
- B.x = Math.min(Math.max(j.value, 0), ((Z = v.value) == null ? void 0 : Z.clientWidth) || 0) / (((ue = v.value) == null ? void 0 : ue.clientWidth) || 0), B.y = Math.min(Math.max(M.value, 0), ((de = v.value) == null ? void 0 : de.clientHeight) || 0) / (((be = v.value) == null ? void 0 : be.clientHeight) || 0);
2811
+ var Z, de, le, be;
2812
+ B.x = Math.min(Math.max(j.value, 0), ((Z = v.value) == null ? void 0 : Z.clientWidth) || 0) / (((de = v.value) == null ? void 0 : de.clientWidth) || 0), B.y = Math.min(Math.max(M.value, 0), ((le = v.value) == null ? void 0 : le.clientHeight) || 0) / (((be = v.value) == null ? void 0 : be.clientHeight) || 0);
2813
2813
  }, nt = () => {
2814
2814
  i.value === "inherit" && (i.value = mn(W.value.r, W.value.g, W.value.b, W.value.a), Y()), P.value = !0, Oe();
2815
2815
  };
2816
2816
  ye(() => {
2817
2817
  const Z = e.modelValue.match(/rgba?\s*\(\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*[,\s]\s*(\d{1,3})\s*(?:[,\s]\s*([\d.]+%?))?\s*\)/i);
2818
2818
  if (Z) {
2819
- const [ue, de, be, q, re] = Z, J = re !== void 0 ? re.endsWith("%") ? parseFloat(re) / 100 : parseFloat(re) : 1;
2820
- i.value = mn(parseInt(de), parseInt(be), parseInt(q), J);
2819
+ const [de, le, be, q, re] = Z, J = re !== void 0 ? re.endsWith("%") ? parseFloat(re) / 100 : parseFloat(re) : 1;
2820
+ i.value = mn(parseInt(le), parseInt(be), parseInt(q), J);
2821
2821
  } else
2822
2822
  i.value = e.color || e.modelValue;
2823
2823
  ve(!1);
2824
2824
  }), Io(_, (Z) => {
2825
- l.value = !1;
2825
+ l.value = !1, t("onColorChange", i.value);
2826
2826
  }), U(() => a.value, () => {
2827
2827
  a.value && (i.value = a.value, Y(), ve());
2828
2828
  });
@@ -2836,8 +2836,8 @@ const ts = /* @__PURE__ */ K(uf, [["render", ff]]), pf = R({
2836
2836
  n.lazy && Y();
2837
2837
  }, He = w(i.value);
2838
2838
  return U(i, (Z) => {
2839
- var ue, de;
2840
- document.activeElement !== ((de = (ue = E.value) == null ? void 0 : ue.$el) == null ? void 0 : de.querySelector("input")) && (He.value = Z);
2839
+ var de, le;
2840
+ document.activeElement !== ((le = (de = E.value) == null ? void 0 : de.$el) == null ? void 0 : le.querySelector("input")) && (He.value = Z);
2841
2841
  }), {
2842
2842
  isOpen: l,
2843
2843
  popper: _,
@@ -2954,7 +2954,7 @@ function Ef(e, t, n, o, r, a) {
2954
2954
  e.modelValue === "inherit" ? (m(), x("div", mf, "Inherit")) : (m(), x("div", {
2955
2955
  key: 1,
2956
2956
  class: T(e.style.referenceColor),
2957
- style: le({ backgroundColor: `rgba(${e.finalColor.r}, ${e.finalColor.g}, ${e.finalColor.b}, ${e.finalColor.a})` })
2957
+ style: ie({ backgroundColor: `rgba(${e.finalColor.r}, ${e.finalColor.g}, ${e.finalColor.b}, ${e.finalColor.a})` })
2958
2958
  }, null, 6))
2959
2959
  ])
2960
2960
  ])
@@ -2971,13 +2971,13 @@ function Ef(e, t, n, o, r, a) {
2971
2971
  key: 0,
2972
2972
  class: T(e.style.container),
2973
2973
  ref: "popper",
2974
- style: le({ zIndex: e.zIndex })
2974
+ style: ie({ zIndex: e.zIndex })
2975
2975
  }, [
2976
2976
  I("div", {
2977
2977
  ref: "picker",
2978
2978
  onMousedown: t[3] || (t[3] = (...i) => e.handleMouseDown && e.handleMouseDown(...i)),
2979
2979
  class: T(e.style.colours),
2980
- style: le(`background: rgb(${e.mainColor.r}, ${e.mainColor.g}, ${e.mainColor.b});`)
2980
+ style: ie(`background: rgb(${e.mainColor.r}, ${e.mainColor.g}, ${e.mainColor.b});`)
2981
2981
  }, [
2982
2982
  I("div", {
2983
2983
  class: T(e.style.whiteGradient)
@@ -2990,7 +2990,7 @@ function Ef(e, t, n, o, r, a) {
2990
2990
  onMousedown: t[1] || (t[1] = (...i) => e.handleMouseDown && e.handleMouseDown(...i)),
2991
2991
  onDragover: t[2] || (t[2] = we(() => {
2992
2992
  }, ["prevent"])),
2993
- style: le({ left: `${e.position.x * 100}%`, top: `${e.position.y * 100}%` })
2993
+ style: ie({ left: `${e.position.x * 100}%`, top: `${e.position.y * 100}%` })
2994
2994
  }, null, 38)
2995
2995
  ], 38),
2996
2996
  I("div", {
@@ -3012,7 +3012,7 @@ function Ef(e, t, n, o, r, a) {
3012
3012
  class: T(e.style.preview)
3013
3013
  }, [
3014
3014
  I("div", {
3015
- style: le(`width: 100%; height: 100%; background-color: rgba(${e.finalColor.r}, ${e.finalColor.g}, ${e.finalColor.b}, ${e.finalColor.a});`)
3015
+ style: ie(`width: 100%; height: 100%; background-color: rgba(${e.finalColor.r}, ${e.finalColor.g}, ${e.finalColor.b}, ${e.finalColor.a});`)
3016
3016
  }, null, 4)
3017
3017
  ], 2)),
3018
3018
  I("div", gf, [
@@ -4447,7 +4447,7 @@ function yt(e, t, n, o = {}) {
4447
4447
  return U(
4448
4448
  () => e[t],
4449
4449
  (P) => {
4450
- k || (k = !0, S.value = h(P), ie(() => k = !1));
4450
+ k || (k = !0, S.value = h(P), ue(() => k = !1));
4451
4451
  }
4452
4452
  ), U(
4453
4453
  S,
@@ -4581,7 +4581,7 @@ const Np = cs(() => {
4581
4581
  "touchmove",
4582
4582
  (f) => Wp(f),
4583
4583
  { passive: !1 }
4584
- )), ie(() => {
4584
+ )), ue(() => {
4585
4585
  document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden";
4586
4586
  });
4587
4587
  }, { immediate: !0, flush: "sync" }), e;
@@ -4933,7 +4933,7 @@ function sv(e, t) {
4933
4933
  async (h, b) => {
4934
4934
  var O;
4935
4935
  const E = b !== h;
4936
- if (await ie(), E) {
4936
+ if (await ue(), E) {
4937
4937
  const S = r.value, k = wn(t.value);
4938
4938
  h ? (d("MOUNT"), c("enter"), k === "none" && c("after-enter")) : k === "none" || ((O = o.value) == null ? void 0 : O.display) === "none" ? (d("UNMOUNT"), c("leave"), c("after-leave")) : b && S !== k ? (d("ANIMATION_OUT"), c("leave")) : (d("UNMOUNT"), c("after-leave"));
4939
4939
  }
@@ -5093,7 +5093,7 @@ function cv(e, t) {
5093
5093
  if (!gt)
5094
5094
  return;
5095
5095
  const s = async (l) => {
5096
- t != null && t.value && (await ie(), !(!t.value || hs(t.value, l.target)) && l.target && !r.value && ds(
5096
+ t != null && t.value && (await ue(), !(!t.value || hs(t.value, l.target)) && l.target && !r.value && ds(
5097
5097
  uv,
5098
5098
  e,
5099
5099
  { originalEvent: l }
@@ -5130,7 +5130,7 @@ const ot = Ie({
5130
5130
  const y = [...ot.branches].some(
5131
5131
  (h) => h == null ? void 0 : h.contains(v.target)
5132
5132
  );
5133
- !d.value || y || (o("pointerDownOutside", v), o("interactOutside", v), await ie(), v.defaultPrevented || o("dismiss"));
5133
+ !d.value || y || (o("pointerDownOutside", v), o("interactOutside", v), await ue(), v.defaultPrevented || o("dismiss"));
5134
5134
  }, a), f = cv((v) => {
5135
5135
  [...ot.branches].some(
5136
5136
  (y) => y == null ? void 0 : y.contains(v.target)
@@ -5153,7 +5153,7 @@ const ot = Ie({
5153
5153
  "as-child": v.asChild,
5154
5154
  as: v.as,
5155
5155
  "data-dismissable-layer": "",
5156
- style: le({
5156
+ style: ie({
5157
5157
  pointerEvents: i.value ? d.value ? "auto" : "none" : void 0
5158
5158
  }),
5159
5159
  onFocusCapture: C(f).onFocusCapture,
@@ -5281,7 +5281,7 @@ const wv = /* @__PURE__ */ R({
5281
5281
  });
5282
5282
  }), Ce(async (d) => {
5283
5283
  const c = a.value;
5284
- if (await ie(), !c)
5284
+ if (await ue(), !c)
5285
5285
  return;
5286
5286
  l.add(u);
5287
5287
  const f = document.activeElement;
@@ -5548,7 +5548,7 @@ const $s = {
5548
5548
  ref_key: "floatingRef",
5549
5549
  ref: l,
5550
5550
  "data-radix-popper-content-wrapper": "",
5551
- style: le({
5551
+ style: ie({
5552
5552
  ...C(h),
5553
5553
  transform: C(O) ? C(h).transform : "translate(0, -200%)",
5554
5554
  // keep off the page when measuring
@@ -5632,7 +5632,7 @@ const $s = {
5632
5632
  ref: (d) => {
5633
5633
  C(n).onArrowChange(d);
5634
5634
  },
5635
- style: le({
5635
+ style: ie({
5636
5636
  position: "absolute",
5637
5637
  left: (s = C(n).arrowX) != null && s.value ? `${(l = C(n).arrowX) == null ? void 0 : l.value}px` : void 0,
5638
5638
  top: (u = C(n).arrowY) != null && u.value ? `${(i = C(n).arrowY) == null ? void 0 : i.value}px` : void 0,
@@ -6067,7 +6067,7 @@ const [TC, Qv] = je("RovingFocusGroup"), em = /* @__PURE__ */ R({
6067
6067
  }
6068
6068
  }
6069
6069
  async function s(l) {
6070
- await ie(), !l.defaultPrevented && tn(l) && n.onItemLeave(l);
6070
+ await ue(), !l.defaultPrevented && tn(l) && n.onItemLeave(l);
6071
6071
  }
6072
6072
  return (l, u) => (m(), z(C(Hv), {
6073
6073
  value: { textValue: l.textValue }
@@ -6087,10 +6087,10 @@ const [TC, Qv] = je("RovingFocusGroup"), em = /* @__PURE__ */ R({
6087
6087
  onPointermove: a,
6088
6088
  onPointerleave: s,
6089
6089
  onFocus: u[0] || (u[0] = async (i) => {
6090
- await ie(), !(i.defaultPrevented || l.disabled) && (r.value = !0);
6090
+ await ue(), !(i.defaultPrevented || l.disabled) && (r.value = !0);
6091
6091
  }),
6092
6092
  onBlur: u[1] || (u[1] = async (i) => {
6093
- await ie(), !i.defaultPrevented && (r.value = !1);
6093
+ await ue(), !i.defaultPrevented && (r.value = !1);
6094
6094
  })
6095
6095
  }), {
6096
6096
  default: D(() => [
@@ -6120,7 +6120,7 @@ const [TC, Qv] = je("RovingFocusGroup"), em = /* @__PURE__ */ R({
6120
6120
  bubbles: !0,
6121
6121
  cancelable: !0
6122
6122
  });
6123
- o("select", c), await ie(), c.defaultPrevented ? u.value = !1 : s.onClose();
6123
+ o("select", c), await ue(), c.defaultPrevented ? u.value = !1 : s.onClose();
6124
6124
  }
6125
6125
  }
6126
6126
  return (d, c) => (m(), z(Ms, ee(n, {
@@ -6131,7 +6131,7 @@ const [TC, Qv] = je("RovingFocusGroup"), em = /* @__PURE__ */ R({
6131
6131
  }),
6132
6132
  onPointerup: c[1] || (c[1] = async (f) => {
6133
6133
  var p;
6134
- await ie(), !f.defaultPrevented && (u.value || (p = f.currentTarget) == null || p.click());
6134
+ await ue(), !f.defaultPrevented && (u.value || (p = f.currentTarget) == null || p.click());
6135
6135
  }),
6136
6136
  onKeydown: c[2] || (c[2] = async (f) => {
6137
6137
  const p = C(l).searchRef.value !== "";
@@ -6577,7 +6577,7 @@ const [TC, Qv] = je("RovingFocusGroup"), em = /* @__PURE__ */ R({
6577
6577
  async function d(c) {
6578
6578
  var f;
6579
6579
  const p = a.searchRef.value !== "";
6580
- t.disabled || p && c.key === " " || Sv[o.dir.value].includes(c.key) && (n.onOpenChange(!0), await ie(), (f = n.content.value) == null || f.focus(), c.preventDefault());
6580
+ t.disabled || p && c.key === " " || Sv[o.dir.value].includes(c.key) && (n.onOpenChange(!0), await ue(), (f = n.content.value) == null || f.focus(), c.preventDefault());
6581
6581
  }
6582
6582
  return (c, f) => (m(), z(rr, { "as-child": "" }, {
6583
6583
  default: D(() => [
@@ -6671,13 +6671,13 @@ const cm = /* @__PURE__ */ R({
6671
6671
  a.value = { x: p.clientX, y: p.clientY }, r.onOpenChange(!0);
6672
6672
  }
6673
6673
  async function d(p) {
6674
- n.value || (await ie(), p.defaultPrevented || (u(), i(p), p.preventDefault()));
6674
+ n.value || (await ue(), p.defaultPrevented || (u(), i(p), p.preventDefault()));
6675
6675
  }
6676
6676
  async function c(p) {
6677
- n.value || (await ie(), Wr(p) && !p.defaultPrevented && (u(), l.value = window.setTimeout(() => i(p), 700)));
6677
+ n.value || (await ue(), Wr(p) && !p.defaultPrevented && (u(), l.value = window.setTimeout(() => i(p), 700)));
6678
6678
  }
6679
6679
  async function f(p) {
6680
- n.value || (await ie(), Wr(p) && !p.defaultPrevented && u());
6680
+ n.value || (await ue(), Wr(p) && !p.defaultPrevented && u());
6681
6681
  }
6682
6682
  return (p, v) => (m(), x(ae, null, [
6683
6683
  X(C(rr), {
@@ -7029,7 +7029,7 @@ const cm = /* @__PURE__ */ R({
7029
7029
  "data-state": C(n).open.value ? "open" : "closed",
7030
7030
  onClick: s[0] || (s[0] = async (l) => {
7031
7031
  var u;
7032
- !a.disabled && l.button === 0 && l.ctrlKey === !1 && ((u = C(n)) == null || u.onOpenToggle(), await ie(), C(n).open.value && l.preventDefault());
7032
+ !a.disabled && l.button === 0 && l.ctrlKey === !1 && ((u = C(n)) == null || u.onOpenToggle(), await ue(), C(n).open.value && l.preventDefault());
7033
7033
  }),
7034
7034
  onKeydown: s[1] || (s[1] = It(
7035
7035
  (l) => {
@@ -7667,7 +7667,7 @@ function Xs(e, t) {
7667
7667
  return U(e, (r) => {
7668
7668
  o(r);
7669
7669
  }), ye(() => {
7670
- ie(() => {
7670
+ ue(() => {
7671
7671
  o(e.value);
7672
7672
  });
7673
7673
  }), n;
@@ -7794,7 +7794,7 @@ const ch = /* @__PURE__ */ K(uh, [["render", dh]]), fh = R({
7794
7794
  ), U(s, ($) => {
7795
7795
  $ && y(), t("update:open", $);
7796
7796
  }), ye(() => {
7797
- ie(() => {
7797
+ ue(() => {
7798
7798
  O(e.placement);
7799
7799
  });
7800
7800
  }), ce("resize", () => {
@@ -7894,7 +7894,7 @@ function ph(e, t, n, o, r, a) {
7894
7894
  key: 0,
7895
7895
  ref: "popper",
7896
7896
  class: T(e.menuClasses),
7897
- style: le({ zIndex: e.zIndex, maxHeight: e.maxHeight })
7897
+ style: ie({ zIndex: e.zIndex, maxHeight: e.maxHeight })
7898
7898
  }, [
7899
7899
  A(e.$slots, "menu")
7900
7900
  ], 6)) : H("", !0)
@@ -8102,7 +8102,7 @@ const Th = R({
8102
8102
  $e(Bo, o), ye(() => {
8103
8103
  e.autoFocus && n && n.length > 0 && n[0].focus();
8104
8104
  }), U(() => e.errors, (u) => {
8105
- u && ie(() => {
8105
+ u && ue(() => {
8106
8106
  if (Array.isArray(u))
8107
8107
  u.forEach((i) => {
8108
8108
  const d = n.find((c) => c.name === i.field);
@@ -8136,7 +8136,7 @@ const Th = R({
8136
8136
  });
8137
8137
  function Eh(e, t, n, o, r, a) {
8138
8138
  return m(), x("form", {
8139
- style: le(e.computedStyles),
8139
+ style: ie(e.computedStyles),
8140
8140
  class: T([
8141
8141
  e.computedClasses
8142
8142
  ]),
@@ -8619,7 +8619,7 @@ function Sg(e, t, n, o, r, a) {
8619
8619
  e.isOpen ? (m(), x("div", {
8620
8620
  key: 0,
8621
8621
  class: T(e.style.mask),
8622
- style: le({ zIndex: e.zIndex })
8622
+ style: ie({ zIndex: e.zIndex })
8623
8623
  }, null, 6)) : H("", !0),
8624
8624
  e.isOpen ? (m(), x("div", {
8625
8625
  key: 1,
@@ -8628,7 +8628,7 @@ function Sg(e, t, n, o, r, a) {
8628
8628
  ref: "wrapperRef",
8629
8629
  role: "dialog",
8630
8630
  class: T(e.computedWrapperClasses),
8631
- style: le(e.computedWrapperStyles),
8631
+ style: ie(e.computedWrapperStyles),
8632
8632
  onClick: t[4] || (t[4] = (...s) => e.onOutsideClick && e.onOutsideClick(...s))
8633
8633
  }, [
8634
8634
  I("div", ee({
@@ -9600,7 +9600,7 @@ const Yy = R({
9600
9600
  inline: "nearest"
9601
9601
  });
9602
9602
  }), U(i, (q) => {
9603
- ie(() => {
9603
+ ue(() => {
9604
9604
  if (q || (c.value = ""), q && (O.value = h()), e.searchable && s.value && s.value.focus(), q && a.value) {
9605
9605
  const re = Y.value.findIndex(
9606
9606
  (J) => J.value === F.value
@@ -9612,7 +9612,7 @@ const Yy = R({
9612
9612
  y.value = !1;
9613
9613
  });
9614
9614
  });
9615
- const Z = g(() => L.value || e.error), ue = g(() => e.multiple && Y.value.length == 0 && !c.value ? !1 : i.value), de = (q) => {
9615
+ const Z = g(() => L.value || e.error), de = g(() => e.multiple && Y.value.length == 0 && !c.value ? !1 : i.value), le = (q) => {
9616
9616
  setTimeout(() => {
9617
9617
  l.value && !i.value && Se();
9618
9618
  }, 10);
@@ -9628,10 +9628,10 @@ const Yy = R({
9628
9628
  searchRef: s,
9629
9629
  selectRef: l,
9630
9630
  popper: $,
9631
- focusSelect: de,
9631
+ focusSelect: le,
9632
9632
  onSelectClick: be,
9633
9633
  id: k,
9634
- isOpen: ue,
9634
+ isOpen: de,
9635
9635
  open: i,
9636
9636
  selected: F,
9637
9637
  selectedMax: G,
@@ -9748,7 +9748,7 @@ function ib(e, t, n, o, r, a) {
9748
9748
  key: 0,
9749
9749
  class: T(e.style.menu),
9750
9750
  ref: "popper",
9751
- style: le(e.computedConsistentWidth),
9751
+ style: ie(e.computedConsistentWidth),
9752
9752
  "aria-hidden": e.isOpen ? "false" : "true"
9753
9753
  }, [
9754
9754
  e.searchable || e.multiple && e.selectAll ? (m(), x("div", {
@@ -9859,7 +9859,7 @@ const fb = R({
9859
9859
  function pb(e, t, n, o, r, a) {
9860
9860
  return m(), x("div", {
9861
9861
  class: T(e.computedClasses),
9862
- style: le(e.computedStyles)
9862
+ style: ie(e.computedStyles)
9863
9863
  }, null, 6);
9864
9864
  }
9865
9865
  const vb = /* @__PURE__ */ K(fb, [["render", pb]]);
@@ -10185,7 +10185,7 @@ const kl = /* @__PURE__ */ K(Nb, [["render", Vb]]), Wb = R({
10185
10185
  });
10186
10186
  function Hb(e, t, n, o, r, a) {
10187
10187
  return m(), x("th", {
10188
- style: le(e.computedStyles)
10188
+ style: ie(e.computedStyles)
10189
10189
  }, [
10190
10190
  A(e.$slots, "default")
10191
10191
  ], 4);
@@ -10339,7 +10339,7 @@ function r0(e, t, n, o, r, a) {
10339
10339
  (m(!0), x(ae, null, Ee(e.headers, (f, p) => (m(), z(l, {
10340
10340
  key: p,
10341
10341
  width: f.width,
10342
- style: le({ textAlign: f.align })
10342
+ style: ie({ textAlign: f.align })
10343
10343
  }, {
10344
10344
  default: D(() => [
10345
10345
  A(e.$slots, `${f.key}-header`, {}, () => [
@@ -10369,7 +10369,7 @@ function r0(e, t, n, o, r, a) {
10369
10369
  }, 1024)) : H("", !0),
10370
10370
  (m(!0), x(ae, null, Ee(e.headers, (y, h) => (m(), z(i, {
10371
10371
  key: h,
10372
- style: le({ textAlign: y.align })
10372
+ style: ie({ textAlign: y.align })
10373
10373
  }, {
10374
10374
  default: D(() => [
10375
10375
  A(e.$slots, y.key, {
@@ -10778,7 +10778,7 @@ function x0(e, t, n, o, r, a) {
10778
10778
  role: "tooltip",
10779
10779
  class: T(e.computedClasses),
10780
10780
  ref: "popper",
10781
- style: le({ zIndex: e.zIndex })
10781
+ style: ie({ zIndex: e.zIndex })
10782
10782
  }, [
10783
10783
  A(e.$slots, "content", { html: e.text }, () => [
10784
10784
  I("span", { innerHTML: e.text }, null, 8, E0)
@@ -11033,10 +11033,10 @@ function U0(e, t, n, o, r, a) {
11033
11033
  }, [
11034
11034
  I("div", {
11035
11035
  ref: "contentWrapper",
11036
- style: le({ width: `${e.totalWidth}px`, height: `${e.totalHeight}px` })
11036
+ style: ie({ width: `${e.totalWidth}px`, height: `${e.totalHeight}px` })
11037
11037
  }, [
11038
11038
  I("div", {
11039
- style: le({ transform: `translate(${e.offsetX}px, ${e.offsetY}px)` })
11039
+ style: ie({ transform: `translate(${e.offsetX}px, ${e.offsetY}px)` })
11040
11040
  }, [
11041
11041
  (m(!0), x(ae, null, Ee(e.renderedItems, (s, l) => (m(), x("div", {
11042
11042
  key: l,
@@ -11044,7 +11044,7 @@ function U0(e, t, n, o, r, a) {
11044
11044
  }, [
11045
11045
  (m(!0), x(ae, null, Ee(s, (u, i) => (m(), x("div", {
11046
11046
  key: i,
11047
- style: le({ width: `${e.itemWidth}px`, height: `${e.itemHeight}px` })
11047
+ style: ie({ width: `${e.itemWidth}px`, height: `${e.itemHeight}px` })
11048
11048
  }, [
11049
11049
  A(e.$slots, "item", { item: u })
11050
11050
  ], 4))), 128))
@@ -11310,11 +11310,11 @@ const d1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11310
11310
  }
11311
11311
  }
11312
11312
  return ce(window, "resize", () => {
11313
- e.open && (e.draggable ? ie(() => L()) : ie(() => B()));
11313
+ e.open && (e.draggable ? ue(() => L()) : ue(() => B()));
11314
11314
  }), U(
11315
11315
  () => e.open,
11316
11316
  async (j) => {
11317
- j && (await ie(), B(), t("onOpen"));
11317
+ j && (await ue(), B(), t("onOpen"));
11318
11318
  },
11319
11319
  { immediate: !0 }
11320
11320
  ), n({
@@ -11358,7 +11358,7 @@ function v1(e, t, n, o, r, a) {
11358
11358
  e.open ? (m(), x("div", {
11359
11359
  key: 0,
11360
11360
  class: T(e.style.root),
11361
- style: le({ zIndex: e.zIndex, position: "fixed", inset: "0", pointerEvents: e.modal ? "all" : "none" })
11361
+ style: ie({ zIndex: e.zIndex, position: "fixed", inset: "0", pointerEvents: e.modal ? "all" : "none" })
11362
11362
  }, [
11363
11363
  e.modal ? (m(), x("div", {
11364
11364
  key: 0,
@@ -11370,7 +11370,7 @@ function v1(e, t, n, o, r, a) {
11370
11370
  }, [
11371
11371
  I("div", {
11372
11372
  ref: "dialog",
11373
- style: le(e.computedStyle)
11373
+ style: ie(e.computedStyle)
11374
11374
  }, [
11375
11375
  f1,
11376
11376
  e.$slots.container ? A(e.$slots, "container", {
@@ -11437,11 +11437,11 @@ const Kl = /* @__PURE__ */ K(c1, [["render", v1]]), m1 = R({
11437
11437
  options: c,
11438
11438
  open: async () => {
11439
11439
  const p = t.value[i];
11440
- p && p.open ? p.open() : (await ie(), f.options.open = !0, s(i));
11440
+ p && p.open ? p.open() : (await ue(), f.options.open = !0, s(i));
11441
11441
  },
11442
11442
  close: async () => {
11443
11443
  const p = t.value[i];
11444
- p && p.close ? p.close() : (await ie(), f.options.open = !1, l(i));
11444
+ p && p.close ? p.close() : (await ue(), f.options.open = !1, l(i));
11445
11445
  }
11446
11446
  };
11447
11447
  return e[i] = f, f;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammodlr/ui-kit",
3
- "version": "2.3.15",
3
+ "version": "2.3.16",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -212,10 +212,9 @@ export default defineComponent({
212
212
 
213
213
  const emitModelValue = () => {
214
214
  emit('update:modelValue', hexInput.value);
215
- emit('onColorChange', hexInput.value);
216
215
  };
217
216
 
218
- const setInputs = () => {
217
+ const setInputs = (shouldEmit: boolean = true) => {
219
218
  if (hexInput.value !== 'inherit') {
220
219
  hexInput.value = RGBAToHex(finalColor.value.r, finalColor.value.g, finalColor.value.b, finalColor.value.a);
221
220
  }
@@ -224,13 +223,13 @@ export default defineComponent({
224
223
  bInput.value = finalColor.value.b.toString();
225
224
  aInput.value = finalColor.value.a.toFixed(2).toString();
226
225
 
227
- if (!modelModifiers.lazy) {
226
+ if (shouldEmit && !modelModifiers.lazy) {
228
227
  emitModelValue();
229
228
  }
230
229
  };
231
230
 
232
231
  watch(() => finalColor.value, () => {
233
- setInputs();
232
+ setInputs(false);
234
233
  });
235
234
 
236
235
  watch(() => props.color, (newColor) => {
@@ -240,12 +239,12 @@ export default defineComponent({
240
239
  }
241
240
  });
242
241
 
243
- const updateFromHSV = (hsv: HSV, alpha: number) => {
242
+ const updateFromHSV = (hsv: HSV, alpha: number, shouldEmit: boolean = true) => {
244
243
  position.x = hsv.s;
245
244
  position.y = 1 - hsv.v;
246
245
  hueSlider.value = ((1 / 360) * hsv.h) * 100;
247
246
  opacitySlider.value = alpha * 100;
248
- setInputs();
247
+ setInputs(shouldEmit);
249
248
  }
250
249
 
251
250
  const updateFromHex = (shouldEmit = true) => {
@@ -266,7 +265,7 @@ export default defineComponent({
266
265
  opacitySlider.value = 0;
267
266
  }
268
267
 
269
- updateFromHSV(RGBToHSV(color.r, color.g, color.b), color.a);
268
+ updateFromHSV(RGBToHSV(color.r, color.g, color.b), color.a, shouldEmit);
270
269
  if (shouldEmit && modelModifiers.lazy) {
271
270
  emitModelValue();
272
271
  }
@@ -379,6 +378,7 @@ export default defineComponent({
379
378
 
380
379
  onClickOutside(popper, (e) => {
381
380
  isOpen.value = false;
381
+ emit('onColorChange', hexInput.value);
382
382
  });
383
383
 
384
384