@rocketui/vue 0.2.21 → 0.2.22

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.
@@ -7957,11 +7957,11 @@ const n5 = async (H, V, C) => {
7957
7957
  x: l,
7958
7958
  y: o
7959
7959
  } = G1(t, M, d), r = M, a = {}, u = 0;
7960
- for (let k = 0; k < e.length; k++) {
7960
+ for (let b = 0; b < e.length; b++) {
7961
7961
  const {
7962
- name: B,
7962
+ name: k,
7963
7963
  fn: y
7964
- } = e[k], {
7964
+ } = e[b], {
7965
7965
  x: P,
7966
7966
  y: v,
7967
7967
  data: R,
@@ -7982,8 +7982,8 @@ const n5 = async (H, V, C) => {
7982
7982
  });
7983
7983
  if (l = P ?? l, o = v ?? o, a = {
7984
7984
  ...a,
7985
- [B]: {
7986
- ...a[B],
7985
+ [k]: {
7986
+ ...a[k],
7987
7987
  ...R
7988
7988
  }
7989
7989
  }, F && u <= 50) {
@@ -7994,7 +7994,7 @@ const n5 = async (H, V, C) => {
7994
7994
  }) : F.rects), {
7995
7995
  x: l,
7996
7996
  y: o
7997
- } = G1(t, r, d)), k = -1;
7997
+ } = G1(t, r, d)), b = -1;
7998
7998
  continue;
7999
7999
  }
8000
8000
  }
@@ -8022,8 +8022,8 @@ async function k1(H, V) {
8022
8022
  elementContext: o = "floating",
8023
8023
  altBoundary: r = !1,
8024
8024
  padding: a = 0
8025
- } = t1(V, H), u = L2(a), B = e[r ? o === "floating" ? "reference" : "floating" : o], y = g1(await L.getClippingRect({
8026
- element: (C = await (L.isElement == null ? void 0 : L.isElement(B))) == null || C ? B : B.contextElement || await (L.getDocumentElement == null ? void 0 : L.getDocumentElement(e.floating)),
8025
+ } = t1(V, H), u = L2(a), k = e[r ? o === "floating" ? "reference" : "floating" : o], y = g1(await L.getClippingRect({
8026
+ element: (C = await (L.isElement == null ? void 0 : L.isElement(k))) == null || C ? k : k.contextElement || await (L.getDocumentElement == null ? void 0 : L.getDocumentElement(e.floating)),
8027
8027
  boundary: t,
8028
8028
  rootBoundary: l,
8029
8029
  strategy: d
@@ -8070,10 +8070,10 @@ const r5 = (H) => ({
8070
8070
  const o = L2(l), r = {
8071
8071
  x: C,
8072
8072
  y: M
8073
- }, a = _1(A), u = D1(a), k = await i.getDimensions(t), B = a === "y", y = B ? "top" : "left", P = B ? "bottom" : "right", v = B ? "clientHeight" : "clientWidth", R = L.reference[u] + L.reference[a] - r[a] - L.floating[u], F = r[a] - L.reference[a], z = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(t));
8073
+ }, a = _1(A), u = D1(a), b = await i.getDimensions(t), k = a === "y", y = k ? "top" : "left", P = k ? "bottom" : "right", v = k ? "clientHeight" : "clientWidth", R = L.reference[u] + L.reference[a] - r[a] - L.floating[u], F = r[a] - L.reference[a], z = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(t));
8074
8074
  let I = z ? z[v] : 0;
8075
8075
  (!I || !await (i.isElement == null ? void 0 : i.isElement(z))) && (I = e.floating[v] || L.floating[u]);
8076
- const O = R / 2 - F / 2, N = I / 2 - k[u] / 2 - 1, n = r1(o[y], N), h = r1(o[P], N), b = n, D = I - k[u] - h, s = I / 2 - k[u] / 2 + O, E = v1(b, s, D), $ = !d.arrow && u1(A) != null && s != E && L.reference[u] / 2 - (s < b ? n : h) - k[u] / 2 < 0, j = $ ? s < b ? s - b : s - D : 0;
8076
+ const O = R / 2 - F / 2, N = I / 2 - b[u] / 2 - 1, n = r1(o[y], N), h = r1(o[P], N), B = n, D = I - b[u] - h, s = I / 2 - b[u] / 2 + O, E = v1(B, s, D), $ = !d.arrow && u1(A) != null && s != E && L.reference[u] / 2 - (s < B ? n : h) - b[u] / 2 < 0, j = $ ? s < B ? s - B : s - D : 0;
8077
8077
  return {
8078
8078
  [a]: r[a] + j,
8079
8079
  data: {
@@ -8105,29 +8105,29 @@ const r5 = (H) => ({
8105
8105
  fallbackPlacements: r,
8106
8106
  fallbackStrategy: a = "bestFit",
8107
8107
  fallbackAxisSideDirection: u = "none",
8108
- flipAlignment: k = !0,
8109
- ...B
8108
+ flipAlignment: b = !0,
8109
+ ...k
8110
8110
  } = t1(H, V);
8111
8111
  if ((C = L.arrow) != null && C.alignmentOffset)
8112
8112
  return {};
8113
- const y = L1(A), P = L1(e) === e, v = await (d.isRTL == null ? void 0 : d.isRTL(t.floating)), R = r || (P || !k ? [h1(e)] : t5(e));
8114
- !r && u !== "none" && R.push(...l5(e, k, u, v));
8115
- const F = [e, ...R], z = await k1(V, B), I = [];
8113
+ const y = L1(A), P = L1(e) === e, v = await (d.isRTL == null ? void 0 : d.isRTL(t.floating)), R = r || (P || !b ? [h1(e)] : t5(e));
8114
+ !r && u !== "none" && R.push(...l5(e, b, u, v));
8115
+ const F = [e, ...R], z = await k1(V, k), I = [];
8116
8116
  let O = ((M = L.flip) == null ? void 0 : M.overflows) || [];
8117
8117
  if (l && I.push(z[y]), o) {
8118
- const b = d5(A, i, v);
8119
- I.push(z[b[0]], z[b[1]]);
8118
+ const B = d5(A, i, v);
8119
+ I.push(z[B[0]], z[B[1]]);
8120
8120
  }
8121
8121
  if (O = [...O, {
8122
8122
  placement: A,
8123
8123
  overflows: I
8124
- }], !I.every((b) => b <= 0)) {
8124
+ }], !I.every((B) => B <= 0)) {
8125
8125
  var N, n;
8126
- const b = (((N = L.flip) == null ? void 0 : N.index) || 0) + 1, D = F[b];
8126
+ const B = (((N = L.flip) == null ? void 0 : N.index) || 0) + 1, D = F[B];
8127
8127
  if (D)
8128
8128
  return {
8129
8129
  data: {
8130
- index: b,
8130
+ index: B,
8131
8131
  overflows: O
8132
8132
  },
8133
8133
  reset: {
@@ -8268,11 +8268,11 @@ const S5 = function(H) {
8268
8268
  mainAxis: L = !0,
8269
8269
  crossAxis: i = !1,
8270
8270
  limiter: e = {
8271
- fn: (B) => {
8271
+ fn: (k) => {
8272
8272
  let {
8273
8273
  x: y,
8274
8274
  y: P
8275
- } = B;
8275
+ } = k;
8276
8276
  return {
8277
8277
  x: y,
8278
8278
  y: P
@@ -8286,23 +8286,23 @@ const S5 = function(H) {
8286
8286
  }, l = await k1(V, d), o = B1(L1(A)), r = V2(o);
8287
8287
  let a = t[r], u = t[o];
8288
8288
  if (L) {
8289
- const B = r === "y" ? "top" : "left", y = r === "y" ? "bottom" : "right", P = a + l[B], v = a - l[y];
8289
+ const k = r === "y" ? "top" : "left", y = r === "y" ? "bottom" : "right", P = a + l[k], v = a - l[y];
8290
8290
  a = v1(P, a, v);
8291
8291
  }
8292
8292
  if (i) {
8293
- const B = o === "y" ? "top" : "left", y = o === "y" ? "bottom" : "right", P = u + l[B], v = u - l[y];
8293
+ const k = o === "y" ? "top" : "left", y = o === "y" ? "bottom" : "right", P = u + l[k], v = u - l[y];
8294
8294
  u = v1(P, u, v);
8295
8295
  }
8296
- const k = e.fn({
8296
+ const b = e.fn({
8297
8297
  ...V,
8298
8298
  [r]: a,
8299
8299
  [o]: u
8300
8300
  });
8301
8301
  return {
8302
- ...k,
8302
+ ...b,
8303
8303
  data: {
8304
- x: k.x - C,
8305
- y: k.y - M
8304
+ x: b.x - C,
8305
+ y: b.y - M
8306
8306
  }
8307
8307
  };
8308
8308
  }
@@ -8446,8 +8446,8 @@ function a1(H, V, C, M) {
8446
8446
  const r = Q(L), a = M && Y(M) ? Q(M) : M;
8447
8447
  let u = r.frameElement;
8448
8448
  for (; u && M && a !== r; ) {
8449
- const k = A1(u), B = u.getBoundingClientRect(), y = U(u), P = B.left + (u.clientLeft + parseFloat(y.paddingLeft)) * k.x, v = B.top + (u.clientTop + parseFloat(y.paddingTop)) * k.y;
8450
- d *= k.x, t *= k.y, l *= k.x, o *= k.y, d += P, t += v, u = Q(u).frameElement;
8449
+ const b = A1(u), k = u.getBoundingClientRect(), y = U(u), P = k.left + (u.clientLeft + parseFloat(y.paddingLeft)) * b.x, v = k.top + (u.clientTop + parseFloat(y.paddingTop)) * b.y;
8450
+ d *= b.x, t *= b.y, l *= b.x, o *= b.y, d += P, t += v, u = Q(u).frameElement;
8451
8451
  }
8452
8452
  }
8453
8453
  return g1({
@@ -8666,10 +8666,9 @@ async function D5({ value: H }, { value: V }, { value: C }, M, A, L, i = 300, e)
8666
8666
  Z5()
8667
8667
  ]
8668
8668
  }).then(({ x: d, y: t, placement: l, middlewareData: o }) => {
8669
- var u, k;
8670
8669
  if (!V)
8671
8670
  return;
8672
- const r = ((u = H.offsetParent) == null ? void 0 : u.getBoundingClientRect().left) || 0, a = ((k = H.offsetParent) == null ? void 0 : k.getBoundingClientRect().bottom) || 0;
8671
+ const r = H.offsetLeft || 0, a = H.offsetTop + H.offsetHeight + 16 || 0;
8673
8672
  if (Object.assign(V.style, {
8674
8673
  maxWidth: e === "dropdown" ? `${H.offsetWidth}px` : "auto",
8675
8674
  left: e === "dropdown" ? `${r}px` : `${d}px`,
@@ -8677,7 +8676,7 @@ async function D5({ value: H }, { value: V }, { value: C }, M, A, L, i = 300, e)
8677
8676
  animation: `r-tooltip-show ${i}ms ease-in-out forwards`,
8678
8677
  transformOrigin: "start"
8679
8678
  }), C && o.arrow) {
8680
- const { x: B, y } = o.arrow, P = {
8679
+ const { x: u, y: b } = o.arrow, k = {
8681
8680
  top: "bottom",
8682
8681
  right: "left",
8683
8682
  bottom: "top",
@@ -8685,11 +8684,11 @@ async function D5({ value: H }, { value: V }, { value: C }, M, A, L, i = 300, e)
8685
8684
  /* Right */
8686
8685
  }[l.split("-")[0]];
8687
8686
  Object.assign(C.style, {
8688
- left: d != null ? `${B}px` : "",
8689
- top: t != null ? `${y}px` : "",
8687
+ left: d != null ? `${u}px` : "",
8688
+ top: t != null ? `${b}px` : "",
8690
8689
  right: "",
8691
8690
  bottom: "",
8692
- [`${P}`]: "-4px"
8691
+ [`${k}`]: "-4px"
8693
8692
  });
8694
8693
  }
8695
8694
  });
@@ -8743,10 +8742,10 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8743
8742
  C.triggers.includes(X.Hover) && u();
8744
8743
  }
8745
8744
  function u() {
8746
- const { placement: B, offset: y, padding: P, disabled: v, showDelay: R, type: F } = C;
8747
- v || D5(A, L, i, B, y, P, R, F);
8745
+ const { placement: k, offset: y, padding: P, disabled: v, showDelay: R, type: F } = C;
8746
+ v || D5(A, L, i, k, y, P, R, F);
8748
8747
  }
8749
- const k = g(() => ({
8748
+ const b = g(() => ({
8750
8749
  "r-tooltip": !0,
8751
8750
  "r-tooltip--dark": C.dark && !C.light,
8752
8751
  "r-tooltip--light": C.light
@@ -8771,18 +8770,18 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8771
8770
  ignore: [L.value]
8772
8771
  }
8773
8772
  );
8774
- }), (B, y) => (m(), Z(i1, null, [
8773
+ }), (k, y) => (m(), Z(i1, null, [
8775
8774
  S("div", {
8776
8775
  ref_key: "trigger",
8777
8776
  ref: A,
8778
8777
  "aria-disabled": C.disabled,
8779
- class: c(["r-tooltip-trigger", B.triggerClass]),
8778
+ class: c(["r-tooltip-trigger", k.triggerClass]),
8780
8779
  onClick: l,
8781
8780
  onMouseenter: o,
8782
8781
  onMouseleave: r,
8783
8782
  onMousemove: a
8784
8783
  }, [
8785
- f(B.$slots, "default", {
8784
+ f(k.$slots, "default", {
8786
8785
  activators: {
8787
8786
  click: l,
8788
8787
  mouseenter: o,
@@ -8801,10 +8800,10 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8801
8800
  id: "tooltip",
8802
8801
  ref_key: "tooltip",
8803
8802
  ref: L,
8804
- class: c([k.value, B.tooltipClass]),
8803
+ class: c([b.value, k.tooltipClass]),
8805
8804
  role: "tooltip"
8806
8805
  }, [
8807
- f(B.$slots, "content", {
8806
+ f(k.$slots, "content", {
8808
8807
  hide: d,
8809
8808
  updatePosition: u
8810
8809
  }, () => [
@@ -8891,27 +8890,27 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8891
8890
  };
8892
8891
  }), o = W(), r = W(), a = W();
8893
8892
  function u(n, h) {
8894
- var b, D, s;
8893
+ var B, D, s;
8895
8894
  if (n.stopPropagation(), !C.disabled) {
8896
8895
  if (i.value = !0, h && h(), i.value) {
8897
- (b = o.value) == null || b.classList.add("r-dropdown--active"), (D = o.value) == null || D.focus(), (s = r.value) == null || s.focus();
8896
+ (B = o.value) == null || B.classList.add("r-dropdown--active"), (D = o.value) == null || D.focus(), (s = r.value) == null || s.focus();
8898
8897
  return;
8899
8898
  }
8900
- k();
8899
+ b();
8901
8900
  }
8902
8901
  }
8903
- function k() {
8904
- var n, h, b;
8905
- i.value = !1, (n = o.value) == null || n.classList.remove("r-dropdown--active"), (h = o.value) == null || h.blur(), (b = r.value) == null || b.blur();
8902
+ function b() {
8903
+ var n, h, B;
8904
+ i.value = !1, (n = o.value) == null || n.classList.remove("r-dropdown--active"), (h = o.value) == null || h.blur(), (B = r.value) == null || B.blur();
8906
8905
  }
8907
- function B(n, h, b, D) {
8906
+ function k(n, h, B, D) {
8908
8907
  var s;
8909
8908
  if (n.stopPropagation(), D(), !h.disabled) {
8910
8909
  if (C.multiple) {
8911
8910
  L.value.find((E) => E.value === h.value) ? L.value.splice(L.value.indexOf(h), 1) : L.value.push(h), e.value = "", C.searchable && ((s = r.value) == null || s.focus());
8912
8911
  return;
8913
8912
  }
8914
- y(n, h), C.closeOnSelect && (b(), k());
8913
+ y(n, h), C.closeOnSelect && (B(), b());
8915
8914
  }
8916
8915
  }
8917
8916
  function y(n, h) {
@@ -8921,10 +8920,10 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8921
8920
  }
8922
8921
  e.value = h.label, A.value = h, u(n), M("update:modelValue", h);
8923
8922
  }
8924
- function P(n, h, b) {
8923
+ function P(n, h, B) {
8925
8924
  if (n instanceof KeyboardEvent && n.key !== "Backspace" || e.value !== "")
8926
8925
  return;
8927
- n.stopPropagation(), b();
8926
+ n.stopPropagation(), B();
8928
8927
  const D = L.value.findIndex((s) => s.value === h.value);
8929
8928
  L.value.splice(D, 1);
8930
8929
  }
@@ -8933,14 +8932,14 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8933
8932
  if (!C.multiple)
8934
8933
  return;
8935
8934
  n.stopPropagation(), h();
8936
- const b = e.value;
8937
- if (b === "")
8935
+ const B = e.value;
8936
+ if (B === "")
8938
8937
  return;
8939
- t.value.find((E) => E.label === b) || (L.value.push({ value: b, label: b }), e.value = "", (s = r.value) == null || s.focus());
8938
+ t.value.find((E) => E.label === B) || (L.value.push({ value: B, label: B }), e.value = "", (s = r.value) == null || s.focus());
8940
8939
  }
8941
8940
  function R(n) {
8942
8941
  var h;
8943
- return !n || (n == null ? void 0 : n.value) === void 0 || (n == null ? void 0 : n.value) === null ? !1 : C.multiple ? L.value.find((b) => (b == null ? void 0 : b.value) === (n == null ? void 0 : n.value)) : ((h = A.value) == null ? void 0 : h.value) === (n == null ? void 0 : n.value);
8942
+ return !n || (n == null ? void 0 : n.value) === void 0 || (n == null ? void 0 : n.value) === null ? !1 : C.multiple ? L.value.find((B) => (B == null ? void 0 : B.value) === (n == null ? void 0 : n.value)) : ((h = A.value) == null ? void 0 : h.value) === (n == null ? void 0 : n.value);
8944
8943
  }
8945
8944
  const F = g(() => !C.searchable || A.value.label === e.value ? t.value : t.value.filter((h) => h.label.toLowerCase().includes(e.value.toLowerCase()))), z = g(() => !C.searchable);
8946
8945
  function I() {
@@ -8977,9 +8976,9 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8977
8976
  "trigger-class": "w-full",
8978
8977
  triggers: ["click"],
8979
8978
  type: "dropdown",
8980
- onHide: k
8979
+ onHide: b
8981
8980
  }, {
8982
- default: n1(({ activators: b, updatePosition: D }) => [
8981
+ default: n1(({ activators: B, updatePosition: D }) => [
8983
8982
  S("div", {
8984
8983
  ref_key: "dropdown",
8985
8984
  ref: o,
@@ -8991,7 +8990,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
8991
8990
  group: e.value !== "" || L.value.length
8992
8991
  }]),
8993
8992
  role: "select",
8994
- onClick: (s) => u(s, b.click)
8993
+ onClick: (s) => u(s, B.click)
8995
8994
  }, [
8996
8995
  C.prependIcon || n.$slots.prepend ? (m(), Z("div", {
8997
8996
  key: 0,
@@ -9019,7 +9018,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
9019
9018
  clearable: !C.hideChipClear,
9020
9019
  label: s.label,
9021
9020
  "no-wrap": "",
9022
- variant: "primary",
9021
+ variant: "info",
9023
9022
  "onClick:close": ($) => P($, s, D)
9024
9023
  }, null, 8, ["clearable", "label", "onClick:close"])) : (m(), Z("p", Q5, w(`${s.label}, `), 1))
9025
9024
  ])), 128)),
@@ -9073,7 +9072,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
9073
9072
  ], 2)) : p("", !0)
9074
9073
  ], 10, N5)
9075
9074
  ]),
9076
- content: n1(({ hide: b, updatePosition: D }) => [
9075
+ content: n1(({ hide: B, updatePosition: D }) => [
9077
9076
  S("ul", {
9078
9077
  class: c(["r-dropdown-options", {
9079
9078
  "r-dropdown-options--active": i.value,
@@ -9087,7 +9086,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], W5 = /* @__PURE__ */ T({
9087
9086
  "r-dropdown-options__option--active": R(s),
9088
9087
  "r-dropdown-options__option--disabled": s.disabled
9089
9088
  }]),
9090
- onClick: e1((E) => B(E, s, b, D), ["prevent"])
9089
+ onClick: e1((E) => k(E, s, B, D), ["prevent"])
9091
9090
  }, [
9092
9091
  f(n.$slots, "option", {
9093
9092
  isSelected: R(s)
@@ -9651,11 +9650,11 @@ const s3 = ["aria-disabled", "aria-selected", "disabled"], c3 = {
9651
9650
  "r-textfield__prepend-icon": !0,
9652
9651
  "r-textfield__prepend-icon--loading": C.loading,
9653
9652
  "r-textfield__prepend-icon--error": o.value && t.value
9654
- })), k = g(() => ({
9653
+ })), b = g(() => ({
9655
9654
  "r-textfield__append-icon": !0,
9656
9655
  "r-textfield__append-icon--clear": r.value,
9657
9656
  "r-textfield__append-icon--error": o.value
9658
- })), B = g(() => {
9657
+ })), k = g(() => {
9659
9658
  const { prependIcon: O, type: N } = C;
9660
9659
  return O === "none" ? "" : O || e[N];
9661
9660
  }), y = g(() => {
@@ -9720,10 +9719,10 @@ const s3 = ["aria-disabled", "aria-selected", "disabled"], c3 = {
9720
9719
  class: c(a.value)
9721
9720
  }, [
9722
9721
  f(O.$slots, "prepend"),
9723
- B.value && !O.$slots.prepend ? (m(), _(x, {
9722
+ k.value && !O.$slots.prepend ? (m(), _(x, {
9724
9723
  key: 0,
9725
9724
  class: c(u.value),
9726
- name: B.value,
9725
+ name: k.value,
9727
9726
  size: 20
9728
9727
  }, null, 8, ["class", "name"])) : p("", !0),
9729
9728
  S("input", {
@@ -9745,7 +9744,7 @@ const s3 = ["aria-disabled", "aria-selected", "disabled"], c3 = {
9745
9744
  o.value ? p("", !0) : f(O.$slots, "append", { key: 1 }),
9746
9745
  y.value && !O.$slots.append || o.value ? (m(), _(x, {
9747
9746
  key: 2,
9748
- class: c(k.value),
9747
+ class: c(b.value),
9749
9748
  name: `${y.value}`,
9750
9749
  size: 20,
9751
9750
  onClick: F