react-ecosistema-unp 1.7.2 → 1.7.3

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.
@@ -1,66 +1,68 @@
1
1
  import { jsxs as s, Fragment as h, jsx as i } from "react/jsx-runtime";
2
- import { useState as p, useRef as g, useEffect as y } from "react";
2
+ import { useState as p, useRef as y, useEffect as g } from "react";
3
3
  import '../../assets/Bootstrap.css';import '../../assets/Paginador.css';/* empty css */
4
4
  /* empty css */
5
5
  import { C as v } from "../../Card-DAsInpjB.js";
6
6
  import { B as f } from "../../Button-B87TJYml.js";
7
- const w = ({ stepContent: a, onSubmit: d, canJump: c = !0 }) => {
8
- const [e, t] = p(0), o = g(null);
9
- return y(() => {
7
+ const w = ({ stepContent: t, onSubmit: d, canJump: c = !0 }) => {
8
+ const [e, a] = p(0), o = y(null);
9
+ return g(() => {
10
10
  o.current && e > 0 && o.current.scrollIntoView({
11
11
  behavior: "smooth"
12
12
  });
13
13
  }, [e]), /* @__PURE__ */ s(h, { children: [
14
- /* @__PURE__ */ i(v, { ref: o, className: "border-0 paginador-card", children: /* @__PURE__ */ i("ul", { id: "progressbar", children: a.map((l, r) => /* @__PURE__ */ s(
14
+ /* @__PURE__ */ i(v, { ref: o, className: "border-0 paginador-card", children: /* @__PURE__ */ i("ul", { id: "progressbar", children: t.map((n, r) => /* @__PURE__ */ s(
15
15
  "li",
16
16
  {
17
17
  className: r <= e ? "active" : "",
18
18
  onClick: async () => {
19
- if (a[e].handleNextClick && !c) {
20
- const n = a[e].handleNextClick;
19
+ if (t[e].handleNextClick && !c) {
20
+ const l = t[e].handleNextClick;
21
21
  let u = !0;
22
- if (n) {
23
- const m = await n();
22
+ if (l) {
23
+ const m = await l();
24
24
  typeof m == "boolean" && (u = m);
25
25
  }
26
- u && t(e + 1);
27
- } else c ? c && t(r) : (r === e + 1 || r < e) && t(r);
26
+ u && a(e + 1);
27
+ } else c ? c && a(r) : (r === e + 1 || r < e) && a(r);
28
28
  },
29
29
  children: [
30
- /* @__PURE__ */ i("div", { className: `step ${r <= e ? "active" : ""}`, children: /* @__PURE__ */ i(l.icon, { size: 18 }) }),
31
- /* @__PURE__ */ i("strong", { children: l.label })
30
+ /* @__PURE__ */ i("div", { className: `step ${r <= e ? "active" : ""}`, children: /* @__PURE__ */ i(n.icon, { size: 18 }) }),
31
+ /* @__PURE__ */ i("strong", { children: n.label })
32
32
  ]
33
33
  },
34
34
  r
35
35
  )) }) }),
36
- /* @__PURE__ */ i("div", { className: "paginador-content", children: a[e].content }),
36
+ /* @__PURE__ */ i("div", { className: "paginador-content", children: t[e].content }),
37
37
  /* @__PURE__ */ s("div", { className: "paginador-buttons", style: { display: "flex", justifyContent: "end" }, children: [
38
38
  e > 0 && /* @__PURE__ */ i(
39
39
  f,
40
40
  {
41
+ type: "button",
41
42
  variant: "unp_secondary",
42
- onClick: () => t(e - 1),
43
+ onClick: () => a(e - 1),
43
44
  children: "Anterior"
44
45
  }
45
46
  ),
46
- e < a.length - 1 && /* @__PURE__ */ i(
47
+ e < t.length - 1 && /* @__PURE__ */ i(
47
48
  f,
48
49
  {
50
+ type: "button",
49
51
  variant: "unp_primary",
50
52
  style: { justifySelf: "end", marginLeft: "1rem" },
51
53
  onClick: async () => {
52
- const l = a[e].handleNextClick;
54
+ const n = t[e].handleNextClick;
53
55
  let r = !0;
54
- if (l) {
55
- const n = await l();
56
- typeof n == "boolean" && (r = n);
56
+ if (n) {
57
+ const l = await n();
58
+ typeof l == "boolean" && (r = l);
57
59
  }
58
- r && t(e + 1);
60
+ r && a(e + 1);
59
61
  },
60
62
  children: "Siguiente"
61
63
  }
62
64
  ),
63
- e === a.length - 1 && d && /* @__PURE__ */ i(
65
+ e === t.length - 1 && d && /* @__PURE__ */ i(
64
66
  f,
65
67
  {
66
68
  type: "submit",
package/package.json CHANGED
@@ -1,111 +1,111 @@
1
- {
2
- "name": "react-ecosistema-unp",
3
- "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
- "private": false,
5
- "version": "1.7.2",
6
- "type": "module",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/lib/main.d.ts",
10
- "default": "./dist/main.js"
11
- },
12
- "./shared": {
13
- "types": "./dist/lib/shared.d.ts",
14
- "default": "./dist/shared.js"
15
- },
16
- "./ui": {
17
- "types": "./dist/lib/ui.d.ts",
18
- "default": "./dist/ui.js"
19
- },
20
- "./cards": {
21
- "types": "./dist/lib/cards.d.ts",
22
- "default": "./dist/cards.js"
23
- },
24
- "./tables": {
25
- "types": "./dist/lib/tables.d.ts",
26
- "default": "./dist/tables.js"
27
- },
28
- "./utils": {
29
- "types": "./dist/lib/utils.d.ts",
30
- "default": "./dist/utils.js"
31
- },
32
- "./accessibility": {
33
- "types": "./dist/lib/accessibility.d.ts",
34
- "default": "./dist/accessibility.js"
35
- },
36
- "./data": {
37
- "types": "./dist/lib/data.d.ts",
38
- "default": "./dist/data.js"
39
- }
40
- },
41
- "files": [
42
- "dist"
43
- ],
44
- "repository": {
45
- "type": "git",
46
- "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
47
- },
48
- "sideEffects": [
49
- "**/*.css"
50
- ],
51
- "scripts": {
52
- "dev": "vite",
53
- "build": "tsc -b ./tsconfig.lib.json && vite build",
54
- "prepublishOnly": "npm run build",
55
- "lint": "eslint .",
56
- "preview": "vite preview",
57
- "storybook": "storybook dev -p 6006",
58
- "build-storybook": "storybook build --output-dir .storybook/.storybook-build",
59
- "predeploy": "npm run build-storybook",
60
- "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
61
- },
62
- "peerDependencies": {
63
- "react": ">=18.0.0 <=20.0.0",
64
- "react-dom": ">=18.0.0 <=20.0.0",
65
- "react-router-dom": ">=6.0.0 <=8.0.0"
66
- },
67
- "dependencies": {
68
- "@marsidev/react-turnstile": "^1.1.0",
69
- "bootstrap": "^5.3.3",
70
- "jwt-decode": "^4.0.0",
71
- "lottie-react": "^2.4.1",
72
- "react-bootstrap": "^2.10.9",
73
- "react-icons": "^5.4.0",
74
- "react-select": "^5.10.1",
75
- "react-toastify": "^11.0.3",
76
- "sweetalert2": "^11.16.1"
77
- },
78
- "devDependencies": {
79
- "@chromatic-com/storybook": "^3.2.4",
80
- "@eslint/js": "^9.17.0",
81
- "@storybook/addon-essentials": "^8.5.5",
82
- "@storybook/addon-interactions": "^8.5.5",
83
- "@storybook/addon-onboarding": "^8.5.5",
84
- "@storybook/blocks": "^8.5.5",
85
- "@storybook/react": "^8.5.5",
86
- "@storybook/react-vite": "^8.5.5",
87
- "@storybook/test": "^8.5.5",
88
- "@types/node": "^22.10.10",
89
- "@types/react": "^18.3.18",
90
- "@types/react-dom": "^18.3.5",
91
- "@vitejs/plugin-react": "^4.3.4",
92
- "eslint": "^9.17.0",
93
- "eslint-plugin-react-hooks": "^5.0.0",
94
- "eslint-plugin-react-refresh": "^0.4.16",
95
- "eslint-plugin-storybook": "^0.11.2",
96
- "gh-pages": "^6.3.0",
97
- "glob": "^11.0.1",
98
- "globals": "^15.14.0",
99
- "storybook": "^8.5.5",
100
- "typescript": "~5.6.2",
101
- "typescript-eslint": "^8.18.2",
102
- "vite": "^6.1.0",
103
- "vite-plugin-dts": "^4.5.0",
104
- "vite-plugin-lib-inject-css": "^2.2.1"
105
- },
106
- "eslintConfig": {
107
- "extends": [
108
- "plugin:storybook/recommended"
109
- ]
110
- }
111
- }
1
+ {
2
+ "name": "react-ecosistema-unp",
3
+ "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
+ "private": false,
5
+ "version": "1.7.3",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/lib/main.d.ts",
10
+ "default": "./dist/main.js"
11
+ },
12
+ "./shared": {
13
+ "types": "./dist/lib/shared.d.ts",
14
+ "default": "./dist/shared.js"
15
+ },
16
+ "./ui": {
17
+ "types": "./dist/lib/ui.d.ts",
18
+ "default": "./dist/ui.js"
19
+ },
20
+ "./cards": {
21
+ "types": "./dist/lib/cards.d.ts",
22
+ "default": "./dist/cards.js"
23
+ },
24
+ "./tables": {
25
+ "types": "./dist/lib/tables.d.ts",
26
+ "default": "./dist/tables.js"
27
+ },
28
+ "./utils": {
29
+ "types": "./dist/lib/utils.d.ts",
30
+ "default": "./dist/utils.js"
31
+ },
32
+ "./accessibility": {
33
+ "types": "./dist/lib/accessibility.d.ts",
34
+ "default": "./dist/accessibility.js"
35
+ },
36
+ "./data": {
37
+ "types": "./dist/lib/data.d.ts",
38
+ "default": "./dist/data.js"
39
+ }
40
+ },
41
+ "files": [
42
+ "dist"
43
+ ],
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/EcosistemaUNP/react-ecosistema-unp"
47
+ },
48
+ "sideEffects": [
49
+ "**/*.css"
50
+ ],
51
+ "scripts": {
52
+ "dev": "vite",
53
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
54
+ "prepublishOnly": "npm run build",
55
+ "lint": "eslint .",
56
+ "preview": "vite preview",
57
+ "storybook": "storybook dev -p 6006",
58
+ "build-storybook": "storybook build --output-dir .storybook/.storybook-build",
59
+ "predeploy": "npm run build-storybook",
60
+ "deploy:storybook": "gh-pages -d .storybook-build -b gh-pages -t"
61
+ },
62
+ "peerDependencies": {
63
+ "react": ">=18.0.0 <=20.0.0",
64
+ "react-dom": ">=18.0.0 <=20.0.0",
65
+ "react-router-dom": ">=6.0.0 <=8.0.0"
66
+ },
67
+ "dependencies": {
68
+ "@marsidev/react-turnstile": "^1.1.0",
69
+ "bootstrap": "^5.3.3",
70
+ "jwt-decode": "^4.0.0",
71
+ "lottie-react": "^2.4.1",
72
+ "react-bootstrap": "^2.10.9",
73
+ "react-icons": "^5.4.0",
74
+ "react-select": "^5.10.1",
75
+ "react-toastify": "^11.0.3",
76
+ "sweetalert2": "^11.16.1"
77
+ },
78
+ "devDependencies": {
79
+ "@chromatic-com/storybook": "^3.2.4",
80
+ "@eslint/js": "^9.17.0",
81
+ "@storybook/addon-essentials": "^8.5.5",
82
+ "@storybook/addon-interactions": "^8.5.5",
83
+ "@storybook/addon-onboarding": "^8.5.5",
84
+ "@storybook/blocks": "^8.5.5",
85
+ "@storybook/react": "^8.5.5",
86
+ "@storybook/react-vite": "^8.5.5",
87
+ "@storybook/test": "^8.5.5",
88
+ "@types/node": "^22.10.10",
89
+ "@types/react": "^18.3.18",
90
+ "@types/react-dom": "^18.3.5",
91
+ "@vitejs/plugin-react": "^4.3.4",
92
+ "eslint": "^9.17.0",
93
+ "eslint-plugin-react-hooks": "^5.0.0",
94
+ "eslint-plugin-react-refresh": "^0.4.16",
95
+ "eslint-plugin-storybook": "^0.11.2",
96
+ "gh-pages": "^6.3.0",
97
+ "glob": "^11.0.1",
98
+ "globals": "^15.14.0",
99
+ "storybook": "^8.5.5",
100
+ "typescript": "~5.6.2",
101
+ "typescript-eslint": "^8.18.2",
102
+ "vite": "^6.1.0",
103
+ "vite-plugin-dts": "^4.5.0",
104
+ "vite-plugin-lib-inject-css": "^2.2.1"
105
+ },
106
+ "eslintConfig": {
107
+ "extends": [
108
+ "plugin:storybook/recommended"
109
+ ]
110
+ }
111
+ }