react-ecosistema-unp 1.0.0-pre-release → 1.0.0-pre-release.1

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 +1 @@
1
- .bg-unp{border-radius:6px 6px 0 0!important;background-color:#303d50!important}.tarjeta-unp{border-radius:12px!important;box-shadow:0 6px 10px #00000019;border-bottom-left-radius:12px;margin-bottom:1.5rem}.tarjeta-header-unp{border-top-left-radius:12px!important;border-top-right-radius:12px!important;font-size:1.075rem}
1
+ .bg-unp{border-radius:6px 6px 0 0!important;background-color:#303d50!important}.tarjeta-unp{border-radius:12px!important;box-shadow:0 6px 10px #00000019;border-bottom-left-radius:12px;margin-bottom:1.5rem}.tarjeta-header-unp{border-top-left-radius:12px!important;border-top-right-radius:12px!important}
@@ -1,38 +1,53 @@
1
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import t from "react";
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import e from "react";
3
3
  import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';/* empty css */
4
- import { C as f, a as j } from "../../Card-BXqmurzN.js";
5
- import { C } from "../../CardBody-RoDe1y90.js";
6
- import { B as S } from "../../Button-DMwpnJlD.js";
7
- const b = {
4
+ import { C, a as j } from "../../Card-BXqmurzN.js";
5
+ import { C as S } from "../../CardBody-RoDe1y90.js";
6
+ import { B as g } from "../../Button-DMwpnJlD.js";
7
+ const x = {
8
8
  marginBottom: "20px",
9
9
  width: "100px"
10
10
  }, v = ({
11
- title: p,
12
- children: s,
13
- method: n,
14
- validated: m = !1,
15
- onSubmit: d
11
+ title: m,
12
+ header: a,
13
+ children: n,
14
+ method: i,
15
+ validated: d = !1,
16
+ onSubmit: c
16
17
  }) => {
17
- const a = t.Children.toArray(s), c = a[0] && t.isValidElement(a[0]) && a[0].type.displayName === "Subtitulo", i = a.filter(
18
- (e) => t.isValidElement(e) && e.type.displayName === "SeccionTarjeta"
19
- ), y = i.length > 0, u = t.Children.map(s, (e, o) => t.isValidElement(e) && e.type.displayName === "SeccionTarjeta" ? t.cloneElement(e, {
20
- isGray: e.props.isGray ?? o % 2 === 1,
21
- isLast: e.props.isLast ?? o === i.length - 1
22
- }) : e);
23
- return /* @__PURE__ */ l(
18
+ const r = e.Children.toArray(n), y = r[0] && e.isValidElement(r[0]) && r[0].type.displayName === "Subtitulo", o = r.filter(
19
+ (t) => e.isValidElement(t) && t.type.displayName === "SeccionTarjeta"
20
+ ), f = o.length > 0, u = e.Children.map(n, (t, l) => e.isValidElement(t) && t.type.displayName === "SeccionTarjeta" ? e.cloneElement(t, {
21
+ isGray: t.props.isGray ?? l % 2 === 1,
22
+ isLast: t.props.isLast ?? l === o.length - 1
23
+ }) : t);
24
+ return /* @__PURE__ */ p(
24
25
  "form",
25
26
  {
26
- method: n,
27
+ method: i,
27
28
  noValidate: !0,
28
- onSubmit: d,
29
- className: m ? "was-validated" : "",
29
+ onSubmit: c,
30
+ className: d ? "was-validated" : "",
30
31
  children: [
31
- /* @__PURE__ */ l(f, { className: "border-0 tarjeta-unp", children: [
32
- /* @__PURE__ */ r(j, { className: "d-flex justify-content-between align-items-center bg-unp text-light py-3 tarjeta-header-unp", children: p }),
33
- y ? u : /* @__PURE__ */ r(C, { className: `${c ? "pt-0" : ""}`, children: s })
32
+ /* @__PURE__ */ p(C, { className: "border-0 tarjeta-unp", children: [
33
+ /* @__PURE__ */ s(
34
+ j,
35
+ {
36
+ className: "bg-unp text-light tarjeta-header-unp",
37
+ style: {
38
+ paddingTop: "1rem",
39
+ paddingBottom: "1rem",
40
+ fontSize: a ? "1.1rem" : "1.075rem",
41
+ fontWeight: a ? 500 : "",
42
+ display: a ? "flex" : "",
43
+ justifyContent: a ? "center" : ""
44
+ },
45
+ children: m
46
+ }
47
+ ),
48
+ f ? u : /* @__PURE__ */ s(S, { className: `${y ? "pt-0" : ""}`, children: n })
34
49
  ] }),
35
- n === "POST" || n === "post" && /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "end" }, children: /* @__PURE__ */ r(S, { variant: "unp_send", style: b, type: "submit", children: "Enviar" }) })
50
+ i === "POST" || i === "post" && /* @__PURE__ */ s("div", { style: { display: "flex", justifyContent: "end" }, children: /* @__PURE__ */ s(g, { variant: "unp_send", style: x, type: "submit", children: "Enviar" }) })
36
51
  ]
37
52
  }
38
53
  );
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  interface TarjetaProps {
3
3
  title: string;
4
+ header?: boolean;
4
5
  children: React.ReactNode;
5
6
  method?: string;
6
7
  validated?: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-ecosistema-unp",
3
3
  "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
4
  "private": false,
5
- "version": "1.0.0-pre-release",
5
+ "version": "1.0.0-pre-release.1",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {