@zauru-sdk/components 1.0.54 → 1.0.61
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/CHANGELOG.md +56 -0
- package/LICENCE.md +11 -11
- package/package.json +7 -7
- package/src/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.tsx +66 -66
- package/src/Alerts/StaticAlert.tsx +121 -121
- package/src/Alerts/index.ts +2 -2
- package/src/BlockUI/BlockUI.tsx +50 -50
- package/src/BlockUI/index.tsx +1 -1
- package/src/Buttons/Button.tsx +90 -90
- package/src/Buttons/index.ts +1 -1
- package/src/Card/Card.tsx +24 -24
- package/src/Card/index.ts +1 -1
- package/src/Chat/ChatLayout.tsx +131 -131
- package/src/Chat/ChatMessageHistory.tsx +142 -142
- package/src/Chat/index.ts +2 -2
- package/src/ConnectionState/ConnectionState.tsx +27 -27
- package/src/ConnectionState/index.tsx +1 -1
- package/src/Containers/BodyContainer.tsx +14 -14
- package/src/Containers/ButtonSectionContainer.tsx +21 -21
- package/src/Containers/Container.tsx +39 -39
- package/src/Containers/DoubleContainer.tsx +48 -48
- package/src/Containers/MainContainer.tsx +17 -17
- package/src/Containers/OutletContainer.tsx +14 -14
- package/src/Containers/SubContainer.tsx +37 -37
- package/src/Containers/index.ts +7 -7
- package/src/DynamicTable/BasicPrintDynamicTable.tsx +73 -73
- package/src/DynamicTable/DynamicPrintTable.tsx +288 -288
- package/src/DynamicTable/DynamicTable.tsx +405 -405
- package/src/DynamicTable/GenericDynamicTable.tsx +456 -456
- package/src/DynamicTable/index.tsx +4 -4
- package/src/Footer/Footer.tsx +50 -50
- package/src/Footer/index.tsx +1 -1
- package/src/Form/Checkbox/index.tsx +96 -96
- package/src/Form/Checklist/index.tsx +35 -35
- package/src/Form/DatePicker/index.tsx +132 -132
- package/src/Form/DynamicBaculoForm/index.tsx +361 -361
- package/src/Form/FieldContainer/DoubleFieldContainer.tsx +35 -35
- package/src/Form/FieldContainer/QuadrupleFieldContainer.tsx +36 -36
- package/src/Form/FieldContainer/TripleFieldContainer.tsx +35 -35
- package/src/Form/FieldContainer/index.ts +3 -3
- package/src/Form/FileUpload/index.tsx +184 -184
- package/src/Form/FormButtons/index.tsx +78 -78
- package/src/Form/FormLayout/index.tsx +37 -37
- package/src/Form/SelectField/index.tsx +237 -237
- package/src/Form/TextArea/index.tsx +125 -125
- package/src/Form/TextField/index.tsx +194 -194
- package/src/Form/TimePicker/index.tsx +127 -127
- package/src/Form/YesNo/index.tsx +77 -77
- package/src/Form/index.ts +13 -13
- package/src/Labels/InfoLabel/index.tsx +21 -21
- package/src/Labels/index.tsx +1 -1
- package/src/Layouts/homeLayout/index.tsx +34 -34
- package/src/Layouts/index.ts +1 -1
- package/src/LineSeparator/LineSeparator.tsx +3 -3
- package/src/LineSeparator/index.tsx +1 -1
- package/src/Modal/Modal.tsx +104 -104
- package/src/Modal/index.tsx +1 -1
- package/src/NavBar/NavBar.tsx +223 -223
- package/src/NavBar/NavBar.types.ts +64 -64
- package/src/NavBar/NavBar.utils.ts +58 -58
- package/src/NavBar/index.tsx +5 -5
- package/src/ProgressBar/ProgressBar.tsx +25 -25
- package/src/ProgressBar/ProgressCircle.tsx +75 -75
- package/src/ProgressBar/index.tsx +2 -2
- package/src/Skeletons/LoadingInputSkeleton.tsx +12 -12
- package/src/Skeletons/index.ts +1 -1
- package/src/Tab/Tab.tsx +63 -63
- package/src/Tab/index.ts +1 -1
- package/src/Table/ZauruTable.tsx +265 -265
- package/src/Table/index.tsx +1 -1
- package/src/TaskList/TaskList.tsx +88 -88
- package/src/TaskList/index.ts +1 -1
- package/src/Titles/LabelArray.tsx +17 -17
- package/src/Titles/TableColumnTitle.tsx +9 -9
- package/src/Titles/TitleH1.tsx +10 -10
- package/src/Titles/TitleH2.tsx +10 -10
- package/src/Titles/TitleH3.tsx +10 -10
- package/src/Titles/index.ts +5 -5
- package/src/Tooltip/Tooltip.tsx +42 -42
- package/src/Tooltip/index.ts +1 -1
- package/src/WithTooltip/WithTooltip.tsx +21 -21
- package/src/WithTooltip/index.tsx +1 -1
- package/src/Wizards/StepWizard.tsx +88 -88
- package/src/Wizards/index.ts +1 -1
- package/src/Zendesk/Chat.tsx +83 -83
- package/src/Zendesk/index.ts +2 -2
- package/src/Zendesk/zendesk.config.ts +40 -40
- package/src/index.ts +24 -24
- package/src/postcss.config.mjs +5 -5
- package/src/tailwind.config.ts +10 -10
- package/src/tailwind.css +3 -3
- package/tsconfig.cjs.json +8 -8
- package/tsconfig.esm.json +11 -11
- package/tsconfig.json +17 -17
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { CheckIconSVG, PencilSvg } from "@zauru-sdk/icons";
|
|
2
|
-
import { useState, useEffect, useRef } from "react";
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
author: string;
|
|
6
|
-
content: string;
|
|
7
|
-
date?: string;
|
|
8
|
-
onLike?: (like: boolean) => void;
|
|
9
|
-
onUpdateComment?: (text: string, itsNew?: boolean) => void;
|
|
10
|
-
id: string;
|
|
11
|
-
commentOwner?: boolean;
|
|
12
|
-
imageLink?: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const ChatMessageHistory = (props: Props) => {
|
|
16
|
-
const {
|
|
17
|
-
author,
|
|
18
|
-
content,
|
|
19
|
-
onLike,
|
|
20
|
-
onUpdateComment,
|
|
21
|
-
id,
|
|
22
|
-
commentOwner = false,
|
|
23
|
-
date,
|
|
24
|
-
imageLink,
|
|
25
|
-
} = props;
|
|
26
|
-
|
|
27
|
-
const initials = author ? author[0].toUpperCase() : "A";
|
|
28
|
-
const [isUpdating, setIsUpdating] = useState(false);
|
|
29
|
-
const [updatedContent, setUpdatedContent] = useState(content);
|
|
30
|
-
const textAreaRef = useRef<HTMLTextAreaElement | null>(null);
|
|
31
|
-
const [shouldPulse, setShouldPulse] = useState(false);
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (isUpdating && textAreaRef.current) {
|
|
35
|
-
textAreaRef.current.style.height = "auto";
|
|
36
|
-
textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight}px`;
|
|
37
|
-
textAreaRef.current.focus();
|
|
38
|
-
}
|
|
39
|
-
}, [isUpdating]);
|
|
40
|
-
|
|
41
|
-
// Efecto secundario que se ejecuta cada vez que 'isUpdating' cambia
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
// Activar la animación
|
|
44
|
-
setShouldPulse(true);
|
|
45
|
-
|
|
46
|
-
// Establecer un temporizador para eliminar la clase después de que la animación se haya completado
|
|
47
|
-
const timer = setTimeout(() => {
|
|
48
|
-
setShouldPulse(false);
|
|
49
|
-
}, 15000); // Tiempo total de la animación
|
|
50
|
-
|
|
51
|
-
// Limpiar el temporizador si el componente se desmonta o si 'isUpdating' cambia de nuevo antes de que la animación se complete
|
|
52
|
-
return () => clearTimeout(timer);
|
|
53
|
-
}, [isUpdating]);
|
|
54
|
-
|
|
55
|
-
const handleUpdate = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
56
|
-
if (e.target.value.length <= 254) {
|
|
57
|
-
setUpdatedContent(e.target.value);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const handleUpdateClick = () => {
|
|
62
|
-
if (isUpdating) {
|
|
63
|
-
if (textAreaRef.current) {
|
|
64
|
-
textAreaRef.current.blur();
|
|
65
|
-
}
|
|
66
|
-
//onUpdateComment && onUpdateComment(updatedContent, itsNew);
|
|
67
|
-
}
|
|
68
|
-
setIsUpdating(!isUpdating);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<div className="p-1 rounded-xl flex items-center space-x-4 relative">
|
|
73
|
-
{commentOwner && (
|
|
74
|
-
<div className="absolute top-2 right-2">
|
|
75
|
-
<button
|
|
76
|
-
onClick={handleUpdateClick}
|
|
77
|
-
className={`${shouldPulse ? "animate-custom-pulse" : ""}`}
|
|
78
|
-
>
|
|
79
|
-
{isUpdating ? <CheckIconSVG /> : <PencilSvg />}
|
|
80
|
-
</button>
|
|
81
|
-
</div>
|
|
82
|
-
)}
|
|
83
|
-
<div
|
|
84
|
-
className={`w-[0%] lg:w-[8%] h-16 bg-purple-300 rounded-full flex items-center justify-center overflow-hidden text-white text-xl font-bold`}
|
|
85
|
-
>
|
|
86
|
-
{initials}
|
|
87
|
-
</div>
|
|
88
|
-
<div className="flex flex-col justify-between h-full w-[92%]">
|
|
89
|
-
<div>
|
|
90
|
-
<div className="flex flex-row space-x-2">
|
|
91
|
-
<div className="text-xl font-medium text-black">{author}</div>
|
|
92
|
-
<div className="text-xl font-medium text-gray-500">
|
|
93
|
-
{date && <> - {date}</>}
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
{isUpdating ? (
|
|
97
|
-
<textarea
|
|
98
|
-
ref={textAreaRef}
|
|
99
|
-
className="bg-gray-100 rounded p-2 w-full resize-none"
|
|
100
|
-
value={updatedContent}
|
|
101
|
-
onChange={handleUpdate}
|
|
102
|
-
maxLength={254}
|
|
103
|
-
placeholder="Deja tus buenos deseos..."
|
|
104
|
-
/>
|
|
105
|
-
) : (
|
|
106
|
-
<p className="text-gray-500">{updatedContent}</p>
|
|
107
|
-
)}
|
|
108
|
-
</div>
|
|
109
|
-
<div className="flex justify-end items-center">
|
|
110
|
-
<button onClick={() => {}}>
|
|
111
|
-
<></>
|
|
112
|
-
</button>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
{imageLink && (
|
|
116
|
-
<div
|
|
117
|
-
className={`w-[25%] flex items-center justify-center overflow-hidden text-white text-xl font-bold`}
|
|
118
|
-
>
|
|
119
|
-
<div
|
|
120
|
-
onClick={() => {
|
|
121
|
-
return window.open(imageLink, "_blank");
|
|
122
|
-
}}
|
|
123
|
-
>
|
|
124
|
-
<img
|
|
125
|
-
src={imageLink}
|
|
126
|
-
alt={"IMG_CHAT"}
|
|
127
|
-
className={`h-48 w-48 inline mr-1 pb-1`}
|
|
128
|
-
style={{
|
|
129
|
-
stroke: "currentColor",
|
|
130
|
-
strokeWidth: 2,
|
|
131
|
-
strokeLinecap: "round",
|
|
132
|
-
strokeLinejoin: "round",
|
|
133
|
-
fill: "none",
|
|
134
|
-
backgroundColor: "transparent",
|
|
135
|
-
}}
|
|
136
|
-
/>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
)}
|
|
140
|
-
</div>
|
|
141
|
-
);
|
|
142
|
-
};
|
|
1
|
+
import { CheckIconSVG, PencilSvg } from "@zauru-sdk/icons";
|
|
2
|
+
import { useState, useEffect, useRef } from "react";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
author: string;
|
|
6
|
+
content: string;
|
|
7
|
+
date?: string;
|
|
8
|
+
onLike?: (like: boolean) => void;
|
|
9
|
+
onUpdateComment?: (text: string, itsNew?: boolean) => void;
|
|
10
|
+
id: string;
|
|
11
|
+
commentOwner?: boolean;
|
|
12
|
+
imageLink?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const ChatMessageHistory = (props: Props) => {
|
|
16
|
+
const {
|
|
17
|
+
author,
|
|
18
|
+
content,
|
|
19
|
+
onLike,
|
|
20
|
+
onUpdateComment,
|
|
21
|
+
id,
|
|
22
|
+
commentOwner = false,
|
|
23
|
+
date,
|
|
24
|
+
imageLink,
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
27
|
+
const initials = author ? author[0].toUpperCase() : "A";
|
|
28
|
+
const [isUpdating, setIsUpdating] = useState(false);
|
|
29
|
+
const [updatedContent, setUpdatedContent] = useState(content);
|
|
30
|
+
const textAreaRef = useRef<HTMLTextAreaElement | null>(null);
|
|
31
|
+
const [shouldPulse, setShouldPulse] = useState(false);
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (isUpdating && textAreaRef.current) {
|
|
35
|
+
textAreaRef.current.style.height = "auto";
|
|
36
|
+
textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight}px`;
|
|
37
|
+
textAreaRef.current.focus();
|
|
38
|
+
}
|
|
39
|
+
}, [isUpdating]);
|
|
40
|
+
|
|
41
|
+
// Efecto secundario que se ejecuta cada vez que 'isUpdating' cambia
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
// Activar la animación
|
|
44
|
+
setShouldPulse(true);
|
|
45
|
+
|
|
46
|
+
// Establecer un temporizador para eliminar la clase después de que la animación se haya completado
|
|
47
|
+
const timer = setTimeout(() => {
|
|
48
|
+
setShouldPulse(false);
|
|
49
|
+
}, 15000); // Tiempo total de la animación
|
|
50
|
+
|
|
51
|
+
// Limpiar el temporizador si el componente se desmonta o si 'isUpdating' cambia de nuevo antes de que la animación se complete
|
|
52
|
+
return () => clearTimeout(timer);
|
|
53
|
+
}, [isUpdating]);
|
|
54
|
+
|
|
55
|
+
const handleUpdate = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
56
|
+
if (e.target.value.length <= 254) {
|
|
57
|
+
setUpdatedContent(e.target.value);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const handleUpdateClick = () => {
|
|
62
|
+
if (isUpdating) {
|
|
63
|
+
if (textAreaRef.current) {
|
|
64
|
+
textAreaRef.current.blur();
|
|
65
|
+
}
|
|
66
|
+
//onUpdateComment && onUpdateComment(updatedContent, itsNew);
|
|
67
|
+
}
|
|
68
|
+
setIsUpdating(!isUpdating);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div className="p-1 rounded-xl flex items-center space-x-4 relative">
|
|
73
|
+
{commentOwner && (
|
|
74
|
+
<div className="absolute top-2 right-2">
|
|
75
|
+
<button
|
|
76
|
+
onClick={handleUpdateClick}
|
|
77
|
+
className={`${shouldPulse ? "animate-custom-pulse" : ""}`}
|
|
78
|
+
>
|
|
79
|
+
{isUpdating ? <CheckIconSVG /> : <PencilSvg />}
|
|
80
|
+
</button>
|
|
81
|
+
</div>
|
|
82
|
+
)}
|
|
83
|
+
<div
|
|
84
|
+
className={`w-[0%] lg:w-[8%] h-16 bg-purple-300 rounded-full flex items-center justify-center overflow-hidden text-white text-xl font-bold`}
|
|
85
|
+
>
|
|
86
|
+
{initials}
|
|
87
|
+
</div>
|
|
88
|
+
<div className="flex flex-col justify-between h-full w-[92%]">
|
|
89
|
+
<div>
|
|
90
|
+
<div className="flex flex-row space-x-2">
|
|
91
|
+
<div className="text-xl font-medium text-black">{author}</div>
|
|
92
|
+
<div className="text-xl font-medium text-gray-500">
|
|
93
|
+
{date && <> - {date}</>}
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
{isUpdating ? (
|
|
97
|
+
<textarea
|
|
98
|
+
ref={textAreaRef}
|
|
99
|
+
className="bg-gray-100 rounded p-2 w-full resize-none"
|
|
100
|
+
value={updatedContent}
|
|
101
|
+
onChange={handleUpdate}
|
|
102
|
+
maxLength={254}
|
|
103
|
+
placeholder="Deja tus buenos deseos..."
|
|
104
|
+
/>
|
|
105
|
+
) : (
|
|
106
|
+
<p className="text-gray-500">{updatedContent}</p>
|
|
107
|
+
)}
|
|
108
|
+
</div>
|
|
109
|
+
<div className="flex justify-end items-center">
|
|
110
|
+
<button onClick={() => {}}>
|
|
111
|
+
<></>
|
|
112
|
+
</button>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
{imageLink && (
|
|
116
|
+
<div
|
|
117
|
+
className={`w-[25%] flex items-center justify-center overflow-hidden text-white text-xl font-bold`}
|
|
118
|
+
>
|
|
119
|
+
<div
|
|
120
|
+
onClick={() => {
|
|
121
|
+
return window.open(imageLink, "_blank");
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
<img
|
|
125
|
+
src={imageLink}
|
|
126
|
+
alt={"IMG_CHAT"}
|
|
127
|
+
className={`h-48 w-48 inline mr-1 pb-1`}
|
|
128
|
+
style={{
|
|
129
|
+
stroke: "currentColor",
|
|
130
|
+
strokeWidth: 2,
|
|
131
|
+
strokeLinecap: "round",
|
|
132
|
+
strokeLinejoin: "round",
|
|
133
|
+
fill: "none",
|
|
134
|
+
backgroundColor: "transparent",
|
|
135
|
+
}}
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
)}
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
};
|
package/src/Chat/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./ChatLayout.js";
|
|
2
|
-
export * from "./ChatMessageHistory.js";
|
|
1
|
+
export * from "./ChatLayout.js";
|
|
2
|
+
export * from "./ChatMessageHistory.js";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { useIsOnline } from "@zauru-sdk/hooks";
|
|
2
|
-
|
|
3
|
-
export const ConnectionState = () => {
|
|
4
|
-
const isOnline = useIsOnline();
|
|
5
|
-
|
|
6
|
-
// Definir estilos
|
|
7
|
-
const styles = {
|
|
8
|
-
container: {
|
|
9
|
-
padding: "10px",
|
|
10
|
-
borderRadius: "5px",
|
|
11
|
-
backgroundColor: isOnline ? "#d4edda" : "#f8d7da",
|
|
12
|
-
color: isOnline ? "#155724" : "#721c24",
|
|
13
|
-
fontWeight: "bold",
|
|
14
|
-
},
|
|
15
|
-
text: {
|
|
16
|
-
fontSize: "16px",
|
|
17
|
-
margin: 0,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
// Renderizar el estado de conexión
|
|
22
|
-
return (
|
|
23
|
-
<div style={styles.container}>
|
|
24
|
-
<p style={styles.text}>{isOnline ? "ONLINE ✅🌐" : "OFFLINE ❌🌐"}</p>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
1
|
+
import { useIsOnline } from "@zauru-sdk/hooks";
|
|
2
|
+
|
|
3
|
+
export const ConnectionState = () => {
|
|
4
|
+
const isOnline = useIsOnline();
|
|
5
|
+
|
|
6
|
+
// Definir estilos
|
|
7
|
+
const styles = {
|
|
8
|
+
container: {
|
|
9
|
+
padding: "10px",
|
|
10
|
+
borderRadius: "5px",
|
|
11
|
+
backgroundColor: isOnline ? "#d4edda" : "#f8d7da",
|
|
12
|
+
color: isOnline ? "#155724" : "#721c24",
|
|
13
|
+
fontWeight: "bold",
|
|
14
|
+
},
|
|
15
|
+
text: {
|
|
16
|
+
fontSize: "16px",
|
|
17
|
+
margin: 0,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Renderizar el estado de conexión
|
|
22
|
+
return (
|
|
23
|
+
<div style={styles.container}>
|
|
24
|
+
<p style={styles.text}>{isOnline ? "ONLINE ✅🌐" : "OFFLINE ❌🌐"}</p>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./ConnectionState.js";
|
|
1
|
+
export * from "./ConnectionState.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const BodyContainer = (props: Props) => {
|
|
8
|
-
const { children } = props;
|
|
9
|
-
return (
|
|
10
|
-
<>
|
|
11
|
-
<body className="flex flex-col min-h-screen m-0">{children}</body>
|
|
12
|
-
</>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const BodyContainer = (props: Props) => {
|
|
8
|
+
const { children } = props;
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<body className="flex flex-col min-h-screen m-0">{children}</body>
|
|
12
|
+
</>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
whitBg?: boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const ButtonSectionContainer = (props: Props) => {
|
|
10
|
-
const { children, className, whitBg = true } = props;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<div
|
|
14
|
-
className={`${
|
|
15
|
-
whitBg ? "bg-gray-50" : ""
|
|
16
|
-
} px-4 py-3 text-right sm:px-6 ${className}`}
|
|
17
|
-
>
|
|
18
|
-
{children}
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
whitBg?: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const ButtonSectionContainer = (props: Props) => {
|
|
10
|
+
const { children, className, whitBg = true } = props;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div
|
|
14
|
+
className={`${
|
|
15
|
+
whitBg ? "bg-gray-50" : ""
|
|
16
|
+
} px-4 py-3 text-right sm:px-6 ${className}`}
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
title?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
rightContent?: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const Container = (props: Props) => {
|
|
12
|
-
const { title, description, children, className = "", rightContent } = props;
|
|
13
|
-
|
|
14
|
-
const titleInfo = (
|
|
15
|
-
<>
|
|
16
|
-
{title && (
|
|
17
|
-
<h3 className="text-3xl font-bold leading-8 text-gray-900">{title}</h3>
|
|
18
|
-
)}
|
|
19
|
-
{description && (
|
|
20
|
-
<p className="mt-1 text-md text-gray-600">{description}</p>
|
|
21
|
-
)}
|
|
22
|
-
</>
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<>
|
|
27
|
-
<div className={`mx-2 ${className}`}>
|
|
28
|
-
{rightContent && (
|
|
29
|
-
<div className="flex justify-between items-center">
|
|
30
|
-
<div>{titleInfo}</div>
|
|
31
|
-
<div>{rightContent}</div>
|
|
32
|
-
</div>
|
|
33
|
-
)}
|
|
34
|
-
{!rightContent && titleInfo}
|
|
35
|
-
<div className="mt-5 space-y-5">{children}</div>
|
|
36
|
-
</div>
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
rightContent?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Container = (props: Props) => {
|
|
12
|
+
const { title, description, children, className = "", rightContent } = props;
|
|
13
|
+
|
|
14
|
+
const titleInfo = (
|
|
15
|
+
<>
|
|
16
|
+
{title && (
|
|
17
|
+
<h3 className="text-3xl font-bold leading-8 text-gray-900">{title}</h3>
|
|
18
|
+
)}
|
|
19
|
+
{description && (
|
|
20
|
+
<p className="mt-1 text-md text-gray-600">{description}</p>
|
|
21
|
+
)}
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<div className={`mx-2 ${className}`}>
|
|
28
|
+
{rightContent && (
|
|
29
|
+
<div className="flex justify-between items-center">
|
|
30
|
+
<div>{titleInfo}</div>
|
|
31
|
+
<div>{rightContent}</div>
|
|
32
|
+
</div>
|
|
33
|
+
)}
|
|
34
|
+
{!rightContent && titleInfo}
|
|
35
|
+
<div className="mt-5 space-y-5">{children}</div>
|
|
36
|
+
</div>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
title?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const DoubleContainer = (props: Props) => {
|
|
11
|
-
const { title, description, className = "", children } = props;
|
|
12
|
-
|
|
13
|
-
const getChildren = (index: number) => {
|
|
14
|
-
if (children && Array.isArray(children) && children[index]) {
|
|
15
|
-
return children[index];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (children && index === 0) {
|
|
19
|
-
return children;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return <></>;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<>
|
|
27
|
-
<div className={`mx-2 ${className}`}>
|
|
28
|
-
{/* Font sizes https://tailwindcss.com/docs/font-size */}
|
|
29
|
-
{title && (
|
|
30
|
-
<h3 className="text-3xl font-bold leading-8 text-gray-900">
|
|
31
|
-
{title}
|
|
32
|
-
</h3>
|
|
33
|
-
)}
|
|
34
|
-
{description && (
|
|
35
|
-
<p className="mt-1 text-md text-gray-600">{description}</p>
|
|
36
|
-
)}
|
|
37
|
-
<div className="grid xl:grid-cols-3 md:grid-cols-1 gap-4">
|
|
38
|
-
<div className="xl:col-span-2 md:col-span-1 mt-5">
|
|
39
|
-
{getChildren(0)}
|
|
40
|
-
</div>
|
|
41
|
-
<div className="xl:col-span-1 md:col-span-1 mt-5">
|
|
42
|
-
{getChildren(1)}
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const DoubleContainer = (props: Props) => {
|
|
11
|
+
const { title, description, className = "", children } = props;
|
|
12
|
+
|
|
13
|
+
const getChildren = (index: number) => {
|
|
14
|
+
if (children && Array.isArray(children) && children[index]) {
|
|
15
|
+
return children[index];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (children && index === 0) {
|
|
19
|
+
return children;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return <></>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<div className={`mx-2 ${className}`}>
|
|
28
|
+
{/* Font sizes https://tailwindcss.com/docs/font-size */}
|
|
29
|
+
{title && (
|
|
30
|
+
<h3 className="text-3xl font-bold leading-8 text-gray-900">
|
|
31
|
+
{title}
|
|
32
|
+
</h3>
|
|
33
|
+
)}
|
|
34
|
+
{description && (
|
|
35
|
+
<p className="mt-1 text-md text-gray-600">{description}</p>
|
|
36
|
+
)}
|
|
37
|
+
<div className="grid xl:grid-cols-3 md:grid-cols-1 gap-4">
|
|
38
|
+
<div className="xl:col-span-2 md:col-span-1 mt-5">
|
|
39
|
+
{getChildren(0)}
|
|
40
|
+
</div>
|
|
41
|
+
<div className="xl:col-span-1 md:col-span-1 mt-5">
|
|
42
|
+
{getChildren(1)}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const MainContainer = (props: Props) => {
|
|
8
|
-
const { children } = props;
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<div className="md:p-10 p-0 mt-10 ml-2 mr-2 mb-10 md:mt-0 md:ml-0 md:mr-0 md:mb-0">
|
|
13
|
-
{children}
|
|
14
|
-
</div>
|
|
15
|
-
</>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const MainContainer = (props: Props) => {
|
|
8
|
+
const { children } = props;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<div className="md:p-10 p-0 mt-10 ml-2 mr-2 mb-10 md:mt-0 md:ml-0 md:mr-0 md:mb-0">
|
|
13
|
+
{children}
|
|
14
|
+
</div>
|
|
15
|
+
</>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export const OutletContainer = (props: Props) => {
|
|
8
|
-
const { children } = props;
|
|
9
|
-
return (
|
|
10
|
-
<>
|
|
11
|
-
<div className="flex-1 overflow-x-auto">{children}</div>
|
|
12
|
-
</>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const OutletContainer = (props: Props) => {
|
|
8
|
+
const { children } = props;
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<div className="flex-1 overflow-x-auto">{children}</div>
|
|
12
|
+
</>
|
|
13
|
+
);
|
|
14
|
+
};
|