@reblu/site-blocks 0.31.0 → 0.32.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 +51 -0
- package/dist/index.cjs +508 -380
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -2
- package/dist/index.d.ts +58 -2
- package/dist/index.js +508 -381
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -14503,12 +14503,138 @@ function ArbitrationBadge({
|
|
|
14503
14503
|
);
|
|
14504
14504
|
}
|
|
14505
14505
|
|
|
14506
|
+
// src/components/reviews.tsx
|
|
14507
|
+
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14508
|
+
import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14509
|
+
function isHttps(value) {
|
|
14510
|
+
if (typeof value !== "string") return false;
|
|
14511
|
+
try {
|
|
14512
|
+
const url = new URL(value);
|
|
14513
|
+
return url.protocol === "https:" && url.hostname !== "";
|
|
14514
|
+
} catch {
|
|
14515
|
+
return false;
|
|
14516
|
+
}
|
|
14517
|
+
}
|
|
14518
|
+
function isUsable2(value) {
|
|
14519
|
+
if (typeof value !== "object" || value === null) return false;
|
|
14520
|
+
const review = value;
|
|
14521
|
+
return typeof review.id === "string" && typeof review.authorName === "string" && review.authorName.trim() !== "" && typeof review.rating === "number" && Number.isInteger(review.rating) && review.rating >= 1 && review.rating <= 5 && typeof review.sourceName === "string" && isHttps(review.sourceUrl);
|
|
14522
|
+
}
|
|
14523
|
+
function formatDay(day, locale) {
|
|
14524
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(day)) return null;
|
|
14525
|
+
const date = /* @__PURE__ */ new Date(`${day}T00:00:00.000Z`);
|
|
14526
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
14527
|
+
return new Intl.DateTimeFormat(locale, { dateStyle: "long", timeZone: "UTC" }).format(date);
|
|
14528
|
+
}
|
|
14529
|
+
var STAR_PATH = "M12 2.5l2.9 5.9 6.5.9-4.7 4.6 1.1 6.5L12 17.3l-5.8 3.1 1.1-6.5L2.6 9.3l6.5-.9z";
|
|
14530
|
+
function Stars({ rating }) {
|
|
14531
|
+
return /* @__PURE__ */ jsx18("div", { role: "img", "aria-label": `${rating} de 5 estrellas`, className: "flex gap-0.5", children: [1, 2, 3, 4, 5].map((n) => /* @__PURE__ */ jsx18(
|
|
14532
|
+
"svg",
|
|
14533
|
+
{
|
|
14534
|
+
"aria-hidden": "true",
|
|
14535
|
+
viewBox: "0 0 24 24",
|
|
14536
|
+
width: "16",
|
|
14537
|
+
height: "16",
|
|
14538
|
+
"data-filled": n <= rating ? "true" : "false",
|
|
14539
|
+
className: n <= rating ? "fill-current" : "fill-none opacity-40",
|
|
14540
|
+
stroke: "currentColor",
|
|
14541
|
+
strokeWidth: "1.5",
|
|
14542
|
+
strokeLinejoin: "round",
|
|
14543
|
+
children: /* @__PURE__ */ jsx18("path", { d: STAR_PATH })
|
|
14544
|
+
},
|
|
14545
|
+
n
|
|
14546
|
+
)) });
|
|
14547
|
+
}
|
|
14548
|
+
function Reviews({
|
|
14549
|
+
reviews,
|
|
14550
|
+
heading,
|
|
14551
|
+
headingId = "reviews-heading",
|
|
14552
|
+
headingLevel = 2,
|
|
14553
|
+
notice,
|
|
14554
|
+
noticePosition = "below",
|
|
14555
|
+
linkLabel = (name) => `Ver en ${name}`,
|
|
14556
|
+
newWindowLabel = "(se abre en una pesta\xF1a nueva)",
|
|
14557
|
+
locale = "es-ES",
|
|
14558
|
+
className,
|
|
14559
|
+
headingClassName,
|
|
14560
|
+
gridClassName,
|
|
14561
|
+
cardClassName,
|
|
14562
|
+
noticeClassName
|
|
14563
|
+
}) {
|
|
14564
|
+
if (!Array.isArray(reviews) || reviews.length === 0) return null;
|
|
14565
|
+
const usable = reviews.filter(isUsable2);
|
|
14566
|
+
if (usable.length === 0) return null;
|
|
14567
|
+
const hasNotice = notice !== void 0 && notice !== null && notice !== "";
|
|
14568
|
+
const noticeNode = hasNotice ? /* @__PURE__ */ jsx18(
|
|
14569
|
+
"p",
|
|
14570
|
+
{
|
|
14571
|
+
"data-slot": "reviews-notice",
|
|
14572
|
+
className: slotClassName("", "text-sm text-muted-foreground", noticeClassName),
|
|
14573
|
+
children: notice
|
|
14574
|
+
}
|
|
14575
|
+
) : null;
|
|
14576
|
+
const grid = /* @__PURE__ */ jsx18(
|
|
14577
|
+
"ul",
|
|
14578
|
+
{
|
|
14579
|
+
"data-slot": "reviews-grid",
|
|
14580
|
+
className: slotClassName("grid gap-6", "sm:grid-cols-2 lg:grid-cols-3", gridClassName),
|
|
14581
|
+
children: usable.map((review) => {
|
|
14582
|
+
const date = formatDay(review.reviewDate, locale);
|
|
14583
|
+
return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs17(
|
|
14584
|
+
"article",
|
|
14585
|
+
{
|
|
14586
|
+
"data-slot": "review",
|
|
14587
|
+
"data-source": review.source,
|
|
14588
|
+
className: cn12("flex h-full flex-col gap-3 rounded-lg border p-5", cardClassName),
|
|
14589
|
+
children: [
|
|
14590
|
+
/* @__PURE__ */ jsx18(Stars, { rating: review.rating }),
|
|
14591
|
+
review.text && review.text.trim() !== "" ? /* @__PURE__ */ jsx18("blockquote", { className: "flex-1", children: /* @__PURE__ */ jsx18("p", { children: review.text }) }) : null,
|
|
14592
|
+
/* @__PURE__ */ jsxs17("footer", { className: "mt-auto space-y-1 text-sm", children: [
|
|
14593
|
+
/* @__PURE__ */ jsx18("p", { className: "font-semibold", children: review.authorName }),
|
|
14594
|
+
date ? /* @__PURE__ */ jsx18("time", { dateTime: review.reviewDate, className: "block text-muted-foreground", children: date }) : null,
|
|
14595
|
+
/* @__PURE__ */ jsxs17(
|
|
14596
|
+
"a",
|
|
14597
|
+
{
|
|
14598
|
+
href: review.sourceUrl,
|
|
14599
|
+
target: "_blank",
|
|
14600
|
+
rel: "noopener nofollow",
|
|
14601
|
+
className: "inline-flex underline underline-offset-4",
|
|
14602
|
+
children: [
|
|
14603
|
+
linkLabel(review.sourceName),
|
|
14604
|
+
" ",
|
|
14605
|
+
/* @__PURE__ */ jsx18("span", { className: "sr-only", children: newWindowLabel })
|
|
14606
|
+
]
|
|
14607
|
+
}
|
|
14608
|
+
)
|
|
14609
|
+
] })
|
|
14610
|
+
]
|
|
14611
|
+
}
|
|
14612
|
+
) }, review.id);
|
|
14613
|
+
})
|
|
14614
|
+
}
|
|
14615
|
+
);
|
|
14616
|
+
const body3 = /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
14617
|
+
noticePosition === "above" ? noticeNode : null,
|
|
14618
|
+
grid,
|
|
14619
|
+
noticePosition === "below" ? noticeNode : null
|
|
14620
|
+
] });
|
|
14621
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14622
|
+
if (!hasHeading) {
|
|
14623
|
+
return /* @__PURE__ */ jsx18("div", { "data-slot": "reviews", className: cn12("space-y-4", className), children: body3 });
|
|
14624
|
+
}
|
|
14625
|
+
const Tag = `h${headingLevel}`;
|
|
14626
|
+
return /* @__PURE__ */ jsxs17("section", { "data-slot": "reviews", "aria-labelledby": headingId, className: cn12("space-y-4", className), children: [
|
|
14627
|
+
/* @__PURE__ */ jsx18(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
|
|
14628
|
+
body3
|
|
14629
|
+
] });
|
|
14630
|
+
}
|
|
14631
|
+
|
|
14506
14632
|
// src/components/page-blocks.tsx
|
|
14507
|
-
import { cn as
|
|
14633
|
+
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14508
14634
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14509
14635
|
|
|
14510
14636
|
// src/components/content-blocks.tsx
|
|
14511
|
-
import { cn as
|
|
14637
|
+
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14512
14638
|
|
|
14513
14639
|
// src/components/_card-icons.ts
|
|
14514
14640
|
var CARD_ICON_NODES = {
|
|
@@ -14671,11 +14797,11 @@ var CARD_ICON_NODES = {
|
|
|
14671
14797
|
};
|
|
14672
14798
|
|
|
14673
14799
|
// src/components/content-blocks.tsx
|
|
14674
|
-
import { jsx as
|
|
14800
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14675
14801
|
var DEFAULT_BEFORE_AFTER_LABELS = Object.freeze({ before: "Antes", after: "Despu\xE9s" });
|
|
14676
14802
|
function PairImage({ url, alt, label }) {
|
|
14677
|
-
return /* @__PURE__ */
|
|
14678
|
-
/* @__PURE__ */
|
|
14803
|
+
return /* @__PURE__ */ jsxs18("figure", { className: "space-y-2", children: [
|
|
14804
|
+
/* @__PURE__ */ jsx19("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx19(
|
|
14679
14805
|
"img",
|
|
14680
14806
|
{
|
|
14681
14807
|
src: url,
|
|
@@ -14685,7 +14811,7 @@ function PairImage({ url, alt, label }) {
|
|
|
14685
14811
|
className: "h-full w-full object-cover"
|
|
14686
14812
|
}
|
|
14687
14813
|
) }),
|
|
14688
|
-
/* @__PURE__ */
|
|
14814
|
+
/* @__PURE__ */ jsx19("figcaption", { className: "text-sm font-semibold", children: label })
|
|
14689
14815
|
] });
|
|
14690
14816
|
}
|
|
14691
14817
|
function BeforeAfterPairs({
|
|
@@ -14697,26 +14823,26 @@ function BeforeAfterPairs({
|
|
|
14697
14823
|
}) {
|
|
14698
14824
|
const visibleCaption = showCaption && caption && caption.trim() !== "" ? caption : null;
|
|
14699
14825
|
if (pairs.length === 0 && !visibleCaption) return null;
|
|
14700
|
-
return /* @__PURE__ */
|
|
14701
|
-
pairs.length > 0 && /* @__PURE__ */
|
|
14826
|
+
return /* @__PURE__ */ jsxs18("div", { "data-slot": "before-after", className: cn13("space-y-4", className), children: [
|
|
14827
|
+
pairs.length > 0 && /* @__PURE__ */ jsx19("ul", { className: "grid gap-6 lg:grid-cols-2", children: pairs.map((pair, i) => /* @__PURE__ */ jsxs18(
|
|
14702
14828
|
"li",
|
|
14703
14829
|
{
|
|
14704
14830
|
"data-slot": "before-after-pair",
|
|
14705
14831
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
14706
14832
|
children: [
|
|
14707
|
-
/* @__PURE__ */
|
|
14708
|
-
/* @__PURE__ */
|
|
14833
|
+
/* @__PURE__ */ jsx19(PairImage, { url: pair.beforeUrl, alt: pair.alt ?? "", label: labels.before }),
|
|
14834
|
+
/* @__PURE__ */ jsx19(PairImage, { url: pair.afterUrl, alt: pair.alt ?? "", label: labels.after })
|
|
14709
14835
|
]
|
|
14710
14836
|
},
|
|
14711
14837
|
`${pair.beforeUrl}-${pair.afterUrl}-${i}`
|
|
14712
14838
|
)) }),
|
|
14713
|
-
visibleCaption && /* @__PURE__ */
|
|
14839
|
+
visibleCaption && /* @__PURE__ */ jsx19("p", { "data-slot": "before-after-caption", className: "whitespace-pre-line text-sm opacity-80", children: visibleCaption })
|
|
14714
14840
|
] });
|
|
14715
14841
|
}
|
|
14716
14842
|
function ChipList({ items, className }) {
|
|
14717
14843
|
const visible = items.filter((item) => item.trim() !== "");
|
|
14718
14844
|
if (visible.length === 0) return null;
|
|
14719
|
-
return /* @__PURE__ */
|
|
14845
|
+
return /* @__PURE__ */ jsx19("ul", { "data-slot": "chip-list", className: cn13("flex flex-wrap gap-3", className), children: visible.map((item, i) => /* @__PURE__ */ jsx19(
|
|
14720
14846
|
"li",
|
|
14721
14847
|
{
|
|
14722
14848
|
"data-slot": "chip",
|
|
@@ -14732,7 +14858,7 @@ function hasCardIcon(icon) {
|
|
|
14732
14858
|
}
|
|
14733
14859
|
function CardIconSvg({ icon, className }) {
|
|
14734
14860
|
if (!hasCardIcon(icon)) return null;
|
|
14735
|
-
return /* @__PURE__ */
|
|
14861
|
+
return /* @__PURE__ */ jsx19(
|
|
14736
14862
|
"svg",
|
|
14737
14863
|
{
|
|
14738
14864
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14745,30 +14871,30 @@ function CardIconSvg({ icon, className }) {
|
|
|
14745
14871
|
"aria-hidden": "true",
|
|
14746
14872
|
focusable: "false",
|
|
14747
14873
|
"data-icon": icon,
|
|
14748
|
-
className:
|
|
14749
|
-
children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */
|
|
14874
|
+
className: cn13("h-5 w-5", className),
|
|
14875
|
+
children: CARD_ICON_NODES[icon].map(([Tag, attrs], i) => /* @__PURE__ */ jsx19(Tag, { ...attrs }, i))
|
|
14750
14876
|
}
|
|
14751
14877
|
);
|
|
14752
14878
|
}
|
|
14753
14879
|
function IconCardGrid({ items, intro, headingLevel = 3, className }) {
|
|
14754
14880
|
const hasIntro = !!intro && intro.trim() !== "";
|
|
14755
14881
|
if (items.length === 0 && !hasIntro) return null;
|
|
14756
|
-
return /* @__PURE__ */
|
|
14757
|
-
hasIntro && /* @__PURE__ */
|
|
14758
|
-
items.length > 0 && /* @__PURE__ */
|
|
14882
|
+
return /* @__PURE__ */ jsxs18("div", { "data-slot": "icon-cards", className: cn13("space-y-6", className), children: [
|
|
14883
|
+
hasIntro && /* @__PURE__ */ jsx19("p", { className: "max-w-prose text-lg opacity-80", children: intro }),
|
|
14884
|
+
items.length > 0 && /* @__PURE__ */ jsx19(
|
|
14759
14885
|
"ul",
|
|
14760
14886
|
{
|
|
14761
14887
|
"data-slot": "icon-card-grid",
|
|
14762
14888
|
className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",
|
|
14763
|
-
children: items.map((item, i) => /* @__PURE__ */
|
|
14889
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxs18(
|
|
14764
14890
|
"li",
|
|
14765
14891
|
{
|
|
14766
14892
|
"data-slot": "icon-card",
|
|
14767
14893
|
className: "space-y-3 rounded-xl border border-border bg-card p-6 text-card-foreground",
|
|
14768
14894
|
children: [
|
|
14769
|
-
hasCardIcon(item.icon) && /* @__PURE__ */
|
|
14770
|
-
/* @__PURE__ */
|
|
14771
|
-
item.text && /* @__PURE__ */
|
|
14895
|
+
hasCardIcon(item.icon) && /* @__PURE__ */ jsx19("span", { className: "inline-flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary", children: /* @__PURE__ */ jsx19(CardIconSvg, { icon: item.icon }) }),
|
|
14896
|
+
/* @__PURE__ */ jsx19(Heading, { level: headingLevel, className: "text-lg font-semibold", children: item.title }),
|
|
14897
|
+
item.text && /* @__PURE__ */ jsx19("p", { className: "text-muted-foreground", children: item.text })
|
|
14772
14898
|
]
|
|
14773
14899
|
},
|
|
14774
14900
|
`${item.title}-${i}`
|
|
@@ -14794,19 +14920,19 @@ function ImageTextSplit({
|
|
|
14794
14920
|
const imageRight = imageSide === "right";
|
|
14795
14921
|
const hasKicker = !!kicker && kicker.trim() !== "";
|
|
14796
14922
|
const bodyOffset = heading ? headingLevel : headingLevel - 1;
|
|
14797
|
-
return /* @__PURE__ */
|
|
14923
|
+
return /* @__PURE__ */ jsxs18(
|
|
14798
14924
|
"div",
|
|
14799
14925
|
{
|
|
14800
14926
|
"data-slot": "image-text",
|
|
14801
14927
|
"data-image-side": imageRight ? "right" : "left",
|
|
14802
|
-
className:
|
|
14928
|
+
className: cn13("grid grid-cols-1 items-center gap-8 md:grid-cols-2", className),
|
|
14803
14929
|
children: [
|
|
14804
|
-
/* @__PURE__ */
|
|
14930
|
+
/* @__PURE__ */ jsx19(
|
|
14805
14931
|
"div",
|
|
14806
14932
|
{
|
|
14807
14933
|
"data-slot": "image-text-media",
|
|
14808
|
-
className:
|
|
14809
|
-
children: /* @__PURE__ */
|
|
14934
|
+
className: cn13(textFirst ? "order-2" : "order-1", imageRight ? "md:order-2" : "md:order-1"),
|
|
14935
|
+
children: /* @__PURE__ */ jsx19("div", { className: "relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx19(
|
|
14810
14936
|
"img",
|
|
14811
14937
|
{
|
|
14812
14938
|
src: imageUrl,
|
|
@@ -14818,21 +14944,21 @@ function ImageTextSplit({
|
|
|
14818
14944
|
) })
|
|
14819
14945
|
}
|
|
14820
14946
|
),
|
|
14821
|
-
/* @__PURE__ */
|
|
14947
|
+
/* @__PURE__ */ jsxs18(
|
|
14822
14948
|
"div",
|
|
14823
14949
|
{
|
|
14824
14950
|
"data-slot": "image-text-body",
|
|
14825
|
-
className:
|
|
14951
|
+
className: cn13(
|
|
14826
14952
|
"space-y-4",
|
|
14827
14953
|
textFirst ? "order-1" : "order-2",
|
|
14828
14954
|
imageRight ? "md:order-1" : "md:order-2"
|
|
14829
14955
|
),
|
|
14830
14956
|
children: [
|
|
14831
|
-
(hasKicker || heading) && /* @__PURE__ */
|
|
14832
|
-
hasKicker && /* @__PURE__ */
|
|
14833
|
-
heading && /* @__PURE__ */
|
|
14957
|
+
(hasKicker || heading) && /* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
|
|
14958
|
+
hasKicker && /* @__PURE__ */ jsx19("p", { "data-slot": "page-block-kicker", className: KICKER_CLASS_NAME, children: kicker }),
|
|
14959
|
+
heading && /* @__PURE__ */ jsx19(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx19("span", { id: headingId, children: heading }) })
|
|
14834
14960
|
] }),
|
|
14835
|
-
html5 && /* @__PURE__ */
|
|
14961
|
+
html5 && /* @__PURE__ */ jsx19(SafeHtml, { html: sanitizeHtml(html5), headingOffset: bodyOffset })
|
|
14836
14962
|
]
|
|
14837
14963
|
}
|
|
14838
14964
|
)
|
|
@@ -14842,38 +14968,38 @@ function ImageTextSplit({
|
|
|
14842
14968
|
}
|
|
14843
14969
|
|
|
14844
14970
|
// src/components/page-blocks.tsx
|
|
14845
|
-
import { jsx as
|
|
14971
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
14846
14972
|
var ALIASES = {
|
|
14847
14973
|
doctor_embed: "profile_embed",
|
|
14848
14974
|
specialty_embed: "page_embed"
|
|
14849
14975
|
};
|
|
14850
14976
|
function HeroBlock({ block, headingLevel }) {
|
|
14851
14977
|
const { title, subtitle, imageUrl } = block.data;
|
|
14852
|
-
return /* @__PURE__ */
|
|
14853
|
-
/* @__PURE__ */
|
|
14854
|
-
subtitle && /* @__PURE__ */
|
|
14855
|
-
imageUrl && /* @__PURE__ */
|
|
14978
|
+
return /* @__PURE__ */ jsxs19("div", { className: "space-y-4", children: [
|
|
14979
|
+
/* @__PURE__ */ jsx20(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14980
|
+
subtitle && /* @__PURE__ */ jsx20("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14981
|
+
imageUrl && /* @__PURE__ */ jsx20("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx20("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14856
14982
|
] });
|
|
14857
14983
|
}
|
|
14858
14984
|
function RichtextBlock({ block, headingLevel }) {
|
|
14859
|
-
return /* @__PURE__ */
|
|
14985
|
+
return /* @__PURE__ */ jsx20(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14860
14986
|
}
|
|
14861
14987
|
function FaqBlock({ block }) {
|
|
14862
|
-
return /* @__PURE__ */
|
|
14988
|
+
return /* @__PURE__ */ jsx20(FaqAccordion, { items: block.data.items });
|
|
14863
14989
|
}
|
|
14864
14990
|
function StatsBlock({ block }) {
|
|
14865
|
-
return /* @__PURE__ */
|
|
14866
|
-
/* @__PURE__ */
|
|
14867
|
-
/* @__PURE__ */
|
|
14991
|
+
return /* @__PURE__ */ jsx20("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14992
|
+
/* @__PURE__ */ jsx20("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14993
|
+
/* @__PURE__ */ jsx20("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14868
14994
|
] }, i)) });
|
|
14869
14995
|
}
|
|
14870
14996
|
function TestimonialBlock({ block }) {
|
|
14871
14997
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14872
|
-
return /* @__PURE__ */
|
|
14873
|
-
/* @__PURE__ */
|
|
14874
|
-
/* @__PURE__ */
|
|
14998
|
+
return /* @__PURE__ */ jsxs19("figure", { className: "space-y-4", children: [
|
|
14999
|
+
/* @__PURE__ */ jsx20("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx20("p", { children: quote }) }),
|
|
15000
|
+
/* @__PURE__ */ jsxs19("figcaption", { className: "flex items-center gap-3", children: [
|
|
14875
15001
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14876
|
-
/* @__PURE__ */
|
|
15002
|
+
/* @__PURE__ */ jsx20(
|
|
14877
15003
|
"img",
|
|
14878
15004
|
{
|
|
14879
15005
|
src: avatarUrl,
|
|
@@ -14882,9 +15008,9 @@ function TestimonialBlock({ block }) {
|
|
|
14882
15008
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14883
15009
|
}
|
|
14884
15010
|
),
|
|
14885
|
-
/* @__PURE__ */
|
|
14886
|
-
/* @__PURE__ */
|
|
14887
|
-
role && /* @__PURE__ */
|
|
15011
|
+
/* @__PURE__ */ jsxs19("span", { children: [
|
|
15012
|
+
/* @__PURE__ */ jsx20("span", { className: "font-semibold", children: author }),
|
|
15013
|
+
role && /* @__PURE__ */ jsx20("span", { className: "block text-sm opacity-80", children: role })
|
|
14888
15014
|
] })
|
|
14889
15015
|
] })
|
|
14890
15016
|
] });
|
|
@@ -14893,19 +15019,19 @@ function CtaSlotBlock(_props) {
|
|
|
14893
15019
|
return null;
|
|
14894
15020
|
}
|
|
14895
15021
|
function FeatureListBlock({ block }) {
|
|
14896
|
-
return /* @__PURE__ */
|
|
15022
|
+
return /* @__PURE__ */ jsx20("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx20("li", { children: item.text }, i)) });
|
|
14897
15023
|
}
|
|
14898
15024
|
function GalleryBlock({ block }) {
|
|
14899
15025
|
const { images } = block.data;
|
|
14900
|
-
return /* @__PURE__ */
|
|
15026
|
+
return /* @__PURE__ */ jsx20(
|
|
14901
15027
|
"div",
|
|
14902
15028
|
{
|
|
14903
|
-
className:
|
|
15029
|
+
className: cn14(
|
|
14904
15030
|
"grid gap-4",
|
|
14905
15031
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14906
15032
|
),
|
|
14907
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14908
|
-
/* @__PURE__ */
|
|
15033
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs19("figure", { className: "space-y-1", children: [
|
|
15034
|
+
/* @__PURE__ */ jsx20("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx20(
|
|
14909
15035
|
"img",
|
|
14910
15036
|
{
|
|
14911
15037
|
src: img.url,
|
|
@@ -14914,7 +15040,7 @@ function GalleryBlock({ block }) {
|
|
|
14914
15040
|
className: "h-full w-full object-cover"
|
|
14915
15041
|
}
|
|
14916
15042
|
) }),
|
|
14917
|
-
img.caption && /* @__PURE__ */
|
|
15043
|
+
img.caption && /* @__PURE__ */ jsx20("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14918
15044
|
] }, `${img.url}-${i}`))
|
|
14919
15045
|
}
|
|
14920
15046
|
);
|
|
@@ -14924,13 +15050,13 @@ function EmbedCard({
|
|
|
14924
15050
|
headingLevel,
|
|
14925
15051
|
embedHref
|
|
14926
15052
|
}) {
|
|
14927
|
-
return /* @__PURE__ */
|
|
15053
|
+
return /* @__PURE__ */ jsxs19(
|
|
14928
15054
|
"a",
|
|
14929
15055
|
{
|
|
14930
15056
|
href: embedHref(resolved),
|
|
14931
15057
|
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",
|
|
14932
15058
|
children: [
|
|
14933
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
15059
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx20("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx20(
|
|
14934
15060
|
"img",
|
|
14935
15061
|
{
|
|
14936
15062
|
src: resolved.coverImageUrl,
|
|
@@ -14939,35 +15065,35 @@ function EmbedCard({
|
|
|
14939
15065
|
className: "h-full w-full object-cover"
|
|
14940
15066
|
}
|
|
14941
15067
|
) }),
|
|
14942
|
-
/* @__PURE__ */
|
|
14943
|
-
/* @__PURE__ */
|
|
14944
|
-
resolved.role && /* @__PURE__ */
|
|
14945
|
-
resolved.excerpt && /* @__PURE__ */
|
|
15068
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1 p-4", children: [
|
|
15069
|
+
/* @__PURE__ */ jsx20(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
15070
|
+
resolved.role && /* @__PURE__ */ jsx20("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
15071
|
+
resolved.excerpt && /* @__PURE__ */ jsx20("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14946
15072
|
] })
|
|
14947
15073
|
]
|
|
14948
15074
|
}
|
|
14949
15075
|
);
|
|
14950
15076
|
}
|
|
14951
15077
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14952
|
-
return /* @__PURE__ */
|
|
15078
|
+
return /* @__PURE__ */ jsx20(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14953
15079
|
}
|
|
14954
15080
|
function ProfileEmbedBlock({
|
|
14955
15081
|
block,
|
|
14956
15082
|
headingLevel,
|
|
14957
15083
|
embedHref
|
|
14958
15084
|
}) {
|
|
14959
|
-
return /* @__PURE__ */
|
|
15085
|
+
return /* @__PURE__ */ jsx20(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14960
15086
|
}
|
|
14961
15087
|
function BeforeAfterBlock({ block }) {
|
|
14962
15088
|
const { pairs, showCaption, caption } = block.data;
|
|
14963
|
-
return /* @__PURE__ */
|
|
15089
|
+
return /* @__PURE__ */ jsx20(BeforeAfterPairs, { pairs, showCaption, caption });
|
|
14964
15090
|
}
|
|
14965
15091
|
function ChipsBlock({ block }) {
|
|
14966
|
-
return /* @__PURE__ */
|
|
15092
|
+
return /* @__PURE__ */ jsx20(ChipList, { items: block.data.items });
|
|
14967
15093
|
}
|
|
14968
15094
|
function ImageTextBlock({ block, headingLevel, headingId }) {
|
|
14969
15095
|
const { kicker, imageUrl, alt, imageSide, mobileOrder, html: html5 } = block.data;
|
|
14970
|
-
return /* @__PURE__ */
|
|
15096
|
+
return /* @__PURE__ */ jsx20(
|
|
14971
15097
|
ImageTextSplit,
|
|
14972
15098
|
{
|
|
14973
15099
|
imageUrl,
|
|
@@ -14983,7 +15109,7 @@ function ImageTextBlock({ block, headingLevel, headingId }) {
|
|
|
14983
15109
|
);
|
|
14984
15110
|
}
|
|
14985
15111
|
function IconCardsBlock({ block, headingLevel }) {
|
|
14986
|
-
return /* @__PURE__ */
|
|
15112
|
+
return /* @__PURE__ */ jsx20(IconCardGrid, { items: block.data.items, intro: block.data.intro, headingLevel });
|
|
14987
15113
|
}
|
|
14988
15114
|
var DEFAULT_RENDERERS = {
|
|
14989
15115
|
hero: HeroBlock,
|
|
@@ -15057,14 +15183,14 @@ function toIdFragment(value) {
|
|
|
15057
15183
|
function SectionCta2({ cta }) {
|
|
15058
15184
|
if (!hasUsableCta(cta)) return null;
|
|
15059
15185
|
const variant = toButtonVariant(cta.variant);
|
|
15060
|
-
return /* @__PURE__ */
|
|
15186
|
+
return /* @__PURE__ */ jsx20("div", { className: "pt-2", children: /* @__PURE__ */ jsx20(
|
|
15061
15187
|
"a",
|
|
15062
15188
|
{
|
|
15063
15189
|
href: cta.url,
|
|
15064
15190
|
"data-slot": "button",
|
|
15065
15191
|
"data-variant": variant,
|
|
15066
15192
|
"data-size": "default",
|
|
15067
|
-
className:
|
|
15193
|
+
className: cn14(buttonVariants2({ variant, size: "default" })),
|
|
15068
15194
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
15069
15195
|
children: cta.label
|
|
15070
15196
|
}
|
|
@@ -15092,18 +15218,18 @@ function PageBlocks({
|
|
|
15092
15218
|
const kicker = kickerOf(type, block);
|
|
15093
15219
|
const ownsHeading = OWN_HEADING_TYPES.has(type);
|
|
15094
15220
|
return [
|
|
15095
|
-
/* @__PURE__ */
|
|
15221
|
+
/* @__PURE__ */ jsxs19(
|
|
15096
15222
|
"section",
|
|
15097
15223
|
{
|
|
15098
15224
|
"data-slot": "page-block",
|
|
15099
15225
|
"data-block-type": type,
|
|
15100
15226
|
"aria-labelledby": headingId,
|
|
15101
15227
|
style: surfaceStyle(background),
|
|
15102
|
-
className:
|
|
15228
|
+
className: cn14("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
15103
15229
|
children: [
|
|
15104
|
-
kicker && /* @__PURE__ */
|
|
15105
|
-
block.heading && !ownsHeading && /* @__PURE__ */
|
|
15106
|
-
ownsHeading ? /* @__PURE__ */
|
|
15230
|
+
kicker && /* @__PURE__ */ jsx20("p", { "data-slot": "page-block-kicker", className: cn14("-mb-4", KICKER_CLASS_NAME), children: kicker }),
|
|
15231
|
+
block.heading && !ownsHeading && /* @__PURE__ */ jsx20(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx20("span", { id: headingId, children: block.heading }) }),
|
|
15232
|
+
ownsHeading ? /* @__PURE__ */ jsx20(
|
|
15107
15233
|
Renderer,
|
|
15108
15234
|
{
|
|
15109
15235
|
block,
|
|
@@ -15111,7 +15237,7 @@ function PageBlocks({
|
|
|
15111
15237
|
embedHref,
|
|
15112
15238
|
headingId
|
|
15113
15239
|
}
|
|
15114
|
-
) : /* @__PURE__ */
|
|
15240
|
+
) : /* @__PURE__ */ jsx20(
|
|
15115
15241
|
Renderer,
|
|
15116
15242
|
{
|
|
15117
15243
|
block,
|
|
@@ -15119,7 +15245,7 @@ function PageBlocks({
|
|
|
15119
15245
|
embedHref
|
|
15120
15246
|
}
|
|
15121
15247
|
),
|
|
15122
|
-
/* @__PURE__ */
|
|
15248
|
+
/* @__PURE__ */ jsx20(SectionCta2, { cta: block.cta })
|
|
15123
15249
|
]
|
|
15124
15250
|
},
|
|
15125
15251
|
block.id
|
|
@@ -15127,12 +15253,12 @@ function PageBlocks({
|
|
|
15127
15253
|
];
|
|
15128
15254
|
});
|
|
15129
15255
|
if (sections.length === 0) return null;
|
|
15130
|
-
return /* @__PURE__ */
|
|
15256
|
+
return /* @__PURE__ */ jsx20("div", { className: cn14("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
15131
15257
|
}
|
|
15132
15258
|
|
|
15133
15259
|
// src/components/shop-filters.tsx
|
|
15134
|
-
import { cn as
|
|
15135
|
-
import { jsx as
|
|
15260
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
15261
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15136
15262
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
15137
15263
|
{ max: 2500 },
|
|
15138
15264
|
{ min: 2500, max: 5e3 },
|
|
@@ -15176,7 +15302,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
15176
15302
|
return "";
|
|
15177
15303
|
}
|
|
15178
15304
|
function OptionLink({ href, active, label, onActivate }) {
|
|
15179
|
-
return /* @__PURE__ */
|
|
15305
|
+
return /* @__PURE__ */ jsx21(
|
|
15180
15306
|
"a",
|
|
15181
15307
|
{
|
|
15182
15308
|
href,
|
|
@@ -15185,7 +15311,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
15185
15311
|
event.preventDefault();
|
|
15186
15312
|
onActivate();
|
|
15187
15313
|
} : void 0,
|
|
15188
|
-
className:
|
|
15314
|
+
className: cn15(
|
|
15189
15315
|
"inline-flex items-center rounded-full border px-3 py-1 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
15190
15316
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
15191
15317
|
),
|
|
@@ -15194,9 +15320,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
15194
15320
|
);
|
|
15195
15321
|
}
|
|
15196
15322
|
function FilterFieldset({ legend, children: children2 }) {
|
|
15197
|
-
return /* @__PURE__ */
|
|
15198
|
-
/* @__PURE__ */
|
|
15199
|
-
/* @__PURE__ */
|
|
15323
|
+
return /* @__PURE__ */ jsxs20("fieldset", { className: "space-y-2", children: [
|
|
15324
|
+
/* @__PURE__ */ jsx21("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
15325
|
+
/* @__PURE__ */ jsx21("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
15200
15326
|
] });
|
|
15201
15327
|
}
|
|
15202
15328
|
function ShopFilters({
|
|
@@ -15219,11 +15345,11 @@ function ShopFilters({
|
|
|
15219
15345
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
15220
15346
|
return null;
|
|
15221
15347
|
}
|
|
15222
|
-
return /* @__PURE__ */
|
|
15348
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn15("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
15223
15349
|
visibleTaxonomies.map((axis) => {
|
|
15224
15350
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
15225
|
-
return /* @__PURE__ */
|
|
15226
|
-
/* @__PURE__ */
|
|
15351
|
+
return /* @__PURE__ */ jsxs20(FilterFieldset, { legend: axis.label, children: [
|
|
15352
|
+
/* @__PURE__ */ jsx21(
|
|
15227
15353
|
OptionLink,
|
|
15228
15354
|
{
|
|
15229
15355
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -15238,7 +15364,7 @@ function ShopFilters({
|
|
|
15238
15364
|
),
|
|
15239
15365
|
axis.terms.map((term) => {
|
|
15240
15366
|
const isActive = activeSlug === term.slug;
|
|
15241
|
-
return /* @__PURE__ */
|
|
15367
|
+
return /* @__PURE__ */ jsx21(
|
|
15242
15368
|
OptionLink,
|
|
15243
15369
|
{
|
|
15244
15370
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -15258,9 +15384,9 @@ function ShopFilters({
|
|
|
15258
15384
|
}),
|
|
15259
15385
|
visibleAttributes.map((attr) => {
|
|
15260
15386
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
15261
|
-
return /* @__PURE__ */
|
|
15387
|
+
return /* @__PURE__ */ jsx21(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
15262
15388
|
const isActive = activeValues.includes(opt.value);
|
|
15263
|
-
return /* @__PURE__ */
|
|
15389
|
+
return /* @__PURE__ */ jsx21(
|
|
15264
15390
|
OptionLink,
|
|
15265
15391
|
{
|
|
15266
15392
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -15278,11 +15404,11 @@ function ShopFilters({
|
|
|
15278
15404
|
);
|
|
15279
15405
|
}) }, attr.key);
|
|
15280
15406
|
}),
|
|
15281
|
-
showPriceGroup && /* @__PURE__ */
|
|
15407
|
+
showPriceGroup && /* @__PURE__ */ jsx21(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
15282
15408
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
15283
15409
|
const nextMin = isActive ? void 0 : band.min;
|
|
15284
15410
|
const nextMax = isActive ? void 0 : band.max;
|
|
15285
|
-
return /* @__PURE__ */
|
|
15411
|
+
return /* @__PURE__ */ jsx21(
|
|
15286
15412
|
OptionLink,
|
|
15287
15413
|
{
|
|
15288
15414
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -15293,7 +15419,7 @@ function ShopFilters({
|
|
|
15293
15419
|
i
|
|
15294
15420
|
);
|
|
15295
15421
|
}) }),
|
|
15296
|
-
hasOnSale && /* @__PURE__ */
|
|
15422
|
+
hasOnSale && /* @__PURE__ */ jsx21(
|
|
15297
15423
|
OptionLink,
|
|
15298
15424
|
{
|
|
15299
15425
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -15302,7 +15428,7 @@ function ShopFilters({
|
|
|
15302
15428
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
15303
15429
|
}
|
|
15304
15430
|
),
|
|
15305
|
-
/* @__PURE__ */
|
|
15431
|
+
/* @__PURE__ */ jsx21(
|
|
15306
15432
|
"a",
|
|
15307
15433
|
{
|
|
15308
15434
|
href: hrefs.clearAll(),
|
|
@@ -15318,8 +15444,8 @@ function ShopFilters({
|
|
|
15318
15444
|
}
|
|
15319
15445
|
|
|
15320
15446
|
// src/components/course-catalog-filters.tsx
|
|
15321
|
-
import { cn as
|
|
15322
|
-
import { jsx as
|
|
15447
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
15448
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15323
15449
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
15324
15450
|
{ max: 5e3 },
|
|
15325
15451
|
{ min: 5e3, max: 15e3 },
|
|
@@ -15372,9 +15498,9 @@ function CourseCatalogFilters({
|
|
|
15372
15498
|
const showPrice = enabled.price !== false;
|
|
15373
15499
|
const isFree = Boolean(active.free);
|
|
15374
15500
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
15375
|
-
return /* @__PURE__ */
|
|
15376
|
-
showCategories && /* @__PURE__ */
|
|
15377
|
-
/* @__PURE__ */
|
|
15501
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn16("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
15502
|
+
showCategories && /* @__PURE__ */ jsxs21(FilterFieldset, { legend: t.category, children: [
|
|
15503
|
+
/* @__PURE__ */ jsx22(
|
|
15378
15504
|
OptionLink,
|
|
15379
15505
|
{
|
|
15380
15506
|
href: categoryHref(void 0),
|
|
@@ -15386,7 +15512,7 @@ function CourseCatalogFilters({
|
|
|
15386
15512
|
sortedCategories.map((category) => {
|
|
15387
15513
|
const isActive = active.category === category.slug;
|
|
15388
15514
|
const next2 = isActive ? void 0 : category.slug;
|
|
15389
|
-
return /* @__PURE__ */
|
|
15515
|
+
return /* @__PURE__ */ jsx22(
|
|
15390
15516
|
OptionLink,
|
|
15391
15517
|
{
|
|
15392
15518
|
href: categoryHref(next2),
|
|
@@ -15398,8 +15524,8 @@ function CourseCatalogFilters({
|
|
|
15398
15524
|
);
|
|
15399
15525
|
})
|
|
15400
15526
|
] }),
|
|
15401
|
-
showInstructors && /* @__PURE__ */
|
|
15402
|
-
/* @__PURE__ */
|
|
15527
|
+
showInstructors && /* @__PURE__ */ jsxs21(FilterFieldset, { legend: t.instructor, children: [
|
|
15528
|
+
/* @__PURE__ */ jsx22(
|
|
15403
15529
|
OptionLink,
|
|
15404
15530
|
{
|
|
15405
15531
|
href: hrefs.instructor(void 0),
|
|
@@ -15411,7 +15537,7 @@ function CourseCatalogFilters({
|
|
|
15411
15537
|
named.map((instructor) => {
|
|
15412
15538
|
const isActive = active.instructor === instructor.id;
|
|
15413
15539
|
const next2 = isActive ? void 0 : instructor.id;
|
|
15414
|
-
return /* @__PURE__ */
|
|
15540
|
+
return /* @__PURE__ */ jsx22(
|
|
15415
15541
|
OptionLink,
|
|
15416
15542
|
{
|
|
15417
15543
|
href: hrefs.instructor(next2),
|
|
@@ -15423,8 +15549,8 @@ function CourseCatalogFilters({
|
|
|
15423
15549
|
);
|
|
15424
15550
|
})
|
|
15425
15551
|
] }),
|
|
15426
|
-
showPrice && /* @__PURE__ */
|
|
15427
|
-
/* @__PURE__ */
|
|
15552
|
+
showPrice && /* @__PURE__ */ jsxs21(FilterFieldset, { legend: t.price, children: [
|
|
15553
|
+
/* @__PURE__ */ jsx22(
|
|
15428
15554
|
OptionLink,
|
|
15429
15555
|
{
|
|
15430
15556
|
href: hrefs.free(!isFree),
|
|
@@ -15439,7 +15565,7 @@ function CourseCatalogFilters({
|
|
|
15439
15565
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
15440
15566
|
const nextMin = isActive ? void 0 : band.min;
|
|
15441
15567
|
const nextMax = isActive ? void 0 : band.max;
|
|
15442
|
-
return /* @__PURE__ */
|
|
15568
|
+
return /* @__PURE__ */ jsx22(
|
|
15443
15569
|
OptionLink,
|
|
15444
15570
|
{
|
|
15445
15571
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -15451,7 +15577,7 @@ function CourseCatalogFilters({
|
|
|
15451
15577
|
);
|
|
15452
15578
|
})
|
|
15453
15579
|
] }),
|
|
15454
|
-
/* @__PURE__ */
|
|
15580
|
+
/* @__PURE__ */ jsx22(
|
|
15455
15581
|
"a",
|
|
15456
15582
|
{
|
|
15457
15583
|
href: hrefs.clearAll(),
|
|
@@ -15473,8 +15599,8 @@ function CourseCatalogFilters({
|
|
|
15473
15599
|
}
|
|
15474
15600
|
|
|
15475
15601
|
// src/components/cart-line-list.tsx
|
|
15476
|
-
import { cn as
|
|
15477
|
-
import { jsx as
|
|
15602
|
+
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
15603
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15478
15604
|
var DEFAULT_LABELS2 = {
|
|
15479
15605
|
quantityLabel: "Cantidad",
|
|
15480
15606
|
decrease: "Reducir cantidad",
|
|
@@ -15487,20 +15613,20 @@ var DEFAULT_LABELS2 = {
|
|
|
15487
15613
|
function CartLineIncludes({ entries, note, className }) {
|
|
15488
15614
|
const hasNote = note != null && note !== false && note !== "";
|
|
15489
15615
|
if (entries.length === 0 && !hasNote) return null;
|
|
15490
|
-
return /* @__PURE__ */
|
|
15616
|
+
return /* @__PURE__ */ jsxs22(
|
|
15491
15617
|
"div",
|
|
15492
15618
|
{
|
|
15493
|
-
className:
|
|
15619
|
+
className: cn17("mt-2 space-y-2 rounded-lg bg-muted px-4 py-3 text-sm", className),
|
|
15494
15620
|
"data-slot": "cart-line-includes",
|
|
15495
15621
|
children: [
|
|
15496
|
-
entries.length > 0 && /* @__PURE__ */
|
|
15622
|
+
entries.length > 0 && /* @__PURE__ */ jsx23("dl", { className: "grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5", children: entries.map((entry, idx) => (
|
|
15497
15623
|
// eslint-disable-next-line react/no-array-index-key -- entries are positional, SITE-built rows
|
|
15498
|
-
/* @__PURE__ */
|
|
15499
|
-
/* @__PURE__ */
|
|
15500
|
-
/* @__PURE__ */
|
|
15624
|
+
/* @__PURE__ */ jsxs22("div", { className: "contents", children: [
|
|
15625
|
+
/* @__PURE__ */ jsx23("dt", { className: "font-semibold text-muted-foreground", children: entry.label }),
|
|
15626
|
+
/* @__PURE__ */ jsx23("dd", { className: "m-0", children: entry.value })
|
|
15501
15627
|
] }, idx)
|
|
15502
15628
|
)) }),
|
|
15503
|
-
hasNote && /* @__PURE__ */
|
|
15629
|
+
hasNote && /* @__PURE__ */ jsx23("p", { className: "text-muted-foreground", children: note })
|
|
15504
15630
|
]
|
|
15505
15631
|
}
|
|
15506
15632
|
);
|
|
@@ -15529,9 +15655,9 @@ function CartLineList({
|
|
|
15529
15655
|
}) {
|
|
15530
15656
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
15531
15657
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15532
|
-
return /* @__PURE__ */
|
|
15533
|
-
/* @__PURE__ */
|
|
15534
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
15658
|
+
return /* @__PURE__ */ jsxs22("div", { className: cn17("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
15659
|
+
/* @__PURE__ */ jsx23("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
15660
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx23(
|
|
15535
15661
|
"div",
|
|
15536
15662
|
{
|
|
15537
15663
|
role: "status",
|
|
@@ -15540,34 +15666,34 @@ function CartLineList({
|
|
|
15540
15666
|
children: noticeContent
|
|
15541
15667
|
}
|
|
15542
15668
|
),
|
|
15543
|
-
/* @__PURE__ */
|
|
15669
|
+
/* @__PURE__ */ jsx23("ul", { className: "space-y-4", children: items.map((item) => {
|
|
15544
15670
|
const maxQty = item.maxStock ?? Infinity;
|
|
15545
15671
|
const atMax = item.quantity >= maxQty;
|
|
15546
15672
|
const atMin = item.quantity <= 1;
|
|
15547
15673
|
const message = lineMessage?.(item);
|
|
15548
15674
|
const includes = lineIncludes?.(item);
|
|
15549
|
-
return /* @__PURE__ */
|
|
15675
|
+
return /* @__PURE__ */ jsxs22(
|
|
15550
15676
|
"li",
|
|
15551
15677
|
{
|
|
15552
15678
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
15553
15679
|
children: [
|
|
15554
|
-
/* @__PURE__ */
|
|
15555
|
-
/* @__PURE__ */
|
|
15556
|
-
/* @__PURE__ */
|
|
15557
|
-
item.variantName && /* @__PURE__ */
|
|
15558
|
-
/* @__PURE__ */
|
|
15680
|
+
/* @__PURE__ */ jsx23("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx23("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15681
|
+
/* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
|
|
15682
|
+
/* @__PURE__ */ jsx23("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15683
|
+
item.variantName && /* @__PURE__ */ jsx23("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15684
|
+
/* @__PURE__ */ jsxs22("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
15559
15685
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
15560
15686
|
" ",
|
|
15561
15687
|
t.unitPriceSuffix
|
|
15562
15688
|
] }),
|
|
15563
|
-
/* @__PURE__ */
|
|
15689
|
+
/* @__PURE__ */ jsxs22(
|
|
15564
15690
|
"div",
|
|
15565
15691
|
{
|
|
15566
15692
|
role: "group",
|
|
15567
15693
|
"aria-label": t.quantityLabel,
|
|
15568
15694
|
className: "mt-3 flex items-center gap-3",
|
|
15569
15695
|
children: [
|
|
15570
|
-
/* @__PURE__ */
|
|
15696
|
+
/* @__PURE__ */ jsx23(
|
|
15571
15697
|
"button",
|
|
15572
15698
|
{
|
|
15573
15699
|
type: "button",
|
|
@@ -15578,8 +15704,8 @@ function CartLineList({
|
|
|
15578
15704
|
children: "\u2212"
|
|
15579
15705
|
}
|
|
15580
15706
|
),
|
|
15581
|
-
/* @__PURE__ */
|
|
15582
|
-
/* @__PURE__ */
|
|
15707
|
+
/* @__PURE__ */ jsx23("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
15708
|
+
/* @__PURE__ */ jsx23(
|
|
15583
15709
|
"button",
|
|
15584
15710
|
{
|
|
15585
15711
|
type: "button",
|
|
@@ -15590,7 +15716,7 @@ function CartLineList({
|
|
|
15590
15716
|
children: "+"
|
|
15591
15717
|
}
|
|
15592
15718
|
),
|
|
15593
|
-
onRemove && /* @__PURE__ */
|
|
15719
|
+
onRemove && /* @__PURE__ */ jsx23(
|
|
15594
15720
|
"button",
|
|
15595
15721
|
{
|
|
15596
15722
|
type: "button",
|
|
@@ -15603,7 +15729,7 @@ function CartLineList({
|
|
|
15603
15729
|
]
|
|
15604
15730
|
}
|
|
15605
15731
|
),
|
|
15606
|
-
message != null && message !== false && /* @__PURE__ */
|
|
15732
|
+
message != null && message !== false && /* @__PURE__ */ jsx23(
|
|
15607
15733
|
"p",
|
|
15608
15734
|
{
|
|
15609
15735
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15611,12 +15737,12 @@ function CartLineList({
|
|
|
15611
15737
|
children: message
|
|
15612
15738
|
}
|
|
15613
15739
|
),
|
|
15614
|
-
includes != null && includes !== false && /* @__PURE__ */
|
|
15615
|
-
/* @__PURE__ */
|
|
15740
|
+
includes != null && includes !== false && /* @__PURE__ */ jsxs22("details", { className: "mt-2", "data-slot": "cart-line-list-includes", children: [
|
|
15741
|
+
/* @__PURE__ */ jsx23("summary", { className: "cursor-pointer text-sm font-semibold text-primary", children: t.includesSummary }),
|
|
15616
15742
|
includes
|
|
15617
15743
|
] })
|
|
15618
15744
|
] }),
|
|
15619
|
-
/* @__PURE__ */
|
|
15745
|
+
/* @__PURE__ */ jsx23("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx23("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15620
15746
|
]
|
|
15621
15747
|
},
|
|
15622
15748
|
lineKey(item.productId, item.variantId)
|
|
@@ -15626,8 +15752,8 @@ function CartLineList({
|
|
|
15626
15752
|
}
|
|
15627
15753
|
|
|
15628
15754
|
// src/components/cart-summary.tsx
|
|
15629
|
-
import { cn as
|
|
15630
|
-
import { jsx as
|
|
15755
|
+
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15756
|
+
import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
15631
15757
|
var DEFAULT_LABELS3 = {
|
|
15632
15758
|
subtotal: "Subtotal",
|
|
15633
15759
|
discountPrefix: "Descuento",
|
|
@@ -15657,37 +15783,37 @@ function CartSummary({
|
|
|
15657
15783
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15658
15784
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15659
15785
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15660
|
-
const breakdown = /* @__PURE__ */
|
|
15786
|
+
const breakdown = /* @__PURE__ */ jsxs23(
|
|
15661
15787
|
"dl",
|
|
15662
15788
|
{
|
|
15663
|
-
className:
|
|
15789
|
+
className: cn18("space-y-2 text-sm", !hasNotice && className),
|
|
15664
15790
|
"data-slot": "cart-summary",
|
|
15665
15791
|
children: [
|
|
15666
|
-
/* @__PURE__ */
|
|
15667
|
-
/* @__PURE__ */
|
|
15668
|
-
/* @__PURE__ */
|
|
15792
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15793
|
+
/* @__PURE__ */ jsx24("dt", { children: t.subtotal }),
|
|
15794
|
+
/* @__PURE__ */ jsx24("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15669
15795
|
] }),
|
|
15670
|
-
hasDiscount && /* @__PURE__ */
|
|
15671
|
-
/* @__PURE__ */
|
|
15672
|
-
/* @__PURE__ */
|
|
15796
|
+
hasDiscount && /* @__PURE__ */ jsxs23("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
15797
|
+
/* @__PURE__ */ jsx24("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
15798
|
+
/* @__PURE__ */ jsxs23("dd", { children: [
|
|
15673
15799
|
"-",
|
|
15674
15800
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15675
15801
|
] })
|
|
15676
15802
|
] }),
|
|
15677
|
-
shippingEnabled && /* @__PURE__ */
|
|
15678
|
-
/* @__PURE__ */
|
|
15679
|
-
/* @__PURE__ */
|
|
15803
|
+
shippingEnabled && /* @__PURE__ */ jsxs23("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15804
|
+
/* @__PURE__ */ jsx24("dt", { children: t.shipping }),
|
|
15805
|
+
/* @__PURE__ */ jsx24("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15680
15806
|
] }),
|
|
15681
|
-
/* @__PURE__ */
|
|
15682
|
-
/* @__PURE__ */
|
|
15683
|
-
/* @__PURE__ */
|
|
15807
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
15808
|
+
/* @__PURE__ */ jsx24("dt", { children: t.total }),
|
|
15809
|
+
/* @__PURE__ */ jsx24("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15684
15810
|
] })
|
|
15685
15811
|
]
|
|
15686
15812
|
}
|
|
15687
15813
|
);
|
|
15688
15814
|
if (!hasNotice) return breakdown;
|
|
15689
|
-
return /* @__PURE__ */
|
|
15690
|
-
/* @__PURE__ */
|
|
15815
|
+
return /* @__PURE__ */ jsxs23("div", { className: cn18("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
15816
|
+
/* @__PURE__ */ jsx24(
|
|
15691
15817
|
"div",
|
|
15692
15818
|
{
|
|
15693
15819
|
role: "status",
|
|
@@ -15701,8 +15827,8 @@ function CartSummary({
|
|
|
15701
15827
|
}
|
|
15702
15828
|
|
|
15703
15829
|
// src/components/cart-adjustments-notice.tsx
|
|
15704
|
-
import { cn as
|
|
15705
|
-
import { jsx as
|
|
15830
|
+
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
15831
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
15706
15832
|
var DEFAULT_LABELS4 = {
|
|
15707
15833
|
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.`,
|
|
15708
15834
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15736,20 +15862,20 @@ function CartAdjustmentsNotice({
|
|
|
15736
15862
|
);
|
|
15737
15863
|
}
|
|
15738
15864
|
if (messages.length === 0) return null;
|
|
15739
|
-
return /* @__PURE__ */
|
|
15865
|
+
return /* @__PURE__ */ jsx25(
|
|
15740
15866
|
"div",
|
|
15741
15867
|
{
|
|
15742
15868
|
role: "status",
|
|
15743
|
-
className:
|
|
15869
|
+
className: cn19("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15744
15870
|
"data-slot": "cart-adjustments-notice",
|
|
15745
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
15871
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx25("p", { children: messages[0] }) : /* @__PURE__ */ jsx25("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx25("li", { children: message }, index)) })
|
|
15746
15872
|
}
|
|
15747
15873
|
);
|
|
15748
15874
|
}
|
|
15749
15875
|
|
|
15750
15876
|
// src/components/added-to-cart-toast.tsx
|
|
15751
|
-
import { cn as
|
|
15752
|
-
import { jsx as
|
|
15877
|
+
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15878
|
+
import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
15753
15879
|
var DEFAULT_LABELS5 = {
|
|
15754
15880
|
success: "A\xF1adido al carrito",
|
|
15755
15881
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -15769,12 +15895,12 @@ function AddedToCartToast({
|
|
|
15769
15895
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15770
15896
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
15771
15897
|
const variant = status === "success" ? "success" : "error";
|
|
15772
|
-
return /* @__PURE__ */
|
|
15898
|
+
return /* @__PURE__ */ jsxs24(
|
|
15773
15899
|
"div",
|
|
15774
15900
|
{
|
|
15775
15901
|
"data-slot": "added-to-cart-toast",
|
|
15776
15902
|
"data-variant": variant,
|
|
15777
|
-
className:
|
|
15903
|
+
className: cn20(
|
|
15778
15904
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
15779
15905
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
15780
15906
|
variant === "error" && "border-destructive/30",
|
|
@@ -15782,20 +15908,20 @@ function AddedToCartToast({
|
|
|
15782
15908
|
),
|
|
15783
15909
|
children: [
|
|
15784
15910
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15785
|
-
/* @__PURE__ */
|
|
15786
|
-
/* @__PURE__ */
|
|
15787
|
-
/* @__PURE__ */
|
|
15788
|
-
/* @__PURE__ */
|
|
15911
|
+
/* @__PURE__ */ jsx26("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15912
|
+
/* @__PURE__ */ jsxs24("div", { className: "min-w-0 flex-1", children: [
|
|
15913
|
+
/* @__PURE__ */ jsx26("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15914
|
+
/* @__PURE__ */ jsx26("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
15789
15915
|
] }),
|
|
15790
|
-
/* @__PURE__ */
|
|
15916
|
+
/* @__PURE__ */ jsx26("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx26("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
15791
15917
|
]
|
|
15792
15918
|
}
|
|
15793
15919
|
);
|
|
15794
15920
|
}
|
|
15795
15921
|
|
|
15796
15922
|
// src/components/checkout-login-prompt.tsx
|
|
15797
|
-
import { cn as
|
|
15798
|
-
import { Fragment as
|
|
15923
|
+
import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
15924
|
+
import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
15799
15925
|
var DEFAULT_LABELS6 = {
|
|
15800
15926
|
title: "Identificaci\xF3n",
|
|
15801
15927
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -15822,26 +15948,26 @@ function CheckoutLoginPrompt({
|
|
|
15822
15948
|
if (!open) return null;
|
|
15823
15949
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
15824
15950
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
15825
|
-
return /* @__PURE__ */
|
|
15826
|
-
/* @__PURE__ */
|
|
15827
|
-
/* @__PURE__ */
|
|
15951
|
+
return /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
15952
|
+
/* @__PURE__ */ jsx27("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15953
|
+
/* @__PURE__ */ jsxs25(
|
|
15828
15954
|
"div",
|
|
15829
15955
|
{
|
|
15830
15956
|
role: "dialog",
|
|
15831
15957
|
"aria-modal": "true",
|
|
15832
15958
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
15833
15959
|
"data-slot": "checkout-login-prompt",
|
|
15834
|
-
className:
|
|
15960
|
+
className: cn21(
|
|
15835
15961
|
"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 space-y-5 rounded-2xl border border-border bg-background p-6 shadow-2xl",
|
|
15836
15962
|
className
|
|
15837
15963
|
),
|
|
15838
15964
|
children: [
|
|
15839
|
-
/* @__PURE__ */
|
|
15840
|
-
/* @__PURE__ */
|
|
15841
|
-
/* @__PURE__ */
|
|
15842
|
-
/* @__PURE__ */
|
|
15965
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15966
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
15967
|
+
/* @__PURE__ */ jsx27("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15968
|
+
/* @__PURE__ */ jsx27("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
15843
15969
|
] }),
|
|
15844
|
-
/* @__PURE__ */
|
|
15970
|
+
/* @__PURE__ */ jsx27(
|
|
15845
15971
|
"button",
|
|
15846
15972
|
{
|
|
15847
15973
|
type: "button",
|
|
@@ -15852,9 +15978,9 @@ function CheckoutLoginPrompt({
|
|
|
15852
15978
|
}
|
|
15853
15979
|
)
|
|
15854
15980
|
] }),
|
|
15855
|
-
/* @__PURE__ */
|
|
15856
|
-
/* @__PURE__ */
|
|
15857
|
-
/* @__PURE__ */
|
|
15981
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
15982
|
+
/* @__PURE__ */ jsx27("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15983
|
+
/* @__PURE__ */ jsx27(
|
|
15858
15984
|
"input",
|
|
15859
15985
|
{
|
|
15860
15986
|
id: "checkout-login-prompt-email",
|
|
@@ -15863,29 +15989,29 @@ function CheckoutLoginPrompt({
|
|
|
15863
15989
|
value: email,
|
|
15864
15990
|
onChange: (e) => onEmailChange(e.target.value),
|
|
15865
15991
|
placeholder: t.emailPlaceholder,
|
|
15866
|
-
className:
|
|
15992
|
+
className: cn21(
|
|
15867
15993
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15868
15994
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
15869
15995
|
)
|
|
15870
15996
|
}
|
|
15871
15997
|
),
|
|
15872
|
-
error && /* @__PURE__ */
|
|
15998
|
+
error && /* @__PURE__ */ jsx27("p", { className: "text-xs text-destructive", children: error })
|
|
15873
15999
|
] }),
|
|
15874
|
-
/* @__PURE__ */
|
|
15875
|
-
/* @__PURE__ */
|
|
16000
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
16001
|
+
/* @__PURE__ */ jsx27(
|
|
15876
16002
|
"button",
|
|
15877
16003
|
{
|
|
15878
16004
|
type: "button",
|
|
15879
16005
|
onClick: onSubmitEmail,
|
|
15880
16006
|
disabled: checking || !isValidEmail,
|
|
15881
|
-
className:
|
|
16007
|
+
className: cn21(
|
|
15882
16008
|
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
15883
16009
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
15884
16010
|
),
|
|
15885
16011
|
children: checking ? t.checking : t.continueWithEmail
|
|
15886
16012
|
}
|
|
15887
16013
|
),
|
|
15888
|
-
/* @__PURE__ */
|
|
16014
|
+
/* @__PURE__ */ jsx27(
|
|
15889
16015
|
"button",
|
|
15890
16016
|
{
|
|
15891
16017
|
type: "button",
|
|
@@ -15902,9 +16028,9 @@ function CheckoutLoginPrompt({
|
|
|
15902
16028
|
}
|
|
15903
16029
|
|
|
15904
16030
|
// src/components/checkout-form.tsx
|
|
15905
|
-
import { cn as
|
|
16031
|
+
import { cn as cn22 } from "@reblu/site-ui/utils";
|
|
15906
16032
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
15907
|
-
import { Fragment as
|
|
16033
|
+
import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
15908
16034
|
var DEFAULT_LABELS7 = {
|
|
15909
16035
|
contactTitle: "Datos de contacto",
|
|
15910
16036
|
nameLabel: "Nombre completo",
|
|
@@ -15960,22 +16086,22 @@ function CheckoutForm({
|
|
|
15960
16086
|
event.preventDefault();
|
|
15961
16087
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15962
16088
|
}
|
|
15963
|
-
return /* @__PURE__ */
|
|
16089
|
+
return /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
15964
16090
|
loginPrompt,
|
|
15965
|
-
/* @__PURE__ */
|
|
16091
|
+
/* @__PURE__ */ jsxs26(
|
|
15966
16092
|
"form",
|
|
15967
16093
|
{
|
|
15968
16094
|
"data-testid": "checkout-form",
|
|
15969
16095
|
onSubmit,
|
|
15970
|
-
className:
|
|
16096
|
+
className: cn22("space-y-8", className),
|
|
15971
16097
|
"data-slot": "checkout-form",
|
|
15972
16098
|
children: [
|
|
15973
|
-
/* @__PURE__ */
|
|
15974
|
-
/* @__PURE__ */
|
|
15975
|
-
/* @__PURE__ */
|
|
15976
|
-
/* @__PURE__ */
|
|
15977
|
-
/* @__PURE__ */
|
|
15978
|
-
/* @__PURE__ */
|
|
16099
|
+
/* @__PURE__ */ jsxs26("section", { className: "space-y-4", children: [
|
|
16100
|
+
/* @__PURE__ */ jsx28("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
16101
|
+
/* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
16102
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
16103
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
16104
|
+
/* @__PURE__ */ jsx28(
|
|
15979
16105
|
"input",
|
|
15980
16106
|
{
|
|
15981
16107
|
id: "checkout-form-name",
|
|
@@ -15984,17 +16110,17 @@ function CheckoutForm({
|
|
|
15984
16110
|
value: contact.name,
|
|
15985
16111
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
15986
16112
|
placeholder: t.namePlaceholder,
|
|
15987
|
-
className:
|
|
16113
|
+
className: cn22(
|
|
15988
16114
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15989
16115
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
15990
16116
|
)
|
|
15991
16117
|
}
|
|
15992
16118
|
),
|
|
15993
|
-
contactErrors?.name && /* @__PURE__ */
|
|
16119
|
+
contactErrors?.name && /* @__PURE__ */ jsx28("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15994
16120
|
] }),
|
|
15995
|
-
/* @__PURE__ */
|
|
15996
|
-
/* @__PURE__ */
|
|
15997
|
-
/* @__PURE__ */
|
|
16121
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1", children: [
|
|
16122
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
16123
|
+
/* @__PURE__ */ jsx28(
|
|
15998
16124
|
"input",
|
|
15999
16125
|
{
|
|
16000
16126
|
id: "checkout-form-email",
|
|
@@ -16003,15 +16129,15 @@ function CheckoutForm({
|
|
|
16003
16129
|
value: contact.email,
|
|
16004
16130
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
16005
16131
|
placeholder: t.emailPlaceholder,
|
|
16006
|
-
className:
|
|
16132
|
+
className: cn22(
|
|
16007
16133
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
16008
16134
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
16009
16135
|
)
|
|
16010
16136
|
}
|
|
16011
16137
|
),
|
|
16012
|
-
contactErrors?.email && /* @__PURE__ */
|
|
16138
|
+
contactErrors?.email && /* @__PURE__ */ jsx28("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
16013
16139
|
] }),
|
|
16014
|
-
/* @__PURE__ */
|
|
16140
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-1", children: /* @__PURE__ */ jsx28(
|
|
16015
16141
|
PhoneInput,
|
|
16016
16142
|
{
|
|
16017
16143
|
id: "checkout-form-phone",
|
|
@@ -16025,26 +16151,26 @@ function CheckoutForm({
|
|
|
16025
16151
|
] })
|
|
16026
16152
|
] }),
|
|
16027
16153
|
children2,
|
|
16028
|
-
generalError ? /* @__PURE__ */
|
|
16029
|
-
/* @__PURE__ */
|
|
16030
|
-
/* @__PURE__ */
|
|
16031
|
-
autoDiscount ? /* @__PURE__ */
|
|
16154
|
+
generalError ? /* @__PURE__ */ jsx28("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
16155
|
+
/* @__PURE__ */ jsxs26("section", { className: "space-y-3", children: [
|
|
16156
|
+
/* @__PURE__ */ jsx28("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
16157
|
+
autoDiscount ? /* @__PURE__ */ jsxs26(
|
|
16032
16158
|
"div",
|
|
16033
16159
|
{
|
|
16034
16160
|
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",
|
|
16035
16161
|
"data-slot": "checkout-staff-discount",
|
|
16036
16162
|
children: [
|
|
16037
|
-
/* @__PURE__ */
|
|
16038
|
-
/* @__PURE__ */
|
|
16163
|
+
/* @__PURE__ */ jsx28("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
16164
|
+
/* @__PURE__ */ jsx28("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
16039
16165
|
]
|
|
16040
16166
|
}
|
|
16041
16167
|
) : null,
|
|
16042
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */
|
|
16043
|
-
/* @__PURE__ */
|
|
16044
|
-
/* @__PURE__ */
|
|
16045
|
-
/* @__PURE__ */
|
|
16168
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs26("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: [
|
|
16169
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
16170
|
+
/* @__PURE__ */ jsx28("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
16171
|
+
/* @__PURE__ */ jsx28("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
16046
16172
|
] }),
|
|
16047
|
-
/* @__PURE__ */
|
|
16173
|
+
/* @__PURE__ */ jsx28(
|
|
16048
16174
|
"button",
|
|
16049
16175
|
{
|
|
16050
16176
|
type: "button",
|
|
@@ -16054,9 +16180,9 @@ function CheckoutForm({
|
|
|
16054
16180
|
children: t.removeDiscount
|
|
16055
16181
|
}
|
|
16056
16182
|
)
|
|
16057
|
-
] }) : /* @__PURE__ */
|
|
16058
|
-
/* @__PURE__ */
|
|
16059
|
-
/* @__PURE__ */
|
|
16183
|
+
] }) : /* @__PURE__ */ jsxs26("div", { className: "flex gap-2", children: [
|
|
16184
|
+
/* @__PURE__ */ jsx28("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
16185
|
+
/* @__PURE__ */ jsx28(
|
|
16060
16186
|
"input",
|
|
16061
16187
|
{
|
|
16062
16188
|
id: "checkout-form-discount-code",
|
|
@@ -16068,7 +16194,7 @@ function CheckoutForm({
|
|
|
16068
16194
|
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"
|
|
16069
16195
|
}
|
|
16070
16196
|
),
|
|
16071
|
-
/* @__PURE__ */
|
|
16197
|
+
/* @__PURE__ */ jsx28(
|
|
16072
16198
|
"button",
|
|
16073
16199
|
{
|
|
16074
16200
|
type: "button",
|
|
@@ -16079,14 +16205,14 @@ function CheckoutForm({
|
|
|
16079
16205
|
}
|
|
16080
16206
|
)
|
|
16081
16207
|
] }),
|
|
16082
|
-
discountError && /* @__PURE__ */
|
|
16208
|
+
discountError && /* @__PURE__ */ jsx28("p", { className: "text-xs text-destructive", children: discountError })
|
|
16083
16209
|
] }),
|
|
16084
|
-
/* @__PURE__ */
|
|
16210
|
+
/* @__PURE__ */ jsx28(
|
|
16085
16211
|
"button",
|
|
16086
16212
|
{
|
|
16087
16213
|
type: "submit",
|
|
16088
16214
|
disabled: submitting || submitDisabled,
|
|
16089
|
-
className:
|
|
16215
|
+
className: cn22(
|
|
16090
16216
|
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
16091
16217
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
16092
16218
|
),
|
|
@@ -16100,11 +16226,11 @@ function CheckoutForm({
|
|
|
16100
16226
|
}
|
|
16101
16227
|
|
|
16102
16228
|
// src/components/order-confirmation.tsx
|
|
16103
|
-
import { cn as
|
|
16229
|
+
import { cn as cn24 } from "@reblu/site-ui/utils";
|
|
16104
16230
|
|
|
16105
16231
|
// src/components/order-invoice-link.tsx
|
|
16106
|
-
import { cn as
|
|
16107
|
-
import { jsx as
|
|
16232
|
+
import { cn as cn23 } from "@reblu/site-ui/utils";
|
|
16233
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
16108
16234
|
var DEFAULT_LABELS8 = {
|
|
16109
16235
|
linkLabel: "Descargar la factura {number}",
|
|
16110
16236
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -16112,8 +16238,8 @@ var DEFAULT_LABELS8 = {
|
|
|
16112
16238
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
16113
16239
|
if (!invoice) return null;
|
|
16114
16240
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
16115
|
-
return /* @__PURE__ */
|
|
16116
|
-
/* @__PURE__ */
|
|
16241
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn23("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
16242
|
+
/* @__PURE__ */ jsx29(
|
|
16117
16243
|
"a",
|
|
16118
16244
|
{
|
|
16119
16245
|
href: invoice.url,
|
|
@@ -16121,12 +16247,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
16121
16247
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
16122
16248
|
}
|
|
16123
16249
|
),
|
|
16124
|
-
/* @__PURE__ */
|
|
16250
|
+
/* @__PURE__ */ jsx29("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
16125
16251
|
] });
|
|
16126
16252
|
}
|
|
16127
16253
|
|
|
16128
16254
|
// src/components/order-confirmation.tsx
|
|
16129
|
-
import { jsx as
|
|
16255
|
+
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
16130
16256
|
var DEFAULT_LABELS9 = {
|
|
16131
16257
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
16132
16258
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -16200,43 +16326,43 @@ function OrderConfirmation({
|
|
|
16200
16326
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
16201
16327
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
16202
16328
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
16203
|
-
return /* @__PURE__ */
|
|
16204
|
-
/* @__PURE__ */
|
|
16205
|
-
/* @__PURE__ */
|
|
16206
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
16207
|
-
/* @__PURE__ */
|
|
16208
|
-
/* @__PURE__ */
|
|
16209
|
-
/* @__PURE__ */
|
|
16329
|
+
return /* @__PURE__ */ jsxs28("div", { className: cn24("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
16330
|
+
/* @__PURE__ */ jsx30("h1", { className: "text-3xl font-bold", children: title }),
|
|
16331
|
+
/* @__PURE__ */ jsx30("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
16332
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs28("div", { className: "space-y-6", children: [
|
|
16333
|
+
/* @__PURE__ */ jsxs28("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
16334
|
+
/* @__PURE__ */ jsx30("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
16335
|
+
/* @__PURE__ */ jsx30("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
16210
16336
|
] }),
|
|
16211
|
-
/* @__PURE__ */
|
|
16212
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
16337
|
+
/* @__PURE__ */ jsxs28("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
16338
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs28(
|
|
16213
16339
|
"div",
|
|
16214
16340
|
{
|
|
16215
16341
|
className: "flex justify-between gap-4 text-sm",
|
|
16216
16342
|
children: [
|
|
16217
|
-
/* @__PURE__ */
|
|
16343
|
+
/* @__PURE__ */ jsxs28("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
16218
16344
|
item.product.name,
|
|
16219
16345
|
item.variant ? ` (${item.variant.name})` : "",
|
|
16220
16346
|
" x",
|
|
16221
16347
|
item.quantity
|
|
16222
16348
|
] }),
|
|
16223
|
-
/* @__PURE__ */
|
|
16349
|
+
/* @__PURE__ */ jsx30("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
16224
16350
|
]
|
|
16225
16351
|
},
|
|
16226
16352
|
idx
|
|
16227
16353
|
)),
|
|
16228
|
-
/* @__PURE__ */
|
|
16229
|
-
/* @__PURE__ */
|
|
16230
|
-
/* @__PURE__ */
|
|
16354
|
+
/* @__PURE__ */ jsx30("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs28("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
16355
|
+
/* @__PURE__ */ jsx30("span", { children: t.totalLabel }),
|
|
16356
|
+
/* @__PURE__ */ jsx30("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
16231
16357
|
] }) })
|
|
16232
16358
|
] }),
|
|
16233
|
-
t.foundDescription.includes("{email}") ? null : /* @__PURE__ */
|
|
16359
|
+
t.foundDescription.includes("{email}") ? null : /* @__PURE__ */ jsxs28("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
16234
16360
|
t.confirmationEmailPrefix,
|
|
16235
16361
|
" ",
|
|
16236
|
-
/* @__PURE__ */
|
|
16362
|
+
/* @__PURE__ */ jsx30("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
16237
16363
|
"."
|
|
16238
16364
|
] }),
|
|
16239
|
-
/* @__PURE__ */
|
|
16365
|
+
/* @__PURE__ */ jsx30(
|
|
16240
16366
|
OrderInvoiceLink,
|
|
16241
16367
|
{
|
|
16242
16368
|
invoice: order.invoice,
|
|
@@ -16244,11 +16370,11 @@ function OrderConfirmation({
|
|
|
16244
16370
|
}
|
|
16245
16371
|
)
|
|
16246
16372
|
] }),
|
|
16247
|
-
showOrderReference && order && /* @__PURE__ */
|
|
16248
|
-
/* @__PURE__ */
|
|
16249
|
-
/* @__PURE__ */
|
|
16373
|
+
showOrderReference && order && /* @__PURE__ */ jsxs28("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
16374
|
+
/* @__PURE__ */ jsx30("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
16375
|
+
/* @__PURE__ */ jsx30("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
16250
16376
|
] }),
|
|
16251
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
16377
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx30(
|
|
16252
16378
|
"a",
|
|
16253
16379
|
{
|
|
16254
16380
|
href: cartHref,
|
|
@@ -16256,7 +16382,7 @@ function OrderConfirmation({
|
|
|
16256
16382
|
children: t.backToCartLabel
|
|
16257
16383
|
}
|
|
16258
16384
|
),
|
|
16259
|
-
showRecheck && /* @__PURE__ */
|
|
16385
|
+
showRecheck && /* @__PURE__ */ jsx30(
|
|
16260
16386
|
"button",
|
|
16261
16387
|
{
|
|
16262
16388
|
type: "button",
|
|
@@ -16265,16 +16391,16 @@ function OrderConfirmation({
|
|
|
16265
16391
|
children: t.recheckLabel
|
|
16266
16392
|
}
|
|
16267
16393
|
),
|
|
16268
|
-
showSessionReference && /* @__PURE__ */
|
|
16269
|
-
/* @__PURE__ */
|
|
16270
|
-
/* @__PURE__ */
|
|
16394
|
+
showSessionReference && /* @__PURE__ */ jsxs28("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
16395
|
+
/* @__PURE__ */ jsx30("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
16396
|
+
/* @__PURE__ */ jsx30("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
16271
16397
|
] })
|
|
16272
16398
|
] });
|
|
16273
16399
|
}
|
|
16274
16400
|
|
|
16275
16401
|
// src/components/full-invoice-fields.tsx
|
|
16276
|
-
import { cn as
|
|
16277
|
-
import { jsx as
|
|
16402
|
+
import { cn as cn25 } from "@reblu/site-ui/utils";
|
|
16403
|
+
import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
16278
16404
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
16279
16405
|
wantsFullInvoice: false,
|
|
16280
16406
|
billingIdType: "NIF",
|
|
@@ -16391,12 +16517,12 @@ function FullInvoiceFields({
|
|
|
16391
16517
|
const showFields = value.wantsFullInvoice || overCap;
|
|
16392
16518
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
16393
16519
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
16394
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
16520
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx31("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
16395
16521
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
16396
|
-
return /* @__PURE__ */
|
|
16397
|
-
overCap ? /* @__PURE__ */
|
|
16398
|
-
/* @__PURE__ */
|
|
16399
|
-
/* @__PURE__ */
|
|
16522
|
+
return /* @__PURE__ */ jsxs29("section", { className: cn25("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
16523
|
+
overCap ? /* @__PURE__ */ jsx31("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16524
|
+
/* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
16525
|
+
/* @__PURE__ */ jsx31(
|
|
16400
16526
|
"input",
|
|
16401
16527
|
{
|
|
16402
16528
|
type: "checkbox",
|
|
@@ -16406,12 +16532,12 @@ function FullInvoiceFields({
|
|
|
16406
16532
|
),
|
|
16407
16533
|
t.toggle
|
|
16408
16534
|
] }),
|
|
16409
|
-
/* @__PURE__ */
|
|
16535
|
+
/* @__PURE__ */ jsx31("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
16410
16536
|
] }),
|
|
16411
|
-
showFields && /* @__PURE__ */
|
|
16412
|
-
/* @__PURE__ */
|
|
16413
|
-
/* @__PURE__ */
|
|
16414
|
-
/* @__PURE__ */
|
|
16537
|
+
showFields && /* @__PURE__ */ jsxs29("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
16538
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16539
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
16540
|
+
/* @__PURE__ */ jsx31(
|
|
16415
16541
|
"select",
|
|
16416
16542
|
{
|
|
16417
16543
|
id: "full-invoice-id-type",
|
|
@@ -16420,14 +16546,14 @@ function FullInvoiceFields({
|
|
|
16420
16546
|
value: value.billingIdType,
|
|
16421
16547
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
16422
16548
|
...invalid2("billingIdType"),
|
|
16423
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
16549
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx31("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
16424
16550
|
}
|
|
16425
16551
|
),
|
|
16426
16552
|
error("billingIdType")
|
|
16427
16553
|
] }),
|
|
16428
|
-
!isSpanishNif && /* @__PURE__ */
|
|
16429
|
-
/* @__PURE__ */
|
|
16430
|
-
/* @__PURE__ */
|
|
16554
|
+
!isSpanishNif && /* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16555
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
16556
|
+
/* @__PURE__ */ jsxs29(
|
|
16431
16557
|
"select",
|
|
16432
16558
|
{
|
|
16433
16559
|
id: "full-invoice-id-country",
|
|
@@ -16437,16 +16563,16 @@ function FullInvoiceFields({
|
|
|
16437
16563
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
16438
16564
|
...invalid2("billingIdCountry"),
|
|
16439
16565
|
children: [
|
|
16440
|
-
/* @__PURE__ */
|
|
16441
|
-
countries.map((c) => /* @__PURE__ */
|
|
16566
|
+
/* @__PURE__ */ jsx31("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
16567
|
+
countries.map((c) => /* @__PURE__ */ jsx31("option", { value: c.code, children: c.name }, c.code))
|
|
16442
16568
|
]
|
|
16443
16569
|
}
|
|
16444
16570
|
),
|
|
16445
16571
|
error("billingIdCountry")
|
|
16446
16572
|
] }),
|
|
16447
|
-
/* @__PURE__ */
|
|
16448
|
-
/* @__PURE__ */
|
|
16449
|
-
/* @__PURE__ */
|
|
16573
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16574
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
16575
|
+
/* @__PURE__ */ jsx31(
|
|
16450
16576
|
"input",
|
|
16451
16577
|
{
|
|
16452
16578
|
id: "full-invoice-nif",
|
|
@@ -16459,9 +16585,9 @@ function FullInvoiceFields({
|
|
|
16459
16585
|
),
|
|
16460
16586
|
error("billingNif")
|
|
16461
16587
|
] }),
|
|
16462
|
-
/* @__PURE__ */
|
|
16463
|
-
/* @__PURE__ */
|
|
16464
|
-
/* @__PURE__ */
|
|
16588
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16589
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
16590
|
+
/* @__PURE__ */ jsx31(
|
|
16465
16591
|
"input",
|
|
16466
16592
|
{
|
|
16467
16593
|
id: "full-invoice-name",
|
|
@@ -16474,9 +16600,9 @@ function FullInvoiceFields({
|
|
|
16474
16600
|
),
|
|
16475
16601
|
error("billingName")
|
|
16476
16602
|
] }),
|
|
16477
|
-
/* @__PURE__ */
|
|
16478
|
-
/* @__PURE__ */
|
|
16479
|
-
/* @__PURE__ */
|
|
16603
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
16604
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
16605
|
+
/* @__PURE__ */ jsx31(
|
|
16480
16606
|
"input",
|
|
16481
16607
|
{
|
|
16482
16608
|
id: "full-invoice-street",
|
|
@@ -16488,9 +16614,9 @@ function FullInvoiceFields({
|
|
|
16488
16614
|
}
|
|
16489
16615
|
)
|
|
16490
16616
|
] }),
|
|
16491
|
-
/* @__PURE__ */
|
|
16492
|
-
/* @__PURE__ */
|
|
16493
|
-
/* @__PURE__ */
|
|
16617
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16618
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
16619
|
+
/* @__PURE__ */ jsx31(
|
|
16494
16620
|
"input",
|
|
16495
16621
|
{
|
|
16496
16622
|
id: "full-invoice-postal-code",
|
|
@@ -16501,9 +16627,9 @@ function FullInvoiceFields({
|
|
|
16501
16627
|
}
|
|
16502
16628
|
)
|
|
16503
16629
|
] }),
|
|
16504
|
-
/* @__PURE__ */
|
|
16505
|
-
/* @__PURE__ */
|
|
16506
|
-
/* @__PURE__ */
|
|
16630
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16631
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
16632
|
+
/* @__PURE__ */ jsx31(
|
|
16507
16633
|
"input",
|
|
16508
16634
|
{
|
|
16509
16635
|
id: "full-invoice-city",
|
|
@@ -16514,9 +16640,9 @@ function FullInvoiceFields({
|
|
|
16514
16640
|
}
|
|
16515
16641
|
)
|
|
16516
16642
|
] }),
|
|
16517
|
-
/* @__PURE__ */
|
|
16518
|
-
/* @__PURE__ */
|
|
16519
|
-
/* @__PURE__ */
|
|
16643
|
+
/* @__PURE__ */ jsxs29("div", { className: "space-y-1", children: [
|
|
16644
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
16645
|
+
/* @__PURE__ */ jsx31(
|
|
16520
16646
|
"select",
|
|
16521
16647
|
{
|
|
16522
16648
|
id: "full-invoice-country",
|
|
@@ -16524,18 +16650,18 @@ function FullInvoiceFields({
|
|
|
16524
16650
|
required: true,
|
|
16525
16651
|
value: value.country,
|
|
16526
16652
|
onChange: (e) => set("country", e.target.value),
|
|
16527
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
16653
|
+
children: countries.map((c) => /* @__PURE__ */ jsx31("option", { value: c.code, children: c.name }, c.code))
|
|
16528
16654
|
}
|
|
16529
16655
|
)
|
|
16530
16656
|
] }),
|
|
16531
|
-
/* @__PURE__ */
|
|
16657
|
+
/* @__PURE__ */ jsx31("div", { className: "sm:col-span-2", children: error("address") })
|
|
16532
16658
|
] })
|
|
16533
16659
|
] });
|
|
16534
16660
|
}
|
|
16535
16661
|
|
|
16536
16662
|
// src/components/checkout-delivery-choice.tsx
|
|
16537
|
-
import { cn as
|
|
16538
|
-
import { jsx as
|
|
16663
|
+
import { cn as cn26 } from "@reblu/site-ui/utils";
|
|
16664
|
+
import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
16539
16665
|
var EMPTY_CHECKOUT_ADDRESS = {
|
|
16540
16666
|
firstName: "",
|
|
16541
16667
|
lastName: "",
|
|
@@ -16598,17 +16724,17 @@ function CheckoutDeliveryChoice({
|
|
|
16598
16724
|
const isPickup = value?.type === "PICKUP";
|
|
16599
16725
|
const isShipping = value?.type === "SHIPPING";
|
|
16600
16726
|
const errorId = `${uid}-delivery-error`;
|
|
16601
|
-
return /* @__PURE__ */
|
|
16727
|
+
return /* @__PURE__ */ jsxs30(
|
|
16602
16728
|
"fieldset",
|
|
16603
16729
|
{
|
|
16604
16730
|
"data-slot": "checkout-delivery",
|
|
16605
16731
|
"aria-describedby": error ? errorId : void 0,
|
|
16606
|
-
className:
|
|
16732
|
+
className: cn26("space-y-4", className),
|
|
16607
16733
|
children: [
|
|
16608
|
-
/* @__PURE__ */
|
|
16609
|
-
/* @__PURE__ */
|
|
16610
|
-
homeDelivery ? /* @__PURE__ */
|
|
16611
|
-
/* @__PURE__ */
|
|
16734
|
+
/* @__PURE__ */ jsx32("legend", { className: "mb-2 text-lg font-semibold", children: t.legend }),
|
|
16735
|
+
/* @__PURE__ */ jsxs30("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
16736
|
+
homeDelivery ? /* @__PURE__ */ jsxs30("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
|
|
16737
|
+
/* @__PURE__ */ jsx32(
|
|
16612
16738
|
"input",
|
|
16613
16739
|
{
|
|
16614
16740
|
type: "radio",
|
|
@@ -16618,16 +16744,16 @@ function CheckoutDeliveryChoice({
|
|
|
16618
16744
|
className: "mt-0.5 size-4 accent-primary"
|
|
16619
16745
|
}
|
|
16620
16746
|
),
|
|
16621
|
-
/* @__PURE__ */
|
|
16622
|
-
/* @__PURE__ */
|
|
16623
|
-
/* @__PURE__ */
|
|
16624
|
-
/* @__PURE__ */
|
|
16747
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex-1 space-y-1", children: [
|
|
16748
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex justify-between gap-2 font-medium", children: [
|
|
16749
|
+
/* @__PURE__ */ jsx32("span", { children: copy.shippingOptionLabel }),
|
|
16750
|
+
/* @__PURE__ */ jsx32("span", { className: "tabular-nums", children: homeCost })
|
|
16625
16751
|
] }),
|
|
16626
|
-
delivery.estimatedDeliveryText ? /* @__PURE__ */
|
|
16752
|
+
delivery.estimatedDeliveryText ? /* @__PURE__ */ jsx32("span", { className: "block text-sm text-muted-foreground", children: delivery.estimatedDeliveryText }) : null
|
|
16627
16753
|
] })
|
|
16628
16754
|
] }) : null,
|
|
16629
|
-
pickup ? /* @__PURE__ */
|
|
16630
|
-
/* @__PURE__ */
|
|
16755
|
+
pickup ? /* @__PURE__ */ jsxs30("label", { className: "flex cursor-pointer items-start gap-3 rounded-xl border border-border p-4 has-[:checked]:border-primary", children: [
|
|
16756
|
+
/* @__PURE__ */ jsx32(
|
|
16631
16757
|
"input",
|
|
16632
16758
|
{
|
|
16633
16759
|
type: "radio",
|
|
@@ -16637,23 +16763,23 @@ function CheckoutDeliveryChoice({
|
|
|
16637
16763
|
className: "mt-0.5 size-4 accent-primary"
|
|
16638
16764
|
}
|
|
16639
16765
|
),
|
|
16640
|
-
/* @__PURE__ */
|
|
16641
|
-
/* @__PURE__ */
|
|
16642
|
-
/* @__PURE__ */
|
|
16766
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex flex-1 justify-between gap-2 font-medium", children: [
|
|
16767
|
+
/* @__PURE__ */ jsx32("span", { children: copy.pickupOptionLabel }),
|
|
16768
|
+
/* @__PURE__ */ jsx32("span", { children: t.free })
|
|
16643
16769
|
] })
|
|
16644
16770
|
] }) : null
|
|
16645
16771
|
] }),
|
|
16646
|
-
error ? /* @__PURE__ */
|
|
16647
|
-
isPickup ? /* @__PURE__ */
|
|
16648
|
-
/* @__PURE__ */
|
|
16772
|
+
error ? /* @__PURE__ */ jsx32("p", { id: errorId, role: "alert", className: "text-sm text-destructive", children: error }) : null,
|
|
16773
|
+
isPickup ? /* @__PURE__ */ jsxs30("div", { role: "radiogroup", "aria-labelledby": `${uid}-points`, className: "space-y-2", children: [
|
|
16774
|
+
/* @__PURE__ */ jsx32("p", { id: `${uid}-points`, className: "text-sm font-medium", children: t.pickupPointsLegend }),
|
|
16649
16775
|
delivery.pickupLocations.map((location2) => {
|
|
16650
16776
|
const descId = `${uid}-point-${location2.id}`;
|
|
16651
|
-
return /* @__PURE__ */
|
|
16777
|
+
return /* @__PURE__ */ jsxs30(
|
|
16652
16778
|
"label",
|
|
16653
16779
|
{
|
|
16654
16780
|
className: "flex cursor-pointer items-start gap-3 rounded-lg border border-border p-3 has-[:checked]:border-primary",
|
|
16655
16781
|
children: [
|
|
16656
|
-
/* @__PURE__ */
|
|
16782
|
+
/* @__PURE__ */ jsx32(
|
|
16657
16783
|
"input",
|
|
16658
16784
|
{
|
|
16659
16785
|
type: "radio",
|
|
@@ -16664,9 +16790,9 @@ function CheckoutDeliveryChoice({
|
|
|
16664
16790
|
className: "mt-0.5 size-4 accent-primary"
|
|
16665
16791
|
}
|
|
16666
16792
|
),
|
|
16667
|
-
/* @__PURE__ */
|
|
16668
|
-
/* @__PURE__ */
|
|
16669
|
-
/* @__PURE__ */
|
|
16793
|
+
/* @__PURE__ */ jsxs30("span", { className: "space-y-0.5 text-sm", children: [
|
|
16794
|
+
/* @__PURE__ */ jsx32("span", { className: "block font-medium", children: location2.name }),
|
|
16795
|
+
/* @__PURE__ */ jsx32("span", { id: descId, className: "block text-muted-foreground", children: pickupDescription(location2) })
|
|
16670
16796
|
] })
|
|
16671
16797
|
]
|
|
16672
16798
|
},
|
|
@@ -16674,14 +16800,14 @@ function CheckoutDeliveryChoice({
|
|
|
16674
16800
|
);
|
|
16675
16801
|
})
|
|
16676
16802
|
] }) : null,
|
|
16677
|
-
isShipping ? /* @__PURE__ */
|
|
16678
|
-
/* @__PURE__ */
|
|
16679
|
-
/* @__PURE__ */
|
|
16803
|
+
isShipping ? /* @__PURE__ */ jsxs30("fieldset", { className: "space-y-3", children: [
|
|
16804
|
+
/* @__PURE__ */ jsx32("legend", { className: "mb-2 text-sm font-medium", children: t.addressLegend }),
|
|
16805
|
+
/* @__PURE__ */ jsx32("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: ADDRESS_FIELDS.map(({ key: key2, autoComplete, required, wide }) => {
|
|
16680
16806
|
const fieldId = `${uid}-${key2}`;
|
|
16681
16807
|
const fieldError = addressErrors?.[key2];
|
|
16682
|
-
return /* @__PURE__ */
|
|
16683
|
-
/* @__PURE__ */
|
|
16684
|
-
/* @__PURE__ */
|
|
16808
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn26("space-y-1", wide && "sm:col-span-2"), children: [
|
|
16809
|
+
/* @__PURE__ */ jsx32("label", { htmlFor: fieldId, className: "text-sm font-medium", children: t[key2] }),
|
|
16810
|
+
/* @__PURE__ */ jsx32(
|
|
16685
16811
|
"input",
|
|
16686
16812
|
{
|
|
16687
16813
|
id: fieldId,
|
|
@@ -16692,13 +16818,13 @@ function CheckoutDeliveryChoice({
|
|
|
16692
16818
|
onChange: (e) => onAddressChange({ ...address, [key2]: e.target.value }),
|
|
16693
16819
|
"aria-invalid": fieldError ? true : void 0,
|
|
16694
16820
|
"aria-describedby": fieldError ? `${fieldId}-error` : void 0,
|
|
16695
|
-
className:
|
|
16821
|
+
className: cn26(
|
|
16696
16822
|
INPUT_CLASS,
|
|
16697
16823
|
fieldError ? "border-destructive" : "border-border focus:border-primary"
|
|
16698
16824
|
)
|
|
16699
16825
|
}
|
|
16700
16826
|
),
|
|
16701
|
-
fieldError ? /* @__PURE__ */
|
|
16827
|
+
fieldError ? /* @__PURE__ */ jsx32("p", { id: `${fieldId}-error`, className: "text-sm text-destructive", children: fieldError }) : null
|
|
16702
16828
|
] }, key2);
|
|
16703
16829
|
}) })
|
|
16704
16830
|
] }) : null
|
|
@@ -16740,8 +16866,8 @@ function toCheckoutFulfillmentFields(value, address, requiresDelivery = true) {
|
|
|
16740
16866
|
}
|
|
16741
16867
|
|
|
16742
16868
|
// src/components/checkout-quote-summary.tsx
|
|
16743
|
-
import { cn as
|
|
16744
|
-
import { Fragment as
|
|
16869
|
+
import { cn as cn27 } from "@reblu/site-ui/utils";
|
|
16870
|
+
import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
16745
16871
|
var DEFAULT_CHECKOUT_QUOTE_SUMMARY_LABELS = {
|
|
16746
16872
|
subtotal: "Subtotal",
|
|
16747
16873
|
discount: (codeOrLabel, isAutomatic) => isAutomatic ? codeOrLabel : `Descuento (${codeOrLabel})`,
|
|
@@ -16758,9 +16884,9 @@ function Row({
|
|
|
16758
16884
|
value,
|
|
16759
16885
|
className
|
|
16760
16886
|
}) {
|
|
16761
|
-
return /* @__PURE__ */
|
|
16762
|
-
/* @__PURE__ */
|
|
16763
|
-
/* @__PURE__ */
|
|
16887
|
+
return /* @__PURE__ */ jsxs31("div", { "data-slot": "checkout-quote-row", className: cn27("flex justify-between gap-4", className), children: [
|
|
16888
|
+
/* @__PURE__ */ jsx33("dt", { children: name }),
|
|
16889
|
+
/* @__PURE__ */ jsx33("dd", { className: "shrink-0 tabular-nums", children: value })
|
|
16764
16890
|
] });
|
|
16765
16891
|
}
|
|
16766
16892
|
function CheckoutQuoteSummary({
|
|
@@ -16776,22 +16902,22 @@ function CheckoutQuoteSummary({
|
|
|
16776
16902
|
const price = (cents) => formatPrice(cents, currencyCode, locale);
|
|
16777
16903
|
const { fulfillment, shipping, tax, discount } = quote;
|
|
16778
16904
|
const Tag = `h${headingLevel}`;
|
|
16779
|
-
return /* @__PURE__ */
|
|
16780
|
-
heading ? /* @__PURE__ */
|
|
16781
|
-
/* @__PURE__ */
|
|
16782
|
-
/* @__PURE__ */
|
|
16783
|
-
/* @__PURE__ */
|
|
16784
|
-
line.variantName ? /* @__PURE__ */
|
|
16785
|
-
/* @__PURE__ */
|
|
16786
|
-
line.kindLabel ? /* @__PURE__ */
|
|
16787
|
-
/* @__PURE__ */
|
|
16905
|
+
return /* @__PURE__ */ jsxs31("section", { "data-slot": "checkout-quote-summary", className: slotClassName("space-y-4", "", className), children: [
|
|
16906
|
+
heading ? /* @__PURE__ */ jsx33(Tag, { className: "text-lg font-semibold", children: heading }) : null,
|
|
16907
|
+
/* @__PURE__ */ jsx33("ul", { className: "space-y-3 text-sm", children: quote.lines.map((line) => /* @__PURE__ */ jsxs31("li", { className: "flex justify-between gap-4", children: [
|
|
16908
|
+
/* @__PURE__ */ jsxs31("div", { className: "min-w-0 space-y-0.5", children: [
|
|
16909
|
+
/* @__PURE__ */ jsx33("p", { className: "font-medium", children: line.name }),
|
|
16910
|
+
line.variantName ? /* @__PURE__ */ jsx33("p", { className: "text-muted-foreground", children: line.variantName }) : null,
|
|
16911
|
+
/* @__PURE__ */ jsxs31("p", { className: "flex flex-wrap items-center gap-2 text-muted-foreground", children: [
|
|
16912
|
+
line.kindLabel ? /* @__PURE__ */ jsx33("span", { "data-slot": "checkout-quote-kind", className: "rounded-full border border-border px-2 py-0.5 text-xs font-medium text-foreground", children: line.kindLabel }) : null,
|
|
16913
|
+
/* @__PURE__ */ jsx33("span", { children: t.quantityTimesUnit(line.quantity, price(line.unitPrice)) })
|
|
16788
16914
|
] })
|
|
16789
16915
|
] }),
|
|
16790
|
-
/* @__PURE__ */
|
|
16916
|
+
/* @__PURE__ */ jsx33("span", { className: "shrink-0 tabular-nums", children: price(line.total) })
|
|
16791
16917
|
] }, `${line.productId}-${line.variantId ?? ""}`)) }),
|
|
16792
|
-
/* @__PURE__ */
|
|
16793
|
-
/* @__PURE__ */
|
|
16794
|
-
discount && discount.amount > 0 ? /* @__PURE__ */
|
|
16918
|
+
/* @__PURE__ */ jsxs31("dl", { className: "space-y-2 border-t border-border pt-3 text-sm", children: [
|
|
16919
|
+
/* @__PURE__ */ jsx33(Row, { name: t.subtotal, value: price(quote.subtotal) }),
|
|
16920
|
+
discount && discount.amount > 0 ? /* @__PURE__ */ jsx33(
|
|
16795
16921
|
Row,
|
|
16796
16922
|
{
|
|
16797
16923
|
className: "text-green-700 dark:text-green-400",
|
|
@@ -16799,17 +16925,17 @@ function CheckoutQuoteSummary({
|
|
|
16799
16925
|
value: `\u2212${price(discount.amount)}`
|
|
16800
16926
|
}
|
|
16801
16927
|
) : null,
|
|
16802
|
-
fulfillment.type ? /* @__PURE__ */
|
|
16928
|
+
fulfillment.type ? /* @__PURE__ */ jsx33(
|
|
16803
16929
|
Row,
|
|
16804
16930
|
{
|
|
16805
|
-
name: /* @__PURE__ */
|
|
16931
|
+
name: /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
16806
16932
|
fulfillment.label ?? t.delivery,
|
|
16807
|
-
fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */
|
|
16933
|
+
fulfillment.type === "PICKUP" && fulfillment.pickupLocation ? /* @__PURE__ */ jsx33("span", { className: "block text-muted-foreground", children: fulfillment.pickupLocation.name }) : null
|
|
16808
16934
|
] }),
|
|
16809
16935
|
value: fulfillment.type === "PICKUP" || shipping.isFree ? t.free : price(shipping.cost)
|
|
16810
16936
|
}
|
|
16811
16937
|
) : null,
|
|
16812
|
-
tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */
|
|
16938
|
+
tax.isLineVisible ? tax.breakdown.map((entry) => /* @__PURE__ */ jsx33(
|
|
16813
16939
|
Row,
|
|
16814
16940
|
{
|
|
16815
16941
|
className: tax.isIncluded ? "text-muted-foreground" : void 0,
|
|
@@ -16818,13 +16944,13 @@ function CheckoutQuoteSummary({
|
|
|
16818
16944
|
},
|
|
16819
16945
|
entry.label
|
|
16820
16946
|
)) : null,
|
|
16821
|
-
/* @__PURE__ */
|
|
16947
|
+
/* @__PURE__ */ jsx33(Row, { className: "border-t border-border pt-2 text-base font-bold", name: t.total, value: price(quote.total) })
|
|
16822
16948
|
] }),
|
|
16823
|
-
tax.isIncluded ? /* @__PURE__ */
|
|
16824
|
-
fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */
|
|
16825
|
-
fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */
|
|
16826
|
-
quote.discountError ? /* @__PURE__ */
|
|
16827
|
-
quote.blockingReason ? /* @__PURE__ */
|
|
16949
|
+
tax.isIncluded ? /* @__PURE__ */ jsx33("p", { className: "text-sm text-muted-foreground", children: t.taxesIncludedNote }) : null,
|
|
16950
|
+
fulfillment.type === "SHIPPING" && !shipping.isFree && shipping.remainingForFree ? /* @__PURE__ */ jsx33("p", { className: "text-sm text-muted-foreground", children: t.remainingForFree(price(shipping.remainingForFree)) }) : null,
|
|
16951
|
+
fulfillment.type && quote.deliveryEstimateText ? /* @__PURE__ */ jsx33("p", { "data-slot": "checkout-quote-estimate", className: "text-sm text-muted-foreground", children: quote.deliveryEstimateText }) : null,
|
|
16952
|
+
quote.discountError ? /* @__PURE__ */ jsx33("p", { role: "status", className: "text-sm text-destructive", children: quote.discountError.message }) : null,
|
|
16953
|
+
quote.blockingReason ? /* @__PURE__ */ jsx33("p", { role: "alert", className: "rounded-lg border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive", children: quote.blockingReason.message }) : null
|
|
16828
16954
|
] });
|
|
16829
16955
|
}
|
|
16830
16956
|
var DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS = {
|
|
@@ -16842,7 +16968,7 @@ function checkoutQuoteNotice({
|
|
|
16842
16968
|
function CheckoutQuoteNotice({ reason, labels, className }) {
|
|
16843
16969
|
if (!reason) return null;
|
|
16844
16970
|
const t = { ...DEFAULT_CHECKOUT_QUOTE_NOTICE_LABELS, ...labels };
|
|
16845
|
-
return /* @__PURE__ */
|
|
16971
|
+
return /* @__PURE__ */ jsx33(
|
|
16846
16972
|
"p",
|
|
16847
16973
|
{
|
|
16848
16974
|
role: "status",
|
|
@@ -16854,8 +16980,8 @@ function CheckoutQuoteNotice({ reason, labels, className }) {
|
|
|
16854
16980
|
}
|
|
16855
16981
|
|
|
16856
16982
|
// src/components/checkout-terms-acceptance.tsx
|
|
16857
|
-
import { cn as
|
|
16858
|
-
import { Fragment as
|
|
16983
|
+
import { cn as cn28 } from "@reblu/site-ui/utils";
|
|
16984
|
+
import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
16859
16985
|
function splitTermsLabel(label) {
|
|
16860
16986
|
const at = label.indexOf("{terms}");
|
|
16861
16987
|
return at === -1 ? [`${label} `, ""] : [label.slice(0, at), label.slice(at + "{terms}".length)];
|
|
@@ -16877,9 +17003,9 @@ function CheckoutTermsAcceptance({
|
|
|
16877
17003
|
(part) => part.replaceAll("{tenant}", copy.tenantName)
|
|
16878
17004
|
);
|
|
16879
17005
|
const newTab = copy.isTermsLinkNewTab;
|
|
16880
|
-
return /* @__PURE__ */
|
|
16881
|
-
/* @__PURE__ */
|
|
16882
|
-
/* @__PURE__ */
|
|
17006
|
+
return /* @__PURE__ */ jsxs32("div", { "data-slot": "checkout-terms", className: cn28("space-y-1", className), children: [
|
|
17007
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-start gap-3", children: [
|
|
17008
|
+
/* @__PURE__ */ jsx34(
|
|
16883
17009
|
"input",
|
|
16884
17010
|
{
|
|
16885
17011
|
id: boxId,
|
|
@@ -16892,9 +17018,9 @@ function CheckoutTermsAcceptance({
|
|
|
16892
17018
|
className: "mt-0.5 size-5 shrink-0 cursor-pointer accent-primary"
|
|
16893
17019
|
}
|
|
16894
17020
|
),
|
|
16895
|
-
/* @__PURE__ */
|
|
17021
|
+
/* @__PURE__ */ jsxs32("label", { htmlFor: boxId, className: "text-sm leading-relaxed", children: [
|
|
16896
17022
|
before,
|
|
16897
|
-
/* @__PURE__ */
|
|
17023
|
+
/* @__PURE__ */ jsxs32(
|
|
16898
17024
|
"a",
|
|
16899
17025
|
{
|
|
16900
17026
|
href: copy.termsLinkUrl ?? termsHref,
|
|
@@ -16902,9 +17028,9 @@ function CheckoutTermsAcceptance({
|
|
|
16902
17028
|
className: "font-medium underline underline-offset-2 hover:text-primary",
|
|
16903
17029
|
children: [
|
|
16904
17030
|
copy.termsLinkText,
|
|
16905
|
-
newTab ? /* @__PURE__ */
|
|
17031
|
+
newTab ? /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
16906
17032
|
" ",
|
|
16907
|
-
/* @__PURE__ */
|
|
17033
|
+
/* @__PURE__ */ jsx34("span", { className: "sr-only", children: newTabHint })
|
|
16908
17034
|
] }) : null
|
|
16909
17035
|
]
|
|
16910
17036
|
}
|
|
@@ -16912,7 +17038,7 @@ function CheckoutTermsAcceptance({
|
|
|
16912
17038
|
after
|
|
16913
17039
|
] })
|
|
16914
17040
|
] }),
|
|
16915
|
-
error ? /* @__PURE__ */
|
|
17041
|
+
error ? /* @__PURE__ */ jsx34("p", { id: errorId, className: "pl-8 text-sm text-destructive", children: error }) : null
|
|
16916
17042
|
] });
|
|
16917
17043
|
}
|
|
16918
17044
|
function toCheckoutTermsFields(copy, accepted) {
|
|
@@ -16921,8 +17047,8 @@ function toCheckoutTermsFields(copy, accepted) {
|
|
|
16921
17047
|
}
|
|
16922
17048
|
|
|
16923
17049
|
// src/components/checkout-pay-action.tsx
|
|
16924
|
-
import { cn as
|
|
16925
|
-
import { jsx as
|
|
17050
|
+
import { cn as cn29 } from "@reblu/site-ui/utils";
|
|
17051
|
+
import { jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
16926
17052
|
function CheckoutPayAction({
|
|
16927
17053
|
label,
|
|
16928
17054
|
notice,
|
|
@@ -16936,22 +17062,22 @@ function CheckoutPayAction({
|
|
|
16936
17062
|
}) {
|
|
16937
17063
|
const noticeId = `${id}-notice`;
|
|
16938
17064
|
const isDisabled = submitting || disabled;
|
|
16939
|
-
return /* @__PURE__ */
|
|
16940
|
-
/* @__PURE__ */
|
|
17065
|
+
return /* @__PURE__ */ jsxs33("div", { "data-slot": "checkout-pay-action", className: cn29("space-y-3", className), children: [
|
|
17066
|
+
/* @__PURE__ */ jsx35(
|
|
16941
17067
|
"button",
|
|
16942
17068
|
{
|
|
16943
17069
|
type: "submit",
|
|
16944
17070
|
disabled: isDisabled,
|
|
16945
17071
|
"aria-busy": submitting || void 0,
|
|
16946
17072
|
"aria-describedby": notice ? noticeId : void 0,
|
|
16947
|
-
className: buttonClassName ??
|
|
17073
|
+
className: buttonClassName ?? cn29(
|
|
16948
17074
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-base font-semibold transition-all",
|
|
16949
17075
|
isDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90"
|
|
16950
17076
|
),
|
|
16951
17077
|
children: submitting ? submittingLabel : label
|
|
16952
17078
|
}
|
|
16953
17079
|
),
|
|
16954
|
-
notice ? /* @__PURE__ */
|
|
17080
|
+
notice ? /* @__PURE__ */ jsx35("p", { id: noticeId, "data-slot": "checkout-pay-notice", className: noticeClassName ?? "text-sm text-muted-foreground", children: notice }) : null
|
|
16955
17081
|
] });
|
|
16956
17082
|
}
|
|
16957
17083
|
|
|
@@ -16978,8 +17104,8 @@ function toAcademyCheckoutInvoiceFields(value, overCap, issuesInvoices = true) {
|
|
|
16978
17104
|
}
|
|
16979
17105
|
|
|
16980
17106
|
// src/components/contact-interest-field.tsx
|
|
16981
|
-
import { cn as
|
|
16982
|
-
import { jsx as
|
|
17107
|
+
import { cn as cn30 } from "@reblu/site-ui/utils";
|
|
17108
|
+
import { jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
16983
17109
|
function ContactInterestField({
|
|
16984
17110
|
interest,
|
|
16985
17111
|
value,
|
|
@@ -16996,18 +17122,18 @@ function ContactInterestField({
|
|
|
16996
17122
|
else next2.delete(option2);
|
|
16997
17123
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
16998
17124
|
};
|
|
16999
|
-
return /* @__PURE__ */
|
|
17000
|
-
/* @__PURE__ */
|
|
17001
|
-
/* @__PURE__ */
|
|
17125
|
+
return /* @__PURE__ */ jsxs34("fieldset", { "data-slot": "contact-interest", className: cn30("space-y-2", className), children: [
|
|
17126
|
+
/* @__PURE__ */ jsx36("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
17127
|
+
/* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
17002
17128
|
const id = `${idPrefix}-${index}`;
|
|
17003
|
-
return /* @__PURE__ */
|
|
17129
|
+
return /* @__PURE__ */ jsxs34(
|
|
17004
17130
|
"label",
|
|
17005
17131
|
{
|
|
17006
17132
|
htmlFor: id,
|
|
17007
17133
|
"data-slot": "contact-interest-option",
|
|
17008
17134
|
className: "flex items-center gap-2 text-sm",
|
|
17009
17135
|
children: [
|
|
17010
|
-
/* @__PURE__ */
|
|
17136
|
+
/* @__PURE__ */ jsx36(
|
|
17011
17137
|
"input",
|
|
17012
17138
|
{
|
|
17013
17139
|
id,
|
|
@@ -17085,6 +17211,7 @@ export {
|
|
|
17085
17211
|
ProductTrustItems,
|
|
17086
17212
|
ProfessionalFields,
|
|
17087
17213
|
ProfileCard,
|
|
17214
|
+
Reviews,
|
|
17088
17215
|
SafeHtml,
|
|
17089
17216
|
ShopFilters,
|
|
17090
17217
|
Specialty,
|