@danielcruzcode/ui-core 0.1.2 → 0.1.4
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/dist/commerce/ProductCard/ProductCard.d.ts +1 -1
- package/dist/commerce/ProductCard/ProductCard.d.ts.map +1 -1
- package/dist/commerce/ProductShelf/ProductShelf.d.ts +1 -1
- package/dist/commerce/ProductShelf/ProductShelf.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +2 -2
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs12.js +5 -1
- package/dist/index.cjs13.js +6 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs2.js +19 -1
- package/dist/index.cjs3.js +12 -1
- package/dist/index.cjs4.js +17 -1
- package/dist/index.cjs5.js +17 -1
- package/dist/index.cjs6.js +8 -1
- package/dist/index.cjs7.js +12 -1
- package/dist/index.cjs8.js +8 -1
- package/dist/index.cjs9.js +18 -1
- package/dist/index.esm.js +22 -22
- package/dist/index.esm10.js +65 -50
- package/dist/index.esm11.js +24 -48
- package/dist/index.esm12.js +11 -22
- package/dist/index.esm13.js +12 -25
- package/dist/index.esm14.js +22 -7
- package/dist/index.esm15.js +33 -5
- package/dist/index.esm16.js +1202 -5
- package/dist/index.esm2.js +38 -5
- package/dist/index.esm3.js +27 -46
- package/dist/index.esm4.js +29 -32
- package/dist/index.esm5.js +35 -95
- package/dist/index.esm6.js +26 -58
- package/dist/index.esm7.js +29 -5
- package/dist/index.esm8.js +34 -55
- package/dist/index.esm9.js +69 -162
- package/dist/layout/Container/Container.d.ts +2 -1
- package/dist/layout/Container/Container.d.ts.map +1 -1
- package/dist/layout/Stack/Stack.d.ts +4 -3
- package/dist/layout/Stack/Stack.d.ts.map +1 -1
- package/dist/primitives/Badge/Badge.d.ts.map +1 -1
- package/dist/primitives/Button/Button.d.ts +1 -1
- package/dist/primitives/Button/Button.d.ts.map +1 -1
- package/dist/primitives/Checkbox/Checkbox.d.ts +1 -1
- package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/primitives/Input/Input.d.ts +1 -1
- package/dist/primitives/Input/Input.d.ts.map +1 -1
- package/dist/primitives/Select/Select.d.ts +1 -1
- package/dist/primitives/Select/Select.d.ts.map +1 -1
- package/dist/primitives/Tag/Tag.d.ts.map +1 -1
- package/package.json +6 -26
- package/dist/commerce/ProductCard/ProductCard.css.d.ts +0 -23
- package/dist/commerce/ProductCard/ProductCard.css.d.ts.map +0 -1
- package/dist/commerce/ProductShelf/ProductShelf.css.d.ts +0 -3
- package/dist/commerce/ProductShelf/ProductShelf.css.d.ts.map +0 -1
- package/dist/components/Card/Card.css.d.ts +0 -30
- package/dist/components/Card/Card.css.d.ts.map +0 -1
- package/dist/components/Carousel/Carousel.css.d.ts +0 -8
- package/dist/components/Carousel/Carousel.css.d.ts.map +0 -1
- package/dist/index.cjs17.js +0 -1
- package/dist/index.cjs18.js +0 -1
- package/dist/index.cjs19.js +0 -1
- package/dist/index.cjs20.js +0 -1
- package/dist/index.cjs21.js +0 -1
- package/dist/index.cjs22.js +0 -1
- package/dist/index.cjs23.js +0 -1
- package/dist/index.cjs25.js +0 -1
- package/dist/index.cjs26.js +0 -1
- package/dist/index.cjs27.js +0 -1
- package/dist/index.cjs28.js +0 -1
- package/dist/index.cjs29.js +0 -1
- package/dist/index.cjs30.js +0 -1
- package/dist/index.cjs31.js +0 -1
- package/dist/index.cjs34.js +0 -1
- package/dist/index.cjs39.js +0 -1
- package/dist/index.cjs40.js +0 -1
- package/dist/index.cjs41.js +0 -1
- package/dist/index.cjs49.js +0 -1
- package/dist/index.cjs50.js +0 -1
- package/dist/index.cjs51.js +0 -1
- package/dist/index.cjs52.js +0 -1
- package/dist/index.esm17.js +0 -12
- package/dist/index.esm18.js +0 -12
- package/dist/index.esm19.js +0 -136
- package/dist/index.esm20.js +0 -226
- package/dist/index.esm21.js +0 -130
- package/dist/index.esm22.js +0 -247
- package/dist/index.esm23.js +0 -11
- package/dist/index.esm25.js +0 -11
- package/dist/index.esm26.js +0 -26
- package/dist/index.esm27.js +0 -7
- package/dist/index.esm28.js +0 -7
- package/dist/index.esm29.js +0 -5
- package/dist/index.esm30.js +0 -15
- package/dist/index.esm31.js +0 -1
- package/dist/index.esm34.js +0 -88
- package/dist/index.esm39.js +0 -2028
- package/dist/index.esm40.js +0 -60
- package/dist/index.esm41.js +0 -191
- package/dist/index.esm49.js +0 -12
- package/dist/index.esm50.js +0 -182
- package/dist/index.esm51.js +0 -6
- package/dist/index.esm52.js +0 -134
- package/dist/layout/Container/Container.css.d.ts +0 -20
- package/dist/layout/Container/Container.css.d.ts.map +0 -1
- package/dist/layout/Stack/Stack.css.d.ts +0 -2
- package/dist/layout/Stack/Stack.css.d.ts.map +0 -1
- package/dist/primitives/Badge/Badge.css.d.ts +0 -37
- package/dist/primitives/Badge/Badge.css.d.ts.map +0 -1
- package/dist/primitives/Button/Button.css.d.ts +0 -60
- package/dist/primitives/Button/Button.css.d.ts.map +0 -1
- package/dist/primitives/Checkbox/Checkbox.css.d.ts +0 -9
- package/dist/primitives/Checkbox/Checkbox.css.d.ts.map +0 -1
- package/dist/primitives/Input/Input.css.d.ts +0 -11
- package/dist/primitives/Input/Input.css.d.ts.map +0 -1
- package/dist/primitives/Select/Select.css.d.ts +0 -8
- package/dist/primitives/Select/Select.css.d.ts.map +0 -1
- package/dist/primitives/Tag/Tag.css.d.ts +0 -16
- package/dist/primitives/Tag/Tag.css.d.ts.map +0 -1
- package/dist/styles.css +0 -1
- package/dist/styles.d.ts +0 -1
- package/dist/styles.d.ts.map +0 -1
- package/styles.css +0 -1
package/dist/index.esm10.js
CHANGED
|
@@ -1,54 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
)
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import e from "@emotion/styled";
|
|
3
|
+
import { keyframes as A } from "@emotion/react";
|
|
4
|
+
import { tokens as o } from "@danielcruzcode/design-tokens";
|
|
5
|
+
import { Card as O } from "./index.esm8.js";
|
|
6
|
+
import { Badge as B } from "./index.esm3.js";
|
|
7
|
+
import { Button as R } from "./index.esm2.js";
|
|
8
|
+
const U = A`0%{background-position:-200% 0}100%{background-position:200% 0}`, H = e.div`display:flex;flex-direction:column;height:100%;`, S = e.div`position:relative;width:100%;padding-top:100%;overflow:hidden;background-color:${o.color.surface};`, T = e.img`position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform ${o.transition.normal};${S}:hover &{transform:scale(1.04);}`, V = e.div`position:absolute;top:${o.space.sm};left:${o.space.sm};display:flex;flex-direction:column;gap:4px;`, _ = e.button`position:absolute;top:${o.space.sm};right:${o.space.sm};width:32px;height:32px;border-radius:${o.radius.full};border:1px solid ${o.color.border};background-color:${o.color.background};display:flex;align-items:center;justify-content:center;cursor:pointer;color:${o.color.textMuted};transition:color ${o.transition.fast},border-color ${o.transition.fast};&:hover{color:${o.color.danger};border-color:${o.color.danger};}&:focus-visible{outline:2px solid ${o.color.borderFocus};outline-offset:2px;}`, q = e.div`position:absolute;inset:0;background-color:rgba(255,255,255,0.7);display:flex;align-items:center;justify-content:center;`, E = e.span`font-family:${o.font.body};font-size:13px;font-weight:600;color:${o.color.textMuted};`, G = e.div`display:flex;flex-direction:column;gap:4px;padding:${o.space.sm};flex:1;`, J = e.p`font-family:${o.font.body};font-size:14px;font-weight:500;color:${o.color.text};display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4;margin:0;height:2.5rem;`, K = e.p`font-family:${o.font.body};font-size:12px;color:${o.color.textMuted};margin:0;`, C = e.div`display:flex;align-items:center;gap:4px;`, N = e.span`font-family:${o.font.body};font-size:12px;color:${o.color.textMuted};`, P = e.div`display:flex;align-items:baseline;gap:${o.space.sm};flex-wrap:wrap;margin-top:auto;`, Q = e.span`font-family:${o.font.body};font-size:18px;font-weight:700;color:${o.color.text};`, X = e.span`font-family:${o.font.body};font-size:13px;color:${o.color.textMuted};text-decoration:line-through;`, Y = e.span`font-family:${o.font.body};font-size:12px;color:${o.color.textMuted};`, Z = e.div`display:flex;flex-direction:column;gap:${o.space.sm};padding:0 ${o.space.sm} ${o.space.sm};`, D = e.button`background:none;border:none;cursor:pointer;font-family:${o.font.body};font-size:13px;color:${o.color.brand};padding:0;text-align:center;&:hover{text-decoration:underline;}&:focus-visible{outline:2px solid ${o.color.borderFocus};outline-offset:2px;}`, u = e.div`border-radius:${o.radius.md};background:linear-gradient(90deg,${o.color.surface} 25%,${o.color.surfaceHover} 50%,${o.color.surface} 75%);background-size:200% 100%;animation:${U} 1.5s ease-in-out infinite;`, oo = e(u)`width:100%;padding-top:100%;`, h = e(u)`height:14px;border-radius:${o.radius.sm};`, to = e(u)`height:40px;border-radius:${o.radius.md};`;
|
|
9
|
+
function eo({ rating: r }) {
|
|
10
|
+
return /* @__PURE__ */ t(C, { "aria-label": `${r} de 5 estrellas`, role: "img", children: Array.from({ length: 5 }).map((s, l) => /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: l < Math.round(r) ? "#F9AB00" : "none", stroke: "#F9AB00", strokeWidth: "1", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M6 1l1.39 2.82L10.5 4.27l-2.25 2.19.53 3.09L6 8l-2.78 1.55.53-3.09L1.5 4.27l3.11-.45L6 1z" }) }, l)) });
|
|
11
|
+
}
|
|
12
|
+
function io() {
|
|
13
|
+
return /* @__PURE__ */ i("article", { "aria-label": "Cargando producto", "aria-busy": "true", children: [
|
|
14
|
+
/* @__PURE__ */ t(oo, {}),
|
|
15
|
+
/* @__PURE__ */ i("div", { style: { padding: "8px", display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
16
|
+
/* @__PURE__ */ t(h, { style: { width: "100%" } }),
|
|
17
|
+
/* @__PURE__ */ t(h, { style: { width: "70%" } }),
|
|
18
|
+
/* @__PURE__ */ t(h, { style: { width: "50%" } }),
|
|
19
|
+
/* @__PURE__ */ t(to, {})
|
|
20
|
+
] })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
function ho({ id: r, title: s, subtitle: l, images: M, price: g, originalPrice: d, discountPercent: m, badge: x, rating: b, reviewCount: y, installments: a, unavailable: $ = !1, loading: L = !1, onAddToCart: v, onWishlist: k, onQuickView: w, onClick: c, formatPrice: n, className: W }) {
|
|
24
|
+
if (L) return /* @__PURE__ */ t(io, {});
|
|
25
|
+
const j = n ? n(g) : String(g), z = d ? n ? n(d) : String(d) : void 0, p = M[0], F = /* @__PURE__ */ i(S, { children: [
|
|
26
|
+
p && /* @__PURE__ */ t(T, { src: p.src, alt: p.alt, width: 100, height: 100, loading: "lazy" }),
|
|
27
|
+
/* @__PURE__ */ i(V, { children: [
|
|
28
|
+
m !== void 0 && /* @__PURE__ */ i(B, { variant: "danger", size: "sm", children: [
|
|
29
|
+
"-",
|
|
30
|
+
m,
|
|
31
|
+
"%"
|
|
32
|
+
] }),
|
|
33
|
+
x && /* @__PURE__ */ t(B, { variant: "brand", size: "sm", children: x })
|
|
34
|
+
] }),
|
|
35
|
+
k && /* @__PURE__ */ t(_, { type: "button", onClick: (f) => {
|
|
36
|
+
f.stopPropagation(), k(r);
|
|
37
|
+
}, "aria-label": `Agregar ${s} a favoritos`, children: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", "aria-hidden": "true", children: /* @__PURE__ */ t("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }) }) }),
|
|
38
|
+
$ && /* @__PURE__ */ t(q, { children: /* @__PURE__ */ t(E, { children: "Sin stock" }) })
|
|
39
|
+
] }), I = /* @__PURE__ */ i(G, { children: [
|
|
40
|
+
/* @__PURE__ */ t(J, { children: s }),
|
|
41
|
+
l && /* @__PURE__ */ t(K, { children: l }),
|
|
42
|
+
b !== void 0 && /* @__PURE__ */ i(C, { children: [
|
|
43
|
+
/* @__PURE__ */ t(eo, { rating: b }),
|
|
44
|
+
y !== void 0 && /* @__PURE__ */ i(N, { children: [
|
|
45
|
+
"(",
|
|
46
|
+
y,
|
|
47
|
+
")"
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ i(P, { children: [
|
|
51
|
+
/* @__PURE__ */ t(Q, { children: j }),
|
|
52
|
+
z && /* @__PURE__ */ t(X, { children: z })
|
|
53
|
+
] }),
|
|
54
|
+
a && /* @__PURE__ */ i(Y, { children: [
|
|
55
|
+
a.count,
|
|
56
|
+
"x ",
|
|
57
|
+
n ? n(a.value) : a.value
|
|
58
|
+
] })
|
|
50
59
|
] });
|
|
60
|
+
return /* @__PURE__ */ t(H, { className: W, children: /* @__PURE__ */ t(O, { media: F, body: I, footer: /* @__PURE__ */ i(Z, { children: [
|
|
61
|
+
v && /* @__PURE__ */ t(R, { variant: "primary", size: "sm", fullWidth: !0, disabled: $, onClick: () => v(r), children: "Agregar" }),
|
|
62
|
+
w && /* @__PURE__ */ t(D, { type: "button", onClick: (f) => {
|
|
63
|
+
f.stopPropagation(), w(r);
|
|
64
|
+
}, children: "Vista rápida" })
|
|
65
|
+
] }), hoverable: !!c, onClick: c ? () => c(r) : void 0 }) });
|
|
51
66
|
}
|
|
52
67
|
export {
|
|
53
|
-
|
|
68
|
+
ho as ProductCard
|
|
54
69
|
};
|
package/dist/index.esm11.js
CHANGED
|
@@ -1,52 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
className: p,
|
|
25
|
-
value: o,
|
|
26
|
-
onChange: (l) => i == null ? void 0 : i(l.target.value),
|
|
27
|
-
disabled: m,
|
|
28
|
-
"aria-invalid": r ? !0 : void 0,
|
|
29
|
-
"aria-describedby": c,
|
|
30
|
-
children: [
|
|
31
|
-
t && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: t }),
|
|
32
|
-
n.map((l) => /* @__PURE__ */ e("option", { value: l.value, disabled: l.disabled, children: l.label }, l.value))
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */ e("span", { className: j, "aria-hidden": "true", children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
|
|
37
|
-
"path",
|
|
38
|
-
{
|
|
39
|
-
d: "M4 6l4 4 4-4",
|
|
40
|
-
stroke: "currentColor",
|
|
41
|
-
strokeWidth: "1.5",
|
|
42
|
-
strokeLinecap: "round",
|
|
43
|
-
strokeLinejoin: "round"
|
|
44
|
-
}
|
|
45
|
-
) }) })
|
|
46
|
-
] }),
|
|
47
|
-
r && /* @__PURE__ */ e("span", { id: c, className: k, role: "alert", children: r })
|
|
1
|
+
var b = Object.defineProperty, w = Object.defineProperties;
|
|
2
|
+
var C = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var n = Object.getOwnPropertySymbols;
|
|
4
|
+
var P = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var a = (e, o, r) => o in e ? b(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r, m = (e, o) => {
|
|
6
|
+
for (var r in o || (o = {}))
|
|
7
|
+
P.call(o, r) && a(e, r, o[r]);
|
|
8
|
+
if (n)
|
|
9
|
+
for (var r of n(o))
|
|
10
|
+
j.call(o, r) && a(e, r, o[r]);
|
|
11
|
+
return e;
|
|
12
|
+
}, l = (e, o) => w(e, C(o));
|
|
13
|
+
import { jsxs as A, jsx as t } from "react/jsx-runtime";
|
|
14
|
+
import c from "@emotion/styled";
|
|
15
|
+
import { tokens as i } from "@danielcruzcode/design-tokens";
|
|
16
|
+
import { Carousel as z } from "./index.esm9.js";
|
|
17
|
+
import { ProductCard as D } from "./index.esm10.js";
|
|
18
|
+
const H = c.section`display:flex;flex-direction:column;gap:${i.space.md};`, R = c.h2`font-family:${i.font.display};font-size:24px;color:${i.color.text};margin:0;letter-spacing:0.02em;`;
|
|
19
|
+
function F({ products: e, title: o, autoplay: r = !1, autoplayMs: d = 4e3, slidesPerView: p = { mobile: 1, tablet: 2, desktop: 4 }, onAddToCart: f, onWishlist: u, onProductClick: g, formatPrice: h, loading: x = !1, skeletonCount: y = 4 }) {
|
|
20
|
+
const k = x ? Array.from({ length: y }).map((s, $) => ({ id: `skeleton-${$}`, title: "", images: [], price: 0, loading: !0 })) : e;
|
|
21
|
+
return /* @__PURE__ */ A(H, { "aria-label": o != null ? o : "Productos", children: [
|
|
22
|
+
o && /* @__PURE__ */ t(R, { children: o }),
|
|
23
|
+
/* @__PURE__ */ t(z, { autoplay: r, autoplayMs: d, slidesPerView: p, gap: "md", showArrows: !0, showDots: !0, loop: !0, children: k.map((s) => /* @__PURE__ */ t(D, l(m({}, s), { onAddToCart: f, onWishlist: u, onClick: g, formatPrice: h }), s.id)) })
|
|
48
24
|
] });
|
|
49
25
|
}
|
|
50
26
|
export {
|
|
51
|
-
|
|
27
|
+
F as ProductShelf
|
|
52
28
|
};
|
package/dist/index.esm12.js
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return /* @__PURE__ */ a(
|
|
12
|
-
s,
|
|
13
|
-
{
|
|
14
|
-
className: n,
|
|
15
|
-
style: {
|
|
16
|
-
gap: t ? c.space[t] : void 0,
|
|
17
|
-
alignItems: o[e]
|
|
18
|
-
},
|
|
19
|
-
children: r
|
|
20
|
-
}
|
|
21
|
-
);
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import s from "@emotion/styled";
|
|
3
|
+
import { tokens as i } from "@danielcruzcode/design-tokens";
|
|
4
|
+
const l = { start: "flex-start", center: "center", end: "flex-end", stretch: "stretch" }, a = s.div`
|
|
5
|
+
display:flex;flex-direction:column;
|
|
6
|
+
align-items:${({ align: t }) => l[t]};
|
|
7
|
+
gap:${({ gap: t }) => t ? i.space[t] : "0"};
|
|
8
|
+
`;
|
|
9
|
+
function p({ gap: t, align: e = "stretch", children: r, as: n, className: c }) {
|
|
10
|
+
return /* @__PURE__ */ o(a, { as: n, gap: t, align: e, className: c, children: r });
|
|
22
11
|
}
|
|
23
12
|
export {
|
|
24
|
-
|
|
13
|
+
p as Stack
|
|
25
14
|
};
|
package/dist/index.esm13.js
CHANGED
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"aria-label": `Eliminar ${r}`,
|
|
13
|
-
children: /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ t(
|
|
14
|
-
"path",
|
|
15
|
-
{
|
|
16
|
-
d: "M9 3L3 9M3 3l6 6",
|
|
17
|
-
stroke: "currentColor",
|
|
18
|
-
strokeWidth: "1.5",
|
|
19
|
-
strokeLinecap: "round"
|
|
20
|
-
}
|
|
21
|
-
) })
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
] });
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import p from "@emotion/styled";
|
|
3
|
+
import { tokens as n } from "@danielcruzcode/design-tokens";
|
|
4
|
+
const m = { sm: "640px", md: "768px", lg: "1024px", xl: "1280px", full: "100%" }, o = p.div`
|
|
5
|
+
width:100%;margin-inline:auto;padding-inline:${n.space.md};
|
|
6
|
+
max-width:${({ maxWidth: i }) => m[i]};
|
|
7
|
+
@media screen and (min-width:640px){padding-inline:${n.space.lg};}
|
|
8
|
+
@media screen and (min-width:1024px){padding-inline:${n.space.xl};}
|
|
9
|
+
`;
|
|
10
|
+
function s({ maxWidth: i = "xl", children: d, as: e, className: t }) {
|
|
11
|
+
return /* @__PURE__ */ a(o, { as: e, maxWidth: i, className: t, children: d });
|
|
25
12
|
}
|
|
26
13
|
export {
|
|
27
|
-
|
|
14
|
+
s as Container
|
|
28
15
|
};
|
package/dist/index.esm14.js
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { useRef as l, useState as f, useCallback as p, useEffect as c } from "react";
|
|
2
|
+
import { areOptionsEqual as E, arePluginsEqual as O, canUseDOM as w } from "./index.esm15.js";
|
|
3
|
+
import m from "./index.esm16.js";
|
|
4
|
+
function b(e = {}, r = []) {
|
|
5
|
+
const t = l(e), n = l(r), [u, s] = f(), [a, d] = f(), o = p(() => {
|
|
6
|
+
u && u.reInit(t.current, n.current);
|
|
7
|
+
}, [u]);
|
|
8
|
+
return c(() => {
|
|
9
|
+
E(t.current, e) || (t.current = e, o());
|
|
10
|
+
}, [e, o]), c(() => {
|
|
11
|
+
O(n.current, r) || (n.current = r, o());
|
|
12
|
+
}, [r, o]), c(() => {
|
|
13
|
+
if (w() && a) {
|
|
14
|
+
m.globalOptions = b.globalOptions;
|
|
15
|
+
const i = m(a, t.current, n.current);
|
|
16
|
+
return s(i), () => i.destroy();
|
|
17
|
+
} else
|
|
18
|
+
s(void 0);
|
|
19
|
+
}, [a, s]), [d, u];
|
|
20
|
+
}
|
|
21
|
+
b.globalOptions = void 0;
|
|
6
22
|
export {
|
|
7
|
-
|
|
8
|
-
i as tagRecipe
|
|
23
|
+
b as default
|
|
9
24
|
};
|
package/dist/index.esm15.js
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
function y(n) {
|
|
2
|
+
return Object.prototype.toString.call(n) === "[object Object]";
|
|
3
|
+
}
|
|
4
|
+
function a(n) {
|
|
5
|
+
return y(n) || Array.isArray(n);
|
|
6
|
+
}
|
|
7
|
+
function p() {
|
|
8
|
+
return !!(typeof window != "undefined" && window.document && window.document.createElement);
|
|
9
|
+
}
|
|
10
|
+
function l(n, t) {
|
|
11
|
+
const e = Object.keys(n), c = Object.keys(t);
|
|
12
|
+
if (e.length !== c.length) return !1;
|
|
13
|
+
const s = JSON.stringify(Object.keys(n.breakpoints || {})), u = JSON.stringify(Object.keys(t.breakpoints || {}));
|
|
14
|
+
return s !== u ? !1 : e.every((o) => {
|
|
15
|
+
const r = n[o], i = t[o];
|
|
16
|
+
return typeof r == "function" ? `${r}` == `${i}` : !a(r) || !a(i) ? r === i : l(r, i);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function f(n) {
|
|
20
|
+
return n.concat().sort((t, e) => t.name > e.name ? 1 : -1).map((t) => t.options);
|
|
21
|
+
}
|
|
22
|
+
function O(n, t) {
|
|
23
|
+
if (n.length !== t.length) return !1;
|
|
24
|
+
const e = f(n), c = f(t);
|
|
25
|
+
return e.every((s, u) => {
|
|
26
|
+
const o = c[u];
|
|
27
|
+
return l(s, o);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
5
30
|
export {
|
|
6
|
-
|
|
31
|
+
l as areOptionsEqual,
|
|
32
|
+
O as arePluginsEqual,
|
|
33
|
+
p as canUseDOM,
|
|
34
|
+
f as sortAndMapPluginToOptions
|
|
7
35
|
};
|