@reblu/site-blocks 0.16.0 → 0.17.1
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 +17 -0
- package/README.md +16 -0
- package/dist/index.cjs +96 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +208 -115
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -13129,11 +13129,21 @@ function slotClassName(structural, defaults, consumer) {
|
|
|
13129
13129
|
}
|
|
13130
13130
|
|
|
13131
13131
|
// src/components/markdown-renderer.tsx
|
|
13132
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
13132
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13133
13133
|
var HTML_TO_DOM_OPTIONS = { lowerCaseAttributeNames: false };
|
|
13134
13134
|
function parse3(html5, options) {
|
|
13135
13135
|
return domToReact(htmlToDOM(html5, HTML_TO_DOM_OPTIONS), options);
|
|
13136
13136
|
}
|
|
13137
|
+
function isAllowedImage(src, prefixes) {
|
|
13138
|
+
if (!src) return false;
|
|
13139
|
+
let url;
|
|
13140
|
+
try {
|
|
13141
|
+
url = new URL(src);
|
|
13142
|
+
} catch {
|
|
13143
|
+
return false;
|
|
13144
|
+
}
|
|
13145
|
+
return prefixes.some((prefix) => url.href.startsWith(prefix));
|
|
13146
|
+
}
|
|
13137
13147
|
var HEADING_CLASSES = {
|
|
13138
13148
|
1: "text-3xl font-bold mt-8 mb-4 first:mt-0",
|
|
13139
13149
|
2: "text-2xl font-bold mt-7 mb-3 first:mt-0",
|
|
@@ -13180,13 +13190,60 @@ function authorAttributes(el) {
|
|
|
13180
13190
|
}
|
|
13181
13191
|
return preserved;
|
|
13182
13192
|
}
|
|
13193
|
+
var CELL_ALIGN_CLASSES = {
|
|
13194
|
+
left: "text-left",
|
|
13195
|
+
center: "text-center",
|
|
13196
|
+
right: "text-right"
|
|
13197
|
+
};
|
|
13198
|
+
function cellAlignClass(align) {
|
|
13199
|
+
return align ? CELL_ALIGN_CLASSES[align.toLowerCase()] : void 0;
|
|
13200
|
+
}
|
|
13183
13201
|
function isExternalHref(href) {
|
|
13184
13202
|
return !!href && /^(https?:)?\/\//.test(href);
|
|
13185
13203
|
}
|
|
13186
|
-
function
|
|
13204
|
+
function soleImage(p2) {
|
|
13205
|
+
let image = null;
|
|
13206
|
+
for (const child of p2.children) {
|
|
13207
|
+
if (child instanceof Element) {
|
|
13208
|
+
if (child.name !== "img" || image) return null;
|
|
13209
|
+
image = child;
|
|
13210
|
+
} else if (child.type !== "text" || child.data?.trim()) {
|
|
13211
|
+
return null;
|
|
13212
|
+
}
|
|
13213
|
+
}
|
|
13214
|
+
return image;
|
|
13215
|
+
}
|
|
13216
|
+
function buildOptions(headingOffset, images) {
|
|
13217
|
+
const renderImage = (img) => {
|
|
13218
|
+
if (!images || !isAllowedImage(img.attribs.src, images.allowedUrlPrefixes)) return null;
|
|
13219
|
+
const image = { src: img.attribs.src, alt: img.attribs.alt ?? "" };
|
|
13220
|
+
if (images.render) return /* @__PURE__ */ jsx(Fragment, { children: images.render(image) });
|
|
13221
|
+
return /* @__PURE__ */ jsx(
|
|
13222
|
+
"img",
|
|
13223
|
+
{
|
|
13224
|
+
src: image.src,
|
|
13225
|
+
alt: image.alt,
|
|
13226
|
+
loading: "lazy",
|
|
13227
|
+
decoding: "async",
|
|
13228
|
+
className: "rounded-lg w-full h-auto"
|
|
13229
|
+
}
|
|
13230
|
+
);
|
|
13231
|
+
};
|
|
13187
13232
|
const options = {
|
|
13188
13233
|
replace: (node) => {
|
|
13189
13234
|
if (!(node instanceof Element)) return void 0;
|
|
13235
|
+
if (images && node.name === "p") {
|
|
13236
|
+
const img = soleImage(node);
|
|
13237
|
+
if (img) {
|
|
13238
|
+
const rendered = renderImage(img);
|
|
13239
|
+
if (rendered === null) return /* @__PURE__ */ jsx(Fragment, {});
|
|
13240
|
+
const caption = img.attribs.title?.trim();
|
|
13241
|
+
return /* @__PURE__ */ jsxs("figure", { className: "my-8", children: [
|
|
13242
|
+
rendered,
|
|
13243
|
+
caption ? /* @__PURE__ */ jsx("figcaption", { className: "mt-2 text-center text-sm text-muted-foreground", children: caption }) : null
|
|
13244
|
+
] });
|
|
13245
|
+
}
|
|
13246
|
+
}
|
|
13190
13247
|
const children2 = () => domToReact(node.children, options);
|
|
13191
13248
|
const { name, attribs } = node;
|
|
13192
13249
|
const author = authorAttributes(node);
|
|
@@ -13245,6 +13302,7 @@ function buildOptions(headingOffset) {
|
|
|
13245
13302
|
);
|
|
13246
13303
|
}
|
|
13247
13304
|
case "img":
|
|
13305
|
+
if (images) return renderImage(node) ?? /* @__PURE__ */ jsx(Fragment, {});
|
|
13248
13306
|
if (!attribs.src) return /* @__PURE__ */ jsx(Fragment, {});
|
|
13249
13307
|
return (
|
|
13250
13308
|
// Plain <img> keeps the block portable — a distributable can't assume a
|
|
@@ -13273,6 +13331,36 @@ function buildOptions(headingOffset) {
|
|
|
13273
13331
|
className: "absolute inset-0 h-full w-full border-0"
|
|
13274
13332
|
}
|
|
13275
13333
|
) });
|
|
13334
|
+
// GFM tables (a cookie policy's cookie list, a price table). The table scrolls
|
|
13335
|
+
// inside its own wrapper so a wide one never pushes the page sideways on a phone.
|
|
13336
|
+
case "table":
|
|
13337
|
+
return /* @__PURE__ */ jsx("div", { className: "my-6 w-full overflow-x-auto", children: /* @__PURE__ */ jsx("table", { ...author, className: "w-full border-collapse text-sm", children: children2() }) });
|
|
13338
|
+
case "thead":
|
|
13339
|
+
return /* @__PURE__ */ jsx("thead", { ...author, className: "bg-muted", children: children2() });
|
|
13340
|
+
case "tbody":
|
|
13341
|
+
return /* @__PURE__ */ jsx("tbody", { ...author, children: children2() });
|
|
13342
|
+
case "tr":
|
|
13343
|
+
return /* @__PURE__ */ jsx("tr", { ...author, children: children2() });
|
|
13344
|
+
case "th":
|
|
13345
|
+
return /* @__PURE__ */ jsx(
|
|
13346
|
+
"th",
|
|
13347
|
+
{
|
|
13348
|
+
...author,
|
|
13349
|
+
className: `border border-border px-3 py-2 font-semibold text-foreground ${cellAlignClass(attribs.align) ?? "text-left"}`,
|
|
13350
|
+
children: children2()
|
|
13351
|
+
}
|
|
13352
|
+
);
|
|
13353
|
+
case "td": {
|
|
13354
|
+
const align = cellAlignClass(attribs.align);
|
|
13355
|
+
return /* @__PURE__ */ jsx(
|
|
13356
|
+
"td",
|
|
13357
|
+
{
|
|
13358
|
+
...author,
|
|
13359
|
+
className: `border border-border px-3 py-2 align-top text-foreground/90${align ? ` ${align}` : ""}`,
|
|
13360
|
+
children: children2()
|
|
13361
|
+
}
|
|
13362
|
+
);
|
|
13363
|
+
}
|
|
13276
13364
|
case "hr":
|
|
13277
13365
|
return /* @__PURE__ */ jsx("hr", { ...author, className: "my-8 border-muted-foreground/30" });
|
|
13278
13366
|
case "strong":
|
|
@@ -13288,10 +13376,15 @@ function buildOptions(headingOffset) {
|
|
|
13288
13376
|
};
|
|
13289
13377
|
return options;
|
|
13290
13378
|
}
|
|
13291
|
-
function MarkdownRenderer({
|
|
13379
|
+
function MarkdownRenderer({
|
|
13380
|
+
content,
|
|
13381
|
+
className,
|
|
13382
|
+
headingOffset = 0,
|
|
13383
|
+
images
|
|
13384
|
+
}) {
|
|
13292
13385
|
const html5 = markdownToSafeHtml(content);
|
|
13293
13386
|
if (!html5) return null;
|
|
13294
|
-
return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset)) });
|
|
13387
|
+
return /* @__PURE__ */ jsx("div", { className: slotClassName("max-w-none", "", className), "data-slot": "markdown", children: parse3(html5, buildOptions(headingOffset, images)) });
|
|
13295
13388
|
}
|
|
13296
13389
|
function SafeHtml({ html: html5, className, headingOffset = 0 }) {
|
|
13297
13390
|
if (!html5) return null;
|
|
@@ -13299,7 +13392,7 @@ function SafeHtml({ html: html5, className, headingOffset = 0 }) {
|
|
|
13299
13392
|
}
|
|
13300
13393
|
|
|
13301
13394
|
// src/components/course-description.tsx
|
|
13302
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
13395
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
13303
13396
|
function isVisiblyEmpty(html5) {
|
|
13304
13397
|
if (/<(img|iframe|hr)\b/i.test(html5)) return false;
|
|
13305
13398
|
return html5.replace(/<[^>]*>/g, "").trim() === "";
|
|
@@ -13330,7 +13423,7 @@ function CourseDescription({
|
|
|
13330
13423
|
return /* @__PURE__ */ jsx2("div", { "data-slot": "course-description", className, children: body3 });
|
|
13331
13424
|
}
|
|
13332
13425
|
const Tag = `h${headingLevel}`;
|
|
13333
|
-
return /* @__PURE__ */
|
|
13426
|
+
return /* @__PURE__ */ jsxs2(
|
|
13334
13427
|
"section",
|
|
13335
13428
|
{
|
|
13336
13429
|
"data-slot": "course-description",
|
|
@@ -13350,7 +13443,7 @@ import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
|
13350
13443
|
// src/components/_page-parts.tsx
|
|
13351
13444
|
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13352
13445
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13353
|
-
import { Fragment as Fragment2, jsx as jsx3, jsxs as
|
|
13446
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13354
13447
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13355
13448
|
"default",
|
|
13356
13449
|
"destructive",
|
|
@@ -13363,7 +13456,7 @@ function toButtonVariant(variant) {
|
|
|
13363
13456
|
return variant && KNOWN_BUTTON_VARIANTS.has(variant) ? variant : "default";
|
|
13364
13457
|
}
|
|
13365
13458
|
function PageHero({ page }) {
|
|
13366
|
-
return /* @__PURE__ */
|
|
13459
|
+
return /* @__PURE__ */ jsxs3("header", { className: "space-y-4", children: [
|
|
13367
13460
|
page.category && /* @__PURE__ */ jsx3("span", { className: "inline-flex items-center rounded-full bg-secondary px-3 py-1 text-sm font-medium text-secondary-foreground", children: page.category.name }),
|
|
13368
13461
|
/* @__PURE__ */ jsx3("h1", { className: "text-4xl font-bold tracking-tight", children: page.title }),
|
|
13369
13462
|
page.subtitle && /* @__PURE__ */ jsx3("p", { className: "text-lg text-muted-foreground", children: page.subtitle }),
|
|
@@ -13396,7 +13489,7 @@ function SectionCta({ section }) {
|
|
|
13396
13489
|
}
|
|
13397
13490
|
function SectionImages({ section }) {
|
|
13398
13491
|
if (section.images.length === 0) return null;
|
|
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__ */
|
|
13492
|
+
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__ */ jsxs3("figure", { className: "space-y-1", children: [
|
|
13400
13493
|
/* @__PURE__ */ jsx3("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx3("img", { src: img.url, alt: img.alt, loading: "lazy", className: "h-full w-full object-cover" }) }),
|
|
13401
13494
|
img.caption && /* @__PURE__ */ jsx3("figcaption", { className: "text-sm text-muted-foreground", children: img.caption })
|
|
13402
13495
|
] }, `${img.url}-${img.order}`)) });
|
|
@@ -13405,21 +13498,21 @@ function PageSectionBlock({ section }) {
|
|
|
13405
13498
|
const imageFirst = section.layout === "IMAGE_TEXT";
|
|
13406
13499
|
const sideBySide = section.layout === "TEXT_IMAGE" || section.layout === "IMAGE_TEXT";
|
|
13407
13500
|
const hasImages = section.images.length > 0;
|
|
13408
|
-
const body3 = /* @__PURE__ */
|
|
13501
|
+
const body3 = /* @__PURE__ */ jsxs3("div", { className: "space-y-4", children: [
|
|
13409
13502
|
section.heading && /* @__PURE__ */ jsx3("h2", { className: "text-2xl font-bold", children: section.heading }),
|
|
13410
13503
|
/* @__PURE__ */ jsx3(SafeHtml, { html: sanitizeHtml(section.contentHtml), headingOffset: 2 }),
|
|
13411
13504
|
/* @__PURE__ */ jsx3(SectionCta, { section })
|
|
13412
13505
|
] });
|
|
13413
13506
|
if (sideBySide && hasImages) {
|
|
13414
|
-
return /* @__PURE__ */ jsx3("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */
|
|
13507
|
+
return /* @__PURE__ */ jsx3("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
13415
13508
|
/* @__PURE__ */ jsx3(SectionImages, { section }),
|
|
13416
13509
|
body3
|
|
13417
|
-
] }) : /* @__PURE__ */
|
|
13510
|
+
] }) : /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
13418
13511
|
body3,
|
|
13419
13512
|
/* @__PURE__ */ jsx3(SectionImages, { section })
|
|
13420
13513
|
] }) });
|
|
13421
13514
|
}
|
|
13422
|
-
return /* @__PURE__ */
|
|
13515
|
+
return /* @__PURE__ */ jsxs3("section", { className: "space-y-4", children: [
|
|
13423
13516
|
body3,
|
|
13424
13517
|
/* @__PURE__ */ jsx3(SectionImages, { section })
|
|
13425
13518
|
] });
|
|
@@ -13431,9 +13524,9 @@ function PageSectionList({ sections }) {
|
|
|
13431
13524
|
}
|
|
13432
13525
|
|
|
13433
13526
|
// src/components/treatment.tsx
|
|
13434
|
-
import { jsx as jsx4, jsxs as
|
|
13527
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
13435
13528
|
function Treatment({ page, className }) {
|
|
13436
|
-
return /* @__PURE__ */
|
|
13529
|
+
return /* @__PURE__ */ jsxs4("article", { className: cn3("space-y-12", className), "data-slot": "treatment", children: [
|
|
13437
13530
|
/* @__PURE__ */ jsx4(PageHero, { page }),
|
|
13438
13531
|
/* @__PURE__ */ jsx4(PageSectionList, { sections: page.sections })
|
|
13439
13532
|
] });
|
|
@@ -13444,7 +13537,7 @@ import { cn as cn5 } from "@reblu/site-ui/utils";
|
|
|
13444
13537
|
|
|
13445
13538
|
// src/components/page-card-grid.tsx
|
|
13446
13539
|
import { cn as cn4 } from "@reblu/site-ui/utils";
|
|
13447
|
-
import { jsx as jsx5, jsxs as
|
|
13540
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
13448
13541
|
var defaultPageHref = (page) => `/${page.slug}`;
|
|
13449
13542
|
var pageKey = (page) => `${page.category?.slug ?? ""}/${page.slug}`;
|
|
13450
13543
|
function PageCardGrid(props) {
|
|
@@ -13459,9 +13552,9 @@ function PageCardGridSection({
|
|
|
13459
13552
|
}) {
|
|
13460
13553
|
if (pages.length === 0) return null;
|
|
13461
13554
|
const showHeading = keepEmptyHeading ? heading !== void 0 : !!heading;
|
|
13462
|
-
return /* @__PURE__ */
|
|
13555
|
+
return /* @__PURE__ */ jsxs5("section", { className: cn4("space-y-6", className), children: [
|
|
13463
13556
|
showHeading && /* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold", children: heading }),
|
|
13464
|
-
/* @__PURE__ */ jsx5("ul", { className: "grid list-none grid-cols-1 gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3", children: pages.map((page) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */
|
|
13557
|
+
/* @__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__ */ jsxs5(
|
|
13465
13558
|
"a",
|
|
13466
13559
|
{
|
|
13467
13560
|
href: pageHref(page),
|
|
@@ -13476,7 +13569,7 @@ function PageCardGridSection({
|
|
|
13476
13569
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13477
13570
|
}
|
|
13478
13571
|
) }),
|
|
13479
|
-
/* @__PURE__ */
|
|
13572
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13480
13573
|
/* @__PURE__ */ jsx5("h3", { className: "font-semibold leading-tight transition-colors group-hover:text-primary", children: page.title }),
|
|
13481
13574
|
page.excerpt && /* @__PURE__ */ jsx5("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: page.excerpt })
|
|
13482
13575
|
] })
|
|
@@ -13487,7 +13580,7 @@ function PageCardGridSection({
|
|
|
13487
13580
|
}
|
|
13488
13581
|
|
|
13489
13582
|
// src/components/parent-page.tsx
|
|
13490
|
-
import { jsx as jsx6, jsxs as
|
|
13583
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13491
13584
|
var defaultChildPageHref = (slug) => `/${slug}`;
|
|
13492
13585
|
function ParentPage({
|
|
13493
13586
|
page,
|
|
@@ -13502,7 +13595,7 @@ function ParentPage({
|
|
|
13502
13595
|
const pages = childPages ?? treatments ?? [];
|
|
13503
13596
|
const hrefFor = childPageHref ?? treatmentHref ?? defaultChildPageHref;
|
|
13504
13597
|
const label = childPagesLabel ?? treatmentsLabel ?? "Treatments";
|
|
13505
|
-
return /* @__PURE__ */
|
|
13598
|
+
return /* @__PURE__ */ jsxs6("article", { className: cn5("space-y-12", className), "data-slot": "specialty", children: [
|
|
13506
13599
|
/* @__PURE__ */ jsx6(PageHero, { page }),
|
|
13507
13600
|
/* @__PURE__ */ jsx6(PageSectionList, { sections: page.sections }),
|
|
13508
13601
|
/* @__PURE__ */ jsx6(
|
|
@@ -13522,13 +13615,13 @@ var Specialty = ParentPage;
|
|
|
13522
13615
|
|
|
13523
13616
|
// src/components/profile-card.tsx
|
|
13524
13617
|
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13525
|
-
import { jsx as jsx7, jsxs as
|
|
13618
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13526
13619
|
function initials(name) {
|
|
13527
13620
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13528
13621
|
}
|
|
13529
13622
|
function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, className }) {
|
|
13530
13623
|
const NameTag = href ? "a" : "span";
|
|
13531
|
-
return /* @__PURE__ */
|
|
13624
|
+
return /* @__PURE__ */ jsxs7(
|
|
13532
13625
|
"article",
|
|
13533
13626
|
{
|
|
13534
13627
|
className: cn6(
|
|
@@ -13538,7 +13631,7 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13538
13631
|
"data-slot": "profile-card",
|
|
13539
13632
|
children: [
|
|
13540
13633
|
/* @__PURE__ */ jsx7("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx7("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx7("span", { className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground", "aria-hidden": "true", children: initials(name) }) }),
|
|
13541
|
-
/* @__PURE__ */
|
|
13634
|
+
/* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
|
|
13542
13635
|
/* @__PURE__ */ jsx7("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx7(
|
|
13543
13636
|
NameTag,
|
|
13544
13637
|
{
|
|
@@ -13564,11 +13657,11 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13564
13657
|
|
|
13565
13658
|
// src/components/product-card.tsx
|
|
13566
13659
|
import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
13567
|
-
import { jsx as jsx8, jsxs as
|
|
13660
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13568
13661
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13569
13662
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13570
13663
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13571
|
-
return /* @__PURE__ */
|
|
13664
|
+
return /* @__PURE__ */ jsxs8(
|
|
13572
13665
|
"article",
|
|
13573
13666
|
{
|
|
13574
13667
|
className: cn7(
|
|
@@ -13586,11 +13679,11 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13586
13679
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13587
13680
|
}
|
|
13588
13681
|
) : /* @__PURE__ */ jsx8("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13589
|
-
/* @__PURE__ */
|
|
13682
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13590
13683
|
product.category && /* @__PURE__ */ jsx8("span", { className: "inline-flex w-fit items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground", children: product.category.name }),
|
|
13591
13684
|
/* @__PURE__ */ jsx8("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx8("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13592
13685
|
product.shortDescription && /* @__PURE__ */ jsx8("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13593
|
-
/* @__PURE__ */
|
|
13686
|
+
/* @__PURE__ */ jsxs8("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13594
13687
|
/* @__PURE__ */ jsx8("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13595
13688
|
hasDiscount && /* @__PURE__ */ jsx8("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13596
13689
|
] })
|
|
@@ -13794,7 +13887,7 @@ var __iconNode8 = [
|
|
|
13794
13887
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13795
13888
|
|
|
13796
13889
|
// src/components/product-trust-items.tsx
|
|
13797
|
-
import { jsx as jsx9, jsxs as
|
|
13890
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13798
13891
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13799
13892
|
shipping: Truck,
|
|
13800
13893
|
returns: RotateCcw,
|
|
@@ -13828,7 +13921,7 @@ function ProductTrustItems({
|
|
|
13828
13921
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13829
13922
|
});
|
|
13830
13923
|
if (rows.length === 0) return null;
|
|
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__ */
|
|
13924
|
+
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__ */ jsxs9("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
13832
13925
|
/* @__PURE__ */ jsx9(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13833
13926
|
/* @__PURE__ */ jsx9("span", { children: text3 })
|
|
13834
13927
|
] }, key2)) });
|
|
@@ -13852,7 +13945,7 @@ function Heading({
|
|
|
13852
13945
|
}
|
|
13853
13946
|
|
|
13854
13947
|
// src/components/faq-accordion.tsx
|
|
13855
|
-
import { jsx as jsx11, jsxs as
|
|
13948
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13856
13949
|
function FaqAccordion({
|
|
13857
13950
|
items,
|
|
13858
13951
|
heading,
|
|
@@ -13863,16 +13956,16 @@ function FaqAccordion({
|
|
|
13863
13956
|
}) {
|
|
13864
13957
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13865
13958
|
if (visible.length === 0) return null;
|
|
13866
|
-
return /* @__PURE__ */
|
|
13959
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn8("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
13867
13960
|
heading && /* @__PURE__ */ jsx11(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
13868
|
-
/* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */
|
|
13961
|
+
/* @__PURE__ */ jsx11("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs10(
|
|
13869
13962
|
"details",
|
|
13870
13963
|
{
|
|
13871
13964
|
className: "group px-4",
|
|
13872
13965
|
"data-slot": "faq-item",
|
|
13873
13966
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13874
13967
|
children: [
|
|
13875
|
-
/* @__PURE__ */
|
|
13968
|
+
/* @__PURE__ */ jsxs10("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 py-4 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring [&::-webkit-details-marker]:hidden", children: [
|
|
13876
13969
|
questionHeadingLevel ? /* @__PURE__ */ jsx11(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx11("span", { children: item.q }),
|
|
13877
13970
|
/* @__PURE__ */ jsx11(
|
|
13878
13971
|
"span",
|
|
@@ -13893,7 +13986,7 @@ function FaqAccordion({
|
|
|
13893
13986
|
|
|
13894
13987
|
// src/components/trust-badges.tsx
|
|
13895
13988
|
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13896
|
-
import { jsx as jsx12, jsxs as
|
|
13989
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13897
13990
|
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
13898
13991
|
{
|
|
13899
13992
|
PARTNER: "Colaboradores",
|
|
@@ -13974,7 +14067,7 @@ function TrustBadges({
|
|
|
13974
14067
|
if (groups.length === 0) return null;
|
|
13975
14068
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13976
14069
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
13977
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */
|
|
14070
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs11(
|
|
13978
14071
|
"div",
|
|
13979
14072
|
{
|
|
13980
14073
|
"data-slot": "trust-badge-group",
|
|
@@ -13995,7 +14088,7 @@ function TrustBadges({
|
|
|
13995
14088
|
) : null,
|
|
13996
14089
|
/* @__PURE__ */ jsx12("ul", { className: cn9("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
13997
14090
|
const href = safeHref(badge.url);
|
|
13998
|
-
return /* @__PURE__ */ jsx12("li", { children: href ? /* @__PURE__ */
|
|
14091
|
+
return /* @__PURE__ */ jsx12("li", { children: href ? /* @__PURE__ */ jsxs11("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
13999
14092
|
/* @__PURE__ */ jsx12(BadgeContent, { badge, logoClassName }),
|
|
14000
14093
|
" ",
|
|
14001
14094
|
/* @__PURE__ */ jsx12("span", { className: "sr-only", children: newWindowLabel })
|
|
@@ -14009,7 +14102,7 @@ function TrustBadges({
|
|
|
14009
14102
|
return /* @__PURE__ */ jsx12("div", { "data-slot": "trust-badges", className: cn9("space-y-6", className), children: content });
|
|
14010
14103
|
}
|
|
14011
14104
|
const Tag = `h${headingLevel}`;
|
|
14012
|
-
return /* @__PURE__ */
|
|
14105
|
+
return /* @__PURE__ */ jsxs11(
|
|
14013
14106
|
"section",
|
|
14014
14107
|
{
|
|
14015
14108
|
"data-slot": "trust-badges",
|
|
@@ -14033,14 +14126,14 @@ function TrustBadges({
|
|
|
14033
14126
|
// src/components/page-blocks.tsx
|
|
14034
14127
|
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
14035
14128
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14036
|
-
import { jsx as jsx13, jsxs as
|
|
14129
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14037
14130
|
var ALIASES = {
|
|
14038
14131
|
doctor_embed: "profile_embed",
|
|
14039
14132
|
specialty_embed: "page_embed"
|
|
14040
14133
|
};
|
|
14041
14134
|
function HeroBlock({ block, headingLevel }) {
|
|
14042
14135
|
const { title, subtitle, imageUrl } = block.data;
|
|
14043
|
-
return /* @__PURE__ */
|
|
14136
|
+
return /* @__PURE__ */ jsxs12("div", { className: "space-y-4", children: [
|
|
14044
14137
|
/* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14045
14138
|
subtitle && /* @__PURE__ */ jsx13("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14046
14139
|
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" }) })
|
|
@@ -14053,16 +14146,16 @@ function FaqBlock({ block }) {
|
|
|
14053
14146
|
return /* @__PURE__ */ jsx13(FaqAccordion, { items: block.data.items });
|
|
14054
14147
|
}
|
|
14055
14148
|
function StatsBlock({ block }) {
|
|
14056
|
-
return /* @__PURE__ */ jsx13("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */
|
|
14149
|
+
return /* @__PURE__ */ jsx13("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs12("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14057
14150
|
/* @__PURE__ */ jsx13("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14058
14151
|
/* @__PURE__ */ jsx13("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14059
14152
|
] }, i)) });
|
|
14060
14153
|
}
|
|
14061
14154
|
function TestimonialBlock({ block }) {
|
|
14062
14155
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14063
|
-
return /* @__PURE__ */
|
|
14156
|
+
return /* @__PURE__ */ jsxs12("figure", { className: "space-y-4", children: [
|
|
14064
14157
|
/* @__PURE__ */ jsx13("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx13("p", { children: quote }) }),
|
|
14065
|
-
/* @__PURE__ */
|
|
14158
|
+
/* @__PURE__ */ jsxs12("figcaption", { className: "flex items-center gap-3", children: [
|
|
14066
14159
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14067
14160
|
/* @__PURE__ */ jsx13(
|
|
14068
14161
|
"img",
|
|
@@ -14073,7 +14166,7 @@ function TestimonialBlock({ block }) {
|
|
|
14073
14166
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14074
14167
|
}
|
|
14075
14168
|
),
|
|
14076
|
-
/* @__PURE__ */
|
|
14169
|
+
/* @__PURE__ */ jsxs12("span", { children: [
|
|
14077
14170
|
/* @__PURE__ */ jsx13("span", { className: "font-semibold", children: author }),
|
|
14078
14171
|
role && /* @__PURE__ */ jsx13("span", { className: "block text-sm opacity-80", children: role })
|
|
14079
14172
|
] })
|
|
@@ -14095,7 +14188,7 @@ function GalleryBlock({ block }) {
|
|
|
14095
14188
|
"grid gap-4",
|
|
14096
14189
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14097
14190
|
),
|
|
14098
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14191
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs12("figure", { className: "space-y-1", children: [
|
|
14099
14192
|
/* @__PURE__ */ jsx13("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx13(
|
|
14100
14193
|
"img",
|
|
14101
14194
|
{
|
|
@@ -14115,7 +14208,7 @@ function EmbedCard({
|
|
|
14115
14208
|
headingLevel,
|
|
14116
14209
|
embedHref
|
|
14117
14210
|
}) {
|
|
14118
|
-
return /* @__PURE__ */
|
|
14211
|
+
return /* @__PURE__ */ jsxs12(
|
|
14119
14212
|
"a",
|
|
14120
14213
|
{
|
|
14121
14214
|
href: embedHref(resolved),
|
|
@@ -14130,7 +14223,7 @@ function EmbedCard({
|
|
|
14130
14223
|
className: "h-full w-full object-cover"
|
|
14131
14224
|
}
|
|
14132
14225
|
) }),
|
|
14133
|
-
/* @__PURE__ */
|
|
14226
|
+
/* @__PURE__ */ jsxs12("div", { className: "space-y-1 p-4", children: [
|
|
14134
14227
|
/* @__PURE__ */ jsx13(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14135
14228
|
resolved.role && /* @__PURE__ */ jsx13("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14136
14229
|
resolved.excerpt && /* @__PURE__ */ jsx13("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
@@ -14237,7 +14330,7 @@ function PageBlocks({
|
|
|
14237
14330
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14238
14331
|
const background = block.backgroundColor;
|
|
14239
14332
|
return [
|
|
14240
|
-
/* @__PURE__ */
|
|
14333
|
+
/* @__PURE__ */ jsxs12(
|
|
14241
14334
|
"section",
|
|
14242
14335
|
{
|
|
14243
14336
|
"data-slot": "page-block",
|
|
@@ -14268,7 +14361,7 @@ function PageBlocks({
|
|
|
14268
14361
|
|
|
14269
14362
|
// src/components/shop-filters.tsx
|
|
14270
14363
|
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14271
|
-
import { jsx as jsx14, jsxs as
|
|
14364
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14272
14365
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14273
14366
|
{ max: 2500 },
|
|
14274
14367
|
{ min: 2500, max: 5e3 },
|
|
@@ -14330,7 +14423,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14330
14423
|
);
|
|
14331
14424
|
}
|
|
14332
14425
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14333
|
-
return /* @__PURE__ */
|
|
14426
|
+
return /* @__PURE__ */ jsxs13("fieldset", { className: "space-y-2", children: [
|
|
14334
14427
|
/* @__PURE__ */ jsx14("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14335
14428
|
/* @__PURE__ */ jsx14("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14336
14429
|
] });
|
|
@@ -14355,10 +14448,10 @@ function ShopFilters({
|
|
|
14355
14448
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14356
14449
|
return null;
|
|
14357
14450
|
}
|
|
14358
|
-
return /* @__PURE__ */
|
|
14451
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn11("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14359
14452
|
visibleTaxonomies.map((axis) => {
|
|
14360
14453
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14361
|
-
return /* @__PURE__ */
|
|
14454
|
+
return /* @__PURE__ */ jsxs13(FilterFieldset, { legend: axis.label, children: [
|
|
14362
14455
|
/* @__PURE__ */ jsx14(
|
|
14363
14456
|
OptionLink,
|
|
14364
14457
|
{
|
|
@@ -14455,7 +14548,7 @@ function ShopFilters({
|
|
|
14455
14548
|
|
|
14456
14549
|
// src/components/cart-line-list.tsx
|
|
14457
14550
|
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14458
|
-
import { jsx as jsx15, jsxs as
|
|
14551
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14459
14552
|
var DEFAULT_LABELS2 = {
|
|
14460
14553
|
quantityLabel: "Cantidad",
|
|
14461
14554
|
decrease: "Reducir cantidad",
|
|
@@ -14481,7 +14574,7 @@ function CartLineList({
|
|
|
14481
14574
|
}) {
|
|
14482
14575
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14483
14576
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14484
|
-
return /* @__PURE__ */
|
|
14577
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn12("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14485
14578
|
/* @__PURE__ */ jsx15("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14486
14579
|
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx15(
|
|
14487
14580
|
"div",
|
|
@@ -14497,21 +14590,21 @@ function CartLineList({
|
|
|
14497
14590
|
const atMax = item.quantity >= maxQty;
|
|
14498
14591
|
const atMin = item.quantity <= 1;
|
|
14499
14592
|
const message = lineMessage?.(item);
|
|
14500
|
-
return /* @__PURE__ */
|
|
14593
|
+
return /* @__PURE__ */ jsxs14(
|
|
14501
14594
|
"li",
|
|
14502
14595
|
{
|
|
14503
14596
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14504
14597
|
children: [
|
|
14505
14598
|
/* @__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 }),
|
|
14506
|
-
/* @__PURE__ */
|
|
14599
|
+
/* @__PURE__ */ jsxs14("div", { className: "min-w-0 flex-1", children: [
|
|
14507
14600
|
/* @__PURE__ */ jsx15("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14508
14601
|
item.variantName && /* @__PURE__ */ jsx15("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14509
|
-
/* @__PURE__ */
|
|
14602
|
+
/* @__PURE__ */ jsxs14("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14510
14603
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14511
14604
|
" ",
|
|
14512
14605
|
t.unitPriceSuffix
|
|
14513
14606
|
] }),
|
|
14514
|
-
/* @__PURE__ */
|
|
14607
|
+
/* @__PURE__ */ jsxs14(
|
|
14515
14608
|
"div",
|
|
14516
14609
|
{
|
|
14517
14610
|
role: "group",
|
|
@@ -14574,7 +14667,7 @@ function CartLineList({
|
|
|
14574
14667
|
|
|
14575
14668
|
// src/components/cart-summary.tsx
|
|
14576
14669
|
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14577
|
-
import { jsx as jsx16, jsxs as
|
|
14670
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14578
14671
|
var DEFAULT_LABELS3 = {
|
|
14579
14672
|
subtotal: "Subtotal",
|
|
14580
14673
|
discountPrefix: "Descuento",
|
|
@@ -14601,31 +14694,31 @@ function CartSummary({
|
|
|
14601
14694
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14602
14695
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14603
14696
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14604
|
-
const breakdown = /* @__PURE__ */
|
|
14697
|
+
const breakdown = /* @__PURE__ */ jsxs15(
|
|
14605
14698
|
"dl",
|
|
14606
14699
|
{
|
|
14607
14700
|
className: cn13("space-y-2 text-sm", !hasNotice && className),
|
|
14608
14701
|
"data-slot": "cart-summary",
|
|
14609
14702
|
children: [
|
|
14610
|
-
/* @__PURE__ */
|
|
14703
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14611
14704
|
/* @__PURE__ */ jsx16("dt", { children: t.subtotal }),
|
|
14612
14705
|
/* @__PURE__ */ jsx16("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14613
14706
|
] }),
|
|
14614
|
-
hasDiscount && /* @__PURE__ */
|
|
14615
|
-
/* @__PURE__ */
|
|
14707
|
+
hasDiscount && /* @__PURE__ */ jsxs15("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14708
|
+
/* @__PURE__ */ jsxs15("dt", { children: [
|
|
14616
14709
|
t.discountPrefix,
|
|
14617
14710
|
discountCode ? ` (${discountCode})` : ""
|
|
14618
14711
|
] }),
|
|
14619
|
-
/* @__PURE__ */
|
|
14712
|
+
/* @__PURE__ */ jsxs15("dd", { children: [
|
|
14620
14713
|
"-",
|
|
14621
14714
|
formatPrice(discount, currencyCode, locale)
|
|
14622
14715
|
] })
|
|
14623
14716
|
] }),
|
|
14624
|
-
shippingEnabled && /* @__PURE__ */
|
|
14717
|
+
shippingEnabled && /* @__PURE__ */ jsxs15("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14625
14718
|
/* @__PURE__ */ jsx16("dt", { children: t.shipping }),
|
|
14626
14719
|
/* @__PURE__ */ jsx16("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14627
14720
|
] }),
|
|
14628
|
-
/* @__PURE__ */
|
|
14721
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14629
14722
|
/* @__PURE__ */ jsx16("dt", { children: t.total }),
|
|
14630
14723
|
/* @__PURE__ */ jsx16("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14631
14724
|
] })
|
|
@@ -14633,7 +14726,7 @@ function CartSummary({
|
|
|
14633
14726
|
}
|
|
14634
14727
|
);
|
|
14635
14728
|
if (!hasNotice) return breakdown;
|
|
14636
|
-
return /* @__PURE__ */
|
|
14729
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn13("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14637
14730
|
/* @__PURE__ */ jsx16(
|
|
14638
14731
|
"div",
|
|
14639
14732
|
{
|
|
@@ -14696,7 +14789,7 @@ function CartAdjustmentsNotice({
|
|
|
14696
14789
|
|
|
14697
14790
|
// src/components/added-to-cart-toast.tsx
|
|
14698
14791
|
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14699
|
-
import { jsx as jsx18, jsxs as
|
|
14792
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14700
14793
|
var DEFAULT_LABELS5 = {
|
|
14701
14794
|
success: "A\xF1adido al carrito",
|
|
14702
14795
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -14716,7 +14809,7 @@ function AddedToCartToast({
|
|
|
14716
14809
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14717
14810
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14718
14811
|
const variant = status === "success" ? "success" : "error";
|
|
14719
|
-
return /* @__PURE__ */
|
|
14812
|
+
return /* @__PURE__ */ jsxs16(
|
|
14720
14813
|
"div",
|
|
14721
14814
|
{
|
|
14722
14815
|
"data-slot": "added-to-cart-toast",
|
|
@@ -14730,7 +14823,7 @@ function AddedToCartToast({
|
|
|
14730
14823
|
children: [
|
|
14731
14824
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14732
14825
|
/* @__PURE__ */ jsx18("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14733
|
-
/* @__PURE__ */
|
|
14826
|
+
/* @__PURE__ */ jsxs16("div", { className: "min-w-0 flex-1", children: [
|
|
14734
14827
|
/* @__PURE__ */ jsx18("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14735
14828
|
/* @__PURE__ */ jsx18("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14736
14829
|
] }),
|
|
@@ -14742,7 +14835,7 @@ function AddedToCartToast({
|
|
|
14742
14835
|
|
|
14743
14836
|
// src/components/checkout-login-prompt.tsx
|
|
14744
14837
|
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14745
|
-
import { Fragment as Fragment3, jsx as jsx19, jsxs as
|
|
14838
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14746
14839
|
var DEFAULT_LABELS6 = {
|
|
14747
14840
|
title: "Identificaci\xF3n",
|
|
14748
14841
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14769,9 +14862,9 @@ function CheckoutLoginPrompt({
|
|
|
14769
14862
|
if (!open) return null;
|
|
14770
14863
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
14771
14864
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14772
|
-
return /* @__PURE__ */
|
|
14865
|
+
return /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
14773
14866
|
/* @__PURE__ */ jsx19("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14774
|
-
/* @__PURE__ */
|
|
14867
|
+
/* @__PURE__ */ jsxs17(
|
|
14775
14868
|
"div",
|
|
14776
14869
|
{
|
|
14777
14870
|
role: "dialog",
|
|
@@ -14783,8 +14876,8 @@ function CheckoutLoginPrompt({
|
|
|
14783
14876
|
className
|
|
14784
14877
|
),
|
|
14785
14878
|
children: [
|
|
14786
|
-
/* @__PURE__ */
|
|
14787
|
-
/* @__PURE__ */
|
|
14879
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14880
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
14788
14881
|
/* @__PURE__ */ jsx19("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14789
14882
|
/* @__PURE__ */ jsx19("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14790
14883
|
] }),
|
|
@@ -14799,7 +14892,7 @@ function CheckoutLoginPrompt({
|
|
|
14799
14892
|
}
|
|
14800
14893
|
)
|
|
14801
14894
|
] }),
|
|
14802
|
-
/* @__PURE__ */
|
|
14895
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
14803
14896
|
/* @__PURE__ */ jsx19("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14804
14897
|
/* @__PURE__ */ jsx19(
|
|
14805
14898
|
"input",
|
|
@@ -14818,7 +14911,7 @@ function CheckoutLoginPrompt({
|
|
|
14818
14911
|
),
|
|
14819
14912
|
error && /* @__PURE__ */ jsx19("p", { className: "text-xs text-destructive", children: error })
|
|
14820
14913
|
] }),
|
|
14821
|
-
/* @__PURE__ */
|
|
14914
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
14822
14915
|
/* @__PURE__ */ jsx19(
|
|
14823
14916
|
"button",
|
|
14824
14917
|
{
|
|
@@ -14851,7 +14944,7 @@ function CheckoutLoginPrompt({
|
|
|
14851
14944
|
// src/components/checkout-form.tsx
|
|
14852
14945
|
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
14853
14946
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14854
|
-
import { Fragment as Fragment4, jsx as jsx20, jsxs as
|
|
14947
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14855
14948
|
var DEFAULT_LABELS7 = {
|
|
14856
14949
|
contactTitle: "Datos de contacto",
|
|
14857
14950
|
nameLabel: "Nombre completo",
|
|
@@ -14905,9 +14998,9 @@ function CheckoutForm({
|
|
|
14905
14998
|
event.preventDefault();
|
|
14906
14999
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
14907
15000
|
}
|
|
14908
|
-
return /* @__PURE__ */
|
|
15001
|
+
return /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
14909
15002
|
loginPrompt,
|
|
14910
|
-
/* @__PURE__ */
|
|
15003
|
+
/* @__PURE__ */ jsxs18(
|
|
14911
15004
|
"form",
|
|
14912
15005
|
{
|
|
14913
15006
|
"data-testid": "checkout-form",
|
|
@@ -14915,10 +15008,10 @@ function CheckoutForm({
|
|
|
14915
15008
|
className: cn17("space-y-8", className),
|
|
14916
15009
|
"data-slot": "checkout-form",
|
|
14917
15010
|
children: [
|
|
14918
|
-
/* @__PURE__ */
|
|
15011
|
+
/* @__PURE__ */ jsxs18("section", { className: "space-y-4", children: [
|
|
14919
15012
|
/* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
14920
|
-
/* @__PURE__ */
|
|
14921
|
-
/* @__PURE__ */
|
|
15013
|
+
/* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15014
|
+
/* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
14922
15015
|
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
14923
15016
|
/* @__PURE__ */ jsx20(
|
|
14924
15017
|
"input",
|
|
@@ -14937,7 +15030,7 @@ function CheckoutForm({
|
|
|
14937
15030
|
),
|
|
14938
15031
|
contactErrors?.name && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
14939
15032
|
] }),
|
|
14940
|
-
/* @__PURE__ */
|
|
15033
|
+
/* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
14941
15034
|
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14942
15035
|
/* @__PURE__ */ jsx20(
|
|
14943
15036
|
"input",
|
|
@@ -14971,10 +15064,10 @@ function CheckoutForm({
|
|
|
14971
15064
|
] }),
|
|
14972
15065
|
children2,
|
|
14973
15066
|
generalError ? /* @__PURE__ */ jsx20("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
14974
|
-
/* @__PURE__ */
|
|
15067
|
+
/* @__PURE__ */ jsxs18("section", { className: "space-y-3", children: [
|
|
14975
15068
|
/* @__PURE__ */ jsx20("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
14976
|
-
appliedDiscount ? /* @__PURE__ */
|
|
14977
|
-
/* @__PURE__ */
|
|
15069
|
+
appliedDiscount ? /* @__PURE__ */ jsxs18("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: [
|
|
15070
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
14978
15071
|
/* @__PURE__ */ jsx20("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
14979
15072
|
/* @__PURE__ */ jsx20("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
14980
15073
|
] }),
|
|
@@ -14988,7 +15081,7 @@ function CheckoutForm({
|
|
|
14988
15081
|
children: t.removeDiscount
|
|
14989
15082
|
}
|
|
14990
15083
|
)
|
|
14991
|
-
] }) : /* @__PURE__ */
|
|
15084
|
+
] }) : /* @__PURE__ */ jsxs18("div", { className: "flex gap-2", children: [
|
|
14992
15085
|
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
14993
15086
|
/* @__PURE__ */ jsx20(
|
|
14994
15087
|
"input",
|
|
@@ -15038,7 +15131,7 @@ import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
|
15038
15131
|
|
|
15039
15132
|
// src/components/order-invoice-link.tsx
|
|
15040
15133
|
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15041
|
-
import { jsx as jsx21, jsxs as
|
|
15134
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
15042
15135
|
var DEFAULT_LABELS8 = {
|
|
15043
15136
|
linkLabel: "Descargar la factura {number}",
|
|
15044
15137
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15046,7 +15139,7 @@ var DEFAULT_LABELS8 = {
|
|
|
15046
15139
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15047
15140
|
if (!invoice) return null;
|
|
15048
15141
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15049
|
-
return /* @__PURE__ */
|
|
15142
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn18("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15050
15143
|
/* @__PURE__ */ jsx21(
|
|
15051
15144
|
"a",
|
|
15052
15145
|
{
|
|
@@ -15060,7 +15153,7 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15060
15153
|
}
|
|
15061
15154
|
|
|
15062
15155
|
// src/components/order-confirmation.tsx
|
|
15063
|
-
import { jsx as jsx22, jsxs as
|
|
15156
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15064
15157
|
var DEFAULT_LABELS9 = {
|
|
15065
15158
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15066
15159
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15124,21 +15217,21 @@ function OrderConfirmation({
|
|
|
15124
15217
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15125
15218
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15126
15219
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15127
|
-
return /* @__PURE__ */
|
|
15220
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn19("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15128
15221
|
/* @__PURE__ */ jsx22("h1", { className: "text-3xl font-bold", children: title }),
|
|
15129
15222
|
/* @__PURE__ */ jsx22("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15130
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
15131
|
-
/* @__PURE__ */
|
|
15223
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs20("div", { className: "space-y-6", children: [
|
|
15224
|
+
/* @__PURE__ */ jsxs20("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15132
15225
|
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15133
15226
|
/* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15134
15227
|
] }),
|
|
15135
|
-
/* @__PURE__ */
|
|
15136
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15228
|
+
/* @__PURE__ */ jsxs20("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15229
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs20(
|
|
15137
15230
|
"div",
|
|
15138
15231
|
{
|
|
15139
15232
|
className: "flex justify-between gap-4 text-sm",
|
|
15140
15233
|
children: [
|
|
15141
|
-
/* @__PURE__ */
|
|
15234
|
+
/* @__PURE__ */ jsxs20("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15142
15235
|
item.product.name,
|
|
15143
15236
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15144
15237
|
" x",
|
|
@@ -15149,12 +15242,12 @@ function OrderConfirmation({
|
|
|
15149
15242
|
},
|
|
15150
15243
|
idx
|
|
15151
15244
|
)),
|
|
15152
|
-
/* @__PURE__ */ jsx22("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */
|
|
15245
|
+
/* @__PURE__ */ jsx22("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs20("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15153
15246
|
/* @__PURE__ */ jsx22("span", { children: t.totalLabel }),
|
|
15154
15247
|
/* @__PURE__ */ jsx22("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15155
15248
|
] }) })
|
|
15156
15249
|
] }),
|
|
15157
|
-
/* @__PURE__ */
|
|
15250
|
+
/* @__PURE__ */ jsxs20("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15158
15251
|
t.confirmationEmailPrefix,
|
|
15159
15252
|
" ",
|
|
15160
15253
|
/* @__PURE__ */ jsx22("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
@@ -15168,7 +15261,7 @@ function OrderConfirmation({
|
|
|
15168
15261
|
}
|
|
15169
15262
|
)
|
|
15170
15263
|
] }),
|
|
15171
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15264
|
+
showOrderReference && order && /* @__PURE__ */ jsxs20("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15172
15265
|
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15173
15266
|
/* @__PURE__ */ jsx22("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15174
15267
|
] }),
|
|
@@ -15189,7 +15282,7 @@ function OrderConfirmation({
|
|
|
15189
15282
|
children: t.recheckLabel
|
|
15190
15283
|
}
|
|
15191
15284
|
),
|
|
15192
|
-
showSessionReference && /* @__PURE__ */
|
|
15285
|
+
showSessionReference && /* @__PURE__ */ jsxs20("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15193
15286
|
/* @__PURE__ */ jsx22("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15194
15287
|
/* @__PURE__ */ jsx22("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15195
15288
|
] })
|
|
@@ -15198,7 +15291,7 @@ function OrderConfirmation({
|
|
|
15198
15291
|
|
|
15199
15292
|
// src/components/full-invoice-fields.tsx
|
|
15200
15293
|
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15201
|
-
import { jsx as jsx23, jsxs as
|
|
15294
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15202
15295
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15203
15296
|
wantsFullInvoice: false,
|
|
15204
15297
|
billingIdType: "NIF",
|
|
@@ -15317,9 +15410,9 @@ function FullInvoiceFields({
|
|
|
15317
15410
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15318
15411
|
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx23("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15319
15412
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15320
|
-
return /* @__PURE__ */
|
|
15321
|
-
overCap ? /* @__PURE__ */ jsx23("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */
|
|
15322
|
-
/* @__PURE__ */
|
|
15413
|
+
return /* @__PURE__ */ jsxs21("section", { className: cn20("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15414
|
+
overCap ? /* @__PURE__ */ jsx23("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15415
|
+
/* @__PURE__ */ jsxs21("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15323
15416
|
/* @__PURE__ */ jsx23(
|
|
15324
15417
|
"input",
|
|
15325
15418
|
{
|
|
@@ -15332,8 +15425,8 @@ function FullInvoiceFields({
|
|
|
15332
15425
|
] }),
|
|
15333
15426
|
/* @__PURE__ */ jsx23("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15334
15427
|
] }),
|
|
15335
|
-
showFields && /* @__PURE__ */
|
|
15336
|
-
/* @__PURE__ */
|
|
15428
|
+
showFields && /* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15429
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15337
15430
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15338
15431
|
/* @__PURE__ */ jsx23(
|
|
15339
15432
|
"select",
|
|
@@ -15349,9 +15442,9 @@ function FullInvoiceFields({
|
|
|
15349
15442
|
),
|
|
15350
15443
|
error("billingIdType")
|
|
15351
15444
|
] }),
|
|
15352
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15445
|
+
!isSpanishNif && /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15353
15446
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15354
|
-
/* @__PURE__ */
|
|
15447
|
+
/* @__PURE__ */ jsxs21(
|
|
15355
15448
|
"select",
|
|
15356
15449
|
{
|
|
15357
15450
|
id: "full-invoice-id-country",
|
|
@@ -15368,7 +15461,7 @@ function FullInvoiceFields({
|
|
|
15368
15461
|
),
|
|
15369
15462
|
error("billingIdCountry")
|
|
15370
15463
|
] }),
|
|
15371
|
-
/* @__PURE__ */
|
|
15464
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15372
15465
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15373
15466
|
/* @__PURE__ */ jsx23(
|
|
15374
15467
|
"input",
|
|
@@ -15383,7 +15476,7 @@ function FullInvoiceFields({
|
|
|
15383
15476
|
),
|
|
15384
15477
|
error("billingNif")
|
|
15385
15478
|
] }),
|
|
15386
|
-
/* @__PURE__ */
|
|
15479
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15387
15480
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15388
15481
|
/* @__PURE__ */ jsx23(
|
|
15389
15482
|
"input",
|
|
@@ -15398,7 +15491,7 @@ function FullInvoiceFields({
|
|
|
15398
15491
|
),
|
|
15399
15492
|
error("billingName")
|
|
15400
15493
|
] }),
|
|
15401
|
-
/* @__PURE__ */
|
|
15494
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15402
15495
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15403
15496
|
/* @__PURE__ */ jsx23(
|
|
15404
15497
|
"input",
|
|
@@ -15412,7 +15505,7 @@ function FullInvoiceFields({
|
|
|
15412
15505
|
}
|
|
15413
15506
|
)
|
|
15414
15507
|
] }),
|
|
15415
|
-
/* @__PURE__ */
|
|
15508
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15416
15509
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15417
15510
|
/* @__PURE__ */ jsx23(
|
|
15418
15511
|
"input",
|
|
@@ -15425,7 +15518,7 @@ function FullInvoiceFields({
|
|
|
15425
15518
|
}
|
|
15426
15519
|
)
|
|
15427
15520
|
] }),
|
|
15428
|
-
/* @__PURE__ */
|
|
15521
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15429
15522
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15430
15523
|
/* @__PURE__ */ jsx23(
|
|
15431
15524
|
"input",
|
|
@@ -15438,7 +15531,7 @@ function FullInvoiceFields({
|
|
|
15438
15531
|
}
|
|
15439
15532
|
)
|
|
15440
15533
|
] }),
|
|
15441
|
-
/* @__PURE__ */
|
|
15534
|
+
/* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
|
|
15442
15535
|
/* @__PURE__ */ jsx23("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15443
15536
|
/* @__PURE__ */ jsx23(
|
|
15444
15537
|
"select",
|