react-ecosistema-unp 0.5.3 → 0.5.9

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.
@@ -0,0 +1,106 @@
1
+ import { u as y, c as P } from "./ThemeProvider-CFCmmLJC.js";
2
+ import * as d from "react";
3
+ import { jsx as m } from "react/jsx-runtime";
4
+ const x = ["as", "disabled"];
5
+ function B(n, o) {
6
+ if (n == null) return {};
7
+ var t = {};
8
+ for (var e in n) if ({}.hasOwnProperty.call(n, e)) {
9
+ if (o.indexOf(e) >= 0) continue;
10
+ t[e] = n[e];
11
+ }
12
+ return t;
13
+ }
14
+ function w(n) {
15
+ return !n || n.trim() === "#";
16
+ }
17
+ function b({
18
+ tagName: n,
19
+ disabled: o,
20
+ href: t,
21
+ target: e,
22
+ rel: s,
23
+ role: u,
24
+ onClick: i,
25
+ tabIndex: f = 0,
26
+ type: c
27
+ }) {
28
+ n || (t != null || e != null || s != null ? n = "a" : n = "button");
29
+ const a = {
30
+ tagName: n
31
+ };
32
+ if (n === "button")
33
+ return [{
34
+ type: c || "button",
35
+ disabled: o
36
+ }, a];
37
+ const l = (r) => {
38
+ if ((o || n === "a" && w(t)) && r.preventDefault(), o) {
39
+ r.stopPropagation();
40
+ return;
41
+ }
42
+ i == null || i(r);
43
+ }, p = (r) => {
44
+ r.key === " " && (r.preventDefault(), l(r));
45
+ };
46
+ return n === "a" && (t || (t = "#"), o && (t = void 0)), [{
47
+ role: u ?? "button",
48
+ // explicitly undefined so that it overrides the props disabled in a spread
49
+ // e.g. <Tag {...props} {...hookProps} />
50
+ disabled: void 0,
51
+ tabIndex: o ? void 0 : f,
52
+ href: t,
53
+ target: n === "a" ? e : void 0,
54
+ "aria-disabled": o || void 0,
55
+ rel: n === "a" ? s : void 0,
56
+ onClick: l,
57
+ onKeyDown: p
58
+ }, a];
59
+ }
60
+ const $ = /* @__PURE__ */ d.forwardRef((n, o) => {
61
+ let {
62
+ as: t,
63
+ disabled: e
64
+ } = n, s = B(n, x);
65
+ const [u, {
66
+ tagName: i
67
+ }] = b(Object.assign({
68
+ tagName: t,
69
+ disabled: e
70
+ }, s));
71
+ return /* @__PURE__ */ m(i, Object.assign({}, s, u, {
72
+ ref: o
73
+ }));
74
+ });
75
+ $.displayName = "Button";
76
+ const j = /* @__PURE__ */ d.forwardRef(({
77
+ as: n,
78
+ bsPrefix: o,
79
+ variant: t = "primary",
80
+ size: e,
81
+ active: s = !1,
82
+ disabled: u = !1,
83
+ className: i,
84
+ ...f
85
+ }, c) => {
86
+ const a = y(o, "btn"), [l, {
87
+ tagName: p
88
+ }] = b({
89
+ tagName: n,
90
+ disabled: u,
91
+ ...f
92
+ });
93
+ return /* @__PURE__ */ m(p, {
94
+ ...l,
95
+ ...f,
96
+ ref: c,
97
+ disabled: u,
98
+ className: P(i, a, s && "active", t && `${a}-${t}`, e && `${a}-${e}`, f.href && u && "disabled")
99
+ });
100
+ });
101
+ j.displayName = "Button";
102
+ export {
103
+ j as B,
104
+ $ as a,
105
+ b as u
106
+ };
@@ -0,0 +1,152 @@
1
+ import { c as o, u as m } from "./ThemeProvider-CFCmmLJC.js";
2
+ import * as c from "react";
3
+ import { useMemo as $ } from "react";
4
+ import { C as n } from "./CardBody-RoDe1y90.js";
5
+ import { jsx as t } from "react/jsx-runtime";
6
+ import { c as S } from "./CardHeaderContext-DVw0yHuy.js";
7
+ const f = (e) => /* @__PURE__ */ c.forwardRef((a, r) => /* @__PURE__ */ t("div", {
8
+ ...a,
9
+ ref: r,
10
+ className: o(a.className, e)
11
+ })), C = /* @__PURE__ */ c.forwardRef(({
12
+ className: e,
13
+ bsPrefix: a,
14
+ as: r = "div",
15
+ ...s
16
+ }, d) => (a = m(a, "card-footer"), /* @__PURE__ */ t(r, {
17
+ ref: d,
18
+ className: o(e, a),
19
+ ...s
20
+ })));
21
+ C.displayName = "CardFooter";
22
+ const N = /* @__PURE__ */ c.forwardRef(({
23
+ bsPrefix: e,
24
+ className: a,
25
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
26
+ as: r = "div",
27
+ ...s
28
+ }, d) => {
29
+ const l = m(e, "card-header"), i = $(() => ({
30
+ cardHeaderBsPrefix: l
31
+ }), [l]);
32
+ return /* @__PURE__ */ t(S.Provider, {
33
+ value: i,
34
+ children: /* @__PURE__ */ t(r, {
35
+ ref: d,
36
+ ...s,
37
+ className: o(a, l)
38
+ })
39
+ });
40
+ });
41
+ N.displayName = "CardHeader";
42
+ const p = /* @__PURE__ */ c.forwardRef(
43
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
44
+ ({
45
+ bsPrefix: e,
46
+ className: a,
47
+ variant: r,
48
+ as: s = "img",
49
+ ...d
50
+ }, l) => {
51
+ const i = m(e, "card-img");
52
+ return /* @__PURE__ */ t(s, {
53
+ ref: l,
54
+ className: o(r ? `${i}-${r}` : i, a),
55
+ ...d
56
+ });
57
+ }
58
+ );
59
+ p.displayName = "CardImg";
60
+ const u = /* @__PURE__ */ c.forwardRef(({
61
+ className: e,
62
+ bsPrefix: a,
63
+ as: r = "div",
64
+ ...s
65
+ }, d) => (a = m(a, "card-img-overlay"), /* @__PURE__ */ t(r, {
66
+ ref: d,
67
+ className: o(e, a),
68
+ ...s
69
+ })));
70
+ u.displayName = "CardImgOverlay";
71
+ const y = /* @__PURE__ */ c.forwardRef(({
72
+ className: e,
73
+ bsPrefix: a,
74
+ as: r = "a",
75
+ ...s
76
+ }, d) => (a = m(a, "card-link"), /* @__PURE__ */ t(r, {
77
+ ref: d,
78
+ className: o(e, a),
79
+ ...s
80
+ })));
81
+ y.displayName = "CardLink";
82
+ const k = f("h6"), v = /* @__PURE__ */ c.forwardRef(({
83
+ className: e,
84
+ bsPrefix: a,
85
+ as: r = k,
86
+ ...s
87
+ }, d) => (a = m(a, "card-subtitle"), /* @__PURE__ */ t(r, {
88
+ ref: d,
89
+ className: o(e, a),
90
+ ...s
91
+ })));
92
+ v.displayName = "CardSubtitle";
93
+ const R = /* @__PURE__ */ c.forwardRef(({
94
+ className: e,
95
+ bsPrefix: a,
96
+ as: r = "p",
97
+ ...s
98
+ }, d) => (a = m(a, "card-text"), /* @__PURE__ */ t(r, {
99
+ ref: d,
100
+ className: o(e, a),
101
+ ...s
102
+ })));
103
+ R.displayName = "CardText";
104
+ const B = f("h5"), g = /* @__PURE__ */ c.forwardRef(({
105
+ className: e,
106
+ bsPrefix: a,
107
+ as: r = B,
108
+ ...s
109
+ }, d) => (a = m(a, "card-title"), /* @__PURE__ */ t(r, {
110
+ ref: d,
111
+ className: o(e, a),
112
+ ...s
113
+ })));
114
+ g.displayName = "CardTitle";
115
+ const w = /* @__PURE__ */ c.forwardRef(({
116
+ bsPrefix: e,
117
+ className: a,
118
+ bg: r,
119
+ text: s,
120
+ border: d,
121
+ body: l = !1,
122
+ children: i,
123
+ // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
124
+ as: h = "div",
125
+ ...H
126
+ }, I) => {
127
+ const T = m(e, "card");
128
+ return /* @__PURE__ */ t(h, {
129
+ ref: I,
130
+ ...H,
131
+ className: o(a, T, r && `bg-${r}`, s && `text-${s}`, d && `border-${d}`),
132
+ children: l ? /* @__PURE__ */ t(n, {
133
+ children: i
134
+ }) : i
135
+ });
136
+ });
137
+ w.displayName = "Card";
138
+ const D = Object.assign(w, {
139
+ Img: p,
140
+ Title: g,
141
+ Subtitle: v,
142
+ Body: n,
143
+ Link: y,
144
+ Text: R,
145
+ Header: N,
146
+ Footer: C,
147
+ ImgOverlay: u
148
+ });
149
+ export {
150
+ D as C,
151
+ N as a
152
+ };
@@ -1,7 +1,7 @@
1
1
  import * as m from "react";
2
2
  import { u as t, c as e } from "./ThemeProvider-CFCmmLJC.js";
3
3
  import { jsx as c } from "react/jsx-runtime";
4
- import './assets/Tarjeta.css';const p = /* @__PURE__ */ m.forwardRef(({
4
+ const p = /* @__PURE__ */ m.forwardRef(({
5
5
  className: r,
6
6
  bsPrefix: a,
7
7
  as: o = "div",