@nethru/ui 1.0.21 → 1.0.23

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
+ }
@@ -0,0 +1,56 @@
1
+ import { Chip, Stack, Link } from "@mui/material";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ export default function ReferenceChipList({
4
+ references,
5
+ onClick,
6
+ chipStyles,
7
+ chipProps,
8
+ sx,
9
+ ...props
10
+ }) {
11
+ return /*#__PURE__*/_jsx(Stack, {
12
+ direction: "row",
13
+ gap: 0.5,
14
+ sx: {
15
+ flexWrap: 'wrap',
16
+ ...sx
17
+ },
18
+ ...props,
19
+ children: references.map((reference, index) => {
20
+ return reference.href ? /*#__PURE__*/_jsx(Link, {
21
+ href: reference.href,
22
+ underline: "none",
23
+ onClick: onClick,
24
+ children: /*#__PURE__*/_jsx(ReferenceChip, {
25
+ name: reference.name,
26
+ sx: chipStyles,
27
+ ...chipProps
28
+ })
29
+ }, index) : /*#__PURE__*/_jsx(ReferenceChip, {
30
+ name: reference.name,
31
+ onClick: onClick,
32
+ sx: {
33
+ cursor: 'default',
34
+ ...chipStyles
35
+ },
36
+ ...chipProps
37
+ }, index);
38
+ })
39
+ });
40
+ }
41
+ function ReferenceChip({
42
+ name,
43
+ sx,
44
+ ...props
45
+ }) {
46
+ return /*#__PURE__*/_jsx(Chip, {
47
+ variant: "outlined",
48
+ label: name,
49
+ size: "small",
50
+ sx: {
51
+ fontSize: '14px',
52
+ ...sx
53
+ },
54
+ ...props
55
+ });
56
+ }
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";
@@ -17,6 +18,7 @@ export { default as ListItemDivider } from "./ListItemDivider";
17
18
  export { default as ListItemGrid } from "./ListItemGrid";
18
19
  export { default as ListItemText } from "./ListItemText";
19
20
  export { default as MainHeader } from "./MainHeader";
21
+ export { default as ReferenceChipList } from "./ReferenceChipList";
20
22
  export { default as SearchTextField } from "./SearchTextField";
21
23
  export { default as Section } from "./Section";
22
24
  export { default as Select } from "./Select";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "/dist"