@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.
Files changed (127) hide show
  1. package/dist/commerce/ProductCard/ProductCard.d.ts +1 -1
  2. package/dist/commerce/ProductCard/ProductCard.d.ts.map +1 -1
  3. package/dist/commerce/ProductShelf/ProductShelf.d.ts +1 -1
  4. package/dist/commerce/ProductShelf/ProductShelf.d.ts.map +1 -1
  5. package/dist/components/Card/Card.d.ts +1 -1
  6. package/dist/components/Card/Card.d.ts.map +1 -1
  7. package/dist/components/Carousel/Carousel.d.ts +2 -2
  8. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.cjs10.js +1 -1
  11. package/dist/index.cjs11.js +1 -1
  12. package/dist/index.cjs12.js +5 -1
  13. package/dist/index.cjs13.js +6 -1
  14. package/dist/index.cjs14.js +1 -1
  15. package/dist/index.cjs15.js +1 -1
  16. package/dist/index.cjs16.js +1 -1
  17. package/dist/index.cjs2.js +19 -1
  18. package/dist/index.cjs3.js +12 -1
  19. package/dist/index.cjs4.js +17 -1
  20. package/dist/index.cjs5.js +17 -1
  21. package/dist/index.cjs6.js +8 -1
  22. package/dist/index.cjs7.js +12 -1
  23. package/dist/index.cjs8.js +8 -1
  24. package/dist/index.cjs9.js +18 -1
  25. package/dist/index.esm.js +22 -22
  26. package/dist/index.esm10.js +65 -50
  27. package/dist/index.esm11.js +24 -48
  28. package/dist/index.esm12.js +11 -22
  29. package/dist/index.esm13.js +12 -25
  30. package/dist/index.esm14.js +22 -7
  31. package/dist/index.esm15.js +33 -5
  32. package/dist/index.esm16.js +1202 -5
  33. package/dist/index.esm2.js +38 -5
  34. package/dist/index.esm3.js +27 -46
  35. package/dist/index.esm4.js +29 -32
  36. package/dist/index.esm5.js +35 -95
  37. package/dist/index.esm6.js +26 -58
  38. package/dist/index.esm7.js +29 -5
  39. package/dist/index.esm8.js +34 -55
  40. package/dist/index.esm9.js +69 -162
  41. package/dist/layout/Container/Container.d.ts +2 -1
  42. package/dist/layout/Container/Container.d.ts.map +1 -1
  43. package/dist/layout/Stack/Stack.d.ts +4 -3
  44. package/dist/layout/Stack/Stack.d.ts.map +1 -1
  45. package/dist/primitives/Badge/Badge.d.ts.map +1 -1
  46. package/dist/primitives/Button/Button.d.ts +1 -1
  47. package/dist/primitives/Button/Button.d.ts.map +1 -1
  48. package/dist/primitives/Checkbox/Checkbox.d.ts +1 -1
  49. package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -1
  50. package/dist/primitives/Input/Input.d.ts +1 -1
  51. package/dist/primitives/Input/Input.d.ts.map +1 -1
  52. package/dist/primitives/Select/Select.d.ts +1 -1
  53. package/dist/primitives/Select/Select.d.ts.map +1 -1
  54. package/dist/primitives/Tag/Tag.d.ts.map +1 -1
  55. package/package.json +6 -26
  56. package/dist/commerce/ProductCard/ProductCard.css.d.ts +0 -23
  57. package/dist/commerce/ProductCard/ProductCard.css.d.ts.map +0 -1
  58. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts +0 -3
  59. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts.map +0 -1
  60. package/dist/components/Card/Card.css.d.ts +0 -30
  61. package/dist/components/Card/Card.css.d.ts.map +0 -1
  62. package/dist/components/Carousel/Carousel.css.d.ts +0 -8
  63. package/dist/components/Carousel/Carousel.css.d.ts.map +0 -1
  64. package/dist/index.cjs17.js +0 -1
  65. package/dist/index.cjs18.js +0 -1
  66. package/dist/index.cjs19.js +0 -1
  67. package/dist/index.cjs20.js +0 -1
  68. package/dist/index.cjs21.js +0 -1
  69. package/dist/index.cjs22.js +0 -1
  70. package/dist/index.cjs23.js +0 -1
  71. package/dist/index.cjs25.js +0 -1
  72. package/dist/index.cjs26.js +0 -1
  73. package/dist/index.cjs27.js +0 -1
  74. package/dist/index.cjs28.js +0 -1
  75. package/dist/index.cjs29.js +0 -1
  76. package/dist/index.cjs30.js +0 -1
  77. package/dist/index.cjs31.js +0 -1
  78. package/dist/index.cjs34.js +0 -1
  79. package/dist/index.cjs39.js +0 -1
  80. package/dist/index.cjs40.js +0 -1
  81. package/dist/index.cjs41.js +0 -1
  82. package/dist/index.cjs49.js +0 -1
  83. package/dist/index.cjs50.js +0 -1
  84. package/dist/index.cjs51.js +0 -1
  85. package/dist/index.cjs52.js +0 -1
  86. package/dist/index.esm17.js +0 -12
  87. package/dist/index.esm18.js +0 -12
  88. package/dist/index.esm19.js +0 -136
  89. package/dist/index.esm20.js +0 -226
  90. package/dist/index.esm21.js +0 -130
  91. package/dist/index.esm22.js +0 -247
  92. package/dist/index.esm23.js +0 -11
  93. package/dist/index.esm25.js +0 -11
  94. package/dist/index.esm26.js +0 -26
  95. package/dist/index.esm27.js +0 -7
  96. package/dist/index.esm28.js +0 -7
  97. package/dist/index.esm29.js +0 -5
  98. package/dist/index.esm30.js +0 -15
  99. package/dist/index.esm31.js +0 -1
  100. package/dist/index.esm34.js +0 -88
  101. package/dist/index.esm39.js +0 -2028
  102. package/dist/index.esm40.js +0 -60
  103. package/dist/index.esm41.js +0 -191
  104. package/dist/index.esm49.js +0 -12
  105. package/dist/index.esm50.js +0 -182
  106. package/dist/index.esm51.js +0 -6
  107. package/dist/index.esm52.js +0 -134
  108. package/dist/layout/Container/Container.css.d.ts +0 -20
  109. package/dist/layout/Container/Container.css.d.ts.map +0 -1
  110. package/dist/layout/Stack/Stack.css.d.ts +0 -2
  111. package/dist/layout/Stack/Stack.css.d.ts.map +0 -1
  112. package/dist/primitives/Badge/Badge.css.d.ts +0 -37
  113. package/dist/primitives/Badge/Badge.css.d.ts.map +0 -1
  114. package/dist/primitives/Button/Button.css.d.ts +0 -60
  115. package/dist/primitives/Button/Button.css.d.ts.map +0 -1
  116. package/dist/primitives/Checkbox/Checkbox.css.d.ts +0 -9
  117. package/dist/primitives/Checkbox/Checkbox.css.d.ts.map +0 -1
  118. package/dist/primitives/Input/Input.css.d.ts +0 -11
  119. package/dist/primitives/Input/Input.css.d.ts.map +0 -1
  120. package/dist/primitives/Select/Select.css.d.ts +0 -8
  121. package/dist/primitives/Select/Select.css.d.ts.map +0 -1
  122. package/dist/primitives/Tag/Tag.css.d.ts +0 -16
  123. package/dist/primitives/Tag/Tag.css.d.ts.map +0 -1
  124. package/dist/styles.css +0 -1
  125. package/dist/styles.d.ts +0 -1
  126. package/dist/styles.d.ts.map +0 -1
  127. package/styles.css +0 -1
@@ -1,54 +1,69 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { root as g, heading as b } from "./index.esm27.js";
3
- import { Carousel as k } from "./index.esm5.js";
4
- import { ProductCard as w } from "./index.esm9.js";
5
- function A({
6
- products: s,
7
- title: o,
8
- autoplay: t = !1,
9
- autoplayMs: a = 4e3,
10
- slidesPerView: i = { mobile: 1, tablet: 2, desktop: 4 },
11
- onAddToCart: l,
12
- onWishlist: m,
13
- onProductClick: n,
14
- formatPrice: c,
15
- loading: d = !1,
16
- skeletonCount: p = 4
17
- }) {
18
- const f = d ? Array.from({ length: p }).map((r, h) => ({
19
- id: `skeleton-${h}`,
20
- title: "",
21
- images: [],
22
- price: 0,
23
- loading: !0
24
- })) : s;
25
- return /* @__PURE__ */ u("section", { className: g, "aria-label": o ?? "Productos", children: [
26
- o && /* @__PURE__ */ e("h2", { className: b, children: o }),
27
- /* @__PURE__ */ e(
28
- k,
29
- {
30
- autoplay: t,
31
- autoplayMs: a,
32
- slidesPerView: i,
33
- gap: 4,
34
- showArrows: !0,
35
- showDots: !0,
36
- loop: !0,
37
- children: f.map((r) => /* @__PURE__ */ e(
38
- w,
39
- {
40
- ...r,
41
- onAddToCart: l,
42
- onWishlist: m,
43
- onClick: n,
44
- formatPrice: c
45
- },
46
- r.id
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
- A as ProductShelf
68
+ ho as ProductCard
54
69
  };
@@ -1,52 +1,28 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useId as b } from "react";
3
- import { wrapper as f, label as N, selectWrapper as x, chevron as j, errorText as k, select as w, selectError as I } from "./index.esm17.js";
4
- function g({
5
- options: n,
6
- value: o,
7
- onChange: i,
8
- label: d,
9
- placeholder: t,
10
- error: r,
11
- disabled: m = !1,
12
- name: u,
13
- id: h
14
- }) {
15
- const v = b(), a = h ?? v, c = r ? `${a}-error` : void 0, p = [w, r ? I : ""].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ s("div", { className: f, children: [
17
- d && /* @__PURE__ */ e("label", { className: N, htmlFor: a, children: d }),
18
- /* @__PURE__ */ s("div", { className: x, children: [
19
- /* @__PURE__ */ s(
20
- "select",
21
- {
22
- id: a,
23
- name: u,
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
- g as Select
27
+ F as ProductShelf
52
28
  };
@@ -1,25 +1,14 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { vars as c } from "@danielcruzcode/design-tokens";
3
- import { stackBase as n } from "./index.esm29.js";
4
- const o = {
5
- start: "flex-start",
6
- center: "center",
7
- end: "flex-end",
8
- stretch: "stretch"
9
- };
10
- function l({ gap: t, align: e = "stretch", children: r, as: s = "div" }) {
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
- l as Stack
13
+ p as Stack
25
14
  };
@@ -1,28 +1,15 @@
1
- import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { removeButton as o, tagRecipe as a } from "./index.esm14.js";
3
- function c({ label: r, onRemove: e, variant: i = "default" }) {
4
- return /* @__PURE__ */ n("span", { className: a({ variant: i }), children: [
5
- r,
6
- e && /* @__PURE__ */ t(
7
- "button",
8
- {
9
- type: "button",
10
- className: o,
11
- onClick: e,
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
- c as Tag
14
+ s as Container
28
15
  };
@@ -1,9 +1,24 @@
1
- import "./index.esm31.js";
2
- /* empty css */
3
- /* empty css */
4
- import { c as a } from "./index.esm34.js";
5
- var i = a({ defaultClassName: "_13mmpdy0", variantClassNames: { variant: { default: "_13mmpdy1", brand: "_13mmpdy2" } }, defaultVariants: { variant: "default" }, compoundVariants: [] }), p = "_13mmpdy3";
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
- p as removeButton,
8
- i as tagRecipe
23
+ b as default
9
24
  };
@@ -1,7 +1,35 @@
1
- /* empty css */
2
- /* empty css */
3
- import { c as r } from "./index.esm34.js";
4
- var t = r({ defaultClassName: "_12rozn90", variantClassNames: { variant: { primary: "_12rozn91", secondary: "_12rozn92", ghost: "_12rozn93", danger: "_12rozn94" }, size: { sm: "_12rozn95", md: "_12rozn96", lg: "_12rozn97" }, fullWidth: { true: "_12rozn98" } }, defaultVariants: { variant: "primary", size: "md" }, compoundVariants: [] });
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
- t as buttonRecipe
31
+ l as areOptionsEqual,
32
+ O as arePluginsEqual,
33
+ p as canUseDOM,
34
+ f as sortAndMapPluginToOptions
7
35
  };