@purpurds/tooltip 5.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/tooltip",
3
- "version": "5.7.0",
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.7.0",
20
- "@purpurds/action": "5.7.0",
21
- "@purpurds/tokens": "5.7.0",
22
- "@purpurds/icon": "5.7.0",
23
- "@purpurds/paragraph": "5.7.0"
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",
@@ -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
- color: var(--purpur-color-text-tone-on-tone-secondary);
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
- styles[`${rootClassName}__content`],
101
- styles[`${rootClassName}__content--primary${negative ? "-negative" : ""}`],
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
- styles[`${rootClassName}__arrow`],
123
- styles[`${rootClassName}__arrow--primary${negative ? "-negative" : ""}`],
119
+ `${rootClassName}__arrow`,
120
+ `${rootClassName}__arrow--primary${negative ? "-negative" : ""}`,
124
121
  ])}
125
122
  />
126
123
  </RadixTooltip.Content>