@symbo.ls/tooltip 2.11.212 → 2.11.215
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 +13 -8
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import { isDefined } from '@domql/utils'
|
|
3
4
|
import { Flex } from '@symbo.ls/atoms'
|
|
4
5
|
|
|
5
6
|
export const Tooltip = {
|
|
@@ -22,21 +23,25 @@ export const Tooltip = {
|
|
|
22
23
|
attr: { tooltip: true },
|
|
23
24
|
|
|
24
25
|
Title: {
|
|
25
|
-
|
|
26
|
+
if: ({ parent, props }) => isDefined(parent.props.title) || props.text,
|
|
27
|
+
props: ({ parent }) => ({
|
|
28
|
+
width: 'fit-content',
|
|
26
29
|
fontWeight: 500,
|
|
27
30
|
color: 'gray12',
|
|
28
|
-
text:
|
|
29
|
-
}
|
|
31
|
+
text: parent.props.title
|
|
32
|
+
})
|
|
30
33
|
},
|
|
31
34
|
|
|
32
35
|
P: {
|
|
33
|
-
|
|
36
|
+
if: ({ parent, props }) => isDefined(parent.props.description) || props.text,
|
|
37
|
+
props: ({ parent }) => ({
|
|
38
|
+
width: 'fit-content',
|
|
34
39
|
fontSize: 'Z2',
|
|
35
40
|
margin: '0',
|
|
36
41
|
color: 'gray6',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
42
|
+
fontWeight: '400',
|
|
43
|
+
text: parent.props.description
|
|
44
|
+
})
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
47
|
|
|
@@ -103,7 +108,7 @@ export const TooltipHidden = {
|
|
|
103
108
|
export const TooltipParent = {
|
|
104
109
|
props: ({ Tooltip, TooltipHidden }) => {
|
|
105
110
|
const TooltipElem = (Tooltip || TooltipHidden)
|
|
106
|
-
const TooltipActive = TooltipElem && TooltipElem['.active']
|
|
111
|
+
const TooltipActive = TooltipElem && TooltipElem.props['.active']
|
|
107
112
|
return {
|
|
108
113
|
position: 'relative',
|
|
109
114
|
zIndex: 999,
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/tooltip",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.215",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "1dc01c98b5717566aaee3155b73829e428d51055",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@symbo.ls/atoms": "latest"
|
|
9
9
|
},
|