@symply.io/basic-components 1.7.1-beta.2 → 1.7.2-alpha.1

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.
@@ -57,7 +57,7 @@ var __rest = (this && this.__rest) || function (s, e) {
57
57
  return t;
58
58
  };
59
59
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
60
- import { useRef, forwardRef, useCallback, cloneElement, useImperativeHandle } from "react";
60
+ import { useRef, forwardRef, useCallback, cloneElement, useImperativeHandle, } from "react";
61
61
  import Grid from "@mui/material/Grid";
62
62
  import Button from "@mui/material/Button";
63
63
  import Dialog from "@mui/material/Dialog";
@@ -110,14 +110,18 @@ function BasicModal(props, ref) {
110
110
  }
111
111
  }, maxWidth: maxWidth, fullWidth: true, TransitionComponent: Transition, "aria-labelledby": "form-dialog-title", fullScreen: fullScreen, disableEscapeKeyDown: true }, rest, { children: [_jsxs(DialogTitle, __assign({ sx: {
112
112
  "& > span": {
113
- fontWeight: "700!important"
114
- }
113
+ fontWeight: "700!important",
114
+ },
115
115
  } }, { children: [_jsx("span", { children: title }), showTopRightCloseButton ? (_jsx(IconButton, __assign({ "aria-label": "close", onClick: onClose, sx: {
116
116
  position: "absolute",
117
117
  right: 8,
118
118
  top: 8,
119
- color: theme.palette.grey[500]
120
- } }, { children: _jsx(CloseIcon, {}) }))) : (_jsx(_Fragment, {}))] })), _jsx(DialogContent, __assign({ sx: { paddingTop: theme.spacing(1.25) } }, { children: _jsxs(Grid, __assign({ component: noForm ? "div" : "form", ref: noForm ? undefined : formRef }, { children: [desc && _jsx(DialogContentText, { children: desc }), Boolean(children) && cloneElement(children)] })) })), !hideBottomButtons && (_jsx(DialogActions, __assign({ sx: { padding: theme.spacing(1.25) } }, { children: _jsx(Grid, __assign({ container: true, spacing: 2, justifyContent: "flex-end", alignItems: "center", sx: { margin: 0 } }, { children: buttons || (_jsxs(_Fragment, { children: [_jsx(Grid, __assign({ item: true, xs: 12, md: 3, xl: 2 }, { children: _jsx(Button, __assign({ onClick: onClose, variant: "outlined", color: color, disabled: loading, fullWidth: true }, { children: cancelText })) })), _jsx(Grid, __assign({ item: true, xs: 12, md: 3, xl: 2 }, { children: _jsx(Button, __assign({ type: noForm ? "button" : "submit", onClick: noForm ? onSubmit : onFormSubmit, variant: "contained", color: color, disabled: loading || disabled, fullWidth: true }, { children: submitText })) }))] })) })) })))] })) })));
119
+ color: theme.palette.grey[500],
120
+ } }, { children: _jsx(CloseIcon, {}) }))) : (_jsx(_Fragment, {}))] })), _jsx(DialogContent, __assign({ sx: { paddingTop: theme.spacing(1.25) } }, { children: _jsxs(Grid, __assign({ component: noForm ? "div" : "form", ref: noForm ? undefined : formRef, onSubmit: noForm
121
+ ? undefined
122
+ : function (ev) {
123
+ ev.preventDefault();
124
+ } }, { children: [desc && _jsx(DialogContentText, { children: desc }), Boolean(children) && cloneElement(children)] })) })), !hideBottomButtons && (_jsx(DialogActions, __assign({ sx: { padding: theme.spacing(1.25) } }, { children: _jsx(Grid, __assign({ container: true, spacing: 2, justifyContent: "flex-end", alignItems: "center", sx: { margin: 0 } }, { children: buttons || (_jsxs(_Fragment, { children: [_jsx(Grid, __assign({ item: true, xs: 12, md: 3, xl: 2 }, { children: _jsx(Button, __assign({ onClick: onClose, variant: "outlined", color: color, disabled: loading, fullWidth: true }, { children: cancelText })) })), _jsx(Grid, __assign({ item: true, xs: 12, md: 3, xl: 2 }, { children: _jsx(Button, __assign({ type: noForm ? "button" : "submit", onClick: noForm ? onSubmit : onFormSubmit, variant: "contained", color: color, disabled: loading || disabled, fullWidth: true }, { children: submitText })) }))] })) })) })))] })) })));
121
125
  }
122
126
  var BasicModalWithRefForward = forwardRef(BasicModal);
123
127
  BasicModalWithRefForward.displayName = "BasicModal";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.7.1-beta.2",
3
+ "version": "1.7.2-alpha.1",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",