@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.
Files changed (94) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/LICENCE.md +11 -11
  3. package/package.json +7 -7
  4. package/src/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.tsx +66 -66
  5. package/src/Alerts/StaticAlert.tsx +121 -121
  6. package/src/Alerts/index.ts +2 -2
  7. package/src/BlockUI/BlockUI.tsx +50 -50
  8. package/src/BlockUI/index.tsx +1 -1
  9. package/src/Buttons/Button.tsx +90 -90
  10. package/src/Buttons/index.ts +1 -1
  11. package/src/Card/Card.tsx +24 -24
  12. package/src/Card/index.ts +1 -1
  13. package/src/Chat/ChatLayout.tsx +131 -131
  14. package/src/Chat/ChatMessageHistory.tsx +142 -142
  15. package/src/Chat/index.ts +2 -2
  16. package/src/ConnectionState/ConnectionState.tsx +27 -27
  17. package/src/ConnectionState/index.tsx +1 -1
  18. package/src/Containers/BodyContainer.tsx +14 -14
  19. package/src/Containers/ButtonSectionContainer.tsx +21 -21
  20. package/src/Containers/Container.tsx +39 -39
  21. package/src/Containers/DoubleContainer.tsx +48 -48
  22. package/src/Containers/MainContainer.tsx +17 -17
  23. package/src/Containers/OutletContainer.tsx +14 -14
  24. package/src/Containers/SubContainer.tsx +37 -37
  25. package/src/Containers/index.ts +7 -7
  26. package/src/DynamicTable/BasicPrintDynamicTable.tsx +73 -73
  27. package/src/DynamicTable/DynamicPrintTable.tsx +288 -288
  28. package/src/DynamicTable/DynamicTable.tsx +405 -405
  29. package/src/DynamicTable/GenericDynamicTable.tsx +456 -456
  30. package/src/DynamicTable/index.tsx +4 -4
  31. package/src/Footer/Footer.tsx +50 -50
  32. package/src/Footer/index.tsx +1 -1
  33. package/src/Form/Checkbox/index.tsx +96 -96
  34. package/src/Form/Checklist/index.tsx +35 -35
  35. package/src/Form/DatePicker/index.tsx +132 -132
  36. package/src/Form/DynamicBaculoForm/index.tsx +361 -361
  37. package/src/Form/FieldContainer/DoubleFieldContainer.tsx +35 -35
  38. package/src/Form/FieldContainer/QuadrupleFieldContainer.tsx +36 -36
  39. package/src/Form/FieldContainer/TripleFieldContainer.tsx +35 -35
  40. package/src/Form/FieldContainer/index.ts +3 -3
  41. package/src/Form/FileUpload/index.tsx +184 -184
  42. package/src/Form/FormButtons/index.tsx +78 -78
  43. package/src/Form/FormLayout/index.tsx +37 -37
  44. package/src/Form/SelectField/index.tsx +237 -237
  45. package/src/Form/TextArea/index.tsx +125 -125
  46. package/src/Form/TextField/index.tsx +194 -194
  47. package/src/Form/TimePicker/index.tsx +127 -127
  48. package/src/Form/YesNo/index.tsx +77 -77
  49. package/src/Form/index.ts +13 -13
  50. package/src/Labels/InfoLabel/index.tsx +21 -21
  51. package/src/Labels/index.tsx +1 -1
  52. package/src/Layouts/homeLayout/index.tsx +34 -34
  53. package/src/Layouts/index.ts +1 -1
  54. package/src/LineSeparator/LineSeparator.tsx +3 -3
  55. package/src/LineSeparator/index.tsx +1 -1
  56. package/src/Modal/Modal.tsx +104 -104
  57. package/src/Modal/index.tsx +1 -1
  58. package/src/NavBar/NavBar.tsx +223 -223
  59. package/src/NavBar/NavBar.types.ts +64 -64
  60. package/src/NavBar/NavBar.utils.ts +58 -58
  61. package/src/NavBar/index.tsx +5 -5
  62. package/src/ProgressBar/ProgressBar.tsx +25 -25
  63. package/src/ProgressBar/ProgressCircle.tsx +75 -75
  64. package/src/ProgressBar/index.tsx +2 -2
  65. package/src/Skeletons/LoadingInputSkeleton.tsx +12 -12
  66. package/src/Skeletons/index.ts +1 -1
  67. package/src/Tab/Tab.tsx +63 -63
  68. package/src/Tab/index.ts +1 -1
  69. package/src/Table/ZauruTable.tsx +265 -265
  70. package/src/Table/index.tsx +1 -1
  71. package/src/TaskList/TaskList.tsx +88 -88
  72. package/src/TaskList/index.ts +1 -1
  73. package/src/Titles/LabelArray.tsx +17 -17
  74. package/src/Titles/TableColumnTitle.tsx +9 -9
  75. package/src/Titles/TitleH1.tsx +10 -10
  76. package/src/Titles/TitleH2.tsx +10 -10
  77. package/src/Titles/TitleH3.tsx +10 -10
  78. package/src/Titles/index.ts +5 -5
  79. package/src/Tooltip/Tooltip.tsx +42 -42
  80. package/src/Tooltip/index.ts +1 -1
  81. package/src/WithTooltip/WithTooltip.tsx +21 -21
  82. package/src/WithTooltip/index.tsx +1 -1
  83. package/src/Wizards/StepWizard.tsx +88 -88
  84. package/src/Wizards/index.ts +1 -1
  85. package/src/Zendesk/Chat.tsx +83 -83
  86. package/src/Zendesk/index.ts +2 -2
  87. package/src/Zendesk/zendesk.config.ts +40 -40
  88. package/src/index.ts +24 -24
  89. package/src/postcss.config.mjs +5 -5
  90. package/src/tailwind.config.ts +10 -10
  91. package/src/tailwind.css +3 -3
  92. package/tsconfig.cjs.json +8 -8
  93. package/tsconfig.esm.json +11 -11
  94. 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
+ };