@reblu/site-blocks 0.10.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 +6 -0
- package/README.md +66 -0
- package/dist/index.cjs +454 -193
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -2
- package/dist/index.d.ts +41 -2
- package/dist/index.js +452 -193
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -13458,11 +13458,246 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13458
13458
|
);
|
|
13459
13459
|
}
|
|
13460
13460
|
|
|
13461
|
-
//
|
|
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
|
|
13462
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";
|
|
13463
13698
|
|
|
13464
13699
|
// src/components/_heading.tsx
|
|
13465
|
-
import { jsx as
|
|
13700
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
13466
13701
|
function nextHeadingLevel(level) {
|
|
13467
13702
|
return Math.min(level + 1, 6);
|
|
13468
13703
|
}
|
|
@@ -13472,11 +13707,11 @@ function Heading({
|
|
|
13472
13707
|
children: children2
|
|
13473
13708
|
}) {
|
|
13474
13709
|
const Tag = `h${level}`;
|
|
13475
|
-
return /* @__PURE__ */
|
|
13710
|
+
return /* @__PURE__ */ jsx8(Tag, { className, children: children2 });
|
|
13476
13711
|
}
|
|
13477
13712
|
|
|
13478
13713
|
// src/components/faq-accordion.tsx
|
|
13479
|
-
import { jsx as
|
|
13714
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13480
13715
|
function FaqAccordion({
|
|
13481
13716
|
items,
|
|
13482
13717
|
heading,
|
|
@@ -13487,18 +13722,18 @@ function FaqAccordion({
|
|
|
13487
13722
|
}) {
|
|
13488
13723
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13489
13724
|
if (visible.length === 0) return null;
|
|
13490
|
-
return /* @__PURE__ */
|
|
13491
|
-
heading && /* @__PURE__ */
|
|
13492
|
-
/* @__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(
|
|
13493
13728
|
"details",
|
|
13494
13729
|
{
|
|
13495
13730
|
className: "group px-4",
|
|
13496
13731
|
"data-slot": "faq-item",
|
|
13497
13732
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13498
13733
|
children: [
|
|
13499
|
-
/* @__PURE__ */
|
|
13500
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
13501
|
-
/* @__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(
|
|
13502
13737
|
"span",
|
|
13503
13738
|
{
|
|
13504
13739
|
"aria-hidden": "true",
|
|
@@ -13507,7 +13742,7 @@ function FaqAccordion({
|
|
|
13507
13742
|
}
|
|
13508
13743
|
)
|
|
13509
13744
|
] }),
|
|
13510
|
-
/* @__PURE__ */
|
|
13745
|
+
/* @__PURE__ */ jsx9("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
13511
13746
|
]
|
|
13512
13747
|
},
|
|
13513
13748
|
index
|
|
@@ -13516,40 +13751,40 @@ function FaqAccordion({
|
|
|
13516
13751
|
}
|
|
13517
13752
|
|
|
13518
13753
|
// src/components/page-blocks.tsx
|
|
13519
|
-
import { cn as
|
|
13754
|
+
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13520
13755
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
13521
|
-
import { jsx as
|
|
13756
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13522
13757
|
var ALIASES = {
|
|
13523
13758
|
doctor_embed: "profile_embed",
|
|
13524
13759
|
specialty_embed: "page_embed"
|
|
13525
13760
|
};
|
|
13526
13761
|
function HeroBlock({ block, headingLevel }) {
|
|
13527
13762
|
const { title, subtitle, imageUrl } = block.data;
|
|
13528
|
-
return /* @__PURE__ */
|
|
13529
|
-
/* @__PURE__ */
|
|
13530
|
-
subtitle && /* @__PURE__ */
|
|
13531
|
-
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" }) })
|
|
13532
13767
|
] });
|
|
13533
13768
|
}
|
|
13534
13769
|
function RichtextBlock({ block, headingLevel }) {
|
|
13535
|
-
return /* @__PURE__ */
|
|
13770
|
+
return /* @__PURE__ */ jsx10(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
13536
13771
|
}
|
|
13537
13772
|
function FaqBlock({ block }) {
|
|
13538
|
-
return /* @__PURE__ */
|
|
13773
|
+
return /* @__PURE__ */ jsx10(FaqAccordion, { items: block.data.items });
|
|
13539
13774
|
}
|
|
13540
13775
|
function StatsBlock({ block }) {
|
|
13541
|
-
return /* @__PURE__ */
|
|
13542
|
-
/* @__PURE__ */
|
|
13543
|
-
/* @__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 })
|
|
13544
13779
|
] }, i)) });
|
|
13545
13780
|
}
|
|
13546
13781
|
function TestimonialBlock({ block }) {
|
|
13547
13782
|
const { quote, author, role, avatarUrl } = block.data;
|
|
13548
|
-
return /* @__PURE__ */
|
|
13549
|
-
/* @__PURE__ */
|
|
13550
|
-
/* @__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: [
|
|
13551
13786
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
13552
|
-
/* @__PURE__ */
|
|
13787
|
+
/* @__PURE__ */ jsx10(
|
|
13553
13788
|
"img",
|
|
13554
13789
|
{
|
|
13555
13790
|
src: avatarUrl,
|
|
@@ -13558,9 +13793,9 @@ function TestimonialBlock({ block }) {
|
|
|
13558
13793
|
className: "h-10 w-10 rounded-full object-cover"
|
|
13559
13794
|
}
|
|
13560
13795
|
),
|
|
13561
|
-
/* @__PURE__ */
|
|
13562
|
-
/* @__PURE__ */
|
|
13563
|
-
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 })
|
|
13564
13799
|
] })
|
|
13565
13800
|
] })
|
|
13566
13801
|
] });
|
|
@@ -13569,19 +13804,19 @@ function CtaSlotBlock(_props) {
|
|
|
13569
13804
|
return null;
|
|
13570
13805
|
}
|
|
13571
13806
|
function FeatureListBlock({ block }) {
|
|
13572
|
-
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)) });
|
|
13573
13808
|
}
|
|
13574
13809
|
function GalleryBlock({ block }) {
|
|
13575
13810
|
const { images } = block.data;
|
|
13576
|
-
return /* @__PURE__ */
|
|
13811
|
+
return /* @__PURE__ */ jsx10(
|
|
13577
13812
|
"div",
|
|
13578
13813
|
{
|
|
13579
|
-
className:
|
|
13814
|
+
className: cn9(
|
|
13580
13815
|
"grid gap-4",
|
|
13581
13816
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
13582
13817
|
),
|
|
13583
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
13584
|
-
/* @__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(
|
|
13585
13820
|
"img",
|
|
13586
13821
|
{
|
|
13587
13822
|
src: img.url,
|
|
@@ -13590,7 +13825,7 @@ function GalleryBlock({ block }) {
|
|
|
13590
13825
|
className: "h-full w-full object-cover"
|
|
13591
13826
|
}
|
|
13592
13827
|
) }),
|
|
13593
|
-
img.caption && /* @__PURE__ */
|
|
13828
|
+
img.caption && /* @__PURE__ */ jsx10("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
13594
13829
|
] }, `${img.url}-${i}`))
|
|
13595
13830
|
}
|
|
13596
13831
|
);
|
|
@@ -13600,13 +13835,13 @@ function EmbedCard({
|
|
|
13600
13835
|
headingLevel,
|
|
13601
13836
|
embedHref
|
|
13602
13837
|
}) {
|
|
13603
|
-
return /* @__PURE__ */
|
|
13838
|
+
return /* @__PURE__ */ jsxs8(
|
|
13604
13839
|
"a",
|
|
13605
13840
|
{
|
|
13606
13841
|
href: embedHref(resolved),
|
|
13607
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",
|
|
13608
13843
|
children: [
|
|
13609
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
13844
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx10("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx10(
|
|
13610
13845
|
"img",
|
|
13611
13846
|
{
|
|
13612
13847
|
src: resolved.coverImageUrl,
|
|
@@ -13615,24 +13850,24 @@ function EmbedCard({
|
|
|
13615
13850
|
className: "h-full w-full object-cover"
|
|
13616
13851
|
}
|
|
13617
13852
|
) }),
|
|
13618
|
-
/* @__PURE__ */
|
|
13619
|
-
/* @__PURE__ */
|
|
13620
|
-
resolved.role && /* @__PURE__ */
|
|
13621
|
-
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 })
|
|
13622
13857
|
] })
|
|
13623
13858
|
]
|
|
13624
13859
|
}
|
|
13625
13860
|
);
|
|
13626
13861
|
}
|
|
13627
13862
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
13628
|
-
return /* @__PURE__ */
|
|
13863
|
+
return /* @__PURE__ */ jsx10(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13629
13864
|
}
|
|
13630
13865
|
function ProfileEmbedBlock({
|
|
13631
13866
|
block,
|
|
13632
13867
|
headingLevel,
|
|
13633
13868
|
embedHref
|
|
13634
13869
|
}) {
|
|
13635
|
-
return /* @__PURE__ */
|
|
13870
|
+
return /* @__PURE__ */ jsx10(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13636
13871
|
}
|
|
13637
13872
|
var DEFAULT_RENDERERS = {
|
|
13638
13873
|
hero: HeroBlock,
|
|
@@ -13689,14 +13924,14 @@ function toIdFragment(value) {
|
|
|
13689
13924
|
function SectionCta2({ cta }) {
|
|
13690
13925
|
if (!hasUsableCta(cta)) return null;
|
|
13691
13926
|
const variant = toButtonVariant(cta.variant);
|
|
13692
|
-
return /* @__PURE__ */
|
|
13927
|
+
return /* @__PURE__ */ jsx10("div", { className: "pt-2", children: /* @__PURE__ */ jsx10(
|
|
13693
13928
|
"a",
|
|
13694
13929
|
{
|
|
13695
13930
|
href: cta.url,
|
|
13696
13931
|
"data-slot": "button",
|
|
13697
13932
|
"data-variant": variant,
|
|
13698
13933
|
"data-size": "default",
|
|
13699
|
-
className:
|
|
13934
|
+
className: cn9(buttonVariants2({ variant, size: "default" })),
|
|
13700
13935
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13701
13936
|
children: cta.label
|
|
13702
13937
|
}
|
|
@@ -13722,17 +13957,17 @@ function PageBlocks({
|
|
|
13722
13957
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
13723
13958
|
const background = block.backgroundColor;
|
|
13724
13959
|
return [
|
|
13725
|
-
/* @__PURE__ */
|
|
13960
|
+
/* @__PURE__ */ jsxs8(
|
|
13726
13961
|
"section",
|
|
13727
13962
|
{
|
|
13728
13963
|
"data-slot": "page-block",
|
|
13729
13964
|
"data-block-type": type,
|
|
13730
13965
|
"aria-labelledby": headingId,
|
|
13731
13966
|
style: surfaceStyle(background),
|
|
13732
|
-
className:
|
|
13967
|
+
className: cn9("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
13733
13968
|
children: [
|
|
13734
|
-
block.heading && /* @__PURE__ */
|
|
13735
|
-
/* @__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(
|
|
13736
13971
|
Renderer,
|
|
13737
13972
|
{
|
|
13738
13973
|
block,
|
|
@@ -13740,7 +13975,7 @@ function PageBlocks({
|
|
|
13740
13975
|
embedHref
|
|
13741
13976
|
}
|
|
13742
13977
|
),
|
|
13743
|
-
/* @__PURE__ */
|
|
13978
|
+
/* @__PURE__ */ jsx10(SectionCta2, { cta: block.cta })
|
|
13744
13979
|
]
|
|
13745
13980
|
},
|
|
13746
13981
|
block.id
|
|
@@ -13748,12 +13983,12 @@ function PageBlocks({
|
|
|
13748
13983
|
];
|
|
13749
13984
|
});
|
|
13750
13985
|
if (sections.length === 0) return null;
|
|
13751
|
-
return /* @__PURE__ */
|
|
13986
|
+
return /* @__PURE__ */ jsx10("div", { className: cn9("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
13752
13987
|
}
|
|
13753
13988
|
|
|
13754
13989
|
// src/components/shop-filters.tsx
|
|
13755
|
-
import { cn as
|
|
13756
|
-
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";
|
|
13757
13992
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
13758
13993
|
{ max: 2500 },
|
|
13759
13994
|
{ min: 2500, max: 5e3 },
|
|
@@ -13797,7 +14032,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
13797
14032
|
return "";
|
|
13798
14033
|
}
|
|
13799
14034
|
function OptionLink({ href, active, label, onActivate }) {
|
|
13800
|
-
return /* @__PURE__ */
|
|
14035
|
+
return /* @__PURE__ */ jsx11(
|
|
13801
14036
|
"a",
|
|
13802
14037
|
{
|
|
13803
14038
|
href,
|
|
@@ -13806,7 +14041,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
13806
14041
|
event.preventDefault();
|
|
13807
14042
|
onActivate();
|
|
13808
14043
|
} : void 0,
|
|
13809
|
-
className:
|
|
14044
|
+
className: cn10(
|
|
13810
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",
|
|
13811
14046
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
13812
14047
|
),
|
|
@@ -13815,9 +14050,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
13815
14050
|
);
|
|
13816
14051
|
}
|
|
13817
14052
|
function FilterFieldset({ legend, children: children2 }) {
|
|
13818
|
-
return /* @__PURE__ */
|
|
13819
|
-
/* @__PURE__ */
|
|
13820
|
-
/* @__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 })
|
|
13821
14056
|
] });
|
|
13822
14057
|
}
|
|
13823
14058
|
function ShopFilters({
|
|
@@ -13840,11 +14075,11 @@ function ShopFilters({
|
|
|
13840
14075
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
13841
14076
|
return null;
|
|
13842
14077
|
}
|
|
13843
|
-
return /* @__PURE__ */
|
|
14078
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn10("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
13844
14079
|
visibleTaxonomies.map((axis) => {
|
|
13845
14080
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
13846
|
-
return /* @__PURE__ */
|
|
13847
|
-
/* @__PURE__ */
|
|
14081
|
+
return /* @__PURE__ */ jsxs9(FilterFieldset, { legend: axis.label, children: [
|
|
14082
|
+
/* @__PURE__ */ jsx11(
|
|
13848
14083
|
OptionLink,
|
|
13849
14084
|
{
|
|
13850
14085
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -13859,7 +14094,7 @@ function ShopFilters({
|
|
|
13859
14094
|
),
|
|
13860
14095
|
axis.terms.map((term) => {
|
|
13861
14096
|
const isActive = activeSlug === term.slug;
|
|
13862
|
-
return /* @__PURE__ */
|
|
14097
|
+
return /* @__PURE__ */ jsx11(
|
|
13863
14098
|
OptionLink,
|
|
13864
14099
|
{
|
|
13865
14100
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -13879,9 +14114,9 @@ function ShopFilters({
|
|
|
13879
14114
|
}),
|
|
13880
14115
|
visibleAttributes.map((attr) => {
|
|
13881
14116
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
13882
|
-
return /* @__PURE__ */
|
|
14117
|
+
return /* @__PURE__ */ jsx11(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
13883
14118
|
const isActive = activeValues.includes(opt.value);
|
|
13884
|
-
return /* @__PURE__ */
|
|
14119
|
+
return /* @__PURE__ */ jsx11(
|
|
13885
14120
|
OptionLink,
|
|
13886
14121
|
{
|
|
13887
14122
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -13899,11 +14134,11 @@ function ShopFilters({
|
|
|
13899
14134
|
);
|
|
13900
14135
|
}) }, attr.key);
|
|
13901
14136
|
}),
|
|
13902
|
-
showPriceGroup && /* @__PURE__ */
|
|
14137
|
+
showPriceGroup && /* @__PURE__ */ jsx11(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
13903
14138
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
13904
14139
|
const nextMin = isActive ? void 0 : band.min;
|
|
13905
14140
|
const nextMax = isActive ? void 0 : band.max;
|
|
13906
|
-
return /* @__PURE__ */
|
|
14141
|
+
return /* @__PURE__ */ jsx11(
|
|
13907
14142
|
OptionLink,
|
|
13908
14143
|
{
|
|
13909
14144
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -13914,7 +14149,7 @@ function ShopFilters({
|
|
|
13914
14149
|
i
|
|
13915
14150
|
);
|
|
13916
14151
|
}) }),
|
|
13917
|
-
hasOnSale && /* @__PURE__ */
|
|
14152
|
+
hasOnSale && /* @__PURE__ */ jsx11(
|
|
13918
14153
|
OptionLink,
|
|
13919
14154
|
{
|
|
13920
14155
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -13923,7 +14158,7 @@ function ShopFilters({
|
|
|
13923
14158
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
13924
14159
|
}
|
|
13925
14160
|
),
|
|
13926
|
-
/* @__PURE__ */
|
|
14161
|
+
/* @__PURE__ */ jsx11(
|
|
13927
14162
|
"a",
|
|
13928
14163
|
{
|
|
13929
14164
|
href: hrefs.clearAll(),
|
|
@@ -13939,8 +14174,8 @@ function ShopFilters({
|
|
|
13939
14174
|
}
|
|
13940
14175
|
|
|
13941
14176
|
// src/components/cart-line-list.tsx
|
|
13942
|
-
import { cn as
|
|
13943
|
-
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";
|
|
13944
14179
|
var DEFAULT_LABELS2 = {
|
|
13945
14180
|
quantityLabel: "Cantidad",
|
|
13946
14181
|
decrease: "Reducir cantidad",
|
|
@@ -13965,9 +14200,9 @@ function CartLineList({
|
|
|
13965
14200
|
}) {
|
|
13966
14201
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
13967
14202
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
13968
|
-
return /* @__PURE__ */
|
|
13969
|
-
/* @__PURE__ */
|
|
13970
|
-
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(
|
|
13971
14206
|
"div",
|
|
13972
14207
|
{
|
|
13973
14208
|
role: "status",
|
|
@@ -13976,32 +14211,32 @@ function CartLineList({
|
|
|
13976
14211
|
children: noticeContent
|
|
13977
14212
|
}
|
|
13978
14213
|
),
|
|
13979
|
-
/* @__PURE__ */
|
|
14214
|
+
/* @__PURE__ */ jsx12("ul", { className: "space-y-4", children: items.map((item) => {
|
|
13980
14215
|
const maxQty = item.maxStock ?? Infinity;
|
|
13981
14216
|
const atMax = item.quantity >= maxQty;
|
|
13982
14217
|
const atMin = item.quantity <= 1;
|
|
13983
|
-
return /* @__PURE__ */
|
|
14218
|
+
return /* @__PURE__ */ jsxs10(
|
|
13984
14219
|
"li",
|
|
13985
14220
|
{
|
|
13986
14221
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
13987
14222
|
children: [
|
|
13988
|
-
/* @__PURE__ */
|
|
13989
|
-
/* @__PURE__ */
|
|
13990
|
-
/* @__PURE__ */
|
|
13991
|
-
item.variantName && /* @__PURE__ */
|
|
13992
|
-
/* @__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: [
|
|
13993
14228
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
13994
14229
|
" ",
|
|
13995
14230
|
t.unitPriceSuffix
|
|
13996
14231
|
] }),
|
|
13997
|
-
/* @__PURE__ */
|
|
14232
|
+
/* @__PURE__ */ jsxs10(
|
|
13998
14233
|
"div",
|
|
13999
14234
|
{
|
|
14000
14235
|
role: "group",
|
|
14001
14236
|
"aria-label": t.quantityLabel,
|
|
14002
14237
|
className: "mt-3 flex items-center gap-3",
|
|
14003
14238
|
children: [
|
|
14004
|
-
/* @__PURE__ */
|
|
14239
|
+
/* @__PURE__ */ jsx12(
|
|
14005
14240
|
"button",
|
|
14006
14241
|
{
|
|
14007
14242
|
type: "button",
|
|
@@ -14012,8 +14247,8 @@ function CartLineList({
|
|
|
14012
14247
|
children: "\u2212"
|
|
14013
14248
|
}
|
|
14014
14249
|
),
|
|
14015
|
-
/* @__PURE__ */
|
|
14016
|
-
/* @__PURE__ */
|
|
14250
|
+
/* @__PURE__ */ jsx12("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14251
|
+
/* @__PURE__ */ jsx12(
|
|
14017
14252
|
"button",
|
|
14018
14253
|
{
|
|
14019
14254
|
type: "button",
|
|
@@ -14024,7 +14259,7 @@ function CartLineList({
|
|
|
14024
14259
|
children: "+"
|
|
14025
14260
|
}
|
|
14026
14261
|
),
|
|
14027
|
-
onRemove && /* @__PURE__ */
|
|
14262
|
+
onRemove && /* @__PURE__ */ jsx12(
|
|
14028
14263
|
"button",
|
|
14029
14264
|
{
|
|
14030
14265
|
type: "button",
|
|
@@ -14038,7 +14273,7 @@ function CartLineList({
|
|
|
14038
14273
|
}
|
|
14039
14274
|
)
|
|
14040
14275
|
] }),
|
|
14041
|
-
/* @__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) }) })
|
|
14042
14277
|
]
|
|
14043
14278
|
},
|
|
14044
14279
|
lineKey(item.productId, item.variantId)
|
|
@@ -14048,8 +14283,8 @@ function CartLineList({
|
|
|
14048
14283
|
}
|
|
14049
14284
|
|
|
14050
14285
|
// src/components/cart-summary.tsx
|
|
14051
|
-
import { cn as
|
|
14052
|
-
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";
|
|
14053
14288
|
var DEFAULT_LABELS3 = {
|
|
14054
14289
|
subtotal: "Subtotal",
|
|
14055
14290
|
discountPrefix: "Descuento",
|
|
@@ -14076,40 +14311,40 @@ function CartSummary({
|
|
|
14076
14311
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14077
14312
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14078
14313
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14079
|
-
const breakdown = /* @__PURE__ */
|
|
14314
|
+
const breakdown = /* @__PURE__ */ jsxs11(
|
|
14080
14315
|
"dl",
|
|
14081
14316
|
{
|
|
14082
|
-
className:
|
|
14317
|
+
className: cn12("space-y-2 text-sm", !hasNotice && className),
|
|
14083
14318
|
"data-slot": "cart-summary",
|
|
14084
14319
|
children: [
|
|
14085
|
-
/* @__PURE__ */
|
|
14086
|
-
/* @__PURE__ */
|
|
14087
|
-
/* @__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) })
|
|
14088
14323
|
] }),
|
|
14089
|
-
hasDiscount && /* @__PURE__ */
|
|
14090
|
-
/* @__PURE__ */
|
|
14324
|
+
hasDiscount && /* @__PURE__ */ jsxs11("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14325
|
+
/* @__PURE__ */ jsxs11("dt", { children: [
|
|
14091
14326
|
t.discountPrefix,
|
|
14092
14327
|
discountCode ? ` (${discountCode})` : ""
|
|
14093
14328
|
] }),
|
|
14094
|
-
/* @__PURE__ */
|
|
14329
|
+
/* @__PURE__ */ jsxs11("dd", { children: [
|
|
14095
14330
|
"-",
|
|
14096
14331
|
formatPrice(discount, currencyCode, locale)
|
|
14097
14332
|
] })
|
|
14098
14333
|
] }),
|
|
14099
|
-
shippingEnabled && /* @__PURE__ */
|
|
14100
|
-
/* @__PURE__ */
|
|
14101
|
-
/* @__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) })
|
|
14102
14337
|
] }),
|
|
14103
|
-
/* @__PURE__ */
|
|
14104
|
-
/* @__PURE__ */
|
|
14105
|
-
/* @__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) })
|
|
14106
14341
|
] })
|
|
14107
14342
|
]
|
|
14108
14343
|
}
|
|
14109
14344
|
);
|
|
14110
14345
|
if (!hasNotice) return breakdown;
|
|
14111
|
-
return /* @__PURE__ */
|
|
14112
|
-
/* @__PURE__ */
|
|
14346
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn12("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14347
|
+
/* @__PURE__ */ jsx13(
|
|
14113
14348
|
"div",
|
|
14114
14349
|
{
|
|
14115
14350
|
role: "status",
|
|
@@ -14123,8 +14358,8 @@ function CartSummary({
|
|
|
14123
14358
|
}
|
|
14124
14359
|
|
|
14125
14360
|
// src/components/added-to-cart-toast.tsx
|
|
14126
|
-
import { cn as
|
|
14127
|
-
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";
|
|
14128
14363
|
var DEFAULT_LABELS4 = {
|
|
14129
14364
|
success: "A\xF1adido al carrito",
|
|
14130
14365
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -14144,12 +14379,12 @@ function AddedToCartToast({
|
|
|
14144
14379
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14145
14380
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14146
14381
|
const variant = status === "success" ? "success" : "error";
|
|
14147
|
-
return /* @__PURE__ */
|
|
14382
|
+
return /* @__PURE__ */ jsxs12(
|
|
14148
14383
|
"div",
|
|
14149
14384
|
{
|
|
14150
14385
|
"data-slot": "added-to-cart-toast",
|
|
14151
14386
|
"data-variant": variant,
|
|
14152
|
-
className:
|
|
14387
|
+
className: cn13(
|
|
14153
14388
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14154
14389
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14155
14390
|
variant === "error" && "border-destructive/30",
|
|
@@ -14157,20 +14392,20 @@ function AddedToCartToast({
|
|
|
14157
14392
|
),
|
|
14158
14393
|
children: [
|
|
14159
14394
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14160
|
-
/* @__PURE__ */
|
|
14161
|
-
/* @__PURE__ */
|
|
14162
|
-
/* @__PURE__ */
|
|
14163
|
-
/* @__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 })
|
|
14164
14399
|
] }),
|
|
14165
|
-
/* @__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 }) })
|
|
14166
14401
|
]
|
|
14167
14402
|
}
|
|
14168
14403
|
);
|
|
14169
14404
|
}
|
|
14170
14405
|
|
|
14171
14406
|
// src/components/checkout-login-prompt.tsx
|
|
14172
|
-
import { cn as
|
|
14173
|
-
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";
|
|
14174
14409
|
var DEFAULT_LABELS5 = {
|
|
14175
14410
|
title: "Identificaci\xF3n",
|
|
14176
14411
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14197,26 +14432,26 @@ function CheckoutLoginPrompt({
|
|
|
14197
14432
|
if (!open) return null;
|
|
14198
14433
|
const t = { ...DEFAULT_LABELS5, ...labels };
|
|
14199
14434
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14200
|
-
return /* @__PURE__ */
|
|
14201
|
-
/* @__PURE__ */
|
|
14202
|
-
/* @__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(
|
|
14203
14438
|
"div",
|
|
14204
14439
|
{
|
|
14205
14440
|
role: "dialog",
|
|
14206
14441
|
"aria-modal": "true",
|
|
14207
14442
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14208
14443
|
"data-slot": "checkout-login-prompt",
|
|
14209
|
-
className:
|
|
14444
|
+
className: cn14(
|
|
14210
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",
|
|
14211
14446
|
className
|
|
14212
14447
|
),
|
|
14213
14448
|
children: [
|
|
14214
|
-
/* @__PURE__ */
|
|
14215
|
-
/* @__PURE__ */
|
|
14216
|
-
/* @__PURE__ */
|
|
14217
|
-
/* @__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 })
|
|
14218
14453
|
] }),
|
|
14219
|
-
/* @__PURE__ */
|
|
14454
|
+
/* @__PURE__ */ jsx15(
|
|
14220
14455
|
"button",
|
|
14221
14456
|
{
|
|
14222
14457
|
type: "button",
|
|
@@ -14227,9 +14462,9 @@ function CheckoutLoginPrompt({
|
|
|
14227
14462
|
}
|
|
14228
14463
|
)
|
|
14229
14464
|
] }),
|
|
14230
|
-
/* @__PURE__ */
|
|
14231
|
-
/* @__PURE__ */
|
|
14232
|
-
/* @__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(
|
|
14233
14468
|
"input",
|
|
14234
14469
|
{
|
|
14235
14470
|
id: "checkout-login-prompt-email",
|
|
@@ -14238,29 +14473,29 @@ function CheckoutLoginPrompt({
|
|
|
14238
14473
|
value: email,
|
|
14239
14474
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14240
14475
|
placeholder: t.emailPlaceholder,
|
|
14241
|
-
className:
|
|
14476
|
+
className: cn14(
|
|
14242
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",
|
|
14243
14478
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14244
14479
|
)
|
|
14245
14480
|
}
|
|
14246
14481
|
),
|
|
14247
|
-
error && /* @__PURE__ */
|
|
14482
|
+
error && /* @__PURE__ */ jsx15("p", { className: "text-xs text-destructive", children: error })
|
|
14248
14483
|
] }),
|
|
14249
|
-
/* @__PURE__ */
|
|
14250
|
-
/* @__PURE__ */
|
|
14484
|
+
/* @__PURE__ */ jsxs13("div", { className: "space-y-2", children: [
|
|
14485
|
+
/* @__PURE__ */ jsx15(
|
|
14251
14486
|
"button",
|
|
14252
14487
|
{
|
|
14253
14488
|
type: "button",
|
|
14254
14489
|
onClick: onSubmitEmail,
|
|
14255
14490
|
disabled: checking || !isValidEmail,
|
|
14256
|
-
className:
|
|
14491
|
+
className: cn14(
|
|
14257
14492
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14258
14493
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14259
14494
|
),
|
|
14260
14495
|
children: checking ? t.checking : t.continueWithEmail
|
|
14261
14496
|
}
|
|
14262
14497
|
),
|
|
14263
|
-
/* @__PURE__ */
|
|
14498
|
+
/* @__PURE__ */ jsx15(
|
|
14264
14499
|
"button",
|
|
14265
14500
|
{
|
|
14266
14501
|
type: "button",
|
|
@@ -14277,9 +14512,9 @@ function CheckoutLoginPrompt({
|
|
|
14277
14512
|
}
|
|
14278
14513
|
|
|
14279
14514
|
// src/components/checkout-form.tsx
|
|
14280
|
-
import { cn as
|
|
14515
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14281
14516
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14282
|
-
import { Fragment as Fragment4, jsx as
|
|
14517
|
+
import { Fragment as Fragment4, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14283
14518
|
var DEFAULT_LABELS6 = {
|
|
14284
14519
|
contactTitle: "Datos de contacto",
|
|
14285
14520
|
nameLabel: "Nombre completo",
|
|
@@ -14333,22 +14568,22 @@ function CheckoutForm({
|
|
|
14333
14568
|
event.preventDefault();
|
|
14334
14569
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14335
14570
|
}
|
|
14336
|
-
return /* @__PURE__ */
|
|
14571
|
+
return /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
14337
14572
|
loginPrompt,
|
|
14338
|
-
/* @__PURE__ */
|
|
14573
|
+
/* @__PURE__ */ jsxs14(
|
|
14339
14574
|
"form",
|
|
14340
14575
|
{
|
|
14341
14576
|
"data-testid": "checkout-form",
|
|
14342
14577
|
onSubmit,
|
|
14343
|
-
className:
|
|
14578
|
+
className: cn15("space-y-8", className),
|
|
14344
14579
|
"data-slot": "checkout-form",
|
|
14345
14580
|
children: [
|
|
14346
|
-
/* @__PURE__ */
|
|
14347
|
-
/* @__PURE__ */
|
|
14348
|
-
/* @__PURE__ */
|
|
14349
|
-
/* @__PURE__ */
|
|
14350
|
-
/* @__PURE__ */
|
|
14351
|
-
/* @__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(
|
|
14352
14587
|
"input",
|
|
14353
14588
|
{
|
|
14354
14589
|
id: "checkout-form-name",
|
|
@@ -14357,17 +14592,17 @@ function CheckoutForm({
|
|
|
14357
14592
|
value: contact.name,
|
|
14358
14593
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
14359
14594
|
placeholder: t.namePlaceholder,
|
|
14360
|
-
className:
|
|
14595
|
+
className: cn15(
|
|
14361
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",
|
|
14362
14597
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
14363
14598
|
)
|
|
14364
14599
|
}
|
|
14365
14600
|
),
|
|
14366
|
-
contactErrors?.name && /* @__PURE__ */
|
|
14601
|
+
contactErrors?.name && /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14367
14602
|
] }),
|
|
14368
|
-
/* @__PURE__ */
|
|
14369
|
-
/* @__PURE__ */
|
|
14370
|
-
/* @__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(
|
|
14371
14606
|
"input",
|
|
14372
14607
|
{
|
|
14373
14608
|
id: "checkout-form-email",
|
|
@@ -14376,15 +14611,15 @@ function CheckoutForm({
|
|
|
14376
14611
|
value: contact.email,
|
|
14377
14612
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
14378
14613
|
placeholder: t.emailPlaceholder,
|
|
14379
|
-
className:
|
|
14614
|
+
className: cn15(
|
|
14380
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",
|
|
14381
14616
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
14382
14617
|
)
|
|
14383
14618
|
}
|
|
14384
14619
|
),
|
|
14385
|
-
contactErrors?.email && /* @__PURE__ */
|
|
14620
|
+
contactErrors?.email && /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
14386
14621
|
] }),
|
|
14387
|
-
/* @__PURE__ */
|
|
14622
|
+
/* @__PURE__ */ jsx16("div", { className: "space-y-1", children: /* @__PURE__ */ jsx16(
|
|
14388
14623
|
PhoneInput,
|
|
14389
14624
|
{
|
|
14390
14625
|
id: "checkout-form-phone",
|
|
@@ -14398,15 +14633,15 @@ function CheckoutForm({
|
|
|
14398
14633
|
] })
|
|
14399
14634
|
] }),
|
|
14400
14635
|
children2,
|
|
14401
|
-
generalError ? /* @__PURE__ */
|
|
14402
|
-
/* @__PURE__ */
|
|
14403
|
-
/* @__PURE__ */
|
|
14404
|
-
appliedDiscount ? /* @__PURE__ */
|
|
14405
|
-
/* @__PURE__ */
|
|
14406
|
-
/* @__PURE__ */
|
|
14407
|
-
/* @__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)) })
|
|
14408
14643
|
] }),
|
|
14409
|
-
/* @__PURE__ */
|
|
14644
|
+
/* @__PURE__ */ jsx16(
|
|
14410
14645
|
"button",
|
|
14411
14646
|
{
|
|
14412
14647
|
type: "button",
|
|
@@ -14416,9 +14651,9 @@ function CheckoutForm({
|
|
|
14416
14651
|
children: t.removeDiscount
|
|
14417
14652
|
}
|
|
14418
14653
|
)
|
|
14419
|
-
] }) : /* @__PURE__ */
|
|
14420
|
-
/* @__PURE__ */
|
|
14421
|
-
/* @__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(
|
|
14422
14657
|
"input",
|
|
14423
14658
|
{
|
|
14424
14659
|
id: "checkout-form-discount-code",
|
|
@@ -14430,7 +14665,7 @@ function CheckoutForm({
|
|
|
14430
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"
|
|
14431
14666
|
}
|
|
14432
14667
|
),
|
|
14433
|
-
/* @__PURE__ */
|
|
14668
|
+
/* @__PURE__ */ jsx16(
|
|
14434
14669
|
"button",
|
|
14435
14670
|
{
|
|
14436
14671
|
type: "button",
|
|
@@ -14441,14 +14676,14 @@ function CheckoutForm({
|
|
|
14441
14676
|
}
|
|
14442
14677
|
)
|
|
14443
14678
|
] }),
|
|
14444
|
-
discountError && /* @__PURE__ */
|
|
14679
|
+
discountError && /* @__PURE__ */ jsx16("p", { className: "text-xs text-destructive", children: discountError })
|
|
14445
14680
|
] }),
|
|
14446
|
-
/* @__PURE__ */
|
|
14681
|
+
/* @__PURE__ */ jsx16(
|
|
14447
14682
|
"button",
|
|
14448
14683
|
{
|
|
14449
14684
|
type: "submit",
|
|
14450
14685
|
disabled: submitting || submitDisabled,
|
|
14451
|
-
className:
|
|
14686
|
+
className: cn15(
|
|
14452
14687
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
14453
14688
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14454
14689
|
),
|
|
@@ -14462,8 +14697,8 @@ function CheckoutForm({
|
|
|
14462
14697
|
}
|
|
14463
14698
|
|
|
14464
14699
|
// src/components/order-confirmation.tsx
|
|
14465
|
-
import { cn as
|
|
14466
|
-
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";
|
|
14467
14702
|
var DEFAULT_LABELS7 = {
|
|
14468
14703
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
14469
14704
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -14525,48 +14760,48 @@ function OrderConfirmation({
|
|
|
14525
14760
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
14526
14761
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
14527
14762
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
14528
|
-
return /* @__PURE__ */
|
|
14529
|
-
/* @__PURE__ */
|
|
14530
|
-
/* @__PURE__ */
|
|
14531
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
14532
|
-
/* @__PURE__ */
|
|
14533
|
-
/* @__PURE__ */
|
|
14534
|
-
/* @__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 })
|
|
14535
14770
|
] }),
|
|
14536
|
-
/* @__PURE__ */
|
|
14537
|
-
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(
|
|
14538
14773
|
"div",
|
|
14539
14774
|
{
|
|
14540
14775
|
className: "flex justify-between gap-4 text-sm",
|
|
14541
14776
|
children: [
|
|
14542
|
-
/* @__PURE__ */
|
|
14777
|
+
/* @__PURE__ */ jsxs15("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
14543
14778
|
item.product.name,
|
|
14544
14779
|
item.variant ? ` (${item.variant.name})` : "",
|
|
14545
14780
|
" x",
|
|
14546
14781
|
item.quantity
|
|
14547
14782
|
] }),
|
|
14548
|
-
/* @__PURE__ */
|
|
14783
|
+
/* @__PURE__ */ jsx17("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
14549
14784
|
]
|
|
14550
14785
|
},
|
|
14551
14786
|
idx
|
|
14552
14787
|
)),
|
|
14553
|
-
/* @__PURE__ */
|
|
14554
|
-
/* @__PURE__ */
|
|
14555
|
-
/* @__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) })
|
|
14556
14791
|
] }) })
|
|
14557
14792
|
] }),
|
|
14558
|
-
/* @__PURE__ */
|
|
14793
|
+
/* @__PURE__ */ jsxs15("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
14559
14794
|
t.confirmationEmailPrefix,
|
|
14560
14795
|
" ",
|
|
14561
|
-
/* @__PURE__ */
|
|
14796
|
+
/* @__PURE__ */ jsx17("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
14562
14797
|
"."
|
|
14563
14798
|
] })
|
|
14564
14799
|
] }),
|
|
14565
|
-
showOrderReference && order && /* @__PURE__ */
|
|
14566
|
-
/* @__PURE__ */
|
|
14567
|
-
/* @__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 })
|
|
14568
14803
|
] }),
|
|
14569
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
14804
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx17(
|
|
14570
14805
|
"a",
|
|
14571
14806
|
{
|
|
14572
14807
|
href: cartHref,
|
|
@@ -14574,7 +14809,7 @@ function OrderConfirmation({
|
|
|
14574
14809
|
children: t.backToCartLabel
|
|
14575
14810
|
}
|
|
14576
14811
|
),
|
|
14577
|
-
showRecheck && /* @__PURE__ */
|
|
14812
|
+
showRecheck && /* @__PURE__ */ jsx17(
|
|
14578
14813
|
"button",
|
|
14579
14814
|
{
|
|
14580
14815
|
type: "button",
|
|
@@ -14583,9 +14818,9 @@ function OrderConfirmation({
|
|
|
14583
14818
|
children: t.recheckLabel
|
|
14584
14819
|
}
|
|
14585
14820
|
),
|
|
14586
|
-
showSessionReference && /* @__PURE__ */
|
|
14587
|
-
/* @__PURE__ */
|
|
14588
|
-
/* @__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 })
|
|
14589
14824
|
] })
|
|
14590
14825
|
] });
|
|
14591
14826
|
}
|
|
@@ -14599,12 +14834,14 @@ export {
|
|
|
14599
14834
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
14600
14835
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
14601
14836
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
14837
|
+
DEFAULT_TRUST_ICONS,
|
|
14602
14838
|
FaqAccordion,
|
|
14603
14839
|
MarkdownRenderer,
|
|
14604
14840
|
OrderConfirmation,
|
|
14605
14841
|
PageBlocks,
|
|
14606
14842
|
ParentPage,
|
|
14607
14843
|
ProductCard,
|
|
14844
|
+
ProductTrustItems,
|
|
14608
14845
|
ProfileCard,
|
|
14609
14846
|
SafeHtml,
|
|
14610
14847
|
ShopFilters,
|
|
@@ -14621,4 +14858,26 @@ export {
|
|
|
14621
14858
|
sanitizeHtml,
|
|
14622
14859
|
shouldRenderShopFilters
|
|
14623
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
|
+
*/
|
|
14624
14883
|
//# sourceMappingURL=index.js.map
|