@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.js
CHANGED
|
@@ -13472,8 +13472,59 @@ function CourseDescription({
|
|
|
13472
13472
|
);
|
|
13473
13473
|
}
|
|
13474
13474
|
|
|
13475
|
-
// src/components/
|
|
13475
|
+
// src/components/course-purchase-terms.tsx
|
|
13476
13476
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13477
|
+
var DEFAULT_COURSE_PURCHASE_TERMS_LABELS = {
|
|
13478
|
+
withdrawalWaiver: "El acceso empieza al comprar: al pagar pides el acceso inmediato y renuncias al derecho de desistimiento de 14 d\xEDas.",
|
|
13479
|
+
accessDuration: (months) => `Acceso durante ${months} ${months === 1 ? "mes" : "meses"} desde la inscripci\xF3n.`,
|
|
13480
|
+
refundGuarantee: ({ basis, thresholdPercent, windowDays }) => {
|
|
13481
|
+
const period = windowDays != null ? ` durante ${windowDays} d\xEDas desde el pago` : "";
|
|
13482
|
+
const verb = basis === "LESSONS_COMPLETED" ? "completado" : "abierto";
|
|
13483
|
+
const usage = thresholdPercent != null ? ` si has ${verb} menos del ${thresholdPercent} % de las lecciones` : "";
|
|
13484
|
+
return `Garant\xEDa de reembolso${period}${usage}.`;
|
|
13485
|
+
}
|
|
13486
|
+
};
|
|
13487
|
+
function CoursePurchaseTerms({
|
|
13488
|
+
course,
|
|
13489
|
+
heading,
|
|
13490
|
+
headingLevel = 2,
|
|
13491
|
+
headingId = "course-purchase-terms-heading",
|
|
13492
|
+
labels,
|
|
13493
|
+
className,
|
|
13494
|
+
headingClassName,
|
|
13495
|
+
listClassName
|
|
13496
|
+
}) {
|
|
13497
|
+
const text3 = { ...DEFAULT_COURSE_PURCHASE_TERMS_LABELS, ...labels };
|
|
13498
|
+
const items = [];
|
|
13499
|
+
if (course.withdrawalWaiverRequired === true) {
|
|
13500
|
+
items.push({ key: "withdrawal-waiver", node: text3.withdrawalWaiver });
|
|
13501
|
+
}
|
|
13502
|
+
if (typeof course.accessDurationMonths === "number") {
|
|
13503
|
+
items.push({ key: "access-duration", node: text3.accessDuration(course.accessDurationMonths) });
|
|
13504
|
+
}
|
|
13505
|
+
if (course.refundGuarantee) {
|
|
13506
|
+
items.push({ key: "refund-guarantee", node: text3.refundGuarantee(course.refundGuarantee) });
|
|
13507
|
+
}
|
|
13508
|
+
if (items.length === 0) return null;
|
|
13509
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13510
|
+
const list = /* @__PURE__ */ jsx3("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ jsx3("li", { "data-slot": `course-purchase-terms-${item.key}`, children: item.node }, item.key)) });
|
|
13511
|
+
const Tag = `h${headingLevel}`;
|
|
13512
|
+
return /* @__PURE__ */ jsxs3(
|
|
13513
|
+
"section",
|
|
13514
|
+
{
|
|
13515
|
+
"data-slot": "course-purchase-terms",
|
|
13516
|
+
"aria-labelledby": hasHeading ? headingId : void 0,
|
|
13517
|
+
className: slotClassName("space-y-2", "", className),
|
|
13518
|
+
children: [
|
|
13519
|
+
hasHeading ? /* @__PURE__ */ jsx3(Tag, { id: headingId, className: slotClassName("", "text-lg font-semibold", headingClassName), children: heading }) : null,
|
|
13520
|
+
list
|
|
13521
|
+
]
|
|
13522
|
+
}
|
|
13523
|
+
);
|
|
13524
|
+
}
|
|
13525
|
+
|
|
13526
|
+
// src/components/lesson-preview.tsx
|
|
13527
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13477
13528
|
var DEFAULT_LESSON_PREVIEW_LABELS = {
|
|
13478
13529
|
badge: "Vista previa gratuita",
|
|
13479
13530
|
player: "V\xEDdeo",
|
|
@@ -13516,15 +13567,15 @@ function LessonPreview({
|
|
|
13516
13567
|
const html5 = markdownToSafeHtml(lesson.content);
|
|
13517
13568
|
const hasBody = html5 !== null && html5 !== "" && !isVisiblyEmpty2(html5);
|
|
13518
13569
|
const duration = typeof lesson.durationSeconds === "number" && lesson.durationSeconds > 0 ? clock(lesson.durationSeconds) : null;
|
|
13519
|
-
return /* @__PURE__ */
|
|
13570
|
+
return /* @__PURE__ */ jsxs4(
|
|
13520
13571
|
"article",
|
|
13521
13572
|
{
|
|
13522
13573
|
"data-slot": "lesson-preview",
|
|
13523
13574
|
"aria-labelledby": headingId,
|
|
13524
13575
|
className: slotClassName("space-y-6", "", className),
|
|
13525
13576
|
children: [
|
|
13526
|
-
/* @__PURE__ */
|
|
13527
|
-
/* @__PURE__ */
|
|
13577
|
+
/* @__PURE__ */ jsxs4("header", { className: "space-y-2", children: [
|
|
13578
|
+
/* @__PURE__ */ jsx4(
|
|
13528
13579
|
"span",
|
|
13529
13580
|
{
|
|
13530
13581
|
"data-slot": "lesson-preview-badge",
|
|
@@ -13532,7 +13583,7 @@ function LessonPreview({
|
|
|
13532
13583
|
children: labels.badge
|
|
13533
13584
|
}
|
|
13534
13585
|
),
|
|
13535
|
-
/* @__PURE__ */
|
|
13586
|
+
/* @__PURE__ */ jsx4(
|
|
13536
13587
|
Tag,
|
|
13537
13588
|
{
|
|
13538
13589
|
id: headingId,
|
|
@@ -13540,12 +13591,12 @@ function LessonPreview({
|
|
|
13540
13591
|
children: lesson.title
|
|
13541
13592
|
}
|
|
13542
13593
|
),
|
|
13543
|
-
duration && /* @__PURE__ */
|
|
13544
|
-
/* @__PURE__ */
|
|
13594
|
+
duration && /* @__PURE__ */ jsxs4("p", { className: "text-sm text-muted-foreground", children: [
|
|
13595
|
+
/* @__PURE__ */ jsxs4("span", { className: "sr-only", children: [
|
|
13545
13596
|
labels.duration,
|
|
13546
13597
|
": "
|
|
13547
13598
|
] }),
|
|
13548
|
-
/* @__PURE__ */
|
|
13599
|
+
/* @__PURE__ */ jsx4(
|
|
13549
13600
|
"time",
|
|
13550
13601
|
{
|
|
13551
13602
|
"data-slot": "lesson-preview-duration",
|
|
@@ -13556,12 +13607,12 @@ function LessonPreview({
|
|
|
13556
13607
|
)
|
|
13557
13608
|
] })
|
|
13558
13609
|
] }),
|
|
13559
|
-
video && /* @__PURE__ */
|
|
13610
|
+
video && /* @__PURE__ */ jsx4(
|
|
13560
13611
|
"div",
|
|
13561
13612
|
{
|
|
13562
13613
|
"data-slot": "lesson-preview-player",
|
|
13563
13614
|
className: "aspect-video w-full overflow-hidden rounded-xl border border-border bg-black",
|
|
13564
|
-
children: /* @__PURE__ */
|
|
13615
|
+
children: /* @__PURE__ */ jsx4(
|
|
13565
13616
|
"iframe",
|
|
13566
13617
|
{
|
|
13567
13618
|
src: video.embedUrl,
|
|
@@ -13575,7 +13626,7 @@ function LessonPreview({
|
|
|
13575
13626
|
)
|
|
13576
13627
|
}
|
|
13577
13628
|
),
|
|
13578
|
-
hasBody && /* @__PURE__ */
|
|
13629
|
+
hasBody && /* @__PURE__ */ jsx4("div", { "data-slot": "lesson-preview-content", children: /* @__PURE__ */ jsx4(
|
|
13579
13630
|
SafeHtml,
|
|
13580
13631
|
{
|
|
13581
13632
|
html: html5,
|
|
@@ -13594,7 +13645,7 @@ import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
|
13594
13645
|
// src/components/_page-parts.tsx
|
|
13595
13646
|
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13596
13647
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13597
|
-
import { Fragment as Fragment2, jsx as
|
|
13648
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13598
13649
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13599
13650
|
"default",
|
|
13600
13651
|
"destructive",
|
|
@@ -13607,11 +13658,11 @@ function toButtonVariant(variant) {
|
|
|
13607
13658
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13608
13659
|
}
|
|
13609
13660
|
function PageHero({ page }) {
|
|
13610
|
-
return /* @__PURE__ */
|
|
13611
|
-
page.category && /* @__PURE__ */
|
|
13612
|
-
/* @__PURE__ */
|
|
13613
|
-
page.subtitle && /* @__PURE__ */
|
|
13614
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13661
|
+
return /* @__PURE__ */ jsxs5("header", { className: "space-y-4", children: [
|
|
13662
|
+
page.category && /* @__PURE__ */ jsx5("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 }),
|
|
13663
|
+
/* @__PURE__ */ jsx5("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13664
|
+
page.subtitle && /* @__PURE__ */ jsx5("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13665
|
+
page.coverImageUrl && /* @__PURE__ */ jsx5("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx5(
|
|
13615
13666
|
"img",
|
|
13616
13667
|
{
|
|
13617
13668
|
src: page.coverImageUrl,
|
|
@@ -13625,7 +13676,7 @@ function PageHero({ page }) {
|
|
|
13625
13676
|
function SectionCta({ section }) {
|
|
13626
13677
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13627
13678
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13628
|
-
return /* @__PURE__ */
|
|
13679
|
+
return /* @__PURE__ */ jsx5("div", { className: "pt-2", children: /* @__PURE__ */ jsx5(
|
|
13629
13680
|
"a",
|
|
13630
13681
|
{
|
|
13631
13682
|
href: section.ctaUrl,
|
|
@@ -13640,46 +13691,46 @@ function SectionCta({ section }) {
|
|
|
13640
13691
|
}
|
|
13641
13692
|
function SectionImages({ section }) {
|
|
13642
13693
|
if (section.images.length === 0) return null;
|
|
13643
|
-
return /* @__PURE__ */
|
|
13644
|
-
/* @__PURE__ */
|
|
13645
|
-
img.caption && /* @__PURE__ */
|
|
13694
|
+
return /* @__PURE__ */ jsx5("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs5("figure", { className: "space-y-1", children: [
|
|
13695
|
+
/* @__PURE__ */ jsx5("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx5("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13696
|
+
img.caption && /* @__PURE__ */ jsx5("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13646
13697
|
] }, `${img.url}-${img.order}`)) });
|
|
13647
13698
|
}
|
|
13648
13699
|
function PageSectionBlock({ section }) {
|
|
13649
13700
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13650
13701
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13651
13702
|
const hasImages = section.images.length > 0;
|
|
13652
|
-
const body3 = /* @__PURE__ */
|
|
13653
|
-
section.heading && /* @__PURE__ */
|
|
13654
|
-
/* @__PURE__ */
|
|
13655
|
-
/* @__PURE__ */
|
|
13703
|
+
const body3 = /* @__PURE__ */ jsxs5("div", { className: "space-y-4", children: [
|
|
13704
|
+
section.heading && /* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13705
|
+
/* @__PURE__ */ jsx5(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13706
|
+
/* @__PURE__ */ jsx5(SectionCta, { section })
|
|
13656
13707
|
] });
|
|
13657
13708
|
if (sideBySide && hasImages) {
|
|
13658
|
-
return /* @__PURE__ */
|
|
13659
|
-
/* @__PURE__ */
|
|
13709
|
+
return /* @__PURE__ */ jsx5("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
13710
|
+
/* @__PURE__ */ jsx5(SectionImages, { section }),
|
|
13660
13711
|
body3
|
|
13661
|
-
] }) : /* @__PURE__ */
|
|
13712
|
+
] }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
13662
13713
|
body3,
|
|
13663
|
-
/* @__PURE__ */
|
|
13714
|
+
/* @__PURE__ */ jsx5(SectionImages, { section })
|
|
13664
13715
|
] }) });
|
|
13665
13716
|
}
|
|
13666
|
-
return /* @__PURE__ */
|
|
13717
|
+
return /* @__PURE__ */ jsxs5("section", { className: "space-y-4", children: [
|
|
13667
13718
|
body3,
|
|
13668
|
-
/* @__PURE__ */
|
|
13719
|
+
/* @__PURE__ */ jsx5(SectionImages, { section })
|
|
13669
13720
|
] });
|
|
13670
13721
|
}
|
|
13671
13722
|
function PageSectionList({ sections }) {
|
|
13672
13723
|
if (sections.length === 0) return null;
|
|
13673
13724
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13674
|
-
return /* @__PURE__ */
|
|
13725
|
+
return /* @__PURE__ */ jsx5("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ jsx5(PageSectionBlock, { section }, section.id)) });
|
|
13675
13726
|
}
|
|
13676
13727
|
|
|
13677
13728
|
// src/components/treatment.tsx
|
|
13678
|
-
import { jsx as
|
|
13729
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13679
13730
|
function Treatment({ page, className }) {
|
|
13680
|
-
return /* @__PURE__ */
|
|
13681
|
-
/* @__PURE__ */
|
|
13682
|
-
/* @__PURE__ */
|
|
13731
|
+
return /* @__PURE__ */ jsxs6("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
|
|
13732
|
+
/* @__PURE__ */ jsx6(PageHero, { page }),
|
|
13733
|
+
/* @__PURE__ */ jsx6(PageSectionList, { sections: page.sections })
|
|
13683
13734
|
] });
|
|
13684
13735
|
}
|
|
13685
13736
|
|
|
@@ -13688,11 +13739,11 @@ import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
|
13688
13739
|
|
|
13689
13740
|
// src/components/page-card-grid.tsx
|
|
13690
13741
|
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13691
|
-
import { jsx as
|
|
13742
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13692
13743
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13693
13744
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13694
13745
|
function PageCardGrid(props) {
|
|
13695
|
-
return /* @__PURE__ */
|
|
13746
|
+
return /* @__PURE__ */ jsx7(PageCardGridSection, { ...props });
|
|
13696
13747
|
}
|
|
13697
13748
|
function PageCardGridSection({
|
|
13698
13749
|
pages,
|
|
@@ -13703,15 +13754,15 @@ function PageCardGridSection({
|
|
|
13703
13754
|
}) {
|
|
13704
13755
|
if (pages.length === 0) return null;
|
|
13705
13756
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13706
|
-
return /* @__PURE__ */
|
|
13707
|
-
showHeading && /* @__PURE__ */
|
|
13708
|
-
/* @__PURE__ */
|
|
13757
|
+
return /* @__PURE__ */ jsxs7("section", { className: cn4("space-y-6", className), children: [
|
|
13758
|
+
showHeading && /* @__PURE__ */ jsx7("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13759
|
+
/* @__PURE__ */ jsx7("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__ */ jsx7("li", { children: /* @__PURE__ */ jsxs7(
|
|
13709
13760
|
"a",
|
|
13710
13761
|
{
|
|
13711
13762
|
href: pageHref(page),
|
|
13712
13763
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13713
13764
|
children: [
|
|
13714
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13765
|
+
page.coverImageUrl && /* @__PURE__ */ jsx7("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx7(
|
|
13715
13766
|
"img",
|
|
13716
13767
|
{
|
|
13717
13768
|
src: page.coverImageUrl,
|
|
@@ -13720,9 +13771,9 @@ function PageCardGridSection({
|
|
|
13720
13771
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13721
13772
|
}
|
|
13722
13773
|
) }),
|
|
13723
|
-
/* @__PURE__ */
|
|
13724
|
-
/* @__PURE__ */
|
|
13725
|
-
page.excerpt && /* @__PURE__ */
|
|
13774
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13775
|
+
/* @__PURE__ */ jsx7("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13776
|
+
page.excerpt && /* @__PURE__ */ jsx7("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13726
13777
|
] })
|
|
13727
13778
|
]
|
|
13728
13779
|
}
|
|
@@ -13731,7 +13782,7 @@ function PageCardGridSection({
|
|
|
13731
13782
|
}
|
|
13732
13783
|
|
|
13733
13784
|
// src/components/parent-page.tsx
|
|
13734
|
-
import { jsx as
|
|
13785
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13735
13786
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13736
13787
|
function ParentPage({
|
|
13737
13788
|
page,
|
|
@@ -13746,10 +13797,10 @@ function ParentPage({
|
|
|
13746
13797
|
const pages = childPages ?? treatments ?? [];
|
|
13747
13798
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13748
13799
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13749
|
-
return /* @__PURE__ */
|
|
13750
|
-
/* @__PURE__ */
|
|
13751
|
-
/* @__PURE__ */
|
|
13752
|
-
/* @__PURE__ */
|
|
13800
|
+
return /* @__PURE__ */ jsxs8("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
|
|
13801
|
+
/* @__PURE__ */ jsx8(PageHero, { page }),
|
|
13802
|
+
/* @__PURE__ */ jsx8(PageSectionList, { sections: page.sections }),
|
|
13803
|
+
/* @__PURE__ */ jsx8(
|
|
13753
13804
|
PageCardGridSection,
|
|
13754
13805
|
{
|
|
13755
13806
|
pages,
|
|
@@ -13769,7 +13820,7 @@ import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
|
13769
13820
|
|
|
13770
13821
|
// src/components/professional-fields.tsx
|
|
13771
13822
|
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13772
|
-
import { jsx as
|
|
13823
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13773
13824
|
function ProfessionalFields({
|
|
13774
13825
|
fields,
|
|
13775
13826
|
variant = "profile",
|
|
@@ -13777,7 +13828,7 @@ function ProfessionalFields({
|
|
|
13777
13828
|
}) {
|
|
13778
13829
|
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13779
13830
|
if (shown.length === 0) return null;
|
|
13780
|
-
return /* @__PURE__ */
|
|
13831
|
+
return /* @__PURE__ */ jsx9(
|
|
13781
13832
|
"dl",
|
|
13782
13833
|
{
|
|
13783
13834
|
className: cn6(
|
|
@@ -13787,13 +13838,13 @@ function ProfessionalFields({
|
|
|
13787
13838
|
),
|
|
13788
13839
|
"data-slot": "professional-fields",
|
|
13789
13840
|
"data-variant": variant,
|
|
13790
|
-
children: shown.map((field, index) => /* @__PURE__ */
|
|
13841
|
+
children: shown.map((field, index) => /* @__PURE__ */ jsxs9(
|
|
13791
13842
|
"div",
|
|
13792
13843
|
{
|
|
13793
13844
|
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
13794
13845
|
children: [
|
|
13795
|
-
/* @__PURE__ */
|
|
13796
|
-
/* @__PURE__ */
|
|
13846
|
+
/* @__PURE__ */ jsx9("dt", { className: "text-muted-foreground", children: field.label }),
|
|
13847
|
+
/* @__PURE__ */ jsx9("dd", { className: "m-0 font-medium", children: field.value })
|
|
13797
13848
|
]
|
|
13798
13849
|
},
|
|
13799
13850
|
`${field.label}-${index}`
|
|
@@ -13803,7 +13854,7 @@ function ProfessionalFields({
|
|
|
13803
13854
|
}
|
|
13804
13855
|
|
|
13805
13856
|
// src/components/profile-card.tsx
|
|
13806
|
-
import { jsx as
|
|
13857
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13807
13858
|
function initials(name) {
|
|
13808
13859
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13809
13860
|
}
|
|
@@ -13818,7 +13869,7 @@ function ProfileCard({
|
|
|
13818
13869
|
className
|
|
13819
13870
|
}) {
|
|
13820
13871
|
const NameTag = href ? "a" : "span";
|
|
13821
|
-
return /* @__PURE__ */
|
|
13872
|
+
return /* @__PURE__ */ jsxs10(
|
|
13822
13873
|
"article",
|
|
13823
13874
|
{
|
|
13824
13875
|
className: cn7(
|
|
@@ -13827,7 +13878,7 @@ function ProfileCard({
|
|
|
13827
13878
|
),
|
|
13828
13879
|
"data-slot": "profile-card",
|
|
13829
13880
|
children: [
|
|
13830
|
-
/* @__PURE__ */
|
|
13881
|
+
/* @__PURE__ */ jsx10("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx10("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx10(
|
|
13831
13882
|
"span",
|
|
13832
13883
|
{
|
|
13833
13884
|
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
@@ -13835,12 +13886,12 @@ function ProfileCard({
|
|
|
13835
13886
|
children: initials(name)
|
|
13836
13887
|
}
|
|
13837
13888
|
) }),
|
|
13838
|
-
/* @__PURE__ */
|
|
13839
|
-
/* @__PURE__ */
|
|
13840
|
-
role && /* @__PURE__ */
|
|
13889
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-1", children: [
|
|
13890
|
+
/* @__PURE__ */ jsx10("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx10(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
13891
|
+
role && /* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13841
13892
|
] }),
|
|
13842
|
-
/* @__PURE__ */
|
|
13843
|
-
specialties.length > 0 && /* @__PURE__ */
|
|
13893
|
+
/* @__PURE__ */ jsx10(ProfessionalFields, { fields, variant: "card" }),
|
|
13894
|
+
specialties.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ jsx10(
|
|
13844
13895
|
"li",
|
|
13845
13896
|
{
|
|
13846
13897
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13848,7 +13899,7 @@ function ProfileCard({
|
|
|
13848
13899
|
},
|
|
13849
13900
|
s2
|
|
13850
13901
|
)) }),
|
|
13851
|
-
bio && /* @__PURE__ */
|
|
13902
|
+
bio && /* @__PURE__ */ jsx10("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13852
13903
|
]
|
|
13853
13904
|
}
|
|
13854
13905
|
);
|
|
@@ -13856,11 +13907,11 @@ function ProfileCard({
|
|
|
13856
13907
|
|
|
13857
13908
|
// src/components/product-card.tsx
|
|
13858
13909
|
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13859
|
-
import { jsx as
|
|
13910
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13860
13911
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13861
13912
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13862
13913
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13863
|
-
return /* @__PURE__ */
|
|
13914
|
+
return /* @__PURE__ */ jsxs11(
|
|
13864
13915
|
"article",
|
|
13865
13916
|
{
|
|
13866
13917
|
className: cn8(
|
|
@@ -13869,7 +13920,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13869
13920
|
),
|
|
13870
13921
|
"data-slot": "product-card",
|
|
13871
13922
|
children: [
|
|
13872
|
-
/* @__PURE__ */
|
|
13923
|
+
/* @__PURE__ */ jsx11("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx11(
|
|
13873
13924
|
"img",
|
|
13874
13925
|
{
|
|
13875
13926
|
src: image.url,
|
|
@@ -13877,14 +13928,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13877
13928
|
loading: "lazy",
|
|
13878
13929
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13879
13930
|
}
|
|
13880
|
-
) : /* @__PURE__ */
|
|
13881
|
-
/* @__PURE__ */
|
|
13882
|
-
product.category && /* @__PURE__ */
|
|
13883
|
-
/* @__PURE__ */
|
|
13884
|
-
product.shortDescription && /* @__PURE__ */
|
|
13885
|
-
/* @__PURE__ */
|
|
13886
|
-
/* @__PURE__ */
|
|
13887
|
-
hasDiscount && /* @__PURE__ */
|
|
13931
|
+
) : /* @__PURE__ */ jsx11("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13932
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13933
|
+
product.category && /* @__PURE__ */ jsx11("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 }),
|
|
13934
|
+
/* @__PURE__ */ jsx11("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx11("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13935
|
+
product.shortDescription && /* @__PURE__ */ jsx11("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13936
|
+
/* @__PURE__ */ jsxs11("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13937
|
+
/* @__PURE__ */ jsx11("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13938
|
+
hasDiscount && /* @__PURE__ */ jsx11("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13888
13939
|
] })
|
|
13889
13940
|
] })
|
|
13890
13941
|
]
|
|
@@ -14086,7 +14137,7 @@ var __iconNode8 = [
|
|
|
14086
14137
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
14087
14138
|
|
|
14088
14139
|
// src/components/product-trust-items.tsx
|
|
14089
|
-
import { jsx as
|
|
14140
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14090
14141
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
14091
14142
|
shipping: Truck,
|
|
14092
14143
|
returns: RotateCcw,
|
|
@@ -14120,9 +14171,9 @@ function ProductTrustItems({
|
|
|
14120
14171
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
14121
14172
|
});
|
|
14122
14173
|
if (rows.length === 0) return null;
|
|
14123
|
-
return /* @__PURE__ */
|
|
14124
|
-
/* @__PURE__ */
|
|
14125
|
-
/* @__PURE__ */
|
|
14174
|
+
return /* @__PURE__ */ jsx12(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs12("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
14175
|
+
/* @__PURE__ */ jsx12(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
14176
|
+
/* @__PURE__ */ jsx12("span", { children: text3 })
|
|
14126
14177
|
] }, key2)) });
|
|
14127
14178
|
}
|
|
14128
14179
|
|
|
@@ -14130,7 +14181,7 @@ function ProductTrustItems({
|
|
|
14130
14181
|
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
14131
14182
|
|
|
14132
14183
|
// src/components/_heading.tsx
|
|
14133
|
-
import { jsx as
|
|
14184
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
14134
14185
|
function nextHeadingLevel(level) {
|
|
14135
14186
|
return Math.min(level + 1, 6);
|
|
14136
14187
|
}
|
|
@@ -14140,11 +14191,11 @@ function Heading({
|
|
|
14140
14191
|
children: children2
|
|
14141
14192
|
}) {
|
|
14142
14193
|
const Tag = `h${level}`;
|
|
14143
|
-
return /* @__PURE__ */
|
|
14194
|
+
return /* @__PURE__ */ jsx13(Tag, { className, children: children2 });
|
|
14144
14195
|
}
|
|
14145
14196
|
|
|
14146
14197
|
// src/components/faq-accordion.tsx
|
|
14147
|
-
import { jsx as
|
|
14198
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14148
14199
|
function FaqAccordion({
|
|
14149
14200
|
items,
|
|
14150
14201
|
heading,
|
|
@@ -14155,18 +14206,18 @@ function FaqAccordion({
|
|
|
14155
14206
|
}) {
|
|
14156
14207
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
14157
14208
|
if (visible.length === 0) return null;
|
|
14158
|
-
return /* @__PURE__ */
|
|
14159
|
-
heading && /* @__PURE__ */
|
|
14160
|
-
/* @__PURE__ */
|
|
14209
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn9("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14210
|
+
heading && /* @__PURE__ */ jsx14(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14211
|
+
/* @__PURE__ */ jsx14("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs13(
|
|
14161
14212
|
"details",
|
|
14162
14213
|
{
|
|
14163
14214
|
className: "group px-4",
|
|
14164
14215
|
"data-slot": "faq-item",
|
|
14165
14216
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
14166
14217
|
children: [
|
|
14167
|
-
/* @__PURE__ */
|
|
14168
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
14169
|
-
/* @__PURE__ */
|
|
14218
|
+
/* @__PURE__ */ jsxs13("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: [
|
|
14219
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx14(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx14("span", { children: item.q }),
|
|
14220
|
+
/* @__PURE__ */ jsx14(
|
|
14170
14221
|
"span",
|
|
14171
14222
|
{
|
|
14172
14223
|
"aria-hidden": "true",
|
|
@@ -14175,7 +14226,7 @@ function FaqAccordion({
|
|
|
14175
14226
|
}
|
|
14176
14227
|
)
|
|
14177
14228
|
] }),
|
|
14178
|
-
/* @__PURE__ */
|
|
14229
|
+
/* @__PURE__ */ jsx14("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14179
14230
|
]
|
|
14180
14231
|
},
|
|
14181
14232
|
index
|
|
@@ -14185,7 +14236,7 @@ function FaqAccordion({
|
|
|
14185
14236
|
|
|
14186
14237
|
// src/components/trust-badges.tsx
|
|
14187
14238
|
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
14188
|
-
import { jsx as
|
|
14239
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14189
14240
|
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
14190
14241
|
{
|
|
14191
14242
|
PARTNER: "Colaboradores",
|
|
@@ -14227,7 +14278,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14227
14278
|
if (src) {
|
|
14228
14279
|
return (
|
|
14229
14280
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14230
|
-
/* @__PURE__ */
|
|
14281
|
+
/* @__PURE__ */ jsx15(
|
|
14231
14282
|
"img",
|
|
14232
14283
|
{
|
|
14233
14284
|
src,
|
|
@@ -14238,7 +14289,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14238
14289
|
)
|
|
14239
14290
|
);
|
|
14240
14291
|
}
|
|
14241
|
-
return /* @__PURE__ */
|
|
14292
|
+
return /* @__PURE__ */ jsx15("span", { className: "text-sm font-medium", children: badge.name });
|
|
14242
14293
|
}
|
|
14243
14294
|
function TrustBadges({
|
|
14244
14295
|
badges,
|
|
@@ -14266,14 +14317,14 @@ function TrustBadges({
|
|
|
14266
14317
|
if (groups.length === 0) return null;
|
|
14267
14318
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14268
14319
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14269
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */
|
|
14320
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs14(
|
|
14270
14321
|
"div",
|
|
14271
14322
|
{
|
|
14272
14323
|
"data-slot": "trust-badge-group",
|
|
14273
14324
|
"data-type": type,
|
|
14274
14325
|
className: cn10("space-y-3", groupClassName),
|
|
14275
14326
|
children: [
|
|
14276
|
-
groupHeading ? /* @__PURE__ */
|
|
14327
|
+
groupHeading ? /* @__PURE__ */ jsx15(
|
|
14277
14328
|
Heading,
|
|
14278
14329
|
{
|
|
14279
14330
|
level: groupHeadingLevel,
|
|
@@ -14285,30 +14336,30 @@ function TrustBadges({
|
|
|
14285
14336
|
children: groupHeading
|
|
14286
14337
|
}
|
|
14287
14338
|
) : null,
|
|
14288
|
-
/* @__PURE__ */
|
|
14339
|
+
/* @__PURE__ */ jsx15("ul", { className: cn10("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14289
14340
|
const href = safeHref(badge.url);
|
|
14290
|
-
return /* @__PURE__ */
|
|
14291
|
-
/* @__PURE__ */
|
|
14341
|
+
return /* @__PURE__ */ jsx15("li", { children: href ? /* @__PURE__ */ jsxs14("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14342
|
+
/* @__PURE__ */ jsx15(BadgeContent, { badge, logoClassName }),
|
|
14292
14343
|
" ",
|
|
14293
|
-
/* @__PURE__ */
|
|
14294
|
-
] }) : /* @__PURE__ */
|
|
14344
|
+
/* @__PURE__ */ jsx15("span", { className: "sr-only", children: newWindowLabel })
|
|
14345
|
+
] }) : /* @__PURE__ */ jsx15(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14295
14346
|
}) })
|
|
14296
14347
|
]
|
|
14297
14348
|
},
|
|
14298
14349
|
type
|
|
14299
14350
|
));
|
|
14300
14351
|
if (!hasHeading) {
|
|
14301
|
-
return /* @__PURE__ */
|
|
14352
|
+
return /* @__PURE__ */ jsx15("div", { "data-slot": "trust-badges", className: cn10("space-y-6", className), children: content });
|
|
14302
14353
|
}
|
|
14303
14354
|
const Tag = `h${headingLevel}`;
|
|
14304
|
-
return /* @__PURE__ */
|
|
14355
|
+
return /* @__PURE__ */ jsxs14(
|
|
14305
14356
|
"section",
|
|
14306
14357
|
{
|
|
14307
14358
|
"data-slot": "trust-badges",
|
|
14308
14359
|
"aria-labelledby": headingId,
|
|
14309
14360
|
className: cn10("space-y-6", className),
|
|
14310
14361
|
children: [
|
|
14311
|
-
/* @__PURE__ */
|
|
14362
|
+
/* @__PURE__ */ jsx15(
|
|
14312
14363
|
Tag,
|
|
14313
14364
|
{
|
|
14314
14365
|
id: headingId,
|
|
@@ -14325,38 +14376,38 @@ function TrustBadges({
|
|
|
14325
14376
|
// src/components/page-blocks.tsx
|
|
14326
14377
|
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14327
14378
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14328
|
-
import { jsx as
|
|
14379
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14329
14380
|
var ALIASES = {
|
|
14330
14381
|
doctor_embed: "profile_embed",
|
|
14331
14382
|
specialty_embed: "page_embed"
|
|
14332
14383
|
};
|
|
14333
14384
|
function HeroBlock({ block, headingLevel }) {
|
|
14334
14385
|
const { title, subtitle, imageUrl } = block.data;
|
|
14335
|
-
return /* @__PURE__ */
|
|
14336
|
-
/* @__PURE__ */
|
|
14337
|
-
subtitle && /* @__PURE__ */
|
|
14338
|
-
imageUrl && /* @__PURE__ */
|
|
14386
|
+
return /* @__PURE__ */ jsxs15("div", { className: "space-y-4", children: [
|
|
14387
|
+
/* @__PURE__ */ jsx16(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14388
|
+
subtitle && /* @__PURE__ */ jsx16("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14389
|
+
imageUrl && /* @__PURE__ */ jsx16("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx16("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14339
14390
|
] });
|
|
14340
14391
|
}
|
|
14341
14392
|
function RichtextBlock({ block, headingLevel }) {
|
|
14342
|
-
return /* @__PURE__ */
|
|
14393
|
+
return /* @__PURE__ */ jsx16(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14343
14394
|
}
|
|
14344
14395
|
function FaqBlock({ block }) {
|
|
14345
|
-
return /* @__PURE__ */
|
|
14396
|
+
return /* @__PURE__ */ jsx16(FaqAccordion, { items: block.data.items });
|
|
14346
14397
|
}
|
|
14347
14398
|
function StatsBlock({ block }) {
|
|
14348
|
-
return /* @__PURE__ */
|
|
14349
|
-
/* @__PURE__ */
|
|
14350
|
-
/* @__PURE__ */
|
|
14399
|
+
return /* @__PURE__ */ jsx16("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs15("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14400
|
+
/* @__PURE__ */ jsx16("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14401
|
+
/* @__PURE__ */ jsx16("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14351
14402
|
] }, i)) });
|
|
14352
14403
|
}
|
|
14353
14404
|
function TestimonialBlock({ block }) {
|
|
14354
14405
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14355
|
-
return /* @__PURE__ */
|
|
14356
|
-
/* @__PURE__ */
|
|
14357
|
-
/* @__PURE__ */
|
|
14406
|
+
return /* @__PURE__ */ jsxs15("figure", { className: "space-y-4", children: [
|
|
14407
|
+
/* @__PURE__ */ jsx16("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx16("p", { children: quote }) }),
|
|
14408
|
+
/* @__PURE__ */ jsxs15("figcaption", { className: "flex items-center gap-3", children: [
|
|
14358
14409
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14359
|
-
/* @__PURE__ */
|
|
14410
|
+
/* @__PURE__ */ jsx16(
|
|
14360
14411
|
"img",
|
|
14361
14412
|
{
|
|
14362
14413
|
src: avatarUrl,
|
|
@@ -14365,9 +14416,9 @@ function TestimonialBlock({ block }) {
|
|
|
14365
14416
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14366
14417
|
}
|
|
14367
14418
|
),
|
|
14368
|
-
/* @__PURE__ */
|
|
14369
|
-
/* @__PURE__ */
|
|
14370
|
-
role && /* @__PURE__ */
|
|
14419
|
+
/* @__PURE__ */ jsxs15("span", { children: [
|
|
14420
|
+
/* @__PURE__ */ jsx16("span", { className: "font-semibold", children: author }),
|
|
14421
|
+
role && /* @__PURE__ */ jsx16("span", { className: "block text-sm opacity-80", children: role })
|
|
14371
14422
|
] })
|
|
14372
14423
|
] })
|
|
14373
14424
|
] });
|
|
@@ -14376,19 +14427,19 @@ function CtaSlotBlock(_props) {
|
|
|
14376
14427
|
return null;
|
|
14377
14428
|
}
|
|
14378
14429
|
function FeatureListBlock({ block }) {
|
|
14379
|
-
return /* @__PURE__ */
|
|
14430
|
+
return /* @__PURE__ */ jsx16("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx16("li", { children: item.text }, i)) });
|
|
14380
14431
|
}
|
|
14381
14432
|
function GalleryBlock({ block }) {
|
|
14382
14433
|
const { images } = block.data;
|
|
14383
|
-
return /* @__PURE__ */
|
|
14434
|
+
return /* @__PURE__ */ jsx16(
|
|
14384
14435
|
"div",
|
|
14385
14436
|
{
|
|
14386
14437
|
className: cn11(
|
|
14387
14438
|
"grid gap-4",
|
|
14388
14439
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14389
14440
|
),
|
|
14390
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14391
|
-
/* @__PURE__ */
|
|
14441
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs15("figure", { className: "space-y-1", children: [
|
|
14442
|
+
/* @__PURE__ */ jsx16("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx16(
|
|
14392
14443
|
"img",
|
|
14393
14444
|
{
|
|
14394
14445
|
src: img.url,
|
|
@@ -14397,7 +14448,7 @@ function GalleryBlock({ block }) {
|
|
|
14397
14448
|
className: "h-full w-full object-cover"
|
|
14398
14449
|
}
|
|
14399
14450
|
) }),
|
|
14400
|
-
img.caption && /* @__PURE__ */
|
|
14451
|
+
img.caption && /* @__PURE__ */ jsx16("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14401
14452
|
] }, `${img.url}-${i}`))
|
|
14402
14453
|
}
|
|
14403
14454
|
);
|
|
@@ -14407,13 +14458,13 @@ function EmbedCard({
|
|
|
14407
14458
|
headingLevel,
|
|
14408
14459
|
embedHref
|
|
14409
14460
|
}) {
|
|
14410
|
-
return /* @__PURE__ */
|
|
14461
|
+
return /* @__PURE__ */ jsxs15(
|
|
14411
14462
|
"a",
|
|
14412
14463
|
{
|
|
14413
14464
|
href: embedHref(resolved),
|
|
14414
14465
|
className: "group block overflow-hidden rounded-xl border border-border bg-card text-card-foreground transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
14415
14466
|
children: [
|
|
14416
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14467
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx16("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx16(
|
|
14417
14468
|
"img",
|
|
14418
14469
|
{
|
|
14419
14470
|
src: resolved.coverImageUrl,
|
|
@@ -14422,24 +14473,24 @@ function EmbedCard({
|
|
|
14422
14473
|
className: "h-full w-full object-cover"
|
|
14423
14474
|
}
|
|
14424
14475
|
) }),
|
|
14425
|
-
/* @__PURE__ */
|
|
14426
|
-
/* @__PURE__ */
|
|
14427
|
-
resolved.role && /* @__PURE__ */
|
|
14428
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14476
|
+
/* @__PURE__ */ jsxs15("div", { className: "space-y-1 p-4", children: [
|
|
14477
|
+
/* @__PURE__ */ jsx16(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14478
|
+
resolved.role && /* @__PURE__ */ jsx16("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14479
|
+
resolved.excerpt && /* @__PURE__ */ jsx16("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14429
14480
|
] })
|
|
14430
14481
|
]
|
|
14431
14482
|
}
|
|
14432
14483
|
);
|
|
14433
14484
|
}
|
|
14434
14485
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14435
|
-
return /* @__PURE__ */
|
|
14486
|
+
return /* @__PURE__ */ jsx16(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14436
14487
|
}
|
|
14437
14488
|
function ProfileEmbedBlock({
|
|
14438
14489
|
block,
|
|
14439
14490
|
headingLevel,
|
|
14440
14491
|
embedHref
|
|
14441
14492
|
}) {
|
|
14442
|
-
return /* @__PURE__ */
|
|
14493
|
+
return /* @__PURE__ */ jsx16(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14443
14494
|
}
|
|
14444
14495
|
var DEFAULT_RENDERERS = {
|
|
14445
14496
|
hero: HeroBlock,
|
|
@@ -14496,7 +14547,7 @@ function toIdFragment(value) {
|
|
|
14496
14547
|
function SectionCta2({ cta }) {
|
|
14497
14548
|
if (!hasUsableCta(cta)) return null;
|
|
14498
14549
|
const variant = toButtonVariant(cta.variant);
|
|
14499
|
-
return /* @__PURE__ */
|
|
14550
|
+
return /* @__PURE__ */ jsx16("div", { className: "pt-2", children: /* @__PURE__ */ jsx16(
|
|
14500
14551
|
"a",
|
|
14501
14552
|
{
|
|
14502
14553
|
href: cta.url,
|
|
@@ -14529,7 +14580,7 @@ function PageBlocks({
|
|
|
14529
14580
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14530
14581
|
const background = block.backgroundColor;
|
|
14531
14582
|
return [
|
|
14532
|
-
/* @__PURE__ */
|
|
14583
|
+
/* @__PURE__ */ jsxs15(
|
|
14533
14584
|
"section",
|
|
14534
14585
|
{
|
|
14535
14586
|
"data-slot": "page-block",
|
|
@@ -14538,8 +14589,8 @@ function PageBlocks({
|
|
|
14538
14589
|
style: surfaceStyle(background),
|
|
14539
14590
|
className: cn11("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14540
14591
|
children: [
|
|
14541
|
-
block.heading && /* @__PURE__ */
|
|
14542
|
-
/* @__PURE__ */
|
|
14592
|
+
block.heading && /* @__PURE__ */ jsx16(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx16("span", { id: headingId, children: block.heading }) }),
|
|
14593
|
+
/* @__PURE__ */ jsx16(
|
|
14543
14594
|
Renderer,
|
|
14544
14595
|
{
|
|
14545
14596
|
block,
|
|
@@ -14547,7 +14598,7 @@ function PageBlocks({
|
|
|
14547
14598
|
embedHref
|
|
14548
14599
|
}
|
|
14549
14600
|
),
|
|
14550
|
-
/* @__PURE__ */
|
|
14601
|
+
/* @__PURE__ */ jsx16(SectionCta2, { cta: block.cta })
|
|
14551
14602
|
]
|
|
14552
14603
|
},
|
|
14553
14604
|
block.id
|
|
@@ -14555,12 +14606,12 @@ function PageBlocks({
|
|
|
14555
14606
|
];
|
|
14556
14607
|
});
|
|
14557
14608
|
if (sections.length === 0) return null;
|
|
14558
|
-
return /* @__PURE__ */
|
|
14609
|
+
return /* @__PURE__ */ jsx16("div", { className: cn11("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14559
14610
|
}
|
|
14560
14611
|
|
|
14561
14612
|
// src/components/shop-filters.tsx
|
|
14562
14613
|
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14563
|
-
import { jsx as
|
|
14614
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14564
14615
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14565
14616
|
{ max: 2500 },
|
|
14566
14617
|
{ min: 2500, max: 5e3 },
|
|
@@ -14604,7 +14655,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14604
14655
|
return "";
|
|
14605
14656
|
}
|
|
14606
14657
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14607
|
-
return /* @__PURE__ */
|
|
14658
|
+
return /* @__PURE__ */ jsx17(
|
|
14608
14659
|
"a",
|
|
14609
14660
|
{
|
|
14610
14661
|
href,
|
|
@@ -14622,9 +14673,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14622
14673
|
);
|
|
14623
14674
|
}
|
|
14624
14675
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14625
|
-
return /* @__PURE__ */
|
|
14626
|
-
/* @__PURE__ */
|
|
14627
|
-
/* @__PURE__ */
|
|
14676
|
+
return /* @__PURE__ */ jsxs16("fieldset", { className: "space-y-2", children: [
|
|
14677
|
+
/* @__PURE__ */ jsx17("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14678
|
+
/* @__PURE__ */ jsx17("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14628
14679
|
] });
|
|
14629
14680
|
}
|
|
14630
14681
|
function ShopFilters({
|
|
@@ -14647,11 +14698,11 @@ function ShopFilters({
|
|
|
14647
14698
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14648
14699
|
return null;
|
|
14649
14700
|
}
|
|
14650
|
-
return /* @__PURE__ */
|
|
14701
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn12("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14651
14702
|
visibleTaxonomies.map((axis) => {
|
|
14652
14703
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14653
|
-
return /* @__PURE__ */
|
|
14654
|
-
/* @__PURE__ */
|
|
14704
|
+
return /* @__PURE__ */ jsxs16(FilterFieldset, { legend: axis.label, children: [
|
|
14705
|
+
/* @__PURE__ */ jsx17(
|
|
14655
14706
|
OptionLink,
|
|
14656
14707
|
{
|
|
14657
14708
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14666,7 +14717,7 @@ function ShopFilters({
|
|
|
14666
14717
|
),
|
|
14667
14718
|
axis.terms.map((term) => {
|
|
14668
14719
|
const isActive = activeSlug === term.slug;
|
|
14669
|
-
return /* @__PURE__ */
|
|
14720
|
+
return /* @__PURE__ */ jsx17(
|
|
14670
14721
|
OptionLink,
|
|
14671
14722
|
{
|
|
14672
14723
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14686,9 +14737,9 @@ function ShopFilters({
|
|
|
14686
14737
|
}),
|
|
14687
14738
|
visibleAttributes.map((attr) => {
|
|
14688
14739
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14689
|
-
return /* @__PURE__ */
|
|
14740
|
+
return /* @__PURE__ */ jsx17(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14690
14741
|
const isActive = activeValues.includes(opt.value);
|
|
14691
|
-
return /* @__PURE__ */
|
|
14742
|
+
return /* @__PURE__ */ jsx17(
|
|
14692
14743
|
OptionLink,
|
|
14693
14744
|
{
|
|
14694
14745
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14706,11 +14757,11 @@ function ShopFilters({
|
|
|
14706
14757
|
);
|
|
14707
14758
|
}) }, attr.key);
|
|
14708
14759
|
}),
|
|
14709
|
-
showPriceGroup && /* @__PURE__ */
|
|
14760
|
+
showPriceGroup && /* @__PURE__ */ jsx17(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14710
14761
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14711
14762
|
const nextMin = isActive ? void 0 : band.min;
|
|
14712
14763
|
const nextMax = isActive ? void 0 : band.max;
|
|
14713
|
-
return /* @__PURE__ */
|
|
14764
|
+
return /* @__PURE__ */ jsx17(
|
|
14714
14765
|
OptionLink,
|
|
14715
14766
|
{
|
|
14716
14767
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14721,7 +14772,7 @@ function ShopFilters({
|
|
|
14721
14772
|
i
|
|
14722
14773
|
);
|
|
14723
14774
|
}) }),
|
|
14724
|
-
hasOnSale && /* @__PURE__ */
|
|
14775
|
+
hasOnSale && /* @__PURE__ */ jsx17(
|
|
14725
14776
|
OptionLink,
|
|
14726
14777
|
{
|
|
14727
14778
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14730,7 +14781,7 @@ function ShopFilters({
|
|
|
14730
14781
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14731
14782
|
}
|
|
14732
14783
|
),
|
|
14733
|
-
/* @__PURE__ */
|
|
14784
|
+
/* @__PURE__ */ jsx17(
|
|
14734
14785
|
"a",
|
|
14735
14786
|
{
|
|
14736
14787
|
href: hrefs.clearAll(),
|
|
@@ -14747,7 +14798,7 @@ function ShopFilters({
|
|
|
14747
14798
|
|
|
14748
14799
|
// src/components/course-catalog-filters.tsx
|
|
14749
14800
|
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14750
|
-
import { jsx as
|
|
14801
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14751
14802
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
14752
14803
|
{ max: 5e3 },
|
|
14753
14804
|
{ min: 5e3, max: 15e3 },
|
|
@@ -14800,9 +14851,9 @@ function CourseCatalogFilters({
|
|
|
14800
14851
|
const showPrice = enabled.price !== false;
|
|
14801
14852
|
const isFree = Boolean(active.free);
|
|
14802
14853
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
14803
|
-
return /* @__PURE__ */
|
|
14804
|
-
showCategories && /* @__PURE__ */
|
|
14805
|
-
/* @__PURE__ */
|
|
14854
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn13("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
14855
|
+
showCategories && /* @__PURE__ */ jsxs17(FilterFieldset, { legend: t.category, children: [
|
|
14856
|
+
/* @__PURE__ */ jsx18(
|
|
14806
14857
|
OptionLink,
|
|
14807
14858
|
{
|
|
14808
14859
|
href: categoryHref(void 0),
|
|
@@ -14814,7 +14865,7 @@ function CourseCatalogFilters({
|
|
|
14814
14865
|
sortedCategories.map((category) => {
|
|
14815
14866
|
const isActive = active.category === category.slug;
|
|
14816
14867
|
const next2 = isActive ? void 0 : category.slug;
|
|
14817
|
-
return /* @__PURE__ */
|
|
14868
|
+
return /* @__PURE__ */ jsx18(
|
|
14818
14869
|
OptionLink,
|
|
14819
14870
|
{
|
|
14820
14871
|
href: categoryHref(next2),
|
|
@@ -14826,8 +14877,8 @@ function CourseCatalogFilters({
|
|
|
14826
14877
|
);
|
|
14827
14878
|
})
|
|
14828
14879
|
] }),
|
|
14829
|
-
showInstructors && /* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
14880
|
+
showInstructors && /* @__PURE__ */ jsxs17(FilterFieldset, { legend: t.instructor, children: [
|
|
14881
|
+
/* @__PURE__ */ jsx18(
|
|
14831
14882
|
OptionLink,
|
|
14832
14883
|
{
|
|
14833
14884
|
href: hrefs.instructor(void 0),
|
|
@@ -14839,7 +14890,7 @@ function CourseCatalogFilters({
|
|
|
14839
14890
|
named.map((instructor) => {
|
|
14840
14891
|
const isActive = active.instructor === instructor.id;
|
|
14841
14892
|
const next2 = isActive ? void 0 : instructor.id;
|
|
14842
|
-
return /* @__PURE__ */
|
|
14893
|
+
return /* @__PURE__ */ jsx18(
|
|
14843
14894
|
OptionLink,
|
|
14844
14895
|
{
|
|
14845
14896
|
href: hrefs.instructor(next2),
|
|
@@ -14851,8 +14902,8 @@ function CourseCatalogFilters({
|
|
|
14851
14902
|
);
|
|
14852
14903
|
})
|
|
14853
14904
|
] }),
|
|
14854
|
-
showPrice && /* @__PURE__ */
|
|
14855
|
-
/* @__PURE__ */
|
|
14905
|
+
showPrice && /* @__PURE__ */ jsxs17(FilterFieldset, { legend: t.price, children: [
|
|
14906
|
+
/* @__PURE__ */ jsx18(
|
|
14856
14907
|
OptionLink,
|
|
14857
14908
|
{
|
|
14858
14909
|
href: hrefs.free(!isFree),
|
|
@@ -14867,7 +14918,7 @@ function CourseCatalogFilters({
|
|
|
14867
14918
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
14868
14919
|
const nextMin = isActive ? void 0 : band.min;
|
|
14869
14920
|
const nextMax = isActive ? void 0 : band.max;
|
|
14870
|
-
return /* @__PURE__ */
|
|
14921
|
+
return /* @__PURE__ */ jsx18(
|
|
14871
14922
|
OptionLink,
|
|
14872
14923
|
{
|
|
14873
14924
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14879,7 +14930,7 @@ function CourseCatalogFilters({
|
|
|
14879
14930
|
);
|
|
14880
14931
|
})
|
|
14881
14932
|
] }),
|
|
14882
|
-
/* @__PURE__ */
|
|
14933
|
+
/* @__PURE__ */ jsx18(
|
|
14883
14934
|
"a",
|
|
14884
14935
|
{
|
|
14885
14936
|
href: hrefs.clearAll(),
|
|
@@ -14902,7 +14953,7 @@ function CourseCatalogFilters({
|
|
|
14902
14953
|
|
|
14903
14954
|
// src/components/cart-line-list.tsx
|
|
14904
14955
|
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14905
|
-
import { jsx as
|
|
14956
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14906
14957
|
var DEFAULT_LABELS2 = {
|
|
14907
14958
|
quantityLabel: "Cantidad",
|
|
14908
14959
|
decrease: "Reducir cantidad",
|
|
@@ -14928,9 +14979,9 @@ function CartLineList({
|
|
|
14928
14979
|
}) {
|
|
14929
14980
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14930
14981
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14931
|
-
return /* @__PURE__ */
|
|
14932
|
-
/* @__PURE__ */
|
|
14933
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14982
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn14("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14983
|
+
/* @__PURE__ */ jsx19("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14984
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx19(
|
|
14934
14985
|
"div",
|
|
14935
14986
|
{
|
|
14936
14987
|
role: "status",
|
|
@@ -14939,33 +14990,33 @@ function CartLineList({
|
|
|
14939
14990
|
children: noticeContent
|
|
14940
14991
|
}
|
|
14941
14992
|
),
|
|
14942
|
-
/* @__PURE__ */
|
|
14993
|
+
/* @__PURE__ */ jsx19("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14943
14994
|
const maxQty = item.maxStock ?? Infinity;
|
|
14944
14995
|
const atMax = item.quantity >= maxQty;
|
|
14945
14996
|
const atMin = item.quantity <= 1;
|
|
14946
14997
|
const message = lineMessage?.(item);
|
|
14947
|
-
return /* @__PURE__ */
|
|
14998
|
+
return /* @__PURE__ */ jsxs18(
|
|
14948
14999
|
"li",
|
|
14949
15000
|
{
|
|
14950
15001
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14951
15002
|
children: [
|
|
14952
|
-
/* @__PURE__ */
|
|
14953
|
-
/* @__PURE__ */
|
|
14954
|
-
/* @__PURE__ */
|
|
14955
|
-
item.variantName && /* @__PURE__ */
|
|
14956
|
-
/* @__PURE__ */
|
|
15003
|
+
/* @__PURE__ */ jsx19("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx19("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15004
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0 flex-1", children: [
|
|
15005
|
+
/* @__PURE__ */ jsx19("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15006
|
+
item.variantName && /* @__PURE__ */ jsx19("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15007
|
+
/* @__PURE__ */ jsxs18("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14957
15008
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14958
15009
|
" ",
|
|
14959
15010
|
t.unitPriceSuffix
|
|
14960
15011
|
] }),
|
|
14961
|
-
/* @__PURE__ */
|
|
15012
|
+
/* @__PURE__ */ jsxs18(
|
|
14962
15013
|
"div",
|
|
14963
15014
|
{
|
|
14964
15015
|
role: "group",
|
|
14965
15016
|
"aria-label": t.quantityLabel,
|
|
14966
15017
|
className: "mt-3 flex items-center gap-3",
|
|
14967
15018
|
children: [
|
|
14968
|
-
/* @__PURE__ */
|
|
15019
|
+
/* @__PURE__ */ jsx19(
|
|
14969
15020
|
"button",
|
|
14970
15021
|
{
|
|
14971
15022
|
type: "button",
|
|
@@ -14976,8 +15027,8 @@ function CartLineList({
|
|
|
14976
15027
|
children: "\u2212"
|
|
14977
15028
|
}
|
|
14978
15029
|
),
|
|
14979
|
-
/* @__PURE__ */
|
|
14980
|
-
/* @__PURE__ */
|
|
15030
|
+
/* @__PURE__ */ jsx19("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
15031
|
+
/* @__PURE__ */ jsx19(
|
|
14981
15032
|
"button",
|
|
14982
15033
|
{
|
|
14983
15034
|
type: "button",
|
|
@@ -14988,7 +15039,7 @@ function CartLineList({
|
|
|
14988
15039
|
children: "+"
|
|
14989
15040
|
}
|
|
14990
15041
|
),
|
|
14991
|
-
onRemove && /* @__PURE__ */
|
|
15042
|
+
onRemove && /* @__PURE__ */ jsx19(
|
|
14992
15043
|
"button",
|
|
14993
15044
|
{
|
|
14994
15045
|
type: "button",
|
|
@@ -15001,7 +15052,7 @@ function CartLineList({
|
|
|
15001
15052
|
]
|
|
15002
15053
|
}
|
|
15003
15054
|
),
|
|
15004
|
-
message != null && message !== false && /* @__PURE__ */
|
|
15055
|
+
message != null && message !== false && /* @__PURE__ */ jsx19(
|
|
15005
15056
|
"p",
|
|
15006
15057
|
{
|
|
15007
15058
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15010,7 +15061,7 @@ function CartLineList({
|
|
|
15010
15061
|
}
|
|
15011
15062
|
)
|
|
15012
15063
|
] }),
|
|
15013
|
-
/* @__PURE__ */
|
|
15064
|
+
/* @__PURE__ */ jsx19("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx19("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15014
15065
|
]
|
|
15015
15066
|
},
|
|
15016
15067
|
lineKey(item.productId, item.variantId)
|
|
@@ -15021,7 +15072,7 @@ function CartLineList({
|
|
|
15021
15072
|
|
|
15022
15073
|
// src/components/cart-summary.tsx
|
|
15023
15074
|
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
15024
|
-
import { jsx as
|
|
15075
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
15025
15076
|
var DEFAULT_LABELS3 = {
|
|
15026
15077
|
subtotal: "Subtotal",
|
|
15027
15078
|
discountPrefix: "Descuento",
|
|
@@ -15051,37 +15102,37 @@ function CartSummary({
|
|
|
15051
15102
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15052
15103
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15053
15104
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15054
|
-
const breakdown = /* @__PURE__ */
|
|
15105
|
+
const breakdown = /* @__PURE__ */ jsxs19(
|
|
15055
15106
|
"dl",
|
|
15056
15107
|
{
|
|
15057
15108
|
className: cn15("space-y-2 text-sm", !hasNotice && className),
|
|
15058
15109
|
"data-slot": "cart-summary",
|
|
15059
15110
|
children: [
|
|
15060
|
-
/* @__PURE__ */
|
|
15061
|
-
/* @__PURE__ */
|
|
15062
|
-
/* @__PURE__ */
|
|
15111
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15112
|
+
/* @__PURE__ */ jsx20("dt", { children: t.subtotal }),
|
|
15113
|
+
/* @__PURE__ */ jsx20("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15063
15114
|
] }),
|
|
15064
|
-
hasDiscount && /* @__PURE__ */
|
|
15065
|
-
/* @__PURE__ */
|
|
15066
|
-
/* @__PURE__ */
|
|
15115
|
+
hasDiscount && /* @__PURE__ */ jsxs19("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
15116
|
+
/* @__PURE__ */ jsx20("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
15117
|
+
/* @__PURE__ */ jsxs19("dd", { children: [
|
|
15067
15118
|
"-",
|
|
15068
15119
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15069
15120
|
] })
|
|
15070
15121
|
] }),
|
|
15071
|
-
shippingEnabled && /* @__PURE__ */
|
|
15072
|
-
/* @__PURE__ */
|
|
15073
|
-
/* @__PURE__ */
|
|
15122
|
+
shippingEnabled && /* @__PURE__ */ jsxs19("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15123
|
+
/* @__PURE__ */ jsx20("dt", { children: t.shipping }),
|
|
15124
|
+
/* @__PURE__ */ jsx20("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15074
15125
|
] }),
|
|
15075
|
-
/* @__PURE__ */
|
|
15076
|
-
/* @__PURE__ */
|
|
15077
|
-
/* @__PURE__ */
|
|
15126
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
15127
|
+
/* @__PURE__ */ jsx20("dt", { children: t.total }),
|
|
15128
|
+
/* @__PURE__ */ jsx20("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15078
15129
|
] })
|
|
15079
15130
|
]
|
|
15080
15131
|
}
|
|
15081
15132
|
);
|
|
15082
15133
|
if (!hasNotice) return breakdown;
|
|
15083
|
-
return /* @__PURE__ */
|
|
15084
|
-
/* @__PURE__ */
|
|
15134
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn15("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
15135
|
+
/* @__PURE__ */ jsx20(
|
|
15085
15136
|
"div",
|
|
15086
15137
|
{
|
|
15087
15138
|
role: "status",
|
|
@@ -15096,7 +15147,7 @@ function CartSummary({
|
|
|
15096
15147
|
|
|
15097
15148
|
// src/components/cart-adjustments-notice.tsx
|
|
15098
15149
|
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
15099
|
-
import { jsx as
|
|
15150
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
15100
15151
|
var DEFAULT_LABELS4 = {
|
|
15101
15152
|
removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
|
|
15102
15153
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15130,20 +15181,20 @@ function CartAdjustmentsNotice({
|
|
|
15130
15181
|
);
|
|
15131
15182
|
}
|
|
15132
15183
|
if (messages.length === 0) return null;
|
|
15133
|
-
return /* @__PURE__ */
|
|
15184
|
+
return /* @__PURE__ */ jsx21(
|
|
15134
15185
|
"div",
|
|
15135
15186
|
{
|
|
15136
15187
|
role: "status",
|
|
15137
15188
|
className: cn16("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15138
15189
|
"data-slot": "cart-adjustments-notice",
|
|
15139
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
15190
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx21("p", { children: messages[0] }) : /* @__PURE__ */ jsx21("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx21("li", { children: message }, index)) })
|
|
15140
15191
|
}
|
|
15141
15192
|
);
|
|
15142
15193
|
}
|
|
15143
15194
|
|
|
15144
15195
|
// src/components/added-to-cart-toast.tsx
|
|
15145
15196
|
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
15146
|
-
import { jsx as
|
|
15197
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15147
15198
|
var DEFAULT_LABELS5 = {
|
|
15148
15199
|
success: "A\xF1adido al carrito",
|
|
15149
15200
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -15163,7 +15214,7 @@ function AddedToCartToast({
|
|
|
15163
15214
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15164
15215
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
15165
15216
|
const variant = status === "success" ? "success" : "error";
|
|
15166
|
-
return /* @__PURE__ */
|
|
15217
|
+
return /* @__PURE__ */ jsxs20(
|
|
15167
15218
|
"div",
|
|
15168
15219
|
{
|
|
15169
15220
|
"data-slot": "added-to-cart-toast",
|
|
@@ -15176,12 +15227,12 @@ function AddedToCartToast({
|
|
|
15176
15227
|
),
|
|
15177
15228
|
children: [
|
|
15178
15229
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15179
|
-
/* @__PURE__ */
|
|
15180
|
-
/* @__PURE__ */
|
|
15181
|
-
/* @__PURE__ */
|
|
15182
|
-
/* @__PURE__ */
|
|
15230
|
+
/* @__PURE__ */ jsx22("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15231
|
+
/* @__PURE__ */ jsxs20("div", { className: "min-w-0 flex-1", children: [
|
|
15232
|
+
/* @__PURE__ */ jsx22("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15233
|
+
/* @__PURE__ */ jsx22("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
15183
15234
|
] }),
|
|
15184
|
-
/* @__PURE__ */
|
|
15235
|
+
/* @__PURE__ */ jsx22("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx22("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
15185
15236
|
]
|
|
15186
15237
|
}
|
|
15187
15238
|
);
|
|
@@ -15189,7 +15240,7 @@ function AddedToCartToast({
|
|
|
15189
15240
|
|
|
15190
15241
|
// src/components/checkout-login-prompt.tsx
|
|
15191
15242
|
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15192
|
-
import { Fragment as Fragment3, jsx as
|
|
15243
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15193
15244
|
var DEFAULT_LABELS6 = {
|
|
15194
15245
|
title: "Identificaci\xF3n",
|
|
15195
15246
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -15216,9 +15267,9 @@ function CheckoutLoginPrompt({
|
|
|
15216
15267
|
if (!open) return null;
|
|
15217
15268
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
15218
15269
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
15219
|
-
return /* @__PURE__ */
|
|
15220
|
-
/* @__PURE__ */
|
|
15221
|
-
/* @__PURE__ */
|
|
15270
|
+
return /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
15271
|
+
/* @__PURE__ */ jsx23("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15272
|
+
/* @__PURE__ */ jsxs21(
|
|
15222
15273
|
"div",
|
|
15223
15274
|
{
|
|
15224
15275
|
role: "dialog",
|
|
@@ -15230,12 +15281,12 @@ function CheckoutLoginPrompt({
|
|
|
15230
15281
|
className
|
|
15231
15282
|
),
|
|
15232
15283
|
children: [
|
|
15233
|
-
/* @__PURE__ */
|
|
15234
|
-
/* @__PURE__ */
|
|
15235
|
-
/* @__PURE__ */
|
|
15236
|
-
/* @__PURE__ */
|
|
15284
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15285
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
15286
|
+
/* @__PURE__ */ jsx23("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15287
|
+
/* @__PURE__ */ jsx23("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
15237
15288
|
] }),
|
|
15238
|
-
/* @__PURE__ */
|
|
15289
|
+
/* @__PURE__ */ jsx23(
|
|
15239
15290
|
"button",
|
|
15240
15291
|
{
|
|
15241
15292
|
type: "button",
|
|
@@ -15246,9 +15297,9 @@ function CheckoutLoginPrompt({
|
|
|
15246
15297
|
}
|
|
15247
15298
|
)
|
|
15248
15299
|
] }),
|
|
15249
|
-
/* @__PURE__ */
|
|
15250
|
-
/* @__PURE__ */
|
|
15251
|
-
/* @__PURE__ */
|
|
15300
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-2", children: [
|
|
15301
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15302
|
+
/* @__PURE__ */ jsx23(
|
|
15252
15303
|
"input",
|
|
15253
15304
|
{
|
|
15254
15305
|
id: "checkout-login-prompt-email",
|
|
@@ -15263,10 +15314,10 @@ function CheckoutLoginPrompt({
|
|
|
15263
15314
|
)
|
|
15264
15315
|
}
|
|
15265
15316
|
),
|
|
15266
|
-
error && /* @__PURE__ */
|
|
15317
|
+
error && /* @__PURE__ */ jsx23("p", { className: "text-xs text-destructive", children: error })
|
|
15267
15318
|
] }),
|
|
15268
|
-
/* @__PURE__ */
|
|
15269
|
-
/* @__PURE__ */
|
|
15319
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-2", children: [
|
|
15320
|
+
/* @__PURE__ */ jsx23(
|
|
15270
15321
|
"button",
|
|
15271
15322
|
{
|
|
15272
15323
|
type: "button",
|
|
@@ -15279,7 +15330,7 @@ function CheckoutLoginPrompt({
|
|
|
15279
15330
|
children: checking ? t.checking : t.continueWithEmail
|
|
15280
15331
|
}
|
|
15281
15332
|
),
|
|
15282
|
-
/* @__PURE__ */
|
|
15333
|
+
/* @__PURE__ */ jsx23(
|
|
15283
15334
|
"button",
|
|
15284
15335
|
{
|
|
15285
15336
|
type: "button",
|
|
@@ -15298,7 +15349,7 @@ function CheckoutLoginPrompt({
|
|
|
15298
15349
|
// src/components/checkout-form.tsx
|
|
15299
15350
|
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
15300
15351
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
15301
|
-
import { Fragment as Fragment4, jsx as
|
|
15352
|
+
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15302
15353
|
var DEFAULT_LABELS7 = {
|
|
15303
15354
|
contactTitle: "Datos de contacto",
|
|
15304
15355
|
nameLabel: "Nombre completo",
|
|
@@ -15354,9 +15405,9 @@ function CheckoutForm({
|
|
|
15354
15405
|
event.preventDefault();
|
|
15355
15406
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15356
15407
|
}
|
|
15357
|
-
return /* @__PURE__ */
|
|
15408
|
+
return /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
15358
15409
|
loginPrompt,
|
|
15359
|
-
/* @__PURE__ */
|
|
15410
|
+
/* @__PURE__ */ jsxs22(
|
|
15360
15411
|
"form",
|
|
15361
15412
|
{
|
|
15362
15413
|
"data-testid": "checkout-form",
|
|
@@ -15364,12 +15415,12 @@ function CheckoutForm({
|
|
|
15364
15415
|
className: cn19("space-y-8", className),
|
|
15365
15416
|
"data-slot": "checkout-form",
|
|
15366
15417
|
children: [
|
|
15367
|
-
/* @__PURE__ */
|
|
15368
|
-
/* @__PURE__ */
|
|
15369
|
-
/* @__PURE__ */
|
|
15370
|
-
/* @__PURE__ */
|
|
15371
|
-
/* @__PURE__ */
|
|
15372
|
-
/* @__PURE__ */
|
|
15418
|
+
/* @__PURE__ */ jsxs22("section", { className: "space-y-4", children: [
|
|
15419
|
+
/* @__PURE__ */ jsx24("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15420
|
+
/* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15421
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15422
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15423
|
+
/* @__PURE__ */ jsx24(
|
|
15373
15424
|
"input",
|
|
15374
15425
|
{
|
|
15375
15426
|
id: "checkout-form-name",
|
|
@@ -15384,11 +15435,11 @@ function CheckoutForm({
|
|
|
15384
15435
|
)
|
|
15385
15436
|
}
|
|
15386
15437
|
),
|
|
15387
|
-
contactErrors?.name && /* @__PURE__ */
|
|
15438
|
+
contactErrors?.name && /* @__PURE__ */ jsx24("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15388
15439
|
] }),
|
|
15389
|
-
/* @__PURE__ */
|
|
15390
|
-
/* @__PURE__ */
|
|
15391
|
-
/* @__PURE__ */
|
|
15440
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15441
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15442
|
+
/* @__PURE__ */ jsx24(
|
|
15392
15443
|
"input",
|
|
15393
15444
|
{
|
|
15394
15445
|
id: "checkout-form-email",
|
|
@@ -15403,9 +15454,9 @@ function CheckoutForm({
|
|
|
15403
15454
|
)
|
|
15404
15455
|
}
|
|
15405
15456
|
),
|
|
15406
|
-
contactErrors?.email && /* @__PURE__ */
|
|
15457
|
+
contactErrors?.email && /* @__PURE__ */ jsx24("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15407
15458
|
] }),
|
|
15408
|
-
/* @__PURE__ */
|
|
15459
|
+
/* @__PURE__ */ jsx24("div", { className: "space-y-1", children: /* @__PURE__ */ jsx24(
|
|
15409
15460
|
PhoneInput,
|
|
15410
15461
|
{
|
|
15411
15462
|
id: "checkout-form-phone",
|
|
@@ -15419,26 +15470,26 @@ function CheckoutForm({
|
|
|
15419
15470
|
] })
|
|
15420
15471
|
] }),
|
|
15421
15472
|
children2,
|
|
15422
|
-
generalError ? /* @__PURE__ */
|
|
15423
|
-
/* @__PURE__ */
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
autoDiscount ? /* @__PURE__ */
|
|
15473
|
+
generalError ? /* @__PURE__ */ jsx24("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15474
|
+
/* @__PURE__ */ jsxs22("section", { className: "space-y-3", children: [
|
|
15475
|
+
/* @__PURE__ */ jsx24("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15476
|
+
autoDiscount ? /* @__PURE__ */ jsxs22(
|
|
15426
15477
|
"div",
|
|
15427
15478
|
{
|
|
15428
15479
|
className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
|
|
15429
15480
|
"data-slot": "checkout-staff-discount",
|
|
15430
15481
|
children: [
|
|
15431
|
-
/* @__PURE__ */
|
|
15432
|
-
/* @__PURE__ */
|
|
15482
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
15483
|
+
/* @__PURE__ */ jsx24("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
15433
15484
|
]
|
|
15434
15485
|
}
|
|
15435
15486
|
) : null,
|
|
15436
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */
|
|
15437
|
-
/* @__PURE__ */
|
|
15438
|
-
/* @__PURE__ */
|
|
15439
|
-
/* @__PURE__ */
|
|
15487
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs22("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: [
|
|
15488
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15489
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15490
|
+
/* @__PURE__ */ jsx24("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15440
15491
|
] }),
|
|
15441
|
-
/* @__PURE__ */
|
|
15492
|
+
/* @__PURE__ */ jsx24(
|
|
15442
15493
|
"button",
|
|
15443
15494
|
{
|
|
15444
15495
|
type: "button",
|
|
@@ -15448,9 +15499,9 @@ function CheckoutForm({
|
|
|
15448
15499
|
children: t.removeDiscount
|
|
15449
15500
|
}
|
|
15450
15501
|
)
|
|
15451
|
-
] }) : /* @__PURE__ */
|
|
15452
|
-
/* @__PURE__ */
|
|
15453
|
-
/* @__PURE__ */
|
|
15502
|
+
] }) : /* @__PURE__ */ jsxs22("div", { className: "flex gap-2", children: [
|
|
15503
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15504
|
+
/* @__PURE__ */ jsx24(
|
|
15454
15505
|
"input",
|
|
15455
15506
|
{
|
|
15456
15507
|
id: "checkout-form-discount-code",
|
|
@@ -15462,7 +15513,7 @@ function CheckoutForm({
|
|
|
15462
15513
|
className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
15463
15514
|
}
|
|
15464
15515
|
),
|
|
15465
|
-
/* @__PURE__ */
|
|
15516
|
+
/* @__PURE__ */ jsx24(
|
|
15466
15517
|
"button",
|
|
15467
15518
|
{
|
|
15468
15519
|
type: "button",
|
|
@@ -15473,9 +15524,9 @@ function CheckoutForm({
|
|
|
15473
15524
|
}
|
|
15474
15525
|
)
|
|
15475
15526
|
] }),
|
|
15476
|
-
discountError && /* @__PURE__ */
|
|
15527
|
+
discountError && /* @__PURE__ */ jsx24("p", { className: "text-xs text-destructive", children: discountError })
|
|
15477
15528
|
] }),
|
|
15478
|
-
/* @__PURE__ */
|
|
15529
|
+
/* @__PURE__ */ jsx24(
|
|
15479
15530
|
"button",
|
|
15480
15531
|
{
|
|
15481
15532
|
type: "submit",
|
|
@@ -15498,7 +15549,7 @@ import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
|
15498
15549
|
|
|
15499
15550
|
// src/components/order-invoice-link.tsx
|
|
15500
15551
|
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15501
|
-
import { jsx as
|
|
15552
|
+
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
15502
15553
|
var DEFAULT_LABELS8 = {
|
|
15503
15554
|
linkLabel: "Descargar la factura {number}",
|
|
15504
15555
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15506,8 +15557,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15506
15557
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15507
15558
|
if (!invoice) return null;
|
|
15508
15559
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15509
|
-
return /* @__PURE__ */
|
|
15510
|
-
/* @__PURE__ */
|
|
15560
|
+
return /* @__PURE__ */ jsxs23("div", { className: cn20("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15561
|
+
/* @__PURE__ */ jsx25(
|
|
15511
15562
|
"a",
|
|
15512
15563
|
{
|
|
15513
15564
|
href: invoice.url,
|
|
@@ -15515,12 +15566,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15515
15566
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15516
15567
|
}
|
|
15517
15568
|
),
|
|
15518
|
-
/* @__PURE__ */
|
|
15569
|
+
/* @__PURE__ */ jsx25("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15519
15570
|
] });
|
|
15520
15571
|
}
|
|
15521
15572
|
|
|
15522
15573
|
// src/components/order-confirmation.tsx
|
|
15523
|
-
import { jsx as
|
|
15574
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
15524
15575
|
var DEFAULT_LABELS9 = {
|
|
15525
15576
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15526
15577
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15586,43 +15637,43 @@ function OrderConfirmation({
|
|
|
15586
15637
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15587
15638
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15588
15639
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15589
|
-
return /* @__PURE__ */
|
|
15590
|
-
/* @__PURE__ */
|
|
15591
|
-
/* @__PURE__ */
|
|
15592
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
15593
|
-
/* @__PURE__ */
|
|
15594
|
-
/* @__PURE__ */
|
|
15595
|
-
/* @__PURE__ */
|
|
15640
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn21("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15641
|
+
/* @__PURE__ */ jsx26("h1", { className: "text-3xl font-bold", children: title }),
|
|
15642
|
+
/* @__PURE__ */ jsx26("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15643
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs24("div", { className: "space-y-6", children: [
|
|
15644
|
+
/* @__PURE__ */ jsxs24("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15645
|
+
/* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15646
|
+
/* @__PURE__ */ jsx26("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15596
15647
|
] }),
|
|
15597
|
-
/* @__PURE__ */
|
|
15598
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15648
|
+
/* @__PURE__ */ jsxs24("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15649
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs24(
|
|
15599
15650
|
"div",
|
|
15600
15651
|
{
|
|
15601
15652
|
className: "flex justify-between gap-4 text-sm",
|
|
15602
15653
|
children: [
|
|
15603
|
-
/* @__PURE__ */
|
|
15654
|
+
/* @__PURE__ */ jsxs24("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15604
15655
|
item.product.name,
|
|
15605
15656
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15606
15657
|
" x",
|
|
15607
15658
|
item.quantity
|
|
15608
15659
|
] }),
|
|
15609
|
-
/* @__PURE__ */
|
|
15660
|
+
/* @__PURE__ */ jsx26("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15610
15661
|
]
|
|
15611
15662
|
},
|
|
15612
15663
|
idx
|
|
15613
15664
|
)),
|
|
15614
|
-
/* @__PURE__ */
|
|
15615
|
-
/* @__PURE__ */
|
|
15616
|
-
/* @__PURE__ */
|
|
15665
|
+
/* @__PURE__ */ jsx26("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs24("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15666
|
+
/* @__PURE__ */ jsx26("span", { children: t.totalLabel }),
|
|
15667
|
+
/* @__PURE__ */ jsx26("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15617
15668
|
] }) })
|
|
15618
15669
|
] }),
|
|
15619
|
-
/* @__PURE__ */
|
|
15670
|
+
/* @__PURE__ */ jsxs24("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15620
15671
|
t.confirmationEmailPrefix,
|
|
15621
15672
|
" ",
|
|
15622
|
-
/* @__PURE__ */
|
|
15673
|
+
/* @__PURE__ */ jsx26("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15623
15674
|
"."
|
|
15624
15675
|
] }),
|
|
15625
|
-
/* @__PURE__ */
|
|
15676
|
+
/* @__PURE__ */ jsx26(
|
|
15626
15677
|
OrderInvoiceLink,
|
|
15627
15678
|
{
|
|
15628
15679
|
invoice: order.invoice,
|
|
@@ -15630,11 +15681,11 @@ function OrderConfirmation({
|
|
|
15630
15681
|
}
|
|
15631
15682
|
)
|
|
15632
15683
|
] }),
|
|
15633
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15634
|
-
/* @__PURE__ */
|
|
15635
|
-
/* @__PURE__ */
|
|
15684
|
+
showOrderReference && order && /* @__PURE__ */ jsxs24("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15685
|
+
/* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15686
|
+
/* @__PURE__ */ jsx26("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15636
15687
|
] }),
|
|
15637
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15688
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx26(
|
|
15638
15689
|
"a",
|
|
15639
15690
|
{
|
|
15640
15691
|
href: cartHref,
|
|
@@ -15642,7 +15693,7 @@ function OrderConfirmation({
|
|
|
15642
15693
|
children: t.backToCartLabel
|
|
15643
15694
|
}
|
|
15644
15695
|
),
|
|
15645
|
-
showRecheck && /* @__PURE__ */
|
|
15696
|
+
showRecheck && /* @__PURE__ */ jsx26(
|
|
15646
15697
|
"button",
|
|
15647
15698
|
{
|
|
15648
15699
|
type: "button",
|
|
@@ -15651,16 +15702,16 @@ function OrderConfirmation({
|
|
|
15651
15702
|
children: t.recheckLabel
|
|
15652
15703
|
}
|
|
15653
15704
|
),
|
|
15654
|
-
showSessionReference && /* @__PURE__ */
|
|
15655
|
-
/* @__PURE__ */
|
|
15656
|
-
/* @__PURE__ */
|
|
15705
|
+
showSessionReference && /* @__PURE__ */ jsxs24("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15706
|
+
/* @__PURE__ */ jsx26("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15707
|
+
/* @__PURE__ */ jsx26("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15657
15708
|
] })
|
|
15658
15709
|
] });
|
|
15659
15710
|
}
|
|
15660
15711
|
|
|
15661
15712
|
// src/components/full-invoice-fields.tsx
|
|
15662
15713
|
import { cn as cn22 } from "@reblu/site-ui/utils";
|
|
15663
|
-
import { jsx as
|
|
15714
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
15664
15715
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15665
15716
|
wantsFullInvoice: false,
|
|
15666
15717
|
billingIdType: "NIF",
|
|
@@ -15777,12 +15828,12 @@ function FullInvoiceFields({
|
|
|
15777
15828
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15778
15829
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15779
15830
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15780
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15831
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx27("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15781
15832
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15782
|
-
return /* @__PURE__ */
|
|
15783
|
-
overCap ? /* @__PURE__ */
|
|
15784
|
-
/* @__PURE__ */
|
|
15785
|
-
/* @__PURE__ */
|
|
15833
|
+
return /* @__PURE__ */ jsxs25("section", { className: cn22("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15834
|
+
overCap ? /* @__PURE__ */ jsx27("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15835
|
+
/* @__PURE__ */ jsxs25("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15836
|
+
/* @__PURE__ */ jsx27(
|
|
15786
15837
|
"input",
|
|
15787
15838
|
{
|
|
15788
15839
|
type: "checkbox",
|
|
@@ -15792,12 +15843,12 @@ function FullInvoiceFields({
|
|
|
15792
15843
|
),
|
|
15793
15844
|
t.toggle
|
|
15794
15845
|
] }),
|
|
15795
|
-
/* @__PURE__ */
|
|
15846
|
+
/* @__PURE__ */ jsx27("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15796
15847
|
] }),
|
|
15797
|
-
showFields && /* @__PURE__ */
|
|
15798
|
-
/* @__PURE__ */
|
|
15799
|
-
/* @__PURE__ */
|
|
15800
|
-
/* @__PURE__ */
|
|
15848
|
+
showFields && /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15849
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15850
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15851
|
+
/* @__PURE__ */ jsx27(
|
|
15801
15852
|
"select",
|
|
15802
15853
|
{
|
|
15803
15854
|
id: "full-invoice-id-type",
|
|
@@ -15806,14 +15857,14 @@ function FullInvoiceFields({
|
|
|
15806
15857
|
value: value.billingIdType,
|
|
15807
15858
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15808
15859
|
...invalid2("billingIdType"),
|
|
15809
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15860
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx27("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15810
15861
|
}
|
|
15811
15862
|
),
|
|
15812
15863
|
error("billingIdType")
|
|
15813
15864
|
] }),
|
|
15814
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15815
|
-
/* @__PURE__ */
|
|
15816
|
-
/* @__PURE__ */
|
|
15865
|
+
!isSpanishNif && /* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15866
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15867
|
+
/* @__PURE__ */ jsxs25(
|
|
15817
15868
|
"select",
|
|
15818
15869
|
{
|
|
15819
15870
|
id: "full-invoice-id-country",
|
|
@@ -15823,16 +15874,16 @@ function FullInvoiceFields({
|
|
|
15823
15874
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15824
15875
|
...invalid2("billingIdCountry"),
|
|
15825
15876
|
children: [
|
|
15826
|
-
/* @__PURE__ */
|
|
15827
|
-
countries.map((c) => /* @__PURE__ */
|
|
15877
|
+
/* @__PURE__ */ jsx27("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15878
|
+
countries.map((c) => /* @__PURE__ */ jsx27("option", { value: c.code, children: c.name }, c.code))
|
|
15828
15879
|
]
|
|
15829
15880
|
}
|
|
15830
15881
|
),
|
|
15831
15882
|
error("billingIdCountry")
|
|
15832
15883
|
] }),
|
|
15833
|
-
/* @__PURE__ */
|
|
15834
|
-
/* @__PURE__ */
|
|
15835
|
-
/* @__PURE__ */
|
|
15884
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15885
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15886
|
+
/* @__PURE__ */ jsx27(
|
|
15836
15887
|
"input",
|
|
15837
15888
|
{
|
|
15838
15889
|
id: "full-invoice-nif",
|
|
@@ -15845,9 +15896,9 @@ function FullInvoiceFields({
|
|
|
15845
15896
|
),
|
|
15846
15897
|
error("billingNif")
|
|
15847
15898
|
] }),
|
|
15848
|
-
/* @__PURE__ */
|
|
15849
|
-
/* @__PURE__ */
|
|
15850
|
-
/* @__PURE__ */
|
|
15899
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15900
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15901
|
+
/* @__PURE__ */ jsx27(
|
|
15851
15902
|
"input",
|
|
15852
15903
|
{
|
|
15853
15904
|
id: "full-invoice-name",
|
|
@@ -15860,9 +15911,9 @@ function FullInvoiceFields({
|
|
|
15860
15911
|
),
|
|
15861
15912
|
error("billingName")
|
|
15862
15913
|
] }),
|
|
15863
|
-
/* @__PURE__ */
|
|
15864
|
-
/* @__PURE__ */
|
|
15865
|
-
/* @__PURE__ */
|
|
15914
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15915
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15916
|
+
/* @__PURE__ */ jsx27(
|
|
15866
15917
|
"input",
|
|
15867
15918
|
{
|
|
15868
15919
|
id: "full-invoice-street",
|
|
@@ -15874,9 +15925,9 @@ function FullInvoiceFields({
|
|
|
15874
15925
|
}
|
|
15875
15926
|
)
|
|
15876
15927
|
] }),
|
|
15877
|
-
/* @__PURE__ */
|
|
15878
|
-
/* @__PURE__ */
|
|
15879
|
-
/* @__PURE__ */
|
|
15928
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15929
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15930
|
+
/* @__PURE__ */ jsx27(
|
|
15880
15931
|
"input",
|
|
15881
15932
|
{
|
|
15882
15933
|
id: "full-invoice-postal-code",
|
|
@@ -15887,9 +15938,9 @@ function FullInvoiceFields({
|
|
|
15887
15938
|
}
|
|
15888
15939
|
)
|
|
15889
15940
|
] }),
|
|
15890
|
-
/* @__PURE__ */
|
|
15891
|
-
/* @__PURE__ */
|
|
15892
|
-
/* @__PURE__ */
|
|
15941
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15942
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15943
|
+
/* @__PURE__ */ jsx27(
|
|
15893
15944
|
"input",
|
|
15894
15945
|
{
|
|
15895
15946
|
id: "full-invoice-city",
|
|
@@ -15900,9 +15951,9 @@ function FullInvoiceFields({
|
|
|
15900
15951
|
}
|
|
15901
15952
|
)
|
|
15902
15953
|
] }),
|
|
15903
|
-
/* @__PURE__ */
|
|
15904
|
-
/* @__PURE__ */
|
|
15905
|
-
/* @__PURE__ */
|
|
15954
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
15955
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15956
|
+
/* @__PURE__ */ jsx27(
|
|
15906
15957
|
"select",
|
|
15907
15958
|
{
|
|
15908
15959
|
id: "full-invoice-country",
|
|
@@ -15910,18 +15961,18 @@ function FullInvoiceFields({
|
|
|
15910
15961
|
required: true,
|
|
15911
15962
|
value: value.country,
|
|
15912
15963
|
onChange: (e) => set("country", e.target.value),
|
|
15913
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
15964
|
+
children: countries.map((c) => /* @__PURE__ */ jsx27("option", { value: c.code, children: c.name }, c.code))
|
|
15914
15965
|
}
|
|
15915
15966
|
)
|
|
15916
15967
|
] }),
|
|
15917
|
-
/* @__PURE__ */
|
|
15968
|
+
/* @__PURE__ */ jsx27("div", { className: "sm:col-span-2", children: error("address") })
|
|
15918
15969
|
] })
|
|
15919
15970
|
] });
|
|
15920
15971
|
}
|
|
15921
15972
|
|
|
15922
15973
|
// src/components/contact-interest-field.tsx
|
|
15923
15974
|
import { cn as cn23 } from "@reblu/site-ui/utils";
|
|
15924
|
-
import { jsx as
|
|
15975
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
15925
15976
|
function ContactInterestField({
|
|
15926
15977
|
interest,
|
|
15927
15978
|
value,
|
|
@@ -15938,18 +15989,18 @@ function ContactInterestField({
|
|
|
15938
15989
|
else next2.delete(option2);
|
|
15939
15990
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
15940
15991
|
};
|
|
15941
|
-
return /* @__PURE__ */
|
|
15942
|
-
/* @__PURE__ */
|
|
15943
|
-
/* @__PURE__ */
|
|
15992
|
+
return /* @__PURE__ */ jsxs26("fieldset", { "data-slot": "contact-interest", className: cn23("space-y-2", className), children: [
|
|
15993
|
+
/* @__PURE__ */ jsx28("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
15994
|
+
/* @__PURE__ */ jsx28("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
15944
15995
|
const id = `${idPrefix}-${index}`;
|
|
15945
|
-
return /* @__PURE__ */
|
|
15996
|
+
return /* @__PURE__ */ jsxs26(
|
|
15946
15997
|
"label",
|
|
15947
15998
|
{
|
|
15948
15999
|
htmlFor: id,
|
|
15949
16000
|
"data-slot": "contact-interest-option",
|
|
15950
16001
|
className: "flex items-center gap-2 text-sm",
|
|
15951
16002
|
children: [
|
|
15952
|
-
/* @__PURE__ */
|
|
16003
|
+
/* @__PURE__ */ jsx28(
|
|
15953
16004
|
"input",
|
|
15954
16005
|
{
|
|
15955
16006
|
id,
|
|
@@ -15981,9 +16032,11 @@ export {
|
|
|
15981
16032
|
ContactInterestField,
|
|
15982
16033
|
CourseCatalogFilters,
|
|
15983
16034
|
CourseDescription,
|
|
16035
|
+
CoursePurchaseTerms,
|
|
15984
16036
|
DATA_REQUEST_TYPES,
|
|
15985
16037
|
DEFAULT_COURSE_CATALOG_FILTERS_LABELS,
|
|
15986
16038
|
DEFAULT_COURSE_PRICE_BANDS,
|
|
16039
|
+
DEFAULT_COURSE_PURCHASE_TERMS_LABELS,
|
|
15987
16040
|
DEFAULT_INVOICE_COUNTRIES,
|
|
15988
16041
|
DEFAULT_LESSON_PREVIEW_LABELS,
|
|
15989
16042
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|