@reblu/site-blocks 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +137 -2
- package/dist/client.cjs +259 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +76 -1
- package/dist/client.d.ts +76 -1
- package/dist/client.js +256 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +386 -256
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -7
- package/dist/index.d.ts +66 -7
- package/dist/index.js +383 -256
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -13107,12 +13107,28 @@ function markdownToPlainText(markdown, { maxLength } = {}) {
|
|
|
13107
13107
|
}
|
|
13108
13108
|
|
|
13109
13109
|
// src/components/markdown-renderer.tsx
|
|
13110
|
-
import { cn } from "@reblu/site-ui/utils";
|
|
13111
13110
|
import {
|
|
13112
13111
|
domToReact,
|
|
13113
13112
|
Element,
|
|
13114
13113
|
htmlToDOM
|
|
13115
13114
|
} from "html-react-parser";
|
|
13115
|
+
|
|
13116
|
+
// src/lib/slot-class-name.ts
|
|
13117
|
+
import { cn } from "@reblu/site-ui/utils";
|
|
13118
|
+
var MERGE_SAFE_TEXT = /(?:^|:)!?text-(?:left|center|right|justify|start|end|wrap|nowrap|balance|pretty|ellipsis|clip)$/;
|
|
13119
|
+
var TEXT_UTILITY = /(?:^|:)!?-?text-/;
|
|
13120
|
+
function bypassesMerge(token) {
|
|
13121
|
+
return TEXT_UTILITY.test(token) && !MERGE_SAFE_TEXT.test(token);
|
|
13122
|
+
}
|
|
13123
|
+
function slotClassName(structural, defaults, consumer) {
|
|
13124
|
+
if (consumer === void 0 || consumer.trim() === "") return cn(structural, defaults);
|
|
13125
|
+
const tokens = consumer.split(/\s+/).filter(Boolean);
|
|
13126
|
+
const verbatim = tokens.filter(bypassesMerge);
|
|
13127
|
+
const merged = cn(structural, tokens.filter((token) => !bypassesMerge(token)));
|
|
13128
|
+
return [merged, ...verbatim].filter(Boolean).join(" ");
|
|
13129
|
+
}
|
|
13130
|
+
|
|
13131
|
+
// src/components/markdown-renderer.tsx
|
|
13116
13132
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
13117
13133
|
var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
|
|
13118
13134
|
function parse3(html5, options) {
|
|
@@ -13275,15 +13291,14 @@ function buildOptions(headingOffset) {
|
|
|
13275
13291
|
function MarkdownRenderer({ content, className, headingOffset = 0 }) {
|
|
13276
13292
|
const html5 = markdownToSafeHtml(content);
|
|
13277
13293
|
if (!html5) return null;
|
|
13278
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
13294
|
+
return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
|
|
13279
13295
|
}
|
|
13280
13296
|
function SafeHtml({ html: html5, className, headingOffset = 0 }) {
|
|
13281
13297
|
if (!html5) return null;
|
|
13282
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
13298
|
+
return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "safe-html", children: parse3(html5, buildOptions(headingOffset)) });
|
|
13283
13299
|
}
|
|
13284
13300
|
|
|
13285
13301
|
// src/components/course-description.tsx
|
|
13286
|
-
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13287
13302
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
13288
13303
|
function isVisiblyEmpty(html5) {
|
|
13289
13304
|
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
@@ -13308,7 +13323,7 @@ function CourseDescription({
|
|
|
13308
13323
|
{
|
|
13309
13324
|
html: html5,
|
|
13310
13325
|
headingOffset: offset,
|
|
13311
|
-
className:
|
|
13326
|
+
className: slotClassName("", "text-muted-foreground", contentClassName)
|
|
13312
13327
|
}
|
|
13313
13328
|
);
|
|
13314
13329
|
if (!hasHeading) {
|
|
@@ -13320,9 +13335,9 @@ function CourseDescription({
|
|
|
13320
13335
|
{
|
|
13321
13336
|
"data-slot": "course-description",
|
|
13322
13337
|
"aria-labelledby": headingId,
|
|
13323
|
-
className:
|
|
13338
|
+
className: slotClassName("space-y-3", "", className),
|
|
13324
13339
|
children: [
|
|
13325
|
-
/* @__PURE__ */ jsx2(Tag, { id: headingId, className:
|
|
13340
|
+
/* @__PURE__ */ jsx2(Tag, { id: headingId, className: slotClassName("", "text-xl font-semibold", headingClassName), children: heading }),
|
|
13326
13341
|
body3
|
|
13327
13342
|
]
|
|
13328
13343
|
}
|
|
@@ -13330,10 +13345,10 @@ function CourseDescription({
|
|
|
13330
13345
|
}
|
|
13331
13346
|
|
|
13332
13347
|
// src/components/treatment.tsx
|
|
13333
|
-
import { cn as
|
|
13348
|
+
import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
13334
13349
|
|
|
13335
13350
|
// src/components/_page-parts.tsx
|
|
13336
|
-
import { cn as
|
|
13351
|
+
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13337
13352
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13338
13353
|
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
13339
13354
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
@@ -13373,7 +13388,7 @@ function SectionCta({ section }) {
|
|
|
13373
13388
|
"data-slot": "button",
|
|
13374
13389
|
"data-variant": variant,
|
|
13375
13390
|
"data-size": "default",
|
|
13376
|
-
className:
|
|
13391
|
+
className: cn2(buttonVariants({ variant, size: "default" })),
|
|
13377
13392
|
...section.ctaIsExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
13378
13393
|
children: section.ctaLabel
|
|
13379
13394
|
}
|
|
@@ -13381,7 +13396,7 @@ function SectionCta({ section }) {
|
|
|
13381
13396
|
}
|
|
13382
13397
|
function SectionImages({ section }) {
|
|
13383
13398
|
if (section.images.length === 0) return null;
|
|
13384
|
-
return /* @__PURE__ */ jsx3("div", { className:
|
|
13399
|
+
return /* @__PURE__ */ jsx3("div", { className: cn2("grid gap-4", section.images.length > 1 ? "sm:grid-cols-2" : "grid-cols-1"), children: section.images.map((img) => /* @__PURE__ */ jsxs2("figure", { className: "space-y-1", children: [
|
|
13385
13400
|
/* @__PURE__ */ jsx3("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx3("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13386
13401
|
img.caption && /* @__PURE__ */ jsx3("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13387
13402
|
] }, `${img.url}-${img.order}`)) });
|
|
@@ -13418,17 +13433,17 @@ function PageSectionList({ sections }) {
|
|
|
13418
13433
|
// src/components/treatment.tsx
|
|
13419
13434
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13420
13435
|
function Treatment({ page, className }) {
|
|
13421
|
-
return /* @__PURE__ */ jsxs3("article", { className:
|
|
13436
|
+
return /* @__PURE__ */ jsxs3("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
|
|
13422
13437
|
/* @__PURE__ */ jsx4(PageHero, { page }),
|
|
13423
13438
|
/* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections })
|
|
13424
13439
|
] });
|
|
13425
13440
|
}
|
|
13426
13441
|
|
|
13427
13442
|
// src/components/parent-page.tsx
|
|
13428
|
-
import { cn as
|
|
13443
|
+
import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
13429
13444
|
|
|
13430
13445
|
// src/components/page-card-grid.tsx
|
|
13431
|
-
import { cn as
|
|
13446
|
+
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13432
13447
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13433
13448
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13434
13449
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
@@ -13444,7 +13459,7 @@ function PageCardGridSection({
|
|
|
13444
13459
|
}) {
|
|
13445
13460
|
if (pages.length === 0) return null;
|
|
13446
13461
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13447
|
-
return /* @__PURE__ */ jsxs4("section", { className:
|
|
13462
|
+
return /* @__PURE__ */ jsxs4("section", { className: cn4("space-y-6", className), children: [
|
|
13448
13463
|
showHeading && /* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13449
13464
|
/* @__PURE__ */ jsx5("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs4(
|
|
13450
13465
|
"a",
|
|
@@ -13487,7 +13502,7 @@ function ParentPage({
|
|
|
13487
13502
|
const pages = childPages ?? treatments ?? [];
|
|
13488
13503
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13489
13504
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13490
|
-
return /* @__PURE__ */ jsxs5("article", { className:
|
|
13505
|
+
return /* @__PURE__ */ jsxs5("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
|
|
13491
13506
|
/* @__PURE__ */ jsx6(PageHero, { page }),
|
|
13492
13507
|
/* @__PURE__ */ jsx6(PageSectionList, { sections: page.sections }),
|
|
13493
13508
|
/* @__PURE__ */ jsx6(
|
|
@@ -13506,7 +13521,7 @@ function ParentPage({
|
|
|
13506
13521
|
var Specialty = ParentPage;
|
|
13507
13522
|
|
|
13508
13523
|
// src/components/profile-card.tsx
|
|
13509
|
-
import { cn as
|
|
13524
|
+
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13510
13525
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13511
13526
|
function initials(name) {
|
|
13512
13527
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
@@ -13516,7 +13531,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13516
13531
|
return /* @__PURE__ */ jsxs6(
|
|
13517
13532
|
"article",
|
|
13518
13533
|
{
|
|
13519
|
-
className:
|
|
13534
|
+
className: cn6(
|
|
13520
13535
|
"flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
|
|
13521
13536
|
className
|
|
13522
13537
|
),
|
|
@@ -13548,7 +13563,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13548
13563
|
}
|
|
13549
13564
|
|
|
13550
13565
|
// src/components/product-card.tsx
|
|
13551
|
-
import { cn as
|
|
13566
|
+
import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
13552
13567
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13553
13568
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13554
13569
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
@@ -13556,7 +13571,7 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13556
13571
|
return /* @__PURE__ */ jsxs7(
|
|
13557
13572
|
"article",
|
|
13558
13573
|
{
|
|
13559
|
-
className:
|
|
13574
|
+
className: cn7(
|
|
13560
13575
|
"group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13561
13576
|
className
|
|
13562
13577
|
),
|
|
@@ -13779,7 +13794,6 @@ var __iconNode8 = [
|
|
|
13779
13794
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13780
13795
|
|
|
13781
13796
|
// src/components/product-trust-items.tsx
|
|
13782
|
-
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13783
13797
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13784
13798
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13785
13799
|
shipping: Truck,
|
|
@@ -13814,14 +13828,14 @@ function ProductTrustItems({
|
|
|
13814
13828
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13815
13829
|
});
|
|
13816
13830
|
if (rows.length === 0) return null;
|
|
13817
|
-
return /* @__PURE__ */ jsx9(List, { "data-slot": "product-trust-items", className:
|
|
13831
|
+
return /* @__PURE__ */ jsx9(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs8("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
13818
13832
|
/* @__PURE__ */ jsx9(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13819
13833
|
/* @__PURE__ */ jsx9("span", { children: text3 })
|
|
13820
13834
|
] }, key2)) });
|
|
13821
13835
|
}
|
|
13822
13836
|
|
|
13823
13837
|
// src/components/faq-accordion.tsx
|
|
13824
|
-
import { cn as
|
|
13838
|
+
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13825
13839
|
|
|
13826
13840
|
// src/components/_heading.tsx
|
|
13827
13841
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
@@ -13849,7 +13863,7 @@ function FaqAccordion({
|
|
|
13849
13863
|
}) {
|
|
13850
13864
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13851
13865
|
if (visible.length === 0) return null;
|
|
13852
|
-
return /* @__PURE__ */ jsxs9("div", { className:
|
|
13866
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn8("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
13853
13867
|
heading && /* @__PURE__ */ jsx11(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
13854
13868
|
/* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs9(
|
|
13855
13869
|
"details",
|
|
@@ -13877,41 +13891,151 @@ function FaqAccordion({
|
|
|
13877
13891
|
] });
|
|
13878
13892
|
}
|
|
13879
13893
|
|
|
13894
|
+
// src/components/trust-badges.tsx
|
|
13895
|
+
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13896
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13897
|
+
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
13898
|
+
{
|
|
13899
|
+
PARTNER: "Colaboradores",
|
|
13900
|
+
INSURANCE: "Aseguradoras",
|
|
13901
|
+
SUBVENTION: "Financiaci\xF3n",
|
|
13902
|
+
CERTIFICATION: "Certificaciones",
|
|
13903
|
+
AWARD: "Premios"
|
|
13904
|
+
}
|
|
13905
|
+
);
|
|
13906
|
+
var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
|
|
13907
|
+
"SUBVENTION",
|
|
13908
|
+
"CERTIFICATION",
|
|
13909
|
+
"AWARD",
|
|
13910
|
+
"PARTNER",
|
|
13911
|
+
"INSURANCE"
|
|
13912
|
+
]);
|
|
13913
|
+
var KNOWN_TYPES = new Set(DEFAULT_TRUST_BADGE_TYPE_ORDER);
|
|
13914
|
+
function isUsable(value) {
|
|
13915
|
+
if (typeof value !== "object" || value === null) return false;
|
|
13916
|
+
const entry = value;
|
|
13917
|
+
return typeof entry.type === "string" && KNOWN_TYPES.has(entry.type) && typeof entry.name === "string" && entry.name.trim() !== "";
|
|
13918
|
+
}
|
|
13919
|
+
function safeHref(url) {
|
|
13920
|
+
if (typeof url !== "string") return null;
|
|
13921
|
+
try {
|
|
13922
|
+
const parsed = new URL(url);
|
|
13923
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
|
|
13924
|
+
} catch {
|
|
13925
|
+
return null;
|
|
13926
|
+
}
|
|
13927
|
+
}
|
|
13928
|
+
function BadgeContent({ badge, logoClassName }) {
|
|
13929
|
+
if (badge.logoUrl) {
|
|
13930
|
+
return (
|
|
13931
|
+
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
13932
|
+
/* @__PURE__ */ jsx12(
|
|
13933
|
+
"img",
|
|
13934
|
+
{
|
|
13935
|
+
src: badge.logoUrl,
|
|
13936
|
+
alt: badge.name,
|
|
13937
|
+
loading: "lazy",
|
|
13938
|
+
className: cn9("h-12 w-auto object-contain", logoClassName)
|
|
13939
|
+
}
|
|
13940
|
+
)
|
|
13941
|
+
);
|
|
13942
|
+
}
|
|
13943
|
+
return /* @__PURE__ */ jsx12("span", { className: "text-sm font-medium", children: badge.name });
|
|
13944
|
+
}
|
|
13945
|
+
function TrustBadges({
|
|
13946
|
+
badges,
|
|
13947
|
+
headings,
|
|
13948
|
+
types = DEFAULT_TRUST_BADGE_TYPE_ORDER,
|
|
13949
|
+
headingLevel = 2,
|
|
13950
|
+
newWindowLabel = "(se abre en una ventana nueva)",
|
|
13951
|
+
className,
|
|
13952
|
+
groupClassName,
|
|
13953
|
+
headingClassName,
|
|
13954
|
+
listClassName,
|
|
13955
|
+
logoClassName
|
|
13956
|
+
}) {
|
|
13957
|
+
if (!Array.isArray(badges) || badges.length === 0) return null;
|
|
13958
|
+
const usable = badges.filter(isUsable);
|
|
13959
|
+
const groups = types.flatMap((type) => {
|
|
13960
|
+
const items = usable.filter((b2) => b2.type === type).map((b2, index) => ({ b: b2, index })).sort((x2, y2) => (x2.b.sortOrder ?? 0) - (y2.b.sortOrder ?? 0) || x2.index - y2.index).map(({ b: b2 }) => b2);
|
|
13961
|
+
if (items.length === 0) return [];
|
|
13962
|
+
const heading = headings && Object.prototype.hasOwnProperty.call(headings, type) ? headings[type] : DEFAULT_TRUST_BADGE_HEADINGS[type];
|
|
13963
|
+
return [{ type, heading, items }];
|
|
13964
|
+
});
|
|
13965
|
+
if (groups.length === 0) return null;
|
|
13966
|
+
return /* @__PURE__ */ jsx12("div", { "data-slot": "trust-badges", className: cn9("space-y-6", className), children: groups.map(({ type, heading, items }) => /* @__PURE__ */ jsxs10(
|
|
13967
|
+
"div",
|
|
13968
|
+
{
|
|
13969
|
+
"data-slot": "trust-badge-group",
|
|
13970
|
+
"data-type": type,
|
|
13971
|
+
className: cn9("space-y-3", groupClassName),
|
|
13972
|
+
children: [
|
|
13973
|
+
heading ? /* @__PURE__ */ jsx12(
|
|
13974
|
+
Heading,
|
|
13975
|
+
{
|
|
13976
|
+
level: headingLevel,
|
|
13977
|
+
className: cn9("text-sm font-semibold uppercase tracking-widest", headingClassName),
|
|
13978
|
+
children: heading
|
|
13979
|
+
}
|
|
13980
|
+
) : null,
|
|
13981
|
+
/* @__PURE__ */ jsx12("ul", { className: cn9("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
13982
|
+
const href = safeHref(badge.url);
|
|
13983
|
+
return /* @__PURE__ */ jsx12("li", { children: href ? /* @__PURE__ */ jsxs10(
|
|
13984
|
+
"a",
|
|
13985
|
+
{
|
|
13986
|
+
href,
|
|
13987
|
+
target: "_blank",
|
|
13988
|
+
rel: "noopener noreferrer",
|
|
13989
|
+
className: "inline-flex",
|
|
13990
|
+
children: [
|
|
13991
|
+
/* @__PURE__ */ jsx12(BadgeContent, { badge, logoClassName }),
|
|
13992
|
+
" ",
|
|
13993
|
+
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: newWindowLabel })
|
|
13994
|
+
]
|
|
13995
|
+
}
|
|
13996
|
+
) : /* @__PURE__ */ jsx12(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
13997
|
+
}) })
|
|
13998
|
+
]
|
|
13999
|
+
},
|
|
14000
|
+
type
|
|
14001
|
+
)) });
|
|
14002
|
+
}
|
|
14003
|
+
|
|
13880
14004
|
// src/components/page-blocks.tsx
|
|
13881
|
-
import { cn as
|
|
14005
|
+
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
13882
14006
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
13883
|
-
import { jsx as
|
|
14007
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13884
14008
|
var ALIASES = {
|
|
13885
14009
|
doctor_embed: "profile_embed",
|
|
13886
14010
|
specialty_embed: "page_embed"
|
|
13887
14011
|
};
|
|
13888
14012
|
function HeroBlock({ block, headingLevel }) {
|
|
13889
14013
|
const { title, subtitle, imageUrl } = block.data;
|
|
13890
|
-
return /* @__PURE__ */
|
|
13891
|
-
/* @__PURE__ */
|
|
13892
|
-
subtitle && /* @__PURE__ */
|
|
13893
|
-
imageUrl && /* @__PURE__ */
|
|
14014
|
+
return /* @__PURE__ */ jsxs11("div", { className: "space-y-4", children: [
|
|
14015
|
+
/* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14016
|
+
subtitle && /* @__PURE__ */ jsx13("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14017
|
+
imageUrl && /* @__PURE__ */ jsx13("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx13("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
13894
14018
|
] });
|
|
13895
14019
|
}
|
|
13896
14020
|
function RichtextBlock({ block, headingLevel }) {
|
|
13897
|
-
return /* @__PURE__ */
|
|
14021
|
+
return /* @__PURE__ */ jsx13(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
13898
14022
|
}
|
|
13899
14023
|
function FaqBlock({ block }) {
|
|
13900
|
-
return /* @__PURE__ */
|
|
14024
|
+
return /* @__PURE__ */ jsx13(FaqAccordion, { items: block.data.items });
|
|
13901
14025
|
}
|
|
13902
14026
|
function StatsBlock({ block }) {
|
|
13903
|
-
return /* @__PURE__ */
|
|
13904
|
-
/* @__PURE__ */
|
|
13905
|
-
/* @__PURE__ */
|
|
14027
|
+
return /* @__PURE__ */ jsx13("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs11("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14028
|
+
/* @__PURE__ */ jsx13("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14029
|
+
/* @__PURE__ */ jsx13("dd", { className: "text-3xl font-bold", children: item.value })
|
|
13906
14030
|
] }, i)) });
|
|
13907
14031
|
}
|
|
13908
14032
|
function TestimonialBlock({ block }) {
|
|
13909
14033
|
const { quote, author, role, avatarUrl } = block.data;
|
|
13910
|
-
return /* @__PURE__ */
|
|
13911
|
-
/* @__PURE__ */
|
|
13912
|
-
/* @__PURE__ */
|
|
14034
|
+
return /* @__PURE__ */ jsxs11("figure", { className: "space-y-4", children: [
|
|
14035
|
+
/* @__PURE__ */ jsx13("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx13("p", { children: quote }) }),
|
|
14036
|
+
/* @__PURE__ */ jsxs11("figcaption", { className: "flex items-center gap-3", children: [
|
|
13913
14037
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
13914
|
-
/* @__PURE__ */
|
|
14038
|
+
/* @__PURE__ */ jsx13(
|
|
13915
14039
|
"img",
|
|
13916
14040
|
{
|
|
13917
14041
|
src: avatarUrl,
|
|
@@ -13920,9 +14044,9 @@ function TestimonialBlock({ block }) {
|
|
|
13920
14044
|
className: "h-10 w-10 rounded-full object-cover"
|
|
13921
14045
|
}
|
|
13922
14046
|
),
|
|
13923
|
-
/* @__PURE__ */
|
|
13924
|
-
/* @__PURE__ */
|
|
13925
|
-
role && /* @__PURE__ */
|
|
14047
|
+
/* @__PURE__ */ jsxs11("span", { children: [
|
|
14048
|
+
/* @__PURE__ */ jsx13("span", { className: "font-semibold", children: author }),
|
|
14049
|
+
role && /* @__PURE__ */ jsx13("span", { className: "block text-sm opacity-80", children: role })
|
|
13926
14050
|
] })
|
|
13927
14051
|
] })
|
|
13928
14052
|
] });
|
|
@@ -13931,19 +14055,19 @@ function CtaSlotBlock(_props) {
|
|
|
13931
14055
|
return null;
|
|
13932
14056
|
}
|
|
13933
14057
|
function FeatureListBlock({ block }) {
|
|
13934
|
-
return /* @__PURE__ */
|
|
14058
|
+
return /* @__PURE__ */ jsx13("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx13("li", { children: item.text }, i)) });
|
|
13935
14059
|
}
|
|
13936
14060
|
function GalleryBlock({ block }) {
|
|
13937
14061
|
const { images } = block.data;
|
|
13938
|
-
return /* @__PURE__ */
|
|
14062
|
+
return /* @__PURE__ */ jsx13(
|
|
13939
14063
|
"div",
|
|
13940
14064
|
{
|
|
13941
|
-
className:
|
|
14065
|
+
className: cn10(
|
|
13942
14066
|
"grid gap-4",
|
|
13943
14067
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
13944
14068
|
),
|
|
13945
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
13946
|
-
/* @__PURE__ */
|
|
14069
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs11("figure", { className: "space-y-1", children: [
|
|
14070
|
+
/* @__PURE__ */ jsx13("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx13(
|
|
13947
14071
|
"img",
|
|
13948
14072
|
{
|
|
13949
14073
|
src: img.url,
|
|
@@ -13952,7 +14076,7 @@ function GalleryBlock({ block }) {
|
|
|
13952
14076
|
className: "h-full w-full object-cover"
|
|
13953
14077
|
}
|
|
13954
14078
|
) }),
|
|
13955
|
-
img.caption && /* @__PURE__ */
|
|
14079
|
+
img.caption && /* @__PURE__ */ jsx13("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
13956
14080
|
] }, `${img.url}-${i}`))
|
|
13957
14081
|
}
|
|
13958
14082
|
);
|
|
@@ -13962,13 +14086,13 @@ function EmbedCard({
|
|
|
13962
14086
|
headingLevel,
|
|
13963
14087
|
embedHref
|
|
13964
14088
|
}) {
|
|
13965
|
-
return /* @__PURE__ */
|
|
14089
|
+
return /* @__PURE__ */ jsxs11(
|
|
13966
14090
|
"a",
|
|
13967
14091
|
{
|
|
13968
14092
|
href: embedHref(resolved),
|
|
13969
14093
|
className: "group block overflow-hidden rounded-xl border border-border bg-card text-card-foreground transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
13970
14094
|
children: [
|
|
13971
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14095
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx13("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx13(
|
|
13972
14096
|
"img",
|
|
13973
14097
|
{
|
|
13974
14098
|
src: resolved.coverImageUrl,
|
|
@@ -13977,24 +14101,24 @@ function EmbedCard({
|
|
|
13977
14101
|
className: "h-full w-full object-cover"
|
|
13978
14102
|
}
|
|
13979
14103
|
) }),
|
|
13980
|
-
/* @__PURE__ */
|
|
13981
|
-
/* @__PURE__ */
|
|
13982
|
-
resolved.role && /* @__PURE__ */
|
|
13983
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14104
|
+
/* @__PURE__ */ jsxs11("div", { className: "space-y-1 p-4", children: [
|
|
14105
|
+
/* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14106
|
+
resolved.role && /* @__PURE__ */ jsx13("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14107
|
+
resolved.excerpt && /* @__PURE__ */ jsx13("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
13984
14108
|
] })
|
|
13985
14109
|
]
|
|
13986
14110
|
}
|
|
13987
14111
|
);
|
|
13988
14112
|
}
|
|
13989
14113
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
13990
|
-
return /* @__PURE__ */
|
|
14114
|
+
return /* @__PURE__ */ jsx13(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13991
14115
|
}
|
|
13992
14116
|
function ProfileEmbedBlock({
|
|
13993
14117
|
block,
|
|
13994
14118
|
headingLevel,
|
|
13995
14119
|
embedHref
|
|
13996
14120
|
}) {
|
|
13997
|
-
return /* @__PURE__ */
|
|
14121
|
+
return /* @__PURE__ */ jsx13(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
13998
14122
|
}
|
|
13999
14123
|
var DEFAULT_RENDERERS = {
|
|
14000
14124
|
hero: HeroBlock,
|
|
@@ -14051,14 +14175,14 @@ function toIdFragment(value) {
|
|
|
14051
14175
|
function SectionCta2({ cta }) {
|
|
14052
14176
|
if (!hasUsableCta(cta)) return null;
|
|
14053
14177
|
const variant = toButtonVariant(cta.variant);
|
|
14054
|
-
return /* @__PURE__ */
|
|
14178
|
+
return /* @__PURE__ */ jsx13("div", { className: "pt-2", children: /* @__PURE__ */ jsx13(
|
|
14055
14179
|
"a",
|
|
14056
14180
|
{
|
|
14057
14181
|
href: cta.url,
|
|
14058
14182
|
"data-slot": "button",
|
|
14059
14183
|
"data-variant": variant,
|
|
14060
14184
|
"data-size": "default",
|
|
14061
|
-
className:
|
|
14185
|
+
className: cn10(buttonVariants2({ variant, size: "default" })),
|
|
14062
14186
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
14063
14187
|
children: cta.label
|
|
14064
14188
|
}
|
|
@@ -14084,17 +14208,17 @@ function PageBlocks({
|
|
|
14084
14208
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14085
14209
|
const background = block.backgroundColor;
|
|
14086
14210
|
return [
|
|
14087
|
-
/* @__PURE__ */
|
|
14211
|
+
/* @__PURE__ */ jsxs11(
|
|
14088
14212
|
"section",
|
|
14089
14213
|
{
|
|
14090
14214
|
"data-slot": "page-block",
|
|
14091
14215
|
"data-block-type": type,
|
|
14092
14216
|
"aria-labelledby": headingId,
|
|
14093
14217
|
style: surfaceStyle(background),
|
|
14094
|
-
className:
|
|
14218
|
+
className: cn10("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14095
14219
|
children: [
|
|
14096
|
-
block.heading && /* @__PURE__ */
|
|
14097
|
-
/* @__PURE__ */
|
|
14220
|
+
block.heading && /* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx13("span", { id: headingId, children: block.heading }) }),
|
|
14221
|
+
/* @__PURE__ */ jsx13(
|
|
14098
14222
|
Renderer,
|
|
14099
14223
|
{
|
|
14100
14224
|
block,
|
|
@@ -14102,7 +14226,7 @@ function PageBlocks({
|
|
|
14102
14226
|
embedHref
|
|
14103
14227
|
}
|
|
14104
14228
|
),
|
|
14105
|
-
/* @__PURE__ */
|
|
14229
|
+
/* @__PURE__ */ jsx13(SectionCta2, { cta: block.cta })
|
|
14106
14230
|
]
|
|
14107
14231
|
},
|
|
14108
14232
|
block.id
|
|
@@ -14110,12 +14234,12 @@ function PageBlocks({
|
|
|
14110
14234
|
];
|
|
14111
14235
|
});
|
|
14112
14236
|
if (sections.length === 0) return null;
|
|
14113
|
-
return /* @__PURE__ */
|
|
14237
|
+
return /* @__PURE__ */ jsx13("div", { className: cn10("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14114
14238
|
}
|
|
14115
14239
|
|
|
14116
14240
|
// src/components/shop-filters.tsx
|
|
14117
|
-
import { cn as
|
|
14118
|
-
import { jsx as
|
|
14241
|
+
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14242
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14119
14243
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14120
14244
|
{ max: 2500 },
|
|
14121
14245
|
{ min: 2500, max: 5e3 },
|
|
@@ -14159,7 +14283,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14159
14283
|
return "";
|
|
14160
14284
|
}
|
|
14161
14285
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14162
|
-
return /* @__PURE__ */
|
|
14286
|
+
return /* @__PURE__ */ jsx14(
|
|
14163
14287
|
"a",
|
|
14164
14288
|
{
|
|
14165
14289
|
href,
|
|
@@ -14168,7 +14292,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14168
14292
|
event.preventDefault();
|
|
14169
14293
|
onActivate();
|
|
14170
14294
|
} : void 0,
|
|
14171
|
-
className:
|
|
14295
|
+
className: cn11(
|
|
14172
14296
|
"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",
|
|
14173
14297
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
14174
14298
|
),
|
|
@@ -14177,9 +14301,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14177
14301
|
);
|
|
14178
14302
|
}
|
|
14179
14303
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14180
|
-
return /* @__PURE__ */
|
|
14181
|
-
/* @__PURE__ */
|
|
14182
|
-
/* @__PURE__ */
|
|
14304
|
+
return /* @__PURE__ */ jsxs12("fieldset", { className: "space-y-2", children: [
|
|
14305
|
+
/* @__PURE__ */ jsx14("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14306
|
+
/* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14183
14307
|
] });
|
|
14184
14308
|
}
|
|
14185
14309
|
function ShopFilters({
|
|
@@ -14202,11 +14326,11 @@ function ShopFilters({
|
|
|
14202
14326
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14203
14327
|
return null;
|
|
14204
14328
|
}
|
|
14205
|
-
return /* @__PURE__ */
|
|
14329
|
+
return /* @__PURE__ */ jsxs12("div", { className: cn11("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14206
14330
|
visibleTaxonomies.map((axis) => {
|
|
14207
14331
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14208
|
-
return /* @__PURE__ */
|
|
14209
|
-
/* @__PURE__ */
|
|
14332
|
+
return /* @__PURE__ */ jsxs12(FilterFieldset, { legend: axis.label, children: [
|
|
14333
|
+
/* @__PURE__ */ jsx14(
|
|
14210
14334
|
OptionLink,
|
|
14211
14335
|
{
|
|
14212
14336
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14221,7 +14345,7 @@ function ShopFilters({
|
|
|
14221
14345
|
),
|
|
14222
14346
|
axis.terms.map((term) => {
|
|
14223
14347
|
const isActive = activeSlug === term.slug;
|
|
14224
|
-
return /* @__PURE__ */
|
|
14348
|
+
return /* @__PURE__ */ jsx14(
|
|
14225
14349
|
OptionLink,
|
|
14226
14350
|
{
|
|
14227
14351
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14241,9 +14365,9 @@ function ShopFilters({
|
|
|
14241
14365
|
}),
|
|
14242
14366
|
visibleAttributes.map((attr) => {
|
|
14243
14367
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14244
|
-
return /* @__PURE__ */
|
|
14368
|
+
return /* @__PURE__ */ jsx14(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14245
14369
|
const isActive = activeValues.includes(opt.value);
|
|
14246
|
-
return /* @__PURE__ */
|
|
14370
|
+
return /* @__PURE__ */ jsx14(
|
|
14247
14371
|
OptionLink,
|
|
14248
14372
|
{
|
|
14249
14373
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14261,11 +14385,11 @@ function ShopFilters({
|
|
|
14261
14385
|
);
|
|
14262
14386
|
}) }, attr.key);
|
|
14263
14387
|
}),
|
|
14264
|
-
showPriceGroup && /* @__PURE__ */
|
|
14388
|
+
showPriceGroup && /* @__PURE__ */ jsx14(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14265
14389
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14266
14390
|
const nextMin = isActive ? void 0 : band.min;
|
|
14267
14391
|
const nextMax = isActive ? void 0 : band.max;
|
|
14268
|
-
return /* @__PURE__ */
|
|
14392
|
+
return /* @__PURE__ */ jsx14(
|
|
14269
14393
|
OptionLink,
|
|
14270
14394
|
{
|
|
14271
14395
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14276,7 +14400,7 @@ function ShopFilters({
|
|
|
14276
14400
|
i
|
|
14277
14401
|
);
|
|
14278
14402
|
}) }),
|
|
14279
|
-
hasOnSale && /* @__PURE__ */
|
|
14403
|
+
hasOnSale && /* @__PURE__ */ jsx14(
|
|
14280
14404
|
OptionLink,
|
|
14281
14405
|
{
|
|
14282
14406
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14285,7 +14409,7 @@ function ShopFilters({
|
|
|
14285
14409
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14286
14410
|
}
|
|
14287
14411
|
),
|
|
14288
|
-
/* @__PURE__ */
|
|
14412
|
+
/* @__PURE__ */ jsx14(
|
|
14289
14413
|
"a",
|
|
14290
14414
|
{
|
|
14291
14415
|
href: hrefs.clearAll(),
|
|
@@ -14301,8 +14425,8 @@ function ShopFilters({
|
|
|
14301
14425
|
}
|
|
14302
14426
|
|
|
14303
14427
|
// src/components/cart-line-list.tsx
|
|
14304
|
-
import { cn as
|
|
14305
|
-
import { jsx as
|
|
14428
|
+
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14429
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14306
14430
|
var DEFAULT_LABELS2 = {
|
|
14307
14431
|
quantityLabel: "Cantidad",
|
|
14308
14432
|
decrease: "Reducir cantidad",
|
|
@@ -14328,9 +14452,9 @@ function CartLineList({
|
|
|
14328
14452
|
}) {
|
|
14329
14453
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14330
14454
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14331
|
-
return /* @__PURE__ */
|
|
14332
|
-
/* @__PURE__ */
|
|
14333
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14455
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn12("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14456
|
+
/* @__PURE__ */ jsx15("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14457
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx15(
|
|
14334
14458
|
"div",
|
|
14335
14459
|
{
|
|
14336
14460
|
role: "status",
|
|
@@ -14339,33 +14463,33 @@ function CartLineList({
|
|
|
14339
14463
|
children: noticeContent
|
|
14340
14464
|
}
|
|
14341
14465
|
),
|
|
14342
|
-
/* @__PURE__ */
|
|
14466
|
+
/* @__PURE__ */ jsx15("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14343
14467
|
const maxQty = item.maxStock ?? Infinity;
|
|
14344
14468
|
const atMax = item.quantity >= maxQty;
|
|
14345
14469
|
const atMin = item.quantity <= 1;
|
|
14346
14470
|
const message = lineMessage?.(item);
|
|
14347
|
-
return /* @__PURE__ */
|
|
14471
|
+
return /* @__PURE__ */ jsxs13(
|
|
14348
14472
|
"li",
|
|
14349
14473
|
{
|
|
14350
14474
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14351
14475
|
children: [
|
|
14352
|
-
/* @__PURE__ */
|
|
14353
|
-
/* @__PURE__ */
|
|
14354
|
-
/* @__PURE__ */
|
|
14355
|
-
item.variantName && /* @__PURE__ */
|
|
14356
|
-
/* @__PURE__ */
|
|
14476
|
+
/* @__PURE__ */ jsx15("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx15("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14477
|
+
/* @__PURE__ */ jsxs13("div", { className: "min-w-0 flex-1", children: [
|
|
14478
|
+
/* @__PURE__ */ jsx15("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14479
|
+
item.variantName && /* @__PURE__ */ jsx15("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14480
|
+
/* @__PURE__ */ jsxs13("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14357
14481
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14358
14482
|
" ",
|
|
14359
14483
|
t.unitPriceSuffix
|
|
14360
14484
|
] }),
|
|
14361
|
-
/* @__PURE__ */
|
|
14485
|
+
/* @__PURE__ */ jsxs13(
|
|
14362
14486
|
"div",
|
|
14363
14487
|
{
|
|
14364
14488
|
role: "group",
|
|
14365
14489
|
"aria-label": t.quantityLabel,
|
|
14366
14490
|
className: "mt-3 flex items-center gap-3",
|
|
14367
14491
|
children: [
|
|
14368
|
-
/* @__PURE__ */
|
|
14492
|
+
/* @__PURE__ */ jsx15(
|
|
14369
14493
|
"button",
|
|
14370
14494
|
{
|
|
14371
14495
|
type: "button",
|
|
@@ -14376,8 +14500,8 @@ function CartLineList({
|
|
|
14376
14500
|
children: "\u2212"
|
|
14377
14501
|
}
|
|
14378
14502
|
),
|
|
14379
|
-
/* @__PURE__ */
|
|
14380
|
-
/* @__PURE__ */
|
|
14503
|
+
/* @__PURE__ */ jsx15("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14504
|
+
/* @__PURE__ */ jsx15(
|
|
14381
14505
|
"button",
|
|
14382
14506
|
{
|
|
14383
14507
|
type: "button",
|
|
@@ -14388,7 +14512,7 @@ function CartLineList({
|
|
|
14388
14512
|
children: "+"
|
|
14389
14513
|
}
|
|
14390
14514
|
),
|
|
14391
|
-
onRemove && /* @__PURE__ */
|
|
14515
|
+
onRemove && /* @__PURE__ */ jsx15(
|
|
14392
14516
|
"button",
|
|
14393
14517
|
{
|
|
14394
14518
|
type: "button",
|
|
@@ -14401,7 +14525,7 @@ function CartLineList({
|
|
|
14401
14525
|
]
|
|
14402
14526
|
}
|
|
14403
14527
|
),
|
|
14404
|
-
message != null && message !== false && /* @__PURE__ */
|
|
14528
|
+
message != null && message !== false && /* @__PURE__ */ jsx15(
|
|
14405
14529
|
"p",
|
|
14406
14530
|
{
|
|
14407
14531
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -14410,7 +14534,7 @@ function CartLineList({
|
|
|
14410
14534
|
}
|
|
14411
14535
|
)
|
|
14412
14536
|
] }),
|
|
14413
|
-
/* @__PURE__ */
|
|
14537
|
+
/* @__PURE__ */ jsx15("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx15("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14414
14538
|
]
|
|
14415
14539
|
},
|
|
14416
14540
|
lineKey(item.productId, item.variantId)
|
|
@@ -14420,8 +14544,8 @@ function CartLineList({
|
|
|
14420
14544
|
}
|
|
14421
14545
|
|
|
14422
14546
|
// src/components/cart-summary.tsx
|
|
14423
|
-
import { cn as
|
|
14424
|
-
import { jsx as
|
|
14547
|
+
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14548
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14425
14549
|
var DEFAULT_LABELS3 = {
|
|
14426
14550
|
subtotal: "Subtotal",
|
|
14427
14551
|
discountPrefix: "Descuento",
|
|
@@ -14448,40 +14572,40 @@ function CartSummary({
|
|
|
14448
14572
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14449
14573
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14450
14574
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14451
|
-
const breakdown = /* @__PURE__ */
|
|
14575
|
+
const breakdown = /* @__PURE__ */ jsxs14(
|
|
14452
14576
|
"dl",
|
|
14453
14577
|
{
|
|
14454
|
-
className:
|
|
14578
|
+
className: cn13("space-y-2 text-sm", !hasNotice && className),
|
|
14455
14579
|
"data-slot": "cart-summary",
|
|
14456
14580
|
children: [
|
|
14457
|
-
/* @__PURE__ */
|
|
14458
|
-
/* @__PURE__ */
|
|
14459
|
-
/* @__PURE__ */
|
|
14581
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14582
|
+
/* @__PURE__ */ jsx16("dt", { children: t.subtotal }),
|
|
14583
|
+
/* @__PURE__ */ jsx16("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14460
14584
|
] }),
|
|
14461
|
-
hasDiscount && /* @__PURE__ */
|
|
14462
|
-
/* @__PURE__ */
|
|
14585
|
+
hasDiscount && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14586
|
+
/* @__PURE__ */ jsxs14("dt", { children: [
|
|
14463
14587
|
t.discountPrefix,
|
|
14464
14588
|
discountCode ? ` (${discountCode})` : ""
|
|
14465
14589
|
] }),
|
|
14466
|
-
/* @__PURE__ */
|
|
14590
|
+
/* @__PURE__ */ jsxs14("dd", { children: [
|
|
14467
14591
|
"-",
|
|
14468
14592
|
formatPrice(discount, currencyCode, locale)
|
|
14469
14593
|
] })
|
|
14470
14594
|
] }),
|
|
14471
|
-
shippingEnabled && /* @__PURE__ */
|
|
14472
|
-
/* @__PURE__ */
|
|
14473
|
-
/* @__PURE__ */
|
|
14595
|
+
shippingEnabled && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14596
|
+
/* @__PURE__ */ jsx16("dt", { children: t.shipping }),
|
|
14597
|
+
/* @__PURE__ */ jsx16("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14474
14598
|
] }),
|
|
14475
|
-
/* @__PURE__ */
|
|
14476
|
-
/* @__PURE__ */
|
|
14477
|
-
/* @__PURE__ */
|
|
14599
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14600
|
+
/* @__PURE__ */ jsx16("dt", { children: t.total }),
|
|
14601
|
+
/* @__PURE__ */ jsx16("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14478
14602
|
] })
|
|
14479
14603
|
]
|
|
14480
14604
|
}
|
|
14481
14605
|
);
|
|
14482
14606
|
if (!hasNotice) return breakdown;
|
|
14483
|
-
return /* @__PURE__ */
|
|
14484
|
-
/* @__PURE__ */
|
|
14607
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn13("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14608
|
+
/* @__PURE__ */ jsx16(
|
|
14485
14609
|
"div",
|
|
14486
14610
|
{
|
|
14487
14611
|
role: "status",
|
|
@@ -14495,8 +14619,8 @@ function CartSummary({
|
|
|
14495
14619
|
}
|
|
14496
14620
|
|
|
14497
14621
|
// src/components/cart-adjustments-notice.tsx
|
|
14498
|
-
import { cn as
|
|
14499
|
-
import { jsx as
|
|
14622
|
+
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14623
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
14500
14624
|
var DEFAULT_LABELS4 = {
|
|
14501
14625
|
removed: (names) => names.length === 1 ? `Hemos quitado del carrito: ${names[0]}, ya no est\xE1 disponible.` : `Hemos quitado del carrito: ${names.join(", ")}, ya no est\xE1n disponibles.`,
|
|
14502
14626
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -14530,20 +14654,20 @@ function CartAdjustmentsNotice({
|
|
|
14530
14654
|
);
|
|
14531
14655
|
}
|
|
14532
14656
|
if (messages.length === 0) return null;
|
|
14533
|
-
return /* @__PURE__ */
|
|
14657
|
+
return /* @__PURE__ */ jsx17(
|
|
14534
14658
|
"div",
|
|
14535
14659
|
{
|
|
14536
14660
|
role: "status",
|
|
14537
|
-
className:
|
|
14661
|
+
className: cn14("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
14538
14662
|
"data-slot": "cart-adjustments-notice",
|
|
14539
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
14663
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx17("p", { children: messages[0] }) : /* @__PURE__ */ jsx17("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx17("li", { children: message }, index)) })
|
|
14540
14664
|
}
|
|
14541
14665
|
);
|
|
14542
14666
|
}
|
|
14543
14667
|
|
|
14544
14668
|
// src/components/added-to-cart-toast.tsx
|
|
14545
|
-
import { cn as
|
|
14546
|
-
import { jsx as
|
|
14669
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14670
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14547
14671
|
var DEFAULT_LABELS5 = {
|
|
14548
14672
|
success: "A\xF1adido al carrito",
|
|
14549
14673
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -14563,12 +14687,12 @@ function AddedToCartToast({
|
|
|
14563
14687
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14564
14688
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14565
14689
|
const variant = status === "success" ? "success" : "error";
|
|
14566
|
-
return /* @__PURE__ */
|
|
14690
|
+
return /* @__PURE__ */ jsxs15(
|
|
14567
14691
|
"div",
|
|
14568
14692
|
{
|
|
14569
14693
|
"data-slot": "added-to-cart-toast",
|
|
14570
14694
|
"data-variant": variant,
|
|
14571
|
-
className:
|
|
14695
|
+
className: cn15(
|
|
14572
14696
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14573
14697
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14574
14698
|
variant === "error" && "border-destructive/30",
|
|
@@ -14576,20 +14700,20 @@ function AddedToCartToast({
|
|
|
14576
14700
|
),
|
|
14577
14701
|
children: [
|
|
14578
14702
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14579
|
-
/* @__PURE__ */
|
|
14580
|
-
/* @__PURE__ */
|
|
14581
|
-
/* @__PURE__ */
|
|
14582
|
-
/* @__PURE__ */
|
|
14703
|
+
/* @__PURE__ */ jsx18("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14704
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1", children: [
|
|
14705
|
+
/* @__PURE__ */ jsx18("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14706
|
+
/* @__PURE__ */ jsx18("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14583
14707
|
] }),
|
|
14584
|
-
/* @__PURE__ */
|
|
14708
|
+
/* @__PURE__ */ jsx18("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx18("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14585
14709
|
]
|
|
14586
14710
|
}
|
|
14587
14711
|
);
|
|
14588
14712
|
}
|
|
14589
14713
|
|
|
14590
14714
|
// src/components/checkout-login-prompt.tsx
|
|
14591
|
-
import { cn as
|
|
14592
|
-
import { Fragment as Fragment3, jsx as
|
|
14715
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14716
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14593
14717
|
var DEFAULT_LABELS6 = {
|
|
14594
14718
|
title: "Identificaci\xF3n",
|
|
14595
14719
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14616,26 +14740,26 @@ function CheckoutLoginPrompt({
|
|
|
14616
14740
|
if (!open) return null;
|
|
14617
14741
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
14618
14742
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14619
|
-
return /* @__PURE__ */
|
|
14620
|
-
/* @__PURE__ */
|
|
14621
|
-
/* @__PURE__ */
|
|
14743
|
+
return /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
14744
|
+
/* @__PURE__ */ jsx19("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14745
|
+
/* @__PURE__ */ jsxs16(
|
|
14622
14746
|
"div",
|
|
14623
14747
|
{
|
|
14624
14748
|
role: "dialog",
|
|
14625
14749
|
"aria-modal": "true",
|
|
14626
14750
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14627
14751
|
"data-slot": "checkout-login-prompt",
|
|
14628
|
-
className:
|
|
14752
|
+
className: cn16(
|
|
14629
14753
|
"fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2 space-y-5 rounded-2xl border border-border bg-background p-6 shadow-2xl",
|
|
14630
14754
|
className
|
|
14631
14755
|
),
|
|
14632
14756
|
children: [
|
|
14633
|
-
/* @__PURE__ */
|
|
14634
|
-
/* @__PURE__ */
|
|
14635
|
-
/* @__PURE__ */
|
|
14636
|
-
/* @__PURE__ */
|
|
14757
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14758
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
14759
|
+
/* @__PURE__ */ jsx19("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14760
|
+
/* @__PURE__ */ jsx19("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14637
14761
|
] }),
|
|
14638
|
-
/* @__PURE__ */
|
|
14762
|
+
/* @__PURE__ */ jsx19(
|
|
14639
14763
|
"button",
|
|
14640
14764
|
{
|
|
14641
14765
|
type: "button",
|
|
@@ -14646,9 +14770,9 @@ function CheckoutLoginPrompt({
|
|
|
14646
14770
|
}
|
|
14647
14771
|
)
|
|
14648
14772
|
] }),
|
|
14649
|
-
/* @__PURE__ */
|
|
14650
|
-
/* @__PURE__ */
|
|
14651
|
-
/* @__PURE__ */
|
|
14773
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
|
|
14774
|
+
/* @__PURE__ */ jsx19("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14775
|
+
/* @__PURE__ */ jsx19(
|
|
14652
14776
|
"input",
|
|
14653
14777
|
{
|
|
14654
14778
|
id: "checkout-login-prompt-email",
|
|
@@ -14657,29 +14781,29 @@ function CheckoutLoginPrompt({
|
|
|
14657
14781
|
value: email,
|
|
14658
14782
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14659
14783
|
placeholder: t.emailPlaceholder,
|
|
14660
|
-
className:
|
|
14784
|
+
className: cn16(
|
|
14661
14785
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14662
14786
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14663
14787
|
)
|
|
14664
14788
|
}
|
|
14665
14789
|
),
|
|
14666
|
-
error && /* @__PURE__ */
|
|
14790
|
+
error && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: error })
|
|
14667
14791
|
] }),
|
|
14668
|
-
/* @__PURE__ */
|
|
14669
|
-
/* @__PURE__ */
|
|
14792
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
|
|
14793
|
+
/* @__PURE__ */ jsx19(
|
|
14670
14794
|
"button",
|
|
14671
14795
|
{
|
|
14672
14796
|
type: "button",
|
|
14673
14797
|
onClick: onSubmitEmail,
|
|
14674
14798
|
disabled: checking || !isValidEmail,
|
|
14675
|
-
className:
|
|
14799
|
+
className: cn16(
|
|
14676
14800
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14677
14801
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14678
14802
|
),
|
|
14679
14803
|
children: checking ? t.checking : t.continueWithEmail
|
|
14680
14804
|
}
|
|
14681
14805
|
),
|
|
14682
|
-
/* @__PURE__ */
|
|
14806
|
+
/* @__PURE__ */ jsx19(
|
|
14683
14807
|
"button",
|
|
14684
14808
|
{
|
|
14685
14809
|
type: "button",
|
|
@@ -14696,9 +14820,9 @@ function CheckoutLoginPrompt({
|
|
|
14696
14820
|
}
|
|
14697
14821
|
|
|
14698
14822
|
// src/components/checkout-form.tsx
|
|
14699
|
-
import { cn as
|
|
14823
|
+
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
14700
14824
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14701
|
-
import { Fragment as Fragment4, jsx as
|
|
14825
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14702
14826
|
var DEFAULT_LABELS7 = {
|
|
14703
14827
|
contactTitle: "Datos de contacto",
|
|
14704
14828
|
nameLabel: "Nombre completo",
|
|
@@ -14752,22 +14876,22 @@ function CheckoutForm({
|
|
|
14752
14876
|
event.preventDefault();
|
|
14753
14877
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14754
14878
|
}
|
|
14755
|
-
return /* @__PURE__ */
|
|
14879
|
+
return /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
14756
14880
|
loginPrompt,
|
|
14757
|
-
/* @__PURE__ */
|
|
14881
|
+
/* @__PURE__ */ jsxs17(
|
|
14758
14882
|
"form",
|
|
14759
14883
|
{
|
|
14760
14884
|
"data-testid": "checkout-form",
|
|
14761
14885
|
onSubmit,
|
|
14762
|
-
className:
|
|
14886
|
+
className: cn17("space-y-8", className),
|
|
14763
14887
|
"data-slot": "checkout-form",
|
|
14764
14888
|
children: [
|
|
14765
|
-
/* @__PURE__ */
|
|
14766
|
-
/* @__PURE__ */
|
|
14767
|
-
/* @__PURE__ */
|
|
14768
|
-
/* @__PURE__ */
|
|
14769
|
-
/* @__PURE__ */
|
|
14770
|
-
/* @__PURE__ */
|
|
14889
|
+
/* @__PURE__ */ jsxs17("section", { className: "space-y-4", children: [
|
|
14890
|
+
/* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
14891
|
+
/* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
14892
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
|
|
14893
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
14894
|
+
/* @__PURE__ */ jsx20(
|
|
14771
14895
|
"input",
|
|
14772
14896
|
{
|
|
14773
14897
|
id: "checkout-form-name",
|
|
@@ -14776,17 +14900,17 @@ function CheckoutForm({
|
|
|
14776
14900
|
value: contact.name,
|
|
14777
14901
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
14778
14902
|
placeholder: t.namePlaceholder,
|
|
14779
|
-
className:
|
|
14903
|
+
className: cn17(
|
|
14780
14904
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14781
14905
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
14782
14906
|
)
|
|
14783
14907
|
}
|
|
14784
14908
|
),
|
|
14785
|
-
contactErrors?.name && /* @__PURE__ */
|
|
14909
|
+
contactErrors?.name && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14786
14910
|
] }),
|
|
14787
|
-
/* @__PURE__ */
|
|
14788
|
-
/* @__PURE__ */
|
|
14789
|
-
/* @__PURE__ */
|
|
14911
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
|
|
14912
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14913
|
+
/* @__PURE__ */ jsx20(
|
|
14790
14914
|
"input",
|
|
14791
14915
|
{
|
|
14792
14916
|
id: "checkout-form-email",
|
|
@@ -14795,15 +14919,15 @@ function CheckoutForm({
|
|
|
14795
14919
|
value: contact.email,
|
|
14796
14920
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
14797
14921
|
placeholder: t.emailPlaceholder,
|
|
14798
|
-
className:
|
|
14922
|
+
className: cn17(
|
|
14799
14923
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14800
14924
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
14801
14925
|
)
|
|
14802
14926
|
}
|
|
14803
14927
|
),
|
|
14804
|
-
contactErrors?.email && /* @__PURE__ */
|
|
14928
|
+
contactErrors?.email && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
14805
14929
|
] }),
|
|
14806
|
-
/* @__PURE__ */
|
|
14930
|
+
/* @__PURE__ */ jsx20("div", { className: "space-y-1", children: /* @__PURE__ */ jsx20(
|
|
14807
14931
|
PhoneInput,
|
|
14808
14932
|
{
|
|
14809
14933
|
id: "checkout-form-phone",
|
|
@@ -14817,15 +14941,15 @@ function CheckoutForm({
|
|
|
14817
14941
|
] })
|
|
14818
14942
|
] }),
|
|
14819
14943
|
children2,
|
|
14820
|
-
generalError ? /* @__PURE__ */
|
|
14821
|
-
/* @__PURE__ */
|
|
14822
|
-
/* @__PURE__ */
|
|
14823
|
-
appliedDiscount ? /* @__PURE__ */
|
|
14824
|
-
/* @__PURE__ */
|
|
14825
|
-
/* @__PURE__ */
|
|
14826
|
-
/* @__PURE__ */
|
|
14944
|
+
generalError ? /* @__PURE__ */ jsx20("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
14945
|
+
/* @__PURE__ */ jsxs17("section", { className: "space-y-3", children: [
|
|
14946
|
+
/* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
14947
|
+
appliedDiscount ? /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between rounded-lg border border-green-200 bg-green-50 px-4 py-3 dark:border-green-800 dark:bg-green-900/20", children: [
|
|
14948
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
14949
|
+
/* @__PURE__ */ jsx20("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
14950
|
+
/* @__PURE__ */ jsx20("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
14827
14951
|
] }),
|
|
14828
|
-
/* @__PURE__ */
|
|
14952
|
+
/* @__PURE__ */ jsx20(
|
|
14829
14953
|
"button",
|
|
14830
14954
|
{
|
|
14831
14955
|
type: "button",
|
|
@@ -14835,9 +14959,9 @@ function CheckoutForm({
|
|
|
14835
14959
|
children: t.removeDiscount
|
|
14836
14960
|
}
|
|
14837
14961
|
)
|
|
14838
|
-
] }) : /* @__PURE__ */
|
|
14839
|
-
/* @__PURE__ */
|
|
14840
|
-
/* @__PURE__ */
|
|
14962
|
+
] }) : /* @__PURE__ */ jsxs17("div", { className: "flex gap-2", children: [
|
|
14963
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
14964
|
+
/* @__PURE__ */ jsx20(
|
|
14841
14965
|
"input",
|
|
14842
14966
|
{
|
|
14843
14967
|
id: "checkout-form-discount-code",
|
|
@@ -14849,7 +14973,7 @@ function CheckoutForm({
|
|
|
14849
14973
|
className: "flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm uppercase transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
14850
14974
|
}
|
|
14851
14975
|
),
|
|
14852
|
-
/* @__PURE__ */
|
|
14976
|
+
/* @__PURE__ */ jsx20(
|
|
14853
14977
|
"button",
|
|
14854
14978
|
{
|
|
14855
14979
|
type: "button",
|
|
@@ -14860,14 +14984,14 @@ function CheckoutForm({
|
|
|
14860
14984
|
}
|
|
14861
14985
|
)
|
|
14862
14986
|
] }),
|
|
14863
|
-
discountError && /* @__PURE__ */
|
|
14987
|
+
discountError && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: discountError })
|
|
14864
14988
|
] }),
|
|
14865
|
-
/* @__PURE__ */
|
|
14989
|
+
/* @__PURE__ */ jsx20(
|
|
14866
14990
|
"button",
|
|
14867
14991
|
{
|
|
14868
14992
|
type: "submit",
|
|
14869
14993
|
disabled: submitting || submitDisabled,
|
|
14870
|
-
className:
|
|
14994
|
+
className: cn17(
|
|
14871
14995
|
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
14872
14996
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14873
14997
|
),
|
|
@@ -14881,11 +15005,11 @@ function CheckoutForm({
|
|
|
14881
15005
|
}
|
|
14882
15006
|
|
|
14883
15007
|
// src/components/order-confirmation.tsx
|
|
14884
|
-
import { cn as
|
|
15008
|
+
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
14885
15009
|
|
|
14886
15010
|
// src/components/order-invoice-link.tsx
|
|
14887
|
-
import { cn as
|
|
14888
|
-
import { jsx as
|
|
15011
|
+
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15012
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14889
15013
|
var DEFAULT_LABELS8 = {
|
|
14890
15014
|
linkLabel: "Descargar la factura {number}",
|
|
14891
15015
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -14893,8 +15017,8 @@ var DEFAULT_LABELS8 = {
|
|
|
14893
15017
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
14894
15018
|
if (!invoice) return null;
|
|
14895
15019
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
14896
|
-
return /* @__PURE__ */
|
|
14897
|
-
/* @__PURE__ */
|
|
15020
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn18("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15021
|
+
/* @__PURE__ */ jsx21(
|
|
14898
15022
|
"a",
|
|
14899
15023
|
{
|
|
14900
15024
|
href: invoice.url,
|
|
@@ -14902,12 +15026,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
14902
15026
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
14903
15027
|
}
|
|
14904
15028
|
),
|
|
14905
|
-
/* @__PURE__ */
|
|
15029
|
+
/* @__PURE__ */ jsx21("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
14906
15030
|
] });
|
|
14907
15031
|
}
|
|
14908
15032
|
|
|
14909
15033
|
// src/components/order-confirmation.tsx
|
|
14910
|
-
import { jsx as
|
|
15034
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
14911
15035
|
var DEFAULT_LABELS9 = {
|
|
14912
15036
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
14913
15037
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -14971,43 +15095,43 @@ function OrderConfirmation({
|
|
|
14971
15095
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
14972
15096
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
14973
15097
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
14974
|
-
return /* @__PURE__ */
|
|
14975
|
-
/* @__PURE__ */
|
|
14976
|
-
/* @__PURE__ */
|
|
14977
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
14978
|
-
/* @__PURE__ */
|
|
14979
|
-
/* @__PURE__ */
|
|
14980
|
-
/* @__PURE__ */
|
|
15098
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn19("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15099
|
+
/* @__PURE__ */ jsx22("h1", { className: "text-3xl font-bold", children: title }),
|
|
15100
|
+
/* @__PURE__ */ jsx22("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15101
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs19("div", { className: "space-y-6", children: [
|
|
15102
|
+
/* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15103
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15104
|
+
/* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
14981
15105
|
] }),
|
|
14982
|
-
/* @__PURE__ */
|
|
14983
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15106
|
+
/* @__PURE__ */ jsxs19("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15107
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs19(
|
|
14984
15108
|
"div",
|
|
14985
15109
|
{
|
|
14986
15110
|
className: "flex justify-between gap-4 text-sm",
|
|
14987
15111
|
children: [
|
|
14988
|
-
/* @__PURE__ */
|
|
15112
|
+
/* @__PURE__ */ jsxs19("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
14989
15113
|
item.product.name,
|
|
14990
15114
|
item.variant ? ` (${item.variant.name})` : "",
|
|
14991
15115
|
" x",
|
|
14992
15116
|
item.quantity
|
|
14993
15117
|
] }),
|
|
14994
|
-
/* @__PURE__ */
|
|
15118
|
+
/* @__PURE__ */ jsx22("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
14995
15119
|
]
|
|
14996
15120
|
},
|
|
14997
15121
|
idx
|
|
14998
15122
|
)),
|
|
14999
|
-
/* @__PURE__ */
|
|
15000
|
-
/* @__PURE__ */
|
|
15001
|
-
/* @__PURE__ */
|
|
15123
|
+
/* @__PURE__ */ jsx22("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15124
|
+
/* @__PURE__ */ jsx22("span", { children: t.totalLabel }),
|
|
15125
|
+
/* @__PURE__ */ jsx22("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15002
15126
|
] }) })
|
|
15003
15127
|
] }),
|
|
15004
|
-
/* @__PURE__ */
|
|
15128
|
+
/* @__PURE__ */ jsxs19("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15005
15129
|
t.confirmationEmailPrefix,
|
|
15006
15130
|
" ",
|
|
15007
|
-
/* @__PURE__ */
|
|
15131
|
+
/* @__PURE__ */ jsx22("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15008
15132
|
"."
|
|
15009
15133
|
] }),
|
|
15010
|
-
/* @__PURE__ */
|
|
15134
|
+
/* @__PURE__ */ jsx22(
|
|
15011
15135
|
OrderInvoiceLink,
|
|
15012
15136
|
{
|
|
15013
15137
|
invoice: order.invoice,
|
|
@@ -15015,11 +15139,11 @@ function OrderConfirmation({
|
|
|
15015
15139
|
}
|
|
15016
15140
|
)
|
|
15017
15141
|
] }),
|
|
15018
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15019
|
-
/* @__PURE__ */
|
|
15020
|
-
/* @__PURE__ */
|
|
15142
|
+
showOrderReference && order && /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15143
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15144
|
+
/* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15021
15145
|
] }),
|
|
15022
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15146
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx22(
|
|
15023
15147
|
"a",
|
|
15024
15148
|
{
|
|
15025
15149
|
href: cartHref,
|
|
@@ -15027,7 +15151,7 @@ function OrderConfirmation({
|
|
|
15027
15151
|
children: t.backToCartLabel
|
|
15028
15152
|
}
|
|
15029
15153
|
),
|
|
15030
|
-
showRecheck && /* @__PURE__ */
|
|
15154
|
+
showRecheck && /* @__PURE__ */ jsx22(
|
|
15031
15155
|
"button",
|
|
15032
15156
|
{
|
|
15033
15157
|
type: "button",
|
|
@@ -15036,16 +15160,16 @@ function OrderConfirmation({
|
|
|
15036
15160
|
children: t.recheckLabel
|
|
15037
15161
|
}
|
|
15038
15162
|
),
|
|
15039
|
-
showSessionReference && /* @__PURE__ */
|
|
15040
|
-
/* @__PURE__ */
|
|
15041
|
-
/* @__PURE__ */
|
|
15163
|
+
showSessionReference && /* @__PURE__ */ jsxs19("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15164
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15165
|
+
/* @__PURE__ */ jsx22("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15042
15166
|
] })
|
|
15043
15167
|
] });
|
|
15044
15168
|
}
|
|
15045
15169
|
|
|
15046
15170
|
// src/components/full-invoice-fields.tsx
|
|
15047
|
-
import { cn as
|
|
15048
|
-
import { jsx as
|
|
15171
|
+
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15172
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15049
15173
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15050
15174
|
wantsFullInvoice: false,
|
|
15051
15175
|
billingIdType: "NIF",
|
|
@@ -15162,12 +15286,12 @@ function FullInvoiceFields({
|
|
|
15162
15286
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15163
15287
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15164
15288
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15165
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15289
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx23("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15166
15290
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15167
|
-
return /* @__PURE__ */
|
|
15168
|
-
overCap ? /* @__PURE__ */
|
|
15169
|
-
/* @__PURE__ */
|
|
15170
|
-
/* @__PURE__ */
|
|
15291
|
+
return /* @__PURE__ */ jsxs20("section", { className: cn20("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15292
|
+
overCap ? /* @__PURE__ */ jsx23("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15293
|
+
/* @__PURE__ */ jsxs20("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15294
|
+
/* @__PURE__ */ jsx23(
|
|
15171
15295
|
"input",
|
|
15172
15296
|
{
|
|
15173
15297
|
type: "checkbox",
|
|
@@ -15177,12 +15301,12 @@ function FullInvoiceFields({
|
|
|
15177
15301
|
),
|
|
15178
15302
|
t.toggle
|
|
15179
15303
|
] }),
|
|
15180
|
-
/* @__PURE__ */
|
|
15304
|
+
/* @__PURE__ */ jsx23("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15181
15305
|
] }),
|
|
15182
|
-
showFields && /* @__PURE__ */
|
|
15183
|
-
/* @__PURE__ */
|
|
15184
|
-
/* @__PURE__ */
|
|
15185
|
-
/* @__PURE__ */
|
|
15306
|
+
showFields && /* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15307
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15308
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15309
|
+
/* @__PURE__ */ jsx23(
|
|
15186
15310
|
"select",
|
|
15187
15311
|
{
|
|
15188
15312
|
id: "full-invoice-id-type",
|
|
@@ -15191,14 +15315,14 @@ function FullInvoiceFields({
|
|
|
15191
15315
|
value: value.billingIdType,
|
|
15192
15316
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15193
15317
|
...invalid2("billingIdType"),
|
|
15194
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15318
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx23("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15195
15319
|
}
|
|
15196
15320
|
),
|
|
15197
15321
|
error("billingIdType")
|
|
15198
15322
|
] }),
|
|
15199
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15200
|
-
/* @__PURE__ */
|
|
15201
|
-
/* @__PURE__ */
|
|
15323
|
+
!isSpanishNif && /* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15324
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15325
|
+
/* @__PURE__ */ jsxs20(
|
|
15202
15326
|
"select",
|
|
15203
15327
|
{
|
|
15204
15328
|
id: "full-invoice-id-country",
|
|
@@ -15208,16 +15332,16 @@ function FullInvoiceFields({
|
|
|
15208
15332
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15209
15333
|
...invalid2("billingIdCountry"),
|
|
15210
15334
|
children: [
|
|
15211
|
-
/* @__PURE__ */
|
|
15212
|
-
countries.map((c) => /* @__PURE__ */
|
|
15335
|
+
/* @__PURE__ */ jsx23("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15336
|
+
countries.map((c) => /* @__PURE__ */ jsx23("option", { value: c.code, children: c.name }, c.code))
|
|
15213
15337
|
]
|
|
15214
15338
|
}
|
|
15215
15339
|
),
|
|
15216
15340
|
error("billingIdCountry")
|
|
15217
15341
|
] }),
|
|
15218
|
-
/* @__PURE__ */
|
|
15219
|
-
/* @__PURE__ */
|
|
15220
|
-
/* @__PURE__ */
|
|
15342
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15343
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15344
|
+
/* @__PURE__ */ jsx23(
|
|
15221
15345
|
"input",
|
|
15222
15346
|
{
|
|
15223
15347
|
id: "full-invoice-nif",
|
|
@@ -15230,9 +15354,9 @@ function FullInvoiceFields({
|
|
|
15230
15354
|
),
|
|
15231
15355
|
error("billingNif")
|
|
15232
15356
|
] }),
|
|
15233
|
-
/* @__PURE__ */
|
|
15234
|
-
/* @__PURE__ */
|
|
15235
|
-
/* @__PURE__ */
|
|
15357
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15358
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15359
|
+
/* @__PURE__ */ jsx23(
|
|
15236
15360
|
"input",
|
|
15237
15361
|
{
|
|
15238
15362
|
id: "full-invoice-name",
|
|
@@ -15245,9 +15369,9 @@ function FullInvoiceFields({
|
|
|
15245
15369
|
),
|
|
15246
15370
|
error("billingName")
|
|
15247
15371
|
] }),
|
|
15248
|
-
/* @__PURE__ */
|
|
15249
|
-
/* @__PURE__ */
|
|
15250
|
-
/* @__PURE__ */
|
|
15372
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15373
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15374
|
+
/* @__PURE__ */ jsx23(
|
|
15251
15375
|
"input",
|
|
15252
15376
|
{
|
|
15253
15377
|
id: "full-invoice-street",
|
|
@@ -15259,9 +15383,9 @@ function FullInvoiceFields({
|
|
|
15259
15383
|
}
|
|
15260
15384
|
)
|
|
15261
15385
|
] }),
|
|
15262
|
-
/* @__PURE__ */
|
|
15263
|
-
/* @__PURE__ */
|
|
15264
|
-
/* @__PURE__ */
|
|
15386
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15387
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15388
|
+
/* @__PURE__ */ jsx23(
|
|
15265
15389
|
"input",
|
|
15266
15390
|
{
|
|
15267
15391
|
id: "full-invoice-postal-code",
|
|
@@ -15272,9 +15396,9 @@ function FullInvoiceFields({
|
|
|
15272
15396
|
}
|
|
15273
15397
|
)
|
|
15274
15398
|
] }),
|
|
15275
|
-
/* @__PURE__ */
|
|
15276
|
-
/* @__PURE__ */
|
|
15277
|
-
/* @__PURE__ */
|
|
15399
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15400
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15401
|
+
/* @__PURE__ */ jsx23(
|
|
15278
15402
|
"input",
|
|
15279
15403
|
{
|
|
15280
15404
|
id: "full-invoice-city",
|
|
@@ -15285,9 +15409,9 @@ function FullInvoiceFields({
|
|
|
15285
15409
|
}
|
|
15286
15410
|
)
|
|
15287
15411
|
] }),
|
|
15288
|
-
/* @__PURE__ */
|
|
15289
|
-
/* @__PURE__ */
|
|
15290
|
-
/* @__PURE__ */
|
|
15412
|
+
/* @__PURE__ */ jsxs20("div", { className: "space-y-1", children: [
|
|
15413
|
+
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15414
|
+
/* @__PURE__ */ jsx23(
|
|
15291
15415
|
"select",
|
|
15292
15416
|
{
|
|
15293
15417
|
id: "full-invoice-country",
|
|
@@ -15295,11 +15419,11 @@ function FullInvoiceFields({
|
|
|
15295
15419
|
required: true,
|
|
15296
15420
|
value: value.country,
|
|
15297
15421
|
onChange: (e) => set("country", e.target.value),
|
|
15298
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
15422
|
+
children: countries.map((c) => /* @__PURE__ */ jsx23("option", { value: c.code, children: c.name }, c.code))
|
|
15299
15423
|
}
|
|
15300
15424
|
)
|
|
15301
15425
|
] }),
|
|
15302
|
-
/* @__PURE__ */
|
|
15426
|
+
/* @__PURE__ */ jsx23("div", { className: "sm:col-span-2", children: error("address") })
|
|
15303
15427
|
] })
|
|
15304
15428
|
] });
|
|
15305
15429
|
}
|
|
@@ -15316,6 +15440,8 @@ export {
|
|
|
15316
15440
|
DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE,
|
|
15317
15441
|
DEFAULT_SHOP_ERROR_MESSAGES,
|
|
15318
15442
|
DEFAULT_SHOP_PRICE_BANDS,
|
|
15443
|
+
DEFAULT_TRUST_BADGE_HEADINGS,
|
|
15444
|
+
DEFAULT_TRUST_BADGE_TYPE_ORDER,
|
|
15319
15445
|
DEFAULT_TRUST_ICONS,
|
|
15320
15446
|
EMPTY_FULL_INVOICE_VALUE,
|
|
15321
15447
|
FaqAccordion,
|
|
@@ -15333,6 +15459,7 @@ export {
|
|
|
15333
15459
|
ShopFilters,
|
|
15334
15460
|
Specialty,
|
|
15335
15461
|
Treatment,
|
|
15462
|
+
TrustBadges,
|
|
15336
15463
|
buildFaqPageJsonLd,
|
|
15337
15464
|
buildShareUrls,
|
|
15338
15465
|
collectFaqItems,
|