@cobre-npm/ds-v3 0.58.1 → 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.
|
@@ -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
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
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:
|
|
6683
|
-
onMouseover:
|
|
6684
|
-
onMouseleave:
|
|
6680
|
+
title: o.value,
|
|
6681
|
+
onMouseover: l,
|
|
6682
|
+
onMouseleave: u
|
|
6685
6683
|
}, [
|
|
6686
|
-
P("p", ik, de(
|
|
6687
|
-
le(
|
|
6688
|
-
|
|
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",
|
|
6693
|
-
onClick:
|
|
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
|
-
[
|
|
6694
|
+
[v]
|
|
6697
6695
|
]);
|
|
6698
6696
|
};
|
|
6699
6697
|
}
|
|
@@ -4,6 +4,7 @@ interface Props {
|
|
|
4
4
|
copyText?: string;
|
|
5
5
|
tooltipText?: string;
|
|
6
6
|
copied?: string;
|
|
7
|
+
minLengthToShowTooltip?: number;
|
|
7
8
|
}
|
|
8
9
|
declare function __VLS_template(): {
|
|
9
10
|
content?(_: {}): any;
|
|
@@ -12,17 +13,29 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
12
13
|
text: string;
|
|
13
14
|
allowCopy: boolean;
|
|
14
15
|
size: string;
|
|
16
|
+
minLengthToShowTooltip: number;
|
|
17
|
+
tooltipText: string;
|
|
18
|
+
copyText: string;
|
|
19
|
+
copied: string;
|
|
15
20
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
21
|
copy: (...args: any[]) => void;
|
|
17
22
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
18
23
|
text: string;
|
|
19
24
|
allowCopy: boolean;
|
|
20
25
|
size: string;
|
|
26
|
+
minLengthToShowTooltip: number;
|
|
27
|
+
tooltipText: string;
|
|
28
|
+
copyText: string;
|
|
29
|
+
copied: string;
|
|
21
30
|
}>>> & {
|
|
22
31
|
onCopy?: ((...args: any[]) => any) | undefined;
|
|
23
32
|
}, {
|
|
24
33
|
text: string;
|
|
34
|
+
tooltipText: string;
|
|
35
|
+
copied: string;
|
|
25
36
|
allowCopy: boolean;
|
|
37
|
+
copyText: string;
|
|
38
|
+
minLengthToShowTooltip: number;
|
|
26
39
|
}, {}>;
|
|
27
40
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
28
41
|
export default _default;
|