@grupo-elo-editorial/shared-ui-react 1.0.0
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/README.md +184 -0
- package/dist/components/atoms/Avatar.d.ts +12 -0
- package/dist/components/atoms/Badge.d.ts +12 -0
- package/dist/components/atoms/Button.d.ts +14 -0
- package/dist/components/atoms/Divider.d.ts +8 -0
- package/dist/components/atoms/Rating.d.ts +11 -0
- package/dist/components/atoms/Spinner.d.ts +10 -0
- package/dist/components/atoms/Textarea.d.ts +7 -0
- package/dist/components/atoms/index.d.ts +19 -0
- package/dist/components/figma/ImageWithFallback.d.ts +2 -0
- package/dist/components/molecules/FormGroup.d.ts +11 -0
- package/dist/components/molecules/PriceDisplay.d.ts +14 -0
- package/dist/components/molecules/ProductCard.d.ts +18 -0
- package/dist/components/molecules/QuantitySelector.d.ts +12 -0
- package/dist/components/molecules/SearchBar.d.ts +9 -0
- package/dist/components/molecules/index.d.ts +15 -0
- package/dist/components/organisms/EmptyState.d.ts +13 -0
- package/dist/components/organisms/ErrorState.d.ts +12 -0
- package/dist/components/organisms/Hero.d.ts +20 -0
- package/dist/components/organisms/ProductGrid.d.ts +13 -0
- package/dist/components/organisms/index.d.ts +10 -0
- package/dist/components/prd/HeroCarousel.d.ts +20 -0
- package/dist/components/prd/TopAccessibilityBar.d.ts +7 -0
- package/dist/components/prd/index.d.ts +4 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/alert-dialog.d.ts +14 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/calendar.d.ts +4 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/command.d.ts +16 -0
- package/dist/components/ui/context-menu.d.ts +25 -0
- package/dist/components/ui/dialog.d.ts +13 -0
- package/dist/components/ui/drawer.d.ts +13 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/sheet.d.ts +13 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/toggle-group.d.ts +7 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/use-mobile.d.ts +1 -0
- package/dist/components/ui/utils.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1914 -0
- package/dist/index.js.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +116 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1914 @@
|
|
|
1
|
+
import { clsx as K } from "clsx";
|
|
2
|
+
import { twMerge as J } from "tailwind-merge";
|
|
3
|
+
import { jsx as e, jsxs as s, Fragment as j } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as N, useState as k, useEffect as D } from "react";
|
|
5
|
+
import { Loader2 as E, User as Y, Star as Z, CheckIcon as V, ChevronDownIcon as B, ChevronUpIcon as O, CircleIcon as ee, Heart as te, ShoppingCart as _, Search as L, X as ae, Minus as H, Plus as q, ChevronRight as F, FileX as re, Package as ie, AlertCircle as se, RefreshCw as oe, Home as ne, XIcon as G, Eye as le, Moon as de, Sun as ce, ChevronLeft as ue } from "lucide-react";
|
|
6
|
+
import { cva as $ } from "class-variance-authority";
|
|
7
|
+
import * as y from "@radix-ui/react-select";
|
|
8
|
+
import * as A from "@radix-ui/react-checkbox";
|
|
9
|
+
import * as T from "@radix-ui/react-radio-group";
|
|
10
|
+
import * as M from "@radix-ui/react-switch";
|
|
11
|
+
import { Slot as me } from "@radix-ui/react-slot";
|
|
12
|
+
import * as I from "@radix-ui/react-accordion";
|
|
13
|
+
import * as C from "@radix-ui/react-tooltip";
|
|
14
|
+
import { toast as jt } from "sonner";
|
|
15
|
+
import { Progress as Pt } from "@radix-ui/react-progress";
|
|
16
|
+
import * as w from "@radix-ui/react-dialog";
|
|
17
|
+
function i(...a) {
|
|
18
|
+
return J(K(a));
|
|
19
|
+
}
|
|
20
|
+
const Q = $(
|
|
21
|
+
"inline-flex items-center justify-center gap-2 rounded-lg font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 whitespace-nowrap",
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
primary: "bg-[var(--brand-primary)] text-[var(--primary-foreground)] hover:bg-[var(--brand-primary-hover)] active:bg-[var(--brand-primary-active)] shadow-sm",
|
|
26
|
+
secondary: "border-2 border-[var(--brand-primary)] text-[var(--brand-primary)] bg-transparent hover:bg-[var(--brand-primary)] hover:text-[var(--primary-foreground)] active:bg-[var(--brand-primary-active)]",
|
|
27
|
+
ghost: "text-[var(--brand-primary)] bg-transparent hover:bg-[var(--accent)] active:bg-[var(--accent)]",
|
|
28
|
+
danger: "bg-[var(--destructive)] text-[var(--destructive-foreground)] hover:opacity-90 active:opacity-80 shadow-sm",
|
|
29
|
+
link: "text-[var(--brand-primary)] underline-offset-4 hover:underline p-0 h-auto",
|
|
30
|
+
success: "bg-[var(--success)] text-[var(--success-foreground)] hover:opacity-90 active:opacity-80 shadow-sm"
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
sm: "h-9 px-3 text-sm min-w-[44px]",
|
|
34
|
+
md: "h-11 px-4 text-base min-w-[44px]",
|
|
35
|
+
lg: "h-14 px-6 text-lg min-w-[44px]"
|
|
36
|
+
},
|
|
37
|
+
fullWidth: {
|
|
38
|
+
true: "w-full"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: "primary",
|
|
43
|
+
size: "md"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
), z = N(
|
|
47
|
+
({
|
|
48
|
+
className: a,
|
|
49
|
+
variant: t,
|
|
50
|
+
size: r,
|
|
51
|
+
fullWidth: o,
|
|
52
|
+
isLoading: n,
|
|
53
|
+
leftIcon: d,
|
|
54
|
+
rightIcon: l,
|
|
55
|
+
children: c,
|
|
56
|
+
disabled: g,
|
|
57
|
+
...f
|
|
58
|
+
}, p) => /* @__PURE__ */ e(
|
|
59
|
+
"button",
|
|
60
|
+
{
|
|
61
|
+
className: i(Q({ variant: t, size: r, fullWidth: o, className: a })),
|
|
62
|
+
ref: p,
|
|
63
|
+
disabled: g || n,
|
|
64
|
+
...f,
|
|
65
|
+
children: n ? /* @__PURE__ */ s(j, { children: [
|
|
66
|
+
/* @__PURE__ */ e(E, { className: "h-4 w-4 animate-spin" }),
|
|
67
|
+
c && /* @__PURE__ */ e("span", { children: c })
|
|
68
|
+
] }) : /* @__PURE__ */ s(j, { children: [
|
|
69
|
+
d && /* @__PURE__ */ e("span", { className: "inline-flex", children: d }),
|
|
70
|
+
c,
|
|
71
|
+
l && /* @__PURE__ */ e("span", { className: "inline-flex", children: l })
|
|
72
|
+
] })
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
z.displayName = "Button";
|
|
77
|
+
const fe = N(
|
|
78
|
+
({ className: a, error: t, helperText: r, ...o }, n) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
79
|
+
/* @__PURE__ */ e(
|
|
80
|
+
"textarea",
|
|
81
|
+
{
|
|
82
|
+
className: i(
|
|
83
|
+
"flex min-h-[80px] w-full rounded-lg border-2 border-[var(--border)] bg-[var(--input-background)] px-3 py-2 text-base transition-colors",
|
|
84
|
+
"placeholder:text-[var(--muted-foreground)]",
|
|
85
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
86
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
87
|
+
"resize-y",
|
|
88
|
+
t && "border-[var(--destructive)] focus-visible:ring-[var(--destructive)]",
|
|
89
|
+
a
|
|
90
|
+
),
|
|
91
|
+
ref: n,
|
|
92
|
+
...o
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
r && /* @__PURE__ */ e(
|
|
96
|
+
"p",
|
|
97
|
+
{
|
|
98
|
+
className: i(
|
|
99
|
+
"mt-1.5 text-sm",
|
|
100
|
+
t ? "text-[var(--destructive)]" : "text-[var(--muted-foreground)]"
|
|
101
|
+
),
|
|
102
|
+
children: r
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
] })
|
|
106
|
+
);
|
|
107
|
+
fe.displayName = "Textarea";
|
|
108
|
+
const ge = $(
|
|
109
|
+
"inline-flex items-center rounded-full font-medium transition-colors whitespace-nowrap",
|
|
110
|
+
{
|
|
111
|
+
variants: {
|
|
112
|
+
variant: {
|
|
113
|
+
default: "bg-[var(--primary)] text-[var(--primary-foreground)]",
|
|
114
|
+
secondary: "bg-[var(--secondary)] text-[var(--secondary-foreground)]",
|
|
115
|
+
success: "bg-[var(--success)] text-[var(--success-foreground)]",
|
|
116
|
+
warning: "bg-[var(--warning)] text-[var(--warning-foreground)]",
|
|
117
|
+
danger: "bg-[var(--destructive)] text-[var(--destructive-foreground)]",
|
|
118
|
+
outline: "border-2 border-[var(--brand-primary)] text-[var(--brand-primary)] bg-transparent",
|
|
119
|
+
info: "bg-[var(--info)] text-[var(--info-foreground)]"
|
|
120
|
+
},
|
|
121
|
+
size: {
|
|
122
|
+
sm: "px-2 py-0.5 text-xs",
|
|
123
|
+
md: "px-2.5 py-1 text-sm",
|
|
124
|
+
lg: "px-3 py-1.5 text-base"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
defaultVariants: {
|
|
128
|
+
variant: "default",
|
|
129
|
+
size: "md"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
), P = N(
|
|
133
|
+
({ className: a, variant: t, size: r, icon: o, onRemove: n, children: d, ...l }, c) => /* @__PURE__ */ s(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
ref: c,
|
|
137
|
+
className: i(ge({ variant: t, size: r }), a),
|
|
138
|
+
...l,
|
|
139
|
+
children: [
|
|
140
|
+
o && /* @__PURE__ */ e("span", { className: "mr-1 inline-flex", children: o }),
|
|
141
|
+
d,
|
|
142
|
+
n && /* @__PURE__ */ e(
|
|
143
|
+
"button",
|
|
144
|
+
{
|
|
145
|
+
onClick: n,
|
|
146
|
+
className: "ml-1 inline-flex hover:opacity-70 focus:outline-none focus:ring-1 focus:ring-[var(--ring)] rounded-full",
|
|
147
|
+
"aria-label": "Remove",
|
|
148
|
+
children: "×"
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
);
|
|
155
|
+
P.displayName = "Badge";
|
|
156
|
+
const pe = $(
|
|
157
|
+
"relative inline-flex items-center justify-center overflow-hidden rounded-full bg-[var(--muted)] text-[var(--muted-foreground)] flex-shrink-0",
|
|
158
|
+
{
|
|
159
|
+
variants: {
|
|
160
|
+
size: {
|
|
161
|
+
sm: "h-8 w-8 text-sm",
|
|
162
|
+
md: "h-10 w-10 text-base",
|
|
163
|
+
lg: "h-12 w-12 text-lg",
|
|
164
|
+
xl: "h-16 w-16 text-xl"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
defaultVariants: {
|
|
168
|
+
size: "md"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
), ve = N(
|
|
172
|
+
({ className: a, size: t, src: r, alt: o, name: n, showStatus: d, statusType: l = "online", ...c }, g) => {
|
|
173
|
+
const [f, p] = k(!1), v = (m) => m.split(" ").map((u) => u[0]).join("").toUpperCase().slice(0, 2), b = {
|
|
174
|
+
online: "bg-[var(--success)]",
|
|
175
|
+
offline: "bg-[var(--muted-foreground)]",
|
|
176
|
+
away: "bg-[var(--warning)]",
|
|
177
|
+
busy: "bg-[var(--destructive)]"
|
|
178
|
+
}, h = {
|
|
179
|
+
sm: "h-2 w-2 border",
|
|
180
|
+
md: "h-2.5 w-2.5 border-2",
|
|
181
|
+
lg: "h-3 w-3 border-2",
|
|
182
|
+
xl: "h-4 w-4 border-2"
|
|
183
|
+
};
|
|
184
|
+
return /* @__PURE__ */ s("div", { ref: g, className: i(pe({ size: t }), "relative", a), children: [
|
|
185
|
+
r && !f ? /* @__PURE__ */ e(
|
|
186
|
+
"img",
|
|
187
|
+
{
|
|
188
|
+
src: r,
|
|
189
|
+
alt: o || n || "Avatar",
|
|
190
|
+
onError: () => p(!0),
|
|
191
|
+
className: "h-full w-full object-cover",
|
|
192
|
+
...c
|
|
193
|
+
}
|
|
194
|
+
) : n ? /* @__PURE__ */ e("span", { className: "font-medium", children: v(n) }) : /* @__PURE__ */ e(Y, { className: "h-1/2 w-1/2" }),
|
|
195
|
+
d && /* @__PURE__ */ e(
|
|
196
|
+
"span",
|
|
197
|
+
{
|
|
198
|
+
className: i(
|
|
199
|
+
"absolute bottom-0 right-0 rounded-full border-[var(--background)]",
|
|
200
|
+
b[l],
|
|
201
|
+
h[t || "md"]
|
|
202
|
+
),
|
|
203
|
+
"aria-label": `Status: ${l}`
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] });
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
ve.displayName = "Avatar";
|
|
210
|
+
const be = $("animate-spin text-[var(--brand-primary)]", {
|
|
211
|
+
variants: {
|
|
212
|
+
size: {
|
|
213
|
+
sm: "h-4 w-4",
|
|
214
|
+
md: "h-6 w-6",
|
|
215
|
+
lg: "h-8 w-8",
|
|
216
|
+
xl: "h-12 w-12"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
defaultVariants: {
|
|
220
|
+
size: "md"
|
|
221
|
+
}
|
|
222
|
+
}), he = N(
|
|
223
|
+
({ className: a, size: t, label: r, ...o }, n) => /* @__PURE__ */ s(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
ref: n,
|
|
227
|
+
role: "status",
|
|
228
|
+
"aria-label": r || "Loading",
|
|
229
|
+
className: i("inline-flex items-center justify-center", a),
|
|
230
|
+
...o,
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ e(E, { className: i(be({ size: t })) }),
|
|
233
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: r || "Loading" })
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
he.displayName = "Spinner";
|
|
239
|
+
const xe = N(
|
|
240
|
+
({ className: a, orientation: t = "horizontal", variant: r = "solid", text: o, ...n }, d) => {
|
|
241
|
+
const l = {
|
|
242
|
+
solid: "border-solid",
|
|
243
|
+
dashed: "border-dashed",
|
|
244
|
+
dotted: "border-dotted"
|
|
245
|
+
};
|
|
246
|
+
return o && t === "horizontal" ? /* @__PURE__ */ s("div", { className: i("flex items-center gap-4 my-4", a), role: "separator", children: [
|
|
247
|
+
/* @__PURE__ */ e(
|
|
248
|
+
"hr",
|
|
249
|
+
{
|
|
250
|
+
ref: d,
|
|
251
|
+
className: i(
|
|
252
|
+
"flex-1 border-[var(--border)]",
|
|
253
|
+
l[r]
|
|
254
|
+
),
|
|
255
|
+
...n
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-[var(--muted-foreground)]", children: o }),
|
|
259
|
+
/* @__PURE__ */ e(
|
|
260
|
+
"hr",
|
|
261
|
+
{
|
|
262
|
+
className: i(
|
|
263
|
+
"flex-1 border-[var(--border)]",
|
|
264
|
+
l[r]
|
|
265
|
+
)
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
] }) : /* @__PURE__ */ e(
|
|
269
|
+
"hr",
|
|
270
|
+
{
|
|
271
|
+
ref: d,
|
|
272
|
+
role: "separator",
|
|
273
|
+
"aria-orientation": t,
|
|
274
|
+
className: i(
|
|
275
|
+
"border-[var(--border)]",
|
|
276
|
+
l[r],
|
|
277
|
+
t === "vertical" ? "h-full w-px border-l" : "w-full border-t my-4",
|
|
278
|
+
a
|
|
279
|
+
),
|
|
280
|
+
...n
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
xe.displayName = "Divider";
|
|
286
|
+
const U = N(
|
|
287
|
+
({
|
|
288
|
+
className: a,
|
|
289
|
+
value: t = 0,
|
|
290
|
+
maxRating: r = 5,
|
|
291
|
+
size: o = "md",
|
|
292
|
+
readonly: n = !1,
|
|
293
|
+
onChange: d,
|
|
294
|
+
showValue: l = !1,
|
|
295
|
+
...c
|
|
296
|
+
}, g) => {
|
|
297
|
+
const [f, p] = k(0), v = {
|
|
298
|
+
sm: "h-4 w-4",
|
|
299
|
+
md: "h-5 w-5",
|
|
300
|
+
lg: "h-6 w-6"
|
|
301
|
+
}, b = (m) => {
|
|
302
|
+
!n && d && d(m);
|
|
303
|
+
}, h = f || t;
|
|
304
|
+
return /* @__PURE__ */ s(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
ref: g,
|
|
308
|
+
className: i("inline-flex items-center gap-1", a),
|
|
309
|
+
role: "group",
|
|
310
|
+
"aria-label": `Rating: ${t} out of ${r}`,
|
|
311
|
+
...c,
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-0.5", children: Array.from({ length: r }, (m, u) => u + 1).map((m) => {
|
|
314
|
+
const u = m <= h;
|
|
315
|
+
return /* @__PURE__ */ e(
|
|
316
|
+
"button",
|
|
317
|
+
{
|
|
318
|
+
type: "button",
|
|
319
|
+
disabled: n,
|
|
320
|
+
onClick: () => b(m),
|
|
321
|
+
onMouseEnter: () => !n && p(m),
|
|
322
|
+
onMouseLeave: () => !n && p(0),
|
|
323
|
+
className: i(
|
|
324
|
+
"transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-1 rounded",
|
|
325
|
+
n ? "cursor-default" : "cursor-pointer hover:scale-110"
|
|
326
|
+
),
|
|
327
|
+
"aria-label": `Rate ${m} out of ${r}`,
|
|
328
|
+
children: /* @__PURE__ */ e(
|
|
329
|
+
Z,
|
|
330
|
+
{
|
|
331
|
+
className: i(
|
|
332
|
+
v[o],
|
|
333
|
+
"transition-all",
|
|
334
|
+
u ? "fill-[var(--warning)] text-[var(--warning)]" : "fill-none text-[var(--muted-foreground)]"
|
|
335
|
+
)
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
},
|
|
339
|
+
m
|
|
340
|
+
);
|
|
341
|
+
}) }),
|
|
342
|
+
l && /* @__PURE__ */ e("span", { className: "ml-1 text-sm font-medium text-[var(--foreground)]", children: t.toFixed(1) })
|
|
343
|
+
]
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
U.displayName = "Rating";
|
|
349
|
+
function Fe({ className: a, type: t, ...r }) {
|
|
350
|
+
return /* @__PURE__ */ e(
|
|
351
|
+
"input",
|
|
352
|
+
{
|
|
353
|
+
type: t,
|
|
354
|
+
"data-slot": "input",
|
|
355
|
+
className: i(
|
|
356
|
+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
357
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
358
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
359
|
+
a
|
|
360
|
+
),
|
|
361
|
+
...r
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
function Ge({
|
|
366
|
+
...a
|
|
367
|
+
}) {
|
|
368
|
+
return /* @__PURE__ */ e(y.Root, { "data-slot": "select", ...a });
|
|
369
|
+
}
|
|
370
|
+
function Qe({
|
|
371
|
+
...a
|
|
372
|
+
}) {
|
|
373
|
+
return /* @__PURE__ */ e(y.Value, { "data-slot": "select-value", ...a });
|
|
374
|
+
}
|
|
375
|
+
function Ue({
|
|
376
|
+
className: a,
|
|
377
|
+
size: t = "default",
|
|
378
|
+
children: r,
|
|
379
|
+
...o
|
|
380
|
+
}) {
|
|
381
|
+
return /* @__PURE__ */ s(
|
|
382
|
+
y.Trigger,
|
|
383
|
+
{
|
|
384
|
+
"data-slot": "select-trigger",
|
|
385
|
+
"data-size": t,
|
|
386
|
+
className: i(
|
|
387
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
388
|
+
a
|
|
389
|
+
),
|
|
390
|
+
...o,
|
|
391
|
+
children: [
|
|
392
|
+
r,
|
|
393
|
+
/* @__PURE__ */ e(y.Icon, { asChild: !0, children: /* @__PURE__ */ e(B, { className: "size-4 opacity-50" }) })
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
function We({
|
|
399
|
+
className: a,
|
|
400
|
+
children: t,
|
|
401
|
+
position: r = "popper",
|
|
402
|
+
...o
|
|
403
|
+
}) {
|
|
404
|
+
return /* @__PURE__ */ e(y.Portal, { children: /* @__PURE__ */ s(
|
|
405
|
+
y.Content,
|
|
406
|
+
{
|
|
407
|
+
"data-slot": "select-content",
|
|
408
|
+
className: i(
|
|
409
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
410
|
+
r === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
411
|
+
a
|
|
412
|
+
),
|
|
413
|
+
position: r,
|
|
414
|
+
...o,
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
417
|
+
/* @__PURE__ */ e(
|
|
418
|
+
y.Viewport,
|
|
419
|
+
{
|
|
420
|
+
className: i(
|
|
421
|
+
"p-1",
|
|
422
|
+
r === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
423
|
+
),
|
|
424
|
+
children: t
|
|
425
|
+
}
|
|
426
|
+
),
|
|
427
|
+
/* @__PURE__ */ e(we, {})
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
) });
|
|
431
|
+
}
|
|
432
|
+
function Xe({
|
|
433
|
+
className: a,
|
|
434
|
+
children: t,
|
|
435
|
+
...r
|
|
436
|
+
}) {
|
|
437
|
+
return /* @__PURE__ */ s(
|
|
438
|
+
y.Item,
|
|
439
|
+
{
|
|
440
|
+
"data-slot": "select-item",
|
|
441
|
+
className: i(
|
|
442
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
443
|
+
a
|
|
444
|
+
),
|
|
445
|
+
...r,
|
|
446
|
+
children: [
|
|
447
|
+
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(y.ItemIndicator, { children: /* @__PURE__ */ e(V, { className: "size-4" }) }) }),
|
|
448
|
+
/* @__PURE__ */ e(y.ItemText, { children: t })
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
function Ne({
|
|
454
|
+
className: a,
|
|
455
|
+
...t
|
|
456
|
+
}) {
|
|
457
|
+
return /* @__PURE__ */ e(
|
|
458
|
+
y.ScrollUpButton,
|
|
459
|
+
{
|
|
460
|
+
"data-slot": "select-scroll-up-button",
|
|
461
|
+
className: i(
|
|
462
|
+
"flex cursor-default items-center justify-center py-1",
|
|
463
|
+
a
|
|
464
|
+
),
|
|
465
|
+
...t,
|
|
466
|
+
children: /* @__PURE__ */ e(O, { className: "size-4" })
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
function we({
|
|
471
|
+
className: a,
|
|
472
|
+
...t
|
|
473
|
+
}) {
|
|
474
|
+
return /* @__PURE__ */ e(
|
|
475
|
+
y.ScrollDownButton,
|
|
476
|
+
{
|
|
477
|
+
"data-slot": "select-scroll-down-button",
|
|
478
|
+
className: i(
|
|
479
|
+
"flex cursor-default items-center justify-center py-1",
|
|
480
|
+
a
|
|
481
|
+
),
|
|
482
|
+
...t,
|
|
483
|
+
children: /* @__PURE__ */ e(B, { className: "size-4" })
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
function Ke({
|
|
488
|
+
className: a,
|
|
489
|
+
...t
|
|
490
|
+
}) {
|
|
491
|
+
return /* @__PURE__ */ e(
|
|
492
|
+
A.Root,
|
|
493
|
+
{
|
|
494
|
+
"data-slot": "checkbox",
|
|
495
|
+
className: i(
|
|
496
|
+
"peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
497
|
+
a
|
|
498
|
+
),
|
|
499
|
+
...t,
|
|
500
|
+
children: /* @__PURE__ */ e(
|
|
501
|
+
A.Indicator,
|
|
502
|
+
{
|
|
503
|
+
"data-slot": "checkbox-indicator",
|
|
504
|
+
className: "flex items-center justify-center text-current transition-none",
|
|
505
|
+
children: /* @__PURE__ */ e(V, { className: "size-3.5" })
|
|
506
|
+
}
|
|
507
|
+
)
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
function Je({
|
|
512
|
+
className: a,
|
|
513
|
+
...t
|
|
514
|
+
}) {
|
|
515
|
+
return /* @__PURE__ */ e(
|
|
516
|
+
T.Root,
|
|
517
|
+
{
|
|
518
|
+
"data-slot": "radio-group",
|
|
519
|
+
className: i("grid gap-3", a),
|
|
520
|
+
...t
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
function Ye({
|
|
525
|
+
className: a,
|
|
526
|
+
...t
|
|
527
|
+
}) {
|
|
528
|
+
return /* @__PURE__ */ e(
|
|
529
|
+
T.Item,
|
|
530
|
+
{
|
|
531
|
+
"data-slot": "radio-group-item",
|
|
532
|
+
className: i(
|
|
533
|
+
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
534
|
+
a
|
|
535
|
+
),
|
|
536
|
+
...t,
|
|
537
|
+
children: /* @__PURE__ */ e(
|
|
538
|
+
T.Indicator,
|
|
539
|
+
{
|
|
540
|
+
"data-slot": "radio-group-indicator",
|
|
541
|
+
className: "relative flex items-center justify-center",
|
|
542
|
+
children: /* @__PURE__ */ e(ee, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
543
|
+
}
|
|
544
|
+
)
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
function Ze({
|
|
549
|
+
className: a,
|
|
550
|
+
...t
|
|
551
|
+
}) {
|
|
552
|
+
return /* @__PURE__ */ e(
|
|
553
|
+
M.Root,
|
|
554
|
+
{
|
|
555
|
+
"data-slot": "switch",
|
|
556
|
+
className: i(
|
|
557
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
558
|
+
a
|
|
559
|
+
),
|
|
560
|
+
...t,
|
|
561
|
+
children: /* @__PURE__ */ e(
|
|
562
|
+
M.Thumb,
|
|
563
|
+
{
|
|
564
|
+
"data-slot": "switch-thumb",
|
|
565
|
+
className: i(
|
|
566
|
+
"bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
567
|
+
)
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
const R = N(
|
|
574
|
+
({
|
|
575
|
+
className: a,
|
|
576
|
+
image: t,
|
|
577
|
+
title: r,
|
|
578
|
+
price: o,
|
|
579
|
+
originalPrice: n,
|
|
580
|
+
rating: d,
|
|
581
|
+
reviewCount: l,
|
|
582
|
+
badge: c,
|
|
583
|
+
badgeVariant: g = "default",
|
|
584
|
+
isSkeleton: f = !1,
|
|
585
|
+
isOutOfStock: p = !1,
|
|
586
|
+
onAddToCart: v,
|
|
587
|
+
onToggleFavorite: b,
|
|
588
|
+
isFavorite: h = !1,
|
|
589
|
+
...m
|
|
590
|
+
}, u) => f ? /* @__PURE__ */ s(
|
|
591
|
+
"div",
|
|
592
|
+
{
|
|
593
|
+
ref: u,
|
|
594
|
+
className: i(
|
|
595
|
+
"flex flex-col rounded-lg border-2 border-[var(--border)] bg-[var(--card)] p-4 animate-pulse",
|
|
596
|
+
a
|
|
597
|
+
),
|
|
598
|
+
...m,
|
|
599
|
+
children: [
|
|
600
|
+
/* @__PURE__ */ e("div", { className: "aspect-square w-full rounded-lg bg-[var(--muted)]" }),
|
|
601
|
+
/* @__PURE__ */ e("div", { className: "mt-3 h-4 w-3/4 rounded bg-[var(--muted)]" }),
|
|
602
|
+
/* @__PURE__ */ e("div", { className: "mt-2 h-4 w-1/2 rounded bg-[var(--muted)]" }),
|
|
603
|
+
/* @__PURE__ */ e("div", { className: "mt-3 h-10 w-full rounded bg-[var(--muted)]" })
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
) : /* @__PURE__ */ s(
|
|
607
|
+
"div",
|
|
608
|
+
{
|
|
609
|
+
ref: u,
|
|
610
|
+
className: i(
|
|
611
|
+
"group relative flex flex-col rounded-lg border-2 border-[var(--border)] bg-[var(--card)] transition-all hover:shadow-lg",
|
|
612
|
+
p && "opacity-60",
|
|
613
|
+
a
|
|
614
|
+
),
|
|
615
|
+
...m,
|
|
616
|
+
children: [
|
|
617
|
+
/* @__PURE__ */ s("div", { className: "relative aspect-square w-full overflow-hidden rounded-t-lg", children: [
|
|
618
|
+
/* @__PURE__ */ e(
|
|
619
|
+
"img",
|
|
620
|
+
{
|
|
621
|
+
src: t,
|
|
622
|
+
alt: r,
|
|
623
|
+
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
624
|
+
}
|
|
625
|
+
),
|
|
626
|
+
c && /* @__PURE__ */ e("div", { className: "absolute left-3 top-3", children: /* @__PURE__ */ e(P, { variant: g, children: c }) }),
|
|
627
|
+
p && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60", children: /* @__PURE__ */ e(P, { variant: "danger", size: "lg", children: "Esgotado" }) }),
|
|
628
|
+
b && /* @__PURE__ */ e(
|
|
629
|
+
"button",
|
|
630
|
+
{
|
|
631
|
+
onClick: b,
|
|
632
|
+
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)]",
|
|
633
|
+
"aria-label": h ? "Remove from favorites" : "Add to favorites",
|
|
634
|
+
children: /* @__PURE__ */ e(
|
|
635
|
+
te,
|
|
636
|
+
{
|
|
637
|
+
className: i(
|
|
638
|
+
"h-5 w-5",
|
|
639
|
+
h ? "fill-[var(--destructive)] text-[var(--destructive)]" : "text-[var(--foreground)]"
|
|
640
|
+
)
|
|
641
|
+
}
|
|
642
|
+
)
|
|
643
|
+
}
|
|
644
|
+
)
|
|
645
|
+
] }),
|
|
646
|
+
/* @__PURE__ */ s("div", { className: "flex flex-1 flex-col p-4", children: [
|
|
647
|
+
/* @__PURE__ */ e("h3", { className: "line-clamp-2 text-base font-medium text-[var(--card-foreground)]", children: r }),
|
|
648
|
+
d !== void 0 && /* @__PURE__ */ s("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
649
|
+
/* @__PURE__ */ e(U, { value: d, size: "sm", readonly: !0 }),
|
|
650
|
+
l !== void 0 && /* @__PURE__ */ s("span", { className: "text-sm text-[var(--muted-foreground)]", children: [
|
|
651
|
+
"(",
|
|
652
|
+
l,
|
|
653
|
+
")"
|
|
654
|
+
] })
|
|
655
|
+
] }),
|
|
656
|
+
/* @__PURE__ */ s("div", { className: "mt-3 flex items-baseline gap-2", children: [
|
|
657
|
+
/* @__PURE__ */ s("span", { className: "text-xl font-bold text-[var(--foreground)]", children: [
|
|
658
|
+
"R$ ",
|
|
659
|
+
o.toFixed(2)
|
|
660
|
+
] }),
|
|
661
|
+
n && n > o && /* @__PURE__ */ s("span", { className: "text-sm text-[var(--muted-foreground)] line-through", children: [
|
|
662
|
+
"R$ ",
|
|
663
|
+
n.toFixed(2)
|
|
664
|
+
] })
|
|
665
|
+
] }),
|
|
666
|
+
v && /* @__PURE__ */ e(
|
|
667
|
+
z,
|
|
668
|
+
{
|
|
669
|
+
onClick: v,
|
|
670
|
+
disabled: p,
|
|
671
|
+
variant: "primary",
|
|
672
|
+
size: "md",
|
|
673
|
+
fullWidth: !0,
|
|
674
|
+
leftIcon: /* @__PURE__ */ e(_, { className: "h-4 w-4" }),
|
|
675
|
+
className: "mt-4",
|
|
676
|
+
children: p ? "Indisponível" : "Adicionar"
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
] })
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
)
|
|
683
|
+
);
|
|
684
|
+
R.displayName = "ProductCard";
|
|
685
|
+
const ye = N(
|
|
686
|
+
({
|
|
687
|
+
className: a,
|
|
688
|
+
onSearch: t,
|
|
689
|
+
onClear: r,
|
|
690
|
+
isLoading: o = !1,
|
|
691
|
+
size: n = "md",
|
|
692
|
+
placeholder: d = "Buscar...",
|
|
693
|
+
value: l,
|
|
694
|
+
onChange: c,
|
|
695
|
+
...g
|
|
696
|
+
}, f) => {
|
|
697
|
+
const [p, v] = k(""), b = l !== void 0 ? l : p, h = {
|
|
698
|
+
sm: "h-9 text-sm",
|
|
699
|
+
md: "h-11 text-base",
|
|
700
|
+
lg: "h-14 text-lg"
|
|
701
|
+
}, m = (S) => {
|
|
702
|
+
const X = S.target.value;
|
|
703
|
+
l === void 0 && v(X), c == null || c(S);
|
|
704
|
+
}, u = () => {
|
|
705
|
+
l === void 0 && v(""), r == null || r();
|
|
706
|
+
}, x = (S) => {
|
|
707
|
+
S.key === "Enter" && t && t(b);
|
|
708
|
+
};
|
|
709
|
+
return /* @__PURE__ */ e("div", { className: i("relative w-full", a), children: /* @__PURE__ */ s("div", { className: "relative flex items-center", children: [
|
|
710
|
+
/* @__PURE__ */ e(L, { className: "absolute left-3 h-5 w-5 text-[var(--muted-foreground)] pointer-events-none" }),
|
|
711
|
+
/* @__PURE__ */ e(
|
|
712
|
+
"input",
|
|
713
|
+
{
|
|
714
|
+
ref: f,
|
|
715
|
+
type: "search",
|
|
716
|
+
value: b,
|
|
717
|
+
onChange: m,
|
|
718
|
+
onKeyDown: x,
|
|
719
|
+
placeholder: d,
|
|
720
|
+
className: i(
|
|
721
|
+
"w-full rounded-lg border-2 border-[var(--border)] bg-[var(--input-background)] pl-10 pr-10 font-normal transition-colors",
|
|
722
|
+
"placeholder:text-[var(--muted-foreground)]",
|
|
723
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
724
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
725
|
+
h[n]
|
|
726
|
+
),
|
|
727
|
+
...g
|
|
728
|
+
}
|
|
729
|
+
),
|
|
730
|
+
/* @__PURE__ */ s("div", { className: "absolute right-3 flex items-center gap-1", children: [
|
|
731
|
+
o && /* @__PURE__ */ e(E, { className: "h-5 w-5 animate-spin text-[var(--muted-foreground)]" }),
|
|
732
|
+
b && !o && /* @__PURE__ */ e(
|
|
733
|
+
"button",
|
|
734
|
+
{
|
|
735
|
+
type: "button",
|
|
736
|
+
onClick: u,
|
|
737
|
+
className: "rounded-full p-1 hover:bg-[var(--muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]",
|
|
738
|
+
"aria-label": "Clear search",
|
|
739
|
+
children: /* @__PURE__ */ e(ae, { className: "h-4 w-4 text-[var(--muted-foreground)]" })
|
|
740
|
+
}
|
|
741
|
+
)
|
|
742
|
+
] })
|
|
743
|
+
] }) });
|
|
744
|
+
}
|
|
745
|
+
);
|
|
746
|
+
ye.displayName = "SearchBar";
|
|
747
|
+
const ke = N(
|
|
748
|
+
({
|
|
749
|
+
className: a,
|
|
750
|
+
price: t,
|
|
751
|
+
originalPrice: r,
|
|
752
|
+
currency: o = "R$",
|
|
753
|
+
size: n = "md",
|
|
754
|
+
showDiscount: d = !0,
|
|
755
|
+
installments: l,
|
|
756
|
+
...c
|
|
757
|
+
}, g) => {
|
|
758
|
+
const f = r && r > t ? Math.round((r - t) / r * 100) : 0, p = {
|
|
759
|
+
sm: "text-base",
|
|
760
|
+
md: "text-xl",
|
|
761
|
+
lg: "text-2xl",
|
|
762
|
+
xl: "text-4xl"
|
|
763
|
+
}, v = {
|
|
764
|
+
sm: "text-xs",
|
|
765
|
+
md: "text-sm",
|
|
766
|
+
lg: "text-base",
|
|
767
|
+
xl: "text-xl"
|
|
768
|
+
};
|
|
769
|
+
return /* @__PURE__ */ s("div", { ref: g, className: i("flex flex-col gap-1", a), ...c, children: [
|
|
770
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
771
|
+
/* @__PURE__ */ s("div", { className: "flex items-baseline gap-2", children: [
|
|
772
|
+
/* @__PURE__ */ s("span", { className: i("font-bold text-[var(--foreground)]", p[n]), children: [
|
|
773
|
+
o,
|
|
774
|
+
" ",
|
|
775
|
+
t.toFixed(2)
|
|
776
|
+
] }),
|
|
777
|
+
r && r > t && /* @__PURE__ */ s(
|
|
778
|
+
"span",
|
|
779
|
+
{
|
|
780
|
+
className: i(
|
|
781
|
+
"text-[var(--muted-foreground)] line-through",
|
|
782
|
+
v[n]
|
|
783
|
+
),
|
|
784
|
+
children: [
|
|
785
|
+
o,
|
|
786
|
+
" ",
|
|
787
|
+
r.toFixed(2)
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
)
|
|
791
|
+
] }),
|
|
792
|
+
d && f > 0 && /* @__PURE__ */ s(P, { variant: "success", size: "sm", children: [
|
|
793
|
+
"-",
|
|
794
|
+
f,
|
|
795
|
+
"%"
|
|
796
|
+
] })
|
|
797
|
+
] }),
|
|
798
|
+
l && /* @__PURE__ */ s("p", { className: "text-sm text-[var(--muted-foreground)]", children: [
|
|
799
|
+
"ou ",
|
|
800
|
+
l.count,
|
|
801
|
+
"x de ",
|
|
802
|
+
o,
|
|
803
|
+
" ",
|
|
804
|
+
l.value.toFixed(2),
|
|
805
|
+
" sem juros"
|
|
806
|
+
] })
|
|
807
|
+
] });
|
|
808
|
+
}
|
|
809
|
+
);
|
|
810
|
+
ke.displayName = "PriceDisplay";
|
|
811
|
+
const ze = N(
|
|
812
|
+
({
|
|
813
|
+
className: a,
|
|
814
|
+
value: t,
|
|
815
|
+
min: r = 1,
|
|
816
|
+
max: o = 99,
|
|
817
|
+
onChange: n,
|
|
818
|
+
size: d = "md",
|
|
819
|
+
disabled: l = !1,
|
|
820
|
+
showLabel: c = !1,
|
|
821
|
+
...g
|
|
822
|
+
}, f) => {
|
|
823
|
+
const p = () => {
|
|
824
|
+
t < o && n(t + 1);
|
|
825
|
+
}, v = () => {
|
|
826
|
+
t > r && n(t - 1);
|
|
827
|
+
}, b = (u) => {
|
|
828
|
+
const x = parseInt(u.target.value);
|
|
829
|
+
!isNaN(x) && x >= r && x <= o && n(x);
|
|
830
|
+
}, h = {
|
|
831
|
+
sm: "h-8 w-8",
|
|
832
|
+
md: "h-10 w-10",
|
|
833
|
+
lg: "h-12 w-12"
|
|
834
|
+
}, m = {
|
|
835
|
+
sm: "h-8 w-12 text-sm",
|
|
836
|
+
md: "h-10 w-14 text-base",
|
|
837
|
+
lg: "h-12 w-16 text-lg"
|
|
838
|
+
};
|
|
839
|
+
return /* @__PURE__ */ s("div", { ref: f, className: i("inline-flex flex-col gap-1", a), ...g, children: [
|
|
840
|
+
c && /* @__PURE__ */ e("label", { className: "text-sm font-medium text-[var(--foreground)]", children: "Quantidade" }),
|
|
841
|
+
/* @__PURE__ */ s("div", { className: "inline-flex items-center gap-2", children: [
|
|
842
|
+
/* @__PURE__ */ e(
|
|
843
|
+
z,
|
|
844
|
+
{
|
|
845
|
+
type: "button",
|
|
846
|
+
variant: "secondary",
|
|
847
|
+
size: "sm",
|
|
848
|
+
onClick: v,
|
|
849
|
+
disabled: l || t <= r,
|
|
850
|
+
className: i(h[d], "p-0"),
|
|
851
|
+
"aria-label": "Decrease quantity",
|
|
852
|
+
children: /* @__PURE__ */ e(H, { className: "h-4 w-4" })
|
|
853
|
+
}
|
|
854
|
+
),
|
|
855
|
+
/* @__PURE__ */ e(
|
|
856
|
+
"input",
|
|
857
|
+
{
|
|
858
|
+
type: "number",
|
|
859
|
+
value: t,
|
|
860
|
+
onChange: b,
|
|
861
|
+
min: r,
|
|
862
|
+
max: o,
|
|
863
|
+
disabled: l,
|
|
864
|
+
className: i(
|
|
865
|
+
"rounded-lg border-2 border-[var(--border)] bg-[var(--input-background)] text-center font-medium transition-colors",
|
|
866
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
867
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
868
|
+
"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
869
|
+
m[d]
|
|
870
|
+
),
|
|
871
|
+
"aria-label": "Quantity"
|
|
872
|
+
}
|
|
873
|
+
),
|
|
874
|
+
/* @__PURE__ */ e(
|
|
875
|
+
z,
|
|
876
|
+
{
|
|
877
|
+
type: "button",
|
|
878
|
+
variant: "secondary",
|
|
879
|
+
size: "sm",
|
|
880
|
+
onClick: p,
|
|
881
|
+
disabled: l || t >= o,
|
|
882
|
+
className: i(h[d], "p-0"),
|
|
883
|
+
"aria-label": "Increase quantity",
|
|
884
|
+
children: /* @__PURE__ */ e(q, { className: "h-4 w-4" })
|
|
885
|
+
}
|
|
886
|
+
)
|
|
887
|
+
] })
|
|
888
|
+
] });
|
|
889
|
+
}
|
|
890
|
+
);
|
|
891
|
+
ze.displayName = "QuantitySelector";
|
|
892
|
+
const Se = N(
|
|
893
|
+
({ className: a, label: t, htmlFor: r, required: o, error: n, helperText: d, children: l, ...c }, g) => /* @__PURE__ */ s("div", { ref: g, className: i("flex flex-col gap-1.5", a), ...c, children: [
|
|
894
|
+
t && /* @__PURE__ */ s(
|
|
895
|
+
"label",
|
|
896
|
+
{
|
|
897
|
+
htmlFor: r,
|
|
898
|
+
className: "text-sm font-medium text-[var(--foreground)]",
|
|
899
|
+
children: [
|
|
900
|
+
t,
|
|
901
|
+
o && /* @__PURE__ */ e("span", { className: "ml-1 text-[var(--destructive)]", children: "*" })
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
),
|
|
905
|
+
l,
|
|
906
|
+
(n || d) && /* @__PURE__ */ e(
|
|
907
|
+
"p",
|
|
908
|
+
{
|
|
909
|
+
className: i(
|
|
910
|
+
"text-sm",
|
|
911
|
+
n ? "text-[var(--destructive)]" : "text-[var(--muted-foreground)]"
|
|
912
|
+
),
|
|
913
|
+
children: n || d
|
|
914
|
+
}
|
|
915
|
+
)
|
|
916
|
+
] })
|
|
917
|
+
);
|
|
918
|
+
Se.displayName = "FormGroup";
|
|
919
|
+
function Oe({ ...a }) {
|
|
920
|
+
return /* @__PURE__ */ e("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...a });
|
|
921
|
+
}
|
|
922
|
+
function et({ className: a, ...t }) {
|
|
923
|
+
return /* @__PURE__ */ e(
|
|
924
|
+
"ol",
|
|
925
|
+
{
|
|
926
|
+
"data-slot": "breadcrumb-list",
|
|
927
|
+
className: i(
|
|
928
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
929
|
+
a
|
|
930
|
+
),
|
|
931
|
+
...t
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
function tt({ className: a, ...t }) {
|
|
936
|
+
return /* @__PURE__ */ e(
|
|
937
|
+
"li",
|
|
938
|
+
{
|
|
939
|
+
"data-slot": "breadcrumb-item",
|
|
940
|
+
className: i("inline-flex items-center gap-1.5", a),
|
|
941
|
+
...t
|
|
942
|
+
}
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
function at({
|
|
946
|
+
asChild: a,
|
|
947
|
+
className: t,
|
|
948
|
+
...r
|
|
949
|
+
}) {
|
|
950
|
+
return /* @__PURE__ */ e(
|
|
951
|
+
a ? me : "a",
|
|
952
|
+
{
|
|
953
|
+
"data-slot": "breadcrumb-link",
|
|
954
|
+
className: i("hover:text-foreground transition-colors", t),
|
|
955
|
+
...r
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
}
|
|
959
|
+
function rt({ className: a, ...t }) {
|
|
960
|
+
return /* @__PURE__ */ e(
|
|
961
|
+
"span",
|
|
962
|
+
{
|
|
963
|
+
"data-slot": "breadcrumb-page",
|
|
964
|
+
role: "link",
|
|
965
|
+
"aria-disabled": "true",
|
|
966
|
+
"aria-current": "page",
|
|
967
|
+
className: i("text-foreground font-normal", a),
|
|
968
|
+
...t
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
function it({
|
|
973
|
+
children: a,
|
|
974
|
+
className: t,
|
|
975
|
+
...r
|
|
976
|
+
}) {
|
|
977
|
+
return /* @__PURE__ */ e(
|
|
978
|
+
"li",
|
|
979
|
+
{
|
|
980
|
+
"data-slot": "breadcrumb-separator",
|
|
981
|
+
role: "presentation",
|
|
982
|
+
"aria-hidden": "true",
|
|
983
|
+
className: i("[&>svg]:size-3.5", t),
|
|
984
|
+
...r,
|
|
985
|
+
children: a ?? /* @__PURE__ */ e(F, {})
|
|
986
|
+
}
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
function st({
|
|
990
|
+
...a
|
|
991
|
+
}) {
|
|
992
|
+
return /* @__PURE__ */ e(I.Root, { "data-slot": "accordion", ...a });
|
|
993
|
+
}
|
|
994
|
+
function ot({
|
|
995
|
+
className: a,
|
|
996
|
+
...t
|
|
997
|
+
}) {
|
|
998
|
+
return /* @__PURE__ */ e(
|
|
999
|
+
I.Item,
|
|
1000
|
+
{
|
|
1001
|
+
"data-slot": "accordion-item",
|
|
1002
|
+
className: i("border-b last:border-b-0", a),
|
|
1003
|
+
...t
|
|
1004
|
+
}
|
|
1005
|
+
);
|
|
1006
|
+
}
|
|
1007
|
+
function nt({
|
|
1008
|
+
className: a,
|
|
1009
|
+
children: t,
|
|
1010
|
+
...r
|
|
1011
|
+
}) {
|
|
1012
|
+
return /* @__PURE__ */ e(I.Header, { className: "flex", children: /* @__PURE__ */ s(
|
|
1013
|
+
I.Trigger,
|
|
1014
|
+
{
|
|
1015
|
+
"data-slot": "accordion-trigger",
|
|
1016
|
+
className: i(
|
|
1017
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
1018
|
+
a
|
|
1019
|
+
),
|
|
1020
|
+
...r,
|
|
1021
|
+
children: [
|
|
1022
|
+
t,
|
|
1023
|
+
/* @__PURE__ */ e(B, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
1024
|
+
]
|
|
1025
|
+
}
|
|
1026
|
+
) });
|
|
1027
|
+
}
|
|
1028
|
+
function lt({
|
|
1029
|
+
className: a,
|
|
1030
|
+
children: t,
|
|
1031
|
+
...r
|
|
1032
|
+
}) {
|
|
1033
|
+
return /* @__PURE__ */ e(
|
|
1034
|
+
I.Content,
|
|
1035
|
+
{
|
|
1036
|
+
"data-slot": "accordion-content",
|
|
1037
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
1038
|
+
...r,
|
|
1039
|
+
children: /* @__PURE__ */ e("div", { className: i("pt-0 pb-4", a), children: t })
|
|
1040
|
+
}
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
function Ce({
|
|
1044
|
+
delayDuration: a = 0,
|
|
1045
|
+
...t
|
|
1046
|
+
}) {
|
|
1047
|
+
return /* @__PURE__ */ e(
|
|
1048
|
+
C.Provider,
|
|
1049
|
+
{
|
|
1050
|
+
"data-slot": "tooltip-provider",
|
|
1051
|
+
delayDuration: a,
|
|
1052
|
+
...t
|
|
1053
|
+
}
|
|
1054
|
+
);
|
|
1055
|
+
}
|
|
1056
|
+
function dt({
|
|
1057
|
+
...a
|
|
1058
|
+
}) {
|
|
1059
|
+
return /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(C.Root, { "data-slot": "tooltip", ...a }) });
|
|
1060
|
+
}
|
|
1061
|
+
function ct({
|
|
1062
|
+
...a
|
|
1063
|
+
}) {
|
|
1064
|
+
return /* @__PURE__ */ e(C.Trigger, { "data-slot": "tooltip-trigger", ...a });
|
|
1065
|
+
}
|
|
1066
|
+
function ut({
|
|
1067
|
+
className: a,
|
|
1068
|
+
sideOffset: t = 0,
|
|
1069
|
+
children: r,
|
|
1070
|
+
...o
|
|
1071
|
+
}) {
|
|
1072
|
+
return /* @__PURE__ */ e(C.Portal, { children: /* @__PURE__ */ s(
|
|
1073
|
+
C.Content,
|
|
1074
|
+
{
|
|
1075
|
+
"data-slot": "tooltip-content",
|
|
1076
|
+
sideOffset: t,
|
|
1077
|
+
className: i(
|
|
1078
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
1079
|
+
a
|
|
1080
|
+
),
|
|
1081
|
+
...o,
|
|
1082
|
+
children: [
|
|
1083
|
+
r,
|
|
1084
|
+
/* @__PURE__ */ e(C.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
1085
|
+
]
|
|
1086
|
+
}
|
|
1087
|
+
) });
|
|
1088
|
+
}
|
|
1089
|
+
const Ie = N(
|
|
1090
|
+
({
|
|
1091
|
+
className: a,
|
|
1092
|
+
variant: t = "default",
|
|
1093
|
+
title: r,
|
|
1094
|
+
subtitle: o,
|
|
1095
|
+
description: n,
|
|
1096
|
+
primaryCTA: d,
|
|
1097
|
+
secondaryCTA: l,
|
|
1098
|
+
backgroundImage: c,
|
|
1099
|
+
overlay: g = !0,
|
|
1100
|
+
children: f,
|
|
1101
|
+
...p
|
|
1102
|
+
}, v) => /* @__PURE__ */ s(
|
|
1103
|
+
"section",
|
|
1104
|
+
{
|
|
1105
|
+
ref: v,
|
|
1106
|
+
className: i(
|
|
1107
|
+
"relative flex min-h-[400px] w-full flex-col justify-center px-6 py-16 lg:px-12 lg:py-24",
|
|
1108
|
+
{
|
|
1109
|
+
default: "items-start text-left",
|
|
1110
|
+
centered: "items-center text-center",
|
|
1111
|
+
split: "lg:grid lg:grid-cols-2 lg:gap-12 items-center"
|
|
1112
|
+
}[t],
|
|
1113
|
+
a
|
|
1114
|
+
),
|
|
1115
|
+
...p,
|
|
1116
|
+
children: [
|
|
1117
|
+
c && /* @__PURE__ */ s(j, { children: [
|
|
1118
|
+
/* @__PURE__ */ e(
|
|
1119
|
+
"div",
|
|
1120
|
+
{
|
|
1121
|
+
className: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
1122
|
+
style: { backgroundImage: `url(${c})` }
|
|
1123
|
+
}
|
|
1124
|
+
),
|
|
1125
|
+
g && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-gradient-to-r from-black/70 to-black/30" })
|
|
1126
|
+
] }),
|
|
1127
|
+
/* @__PURE__ */ s(
|
|
1128
|
+
"div",
|
|
1129
|
+
{
|
|
1130
|
+
className: i(
|
|
1131
|
+
"relative z-10 max-w-7xl mx-auto w-full",
|
|
1132
|
+
t === "centered" && "flex flex-col items-center"
|
|
1133
|
+
),
|
|
1134
|
+
children: [
|
|
1135
|
+
/* @__PURE__ */ s("div", { className: i("max-w-3xl", t === "split" && "max-w-none"), children: [
|
|
1136
|
+
o && /* @__PURE__ */ e(
|
|
1137
|
+
"p",
|
|
1138
|
+
{
|
|
1139
|
+
className: i(
|
|
1140
|
+
"mb-4 text-sm font-semibold uppercase tracking-wider",
|
|
1141
|
+
c ? "text-[var(--warning)]" : "text-[var(--brand-primary)]"
|
|
1142
|
+
),
|
|
1143
|
+
children: o
|
|
1144
|
+
}
|
|
1145
|
+
),
|
|
1146
|
+
/* @__PURE__ */ e(
|
|
1147
|
+
"h1",
|
|
1148
|
+
{
|
|
1149
|
+
className: i(
|
|
1150
|
+
"text-4xl font-bold leading-tight lg:text-5xl xl:text-6xl",
|
|
1151
|
+
c ? "text-white" : "text-[var(--foreground)]"
|
|
1152
|
+
),
|
|
1153
|
+
children: r
|
|
1154
|
+
}
|
|
1155
|
+
),
|
|
1156
|
+
n && /* @__PURE__ */ e(
|
|
1157
|
+
"p",
|
|
1158
|
+
{
|
|
1159
|
+
className: i(
|
|
1160
|
+
"mt-6 text-lg lg:text-xl",
|
|
1161
|
+
c ? "text-gray-200" : "text-[var(--muted-foreground)]"
|
|
1162
|
+
),
|
|
1163
|
+
children: n
|
|
1164
|
+
}
|
|
1165
|
+
),
|
|
1166
|
+
(d || l) && /* @__PURE__ */ s("div", { className: "mt-8 flex flex-wrap gap-4", children: [
|
|
1167
|
+
d && /* @__PURE__ */ e(
|
|
1168
|
+
z,
|
|
1169
|
+
{
|
|
1170
|
+
size: "lg",
|
|
1171
|
+
onClick: d.onClick,
|
|
1172
|
+
variant: "primary",
|
|
1173
|
+
children: d.label
|
|
1174
|
+
}
|
|
1175
|
+
),
|
|
1176
|
+
l && /* @__PURE__ */ e(
|
|
1177
|
+
z,
|
|
1178
|
+
{
|
|
1179
|
+
size: "lg",
|
|
1180
|
+
onClick: l.onClick,
|
|
1181
|
+
variant: "secondary",
|
|
1182
|
+
children: l.label
|
|
1183
|
+
}
|
|
1184
|
+
)
|
|
1185
|
+
] })
|
|
1186
|
+
] }),
|
|
1187
|
+
t === "split" && f && /* @__PURE__ */ e("div", { className: "mt-8 lg:mt-0", children: f })
|
|
1188
|
+
]
|
|
1189
|
+
}
|
|
1190
|
+
),
|
|
1191
|
+
t !== "split" && f && /* @__PURE__ */ e("div", { className: "relative z-10 mt-12 w-full max-w-7xl mx-auto", children: f })
|
|
1192
|
+
]
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1195
|
+
);
|
|
1196
|
+
Ie.displayName = "Hero";
|
|
1197
|
+
const W = N(
|
|
1198
|
+
({
|
|
1199
|
+
className: a,
|
|
1200
|
+
variant: t = "default",
|
|
1201
|
+
icon: r,
|
|
1202
|
+
title: o,
|
|
1203
|
+
description: n,
|
|
1204
|
+
action: d,
|
|
1205
|
+
...l
|
|
1206
|
+
}, c) => {
|
|
1207
|
+
const f = r || {
|
|
1208
|
+
default: /* @__PURE__ */ e(ie, { className: "h-16 w-16" }),
|
|
1209
|
+
search: /* @__PURE__ */ e(L, { className: "h-16 w-16" }),
|
|
1210
|
+
cart: /* @__PURE__ */ e(_, { className: "h-16 w-16" }),
|
|
1211
|
+
error: /* @__PURE__ */ e(re, { className: "h-16 w-16" })
|
|
1212
|
+
}[t];
|
|
1213
|
+
return /* @__PURE__ */ s(
|
|
1214
|
+
"div",
|
|
1215
|
+
{
|
|
1216
|
+
ref: c,
|
|
1217
|
+
className: i(
|
|
1218
|
+
"flex flex-col items-center justify-center py-16 px-6 text-center",
|
|
1219
|
+
a
|
|
1220
|
+
),
|
|
1221
|
+
...l,
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--muted)] p-6 text-[var(--muted-foreground)]", children: f }),
|
|
1224
|
+
/* @__PURE__ */ e("h3", { className: "mt-6 text-xl font-semibold text-[var(--foreground)]", children: o }),
|
|
1225
|
+
n && /* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: n }),
|
|
1226
|
+
d && /* @__PURE__ */ e(
|
|
1227
|
+
z,
|
|
1228
|
+
{
|
|
1229
|
+
onClick: d.onClick,
|
|
1230
|
+
variant: "primary",
|
|
1231
|
+
size: "lg",
|
|
1232
|
+
className: "mt-6",
|
|
1233
|
+
children: d.label
|
|
1234
|
+
}
|
|
1235
|
+
)
|
|
1236
|
+
]
|
|
1237
|
+
}
|
|
1238
|
+
);
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
W.displayName = "EmptyState";
|
|
1242
|
+
const je = N(
|
|
1243
|
+
({
|
|
1244
|
+
className: a,
|
|
1245
|
+
type: t = "generic",
|
|
1246
|
+
title: r,
|
|
1247
|
+
message: o,
|
|
1248
|
+
onRetry: n,
|
|
1249
|
+
onGoHome: d,
|
|
1250
|
+
showRetry: l = !0,
|
|
1251
|
+
showHome: c = !0,
|
|
1252
|
+
...g
|
|
1253
|
+
}, f) => {
|
|
1254
|
+
const v = {
|
|
1255
|
+
404: {
|
|
1256
|
+
title: "Página não encontrada",
|
|
1257
|
+
message: "A página que você está procurando não existe ou foi movida.",
|
|
1258
|
+
code: "404"
|
|
1259
|
+
},
|
|
1260
|
+
500: {
|
|
1261
|
+
title: "Erro no servidor",
|
|
1262
|
+
message: "Algo deu errado do nosso lado. Por favor, tente novamente mais tarde.",
|
|
1263
|
+
code: "500"
|
|
1264
|
+
},
|
|
1265
|
+
network: {
|
|
1266
|
+
title: "Erro de conexão",
|
|
1267
|
+
message: "Não foi possível conectar ao servidor. Verifique sua conexão com a internet.",
|
|
1268
|
+
code: ""
|
|
1269
|
+
},
|
|
1270
|
+
generic: {
|
|
1271
|
+
title: "Algo deu errado",
|
|
1272
|
+
message: "Ocorreu um erro inesperado. Por favor, tente novamente.",
|
|
1273
|
+
code: ""
|
|
1274
|
+
}
|
|
1275
|
+
}[t], b = r || v.title, h = o || v.message;
|
|
1276
|
+
return /* @__PURE__ */ s(
|
|
1277
|
+
"div",
|
|
1278
|
+
{
|
|
1279
|
+
ref: f,
|
|
1280
|
+
className: i(
|
|
1281
|
+
"flex min-h-[500px] flex-col items-center justify-center py-16 px-6 text-center",
|
|
1282
|
+
a
|
|
1283
|
+
),
|
|
1284
|
+
role: "alert",
|
|
1285
|
+
"aria-live": "assertive",
|
|
1286
|
+
...g,
|
|
1287
|
+
children: [
|
|
1288
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-4", children: [
|
|
1289
|
+
v.code && /* @__PURE__ */ e("h1", { className: "text-9xl font-bold text-[var(--muted)] opacity-40", children: v.code }),
|
|
1290
|
+
/* @__PURE__ */ e("div", { className: "rounded-full bg-[var(--destructive)]/10 p-6 text-[var(--destructive)]", children: /* @__PURE__ */ e(se, { className: "h-16 w-16" }) })
|
|
1291
|
+
] }),
|
|
1292
|
+
/* @__PURE__ */ e("h2", { className: "mt-6 text-2xl font-bold text-[var(--foreground)]", children: b }),
|
|
1293
|
+
/* @__PURE__ */ e("p", { className: "mt-2 max-w-md text-[var(--muted-foreground)]", children: h }),
|
|
1294
|
+
/* @__PURE__ */ s("div", { className: "mt-8 flex flex-wrap gap-4 justify-center", children: [
|
|
1295
|
+
l && n && /* @__PURE__ */ e(
|
|
1296
|
+
z,
|
|
1297
|
+
{
|
|
1298
|
+
onClick: n,
|
|
1299
|
+
variant: "primary",
|
|
1300
|
+
size: "lg",
|
|
1301
|
+
leftIcon: /* @__PURE__ */ e(oe, { className: "h-5 w-5" }),
|
|
1302
|
+
children: "Tentar novamente"
|
|
1303
|
+
}
|
|
1304
|
+
),
|
|
1305
|
+
c && d && /* @__PURE__ */ e(
|
|
1306
|
+
z,
|
|
1307
|
+
{
|
|
1308
|
+
onClick: d,
|
|
1309
|
+
variant: "secondary",
|
|
1310
|
+
size: "lg",
|
|
1311
|
+
leftIcon: /* @__PURE__ */ e(ne, { className: "h-5 w-5" }),
|
|
1312
|
+
children: "Voltar ao início"
|
|
1313
|
+
}
|
|
1314
|
+
)
|
|
1315
|
+
] })
|
|
1316
|
+
]
|
|
1317
|
+
}
|
|
1318
|
+
);
|
|
1319
|
+
}
|
|
1320
|
+
);
|
|
1321
|
+
je.displayName = "ErrorState";
|
|
1322
|
+
const De = N(
|
|
1323
|
+
({
|
|
1324
|
+
className: a,
|
|
1325
|
+
products: t,
|
|
1326
|
+
columns: r = 4,
|
|
1327
|
+
gap: o = "md",
|
|
1328
|
+
isLoading: n = !1,
|
|
1329
|
+
skeletonCount: d = 8,
|
|
1330
|
+
emptyStateMessage: l = "Nenhum produto encontrado",
|
|
1331
|
+
onEmptyAction: c,
|
|
1332
|
+
...g
|
|
1333
|
+
}, f) => {
|
|
1334
|
+
const p = {
|
|
1335
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
1336
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
1337
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
1338
|
+
5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5"
|
|
1339
|
+
}, v = {
|
|
1340
|
+
sm: "gap-4",
|
|
1341
|
+
md: "gap-6",
|
|
1342
|
+
lg: "gap-8"
|
|
1343
|
+
};
|
|
1344
|
+
return n ? /* @__PURE__ */ e(
|
|
1345
|
+
"div",
|
|
1346
|
+
{
|
|
1347
|
+
ref: f,
|
|
1348
|
+
className: i(
|
|
1349
|
+
"grid",
|
|
1350
|
+
p[r],
|
|
1351
|
+
v[o],
|
|
1352
|
+
a
|
|
1353
|
+
),
|
|
1354
|
+
...g,
|
|
1355
|
+
children: Array.from({ length: d }).map((b, h) => /* @__PURE__ */ e(
|
|
1356
|
+
R,
|
|
1357
|
+
{
|
|
1358
|
+
image: "",
|
|
1359
|
+
title: "",
|
|
1360
|
+
price: 0,
|
|
1361
|
+
isSkeleton: !0
|
|
1362
|
+
},
|
|
1363
|
+
h
|
|
1364
|
+
))
|
|
1365
|
+
}
|
|
1366
|
+
) : t.length === 0 ? /* @__PURE__ */ e(
|
|
1367
|
+
W,
|
|
1368
|
+
{
|
|
1369
|
+
variant: "search",
|
|
1370
|
+
title: l,
|
|
1371
|
+
description: "Tente ajustar seus filtros ou realizar uma nova busca",
|
|
1372
|
+
action: c ? {
|
|
1373
|
+
label: "Limpar filtros",
|
|
1374
|
+
onClick: c
|
|
1375
|
+
} : void 0
|
|
1376
|
+
}
|
|
1377
|
+
) : /* @__PURE__ */ e(
|
|
1378
|
+
"div",
|
|
1379
|
+
{
|
|
1380
|
+
ref: f,
|
|
1381
|
+
className: i(
|
|
1382
|
+
"grid",
|
|
1383
|
+
p[r],
|
|
1384
|
+
v[o],
|
|
1385
|
+
a
|
|
1386
|
+
),
|
|
1387
|
+
...g,
|
|
1388
|
+
children: t.map((b, h) => /* @__PURE__ */ e(R, { ...b }, h))
|
|
1389
|
+
}
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
);
|
|
1393
|
+
De.displayName = "ProductGrid";
|
|
1394
|
+
function mt({
|
|
1395
|
+
...a
|
|
1396
|
+
}) {
|
|
1397
|
+
return /* @__PURE__ */ e(w.Root, { "data-slot": "dialog", ...a });
|
|
1398
|
+
}
|
|
1399
|
+
function ft({
|
|
1400
|
+
...a
|
|
1401
|
+
}) {
|
|
1402
|
+
return /* @__PURE__ */ e(w.Trigger, { "data-slot": "dialog-trigger", ...a });
|
|
1403
|
+
}
|
|
1404
|
+
function Pe({
|
|
1405
|
+
...a
|
|
1406
|
+
}) {
|
|
1407
|
+
return /* @__PURE__ */ e(w.Portal, { "data-slot": "dialog-portal", ...a });
|
|
1408
|
+
}
|
|
1409
|
+
function $e({
|
|
1410
|
+
className: a,
|
|
1411
|
+
...t
|
|
1412
|
+
}) {
|
|
1413
|
+
return /* @__PURE__ */ e(
|
|
1414
|
+
w.Overlay,
|
|
1415
|
+
{
|
|
1416
|
+
"data-slot": "dialog-overlay",
|
|
1417
|
+
className: i(
|
|
1418
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1419
|
+
a
|
|
1420
|
+
),
|
|
1421
|
+
...t
|
|
1422
|
+
}
|
|
1423
|
+
);
|
|
1424
|
+
}
|
|
1425
|
+
function gt({
|
|
1426
|
+
className: a,
|
|
1427
|
+
children: t,
|
|
1428
|
+
...r
|
|
1429
|
+
}) {
|
|
1430
|
+
return /* @__PURE__ */ s(Pe, { "data-slot": "dialog-portal", children: [
|
|
1431
|
+
/* @__PURE__ */ e($e, {}),
|
|
1432
|
+
/* @__PURE__ */ s(
|
|
1433
|
+
w.Content,
|
|
1434
|
+
{
|
|
1435
|
+
"data-slot": "dialog-content",
|
|
1436
|
+
className: i(
|
|
1437
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
1438
|
+
a
|
|
1439
|
+
),
|
|
1440
|
+
...r,
|
|
1441
|
+
children: [
|
|
1442
|
+
t,
|
|
1443
|
+
/* @__PURE__ */ s(w.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
|
|
1444
|
+
/* @__PURE__ */ e(G, {}),
|
|
1445
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
1446
|
+
] })
|
|
1447
|
+
]
|
|
1448
|
+
}
|
|
1449
|
+
)
|
|
1450
|
+
] });
|
|
1451
|
+
}
|
|
1452
|
+
function pt({ className: a, ...t }) {
|
|
1453
|
+
return /* @__PURE__ */ e(
|
|
1454
|
+
"div",
|
|
1455
|
+
{
|
|
1456
|
+
"data-slot": "dialog-header",
|
|
1457
|
+
className: i("flex flex-col gap-2 text-center sm:text-left", a),
|
|
1458
|
+
...t
|
|
1459
|
+
}
|
|
1460
|
+
);
|
|
1461
|
+
}
|
|
1462
|
+
function vt({ className: a, ...t }) {
|
|
1463
|
+
return /* @__PURE__ */ e(
|
|
1464
|
+
"div",
|
|
1465
|
+
{
|
|
1466
|
+
"data-slot": "dialog-footer",
|
|
1467
|
+
className: i(
|
|
1468
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
1469
|
+
a
|
|
1470
|
+
),
|
|
1471
|
+
...t
|
|
1472
|
+
}
|
|
1473
|
+
);
|
|
1474
|
+
}
|
|
1475
|
+
function bt({
|
|
1476
|
+
className: a,
|
|
1477
|
+
...t
|
|
1478
|
+
}) {
|
|
1479
|
+
return /* @__PURE__ */ e(
|
|
1480
|
+
w.Title,
|
|
1481
|
+
{
|
|
1482
|
+
"data-slot": "dialog-title",
|
|
1483
|
+
className: i("text-lg leading-none font-semibold", a),
|
|
1484
|
+
...t
|
|
1485
|
+
}
|
|
1486
|
+
);
|
|
1487
|
+
}
|
|
1488
|
+
function ht({
|
|
1489
|
+
className: a,
|
|
1490
|
+
...t
|
|
1491
|
+
}) {
|
|
1492
|
+
return /* @__PURE__ */ e(
|
|
1493
|
+
w.Description,
|
|
1494
|
+
{
|
|
1495
|
+
"data-slot": "dialog-description",
|
|
1496
|
+
className: i("text-muted-foreground text-sm", a),
|
|
1497
|
+
...t
|
|
1498
|
+
}
|
|
1499
|
+
);
|
|
1500
|
+
}
|
|
1501
|
+
function xt({ ...a }) {
|
|
1502
|
+
return /* @__PURE__ */ e(w.Root, { "data-slot": "sheet", ...a });
|
|
1503
|
+
}
|
|
1504
|
+
function Nt({
|
|
1505
|
+
...a
|
|
1506
|
+
}) {
|
|
1507
|
+
return /* @__PURE__ */ e(w.Trigger, { "data-slot": "sheet-trigger", ...a });
|
|
1508
|
+
}
|
|
1509
|
+
function Te({
|
|
1510
|
+
...a
|
|
1511
|
+
}) {
|
|
1512
|
+
return /* @__PURE__ */ e(w.Portal, { "data-slot": "sheet-portal", ...a });
|
|
1513
|
+
}
|
|
1514
|
+
function Re({
|
|
1515
|
+
className: a,
|
|
1516
|
+
...t
|
|
1517
|
+
}) {
|
|
1518
|
+
return /* @__PURE__ */ e(
|
|
1519
|
+
w.Overlay,
|
|
1520
|
+
{
|
|
1521
|
+
"data-slot": "sheet-overlay",
|
|
1522
|
+
className: i(
|
|
1523
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1524
|
+
a
|
|
1525
|
+
),
|
|
1526
|
+
...t
|
|
1527
|
+
}
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1530
|
+
function wt({
|
|
1531
|
+
className: a,
|
|
1532
|
+
children: t,
|
|
1533
|
+
side: r = "right",
|
|
1534
|
+
...o
|
|
1535
|
+
}) {
|
|
1536
|
+
return /* @__PURE__ */ s(Te, { children: [
|
|
1537
|
+
/* @__PURE__ */ e(Re, {}),
|
|
1538
|
+
/* @__PURE__ */ s(
|
|
1539
|
+
w.Content,
|
|
1540
|
+
{
|
|
1541
|
+
"data-slot": "sheet-content",
|
|
1542
|
+
className: i(
|
|
1543
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1544
|
+
r === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
1545
|
+
r === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
1546
|
+
r === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
1547
|
+
r === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
1548
|
+
a
|
|
1549
|
+
),
|
|
1550
|
+
...o,
|
|
1551
|
+
children: [
|
|
1552
|
+
t,
|
|
1553
|
+
/* @__PURE__ */ s(w.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
1554
|
+
/* @__PURE__ */ e(G, { className: "size-4" }),
|
|
1555
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
1556
|
+
] })
|
|
1557
|
+
]
|
|
1558
|
+
}
|
|
1559
|
+
)
|
|
1560
|
+
] });
|
|
1561
|
+
}
|
|
1562
|
+
function yt({ className: a, ...t }) {
|
|
1563
|
+
return /* @__PURE__ */ e(
|
|
1564
|
+
"div",
|
|
1565
|
+
{
|
|
1566
|
+
"data-slot": "sheet-header",
|
|
1567
|
+
className: i("flex flex-col gap-1.5 p-4", a),
|
|
1568
|
+
...t
|
|
1569
|
+
}
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
function kt({ className: a, ...t }) {
|
|
1573
|
+
return /* @__PURE__ */ e(
|
|
1574
|
+
"div",
|
|
1575
|
+
{
|
|
1576
|
+
"data-slot": "sheet-footer",
|
|
1577
|
+
className: i("mt-auto flex flex-col gap-2 p-4", a),
|
|
1578
|
+
...t
|
|
1579
|
+
}
|
|
1580
|
+
);
|
|
1581
|
+
}
|
|
1582
|
+
function zt({
|
|
1583
|
+
className: a,
|
|
1584
|
+
...t
|
|
1585
|
+
}) {
|
|
1586
|
+
return /* @__PURE__ */ e(
|
|
1587
|
+
w.Title,
|
|
1588
|
+
{
|
|
1589
|
+
"data-slot": "sheet-title",
|
|
1590
|
+
className: i("text-foreground font-semibold", a),
|
|
1591
|
+
...t
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
function St({
|
|
1596
|
+
className: a,
|
|
1597
|
+
...t
|
|
1598
|
+
}) {
|
|
1599
|
+
return /* @__PURE__ */ e(
|
|
1600
|
+
w.Description,
|
|
1601
|
+
{
|
|
1602
|
+
"data-slot": "sheet-description",
|
|
1603
|
+
className: i("text-muted-foreground text-sm", a),
|
|
1604
|
+
...t
|
|
1605
|
+
}
|
|
1606
|
+
);
|
|
1607
|
+
}
|
|
1608
|
+
const Ee = N(
|
|
1609
|
+
({ className: a, onThemeChange: t, onFontSizeChange: r, ...o }, n) => {
|
|
1610
|
+
const [d, l] = k("light"), [c, g] = k(16), [f, p] = k(!1);
|
|
1611
|
+
D(() => {
|
|
1612
|
+
const m = document.documentElement.classList.contains("dark");
|
|
1613
|
+
l(m ? "dark" : "light");
|
|
1614
|
+
const u = getComputedStyle(document.documentElement).getPropertyValue("--font-size");
|
|
1615
|
+
u && g(parseInt(u));
|
|
1616
|
+
}, []), D(() => {
|
|
1617
|
+
if (!f && typeof window < "u" && !document.querySelector('script[src*="vlibras"]')) {
|
|
1618
|
+
const u = document.createElement("script");
|
|
1619
|
+
u.src = "https://vlibras.gov.br/app/vlibras-plugin.js", u.async = !0, u.onload = () => {
|
|
1620
|
+
p(!0), window.VLibras && new window.VLibras.Widget("https://vlibras.gov.br/app");
|
|
1621
|
+
}, document.body.appendChild(u);
|
|
1622
|
+
}
|
|
1623
|
+
}, [f]);
|
|
1624
|
+
const v = () => {
|
|
1625
|
+
const m = d === "light" ? "dark" : "light";
|
|
1626
|
+
l(m), document.documentElement.classList.toggle("dark"), t == null || t(m), localStorage.setItem("theme", m);
|
|
1627
|
+
}, b = () => {
|
|
1628
|
+
const m = Math.min(c + 2, 24);
|
|
1629
|
+
g(m), document.documentElement.style.setProperty("--font-size", `${m}px`), r == null || r(m), localStorage.setItem("fontSize", m.toString());
|
|
1630
|
+
}, h = () => {
|
|
1631
|
+
const m = Math.max(c - 2, 12);
|
|
1632
|
+
g(m), document.documentElement.style.setProperty("--font-size", `${m}px`), r == null || r(m), localStorage.setItem("fontSize", m.toString());
|
|
1633
|
+
};
|
|
1634
|
+
return /* @__PURE__ */ s(
|
|
1635
|
+
"div",
|
|
1636
|
+
{
|
|
1637
|
+
ref: n,
|
|
1638
|
+
className: i(
|
|
1639
|
+
"flex items-center justify-end gap-2 bg-[var(--secondary)] px-4 py-2 border-b border-[var(--border)]",
|
|
1640
|
+
a
|
|
1641
|
+
),
|
|
1642
|
+
role: "toolbar",
|
|
1643
|
+
"aria-label": "Barra de acessibilidade",
|
|
1644
|
+
...o,
|
|
1645
|
+
children: [
|
|
1646
|
+
/* @__PURE__ */ s(
|
|
1647
|
+
"a",
|
|
1648
|
+
{
|
|
1649
|
+
href: "/acessibilidade",
|
|
1650
|
+
className: "flex items-center gap-1.5 text-sm text-[var(--foreground)] hover:text-[var(--brand-primary)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] rounded px-2 py-1 min-h-[44px]",
|
|
1651
|
+
children: [
|
|
1652
|
+
/* @__PURE__ */ e(le, { className: "h-4 w-4" }),
|
|
1653
|
+
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children: "Acessibilidade" })
|
|
1654
|
+
]
|
|
1655
|
+
}
|
|
1656
|
+
),
|
|
1657
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1 border-l border-[var(--border)] pl-2", children: [
|
|
1658
|
+
/* @__PURE__ */ e(
|
|
1659
|
+
"button",
|
|
1660
|
+
{
|
|
1661
|
+
type: "button",
|
|
1662
|
+
onClick: h,
|
|
1663
|
+
disabled: c <= 12,
|
|
1664
|
+
"aria-label": "Diminuir tamanho da fonte",
|
|
1665
|
+
title: "Diminuir fonte (A-)",
|
|
1666
|
+
className: i(
|
|
1667
|
+
"inline-flex items-center justify-center rounded-lg min-w-[44px] min-h-[44px] px-3 text-[var(--foreground)] hover:bg-[var(--accent)] transition-colors",
|
|
1668
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
1669
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1670
|
+
),
|
|
1671
|
+
children: /* @__PURE__ */ e(H, { className: "h-4 w-4" })
|
|
1672
|
+
}
|
|
1673
|
+
),
|
|
1674
|
+
/* @__PURE__ */ s("span", { className: "text-xs text-[var(--muted-foreground)] min-w-[32px] text-center font-medium", children: [
|
|
1675
|
+
"A",
|
|
1676
|
+
c > 16 && "+",
|
|
1677
|
+
c < 16 && "-"
|
|
1678
|
+
] }),
|
|
1679
|
+
/* @__PURE__ */ e(
|
|
1680
|
+
"button",
|
|
1681
|
+
{
|
|
1682
|
+
type: "button",
|
|
1683
|
+
onClick: b,
|
|
1684
|
+
disabled: c >= 24,
|
|
1685
|
+
"aria-label": "Aumentar tamanho da fonte",
|
|
1686
|
+
title: "Aumentar fonte (A+)",
|
|
1687
|
+
className: i(
|
|
1688
|
+
"inline-flex items-center justify-center rounded-lg min-w-[44px] min-h-[44px] px-3 text-[var(--foreground)] hover:bg-[var(--accent)] transition-colors",
|
|
1689
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",
|
|
1690
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1691
|
+
),
|
|
1692
|
+
children: /* @__PURE__ */ e(q, { className: "h-4 w-4" })
|
|
1693
|
+
}
|
|
1694
|
+
)
|
|
1695
|
+
] }),
|
|
1696
|
+
/* @__PURE__ */ e("div", { className: "border-l border-[var(--border)] pl-2", children: /* @__PURE__ */ e(
|
|
1697
|
+
"button",
|
|
1698
|
+
{
|
|
1699
|
+
type: "button",
|
|
1700
|
+
onClick: v,
|
|
1701
|
+
"aria-label": `Alternar para modo ${d === "light" ? "escuro" : "claro"}`,
|
|
1702
|
+
title: `Modo ${d === "light" ? "escuro" : "claro"}`,
|
|
1703
|
+
className: i(
|
|
1704
|
+
"inline-flex items-center justify-center rounded-lg min-w-[44px] min-h-[44px] px-3 text-[var(--foreground)] hover:bg-[var(--accent)] transition-colors",
|
|
1705
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2"
|
|
1706
|
+
),
|
|
1707
|
+
children: d === "light" ? /* @__PURE__ */ e(de, { className: "h-4 w-4" }) : /* @__PURE__ */ e(ce, { className: "h-4 w-4" })
|
|
1708
|
+
}
|
|
1709
|
+
) }),
|
|
1710
|
+
f && /* @__PURE__ */ s("div", { vw: "true", className: "enabled", children: [
|
|
1711
|
+
/* @__PURE__ */ e("div", { "vw-access-button": "true", className: "active" }),
|
|
1712
|
+
/* @__PURE__ */ e("div", { "vw-plugin-wrapper": "true", children: /* @__PURE__ */ e("div", { className: "vw-plugin-top-wrapper" }) })
|
|
1713
|
+
] })
|
|
1714
|
+
]
|
|
1715
|
+
}
|
|
1716
|
+
);
|
|
1717
|
+
}
|
|
1718
|
+
);
|
|
1719
|
+
Ee.displayName = "TopAccessibilityBar";
|
|
1720
|
+
const Be = N(
|
|
1721
|
+
({
|
|
1722
|
+
className: a,
|
|
1723
|
+
slides: t,
|
|
1724
|
+
autoplayDelay: r = 5e3,
|
|
1725
|
+
autoplay: o = !0,
|
|
1726
|
+
...n
|
|
1727
|
+
}, d) => {
|
|
1728
|
+
const [l, c] = k(0), [g, f] = k(!1), [p, v] = k(!1);
|
|
1729
|
+
D(() => {
|
|
1730
|
+
const u = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
1731
|
+
v(u.matches);
|
|
1732
|
+
const x = (S) => {
|
|
1733
|
+
v(S.matches);
|
|
1734
|
+
};
|
|
1735
|
+
return u.addEventListener("change", x), () => u.removeEventListener("change", x);
|
|
1736
|
+
}, []), D(() => {
|
|
1737
|
+
if (!o || g || p) return;
|
|
1738
|
+
const u = setInterval(() => {
|
|
1739
|
+
c((x) => (x + 1) % t.length);
|
|
1740
|
+
}, r);
|
|
1741
|
+
return () => clearInterval(u);
|
|
1742
|
+
}, [o, r, t.length, g, p]);
|
|
1743
|
+
const b = (u) => {
|
|
1744
|
+
c(u), f(!0), setTimeout(() => f(!1), r);
|
|
1745
|
+
}, h = () => {
|
|
1746
|
+
b((l - 1 + t.length) % t.length);
|
|
1747
|
+
}, m = () => {
|
|
1748
|
+
b((l + 1) % t.length);
|
|
1749
|
+
};
|
|
1750
|
+
return t.length === 0 ? null : (t[l], /* @__PURE__ */ s(
|
|
1751
|
+
"div",
|
|
1752
|
+
{
|
|
1753
|
+
ref: d,
|
|
1754
|
+
className: i("relative w-full overflow-hidden", a),
|
|
1755
|
+
onMouseEnter: () => f(!0),
|
|
1756
|
+
onMouseLeave: () => f(!1),
|
|
1757
|
+
...n,
|
|
1758
|
+
children: [
|
|
1759
|
+
/* @__PURE__ */ e("div", { className: "relative", children: t.map((u, x) => /* @__PURE__ */ s(
|
|
1760
|
+
"div",
|
|
1761
|
+
{
|
|
1762
|
+
className: i(
|
|
1763
|
+
"w-full transition-opacity duration-700",
|
|
1764
|
+
x === l ? "block" : "hidden"
|
|
1765
|
+
),
|
|
1766
|
+
"aria-hidden": x !== l,
|
|
1767
|
+
children: [
|
|
1768
|
+
/* @__PURE__ */ s("picture", { children: [
|
|
1769
|
+
/* @__PURE__ */ e(
|
|
1770
|
+
"source",
|
|
1771
|
+
{
|
|
1772
|
+
media: "(min-width: 1024px)",
|
|
1773
|
+
srcSet: `${u.imageDesktop} 1x, ${u.imageDesktop.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`
|
|
1774
|
+
}
|
|
1775
|
+
),
|
|
1776
|
+
/* @__PURE__ */ e(
|
|
1777
|
+
"source",
|
|
1778
|
+
{
|
|
1779
|
+
media: "(min-width: 768px)",
|
|
1780
|
+
srcSet: `${u.imageTablet} 1x, ${u.imageTablet.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`
|
|
1781
|
+
}
|
|
1782
|
+
),
|
|
1783
|
+
/* @__PURE__ */ e(
|
|
1784
|
+
"img",
|
|
1785
|
+
{
|
|
1786
|
+
src: u.imageMobile,
|
|
1787
|
+
srcSet: `${u.imageMobile} 1x, ${u.imageMobile.replace(/\.(jpg|png)$/, "@2x.$1")} 2x`,
|
|
1788
|
+
alt: u.title,
|
|
1789
|
+
className: "w-full object-cover aspect-[3/4] md:aspect-video",
|
|
1790
|
+
loading: x === 0 ? "eager" : "lazy"
|
|
1791
|
+
}
|
|
1792
|
+
)
|
|
1793
|
+
] }),
|
|
1794
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center md:justify-start bg-gradient-to-t from-black/70 via-black/30 to-transparent md:bg-gradient-to-r md:from-black/80 md:via-black/50 md:to-transparent", children: /* @__PURE__ */ e("div", { className: "max-w-7xl mx-auto px-6 lg:px-12 w-full", children: /* @__PURE__ */ s("div", { className: "max-w-2xl text-center md:text-left", children: [
|
|
1795
|
+
/* @__PURE__ */ e("h2", { className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-4", children: u.title }),
|
|
1796
|
+
/* @__PURE__ */ e("p", { className: "text-lg md:text-xl text-gray-200 mb-6", children: u.description }),
|
|
1797
|
+
u.cta && /* @__PURE__ */ e(
|
|
1798
|
+
"a",
|
|
1799
|
+
{
|
|
1800
|
+
href: u.cta.href,
|
|
1801
|
+
className: Q({ variant: "primary", size: "lg" }),
|
|
1802
|
+
children: u.cta.label
|
|
1803
|
+
}
|
|
1804
|
+
)
|
|
1805
|
+
] }) }) })
|
|
1806
|
+
]
|
|
1807
|
+
},
|
|
1808
|
+
u.id
|
|
1809
|
+
)) }),
|
|
1810
|
+
t.length > 1 && /* @__PURE__ */ s(j, { children: [
|
|
1811
|
+
/* @__PURE__ */ e(
|
|
1812
|
+
"button",
|
|
1813
|
+
{
|
|
1814
|
+
onClick: h,
|
|
1815
|
+
className: "absolute left-4 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 shadow-lg transition-all hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] min-w-[44px] min-h-[44px]",
|
|
1816
|
+
"aria-label": "Slide anterior",
|
|
1817
|
+
children: /* @__PURE__ */ e(ue, { className: "h-6 w-6 text-gray-900" })
|
|
1818
|
+
}
|
|
1819
|
+
),
|
|
1820
|
+
/* @__PURE__ */ e(
|
|
1821
|
+
"button",
|
|
1822
|
+
{
|
|
1823
|
+
onClick: m,
|
|
1824
|
+
className: "absolute right-4 top-1/2 -translate-y-1/2 rounded-full bg-white/90 p-2 shadow-lg transition-all hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] min-w-[44px] min-h-[44px]",
|
|
1825
|
+
"aria-label": "Próximo slide",
|
|
1826
|
+
children: /* @__PURE__ */ e(F, { className: "h-6 w-6 text-gray-900" })
|
|
1827
|
+
}
|
|
1828
|
+
)
|
|
1829
|
+
] }),
|
|
1830
|
+
t.length > 1 && /* @__PURE__ */ e("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: t.map((u, x) => /* @__PURE__ */ e(
|
|
1831
|
+
"button",
|
|
1832
|
+
{
|
|
1833
|
+
onClick: () => b(x),
|
|
1834
|
+
className: i(
|
|
1835
|
+
"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",
|
|
1836
|
+
x === l ? "w-8 bg-white" : "w-2 bg-white/50 hover:bg-white/70"
|
|
1837
|
+
),
|
|
1838
|
+
"aria-label": `Ir para slide ${x + 1}`,
|
|
1839
|
+
"aria-current": x === l
|
|
1840
|
+
},
|
|
1841
|
+
x
|
|
1842
|
+
)) })
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
));
|
|
1846
|
+
}
|
|
1847
|
+
);
|
|
1848
|
+
Be.displayName = "HeroCarousel";
|
|
1849
|
+
export {
|
|
1850
|
+
st as Accordion,
|
|
1851
|
+
lt as AccordionContent,
|
|
1852
|
+
ot as AccordionItem,
|
|
1853
|
+
nt as AccordionTrigger,
|
|
1854
|
+
ve as Avatar,
|
|
1855
|
+
P as Badge,
|
|
1856
|
+
Oe as Breadcrumb,
|
|
1857
|
+
tt as BreadcrumbItem,
|
|
1858
|
+
at as BreadcrumbLink,
|
|
1859
|
+
et as BreadcrumbList,
|
|
1860
|
+
rt as BreadcrumbPage,
|
|
1861
|
+
it as BreadcrumbSeparator,
|
|
1862
|
+
z as Button,
|
|
1863
|
+
Ke as Checkbox,
|
|
1864
|
+
gt as DialogContent,
|
|
1865
|
+
ht as DialogDescription,
|
|
1866
|
+
vt as DialogFooter,
|
|
1867
|
+
pt as DialogHeader,
|
|
1868
|
+
bt as DialogTitle,
|
|
1869
|
+
ft as DialogTrigger,
|
|
1870
|
+
xe as Divider,
|
|
1871
|
+
xt as Drawer,
|
|
1872
|
+
W as EmptyState,
|
|
1873
|
+
je as ErrorState,
|
|
1874
|
+
Se as FormGroup,
|
|
1875
|
+
Ie as Hero,
|
|
1876
|
+
Be as HeroCarousel,
|
|
1877
|
+
Fe as Input,
|
|
1878
|
+
mt as Modal,
|
|
1879
|
+
ke as PriceDisplay,
|
|
1880
|
+
R as ProductCard,
|
|
1881
|
+
De as ProductGrid,
|
|
1882
|
+
Pt as ProgressBar,
|
|
1883
|
+
ze as QuantitySelector,
|
|
1884
|
+
Je as RadioGroup,
|
|
1885
|
+
Ye as RadioGroupItem,
|
|
1886
|
+
U as Rating,
|
|
1887
|
+
ye as SearchBar,
|
|
1888
|
+
Ge as Select,
|
|
1889
|
+
We as SelectContent,
|
|
1890
|
+
Xe as SelectItem,
|
|
1891
|
+
Ue as SelectTrigger,
|
|
1892
|
+
Qe as SelectValue,
|
|
1893
|
+
wt as SheetContent,
|
|
1894
|
+
St as SheetDescription,
|
|
1895
|
+
kt as SheetFooter,
|
|
1896
|
+
yt as SheetHeader,
|
|
1897
|
+
zt as SheetTitle,
|
|
1898
|
+
Nt as SheetTrigger,
|
|
1899
|
+
he as Spinner,
|
|
1900
|
+
fe as Textarea,
|
|
1901
|
+
Ze as Toggle,
|
|
1902
|
+
dt as Tooltip,
|
|
1903
|
+
ut as TooltipContent,
|
|
1904
|
+
Ce as TooltipProvider,
|
|
1905
|
+
ct as TooltipTrigger,
|
|
1906
|
+
Ee as TopAccessibilityBar,
|
|
1907
|
+
pe as avatarVariants,
|
|
1908
|
+
ge as badgeVariants,
|
|
1909
|
+
Q as buttonVariants,
|
|
1910
|
+
i as cn,
|
|
1911
|
+
be as spinnerVariants,
|
|
1912
|
+
jt as toast
|
|
1913
|
+
};
|
|
1914
|
+
//# sourceMappingURL=index.js.map
|