@majoo-ui/react 1.60.5-rc.3 → 1.60.5-rc.4
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/components/modalDialog/ModalDialog.d.ts +4 -0
- package/index.esm.js +7 -3
- package/index.umd.js +6 -2
- package/package.json +1 -1
|
@@ -408,6 +408,10 @@ interface ModalDialogProps extends Omit<IDialog, 'children'>, DialogContentProps
|
|
|
408
408
|
* If true, the close icon button is disabled
|
|
409
409
|
*/
|
|
410
410
|
disabledCloseButton?: boolean;
|
|
411
|
+
/**
|
|
412
|
+
* On dialog close click function
|
|
413
|
+
*/
|
|
414
|
+
onCloseClick?: () => void;
|
|
411
415
|
}
|
|
412
416
|
/**
|
|
413
417
|
* ModalDialog are used to focus and display content that contains one specific task that requires interaction from the user and is separate from the main page.
|
package/index.esm.js
CHANGED
|
@@ -12514,9 +12514,10 @@ const ModalDialog = props => {
|
|
|
12514
12514
|
width,
|
|
12515
12515
|
onOpenAutoFocus,
|
|
12516
12516
|
disabledCloseButton,
|
|
12517
|
-
onPointerDownOutside
|
|
12517
|
+
onPointerDownOutside,
|
|
12518
|
+
onCloseClick
|
|
12518
12519
|
} = props,
|
|
12519
|
-
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside"]);
|
|
12520
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside", "onCloseClick"]);
|
|
12520
12521
|
const childArray = React__default.Children.toArray(children);
|
|
12521
12522
|
const modalDialogFooter = findNodeChild$1(childArray, 'ModalDialogFooter');
|
|
12522
12523
|
const modalDialogTitle = findNodeChild$1(childArray, 'ModalDialogTitle');
|
|
@@ -12598,7 +12599,10 @@ const ModalDialog = props => {
|
|
|
12598
12599
|
condition: !disabledCloseButton,
|
|
12599
12600
|
wrapper: children => jsx(DialogClose, Object.assign({
|
|
12600
12601
|
asChild: true,
|
|
12601
|
-
disabled: disabledCloseButton
|
|
12602
|
+
disabled: disabledCloseButton,
|
|
12603
|
+
onClick: () => {
|
|
12604
|
+
if (onCloseClick) onCloseClick();
|
|
12605
|
+
}
|
|
12602
12606
|
}, {
|
|
12603
12607
|
children: children
|
|
12604
12608
|
}), void 0)
|
package/index.umd.js
CHANGED
|
@@ -12602,7 +12602,8 @@
|
|
|
12602
12602
|
onOpenAutoFocus = props.onOpenAutoFocus,
|
|
12603
12603
|
disabledCloseButton = props.disabledCloseButton,
|
|
12604
12604
|
onPointerDownOutside = props.onPointerDownOutside,
|
|
12605
|
-
|
|
12605
|
+
onCloseClick = props.onCloseClick,
|
|
12606
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "width", "onOpenAutoFocus", "disabledCloseButton", "onPointerDownOutside", "onCloseClick"]);
|
|
12606
12607
|
var childArray = React__default["default"].Children.toArray(children);
|
|
12607
12608
|
var modalDialogFooter = findNodeChild$1(childArray, 'ModalDialogFooter');
|
|
12608
12609
|
var modalDialogTitle = findNodeChild$1(childArray, 'ModalDialogTitle');
|
|
@@ -12687,7 +12688,10 @@
|
|
|
12687
12688
|
wrapper: function (children) {
|
|
12688
12689
|
return jsxRuntime.jsx(DialogClose, __assign({
|
|
12689
12690
|
asChild: true,
|
|
12690
|
-
disabled: disabledCloseButton
|
|
12691
|
+
disabled: disabledCloseButton,
|
|
12692
|
+
onClick: function () {
|
|
12693
|
+
if (onCloseClick) onCloseClick();
|
|
12694
|
+
}
|
|
12691
12695
|
}, {
|
|
12692
12696
|
children: children
|
|
12693
12697
|
}), void 0);
|