@reblu/site-blocks 0.10.0 → 0.12.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/CHANGELOG.md +17 -0
- package/README.md +90 -0
- package/dist/index.cjs +537 -244
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -2
- package/dist/index.d.ts +61 -2
- package/dist/index.js +534 -244
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -29,12 +29,15 @@ __export(src_exports, {
|
|
|
29
29
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
30
30
|
DEFAULT_SHOP_ERROR_MESSAGES: () => DEFAULT_SHOP_ERROR_MESSAGES,
|
|
31
31
|
DEFAULT_SHOP_PRICE_BANDS: () => DEFAULT_SHOP_PRICE_BANDS,
|
|
32
|
+
DEFAULT_TRUST_ICONS: () => DEFAULT_TRUST_ICONS,
|
|
32
33
|
FaqAccordion: () => FaqAccordion,
|
|
33
34
|
MarkdownRenderer: () => MarkdownRenderer,
|
|
34
35
|
OrderConfirmation: () => OrderConfirmation,
|
|
35
36
|
PageBlocks: () => PageBlocks,
|
|
37
|
+
PageCardGrid: () => PageCardGrid,
|
|
36
38
|
ParentPage: () => ParentPage,
|
|
37
39
|
ProductCard: () => ProductCard,
|
|
40
|
+
ProductTrustItems: () => ProductTrustItems,
|
|
38
41
|
ProfileCard: () => ProfileCard,
|
|
39
42
|
SafeHtml: () => SafeHtml,
|
|
40
43
|
ShopFilters: () => ShopFilters,
|
|
@@ -13373,8 +13376,54 @@ function Treatment({ page, className }) {
|
|
|
13373
13376
|
}
|
|
13374
13377
|
|
|
13375
13378
|
// src/components/parent-page.tsx
|
|
13379
|
+
var import_utils5 = require("@reblu/site-ui/utils");
|
|
13380
|
+
|
|
13381
|
+
// src/components/page-card-grid.tsx
|
|
13376
13382
|
var import_utils4 = require("@reblu/site-ui/utils");
|
|
13377
13383
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
13384
|
+
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13385
|
+
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13386
|
+
function PageCardGrid(props) {
|
|
13387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(PageCardGridSection, { ...props });
|
|
13388
|
+
}
|
|
13389
|
+
function PageCardGridSection({
|
|
13390
|
+
pages,
|
|
13391
|
+
pageHref = defaultPageHref,
|
|
13392
|
+
heading,
|
|
13393
|
+
className,
|
|
13394
|
+
keepEmptyHeading = false
|
|
13395
|
+
}) {
|
|
13396
|
+
if (pages.length === 0) return null;
|
|
13397
|
+
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
|
|
13399
|
+
showHeading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13400
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
13401
|
+
"a",
|
|
13402
|
+
{
|
|
13403
|
+
href: pageHref(page),
|
|
13404
|
+
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13405
|
+
children: [
|
|
13406
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13407
|
+
"img",
|
|
13408
|
+
{
|
|
13409
|
+
src: page.coverImageUrl,
|
|
13410
|
+
alt: "",
|
|
13411
|
+
loading: "lazy",
|
|
13412
|
+
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13413
|
+
}
|
|
13414
|
+
) }),
|
|
13415
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13416
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13417
|
+
page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13418
|
+
] })
|
|
13419
|
+
]
|
|
13420
|
+
}
|
|
13421
|
+
) }, pageKey(page))) })
|
|
13422
|
+
] });
|
|
13423
|
+
}
|
|
13424
|
+
|
|
13425
|
+
// src/components/parent-page.tsx
|
|
13426
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
13378
13427
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13379
13428
|
function ParentPage({
|
|
13380
13429
|
page,
|
|
@@ -13389,34 +13438,18 @@ function ParentPage({
|
|
|
13389
13438
|
const pages = childPages ?? treatments ?? [];
|
|
13390
13439
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13391
13440
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13392
|
-
return /* @__PURE__ */ (0,
|
|
13393
|
-
/* @__PURE__ */ (0,
|
|
13394
|
-
/* @__PURE__ */ (0,
|
|
13395
|
-
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13399
|
-
|
|
13400
|
-
|
|
13401
|
-
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
"img",
|
|
13405
|
-
{
|
|
13406
|
-
src: t.coverImageUrl,
|
|
13407
|
-
alt: "",
|
|
13408
|
-
loading: "lazy",
|
|
13409
|
-
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13410
|
-
}
|
|
13411
|
-
) }),
|
|
13412
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13413
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: t.title }),
|
|
13414
|
-
t.excerpt && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: t.excerpt })
|
|
13415
|
-
] })
|
|
13416
|
-
]
|
|
13417
|
-
}
|
|
13418
|
-
) }, t.slug)) })
|
|
13419
|
-
] })
|
|
13441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
|
|
13442
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageHero, { page }),
|
|
13443
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageSectionList, { sections: page.sections }),
|
|
13444
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13445
|
+
PageCardGridSection,
|
|
13446
|
+
{
|
|
13447
|
+
pages,
|
|
13448
|
+
heading: label,
|
|
13449
|
+
pageHref: (child) => hrefFor(child.slug),
|
|
13450
|
+
keepEmptyHeading: true
|
|
13451
|
+
}
|
|
13452
|
+
)
|
|
13420
13453
|
] });
|
|
13421
13454
|
}
|
|
13422
13455
|
|
|
@@ -13424,34 +13457,34 @@ function ParentPage({
|
|
|
13424
13457
|
var Specialty = ParentPage;
|
|
13425
13458
|
|
|
13426
13459
|
// src/components/profile-card.tsx
|
|
13427
|
-
var
|
|
13428
|
-
var
|
|
13460
|
+
var import_utils6 = require("@reblu/site-ui/utils");
|
|
13461
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
13429
13462
|
function initials(name) {
|
|
13430
13463
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13431
13464
|
}
|
|
13432
13465
|
function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, className }) {
|
|
13433
13466
|
const NameTag = href ? "a" : "span";
|
|
13434
|
-
return /* @__PURE__ */ (0,
|
|
13467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
13435
13468
|
"article",
|
|
13436
13469
|
{
|
|
13437
|
-
className: (0,
|
|
13470
|
+
className: (0, import_utils6.cn)(
|
|
13438
13471
|
"flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
|
|
13439
13472
|
className
|
|
13440
13473
|
),
|
|
13441
13474
|
"data-slot": "profile-card",
|
|
13442
13475
|
children: [
|
|
13443
|
-
/* @__PURE__ */ (0,
|
|
13444
|
-
/* @__PURE__ */ (0,
|
|
13445
|
-
/* @__PURE__ */ (0,
|
|
13476
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground", "aria-hidden": "true", children: initials(name) }) }),
|
|
13477
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "space-y-1", children: [
|
|
13478
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13446
13479
|
NameTag,
|
|
13447
13480
|
{
|
|
13448
13481
|
...href ? { href, className: "transition-colors hover:text-primary" } : {},
|
|
13449
13482
|
children: name
|
|
13450
13483
|
}
|
|
13451
13484
|
) }),
|
|
13452
|
-
role && /* @__PURE__ */ (0,
|
|
13485
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13453
13486
|
] }),
|
|
13454
|
-
specialties.length > 0 && /* @__PURE__ */ (0,
|
|
13487
|
+
specialties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13455
13488
|
"li",
|
|
13456
13489
|
{
|
|
13457
13490
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13459,28 +13492,28 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13459
13492
|
},
|
|
13460
13493
|
s2
|
|
13461
13494
|
)) }),
|
|
13462
|
-
bio && /* @__PURE__ */ (0,
|
|
13495
|
+
bio && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13463
13496
|
]
|
|
13464
13497
|
}
|
|
13465
13498
|
);
|
|
13466
13499
|
}
|
|
13467
13500
|
|
|
13468
13501
|
// src/components/product-card.tsx
|
|
13469
|
-
var
|
|
13470
|
-
var
|
|
13502
|
+
var import_utils7 = require("@reblu/site-ui/utils");
|
|
13503
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
13471
13504
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13472
13505
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13473
13506
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13474
|
-
return /* @__PURE__ */ (0,
|
|
13507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
13475
13508
|
"article",
|
|
13476
13509
|
{
|
|
13477
|
-
className: (0,
|
|
13510
|
+
className: (0, import_utils7.cn)(
|
|
13478
13511
|
"group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13479
13512
|
className
|
|
13480
13513
|
),
|
|
13481
13514
|
"data-slot": "product-card",
|
|
13482
13515
|
children: [
|
|
13483
|
-
/* @__PURE__ */ (0,
|
|
13516
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
13484
13517
|
"img",
|
|
13485
13518
|
{
|
|
13486
13519
|
src: image.url,
|
|
@@ -13488,14 +13521,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13488
13521
|
loading: "lazy",
|
|
13489
13522
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13490
13523
|
}
|
|
13491
|
-
) : /* @__PURE__ */ (0,
|
|
13492
|
-
/* @__PURE__ */ (0,
|
|
13493
|
-
product.category && /* @__PURE__ */ (0,
|
|
13494
|
-
/* @__PURE__ */ (0,
|
|
13495
|
-
product.shortDescription && /* @__PURE__ */ (0,
|
|
13496
|
-
/* @__PURE__ */ (0,
|
|
13497
|
-
/* @__PURE__ */ (0,
|
|
13498
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
13524
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13525
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13526
|
+
product.category && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
|
|
13527
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13528
|
+
product.shortDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13529
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13530
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13531
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13499
13532
|
] })
|
|
13500
13533
|
] })
|
|
13501
13534
|
]
|
|
@@ -13503,11 +13536,246 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13503
13536
|
);
|
|
13504
13537
|
}
|
|
13505
13538
|
|
|
13539
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
13540
|
+
var import_react2 = require("react");
|
|
13541
|
+
|
|
13542
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
13543
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
13544
|
+
var toCamelCase = (string) => string.replace(
|
|
13545
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
13546
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
13547
|
+
);
|
|
13548
|
+
var toPascalCase = (string) => {
|
|
13549
|
+
const camelCase = toCamelCase(string);
|
|
13550
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
13551
|
+
};
|
|
13552
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
13553
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
13554
|
+
}).join(" ").trim();
|
|
13555
|
+
var hasA11yProp = (props) => {
|
|
13556
|
+
for (const prop in props) {
|
|
13557
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
13558
|
+
return true;
|
|
13559
|
+
}
|
|
13560
|
+
}
|
|
13561
|
+
};
|
|
13562
|
+
|
|
13563
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js
|
|
13564
|
+
var import_react = require("react");
|
|
13565
|
+
|
|
13566
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
13567
|
+
var defaultAttributes = {
|
|
13568
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13569
|
+
width: 24,
|
|
13570
|
+
height: 24,
|
|
13571
|
+
viewBox: "0 0 24 24",
|
|
13572
|
+
fill: "none",
|
|
13573
|
+
stroke: "currentColor",
|
|
13574
|
+
strokeWidth: 2,
|
|
13575
|
+
strokeLinecap: "round",
|
|
13576
|
+
strokeLinejoin: "round"
|
|
13577
|
+
};
|
|
13578
|
+
|
|
13579
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js
|
|
13580
|
+
var Icon = (0, import_react.forwardRef)(
|
|
13581
|
+
({
|
|
13582
|
+
color: color2 = "currentColor",
|
|
13583
|
+
size = 24,
|
|
13584
|
+
strokeWidth = 2,
|
|
13585
|
+
absoluteStrokeWidth,
|
|
13586
|
+
className = "",
|
|
13587
|
+
children: children2,
|
|
13588
|
+
iconNode,
|
|
13589
|
+
...rest
|
|
13590
|
+
}, ref) => (0, import_react.createElement)(
|
|
13591
|
+
"svg",
|
|
13592
|
+
{
|
|
13593
|
+
ref,
|
|
13594
|
+
...defaultAttributes,
|
|
13595
|
+
width: size,
|
|
13596
|
+
height: size,
|
|
13597
|
+
stroke: color2,
|
|
13598
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
13599
|
+
className: mergeClasses("lucide", className),
|
|
13600
|
+
...!children2 && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
13601
|
+
...rest
|
|
13602
|
+
},
|
|
13603
|
+
[
|
|
13604
|
+
...iconNode.map(([tag, attrs]) => (0, import_react.createElement)(tag, attrs)),
|
|
13605
|
+
...Array.isArray(children2) ? children2 : [children2]
|
|
13606
|
+
]
|
|
13607
|
+
)
|
|
13608
|
+
);
|
|
13609
|
+
|
|
13610
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
13611
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
13612
|
+
const Component = (0, import_react2.forwardRef)(
|
|
13613
|
+
({ className, ...props }, ref) => (0, import_react2.createElement)(Icon, {
|
|
13614
|
+
ref,
|
|
13615
|
+
iconNode,
|
|
13616
|
+
className: mergeClasses(
|
|
13617
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
13618
|
+
`lucide-${iconName}`,
|
|
13619
|
+
className
|
|
13620
|
+
),
|
|
13621
|
+
...props
|
|
13622
|
+
})
|
|
13623
|
+
);
|
|
13624
|
+
Component.displayName = toPascalCase(iconName);
|
|
13625
|
+
return Component;
|
|
13626
|
+
};
|
|
13627
|
+
|
|
13628
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/award.js
|
|
13629
|
+
var __iconNode = [
|
|
13630
|
+
[
|
|
13631
|
+
"path",
|
|
13632
|
+
{
|
|
13633
|
+
d: "m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",
|
|
13634
|
+
key: "1yiouv"
|
|
13635
|
+
}
|
|
13636
|
+
],
|
|
13637
|
+
["circle", { cx: "12", cy: "8", r: "6", key: "1vp47v" }]
|
|
13638
|
+
];
|
|
13639
|
+
var Award = createLucideIcon("award", __iconNode);
|
|
13640
|
+
|
|
13641
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/badge-check.js
|
|
13642
|
+
var __iconNode2 = [
|
|
13643
|
+
[
|
|
13644
|
+
"path",
|
|
13645
|
+
{
|
|
13646
|
+
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
|
|
13647
|
+
key: "3c2336"
|
|
13648
|
+
}
|
|
13649
|
+
],
|
|
13650
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
13651
|
+
];
|
|
13652
|
+
var BadgeCheck = createLucideIcon("badge-check", __iconNode2);
|
|
13653
|
+
|
|
13654
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/gift.js
|
|
13655
|
+
var __iconNode3 = [
|
|
13656
|
+
["rect", { x: "3", y: "8", width: "18", height: "4", rx: "1", key: "bkv52" }],
|
|
13657
|
+
["path", { d: "M12 8v13", key: "1c76mn" }],
|
|
13658
|
+
["path", { d: "M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7", key: "6wjy6b" }],
|
|
13659
|
+
[
|
|
13660
|
+
"path",
|
|
13661
|
+
{
|
|
13662
|
+
d: "M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",
|
|
13663
|
+
key: "1ihvrl"
|
|
13664
|
+
}
|
|
13665
|
+
]
|
|
13666
|
+
];
|
|
13667
|
+
var Gift = createLucideIcon("gift", __iconNode3);
|
|
13668
|
+
|
|
13669
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/headset.js
|
|
13670
|
+
var __iconNode4 = [
|
|
13671
|
+
[
|
|
13672
|
+
"path",
|
|
13673
|
+
{
|
|
13674
|
+
d: "M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",
|
|
13675
|
+
key: "12oyoe"
|
|
13676
|
+
}
|
|
13677
|
+
],
|
|
13678
|
+
["path", { d: "M21 16v2a4 4 0 0 1-4 4h-5", key: "1x7m43" }]
|
|
13679
|
+
];
|
|
13680
|
+
var Headset = createLucideIcon("headset", __iconNode4);
|
|
13681
|
+
|
|
13682
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
13683
|
+
var __iconNode5 = [
|
|
13684
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
13685
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
13686
|
+
];
|
|
13687
|
+
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode5);
|
|
13688
|
+
|
|
13689
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/shield-check.js
|
|
13690
|
+
var __iconNode6 = [
|
|
13691
|
+
[
|
|
13692
|
+
"path",
|
|
13693
|
+
{
|
|
13694
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
13695
|
+
key: "oel41y"
|
|
13696
|
+
}
|
|
13697
|
+
],
|
|
13698
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
13699
|
+
];
|
|
13700
|
+
var ShieldCheck = createLucideIcon("shield-check", __iconNode6);
|
|
13701
|
+
|
|
13702
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/store.js
|
|
13703
|
+
var __iconNode7 = [
|
|
13704
|
+
["path", { d: "M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5", key: "slp6dd" }],
|
|
13705
|
+
[
|
|
13706
|
+
"path",
|
|
13707
|
+
{
|
|
13708
|
+
d: "M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",
|
|
13709
|
+
key: "o0xfot"
|
|
13710
|
+
}
|
|
13711
|
+
],
|
|
13712
|
+
["path", { d: "M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05", key: "wn3emo" }]
|
|
13713
|
+
];
|
|
13714
|
+
var Store = createLucideIcon("store", __iconNode7);
|
|
13715
|
+
|
|
13716
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/truck.js
|
|
13717
|
+
var __iconNode8 = [
|
|
13718
|
+
["path", { d: "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2", key: "wrbu53" }],
|
|
13719
|
+
["path", { d: "M15 18H9", key: "1lyqi6" }],
|
|
13720
|
+
[
|
|
13721
|
+
"path",
|
|
13722
|
+
{
|
|
13723
|
+
d: "M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",
|
|
13724
|
+
key: "lysw3i"
|
|
13725
|
+
}
|
|
13726
|
+
],
|
|
13727
|
+
["circle", { cx: "17", cy: "18", r: "2", key: "332jqn" }],
|
|
13728
|
+
["circle", { cx: "7", cy: "18", r: "2", key: "19iecd" }]
|
|
13729
|
+
];
|
|
13730
|
+
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13731
|
+
|
|
13732
|
+
// src/components/product-trust-items.tsx
|
|
13733
|
+
var import_utils10 = require("@reblu/site-ui/utils");
|
|
13734
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
13735
|
+
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13736
|
+
shipping: Truck,
|
|
13737
|
+
returns: RotateCcw,
|
|
13738
|
+
"secure-payment": ShieldCheck,
|
|
13739
|
+
support: Headset,
|
|
13740
|
+
gift: Gift,
|
|
13741
|
+
pickup: Store,
|
|
13742
|
+
warranty: BadgeCheck,
|
|
13743
|
+
quality: Award
|
|
13744
|
+
});
|
|
13745
|
+
function isKnownIcon(icon) {
|
|
13746
|
+
return Object.prototype.hasOwnProperty.call(DEFAULT_TRUST_ICONS, icon);
|
|
13747
|
+
}
|
|
13748
|
+
function isEntryObject(value) {
|
|
13749
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13750
|
+
}
|
|
13751
|
+
function ProductTrustItems({
|
|
13752
|
+
items,
|
|
13753
|
+
icons,
|
|
13754
|
+
as: List = "ul",
|
|
13755
|
+
className,
|
|
13756
|
+
itemClassName
|
|
13757
|
+
}) {
|
|
13758
|
+
if (!Array.isArray(items) || items.length === 0) return null;
|
|
13759
|
+
const rows = items.flatMap((item, index) => {
|
|
13760
|
+
if (!isEntryObject(item)) return [];
|
|
13761
|
+
const icon = item.icon;
|
|
13762
|
+
const text3 = typeof item.text === "string" ? item.text.trim() : "";
|
|
13763
|
+
if (typeof icon !== "string" || !isKnownIcon(icon) || text3 === "") return [];
|
|
13764
|
+
const Icon2 = icons?.[icon] ?? DEFAULT_TRUST_ICONS[icon];
|
|
13765
|
+
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13766
|
+
});
|
|
13767
|
+
if (rows.length === 0) return null;
|
|
13768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(List, { "data-slot": "product-trust-items", className: (0, import_utils10.cn)("space-y-2.5", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("li", { className: (0, import_utils10.cn)("flex items-center gap-3 text-sm text-muted-foreground", itemClassName), children: [
|
|
13769
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13770
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: text3 })
|
|
13771
|
+
] }, key2)) });
|
|
13772
|
+
}
|
|
13773
|
+
|
|
13506
13774
|
// src/components/faq-accordion.tsx
|
|
13507
|
-
var
|
|
13775
|
+
var import_utils11 = require("@reblu/site-ui/utils");
|
|
13508
13776
|
|
|
13509
13777
|
// src/components/_heading.tsx
|
|
13510
|
-
var
|
|
13778
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
13511
13779
|
function nextHeadingLevel(level) {
|
|
13512
13780
|
return Math.min(level + 1, 6);
|
|
13513
13781
|
}
|
|
@@ -13517,11 +13785,11 @@ function Heading({
|
|
|
13517
13785
|
children: children2
|
|
13518
13786
|
}) {
|
|
13519
13787
|
const Tag = `h${level}`;
|
|
13520
|
-
return /* @__PURE__ */ (0,
|
|
13788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tag, { className, children: children2 });
|
|
13521
13789
|
}
|
|
13522
13790
|
|
|
13523
13791
|
// src/components/faq-accordion.tsx
|
|
13524
|
-
var
|
|
13792
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
13525
13793
|
function FaqAccordion({
|
|
13526
13794
|
items,
|
|
13527
13795
|
heading,
|
|
@@ -13532,18 +13800,18 @@ function FaqAccordion({
|
|
|
13532
13800
|
}) {
|
|
13533
13801
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13534
13802
|
if (visible.length === 0) return null;
|
|
13535
|
-
return /* @__PURE__ */ (0,
|
|
13536
|
-
heading && /* @__PURE__ */ (0,
|
|
13537
|
-
/* @__PURE__ */ (0,
|
|
13803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: (0, import_utils11.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
13804
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
13805
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13538
13806
|
"details",
|
|
13539
13807
|
{
|
|
13540
13808
|
className: "group px-4",
|
|
13541
13809
|
"data-slot": "faq-item",
|
|
13542
13810
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13543
13811
|
children: [
|
|
13544
|
-
/* @__PURE__ */ (0,
|
|
13545
|
-
questionHeadingLevel ? /* @__PURE__ */ (0,
|
|
13546
|
-
/* @__PURE__ */ (0,
|
|
13812
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
|
|
13813
|
+
questionHeadingLevel ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: item.q }),
|
|
13814
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13547
13815
|
"span",
|
|
13548
13816
|
{
|
|
13549
13817
|
"aria-hidden": "true",
|
|
@@ -13552,7 +13820,7 @@ function FaqAccordion({
|
|
|
13552
13820
|
}
|
|
13553
13821
|
)
|
|
13554
13822
|
] }),
|
|
13555
|
-
/* @__PURE__ */ (0,
|
|
13823
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
13556
13824
|
]
|
|
13557
13825
|
},
|
|
13558
13826
|
index
|
|
@@ -13561,40 +13829,40 @@ function FaqAccordion({
|
|
|
13561
13829
|
}
|
|
13562
13830
|
|
|
13563
13831
|
// src/components/page-blocks.tsx
|
|
13564
|
-
var
|
|
13832
|
+
var import_utils12 = require("@reblu/site-ui/utils");
|
|
13565
13833
|
var import_button_variants2 = require("@reblu/site-ui/button-variants");
|
|
13566
|
-
var
|
|
13834
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
13567
13835
|
var ALIASES = {
|
|
13568
13836
|
doctor_embed: "profile_embed",
|
|
13569
13837
|
specialty_embed: "page_embed"
|
|
13570
13838
|
};
|
|
13571
13839
|
function HeroBlock({ block, headingLevel }) {
|
|
13572
13840
|
const { title, subtitle, imageUrl } = block.data;
|
|
13573
|
-
return /* @__PURE__ */ (0,
|
|
13574
|
-
/* @__PURE__ */ (0,
|
|
13575
|
-
subtitle && /* @__PURE__ */ (0,
|
|
13576
|
-
imageUrl && /* @__PURE__ */ (0,
|
|
13841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-4", children: [
|
|
13842
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
13843
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
13844
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
13577
13845
|
] });
|
|
13578
13846
|
}
|
|
13579
13847
|
function RichtextBlock({ block, headingLevel }) {
|
|
13580
|
-
return /* @__PURE__ */ (0,
|
|
13848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
13581
13849
|
}
|
|
13582
13850
|
function FaqBlock({ block }) {
|
|
13583
|
-
return /* @__PURE__ */ (0,
|
|
13851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FaqAccordion, { items: block.data.items });
|
|
13584
13852
|
}
|
|
13585
13853
|
function StatsBlock({ block }) {
|
|
13586
|
-
return /* @__PURE__ */ (0,
|
|
13587
|
-
/* @__PURE__ */ (0,
|
|
13588
|
-
/* @__PURE__ */ (0,
|
|
13854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
13855
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
13856
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
|
|
13589
13857
|
] }, i)) });
|
|
13590
13858
|
}
|
|
13591
13859
|
function TestimonialBlock({ block }) {
|
|
13592
13860
|
const { quote, author, role, avatarUrl } = block.data;
|
|
13593
|
-
return /* @__PURE__ */ (0,
|
|
13594
|
-
/* @__PURE__ */ (0,
|
|
13595
|
-
/* @__PURE__ */ (0,
|
|
13861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figure", { className: "space-y-4", children: [
|
|
13862
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: quote }) }),
|
|
13863
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
|
|
13596
13864
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
13597
|
-
/* @__PURE__ */ (0,
|
|
13865
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13598
13866
|
"img",
|
|
13599
13867
|
{
|
|
13600
13868
|
src: avatarUrl,
|
|
@@ -13603,9 +13871,9 @@ function TestimonialBlock({ block }) {
|
|
|
13603
13871
|
className: "h-10 w-10 rounded-full object-cover"
|
|
13604
13872
|
}
|
|
13605
13873
|
),
|
|
13606
|
-
/* @__PURE__ */ (0,
|
|
13607
|
-
/* @__PURE__ */ (0,
|
|
13608
|
-
role && /* @__PURE__ */ (0,
|
|
13874
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { children: [
|
|
13875
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-semibold", children: author }),
|
|
13876
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "block text-sm opacity-80", children: role })
|
|
13609
13877
|
] })
|
|
13610
13878
|
] })
|
|
13611
13879
|
] });
|
|
@@ -13614,19 +13882,19 @@ function CtaSlotBlock(_props) {
|
|
|
13614
13882
|
return null;
|
|
13615
13883
|
}
|
|
13616
13884
|
function FeatureListBlock({ block }) {
|
|
13617
|
-
return /* @__PURE__ */ (0,
|
|
13885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: item.text }, i)) });
|
|
13618
13886
|
}
|
|
13619
13887
|
function GalleryBlock({ block }) {
|
|
13620
13888
|
const { images } = block.data;
|
|
13621
|
-
return /* @__PURE__ */ (0,
|
|
13889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13622
13890
|
"div",
|
|
13623
13891
|
{
|
|
13624
|
-
className: (0,
|
|
13892
|
+
className: (0, import_utils12.cn)(
|
|
13625
13893
|
"grid gap-4",
|
|
13626
13894
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
13627
13895
|
),
|
|
13628
|
-
children: images.map((img, i) => /* @__PURE__ */ (0,
|
|
13629
|
-
/* @__PURE__ */ (0,
|
|
13896
|
+
children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("figure", { className: "space-y-1", children: [
|
|
13897
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13630
13898
|
"img",
|
|
13631
13899
|
{
|
|
13632
13900
|
src: img.url,
|
|
@@ -13635,7 +13903,7 @@ function GalleryBlock({ block }) {
|
|
|
13635
13903
|
className: "h-full w-full object-cover"
|
|
13636
13904
|
}
|
|
13637
13905
|
) }),
|
|
13638
|
-
img.caption && /* @__PURE__ */ (0,
|
|
13906
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
13639
13907
|
] }, `${img.url}-${i}`))
|
|
13640
13908
|
}
|
|
13641
13909
|
);
|
|
@@ -13645,13 +13913,13 @@ function EmbedCard({
|
|
|
13645
13913
|
headingLevel,
|
|
13646
13914
|
embedHref
|
|
13647
13915
|
}) {
|
|
13648
|
-
return /* @__PURE__ */ (0,
|
|
13916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
13649
13917
|
"a",
|
|
13650
13918
|
{
|
|
13651
13919
|
href: embedHref(resolved),
|
|
13652
13920
|
className: "group block overflow-hidden rounded-xl border border-border bg-card text-card-foreground transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
13653
13921
|
children: [
|
|
13654
|
-
resolved.coverImageUrl && /* @__PURE__ */ (0,
|
|
13922
|
+
resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13655
13923
|
"img",
|
|
13656
13924
|
{
|
|
13657
13925
|
src: resolved.coverImageUrl,
|
|
@@ -13660,24 +13928,24 @@ function EmbedCard({
|
|
|
13660
13928
|
className: "h-full w-full object-cover"
|
|
13661
13929
|
}
|
|
13662
13930
|
) }),
|
|
13663
|
-
/* @__PURE__ */ (0,
|
|
13664
|
-
/* @__PURE__ */ (0,
|
|
13665
|
-
resolved.role && /* @__PURE__ */ (0,
|
|
13666
|
-
resolved.excerpt && /* @__PURE__ */ (0,
|
|
13931
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "space-y-1 p-4", children: [
|
|
13932
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
13933
|
+
resolved.role && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
13934
|
+
resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
13667
13935
|
] })
|
|
13668
13936
|
]
|
|
13669
13937
|
}
|
|
13670
13938
|
);
|
|
13671
13939
|
}
|
|
13672
13940
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
13673
|
-
return /* @__PURE__ */ (0,
|
|
13941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13674
13942
|
}
|
|
13675
13943
|
function ProfileEmbedBlock({
|
|
13676
13944
|
block,
|
|
13677
13945
|
headingLevel,
|
|
13678
13946
|
embedHref
|
|
13679
13947
|
}) {
|
|
13680
|
-
return /* @__PURE__ */ (0,
|
|
13948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13681
13949
|
}
|
|
13682
13950
|
var DEFAULT_RENDERERS = {
|
|
13683
13951
|
hero: HeroBlock,
|
|
@@ -13734,14 +14002,14 @@ function toIdFragment(value) {
|
|
|
13734
14002
|
function SectionCta2({ cta }) {
|
|
13735
14003
|
if (!hasUsableCta(cta)) return null;
|
|
13736
14004
|
const variant = toButtonVariant(cta.variant);
|
|
13737
|
-
return /* @__PURE__ */ (0,
|
|
14005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13738
14006
|
"a",
|
|
13739
14007
|
{
|
|
13740
14008
|
href: cta.url,
|
|
13741
14009
|
"data-slot": "button",
|
|
13742
14010
|
"data-variant": variant,
|
|
13743
14011
|
"data-size": "default",
|
|
13744
|
-
className: (0,
|
|
14012
|
+
className: (0, import_utils12.cn)((0, import_button_variants2.buttonVariants)({ variant, size: "default" })),
|
|
13745
14013
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13746
14014
|
children: cta.label
|
|
13747
14015
|
}
|
|
@@ -13767,17 +14035,17 @@ function PageBlocks({
|
|
|
13767
14035
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
13768
14036
|
const background = block.backgroundColor;
|
|
13769
14037
|
return [
|
|
13770
|
-
/* @__PURE__ */ (0,
|
|
14038
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
13771
14039
|
"section",
|
|
13772
14040
|
{
|
|
13773
14041
|
"data-slot": "page-block",
|
|
13774
14042
|
"data-block-type": type,
|
|
13775
14043
|
"aria-labelledby": headingId,
|
|
13776
14044
|
style: surfaceStyle(background),
|
|
13777
|
-
className: (0,
|
|
14045
|
+
className: (0, import_utils12.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
13778
14046
|
children: [
|
|
13779
|
-
block.heading && /* @__PURE__ */ (0,
|
|
13780
|
-
/* @__PURE__ */ (0,
|
|
14047
|
+
block.heading && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { id: headingId, children: block.heading }) }),
|
|
14048
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13781
14049
|
Renderer,
|
|
13782
14050
|
{
|
|
13783
14051
|
block,
|
|
@@ -13785,7 +14053,7 @@ function PageBlocks({
|
|
|
13785
14053
|
embedHref
|
|
13786
14054
|
}
|
|
13787
14055
|
),
|
|
13788
|
-
/* @__PURE__ */ (0,
|
|
14056
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SectionCta2, { cta: block.cta })
|
|
13789
14057
|
]
|
|
13790
14058
|
},
|
|
13791
14059
|
block.id
|
|
@@ -13793,12 +14061,12 @@ function PageBlocks({
|
|
|
13793
14061
|
];
|
|
13794
14062
|
});
|
|
13795
14063
|
if (sections.length === 0) return null;
|
|
13796
|
-
return /* @__PURE__ */ (0,
|
|
14064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: (0, import_utils12.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
13797
14065
|
}
|
|
13798
14066
|
|
|
13799
14067
|
// src/components/shop-filters.tsx
|
|
13800
|
-
var
|
|
13801
|
-
var
|
|
14068
|
+
var import_utils13 = require("@reblu/site-ui/utils");
|
|
14069
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
13802
14070
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
13803
14071
|
{ max: 2500 },
|
|
13804
14072
|
{ min: 2500, max: 5e3 },
|
|
@@ -13842,7 +14110,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
13842
14110
|
return "";
|
|
13843
14111
|
}
|
|
13844
14112
|
function OptionLink({ href, active, label, onActivate }) {
|
|
13845
|
-
return /* @__PURE__ */ (0,
|
|
14113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13846
14114
|
"a",
|
|
13847
14115
|
{
|
|
13848
14116
|
href,
|
|
@@ -13851,7 +14119,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
13851
14119
|
event.preventDefault();
|
|
13852
14120
|
onActivate();
|
|
13853
14121
|
} : void 0,
|
|
13854
|
-
className: (0,
|
|
14122
|
+
className: (0, import_utils13.cn)(
|
|
13855
14123
|
"inline-flex items-center rounded-full border px-3 py-1 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
13856
14124
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
13857
14125
|
),
|
|
@@ -13860,9 +14128,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
13860
14128
|
);
|
|
13861
14129
|
}
|
|
13862
14130
|
function FilterFieldset({ legend, children: children2 }) {
|
|
13863
|
-
return /* @__PURE__ */ (0,
|
|
13864
|
-
/* @__PURE__ */ (0,
|
|
13865
|
-
/* @__PURE__ */ (0,
|
|
14131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("fieldset", { className: "space-y-2", children: [
|
|
14132
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14133
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
13866
14134
|
] });
|
|
13867
14135
|
}
|
|
13868
14136
|
function ShopFilters({
|
|
@@ -13885,11 +14153,11 @@ function ShopFilters({
|
|
|
13885
14153
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
13886
14154
|
return null;
|
|
13887
14155
|
}
|
|
13888
|
-
return /* @__PURE__ */ (0,
|
|
14156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: (0, import_utils13.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
13889
14157
|
visibleTaxonomies.map((axis) => {
|
|
13890
14158
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
13891
|
-
return /* @__PURE__ */ (0,
|
|
13892
|
-
/* @__PURE__ */ (0,
|
|
14159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(FilterFieldset, { legend: axis.label, children: [
|
|
14160
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13893
14161
|
OptionLink,
|
|
13894
14162
|
{
|
|
13895
14163
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -13904,7 +14172,7 @@ function ShopFilters({
|
|
|
13904
14172
|
),
|
|
13905
14173
|
axis.terms.map((term) => {
|
|
13906
14174
|
const isActive = activeSlug === term.slug;
|
|
13907
|
-
return /* @__PURE__ */ (0,
|
|
14175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13908
14176
|
OptionLink,
|
|
13909
14177
|
{
|
|
13910
14178
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -13924,9 +14192,9 @@ function ShopFilters({
|
|
|
13924
14192
|
}),
|
|
13925
14193
|
visibleAttributes.map((attr) => {
|
|
13926
14194
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
13927
|
-
return /* @__PURE__ */ (0,
|
|
14195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
13928
14196
|
const isActive = activeValues.includes(opt.value);
|
|
13929
|
-
return /* @__PURE__ */ (0,
|
|
14197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13930
14198
|
OptionLink,
|
|
13931
14199
|
{
|
|
13932
14200
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -13944,11 +14212,11 @@ function ShopFilters({
|
|
|
13944
14212
|
);
|
|
13945
14213
|
}) }, attr.key);
|
|
13946
14214
|
}),
|
|
13947
|
-
showPriceGroup && /* @__PURE__ */ (0,
|
|
14215
|
+
showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
13948
14216
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
13949
14217
|
const nextMin = isActive ? void 0 : band.min;
|
|
13950
14218
|
const nextMax = isActive ? void 0 : band.max;
|
|
13951
|
-
return /* @__PURE__ */ (0,
|
|
14219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13952
14220
|
OptionLink,
|
|
13953
14221
|
{
|
|
13954
14222
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -13959,7 +14227,7 @@ function ShopFilters({
|
|
|
13959
14227
|
i
|
|
13960
14228
|
);
|
|
13961
14229
|
}) }),
|
|
13962
|
-
hasOnSale && /* @__PURE__ */ (0,
|
|
14230
|
+
hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13963
14231
|
OptionLink,
|
|
13964
14232
|
{
|
|
13965
14233
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -13968,7 +14236,7 @@ function ShopFilters({
|
|
|
13968
14236
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
13969
14237
|
}
|
|
13970
14238
|
),
|
|
13971
|
-
/* @__PURE__ */ (0,
|
|
14239
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
13972
14240
|
"a",
|
|
13973
14241
|
{
|
|
13974
14242
|
href: hrefs.clearAll(),
|
|
@@ -13984,8 +14252,8 @@ function ShopFilters({
|
|
|
13984
14252
|
}
|
|
13985
14253
|
|
|
13986
14254
|
// src/components/cart-line-list.tsx
|
|
13987
|
-
var
|
|
13988
|
-
var
|
|
14255
|
+
var import_utils14 = require("@reblu/site-ui/utils");
|
|
14256
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
13989
14257
|
var DEFAULT_LABELS2 = {
|
|
13990
14258
|
quantityLabel: "Cantidad",
|
|
13991
14259
|
decrease: "Reducir cantidad",
|
|
@@ -14010,9 +14278,9 @@ function CartLineList({
|
|
|
14010
14278
|
}) {
|
|
14011
14279
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14012
14280
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14013
|
-
return /* @__PURE__ */ (0,
|
|
14014
|
-
/* @__PURE__ */ (0,
|
|
14015
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0,
|
|
14281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_utils14.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14282
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14283
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
14016
14284
|
"div",
|
|
14017
14285
|
{
|
|
14018
14286
|
role: "status",
|
|
@@ -14021,32 +14289,32 @@ function CartLineList({
|
|
|
14021
14289
|
children: noticeContent
|
|
14022
14290
|
}
|
|
14023
14291
|
),
|
|
14024
|
-
/* @__PURE__ */ (0,
|
|
14292
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14025
14293
|
const maxQty = item.maxStock ?? Infinity;
|
|
14026
14294
|
const atMax = item.quantity >= maxQty;
|
|
14027
14295
|
const atMin = item.quantity <= 1;
|
|
14028
|
-
return /* @__PURE__ */ (0,
|
|
14296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
14029
14297
|
"li",
|
|
14030
14298
|
{
|
|
14031
14299
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14032
14300
|
children: [
|
|
14033
|
-
/* @__PURE__ */ (0,
|
|
14034
|
-
/* @__PURE__ */ (0,
|
|
14035
|
-
/* @__PURE__ */ (0,
|
|
14036
|
-
item.variantName && /* @__PURE__ */ (0,
|
|
14037
|
-
/* @__PURE__ */ (0,
|
|
14301
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14302
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
14303
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14304
|
+
item.variantName && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14305
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14038
14306
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14039
14307
|
" ",
|
|
14040
14308
|
t.unitPriceSuffix
|
|
14041
14309
|
] }),
|
|
14042
|
-
/* @__PURE__ */ (0,
|
|
14310
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
14043
14311
|
"div",
|
|
14044
14312
|
{
|
|
14045
14313
|
role: "group",
|
|
14046
14314
|
"aria-label": t.quantityLabel,
|
|
14047
14315
|
className: "mt-3 flex items-center gap-3",
|
|
14048
14316
|
children: [
|
|
14049
|
-
/* @__PURE__ */ (0,
|
|
14317
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
14050
14318
|
"button",
|
|
14051
14319
|
{
|
|
14052
14320
|
type: "button",
|
|
@@ -14057,8 +14325,8 @@ function CartLineList({
|
|
|
14057
14325
|
children: "\u2212"
|
|
14058
14326
|
}
|
|
14059
14327
|
),
|
|
14060
|
-
/* @__PURE__ */ (0,
|
|
14061
|
-
/* @__PURE__ */ (0,
|
|
14328
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14329
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
14062
14330
|
"button",
|
|
14063
14331
|
{
|
|
14064
14332
|
type: "button",
|
|
@@ -14069,7 +14337,7 @@ function CartLineList({
|
|
|
14069
14337
|
children: "+"
|
|
14070
14338
|
}
|
|
14071
14339
|
),
|
|
14072
|
-
onRemove && /* @__PURE__ */ (0,
|
|
14340
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
14073
14341
|
"button",
|
|
14074
14342
|
{
|
|
14075
14343
|
type: "button",
|
|
@@ -14083,7 +14351,7 @@ function CartLineList({
|
|
|
14083
14351
|
}
|
|
14084
14352
|
)
|
|
14085
14353
|
] }),
|
|
14086
|
-
/* @__PURE__ */ (0,
|
|
14354
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14087
14355
|
]
|
|
14088
14356
|
},
|
|
14089
14357
|
lineKey(item.productId, item.variantId)
|
|
@@ -14093,8 +14361,8 @@ function CartLineList({
|
|
|
14093
14361
|
}
|
|
14094
14362
|
|
|
14095
14363
|
// src/components/cart-summary.tsx
|
|
14096
|
-
var
|
|
14097
|
-
var
|
|
14364
|
+
var import_utils15 = require("@reblu/site-ui/utils");
|
|
14365
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
14098
14366
|
var DEFAULT_LABELS3 = {
|
|
14099
14367
|
subtotal: "Subtotal",
|
|
14100
14368
|
discountPrefix: "Descuento",
|
|
@@ -14121,40 +14389,40 @@ function CartSummary({
|
|
|
14121
14389
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14122
14390
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14123
14391
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14124
|
-
const breakdown = /* @__PURE__ */ (0,
|
|
14392
|
+
const breakdown = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
14125
14393
|
"dl",
|
|
14126
14394
|
{
|
|
14127
|
-
className: (0,
|
|
14395
|
+
className: (0, import_utils15.cn)("space-y-2 text-sm", !hasNotice && className),
|
|
14128
14396
|
"data-slot": "cart-summary",
|
|
14129
14397
|
children: [
|
|
14130
|
-
/* @__PURE__ */ (0,
|
|
14131
|
-
/* @__PURE__ */ (0,
|
|
14132
|
-
/* @__PURE__ */ (0,
|
|
14398
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14399
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t.subtotal }),
|
|
14400
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14133
14401
|
] }),
|
|
14134
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
14135
|
-
/* @__PURE__ */ (0,
|
|
14402
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dt", { children: [
|
|
14136
14404
|
t.discountPrefix,
|
|
14137
14405
|
discountCode ? ` (${discountCode})` : ""
|
|
14138
14406
|
] }),
|
|
14139
|
-
/* @__PURE__ */ (0,
|
|
14407
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
|
|
14140
14408
|
"-",
|
|
14141
14409
|
formatPrice(discount, currencyCode, locale)
|
|
14142
14410
|
] })
|
|
14143
14411
|
] }),
|
|
14144
|
-
shippingEnabled && /* @__PURE__ */ (0,
|
|
14145
|
-
/* @__PURE__ */ (0,
|
|
14146
|
-
/* @__PURE__ */ (0,
|
|
14412
|
+
shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14413
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t.shipping }),
|
|
14414
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14147
14415
|
] }),
|
|
14148
|
-
/* @__PURE__ */ (0,
|
|
14149
|
-
/* @__PURE__ */ (0,
|
|
14150
|
-
/* @__PURE__ */ (0,
|
|
14416
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14417
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t.total }),
|
|
14418
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14151
14419
|
] })
|
|
14152
14420
|
]
|
|
14153
14421
|
}
|
|
14154
14422
|
);
|
|
14155
14423
|
if (!hasNotice) return breakdown;
|
|
14156
|
-
return /* @__PURE__ */ (0,
|
|
14157
|
-
/* @__PURE__ */ (0,
|
|
14424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils15.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14425
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
14158
14426
|
"div",
|
|
14159
14427
|
{
|
|
14160
14428
|
role: "status",
|
|
@@ -14168,8 +14436,8 @@ function CartSummary({
|
|
|
14168
14436
|
}
|
|
14169
14437
|
|
|
14170
14438
|
// src/components/added-to-cart-toast.tsx
|
|
14171
|
-
var
|
|
14172
|
-
var
|
|
14439
|
+
var import_utils16 = require("@reblu/site-ui/utils");
|
|
14440
|
+
var import_jsx_runtime15 = (
|
|
14173
14441
|
// eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14174
14442
|
require("react/jsx-runtime")
|
|
14175
14443
|
);
|
|
@@ -14192,32 +14460,32 @@ function AddedToCartToast({
|
|
|
14192
14460
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14193
14461
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14194
14462
|
const variant = status === "success" ? "success" : "error";
|
|
14195
|
-
return /* @__PURE__ */ (0,
|
|
14463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
14196
14464
|
"div",
|
|
14197
14465
|
{
|
|
14198
14466
|
"data-slot": "added-to-cart-toast",
|
|
14199
14467
|
"data-variant": variant,
|
|
14200
|
-
className: (0,
|
|
14468
|
+
className: (0, import_utils16.cn)(
|
|
14201
14469
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14202
14470
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14203
14471
|
variant === "error" && "border-destructive/30",
|
|
14204
14472
|
className
|
|
14205
14473
|
),
|
|
14206
14474
|
children: [
|
|
14207
|
-
hasThumbnail && /* @__PURE__ */ (0,
|
|
14208
|
-
/* @__PURE__ */ (0,
|
|
14209
|
-
/* @__PURE__ */ (0,
|
|
14210
|
-
/* @__PURE__ */ (0,
|
|
14475
|
+
hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14476
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
14477
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14478
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14211
14479
|
] }),
|
|
14212
|
-
/* @__PURE__ */ (0,
|
|
14480
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14213
14481
|
]
|
|
14214
14482
|
}
|
|
14215
14483
|
);
|
|
14216
14484
|
}
|
|
14217
14485
|
|
|
14218
14486
|
// src/components/checkout-login-prompt.tsx
|
|
14219
|
-
var
|
|
14220
|
-
var
|
|
14487
|
+
var import_utils17 = require("@reblu/site-ui/utils");
|
|
14488
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
14221
14489
|
var DEFAULT_LABELS5 = {
|
|
14222
14490
|
title: "Identificaci\xF3n",
|
|
14223
14491
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14244,26 +14512,26 @@ function CheckoutLoginPrompt({
|
|
|
14244
14512
|
if (!open) return null;
|
|
14245
14513
|
const t = { ...DEFAULT_LABELS5, ...labels };
|
|
14246
14514
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14247
|
-
return /* @__PURE__ */ (0,
|
|
14248
|
-
/* @__PURE__ */ (0,
|
|
14249
|
-
/* @__PURE__ */ (0,
|
|
14515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
14516
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14517
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
14250
14518
|
"div",
|
|
14251
14519
|
{
|
|
14252
14520
|
role: "dialog",
|
|
14253
14521
|
"aria-modal": "true",
|
|
14254
14522
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14255
14523
|
"data-slot": "checkout-login-prompt",
|
|
14256
|
-
className: (0,
|
|
14524
|
+
className: (0, import_utils17.cn)(
|
|
14257
14525
|
"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 space-y-5 rounded-2xl border border-border bg-background p-6 shadow-2xl",
|
|
14258
14526
|
className
|
|
14259
14527
|
),
|
|
14260
14528
|
children: [
|
|
14261
|
-
/* @__PURE__ */ (0,
|
|
14262
|
-
/* @__PURE__ */ (0,
|
|
14263
|
-
/* @__PURE__ */ (0,
|
|
14264
|
-
/* @__PURE__ */ (0,
|
|
14529
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14530
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
14531
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14532
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14265
14533
|
] }),
|
|
14266
|
-
/* @__PURE__ */ (0,
|
|
14534
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14267
14535
|
"button",
|
|
14268
14536
|
{
|
|
14269
14537
|
type: "button",
|
|
@@ -14274,9 +14542,9 @@ function CheckoutLoginPrompt({
|
|
|
14274
14542
|
}
|
|
14275
14543
|
)
|
|
14276
14544
|
] }),
|
|
14277
|
-
/* @__PURE__ */ (0,
|
|
14278
|
-
/* @__PURE__ */ (0,
|
|
14279
|
-
/* @__PURE__ */ (0,
|
|
14545
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-2", children: [
|
|
14546
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14547
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14280
14548
|
"input",
|
|
14281
14549
|
{
|
|
14282
14550
|
id: "checkout-login-prompt-email",
|
|
@@ -14285,29 +14553,29 @@ function CheckoutLoginPrompt({
|
|
|
14285
14553
|
value: email,
|
|
14286
14554
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14287
14555
|
placeholder: t.emailPlaceholder,
|
|
14288
|
-
className: (0,
|
|
14556
|
+
className: (0, import_utils17.cn)(
|
|
14289
14557
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14290
14558
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14291
14559
|
)
|
|
14292
14560
|
}
|
|
14293
14561
|
),
|
|
14294
|
-
error && /* @__PURE__ */ (0,
|
|
14562
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-destructive", children: error })
|
|
14295
14563
|
] }),
|
|
14296
|
-
/* @__PURE__ */ (0,
|
|
14297
|
-
/* @__PURE__ */ (0,
|
|
14564
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-2", children: [
|
|
14565
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14298
14566
|
"button",
|
|
14299
14567
|
{
|
|
14300
14568
|
type: "button",
|
|
14301
14569
|
onClick: onSubmitEmail,
|
|
14302
14570
|
disabled: checking || !isValidEmail,
|
|
14303
|
-
className: (0,
|
|
14571
|
+
className: (0, import_utils17.cn)(
|
|
14304
14572
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14305
14573
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14306
14574
|
),
|
|
14307
14575
|
children: checking ? t.checking : t.continueWithEmail
|
|
14308
14576
|
}
|
|
14309
14577
|
),
|
|
14310
|
-
/* @__PURE__ */ (0,
|
|
14578
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14311
14579
|
"button",
|
|
14312
14580
|
{
|
|
14313
14581
|
type: "button",
|
|
@@ -14324,9 +14592,9 @@ function CheckoutLoginPrompt({
|
|
|
14324
14592
|
}
|
|
14325
14593
|
|
|
14326
14594
|
// src/components/checkout-form.tsx
|
|
14327
|
-
var
|
|
14595
|
+
var import_utils18 = require("@reblu/site-ui/utils");
|
|
14328
14596
|
var import_phone_input = require("@reblu/site-ui/phone-input");
|
|
14329
|
-
var
|
|
14597
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
14330
14598
|
var DEFAULT_LABELS6 = {
|
|
14331
14599
|
contactTitle: "Datos de contacto",
|
|
14332
14600
|
nameLabel: "Nombre completo",
|
|
@@ -14380,22 +14648,22 @@ function CheckoutForm({
|
|
|
14380
14648
|
event.preventDefault();
|
|
14381
14649
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14382
14650
|
}
|
|
14383
|
-
return /* @__PURE__ */ (0,
|
|
14651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
14384
14652
|
loginPrompt,
|
|
14385
|
-
/* @__PURE__ */ (0,
|
|
14653
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
14386
14654
|
"form",
|
|
14387
14655
|
{
|
|
14388
14656
|
"data-testid": "checkout-form",
|
|
14389
14657
|
onSubmit,
|
|
14390
|
-
className: (0,
|
|
14658
|
+
className: (0, import_utils18.cn)("space-y-8", className),
|
|
14391
14659
|
"data-slot": "checkout-form",
|
|
14392
14660
|
children: [
|
|
14393
|
-
/* @__PURE__ */ (0,
|
|
14394
|
-
/* @__PURE__ */ (0,
|
|
14395
|
-
/* @__PURE__ */ (0,
|
|
14396
|
-
/* @__PURE__ */ (0,
|
|
14397
|
-
/* @__PURE__ */ (0,
|
|
14398
|
-
/* @__PURE__ */ (0,
|
|
14661
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "space-y-4", children: [
|
|
14662
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
14663
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
14664
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-1", children: [
|
|
14665
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
14666
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14399
14667
|
"input",
|
|
14400
14668
|
{
|
|
14401
14669
|
id: "checkout-form-name",
|
|
@@ -14404,17 +14672,17 @@ function CheckoutForm({
|
|
|
14404
14672
|
value: contact.name,
|
|
14405
14673
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
14406
14674
|
placeholder: t.namePlaceholder,
|
|
14407
|
-
className: (0,
|
|
14675
|
+
className: (0, import_utils18.cn)(
|
|
14408
14676
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14409
14677
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
14410
14678
|
)
|
|
14411
14679
|
}
|
|
14412
14680
|
),
|
|
14413
|
-
contactErrors?.name && /* @__PURE__ */ (0,
|
|
14681
|
+
contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14414
14682
|
] }),
|
|
14415
|
-
/* @__PURE__ */ (0,
|
|
14416
|
-
/* @__PURE__ */ (0,
|
|
14417
|
-
/* @__PURE__ */ (0,
|
|
14683
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "space-y-1", children: [
|
|
14684
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14685
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14418
14686
|
"input",
|
|
14419
14687
|
{
|
|
14420
14688
|
id: "checkout-form-email",
|
|
@@ -14423,15 +14691,15 @@ function CheckoutForm({
|
|
|
14423
14691
|
value: contact.email,
|
|
14424
14692
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
14425
14693
|
placeholder: t.emailPlaceholder,
|
|
14426
|
-
className: (0,
|
|
14694
|
+
className: (0, import_utils18.cn)(
|
|
14427
14695
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14428
14696
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
14429
14697
|
)
|
|
14430
14698
|
}
|
|
14431
14699
|
),
|
|
14432
|
-
contactErrors?.email && /* @__PURE__ */ (0,
|
|
14700
|
+
contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
14433
14701
|
] }),
|
|
14434
|
-
/* @__PURE__ */ (0,
|
|
14702
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14435
14703
|
import_phone_input.PhoneInput,
|
|
14436
14704
|
{
|
|
14437
14705
|
id: "checkout-form-phone",
|
|
@@ -14445,15 +14713,15 @@ function CheckoutForm({
|
|
|
14445
14713
|
] })
|
|
14446
14714
|
] }),
|
|
14447
14715
|
children2,
|
|
14448
|
-
generalError ? /* @__PURE__ */ (0,
|
|
14449
|
-
/* @__PURE__ */ (0,
|
|
14450
|
-
/* @__PURE__ */ (0,
|
|
14451
|
-
appliedDiscount ? /* @__PURE__ */ (0,
|
|
14452
|
-
/* @__PURE__ */ (0,
|
|
14453
|
-
/* @__PURE__ */ (0,
|
|
14454
|
-
/* @__PURE__ */ (0,
|
|
14716
|
+
generalError ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
14717
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { className: "space-y-3", children: [
|
|
14718
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
14719
|
+
appliedDiscount ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
|
|
14720
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
14721
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
14722
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
14455
14723
|
] }),
|
|
14456
|
-
/* @__PURE__ */ (0,
|
|
14724
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14457
14725
|
"button",
|
|
14458
14726
|
{
|
|
14459
14727
|
type: "button",
|
|
@@ -14463,9 +14731,9 @@ function CheckoutForm({
|
|
|
14463
14731
|
children: t.removeDiscount
|
|
14464
14732
|
}
|
|
14465
14733
|
)
|
|
14466
|
-
] }) : /* @__PURE__ */ (0,
|
|
14467
|
-
/* @__PURE__ */ (0,
|
|
14468
|
-
/* @__PURE__ */ (0,
|
|
14734
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex gap-2", children: [
|
|
14735
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
14736
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14469
14737
|
"input",
|
|
14470
14738
|
{
|
|
14471
14739
|
id: "checkout-form-discount-code",
|
|
@@ -14477,7 +14745,7 @@ function CheckoutForm({
|
|
|
14477
14745
|
className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
14478
14746
|
}
|
|
14479
14747
|
),
|
|
14480
|
-
/* @__PURE__ */ (0,
|
|
14748
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14481
14749
|
"button",
|
|
14482
14750
|
{
|
|
14483
14751
|
type: "button",
|
|
@@ -14488,14 +14756,14 @@ function CheckoutForm({
|
|
|
14488
14756
|
}
|
|
14489
14757
|
)
|
|
14490
14758
|
] }),
|
|
14491
|
-
discountError && /* @__PURE__ */ (0,
|
|
14759
|
+
discountError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xs text-destructive", children: discountError })
|
|
14492
14760
|
] }),
|
|
14493
|
-
/* @__PURE__ */ (0,
|
|
14761
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14494
14762
|
"button",
|
|
14495
14763
|
{
|
|
14496
14764
|
type: "submit",
|
|
14497
14765
|
disabled: submitting || submitDisabled,
|
|
14498
|
-
className: (0,
|
|
14766
|
+
className: (0, import_utils18.cn)(
|
|
14499
14767
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
14500
14768
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14501
14769
|
),
|
|
@@ -14509,8 +14777,8 @@ function CheckoutForm({
|
|
|
14509
14777
|
}
|
|
14510
14778
|
|
|
14511
14779
|
// src/components/order-confirmation.tsx
|
|
14512
|
-
var
|
|
14513
|
-
var
|
|
14780
|
+
var import_utils19 = require("@reblu/site-ui/utils");
|
|
14781
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
14514
14782
|
var DEFAULT_LABELS7 = {
|
|
14515
14783
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
14516
14784
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -14572,48 +14840,48 @@ function OrderConfirmation({
|
|
|
14572
14840
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
14573
14841
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
14574
14842
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
14575
|
-
return /* @__PURE__ */ (0,
|
|
14576
|
-
/* @__PURE__ */ (0,
|
|
14577
|
-
/* @__PURE__ */ (0,
|
|
14578
|
-
showFullOrderSummary && order && /* @__PURE__ */ (0,
|
|
14579
|
-
/* @__PURE__ */ (0,
|
|
14580
|
-
/* @__PURE__ */ (0,
|
|
14581
|
-
/* @__PURE__ */ (0,
|
|
14843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils19.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
14844
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h1", { className: "text-3xl font-bold", children: title }),
|
|
14845
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
14846
|
+
showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "space-y-6", children: [
|
|
14847
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14848
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
14849
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14582
14850
|
] }),
|
|
14583
|
-
/* @__PURE__ */ (0,
|
|
14584
|
-
order.items.map((item, idx) => /* @__PURE__ */ (0,
|
|
14851
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
14852
|
+
order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
14585
14853
|
"div",
|
|
14586
14854
|
{
|
|
14587
14855
|
className: "flex justify-between gap-4 text-sm",
|
|
14588
14856
|
children: [
|
|
14589
|
-
/* @__PURE__ */ (0,
|
|
14857
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
14590
14858
|
item.product.name,
|
|
14591
14859
|
item.variant ? ` (${item.variant.name})` : "",
|
|
14592
14860
|
" x",
|
|
14593
14861
|
item.quantity
|
|
14594
14862
|
] }),
|
|
14595
|
-
/* @__PURE__ */ (0,
|
|
14863
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
14596
14864
|
]
|
|
14597
14865
|
},
|
|
14598
14866
|
idx
|
|
14599
14867
|
)),
|
|
14600
|
-
/* @__PURE__ */ (0,
|
|
14601
|
-
/* @__PURE__ */ (0,
|
|
14602
|
-
/* @__PURE__ */ (0,
|
|
14868
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
14869
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: t.totalLabel }),
|
|
14870
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
14603
14871
|
] }) })
|
|
14604
14872
|
] }),
|
|
14605
|
-
/* @__PURE__ */ (0,
|
|
14873
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
14606
14874
|
t.confirmationEmailPrefix,
|
|
14607
14875
|
" ",
|
|
14608
|
-
/* @__PURE__ */ (0,
|
|
14876
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
14609
14877
|
"."
|
|
14610
14878
|
] })
|
|
14611
14879
|
] }),
|
|
14612
|
-
showOrderReference && order && /* @__PURE__ */ (0,
|
|
14613
|
-
/* @__PURE__ */ (0,
|
|
14614
|
-
/* @__PURE__ */ (0,
|
|
14880
|
+
showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14881
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
14882
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14615
14883
|
] }),
|
|
14616
|
-
status === "failed" && cartHref && /* @__PURE__ */ (0,
|
|
14884
|
+
status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14617
14885
|
"a",
|
|
14618
14886
|
{
|
|
14619
14887
|
href: cartHref,
|
|
@@ -14621,7 +14889,7 @@ function OrderConfirmation({
|
|
|
14621
14889
|
children: t.backToCartLabel
|
|
14622
14890
|
}
|
|
14623
14891
|
),
|
|
14624
|
-
showRecheck && /* @__PURE__ */ (0,
|
|
14892
|
+
showRecheck && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14625
14893
|
"button",
|
|
14626
14894
|
{
|
|
14627
14895
|
type: "button",
|
|
@@ -14630,9 +14898,9 @@ function OrderConfirmation({
|
|
|
14630
14898
|
children: t.recheckLabel
|
|
14631
14899
|
}
|
|
14632
14900
|
),
|
|
14633
|
-
showSessionReference && /* @__PURE__ */ (0,
|
|
14634
|
-
/* @__PURE__ */ (0,
|
|
14635
|
-
/* @__PURE__ */ (0,
|
|
14901
|
+
showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14902
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
14903
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
14636
14904
|
] })
|
|
14637
14905
|
] });
|
|
14638
14906
|
}
|
|
@@ -14647,12 +14915,15 @@ function OrderConfirmation({
|
|
|
14647
14915
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
14648
14916
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
14649
14917
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
14918
|
+
DEFAULT_TRUST_ICONS,
|
|
14650
14919
|
FaqAccordion,
|
|
14651
14920
|
MarkdownRenderer,
|
|
14652
14921
|
OrderConfirmation,
|
|
14653
14922
|
PageBlocks,
|
|
14923
|
+
PageCardGrid,
|
|
14654
14924
|
ParentPage,
|
|
14655
14925
|
ProductCard,
|
|
14926
|
+
ProductTrustItems,
|
|
14656
14927
|
ProfileCard,
|
|
14657
14928
|
SafeHtml,
|
|
14658
14929
|
ShopFilters,
|
|
@@ -14669,4 +14940,26 @@ function OrderConfirmation({
|
|
|
14669
14940
|
sanitizeHtml,
|
|
14670
14941
|
shouldRenderShopFilters
|
|
14671
14942
|
});
|
|
14943
|
+
/*! Bundled license information:
|
|
14944
|
+
|
|
14945
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
14946
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
14947
|
+
lucide-react/dist/esm/Icon.js:
|
|
14948
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
14949
|
+
lucide-react/dist/esm/icons/award.js:
|
|
14950
|
+
lucide-react/dist/esm/icons/badge-check.js:
|
|
14951
|
+
lucide-react/dist/esm/icons/gift.js:
|
|
14952
|
+
lucide-react/dist/esm/icons/headset.js:
|
|
14953
|
+
lucide-react/dist/esm/icons/rotate-ccw.js:
|
|
14954
|
+
lucide-react/dist/esm/icons/shield-check.js:
|
|
14955
|
+
lucide-react/dist/esm/icons/store.js:
|
|
14956
|
+
lucide-react/dist/esm/icons/truck.js:
|
|
14957
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
14958
|
+
(**
|
|
14959
|
+
* @license lucide-react v0.562.0 - ISC
|
|
14960
|
+
*
|
|
14961
|
+
* This source code is licensed under the ISC license.
|
|
14962
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14963
|
+
*)
|
|
14964
|
+
*/
|
|
14672
14965
|
//# sourceMappingURL=index.cjs.map
|