@zauru-sdk/components 1.0.51 → 1.0.52

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 (177) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +10 -17
  3. package/tsconfig.cjs.json +8 -0
  4. package/tsconfig.esm.json +11 -0
  5. package/tsconfig.json +6 -15
  6. package/dist/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.d.ts +0 -6
  7. package/dist/Alerts/ErrorBoundaryAlert/ErrorBoundaryAlert.js +0 -5
  8. package/dist/Alerts/StaticAlert.d.ts +0 -11
  9. package/dist/Alerts/StaticAlert.js +0 -28
  10. package/dist/Alerts/index.d.ts +0 -2
  11. package/dist/Alerts/index.js +0 -2
  12. package/dist/BlockUI/BlockUI.d.ts +0 -8
  13. package/dist/BlockUI/BlockUI.js +0 -8
  14. package/dist/BlockUI/index.d.ts +0 -1
  15. package/dist/BlockUI/index.js +0 -1
  16. package/dist/Buttons/Button.d.ts +0 -15
  17. package/dist/Buttons/Button.js +0 -43
  18. package/dist/Buttons/index.d.ts +0 -1
  19. package/dist/Buttons/index.js +0 -1
  20. package/dist/Card/Card.d.ts +0 -8
  21. package/dist/Card/Card.js +0 -5
  22. package/dist/Card/index.d.ts +0 -1
  23. package/dist/Card/index.js +0 -1
  24. package/dist/Chat/ChatLayout.d.ts +0 -17
  25. package/dist/Chat/ChatLayout.js +0 -27
  26. package/dist/Chat/ChatMessageHistory.d.ts +0 -12
  27. package/dist/Chat/ChatMessageHistory.js +0 -53
  28. package/dist/Chat/index.d.ts +0 -2
  29. package/dist/Chat/index.js +0 -2
  30. package/dist/ConnectionState/ConnectionState.d.ts +0 -1
  31. package/dist/ConnectionState/ConnectionState.js +0 -21
  32. package/dist/ConnectionState/index.d.ts +0 -1
  33. package/dist/ConnectionState/index.js +0 -1
  34. package/dist/Containers/BodyContainer.d.ts +0 -6
  35. package/dist/Containers/BodyContainer.js +0 -5
  36. package/dist/Containers/ButtonSectionContainer.d.ts +0 -8
  37. package/dist/Containers/ButtonSectionContainer.js +0 -5
  38. package/dist/Containers/Container.d.ts +0 -10
  39. package/dist/Containers/Container.js +0 -6
  40. package/dist/Containers/DoubleContainer.d.ts +0 -9
  41. package/dist/Containers/DoubleContainer.js +0 -14
  42. package/dist/Containers/MainContainer.d.ts +0 -6
  43. package/dist/Containers/MainContainer.js +0 -5
  44. package/dist/Containers/OutletContainer.d.ts +0 -6
  45. package/dist/Containers/OutletContainer.js +0 -5
  46. package/dist/Containers/SubContainer.d.ts +0 -10
  47. package/dist/Containers/SubContainer.js +0 -6
  48. package/dist/Containers/index.d.ts +0 -7
  49. package/dist/Containers/index.js +0 -7
  50. package/dist/DynamicTable/BasicPrintDynamicTable.d.ts +0 -10
  51. package/dist/DynamicTable/BasicPrintDynamicTable.js +0 -27
  52. package/dist/DynamicTable/DynamicPrintTable.d.ts +0 -23
  53. package/dist/DynamicTable/DynamicPrintTable.js +0 -131
  54. package/dist/DynamicTable/DynamicTable.d.ts +0 -24
  55. package/dist/DynamicTable/DynamicTable.js +0 -192
  56. package/dist/DynamicTable/GenericDynamicTable.d.ts +0 -21
  57. package/dist/DynamicTable/GenericDynamicTable.js +0 -196
  58. package/dist/DynamicTable/index.d.ts +0 -4
  59. package/dist/DynamicTable/index.js +0 -4
  60. package/dist/Footer/Footer.d.ts +0 -7
  61. package/dist/Footer/Footer.js +0 -16
  62. package/dist/Footer/index.d.ts +0 -1
  63. package/dist/Footer/index.js +0 -1
  64. package/dist/Form/Checkbox/index.d.ts +0 -17
  65. package/dist/Form/Checkbox/index.js +0 -34
  66. package/dist/Form/Checklist/index.d.ts +0 -14
  67. package/dist/Form/Checklist/index.js +0 -10
  68. package/dist/Form/DatePicker/index.d.ts +0 -18
  69. package/dist/Form/DatePicker/index.js +0 -31
  70. package/dist/Form/DynamicBaculoForm/index.d.ts +0 -18
  71. package/dist/Form/DynamicBaculoForm/index.js +0 -140
  72. package/dist/Form/FieldContainer/DoubleFieldContainer.d.ts +0 -8
  73. package/dist/Form/FieldContainer/DoubleFieldContainer.js +0 -14
  74. package/dist/Form/FieldContainer/QuadrupleFieldContainer.d.ts +0 -7
  75. package/dist/Form/FieldContainer/QuadrupleFieldContainer.js +0 -14
  76. package/dist/Form/FieldContainer/TripleFieldContainer.d.ts +0 -7
  77. package/dist/Form/FieldContainer/TripleFieldContainer.js +0 -14
  78. package/dist/Form/FieldContainer/index.d.ts +0 -3
  79. package/dist/Form/FieldContainer/index.js +0 -3
  80. package/dist/Form/FileUpload/index.d.ts +0 -21
  81. package/dist/Form/FileUpload/index.js +0 -54
  82. package/dist/Form/FormButtons/index.d.ts +0 -16
  83. package/dist/Form/FormButtons/index.js +0 -5
  84. package/dist/Form/FormLayout/index.d.ts +0 -11
  85. package/dist/Form/FormLayout/index.js +0 -7
  86. package/dist/Form/SelectField/index.d.ts +0 -27
  87. package/dist/Form/SelectField/index.js +0 -74
  88. package/dist/Form/TextArea/index.d.ts +0 -23
  89. package/dist/Form/TextArea/index.js +0 -36
  90. package/dist/Form/TextField/index.d.ts +0 -25
  91. package/dist/Form/TextField/index.js +0 -70
  92. package/dist/Form/TimePicker/index.d.ts +0 -16
  93. package/dist/Form/TimePicker/index.js +0 -31
  94. package/dist/Form/YesNo/index.d.ts +0 -12
  95. package/dist/Form/YesNo/index.js +0 -18
  96. package/dist/Form/index.d.ts +0 -13
  97. package/dist/Form/index.js +0 -13
  98. package/dist/Labels/InfoLabel/index.d.ts +0 -7
  99. package/dist/Labels/InfoLabel/index.js +0 -5
  100. package/dist/Labels/index.d.ts +0 -1
  101. package/dist/Labels/index.js +0 -1
  102. package/dist/Layouts/homeLayout/index.d.ts +0 -6
  103. package/dist/Layouts/homeLayout/index.js +0 -10
  104. package/dist/Layouts/index.d.ts +0 -1
  105. package/dist/Layouts/index.js +0 -1
  106. package/dist/LineSeparator/LineSeparator.d.ts +0 -1
  107. package/dist/LineSeparator/LineSeparator.js +0 -4
  108. package/dist/LineSeparator/index.d.ts +0 -1
  109. package/dist/LineSeparator/index.js +0 -1
  110. package/dist/Modal/Modal.d.ts +0 -10
  111. package/dist/Modal/Modal.js +0 -32
  112. package/dist/Modal/index.d.ts +0 -1
  113. package/dist/Modal/index.js +0 -1
  114. package/dist/NavBar/NavBar.d.ts +0 -2
  115. package/dist/NavBar/NavBar.js +0 -32
  116. package/dist/NavBar/NavBar.types.d.ts +0 -50
  117. package/dist/NavBar/NavBar.types.js +0 -1
  118. package/dist/NavBar/NavBar.utils.d.ts +0 -58
  119. package/dist/NavBar/NavBar.utils.js +0 -58
  120. package/dist/NavBar/index.d.ts +0 -3
  121. package/dist/NavBar/index.js +0 -3
  122. package/dist/ProgressBar/ProgressBar.d.ts +0 -6
  123. package/dist/ProgressBar/ProgressBar.js +0 -5
  124. package/dist/ProgressBar/ProgressCircle.d.ts +0 -6
  125. package/dist/ProgressBar/ProgressCircle.js +0 -22
  126. package/dist/ProgressBar/index.d.ts +0 -2
  127. package/dist/ProgressBar/index.js +0 -2
  128. package/dist/Skeletons/LoadingInputSkeleton.d.ts +0 -1
  129. package/dist/Skeletons/LoadingInputSkeleton.js +0 -8
  130. package/dist/Skeletons/index.d.ts +0 -1
  131. package/dist/Skeletons/index.js +0 -1
  132. package/dist/Tab/Tab.d.ts +0 -9
  133. package/dist/Tab/Tab.js +0 -19
  134. package/dist/Tab/index.d.ts +0 -1
  135. package/dist/Tab/index.js +0 -1
  136. package/dist/Table/ZauruTable.d.ts +0 -25
  137. package/dist/Table/ZauruTable.js +0 -148
  138. package/dist/Table/index.d.ts +0 -1
  139. package/dist/Table/index.js +0 -1
  140. package/dist/TaskList/TaskList.d.ts +0 -14
  141. package/dist/TaskList/TaskList.js +0 -35
  142. package/dist/TaskList/index.d.ts +0 -1
  143. package/dist/TaskList/index.js +0 -1
  144. package/dist/Titles/LabelArray.d.ts +0 -4
  145. package/dist/Titles/LabelArray.js +0 -7
  146. package/dist/Titles/TableColumnTitle.d.ts +0 -4
  147. package/dist/Titles/TableColumnTitle.js +0 -5
  148. package/dist/Titles/TitleH1.d.ts +0 -1
  149. package/dist/Titles/TitleH1.js +0 -5
  150. package/dist/Titles/TitleH2.d.ts +0 -1
  151. package/dist/Titles/TitleH2.js +0 -5
  152. package/dist/Titles/TitleH3.d.ts +0 -1
  153. package/dist/Titles/TitleH3.js +0 -5
  154. package/dist/Titles/index.d.ts +0 -5
  155. package/dist/Titles/index.js +0 -5
  156. package/dist/Tooltip/Tooltip.d.ts +0 -7
  157. package/dist/Tooltip/Tooltip.js +0 -14
  158. package/dist/Tooltip/index.d.ts +0 -1
  159. package/dist/Tooltip/index.js +0 -1
  160. package/dist/WithTooltip/WithTooltip.d.ts +0 -7
  161. package/dist/WithTooltip/WithTooltip.js +0 -5
  162. package/dist/WithTooltip/index.d.ts +0 -1
  163. package/dist/WithTooltip/index.js +0 -1
  164. package/dist/Wizards/StepWizard.d.ts +0 -14
  165. package/dist/Wizards/StepWizard.js +0 -14
  166. package/dist/Wizards/index.d.ts +0 -1
  167. package/dist/Wizards/index.js +0 -1
  168. package/dist/Zendesk/Chat.d.ts +0 -14
  169. package/dist/Zendesk/Chat.js +0 -63
  170. package/dist/Zendesk/index.d.ts +0 -2
  171. package/dist/Zendesk/index.js +0 -2
  172. package/dist/Zendesk/zendesk.config.d.ts +0 -9
  173. package/dist/Zendesk/zendesk.config.js +0 -24
  174. package/dist/index.d.ts +0 -24
  175. package/dist/index.js +0 -24
  176. package/dist/tailwind.config.d.ts +0 -1
  177. package/dist/tailwind.config.js +0 -8
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.52](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.51...v1.0.52) (2024-04-03)
7
+
8
+ **Note:** Version bump only for package @zauru-sdk/components
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.0.51](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.50...v1.0.51) (2024-04-02)
7
15
 
8
16
  **Note:** Version bump only for package @zauru-sdk/components
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "description": "Componentes reutilizables en las WebApps de Zauru.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/esm/index.js",
7
+ "types": "./dist/index.d.ts",
7
8
  "type": "module",
8
9
  "publishConfig": {
9
10
  "access": "public"
10
11
  },
11
12
  "scripts": {
12
- "build": "tsc",
13
+ "build": "npm run build:cjs && npm run build:esm",
14
+ "build:cjs": "tsc -p tsconfig.cjs.json",
15
+ "build:esm": "tsc -p tsconfig.esm.json",
13
16
  "test": "echo \"Error: no test specified\" && exit 1"
14
17
  },
15
18
  "author": {
@@ -22,13 +25,6 @@
22
25
  "@types/jsonwebtoken": "^9.0.2",
23
26
  "@types/react": "^18.2.20",
24
27
  "@types/react-dom": "^18.2.7",
25
- "eslint": "^8.38.0",
26
- "eslint-config-prettier": "^9.0.0",
27
- "eslint-import-resolver-typescript": "^3.6.1",
28
- "eslint-plugin-import": "^2.28.1",
29
- "eslint-plugin-jsx-a11y": "^6.7.1",
30
- "eslint-plugin-react": "^7.33.2",
31
- "eslint-plugin-react-hooks": "^4.6.0",
32
28
  "postcss": "^8.4.35",
33
29
  "tailwindcss": "^3.4.1",
34
30
  "typescript": "^5.1.6"
@@ -37,10 +33,10 @@
37
33
  "@reduxjs/toolkit": "^2.2.1",
38
34
  "@remix-run/react": "^2.8.1",
39
35
  "@zauru-sdk/common": "^1.0.50",
40
- "@zauru-sdk/hooks": "^1.0.51",
36
+ "@zauru-sdk/hooks": "^1.0.52",
41
37
  "@zauru-sdk/icons": "^1.0.50",
42
38
  "@zauru-sdk/types": "^1.0.49",
43
- "@zauru-sdk/utils": "^1.0.50",
39
+ "@zauru-sdk/utils": "^1.0.52",
44
40
  "framer-motion": "^11.0.8",
45
41
  "jsonwebtoken": "^9.0.2",
46
42
  "react": "^18.2.0",
@@ -50,8 +46,5 @@
50
46
  "react-select": "^5.8.0",
51
47
  "styled-components": "^5.3.5"
52
48
  },
53
- "engines": {
54
- "node": ">=20"
55
- },
56
- "gitHead": "486709e3c5ca7b076f4d4ea882179b38c30998a8"
49
+ "gitHead": "f5c0e92ea8dbca13f636f8bdeaf3976a0b294424"
57
50
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "CommonJS",
5
+ "moduleResolution": "Node",
6
+ "outDir": "./dist/cjs"
7
+ }
8
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "NodeNext",
5
+ "target": "ES2022",
6
+ "moduleResolution": "NodeNext",
7
+ "outDir": "./dist/esm",
8
+ "declaration": true,
9
+ "declarationDir": "./dist"
10
+ }
11
+ }
package/tsconfig.json CHANGED
@@ -1,26 +1,17 @@
1
1
  {
2
- "include": ["env.d.ts", "**/*.ts", "**/*.tsx", "**/*.css"],
2
+ "include": ["**/*.ts", "**/*.tsx", "**/*.css"],
3
3
  "compilerOptions": {
4
- "allowSyntheticDefaultImports": true,
5
- "lib": ["DOM", "DOM.Iterable", "ES2022"],
6
- "isolatedModules": true,
7
- "esModuleInterop": true,
8
- "jsx": "react-jsx",
9
- "module": "ESNext",
10
- "moduleResolution": "Bundler",
11
- "resolveJsonModule": true,
12
4
  "target": "ES2022",
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
7
+ "esModuleInterop": true,
13
8
  "strict": true,
14
- "allowJs": true,
15
- "skipLibCheck": true,
16
- "forceConsistentCasingInFileNames": true,
9
+ "jsx": "react-jsx",
17
10
  "baseUrl": ".",
18
11
  "outDir": "./dist",
19
12
  "rootDir": "./src",
20
- "declaration": true,
21
- "declarationDir": "./dist",
22
13
  "paths": {
23
- "~/*": ["./app/*"]
14
+ "~/*": ["./src/*"]
24
15
  }
25
16
  }
26
17
  }
@@ -1,6 +0,0 @@
1
- type Props = {
2
- title: string;
3
- description: string;
4
- };
5
- export declare const ErrorBoundaryAlert: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const ErrorBoundaryAlert = (props) => {
3
- const { title, description } = props;
4
- return (_jsx("div", { className: "rounded-full top-20 mx-auto p-3", children: _jsx("div", { className: "p-4 text-red-900 bg-red-100 border border-red-200 rounded-md", children: _jsxs("div", { className: "flex justify-between flex-wrap", children: [_jsxs("div", { className: "w-0 flex-1 flex", children: [_jsx("div", { className: "mr-3 pt-1", children: _jsx("svg", { width: "26", height: "26", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: _jsx("path", { d: "M13.6086 3.247l8.1916 15.8c.0999.2.1998.5.1998.8 0 1-.7992 1.8-1.7982 1.8H3.7188c-.2997 0-.4995-.1-.7992-.2-.7992-.5-1.1988-1.5-.6993-2.4 5.3067-10.1184 8.0706-15.385 8.2915-15.8.3314-.6222.8681-.8886 1.4817-.897.6135-.008 1.273.2807 1.6151.897zM12 18.95c.718 0 1.3-.582 1.3-1.3 0-.718-.582-1.3-1.3-1.3-.718 0-1.3.582-1.3 1.3 0 .718.582 1.3 1.3 1.3zm-.8895-10.203v5.4c0 .5.4.9.9.9s.9-.4.9-.9v-5.3c0-.5-.4-.9-.9-.9s-.9.4-.9.8z" }) }) }), _jsxs("div", { children: [_jsx("h4", { className: "text-md leading-6 font-medium", children: title?.toString() }), _jsx("p", { className: "text-sm", children: description?.toString() })] })] }), _jsx("div", { children: _jsx("button", { type: "button", className: "rounded-md focus:outline-none focus:ring-2 focus:ring-red-500", children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: _jsx("path", { d: "M17.6555 6.3331a.9.9 0 0 1 .001 1.2728l-4.1032 4.1085a.4.4 0 0 0 0 .5653l4.1031 4.1088a.9002.9002 0 0 1 .0797 1.1807l-.0806.092a.9.9 0 0 1-1.2728-.0009l-4.1006-4.1068a.4.4 0 0 0-.5662 0l-4.099 4.1068a.9.9 0 1 1-1.2738-1.2718l4.1027-4.1089a.4.4 0 0 0 0-.5652L6.343 7.6059a.9002.9002 0 0 1-.0796-1.1807l.0806-.092a.9.9 0 0 1 1.2728.0009l4.099 4.1055a.4.4 0 0 0 .5662 0l4.1006-4.1055a.9.9 0 0 1 1.2728-.001z" }) }) }) })] }) }) }));
5
- };
@@ -1,11 +0,0 @@
1
- type Props = {
2
- className?: string;
3
- title: string;
4
- description: any;
5
- showCloseButton?: boolean;
6
- onClose?: () => void;
7
- type?: "success" | "info";
8
- loading?: boolean;
9
- };
10
- export declare const StaticAlert: (props: Props) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- const getConfig = (type) => {
3
- switch (type) {
4
- case "info":
5
- return {
6
- containerClassName: "text-blue-900 bg-blue-100 border border-blue-200 rounded-md",
7
- buttonClassName: "rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",
8
- path: (_jsx("path", { d: "M14.1667 17h-3.3334c-.5 0-.8333-.3146-.8333-.7865 0-.472.3333-.7865.8333-.7865H11.5c.0833 0 .1667-.0787.1667-.1573v-3.5394c0-.0786-.0834-.1573-.1667-.1573h-.6667c-.5 0-.8333-.3146-.8333-.7865S10.3333 10 10.8333 10h.8334c.9166 0 1.6666.7079 1.6666 1.573v3.7753c0 .0787.0834.1573.1667.1573h.6667c.5 0 .8333.3146.8333.7865 0 .472-.3333.7079-.8333.7079zM12.3 6c.6933 0 1.3.6067 1.3 1.3s-.52 1.3-1.3 1.3S11 7.9933 11 7.3 11.6067 6 12.3 6zM12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2" })),
9
- };
10
- case "success":
11
- return {
12
- containerClassName: "text-green-900 bg-green-100 border border-green-200 rounded-md",
13
- buttonClassName: "rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",
14
- path: (_jsx("path", { d: "M8.445 12.6675A.9.9 0 0 0 7.1424 13.91l2.5726 2.7448c.3679.3856.9884.3689 1.335-.036l5.591-7.0366a.9.9 0 0 0-1.3674-1.1705l-4.6548 5.9132a.4.4 0 0 1-.607.0252l-1.567-1.6826zM1.9995 12c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z" })),
15
- };
16
- default:
17
- return {
18
- containerClassName: "text-blue-900 bg-blue-100 border border-blue-200 rounded-md",
19
- buttonClassName: "rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",
20
- path: (_jsx("path", { d: "M14.1667 17h-3.3334c-.5 0-.8333-.3146-.8333-.7865 0-.472.3333-.7865.8333-.7865H11.5c.0833 0 .1667-.0787.1667-.1573v-3.5394c0-.0786-.0834-.1573-.1667-.1573h-.6667c-.5 0-.8333-.3146-.8333-.7865S10.3333 10 10.8333 10h.8334c.9166 0 1.6666.7079 1.6666 1.573v3.7753c0 .0787.0834.1573.1667.1573h.6667c.5 0 .8333.3146.8333.7865 0 .472-.3333.7079-.8333.7079zM12.3 6c.6933 0 1.3.6067 1.3 1.3s-.52 1.3-1.3 1.3S11 7.9933 11 7.3 11.6067 6 12.3 6zM12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2" })),
21
- };
22
- }
23
- };
24
- export const StaticAlert = (props) => {
25
- const { className, title, description, onClose, type = "info", loading = false, } = props;
26
- const config = getConfig(type);
27
- return (_jsx("div", { className: `${className} ${config.containerClassName} ${loading ? " hidden" : ""}`, children: _jsxs("div", { className: "flex justify-between flex-wrap", children: [_jsxs("div", { className: "w-0 flex-1 flex", children: [_jsx("div", { className: "mr-3 pt-1", children: _jsx("svg", { width: "26", height: "26", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: config.path }) }), _jsxs("div", { children: [_jsx("h4", { className: "text-md leading-6 font-medium", children: title }), _jsx("div", { className: "text-sm", children: description })] })] }), onClose && (_jsx("div", { children: _jsx("button", { type: "button", className: `${config.buttonClassName}`, onClick: onClose, children: _jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: _jsx("path", { d: "M17.6555 6.3331a.9.9 0 0 1 .001 1.2728l-4.1032 4.1085a.4.4 0 0 0 0 .5653l4.1031 4.1088a.9002.9002 0 0 1 .0797 1.1807l-.0806.092a.9.9 0 0 1-1.2728-.0009l-4.1006-4.1068a.4.4 0 0 0-.5662 0l-4.099 4.1068a.9.9 0 1 1-1.2738-1.2718l4.1027-4.1089a.4.4 0 0 0 0-.5652L6.343 7.6059a.9002.9002 0 0 1-.0796-1.1807l.0806-.092a.9.9 0 0 1 1.2728.0009l4.099 4.1055a.4.4 0 0 0 .5662 0l4.1006-4.1055a.9.9 0 0 1 1.2728-.001z" }) }) }) }))] }) }));
28
- };
@@ -1,2 +0,0 @@
1
- export * from "./ErrorBoundaryAlert/ErrorBoundaryAlert.js";
2
- export * from "./StaticAlert.js";
@@ -1,2 +0,0 @@
1
- export * from "./ErrorBoundaryAlert/ErrorBoundaryAlert.js";
2
- export * from "./StaticAlert.js";
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- children: React.ReactNode;
4
- active: boolean;
5
- loadingText?: string;
6
- };
7
- export declare const BlockUI: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const BlockUI = (props) => {
3
- const { children, active, loadingText } = props;
4
- if (!active) {
5
- return _jsx(_Fragment, { children: children });
6
- }
7
- return (_jsx("div", { children: _jsxs("div", { className: "relative", children: [_jsx("div", { className: "absolute bg-gray-100 bg-opacity-20 z-10 h-full w-full flex items-center justify-center", children: _jsxs("div", { className: "flex items-center", children: [_jsx("span", { className: "text-3xl mr-4", children: loadingText }), _jsxs("svg", { className: "animate-spin h-5 w-5 text-gray-600", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", 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" })] })] }) }), children] }) }));
8
- };
@@ -1 +0,0 @@
1
- export * from "./BlockUI.js";
@@ -1 +0,0 @@
1
- export * from "./BlockUI.js";
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- type Props = {
3
- type?: "reset" | "button" | "submit" | undefined;
4
- title?: string;
5
- name?: string;
6
- onClickSave?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
7
- loading?: boolean;
8
- loadingText?: string;
9
- selectedColor?: "indigo" | "green" | "red" | "yellow";
10
- children?: React.ReactNode;
11
- className?: string;
12
- disabled?: boolean;
13
- };
14
- export declare const Button: (props: Props) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,43 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export const Button = (props) => {
3
- const { type = "submit", loading = false, loadingText = "Guardando...", title = "Guardar", name = "save", onClickSave, selectedColor = "indigo", children, className = "", disabled = false, } = props;
4
- const COLORS = {
5
- green: {
6
- bg900: "bg-green-900",
7
- bg700: "bg-green-700",
8
- bg600: "bg-green-600",
9
- bg500: "bg-green-500",
10
- ring600: "ring-green-600",
11
- ring500: "ring-green-500",
12
- },
13
- indigo: {
14
- bg900: "bg-indigo-900",
15
- bg700: "bg-indigo-700",
16
- bg600: "bg-indigo-600",
17
- bg500: "bg-indigo-500",
18
- ring600: "ring-indigo-600",
19
- ring500: "ring-indigo-500",
20
- },
21
- red: {
22
- bg900: "bg-red-900",
23
- bg700: "bg-red-700",
24
- bg600: "bg-red-600",
25
- bg500: "bg-red-500",
26
- ring600: "ring-red-600",
27
- ring500: "ring-red-500",
28
- },
29
- yellow: {
30
- bg900: "bg-yellow-900",
31
- bg700: "bg-yellow-700",
32
- bg600: "bg-yellow-600",
33
- bg500: "bg-yellow-500",
34
- ring600: "ring-yellow-600",
35
- ring500: "ring-yellow-500",
36
- },
37
- };
38
- const color = COLORS[selectedColor];
39
- const inside = children ?? title;
40
- return (_jsx("button", { type: type, name: "action", disabled: loading || disabled, value: name, onClick: onClickSave, className: `ml-2 ${loading || disabled ? " bg-opacity-25 " : ""} ${loading
41
- ? " cursor-progress"
42
- : `${disabled ? "" : `hover:${color.bg700}`}`} inline-flex justify-center rounded-md border border-transparent ${color.bg600} py-2 px-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:${color.ring500} focus:ring-offset-2 ${className}`, children: loading ? loadingText : inside }));
43
- };
@@ -1 +0,0 @@
1
- export * from "./Button.js";
@@ -1 +0,0 @@
1
- export * from "./Button.js";
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- children: React.ReactNode;
4
- title?: string;
5
- className?: string;
6
- };
7
- export declare const Card: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};
package/dist/Card/Card.js DELETED
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const Card = (props) => {
3
- const { children, title, className } = props;
4
- return (_jsxs("div", { className: `p-4 space-y-3 shadow sm:overflow-hidden sm:rounded-md ${className}`, children: [title && (_jsx("label", { className: "inline text-lg font-medium text-gray-700", children: `${title.toUpperCase()}` })), children] }));
5
- };
@@ -1 +0,0 @@
1
- export * from "./Card.js";
@@ -1 +0,0 @@
1
- export * from "./Card.js";
@@ -1,17 +0,0 @@
1
- import React from "react";
2
- import { FormDocumentType } from "@zauru-sdk/types";
3
- interface ChatLayoutProps {
4
- children?: React.ReactNode;
5
- sendingMessage?: boolean;
6
- formConfig?: {
7
- document_type: FormDocumentType;
8
- form_id: number;
9
- document_id: number;
10
- id_number?: string;
11
- reference?: string;
12
- attachmentFieldId: number;
13
- messageFieldId: number;
14
- };
15
- }
16
- export declare const ChatLayout: React.FC<ChatLayoutProps>;
17
- export {};
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useRef, useState } from "react";
3
- import { TextField } from "../Form/TextField/index.js";
4
- import { Form } from "@remix-run/react";
5
- import { LoadingInputSkeleton } from "../Skeletons/LoadingInputSkeleton.js";
6
- import { AttachmentIconSVG, SendMessageIcon, SpinnerSvg, } from "@zauru-sdk/icons";
7
- export const ChatLayout = ({ children, sendingMessage = false, formConfig = undefined, }) => {
8
- const refAttachment = useRef(null);
9
- const [formValues, setFormValues] = useState({ image: null });
10
- const handleAttachmentClick = () => {
11
- if (refAttachment.current) {
12
- refAttachment.current.click();
13
- }
14
- };
15
- return (_jsxs("div", { className: "flex flex-col h-full", children: [_jsx("div", { className: "flex flex-col-reverse overflow-y-auto p-4 bg-gray-100 border border-gray-200 rounded-lg grow max-h-[65vh]", children: children }), _jsxs(Form, { id: "formRef", encType: "multipart/form-data", method: "post", children: [formConfig ? (_jsxs(_Fragment, { children: [_jsx(TextField, { hidden: true, name: "reference", defaultValue: formConfig.reference ?? "" }), _jsx(TextField, { hidden: true, name: "form_id", defaultValue: formConfig.form_id }), _jsx(TextField, { hidden: true, name: "document_id", defaultValue: formConfig.document_id }), _jsx(TextField, { hidden: true, name: "document_type", defaultValue: formConfig.document_type }), _jsx(TextField, { hidden: true, name: "id_number", defaultValue: formConfig?.id_number ?? "" })] })) : (_jsx(_Fragment, {})), _jsxs("div", { className: "mt-4 flex", children: [sendingMessage ? (_jsx(LoadingInputSkeleton, {})) : (_jsx("input", { name: `message${formConfig?.messageFieldId
16
- ? `_${formConfig?.messageFieldId}`
17
- : ""}`, type: "text", placeholder: "Escribe un mensaje...", className: "form-input px-4 py-2 border border-gray-300 rounded-l-lg grow" })), _jsx("button", { onClick: handleAttachmentClick, className: `${formValues?.image ? "bg-blue-500" : ""} hover:bg-blue-700 text-white font-bold py-2 px-4`, type: "button", children: _jsx(AttachmentIconSVG, {}) }), _jsx("button", { className: "bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded-r-lg", type: "submit", name: "action", value: "sendMessage", children: sendingMessage ? _jsx(SpinnerSvg, {}) : _jsx(SendMessageIcon, {}) })] }), _jsx("input", { ref: refAttachment, hidden: true, name: `attachment${formConfig?.attachmentFieldId
18
- ? `_${formConfig?.attachmentFieldId}`
19
- : ""}`, type: "file", accept: ".jpg, .png, .jpeg, .png", onChange: (e) => {
20
- if (e.target.value && e.target.value !== "") {
21
- setFormValues({ ...formValues, image: e.target.value });
22
- }
23
- else {
24
- setFormValues({ ...formValues, image: null });
25
- }
26
- } })] })] }));
27
- };
@@ -1,12 +0,0 @@
1
- type Props = {
2
- author: string;
3
- content: string;
4
- date?: string;
5
- onLike?: (like: boolean) => void;
6
- onUpdateComment?: (text: string, itsNew?: boolean) => void;
7
- id: string;
8
- commentOwner?: boolean;
9
- imageLink?: string;
10
- };
11
- export declare const ChatMessageHistory: (props: Props) => import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,53 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CheckIconSVG, PencilSvg } from "@zauru-sdk/icons";
3
- import { useState, useEffect, useRef } from "react";
4
- export const ChatMessageHistory = (props) => {
5
- const { author, content, onLike, onUpdateComment, id, commentOwner = false, date, imageLink, } = props;
6
- const initials = author ? author[0].toUpperCase() : "A";
7
- const [isUpdating, setIsUpdating] = useState(false);
8
- const [updatedContent, setUpdatedContent] = useState(content);
9
- const textAreaRef = useRef(null);
10
- const [shouldPulse, setShouldPulse] = useState(false);
11
- useEffect(() => {
12
- if (isUpdating && textAreaRef.current) {
13
- textAreaRef.current.style.height = "auto";
14
- textAreaRef.current.style.height = `${textAreaRef.current.scrollHeight}px`;
15
- textAreaRef.current.focus();
16
- }
17
- }, [isUpdating]);
18
- // Efecto secundario que se ejecuta cada vez que 'isUpdating' cambia
19
- useEffect(() => {
20
- // Activar la animación
21
- setShouldPulse(true);
22
- // Establecer un temporizador para eliminar la clase después de que la animación se haya completado
23
- const timer = setTimeout(() => {
24
- setShouldPulse(false);
25
- }, 15000); // Tiempo total de la animación
26
- // Limpiar el temporizador si el componente se desmonta o si 'isUpdating' cambia de nuevo antes de que la animación se complete
27
- return () => clearTimeout(timer);
28
- }, [isUpdating]);
29
- const handleUpdate = (e) => {
30
- if (e.target.value.length <= 254) {
31
- setUpdatedContent(e.target.value);
32
- }
33
- };
34
- const handleUpdateClick = () => {
35
- if (isUpdating) {
36
- if (textAreaRef.current) {
37
- textAreaRef.current.blur();
38
- }
39
- //onUpdateComment && onUpdateComment(updatedContent, itsNew);
40
- }
41
- setIsUpdating(!isUpdating);
42
- };
43
- return (_jsxs("div", { className: "p-1 rounded-xl flex items-center space-x-4 relative", children: [commentOwner && (_jsx("div", { className: "absolute top-2 right-2", children: _jsx("button", { onClick: handleUpdateClick, className: `${shouldPulse ? "animate-custom-pulse" : ""}`, children: isUpdating ? _jsx(CheckIconSVG, {}) : _jsx(PencilSvg, {}) }) })), _jsx("div", { 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`, children: initials }), _jsxs("div", { className: "flex flex-col justify-between h-full w-[92%]", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex flex-row space-x-2", children: [_jsx("div", { className: "text-xl font-medium text-black", children: author }), _jsx("div", { className: "text-xl font-medium text-gray-500", children: date && _jsxs(_Fragment, { children: [" - ", date] }) })] }), isUpdating ? (_jsx("textarea", { ref: textAreaRef, className: "bg-gray-100 rounded p-2 w-full resize-none", value: updatedContent, onChange: handleUpdate, maxLength: 254, placeholder: "Deja tus buenos deseos..." })) : (_jsx("p", { className: "text-gray-500", children: updatedContent }))] }), _jsx("div", { className: "flex justify-end items-center", children: _jsx("button", { onClick: () => { }, children: _jsx(_Fragment, {}) }) })] }), imageLink && (_jsx("div", { className: `w-[25%] flex items-center justify-center overflow-hidden text-white text-xl font-bold`, children: _jsx("div", { onClick: () => {
44
- return window.open(imageLink, "_blank");
45
- }, children: _jsx("img", { src: imageLink, alt: "IMG_CHAT", className: `h-48 w-48 inline mr-1 pb-1`, style: {
46
- stroke: "currentColor",
47
- strokeWidth: 2,
48
- strokeLinecap: "round",
49
- strokeLinejoin: "round",
50
- fill: "none",
51
- backgroundColor: "transparent",
52
- } }) }) }))] }));
53
- };
@@ -1,2 +0,0 @@
1
- export * from "./ChatLayout.js";
2
- export * from "./ChatMessageHistory.js";
@@ -1,2 +0,0 @@
1
- export * from "./ChatLayout.js";
2
- export * from "./ChatMessageHistory.js";
@@ -1 +0,0 @@
1
- export declare const ConnectionState: () => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useIsOnline } from "@zauru-sdk/hooks";
3
- export const ConnectionState = () => {
4
- const isOnline = useIsOnline();
5
- // Definir estilos
6
- const styles = {
7
- container: {
8
- padding: "10px",
9
- borderRadius: "5px",
10
- backgroundColor: isOnline ? "#d4edda" : "#f8d7da",
11
- color: isOnline ? "#155724" : "#721c24",
12
- fontWeight: "bold",
13
- },
14
- text: {
15
- fontSize: "16px",
16
- margin: 0,
17
- },
18
- };
19
- // Renderizar el estado de conexión
20
- return (_jsx("div", { style: styles.container, children: _jsx("p", { style: styles.text, children: isOnline ? "ONLINE ✅🌐" : "OFFLINE ❌🌐" }) }));
21
- };
@@ -1 +0,0 @@
1
- export * from "./ConnectionState.js";
@@ -1 +0,0 @@
1
- export * from "./ConnectionState.js";
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- children: React.ReactNode;
4
- };
5
- export declare const BodyContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- export const BodyContainer = (props) => {
3
- const { children } = props;
4
- return (_jsx(_Fragment, { children: _jsx("body", { className: "flex flex-col min-h-screen m-0", children: children }) }));
5
- };
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- children: React.ReactNode;
4
- className?: string;
5
- whitBg?: boolean;
6
- };
7
- export declare const ButtonSectionContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export const ButtonSectionContainer = (props) => {
3
- const { children, className, whitBg = true } = props;
4
- return (_jsx("div", { className: `${whitBg ? "bg-gray-50" : ""} px-4 py-3 text-right sm:px-6 ${className}`, children: children }));
5
- };
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- title?: string;
4
- description?: string;
5
- children: React.ReactNode;
6
- className?: string;
7
- rightContent?: React.ReactNode;
8
- };
9
- export declare const Container: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const Container = (props) => {
3
- const { title, description, children, className = "", rightContent } = props;
4
- const titleInfo = (_jsxs(_Fragment, { children: [title && (_jsx("h3", { className: "text-3xl font-bold leading-8 text-gray-900", children: title })), description && (_jsx("p", { className: "mt-1 text-md text-gray-600", children: description }))] }));
5
- return (_jsx(_Fragment, { children: _jsxs("div", { className: `mx-2 ${className}`, children: [rightContent && (_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("div", { children: titleInfo }), _jsx("div", { children: rightContent })] })), !rightContent && titleInfo, _jsx("div", { className: "mt-5 space-y-5", children: children })] }) }));
6
- };
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- title?: string;
4
- description?: string;
5
- className?: string;
6
- children: React.ReactNode;
7
- };
8
- export declare const DoubleContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,14 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const DoubleContainer = (props) => {
3
- const { title, description, className = "", children } = props;
4
- const getChildren = (index) => {
5
- if (children && Array.isArray(children) && children[index]) {
6
- return children[index];
7
- }
8
- if (children && index === 0) {
9
- return children;
10
- }
11
- return _jsx(_Fragment, {});
12
- };
13
- return (_jsx(_Fragment, { children: _jsxs("div", { className: `mx-2 ${className}`, children: [title && (_jsx("h3", { className: "text-3xl font-bold leading-8 text-gray-900", children: title })), description && (_jsx("p", { className: "mt-1 text-md text-gray-600", children: description })), _jsxs("div", { className: "grid xl:grid-cols-3 md:grid-cols-1 gap-4", children: [_jsx("div", { className: "xl:col-span-2 md:col-span-1 mt-5", children: getChildren(0) }), _jsx("div", { className: "xl:col-span-1 md:col-span-1 mt-5", children: getChildren(1) })] })] }) }));
14
- };
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- children: React.ReactNode;
4
- };
5
- export declare const MainContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- export const MainContainer = (props) => {
3
- const { children } = props;
4
- return (_jsx(_Fragment, { children: _jsx("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", children: children }) }));
5
- };
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- children: React.ReactNode;
4
- };
5
- export declare const OutletContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- export const OutletContainer = (props) => {
3
- const { children } = props;
4
- return (_jsx(_Fragment, { children: _jsx("div", { className: "flex-1 overflow-x-auto", children: children }) }));
5
- };
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- type Props = {
3
- title?: string;
4
- description?: string;
5
- children: React.ReactNode;
6
- className?: string;
7
- rightContent?: React.ReactNode;
8
- };
9
- export declare const SubContainer: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const SubContainer = (props) => {
3
- const { title, description, children, className = "", rightContent } = props;
4
- const titleInfo = (_jsxs(_Fragment, { children: [title && (_jsx("h3", { className: "text-xl font-bold leading-8 text-gray-900", children: title })), description && (_jsx("p", { className: "mt-1 text-md text-gray-600", children: description }))] }));
5
- return (_jsxs("div", { className: `${className}`, children: [rightContent && (_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("div", { children: titleInfo }), _jsx("div", { children: rightContent })] })), !rightContent && titleInfo, _jsx("div", { className: "mt-5 space-y-3", children: children })] }));
6
- };
@@ -1,7 +0,0 @@
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";