@m4l/components 0.0.10 → 0.0.11
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/components/PaperForm/index.d.ts +3 -0
- package/dist/components/PaperForm/index.js +122 -0
- package/dist/components/PaperForm/skeleton.d.ts +6 -0
- package/dist/components/PaperForm/styles.d.ts +8 -0
- package/dist/components/PaperForm/types.d.ts +7 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/vendor.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { styled, useTheme } from "@mui/material/styles";
|
|
2
|
+
import { Skeleton } from "@mui/material";
|
|
3
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { BoxIcon } from "@mui_extended/BoxIcon";
|
|
5
|
+
const WrapperPaper = styled("div")(({
|
|
6
|
+
theme
|
|
7
|
+
}) => ({
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
padding: theme.spacing(1),
|
|
11
|
+
[theme.breakpoints.up("sm")]: {
|
|
12
|
+
margin: `${theme.spacing(1.5)} ${theme.spacing(1.5)} ${theme.spacing(3)} ${theme.spacing(1.5)}`,
|
|
13
|
+
borderRadius: theme.spacing(2),
|
|
14
|
+
boxShadow: theme.customShadows.z8,
|
|
15
|
+
padding: theme.spacing(3),
|
|
16
|
+
backgroundColor: theme.palette.background.paper
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
const Header = styled("div")(({
|
|
20
|
+
theme
|
|
21
|
+
}) => ({
|
|
22
|
+
display: "flex",
|
|
23
|
+
flexDirection: "row",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
26
|
+
paddingBottom: theme.spacing(3),
|
|
27
|
+
marginBottom: theme.spacing(2),
|
|
28
|
+
overflow: "hidden"
|
|
29
|
+
}));
|
|
30
|
+
const IconTitleContainer = styled("div")(({
|
|
31
|
+
theme
|
|
32
|
+
}) => ({
|
|
33
|
+
display: "flex",
|
|
34
|
+
flexDirection: "row",
|
|
35
|
+
flexGrow: 1,
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
cursor: "move",
|
|
38
|
+
...theme.typography.subtitle1,
|
|
39
|
+
color: theme.palette.text.primary
|
|
40
|
+
}));
|
|
41
|
+
const IconHeader = styled("div")(({
|
|
42
|
+
theme
|
|
43
|
+
}) => ({
|
|
44
|
+
display: "flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
marginRight: theme.spacing(1.5)
|
|
48
|
+
}));
|
|
49
|
+
const Content = styled("div")(() => ({
|
|
50
|
+
flexGrow: 1,
|
|
51
|
+
position: "relative"
|
|
52
|
+
}));
|
|
53
|
+
const SkPaperFormHeader = styled("div")(({
|
|
54
|
+
theme
|
|
55
|
+
}) => ({
|
|
56
|
+
width: "auto",
|
|
57
|
+
display: "grid",
|
|
58
|
+
gridTemplateColumns: `${theme.spacing(2)} auto`,
|
|
59
|
+
gridGap: `${theme.spacing(1.5)}`,
|
|
60
|
+
paddingBottom: `${theme.spacing(3)}`,
|
|
61
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
62
|
+
marginBottom: `${theme.spacing(3)}`
|
|
63
|
+
}));
|
|
64
|
+
const PaperFormBoddy = styled("div")(() => ({
|
|
65
|
+
display: "flex",
|
|
66
|
+
flexDirection: "column",
|
|
67
|
+
flexGrow: "1"
|
|
68
|
+
}));
|
|
69
|
+
function SKTPaperForm(prop) {
|
|
70
|
+
const {
|
|
71
|
+
children
|
|
72
|
+
} = prop;
|
|
73
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
74
|
+
children: [/* @__PURE__ */ jsxs(SkPaperFormHeader, {
|
|
75
|
+
children: [/* @__PURE__ */ jsx(Skeleton, {
|
|
76
|
+
variant: "circular",
|
|
77
|
+
width: 16,
|
|
78
|
+
height: 16
|
|
79
|
+
}), /* @__PURE__ */ jsx(Skeleton, {
|
|
80
|
+
variant: "text",
|
|
81
|
+
width: 68,
|
|
82
|
+
height: 14
|
|
83
|
+
})]
|
|
84
|
+
}), /* @__PURE__ */ jsx(PaperFormBoddy, {
|
|
85
|
+
children
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function PaperForm(props) {
|
|
90
|
+
const {
|
|
91
|
+
urlIcon,
|
|
92
|
+
tittle,
|
|
93
|
+
children,
|
|
94
|
+
isSkeleton = false
|
|
95
|
+
} = props;
|
|
96
|
+
const theme = useTheme();
|
|
97
|
+
return /* @__PURE__ */ jsx(WrapperPaper, {
|
|
98
|
+
id: "ContainerPropertyValue",
|
|
99
|
+
children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, {
|
|
100
|
+
children: [/* @__PURE__ */ jsx(Header, {
|
|
101
|
+
id: "Header",
|
|
102
|
+
children: /* @__PURE__ */ jsxs(IconTitleContainer, {
|
|
103
|
+
className: "draggable-dialog-title",
|
|
104
|
+
children: [/* @__PURE__ */ jsx(IconHeader, {
|
|
105
|
+
children: /* @__PURE__ */ jsx(BoxIcon, {
|
|
106
|
+
src: urlIcon,
|
|
107
|
+
sx: {
|
|
108
|
+
color: theme.palette.action.active
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
}), tittle]
|
|
112
|
+
})
|
|
113
|
+
}), /* @__PURE__ */ jsx(Content, {
|
|
114
|
+
id: "Content",
|
|
115
|
+
children
|
|
116
|
+
})]
|
|
117
|
+
}) : /* @__PURE__ */ jsx(SKTPaperForm, {
|
|
118
|
+
children
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
export { PaperForm as P };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperPaper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
+
export declare const Header: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const IconTitleContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const IconHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const Content: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const SkPaperFormHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
export declare const PaperFormBoddy: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -12,6 +12,7 @@ export * from '../components/NoItemSelected';
|
|
|
12
12
|
export * from '../components/NoItemSelected/dictionary';
|
|
13
13
|
export * from '../components/ObjectLogs';
|
|
14
14
|
export * from '../components/ObjectLogs/dictionary';
|
|
15
|
+
export * from '../components/PaperForm';
|
|
15
16
|
export * from '../components/PropertyValue';
|
|
16
17
|
export * from '../components/Resizeable';
|
|
17
18
|
export * from '../components/ScrollBar';
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { R as RHFRadioGroup } from "./components/hook-form/RHFRadioGroup.js";
|
|
|
12
12
|
export { M as ModalDialog, d as defaultModalDialogDictionary, g as getModalDialogComponentsDictionary } from "./components/ModalDialog/index.js";
|
|
13
13
|
export { N as NoItemSelected, d as defaultNoItemSelectedDictionary, g as getNoItemSelectedComponentsDictionary } from "./components/NoItemSelected/index.js";
|
|
14
14
|
export { O as ObjectLogs, d as defaultObjectLogDictionary, g as getObjectLogsComponentsDictionary } from "./components/ObjectLogs/index.js";
|
|
15
|
+
export { P as PaperForm } from "./components/PaperForm/index.js";
|
|
15
16
|
export { P as PropertyValue } from "./components/PropertyValue/index.js";
|
|
16
17
|
export { R as Resizeable } from "./components/Resizeable/index.js";
|
|
17
18
|
export { S as ScrollBar } from "./components/ScrollBar/index.js";
|
|
@@ -48,6 +49,7 @@ import "@mui/x-date-pickers";
|
|
|
48
49
|
import "@mui/lab/AdapterDateFns";
|
|
49
50
|
import "./react-json-view.js";
|
|
50
51
|
import "./commonjs.js";
|
|
52
|
+
import "@mui_extended/BoxIcon";
|
|
51
53
|
import "./react-splitter-layout.js";
|
|
52
54
|
import "./node_modules.js";
|
|
53
55
|
import "./react-resizable.js";
|
package/dist/vendor.js
CHANGED
|
@@ -29,6 +29,8 @@ import "@mui/x-date-pickers";
|
|
|
29
29
|
import "@mui/lab/AdapterDateFns";
|
|
30
30
|
import "./components/ObjectLogs/index.js";
|
|
31
31
|
import "./react-json-view.js";
|
|
32
|
+
import "./components/PaperForm/index.js";
|
|
33
|
+
import "@mui_extended/BoxIcon";
|
|
32
34
|
import "./components/PropertyValue/index.js";
|
|
33
35
|
import "./components/ScrollBar/index.js";
|
|
34
36
|
import "./react-splitter-layout.js";
|