@opentiny/vue-tooltip
Advanced tools
Comparing version 2.17.0 to 2.18.0
@@ -171,3 +171,3 @@ function _extends() { | ||
}); | ||
var version = "2.17.0"; | ||
var version = "2.18.0"; | ||
Tooltip.model = { | ||
@@ -174,0 +174,0 @@ prop: "modelValue", |
import { renderless, api } from '@opentiny/vue-renderless/tooltip/vue'; | ||
import { defineComponent, $prefix, $props, setup, createComponent, hooks, parseVnode, isEmptyVnode } from '@opentiny/vue-common'; | ||
import { defineComponent, $prefix, $props, setup, createComponent, deduplicateCssClass, stringifyCssClass, hooks, parseVnode, isEmptyVnode } from '@opentiny/vue-common'; | ||
import '@opentiny/vue-theme/tooltip/index.css'; | ||
@@ -306,27 +306,2 @@ | ||
} | ||
var stringifyClassObj = function stringifyClassObj2(classObj) { | ||
return Object.keys(classObj).filter(function(key) { | ||
return classObj[key]; | ||
}).join(" "); | ||
}; | ||
var stringifyClassArr = function stringifyClassArr2(classArr) { | ||
return classArr.filter(function(item) { | ||
return item; | ||
}).map(function(item) { | ||
return typeof item === "string" ? item.trim() : typeof item === "object" ? stringifyClassObj(item) : ""; | ||
}).join(" "); | ||
}; | ||
var addTooltipClass = function addTooltipClass2(bindClass) { | ||
var className = ""; | ||
if (bindClass) { | ||
if (typeof bindClass === "string") { | ||
className = bindClass.trim(); | ||
} else if (Array.isArray(bindClass)) { | ||
className = stringifyClassArr(bindClass); | ||
} else if (typeof bindClass === "object") { | ||
className = stringifyClassObj(bindClass); | ||
} | ||
} | ||
return "tiny-tooltip " + className.replace(/\btiny-tooltip\b/g, "").trim(); | ||
}; | ||
var getFirstElement = function getFirstElement2() { | ||
@@ -350,3 +325,3 @@ var slots = _this.slots.default && _this.slots.default(); | ||
var data = firstElement.data || firstElement.props || (firstElement.props = {}); | ||
data.class = addTooltipClass(data.class); | ||
data.class = deduplicateCssClass("tiny-tooltip " + stringifyCssClass(data.class)); | ||
return firstElement; | ||
@@ -353,0 +328,0 @@ } |
{ | ||
"name": "@opentiny/vue-tooltip", | ||
"version": "2.17.0", | ||
"version": "2.18.0", | ||
"description": "", | ||
@@ -10,5 +10,5 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@opentiny/vue-renderless": "~3.17.0", | ||
"@opentiny/vue-common": "~2.17.0", | ||
"@opentiny/vue-theme": "~3.17.0" | ||
"@opentiny/vue-renderless": "~3.18.0", | ||
"@opentiny/vue-common": "~2.18.0", | ||
"@opentiny/vue-theme": "~3.18.0" | ||
}, | ||
@@ -15,0 +15,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35227
1098
+ Added@opentiny/vue-common@2.18.0(transitive)
+ Added@opentiny/vue-locale@2.18.0(transitive)
+ Added@opentiny/vue-renderless@3.18.2(transitive)
+ Added@opentiny/vue-theme@3.18.1(transitive)
+ Added@opentiny/vue-theme-mobile@3.18.0(transitive)
- Removed@opentiny/vue-common@2.17.0(transitive)
- Removed@opentiny/vue-locale@2.17.0(transitive)
- Removed@opentiny/vue-renderless@3.17.6(transitive)
- Removed@opentiny/vue-theme@3.17.5(transitive)
- Removed@opentiny/vue-theme-mobile@3.17.0(transitive)
Updated@opentiny/vue-common@~2.18.0
Updated@opentiny/vue-theme@~3.18.0