@grupo-elo-editorial/shared-ui-react 1.2.2 → 1.2.3
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/CHANGELOG.md +12 -0
- package/dist/components/prd/HeroCarousel.d.ts +2 -0
- package/dist/index.js +124 -110
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) · Versioning:
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [1.2.3] — 2026-05-25 (HeroCarousel — overlay de texto configurável por slide)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`HeroSlide.showOverlay`** (`boolean`, default `false`): quando `true`, renderiza um overlay gradiente sobre a imagem com `title`, `description` e `cta` do slide. Permite que banners com imagem neutra exibam texto dinâmico; banners com artwork que já contém o texto continuam com `showOverlay: false` (comportamento padrão inalterado).
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- `package.json` `version` bumped `1.2.2 → 1.2.3`.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
7
19
|
## [1.2.2] — 2026-05-25 (HeroCarousel — remove text overlay)
|
|
8
20
|
|
|
9
21
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ const Se = P(
|
|
|
52
52
|
size: r,
|
|
53
53
|
fullWidth: n,
|
|
54
54
|
isLoading: s,
|
|
55
|
-
leftIcon:
|
|
55
|
+
leftIcon: c,
|
|
56
56
|
rightIcon: l,
|
|
57
57
|
children: m,
|
|
58
58
|
disabled: f,
|
|
@@ -68,7 +68,7 @@ const Se = P(
|
|
|
68
68
|
/* @__PURE__ */ e(V, { className: "h-4 w-4 animate-spin" }),
|
|
69
69
|
m && /* @__PURE__ */ e("span", { children: m })
|
|
70
70
|
] }) : /* @__PURE__ */ i(A, { children: [
|
|
71
|
-
|
|
71
|
+
c && /* @__PURE__ */ e("span", { className: "inline-flex", children: c }),
|
|
72
72
|
m,
|
|
73
73
|
l && /* @__PURE__ */ e("span", { className: "inline-flex", children: l })
|
|
74
74
|
] })
|
|
@@ -132,7 +132,7 @@ const je = P(
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
), D = N(
|
|
135
|
-
({ className: a, variant: t, size: r, icon: n, onRemove: s, children:
|
|
135
|
+
({ className: a, variant: t, size: r, icon: n, onRemove: s, children: c, ...l }, m) => /* @__PURE__ */ i(
|
|
136
136
|
"div",
|
|
137
137
|
{
|
|
138
138
|
ref: m,
|
|
@@ -140,7 +140,7 @@ const je = P(
|
|
|
140
140
|
...l,
|
|
141
141
|
children: [
|
|
142
142
|
n && /* @__PURE__ */ e("span", { className: "mr-1 inline-flex", children: n }),
|
|
143
|
-
|
|
143
|
+
c,
|
|
144
144
|
s && /* @__PURE__ */ e(
|
|
145
145
|
"button",
|
|
146
146
|
{
|
|
@@ -171,8 +171,8 @@ const Me = P(
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
), _e = N(
|
|
174
|
-
({ className: a, size: t, src: r, alt: n, name: s, showStatus:
|
|
175
|
-
const [u, v] = k(!1), g = (x) => x.split(" ").map((
|
|
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 = {
|
|
176
176
|
online: "bg-[var(--success)]",
|
|
177
177
|
offline: "bg-[var(--muted-foreground)]",
|
|
178
178
|
away: "bg-[var(--warning)]",
|
|
@@ -194,7 +194,7 @@ const Me = P(
|
|
|
194
194
|
...m
|
|
195
195
|
}
|
|
196
196
|
) : s ? /* @__PURE__ */ e("span", { className: "font-medium", children: g(s) }) : /* @__PURE__ */ e(ee, { className: "h-1/2 w-1/2" }),
|
|
197
|
-
|
|
197
|
+
c && /* @__PURE__ */ e(
|
|
198
198
|
"span",
|
|
199
199
|
{
|
|
200
200
|
className: o(
|
|
@@ -239,7 +239,7 @@ const Pe = P("animate-spin text-[var(--brand-primary)]", {
|
|
|
239
239
|
);
|
|
240
240
|
Ae.displayName = "Spinner";
|
|
241
241
|
const De = N(
|
|
242
|
-
({ className: a, orientation: t = "horizontal", variant: r = "solid", text: n, ...s },
|
|
242
|
+
({ className: a, orientation: t = "horizontal", variant: r = "solid", text: n, ...s }, c) => {
|
|
243
243
|
const l = {
|
|
244
244
|
solid: "border-solid",
|
|
245
245
|
dashed: "border-dashed",
|
|
@@ -249,7 +249,7 @@ const De = N(
|
|
|
249
249
|
/* @__PURE__ */ e(
|
|
250
250
|
"hr",
|
|
251
251
|
{
|
|
252
|
-
ref:
|
|
252
|
+
ref: c,
|
|
253
253
|
className: o(
|
|
254
254
|
"flex-1 border-[var(--border)]",
|
|
255
255
|
l[r]
|
|
@@ -270,7 +270,7 @@ const De = N(
|
|
|
270
270
|
] }) : /* @__PURE__ */ e(
|
|
271
271
|
"hr",
|
|
272
272
|
{
|
|
273
|
-
ref:
|
|
273
|
+
ref: c,
|
|
274
274
|
role: "separator",
|
|
275
275
|
"aria-orientation": t,
|
|
276
276
|
className: o(
|
|
@@ -292,7 +292,7 @@ const $ = N(
|
|
|
292
292
|
maxRating: r = 5,
|
|
293
293
|
size: n = "md",
|
|
294
294
|
readonly: s = !1,
|
|
295
|
-
onChange:
|
|
295
|
+
onChange: c,
|
|
296
296
|
showValue: l = !1,
|
|
297
297
|
...m
|
|
298
298
|
}, f) => {
|
|
@@ -301,7 +301,7 @@ const $ = N(
|
|
|
301
301
|
md: "h-5 w-5",
|
|
302
302
|
lg: "h-6 w-6"
|
|
303
303
|
}, b = (x) => {
|
|
304
|
-
!s &&
|
|
304
|
+
!s && c && c(x);
|
|
305
305
|
}, h = u || t;
|
|
306
306
|
return /* @__PURE__ */ i(
|
|
307
307
|
"div",
|
|
@@ -312,8 +312,8 @@ 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,
|
|
316
|
-
const
|
|
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;
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
"button",
|
|
319
319
|
{
|
|
@@ -333,7 +333,7 @@ const $ = N(
|
|
|
333
333
|
className: o(
|
|
334
334
|
g[n],
|
|
335
335
|
"transition-all",
|
|
336
|
-
|
|
336
|
+
d ? "fill-[var(--warning)] text-[var(--warning)]" : "fill-none text-[var(--muted-foreground)]"
|
|
337
337
|
)
|
|
338
338
|
}
|
|
339
339
|
)
|
|
@@ -586,7 +586,7 @@ const R = N(
|
|
|
586
586
|
title: r,
|
|
587
587
|
author: n,
|
|
588
588
|
price: s,
|
|
589
|
-
originalPrice:
|
|
589
|
+
originalPrice: c,
|
|
590
590
|
rating: l,
|
|
591
591
|
reviewCount: m,
|
|
592
592
|
badge: f,
|
|
@@ -596,7 +596,7 @@ const R = N(
|
|
|
596
596
|
onAddToCart: b,
|
|
597
597
|
onToggleFavorite: h,
|
|
598
598
|
isFavorite: x = !1,
|
|
599
|
-
href:
|
|
599
|
+
href: d,
|
|
600
600
|
orientation: p = "vertical",
|
|
601
601
|
...y
|
|
602
602
|
}, j) => v ? /* @__PURE__ */ i(
|
|
@@ -640,7 +640,7 @@ const R = N(
|
|
|
640
640
|
/* @__PURE__ */ e(
|
|
641
641
|
H,
|
|
642
642
|
{
|
|
643
|
-
href:
|
|
643
|
+
href: d,
|
|
644
644
|
className: "block h-24 w-20 shrink-0 overflow-hidden rounded-lg",
|
|
645
645
|
children: /* @__PURE__ */ e(
|
|
646
646
|
"img",
|
|
@@ -653,10 +653,10 @@ const R = N(
|
|
|
653
653
|
}
|
|
654
654
|
),
|
|
655
655
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
656
|
-
|
|
656
|
+
d ? /* @__PURE__ */ e(
|
|
657
657
|
"a",
|
|
658
658
|
{
|
|
659
|
-
href:
|
|
659
|
+
href: d,
|
|
660
660
|
className: "line-clamp-2 text-sm 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",
|
|
661
661
|
children: r
|
|
662
662
|
}
|
|
@@ -675,9 +675,9 @@ const R = N(
|
|
|
675
675
|
"R$ ",
|
|
676
676
|
s.toFixed(2)
|
|
677
677
|
] }),
|
|
678
|
-
|
|
678
|
+
c && c > s && /* @__PURE__ */ i("span", { className: "text-xs text-[var(--muted-foreground)] line-through", children: [
|
|
679
679
|
"R$ ",
|
|
680
|
-
|
|
680
|
+
c.toFixed(2)
|
|
681
681
|
] })
|
|
682
682
|
] }),
|
|
683
683
|
b && /* @__PURE__ */ e(
|
|
@@ -710,7 +710,7 @@ const R = N(
|
|
|
710
710
|
/* @__PURE__ */ i(
|
|
711
711
|
H,
|
|
712
712
|
{
|
|
713
|
-
href:
|
|
713
|
+
href: d,
|
|
714
714
|
className: "relative block aspect-[3/4] w-full overflow-hidden rounded-t-lg",
|
|
715
715
|
children: [
|
|
716
716
|
/* @__PURE__ */ e(
|
|
@@ -744,10 +744,10 @@ const R = N(
|
|
|
744
744
|
}
|
|
745
745
|
),
|
|
746
746
|
/* @__PURE__ */ i("div", { className: "flex flex-1 flex-col p-4", children: [
|
|
747
|
-
|
|
747
|
+
d ? /* @__PURE__ */ e(
|
|
748
748
|
"a",
|
|
749
749
|
{
|
|
750
|
-
href:
|
|
750
|
+
href: d,
|
|
751
751
|
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",
|
|
752
752
|
children: r
|
|
753
753
|
}
|
|
@@ -766,9 +766,9 @@ const R = N(
|
|
|
766
766
|
"R$ ",
|
|
767
767
|
s.toFixed(2)
|
|
768
768
|
] }),
|
|
769
|
-
|
|
769
|
+
c && c > s && /* @__PURE__ */ i("span", { className: "text-sm text-[var(--muted-foreground)] line-through", children: [
|
|
770
770
|
"R$ ",
|
|
771
|
-
|
|
771
|
+
c.toFixed(2)
|
|
772
772
|
] })
|
|
773
773
|
] }),
|
|
774
774
|
b && /* @__PURE__ */ e(
|
|
@@ -802,7 +802,7 @@ const Te = N(
|
|
|
802
802
|
onClear: r,
|
|
803
803
|
isLoading: n = !1,
|
|
804
804
|
size: s = "md",
|
|
805
|
-
placeholder:
|
|
805
|
+
placeholder: c = "Buscar...",
|
|
806
806
|
value: l,
|
|
807
807
|
onChange: m,
|
|
808
808
|
...f
|
|
@@ -814,7 +814,7 @@ const Te = N(
|
|
|
814
814
|
}, x = (y) => {
|
|
815
815
|
const j = y.target.value;
|
|
816
816
|
l === void 0 && g(j), m == null || m(y);
|
|
817
|
-
},
|
|
817
|
+
}, d = () => {
|
|
818
818
|
l === void 0 && g(""), r == null || r();
|
|
819
819
|
}, p = (y) => {
|
|
820
820
|
y.key === "Enter" && t && t(b);
|
|
@@ -829,7 +829,7 @@ const Te = N(
|
|
|
829
829
|
value: b,
|
|
830
830
|
onChange: x,
|
|
831
831
|
onKeyDown: p,
|
|
832
|
-
placeholder:
|
|
832
|
+
placeholder: c,
|
|
833
833
|
className: o(
|
|
834
834
|
"w-full rounded-lg border-2 border-[var(--border)] bg-[var(--input-background)] pl-10 pr-10 font-normal transition-colors",
|
|
835
835
|
"placeholder:text-[var(--muted-foreground)]",
|
|
@@ -846,7 +846,7 @@ const Te = N(
|
|
|
846
846
|
"button",
|
|
847
847
|
{
|
|
848
848
|
type: "button",
|
|
849
|
-
onClick:
|
|
849
|
+
onClick: d,
|
|
850
850
|
className: "rounded-full p-1 hover:bg-[var(--muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
|
|
851
851
|
"aria-label": "Clear search",
|
|
852
852
|
children: /* @__PURE__ */ e(ie, { className: "h-4 w-4 text-[var(--muted-foreground)]" })
|
|
@@ -864,7 +864,7 @@ const $e = N(
|
|
|
864
864
|
originalPrice: r,
|
|
865
865
|
currency: n = "R$",
|
|
866
866
|
size: s = "md",
|
|
867
|
-
showDiscount:
|
|
867
|
+
showDiscount: c = !0,
|
|
868
868
|
installments: l,
|
|
869
869
|
...m
|
|
870
870
|
}, f) => {
|
|
@@ -902,7 +902,7 @@ const $e = N(
|
|
|
902
902
|
}
|
|
903
903
|
)
|
|
904
904
|
] }),
|
|
905
|
-
|
|
905
|
+
c && u > 0 && /* @__PURE__ */ i(D, { variant: "success", size: "sm", children: [
|
|
906
906
|
"-",
|
|
907
907
|
u,
|
|
908
908
|
"%"
|
|
@@ -928,7 +928,7 @@ const Re = N(
|
|
|
928
928
|
min: r = 1,
|
|
929
929
|
max: n = 99,
|
|
930
930
|
onChange: s,
|
|
931
|
-
size:
|
|
931
|
+
size: c = "md",
|
|
932
932
|
disabled: l = !1,
|
|
933
933
|
showLabel: m = !1,
|
|
934
934
|
...f
|
|
@@ -937,8 +937,8 @@ const Re = N(
|
|
|
937
937
|
t < n && s(t + 1);
|
|
938
938
|
}, g = () => {
|
|
939
939
|
t > r && s(t - 1);
|
|
940
|
-
}, b = (
|
|
941
|
-
const p = parseInt(
|
|
940
|
+
}, b = (d) => {
|
|
941
|
+
const p = parseInt(d.target.value);
|
|
942
942
|
!isNaN(p) && p >= r && p <= n && s(p);
|
|
943
943
|
}, h = {
|
|
944
944
|
sm: "h-8 w-8",
|
|
@@ -960,7 +960,7 @@ const Re = N(
|
|
|
960
960
|
size: "sm",
|
|
961
961
|
onClick: g,
|
|
962
962
|
disabled: l || t <= r,
|
|
963
|
-
className: o(h[
|
|
963
|
+
className: o(h[c], "p-0"),
|
|
964
964
|
"aria-label": "Decrease quantity",
|
|
965
965
|
children: /* @__PURE__ */ e(ne, { className: "h-4 w-4" })
|
|
966
966
|
}
|
|
@@ -979,7 +979,7 @@ const Re = N(
|
|
|
979
979
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
980
980
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
981
981
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
982
|
-
x[
|
|
982
|
+
x[c]
|
|
983
983
|
),
|
|
984
984
|
"aria-label": "Quantity"
|
|
985
985
|
}
|
|
@@ -992,7 +992,7 @@ const Re = N(
|
|
|
992
992
|
size: "sm",
|
|
993
993
|
onClick: v,
|
|
994
994
|
disabled: l || t >= n,
|
|
995
|
-
className: o(h[
|
|
995
|
+
className: o(h[c], "p-0"),
|
|
996
996
|
"aria-label": "Increase quantity",
|
|
997
997
|
children: /* @__PURE__ */ e(se, { className: "h-4 w-4" })
|
|
998
998
|
}
|
|
@@ -1003,7 +1003,7 @@ const Re = N(
|
|
|
1003
1003
|
);
|
|
1004
1004
|
Re.displayName = "QuantitySelector";
|
|
1005
1005
|
const Be = N(
|
|
1006
|
-
({ className: a, label: t, htmlFor: r, required: n, error: s, helperText:
|
|
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: [
|
|
1007
1007
|
t && /* @__PURE__ */ i(
|
|
1008
1008
|
"label",
|
|
1009
1009
|
{
|
|
@@ -1016,14 +1016,14 @@ const Be = N(
|
|
|
1016
1016
|
}
|
|
1017
1017
|
),
|
|
1018
1018
|
l,
|
|
1019
|
-
(s ||
|
|
1019
|
+
(s || c) && /* @__PURE__ */ e(
|
|
1020
1020
|
"p",
|
|
1021
1021
|
{
|
|
1022
1022
|
className: o(
|
|
1023
1023
|
"text-sm",
|
|
1024
1024
|
s ? "text-[var(--destructive)]" : "text-[var(--muted-foreground)]"
|
|
1025
1025
|
),
|
|
1026
|
-
children: s ||
|
|
1026
|
+
children: s || c
|
|
1027
1027
|
}
|
|
1028
1028
|
)
|
|
1029
1029
|
] })
|
|
@@ -1206,7 +1206,7 @@ const Fe = N(
|
|
|
1206
1206
|
title: r,
|
|
1207
1207
|
subtitle: n,
|
|
1208
1208
|
description: s,
|
|
1209
|
-
primaryCTA:
|
|
1209
|
+
primaryCTA: c,
|
|
1210
1210
|
secondaryCTA: l,
|
|
1211
1211
|
backgroundImage: m,
|
|
1212
1212
|
overlay: f = !0,
|
|
@@ -1276,14 +1276,14 @@ const Fe = N(
|
|
|
1276
1276
|
children: s
|
|
1277
1277
|
}
|
|
1278
1278
|
),
|
|
1279
|
-
(
|
|
1280
|
-
|
|
1279
|
+
(c || l) && /* @__PURE__ */ i("div", { className: "mt-8 flex flex-wrap gap-4", children: [
|
|
1280
|
+
c && /* @__PURE__ */ e(
|
|
1281
1281
|
C,
|
|
1282
1282
|
{
|
|
1283
1283
|
size: "lg",
|
|
1284
|
-
onClick:
|
|
1284
|
+
onClick: c.onClick,
|
|
1285
1285
|
variant: "primary",
|
|
1286
|
-
children:
|
|
1286
|
+
children: c.label
|
|
1287
1287
|
}
|
|
1288
1288
|
),
|
|
1289
1289
|
l && /* @__PURE__ */ e(
|
|
@@ -1314,7 +1314,7 @@ const X = N(
|
|
|
1314
1314
|
icon: r,
|
|
1315
1315
|
title: n,
|
|
1316
1316
|
description: s,
|
|
1317
|
-
action:
|
|
1317
|
+
action: c,
|
|
1318
1318
|
...l
|
|
1319
1319
|
}, m) => {
|
|
1320
1320
|
const u = r || {
|
|
@@ -1336,14 +1336,14 @@ const X = N(
|
|
|
1336
1336
|
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--muted)] p-6 text-[var(--muted-foreground)]", children: u }),
|
|
1337
1337
|
/* @__PURE__ */ e("h3", { className: "mt-6 text-xl font-semibold text-[var(--foreground)]", children: n }),
|
|
1338
1338
|
s && /* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: s }),
|
|
1339
|
-
|
|
1339
|
+
c && /* @__PURE__ */ e(
|
|
1340
1340
|
C,
|
|
1341
1341
|
{
|
|
1342
|
-
onClick:
|
|
1342
|
+
onClick: c.onClick,
|
|
1343
1343
|
variant: "primary",
|
|
1344
1344
|
size: "lg",
|
|
1345
1345
|
className: "mt-6",
|
|
1346
|
-
children:
|
|
1346
|
+
children: c.label
|
|
1347
1347
|
}
|
|
1348
1348
|
)
|
|
1349
1349
|
]
|
|
@@ -1359,7 +1359,7 @@ const qe = N(
|
|
|
1359
1359
|
title: r,
|
|
1360
1360
|
message: n,
|
|
1361
1361
|
onRetry: s,
|
|
1362
|
-
onGoHome:
|
|
1362
|
+
onGoHome: c,
|
|
1363
1363
|
showRetry: l = !0,
|
|
1364
1364
|
showHome: m = !0,
|
|
1365
1365
|
...f
|
|
@@ -1415,10 +1415,10 @@ const qe = N(
|
|
|
1415
1415
|
children: "Tentar novamente"
|
|
1416
1416
|
}
|
|
1417
1417
|
),
|
|
1418
|
-
m &&
|
|
1418
|
+
m && c && /* @__PURE__ */ e(
|
|
1419
1419
|
C,
|
|
1420
1420
|
{
|
|
1421
|
-
onClick:
|
|
1421
|
+
onClick: c,
|
|
1422
1422
|
variant: "secondary",
|
|
1423
1423
|
size: "lg",
|
|
1424
1424
|
leftIcon: /* @__PURE__ */ e(me, { className: "h-5 w-5" }),
|
|
@@ -1439,7 +1439,7 @@ const He = N(
|
|
|
1439
1439
|
columns: r = 4,
|
|
1440
1440
|
gap: n = "md",
|
|
1441
1441
|
isLoading: s = !1,
|
|
1442
|
-
skeletonCount:
|
|
1442
|
+
skeletonCount: c = 8,
|
|
1443
1443
|
emptyStateMessage: l = "Nenhum produto encontrado",
|
|
1444
1444
|
onEmptyAction: m,
|
|
1445
1445
|
...f
|
|
@@ -1465,7 +1465,7 @@ const He = N(
|
|
|
1465
1465
|
a
|
|
1466
1466
|
),
|
|
1467
1467
|
...f,
|
|
1468
|
-
children: Array.from({ length:
|
|
1468
|
+
children: Array.from({ length: c }).map((b, h) => /* @__PURE__ */ e(
|
|
1469
1469
|
R,
|
|
1470
1470
|
{
|
|
1471
1471
|
image: "",
|
|
@@ -1724,7 +1724,7 @@ function ea({
|
|
|
1724
1724
|
);
|
|
1725
1725
|
}
|
|
1726
1726
|
const et = N(
|
|
1727
|
-
({ className: a, onThemeChange: t, onFontSizeChange: r, showA11yLink: n = !1, ...s },
|
|
1727
|
+
({ className: a, onThemeChange: t, onFontSizeChange: r, showA11yLink: n = !1, ...s }, c) => {
|
|
1728
1728
|
const [l, m] = k("light"), [f, u] = k(16), [v, g] = k(!1);
|
|
1729
1729
|
M(() => {
|
|
1730
1730
|
const p = localStorage.getItem("a11y-theme") ?? document.documentElement.getAttribute("data-theme") ?? "light";
|
|
@@ -1740,19 +1740,19 @@ const et = N(
|
|
|
1740
1740
|
}
|
|
1741
1741
|
}, [v]);
|
|
1742
1742
|
const b = () => {
|
|
1743
|
-
const
|
|
1744
|
-
m(
|
|
1743
|
+
const d = l === "light" ? "dark" : "light";
|
|
1744
|
+
m(d), document.documentElement.setAttribute("data-theme", d), localStorage.setItem("a11y-theme", d), t == null || t(d);
|
|
1745
1745
|
}, h = () => {
|
|
1746
|
-
const
|
|
1747
|
-
u(
|
|
1746
|
+
const d = Math.min(f + 2, 24);
|
|
1747
|
+
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);
|
|
1748
1748
|
}, x = () => {
|
|
1749
|
-
const
|
|
1750
|
-
u(
|
|
1749
|
+
const d = Math.max(f - 2, 12);
|
|
1750
|
+
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);
|
|
1751
1751
|
};
|
|
1752
1752
|
return /* @__PURE__ */ e(
|
|
1753
1753
|
"div",
|
|
1754
1754
|
{
|
|
1755
|
-
ref:
|
|
1755
|
+
ref: c,
|
|
1756
1756
|
className: o(
|
|
1757
1757
|
"w-full border-b border-[var(--border)] bg-[var(--card)] sticky top-0 z-50",
|
|
1758
1758
|
a
|
|
@@ -1824,7 +1824,7 @@ const et = N(
|
|
|
1824
1824
|
"button",
|
|
1825
1825
|
{
|
|
1826
1826
|
type: "button",
|
|
1827
|
-
onClick: () => g((
|
|
1827
|
+
onClick: () => g((d) => !d),
|
|
1828
1828
|
"aria-label": "Ativar VLibras",
|
|
1829
1829
|
"aria-pressed": v,
|
|
1830
1830
|
className: o(
|
|
@@ -1853,24 +1853,24 @@ const tt = N(
|
|
|
1853
1853
|
autoplayDelay: r = 5e3,
|
|
1854
1854
|
autoplay: n = !0,
|
|
1855
1855
|
...s
|
|
1856
|
-
},
|
|
1856
|
+
}, c) => {
|
|
1857
1857
|
const [l, m] = k(0), [f, u] = k(!1), [v, g] = k(!1);
|
|
1858
1858
|
M(() => {
|
|
1859
|
-
const
|
|
1860
|
-
g(
|
|
1859
|
+
const d = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
1860
|
+
g(d.matches);
|
|
1861
1861
|
const p = (y) => {
|
|
1862
1862
|
g(y.matches);
|
|
1863
1863
|
};
|
|
1864
|
-
return
|
|
1864
|
+
return d.addEventListener("change", p), () => d.removeEventListener("change", p);
|
|
1865
1865
|
}, []), M(() => {
|
|
1866
1866
|
if (!n || f || v) return;
|
|
1867
|
-
const
|
|
1867
|
+
const d = setInterval(() => {
|
|
1868
1868
|
m((p) => (p + 1) % t.length);
|
|
1869
1869
|
}, r);
|
|
1870
|
-
return () => clearInterval(
|
|
1870
|
+
return () => clearInterval(d);
|
|
1871
1871
|
}, [n, r, t.length, f, v]);
|
|
1872
|
-
const b = (
|
|
1873
|
-
m(
|
|
1872
|
+
const b = (d) => {
|
|
1873
|
+
m(d), u(!0), setTimeout(() => u(!1), r);
|
|
1874
1874
|
}, h = () => {
|
|
1875
1875
|
b((l - 1 + t.length) % t.length);
|
|
1876
1876
|
}, x = () => {
|
|
@@ -1879,13 +1879,13 @@ const tt = N(
|
|
|
1879
1879
|
return t.length === 0 ? null : (t[l], /* @__PURE__ */ i(
|
|
1880
1880
|
"div",
|
|
1881
1881
|
{
|
|
1882
|
-
ref:
|
|
1882
|
+
ref: c,
|
|
1883
1883
|
className: o("relative w-full overflow-hidden", a),
|
|
1884
1884
|
onMouseEnter: () => u(!0),
|
|
1885
1885
|
onMouseLeave: () => u(!1),
|
|
1886
1886
|
...s,
|
|
1887
1887
|
children: [
|
|
1888
|
-
/* @__PURE__ */ e("div", { className: "relative", children: t.map((
|
|
1888
|
+
/* @__PURE__ */ e("div", { className: "relative", children: t.map((d, p) => /* @__PURE__ */ i(
|
|
1889
1889
|
"div",
|
|
1890
1890
|
{
|
|
1891
1891
|
className: o(
|
|
@@ -1893,34 +1893,48 @@ const tt = N(
|
|
|
1893
1893
|
p === l ? "block" : "hidden"
|
|
1894
1894
|
),
|
|
1895
1895
|
"aria-hidden": p !== l,
|
|
1896
|
-
children:
|
|
1897
|
-
/* @__PURE__ */
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1896
|
+
children: [
|
|
1897
|
+
/* @__PURE__ */ i("picture", { children: [
|
|
1898
|
+
/* @__PURE__ */ e(
|
|
1899
|
+
"source",
|
|
1900
|
+
{
|
|
1901
|
+
media: "(min-width: 1024px)",
|
|
1902
|
+
srcSet: `${d.imageDesktop} 1x, ${d.imageDesktop.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`
|
|
1903
|
+
}
|
|
1904
|
+
),
|
|
1905
|
+
/* @__PURE__ */ e(
|
|
1906
|
+
"source",
|
|
1907
|
+
{
|
|
1908
|
+
media: "(min-width: 768px)",
|
|
1909
|
+
srcSet: `${d.imageTablet} 1x, ${d.imageTablet.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`
|
|
1910
|
+
}
|
|
1911
|
+
),
|
|
1912
|
+
/* @__PURE__ */ e(
|
|
1913
|
+
"img",
|
|
1914
|
+
{
|
|
1915
|
+
src: d.imageMobile,
|
|
1916
|
+
srcSet: `${d.imageMobile} 1x, ${d.imageMobile.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`,
|
|
1917
|
+
alt: d.title,
|
|
1918
|
+
className: "w-full object-cover aspect-[5/6] md:aspect-video lg:aspect-[1920/700]",
|
|
1919
|
+
loading: p === 0 ? "eager" : "lazy"
|
|
1920
|
+
}
|
|
1921
|
+
)
|
|
1922
|
+
] }),
|
|
1923
|
+
d.showOverlay && /* @__PURE__ */ i("div", { className: "absolute inset-0 flex flex-col justify-end bg-linear-to-t from-black/60 to-transparent p-6 md:p-10", children: [
|
|
1924
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-white md:text-3xl", children: d.title }),
|
|
1925
|
+
d.description && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-gray-200 md:text-base", children: d.description }),
|
|
1926
|
+
d.cta && /* @__PURE__ */ e(
|
|
1927
|
+
"a",
|
|
1928
|
+
{
|
|
1929
|
+
href: d.cta.href,
|
|
1930
|
+
className: "mt-4 inline-block self-start rounded-md bg-brand-primary px-5 py-2 text-sm font-semibold text-white transition hover:opacity-90",
|
|
1931
|
+
children: d.cta.label
|
|
1932
|
+
}
|
|
1933
|
+
)
|
|
1934
|
+
] })
|
|
1935
|
+
]
|
|
1922
1936
|
},
|
|
1923
|
-
|
|
1937
|
+
d.id
|
|
1924
1938
|
)) }),
|
|
1925
1939
|
t.length > 1 && /* @__PURE__ */ i(A, { children: [
|
|
1926
1940
|
/* @__PURE__ */ e(
|
|
@@ -1942,7 +1956,7 @@ const tt = N(
|
|
|
1942
1956
|
}
|
|
1943
1957
|
)
|
|
1944
1958
|
] }),
|
|
1945
|
-
t.length > 1 && /* @__PURE__ */ e("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: t.map((
|
|
1959
|
+
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(
|
|
1946
1960
|
"button",
|
|
1947
1961
|
{
|
|
1948
1962
|
onClick: () => b(p),
|
|
@@ -2131,9 +2145,9 @@ function lt({ items: a }) {
|
|
|
2131
2145
|
) });
|
|
2132
2146
|
}
|
|
2133
2147
|
function Y({ item: a, depth: t = 0 }) {
|
|
2134
|
-
var
|
|
2148
|
+
var c;
|
|
2135
2149
|
const [r, n] = k(!1);
|
|
2136
|
-
return !((
|
|
2150
|
+
return !((c = a.children) != null && c.length) ? /* @__PURE__ */ e(Ke, { asChild: !0, children: /* @__PURE__ */ e(
|
|
2137
2151
|
"a",
|
|
2138
2152
|
{
|
|
2139
2153
|
href: a.href ?? "#",
|
|
@@ -2181,13 +2195,13 @@ function Y({ item: a, depth: t = 0 }) {
|
|
|
2181
2195
|
] });
|
|
2182
2196
|
}
|
|
2183
2197
|
const dt = N(
|
|
2184
|
-
({ items: a, logo: t, rightSlot: r, searchSlot: n, drawerFooter: s, className:
|
|
2198
|
+
({ items: a, logo: t, rightSlot: r, searchSlot: n, drawerFooter: s, className: c, ...l }, m) => /* @__PURE__ */ e(
|
|
2185
2199
|
"header",
|
|
2186
2200
|
{
|
|
2187
2201
|
ref: m,
|
|
2188
2202
|
className: o(
|
|
2189
2203
|
"sticky top-0 z-40 border-b border-[var(--border)] bg-[var(--card)]",
|
|
2190
|
-
|
|
2204
|
+
c
|
|
2191
2205
|
),
|
|
2192
2206
|
...l,
|
|
2193
2207
|
children: /* @__PURE__ */ i("div", { className: "px-4", children: [
|
|
@@ -2369,12 +2383,12 @@ function ft({ title: a, links: t }) {
|
|
|
2369
2383
|
] });
|
|
2370
2384
|
}
|
|
2371
2385
|
const gt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, className: r, ...n }) => {
|
|
2372
|
-
const [s,
|
|
2386
|
+
const [s, c] = k("light");
|
|
2373
2387
|
M(() => {
|
|
2374
2388
|
const u = document.documentElement;
|
|
2375
|
-
|
|
2389
|
+
c(u.getAttribute("data-theme") ?? "light");
|
|
2376
2390
|
const v = new MutationObserver(() => {
|
|
2377
|
-
|
|
2391
|
+
c(u.getAttribute("data-theme") ?? "light");
|
|
2378
2392
|
});
|
|
2379
2393
|
return v.observe(u, { attributes: !0, attributeFilter: ["data-theme"] }), () => v.disconnect();
|
|
2380
2394
|
}, []);
|