@rocketui/vue 0.1.3 → 0.1.5

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.
@@ -1184,6 +1184,7 @@ declare interface IProps_7 {
1184
1184
  */
1185
1185
  tooltipClass?: string | string[];
1186
1186
  type?: Theme | string;
1187
+ target?: string | HTMLElement;
1187
1188
  }
1188
1189
 
1189
1190
  declare function isSelected(id: never): boolean;
@@ -2651,6 +2652,7 @@ export declare const RTooltip: __VLS_WithTemplateSlots_14<DefineComponent<__VLS_
2651
2652
  triggerClass: string;
2652
2653
  tooltipClass: string;
2653
2654
  type: Theme;
2655
+ target: string;
2654
2656
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2655
2657
  show: (...args: any[]) => void;
2656
2658
  hide: (...args: any[]) => void;
@@ -2673,6 +2675,7 @@ export declare const RTooltip: __VLS_WithTemplateSlots_14<DefineComponent<__VLS_
2673
2675
  triggerClass: string;
2674
2676
  tooltipClass: string;
2675
2677
  type: Theme;
2678
+ target: string;
2676
2679
  }>>> & {
2677
2680
  onShow?: ((...args: any[]) => any) | undefined;
2678
2681
  onHide?: ((...args: any[]) => any) | undefined;
@@ -2680,6 +2683,7 @@ export declare const RTooltip: __VLS_WithTemplateSlots_14<DefineComponent<__VLS_
2680
2683
  type: string;
2681
2684
  text: string;
2682
2685
  disabled: boolean;
2686
+ target: string | HTMLElement;
2683
2687
  placement: Placements;
2684
2688
  padding: number;
2685
2689
  dark: boolean;
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, openBlock as m, createElementBlock as o, createElementVNode as S, unref as L1, reactive as d1, Fragment as H1, renderList as M1, normalizeClass as p, renderSlot as f, toDisplayString as b, createVNode as j, computed as k, createCommentVNode as O, mergeProps as a2, createBlock as F, watch as Q, getCurrentScope as Z2, onScopeDispose as u2, ref as _, watchEffect as S2, onMounted as q1, Teleport as s2, withCtx as n1, withDirectives as Y1, withKeys as W1, vModelText as c2, createTextVNode as R1, withModifiers as S1, normalizeStyle as x1, vShow as O2, Transition as p2, resolveComponent as f2, provide as k1, resolveDynamicComponent as h2, inject as B1 } from "vue";
1
+ import { defineComponent as v, openBlock as m, createElementBlock as o, createElementVNode as S, unref as L1, reactive as d1, Fragment as H1, renderList as M1, normalizeClass as p, renderSlot as f, toDisplayString as b, createVNode as j, computed as k, createCommentVNode as O, mergeProps as a2, createBlock as F, watch as Q, getCurrentScope as Z2, onScopeDispose as u2, ref as _, watchEffect as S2, onMounted as q1, Teleport as s2, withCtx as n1, withDirectives as Y1, withKeys as W1, vModelText as c2, withModifiers as r1, createTextVNode as R1, normalizeStyle as x1, vShow as O2, Transition as p2, resolveComponent as f2, provide as k1, resolveDynamicComponent as h2, inject as B1 } from "vue";
2
2
  const g2 = {
3
3
  mdiAbTesting: "M4 2A2 2 0 0 0 2 4V12H4V8H6V12H8V4A2 2 0 0 0 6 2H4M4 4H6V6H4M22 15.5V14A2 2 0 0 0 20 12H16V22H20A2 2 0 0 0 22 20V18.5A1.54 1.54 0 0 0 20.5 17A1.54 1.54 0 0 0 22 15.5M20 20H18V18H20V20M20 16H18V14H20M5.79 21.61L4.21 20.39L18.21 2.39L19.79 3.61Z",
4
4
  mdiAbacus: "M5 5H7V11H5V5M10 5H8V11H10V5M5 19H7V13H5V19M10 13H8V19H10V17H15V15H10V13M2 21H4V3H2V21M20 3V7H13V5H11V11H13V9H20V15H18V13H16V19H18V17H20V21H22V3H20Z",
@@ -7787,7 +7787,7 @@ function M5(H, V, C = {}) {
7787
7787
  ].filter(Boolean);
7788
7788
  return () => Z.forEach((n) => n());
7789
7789
  }
7790
- const A5 = ["top", "right", "bottom", "left"], r1 = Math.min, A1 = Math.max, s1 = Math.round, Y = (H) => ({
7790
+ const A5 = ["top", "right", "bottom", "left"], a1 = Math.min, A1 = Math.max, s1 = Math.round, Y = (H) => ({
7791
7791
  x: H,
7792
7792
  y: H
7793
7793
  }), i5 = {
@@ -7800,7 +7800,7 @@ const A5 = ["top", "right", "bottom", "left"], r1 = Math.min, A1 = Math.max, s1
7800
7800
  end: "start"
7801
7801
  };
7802
7802
  function T1(H, V, C) {
7803
- return A1(H, r1(V, C));
7803
+ return A1(H, a1(V, C));
7804
7804
  }
7805
7805
  function t1(H, V) {
7806
7806
  return typeof H == "function" ? H(V) : H;
@@ -7808,7 +7808,7 @@ function t1(H, V) {
7808
7808
  function V1(H) {
7809
7809
  return H.split("-")[0];
7810
7810
  }
7811
- function Z1(H) {
7811
+ function u1(H) {
7812
7812
  return H.split("-")[1];
7813
7813
  }
7814
7814
  function H2(H) {
@@ -7825,7 +7825,7 @@ function _1(H) {
7825
7825
  }
7826
7826
  function d5(H, V, C) {
7827
7827
  C === void 0 && (C = !1);
7828
- const M = Z1(H), A = _1(H), L = D1(A);
7828
+ const M = u1(H), A = _1(H), L = D1(A);
7829
7829
  let i = A === "x" ? M === (C ? "end" : "start") ? "right" : "left" : M === "start" ? "bottom" : "top";
7830
7830
  return V.reference[L] > V.floating[L] && (i = c1(i)), [i, c1(i)];
7831
7831
  }
@@ -7850,7 +7850,7 @@ function m5(H, V, C) {
7850
7850
  }
7851
7851
  }
7852
7852
  function l5(H, V, C, M) {
7853
- const A = Z1(H);
7853
+ const A = u1(H);
7854
7854
  let L = m5(V1(H), C === "start", M);
7855
7855
  return A && (L = L.map((i) => i + "-" + A), V && (L = L.concat(L.map(v1)))), L;
7856
7856
  }
@@ -7921,7 +7921,7 @@ function G1(H, V, C) {
7921
7921
  y: M.y
7922
7922
  };
7923
7923
  }
7924
- switch (Z1(V)) {
7924
+ switch (u1(V)) {
7925
7925
  case "start":
7926
7926
  l[i] -= n * (C && t ? -1 : 1);
7927
7927
  break;
@@ -8062,7 +8062,7 @@ const r5 = (H) => ({
8062
8062
  }, l = _1(A), a = D1(l), B = await i.getDimensions(t), g = l === "y", w = g ? "top" : "left", P = g ? "bottom" : "right", T = g ? "clientHeight" : "clientWidth", x = L.reference[a] + L.reference[l] - n[l] - L.floating[a], s = n[l] - L.reference[l], h = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(t));
8063
8063
  let y = h ? h[T] : 0;
8064
8064
  (!y || !await (i.isElement == null ? void 0 : i.isElement(h))) && (y = e.floating[T] || L.floating[a]);
8065
- const u = x / 2 - s / 2, c = y / 2 - B[a] / 2 - 1, D = r1(r[w], c), C1 = r1(r[P], c), W = D, m1 = y - B[a] - C1, E = y / 2 - B[a] / 2 + u, G = T1(W, E, m1), z = !d.arrow && Z1(A) != null && E != G && L.reference[a] / 2 - (E < W ? D : C1) - B[a] / 2 < 0, $ = z ? E < W ? E - W : E - m1 : 0;
8065
+ const u = x / 2 - s / 2, c = y / 2 - B[a] / 2 - 1, D = a1(r[w], c), C1 = a1(r[P], c), W = D, m1 = y - B[a] - C1, E = y / 2 - B[a] / 2 + u, G = T1(W, E, m1), z = !d.arrow && u1(A) != null && E != G && L.reference[a] / 2 - (E < W ? D : C1) - B[a] / 2 < 0, $ = z ? E < W ? E - W : E - m1 : 0;
8066
8066
  return {
8067
8067
  [l]: n[l] + $,
8068
8068
  data: {
@@ -8205,7 +8205,7 @@ async function u5(H, V) {
8205
8205
  placement: C,
8206
8206
  platform: M,
8207
8207
  elements: A
8208
- } = H, L = await (M.isRTL == null ? void 0 : M.isRTL(A.floating)), i = V1(C), e = Z1(C), d = f1(C) === "y", t = ["left", "top"].includes(i) ? -1 : 1, Z = L && d ? -1 : 1, r = t1(V, H);
8208
+ } = H, L = await (M.isRTL == null ? void 0 : M.isRTL(A.floating)), i = V1(C), e = u1(C), d = f1(C) === "y", t = ["left", "top"].includes(i) ? -1 : 1, Z = L && d ? -1 : 1, r = t1(V, H);
8209
8209
  let {
8210
8210
  mainAxis: n,
8211
8211
  crossAxis: l,
@@ -8320,7 +8320,7 @@ function U(H) {
8320
8320
  function $1(H) {
8321
8321
  return typeof ShadowRoot > "u" ? !1 : H instanceof ShadowRoot || H instanceof N(H).ShadowRoot;
8322
8322
  }
8323
- function u1(H) {
8323
+ function S1(H) {
8324
8324
  const {
8325
8325
  overflow: V,
8326
8326
  overflowX: C,
@@ -8377,13 +8377,13 @@ function e1(H) {
8377
8377
  }
8378
8378
  function M2(H) {
8379
8379
  const V = e1(H);
8380
- return h1(V) ? H.ownerDocument ? H.ownerDocument.body : H.body : U(V) && u1(V) ? V : M2(V);
8380
+ return h1(V) ? H.ownerDocument ? H.ownerDocument.body : H.body : U(V) && S1(V) ? V : M2(V);
8381
8381
  }
8382
8382
  function F1(H, V, C) {
8383
8383
  var M;
8384
8384
  V === void 0 && (V = []), C === void 0 && (C = !0);
8385
8385
  const A = M2(H), L = A === ((M = H.ownerDocument) == null ? void 0 : M.body), i = N(A);
8386
- return L ? V.concat(i, i.visualViewport || [], u1(A) ? A : [], i.frameElement && C ? F1(i.frameElement) : []) : V.concat(A, F1(A, [], C));
8386
+ return L ? V.concat(i, i.visualViewport || [], S1(A) ? A : [], i.frameElement && C ? F1(i.frameElement) : []) : V.concat(A, F1(A, [], C));
8387
8387
  }
8388
8388
  function A2(H) {
8389
8389
  const V = I(H);
@@ -8424,7 +8424,7 @@ function e2(H) {
8424
8424
  function f5(H, V, C) {
8425
8425
  return V === void 0 && (V = !1), !C || V && C !== N(H) ? !1 : V;
8426
8426
  }
8427
- function a1(H, V, C, M) {
8427
+ function Z1(H, V, C, M) {
8428
8428
  V === void 0 && (V = !1), C === void 0 && (C = !1);
8429
8429
  const A = H.getBoundingClientRect(), L = i2(H);
8430
8430
  let i = Y(1);
@@ -8460,8 +8460,8 @@ function h5(H) {
8460
8460
  scrollTop: 0
8461
8461
  }, e = Y(1);
8462
8462
  const d = Y(0);
8463
- if ((A || !A && M !== "fixed") && ((X(C) !== "body" || u1(L)) && (i = g1(C)), U(C))) {
8464
- const t = a1(C);
8463
+ if ((A || !A && M !== "fixed") && ((X(C) !== "body" || S1(L)) && (i = g1(C)), U(C))) {
8464
+ const t = Z1(C);
8465
8465
  e = i1(C), d.x = t.x + C.clientLeft, d.y = t.y + C.clientTop;
8466
8466
  }
8467
8467
  return {
@@ -8475,7 +8475,7 @@ function g5(H) {
8475
8475
  return Array.from(H.getClientRects());
8476
8476
  }
8477
8477
  function d2(H) {
8478
- return a1(J(H)).left + g1(H).scrollLeft;
8478
+ return Z1(J(H)).left + g1(H).scrollLeft;
8479
8479
  }
8480
8480
  function k5(H) {
8481
8481
  const V = J(H), C = g1(H), M = H.ownerDocument.body, A = A1(V.scrollWidth, V.clientWidth, M.scrollWidth, M.clientWidth), L = A1(V.scrollHeight, V.clientHeight, M.scrollHeight, M.clientHeight);
@@ -8504,7 +8504,7 @@ function B5(H, V) {
8504
8504
  };
8505
8505
  }
8506
8506
  function b5(H, V) {
8507
- const C = a1(H, !0, V === "fixed"), M = C.top + H.clientTop, A = C.left + H.clientLeft, L = U(H) ? i1(H) : Y(1), i = H.clientWidth * L.x, e = H.clientHeight * L.y, d = A * L.x, t = M * L.y;
8507
+ const C = Z1(H, !0, V === "fixed"), M = C.top + H.clientTop, A = C.left + H.clientLeft, L = U(H) ? i1(H) : Y(1), i = H.clientWidth * L.x, e = H.clientHeight * L.y, d = A * L.x, t = M * L.y;
8508
8508
  return {
8509
8509
  width: i,
8510
8510
  height: e,
@@ -8543,7 +8543,7 @@ function w5(H, V) {
8543
8543
  let i = L ? e1(H) : H;
8544
8544
  for (; q(i) && !h1(i); ) {
8545
8545
  const e = I(i), d = E1(i);
8546
- !d && e.position === "fixed" && (A = null), (L ? !d && !A : !d && e.position === "static" && !!A && ["absolute", "fixed"].includes(A.position) || u1(i) && !d && t2(H, i)) ? M = M.filter((Z) => Z !== i) : A = e, i = e1(i);
8546
+ !d && e.position === "fixed" && (A = null), (L ? !d && !A : !d && e.position === "static" && !!A && ["absolute", "fixed"].includes(A.position) || S1(i) && !d && t2(H, i)) ? M = M.filter((Z) => Z !== i) : A = e, i = e1(i);
8547
8547
  }
8548
8548
  return V.set(H, M), M;
8549
8549
  }
@@ -8556,7 +8556,7 @@ function y5(H) {
8556
8556
  } = H;
8557
8557
  const i = [...C === "clippingAncestors" ? w5(V, this._c) : [].concat(C), M], e = i[0], d = i.reduce((t, Z) => {
8558
8558
  const r = K1(V, Z, A);
8559
- return t.top = A1(r.top, t.top), t.right = r1(r.right, t.right), t.bottom = r1(r.bottom, t.bottom), t.left = A1(r.left, t.left), t;
8559
+ return t.top = A1(r.top, t.top), t.right = a1(r.right, t.right), t.bottom = a1(r.bottom, t.bottom), t.left = A1(r.left, t.left), t;
8560
8560
  }, K1(V, e, A));
8561
8561
  return {
8562
8562
  width: d.right - d.left,
@@ -8569,15 +8569,15 @@ function P5(H) {
8569
8569
  return A2(H);
8570
8570
  }
8571
8571
  function T5(H, V, C) {
8572
- const M = U(V), A = J(V), L = C === "fixed", i = a1(H, !0, L, V);
8572
+ const M = U(V), A = J(V), L = C === "fixed", i = Z1(H, !0, L, V);
8573
8573
  let e = {
8574
8574
  scrollLeft: 0,
8575
8575
  scrollTop: 0
8576
8576
  };
8577
8577
  const d = Y(0);
8578
8578
  if (M || !M && !L)
8579
- if ((X(V) !== "body" || u1(A)) && (e = g1(V)), M) {
8580
- const t = a1(V, !0, L, V);
8579
+ if ((X(V) !== "body" || S1(A)) && (e = g1(V)), M) {
8580
+ const t = Z1(V, !0, L, V);
8581
8581
  d.x = t.x + V.clientLeft, d.y = t.y + V.clientTop;
8582
8582
  } else
8583
8583
  A && (d.x = d2(A));
@@ -8703,7 +8703,8 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], N5 = /* @__PURE__ */ v({
8703
8703
  resizable: { type: Boolean, default: !0 },
8704
8704
  triggerClass: { default: "" },
8705
8705
  tooltipClass: { default: "" },
8706
- type: { default: o2.Tooltip }
8706
+ type: { default: o2.Tooltip },
8707
+ target: { default: "body" }
8707
8708
  },
8708
8709
  emits: ["show", "hide"],
8709
8710
  setup(H, { emit: V }) {
@@ -8783,7 +8784,9 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], N5 = /* @__PURE__ */ v({
8783
8784
  }, null, 8, E5)
8784
8785
  ])
8785
8786
  ], 42, _5),
8786
- (m(), F(s2, { to: "body" }, [
8787
+ (m(), F(s2, {
8788
+ to: C.target
8789
+ }, [
8787
8790
  S("div", {
8788
8791
  id: "tooltip",
8789
8792
  ref_key: "tooltip",
@@ -8814,7 +8817,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], N5 = /* @__PURE__ */ v({
8814
8817
  }, null, 2)) : O("", !0)
8815
8818
  ])
8816
8819
  ], 2)
8817
- ]))
8820
+ ], 8, ["to"]))
8818
8821
  ], 64));
8819
8822
  }
8820
8823
  }), W5 = ["onClick"], I5 = {
@@ -9035,7 +9038,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], N5 = /* @__PURE__ */ v({
9035
9038
  "r-dropdown-options__option--active": w(c),
9036
9039
  "r-dropdown-options__option--disabled": c.disabled
9037
9040
  }]),
9038
- onClick: (D) => l(D, c, y, u)
9041
+ onClick: r1((D) => l(D, c, y, u), ["prevent"])
9039
9042
  }, [
9040
9043
  S("div", U5, [
9041
9044
  f(s.$slots, "option-prepend", {}, () => [
@@ -9134,7 +9137,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], N5 = /* @__PURE__ */ v({
9134
9137
  }
9135
9138
  return (e, d) => Y1((m(), o("div", {
9136
9139
  class: p(["r-modal-overlay", e.overlayClass]),
9137
- onClick: S1(i, ["stop"])
9140
+ onClick: r1(i, ["stop"])
9138
9141
  }, [
9139
9142
  S("div", {
9140
9143
  "aria-modal": "true",
@@ -9255,7 +9258,7 @@ const _5 = ["aria-disabled"], E5 = ["innerHTML"], N5 = /* @__PURE__ */ v({
9255
9258
  j(R, {
9256
9259
  name: "mdiClose",
9257
9260
  size: 16,
9258
- onClick: e[0] || (e[0] = S1((d) => i.$emit("update:modelValue", !1), ["stop"]))
9261
+ onClick: e[0] || (e[0] = r1((d) => i.$emit("update:modelValue", !1), ["stop"]))
9259
9262
  })
9260
9263
  ])
9261
9264
  ])) : O("", !0)
@@ -9382,7 +9385,7 @@ const u3 = ["aria-disabled", "aria-selected", "disabled"], S3 = {
9382
9385
  class: p(A.value),
9383
9386
  disabled: C.disabled,
9384
9387
  style: x1(L.value),
9385
- onClick: t[0] || (t[0] = S1((Z) => i(C.id), ["stop"]))
9388
+ onClick: t[0] || (t[0] = r1((Z) => i(C.id), ["stop"]))
9386
9389
  }, [
9387
9390
  f(d.$slots, "prepend", {}, () => [
9388
9391
  C.variant !== L1(o1).TEXT && C.prependIcon ? (m(), F(R, {
@@ -9407,7 +9410,7 @@ const u3 = ["aria-disabled", "aria-selected", "disabled"], S3 = {
9407
9410
  class: "r-tab-item__append-icon",
9408
9411
  name: C.appendIcon,
9409
9412
  size: 16,
9410
- onClick: S1(e, ["stop"])
9413
+ onClick: r1(e, ["stop"])
9411
9414
  }, null, 8, ["name", "onClick"])) : O("", !0)
9412
9415
  ])
9413
9416
  ], 14, u3));