@semcore/tooltip
Advanced tools
Comparing version 3.1.1 to 3.2.0
@@ -5,2 +5,16 @@ # Changelog | ||
## [3.2.0] - 2019-09-30 | ||
### Changed | ||
- Обновлена зависимость `Popper` | ||
- Добавлено дефолтное свойство inline для триггера | ||
## [3.1.2] - 2019-09-30 | ||
### Changed | ||
- Нужные зависимости перенесены в `utils`, размер должен стать меньше | ||
## [3.1.1] - 2019-09-27 | ||
@@ -7,0 +21,0 @@ |
@@ -22,27 +22,2 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties'; | ||
var data = { | ||
"block": { | ||
"block": "_tooltip_1o682_3", | ||
"theme": { | ||
"default": "_tooltip--theme_default_1o682_17", | ||
"invert": "_tooltip--theme_invert_1o682_23" | ||
}, | ||
"out-of-boundaries": { | ||
"block": "_tooltip--out-of-boundaries_1o682_29" | ||
} | ||
}, | ||
"close": { | ||
"block": "_tooltip__close_1o682_33" | ||
}, | ||
"arrow": { | ||
"block": "_tooltip__arrow_1o682_46", | ||
"placement": { | ||
"top": "_tooltip__arrow--placement_top_1o682_77", | ||
"left": "_tooltip__arrow--placement_left_1o682_93", | ||
"bottom": "_tooltip__arrow--placement_bottom_1o682_110", | ||
"right": "_tooltip__arrow--placement_right_1o682_126" | ||
} | ||
} | ||
}; | ||
(function cssModulesFnInject(_path) { | ||
@@ -52,9 +27,10 @@ if (_path && typeof window !== 'undefined') { | ||
var prevStyle = head.querySelector('._css-style'); | ||
var css = "._tooltip_1mtmy_3{position:relative;padding:16px;color:#333;border-radius:3px;box-sizing:border-box;font-size:12px;line-height:1.5;word-wrap:break-word;max-width:250px;white-space:normal}._tooltip--theme_default_1mtmy_17{background:#fff;border:1px solid #bdc4c6;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25)}._tooltip--theme_invert_1mtmy_23{color:#fff;background:#000;border:3px solid #fff}._tooltip--out-of-boundaries_1mtmy_29{display:none}._tooltip__close_1mtmy_33{position:absolute;right:8px;top:8px;cursor:pointer;color:#ccc;font-size:0}._tooltip__close_1mtmy_33:hover{color:#ababab}._tooltip__arrow_1mtmy_46,._tooltip__arrow_1mtmy_46:before{width:0;height:0;position:absolute;border:6px solid}._tooltip__arrow_1mtmy_46:before{content:\"\";z-index:-1}._tooltip--theme_default_1mtmy_17 ._tooltip__arrow_1mtmy_46{border-color:#fff}._tooltip--theme_default_1mtmy_17 ._tooltip__arrow_1mtmy_46:before{border-color:#bdc4c6}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow_1mtmy_46{border-color:#000}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow_1mtmy_46:before{border:8px solid #fff}._tooltip_1mtmy_3 ._tooltip__arrow--placement_top_1mtmy_77,._tooltip_1mtmy_3 ._tooltip__arrow--placement_top_1mtmy_77:before{border-bottom:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_top_1mtmy_77:before{top:-5px;left:-6px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_top_1mtmy_77:before{top:-4px;left:-8px}._tooltip_1mtmy_3 ._tooltip__arrow--placement_left_1mtmy_93,._tooltip_1mtmy_3 ._tooltip__arrow--placement_left_1mtmy_93:before{border-right:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_left_1mtmy_93:before{top:-6px;left:-5px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_left_1mtmy_93:before{top:-8px;left:-3px}._tooltip_1mtmy_3 ._tooltip__arrow--placement_bottom_1mtmy_110,._tooltip_1mtmy_3 ._tooltip__arrow--placement_bottom_1mtmy_110:before{border-top:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_bottom_1mtmy_110:before{top:-1px;left:-6px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_bottom_1mtmy_110:before{top:-4px;left:-8px}._tooltip_1mtmy_3 ._tooltip__arrow--placement_right_1mtmy_126,._tooltip_1mtmy_3 ._tooltip__arrow--placement_right_1mtmy_126:before{border-left:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_right_1mtmy_126:before{top:-6px;left:-1px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_right_1mtmy_126:before{top:-8px;left:-4px}"; | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", "._tooltip_1o682_3{position:relative;padding:16px;color:#333;border-radius:3px;box-sizing:border-box;font-size:12px;line-height:1.5;word-wrap:break-word;max-width:250px;white-space:normal}._tooltip--theme_default_1o682_17{background:#fff;border:1px solid #bdc4c6;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25)}._tooltip--theme_invert_1o682_23{color:#fff;background:#000;border:3px solid #fff}._tooltip--out-of-boundaries_1o682_29{display:none}._tooltip__close_1o682_33{position:absolute;right:8px;top:8px;cursor:pointer;color:#ccc;font-size:0}._tooltip__close_1o682_33:hover{color:#ababab}._tooltip__arrow_1o682_46,._tooltip__arrow_1o682_46:before{width:0;height:0;position:absolute;border:6px solid}._tooltip__arrow_1o682_46:before{content:\"\";z-index:-1}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46{border-color:#fff}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46:before{border-color:#bdc4c6}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46{border-color:#000}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46:before{border:8px solid #fff}._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77,._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77:before{border-bottom:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_top_1o682_77:before{top:-5px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_top_1o682_77:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93,._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93:before{border-right:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_left_1o682_93:before{top:-6px;left:-5px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_left_1o682_93:before{top:-8px;left:-3px}._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110,._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110:before{border-top:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_bottom_1o682_110:before{top:-1px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_bottom_1o682_110:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126,._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126:before{border-left:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_right_1o682_126:before{top:-6px;left:-1px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_right_1o682_126:before{top:-8px;left:-4px}"); | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = "._tooltip_1o682_3{position:relative;padding:16px;color:#333;border-radius:3px;box-sizing:border-box;font-size:12px;line-height:1.5;word-wrap:break-word;max-width:250px;white-space:normal}._tooltip--theme_default_1o682_17{background:#fff;border:1px solid #bdc4c6;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25)}._tooltip--theme_invert_1o682_23{color:#fff;background:#000;border:3px solid #fff}._tooltip--out-of-boundaries_1o682_29{display:none}._tooltip__close_1o682_33{position:absolute;right:8px;top:8px;cursor:pointer;color:#ccc;font-size:0}._tooltip__close_1o682_33:hover{color:#ababab}._tooltip__arrow_1o682_46,._tooltip__arrow_1o682_46:before{width:0;height:0;position:absolute;border:6px solid}._tooltip__arrow_1o682_46:before{content:\"\";z-index:-1}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46{border-color:#fff}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46:before{border-color:#bdc4c6}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46{border-color:#000}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46:before{border:8px solid #fff}._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77,._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77:before{border-bottom:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_top_1o682_77:before{top:-5px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_top_1o682_77:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93,._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93:before{border-right:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_left_1o682_93:before{top:-6px;left:-5px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_left_1o682_93:before{top:-8px;left:-3px}._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110,._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110:before{border-top:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_bottom_1o682_110:before{top:-1px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_bottom_1o682_110:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126,._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126:before{border-left:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_right_1o682_126:before{top:-6px;left:-1px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_right_1o682_126:before{top:-8px;left:-4px}"; | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
@@ -66,26 +42,31 @@ } | ||
function block() { | ||
return data['block']['block']; | ||
return '_tooltip_1mtmy_3'; | ||
} | ||
block['theme'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['theme'][value]; | ||
block['theme'] = function (value) { | ||
return { | ||
"default": "_tooltip--theme_default_1mtmy_17", | ||
"invert": "_tooltip--theme_invert_1mtmy_23" | ||
}[value]; | ||
}; | ||
block['outOfBoundaries'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['out-of-boundaries'][value]; | ||
block['outOfBoundaries'] = function (value) { | ||
return "_tooltip--out-of-boundaries_1mtmy_29"; | ||
}; | ||
function close() { | ||
return data['close']['block']; | ||
return '_tooltip__close_1mtmy_33'; | ||
} | ||
function arrow() { | ||
return data['arrow']['block']; | ||
return '_tooltip__arrow_1mtmy_46'; | ||
} | ||
arrow['placement'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['arrow']['placement'][value]; | ||
arrow['placement'] = function (value) { | ||
return { | ||
"top": "_tooltip__arrow--placement_top_1mtmy_77", | ||
"left": "_tooltip__arrow--placement_left_1mtmy_93", | ||
"bottom": "_tooltip__arrow--placement_bottom_1mtmy_110", | ||
"right": "_tooltip__arrow--placement_right_1mtmy_126" | ||
}[value]; | ||
}; | ||
@@ -142,3 +123,4 @@ | ||
return React.createElement(Popper.Trigger, Object.assign({ | ||
consumer: Consumer | ||
consumer: Consumer, | ||
inline: true | ||
}, this.props)); | ||
@@ -145,0 +127,0 @@ } |
@@ -30,27 +30,2 @@ 'use strict'; | ||
var data = { | ||
"block": { | ||
"block": "_tooltip_1o682_3", | ||
"theme": { | ||
"default": "_tooltip--theme_default_1o682_17", | ||
"invert": "_tooltip--theme_invert_1o682_23" | ||
}, | ||
"out-of-boundaries": { | ||
"block": "_tooltip--out-of-boundaries_1o682_29" | ||
} | ||
}, | ||
"close": { | ||
"block": "_tooltip__close_1o682_33" | ||
}, | ||
"arrow": { | ||
"block": "_tooltip__arrow_1o682_46", | ||
"placement": { | ||
"top": "_tooltip__arrow--placement_top_1o682_77", | ||
"left": "_tooltip__arrow--placement_left_1o682_93", | ||
"bottom": "_tooltip__arrow--placement_bottom_1o682_110", | ||
"right": "_tooltip__arrow--placement_right_1o682_126" | ||
} | ||
} | ||
}; | ||
(function cssModulesFnInject(_path) { | ||
@@ -60,9 +35,10 @@ if (_path && typeof window !== 'undefined') { | ||
var prevStyle = head.querySelector('._css-style'); | ||
var css = "._tooltip_1mtmy_3{position:relative;padding:16px;color:#333;border-radius:3px;box-sizing:border-box;font-size:12px;line-height:1.5;word-wrap:break-word;max-width:250px;white-space:normal}._tooltip--theme_default_1mtmy_17{background:#fff;border:1px solid #bdc4c6;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25)}._tooltip--theme_invert_1mtmy_23{color:#fff;background:#000;border:3px solid #fff}._tooltip--out-of-boundaries_1mtmy_29{display:none}._tooltip__close_1mtmy_33{position:absolute;right:8px;top:8px;cursor:pointer;color:#ccc;font-size:0}._tooltip__close_1mtmy_33:hover{color:#ababab}._tooltip__arrow_1mtmy_46,._tooltip__arrow_1mtmy_46:before{width:0;height:0;position:absolute;border:6px solid}._tooltip__arrow_1mtmy_46:before{content:\"\";z-index:-1}._tooltip--theme_default_1mtmy_17 ._tooltip__arrow_1mtmy_46{border-color:#fff}._tooltip--theme_default_1mtmy_17 ._tooltip__arrow_1mtmy_46:before{border-color:#bdc4c6}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow_1mtmy_46{border-color:#000}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow_1mtmy_46:before{border:8px solid #fff}._tooltip_1mtmy_3 ._tooltip__arrow--placement_top_1mtmy_77,._tooltip_1mtmy_3 ._tooltip__arrow--placement_top_1mtmy_77:before{border-bottom:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_top_1mtmy_77:before{top:-5px;left:-6px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_top_1mtmy_77:before{top:-4px;left:-8px}._tooltip_1mtmy_3 ._tooltip__arrow--placement_left_1mtmy_93,._tooltip_1mtmy_3 ._tooltip__arrow--placement_left_1mtmy_93:before{border-right:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_left_1mtmy_93:before{top:-6px;left:-5px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_left_1mtmy_93:before{top:-8px;left:-3px}._tooltip_1mtmy_3 ._tooltip__arrow--placement_bottom_1mtmy_110,._tooltip_1mtmy_3 ._tooltip__arrow--placement_bottom_1mtmy_110:before{border-top:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_bottom_1mtmy_110:before{top:-1px;left:-6px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_bottom_1mtmy_110:before{top:-4px;left:-8px}._tooltip_1mtmy_3 ._tooltip__arrow--placement_right_1mtmy_126,._tooltip_1mtmy_3 ._tooltip__arrow--placement_right_1mtmy_126:before{border-left:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_right_1mtmy_126:before{top:-6px;left:-1px}._tooltip--theme_invert_1mtmy_23 ._tooltip__arrow--placement_right_1mtmy_126:before{top:-8px;left:-4px}"; | ||
if (prevStyle && prevStyle.insertAdjacentText) { | ||
prevStyle.insertAdjacentText("beforeend", "._tooltip_1o682_3{position:relative;padding:16px;color:#333;border-radius:3px;box-sizing:border-box;font-size:12px;line-height:1.5;word-wrap:break-word;max-width:250px;white-space:normal}._tooltip--theme_default_1o682_17{background:#fff;border:1px solid #bdc4c6;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25)}._tooltip--theme_invert_1o682_23{color:#fff;background:#000;border:3px solid #fff}._tooltip--out-of-boundaries_1o682_29{display:none}._tooltip__close_1o682_33{position:absolute;right:8px;top:8px;cursor:pointer;color:#ccc;font-size:0}._tooltip__close_1o682_33:hover{color:#ababab}._tooltip__arrow_1o682_46,._tooltip__arrow_1o682_46:before{width:0;height:0;position:absolute;border:6px solid}._tooltip__arrow_1o682_46:before{content:\"\";z-index:-1}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46{border-color:#fff}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46:before{border-color:#bdc4c6}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46{border-color:#000}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46:before{border:8px solid #fff}._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77,._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77:before{border-bottom:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_top_1o682_77:before{top:-5px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_top_1o682_77:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93,._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93:before{border-right:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_left_1o682_93:before{top:-6px;left:-5px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_left_1o682_93:before{top:-8px;left:-3px}._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110,._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110:before{border-top:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_bottom_1o682_110:before{top:-1px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_bottom_1o682_110:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126,._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126:before{border-left:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_right_1o682_126:before{top:-6px;left:-1px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_right_1o682_126:before{top:-8px;left:-4px}"); | ||
prevStyle.insertAdjacentText("beforeend", css); | ||
} else { | ||
var style = window.document.createElement("style"); | ||
style.classList.add('_css-style'); | ||
style.innerHTML = "._tooltip_1o682_3{position:relative;padding:16px;color:#333;border-radius:3px;box-sizing:border-box;font-size:12px;line-height:1.5;word-wrap:break-word;max-width:250px;white-space:normal}._tooltip--theme_default_1o682_17{background:#fff;border:1px solid #bdc4c6;box-shadow:0 2px 5px 0 rgba(0,0,0,.25),0 -2px 5px -2px rgba(0,0,0,.25)}._tooltip--theme_invert_1o682_23{color:#fff;background:#000;border:3px solid #fff}._tooltip--out-of-boundaries_1o682_29{display:none}._tooltip__close_1o682_33{position:absolute;right:8px;top:8px;cursor:pointer;color:#ccc;font-size:0}._tooltip__close_1o682_33:hover{color:#ababab}._tooltip__arrow_1o682_46,._tooltip__arrow_1o682_46:before{width:0;height:0;position:absolute;border:6px solid}._tooltip__arrow_1o682_46:before{content:\"\";z-index:-1}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46{border-color:#fff}._tooltip--theme_default_1o682_17 ._tooltip__arrow_1o682_46:before{border-color:#bdc4c6}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46{border-color:#000}._tooltip--theme_invert_1o682_23 ._tooltip__arrow_1o682_46:before{border:8px solid #fff}._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77,._tooltip_1o682_3 ._tooltip__arrow--placement_top_1o682_77:before{border-bottom:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_top_1o682_77:before{top:-5px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_top_1o682_77:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93,._tooltip_1o682_3 ._tooltip__arrow--placement_left_1o682_93:before{border-right:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_left_1o682_93:before{top:-6px;left:-5px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_left_1o682_93:before{top:-8px;left:-3px}._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110,._tooltip_1o682_3 ._tooltip__arrow--placement_bottom_1o682_110:before{border-top:0 transparent;border-right-color:transparent;border-left-color:transparent}._tooltip__arrow--placement_bottom_1o682_110:before{top:-1px;left:-6px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_bottom_1o682_110:before{top:-4px;left:-8px}._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126,._tooltip_1o682_3 ._tooltip__arrow--placement_right_1o682_126:before{border-left:0 transparent;border-top-color:transparent;border-bottom-color:transparent}._tooltip__arrow--placement_right_1o682_126:before{top:-6px;left:-1px}._tooltip--theme_invert_1o682_23 ._tooltip__arrow--placement_right_1o682_126:before{top:-8px;left:-4px}"; | ||
style.innerHTML = css; | ||
head.appendChild(style); | ||
@@ -74,26 +50,31 @@ } | ||
function block() { | ||
return data['block']['block']; | ||
return '_tooltip_1mtmy_3'; | ||
} | ||
block['theme'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['theme'][value]; | ||
block['theme'] = function (value) { | ||
return { | ||
"default": "_tooltip--theme_default_1mtmy_17", | ||
"invert": "_tooltip--theme_invert_1mtmy_23" | ||
}[value]; | ||
}; | ||
block['outOfBoundaries'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['block']['out-of-boundaries'][value]; | ||
block['outOfBoundaries'] = function (value) { | ||
return "_tooltip--out-of-boundaries_1mtmy_29"; | ||
}; | ||
function close() { | ||
return data['close']['block']; | ||
return '_tooltip__close_1mtmy_33'; | ||
} | ||
function arrow() { | ||
return data['arrow']['block']; | ||
return '_tooltip__arrow_1mtmy_46'; | ||
} | ||
arrow['placement'] = function () { | ||
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'block'; | ||
return data['arrow']['placement'][value]; | ||
arrow['placement'] = function (value) { | ||
return { | ||
"top": "_tooltip__arrow--placement_top_1mtmy_77", | ||
"left": "_tooltip__arrow--placement_left_1mtmy_93", | ||
"bottom": "_tooltip__arrow--placement_bottom_1mtmy_110", | ||
"right": "_tooltip__arrow--placement_right_1mtmy_126" | ||
}[value]; | ||
}; | ||
@@ -150,3 +131,4 @@ | ||
return React__default.createElement(Popper.Trigger, Object.assign({ | ||
consumer: Consumer | ||
consumer: Consumer, | ||
inline: true | ||
}, this.props)); | ||
@@ -153,0 +135,0 @@ } |
{ | ||
"name": "@semcore/tooltip", | ||
"description": "SEMRush Tooltip Component", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"main": "lib/index.js", | ||
@@ -12,23 +12,11 @@ "module": "lib/index.es.js", | ||
"build": "rollup --config=node:rollup-config-ts", | ||
"test": "jest --no-cache" | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.6", | ||
"@semcore/flex-box": "^3.1", | ||
"@semcore/utils": "^3.2", | ||
"@semcore/flex-box": "^3.2", | ||
"@semcore/icon": "^1.4", | ||
"@semcore/popper": "^3.3", | ||
"@semcore/utils": "^3.1", | ||
"@semcore/paint": "^3.2", | ||
"@types/react": "^16.9", | ||
"classnames": "^2.2" | ||
"@semcore/popper": "^3.5", | ||
"@semcore/paint": "^3.2" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.4" | ||
}, | ||
"devDependencies": { | ||
"jest": "*", | ||
"jest-preset-ui": "*", | ||
"react": "^16.4", | ||
"rollup-config-ts": "*" | ||
}, | ||
"jest": { | ||
@@ -35,0 +23,0 @@ "preset": "jest-preset-ui" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
5
0
3
70674
1027
- Removed@babel/runtime@^7.6
- Removed@types/react@^16.9
- Removedclassnames@^2.2
- Removed@types/prop-types@15.7.13(transitive)
- Removed@types/react@16.14.62(transitive)
- Removed@types/scheduler@0.16.8(transitive)
- Removedclassnames@2.5.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedreact@16.14.0(transitive)
Updated@semcore/flex-box@^3.2
Updated@semcore/popper@^3.5
Updated@semcore/utils@^3.2