@m3ui-vue/m3ui-vue 0.6.2 → 0.6.4

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/dist/m3ui.js CHANGED
@@ -9859,24 +9859,51 @@ void main() {
9859
9859
  return e.length <= 28 ? e : [];
9860
9860
  });
9861
9861
  function K(e) {
9862
- return `calc(${re(e)} - ${D.value}px)`;
9862
+ return `calc(${fe(e)} - ${D.value}px)`;
9863
9863
  }
9864
9864
  function J(e) {
9865
- return `calc(100% - ${re(e)} - ${D.value}px)`;
9865
+ return `calc(100% - ${fe(e)} - ${D.value}px)`;
9866
+ }
9867
+ function Y() {
9868
+ return `calc(${fe(d.value)} - ${D.value}px)`;
9869
+ }
9870
+ function X() {
9871
+ return `calc(${fe(d.value)} + ${D.value}px)`;
9866
9872
  }
9867
- let Y = v(() => w.value.radius), X = v(() => Math.max(2, Y.value / 4));
9868
9873
  function ee() {
9869
- return s.value ? `${X.value}px ${X.value}px ${Y.value}px ${Y.value}px` : `${Y.value}px ${X.value}px ${X.value}px ${Y.value}px`;
9874
+ return `calc(${fe(f.value)} - ${fe(d.value)} - ${D.value * 2}px)`;
9870
9875
  }
9871
9876
  function te() {
9872
- return s.value ? `${Y.value}px ${Y.value}px ${X.value}px ${X.value}px` : `${X.value}px ${Y.value}px ${Y.value}px ${X.value}px`;
9877
+ return `calc(100% - ${fe(f.value)} - ${D.value}px)`;
9873
9878
  }
9874
- let ne = v(() => o.value === !1), Z = v(() => ne.value ? "75ms ease" : "0s");
9875
- function re(e) {
9879
+ function ne() {
9880
+ return d.value >= p.value ? `${p.value}%` : `calc(${fe(d.value)} + ${D.value}px)`;
9881
+ }
9882
+ function Z() {
9883
+ return d.value >= p.value ? `calc(${fe(d.value)} - ${p.value}% - ${D.value}px)` : `calc(${p.value}% - ${fe(d.value)} - ${D.value}px)`;
9884
+ }
9885
+ function re() {
9886
+ return d.value >= p.value ? `calc(100% - ${fe(d.value)} - ${D.value}px)` : `calc(100% - ${p.value}% - ${D.value}px)`;
9887
+ }
9888
+ function ie() {
9889
+ return d.value <= p.value ? `calc(${fe(d.value)} - ${D.value}px)` : `calc(${p.value}% - ${D.value}px)`;
9890
+ }
9891
+ let ae = v(() => w.value.radius), $ = v(() => Math.max(2, ae.value / 4)), oe = v(() => ae.value * 1.3);
9892
+ function se() {
9893
+ return `${$.value}px`;
9894
+ }
9895
+ function ce() {
9896
+ return s.value ? `${$.value}px ${$.value}px ${oe.value}px ${oe.value}px` : `${oe.value}px ${$.value}px ${$.value}px ${oe.value}px`;
9897
+ }
9898
+ function le() {
9899
+ return s.value ? `${oe.value}px ${oe.value}px ${$.value}px ${$.value}px` : `${$.value}px ${oe.value}px ${oe.value}px ${$.value}px`;
9900
+ }
9901
+ let ue = v(() => o.value === !1), de = v(() => ue.value ? "75ms ease" : "0s");
9902
+ function fe(e) {
9876
9903
  let t = w.value.thumbInset;
9877
9904
  return `clamp(${t}px, ${e}%, calc(100% - ${t}px))`;
9878
9905
  }
9879
- function ie(e) {
9906
+ function pe(e) {
9880
9907
  let t = s.value ? w.value.thumbH : w.value.thumbW, n = s.value ? w.value.thumbW : w.value.thumbH, r = Math.min(t, n) / 2, i = o.value !== !1, a = {
9881
9908
  position: "absolute",
9882
9909
  width: `${t}px`,
@@ -9884,35 +9911,35 @@ void main() {
9884
9911
  borderRadius: `${r}px`,
9885
9912
  backgroundColor: j.value.active,
9886
9913
  zIndex: "2",
9887
- transition: ne.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9914
+ transition: ue.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9888
9915
  }, c = i ? 1.08 : 1, l = i ? .6 : 1;
9889
- return s.value ? (a.left = "50%", a.bottom = re(e), a.transform = `translateX(-50%) translateY(50%) scaleX(${c}) scaleY(${l})`) : (a.left = re(e), a.top = "50%", a.transform = `translateX(-50%) translateY(-50%) scaleY(${c}) scaleX(${l})`), a;
9916
+ return s.value ? (a.left = "50%", a.bottom = fe(e), a.transform = `translateX(-50%) translateY(50%) scaleX(${c}) scaleY(${l})`) : (a.left = fe(e), a.top = "50%", a.transform = `translateX(-50%) translateY(-50%) scaleY(${c}) scaleX(${l})`), a;
9890
9917
  }
9891
- function ae(e) {
9918
+ function me(e) {
9892
9919
  let t = o.value === !1 ? 1 : 1.15, n = {
9893
9920
  position: "absolute",
9894
9921
  color: j.value.active,
9895
9922
  zIndex: "2",
9896
- transition: ne.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9923
+ transition: ue.value ? "left 75ms ease, bottom 75ms ease, transform 80ms ease" : "transform 80ms ease"
9897
9924
  };
9898
- return s.value ? (n.left = "50%", n.bottom = re(e), n.transform = `translateX(-50%) translateY(50%) scale(${t})`) : (n.left = re(e), n.top = "50%", n.transform = `translateX(-50%) translateY(-50%) scale(${t})`), n;
9925
+ return s.value ? (n.left = "50%", n.bottom = fe(e), n.transform = `translateX(-50%) translateY(50%) scale(${t})`) : (n.left = fe(e), n.top = "50%", n.transform = `translateX(-50%) translateY(-50%) scale(${t})`), n;
9899
9926
  }
9900
- function $(e) {
9927
+ function he(e) {
9901
9928
  let t = w.value.track / 2 + 36, n = w.value.track / 2 + 40;
9902
9929
  return s.value ? {
9903
9930
  left: `calc(50% - ${n}px)`,
9904
- bottom: re(e),
9931
+ bottom: fe(e),
9905
9932
  transform: "translateY(50%)",
9906
- transition: ne.value ? "bottom " + Z.value : "none"
9933
+ transition: ue.value ? "bottom " + de.value : "none"
9907
9934
  } : {
9908
- left: re(e),
9935
+ left: fe(e),
9909
9936
  top: `calc(50% - ${t}px)`,
9910
9937
  transform: "translateX(-50%)",
9911
- transition: ne.value ? "left " + Z.value : "none"
9938
+ transition: ue.value ? "left " + de.value : "none"
9912
9939
  };
9913
9940
  }
9914
- let oe = v(() => c.value ? `${l.value.lo} – ${l.value.hi}` : String(n.modelValue)), se = v(() => c.value && typeof o.value == "number" ? n.modelValue[o.value] : n.modelValue), ce = v(() => c.value && typeof o.value == "number" ? u(n.modelValue[o.value]) : d.value);
9915
- return (t, n) => (R(), S("div", { class: N(["flex select-none", s.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [e.label || e.showValue ? (R(), S("div", Sf, [e.label ? (R(), S("span", Cf, q(e.label), 1)) : x("", !0), e.showValue ? (R(), S("span", wf, q(oe.value), 1)) : x("", !0)])) : x("", !0), C("div", { class: N(["flex items-center", s.value ? "flex-1 flex-col" : ""]) }, [C("div", {
9941
+ let ge = v(() => c.value ? `${l.value.lo} – ${l.value.hi}` : String(n.modelValue)), _e = v(() => c.value && typeof o.value == "number" ? n.modelValue[o.value] : n.modelValue), ve = v(() => c.value && typeof o.value == "number" ? u(n.modelValue[o.value]) : d.value);
9942
+ return (t, n) => (R(), S("div", { class: N(["flex select-none", s.value ? "h-full flex-col items-center" : "flex-col gap-1"]) }, [e.label || e.showValue ? (R(), S("div", Sf, [e.label ? (R(), S("span", Cf, q(e.label), 1)) : x("", !0), e.showValue ? (R(), S("span", wf, q(ge.value), 1)) : x("", !0)])) : x("", !0), C("div", { class: N(["flex items-center", s.value ? "flex-1 flex-col" : ""]) }, [C("div", {
9916
9943
  ref_key: "trackEl",
9917
9944
  ref: a,
9918
9945
  role: "slider",
@@ -9942,14 +9969,14 @@ void main() {
9942
9969
  bottom: "0",
9943
9970
  width: `${w.value.track}px`,
9944
9971
  transform: "translateX(-50%)",
9945
- borderRadius: `${Y.value}px`
9972
+ borderRadius: `${oe.value}px`
9946
9973
  } : {
9947
9974
  top: "50%",
9948
9975
  left: "0",
9949
9976
  right: "0",
9950
9977
  height: `${w.value.track}px`,
9951
9978
  transform: "translateY(-50%)",
9952
- borderRadius: `${Y.value}px`
9979
+ borderRadius: `${oe.value}px`
9953
9980
  })
9954
9981
  }, [
9955
9982
  e.variant === "standard" ? (R(), S(m, { key: 0 }, [C("div", {
@@ -9966,9 +9993,9 @@ void main() {
9966
9993
  left: 0,
9967
9994
  width: K(d.value)
9968
9995
  },
9969
- borderRadius: ee(),
9996
+ borderRadius: ce(),
9970
9997
  backgroundColor: A.value.active,
9971
- transition: `all ${Z.value}`
9998
+ transition: `all ${de.value}`
9972
9999
  })
9973
10000
  }, null, 4), C("div", {
9974
10001
  class: "absolute",
@@ -9984,38 +10011,28 @@ void main() {
9984
10011
  right: 0,
9985
10012
  width: J(d.value)
9986
10013
  },
9987
- borderRadius: te(),
10014
+ borderRadius: le(),
9988
10015
  backgroundColor: A.value.inactive,
9989
- transition: `all ${Z.value}`
10016
+ transition: `all ${de.value}`
9990
10017
  })
9991
10018
  }, null, 4)], 64)) : e.variant === "centered" ? (R(), S(m, { key: 1 }, [
9992
10019
  C("div", {
9993
10020
  class: "absolute",
9994
10021
  style: P({
9995
- ...s.value ? d.value >= p.value ? {
10022
+ ...s.value ? {
9996
10023
  left: 0,
9997
10024
  right: 0,
9998
- bottom: `${p.value}%`,
9999
- height: `calc(${d.value - p.value}% - ${D.value}px)`
10025
+ bottom: ne(),
10026
+ height: Z()
10000
10027
  } : {
10001
- left: 0,
10002
- right: 0,
10003
- bottom: `calc(${d.value}% + ${D.value}px)`,
10004
- height: `calc(${p.value - d.value}% - ${D.value}px)`
10005
- } : d.value >= p.value ? {
10006
10028
  top: 0,
10007
10029
  bottom: 0,
10008
- left: `${p.value}%`,
10009
- width: `calc(${d.value - p.value}% - ${D.value}px)`
10010
- } : {
10011
- top: 0,
10012
- bottom: 0,
10013
- left: `calc(${d.value}% + ${D.value}px)`,
10014
- width: `calc(${p.value - d.value}% - ${D.value}px)`
10030
+ left: ne(),
10031
+ width: Z()
10015
10032
  },
10016
- borderRadius: `${Y.value}px`,
10033
+ borderRadius: se(),
10017
10034
  backgroundColor: A.value.active,
10018
- transition: `all ${Z.value}`
10035
+ transition: `all ${de.value}`
10019
10036
  })
10020
10037
  }, null, 4),
10021
10038
  C("div", {
@@ -10025,16 +10042,16 @@ void main() {
10025
10042
  left: 0,
10026
10043
  right: 0,
10027
10044
  top: 0,
10028
- height: `calc(${100 - Math.max(d.value, p.value)}% - ${D.value}px)`
10045
+ height: re()
10029
10046
  } : {
10030
10047
  top: 0,
10031
10048
  bottom: 0,
10032
10049
  right: 0,
10033
- width: `calc(${100 - Math.max(d.value, p.value)}% - ${D.value}px)`
10050
+ width: re()
10034
10051
  },
10035
- borderRadius: `${Y.value}px`,
10052
+ borderRadius: le(),
10036
10053
  backgroundColor: A.value.inactive,
10037
- transition: `all ${Z.value}`
10054
+ transition: `all ${de.value}`
10038
10055
  })
10039
10056
  }, null, 4),
10040
10057
  C("div", {
@@ -10044,16 +10061,16 @@ void main() {
10044
10061
  left: 0,
10045
10062
  right: 0,
10046
10063
  bottom: 0,
10047
- height: `calc(${Math.min(d.value, p.value)}% - ${D.value}px)`
10064
+ height: ie()
10048
10065
  } : {
10049
10066
  top: 0,
10050
10067
  bottom: 0,
10051
10068
  left: 0,
10052
- width: `calc(${Math.min(d.value, p.value)}% - ${D.value}px)`
10069
+ width: ie()
10053
10070
  },
10054
- borderRadius: `${Y.value}px`,
10071
+ borderRadius: ce(),
10055
10072
  backgroundColor: A.value.inactive,
10056
- transition: `all ${Z.value}`
10073
+ transition: `all ${de.value}`
10057
10074
  })
10058
10075
  }, null, 4)
10059
10076
  ], 64)) : e.variant === "range" ? (R(), S(m, { key: 2 }, [
@@ -10064,16 +10081,16 @@ void main() {
10064
10081
  left: 0,
10065
10082
  right: 0,
10066
10083
  bottom: 0,
10067
- height: `calc(${d.value}% - ${D.value}px)`
10084
+ height: Y()
10068
10085
  } : {
10069
10086
  top: 0,
10070
10087
  bottom: 0,
10071
10088
  left: 0,
10072
- width: `calc(${d.value}% - ${D.value}px)`
10089
+ width: Y()
10073
10090
  },
10074
- borderRadius: `${Y.value}px`,
10091
+ borderRadius: ce(),
10075
10092
  backgroundColor: A.value.inactive,
10076
- transition: `all ${Z.value}`
10093
+ transition: `all ${de.value}`
10077
10094
  })
10078
10095
  }, null, 4),
10079
10096
  C("div", {
@@ -10082,17 +10099,17 @@ void main() {
10082
10099
  ...s.value ? {
10083
10100
  left: 0,
10084
10101
  right: 0,
10085
- bottom: `calc(${d.value}% + ${D.value}px)`,
10086
- height: `calc(${f.value - d.value}% - ${D.value * 2}px)`
10102
+ bottom: X(),
10103
+ height: ee()
10087
10104
  } : {
10088
10105
  top: 0,
10089
10106
  bottom: 0,
10090
- left: `calc(${d.value}% + ${D.value}px)`,
10091
- width: `calc(${f.value - d.value}% - ${D.value * 2}px)`
10107
+ left: X(),
10108
+ width: ee()
10092
10109
  },
10093
- borderRadius: `${Y.value}px`,
10110
+ borderRadius: se(),
10094
10111
  backgroundColor: A.value.active,
10095
- transition: `all ${Z.value}`
10112
+ transition: `all ${de.value}`
10096
10113
  })
10097
10114
  }, null, 4),
10098
10115
  C("div", {
@@ -10102,16 +10119,16 @@ void main() {
10102
10119
  left: 0,
10103
10120
  right: 0,
10104
10121
  top: 0,
10105
- height: `calc(${100 - f.value}% - ${D.value}px)`
10122
+ height: te()
10106
10123
  } : {
10107
10124
  top: 0,
10108
10125
  bottom: 0,
10109
10126
  right: 0,
10110
- width: `calc(${100 - f.value}% - ${D.value}px)`
10127
+ width: te()
10111
10128
  },
10112
- borderRadius: `${Y.value}px`,
10129
+ borderRadius: le(),
10113
10130
  backgroundColor: A.value.inactive,
10114
- transition: `all ${Z.value}`
10131
+ transition: `all ${de.value}`
10115
10132
  })
10116
10133
  }, null, 4)
10117
10134
  ], 64)) : x("", !0),
@@ -10201,7 +10218,7 @@ void main() {
10201
10218
  name: e.thumbIcon,
10202
10219
  size: w.value.thumbIconSize,
10203
10220
  class: "pointer-events-none",
10204
- style: P(ae(d.value))
10221
+ style: P(me(d.value))
10205
10222
  }, null, 8, [
10206
10223
  "name",
10207
10224
  "size",
@@ -10211,18 +10228,18 @@ void main() {
10211
10228
  name: e.thumbIcon,
10212
10229
  size: w.value.thumbIconSize,
10213
10230
  class: "pointer-events-none",
10214
- style: P(ae(f.value))
10231
+ style: P(me(f.value))
10215
10232
  }, null, 8, [
10216
10233
  "name",
10217
10234
  "size",
10218
10235
  "style"
10219
10236
  ])) : x("", !0)], 64)) : (R(), S(m, { key: 1 }, [C("div", {
10220
10237
  class: "pointer-events-none",
10221
- style: P(ie(d.value))
10238
+ style: P(pe(d.value))
10222
10239
  }, null, 4), c.value ? (R(), S("div", {
10223
10240
  key: 0,
10224
10241
  class: "pointer-events-none",
10225
- style: P(ie(f.value))
10242
+ style: P(pe(f.value))
10226
10243
  }, null, 4)) : x("", !0)], 64)),
10227
10244
  E(g, {
10228
10245
  "enter-active-class": "transition-opacity duration-100",
@@ -10233,8 +10250,8 @@ void main() {
10233
10250
  default: Q(() => [e.showTooltip && o.value !== !1 ? (R(), S("div", {
10234
10251
  key: 0,
10235
10252
  class: "pointer-events-none absolute z-10 flex h-7 min-w-7 items-center justify-center rounded-full bg-inverse-surface px-2 text-label-small tabular-nums text-inverse-on-surface",
10236
- style: P($(ce.value))
10237
- }, q(se.value), 5)) : x("", !0)]),
10253
+ style: P(he(ve.value))
10254
+ }, q(_e.value), 5)) : x("", !0)]),
10238
10255
  _: 1
10239
10256
  })
10240
10257
  ], 46, Tf)], 2)], 2));
@@ -13043,7 +13060,7 @@ var Af = /*#__PURE__*/ p(Df, [["render", kf]]), jf = ["disabled"], Mf = ["disabl
13043
13060
  C("div", gg, [C("span", _g, [T(q(d.value.length.toLocaleString()) + " filas ", 1), p.value.end - p.value.start < d.value.length ? (R(), S(m, { key: 0 }, [T(" · mostrando " + q(p.value.start + 1) + "–" + q(p.value.end), 1)], 64)) : x("", !0)])])
13044
13061
  ]));
13045
13062
  }
13046
- }), yg = { class: "text-title-small font-medium text-on-surface truncate flex-1" }, bg = { class: "flex-1 overflow-auto" }, xg = ["onMousedown", "onTouchstart"], Sg = /* @__PURE__ */ D({
13063
+ }), yg = { class: "text-title-small font-medium text-on-surface truncate flex-1" }, bg = { class: "flex-1 overflow-auto" }, xg = ["onMousedown", "onTouchstart"], Sg = 10, Cg = /* @__PURE__ */ D({
13047
13064
  __name: "MWindow",
13048
13065
  props: {
13049
13066
  modelValue: { type: Boolean },
@@ -13084,17 +13101,17 @@ var Af = /*#__PURE__*/ p(Df, [["render", kf]]), jf = ["disabled"], Mf = ["disabl
13084
13101
  "minimize"
13085
13102
  ],
13086
13103
  setup(e, { emit: t }) {
13087
- let n = e, i = t, a = V(n.x), o = V(n.y), s = V(parseInt(n.width) || 400), c = V(parseInt(n.height) || 300), l = V(!1), u = V(100), d = 100, f = V(null), p = !1, h = 0, g = 0, _ = 0, y = 0, w = !1, T = "se", D = 0, O = 0, k = 0, A = 0, j = 0, F = 0, z = v(() => ({
13104
+ let n = e, i = t, a = V(n.x), o = V(n.y), s = V(parseInt(n.width) || 400), c = V(parseInt(n.height) || 300), l = V(!1), u = V(Sg), d = V(null), f = !1, p = 0, h = 0, g = 0, _ = 0, y = !1, w = "se", T = 0, D = 0, O = 0, k = 0, A = 0, j = 0, F = v(() => ({
13088
13105
  left: `${a.value}px`,
13089
13106
  top: `${o.value}px`,
13090
13107
  width: `${s.value}px`,
13091
13108
  height: l.value ? "auto" : `${c.value}px`,
13092
13109
  zIndex: u.value
13093
13110
  }));
13094
- function B() {
13095
- d++, u.value = d;
13111
+ function z() {
13112
+ Sg++, u.value = Sg;
13096
13113
  }
13097
- function W(e) {
13114
+ function B(e) {
13098
13115
  if ("touches" in e) {
13099
13116
  let t = e.touches[0] ?? e.changedTouches[0];
13100
13117
  return {
@@ -13107,73 +13124,73 @@ var Af = /*#__PURE__*/ p(Df, [["render", kf]]), jf = ["disabled"], Mf = ["disabl
13107
13124
  y: e.clientY
13108
13125
  };
13109
13126
  }
13110
- function G() {
13111
- document.addEventListener("mousemove", X), document.addEventListener("mouseup", ee), document.addEventListener("touchmove", X, { passive: !1 }), document.addEventListener("touchend", ee);
13127
+ function W() {
13128
+ document.addEventListener("mousemove", Y), document.addEventListener("mouseup", X), document.addEventListener("touchmove", Y, { passive: !1 }), document.addEventListener("touchend", X);
13112
13129
  }
13113
- function K() {
13114
- document.removeEventListener("mousemove", X), document.removeEventListener("mouseup", ee), document.removeEventListener("touchmove", X), document.removeEventListener("touchend", ee);
13130
+ function G() {
13131
+ document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", X), document.removeEventListener("touchmove", Y), document.removeEventListener("touchend", X);
13115
13132
  }
13116
- function J(e) {
13133
+ function K(e) {
13117
13134
  if (!n.draggable || e.target.closest("button")) return;
13118
13135
  e.preventDefault();
13119
- let { x: t, y: r } = W(e);
13120
- p = !0, h = t, g = r, _ = a.value, y = o.value, B(), G();
13136
+ let { x: t, y: r } = B(e);
13137
+ f = !0, p = t, h = r, g = a.value, _ = o.value, z(), W();
13121
13138
  }
13122
- function Y(e, t) {
13139
+ function J(e, t) {
13123
13140
  if (!n.resizable) return;
13124
13141
  e.preventDefault(), e.stopPropagation();
13125
- let { x: r, y: i } = W(e);
13126
- w = !0, T = t, D = r, O = i, k = s.value, A = c.value, j = a.value, F = o.value, B(), G();
13142
+ let { x: r, y: i } = B(e);
13143
+ y = !0, w = t, T = r, D = i, O = s.value, k = c.value, A = a.value, j = o.value, z(), W();
13127
13144
  }
13128
- function X(e) {
13145
+ function Y(e) {
13129
13146
  e.preventDefault();
13130
- let { x: t, y: r } = W(e);
13131
- if (p) {
13132
- let e = t - h, n = r - g, i = f.value?.parentElement, u = i ? i.clientWidth - s.value : Infinity, d = i ? i.clientHeight - (l.value ? 40 : c.value) : Infinity;
13133
- a.value = Math.max(0, Math.min(u, _ + e)), o.value = Math.max(0, Math.min(d, y + n));
13147
+ let { x: t, y: r } = B(e);
13148
+ if (f) {
13149
+ let e = t - p, n = r - h, i = d.value?.parentElement, u = i ? i.clientWidth - s.value : Infinity, f = i ? i.clientHeight - (l.value ? 40 : c.value) : Infinity;
13150
+ a.value = Math.max(0, Math.min(u, g + e)), o.value = Math.max(0, Math.min(f, _ + n));
13134
13151
  }
13135
- if (w) {
13136
- let e = t - D, i = r - O, o = T, l = f.value?.parentElement, u = l ? l.clientWidth : Infinity, d = l ? l.clientHeight : Infinity, p = (e) => Math.min(n.maxWidth ?? Infinity, Math.max(n.minWidth, e)), m = (e) => Math.min(n.maxHeight ?? Infinity, Math.max(n.minHeight, e));
13137
- if (o.includes("e") && (s.value = Math.min(u - j, p(k + e))), o.includes("w")) {
13138
- let t = Math.min(j + k, p(k - e));
13139
- a.value = Math.max(0, j + (k - t)), s.value = t;
13152
+ if (y) {
13153
+ let e = t - T, i = r - D, o = w, l = d.value?.parentElement, u = l ? l.clientWidth : Infinity, f = l ? l.clientHeight : Infinity, p = (e) => Math.min(n.maxWidth ?? Infinity, Math.max(n.minWidth, e)), m = (e) => Math.min(n.maxHeight ?? Infinity, Math.max(n.minHeight, e));
13154
+ if (o.includes("e") && (s.value = Math.min(u - A, p(O + e))), o.includes("w")) {
13155
+ let t = Math.min(A + O, p(O - e));
13156
+ a.value = Math.max(0, A + (O - t)), s.value = t;
13140
13157
  }
13141
- o.includes("s") && (c.value = Math.min(d - F, m(A + i)));
13158
+ o.includes("s") && (c.value = Math.min(f - j, m(k + i)));
13142
13159
  }
13143
13160
  }
13161
+ function X() {
13162
+ f = !1, y = !1, G();
13163
+ }
13144
13164
  function ee() {
13145
- p = !1, w = !1, K();
13165
+ i("update:modelValue", !1), i("close"), n.resetPosition && (a.value = n.x, o.value = n.y, s.value = parseInt(n.width) || 400, c.value = parseInt(n.height) || 300, l.value = !1);
13146
13166
  }
13147
13167
  function te() {
13148
- i("update:modelValue", !1), i("close"), n.resetPosition && (a.value = n.x, o.value = n.y, s.value = parseInt(n.width) || 400, c.value = parseInt(n.height) || 300, l.value = !1);
13168
+ l.value = !l.value, i("minimize");
13149
13169
  }
13150
13170
  function re() {
13151
- l.value = !l.value, i("minimize");
13171
+ z();
13152
13172
  }
13153
13173
  function Q() {
13154
- B();
13155
- }
13156
- function ae() {
13157
- let e = f.value?.parentElement;
13174
+ let e = d.value?.parentElement;
13158
13175
  if (!e) return;
13159
13176
  let t = e.clientWidth, r = e.clientHeight;
13160
13177
  s.value > t && (s.value = Math.max(n.minWidth, t)), c.value > r && (c.value = Math.max(n.minHeight, r)), a.value + s.value > t && (a.value = Math.max(0, t - s.value)), o.value + c.value > r && (o.value = Math.max(0, r - c.value));
13161
13178
  }
13162
- let $ = null;
13179
+ let ae = null;
13163
13180
  I(() => {
13164
- ae();
13165
- let e = f.value?.parentElement;
13166
- e && ($ = new ResizeObserver(ae), $.observe(e));
13181
+ Q();
13182
+ let e = d.value?.parentElement;
13183
+ e && (ae = new ResizeObserver(Q), ae.observe(e));
13167
13184
  }), Z(() => n.x, (e) => {
13168
13185
  a.value = e;
13169
13186
  }), Z(() => n.y, (e) => {
13170
13187
  o.value = e;
13171
13188
  }), Z(() => n.modelValue, (e) => {
13172
- e && M(ae);
13189
+ e && M(Q);
13173
13190
  }), L(() => {
13174
- K(), $?.disconnect();
13191
+ G(), ae?.disconnect();
13175
13192
  });
13176
- let oe = [
13193
+ let $ = [
13177
13194
  {
13178
13195
  dir: "s",
13179
13196
  class: "bottom-0 left-[20px] right-[20px] h-[8px]",
@@ -13203,15 +13220,15 @@ var Af = /*#__PURE__*/ p(Df, [["render", kf]]), jf = ["disabled"], Mf = ["disabl
13203
13220
  return (t, n) => e.modelValue ? (R(), S("div", {
13204
13221
  key: 0,
13205
13222
  ref_key: "windowRef",
13206
- ref: f,
13223
+ ref: d,
13207
13224
  class: "absolute flex flex-col rounded-xl bg-surface shadow-elevation-3 overflow-hidden",
13208
- style: P(z.value),
13209
- onMousedown: Q
13225
+ style: P(F.value),
13226
+ onMousedown: re
13210
13227
  }, [
13211
13228
  C("div", {
13212
13229
  class: N(["flex items-center gap-2 px-4 h-10 bg-surface-container select-none shrink-0", { "cursor-move": e.draggable }]),
13213
- onMousedown: J,
13214
- onTouchstart: J
13230
+ onMousedown: K,
13231
+ onTouchstart: K
13215
13232
  }, [
13216
13233
  U(t.$slots, "header", {}, () => [e.icon ? (R(), b(r, {
13217
13234
  key: 0,
@@ -13223,7 +13240,7 @@ var Af = /*#__PURE__*/ p(Df, [["render", kf]]), jf = ["disabled"], Mf = ["disabl
13223
13240
  e.minimizable ? (R(), S("button", {
13224
13241
  key: 0,
13225
13242
  class: "text-on-surface-variant hover:bg-on-surface/8 rounded-full w-7 h-7 flex items-center justify-center transition-colors",
13226
- onClick: re
13243
+ onClick: te
13227
13244
  }, [E(r, {
13228
13245
  name: l.value ? "open_in_full" : "minimize",
13229
13246
  size: 16
@@ -13231,23 +13248,23 @@ var Af = /*#__PURE__*/ p(Df, [["render", kf]]), jf = ["disabled"], Mf = ["disabl
13231
13248
  e.closable ? (R(), S("button", {
13232
13249
  key: 1,
13233
13250
  class: "text-on-surface-variant hover:bg-error/12 hover:text-error rounded-full w-7 h-7 flex items-center justify-center transition-colors",
13234
- onClick: te
13251
+ onClick: ee
13235
13252
  }, [E(r, {
13236
13253
  name: "close",
13237
13254
  size: 16
13238
13255
  })])) : x("", !0)
13239
13256
  ], 34),
13240
13257
  ie(C("div", bg, [U(t.$slots, "default")], 512), [[ne, !l.value]]),
13241
- e.resizable && !l.value ? (R(), S(m, { key: 0 }, H(oe, (e) => C("div", {
13258
+ e.resizable && !l.value ? (R(), S(m, { key: 0 }, H($, (e) => C("div", {
13242
13259
  key: e.dir,
13243
13260
  class: N(["absolute", [e.class, e.cursor]]),
13244
- onMousedown: (t) => Y(t, e.dir),
13245
- onTouchstart: (t) => Y(t, e.dir)
13261
+ onMousedown: (t) => J(t, e.dir),
13262
+ onTouchstart: (t) => J(t, e.dir)
13246
13263
  }, null, 42, xg)), 64)) : x("", !0)
13247
13264
  ], 36)) : x("", !0);
13248
13265
  }
13249
13266
  });
13250
13267
  //#endregion
13251
- export { yt as MAbsolute, Tt as MAlert, Yt as MAppBar, $t as MAppLayout, en as MAspectRatio, Gt as MAutocomplete, tn as MAvatar, an as MBadge, gn as MBar, Sn as MBottomSheet, Cn as MBox, En as MBreadcrumbs, i as MButton, An as MButtonGroup, Hn as MCalendar, Yn as MCard, nr as MCarousel, rr as MCenter, or as MChatBubble, lr as MCheckbox, dr as MChip, Ku as MCircleProgressBar, Sr as MColorPicker, Pr as MColorPickerModal, Jr as MCommandPalette, Xr as MConfirmDialog, Zr as MContainer, Qr as MContextMenu, $r as MCopyButton, ki as MDataTable, Bi as MDatePicker, ea as MDatePickerModal, fa as MDateRangePicker, Oa as MDateRangePickerModal, o as MDialog, Ma as MDivider, Ra as MDragDropList, Ba as MEmoji, Ka as MEmojiButton, eo as MEmojiSelector, to as MEmptyState, co as MExpansionPanel, lo as MExportButton, ho as MFab, jo as MFileUpload, Mo as MFixed, Ro as MFlex, Lo as MFooter, zo as MFullscreen, Bo as MGrid, Ko as MHotkeys, r as MIcon, l as MIconButton, Xo as MInfiniteScroll, as as MJsonViewer, hs as MKanban, vs as MKbd, Os as MLightbox, ks as MList, Us as MListItem, Ws as MListSubheader, Js as MLoadingOverlay, oc as MMaskField, Ys as MMasonry, c as MMenu, $s as MMenuDivider, f as MMenuItem, kc as MMultiAutocomplete, el as MMultiSelect, rl as MNavigationBar, Kl as MNavigationDrawer, Xl as MNavigationRail, dl as MNumberField, Ql as MOverlay, eu as MPageProgress, ni as MPagination, ru as MPasswordMeter, du as MPinInput, Du as MProgressBar, Zu as MRadio, ed as MRadioGroup, nd as MRating, od as MRelative, cd as MRelativeTime, ld as MResponsive, gd as MResult, Md as MScheduler, Nd as MScrollable, Rd as MSection, Vd as MSegmentedButton, of as MSelect, df as MShader, _f as MSideSheet, yf as MSignaturePad, xf as MSkeleton, Ef as MSlider, Se as MSnackbar, Af as MSpacer, s as MSpinner, Pf as MSplitButton, Ff as MSplitter, Qf as MSpotlightSearch, $f as MStack, cp as MStatCard, wp as MStepper, Tp as MSticky, Dp as MSubtitle, Ms as MSwitch, Yp as MTable, um as MTabs, rm as MTagInput, Ep as MText, u as MTextField, Pm as MTimePicker, Qm as MTimePickerModal, Sm as MTimeline, $m as MTitle, oh as MToolbar, rh as MTooltip, uh as MTopAppBar, vh as MTour, Vh as MTransferList, Zh as MTree, cg as MTreeTable, vg as MVirtualTable, Sg as MWindow, Ha as allEmojis, fe as createM3UI, e as defaultLocale, Va as emojiCategories, oe as palettes, Ua as randomEmoji, le as useColorPalette, d as useDebounce, He as useDevice, a as useFieldBg, t as useLocale, lt as useNotification, vt as usePageProgress, ge as useTheme, Le as useToast };
13268
+ export { yt as MAbsolute, Tt as MAlert, Yt as MAppBar, $t as MAppLayout, en as MAspectRatio, Gt as MAutocomplete, tn as MAvatar, an as MBadge, gn as MBar, Sn as MBottomSheet, Cn as MBox, En as MBreadcrumbs, i as MButton, An as MButtonGroup, Hn as MCalendar, Yn as MCard, nr as MCarousel, rr as MCenter, or as MChatBubble, lr as MCheckbox, dr as MChip, Ku as MCircleProgressBar, Sr as MColorPicker, Pr as MColorPickerModal, Jr as MCommandPalette, Xr as MConfirmDialog, Zr as MContainer, Qr as MContextMenu, $r as MCopyButton, ki as MDataTable, Bi as MDatePicker, ea as MDatePickerModal, fa as MDateRangePicker, Oa as MDateRangePickerModal, o as MDialog, Ma as MDivider, Ra as MDragDropList, Ba as MEmoji, Ka as MEmojiButton, eo as MEmojiSelector, to as MEmptyState, co as MExpansionPanel, lo as MExportButton, ho as MFab, jo as MFileUpload, Mo as MFixed, Ro as MFlex, Lo as MFooter, zo as MFullscreen, Bo as MGrid, Ko as MHotkeys, r as MIcon, l as MIconButton, Xo as MInfiniteScroll, as as MJsonViewer, hs as MKanban, vs as MKbd, Os as MLightbox, ks as MList, Us as MListItem, Ws as MListSubheader, Js as MLoadingOverlay, oc as MMaskField, Ys as MMasonry, c as MMenu, $s as MMenuDivider, f as MMenuItem, kc as MMultiAutocomplete, el as MMultiSelect, rl as MNavigationBar, Kl as MNavigationDrawer, Xl as MNavigationRail, dl as MNumberField, Ql as MOverlay, eu as MPageProgress, ni as MPagination, ru as MPasswordMeter, du as MPinInput, Du as MProgressBar, Zu as MRadio, ed as MRadioGroup, nd as MRating, od as MRelative, cd as MRelativeTime, ld as MResponsive, gd as MResult, Md as MScheduler, Nd as MScrollable, Rd as MSection, Vd as MSegmentedButton, of as MSelect, df as MShader, _f as MSideSheet, yf as MSignaturePad, xf as MSkeleton, Ef as MSlider, Se as MSnackbar, Af as MSpacer, s as MSpinner, Pf as MSplitButton, Ff as MSplitter, Qf as MSpotlightSearch, $f as MStack, cp as MStatCard, wp as MStepper, Tp as MSticky, Dp as MSubtitle, Ms as MSwitch, Yp as MTable, um as MTabs, rm as MTagInput, Ep as MText, u as MTextField, Pm as MTimePicker, Qm as MTimePickerModal, Sm as MTimeline, $m as MTitle, oh as MToolbar, rh as MTooltip, uh as MTopAppBar, vh as MTour, Vh as MTransferList, Zh as MTree, cg as MTreeTable, vg as MVirtualTable, Cg as MWindow, Ha as allEmojis, fe as createM3UI, e as defaultLocale, Va as emojiCategories, oe as palettes, Ua as randomEmoji, le as useColorPalette, d as useDebounce, He as useDevice, a as useFieldBg, t as useLocale, lt as useNotification, vt as usePageProgress, ge as useTheme, Le as useToast };
13252
13269
 
13253
13270
  //# sourceMappingURL=m3ui.js.map