@grupo-elo-editorial/shared-ui-react 1.2.12 → 1.2.14
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 +93 -105
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ 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 P } from "react/jsx-runtime";
|
|
5
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 R, ChevronUpIcon as ae, CircleIcon as re, ShoppingCart as _, 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
|
|
6
|
+
import { Loader2 as V, User as ee, Star as te, CheckIcon as U, ChevronDownIcon as R, ChevronUpIcon as ae, CircleIcon as re, ShoppingCart as _, 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";
|
|
@@ -57,11 +57,11 @@ const Se = L(
|
|
|
57
57
|
children: m,
|
|
58
58
|
disabled: f,
|
|
59
59
|
...u
|
|
60
|
-
},
|
|
60
|
+
}, p) => /* @__PURE__ */ e(
|
|
61
61
|
"button",
|
|
62
62
|
{
|
|
63
63
|
className: o(Se({ variant: t, size: r, fullWidth: n, className: a })),
|
|
64
|
-
ref:
|
|
64
|
+
ref: p,
|
|
65
65
|
disabled: f || s,
|
|
66
66
|
...u,
|
|
67
67
|
children: s ? /* @__PURE__ */ i(P, { children: [
|
|
@@ -172,7 +172,7 @@ const Me = L(
|
|
|
172
172
|
}
|
|
173
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,
|
|
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)]",
|
|
@@ -189,7 +189,7 @@ const Me = L(
|
|
|
189
189
|
{
|
|
190
190
|
src: r,
|
|
191
191
|
alt: n || s || "Avatar",
|
|
192
|
-
onError: () =>
|
|
192
|
+
onError: () => p(!0),
|
|
193
193
|
className: "h-full w-full object-cover",
|
|
194
194
|
...m
|
|
195
195
|
}
|
|
@@ -285,7 +285,7 @@ const Ae = x(
|
|
|
285
285
|
}
|
|
286
286
|
);
|
|
287
287
|
Ae.displayName = "Divider";
|
|
288
|
-
const
|
|
288
|
+
const T = x(
|
|
289
289
|
({
|
|
290
290
|
className: a,
|
|
291
291
|
value: t = 0,
|
|
@@ -296,7 +296,7 @@ const $ = x(
|
|
|
296
296
|
showValue: l = !1,
|
|
297
297
|
...m
|
|
298
298
|
}, f) => {
|
|
299
|
-
const [u,
|
|
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"
|
|
@@ -320,8 +320,8 @@ const $ = x(
|
|
|
320
320
|
type: "button",
|
|
321
321
|
disabled: s,
|
|
322
322
|
onClick: () => b(h),
|
|
323
|
-
onMouseEnter: () => !s &&
|
|
324
|
-
onMouseLeave: () => !s &&
|
|
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"
|
|
@@ -347,7 +347,7 @@ const $ = x(
|
|
|
347
347
|
);
|
|
348
348
|
}
|
|
349
349
|
);
|
|
350
|
-
|
|
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
|
|
582
|
+
const $ = x(
|
|
583
583
|
({
|
|
584
584
|
className: a,
|
|
585
585
|
image: t,
|
|
@@ -591,21 +591,21 @@ const T = x(
|
|
|
591
591
|
reviewCount: m,
|
|
592
592
|
badge: f,
|
|
593
593
|
badgeVariant: u = "default",
|
|
594
|
-
isSkeleton:
|
|
594
|
+
isSkeleton: p = !1,
|
|
595
595
|
isOutOfStock: g = !1,
|
|
596
596
|
onAddToCart: b,
|
|
597
597
|
onToggleFavorite: N,
|
|
598
598
|
isFavorite: h = !1,
|
|
599
599
|
href: d,
|
|
600
|
-
orientation:
|
|
600
|
+
orientation: v = "vertical",
|
|
601
601
|
...y
|
|
602
|
-
}, j) =>
|
|
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
|
-
|
|
608
|
+
v === "horizontal" ? "flex-row gap-3" : "flex-col",
|
|
609
609
|
a
|
|
610
610
|
),
|
|
611
611
|
...y,
|
|
@@ -615,18 +615,18 @@ const T = x(
|
|
|
615
615
|
{
|
|
616
616
|
className: o(
|
|
617
617
|
"rounded-lg bg-[var(--muted)]",
|
|
618
|
-
|
|
618
|
+
v === "horizontal" ? "h-24 w-20 shrink-0" : "w-full aspect-square"
|
|
619
619
|
)
|
|
620
620
|
}
|
|
621
621
|
),
|
|
622
|
-
/* @__PURE__ */ i("div", { className: o("flex flex-col gap-2",
|
|
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
|
-
) :
|
|
629
|
+
) : v === "horizontal" ? /* @__PURE__ */ i(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
632
|
ref: j,
|
|
@@ -663,7 +663,7 @@ const T = x(
|
|
|
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(
|
|
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,
|
|
@@ -711,30 +711,18 @@ const T = x(
|
|
|
711
711
|
H,
|
|
712
712
|
{
|
|
713
713
|
href: d,
|
|
714
|
-
className: "relative block
|
|
714
|
+
className: "relative block w-full aspect-square overflow-hidden rounded-t-lg",
|
|
715
715
|
children: [
|
|
716
|
-
/* @__PURE__ */ e(
|
|
717
|
-
"div",
|
|
718
|
-
{
|
|
719
|
-
"aria-hidden": "true",
|
|
720
|
-
className: "absolute inset-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: "
|
|
721
|
+
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
734
722
|
}
|
|
735
723
|
),
|
|
736
|
-
f && /* @__PURE__ */ e("div", { className: "absolute left-3 top-3
|
|
737
|
-
g && /* @__PURE__ */ e("div", { className: "absolute inset-0
|
|
724
|
+
f && /* @__PURE__ */ e("div", { className: "absolute left-3 top-3", children: /* @__PURE__ */ e(A, { variant: u, children: f }) }),
|
|
725
|
+
g && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ e(A, { variant: "danger", size: "lg", children: "Esgotado" }) })
|
|
738
726
|
]
|
|
739
727
|
}
|
|
740
728
|
),
|
|
@@ -766,7 +754,7 @@ const T = x(
|
|
|
766
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(
|
|
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,7 +794,7 @@ const T = x(
|
|
|
806
794
|
}
|
|
807
795
|
)
|
|
808
796
|
);
|
|
809
|
-
|
|
797
|
+
$.displayName = "ProductCard";
|
|
810
798
|
const Ee = x(
|
|
811
799
|
({
|
|
812
800
|
className: a,
|
|
@@ -819,7 +807,7 @@ const Ee = x(
|
|
|
819
807
|
onChange: m,
|
|
820
808
|
...f
|
|
821
809
|
}, u) => {
|
|
822
|
-
const [
|
|
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"
|
|
@@ -828,7 +816,7 @@ const Ee = x(
|
|
|
828
816
|
l === void 0 && g(j), m == null || m(y);
|
|
829
817
|
}, d = () => {
|
|
830
818
|
l === void 0 && g(""), r == null || r();
|
|
831
|
-
},
|
|
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: [
|
|
@@ -840,7 +828,7 @@ const Ee = x(
|
|
|
840
828
|
type: "search",
|
|
841
829
|
value: b,
|
|
842
830
|
onChange: h,
|
|
843
|
-
onKeyDown:
|
|
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",
|
|
@@ -869,7 +857,7 @@ const Ee = x(
|
|
|
869
857
|
}
|
|
870
858
|
);
|
|
871
859
|
Ee.displayName = "SearchBar";
|
|
872
|
-
const
|
|
860
|
+
const Te = x(
|
|
873
861
|
({
|
|
874
862
|
className: a,
|
|
875
863
|
price: t,
|
|
@@ -880,7 +868,7 @@ const $e = x(
|
|
|
880
868
|
installments: l,
|
|
881
869
|
...m
|
|
882
870
|
}, f) => {
|
|
883
|
-
const u = r && r > t ? Math.round((r - t) / r * 100) : 0,
|
|
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 = x(
|
|
|
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)]",
|
|
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 = x(
|
|
|
932
920
|
] });
|
|
933
921
|
}
|
|
934
922
|
);
|
|
935
|
-
|
|
936
|
-
const
|
|
923
|
+
Te.displayName = "PriceDisplay";
|
|
924
|
+
const $e = x(
|
|
937
925
|
({
|
|
938
926
|
className: a,
|
|
939
927
|
value: t,
|
|
@@ -945,13 +933,13 @@ const Te = x(
|
|
|
945
933
|
showLabel: m = !1,
|
|
946
934
|
...f
|
|
947
935
|
}, u) => {
|
|
948
|
-
const
|
|
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
|
|
954
|
-
!isNaN(
|
|
941
|
+
const v = parseInt(d.target.value);
|
|
942
|
+
!isNaN(v) && v >= r && v <= n && s(v);
|
|
955
943
|
}, N = {
|
|
956
944
|
sm: "h-8 w-8",
|
|
957
945
|
md: "h-10 w-10",
|
|
@@ -1002,7 +990,7 @@ const Te = x(
|
|
|
1002
990
|
type: "button",
|
|
1003
991
|
variant: "secondary",
|
|
1004
992
|
size: "sm",
|
|
1005
|
-
onClick:
|
|
993
|
+
onClick: p,
|
|
1006
994
|
disabled: l || t >= n,
|
|
1007
995
|
className: o(N[c], "p-0"),
|
|
1008
996
|
"aria-label": "Increase quantity",
|
|
@@ -1013,7 +1001,7 @@ const Te = x(
|
|
|
1013
1001
|
] });
|
|
1014
1002
|
}
|
|
1015
1003
|
);
|
|
1016
|
-
|
|
1004
|
+
$e.displayName = "QuantitySelector";
|
|
1017
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(
|
|
@@ -1067,7 +1055,7 @@ function Et({ className: a, ...t }) {
|
|
|
1067
1055
|
}
|
|
1068
1056
|
);
|
|
1069
1057
|
}
|
|
1070
|
-
function
|
|
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
|
|
1072
|
+
function $t({ className: a, ...t }) {
|
|
1085
1073
|
return /* @__PURE__ */ e(
|
|
1086
1074
|
"span",
|
|
1087
1075
|
{
|
|
@@ -1223,7 +1211,7 @@ const Fe = x(
|
|
|
1223
1211
|
backgroundImage: m,
|
|
1224
1212
|
overlay: f = !0,
|
|
1225
1213
|
children: u,
|
|
1226
|
-
...
|
|
1214
|
+
...p
|
|
1227
1215
|
}, g) => /* @__PURE__ */ i(
|
|
1228
1216
|
"section",
|
|
1229
1217
|
{
|
|
@@ -1237,7 +1225,7 @@ const Fe = x(
|
|
|
1237
1225
|
}[t],
|
|
1238
1226
|
a
|
|
1239
1227
|
),
|
|
1240
|
-
...
|
|
1228
|
+
...p,
|
|
1241
1229
|
children: [
|
|
1242
1230
|
m && /* @__PURE__ */ i(P, { children: [
|
|
1243
1231
|
/* @__PURE__ */ e(
|
|
@@ -1456,7 +1444,7 @@ const He = x(
|
|
|
1456
1444
|
onEmptyAction: m,
|
|
1457
1445
|
...f
|
|
1458
1446
|
}, u) => {
|
|
1459
|
-
const
|
|
1447
|
+
const p = {
|
|
1460
1448
|
sm: "gap-4",
|
|
1461
1449
|
md: "gap-6",
|
|
1462
1450
|
lg: "gap-8"
|
|
@@ -1467,12 +1455,12 @@ const He = x(
|
|
|
1467
1455
|
ref: u,
|
|
1468
1456
|
className: o(
|
|
1469
1457
|
"grid grid-cols-2 lg:grid-cols-4",
|
|
1470
|
-
|
|
1458
|
+
p[n],
|
|
1471
1459
|
a
|
|
1472
1460
|
),
|
|
1473
1461
|
...f,
|
|
1474
1462
|
children: Array.from({ length: c }).map((g, b) => /* @__PURE__ */ e(
|
|
1475
|
-
|
|
1463
|
+
$,
|
|
1476
1464
|
{
|
|
1477
1465
|
image: "",
|
|
1478
1466
|
title: "",
|
|
@@ -1499,11 +1487,11 @@ const He = x(
|
|
|
1499
1487
|
ref: u,
|
|
1500
1488
|
className: o(
|
|
1501
1489
|
"grid grid-cols-2 lg:grid-cols-4",
|
|
1502
|
-
|
|
1490
|
+
p[n],
|
|
1503
1491
|
a
|
|
1504
1492
|
),
|
|
1505
1493
|
...f,
|
|
1506
|
-
children: t.map((g, b) => /* @__PURE__ */ e(
|
|
1494
|
+
children: t.map((g, b) => /* @__PURE__ */ e($, { ...g }, b))
|
|
1507
1495
|
}
|
|
1508
1496
|
);
|
|
1509
1497
|
}
|
|
@@ -1741,20 +1729,20 @@ function et({ children: a, as: t = "div", className: r }) {
|
|
|
1741
1729
|
}
|
|
1742
1730
|
const tt = x(
|
|
1743
1731
|
({ className: a, onThemeChange: t, onFontSizeChange: r, showA11yLink: n = !1, ...s }, c) => {
|
|
1744
|
-
const [l, m] = k("light"), [f, u] = k(16), [
|
|
1732
|
+
const [l, m] = k("light"), [f, u] = k(16), [p, g] = k(!1);
|
|
1745
1733
|
M(() => {
|
|
1746
|
-
const
|
|
1747
|
-
m(
|
|
1734
|
+
const v = localStorage.getItem("a11y-theme") ?? document.documentElement.getAttribute("data-theme") ?? "light";
|
|
1735
|
+
m(v);
|
|
1748
1736
|
const y = Number(localStorage.getItem("a11y-font-size"));
|
|
1749
1737
|
Number.isFinite(y) && y > 0 && u(y);
|
|
1750
1738
|
}, []), M(() => {
|
|
1751
|
-
if (!
|
|
1752
|
-
const
|
|
1753
|
-
|
|
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 = () => {
|
|
1754
1742
|
g(!0), window.VLibras && new window.VLibras.Widget("https://vlibras.gov.br/app");
|
|
1755
|
-
}, document.body.appendChild(
|
|
1743
|
+
}, document.body.appendChild(v);
|
|
1756
1744
|
}
|
|
1757
|
-
}, [
|
|
1745
|
+
}, [p]);
|
|
1758
1746
|
const b = () => {
|
|
1759
1747
|
const d = l === "light" ? "dark" : "light";
|
|
1760
1748
|
m(d), document.documentElement.setAttribute("data-theme", d), localStorage.setItem("a11y-theme", d), t == null || t(d);
|
|
@@ -1819,7 +1807,7 @@ const tt = x(
|
|
|
1819
1807
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
|
|
1820
1808
|
"disabled:opacity-40 disabled:cursor-not-allowed"
|
|
1821
1809
|
),
|
|
1822
|
-
children: /* @__PURE__ */ e(
|
|
1810
|
+
children: /* @__PURE__ */ e(pe, { className: "h-4 w-4" })
|
|
1823
1811
|
}
|
|
1824
1812
|
)
|
|
1825
1813
|
] }),
|
|
@@ -1833,7 +1821,7 @@ const tt = x(
|
|
|
1833
1821
|
"p-2 rounded-md transition-colors text-[var(--muted-foreground)] hover:bg-[var(--muted)]",
|
|
1834
1822
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
|
|
1835
1823
|
),
|
|
1836
|
-
children: l === "light" ? /* @__PURE__ */ e(
|
|
1824
|
+
children: l === "light" ? /* @__PURE__ */ e(ve, { className: "h-4 w-4" }) : /* @__PURE__ */ e(be, { className: "h-4 w-4" })
|
|
1837
1825
|
}
|
|
1838
1826
|
),
|
|
1839
1827
|
/* @__PURE__ */ e(
|
|
@@ -1842,15 +1830,15 @@ const tt = x(
|
|
|
1842
1830
|
type: "button",
|
|
1843
1831
|
onClick: () => g((d) => !d),
|
|
1844
1832
|
"aria-label": "Ativar VLibras",
|
|
1845
|
-
"aria-pressed":
|
|
1833
|
+
"aria-pressed": p,
|
|
1846
1834
|
className: o(
|
|
1847
1835
|
"px-3 py-1 text-xs font-medium rounded-md transition-colors",
|
|
1848
1836
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
|
|
1849
1837
|
),
|
|
1850
1838
|
style: {
|
|
1851
|
-
backgroundColor:
|
|
1852
|
-
color:
|
|
1853
|
-
border:
|
|
1839
|
+
backgroundColor: p ? "var(--primary)" : "transparent",
|
|
1840
|
+
color: p ? "var(--primary-foreground)" : "var(--muted-foreground)",
|
|
1841
|
+
border: p ? "none" : "1px solid var(--border)"
|
|
1854
1842
|
},
|
|
1855
1843
|
children: "VLibras"
|
|
1856
1844
|
}
|
|
@@ -1870,21 +1858,21 @@ const at = x(
|
|
|
1870
1858
|
autoplay: n = !0,
|
|
1871
1859
|
...s
|
|
1872
1860
|
}, c) => {
|
|
1873
|
-
const [l, m] = k(0), [f, u] = k(!1), [
|
|
1861
|
+
const [l, m] = k(0), [f, u] = k(!1), [p, g] = k(!1);
|
|
1874
1862
|
M(() => {
|
|
1875
1863
|
const d = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
1876
1864
|
g(d.matches);
|
|
1877
|
-
const
|
|
1865
|
+
const v = (y) => {
|
|
1878
1866
|
g(y.matches);
|
|
1879
1867
|
};
|
|
1880
|
-
return d.addEventListener("change",
|
|
1868
|
+
return d.addEventListener("change", v), () => d.removeEventListener("change", v);
|
|
1881
1869
|
}, []), M(() => {
|
|
1882
|
-
if (!n || f ||
|
|
1870
|
+
if (!n || f || p) return;
|
|
1883
1871
|
const d = setInterval(() => {
|
|
1884
|
-
m((
|
|
1872
|
+
m((v) => (v + 1) % t.length);
|
|
1885
1873
|
}, r);
|
|
1886
1874
|
return () => clearInterval(d);
|
|
1887
|
-
}, [n, r, t.length, f,
|
|
1875
|
+
}, [n, r, t.length, f, p]);
|
|
1888
1876
|
const b = (d) => {
|
|
1889
1877
|
m(d), u(!0), setTimeout(() => u(!1), r);
|
|
1890
1878
|
}, N = () => {
|
|
@@ -1901,14 +1889,14 @@ const at = x(
|
|
|
1901
1889
|
onMouseLeave: () => u(!1),
|
|
1902
1890
|
...s,
|
|
1903
1891
|
children: [
|
|
1904
|
-
/* @__PURE__ */ e("div", { className: "relative", children: t.map((d,
|
|
1892
|
+
/* @__PURE__ */ e("div", { className: "relative", children: t.map((d, v) => /* @__PURE__ */ i(
|
|
1905
1893
|
"div",
|
|
1906
1894
|
{
|
|
1907
1895
|
className: o(
|
|
1908
1896
|
"w-full transition-opacity duration-700",
|
|
1909
|
-
|
|
1897
|
+
v === l ? "block" : "hidden"
|
|
1910
1898
|
),
|
|
1911
|
-
"aria-hidden":
|
|
1899
|
+
"aria-hidden": v !== l,
|
|
1912
1900
|
children: [
|
|
1913
1901
|
/* @__PURE__ */ i("picture", { children: [
|
|
1914
1902
|
/* @__PURE__ */ e(
|
|
@@ -1932,7 +1920,7 @@ const at = x(
|
|
|
1932
1920
|
srcSet: `${d.imageMobile} 1x, ${d.imageMobile.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`,
|
|
1933
1921
|
alt: d.title,
|
|
1934
1922
|
className: "w-full object-cover aspect-3/2 md:aspect-video lg:aspect-1920/560",
|
|
1935
|
-
loading:
|
|
1923
|
+
loading: v === 0 ? "eager" : "lazy"
|
|
1936
1924
|
}
|
|
1937
1925
|
)
|
|
1938
1926
|
] }),
|
|
@@ -1972,18 +1960,18 @@ const at = x(
|
|
|
1972
1960
|
}
|
|
1973
1961
|
)
|
|
1974
1962
|
] }),
|
|
1975
|
-
t.length > 1 && /* @__PURE__ */ e("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: t.map((d,
|
|
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(
|
|
1976
1964
|
"button",
|
|
1977
1965
|
{
|
|
1978
|
-
onClick: () => b(
|
|
1966
|
+
onClick: () => b(v),
|
|
1979
1967
|
className: o(
|
|
1980
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",
|
|
1981
|
-
|
|
1969
|
+
v === l ? "w-8 bg-white" : "w-2 bg-white/50 hover:bg-white/70"
|
|
1982
1970
|
),
|
|
1983
|
-
"aria-label": `Ir para slide ${
|
|
1984
|
-
"aria-current":
|
|
1971
|
+
"aria-label": `Ir para slide ${v + 1}`,
|
|
1972
|
+
"aria-current": v === l
|
|
1985
1973
|
},
|
|
1986
|
-
|
|
1974
|
+
v
|
|
1987
1975
|
)) })
|
|
1988
1976
|
]
|
|
1989
1977
|
}
|
|
@@ -2340,7 +2328,7 @@ function ft({ onSubmit: a }) {
|
|
|
2340
2328
|
value: t,
|
|
2341
2329
|
onChange: (l) => r(l.target.value),
|
|
2342
2330
|
placeholder: "Seu melhor e-mail",
|
|
2343
|
-
className: "min-h-[44px] flex-1 rounded-lg px-4 text-sm text-[#1a1e2e] placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-white"
|
|
2331
|
+
className: "min-h-[44px] flex-1 rounded-lg border border-white px-4 text-sm text-[#1a1e2e] placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-white"
|
|
2344
2332
|
}
|
|
2345
2333
|
),
|
|
2346
2334
|
/* @__PURE__ */ e(
|
|
@@ -2398,15 +2386,15 @@ function gt({ title: a, links: t }) {
|
|
|
2398
2386
|
)
|
|
2399
2387
|
] });
|
|
2400
2388
|
}
|
|
2401
|
-
const
|
|
2389
|
+
const pt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...n }) => {
|
|
2402
2390
|
const [s, c] = k("light");
|
|
2403
2391
|
M(() => {
|
|
2404
2392
|
const u = document.documentElement;
|
|
2405
2393
|
c(u.getAttribute("data-theme") ?? "light");
|
|
2406
|
-
const
|
|
2394
|
+
const p = new MutationObserver(() => {
|
|
2407
2395
|
c(u.getAttribute("data-theme") ?? "light");
|
|
2408
2396
|
});
|
|
2409
|
-
return
|
|
2397
|
+
return p.observe(u, { attributes: !0, attributeFilter: ["data-theme"] }), () => p.disconnect();
|
|
2410
2398
|
}, []);
|
|
2411
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_institucional.png", m = a === "perabook" ? "PeraBook" : "Elo Editora", f = a === "perabook" ? "Educação socioemocional e diversidade cultural" : "Literatura infantojuvenil que transforma vidas";
|
|
2412
2400
|
return /* @__PURE__ */ i(
|
|
@@ -2431,10 +2419,10 @@ const vt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...
|
|
|
2431
2419
|
}
|
|
2432
2420
|
),
|
|
2433
2421
|
/* @__PURE__ */ e("p", { className: "mt-3 max-w-xs text-sm text-[var(--muted-foreground)]", children: f }),
|
|
2434
|
-
/* @__PURE__ */ e("div", { className: "mt-6 flex flex-wrap gap-2", "aria-label": "Redes sociais", children: mt.map(({ label: u, href:
|
|
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(
|
|
2435
2423
|
"a",
|
|
2436
2424
|
{
|
|
2437
|
-
href:
|
|
2425
|
+
href: p,
|
|
2438
2426
|
target: "_blank",
|
|
2439
2427
|
rel: "noopener noreferrer",
|
|
2440
2428
|
"aria-label": u,
|
|
@@ -2468,7 +2456,7 @@ const vt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...
|
|
|
2468
2456
|
}
|
|
2469
2457
|
);
|
|
2470
2458
|
};
|
|
2471
|
-
|
|
2459
|
+
pt.displayName = "Footer";
|
|
2472
2460
|
function aa({ children: a, className: t }) {
|
|
2473
2461
|
return /* @__PURE__ */ e(
|
|
2474
2462
|
"div",
|
|
@@ -2482,7 +2470,7 @@ function aa({ children: a, className: t }) {
|
|
|
2482
2470
|
}
|
|
2483
2471
|
);
|
|
2484
2472
|
}
|
|
2485
|
-
const
|
|
2473
|
+
const vt = {
|
|
2486
2474
|
1: "col-span-1",
|
|
2487
2475
|
2: "col-span-2",
|
|
2488
2476
|
3: "col-span-3",
|
|
@@ -2491,7 +2479,7 @@ const pt = {
|
|
|
2491
2479
|
6: "col-span-6"
|
|
2492
2480
|
};
|
|
2493
2481
|
function ra({ children: a, span: t, className: r }) {
|
|
2494
|
-
return /* @__PURE__ */ e("div", { "data-slot": "col", className: o("min-w-0", t &&
|
|
2482
|
+
return /* @__PURE__ */ e("div", { "data-slot": "col", className: o("min-w-0", t && vt[t], r), children: a });
|
|
2495
2483
|
}
|
|
2496
2484
|
export {
|
|
2497
2485
|
Vt as Accordion,
|
|
@@ -2502,9 +2490,9 @@ export {
|
|
|
2502
2490
|
A as Badge,
|
|
2503
2491
|
Rt as Breadcrumb,
|
|
2504
2492
|
Et as BreadcrumbItem,
|
|
2505
|
-
|
|
2493
|
+
Tt as BreadcrumbLink,
|
|
2506
2494
|
_t as BreadcrumbList,
|
|
2507
|
-
|
|
2495
|
+
$t as BreadcrumbPage,
|
|
2508
2496
|
Bt as BreadcrumbSeparator,
|
|
2509
2497
|
C as Button,
|
|
2510
2498
|
Dt as Checkbox,
|
|
@@ -2520,7 +2508,7 @@ export {
|
|
|
2520
2508
|
Qe as Drawer,
|
|
2521
2509
|
X as EmptyState,
|
|
2522
2510
|
qe as ErrorState,
|
|
2523
|
-
|
|
2511
|
+
pt as Footer,
|
|
2524
2512
|
Be as FormGroup,
|
|
2525
2513
|
aa as Grid,
|
|
2526
2514
|
Fe as Hero,
|
|
@@ -2528,14 +2516,14 @@ export {
|
|
|
2528
2516
|
zt as Input,
|
|
2529
2517
|
ct as MegaMenu,
|
|
2530
2518
|
Wt as Modal,
|
|
2531
|
-
|
|
2532
|
-
|
|
2519
|
+
Te as PriceDisplay,
|
|
2520
|
+
$ as ProductCard,
|
|
2533
2521
|
He as ProductGrid,
|
|
2534
2522
|
la as ProgressBar,
|
|
2535
|
-
|
|
2523
|
+
$e as QuantitySelector,
|
|
2536
2524
|
Lt as RadioGroup,
|
|
2537
2525
|
Pt as RadioGroupItem,
|
|
2538
|
-
|
|
2526
|
+
T as Rating,
|
|
2539
2527
|
Ee as SearchBar,
|
|
2540
2528
|
Ct as Select,
|
|
2541
2529
|
jt as SelectContent,
|