@carbonorm/carbonreact 3.0.7 → 3.0.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.
@@ -1,9 +1,9 @@
1
+ import { PropsWithChildren } from "react";
1
2
  interface iPopupProperties {
2
3
  open?: boolean;
3
4
  handleClose: () => any;
4
- children: any;
5
5
  minWidth?: string;
6
6
  maxWidth?: string;
7
7
  }
8
- export default function Popup({ open, handleClose, children, maxWidth, }: iPopupProperties): import("react/jsx-runtime").JSX.Element | null;
8
+ export default function Popup({ open, handleClose, children, maxWidth, }: PropsWithChildren<iPopupProperties>): import("react/jsx-runtime").JSX.Element | null;
9
9
  export {};
package/dist/index.cjs.js CHANGED
@@ -3946,10 +3946,11 @@ function getStyles(overrides) {
3946
3946
  function Popup(_a) {
3947
3947
  var _b = _a.open, open = _b === void 0 ? true : _b, handleClose = _a.handleClose, children = _a.children, maxWidth = _a.maxWidth;
3948
3948
  if (false === open) {
3949
+ // @link https://legacy.reactjs.org/docs/conditional-rendering.html#preventing-component-from-rendering
3949
3950
  return null;
3950
3951
  }
3951
3952
  var dig = getStyles();
3952
- return jsxRuntime_1(jsxRuntime_3, { children: jsxRuntime_1("div", { className: classNames(dig.modal, dig.fade, dig.show, dig.dBlock), style: { backgroundColor: "rgba(0,0,0,0.8)" }, id: "exampleModalCenter", tabIndex: -1, "aria-labelledby": "exampleModalCenterTitle", "aria-modal": "true", role: "dialog", children: jsxRuntime_1("div", { style: { maxWidth: maxWidth }, className: classNames(dig.modalDialog, dig.modalDialogCentered), children: jsxRuntime_1(OutsideClickHandler, { onOutsideClick: function () { return handleClose(); }, children: jsxRuntime_1("div", { className: classNames(dig.modalContent, dig.bgTransparent, dig.modalDialogScrollable), children: children }) }) }) }) });
3953
+ return jsxRuntime_1("div", { className: classNames(dig.modal, dig.fade, dig.show, dig.dBlock), style: { backgroundColor: "rgba(0,0,0,0.8)" }, id: "exampleModalCenter", tabIndex: -1, "aria-labelledby": "exampleModalCenterTitle", "aria-modal": "true", role: "dialog", children: jsxRuntime_1("div", { style: { maxWidth: maxWidth }, className: classNames(dig.modalDialog, dig.modalDialogCentered), children: jsxRuntime_1(OutsideClickHandler, { onOutsideClick: function () { return handleClose(); }, children: jsxRuntime_1("div", { className: classNames(dig.modalContent, dig.bgTransparent, dig.modalDialogScrollable), children: children }) }) }) });
3953
3954
  }
3954
3955
 
3955
3956
  var isProduction = window.location.host.split(".")[0] === "www";