@symbo.ls/tooltip 2.11.480 → 2.11.491
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/index.js +28 -26
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -51,13 +51,13 @@ export const TooltipHidden = {
|
|
|
51
51
|
visibility: 'hidden',
|
|
52
52
|
transition: 'C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform',
|
|
53
53
|
|
|
54
|
-
...(props.shapeDirection === 'top'
|
|
54
|
+
...(!props.shapeDirection || props.shapeDirection === 'top'
|
|
55
55
|
? {
|
|
56
56
|
top: '112%',
|
|
57
57
|
left: '50%',
|
|
58
58
|
transform: 'translate3d(-50%,10%,0)',
|
|
59
59
|
|
|
60
|
-
'.
|
|
60
|
+
'.isActive': {
|
|
61
61
|
transform: 'translate3d(-50%,0,0)',
|
|
62
62
|
opacity: 1,
|
|
63
63
|
visibility: 'visible'
|
|
@@ -66,38 +66,40 @@ export const TooltipHidden = {
|
|
|
66
66
|
: props.shapeDirection === 'right'
|
|
67
67
|
? {
|
|
68
68
|
transform: 'translate3d(10%,-50%,0)',
|
|
69
|
-
|
|
69
|
+
left: '112%',
|
|
70
70
|
top: '50%',
|
|
71
71
|
|
|
72
|
-
'.
|
|
72
|
+
'.isActive': {
|
|
73
73
|
transform: 'translate3d(0%,-50%,0)',
|
|
74
74
|
opacity: 1,
|
|
75
75
|
visibility: 'visible'
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
: props.shapeDirection === 'bottom'
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
: ({ props }) => props.shapeDirection === 'bottom'
|
|
79
|
+
? {
|
|
80
|
+
transform: 'translate3d(-50%,-10%,0)',
|
|
81
|
+
bottom: '112%',
|
|
82
|
+
left: '50%',
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
'.isActive': {
|
|
85
|
+
transform: 'translate3d(-50%,0,0)',
|
|
86
|
+
opacity: 1,
|
|
87
|
+
visibility: 'visible'
|
|
88
|
+
}
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
: props.shapeDirection === 'left'
|
|
91
|
+
? {
|
|
92
|
+
transform: 'translate3d(10%,-50%,0)',
|
|
93
|
+
right: '112%',
|
|
94
|
+
top: '50%',
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
'.isActive': {
|
|
97
|
+
transform: 'translate3d(0%,-50%,0)',
|
|
98
|
+
opacity: 1,
|
|
99
|
+
visibility: 'visible'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
: {})
|
|
101
103
|
})
|
|
102
104
|
}
|
|
103
105
|
|
|
@@ -106,14 +108,14 @@ export const TooltipParent = {
|
|
|
106
108
|
const { Tooltip, TooltipHidden } = el
|
|
107
109
|
const TooltipElem = (Tooltip || TooltipHidden)
|
|
108
110
|
if (!TooltipElem) return
|
|
109
|
-
const TooltipActive = TooltipElem && TooltipElem.props && TooltipElem.props['.
|
|
111
|
+
const TooltipActive = TooltipElem && TooltipElem.props && TooltipElem.props['.isActive']
|
|
110
112
|
return {
|
|
111
113
|
position: 'relative',
|
|
112
114
|
zIndex: 999,
|
|
113
115
|
':hover, &:focus-visible': {
|
|
114
116
|
zIndex: 1000,
|
|
115
117
|
'& [tooltip]': TooltipActive || {
|
|
116
|
-
transform: 'translate3d(-50%,0,0)',
|
|
118
|
+
transform: 'translate3d(-50%, 0, 0)',
|
|
117
119
|
opacity: 1,
|
|
118
120
|
visibility: 'visible'
|
|
119
121
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/tooltip",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.491",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "ddd06b2b342480b2e20c02df04f9856d4ddf7060",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@symbo.ls/atoms": "^2.11.
|
|
8
|
+
"@symbo.ls/atoms": "^2.11.491"
|
|
9
9
|
},
|
|
10
10
|
"source": "src/index.js"
|
|
11
11
|
}
|