@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 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
@@ -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: defaultValue?.value === "true" ?? field.default_value === "true" }, field.id));
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 {};
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ content: ["./app/**/*.{ts,tsx,jsx,js}"],
3
+ theme: {
4
+ extend: {},
5
+ },
6
+ plugins: [require("@tailwindcss/forms")],
7
+ };
8
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/components",
3
- "version": "1.0.41",
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": "Oscar Cuéllar",
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": ">=18.0.0"
54
+ "node": ">=20"
50
55
  },
51
- "gitHead": "f9fc0b69e21593f94a2ccab82ce7c97292065a05"
56
+ "gitHead": "384feb1d3d94e23bfd49b8e1fffc2fe184073903"
52
57
  }
@@ -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
- defaultValue?.value === "true" ?? field.default_value === "true"
182
+ field.default_value === "true" || defaultValue?.value === "true"
183
183
  }
184
184
  />
185
185
  );
@@ -0,0 +1,5 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ },
5
+ };
@@ -0,0 +1,10 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ import type { Config } from "tailwindcss";
3
+
4
+ module.exports = {
5
+ content: ["./app/**/*.{ts,tsx,jsx,js}"],
6
+ theme: {
7
+ extend: {},
8
+ },
9
+ plugins: [require("@tailwindcss/forms")],
10
+ } satisfies Config;
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "include": ["env.d.ts", "**/*.ts", "**/*.tsx"],
2
+ "include": ["env.d.ts", "**/*.ts", "**/*.tsx", "**/*.css"],
3
3
  "compilerOptions": {
4
4
  "allowSyntheticDefaultImports": true,
5
5
  "lib": ["DOM", "DOM.Iterable", "ES2022"],