@grupo-elo-editorial/shared-ui-react 1.4.8 → 1.4.10
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 +9 -0
- package/dist/index.js +345 -338
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { clsx as ae } from "clsx";
|
|
3
3
|
import { twMerge as re } from "tailwind-merge";
|
|
4
4
|
import { jsx as e, jsxs as o, Fragment as P } from "react/jsx-runtime";
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { Loader2 as U, User as oe, Star as ne, CheckIcon as X, ChevronDownIcon as T, ChevronUpIcon as se, CircleIcon as le, ShoppingCart as $, Heart as de, Search as Y, X as ce, Minus as ue, Plus as me, ChevronRight as K, FileX as fe, Package as
|
|
5
|
+
import { forwardRef as w, useState as C, useRef as ie, useEffect as L } from "react";
|
|
6
|
+
import { Loader2 as U, User as oe, Star as ne, CheckIcon as X, ChevronDownIcon as T, ChevronUpIcon as se, CircleIcon as le, ShoppingCart as $, Heart as de, Search as Y, X as ce, Minus as ue, Plus as me, ChevronRight as K, FileX as fe, Package as pe, AlertCircle as ge, RefreshCw as ve, Home as be, XIcon as O, Accessibility as he, ZoomOut as xe, ZoomIn as Ne, Moon as ye, Sun as we, ChevronLeft as ke, Menu as ze, ChevronDown as Z, Instagram as Ce, Facebook as Se, Youtube as je, Linkedin as De, Mail as Me } from "lucide-react";
|
|
7
7
|
import { cva as _ } from "class-variance-authority";
|
|
8
|
-
import * as
|
|
8
|
+
import * as j from "@radix-ui/react-select";
|
|
9
9
|
import * as G from "@radix-ui/react-checkbox";
|
|
10
10
|
import * as V from "@radix-ui/react-radio-group";
|
|
11
11
|
import * as H from "@radix-ui/react-switch";
|
|
@@ -13,7 +13,7 @@ import { Slot as Ae } from "@radix-ui/react-slot";
|
|
|
13
13
|
import * as E from "@radix-ui/react-accordion";
|
|
14
14
|
import * as A from "@radix-ui/react-tooltip";
|
|
15
15
|
import { toast as ma } from "sonner";
|
|
16
|
-
import { Progress as
|
|
16
|
+
import { Progress as pa } from "@radix-ui/react-progress";
|
|
17
17
|
import * as k from "@radix-ui/react-dialog";
|
|
18
18
|
import * as M from "@radix-ui/react-navigation-menu";
|
|
19
19
|
function i(...a) {
|
|
@@ -45,7 +45,7 @@ const Pe = _(
|
|
|
45
45
|
size: "md"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
),
|
|
48
|
+
), D = w(
|
|
49
49
|
({
|
|
50
50
|
className: a,
|
|
51
51
|
variant: t,
|
|
@@ -54,29 +54,29 @@ const Pe = _(
|
|
|
54
54
|
isLoading: l,
|
|
55
55
|
leftIcon: n,
|
|
56
56
|
rightIcon: d,
|
|
57
|
-
children:
|
|
58
|
-
disabled:
|
|
59
|
-
...
|
|
57
|
+
children: u,
|
|
58
|
+
disabled: f,
|
|
59
|
+
...p
|
|
60
60
|
}, v) => /* @__PURE__ */ e(
|
|
61
61
|
"button",
|
|
62
62
|
{
|
|
63
63
|
className: i(Pe({ variant: t, size: r, fullWidth: s, className: a })),
|
|
64
64
|
ref: v,
|
|
65
|
-
disabled:
|
|
66
|
-
...
|
|
65
|
+
disabled: f || l,
|
|
66
|
+
...p,
|
|
67
67
|
children: l ? /* @__PURE__ */ o(P, { children: [
|
|
68
68
|
/* @__PURE__ */ e(U, { className: "h-4 w-4 animate-spin" }),
|
|
69
|
-
|
|
69
|
+
u && /* @__PURE__ */ e("span", { children: u })
|
|
70
70
|
] }) : /* @__PURE__ */ o(P, { children: [
|
|
71
71
|
n && /* @__PURE__ */ e("span", { className: "inline-flex", children: n }),
|
|
72
|
-
|
|
72
|
+
u,
|
|
73
73
|
d && /* @__PURE__ */ e("span", { className: "inline-flex", children: d })
|
|
74
74
|
] })
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
);
|
|
78
|
-
|
|
79
|
-
const Ee =
|
|
78
|
+
D.displayName = "Button";
|
|
79
|
+
const Ee = w(
|
|
80
80
|
({ className: a, error: t, helperText: r, ...s }, l) => /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
81
81
|
/* @__PURE__ */ e(
|
|
82
82
|
"textarea",
|
|
@@ -131,11 +131,11 @@ const _e = _(
|
|
|
131
131
|
size: "md"
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
), R =
|
|
135
|
-
({ className: a, variant: t, size: r, icon: s, onRemove: l, children: n, ...d },
|
|
134
|
+
), R = w(
|
|
135
|
+
({ className: a, variant: t, size: r, icon: s, onRemove: l, children: n, ...d }, u) => /* @__PURE__ */ o(
|
|
136
136
|
"div",
|
|
137
137
|
{
|
|
138
|
-
ref:
|
|
138
|
+
ref: u,
|
|
139
139
|
className: i(_e({ variant: t, size: r }), a),
|
|
140
140
|
...d,
|
|
141
141
|
children: [
|
|
@@ -170,37 +170,37 @@ const Be = _(
|
|
|
170
170
|
size: "md"
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
), Le =
|
|
174
|
-
({ className: a, size: t, src: r, alt: s, name: l, showStatus: n, statusType: d = "online", ...
|
|
175
|
-
const [
|
|
173
|
+
), Le = w(
|
|
174
|
+
({ className: a, size: t, src: r, alt: s, name: l, showStatus: n, statusType: d = "online", ...u }, f) => {
|
|
175
|
+
const [p, v] = C(!1), g = (y) => y.split(" ").map((c) => c[0]).join("").toUpperCase().slice(0, 2), h = {
|
|
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
|
-
},
|
|
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",
|
|
184
184
|
xl: "h-4 w-4 border-2"
|
|
185
185
|
};
|
|
186
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
187
|
-
r && !
|
|
186
|
+
return /* @__PURE__ */ o("div", { ref: f, className: i(Be({ size: t }), "relative", a), children: [
|
|
187
|
+
r && !p ? /* @__PURE__ */ e(
|
|
188
188
|
"img",
|
|
189
189
|
{
|
|
190
190
|
src: r,
|
|
191
191
|
alt: s || l || "Avatar",
|
|
192
192
|
onError: () => v(!0),
|
|
193
193
|
className: "h-full w-full object-cover",
|
|
194
|
-
...
|
|
194
|
+
...u
|
|
195
195
|
}
|
|
196
|
-
) : l ? /* @__PURE__ */ e("span", { className: "font-medium", children:
|
|
196
|
+
) : l ? /* @__PURE__ */ e("span", { className: "font-medium", children: g(l) }) : /* @__PURE__ */ e(oe, { className: "h-1/2 w-1/2" }),
|
|
197
197
|
n && /* @__PURE__ */ e(
|
|
198
198
|
"span",
|
|
199
199
|
{
|
|
200
200
|
className: i(
|
|
201
201
|
"absolute bottom-0 right-0 rounded-full border-[var(--background)]",
|
|
202
202
|
h[d],
|
|
203
|
-
|
|
203
|
+
N[t || "md"]
|
|
204
204
|
),
|
|
205
205
|
"aria-label": `Status: ${d}`
|
|
206
206
|
}
|
|
@@ -221,7 +221,7 @@ const Re = _("animate-spin text-[var(--brand-primary)]", {
|
|
|
221
221
|
defaultVariants: {
|
|
222
222
|
size: "md"
|
|
223
223
|
}
|
|
224
|
-
}), Te =
|
|
224
|
+
}), Te = w(
|
|
225
225
|
({ className: a, size: t, label: r, ...s }, l) => /* @__PURE__ */ o(
|
|
226
226
|
"div",
|
|
227
227
|
{
|
|
@@ -238,7 +238,7 @@ const Re = _("animate-spin text-[var(--brand-primary)]", {
|
|
|
238
238
|
)
|
|
239
239
|
);
|
|
240
240
|
Te.displayName = "Spinner";
|
|
241
|
-
const $e =
|
|
241
|
+
const $e = w(
|
|
242
242
|
({ className: a, orientation: t = "horizontal", variant: r = "solid", text: s, ...l }, n) => {
|
|
243
243
|
const d = {
|
|
244
244
|
solid: "border-solid",
|
|
@@ -285,7 +285,7 @@ const $e = y(
|
|
|
285
285
|
}
|
|
286
286
|
);
|
|
287
287
|
$e.displayName = "Divider";
|
|
288
|
-
const F =
|
|
288
|
+
const F = w(
|
|
289
289
|
({
|
|
290
290
|
className: a,
|
|
291
291
|
value: t = 0,
|
|
@@ -294,51 +294,51 @@ const F = y(
|
|
|
294
294
|
readonly: l = !1,
|
|
295
295
|
onChange: n,
|
|
296
296
|
showValue: d = !1,
|
|
297
|
-
...
|
|
298
|
-
},
|
|
299
|
-
const [
|
|
297
|
+
...u
|
|
298
|
+
}, f) => {
|
|
299
|
+
const [p, v] = C(0), g = {
|
|
300
300
|
sm: "h-4 w-4",
|
|
301
301
|
md: "h-5 w-5",
|
|
302
302
|
lg: "h-6 w-6"
|
|
303
|
-
}, h = (
|
|
304
|
-
!l && n && n(
|
|
305
|
-
},
|
|
303
|
+
}, h = (y) => {
|
|
304
|
+
!l && n && n(y);
|
|
305
|
+
}, N = p || t;
|
|
306
306
|
return /* @__PURE__ */ o(
|
|
307
307
|
"div",
|
|
308
308
|
{
|
|
309
|
-
ref:
|
|
309
|
+
ref: f,
|
|
310
310
|
className: i("inline-flex items-center gap-1", a),
|
|
311
311
|
role: "group",
|
|
312
312
|
"aria-label": `Rating: ${t} out of ${r}`,
|
|
313
|
-
...
|
|
313
|
+
...u,
|
|
314
314
|
children: [
|
|
315
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-0.5", children: Array.from({ length: r }, (
|
|
316
|
-
const
|
|
315
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-0.5", children: Array.from({ length: r }, (y, c) => c + 1).map((y) => {
|
|
316
|
+
const c = y <= N;
|
|
317
317
|
return /* @__PURE__ */ e(
|
|
318
318
|
"button",
|
|
319
319
|
{
|
|
320
320
|
type: "button",
|
|
321
321
|
disabled: l,
|
|
322
|
-
onClick: () => h(
|
|
323
|
-
onMouseEnter: () => !l && v(
|
|
322
|
+
onClick: () => h(y),
|
|
323
|
+
onMouseEnter: () => !l && v(y),
|
|
324
324
|
onMouseLeave: () => !l && v(0),
|
|
325
325
|
className: i(
|
|
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
|
l ? "cursor-default" : "cursor-pointer hover:scale-110"
|
|
328
328
|
),
|
|
329
|
-
"aria-label": `Rate ${
|
|
329
|
+
"aria-label": `Rate ${y} out of ${r}`,
|
|
330
330
|
children: /* @__PURE__ */ e(
|
|
331
331
|
ne,
|
|
332
332
|
{
|
|
333
333
|
className: i(
|
|
334
|
-
|
|
334
|
+
g[s],
|
|
335
335
|
"transition-all",
|
|
336
|
-
|
|
336
|
+
c ? "fill-[var(--warning)] text-[var(--warning)]" : "fill-none text-[var(--muted-foreground)]"
|
|
337
337
|
)
|
|
338
338
|
}
|
|
339
339
|
)
|
|
340
340
|
},
|
|
341
|
-
|
|
341
|
+
y
|
|
342
342
|
);
|
|
343
343
|
}) }),
|
|
344
344
|
d && /* @__PURE__ */ e("span", { className: "ml-1 text-sm font-medium text-[var(--foreground)]", children: t.toFixed(1) })
|
|
@@ -367,12 +367,12 @@ function At({ className: a, type: t, ...r }) {
|
|
|
367
367
|
function Pt({
|
|
368
368
|
...a
|
|
369
369
|
}) {
|
|
370
|
-
return /* @__PURE__ */ e(
|
|
370
|
+
return /* @__PURE__ */ e(j.Root, { "data-slot": "select", ...a });
|
|
371
371
|
}
|
|
372
372
|
function Et({
|
|
373
373
|
...a
|
|
374
374
|
}) {
|
|
375
|
-
return /* @__PURE__ */ e(
|
|
375
|
+
return /* @__PURE__ */ e(j.Value, { "data-slot": "select-value", ...a });
|
|
376
376
|
}
|
|
377
377
|
function _t({
|
|
378
378
|
className: a,
|
|
@@ -381,7 +381,7 @@ function _t({
|
|
|
381
381
|
...s
|
|
382
382
|
}) {
|
|
383
383
|
return /* @__PURE__ */ o(
|
|
384
|
-
|
|
384
|
+
j.Trigger,
|
|
385
385
|
{
|
|
386
386
|
"data-slot": "select-trigger",
|
|
387
387
|
"data-size": t,
|
|
@@ -392,7 +392,7 @@ function _t({
|
|
|
392
392
|
...s,
|
|
393
393
|
children: [
|
|
394
394
|
r,
|
|
395
|
-
/* @__PURE__ */ e(
|
|
395
|
+
/* @__PURE__ */ e(j.Icon, { asChild: !0, children: /* @__PURE__ */ e(T, { className: "size-4 opacity-50" }) })
|
|
396
396
|
]
|
|
397
397
|
}
|
|
398
398
|
);
|
|
@@ -403,8 +403,8 @@ function Bt({
|
|
|
403
403
|
position: r = "popper",
|
|
404
404
|
...s
|
|
405
405
|
}) {
|
|
406
|
-
return /* @__PURE__ */ e(
|
|
407
|
-
|
|
406
|
+
return /* @__PURE__ */ e(j.Portal, { children: /* @__PURE__ */ o(
|
|
407
|
+
j.Content,
|
|
408
408
|
{
|
|
409
409
|
"data-slot": "select-content",
|
|
410
410
|
className: i(
|
|
@@ -417,7 +417,7 @@ function Bt({
|
|
|
417
417
|
children: [
|
|
418
418
|
/* @__PURE__ */ e(Ve, {}),
|
|
419
419
|
/* @__PURE__ */ e(
|
|
420
|
-
|
|
420
|
+
j.Viewport,
|
|
421
421
|
{
|
|
422
422
|
className: i(
|
|
423
423
|
"p-1",
|
|
@@ -437,7 +437,7 @@ function Lt({
|
|
|
437
437
|
...r
|
|
438
438
|
}) {
|
|
439
439
|
return /* @__PURE__ */ o(
|
|
440
|
-
|
|
440
|
+
j.Item,
|
|
441
441
|
{
|
|
442
442
|
"data-slot": "select-item",
|
|
443
443
|
className: i(
|
|
@@ -446,8 +446,8 @@ function Lt({
|
|
|
446
446
|
),
|
|
447
447
|
...r,
|
|
448
448
|
children: [
|
|
449
|
-
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
450
|
-
/* @__PURE__ */ e(
|
|
449
|
+
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(j.ItemIndicator, { children: /* @__PURE__ */ e(X, { className: "size-4" }) }) }),
|
|
450
|
+
/* @__PURE__ */ e(j.ItemText, { children: t })
|
|
451
451
|
]
|
|
452
452
|
}
|
|
453
453
|
);
|
|
@@ -457,7 +457,7 @@ function Ve({
|
|
|
457
457
|
...t
|
|
458
458
|
}) {
|
|
459
459
|
return /* @__PURE__ */ e(
|
|
460
|
-
|
|
460
|
+
j.ScrollUpButton,
|
|
461
461
|
{
|
|
462
462
|
"data-slot": "select-scroll-up-button",
|
|
463
463
|
className: i(
|
|
@@ -474,7 +474,7 @@ function Fe({
|
|
|
474
474
|
...t
|
|
475
475
|
}) {
|
|
476
476
|
return /* @__PURE__ */ e(
|
|
477
|
-
|
|
477
|
+
j.ScrollDownButton,
|
|
478
478
|
{
|
|
479
479
|
"data-slot": "select-scroll-down-button",
|
|
480
480
|
className: i(
|
|
@@ -583,7 +583,7 @@ function Q({
|
|
|
583
583
|
}) {
|
|
584
584
|
return a ? /* @__PURE__ */ e("a", { href: a, className: t, tabIndex: -1, "aria-hidden": "true", children: r }) : /* @__PURE__ */ e("div", { className: t, children: r });
|
|
585
585
|
}
|
|
586
|
-
const I =
|
|
586
|
+
const I = w(
|
|
587
587
|
({
|
|
588
588
|
className: a,
|
|
589
589
|
image: t,
|
|
@@ -592,28 +592,28 @@ const I = y(
|
|
|
592
592
|
price: l,
|
|
593
593
|
originalPrice: n,
|
|
594
594
|
rating: d,
|
|
595
|
-
reviewCount:
|
|
596
|
-
badge:
|
|
597
|
-
badgeVariant:
|
|
595
|
+
reviewCount: u,
|
|
596
|
+
badge: f,
|
|
597
|
+
badgeVariant: p = "default",
|
|
598
598
|
isSkeleton: v = !1,
|
|
599
|
-
isOutOfStock:
|
|
599
|
+
isOutOfStock: g = !1,
|
|
600
600
|
onAddToCart: h,
|
|
601
|
-
onToggleFavorite:
|
|
602
|
-
isFavorite:
|
|
603
|
-
href:
|
|
601
|
+
onToggleFavorite: N,
|
|
602
|
+
isFavorite: y = !1,
|
|
603
|
+
href: c,
|
|
604
604
|
orientation: b = "vertical",
|
|
605
|
-
renderImage:
|
|
606
|
-
...
|
|
607
|
-
},
|
|
605
|
+
renderImage: m = Ie,
|
|
606
|
+
...x
|
|
607
|
+
}, S) => v ? /* @__PURE__ */ o(
|
|
608
608
|
"div",
|
|
609
609
|
{
|
|
610
|
-
ref:
|
|
610
|
+
ref: S,
|
|
611
611
|
className: i(
|
|
612
612
|
"flex rounded-lg border-2 border-[var(--border)] bg-[var(--card)] p-4 animate-pulse",
|
|
613
613
|
b === "horizontal" ? "flex-row gap-3" : "flex-col",
|
|
614
614
|
a
|
|
615
615
|
),
|
|
616
|
-
...
|
|
616
|
+
...x,
|
|
617
617
|
children: [
|
|
618
618
|
/* @__PURE__ */ e(
|
|
619
619
|
"div",
|
|
@@ -634,20 +634,20 @@ const I = y(
|
|
|
634
634
|
) : b === "horizontal" ? /* @__PURE__ */ o(
|
|
635
635
|
"div",
|
|
636
636
|
{
|
|
637
|
-
ref:
|
|
637
|
+
ref: S,
|
|
638
638
|
className: i(
|
|
639
639
|
"group relative flex flex-row gap-3 rounded-lg border-2 border-[var(--border)] bg-[var(--card)] p-3 transition-all hover:shadow-md",
|
|
640
|
-
|
|
640
|
+
g && "opacity-60",
|
|
641
641
|
a
|
|
642
642
|
),
|
|
643
|
-
...
|
|
643
|
+
...x,
|
|
644
644
|
children: [
|
|
645
645
|
/* @__PURE__ */ e(
|
|
646
646
|
Q,
|
|
647
647
|
{
|
|
648
|
-
href:
|
|
648
|
+
href: c,
|
|
649
649
|
className: "relative block h-24 w-20 shrink-0 overflow-hidden rounded-lg",
|
|
650
|
-
children:
|
|
650
|
+
children: m({
|
|
651
651
|
src: t,
|
|
652
652
|
alt: r,
|
|
653
653
|
className: "h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
|
|
@@ -655,10 +655,10 @@ const I = y(
|
|
|
655
655
|
}
|
|
656
656
|
),
|
|
657
657
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
658
|
-
|
|
658
|
+
c ? /* @__PURE__ */ e(
|
|
659
659
|
"a",
|
|
660
660
|
{
|
|
661
|
-
href:
|
|
661
|
+
href: c,
|
|
662
662
|
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",
|
|
663
663
|
children: r
|
|
664
664
|
}
|
|
@@ -666,9 +666,9 @@ const I = y(
|
|
|
666
666
|
s && /* @__PURE__ */ e("p", { className: "text-xs text-[var(--muted-foreground)]", children: s }),
|
|
667
667
|
d !== void 0 && /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
|
|
668
668
|
/* @__PURE__ */ e(F, { value: d, size: "sm", readonly: !0 }),
|
|
669
|
-
|
|
669
|
+
u !== void 0 && /* @__PURE__ */ o("span", { className: "text-xs text-[var(--muted-foreground)]", children: [
|
|
670
670
|
"(",
|
|
671
|
-
|
|
671
|
+
u,
|
|
672
672
|
")"
|
|
673
673
|
] })
|
|
674
674
|
] }),
|
|
@@ -683,16 +683,16 @@ const I = y(
|
|
|
683
683
|
] })
|
|
684
684
|
] }),
|
|
685
685
|
h && /* @__PURE__ */ e(
|
|
686
|
-
|
|
686
|
+
D,
|
|
687
687
|
{
|
|
688
688
|
onClick: h,
|
|
689
|
-
disabled:
|
|
689
|
+
disabled: g,
|
|
690
690
|
variant: "primary",
|
|
691
691
|
size: "sm",
|
|
692
692
|
fullWidth: !0,
|
|
693
693
|
leftIcon: /* @__PURE__ */ e($, { className: "h-3.5 w-3.5" }),
|
|
694
694
|
className: "mt-auto",
|
|
695
|
-
children:
|
|
695
|
+
children: g ? "Indisponível" : "Adicionar"
|
|
696
696
|
}
|
|
697
697
|
)
|
|
698
698
|
] })
|
|
@@ -701,62 +701,62 @@ const I = y(
|
|
|
701
701
|
) : /* @__PURE__ */ o(
|
|
702
702
|
"div",
|
|
703
703
|
{
|
|
704
|
-
ref:
|
|
704
|
+
ref: S,
|
|
705
705
|
className: i(
|
|
706
706
|
"group relative flex flex-col rounded-lg border-2 border-border bg-card transition-all hover:shadow-lg",
|
|
707
|
-
|
|
707
|
+
g && "opacity-60",
|
|
708
708
|
a
|
|
709
709
|
),
|
|
710
|
-
...
|
|
710
|
+
...x,
|
|
711
711
|
children: [
|
|
712
712
|
/* @__PURE__ */ o(
|
|
713
713
|
Q,
|
|
714
714
|
{
|
|
715
|
-
href:
|
|
715
|
+
href: c,
|
|
716
716
|
className: "relative block w-full aspect-square overflow-hidden rounded-t-lg",
|
|
717
717
|
children: [
|
|
718
|
-
|
|
718
|
+
m({
|
|
719
719
|
src: t,
|
|
720
720
|
alt: r,
|
|
721
721
|
className: "h-full w-full object-contain transition-transform group-hover:scale-105"
|
|
722
722
|
}),
|
|
723
|
-
|
|
724
|
-
|
|
723
|
+
f && /* @__PURE__ */ e("div", { className: "absolute left-3 top-3", children: /* @__PURE__ */ e(R, { variant: p, children: f }) }),
|
|
724
|
+
g && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ e(R, { variant: "danger", size: "lg", children: "Esgotado" }) })
|
|
725
725
|
]
|
|
726
726
|
}
|
|
727
727
|
),
|
|
728
|
-
|
|
728
|
+
N && /* @__PURE__ */ e(
|
|
729
729
|
"button",
|
|
730
730
|
{
|
|
731
|
-
onClick:
|
|
731
|
+
onClick: N,
|
|
732
732
|
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)]",
|
|
733
|
-
"aria-label":
|
|
733
|
+
"aria-label": y ? "Remover dos favoritos" : "Adicionar aos favoritos",
|
|
734
734
|
children: /* @__PURE__ */ e(
|
|
735
735
|
de,
|
|
736
736
|
{
|
|
737
737
|
className: i(
|
|
738
738
|
"h-5 w-5",
|
|
739
|
-
|
|
739
|
+
y ? "fill-[var(--destructive)] text-[var(--destructive)]" : "text-[var(--foreground)]"
|
|
740
740
|
)
|
|
741
741
|
}
|
|
742
742
|
)
|
|
743
743
|
}
|
|
744
744
|
),
|
|
745
745
|
/* @__PURE__ */ o("div", { className: "flex flex-1 flex-col p-4", children: [
|
|
746
|
-
|
|
746
|
+
c ? /* @__PURE__ */ e(
|
|
747
747
|
"a",
|
|
748
748
|
{
|
|
749
|
-
href:
|
|
750
|
-
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",
|
|
749
|
+
href: c,
|
|
750
|
+
className: "wrap-break-word line-clamp-2 min-h-12 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",
|
|
751
751
|
children: r
|
|
752
752
|
}
|
|
753
|
-
) : /* @__PURE__ */ e("h3", { className: "wrap-break-word text-base font-medium text-card-foreground", children: r }),
|
|
753
|
+
) : /* @__PURE__ */ e("h3", { className: "wrap-break-word line-clamp-2 min-h-12 text-base font-medium text-card-foreground", children: r }),
|
|
754
754
|
s && /* @__PURE__ */ e("p", { className: "mt-1 text-sm text-[var(--muted-foreground)]", children: s }),
|
|
755
755
|
d !== void 0 && /* @__PURE__ */ o("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
756
756
|
/* @__PURE__ */ e(F, { value: d, size: "sm", readonly: !0 }),
|
|
757
|
-
|
|
757
|
+
u !== void 0 && /* @__PURE__ */ o("span", { className: "text-sm text-[var(--muted-foreground)]", children: [
|
|
758
758
|
"(",
|
|
759
|
-
|
|
759
|
+
u,
|
|
760
760
|
")"
|
|
761
761
|
] })
|
|
762
762
|
] }),
|
|
@@ -771,10 +771,10 @@ const I = y(
|
|
|
771
771
|
] })
|
|
772
772
|
] }),
|
|
773
773
|
h && /* @__PURE__ */ e(
|
|
774
|
-
|
|
774
|
+
D,
|
|
775
775
|
{
|
|
776
776
|
onClick: h,
|
|
777
|
-
disabled:
|
|
777
|
+
disabled: g,
|
|
778
778
|
variant: "primary",
|
|
779
779
|
size: "md",
|
|
780
780
|
fullWidth: !0,
|
|
@@ -785,7 +785,7 @@ const I = y(
|
|
|
785
785
|
"group-hover:opacity-100 group-hover:translate-y-0",
|
|
786
786
|
"focus-visible:opacity-100 focus-visible:translate-y-0"
|
|
787
787
|
),
|
|
788
|
-
children:
|
|
788
|
+
children: g ? "Indisponível" : "Adicionar"
|
|
789
789
|
}
|
|
790
790
|
)
|
|
791
791
|
] })
|
|
@@ -794,7 +794,7 @@ const I = y(
|
|
|
794
794
|
)
|
|
795
795
|
);
|
|
796
796
|
I.displayName = "ProductCard";
|
|
797
|
-
const qe =
|
|
797
|
+
const qe = w(
|
|
798
798
|
({
|
|
799
799
|
className: a,
|
|
800
800
|
onSearch: t,
|
|
@@ -803,30 +803,30 @@ const qe = y(
|
|
|
803
803
|
size: l = "md",
|
|
804
804
|
placeholder: n = "Buscar...",
|
|
805
805
|
value: d,
|
|
806
|
-
onChange:
|
|
807
|
-
...
|
|
808
|
-
},
|
|
809
|
-
const [v,
|
|
806
|
+
onChange: u,
|
|
807
|
+
...f
|
|
808
|
+
}, p) => {
|
|
809
|
+
const [v, g] = C(""), h = d !== void 0 ? d : v, N = {
|
|
810
810
|
sm: "h-9 text-sm",
|
|
811
811
|
md: "h-11 text-base",
|
|
812
812
|
lg: "h-14 text-lg"
|
|
813
|
-
},
|
|
814
|
-
const
|
|
815
|
-
d === void 0 &&
|
|
816
|
-
},
|
|
817
|
-
d === void 0 &&
|
|
818
|
-
}, b = (
|
|
819
|
-
|
|
813
|
+
}, y = (m) => {
|
|
814
|
+
const x = m.target.value;
|
|
815
|
+
d === void 0 && g(x), u == null || u(m);
|
|
816
|
+
}, c = () => {
|
|
817
|
+
d === void 0 && g(""), r == null || r();
|
|
818
|
+
}, b = (m) => {
|
|
819
|
+
m.key === "Enter" && t && t(h);
|
|
820
820
|
};
|
|
821
821
|
return /* @__PURE__ */ e("div", { className: i("relative w-full", a), children: /* @__PURE__ */ o("div", { className: "relative flex items-center", children: [
|
|
822
822
|
/* @__PURE__ */ e(Y, { className: "absolute left-3 h-5 w-5 text-[var(--muted-foreground)] pointer-events-none" }),
|
|
823
823
|
/* @__PURE__ */ e(
|
|
824
824
|
"input",
|
|
825
825
|
{
|
|
826
|
-
ref:
|
|
826
|
+
ref: p,
|
|
827
827
|
type: "search",
|
|
828
828
|
value: h,
|
|
829
|
-
onChange:
|
|
829
|
+
onChange: y,
|
|
830
830
|
onKeyDown: b,
|
|
831
831
|
placeholder: n,
|
|
832
832
|
className: i(
|
|
@@ -834,9 +834,9 @@ const qe = y(
|
|
|
834
834
|
"placeholder:text-[var(--muted-foreground)]",
|
|
835
835
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
836
836
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
837
|
-
|
|
837
|
+
N[l]
|
|
838
838
|
),
|
|
839
|
-
...
|
|
839
|
+
...f
|
|
840
840
|
}
|
|
841
841
|
),
|
|
842
842
|
/* @__PURE__ */ o("div", { className: "absolute right-3 flex items-center gap-1", children: [
|
|
@@ -845,7 +845,7 @@ const qe = y(
|
|
|
845
845
|
"button",
|
|
846
846
|
{
|
|
847
847
|
type: "button",
|
|
848
|
-
onClick:
|
|
848
|
+
onClick: c,
|
|
849
849
|
className: "rounded-full p-1 hover:bg-[var(--muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
|
|
850
850
|
"aria-label": "Clear search",
|
|
851
851
|
children: /* @__PURE__ */ e(ce, { className: "h-4 w-4 text-[var(--muted-foreground)]" })
|
|
@@ -856,7 +856,7 @@ const qe = y(
|
|
|
856
856
|
}
|
|
857
857
|
);
|
|
858
858
|
qe.displayName = "SearchBar";
|
|
859
|
-
const Ue =
|
|
859
|
+
const Ue = w(
|
|
860
860
|
({
|
|
861
861
|
className: a,
|
|
862
862
|
price: t,
|
|
@@ -865,20 +865,20 @@ const Ue = y(
|
|
|
865
865
|
size: l = "md",
|
|
866
866
|
showDiscount: n = !0,
|
|
867
867
|
installments: d,
|
|
868
|
-
...
|
|
869
|
-
},
|
|
870
|
-
const
|
|
868
|
+
...u
|
|
869
|
+
}, f) => {
|
|
870
|
+
const p = r && r > t ? Math.round((r - t) / r * 100) : 0, v = {
|
|
871
871
|
sm: "text-base",
|
|
872
872
|
md: "text-xl",
|
|
873
873
|
lg: "text-2xl",
|
|
874
874
|
xl: "text-4xl"
|
|
875
|
-
},
|
|
875
|
+
}, g = {
|
|
876
876
|
sm: "text-xs",
|
|
877
877
|
md: "text-sm",
|
|
878
878
|
lg: "text-base",
|
|
879
879
|
xl: "text-xl"
|
|
880
880
|
};
|
|
881
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
881
|
+
return /* @__PURE__ */ o("div", { ref: f, className: i("flex flex-col gap-1", a), ...u, children: [
|
|
882
882
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
883
883
|
/* @__PURE__ */ o("div", { className: "flex items-baseline gap-2", children: [
|
|
884
884
|
/* @__PURE__ */ o("span", { className: i("font-bold text-[var(--foreground)]", v[l]), children: [
|
|
@@ -891,7 +891,7 @@ const Ue = y(
|
|
|
891
891
|
{
|
|
892
892
|
className: i(
|
|
893
893
|
"text-[var(--muted-foreground)] line-through",
|
|
894
|
-
|
|
894
|
+
g[l]
|
|
895
895
|
),
|
|
896
896
|
children: [
|
|
897
897
|
s,
|
|
@@ -901,9 +901,9 @@ const Ue = y(
|
|
|
901
901
|
}
|
|
902
902
|
)
|
|
903
903
|
] }),
|
|
904
|
-
n &&
|
|
904
|
+
n && p > 0 && /* @__PURE__ */ o(R, { variant: "success", size: "sm", children: [
|
|
905
905
|
"-",
|
|
906
|
-
|
|
906
|
+
p,
|
|
907
907
|
"%"
|
|
908
908
|
] })
|
|
909
909
|
] }),
|
|
@@ -920,7 +920,7 @@ const Ue = y(
|
|
|
920
920
|
}
|
|
921
921
|
);
|
|
922
922
|
Ue.displayName = "PriceDisplay";
|
|
923
|
-
const Ge =
|
|
923
|
+
const Ge = w(
|
|
924
924
|
({
|
|
925
925
|
className: a,
|
|
926
926
|
value: t,
|
|
@@ -929,37 +929,37 @@ const Ge = y(
|
|
|
929
929
|
onChange: l,
|
|
930
930
|
size: n = "md",
|
|
931
931
|
disabled: d = !1,
|
|
932
|
-
showLabel:
|
|
933
|
-
...
|
|
934
|
-
},
|
|
932
|
+
showLabel: u = !1,
|
|
933
|
+
...f
|
|
934
|
+
}, p) => {
|
|
935
935
|
const v = () => {
|
|
936
936
|
t < s && l(t + 1);
|
|
937
|
-
},
|
|
937
|
+
}, g = () => {
|
|
938
938
|
t > r && l(t - 1);
|
|
939
|
-
}, h = (
|
|
940
|
-
const b = parseInt(
|
|
939
|
+
}, h = (c) => {
|
|
940
|
+
const b = parseInt(c.target.value);
|
|
941
941
|
!isNaN(b) && b >= r && b <= s && l(b);
|
|
942
|
-
},
|
|
942
|
+
}, N = {
|
|
943
943
|
sm: "h-8 w-8",
|
|
944
944
|
md: "h-10 w-10",
|
|
945
945
|
lg: "h-12 w-12"
|
|
946
|
-
},
|
|
946
|
+
}, y = {
|
|
947
947
|
sm: "h-8 w-12 text-sm",
|
|
948
948
|
md: "h-10 w-14 text-base",
|
|
949
949
|
lg: "h-12 w-16 text-lg"
|
|
950
950
|
};
|
|
951
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
952
|
-
|
|
951
|
+
return /* @__PURE__ */ o("div", { ref: p, className: i("inline-flex flex-col gap-1", a), ...f, children: [
|
|
952
|
+
u && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-[var(--foreground)]", children: "Quantidade" }),
|
|
953
953
|
/* @__PURE__ */ o("div", { className: "inline-flex items-center gap-2", children: [
|
|
954
954
|
/* @__PURE__ */ e(
|
|
955
|
-
|
|
955
|
+
D,
|
|
956
956
|
{
|
|
957
957
|
type: "button",
|
|
958
958
|
variant: "secondary",
|
|
959
959
|
size: "sm",
|
|
960
|
-
onClick:
|
|
960
|
+
onClick: g,
|
|
961
961
|
disabled: d || t <= r,
|
|
962
|
-
className: i(
|
|
962
|
+
className: i(N[n], "p-0"),
|
|
963
963
|
"aria-label": "Decrease quantity",
|
|
964
964
|
children: /* @__PURE__ */ e(ue, { className: "h-4 w-4" })
|
|
965
965
|
}
|
|
@@ -978,20 +978,20 @@ const Ge = y(
|
|
|
978
978
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
979
979
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
980
980
|
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
981
|
-
|
|
981
|
+
y[n]
|
|
982
982
|
),
|
|
983
983
|
"aria-label": "Quantity"
|
|
984
984
|
}
|
|
985
985
|
),
|
|
986
986
|
/* @__PURE__ */ e(
|
|
987
|
-
|
|
987
|
+
D,
|
|
988
988
|
{
|
|
989
989
|
type: "button",
|
|
990
990
|
variant: "secondary",
|
|
991
991
|
size: "sm",
|
|
992
992
|
onClick: v,
|
|
993
993
|
disabled: d || t >= s,
|
|
994
|
-
className: i(
|
|
994
|
+
className: i(N[n], "p-0"),
|
|
995
995
|
"aria-label": "Increase quantity",
|
|
996
996
|
children: /* @__PURE__ */ e(me, { className: "h-4 w-4" })
|
|
997
997
|
}
|
|
@@ -1001,8 +1001,8 @@ const Ge = y(
|
|
|
1001
1001
|
}
|
|
1002
1002
|
);
|
|
1003
1003
|
Ge.displayName = "QuantitySelector";
|
|
1004
|
-
const He =
|
|
1005
|
-
({ className: a, label: t, htmlFor: r, required: s, error: l, helperText: n, children: d, ...
|
|
1004
|
+
const He = w(
|
|
1005
|
+
({ className: a, label: t, htmlFor: r, required: s, error: l, helperText: n, children: d, ...u }, f) => /* @__PURE__ */ o("div", { ref: f, className: i("flex flex-col gap-1.5", a), ...u, children: [
|
|
1006
1006
|
t && /* @__PURE__ */ o(
|
|
1007
1007
|
"label",
|
|
1008
1008
|
{
|
|
@@ -1198,7 +1198,7 @@ function Zt({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
) });
|
|
1200
1200
|
}
|
|
1201
|
-
const We =
|
|
1201
|
+
const We = w(
|
|
1202
1202
|
({
|
|
1203
1203
|
className: a,
|
|
1204
1204
|
variant: t = "default",
|
|
@@ -1207,14 +1207,14 @@ const We = y(
|
|
|
1207
1207
|
description: l,
|
|
1208
1208
|
primaryCTA: n,
|
|
1209
1209
|
secondaryCTA: d,
|
|
1210
|
-
backgroundImage:
|
|
1211
|
-
overlay:
|
|
1212
|
-
children:
|
|
1210
|
+
backgroundImage: u,
|
|
1211
|
+
overlay: f = !0,
|
|
1212
|
+
children: p,
|
|
1213
1213
|
...v
|
|
1214
|
-
},
|
|
1214
|
+
}, g) => /* @__PURE__ */ o(
|
|
1215
1215
|
"section",
|
|
1216
1216
|
{
|
|
1217
|
-
ref:
|
|
1217
|
+
ref: g,
|
|
1218
1218
|
className: i(
|
|
1219
1219
|
"relative flex min-h-[400px] w-full flex-col justify-center px-6 py-16 lg:px-12 lg:py-24",
|
|
1220
1220
|
{
|
|
@@ -1226,15 +1226,15 @@ const We = y(
|
|
|
1226
1226
|
),
|
|
1227
1227
|
...v,
|
|
1228
1228
|
children: [
|
|
1229
|
-
|
|
1229
|
+
u && /* @__PURE__ */ o(P, { children: [
|
|
1230
1230
|
/* @__PURE__ */ e(
|
|
1231
1231
|
"div",
|
|
1232
1232
|
{
|
|
1233
1233
|
className: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
1234
|
-
style: { backgroundImage: `url(${
|
|
1234
|
+
style: { backgroundImage: `url(${u})` }
|
|
1235
1235
|
}
|
|
1236
1236
|
),
|
|
1237
|
-
|
|
1237
|
+
f && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-gradient-to-r from-black/70 to-black/30" })
|
|
1238
1238
|
] }),
|
|
1239
1239
|
/* @__PURE__ */ o(
|
|
1240
1240
|
"div",
|
|
@@ -1250,7 +1250,7 @@ const We = y(
|
|
|
1250
1250
|
{
|
|
1251
1251
|
className: i(
|
|
1252
1252
|
"mb-4 text-sm font-semibold uppercase tracking-wider",
|
|
1253
|
-
|
|
1253
|
+
u ? "text-[var(--warning)]" : "text-[var(--brand-primary)]"
|
|
1254
1254
|
),
|
|
1255
1255
|
children: s
|
|
1256
1256
|
}
|
|
@@ -1260,7 +1260,7 @@ const We = y(
|
|
|
1260
1260
|
{
|
|
1261
1261
|
className: i(
|
|
1262
1262
|
"text-4xl font-bold leading-tight lg:text-5xl xl:text-6xl",
|
|
1263
|
-
|
|
1263
|
+
u ? "text-white" : "text-[var(--foreground)]"
|
|
1264
1264
|
),
|
|
1265
1265
|
children: r
|
|
1266
1266
|
}
|
|
@@ -1270,14 +1270,14 @@ const We = y(
|
|
|
1270
1270
|
{
|
|
1271
1271
|
className: i(
|
|
1272
1272
|
"mt-6 text-lg lg:text-xl",
|
|
1273
|
-
|
|
1273
|
+
u ? "text-gray-200" : "text-[var(--muted-foreground)]"
|
|
1274
1274
|
),
|
|
1275
1275
|
children: l
|
|
1276
1276
|
}
|
|
1277
1277
|
),
|
|
1278
1278
|
(n || d) && /* @__PURE__ */ o("div", { className: "mt-8 flex flex-wrap gap-4", children: [
|
|
1279
1279
|
n && /* @__PURE__ */ e(
|
|
1280
|
-
|
|
1280
|
+
D,
|
|
1281
1281
|
{
|
|
1282
1282
|
size: "lg",
|
|
1283
1283
|
onClick: n.onClick,
|
|
@@ -1286,7 +1286,7 @@ const We = y(
|
|
|
1286
1286
|
}
|
|
1287
1287
|
),
|
|
1288
1288
|
d && /* @__PURE__ */ e(
|
|
1289
|
-
|
|
1289
|
+
D,
|
|
1290
1290
|
{
|
|
1291
1291
|
size: "lg",
|
|
1292
1292
|
onClick: d.onClick,
|
|
@@ -1296,17 +1296,17 @@ const We = y(
|
|
|
1296
1296
|
)
|
|
1297
1297
|
] })
|
|
1298
1298
|
] }),
|
|
1299
|
-
t === "split" &&
|
|
1299
|
+
t === "split" && p && /* @__PURE__ */ e("div", { className: "mt-8 lg:mt-0", children: p })
|
|
1300
1300
|
]
|
|
1301
1301
|
}
|
|
1302
1302
|
),
|
|
1303
|
-
t !== "split" &&
|
|
1303
|
+
t !== "split" && p && /* @__PURE__ */ e("div", { className: "relative z-10 mt-12 w-full max-w-7xl mx-auto", children: p })
|
|
1304
1304
|
]
|
|
1305
1305
|
}
|
|
1306
1306
|
)
|
|
1307
1307
|
);
|
|
1308
1308
|
We.displayName = "Hero";
|
|
1309
|
-
const J =
|
|
1309
|
+
const J = w(
|
|
1310
1310
|
({
|
|
1311
1311
|
className: a,
|
|
1312
1312
|
variant: t = "default",
|
|
@@ -1315,9 +1315,9 @@ const J = y(
|
|
|
1315
1315
|
description: l,
|
|
1316
1316
|
action: n,
|
|
1317
1317
|
...d
|
|
1318
|
-
},
|
|
1319
|
-
const
|
|
1320
|
-
default: /* @__PURE__ */ e(
|
|
1318
|
+
}, u) => {
|
|
1319
|
+
const p = r || {
|
|
1320
|
+
default: /* @__PURE__ */ e(pe, { className: "h-16 w-16" }),
|
|
1321
1321
|
search: /* @__PURE__ */ e(Y, { className: "h-16 w-16" }),
|
|
1322
1322
|
cart: /* @__PURE__ */ e($, { className: "h-16 w-16" }),
|
|
1323
1323
|
error: /* @__PURE__ */ e(fe, { className: "h-16 w-16" })
|
|
@@ -1325,18 +1325,18 @@ const J = y(
|
|
|
1325
1325
|
return /* @__PURE__ */ o(
|
|
1326
1326
|
"div",
|
|
1327
1327
|
{
|
|
1328
|
-
ref:
|
|
1328
|
+
ref: u,
|
|
1329
1329
|
className: i(
|
|
1330
1330
|
"flex flex-col items-center justify-center py-16 px-6 text-center",
|
|
1331
1331
|
a
|
|
1332
1332
|
),
|
|
1333
1333
|
...d,
|
|
1334
1334
|
children: [
|
|
1335
|
-
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--muted)] p-6 text-[var(--muted-foreground)]", children:
|
|
1335
|
+
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--muted)] p-6 text-[var(--muted-foreground)]", children: p }),
|
|
1336
1336
|
/* @__PURE__ */ e("h3", { className: "mt-6 text-xl font-semibold text-[var(--foreground)]", children: s }),
|
|
1337
1337
|
l && /* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: l }),
|
|
1338
1338
|
n && /* @__PURE__ */ e(
|
|
1339
|
-
|
|
1339
|
+
D,
|
|
1340
1340
|
{
|
|
1341
1341
|
onClick: n.onClick,
|
|
1342
1342
|
variant: "primary",
|
|
@@ -1351,7 +1351,7 @@ const J = y(
|
|
|
1351
1351
|
}
|
|
1352
1352
|
);
|
|
1353
1353
|
J.displayName = "EmptyState";
|
|
1354
|
-
const Xe =
|
|
1354
|
+
const Xe = w(
|
|
1355
1355
|
({
|
|
1356
1356
|
className: a,
|
|
1357
1357
|
type: t = "generic",
|
|
@@ -1360,10 +1360,10 @@ const Xe = y(
|
|
|
1360
1360
|
onRetry: l,
|
|
1361
1361
|
onGoHome: n,
|
|
1362
1362
|
showRetry: d = !0,
|
|
1363
|
-
showHome:
|
|
1364
|
-
...
|
|
1365
|
-
},
|
|
1366
|
-
const
|
|
1363
|
+
showHome: u = !0,
|
|
1364
|
+
...f
|
|
1365
|
+
}, p) => {
|
|
1366
|
+
const g = {
|
|
1367
1367
|
404: {
|
|
1368
1368
|
title: "Página não encontrada",
|
|
1369
1369
|
message: "A página que você está procurando não existe ou foi movida.",
|
|
@@ -1384,28 +1384,28 @@ const Xe = y(
|
|
|
1384
1384
|
message: "Ocorreu um erro inesperado. Por favor, tente novamente.",
|
|
1385
1385
|
code: ""
|
|
1386
1386
|
}
|
|
1387
|
-
}[t], h = r ||
|
|
1387
|
+
}[t], h = r || g.title, N = s || g.message;
|
|
1388
1388
|
return /* @__PURE__ */ o(
|
|
1389
1389
|
"div",
|
|
1390
1390
|
{
|
|
1391
|
-
ref:
|
|
1391
|
+
ref: p,
|
|
1392
1392
|
className: i(
|
|
1393
1393
|
"flex min-h-[500px] flex-col items-center justify-center py-16 px-6 text-center",
|
|
1394
1394
|
a
|
|
1395
1395
|
),
|
|
1396
1396
|
role: "alert",
|
|
1397
1397
|
"aria-live": "assertive",
|
|
1398
|
-
...
|
|
1398
|
+
...f,
|
|
1399
1399
|
children: [
|
|
1400
1400
|
/* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-4", children: [
|
|
1401
|
-
|
|
1402
|
-
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--destructive)]/10 p-6 text-[var(--destructive)]", children: /* @__PURE__ */ e(
|
|
1401
|
+
g.code && /* @__PURE__ */ e("h1", { className: "text-9xl font-bold text-[var(--muted)] opacity-40", children: g.code }),
|
|
1402
|
+
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--destructive)]/10 p-6 text-[var(--destructive)]", children: /* @__PURE__ */ e(ge, { className: "h-16 w-16" }) })
|
|
1403
1403
|
] }),
|
|
1404
1404
|
/* @__PURE__ */ e("h2", { className: "mt-6 text-2xl font-bold text-[var(--foreground)]", children: h }),
|
|
1405
|
-
/* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children:
|
|
1405
|
+
/* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: N }),
|
|
1406
1406
|
/* @__PURE__ */ o("div", { className: "mt-8 flex flex-wrap gap-4 justify-center", children: [
|
|
1407
1407
|
d && l && /* @__PURE__ */ e(
|
|
1408
|
-
|
|
1408
|
+
D,
|
|
1409
1409
|
{
|
|
1410
1410
|
onClick: l,
|
|
1411
1411
|
variant: "primary",
|
|
@@ -1414,8 +1414,8 @@ const Xe = y(
|
|
|
1414
1414
|
children: "Tentar novamente"
|
|
1415
1415
|
}
|
|
1416
1416
|
),
|
|
1417
|
-
|
|
1418
|
-
|
|
1417
|
+
u && n && /* @__PURE__ */ e(
|
|
1418
|
+
D,
|
|
1419
1419
|
{
|
|
1420
1420
|
onClick: n,
|
|
1421
1421
|
variant: "secondary",
|
|
@@ -1431,7 +1431,7 @@ const Xe = y(
|
|
|
1431
1431
|
}
|
|
1432
1432
|
);
|
|
1433
1433
|
Xe.displayName = "ErrorState";
|
|
1434
|
-
const Ye =
|
|
1434
|
+
const Ye = w(
|
|
1435
1435
|
({
|
|
1436
1436
|
className: a,
|
|
1437
1437
|
products: t,
|
|
@@ -1440,11 +1440,11 @@ const Ye = y(
|
|
|
1440
1440
|
isLoading: l = !1,
|
|
1441
1441
|
skeletonCount: n = 8,
|
|
1442
1442
|
emptyStateMessage: d = "Nenhum produto encontrado",
|
|
1443
|
-
onEmptyAction:
|
|
1444
|
-
renderImage:
|
|
1445
|
-
...
|
|
1443
|
+
onEmptyAction: u,
|
|
1444
|
+
renderImage: f,
|
|
1445
|
+
...p
|
|
1446
1446
|
}, v) => {
|
|
1447
|
-
const
|
|
1447
|
+
const g = {
|
|
1448
1448
|
sm: "gap-4",
|
|
1449
1449
|
md: "gap-6",
|
|
1450
1450
|
lg: "gap-8"
|
|
@@ -1455,11 +1455,11 @@ const Ye = y(
|
|
|
1455
1455
|
ref: v,
|
|
1456
1456
|
className: i(
|
|
1457
1457
|
"grid grid-cols-2 lg:grid-cols-4",
|
|
1458
|
-
|
|
1458
|
+
g[s],
|
|
1459
1459
|
a
|
|
1460
1460
|
),
|
|
1461
|
-
...
|
|
1462
|
-
children: Array.from({ length: n }).map((h,
|
|
1461
|
+
...p,
|
|
1462
|
+
children: Array.from({ length: n }).map((h, N) => /* @__PURE__ */ e(
|
|
1463
1463
|
I,
|
|
1464
1464
|
{
|
|
1465
1465
|
image: "",
|
|
@@ -1467,7 +1467,7 @@ const Ye = y(
|
|
|
1467
1467
|
price: 0,
|
|
1468
1468
|
isSkeleton: !0
|
|
1469
1469
|
},
|
|
1470
|
-
|
|
1470
|
+
N
|
|
1471
1471
|
))
|
|
1472
1472
|
}
|
|
1473
1473
|
) : t.length === 0 ? /* @__PURE__ */ e(
|
|
@@ -1476,9 +1476,9 @@ const Ye = y(
|
|
|
1476
1476
|
variant: "search",
|
|
1477
1477
|
title: d,
|
|
1478
1478
|
description: "Tente ajustar seus filtros ou realizar uma nova busca",
|
|
1479
|
-
action:
|
|
1479
|
+
action: u ? {
|
|
1480
1480
|
label: "Limpar filtros",
|
|
1481
|
-
onClick:
|
|
1481
|
+
onClick: u
|
|
1482
1482
|
} : void 0
|
|
1483
1483
|
}
|
|
1484
1484
|
) : /* @__PURE__ */ e(
|
|
@@ -1487,11 +1487,11 @@ const Ye = y(
|
|
|
1487
1487
|
ref: v,
|
|
1488
1488
|
className: i(
|
|
1489
1489
|
"grid grid-cols-2 lg:grid-cols-4",
|
|
1490
|
-
|
|
1490
|
+
g[s],
|
|
1491
1491
|
a
|
|
1492
1492
|
),
|
|
1493
|
-
...
|
|
1494
|
-
children: t.map((h,
|
|
1493
|
+
...p,
|
|
1494
|
+
children: t.map((h, N) => /* @__PURE__ */ e(I, { ...h, renderImage: h.renderImage ?? f }, N))
|
|
1495
1495
|
}
|
|
1496
1496
|
);
|
|
1497
1497
|
}
|
|
@@ -1727,36 +1727,36 @@ function nt({ children: a, as: t = "div", className: r }) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
);
|
|
1729
1729
|
}
|
|
1730
|
-
const st =
|
|
1730
|
+
const st = w(
|
|
1731
1731
|
({ className: a, onThemeChange: t, onFontSizeChange: r, showA11yLink: s = !1, ...l }, n) => {
|
|
1732
|
-
const [d,
|
|
1732
|
+
const [d, u] = C("light"), [f, p] = C(16), [v, g] = C(!1), h = ie(!1);
|
|
1733
1733
|
L(() => {
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1737
|
-
Number.isFinite(
|
|
1734
|
+
const x = localStorage.getItem("a11y-theme") ?? document.documentElement.getAttribute("data-theme") ?? "light";
|
|
1735
|
+
u(x);
|
|
1736
|
+
const S = Number(localStorage.getItem("a11y-font-size"));
|
|
1737
|
+
Number.isFinite(S) && S > 0 && p(S);
|
|
1738
1738
|
}, []);
|
|
1739
|
-
const
|
|
1739
|
+
const N = () => {
|
|
1740
1740
|
if (h.current) {
|
|
1741
|
-
const
|
|
1742
|
-
|
|
1741
|
+
const m = document.querySelector("[vw]"), x = !v;
|
|
1742
|
+
m && (m.style.visibility = x ? "" : "hidden", m.style.opacity = x ? "" : "0", m.style.pointerEvents = x ? "" : "none"), g(x);
|
|
1743
1743
|
} else {
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1746
|
-
const
|
|
1747
|
-
|
|
1748
|
-
window.VLibras && (new window.VLibras.Widget("https://vlibras.gov.br/app"), typeof window.onload == "function" && window.onload(new Event("load"))), h.current = !0,
|
|
1749
|
-
}, document.body.appendChild(
|
|
1744
|
+
const m = document.createElement("div");
|
|
1745
|
+
m.setAttribute("vw", ""), m.className = "enabled", m.innerHTML = '<div vw-access-button class="active"></div><div vw-plugin-wrapper><div class="vw-plugin-top-wrapper"></div></div>', document.body.appendChild(m);
|
|
1746
|
+
const x = document.createElement("script");
|
|
1747
|
+
x.src = "https://vlibras.gov.br/app/vlibras-plugin.js", x.async = !0, x.onload = () => {
|
|
1748
|
+
window.VLibras && (new window.VLibras.Widget("https://vlibras.gov.br/app"), typeof window.onload == "function" && window.onload(new Event("load"))), h.current = !0, g(!0);
|
|
1749
|
+
}, document.body.appendChild(x);
|
|
1750
1750
|
}
|
|
1751
|
-
},
|
|
1752
|
-
const
|
|
1753
|
-
|
|
1754
|
-
},
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1751
|
+
}, y = () => {
|
|
1752
|
+
const m = d === "light" ? "dark" : "light";
|
|
1753
|
+
u(m), document.documentElement.setAttribute("data-theme", m), localStorage.setItem("a11y-theme", m), t == null || t(m);
|
|
1754
|
+
}, c = () => {
|
|
1755
|
+
const m = Math.min(f + 2, 24);
|
|
1756
|
+
p(m), document.documentElement.style.setProperty("--font-size", `${m}px`), document.documentElement.style.fontSize = `${m}px`, localStorage.setItem("a11y-font-size", m.toString()), r == null || r(m);
|
|
1757
1757
|
}, b = () => {
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1758
|
+
const m = Math.max(f - 2, 12);
|
|
1759
|
+
p(m), document.documentElement.style.setProperty("--font-size", `${m}px`), document.documentElement.style.fontSize = `${m}px`, localStorage.setItem("a11y-font-size", m.toString()), r == null || r(m);
|
|
1760
1760
|
};
|
|
1761
1761
|
return /* @__PURE__ */ e(
|
|
1762
1762
|
"div",
|
|
@@ -1789,7 +1789,7 @@ const st = y(
|
|
|
1789
1789
|
{
|
|
1790
1790
|
type: "button",
|
|
1791
1791
|
onClick: b,
|
|
1792
|
-
disabled:
|
|
1792
|
+
disabled: f <= 12,
|
|
1793
1793
|
"aria-label": "Diminuir tamanho da fonte",
|
|
1794
1794
|
className: i(
|
|
1795
1795
|
"p-2 rounded-md transition-colors text-[var(--muted-foreground)] hover:bg-[var(--muted)]",
|
|
@@ -1804,8 +1804,8 @@ const st = y(
|
|
|
1804
1804
|
"button",
|
|
1805
1805
|
{
|
|
1806
1806
|
type: "button",
|
|
1807
|
-
onClick:
|
|
1808
|
-
disabled:
|
|
1807
|
+
onClick: c,
|
|
1808
|
+
disabled: f >= 24,
|
|
1809
1809
|
"aria-label": "Aumentar tamanho da fonte",
|
|
1810
1810
|
className: i(
|
|
1811
1811
|
"p-2 rounded-md transition-colors text-[var(--muted-foreground)] hover:bg-[var(--muted)]",
|
|
@@ -1820,20 +1820,20 @@ const st = y(
|
|
|
1820
1820
|
"button",
|
|
1821
1821
|
{
|
|
1822
1822
|
type: "button",
|
|
1823
|
-
onClick:
|
|
1823
|
+
onClick: y,
|
|
1824
1824
|
"aria-label": d === "light" ? "Ativar modo escuro" : "Ativar modo claro",
|
|
1825
1825
|
className: i(
|
|
1826
1826
|
"p-2 rounded-md transition-colors text-[var(--muted-foreground)] hover:bg-[var(--muted)]",
|
|
1827
1827
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]"
|
|
1828
1828
|
),
|
|
1829
|
-
children: d === "light" ? /* @__PURE__ */ e(
|
|
1829
|
+
children: d === "light" ? /* @__PURE__ */ e(ye, { className: "h-4 w-4" }) : /* @__PURE__ */ e(we, { className: "h-4 w-4" })
|
|
1830
1830
|
}
|
|
1831
1831
|
),
|
|
1832
1832
|
/* @__PURE__ */ e(
|
|
1833
1833
|
"button",
|
|
1834
1834
|
{
|
|
1835
1835
|
type: "button",
|
|
1836
|
-
onClick:
|
|
1836
|
+
onClick: N,
|
|
1837
1837
|
"aria-label": "Ativar VLibras",
|
|
1838
1838
|
"aria-pressed": v,
|
|
1839
1839
|
className: i(
|
|
@@ -1855,7 +1855,7 @@ const st = y(
|
|
|
1855
1855
|
}
|
|
1856
1856
|
);
|
|
1857
1857
|
st.displayName = "TopAccessibilityBar";
|
|
1858
|
-
const lt =
|
|
1858
|
+
const lt = w(
|
|
1859
1859
|
({
|
|
1860
1860
|
className: a,
|
|
1861
1861
|
slides: t,
|
|
@@ -1863,26 +1863,26 @@ const lt = y(
|
|
|
1863
1863
|
autoplay: s = !0,
|
|
1864
1864
|
...l
|
|
1865
1865
|
}, n) => {
|
|
1866
|
-
const [d,
|
|
1866
|
+
const [d, u] = C(0), [f, p] = C(!1), [v, g] = C(!1);
|
|
1867
1867
|
L(() => {
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1870
|
-
const b = (
|
|
1871
|
-
|
|
1868
|
+
const c = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
1869
|
+
g(c.matches);
|
|
1870
|
+
const b = (m) => {
|
|
1871
|
+
g(m.matches);
|
|
1872
1872
|
};
|
|
1873
|
-
return
|
|
1873
|
+
return c.addEventListener("change", b), () => c.removeEventListener("change", b);
|
|
1874
1874
|
}, []), L(() => {
|
|
1875
|
-
if (!s ||
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1875
|
+
if (!s || f || v) return;
|
|
1876
|
+
const c = setInterval(() => {
|
|
1877
|
+
u((b) => (b + 1) % t.length);
|
|
1878
1878
|
}, r);
|
|
1879
|
-
return () => clearInterval(
|
|
1880
|
-
}, [s, r, t.length,
|
|
1881
|
-
const h = (
|
|
1882
|
-
c
|
|
1883
|
-
}, x = () => {
|
|
1884
|
-
h((d - 1 + t.length) % t.length);
|
|
1879
|
+
return () => clearInterval(c);
|
|
1880
|
+
}, [s, r, t.length, f, v]);
|
|
1881
|
+
const h = (c) => {
|
|
1882
|
+
u(c), p(!0), setTimeout(() => p(!1), r);
|
|
1885
1883
|
}, N = () => {
|
|
1884
|
+
h((d - 1 + t.length) % t.length);
|
|
1885
|
+
}, y = () => {
|
|
1886
1886
|
h((d + 1) % t.length);
|
|
1887
1887
|
};
|
|
1888
1888
|
return t.length === 0 ? null : (t[d], /* @__PURE__ */ o(
|
|
@@ -1890,67 +1890,74 @@ const lt = y(
|
|
|
1890
1890
|
{
|
|
1891
1891
|
ref: n,
|
|
1892
1892
|
className: i("w-full", a),
|
|
1893
|
-
onMouseEnter: () =>
|
|
1894
|
-
onMouseLeave: () =>
|
|
1893
|
+
onMouseEnter: () => p(!0),
|
|
1894
|
+
onMouseLeave: () => p(!1),
|
|
1895
1895
|
...l,
|
|
1896
1896
|
children: [
|
|
1897
1897
|
/* @__PURE__ */ o("div", { className: "relative w-full overflow-hidden", children: [
|
|
1898
|
-
/* @__PURE__ */ e("div", { className: "relative", children: t.map((
|
|
1899
|
-
|
|
1900
|
-
{
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
"
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
"
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1898
|
+
/* @__PURE__ */ e("div", { className: "relative", children: t.map((c, b) => {
|
|
1899
|
+
var S;
|
|
1900
|
+
const m = (S = c.cta) == null ? void 0 : S.href, x = /* @__PURE__ */ o(P, { children: [
|
|
1901
|
+
/* @__PURE__ */ o("picture", { children: [
|
|
1902
|
+
/* @__PURE__ */ e(
|
|
1903
|
+
"source",
|
|
1904
|
+
{
|
|
1905
|
+
media: "(min-width: 1024px)",
|
|
1906
|
+
srcSet: `${c.imageDesktop} 1x, ${c.imageDesktop.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`
|
|
1907
|
+
}
|
|
1908
|
+
),
|
|
1909
|
+
/* @__PURE__ */ e(
|
|
1910
|
+
"source",
|
|
1911
|
+
{
|
|
1912
|
+
media: "(min-width: 768px)",
|
|
1913
|
+
srcSet: `${c.imageTablet} 1x, ${c.imageTablet.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`
|
|
1914
|
+
}
|
|
1915
|
+
),
|
|
1916
|
+
/* @__PURE__ */ e(
|
|
1917
|
+
"img",
|
|
1918
|
+
{
|
|
1919
|
+
src: c.imageMobile,
|
|
1920
|
+
srcSet: `${c.imageMobile} 1x, ${c.imageMobile.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`,
|
|
1921
|
+
alt: c.title,
|
|
1922
|
+
className: "w-full object-cover aspect-3/2 md:aspect-video lg:aspect-1920/560",
|
|
1923
|
+
loading: b === 0 ? "eager" : "lazy"
|
|
1924
|
+
}
|
|
1925
|
+
)
|
|
1926
|
+
] }),
|
|
1927
|
+
c.showOverlay && /* @__PURE__ */ o("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: [
|
|
1928
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl font-bold text-white md:text-3xl", children: c.title }),
|
|
1929
|
+
c.description && /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-gray-200 md:text-base", children: c.description }),
|
|
1930
|
+
c.cta && (m ? (
|
|
1931
|
+
// Slide já é um <a> — CTA vira <span> decorativo para evitar nested anchors
|
|
1932
|
+
/* @__PURE__ */ e("span", { 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", children: c.cta.label })
|
|
1933
|
+
) : /* @__PURE__ */ e(
|
|
1934
|
+
"a",
|
|
1935
|
+
{
|
|
1936
|
+
href: c.cta.href,
|
|
1937
|
+
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",
|
|
1938
|
+
children: c.cta.label
|
|
1939
|
+
}
|
|
1940
|
+
))
|
|
1941
|
+
] })
|
|
1942
|
+
] });
|
|
1943
|
+
return /* @__PURE__ */ e(
|
|
1944
|
+
"div",
|
|
1945
|
+
{
|
|
1946
|
+
className: i(
|
|
1947
|
+
"w-full transition-opacity duration-700",
|
|
1948
|
+
b === d ? "block" : "hidden"
|
|
1949
|
+
),
|
|
1950
|
+
"aria-hidden": b !== d,
|
|
1951
|
+
children: m ? /* @__PURE__ */ e("a", { href: m, "aria-label": c.title, className: "relative block cursor-pointer", children: x }) : /* @__PURE__ */ e("div", { className: "relative", children: x })
|
|
1952
|
+
},
|
|
1953
|
+
c.id
|
|
1954
|
+
);
|
|
1955
|
+
}) }),
|
|
1949
1956
|
t.length > 1 && /* @__PURE__ */ o(P, { children: [
|
|
1950
1957
|
/* @__PURE__ */ e(
|
|
1951
1958
|
"button",
|
|
1952
1959
|
{
|
|
1953
|
-
onClick:
|
|
1960
|
+
onClick: N,
|
|
1954
1961
|
className: "absolute left-4 top-1/2 -translate-y-1/2 rounded-full bg-white/50 p-2 shadow-lg transition-all hover:bg-white/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring min-w-11 min-h-11",
|
|
1955
1962
|
"aria-label": "Slide anterior",
|
|
1956
1963
|
children: /* @__PURE__ */ e(ke, { className: "h-6 w-6 text-gray-900" })
|
|
@@ -1959,7 +1966,7 @@ const lt = y(
|
|
|
1959
1966
|
/* @__PURE__ */ e(
|
|
1960
1967
|
"button",
|
|
1961
1968
|
{
|
|
1962
|
-
onClick:
|
|
1969
|
+
onClick: y,
|
|
1963
1970
|
className: "absolute right-4 top-1/2 -translate-y-1/2 rounded-full bg-white/50 p-2 shadow-lg transition-all hover:bg-white/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring min-w-11 min-h-11",
|
|
1964
1971
|
"aria-label": "Próximo slide",
|
|
1965
1972
|
children: /* @__PURE__ */ e(K, { className: "h-6 w-6 text-gray-900" })
|
|
@@ -1967,7 +1974,7 @@ const lt = y(
|
|
|
1967
1974
|
)
|
|
1968
1975
|
] })
|
|
1969
1976
|
] }),
|
|
1970
|
-
t.length > 1 && /* @__PURE__ */ e("div", { className: "flex justify-center gap-2 py-3", children: t.map((
|
|
1977
|
+
t.length > 1 && /* @__PURE__ */ e("div", { className: "flex justify-center gap-2 py-3", children: t.map((c, b) => /* @__PURE__ */ e(
|
|
1971
1978
|
"button",
|
|
1972
1979
|
{
|
|
1973
1980
|
onClick: () => h(b),
|
|
@@ -2010,7 +2017,7 @@ function dt({
|
|
|
2010
2017
|
...s,
|
|
2011
2018
|
children: [
|
|
2012
2019
|
t,
|
|
2013
|
-
r && /* @__PURE__ */ e(
|
|
2020
|
+
r && /* @__PURE__ */ e(pt, {})
|
|
2014
2021
|
]
|
|
2015
2022
|
}
|
|
2016
2023
|
);
|
|
@@ -2089,7 +2096,7 @@ function ft({
|
|
|
2089
2096
|
}
|
|
2090
2097
|
);
|
|
2091
2098
|
}
|
|
2092
|
-
function
|
|
2099
|
+
function pt({
|
|
2093
2100
|
className: a,
|
|
2094
2101
|
...t
|
|
2095
2102
|
}) {
|
|
@@ -2129,7 +2136,7 @@ function q({
|
|
|
2129
2136
|
}
|
|
2130
2137
|
);
|
|
2131
2138
|
}
|
|
2132
|
-
function
|
|
2139
|
+
function gt({ items: a }) {
|
|
2133
2140
|
return /* @__PURE__ */ e("ul", { className: "grid gap-0.5 p-2 min-w-[180px]", role: "none", children: a.map(
|
|
2134
2141
|
(t) => {
|
|
2135
2142
|
var r;
|
|
@@ -2211,11 +2218,11 @@ function ee({ item: a, depth: t = 0 }) {
|
|
|
2211
2218
|
)
|
|
2212
2219
|
] });
|
|
2213
2220
|
}
|
|
2214
|
-
const vt =
|
|
2215
|
-
({ items: a, logo: t, rightSlot: r, searchSlot: s, drawerFooter: l, className: n, ...d },
|
|
2221
|
+
const vt = w(
|
|
2222
|
+
({ items: a, logo: t, rightSlot: r, searchSlot: s, drawerFooter: l, className: n, ...d }, u) => /* @__PURE__ */ e(
|
|
2216
2223
|
"header",
|
|
2217
2224
|
{
|
|
2218
|
-
ref:
|
|
2225
|
+
ref: u,
|
|
2219
2226
|
className: i(
|
|
2220
2227
|
"sticky top-0 z-40 border-b border-[var(--border)] bg-[var(--card)]",
|
|
2221
2228
|
n
|
|
@@ -2248,7 +2255,7 @@ const vt = y(
|
|
|
2248
2255
|
{
|
|
2249
2256
|
"aria-label": "Menu principal",
|
|
2250
2257
|
className: "flex-1 overflow-y-auto px-5 py-3",
|
|
2251
|
-
children: /* @__PURE__ */ e("div", { className: "divide-y divide-[var(--border)]", children: a.map((
|
|
2258
|
+
children: /* @__PURE__ */ e("div", { className: "divide-y divide-[var(--border)]", children: a.map((f) => /* @__PURE__ */ e("div", { className: "py-0.5", children: /* @__PURE__ */ e(ee, { item: f }) }, f.id)) })
|
|
2252
2259
|
}
|
|
2253
2260
|
),
|
|
2254
2261
|
l && /* @__PURE__ */ e("div", { className: "border-t border-[var(--border)] px-5 py-4", children: l })
|
|
@@ -2261,19 +2268,19 @@ const vt = y(
|
|
|
2261
2268
|
"aria-label": "Menu principal",
|
|
2262
2269
|
className: "hidden border-t border-[var(--border)] py-2 md:flex",
|
|
2263
2270
|
children: /* @__PURE__ */ e(dt, { children: /* @__PURE__ */ e(ct, { children: a.map(
|
|
2264
|
-
(
|
|
2265
|
-
var
|
|
2266
|
-
return (
|
|
2267
|
-
/* @__PURE__ */ e(mt, { className: "h-9 bg-transparent text-sm text-[var(--foreground)] hover:bg-[var(--accent)]", children:
|
|
2268
|
-
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(
|
|
2269
|
-
] },
|
|
2271
|
+
(f) => {
|
|
2272
|
+
var p;
|
|
2273
|
+
return (p = f.children) != null && p.length ? /* @__PURE__ */ o(W, { children: [
|
|
2274
|
+
/* @__PURE__ */ e(mt, { className: "h-9 bg-transparent text-sm text-[var(--foreground)] hover:bg-[var(--accent)]", children: f.label }),
|
|
2275
|
+
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(gt, { items: f.children }) })
|
|
2276
|
+
] }, f.id) : /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(
|
|
2270
2277
|
q,
|
|
2271
2278
|
{
|
|
2272
|
-
href:
|
|
2279
|
+
href: f.href ?? "#",
|
|
2273
2280
|
className: "inline-flex h-9 items-center rounded-md px-4 text-sm font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
|
|
2274
|
-
children:
|
|
2281
|
+
children: f.label
|
|
2275
2282
|
}
|
|
2276
|
-
) },
|
|
2283
|
+
) }, f.id);
|
|
2277
2284
|
}
|
|
2278
2285
|
) }) })
|
|
2279
2286
|
}
|
|
@@ -2398,8 +2405,8 @@ function Nt({ title: a, links: t }) {
|
|
|
2398
2405
|
)
|
|
2399
2406
|
] });
|
|
2400
2407
|
}
|
|
2401
|
-
const
|
|
2402
|
-
const [
|
|
2408
|
+
const yt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r, playStoreUrl: s, appStoreUrl: l, orgInfo: n, navColumns: d, className: u, ...f }) => {
|
|
2409
|
+
const [p, v] = C("light");
|
|
2403
2410
|
L(() => {
|
|
2404
2411
|
const z = document.documentElement;
|
|
2405
2412
|
v(z.getAttribute("data-theme") ?? "light");
|
|
@@ -2408,16 +2415,16 @@ const wt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r
|
|
|
2408
2415
|
});
|
|
2409
2416
|
return B.observe(z, { attributes: !0, attributeFilter: ["data-theme"] }), () => B.disconnect();
|
|
2410
2417
|
}, []);
|
|
2411
|
-
const
|
|
2418
|
+
const g = a === "perabook" ? p === "dark" ? "/logos/logo_PeraBook_institucional_tarja_branca.png" : "/logos/PeraBook_instituicional.png" : p === "dark" ? "/logos/logo_elo_editora_texto_branco.png" : "/logos/logo_elo_institucional.png", h = a === "perabook" ? "PeraBook" : "Elo Editora", N = bt.map((z) => ({
|
|
2412
2419
|
...z,
|
|
2413
2420
|
href: (n == null ? void 0 : n[z.key]) ?? z.href
|
|
2414
|
-
})).filter((z) => z.href),
|
|
2421
|
+
})).filter((z) => z.href), y = (n == null ? void 0 : n.email) ?? "contato@grupoeloediorial.com.br", c = (n == null ? void 0 : n.phone) ?? "(11) 3000-0000", b = n == null ? void 0 : n.fullAddress, m = p === "dark" && (n == null ? void 0 : n.googlePlayBadgeUrlDark) || (n == null ? void 0 : n.googlePlayBadgeUrl) || "", x = p === "dark" && (n == null ? void 0 : n.appStoreBadgeUrlDark) || (n == null ? void 0 : n.appStoreBadgeUrl) || "", S = !!(m || x);
|
|
2415
2422
|
return /* @__PURE__ */ o(
|
|
2416
2423
|
"footer",
|
|
2417
2424
|
{
|
|
2418
|
-
className: i("border-t border-[var(--border)] bg-[var(--card)] text-[var(--foreground)]",
|
|
2425
|
+
className: i("border-t border-[var(--border)] bg-[var(--card)] text-[var(--foreground)]", u),
|
|
2419
2426
|
"aria-label": "Rodapé do site",
|
|
2420
|
-
...
|
|
2427
|
+
...f,
|
|
2421
2428
|
children: [
|
|
2422
2429
|
r !== void 0 ? r : /* @__PURE__ */ e(xt, { onSubmit: t }),
|
|
2423
2430
|
/* @__PURE__ */ o("div", { className: "mx-auto max-w-screen-xl px-4", children: [
|
|
@@ -2426,7 +2433,7 @@ const wt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r
|
|
|
2426
2433
|
/* @__PURE__ */ e(
|
|
2427
2434
|
"img",
|
|
2428
2435
|
{
|
|
2429
|
-
src:
|
|
2436
|
+
src: g,
|
|
2430
2437
|
alt: h,
|
|
2431
2438
|
width: 290,
|
|
2432
2439
|
height: 96,
|
|
@@ -2435,18 +2442,18 @@ const wt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r
|
|
|
2435
2442
|
),
|
|
2436
2443
|
/* @__PURE__ */ o("div", { className: "mt-6 space-y-1 text-sm", children: [
|
|
2437
2444
|
/* @__PURE__ */ e("p", { className: "text-[var(--muted-foreground)]", children: "Atendimento:" }),
|
|
2438
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-[var(--foreground)]", children:
|
|
2439
|
-
/* @__PURE__ */ e("p", { className: "font-medium text-[var(--foreground)]", children:
|
|
2445
|
+
/* @__PURE__ */ e("p", { className: "font-medium text-[var(--foreground)]", children: y }),
|
|
2446
|
+
/* @__PURE__ */ e("p", { className: "font-medium text-[var(--foreground)]", children: c }),
|
|
2440
2447
|
b && /* @__PURE__ */ e("p", { className: "whitespace-pre-line text-[var(--muted-foreground)]", children: b.replace(/\\n/g, `
|
|
2441
2448
|
`) })
|
|
2442
2449
|
] })
|
|
2443
2450
|
] }),
|
|
2444
2451
|
(d ?? ht).map((z) => /* @__PURE__ */ e(Nt, { title: z.title, links: z.links }, z.id)),
|
|
2445
2452
|
/* @__PURE__ */ o("div", { className: "mb-8 md:mb-0", children: [
|
|
2446
|
-
|
|
2453
|
+
S && /* @__PURE__ */ o(P, { children: [
|
|
2447
2454
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold uppercase tracking-wide text-[var(--foreground)]", children: "Baixe nosso app" }),
|
|
2448
2455
|
/* @__PURE__ */ o("div", { className: "mt-3 flex flex-col gap-2", children: [
|
|
2449
|
-
|
|
2456
|
+
m && /* @__PURE__ */ e(
|
|
2450
2457
|
"a",
|
|
2451
2458
|
{
|
|
2452
2459
|
href: s ?? "#",
|
|
@@ -2457,17 +2464,17 @@ const wt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r
|
|
|
2457
2464
|
children: /* @__PURE__ */ e(
|
|
2458
2465
|
"img",
|
|
2459
2466
|
{
|
|
2460
|
-
src:
|
|
2467
|
+
src: m,
|
|
2461
2468
|
alt: "Disponível no Google Play",
|
|
2462
2469
|
width: 135,
|
|
2463
2470
|
height: 40,
|
|
2464
2471
|
className: "h-10 w-[135px] object-contain"
|
|
2465
2472
|
},
|
|
2466
|
-
|
|
2473
|
+
m
|
|
2467
2474
|
)
|
|
2468
2475
|
}
|
|
2469
2476
|
),
|
|
2470
|
-
|
|
2477
|
+
x && /* @__PURE__ */ e(
|
|
2471
2478
|
"a",
|
|
2472
2479
|
{
|
|
2473
2480
|
href: l ?? "#",
|
|
@@ -2478,20 +2485,20 @@ const wt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r
|
|
|
2478
2485
|
children: /* @__PURE__ */ e(
|
|
2479
2486
|
"img",
|
|
2480
2487
|
{
|
|
2481
|
-
src:
|
|
2488
|
+
src: x,
|
|
2482
2489
|
alt: "Disponível na App Store",
|
|
2483
2490
|
width: 135,
|
|
2484
2491
|
height: 40,
|
|
2485
2492
|
className: "h-10 w-[135px] object-contain"
|
|
2486
2493
|
},
|
|
2487
|
-
|
|
2494
|
+
x
|
|
2488
2495
|
)
|
|
2489
2496
|
}
|
|
2490
2497
|
)
|
|
2491
2498
|
] })
|
|
2492
2499
|
] }),
|
|
2493
2500
|
/* @__PURE__ */ e("p", { className: "mt-6 text-sm font-semibold uppercase tracking-wide text-[var(--foreground)]", children: "Compartilhe" }),
|
|
2494
|
-
/* @__PURE__ */ e("div", { className: "mt-3 flex flex-wrap gap-2", "aria-label": "Compartilhe nas redes sociais", children:
|
|
2501
|
+
/* @__PURE__ */ e("div", { className: "mt-3 flex flex-wrap gap-2", "aria-label": "Compartilhe nas redes sociais", children: N.map(({ label: z, href: B, Icon: te }) => /* @__PURE__ */ e(
|
|
2495
2502
|
"a",
|
|
2496
2503
|
{
|
|
2497
2504
|
href: B,
|
|
@@ -2522,7 +2529,7 @@ const wt = ({ brand: a = "elo-editora", onNewsletterSubmit: t, newsletterSlot: r
|
|
|
2522
2529
|
}
|
|
2523
2530
|
);
|
|
2524
2531
|
};
|
|
2525
|
-
|
|
2532
|
+
yt.displayName = "Footer";
|
|
2526
2533
|
function la({ children: a, className: t }) {
|
|
2527
2534
|
return /* @__PURE__ */ e(
|
|
2528
2535
|
"div",
|
|
@@ -2536,7 +2543,7 @@ function la({ children: a, className: t }) {
|
|
|
2536
2543
|
}
|
|
2537
2544
|
);
|
|
2538
2545
|
}
|
|
2539
|
-
const
|
|
2546
|
+
const wt = {
|
|
2540
2547
|
1: "col-span-1",
|
|
2541
2548
|
2: "col-span-2",
|
|
2542
2549
|
3: "col-span-3",
|
|
@@ -2545,7 +2552,7 @@ const yt = {
|
|
|
2545
2552
|
6: "col-span-6"
|
|
2546
2553
|
};
|
|
2547
2554
|
function da({ children: a, span: t, className: r }) {
|
|
2548
|
-
return /* @__PURE__ */ e("div", { "data-slot": "col", className: i("min-w-0", t &&
|
|
2555
|
+
return /* @__PURE__ */ e("div", { "data-slot": "col", className: i("min-w-0", t && wt[t], r), children: a });
|
|
2549
2556
|
}
|
|
2550
2557
|
export {
|
|
2551
2558
|
Qt as Accordion,
|
|
@@ -2560,7 +2567,7 @@ export {
|
|
|
2560
2567
|
It as BreadcrumbList,
|
|
2561
2568
|
Gt as BreadcrumbPage,
|
|
2562
2569
|
Ht as BreadcrumbSeparator,
|
|
2563
|
-
|
|
2570
|
+
D as Button,
|
|
2564
2571
|
Rt as Checkbox,
|
|
2565
2572
|
da as Col,
|
|
2566
2573
|
nt as Container,
|
|
@@ -2574,7 +2581,7 @@ export {
|
|
|
2574
2581
|
Ze as Drawer,
|
|
2575
2582
|
J as EmptyState,
|
|
2576
2583
|
Xe as ErrorState,
|
|
2577
|
-
|
|
2584
|
+
yt as Footer,
|
|
2578
2585
|
He as FormGroup,
|
|
2579
2586
|
la as Grid,
|
|
2580
2587
|
We as Hero,
|
|
@@ -2585,7 +2592,7 @@ export {
|
|
|
2585
2592
|
Ue as PriceDisplay,
|
|
2586
2593
|
I as ProductCard,
|
|
2587
2594
|
Ye as ProductGrid,
|
|
2588
|
-
|
|
2595
|
+
pa as ProgressBar,
|
|
2589
2596
|
Ge as QuantitySelector,
|
|
2590
2597
|
Tt as RadioGroup,
|
|
2591
2598
|
$t as RadioGroupItem,
|