@rescui/tooltip 0.9.9-RUI-247-Make-packets-react-19-ready-c06b3c96.4 → 0.9.10
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/lib/index.css +23 -23
- package/lib/tooltip.js +3 -4
- package/lib/tooltip.p.module.css.js +10 -0
- package/lib/use-tooltip-state.js +0 -1
- package/package.json +9 -9
- package/lib/index.p.module.css.js +0 -10
package/lib/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
._tooltip_gki0xd_5{
|
|
2
2
|
position:relative;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
._closing_gki0xd_9{
|
|
5
5
|
pointer-events:none;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
._content_gki0xd_13{
|
|
8
8
|
--rs-theme-dark:1;
|
|
9
9
|
--_rs-tooltip-border-width:1px;
|
|
10
10
|
|
|
@@ -75,33 +75,33 @@
|
|
|
75
75
|
transition:opacity 300ms, transform 300ms;
|
|
76
76
|
transform:translate(0, 0);
|
|
77
77
|
}
|
|
78
|
-
[data-real-placement='top-end'] .
|
|
79
|
-
[data-real-placement='bottom-end'] .
|
|
78
|
+
[data-real-placement='top-end'] ._content_gki0xd_13,
|
|
79
|
+
[data-real-placement='bottom-end'] ._content_gki0xd_13{
|
|
80
80
|
margin-right:0;
|
|
81
81
|
}
|
|
82
|
-
[data-real-placement='top-start'] .
|
|
83
|
-
[data-real-placement='bottom-start'] .
|
|
82
|
+
[data-real-placement='top-start'] ._content_gki0xd_13,
|
|
83
|
+
[data-real-placement='bottom-start'] ._content_gki0xd_13{
|
|
84
84
|
margin-left:0;
|
|
85
85
|
}
|
|
86
|
-
[data-real-placement='left-end'] .
|
|
87
|
-
[data-real-placement='right-end'] .
|
|
86
|
+
[data-real-placement='left-end'] ._content_gki0xd_13,
|
|
87
|
+
[data-real-placement='right-end'] ._content_gki0xd_13{
|
|
88
88
|
margin-bottom:0;
|
|
89
89
|
}
|
|
90
|
-
[data-real-placement='left-start'] .
|
|
91
|
-
[data-real-placement='right-start'] .
|
|
90
|
+
[data-real-placement='left-start'] ._content_gki0xd_13,
|
|
91
|
+
[data-real-placement='right-start'] ._content_gki0xd_13{
|
|
92
92
|
margin-top:0;
|
|
93
93
|
}
|
|
94
|
-
.
|
|
94
|
+
._initial_gki0xd_54 ._content_gki0xd_13{
|
|
95
95
|
transition:none;
|
|
96
96
|
}
|
|
97
|
-
.
|
|
97
|
+
._closing_gki0xd_9 ._content_gki0xd_13{
|
|
98
98
|
transition-duration:200ms, 200ms;
|
|
99
99
|
}
|
|
100
|
-
.
|
|
101
|
-
.
|
|
100
|
+
._initial_gki0xd_54 ._content_gki0xd_13,
|
|
101
|
+
._closing_gki0xd_9 ._content_gki0xd_13{
|
|
102
102
|
opacity:0;
|
|
103
103
|
}
|
|
104
|
-
.
|
|
104
|
+
._outerThemeLight_gki0xd_68 ._content_gki0xd_13{
|
|
105
105
|
--rs-color-primary-dark-theme:var(--rs-color-primary-light-theme);
|
|
106
106
|
--rs-color-primary-dim-dark-theme:var(--rs-color-primary-dim-light-theme);
|
|
107
107
|
--rs-color-primary-fog-dark-theme:var(--rs-color-primary-fog-light-theme);
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
--rs-color-primary-t-fog-light-theme
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
|
-
.
|
|
115
|
+
._outerThemeDark_gki0xd_81 ._content_gki0xd_13{
|
|
116
116
|
--rs-color-primary-light-theme:var(--rs-color-primary-dark-theme);
|
|
117
117
|
--rs-color-primary-dim-light-theme:var(--rs-color-primary-dim-dark-theme);
|
|
118
118
|
--rs-color-primary-fog-light-theme:var(--rs-color-primary-fog-dark-theme);
|
|
@@ -123,20 +123,20 @@
|
|
|
123
123
|
--rs-color-primary-t-fog-dark-theme
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
.
|
|
126
|
+
._initial_gki0xd_54[data-real-placement^='top'] ._content_gki0xd_13, ._closing_gki0xd_9[data-real-placement^='top'] ._content_gki0xd_13{
|
|
127
127
|
transform:translate(0, 10px);
|
|
128
128
|
}
|
|
129
|
-
.
|
|
129
|
+
._initial_gki0xd_54[data-real-placement^='right'] ._content_gki0xd_13, ._closing_gki0xd_9[data-real-placement^='right'] ._content_gki0xd_13{
|
|
130
130
|
transform:translate(-10px, 0);
|
|
131
131
|
}
|
|
132
|
-
.
|
|
132
|
+
._initial_gki0xd_54[data-real-placement^='bottom'] ._content_gki0xd_13, ._closing_gki0xd_9[data-real-placement^='bottom'] ._content_gki0xd_13{
|
|
133
133
|
transform:translate(0, -10px);
|
|
134
134
|
}
|
|
135
|
-
.
|
|
135
|
+
._initial_gki0xd_54[data-real-placement^='left'] ._content_gki0xd_13, ._closing_gki0xd_9[data-real-placement^='left'] ._content_gki0xd_13{
|
|
136
136
|
transform:translate(10px, 0);
|
|
137
137
|
}
|
|
138
|
-
.
|
|
139
|
-
.
|
|
138
|
+
._trigger_gki0xd_113:focus-visible,
|
|
139
|
+
._trigger_gki0xd_113:focus[data-focus-method='key']{
|
|
140
140
|
outline:none;
|
|
141
141
|
|
|
142
142
|
box-shadow:var(--rs-color-primary-t-dim-light-theme) 0 0 0 4px;
|
package/lib/tooltip.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
3
2
|
import React, { cloneElement, createElement, useState, useRef, useEffect, useCallback, useContext, isValidElement } from 'react';
|
|
4
3
|
import { Element, ForwardRef, typeOf } from 'react-is';
|
|
@@ -7,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
7
6
|
import ReactDOM from 'react-dom';
|
|
8
7
|
import { Manager, Reference, Popper } from 'react-popper';
|
|
9
8
|
import { ThemeContext, LayeringConsumer, ThemeProvider } from '@rescui/ui-contexts';
|
|
10
|
-
import styles from './
|
|
9
|
+
import styles from './tooltip.p.module.css.js';
|
|
11
10
|
import { useTooltipState, TOOLTIP_STATES } from './use-tooltip-state.js';
|
|
12
11
|
import { extractThemeFromCss, extractPrimaryColors } from './css-vars-utils.js';
|
|
13
12
|
const HIDE_TIMEOUT = 500; // it should in sync with the transition-duration css-property
|
|
@@ -17,9 +16,9 @@ const CLOSING_TIMEOUT = 300;
|
|
|
17
16
|
const Portal = _ref => {
|
|
18
17
|
let {
|
|
19
18
|
children,
|
|
20
|
-
target =
|
|
19
|
+
target = document.body
|
|
21
20
|
} = _ref;
|
|
22
|
-
return
|
|
21
|
+
return /*#__PURE__*/ReactDOM.createPortal(children, target);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
const isNode = maybeNode => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"tooltip": "_tooltip_gki0xd_5",
|
|
3
|
+
"closing": "_closing_gki0xd_9",
|
|
4
|
+
"content": "_content_gki0xd_13",
|
|
5
|
+
"initial": "_initial_gki0xd_54",
|
|
6
|
+
"outerThemeLight": "_outerThemeLight_gki0xd_68",
|
|
7
|
+
"outerThemeDark": "_outerThemeDark_gki0xd_81",
|
|
8
|
+
"trigger": "_trigger_gki0xd_113"
|
|
9
|
+
};
|
|
10
|
+
export { styles as default };
|
package/lib/use-tooltip-state.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/tooltip",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@rescui/ui-contexts": "^0.5.0",
|
|
26
|
-
"prop-types": "^15",
|
|
27
|
-
"react": ">=16.8.0 <
|
|
28
|
-
"react-dom": ">=16.8.0 <
|
|
26
|
+
"prop-types": "^15.7.2",
|
|
27
|
+
"react": ">=16.8.0 <19",
|
|
28
|
+
"react-dom": ">=16.8.0 <19"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@rescui/colors": "0.2.
|
|
32
|
-
"@rescui/icons": "1.
|
|
33
|
-
"@rescui/scripts": "0.5.0",
|
|
34
|
-
"@rescui/typography": "0.23.
|
|
31
|
+
"@rescui/colors": "^0.2.9",
|
|
32
|
+
"@rescui/icons": "^1.3.0",
|
|
33
|
+
"@rescui/scripts": "^0.5.0",
|
|
34
|
+
"@rescui/typography": "^0.23.2",
|
|
35
35
|
"@types/react-is": "^17.0.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "rescui-scripts build"
|
|
39
39
|
},
|
|
40
40
|
"nx": {},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f31d27b895bfc5f3ffa3f2dda08072b7dd2c928c"
|
|
42
42
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var styles = {
|
|
2
|
-
"tooltip": "_tooltip_1cv1efi_5",
|
|
3
|
-
"closing": "_closing_1cv1efi_9",
|
|
4
|
-
"content": "_content_1cv1efi_13",
|
|
5
|
-
"initial": "_initial_1cv1efi_54",
|
|
6
|
-
"outerThemeLight": "_outerThemeLight_1cv1efi_68",
|
|
7
|
-
"outerThemeDark": "_outerThemeDark_1cv1efi_81",
|
|
8
|
-
"trigger": "_trigger_1cv1efi_113"
|
|
9
|
-
};
|
|
10
|
-
export { styles as default };
|