@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,78 +1,78 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
//Guardar
|
|
5
|
-
saveTitle?: string;
|
|
6
|
-
saveName?: string;
|
|
7
|
-
onClickSave?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
-
//Cancelar
|
|
9
|
-
showCancel?: boolean;
|
|
10
|
-
cancelTitle?: string;
|
|
11
|
-
cancelName?: string;
|
|
12
|
-
//Limpiar
|
|
13
|
-
showClear?: boolean;
|
|
14
|
-
clearTitle?: string;
|
|
15
|
-
clearName?: string;
|
|
16
|
-
//Cargando...
|
|
17
|
-
loading?: boolean;
|
|
18
|
-
loadingSaveText?: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const FormButtons = (props: Props) => {
|
|
22
|
-
const {
|
|
23
|
-
saveTitle = "Guardar",
|
|
24
|
-
saveName = "save",
|
|
25
|
-
cancelTitle = "Cancelar",
|
|
26
|
-
cancelName = "cancel",
|
|
27
|
-
showCancel = true,
|
|
28
|
-
showClear = false,
|
|
29
|
-
clearName = "clear",
|
|
30
|
-
clearTitle = "Limpiar",
|
|
31
|
-
loading = false,
|
|
32
|
-
onClickSave,
|
|
33
|
-
loadingSaveText = "Guardando...",
|
|
34
|
-
} = props;
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<>
|
|
38
|
-
{showClear && (
|
|
39
|
-
<button
|
|
40
|
-
type="reset"
|
|
41
|
-
name="action"
|
|
42
|
-
disabled={loading}
|
|
43
|
-
value={clearName}
|
|
44
|
-
className={`ml-5 ${
|
|
45
|
-
loading ? " bg-opacity-25 cursor-progress" : ""
|
|
46
|
-
} rounded-md border border-gray-300 bg-white py-2 px-3 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
|
|
47
|
-
>
|
|
48
|
-
{clearTitle}
|
|
49
|
-
</button>
|
|
50
|
-
)}
|
|
51
|
-
{showCancel && (
|
|
52
|
-
<button
|
|
53
|
-
type="button"
|
|
54
|
-
name="action"
|
|
55
|
-
disabled={loading}
|
|
56
|
-
value={cancelName}
|
|
57
|
-
className={`${showClear ? "ml-2" : "ml-5"} ${
|
|
58
|
-
loading ? " bg-opacity-25 cursor-progress" : ""
|
|
59
|
-
} rounded-md border border-gray-300 bg-white py-2 px-3 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
|
|
60
|
-
>
|
|
61
|
-
{cancelTitle}
|
|
62
|
-
</button>
|
|
63
|
-
)}
|
|
64
|
-
<button
|
|
65
|
-
type="submit"
|
|
66
|
-
name="action"
|
|
67
|
-
disabled={loading}
|
|
68
|
-
value={saveName}
|
|
69
|
-
onClick={onClickSave}
|
|
70
|
-
className={`ml-2 ${
|
|
71
|
-
loading ? " bg-opacity-25 cursor-progress" : "hover:bg-indigo-700"
|
|
72
|
-
} inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
|
|
73
|
-
>
|
|
74
|
-
{loading ? loadingSaveText : saveTitle}
|
|
75
|
-
</button>
|
|
76
|
-
</>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
//Guardar
|
|
5
|
+
saveTitle?: string;
|
|
6
|
+
saveName?: string;
|
|
7
|
+
onClickSave?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
//Cancelar
|
|
9
|
+
showCancel?: boolean;
|
|
10
|
+
cancelTitle?: string;
|
|
11
|
+
cancelName?: string;
|
|
12
|
+
//Limpiar
|
|
13
|
+
showClear?: boolean;
|
|
14
|
+
clearTitle?: string;
|
|
15
|
+
clearName?: string;
|
|
16
|
+
//Cargando...
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
loadingSaveText?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const FormButtons = (props: Props) => {
|
|
22
|
+
const {
|
|
23
|
+
saveTitle = "Guardar",
|
|
24
|
+
saveName = "save",
|
|
25
|
+
cancelTitle = "Cancelar",
|
|
26
|
+
cancelName = "cancel",
|
|
27
|
+
showCancel = true,
|
|
28
|
+
showClear = false,
|
|
29
|
+
clearName = "clear",
|
|
30
|
+
clearTitle = "Limpiar",
|
|
31
|
+
loading = false,
|
|
32
|
+
onClickSave,
|
|
33
|
+
loadingSaveText = "Guardando...",
|
|
34
|
+
} = props;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
{showClear && (
|
|
39
|
+
<button
|
|
40
|
+
type="reset"
|
|
41
|
+
name="action"
|
|
42
|
+
disabled={loading}
|
|
43
|
+
value={clearName}
|
|
44
|
+
className={`ml-5 ${
|
|
45
|
+
loading ? " bg-opacity-25 cursor-progress" : ""
|
|
46
|
+
} rounded-md border border-gray-300 bg-white py-2 px-3 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
|
|
47
|
+
>
|
|
48
|
+
{clearTitle}
|
|
49
|
+
</button>
|
|
50
|
+
)}
|
|
51
|
+
{showCancel && (
|
|
52
|
+
<button
|
|
53
|
+
type="button"
|
|
54
|
+
name="action"
|
|
55
|
+
disabled={loading}
|
|
56
|
+
value={cancelName}
|
|
57
|
+
className={`${showClear ? "ml-2" : "ml-5"} ${
|
|
58
|
+
loading ? " bg-opacity-25 cursor-progress" : ""
|
|
59
|
+
} rounded-md border border-gray-300 bg-white py-2 px-3 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
|
|
60
|
+
>
|
|
61
|
+
{cancelTitle}
|
|
62
|
+
</button>
|
|
63
|
+
)}
|
|
64
|
+
<button
|
|
65
|
+
type="submit"
|
|
66
|
+
name="action"
|
|
67
|
+
disabled={loading}
|
|
68
|
+
value={saveName}
|
|
69
|
+
onClick={onClickSave}
|
|
70
|
+
className={`ml-2 ${
|
|
71
|
+
loading ? " bg-opacity-25 cursor-progress" : "hover:bg-indigo-700"
|
|
72
|
+
} inline-flex justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`}
|
|
73
|
+
>
|
|
74
|
+
{loading ? loadingSaveText : saveTitle}
|
|
75
|
+
</button>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Form, type FormMethod } from "@remix-run/react";
|
|
2
|
-
import { type ReactNode } from "react";
|
|
3
|
-
import { ButtonSectionContainer } from "../../Containers/index.js";
|
|
4
|
-
|
|
5
|
-
type Props = {
|
|
6
|
-
formId: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
buttons?: ReactNode;
|
|
10
|
-
method?: FormMethod;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const FormLayout = (props: Props) => {
|
|
14
|
-
const { title, children, buttons, method, formId } = props;
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Form id={formId} name={formId} method={method ?? "post"} key={formId}>
|
|
18
|
-
{title && (
|
|
19
|
-
<label className="block text-sm font-medium text-gray-700 mb-3">
|
|
20
|
-
{title}
|
|
21
|
-
</label>
|
|
22
|
-
)}
|
|
23
|
-
<div className="shadow sm:overflow-hidden sm:rounded-md">
|
|
24
|
-
<div className="space-y-6 bg-white px-4 py-5 sm:p-6">
|
|
25
|
-
{/* AQUÍ VAN EL CONTENIDO DEL FORM */}
|
|
26
|
-
{children}
|
|
27
|
-
</div>
|
|
28
|
-
{buttons && (
|
|
29
|
-
<ButtonSectionContainer>
|
|
30
|
-
{/* AQUÍ VAN LOS BOTONES */}
|
|
31
|
-
{buttons}
|
|
32
|
-
</ButtonSectionContainer>
|
|
33
|
-
)}
|
|
34
|
-
</div>
|
|
35
|
-
</Form>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
1
|
+
import { Form, type FormMethod } from "@remix-run/react";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { ButtonSectionContainer } from "../../Containers/index.js";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
formId: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
buttons?: ReactNode;
|
|
10
|
+
method?: FormMethod;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const FormLayout = (props: Props) => {
|
|
14
|
+
const { title, children, buttons, method, formId } = props;
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<Form id={formId} name={formId} method={method ?? "post"} key={formId}>
|
|
18
|
+
{title && (
|
|
19
|
+
<label className="block text-sm font-medium text-gray-700 mb-3">
|
|
20
|
+
{title}
|
|
21
|
+
</label>
|
|
22
|
+
)}
|
|
23
|
+
<div className="shadow sm:overflow-hidden sm:rounded-md">
|
|
24
|
+
<div className="space-y-6 bg-white px-4 py-5 sm:p-6">
|
|
25
|
+
{/* AQUÍ VAN EL CONTENIDO DEL FORM */}
|
|
26
|
+
{children}
|
|
27
|
+
</div>
|
|
28
|
+
{buttons && (
|
|
29
|
+
<ButtonSectionContainer>
|
|
30
|
+
{/* AQUÍ VAN LOS BOTONES */}
|
|
31
|
+
{buttons}
|
|
32
|
+
</ButtonSectionContainer>
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
</Form>
|
|
36
|
+
);
|
|
37
|
+
};
|