@nethru/ui 1.0.19 → 1.0.21
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/dist/Section.js +2 -2
- package/dist/ShadowedSection.js +36 -0
- package/dist/TabbedSection.js +37 -0
- package/dist/Tabs.js +2 -0
- package/dist/index.js +2 -0
- package/package.json +2 -1
package/dist/Section.js
CHANGED
|
@@ -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
|
@@ -20,10 +20,12 @@ export { default as MainHeader } from "./MainHeader";
|
|
|
20
20
|
export { default as SearchTextField } from "./SearchTextField";
|
|
21
21
|
export { default as Section } from "./Section";
|
|
22
22
|
export { default as Select } from "./Select";
|
|
23
|
+
export { default as ShadowedSection } from "./ShadowedSection";
|
|
23
24
|
export { default as Slider } from "./Slider";
|
|
24
25
|
export { default as Snackbar } from "./Snackbar";
|
|
25
26
|
export { default as StatusChip } from "./StatusChip";
|
|
26
27
|
export { default as Switch } from "./Switch";
|
|
28
|
+
export { default as TabbedSection } from "./TabbedSection";
|
|
27
29
|
export { default as Tabs } from "./Tabs";
|
|
28
30
|
export { default as TextField } from "./TextField";
|
|
29
31
|
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.
|
|
3
|
+
"version": "1.0.21",
|
|
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",
|