vue-tippy 4.12.0 → 4.15.0
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/src/components/Tippy.d.ts +421 -0
- package/dist/src/components/Tippy.d.ts.map +1 -0
- package/dist/src/components/TippySingleton.d.ts +266 -0
- package/dist/src/components/TippySingleton.d.ts.map +1 -0
- package/dist/src/composables/index.d.ts +4 -0
- package/dist/src/composables/index.d.ts.map +1 -0
- package/dist/src/composables/useSingleton.d.ts +6 -0
- package/dist/src/composables/useSingleton.d.ts.map +1 -0
- package/dist/src/composables/useTippy.d.ts +27 -0
- package/dist/src/composables/useTippy.d.ts.map +1 -0
- package/dist/src/composables/useTippyComponent.d.ts +8 -0
- package/dist/src/composables/useTippyComponent.d.ts.map +1 -0
- package/dist/src/directive/index.d.ts +4 -0
- package/dist/src/directive/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/plugin/index.d.ts +4 -0
- package/dist/src/plugin/index.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +21 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/vue-tippy.cjs +4789 -0
- package/dist/vue-tippy.d.ts +750 -0
- package/dist/vue-tippy.esm-browser.js +4460 -0
- package/dist/vue-tippy.esm.js +42 -10
- package/dist/vue-tippy.iife.js +4792 -0
- package/dist/vue-tippy.iife.prod.js +6 -0
- package/dist/vue-tippy.min.js +1 -1
- package/dist/vue-tippy.mjs +4460 -0
- package/dist/vue-tippy.prod.cjs +4473 -0
- package/dist/vue-tippy.umd.js +42 -10
- package/package.json +1 -1
- package/src/components/Tippy.vue +21 -15
- package/src/components/TippyNoStyles.vue +21 -15
- package/src/index.js +8 -2
package/dist/vue-tippy.umd.js
CHANGED
@@ -4799,7 +4799,21 @@
|
|
4799
4799
|
|
4800
4800
|
//
|
4801
4801
|
var script = {
|
4802
|
-
props:
|
4802
|
+
props: {
|
4803
|
+
to: undefined,
|
4804
|
+
toSelector: undefined,
|
4805
|
+
toElement: undefined,
|
4806
|
+
content: undefined,
|
4807
|
+
enabled: undefined,
|
4808
|
+
visible: undefined,
|
4809
|
+
triggerTarget: undefined,
|
4810
|
+
tag: {
|
4811
|
+
type: String,
|
4812
|
+
default: "div"
|
4813
|
+
},
|
4814
|
+
triggerTag: String,
|
4815
|
+
contentTag: String
|
4816
|
+
},
|
4803
4817
|
data: function data() {
|
4804
4818
|
return {
|
4805
4819
|
tip: null,
|
@@ -5079,11 +5093,24 @@
|
|
5079
5093
|
|
5080
5094
|
var _c = _vm._self._c || _h;
|
5081
5095
|
|
5082
|
-
return _c(
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5086
|
-
|
5096
|
+
return _c(_vm.tag, {
|
5097
|
+
tag: "component",
|
5098
|
+
attrs: {
|
5099
|
+
"data-tippy-component": ""
|
5100
|
+
}
|
5101
|
+
}, [_c(_vm.triggerTag || _vm.tag, {
|
5102
|
+
ref: "trigger",
|
5103
|
+
tag: "component",
|
5104
|
+
attrs: {
|
5105
|
+
"data-tippy-component-trigger": ""
|
5106
|
+
}
|
5107
|
+
}, [_vm._t("trigger")], 2), _vm._v(" "), _c(_vm.contentTag || _vm.tag, {
|
5108
|
+
ref: "content",
|
5109
|
+
tag: "component",
|
5110
|
+
attrs: {
|
5111
|
+
"data-tippy-component-content": ""
|
5112
|
+
}
|
5113
|
+
}, [_vm._t("default")], 2)], 1);
|
5087
5114
|
};
|
5088
5115
|
|
5089
5116
|
var __vue_staticRenderFns__ = [];
|
@@ -5118,9 +5145,8 @@
|
|
5118
5145
|
|
5119
5146
|
function createTippy(el, binding, vnode) {
|
5120
5147
|
var handlers = vnode.data && vnode.data.on || vnode.componentOptions && vnode.componentOptions.listeners;
|
5121
|
-
|
5122
|
-
|
5123
|
-
} : binding.value || {};
|
5148
|
+
el.setAttribute('data-tippy-directive', '');
|
5149
|
+
var opts = deriveOpts(binding);
|
5124
5150
|
var modifiers = Object.keys(binding.modifiers || {});
|
5125
5151
|
var placement = modifiers.find(function (modifier) {
|
5126
5152
|
return modifier !== 'arrow';
|
@@ -5211,7 +5237,7 @@
|
|
5211
5237
|
},
|
5212
5238
|
componentUpdated: function componentUpdated(el, binding, vnode) {
|
5213
5239
|
if (el._tippy) {
|
5214
|
-
var opts = binding
|
5240
|
+
var opts = deriveOpts(binding);
|
5215
5241
|
|
5216
5242
|
if (el.getAttribute('title') && !opts.content) {
|
5217
5243
|
opts.content = el.getAttribute('title');
|
@@ -5226,6 +5252,12 @@
|
|
5226
5252
|
}
|
5227
5253
|
}
|
5228
5254
|
});
|
5255
|
+
|
5256
|
+
function deriveOpts(binding) {
|
5257
|
+
return typeof binding.value === 'string' ? {
|
5258
|
+
content: binding.value
|
5259
|
+
} : binding.value || {};
|
5260
|
+
}
|
5229
5261
|
}
|
5230
5262
|
};
|
5231
5263
|
|
package/package.json
CHANGED
package/src/components/Tippy.vue
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<component :is="tag" data-tippy-component>
|
3
|
+
<component :is="triggerTag || tag" ref="trigger" data-tippy-component-trigger>
|
4
4
|
<slot name="trigger"></slot>
|
5
|
-
</
|
5
|
+
</component>
|
6
6
|
|
7
|
-
<
|
7
|
+
<component :is="contentTag || tag" ref="content" data-tippy-component-content>
|
8
8
|
<slot></slot>
|
9
|
-
</
|
10
|
-
</
|
9
|
+
</component>
|
10
|
+
</component>
|
11
11
|
</template>
|
12
12
|
|
13
13
|
<script>
|
@@ -15,15 +15,21 @@ import tippy from 'tippy.js'
|
|
15
15
|
import humps from "humps";
|
16
16
|
import defaultProps, { booleanProps } from "../props";
|
17
17
|
export default {
|
18
|
-
props:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
props: {
|
19
|
+
to: undefined,
|
20
|
+
toSelector: undefined,
|
21
|
+
toElement: undefined,
|
22
|
+
content: undefined,
|
23
|
+
enabled: undefined,
|
24
|
+
visible: undefined,
|
25
|
+
triggerTarget: undefined,
|
26
|
+
tag: {
|
27
|
+
type: String,
|
28
|
+
default: "div"
|
29
|
+
},
|
30
|
+
triggerTag: String,
|
31
|
+
contentTag: String
|
32
|
+
},
|
27
33
|
data() {
|
28
34
|
return {
|
29
35
|
tip: null,
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<component :is="tag" data-tippy-component>
|
3
|
+
<component :is="triggerTag || tag" ref="trigger">
|
4
4
|
<slot name="trigger"></slot>
|
5
|
-
</
|
5
|
+
</component>
|
6
6
|
|
7
|
-
<
|
7
|
+
<component :is="contentTag || tag" ref="content">
|
8
8
|
<slot></slot>
|
9
|
-
</
|
10
|
-
</
|
9
|
+
</component>
|
10
|
+
</component>
|
11
11
|
</template>
|
12
12
|
|
13
13
|
<script>
|
@@ -15,15 +15,21 @@ import tippy from 'tippy.js/esm/index'
|
|
15
15
|
import humps from "humps";
|
16
16
|
import defaultProps, { booleanProps } from "../props";
|
17
17
|
export default {
|
18
|
-
props:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
props: {
|
19
|
+
to: undefined,
|
20
|
+
toSelector: undefined,
|
21
|
+
toElement: undefined,
|
22
|
+
content: undefined,
|
23
|
+
enabled: undefined,
|
24
|
+
visible: undefined,
|
25
|
+
triggerTarget: undefined,
|
26
|
+
tag: {
|
27
|
+
type: String,
|
28
|
+
default: "div"
|
29
|
+
},
|
30
|
+
triggerTag: String,
|
31
|
+
contentTag: String
|
32
|
+
},
|
27
33
|
data() {
|
28
34
|
return {
|
29
35
|
tip: null,
|
package/src/index.js
CHANGED
@@ -14,7 +14,9 @@ const plugin = {
|
|
14
14
|
const handlers = (vnode.data && vnode.data.on) ||
|
15
15
|
(vnode.componentOptions && vnode.componentOptions.listeners)
|
16
16
|
|
17
|
-
|
17
|
+
el.setAttribute('data-tippy-directive', '')
|
18
|
+
|
19
|
+
let opts = deriveOpts(binding)
|
18
20
|
|
19
21
|
const modifiers = Object.keys(binding.modifiers || {})
|
20
22
|
const placement = modifiers.find(modifier => modifier !== 'arrow')
|
@@ -92,7 +94,7 @@ const plugin = {
|
|
92
94
|
},
|
93
95
|
componentUpdated (el, binding, vnode) {
|
94
96
|
if (el._tippy) {
|
95
|
-
const opts = binding
|
97
|
+
const opts = deriveOpts(binding)
|
96
98
|
|
97
99
|
if (el.getAttribute('title') && !opts.content) {
|
98
100
|
opts.content = el.getAttribute('title')
|
@@ -107,6 +109,10 @@ const plugin = {
|
|
107
109
|
}
|
108
110
|
},
|
109
111
|
})
|
112
|
+
|
113
|
+
function deriveOpts (binding) {
|
114
|
+
return typeof binding.value === 'string' ? { content: binding.value } : binding.value || {}
|
115
|
+
}
|
110
116
|
},
|
111
117
|
}
|
112
118
|
|