@zauru-sdk/components 1.0.41 → 1.0.43
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 +16 -0
- package/dist/Footer/Footer.js +0 -9
- package/dist/Form/DynamicBaculoForm/index.js +1 -1
- package/dist/tailwind.config.d.ts +1 -0
- package/dist/tailwind.config.js +8 -0
- package/package.json +9 -4
- package/src/Footer/Footer.tsx +0 -11
- package/src/Form/DynamicBaculoForm/index.tsx +1 -1
- package/src/postcss.config.mjs +5 -0
- package/src/tailwind.config.ts +10 -0
- package/src/tailwind.css +3 -0
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.43](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.42...v1.0.43) (2024-03-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zauru-sdk/components
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.42](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.41...v1.0.42) (2024-03-31)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @zauru-sdk/components
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.0.41](https://github.com/intuitiva/zauru-typescript-sdk/compare/v1.0.40...v1.0.41) (2024-03-26)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @zauru-sdk/components
|
package/dist/Footer/Footer.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { LoadingInputSkeleton } from "../Skeletons/index.js";
|
|
4
2
|
import { ConnectionState } from "./../ConnectionState/index.js";
|
|
5
3
|
const COLORS = {
|
|
6
4
|
purple: "bg-purple-500",
|
|
@@ -13,13 +11,6 @@ const COLORS = {
|
|
|
13
11
|
sky: "bg-sky-500",
|
|
14
12
|
};
|
|
15
13
|
export const Footer = ({ href, selectedColor, showConnection = false, }) => {
|
|
16
|
-
const [client, setIsClient] = useState(false);
|
|
17
14
|
const color = COLORS[selectedColor];
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
setIsClient(true);
|
|
20
|
-
}, []);
|
|
21
|
-
if (!client) {
|
|
22
|
-
return _jsx(LoadingInputSkeleton, {});
|
|
23
|
-
}
|
|
24
15
|
return (_jsx("footer", { className: `inset-x-0 bottom-0 px-2 py-[20px] ${color}`, children: _jsxs("div", { className: "px-4 mx-auto flex flex-wrap items-center justify-center", children: [_jsxs("p", { className: "text-white text-[1.2rem]", children: [`Creado en `, " ", _jsx("a", { href: href, children: "Zauru" }), " ", `con ❤️ ${new Date().getFullYear()} v.3.2`] }), showConnection && (_jsx("div", { className: "ml-5", children: _jsx(ConnectionState, {}) }))] }) }));
|
|
25
16
|
};
|
|
@@ -54,7 +54,7 @@ export function DynamicBaculoForm(props) {
|
|
|
54
54
|
case "number":
|
|
55
55
|
return (_jsx(TextField, { title: `${field.required ? "*" : ""}${field.name}`, name: `${namesStr}${field.form_id}_${field.id}`, hint: field.hint, defaultValue: defaultValue?.value ?? field.default_value, type: "number", disabled: readOnly }, field.id));
|
|
56
56
|
case "yes_no":
|
|
57
|
-
return (_jsx(YesNo, { title: `${field.required ? "*" : ""}${field.name}`, name: `${namesStr}${field.form_id}_${field.id}`, disabled: readOnly, defaultValue:
|
|
57
|
+
return (_jsx(YesNo, { title: `${field.required ? "*" : ""}${field.name}`, name: `${namesStr}${field.form_id}_${field.id}`, disabled: readOnly, defaultValue: field.default_value === "true" || defaultValue?.value === "true" }, field.id));
|
|
58
58
|
case "section":
|
|
59
59
|
return (_jsxs("div", { children: [_jsx(LineSeparator, {}), _jsx("h3", { className: "mb-10 text-3xl font-bold leading-8 text-gray-900", children: field.name })] }, field.id));
|
|
60
60
|
case "multi_line_text":
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"description": "Componentes reutilizables en las WebApps de Zauru.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,9 +12,13 @@
|
|
|
12
12
|
"build": "tsc",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
14
|
},
|
|
15
|
-
"author":
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Oscar Cuellar",
|
|
17
|
+
"email": "usackoka@gmail.com"
|
|
18
|
+
},
|
|
16
19
|
"license": "MIT",
|
|
17
20
|
"devDependencies": {
|
|
21
|
+
"@tailwindcss/forms": "^0.5.7",
|
|
18
22
|
"@types/jsonwebtoken": "^9.0.2",
|
|
19
23
|
"@types/react": "^18.2.20",
|
|
20
24
|
"@types/react-dom": "^18.2.7",
|
|
@@ -25,6 +29,7 @@
|
|
|
25
29
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
26
30
|
"eslint-plugin-react": "^7.33.2",
|
|
27
31
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
32
|
+
"postcss": "^8.4.35",
|
|
28
33
|
"tailwindcss": "^3.4.1",
|
|
29
34
|
"typescript": "^5.1.6"
|
|
30
35
|
},
|
|
@@ -46,7 +51,7 @@
|
|
|
46
51
|
"styled-components": "^5.3.5"
|
|
47
52
|
},
|
|
48
53
|
"engines": {
|
|
49
|
-
"node": ">=
|
|
54
|
+
"node": ">=20"
|
|
50
55
|
},
|
|
51
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "384feb1d3d94e23bfd49b8e1fffc2fe184073903"
|
|
52
57
|
}
|
package/src/Footer/Footer.tsx
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import { LoadingInputSkeleton } from "../Skeletons/index.js";
|
|
3
1
|
import { ConnectionState } from "./../ConnectionState/index.js";
|
|
4
2
|
|
|
5
3
|
type FooterProps = {
|
|
@@ -32,17 +30,8 @@ export const Footer = ({
|
|
|
32
30
|
selectedColor,
|
|
33
31
|
showConnection = false,
|
|
34
32
|
}: FooterProps) => {
|
|
35
|
-
const [client, setIsClient] = useState(false);
|
|
36
33
|
const color = COLORS[selectedColor];
|
|
37
34
|
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
setIsClient(true);
|
|
40
|
-
}, []);
|
|
41
|
-
|
|
42
|
-
if (!client) {
|
|
43
|
-
return <LoadingInputSkeleton />;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
35
|
return (
|
|
47
36
|
<footer className={`inset-x-0 bottom-0 px-2 py-[20px] ${color}`}>
|
|
48
37
|
<div className="px-4 mx-auto flex flex-wrap items-center justify-center">
|
|
@@ -179,7 +179,7 @@ export function DynamicBaculoForm(props: Props) {
|
|
|
179
179
|
name={`${namesStr}${field.form_id}_${field.id}`}
|
|
180
180
|
disabled={readOnly}
|
|
181
181
|
defaultValue={
|
|
182
|
-
|
|
182
|
+
field.default_value === "true" || defaultValue?.value === "true"
|
|
183
183
|
}
|
|
184
184
|
/>
|
|
185
185
|
);
|
package/src/tailwind.css
ADDED
package/tsconfig.json
CHANGED