@reblu/site-blocks 0.19.0 → 0.21.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 +29 -0
- package/README.md +126 -2
- package/dist/client.cjs +372 -45
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +78 -2
- package/dist/client.d.ts +78 -2
- package/dist/client.js +369 -44
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +440 -305
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -4
- package/dist/index.d.ts +68 -4
- package/dist/index.js +438 -305
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13460,13 +13460,129 @@ function CourseDescription({
|
|
|
13460
13460
|
);
|
|
13461
13461
|
}
|
|
13462
13462
|
|
|
13463
|
+
// src/components/lesson-preview.tsx
|
|
13464
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13465
|
+
var DEFAULT_LESSON_PREVIEW_LABELS = {
|
|
13466
|
+
badge: "Vista previa gratuita",
|
|
13467
|
+
player: "V\xEDdeo",
|
|
13468
|
+
duration: "Duraci\xF3n"
|
|
13469
|
+
};
|
|
13470
|
+
function isEmbeddable(url) {
|
|
13471
|
+
try {
|
|
13472
|
+
return new URL(url).protocol === "https:";
|
|
13473
|
+
} catch {
|
|
13474
|
+
return false;
|
|
13475
|
+
}
|
|
13476
|
+
}
|
|
13477
|
+
function clock(seconds) {
|
|
13478
|
+
const whole = Math.round(seconds);
|
|
13479
|
+
const h2 = Math.floor(whole / 3600);
|
|
13480
|
+
const m2 = Math.floor(whole % 3600 / 60);
|
|
13481
|
+
const s2 = whole % 60;
|
|
13482
|
+
const ss = String(s2).padStart(2, "0");
|
|
13483
|
+
return {
|
|
13484
|
+
text: h2 > 0 ? `${h2}:${String(m2).padStart(2, "0")}:${ss}` : `${m2}:${ss}`,
|
|
13485
|
+
iso: `PT${h2 > 0 ? `${h2}H` : ""}${m2}M${s2}S`
|
|
13486
|
+
};
|
|
13487
|
+
}
|
|
13488
|
+
function isVisiblyEmpty2(html5) {
|
|
13489
|
+
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13490
|
+
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13491
|
+
}
|
|
13492
|
+
function LessonPreview({
|
|
13493
|
+
lesson,
|
|
13494
|
+
labels: labelOverrides,
|
|
13495
|
+
headingLevel = 2,
|
|
13496
|
+
headingId = "lesson-preview-heading",
|
|
13497
|
+
headingClassName,
|
|
13498
|
+
contentClassName,
|
|
13499
|
+
className
|
|
13500
|
+
}) {
|
|
13501
|
+
const labels = { ...DEFAULT_LESSON_PREVIEW_LABELS, ...labelOverrides };
|
|
13502
|
+
const Tag = `h${headingLevel}`;
|
|
13503
|
+
const video = lesson.video && isEmbeddable(lesson.video.embedUrl) ? lesson.video : null;
|
|
13504
|
+
const html5 = markdownToSafeHtml(lesson.content);
|
|
13505
|
+
const hasBody = html5 !== null && html5 !== "" && !isVisiblyEmpty2(html5);
|
|
13506
|
+
const duration = typeof lesson.durationSeconds === "number" && lesson.durationSeconds > 0 ? clock(lesson.durationSeconds) : null;
|
|
13507
|
+
return /* @__PURE__ */ jsxs3(
|
|
13508
|
+
"article",
|
|
13509
|
+
{
|
|
13510
|
+
"data-slot": "lesson-preview",
|
|
13511
|
+
"aria-labelledby": headingId,
|
|
13512
|
+
className: slotClassName("space-y-6", "", className),
|
|
13513
|
+
children: [
|
|
13514
|
+
/* @__PURE__ */ jsxs3("header", { className: "space-y-2", children: [
|
|
13515
|
+
/* @__PURE__ */ jsx3(
|
|
13516
|
+
"span",
|
|
13517
|
+
{
|
|
13518
|
+
"data-slot": "lesson-preview-badge",
|
|
13519
|
+
className: "inline-flex items-center rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary",
|
|
13520
|
+
children: labels.badge
|
|
13521
|
+
}
|
|
13522
|
+
),
|
|
13523
|
+
/* @__PURE__ */ jsx3(
|
|
13524
|
+
Tag,
|
|
13525
|
+
{
|
|
13526
|
+
id: headingId,
|
|
13527
|
+
className: slotClassName("", "text-2xl font-semibold leading-tight", headingClassName),
|
|
13528
|
+
children: lesson.title
|
|
13529
|
+
}
|
|
13530
|
+
),
|
|
13531
|
+
duration && /* @__PURE__ */ jsxs3("p", { className: "text-sm text-muted-foreground", children: [
|
|
13532
|
+
/* @__PURE__ */ jsxs3("span", { className: "sr-only", children: [
|
|
13533
|
+
labels.duration,
|
|
13534
|
+
": "
|
|
13535
|
+
] }),
|
|
13536
|
+
/* @__PURE__ */ jsx3(
|
|
13537
|
+
"time",
|
|
13538
|
+
{
|
|
13539
|
+
"data-slot": "lesson-preview-duration",
|
|
13540
|
+
dateTime: duration.iso,
|
|
13541
|
+
className: "tabular-nums",
|
|
13542
|
+
children: duration.text
|
|
13543
|
+
}
|
|
13544
|
+
)
|
|
13545
|
+
] })
|
|
13546
|
+
] }),
|
|
13547
|
+
video && /* @__PURE__ */ jsx3(
|
|
13548
|
+
"div",
|
|
13549
|
+
{
|
|
13550
|
+
"data-slot": "lesson-preview-player",
|
|
13551
|
+
className: "aspect-video w-full overflow-hidden rounded-xl border border-border bg-black",
|
|
13552
|
+
children: /* @__PURE__ */ jsx3(
|
|
13553
|
+
"iframe",
|
|
13554
|
+
{
|
|
13555
|
+
src: video.embedUrl,
|
|
13556
|
+
title: `${labels.player}: ${lesson.title}`,
|
|
13557
|
+
allow: "accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture; fullscreen",
|
|
13558
|
+
allowFullScreen: true,
|
|
13559
|
+
loading: "lazy",
|
|
13560
|
+
referrerPolicy: "strict-origin-when-cross-origin",
|
|
13561
|
+
className: "size-full border-0"
|
|
13562
|
+
}
|
|
13563
|
+
)
|
|
13564
|
+
}
|
|
13565
|
+
),
|
|
13566
|
+
hasBody && /* @__PURE__ */ jsx3("div", { "data-slot": "lesson-preview-content", children: /* @__PURE__ */ jsx3(
|
|
13567
|
+
SafeHtml,
|
|
13568
|
+
{
|
|
13569
|
+
html: html5,
|
|
13570
|
+
headingOffset: headingLevel,
|
|
13571
|
+
className: slotClassName("", "text-muted-foreground", contentClassName)
|
|
13572
|
+
}
|
|
13573
|
+
) })
|
|
13574
|
+
]
|
|
13575
|
+
}
|
|
13576
|
+
);
|
|
13577
|
+
}
|
|
13578
|
+
|
|
13463
13579
|
// src/components/treatment.tsx
|
|
13464
13580
|
import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
13465
13581
|
|
|
13466
13582
|
// src/components/_page-parts.tsx
|
|
13467
13583
|
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13468
13584
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13469
|
-
import { Fragment as Fragment2, jsx as
|
|
13585
|
+
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13470
13586
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13471
13587
|
"default",
|
|
13472
13588
|
"destructive",
|
|
@@ -13479,11 +13595,11 @@ function toButtonVariant(variant) {
|
|
|
13479
13595
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13480
13596
|
}
|
|
13481
13597
|
function PageHero({ page }) {
|
|
13482
|
-
return /* @__PURE__ */
|
|
13483
|
-
page.category && /* @__PURE__ */
|
|
13484
|
-
/* @__PURE__ */
|
|
13485
|
-
page.subtitle && /* @__PURE__ */
|
|
13486
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13598
|
+
return /* @__PURE__ */ jsxs4("header", { className: "space-y-4", children: [
|
|
13599
|
+
page.category && /* @__PURE__ */ jsx4("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
|
|
13600
|
+
/* @__PURE__ */ jsx4("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13601
|
+
page.subtitle && /* @__PURE__ */ jsx4("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13602
|
+
page.coverImageUrl && /* @__PURE__ */ jsx4("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx4(
|
|
13487
13603
|
"img",
|
|
13488
13604
|
{
|
|
13489
13605
|
src: page.coverImageUrl,
|
|
@@ -13497,7 +13613,7 @@ function PageHero({ page }) {
|
|
|
13497
13613
|
function SectionCta({ section }) {
|
|
13498
13614
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13499
13615
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13500
|
-
return /* @__PURE__ */
|
|
13616
|
+
return /* @__PURE__ */ jsx4("div", { className: "pt-2", children: /* @__PURE__ */ jsx4(
|
|
13501
13617
|
"a",
|
|
13502
13618
|
{
|
|
13503
13619
|
href: section.ctaUrl,
|
|
@@ -13512,46 +13628,46 @@ function SectionCta({ section }) {
|
|
|
13512
13628
|
}
|
|
13513
13629
|
function SectionImages({ section }) {
|
|
13514
13630
|
if (section.images.length === 0) return null;
|
|
13515
|
-
return /* @__PURE__ */
|
|
13516
|
-
/* @__PURE__ */
|
|
13517
|
-
img.caption && /* @__PURE__ */
|
|
13631
|
+
return /* @__PURE__ */ jsx4("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs4("figure", { className: "space-y-1", children: [
|
|
13632
|
+
/* @__PURE__ */ jsx4("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx4("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13633
|
+
img.caption && /* @__PURE__ */ jsx4("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13518
13634
|
] }, `${img.url}-${img.order}`)) });
|
|
13519
13635
|
}
|
|
13520
13636
|
function PageSectionBlock({ section }) {
|
|
13521
13637
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13522
13638
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13523
13639
|
const hasImages = section.images.length > 0;
|
|
13524
|
-
const body3 = /* @__PURE__ */
|
|
13525
|
-
section.heading && /* @__PURE__ */
|
|
13526
|
-
/* @__PURE__ */
|
|
13527
|
-
/* @__PURE__ */
|
|
13640
|
+
const body3 = /* @__PURE__ */ jsxs4("div", { className: "space-y-4", children: [
|
|
13641
|
+
section.heading && /* @__PURE__ */ jsx4("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13642
|
+
/* @__PURE__ */ jsx4(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13643
|
+
/* @__PURE__ */ jsx4(SectionCta, { section })
|
|
13528
13644
|
] });
|
|
13529
13645
|
if (sideBySide && hasImages) {
|
|
13530
|
-
return /* @__PURE__ */
|
|
13531
|
-
/* @__PURE__ */
|
|
13646
|
+
return /* @__PURE__ */ jsx4("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
13647
|
+
/* @__PURE__ */ jsx4(SectionImages, { section }),
|
|
13532
13648
|
body3
|
|
13533
|
-
] }) : /* @__PURE__ */
|
|
13649
|
+
] }) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
13534
13650
|
body3,
|
|
13535
|
-
/* @__PURE__ */
|
|
13651
|
+
/* @__PURE__ */ jsx4(SectionImages, { section })
|
|
13536
13652
|
] }) });
|
|
13537
13653
|
}
|
|
13538
|
-
return /* @__PURE__ */
|
|
13654
|
+
return /* @__PURE__ */ jsxs4("section", { className: "space-y-4", children: [
|
|
13539
13655
|
body3,
|
|
13540
|
-
/* @__PURE__ */
|
|
13656
|
+
/* @__PURE__ */ jsx4(SectionImages, { section })
|
|
13541
13657
|
] });
|
|
13542
13658
|
}
|
|
13543
13659
|
function PageSectionList({ sections }) {
|
|
13544
13660
|
if (sections.length === 0) return null;
|
|
13545
13661
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13546
|
-
return /* @__PURE__ */
|
|
13662
|
+
return /* @__PURE__ */ jsx4("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ jsx4(PageSectionBlock, { section }, section.id)) });
|
|
13547
13663
|
}
|
|
13548
13664
|
|
|
13549
13665
|
// src/components/treatment.tsx
|
|
13550
|
-
import { jsx as
|
|
13666
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13551
13667
|
function Treatment({ page, className }) {
|
|
13552
|
-
return /* @__PURE__ */
|
|
13553
|
-
/* @__PURE__ */
|
|
13554
|
-
/* @__PURE__ */
|
|
13668
|
+
return /* @__PURE__ */ jsxs5("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
|
|
13669
|
+
/* @__PURE__ */ jsx5(PageHero, { page }),
|
|
13670
|
+
/* @__PURE__ */ jsx5(PageSectionList, { sections: page.sections })
|
|
13555
13671
|
] });
|
|
13556
13672
|
}
|
|
13557
13673
|
|
|
@@ -13560,11 +13676,11 @@ import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
|
13560
13676
|
|
|
13561
13677
|
// src/components/page-card-grid.tsx
|
|
13562
13678
|
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13563
|
-
import { jsx as
|
|
13679
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13564
13680
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13565
13681
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13566
13682
|
function PageCardGrid(props) {
|
|
13567
|
-
return /* @__PURE__ */
|
|
13683
|
+
return /* @__PURE__ */ jsx6(PageCardGridSection, { ...props });
|
|
13568
13684
|
}
|
|
13569
13685
|
function PageCardGridSection({
|
|
13570
13686
|
pages,
|
|
@@ -13575,15 +13691,15 @@ function PageCardGridSection({
|
|
|
13575
13691
|
}) {
|
|
13576
13692
|
if (pages.length === 0) return null;
|
|
13577
13693
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13578
|
-
return /* @__PURE__ */
|
|
13579
|
-
showHeading && /* @__PURE__ */
|
|
13580
|
-
/* @__PURE__ */
|
|
13694
|
+
return /* @__PURE__ */ jsxs6("section", { className: cn4("space-y-6", className), children: [
|
|
13695
|
+
showHeading && /* @__PURE__ */ jsx6("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13696
|
+
/* @__PURE__ */ jsx6("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ jsx6("li", { children: /* @__PURE__ */ jsxs6(
|
|
13581
13697
|
"a",
|
|
13582
13698
|
{
|
|
13583
13699
|
href: pageHref(page),
|
|
13584
13700
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13585
13701
|
children: [
|
|
13586
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13702
|
+
page.coverImageUrl && /* @__PURE__ */ jsx6("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx6(
|
|
13587
13703
|
"img",
|
|
13588
13704
|
{
|
|
13589
13705
|
src: page.coverImageUrl,
|
|
@@ -13592,9 +13708,9 @@ function PageCardGridSection({
|
|
|
13592
13708
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13593
13709
|
}
|
|
13594
13710
|
) }),
|
|
13595
|
-
/* @__PURE__ */
|
|
13596
|
-
/* @__PURE__ */
|
|
13597
|
-
page.excerpt && /* @__PURE__ */
|
|
13711
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13712
|
+
/* @__PURE__ */ jsx6("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13713
|
+
page.excerpt && /* @__PURE__ */ jsx6("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13598
13714
|
] })
|
|
13599
13715
|
]
|
|
13600
13716
|
}
|
|
@@ -13603,7 +13719,7 @@ function PageCardGridSection({
|
|
|
13603
13719
|
}
|
|
13604
13720
|
|
|
13605
13721
|
// src/components/parent-page.tsx
|
|
13606
|
-
import { jsx as
|
|
13722
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13607
13723
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13608
13724
|
function ParentPage({
|
|
13609
13725
|
page,
|
|
@@ -13618,10 +13734,10 @@ function ParentPage({
|
|
|
13618
13734
|
const pages = childPages ?? treatments ?? [];
|
|
13619
13735
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13620
13736
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13621
|
-
return /* @__PURE__ */
|
|
13622
|
-
/* @__PURE__ */
|
|
13623
|
-
/* @__PURE__ */
|
|
13624
|
-
/* @__PURE__ */
|
|
13737
|
+
return /* @__PURE__ */ jsxs7("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
|
|
13738
|
+
/* @__PURE__ */ jsx7(PageHero, { page }),
|
|
13739
|
+
/* @__PURE__ */ jsx7(PageSectionList, { sections: page.sections }),
|
|
13740
|
+
/* @__PURE__ */ jsx7(
|
|
13625
13741
|
PageCardGridSection,
|
|
13626
13742
|
{
|
|
13627
13743
|
pages,
|
|
@@ -13641,7 +13757,7 @@ import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
|
13641
13757
|
|
|
13642
13758
|
// src/components/professional-fields.tsx
|
|
13643
13759
|
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13644
|
-
import { jsx as
|
|
13760
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13645
13761
|
function ProfessionalFields({
|
|
13646
13762
|
fields,
|
|
13647
13763
|
variant = "profile",
|
|
@@ -13649,7 +13765,7 @@ function ProfessionalFields({
|
|
|
13649
13765
|
}) {
|
|
13650
13766
|
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13651
13767
|
if (shown.length === 0) return null;
|
|
13652
|
-
return /* @__PURE__ */
|
|
13768
|
+
return /* @__PURE__ */ jsx8(
|
|
13653
13769
|
"dl",
|
|
13654
13770
|
{
|
|
13655
13771
|
className: cn6(
|
|
@@ -13659,13 +13775,13 @@ function ProfessionalFields({
|
|
|
13659
13775
|
),
|
|
13660
13776
|
"data-slot": "professional-fields",
|
|
13661
13777
|
"data-variant": variant,
|
|
13662
|
-
children: shown.map((field, index) => /* @__PURE__ */
|
|
13778
|
+
children: shown.map((field, index) => /* @__PURE__ */ jsxs8(
|
|
13663
13779
|
"div",
|
|
13664
13780
|
{
|
|
13665
13781
|
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
13666
13782
|
children: [
|
|
13667
|
-
/* @__PURE__ */
|
|
13668
|
-
/* @__PURE__ */
|
|
13783
|
+
/* @__PURE__ */ jsx8("dt", { className: "text-muted-foreground", children: field.label }),
|
|
13784
|
+
/* @__PURE__ */ jsx8("dd", { className: "m-0 font-medium", children: field.value })
|
|
13669
13785
|
]
|
|
13670
13786
|
},
|
|
13671
13787
|
`${field.label}-${index}`
|
|
@@ -13675,7 +13791,7 @@ function ProfessionalFields({
|
|
|
13675
13791
|
}
|
|
13676
13792
|
|
|
13677
13793
|
// src/components/profile-card.tsx
|
|
13678
|
-
import { jsx as
|
|
13794
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13679
13795
|
function initials(name) {
|
|
13680
13796
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13681
13797
|
}
|
|
@@ -13690,7 +13806,7 @@ function ProfileCard({
|
|
|
13690
13806
|
className
|
|
13691
13807
|
}) {
|
|
13692
13808
|
const NameTag = href ? "a" : "span";
|
|
13693
|
-
return /* @__PURE__ */
|
|
13809
|
+
return /* @__PURE__ */ jsxs9(
|
|
13694
13810
|
"article",
|
|
13695
13811
|
{
|
|
13696
13812
|
className: cn7(
|
|
@@ -13699,7 +13815,7 @@ function ProfileCard({
|
|
|
13699
13815
|
),
|
|
13700
13816
|
"data-slot": "profile-card",
|
|
13701
13817
|
children: [
|
|
13702
|
-
/* @__PURE__ */
|
|
13818
|
+
/* @__PURE__ */ jsx9("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx9("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx9(
|
|
13703
13819
|
"span",
|
|
13704
13820
|
{
|
|
13705
13821
|
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
@@ -13707,12 +13823,12 @@ function ProfileCard({
|
|
|
13707
13823
|
children: initials(name)
|
|
13708
13824
|
}
|
|
13709
13825
|
) }),
|
|
13710
|
-
/* @__PURE__ */
|
|
13711
|
-
/* @__PURE__ */
|
|
13712
|
-
role && /* @__PURE__ */
|
|
13826
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-1", children: [
|
|
13827
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx9(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
13828
|
+
role && /* @__PURE__ */ jsx9("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13713
13829
|
] }),
|
|
13714
|
-
/* @__PURE__ */
|
|
13715
|
-
specialties.length > 0 && /* @__PURE__ */
|
|
13830
|
+
/* @__PURE__ */ jsx9(ProfessionalFields, { fields, variant: "card" }),
|
|
13831
|
+
specialties.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ jsx9(
|
|
13716
13832
|
"li",
|
|
13717
13833
|
{
|
|
13718
13834
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13720,7 +13836,7 @@ function ProfileCard({
|
|
|
13720
13836
|
},
|
|
13721
13837
|
s2
|
|
13722
13838
|
)) }),
|
|
13723
|
-
bio && /* @__PURE__ */
|
|
13839
|
+
bio && /* @__PURE__ */ jsx9("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13724
13840
|
]
|
|
13725
13841
|
}
|
|
13726
13842
|
);
|
|
@@ -13728,11 +13844,11 @@ function ProfileCard({
|
|
|
13728
13844
|
|
|
13729
13845
|
// src/components/product-card.tsx
|
|
13730
13846
|
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13731
|
-
import { jsx as
|
|
13847
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13732
13848
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13733
13849
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13734
13850
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13735
|
-
return /* @__PURE__ */
|
|
13851
|
+
return /* @__PURE__ */ jsxs10(
|
|
13736
13852
|
"article",
|
|
13737
13853
|
{
|
|
13738
13854
|
className: cn8(
|
|
@@ -13741,7 +13857,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13741
13857
|
),
|
|
13742
13858
|
"data-slot": "product-card",
|
|
13743
13859
|
children: [
|
|
13744
|
-
/* @__PURE__ */
|
|
13860
|
+
/* @__PURE__ */ jsx10("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx10(
|
|
13745
13861
|
"img",
|
|
13746
13862
|
{
|
|
13747
13863
|
src: image.url,
|
|
@@ -13749,14 +13865,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13749
13865
|
loading: "lazy",
|
|
13750
13866
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13751
13867
|
}
|
|
13752
|
-
) : /* @__PURE__ */
|
|
13753
|
-
/* @__PURE__ */
|
|
13754
|
-
product.category && /* @__PURE__ */
|
|
13755
|
-
/* @__PURE__ */
|
|
13756
|
-
product.shortDescription && /* @__PURE__ */
|
|
13757
|
-
/* @__PURE__ */
|
|
13758
|
-
/* @__PURE__ */
|
|
13759
|
-
hasDiscount && /* @__PURE__ */
|
|
13868
|
+
) : /* @__PURE__ */ jsx10("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13869
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13870
|
+
product.category && /* @__PURE__ */ jsx10("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
|
|
13871
|
+
/* @__PURE__ */ jsx10("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx10("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13872
|
+
product.shortDescription && /* @__PURE__ */ jsx10("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13873
|
+
/* @__PURE__ */ jsxs10("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13874
|
+
/* @__PURE__ */ jsx10("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13875
|
+
hasDiscount && /* @__PURE__ */ jsx10("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13760
13876
|
] })
|
|
13761
13877
|
] })
|
|
13762
13878
|
]
|
|
@@ -13958,7 +14074,7 @@ var __iconNode8 = [
|
|
|
13958
14074
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13959
14075
|
|
|
13960
14076
|
// src/components/product-trust-items.tsx
|
|
13961
|
-
import { jsx as
|
|
14077
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13962
14078
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13963
14079
|
shipping: Truck,
|
|
13964
14080
|
returns: RotateCcw,
|
|
@@ -13992,9 +14108,9 @@ function ProductTrustItems({
|
|
|
13992
14108
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13993
14109
|
});
|
|
13994
14110
|
if (rows.length === 0) return null;
|
|
13995
|
-
return /* @__PURE__ */
|
|
13996
|
-
/* @__PURE__ */
|
|
13997
|
-
/* @__PURE__ */
|
|
14111
|
+
return /* @__PURE__ */ jsx11(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs11("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
14112
|
+
/* @__PURE__ */ jsx11(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
14113
|
+
/* @__PURE__ */ jsx11("span", { children: text3 })
|
|
13998
14114
|
] }, key2)) });
|
|
13999
14115
|
}
|
|
14000
14116
|
|
|
@@ -14002,7 +14118,7 @@ function ProductTrustItems({
|
|
|
14002
14118
|
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
14003
14119
|
|
|
14004
14120
|
// src/components/_heading.tsx
|
|
14005
|
-
import { jsx as
|
|
14121
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
14006
14122
|
function nextHeadingLevel(level) {
|
|
14007
14123
|
return Math.min(level + 1, 6);
|
|
14008
14124
|
}
|
|
@@ -14012,11 +14128,11 @@ function Heading({
|
|
|
14012
14128
|
children: children2
|
|
14013
14129
|
}) {
|
|
14014
14130
|
const Tag = `h${level}`;
|
|
14015
|
-
return /* @__PURE__ */
|
|
14131
|
+
return /* @__PURE__ */ jsx12(Tag, { className, children: children2 });
|
|
14016
14132
|
}
|
|
14017
14133
|
|
|
14018
14134
|
// src/components/faq-accordion.tsx
|
|
14019
|
-
import { jsx as
|
|
14135
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14020
14136
|
function FaqAccordion({
|
|
14021
14137
|
items,
|
|
14022
14138
|
heading,
|
|
@@ -14027,18 +14143,18 @@ function FaqAccordion({
|
|
|
14027
14143
|
}) {
|
|
14028
14144
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
14029
14145
|
if (visible.length === 0) return null;
|
|
14030
|
-
return /* @__PURE__ */
|
|
14031
|
-
heading && /* @__PURE__ */
|
|
14032
|
-
/* @__PURE__ */
|
|
14146
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn9("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14147
|
+
heading && /* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14148
|
+
/* @__PURE__ */ jsx13("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs12(
|
|
14033
14149
|
"details",
|
|
14034
14150
|
{
|
|
14035
14151
|
className: "group px-4",
|
|
14036
14152
|
"data-slot": "faq-item",
|
|
14037
14153
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
14038
14154
|
children: [
|
|
14039
|
-
/* @__PURE__ */
|
|
14040
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
14041
|
-
/* @__PURE__ */
|
|
14155
|
+
/* @__PURE__ */ jsxs12("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: [
|
|
14156
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx13(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx13("span", { children: item.q }),
|
|
14157
|
+
/* @__PURE__ */ jsx13(
|
|
14042
14158
|
"span",
|
|
14043
14159
|
{
|
|
14044
14160
|
"aria-hidden": "true",
|
|
@@ -14047,7 +14163,7 @@ function FaqAccordion({
|
|
|
14047
14163
|
}
|
|
14048
14164
|
)
|
|
14049
14165
|
] }),
|
|
14050
|
-
/* @__PURE__ */
|
|
14166
|
+
/* @__PURE__ */ jsx13("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14051
14167
|
]
|
|
14052
14168
|
},
|
|
14053
14169
|
index
|
|
@@ -14057,7 +14173,7 @@ function FaqAccordion({
|
|
|
14057
14173
|
|
|
14058
14174
|
// src/components/trust-badges.tsx
|
|
14059
14175
|
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
14060
|
-
import { jsx as
|
|
14176
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14061
14177
|
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
14062
14178
|
{
|
|
14063
14179
|
PARTNER: "Colaboradores",
|
|
@@ -14099,7 +14215,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14099
14215
|
if (src) {
|
|
14100
14216
|
return (
|
|
14101
14217
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14102
|
-
/* @__PURE__ */
|
|
14218
|
+
/* @__PURE__ */ jsx14(
|
|
14103
14219
|
"img",
|
|
14104
14220
|
{
|
|
14105
14221
|
src,
|
|
@@ -14110,7 +14226,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14110
14226
|
)
|
|
14111
14227
|
);
|
|
14112
14228
|
}
|
|
14113
|
-
return /* @__PURE__ */
|
|
14229
|
+
return /* @__PURE__ */ jsx14("span", { className: "text-sm font-medium", children: badge.name });
|
|
14114
14230
|
}
|
|
14115
14231
|
function TrustBadges({
|
|
14116
14232
|
badges,
|
|
@@ -14138,14 +14254,14 @@ function TrustBadges({
|
|
|
14138
14254
|
if (groups.length === 0) return null;
|
|
14139
14255
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14140
14256
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14141
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */
|
|
14257
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs13(
|
|
14142
14258
|
"div",
|
|
14143
14259
|
{
|
|
14144
14260
|
"data-slot": "trust-badge-group",
|
|
14145
14261
|
"data-type": type,
|
|
14146
14262
|
className: cn10("space-y-3", groupClassName),
|
|
14147
14263
|
children: [
|
|
14148
|
-
groupHeading ? /* @__PURE__ */
|
|
14264
|
+
groupHeading ? /* @__PURE__ */ jsx14(
|
|
14149
14265
|
Heading,
|
|
14150
14266
|
{
|
|
14151
14267
|
level: groupHeadingLevel,
|
|
@@ -14157,30 +14273,30 @@ function TrustBadges({
|
|
|
14157
14273
|
children: groupHeading
|
|
14158
14274
|
}
|
|
14159
14275
|
) : null,
|
|
14160
|
-
/* @__PURE__ */
|
|
14276
|
+
/* @__PURE__ */ jsx14("ul", { className: cn10("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14161
14277
|
const href = safeHref(badge.url);
|
|
14162
|
-
return /* @__PURE__ */
|
|
14163
|
-
/* @__PURE__ */
|
|
14278
|
+
return /* @__PURE__ */ jsx14("li", { children: href ? /* @__PURE__ */ jsxs13("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14279
|
+
/* @__PURE__ */ jsx14(BadgeContent, { badge, logoClassName }),
|
|
14164
14280
|
" ",
|
|
14165
|
-
/* @__PURE__ */
|
|
14166
|
-
] }) : /* @__PURE__ */
|
|
14281
|
+
/* @__PURE__ */ jsx14("span", { className: "sr-only", children: newWindowLabel })
|
|
14282
|
+
] }) : /* @__PURE__ */ jsx14(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14167
14283
|
}) })
|
|
14168
14284
|
]
|
|
14169
14285
|
},
|
|
14170
14286
|
type
|
|
14171
14287
|
));
|
|
14172
14288
|
if (!hasHeading) {
|
|
14173
|
-
return /* @__PURE__ */
|
|
14289
|
+
return /* @__PURE__ */ jsx14("div", { "data-slot": "trust-badges", className: cn10("space-y-6", className), children: content });
|
|
14174
14290
|
}
|
|
14175
14291
|
const Tag = `h${headingLevel}`;
|
|
14176
|
-
return /* @__PURE__ */
|
|
14292
|
+
return /* @__PURE__ */ jsxs13(
|
|
14177
14293
|
"section",
|
|
14178
14294
|
{
|
|
14179
14295
|
"data-slot": "trust-badges",
|
|
14180
14296
|
"aria-labelledby": headingId,
|
|
14181
14297
|
className: cn10("space-y-6", className),
|
|
14182
14298
|
children: [
|
|
14183
|
-
/* @__PURE__ */
|
|
14299
|
+
/* @__PURE__ */ jsx14(
|
|
14184
14300
|
Tag,
|
|
14185
14301
|
{
|
|
14186
14302
|
id: headingId,
|
|
@@ -14197,38 +14313,38 @@ function TrustBadges({
|
|
|
14197
14313
|
// src/components/page-blocks.tsx
|
|
14198
14314
|
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14199
14315
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14200
|
-
import { jsx as
|
|
14316
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14201
14317
|
var ALIASES = {
|
|
14202
14318
|
doctor_embed: "profile_embed",
|
|
14203
14319
|
specialty_embed: "page_embed"
|
|
14204
14320
|
};
|
|
14205
14321
|
function HeroBlock({ block, headingLevel }) {
|
|
14206
14322
|
const { title, subtitle, imageUrl } = block.data;
|
|
14207
|
-
return /* @__PURE__ */
|
|
14208
|
-
/* @__PURE__ */
|
|
14209
|
-
subtitle && /* @__PURE__ */
|
|
14210
|
-
imageUrl && /* @__PURE__ */
|
|
14323
|
+
return /* @__PURE__ */ jsxs14("div", { className: "space-y-4", children: [
|
|
14324
|
+
/* @__PURE__ */ jsx15(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14325
|
+
subtitle && /* @__PURE__ */ jsx15("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14326
|
+
imageUrl && /* @__PURE__ */ jsx15("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx15("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14211
14327
|
] });
|
|
14212
14328
|
}
|
|
14213
14329
|
function RichtextBlock({ block, headingLevel }) {
|
|
14214
|
-
return /* @__PURE__ */
|
|
14330
|
+
return /* @__PURE__ */ jsx15(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14215
14331
|
}
|
|
14216
14332
|
function FaqBlock({ block }) {
|
|
14217
|
-
return /* @__PURE__ */
|
|
14333
|
+
return /* @__PURE__ */ jsx15(FaqAccordion, { items: block.data.items });
|
|
14218
14334
|
}
|
|
14219
14335
|
function StatsBlock({ block }) {
|
|
14220
|
-
return /* @__PURE__ */
|
|
14221
|
-
/* @__PURE__ */
|
|
14222
|
-
/* @__PURE__ */
|
|
14336
|
+
return /* @__PURE__ */ jsx15("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs14("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14337
|
+
/* @__PURE__ */ jsx15("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14338
|
+
/* @__PURE__ */ jsx15("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14223
14339
|
] }, i)) });
|
|
14224
14340
|
}
|
|
14225
14341
|
function TestimonialBlock({ block }) {
|
|
14226
14342
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14227
|
-
return /* @__PURE__ */
|
|
14228
|
-
/* @__PURE__ */
|
|
14229
|
-
/* @__PURE__ */
|
|
14343
|
+
return /* @__PURE__ */ jsxs14("figure", { className: "space-y-4", children: [
|
|
14344
|
+
/* @__PURE__ */ jsx15("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx15("p", { children: quote }) }),
|
|
14345
|
+
/* @__PURE__ */ jsxs14("figcaption", { className: "flex items-center gap-3", children: [
|
|
14230
14346
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14231
|
-
/* @__PURE__ */
|
|
14347
|
+
/* @__PURE__ */ jsx15(
|
|
14232
14348
|
"img",
|
|
14233
14349
|
{
|
|
14234
14350
|
src: avatarUrl,
|
|
@@ -14237,9 +14353,9 @@ function TestimonialBlock({ block }) {
|
|
|
14237
14353
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14238
14354
|
}
|
|
14239
14355
|
),
|
|
14240
|
-
/* @__PURE__ */
|
|
14241
|
-
/* @__PURE__ */
|
|
14242
|
-
role && /* @__PURE__ */
|
|
14356
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
14357
|
+
/* @__PURE__ */ jsx15("span", { className: "font-semibold", children: author }),
|
|
14358
|
+
role && /* @__PURE__ */ jsx15("span", { className: "block text-sm opacity-80", children: role })
|
|
14243
14359
|
] })
|
|
14244
14360
|
] })
|
|
14245
14361
|
] });
|
|
@@ -14248,19 +14364,19 @@ function CtaSlotBlock(_props) {
|
|
|
14248
14364
|
return null;
|
|
14249
14365
|
}
|
|
14250
14366
|
function FeatureListBlock({ block }) {
|
|
14251
|
-
return /* @__PURE__ */
|
|
14367
|
+
return /* @__PURE__ */ jsx15("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx15("li", { children: item.text }, i)) });
|
|
14252
14368
|
}
|
|
14253
14369
|
function GalleryBlock({ block }) {
|
|
14254
14370
|
const { images } = block.data;
|
|
14255
|
-
return /* @__PURE__ */
|
|
14371
|
+
return /* @__PURE__ */ jsx15(
|
|
14256
14372
|
"div",
|
|
14257
14373
|
{
|
|
14258
14374
|
className: cn11(
|
|
14259
14375
|
"grid gap-4",
|
|
14260
14376
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14261
14377
|
),
|
|
14262
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14263
|
-
/* @__PURE__ */
|
|
14378
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs14("figure", { className: "space-y-1", children: [
|
|
14379
|
+
/* @__PURE__ */ jsx15("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx15(
|
|
14264
14380
|
"img",
|
|
14265
14381
|
{
|
|
14266
14382
|
src: img.url,
|
|
@@ -14269,7 +14385,7 @@ function GalleryBlock({ block }) {
|
|
|
14269
14385
|
className: "h-full w-full object-cover"
|
|
14270
14386
|
}
|
|
14271
14387
|
) }),
|
|
14272
|
-
img.caption && /* @__PURE__ */
|
|
14388
|
+
img.caption && /* @__PURE__ */ jsx15("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14273
14389
|
] }, `${img.url}-${i}`))
|
|
14274
14390
|
}
|
|
14275
14391
|
);
|
|
@@ -14279,13 +14395,13 @@ function EmbedCard({
|
|
|
14279
14395
|
headingLevel,
|
|
14280
14396
|
embedHref
|
|
14281
14397
|
}) {
|
|
14282
|
-
return /* @__PURE__ */
|
|
14398
|
+
return /* @__PURE__ */ jsxs14(
|
|
14283
14399
|
"a",
|
|
14284
14400
|
{
|
|
14285
14401
|
href: embedHref(resolved),
|
|
14286
14402
|
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",
|
|
14287
14403
|
children: [
|
|
14288
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14404
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx15("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx15(
|
|
14289
14405
|
"img",
|
|
14290
14406
|
{
|
|
14291
14407
|
src: resolved.coverImageUrl,
|
|
@@ -14294,24 +14410,24 @@ function EmbedCard({
|
|
|
14294
14410
|
className: "h-full w-full object-cover"
|
|
14295
14411
|
}
|
|
14296
14412
|
) }),
|
|
14297
|
-
/* @__PURE__ */
|
|
14298
|
-
/* @__PURE__ */
|
|
14299
|
-
resolved.role && /* @__PURE__ */
|
|
14300
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14413
|
+
/* @__PURE__ */ jsxs14("div", { className: "space-y-1 p-4", children: [
|
|
14414
|
+
/* @__PURE__ */ jsx15(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14415
|
+
resolved.role && /* @__PURE__ */ jsx15("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14416
|
+
resolved.excerpt && /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14301
14417
|
] })
|
|
14302
14418
|
]
|
|
14303
14419
|
}
|
|
14304
14420
|
);
|
|
14305
14421
|
}
|
|
14306
14422
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14307
|
-
return /* @__PURE__ */
|
|
14423
|
+
return /* @__PURE__ */ jsx15(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14308
14424
|
}
|
|
14309
14425
|
function ProfileEmbedBlock({
|
|
14310
14426
|
block,
|
|
14311
14427
|
headingLevel,
|
|
14312
14428
|
embedHref
|
|
14313
14429
|
}) {
|
|
14314
|
-
return /* @__PURE__ */
|
|
14430
|
+
return /* @__PURE__ */ jsx15(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14315
14431
|
}
|
|
14316
14432
|
var DEFAULT_RENDERERS = {
|
|
14317
14433
|
hero: HeroBlock,
|
|
@@ -14368,7 +14484,7 @@ function toIdFragment(value) {
|
|
|
14368
14484
|
function SectionCta2({ cta }) {
|
|
14369
14485
|
if (!hasUsableCta(cta)) return null;
|
|
14370
14486
|
const variant = toButtonVariant(cta.variant);
|
|
14371
|
-
return /* @__PURE__ */
|
|
14487
|
+
return /* @__PURE__ */ jsx15("div", { className: "pt-2", children: /* @__PURE__ */ jsx15(
|
|
14372
14488
|
"a",
|
|
14373
14489
|
{
|
|
14374
14490
|
href: cta.url,
|
|
@@ -14401,7 +14517,7 @@ function PageBlocks({
|
|
|
14401
14517
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14402
14518
|
const background = block.backgroundColor;
|
|
14403
14519
|
return [
|
|
14404
|
-
/* @__PURE__ */
|
|
14520
|
+
/* @__PURE__ */ jsxs14(
|
|
14405
14521
|
"section",
|
|
14406
14522
|
{
|
|
14407
14523
|
"data-slot": "page-block",
|
|
@@ -14410,8 +14526,8 @@ function PageBlocks({
|
|
|
14410
14526
|
style: surfaceStyle(background),
|
|
14411
14527
|
className: cn11("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14412
14528
|
children: [
|
|
14413
|
-
block.heading && /* @__PURE__ */
|
|
14414
|
-
/* @__PURE__ */
|
|
14529
|
+
block.heading && /* @__PURE__ */ jsx15(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx15("span", { id: headingId, children: block.heading }) }),
|
|
14530
|
+
/* @__PURE__ */ jsx15(
|
|
14415
14531
|
Renderer,
|
|
14416
14532
|
{
|
|
14417
14533
|
block,
|
|
@@ -14419,7 +14535,7 @@ function PageBlocks({
|
|
|
14419
14535
|
embedHref
|
|
14420
14536
|
}
|
|
14421
14537
|
),
|
|
14422
|
-
/* @__PURE__ */
|
|
14538
|
+
/* @__PURE__ */ jsx15(SectionCta2, { cta: block.cta })
|
|
14423
14539
|
]
|
|
14424
14540
|
},
|
|
14425
14541
|
block.id
|
|
@@ -14427,12 +14543,12 @@ function PageBlocks({
|
|
|
14427
14543
|
];
|
|
14428
14544
|
});
|
|
14429
14545
|
if (sections.length === 0) return null;
|
|
14430
|
-
return /* @__PURE__ */
|
|
14546
|
+
return /* @__PURE__ */ jsx15("div", { className: cn11("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14431
14547
|
}
|
|
14432
14548
|
|
|
14433
14549
|
// src/components/shop-filters.tsx
|
|
14434
14550
|
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14435
|
-
import { jsx as
|
|
14551
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14436
14552
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14437
14553
|
{ max: 2500 },
|
|
14438
14554
|
{ min: 2500, max: 5e3 },
|
|
@@ -14476,7 +14592,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14476
14592
|
return "";
|
|
14477
14593
|
}
|
|
14478
14594
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14479
|
-
return /* @__PURE__ */
|
|
14595
|
+
return /* @__PURE__ */ jsx16(
|
|
14480
14596
|
"a",
|
|
14481
14597
|
{
|
|
14482
14598
|
href,
|
|
@@ -14494,9 +14610,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14494
14610
|
);
|
|
14495
14611
|
}
|
|
14496
14612
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14497
|
-
return /* @__PURE__ */
|
|
14498
|
-
/* @__PURE__ */
|
|
14499
|
-
/* @__PURE__ */
|
|
14613
|
+
return /* @__PURE__ */ jsxs15("fieldset", { className: "space-y-2", children: [
|
|
14614
|
+
/* @__PURE__ */ jsx16("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14615
|
+
/* @__PURE__ */ jsx16("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14500
14616
|
] });
|
|
14501
14617
|
}
|
|
14502
14618
|
function ShopFilters({
|
|
@@ -14519,11 +14635,11 @@ function ShopFilters({
|
|
|
14519
14635
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14520
14636
|
return null;
|
|
14521
14637
|
}
|
|
14522
|
-
return /* @__PURE__ */
|
|
14638
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn12("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14523
14639
|
visibleTaxonomies.map((axis) => {
|
|
14524
14640
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14525
|
-
return /* @__PURE__ */
|
|
14526
|
-
/* @__PURE__ */
|
|
14641
|
+
return /* @__PURE__ */ jsxs15(FilterFieldset, { legend: axis.label, children: [
|
|
14642
|
+
/* @__PURE__ */ jsx16(
|
|
14527
14643
|
OptionLink,
|
|
14528
14644
|
{
|
|
14529
14645
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14538,7 +14654,7 @@ function ShopFilters({
|
|
|
14538
14654
|
),
|
|
14539
14655
|
axis.terms.map((term) => {
|
|
14540
14656
|
const isActive = activeSlug === term.slug;
|
|
14541
|
-
return /* @__PURE__ */
|
|
14657
|
+
return /* @__PURE__ */ jsx16(
|
|
14542
14658
|
OptionLink,
|
|
14543
14659
|
{
|
|
14544
14660
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14558,9 +14674,9 @@ function ShopFilters({
|
|
|
14558
14674
|
}),
|
|
14559
14675
|
visibleAttributes.map((attr) => {
|
|
14560
14676
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14561
|
-
return /* @__PURE__ */
|
|
14677
|
+
return /* @__PURE__ */ jsx16(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14562
14678
|
const isActive = activeValues.includes(opt.value);
|
|
14563
|
-
return /* @__PURE__ */
|
|
14679
|
+
return /* @__PURE__ */ jsx16(
|
|
14564
14680
|
OptionLink,
|
|
14565
14681
|
{
|
|
14566
14682
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14578,11 +14694,11 @@ function ShopFilters({
|
|
|
14578
14694
|
);
|
|
14579
14695
|
}) }, attr.key);
|
|
14580
14696
|
}),
|
|
14581
|
-
showPriceGroup && /* @__PURE__ */
|
|
14697
|
+
showPriceGroup && /* @__PURE__ */ jsx16(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14582
14698
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14583
14699
|
const nextMin = isActive ? void 0 : band.min;
|
|
14584
14700
|
const nextMax = isActive ? void 0 : band.max;
|
|
14585
|
-
return /* @__PURE__ */
|
|
14701
|
+
return /* @__PURE__ */ jsx16(
|
|
14586
14702
|
OptionLink,
|
|
14587
14703
|
{
|
|
14588
14704
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14593,7 +14709,7 @@ function ShopFilters({
|
|
|
14593
14709
|
i
|
|
14594
14710
|
);
|
|
14595
14711
|
}) }),
|
|
14596
|
-
hasOnSale && /* @__PURE__ */
|
|
14712
|
+
hasOnSale && /* @__PURE__ */ jsx16(
|
|
14597
14713
|
OptionLink,
|
|
14598
14714
|
{
|
|
14599
14715
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14602,7 +14718,7 @@ function ShopFilters({
|
|
|
14602
14718
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14603
14719
|
}
|
|
14604
14720
|
),
|
|
14605
|
-
/* @__PURE__ */
|
|
14721
|
+
/* @__PURE__ */ jsx16(
|
|
14606
14722
|
"a",
|
|
14607
14723
|
{
|
|
14608
14724
|
href: hrefs.clearAll(),
|
|
@@ -14619,7 +14735,7 @@ function ShopFilters({
|
|
|
14619
14735
|
|
|
14620
14736
|
// src/components/cart-line-list.tsx
|
|
14621
14737
|
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14622
|
-
import { jsx as
|
|
14738
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14623
14739
|
var DEFAULT_LABELS2 = {
|
|
14624
14740
|
quantityLabel: "Cantidad",
|
|
14625
14741
|
decrease: "Reducir cantidad",
|
|
@@ -14645,9 +14761,9 @@ function CartLineList({
|
|
|
14645
14761
|
}) {
|
|
14646
14762
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14647
14763
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14648
|
-
return /* @__PURE__ */
|
|
14649
|
-
/* @__PURE__ */
|
|
14650
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14764
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn13("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14765
|
+
/* @__PURE__ */ jsx17("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14766
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx17(
|
|
14651
14767
|
"div",
|
|
14652
14768
|
{
|
|
14653
14769
|
role: "status",
|
|
@@ -14656,33 +14772,33 @@ function CartLineList({
|
|
|
14656
14772
|
children: noticeContent
|
|
14657
14773
|
}
|
|
14658
14774
|
),
|
|
14659
|
-
/* @__PURE__ */
|
|
14775
|
+
/* @__PURE__ */ jsx17("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14660
14776
|
const maxQty = item.maxStock ?? Infinity;
|
|
14661
14777
|
const atMax = item.quantity >= maxQty;
|
|
14662
14778
|
const atMin = item.quantity <= 1;
|
|
14663
14779
|
const message = lineMessage?.(item);
|
|
14664
|
-
return /* @__PURE__ */
|
|
14780
|
+
return /* @__PURE__ */ jsxs16(
|
|
14665
14781
|
"li",
|
|
14666
14782
|
{
|
|
14667
14783
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14668
14784
|
children: [
|
|
14669
|
-
/* @__PURE__ */
|
|
14670
|
-
/* @__PURE__ */
|
|
14671
|
-
/* @__PURE__ */
|
|
14672
|
-
item.variantName && /* @__PURE__ */
|
|
14673
|
-
/* @__PURE__ */
|
|
14785
|
+
/* @__PURE__ */ jsx17("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx17("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14786
|
+
/* @__PURE__ */ jsxs16("div", { className: "min-w-0 flex-1", children: [
|
|
14787
|
+
/* @__PURE__ */ jsx17("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14788
|
+
item.variantName && /* @__PURE__ */ jsx17("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14789
|
+
/* @__PURE__ */ jsxs16("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14674
14790
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14675
14791
|
" ",
|
|
14676
14792
|
t.unitPriceSuffix
|
|
14677
14793
|
] }),
|
|
14678
|
-
/* @__PURE__ */
|
|
14794
|
+
/* @__PURE__ */ jsxs16(
|
|
14679
14795
|
"div",
|
|
14680
14796
|
{
|
|
14681
14797
|
role: "group",
|
|
14682
14798
|
"aria-label": t.quantityLabel,
|
|
14683
14799
|
className: "mt-3 flex items-center gap-3",
|
|
14684
14800
|
children: [
|
|
14685
|
-
/* @__PURE__ */
|
|
14801
|
+
/* @__PURE__ */ jsx17(
|
|
14686
14802
|
"button",
|
|
14687
14803
|
{
|
|
14688
14804
|
type: "button",
|
|
@@ -14693,8 +14809,8 @@ function CartLineList({
|
|
|
14693
14809
|
children: "\u2212"
|
|
14694
14810
|
}
|
|
14695
14811
|
),
|
|
14696
|
-
/* @__PURE__ */
|
|
14697
|
-
/* @__PURE__ */
|
|
14812
|
+
/* @__PURE__ */ jsx17("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14813
|
+
/* @__PURE__ */ jsx17(
|
|
14698
14814
|
"button",
|
|
14699
14815
|
{
|
|
14700
14816
|
type: "button",
|
|
@@ -14705,7 +14821,7 @@ function CartLineList({
|
|
|
14705
14821
|
children: "+"
|
|
14706
14822
|
}
|
|
14707
14823
|
),
|
|
14708
|
-
onRemove && /* @__PURE__ */
|
|
14824
|
+
onRemove && /* @__PURE__ */ jsx17(
|
|
14709
14825
|
"button",
|
|
14710
14826
|
{
|
|
14711
14827
|
type: "button",
|
|
@@ -14718,7 +14834,7 @@ function CartLineList({
|
|
|
14718
14834
|
]
|
|
14719
14835
|
}
|
|
14720
14836
|
),
|
|
14721
|
-
message != null && message !== false && /* @__PURE__ */
|
|
14837
|
+
message != null && message !== false && /* @__PURE__ */ jsx17(
|
|
14722
14838
|
"p",
|
|
14723
14839
|
{
|
|
14724
14840
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -14727,7 +14843,7 @@ function CartLineList({
|
|
|
14727
14843
|
}
|
|
14728
14844
|
)
|
|
14729
14845
|
] }),
|
|
14730
|
-
/* @__PURE__ */
|
|
14846
|
+
/* @__PURE__ */ jsx17("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx17("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14731
14847
|
]
|
|
14732
14848
|
},
|
|
14733
14849
|
lineKey(item.productId, item.variantId)
|
|
@@ -14738,7 +14854,7 @@ function CartLineList({
|
|
|
14738
14854
|
|
|
14739
14855
|
// src/components/cart-summary.tsx
|
|
14740
14856
|
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14741
|
-
import { jsx as
|
|
14857
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14742
14858
|
var DEFAULT_LABELS3 = {
|
|
14743
14859
|
subtotal: "Subtotal",
|
|
14744
14860
|
discountPrefix: "Descuento",
|
|
@@ -14746,12 +14862,14 @@ var DEFAULT_LABELS3 = {
|
|
|
14746
14862
|
freeShipping: "Env\xEDo gratis",
|
|
14747
14863
|
shippingCalculated: "Se calcula en el pago",
|
|
14748
14864
|
total: "Total",
|
|
14749
|
-
cancelledNotice: "Pago cancelado: tu carrito sigue aqu\xED"
|
|
14865
|
+
cancelledNotice: "Pago cancelado: tu carrito sigue aqu\xED",
|
|
14866
|
+
staffDiscountApplied: "Descuento de personal aplicado"
|
|
14750
14867
|
};
|
|
14751
14868
|
function CartSummary({
|
|
14752
14869
|
subtotal,
|
|
14753
14870
|
discount,
|
|
14754
14871
|
discountCode,
|
|
14872
|
+
autoDiscount,
|
|
14755
14873
|
shipping,
|
|
14756
14874
|
shippingEnabled,
|
|
14757
14875
|
total,
|
|
@@ -14762,43 +14880,41 @@ function CartSummary({
|
|
|
14762
14880
|
className
|
|
14763
14881
|
}) {
|
|
14764
14882
|
const t = { ...DEFAULT_LABELS3, ...labels };
|
|
14765
|
-
const
|
|
14883
|
+
const discountAmount = discount ?? autoDiscount?.amount;
|
|
14884
|
+
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
14766
14885
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14767
14886
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14768
|
-
const breakdown = /* @__PURE__ */
|
|
14887
|
+
const breakdown = /* @__PURE__ */ jsxs17(
|
|
14769
14888
|
"dl",
|
|
14770
14889
|
{
|
|
14771
14890
|
className: cn14("space-y-2 text-sm", !hasNotice && className),
|
|
14772
14891
|
"data-slot": "cart-summary",
|
|
14773
14892
|
children: [
|
|
14774
|
-
/* @__PURE__ */
|
|
14775
|
-
/* @__PURE__ */
|
|
14776
|
-
/* @__PURE__ */
|
|
14893
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14894
|
+
/* @__PURE__ */ jsx18("dt", { children: t.subtotal }),
|
|
14895
|
+
/* @__PURE__ */ jsx18("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14777
14896
|
] }),
|
|
14778
|
-
hasDiscount && /* @__PURE__ */
|
|
14779
|
-
/* @__PURE__ */
|
|
14780
|
-
|
|
14781
|
-
discountCode ? ` (${discountCode})` : ""
|
|
14782
|
-
] }),
|
|
14783
|
-
/* @__PURE__ */ jsxs16("dd", { children: [
|
|
14897
|
+
hasDiscount && /* @__PURE__ */ jsxs17("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14898
|
+
/* @__PURE__ */ jsx18("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
14899
|
+
/* @__PURE__ */ jsxs17("dd", { children: [
|
|
14784
14900
|
"-",
|
|
14785
|
-
formatPrice(
|
|
14901
|
+
formatPrice(discountAmount, currencyCode, locale)
|
|
14786
14902
|
] })
|
|
14787
14903
|
] }),
|
|
14788
|
-
shippingEnabled && /* @__PURE__ */
|
|
14789
|
-
/* @__PURE__ */
|
|
14790
|
-
/* @__PURE__ */
|
|
14904
|
+
shippingEnabled && /* @__PURE__ */ jsxs17("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14905
|
+
/* @__PURE__ */ jsx18("dt", { children: t.shipping }),
|
|
14906
|
+
/* @__PURE__ */ jsx18("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14791
14907
|
] }),
|
|
14792
|
-
/* @__PURE__ */
|
|
14793
|
-
/* @__PURE__ */
|
|
14794
|
-
/* @__PURE__ */
|
|
14908
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14909
|
+
/* @__PURE__ */ jsx18("dt", { children: t.total }),
|
|
14910
|
+
/* @__PURE__ */ jsx18("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14795
14911
|
] })
|
|
14796
14912
|
]
|
|
14797
14913
|
}
|
|
14798
14914
|
);
|
|
14799
14915
|
if (!hasNotice) return breakdown;
|
|
14800
|
-
return /* @__PURE__ */
|
|
14801
|
-
/* @__PURE__ */
|
|
14916
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn14("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14917
|
+
/* @__PURE__ */ jsx18(
|
|
14802
14918
|
"div",
|
|
14803
14919
|
{
|
|
14804
14920
|
role: "status",
|
|
@@ -14813,7 +14929,7 @@ function CartSummary({
|
|
|
14813
14929
|
|
|
14814
14930
|
// src/components/cart-adjustments-notice.tsx
|
|
14815
14931
|
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14816
|
-
import { jsx as
|
|
14932
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
14817
14933
|
var DEFAULT_LABELS4 = {
|
|
14818
14934
|
removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
|
|
14819
14935
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -14847,20 +14963,20 @@ function CartAdjustmentsNotice({
|
|
|
14847
14963
|
);
|
|
14848
14964
|
}
|
|
14849
14965
|
if (messages.length === 0) return null;
|
|
14850
|
-
return /* @__PURE__ */
|
|
14966
|
+
return /* @__PURE__ */ jsx19(
|
|
14851
14967
|
"div",
|
|
14852
14968
|
{
|
|
14853
14969
|
role: "status",
|
|
14854
14970
|
className: cn15("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
14855
14971
|
"data-slot": "cart-adjustments-notice",
|
|
14856
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
14972
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx19("p", { children: messages[0] }) : /* @__PURE__ */ jsx19("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx19("li", { children: message }, index)) })
|
|
14857
14973
|
}
|
|
14858
14974
|
);
|
|
14859
14975
|
}
|
|
14860
14976
|
|
|
14861
14977
|
// src/components/added-to-cart-toast.tsx
|
|
14862
14978
|
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14863
|
-
import { jsx as
|
|
14979
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14864
14980
|
var DEFAULT_LABELS5 = {
|
|
14865
14981
|
success: "A\xF1adido al carrito",
|
|
14866
14982
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -14880,7 +14996,7 @@ function AddedToCartToast({
|
|
|
14880
14996
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14881
14997
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14882
14998
|
const variant = status === "success" ? "success" : "error";
|
|
14883
|
-
return /* @__PURE__ */
|
|
14999
|
+
return /* @__PURE__ */ jsxs18(
|
|
14884
15000
|
"div",
|
|
14885
15001
|
{
|
|
14886
15002
|
"data-slot": "added-to-cart-toast",
|
|
@@ -14893,12 +15009,12 @@ function AddedToCartToast({
|
|
|
14893
15009
|
),
|
|
14894
15010
|
children: [
|
|
14895
15011
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14896
|
-
/* @__PURE__ */
|
|
14897
|
-
/* @__PURE__ */
|
|
14898
|
-
/* @__PURE__ */
|
|
14899
|
-
/* @__PURE__ */
|
|
15012
|
+
/* @__PURE__ */ jsx20("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15013
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0 flex-1", children: [
|
|
15014
|
+
/* @__PURE__ */ jsx20("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15015
|
+
/* @__PURE__ */ jsx20("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14900
15016
|
] }),
|
|
14901
|
-
/* @__PURE__ */
|
|
15017
|
+
/* @__PURE__ */ jsx20("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx20("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14902
15018
|
]
|
|
14903
15019
|
}
|
|
14904
15020
|
);
|
|
@@ -14906,7 +15022,7 @@ function AddedToCartToast({
|
|
|
14906
15022
|
|
|
14907
15023
|
// src/components/checkout-login-prompt.tsx
|
|
14908
15024
|
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
14909
|
-
import { Fragment as Fragment3, jsx as
|
|
15025
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
14910
15026
|
var DEFAULT_LABELS6 = {
|
|
14911
15027
|
title: "Identificaci\xF3n",
|
|
14912
15028
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14933,9 +15049,9 @@ function CheckoutLoginPrompt({
|
|
|
14933
15049
|
if (!open) return null;
|
|
14934
15050
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
14935
15051
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14936
|
-
return /* @__PURE__ */
|
|
14937
|
-
/* @__PURE__ */
|
|
14938
|
-
/* @__PURE__ */
|
|
15052
|
+
return /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
15053
|
+
/* @__PURE__ */ jsx21("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15054
|
+
/* @__PURE__ */ jsxs19(
|
|
14939
15055
|
"div",
|
|
14940
15056
|
{
|
|
14941
15057
|
role: "dialog",
|
|
@@ -14947,12 +15063,12 @@ function CheckoutLoginPrompt({
|
|
|
14947
15063
|
className
|
|
14948
15064
|
),
|
|
14949
15065
|
children: [
|
|
14950
|
-
/* @__PURE__ */
|
|
14951
|
-
/* @__PURE__ */
|
|
14952
|
-
/* @__PURE__ */
|
|
14953
|
-
/* @__PURE__ */
|
|
15066
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15067
|
+
/* @__PURE__ */ jsxs19("div", { children: [
|
|
15068
|
+
/* @__PURE__ */ jsx21("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15069
|
+
/* @__PURE__ */ jsx21("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14954
15070
|
] }),
|
|
14955
|
-
/* @__PURE__ */
|
|
15071
|
+
/* @__PURE__ */ jsx21(
|
|
14956
15072
|
"button",
|
|
14957
15073
|
{
|
|
14958
15074
|
type: "button",
|
|
@@ -14963,9 +15079,9 @@ function CheckoutLoginPrompt({
|
|
|
14963
15079
|
}
|
|
14964
15080
|
)
|
|
14965
15081
|
] }),
|
|
14966
|
-
/* @__PURE__ */
|
|
14967
|
-
/* @__PURE__ */
|
|
14968
|
-
/* @__PURE__ */
|
|
15082
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-2", children: [
|
|
15083
|
+
/* @__PURE__ */ jsx21("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15084
|
+
/* @__PURE__ */ jsx21(
|
|
14969
15085
|
"input",
|
|
14970
15086
|
{
|
|
14971
15087
|
id: "checkout-login-prompt-email",
|
|
@@ -14980,10 +15096,10 @@ function CheckoutLoginPrompt({
|
|
|
14980
15096
|
)
|
|
14981
15097
|
}
|
|
14982
15098
|
),
|
|
14983
|
-
error && /* @__PURE__ */
|
|
15099
|
+
error && /* @__PURE__ */ jsx21("p", { className: "text-xs text-destructive", children: error })
|
|
14984
15100
|
] }),
|
|
14985
|
-
/* @__PURE__ */
|
|
14986
|
-
/* @__PURE__ */
|
|
15101
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-2", children: [
|
|
15102
|
+
/* @__PURE__ */ jsx21(
|
|
14987
15103
|
"button",
|
|
14988
15104
|
{
|
|
14989
15105
|
type: "button",
|
|
@@ -14996,7 +15112,7 @@ function CheckoutLoginPrompt({
|
|
|
14996
15112
|
children: checking ? t.checking : t.continueWithEmail
|
|
14997
15113
|
}
|
|
14998
15114
|
),
|
|
14999
|
-
/* @__PURE__ */
|
|
15115
|
+
/* @__PURE__ */ jsx21(
|
|
15000
15116
|
"button",
|
|
15001
15117
|
{
|
|
15002
15118
|
type: "button",
|
|
@@ -15015,7 +15131,7 @@ function CheckoutLoginPrompt({
|
|
|
15015
15131
|
// src/components/checkout-form.tsx
|
|
15016
15132
|
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15017
15133
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
15018
|
-
import { Fragment as Fragment4, jsx as
|
|
15134
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15019
15135
|
var DEFAULT_LABELS7 = {
|
|
15020
15136
|
contactTitle: "Datos de contacto",
|
|
15021
15137
|
nameLabel: "Nombre completo",
|
|
@@ -15029,6 +15145,7 @@ var DEFAULT_LABELS7 = {
|
|
|
15029
15145
|
applyingDiscount: "Aplicando\u2026",
|
|
15030
15146
|
removeDiscount: "Quitar",
|
|
15031
15147
|
discountAppliedSuffix: (amount) => `\u2014 ${amount} de descuento`,
|
|
15148
|
+
staffDiscountApplied: "Descuento de personal aplicado",
|
|
15032
15149
|
submit: "Confirmar y pagar",
|
|
15033
15150
|
submitting: "Procesando\u2026"
|
|
15034
15151
|
};
|
|
@@ -15043,6 +15160,7 @@ function CheckoutForm({
|
|
|
15043
15160
|
onApplyDiscount,
|
|
15044
15161
|
onRemoveDiscount,
|
|
15045
15162
|
appliedDiscount,
|
|
15163
|
+
autoDiscount,
|
|
15046
15164
|
discountApplying,
|
|
15047
15165
|
discountError,
|
|
15048
15166
|
loginPrompt,
|
|
@@ -15069,9 +15187,9 @@ function CheckoutForm({
|
|
|
15069
15187
|
event.preventDefault();
|
|
15070
15188
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15071
15189
|
}
|
|
15072
|
-
return /* @__PURE__ */
|
|
15190
|
+
return /* @__PURE__ */ jsxs20(Fragment4, { children: [
|
|
15073
15191
|
loginPrompt,
|
|
15074
|
-
/* @__PURE__ */
|
|
15192
|
+
/* @__PURE__ */ jsxs20(
|
|
15075
15193
|
"form",
|
|
15076
15194
|
{
|
|
15077
15195
|
"data-testid": "checkout-form",
|
|
@@ -15079,12 +15197,12 @@ function CheckoutForm({
|
|
|
15079
15197
|
className: cn18("space-y-8", className),
|
|
15080
15198
|
"data-slot": "checkout-form",
|
|
15081
15199
|
children: [
|
|
15082
|
-
/* @__PURE__ */
|
|
15083
|
-
/* @__PURE__ */
|
|
15084
|
-
/* @__PURE__ */
|
|
15085
|
-
/* @__PURE__ */
|
|
15086
|
-
/* @__PURE__ */
|
|
15087
|
-
/* @__PURE__ */
|
|
15200
|
+
/* @__PURE__ */ jsxs20("section", { className: "space-y-4", children: [
|
|
15201
|
+
/* @__PURE__ */ jsx22("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15202
|
+
/* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15203
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15204
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15205
|
+
/* @__PURE__ */ jsx22(
|
|
15088
15206
|
"input",
|
|
15089
15207
|
{
|
|
15090
15208
|
id: "checkout-form-name",
|
|
@@ -15099,11 +15217,11 @@ function CheckoutForm({
|
|
|
15099
15217
|
)
|
|
15100
15218
|
}
|
|
15101
15219
|
),
|
|
15102
|
-
contactErrors?.name && /* @__PURE__ */
|
|
15220
|
+
contactErrors?.name && /* @__PURE__ */ jsx22("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15103
15221
|
] }),
|
|
15104
|
-
/* @__PURE__ */
|
|
15105
|
-
/* @__PURE__ */
|
|
15106
|
-
/* @__PURE__ */
|
|
15222
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15223
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15224
|
+
/* @__PURE__ */ jsx22(
|
|
15107
15225
|
"input",
|
|
15108
15226
|
{
|
|
15109
15227
|
id: "checkout-form-email",
|
|
@@ -15118,9 +15236,9 @@ function CheckoutForm({
|
|
|
15118
15236
|
)
|
|
15119
15237
|
}
|
|
15120
15238
|
),
|
|
15121
|
-
contactErrors?.email && /* @__PURE__ */
|
|
15239
|
+
contactErrors?.email && /* @__PURE__ */ jsx22("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15122
15240
|
] }),
|
|
15123
|
-
/* @__PURE__ */
|
|
15241
|
+
/* @__PURE__ */ jsx22("div", { className: "space-y-1", children: /* @__PURE__ */ jsx22(
|
|
15124
15242
|
PhoneInput,
|
|
15125
15243
|
{
|
|
15126
15244
|
id: "checkout-form-phone",
|
|
@@ -15134,15 +15252,26 @@ function CheckoutForm({
|
|
|
15134
15252
|
] })
|
|
15135
15253
|
] }),
|
|
15136
15254
|
children2,
|
|
15137
|
-
generalError ? /* @__PURE__ */
|
|
15138
|
-
/* @__PURE__ */
|
|
15139
|
-
/* @__PURE__ */
|
|
15140
|
-
|
|
15141
|
-
|
|
15142
|
-
|
|
15143
|
-
|
|
15255
|
+
generalError ? /* @__PURE__ */ jsx22("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15256
|
+
/* @__PURE__ */ jsxs20("section", { className: "space-y-3", children: [
|
|
15257
|
+
/* @__PURE__ */ jsx22("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15258
|
+
autoDiscount ? /* @__PURE__ */ jsxs20(
|
|
15259
|
+
"div",
|
|
15260
|
+
{
|
|
15261
|
+
className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
|
|
15262
|
+
"data-slot": "checkout-staff-discount",
|
|
15263
|
+
children: [
|
|
15264
|
+
/* @__PURE__ */ jsx22("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
15265
|
+
/* @__PURE__ */ jsx22("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
15266
|
+
]
|
|
15267
|
+
}
|
|
15268
|
+
) : null,
|
|
15269
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs20("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: [
|
|
15270
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15271
|
+
/* @__PURE__ */ jsx22("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15272
|
+
/* @__PURE__ */ jsx22("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15144
15273
|
] }),
|
|
15145
|
-
/* @__PURE__ */
|
|
15274
|
+
/* @__PURE__ */ jsx22(
|
|
15146
15275
|
"button",
|
|
15147
15276
|
{
|
|
15148
15277
|
type: "button",
|
|
@@ -15152,9 +15281,9 @@ function CheckoutForm({
|
|
|
15152
15281
|
children: t.removeDiscount
|
|
15153
15282
|
}
|
|
15154
15283
|
)
|
|
15155
|
-
] }) : /* @__PURE__ */
|
|
15156
|
-
/* @__PURE__ */
|
|
15157
|
-
/* @__PURE__ */
|
|
15284
|
+
] }) : /* @__PURE__ */ jsxs20("div", { className: "flex gap-2", children: [
|
|
15285
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15286
|
+
/* @__PURE__ */ jsx22(
|
|
15158
15287
|
"input",
|
|
15159
15288
|
{
|
|
15160
15289
|
id: "checkout-form-discount-code",
|
|
@@ -15166,7 +15295,7 @@ function CheckoutForm({
|
|
|
15166
15295
|
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"
|
|
15167
15296
|
}
|
|
15168
15297
|
),
|
|
15169
|
-
/* @__PURE__ */
|
|
15298
|
+
/* @__PURE__ */ jsx22(
|
|
15170
15299
|
"button",
|
|
15171
15300
|
{
|
|
15172
15301
|
type: "button",
|
|
@@ -15177,9 +15306,9 @@ function CheckoutForm({
|
|
|
15177
15306
|
}
|
|
15178
15307
|
)
|
|
15179
15308
|
] }),
|
|
15180
|
-
discountError && /* @__PURE__ */
|
|
15309
|
+
discountError && /* @__PURE__ */ jsx22("p", { className: "text-xs text-destructive", children: discountError })
|
|
15181
15310
|
] }),
|
|
15182
|
-
/* @__PURE__ */
|
|
15311
|
+
/* @__PURE__ */ jsx22(
|
|
15183
15312
|
"button",
|
|
15184
15313
|
{
|
|
15185
15314
|
type: "submit",
|
|
@@ -15202,7 +15331,7 @@ import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
|
15202
15331
|
|
|
15203
15332
|
// src/components/order-invoice-link.tsx
|
|
15204
15333
|
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
15205
|
-
import { jsx as
|
|
15334
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15206
15335
|
var DEFAULT_LABELS8 = {
|
|
15207
15336
|
linkLabel: "Descargar la factura {number}",
|
|
15208
15337
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15210,8 +15339,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15210
15339
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15211
15340
|
if (!invoice) return null;
|
|
15212
15341
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15213
|
-
return /* @__PURE__ */
|
|
15214
|
-
/* @__PURE__ */
|
|
15342
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn19("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15343
|
+
/* @__PURE__ */ jsx23(
|
|
15215
15344
|
"a",
|
|
15216
15345
|
{
|
|
15217
15346
|
href: invoice.url,
|
|
@@ -15219,17 +15348,19 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15219
15348
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15220
15349
|
}
|
|
15221
15350
|
),
|
|
15222
|
-
/* @__PURE__ */
|
|
15351
|
+
/* @__PURE__ */ jsx23("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15223
15352
|
] });
|
|
15224
15353
|
}
|
|
15225
15354
|
|
|
15226
15355
|
// src/components/order-confirmation.tsx
|
|
15227
|
-
import { jsx as
|
|
15356
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15228
15357
|
var DEFAULT_LABELS9 = {
|
|
15229
15358
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15230
15359
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
15231
15360
|
foundTitle: "\xA1Pedido confirmado!",
|
|
15232
|
-
|
|
15361
|
+
// REB-1085: every buyer gets a customer account; the order email carries
|
|
15362
|
+
// the access link. Files are never served from this page.
|
|
15363
|
+
foundDescription: "Te hemos enviado un email con tu acceso.",
|
|
15233
15364
|
timeoutTitle: "Pago recibido",
|
|
15234
15365
|
timeoutDescription: "Tu pago se ha procesado. Recibir\xE1s un email de confirmaci\xF3n en breve.",
|
|
15235
15366
|
orderNumberLabel: "Pedido confirmado",
|
|
@@ -15288,43 +15419,43 @@ function OrderConfirmation({
|
|
|
15288
15419
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15289
15420
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15290
15421
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15291
|
-
return /* @__PURE__ */
|
|
15292
|
-
/* @__PURE__ */
|
|
15293
|
-
/* @__PURE__ */
|
|
15294
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
15295
|
-
/* @__PURE__ */
|
|
15296
|
-
/* @__PURE__ */
|
|
15297
|
-
/* @__PURE__ */
|
|
15422
|
+
return /* @__PURE__ */ jsxs22("div", { className: cn20("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15423
|
+
/* @__PURE__ */ jsx24("h1", { className: "text-3xl font-bold", children: title }),
|
|
15424
|
+
/* @__PURE__ */ jsx24("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15425
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs22("div", { className: "space-y-6", children: [
|
|
15426
|
+
/* @__PURE__ */ jsxs22("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15427
|
+
/* @__PURE__ */ jsx24("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15428
|
+
/* @__PURE__ */ jsx24("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15298
15429
|
] }),
|
|
15299
|
-
/* @__PURE__ */
|
|
15300
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15430
|
+
/* @__PURE__ */ jsxs22("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15431
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs22(
|
|
15301
15432
|
"div",
|
|
15302
15433
|
{
|
|
15303
15434
|
className: "flex justify-between gap-4 text-sm",
|
|
15304
15435
|
children: [
|
|
15305
|
-
/* @__PURE__ */
|
|
15436
|
+
/* @__PURE__ */ jsxs22("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15306
15437
|
item.product.name,
|
|
15307
15438
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15308
15439
|
" x",
|
|
15309
15440
|
item.quantity
|
|
15310
15441
|
] }),
|
|
15311
|
-
/* @__PURE__ */
|
|
15442
|
+
/* @__PURE__ */ jsx24("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15312
15443
|
]
|
|
15313
15444
|
},
|
|
15314
15445
|
idx
|
|
15315
15446
|
)),
|
|
15316
|
-
/* @__PURE__ */
|
|
15317
|
-
/* @__PURE__ */
|
|
15318
|
-
/* @__PURE__ */
|
|
15447
|
+
/* @__PURE__ */ jsx24("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs22("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15448
|
+
/* @__PURE__ */ jsx24("span", { children: t.totalLabel }),
|
|
15449
|
+
/* @__PURE__ */ jsx24("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15319
15450
|
] }) })
|
|
15320
15451
|
] }),
|
|
15321
|
-
/* @__PURE__ */
|
|
15452
|
+
/* @__PURE__ */ jsxs22("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15322
15453
|
t.confirmationEmailPrefix,
|
|
15323
15454
|
" ",
|
|
15324
|
-
/* @__PURE__ */
|
|
15455
|
+
/* @__PURE__ */ jsx24("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15325
15456
|
"."
|
|
15326
15457
|
] }),
|
|
15327
|
-
/* @__PURE__ */
|
|
15458
|
+
/* @__PURE__ */ jsx24(
|
|
15328
15459
|
OrderInvoiceLink,
|
|
15329
15460
|
{
|
|
15330
15461
|
invoice: order.invoice,
|
|
@@ -15332,11 +15463,11 @@ function OrderConfirmation({
|
|
|
15332
15463
|
}
|
|
15333
15464
|
)
|
|
15334
15465
|
] }),
|
|
15335
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15336
|
-
/* @__PURE__ */
|
|
15337
|
-
/* @__PURE__ */
|
|
15466
|
+
showOrderReference && order && /* @__PURE__ */ jsxs22("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15467
|
+
/* @__PURE__ */ jsx24("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15468
|
+
/* @__PURE__ */ jsx24("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15338
15469
|
] }),
|
|
15339
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15470
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx24(
|
|
15340
15471
|
"a",
|
|
15341
15472
|
{
|
|
15342
15473
|
href: cartHref,
|
|
@@ -15344,7 +15475,7 @@ function OrderConfirmation({
|
|
|
15344
15475
|
children: t.backToCartLabel
|
|
15345
15476
|
}
|
|
15346
15477
|
),
|
|
15347
|
-
showRecheck && /* @__PURE__ */
|
|
15478
|
+
showRecheck && /* @__PURE__ */ jsx24(
|
|
15348
15479
|
"button",
|
|
15349
15480
|
{
|
|
15350
15481
|
type: "button",
|
|
@@ -15353,16 +15484,16 @@ function OrderConfirmation({
|
|
|
15353
15484
|
children: t.recheckLabel
|
|
15354
15485
|
}
|
|
15355
15486
|
),
|
|
15356
|
-
showSessionReference && /* @__PURE__ */
|
|
15357
|
-
/* @__PURE__ */
|
|
15358
|
-
/* @__PURE__ */
|
|
15487
|
+
showSessionReference && /* @__PURE__ */ jsxs22("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15488
|
+
/* @__PURE__ */ jsx24("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15489
|
+
/* @__PURE__ */ jsx24("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15359
15490
|
] })
|
|
15360
15491
|
] });
|
|
15361
15492
|
}
|
|
15362
15493
|
|
|
15363
15494
|
// src/components/full-invoice-fields.tsx
|
|
15364
15495
|
import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
15365
|
-
import { jsx as
|
|
15496
|
+
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
15366
15497
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15367
15498
|
wantsFullInvoice: false,
|
|
15368
15499
|
billingIdType: "NIF",
|
|
@@ -15479,12 +15610,12 @@ function FullInvoiceFields({
|
|
|
15479
15610
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15480
15611
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15481
15612
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15482
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15613
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx25("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15483
15614
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15484
|
-
return /* @__PURE__ */
|
|
15485
|
-
overCap ? /* @__PURE__ */
|
|
15486
|
-
/* @__PURE__ */
|
|
15487
|
-
/* @__PURE__ */
|
|
15615
|
+
return /* @__PURE__ */ jsxs23("section", { className: cn21("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15616
|
+
overCap ? /* @__PURE__ */ jsx25("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15617
|
+
/* @__PURE__ */ jsxs23("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15618
|
+
/* @__PURE__ */ jsx25(
|
|
15488
15619
|
"input",
|
|
15489
15620
|
{
|
|
15490
15621
|
type: "checkbox",
|
|
@@ -15494,12 +15625,12 @@ function FullInvoiceFields({
|
|
|
15494
15625
|
),
|
|
15495
15626
|
t.toggle
|
|
15496
15627
|
] }),
|
|
15497
|
-
/* @__PURE__ */
|
|
15628
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15498
15629
|
] }),
|
|
15499
|
-
showFields && /* @__PURE__ */
|
|
15500
|
-
/* @__PURE__ */
|
|
15501
|
-
/* @__PURE__ */
|
|
15502
|
-
/* @__PURE__ */
|
|
15630
|
+
showFields && /* @__PURE__ */ jsxs23("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15631
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15632
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15633
|
+
/* @__PURE__ */ jsx25(
|
|
15503
15634
|
"select",
|
|
15504
15635
|
{
|
|
15505
15636
|
id: "full-invoice-id-type",
|
|
@@ -15508,14 +15639,14 @@ function FullInvoiceFields({
|
|
|
15508
15639
|
value: value.billingIdType,
|
|
15509
15640
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15510
15641
|
...invalid2("billingIdType"),
|
|
15511
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15642
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx25("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15512
15643
|
}
|
|
15513
15644
|
),
|
|
15514
15645
|
error("billingIdType")
|
|
15515
15646
|
] }),
|
|
15516
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15517
|
-
/* @__PURE__ */
|
|
15518
|
-
/* @__PURE__ */
|
|
15647
|
+
!isSpanishNif && /* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15648
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15649
|
+
/* @__PURE__ */ jsxs23(
|
|
15519
15650
|
"select",
|
|
15520
15651
|
{
|
|
15521
15652
|
id: "full-invoice-id-country",
|
|
@@ -15525,16 +15656,16 @@ function FullInvoiceFields({
|
|
|
15525
15656
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15526
15657
|
...invalid2("billingIdCountry"),
|
|
15527
15658
|
children: [
|
|
15528
|
-
/* @__PURE__ */
|
|
15529
|
-
countries.map((c) => /* @__PURE__ */
|
|
15659
|
+
/* @__PURE__ */ jsx25("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15660
|
+
countries.map((c) => /* @__PURE__ */ jsx25("option", { value: c.code, children: c.name }, c.code))
|
|
15530
15661
|
]
|
|
15531
15662
|
}
|
|
15532
15663
|
),
|
|
15533
15664
|
error("billingIdCountry")
|
|
15534
15665
|
] }),
|
|
15535
|
-
/* @__PURE__ */
|
|
15536
|
-
/* @__PURE__ */
|
|
15537
|
-
/* @__PURE__ */
|
|
15666
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15667
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15668
|
+
/* @__PURE__ */ jsx25(
|
|
15538
15669
|
"input",
|
|
15539
15670
|
{
|
|
15540
15671
|
id: "full-invoice-nif",
|
|
@@ -15547,9 +15678,9 @@ function FullInvoiceFields({
|
|
|
15547
15678
|
),
|
|
15548
15679
|
error("billingNif")
|
|
15549
15680
|
] }),
|
|
15550
|
-
/* @__PURE__ */
|
|
15551
|
-
/* @__PURE__ */
|
|
15552
|
-
/* @__PURE__ */
|
|
15681
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15682
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15683
|
+
/* @__PURE__ */ jsx25(
|
|
15553
15684
|
"input",
|
|
15554
15685
|
{
|
|
15555
15686
|
id: "full-invoice-name",
|
|
@@ -15562,9 +15693,9 @@ function FullInvoiceFields({
|
|
|
15562
15693
|
),
|
|
15563
15694
|
error("billingName")
|
|
15564
15695
|
] }),
|
|
15565
|
-
/* @__PURE__ */
|
|
15566
|
-
/* @__PURE__ */
|
|
15567
|
-
/* @__PURE__ */
|
|
15696
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15697
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15698
|
+
/* @__PURE__ */ jsx25(
|
|
15568
15699
|
"input",
|
|
15569
15700
|
{
|
|
15570
15701
|
id: "full-invoice-street",
|
|
@@ -15576,9 +15707,9 @@ function FullInvoiceFields({
|
|
|
15576
15707
|
}
|
|
15577
15708
|
)
|
|
15578
15709
|
] }),
|
|
15579
|
-
/* @__PURE__ */
|
|
15580
|
-
/* @__PURE__ */
|
|
15581
|
-
/* @__PURE__ */
|
|
15710
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15711
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15712
|
+
/* @__PURE__ */ jsx25(
|
|
15582
15713
|
"input",
|
|
15583
15714
|
{
|
|
15584
15715
|
id: "full-invoice-postal-code",
|
|
@@ -15589,9 +15720,9 @@ function FullInvoiceFields({
|
|
|
15589
15720
|
}
|
|
15590
15721
|
)
|
|
15591
15722
|
] }),
|
|
15592
|
-
/* @__PURE__ */
|
|
15593
|
-
/* @__PURE__ */
|
|
15594
|
-
/* @__PURE__ */
|
|
15723
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15724
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15725
|
+
/* @__PURE__ */ jsx25(
|
|
15595
15726
|
"input",
|
|
15596
15727
|
{
|
|
15597
15728
|
id: "full-invoice-city",
|
|
@@ -15602,9 +15733,9 @@ function FullInvoiceFields({
|
|
|
15602
15733
|
}
|
|
15603
15734
|
)
|
|
15604
15735
|
] }),
|
|
15605
|
-
/* @__PURE__ */
|
|
15606
|
-
/* @__PURE__ */
|
|
15607
|
-
/* @__PURE__ */
|
|
15736
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15737
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15738
|
+
/* @__PURE__ */ jsx25(
|
|
15608
15739
|
"select",
|
|
15609
15740
|
{
|
|
15610
15741
|
id: "full-invoice-country",
|
|
@@ -15612,11 +15743,11 @@ function FullInvoiceFields({
|
|
|
15612
15743
|
required: true,
|
|
15613
15744
|
value: value.country,
|
|
15614
15745
|
onChange: (e) => set("country", e.target.value),
|
|
15615
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
15746
|
+
children: countries.map((c) => /* @__PURE__ */ jsx25("option", { value: c.code, children: c.name }, c.code))
|
|
15616
15747
|
}
|
|
15617
15748
|
)
|
|
15618
15749
|
] }),
|
|
15619
|
-
/* @__PURE__ */
|
|
15750
|
+
/* @__PURE__ */ jsx25("div", { className: "sm:col-span-2", children: error("address") })
|
|
15620
15751
|
] })
|
|
15621
15752
|
] });
|
|
15622
15753
|
}
|
|
@@ -15634,6 +15765,7 @@ export {
|
|
|
15634
15765
|
CourseDescription,
|
|
15635
15766
|
DATA_REQUEST_TYPES,
|
|
15636
15767
|
DEFAULT_INVOICE_COUNTRIES,
|
|
15768
|
+
DEFAULT_LESSON_PREVIEW_LABELS,
|
|
15637
15769
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
15638
15770
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
15639
15771
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
@@ -15643,6 +15775,7 @@ export {
|
|
|
15643
15775
|
EMPTY_FULL_INVOICE_VALUE,
|
|
15644
15776
|
FaqAccordion,
|
|
15645
15777
|
FullInvoiceFields,
|
|
15778
|
+
LessonPreview,
|
|
15646
15779
|
MarkdownRenderer,
|
|
15647
15780
|
OrderConfirmation,
|
|
15648
15781
|
OrderInvoiceLink,
|