@zauru-sdk/components 1.0.11 → 1.0.12
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 +8 -0
- package/dist/Alerts/index.d.ts +3 -0
- package/dist/Alerts/index.js +3 -0
- package/dist/BlockUI/BlockUI.d.ts +8 -0
- package/dist/BlockUI/BlockUI.js +8 -0
- package/dist/BlockUI/index.d.ts +1 -0
- package/dist/BlockUI/index.js +1 -0
- package/dist/Buttons/Button.d.ts +15 -0
- package/dist/Buttons/Button.js +43 -0
- package/dist/Buttons/index.d.ts +1 -0
- package/dist/Buttons/index.js +1 -0
- package/dist/Card/Card.d.ts +8 -0
- package/dist/Card/Card.js +5 -0
- package/dist/Card/index.d.ts +1 -0
- package/dist/Card/index.js +1 -0
- package/dist/Chat/ChatLayout.d.ts +17 -0
- package/dist/Chat/ChatLayout.js +27 -0
- package/dist/Chat/ChatMessageHistory.d.ts +12 -0
- package/dist/Chat/ChatMessageHistory.js +53 -0
- package/dist/Chat/index.d.ts +2 -0
- package/dist/Chat/index.js +2 -0
- package/dist/Containers/BodyContainer.d.ts +6 -0
- package/dist/Containers/BodyContainer.js +5 -0
- package/dist/Containers/ButtonSectionContainer.d.ts +8 -0
- package/dist/Containers/ButtonSectionContainer.js +5 -0
- package/dist/Containers/Container.d.ts +10 -0
- package/dist/Containers/Container.js +6 -0
- package/dist/Containers/DoubleContainer.d.ts +9 -0
- package/dist/Containers/DoubleContainer.js +14 -0
- package/dist/Containers/MainContainer.d.ts +6 -0
- package/dist/Containers/MainContainer.js +5 -0
- package/dist/Containers/OutletContainer.d.ts +6 -0
- package/dist/Containers/OutletContainer.js +5 -0
- package/dist/Containers/SubContainer.d.ts +10 -0
- package/dist/Containers/SubContainer.js +6 -0
- package/dist/Containers/index.d.ts +7 -0
- package/dist/Containers/index.js +7 -0
- package/dist/Footer/Footer.d.ts +7 -0
- package/dist/Footer/Footer.js +25 -0
- package/dist/Footer/index.d.ts +1 -0
- package/dist/Footer/index.js +1 -0
- package/dist/Labels/InfoLabel/index.d.ts +7 -0
- package/dist/Labels/InfoLabel/index.js +5 -0
- package/dist/Labels/index.d.ts +1 -0
- package/dist/Labels/index.js +1 -0
- package/dist/Layouts/homeLayout/index.d.ts +6 -0
- package/dist/Layouts/homeLayout/index.js +10 -0
- package/dist/Layouts/index.d.ts +1 -0
- package/dist/Layouts/index.js +1 -0
- package/dist/LineSeparator/LineSeparator.d.ts +1 -0
- package/dist/LineSeparator/LineSeparator.js +4 -0
- package/dist/LineSeparator/index.d.ts +1 -0
- package/dist/LineSeparator/index.js +1 -0
- package/dist/Modal/Modal.d.ts +10 -0
- package/dist/Modal/Modal.js +32 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Modal/index.js +1 -0
- package/dist/NavBar/index.d.ts +3 -0
- package/dist/NavBar/index.js +3 -0
- package/dist/ProgressBar/ProgressBar.d.ts +6 -0
- package/dist/ProgressBar/ProgressBar.js +5 -0
- package/dist/ProgressBar/ProgressCircle.d.ts +6 -0
- package/dist/ProgressBar/ProgressCircle.js +22 -0
- package/dist/ProgressBar/index.d.ts +2 -0
- package/dist/ProgressBar/index.js +2 -0
- package/dist/Skeletons/LoadingInputSkeleton.d.ts +1 -0
- package/dist/Skeletons/LoadingInputSkeleton.js +8 -0
- package/dist/Skeletons/index.d.ts +1 -0
- package/dist/Skeletons/index.js +1 -0
- package/dist/Tab/Tab.d.ts +9 -0
- package/dist/Tab/Tab.js +19 -0
- package/dist/Tab/index.d.ts +1 -0
- package/dist/Tab/index.js +1 -0
- package/dist/Table/ZauruTable.d.ts +25 -0
- package/dist/Table/ZauruTable.js +148 -0
- package/dist/Table/index.d.ts +1 -0
- package/dist/Table/index.js +1 -0
- package/dist/TaskList/TaskList.d.ts +14 -0
- package/dist/TaskList/TaskList.js +35 -0
- package/dist/TaskList/index.d.ts +1 -0
- package/dist/TaskList/index.js +1 -0
- package/dist/Titles/LabelArray.d.ts +4 -0
- package/dist/Titles/LabelArray.js +7 -0
- package/dist/Titles/TableColumnTitle.d.ts +4 -0
- package/dist/Titles/TableColumnTitle.js +5 -0
- package/dist/Titles/TitleH1.d.ts +1 -0
- package/dist/Titles/TitleH1.js +5 -0
- package/dist/Titles/TitleH2.d.ts +1 -0
- package/dist/Titles/TitleH2.js +5 -0
- package/dist/Titles/TitleH3.d.ts +1 -0
- package/dist/Titles/TitleH3.js +5 -0
- package/dist/Titles/index.d.ts +5 -0
- package/dist/Titles/index.js +5 -0
- package/dist/Tooltip/Tooltip.d.ts +7 -0
- package/dist/Tooltip/Tooltip.js +14 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Tooltip/index.js +1 -0
- package/dist/WithTooltip/WithTooltip.d.ts +7 -0
- package/dist/WithTooltip/WithTooltip.js +5 -0
- package/dist/WithTooltip/index.d.ts +1 -0
- package/dist/WithTooltip/index.js +1 -0
- package/dist/Wizards/StepWizard.d.ts +14 -0
- package/dist/Wizards/StepWizard.js +14 -0
- package/dist/Wizards/index.d.ts +1 -0
- package/dist/Wizards/index.js +1 -0
- package/dist/Zendesk/Chat.d.ts +14 -0
- package/dist/Zendesk/Chat.js +63 -0
- package/dist/Zendesk/index.d.ts +2 -0
- package/dist/Zendesk/index.js +2 -0
- package/dist/Zendesk/zendesk.config.d.ts +9 -0
- package/dist/Zendesk/zendesk.config.js +24 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +21 -1
- package/package.json +4 -2
- package/src/Alerts/index.ts +3 -0
- package/src/BlockUI/BlockUI.tsx +50 -0
- package/src/BlockUI/index.tsx +1 -0
- package/src/Buttons/Button.tsx +90 -0
- package/src/Buttons/index.ts +1 -0
- package/src/Card/Card.tsx +24 -0
- package/src/Card/index.ts +1 -0
- package/src/Containers/BodyContainer.tsx +14 -0
- package/src/Containers/ButtonSectionContainer.tsx +21 -0
- package/src/Containers/Container.tsx +39 -0
- package/src/Containers/DoubleContainer.tsx +48 -0
- package/src/Containers/MainContainer.tsx +17 -0
- package/src/Containers/OutletContainer.tsx +14 -0
- package/src/Containers/SubContainer.tsx +37 -0
- package/src/Containers/index.ts +7 -0
- package/src/Footer/Footer.tsx +61 -0
- package/src/Footer/index.tsx +1 -0
- package/src/Labels/InfoLabel/index.tsx +21 -0
- package/src/Labels/index.tsx +1 -0
- package/src/Layouts/homeLayout/index.tsx +34 -0
- package/src/Layouts/index.ts +1 -0
- package/src/LineSeparator/LineSeparator.tsx +3 -0
- package/src/LineSeparator/index.tsx +1 -0
- package/src/Modal/Modal.tsx +104 -0
- package/src/Modal/index.tsx +1 -0
- package/src/NavBar/index.tsx +5 -0
- package/src/ProgressBar/ProgressBar.tsx +25 -0
- package/src/ProgressBar/ProgressCircle.tsx +75 -0
- package/src/ProgressBar/index.tsx +2 -0
- package/src/Skeletons/LoadingInputSkeleton.tsx +12 -0
- package/src/Skeletons/index.ts +1 -0
- package/src/Tab/Tab.tsx +63 -0
- package/src/Tab/index.ts +1 -0
- package/src/Table/ZauruTable.tsx +263 -0
- package/src/Table/index.tsx +1 -0
- package/src/TaskList/TaskList.tsx +88 -0
- package/src/TaskList/index.ts +1 -0
- package/src/Titles/LabelArray.tsx +17 -0
- package/src/Titles/TableColumnTitle.tsx +9 -0
- package/src/Titles/TitleH1.tsx +11 -0
- package/src/Titles/TitleH2.tsx +10 -0
- package/src/Titles/TitleH3.tsx +10 -0
- package/src/Titles/index.ts +5 -0
- package/src/Tooltip/Tooltip.tsx +42 -0
- package/src/Tooltip/index.ts +1 -0
- package/src/WithTooltip/WithTooltip.tsx +21 -0
- package/src/WithTooltip/index.tsx +1 -0
- package/src/Wizards/StepWizard.tsx +88 -0
- package/src/Wizards/index.ts +1 -0
- package/src/index.ts +21 -0
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./Alerts";
|
|
2
|
+
export * from "./BlockUI";
|
|
3
|
+
export * from "./Buttons";
|
|
4
|
+
export * from "./Card";
|
|
5
|
+
export * from "./Containers";
|
|
6
|
+
export * from "./Footer";
|
|
7
|
+
export * from "./Labels";
|
|
8
|
+
export * from "./Layouts";
|
|
9
|
+
export * from "./LineSeparator";
|
|
10
|
+
export * from "./Modal";
|
|
11
|
+
export * from "./NavBar";
|
|
12
|
+
export * from "./Skeletons";
|
|
13
|
+
export * from "./Tab";
|
|
14
|
+
export * from "./Table";
|
|
15
|
+
export * from "./TaskList";
|
|
16
|
+
export * from "./Titles";
|
|
17
|
+
export * from "./Tooltip";
|
|
18
|
+
export * from "./WithTooltip";
|
|
19
|
+
export * from "./Wizards";
|
package/dist/index.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./Alerts";
|
|
2
|
+
export * from "./BlockUI";
|
|
3
|
+
export * from "./Buttons";
|
|
4
|
+
export * from "./Card";
|
|
5
|
+
//export * from "./Chat";
|
|
6
|
+
export * from "./Containers";
|
|
7
|
+
export * from "./Footer";
|
|
8
|
+
export * from "./Labels";
|
|
9
|
+
export * from "./Layouts";
|
|
10
|
+
export * from "./LineSeparator";
|
|
11
|
+
export * from "./Modal";
|
|
12
|
+
export * from "./NavBar";
|
|
13
|
+
export * from "./Skeletons";
|
|
14
|
+
export * from "./Tab";
|
|
15
|
+
export * from "./Table";
|
|
16
|
+
export * from "./TaskList";
|
|
17
|
+
export * from "./Titles";
|
|
18
|
+
export * from "./Tooltip";
|
|
19
|
+
export * from "./WithTooltip";
|
|
20
|
+
export * from "./Wizards";
|
|
21
|
+
//export * from "./Zendesk";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Componentes reutilizables en las WebApps de Zauru.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,11 +31,13 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@reduxjs/toolkit": "^2.2.1",
|
|
33
33
|
"@remix-run/react": "^2.8.1",
|
|
34
|
+
"@zauru-sdk/common": "^1.0.10",
|
|
34
35
|
"@zauru-sdk/graphql": "^1.0.9",
|
|
35
36
|
"@zauru-sdk/services": "^1.0.10",
|
|
36
37
|
"@zauru-sdk/types": "^1.0.10",
|
|
37
38
|
"@zauru-sdk/utils": "^1.0.10",
|
|
38
39
|
"framer-motion": "^11.0.8",
|
|
40
|
+
"jsonwebtoken": "9.0.2",
|
|
39
41
|
"react": "^18.2.0",
|
|
40
42
|
"react-dom": "^18.2.0",
|
|
41
43
|
"react-is": "^18.2.0",
|
|
@@ -45,5 +47,5 @@
|
|
|
45
47
|
"engines": {
|
|
46
48
|
"node": ">=18.0.0"
|
|
47
49
|
},
|
|
48
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "39d7ad9b27500e7873b58d4222859d5cff7056b2"
|
|
49
51
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
active: boolean;
|
|
6
|
+
loadingText?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const BlockUI = (props: Props) => {
|
|
10
|
+
const { children, active, loadingText } = props;
|
|
11
|
+
|
|
12
|
+
if (!active) {
|
|
13
|
+
return <>{children}</>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
<div className="relative">
|
|
19
|
+
<div className="absolute bg-gray-100 bg-opacity-20 z-10 h-full w-full flex items-center justify-center">
|
|
20
|
+
<div className="flex items-center">
|
|
21
|
+
<span className="text-3xl mr-4">{loadingText}</span>
|
|
22
|
+
{/* <!-- loading icon --> */}
|
|
23
|
+
<svg
|
|
24
|
+
className="animate-spin h-5 w-5 text-gray-600"
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
fill="none"
|
|
27
|
+
viewBox="0 0 24 24"
|
|
28
|
+
>
|
|
29
|
+
<circle
|
|
30
|
+
className="opacity-25"
|
|
31
|
+
cx="12"
|
|
32
|
+
cy="12"
|
|
33
|
+
r="10"
|
|
34
|
+
stroke="currentColor"
|
|
35
|
+
strokeWidth="4"
|
|
36
|
+
></circle>
|
|
37
|
+
<path
|
|
38
|
+
className="opacity-75"
|
|
39
|
+
fill="currentColor"
|
|
40
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
41
|
+
></path>
|
|
42
|
+
</svg>
|
|
43
|
+
{/* <!-- end loading icon --> */}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
{children}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BlockUI";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { ColorInterface } from "../NavBar/NavBar.types";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
type?: "reset" | "button" | "submit" | undefined;
|
|
5
|
+
title?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
onClickSave?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
//Cargando...
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
loadingText?: string;
|
|
11
|
+
selectedColor?: "indigo" | "green" | "red" | "yellow";
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const Button = (props: Props) => {
|
|
18
|
+
const {
|
|
19
|
+
type = "submit",
|
|
20
|
+
loading = false,
|
|
21
|
+
loadingText = "Guardando...",
|
|
22
|
+
title = "Guardar",
|
|
23
|
+
name = "save",
|
|
24
|
+
onClickSave,
|
|
25
|
+
selectedColor = "indigo",
|
|
26
|
+
children,
|
|
27
|
+
className = "",
|
|
28
|
+
disabled = false,
|
|
29
|
+
} = props;
|
|
30
|
+
|
|
31
|
+
const COLORS = {
|
|
32
|
+
green: {
|
|
33
|
+
bg900: "bg-green-900",
|
|
34
|
+
bg700: "bg-green-700",
|
|
35
|
+
bg600: "bg-green-600",
|
|
36
|
+
bg500: "bg-green-500",
|
|
37
|
+
ring600: "ring-green-600",
|
|
38
|
+
ring500: "ring-green-500",
|
|
39
|
+
},
|
|
40
|
+
indigo: {
|
|
41
|
+
bg900: "bg-indigo-900",
|
|
42
|
+
bg700: "bg-indigo-700",
|
|
43
|
+
bg600: "bg-indigo-600",
|
|
44
|
+
bg500: "bg-indigo-500",
|
|
45
|
+
ring600: "ring-indigo-600",
|
|
46
|
+
ring500: "ring-indigo-500",
|
|
47
|
+
},
|
|
48
|
+
red: {
|
|
49
|
+
bg900: "bg-red-900",
|
|
50
|
+
bg700: "bg-red-700",
|
|
51
|
+
bg600: "bg-red-600",
|
|
52
|
+
bg500: "bg-red-500",
|
|
53
|
+
ring600: "ring-red-600",
|
|
54
|
+
ring500: "ring-red-500",
|
|
55
|
+
},
|
|
56
|
+
yellow: {
|
|
57
|
+
bg900: "bg-yellow-900",
|
|
58
|
+
bg700: "bg-yellow-700",
|
|
59
|
+
bg600: "bg-yellow-600",
|
|
60
|
+
bg500: "bg-yellow-500",
|
|
61
|
+
ring600: "ring-yellow-600",
|
|
62
|
+
ring500: "ring-yellow-500",
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const color: ColorInterface = COLORS[selectedColor];
|
|
67
|
+
|
|
68
|
+
const inside = children ?? title;
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<button
|
|
72
|
+
type={type}
|
|
73
|
+
name="action"
|
|
74
|
+
disabled={loading || disabled}
|
|
75
|
+
value={name}
|
|
76
|
+
onClick={onClickSave}
|
|
77
|
+
className={`ml-2 ${loading || disabled ? " bg-opacity-25 " : ""} ${
|
|
78
|
+
loading
|
|
79
|
+
? " cursor-progress"
|
|
80
|
+
: `${disabled ? "" : `hover:${color.bg700}`}`
|
|
81
|
+
} inline-flex justify-center rounded-md border border-transparent ${
|
|
82
|
+
color.bg600
|
|
83
|
+
} py-2 px-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:${
|
|
84
|
+
color.ring500
|
|
85
|
+
} focus:ring-offset-2 ${className}`}
|
|
86
|
+
>
|
|
87
|
+
{loading ? loadingText : inside}
|
|
88
|
+
</button>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Button";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Card = (props: Props) => {
|
|
10
|
+
const { children, title, className } = props;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div
|
|
14
|
+
className={`p-4 space-y-3 shadow sm:overflow-hidden sm:rounded-md ${className}`}
|
|
15
|
+
>
|
|
16
|
+
{title && (
|
|
17
|
+
<label className="inline text-lg font-medium text-gray-700">
|
|
18
|
+
{`${title.toUpperCase()}`}
|
|
19
|
+
</label>
|
|
20
|
+
)}
|
|
21
|
+
{children}
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Card";
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +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
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 SubContainer = (props: Props) => {
|
|
12
|
+
const { title, description, children, className = "", rightContent } = props;
|
|
13
|
+
|
|
14
|
+
const titleInfo = (
|
|
15
|
+
<>
|
|
16
|
+
{title && (
|
|
17
|
+
<h3 className="text-xl 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
|
+
<div className={`${className}`}>
|
|
27
|
+
{rightContent && (
|
|
28
|
+
<div className="flex justify-between items-center">
|
|
29
|
+
<div>{titleInfo}</div>
|
|
30
|
+
<div>{rightContent}</div>
|
|
31
|
+
</div>
|
|
32
|
+
)}
|
|
33
|
+
{!rightContent && titleInfo}
|
|
34
|
+
<div className="mt-5 space-y-3">{children}</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
//import ConnectionState from "../ConnectionState";
|
|
3
|
+
import { LoadingInputSkeleton } from "src";
|
|
4
|
+
|
|
5
|
+
type FooterProps = {
|
|
6
|
+
href: string;
|
|
7
|
+
showConnection?: boolean;
|
|
8
|
+
selectedColor:
|
|
9
|
+
| "purple"
|
|
10
|
+
| "pink"
|
|
11
|
+
| "indigo"
|
|
12
|
+
| "cyan"
|
|
13
|
+
| "slate"
|
|
14
|
+
| "green"
|
|
15
|
+
| "red"
|
|
16
|
+
| "sky";
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const COLORS = {
|
|
20
|
+
purple: "bg-purple-500",
|
|
21
|
+
pink: "bg-pink-500",
|
|
22
|
+
indigo: "bg-indigo-500",
|
|
23
|
+
cyan: "bg-cyan-500",
|
|
24
|
+
slate: "bg-slate-500",
|
|
25
|
+
green: "bg-green-500",
|
|
26
|
+
red: "bg-red-500",
|
|
27
|
+
sky: "bg-sky-500",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Footer = ({
|
|
31
|
+
href,
|
|
32
|
+
selectedColor,
|
|
33
|
+
showConnection = false,
|
|
34
|
+
}: FooterProps) => {
|
|
35
|
+
const [client, setIsClient] = useState(false);
|
|
36
|
+
const color = COLORS[selectedColor];
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
setIsClient(true);
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
if (!client) {
|
|
43
|
+
return <LoadingInputSkeleton />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<footer className={`inset-x-0 bottom-0 px-2 py-[20px] ${color}`}>
|
|
48
|
+
<div className="px-4 mx-auto flex flex-wrap items-center justify-center">
|
|
49
|
+
<p className="text-white text-[1.2rem]">
|
|
50
|
+
{`Creado en `} <a href={href}>Zauru</a>{" "}
|
|
51
|
+
{`con ❤️ ${new Date().getFullYear()} v.3.2`}
|
|
52
|
+
</p>
|
|
53
|
+
{/* {showConnection && (
|
|
54
|
+
<div className="ml-5">
|
|
55
|
+
<ConnectionState />
|
|
56
|
+
</div>
|
|
57
|
+
)} */}
|
|
58
|
+
</div>
|
|
59
|
+
</footer>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Footer";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
description: string;
|
|
5
|
+
title: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const InfoLabel = (props: Props) => {
|
|
10
|
+
const { description, title, className } = props;
|
|
11
|
+
return (
|
|
12
|
+
<div className={`block ${className}`}>
|
|
13
|
+
<label className="inline text-sm font-medium text-gray-700">
|
|
14
|
+
{`${title.toUpperCase()} `}
|
|
15
|
+
</label>
|
|
16
|
+
<label className="inline text-sm font-medium text-gray-500">
|
|
17
|
+
{description}
|
|
18
|
+
</label>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./InfoLabel";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export const HomeLayout = ({ title, description }: Props) => {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
className="bg-cover bg-center h-screen"
|
|
10
|
+
style={{ backgroundImage: 'url("/wallpaper.webp")' }}
|
|
11
|
+
>
|
|
12
|
+
<div className="flex flex-col h-screen justify-center items-center">
|
|
13
|
+
<h1
|
|
14
|
+
className="text-6xl md:text-7xl lg:text-8xl text-white font-bold mb-6 text-center"
|
|
15
|
+
style={{
|
|
16
|
+
textShadow: "0.5px 0.5px 1px #000000",
|
|
17
|
+
WebkitTextStroke: "2px #000000",
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
{title ?? <>Bienvenido, inicie sesión para continuar.</>}
|
|
21
|
+
</h1>
|
|
22
|
+
<p
|
|
23
|
+
className="text-xl md:text-2xl lg:text-3xl text-white text-center max-w-md mb-12"
|
|
24
|
+
style={{
|
|
25
|
+
textShadow: "0.5px 0.5px 1px #000000",
|
|
26
|
+
WebkitTextStroke: "1px #000000",
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
{description ?? <>Web app, realizada en Zauru.</>}
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./homeLayout";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LineSeparator";
|