@zenkigen-inc/component-ui 1.6.1 → 1.6.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/dist/index.js CHANGED
@@ -31530,9 +31530,13 @@ function Modal({
31530
31530
  onClose,
31531
31531
  portalTargetRef
31532
31532
  }) {
31533
+ const [isMounted, setIsMounted] = useState(false);
31533
31534
  const renderWidth = typeof width === 'number' ? Math.max(width, LIMIT_WIDTH) : width;
31534
31535
  const renderHeight = typeof height === 'number' ? Math.max(height, LIMIT_HEIGHT) : height;
31535
- return /*#__PURE__*/reactDom.createPortal(isOpen && /*#__PURE__*/jsx(ModalContext.Provider, {
31536
+ useEffect(() => {
31537
+ setIsMounted(true);
31538
+ }, []);
31539
+ return isMounted && isOpen ? /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/jsx(ModalContext.Provider, {
31536
31540
  value: {
31537
31541
  onClose
31538
31542
  },
@@ -31547,7 +31551,7 @@ function Modal({
31547
31551
  children: children
31548
31552
  })
31549
31553
  })
31550
- }), !portalTargetRef || (portalTargetRef == null ? void 0 : portalTargetRef.current) === null ? document.body : portalTargetRef.current);
31554
+ }), (portalTargetRef == null ? void 0 : portalTargetRef.current) != null ? portalTargetRef.current : document.body) : null;
31551
31555
  }
31552
31556
  Modal.Body = ModalBody;
31553
31557
  Modal.Header = ModalHeader;
@@ -32687,5 +32691,5 @@ function Tooltip({
32687
32691
  });
32688
32692
  }
32689
32693
 
32690
- export { Avatar, Breadcrumb, Button, Checkbox, Dropdown, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Pagination, PaginationSelect, Radio, Search, Select, SelectSort, Tab, TabItem, Table, TableCell, TableRow, Tag, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, useToast };
32694
+ export { Avatar, Breadcrumb, Button, Checkbox, Dropdown, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Pagination, PaginationSelect, Radio, Search, Select, SelectSort, Tab, TabItem, Table, TableCell, TableRow, Tag, TextArea, TextInput, Toast, ToastProvider, Toggle, Tooltip, useOutsideClick, useToast };
32691
32695
  //# sourceMappingURL=index.js.map