@reblu/site-blocks 0.24.0 → 0.25.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 +12 -0
- package/README.md +28 -0
- package/dist/index.cjs +385 -330
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -2
- package/dist/index.d.ts +43 -2
- package/dist/index.js +383 -330
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -30,9 +30,11 @@ __export(src_exports, {
|
|
|
30
30
|
ContactInterestField: () => ContactInterestField,
|
|
31
31
|
CourseCatalogFilters: () => CourseCatalogFilters,
|
|
32
32
|
CourseDescription: () => CourseDescription,
|
|
33
|
+
CoursePurchaseTerms: () => CoursePurchaseTerms,
|
|
33
34
|
DATA_REQUEST_TYPES: () => import_site_contracts.DATA_REQUEST_TYPES,
|
|
34
35
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS: () => DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
35
36
|
DEFAULT_COURSE_PRICE_BANDS: () => DEFAULT_COURSE_PRICE_BANDS,
|
|
37
|
+
DEFAULT_COURSE_PURCHASE_TERMS_LABELS: () => DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
36
38
|
DEFAULT_INVOICE_COUNTRIES: () => DEFAULT_INVOICE_COUNTRIES,
|
|
37
39
|
DEFAULT_LESSON_PREVIEW_LABELS: () => DEFAULT_LESSON_PREVIEW_LABELS,
|
|
38
40
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE: () => DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
@@ -13541,8 +13543,59 @@ function CourseDescription({
|
|
|
13541
13543
|
);
|
|
13542
13544
|
}
|
|
13543
13545
|
|
|
13544
|
-
// src/components/
|
|
13546
|
+
// src/components/course-purchase-terms.tsx
|
|
13545
13547
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
13548
|
+
var DEFAULT_COURSE_PURCHASE_TERMS_LABELS = {
|
|
13549
|
+
withdrawalWaiver: "El acceso empieza al comprar: al pagar pides el acceso inmediato y renuncias al derecho de desistimiento de 14 d\xEDas.",
|
|
13550
|
+
accessDuration: (months) => `Acceso durante ${months} ${months === 1 ? "mes" : "meses"} desde la inscripci\xF3n.`,
|
|
13551
|
+
refundGuarantee: ({ basis, thresholdPercent, windowDays }) => {
|
|
13552
|
+
const period = windowDays != null ? ` durante ${windowDays} d\xEDas desde el pago` : "";
|
|
13553
|
+
const verb = basis === "LESSONS_COMPLETED" ? "completado" : "abierto";
|
|
13554
|
+
const usage = thresholdPercent != null ? ` si has ${verb} menos del ${thresholdPercent} % de las lecciones` : "";
|
|
13555
|
+
return `Garant\xEDa de reembolso${period}${usage}.`;
|
|
13556
|
+
}
|
|
13557
|
+
};
|
|
13558
|
+
function CoursePurchaseTerms({
|
|
13559
|
+
course,
|
|
13560
|
+
heading,
|
|
13561
|
+
headingLevel = 2,
|
|
13562
|
+
headingId = "course-purchase-terms-heading",
|
|
13563
|
+
labels,
|
|
13564
|
+
className,
|
|
13565
|
+
headingClassName,
|
|
13566
|
+
listClassName
|
|
13567
|
+
}) {
|
|
13568
|
+
const text3 = { ...DEFAULT_COURSE_PURCHASE_TERMS_LABELS, ...labels };
|
|
13569
|
+
const items = [];
|
|
13570
|
+
if (course.withdrawalWaiverRequired === true) {
|
|
13571
|
+
items.push({ key: "withdrawal-waiver", node: text3.withdrawalWaiver });
|
|
13572
|
+
}
|
|
13573
|
+
if (typeof course.accessDurationMonths === "number") {
|
|
13574
|
+
items.push({ key: "access-duration", node: text3.accessDuration(course.accessDurationMonths) });
|
|
13575
|
+
}
|
|
13576
|
+
if (course.refundGuarantee) {
|
|
13577
|
+
items.push({ key: "refund-guarantee", node: text3.refundGuarantee(course.refundGuarantee) });
|
|
13578
|
+
}
|
|
13579
|
+
if (items.length === 0) return null;
|
|
13580
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13581
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { "data-slot": `course-purchase-terms-${item.key}`, children: item.node }, item.key)) });
|
|
13582
|
+
const Tag = `h${headingLevel}`;
|
|
13583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
13584
|
+
"section",
|
|
13585
|
+
{
|
|
13586
|
+
"data-slot": "course-purchase-terms",
|
|
13587
|
+
"aria-labelledby": hasHeading ? headingId : void 0,
|
|
13588
|
+
className: slotClassName("space-y-2", "", className),
|
|
13589
|
+
children: [
|
|
13590
|
+
hasHeading ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id: headingId, className: slotClassName("", "text-lg font-semibold", headingClassName), children: heading }) : null,
|
|
13591
|
+
list
|
|
13592
|
+
]
|
|
13593
|
+
}
|
|
13594
|
+
);
|
|
13595
|
+
}
|
|
13596
|
+
|
|
13597
|
+
// src/components/lesson-preview.tsx
|
|
13598
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
13546
13599
|
var DEFAULT_LESSON_PREVIEW_LABELS = {
|
|
13547
13600
|
badge: "Vista previa gratuita",
|
|
13548
13601
|
player: "V\xEDdeo",
|
|
@@ -13585,15 +13638,15 @@ function LessonPreview({
|
|
|
13585
13638
|
const html5 = markdownToSafeHtml(lesson.content);
|
|
13586
13639
|
const hasBody = html5 !== null && html5 !== "" && !isVisiblyEmpty2(html5);
|
|
13587
13640
|
const duration = typeof lesson.durationSeconds === "number" && lesson.durationSeconds > 0 ? clock(lesson.durationSeconds) : null;
|
|
13588
|
-
return /* @__PURE__ */ (0,
|
|
13641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
13589
13642
|
"article",
|
|
13590
13643
|
{
|
|
13591
13644
|
"data-slot": "lesson-preview",
|
|
13592
13645
|
"aria-labelledby": headingId,
|
|
13593
13646
|
className: slotClassName("space-y-6", "", className),
|
|
13594
13647
|
children: [
|
|
13595
|
-
/* @__PURE__ */ (0,
|
|
13596
|
-
/* @__PURE__ */ (0,
|
|
13648
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "space-y-2", children: [
|
|
13649
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13597
13650
|
"span",
|
|
13598
13651
|
{
|
|
13599
13652
|
"data-slot": "lesson-preview-badge",
|
|
@@ -13601,7 +13654,7 @@ function LessonPreview({
|
|
|
13601
13654
|
children: labels.badge
|
|
13602
13655
|
}
|
|
13603
13656
|
),
|
|
13604
|
-
/* @__PURE__ */ (0,
|
|
13657
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13605
13658
|
Tag,
|
|
13606
13659
|
{
|
|
13607
13660
|
id: headingId,
|
|
@@ -13609,12 +13662,12 @@ function LessonPreview({
|
|
|
13609
13662
|
children: lesson.title
|
|
13610
13663
|
}
|
|
13611
13664
|
),
|
|
13612
|
-
duration && /* @__PURE__ */ (0,
|
|
13613
|
-
/* @__PURE__ */ (0,
|
|
13665
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
13666
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "sr-only", children: [
|
|
13614
13667
|
labels.duration,
|
|
13615
13668
|
": "
|
|
13616
13669
|
] }),
|
|
13617
|
-
/* @__PURE__ */ (0,
|
|
13670
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13618
13671
|
"time",
|
|
13619
13672
|
{
|
|
13620
13673
|
"data-slot": "lesson-preview-duration",
|
|
@@ -13625,12 +13678,12 @@ function LessonPreview({
|
|
|
13625
13678
|
)
|
|
13626
13679
|
] })
|
|
13627
13680
|
] }),
|
|
13628
|
-
video && /* @__PURE__ */ (0,
|
|
13681
|
+
video && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13629
13682
|
"div",
|
|
13630
13683
|
{
|
|
13631
13684
|
"data-slot": "lesson-preview-player",
|
|
13632
13685
|
className: "aspect-video w-full overflow-hidden rounded-xl border border-border bg-black",
|
|
13633
|
-
children: /* @__PURE__ */ (0,
|
|
13686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13634
13687
|
"iframe",
|
|
13635
13688
|
{
|
|
13636
13689
|
src: video.embedUrl,
|
|
@@ -13644,7 +13697,7 @@ function LessonPreview({
|
|
|
13644
13697
|
)
|
|
13645
13698
|
}
|
|
13646
13699
|
),
|
|
13647
|
-
hasBody && /* @__PURE__ */ (0,
|
|
13700
|
+
hasBody && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-slot": "lesson-preview-content", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
13648
13701
|
SafeHtml,
|
|
13649
13702
|
{
|
|
13650
13703
|
html: html5,
|
|
@@ -13663,7 +13716,7 @@ var import_utils3 = require("@reblu/site-ui/utils");
|
|
|
13663
13716
|
// src/components/_page-parts.tsx
|
|
13664
13717
|
var import_utils2 = require("@reblu/site-ui/utils");
|
|
13665
13718
|
var import_button_variants = require("@reblu/site-ui/button-variants");
|
|
13666
|
-
var
|
|
13719
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
13667
13720
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13668
13721
|
"default",
|
|
13669
13722
|
"destructive",
|
|
@@ -13676,11 +13729,11 @@ function toButtonVariant(variant) {
|
|
|
13676
13729
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13677
13730
|
}
|
|
13678
13731
|
function PageHero({ page }) {
|
|
13679
|
-
return /* @__PURE__ */ (0,
|
|
13680
|
-
page.category && /* @__PURE__ */ (0,
|
|
13681
|
-
/* @__PURE__ */ (0,
|
|
13682
|
-
page.subtitle && /* @__PURE__ */ (0,
|
|
13683
|
-
page.coverImageUrl && /* @__PURE__ */ (0,
|
|
13732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "space-y-4", children: [
|
|
13733
|
+
page.category && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("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 }),
|
|
13734
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13735
|
+
page.subtitle && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13736
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13684
13737
|
"img",
|
|
13685
13738
|
{
|
|
13686
13739
|
src: page.coverImageUrl,
|
|
@@ -13694,7 +13747,7 @@ function PageHero({ page }) {
|
|
|
13694
13747
|
function SectionCta({ section }) {
|
|
13695
13748
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13696
13749
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13697
|
-
return /* @__PURE__ */ (0,
|
|
13750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
13698
13751
|
"a",
|
|
13699
13752
|
{
|
|
13700
13753
|
href: section.ctaUrl,
|
|
@@ -13709,46 +13762,46 @@ function SectionCta({ section }) {
|
|
|
13709
13762
|
}
|
|
13710
13763
|
function SectionImages({ section }) {
|
|
13711
13764
|
if (section.images.length === 0) return null;
|
|
13712
|
-
return /* @__PURE__ */ (0,
|
|
13713
|
-
/* @__PURE__ */ (0,
|
|
13714
|
-
img.caption && /* @__PURE__ */ (0,
|
|
13765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_utils2.cn)("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("figure", { className: "space-y-1", children: [
|
|
13766
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13767
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13715
13768
|
] }, `${img.url}-${img.order}`)) });
|
|
13716
13769
|
}
|
|
13717
13770
|
function PageSectionBlock({ section }) {
|
|
13718
13771
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13719
13772
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13720
13773
|
const hasImages = section.images.length > 0;
|
|
13721
|
-
const body3 = /* @__PURE__ */ (0,
|
|
13722
|
-
section.heading && /* @__PURE__ */ (0,
|
|
13723
|
-
/* @__PURE__ */ (0,
|
|
13724
|
-
/* @__PURE__ */ (0,
|
|
13774
|
+
const body3 = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "space-y-4", children: [
|
|
13775
|
+
section.heading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13776
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13777
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SectionCta, { section })
|
|
13725
13778
|
] });
|
|
13726
13779
|
if (sideBySide && hasImages) {
|
|
13727
|
-
return /* @__PURE__ */ (0,
|
|
13728
|
-
/* @__PURE__ */ (0,
|
|
13780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
13781
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SectionImages, { section }),
|
|
13729
13782
|
body3
|
|
13730
|
-
] }) : /* @__PURE__ */ (0,
|
|
13783
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
13731
13784
|
body3,
|
|
13732
|
-
/* @__PURE__ */ (0,
|
|
13785
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SectionImages, { section })
|
|
13733
13786
|
] }) });
|
|
13734
13787
|
}
|
|
13735
|
-
return /* @__PURE__ */ (0,
|
|
13788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "space-y-4", children: [
|
|
13736
13789
|
body3,
|
|
13737
|
-
/* @__PURE__ */ (0,
|
|
13790
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SectionImages, { section })
|
|
13738
13791
|
] });
|
|
13739
13792
|
}
|
|
13740
13793
|
function PageSectionList({ sections }) {
|
|
13741
13794
|
if (sections.length === 0) return null;
|
|
13742
13795
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13743
|
-
return /* @__PURE__ */ (0,
|
|
13796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageSectionBlock, { section }, section.id)) });
|
|
13744
13797
|
}
|
|
13745
13798
|
|
|
13746
13799
|
// src/components/treatment.tsx
|
|
13747
|
-
var
|
|
13800
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
13748
13801
|
function Treatment({ page, className }) {
|
|
13749
|
-
return /* @__PURE__ */ (0,
|
|
13750
|
-
/* @__PURE__ */ (0,
|
|
13751
|
-
/* @__PURE__ */ (0,
|
|
13802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("article", { className: (0, import_utils3.cn)("space-y-12", className), "data-slot": "treatment", children: [
|
|
13803
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageHero, { page }),
|
|
13804
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PageSectionList, { sections: page.sections })
|
|
13752
13805
|
] });
|
|
13753
13806
|
}
|
|
13754
13807
|
|
|
@@ -13757,11 +13810,11 @@ var import_utils5 = require("@reblu/site-ui/utils");
|
|
|
13757
13810
|
|
|
13758
13811
|
// src/components/page-card-grid.tsx
|
|
13759
13812
|
var import_utils4 = require("@reblu/site-ui/utils");
|
|
13760
|
-
var
|
|
13813
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
13761
13814
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13762
13815
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13763
13816
|
function PageCardGrid(props) {
|
|
13764
|
-
return /* @__PURE__ */ (0,
|
|
13817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PageCardGridSection, { ...props });
|
|
13765
13818
|
}
|
|
13766
13819
|
function PageCardGridSection({
|
|
13767
13820
|
pages,
|
|
@@ -13772,15 +13825,15 @@ function PageCardGridSection({
|
|
|
13772
13825
|
}) {
|
|
13773
13826
|
if (pages.length === 0) return null;
|
|
13774
13827
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13775
|
-
return /* @__PURE__ */ (0,
|
|
13776
|
-
showHeading && /* @__PURE__ */ (0,
|
|
13777
|
-
/* @__PURE__ */ (0,
|
|
13828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: (0, import_utils4.cn)("space-y-6", className), children: [
|
|
13829
|
+
showHeading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13830
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
13778
13831
|
"a",
|
|
13779
13832
|
{
|
|
13780
13833
|
href: pageHref(page),
|
|
13781
13834
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13782
13835
|
children: [
|
|
13783
|
-
page.coverImageUrl && /* @__PURE__ */ (0,
|
|
13836
|
+
page.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
13784
13837
|
"img",
|
|
13785
13838
|
{
|
|
13786
13839
|
src: page.coverImageUrl,
|
|
@@ -13789,9 +13842,9 @@ function PageCardGridSection({
|
|
|
13789
13842
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13790
13843
|
}
|
|
13791
13844
|
) }),
|
|
13792
|
-
/* @__PURE__ */ (0,
|
|
13793
|
-
/* @__PURE__ */ (0,
|
|
13794
|
-
page.excerpt && /* @__PURE__ */ (0,
|
|
13845
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13846
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13847
|
+
page.excerpt && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13795
13848
|
] })
|
|
13796
13849
|
]
|
|
13797
13850
|
}
|
|
@@ -13800,7 +13853,7 @@ function PageCardGridSection({
|
|
|
13800
13853
|
}
|
|
13801
13854
|
|
|
13802
13855
|
// src/components/parent-page.tsx
|
|
13803
|
-
var
|
|
13856
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
13804
13857
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13805
13858
|
function ParentPage({
|
|
13806
13859
|
page,
|
|
@@ -13815,10 +13868,10 @@ function ParentPage({
|
|
|
13815
13868
|
const pages = childPages ?? treatments ?? [];
|
|
13816
13869
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13817
13870
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13818
|
-
return /* @__PURE__ */ (0,
|
|
13819
|
-
/* @__PURE__ */ (0,
|
|
13820
|
-
/* @__PURE__ */ (0,
|
|
13821
|
-
/* @__PURE__ */ (0,
|
|
13871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("article", { className: (0, import_utils5.cn)("space-y-12", className), "data-slot": "specialty", children: [
|
|
13872
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageHero, { page }),
|
|
13873
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageSectionList, { sections: page.sections }),
|
|
13874
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
13822
13875
|
PageCardGridSection,
|
|
13823
13876
|
{
|
|
13824
13877
|
pages,
|
|
@@ -13838,7 +13891,7 @@ var import_utils7 = require("@reblu/site-ui/utils");
|
|
|
13838
13891
|
|
|
13839
13892
|
// src/components/professional-fields.tsx
|
|
13840
13893
|
var import_utils6 = require("@reblu/site-ui/utils");
|
|
13841
|
-
var
|
|
13894
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
13842
13895
|
function ProfessionalFields({
|
|
13843
13896
|
fields,
|
|
13844
13897
|
variant = "profile",
|
|
@@ -13846,7 +13899,7 @@ function ProfessionalFields({
|
|
|
13846
13899
|
}) {
|
|
13847
13900
|
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13848
13901
|
if (shown.length === 0) return null;
|
|
13849
|
-
return /* @__PURE__ */ (0,
|
|
13902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
13850
13903
|
"dl",
|
|
13851
13904
|
{
|
|
13852
13905
|
className: (0, import_utils6.cn)(
|
|
@@ -13856,13 +13909,13 @@ function ProfessionalFields({
|
|
|
13856
13909
|
),
|
|
13857
13910
|
"data-slot": "professional-fields",
|
|
13858
13911
|
"data-variant": variant,
|
|
13859
|
-
children: shown.map((field, index) => /* @__PURE__ */ (0,
|
|
13912
|
+
children: shown.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
13860
13913
|
"div",
|
|
13861
13914
|
{
|
|
13862
13915
|
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
13863
13916
|
children: [
|
|
13864
|
-
/* @__PURE__ */ (0,
|
|
13865
|
-
/* @__PURE__ */ (0,
|
|
13917
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("dt", { className: "text-muted-foreground", children: field.label }),
|
|
13918
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("dd", { className: "m-0 font-medium", children: field.value })
|
|
13866
13919
|
]
|
|
13867
13920
|
},
|
|
13868
13921
|
`${field.label}-${index}`
|
|
@@ -13872,7 +13925,7 @@ function ProfessionalFields({
|
|
|
13872
13925
|
}
|
|
13873
13926
|
|
|
13874
13927
|
// src/components/profile-card.tsx
|
|
13875
|
-
var
|
|
13928
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
13876
13929
|
function initials(name) {
|
|
13877
13930
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13878
13931
|
}
|
|
@@ -13887,7 +13940,7 @@ function ProfileCard({
|
|
|
13887
13940
|
className
|
|
13888
13941
|
}) {
|
|
13889
13942
|
const NameTag = href ? "a" : "span";
|
|
13890
|
-
return /* @__PURE__ */ (0,
|
|
13943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
13891
13944
|
"article",
|
|
13892
13945
|
{
|
|
13893
13946
|
className: (0, import_utils7.cn)(
|
|
@@ -13896,7 +13949,7 @@ function ProfileCard({
|
|
|
13896
13949
|
),
|
|
13897
13950
|
"data-slot": "profile-card",
|
|
13898
13951
|
children: [
|
|
13899
|
-
/* @__PURE__ */ (0,
|
|
13952
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13900
13953
|
"span",
|
|
13901
13954
|
{
|
|
13902
13955
|
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
@@ -13904,12 +13957,12 @@ function ProfileCard({
|
|
|
13904
13957
|
children: initials(name)
|
|
13905
13958
|
}
|
|
13906
13959
|
) }),
|
|
13907
|
-
/* @__PURE__ */ (0,
|
|
13908
|
-
/* @__PURE__ */ (0,
|
|
13909
|
-
role && /* @__PURE__ */ (0,
|
|
13960
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-1", children: [
|
|
13961
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
13962
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13910
13963
|
] }),
|
|
13911
|
-
/* @__PURE__ */ (0,
|
|
13912
|
-
specialties.length > 0 && /* @__PURE__ */ (0,
|
|
13964
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ProfessionalFields, { fields, variant: "card" }),
|
|
13965
|
+
specialties.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
13913
13966
|
"li",
|
|
13914
13967
|
{
|
|
13915
13968
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13917,7 +13970,7 @@ function ProfileCard({
|
|
|
13917
13970
|
},
|
|
13918
13971
|
s2
|
|
13919
13972
|
)) }),
|
|
13920
|
-
bio && /* @__PURE__ */ (0,
|
|
13973
|
+
bio && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13921
13974
|
]
|
|
13922
13975
|
}
|
|
13923
13976
|
);
|
|
@@ -13925,11 +13978,11 @@ function ProfileCard({
|
|
|
13925
13978
|
|
|
13926
13979
|
// src/components/product-card.tsx
|
|
13927
13980
|
var import_utils8 = require("@reblu/site-ui/utils");
|
|
13928
|
-
var
|
|
13981
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
13929
13982
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13930
13983
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13931
13984
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13932
|
-
return /* @__PURE__ */ (0,
|
|
13985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
13933
13986
|
"article",
|
|
13934
13987
|
{
|
|
13935
13988
|
className: (0, import_utils8.cn)(
|
|
@@ -13938,7 +13991,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13938
13991
|
),
|
|
13939
13992
|
"data-slot": "product-card",
|
|
13940
13993
|
children: [
|
|
13941
|
-
/* @__PURE__ */ (0,
|
|
13994
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
13942
13995
|
"img",
|
|
13943
13996
|
{
|
|
13944
13997
|
src: image.url,
|
|
@@ -13946,14 +13999,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13946
13999
|
loading: "lazy",
|
|
13947
14000
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13948
14001
|
}
|
|
13949
|
-
) : /* @__PURE__ */ (0,
|
|
13950
|
-
/* @__PURE__ */ (0,
|
|
13951
|
-
product.category && /* @__PURE__ */ (0,
|
|
13952
|
-
/* @__PURE__ */ (0,
|
|
13953
|
-
product.shortDescription && /* @__PURE__ */ (0,
|
|
13954
|
-
/* @__PURE__ */ (0,
|
|
13955
|
-
/* @__PURE__ */ (0,
|
|
13956
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
14002
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
14003
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
14004
|
+
product.category && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
|
|
14005
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
14006
|
+
product.shortDescription && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
14007
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
14008
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
14009
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13957
14010
|
] })
|
|
13958
14011
|
] })
|
|
13959
14012
|
]
|
|
@@ -14155,7 +14208,7 @@ var __iconNode8 = [
|
|
|
14155
14208
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
14156
14209
|
|
|
14157
14210
|
// src/components/product-trust-items.tsx
|
|
14158
|
-
var
|
|
14211
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
14159
14212
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
14160
14213
|
shipping: Truck,
|
|
14161
14214
|
returns: RotateCcw,
|
|
@@ -14189,9 +14242,9 @@ function ProductTrustItems({
|
|
|
14189
14242
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
14190
14243
|
});
|
|
14191
14244
|
if (rows.length === 0) return null;
|
|
14192
|
-
return /* @__PURE__ */ (0,
|
|
14193
|
-
/* @__PURE__ */ (0,
|
|
14194
|
-
/* @__PURE__ */ (0,
|
|
14245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
14246
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
14247
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: text3 })
|
|
14195
14248
|
] }, key2)) });
|
|
14196
14249
|
}
|
|
14197
14250
|
|
|
@@ -14199,7 +14252,7 @@ function ProductTrustItems({
|
|
|
14199
14252
|
var import_utils11 = require("@reblu/site-ui/utils");
|
|
14200
14253
|
|
|
14201
14254
|
// src/components/_heading.tsx
|
|
14202
|
-
var
|
|
14255
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
14203
14256
|
function nextHeadingLevel(level) {
|
|
14204
14257
|
return Math.min(level + 1, 6);
|
|
14205
14258
|
}
|
|
@@ -14209,11 +14262,11 @@ function Heading({
|
|
|
14209
14262
|
children: children2
|
|
14210
14263
|
}) {
|
|
14211
14264
|
const Tag = `h${level}`;
|
|
14212
|
-
return /* @__PURE__ */ (0,
|
|
14265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tag, { className, children: children2 });
|
|
14213
14266
|
}
|
|
14214
14267
|
|
|
14215
14268
|
// src/components/faq-accordion.tsx
|
|
14216
|
-
var
|
|
14269
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
14217
14270
|
function FaqAccordion({
|
|
14218
14271
|
items,
|
|
14219
14272
|
heading,
|
|
@@ -14224,18 +14277,18 @@ function FaqAccordion({
|
|
|
14224
14277
|
}) {
|
|
14225
14278
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
14226
14279
|
if (visible.length === 0) return null;
|
|
14227
|
-
return /* @__PURE__ */ (0,
|
|
14228
|
-
heading && /* @__PURE__ */ (0,
|
|
14229
|
-
/* @__PURE__ */ (0,
|
|
14280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: (0, import_utils11.cn)("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14281
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14282
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
14230
14283
|
"details",
|
|
14231
14284
|
{
|
|
14232
14285
|
className: "group px-4",
|
|
14233
14286
|
"data-slot": "faq-item",
|
|
14234
14287
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
14235
14288
|
children: [
|
|
14236
|
-
/* @__PURE__ */ (0,
|
|
14237
|
-
questionHeadingLevel ? /* @__PURE__ */ (0,
|
|
14238
|
-
/* @__PURE__ */ (0,
|
|
14289
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
|
|
14290
|
+
questionHeadingLevel ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: item.q }),
|
|
14291
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
14239
14292
|
"span",
|
|
14240
14293
|
{
|
|
14241
14294
|
"aria-hidden": "true",
|
|
@@ -14244,7 +14297,7 @@ function FaqAccordion({
|
|
|
14244
14297
|
}
|
|
14245
14298
|
)
|
|
14246
14299
|
] }),
|
|
14247
|
-
/* @__PURE__ */ (0,
|
|
14300
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14248
14301
|
]
|
|
14249
14302
|
},
|
|
14250
14303
|
index
|
|
@@ -14254,7 +14307,7 @@ function FaqAccordion({
|
|
|
14254
14307
|
|
|
14255
14308
|
// src/components/trust-badges.tsx
|
|
14256
14309
|
var import_utils12 = require("@reblu/site-ui/utils");
|
|
14257
|
-
var
|
|
14310
|
+
var import_jsx_runtime15 = (
|
|
14258
14311
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14259
14312
|
require("react/jsx-runtime")
|
|
14260
14313
|
);
|
|
@@ -14297,7 +14350,7 @@ function safeLogoSrc(url) {
|
|
|
14297
14350
|
function BadgeContent({ badge, logoClassName }) {
|
|
14298
14351
|
const src = safeLogoSrc(badge.logoUrl);
|
|
14299
14352
|
if (src) {
|
|
14300
|
-
return /* @__PURE__ */ (0,
|
|
14353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
14301
14354
|
"img",
|
|
14302
14355
|
{
|
|
14303
14356
|
src,
|
|
@@ -14307,7 +14360,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14307
14360
|
}
|
|
14308
14361
|
);
|
|
14309
14362
|
}
|
|
14310
|
-
return /* @__PURE__ */ (0,
|
|
14363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-medium", children: badge.name });
|
|
14311
14364
|
}
|
|
14312
14365
|
function TrustBadges({
|
|
14313
14366
|
badges,
|
|
@@ -14335,14 +14388,14 @@ function TrustBadges({
|
|
|
14335
14388
|
if (groups.length === 0) return null;
|
|
14336
14389
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14337
14390
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14338
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0,
|
|
14391
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
14339
14392
|
"div",
|
|
14340
14393
|
{
|
|
14341
14394
|
"data-slot": "trust-badge-group",
|
|
14342
14395
|
"data-type": type,
|
|
14343
14396
|
className: (0, import_utils12.cn)("space-y-3", groupClassName),
|
|
14344
14397
|
children: [
|
|
14345
|
-
groupHeading ? /* @__PURE__ */ (0,
|
|
14398
|
+
groupHeading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
14346
14399
|
Heading,
|
|
14347
14400
|
{
|
|
14348
14401
|
level: groupHeadingLevel,
|
|
@@ -14354,30 +14407,30 @@ function TrustBadges({
|
|
|
14354
14407
|
children: groupHeading
|
|
14355
14408
|
}
|
|
14356
14409
|
) : null,
|
|
14357
|
-
/* @__PURE__ */ (0,
|
|
14410
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: (0, import_utils12.cn)("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14358
14411
|
const href = safeHref(badge.url);
|
|
14359
|
-
return /* @__PURE__ */ (0,
|
|
14360
|
-
/* @__PURE__ */ (0,
|
|
14412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14413
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BadgeContent, { badge, logoClassName }),
|
|
14361
14414
|
" ",
|
|
14362
|
-
/* @__PURE__ */ (0,
|
|
14363
|
-
] }) : /* @__PURE__ */ (0,
|
|
14415
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: newWindowLabel })
|
|
14416
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14364
14417
|
}) })
|
|
14365
14418
|
]
|
|
14366
14419
|
},
|
|
14367
14420
|
type
|
|
14368
14421
|
));
|
|
14369
14422
|
if (!hasHeading) {
|
|
14370
|
-
return /* @__PURE__ */ (0,
|
|
14423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { "data-slot": "trust-badges", className: (0, import_utils12.cn)("space-y-6", className), children: content });
|
|
14371
14424
|
}
|
|
14372
14425
|
const Tag = `h${headingLevel}`;
|
|
14373
|
-
return /* @__PURE__ */ (0,
|
|
14426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
14374
14427
|
"section",
|
|
14375
14428
|
{
|
|
14376
14429
|
"data-slot": "trust-badges",
|
|
14377
14430
|
"aria-labelledby": headingId,
|
|
14378
14431
|
className: (0, import_utils12.cn)("space-y-6", className),
|
|
14379
14432
|
children: [
|
|
14380
|
-
/* @__PURE__ */ (0,
|
|
14433
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
14381
14434
|
Tag,
|
|
14382
14435
|
{
|
|
14383
14436
|
id: headingId,
|
|
@@ -14394,38 +14447,38 @@ function TrustBadges({
|
|
|
14394
14447
|
// src/components/page-blocks.tsx
|
|
14395
14448
|
var import_utils13 = require("@reblu/site-ui/utils");
|
|
14396
14449
|
var import_button_variants2 = require("@reblu/site-ui/button-variants");
|
|
14397
|
-
var
|
|
14450
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
14398
14451
|
var ALIASES = {
|
|
14399
14452
|
doctor_embed: "profile_embed",
|
|
14400
14453
|
specialty_embed: "page_embed"
|
|
14401
14454
|
};
|
|
14402
14455
|
function HeroBlock({ block, headingLevel }) {
|
|
14403
14456
|
const { title, subtitle, imageUrl } = block.data;
|
|
14404
|
-
return /* @__PURE__ */ (0,
|
|
14405
|
-
/* @__PURE__ */ (0,
|
|
14406
|
-
subtitle && /* @__PURE__ */ (0,
|
|
14407
|
-
imageUrl && /* @__PURE__ */ (0,
|
|
14457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-4", children: [
|
|
14458
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14459
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14460
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14408
14461
|
] });
|
|
14409
14462
|
}
|
|
14410
14463
|
function RichtextBlock({ block, headingLevel }) {
|
|
14411
|
-
return /* @__PURE__ */ (0,
|
|
14464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14412
14465
|
}
|
|
14413
14466
|
function FaqBlock({ block }) {
|
|
14414
|
-
return /* @__PURE__ */ (0,
|
|
14467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FaqAccordion, { items: block.data.items });
|
|
14415
14468
|
}
|
|
14416
14469
|
function StatsBlock({ block }) {
|
|
14417
|
-
return /* @__PURE__ */ (0,
|
|
14418
|
-
/* @__PURE__ */ (0,
|
|
14419
|
-
/* @__PURE__ */ (0,
|
|
14470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14471
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14472
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14420
14473
|
] }, i)) });
|
|
14421
14474
|
}
|
|
14422
14475
|
function TestimonialBlock({ block }) {
|
|
14423
14476
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14424
|
-
return /* @__PURE__ */ (0,
|
|
14425
|
-
/* @__PURE__ */ (0,
|
|
14426
|
-
/* @__PURE__ */ (0,
|
|
14477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("figure", { className: "space-y-4", children: [
|
|
14478
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: quote }) }),
|
|
14479
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("figcaption", { className: "flex items-center gap-3", children: [
|
|
14427
14480
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14428
|
-
/* @__PURE__ */ (0,
|
|
14481
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14429
14482
|
"img",
|
|
14430
14483
|
{
|
|
14431
14484
|
src: avatarUrl,
|
|
@@ -14434,9 +14487,9 @@ function TestimonialBlock({ block }) {
|
|
|
14434
14487
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14435
14488
|
}
|
|
14436
14489
|
),
|
|
14437
|
-
/* @__PURE__ */ (0,
|
|
14438
|
-
/* @__PURE__ */ (0,
|
|
14439
|
-
role && /* @__PURE__ */ (0,
|
|
14490
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
|
|
14491
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "font-semibold", children: author }),
|
|
14492
|
+
role && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block text-sm opacity-80", children: role })
|
|
14440
14493
|
] })
|
|
14441
14494
|
] })
|
|
14442
14495
|
] });
|
|
@@ -14445,19 +14498,19 @@ function CtaSlotBlock(_props) {
|
|
|
14445
14498
|
return null;
|
|
14446
14499
|
}
|
|
14447
14500
|
function FeatureListBlock({ block }) {
|
|
14448
|
-
return /* @__PURE__ */ (0,
|
|
14501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: item.text }, i)) });
|
|
14449
14502
|
}
|
|
14450
14503
|
function GalleryBlock({ block }) {
|
|
14451
14504
|
const { images } = block.data;
|
|
14452
|
-
return /* @__PURE__ */ (0,
|
|
14505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14453
14506
|
"div",
|
|
14454
14507
|
{
|
|
14455
14508
|
className: (0, import_utils13.cn)(
|
|
14456
14509
|
"grid gap-4",
|
|
14457
14510
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14458
14511
|
),
|
|
14459
|
-
children: images.map((img, i) => /* @__PURE__ */ (0,
|
|
14460
|
-
/* @__PURE__ */ (0,
|
|
14512
|
+
children: images.map((img, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("figure", { className: "space-y-1", children: [
|
|
14513
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14461
14514
|
"img",
|
|
14462
14515
|
{
|
|
14463
14516
|
src: img.url,
|
|
@@ -14466,7 +14519,7 @@ function GalleryBlock({ block }) {
|
|
|
14466
14519
|
className: "h-full w-full object-cover"
|
|
14467
14520
|
}
|
|
14468
14521
|
) }),
|
|
14469
|
-
img.caption && /* @__PURE__ */ (0,
|
|
14522
|
+
img.caption && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14470
14523
|
] }, `${img.url}-${i}`))
|
|
14471
14524
|
}
|
|
14472
14525
|
);
|
|
@@ -14476,13 +14529,13 @@ function EmbedCard({
|
|
|
14476
14529
|
headingLevel,
|
|
14477
14530
|
embedHref
|
|
14478
14531
|
}) {
|
|
14479
|
-
return /* @__PURE__ */ (0,
|
|
14532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
14480
14533
|
"a",
|
|
14481
14534
|
{
|
|
14482
14535
|
href: embedHref(resolved),
|
|
14483
14536
|
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",
|
|
14484
14537
|
children: [
|
|
14485
|
-
resolved.coverImageUrl && /* @__PURE__ */ (0,
|
|
14538
|
+
resolved.coverImageUrl && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14486
14539
|
"img",
|
|
14487
14540
|
{
|
|
14488
14541
|
src: resolved.coverImageUrl,
|
|
@@ -14491,24 +14544,24 @@ function EmbedCard({
|
|
|
14491
14544
|
className: "h-full w-full object-cover"
|
|
14492
14545
|
}
|
|
14493
14546
|
) }),
|
|
14494
|
-
/* @__PURE__ */ (0,
|
|
14495
|
-
/* @__PURE__ */ (0,
|
|
14496
|
-
resolved.role && /* @__PURE__ */ (0,
|
|
14497
|
-
resolved.excerpt && /* @__PURE__ */ (0,
|
|
14547
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "space-y-1 p-4", children: [
|
|
14548
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14549
|
+
resolved.role && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14550
|
+
resolved.excerpt && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14498
14551
|
] })
|
|
14499
14552
|
]
|
|
14500
14553
|
}
|
|
14501
14554
|
);
|
|
14502
14555
|
}
|
|
14503
14556
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14504
|
-
return /* @__PURE__ */ (0,
|
|
14557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14505
14558
|
}
|
|
14506
14559
|
function ProfileEmbedBlock({
|
|
14507
14560
|
block,
|
|
14508
14561
|
headingLevel,
|
|
14509
14562
|
embedHref
|
|
14510
14563
|
}) {
|
|
14511
|
-
return /* @__PURE__ */ (0,
|
|
14564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14512
14565
|
}
|
|
14513
14566
|
var DEFAULT_RENDERERS = {
|
|
14514
14567
|
hero: HeroBlock,
|
|
@@ -14565,7 +14618,7 @@ function toIdFragment(value) {
|
|
|
14565
14618
|
function SectionCta2({ cta }) {
|
|
14566
14619
|
if (!hasUsableCta(cta)) return null;
|
|
14567
14620
|
const variant = toButtonVariant(cta.variant);
|
|
14568
|
-
return /* @__PURE__ */ (0,
|
|
14621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14569
14622
|
"a",
|
|
14570
14623
|
{
|
|
14571
14624
|
href: cta.url,
|
|
@@ -14598,7 +14651,7 @@ function PageBlocks({
|
|
|
14598
14651
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14599
14652
|
const background = block.backgroundColor;
|
|
14600
14653
|
return [
|
|
14601
|
-
/* @__PURE__ */ (0,
|
|
14654
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
14602
14655
|
"section",
|
|
14603
14656
|
{
|
|
14604
14657
|
"data-slot": "page-block",
|
|
@@ -14607,8 +14660,8 @@ function PageBlocks({
|
|
|
14607
14660
|
style: surfaceStyle(background),
|
|
14608
14661
|
className: (0, import_utils13.cn)("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14609
14662
|
children: [
|
|
14610
|
-
block.heading && /* @__PURE__ */ (0,
|
|
14611
|
-
/* @__PURE__ */ (0,
|
|
14663
|
+
block.heading && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { id: headingId, children: block.heading }) }),
|
|
14664
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
14612
14665
|
Renderer,
|
|
14613
14666
|
{
|
|
14614
14667
|
block,
|
|
@@ -14616,7 +14669,7 @@ function PageBlocks({
|
|
|
14616
14669
|
embedHref
|
|
14617
14670
|
}
|
|
14618
14671
|
),
|
|
14619
|
-
/* @__PURE__ */ (0,
|
|
14672
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SectionCta2, { cta: block.cta })
|
|
14620
14673
|
]
|
|
14621
14674
|
},
|
|
14622
14675
|
block.id
|
|
@@ -14624,12 +14677,12 @@ function PageBlocks({
|
|
|
14624
14677
|
];
|
|
14625
14678
|
});
|
|
14626
14679
|
if (sections.length === 0) return null;
|
|
14627
|
-
return /* @__PURE__ */ (0,
|
|
14680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_utils13.cn)("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14628
14681
|
}
|
|
14629
14682
|
|
|
14630
14683
|
// src/components/shop-filters.tsx
|
|
14631
14684
|
var import_utils14 = require("@reblu/site-ui/utils");
|
|
14632
|
-
var
|
|
14685
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
14633
14686
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14634
14687
|
{ max: 2500 },
|
|
14635
14688
|
{ min: 2500, max: 5e3 },
|
|
@@ -14673,7 +14726,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14673
14726
|
return "";
|
|
14674
14727
|
}
|
|
14675
14728
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14676
|
-
return /* @__PURE__ */ (0,
|
|
14729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14677
14730
|
"a",
|
|
14678
14731
|
{
|
|
14679
14732
|
href,
|
|
@@ -14691,9 +14744,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14691
14744
|
);
|
|
14692
14745
|
}
|
|
14693
14746
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14694
|
-
return /* @__PURE__ */ (0,
|
|
14695
|
-
/* @__PURE__ */ (0,
|
|
14696
|
-
/* @__PURE__ */ (0,
|
|
14747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("fieldset", { className: "space-y-2", children: [
|
|
14748
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14749
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14697
14750
|
] });
|
|
14698
14751
|
}
|
|
14699
14752
|
function ShopFilters({
|
|
@@ -14716,11 +14769,11 @@ function ShopFilters({
|
|
|
14716
14769
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14717
14770
|
return null;
|
|
14718
14771
|
}
|
|
14719
|
-
return /* @__PURE__ */ (0,
|
|
14772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: (0, import_utils14.cn)("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14720
14773
|
visibleTaxonomies.map((axis) => {
|
|
14721
14774
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14722
|
-
return /* @__PURE__ */ (0,
|
|
14723
|
-
/* @__PURE__ */ (0,
|
|
14775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(FilterFieldset, { legend: axis.label, children: [
|
|
14776
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14724
14777
|
OptionLink,
|
|
14725
14778
|
{
|
|
14726
14779
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14735,7 +14788,7 @@ function ShopFilters({
|
|
|
14735
14788
|
),
|
|
14736
14789
|
axis.terms.map((term) => {
|
|
14737
14790
|
const isActive = activeSlug === term.slug;
|
|
14738
|
-
return /* @__PURE__ */ (0,
|
|
14791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14739
14792
|
OptionLink,
|
|
14740
14793
|
{
|
|
14741
14794
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14755,9 +14808,9 @@ function ShopFilters({
|
|
|
14755
14808
|
}),
|
|
14756
14809
|
visibleAttributes.map((attr) => {
|
|
14757
14810
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14758
|
-
return /* @__PURE__ */ (0,
|
|
14811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14759
14812
|
const isActive = activeValues.includes(opt.value);
|
|
14760
|
-
return /* @__PURE__ */ (0,
|
|
14813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14761
14814
|
OptionLink,
|
|
14762
14815
|
{
|
|
14763
14816
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14775,11 +14828,11 @@ function ShopFilters({
|
|
|
14775
14828
|
);
|
|
14776
14829
|
}) }, attr.key);
|
|
14777
14830
|
}),
|
|
14778
|
-
showPriceGroup && /* @__PURE__ */ (0,
|
|
14831
|
+
showPriceGroup && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14779
14832
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14780
14833
|
const nextMin = isActive ? void 0 : band.min;
|
|
14781
14834
|
const nextMax = isActive ? void 0 : band.max;
|
|
14782
|
-
return /* @__PURE__ */ (0,
|
|
14835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14783
14836
|
OptionLink,
|
|
14784
14837
|
{
|
|
14785
14838
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14790,7 +14843,7 @@ function ShopFilters({
|
|
|
14790
14843
|
i
|
|
14791
14844
|
);
|
|
14792
14845
|
}) }),
|
|
14793
|
-
hasOnSale && /* @__PURE__ */ (0,
|
|
14846
|
+
hasOnSale && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14794
14847
|
OptionLink,
|
|
14795
14848
|
{
|
|
14796
14849
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14799,7 +14852,7 @@ function ShopFilters({
|
|
|
14799
14852
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14800
14853
|
}
|
|
14801
14854
|
),
|
|
14802
|
-
/* @__PURE__ */ (0,
|
|
14855
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
14803
14856
|
"a",
|
|
14804
14857
|
{
|
|
14805
14858
|
href: hrefs.clearAll(),
|
|
@@ -14816,7 +14869,7 @@ function ShopFilters({
|
|
|
14816
14869
|
|
|
14817
14870
|
// src/components/course-catalog-filters.tsx
|
|
14818
14871
|
var import_utils15 = require("@reblu/site-ui/utils");
|
|
14819
|
-
var
|
|
14872
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
14820
14873
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
14821
14874
|
{ max: 5e3 },
|
|
14822
14875
|
{ min: 5e3, max: 15e3 },
|
|
@@ -14869,9 +14922,9 @@ function CourseCatalogFilters({
|
|
|
14869
14922
|
const showPrice = enabled.price !== false;
|
|
14870
14923
|
const isFree = Boolean(active.free);
|
|
14871
14924
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
14872
|
-
return /* @__PURE__ */ (0,
|
|
14873
|
-
showCategories && /* @__PURE__ */ (0,
|
|
14874
|
-
/* @__PURE__ */ (0,
|
|
14925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: (0, import_utils15.cn)("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
14926
|
+
showCategories && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FilterFieldset, { legend: t.category, children: [
|
|
14927
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14875
14928
|
OptionLink,
|
|
14876
14929
|
{
|
|
14877
14930
|
href: categoryHref(void 0),
|
|
@@ -14883,7 +14936,7 @@ function CourseCatalogFilters({
|
|
|
14883
14936
|
sortedCategories.map((category) => {
|
|
14884
14937
|
const isActive = active.category === category.slug;
|
|
14885
14938
|
const next2 = isActive ? void 0 : category.slug;
|
|
14886
|
-
return /* @__PURE__ */ (0,
|
|
14939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14887
14940
|
OptionLink,
|
|
14888
14941
|
{
|
|
14889
14942
|
href: categoryHref(next2),
|
|
@@ -14895,8 +14948,8 @@ function CourseCatalogFilters({
|
|
|
14895
14948
|
);
|
|
14896
14949
|
})
|
|
14897
14950
|
] }),
|
|
14898
|
-
showInstructors && /* @__PURE__ */ (0,
|
|
14899
|
-
/* @__PURE__ */ (0,
|
|
14951
|
+
showInstructors && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FilterFieldset, { legend: t.instructor, children: [
|
|
14952
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14900
14953
|
OptionLink,
|
|
14901
14954
|
{
|
|
14902
14955
|
href: hrefs.instructor(void 0),
|
|
@@ -14908,7 +14961,7 @@ function CourseCatalogFilters({
|
|
|
14908
14961
|
named.map((instructor) => {
|
|
14909
14962
|
const isActive = active.instructor === instructor.id;
|
|
14910
14963
|
const next2 = isActive ? void 0 : instructor.id;
|
|
14911
|
-
return /* @__PURE__ */ (0,
|
|
14964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14912
14965
|
OptionLink,
|
|
14913
14966
|
{
|
|
14914
14967
|
href: hrefs.instructor(next2),
|
|
@@ -14920,8 +14973,8 @@ function CourseCatalogFilters({
|
|
|
14920
14973
|
);
|
|
14921
14974
|
})
|
|
14922
14975
|
] }),
|
|
14923
|
-
showPrice && /* @__PURE__ */ (0,
|
|
14924
|
-
/* @__PURE__ */ (0,
|
|
14976
|
+
showPrice && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(FilterFieldset, { legend: t.price, children: [
|
|
14977
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14925
14978
|
OptionLink,
|
|
14926
14979
|
{
|
|
14927
14980
|
href: hrefs.free(!isFree),
|
|
@@ -14936,7 +14989,7 @@ function CourseCatalogFilters({
|
|
|
14936
14989
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
14937
14990
|
const nextMin = isActive ? void 0 : band.min;
|
|
14938
14991
|
const nextMax = isActive ? void 0 : band.max;
|
|
14939
|
-
return /* @__PURE__ */ (0,
|
|
14992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14940
14993
|
OptionLink,
|
|
14941
14994
|
{
|
|
14942
14995
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14948,7 +15001,7 @@ function CourseCatalogFilters({
|
|
|
14948
15001
|
);
|
|
14949
15002
|
})
|
|
14950
15003
|
] }),
|
|
14951
|
-
/* @__PURE__ */ (0,
|
|
15004
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
14952
15005
|
"a",
|
|
14953
15006
|
{
|
|
14954
15007
|
href: hrefs.clearAll(),
|
|
@@ -14971,7 +15024,7 @@ function CourseCatalogFilters({
|
|
|
14971
15024
|
|
|
14972
15025
|
// src/components/cart-line-list.tsx
|
|
14973
15026
|
var import_utils16 = require("@reblu/site-ui/utils");
|
|
14974
|
-
var
|
|
15027
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
14975
15028
|
var DEFAULT_LABELS2 = {
|
|
14976
15029
|
quantityLabel: "Cantidad",
|
|
14977
15030
|
decrease: "Reducir cantidad",
|
|
@@ -14997,9 +15050,9 @@ function CartLineList({
|
|
|
14997
15050
|
}) {
|
|
14998
15051
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14999
15052
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15000
|
-
return /* @__PURE__ */ (0,
|
|
15001
|
-
/* @__PURE__ */ (0,
|
|
15002
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0,
|
|
15053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_utils16.cn)("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
15054
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
15055
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
15003
15056
|
"div",
|
|
15004
15057
|
{
|
|
15005
15058
|
role: "status",
|
|
@@ -15008,33 +15061,33 @@ function CartLineList({
|
|
|
15008
15061
|
children: noticeContent
|
|
15009
15062
|
}
|
|
15010
15063
|
),
|
|
15011
|
-
/* @__PURE__ */ (0,
|
|
15064
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "space-y-4", children: items.map((item) => {
|
|
15012
15065
|
const maxQty = item.maxStock ?? Infinity;
|
|
15013
15066
|
const atMax = item.quantity >= maxQty;
|
|
15014
15067
|
const atMin = item.quantity <= 1;
|
|
15015
15068
|
const message = lineMessage?.(item);
|
|
15016
|
-
return /* @__PURE__ */ (0,
|
|
15069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
15017
15070
|
"li",
|
|
15018
15071
|
{
|
|
15019
15072
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
15020
15073
|
children: [
|
|
15021
|
-
/* @__PURE__ */ (0,
|
|
15022
|
-
/* @__PURE__ */ (0,
|
|
15023
|
-
/* @__PURE__ */ (0,
|
|
15024
|
-
item.variantName && /* @__PURE__ */ (0,
|
|
15025
|
-
/* @__PURE__ */ (0,
|
|
15074
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15075
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
15076
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15077
|
+
item.variantName && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15078
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
15026
15079
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
15027
15080
|
" ",
|
|
15028
15081
|
t.unitPriceSuffix
|
|
15029
15082
|
] }),
|
|
15030
|
-
/* @__PURE__ */ (0,
|
|
15083
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
15031
15084
|
"div",
|
|
15032
15085
|
{
|
|
15033
15086
|
role: "group",
|
|
15034
15087
|
"aria-label": t.quantityLabel,
|
|
15035
15088
|
className: "mt-3 flex items-center gap-3",
|
|
15036
15089
|
children: [
|
|
15037
|
-
/* @__PURE__ */ (0,
|
|
15090
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
15038
15091
|
"button",
|
|
15039
15092
|
{
|
|
15040
15093
|
type: "button",
|
|
@@ -15045,8 +15098,8 @@ function CartLineList({
|
|
|
15045
15098
|
children: "\u2212"
|
|
15046
15099
|
}
|
|
15047
15100
|
),
|
|
15048
|
-
/* @__PURE__ */ (0,
|
|
15049
|
-
/* @__PURE__ */ (0,
|
|
15101
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
15102
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
15050
15103
|
"button",
|
|
15051
15104
|
{
|
|
15052
15105
|
type: "button",
|
|
@@ -15057,7 +15110,7 @@ function CartLineList({
|
|
|
15057
15110
|
children: "+"
|
|
15058
15111
|
}
|
|
15059
15112
|
),
|
|
15060
|
-
onRemove && /* @__PURE__ */ (0,
|
|
15113
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
15061
15114
|
"button",
|
|
15062
15115
|
{
|
|
15063
15116
|
type: "button",
|
|
@@ -15070,7 +15123,7 @@ function CartLineList({
|
|
|
15070
15123
|
]
|
|
15071
15124
|
}
|
|
15072
15125
|
),
|
|
15073
|
-
message != null && message !== false && /* @__PURE__ */ (0,
|
|
15126
|
+
message != null && message !== false && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
15074
15127
|
"p",
|
|
15075
15128
|
{
|
|
15076
15129
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15079,7 +15132,7 @@ function CartLineList({
|
|
|
15079
15132
|
}
|
|
15080
15133
|
)
|
|
15081
15134
|
] }),
|
|
15082
|
-
/* @__PURE__ */ (0,
|
|
15135
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15083
15136
|
]
|
|
15084
15137
|
},
|
|
15085
15138
|
lineKey(item.productId, item.variantId)
|
|
@@ -15090,7 +15143,7 @@ function CartLineList({
|
|
|
15090
15143
|
|
|
15091
15144
|
// src/components/cart-summary.tsx
|
|
15092
15145
|
var import_utils17 = require("@reblu/site-ui/utils");
|
|
15093
|
-
var
|
|
15146
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
15094
15147
|
var DEFAULT_LABELS3 = {
|
|
15095
15148
|
subtotal: "Subtotal",
|
|
15096
15149
|
discountPrefix: "Descuento",
|
|
@@ -15120,37 +15173,37 @@ function CartSummary({
|
|
|
15120
15173
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15121
15174
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15122
15175
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15123
|
-
const breakdown = /* @__PURE__ */ (0,
|
|
15176
|
+
const breakdown = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
15124
15177
|
"dl",
|
|
15125
15178
|
{
|
|
15126
15179
|
className: (0, import_utils17.cn)("space-y-2 text-sm", !hasNotice && className),
|
|
15127
15180
|
"data-slot": "cart-summary",
|
|
15128
15181
|
children: [
|
|
15129
|
-
/* @__PURE__ */ (0,
|
|
15130
|
-
/* @__PURE__ */ (0,
|
|
15131
|
-
/* @__PURE__ */ (0,
|
|
15182
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15183
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dt", { children: t.subtotal }),
|
|
15184
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15132
15185
|
] }),
|
|
15133
|
-
hasDiscount && /* @__PURE__ */ (0,
|
|
15134
|
-
/* @__PURE__ */ (0,
|
|
15135
|
-
/* @__PURE__ */ (0,
|
|
15186
|
+
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
15187
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
15188
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("dd", { children: [
|
|
15136
15189
|
"-",
|
|
15137
15190
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15138
15191
|
] })
|
|
15139
15192
|
] }),
|
|
15140
|
-
shippingEnabled && /* @__PURE__ */ (0,
|
|
15141
|
-
/* @__PURE__ */ (0,
|
|
15142
|
-
/* @__PURE__ */ (0,
|
|
15193
|
+
shippingEnabled && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15194
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dt", { children: t.shipping }),
|
|
15195
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15143
15196
|
] }),
|
|
15144
|
-
/* @__PURE__ */ (0,
|
|
15145
|
-
/* @__PURE__ */ (0,
|
|
15146
|
-
/* @__PURE__ */ (0,
|
|
15197
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
15198
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dt", { children: t.total }),
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15147
15200
|
] })
|
|
15148
15201
|
]
|
|
15149
15202
|
}
|
|
15150
15203
|
);
|
|
15151
15204
|
if (!hasNotice) return breakdown;
|
|
15152
|
-
return /* @__PURE__ */ (0,
|
|
15153
|
-
/* @__PURE__ */ (0,
|
|
15205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_utils17.cn)("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
15206
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
15154
15207
|
"div",
|
|
15155
15208
|
{
|
|
15156
15209
|
role: "status",
|
|
@@ -15165,7 +15218,7 @@ function CartSummary({
|
|
|
15165
15218
|
|
|
15166
15219
|
// src/components/cart-adjustments-notice.tsx
|
|
15167
15220
|
var import_utils18 = require("@reblu/site-ui/utils");
|
|
15168
|
-
var
|
|
15221
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
15169
15222
|
var DEFAULT_LABELS4 = {
|
|
15170
15223
|
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.`,
|
|
15171
15224
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15199,20 +15252,20 @@ function CartAdjustmentsNotice({
|
|
|
15199
15252
|
);
|
|
15200
15253
|
}
|
|
15201
15254
|
if (messages.length === 0) return null;
|
|
15202
|
-
return /* @__PURE__ */ (0,
|
|
15255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
15203
15256
|
"div",
|
|
15204
15257
|
{
|
|
15205
15258
|
role: "status",
|
|
15206
15259
|
className: (0, import_utils18.cn)("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15207
15260
|
"data-slot": "cart-adjustments-notice",
|
|
15208
|
-
children: messages.length === 1 ? /* @__PURE__ */ (0,
|
|
15261
|
+
children: messages.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: messages[0] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { children: message }, index)) })
|
|
15209
15262
|
}
|
|
15210
15263
|
);
|
|
15211
15264
|
}
|
|
15212
15265
|
|
|
15213
15266
|
// src/components/added-to-cart-toast.tsx
|
|
15214
15267
|
var import_utils19 = require("@reblu/site-ui/utils");
|
|
15215
|
-
var
|
|
15268
|
+
var import_jsx_runtime22 = (
|
|
15216
15269
|
// eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15217
15270
|
require("react/jsx-runtime")
|
|
15218
15271
|
);
|
|
@@ -15235,7 +15288,7 @@ function AddedToCartToast({
|
|
|
15235
15288
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15236
15289
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
15237
15290
|
const variant = status === "success" ? "success" : "error";
|
|
15238
|
-
return /* @__PURE__ */ (0,
|
|
15291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
15239
15292
|
"div",
|
|
15240
15293
|
{
|
|
15241
15294
|
"data-slot": "added-to-cart-toast",
|
|
@@ -15247,12 +15300,12 @@ function AddedToCartToast({
|
|
|
15247
15300
|
className
|
|
15248
15301
|
),
|
|
15249
15302
|
children: [
|
|
15250
|
-
hasThumbnail && /* @__PURE__ */ (0,
|
|
15251
|
-
/* @__PURE__ */ (0,
|
|
15252
|
-
/* @__PURE__ */ (0,
|
|
15253
|
-
/* @__PURE__ */ (0,
|
|
15303
|
+
hasThumbnail && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15304
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
15305
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15306
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
15254
15307
|
] }),
|
|
15255
|
-
/* @__PURE__ */ (0,
|
|
15308
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
15256
15309
|
]
|
|
15257
15310
|
}
|
|
15258
15311
|
);
|
|
@@ -15260,7 +15313,7 @@ function AddedToCartToast({
|
|
|
15260
15313
|
|
|
15261
15314
|
// src/components/checkout-login-prompt.tsx
|
|
15262
15315
|
var import_utils20 = require("@reblu/site-ui/utils");
|
|
15263
|
-
var
|
|
15316
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
15264
15317
|
var DEFAULT_LABELS6 = {
|
|
15265
15318
|
title: "Identificaci\xF3n",
|
|
15266
15319
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -15287,9 +15340,9 @@ function CheckoutLoginPrompt({
|
|
|
15287
15340
|
if (!open) return null;
|
|
15288
15341
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
15289
15342
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
15290
|
-
return /* @__PURE__ */ (0,
|
|
15291
|
-
/* @__PURE__ */ (0,
|
|
15292
|
-
/* @__PURE__ */ (0,
|
|
15343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
15344
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15345
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
15293
15346
|
"div",
|
|
15294
15347
|
{
|
|
15295
15348
|
role: "dialog",
|
|
@@ -15301,12 +15354,12 @@ function CheckoutLoginPrompt({
|
|
|
15301
15354
|
className
|
|
15302
15355
|
),
|
|
15303
15356
|
children: [
|
|
15304
|
-
/* @__PURE__ */ (0,
|
|
15305
|
-
/* @__PURE__ */ (0,
|
|
15306
|
-
/* @__PURE__ */ (0,
|
|
15307
|
-
/* @__PURE__ */ (0,
|
|
15357
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15358
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
15359
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15360
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
15308
15361
|
] }),
|
|
15309
|
-
/* @__PURE__ */ (0,
|
|
15362
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15310
15363
|
"button",
|
|
15311
15364
|
{
|
|
15312
15365
|
type: "button",
|
|
@@ -15317,9 +15370,9 @@ function CheckoutLoginPrompt({
|
|
|
15317
15370
|
}
|
|
15318
15371
|
)
|
|
15319
15372
|
] }),
|
|
15320
|
-
/* @__PURE__ */ (0,
|
|
15321
|
-
/* @__PURE__ */ (0,
|
|
15322
|
-
/* @__PURE__ */ (0,
|
|
15373
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-2", children: [
|
|
15374
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15375
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15323
15376
|
"input",
|
|
15324
15377
|
{
|
|
15325
15378
|
id: "checkout-login-prompt-email",
|
|
@@ -15334,10 +15387,10 @@ function CheckoutLoginPrompt({
|
|
|
15334
15387
|
)
|
|
15335
15388
|
}
|
|
15336
15389
|
),
|
|
15337
|
-
error && /* @__PURE__ */ (0,
|
|
15390
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-destructive", children: error })
|
|
15338
15391
|
] }),
|
|
15339
|
-
/* @__PURE__ */ (0,
|
|
15340
|
-
/* @__PURE__ */ (0,
|
|
15392
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-2", children: [
|
|
15393
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15341
15394
|
"button",
|
|
15342
15395
|
{
|
|
15343
15396
|
type: "button",
|
|
@@ -15350,7 +15403,7 @@ function CheckoutLoginPrompt({
|
|
|
15350
15403
|
children: checking ? t.checking : t.continueWithEmail
|
|
15351
15404
|
}
|
|
15352
15405
|
),
|
|
15353
|
-
/* @__PURE__ */ (0,
|
|
15406
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
15354
15407
|
"button",
|
|
15355
15408
|
{
|
|
15356
15409
|
type: "button",
|
|
@@ -15369,7 +15422,7 @@ function CheckoutLoginPrompt({
|
|
|
15369
15422
|
// src/components/checkout-form.tsx
|
|
15370
15423
|
var import_utils21 = require("@reblu/site-ui/utils");
|
|
15371
15424
|
var import_phone_input = require("@reblu/site-ui/phone-input");
|
|
15372
|
-
var
|
|
15425
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
15373
15426
|
var DEFAULT_LABELS7 = {
|
|
15374
15427
|
contactTitle: "Datos de contacto",
|
|
15375
15428
|
nameLabel: "Nombre completo",
|
|
@@ -15425,9 +15478,9 @@ function CheckoutForm({
|
|
|
15425
15478
|
event.preventDefault();
|
|
15426
15479
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15427
15480
|
}
|
|
15428
|
-
return /* @__PURE__ */ (0,
|
|
15481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
15429
15482
|
loginPrompt,
|
|
15430
|
-
/* @__PURE__ */ (0,
|
|
15483
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
15431
15484
|
"form",
|
|
15432
15485
|
{
|
|
15433
15486
|
"data-testid": "checkout-form",
|
|
@@ -15435,12 +15488,12 @@ function CheckoutForm({
|
|
|
15435
15488
|
className: (0, import_utils21.cn)("space-y-8", className),
|
|
15436
15489
|
"data-slot": "checkout-form",
|
|
15437
15490
|
children: [
|
|
15438
|
-
/* @__PURE__ */ (0,
|
|
15439
|
-
/* @__PURE__ */ (0,
|
|
15440
|
-
/* @__PURE__ */ (0,
|
|
15441
|
-
/* @__PURE__ */ (0,
|
|
15442
|
-
/* @__PURE__ */ (0,
|
|
15443
|
-
/* @__PURE__ */ (0,
|
|
15491
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("section", { className: "space-y-4", children: [
|
|
15492
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15493
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15494
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-1", children: [
|
|
15495
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15496
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15444
15497
|
"input",
|
|
15445
15498
|
{
|
|
15446
15499
|
id: "checkout-form-name",
|
|
@@ -15455,11 +15508,11 @@ function CheckoutForm({
|
|
|
15455
15508
|
)
|
|
15456
15509
|
}
|
|
15457
15510
|
),
|
|
15458
|
-
contactErrors?.name && /* @__PURE__ */ (0,
|
|
15511
|
+
contactErrors?.name && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15459
15512
|
] }),
|
|
15460
|
-
/* @__PURE__ */ (0,
|
|
15461
|
-
/* @__PURE__ */ (0,
|
|
15462
|
-
/* @__PURE__ */ (0,
|
|
15513
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-1", children: [
|
|
15514
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15515
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15463
15516
|
"input",
|
|
15464
15517
|
{
|
|
15465
15518
|
id: "checkout-form-email",
|
|
@@ -15474,9 +15527,9 @@ function CheckoutForm({
|
|
|
15474
15527
|
)
|
|
15475
15528
|
}
|
|
15476
15529
|
),
|
|
15477
|
-
contactErrors?.email && /* @__PURE__ */ (0,
|
|
15530
|
+
contactErrors?.email && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15478
15531
|
] }),
|
|
15479
|
-
/* @__PURE__ */ (0,
|
|
15532
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15480
15533
|
import_phone_input.PhoneInput,
|
|
15481
15534
|
{
|
|
15482
15535
|
id: "checkout-form-phone",
|
|
@@ -15490,26 +15543,26 @@ function CheckoutForm({
|
|
|
15490
15543
|
] })
|
|
15491
15544
|
] }),
|
|
15492
15545
|
children2,
|
|
15493
|
-
generalError ? /* @__PURE__ */ (0,
|
|
15494
|
-
/* @__PURE__ */ (0,
|
|
15495
|
-
/* @__PURE__ */ (0,
|
|
15496
|
-
autoDiscount ? /* @__PURE__ */ (0,
|
|
15546
|
+
generalError ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15547
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("section", { className: "space-y-3", children: [
|
|
15548
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15549
|
+
autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
15497
15550
|
"div",
|
|
15498
15551
|
{
|
|
15499
15552
|
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",
|
|
15500
15553
|
"data-slot": "checkout-staff-discount",
|
|
15501
15554
|
children: [
|
|
15502
|
-
/* @__PURE__ */ (0,
|
|
15503
|
-
/* @__PURE__ */ (0,
|
|
15555
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
15556
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
15504
15557
|
]
|
|
15505
15558
|
}
|
|
15506
15559
|
) : null,
|
|
15507
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0,
|
|
15508
|
-
/* @__PURE__ */ (0,
|
|
15509
|
-
/* @__PURE__ */ (0,
|
|
15510
|
-
/* @__PURE__ */ (0,
|
|
15560
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
|
|
15561
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15562
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15563
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15511
15564
|
] }),
|
|
15512
|
-
/* @__PURE__ */ (0,
|
|
15565
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15513
15566
|
"button",
|
|
15514
15567
|
{
|
|
15515
15568
|
type: "button",
|
|
@@ -15519,9 +15572,9 @@ function CheckoutForm({
|
|
|
15519
15572
|
children: t.removeDiscount
|
|
15520
15573
|
}
|
|
15521
15574
|
)
|
|
15522
|
-
] }) : /* @__PURE__ */ (0,
|
|
15523
|
-
/* @__PURE__ */ (0,
|
|
15524
|
-
/* @__PURE__ */ (0,
|
|
15575
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex gap-2", children: [
|
|
15576
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15577
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15525
15578
|
"input",
|
|
15526
15579
|
{
|
|
15527
15580
|
id: "checkout-form-discount-code",
|
|
@@ -15533,7 +15586,7 @@ function CheckoutForm({
|
|
|
15533
15586
|
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"
|
|
15534
15587
|
}
|
|
15535
15588
|
),
|
|
15536
|
-
/* @__PURE__ */ (0,
|
|
15589
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15537
15590
|
"button",
|
|
15538
15591
|
{
|
|
15539
15592
|
type: "button",
|
|
@@ -15544,9 +15597,9 @@ function CheckoutForm({
|
|
|
15544
15597
|
}
|
|
15545
15598
|
)
|
|
15546
15599
|
] }),
|
|
15547
|
-
discountError && /* @__PURE__ */ (0,
|
|
15600
|
+
discountError && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-destructive", children: discountError })
|
|
15548
15601
|
] }),
|
|
15549
|
-
/* @__PURE__ */ (0,
|
|
15602
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
15550
15603
|
"button",
|
|
15551
15604
|
{
|
|
15552
15605
|
type: "submit",
|
|
@@ -15569,7 +15622,7 @@ var import_utils23 = require("@reblu/site-ui/utils");
|
|
|
15569
15622
|
|
|
15570
15623
|
// src/components/order-invoice-link.tsx
|
|
15571
15624
|
var import_utils22 = require("@reblu/site-ui/utils");
|
|
15572
|
-
var
|
|
15625
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
15573
15626
|
var DEFAULT_LABELS8 = {
|
|
15574
15627
|
linkLabel: "Descargar la factura {number}",
|
|
15575
15628
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15577,8 +15630,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15577
15630
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15578
15631
|
if (!invoice) return null;
|
|
15579
15632
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15580
|
-
return /* @__PURE__ */ (0,
|
|
15581
|
-
/* @__PURE__ */ (0,
|
|
15633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: (0, import_utils22.cn)("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15634
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
15582
15635
|
"a",
|
|
15583
15636
|
{
|
|
15584
15637
|
href: invoice.url,
|
|
@@ -15586,12 +15639,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15586
15639
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15587
15640
|
}
|
|
15588
15641
|
),
|
|
15589
|
-
/* @__PURE__ */ (0,
|
|
15642
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15590
15643
|
] });
|
|
15591
15644
|
}
|
|
15592
15645
|
|
|
15593
15646
|
// src/components/order-confirmation.tsx
|
|
15594
|
-
var
|
|
15647
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
15595
15648
|
var DEFAULT_LABELS9 = {
|
|
15596
15649
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15597
15650
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15657,43 +15710,43 @@ function OrderConfirmation({
|
|
|
15657
15710
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15658
15711
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15659
15712
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15660
|
-
return /* @__PURE__ */ (0,
|
|
15661
|
-
/* @__PURE__ */ (0,
|
|
15662
|
-
/* @__PURE__ */ (0,
|
|
15663
|
-
showFullOrderSummary && order && /* @__PURE__ */ (0,
|
|
15664
|
-
/* @__PURE__ */ (0,
|
|
15665
|
-
/* @__PURE__ */ (0,
|
|
15666
|
-
/* @__PURE__ */ (0,
|
|
15713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: (0, import_utils23.cn)("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15714
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h1", { className: "text-3xl font-bold", children: title }),
|
|
15715
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15716
|
+
showFullOrderSummary && order && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-6", children: [
|
|
15717
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15718
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15719
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15667
15720
|
] }),
|
|
15668
|
-
/* @__PURE__ */ (0,
|
|
15669
|
-
order.items.map((item, idx) => /* @__PURE__ */ (0,
|
|
15721
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15722
|
+
order.items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
15670
15723
|
"div",
|
|
15671
15724
|
{
|
|
15672
15725
|
className: "flex justify-between gap-4 text-sm",
|
|
15673
15726
|
children: [
|
|
15674
|
-
/* @__PURE__ */ (0,
|
|
15727
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15675
15728
|
item.product.name,
|
|
15676
15729
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15677
15730
|
" x",
|
|
15678
15731
|
item.quantity
|
|
15679
15732
|
] }),
|
|
15680
|
-
/* @__PURE__ */ (0,
|
|
15733
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15681
15734
|
]
|
|
15682
15735
|
},
|
|
15683
15736
|
idx
|
|
15684
15737
|
)),
|
|
15685
|
-
/* @__PURE__ */ (0,
|
|
15686
|
-
/* @__PURE__ */ (0,
|
|
15687
|
-
/* @__PURE__ */ (0,
|
|
15738
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15739
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: t.totalLabel }),
|
|
15740
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15688
15741
|
] }) })
|
|
15689
15742
|
] }),
|
|
15690
|
-
/* @__PURE__ */ (0,
|
|
15743
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15691
15744
|
t.confirmationEmailPrefix,
|
|
15692
15745
|
" ",
|
|
15693
|
-
/* @__PURE__ */ (0,
|
|
15746
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15694
15747
|
"."
|
|
15695
15748
|
] }),
|
|
15696
|
-
/* @__PURE__ */ (0,
|
|
15749
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15697
15750
|
OrderInvoiceLink,
|
|
15698
15751
|
{
|
|
15699
15752
|
invoice: order.invoice,
|
|
@@ -15701,11 +15754,11 @@ function OrderConfirmation({
|
|
|
15701
15754
|
}
|
|
15702
15755
|
)
|
|
15703
15756
|
] }),
|
|
15704
|
-
showOrderReference && order && /* @__PURE__ */ (0,
|
|
15705
|
-
/* @__PURE__ */ (0,
|
|
15706
|
-
/* @__PURE__ */ (0,
|
|
15757
|
+
showOrderReference && order && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15758
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15759
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15707
15760
|
] }),
|
|
15708
|
-
status === "failed" && cartHref && /* @__PURE__ */ (0,
|
|
15761
|
+
status === "failed" && cartHref && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15709
15762
|
"a",
|
|
15710
15763
|
{
|
|
15711
15764
|
href: cartHref,
|
|
@@ -15713,7 +15766,7 @@ function OrderConfirmation({
|
|
|
15713
15766
|
children: t.backToCartLabel
|
|
15714
15767
|
}
|
|
15715
15768
|
),
|
|
15716
|
-
showRecheck && /* @__PURE__ */ (0,
|
|
15769
|
+
showRecheck && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
15717
15770
|
"button",
|
|
15718
15771
|
{
|
|
15719
15772
|
type: "button",
|
|
@@ -15722,16 +15775,16 @@ function OrderConfirmation({
|
|
|
15722
15775
|
children: t.recheckLabel
|
|
15723
15776
|
}
|
|
15724
15777
|
),
|
|
15725
|
-
showSessionReference && /* @__PURE__ */ (0,
|
|
15726
|
-
/* @__PURE__ */ (0,
|
|
15727
|
-
/* @__PURE__ */ (0,
|
|
15778
|
+
showSessionReference && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15779
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15780
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15728
15781
|
] })
|
|
15729
15782
|
] });
|
|
15730
15783
|
}
|
|
15731
15784
|
|
|
15732
15785
|
// src/components/full-invoice-fields.tsx
|
|
15733
15786
|
var import_utils24 = require("@reblu/site-ui/utils");
|
|
15734
|
-
var
|
|
15787
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
15735
15788
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15736
15789
|
wantsFullInvoice: false,
|
|
15737
15790
|
billingIdType: "NIF",
|
|
@@ -15848,12 +15901,12 @@ function FullInvoiceFields({
|
|
|
15848
15901
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15849
15902
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15850
15903
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15851
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */ (0,
|
|
15904
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15852
15905
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15853
|
-
return /* @__PURE__ */ (0,
|
|
15854
|
-
overCap ? /* @__PURE__ */ (0,
|
|
15855
|
-
/* @__PURE__ */ (0,
|
|
15856
|
-
/* @__PURE__ */ (0,
|
|
15906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("section", { className: (0, import_utils24.cn)("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15907
|
+
overCap ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
15908
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15909
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15857
15910
|
"input",
|
|
15858
15911
|
{
|
|
15859
15912
|
type: "checkbox",
|
|
@@ -15863,12 +15916,12 @@ function FullInvoiceFields({
|
|
|
15863
15916
|
),
|
|
15864
15917
|
t.toggle
|
|
15865
15918
|
] }),
|
|
15866
|
-
/* @__PURE__ */ (0,
|
|
15919
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15867
15920
|
] }),
|
|
15868
|
-
showFields && /* @__PURE__ */ (0,
|
|
15869
|
-
/* @__PURE__ */ (0,
|
|
15870
|
-
/* @__PURE__ */ (0,
|
|
15871
|
-
/* @__PURE__ */ (0,
|
|
15921
|
+
showFields && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15922
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
15923
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15924
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15872
15925
|
"select",
|
|
15873
15926
|
{
|
|
15874
15927
|
id: "full-invoice-id-type",
|
|
@@ -15877,14 +15930,14 @@ function FullInvoiceFields({
|
|
|
15877
15930
|
value: value.billingIdType,
|
|
15878
15931
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15879
15932
|
...invalid2("billingIdType"),
|
|
15880
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */ (0,
|
|
15933
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15881
15934
|
}
|
|
15882
15935
|
),
|
|
15883
15936
|
error("billingIdType")
|
|
15884
15937
|
] }),
|
|
15885
|
-
!isSpanishNif && /* @__PURE__ */ (0,
|
|
15886
|
-
/* @__PURE__ */ (0,
|
|
15887
|
-
/* @__PURE__ */ (0,
|
|
15938
|
+
!isSpanishNif && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
15939
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15940
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
15888
15941
|
"select",
|
|
15889
15942
|
{
|
|
15890
15943
|
id: "full-invoice-id-country",
|
|
@@ -15894,16 +15947,16 @@ function FullInvoiceFields({
|
|
|
15894
15947
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15895
15948
|
...invalid2("billingIdCountry"),
|
|
15896
15949
|
children: [
|
|
15897
|
-
/* @__PURE__ */ (0,
|
|
15898
|
-
countries.map((c) => /* @__PURE__ */ (0,
|
|
15950
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15951
|
+
countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: c.code, children: c.name }, c.code))
|
|
15899
15952
|
]
|
|
15900
15953
|
}
|
|
15901
15954
|
),
|
|
15902
15955
|
error("billingIdCountry")
|
|
15903
15956
|
] }),
|
|
15904
|
-
/* @__PURE__ */ (0,
|
|
15905
|
-
/* @__PURE__ */ (0,
|
|
15906
|
-
/* @__PURE__ */ (0,
|
|
15957
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
15958
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15959
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15907
15960
|
"input",
|
|
15908
15961
|
{
|
|
15909
15962
|
id: "full-invoice-nif",
|
|
@@ -15916,9 +15969,9 @@ function FullInvoiceFields({
|
|
|
15916
15969
|
),
|
|
15917
15970
|
error("billingNif")
|
|
15918
15971
|
] }),
|
|
15919
|
-
/* @__PURE__ */ (0,
|
|
15920
|
-
/* @__PURE__ */ (0,
|
|
15921
|
-
/* @__PURE__ */ (0,
|
|
15972
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
15973
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15974
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15922
15975
|
"input",
|
|
15923
15976
|
{
|
|
15924
15977
|
id: "full-invoice-name",
|
|
@@ -15931,9 +15984,9 @@ function FullInvoiceFields({
|
|
|
15931
15984
|
),
|
|
15932
15985
|
error("billingName")
|
|
15933
15986
|
] }),
|
|
15934
|
-
/* @__PURE__ */ (0,
|
|
15935
|
-
/* @__PURE__ */ (0,
|
|
15936
|
-
/* @__PURE__ */ (0,
|
|
15987
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15988
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15989
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15937
15990
|
"input",
|
|
15938
15991
|
{
|
|
15939
15992
|
id: "full-invoice-street",
|
|
@@ -15945,9 +15998,9 @@ function FullInvoiceFields({
|
|
|
15945
15998
|
}
|
|
15946
15999
|
)
|
|
15947
16000
|
] }),
|
|
15948
|
-
/* @__PURE__ */ (0,
|
|
15949
|
-
/* @__PURE__ */ (0,
|
|
15950
|
-
/* @__PURE__ */ (0,
|
|
16001
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
16002
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
16003
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15951
16004
|
"input",
|
|
15952
16005
|
{
|
|
15953
16006
|
id: "full-invoice-postal-code",
|
|
@@ -15958,9 +16011,9 @@ function FullInvoiceFields({
|
|
|
15958
16011
|
}
|
|
15959
16012
|
)
|
|
15960
16013
|
] }),
|
|
15961
|
-
/* @__PURE__ */ (0,
|
|
15962
|
-
/* @__PURE__ */ (0,
|
|
15963
|
-
/* @__PURE__ */ (0,
|
|
16014
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
16015
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
16016
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15964
16017
|
"input",
|
|
15965
16018
|
{
|
|
15966
16019
|
id: "full-invoice-city",
|
|
@@ -15971,9 +16024,9 @@ function FullInvoiceFields({
|
|
|
15971
16024
|
}
|
|
15972
16025
|
)
|
|
15973
16026
|
] }),
|
|
15974
|
-
/* @__PURE__ */ (0,
|
|
15975
|
-
/* @__PURE__ */ (0,
|
|
15976
|
-
/* @__PURE__ */ (0,
|
|
16027
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "space-y-1", children: [
|
|
16028
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
16029
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
15977
16030
|
"select",
|
|
15978
16031
|
{
|
|
15979
16032
|
id: "full-invoice-country",
|
|
@@ -15981,18 +16034,18 @@ function FullInvoiceFields({
|
|
|
15981
16034
|
required: true,
|
|
15982
16035
|
value: value.country,
|
|
15983
16036
|
onChange: (e) => set("country", e.target.value),
|
|
15984
|
-
children: countries.map((c) => /* @__PURE__ */ (0,
|
|
16037
|
+
children: countries.map((c) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: c.code, children: c.name }, c.code))
|
|
15985
16038
|
}
|
|
15986
16039
|
)
|
|
15987
16040
|
] }),
|
|
15988
|
-
/* @__PURE__ */ (0,
|
|
16041
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "sm:col-span-2", children: error("address") })
|
|
15989
16042
|
] })
|
|
15990
16043
|
] });
|
|
15991
16044
|
}
|
|
15992
16045
|
|
|
15993
16046
|
// src/components/contact-interest-field.tsx
|
|
15994
16047
|
var import_utils25 = require("@reblu/site-ui/utils");
|
|
15995
|
-
var
|
|
16048
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
15996
16049
|
function ContactInterestField({
|
|
15997
16050
|
interest,
|
|
15998
16051
|
value,
|
|
@@ -16009,18 +16062,18 @@ function ContactInterestField({
|
|
|
16009
16062
|
else next2.delete(option2);
|
|
16010
16063
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
16011
16064
|
};
|
|
16012
|
-
return /* @__PURE__ */ (0,
|
|
16013
|
-
/* @__PURE__ */ (0,
|
|
16014
|
-
/* @__PURE__ */ (0,
|
|
16065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("fieldset", { "data-slot": "contact-interest", className: (0, import_utils25.cn)("space-y-2", className), children: [
|
|
16066
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
16067
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
16015
16068
|
const id = `${idPrefix}-${index}`;
|
|
16016
|
-
return /* @__PURE__ */ (0,
|
|
16069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
16017
16070
|
"label",
|
|
16018
16071
|
{
|
|
16019
16072
|
htmlFor: id,
|
|
16020
16073
|
"data-slot": "contact-interest-option",
|
|
16021
16074
|
className: "flex items-center gap-2 text-sm",
|
|
16022
16075
|
children: [
|
|
16023
|
-
/* @__PURE__ */ (0,
|
|
16076
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
16024
16077
|
"input",
|
|
16025
16078
|
{
|
|
16026
16079
|
id,
|
|
@@ -16053,9 +16106,11 @@ var import_site_contracts = require("@reblu/site-contracts");
|
|
|
16053
16106
|
ContactInterestField,
|
|
16054
16107
|
CourseCatalogFilters,
|
|
16055
16108
|
CourseDescription,
|
|
16109
|
+
CoursePurchaseTerms,
|
|
16056
16110
|
DATA_REQUEST_TYPES,
|
|
16057
16111
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
16058
16112
|
DEFAULT_COURSE_PRICE_BANDS,
|
|
16113
|
+
DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
16059
16114
|
DEFAULT_INVOICE_COUNTRIES,
|
|
16060
16115
|
DEFAULT_LESSON_PREVIEW_LABELS,
|
|
16061
16116
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|