shineout 3.8.4-beta.7 → 3.8.4-beta.8
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/cjs/index.js +1 -1
- package/dist/shineout.js +22 -3
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.4-beta.
|
|
525
|
+
version: '3.8.4-beta.8'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12386
12386
|
};
|
|
12387
12387
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12388
12388
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12389
|
-
/* harmony default export */ var version = ('3.8.4-beta.
|
|
12389
|
+
/* harmony default export */ var version = ('3.8.4-beta.8');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -30750,6 +30750,10 @@ var usePopup = function usePopup(props) {
|
|
|
30750
30750
|
var handleMouseEnter = use_persist_fn(function (e) {
|
|
30751
30751
|
var _targetEvents$onMouse, _targetRef$current, _popupRef$current2;
|
|
30752
30752
|
targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse = targetEvents.onMouseEnter) === null || _targetEvents$onMouse === void 0 || _targetEvents$onMouse.call(targetEvents, e);
|
|
30753
|
+
// todo: 考虑是否严格一些执行,比如需要判断是否是子元素
|
|
30754
|
+
// if (targetRef.current?.contains(e.target as Node)) {
|
|
30755
|
+
// targetEvents?.onMouseEnter?.(e);
|
|
30756
|
+
// }
|
|
30753
30757
|
if (trigger !== 'hover') return;
|
|
30754
30758
|
var isParentContainsCurrent = (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.contains(e.target);
|
|
30755
30759
|
if (isParentContainsCurrent || popupRef !== null && popupRef !== void 0 && (_popupRef$current2 = popupRef.current) !== null && _popupRef$current2 !== void 0 && _popupRef$current2.contains(e.target)) {
|
|
@@ -30759,6 +30763,10 @@ var usePopup = function usePopup(props) {
|
|
|
30759
30763
|
var handleMouseLeave = use_persist_fn(function (e) {
|
|
30760
30764
|
var _targetEvents$onMouse2, _popupRef$current3;
|
|
30761
30765
|
targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse2 = targetEvents.onMouseLeave) === null || _targetEvents$onMouse2 === void 0 || _targetEvents$onMouse2.call(targetEvents, e);
|
|
30766
|
+
// todo: 考虑是否严格一些执行,比如需要判断是否是子元素
|
|
30767
|
+
// if (targetRef.current?.contains(e.target as Node)) {
|
|
30768
|
+
// targetEvents?.onMouseLeave?.(e);
|
|
30769
|
+
// }
|
|
30762
30770
|
if (trigger !== 'hover') return;
|
|
30763
30771
|
// @ts-ignore
|
|
30764
30772
|
if (e.relatedTarget instanceof HTMLElement && (_popupRef$current3 = popupRef.current) !== null && _popupRef$current3 !== void 0 && _popupRef$current3.contains(e.relatedTarget)) {
|
|
@@ -33528,6 +33536,17 @@ var Tooltip = function Tooltip(props) {
|
|
|
33528
33536
|
})
|
|
33529
33537
|
})
|
|
33530
33538
|
}) : children;
|
|
33539
|
+
var innerProps = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
33540
|
+
if (persistent) {
|
|
33541
|
+
return trigger === 'hover' ? objectSpread2_default()(objectSpread2_default()({}, events), {}, {
|
|
33542
|
+
onMouseEnter: undefined,
|
|
33543
|
+
onMouseLeave: undefined
|
|
33544
|
+
}) : objectSpread2_default()(objectSpread2_default()({}, events), {}, {
|
|
33545
|
+
onClick: undefined
|
|
33546
|
+
});
|
|
33547
|
+
}
|
|
33548
|
+
return events;
|
|
33549
|
+
}, [persistent, events, trigger]);
|
|
33531
33550
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
33532
33551
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("noscript", {
|
|
33533
33552
|
ref: function ref(el) {
|
|
@@ -33537,7 +33556,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
33537
33556
|
if (targetRef.current === targetEl) return;
|
|
33538
33557
|
targetRef.current = targetEl;
|
|
33539
33558
|
}
|
|
33540
|
-
}, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner,
|
|
33559
|
+
}, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner, innerProps), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
33541
33560
|
focus: open,
|
|
33542
33561
|
parentElRef: targetRef,
|
|
33543
33562
|
popupElRef: popupRef,
|
|
@@ -73259,7 +73278,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
73259
73278
|
|
|
73260
73279
|
|
|
73261
73280
|
/* harmony default export */ var src_0 = ({
|
|
73262
|
-
version: '3.8.4-beta.
|
|
73281
|
+
version: '3.8.4-beta.8'
|
|
73263
73282
|
});
|
|
73264
73283
|
}();
|
|
73265
73284
|
/******/ return __webpack_exports__;
|