@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,37 +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
|
-
};
|
|
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
|
+
};
|
package/src/Containers/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./BodyContainer.js";
|
|
2
|
-
export * from "./ButtonSectionContainer.js";
|
|
3
|
-
export * from "./Container.js";
|
|
4
|
-
export * from "./DoubleContainer.js";
|
|
5
|
-
export * from "./MainContainer.js";
|
|
6
|
-
export * from "./OutletContainer.js";
|
|
7
|
-
export * from "./SubContainer.js";
|
|
1
|
+
export * from "./BodyContainer.js";
|
|
2
|
+
export * from "./ButtonSectionContainer.js";
|
|
3
|
+
export * from "./Container.js";
|
|
4
|
+
export * from "./DoubleContainer.js";
|
|
5
|
+
export * from "./MainContainer.js";
|
|
6
|
+
export * from "./OutletContainer.js";
|
|
7
|
+
export * from "./SubContainer.js";
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { isNumeric } from "@zauru-sdk/common";
|
|
2
|
-
import { GenericDynamicTableColumn } from "@zauru-sdk/types";
|
|
3
|
-
|
|
4
|
-
//TABLA PARA LA IMPRESION:
|
|
5
|
-
export const BasicTableHTML = (props: {
|
|
6
|
-
data: { [key: string]: string }[];
|
|
7
|
-
headers: GenericDynamicTableColumn[];
|
|
8
|
-
footer: { [key: string]: string };
|
|
9
|
-
}) => {
|
|
10
|
-
const { data, footer, headers } = props;
|
|
11
|
-
return (
|
|
12
|
-
<table style={{ borderCollapse: "collapse", width: "100%" }}>
|
|
13
|
-
<thead>
|
|
14
|
-
<tr>
|
|
15
|
-
{headers?.map((titulo, index) => (
|
|
16
|
-
<th
|
|
17
|
-
key={index}
|
|
18
|
-
style={{
|
|
19
|
-
border: "1px solid black",
|
|
20
|
-
padding: "10px",
|
|
21
|
-
textAlign: "center",
|
|
22
|
-
whiteSpace: "normal",
|
|
23
|
-
}}
|
|
24
|
-
>
|
|
25
|
-
{titulo.label}
|
|
26
|
-
</th>
|
|
27
|
-
))}
|
|
28
|
-
</tr>
|
|
29
|
-
</thead>
|
|
30
|
-
<tbody>
|
|
31
|
-
{data?.map((fila, index) => (
|
|
32
|
-
<tr key={index}>
|
|
33
|
-
{headers?.map((titulo, index) => (
|
|
34
|
-
<td
|
|
35
|
-
key={index}
|
|
36
|
-
style={{
|
|
37
|
-
border: "1px solid black",
|
|
38
|
-
padding: "1px",
|
|
39
|
-
textAlign: "center",
|
|
40
|
-
whiteSpace: "normal",
|
|
41
|
-
fontSize: isNumeric((fila as any)[titulo.name])
|
|
42
|
-
? "2em"
|
|
43
|
-
: "1em",
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
{(fila as any)[titulo.name]}
|
|
47
|
-
</td>
|
|
48
|
-
))}
|
|
49
|
-
</tr>
|
|
50
|
-
))}
|
|
51
|
-
</tbody>
|
|
52
|
-
<tfoot>
|
|
53
|
-
<tr>
|
|
54
|
-
{headers?.map((titulo, index) => (
|
|
55
|
-
<td
|
|
56
|
-
key={index}
|
|
57
|
-
style={{
|
|
58
|
-
padding: "10px",
|
|
59
|
-
textAlign: "center",
|
|
60
|
-
whiteSpace: "normal",
|
|
61
|
-
fontSize: isNumeric((footer as any)[titulo.name])
|
|
62
|
-
? "2em"
|
|
63
|
-
: "1em",
|
|
64
|
-
}}
|
|
65
|
-
>
|
|
66
|
-
{(footer as any)[titulo.name]}
|
|
67
|
-
</td>
|
|
68
|
-
))}
|
|
69
|
-
</tr>
|
|
70
|
-
</tfoot>
|
|
71
|
-
</table>
|
|
72
|
-
);
|
|
73
|
-
};
|
|
1
|
+
import { isNumeric } from "@zauru-sdk/common";
|
|
2
|
+
import { GenericDynamicTableColumn } from "@zauru-sdk/types";
|
|
3
|
+
|
|
4
|
+
//TABLA PARA LA IMPRESION:
|
|
5
|
+
export const BasicTableHTML = (props: {
|
|
6
|
+
data: { [key: string]: string }[];
|
|
7
|
+
headers: GenericDynamicTableColumn[];
|
|
8
|
+
footer: { [key: string]: string };
|
|
9
|
+
}) => {
|
|
10
|
+
const { data, footer, headers } = props;
|
|
11
|
+
return (
|
|
12
|
+
<table style={{ borderCollapse: "collapse", width: "100%" }}>
|
|
13
|
+
<thead>
|
|
14
|
+
<tr>
|
|
15
|
+
{headers?.map((titulo, index) => (
|
|
16
|
+
<th
|
|
17
|
+
key={index}
|
|
18
|
+
style={{
|
|
19
|
+
border: "1px solid black",
|
|
20
|
+
padding: "10px",
|
|
21
|
+
textAlign: "center",
|
|
22
|
+
whiteSpace: "normal",
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
{titulo.label}
|
|
26
|
+
</th>
|
|
27
|
+
))}
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody>
|
|
31
|
+
{data?.map((fila, index) => (
|
|
32
|
+
<tr key={index}>
|
|
33
|
+
{headers?.map((titulo, index) => (
|
|
34
|
+
<td
|
|
35
|
+
key={index}
|
|
36
|
+
style={{
|
|
37
|
+
border: "1px solid black",
|
|
38
|
+
padding: "1px",
|
|
39
|
+
textAlign: "center",
|
|
40
|
+
whiteSpace: "normal",
|
|
41
|
+
fontSize: isNumeric((fila as any)[titulo.name])
|
|
42
|
+
? "2em"
|
|
43
|
+
: "1em",
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
{(fila as any)[titulo.name]}
|
|
47
|
+
</td>
|
|
48
|
+
))}
|
|
49
|
+
</tr>
|
|
50
|
+
))}
|
|
51
|
+
</tbody>
|
|
52
|
+
<tfoot>
|
|
53
|
+
<tr>
|
|
54
|
+
{headers?.map((titulo, index) => (
|
|
55
|
+
<td
|
|
56
|
+
key={index}
|
|
57
|
+
style={{
|
|
58
|
+
padding: "10px",
|
|
59
|
+
textAlign: "center",
|
|
60
|
+
whiteSpace: "normal",
|
|
61
|
+
fontSize: isNumeric((footer as any)[titulo.name])
|
|
62
|
+
? "2em"
|
|
63
|
+
: "1em",
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
{(footer as any)[titulo.name]}
|
|
67
|
+
</td>
|
|
68
|
+
))}
|
|
69
|
+
</tr>
|
|
70
|
+
</tfoot>
|
|
71
|
+
</table>
|
|
72
|
+
);
|
|
73
|
+
};
|