@nethru/ui 2.0.9 → 2.0.10

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.
@@ -13,7 +13,7 @@ const LabelContentFormList = /*#__PURE__*/forwardRef(({
13
13
  ref: ref,
14
14
  gap: vgap,
15
15
  ...props,
16
- children: children.map((form, index) => /*#__PURE__*/_jsxs(Stack, {
16
+ children: children.filter(form => form instanceof Array && form.length >= 2).map((form, index) => /*#__PURE__*/_jsxs(Stack, {
17
17
  direction: "row",
18
18
  alignItems: "center",
19
19
  gap: hgap,
@@ -1,12 +1,16 @@
1
- import { Button, Stack, Typography } from "@mui/material";
2
1
  import { forwardRef } from "react";
2
+ import { Button, IconButton, Stack, Typography } from "@mui/material";
3
+ import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew';
4
+ import { grey } from "./colors";
3
5
  import { jsx as _jsx } from "react/jsx-runtime";
4
- import { Fragment as _Fragment } from "react/jsx-runtime";
5
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
+ import { Fragment as _Fragment } from "react/jsx-runtime";
6
8
  const MainHeader = /*#__PURE__*/forwardRef(({
7
9
  title,
10
+ enableBackward = false,
8
11
  editable = false,
9
12
  edit = false,
13
+ onBackwardClick,
10
14
  onEditClick,
11
15
  onConfirmClick,
12
16
  onCancelClick,
@@ -25,9 +29,19 @@ const MainHeader = /*#__PURE__*/forwardRef(({
25
29
  mb: 2.5
26
30
  },
27
31
  ...props,
28
- children: [/*#__PURE__*/_jsx(Typography, {
29
- variant: "headline1",
30
- children: title
32
+ children: [/*#__PURE__*/_jsxs(Stack, {
33
+ direction: "row",
34
+ alignItems: "center",
35
+ gap: 2,
36
+ children: [enableBackward && /*#__PURE__*/_jsx(IconButton, {
37
+ onClick: onBackwardClick,
38
+ children: /*#__PURE__*/_jsx(ArrowBackIosNewIcon, {
39
+ sx: backwardStyles
40
+ })
41
+ }), /*#__PURE__*/_jsx(Typography, {
42
+ variant: "headline1",
43
+ children: title
44
+ })]
31
45
  }), rightSlot && /*#__PURE__*/_jsx(_Fragment, {
32
46
  children: rightSlot
33
47
  }), !rightSlot && editable && /*#__PURE__*/_jsxs(Stack, {
@@ -53,4 +67,10 @@ const MainHeader = /*#__PURE__*/forwardRef(({
53
67
  })]
54
68
  });
55
69
  });
56
- export default MainHeader;
70
+ export default MainHeader;
71
+ const backwardStyles = {
72
+ fontSize: 22,
73
+ path: {
74
+ fill: grey[900]
75
+ }
76
+ };
@@ -3,9 +3,9 @@ export const styles = {
3
3
  styleOverrides: {
4
4
  root: {
5
5
  fontFamily: typography.fontFamily,
6
- ...typography.bodyMdMedium,
6
+ ...typography.bodyMdSemibold,
7
7
  '&.MuiFormLabel-colorPrimary': {
8
- ...typography.bodyMdMedium
8
+ ...typography.bodyMdSemibold
9
9
  }
10
10
  }
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "main": "base/index.js",
5
5
  "files": [
6
6
  "/base"