@rc-component/trigger 1.18.2 → 1.18.3
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/es/index.js +4 -2
- package/lib/index.js +2 -2
- package/package.json +6 -5
package/es/index.js
CHANGED
|
@@ -24,7 +24,9 @@ import { getAlignPopupClassName, getMotion } from "./util";
|
|
|
24
24
|
// Removed Props List
|
|
25
25
|
// Seems this can be auto
|
|
26
26
|
// getDocument?: (element?: HTMLElement) => Document;
|
|
27
|
+
|
|
27
28
|
// New version will not wrap popup with `rc-trigger-popup-content` when multiple children
|
|
29
|
+
|
|
28
30
|
export function generateTrigger() {
|
|
29
31
|
var PortalComponent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Portal;
|
|
30
32
|
var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
@@ -372,9 +374,9 @@ export function generateTrigger() {
|
|
|
372
374
|
wrapperAction('onPointerEnter', true, mouseEnterDelay, function (event) {
|
|
373
375
|
setMousePosByEvent(event);
|
|
374
376
|
});
|
|
375
|
-
onPopupMouseEnter = function onPopupMouseEnter() {
|
|
377
|
+
onPopupMouseEnter = function onPopupMouseEnter(event) {
|
|
376
378
|
// Only trigger re-open when popup is visible
|
|
377
|
-
if (mergedOpen || inMotion) {
|
|
379
|
+
if ((mergedOpen || inMotion) && popupEle !== null && popupEle !== void 0 && popupEle.contains(event.target)) {
|
|
378
380
|
triggerOpen(true, mouseEnterDelay);
|
|
379
381
|
}
|
|
380
382
|
};
|
package/lib/index.js
CHANGED
|
@@ -382,9 +382,9 @@ function generateTrigger() {
|
|
|
382
382
|
wrapperAction('onPointerEnter', true, mouseEnterDelay, function (event) {
|
|
383
383
|
setMousePosByEvent(event);
|
|
384
384
|
});
|
|
385
|
-
onPopupMouseEnter = function onPopupMouseEnter() {
|
|
385
|
+
onPopupMouseEnter = function onPopupMouseEnter(event) {
|
|
386
386
|
// Only trigger re-open when popup is visible
|
|
387
|
-
if (mergedOpen || inMotion) {
|
|
387
|
+
if ((mergedOpen || inMotion) && popupEle !== null && popupEle !== void 0 && popupEle.contains(event.target)) {
|
|
388
388
|
triggerOpen(true, mouseEnterDelay);
|
|
389
389
|
}
|
|
390
390
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rc-component/trigger",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.3",
|
|
4
4
|
"description": "base abstract trigger component for react",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=8.x"
|
|
@@ -41,10 +41,11 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@rc-component/father-plugin": "^1.0.0",
|
|
44
|
-
"@testing-library/jest-dom": "^
|
|
44
|
+
"@testing-library/jest-dom": "^6.1.4",
|
|
45
45
|
"@testing-library/react": "^14.0.0",
|
|
46
46
|
"@types/classnames": "^2.2.10",
|
|
47
47
|
"@types/jest": "^29.5.2",
|
|
48
|
+
"@types/node": "^20.11.6",
|
|
48
49
|
"@types/react": "^18.0.0",
|
|
49
50
|
"@types/react-dom": "^18.0.11",
|
|
50
51
|
"@umijs/fabric": "^4.0.1",
|
|
@@ -52,12 +53,12 @@
|
|
|
52
53
|
"dumi": "^2.1.0",
|
|
53
54
|
"eslint": "^8.51.0",
|
|
54
55
|
"father": "^4.0.0",
|
|
55
|
-
"less": "^
|
|
56
|
-
"np": "^
|
|
56
|
+
"less": "^4.2.0",
|
|
57
|
+
"np": "^9.0.0",
|
|
57
58
|
"rc-test": "^7.0.13",
|
|
58
59
|
"react": "^18.0.0",
|
|
59
60
|
"react-dom": "^18.0.0",
|
|
60
|
-
"regenerator-runtime": "^0.
|
|
61
|
+
"regenerator-runtime": "^0.14.0",
|
|
61
62
|
"typescript": "^5.1.6"
|
|
62
63
|
},
|
|
63
64
|
"dependencies": {
|