@grupo-elo-editorial/shared-ui-react 1.2.8 → 1.2.11

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/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
  import { clsx as Z } from "clsx";
3
3
  import { twMerge as J } from "tailwind-merge";
4
4
  import { jsx as e, jsxs as i, Fragment as _ } from "react/jsx-runtime";
5
- import { forwardRef as N, useState as k, useEffect as M } from "react";
6
- import { Loader2 as V, User as ee, Star as te, CheckIcon as U, ChevronDownIcon as A, ChevronUpIcon as ae, CircleIcon as re, ShoppingCart as R, Heart as oe, Search as Q, X as ie, Minus as ne, Plus as se, ChevronRight as W, FileX as le, Package as de, AlertCircle as ce, RefreshCw as ue, Home as me, XIcon as K, Accessibility as fe, ZoomOut as ge, ZoomIn as ve, Moon as pe, Sun as be, ChevronLeft as he, Menu as xe, ChevronDown as O, Instagram as Ne, Facebook as we, Youtube as ye, Linkedin as ke, Mail as ze } from "lucide-react";
5
+ import { forwardRef as x, useState as k, useEffect as M } from "react";
6
+ import { Loader2 as V, User as ee, Star as te, CheckIcon as U, ChevronDownIcon as A, ChevronUpIcon as ae, CircleIcon as re, ShoppingCart as R, Heart as oe, Search as Q, X as ie, Minus as ne, Plus as se, ChevronRight as W, FileX as le, Package as de, AlertCircle as ce, RefreshCw as ue, Home as me, XIcon as K, Accessibility as fe, ZoomOut as ge, ZoomIn as pe, Moon as ve, Sun as be, ChevronLeft as he, Menu as xe, ChevronDown as O, Instagram as Ne, Facebook as we, Youtube as ye, Linkedin as ke, Mail as ze } from "lucide-react";
7
7
  import { cva as L } from "class-variance-authority";
8
8
  import * as z from "@radix-ui/react-select";
9
9
  import * as F from "@radix-ui/react-checkbox";
@@ -45,7 +45,7 @@ const Se = L(
45
45
  size: "md"
46
46
  }
47
47
  }
48
- ), C = N(
48
+ ), C = x(
49
49
  ({
50
50
  className: a,
51
51
  variant: t,
@@ -57,11 +57,11 @@ const Se = L(
57
57
  children: m,
58
58
  disabled: f,
59
59
  ...u
60
- }, v) => /* @__PURE__ */ e(
60
+ }, p) => /* @__PURE__ */ e(
61
61
  "button",
62
62
  {
63
63
  className: o(Se({ variant: t, size: r, fullWidth: n, className: a })),
64
- ref: v,
64
+ ref: p,
65
65
  disabled: f || s,
66
66
  ...u,
67
67
  children: s ? /* @__PURE__ */ i(_, { children: [
@@ -76,7 +76,7 @@ const Se = L(
76
76
  )
77
77
  );
78
78
  C.displayName = "Button";
79
- const Ie = N(
79
+ const Ie = x(
80
80
  ({ className: a, error: t, helperText: r, ...n }, s) => /* @__PURE__ */ i("div", { className: "w-full", children: [
81
81
  /* @__PURE__ */ e(
82
82
  "textarea",
@@ -131,7 +131,7 @@ const je = L(
131
131
  size: "md"
132
132
  }
133
133
  }
134
- ), P = N(
134
+ ), P = x(
135
135
  ({ className: a, variant: t, size: r, icon: n, onRemove: s, children: c, ...l }, m) => /* @__PURE__ */ i(
136
136
  "div",
137
137
  {
@@ -170,14 +170,14 @@ const Me = L(
170
170
  size: "md"
171
171
  }
172
172
  }
173
- ), De = N(
173
+ ), De = x(
174
174
  ({ className: a, size: t, src: r, alt: n, name: s, showStatus: c, statusType: l = "online", ...m }, f) => {
175
- const [u, v] = k(!1), g = (x) => x.split(" ").map((d) => d[0]).join("").toUpperCase().slice(0, 2), b = {
175
+ const [u, p] = k(!1), g = (h) => h.split(" ").map((d) => d[0]).join("").toUpperCase().slice(0, 2), b = {
176
176
  online: "bg-[var(--success)]",
177
177
  offline: "bg-[var(--muted-foreground)]",
178
178
  away: "bg-[var(--warning)]",
179
179
  busy: "bg-[var(--destructive)]"
180
- }, h = {
180
+ }, N = {
181
181
  sm: "h-2 w-2 border",
182
182
  md: "h-2.5 w-2.5 border-2",
183
183
  lg: "h-3 w-3 border-2",
@@ -189,7 +189,7 @@ const Me = L(
189
189
  {
190
190
  src: r,
191
191
  alt: n || s || "Avatar",
192
- onError: () => v(!0),
192
+ onError: () => p(!0),
193
193
  className: "h-full w-full object-cover",
194
194
  ...m
195
195
  }
@@ -200,7 +200,7 @@ const Me = L(
200
200
  className: o(
201
201
  "absolute bottom-0 right-0 rounded-full border-[var(--background)]",
202
202
  b[l],
203
- h[t || "md"]
203
+ N[t || "md"]
204
204
  ),
205
205
  "aria-label": `Status: ${l}`
206
206
  }
@@ -221,7 +221,7 @@ const Le = L("animate-spin text-[var(--brand-primary)]", {
221
221
  defaultVariants: {
222
222
  size: "md"
223
223
  }
224
- }), _e = N(
224
+ }), _e = x(
225
225
  ({ className: a, size: t, label: r, ...n }, s) => /* @__PURE__ */ i(
226
226
  "div",
227
227
  {
@@ -238,7 +238,7 @@ const Le = L("animate-spin text-[var(--brand-primary)]", {
238
238
  )
239
239
  );
240
240
  _e.displayName = "Spinner";
241
- const Pe = N(
241
+ const Pe = x(
242
242
  ({ className: a, orientation: t = "horizontal", variant: r = "solid", text: n, ...s }, c) => {
243
243
  const l = {
244
244
  solid: "border-solid",
@@ -285,7 +285,7 @@ const Pe = N(
285
285
  }
286
286
  );
287
287
  Pe.displayName = "Divider";
288
- const $ = N(
288
+ const T = x(
289
289
  ({
290
290
  className: a,
291
291
  value: t = 0,
@@ -296,13 +296,13 @@ const $ = N(
296
296
  showValue: l = !1,
297
297
  ...m
298
298
  }, f) => {
299
- const [u, v] = k(0), g = {
299
+ const [u, p] = k(0), g = {
300
300
  sm: "h-4 w-4",
301
301
  md: "h-5 w-5",
302
302
  lg: "h-6 w-6"
303
- }, b = (x) => {
304
- !s && c && c(x);
305
- }, h = u || t;
303
+ }, b = (h) => {
304
+ !s && c && c(h);
305
+ }, N = u || t;
306
306
  return /* @__PURE__ */ i(
307
307
  "div",
308
308
  {
@@ -312,21 +312,21 @@ const $ = N(
312
312
  "aria-label": `Rating: ${t} out of ${r}`,
313
313
  ...m,
314
314
  children: [
315
- /* @__PURE__ */ e("div", { className: "flex items-center gap-0.5", children: Array.from({ length: r }, (x, d) => d + 1).map((x) => {
316
- const d = x <= h;
315
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-0.5", children: Array.from({ length: r }, (h, d) => d + 1).map((h) => {
316
+ const d = h <= N;
317
317
  return /* @__PURE__ */ e(
318
318
  "button",
319
319
  {
320
320
  type: "button",
321
321
  disabled: s,
322
- onClick: () => b(x),
323
- onMouseEnter: () => !s && v(x),
324
- onMouseLeave: () => !s && v(0),
322
+ onClick: () => b(h),
323
+ onMouseEnter: () => !s && p(h),
324
+ onMouseLeave: () => !s && p(0),
325
325
  className: o(
326
326
  "transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-1 rounded",
327
327
  s ? "cursor-default" : "cursor-pointer hover:scale-110"
328
328
  ),
329
- "aria-label": `Rate ${x} out of ${r}`,
329
+ "aria-label": `Rate ${h} out of ${r}`,
330
330
  children: /* @__PURE__ */ e(
331
331
  te,
332
332
  {
@@ -338,7 +338,7 @@ const $ = N(
338
338
  }
339
339
  )
340
340
  },
341
- x
341
+ h
342
342
  );
343
343
  }) }),
344
344
  l && /* @__PURE__ */ e("span", { className: "ml-1 text-sm font-medium text-[var(--foreground)]", children: t.toFixed(1) })
@@ -347,7 +347,7 @@ const $ = N(
347
347
  );
348
348
  }
349
349
  );
350
- $.displayName = "Rating";
350
+ T.displayName = "Rating";
351
351
  function zt({ className: a, type: t, ...r }) {
352
352
  return /* @__PURE__ */ e(
353
353
  "input",
@@ -579,7 +579,7 @@ function H({
579
579
  }) {
580
580
  return a ? /* @__PURE__ */ e("a", { href: a, className: t, tabIndex: -1, "aria-hidden": "true", children: r }) : /* @__PURE__ */ e("div", { className: t, children: r });
581
581
  }
582
- const T = N(
582
+ const $ = x(
583
583
  ({
584
584
  className: a,
585
585
  image: t,
@@ -591,21 +591,21 @@ const T = N(
591
591
  reviewCount: m,
592
592
  badge: f,
593
593
  badgeVariant: u = "default",
594
- isSkeleton: v = !1,
594
+ isSkeleton: p = !1,
595
595
  isOutOfStock: g = !1,
596
596
  onAddToCart: b,
597
- onToggleFavorite: h,
598
- isFavorite: x = !1,
597
+ onToggleFavorite: N,
598
+ isFavorite: h = !1,
599
599
  href: d,
600
- orientation: p = "vertical",
600
+ orientation: v = "vertical",
601
601
  ...y
602
- }, j) => v ? /* @__PURE__ */ i(
602
+ }, j) => p ? /* @__PURE__ */ i(
603
603
  "div",
604
604
  {
605
605
  ref: j,
606
606
  className: o(
607
607
  "flex rounded-lg border-2 border-[var(--border)] bg-[var(--card)] p-4 animate-pulse",
608
- p === "horizontal" ? "flex-row gap-3" : "flex-col",
608
+ v === "horizontal" ? "flex-row gap-3" : "flex-col",
609
609
  a
610
610
  ),
611
611
  ...y,
@@ -615,18 +615,18 @@ const T = N(
615
615
  {
616
616
  className: o(
617
617
  "rounded-lg bg-[var(--muted)]",
618
- p === "horizontal" ? "h-24 w-20 shrink-0" : "h-56 sm:h-60 lg:h-64 w-full"
618
+ v === "horizontal" ? "h-24 w-20 shrink-0" : "h-55 sm:h-66.5 w-full sm:w-44.25"
619
619
  )
620
620
  }
621
621
  ),
622
- /* @__PURE__ */ i("div", { className: o("flex flex-col gap-2", p === "horizontal" ? "flex-1" : "mt-3"), children: [
622
+ /* @__PURE__ */ i("div", { className: o("flex flex-col gap-2", v === "horizontal" ? "flex-1" : "mt-3"), children: [
623
623
  /* @__PURE__ */ e("div", { className: "h-4 w-3/4 rounded bg-[var(--muted)]" }),
624
624
  /* @__PURE__ */ e("div", { className: "h-4 w-1/2 rounded bg-[var(--muted)]" }),
625
625
  /* @__PURE__ */ e("div", { className: "h-10 w-full rounded bg-[var(--muted)]" })
626
626
  ] })
627
627
  ]
628
628
  }
629
- ) : p === "horizontal" ? /* @__PURE__ */ i(
629
+ ) : v === "horizontal" ? /* @__PURE__ */ i(
630
630
  "div",
631
631
  {
632
632
  ref: j,
@@ -663,7 +663,7 @@ const T = N(
663
663
  ) : /* @__PURE__ */ e("h3", { className: "line-clamp-2 text-sm font-medium text-[var(--card-foreground)]", children: r }),
664
664
  n && /* @__PURE__ */ e("p", { className: "text-xs text-[var(--muted-foreground)]", children: n }),
665
665
  l !== void 0 && /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
666
- /* @__PURE__ */ e($, { value: l, size: "sm", readonly: !0 }),
666
+ /* @__PURE__ */ e(T, { value: l, size: "sm", readonly: !0 }),
667
667
  m !== void 0 && /* @__PURE__ */ i("span", { className: "text-xs text-[var(--muted-foreground)]", children: [
668
668
  "(",
669
669
  m,
@@ -701,7 +701,7 @@ const T = N(
701
701
  {
702
702
  ref: j,
703
703
  className: o(
704
- "group relative flex flex-col rounded-lg border-2 border-[var(--border)] bg-[var(--card)] transition-all hover:shadow-lg",
704
+ "group relative flex flex-col w-full sm:w-fit sm:min-w-37.5 rounded-lg border-2 border-border bg-card transition-all hover:shadow-lg",
705
705
  g && "opacity-60",
706
706
  a
707
707
  ),
@@ -711,62 +711,50 @@ const T = N(
711
711
  H,
712
712
  {
713
713
  href: d,
714
- className: "relative block h-56 sm:h-60 lg:h-64 w-full overflow-hidden rounded-t-lg",
714
+ className: "relative block h-55 sm:h-66.5 w-full sm:w-fit overflow-hidden rounded-t-lg",
715
715
  children: [
716
- /* @__PURE__ */ e(
717
- "div",
718
- {
719
- "aria-hidden": "true",
720
- className: "absolute inset-0 z-0 bg-cover bg-center",
721
- style: {
722
- backgroundImage: `url(${t})`,
723
- filter: "blur(14px) brightness(0.85)",
724
- transform: "scale(1.2)"
725
- }
726
- }
727
- ),
728
716
  /* @__PURE__ */ e(
729
717
  "img",
730
718
  {
731
719
  src: t,
732
720
  alt: r,
733
- className: "relative z-10 h-full w-full object-cover transition-transform group-hover:scale-105"
721
+ className: "h-full w-full sm:w-auto object-cover sm:object-none transition-transform group-hover:scale-105"
734
722
  }
735
723
  ),
736
- f && /* @__PURE__ */ e("div", { className: "absolute left-3 top-3 z-20", children: /* @__PURE__ */ e(P, { variant: u, children: f }) }),
737
- g && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-20 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ e(P, { variant: "danger", size: "lg", children: "Esgotado" }) })
724
+ f && /* @__PURE__ */ e("div", { className: "absolute left-3 top-3", children: /* @__PURE__ */ e(P, { variant: u, children: f }) }),
725
+ g && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ e(P, { variant: "danger", size: "lg", children: "Esgotado" }) })
738
726
  ]
739
727
  }
740
728
  ),
741
- h && /* @__PURE__ */ e(
729
+ N && /* @__PURE__ */ e(
742
730
  "button",
743
731
  {
744
- onClick: h,
732
+ onClick: N,
745
733
  className: "absolute right-3 top-3 rounded-full bg-white/90 p-2 transition-all hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
746
- "aria-label": x ? "Remover dos favoritos" : "Adicionar aos favoritos",
734
+ "aria-label": h ? "Remover dos favoritos" : "Adicionar aos favoritos",
747
735
  children: /* @__PURE__ */ e(
748
736
  oe,
749
737
  {
750
738
  className: o(
751
739
  "h-5 w-5",
752
- x ? "fill-[var(--destructive)] text-[var(--destructive)]" : "text-[var(--foreground)]"
740
+ h ? "fill-[var(--destructive)] text-[var(--destructive)]" : "text-[var(--foreground)]"
753
741
  )
754
742
  }
755
743
  )
756
744
  }
757
745
  ),
758
- /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col p-4", children: [
746
+ /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col p-4 w-full sm:w-0 sm:min-w-full", children: [
759
747
  d ? /* @__PURE__ */ e(
760
748
  "a",
761
749
  {
762
750
  href: d,
763
- className: "line-clamp-2 text-base font-medium text-[var(--card-foreground)] hover:text-[var(--brand-primary)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] rounded",
751
+ className: "wrap-break-word text-base font-medium text-card-foreground hover:text-brand-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",
764
752
  children: r
765
753
  }
766
- ) : /* @__PURE__ */ e("h3", { className: "line-clamp-2 text-base font-medium text-[var(--card-foreground)]", children: r }),
754
+ ) : /* @__PURE__ */ e("h3", { className: "wrap-break-word text-base font-medium text-card-foreground", children: r }),
767
755
  n && /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-[var(--muted-foreground)]", children: n }),
768
756
  l !== void 0 && /* @__PURE__ */ i("div", { className: "mt-2 flex items-center gap-2", children: [
769
- /* @__PURE__ */ e($, { value: l, size: "sm", readonly: !0 }),
757
+ /* @__PURE__ */ e(T, { value: l, size: "sm", readonly: !0 }),
770
758
  m !== void 0 && /* @__PURE__ */ i("span", { className: "text-sm text-[var(--muted-foreground)]", children: [
771
759
  "(",
772
760
  m,
@@ -806,8 +794,8 @@ const T = N(
806
794
  }
807
795
  )
808
796
  );
809
- T.displayName = "ProductCard";
810
- const Ee = N(
797
+ $.displayName = "ProductCard";
798
+ const Ee = x(
811
799
  ({
812
800
  className: a,
813
801
  onSearch: t,
@@ -819,16 +807,16 @@ const Ee = N(
819
807
  onChange: m,
820
808
  ...f
821
809
  }, u) => {
822
- const [v, g] = k(""), b = l !== void 0 ? l : v, h = {
810
+ const [p, g] = k(""), b = l !== void 0 ? l : p, N = {
823
811
  sm: "h-9 text-sm",
824
812
  md: "h-11 text-base",
825
813
  lg: "h-14 text-lg"
826
- }, x = (y) => {
814
+ }, h = (y) => {
827
815
  const j = y.target.value;
828
816
  l === void 0 && g(j), m == null || m(y);
829
817
  }, d = () => {
830
818
  l === void 0 && g(""), r == null || r();
831
- }, p = (y) => {
819
+ }, v = (y) => {
832
820
  y.key === "Enter" && t && t(b);
833
821
  };
834
822
  return /* @__PURE__ */ e("div", { className: o("relative w-full", a), children: /* @__PURE__ */ i("div", { className: "relative flex items-center", children: [
@@ -839,15 +827,15 @@ const Ee = N(
839
827
  ref: u,
840
828
  type: "search",
841
829
  value: b,
842
- onChange: x,
843
- onKeyDown: p,
830
+ onChange: h,
831
+ onKeyDown: v,
844
832
  placeholder: c,
845
833
  className: o(
846
834
  "w-full rounded-lg border-2 border-[var(--border)] bg-[var(--input-background)] pl-10 pr-10 font-normal transition-colors",
847
835
  "placeholder:text-[var(--muted-foreground)]",
848
836
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
849
837
  "disabled:cursor-not-allowed disabled:opacity-50",
850
- h[s]
838
+ N[s]
851
839
  ),
852
840
  ...f
853
841
  }
@@ -869,7 +857,7 @@ const Ee = N(
869
857
  }
870
858
  );
871
859
  Ee.displayName = "SearchBar";
872
- const $e = N(
860
+ const Te = x(
873
861
  ({
874
862
  className: a,
875
863
  price: t,
@@ -880,7 +868,7 @@ const $e = N(
880
868
  installments: l,
881
869
  ...m
882
870
  }, f) => {
883
- const u = r && r > t ? Math.round((r - t) / r * 100) : 0, v = {
871
+ const u = r && r > t ? Math.round((r - t) / r * 100) : 0, p = {
884
872
  sm: "text-base",
885
873
  md: "text-xl",
886
874
  lg: "text-2xl",
@@ -894,7 +882,7 @@ const $e = N(
894
882
  return /* @__PURE__ */ i("div", { ref: f, className: o("flex flex-col gap-1", a), ...m, children: [
895
883
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2 flex-wrap", children: [
896
884
  /* @__PURE__ */ i("div", { className: "flex items-baseline gap-2", children: [
897
- /* @__PURE__ */ i("span", { className: o("font-bold text-[var(--foreground)]", v[s]), children: [
885
+ /* @__PURE__ */ i("span", { className: o("font-bold text-[var(--foreground)]", p[s]), children: [
898
886
  n,
899
887
  " ",
900
888
  t.toFixed(2)
@@ -932,8 +920,8 @@ const $e = N(
932
920
  ] });
933
921
  }
934
922
  );
935
- $e.displayName = "PriceDisplay";
936
- const Te = N(
923
+ Te.displayName = "PriceDisplay";
924
+ const $e = x(
937
925
  ({
938
926
  className: a,
939
927
  value: t,
@@ -945,18 +933,18 @@ const Te = N(
945
933
  showLabel: m = !1,
946
934
  ...f
947
935
  }, u) => {
948
- const v = () => {
936
+ const p = () => {
949
937
  t < n && s(t + 1);
950
938
  }, g = () => {
951
939
  t > r && s(t - 1);
952
940
  }, b = (d) => {
953
- const p = parseInt(d.target.value);
954
- !isNaN(p) && p >= r && p <= n && s(p);
955
- }, h = {
941
+ const v = parseInt(d.target.value);
942
+ !isNaN(v) && v >= r && v <= n && s(v);
943
+ }, N = {
956
944
  sm: "h-8 w-8",
957
945
  md: "h-10 w-10",
958
946
  lg: "h-12 w-12"
959
- }, x = {
947
+ }, h = {
960
948
  sm: "h-8 w-12 text-sm",
961
949
  md: "h-10 w-14 text-base",
962
950
  lg: "h-12 w-16 text-lg"
@@ -972,7 +960,7 @@ const Te = N(
972
960
  size: "sm",
973
961
  onClick: g,
974
962
  disabled: l || t <= r,
975
- className: o(h[c], "p-0"),
963
+ className: o(N[c], "p-0"),
976
964
  "aria-label": "Decrease quantity",
977
965
  children: /* @__PURE__ */ e(ne, { className: "h-4 w-4" })
978
966
  }
@@ -991,7 +979,7 @@ const Te = N(
991
979
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
992
980
  "disabled:cursor-not-allowed disabled:opacity-50",
993
981
  "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
994
- x[c]
982
+ h[c]
995
983
  ),
996
984
  "aria-label": "Quantity"
997
985
  }
@@ -1002,9 +990,9 @@ const Te = N(
1002
990
  type: "button",
1003
991
  variant: "secondary",
1004
992
  size: "sm",
1005
- onClick: v,
993
+ onClick: p,
1006
994
  disabled: l || t >= n,
1007
- className: o(h[c], "p-0"),
995
+ className: o(N[c], "p-0"),
1008
996
  "aria-label": "Increase quantity",
1009
997
  children: /* @__PURE__ */ e(se, { className: "h-4 w-4" })
1010
998
  }
@@ -1013,8 +1001,8 @@ const Te = N(
1013
1001
  ] });
1014
1002
  }
1015
1003
  );
1016
- Te.displayName = "QuantitySelector";
1017
- const Be = N(
1004
+ $e.displayName = "QuantitySelector";
1005
+ const Be = x(
1018
1006
  ({ className: a, label: t, htmlFor: r, required: n, error: s, helperText: c, children: l, ...m }, f) => /* @__PURE__ */ i("div", { ref: f, className: o("flex flex-col gap-1.5", a), ...m, children: [
1019
1007
  t && /* @__PURE__ */ i(
1020
1008
  "label",
@@ -1067,7 +1055,7 @@ function Et({ className: a, ...t }) {
1067
1055
  }
1068
1056
  );
1069
1057
  }
1070
- function $t({
1058
+ function Tt({
1071
1059
  asChild: a,
1072
1060
  className: t,
1073
1061
  ...r
@@ -1081,7 +1069,7 @@ function $t({
1081
1069
  }
1082
1070
  );
1083
1071
  }
1084
- function Tt({ className: a, ...t }) {
1072
+ function $t({ className: a, ...t }) {
1085
1073
  return /* @__PURE__ */ e(
1086
1074
  "span",
1087
1075
  {
@@ -1211,7 +1199,7 @@ function Qt({
1211
1199
  }
1212
1200
  ) });
1213
1201
  }
1214
- const Fe = N(
1202
+ const Fe = x(
1215
1203
  ({
1216
1204
  className: a,
1217
1205
  variant: t = "default",
@@ -1223,7 +1211,7 @@ const Fe = N(
1223
1211
  backgroundImage: m,
1224
1212
  overlay: f = !0,
1225
1213
  children: u,
1226
- ...v
1214
+ ...p
1227
1215
  }, g) => /* @__PURE__ */ i(
1228
1216
  "section",
1229
1217
  {
@@ -1237,7 +1225,7 @@ const Fe = N(
1237
1225
  }[t],
1238
1226
  a
1239
1227
  ),
1240
- ...v,
1228
+ ...p,
1241
1229
  children: [
1242
1230
  m && /* @__PURE__ */ i(_, { children: [
1243
1231
  /* @__PURE__ */ e(
@@ -1319,7 +1307,7 @@ const Fe = N(
1319
1307
  )
1320
1308
  );
1321
1309
  Fe.displayName = "Hero";
1322
- const X = N(
1310
+ const X = x(
1323
1311
  ({
1324
1312
  className: a,
1325
1313
  variant: t = "default",
@@ -1364,7 +1352,7 @@ const X = N(
1364
1352
  }
1365
1353
  );
1366
1354
  X.displayName = "EmptyState";
1367
- const qe = N(
1355
+ const qe = x(
1368
1356
  ({
1369
1357
  className: a,
1370
1358
  type: t = "generic",
@@ -1397,7 +1385,7 @@ const qe = N(
1397
1385
  message: "Ocorreu um erro inesperado. Por favor, tente novamente.",
1398
1386
  code: ""
1399
1387
  }
1400
- }[t], b = r || g.title, h = n || g.message;
1388
+ }[t], b = r || g.title, N = n || g.message;
1401
1389
  return /* @__PURE__ */ i(
1402
1390
  "div",
1403
1391
  {
@@ -1415,7 +1403,7 @@ const qe = N(
1415
1403
  /* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--destructive)]/10 p-6 text-[var(--destructive)]", children: /* @__PURE__ */ e(ce, { className: "h-16 w-16" }) })
1416
1404
  ] }),
1417
1405
  /* @__PURE__ */ e("h2", { className: "mt-6 text-2xl font-bold text-[var(--foreground)]", children: b }),
1418
- /* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: h }),
1406
+ /* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: N }),
1419
1407
  /* @__PURE__ */ i("div", { className: "mt-8 flex flex-wrap gap-4 justify-center", children: [
1420
1408
  l && s && /* @__PURE__ */ e(
1421
1409
  C,
@@ -1444,7 +1432,7 @@ const qe = N(
1444
1432
  }
1445
1433
  );
1446
1434
  qe.displayName = "ErrorState";
1447
- const He = N(
1435
+ const He = x(
1448
1436
  ({
1449
1437
  className: a,
1450
1438
  products: t,
@@ -1456,12 +1444,7 @@ const He = N(
1456
1444
  onEmptyAction: m,
1457
1445
  ...f
1458
1446
  }, u) => {
1459
- const v = {
1460
- 2: "grid-cols-1 sm:grid-cols-2",
1461
- 3: "grid-cols-2 sm:grid-cols-2 lg:grid-cols-3",
1462
- 4: "grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
1463
- 5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5"
1464
- }, g = {
1447
+ const p = {
1465
1448
  sm: "gap-4",
1466
1449
  md: "gap-6",
1467
1450
  lg: "gap-8"
@@ -1471,21 +1454,20 @@ const He = N(
1471
1454
  {
1472
1455
  ref: u,
1473
1456
  className: o(
1474
- "grid",
1475
- v[r],
1476
- g[n],
1457
+ "grid grid-cols-2 sm:flex sm:flex-wrap",
1458
+ p[n],
1477
1459
  a
1478
1460
  ),
1479
1461
  ...f,
1480
- children: Array.from({ length: c }).map((b, h) => /* @__PURE__ */ e(
1481
- T,
1462
+ children: Array.from({ length: c }).map((g, b) => /* @__PURE__ */ e(
1463
+ $,
1482
1464
  {
1483
1465
  image: "",
1484
1466
  title: "",
1485
1467
  price: 0,
1486
1468
  isSkeleton: !0
1487
1469
  },
1488
- h
1470
+ b
1489
1471
  ))
1490
1472
  }
1491
1473
  ) : t.length === 0 ? /* @__PURE__ */ e(
@@ -1504,13 +1486,12 @@ const He = N(
1504
1486
  {
1505
1487
  ref: u,
1506
1488
  className: o(
1507
- "grid",
1508
- v[r],
1509
- g[n],
1489
+ "grid grid-cols-2 sm:flex sm:flex-wrap",
1490
+ p[n],
1510
1491
  a
1511
1492
  ),
1512
1493
  ...f,
1513
- children: t.map((b, h) => /* @__PURE__ */ e(T, { ...b }, h))
1494
+ children: t.map((g, b) => /* @__PURE__ */ e($, { ...g }, b))
1514
1495
  }
1515
1496
  );
1516
1497
  }
@@ -1746,29 +1727,29 @@ function et({ children: a, as: t = "div", className: r }) {
1746
1727
  }
1747
1728
  );
1748
1729
  }
1749
- const tt = N(
1730
+ const tt = x(
1750
1731
  ({ className: a, onThemeChange: t, onFontSizeChange: r, showA11yLink: n = !1, ...s }, c) => {
1751
- const [l, m] = k("light"), [f, u] = k(16), [v, g] = k(!1);
1732
+ const [l, m] = k("light"), [f, u] = k(16), [p, g] = k(!1);
1752
1733
  M(() => {
1753
- const p = localStorage.getItem("a11y-theme") ?? document.documentElement.getAttribute("data-theme") ?? "light";
1754
- m(p);
1734
+ const v = localStorage.getItem("a11y-theme") ?? document.documentElement.getAttribute("data-theme") ?? "light";
1735
+ m(v);
1755
1736
  const y = Number(localStorage.getItem("a11y-font-size"));
1756
1737
  Number.isFinite(y) && y > 0 && u(y);
1757
1738
  }, []), M(() => {
1758
- if (!v && typeof window < "u" && !document.querySelector('script[src*="vlibras"]')) {
1759
- const p = document.createElement("script");
1760
- p.src = "https://vlibras.gov.br/app/vlibras-plugin.js", p.async = !0, p.onload = () => {
1739
+ if (!p && typeof window < "u" && !document.querySelector('script[src*="vlibras"]')) {
1740
+ const v = document.createElement("script");
1741
+ v.src = "https://vlibras.gov.br/app/vlibras-plugin.js", v.async = !0, v.onload = () => {
1761
1742
  g(!0), window.VLibras && new window.VLibras.Widget("https://vlibras.gov.br/app");
1762
- }, document.body.appendChild(p);
1743
+ }, document.body.appendChild(v);
1763
1744
  }
1764
- }, [v]);
1745
+ }, [p]);
1765
1746
  const b = () => {
1766
1747
  const d = l === "light" ? "dark" : "light";
1767
1748
  m(d), document.documentElement.setAttribute("data-theme", d), localStorage.setItem("a11y-theme", d), t == null || t(d);
1768
- }, h = () => {
1749
+ }, N = () => {
1769
1750
  const d = Math.min(f + 2, 24);
1770
1751
  u(d), document.documentElement.style.setProperty("--font-size", `${d}px`), document.documentElement.style.fontSize = `${d}px`, localStorage.setItem("a11y-font-size", d.toString()), r == null || r(d);
1771
- }, x = () => {
1752
+ }, h = () => {
1772
1753
  const d = Math.max(f - 2, 12);
1773
1754
  u(d), document.documentElement.style.setProperty("--font-size", `${d}px`), document.documentElement.style.fontSize = `${d}px`, localStorage.setItem("a11y-font-size", d.toString()), r == null || r(d);
1774
1755
  };
@@ -1802,7 +1783,7 @@ const tt = N(
1802
1783
  "button",
1803
1784
  {
1804
1785
  type: "button",
1805
- onClick: x,
1786
+ onClick: h,
1806
1787
  disabled: f <= 12,
1807
1788
  "aria-label": "Diminuir tamanho da fonte",
1808
1789
  className: o(
@@ -1818,7 +1799,7 @@ const tt = N(
1818
1799
  "button",
1819
1800
  {
1820
1801
  type: "button",
1821
- onClick: h,
1802
+ onClick: N,
1822
1803
  disabled: f >= 24,
1823
1804
  "aria-label": "Aumentar tamanho da fonte",
1824
1805
  className: o(
@@ -1826,7 +1807,7 @@ const tt = N(
1826
1807
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
1827
1808
  "disabled:opacity-40 disabled:cursor-not-allowed"
1828
1809
  ),
1829
- children: /* @__PURE__ */ e(ve, { className: "h-4 w-4" })
1810
+ children: /* @__PURE__ */ e(pe, { className: "h-4 w-4" })
1830
1811
  }
1831
1812
  )
1832
1813
  ] }),
@@ -1840,7 +1821,7 @@ const tt = N(
1840
1821
  "p-2 rounded-md transition-colors text-[var(--muted-foreground)] hover:bg-[var(--muted)]",
1841
1822
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
1842
1823
  ),
1843
- children: l === "light" ? /* @__PURE__ */ e(pe, { className: "h-4 w-4" }) : /* @__PURE__ */ e(be, { className: "h-4 w-4" })
1824
+ children: l === "light" ? /* @__PURE__ */ e(ve, { className: "h-4 w-4" }) : /* @__PURE__ */ e(be, { className: "h-4 w-4" })
1844
1825
  }
1845
1826
  ),
1846
1827
  /* @__PURE__ */ e(
@@ -1849,15 +1830,15 @@ const tt = N(
1849
1830
  type: "button",
1850
1831
  onClick: () => g((d) => !d),
1851
1832
  "aria-label": "Ativar VLibras",
1852
- "aria-pressed": v,
1833
+ "aria-pressed": p,
1853
1834
  className: o(
1854
1835
  "px-3 py-1 text-xs font-medium rounded-md transition-colors",
1855
1836
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
1856
1837
  ),
1857
1838
  style: {
1858
- backgroundColor: v ? "var(--primary)" : "transparent",
1859
- color: v ? "var(--primary-foreground)" : "var(--muted-foreground)",
1860
- border: v ? "none" : "1px solid var(--border)"
1839
+ backgroundColor: p ? "var(--primary)" : "transparent",
1840
+ color: p ? "var(--primary-foreground)" : "var(--muted-foreground)",
1841
+ border: p ? "none" : "1px solid var(--border)"
1861
1842
  },
1862
1843
  children: "VLibras"
1863
1844
  }
@@ -1869,7 +1850,7 @@ const tt = N(
1869
1850
  }
1870
1851
  );
1871
1852
  tt.displayName = "TopAccessibilityBar";
1872
- const at = N(
1853
+ const at = x(
1873
1854
  ({
1874
1855
  className: a,
1875
1856
  slides: t,
@@ -1877,26 +1858,26 @@ const at = N(
1877
1858
  autoplay: n = !0,
1878
1859
  ...s
1879
1860
  }, c) => {
1880
- const [l, m] = k(0), [f, u] = k(!1), [v, g] = k(!1);
1861
+ const [l, m] = k(0), [f, u] = k(!1), [p, g] = k(!1);
1881
1862
  M(() => {
1882
1863
  const d = window.matchMedia("(prefers-reduced-motion: reduce)");
1883
1864
  g(d.matches);
1884
- const p = (y) => {
1865
+ const v = (y) => {
1885
1866
  g(y.matches);
1886
1867
  };
1887
- return d.addEventListener("change", p), () => d.removeEventListener("change", p);
1868
+ return d.addEventListener("change", v), () => d.removeEventListener("change", v);
1888
1869
  }, []), M(() => {
1889
- if (!n || f || v) return;
1870
+ if (!n || f || p) return;
1890
1871
  const d = setInterval(() => {
1891
- m((p) => (p + 1) % t.length);
1872
+ m((v) => (v + 1) % t.length);
1892
1873
  }, r);
1893
1874
  return () => clearInterval(d);
1894
- }, [n, r, t.length, f, v]);
1875
+ }, [n, r, t.length, f, p]);
1895
1876
  const b = (d) => {
1896
1877
  m(d), u(!0), setTimeout(() => u(!1), r);
1897
- }, h = () => {
1878
+ }, N = () => {
1898
1879
  b((l - 1 + t.length) % t.length);
1899
- }, x = () => {
1880
+ }, h = () => {
1900
1881
  b((l + 1) % t.length);
1901
1882
  };
1902
1883
  return t.length === 0 ? null : (t[l], /* @__PURE__ */ i(
@@ -1908,14 +1889,14 @@ const at = N(
1908
1889
  onMouseLeave: () => u(!1),
1909
1890
  ...s,
1910
1891
  children: [
1911
- /* @__PURE__ */ e("div", { className: "relative", children: t.map((d, p) => /* @__PURE__ */ i(
1892
+ /* @__PURE__ */ e("div", { className: "relative", children: t.map((d, v) => /* @__PURE__ */ i(
1912
1893
  "div",
1913
1894
  {
1914
1895
  className: o(
1915
1896
  "w-full transition-opacity duration-700",
1916
- p === l ? "block" : "hidden"
1897
+ v === l ? "block" : "hidden"
1917
1898
  ),
1918
- "aria-hidden": p !== l,
1899
+ "aria-hidden": v !== l,
1919
1900
  children: [
1920
1901
  /* @__PURE__ */ i("picture", { children: [
1921
1902
  /* @__PURE__ */ e(
@@ -1938,8 +1919,8 @@ const at = N(
1938
1919
  src: d.imageMobile,
1939
1920
  srcSet: `${d.imageMobile} 1x, ${d.imageMobile.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`,
1940
1921
  alt: d.title,
1941
- className: "w-full object-cover aspect-3/2 md:aspect-video lg:aspect-1920/700",
1942
- loading: p === 0 ? "eager" : "lazy"
1922
+ className: "w-full object-cover aspect-3/2 md:aspect-video lg:aspect-1920/560",
1923
+ loading: v === 0 ? "eager" : "lazy"
1943
1924
  }
1944
1925
  )
1945
1926
  ] }),
@@ -1963,7 +1944,7 @@ const at = N(
1963
1944
  /* @__PURE__ */ e(
1964
1945
  "button",
1965
1946
  {
1966
- onClick: h,
1947
+ onClick: N,
1967
1948
  className: "absolute left-4 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 shadow-lg transition-all hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] min-w-[44px] min-h-[44px]",
1968
1949
  "aria-label": "Slide anterior",
1969
1950
  children: /* @__PURE__ */ e(he, { className: "h-6 w-6 text-gray-900" })
@@ -1972,25 +1953,25 @@ const at = N(
1972
1953
  /* @__PURE__ */ e(
1973
1954
  "button",
1974
1955
  {
1975
- onClick: x,
1956
+ onClick: h,
1976
1957
  className: "absolute right-4 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 shadow-lg transition-all hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] min-w-[44px] min-h-[44px]",
1977
1958
  "aria-label": "Próximo slide",
1978
1959
  children: /* @__PURE__ */ e(W, { className: "h-6 w-6 text-gray-900" })
1979
1960
  }
1980
1961
  )
1981
1962
  ] }),
1982
- t.length > 1 && /* @__PURE__ */ e("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: t.map((d, p) => /* @__PURE__ */ e(
1963
+ t.length > 1 && /* @__PURE__ */ e("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: t.map((d, v) => /* @__PURE__ */ e(
1983
1964
  "button",
1984
1965
  {
1985
- onClick: () => b(p),
1966
+ onClick: () => b(v),
1986
1967
  className: o(
1987
1968
  "h-2 rounded-full transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] min-w-[44px] min-h-[24px] flex items-center justify-center",
1988
- p === l ? "w-8 bg-white" : "w-2 bg-white/50 hover:bg-white/70"
1969
+ v === l ? "w-8 bg-white" : "w-2 bg-white/50 hover:bg-white/70"
1989
1970
  ),
1990
- "aria-label": `Ir para slide ${p + 1}`,
1991
- "aria-current": p === l
1971
+ "aria-label": `Ir para slide ${v + 1}`,
1972
+ "aria-current": v === l
1992
1973
  },
1993
- p
1974
+ v
1994
1975
  )) })
1995
1976
  ]
1996
1977
  }
@@ -2217,7 +2198,7 @@ function Y({ item: a, depth: t = 0 }) {
2217
2198
  )
2218
2199
  ] });
2219
2200
  }
2220
- const ct = N(
2201
+ const ct = x(
2221
2202
  ({ items: a, logo: t, rightSlot: r, searchSlot: n, drawerFooter: s, className: c, ...l }, m) => /* @__PURE__ */ e(
2222
2203
  "header",
2223
2204
  {
@@ -2405,15 +2386,15 @@ function gt({ title: a, links: t }) {
2405
2386
  )
2406
2387
  ] });
2407
2388
  }
2408
- const vt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...n }) => {
2389
+ const pt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...n }) => {
2409
2390
  const [s, c] = k("light");
2410
2391
  M(() => {
2411
2392
  const u = document.documentElement;
2412
2393
  c(u.getAttribute("data-theme") ?? "light");
2413
- const v = new MutationObserver(() => {
2394
+ const p = new MutationObserver(() => {
2414
2395
  c(u.getAttribute("data-theme") ?? "light");
2415
2396
  });
2416
- return v.observe(u, { attributes: !0, attributeFilter: ["data-theme"] }), () => v.disconnect();
2397
+ return p.observe(u, { attributes: !0, attributeFilter: ["data-theme"] }), () => p.disconnect();
2417
2398
  }, []);
2418
2399
  const l = a === "perabook" ? s === "dark" ? "/logos/logo_PeraBook_institucional_tarja_branca.png" : "/logos/PeraBook_instituicional.png" : s === "dark" ? "/logos/logo_elo_editora_texto_branco.png" : "/logos/logo_elo_editora_texto_azul.png", m = a === "perabook" ? "PeraBook" : "Elo Editora", f = a === "perabook" ? "Educação socioemocional e diversidade cultural" : "Literatura infantojuvenil que transforma vidas";
2419
2400
  return /* @__PURE__ */ i(
@@ -2438,10 +2419,10 @@ const vt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...
2438
2419
  }
2439
2420
  ),
2440
2421
  /* @__PURE__ */ e("p", { className: "mt-3 max-w-xs text-sm text-[var(--muted-foreground)]", children: f }),
2441
- /* @__PURE__ */ e("div", { className: "mt-6 flex flex-wrap gap-2", "aria-label": "Redes sociais", children: mt.map(({ label: u, href: v, Icon: g }) => /* @__PURE__ */ e(
2422
+ /* @__PURE__ */ e("div", { className: "mt-6 flex flex-wrap gap-2", "aria-label": "Redes sociais", children: mt.map(({ label: u, href: p, Icon: g }) => /* @__PURE__ */ e(
2442
2423
  "a",
2443
2424
  {
2444
- href: v,
2425
+ href: p,
2445
2426
  target: "_blank",
2446
2427
  rel: "noopener noreferrer",
2447
2428
  "aria-label": u,
@@ -2475,7 +2456,7 @@ const vt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...
2475
2456
  }
2476
2457
  );
2477
2458
  };
2478
- vt.displayName = "Footer";
2459
+ pt.displayName = "Footer";
2479
2460
  function aa({ children: a, className: t }) {
2480
2461
  return /* @__PURE__ */ e(
2481
2462
  "div",
@@ -2489,7 +2470,7 @@ function aa({ children: a, className: t }) {
2489
2470
  }
2490
2471
  );
2491
2472
  }
2492
- const pt = {
2473
+ const vt = {
2493
2474
  1: "col-span-1",
2494
2475
  2: "col-span-2",
2495
2476
  3: "col-span-3",
@@ -2498,7 +2479,7 @@ const pt = {
2498
2479
  6: "col-span-6"
2499
2480
  };
2500
2481
  function ra({ children: a, span: t, className: r }) {
2501
- return /* @__PURE__ */ e("div", { "data-slot": "col", className: o("min-w-0", t && pt[t], r), children: a });
2482
+ return /* @__PURE__ */ e("div", { "data-slot": "col", className: o("min-w-0", t && vt[t], r), children: a });
2502
2483
  }
2503
2484
  export {
2504
2485
  Vt as Accordion,
@@ -2509,9 +2490,9 @@ export {
2509
2490
  P as Badge,
2510
2491
  At as Breadcrumb,
2511
2492
  Et as BreadcrumbItem,
2512
- $t as BreadcrumbLink,
2493
+ Tt as BreadcrumbLink,
2513
2494
  Rt as BreadcrumbList,
2514
- Tt as BreadcrumbPage,
2495
+ $t as BreadcrumbPage,
2515
2496
  Bt as BreadcrumbSeparator,
2516
2497
  C as Button,
2517
2498
  Dt as Checkbox,
@@ -2527,7 +2508,7 @@ export {
2527
2508
  Qe as Drawer,
2528
2509
  X as EmptyState,
2529
2510
  qe as ErrorState,
2530
- vt as Footer,
2511
+ pt as Footer,
2531
2512
  Be as FormGroup,
2532
2513
  aa as Grid,
2533
2514
  Fe as Hero,
@@ -2535,14 +2516,14 @@ export {
2535
2516
  zt as Input,
2536
2517
  ct as MegaMenu,
2537
2518
  Wt as Modal,
2538
- $e as PriceDisplay,
2539
- T as ProductCard,
2519
+ Te as PriceDisplay,
2520
+ $ as ProductCard,
2540
2521
  He as ProductGrid,
2541
2522
  la as ProgressBar,
2542
- Te as QuantitySelector,
2523
+ $e as QuantitySelector,
2543
2524
  Lt as RadioGroup,
2544
2525
  _t as RadioGroupItem,
2545
- $ as Rating,
2526
+ T as Rating,
2546
2527
  Ee as SearchBar,
2547
2528
  Ct as Select,
2548
2529
  jt as SelectContent,