@opentiny/vue-tooltip
Advanced tools
Comparing version 3.11.0 to 3.12.0
@@ -55,8 +55,2 @@ function _extends() { | ||
}, | ||
boundariesPadding: { | ||
type: Number, | ||
default: function _default5() { | ||
return 5; | ||
} | ||
}, | ||
content: { | ||
@@ -70,3 +64,3 @@ type: [String, Object] | ||
type: Boolean, | ||
default: function _default6() { | ||
default: function _default5() { | ||
return true; | ||
@@ -77,3 +71,3 @@ } | ||
type: Number, | ||
default: function _default7() { | ||
default: function _default6() { | ||
return 0; | ||
@@ -89,3 +83,3 @@ } | ||
offset: { | ||
default: function _default8() { | ||
default: function _default7() { | ||
return 0; | ||
@@ -96,3 +90,3 @@ } | ||
type: String, | ||
default: function _default9() { | ||
default: function _default8() { | ||
return "dark"; | ||
@@ -103,3 +97,3 @@ } | ||
type: Number, | ||
default: function _default10() { | ||
default: function _default9() { | ||
return 0; | ||
@@ -110,3 +104,3 @@ } | ||
type: Number, | ||
default: function _default11() { | ||
default: function _default10() { | ||
return 100; | ||
@@ -117,3 +111,3 @@ } | ||
type: String, | ||
default: function _default12() { | ||
default: function _default11() { | ||
return "bottom"; | ||
@@ -127,7 +121,4 @@ } | ||
popperOptions: { | ||
default: function _default13() { | ||
return { | ||
gpuAcceleration: false, | ||
boundariesPadding: 10 | ||
}; | ||
default: function _default12() { | ||
return {}; | ||
} | ||
@@ -144,3 +135,3 @@ }, | ||
type: Number, | ||
default: function _default14() { | ||
default: function _default13() { | ||
return 0; | ||
@@ -151,3 +142,3 @@ } | ||
type: String, | ||
default: function _default15() { | ||
default: function _default14() { | ||
return "tiny-fade-in-linear"; | ||
@@ -164,3 +155,3 @@ } | ||
type: Boolean, | ||
default: function _default16() { | ||
default: function _default15() { | ||
return true; | ||
@@ -171,3 +162,3 @@ } | ||
type: Boolean, | ||
default: function _default17() { | ||
default: function _default16() { | ||
return true; | ||
@@ -178,3 +169,3 @@ } | ||
type: String, | ||
default: function _default18() { | ||
default: function _default17() { | ||
return "next"; | ||
@@ -196,3 +187,3 @@ } | ||
}); | ||
var version = "3.11.0"; | ||
var version = "3.12.0"; | ||
Tooltip.model = { | ||
@@ -199,0 +190,0 @@ prop: "modelValue", |
@@ -17,5 +17,5 @@ function _extends() { | ||
import { renderless, api } from "@opentiny/vue-renderless/tooltip/vue"; | ||
import { defineComponent, $prefix, $props, setup as _setup, createComponent, h, mergeClass, parseVnode } from "@opentiny/vue-common"; | ||
import { defineComponent, $prefix, $props, setup as _setup, createComponent, h, mergeClass, parseVnode, isEmptyVnode } from "@opentiny/vue-common"; | ||
var classes = { | ||
"tooltip": "absolute -left-[9999px] py-2 px-3 sm:py-1.5 sm:px-2 text-sm sm:text-xs bg-color-text-primary text-color-text-inverse shadow-none sm:bg-color-bg-1 sm:text-color-text-primary sm:shadow-md leading-tight min-w-[3.75rem] max-w-[28.125rem] z-[2000] break-words rounded [&[x-placement^=top]]:mb-2.5 [&[x-placement^=bottom]]:mt-2.5 [&[x-placement^=right]]:ml-2.5 [&[x-placement^=left]]:mr-2.5", | ||
"tooltip": "absolute -left-[9999px] py-2 px-3 sm:py-1.5 sm:px-2 text-sm sm:text-xs bg-color-text-primary text-color-text-inverse shadow-none sm:bg-color-bg-1 sm:text-color-text-primary sm:shadow-md leading-tight min-w-[theme(spacing.12)] max-w-[theme(spacing.112)] z-[2000] break-words rounded [&[x-placement^=top]]:mb-2.5 [&[x-placement^=bottom]]:mt-2.5 [&[x-placement^=right]]:ml-2.5 [&[x-placement^=left]]:mr-2.5", | ||
"arrow": 'drop-shadow-none absolute block w-0 h-0 border-[0.375rem] border-transparent border-solid after:absolute after:block after:w-0 after:h-0 after:border-[0.3125rem] after:border-transparent after:border-solid after:content-[""]', | ||
@@ -70,3 +70,3 @@ "placement-top": "sm:drop-shadow-[0_2px_2px_rgba(0,0,0,0.08)] -bottom-3 border-t-color-text-primary sm:border-t-color-bg-1 border-b-w-0 sm:after:border-t-color-bg-1 after:-bottom-1 after:-ml-1.5 after:border-t-color-text-primary after:border-b-w-0", | ||
content: { | ||
type: [String, Object] | ||
type: String | ||
}, | ||
@@ -142,2 +142,8 @@ disabled: { | ||
}, | ||
transformOrigin: { | ||
type: [Boolean, String], | ||
default: function _default14() { | ||
return true; | ||
} | ||
}, | ||
type: { | ||
@@ -151,3 +157,3 @@ type: String, | ||
type: Boolean, | ||
default: function _default14() { | ||
default: function _default15() { | ||
return true; | ||
@@ -158,3 +164,3 @@ } | ||
type: Boolean, | ||
default: function _default15() { | ||
default: function _default16() { | ||
return true; | ||
@@ -165,3 +171,3 @@ } | ||
type: String, | ||
default: function _default16() { | ||
default: function _default17() { | ||
return "next"; | ||
@@ -190,3 +196,5 @@ } | ||
} else if (vm.pre) { | ||
attrContent = vm.content ? h("pre", vm.content) : null; | ||
attrContent = vm.content ? h("pre", { | ||
class: "whitespace-pre-wrap" | ||
}, vm.content) : null; | ||
} else { | ||
@@ -197,46 +205,53 @@ attrContent = vm.content; | ||
}; | ||
Object.prototype.hasOwnProperty.call(this, "popperVM") || this.d({ | ||
popperVM: { | ||
get: function get() { | ||
return createComponent({ | ||
el: document.createElement("div"), | ||
component: { | ||
render: function render2() { | ||
var content = getContent(_this); | ||
var propsData = { | ||
on: { | ||
"after-leave": _this.doDestroy | ||
} | ||
}; | ||
var mouseenter = function mouseenter2() { | ||
return _this.setExpectedState(true); | ||
}; | ||
var mouseleave = function mouseleave2() { | ||
_this.setExpectedState(false); | ||
_this.debounceClose(); | ||
}; | ||
var xPlacement = _this.state.xPlacement || ""; | ||
return h("transition", propsData, [withDirectives(createVNode("div", { | ||
"ref": "popper", | ||
"id": _this.state.tooltipId, | ||
"appendToBody": _this.appendToBody, | ||
"class": mergeClass([classes.tooltip, _this.effect === "dark" ? "bg-color-text-primary text-color-text-inverse shadow-none" : "", _this.effect === "light" ? "bg-color-bg-1 text-color-text-primary shadow-md" : "", _this.disabled || !_this.state.showPopper ? "hidden" : "", _this.popperClass]), | ||
"role": "tooltip", | ||
"aria-hidden": _this.disabled || !_this.state.showPopper ? "true" : "false", | ||
"onMouseenter": function onMouseenter() { | ||
return mouseenter(); | ||
}, | ||
"onMouseleave": function onMouseleave() { | ||
return mouseleave(); | ||
} | ||
}, [content, _this.visibleArrow ? createVNode("div", { | ||
"x-arrow": true, | ||
"class": mergeClass([classes.arrow, classes["placement-" + xPlacement.split("-")[0]], _this.effect === "light" ? classes["placement-" + xPlacement.split("-")[0] + "-light"] : "", _this.effect === "dark" ? classes["placement-" + xPlacement.split("-")[0] + "-dark"] : ""]) | ||
}, null) : ""]), [[vShow, !_this.disabled && _this.state.showPopper && content]])]); | ||
if (!Object.hasOwnProperty.call(this, "popperVM")) { | ||
var popperVM = createComponent({ | ||
el: document.createElement("div"), | ||
component: { | ||
render: function render2() { | ||
var content = getContent(_this); | ||
var propsData = { | ||
on: { | ||
"after-leave": _this.doDestroy | ||
} | ||
} | ||
}); | ||
}; | ||
var mouseenter = function mouseenter2() { | ||
return _this.setExpectedState(true); | ||
}; | ||
var mouseleave = function mouseleave2() { | ||
_this.setExpectedState(false); | ||
_this.debounceClose(); | ||
}; | ||
var xPlacement = _this.state.xPlacement || ""; | ||
return h("transition", propsData, [withDirectives(createVNode("div", { | ||
"data-tag": "tiny-tooltip", | ||
"ref": "popper", | ||
"id": _this.state.tooltipId, | ||
"appendToBody": _this.appendToBody, | ||
"class": mergeClass([classes.tooltip, _this.effect === "dark" ? "bg-color-text-primary text-color-text-inverse shadow-none" : "", _this.effect === "light" ? "bg-color-bg-1 text-color-text-primary shadow-md" : "", _this.disabled || !_this.state.showPopper ? "hidden" : "", _this.popperClass]), | ||
"role": "tooltip", | ||
"aria-hidden": _this.disabled || !_this.state.showPopper ? "true" : "false", | ||
"onMouseenter": function onMouseenter() { | ||
return mouseenter(); | ||
}, | ||
"onMouseleave": function onMouseleave() { | ||
return mouseleave(); | ||
} | ||
}, [content, _this.visibleArrow ? createVNode("div", { | ||
"x-arrow": true, | ||
"class": mergeClass([classes.arrow, classes["placement-" + xPlacement.split("-")[0]], _this.effect === "light" ? classes["placement-" + xPlacement.split("-")[0] + "-light"] : "", _this.effect === "dark" ? classes["placement-" + xPlacement.split("-")[0] + "-dark"] : ""]) | ||
}, null) : ""]), [[vShow, !_this.disabled && _this.state.showPopper && content]])]); | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
this.d({ | ||
popperVM: { | ||
get: function get() { | ||
return popperVM; | ||
}, | ||
set: function set(v) { | ||
return popperVM = v; | ||
} | ||
} | ||
}); | ||
} | ||
var stringifyBindClass = function stringifyBindClass2(bindClass, removeClassRE) { | ||
@@ -289,4 +304,5 @@ var trimStr = function trimStr2(str) { | ||
var vnode = parseVnode(slots[index]); | ||
if (vnode && vnode.type) { | ||
if (!isEmptyVnode(vnode)) { | ||
element = vnode; | ||
break; | ||
} | ||
@@ -293,0 +309,0 @@ } |
{ | ||
"name": "@opentiny/vue-tooltip", | ||
"version": "3.11.0", | ||
"version": "3.12.0", | ||
"description": "", | ||
@@ -10,4 +10,4 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.11.0", | ||
"@opentiny/vue-common": "~3.11.0" | ||
"@opentiny/vue-renderless": "~3.12.0", | ||
"@opentiny/vue-common": "~3.12.0" | ||
}, | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
@@ -20,6 +20,2 @@ import type { ITooltipApi } from '@opentiny/vue-renderless/types/tooltip.type'; | ||
}; | ||
boundariesPadding: { | ||
type: NumberConstructor; | ||
default: () => number; | ||
}; | ||
content: { | ||
@@ -69,6 +65,3 @@ type: (ObjectConstructor | StringConstructor)[]; | ||
popperOptions: { | ||
default: () => { | ||
gpuAcceleration: boolean; | ||
boundariesPadding: number; | ||
}; | ||
default: () => {}; | ||
}; | ||
@@ -131,6 +124,2 @@ pre: { | ||
}; | ||
boundariesPadding: { | ||
type: NumberConstructor; | ||
default: () => number; | ||
}; | ||
content: { | ||
@@ -180,6 +169,3 @@ type: (ObjectConstructor | StringConstructor)[]; | ||
popperOptions: { | ||
default: () => { | ||
gpuAcceleration: boolean; | ||
boundariesPadding: number; | ||
}; | ||
default: () => {}; | ||
}; | ||
@@ -241,6 +227,2 @@ pre: { | ||
}; | ||
boundariesPadding: { | ||
type: NumberConstructor; | ||
default: () => number; | ||
}; | ||
content: { | ||
@@ -290,6 +272,3 @@ type: (ObjectConstructor | StringConstructor)[]; | ||
popperOptions: { | ||
default: () => { | ||
gpuAcceleration: boolean; | ||
boundariesPadding: number; | ||
}; | ||
default: () => {}; | ||
}; | ||
@@ -349,7 +328,3 @@ pre: { | ||
manual: boolean; | ||
popperOptions: { | ||
gpuAcceleration: boolean; | ||
boundariesPadding: number; | ||
}; | ||
boundariesPadding: number; | ||
popperOptions: {}; | ||
closeDelay: number; | ||
@@ -356,0 +331,0 @@ openDelay: number; |
38435
1360
+ Added@opentiny/vue-common@3.12.0(transitive)
+ Added@opentiny/vue-locale@3.12.0(transitive)
+ Added@opentiny/vue-renderless@3.12.1(transitive)
+ Added@opentiny/vue-theme@3.12.1(transitive)
+ Added@opentiny/vue-theme-mobile@3.12.0(transitive)
- Removed@opentiny/vue-common@3.11.0(transitive)
- Removed@opentiny/vue-locale@3.11.0(transitive)
- Removed@opentiny/vue-renderless@3.11.8(transitive)
- Removed@opentiny/vue-theme@3.11.6(transitive)
- Removed@opentiny/vue-theme-mobile@3.11.1(transitive)
Updated@opentiny/vue-common@~3.12.0