@reblu/site-blocks 0.13.0 → 0.15.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 +21 -0
- package/README.md +230 -9
- package/dist/client.cjs +259 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +76 -1
- package/dist/client.d.ts +76 -1
- package/dist/client.js +256 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +592 -306
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +152 -10
- package/dist/index.d.ts +152 -10
- package/dist/index.js +585 -305
- package/dist/index.js.map +1 -1
- package/dist/seo.cjs +13034 -12
- package/dist/seo.cjs.map +1 -1
- package/dist/seo.d.cts +22 -1
- package/dist/seo.d.ts +22 -1
- package/dist/seo.js +13032 -5
- package/dist/seo.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13060,13 +13060,75 @@ function markdownToSafeHtml(markdown) {
|
|
|
13060
13060
|
return sanitizeHtml(rawHtml);
|
|
13061
13061
|
}
|
|
13062
13062
|
|
|
13063
|
+
// src/lib/markdown-plain-text.ts
|
|
13064
|
+
var INLINE_TAGS = /* @__PURE__ */ new Set([
|
|
13065
|
+
"a",
|
|
13066
|
+
"abbr",
|
|
13067
|
+
"b",
|
|
13068
|
+
"code",
|
|
13069
|
+
"del",
|
|
13070
|
+
"em",
|
|
13071
|
+
"i",
|
|
13072
|
+
"ins",
|
|
13073
|
+
"kbd",
|
|
13074
|
+
"mark",
|
|
13075
|
+
"s",
|
|
13076
|
+
"small",
|
|
13077
|
+
"span",
|
|
13078
|
+
"strong",
|
|
13079
|
+
"sub",
|
|
13080
|
+
"sup",
|
|
13081
|
+
"u"
|
|
13082
|
+
]);
|
|
13083
|
+
function collectText(nodes, out) {
|
|
13084
|
+
for (const node of nodes) {
|
|
13085
|
+
if (node.type === "text") {
|
|
13086
|
+
out.push(node.value);
|
|
13087
|
+
} else if (node.type === "element") {
|
|
13088
|
+
const block = !INLINE_TAGS.has(node.tagName);
|
|
13089
|
+
if (block) out.push(" ");
|
|
13090
|
+
collectText(node.children, out);
|
|
13091
|
+
if (block) out.push(" ");
|
|
13092
|
+
}
|
|
13093
|
+
}
|
|
13094
|
+
}
|
|
13095
|
+
function markdownToPlainText(markdown, { maxLength } = {}) {
|
|
13096
|
+
const html5 = markdownToSafeHtml(markdown);
|
|
13097
|
+
if (!html5) return "";
|
|
13098
|
+
const tree = fromParse5(parseFragment(html5));
|
|
13099
|
+
const parts = [];
|
|
13100
|
+
collectText(tree.children, parts);
|
|
13101
|
+
const text3 = parts.join("").replace(/\s+/g, " ").trim();
|
|
13102
|
+
if (maxLength === void 0 || text3.length <= maxLength) return text3;
|
|
13103
|
+
let cut = text3.slice(0, Math.max(0, maxLength - 1));
|
|
13104
|
+
const lastSpace = cut.lastIndexOf(" ");
|
|
13105
|
+
if (lastSpace > 0) cut = cut.slice(0, lastSpace);
|
|
13106
|
+
return `${cut.trimEnd()}\u2026`;
|
|
13107
|
+
}
|
|
13108
|
+
|
|
13063
13109
|
// src/components/markdown-renderer.tsx
|
|
13064
|
-
import { cn } from "@reblu/site-ui/utils";
|
|
13065
13110
|
import {
|
|
13066
13111
|
domToReact,
|
|
13067
13112
|
Element,
|
|
13068
13113
|
htmlToDOM
|
|
13069
13114
|
} from "html-react-parser";
|
|
13115
|
+
|
|
13116
|
+
// src/lib/slot-class-name.ts
|
|
13117
|
+
import { cn } from "@reblu/site-ui/utils";
|
|
13118
|
+
var MERGE_SAFE_TEXT = /(?:^|:)!?text-(?:left|center|right|justify|start|end|wrap|nowrap|balance|pretty|ellipsis|clip)$/;
|
|
13119
|
+
var TEXT_UTILITY = /(?:^|:)!?-?text-/;
|
|
13120
|
+
function bypassesMerge(token) {
|
|
13121
|
+
return TEXT_UTILITY.test(token) && !MERGE_SAFE_TEXT.test(token);
|
|
13122
|
+
}
|
|
13123
|
+
function slotClassName(structural, defaults, consumer) {
|
|
13124
|
+
if (consumer === void 0 || consumer.trim() === "") return cn(structural, defaults);
|
|
13125
|
+
const tokens = consumer.split(/\s+/).filter(Boolean);
|
|
13126
|
+
const verbatim = tokens.filter(bypassesMerge);
|
|
13127
|
+
const merged = cn(structural, tokens.filter((token) => !bypassesMerge(token)));
|
|
13128
|
+
return [merged, ...verbatim].filter(Boolean).join(" ");
|
|
13129
|
+
}
|
|
13130
|
+
|
|
13131
|
+
// src/components/markdown-renderer.tsx
|
|
13070
13132
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
13071
13133
|
var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
|
|
13072
13134
|
function parse3(html5, options) {
|
|
@@ -13229,11 +13291,57 @@ function buildOptions(headingOffset) {
|
|
|
13229
13291
|
function MarkdownRenderer({ content, className, headingOffset = 0 }) {
|
|
13230
13292
|
const html5 = markdownToSafeHtml(content);
|
|
13231
13293
|
if (!html5) return null;
|
|
13232
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
13294
|
+
return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
|
|
13233
13295
|
}
|
|
13234
13296
|
function SafeHtml({ html: html5, className, headingOffset = 0 }) {
|
|
13235
13297
|
if (!html5) return null;
|
|
13236
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
13298
|
+
return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
|
|
13299
|
+
}
|
|
13300
|
+
|
|
13301
|
+
// src/components/course-description.tsx
|
|
13302
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
13303
|
+
function isVisiblyEmpty(html5) {
|
|
13304
|
+
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13305
|
+
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13306
|
+
}
|
|
13307
|
+
function CourseDescription({
|
|
13308
|
+
description,
|
|
13309
|
+
heading,
|
|
13310
|
+
headingLevel = 2,
|
|
13311
|
+
headingId = "course-description-heading",
|
|
13312
|
+
headingOffset,
|
|
13313
|
+
className,
|
|
13314
|
+
headingClassName,
|
|
13315
|
+
contentClassName
|
|
13316
|
+
}) {
|
|
13317
|
+
const html5 = markdownToSafeHtml(typeof description === "string" ? description : null);
|
|
13318
|
+
if (!html5 || isVisiblyEmpty(html5)) return null;
|
|
13319
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13320
|
+
const offset = headingOffset ?? (hasHeading ? headingLevel - 1 : 0);
|
|
13321
|
+
const body3 = /* @__PURE__ */ jsx2(
|
|
13322
|
+
SafeHtml,
|
|
13323
|
+
{
|
|
13324
|
+
html: html5,
|
|
13325
|
+
headingOffset: offset,
|
|
13326
|
+
className: slotClassName("", "text-muted-foreground", contentClassName)
|
|
13327
|
+
}
|
|
13328
|
+
);
|
|
13329
|
+
if (!hasHeading) {
|
|
13330
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "course-description", className, children: body3 });
|
|
13331
|
+
}
|
|
13332
|
+
const Tag = `h${headingLevel}`;
|
|
13333
|
+
return /* @__PURE__ */ jsxs(
|
|
13334
|
+
"section",
|
|
13335
|
+
{
|
|
13336
|
+
"data-slot": "course-description",
|
|
13337
|
+
"aria-labelledby": headingId,
|
|
13338
|
+
className: slotClassName("space-y-3", "", className),
|
|
13339
|
+
children: [
|
|
13340
|
+
/* @__PURE__ */ jsx2(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
|
|
13341
|
+
body3
|
|
13342
|
+
]
|
|
13343
|
+
}
|
|
13344
|
+
);
|
|
13237
13345
|
}
|
|
13238
13346
|
|
|
13239
13347
|
// src/components/treatment.tsx
|
|
@@ -13242,7 +13350,7 @@ import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
|
13242
13350
|
// src/components/_page-parts.tsx
|
|
13243
13351
|
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13244
13352
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13245
|
-
import { Fragment as Fragment2, jsx as
|
|
13353
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
13246
13354
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13247
13355
|
"default",
|
|
13248
13356
|
"destructive",
|
|
@@ -13255,11 +13363,11 @@ function toButtonVariant(variant) {
|
|
|
13255
13363
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13256
13364
|
}
|
|
13257
13365
|
function PageHero({ page }) {
|
|
13258
|
-
return /* @__PURE__ */
|
|
13259
|
-
page.category && /* @__PURE__ */
|
|
13260
|
-
/* @__PURE__ */
|
|
13261
|
-
page.subtitle && /* @__PURE__ */
|
|
13262
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13366
|
+
return /* @__PURE__ */ jsxs2("header", { className: "space-y-4", children: [
|
|
13367
|
+
page.category && /* @__PURE__ */ jsx3("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
|
|
13368
|
+
/* @__PURE__ */ jsx3("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13369
|
+
page.subtitle && /* @__PURE__ */ jsx3("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13370
|
+
page.coverImageUrl && /* @__PURE__ */ jsx3("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx3(
|
|
13263
13371
|
"img",
|
|
13264
13372
|
{
|
|
13265
13373
|
src: page.coverImageUrl,
|
|
@@ -13273,7 +13381,7 @@ function PageHero({ page }) {
|
|
|
13273
13381
|
function SectionCta({ section }) {
|
|
13274
13382
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13275
13383
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13276
|
-
return /* @__PURE__ */
|
|
13384
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-2", children: /* @__PURE__ */ jsx3(
|
|
13277
13385
|
"a",
|
|
13278
13386
|
{
|
|
13279
13387
|
href: section.ctaUrl,
|
|
@@ -13288,46 +13396,46 @@ function SectionCta({ section }) {
|
|
|
13288
13396
|
}
|
|
13289
13397
|
function SectionImages({ section }) {
|
|
13290
13398
|
if (section.images.length === 0) return null;
|
|
13291
|
-
return /* @__PURE__ */
|
|
13292
|
-
/* @__PURE__ */
|
|
13293
|
-
img.caption && /* @__PURE__ */
|
|
13399
|
+
return /* @__PURE__ */ jsx3("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs2("figure", { className: "space-y-1", children: [
|
|
13400
|
+
/* @__PURE__ */ jsx3("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx3("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13401
|
+
img.caption && /* @__PURE__ */ jsx3("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13294
13402
|
] }, `${img.url}-${img.order}`)) });
|
|
13295
13403
|
}
|
|
13296
13404
|
function PageSectionBlock({ section }) {
|
|
13297
13405
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13298
13406
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13299
13407
|
const hasImages = section.images.length > 0;
|
|
13300
|
-
const body3 = /* @__PURE__ */
|
|
13301
|
-
section.heading && /* @__PURE__ */
|
|
13302
|
-
/* @__PURE__ */
|
|
13303
|
-
/* @__PURE__ */
|
|
13408
|
+
const body3 = /* @__PURE__ */ jsxs2("div", { className: "space-y-4", children: [
|
|
13409
|
+
section.heading && /* @__PURE__ */ jsx3("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13410
|
+
/* @__PURE__ */ jsx3(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13411
|
+
/* @__PURE__ */ jsx3(SectionCta, { section })
|
|
13304
13412
|
] });
|
|
13305
13413
|
if (sideBySide && hasImages) {
|
|
13306
|
-
return /* @__PURE__ */
|
|
13307
|
-
/* @__PURE__ */
|
|
13414
|
+
return /* @__PURE__ */ jsx3("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
13415
|
+
/* @__PURE__ */ jsx3(SectionImages, { section }),
|
|
13308
13416
|
body3
|
|
13309
|
-
] }) : /* @__PURE__ */
|
|
13417
|
+
] }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
13310
13418
|
body3,
|
|
13311
|
-
/* @__PURE__ */
|
|
13419
|
+
/* @__PURE__ */ jsx3(SectionImages, { section })
|
|
13312
13420
|
] }) });
|
|
13313
13421
|
}
|
|
13314
|
-
return /* @__PURE__ */
|
|
13422
|
+
return /* @__PURE__ */ jsxs2("section", { className: "space-y-4", children: [
|
|
13315
13423
|
body3,
|
|
13316
|
-
/* @__PURE__ */
|
|
13424
|
+
/* @__PURE__ */ jsx3(SectionImages, { section })
|
|
13317
13425
|
] });
|
|
13318
13426
|
}
|
|
13319
13427
|
function PageSectionList({ sections }) {
|
|
13320
13428
|
if (sections.length === 0) return null;
|
|
13321
13429
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13322
|
-
return /* @__PURE__ */
|
|
13430
|
+
return /* @__PURE__ */ jsx3("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ jsx3(PageSectionBlock, { section }, section.id)) });
|
|
13323
13431
|
}
|
|
13324
13432
|
|
|
13325
13433
|
// src/components/treatment.tsx
|
|
13326
|
-
import { jsx as
|
|
13434
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13327
13435
|
function Treatment({ page, className }) {
|
|
13328
|
-
return /* @__PURE__ */
|
|
13329
|
-
/* @__PURE__ */
|
|
13330
|
-
/* @__PURE__ */
|
|
13436
|
+
return /* @__PURE__ */ jsxs3("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
|
|
13437
|
+
/* @__PURE__ */ jsx4(PageHero, { page }),
|
|
13438
|
+
/* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections })
|
|
13331
13439
|
] });
|
|
13332
13440
|
}
|
|
13333
13441
|
|
|
@@ -13336,11 +13444,11 @@ import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
|
13336
13444
|
|
|
13337
13445
|
// src/components/page-card-grid.tsx
|
|
13338
13446
|
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13339
|
-
import { jsx as
|
|
13447
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13340
13448
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13341
13449
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13342
13450
|
function PageCardGrid(props) {
|
|
13343
|
-
return /* @__PURE__ */
|
|
13451
|
+
return /* @__PURE__ */ jsx5(PageCardGridSection, { ...props });
|
|
13344
13452
|
}
|
|
13345
13453
|
function PageCardGridSection({
|
|
13346
13454
|
pages,
|
|
@@ -13351,15 +13459,15 @@ function PageCardGridSection({
|
|
|
13351
13459
|
}) {
|
|
13352
13460
|
if (pages.length === 0) return null;
|
|
13353
13461
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13354
|
-
return /* @__PURE__ */
|
|
13355
|
-
showHeading && /* @__PURE__ */
|
|
13356
|
-
/* @__PURE__ */
|
|
13462
|
+
return /* @__PURE__ */ jsxs4("section", { className: cn4("space-y-6", className), children: [
|
|
13463
|
+
showHeading && /* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13464
|
+
/* @__PURE__ */ jsx5("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs4(
|
|
13357
13465
|
"a",
|
|
13358
13466
|
{
|
|
13359
13467
|
href: pageHref(page),
|
|
13360
13468
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13361
13469
|
children: [
|
|
13362
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13470
|
+
page.coverImageUrl && /* @__PURE__ */ jsx5("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx5(
|
|
13363
13471
|
"img",
|
|
13364
13472
|
{
|
|
13365
13473
|
src: page.coverImageUrl,
|
|
@@ -13368,9 +13476,9 @@ function PageCardGridSection({
|
|
|
13368
13476
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13369
13477
|
}
|
|
13370
13478
|
) }),
|
|
13371
|
-
/* @__PURE__ */
|
|
13372
|
-
/* @__PURE__ */
|
|
13373
|
-
page.excerpt && /* @__PURE__ */
|
|
13479
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13480
|
+
/* @__PURE__ */ jsx5("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13481
|
+
page.excerpt && /* @__PURE__ */ jsx5("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13374
13482
|
] })
|
|
13375
13483
|
]
|
|
13376
13484
|
}
|
|
@@ -13379,7 +13487,7 @@ function PageCardGridSection({
|
|
|
13379
13487
|
}
|
|
13380
13488
|
|
|
13381
13489
|
// src/components/parent-page.tsx
|
|
13382
|
-
import { jsx as
|
|
13490
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13383
13491
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13384
13492
|
function ParentPage({
|
|
13385
13493
|
page,
|
|
@@ -13394,10 +13502,10 @@ function ParentPage({
|
|
|
13394
13502
|
const pages = childPages ?? treatments ?? [];
|
|
13395
13503
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13396
13504
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13397
|
-
return /* @__PURE__ */
|
|
13398
|
-
/* @__PURE__ */
|
|
13399
|
-
/* @__PURE__ */
|
|
13400
|
-
/* @__PURE__ */
|
|
13505
|
+
return /* @__PURE__ */ jsxs5("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
|
|
13506
|
+
/* @__PURE__ */ jsx6(PageHero, { page }),
|
|
13507
|
+
/* @__PURE__ */ jsx6(PageSectionList, { sections: page.sections }),
|
|
13508
|
+
/* @__PURE__ */ jsx6(
|
|
13401
13509
|
PageCardGridSection,
|
|
13402
13510
|
{
|
|
13403
13511
|
pages,
|
|
@@ -13414,13 +13522,13 @@ var Specialty = ParentPage;
|
|
|
13414
13522
|
|
|
13415
13523
|
// src/components/profile-card.tsx
|
|
13416
13524
|
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13417
|
-
import { jsx as
|
|
13525
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13418
13526
|
function initials(name) {
|
|
13419
13527
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13420
13528
|
}
|
|
13421
13529
|
function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, className }) {
|
|
13422
13530
|
const NameTag = href ? "a" : "span";
|
|
13423
|
-
return /* @__PURE__ */
|
|
13531
|
+
return /* @__PURE__ */ jsxs6(
|
|
13424
13532
|
"article",
|
|
13425
13533
|
{
|
|
13426
13534
|
className: cn6(
|
|
@@ -13429,18 +13537,18 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13429
13537
|
),
|
|
13430
13538
|
"data-slot": "profile-card",
|
|
13431
13539
|
children: [
|
|
13432
|
-
/* @__PURE__ */
|
|
13433
|
-
/* @__PURE__ */
|
|
13434
|
-
/* @__PURE__ */
|
|
13540
|
+
/* @__PURE__ */ jsx7("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx7("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx7("span", { className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground", "aria-hidden": "true", children: initials(name) }) }),
|
|
13541
|
+
/* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
13542
|
+
/* @__PURE__ */ jsx7("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx7(
|
|
13435
13543
|
NameTag,
|
|
13436
13544
|
{
|
|
13437
13545
|
...href ? { href, className: "transition-colors hover:text-primary" } : {},
|
|
13438
13546
|
children: name
|
|
13439
13547
|
}
|
|
13440
13548
|
) }),
|
|
13441
|
-
role && /* @__PURE__ */
|
|
13549
|
+
role && /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13442
13550
|
] }),
|
|
13443
|
-
specialties.length > 0 && /* @__PURE__ */
|
|
13551
|
+
specialties.length > 0 && /* @__PURE__ */ jsx7("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ jsx7(
|
|
13444
13552
|
"li",
|
|
13445
13553
|
{
|
|
13446
13554
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13448,7 +13556,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13448
13556
|
},
|
|
13449
13557
|
s2
|
|
13450
13558
|
)) }),
|
|
13451
|
-
bio && /* @__PURE__ */
|
|
13559
|
+
bio && /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13452
13560
|
]
|
|
13453
13561
|
}
|
|
13454
13562
|
);
|
|
@@ -13456,11 +13564,11 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13456
13564
|
|
|
13457
13565
|
// src/components/product-card.tsx
|
|
13458
13566
|
import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
13459
|
-
import { jsx as
|
|
13567
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13460
13568
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13461
13569
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13462
13570
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13463
|
-
return /* @__PURE__ */
|
|
13571
|
+
return /* @__PURE__ */ jsxs7(
|
|
13464
13572
|
"article",
|
|
13465
13573
|
{
|
|
13466
13574
|
className: cn7(
|
|
@@ -13469,7 +13577,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13469
13577
|
),
|
|
13470
13578
|
"data-slot": "product-card",
|
|
13471
13579
|
children: [
|
|
13472
|
-
/* @__PURE__ */
|
|
13580
|
+
/* @__PURE__ */ jsx8("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx8(
|
|
13473
13581
|
"img",
|
|
13474
13582
|
{
|
|
13475
13583
|
src: image.url,
|
|
@@ -13477,14 +13585,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13477
13585
|
loading: "lazy",
|
|
13478
13586
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13479
13587
|
}
|
|
13480
|
-
) : /* @__PURE__ */
|
|
13481
|
-
/* @__PURE__ */
|
|
13482
|
-
product.category && /* @__PURE__ */
|
|
13483
|
-
/* @__PURE__ */
|
|
13484
|
-
product.shortDescription && /* @__PURE__ */
|
|
13485
|
-
/* @__PURE__ */
|
|
13486
|
-
/* @__PURE__ */
|
|
13487
|
-
hasDiscount && /* @__PURE__ */
|
|
13588
|
+
) : /* @__PURE__ */ jsx8("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13589
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13590
|
+
product.category && /* @__PURE__ */ jsx8("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
|
|
13591
|
+
/* @__PURE__ */ jsx8("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx8("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13592
|
+
product.shortDescription && /* @__PURE__ */ jsx8("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13593
|
+
/* @__PURE__ */ jsxs7("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13594
|
+
/* @__PURE__ */ jsx8("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13595
|
+
hasDiscount && /* @__PURE__ */ jsx8("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13488
13596
|
] })
|
|
13489
13597
|
] })
|
|
13490
13598
|
]
|
|
@@ -13686,8 +13794,7 @@ var __iconNode8 = [
|
|
|
13686
13794
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13687
13795
|
|
|
13688
13796
|
// src/components/product-trust-items.tsx
|
|
13689
|
-
import {
|
|
13690
|
-
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13797
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13691
13798
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13692
13799
|
shipping: Truck,
|
|
13693
13800
|
returns: RotateCcw,
|
|
@@ -13721,17 +13828,17 @@ function ProductTrustItems({
|
|
|
13721
13828
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13722
13829
|
});
|
|
13723
13830
|
if (rows.length === 0) return null;
|
|
13724
|
-
return /* @__PURE__ */
|
|
13725
|
-
/* @__PURE__ */
|
|
13726
|
-
/* @__PURE__ */
|
|
13831
|
+
return /* @__PURE__ */ jsx9(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs8("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
13832
|
+
/* @__PURE__ */ jsx9(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13833
|
+
/* @__PURE__ */ jsx9("span", { children: text3 })
|
|
13727
13834
|
] }, key2)) });
|
|
13728
13835
|
}
|
|
13729
13836
|
|
|
13730
13837
|
// src/components/faq-accordion.tsx
|
|
13731
|
-
import { cn as
|
|
13838
|
+
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13732
13839
|
|
|
13733
13840
|
// src/components/_heading.tsx
|
|
13734
|
-
import { jsx as
|
|
13841
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
13735
13842
|
function nextHeadingLevel(level) {
|
|
13736
13843
|
return Math.min(level + 1, 6);
|
|
13737
13844
|
}
|
|
@@ -13741,11 +13848,11 @@ function Heading({
|
|
|
13741
13848
|
children: children2
|
|
13742
13849
|
}) {
|
|
13743
13850
|
const Tag = `h${level}`;
|
|
13744
|
-
return /* @__PURE__ */
|
|
13851
|
+
return /* @__PURE__ */ jsx10(Tag, { className, children: children2 });
|
|
13745
13852
|
}
|
|
13746
13853
|
|
|
13747
13854
|
// src/components/faq-accordion.tsx
|
|
13748
|
-
import { jsx as
|
|
13855
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13749
13856
|
function FaqAccordion({
|
|
13750
13857
|
items,
|
|
13751
13858
|
heading,
|
|
@@ -13756,18 +13863,18 @@ function FaqAccordion({
|
|
|
13756
13863
|
}) {
|
|
13757
13864
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13758
13865
|
if (visible.length === 0) return null;
|
|
13759
|
-
return /* @__PURE__ */
|
|
13760
|
-
heading && /* @__PURE__ */
|
|
13761
|
-
/* @__PURE__ */
|
|
13866
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn8("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
13867
|
+
heading && /* @__PURE__ */ jsx11(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
13868
|
+
/* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs9(
|
|
13762
13869
|
"details",
|
|
13763
13870
|
{
|
|
13764
13871
|
className: "group px-4",
|
|
13765
13872
|
"data-slot": "faq-item",
|
|
13766
13873
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13767
13874
|
children: [
|
|
13768
|
-
/* @__PURE__ */
|
|
13769
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
13770
|
-
/* @__PURE__ */
|
|
13875
|
+
/* @__PURE__ */ jsxs9("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
|
|
13876
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx11(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx11("span", { children: item.q }),
|
|
13877
|
+
/* @__PURE__ */ jsx11(
|
|
13771
13878
|
"span",
|
|
13772
13879
|
{
|
|
13773
13880
|
"aria-hidden": "true",
|
|
@@ -13776,7 +13883,7 @@ function FaqAccordion({
|
|
|
13776
13883
|
}
|
|
13777
13884
|
)
|
|
13778
13885
|
] }),
|
|
13779
|
-
/* @__PURE__ */
|
|
13886
|
+
/* @__PURE__ */ jsx11("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
13780
13887
|
]
|
|
13781
13888
|
},
|
|
13782
13889
|
index
|
|
@@ -13784,41 +13891,151 @@ function FaqAccordion({
|
|
|
13784
13891
|
] });
|
|
13785
13892
|
}
|
|
13786
13893
|
|
|
13894
|
+
// src/components/trust-badges.tsx
|
|
13895
|
+
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13896
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13897
|
+
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
13898
|
+
{
|
|
13899
|
+
PARTNER: "Colaboradores",
|
|
13900
|
+
INSURANCE: "Aseguradoras",
|
|
13901
|
+
SUBVENTION: "Financiaci\xF3n",
|
|
13902
|
+
CERTIFICATION: "Certificaciones",
|
|
13903
|
+
AWARD: "Premios"
|
|
13904
|
+
}
|
|
13905
|
+
);
|
|
13906
|
+
var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
|
|
13907
|
+
"SUBVENTION",
|
|
13908
|
+
"CERTIFICATION",
|
|
13909
|
+
"AWARD",
|
|
13910
|
+
"PARTNER",
|
|
13911
|
+
"INSURANCE"
|
|
13912
|
+
]);
|
|
13913
|
+
var KNOWN_TYPES = new Set(DEFAULT_TRUST_BADGE_TYPE_ORDER);
|
|
13914
|
+
function isUsable(value) {
|
|
13915
|
+
if (typeof value !== "object" || value === null) return false;
|
|
13916
|
+
const entry = value;
|
|
13917
|
+
return typeof entry.type === "string" && KNOWN_TYPES.has(entry.type) && typeof entry.name === "string" && entry.name.trim() !== "";
|
|
13918
|
+
}
|
|
13919
|
+
function safeHref(url) {
|
|
13920
|
+
if (typeof url !== "string") return null;
|
|
13921
|
+
try {
|
|
13922
|
+
const parsed = new URL(url);
|
|
13923
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
|
|
13924
|
+
} catch {
|
|
13925
|
+
return null;
|
|
13926
|
+
}
|
|
13927
|
+
}
|
|
13928
|
+
function BadgeContent({ badge, logoClassName }) {
|
|
13929
|
+
if (badge.logoUrl) {
|
|
13930
|
+
return (
|
|
13931
|
+
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
13932
|
+
/* @__PURE__ */ jsx12(
|
|
13933
|
+
"img",
|
|
13934
|
+
{
|
|
13935
|
+
src: badge.logoUrl,
|
|
13936
|
+
alt: badge.name,
|
|
13937
|
+
loading: "lazy",
|
|
13938
|
+
className: cn9("h-12 w-auto object-contain", logoClassName)
|
|
13939
|
+
}
|
|
13940
|
+
)
|
|
13941
|
+
);
|
|
13942
|
+
}
|
|
13943
|
+
return /* @__PURE__ */ jsx12("span", { className: "text-sm font-medium", children: badge.name });
|
|
13944
|
+
}
|
|
13945
|
+
function TrustBadges({
|
|
13946
|
+
badges,
|
|
13947
|
+
headings,
|
|
13948
|
+
types = DEFAULT_TRUST_BADGE_TYPE_ORDER,
|
|
13949
|
+
headingLevel = 2,
|
|
13950
|
+
newWindowLabel = "(se abre en una ventana nueva)",
|
|
13951
|
+
className,
|
|
13952
|
+
groupClassName,
|
|
13953
|
+
headingClassName,
|
|
13954
|
+
listClassName,
|
|
13955
|
+
logoClassName
|
|
13956
|
+
}) {
|
|
13957
|
+
if (!Array.isArray(badges) || badges.length === 0) return null;
|
|
13958
|
+
const usable = badges.filter(isUsable);
|
|
13959
|
+
const groups = types.flatMap((type) => {
|
|
13960
|
+
const items = usable.filter((b2) => b2.type === type).map((b2, index) => ({ b: b2, index })).sort((x2, y2) => (x2.b.sortOrder ?? 0) - (y2.b.sortOrder ?? 0) || x2.index - y2.index).map(({ b: b2 }) => b2);
|
|
13961
|
+
if (items.length === 0) return [];
|
|
13962
|
+
const heading = headings && Object.prototype.hasOwnProperty.call(headings, type) ? headings[type] : DEFAULT_TRUST_BADGE_HEADINGS[type];
|
|
13963
|
+
return [{ type, heading, items }];
|
|
13964
|
+
});
|
|
13965
|
+
if (groups.length === 0) return null;
|
|
13966
|
+
return /* @__PURE__ */ jsx12("div", { "data-slot": "trust-badges", className: cn9("space-y-6", className), children: groups.map(({ type, heading, items }) => /* @__PURE__ */ jsxs10(
|
|
13967
|
+
"div",
|
|
13968
|
+
{
|
|
13969
|
+
"data-slot": "trust-badge-group",
|
|
13970
|
+
"data-type": type,
|
|
13971
|
+
className: cn9("space-y-3", groupClassName),
|
|
13972
|
+
children: [
|
|
13973
|
+
heading ? /* @__PURE__ */ jsx12(
|
|
13974
|
+
Heading,
|
|
13975
|
+
{
|
|
13976
|
+
level: headingLevel,
|
|
13977
|
+
className: cn9("text-sm font-semibold uppercase tracking-widest", headingClassName),
|
|
13978
|
+
children: heading
|
|
13979
|
+
}
|
|
13980
|
+
) : null,
|
|
13981
|
+
/* @__PURE__ */ jsx12("ul", { className: cn9("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
13982
|
+
const href = safeHref(badge.url);
|
|
13983
|
+
return /* @__PURE__ */ jsx12("li", { children: href ? /* @__PURE__ */ jsxs10(
|
|
13984
|
+
"a",
|
|
13985
|
+
{
|
|
13986
|
+
href,
|
|
13987
|
+
target: "_blank",
|
|
13988
|
+
rel: "noopener noreferrer",
|
|
13989
|
+
className: "inline-flex",
|
|
13990
|
+
children: [
|
|
13991
|
+
/* @__PURE__ */ jsx12(BadgeContent, { badge, logoClassName }),
|
|
13992
|
+
" ",
|
|
13993
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: newWindowLabel })
|
|
13994
|
+
]
|
|
13995
|
+
}
|
|
13996
|
+
) : /* @__PURE__ */ jsx12(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
13997
|
+
}) })
|
|
13998
|
+
]
|
|
13999
|
+
},
|
|
14000
|
+
type
|
|
14001
|
+
)) });
|
|
14002
|
+
}
|
|
14003
|
+
|
|
13787
14004
|
// src/components/page-blocks.tsx
|
|
13788
14005
|
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
13789
14006
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
13790
|
-
import { jsx as
|
|
14007
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13791
14008
|
var ALIASES = {
|
|
13792
14009
|
doctor_embed: "profile_embed",
|
|
13793
14010
|
specialty_embed: "page_embed"
|
|
13794
14011
|
};
|
|
13795
14012
|
function HeroBlock({ block, headingLevel }) {
|
|
13796
14013
|
const { title, subtitle, imageUrl } = block.data;
|
|
13797
|
-
return /* @__PURE__ */
|
|
13798
|
-
/* @__PURE__ */
|
|
13799
|
-
subtitle && /* @__PURE__ */
|
|
13800
|
-
imageUrl && /* @__PURE__ */
|
|
14014
|
+
return /* @__PURE__ */ jsxs11("div", { className: "space-y-4", children: [
|
|
14015
|
+
/* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14016
|
+
subtitle && /* @__PURE__ */ jsx13("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14017
|
+
imageUrl && /* @__PURE__ */ jsx13("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx13("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
13801
14018
|
] });
|
|
13802
14019
|
}
|
|
13803
14020
|
function RichtextBlock({ block, headingLevel }) {
|
|
13804
|
-
return /* @__PURE__ */
|
|
14021
|
+
return /* @__PURE__ */ jsx13(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
13805
14022
|
}
|
|
13806
14023
|
function FaqBlock({ block }) {
|
|
13807
|
-
return /* @__PURE__ */
|
|
14024
|
+
return /* @__PURE__ */ jsx13(FaqAccordion, { items: block.data.items });
|
|
13808
14025
|
}
|
|
13809
14026
|
function StatsBlock({ block }) {
|
|
13810
|
-
return /* @__PURE__ */
|
|
13811
|
-
/* @__PURE__ */
|
|
13812
|
-
/* @__PURE__ */
|
|
14027
|
+
return /* @__PURE__ */ jsx13("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs11("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14028
|
+
/* @__PURE__ */ jsx13("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14029
|
+
/* @__PURE__ */ jsx13("dd", { className: "text-3xl font-bold", children: item.value })
|
|
13813
14030
|
] }, i)) });
|
|
13814
14031
|
}
|
|
13815
14032
|
function TestimonialBlock({ block }) {
|
|
13816
14033
|
const { quote, author, role, avatarUrl } = block.data;
|
|
13817
|
-
return /* @__PURE__ */
|
|
13818
|
-
/* @__PURE__ */
|
|
13819
|
-
/* @__PURE__ */
|
|
14034
|
+
return /* @__PURE__ */ jsxs11("figure", { className: "space-y-4", children: [
|
|
14035
|
+
/* @__PURE__ */ jsx13("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx13("p", { children: quote }) }),
|
|
14036
|
+
/* @__PURE__ */ jsxs11("figcaption", { className: "flex items-center gap-3", children: [
|
|
13820
14037
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
13821
|
-
/* @__PURE__ */
|
|
14038
|
+
/* @__PURE__ */ jsx13(
|
|
13822
14039
|
"img",
|
|
13823
14040
|
{
|
|
13824
14041
|
src: avatarUrl,
|
|
@@ -13827,9 +14044,9 @@ function TestimonialBlock({ block }) {
|
|
|
13827
14044
|
className: "h-10 w-10 rounded-full object-cover"
|
|
13828
14045
|
}
|
|
13829
14046
|
),
|
|
13830
|
-
/* @__PURE__ */
|
|
13831
|
-
/* @__PURE__ */
|
|
13832
|
-
role && /* @__PURE__ */
|
|
14047
|
+
/* @__PURE__ */ jsxs11("span", { children: [
|
|
14048
|
+
/* @__PURE__ */ jsx13("span", { className: "font-semibold", children: author }),
|
|
14049
|
+
role && /* @__PURE__ */ jsx13("span", { className: "block text-sm opacity-80", children: role })
|
|
13833
14050
|
] })
|
|
13834
14051
|
] })
|
|
13835
14052
|
] });
|
|
@@ -13838,19 +14055,19 @@ function CtaSlotBlock(_props) {
|
|
|
13838
14055
|
return null;
|
|
13839
14056
|
}
|
|
13840
14057
|
function FeatureListBlock({ block }) {
|
|
13841
|
-
return /* @__PURE__ */
|
|
14058
|
+
return /* @__PURE__ */ jsx13("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx13("li", { children: item.text }, i)) });
|
|
13842
14059
|
}
|
|
13843
14060
|
function GalleryBlock({ block }) {
|
|
13844
14061
|
const { images } = block.data;
|
|
13845
|
-
return /* @__PURE__ */
|
|
14062
|
+
return /* @__PURE__ */ jsx13(
|
|
13846
14063
|
"div",
|
|
13847
14064
|
{
|
|
13848
14065
|
className: cn10(
|
|
13849
14066
|
"grid gap-4",
|
|
13850
14067
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
13851
14068
|
),
|
|
13852
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
13853
|
-
/* @__PURE__ */
|
|
14069
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs11("figure", { className: "space-y-1", children: [
|
|
14070
|
+
/* @__PURE__ */ jsx13("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx13(
|
|
13854
14071
|
"img",
|
|
13855
14072
|
{
|
|
13856
14073
|
src: img.url,
|
|
@@ -13859,7 +14076,7 @@ function GalleryBlock({ block }) {
|
|
|
13859
14076
|
className: "h-full w-full object-cover"
|
|
13860
14077
|
}
|
|
13861
14078
|
) }),
|
|
13862
|
-
img.caption && /* @__PURE__ */
|
|
14079
|
+
img.caption && /* @__PURE__ */ jsx13("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
13863
14080
|
] }, `${img.url}-${i}`))
|
|
13864
14081
|
}
|
|
13865
14082
|
);
|
|
@@ -13869,13 +14086,13 @@ function EmbedCard({
|
|
|
13869
14086
|
headingLevel,
|
|
13870
14087
|
embedHref
|
|
13871
14088
|
}) {
|
|
13872
|
-
return /* @__PURE__ */
|
|
14089
|
+
return /* @__PURE__ */ jsxs11(
|
|
13873
14090
|
"a",
|
|
13874
14091
|
{
|
|
13875
14092
|
href: embedHref(resolved),
|
|
13876
14093
|
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",
|
|
13877
14094
|
children: [
|
|
13878
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14095
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx13("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx13(
|
|
13879
14096
|
"img",
|
|
13880
14097
|
{
|
|
13881
14098
|
src: resolved.coverImageUrl,
|
|
@@ -13884,24 +14101,24 @@ function EmbedCard({
|
|
|
13884
14101
|
className: "h-full w-full object-cover"
|
|
13885
14102
|
}
|
|
13886
14103
|
) }),
|
|
13887
|
-
/* @__PURE__ */
|
|
13888
|
-
/* @__PURE__ */
|
|
13889
|
-
resolved.role && /* @__PURE__ */
|
|
13890
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14104
|
+
/* @__PURE__ */ jsxs11("div", { className: "space-y-1 p-4", children: [
|
|
14105
|
+
/* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14106
|
+
resolved.role && /* @__PURE__ */ jsx13("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14107
|
+
resolved.excerpt && /* @__PURE__ */ jsx13("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
13891
14108
|
] })
|
|
13892
14109
|
]
|
|
13893
14110
|
}
|
|
13894
14111
|
);
|
|
13895
14112
|
}
|
|
13896
14113
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
13897
|
-
return /* @__PURE__ */
|
|
14114
|
+
return /* @__PURE__ */ jsx13(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13898
14115
|
}
|
|
13899
14116
|
function ProfileEmbedBlock({
|
|
13900
14117
|
block,
|
|
13901
14118
|
headingLevel,
|
|
13902
14119
|
embedHref
|
|
13903
14120
|
}) {
|
|
13904
|
-
return /* @__PURE__ */
|
|
14121
|
+
return /* @__PURE__ */ jsx13(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13905
14122
|
}
|
|
13906
14123
|
var DEFAULT_RENDERERS = {
|
|
13907
14124
|
hero: HeroBlock,
|
|
@@ -13958,7 +14175,7 @@ function toIdFragment(value) {
|
|
|
13958
14175
|
function SectionCta2({ cta }) {
|
|
13959
14176
|
if (!hasUsableCta(cta)) return null;
|
|
13960
14177
|
const variant = toButtonVariant(cta.variant);
|
|
13961
|
-
return /* @__PURE__ */
|
|
14178
|
+
return /* @__PURE__ */ jsx13("div", { className: "pt-2", children: /* @__PURE__ */ jsx13(
|
|
13962
14179
|
"a",
|
|
13963
14180
|
{
|
|
13964
14181
|
href: cta.url,
|
|
@@ -13991,7 +14208,7 @@ function PageBlocks({
|
|
|
13991
14208
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
13992
14209
|
const background = block.backgroundColor;
|
|
13993
14210
|
return [
|
|
13994
|
-
/* @__PURE__ */
|
|
14211
|
+
/* @__PURE__ */ jsxs11(
|
|
13995
14212
|
"section",
|
|
13996
14213
|
{
|
|
13997
14214
|
"data-slot": "page-block",
|
|
@@ -14000,8 +14217,8 @@ function PageBlocks({
|
|
|
14000
14217
|
style: surfaceStyle(background),
|
|
14001
14218
|
className: cn10("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14002
14219
|
children: [
|
|
14003
|
-
block.heading && /* @__PURE__ */
|
|
14004
|
-
/* @__PURE__ */
|
|
14220
|
+
block.heading && /* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx13("span", { id: headingId, children: block.heading }) }),
|
|
14221
|
+
/* @__PURE__ */ jsx13(
|
|
14005
14222
|
Renderer,
|
|
14006
14223
|
{
|
|
14007
14224
|
block,
|
|
@@ -14009,7 +14226,7 @@ function PageBlocks({
|
|
|
14009
14226
|
embedHref
|
|
14010
14227
|
}
|
|
14011
14228
|
),
|
|
14012
|
-
/* @__PURE__ */
|
|
14229
|
+
/* @__PURE__ */ jsx13(SectionCta2, { cta: block.cta })
|
|
14013
14230
|
]
|
|
14014
14231
|
},
|
|
14015
14232
|
block.id
|
|
@@ -14017,12 +14234,12 @@ function PageBlocks({
|
|
|
14017
14234
|
];
|
|
14018
14235
|
});
|
|
14019
14236
|
if (sections.length === 0) return null;
|
|
14020
|
-
return /* @__PURE__ */
|
|
14237
|
+
return /* @__PURE__ */ jsx13("div", { className: cn10("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14021
14238
|
}
|
|
14022
14239
|
|
|
14023
14240
|
// src/components/shop-filters.tsx
|
|
14024
14241
|
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14025
|
-
import { jsx as
|
|
14242
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14026
14243
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14027
14244
|
{ max: 2500 },
|
|
14028
14245
|
{ min: 2500, max: 5e3 },
|
|
@@ -14066,7 +14283,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14066
14283
|
return "";
|
|
14067
14284
|
}
|
|
14068
14285
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14069
|
-
return /* @__PURE__ */
|
|
14286
|
+
return /* @__PURE__ */ jsx14(
|
|
14070
14287
|
"a",
|
|
14071
14288
|
{
|
|
14072
14289
|
href,
|
|
@@ -14084,9 +14301,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14084
14301
|
);
|
|
14085
14302
|
}
|
|
14086
14303
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14087
|
-
return /* @__PURE__ */
|
|
14088
|
-
/* @__PURE__ */
|
|
14089
|
-
/* @__PURE__ */
|
|
14304
|
+
return /* @__PURE__ */ jsxs12("fieldset", { className: "space-y-2", children: [
|
|
14305
|
+
/* @__PURE__ */ jsx14("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14306
|
+
/* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14090
14307
|
] });
|
|
14091
14308
|
}
|
|
14092
14309
|
function ShopFilters({
|
|
@@ -14109,11 +14326,11 @@ function ShopFilters({
|
|
|
14109
14326
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14110
14327
|
return null;
|
|
14111
14328
|
}
|
|
14112
|
-
return /* @__PURE__ */
|
|
14329
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn11("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14113
14330
|
visibleTaxonomies.map((axis) => {
|
|
14114
14331
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14115
|
-
return /* @__PURE__ */
|
|
14116
|
-
/* @__PURE__ */
|
|
14332
|
+
return /* @__PURE__ */ jsxs12(FilterFieldset, { legend: axis.label, children: [
|
|
14333
|
+
/* @__PURE__ */ jsx14(
|
|
14117
14334
|
OptionLink,
|
|
14118
14335
|
{
|
|
14119
14336
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14128,7 +14345,7 @@ function ShopFilters({
|
|
|
14128
14345
|
),
|
|
14129
14346
|
axis.terms.map((term) => {
|
|
14130
14347
|
const isActive = activeSlug === term.slug;
|
|
14131
|
-
return /* @__PURE__ */
|
|
14348
|
+
return /* @__PURE__ */ jsx14(
|
|
14132
14349
|
OptionLink,
|
|
14133
14350
|
{
|
|
14134
14351
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14148,9 +14365,9 @@ function ShopFilters({
|
|
|
14148
14365
|
}),
|
|
14149
14366
|
visibleAttributes.map((attr) => {
|
|
14150
14367
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14151
|
-
return /* @__PURE__ */
|
|
14368
|
+
return /* @__PURE__ */ jsx14(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14152
14369
|
const isActive = activeValues.includes(opt.value);
|
|
14153
|
-
return /* @__PURE__ */
|
|
14370
|
+
return /* @__PURE__ */ jsx14(
|
|
14154
14371
|
OptionLink,
|
|
14155
14372
|
{
|
|
14156
14373
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14168,11 +14385,11 @@ function ShopFilters({
|
|
|
14168
14385
|
);
|
|
14169
14386
|
}) }, attr.key);
|
|
14170
14387
|
}),
|
|
14171
|
-
showPriceGroup && /* @__PURE__ */
|
|
14388
|
+
showPriceGroup && /* @__PURE__ */ jsx14(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14172
14389
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14173
14390
|
const nextMin = isActive ? void 0 : band.min;
|
|
14174
14391
|
const nextMax = isActive ? void 0 : band.max;
|
|
14175
|
-
return /* @__PURE__ */
|
|
14392
|
+
return /* @__PURE__ */ jsx14(
|
|
14176
14393
|
OptionLink,
|
|
14177
14394
|
{
|
|
14178
14395
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14183,7 +14400,7 @@ function ShopFilters({
|
|
|
14183
14400
|
i
|
|
14184
14401
|
);
|
|
14185
14402
|
}) }),
|
|
14186
|
-
hasOnSale && /* @__PURE__ */
|
|
14403
|
+
hasOnSale && /* @__PURE__ */ jsx14(
|
|
14187
14404
|
OptionLink,
|
|
14188
14405
|
{
|
|
14189
14406
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14192,7 +14409,7 @@ function ShopFilters({
|
|
|
14192
14409
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14193
14410
|
}
|
|
14194
14411
|
),
|
|
14195
|
-
/* @__PURE__ */
|
|
14412
|
+
/* @__PURE__ */ jsx14(
|
|
14196
14413
|
"a",
|
|
14197
14414
|
{
|
|
14198
14415
|
href: hrefs.clearAll(),
|
|
@@ -14209,7 +14426,7 @@ function ShopFilters({
|
|
|
14209
14426
|
|
|
14210
14427
|
// src/components/cart-line-list.tsx
|
|
14211
14428
|
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14212
|
-
import { jsx as
|
|
14429
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14213
14430
|
var DEFAULT_LABELS2 = {
|
|
14214
14431
|
quantityLabel: "Cantidad",
|
|
14215
14432
|
decrease: "Reducir cantidad",
|
|
@@ -14227,6 +14444,7 @@ function CartLineList({
|
|
|
14227
14444
|
onRemove,
|
|
14228
14445
|
liveMessage,
|
|
14229
14446
|
notice,
|
|
14447
|
+
lineMessage,
|
|
14230
14448
|
labels,
|
|
14231
14449
|
currencyCode,
|
|
14232
14450
|
locale,
|
|
@@ -14234,9 +14452,9 @@ function CartLineList({
|
|
|
14234
14452
|
}) {
|
|
14235
14453
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14236
14454
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14237
|
-
return /* @__PURE__ */
|
|
14238
|
-
/* @__PURE__ */
|
|
14239
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14455
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn12("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14456
|
+
/* @__PURE__ */ jsx15("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14457
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx15(
|
|
14240
14458
|
"div",
|
|
14241
14459
|
{
|
|
14242
14460
|
role: "status",
|
|
@@ -14245,32 +14463,33 @@ function CartLineList({
|
|
|
14245
14463
|
children: noticeContent
|
|
14246
14464
|
}
|
|
14247
14465
|
),
|
|
14248
|
-
/* @__PURE__ */
|
|
14466
|
+
/* @__PURE__ */ jsx15("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14249
14467
|
const maxQty = item.maxStock ?? Infinity;
|
|
14250
14468
|
const atMax = item.quantity >= maxQty;
|
|
14251
14469
|
const atMin = item.quantity <= 1;
|
|
14252
|
-
|
|
14470
|
+
const message = lineMessage?.(item);
|
|
14471
|
+
return /* @__PURE__ */ jsxs13(
|
|
14253
14472
|
"li",
|
|
14254
14473
|
{
|
|
14255
14474
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14256
14475
|
children: [
|
|
14257
|
-
/* @__PURE__ */
|
|
14258
|
-
/* @__PURE__ */
|
|
14259
|
-
/* @__PURE__ */
|
|
14260
|
-
item.variantName && /* @__PURE__ */
|
|
14261
|
-
/* @__PURE__ */
|
|
14476
|
+
/* @__PURE__ */ jsx15("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx15("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14477
|
+
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
14478
|
+
/* @__PURE__ */ jsx15("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14479
|
+
item.variantName && /* @__PURE__ */ jsx15("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14480
|
+
/* @__PURE__ */ jsxs13("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14262
14481
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14263
14482
|
" ",
|
|
14264
14483
|
t.unitPriceSuffix
|
|
14265
14484
|
] }),
|
|
14266
|
-
/* @__PURE__ */
|
|
14485
|
+
/* @__PURE__ */ jsxs13(
|
|
14267
14486
|
"div",
|
|
14268
14487
|
{
|
|
14269
14488
|
role: "group",
|
|
14270
14489
|
"aria-label": t.quantityLabel,
|
|
14271
14490
|
className: "mt-3 flex items-center gap-3",
|
|
14272
14491
|
children: [
|
|
14273
|
-
/* @__PURE__ */
|
|
14492
|
+
/* @__PURE__ */ jsx15(
|
|
14274
14493
|
"button",
|
|
14275
14494
|
{
|
|
14276
14495
|
type: "button",
|
|
@@ -14281,8 +14500,8 @@ function CartLineList({
|
|
|
14281
14500
|
children: "\u2212"
|
|
14282
14501
|
}
|
|
14283
14502
|
),
|
|
14284
|
-
/* @__PURE__ */
|
|
14285
|
-
/* @__PURE__ */
|
|
14503
|
+
/* @__PURE__ */ jsx15("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14504
|
+
/* @__PURE__ */ jsx15(
|
|
14286
14505
|
"button",
|
|
14287
14506
|
{
|
|
14288
14507
|
type: "button",
|
|
@@ -14293,7 +14512,7 @@ function CartLineList({
|
|
|
14293
14512
|
children: "+"
|
|
14294
14513
|
}
|
|
14295
14514
|
),
|
|
14296
|
-
onRemove && /* @__PURE__ */
|
|
14515
|
+
onRemove && /* @__PURE__ */ jsx15(
|
|
14297
14516
|
"button",
|
|
14298
14517
|
{
|
|
14299
14518
|
type: "button",
|
|
@@ -14305,9 +14524,17 @@ function CartLineList({
|
|
|
14305
14524
|
)
|
|
14306
14525
|
]
|
|
14307
14526
|
}
|
|
14527
|
+
),
|
|
14528
|
+
message != null && message !== false && /* @__PURE__ */ jsx15(
|
|
14529
|
+
"p",
|
|
14530
|
+
{
|
|
14531
|
+
className: "mt-2 text-sm text-destructive",
|
|
14532
|
+
"data-slot": "cart-line-list-line-message",
|
|
14533
|
+
children: message
|
|
14534
|
+
}
|
|
14308
14535
|
)
|
|
14309
14536
|
] }),
|
|
14310
|
-
/* @__PURE__ */
|
|
14537
|
+
/* @__PURE__ */ jsx15("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx15("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14311
14538
|
]
|
|
14312
14539
|
},
|
|
14313
14540
|
lineKey(item.productId, item.variantId)
|
|
@@ -14318,7 +14545,7 @@ function CartLineList({
|
|
|
14318
14545
|
|
|
14319
14546
|
// src/components/cart-summary.tsx
|
|
14320
14547
|
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14321
|
-
import { jsx as
|
|
14548
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14322
14549
|
var DEFAULT_LABELS3 = {
|
|
14323
14550
|
subtotal: "Subtotal",
|
|
14324
14551
|
discountPrefix: "Descuento",
|
|
@@ -14345,40 +14572,40 @@ function CartSummary({
|
|
|
14345
14572
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14346
14573
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14347
14574
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14348
|
-
const breakdown = /* @__PURE__ */
|
|
14575
|
+
const breakdown = /* @__PURE__ */ jsxs14(
|
|
14349
14576
|
"dl",
|
|
14350
14577
|
{
|
|
14351
14578
|
className: cn13("space-y-2 text-sm", !hasNotice && className),
|
|
14352
14579
|
"data-slot": "cart-summary",
|
|
14353
14580
|
children: [
|
|
14354
|
-
/* @__PURE__ */
|
|
14355
|
-
/* @__PURE__ */
|
|
14356
|
-
/* @__PURE__ */
|
|
14581
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14582
|
+
/* @__PURE__ */ jsx16("dt", { children: t.subtotal }),
|
|
14583
|
+
/* @__PURE__ */ jsx16("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14357
14584
|
] }),
|
|
14358
|
-
hasDiscount && /* @__PURE__ */
|
|
14359
|
-
/* @__PURE__ */
|
|
14585
|
+
hasDiscount && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14586
|
+
/* @__PURE__ */ jsxs14("dt", { children: [
|
|
14360
14587
|
t.discountPrefix,
|
|
14361
14588
|
discountCode ? ` (${discountCode})` : ""
|
|
14362
14589
|
] }),
|
|
14363
|
-
/* @__PURE__ */
|
|
14590
|
+
/* @__PURE__ */ jsxs14("dd", { children: [
|
|
14364
14591
|
"-",
|
|
14365
14592
|
formatPrice(discount, currencyCode, locale)
|
|
14366
14593
|
] })
|
|
14367
14594
|
] }),
|
|
14368
|
-
shippingEnabled && /* @__PURE__ */
|
|
14369
|
-
/* @__PURE__ */
|
|
14370
|
-
/* @__PURE__ */
|
|
14595
|
+
shippingEnabled && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14596
|
+
/* @__PURE__ */ jsx16("dt", { children: t.shipping }),
|
|
14597
|
+
/* @__PURE__ */ jsx16("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14371
14598
|
] }),
|
|
14372
|
-
/* @__PURE__ */
|
|
14373
|
-
/* @__PURE__ */
|
|
14374
|
-
/* @__PURE__ */
|
|
14599
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14600
|
+
/* @__PURE__ */ jsx16("dt", { children: t.total }),
|
|
14601
|
+
/* @__PURE__ */ jsx16("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14375
14602
|
] })
|
|
14376
14603
|
]
|
|
14377
14604
|
}
|
|
14378
14605
|
);
|
|
14379
14606
|
if (!hasNotice) return breakdown;
|
|
14380
|
-
return /* @__PURE__ */
|
|
14381
|
-
/* @__PURE__ */
|
|
14607
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn13("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14608
|
+
/* @__PURE__ */ jsx16(
|
|
14382
14609
|
"div",
|
|
14383
14610
|
{
|
|
14384
14611
|
role: "status",
|
|
@@ -14391,10 +14618,57 @@ function CartSummary({
|
|
|
14391
14618
|
] });
|
|
14392
14619
|
}
|
|
14393
14620
|
|
|
14394
|
-
// src/components/
|
|
14621
|
+
// src/components/cart-adjustments-notice.tsx
|
|
14395
14622
|
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14396
|
-
import { jsx as
|
|
14623
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
14397
14624
|
var DEFAULT_LABELS4 = {
|
|
14625
|
+
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.`,
|
|
14626
|
+
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
14627
|
+
priceChanged: (name, from, to) => `El precio de ${name} ha cambiado: antes ${from}, ahora ${to}.`
|
|
14628
|
+
};
|
|
14629
|
+
function displayName(line) {
|
|
14630
|
+
return line.variantName ? `${line.name} (${line.variantName})` : line.name;
|
|
14631
|
+
}
|
|
14632
|
+
function CartAdjustmentsNotice({
|
|
14633
|
+
removed = [],
|
|
14634
|
+
quantityChanges = [],
|
|
14635
|
+
priceChanges = [],
|
|
14636
|
+
labels,
|
|
14637
|
+
currencyCode,
|
|
14638
|
+
locale,
|
|
14639
|
+
className
|
|
14640
|
+
}) {
|
|
14641
|
+
const t = { ...DEFAULT_LABELS4, ...labels };
|
|
14642
|
+
const messages = [];
|
|
14643
|
+
if (removed.length > 0) messages.push(t.removed(removed.map(displayName)));
|
|
14644
|
+
for (const change of quantityChanges) {
|
|
14645
|
+
messages.push(t.quantityChanged(displayName(change), change.to));
|
|
14646
|
+
}
|
|
14647
|
+
for (const change of priceChanges) {
|
|
14648
|
+
messages.push(
|
|
14649
|
+
t.priceChanged(
|
|
14650
|
+
displayName(change),
|
|
14651
|
+
formatPrice(change.from, currencyCode, locale),
|
|
14652
|
+
formatPrice(change.to, currencyCode, locale)
|
|
14653
|
+
)
|
|
14654
|
+
);
|
|
14655
|
+
}
|
|
14656
|
+
if (messages.length === 0) return null;
|
|
14657
|
+
return /* @__PURE__ */ jsx17(
|
|
14658
|
+
"div",
|
|
14659
|
+
{
|
|
14660
|
+
role: "status",
|
|
14661
|
+
className: cn14("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
14662
|
+
"data-slot": "cart-adjustments-notice",
|
|
14663
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx17("p", { children: messages[0] }) : /* @__PURE__ */ jsx17("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx17("li", { children: message }, index)) })
|
|
14664
|
+
}
|
|
14665
|
+
);
|
|
14666
|
+
}
|
|
14667
|
+
|
|
14668
|
+
// src/components/added-to-cart-toast.tsx
|
|
14669
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14670
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14671
|
+
var DEFAULT_LABELS5 = {
|
|
14398
14672
|
success: "A\xF1adido al carrito",
|
|
14399
14673
|
error: "No se pudo a\xF1adir al carrito",
|
|
14400
14674
|
outOfStock: "Producto agotado",
|
|
@@ -14409,16 +14683,16 @@ function AddedToCartToast({
|
|
|
14409
14683
|
labels,
|
|
14410
14684
|
className
|
|
14411
14685
|
}) {
|
|
14412
|
-
const t = { ...
|
|
14686
|
+
const t = { ...DEFAULT_LABELS5, ...labels };
|
|
14413
14687
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14414
14688
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14415
14689
|
const variant = status === "success" ? "success" : "error";
|
|
14416
|
-
return /* @__PURE__ */
|
|
14690
|
+
return /* @__PURE__ */ jsxs15(
|
|
14417
14691
|
"div",
|
|
14418
14692
|
{
|
|
14419
14693
|
"data-slot": "added-to-cart-toast",
|
|
14420
14694
|
"data-variant": variant,
|
|
14421
|
-
className:
|
|
14695
|
+
className: cn15(
|
|
14422
14696
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14423
14697
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14424
14698
|
variant === "error" && "border-destructive/30",
|
|
@@ -14426,21 +14700,21 @@ function AddedToCartToast({
|
|
|
14426
14700
|
),
|
|
14427
14701
|
children: [
|
|
14428
14702
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14429
|
-
/* @__PURE__ */
|
|
14430
|
-
/* @__PURE__ */
|
|
14431
|
-
/* @__PURE__ */
|
|
14432
|
-
/* @__PURE__ */
|
|
14703
|
+
/* @__PURE__ */ jsx18("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14704
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1", children: [
|
|
14705
|
+
/* @__PURE__ */ jsx18("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14706
|
+
/* @__PURE__ */ jsx18("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14433
14707
|
] }),
|
|
14434
|
-
/* @__PURE__ */
|
|
14708
|
+
/* @__PURE__ */ jsx18("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx18("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14435
14709
|
]
|
|
14436
14710
|
}
|
|
14437
14711
|
);
|
|
14438
14712
|
}
|
|
14439
14713
|
|
|
14440
14714
|
// src/components/checkout-login-prompt.tsx
|
|
14441
|
-
import { cn as
|
|
14442
|
-
import { Fragment as Fragment3, jsx as
|
|
14443
|
-
var
|
|
14715
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14716
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14717
|
+
var DEFAULT_LABELS6 = {
|
|
14444
14718
|
title: "Identificaci\xF3n",
|
|
14445
14719
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
14446
14720
|
emailLabel: "Email",
|
|
@@ -14464,28 +14738,28 @@ function CheckoutLoginPrompt({
|
|
|
14464
14738
|
className
|
|
14465
14739
|
}) {
|
|
14466
14740
|
if (!open) return null;
|
|
14467
|
-
const t = { ...
|
|
14741
|
+
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
14468
14742
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14469
|
-
return /* @__PURE__ */
|
|
14470
|
-
/* @__PURE__ */
|
|
14471
|
-
/* @__PURE__ */
|
|
14743
|
+
return /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
14744
|
+
/* @__PURE__ */ jsx19("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14745
|
+
/* @__PURE__ */ jsxs16(
|
|
14472
14746
|
"div",
|
|
14473
14747
|
{
|
|
14474
14748
|
role: "dialog",
|
|
14475
14749
|
"aria-modal": "true",
|
|
14476
14750
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14477
14751
|
"data-slot": "checkout-login-prompt",
|
|
14478
|
-
className:
|
|
14752
|
+
className: cn16(
|
|
14479
14753
|
"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",
|
|
14480
14754
|
className
|
|
14481
14755
|
),
|
|
14482
14756
|
children: [
|
|
14483
|
-
/* @__PURE__ */
|
|
14484
|
-
/* @__PURE__ */
|
|
14485
|
-
/* @__PURE__ */
|
|
14486
|
-
/* @__PURE__ */
|
|
14757
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14758
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
14759
|
+
/* @__PURE__ */ jsx19("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14760
|
+
/* @__PURE__ */ jsx19("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14487
14761
|
] }),
|
|
14488
|
-
/* @__PURE__ */
|
|
14762
|
+
/* @__PURE__ */ jsx19(
|
|
14489
14763
|
"button",
|
|
14490
14764
|
{
|
|
14491
14765
|
type: "button",
|
|
@@ -14496,9 +14770,9 @@ function CheckoutLoginPrompt({
|
|
|
14496
14770
|
}
|
|
14497
14771
|
)
|
|
14498
14772
|
] }),
|
|
14499
|
-
/* @__PURE__ */
|
|
14500
|
-
/* @__PURE__ */
|
|
14501
|
-
/* @__PURE__ */
|
|
14773
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
|
|
14774
|
+
/* @__PURE__ */ jsx19("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14775
|
+
/* @__PURE__ */ jsx19(
|
|
14502
14776
|
"input",
|
|
14503
14777
|
{
|
|
14504
14778
|
id: "checkout-login-prompt-email",
|
|
@@ -14507,29 +14781,29 @@ function CheckoutLoginPrompt({
|
|
|
14507
14781
|
value: email,
|
|
14508
14782
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14509
14783
|
placeholder: t.emailPlaceholder,
|
|
14510
|
-
className:
|
|
14784
|
+
className: cn16(
|
|
14511
14785
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14512
14786
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14513
14787
|
)
|
|
14514
14788
|
}
|
|
14515
14789
|
),
|
|
14516
|
-
error && /* @__PURE__ */
|
|
14790
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: error })
|
|
14517
14791
|
] }),
|
|
14518
|
-
/* @__PURE__ */
|
|
14519
|
-
/* @__PURE__ */
|
|
14792
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
|
|
14793
|
+
/* @__PURE__ */ jsx19(
|
|
14520
14794
|
"button",
|
|
14521
14795
|
{
|
|
14522
14796
|
type: "button",
|
|
14523
14797
|
onClick: onSubmitEmail,
|
|
14524
14798
|
disabled: checking || !isValidEmail,
|
|
14525
|
-
className:
|
|
14799
|
+
className: cn16(
|
|
14526
14800
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14527
14801
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14528
14802
|
),
|
|
14529
14803
|
children: checking ? t.checking : t.continueWithEmail
|
|
14530
14804
|
}
|
|
14531
14805
|
),
|
|
14532
|
-
/* @__PURE__ */
|
|
14806
|
+
/* @__PURE__ */ jsx19(
|
|
14533
14807
|
"button",
|
|
14534
14808
|
{
|
|
14535
14809
|
type: "button",
|
|
@@ -14546,10 +14820,10 @@ function CheckoutLoginPrompt({
|
|
|
14546
14820
|
}
|
|
14547
14821
|
|
|
14548
14822
|
// src/components/checkout-form.tsx
|
|
14549
|
-
import { cn as
|
|
14823
|
+
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
14550
14824
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14551
|
-
import { Fragment as Fragment4, jsx as
|
|
14552
|
-
var
|
|
14825
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14826
|
+
var DEFAULT_LABELS7 = {
|
|
14553
14827
|
contactTitle: "Datos de contacto",
|
|
14554
14828
|
nameLabel: "Nombre completo",
|
|
14555
14829
|
namePlaceholder: "Tu nombre",
|
|
@@ -14588,7 +14862,7 @@ function CheckoutForm({
|
|
|
14588
14862
|
locale,
|
|
14589
14863
|
className
|
|
14590
14864
|
}) {
|
|
14591
|
-
const t = { ...
|
|
14865
|
+
const t = { ...DEFAULT_LABELS7, ...labels };
|
|
14592
14866
|
const details = checkoutError?.details;
|
|
14593
14867
|
const rejectedPhone = checkoutError?.code === "INVALID_INPUT" && typeof details === "object" && details !== null && !Array.isArray(details) && "field" in details && details.field === "customerPhone" && typeof checkoutError.error === "string" && checkoutError.error.trim().length > 0;
|
|
14594
14868
|
const phoneError = contactErrors?.phone ?? (rejectedPhone ? checkoutError.error : void 0);
|
|
@@ -14602,22 +14876,22 @@ function CheckoutForm({
|
|
|
14602
14876
|
event.preventDefault();
|
|
14603
14877
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14604
14878
|
}
|
|
14605
|
-
return /* @__PURE__ */
|
|
14879
|
+
return /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
14606
14880
|
loginPrompt,
|
|
14607
|
-
/* @__PURE__ */
|
|
14881
|
+
/* @__PURE__ */ jsxs17(
|
|
14608
14882
|
"form",
|
|
14609
14883
|
{
|
|
14610
14884
|
"data-testid": "checkout-form",
|
|
14611
14885
|
onSubmit,
|
|
14612
|
-
className:
|
|
14886
|
+
className: cn17("space-y-8", className),
|
|
14613
14887
|
"data-slot": "checkout-form",
|
|
14614
14888
|
children: [
|
|
14615
|
-
/* @__PURE__ */
|
|
14616
|
-
/* @__PURE__ */
|
|
14617
|
-
/* @__PURE__ */
|
|
14618
|
-
/* @__PURE__ */
|
|
14619
|
-
/* @__PURE__ */
|
|
14620
|
-
/* @__PURE__ */
|
|
14889
|
+
/* @__PURE__ */ jsxs17("section", { className: "space-y-4", children: [
|
|
14890
|
+
/* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
14891
|
+
/* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
14892
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
|
|
14893
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
14894
|
+
/* @__PURE__ */ jsx20(
|
|
14621
14895
|
"input",
|
|
14622
14896
|
{
|
|
14623
14897
|
id: "checkout-form-name",
|
|
@@ -14626,17 +14900,17 @@ function CheckoutForm({
|
|
|
14626
14900
|
value: contact.name,
|
|
14627
14901
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
14628
14902
|
placeholder: t.namePlaceholder,
|
|
14629
|
-
className:
|
|
14903
|
+
className: cn17(
|
|
14630
14904
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14631
14905
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
14632
14906
|
)
|
|
14633
14907
|
}
|
|
14634
14908
|
),
|
|
14635
|
-
contactErrors?.name && /* @__PURE__ */
|
|
14909
|
+
contactErrors?.name && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14636
14910
|
] }),
|
|
14637
|
-
/* @__PURE__ */
|
|
14638
|
-
/* @__PURE__ */
|
|
14639
|
-
/* @__PURE__ */
|
|
14911
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
|
|
14912
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14913
|
+
/* @__PURE__ */ jsx20(
|
|
14640
14914
|
"input",
|
|
14641
14915
|
{
|
|
14642
14916
|
id: "checkout-form-email",
|
|
@@ -14645,15 +14919,15 @@ function CheckoutForm({
|
|
|
14645
14919
|
value: contact.email,
|
|
14646
14920
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
14647
14921
|
placeholder: t.emailPlaceholder,
|
|
14648
|
-
className:
|
|
14922
|
+
className: cn17(
|
|
14649
14923
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14650
14924
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
14651
14925
|
)
|
|
14652
14926
|
}
|
|
14653
14927
|
),
|
|
14654
|
-
contactErrors?.email && /* @__PURE__ */
|
|
14928
|
+
contactErrors?.email && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
14655
14929
|
] }),
|
|
14656
|
-
/* @__PURE__ */
|
|
14930
|
+
/* @__PURE__ */ jsx20("div", { className: "space-y-1", children: /* @__PURE__ */ jsx20(
|
|
14657
14931
|
PhoneInput,
|
|
14658
14932
|
{
|
|
14659
14933
|
id: "checkout-form-phone",
|
|
@@ -14667,15 +14941,15 @@ function CheckoutForm({
|
|
|
14667
14941
|
] })
|
|
14668
14942
|
] }),
|
|
14669
14943
|
children2,
|
|
14670
|
-
generalError ? /* @__PURE__ */
|
|
14671
|
-
/* @__PURE__ */
|
|
14672
|
-
/* @__PURE__ */
|
|
14673
|
-
appliedDiscount ? /* @__PURE__ */
|
|
14674
|
-
/* @__PURE__ */
|
|
14675
|
-
/* @__PURE__ */
|
|
14676
|
-
/* @__PURE__ */
|
|
14944
|
+
generalError ? /* @__PURE__ */ jsx20("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
14945
|
+
/* @__PURE__ */ jsxs17("section", { className: "space-y-3", children: [
|
|
14946
|
+
/* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
14947
|
+
appliedDiscount ? /* @__PURE__ */ jsxs17("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: [
|
|
14948
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
14949
|
+
/* @__PURE__ */ jsx20("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
14950
|
+
/* @__PURE__ */ jsx20("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
14677
14951
|
] }),
|
|
14678
|
-
/* @__PURE__ */
|
|
14952
|
+
/* @__PURE__ */ jsx20(
|
|
14679
14953
|
"button",
|
|
14680
14954
|
{
|
|
14681
14955
|
type: "button",
|
|
@@ -14685,9 +14959,9 @@ function CheckoutForm({
|
|
|
14685
14959
|
children: t.removeDiscount
|
|
14686
14960
|
}
|
|
14687
14961
|
)
|
|
14688
|
-
] }) : /* @__PURE__ */
|
|
14689
|
-
/* @__PURE__ */
|
|
14690
|
-
/* @__PURE__ */
|
|
14962
|
+
] }) : /* @__PURE__ */ jsxs17("div", { className: "flex gap-2", children: [
|
|
14963
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
14964
|
+
/* @__PURE__ */ jsx20(
|
|
14691
14965
|
"input",
|
|
14692
14966
|
{
|
|
14693
14967
|
id: "checkout-form-discount-code",
|
|
@@ -14699,7 +14973,7 @@ function CheckoutForm({
|
|
|
14699
14973
|
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"
|
|
14700
14974
|
}
|
|
14701
14975
|
),
|
|
14702
|
-
/* @__PURE__ */
|
|
14976
|
+
/* @__PURE__ */ jsx20(
|
|
14703
14977
|
"button",
|
|
14704
14978
|
{
|
|
14705
14979
|
type: "button",
|
|
@@ -14710,14 +14984,14 @@ function CheckoutForm({
|
|
|
14710
14984
|
}
|
|
14711
14985
|
)
|
|
14712
14986
|
] }),
|
|
14713
|
-
discountError && /* @__PURE__ */
|
|
14987
|
+
discountError && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: discountError })
|
|
14714
14988
|
] }),
|
|
14715
|
-
/* @__PURE__ */
|
|
14989
|
+
/* @__PURE__ */ jsx20(
|
|
14716
14990
|
"button",
|
|
14717
14991
|
{
|
|
14718
14992
|
type: "submit",
|
|
14719
14993
|
disabled: submitting || submitDisabled,
|
|
14720
|
-
className:
|
|
14994
|
+
className: cn17(
|
|
14721
14995
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
14722
14996
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14723
14997
|
),
|
|
@@ -14731,20 +15005,20 @@ function CheckoutForm({
|
|
|
14731
15005
|
}
|
|
14732
15006
|
|
|
14733
15007
|
// src/components/order-confirmation.tsx
|
|
14734
|
-
import { cn as
|
|
15008
|
+
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
14735
15009
|
|
|
14736
15010
|
// src/components/order-invoice-link.tsx
|
|
14737
|
-
import { cn as
|
|
14738
|
-
import { jsx as
|
|
14739
|
-
var
|
|
15011
|
+
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15012
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
15013
|
+
var DEFAULT_LABELS8 = {
|
|
14740
15014
|
linkLabel: "Descargar la factura {number}",
|
|
14741
15015
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
14742
15016
|
};
|
|
14743
15017
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
14744
15018
|
if (!invoice) return null;
|
|
14745
|
-
const t = { ...
|
|
14746
|
-
return /* @__PURE__ */
|
|
14747
|
-
/* @__PURE__ */
|
|
15019
|
+
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15020
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn18("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15021
|
+
/* @__PURE__ */ jsx21(
|
|
14748
15022
|
"a",
|
|
14749
15023
|
{
|
|
14750
15024
|
href: invoice.url,
|
|
@@ -14752,13 +15026,13 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
14752
15026
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
14753
15027
|
}
|
|
14754
15028
|
),
|
|
14755
|
-
/* @__PURE__ */
|
|
15029
|
+
/* @__PURE__ */ jsx21("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
14756
15030
|
] });
|
|
14757
15031
|
}
|
|
14758
15032
|
|
|
14759
15033
|
// src/components/order-confirmation.tsx
|
|
14760
|
-
import { jsx as
|
|
14761
|
-
var
|
|
15034
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
15035
|
+
var DEFAULT_LABELS9 = {
|
|
14762
15036
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
14763
15037
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
14764
15038
|
foundTitle: "\xA1Pedido confirmado!",
|
|
@@ -14799,7 +15073,7 @@ function OrderConfirmation({
|
|
|
14799
15073
|
locale,
|
|
14800
15074
|
className
|
|
14801
15075
|
}) {
|
|
14802
|
-
const t = { ...
|
|
15076
|
+
const t = { ...DEFAULT_LABELS9, ...labels };
|
|
14803
15077
|
const isPolling = status === "polling" || status === "loading";
|
|
14804
15078
|
const isFound = status === "found" || status === "paid";
|
|
14805
15079
|
const { title, description } = (() => {
|
|
@@ -14821,43 +15095,43 @@ function OrderConfirmation({
|
|
|
14821
15095
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
14822
15096
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
14823
15097
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
14824
|
-
return /* @__PURE__ */
|
|
14825
|
-
/* @__PURE__ */
|
|
14826
|
-
/* @__PURE__ */
|
|
14827
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
14828
|
-
/* @__PURE__ */
|
|
14829
|
-
/* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
15098
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn19("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15099
|
+
/* @__PURE__ */ jsx22("h1", { className: "text-3xl font-bold", children: title }),
|
|
15100
|
+
/* @__PURE__ */ jsx22("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15101
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs19("div", { className: "space-y-6", children: [
|
|
15102
|
+
/* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15103
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15104
|
+
/* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14831
15105
|
] }),
|
|
14832
|
-
/* @__PURE__ */
|
|
14833
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15106
|
+
/* @__PURE__ */ jsxs19("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15107
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs19(
|
|
14834
15108
|
"div",
|
|
14835
15109
|
{
|
|
14836
15110
|
className: "flex justify-between gap-4 text-sm",
|
|
14837
15111
|
children: [
|
|
14838
|
-
/* @__PURE__ */
|
|
15112
|
+
/* @__PURE__ */ jsxs19("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
14839
15113
|
item.product.name,
|
|
14840
15114
|
item.variant ? ` (${item.variant.name})` : "",
|
|
14841
15115
|
" x",
|
|
14842
15116
|
item.quantity
|
|
14843
15117
|
] }),
|
|
14844
|
-
/* @__PURE__ */
|
|
15118
|
+
/* @__PURE__ */ jsx22("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
14845
15119
|
]
|
|
14846
15120
|
},
|
|
14847
15121
|
idx
|
|
14848
15122
|
)),
|
|
14849
|
-
/* @__PURE__ */
|
|
14850
|
-
/* @__PURE__ */
|
|
14851
|
-
/* @__PURE__ */
|
|
15123
|
+
/* @__PURE__ */ jsx22("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15124
|
+
/* @__PURE__ */ jsx22("span", { children: t.totalLabel }),
|
|
15125
|
+
/* @__PURE__ */ jsx22("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
14852
15126
|
] }) })
|
|
14853
15127
|
] }),
|
|
14854
|
-
/* @__PURE__ */
|
|
15128
|
+
/* @__PURE__ */ jsxs19("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
14855
15129
|
t.confirmationEmailPrefix,
|
|
14856
15130
|
" ",
|
|
14857
|
-
/* @__PURE__ */
|
|
15131
|
+
/* @__PURE__ */ jsx22("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
14858
15132
|
"."
|
|
14859
15133
|
] }),
|
|
14860
|
-
/* @__PURE__ */
|
|
15134
|
+
/* @__PURE__ */ jsx22(
|
|
14861
15135
|
OrderInvoiceLink,
|
|
14862
15136
|
{
|
|
14863
15137
|
invoice: order.invoice,
|
|
@@ -14865,11 +15139,11 @@ function OrderConfirmation({
|
|
|
14865
15139
|
}
|
|
14866
15140
|
)
|
|
14867
15141
|
] }),
|
|
14868
|
-
showOrderReference && order && /* @__PURE__ */
|
|
14869
|
-
/* @__PURE__ */
|
|
14870
|
-
/* @__PURE__ */
|
|
15142
|
+
showOrderReference && order && /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15143
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15144
|
+
/* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14871
15145
|
] }),
|
|
14872
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15146
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx22(
|
|
14873
15147
|
"a",
|
|
14874
15148
|
{
|
|
14875
15149
|
href: cartHref,
|
|
@@ -14877,7 +15151,7 @@ function OrderConfirmation({
|
|
|
14877
15151
|
children: t.backToCartLabel
|
|
14878
15152
|
}
|
|
14879
15153
|
),
|
|
14880
|
-
showRecheck && /* @__PURE__ */
|
|
15154
|
+
showRecheck && /* @__PURE__ */ jsx22(
|
|
14881
15155
|
"button",
|
|
14882
15156
|
{
|
|
14883
15157
|
type: "button",
|
|
@@ -14886,16 +15160,16 @@ function OrderConfirmation({
|
|
|
14886
15160
|
children: t.recheckLabel
|
|
14887
15161
|
}
|
|
14888
15162
|
),
|
|
14889
|
-
showSessionReference && /* @__PURE__ */
|
|
14890
|
-
/* @__PURE__ */
|
|
14891
|
-
/* @__PURE__ */
|
|
15163
|
+
showSessionReference && /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15164
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15165
|
+
/* @__PURE__ */ jsx22("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
14892
15166
|
] })
|
|
14893
15167
|
] });
|
|
14894
15168
|
}
|
|
14895
15169
|
|
|
14896
15170
|
// src/components/full-invoice-fields.tsx
|
|
14897
|
-
import { cn as
|
|
14898
|
-
import { jsx as
|
|
15171
|
+
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15172
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
14899
15173
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
14900
15174
|
wantsFullInvoice: false,
|
|
14901
15175
|
billingIdType: "NIF",
|
|
@@ -14907,7 +15181,7 @@ var EMPTY_FULL_INVOICE_VALUE = {
|
|
|
14907
15181
|
city: "",
|
|
14908
15182
|
country: "ES"
|
|
14909
15183
|
};
|
|
14910
|
-
var
|
|
15184
|
+
var DEFAULT_LABELS10 = {
|
|
14911
15185
|
toggle: "\xBFQuieres factura completa?",
|
|
14912
15186
|
underCapNotice: "Para una factura completa necesitas tu NIF/NIE o un documento de identificaci\xF3n. Si no, recibir\xE1s una factura simplificada.",
|
|
14913
15187
|
overCapNotice: "El importe del pedido supera el m\xE1ximo de la factura simplificada: para completar la compra, indica tu NIF/NIE o un documento de identificaci\xF3n, tu nombre y tu direcci\xF3n de facturaci\xF3n.",
|
|
@@ -15008,16 +15282,16 @@ function FullInvoiceFields({
|
|
|
15008
15282
|
className
|
|
15009
15283
|
}) {
|
|
15010
15284
|
if (!issuesInvoices) return null;
|
|
15011
|
-
const t = { ...
|
|
15285
|
+
const t = { ...DEFAULT_LABELS10, ...labels };
|
|
15012
15286
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15013
15287
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15014
15288
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15015
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15289
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx23("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15016
15290
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15017
|
-
return /* @__PURE__ */
|
|
15018
|
-
overCap ? /* @__PURE__ */
|
|
15019
|
-
/* @__PURE__ */
|
|
15020
|
-
/* @__PURE__ */
|
|
15291
|
+
return /* @__PURE__ */ jsxs20("section", { className: cn20("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15292
|
+
overCap ? /* @__PURE__ */ jsx23("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15293
|
+
/* @__PURE__ */ jsxs20("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15294
|
+
/* @__PURE__ */ jsx23(
|
|
15021
15295
|
"input",
|
|
15022
15296
|
{
|
|
15023
15297
|
type: "checkbox",
|
|
@@ -15027,12 +15301,12 @@ function FullInvoiceFields({
|
|
|
15027
15301
|
),
|
|
15028
15302
|
t.toggle
|
|
15029
15303
|
] }),
|
|
15030
|
-
/* @__PURE__ */
|
|
15304
|
+
/* @__PURE__ */ jsx23("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15031
15305
|
] }),
|
|
15032
|
-
showFields && /* @__PURE__ */
|
|
15033
|
-
/* @__PURE__ */
|
|
15034
|
-
/* @__PURE__ */
|
|
15035
|
-
/* @__PURE__ */
|
|
15306
|
+
showFields && /* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15307
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15308
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15309
|
+
/* @__PURE__ */ jsx23(
|
|
15036
15310
|
"select",
|
|
15037
15311
|
{
|
|
15038
15312
|
id: "full-invoice-id-type",
|
|
@@ -15041,14 +15315,14 @@ function FullInvoiceFields({
|
|
|
15041
15315
|
value: value.billingIdType,
|
|
15042
15316
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15043
15317
|
...invalid2("billingIdType"),
|
|
15044
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15318
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx23("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15045
15319
|
}
|
|
15046
15320
|
),
|
|
15047
15321
|
error("billingIdType")
|
|
15048
15322
|
] }),
|
|
15049
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15050
|
-
/* @__PURE__ */
|
|
15051
|
-
/* @__PURE__ */
|
|
15323
|
+
!isSpanishNif && /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15324
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15325
|
+
/* @__PURE__ */ jsxs20(
|
|
15052
15326
|
"select",
|
|
15053
15327
|
{
|
|
15054
15328
|
id: "full-invoice-id-country",
|
|
@@ -15058,16 +15332,16 @@ function FullInvoiceFields({
|
|
|
15058
15332
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15059
15333
|
...invalid2("billingIdCountry"),
|
|
15060
15334
|
children: [
|
|
15061
|
-
/* @__PURE__ */
|
|
15062
|
-
countries.map((c) => /* @__PURE__ */
|
|
15335
|
+
/* @__PURE__ */ jsx23("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15336
|
+
countries.map((c) => /* @__PURE__ */ jsx23("option", { value: c.code, children: c.name }, c.code))
|
|
15063
15337
|
]
|
|
15064
15338
|
}
|
|
15065
15339
|
),
|
|
15066
15340
|
error("billingIdCountry")
|
|
15067
15341
|
] }),
|
|
15068
|
-
/* @__PURE__ */
|
|
15069
|
-
/* @__PURE__ */
|
|
15070
|
-
/* @__PURE__ */
|
|
15342
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15343
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15344
|
+
/* @__PURE__ */ jsx23(
|
|
15071
15345
|
"input",
|
|
15072
15346
|
{
|
|
15073
15347
|
id: "full-invoice-nif",
|
|
@@ -15080,9 +15354,9 @@ function FullInvoiceFields({
|
|
|
15080
15354
|
),
|
|
15081
15355
|
error("billingNif")
|
|
15082
15356
|
] }),
|
|
15083
|
-
/* @__PURE__ */
|
|
15084
|
-
/* @__PURE__ */
|
|
15085
|
-
/* @__PURE__ */
|
|
15357
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15358
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15359
|
+
/* @__PURE__ */ jsx23(
|
|
15086
15360
|
"input",
|
|
15087
15361
|
{
|
|
15088
15362
|
id: "full-invoice-name",
|
|
@@ -15095,9 +15369,9 @@ function FullInvoiceFields({
|
|
|
15095
15369
|
),
|
|
15096
15370
|
error("billingName")
|
|
15097
15371
|
] }),
|
|
15098
|
-
/* @__PURE__ */
|
|
15099
|
-
/* @__PURE__ */
|
|
15100
|
-
/* @__PURE__ */
|
|
15372
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15373
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15374
|
+
/* @__PURE__ */ jsx23(
|
|
15101
15375
|
"input",
|
|
15102
15376
|
{
|
|
15103
15377
|
id: "full-invoice-street",
|
|
@@ -15109,9 +15383,9 @@ function FullInvoiceFields({
|
|
|
15109
15383
|
}
|
|
15110
15384
|
)
|
|
15111
15385
|
] }),
|
|
15112
|
-
/* @__PURE__ */
|
|
15113
|
-
/* @__PURE__ */
|
|
15114
|
-
/* @__PURE__ */
|
|
15386
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15387
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15388
|
+
/* @__PURE__ */ jsx23(
|
|
15115
15389
|
"input",
|
|
15116
15390
|
{
|
|
15117
15391
|
id: "full-invoice-postal-code",
|
|
@@ -15122,9 +15396,9 @@ function FullInvoiceFields({
|
|
|
15122
15396
|
}
|
|
15123
15397
|
)
|
|
15124
15398
|
] }),
|
|
15125
|
-
/* @__PURE__ */
|
|
15126
|
-
/* @__PURE__ */
|
|
15127
|
-
/* @__PURE__ */
|
|
15399
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15400
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15401
|
+
/* @__PURE__ */ jsx23(
|
|
15128
15402
|
"input",
|
|
15129
15403
|
{
|
|
15130
15404
|
id: "full-invoice-city",
|
|
@@ -15135,9 +15409,9 @@ function FullInvoiceFields({
|
|
|
15135
15409
|
}
|
|
15136
15410
|
)
|
|
15137
15411
|
] }),
|
|
15138
|
-
/* @__PURE__ */
|
|
15139
|
-
/* @__PURE__ */
|
|
15140
|
-
/* @__PURE__ */
|
|
15412
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15413
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15414
|
+
/* @__PURE__ */ jsx23(
|
|
15141
15415
|
"select",
|
|
15142
15416
|
{
|
|
15143
15417
|
id: "full-invoice-country",
|
|
@@ -15145,25 +15419,29 @@ function FullInvoiceFields({
|
|
|
15145
15419
|
required: true,
|
|
15146
15420
|
value: value.country,
|
|
15147
15421
|
onChange: (e) => set("country", e.target.value),
|
|
15148
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
15422
|
+
children: countries.map((c) => /* @__PURE__ */ jsx23("option", { value: c.code, children: c.name }, c.code))
|
|
15149
15423
|
}
|
|
15150
15424
|
)
|
|
15151
15425
|
] }),
|
|
15152
|
-
/* @__PURE__ */
|
|
15426
|
+
/* @__PURE__ */ jsx23("div", { className: "sm:col-span-2", children: error("address") })
|
|
15153
15427
|
] })
|
|
15154
15428
|
] });
|
|
15155
15429
|
}
|
|
15156
15430
|
export {
|
|
15157
15431
|
ALLOWED_YOUTUBE_HOSTS,
|
|
15158
15432
|
AddedToCartToast,
|
|
15433
|
+
CartAdjustmentsNotice,
|
|
15159
15434
|
CartLineList,
|
|
15160
15435
|
CartSummary,
|
|
15161
15436
|
CheckoutForm,
|
|
15162
15437
|
CheckoutLoginPrompt,
|
|
15438
|
+
CourseDescription,
|
|
15163
15439
|
DEFAULT_INVOICE_COUNTRIES,
|
|
15164
15440
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
15165
15441
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
15166
15442
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
15443
|
+
DEFAULT_TRUST_BADGE_HEADINGS,
|
|
15444
|
+
DEFAULT_TRUST_BADGE_TYPE_ORDER,
|
|
15167
15445
|
DEFAULT_TRUST_ICONS,
|
|
15168
15446
|
EMPTY_FULL_INVOICE_VALUE,
|
|
15169
15447
|
FaqAccordion,
|
|
@@ -15181,6 +15459,7 @@ export {
|
|
|
15181
15459
|
ShopFilters,
|
|
15182
15460
|
Specialty,
|
|
15183
15461
|
Treatment,
|
|
15462
|
+
TrustBadges,
|
|
15184
15463
|
buildFaqPageJsonLd,
|
|
15185
15464
|
buildShareUrls,
|
|
15186
15465
|
collectFaqItems,
|
|
@@ -15188,6 +15467,7 @@ export {
|
|
|
15188
15467
|
getShopErrorMessage,
|
|
15189
15468
|
isAllowedYouTubeHost,
|
|
15190
15469
|
isOverSimplifiedInvoiceCap,
|
|
15470
|
+
markdownToPlainText,
|
|
15191
15471
|
markdownToSafeHtml,
|
|
15192
15472
|
readingTime,
|
|
15193
15473
|
sanitizeHtml,
|