@nethru/ui 1.0.19 → 1.0.22

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.
@@ -0,0 +1,33 @@
1
+ import { Box, Typography } from "@mui/material";
2
+ import MuiCircularProgress from "@mui/material/CircularProgress";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ export default function CircularProgress(props) {
6
+ return /*#__PURE__*/_jsxs(Box, {
7
+ sx: {
8
+ position: 'relative',
9
+ display: 'inline-flex'
10
+ },
11
+ children: [/*#__PURE__*/_jsx(MuiCircularProgress, {
12
+ variant: "determinate",
13
+ ...props
14
+ }), /*#__PURE__*/_jsx(Box, {
15
+ sx: {
16
+ top: 0,
17
+ left: 0,
18
+ bottom: 0,
19
+ right: 0,
20
+ position: 'absolute',
21
+ display: 'flex',
22
+ alignItems: 'center',
23
+ justifyContent: 'center'
24
+ },
25
+ children: /*#__PURE__*/_jsx(Typography, {
26
+ variant: "caption",
27
+ component: "div",
28
+ color: "text.secondary",
29
+ children: `${Math.round(props.value)}%`
30
+ })
31
+ })]
32
+ });
33
+ }
package/dist/Section.js CHANGED
@@ -9,9 +9,9 @@ export default function Section({
9
9
  variant: "outlined",
10
10
  square: false,
11
11
  sx: {
12
- ...sx,
12
+ marginTop: '20px',
13
13
  padding: 3,
14
- marginTop: '20px'
14
+ ...sx
15
15
  },
16
16
  ...props,
17
17
  children: children
@@ -0,0 +1,36 @@
1
+ import { Box, Divider, Stack, Typography } from "@mui/material";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ import { Fragment as _Fragment } from "react/jsx-runtime";
5
+ export default function ShadowedSection({
6
+ label,
7
+ children,
8
+ marginTop = '20px',
9
+ sx,
10
+ ...props
11
+ }) {
12
+ return /*#__PURE__*/_jsxs(_Fragment, {
13
+ children: [/*#__PURE__*/_jsx(Box, {
14
+ sx: {
15
+ mt: marginTop
16
+ },
17
+ children: /*#__PURE__*/_jsx(Typography, {
18
+ variant: "subtitle1",
19
+ children: label
20
+ })
21
+ }), /*#__PURE__*/_jsxs(Stack, {
22
+ sx: {
23
+ backgroundColor: '#fff',
24
+ boxShadow: '0 0.3rem 0.3rem rgba(0, 0, 0, 0.03) !important'
25
+ },
26
+ children: [/*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(Stack, {
27
+ sx: {
28
+ padding: 3,
29
+ ...sx
30
+ },
31
+ ...props,
32
+ children: children
33
+ }), /*#__PURE__*/_jsx(Divider, {})]
34
+ })]
35
+ });
36
+ }
@@ -0,0 +1,37 @@
1
+ import { Stack, Tab } from "@mui/material";
2
+ import Tabs from "./Tabs";
3
+ import Section from "./Section";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ export default function TabbedSection({
7
+ orientation,
8
+ labels = [],
9
+ tabProps = {},
10
+ sectionProps = {},
11
+ children,
12
+ ...props
13
+ }) {
14
+ const styles = {
15
+ mt: 0,
16
+ width: orientation === 'vertical' ? '100%' : 'unset'
17
+ };
18
+ return /*#__PURE__*/_jsxs(Stack, {
19
+ direction: orientation === 'vertical' ? 'row' : 'column',
20
+ children: [/*#__PURE__*/_jsx(Tabs, {
21
+ orientation: orientation,
22
+ ...props,
23
+ children: labels.map((label, index) => /*#__PURE__*/_jsx(Tab, {
24
+ label: label,
25
+ wrapped: orientation === 'vertical',
26
+ ...tabProps
27
+ }, index))
28
+ }), /*#__PURE__*/_jsx(Section, {
29
+ sx: {
30
+ ...styles,
31
+ ...sectionProps.sx
32
+ },
33
+ ...sectionProps,
34
+ children: children
35
+ })]
36
+ });
37
+ }
package/dist/Tabs.js CHANGED
@@ -10,7 +10,9 @@ export default function Tabs({
10
10
  const vertical = orientation === 'vertical';
11
11
  const styles = {
12
12
  ml: vertical ? 0 : 0.5,
13
+ mr: vertical ? 0 : 0.5,
13
14
  mt: vertical ? 0.5 : 0,
15
+ mb: vertical ? 0.5 : 0,
14
16
  '& .MuiButtonBase-root.MuiTab-root': {
15
17
  fontSize: '15px'
16
18
  },
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ export { default as AlertDialog } from "./AlertDialog";
5
5
  export { default as AppBar } from "./AppBar";
6
6
  export { default as AvatarDropdown } from "./AvatarDropdown";
7
7
  export { default as Checkbox } from "./Checkbox";
8
+ export { default as CircularProgress } from "./CircularProgress";
8
9
  export { default as ConfirmDialog } from "./ConfirmDialog";
9
10
  export { default as DataGrid } from "./DataGrid";
10
11
  export { default as Dialog } from "./Dialog";
@@ -20,10 +21,12 @@ export { default as MainHeader } from "./MainHeader";
20
21
  export { default as SearchTextField } from "./SearchTextField";
21
22
  export { default as Section } from "./Section";
22
23
  export { default as Select } from "./Select";
24
+ export { default as ShadowedSection } from "./ShadowedSection";
23
25
  export { default as Slider } from "./Slider";
24
26
  export { default as Snackbar } from "./Snackbar";
25
27
  export { default as StatusChip } from "./StatusChip";
26
28
  export { default as Switch } from "./Switch";
29
+ export { default as TabbedSection } from "./TabbedSection";
27
30
  export { default as Tabs } from "./Tabs";
28
31
  export { default as TextField } from "./TextField";
29
32
  export { default as Sidebar } from "./sidebar/Sidebar";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "1.0.19",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "/dist"
@@ -16,6 +16,7 @@
16
16
  "@mui/x-data-grid": "^6.18.2",
17
17
  "@mui/x-date-pickers": "^6.18.2",
18
18
  "@mui/x-tree-view": "^6.17.0",
19
+ "@nethru/ui": "^1.0.19",
19
20
  "@testing-library/jest-dom": "^5.17.0",
20
21
  "@testing-library/react": "^13.4.0",
21
22
  "@testing-library/user-event": "^13.5.0",