@teammodlr/ui-kit 3.0.0-beta.10 → 3.0.0-beta.11

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
@@ -446,7 +446,7 @@ function Ut(e) {
446
446
  const n = Ve(e);
447
447
  return (t = n == null ? void 0 : n.$el) !== null && t !== void 0 ? t : n;
448
448
  }
449
- function _t(...e) {
449
+ function $t(...e) {
450
450
  const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = y(() => {
451
451
  const o = _o(Ve(e[0])).filter((a) => a != null);
452
452
  return o.every((a) => typeof a != "string") ? o : void 0;
@@ -481,7 +481,7 @@ function Ru(...e) {
481
481
  let t, n, o = {};
482
482
  e.length === 3 ? (t = e[0], n = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], o = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
483
483
  const { target: a = ta, eventName: r = "keydown", passive: s = !1, dedupe: l = !1 } = o, u = Iu(t);
484
- return _t(a, r, (d) => {
484
+ return $t(a, r, (d) => {
485
485
  d.repeat && Ve(l) || u(d) && n(d);
486
486
  }, s);
487
487
  }
@@ -570,7 +570,7 @@ const Wr = ju(), Lu = /* @__PURE__ */ xr(() => {
570
570
  padding: 0,
571
571
  margin: 0
572
572
  };
573
- u > 0 && (document.body.style.paddingRight = typeof d.padding == "number" ? `${d.padding}px` : String(d.padding), document.body.style.marginRight = typeof d.margin == "number" ? `${d.margin}px` : String(d.margin), document.documentElement.style.setProperty("--scrollbar-width", `${u}px`), document.body.style.overflow = "hidden"), Ya && (a = _t(document, "touchmove", (f) => Nu(f), { passive: !1 })), me(() => {
573
+ u > 0 && (document.body.style.paddingRight = typeof d.padding == "number" ? `${d.padding}px` : String(d.padding), document.body.style.marginRight = typeof d.margin == "number" ? `${d.margin}px` : String(d.margin), document.documentElement.style.setProperty("--scrollbar-width", `${u}px`), document.body.style.overflow = "hidden"), Ya && (a = $t(document, "touchmove", (f) => Nu(f), { passive: !1 })), me(() => {
574
574
  n.value && (document.body.style.pointerEvents = "none", document.body.style.overflow = "hidden");
575
575
  });
576
576
  }, {
@@ -1074,7 +1074,7 @@ function ad(e, t) {
1074
1074
  function Nn(e) {
1075
1075
  return e && getComputedStyle(e).animationName || "none";
1076
1076
  }
1077
- var kt = k({
1077
+ var Mt = k({
1078
1078
  name: "Presence",
1079
1079
  props: {
1080
1080
  present: {
@@ -1261,11 +1261,11 @@ var ld = /* @__PURE__ */ k({
1261
1261
  requestAnimationFrame(() => {
1262
1262
  c.value = !1;
1263
1263
  });
1264
- }), _t(l, "beforematch", (m) => {
1264
+ }), $t(l, "beforematch", (m) => {
1265
1265
  requestAnimationFrame(() => {
1266
1266
  a.onOpenToggle(), o("contentFound");
1267
1267
  });
1268
- }), (m, h) => (g(), q(v(kt), {
1268
+ }), (m, h) => (g(), q(v(Mt), {
1269
1269
  ref_key: "presentRef",
1270
1270
  ref: r,
1271
1271
  present: m.forceMount || v(a).open.value,
@@ -2004,7 +2004,7 @@ var Ld = /* @__PURE__ */ k({
2004
2004
  ],
2005
2005
  setup(e, { emit: t }) {
2006
2006
  const n = e, o = t, a = Ft(), r = mt(o), { forwardRef: s } = Z();
2007
- return (l, u) => (g(), q(v(kt), { present: l.forceMount || v(a).open.value }, {
2007
+ return (l, u) => (g(), q(v(Mt), { present: l.forceMount || v(a).open.value }, {
2008
2008
  default: $(() => [v(a).modal.value ? (g(), q(Vd, J({
2009
2009
  key: 0,
2010
2010
  ref: v(s)
@@ -2077,7 +2077,7 @@ var Ld = /* @__PURE__ */ k({
2077
2077
  const t = Ft(), { forwardRef: n } = Z();
2078
2078
  return (o, a) => {
2079
2079
  var r;
2080
- return (r = v(t)) != null && r.modal.value ? (g(), q(v(kt), {
2080
+ return (r = v(t)) != null && r.modal.value ? (g(), q(v(Mt), {
2081
2081
  key: 0,
2082
2082
  present: o.forceMount || v(t).open.value
2083
2083
  }, {
@@ -2551,10 +2551,10 @@ const mc = ["top", "right", "bottom", "left"], Pt = Math.min, Qe = Math.max, Qn
2551
2551
  function Ro(e, t, n) {
2552
2552
  return Qe(e, Pt(t, n));
2553
2553
  }
2554
- function $t(e, t) {
2554
+ function St(e, t) {
2555
2555
  return typeof e == "function" ? e(t) : e;
2556
2556
  }
2557
- function St(e) {
2557
+ function Ot(e) {
2558
2558
  return e.split("-")[0];
2559
2559
  }
2560
2560
  function cn(e) {
@@ -2601,11 +2601,11 @@ function Cc(e, t, n) {
2601
2601
  }
2602
2602
  function _c(e, t, n, o) {
2603
2603
  const a = cn(e);
2604
- let r = Cc(St(e), n === "start", o);
2604
+ let r = Cc(Ot(e), n === "start", o);
2605
2605
  return a && (r = r.map((s) => s + "-" + a), t && (r = r.concat(r.map(Fo)))), r;
2606
2606
  }
2607
2607
  function eo(e) {
2608
- const t = St(e);
2608
+ const t = Ot(e);
2609
2609
  return yc[t] + e.slice(t.length);
2610
2610
  }
2611
2611
  function $c(e) {
@@ -2648,7 +2648,7 @@ function rr(e, t, n) {
2648
2648
  reference: o,
2649
2649
  floating: a
2650
2650
  } = e;
2651
- const r = gt(t), s = da(t), l = ua(s), u = St(t), i = r === "y", d = o.x + o.width / 2 - a.width / 2, c = o.y + o.height / 2 - a.height / 2, f = o[l] / 2 - a[l] / 2;
2651
+ const r = gt(t), s = da(t), l = ua(s), u = Ot(t), i = r === "y", d = o.x + o.width / 2 - a.width / 2, c = o.y + o.height / 2 - a.height / 2, f = o[l] / 2 - a[l] / 2;
2652
2652
  let p;
2653
2653
  switch (u) {
2654
2654
  case "top":
@@ -2707,7 +2707,7 @@ async function Sc(e, t) {
2707
2707
  elementContext: c = "floating",
2708
2708
  altBoundary: f = !1,
2709
2709
  padding: p = 0
2710
- } = $t(t, e), m = us(p), b = l[f ? c === "floating" ? "reference" : "floating" : c], _ = to(await r.getClippingRect({
2710
+ } = St(t, e), m = us(p), b = l[f ? c === "floating" ? "reference" : "floating" : c], _ = to(await r.getClippingRect({
2711
2711
  element: (n = await (r.isElement == null ? void 0 : r.isElement(b))) == null || n ? b : b.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
2712
2712
  boundary: i,
2713
2713
  rootBoundary: d,
@@ -2815,7 +2815,7 @@ const Oc = 50, kc = async (e, t, n) => {
2815
2815
  } = t, {
2816
2816
  element: i,
2817
2817
  padding: d = 0
2818
- } = $t(e, t) || {};
2818
+ } = St(e, t) || {};
2819
2819
  if (i == null)
2820
2820
  return {};
2821
2821
  const c = us(d), f = {
@@ -2858,10 +2858,10 @@ const Oc = 50, kc = async (e, t, n) => {
2858
2858
  fallbackAxisSideDirection: m = "none",
2859
2859
  flipAlignment: h = !0,
2860
2860
  ...b
2861
- } = $t(e, t);
2861
+ } = St(e, t);
2862
2862
  if ((n = r.arrow) != null && n.alignmentOffset)
2863
2863
  return {};
2864
- const _ = St(a), C = gt(l), M = St(l) === l, D = await (u.isRTL == null ? void 0 : u.isRTL(i.floating)), E = f || (M || !h ? [eo(l)] : hc(l)), F = m !== "none";
2864
+ const _ = Ot(a), C = gt(l), M = Ot(l) === l, D = await (u.isRTL == null ? void 0 : u.isRTL(i.floating)), E = f || (M || !h ? [eo(l)] : hc(l)), F = m !== "none";
2865
2865
  !f && F && E.push(..._c(l, h, m, D));
2866
2866
  const R = [l, ...E], x = await u.detectOverflow(t, b), V = [];
2867
2867
  let B = ((o = r.flip) == null ? void 0 : o.overflows) || [];
@@ -2941,7 +2941,7 @@ const qc = function(e) {
2941
2941
  } = t, {
2942
2942
  strategy: a = "referenceHidden",
2943
2943
  ...r
2944
- } = $t(e, t);
2944
+ } = St(e, t);
2945
2945
  switch (a) {
2946
2946
  case "referenceHidden": {
2947
2947
  const s = await o.detectOverflow(t, {
@@ -2978,7 +2978,7 @@ async function Bc(e, t) {
2978
2978
  placement: n,
2979
2979
  platform: o,
2980
2980
  elements: a
2981
- } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(a.floating)), s = St(n), l = cn(n), u = gt(n) === "y", i = ds.has(s) ? -1 : 1, d = r && u ? -1 : 1, c = $t(t, e);
2981
+ } = e, r = await (o.isRTL == null ? void 0 : o.isRTL(a.floating)), s = Ot(n), l = cn(n), u = gt(n) === "y", i = ds.has(s) ? -1 : 1, d = r && u ? -1 : 1, c = St(t, e);
2982
2982
  let {
2983
2983
  mainAxis: f,
2984
2984
  crossAxis: p,
@@ -3048,10 +3048,10 @@ const Ac = function(e) {
3048
3048
  }
3049
3049
  },
3050
3050
  ...i
3051
- } = $t(e, t), d = {
3051
+ } = St(e, t), d = {
3052
3052
  x: n,
3053
3053
  y: o
3054
- }, c = await r.detectOverflow(t, i), f = gt(St(a)), p = ia(f);
3054
+ }, c = await r.detectOverflow(t, i), f = gt(Ot(a)), p = ia(f);
3055
3055
  let m = d[p], h = d[f];
3056
3056
  if (s) {
3057
3057
  const _ = p === "y" ? "top" : "left", C = p === "y" ? "bottom" : "right", M = m + c[_], D = m - c[C];
@@ -3093,12 +3093,12 @@ const Ac = function(e) {
3093
3093
  offset: l = 0,
3094
3094
  mainAxis: u = !0,
3095
3095
  crossAxis: i = !0
3096
- } = $t(e, t), d = {
3096
+ } = St(e, t), d = {
3097
3097
  x: n,
3098
3098
  y: o
3099
3099
  }, c = gt(a), f = ia(c);
3100
3100
  let p = d[f], m = d[c];
3101
- const h = $t(l, t), b = typeof h == "number" ? {
3101
+ const h = St(l, t), b = typeof h == "number" ? {
3102
3102
  mainAxis: h,
3103
3103
  crossAxis: 0
3104
3104
  } : {
@@ -3112,7 +3112,7 @@ const Ac = function(e) {
3112
3112
  }
3113
3113
  if (i) {
3114
3114
  var _, C;
3115
- const M = f === "y" ? "width" : "height", D = ds.has(St(a)), E = r.reference[c] - r.floating[M] + (D && ((_ = s.offset) == null ? void 0 : _[c]) || 0) + (D ? 0 : b.crossAxis), F = r.reference[c] + r.reference[M] + (D ? 0 : ((C = s.offset) == null ? void 0 : C[c]) || 0) - (D ? b.crossAxis : 0);
3115
+ const M = f === "y" ? "width" : "height", D = ds.has(Ot(a)), E = r.reference[c] - r.floating[M] + (D && ((_ = s.offset) == null ? void 0 : _[c]) || 0) + (D ? 0 : b.crossAxis), F = r.reference[c] + r.reference[M] + (D ? 0 : ((C = s.offset) == null ? void 0 : C[c]) || 0) - (D ? b.crossAxis : 0);
3116
3116
  m < E ? m = E : m > F && (m = F);
3117
3117
  }
3118
3118
  return {
@@ -3136,7 +3136,7 @@ const Ac = function(e) {
3136
3136
  apply: u = () => {
3137
3137
  },
3138
3138
  ...i
3139
- } = $t(e, t), d = await s.detectOverflow(t, i), c = St(a), f = cn(a), p = gt(a) === "y", {
3139
+ } = St(e, t), d = await s.detectOverflow(t, i), c = Ot(a), f = cn(a), p = gt(a) === "y", {
3140
3140
  width: m,
3141
3141
  height: h
3142
3142
  } = r.floating;
@@ -3182,7 +3182,7 @@ function ca(e) {
3182
3182
  function pt(e) {
3183
3183
  return po() ? e instanceof Element || e instanceof tt(e).Element : !1;
3184
3184
  }
3185
- function Mt(e) {
3185
+ function Tt(e) {
3186
3186
  return po() ? e instanceof HTMLElement || e instanceof tt(e).HTMLElement : !1;
3187
3187
  }
3188
3188
  function ir(e) {
@@ -3220,7 +3220,7 @@ function fa(e) {
3220
3220
  }
3221
3221
  function jc(e) {
3222
3222
  let t = Et(e);
3223
- for (; Mt(t) && !nn(t); ) {
3223
+ for (; Tt(t) && !nn(t); ) {
3224
3224
  if (fa(t))
3225
3225
  return t;
3226
3226
  if (vo(t))
@@ -3261,7 +3261,7 @@ function Et(e) {
3261
3261
  }
3262
3262
  function cs(e) {
3263
3263
  const t = Et(e);
3264
- return nn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Mt(t) && qn(t) ? t : cs(t);
3264
+ return nn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Tt(t) && qn(t) ? t : cs(t);
3265
3265
  }
3266
3266
  function _n(e, t, n) {
3267
3267
  var o;
@@ -3279,7 +3279,7 @@ function jo(e) {
3279
3279
  function fs(e) {
3280
3280
  const t = vt(e);
3281
3281
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
3282
- const a = Mt(e), r = a ? e.offsetWidth : n, s = a ? e.offsetHeight : o, l = Qn(n) !== r || Qn(o) !== s;
3282
+ const a = Tt(e), r = a ? e.offsetWidth : n, s = a ? e.offsetHeight : o, l = Qn(n) !== r || Qn(o) !== s;
3283
3283
  return l && (n = r, o = s), {
3284
3284
  width: n,
3285
3285
  height: o,
@@ -3291,7 +3291,7 @@ function va(e) {
3291
3291
  }
3292
3292
  function en(e) {
3293
3293
  const t = va(e);
3294
- if (!Mt(t))
3294
+ if (!Tt(t))
3295
3295
  return ht(1);
3296
3296
  const n = t.getBoundingClientRect(), {
3297
3297
  width: o,
@@ -3362,7 +3362,7 @@ function Vc(e) {
3362
3362
  scrollLeft: 0,
3363
3363
  scrollTop: 0
3364
3364
  }, i = ht(1);
3365
- const d = ht(0), c = Mt(o);
3365
+ const d = ht(0), c = Tt(o);
3366
3366
  if ((c || !c && !r) && ((Gt(o) !== "body" || qn(s)) && (u = mo(o)), c)) {
3367
3367
  const p = Ht(o);
3368
3368
  i = en(o), d.x = p.x + o.clientLeft, d.y = p.y + o.clientTop;
@@ -3411,7 +3411,7 @@ function Hc(e, t) {
3411
3411
  };
3412
3412
  }
3413
3413
  function Wc(e, t) {
3414
- const n = Ht(e, !0, t === "fixed"), o = n.top + e.clientTop, a = n.left + e.clientLeft, r = Mt(e) ? en(e) : ht(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, u = a * r.x, i = o * r.y;
3414
+ const n = Ht(e, !0, t === "fixed"), o = n.top + e.clientTop, a = n.left + e.clientLeft, r = Tt(e) ? en(e) : ht(1), s = e.clientWidth * r.x, l = e.clientHeight * r.y, u = a * r.x, i = o * r.y;
3415
3415
  return {
3416
3416
  width: s,
3417
3417
  height: l,
@@ -3486,7 +3486,7 @@ function Gc(e) {
3486
3486
  };
3487
3487
  }
3488
3488
  function Xc(e, t, n) {
3489
- const o = Mt(t), a = Ct(t), r = n === "fixed", s = Ht(e, !0, r, t);
3489
+ const o = Tt(t), a = Ct(t), r = n === "fixed", s = Ht(e, !0, r, t);
3490
3490
  let l = {
3491
3491
  scrollLeft: 0,
3492
3492
  scrollTop: 0
@@ -3513,7 +3513,7 @@ function qo(e) {
3513
3513
  return vt(e).position === "static";
3514
3514
  }
3515
3515
  function cr(e, t) {
3516
- if (!Mt(e) || vt(e).position === "fixed")
3516
+ if (!Tt(e) || vt(e).position === "fixed")
3517
3517
  return null;
3518
3518
  if (t)
3519
3519
  return t(e);
@@ -3524,7 +3524,7 @@ function ys(e, t) {
3524
3524
  const n = tt(e);
3525
3525
  if (vo(e))
3526
3526
  return n;
3527
- if (!Mt(e)) {
3527
+ if (!Tt(e)) {
3528
3528
  let a = Et(e);
3529
3529
  for (; a && !nn(a); ) {
3530
3530
  if (pt(a) && !qo(a))
@@ -4614,12 +4614,12 @@ var Df = /* @__PURE__ */ k({
4614
4614
  function Ff() {
4615
4615
  const e = w(!1);
4616
4616
  return Oe(() => {
4617
- _t("keydown", () => {
4617
+ $t("keydown", () => {
4618
4618
  e.value = !0;
4619
4619
  }, {
4620
4620
  capture: !0,
4621
4621
  passive: !0
4622
- }), _t(["pointerdown", "pointermove"], () => {
4622
+ }), $t(["pointerdown", "pointermove"], () => {
4623
4623
  e.value = !1;
4624
4624
  }, {
4625
4625
  capture: !0,
@@ -5100,7 +5100,7 @@ var Kf = /* @__PURE__ */ k({
5100
5100
  },
5101
5101
  setup(e) {
5102
5102
  const t = Wf({ modelValue: w(!1) });
5103
- return (n, o) => (g(), q(v(kt), { present: n.forceMount || v(Jn)(v(t).modelValue.value) || v(t).modelValue.value === !0 }, {
5103
+ return (n, o) => (g(), q(v(Mt), { present: n.forceMount || v(Jn)(v(t).modelValue.value) || v(t).modelValue.value === !0 }, {
5104
5104
  default: $(() => [L(v(pe), {
5105
5105
  as: n.as,
5106
5106
  "as-child": n.asChild,
@@ -5478,7 +5478,7 @@ var Kf = /* @__PURE__ */ k({
5478
5478
  ],
5479
5479
  setup(e, { emit: t }) {
5480
5480
  const a = at(e, t), r = Xt(), s = Bn();
5481
- return (l, u) => (g(), q(v(kt), { present: l.forceMount || v(r).open.value }, {
5481
+ return (l, u) => (g(), q(v(Mt), { present: l.forceMount || v(r).open.value }, {
5482
5482
  default: $(() => [v(s).modal.value ? (g(), q(Xf, ye(J({ key: 0 }, {
5483
5483
  ...l.$attrs,
5484
5484
  ...v(a)
@@ -5789,7 +5789,7 @@ var cp = /* @__PURE__ */ k({
5789
5789
  ],
5790
5790
  setup(e, { emit: t }) {
5791
5791
  const a = at(e, t), r = Xt(), s = Bn(), l = Is(), u = go(), { forwardRef: i, currentElement: d } = Z();
5792
- return l.contentId || (l.contentId = nt(void 0, "reka-menu-sub-content")), (c, f) => (g(), q(v(kt), { present: c.forceMount || v(r).open.value }, {
5792
+ return l.contentId || (l.contentId = nt(void 0, "reka-menu-sub-content")), (c, f) => (g(), q(v(Mt), { present: c.forceMount || v(r).open.value }, {
5793
5793
  default: $(() => [L(ba, J(v(a), {
5794
5794
  id: v(l).contentId,
5795
5795
  ref: v(i),
@@ -7133,7 +7133,7 @@ var Vp = /* @__PURE__ */ k({
7133
7133
  ],
7134
7134
  setup(e, { emit: t }) {
7135
7135
  const n = e, o = t, a = An(), r = at(n, o), { forwardRef: s } = Z();
7136
- return a.contentId || (a.contentId = nt(void 0, "reka-popover-content")), (l, u) => (g(), q(v(kt), { present: l.forceMount || v(a).open.value }, {
7136
+ return a.contentId || (a.contentId = nt(void 0, "reka-popover-content")), (l, u) => (g(), q(v(Mt), { present: l.forceMount || v(a).open.value }, {
7137
7137
  default: $(() => [v(a).modal.value ? (g(), q(Kp, J({ key: 0 }, v(r), { ref: v(s) }), {
7138
7138
  default: $(() => [S(l.$slots, "default")]),
7139
7139
  _: 3
@@ -8152,9 +8152,9 @@ var Tv = /* @__PURE__ */ k({
8152
8152
  "ArrowLeft",
8153
8153
  "ArrowRight"
8154
8154
  ];
8155
- _t("keydown", (p) => {
8155
+ $t("keydown", (p) => {
8156
8156
  c.includes(p.key) && (d.value = !0);
8157
- }), _t("keyup", () => {
8157
+ }), $t("keyup", () => {
8158
8158
  d.value = !1;
8159
8159
  });
8160
8160
  function f() {
@@ -8444,7 +8444,7 @@ var Iv = /* @__PURE__ */ k({
8444
8444
  });
8445
8445
  }), ln(() => {
8446
8446
  o.unregisterContent(t.value);
8447
- }), (u, i) => (g(), q(v(kt), {
8447
+ }), (u, i) => (g(), q(v(Mt), {
8448
8448
  present: u.forceMount || s.value,
8449
8449
  "force-mount": ""
8450
8450
  }, {
@@ -8828,10 +8828,10 @@ var Wv = /* @__PURE__ */ k({
8828
8828
  });
8829
8829
  });
8830
8830
  return Oe(() => {
8831
- _t(window, "scroll", (d) => {
8831
+ $t(window, "scroll", (d) => {
8832
8832
  const c = d.target;
8833
8833
  c != null && c.contains(a.trigger.value) && a.onClose();
8834
- }, { capture: !0 }), _t(window, Js, a.onClose);
8834
+ }, { capture: !0 }), $t(window, Js, a.onClose);
8835
8835
  }), (d, c) => (g(), q(v(io), {
8836
8836
  "as-child": "",
8837
8837
  "disable-outside-pointer-events": !1,
@@ -9013,7 +9013,7 @@ var Wv = /* @__PURE__ */ k({
9013
9013
  emits: ["escapeKeyDown", "pointerDownOutside"],
9014
9014
  setup(e, { emit: t }) {
9015
9015
  const n = e, o = t, a = wo(), r = at(n, o), { forwardRef: s } = Z();
9016
- return (l, u) => (g(), q(v(kt), { present: l.forceMount || v(a).open.value }, {
9016
+ return (l, u) => (g(), q(v(Mt), { present: l.forceMount || v(a).open.value }, {
9017
9017
  default: $(() => [(g(), q(et(v(a).disableHoverableContent.value ? Qs : Xv), J({ ref: v(s) }, v(r)), {
9018
9018
  default: $(() => [S(l.$slots, "default")]),
9019
9019
  _: 3
@@ -10493,7 +10493,7 @@ function yl(e, t) {
10493
10493
  }
10494
10494
  return !1;
10495
10495
  }
10496
- function Ot(e) {
10496
+ function kt(e) {
10497
10497
  return ot(e).getComputedStyle(e);
10498
10498
  }
10499
10499
  function pg(e) {
@@ -10519,18 +10519,18 @@ function Co(e) {
10519
10519
  }
10520
10520
  function hr(e) {
10521
10521
  return !ut(e) || // https://github.com/popperjs/popper-core/issues/837
10522
- Ot(e).position === "fixed" ? null : e.offsetParent;
10522
+ kt(e).position === "fixed" ? null : e.offsetParent;
10523
10523
  }
10524
10524
  function vg(e) {
10525
10525
  var t = /firefox/i.test(zo()), n = /Trident/i.test(zo());
10526
10526
  if (n && ut(e)) {
10527
- var o = Ot(e);
10527
+ var o = kt(e);
10528
10528
  if (o.position === "fixed")
10529
10529
  return null;
10530
10530
  }
10531
10531
  var a = Co(e);
10532
10532
  for (qa(a) && (a = a.host); ut(a) && ["html", "body"].indexOf(wt(a)) < 0; ) {
10533
- var r = Ot(a);
10533
+ var r = kt(a);
10534
10534
  if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || t && r.willChange === "filter" || t && r.filter && r.filter !== "none")
10535
10535
  return a;
10536
10536
  a = a.parentNode;
@@ -10538,9 +10538,9 @@ function vg(e) {
10538
10538
  return null;
10539
10539
  }
10540
10540
  function En(e) {
10541
- for (var t = ot(e), n = hr(e); n && pg(n) && Ot(n).position === "static"; )
10541
+ for (var t = ot(e), n = hr(e); n && pg(n) && kt(n).position === "static"; )
10542
10542
  n = hr(n);
10543
- return n && (wt(n) === "html" || wt(n) === "body" && Ot(n).position === "static") ? t : n || vg(e) || t;
10543
+ return n && (wt(n) === "html" || wt(n) === "body" && kt(n).position === "static") ? t : n || vg(e) || t;
10544
10544
  }
10545
10545
  function Aa(e) {
10546
10546
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
@@ -10621,7 +10621,7 @@ function br(e) {
10621
10621
  var _ = s.hasOwnProperty("x"), C = s.hasOwnProperty("y"), M = Ze, D = Ye, E = window;
10622
10622
  if (i) {
10623
10623
  var F = En(n), R = "clientHeight", x = "clientWidth";
10624
- if (F === ot(n) && (F = jt(n), Ot(F).position !== "static" && l === "absolute" && (R = "scrollHeight", x = "scrollWidth")), F = F, a === Ye || (a === Ze || a === ct) && r === On) {
10624
+ if (F === ot(n) && (F = jt(n), kt(F).position !== "static" && l === "absolute" && (R = "scrollHeight", x = "scrollWidth")), F = F, a === Ye || (a === Ze || a === ct) && r === On) {
10625
10625
  D = dt;
10626
10626
  var V = c && F === E && E.visualViewport ? E.visualViewport.height : (
10627
10627
  // $FlowFixMe[prop-missing]
@@ -10751,7 +10751,7 @@ function Tg(e, t) {
10751
10751
  }
10752
10752
  function qg(e) {
10753
10753
  var t, n = jt(e), o = Da(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, r = zt(n.scrollWidth, n.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), s = zt(n.scrollHeight, n.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), l = -o.scrollLeft + Pa(e), u = -o.scrollTop;
10754
- return Ot(a || n).direction === "rtl" && (l += zt(n.clientWidth, a ? a.clientWidth : 0) - r), {
10754
+ return kt(a || n).direction === "rtl" && (l += zt(n.clientWidth, a ? a.clientWidth : 0) - r), {
10755
10755
  width: r,
10756
10756
  height: s,
10757
10757
  x: l,
@@ -10759,7 +10759,7 @@ function qg(e) {
10759
10759
  };
10760
10760
  }
10761
10761
  function Ea(e) {
10762
- var t = Ot(e), n = t.overflow, o = t.overflowX, a = t.overflowY;
10762
+ var t = kt(e), n = t.overflow, o = t.overflowX, a = t.overflowY;
10763
10763
  return /auto|scroll|overlay|hidden/.test(n + a + o);
10764
10764
  }
10765
10765
  function wl(e) {
@@ -10790,7 +10790,7 @@ function Cr(e, t, n) {
10790
10790
  return t === pl ? Ho(Tg(e, n)) : Wt(t) ? Bg(t, n) : Ho(qg(jt(e)));
10791
10791
  }
10792
10792
  function Ag(e) {
10793
- var t = bn(Co(e)), n = ["absolute", "fixed"].indexOf(Ot(e).position) >= 0, o = n && ut(e) ? En(e) : e;
10793
+ var t = bn(Co(e)), n = ["absolute", "fixed"].indexOf(kt(e).position) >= 0, o = n && ut(e) ? En(e) : e;
10794
10794
  return Wt(o) ? t.filter(function(a) {
10795
10795
  return Wt(a) && yl(a, o) && wt(a) !== "body";
10796
10796
  }) : [];
@@ -11065,8 +11065,8 @@ function Wg(e) {
11065
11065
  F[D] = ze, H[D] = ze - X;
11066
11066
  }
11067
11067
  if (l) {
11068
- var Je, je = D === "x" ? Ye : Ze, Nt = D === "x" ? dt : ct, rt = F[E], U = E === "y" ? "height" : "width", le = rt + b[je], ae = rt - b[Nt], ge = [Ye, Ze].indexOf(_) !== -1, st = (Je = j == null ? void 0 : j[E]) != null ? Je : 0, Ge = ge ? le : rt - R[U] - x[U] - st + B.altAxis, lt = ge ? rt + R[U] + x[U] - st - B.altAxis : ae, Tt = p && ge ? mg(Ge, rt, lt) : hn(p ? Ge : le, rt, p ? lt : ae);
11069
- F[E] = Tt, H[E] = Tt - rt;
11068
+ var Je, je = D === "x" ? Ye : Ze, Nt = D === "x" ? dt : ct, rt = F[E], U = E === "y" ? "height" : "width", le = rt + b[je], ae = rt - b[Nt], ge = [Ye, Ze].indexOf(_) !== -1, st = (Je = j == null ? void 0 : j[E]) != null ? Je : 0, Ge = ge ? le : rt - R[U] - x[U] - st + B.altAxis, lt = ge ? rt + R[U] + x[U] - st - B.altAxis : ae, qt = p && ge ? mg(Ge, rt, lt) : hn(p ? Ge : le, rt, p ? lt : ae);
11069
+ F[E] = qt, H[E] = qt - rt;
11070
11070
  }
11071
11071
  t.modifiersData[o] = H;
11072
11072
  }
@@ -11690,7 +11690,7 @@ const Al = /* @__PURE__ */ ee($h, [["render", kh]]), Mh = k({
11690
11690
  },
11691
11691
  transfer: {
11692
11692
  type: Boolean,
11693
- default: !1
11693
+ default: !0
11694
11694
  },
11695
11695
  placement: {
11696
11696
  type: String,
@@ -13315,7 +13315,7 @@ function Xb(e, t) {
13315
13315
  ...t
13316
13316
  }), n;
13317
13317
  }
13318
- const Yb = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Zb = Xb, Jb = () => Xe.toasts, Qb = () => Xe.getActiveToasts(), qt = Object.assign(Zb, {
13318
+ const Yb = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Zb = Xb, Jb = () => Xe.toasts, Qb = () => Xe.getActiveToasts(), _t = Object.assign(Zb, {
13319
13319
  success: Xe.success,
13320
13320
  info: Xe.info,
13321
13321
  warning: Xe.warning,
@@ -13545,7 +13545,7 @@ var u1 = /* @__PURE__ */ k({
13545
13545
  u.value = !1, a.value = null, K.value = null;
13546
13546
  }
13547
13547
  return (P, fe) => {
13548
- var de, Y, te, se, be, Ue, Fe, ze, Je, je, Nt, rt, U, le, ae, ge, st, Ge, lt, Tt, fn, ja, La, Na, Va, xa, za;
13548
+ var de, Y, te, se, be, Ue, Fe, ze, Je, je, Nt, rt, U, le, ae, ge, st, Ge, lt, qt, fn, ja, La, Na, Va, xa, za;
13549
13549
  return g(), A("li", {
13550
13550
  tabindex: "0",
13551
13551
  ref_key: "toastRef",
@@ -13610,7 +13610,7 @@ var u1 = /* @__PURE__ */ k({
13610
13610
  }, [X.value ? (g(), q(et(P.toast.title), ye(J({ key: 0 }, P.toast.componentProps)), null, 16)) : (g(), A(ue, { key: 1 }, [Se(ie(P.toast.title), 1)], 64))], 2), P.toast.description ? (g(), A("div", {
13611
13611
  key: 0,
13612
13612
  "data-description": "",
13613
- class: T(v(Bt)(P.descriptionClass, E.value, (Tt = P.classes) == null ? void 0 : Tt.description, (fn = P.toast.classes) == null ? void 0 : fn.description))
13613
+ class: T(v(Bt)(P.descriptionClass, E.value, (qt = P.classes) == null ? void 0 : qt.description, (fn = P.toast.classes) == null ? void 0 : fn.description))
13614
13614
  }, [re.value ? (g(), q(et(P.toast.description), ye(J({ key: 0 }, P.toast.componentProps)), null, 16)) : (g(), A(ue, { key: 1 }, [Se(ie(P.toast.description), 1)], 64))], 2)) : G("v-if", !0)], 2),
13615
13615
  P.toast.cancel ? (g(), A("button", {
13616
13616
  key: 1,
@@ -14098,8 +14098,8 @@ const x1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14098
14098
  function a(i) {
14099
14099
  return i === 0 ? 1 / 0 : i ?? e.timeout;
14100
14100
  }
14101
- function r(i) {
14102
- const d = {
14101
+ function r(i, d = !1) {
14102
+ const c = {
14103
14103
  id: i.id,
14104
14104
  duration: a(i.timeout),
14105
14105
  closeButton: i.closeButton ?? i.closable,
@@ -14108,24 +14108,24 @@ const x1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14108
14108
  onDismiss: () => s(i.id, !0),
14109
14109
  onAutoClose: () => s(i.id, !0)
14110
14110
  };
14111
- switch (i.type) {
14111
+ switch (d && _t.dismiss(i.id), i.type) {
14112
14112
  case "success":
14113
- qt.success(i.content, d);
14113
+ _t.success(i.content, c);
14114
14114
  break;
14115
14115
  case "info":
14116
- qt.info(i.content, d);
14116
+ _t.info(i.content, c);
14117
14117
  break;
14118
14118
  case "warning":
14119
- qt.warning(i.content, d);
14119
+ _t.warning(i.content, c);
14120
14120
  break;
14121
14121
  case "error":
14122
- qt.error(i.content, d);
14122
+ _t.error(i.content, c);
14123
14123
  break;
14124
14124
  case "loading":
14125
- qt.loading(i.content, d);
14125
+ _t.loading(i.content, c);
14126
14126
  break;
14127
14127
  default:
14128
- qt(i.content, d);
14128
+ _t(i.content, c);
14129
14129
  break;
14130
14130
  }
14131
14131
  }
@@ -14145,12 +14145,12 @@ const x1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14145
14145
  type: d.type,
14146
14146
  onClose: d.onClose,
14147
14147
  destroy: () => {
14148
- s(c, !1), qt.dismiss(c);
14148
+ s(c, !1), _t.dismiss(c);
14149
14149
  }
14150
14150
  }), p = Q(
14151
14151
  () => [f.content, f.type, f.timeout, f.closable, f.closeButton, f.richColors, n.value],
14152
- () => {
14153
- r(f);
14152
+ (m, h) => {
14153
+ r(f, !!h);
14154
14154
  },
14155
14155
  { immediate: !0 }
14156
14156
  );
@@ -14159,7 +14159,7 @@ const x1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14159
14159
  function u() {
14160
14160
  for (const [i, d] of t.entries())
14161
14161
  d.closed = !0, d.stop();
14162
- t.clear(), qt.dismiss();
14162
+ t.clear(), _t.dismiss();
14163
14163
  }
14164
14164
  return {
14165
14165
  sonnerPosition: n,
@@ -15400,8 +15400,8 @@ const I0 = k({
15400
15400
  if (ge === -1)
15401
15401
  return null;
15402
15402
  const st = (lt) => {
15403
- var Tt, fn;
15404
- return ((Tt = o.value) == null ? void 0 : Tt.contains(lt)) || (le == null ? void 0 : le.contains(lt)) || ((fn = s.value) == null ? void 0 : fn.contains(lt));
15403
+ var qt, fn;
15404
+ return ((qt = o.value) == null ? void 0 : qt.contains(lt)) || (le == null ? void 0 : le.contains(lt)) || ((fn = s.value) == null ? void 0 : fn.contains(lt));
15405
15405
  };
15406
15406
  let Ge = U ? ge - 1 : ge + 1;
15407
15407
  for (; Ge >= 0 && Ge < ae.length; ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammodlr/ui-kit",
3
- "version": "3.0.0-beta.10",
3
+ "version": "3.0.0-beta.11",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -147,7 +147,7 @@ export default defineComponent({
147
147
  },
148
148
  transfer: {
149
149
  type: Boolean,
150
- default: false
150
+ default: true
151
151
  },
152
152
  placement: {
153
153
  type: String as PropType<Placement>,
@@ -100,7 +100,7 @@ export default defineComponent({
100
100
  return timeout ?? props.timeout;
101
101
  }
102
102
 
103
- function syncToast(message: PrivateMessageReactive) {
103
+ function syncToast(message: PrivateMessageReactive, isUpdate = false) {
104
104
  const options: ExternalToast = {
105
105
  id: message.id,
106
106
  duration: normalizeDuration(message.timeout),
@@ -111,6 +111,10 @@ export default defineComponent({
111
111
  onAutoClose: () => closeMessage(message.id, true),
112
112
  };
113
113
 
114
+ if (isUpdate) {
115
+ toast.dismiss(message.id);
116
+ }
117
+
114
118
  switch (message.type) {
115
119
  case 'success':
116
120
  toast.success(message.content, options);
@@ -171,8 +175,8 @@ export default defineComponent({
171
175
 
172
176
  const stop = watch(
173
177
  () => [message.content, message.type, message.timeout, message.closable, message.closeButton, message.richColors, sonnerPosition.value],
174
- () => {
175
- syncToast(message);
178
+ (newVal, oldVal) => {
179
+ syncToast(message, !!oldVal);
176
180
  },
177
181
  { immediate: true }
178
182
  );