@purpurds/tooltip 5.8.0 → 5.8.1
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/.rush/temp/ci_build/@purpurds/tooltip/{3960d0defc3f346e8d7b248f295d65c77b250512.untar.log → db7528324279007813dd961a889972d6b0d8f8d8.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +6 -6
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +3 -3
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/dist/LICENSE.txt +5 -5
- package/dist/styles.css +1 -1
- package/dist/tooltip.cjs.js +6 -6
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.es.js +604 -609
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +6 -6
- package/src/tooltip.module.scss +11 -10
- package/src/tooltip.tsx +5 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/tooltip",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/tooltip.cjs.js",
|
|
6
6
|
"types": "./dist/tooltip.d.ts",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@radix-ui/react-tooltip": "~1.0.7",
|
|
18
18
|
"classnames": "~2.5.0",
|
|
19
|
-
"@purpurds/button": "5.8.
|
|
20
|
-
"@purpurds/action": "5.8.
|
|
21
|
-
"@purpurds/icon": "5.8.
|
|
22
|
-
"@purpurds/paragraph": "5.8.
|
|
23
|
-
"@purpurds/tokens": "5.8.
|
|
19
|
+
"@purpurds/button": "5.8.1",
|
|
20
|
+
"@purpurds/action": "5.8.1",
|
|
21
|
+
"@purpurds/icon": "5.8.1",
|
|
22
|
+
"@purpurds/paragraph": "5.8.1",
|
|
23
|
+
"@purpurds/tokens": "5.8.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@rushstack/eslint-patch": "~1.10.0",
|
package/src/tooltip.module.scss
CHANGED
|
@@ -14,19 +14,24 @@
|
|
|
14
14
|
&--primary {
|
|
15
15
|
background-color: var(--purpur-color-background-tone-on-tone-primary);
|
|
16
16
|
}
|
|
17
|
+
|
|
17
18
|
&--primary-negative {
|
|
18
19
|
background-color: var(--purpur-color-background-tone-on-tone-secondary);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
|
|
21
23
|
&__content[data-state="delayed-open"][data-side="top"] {
|
|
22
24
|
animation-name: slideDownAndFade;
|
|
23
25
|
}
|
|
26
|
+
|
|
24
27
|
&__content[data-state="delayed-open"][data-side="right"] {
|
|
25
28
|
animation-name: slideLeftAndFade;
|
|
26
29
|
}
|
|
30
|
+
|
|
27
31
|
&__content[data-state="delayed-open"][data-side="bottom"] {
|
|
28
32
|
animation-name: slideUpAndFade;
|
|
29
33
|
}
|
|
34
|
+
|
|
30
35
|
&__content[data-state="delayed-open"][data-side="left"] {
|
|
31
36
|
animation-name: slideRightAndFade;
|
|
32
37
|
}
|
|
@@ -35,17 +40,9 @@
|
|
|
35
40
|
&--primary {
|
|
36
41
|
fill: var(--purpur-color-background-tone-on-tone-primary);
|
|
37
42
|
}
|
|
38
|
-
&--primary-negative {
|
|
39
|
-
fill: var(--purpur-color-background-tone-on-tone-secondary);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
43
|
|
|
43
|
-
&__paragraph {
|
|
44
|
-
&--primary {
|
|
45
|
-
color: var(--purpur-color-text-tone-on-tone-primary);
|
|
46
|
-
}
|
|
47
44
|
&--primary-negative {
|
|
48
|
-
|
|
45
|
+
fill: var(--purpur-color-background-tone-on-tone-secondary);
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
}
|
|
@@ -55,6 +52,7 @@
|
|
|
55
52
|
opacity: 0;
|
|
56
53
|
transform: translateY(2px);
|
|
57
54
|
}
|
|
55
|
+
|
|
58
56
|
to {
|
|
59
57
|
opacity: 1;
|
|
60
58
|
transform: translateY(0);
|
|
@@ -66,6 +64,7 @@
|
|
|
66
64
|
opacity: 0;
|
|
67
65
|
transform: translateX(-2px);
|
|
68
66
|
}
|
|
67
|
+
|
|
69
68
|
to {
|
|
70
69
|
opacity: 1;
|
|
71
70
|
transform: translateX(0);
|
|
@@ -77,6 +76,7 @@
|
|
|
77
76
|
opacity: 0;
|
|
78
77
|
transform: translateY(-2px);
|
|
79
78
|
}
|
|
79
|
+
|
|
80
80
|
to {
|
|
81
81
|
opacity: 1;
|
|
82
82
|
transform: translateY(0);
|
|
@@ -88,8 +88,9 @@
|
|
|
88
88
|
opacity: 0;
|
|
89
89
|
transform: translateX(2px);
|
|
90
90
|
}
|
|
91
|
+
|
|
91
92
|
to {
|
|
92
93
|
opacity: 1;
|
|
93
94
|
transform: translateX(0);
|
|
94
95
|
}
|
|
95
|
-
}
|
|
96
|
+
}
|
package/src/tooltip.tsx
CHANGED
|
@@ -97,19 +97,16 @@ export const Tooltip = forwardRef(
|
|
|
97
97
|
align={align}
|
|
98
98
|
className={cx([
|
|
99
99
|
contentClassName,
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
`${rootClassName}__content`,
|
|
101
|
+
`${rootClassName}__content--primary${negative ? "-negative" : ""}`,
|
|
102
102
|
])}
|
|
103
103
|
sideOffset={-5}
|
|
104
104
|
data-testid={`${dataTestId}-content`}
|
|
105
105
|
>
|
|
106
106
|
{typeof children === "string" ? (
|
|
107
107
|
<Paragraph
|
|
108
|
-
className={cx([
|
|
109
|
-
styles[`${rootClassName}__paragraph`],
|
|
110
|
-
styles[`${rootClassName}__paragraph--primary${negative ? "-negative" : ""}`],
|
|
111
|
-
])}
|
|
112
108
|
variant={ParagraphVariant.PARAGRAPH100}
|
|
109
|
+
negative={!negative}
|
|
113
110
|
data-testid={`${dataTestId}-paragraph`}
|
|
114
111
|
>
|
|
115
112
|
{children}
|
|
@@ -119,8 +116,8 @@ export const Tooltip = forwardRef(
|
|
|
119
116
|
)}
|
|
120
117
|
<RadixTooltip.Arrow
|
|
121
118
|
className={cx([
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
`${rootClassName}__arrow`,
|
|
120
|
+
`${rootClassName}__arrow--primary${negative ? "-negative" : ""}`,
|
|
124
121
|
])}
|
|
125
122
|
/>
|
|
126
123
|
</RadixTooltip.Content>
|