@reblu/site-blocks 0.12.1 → 0.14.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 +54 -0
- package/README.md +168 -8
- package/dist/index.cjs +747 -278
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -8
- package/dist/index.d.ts +213 -8
- package/dist/index.js +736 -277
- 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 +5 -5
package/dist/index.js
CHANGED
|
@@ -46,7 +46,11 @@ var DEFAULT_SHOP_ERROR_MESSAGES = {
|
|
|
46
46
|
INVALID_INPUT: "Revisa los datos introducidos.",
|
|
47
47
|
STORE_DISABLED: "La tienda no est\xE1 disponible en este momento.",
|
|
48
48
|
PAYMENT_PROVIDER_ERROR: "No hemos podido conectar con la pasarela de pago. Int\xE9ntalo de nuevo.",
|
|
49
|
-
INTERNAL_ERROR: "Ha ocurrido un error inesperado. Int\xE9ntalo de nuevo en unos minutos."
|
|
49
|
+
INTERNAL_ERROR: "Ha ocurrido un error inesperado. Int\xE9ntalo de nuevo en unos minutos.",
|
|
50
|
+
// REB-73 — checkout refusals before any payment.
|
|
51
|
+
BILLING_DATA_REQUIRED: "Para emitir tu factura necesitamos tu NIF/NIE o un documento de identificaci\xF3n, tu nombre y tu direcci\xF3n de facturaci\xF3n.",
|
|
52
|
+
INVOICING_NOT_READY: "No se puede completar la compra en este momento. Int\xE9ntalo m\xE1s tarde.",
|
|
53
|
+
FULL_INVOICE_UNAVAILABLE: "Esta tienda no emite facturas completas: contin\xFAa sin solicitarla."
|
|
50
54
|
};
|
|
51
55
|
var DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE = "No se ha podido completar la operaci\xF3n. Int\xE9ntalo de nuevo.";
|
|
52
56
|
function getShopErrorMessage(code, overrides, fallback = DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE) {
|
|
@@ -13056,6 +13060,52 @@ function markdownToSafeHtml(markdown) {
|
|
|
13056
13060
|
return sanitizeHtml(rawHtml);
|
|
13057
13061
|
}
|
|
13058
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
|
+
|
|
13059
13109
|
// src/components/markdown-renderer.tsx
|
|
13060
13110
|
import { cn } from "@reblu/site-ui/utils";
|
|
13061
13111
|
import {
|
|
@@ -13232,13 +13282,60 @@ function SafeHtml({ html: html5, className, headingOffset = 0 }) {
|
|
|
13232
13282
|
return /* @__PURE__ */ jsx("div", { className: cn("max-w-none", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
|
|
13233
13283
|
}
|
|
13234
13284
|
|
|
13285
|
+
// src/components/course-description.tsx
|
|
13286
|
+
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13287
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
13288
|
+
function isVisiblyEmpty(html5) {
|
|
13289
|
+
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13290
|
+
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
13291
|
+
}
|
|
13292
|
+
function CourseDescription({
|
|
13293
|
+
description,
|
|
13294
|
+
heading,
|
|
13295
|
+
headingLevel = 2,
|
|
13296
|
+
headingId = "course-description-heading",
|
|
13297
|
+
headingOffset,
|
|
13298
|
+
className,
|
|
13299
|
+
headingClassName,
|
|
13300
|
+
contentClassName
|
|
13301
|
+
}) {
|
|
13302
|
+
const html5 = markdownToSafeHtml(typeof description === "string" ? description : null);
|
|
13303
|
+
if (!html5 || isVisiblyEmpty(html5)) return null;
|
|
13304
|
+
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13305
|
+
const offset = headingOffset ?? (hasHeading ? headingLevel - 1 : 0);
|
|
13306
|
+
const body3 = /* @__PURE__ */ jsx2(
|
|
13307
|
+
SafeHtml,
|
|
13308
|
+
{
|
|
13309
|
+
html: html5,
|
|
13310
|
+
headingOffset: offset,
|
|
13311
|
+
className: cn2("text-muted-foreground", contentClassName)
|
|
13312
|
+
}
|
|
13313
|
+
);
|
|
13314
|
+
if (!hasHeading) {
|
|
13315
|
+
return /* @__PURE__ */ jsx2("div", { "data-slot": "course-description", className, children: body3 });
|
|
13316
|
+
}
|
|
13317
|
+
const Tag = `h${headingLevel}`;
|
|
13318
|
+
return /* @__PURE__ */ jsxs(
|
|
13319
|
+
"section",
|
|
13320
|
+
{
|
|
13321
|
+
"data-slot": "course-description",
|
|
13322
|
+
"aria-labelledby": headingId,
|
|
13323
|
+
className: cn2("space-y-3", className),
|
|
13324
|
+
children: [
|
|
13325
|
+
/* @__PURE__ */ jsx2(Tag, { id: headingId, className: cn2("text-xl font-semibold", headingClassName), children: heading }),
|
|
13326
|
+
body3
|
|
13327
|
+
]
|
|
13328
|
+
}
|
|
13329
|
+
);
|
|
13330
|
+
}
|
|
13331
|
+
|
|
13235
13332
|
// src/components/treatment.tsx
|
|
13236
|
-
import { cn as
|
|
13333
|
+
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13237
13334
|
|
|
13238
13335
|
// src/components/_page-parts.tsx
|
|
13239
|
-
import { cn as
|
|
13336
|
+
import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
13240
13337
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13241
|
-
import { Fragment as Fragment2, jsx as
|
|
13338
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
13242
13339
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13243
13340
|
"default",
|
|
13244
13341
|
"destructive",
|
|
@@ -13251,11 +13348,11 @@ function toButtonVariant(variant) {
|
|
|
13251
13348
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13252
13349
|
}
|
|
13253
13350
|
function PageHero({ page }) {
|
|
13254
|
-
return /* @__PURE__ */
|
|
13255
|
-
page.category && /* @__PURE__ */
|
|
13256
|
-
/* @__PURE__ */
|
|
13257
|
-
page.subtitle && /* @__PURE__ */
|
|
13258
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13351
|
+
return /* @__PURE__ */ jsxs2("header", { className: "space-y-4", children: [
|
|
13352
|
+
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 }),
|
|
13353
|
+
/* @__PURE__ */ jsx3("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13354
|
+
page.subtitle && /* @__PURE__ */ jsx3("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
13355
|
+
page.coverImageUrl && /* @__PURE__ */ jsx3("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx3(
|
|
13259
13356
|
"img",
|
|
13260
13357
|
{
|
|
13261
13358
|
src: page.coverImageUrl,
|
|
@@ -13269,14 +13366,14 @@ function PageHero({ page }) {
|
|
|
13269
13366
|
function SectionCta({ section }) {
|
|
13270
13367
|
if (!section.ctaLabel || !section.ctaUrl) return null;
|
|
13271
13368
|
const variant = toButtonVariant(section.ctaVariant);
|
|
13272
|
-
return /* @__PURE__ */
|
|
13369
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-2", children: /* @__PURE__ */ jsx3(
|
|
13273
13370
|
"a",
|
|
13274
13371
|
{
|
|
13275
13372
|
href: section.ctaUrl,
|
|
13276
13373
|
"data-slot": "button",
|
|
13277
13374
|
"data-variant": variant,
|
|
13278
13375
|
"data-size": "default",
|
|
13279
|
-
className:
|
|
13376
|
+
className: cn3(buttonVariants({ variant, size: "default" })),
|
|
13280
13377
|
...section.ctaIsExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13281
13378
|
children: section.ctaLabel
|
|
13282
13379
|
}
|
|
@@ -13284,59 +13381,59 @@ function SectionCta({ section }) {
|
|
|
13284
13381
|
}
|
|
13285
13382
|
function SectionImages({ section }) {
|
|
13286
13383
|
if (section.images.length === 0) return null;
|
|
13287
|
-
return /* @__PURE__ */
|
|
13288
|
-
/* @__PURE__ */
|
|
13289
|
-
img.caption && /* @__PURE__ */
|
|
13384
|
+
return /* @__PURE__ */ jsx3("div", { className: cn3("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: [
|
|
13385
|
+
/* @__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" }) }),
|
|
13386
|
+
img.caption && /* @__PURE__ */ jsx3("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13290
13387
|
] }, `${img.url}-${img.order}`)) });
|
|
13291
13388
|
}
|
|
13292
13389
|
function PageSectionBlock({ section }) {
|
|
13293
13390
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13294
13391
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13295
13392
|
const hasImages = section.images.length > 0;
|
|
13296
|
-
const body3 = /* @__PURE__ */
|
|
13297
|
-
section.heading && /* @__PURE__ */
|
|
13298
|
-
/* @__PURE__ */
|
|
13299
|
-
/* @__PURE__ */
|
|
13393
|
+
const body3 = /* @__PURE__ */ jsxs2("div", { className: "space-y-4", children: [
|
|
13394
|
+
section.heading && /* @__PURE__ */ jsx3("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13395
|
+
/* @__PURE__ */ jsx3(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13396
|
+
/* @__PURE__ */ jsx3(SectionCta, { section })
|
|
13300
13397
|
] });
|
|
13301
13398
|
if (sideBySide && hasImages) {
|
|
13302
|
-
return /* @__PURE__ */
|
|
13303
|
-
/* @__PURE__ */
|
|
13399
|
+
return /* @__PURE__ */ jsx3("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
13400
|
+
/* @__PURE__ */ jsx3(SectionImages, { section }),
|
|
13304
13401
|
body3
|
|
13305
|
-
] }) : /* @__PURE__ */
|
|
13402
|
+
] }) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
13306
13403
|
body3,
|
|
13307
|
-
/* @__PURE__ */
|
|
13404
|
+
/* @__PURE__ */ jsx3(SectionImages, { section })
|
|
13308
13405
|
] }) });
|
|
13309
13406
|
}
|
|
13310
|
-
return /* @__PURE__ */
|
|
13407
|
+
return /* @__PURE__ */ jsxs2("section", { className: "space-y-4", children: [
|
|
13311
13408
|
body3,
|
|
13312
|
-
/* @__PURE__ */
|
|
13409
|
+
/* @__PURE__ */ jsx3(SectionImages, { section })
|
|
13313
13410
|
] });
|
|
13314
13411
|
}
|
|
13315
13412
|
function PageSectionList({ sections }) {
|
|
13316
13413
|
if (sections.length === 0) return null;
|
|
13317
13414
|
const ordered = sections.slice().sort((a, b2) => a.order - b2.order);
|
|
13318
|
-
return /* @__PURE__ */
|
|
13415
|
+
return /* @__PURE__ */ jsx3("div", { className: "space-y-12", children: ordered.map((section) => /* @__PURE__ */ jsx3(PageSectionBlock, { section }, section.id)) });
|
|
13319
13416
|
}
|
|
13320
13417
|
|
|
13321
13418
|
// src/components/treatment.tsx
|
|
13322
|
-
import { jsx as
|
|
13419
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13323
13420
|
function Treatment({ page, className }) {
|
|
13324
|
-
return /* @__PURE__ */
|
|
13325
|
-
/* @__PURE__ */
|
|
13326
|
-
/* @__PURE__ */
|
|
13421
|
+
return /* @__PURE__ */ jsxs3("article", { className: cn4("space-y-12", className), "data-slot": "treatment", children: [
|
|
13422
|
+
/* @__PURE__ */ jsx4(PageHero, { page }),
|
|
13423
|
+
/* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections })
|
|
13327
13424
|
] });
|
|
13328
13425
|
}
|
|
13329
13426
|
|
|
13330
13427
|
// src/components/parent-page.tsx
|
|
13331
|
-
import { cn as
|
|
13428
|
+
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13332
13429
|
|
|
13333
13430
|
// src/components/page-card-grid.tsx
|
|
13334
|
-
import { cn as
|
|
13335
|
-
import { jsx as
|
|
13431
|
+
import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
13432
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13336
13433
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13337
13434
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13338
13435
|
function PageCardGrid(props) {
|
|
13339
|
-
return /* @__PURE__ */
|
|
13436
|
+
return /* @__PURE__ */ jsx5(PageCardGridSection, { ...props });
|
|
13340
13437
|
}
|
|
13341
13438
|
function PageCardGridSection({
|
|
13342
13439
|
pages,
|
|
@@ -13347,15 +13444,15 @@ function PageCardGridSection({
|
|
|
13347
13444
|
}) {
|
|
13348
13445
|
if (pages.length === 0) return null;
|
|
13349
13446
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13350
|
-
return /* @__PURE__ */
|
|
13351
|
-
showHeading && /* @__PURE__ */
|
|
13352
|
-
/* @__PURE__ */
|
|
13447
|
+
return /* @__PURE__ */ jsxs4("section", { className: cn5("space-y-6", className), children: [
|
|
13448
|
+
showHeading && /* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13449
|
+
/* @__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(
|
|
13353
13450
|
"a",
|
|
13354
13451
|
{
|
|
13355
13452
|
href: pageHref(page),
|
|
13356
13453
|
className: "group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13357
13454
|
children: [
|
|
13358
|
-
page.coverImageUrl && /* @__PURE__ */
|
|
13455
|
+
page.coverImageUrl && /* @__PURE__ */ jsx5("div", { className: "relative aspect-video overflow-hidden bg-muted", children: /* @__PURE__ */ jsx5(
|
|
13359
13456
|
"img",
|
|
13360
13457
|
{
|
|
13361
13458
|
src: page.coverImageUrl,
|
|
@@ -13364,9 +13461,9 @@ function PageCardGridSection({
|
|
|
13364
13461
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13365
13462
|
}
|
|
13366
13463
|
) }),
|
|
13367
|
-
/* @__PURE__ */
|
|
13368
|
-
/* @__PURE__ */
|
|
13369
|
-
page.excerpt && /* @__PURE__ */
|
|
13464
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13465
|
+
/* @__PURE__ */ jsx5("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13466
|
+
page.excerpt && /* @__PURE__ */ jsx5("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13370
13467
|
] })
|
|
13371
13468
|
]
|
|
13372
13469
|
}
|
|
@@ -13375,7 +13472,7 @@ function PageCardGridSection({
|
|
|
13375
13472
|
}
|
|
13376
13473
|
|
|
13377
13474
|
// src/components/parent-page.tsx
|
|
13378
|
-
import { jsx as
|
|
13475
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13379
13476
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13380
13477
|
function ParentPage({
|
|
13381
13478
|
page,
|
|
@@ -13390,10 +13487,10 @@ function ParentPage({
|
|
|
13390
13487
|
const pages = childPages ?? treatments ?? [];
|
|
13391
13488
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13392
13489
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13393
|
-
return /* @__PURE__ */
|
|
13394
|
-
/* @__PURE__ */
|
|
13395
|
-
/* @__PURE__ */
|
|
13396
|
-
/* @__PURE__ */
|
|
13490
|
+
return /* @__PURE__ */ jsxs5("article", { className: cn6("space-y-12", className), "data-slot": "specialty", children: [
|
|
13491
|
+
/* @__PURE__ */ jsx6(PageHero, { page }),
|
|
13492
|
+
/* @__PURE__ */ jsx6(PageSectionList, { sections: page.sections }),
|
|
13493
|
+
/* @__PURE__ */ jsx6(
|
|
13397
13494
|
PageCardGridSection,
|
|
13398
13495
|
{
|
|
13399
13496
|
pages,
|
|
@@ -13409,34 +13506,34 @@ function ParentPage({
|
|
|
13409
13506
|
var Specialty = ParentPage;
|
|
13410
13507
|
|
|
13411
13508
|
// src/components/profile-card.tsx
|
|
13412
|
-
import { cn as
|
|
13413
|
-
import { jsx as
|
|
13509
|
+
import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
13510
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13414
13511
|
function initials(name) {
|
|
13415
13512
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13416
13513
|
}
|
|
13417
13514
|
function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, className }) {
|
|
13418
13515
|
const NameTag = href ? "a" : "span";
|
|
13419
|
-
return /* @__PURE__ */
|
|
13516
|
+
return /* @__PURE__ */ jsxs6(
|
|
13420
13517
|
"article",
|
|
13421
13518
|
{
|
|
13422
|
-
className:
|
|
13519
|
+
className: cn7(
|
|
13423
13520
|
"flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
|
|
13424
13521
|
className
|
|
13425
13522
|
),
|
|
13426
13523
|
"data-slot": "profile-card",
|
|
13427
13524
|
children: [
|
|
13428
|
-
/* @__PURE__ */
|
|
13429
|
-
/* @__PURE__ */
|
|
13430
|
-
/* @__PURE__ */
|
|
13525
|
+
/* @__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) }) }),
|
|
13526
|
+
/* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
13527
|
+
/* @__PURE__ */ jsx7("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx7(
|
|
13431
13528
|
NameTag,
|
|
13432
13529
|
{
|
|
13433
13530
|
...href ? { href, className: "transition-colors hover:text-primary" } : {},
|
|
13434
13531
|
children: name
|
|
13435
13532
|
}
|
|
13436
13533
|
) }),
|
|
13437
|
-
role && /* @__PURE__ */
|
|
13534
|
+
role && /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13438
13535
|
] }),
|
|
13439
|
-
specialties.length > 0 && /* @__PURE__ */
|
|
13536
|
+
specialties.length > 0 && /* @__PURE__ */ jsx7("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ jsx7(
|
|
13440
13537
|
"li",
|
|
13441
13538
|
{
|
|
13442
13539
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13444,28 +13541,28 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13444
13541
|
},
|
|
13445
13542
|
s2
|
|
13446
13543
|
)) }),
|
|
13447
|
-
bio && /* @__PURE__ */
|
|
13544
|
+
bio && /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13448
13545
|
]
|
|
13449
13546
|
}
|
|
13450
13547
|
);
|
|
13451
13548
|
}
|
|
13452
13549
|
|
|
13453
13550
|
// src/components/product-card.tsx
|
|
13454
|
-
import { cn as
|
|
13455
|
-
import { jsx as
|
|
13551
|
+
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13552
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13456
13553
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13457
13554
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13458
13555
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13459
|
-
return /* @__PURE__ */
|
|
13556
|
+
return /* @__PURE__ */ jsxs7(
|
|
13460
13557
|
"article",
|
|
13461
13558
|
{
|
|
13462
|
-
className:
|
|
13559
|
+
className: cn8(
|
|
13463
13560
|
"group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13464
13561
|
className
|
|
13465
13562
|
),
|
|
13466
13563
|
"data-slot": "product-card",
|
|
13467
13564
|
children: [
|
|
13468
|
-
/* @__PURE__ */
|
|
13565
|
+
/* @__PURE__ */ jsx8("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx8(
|
|
13469
13566
|
"img",
|
|
13470
13567
|
{
|
|
13471
13568
|
src: image.url,
|
|
@@ -13473,14 +13570,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13473
13570
|
loading: "lazy",
|
|
13474
13571
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13475
13572
|
}
|
|
13476
|
-
) : /* @__PURE__ */
|
|
13477
|
-
/* @__PURE__ */
|
|
13478
|
-
product.category && /* @__PURE__ */
|
|
13479
|
-
/* @__PURE__ */
|
|
13480
|
-
product.shortDescription && /* @__PURE__ */
|
|
13481
|
-
/* @__PURE__ */
|
|
13482
|
-
/* @__PURE__ */
|
|
13483
|
-
hasDiscount && /* @__PURE__ */
|
|
13573
|
+
) : /* @__PURE__ */ jsx8("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13574
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13575
|
+
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 }),
|
|
13576
|
+
/* @__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 }),
|
|
13577
|
+
product.shortDescription && /* @__PURE__ */ jsx8("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13578
|
+
/* @__PURE__ */ jsxs7("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13579
|
+
/* @__PURE__ */ jsx8("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13580
|
+
hasDiscount && /* @__PURE__ */ jsx8("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13484
13581
|
] })
|
|
13485
13582
|
] })
|
|
13486
13583
|
]
|
|
@@ -13682,8 +13779,8 @@ var __iconNode8 = [
|
|
|
13682
13779
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13683
13780
|
|
|
13684
13781
|
// src/components/product-trust-items.tsx
|
|
13685
|
-
import { cn as
|
|
13686
|
-
import { jsx as
|
|
13782
|
+
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13783
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13687
13784
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13688
13785
|
shipping: Truck,
|
|
13689
13786
|
returns: RotateCcw,
|
|
@@ -13717,17 +13814,17 @@ function ProductTrustItems({
|
|
|
13717
13814
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13718
13815
|
});
|
|
13719
13816
|
if (rows.length === 0) return null;
|
|
13720
|
-
return /* @__PURE__ */
|
|
13721
|
-
/* @__PURE__ */
|
|
13722
|
-
/* @__PURE__ */
|
|
13817
|
+
return /* @__PURE__ */ jsx9(List, { "data-slot": "product-trust-items", className: cn9("space-y-2.5", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs8("li", { className: cn9("flex items-center gap-3 text-sm text-muted-foreground", itemClassName), children: [
|
|
13818
|
+
/* @__PURE__ */ jsx9(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13819
|
+
/* @__PURE__ */ jsx9("span", { children: text3 })
|
|
13723
13820
|
] }, key2)) });
|
|
13724
13821
|
}
|
|
13725
13822
|
|
|
13726
13823
|
// src/components/faq-accordion.tsx
|
|
13727
|
-
import { cn as
|
|
13824
|
+
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
13728
13825
|
|
|
13729
13826
|
// src/components/_heading.tsx
|
|
13730
|
-
import { jsx as
|
|
13827
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
13731
13828
|
function nextHeadingLevel(level) {
|
|
13732
13829
|
return Math.min(level + 1, 6);
|
|
13733
13830
|
}
|
|
@@ -13737,11 +13834,11 @@ function Heading({
|
|
|
13737
13834
|
children: children2
|
|
13738
13835
|
}) {
|
|
13739
13836
|
const Tag = `h${level}`;
|
|
13740
|
-
return /* @__PURE__ */
|
|
13837
|
+
return /* @__PURE__ */ jsx10(Tag, { className, children: children2 });
|
|
13741
13838
|
}
|
|
13742
13839
|
|
|
13743
13840
|
// src/components/faq-accordion.tsx
|
|
13744
|
-
import { jsx as
|
|
13841
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13745
13842
|
function FaqAccordion({
|
|
13746
13843
|
items,
|
|
13747
13844
|
heading,
|
|
@@ -13752,18 +13849,18 @@ function FaqAccordion({
|
|
|
13752
13849
|
}) {
|
|
13753
13850
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13754
13851
|
if (visible.length === 0) return null;
|
|
13755
|
-
return /* @__PURE__ */
|
|
13756
|
-
heading && /* @__PURE__ */
|
|
13757
|
-
/* @__PURE__ */
|
|
13852
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn10("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
13853
|
+
heading && /* @__PURE__ */ jsx11(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
13854
|
+
/* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs9(
|
|
13758
13855
|
"details",
|
|
13759
13856
|
{
|
|
13760
13857
|
className: "group px-4",
|
|
13761
13858
|
"data-slot": "faq-item",
|
|
13762
13859
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13763
13860
|
children: [
|
|
13764
|
-
/* @__PURE__ */
|
|
13765
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
13766
|
-
/* @__PURE__ */
|
|
13861
|
+
/* @__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: [
|
|
13862
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx11(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx11("span", { children: item.q }),
|
|
13863
|
+
/* @__PURE__ */ jsx11(
|
|
13767
13864
|
"span",
|
|
13768
13865
|
{
|
|
13769
13866
|
"aria-hidden": "true",
|
|
@@ -13772,7 +13869,7 @@ function FaqAccordion({
|
|
|
13772
13869
|
}
|
|
13773
13870
|
)
|
|
13774
13871
|
] }),
|
|
13775
|
-
/* @__PURE__ */
|
|
13872
|
+
/* @__PURE__ */ jsx11("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
13776
13873
|
]
|
|
13777
13874
|
},
|
|
13778
13875
|
index
|
|
@@ -13781,40 +13878,40 @@ function FaqAccordion({
|
|
|
13781
13878
|
}
|
|
13782
13879
|
|
|
13783
13880
|
// src/components/page-blocks.tsx
|
|
13784
|
-
import { cn as
|
|
13881
|
+
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
13785
13882
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
13786
|
-
import { jsx as
|
|
13883
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13787
13884
|
var ALIASES = {
|
|
13788
13885
|
doctor_embed: "profile_embed",
|
|
13789
13886
|
specialty_embed: "page_embed"
|
|
13790
13887
|
};
|
|
13791
13888
|
function HeroBlock({ block, headingLevel }) {
|
|
13792
13889
|
const { title, subtitle, imageUrl } = block.data;
|
|
13793
|
-
return /* @__PURE__ */
|
|
13794
|
-
/* @__PURE__ */
|
|
13795
|
-
subtitle && /* @__PURE__ */
|
|
13796
|
-
imageUrl && /* @__PURE__ */
|
|
13890
|
+
return /* @__PURE__ */ jsxs10("div", { className: "space-y-4", children: [
|
|
13891
|
+
/* @__PURE__ */ jsx12(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
13892
|
+
subtitle && /* @__PURE__ */ jsx12("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
13893
|
+
imageUrl && /* @__PURE__ */ jsx12("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx12("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
13797
13894
|
] });
|
|
13798
13895
|
}
|
|
13799
13896
|
function RichtextBlock({ block, headingLevel }) {
|
|
13800
|
-
return /* @__PURE__ */
|
|
13897
|
+
return /* @__PURE__ */ jsx12(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
13801
13898
|
}
|
|
13802
13899
|
function FaqBlock({ block }) {
|
|
13803
|
-
return /* @__PURE__ */
|
|
13900
|
+
return /* @__PURE__ */ jsx12(FaqAccordion, { items: block.data.items });
|
|
13804
13901
|
}
|
|
13805
13902
|
function StatsBlock({ block }) {
|
|
13806
|
-
return /* @__PURE__ */
|
|
13807
|
-
/* @__PURE__ */
|
|
13808
|
-
/* @__PURE__ */
|
|
13903
|
+
return /* @__PURE__ */ jsx12("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs10("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
13904
|
+
/* @__PURE__ */ jsx12("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
13905
|
+
/* @__PURE__ */ jsx12("dd", { className: "text-3xl font-bold", children: item.value })
|
|
13809
13906
|
] }, i)) });
|
|
13810
13907
|
}
|
|
13811
13908
|
function TestimonialBlock({ block }) {
|
|
13812
13909
|
const { quote, author, role, avatarUrl } = block.data;
|
|
13813
|
-
return /* @__PURE__ */
|
|
13814
|
-
/* @__PURE__ */
|
|
13815
|
-
/* @__PURE__ */
|
|
13910
|
+
return /* @__PURE__ */ jsxs10("figure", { className: "space-y-4", children: [
|
|
13911
|
+
/* @__PURE__ */ jsx12("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx12("p", { children: quote }) }),
|
|
13912
|
+
/* @__PURE__ */ jsxs10("figcaption", { className: "flex items-center gap-3", children: [
|
|
13816
13913
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
13817
|
-
/* @__PURE__ */
|
|
13914
|
+
/* @__PURE__ */ jsx12(
|
|
13818
13915
|
"img",
|
|
13819
13916
|
{
|
|
13820
13917
|
src: avatarUrl,
|
|
@@ -13823,9 +13920,9 @@ function TestimonialBlock({ block }) {
|
|
|
13823
13920
|
className: "h-10 w-10 rounded-full object-cover"
|
|
13824
13921
|
}
|
|
13825
13922
|
),
|
|
13826
|
-
/* @__PURE__ */
|
|
13827
|
-
/* @__PURE__ */
|
|
13828
|
-
role && /* @__PURE__ */
|
|
13923
|
+
/* @__PURE__ */ jsxs10("span", { children: [
|
|
13924
|
+
/* @__PURE__ */ jsx12("span", { className: "font-semibold", children: author }),
|
|
13925
|
+
role && /* @__PURE__ */ jsx12("span", { className: "block text-sm opacity-80", children: role })
|
|
13829
13926
|
] })
|
|
13830
13927
|
] })
|
|
13831
13928
|
] });
|
|
@@ -13834,19 +13931,19 @@ function CtaSlotBlock(_props) {
|
|
|
13834
13931
|
return null;
|
|
13835
13932
|
}
|
|
13836
13933
|
function FeatureListBlock({ block }) {
|
|
13837
|
-
return /* @__PURE__ */
|
|
13934
|
+
return /* @__PURE__ */ jsx12("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx12("li", { children: item.text }, i)) });
|
|
13838
13935
|
}
|
|
13839
13936
|
function GalleryBlock({ block }) {
|
|
13840
13937
|
const { images } = block.data;
|
|
13841
|
-
return /* @__PURE__ */
|
|
13938
|
+
return /* @__PURE__ */ jsx12(
|
|
13842
13939
|
"div",
|
|
13843
13940
|
{
|
|
13844
|
-
className:
|
|
13941
|
+
className: cn11(
|
|
13845
13942
|
"grid gap-4",
|
|
13846
13943
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
13847
13944
|
),
|
|
13848
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
13849
|
-
/* @__PURE__ */
|
|
13945
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs10("figure", { className: "space-y-1", children: [
|
|
13946
|
+
/* @__PURE__ */ jsx12("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx12(
|
|
13850
13947
|
"img",
|
|
13851
13948
|
{
|
|
13852
13949
|
src: img.url,
|
|
@@ -13855,7 +13952,7 @@ function GalleryBlock({ block }) {
|
|
|
13855
13952
|
className: "h-full w-full object-cover"
|
|
13856
13953
|
}
|
|
13857
13954
|
) }),
|
|
13858
|
-
img.caption && /* @__PURE__ */
|
|
13955
|
+
img.caption && /* @__PURE__ */ jsx12("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
13859
13956
|
] }, `${img.url}-${i}`))
|
|
13860
13957
|
}
|
|
13861
13958
|
);
|
|
@@ -13865,13 +13962,13 @@ function EmbedCard({
|
|
|
13865
13962
|
headingLevel,
|
|
13866
13963
|
embedHref
|
|
13867
13964
|
}) {
|
|
13868
|
-
return /* @__PURE__ */
|
|
13965
|
+
return /* @__PURE__ */ jsxs10(
|
|
13869
13966
|
"a",
|
|
13870
13967
|
{
|
|
13871
13968
|
href: embedHref(resolved),
|
|
13872
13969
|
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",
|
|
13873
13970
|
children: [
|
|
13874
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
13971
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx12("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx12(
|
|
13875
13972
|
"img",
|
|
13876
13973
|
{
|
|
13877
13974
|
src: resolved.coverImageUrl,
|
|
@@ -13880,24 +13977,24 @@ function EmbedCard({
|
|
|
13880
13977
|
className: "h-full w-full object-cover"
|
|
13881
13978
|
}
|
|
13882
13979
|
) }),
|
|
13883
|
-
/* @__PURE__ */
|
|
13884
|
-
/* @__PURE__ */
|
|
13885
|
-
resolved.role && /* @__PURE__ */
|
|
13886
|
-
resolved.excerpt && /* @__PURE__ */
|
|
13980
|
+
/* @__PURE__ */ jsxs10("div", { className: "space-y-1 p-4", children: [
|
|
13981
|
+
/* @__PURE__ */ jsx12(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
13982
|
+
resolved.role && /* @__PURE__ */ jsx12("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
13983
|
+
resolved.excerpt && /* @__PURE__ */ jsx12("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
13887
13984
|
] })
|
|
13888
13985
|
]
|
|
13889
13986
|
}
|
|
13890
13987
|
);
|
|
13891
13988
|
}
|
|
13892
13989
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
13893
|
-
return /* @__PURE__ */
|
|
13990
|
+
return /* @__PURE__ */ jsx12(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13894
13991
|
}
|
|
13895
13992
|
function ProfileEmbedBlock({
|
|
13896
13993
|
block,
|
|
13897
13994
|
headingLevel,
|
|
13898
13995
|
embedHref
|
|
13899
13996
|
}) {
|
|
13900
|
-
return /* @__PURE__ */
|
|
13997
|
+
return /* @__PURE__ */ jsx12(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13901
13998
|
}
|
|
13902
13999
|
var DEFAULT_RENDERERS = {
|
|
13903
14000
|
hero: HeroBlock,
|
|
@@ -13954,14 +14051,14 @@ function toIdFragment(value) {
|
|
|
13954
14051
|
function SectionCta2({ cta }) {
|
|
13955
14052
|
if (!hasUsableCta(cta)) return null;
|
|
13956
14053
|
const variant = toButtonVariant(cta.variant);
|
|
13957
|
-
return /* @__PURE__ */
|
|
14054
|
+
return /* @__PURE__ */ jsx12("div", { className: "pt-2", children: /* @__PURE__ */ jsx12(
|
|
13958
14055
|
"a",
|
|
13959
14056
|
{
|
|
13960
14057
|
href: cta.url,
|
|
13961
14058
|
"data-slot": "button",
|
|
13962
14059
|
"data-variant": variant,
|
|
13963
14060
|
"data-size": "default",
|
|
13964
|
-
className:
|
|
14061
|
+
className: cn11(buttonVariants2({ variant, size: "default" })),
|
|
13965
14062
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13966
14063
|
children: cta.label
|
|
13967
14064
|
}
|
|
@@ -13987,17 +14084,17 @@ function PageBlocks({
|
|
|
13987
14084
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
13988
14085
|
const background = block.backgroundColor;
|
|
13989
14086
|
return [
|
|
13990
|
-
/* @__PURE__ */
|
|
14087
|
+
/* @__PURE__ */ jsxs10(
|
|
13991
14088
|
"section",
|
|
13992
14089
|
{
|
|
13993
14090
|
"data-slot": "page-block",
|
|
13994
14091
|
"data-block-type": type,
|
|
13995
14092
|
"aria-labelledby": headingId,
|
|
13996
14093
|
style: surfaceStyle(background),
|
|
13997
|
-
className:
|
|
14094
|
+
className: cn11("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
13998
14095
|
children: [
|
|
13999
|
-
block.heading && /* @__PURE__ */
|
|
14000
|
-
/* @__PURE__ */
|
|
14096
|
+
block.heading && /* @__PURE__ */ jsx12(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx12("span", { id: headingId, children: block.heading }) }),
|
|
14097
|
+
/* @__PURE__ */ jsx12(
|
|
14001
14098
|
Renderer,
|
|
14002
14099
|
{
|
|
14003
14100
|
block,
|
|
@@ -14005,7 +14102,7 @@ function PageBlocks({
|
|
|
14005
14102
|
embedHref
|
|
14006
14103
|
}
|
|
14007
14104
|
),
|
|
14008
|
-
/* @__PURE__ */
|
|
14105
|
+
/* @__PURE__ */ jsx12(SectionCta2, { cta: block.cta })
|
|
14009
14106
|
]
|
|
14010
14107
|
},
|
|
14011
14108
|
block.id
|
|
@@ -14013,12 +14110,12 @@ function PageBlocks({
|
|
|
14013
14110
|
];
|
|
14014
14111
|
});
|
|
14015
14112
|
if (sections.length === 0) return null;
|
|
14016
|
-
return /* @__PURE__ */
|
|
14113
|
+
return /* @__PURE__ */ jsx12("div", { className: cn11("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14017
14114
|
}
|
|
14018
14115
|
|
|
14019
14116
|
// src/components/shop-filters.tsx
|
|
14020
|
-
import { cn as
|
|
14021
|
-
import { jsx as
|
|
14117
|
+
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14118
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
14022
14119
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14023
14120
|
{ max: 2500 },
|
|
14024
14121
|
{ min: 2500, max: 5e3 },
|
|
@@ -14062,7 +14159,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14062
14159
|
return "";
|
|
14063
14160
|
}
|
|
14064
14161
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14065
|
-
return /* @__PURE__ */
|
|
14162
|
+
return /* @__PURE__ */ jsx13(
|
|
14066
14163
|
"a",
|
|
14067
14164
|
{
|
|
14068
14165
|
href,
|
|
@@ -14071,7 +14168,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14071
14168
|
event.preventDefault();
|
|
14072
14169
|
onActivate();
|
|
14073
14170
|
} : void 0,
|
|
14074
|
-
className:
|
|
14171
|
+
className: cn12(
|
|
14075
14172
|
"inline-flex items-center rounded-full border px-3 py-1 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
14076
14173
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
14077
14174
|
),
|
|
@@ -14080,9 +14177,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14080
14177
|
);
|
|
14081
14178
|
}
|
|
14082
14179
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14083
|
-
return /* @__PURE__ */
|
|
14084
|
-
/* @__PURE__ */
|
|
14085
|
-
/* @__PURE__ */
|
|
14180
|
+
return /* @__PURE__ */ jsxs11("fieldset", { className: "space-y-2", children: [
|
|
14181
|
+
/* @__PURE__ */ jsx13("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14182
|
+
/* @__PURE__ */ jsx13("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14086
14183
|
] });
|
|
14087
14184
|
}
|
|
14088
14185
|
function ShopFilters({
|
|
@@ -14105,11 +14202,11 @@ function ShopFilters({
|
|
|
14105
14202
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14106
14203
|
return null;
|
|
14107
14204
|
}
|
|
14108
|
-
return /* @__PURE__ */
|
|
14205
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn12("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14109
14206
|
visibleTaxonomies.map((axis) => {
|
|
14110
14207
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14111
|
-
return /* @__PURE__ */
|
|
14112
|
-
/* @__PURE__ */
|
|
14208
|
+
return /* @__PURE__ */ jsxs11(FilterFieldset, { legend: axis.label, children: [
|
|
14209
|
+
/* @__PURE__ */ jsx13(
|
|
14113
14210
|
OptionLink,
|
|
14114
14211
|
{
|
|
14115
14212
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14124,7 +14221,7 @@ function ShopFilters({
|
|
|
14124
14221
|
),
|
|
14125
14222
|
axis.terms.map((term) => {
|
|
14126
14223
|
const isActive = activeSlug === term.slug;
|
|
14127
|
-
return /* @__PURE__ */
|
|
14224
|
+
return /* @__PURE__ */ jsx13(
|
|
14128
14225
|
OptionLink,
|
|
14129
14226
|
{
|
|
14130
14227
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14144,9 +14241,9 @@ function ShopFilters({
|
|
|
14144
14241
|
}),
|
|
14145
14242
|
visibleAttributes.map((attr) => {
|
|
14146
14243
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14147
|
-
return /* @__PURE__ */
|
|
14244
|
+
return /* @__PURE__ */ jsx13(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14148
14245
|
const isActive = activeValues.includes(opt.value);
|
|
14149
|
-
return /* @__PURE__ */
|
|
14246
|
+
return /* @__PURE__ */ jsx13(
|
|
14150
14247
|
OptionLink,
|
|
14151
14248
|
{
|
|
14152
14249
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14164,11 +14261,11 @@ function ShopFilters({
|
|
|
14164
14261
|
);
|
|
14165
14262
|
}) }, attr.key);
|
|
14166
14263
|
}),
|
|
14167
|
-
showPriceGroup && /* @__PURE__ */
|
|
14264
|
+
showPriceGroup && /* @__PURE__ */ jsx13(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14168
14265
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14169
14266
|
const nextMin = isActive ? void 0 : band.min;
|
|
14170
14267
|
const nextMax = isActive ? void 0 : band.max;
|
|
14171
|
-
return /* @__PURE__ */
|
|
14268
|
+
return /* @__PURE__ */ jsx13(
|
|
14172
14269
|
OptionLink,
|
|
14173
14270
|
{
|
|
14174
14271
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14179,7 +14276,7 @@ function ShopFilters({
|
|
|
14179
14276
|
i
|
|
14180
14277
|
);
|
|
14181
14278
|
}) }),
|
|
14182
|
-
hasOnSale && /* @__PURE__ */
|
|
14279
|
+
hasOnSale && /* @__PURE__ */ jsx13(
|
|
14183
14280
|
OptionLink,
|
|
14184
14281
|
{
|
|
14185
14282
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14188,7 +14285,7 @@ function ShopFilters({
|
|
|
14188
14285
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14189
14286
|
}
|
|
14190
14287
|
),
|
|
14191
|
-
/* @__PURE__ */
|
|
14288
|
+
/* @__PURE__ */ jsx13(
|
|
14192
14289
|
"a",
|
|
14193
14290
|
{
|
|
14194
14291
|
href: hrefs.clearAll(),
|
|
@@ -14204,8 +14301,8 @@ function ShopFilters({
|
|
|
14204
14301
|
}
|
|
14205
14302
|
|
|
14206
14303
|
// src/components/cart-line-list.tsx
|
|
14207
|
-
import { cn as
|
|
14208
|
-
import { jsx as
|
|
14304
|
+
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14305
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14209
14306
|
var DEFAULT_LABELS2 = {
|
|
14210
14307
|
quantityLabel: "Cantidad",
|
|
14211
14308
|
decrease: "Reducir cantidad",
|
|
@@ -14223,6 +14320,7 @@ function CartLineList({
|
|
|
14223
14320
|
onRemove,
|
|
14224
14321
|
liveMessage,
|
|
14225
14322
|
notice,
|
|
14323
|
+
lineMessage,
|
|
14226
14324
|
labels,
|
|
14227
14325
|
currencyCode,
|
|
14228
14326
|
locale,
|
|
@@ -14230,9 +14328,9 @@ function CartLineList({
|
|
|
14230
14328
|
}) {
|
|
14231
14329
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14232
14330
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14233
|
-
return /* @__PURE__ */
|
|
14234
|
-
/* @__PURE__ */
|
|
14235
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14331
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn13("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14332
|
+
/* @__PURE__ */ jsx14("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14333
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx14(
|
|
14236
14334
|
"div",
|
|
14237
14335
|
{
|
|
14238
14336
|
role: "status",
|
|
@@ -14241,32 +14339,33 @@ function CartLineList({
|
|
|
14241
14339
|
children: noticeContent
|
|
14242
14340
|
}
|
|
14243
14341
|
),
|
|
14244
|
-
/* @__PURE__ */
|
|
14342
|
+
/* @__PURE__ */ jsx14("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14245
14343
|
const maxQty = item.maxStock ?? Infinity;
|
|
14246
14344
|
const atMax = item.quantity >= maxQty;
|
|
14247
14345
|
const atMin = item.quantity <= 1;
|
|
14248
|
-
|
|
14346
|
+
const message = lineMessage?.(item);
|
|
14347
|
+
return /* @__PURE__ */ jsxs12(
|
|
14249
14348
|
"li",
|
|
14250
14349
|
{
|
|
14251
14350
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14252
14351
|
children: [
|
|
14253
|
-
/* @__PURE__ */
|
|
14254
|
-
/* @__PURE__ */
|
|
14255
|
-
/* @__PURE__ */
|
|
14256
|
-
item.variantName && /* @__PURE__ */
|
|
14257
|
-
/* @__PURE__ */
|
|
14352
|
+
/* @__PURE__ */ jsx14("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx14("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14353
|
+
/* @__PURE__ */ jsxs12("div", { className: "min-w-0 flex-1", children: [
|
|
14354
|
+
/* @__PURE__ */ jsx14("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14355
|
+
item.variantName && /* @__PURE__ */ jsx14("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14356
|
+
/* @__PURE__ */ jsxs12("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14258
14357
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14259
14358
|
" ",
|
|
14260
14359
|
t.unitPriceSuffix
|
|
14261
14360
|
] }),
|
|
14262
|
-
/* @__PURE__ */
|
|
14361
|
+
/* @__PURE__ */ jsxs12(
|
|
14263
14362
|
"div",
|
|
14264
14363
|
{
|
|
14265
14364
|
role: "group",
|
|
14266
14365
|
"aria-label": t.quantityLabel,
|
|
14267
14366
|
className: "mt-3 flex items-center gap-3",
|
|
14268
14367
|
children: [
|
|
14269
|
-
/* @__PURE__ */
|
|
14368
|
+
/* @__PURE__ */ jsx14(
|
|
14270
14369
|
"button",
|
|
14271
14370
|
{
|
|
14272
14371
|
type: "button",
|
|
@@ -14277,8 +14376,8 @@ function CartLineList({
|
|
|
14277
14376
|
children: "\u2212"
|
|
14278
14377
|
}
|
|
14279
14378
|
),
|
|
14280
|
-
/* @__PURE__ */
|
|
14281
|
-
/* @__PURE__ */
|
|
14379
|
+
/* @__PURE__ */ jsx14("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14380
|
+
/* @__PURE__ */ jsx14(
|
|
14282
14381
|
"button",
|
|
14283
14382
|
{
|
|
14284
14383
|
type: "button",
|
|
@@ -14289,7 +14388,7 @@ function CartLineList({
|
|
|
14289
14388
|
children: "+"
|
|
14290
14389
|
}
|
|
14291
14390
|
),
|
|
14292
|
-
onRemove && /* @__PURE__ */
|
|
14391
|
+
onRemove && /* @__PURE__ */ jsx14(
|
|
14293
14392
|
"button",
|
|
14294
14393
|
{
|
|
14295
14394
|
type: "button",
|
|
@@ -14301,9 +14400,17 @@ function CartLineList({
|
|
|
14301
14400
|
)
|
|
14302
14401
|
]
|
|
14303
14402
|
}
|
|
14403
|
+
),
|
|
14404
|
+
message != null && message !== false && /* @__PURE__ */ jsx14(
|
|
14405
|
+
"p",
|
|
14406
|
+
{
|
|
14407
|
+
className: "mt-2 text-sm text-destructive",
|
|
14408
|
+
"data-slot": "cart-line-list-line-message",
|
|
14409
|
+
children: message
|
|
14410
|
+
}
|
|
14304
14411
|
)
|
|
14305
14412
|
] }),
|
|
14306
|
-
/* @__PURE__ */
|
|
14413
|
+
/* @__PURE__ */ jsx14("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx14("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14307
14414
|
]
|
|
14308
14415
|
},
|
|
14309
14416
|
lineKey(item.productId, item.variantId)
|
|
@@ -14313,8 +14420,8 @@ function CartLineList({
|
|
|
14313
14420
|
}
|
|
14314
14421
|
|
|
14315
14422
|
// src/components/cart-summary.tsx
|
|
14316
|
-
import { cn as
|
|
14317
|
-
import { jsx as
|
|
14423
|
+
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14424
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14318
14425
|
var DEFAULT_LABELS3 = {
|
|
14319
14426
|
subtotal: "Subtotal",
|
|
14320
14427
|
discountPrefix: "Descuento",
|
|
@@ -14341,40 +14448,40 @@ function CartSummary({
|
|
|
14341
14448
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14342
14449
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14343
14450
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14344
|
-
const breakdown = /* @__PURE__ */
|
|
14451
|
+
const breakdown = /* @__PURE__ */ jsxs13(
|
|
14345
14452
|
"dl",
|
|
14346
14453
|
{
|
|
14347
|
-
className:
|
|
14454
|
+
className: cn14("space-y-2 text-sm", !hasNotice && className),
|
|
14348
14455
|
"data-slot": "cart-summary",
|
|
14349
14456
|
children: [
|
|
14350
|
-
/* @__PURE__ */
|
|
14351
|
-
/* @__PURE__ */
|
|
14352
|
-
/* @__PURE__ */
|
|
14457
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14458
|
+
/* @__PURE__ */ jsx15("dt", { children: t.subtotal }),
|
|
14459
|
+
/* @__PURE__ */ jsx15("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14353
14460
|
] }),
|
|
14354
|
-
hasDiscount && /* @__PURE__ */
|
|
14355
|
-
/* @__PURE__ */
|
|
14461
|
+
hasDiscount && /* @__PURE__ */ jsxs13("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14462
|
+
/* @__PURE__ */ jsxs13("dt", { children: [
|
|
14356
14463
|
t.discountPrefix,
|
|
14357
14464
|
discountCode ? ` (${discountCode})` : ""
|
|
14358
14465
|
] }),
|
|
14359
|
-
/* @__PURE__ */
|
|
14466
|
+
/* @__PURE__ */ jsxs13("dd", { children: [
|
|
14360
14467
|
"-",
|
|
14361
14468
|
formatPrice(discount, currencyCode, locale)
|
|
14362
14469
|
] })
|
|
14363
14470
|
] }),
|
|
14364
|
-
shippingEnabled && /* @__PURE__ */
|
|
14365
|
-
/* @__PURE__ */
|
|
14366
|
-
/* @__PURE__ */
|
|
14471
|
+
shippingEnabled && /* @__PURE__ */ jsxs13("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14472
|
+
/* @__PURE__ */ jsx15("dt", { children: t.shipping }),
|
|
14473
|
+
/* @__PURE__ */ jsx15("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14367
14474
|
] }),
|
|
14368
|
-
/* @__PURE__ */
|
|
14369
|
-
/* @__PURE__ */
|
|
14370
|
-
/* @__PURE__ */
|
|
14475
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14476
|
+
/* @__PURE__ */ jsx15("dt", { children: t.total }),
|
|
14477
|
+
/* @__PURE__ */ jsx15("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14371
14478
|
] })
|
|
14372
14479
|
]
|
|
14373
14480
|
}
|
|
14374
14481
|
);
|
|
14375
14482
|
if (!hasNotice) return breakdown;
|
|
14376
|
-
return /* @__PURE__ */
|
|
14377
|
-
/* @__PURE__ */
|
|
14483
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn14("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14484
|
+
/* @__PURE__ */ jsx15(
|
|
14378
14485
|
"div",
|
|
14379
14486
|
{
|
|
14380
14487
|
role: "status",
|
|
@@ -14387,10 +14494,57 @@ function CartSummary({
|
|
|
14387
14494
|
] });
|
|
14388
14495
|
}
|
|
14389
14496
|
|
|
14390
|
-
// src/components/
|
|
14391
|
-
import { cn as
|
|
14392
|
-
import { jsx as
|
|
14497
|
+
// src/components/cart-adjustments-notice.tsx
|
|
14498
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14499
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
14393
14500
|
var DEFAULT_LABELS4 = {
|
|
14501
|
+
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.`,
|
|
14502
|
+
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
14503
|
+
priceChanged: (name, from, to) => `El precio de ${name} ha cambiado: antes ${from}, ahora ${to}.`
|
|
14504
|
+
};
|
|
14505
|
+
function displayName(line) {
|
|
14506
|
+
return line.variantName ? `${line.name} (${line.variantName})` : line.name;
|
|
14507
|
+
}
|
|
14508
|
+
function CartAdjustmentsNotice({
|
|
14509
|
+
removed = [],
|
|
14510
|
+
quantityChanges = [],
|
|
14511
|
+
priceChanges = [],
|
|
14512
|
+
labels,
|
|
14513
|
+
currencyCode,
|
|
14514
|
+
locale,
|
|
14515
|
+
className
|
|
14516
|
+
}) {
|
|
14517
|
+
const t = { ...DEFAULT_LABELS4, ...labels };
|
|
14518
|
+
const messages = [];
|
|
14519
|
+
if (removed.length > 0) messages.push(t.removed(removed.map(displayName)));
|
|
14520
|
+
for (const change of quantityChanges) {
|
|
14521
|
+
messages.push(t.quantityChanged(displayName(change), change.to));
|
|
14522
|
+
}
|
|
14523
|
+
for (const change of priceChanges) {
|
|
14524
|
+
messages.push(
|
|
14525
|
+
t.priceChanged(
|
|
14526
|
+
displayName(change),
|
|
14527
|
+
formatPrice(change.from, currencyCode, locale),
|
|
14528
|
+
formatPrice(change.to, currencyCode, locale)
|
|
14529
|
+
)
|
|
14530
|
+
);
|
|
14531
|
+
}
|
|
14532
|
+
if (messages.length === 0) return null;
|
|
14533
|
+
return /* @__PURE__ */ jsx16(
|
|
14534
|
+
"div",
|
|
14535
|
+
{
|
|
14536
|
+
role: "status",
|
|
14537
|
+
className: cn15("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
14538
|
+
"data-slot": "cart-adjustments-notice",
|
|
14539
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx16("p", { children: messages[0] }) : /* @__PURE__ */ jsx16("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx16("li", { children: message }, index)) })
|
|
14540
|
+
}
|
|
14541
|
+
);
|
|
14542
|
+
}
|
|
14543
|
+
|
|
14544
|
+
// src/components/added-to-cart-toast.tsx
|
|
14545
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14546
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14547
|
+
var DEFAULT_LABELS5 = {
|
|
14394
14548
|
success: "A\xF1adido al carrito",
|
|
14395
14549
|
error: "No se pudo a\xF1adir al carrito",
|
|
14396
14550
|
outOfStock: "Producto agotado",
|
|
@@ -14405,16 +14559,16 @@ function AddedToCartToast({
|
|
|
14405
14559
|
labels,
|
|
14406
14560
|
className
|
|
14407
14561
|
}) {
|
|
14408
|
-
const t = { ...
|
|
14562
|
+
const t = { ...DEFAULT_LABELS5, ...labels };
|
|
14409
14563
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14410
14564
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14411
14565
|
const variant = status === "success" ? "success" : "error";
|
|
14412
|
-
return /* @__PURE__ */
|
|
14566
|
+
return /* @__PURE__ */ jsxs14(
|
|
14413
14567
|
"div",
|
|
14414
14568
|
{
|
|
14415
14569
|
"data-slot": "added-to-cart-toast",
|
|
14416
14570
|
"data-variant": variant,
|
|
14417
|
-
className:
|
|
14571
|
+
className: cn16(
|
|
14418
14572
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14419
14573
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14420
14574
|
variant === "error" && "border-destructive/30",
|
|
@@ -14422,21 +14576,21 @@ function AddedToCartToast({
|
|
|
14422
14576
|
),
|
|
14423
14577
|
children: [
|
|
14424
14578
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14425
|
-
/* @__PURE__ */
|
|
14426
|
-
/* @__PURE__ */
|
|
14427
|
-
/* @__PURE__ */
|
|
14428
|
-
/* @__PURE__ */
|
|
14579
|
+
/* @__PURE__ */ jsx17("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14580
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
14581
|
+
/* @__PURE__ */ jsx17("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14582
|
+
/* @__PURE__ */ jsx17("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14429
14583
|
] }),
|
|
14430
|
-
/* @__PURE__ */
|
|
14584
|
+
/* @__PURE__ */ jsx17("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx17("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14431
14585
|
]
|
|
14432
14586
|
}
|
|
14433
14587
|
);
|
|
14434
14588
|
}
|
|
14435
14589
|
|
|
14436
14590
|
// src/components/checkout-login-prompt.tsx
|
|
14437
|
-
import { cn as
|
|
14438
|
-
import { Fragment as Fragment3, jsx as
|
|
14439
|
-
var
|
|
14591
|
+
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
14592
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14593
|
+
var DEFAULT_LABELS6 = {
|
|
14440
14594
|
title: "Identificaci\xF3n",
|
|
14441
14595
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
14442
14596
|
emailLabel: "Email",
|
|
@@ -14460,28 +14614,28 @@ function CheckoutLoginPrompt({
|
|
|
14460
14614
|
className
|
|
14461
14615
|
}) {
|
|
14462
14616
|
if (!open) return null;
|
|
14463
|
-
const t = { ...
|
|
14617
|
+
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
14464
14618
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14465
|
-
return /* @__PURE__ */
|
|
14466
|
-
/* @__PURE__ */
|
|
14467
|
-
/* @__PURE__ */
|
|
14619
|
+
return /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
14620
|
+
/* @__PURE__ */ jsx18("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14621
|
+
/* @__PURE__ */ jsxs15(
|
|
14468
14622
|
"div",
|
|
14469
14623
|
{
|
|
14470
14624
|
role: "dialog",
|
|
14471
14625
|
"aria-modal": "true",
|
|
14472
14626
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14473
14627
|
"data-slot": "checkout-login-prompt",
|
|
14474
|
-
className:
|
|
14628
|
+
className: cn17(
|
|
14475
14629
|
"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",
|
|
14476
14630
|
className
|
|
14477
14631
|
),
|
|
14478
14632
|
children: [
|
|
14479
|
-
/* @__PURE__ */
|
|
14480
|
-
/* @__PURE__ */
|
|
14481
|
-
/* @__PURE__ */
|
|
14482
|
-
/* @__PURE__ */
|
|
14633
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14634
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
14635
|
+
/* @__PURE__ */ jsx18("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14636
|
+
/* @__PURE__ */ jsx18("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14483
14637
|
] }),
|
|
14484
|
-
/* @__PURE__ */
|
|
14638
|
+
/* @__PURE__ */ jsx18(
|
|
14485
14639
|
"button",
|
|
14486
14640
|
{
|
|
14487
14641
|
type: "button",
|
|
@@ -14492,9 +14646,9 @@ function CheckoutLoginPrompt({
|
|
|
14492
14646
|
}
|
|
14493
14647
|
)
|
|
14494
14648
|
] }),
|
|
14495
|
-
/* @__PURE__ */
|
|
14496
|
-
/* @__PURE__ */
|
|
14497
|
-
/* @__PURE__ */
|
|
14649
|
+
/* @__PURE__ */ jsxs15("div", { className: "space-y-2", children: [
|
|
14650
|
+
/* @__PURE__ */ jsx18("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14651
|
+
/* @__PURE__ */ jsx18(
|
|
14498
14652
|
"input",
|
|
14499
14653
|
{
|
|
14500
14654
|
id: "checkout-login-prompt-email",
|
|
@@ -14503,29 +14657,29 @@ function CheckoutLoginPrompt({
|
|
|
14503
14657
|
value: email,
|
|
14504
14658
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14505
14659
|
placeholder: t.emailPlaceholder,
|
|
14506
|
-
className:
|
|
14660
|
+
className: cn17(
|
|
14507
14661
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14508
14662
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14509
14663
|
)
|
|
14510
14664
|
}
|
|
14511
14665
|
),
|
|
14512
|
-
error && /* @__PURE__ */
|
|
14666
|
+
error && /* @__PURE__ */ jsx18("p", { className: "text-xs text-destructive", children: error })
|
|
14513
14667
|
] }),
|
|
14514
|
-
/* @__PURE__ */
|
|
14515
|
-
/* @__PURE__ */
|
|
14668
|
+
/* @__PURE__ */ jsxs15("div", { className: "space-y-2", children: [
|
|
14669
|
+
/* @__PURE__ */ jsx18(
|
|
14516
14670
|
"button",
|
|
14517
14671
|
{
|
|
14518
14672
|
type: "button",
|
|
14519
14673
|
onClick: onSubmitEmail,
|
|
14520
14674
|
disabled: checking || !isValidEmail,
|
|
14521
|
-
className:
|
|
14675
|
+
className: cn17(
|
|
14522
14676
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14523
14677
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14524
14678
|
),
|
|
14525
14679
|
children: checking ? t.checking : t.continueWithEmail
|
|
14526
14680
|
}
|
|
14527
14681
|
),
|
|
14528
|
-
/* @__PURE__ */
|
|
14682
|
+
/* @__PURE__ */ jsx18(
|
|
14529
14683
|
"button",
|
|
14530
14684
|
{
|
|
14531
14685
|
type: "button",
|
|
@@ -14542,10 +14696,10 @@ function CheckoutLoginPrompt({
|
|
|
14542
14696
|
}
|
|
14543
14697
|
|
|
14544
14698
|
// src/components/checkout-form.tsx
|
|
14545
|
-
import { cn as
|
|
14699
|
+
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
14546
14700
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14547
|
-
import { Fragment as Fragment4, jsx as
|
|
14548
|
-
var
|
|
14701
|
+
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14702
|
+
var DEFAULT_LABELS7 = {
|
|
14549
14703
|
contactTitle: "Datos de contacto",
|
|
14550
14704
|
nameLabel: "Nombre completo",
|
|
14551
14705
|
namePlaceholder: "Tu nombre",
|
|
@@ -14584,7 +14738,7 @@ function CheckoutForm({
|
|
|
14584
14738
|
locale,
|
|
14585
14739
|
className
|
|
14586
14740
|
}) {
|
|
14587
|
-
const t = { ...
|
|
14741
|
+
const t = { ...DEFAULT_LABELS7, ...labels };
|
|
14588
14742
|
const details = checkoutError?.details;
|
|
14589
14743
|
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;
|
|
14590
14744
|
const phoneError = contactErrors?.phone ?? (rejectedPhone ? checkoutError.error : void 0);
|
|
@@ -14598,22 +14752,22 @@ function CheckoutForm({
|
|
|
14598
14752
|
event.preventDefault();
|
|
14599
14753
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14600
14754
|
}
|
|
14601
|
-
return /* @__PURE__ */
|
|
14755
|
+
return /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
14602
14756
|
loginPrompt,
|
|
14603
|
-
/* @__PURE__ */
|
|
14757
|
+
/* @__PURE__ */ jsxs16(
|
|
14604
14758
|
"form",
|
|
14605
14759
|
{
|
|
14606
14760
|
"data-testid": "checkout-form",
|
|
14607
14761
|
onSubmit,
|
|
14608
|
-
className:
|
|
14762
|
+
className: cn18("space-y-8", className),
|
|
14609
14763
|
"data-slot": "checkout-form",
|
|
14610
14764
|
children: [
|
|
14611
|
-
/* @__PURE__ */
|
|
14612
|
-
/* @__PURE__ */
|
|
14613
|
-
/* @__PURE__ */
|
|
14614
|
-
/* @__PURE__ */
|
|
14615
|
-
/* @__PURE__ */
|
|
14616
|
-
/* @__PURE__ */
|
|
14765
|
+
/* @__PURE__ */ jsxs16("section", { className: "space-y-4", children: [
|
|
14766
|
+
/* @__PURE__ */ jsx19("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
14767
|
+
/* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
14768
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
|
|
14769
|
+
/* @__PURE__ */ jsx19("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
14770
|
+
/* @__PURE__ */ jsx19(
|
|
14617
14771
|
"input",
|
|
14618
14772
|
{
|
|
14619
14773
|
id: "checkout-form-name",
|
|
@@ -14622,17 +14776,17 @@ function CheckoutForm({
|
|
|
14622
14776
|
value: contact.name,
|
|
14623
14777
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
14624
14778
|
placeholder: t.namePlaceholder,
|
|
14625
|
-
className:
|
|
14779
|
+
className: cn18(
|
|
14626
14780
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14627
14781
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
14628
14782
|
)
|
|
14629
14783
|
}
|
|
14630
14784
|
),
|
|
14631
|
-
contactErrors?.name && /* @__PURE__ */
|
|
14785
|
+
contactErrors?.name && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14632
14786
|
] }),
|
|
14633
|
-
/* @__PURE__ */
|
|
14634
|
-
/* @__PURE__ */
|
|
14635
|
-
/* @__PURE__ */
|
|
14787
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-1", children: [
|
|
14788
|
+
/* @__PURE__ */ jsx19("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14789
|
+
/* @__PURE__ */ jsx19(
|
|
14636
14790
|
"input",
|
|
14637
14791
|
{
|
|
14638
14792
|
id: "checkout-form-email",
|
|
@@ -14641,15 +14795,15 @@ function CheckoutForm({
|
|
|
14641
14795
|
value: contact.email,
|
|
14642
14796
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
14643
14797
|
placeholder: t.emailPlaceholder,
|
|
14644
|
-
className:
|
|
14798
|
+
className: cn18(
|
|
14645
14799
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14646
14800
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
14647
14801
|
)
|
|
14648
14802
|
}
|
|
14649
14803
|
),
|
|
14650
|
-
contactErrors?.email && /* @__PURE__ */
|
|
14804
|
+
contactErrors?.email && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
14651
14805
|
] }),
|
|
14652
|
-
/* @__PURE__ */
|
|
14806
|
+
/* @__PURE__ */ jsx19("div", { className: "space-y-1", children: /* @__PURE__ */ jsx19(
|
|
14653
14807
|
PhoneInput,
|
|
14654
14808
|
{
|
|
14655
14809
|
id: "checkout-form-phone",
|
|
@@ -14663,15 +14817,15 @@ function CheckoutForm({
|
|
|
14663
14817
|
] })
|
|
14664
14818
|
] }),
|
|
14665
14819
|
children2,
|
|
14666
|
-
generalError ? /* @__PURE__ */
|
|
14667
|
-
/* @__PURE__ */
|
|
14668
|
-
/* @__PURE__ */
|
|
14669
|
-
appliedDiscount ? /* @__PURE__ */
|
|
14670
|
-
/* @__PURE__ */
|
|
14671
|
-
/* @__PURE__ */
|
|
14672
|
-
/* @__PURE__ */
|
|
14820
|
+
generalError ? /* @__PURE__ */ jsx19("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
14821
|
+
/* @__PURE__ */ jsxs16("section", { className: "space-y-3", children: [
|
|
14822
|
+
/* @__PURE__ */ jsx19("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
14823
|
+
appliedDiscount ? /* @__PURE__ */ jsxs16("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: [
|
|
14824
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
14825
|
+
/* @__PURE__ */ jsx19("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
14826
|
+
/* @__PURE__ */ jsx19("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
14673
14827
|
] }),
|
|
14674
|
-
/* @__PURE__ */
|
|
14828
|
+
/* @__PURE__ */ jsx19(
|
|
14675
14829
|
"button",
|
|
14676
14830
|
{
|
|
14677
14831
|
type: "button",
|
|
@@ -14681,9 +14835,9 @@ function CheckoutForm({
|
|
|
14681
14835
|
children: t.removeDiscount
|
|
14682
14836
|
}
|
|
14683
14837
|
)
|
|
14684
|
-
] }) : /* @__PURE__ */
|
|
14685
|
-
/* @__PURE__ */
|
|
14686
|
-
/* @__PURE__ */
|
|
14838
|
+
] }) : /* @__PURE__ */ jsxs16("div", { className: "flex gap-2", children: [
|
|
14839
|
+
/* @__PURE__ */ jsx19("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
14840
|
+
/* @__PURE__ */ jsx19(
|
|
14687
14841
|
"input",
|
|
14688
14842
|
{
|
|
14689
14843
|
id: "checkout-form-discount-code",
|
|
@@ -14695,7 +14849,7 @@ function CheckoutForm({
|
|
|
14695
14849
|
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"
|
|
14696
14850
|
}
|
|
14697
14851
|
),
|
|
14698
|
-
/* @__PURE__ */
|
|
14852
|
+
/* @__PURE__ */ jsx19(
|
|
14699
14853
|
"button",
|
|
14700
14854
|
{
|
|
14701
14855
|
type: "button",
|
|
@@ -14706,14 +14860,14 @@ function CheckoutForm({
|
|
|
14706
14860
|
}
|
|
14707
14861
|
)
|
|
14708
14862
|
] }),
|
|
14709
|
-
discountError && /* @__PURE__ */
|
|
14863
|
+
discountError && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: discountError })
|
|
14710
14864
|
] }),
|
|
14711
|
-
/* @__PURE__ */
|
|
14865
|
+
/* @__PURE__ */ jsx19(
|
|
14712
14866
|
"button",
|
|
14713
14867
|
{
|
|
14714
14868
|
type: "submit",
|
|
14715
14869
|
disabled: submitting || submitDisabled,
|
|
14716
|
-
className:
|
|
14870
|
+
className: cn18(
|
|
14717
14871
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
14718
14872
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14719
14873
|
),
|
|
@@ -14727,9 +14881,34 @@ function CheckoutForm({
|
|
|
14727
14881
|
}
|
|
14728
14882
|
|
|
14729
14883
|
// src/components/order-confirmation.tsx
|
|
14730
|
-
import { cn as
|
|
14731
|
-
|
|
14732
|
-
|
|
14884
|
+
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
14885
|
+
|
|
14886
|
+
// src/components/order-invoice-link.tsx
|
|
14887
|
+
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
14888
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14889
|
+
var DEFAULT_LABELS8 = {
|
|
14890
|
+
linkLabel: "Descargar la factura {number}",
|
|
14891
|
+
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
14892
|
+
};
|
|
14893
|
+
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
14894
|
+
if (!invoice) return null;
|
|
14895
|
+
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
14896
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn19("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
14897
|
+
/* @__PURE__ */ jsx20(
|
|
14898
|
+
"a",
|
|
14899
|
+
{
|
|
14900
|
+
href: invoice.url,
|
|
14901
|
+
className: "font-semibold text-primary underline-offset-2 hover:underline",
|
|
14902
|
+
children: t.linkLabel.replace("{number}", invoice.number)
|
|
14903
|
+
}
|
|
14904
|
+
),
|
|
14905
|
+
/* @__PURE__ */ jsx20("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
14906
|
+
] });
|
|
14907
|
+
}
|
|
14908
|
+
|
|
14909
|
+
// src/components/order-confirmation.tsx
|
|
14910
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14911
|
+
var DEFAULT_LABELS9 = {
|
|
14733
14912
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
14734
14913
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
14735
14914
|
foundTitle: "\xA1Pedido confirmado!",
|
|
@@ -14755,7 +14934,9 @@ var DEFAULT_LABELS7 = {
|
|
|
14755
14934
|
notFoundDescription: "Comprueba el enlace o contacta con nosotros si el problema persiste.",
|
|
14756
14935
|
errorTitle: "Ha ocurrido un error",
|
|
14757
14936
|
errorDescription: "No hemos podido comprobar el estado de tu pedido.",
|
|
14758
|
-
orderReferenceLabel: "Referencia del pedido"
|
|
14937
|
+
orderReferenceLabel: "Referencia del pedido",
|
|
14938
|
+
invoiceLinkLabel: "Descargar la factura {number}",
|
|
14939
|
+
invoiceSignInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
14759
14940
|
};
|
|
14760
14941
|
function OrderConfirmation({
|
|
14761
14942
|
status,
|
|
@@ -14768,7 +14949,7 @@ function OrderConfirmation({
|
|
|
14768
14949
|
locale,
|
|
14769
14950
|
className
|
|
14770
14951
|
}) {
|
|
14771
|
-
const t = { ...
|
|
14952
|
+
const t = { ...DEFAULT_LABELS9, ...labels };
|
|
14772
14953
|
const isPolling = status === "polling" || status === "loading";
|
|
14773
14954
|
const isFound = status === "found" || status === "paid";
|
|
14774
14955
|
const { title, description } = (() => {
|
|
@@ -14790,48 +14971,55 @@ function OrderConfirmation({
|
|
|
14790
14971
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
14791
14972
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
14792
14973
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
14793
|
-
return /* @__PURE__ */
|
|
14794
|
-
/* @__PURE__ */
|
|
14795
|
-
/* @__PURE__ */
|
|
14796
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
14797
|
-
/* @__PURE__ */
|
|
14798
|
-
/* @__PURE__ */
|
|
14799
|
-
/* @__PURE__ */
|
|
14974
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn20("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
14975
|
+
/* @__PURE__ */ jsx21("h1", { className: "text-3xl font-bold", children: title }),
|
|
14976
|
+
/* @__PURE__ */ jsx21("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
14977
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs18("div", { className: "space-y-6", children: [
|
|
14978
|
+
/* @__PURE__ */ jsxs18("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
14979
|
+
/* @__PURE__ */ jsx21("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
14980
|
+
/* @__PURE__ */ jsx21("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14800
14981
|
] }),
|
|
14801
|
-
/* @__PURE__ */
|
|
14802
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
14982
|
+
/* @__PURE__ */ jsxs18("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
14983
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs18(
|
|
14803
14984
|
"div",
|
|
14804
14985
|
{
|
|
14805
14986
|
className: "flex justify-between gap-4 text-sm",
|
|
14806
14987
|
children: [
|
|
14807
|
-
/* @__PURE__ */
|
|
14988
|
+
/* @__PURE__ */ jsxs18("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
14808
14989
|
item.product.name,
|
|
14809
14990
|
item.variant ? ` (${item.variant.name})` : "",
|
|
14810
14991
|
" x",
|
|
14811
14992
|
item.quantity
|
|
14812
14993
|
] }),
|
|
14813
|
-
/* @__PURE__ */
|
|
14994
|
+
/* @__PURE__ */ jsx21("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
14814
14995
|
]
|
|
14815
14996
|
},
|
|
14816
14997
|
idx
|
|
14817
14998
|
)),
|
|
14818
|
-
/* @__PURE__ */
|
|
14819
|
-
/* @__PURE__ */
|
|
14820
|
-
/* @__PURE__ */
|
|
14999
|
+
/* @__PURE__ */ jsx21("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs18("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15000
|
+
/* @__PURE__ */ jsx21("span", { children: t.totalLabel }),
|
|
15001
|
+
/* @__PURE__ */ jsx21("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
14821
15002
|
] }) })
|
|
14822
15003
|
] }),
|
|
14823
|
-
/* @__PURE__ */
|
|
15004
|
+
/* @__PURE__ */ jsxs18("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
14824
15005
|
t.confirmationEmailPrefix,
|
|
14825
15006
|
" ",
|
|
14826
|
-
/* @__PURE__ */
|
|
15007
|
+
/* @__PURE__ */ jsx21("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
14827
15008
|
"."
|
|
14828
|
-
] })
|
|
15009
|
+
] }),
|
|
15010
|
+
/* @__PURE__ */ jsx21(
|
|
15011
|
+
OrderInvoiceLink,
|
|
15012
|
+
{
|
|
15013
|
+
invoice: order.invoice,
|
|
15014
|
+
labels: { linkLabel: t.invoiceLinkLabel, signInHint: t.invoiceSignInHint }
|
|
15015
|
+
}
|
|
15016
|
+
)
|
|
14829
15017
|
] }),
|
|
14830
|
-
showOrderReference && order && /* @__PURE__ */
|
|
14831
|
-
/* @__PURE__ */
|
|
14832
|
-
/* @__PURE__ */
|
|
15018
|
+
showOrderReference && order && /* @__PURE__ */ jsxs18("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15019
|
+
/* @__PURE__ */ jsx21("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15020
|
+
/* @__PURE__ */ jsx21("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14833
15021
|
] }),
|
|
14834
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15022
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx21(
|
|
14835
15023
|
"a",
|
|
14836
15024
|
{
|
|
14837
15025
|
href: cartHref,
|
|
@@ -14839,7 +15027,7 @@ function OrderConfirmation({
|
|
|
14839
15027
|
children: t.backToCartLabel
|
|
14840
15028
|
}
|
|
14841
15029
|
),
|
|
14842
|
-
showRecheck && /* @__PURE__ */
|
|
15030
|
+
showRecheck && /* @__PURE__ */ jsx21(
|
|
14843
15031
|
"button",
|
|
14844
15032
|
{
|
|
14845
15033
|
type: "button",
|
|
@@ -14848,26 +15036,293 @@ function OrderConfirmation({
|
|
|
14848
15036
|
children: t.recheckLabel
|
|
14849
15037
|
}
|
|
14850
15038
|
),
|
|
14851
|
-
showSessionReference && /* @__PURE__ */
|
|
14852
|
-
/* @__PURE__ */
|
|
14853
|
-
/* @__PURE__ */
|
|
15039
|
+
showSessionReference && /* @__PURE__ */ jsxs18("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15040
|
+
/* @__PURE__ */ jsx21("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15041
|
+
/* @__PURE__ */ jsx21("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15042
|
+
] })
|
|
15043
|
+
] });
|
|
15044
|
+
}
|
|
15045
|
+
|
|
15046
|
+
// src/components/full-invoice-fields.tsx
|
|
15047
|
+
import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
15048
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
15049
|
+
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15050
|
+
wantsFullInvoice: false,
|
|
15051
|
+
billingIdType: "NIF",
|
|
15052
|
+
billingIdCountry: "",
|
|
15053
|
+
billingNif: "",
|
|
15054
|
+
billingName: "",
|
|
15055
|
+
street: "",
|
|
15056
|
+
postalCode: "",
|
|
15057
|
+
city: "",
|
|
15058
|
+
country: "ES"
|
|
15059
|
+
};
|
|
15060
|
+
var DEFAULT_LABELS10 = {
|
|
15061
|
+
toggle: "\xBFQuieres factura completa?",
|
|
15062
|
+
underCapNotice: "Para una factura completa necesitas tu NIF/NIE o un documento de identificaci\xF3n. Si no, recibir\xE1s una factura simplificada.",
|
|
15063
|
+
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.",
|
|
15064
|
+
idType: "Tipo de documento",
|
|
15065
|
+
idCountry: "Pa\xEDs que expidi\xF3 el documento",
|
|
15066
|
+
chooseCountry: "Elige un pa\xEDs",
|
|
15067
|
+
spanishNif: "NIF / NIE / CIF",
|
|
15068
|
+
documentNumber: "N\xFAmero de documento",
|
|
15069
|
+
name: "Nombre o raz\xF3n social",
|
|
15070
|
+
street: "Direcci\xF3n",
|
|
15071
|
+
postalCode: "C\xF3digo postal",
|
|
15072
|
+
city: "Ciudad",
|
|
15073
|
+
country: "Pa\xEDs",
|
|
15074
|
+
idTypeOptions: {
|
|
15075
|
+
NIF: "NIF / NIE / CIF (Espa\xF1a)",
|
|
15076
|
+
"02": "NIF-IVA intracomunitario (otro pa\xEDs de la UE)",
|
|
15077
|
+
"03": "Pasaporte",
|
|
15078
|
+
"04": "Documento oficial de identidad de tu pa\xEDs de residencia",
|
|
15079
|
+
"05": "Certificado de residencia",
|
|
15080
|
+
"06": "Otro documento acreditativo"
|
|
15081
|
+
}
|
|
15082
|
+
};
|
|
15083
|
+
var ID_TYPES = ["NIF", "02", "03", "04", "05", "06"];
|
|
15084
|
+
var DEFAULT_INVOICE_COUNTRIES = [
|
|
15085
|
+
{ code: "ES", name: "Espa\xF1a" },
|
|
15086
|
+
{ code: "DE", name: "Alemania" },
|
|
15087
|
+
{ code: "AD", name: "Andorra" },
|
|
15088
|
+
{ code: "AR", name: "Argentina" },
|
|
15089
|
+
{ code: "AT", name: "Austria" },
|
|
15090
|
+
{ code: "BE", name: "B\xE9lgica" },
|
|
15091
|
+
{ code: "BG", name: "Bulgaria" },
|
|
15092
|
+
{ code: "CY", name: "Chipre" },
|
|
15093
|
+
{ code: "CO", name: "Colombia" },
|
|
15094
|
+
{ code: "HR", name: "Croacia" },
|
|
15095
|
+
{ code: "DK", name: "Dinamarca" },
|
|
15096
|
+
{ code: "SK", name: "Eslovaquia" },
|
|
15097
|
+
{ code: "SI", name: "Eslovenia" },
|
|
15098
|
+
{ code: "US", name: "Estados Unidos" },
|
|
15099
|
+
{ code: "EE", name: "Estonia" },
|
|
15100
|
+
{ code: "FI", name: "Finlandia" },
|
|
15101
|
+
{ code: "FR", name: "Francia" },
|
|
15102
|
+
{ code: "GR", name: "Grecia" },
|
|
15103
|
+
{ code: "HU", name: "Hungr\xEDa" },
|
|
15104
|
+
{ code: "IE", name: "Irlanda" },
|
|
15105
|
+
{ code: "IT", name: "Italia" },
|
|
15106
|
+
{ code: "LV", name: "Letonia" },
|
|
15107
|
+
{ code: "LT", name: "Lituania" },
|
|
15108
|
+
{ code: "LU", name: "Luxemburgo" },
|
|
15109
|
+
{ code: "MT", name: "Malta" },
|
|
15110
|
+
{ code: "MA", name: "Marruecos" },
|
|
15111
|
+
{ code: "MX", name: "M\xE9xico" },
|
|
15112
|
+
{ code: "NL", name: "Pa\xEDses Bajos" },
|
|
15113
|
+
{ code: "PL", name: "Polonia" },
|
|
15114
|
+
{ code: "PT", name: "Portugal" },
|
|
15115
|
+
{ code: "GB", name: "Reino Unido" },
|
|
15116
|
+
{ code: "CZ", name: "Rep\xFAblica Checa" },
|
|
15117
|
+
{ code: "RO", name: "Ruman\xEDa" },
|
|
15118
|
+
{ code: "SE", name: "Suecia" },
|
|
15119
|
+
{ code: "CH", name: "Suiza" },
|
|
15120
|
+
{ code: "VE", name: "Venezuela" }
|
|
15121
|
+
];
|
|
15122
|
+
function shopIssuesInvoices(config) {
|
|
15123
|
+
return config.simplifiedInvoiceCapCents != null;
|
|
15124
|
+
}
|
|
15125
|
+
function isOverSimplifiedInvoiceCap(totalCents, capCents) {
|
|
15126
|
+
return capCents != null && totalCents > capCents;
|
|
15127
|
+
}
|
|
15128
|
+
function toCheckoutInvoiceFields(value, overCap, issuesInvoices = true) {
|
|
15129
|
+
if (!issuesInvoices) return {};
|
|
15130
|
+
if (!value.wantsFullInvoice && !overCap) return {};
|
|
15131
|
+
const name = value.billingName.trim();
|
|
15132
|
+
const [first = "", ...rest] = name.split(/\s+/);
|
|
15133
|
+
const billing = {
|
|
15134
|
+
billingName: name,
|
|
15135
|
+
billingNif: value.billingNif.trim(),
|
|
15136
|
+
billingIdType: value.billingIdType,
|
|
15137
|
+
...value.billingIdType === "NIF" ? {} : { billingIdCountry: value.billingIdCountry },
|
|
15138
|
+
billingAddress: {
|
|
15139
|
+
firstName: first,
|
|
15140
|
+
lastName: rest.join(" ") || first,
|
|
15141
|
+
street: value.street.trim(),
|
|
15142
|
+
city: value.city.trim(),
|
|
15143
|
+
postalCode: value.postalCode.trim(),
|
|
15144
|
+
country: value.country
|
|
15145
|
+
}
|
|
15146
|
+
};
|
|
15147
|
+
return { ...value.wantsFullInvoice ? { wantsFullInvoice: true } : {}, billing };
|
|
15148
|
+
}
|
|
15149
|
+
var FIELD_CLASS = "w-full rounded-lg border border-border bg-background px-3 py-2 text-sm focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20";
|
|
15150
|
+
function FullInvoiceFields({
|
|
15151
|
+
value,
|
|
15152
|
+
onChange,
|
|
15153
|
+
overCap,
|
|
15154
|
+
issuesInvoices = true,
|
|
15155
|
+
errors = {},
|
|
15156
|
+
countries = DEFAULT_INVOICE_COUNTRIES,
|
|
15157
|
+
labels,
|
|
15158
|
+
className
|
|
15159
|
+
}) {
|
|
15160
|
+
if (!issuesInvoices) return null;
|
|
15161
|
+
const t = { ...DEFAULT_LABELS10, ...labels };
|
|
15162
|
+
const showFields = value.wantsFullInvoice || overCap;
|
|
15163
|
+
const isSpanishNif = value.billingIdType === "NIF";
|
|
15164
|
+
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15165
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx22("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15166
|
+
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15167
|
+
return /* @__PURE__ */ jsxs19("section", { className: cn21("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15168
|
+
overCap ? /* @__PURE__ */ jsx22("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15169
|
+
/* @__PURE__ */ jsxs19("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15170
|
+
/* @__PURE__ */ jsx22(
|
|
15171
|
+
"input",
|
|
15172
|
+
{
|
|
15173
|
+
type: "checkbox",
|
|
15174
|
+
checked: value.wantsFullInvoice,
|
|
15175
|
+
onChange: (e) => set("wantsFullInvoice", e.target.checked)
|
|
15176
|
+
}
|
|
15177
|
+
),
|
|
15178
|
+
t.toggle
|
|
15179
|
+
] }),
|
|
15180
|
+
/* @__PURE__ */ jsx22("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15181
|
+
] }),
|
|
15182
|
+
showFields && /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15183
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15184
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15185
|
+
/* @__PURE__ */ jsx22(
|
|
15186
|
+
"select",
|
|
15187
|
+
{
|
|
15188
|
+
id: "full-invoice-id-type",
|
|
15189
|
+
className: FIELD_CLASS,
|
|
15190
|
+
required: true,
|
|
15191
|
+
value: value.billingIdType,
|
|
15192
|
+
onChange: (e) => set("billingIdType", e.target.value),
|
|
15193
|
+
...invalid2("billingIdType"),
|
|
15194
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx22("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15195
|
+
}
|
|
15196
|
+
),
|
|
15197
|
+
error("billingIdType")
|
|
15198
|
+
] }),
|
|
15199
|
+
!isSpanishNif && /* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15200
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15201
|
+
/* @__PURE__ */ jsxs19(
|
|
15202
|
+
"select",
|
|
15203
|
+
{
|
|
15204
|
+
id: "full-invoice-id-country",
|
|
15205
|
+
className: FIELD_CLASS,
|
|
15206
|
+
required: true,
|
|
15207
|
+
value: value.billingIdCountry,
|
|
15208
|
+
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15209
|
+
...invalid2("billingIdCountry"),
|
|
15210
|
+
children: [
|
|
15211
|
+
/* @__PURE__ */ jsx22("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15212
|
+
countries.map((c) => /* @__PURE__ */ jsx22("option", { value: c.code, children: c.name }, c.code))
|
|
15213
|
+
]
|
|
15214
|
+
}
|
|
15215
|
+
),
|
|
15216
|
+
error("billingIdCountry")
|
|
15217
|
+
] }),
|
|
15218
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15219
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15220
|
+
/* @__PURE__ */ jsx22(
|
|
15221
|
+
"input",
|
|
15222
|
+
{
|
|
15223
|
+
id: "full-invoice-nif",
|
|
15224
|
+
className: FIELD_CLASS,
|
|
15225
|
+
required: true,
|
|
15226
|
+
value: value.billingNif,
|
|
15227
|
+
onChange: (e) => set("billingNif", e.target.value),
|
|
15228
|
+
...invalid2("billingNif")
|
|
15229
|
+
}
|
|
15230
|
+
),
|
|
15231
|
+
error("billingNif")
|
|
15232
|
+
] }),
|
|
15233
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15234
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15235
|
+
/* @__PURE__ */ jsx22(
|
|
15236
|
+
"input",
|
|
15237
|
+
{
|
|
15238
|
+
id: "full-invoice-name",
|
|
15239
|
+
className: FIELD_CLASS,
|
|
15240
|
+
required: true,
|
|
15241
|
+
value: value.billingName,
|
|
15242
|
+
onChange: (e) => set("billingName", e.target.value),
|
|
15243
|
+
...invalid2("billingName")
|
|
15244
|
+
}
|
|
15245
|
+
),
|
|
15246
|
+
error("billingName")
|
|
15247
|
+
] }),
|
|
15248
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15249
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15250
|
+
/* @__PURE__ */ jsx22(
|
|
15251
|
+
"input",
|
|
15252
|
+
{
|
|
15253
|
+
id: "full-invoice-street",
|
|
15254
|
+
className: FIELD_CLASS,
|
|
15255
|
+
required: true,
|
|
15256
|
+
value: value.street,
|
|
15257
|
+
onChange: (e) => set("street", e.target.value),
|
|
15258
|
+
...invalid2("address")
|
|
15259
|
+
}
|
|
15260
|
+
)
|
|
15261
|
+
] }),
|
|
15262
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15263
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15264
|
+
/* @__PURE__ */ jsx22(
|
|
15265
|
+
"input",
|
|
15266
|
+
{
|
|
15267
|
+
id: "full-invoice-postal-code",
|
|
15268
|
+
className: FIELD_CLASS,
|
|
15269
|
+
required: true,
|
|
15270
|
+
value: value.postalCode,
|
|
15271
|
+
onChange: (e) => set("postalCode", e.target.value)
|
|
15272
|
+
}
|
|
15273
|
+
)
|
|
15274
|
+
] }),
|
|
15275
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15276
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15277
|
+
/* @__PURE__ */ jsx22(
|
|
15278
|
+
"input",
|
|
15279
|
+
{
|
|
15280
|
+
id: "full-invoice-city",
|
|
15281
|
+
className: FIELD_CLASS,
|
|
15282
|
+
required: true,
|
|
15283
|
+
value: value.city,
|
|
15284
|
+
onChange: (e) => set("city", e.target.value)
|
|
15285
|
+
}
|
|
15286
|
+
)
|
|
15287
|
+
] }),
|
|
15288
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15289
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15290
|
+
/* @__PURE__ */ jsx22(
|
|
15291
|
+
"select",
|
|
15292
|
+
{
|
|
15293
|
+
id: "full-invoice-country",
|
|
15294
|
+
className: FIELD_CLASS,
|
|
15295
|
+
required: true,
|
|
15296
|
+
value: value.country,
|
|
15297
|
+
onChange: (e) => set("country", e.target.value),
|
|
15298
|
+
children: countries.map((c) => /* @__PURE__ */ jsx22("option", { value: c.code, children: c.name }, c.code))
|
|
15299
|
+
}
|
|
15300
|
+
)
|
|
15301
|
+
] }),
|
|
15302
|
+
/* @__PURE__ */ jsx22("div", { className: "sm:col-span-2", children: error("address") })
|
|
14854
15303
|
] })
|
|
14855
15304
|
] });
|
|
14856
15305
|
}
|
|
14857
15306
|
export {
|
|
14858
15307
|
ALLOWED_YOUTUBE_HOSTS,
|
|
14859
15308
|
AddedToCartToast,
|
|
15309
|
+
CartAdjustmentsNotice,
|
|
14860
15310
|
CartLineList,
|
|
14861
15311
|
CartSummary,
|
|
14862
15312
|
CheckoutForm,
|
|
14863
15313
|
CheckoutLoginPrompt,
|
|
15314
|
+
CourseDescription,
|
|
15315
|
+
DEFAULT_INVOICE_COUNTRIES,
|
|
14864
15316
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
14865
15317
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
14866
15318
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
14867
15319
|
DEFAULT_TRUST_ICONS,
|
|
15320
|
+
EMPTY_FULL_INVOICE_VALUE,
|
|
14868
15321
|
FaqAccordion,
|
|
15322
|
+
FullInvoiceFields,
|
|
14869
15323
|
MarkdownRenderer,
|
|
14870
15324
|
OrderConfirmation,
|
|
15325
|
+
OrderInvoiceLink,
|
|
14871
15326
|
PageBlocks,
|
|
14872
15327
|
PageCardGrid,
|
|
14873
15328
|
ParentPage,
|
|
@@ -14884,10 +15339,14 @@ export {
|
|
|
14884
15339
|
formatPrice,
|
|
14885
15340
|
getShopErrorMessage,
|
|
14886
15341
|
isAllowedYouTubeHost,
|
|
15342
|
+
isOverSimplifiedInvoiceCap,
|
|
15343
|
+
markdownToPlainText,
|
|
14887
15344
|
markdownToSafeHtml,
|
|
14888
15345
|
readingTime,
|
|
14889
15346
|
sanitizeHtml,
|
|
14890
|
-
|
|
15347
|
+
shopIssuesInvoices,
|
|
15348
|
+
shouldRenderShopFilters,
|
|
15349
|
+
toCheckoutInvoiceFields
|
|
14891
15350
|
};
|
|
14892
15351
|
/*! Bundled license information:
|
|
14893
15352
|
|