@hyphen/hyphen-components 4.9.3 → 4.9.4

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": "@hyphen/hyphen-components",
3
- "version": "4.9.3",
3
+ "version": "4.9.4",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "@hyphen"
@@ -0,0 +1,66 @@
1
+ .TooltipContent {
2
+ transform-origin: var(--radix-tooltip-content-transform-origin);
3
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
4
+
5
+ animation-duration: 400ms;
6
+ will-change: transform, opacity;
7
+ &[data-state='instant-open'][data-side='top'],
8
+ &[data-state='delayed-open'][data-side='top'] {
9
+ animation-name: tooltip-slideUpAndFade;
10
+ }
11
+ &[data-state='instant-open'][data-side='right'],
12
+ &[data-state='delayed-open'][data-side='right'] {
13
+ animation-name: tooltip-slideRightAndFade;
14
+ }
15
+ &[data-state='instant-open'][data-side='bottom'],
16
+ &[data-state='delayed-open'][data-side='bottom'] {
17
+ animation-name: tooltip-slideDownAndFade;
18
+ }
19
+ &[data-state='instant-open'][data-side='left'],
20
+ &[data-state='delayed-open'][data-side='left'] {
21
+ animation-name: tooltip-slideLeftAndFade;
22
+ }
23
+ }
24
+ @keyframes tooltip-slideUpAndFade {
25
+ from {
26
+ opacity: 0;
27
+ transform: translateY(6px);
28
+ }
29
+ to {
30
+ opacity: 1;
31
+ transform: translateY(0);
32
+ }
33
+ }
34
+
35
+ @keyframes tooltip-slideRightAndFade {
36
+ from {
37
+ opacity: 0;
38
+ transform: translateX(-6px);
39
+ }
40
+ to {
41
+ opacity: 1;
42
+ transform: translateX(0);
43
+ }
44
+ }
45
+
46
+ @keyframes tooltip-slideDownAndFade {
47
+ from {
48
+ opacity: 0;
49
+ transform: translateY(-6px);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateY(0);
54
+ }
55
+ }
56
+
57
+ @keyframes tooltip-slideLeftAndFade {
58
+ from {
59
+ opacity: 0;
60
+ transform: translateX(6px);
61
+ }
62
+ to {
63
+ opacity: 1;
64
+ transform: translateX(0);
65
+ }
66
+ }
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+ import styles from './Tooltip.module.scss';
3
4
 
4
5
  import classNames from 'classnames';
5
6
 
@@ -19,6 +20,7 @@ const TooltipContent = React.forwardRef<
19
20
  ref={ref}
20
21
  sideOffset={sideOffset}
21
22
  className={classNames(
23
+ styles.TooltipContent,
22
24
  'background-color-tooltip font-color-tooltip font-size-xs z-index-popover overflow-hidden br-sm p-h-sm p-v-xs shadow-sm',
23
25
  className
24
26
  )}