@reblu/site-blocks 0.9.0 → 0.11.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 +14 -0
- package/README.md +104 -1
- package/dist/index.cjs +475 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -11
- package/dist/index.d.ts +78 -11
- package/dist/index.js +472 -202
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -13327,25 +13327,32 @@ function Treatment({ page, className }) {
|
|
|
13327
13327
|
] });
|
|
13328
13328
|
}
|
|
13329
13329
|
|
|
13330
|
-
// src/components/
|
|
13330
|
+
// src/components/parent-page.tsx
|
|
13331
13331
|
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13332
13332
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13333
|
-
|
|
13333
|
+
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13334
|
+
function ParentPage({
|
|
13334
13335
|
page,
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13336
|
+
childPages,
|
|
13337
|
+
childPageHref,
|
|
13338
|
+
childPagesLabel,
|
|
13339
|
+
treatments,
|
|
13340
|
+
treatmentHref,
|
|
13341
|
+
treatmentsLabel,
|
|
13338
13342
|
className
|
|
13339
13343
|
}) {
|
|
13344
|
+
const pages = childPages ?? treatments ?? [];
|
|
13345
|
+
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13346
|
+
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13340
13347
|
return /* @__PURE__ */ jsxs3("article", { className: cn4("space-y-12", className), "data-slot": "specialty", children: [
|
|
13341
13348
|
/* @__PURE__ */ jsx4(PageHero, { page }),
|
|
13342
13349
|
/* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections }),
|
|
13343
|
-
|
|
13344
|
-
/* @__PURE__ */ jsx4("h2", { className: "text-2xl font-bold", children:
|
|
13345
|
-
/* @__PURE__ */ jsx4("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children:
|
|
13350
|
+
pages.length > 0 && /* @__PURE__ */ jsxs3("section", { className: "space-y-6", children: [
|
|
13351
|
+
/* @__PURE__ */ jsx4("h2", { className: "text-2xl font-bold", children: label }),
|
|
13352
|
+
/* @__PURE__ */ jsx4("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((t) => /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsxs3(
|
|
13346
13353
|
"a",
|
|
13347
13354
|
{
|
|
13348
|
-
href:
|
|
13355
|
+
href: hrefFor(t.slug),
|
|
13349
13356
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13350
13357
|
children: [
|
|
13351
13358
|
t.coverImageUrl && /* @__PURE__ */ jsx4("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx4(
|
|
@@ -13368,6 +13375,9 @@ function Specialty({
|
|
|
13368
13375
|
] });
|
|
13369
13376
|
}
|
|
13370
13377
|
|
|
13378
|
+
// src/components/specialty.tsx
|
|
13379
|
+
var Specialty = ParentPage;
|
|
13380
|
+
|
|
13371
13381
|
// src/components/profile-card.tsx
|
|
13372
13382
|
import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
13373
13383
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -13448,11 +13458,246 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13448
13458
|
);
|
|
13449
13459
|
}
|
|
13450
13460
|
|
|
13451
|
-
//
|
|
13461
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
13462
|
+
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
|
13463
|
+
|
|
13464
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
13465
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
13466
|
+
var toCamelCase = (string) => string.replace(
|
|
13467
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
13468
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
13469
|
+
);
|
|
13470
|
+
var toPascalCase = (string) => {
|
|
13471
|
+
const camelCase = toCamelCase(string);
|
|
13472
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
13473
|
+
};
|
|
13474
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
13475
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
13476
|
+
}).join(" ").trim();
|
|
13477
|
+
var hasA11yProp = (props) => {
|
|
13478
|
+
for (const prop in props) {
|
|
13479
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
13480
|
+
return true;
|
|
13481
|
+
}
|
|
13482
|
+
}
|
|
13483
|
+
};
|
|
13484
|
+
|
|
13485
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js
|
|
13486
|
+
import { forwardRef, createElement } from "react";
|
|
13487
|
+
|
|
13488
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
13489
|
+
var defaultAttributes = {
|
|
13490
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13491
|
+
width: 24,
|
|
13492
|
+
height: 24,
|
|
13493
|
+
viewBox: "0 0 24 24",
|
|
13494
|
+
fill: "none",
|
|
13495
|
+
stroke: "currentColor",
|
|
13496
|
+
strokeWidth: 2,
|
|
13497
|
+
strokeLinecap: "round",
|
|
13498
|
+
strokeLinejoin: "round"
|
|
13499
|
+
};
|
|
13500
|
+
|
|
13501
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/Icon.js
|
|
13502
|
+
var Icon = forwardRef(
|
|
13503
|
+
({
|
|
13504
|
+
color: color2 = "currentColor",
|
|
13505
|
+
size = 24,
|
|
13506
|
+
strokeWidth = 2,
|
|
13507
|
+
absoluteStrokeWidth,
|
|
13508
|
+
className = "",
|
|
13509
|
+
children: children2,
|
|
13510
|
+
iconNode,
|
|
13511
|
+
...rest
|
|
13512
|
+
}, ref) => createElement(
|
|
13513
|
+
"svg",
|
|
13514
|
+
{
|
|
13515
|
+
ref,
|
|
13516
|
+
...defaultAttributes,
|
|
13517
|
+
width: size,
|
|
13518
|
+
height: size,
|
|
13519
|
+
stroke: color2,
|
|
13520
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
13521
|
+
className: mergeClasses("lucide", className),
|
|
13522
|
+
...!children2 && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
13523
|
+
...rest
|
|
13524
|
+
},
|
|
13525
|
+
[
|
|
13526
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
13527
|
+
...Array.isArray(children2) ? children2 : [children2]
|
|
13528
|
+
]
|
|
13529
|
+
)
|
|
13530
|
+
);
|
|
13531
|
+
|
|
13532
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
13533
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
13534
|
+
const Component = forwardRef2(
|
|
13535
|
+
({ className, ...props }, ref) => createElement2(Icon, {
|
|
13536
|
+
ref,
|
|
13537
|
+
iconNode,
|
|
13538
|
+
className: mergeClasses(
|
|
13539
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
13540
|
+
`lucide-${iconName}`,
|
|
13541
|
+
className
|
|
13542
|
+
),
|
|
13543
|
+
...props
|
|
13544
|
+
})
|
|
13545
|
+
);
|
|
13546
|
+
Component.displayName = toPascalCase(iconName);
|
|
13547
|
+
return Component;
|
|
13548
|
+
};
|
|
13549
|
+
|
|
13550
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/award.js
|
|
13551
|
+
var __iconNode = [
|
|
13552
|
+
[
|
|
13553
|
+
"path",
|
|
13554
|
+
{
|
|
13555
|
+
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",
|
|
13556
|
+
key: "1yiouv"
|
|
13557
|
+
}
|
|
13558
|
+
],
|
|
13559
|
+
["circle", { cx: "12", cy: "8", r: "6", key: "1vp47v" }]
|
|
13560
|
+
];
|
|
13561
|
+
var Award = createLucideIcon("award", __iconNode);
|
|
13562
|
+
|
|
13563
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/badge-check.js
|
|
13564
|
+
var __iconNode2 = [
|
|
13565
|
+
[
|
|
13566
|
+
"path",
|
|
13567
|
+
{
|
|
13568
|
+
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",
|
|
13569
|
+
key: "3c2336"
|
|
13570
|
+
}
|
|
13571
|
+
],
|
|
13572
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
13573
|
+
];
|
|
13574
|
+
var BadgeCheck = createLucideIcon("badge-check", __iconNode2);
|
|
13575
|
+
|
|
13576
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/gift.js
|
|
13577
|
+
var __iconNode3 = [
|
|
13578
|
+
["rect", { x: "3", y: "8", width: "18", height: "4", rx: "1", key: "bkv52" }],
|
|
13579
|
+
["path", { d: "M12 8v13", key: "1c76mn" }],
|
|
13580
|
+
["path", { d: "M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7", key: "6wjy6b" }],
|
|
13581
|
+
[
|
|
13582
|
+
"path",
|
|
13583
|
+
{
|
|
13584
|
+
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",
|
|
13585
|
+
key: "1ihvrl"
|
|
13586
|
+
}
|
|
13587
|
+
]
|
|
13588
|
+
];
|
|
13589
|
+
var Gift = createLucideIcon("gift", __iconNode3);
|
|
13590
|
+
|
|
13591
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/headset.js
|
|
13592
|
+
var __iconNode4 = [
|
|
13593
|
+
[
|
|
13594
|
+
"path",
|
|
13595
|
+
{
|
|
13596
|
+
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",
|
|
13597
|
+
key: "12oyoe"
|
|
13598
|
+
}
|
|
13599
|
+
],
|
|
13600
|
+
["path", { d: "M21 16v2a4 4 0 0 1-4 4h-5", key: "1x7m43" }]
|
|
13601
|
+
];
|
|
13602
|
+
var Headset = createLucideIcon("headset", __iconNode4);
|
|
13603
|
+
|
|
13604
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/rotate-ccw.js
|
|
13605
|
+
var __iconNode5 = [
|
|
13606
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
13607
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
13608
|
+
];
|
|
13609
|
+
var RotateCcw = createLucideIcon("rotate-ccw", __iconNode5);
|
|
13610
|
+
|
|
13611
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/shield-check.js
|
|
13612
|
+
var __iconNode6 = [
|
|
13613
|
+
[
|
|
13614
|
+
"path",
|
|
13615
|
+
{
|
|
13616
|
+
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",
|
|
13617
|
+
key: "oel41y"
|
|
13618
|
+
}
|
|
13619
|
+
],
|
|
13620
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
13621
|
+
];
|
|
13622
|
+
var ShieldCheck = createLucideIcon("shield-check", __iconNode6);
|
|
13623
|
+
|
|
13624
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/store.js
|
|
13625
|
+
var __iconNode7 = [
|
|
13626
|
+
["path", { d: "M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5", key: "slp6dd" }],
|
|
13627
|
+
[
|
|
13628
|
+
"path",
|
|
13629
|
+
{
|
|
13630
|
+
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",
|
|
13631
|
+
key: "o0xfot"
|
|
13632
|
+
}
|
|
13633
|
+
],
|
|
13634
|
+
["path", { d: "M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05", key: "wn3emo" }]
|
|
13635
|
+
];
|
|
13636
|
+
var Store = createLucideIcon("store", __iconNode7);
|
|
13637
|
+
|
|
13638
|
+
// ../../node_modules/.pnpm/lucide-react@0.562.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/truck.js
|
|
13639
|
+
var __iconNode8 = [
|
|
13640
|
+
["path", { d: "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2", key: "wrbu53" }],
|
|
13641
|
+
["path", { d: "M15 18H9", key: "1lyqi6" }],
|
|
13642
|
+
[
|
|
13643
|
+
"path",
|
|
13644
|
+
{
|
|
13645
|
+
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",
|
|
13646
|
+
key: "lysw3i"
|
|
13647
|
+
}
|
|
13648
|
+
],
|
|
13649
|
+
["circle", { cx: "17", cy: "18", r: "2", key: "332jqn" }],
|
|
13650
|
+
["circle", { cx: "7", cy: "18", r: "2", key: "19iecd" }]
|
|
13651
|
+
];
|
|
13652
|
+
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13653
|
+
|
|
13654
|
+
// src/components/product-trust-items.tsx
|
|
13452
13655
|
import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
13656
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13657
|
+
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13658
|
+
shipping: Truck,
|
|
13659
|
+
returns: RotateCcw,
|
|
13660
|
+
"secure-payment": ShieldCheck,
|
|
13661
|
+
support: Headset,
|
|
13662
|
+
gift: Gift,
|
|
13663
|
+
pickup: Store,
|
|
13664
|
+
warranty: BadgeCheck,
|
|
13665
|
+
quality: Award
|
|
13666
|
+
});
|
|
13667
|
+
function isKnownIcon(icon) {
|
|
13668
|
+
return Object.prototype.hasOwnProperty.call(DEFAULT_TRUST_ICONS, icon);
|
|
13669
|
+
}
|
|
13670
|
+
function isEntryObject(value) {
|
|
13671
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13672
|
+
}
|
|
13673
|
+
function ProductTrustItems({
|
|
13674
|
+
items,
|
|
13675
|
+
icons,
|
|
13676
|
+
as: List = "ul",
|
|
13677
|
+
className,
|
|
13678
|
+
itemClassName
|
|
13679
|
+
}) {
|
|
13680
|
+
if (!Array.isArray(items) || items.length === 0) return null;
|
|
13681
|
+
const rows = items.flatMap((item, index) => {
|
|
13682
|
+
if (!isEntryObject(item)) return [];
|
|
13683
|
+
const icon = item.icon;
|
|
13684
|
+
const text3 = typeof item.text === "string" ? item.text.trim() : "";
|
|
13685
|
+
if (typeof icon !== "string" || !isKnownIcon(icon) || text3 === "") return [];
|
|
13686
|
+
const Icon2 = icons?.[icon] ?? DEFAULT_TRUST_ICONS[icon];
|
|
13687
|
+
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13688
|
+
});
|
|
13689
|
+
if (rows.length === 0) return null;
|
|
13690
|
+
return /* @__PURE__ */ jsx7(List, { "data-slot": "product-trust-items", className: cn7("space-y-2.5", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs6("li", { className: cn7("flex items-center gap-3 text-sm text-muted-foreground", itemClassName), children: [
|
|
13691
|
+
/* @__PURE__ */ jsx7(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13692
|
+
/* @__PURE__ */ jsx7("span", { children: text3 })
|
|
13693
|
+
] }, key2)) });
|
|
13694
|
+
}
|
|
13695
|
+
|
|
13696
|
+
// src/components/faq-accordion.tsx
|
|
13697
|
+
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13453
13698
|
|
|
13454
13699
|
// src/components/_heading.tsx
|
|
13455
|
-
import { jsx as
|
|
13700
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
13456
13701
|
function nextHeadingLevel(level) {
|
|
13457
13702
|
return Math.min(level + 1, 6);
|
|
13458
13703
|
}
|
|
@@ -13462,11 +13707,11 @@ function Heading({
|
|
|
13462
13707
|
children: children2
|
|
13463
13708
|
}) {
|
|
13464
13709
|
const Tag = `h${level}`;
|
|
13465
|
-
return /* @__PURE__ */
|
|
13710
|
+
return /* @__PURE__ */ jsx8(Tag, { className, children: children2 });
|
|
13466
13711
|
}
|
|
13467
13712
|
|
|
13468
13713
|
// src/components/faq-accordion.tsx
|
|
13469
|
-
import { jsx as
|
|
13714
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13470
13715
|
function FaqAccordion({
|
|
13471
13716
|
items,
|
|
13472
13717
|
heading,
|
|
@@ -13477,18 +13722,18 @@ function FaqAccordion({
|
|
|
13477
13722
|
}) {
|
|
13478
13723
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13479
13724
|
if (visible.length === 0) return null;
|
|
13480
|
-
return /* @__PURE__ */
|
|
13481
|
-
heading && /* @__PURE__ */
|
|
13482
|
-
/* @__PURE__ */
|
|
13725
|
+
return /* @__PURE__ */ jsxs7("div", { className: cn8("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
13726
|
+
heading && /* @__PURE__ */ jsx9(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
13727
|
+
/* @__PURE__ */ jsx9("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs7(
|
|
13483
13728
|
"details",
|
|
13484
13729
|
{
|
|
13485
13730
|
className: "group px-4",
|
|
13486
13731
|
"data-slot": "faq-item",
|
|
13487
13732
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13488
13733
|
children: [
|
|
13489
|
-
/* @__PURE__ */
|
|
13490
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
13491
|
-
/* @__PURE__ */
|
|
13734
|
+
/* @__PURE__ */ jsxs7("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: [
|
|
13735
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx9(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx9("span", { children: item.q }),
|
|
13736
|
+
/* @__PURE__ */ jsx9(
|
|
13492
13737
|
"span",
|
|
13493
13738
|
{
|
|
13494
13739
|
"aria-hidden": "true",
|
|
@@ -13497,7 +13742,7 @@ function FaqAccordion({
|
|
|
13497
13742
|
}
|
|
13498
13743
|
)
|
|
13499
13744
|
] }),
|
|
13500
|
-
/* @__PURE__ */
|
|
13745
|
+
/* @__PURE__ */ jsx9("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
13501
13746
|
]
|
|
13502
13747
|
},
|
|
13503
13748
|
index
|
|
@@ -13506,40 +13751,40 @@ function FaqAccordion({
|
|
|
13506
13751
|
}
|
|
13507
13752
|
|
|
13508
13753
|
// src/components/page-blocks.tsx
|
|
13509
|
-
import { cn as
|
|
13754
|
+
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13510
13755
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
13511
|
-
import { jsx as
|
|
13756
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13512
13757
|
var ALIASES = {
|
|
13513
13758
|
doctor_embed: "profile_embed",
|
|
13514
13759
|
specialty_embed: "page_embed"
|
|
13515
13760
|
};
|
|
13516
13761
|
function HeroBlock({ block, headingLevel }) {
|
|
13517
13762
|
const { title, subtitle, imageUrl } = block.data;
|
|
13518
|
-
return /* @__PURE__ */
|
|
13519
|
-
/* @__PURE__ */
|
|
13520
|
-
subtitle && /* @__PURE__ */
|
|
13521
|
-
imageUrl && /* @__PURE__ */
|
|
13763
|
+
return /* @__PURE__ */ jsxs8("div", { className: "space-y-4", children: [
|
|
13764
|
+
/* @__PURE__ */ jsx10(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
13765
|
+
subtitle && /* @__PURE__ */ jsx10("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
13766
|
+
imageUrl && /* @__PURE__ */ jsx10("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx10("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
13522
13767
|
] });
|
|
13523
13768
|
}
|
|
13524
13769
|
function RichtextBlock({ block, headingLevel }) {
|
|
13525
|
-
return /* @__PURE__ */
|
|
13770
|
+
return /* @__PURE__ */ jsx10(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
13526
13771
|
}
|
|
13527
13772
|
function FaqBlock({ block }) {
|
|
13528
|
-
return /* @__PURE__ */
|
|
13773
|
+
return /* @__PURE__ */ jsx10(FaqAccordion, { items: block.data.items });
|
|
13529
13774
|
}
|
|
13530
13775
|
function StatsBlock({ block }) {
|
|
13531
|
-
return /* @__PURE__ */
|
|
13532
|
-
/* @__PURE__ */
|
|
13533
|
-
/* @__PURE__ */
|
|
13776
|
+
return /* @__PURE__ */ jsx10("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs8("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
13777
|
+
/* @__PURE__ */ jsx10("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
13778
|
+
/* @__PURE__ */ jsx10("dd", { className: "text-3xl font-bold", children: item.value })
|
|
13534
13779
|
] }, i)) });
|
|
13535
13780
|
}
|
|
13536
13781
|
function TestimonialBlock({ block }) {
|
|
13537
13782
|
const { quote, author, role, avatarUrl } = block.data;
|
|
13538
|
-
return /* @__PURE__ */
|
|
13539
|
-
/* @__PURE__ */
|
|
13540
|
-
/* @__PURE__ */
|
|
13783
|
+
return /* @__PURE__ */ jsxs8("figure", { className: "space-y-4", children: [
|
|
13784
|
+
/* @__PURE__ */ jsx10("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx10("p", { children: quote }) }),
|
|
13785
|
+
/* @__PURE__ */ jsxs8("figcaption", { className: "flex items-center gap-3", children: [
|
|
13541
13786
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
13542
|
-
/* @__PURE__ */
|
|
13787
|
+
/* @__PURE__ */ jsx10(
|
|
13543
13788
|
"img",
|
|
13544
13789
|
{
|
|
13545
13790
|
src: avatarUrl,
|
|
@@ -13548,9 +13793,9 @@ function TestimonialBlock({ block }) {
|
|
|
13548
13793
|
className: "h-10 w-10 rounded-full object-cover"
|
|
13549
13794
|
}
|
|
13550
13795
|
),
|
|
13551
|
-
/* @__PURE__ */
|
|
13552
|
-
/* @__PURE__ */
|
|
13553
|
-
role && /* @__PURE__ */
|
|
13796
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
13797
|
+
/* @__PURE__ */ jsx10("span", { className: "font-semibold", children: author }),
|
|
13798
|
+
role && /* @__PURE__ */ jsx10("span", { className: "block text-sm opacity-80", children: role })
|
|
13554
13799
|
] })
|
|
13555
13800
|
] })
|
|
13556
13801
|
] });
|
|
@@ -13559,19 +13804,19 @@ function CtaSlotBlock(_props) {
|
|
|
13559
13804
|
return null;
|
|
13560
13805
|
}
|
|
13561
13806
|
function FeatureListBlock({ block }) {
|
|
13562
|
-
return /* @__PURE__ */
|
|
13807
|
+
return /* @__PURE__ */ jsx10("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx10("li", { children: item.text }, i)) });
|
|
13563
13808
|
}
|
|
13564
13809
|
function GalleryBlock({ block }) {
|
|
13565
13810
|
const { images } = block.data;
|
|
13566
|
-
return /* @__PURE__ */
|
|
13811
|
+
return /* @__PURE__ */ jsx10(
|
|
13567
13812
|
"div",
|
|
13568
13813
|
{
|
|
13569
|
-
className:
|
|
13814
|
+
className: cn9(
|
|
13570
13815
|
"grid gap-4",
|
|
13571
13816
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
13572
13817
|
),
|
|
13573
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
13574
|
-
/* @__PURE__ */
|
|
13818
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs8("figure", { className: "space-y-1", children: [
|
|
13819
|
+
/* @__PURE__ */ jsx10("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx10(
|
|
13575
13820
|
"img",
|
|
13576
13821
|
{
|
|
13577
13822
|
src: img.url,
|
|
@@ -13580,7 +13825,7 @@ function GalleryBlock({ block }) {
|
|
|
13580
13825
|
className: "h-full w-full object-cover"
|
|
13581
13826
|
}
|
|
13582
13827
|
) }),
|
|
13583
|
-
img.caption && /* @__PURE__ */
|
|
13828
|
+
img.caption && /* @__PURE__ */ jsx10("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
13584
13829
|
] }, `${img.url}-${i}`))
|
|
13585
13830
|
}
|
|
13586
13831
|
);
|
|
@@ -13590,13 +13835,13 @@ function EmbedCard({
|
|
|
13590
13835
|
headingLevel,
|
|
13591
13836
|
embedHref
|
|
13592
13837
|
}) {
|
|
13593
|
-
return /* @__PURE__ */
|
|
13838
|
+
return /* @__PURE__ */ jsxs8(
|
|
13594
13839
|
"a",
|
|
13595
13840
|
{
|
|
13596
13841
|
href: embedHref(resolved),
|
|
13597
13842
|
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",
|
|
13598
13843
|
children: [
|
|
13599
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
13844
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx10("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx10(
|
|
13600
13845
|
"img",
|
|
13601
13846
|
{
|
|
13602
13847
|
src: resolved.coverImageUrl,
|
|
@@ -13605,24 +13850,24 @@ function EmbedCard({
|
|
|
13605
13850
|
className: "h-full w-full object-cover"
|
|
13606
13851
|
}
|
|
13607
13852
|
) }),
|
|
13608
|
-
/* @__PURE__ */
|
|
13609
|
-
/* @__PURE__ */
|
|
13610
|
-
resolved.role && /* @__PURE__ */
|
|
13611
|
-
resolved.excerpt && /* @__PURE__ */
|
|
13853
|
+
/* @__PURE__ */ jsxs8("div", { className: "space-y-1 p-4", children: [
|
|
13854
|
+
/* @__PURE__ */ jsx10(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
13855
|
+
resolved.role && /* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
13856
|
+
resolved.excerpt && /* @__PURE__ */ jsx10("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
13612
13857
|
] })
|
|
13613
13858
|
]
|
|
13614
13859
|
}
|
|
13615
13860
|
);
|
|
13616
13861
|
}
|
|
13617
13862
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
13618
|
-
return /* @__PURE__ */
|
|
13863
|
+
return /* @__PURE__ */ jsx10(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13619
13864
|
}
|
|
13620
13865
|
function ProfileEmbedBlock({
|
|
13621
13866
|
block,
|
|
13622
13867
|
headingLevel,
|
|
13623
13868
|
embedHref
|
|
13624
13869
|
}) {
|
|
13625
|
-
return /* @__PURE__ */
|
|
13870
|
+
return /* @__PURE__ */ jsx10(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13626
13871
|
}
|
|
13627
13872
|
var DEFAULT_RENDERERS = {
|
|
13628
13873
|
hero: HeroBlock,
|
|
@@ -13679,14 +13924,14 @@ function toIdFragment(value) {
|
|
|
13679
13924
|
function SectionCta2({ cta }) {
|
|
13680
13925
|
if (!hasUsableCta(cta)) return null;
|
|
13681
13926
|
const variant = toButtonVariant(cta.variant);
|
|
13682
|
-
return /* @__PURE__ */
|
|
13927
|
+
return /* @__PURE__ */ jsx10("div", { className: "pt-2", children: /* @__PURE__ */ jsx10(
|
|
13683
13928
|
"a",
|
|
13684
13929
|
{
|
|
13685
13930
|
href: cta.url,
|
|
13686
13931
|
"data-slot": "button",
|
|
13687
13932
|
"data-variant": variant,
|
|
13688
13933
|
"data-size": "default",
|
|
13689
|
-
className:
|
|
13934
|
+
className: cn9(buttonVariants2({ variant, size: "default" })),
|
|
13690
13935
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13691
13936
|
children: cta.label
|
|
13692
13937
|
}
|
|
@@ -13712,17 +13957,17 @@ function PageBlocks({
|
|
|
13712
13957
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
13713
13958
|
const background = block.backgroundColor;
|
|
13714
13959
|
return [
|
|
13715
|
-
/* @__PURE__ */
|
|
13960
|
+
/* @__PURE__ */ jsxs8(
|
|
13716
13961
|
"section",
|
|
13717
13962
|
{
|
|
13718
13963
|
"data-slot": "page-block",
|
|
13719
13964
|
"data-block-type": type,
|
|
13720
13965
|
"aria-labelledby": headingId,
|
|
13721
13966
|
style: surfaceStyle(background),
|
|
13722
|
-
className:
|
|
13967
|
+
className: cn9("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
13723
13968
|
children: [
|
|
13724
|
-
block.heading && /* @__PURE__ */
|
|
13725
|
-
/* @__PURE__ */
|
|
13969
|
+
block.heading && /* @__PURE__ */ jsx10(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx10("span", { id: headingId, children: block.heading }) }),
|
|
13970
|
+
/* @__PURE__ */ jsx10(
|
|
13726
13971
|
Renderer,
|
|
13727
13972
|
{
|
|
13728
13973
|
block,
|
|
@@ -13730,7 +13975,7 @@ function PageBlocks({
|
|
|
13730
13975
|
embedHref
|
|
13731
13976
|
}
|
|
13732
13977
|
),
|
|
13733
|
-
/* @__PURE__ */
|
|
13978
|
+
/* @__PURE__ */ jsx10(SectionCta2, { cta: block.cta })
|
|
13734
13979
|
]
|
|
13735
13980
|
},
|
|
13736
13981
|
block.id
|
|
@@ -13738,12 +13983,12 @@ function PageBlocks({
|
|
|
13738
13983
|
];
|
|
13739
13984
|
});
|
|
13740
13985
|
if (sections.length === 0) return null;
|
|
13741
|
-
return /* @__PURE__ */
|
|
13986
|
+
return /* @__PURE__ */ jsx10("div", { className: cn9("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
13742
13987
|
}
|
|
13743
13988
|
|
|
13744
13989
|
// src/components/shop-filters.tsx
|
|
13745
|
-
import { cn as
|
|
13746
|
-
import { jsx as
|
|
13990
|
+
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
13991
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13747
13992
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
13748
13993
|
{ max: 2500 },
|
|
13749
13994
|
{ min: 2500, max: 5e3 },
|
|
@@ -13787,7 +14032,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
13787
14032
|
return "";
|
|
13788
14033
|
}
|
|
13789
14034
|
function OptionLink({ href, active, label, onActivate }) {
|
|
13790
|
-
return /* @__PURE__ */
|
|
14035
|
+
return /* @__PURE__ */ jsx11(
|
|
13791
14036
|
"a",
|
|
13792
14037
|
{
|
|
13793
14038
|
href,
|
|
@@ -13796,7 +14041,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
13796
14041
|
event.preventDefault();
|
|
13797
14042
|
onActivate();
|
|
13798
14043
|
} : void 0,
|
|
13799
|
-
className:
|
|
14044
|
+
className: cn10(
|
|
13800
14045
|
"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",
|
|
13801
14046
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
13802
14047
|
),
|
|
@@ -13805,9 +14050,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
13805
14050
|
);
|
|
13806
14051
|
}
|
|
13807
14052
|
function FilterFieldset({ legend, children: children2 }) {
|
|
13808
|
-
return /* @__PURE__ */
|
|
13809
|
-
/* @__PURE__ */
|
|
13810
|
-
/* @__PURE__ */
|
|
14053
|
+
return /* @__PURE__ */ jsxs9("fieldset", { className: "space-y-2", children: [
|
|
14054
|
+
/* @__PURE__ */ jsx11("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14055
|
+
/* @__PURE__ */ jsx11("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
13811
14056
|
] });
|
|
13812
14057
|
}
|
|
13813
14058
|
function ShopFilters({
|
|
@@ -13830,11 +14075,11 @@ function ShopFilters({
|
|
|
13830
14075
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
13831
14076
|
return null;
|
|
13832
14077
|
}
|
|
13833
|
-
return /* @__PURE__ */
|
|
14078
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn10("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
13834
14079
|
visibleTaxonomies.map((axis) => {
|
|
13835
14080
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
13836
|
-
return /* @__PURE__ */
|
|
13837
|
-
/* @__PURE__ */
|
|
14081
|
+
return /* @__PURE__ */ jsxs9(FilterFieldset, { legend: axis.label, children: [
|
|
14082
|
+
/* @__PURE__ */ jsx11(
|
|
13838
14083
|
OptionLink,
|
|
13839
14084
|
{
|
|
13840
14085
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -13849,7 +14094,7 @@ function ShopFilters({
|
|
|
13849
14094
|
),
|
|
13850
14095
|
axis.terms.map((term) => {
|
|
13851
14096
|
const isActive = activeSlug === term.slug;
|
|
13852
|
-
return /* @__PURE__ */
|
|
14097
|
+
return /* @__PURE__ */ jsx11(
|
|
13853
14098
|
OptionLink,
|
|
13854
14099
|
{
|
|
13855
14100
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -13869,9 +14114,9 @@ function ShopFilters({
|
|
|
13869
14114
|
}),
|
|
13870
14115
|
visibleAttributes.map((attr) => {
|
|
13871
14116
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
13872
|
-
return /* @__PURE__ */
|
|
14117
|
+
return /* @__PURE__ */ jsx11(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
13873
14118
|
const isActive = activeValues.includes(opt.value);
|
|
13874
|
-
return /* @__PURE__ */
|
|
14119
|
+
return /* @__PURE__ */ jsx11(
|
|
13875
14120
|
OptionLink,
|
|
13876
14121
|
{
|
|
13877
14122
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -13889,11 +14134,11 @@ function ShopFilters({
|
|
|
13889
14134
|
);
|
|
13890
14135
|
}) }, attr.key);
|
|
13891
14136
|
}),
|
|
13892
|
-
showPriceGroup && /* @__PURE__ */
|
|
14137
|
+
showPriceGroup && /* @__PURE__ */ jsx11(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
13893
14138
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
13894
14139
|
const nextMin = isActive ? void 0 : band.min;
|
|
13895
14140
|
const nextMax = isActive ? void 0 : band.max;
|
|
13896
|
-
return /* @__PURE__ */
|
|
14141
|
+
return /* @__PURE__ */ jsx11(
|
|
13897
14142
|
OptionLink,
|
|
13898
14143
|
{
|
|
13899
14144
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -13904,7 +14149,7 @@ function ShopFilters({
|
|
|
13904
14149
|
i
|
|
13905
14150
|
);
|
|
13906
14151
|
}) }),
|
|
13907
|
-
hasOnSale && /* @__PURE__ */
|
|
14152
|
+
hasOnSale && /* @__PURE__ */ jsx11(
|
|
13908
14153
|
OptionLink,
|
|
13909
14154
|
{
|
|
13910
14155
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -13913,7 +14158,7 @@ function ShopFilters({
|
|
|
13913
14158
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
13914
14159
|
}
|
|
13915
14160
|
),
|
|
13916
|
-
/* @__PURE__ */
|
|
14161
|
+
/* @__PURE__ */ jsx11(
|
|
13917
14162
|
"a",
|
|
13918
14163
|
{
|
|
13919
14164
|
href: hrefs.clearAll(),
|
|
@@ -13929,8 +14174,8 @@ function ShopFilters({
|
|
|
13929
14174
|
}
|
|
13930
14175
|
|
|
13931
14176
|
// src/components/cart-line-list.tsx
|
|
13932
|
-
import { cn as
|
|
13933
|
-
import { jsx as
|
|
14177
|
+
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14178
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13934
14179
|
var DEFAULT_LABELS2 = {
|
|
13935
14180
|
quantityLabel: "Cantidad",
|
|
13936
14181
|
decrease: "Reducir cantidad",
|
|
@@ -13955,9 +14200,9 @@ function CartLineList({
|
|
|
13955
14200
|
}) {
|
|
13956
14201
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
13957
14202
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
13958
|
-
return /* @__PURE__ */
|
|
13959
|
-
/* @__PURE__ */
|
|
13960
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14203
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn11("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14204
|
+
/* @__PURE__ */ jsx12("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14205
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx12(
|
|
13961
14206
|
"div",
|
|
13962
14207
|
{
|
|
13963
14208
|
role: "status",
|
|
@@ -13966,32 +14211,32 @@ function CartLineList({
|
|
|
13966
14211
|
children: noticeContent
|
|
13967
14212
|
}
|
|
13968
14213
|
),
|
|
13969
|
-
/* @__PURE__ */
|
|
14214
|
+
/* @__PURE__ */ jsx12("ul", { className: "space-y-4", children: items.map((item) => {
|
|
13970
14215
|
const maxQty = item.maxStock ?? Infinity;
|
|
13971
14216
|
const atMax = item.quantity >= maxQty;
|
|
13972
14217
|
const atMin = item.quantity <= 1;
|
|
13973
|
-
return /* @__PURE__ */
|
|
14218
|
+
return /* @__PURE__ */ jsxs10(
|
|
13974
14219
|
"li",
|
|
13975
14220
|
{
|
|
13976
14221
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
13977
14222
|
children: [
|
|
13978
|
-
/* @__PURE__ */
|
|
13979
|
-
/* @__PURE__ */
|
|
13980
|
-
/* @__PURE__ */
|
|
13981
|
-
item.variantName && /* @__PURE__ */
|
|
13982
|
-
/* @__PURE__ */
|
|
14223
|
+
/* @__PURE__ */ jsx12("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx12("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14224
|
+
/* @__PURE__ */ jsxs10("div", { className: "min-w-0 flex-1", children: [
|
|
14225
|
+
/* @__PURE__ */ jsx12("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14226
|
+
item.variantName && /* @__PURE__ */ jsx12("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14227
|
+
/* @__PURE__ */ jsxs10("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
13983
14228
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
13984
14229
|
" ",
|
|
13985
14230
|
t.unitPriceSuffix
|
|
13986
14231
|
] }),
|
|
13987
|
-
/* @__PURE__ */
|
|
14232
|
+
/* @__PURE__ */ jsxs10(
|
|
13988
14233
|
"div",
|
|
13989
14234
|
{
|
|
13990
14235
|
role: "group",
|
|
13991
14236
|
"aria-label": t.quantityLabel,
|
|
13992
14237
|
className: "mt-3 flex items-center gap-3",
|
|
13993
14238
|
children: [
|
|
13994
|
-
/* @__PURE__ */
|
|
14239
|
+
/* @__PURE__ */ jsx12(
|
|
13995
14240
|
"button",
|
|
13996
14241
|
{
|
|
13997
14242
|
type: "button",
|
|
@@ -14002,8 +14247,8 @@ function CartLineList({
|
|
|
14002
14247
|
children: "\u2212"
|
|
14003
14248
|
}
|
|
14004
14249
|
),
|
|
14005
|
-
/* @__PURE__ */
|
|
14006
|
-
/* @__PURE__ */
|
|
14250
|
+
/* @__PURE__ */ jsx12("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14251
|
+
/* @__PURE__ */ jsx12(
|
|
14007
14252
|
"button",
|
|
14008
14253
|
{
|
|
14009
14254
|
type: "button",
|
|
@@ -14014,7 +14259,7 @@ function CartLineList({
|
|
|
14014
14259
|
children: "+"
|
|
14015
14260
|
}
|
|
14016
14261
|
),
|
|
14017
|
-
onRemove && /* @__PURE__ */
|
|
14262
|
+
onRemove && /* @__PURE__ */ jsx12(
|
|
14018
14263
|
"button",
|
|
14019
14264
|
{
|
|
14020
14265
|
type: "button",
|
|
@@ -14028,7 +14273,7 @@ function CartLineList({
|
|
|
14028
14273
|
}
|
|
14029
14274
|
)
|
|
14030
14275
|
] }),
|
|
14031
|
-
/* @__PURE__ */
|
|
14276
|
+
/* @__PURE__ */ jsx12("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx12("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14032
14277
|
]
|
|
14033
14278
|
},
|
|
14034
14279
|
lineKey(item.productId, item.variantId)
|
|
@@ -14038,8 +14283,8 @@ function CartLineList({
|
|
|
14038
14283
|
}
|
|
14039
14284
|
|
|
14040
14285
|
// src/components/cart-summary.tsx
|
|
14041
|
-
import { cn as
|
|
14042
|
-
import { jsx as
|
|
14286
|
+
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14287
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
14043
14288
|
var DEFAULT_LABELS3 = {
|
|
14044
14289
|
subtotal: "Subtotal",
|
|
14045
14290
|
discountPrefix: "Descuento",
|
|
@@ -14066,40 +14311,40 @@ function CartSummary({
|
|
|
14066
14311
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14067
14312
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14068
14313
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14069
|
-
const breakdown = /* @__PURE__ */
|
|
14314
|
+
const breakdown = /* @__PURE__ */ jsxs11(
|
|
14070
14315
|
"dl",
|
|
14071
14316
|
{
|
|
14072
|
-
className:
|
|
14317
|
+
className: cn12("space-y-2 text-sm", !hasNotice && className),
|
|
14073
14318
|
"data-slot": "cart-summary",
|
|
14074
14319
|
children: [
|
|
14075
|
-
/* @__PURE__ */
|
|
14076
|
-
/* @__PURE__ */
|
|
14077
|
-
/* @__PURE__ */
|
|
14320
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14321
|
+
/* @__PURE__ */ jsx13("dt", { children: t.subtotal }),
|
|
14322
|
+
/* @__PURE__ */ jsx13("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14078
14323
|
] }),
|
|
14079
|
-
hasDiscount && /* @__PURE__ */
|
|
14080
|
-
/* @__PURE__ */
|
|
14324
|
+
hasDiscount && /* @__PURE__ */ jsxs11("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14325
|
+
/* @__PURE__ */ jsxs11("dt", { children: [
|
|
14081
14326
|
t.discountPrefix,
|
|
14082
14327
|
discountCode ? ` (${discountCode})` : ""
|
|
14083
14328
|
] }),
|
|
14084
|
-
/* @__PURE__ */
|
|
14329
|
+
/* @__PURE__ */ jsxs11("dd", { children: [
|
|
14085
14330
|
"-",
|
|
14086
14331
|
formatPrice(discount, currencyCode, locale)
|
|
14087
14332
|
] })
|
|
14088
14333
|
] }),
|
|
14089
|
-
shippingEnabled && /* @__PURE__ */
|
|
14090
|
-
/* @__PURE__ */
|
|
14091
|
-
/* @__PURE__ */
|
|
14334
|
+
shippingEnabled && /* @__PURE__ */ jsxs11("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14335
|
+
/* @__PURE__ */ jsx13("dt", { children: t.shipping }),
|
|
14336
|
+
/* @__PURE__ */ jsx13("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14092
14337
|
] }),
|
|
14093
|
-
/* @__PURE__ */
|
|
14094
|
-
/* @__PURE__ */
|
|
14095
|
-
/* @__PURE__ */
|
|
14338
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14339
|
+
/* @__PURE__ */ jsx13("dt", { children: t.total }),
|
|
14340
|
+
/* @__PURE__ */ jsx13("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14096
14341
|
] })
|
|
14097
14342
|
]
|
|
14098
14343
|
}
|
|
14099
14344
|
);
|
|
14100
14345
|
if (!hasNotice) return breakdown;
|
|
14101
|
-
return /* @__PURE__ */
|
|
14102
|
-
/* @__PURE__ */
|
|
14346
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn12("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14347
|
+
/* @__PURE__ */ jsx13(
|
|
14103
14348
|
"div",
|
|
14104
14349
|
{
|
|
14105
14350
|
role: "status",
|
|
@@ -14113,8 +14358,8 @@ function CartSummary({
|
|
|
14113
14358
|
}
|
|
14114
14359
|
|
|
14115
14360
|
// src/components/added-to-cart-toast.tsx
|
|
14116
|
-
import { cn as
|
|
14117
|
-
import { jsx as
|
|
14361
|
+
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14362
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14118
14363
|
var DEFAULT_LABELS4 = {
|
|
14119
14364
|
success: "A\xF1adido al carrito",
|
|
14120
14365
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -14134,12 +14379,12 @@ function AddedToCartToast({
|
|
|
14134
14379
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14135
14380
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14136
14381
|
const variant = status === "success" ? "success" : "error";
|
|
14137
|
-
return /* @__PURE__ */
|
|
14382
|
+
return /* @__PURE__ */ jsxs12(
|
|
14138
14383
|
"div",
|
|
14139
14384
|
{
|
|
14140
14385
|
"data-slot": "added-to-cart-toast",
|
|
14141
14386
|
"data-variant": variant,
|
|
14142
|
-
className:
|
|
14387
|
+
className: cn13(
|
|
14143
14388
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14144
14389
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14145
14390
|
variant === "error" && "border-destructive/30",
|
|
@@ -14147,20 +14392,20 @@ function AddedToCartToast({
|
|
|
14147
14392
|
),
|
|
14148
14393
|
children: [
|
|
14149
14394
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14150
|
-
/* @__PURE__ */
|
|
14151
|
-
/* @__PURE__ */
|
|
14152
|
-
/* @__PURE__ */
|
|
14153
|
-
/* @__PURE__ */
|
|
14395
|
+
/* @__PURE__ */ jsx14("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14396
|
+
/* @__PURE__ */ jsxs12("div", { className: "min-w-0 flex-1", children: [
|
|
14397
|
+
/* @__PURE__ */ jsx14("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14398
|
+
/* @__PURE__ */ jsx14("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14154
14399
|
] }),
|
|
14155
|
-
/* @__PURE__ */
|
|
14400
|
+
/* @__PURE__ */ jsx14("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx14("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14156
14401
|
]
|
|
14157
14402
|
}
|
|
14158
14403
|
);
|
|
14159
14404
|
}
|
|
14160
14405
|
|
|
14161
14406
|
// src/components/checkout-login-prompt.tsx
|
|
14162
|
-
import { cn as
|
|
14163
|
-
import { Fragment as Fragment3, jsx as
|
|
14407
|
+
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14408
|
+
import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14164
14409
|
var DEFAULT_LABELS5 = {
|
|
14165
14410
|
title: "Identificaci\xF3n",
|
|
14166
14411
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14187,26 +14432,26 @@ function CheckoutLoginPrompt({
|
|
|
14187
14432
|
if (!open) return null;
|
|
14188
14433
|
const t = { ...DEFAULT_LABELS5, ...labels };
|
|
14189
14434
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14190
|
-
return /* @__PURE__ */
|
|
14191
|
-
/* @__PURE__ */
|
|
14192
|
-
/* @__PURE__ */
|
|
14435
|
+
return /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
14436
|
+
/* @__PURE__ */ jsx15("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14437
|
+
/* @__PURE__ */ jsxs13(
|
|
14193
14438
|
"div",
|
|
14194
14439
|
{
|
|
14195
14440
|
role: "dialog",
|
|
14196
14441
|
"aria-modal": "true",
|
|
14197
14442
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14198
14443
|
"data-slot": "checkout-login-prompt",
|
|
14199
|
-
className:
|
|
14444
|
+
className: cn14(
|
|
14200
14445
|
"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",
|
|
14201
14446
|
className
|
|
14202
14447
|
),
|
|
14203
14448
|
children: [
|
|
14204
|
-
/* @__PURE__ */
|
|
14205
|
-
/* @__PURE__ */
|
|
14206
|
-
/* @__PURE__ */
|
|
14207
|
-
/* @__PURE__ */
|
|
14449
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14450
|
+
/* @__PURE__ */ jsxs13("div", { children: [
|
|
14451
|
+
/* @__PURE__ */ jsx15("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14452
|
+
/* @__PURE__ */ jsx15("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14208
14453
|
] }),
|
|
14209
|
-
/* @__PURE__ */
|
|
14454
|
+
/* @__PURE__ */ jsx15(
|
|
14210
14455
|
"button",
|
|
14211
14456
|
{
|
|
14212
14457
|
type: "button",
|
|
@@ -14217,9 +14462,9 @@ function CheckoutLoginPrompt({
|
|
|
14217
14462
|
}
|
|
14218
14463
|
)
|
|
14219
14464
|
] }),
|
|
14220
|
-
/* @__PURE__ */
|
|
14221
|
-
/* @__PURE__ */
|
|
14222
|
-
/* @__PURE__ */
|
|
14465
|
+
/* @__PURE__ */ jsxs13("div", { className: "space-y-2", children: [
|
|
14466
|
+
/* @__PURE__ */ jsx15("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14467
|
+
/* @__PURE__ */ jsx15(
|
|
14223
14468
|
"input",
|
|
14224
14469
|
{
|
|
14225
14470
|
id: "checkout-login-prompt-email",
|
|
@@ -14228,29 +14473,29 @@ function CheckoutLoginPrompt({
|
|
|
14228
14473
|
value: email,
|
|
14229
14474
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14230
14475
|
placeholder: t.emailPlaceholder,
|
|
14231
|
-
className:
|
|
14476
|
+
className: cn14(
|
|
14232
14477
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14233
14478
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14234
14479
|
)
|
|
14235
14480
|
}
|
|
14236
14481
|
),
|
|
14237
|
-
error && /* @__PURE__ */
|
|
14482
|
+
error && /* @__PURE__ */ jsx15("p", { className: "text-xs text-destructive", children: error })
|
|
14238
14483
|
] }),
|
|
14239
|
-
/* @__PURE__ */
|
|
14240
|
-
/* @__PURE__ */
|
|
14484
|
+
/* @__PURE__ */ jsxs13("div", { className: "space-y-2", children: [
|
|
14485
|
+
/* @__PURE__ */ jsx15(
|
|
14241
14486
|
"button",
|
|
14242
14487
|
{
|
|
14243
14488
|
type: "button",
|
|
14244
14489
|
onClick: onSubmitEmail,
|
|
14245
14490
|
disabled: checking || !isValidEmail,
|
|
14246
|
-
className:
|
|
14491
|
+
className: cn14(
|
|
14247
14492
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14248
14493
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14249
14494
|
),
|
|
14250
14495
|
children: checking ? t.checking : t.continueWithEmail
|
|
14251
14496
|
}
|
|
14252
14497
|
),
|
|
14253
|
-
/* @__PURE__ */
|
|
14498
|
+
/* @__PURE__ */ jsx15(
|
|
14254
14499
|
"button",
|
|
14255
14500
|
{
|
|
14256
14501
|
type: "button",
|
|
@@ -14267,9 +14512,9 @@ function CheckoutLoginPrompt({
|
|
|
14267
14512
|
}
|
|
14268
14513
|
|
|
14269
14514
|
// src/components/checkout-form.tsx
|
|
14270
|
-
import { cn as
|
|
14515
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14271
14516
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14272
|
-
import { Fragment as Fragment4, jsx as
|
|
14517
|
+
import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14273
14518
|
var DEFAULT_LABELS6 = {
|
|
14274
14519
|
contactTitle: "Datos de contacto",
|
|
14275
14520
|
nameLabel: "Nombre completo",
|
|
@@ -14323,22 +14568,22 @@ function CheckoutForm({
|
|
|
14323
14568
|
event.preventDefault();
|
|
14324
14569
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14325
14570
|
}
|
|
14326
|
-
return /* @__PURE__ */
|
|
14571
|
+
return /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
14327
14572
|
loginPrompt,
|
|
14328
|
-
/* @__PURE__ */
|
|
14573
|
+
/* @__PURE__ */ jsxs14(
|
|
14329
14574
|
"form",
|
|
14330
14575
|
{
|
|
14331
14576
|
"data-testid": "checkout-form",
|
|
14332
14577
|
onSubmit,
|
|
14333
|
-
className:
|
|
14578
|
+
className: cn15("space-y-8", className),
|
|
14334
14579
|
"data-slot": "checkout-form",
|
|
14335
14580
|
children: [
|
|
14336
|
-
/* @__PURE__ */
|
|
14337
|
-
/* @__PURE__ */
|
|
14338
|
-
/* @__PURE__ */
|
|
14339
|
-
/* @__PURE__ */
|
|
14340
|
-
/* @__PURE__ */
|
|
14341
|
-
/* @__PURE__ */
|
|
14581
|
+
/* @__PURE__ */ jsxs14("section", { className: "space-y-4", children: [
|
|
14582
|
+
/* @__PURE__ */ jsx16("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
14583
|
+
/* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
14584
|
+
/* @__PURE__ */ jsxs14("div", { className: "space-y-1", children: [
|
|
14585
|
+
/* @__PURE__ */ jsx16("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
14586
|
+
/* @__PURE__ */ jsx16(
|
|
14342
14587
|
"input",
|
|
14343
14588
|
{
|
|
14344
14589
|
id: "checkout-form-name",
|
|
@@ -14347,17 +14592,17 @@ function CheckoutForm({
|
|
|
14347
14592
|
value: contact.name,
|
|
14348
14593
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
14349
14594
|
placeholder: t.namePlaceholder,
|
|
14350
|
-
className:
|
|
14595
|
+
className: cn15(
|
|
14351
14596
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14352
14597
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
14353
14598
|
)
|
|
14354
14599
|
}
|
|
14355
14600
|
),
|
|
14356
|
-
contactErrors?.name && /* @__PURE__ */
|
|
14601
|
+
contactErrors?.name && /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14357
14602
|
] }),
|
|
14358
|
-
/* @__PURE__ */
|
|
14359
|
-
/* @__PURE__ */
|
|
14360
|
-
/* @__PURE__ */
|
|
14603
|
+
/* @__PURE__ */ jsxs14("div", { className: "space-y-1", children: [
|
|
14604
|
+
/* @__PURE__ */ jsx16("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14605
|
+
/* @__PURE__ */ jsx16(
|
|
14361
14606
|
"input",
|
|
14362
14607
|
{
|
|
14363
14608
|
id: "checkout-form-email",
|
|
@@ -14366,15 +14611,15 @@ function CheckoutForm({
|
|
|
14366
14611
|
value: contact.email,
|
|
14367
14612
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
14368
14613
|
placeholder: t.emailPlaceholder,
|
|
14369
|
-
className:
|
|
14614
|
+
className: cn15(
|
|
14370
14615
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14371
14616
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
14372
14617
|
)
|
|
14373
14618
|
}
|
|
14374
14619
|
),
|
|
14375
|
-
contactErrors?.email && /* @__PURE__ */
|
|
14620
|
+
contactErrors?.email && /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
14376
14621
|
] }),
|
|
14377
|
-
/* @__PURE__ */
|
|
14622
|
+
/* @__PURE__ */ jsx16("div", { className: "space-y-1", children: /* @__PURE__ */ jsx16(
|
|
14378
14623
|
PhoneInput,
|
|
14379
14624
|
{
|
|
14380
14625
|
id: "checkout-form-phone",
|
|
@@ -14388,15 +14633,15 @@ function CheckoutForm({
|
|
|
14388
14633
|
] })
|
|
14389
14634
|
] }),
|
|
14390
14635
|
children2,
|
|
14391
|
-
generalError ? /* @__PURE__ */
|
|
14392
|
-
/* @__PURE__ */
|
|
14393
|
-
/* @__PURE__ */
|
|
14394
|
-
appliedDiscount ? /* @__PURE__ */
|
|
14395
|
-
/* @__PURE__ */
|
|
14396
|
-
/* @__PURE__ */
|
|
14397
|
-
/* @__PURE__ */
|
|
14636
|
+
generalError ? /* @__PURE__ */ jsx16("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
14637
|
+
/* @__PURE__ */ jsxs14("section", { className: "space-y-3", children: [
|
|
14638
|
+
/* @__PURE__ */ jsx16("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
14639
|
+
appliedDiscount ? /* @__PURE__ */ jsxs14("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: [
|
|
14640
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
14641
|
+
/* @__PURE__ */ jsx16("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
14642
|
+
/* @__PURE__ */ jsx16("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
14398
14643
|
] }),
|
|
14399
|
-
/* @__PURE__ */
|
|
14644
|
+
/* @__PURE__ */ jsx16(
|
|
14400
14645
|
"button",
|
|
14401
14646
|
{
|
|
14402
14647
|
type: "button",
|
|
@@ -14406,9 +14651,9 @@ function CheckoutForm({
|
|
|
14406
14651
|
children: t.removeDiscount
|
|
14407
14652
|
}
|
|
14408
14653
|
)
|
|
14409
|
-
] }) : /* @__PURE__ */
|
|
14410
|
-
/* @__PURE__ */
|
|
14411
|
-
/* @__PURE__ */
|
|
14654
|
+
] }) : /* @__PURE__ */ jsxs14("div", { className: "flex gap-2", children: [
|
|
14655
|
+
/* @__PURE__ */ jsx16("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
14656
|
+
/* @__PURE__ */ jsx16(
|
|
14412
14657
|
"input",
|
|
14413
14658
|
{
|
|
14414
14659
|
id: "checkout-form-discount-code",
|
|
@@ -14420,7 +14665,7 @@ function CheckoutForm({
|
|
|
14420
14665
|
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"
|
|
14421
14666
|
}
|
|
14422
14667
|
),
|
|
14423
|
-
/* @__PURE__ */
|
|
14668
|
+
/* @__PURE__ */ jsx16(
|
|
14424
14669
|
"button",
|
|
14425
14670
|
{
|
|
14426
14671
|
type: "button",
|
|
@@ -14431,14 +14676,14 @@ function CheckoutForm({
|
|
|
14431
14676
|
}
|
|
14432
14677
|
)
|
|
14433
14678
|
] }),
|
|
14434
|
-
discountError && /* @__PURE__ */
|
|
14679
|
+
discountError && /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: discountError })
|
|
14435
14680
|
] }),
|
|
14436
|
-
/* @__PURE__ */
|
|
14681
|
+
/* @__PURE__ */ jsx16(
|
|
14437
14682
|
"button",
|
|
14438
14683
|
{
|
|
14439
14684
|
type: "submit",
|
|
14440
14685
|
disabled: submitting || submitDisabled,
|
|
14441
|
-
className:
|
|
14686
|
+
className: cn15(
|
|
14442
14687
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
14443
14688
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14444
14689
|
),
|
|
@@ -14452,8 +14697,8 @@ function CheckoutForm({
|
|
|
14452
14697
|
}
|
|
14453
14698
|
|
|
14454
14699
|
// src/components/order-confirmation.tsx
|
|
14455
|
-
import { cn as
|
|
14456
|
-
import { jsx as
|
|
14700
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14701
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14457
14702
|
var DEFAULT_LABELS7 = {
|
|
14458
14703
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
14459
14704
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -14515,48 +14760,48 @@ function OrderConfirmation({
|
|
|
14515
14760
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
14516
14761
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
14517
14762
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
14518
|
-
return /* @__PURE__ */
|
|
14519
|
-
/* @__PURE__ */
|
|
14520
|
-
/* @__PURE__ */
|
|
14521
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
14522
|
-
/* @__PURE__ */
|
|
14523
|
-
/* @__PURE__ */
|
|
14524
|
-
/* @__PURE__ */
|
|
14763
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn16("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
14764
|
+
/* @__PURE__ */ jsx17("h1", { className: "text-3xl font-bold", children: title }),
|
|
14765
|
+
/* @__PURE__ */ jsx17("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
14766
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs15("div", { className: "space-y-6", children: [
|
|
14767
|
+
/* @__PURE__ */ jsxs15("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14768
|
+
/* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
14769
|
+
/* @__PURE__ */ jsx17("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14525
14770
|
] }),
|
|
14526
|
-
/* @__PURE__ */
|
|
14527
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
14771
|
+
/* @__PURE__ */ jsxs15("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
14772
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs15(
|
|
14528
14773
|
"div",
|
|
14529
14774
|
{
|
|
14530
14775
|
className: "flex justify-between gap-4 text-sm",
|
|
14531
14776
|
children: [
|
|
14532
|
-
/* @__PURE__ */
|
|
14777
|
+
/* @__PURE__ */ jsxs15("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
14533
14778
|
item.product.name,
|
|
14534
14779
|
item.variant ? ` (${item.variant.name})` : "",
|
|
14535
14780
|
" x",
|
|
14536
14781
|
item.quantity
|
|
14537
14782
|
] }),
|
|
14538
|
-
/* @__PURE__ */
|
|
14783
|
+
/* @__PURE__ */ jsx17("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
14539
14784
|
]
|
|
14540
14785
|
},
|
|
14541
14786
|
idx
|
|
14542
14787
|
)),
|
|
14543
|
-
/* @__PURE__ */
|
|
14544
|
-
/* @__PURE__ */
|
|
14545
|
-
/* @__PURE__ */
|
|
14788
|
+
/* @__PURE__ */ jsx17("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs15("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
14789
|
+
/* @__PURE__ */ jsx17("span", { children: t.totalLabel }),
|
|
14790
|
+
/* @__PURE__ */ jsx17("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
14546
14791
|
] }) })
|
|
14547
14792
|
] }),
|
|
14548
|
-
/* @__PURE__ */
|
|
14793
|
+
/* @__PURE__ */ jsxs15("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
14549
14794
|
t.confirmationEmailPrefix,
|
|
14550
14795
|
" ",
|
|
14551
|
-
/* @__PURE__ */
|
|
14796
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
14552
14797
|
"."
|
|
14553
14798
|
] })
|
|
14554
14799
|
] }),
|
|
14555
|
-
showOrderReference && order && /* @__PURE__ */
|
|
14556
|
-
/* @__PURE__ */
|
|
14557
|
-
/* @__PURE__ */
|
|
14800
|
+
showOrderReference && order && /* @__PURE__ */ jsxs15("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14801
|
+
/* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
14802
|
+
/* @__PURE__ */ jsx17("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14558
14803
|
] }),
|
|
14559
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
14804
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx17(
|
|
14560
14805
|
"a",
|
|
14561
14806
|
{
|
|
14562
14807
|
href: cartHref,
|
|
@@ -14564,7 +14809,7 @@ function OrderConfirmation({
|
|
|
14564
14809
|
children: t.backToCartLabel
|
|
14565
14810
|
}
|
|
14566
14811
|
),
|
|
14567
|
-
showRecheck && /* @__PURE__ */
|
|
14812
|
+
showRecheck && /* @__PURE__ */ jsx17(
|
|
14568
14813
|
"button",
|
|
14569
14814
|
{
|
|
14570
14815
|
type: "button",
|
|
@@ -14573,9 +14818,9 @@ function OrderConfirmation({
|
|
|
14573
14818
|
children: t.recheckLabel
|
|
14574
14819
|
}
|
|
14575
14820
|
),
|
|
14576
|
-
showSessionReference && /* @__PURE__ */
|
|
14577
|
-
/* @__PURE__ */
|
|
14578
|
-
/* @__PURE__ */
|
|
14821
|
+
showSessionReference && /* @__PURE__ */ jsxs15("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14822
|
+
/* @__PURE__ */ jsx17("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
14823
|
+
/* @__PURE__ */ jsx17("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
14579
14824
|
] })
|
|
14580
14825
|
] });
|
|
14581
14826
|
}
|
|
@@ -14589,11 +14834,14 @@ export {
|
|
|
14589
14834
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
14590
14835
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
14591
14836
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
14837
|
+
DEFAULT_TRUST_ICONS,
|
|
14592
14838
|
FaqAccordion,
|
|
14593
14839
|
MarkdownRenderer,
|
|
14594
14840
|
OrderConfirmation,
|
|
14595
14841
|
PageBlocks,
|
|
14842
|
+
ParentPage,
|
|
14596
14843
|
ProductCard,
|
|
14844
|
+
ProductTrustItems,
|
|
14597
14845
|
ProfileCard,
|
|
14598
14846
|
SafeHtml,
|
|
14599
14847
|
ShopFilters,
|
|
@@ -14610,4 +14858,26 @@ export {
|
|
|
14610
14858
|
sanitizeHtml,
|
|
14611
14859
|
shouldRenderShopFilters
|
|
14612
14860
|
};
|
|
14861
|
+
/*! Bundled license information:
|
|
14862
|
+
|
|
14863
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
14864
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
14865
|
+
lucide-react/dist/esm/Icon.js:
|
|
14866
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
14867
|
+
lucide-react/dist/esm/icons/award.js:
|
|
14868
|
+
lucide-react/dist/esm/icons/badge-check.js:
|
|
14869
|
+
lucide-react/dist/esm/icons/gift.js:
|
|
14870
|
+
lucide-react/dist/esm/icons/headset.js:
|
|
14871
|
+
lucide-react/dist/esm/icons/rotate-ccw.js:
|
|
14872
|
+
lucide-react/dist/esm/icons/shield-check.js:
|
|
14873
|
+
lucide-react/dist/esm/icons/store.js:
|
|
14874
|
+
lucide-react/dist/esm/icons/truck.js:
|
|
14875
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
14876
|
+
(**
|
|
14877
|
+
* @license lucide-react v0.562.0 - ISC
|
|
14878
|
+
*
|
|
14879
|
+
* This source code is licensed under the ISC license.
|
|
14880
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14881
|
+
*)
|
|
14882
|
+
*/
|
|
14613
14883
|
//# sourceMappingURL=index.js.map
|