@nethru/ui 2.0.8 → 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.
@@ -8,6 +8,7 @@ const ColumnedSection = /*#__PURE__*/forwardRef(({
8
8
  contents = [],
9
9
  spacing = 5,
10
10
  breakpoints,
11
+ showBox = true,
11
12
  ...props
12
13
  }, ref) => {
13
14
  const arrangedBreakpoints = useMemo(() => {
@@ -35,7 +36,7 @@ const ColumnedSection = /*#__PURE__*/forwardRef(({
35
36
  item: true,
36
37
  ...arrangedBreakpoints,
37
38
  children: [labels[index], /*#__PURE__*/_jsx(Box, {
38
- className: "MuiGrid-box",
39
+ className: showBox ? 'MuiGrid-box' : undefined,
39
40
  children: content
40
41
  })]
41
42
  }, index))
@@ -0,0 +1,30 @@
1
+ import React, { forwardRef } from "react";
2
+ import { Box, Stack } from "@mui/material";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ const LabelContentFormList = /*#__PURE__*/forwardRef(({
6
+ hgap = 3,
7
+ vgap = 6,
8
+ labelWidth = 130,
9
+ children,
10
+ ...props
11
+ }, ref) => {
12
+ return /*#__PURE__*/_jsx(Stack, {
13
+ ref: ref,
14
+ gap: vgap,
15
+ ...props,
16
+ children: children.filter(form => form instanceof Array && form.length >= 2).map((form, index) => /*#__PURE__*/_jsxs(Stack, {
17
+ direction: "row",
18
+ alignItems: "center",
19
+ gap: hgap,
20
+ children: [/*#__PURE__*/_jsx(Box, {
21
+ sx: {
22
+ width: labelWidth,
23
+ wordBreak: 'break-all'
24
+ },
25
+ children: form[0]
26
+ }), form[1]]
27
+ }, index))
28
+ });
29
+ });
30
+ export default LabelContentFormList;
@@ -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
+ };
package/base/index.js CHANGED
@@ -17,10 +17,11 @@ export { default as ConfirmDialog } from "./dialog/ConfirmDialog";
17
17
  export { default as DataGrid } from "./datagrid/DataGrid";
18
18
  export { default as Dialog } from "./dialog/Dialog";
19
19
  export { default as DropdownButton } from "./DropdownButton";
20
- export { default as FormContent } from "./FormContent";
21
- export { default as HelpTooltipIcon } from "./HelpTooltipIcon";
22
20
  export { default as Editor } from "./editor/Editor";
21
+ export { default as FormContent } from "./FormContent";
23
22
  export { default as Frame } from "./frame/Frame";
23
+ export { default as HelpTooltipIcon } from "./HelpTooltipIcon";
24
+ export { default as LabelContentFormList } from "./LabelContentFormList";
24
25
  export { default as MainHeader } from "./MainHeader";
25
26
  export { default as MenuItem } from "./MenuItem";
26
27
  export { default as PropertyTable } from "./PropertyTable";
@@ -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.8",
3
+ "version": "2.0.10",
4
4
  "main": "base/index.js",
5
5
  "files": [
6
6
  "/base"