@danielcruzcode/ui-core 0.1.3 → 0.1.5

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.cjs17.js +1 -1
  18. package/dist/index.cjs18.js +1 -1
  19. package/dist/index.cjs2.js +19 -1
  20. package/dist/index.cjs3.js +12 -1
  21. package/dist/index.cjs4.js +17 -1
  22. package/dist/index.cjs5.js +17 -1
  23. package/dist/index.cjs6.js +8 -1
  24. package/dist/index.cjs7.js +12 -1
  25. package/dist/index.cjs8.js +8 -1
  26. package/dist/index.cjs9.js +18 -1
  27. package/dist/index.esm.js +22 -22
  28. package/dist/index.esm10.js +65 -61
  29. package/dist/index.esm11.js +24 -48
  30. package/dist/index.esm12.js +11 -22
  31. package/dist/index.esm13.js +12 -25
  32. package/dist/index.esm14.js +45 -11
  33. package/dist/index.esm15.js +22 -5
  34. package/dist/index.esm16.js +33 -5
  35. package/dist/index.esm17.js +1202 -6
  36. package/dist/index.esm18.js +50 -13
  37. package/dist/index.esm2.js +38 -5
  38. package/dist/index.esm3.js +27 -46
  39. package/dist/index.esm4.js +29 -32
  40. package/dist/index.esm5.js +35 -96
  41. package/dist/index.esm6.js +26 -58
  42. package/dist/index.esm7.js +29 -5
  43. package/dist/index.esm8.js +34 -55
  44. package/dist/index.esm9.js +69 -162
  45. package/dist/layout/Container/Container.d.ts +2 -1
  46. package/dist/layout/Container/Container.d.ts.map +1 -1
  47. package/dist/layout/Stack/Stack.d.ts +4 -3
  48. package/dist/layout/Stack/Stack.d.ts.map +1 -1
  49. package/dist/primitives/Badge/Badge.d.ts.map +1 -1
  50. package/dist/primitives/Button/Button.d.ts +1 -1
  51. package/dist/primitives/Button/Button.d.ts.map +1 -1
  52. package/dist/primitives/Checkbox/Checkbox.d.ts +1 -1
  53. package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -1
  54. package/dist/primitives/Input/Input.d.ts +1 -1
  55. package/dist/primitives/Input/Input.d.ts.map +1 -1
  56. package/dist/primitives/Select/Select.d.ts +1 -1
  57. package/dist/primitives/Select/Select.d.ts.map +1 -1
  58. package/dist/primitives/Tag/Tag.d.ts.map +1 -1
  59. package/package.json +6 -26
  60. package/dist/commerce/ProductCard/ProductCard.css.d.ts +0 -23
  61. package/dist/commerce/ProductCard/ProductCard.css.d.ts.map +0 -1
  62. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts +0 -3
  63. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts.map +0 -1
  64. package/dist/components/Card/Card.css.d.ts +0 -30
  65. package/dist/components/Card/Card.css.d.ts.map +0 -1
  66. package/dist/components/Carousel/Carousel.css.d.ts +0 -8
  67. package/dist/components/Carousel/Carousel.css.d.ts.map +0 -1
  68. package/dist/index.cjs19.js +0 -1
  69. package/dist/index.cjs20.js +0 -1
  70. package/dist/index.cjs21.js +0 -1
  71. package/dist/index.cjs22.js +0 -1
  72. package/dist/index.cjs23.js +0 -1
  73. package/dist/index.cjs24.js +0 -1
  74. package/dist/index.cjs25.js +0 -1
  75. package/dist/index.cjs26.js +0 -1
  76. package/dist/index.cjs27.js +0 -1
  77. package/dist/index.cjs28.js +0 -1
  78. package/dist/index.cjs30.js +0 -1
  79. package/dist/index.cjs31.js +0 -1
  80. package/dist/index.cjs35.js +0 -1
  81. package/dist/index.cjs44.js +0 -1
  82. package/dist/index.cjs45.js +0 -1
  83. package/dist/index.cjs46.js +0 -1
  84. package/dist/index.cjs49.js +0 -1
  85. package/dist/index.cjs50.js +0 -1
  86. package/dist/index.cjs51.js +0 -1
  87. package/dist/index.cjs52.js +0 -1
  88. package/dist/index.esm19.js +0 -12
  89. package/dist/index.esm20.js +0 -26
  90. package/dist/index.esm21.js +0 -7
  91. package/dist/index.esm22.js +0 -7
  92. package/dist/index.esm23.js +0 -11
  93. package/dist/index.esm24.js +0 -136
  94. package/dist/index.esm25.js +0 -226
  95. package/dist/index.esm26.js +0 -130
  96. package/dist/index.esm27.js +0 -280
  97. package/dist/index.esm28.js +0 -11
  98. package/dist/index.esm30.js +0 -5
  99. package/dist/index.esm31.js +0 -1
  100. package/dist/index.esm35.js +0 -88
  101. package/dist/index.esm44.js +0 -2038
  102. package/dist/index.esm45.js +0 -60
  103. package/dist/index.esm46.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,65 +1,69 @@
1
- var w = Object.defineProperty, x = Object.defineProperties;
2
- var C = Object.getOwnPropertyDescriptors;
3
- var m = Object.getOwnPropertySymbols;
4
- var P = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
5
- var i = (e, o, r) => o in e ? w(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r, l = (e, o) => {
6
- for (var r in o || (o = {}))
7
- P.call(o, r) && i(e, r, o[r]);
8
- if (m)
9
- for (var r of m(o))
10
- j.call(o, r) && i(e, r, o[r]);
11
- return e;
12
- }, n = (e, o) => x(e, C(o));
13
- import { jsxs as A, jsx as a } from "react/jsx-runtime";
14
- import { root as N, heading as y } from "./index.esm21.js";
15
- import { Carousel as D } from "./index.esm5.js";
16
- import { ProductCard as S } from "./index.esm9.js";
17
- function B({
18
- products: e,
19
- title: o,
20
- autoplay: r = !1,
21
- autoplayMs: t = 4e3,
22
- slidesPerView: c = { mobile: 1, tablet: 2, desktop: 4 },
23
- onAddToCart: d,
24
- onWishlist: p,
25
- onProductClick: f,
26
- formatPrice: h,
27
- loading: u = !1,
28
- skeletonCount: g = 4
29
- }) {
30
- const b = u ? Array.from({ length: g }).map((s, k) => ({
31
- id: `skeleton-${k}`,
32
- title: "",
33
- images: [],
34
- price: 0,
35
- loading: !0
36
- })) : e;
37
- return /* @__PURE__ */ A("section", { className: N, "aria-label": o != null ? o : "Productos", children: [
38
- o && /* @__PURE__ */ a("h2", { className: y, children: o }),
39
- /* @__PURE__ */ a(
40
- D,
41
- {
42
- autoplay: r,
43
- autoplayMs: t,
44
- slidesPerView: c,
45
- gap: 4,
46
- showArrows: !0,
47
- showDots: !0,
48
- loop: !0,
49
- children: b.map((s) => /* @__PURE__ */ a(
50
- S,
51
- n(l({}, s), {
52
- onAddToCart: d,
53
- onWishlist: p,
54
- onClick: f,
55
- formatPrice: h
56
- }),
57
- s.id
58
- ))
59
- }
60
- )
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 "./index.esm14.js";
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
+ ] })
61
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 }) });
62
66
  }
63
67
  export {
64
- B as ProductShelf
68
+ ho as ProductCard
65
69
  };
@@ -1,52 +1,28 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { useId as f } from "react";
3
- import { wrapper as p, label as N, selectWrapper as x, chevron as j, errorText as k, select as w, selectError as I } from "./index.esm14.js";
4
- function g({
5
- options: o,
6
- value: m,
7
- onChange: r,
8
- label: d,
9
- placeholder: c,
10
- error: a,
11
- disabled: u = !1,
12
- name: h,
13
- id: s
14
- }) {
15
- const v = f(), i = s != null ? s : v, n = a ? `${i}-error` : void 0, b = [w, a ? I : ""].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ t("div", { className: p, children: [
17
- d && /* @__PURE__ */ e("label", { className: N, htmlFor: i, children: d }),
18
- /* @__PURE__ */ t("div", { className: x, children: [
19
- /* @__PURE__ */ t(
20
- "select",
21
- {
22
- id: i,
23
- name: h,
24
- className: b,
25
- value: m,
26
- onChange: (l) => r == null ? void 0 : r(l.target.value),
27
- disabled: u,
28
- "aria-invalid": a ? !0 : void 0,
29
- "aria-describedby": n,
30
- children: [
31
- c && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: c }),
32
- o.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
- a && /* @__PURE__ */ e("span", { id: n, className: k, role: "alert", children: a })
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 "./index.esm14.js";
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.esm30.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 "./index.esm14.js";
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.esm17.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 "./index.esm14.js";
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,13 +1,47 @@
1
- import "./index.esm31.js";
2
- /* empty css */
3
- /* empty css */
4
- var c = "_7acib40", i = "_7acib41", b = "_7acib42", p = "_7acib43", t = "_7acib44", v = "_7acib45", o = "_7acib46";
1
+ import { primitives as o } from "./index.esm18.js";
2
+ const e = {
3
+ color: {
4
+ background: o.color.neutral[0],
5
+ surface: o.color.neutral[100],
6
+ surfaceHover: o.color.neutral[300],
7
+ border: o.color.neutral[300],
8
+ borderFocus: o.color.green[500],
9
+ text: o.color.neutral[900],
10
+ textMuted: o.color.neutral[700],
11
+ brand: o.color.green[500],
12
+ brandHover: o.color.green[600],
13
+ brandSubtle: o.color.green[100],
14
+ success: o.color.green[500],
15
+ successSubtle: o.color.green[100],
16
+ warning: o.color.yellow[500],
17
+ warningSubtle: o.color.yellow[100],
18
+ danger: o.color.red[500],
19
+ dangerSubtle: o.color.red[100]
20
+ },
21
+ space: {
22
+ sm: o.space[2],
23
+ md: o.space[4],
24
+ lg: o.space[6],
25
+ xl: o.space[8]
26
+ },
27
+ radius: {
28
+ sm: o.radius.sm,
29
+ md: o.radius.md,
30
+ full: o.radius.full
31
+ },
32
+ font: {
33
+ body: o.font.family.body,
34
+ display: o.font.family.display
35
+ },
36
+ shadow: {
37
+ sm: o.shadow.sm,
38
+ md: o.shadow.md
39
+ },
40
+ transition: {
41
+ fast: o.transition.fast,
42
+ normal: o.transition.normal
43
+ }
44
+ };
5
45
  export {
6
- v as chevron,
7
- o as errorText,
8
- i as label,
9
- p as select,
10
- t as selectError,
11
- b as selectWrapper,
12
- c as wrapper
46
+ e as tokens
13
47
  };
@@ -1,7 +1,24 @@
1
- /* empty css */
2
- /* empty css */
3
- import { c as r } from "./index.esm35.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
+ 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.esm16.js";
3
+ import m from "./index.esm17.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;
5
22
  export {
6
- t as buttonRecipe
23
+ b as default
7
24
  };
@@ -1,7 +1,35 @@
1
- /* empty css */
2
- /* empty css */
3
- import { c as a } from "./index.esm35.js";
4
- var t = a({ defaultClassName: "rxfwcs0", variantClassNames: { variant: { brand: "rxfwcs1", success: "rxfwcs2", warning: "rxfwcs3", danger: "rxfwcs4", neutral: "rxfwcs5" }, size: { sm: "rxfwcs6", md: "rxfwcs7" } }, defaultVariants: { variant: "neutral", 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 badgeRecipe
31
+ l as areOptionsEqual,
32
+ O as arePluginsEqual,
33
+ p as canUseDOM,
34
+ f as sortAndMapPluginToOptions
7
35
  };