@nethru/ui 1.0.47 → 1.0.48

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.
@@ -7,12 +7,13 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { Fragment as _Fragment } from "react/jsx-runtime";
8
8
  export default function AppendableFormList({
9
9
  forms,
10
+ gap = 1,
10
11
  onAppend,
11
12
  onRemove,
12
13
  readOnly
13
14
  }) {
14
15
  return /*#__PURE__*/_jsxs(Stack, {
15
- gap: 1,
16
+ gap: gap,
16
17
  children: [/*#__PURE__*/_jsxs(_Fragment, {
17
18
  children: [forms.map((form, index) => /*#__PURE__*/_jsxs(Stack, {
18
19
  direction: "row",
package/dist/Dialog.js CHANGED
@@ -1,26 +1,40 @@
1
- import { Zoom } from "@mui/material";
1
+ import { Slide, Zoom } from "@mui/material";
2
2
  import MuiDialog from "@mui/material/Dialog";
3
3
  import { forwardRef } from "react";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- const Transition = /*#__PURE__*/forwardRef(function Transition(props, ref) {
5
+ const ZoomTransition = /*#__PURE__*/forwardRef(function (props, ref) {
6
6
  return /*#__PURE__*/_jsx(Zoom, {
7
7
  ref: ref,
8
8
  ...props
9
9
  });
10
10
  });
11
+ const SlideTransition = /*#__PURE__*/forwardRef(function (props, ref) {
12
+ return /*#__PURE__*/_jsx(Slide, {
13
+ direction: "down",
14
+ ref: ref,
15
+ ...props
16
+ });
17
+ });
11
18
  export default function Dialog({
19
+ center = true,
12
20
  contentFontSize = 16,
13
21
  children,
14
22
  sx,
15
23
  ...props
16
24
  }) {
25
+ const styles = {
26
+ '& .MuiDialog-container': {
27
+ alignItems: center ? 'center' : 'flex-start'
28
+ },
29
+ '.MuiTypography-root.MuiDialogContentText-root': {
30
+ fontSize: contentFontSize
31
+ }
32
+ };
17
33
  return /*#__PURE__*/_jsx(MuiDialog, {
18
- TransitionComponent: Transition,
34
+ TransitionComponent: center ? ZoomTransition : SlideTransition,
19
35
  sx: {
20
- ...sx,
21
- '.MuiTypography-root.MuiDialogContentText-root': {
22
- fontSize: contentFontSize
23
- }
36
+ ...styles,
37
+ ...sx
24
38
  },
25
39
  ...props,
26
40
  children: children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "/dist"