x-ui-design 0.8.34 → 0.8.36
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/dist/index.esm.js +19 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +19 -13
- package/dist/index.js.map +1 -1
- package/lib/components/Popover/Popover.tsx +24 -16
- package/package.json +1 -1
- package/src/app/page.tsx +2 -1
package/dist/index.esm.js
CHANGED
|
@@ -5602,20 +5602,26 @@ const Popover = ({
|
|
|
5602
5602
|
onMouseEnter: handleOnMouseEnter,
|
|
5603
5603
|
onMouseLeave: handleOnMouseLeave
|
|
5604
5604
|
}, [trigger]);
|
|
5605
|
-
|
|
5606
|
-
if (
|
|
5607
|
-
|
|
5608
|
-
}
|
|
5609
|
-
return
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5605
|
+
const _children = useMemo(() => {
|
|
5606
|
+
if (Children.count(children) > 1) {
|
|
5607
|
+
children = /*#__PURE__*/React.createElement("div", null, children);
|
|
5608
|
+
}
|
|
5609
|
+
return Children.map(children, (child, index) => {
|
|
5610
|
+
if (! /*#__PURE__*/isValidElement(child)) {
|
|
5611
|
+
child = /*#__PURE__*/React.createElement("div", null, child);
|
|
5612
|
+
}
|
|
5613
|
+
return /*#__PURE__*/cloneElement(child, {
|
|
5614
|
+
key: index,
|
|
5615
|
+
...{
|
|
5616
|
+
style,
|
|
5617
|
+
...childProps,
|
|
5618
|
+
ref: triggerRef,
|
|
5619
|
+
className: `${prefixCls}-wrapper-content`
|
|
5620
|
+
}
|
|
5621
|
+
});
|
|
5617
5622
|
});
|
|
5618
|
-
}
|
|
5623
|
+
}, [children, style, childProps]);
|
|
5624
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _children, isOpen && /*#__PURE__*/React.createElement(ConditionalWrapper, {
|
|
5619
5625
|
condition: !!getPopupContainer,
|
|
5620
5626
|
wrapper: element => getPopupContainer ? /*#__PURE__*/createPortal(element, getPopupContainer(popupRef.current)) : /*#__PURE__*/React.createElement(React.Fragment, null, element)
|
|
5621
5627
|
}, /*#__PURE__*/React.createElement("div", _extends({
|