vutooltip 1.0.0 → 1.0.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.
- package/dist/vutooltip.es.js +4 -4
- package/dist/vutooltip.umd.js +1 -1
- package/package.json +11 -11
package/dist/vutooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as i, computed as
|
|
1
|
+
import { ref as i, computed as u, openBlock as s, createElementBlock as l, renderSlot as f, createVNode as c, Transition as m, withCtx as d, normalizeStyle as v, toDisplayString as y, createCommentVNode as g } from "vue";
|
|
2
2
|
const x = (t, n) => {
|
|
3
3
|
const e = t.__vccOpts || t;
|
|
4
4
|
for (const [a, o] of n)
|
|
@@ -17,7 +17,7 @@ const x = (t, n) => {
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
setup(t) {
|
|
20
|
-
const n = t, e = i(!1), a =
|
|
20
|
+
const n = t, e = i(!1), a = u(() => {
|
|
21
21
|
const o = {
|
|
22
22
|
top: { bottom: "100%", left: "50%", transform: "translateX(-50%)" },
|
|
23
23
|
bottom: { top: "100%", left: "50%", transform: "translateX(-50%)" },
|
|
@@ -31,7 +31,7 @@ const x = (t, n) => {
|
|
|
31
31
|
onMouseenter: r[0] || (r[0] = (p) => e.value = !0),
|
|
32
32
|
onMouseleave: r[1] || (r[1] = (p) => e.value = !1)
|
|
33
33
|
}, [
|
|
34
|
-
|
|
34
|
+
f(o.$slots, "default", {}, void 0, !0),
|
|
35
35
|
c(m, { name: "fade" }, {
|
|
36
36
|
default: d(() => [
|
|
37
37
|
e.value ? (s(), l("div", {
|
|
@@ -46,7 +46,7 @@ const x = (t, n) => {
|
|
|
46
46
|
}
|
|
47
47
|
}, _ = /* @__PURE__ */ x(S, [["__scopeId", "data-v-8eac18cf"]]), T = {
|
|
48
48
|
install(t) {
|
|
49
|
-
t.component("
|
|
49
|
+
t.component("VuTooltip", _);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
export {
|
package/dist/vutooltip.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.Vue3Tooltip={},e.Vue))})(this,(function(e,t){"use strict";const a=((o,l)=>{const n=o.__vccOpts||o;for(const[i,r]of l)n[i]=r;return n})({__name:"Tooltip",props:{text:{type:String,required:!0},position:{type:String,default:"top"}},setup(o){const l=o,n=t.ref(!1),i=t.computed(()=>{const r={top:{bottom:"100%",left:"50%",transform:"translateX(-50%)"},bottom:{top:"100%",left:"50%",transform:"translateX(-50%)"},left:{right:"100%",top:"50%",transform:"translateY(-50%)"},right:{left:"100%",top:"50%",transform:"translateY(-50%)"}};return r[l.position]||r.top});return(r,s)=>(t.openBlock(),t.createElementBlock("div",{class:"v-tooltip-wrapper",onMouseenter:s[0]||(s[0]=f=>n.value=!0),onMouseleave:s[1]||(s[1]=f=>n.value=!1)},[t.renderSlot(r.$slots,"default",{},void 0,!0),t.createVNode(t.Transition,{name:"fade"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"v-tooltip",style:t.normalizeStyle(i.value)},t.toDisplayString(o.text),5)):t.createCommentVNode("",!0)]),_:1})],32))}},[["__scopeId","data-v-8eac18cf"]]),p={install(o){o.component("
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.Vue3Tooltip={},e.Vue))})(this,(function(e,t){"use strict";const a=((o,l)=>{const n=o.__vccOpts||o;for(const[i,r]of l)n[i]=r;return n})({__name:"Tooltip",props:{text:{type:String,required:!0},position:{type:String,default:"top"}},setup(o){const l=o,n=t.ref(!1),i=t.computed(()=>{const r={top:{bottom:"100%",left:"50%",transform:"translateX(-50%)"},bottom:{top:"100%",left:"50%",transform:"translateX(-50%)"},left:{right:"100%",top:"50%",transform:"translateY(-50%)"},right:{left:"100%",top:"50%",transform:"translateY(-50%)"}};return r[l.position]||r.top});return(r,s)=>(t.openBlock(),t.createElementBlock("div",{class:"v-tooltip-wrapper",onMouseenter:s[0]||(s[0]=f=>n.value=!0),onMouseleave:s[1]||(s[1]=f=>n.value=!1)},[t.renderSlot(r.$slots,"default",{},void 0,!0),t.createVNode(t.Transition,{name:"fade"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"v-tooltip",style:t.normalizeStyle(i.value)},t.toDisplayString(o.text),5)):t.createCommentVNode("",!0)]),_:1})],32))}},[["__scopeId","data-v-8eac18cf"]]),p={install(o){o.component("VuTooltip",a)}};e.Tooltip=a,e.default=p,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vutooltip",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/vutooltip.umd.js",
|
|
6
6
|
"module": "./dist/vutooltip.es.js",
|
|
7
|
+
"style": "./dist/vutooltip.css",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
10
|
"import": "./dist/vutooltip.es.js",
|
|
10
11
|
"require": "./dist/vutooltip.umd.js"
|
|
11
|
-
}
|
|
12
|
+
},
|
|
13
|
+
"./style.css": "./dist/vutooltip.css"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"vue": "^3.0.0"
|
|
12
20
|
},
|
|
13
|
-
"files": ["dist"],
|
|
14
21
|
"scripts": {
|
|
15
22
|
"build": "vite build"
|
|
16
23
|
},
|
|
17
|
-
"keywords": [],
|
|
18
|
-
"author": "",
|
|
19
|
-
"license": "ISC",
|
|
20
|
-
"description": "",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"vue": "^3.5.29"
|
|
23
|
-
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@vitejs/plugin-vue": "^5.2.4",
|
|
26
26
|
"vite": "^6.4.1"
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|