@nethru/ui 2.0.2 → 2.0.3
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.
package/base/index.js
CHANGED
|
@@ -37,7 +37,6 @@ export { default as AccordionDetails } from "./deprecated/AccordionDetails";
|
|
|
37
37
|
export { default as AccordionSummary } from "./deprecated/AccordionSummary";
|
|
38
38
|
export { default as AppendableFormList } from "./deprecated/AppendableFormList";
|
|
39
39
|
export { default as AvatarDropdown } from "./deprecated/AvatarDropdown";
|
|
40
|
-
export { default as Button } from "./deprecated/Button";
|
|
41
40
|
export { default as CircularProgress } from "./deprecated/CircularProgress";
|
|
42
41
|
export { default as FormLabel } from "./deprecated/FormLabel";
|
|
43
42
|
export { default as GroupSelect } from "./deprecated/GroupSelect";
|
|
@@ -46,9 +45,7 @@ export { default as ListItemDivider } from "./deprecated/ListItemDivider";
|
|
|
46
45
|
export { default as ListItemGrid } from "./deprecated/ListItemGrid";
|
|
47
46
|
export { default as ListItemText } from "./deprecated/ListItemText";
|
|
48
47
|
export { default as ReferenceChipList } from "./deprecated/ReferenceChipList";
|
|
49
|
-
export { default as Section } from "./deprecated/Section";
|
|
50
48
|
export { default as ShadowedSection } from "./deprecated/ShadowedSection";
|
|
51
49
|
export { default as StatusChip } from "./deprecated/StatusChip";
|
|
52
50
|
export { default as TabbedSection } from "./deprecated/TabbedSection";
|
|
53
|
-
export { default as Tabs } from "./deprecated/Tabs";
|
|
54
|
-
export { default as TextField } from "./deprecated/TextField";
|
|
51
|
+
export { default as Tabs } from "./deprecated/Tabs";
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import MuiButton from "@mui/material/Button";
|
|
3
|
-
import { Box, CircularProgress, IconButton } from "@mui/material";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
export default function Button({
|
|
7
|
-
label,
|
|
8
|
-
icon,
|
|
9
|
-
iconPlacement = 'start',
|
|
10
|
-
iconSize = '20px',
|
|
11
|
-
iconProps = {},
|
|
12
|
-
progressProps = {},
|
|
13
|
-
loading = false,
|
|
14
|
-
...props
|
|
15
|
-
}) {
|
|
16
|
-
const iconComponent = useMemo(() => {
|
|
17
|
-
return icon ? /*#__PURE__*/_jsx(Box, {
|
|
18
|
-
component: icon,
|
|
19
|
-
sx: {
|
|
20
|
-
'&.MuiSvgIcon-root': {
|
|
21
|
-
fontSize: `${iconSize}!important`
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
...iconProps
|
|
25
|
-
}) : null;
|
|
26
|
-
}, [icon, iconSize, iconProps]);
|
|
27
|
-
const startIcon = useMemo(() => {
|
|
28
|
-
return iconPlacement === 'start' ? iconComponent : null;
|
|
29
|
-
}, [iconComponent, iconPlacement]);
|
|
30
|
-
const endIcon = useMemo(() => {
|
|
31
|
-
return iconPlacement === 'end' ? iconComponent : null;
|
|
32
|
-
}, [iconComponent, iconPlacement]);
|
|
33
|
-
return /*#__PURE__*/_jsxs(Box, {
|
|
34
|
-
sx: {
|
|
35
|
-
position: 'relative',
|
|
36
|
-
width: 'fit-content'
|
|
37
|
-
},
|
|
38
|
-
children: [label ? /*#__PURE__*/_jsx(MuiButton, {
|
|
39
|
-
startIcon: startIcon,
|
|
40
|
-
endIcon: endIcon,
|
|
41
|
-
disabled: loading,
|
|
42
|
-
...props,
|
|
43
|
-
children: label
|
|
44
|
-
}) : /*#__PURE__*/_jsx(IconButton, {
|
|
45
|
-
disabled: loading,
|
|
46
|
-
...props,
|
|
47
|
-
children: iconComponent
|
|
48
|
-
}), loading && /*#__PURE__*/_jsx(CircularProgress, {
|
|
49
|
-
size: 24,
|
|
50
|
-
thickness: 6,
|
|
51
|
-
sx: {
|
|
52
|
-
position: 'absolute',
|
|
53
|
-
top: '50%',
|
|
54
|
-
left: '50%',
|
|
55
|
-
marginTop: '-12px',
|
|
56
|
-
marginLeft: '-12px'
|
|
57
|
-
},
|
|
58
|
-
...progressProps
|
|
59
|
-
})]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import MuiTextField from "@mui/material/TextField";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
-
export default function TextField({
|
|
5
|
-
width,
|
|
6
|
-
fontSize,
|
|
7
|
-
textAlign,
|
|
8
|
-
inputProps,
|
|
9
|
-
...props
|
|
10
|
-
}) {
|
|
11
|
-
const styles = {
|
|
12
|
-
fontSize: fontSize ? fontSize : 16,
|
|
13
|
-
textAlign: textAlign ? textAlign : 'left',
|
|
14
|
-
width
|
|
15
|
-
};
|
|
16
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
|
17
|
-
children: /*#__PURE__*/_jsx(MuiTextField, {
|
|
18
|
-
inputProps: {
|
|
19
|
-
...inputProps,
|
|
20
|
-
style: styles
|
|
21
|
-
},
|
|
22
|
-
...props
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|