@cobre-npm/ds-v3 0.58.0 → 0.58.2

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.
@@ -3984,7 +3984,7 @@ const iN = /* @__PURE__ */ ot(_b, [["render", Tb], ["__scopeId", "data-v-f0bb42d
3984
3984
  ])
3985
3985
  ], 2));
3986
3986
  }
3987
- }), dN = /* @__PURE__ */ ot(n0, [["__scopeId", "data-v-1eb2a6b5"]]), a0 = { class: "d-flex align-items-center" }, r0 = {
3987
+ }), dN = /* @__PURE__ */ ot(n0, [["__scopeId", "data-v-5a19594a"]]), a0 = { class: "d-flex align-items-center" }, r0 = {
3988
3988
  key: 0,
3989
3989
  class: "co-icon co-icon--sm icon-users-03"
3990
3990
  }, o0 = {
@@ -6661,39 +6661,37 @@ const Xw = (t) => (rn("data-v-8a74ae3b"), t = t(), on(), t), Kw = { class: "co-i
6661
6661
  props: {
6662
6662
  text: { default: "" },
6663
6663
  allowCopy: { type: Boolean, default: !0 },
6664
- copyText: {},
6665
- tooltipText: {},
6666
- copied: {}
6664
+ copyText: { default: "" },
6665
+ tooltipText: { default: "" },
6666
+ copied: { default: "" },
6667
+ minLengthToShowTooltip: { default: 0 }
6667
6668
  },
6668
6669
  emits: ["copy"],
6669
6670
  setup(t, { emit: e }) {
6670
- const n = K(!1), a = t, r = H(() => a.copyText ? a.copyText : a.text), o = e, i = () => {
6671
- n.value = !0;
6672
- }, l = () => {
6673
- n.value = !1;
6674
- }, u = (f) => {
6675
- o("copy", f);
6676
- };
6677
- return (f, c) => {
6678
- const h = Zt("co-tooltip");
6671
+ const n = K(!1), a = t, r = H(() => a.copyText || a.text), o = H(() => {
6672
+ const c = a.tooltipText || a.text;
6673
+ return c.length > a.minLengthToShowTooltip ? c : "";
6674
+ }), i = e, l = () => n.value = !0, u = () => n.value = !1, f = (c) => i("copy", c);
6675
+ return (c, h) => {
6676
+ const v = Zt("co-tooltip");
6679
6677
  return _t((_(), E("div", {
6680
6678
  class: "d-flex align-items-center w-100",
6681
6679
  "data-bs-toggle": "tooltip",
6682
- title: f.tooltipText,
6683
- onMouseover: i,
6684
- onMouseleave: l
6680
+ title: o.value,
6681
+ onMouseover: l,
6682
+ onMouseleave: u
6685
6683
  }, [
6686
- P("p", ik, de(f.text), 1),
6687
- le(f.$slots, "content"),
6688
- f.allowCopy && n.value ? (_(), Ie(kt, {
6684
+ P("p", ik, de(c.text), 1),
6685
+ le(c.$slots, "content"),
6686
+ c.copyText && c.allowCopy && n.value ? (_(), Ie(kt, {
6689
6687
  key: 0,
6690
6688
  theme: "icon-cloudy",
6691
6689
  size: "small",
6692
- class: ee(["co-fw-400 co-icon co-icon--sm ms-2", f.copied === r.value ? "icon-check" : "icon-copy"]),
6693
- onClick: c[0] || (c[0] = Xt((v) => u(r.value), ["stop"]))
6690
+ class: ee(["co-fw-400 co-icon co-icon--sm ms-2", c.copied === r.value ? "icon-check" : "icon-copy"]),
6691
+ onClick: h[0] || (h[0] = Xt((y) => f(r.value), ["stop"]))
6694
6692
  }, null, 8, ["class"])) : N("", !0)
6695
6693
  ], 40, ok)), [
6696
- [h]
6694
+ [v]
6697
6695
  ]);
6698
6696
  };
6699
6697
  }