@reblu/site-blocks 0.24.0 → 0.26.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 +32 -0
- package/README.md +127 -0
- package/dist/client.cjs +277 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +86 -2
- package/dist/client.d.ts +86 -2
- package/dist/client.js +274 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +434 -332
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +80 -2
- package/dist/index.d.ts +80 -2
- package/dist/index.js +431 -332
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -13472,8 +13472,104 @@ function CourseDescription({
|
|
|
13472
13472
|
);
|
|
13473
13473
|
}
|
|
13474
13474
|
|
|
13475
|
-
// src/components/
|
|
13475
|
+
// src/components/course-purchase-terms.tsx
|
|
13476
13476
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13477
|
+
var DEFAULT_COURSE_PURCHASE_TERMS_LABELS = {
|
|
13478
|
+
withdrawalWaiver: "El acceso empieza al comprar: al pagar pides el acceso inmediato y renuncias al derecho de desistimiento de 14 d\xEDas.",
|
|
13479
|
+
accessDuration: (months) => `Acceso durante ${months} ${months === 1 ? "mes" : "meses"} desde la inscripci\xF3n.`,
|
|
13480
|
+
refundGuarantee: ({ basis, thresholdPercent, windowDays }) => {
|
|
13481
|
+
const period = windowDays != null ? ` durante ${windowDays} d\xEDas desde el pago` : "";
|
|
13482
|
+
const verb = basis === "LESSONS_COMPLETED" ? "completado" : "abierto";
|
|
13483
|
+
const usage = thresholdPercent != null ? ` si has ${verb} menos del ${thresholdPercent} % de las lecciones` : "";
|
|
13484
|
+
return `Garant\xEDa de reembolso${period}${usage}.`;
|
|
13485
|
+
}
|
|
13486
|
+
};
|
|
13487
|
+
function CoursePurchaseTerms({
|
|
13488
|
+
course,
|
|
13489
|
+
heading,
|
|
13490
|
+
headingLevel = 2,
|
|
13491
|
+
headingId = "course-purchase-terms-heading",
|
|
13492
|
+
labels,
|
|
13493
|
+
className,
|
|
13494
|
+
headingClassName,
|
|
13495
|
+
listClassName
|
|
13496
|
+
}) {
|
|
13497
|
+
const text3 = { ...DEFAULT_COURSE_PURCHASE_TERMS_LABELS, ...labels };
|
|
13498
|
+
const items = [];
|
|
13499
|
+
if (course.withdrawalWaiverRequired === true) {
|
|
13500
|
+
items.push({ key: "withdrawal-waiver", node: text3.withdrawalWaiver });
|
|
13501
|
+
}
|
|
13502
|
+
if (typeof course.accessDurationMonths === "number") {
|
|
13503
|
+
items.push({ key: "access-duration", node: text3.accessDuration(course.accessDurationMonths) });
|
|
13504
|
+
}
|
|
13505
|
+
if (course.refundGuarantee) {
|
|
13506
|
+
items.push({ key: "refund-guarantee", node: text3.refundGuarantee(course.refundGuarantee) });
|
|
13507
|
+
}
|
|
13508
|
+
if (items.length === 0) return null;
|
|
13509
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13510
|
+
const list = /* @__PURE__ */ jsx3("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ jsx3("li", { "data-slot": `course-purchase-terms-${item.key}`, children: item.node }, item.key)) });
|
|
13511
|
+
const Tag = `h${headingLevel}`;
|
|
13512
|
+
return /* @__PURE__ */ jsxs3(
|
|
13513
|
+
"section",
|
|
13514
|
+
{
|
|
13515
|
+
"data-slot": "course-purchase-terms",
|
|
13516
|
+
"aria-labelledby": hasHeading ? headingId : void 0,
|
|
13517
|
+
className: slotClassName("space-y-2", "", className),
|
|
13518
|
+
children: [
|
|
13519
|
+
hasHeading ? /* @__PURE__ */ jsx3(Tag, { id: headingId, className: slotClassName("", "text-lg font-semibold", headingClassName), children: heading }) : null,
|
|
13520
|
+
list
|
|
13521
|
+
]
|
|
13522
|
+
}
|
|
13523
|
+
);
|
|
13524
|
+
}
|
|
13525
|
+
|
|
13526
|
+
// src/components/legal-document.tsx
|
|
13527
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13528
|
+
function isVisiblyEmpty2(html5) {
|
|
13529
|
+
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13530
|
+
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13531
|
+
}
|
|
13532
|
+
function LegalDocument({
|
|
13533
|
+
content,
|
|
13534
|
+
title,
|
|
13535
|
+
fallback,
|
|
13536
|
+
titleId = "legal-document-title",
|
|
13537
|
+
className,
|
|
13538
|
+
titleClassName,
|
|
13539
|
+
contentClassName
|
|
13540
|
+
}) {
|
|
13541
|
+
const html5 = markdownToSafeHtml(typeof content === "string" ? content : null);
|
|
13542
|
+
const isEmpty = !html5 || isVisiblyEmpty2(html5);
|
|
13543
|
+
const hasFallback = fallback !== void 0 && fallback !== null && fallback !== false;
|
|
13544
|
+
if (isEmpty && !hasFallback) return null;
|
|
13545
|
+
const hasTitle = title !== void 0 && title !== null && title !== "";
|
|
13546
|
+
return /* @__PURE__ */ jsxs4(
|
|
13547
|
+
"article",
|
|
13548
|
+
{
|
|
13549
|
+
"data-slot": "legal-document",
|
|
13550
|
+
"aria-labelledby": hasTitle ? titleId : void 0,
|
|
13551
|
+
className: slotClassName("space-y-6", "", className),
|
|
13552
|
+
children: [
|
|
13553
|
+
hasTitle && /* @__PURE__ */ jsx4("h1", { id: titleId, className: slotClassName("", "text-3xl font-bold", titleClassName), children: title }),
|
|
13554
|
+
isEmpty ? fallback : (
|
|
13555
|
+
// `html` is already sanitised by `markdownToSafeHtml` — SafeHtml only maps it.
|
|
13556
|
+
/* @__PURE__ */ jsx4(
|
|
13557
|
+
SafeHtml,
|
|
13558
|
+
{
|
|
13559
|
+
html: html5,
|
|
13560
|
+
headingOffset: hasTitle ? 1 : 0,
|
|
13561
|
+
normalizeHeadings: hasTitle,
|
|
13562
|
+
className: contentClassName
|
|
13563
|
+
}
|
|
13564
|
+
)
|
|
13565
|
+
)
|
|
13566
|
+
]
|
|
13567
|
+
}
|
|
13568
|
+
);
|
|
13569
|
+
}
|
|
13570
|
+
|
|
13571
|
+
// src/components/lesson-preview.tsx
|
|
13572
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13477
13573
|
var DEFAULT_LESSON_PREVIEW_LABELS = {
|
|
13478
13574
|
badge: "Vista previa gratuita",
|
|
13479
13575
|
player: "V\xEDdeo",
|
|
@@ -13497,7 +13593,7 @@ function clock(seconds) {
|
|
|
13497
13593
|
iso: `PT${h2 > 0 ? `${h2}H` : ""}${m2}M${s2}S`
|
|
13498
13594
|
};
|
|
13499
13595
|
}
|
|
13500
|
-
function
|
|
13596
|
+
function isVisiblyEmpty3(html5) {
|
|
13501
13597
|
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13502
13598
|
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13503
13599
|
}
|
|
@@ -13514,17 +13610,17 @@ function LessonPreview({
|
|
|
13514
13610
|
const Tag = `h${headingLevel}`;
|
|
13515
13611
|
const video = lesson.video && isEmbeddable(lesson.video.embedUrl) ? lesson.video : null;
|
|
13516
13612
|
const html5 = markdownToSafeHtml(lesson.content);
|
|
13517
|
-
const hasBody = html5 !== null && html5 !== "" && !
|
|
13613
|
+
const hasBody = html5 !== null && html5 !== "" && !isVisiblyEmpty3(html5);
|
|
13518
13614
|
const duration = typeof lesson.durationSeconds === "number" && lesson.durationSeconds > 0 ? clock(lesson.durationSeconds) : null;
|
|
13519
|
-
return /* @__PURE__ */
|
|
13615
|
+
return /* @__PURE__ */ jsxs5(
|
|
13520
13616
|
"article",
|
|
13521
13617
|
{
|
|
13522
13618
|
"data-slot": "lesson-preview",
|
|
13523
13619
|
"aria-labelledby": headingId,
|
|
13524
13620
|
className: slotClassName("space-y-6", "", className),
|
|
13525
13621
|
children: [
|
|
13526
|
-
/* @__PURE__ */
|
|
13527
|
-
/* @__PURE__ */
|
|
13622
|
+
/* @__PURE__ */ jsxs5("header", { className: "space-y-2", children: [
|
|
13623
|
+
/* @__PURE__ */ jsx5(
|
|
13528
13624
|
"span",
|
|
13529
13625
|
{
|
|
13530
13626
|
"data-slot": "lesson-preview-badge",
|
|
@@ -13532,7 +13628,7 @@ function LessonPreview({
|
|
|
13532
13628
|
children: labels.badge
|
|
13533
13629
|
}
|
|
13534
13630
|
),
|
|
13535
|
-
/* @__PURE__ */
|
|
13631
|
+
/* @__PURE__ */ jsx5(
|
|
13536
13632
|
Tag,
|
|
13537
13633
|
{
|
|
13538
13634
|
id: headingId,
|
|
@@ -13540,12 +13636,12 @@ function LessonPreview({
|
|
|
13540
13636
|
children: lesson.title
|
|
13541
13637
|
}
|
|
13542
13638
|
),
|
|
13543
|
-
duration && /* @__PURE__ */
|
|
13544
|
-
/* @__PURE__ */
|
|
13639
|
+
duration && /* @__PURE__ */ jsxs5("p", { className: "text-sm text-muted-foreground", children: [
|
|
13640
|
+
/* @__PURE__ */ jsxs5("span", { className: "sr-only", children: [
|
|
13545
13641
|
labels.duration,
|
|
13546
13642
|
": "
|
|
13547
13643
|
] }),
|
|
13548
|
-
/* @__PURE__ */
|
|
13644
|
+
/* @__PURE__ */ jsx5(
|
|
13549
13645
|
"time",
|
|
13550
13646
|
{
|
|
13551
13647
|
"data-slot": "lesson-preview-duration",
|
|
@@ -13556,12 +13652,12 @@ function LessonPreview({
|
|
|
13556
13652
|
)
|
|
13557
13653
|
] })
|
|
13558
13654
|
] }),
|
|
13559
|
-
video && /* @__PURE__ */
|
|
13655
|
+
video && /* @__PURE__ */ jsx5(
|
|
13560
13656
|
"div",
|
|
13561
13657
|
{
|
|
13562
13658
|
"data-slot": "lesson-preview-player",
|
|
13563
13659
|
className: "aspect-video w-full overflow-hidden rounded-xl border border-border bg-black",
|
|
13564
|
-
children: /* @__PURE__ */
|
|
13660
|
+
children: /* @__PURE__ */ jsx5(
|
|
13565
13661
|
"iframe",
|
|
13566
13662
|
{
|
|
13567
13663
|
src: video.embedUrl,
|
|
@@ -13575,7 +13671,7 @@ function LessonPreview({
|
|
|
13575
13671
|
)
|
|
13576
13672
|
}
|
|
13577
13673
|
),
|
|
13578
|
-
hasBody && /* @__PURE__ */
|
|
13674
|
+
hasBody && /* @__PURE__ */ jsx5("div", { "data-slot": "lesson-preview-content", children: /* @__PURE__ */ jsx5(
|
|
13579
13675
|
SafeHtml,
|
|
13580
13676
|
{
|
|
13581
13677
|
html: html5,
|
|
@@ -13594,7 +13690,7 @@ import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
|
13594
13690
|
// src/components/_page-parts.tsx
|
|
13595
13691
|
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13596
13692
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13597
|
-
import { Fragment as Fragment2, jsx as
|
|
13693
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13598
13694
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13599
13695
|
"default",
|
|
13600
13696
|
"destructive",
|
|
@@ -13607,11 +13703,11 @@ function toButtonVariant(variant) {
|
|
|
13607
13703
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13608
13704
|
}
|
|
13609
13705
|
function PageHero({ page }) {
|
|
13610
|
-
return /* @__PURE__ */
|
|
13611
|
-
page.category && /* @__PURE__ */
|
|
13612
|
-
/* @__PURE__ */
|
|
13613
|
-
page.subtitle && /* @__PURE__ */
|
|
13614
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13706
|
+
return /* @__PURE__ */ jsxs6("header", { className: "space-y-4", children: [
|
|
13707
|
+
page.category && /* @__PURE__ */ jsx6("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 }),
|
|
13708
|
+
/* @__PURE__ */ jsx6("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13709
|
+
page.subtitle && /* @__PURE__ */ jsx6("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13710
|
+
page.coverImageUrl && /* @__PURE__ */ jsx6("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx6(
|
|
13615
13711
|
"img",
|
|
13616
13712
|
{
|
|
13617
13713
|
src: page.coverImageUrl,
|
|
@@ -13625,7 +13721,7 @@ function PageHero({ page }) {
|
|
|
13625
13721
|
function SectionCta({ section }) {
|
|
13626
13722
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13627
13723
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13628
|
-
return /* @__PURE__ */
|
|
13724
|
+
return /* @__PURE__ */ jsx6("div", { className: "pt-2", children: /* @__PURE__ */ jsx6(
|
|
13629
13725
|
"a",
|
|
13630
13726
|
{
|
|
13631
13727
|
href: section.ctaUrl,
|
|
@@ -13640,46 +13736,46 @@ function SectionCta({ section }) {
|
|
|
13640
13736
|
}
|
|
13641
13737
|
function SectionImages({ section }) {
|
|
13642
13738
|
if (section.images.length === 0) return null;
|
|
13643
|
-
return /* @__PURE__ */
|
|
13644
|
-
/* @__PURE__ */
|
|
13645
|
-
img.caption && /* @__PURE__ */
|
|
13739
|
+
return /* @__PURE__ */ jsx6("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs6("figure", { className: "space-y-1", children: [
|
|
13740
|
+
/* @__PURE__ */ jsx6("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx6("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13741
|
+
img.caption && /* @__PURE__ */ jsx6("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13646
13742
|
] }, `${img.url}-${img.order}`)) });
|
|
13647
13743
|
}
|
|
13648
13744
|
function PageSectionBlock({ section }) {
|
|
13649
13745
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13650
13746
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13651
13747
|
const hasImages = section.images.length > 0;
|
|
13652
|
-
const body3 = /* @__PURE__ */
|
|
13653
|
-
section.heading && /* @__PURE__ */
|
|
13654
|
-
/* @__PURE__ */
|
|
13655
|
-
/* @__PURE__ */
|
|
13748
|
+
const body3 = /* @__PURE__ */ jsxs6("div", { className: "space-y-4", children: [
|
|
13749
|
+
section.heading && /* @__PURE__ */ jsx6("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13750
|
+
/* @__PURE__ */ jsx6(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13751
|
+
/* @__PURE__ */ jsx6(SectionCta, { section })
|
|
13656
13752
|
] });
|
|
13657
13753
|
if (sideBySide && hasImages) {
|
|
13658
|
-
return /* @__PURE__ */
|
|
13659
|
-
/* @__PURE__ */
|
|
13754
|
+
return /* @__PURE__ */ jsx6("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
13755
|
+
/* @__PURE__ */ jsx6(SectionImages, { section }),
|
|
13660
13756
|
body3
|
|
13661
|
-
] }) : /* @__PURE__ */
|
|
13757
|
+
] }) : /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
13662
13758
|
body3,
|
|
13663
|
-
/* @__PURE__ */
|
|
13759
|
+
/* @__PURE__ */ jsx6(SectionImages, { section })
|
|
13664
13760
|
] }) });
|
|
13665
13761
|
}
|
|
13666
|
-
return /* @__PURE__ */
|
|
13762
|
+
return /* @__PURE__ */ jsxs6("section", { className: "space-y-4", children: [
|
|
13667
13763
|
body3,
|
|
13668
|
-
/* @__PURE__ */
|
|
13764
|
+
/* @__PURE__ */ jsx6(SectionImages, { section })
|
|
13669
13765
|
] });
|
|
13670
13766
|
}
|
|
13671
13767
|
function PageSectionList({ sections }) {
|
|
13672
13768
|
if (sections.length === 0) return null;
|
|
13673
13769
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13674
|
-
return /* @__PURE__ */
|
|
13770
|
+
return /* @__PURE__ */ jsx6("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ jsx6(PageSectionBlock, { section }, section.id)) });
|
|
13675
13771
|
}
|
|
13676
13772
|
|
|
13677
13773
|
// src/components/treatment.tsx
|
|
13678
|
-
import { jsx as
|
|
13774
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13679
13775
|
function Treatment({ page, className }) {
|
|
13680
|
-
return /* @__PURE__ */
|
|
13681
|
-
/* @__PURE__ */
|
|
13682
|
-
/* @__PURE__ */
|
|
13776
|
+
return /* @__PURE__ */ jsxs7("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
|
|
13777
|
+
/* @__PURE__ */ jsx7(PageHero, { page }),
|
|
13778
|
+
/* @__PURE__ */ jsx7(PageSectionList, { sections: page.sections })
|
|
13683
13779
|
] });
|
|
13684
13780
|
}
|
|
13685
13781
|
|
|
@@ -13688,11 +13784,11 @@ import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
|
13688
13784
|
|
|
13689
13785
|
// src/components/page-card-grid.tsx
|
|
13690
13786
|
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13691
|
-
import { jsx as
|
|
13787
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13692
13788
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13693
13789
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13694
13790
|
function PageCardGrid(props) {
|
|
13695
|
-
return /* @__PURE__ */
|
|
13791
|
+
return /* @__PURE__ */ jsx8(PageCardGridSection, { ...props });
|
|
13696
13792
|
}
|
|
13697
13793
|
function PageCardGridSection({
|
|
13698
13794
|
pages,
|
|
@@ -13703,15 +13799,15 @@ function PageCardGridSection({
|
|
|
13703
13799
|
}) {
|
|
13704
13800
|
if (pages.length === 0) return null;
|
|
13705
13801
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13706
|
-
return /* @__PURE__ */
|
|
13707
|
-
showHeading && /* @__PURE__ */
|
|
13708
|
-
/* @__PURE__ */
|
|
13802
|
+
return /* @__PURE__ */ jsxs8("section", { className: cn4("space-y-6", className), children: [
|
|
13803
|
+
showHeading && /* @__PURE__ */ jsx8("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13804
|
+
/* @__PURE__ */ jsx8("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__ */ jsx8("li", { children: /* @__PURE__ */ jsxs8(
|
|
13709
13805
|
"a",
|
|
13710
13806
|
{
|
|
13711
13807
|
href: pageHref(page),
|
|
13712
13808
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13713
13809
|
children: [
|
|
13714
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13810
|
+
page.coverImageUrl && /* @__PURE__ */ jsx8("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx8(
|
|
13715
13811
|
"img",
|
|
13716
13812
|
{
|
|
13717
13813
|
src: page.coverImageUrl,
|
|
@@ -13720,9 +13816,9 @@ function PageCardGridSection({
|
|
|
13720
13816
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13721
13817
|
}
|
|
13722
13818
|
) }),
|
|
13723
|
-
/* @__PURE__ */
|
|
13724
|
-
/* @__PURE__ */
|
|
13725
|
-
page.excerpt && /* @__PURE__ */
|
|
13819
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13820
|
+
/* @__PURE__ */ jsx8("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13821
|
+
page.excerpt && /* @__PURE__ */ jsx8("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13726
13822
|
] })
|
|
13727
13823
|
]
|
|
13728
13824
|
}
|
|
@@ -13731,7 +13827,7 @@ function PageCardGridSection({
|
|
|
13731
13827
|
}
|
|
13732
13828
|
|
|
13733
13829
|
// src/components/parent-page.tsx
|
|
13734
|
-
import { jsx as
|
|
13830
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13735
13831
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13736
13832
|
function ParentPage({
|
|
13737
13833
|
page,
|
|
@@ -13746,10 +13842,10 @@ function ParentPage({
|
|
|
13746
13842
|
const pages = childPages ?? treatments ?? [];
|
|
13747
13843
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13748
13844
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13749
|
-
return /* @__PURE__ */
|
|
13750
|
-
/* @__PURE__ */
|
|
13751
|
-
/* @__PURE__ */
|
|
13752
|
-
/* @__PURE__ */
|
|
13845
|
+
return /* @__PURE__ */ jsxs9("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
|
|
13846
|
+
/* @__PURE__ */ jsx9(PageHero, { page }),
|
|
13847
|
+
/* @__PURE__ */ jsx9(PageSectionList, { sections: page.sections }),
|
|
13848
|
+
/* @__PURE__ */ jsx9(
|
|
13753
13849
|
PageCardGridSection,
|
|
13754
13850
|
{
|
|
13755
13851
|
pages,
|
|
@@ -13769,7 +13865,7 @@ import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
|
13769
13865
|
|
|
13770
13866
|
// src/components/professional-fields.tsx
|
|
13771
13867
|
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13772
|
-
import { jsx as
|
|
13868
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13773
13869
|
function ProfessionalFields({
|
|
13774
13870
|
fields,
|
|
13775
13871
|
variant = "profile",
|
|
@@ -13777,7 +13873,7 @@ function ProfessionalFields({
|
|
|
13777
13873
|
}) {
|
|
13778
13874
|
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13779
13875
|
if (shown.length === 0) return null;
|
|
13780
|
-
return /* @__PURE__ */
|
|
13876
|
+
return /* @__PURE__ */ jsx10(
|
|
13781
13877
|
"dl",
|
|
13782
13878
|
{
|
|
13783
13879
|
className: cn6(
|
|
@@ -13787,13 +13883,13 @@ function ProfessionalFields({
|
|
|
13787
13883
|
),
|
|
13788
13884
|
"data-slot": "professional-fields",
|
|
13789
13885
|
"data-variant": variant,
|
|
13790
|
-
children: shown.map((field, index) => /* @__PURE__ */
|
|
13886
|
+
children: shown.map((field, index) => /* @__PURE__ */ jsxs10(
|
|
13791
13887
|
"div",
|
|
13792
13888
|
{
|
|
13793
13889
|
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
13794
13890
|
children: [
|
|
13795
|
-
/* @__PURE__ */
|
|
13796
|
-
/* @__PURE__ */
|
|
13891
|
+
/* @__PURE__ */ jsx10("dt", { className: "text-muted-foreground", children: field.label }),
|
|
13892
|
+
/* @__PURE__ */ jsx10("dd", { className: "m-0 font-medium", children: field.value })
|
|
13797
13893
|
]
|
|
13798
13894
|
},
|
|
13799
13895
|
`${field.label}-${index}`
|
|
@@ -13803,7 +13899,7 @@ function ProfessionalFields({
|
|
|
13803
13899
|
}
|
|
13804
13900
|
|
|
13805
13901
|
// src/components/profile-card.tsx
|
|
13806
|
-
import { jsx as
|
|
13902
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13807
13903
|
function initials(name) {
|
|
13808
13904
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13809
13905
|
}
|
|
@@ -13818,7 +13914,7 @@ function ProfileCard({
|
|
|
13818
13914
|
className
|
|
13819
13915
|
}) {
|
|
13820
13916
|
const NameTag = href ? "a" : "span";
|
|
13821
|
-
return /* @__PURE__ */
|
|
13917
|
+
return /* @__PURE__ */ jsxs11(
|
|
13822
13918
|
"article",
|
|
13823
13919
|
{
|
|
13824
13920
|
className: cn7(
|
|
@@ -13827,7 +13923,7 @@ function ProfileCard({
|
|
|
13827
13923
|
),
|
|
13828
13924
|
"data-slot": "profile-card",
|
|
13829
13925
|
children: [
|
|
13830
|
-
/* @__PURE__ */
|
|
13926
|
+
/* @__PURE__ */ jsx11("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx11("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx11(
|
|
13831
13927
|
"span",
|
|
13832
13928
|
{
|
|
13833
13929
|
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
@@ -13835,12 +13931,12 @@ function ProfileCard({
|
|
|
13835
13931
|
children: initials(name)
|
|
13836
13932
|
}
|
|
13837
13933
|
) }),
|
|
13838
|
-
/* @__PURE__ */
|
|
13839
|
-
/* @__PURE__ */
|
|
13840
|
-
role && /* @__PURE__ */
|
|
13934
|
+
/* @__PURE__ */ jsxs11("div", { className: "space-y-1", children: [
|
|
13935
|
+
/* @__PURE__ */ jsx11("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx11(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
13936
|
+
role && /* @__PURE__ */ jsx11("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13841
13937
|
] }),
|
|
13842
|
-
/* @__PURE__ */
|
|
13843
|
-
specialties.length > 0 && /* @__PURE__ */
|
|
13938
|
+
/* @__PURE__ */ jsx11(ProfessionalFields, { fields, variant: "card" }),
|
|
13939
|
+
specialties.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ jsx11(
|
|
13844
13940
|
"li",
|
|
13845
13941
|
{
|
|
13846
13942
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13848,7 +13944,7 @@ function ProfileCard({
|
|
|
13848
13944
|
},
|
|
13849
13945
|
s2
|
|
13850
13946
|
)) }),
|
|
13851
|
-
bio && /* @__PURE__ */
|
|
13947
|
+
bio && /* @__PURE__ */ jsx11("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13852
13948
|
]
|
|
13853
13949
|
}
|
|
13854
13950
|
);
|
|
@@ -13856,11 +13952,11 @@ function ProfileCard({
|
|
|
13856
13952
|
|
|
13857
13953
|
// src/components/product-card.tsx
|
|
13858
13954
|
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13859
|
-
import { jsx as
|
|
13955
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
13860
13956
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13861
13957
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13862
13958
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13863
|
-
return /* @__PURE__ */
|
|
13959
|
+
return /* @__PURE__ */ jsxs12(
|
|
13864
13960
|
"article",
|
|
13865
13961
|
{
|
|
13866
13962
|
className: cn8(
|
|
@@ -13869,7 +13965,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13869
13965
|
),
|
|
13870
13966
|
"data-slot": "product-card",
|
|
13871
13967
|
children: [
|
|
13872
|
-
/* @__PURE__ */
|
|
13968
|
+
/* @__PURE__ */ jsx12("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx12(
|
|
13873
13969
|
"img",
|
|
13874
13970
|
{
|
|
13875
13971
|
src: image.url,
|
|
@@ -13877,14 +13973,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13877
13973
|
loading: "lazy",
|
|
13878
13974
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13879
13975
|
}
|
|
13880
|
-
) : /* @__PURE__ */
|
|
13881
|
-
/* @__PURE__ */
|
|
13882
|
-
product.category && /* @__PURE__ */
|
|
13883
|
-
/* @__PURE__ */
|
|
13884
|
-
product.shortDescription && /* @__PURE__ */
|
|
13885
|
-
/* @__PURE__ */
|
|
13886
|
-
/* @__PURE__ */
|
|
13887
|
-
hasDiscount && /* @__PURE__ */
|
|
13976
|
+
) : /* @__PURE__ */ jsx12("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13977
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13978
|
+
product.category && /* @__PURE__ */ jsx12("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 }),
|
|
13979
|
+
/* @__PURE__ */ jsx12("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx12("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13980
|
+
product.shortDescription && /* @__PURE__ */ jsx12("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13981
|
+
/* @__PURE__ */ jsxs12("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13982
|
+
/* @__PURE__ */ jsx12("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13983
|
+
hasDiscount && /* @__PURE__ */ jsx12("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13888
13984
|
] })
|
|
13889
13985
|
] })
|
|
13890
13986
|
]
|
|
@@ -14086,7 +14182,7 @@ var __iconNode8 = [
|
|
|
14086
14182
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
14087
14183
|
|
|
14088
14184
|
// src/components/product-trust-items.tsx
|
|
14089
|
-
import { jsx as
|
|
14185
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14090
14186
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
14091
14187
|
shipping: Truck,
|
|
14092
14188
|
returns: RotateCcw,
|
|
@@ -14120,9 +14216,9 @@ function ProductTrustItems({
|
|
|
14120
14216
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
14121
14217
|
});
|
|
14122
14218
|
if (rows.length === 0) return null;
|
|
14123
|
-
return /* @__PURE__ */
|
|
14124
|
-
/* @__PURE__ */
|
|
14125
|
-
/* @__PURE__ */
|
|
14219
|
+
return /* @__PURE__ */ jsx13(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs13("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
14220
|
+
/* @__PURE__ */ jsx13(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
14221
|
+
/* @__PURE__ */ jsx13("span", { children: text3 })
|
|
14126
14222
|
] }, key2)) });
|
|
14127
14223
|
}
|
|
14128
14224
|
|
|
@@ -14130,7 +14226,7 @@ function ProductTrustItems({
|
|
|
14130
14226
|
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
14131
14227
|
|
|
14132
14228
|
// src/components/_heading.tsx
|
|
14133
|
-
import { jsx as
|
|
14229
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
14134
14230
|
function nextHeadingLevel(level) {
|
|
14135
14231
|
return Math.min(level + 1, 6);
|
|
14136
14232
|
}
|
|
@@ -14140,11 +14236,11 @@ function Heading({
|
|
|
14140
14236
|
children: children2
|
|
14141
14237
|
}) {
|
|
14142
14238
|
const Tag = `h${level}`;
|
|
14143
|
-
return /* @__PURE__ */
|
|
14239
|
+
return /* @__PURE__ */ jsx14(Tag, { className, children: children2 });
|
|
14144
14240
|
}
|
|
14145
14241
|
|
|
14146
14242
|
// src/components/faq-accordion.tsx
|
|
14147
|
-
import { jsx as
|
|
14243
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14148
14244
|
function FaqAccordion({
|
|
14149
14245
|
items,
|
|
14150
14246
|
heading,
|
|
@@ -14155,18 +14251,18 @@ function FaqAccordion({
|
|
|
14155
14251
|
}) {
|
|
14156
14252
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
14157
14253
|
if (visible.length === 0) return null;
|
|
14158
|
-
return /* @__PURE__ */
|
|
14159
|
-
heading && /* @__PURE__ */
|
|
14160
|
-
/* @__PURE__ */
|
|
14254
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn9("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14255
|
+
heading && /* @__PURE__ */ jsx15(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14256
|
+
/* @__PURE__ */ jsx15("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs14(
|
|
14161
14257
|
"details",
|
|
14162
14258
|
{
|
|
14163
14259
|
className: "group px-4",
|
|
14164
14260
|
"data-slot": "faq-item",
|
|
14165
14261
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
14166
14262
|
children: [
|
|
14167
|
-
/* @__PURE__ */
|
|
14168
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
14169
|
-
/* @__PURE__ */
|
|
14263
|
+
/* @__PURE__ */ jsxs14("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: [
|
|
14264
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx15(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx15("span", { children: item.q }),
|
|
14265
|
+
/* @__PURE__ */ jsx15(
|
|
14170
14266
|
"span",
|
|
14171
14267
|
{
|
|
14172
14268
|
"aria-hidden": "true",
|
|
@@ -14175,7 +14271,7 @@ function FaqAccordion({
|
|
|
14175
14271
|
}
|
|
14176
14272
|
)
|
|
14177
14273
|
] }),
|
|
14178
|
-
/* @__PURE__ */
|
|
14274
|
+
/* @__PURE__ */ jsx15("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14179
14275
|
]
|
|
14180
14276
|
},
|
|
14181
14277
|
index
|
|
@@ -14185,7 +14281,7 @@ function FaqAccordion({
|
|
|
14185
14281
|
|
|
14186
14282
|
// src/components/trust-badges.tsx
|
|
14187
14283
|
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
14188
|
-
import { jsx as
|
|
14284
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14189
14285
|
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
14190
14286
|
{
|
|
14191
14287
|
PARTNER: "Colaboradores",
|
|
@@ -14227,7 +14323,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14227
14323
|
if (src) {
|
|
14228
14324
|
return (
|
|
14229
14325
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14230
|
-
/* @__PURE__ */
|
|
14326
|
+
/* @__PURE__ */ jsx16(
|
|
14231
14327
|
"img",
|
|
14232
14328
|
{
|
|
14233
14329
|
src,
|
|
@@ -14238,7 +14334,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14238
14334
|
)
|
|
14239
14335
|
);
|
|
14240
14336
|
}
|
|
14241
|
-
return /* @__PURE__ */
|
|
14337
|
+
return /* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: badge.name });
|
|
14242
14338
|
}
|
|
14243
14339
|
function TrustBadges({
|
|
14244
14340
|
badges,
|
|
@@ -14266,14 +14362,14 @@ function TrustBadges({
|
|
|
14266
14362
|
if (groups.length === 0) return null;
|
|
14267
14363
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14268
14364
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14269
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */
|
|
14365
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs15(
|
|
14270
14366
|
"div",
|
|
14271
14367
|
{
|
|
14272
14368
|
"data-slot": "trust-badge-group",
|
|
14273
14369
|
"data-type": type,
|
|
14274
14370
|
className: cn10("space-y-3", groupClassName),
|
|
14275
14371
|
children: [
|
|
14276
|
-
groupHeading ? /* @__PURE__ */
|
|
14372
|
+
groupHeading ? /* @__PURE__ */ jsx16(
|
|
14277
14373
|
Heading,
|
|
14278
14374
|
{
|
|
14279
14375
|
level: groupHeadingLevel,
|
|
@@ -14285,30 +14381,30 @@ function TrustBadges({
|
|
|
14285
14381
|
children: groupHeading
|
|
14286
14382
|
}
|
|
14287
14383
|
) : null,
|
|
14288
|
-
/* @__PURE__ */
|
|
14384
|
+
/* @__PURE__ */ jsx16("ul", { className: cn10("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14289
14385
|
const href = safeHref(badge.url);
|
|
14290
|
-
return /* @__PURE__ */
|
|
14291
|
-
/* @__PURE__ */
|
|
14386
|
+
return /* @__PURE__ */ jsx16("li", { children: href ? /* @__PURE__ */ jsxs15("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14387
|
+
/* @__PURE__ */ jsx16(BadgeContent, { badge, logoClassName }),
|
|
14292
14388
|
" ",
|
|
14293
|
-
/* @__PURE__ */
|
|
14294
|
-
] }) : /* @__PURE__ */
|
|
14389
|
+
/* @__PURE__ */ jsx16("span", { className: "sr-only", children: newWindowLabel })
|
|
14390
|
+
] }) : /* @__PURE__ */ jsx16(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14295
14391
|
}) })
|
|
14296
14392
|
]
|
|
14297
14393
|
},
|
|
14298
14394
|
type
|
|
14299
14395
|
));
|
|
14300
14396
|
if (!hasHeading) {
|
|
14301
|
-
return /* @__PURE__ */
|
|
14397
|
+
return /* @__PURE__ */ jsx16("div", { "data-slot": "trust-badges", className: cn10("space-y-6", className), children: content });
|
|
14302
14398
|
}
|
|
14303
14399
|
const Tag = `h${headingLevel}`;
|
|
14304
|
-
return /* @__PURE__ */
|
|
14400
|
+
return /* @__PURE__ */ jsxs15(
|
|
14305
14401
|
"section",
|
|
14306
14402
|
{
|
|
14307
14403
|
"data-slot": "trust-badges",
|
|
14308
14404
|
"aria-labelledby": headingId,
|
|
14309
14405
|
className: cn10("space-y-6", className),
|
|
14310
14406
|
children: [
|
|
14311
|
-
/* @__PURE__ */
|
|
14407
|
+
/* @__PURE__ */ jsx16(
|
|
14312
14408
|
Tag,
|
|
14313
14409
|
{
|
|
14314
14410
|
id: headingId,
|
|
@@ -14325,38 +14421,38 @@ function TrustBadges({
|
|
|
14325
14421
|
// src/components/page-blocks.tsx
|
|
14326
14422
|
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14327
14423
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14328
|
-
import { jsx as
|
|
14424
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14329
14425
|
var ALIASES = {
|
|
14330
14426
|
doctor_embed: "profile_embed",
|
|
14331
14427
|
specialty_embed: "page_embed"
|
|
14332
14428
|
};
|
|
14333
14429
|
function HeroBlock({ block, headingLevel }) {
|
|
14334
14430
|
const { title, subtitle, imageUrl } = block.data;
|
|
14335
|
-
return /* @__PURE__ */
|
|
14336
|
-
/* @__PURE__ */
|
|
14337
|
-
subtitle && /* @__PURE__ */
|
|
14338
|
-
imageUrl && /* @__PURE__ */
|
|
14431
|
+
return /* @__PURE__ */ jsxs16("div", { className: "space-y-4", children: [
|
|
14432
|
+
/* @__PURE__ */ jsx17(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14433
|
+
subtitle && /* @__PURE__ */ jsx17("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14434
|
+
imageUrl && /* @__PURE__ */ jsx17("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx17("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14339
14435
|
] });
|
|
14340
14436
|
}
|
|
14341
14437
|
function RichtextBlock({ block, headingLevel }) {
|
|
14342
|
-
return /* @__PURE__ */
|
|
14438
|
+
return /* @__PURE__ */ jsx17(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14343
14439
|
}
|
|
14344
14440
|
function FaqBlock({ block }) {
|
|
14345
|
-
return /* @__PURE__ */
|
|
14441
|
+
return /* @__PURE__ */ jsx17(FaqAccordion, { items: block.data.items });
|
|
14346
14442
|
}
|
|
14347
14443
|
function StatsBlock({ block }) {
|
|
14348
|
-
return /* @__PURE__ */
|
|
14349
|
-
/* @__PURE__ */
|
|
14350
|
-
/* @__PURE__ */
|
|
14444
|
+
return /* @__PURE__ */ jsx17("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs16("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14445
|
+
/* @__PURE__ */ jsx17("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14446
|
+
/* @__PURE__ */ jsx17("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14351
14447
|
] }, i)) });
|
|
14352
14448
|
}
|
|
14353
14449
|
function TestimonialBlock({ block }) {
|
|
14354
14450
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14355
|
-
return /* @__PURE__ */
|
|
14356
|
-
/* @__PURE__ */
|
|
14357
|
-
/* @__PURE__ */
|
|
14451
|
+
return /* @__PURE__ */ jsxs16("figure", { className: "space-y-4", children: [
|
|
14452
|
+
/* @__PURE__ */ jsx17("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx17("p", { children: quote }) }),
|
|
14453
|
+
/* @__PURE__ */ jsxs16("figcaption", { className: "flex items-center gap-3", children: [
|
|
14358
14454
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14359
|
-
/* @__PURE__ */
|
|
14455
|
+
/* @__PURE__ */ jsx17(
|
|
14360
14456
|
"img",
|
|
14361
14457
|
{
|
|
14362
14458
|
src: avatarUrl,
|
|
@@ -14365,9 +14461,9 @@ function TestimonialBlock({ block }) {
|
|
|
14365
14461
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14366
14462
|
}
|
|
14367
14463
|
),
|
|
14368
|
-
/* @__PURE__ */
|
|
14369
|
-
/* @__PURE__ */
|
|
14370
|
-
role && /* @__PURE__ */
|
|
14464
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
14465
|
+
/* @__PURE__ */ jsx17("span", { className: "font-semibold", children: author }),
|
|
14466
|
+
role && /* @__PURE__ */ jsx17("span", { className: "block text-sm opacity-80", children: role })
|
|
14371
14467
|
] })
|
|
14372
14468
|
] })
|
|
14373
14469
|
] });
|
|
@@ -14376,19 +14472,19 @@ function CtaSlotBlock(_props) {
|
|
|
14376
14472
|
return null;
|
|
14377
14473
|
}
|
|
14378
14474
|
function FeatureListBlock({ block }) {
|
|
14379
|
-
return /* @__PURE__ */
|
|
14475
|
+
return /* @__PURE__ */ jsx17("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx17("li", { children: item.text }, i)) });
|
|
14380
14476
|
}
|
|
14381
14477
|
function GalleryBlock({ block }) {
|
|
14382
14478
|
const { images } = block.data;
|
|
14383
|
-
return /* @__PURE__ */
|
|
14479
|
+
return /* @__PURE__ */ jsx17(
|
|
14384
14480
|
"div",
|
|
14385
14481
|
{
|
|
14386
14482
|
className: cn11(
|
|
14387
14483
|
"grid gap-4",
|
|
14388
14484
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14389
14485
|
),
|
|
14390
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14391
|
-
/* @__PURE__ */
|
|
14486
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs16("figure", { className: "space-y-1", children: [
|
|
14487
|
+
/* @__PURE__ */ jsx17("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx17(
|
|
14392
14488
|
"img",
|
|
14393
14489
|
{
|
|
14394
14490
|
src: img.url,
|
|
@@ -14397,7 +14493,7 @@ function GalleryBlock({ block }) {
|
|
|
14397
14493
|
className: "h-full w-full object-cover"
|
|
14398
14494
|
}
|
|
14399
14495
|
) }),
|
|
14400
|
-
img.caption && /* @__PURE__ */
|
|
14496
|
+
img.caption && /* @__PURE__ */ jsx17("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14401
14497
|
] }, `${img.url}-${i}`))
|
|
14402
14498
|
}
|
|
14403
14499
|
);
|
|
@@ -14407,13 +14503,13 @@ function EmbedCard({
|
|
|
14407
14503
|
headingLevel,
|
|
14408
14504
|
embedHref
|
|
14409
14505
|
}) {
|
|
14410
|
-
return /* @__PURE__ */
|
|
14506
|
+
return /* @__PURE__ */ jsxs16(
|
|
14411
14507
|
"a",
|
|
14412
14508
|
{
|
|
14413
14509
|
href: embedHref(resolved),
|
|
14414
14510
|
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",
|
|
14415
14511
|
children: [
|
|
14416
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14512
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx17("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx17(
|
|
14417
14513
|
"img",
|
|
14418
14514
|
{
|
|
14419
14515
|
src: resolved.coverImageUrl,
|
|
@@ -14422,24 +14518,24 @@ function EmbedCard({
|
|
|
14422
14518
|
className: "h-full w-full object-cover"
|
|
14423
14519
|
}
|
|
14424
14520
|
) }),
|
|
14425
|
-
/* @__PURE__ */
|
|
14426
|
-
/* @__PURE__ */
|
|
14427
|
-
resolved.role && /* @__PURE__ */
|
|
14428
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14521
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-1 p-4", children: [
|
|
14522
|
+
/* @__PURE__ */ jsx17(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14523
|
+
resolved.role && /* @__PURE__ */ jsx17("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14524
|
+
resolved.excerpt && /* @__PURE__ */ jsx17("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14429
14525
|
] })
|
|
14430
14526
|
]
|
|
14431
14527
|
}
|
|
14432
14528
|
);
|
|
14433
14529
|
}
|
|
14434
14530
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14435
|
-
return /* @__PURE__ */
|
|
14531
|
+
return /* @__PURE__ */ jsx17(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14436
14532
|
}
|
|
14437
14533
|
function ProfileEmbedBlock({
|
|
14438
14534
|
block,
|
|
14439
14535
|
headingLevel,
|
|
14440
14536
|
embedHref
|
|
14441
14537
|
}) {
|
|
14442
|
-
return /* @__PURE__ */
|
|
14538
|
+
return /* @__PURE__ */ jsx17(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14443
14539
|
}
|
|
14444
14540
|
var DEFAULT_RENDERERS = {
|
|
14445
14541
|
hero: HeroBlock,
|
|
@@ -14496,7 +14592,7 @@ function toIdFragment(value) {
|
|
|
14496
14592
|
function SectionCta2({ cta }) {
|
|
14497
14593
|
if (!hasUsableCta(cta)) return null;
|
|
14498
14594
|
const variant = toButtonVariant(cta.variant);
|
|
14499
|
-
return /* @__PURE__ */
|
|
14595
|
+
return /* @__PURE__ */ jsx17("div", { className: "pt-2", children: /* @__PURE__ */ jsx17(
|
|
14500
14596
|
"a",
|
|
14501
14597
|
{
|
|
14502
14598
|
href: cta.url,
|
|
@@ -14529,7 +14625,7 @@ function PageBlocks({
|
|
|
14529
14625
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14530
14626
|
const background = block.backgroundColor;
|
|
14531
14627
|
return [
|
|
14532
|
-
/* @__PURE__ */
|
|
14628
|
+
/* @__PURE__ */ jsxs16(
|
|
14533
14629
|
"section",
|
|
14534
14630
|
{
|
|
14535
14631
|
"data-slot": "page-block",
|
|
@@ -14538,8 +14634,8 @@ function PageBlocks({
|
|
|
14538
14634
|
style: surfaceStyle(background),
|
|
14539
14635
|
className: cn11("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14540
14636
|
children: [
|
|
14541
|
-
block.heading && /* @__PURE__ */
|
|
14542
|
-
/* @__PURE__ */
|
|
14637
|
+
block.heading && /* @__PURE__ */ jsx17(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx17("span", { id: headingId, children: block.heading }) }),
|
|
14638
|
+
/* @__PURE__ */ jsx17(
|
|
14543
14639
|
Renderer,
|
|
14544
14640
|
{
|
|
14545
14641
|
block,
|
|
@@ -14547,7 +14643,7 @@ function PageBlocks({
|
|
|
14547
14643
|
embedHref
|
|
14548
14644
|
}
|
|
14549
14645
|
),
|
|
14550
|
-
/* @__PURE__ */
|
|
14646
|
+
/* @__PURE__ */ jsx17(SectionCta2, { cta: block.cta })
|
|
14551
14647
|
]
|
|
14552
14648
|
},
|
|
14553
14649
|
block.id
|
|
@@ -14555,12 +14651,12 @@ function PageBlocks({
|
|
|
14555
14651
|
];
|
|
14556
14652
|
});
|
|
14557
14653
|
if (sections.length === 0) return null;
|
|
14558
|
-
return /* @__PURE__ */
|
|
14654
|
+
return /* @__PURE__ */ jsx17("div", { className: cn11("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14559
14655
|
}
|
|
14560
14656
|
|
|
14561
14657
|
// src/components/shop-filters.tsx
|
|
14562
14658
|
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14563
|
-
import { jsx as
|
|
14659
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14564
14660
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14565
14661
|
{ max: 2500 },
|
|
14566
14662
|
{ min: 2500, max: 5e3 },
|
|
@@ -14604,7 +14700,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14604
14700
|
return "";
|
|
14605
14701
|
}
|
|
14606
14702
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14607
|
-
return /* @__PURE__ */
|
|
14703
|
+
return /* @__PURE__ */ jsx18(
|
|
14608
14704
|
"a",
|
|
14609
14705
|
{
|
|
14610
14706
|
href,
|
|
@@ -14622,9 +14718,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14622
14718
|
);
|
|
14623
14719
|
}
|
|
14624
14720
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14625
|
-
return /* @__PURE__ */
|
|
14626
|
-
/* @__PURE__ */
|
|
14627
|
-
/* @__PURE__ */
|
|
14721
|
+
return /* @__PURE__ */ jsxs17("fieldset", { className: "space-y-2", children: [
|
|
14722
|
+
/* @__PURE__ */ jsx18("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14723
|
+
/* @__PURE__ */ jsx18("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14628
14724
|
] });
|
|
14629
14725
|
}
|
|
14630
14726
|
function ShopFilters({
|
|
@@ -14647,11 +14743,11 @@ function ShopFilters({
|
|
|
14647
14743
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14648
14744
|
return null;
|
|
14649
14745
|
}
|
|
14650
|
-
return /* @__PURE__ */
|
|
14746
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn12("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14651
14747
|
visibleTaxonomies.map((axis) => {
|
|
14652
14748
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14653
|
-
return /* @__PURE__ */
|
|
14654
|
-
/* @__PURE__ */
|
|
14749
|
+
return /* @__PURE__ */ jsxs17(FilterFieldset, { legend: axis.label, children: [
|
|
14750
|
+
/* @__PURE__ */ jsx18(
|
|
14655
14751
|
OptionLink,
|
|
14656
14752
|
{
|
|
14657
14753
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14666,7 +14762,7 @@ function ShopFilters({
|
|
|
14666
14762
|
),
|
|
14667
14763
|
axis.terms.map((term) => {
|
|
14668
14764
|
const isActive = activeSlug === term.slug;
|
|
14669
|
-
return /* @__PURE__ */
|
|
14765
|
+
return /* @__PURE__ */ jsx18(
|
|
14670
14766
|
OptionLink,
|
|
14671
14767
|
{
|
|
14672
14768
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14686,9 +14782,9 @@ function ShopFilters({
|
|
|
14686
14782
|
}),
|
|
14687
14783
|
visibleAttributes.map((attr) => {
|
|
14688
14784
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14689
|
-
return /* @__PURE__ */
|
|
14785
|
+
return /* @__PURE__ */ jsx18(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14690
14786
|
const isActive = activeValues.includes(opt.value);
|
|
14691
|
-
return /* @__PURE__ */
|
|
14787
|
+
return /* @__PURE__ */ jsx18(
|
|
14692
14788
|
OptionLink,
|
|
14693
14789
|
{
|
|
14694
14790
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14706,11 +14802,11 @@ function ShopFilters({
|
|
|
14706
14802
|
);
|
|
14707
14803
|
}) }, attr.key);
|
|
14708
14804
|
}),
|
|
14709
|
-
showPriceGroup && /* @__PURE__ */
|
|
14805
|
+
showPriceGroup && /* @__PURE__ */ jsx18(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14710
14806
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14711
14807
|
const nextMin = isActive ? void 0 : band.min;
|
|
14712
14808
|
const nextMax = isActive ? void 0 : band.max;
|
|
14713
|
-
return /* @__PURE__ */
|
|
14809
|
+
return /* @__PURE__ */ jsx18(
|
|
14714
14810
|
OptionLink,
|
|
14715
14811
|
{
|
|
14716
14812
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14721,7 +14817,7 @@ function ShopFilters({
|
|
|
14721
14817
|
i
|
|
14722
14818
|
);
|
|
14723
14819
|
}) }),
|
|
14724
|
-
hasOnSale && /* @__PURE__ */
|
|
14820
|
+
hasOnSale && /* @__PURE__ */ jsx18(
|
|
14725
14821
|
OptionLink,
|
|
14726
14822
|
{
|
|
14727
14823
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14730,7 +14826,7 @@ function ShopFilters({
|
|
|
14730
14826
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14731
14827
|
}
|
|
14732
14828
|
),
|
|
14733
|
-
/* @__PURE__ */
|
|
14829
|
+
/* @__PURE__ */ jsx18(
|
|
14734
14830
|
"a",
|
|
14735
14831
|
{
|
|
14736
14832
|
href: hrefs.clearAll(),
|
|
@@ -14747,7 +14843,7 @@ function ShopFilters({
|
|
|
14747
14843
|
|
|
14748
14844
|
// src/components/course-catalog-filters.tsx
|
|
14749
14845
|
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14750
|
-
import { jsx as
|
|
14846
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14751
14847
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
14752
14848
|
{ max: 5e3 },
|
|
14753
14849
|
{ min: 5e3, max: 15e3 },
|
|
@@ -14800,9 +14896,9 @@ function CourseCatalogFilters({
|
|
|
14800
14896
|
const showPrice = enabled.price !== false;
|
|
14801
14897
|
const isFree = Boolean(active.free);
|
|
14802
14898
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
14803
|
-
return /* @__PURE__ */
|
|
14804
|
-
showCategories && /* @__PURE__ */
|
|
14805
|
-
/* @__PURE__ */
|
|
14899
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn13("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
14900
|
+
showCategories && /* @__PURE__ */ jsxs18(FilterFieldset, { legend: t.category, children: [
|
|
14901
|
+
/* @__PURE__ */ jsx19(
|
|
14806
14902
|
OptionLink,
|
|
14807
14903
|
{
|
|
14808
14904
|
href: categoryHref(void 0),
|
|
@@ -14814,7 +14910,7 @@ function CourseCatalogFilters({
|
|
|
14814
14910
|
sortedCategories.map((category) => {
|
|
14815
14911
|
const isActive = active.category === category.slug;
|
|
14816
14912
|
const next2 = isActive ? void 0 : category.slug;
|
|
14817
|
-
return /* @__PURE__ */
|
|
14913
|
+
return /* @__PURE__ */ jsx19(
|
|
14818
14914
|
OptionLink,
|
|
14819
14915
|
{
|
|
14820
14916
|
href: categoryHref(next2),
|
|
@@ -14826,8 +14922,8 @@ function CourseCatalogFilters({
|
|
|
14826
14922
|
);
|
|
14827
14923
|
})
|
|
14828
14924
|
] }),
|
|
14829
|
-
showInstructors && /* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
14925
|
+
showInstructors && /* @__PURE__ */ jsxs18(FilterFieldset, { legend: t.instructor, children: [
|
|
14926
|
+
/* @__PURE__ */ jsx19(
|
|
14831
14927
|
OptionLink,
|
|
14832
14928
|
{
|
|
14833
14929
|
href: hrefs.instructor(void 0),
|
|
@@ -14839,7 +14935,7 @@ function CourseCatalogFilters({
|
|
|
14839
14935
|
named.map((instructor) => {
|
|
14840
14936
|
const isActive = active.instructor === instructor.id;
|
|
14841
14937
|
const next2 = isActive ? void 0 : instructor.id;
|
|
14842
|
-
return /* @__PURE__ */
|
|
14938
|
+
return /* @__PURE__ */ jsx19(
|
|
14843
14939
|
OptionLink,
|
|
14844
14940
|
{
|
|
14845
14941
|
href: hrefs.instructor(next2),
|
|
@@ -14851,8 +14947,8 @@ function CourseCatalogFilters({
|
|
|
14851
14947
|
);
|
|
14852
14948
|
})
|
|
14853
14949
|
] }),
|
|
14854
|
-
showPrice && /* @__PURE__ */
|
|
14855
|
-
/* @__PURE__ */
|
|
14950
|
+
showPrice && /* @__PURE__ */ jsxs18(FilterFieldset, { legend: t.price, children: [
|
|
14951
|
+
/* @__PURE__ */ jsx19(
|
|
14856
14952
|
OptionLink,
|
|
14857
14953
|
{
|
|
14858
14954
|
href: hrefs.free(!isFree),
|
|
@@ -14867,7 +14963,7 @@ function CourseCatalogFilters({
|
|
|
14867
14963
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
14868
14964
|
const nextMin = isActive ? void 0 : band.min;
|
|
14869
14965
|
const nextMax = isActive ? void 0 : band.max;
|
|
14870
|
-
return /* @__PURE__ */
|
|
14966
|
+
return /* @__PURE__ */ jsx19(
|
|
14871
14967
|
OptionLink,
|
|
14872
14968
|
{
|
|
14873
14969
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14879,7 +14975,7 @@ function CourseCatalogFilters({
|
|
|
14879
14975
|
);
|
|
14880
14976
|
})
|
|
14881
14977
|
] }),
|
|
14882
|
-
/* @__PURE__ */
|
|
14978
|
+
/* @__PURE__ */ jsx19(
|
|
14883
14979
|
"a",
|
|
14884
14980
|
{
|
|
14885
14981
|
href: hrefs.clearAll(),
|
|
@@ -14902,7 +14998,7 @@ function CourseCatalogFilters({
|
|
|
14902
14998
|
|
|
14903
14999
|
// src/components/cart-line-list.tsx
|
|
14904
15000
|
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14905
|
-
import { jsx as
|
|
15001
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
14906
15002
|
var DEFAULT_LABELS2 = {
|
|
14907
15003
|
quantityLabel: "Cantidad",
|
|
14908
15004
|
decrease: "Reducir cantidad",
|
|
@@ -14928,9 +15024,9 @@ function CartLineList({
|
|
|
14928
15024
|
}) {
|
|
14929
15025
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14930
15026
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14931
|
-
return /* @__PURE__ */
|
|
14932
|
-
/* @__PURE__ */
|
|
14933
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
15027
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn14("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
15028
|
+
/* @__PURE__ */ jsx20("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
15029
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx20(
|
|
14934
15030
|
"div",
|
|
14935
15031
|
{
|
|
14936
15032
|
role: "status",
|
|
@@ -14939,33 +15035,33 @@ function CartLineList({
|
|
|
14939
15035
|
children: noticeContent
|
|
14940
15036
|
}
|
|
14941
15037
|
),
|
|
14942
|
-
/* @__PURE__ */
|
|
15038
|
+
/* @__PURE__ */ jsx20("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14943
15039
|
const maxQty = item.maxStock ?? Infinity;
|
|
14944
15040
|
const atMax = item.quantity >= maxQty;
|
|
14945
15041
|
const atMin = item.quantity <= 1;
|
|
14946
15042
|
const message = lineMessage?.(item);
|
|
14947
|
-
return /* @__PURE__ */
|
|
15043
|
+
return /* @__PURE__ */ jsxs19(
|
|
14948
15044
|
"li",
|
|
14949
15045
|
{
|
|
14950
15046
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14951
15047
|
children: [
|
|
14952
|
-
/* @__PURE__ */
|
|
14953
|
-
/* @__PURE__ */
|
|
14954
|
-
/* @__PURE__ */
|
|
14955
|
-
item.variantName && /* @__PURE__ */
|
|
14956
|
-
/* @__PURE__ */
|
|
15048
|
+
/* @__PURE__ */ jsx20("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx20("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15049
|
+
/* @__PURE__ */ jsxs19("div", { className: "min-w-0 flex-1", children: [
|
|
15050
|
+
/* @__PURE__ */ jsx20("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15051
|
+
item.variantName && /* @__PURE__ */ jsx20("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15052
|
+
/* @__PURE__ */ jsxs19("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14957
15053
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14958
15054
|
" ",
|
|
14959
15055
|
t.unitPriceSuffix
|
|
14960
15056
|
] }),
|
|
14961
|
-
/* @__PURE__ */
|
|
15057
|
+
/* @__PURE__ */ jsxs19(
|
|
14962
15058
|
"div",
|
|
14963
15059
|
{
|
|
14964
15060
|
role: "group",
|
|
14965
15061
|
"aria-label": t.quantityLabel,
|
|
14966
15062
|
className: "mt-3 flex items-center gap-3",
|
|
14967
15063
|
children: [
|
|
14968
|
-
/* @__PURE__ */
|
|
15064
|
+
/* @__PURE__ */ jsx20(
|
|
14969
15065
|
"button",
|
|
14970
15066
|
{
|
|
14971
15067
|
type: "button",
|
|
@@ -14976,8 +15072,8 @@ function CartLineList({
|
|
|
14976
15072
|
children: "\u2212"
|
|
14977
15073
|
}
|
|
14978
15074
|
),
|
|
14979
|
-
/* @__PURE__ */
|
|
14980
|
-
/* @__PURE__ */
|
|
15075
|
+
/* @__PURE__ */ jsx20("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
15076
|
+
/* @__PURE__ */ jsx20(
|
|
14981
15077
|
"button",
|
|
14982
15078
|
{
|
|
14983
15079
|
type: "button",
|
|
@@ -14988,7 +15084,7 @@ function CartLineList({
|
|
|
14988
15084
|
children: "+"
|
|
14989
15085
|
}
|
|
14990
15086
|
),
|
|
14991
|
-
onRemove && /* @__PURE__ */
|
|
15087
|
+
onRemove && /* @__PURE__ */ jsx20(
|
|
14992
15088
|
"button",
|
|
14993
15089
|
{
|
|
14994
15090
|
type: "button",
|
|
@@ -15001,7 +15097,7 @@ function CartLineList({
|
|
|
15001
15097
|
]
|
|
15002
15098
|
}
|
|
15003
15099
|
),
|
|
15004
|
-
message != null && message !== false && /* @__PURE__ */
|
|
15100
|
+
message != null && message !== false && /* @__PURE__ */ jsx20(
|
|
15005
15101
|
"p",
|
|
15006
15102
|
{
|
|
15007
15103
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15010,7 +15106,7 @@ function CartLineList({
|
|
|
15010
15106
|
}
|
|
15011
15107
|
)
|
|
15012
15108
|
] }),
|
|
15013
|
-
/* @__PURE__ */
|
|
15109
|
+
/* @__PURE__ */ jsx20("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx20("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15014
15110
|
]
|
|
15015
15111
|
},
|
|
15016
15112
|
lineKey(item.productId, item.variantId)
|
|
@@ -15021,7 +15117,7 @@ function CartLineList({
|
|
|
15021
15117
|
|
|
15022
15118
|
// src/components/cart-summary.tsx
|
|
15023
15119
|
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
15024
|
-
import { jsx as
|
|
15120
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15025
15121
|
var DEFAULT_LABELS3 = {
|
|
15026
15122
|
subtotal: "Subtotal",
|
|
15027
15123
|
discountPrefix: "Descuento",
|
|
@@ -15051,37 +15147,37 @@ function CartSummary({
|
|
|
15051
15147
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15052
15148
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15053
15149
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15054
|
-
const breakdown = /* @__PURE__ */
|
|
15150
|
+
const breakdown = /* @__PURE__ */ jsxs20(
|
|
15055
15151
|
"dl",
|
|
15056
15152
|
{
|
|
15057
15153
|
className: cn15("space-y-2 text-sm", !hasNotice && className),
|
|
15058
15154
|
"data-slot": "cart-summary",
|
|
15059
15155
|
children: [
|
|
15060
|
-
/* @__PURE__ */
|
|
15061
|
-
/* @__PURE__ */
|
|
15062
|
-
/* @__PURE__ */
|
|
15156
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15157
|
+
/* @__PURE__ */ jsx21("dt", { children: t.subtotal }),
|
|
15158
|
+
/* @__PURE__ */ jsx21("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15063
15159
|
] }),
|
|
15064
|
-
hasDiscount && /* @__PURE__ */
|
|
15065
|
-
/* @__PURE__ */
|
|
15066
|
-
/* @__PURE__ */
|
|
15160
|
+
hasDiscount && /* @__PURE__ */ jsxs20("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
15161
|
+
/* @__PURE__ */ jsx21("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
15162
|
+
/* @__PURE__ */ jsxs20("dd", { children: [
|
|
15067
15163
|
"-",
|
|
15068
15164
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15069
15165
|
] })
|
|
15070
15166
|
] }),
|
|
15071
|
-
shippingEnabled && /* @__PURE__ */
|
|
15072
|
-
/* @__PURE__ */
|
|
15073
|
-
/* @__PURE__ */
|
|
15167
|
+
shippingEnabled && /* @__PURE__ */ jsxs20("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15168
|
+
/* @__PURE__ */ jsx21("dt", { children: t.shipping }),
|
|
15169
|
+
/* @__PURE__ */ jsx21("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15074
15170
|
] }),
|
|
15075
|
-
/* @__PURE__ */
|
|
15076
|
-
/* @__PURE__ */
|
|
15077
|
-
/* @__PURE__ */
|
|
15171
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
15172
|
+
/* @__PURE__ */ jsx21("dt", { children: t.total }),
|
|
15173
|
+
/* @__PURE__ */ jsx21("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15078
15174
|
] })
|
|
15079
15175
|
]
|
|
15080
15176
|
}
|
|
15081
15177
|
);
|
|
15082
15178
|
if (!hasNotice) return breakdown;
|
|
15083
|
-
return /* @__PURE__ */
|
|
15084
|
-
/* @__PURE__ */
|
|
15179
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn15("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
15180
|
+
/* @__PURE__ */ jsx21(
|
|
15085
15181
|
"div",
|
|
15086
15182
|
{
|
|
15087
15183
|
role: "status",
|
|
@@ -15096,7 +15192,7 @@ function CartSummary({
|
|
|
15096
15192
|
|
|
15097
15193
|
// src/components/cart-adjustments-notice.tsx
|
|
15098
15194
|
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
15099
|
-
import { jsx as
|
|
15195
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
15100
15196
|
var DEFAULT_LABELS4 = {
|
|
15101
15197
|
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.`,
|
|
15102
15198
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15130,20 +15226,20 @@ function CartAdjustmentsNotice({
|
|
|
15130
15226
|
);
|
|
15131
15227
|
}
|
|
15132
15228
|
if (messages.length === 0) return null;
|
|
15133
|
-
return /* @__PURE__ */
|
|
15229
|
+
return /* @__PURE__ */ jsx22(
|
|
15134
15230
|
"div",
|
|
15135
15231
|
{
|
|
15136
15232
|
role: "status",
|
|
15137
15233
|
className: cn16("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15138
15234
|
"data-slot": "cart-adjustments-notice",
|
|
15139
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
15235
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx22("p", { children: messages[0] }) : /* @__PURE__ */ jsx22("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx22("li", { children: message }, index)) })
|
|
15140
15236
|
}
|
|
15141
15237
|
);
|
|
15142
15238
|
}
|
|
15143
15239
|
|
|
15144
15240
|
// src/components/added-to-cart-toast.tsx
|
|
15145
15241
|
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
15146
|
-
import { jsx as
|
|
15242
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15147
15243
|
var DEFAULT_LABELS5 = {
|
|
15148
15244
|
success: "A\xF1adido al carrito",
|
|
15149
15245
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -15163,7 +15259,7 @@ function AddedToCartToast({
|
|
|
15163
15259
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15164
15260
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
15165
15261
|
const variant = status === "success" ? "success" : "error";
|
|
15166
|
-
return /* @__PURE__ */
|
|
15262
|
+
return /* @__PURE__ */ jsxs21(
|
|
15167
15263
|
"div",
|
|
15168
15264
|
{
|
|
15169
15265
|
"data-slot": "added-to-cart-toast",
|
|
@@ -15176,12 +15272,12 @@ function AddedToCartToast({
|
|
|
15176
15272
|
),
|
|
15177
15273
|
children: [
|
|
15178
15274
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15179
|
-
/* @__PURE__ */
|
|
15180
|
-
/* @__PURE__ */
|
|
15181
|
-
/* @__PURE__ */
|
|
15182
|
-
/* @__PURE__ */
|
|
15275
|
+
/* @__PURE__ */ jsx23("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15276
|
+
/* @__PURE__ */ jsxs21("div", { className: "min-w-0 flex-1", children: [
|
|
15277
|
+
/* @__PURE__ */ jsx23("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15278
|
+
/* @__PURE__ */ jsx23("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
15183
15279
|
] }),
|
|
15184
|
-
/* @__PURE__ */
|
|
15280
|
+
/* @__PURE__ */ jsx23("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx23("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
15185
15281
|
]
|
|
15186
15282
|
}
|
|
15187
15283
|
);
|
|
@@ -15189,7 +15285,7 @@ function AddedToCartToast({
|
|
|
15189
15285
|
|
|
15190
15286
|
// src/components/checkout-login-prompt.tsx
|
|
15191
15287
|
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15192
|
-
import { Fragment as Fragment3, jsx as
|
|
15288
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15193
15289
|
var DEFAULT_LABELS6 = {
|
|
15194
15290
|
title: "Identificaci\xF3n",
|
|
15195
15291
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -15216,9 +15312,9 @@ function CheckoutLoginPrompt({
|
|
|
15216
15312
|
if (!open) return null;
|
|
15217
15313
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
15218
15314
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
15219
|
-
return /* @__PURE__ */
|
|
15220
|
-
/* @__PURE__ */
|
|
15221
|
-
/* @__PURE__ */
|
|
15315
|
+
return /* @__PURE__ */ jsxs22(Fragment3, { children: [
|
|
15316
|
+
/* @__PURE__ */ jsx24("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15317
|
+
/* @__PURE__ */ jsxs22(
|
|
15222
15318
|
"div",
|
|
15223
15319
|
{
|
|
15224
15320
|
role: "dialog",
|
|
@@ -15230,12 +15326,12 @@ function CheckoutLoginPrompt({
|
|
|
15230
15326
|
className
|
|
15231
15327
|
),
|
|
15232
15328
|
children: [
|
|
15233
|
-
/* @__PURE__ */
|
|
15234
|
-
/* @__PURE__ */
|
|
15235
|
-
/* @__PURE__ */
|
|
15236
|
-
/* @__PURE__ */
|
|
15329
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15330
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
15331
|
+
/* @__PURE__ */ jsx24("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15332
|
+
/* @__PURE__ */ jsx24("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
15237
15333
|
] }),
|
|
15238
|
-
/* @__PURE__ */
|
|
15334
|
+
/* @__PURE__ */ jsx24(
|
|
15239
15335
|
"button",
|
|
15240
15336
|
{
|
|
15241
15337
|
type: "button",
|
|
@@ -15246,9 +15342,9 @@ function CheckoutLoginPrompt({
|
|
|
15246
15342
|
}
|
|
15247
15343
|
)
|
|
15248
15344
|
] }),
|
|
15249
|
-
/* @__PURE__ */
|
|
15250
|
-
/* @__PURE__ */
|
|
15251
|
-
/* @__PURE__ */
|
|
15345
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-2", children: [
|
|
15346
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15347
|
+
/* @__PURE__ */ jsx24(
|
|
15252
15348
|
"input",
|
|
15253
15349
|
{
|
|
15254
15350
|
id: "checkout-login-prompt-email",
|
|
@@ -15263,10 +15359,10 @@ function CheckoutLoginPrompt({
|
|
|
15263
15359
|
)
|
|
15264
15360
|
}
|
|
15265
15361
|
),
|
|
15266
|
-
error && /* @__PURE__ */
|
|
15362
|
+
error && /* @__PURE__ */ jsx24("p", { className: "text-xs text-destructive", children: error })
|
|
15267
15363
|
] }),
|
|
15268
|
-
/* @__PURE__ */
|
|
15269
|
-
/* @__PURE__ */
|
|
15364
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-2", children: [
|
|
15365
|
+
/* @__PURE__ */ jsx24(
|
|
15270
15366
|
"button",
|
|
15271
15367
|
{
|
|
15272
15368
|
type: "button",
|
|
@@ -15279,7 +15375,7 @@ function CheckoutLoginPrompt({
|
|
|
15279
15375
|
children: checking ? t.checking : t.continueWithEmail
|
|
15280
15376
|
}
|
|
15281
15377
|
),
|
|
15282
|
-
/* @__PURE__ */
|
|
15378
|
+
/* @__PURE__ */ jsx24(
|
|
15283
15379
|
"button",
|
|
15284
15380
|
{
|
|
15285
15381
|
type: "button",
|
|
@@ -15298,7 +15394,7 @@ function CheckoutLoginPrompt({
|
|
|
15298
15394
|
// src/components/checkout-form.tsx
|
|
15299
15395
|
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
15300
15396
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
15301
|
-
import { Fragment as Fragment4, jsx as
|
|
15397
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
15302
15398
|
var DEFAULT_LABELS7 = {
|
|
15303
15399
|
contactTitle: "Datos de contacto",
|
|
15304
15400
|
nameLabel: "Nombre completo",
|
|
@@ -15354,9 +15450,9 @@ function CheckoutForm({
|
|
|
15354
15450
|
event.preventDefault();
|
|
15355
15451
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15356
15452
|
}
|
|
15357
|
-
return /* @__PURE__ */
|
|
15453
|
+
return /* @__PURE__ */ jsxs23(Fragment4, { children: [
|
|
15358
15454
|
loginPrompt,
|
|
15359
|
-
/* @__PURE__ */
|
|
15455
|
+
/* @__PURE__ */ jsxs23(
|
|
15360
15456
|
"form",
|
|
15361
15457
|
{
|
|
15362
15458
|
"data-testid": "checkout-form",
|
|
@@ -15364,12 +15460,12 @@ function CheckoutForm({
|
|
|
15364
15460
|
className: cn19("space-y-8", className),
|
|
15365
15461
|
"data-slot": "checkout-form",
|
|
15366
15462
|
children: [
|
|
15367
|
-
/* @__PURE__ */
|
|
15368
|
-
/* @__PURE__ */
|
|
15369
|
-
/* @__PURE__ */
|
|
15370
|
-
/* @__PURE__ */
|
|
15371
|
-
/* @__PURE__ */
|
|
15372
|
-
/* @__PURE__ */
|
|
15463
|
+
/* @__PURE__ */ jsxs23("section", { className: "space-y-4", children: [
|
|
15464
|
+
/* @__PURE__ */ jsx25("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15465
|
+
/* @__PURE__ */ jsxs23("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15466
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15467
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15468
|
+
/* @__PURE__ */ jsx25(
|
|
15373
15469
|
"input",
|
|
15374
15470
|
{
|
|
15375
15471
|
id: "checkout-form-name",
|
|
@@ -15384,11 +15480,11 @@ function CheckoutForm({
|
|
|
15384
15480
|
)
|
|
15385
15481
|
}
|
|
15386
15482
|
),
|
|
15387
|
-
contactErrors?.name && /* @__PURE__ */
|
|
15483
|
+
contactErrors?.name && /* @__PURE__ */ jsx25("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15388
15484
|
] }),
|
|
15389
|
-
/* @__PURE__ */
|
|
15390
|
-
/* @__PURE__ */
|
|
15391
|
-
/* @__PURE__ */
|
|
15485
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-1", children: [
|
|
15486
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15487
|
+
/* @__PURE__ */ jsx25(
|
|
15392
15488
|
"input",
|
|
15393
15489
|
{
|
|
15394
15490
|
id: "checkout-form-email",
|
|
@@ -15403,9 +15499,9 @@ function CheckoutForm({
|
|
|
15403
15499
|
)
|
|
15404
15500
|
}
|
|
15405
15501
|
),
|
|
15406
|
-
contactErrors?.email && /* @__PURE__ */
|
|
15502
|
+
contactErrors?.email && /* @__PURE__ */ jsx25("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15407
15503
|
] }),
|
|
15408
|
-
/* @__PURE__ */
|
|
15504
|
+
/* @__PURE__ */ jsx25("div", { className: "space-y-1", children: /* @__PURE__ */ jsx25(
|
|
15409
15505
|
PhoneInput,
|
|
15410
15506
|
{
|
|
15411
15507
|
id: "checkout-form-phone",
|
|
@@ -15419,26 +15515,26 @@ function CheckoutForm({
|
|
|
15419
15515
|
] })
|
|
15420
15516
|
] }),
|
|
15421
15517
|
children2,
|
|
15422
|
-
generalError ? /* @__PURE__ */
|
|
15423
|
-
/* @__PURE__ */
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
autoDiscount ? /* @__PURE__ */
|
|
15518
|
+
generalError ? /* @__PURE__ */ jsx25("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15519
|
+
/* @__PURE__ */ jsxs23("section", { className: "space-y-3", children: [
|
|
15520
|
+
/* @__PURE__ */ jsx25("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15521
|
+
autoDiscount ? /* @__PURE__ */ jsxs23(
|
|
15426
15522
|
"div",
|
|
15427
15523
|
{
|
|
15428
15524
|
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",
|
|
15429
15525
|
"data-slot": "checkout-staff-discount",
|
|
15430
15526
|
children: [
|
|
15431
|
-
/* @__PURE__ */
|
|
15432
|
-
/* @__PURE__ */
|
|
15527
|
+
/* @__PURE__ */ jsx25("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
15528
|
+
/* @__PURE__ */ jsx25("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
15433
15529
|
]
|
|
15434
15530
|
}
|
|
15435
15531
|
) : null,
|
|
15436
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */
|
|
15437
|
-
/* @__PURE__ */
|
|
15438
|
-
/* @__PURE__ */
|
|
15439
|
-
/* @__PURE__ */
|
|
15532
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs23("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: [
|
|
15533
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15534
|
+
/* @__PURE__ */ jsx25("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15535
|
+
/* @__PURE__ */ jsx25("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15440
15536
|
] }),
|
|
15441
|
-
/* @__PURE__ */
|
|
15537
|
+
/* @__PURE__ */ jsx25(
|
|
15442
15538
|
"button",
|
|
15443
15539
|
{
|
|
15444
15540
|
type: "button",
|
|
@@ -15448,9 +15544,9 @@ function CheckoutForm({
|
|
|
15448
15544
|
children: t.removeDiscount
|
|
15449
15545
|
}
|
|
15450
15546
|
)
|
|
15451
|
-
] }) : /* @__PURE__ */
|
|
15452
|
-
/* @__PURE__ */
|
|
15453
|
-
/* @__PURE__ */
|
|
15547
|
+
] }) : /* @__PURE__ */ jsxs23("div", { className: "flex gap-2", children: [
|
|
15548
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15549
|
+
/* @__PURE__ */ jsx25(
|
|
15454
15550
|
"input",
|
|
15455
15551
|
{
|
|
15456
15552
|
id: "checkout-form-discount-code",
|
|
@@ -15462,7 +15558,7 @@ function CheckoutForm({
|
|
|
15462
15558
|
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"
|
|
15463
15559
|
}
|
|
15464
15560
|
),
|
|
15465
|
-
/* @__PURE__ */
|
|
15561
|
+
/* @__PURE__ */ jsx25(
|
|
15466
15562
|
"button",
|
|
15467
15563
|
{
|
|
15468
15564
|
type: "button",
|
|
@@ -15473,9 +15569,9 @@ function CheckoutForm({
|
|
|
15473
15569
|
}
|
|
15474
15570
|
)
|
|
15475
15571
|
] }),
|
|
15476
|
-
discountError && /* @__PURE__ */
|
|
15572
|
+
discountError && /* @__PURE__ */ jsx25("p", { className: "text-xs text-destructive", children: discountError })
|
|
15477
15573
|
] }),
|
|
15478
|
-
/* @__PURE__ */
|
|
15574
|
+
/* @__PURE__ */ jsx25(
|
|
15479
15575
|
"button",
|
|
15480
15576
|
{
|
|
15481
15577
|
type: "submit",
|
|
@@ -15498,7 +15594,7 @@ import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
|
15498
15594
|
|
|
15499
15595
|
// src/components/order-invoice-link.tsx
|
|
15500
15596
|
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15501
|
-
import { jsx as
|
|
15597
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
15502
15598
|
var DEFAULT_LABELS8 = {
|
|
15503
15599
|
linkLabel: "Descargar la factura {number}",
|
|
15504
15600
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15506,8 +15602,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15506
15602
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15507
15603
|
if (!invoice) return null;
|
|
15508
15604
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15509
|
-
return /* @__PURE__ */
|
|
15510
|
-
/* @__PURE__ */
|
|
15605
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn20("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15606
|
+
/* @__PURE__ */ jsx26(
|
|
15511
15607
|
"a",
|
|
15512
15608
|
{
|
|
15513
15609
|
href: invoice.url,
|
|
@@ -15515,12 +15611,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15515
15611
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15516
15612
|
}
|
|
15517
15613
|
),
|
|
15518
|
-
/* @__PURE__ */
|
|
15614
|
+
/* @__PURE__ */ jsx26("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15519
15615
|
] });
|
|
15520
15616
|
}
|
|
15521
15617
|
|
|
15522
15618
|
// src/components/order-confirmation.tsx
|
|
15523
|
-
import { jsx as
|
|
15619
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
15524
15620
|
var DEFAULT_LABELS9 = {
|
|
15525
15621
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15526
15622
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15586,43 +15682,43 @@ function OrderConfirmation({
|
|
|
15586
15682
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15587
15683
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15588
15684
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15589
|
-
return /* @__PURE__ */
|
|
15590
|
-
/* @__PURE__ */
|
|
15591
|
-
/* @__PURE__ */
|
|
15592
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
15593
|
-
/* @__PURE__ */
|
|
15594
|
-
/* @__PURE__ */
|
|
15595
|
-
/* @__PURE__ */
|
|
15685
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn21("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15686
|
+
/* @__PURE__ */ jsx27("h1", { className: "text-3xl font-bold", children: title }),
|
|
15687
|
+
/* @__PURE__ */ jsx27("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15688
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs25("div", { className: "space-y-6", children: [
|
|
15689
|
+
/* @__PURE__ */ jsxs25("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15690
|
+
/* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15691
|
+
/* @__PURE__ */ jsx27("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15596
15692
|
] }),
|
|
15597
|
-
/* @__PURE__ */
|
|
15598
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15693
|
+
/* @__PURE__ */ jsxs25("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15694
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs25(
|
|
15599
15695
|
"div",
|
|
15600
15696
|
{
|
|
15601
15697
|
className: "flex justify-between gap-4 text-sm",
|
|
15602
15698
|
children: [
|
|
15603
|
-
/* @__PURE__ */
|
|
15699
|
+
/* @__PURE__ */ jsxs25("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15604
15700
|
item.product.name,
|
|
15605
15701
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15606
15702
|
" x",
|
|
15607
15703
|
item.quantity
|
|
15608
15704
|
] }),
|
|
15609
|
-
/* @__PURE__ */
|
|
15705
|
+
/* @__PURE__ */ jsx27("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15610
15706
|
]
|
|
15611
15707
|
},
|
|
15612
15708
|
idx
|
|
15613
15709
|
)),
|
|
15614
|
-
/* @__PURE__ */
|
|
15615
|
-
/* @__PURE__ */
|
|
15616
|
-
/* @__PURE__ */
|
|
15710
|
+
/* @__PURE__ */ jsx27("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs25("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15711
|
+
/* @__PURE__ */ jsx27("span", { children: t.totalLabel }),
|
|
15712
|
+
/* @__PURE__ */ jsx27("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15617
15713
|
] }) })
|
|
15618
15714
|
] }),
|
|
15619
|
-
/* @__PURE__ */
|
|
15715
|
+
/* @__PURE__ */ jsxs25("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15620
15716
|
t.confirmationEmailPrefix,
|
|
15621
15717
|
" ",
|
|
15622
|
-
/* @__PURE__ */
|
|
15718
|
+
/* @__PURE__ */ jsx27("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15623
15719
|
"."
|
|
15624
15720
|
] }),
|
|
15625
|
-
/* @__PURE__ */
|
|
15721
|
+
/* @__PURE__ */ jsx27(
|
|
15626
15722
|
OrderInvoiceLink,
|
|
15627
15723
|
{
|
|
15628
15724
|
invoice: order.invoice,
|
|
@@ -15630,11 +15726,11 @@ function OrderConfirmation({
|
|
|
15630
15726
|
}
|
|
15631
15727
|
)
|
|
15632
15728
|
] }),
|
|
15633
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15634
|
-
/* @__PURE__ */
|
|
15635
|
-
/* @__PURE__ */
|
|
15729
|
+
showOrderReference && order && /* @__PURE__ */ jsxs25("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15730
|
+
/* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15731
|
+
/* @__PURE__ */ jsx27("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15636
15732
|
] }),
|
|
15637
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15733
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx27(
|
|
15638
15734
|
"a",
|
|
15639
15735
|
{
|
|
15640
15736
|
href: cartHref,
|
|
@@ -15642,7 +15738,7 @@ function OrderConfirmation({
|
|
|
15642
15738
|
children: t.backToCartLabel
|
|
15643
15739
|
}
|
|
15644
15740
|
),
|
|
15645
|
-
showRecheck && /* @__PURE__ */
|
|
15741
|
+
showRecheck && /* @__PURE__ */ jsx27(
|
|
15646
15742
|
"button",
|
|
15647
15743
|
{
|
|
15648
15744
|
type: "button",
|
|
@@ -15651,16 +15747,16 @@ function OrderConfirmation({
|
|
|
15651
15747
|
children: t.recheckLabel
|
|
15652
15748
|
}
|
|
15653
15749
|
),
|
|
15654
|
-
showSessionReference && /* @__PURE__ */
|
|
15655
|
-
/* @__PURE__ */
|
|
15656
|
-
/* @__PURE__ */
|
|
15750
|
+
showSessionReference && /* @__PURE__ */ jsxs25("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15751
|
+
/* @__PURE__ */ jsx27("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15752
|
+
/* @__PURE__ */ jsx27("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15657
15753
|
] })
|
|
15658
15754
|
] });
|
|
15659
15755
|
}
|
|
15660
15756
|
|
|
15661
15757
|
// src/components/full-invoice-fields.tsx
|
|
15662
15758
|
import { cn as cn22 } from "@reblu/site-ui/utils";
|
|
15663
|
-
import { jsx as
|
|
15759
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
15664
15760
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15665
15761
|
wantsFullInvoice: false,
|
|
15666
15762
|
billingIdType: "NIF",
|
|
@@ -15777,12 +15873,12 @@ function FullInvoiceFields({
|
|
|
15777
15873
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15778
15874
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15779
15875
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15780
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15876
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx28("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15781
15877
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15782
|
-
return /* @__PURE__ */
|
|
15783
|
-
overCap ? /* @__PURE__ */
|
|
15784
|
-
/* @__PURE__ */
|
|
15785
|
-
/* @__PURE__ */
|
|
15878
|
+
return /* @__PURE__ */ jsxs26("section", { className: cn22("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15879
|
+
overCap ? /* @__PURE__ */ jsx28("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15880
|
+
/* @__PURE__ */ jsxs26("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15881
|
+
/* @__PURE__ */ jsx28(
|
|
15786
15882
|
"input",
|
|
15787
15883
|
{
|
|
15788
15884
|
type: "checkbox",
|
|
@@ -15792,12 +15888,12 @@ function FullInvoiceFields({
|
|
|
15792
15888
|
),
|
|
15793
15889
|
t.toggle
|
|
15794
15890
|
] }),
|
|
15795
|
-
/* @__PURE__ */
|
|
15891
|
+
/* @__PURE__ */ jsx28("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15796
15892
|
] }),
|
|
15797
|
-
showFields && /* @__PURE__ */
|
|
15798
|
-
/* @__PURE__ */
|
|
15799
|
-
/* @__PURE__ */
|
|
15800
|
-
/* @__PURE__ */
|
|
15893
|
+
showFields && /* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15894
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15895
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15896
|
+
/* @__PURE__ */ jsx28(
|
|
15801
15897
|
"select",
|
|
15802
15898
|
{
|
|
15803
15899
|
id: "full-invoice-id-type",
|
|
@@ -15806,14 +15902,14 @@ function FullInvoiceFields({
|
|
|
15806
15902
|
value: value.billingIdType,
|
|
15807
15903
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15808
15904
|
...invalid2("billingIdType"),
|
|
15809
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15905
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx28("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15810
15906
|
}
|
|
15811
15907
|
),
|
|
15812
15908
|
error("billingIdType")
|
|
15813
15909
|
] }),
|
|
15814
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15815
|
-
/* @__PURE__ */
|
|
15816
|
-
/* @__PURE__ */
|
|
15910
|
+
!isSpanishNif && /* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15911
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15912
|
+
/* @__PURE__ */ jsxs26(
|
|
15817
15913
|
"select",
|
|
15818
15914
|
{
|
|
15819
15915
|
id: "full-invoice-id-country",
|
|
@@ -15823,16 +15919,16 @@ function FullInvoiceFields({
|
|
|
15823
15919
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15824
15920
|
...invalid2("billingIdCountry"),
|
|
15825
15921
|
children: [
|
|
15826
|
-
/* @__PURE__ */
|
|
15827
|
-
countries.map((c) => /* @__PURE__ */
|
|
15922
|
+
/* @__PURE__ */ jsx28("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15923
|
+
countries.map((c) => /* @__PURE__ */ jsx28("option", { value: c.code, children: c.name }, c.code))
|
|
15828
15924
|
]
|
|
15829
15925
|
}
|
|
15830
15926
|
),
|
|
15831
15927
|
error("billingIdCountry")
|
|
15832
15928
|
] }),
|
|
15833
|
-
/* @__PURE__ */
|
|
15834
|
-
/* @__PURE__ */
|
|
15835
|
-
/* @__PURE__ */
|
|
15929
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15930
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15931
|
+
/* @__PURE__ */ jsx28(
|
|
15836
15932
|
"input",
|
|
15837
15933
|
{
|
|
15838
15934
|
id: "full-invoice-nif",
|
|
@@ -15845,9 +15941,9 @@ function FullInvoiceFields({
|
|
|
15845
15941
|
),
|
|
15846
15942
|
error("billingNif")
|
|
15847
15943
|
] }),
|
|
15848
|
-
/* @__PURE__ */
|
|
15849
|
-
/* @__PURE__ */
|
|
15850
|
-
/* @__PURE__ */
|
|
15944
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15945
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15946
|
+
/* @__PURE__ */ jsx28(
|
|
15851
15947
|
"input",
|
|
15852
15948
|
{
|
|
15853
15949
|
id: "full-invoice-name",
|
|
@@ -15860,9 +15956,9 @@ function FullInvoiceFields({
|
|
|
15860
15956
|
),
|
|
15861
15957
|
error("billingName")
|
|
15862
15958
|
] }),
|
|
15863
|
-
/* @__PURE__ */
|
|
15864
|
-
/* @__PURE__ */
|
|
15865
|
-
/* @__PURE__ */
|
|
15959
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15960
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15961
|
+
/* @__PURE__ */ jsx28(
|
|
15866
15962
|
"input",
|
|
15867
15963
|
{
|
|
15868
15964
|
id: "full-invoice-street",
|
|
@@ -15874,9 +15970,9 @@ function FullInvoiceFields({
|
|
|
15874
15970
|
}
|
|
15875
15971
|
)
|
|
15876
15972
|
] }),
|
|
15877
|
-
/* @__PURE__ */
|
|
15878
|
-
/* @__PURE__ */
|
|
15879
|
-
/* @__PURE__ */
|
|
15973
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15974
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15975
|
+
/* @__PURE__ */ jsx28(
|
|
15880
15976
|
"input",
|
|
15881
15977
|
{
|
|
15882
15978
|
id: "full-invoice-postal-code",
|
|
@@ -15887,9 +15983,9 @@ function FullInvoiceFields({
|
|
|
15887
15983
|
}
|
|
15888
15984
|
)
|
|
15889
15985
|
] }),
|
|
15890
|
-
/* @__PURE__ */
|
|
15891
|
-
/* @__PURE__ */
|
|
15892
|
-
/* @__PURE__ */
|
|
15986
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
15987
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15988
|
+
/* @__PURE__ */ jsx28(
|
|
15893
15989
|
"input",
|
|
15894
15990
|
{
|
|
15895
15991
|
id: "full-invoice-city",
|
|
@@ -15900,9 +15996,9 @@ function FullInvoiceFields({
|
|
|
15900
15996
|
}
|
|
15901
15997
|
)
|
|
15902
15998
|
] }),
|
|
15903
|
-
/* @__PURE__ */
|
|
15904
|
-
/* @__PURE__ */
|
|
15905
|
-
/* @__PURE__ */
|
|
15999
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
16000
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
16001
|
+
/* @__PURE__ */ jsx28(
|
|
15906
16002
|
"select",
|
|
15907
16003
|
{
|
|
15908
16004
|
id: "full-invoice-country",
|
|
@@ -15910,18 +16006,18 @@ function FullInvoiceFields({
|
|
|
15910
16006
|
required: true,
|
|
15911
16007
|
value: value.country,
|
|
15912
16008
|
onChange: (e) => set("country", e.target.value),
|
|
15913
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
16009
|
+
children: countries.map((c) => /* @__PURE__ */ jsx28("option", { value: c.code, children: c.name }, c.code))
|
|
15914
16010
|
}
|
|
15915
16011
|
)
|
|
15916
16012
|
] }),
|
|
15917
|
-
/* @__PURE__ */
|
|
16013
|
+
/* @__PURE__ */ jsx28("div", { className: "sm:col-span-2", children: error("address") })
|
|
15918
16014
|
] })
|
|
15919
16015
|
] });
|
|
15920
16016
|
}
|
|
15921
16017
|
|
|
15922
16018
|
// src/components/contact-interest-field.tsx
|
|
15923
16019
|
import { cn as cn23 } from "@reblu/site-ui/utils";
|
|
15924
|
-
import { jsx as
|
|
16020
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
15925
16021
|
function ContactInterestField({
|
|
15926
16022
|
interest,
|
|
15927
16023
|
value,
|
|
@@ -15938,18 +16034,18 @@ function ContactInterestField({
|
|
|
15938
16034
|
else next2.delete(option2);
|
|
15939
16035
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
15940
16036
|
};
|
|
15941
|
-
return /* @__PURE__ */
|
|
15942
|
-
/* @__PURE__ */
|
|
15943
|
-
/* @__PURE__ */
|
|
16037
|
+
return /* @__PURE__ */ jsxs27("fieldset", { "data-slot": "contact-interest", className: cn23("space-y-2", className), children: [
|
|
16038
|
+
/* @__PURE__ */ jsx29("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
16039
|
+
/* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
15944
16040
|
const id = `${idPrefix}-${index}`;
|
|
15945
|
-
return /* @__PURE__ */
|
|
16041
|
+
return /* @__PURE__ */ jsxs27(
|
|
15946
16042
|
"label",
|
|
15947
16043
|
{
|
|
15948
16044
|
htmlFor: id,
|
|
15949
16045
|
"data-slot": "contact-interest-option",
|
|
15950
16046
|
className: "flex items-center gap-2 text-sm",
|
|
15951
16047
|
children: [
|
|
15952
|
-
/* @__PURE__ */
|
|
16048
|
+
/* @__PURE__ */ jsx29(
|
|
15953
16049
|
"input",
|
|
15954
16050
|
{
|
|
15955
16051
|
id,
|
|
@@ -15981,9 +16077,11 @@ export {
|
|
|
15981
16077
|
ContactInterestField,
|
|
15982
16078
|
CourseCatalogFilters,
|
|
15983
16079
|
CourseDescription,
|
|
16080
|
+
CoursePurchaseTerms,
|
|
15984
16081
|
DATA_REQUEST_TYPES,
|
|
15985
16082
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
15986
16083
|
DEFAULT_COURSE_PRICE_BANDS,
|
|
16084
|
+
DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
15987
16085
|
DEFAULT_INVOICE_COUNTRIES,
|
|
15988
16086
|
DEFAULT_LESSON_PREVIEW_LABELS,
|
|
15989
16087
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
@@ -15995,6 +16093,7 @@ export {
|
|
|
15995
16093
|
EMPTY_FULL_INVOICE_VALUE,
|
|
15996
16094
|
FaqAccordion,
|
|
15997
16095
|
FullInvoiceFields,
|
|
16096
|
+
LegalDocument,
|
|
15998
16097
|
LessonPreview,
|
|
15999
16098
|
MarkdownRenderer,
|
|
16000
16099
|
OrderConfirmation,
|