@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.
@@ -0,0 +1 @@
1
+ export * from './use-outside-click';
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './checkbox';
5
5
  export * from './dropdown';
6
6
  export * from './evaluation-star';
7
7
  export * from './heading';
8
+ export * from './hooks';
8
9
  export * from './icon';
9
10
  export * from './icon-button';
10
11
  export * from './loading';
package/dist/index.esm.js CHANGED
@@ -31536,9 +31536,15 @@ function Modal(_ref) {
31536
31536
  isOpen = _ref.isOpen,
31537
31537
  onClose = _ref.onClose,
31538
31538
  portalTargetRef = _ref.portalTargetRef;
31539
+ var _useState = useState(false),
31540
+ isMounted = _useState[0],
31541
+ setIsMounted = _useState[1];
31539
31542
  var renderWidth = typeof width === 'number' ? Math.max(width, LIMIT_WIDTH) : width;
31540
31543
  var renderHeight = typeof height === 'number' ? Math.max(height, LIMIT_HEIGHT) : height;
31541
- return /*#__PURE__*/reactDom.createPortal(isOpen && /*#__PURE__*/jsx(ModalContext.Provider, {
31544
+ useEffect(function () {
31545
+ setIsMounted(true);
31546
+ }, []);
31547
+ return isMounted && isOpen ? /*#__PURE__*/reactDom.createPortal( /*#__PURE__*/jsx(ModalContext.Provider, {
31542
31548
  value: {
31543
31549
  onClose: onClose
31544
31550
  },
@@ -31553,7 +31559,7 @@ function Modal(_ref) {
31553
31559
  children: children
31554
31560
  })
31555
31561
  })
31556
- }), !portalTargetRef || (portalTargetRef == null ? void 0 : portalTargetRef.current) === null ? document.body : portalTargetRef.current);
31562
+ }), (portalTargetRef == null ? void 0 : portalTargetRef.current) != null ? portalTargetRef.current : document.body) : null;
31557
31563
  }
31558
31564
  Modal.Body = ModalBody;
31559
31565
  Modal.Header = ModalHeader;
@@ -32740,5 +32746,5 @@ function Tooltip(_ref) {
32740
32746
  });
32741
32747
  }
32742
32748
 
32743
- 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 };
32749
+ 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 };
32744
32750
  //# sourceMappingURL=index.esm.js.map