@reblu/site-blocks 0.26.0 → 0.28.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 +29 -0
- package/README.md +58 -4
- package/dist/index.cjs +361 -274
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -8
- package/dist/index.d.ts +62 -8
- package/dist/index.js +364 -278
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -13473,9 +13473,11 @@ function CourseDescription({
|
|
|
13473
13473
|
}
|
|
13474
13474
|
|
|
13475
13475
|
// src/components/course-purchase-terms.tsx
|
|
13476
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13476
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
13477
13477
|
var DEFAULT_COURSE_PURCHASE_TERMS_LABELS = {
|
|
13478
13478
|
withdrawalWaiver: "El acceso empieza al comprar: al pagar pides el acceso inmediato y renuncias al derecho de desistimiento de 14 d\xEDas.",
|
|
13479
|
+
serviceStartRequest: "Al pagar pides expresamente que la formaci\xF3n empiece dentro del plazo de desistimiento de 14 d\xEDas.",
|
|
13480
|
+
consentText: (text3) => ` Texto de la casilla: \xAB${text3}\xBB`,
|
|
13479
13481
|
accessDuration: (months) => `Acceso durante ${months} ${months === 1 ? "mes" : "meses"} desde la inscripci\xF3n.`,
|
|
13480
13482
|
refundGuarantee: ({ basis, thresholdPercent, windowDays }) => {
|
|
13481
13483
|
const period = windowDays != null ? ` durante ${windowDays} d\xEDas desde el pago` : "";
|
|
@@ -13496,7 +13498,21 @@ function CoursePurchaseTerms({
|
|
|
13496
13498
|
}) {
|
|
13497
13499
|
const text3 = { ...DEFAULT_COURSE_PURCHASE_TERMS_LABELS, ...labels };
|
|
13498
13500
|
const items = [];
|
|
13499
|
-
if (course.
|
|
13501
|
+
if (course.withdrawalConsent !== void 0) {
|
|
13502
|
+
const consent = course.withdrawalConsent;
|
|
13503
|
+
if (consent) {
|
|
13504
|
+
const line = consent.kind === "SERVICE_START_REQUEST" ? text3.serviceStartRequest : text3.withdrawalWaiver;
|
|
13505
|
+
items.push({
|
|
13506
|
+
// The waiver keeps its REB-1199 slot (existing SITE styles target it).
|
|
13507
|
+
key: consent.kind === "SERVICE_START_REQUEST" ? "service-start-request" : "withdrawal-waiver",
|
|
13508
|
+
kind: consent.kind,
|
|
13509
|
+
node: /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
13510
|
+
line,
|
|
13511
|
+
text3.consentText(consent.text)
|
|
13512
|
+
] })
|
|
13513
|
+
});
|
|
13514
|
+
}
|
|
13515
|
+
} else if (course.withdrawalWaiverRequired === true) {
|
|
13500
13516
|
items.push({ key: "withdrawal-waiver", node: text3.withdrawalWaiver });
|
|
13501
13517
|
}
|
|
13502
13518
|
if (typeof course.accessDurationMonths === "number") {
|
|
@@ -13507,7 +13523,7 @@ function CoursePurchaseTerms({
|
|
|
13507
13523
|
}
|
|
13508
13524
|
if (items.length === 0) return null;
|
|
13509
13525
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
13510
|
-
const list = /* @__PURE__ */ jsx3("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ jsx3("li", { "data-slot": `course-purchase-terms-${item.key}`, children: item.node }, item.key)) });
|
|
13526
|
+
const list = /* @__PURE__ */ jsx3("ul", { className: slotClassName("list-disc space-y-1 pl-5", "text-sm text-muted-foreground", listClassName), children: items.map((item) => /* @__PURE__ */ jsx3("li", { "data-slot": `course-purchase-terms-${item.key}`, "data-kind": item.kind, children: item.node }, item.key)) });
|
|
13511
13527
|
const Tag = `h${headingLevel}`;
|
|
13512
13528
|
return /* @__PURE__ */ jsxs3(
|
|
13513
13529
|
"section",
|
|
@@ -13690,7 +13706,7 @@ import { cn as cn3 } from "@reblu/site-ui/utils";
|
|
|
13690
13706
|
// src/components/_page-parts.tsx
|
|
13691
13707
|
import { cn as cn2 } from "@reblu/site-ui/utils";
|
|
13692
13708
|
import { buttonVariants } from "@reblu/site-ui/button-variants";
|
|
13693
|
-
import { Fragment as
|
|
13709
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
13694
13710
|
var KNOWN_BUTTON_VARIANTS = /* @__PURE__ */ new Set([
|
|
13695
13711
|
"default",
|
|
13696
13712
|
"destructive",
|
|
@@ -13751,10 +13767,10 @@ function PageSectionBlock({ section }) {
|
|
|
13751
13767
|
/* @__PURE__ */ jsx6(SectionCta, { section })
|
|
13752
13768
|
] });
|
|
13753
13769
|
if (sideBySide && hasImages) {
|
|
13754
|
-
return /* @__PURE__ */ jsx6("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs6(
|
|
13770
|
+
return /* @__PURE__ */ jsx6("section", { className: "grid items-center gap-8 md:grid-cols-2", children: imageFirst ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
13755
13771
|
/* @__PURE__ */ jsx6(SectionImages, { section }),
|
|
13756
13772
|
body3
|
|
13757
|
-
] }) : /* @__PURE__ */ jsxs6(
|
|
13773
|
+
] }) : /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
13758
13774
|
body3,
|
|
13759
13775
|
/* @__PURE__ */ jsx6(SectionImages, { section })
|
|
13760
13776
|
] }) });
|
|
@@ -14281,6 +14297,33 @@ function FaqAccordion({
|
|
|
14281
14297
|
|
|
14282
14298
|
// src/components/trust-badges.tsx
|
|
14283
14299
|
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
14300
|
+
|
|
14301
|
+
// src/lib/trust-badge-media.ts
|
|
14302
|
+
var DEFAULT_ADHESION_NUMBER_LABEL = "N.\xBA de adhesi\xF3n";
|
|
14303
|
+
function safeHref(url) {
|
|
14304
|
+
if (typeof url !== "string") return null;
|
|
14305
|
+
try {
|
|
14306
|
+
const parsed = new URL(url);
|
|
14307
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
|
|
14308
|
+
} catch {
|
|
14309
|
+
return null;
|
|
14310
|
+
}
|
|
14311
|
+
}
|
|
14312
|
+
function safeLogoSrc(url) {
|
|
14313
|
+
if (typeof url !== "string" || url === "") return null;
|
|
14314
|
+
if (url.startsWith("/")) return url.startsWith("//") || url.startsWith("/\\") ? null : url;
|
|
14315
|
+
return safeHref(url);
|
|
14316
|
+
}
|
|
14317
|
+
function adhesionNumberOf(badge) {
|
|
14318
|
+
const value = badge.adhesionNumber;
|
|
14319
|
+
return typeof value === "string" && value.trim() !== "" ? value.trim() : null;
|
|
14320
|
+
}
|
|
14321
|
+
function trustBadgeAlt(badge, numberLabel = DEFAULT_ADHESION_NUMBER_LABEL) {
|
|
14322
|
+
const number2 = adhesionNumberOf(badge);
|
|
14323
|
+
return number2 ? `${badge.name}. ${numberLabel} ${number2}` : badge.name;
|
|
14324
|
+
}
|
|
14325
|
+
|
|
14326
|
+
// src/components/trust-badges.tsx
|
|
14284
14327
|
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14285
14328
|
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
14286
14329
|
{
|
|
@@ -14288,7 +14331,8 @@ var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
|
14288
14331
|
INSURANCE: "Aseguradoras",
|
|
14289
14332
|
SUBVENTION: "Financiaci\xF3n",
|
|
14290
14333
|
CERTIFICATION: "Certificaciones",
|
|
14291
|
-
AWARD: "Premios"
|
|
14334
|
+
AWARD: "Premios",
|
|
14335
|
+
CONSUMER_ARBITRATION: "Arbitraje de consumo"
|
|
14292
14336
|
}
|
|
14293
14337
|
);
|
|
14294
14338
|
var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
|
|
@@ -14298,26 +14342,12 @@ var DEFAULT_TRUST_BADGE_TYPE_ORDER = Object.freeze([
|
|
|
14298
14342
|
"PARTNER",
|
|
14299
14343
|
"INSURANCE"
|
|
14300
14344
|
]);
|
|
14301
|
-
var KNOWN_TYPES = new Set(
|
|
14345
|
+
var KNOWN_TYPES = new Set(Object.keys(DEFAULT_TRUST_BADGE_HEADINGS));
|
|
14302
14346
|
function isUsable(value) {
|
|
14303
14347
|
if (typeof value !== "object" || value === null) return false;
|
|
14304
14348
|
const entry = value;
|
|
14305
14349
|
return typeof entry.type === "string" && KNOWN_TYPES.has(entry.type) && typeof entry.name === "string" && entry.name.trim() !== "";
|
|
14306
14350
|
}
|
|
14307
|
-
function safeHref(url) {
|
|
14308
|
-
if (typeof url !== "string") return null;
|
|
14309
|
-
try {
|
|
14310
|
-
const parsed = new URL(url);
|
|
14311
|
-
return parsed.protocol === "https:" || parsed.protocol === "http:" ? url : null;
|
|
14312
|
-
} catch {
|
|
14313
|
-
return null;
|
|
14314
|
-
}
|
|
14315
|
-
}
|
|
14316
|
-
function safeLogoSrc(url) {
|
|
14317
|
-
if (typeof url !== "string" || url === "") return null;
|
|
14318
|
-
if (url.startsWith("/")) return url.startsWith("//") || url.startsWith("/\\") ? null : url;
|
|
14319
|
-
return safeHref(url);
|
|
14320
|
-
}
|
|
14321
14351
|
function BadgeContent({ badge, logoClassName }) {
|
|
14322
14352
|
const src = safeLogoSrc(badge.logoUrl);
|
|
14323
14353
|
if (src) {
|
|
@@ -14327,7 +14357,7 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14327
14357
|
"img",
|
|
14328
14358
|
{
|
|
14329
14359
|
src,
|
|
14330
|
-
alt: badge
|
|
14360
|
+
alt: trustBadgeAlt(badge),
|
|
14331
14361
|
loading: "lazy",
|
|
14332
14362
|
className: cn10("h-12 w-auto object-contain", logoClassName)
|
|
14333
14363
|
}
|
|
@@ -14418,41 +14448,96 @@ function TrustBadges({
|
|
|
14418
14448
|
);
|
|
14419
14449
|
}
|
|
14420
14450
|
|
|
14421
|
-
// src/components/
|
|
14451
|
+
// src/components/arbitration-badge.tsx
|
|
14422
14452
|
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14423
|
-
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14424
14453
|
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14454
|
+
function isArbitrationBadge(value) {
|
|
14455
|
+
if (typeof value !== "object" || value === null) return false;
|
|
14456
|
+
const entry = value;
|
|
14457
|
+
return entry.type === "CONSUMER_ARBITRATION" && typeof entry.name === "string" && entry.name.trim() !== "";
|
|
14458
|
+
}
|
|
14459
|
+
function ArbitrationBadge({
|
|
14460
|
+
badges,
|
|
14461
|
+
numberLabel = DEFAULT_ADHESION_NUMBER_LABEL,
|
|
14462
|
+
showNumber = true,
|
|
14463
|
+
newWindowLabel = "(se abre en una ventana nueva)",
|
|
14464
|
+
className,
|
|
14465
|
+
logoClassName,
|
|
14466
|
+
numberClassName
|
|
14467
|
+
}) {
|
|
14468
|
+
if (!Array.isArray(badges)) return null;
|
|
14469
|
+
const items = badges.filter(isArbitrationBadge);
|
|
14470
|
+
if (items.length === 0) return null;
|
|
14471
|
+
return /* @__PURE__ */ jsx17(
|
|
14472
|
+
"ul",
|
|
14473
|
+
{
|
|
14474
|
+
"data-slot": "arbitration-badges",
|
|
14475
|
+
className: cn11("flex flex-wrap items-start gap-6", className),
|
|
14476
|
+
children: items.map((badge) => {
|
|
14477
|
+
const src = safeLogoSrc(badge.logoUrl);
|
|
14478
|
+
const href = safeHref(badge.url);
|
|
14479
|
+
const number2 = adhesionNumberOf(badge);
|
|
14480
|
+
const caption = number2 && (showNumber || !src) ? /* @__PURE__ */ jsx17("span", { className: cn11("text-xs", numberClassName), "aria-hidden": src ? "true" : void 0, children: `${numberLabel} ${number2}` }) : null;
|
|
14481
|
+
const content = /* @__PURE__ */ jsxs16("span", { className: "inline-flex flex-col items-center gap-1 text-center", children: [
|
|
14482
|
+
src ? (
|
|
14483
|
+
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14484
|
+
/* @__PURE__ */ jsx17(
|
|
14485
|
+
"img",
|
|
14486
|
+
{
|
|
14487
|
+
src,
|
|
14488
|
+
alt: trustBadgeAlt(badge, numberLabel),
|
|
14489
|
+
loading: "lazy",
|
|
14490
|
+
className: cn11("h-16 w-auto object-contain", logoClassName)
|
|
14491
|
+
}
|
|
14492
|
+
)
|
|
14493
|
+
) : /* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: badge.name }),
|
|
14494
|
+
caption
|
|
14495
|
+
] });
|
|
14496
|
+
return /* @__PURE__ */ jsx17("li", { "data-slot": "arbitration-badge", children: href ? /* @__PURE__ */ jsxs16("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14497
|
+
content,
|
|
14498
|
+
" ",
|
|
14499
|
+
/* @__PURE__ */ jsx17("span", { className: "sr-only", children: newWindowLabel })
|
|
14500
|
+
] }) : content }, badge.id);
|
|
14501
|
+
})
|
|
14502
|
+
}
|
|
14503
|
+
);
|
|
14504
|
+
}
|
|
14505
|
+
|
|
14506
|
+
// src/components/page-blocks.tsx
|
|
14507
|
+
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14508
|
+
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14509
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14425
14510
|
var ALIASES = {
|
|
14426
14511
|
doctor_embed: "profile_embed",
|
|
14427
14512
|
specialty_embed: "page_embed"
|
|
14428
14513
|
};
|
|
14429
14514
|
function HeroBlock({ block, headingLevel }) {
|
|
14430
14515
|
const { title, subtitle, imageUrl } = block.data;
|
|
14431
|
-
return /* @__PURE__ */
|
|
14432
|
-
/* @__PURE__ */
|
|
14433
|
-
subtitle && /* @__PURE__ */
|
|
14434
|
-
imageUrl && /* @__PURE__ */
|
|
14516
|
+
return /* @__PURE__ */ jsxs17("div", { className: "space-y-4", children: [
|
|
14517
|
+
/* @__PURE__ */ jsx18(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14518
|
+
subtitle && /* @__PURE__ */ jsx18("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14519
|
+
imageUrl && /* @__PURE__ */ jsx18("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx18("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14435
14520
|
] });
|
|
14436
14521
|
}
|
|
14437
14522
|
function RichtextBlock({ block, headingLevel }) {
|
|
14438
|
-
return /* @__PURE__ */
|
|
14523
|
+
return /* @__PURE__ */ jsx18(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14439
14524
|
}
|
|
14440
14525
|
function FaqBlock({ block }) {
|
|
14441
|
-
return /* @__PURE__ */
|
|
14526
|
+
return /* @__PURE__ */ jsx18(FaqAccordion, { items: block.data.items });
|
|
14442
14527
|
}
|
|
14443
14528
|
function StatsBlock({ block }) {
|
|
14444
|
-
return /* @__PURE__ */
|
|
14445
|
-
/* @__PURE__ */
|
|
14446
|
-
/* @__PURE__ */
|
|
14529
|
+
return /* @__PURE__ */ jsx18("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs17("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14530
|
+
/* @__PURE__ */ jsx18("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14531
|
+
/* @__PURE__ */ jsx18("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14447
14532
|
] }, i)) });
|
|
14448
14533
|
}
|
|
14449
14534
|
function TestimonialBlock({ block }) {
|
|
14450
14535
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14451
|
-
return /* @__PURE__ */
|
|
14452
|
-
/* @__PURE__ */
|
|
14453
|
-
/* @__PURE__ */
|
|
14536
|
+
return /* @__PURE__ */ jsxs17("figure", { className: "space-y-4", children: [
|
|
14537
|
+
/* @__PURE__ */ jsx18("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx18("p", { children: quote }) }),
|
|
14538
|
+
/* @__PURE__ */ jsxs17("figcaption", { className: "flex items-center gap-3", children: [
|
|
14454
14539
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14455
|
-
/* @__PURE__ */
|
|
14540
|
+
/* @__PURE__ */ jsx18(
|
|
14456
14541
|
"img",
|
|
14457
14542
|
{
|
|
14458
14543
|
src: avatarUrl,
|
|
@@ -14461,9 +14546,9 @@ function TestimonialBlock({ block }) {
|
|
|
14461
14546
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14462
14547
|
}
|
|
14463
14548
|
),
|
|
14464
|
-
/* @__PURE__ */
|
|
14465
|
-
/* @__PURE__ */
|
|
14466
|
-
role && /* @__PURE__ */
|
|
14549
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
14550
|
+
/* @__PURE__ */ jsx18("span", { className: "font-semibold", children: author }),
|
|
14551
|
+
role && /* @__PURE__ */ jsx18("span", { className: "block text-sm opacity-80", children: role })
|
|
14467
14552
|
] })
|
|
14468
14553
|
] })
|
|
14469
14554
|
] });
|
|
@@ -14472,19 +14557,19 @@ function CtaSlotBlock(_props) {
|
|
|
14472
14557
|
return null;
|
|
14473
14558
|
}
|
|
14474
14559
|
function FeatureListBlock({ block }) {
|
|
14475
|
-
return /* @__PURE__ */
|
|
14560
|
+
return /* @__PURE__ */ jsx18("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx18("li", { children: item.text }, i)) });
|
|
14476
14561
|
}
|
|
14477
14562
|
function GalleryBlock({ block }) {
|
|
14478
14563
|
const { images } = block.data;
|
|
14479
|
-
return /* @__PURE__ */
|
|
14564
|
+
return /* @__PURE__ */ jsx18(
|
|
14480
14565
|
"div",
|
|
14481
14566
|
{
|
|
14482
|
-
className:
|
|
14567
|
+
className: cn12(
|
|
14483
14568
|
"grid gap-4",
|
|
14484
14569
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14485
14570
|
),
|
|
14486
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14487
|
-
/* @__PURE__ */
|
|
14571
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs17("figure", { className: "space-y-1", children: [
|
|
14572
|
+
/* @__PURE__ */ jsx18("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx18(
|
|
14488
14573
|
"img",
|
|
14489
14574
|
{
|
|
14490
14575
|
src: img.url,
|
|
@@ -14493,7 +14578,7 @@ function GalleryBlock({ block }) {
|
|
|
14493
14578
|
className: "h-full w-full object-cover"
|
|
14494
14579
|
}
|
|
14495
14580
|
) }),
|
|
14496
|
-
img.caption && /* @__PURE__ */
|
|
14581
|
+
img.caption && /* @__PURE__ */ jsx18("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14497
14582
|
] }, `${img.url}-${i}`))
|
|
14498
14583
|
}
|
|
14499
14584
|
);
|
|
@@ -14503,13 +14588,13 @@ function EmbedCard({
|
|
|
14503
14588
|
headingLevel,
|
|
14504
14589
|
embedHref
|
|
14505
14590
|
}) {
|
|
14506
|
-
return /* @__PURE__ */
|
|
14591
|
+
return /* @__PURE__ */ jsxs17(
|
|
14507
14592
|
"a",
|
|
14508
14593
|
{
|
|
14509
14594
|
href: embedHref(resolved),
|
|
14510
14595
|
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",
|
|
14511
14596
|
children: [
|
|
14512
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14597
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx18("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx18(
|
|
14513
14598
|
"img",
|
|
14514
14599
|
{
|
|
14515
14600
|
src: resolved.coverImageUrl,
|
|
@@ -14518,24 +14603,24 @@ function EmbedCard({
|
|
|
14518
14603
|
className: "h-full w-full object-cover"
|
|
14519
14604
|
}
|
|
14520
14605
|
) }),
|
|
14521
|
-
/* @__PURE__ */
|
|
14522
|
-
/* @__PURE__ */
|
|
14523
|
-
resolved.role && /* @__PURE__ */
|
|
14524
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14606
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-1 p-4", children: [
|
|
14607
|
+
/* @__PURE__ */ jsx18(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14608
|
+
resolved.role && /* @__PURE__ */ jsx18("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14609
|
+
resolved.excerpt && /* @__PURE__ */ jsx18("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14525
14610
|
] })
|
|
14526
14611
|
]
|
|
14527
14612
|
}
|
|
14528
14613
|
);
|
|
14529
14614
|
}
|
|
14530
14615
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14531
|
-
return /* @__PURE__ */
|
|
14616
|
+
return /* @__PURE__ */ jsx18(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14532
14617
|
}
|
|
14533
14618
|
function ProfileEmbedBlock({
|
|
14534
14619
|
block,
|
|
14535
14620
|
headingLevel,
|
|
14536
14621
|
embedHref
|
|
14537
14622
|
}) {
|
|
14538
|
-
return /* @__PURE__ */
|
|
14623
|
+
return /* @__PURE__ */ jsx18(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14539
14624
|
}
|
|
14540
14625
|
var DEFAULT_RENDERERS = {
|
|
14541
14626
|
hero: HeroBlock,
|
|
@@ -14592,14 +14677,14 @@ function toIdFragment(value) {
|
|
|
14592
14677
|
function SectionCta2({ cta }) {
|
|
14593
14678
|
if (!hasUsableCta(cta)) return null;
|
|
14594
14679
|
const variant = toButtonVariant(cta.variant);
|
|
14595
|
-
return /* @__PURE__ */
|
|
14680
|
+
return /* @__PURE__ */ jsx18("div", { className: "pt-2", children: /* @__PURE__ */ jsx18(
|
|
14596
14681
|
"a",
|
|
14597
14682
|
{
|
|
14598
14683
|
href: cta.url,
|
|
14599
14684
|
"data-slot": "button",
|
|
14600
14685
|
"data-variant": variant,
|
|
14601
14686
|
"data-size": "default",
|
|
14602
|
-
className:
|
|
14687
|
+
className: cn12(buttonVariants2({ variant, size: "default" })),
|
|
14603
14688
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
14604
14689
|
children: cta.label
|
|
14605
14690
|
}
|
|
@@ -14625,17 +14710,17 @@ function PageBlocks({
|
|
|
14625
14710
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14626
14711
|
const background = block.backgroundColor;
|
|
14627
14712
|
return [
|
|
14628
|
-
/* @__PURE__ */
|
|
14713
|
+
/* @__PURE__ */ jsxs17(
|
|
14629
14714
|
"section",
|
|
14630
14715
|
{
|
|
14631
14716
|
"data-slot": "page-block",
|
|
14632
14717
|
"data-block-type": type,
|
|
14633
14718
|
"aria-labelledby": headingId,
|
|
14634
14719
|
style: surfaceStyle(background),
|
|
14635
|
-
className:
|
|
14720
|
+
className: cn12("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14636
14721
|
children: [
|
|
14637
|
-
block.heading && /* @__PURE__ */
|
|
14638
|
-
/* @__PURE__ */
|
|
14722
|
+
block.heading && /* @__PURE__ */ jsx18(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx18("span", { id: headingId, children: block.heading }) }),
|
|
14723
|
+
/* @__PURE__ */ jsx18(
|
|
14639
14724
|
Renderer,
|
|
14640
14725
|
{
|
|
14641
14726
|
block,
|
|
@@ -14643,7 +14728,7 @@ function PageBlocks({
|
|
|
14643
14728
|
embedHref
|
|
14644
14729
|
}
|
|
14645
14730
|
),
|
|
14646
|
-
/* @__PURE__ */
|
|
14731
|
+
/* @__PURE__ */ jsx18(SectionCta2, { cta: block.cta })
|
|
14647
14732
|
]
|
|
14648
14733
|
},
|
|
14649
14734
|
block.id
|
|
@@ -14651,12 +14736,12 @@ function PageBlocks({
|
|
|
14651
14736
|
];
|
|
14652
14737
|
});
|
|
14653
14738
|
if (sections.length === 0) return null;
|
|
14654
|
-
return /* @__PURE__ */
|
|
14739
|
+
return /* @__PURE__ */ jsx18("div", { className: cn12("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14655
14740
|
}
|
|
14656
14741
|
|
|
14657
14742
|
// src/components/shop-filters.tsx
|
|
14658
|
-
import { cn as
|
|
14659
|
-
import { jsx as
|
|
14743
|
+
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14744
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14660
14745
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14661
14746
|
{ max: 2500 },
|
|
14662
14747
|
{ min: 2500, max: 5e3 },
|
|
@@ -14700,7 +14785,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14700
14785
|
return "";
|
|
14701
14786
|
}
|
|
14702
14787
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14703
|
-
return /* @__PURE__ */
|
|
14788
|
+
return /* @__PURE__ */ jsx19(
|
|
14704
14789
|
"a",
|
|
14705
14790
|
{
|
|
14706
14791
|
href,
|
|
@@ -14709,7 +14794,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14709
14794
|
event.preventDefault();
|
|
14710
14795
|
onActivate();
|
|
14711
14796
|
} : void 0,
|
|
14712
|
-
className:
|
|
14797
|
+
className: cn13(
|
|
14713
14798
|
"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",
|
|
14714
14799
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
14715
14800
|
),
|
|
@@ -14718,9 +14803,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14718
14803
|
);
|
|
14719
14804
|
}
|
|
14720
14805
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14721
|
-
return /* @__PURE__ */
|
|
14722
|
-
/* @__PURE__ */
|
|
14723
|
-
/* @__PURE__ */
|
|
14806
|
+
return /* @__PURE__ */ jsxs18("fieldset", { className: "space-y-2", children: [
|
|
14807
|
+
/* @__PURE__ */ jsx19("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14808
|
+
/* @__PURE__ */ jsx19("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14724
14809
|
] });
|
|
14725
14810
|
}
|
|
14726
14811
|
function ShopFilters({
|
|
@@ -14743,11 +14828,11 @@ function ShopFilters({
|
|
|
14743
14828
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14744
14829
|
return null;
|
|
14745
14830
|
}
|
|
14746
|
-
return /* @__PURE__ */
|
|
14831
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn13("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14747
14832
|
visibleTaxonomies.map((axis) => {
|
|
14748
14833
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14749
|
-
return /* @__PURE__ */
|
|
14750
|
-
/* @__PURE__ */
|
|
14834
|
+
return /* @__PURE__ */ jsxs18(FilterFieldset, { legend: axis.label, children: [
|
|
14835
|
+
/* @__PURE__ */ jsx19(
|
|
14751
14836
|
OptionLink,
|
|
14752
14837
|
{
|
|
14753
14838
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14762,7 +14847,7 @@ function ShopFilters({
|
|
|
14762
14847
|
),
|
|
14763
14848
|
axis.terms.map((term) => {
|
|
14764
14849
|
const isActive = activeSlug === term.slug;
|
|
14765
|
-
return /* @__PURE__ */
|
|
14850
|
+
return /* @__PURE__ */ jsx19(
|
|
14766
14851
|
OptionLink,
|
|
14767
14852
|
{
|
|
14768
14853
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14782,9 +14867,9 @@ function ShopFilters({
|
|
|
14782
14867
|
}),
|
|
14783
14868
|
visibleAttributes.map((attr) => {
|
|
14784
14869
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14785
|
-
return /* @__PURE__ */
|
|
14870
|
+
return /* @__PURE__ */ jsx19(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14786
14871
|
const isActive = activeValues.includes(opt.value);
|
|
14787
|
-
return /* @__PURE__ */
|
|
14872
|
+
return /* @__PURE__ */ jsx19(
|
|
14788
14873
|
OptionLink,
|
|
14789
14874
|
{
|
|
14790
14875
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14802,11 +14887,11 @@ function ShopFilters({
|
|
|
14802
14887
|
);
|
|
14803
14888
|
}) }, attr.key);
|
|
14804
14889
|
}),
|
|
14805
|
-
showPriceGroup && /* @__PURE__ */
|
|
14890
|
+
showPriceGroup && /* @__PURE__ */ jsx19(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14806
14891
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14807
14892
|
const nextMin = isActive ? void 0 : band.min;
|
|
14808
14893
|
const nextMax = isActive ? void 0 : band.max;
|
|
14809
|
-
return /* @__PURE__ */
|
|
14894
|
+
return /* @__PURE__ */ jsx19(
|
|
14810
14895
|
OptionLink,
|
|
14811
14896
|
{
|
|
14812
14897
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14817,7 +14902,7 @@ function ShopFilters({
|
|
|
14817
14902
|
i
|
|
14818
14903
|
);
|
|
14819
14904
|
}) }),
|
|
14820
|
-
hasOnSale && /* @__PURE__ */
|
|
14905
|
+
hasOnSale && /* @__PURE__ */ jsx19(
|
|
14821
14906
|
OptionLink,
|
|
14822
14907
|
{
|
|
14823
14908
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14826,7 +14911,7 @@ function ShopFilters({
|
|
|
14826
14911
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14827
14912
|
}
|
|
14828
14913
|
),
|
|
14829
|
-
/* @__PURE__ */
|
|
14914
|
+
/* @__PURE__ */ jsx19(
|
|
14830
14915
|
"a",
|
|
14831
14916
|
{
|
|
14832
14917
|
href: hrefs.clearAll(),
|
|
@@ -14842,8 +14927,8 @@ function ShopFilters({
|
|
|
14842
14927
|
}
|
|
14843
14928
|
|
|
14844
14929
|
// src/components/course-catalog-filters.tsx
|
|
14845
|
-
import { cn as
|
|
14846
|
-
import { jsx as
|
|
14930
|
+
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14931
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
14847
14932
|
var DEFAULT_COURSE_PRICE_BANDS = [
|
|
14848
14933
|
{ max: 5e3 },
|
|
14849
14934
|
{ min: 5e3, max: 15e3 },
|
|
@@ -14896,9 +14981,9 @@ function CourseCatalogFilters({
|
|
|
14896
14981
|
const showPrice = enabled.price !== false;
|
|
14897
14982
|
const isFree = Boolean(active.free);
|
|
14898
14983
|
if (!showCategories && !showInstructors && !showPrice) return null;
|
|
14899
|
-
return /* @__PURE__ */
|
|
14900
|
-
showCategories && /* @__PURE__ */
|
|
14901
|
-
/* @__PURE__ */
|
|
14984
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn14("space-y-6", className), "data-slot": "course-catalog-filters", children: [
|
|
14985
|
+
showCategories && /* @__PURE__ */ jsxs19(FilterFieldset, { legend: t.category, children: [
|
|
14986
|
+
/* @__PURE__ */ jsx20(
|
|
14902
14987
|
OptionLink,
|
|
14903
14988
|
{
|
|
14904
14989
|
href: categoryHref(void 0),
|
|
@@ -14910,7 +14995,7 @@ function CourseCatalogFilters({
|
|
|
14910
14995
|
sortedCategories.map((category) => {
|
|
14911
14996
|
const isActive = active.category === category.slug;
|
|
14912
14997
|
const next2 = isActive ? void 0 : category.slug;
|
|
14913
|
-
return /* @__PURE__ */
|
|
14998
|
+
return /* @__PURE__ */ jsx20(
|
|
14914
14999
|
OptionLink,
|
|
14915
15000
|
{
|
|
14916
15001
|
href: categoryHref(next2),
|
|
@@ -14922,8 +15007,8 @@ function CourseCatalogFilters({
|
|
|
14922
15007
|
);
|
|
14923
15008
|
})
|
|
14924
15009
|
] }),
|
|
14925
|
-
showInstructors && /* @__PURE__ */
|
|
14926
|
-
/* @__PURE__ */
|
|
15010
|
+
showInstructors && /* @__PURE__ */ jsxs19(FilterFieldset, { legend: t.instructor, children: [
|
|
15011
|
+
/* @__PURE__ */ jsx20(
|
|
14927
15012
|
OptionLink,
|
|
14928
15013
|
{
|
|
14929
15014
|
href: hrefs.instructor(void 0),
|
|
@@ -14935,7 +15020,7 @@ function CourseCatalogFilters({
|
|
|
14935
15020
|
named.map((instructor) => {
|
|
14936
15021
|
const isActive = active.instructor === instructor.id;
|
|
14937
15022
|
const next2 = isActive ? void 0 : instructor.id;
|
|
14938
|
-
return /* @__PURE__ */
|
|
15023
|
+
return /* @__PURE__ */ jsx20(
|
|
14939
15024
|
OptionLink,
|
|
14940
15025
|
{
|
|
14941
15026
|
href: hrefs.instructor(next2),
|
|
@@ -14947,8 +15032,8 @@ function CourseCatalogFilters({
|
|
|
14947
15032
|
);
|
|
14948
15033
|
})
|
|
14949
15034
|
] }),
|
|
14950
|
-
showPrice && /* @__PURE__ */
|
|
14951
|
-
/* @__PURE__ */
|
|
15035
|
+
showPrice && /* @__PURE__ */ jsxs19(FilterFieldset, { legend: t.price, children: [
|
|
15036
|
+
/* @__PURE__ */ jsx20(
|
|
14952
15037
|
OptionLink,
|
|
14953
15038
|
{
|
|
14954
15039
|
href: hrefs.free(!isFree),
|
|
@@ -14963,7 +15048,7 @@ function CourseCatalogFilters({
|
|
|
14963
15048
|
const isActive = !isFree && active.priceMin === band.min && active.priceMax === band.max;
|
|
14964
15049
|
const nextMin = isActive ? void 0 : band.min;
|
|
14965
15050
|
const nextMax = isActive ? void 0 : band.max;
|
|
14966
|
-
return /* @__PURE__ */
|
|
15051
|
+
return /* @__PURE__ */ jsx20(
|
|
14967
15052
|
OptionLink,
|
|
14968
15053
|
{
|
|
14969
15054
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14975,7 +15060,7 @@ function CourseCatalogFilters({
|
|
|
14975
15060
|
);
|
|
14976
15061
|
})
|
|
14977
15062
|
] }),
|
|
14978
|
-
/* @__PURE__ */
|
|
15063
|
+
/* @__PURE__ */ jsx20(
|
|
14979
15064
|
"a",
|
|
14980
15065
|
{
|
|
14981
15066
|
href: hrefs.clearAll(),
|
|
@@ -14997,8 +15082,8 @@ function CourseCatalogFilters({
|
|
|
14997
15082
|
}
|
|
14998
15083
|
|
|
14999
15084
|
// src/components/cart-line-list.tsx
|
|
15000
|
-
import { cn as
|
|
15001
|
-
import { jsx as
|
|
15085
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
15086
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15002
15087
|
var DEFAULT_LABELS2 = {
|
|
15003
15088
|
quantityLabel: "Cantidad",
|
|
15004
15089
|
decrease: "Reducir cantidad",
|
|
@@ -15024,9 +15109,9 @@ function CartLineList({
|
|
|
15024
15109
|
}) {
|
|
15025
15110
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
15026
15111
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15027
|
-
return /* @__PURE__ */
|
|
15028
|
-
/* @__PURE__ */
|
|
15029
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
15112
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn15("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
15113
|
+
/* @__PURE__ */ jsx21("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
15114
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx21(
|
|
15030
15115
|
"div",
|
|
15031
15116
|
{
|
|
15032
15117
|
role: "status",
|
|
@@ -15035,33 +15120,33 @@ function CartLineList({
|
|
|
15035
15120
|
children: noticeContent
|
|
15036
15121
|
}
|
|
15037
15122
|
),
|
|
15038
|
-
/* @__PURE__ */
|
|
15123
|
+
/* @__PURE__ */ jsx21("ul", { className: "space-y-4", children: items.map((item) => {
|
|
15039
15124
|
const maxQty = item.maxStock ?? Infinity;
|
|
15040
15125
|
const atMax = item.quantity >= maxQty;
|
|
15041
15126
|
const atMin = item.quantity <= 1;
|
|
15042
15127
|
const message = lineMessage?.(item);
|
|
15043
|
-
return /* @__PURE__ */
|
|
15128
|
+
return /* @__PURE__ */ jsxs20(
|
|
15044
15129
|
"li",
|
|
15045
15130
|
{
|
|
15046
15131
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
15047
15132
|
children: [
|
|
15048
|
-
/* @__PURE__ */
|
|
15049
|
-
/* @__PURE__ */
|
|
15050
|
-
/* @__PURE__ */
|
|
15051
|
-
item.variantName && /* @__PURE__ */
|
|
15052
|
-
/* @__PURE__ */
|
|
15133
|
+
/* @__PURE__ */ jsx21("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx21("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
15134
|
+
/* @__PURE__ */ jsxs20("div", { className: "min-w-0 flex-1", children: [
|
|
15135
|
+
/* @__PURE__ */ jsx21("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
15136
|
+
item.variantName && /* @__PURE__ */ jsx21("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
15137
|
+
/* @__PURE__ */ jsxs20("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
15053
15138
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
15054
15139
|
" ",
|
|
15055
15140
|
t.unitPriceSuffix
|
|
15056
15141
|
] }),
|
|
15057
|
-
/* @__PURE__ */
|
|
15142
|
+
/* @__PURE__ */ jsxs20(
|
|
15058
15143
|
"div",
|
|
15059
15144
|
{
|
|
15060
15145
|
role: "group",
|
|
15061
15146
|
"aria-label": t.quantityLabel,
|
|
15062
15147
|
className: "mt-3 flex items-center gap-3",
|
|
15063
15148
|
children: [
|
|
15064
|
-
/* @__PURE__ */
|
|
15149
|
+
/* @__PURE__ */ jsx21(
|
|
15065
15150
|
"button",
|
|
15066
15151
|
{
|
|
15067
15152
|
type: "button",
|
|
@@ -15072,8 +15157,8 @@ function CartLineList({
|
|
|
15072
15157
|
children: "\u2212"
|
|
15073
15158
|
}
|
|
15074
15159
|
),
|
|
15075
|
-
/* @__PURE__ */
|
|
15076
|
-
/* @__PURE__ */
|
|
15160
|
+
/* @__PURE__ */ jsx21("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
15161
|
+
/* @__PURE__ */ jsx21(
|
|
15077
15162
|
"button",
|
|
15078
15163
|
{
|
|
15079
15164
|
type: "button",
|
|
@@ -15084,7 +15169,7 @@ function CartLineList({
|
|
|
15084
15169
|
children: "+"
|
|
15085
15170
|
}
|
|
15086
15171
|
),
|
|
15087
|
-
onRemove && /* @__PURE__ */
|
|
15172
|
+
onRemove && /* @__PURE__ */ jsx21(
|
|
15088
15173
|
"button",
|
|
15089
15174
|
{
|
|
15090
15175
|
type: "button",
|
|
@@ -15097,7 +15182,7 @@ function CartLineList({
|
|
|
15097
15182
|
]
|
|
15098
15183
|
}
|
|
15099
15184
|
),
|
|
15100
|
-
message != null && message !== false && /* @__PURE__ */
|
|
15185
|
+
message != null && message !== false && /* @__PURE__ */ jsx21(
|
|
15101
15186
|
"p",
|
|
15102
15187
|
{
|
|
15103
15188
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -15106,7 +15191,7 @@ function CartLineList({
|
|
|
15106
15191
|
}
|
|
15107
15192
|
)
|
|
15108
15193
|
] }),
|
|
15109
|
-
/* @__PURE__ */
|
|
15194
|
+
/* @__PURE__ */ jsx21("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx21("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
15110
15195
|
]
|
|
15111
15196
|
},
|
|
15112
15197
|
lineKey(item.productId, item.variantId)
|
|
@@ -15116,8 +15201,8 @@ function CartLineList({
|
|
|
15116
15201
|
}
|
|
15117
15202
|
|
|
15118
15203
|
// src/components/cart-summary.tsx
|
|
15119
|
-
import { cn as
|
|
15120
|
-
import { jsx as
|
|
15204
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
15205
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15121
15206
|
var DEFAULT_LABELS3 = {
|
|
15122
15207
|
subtotal: "Subtotal",
|
|
15123
15208
|
discountPrefix: "Descuento",
|
|
@@ -15147,37 +15232,37 @@ function CartSummary({
|
|
|
15147
15232
|
const hasDiscount = Boolean(discountAmount && discountAmount > 0);
|
|
15148
15233
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
15149
15234
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
15150
|
-
const breakdown = /* @__PURE__ */
|
|
15235
|
+
const breakdown = /* @__PURE__ */ jsxs21(
|
|
15151
15236
|
"dl",
|
|
15152
15237
|
{
|
|
15153
|
-
className:
|
|
15238
|
+
className: cn16("space-y-2 text-sm", !hasNotice && className),
|
|
15154
15239
|
"data-slot": "cart-summary",
|
|
15155
15240
|
children: [
|
|
15156
|
-
/* @__PURE__ */
|
|
15157
|
-
/* @__PURE__ */
|
|
15158
|
-
/* @__PURE__ */
|
|
15241
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15242
|
+
/* @__PURE__ */ jsx22("dt", { children: t.subtotal }),
|
|
15243
|
+
/* @__PURE__ */ jsx22("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
15159
15244
|
] }),
|
|
15160
|
-
hasDiscount && /* @__PURE__ */
|
|
15161
|
-
/* @__PURE__ */
|
|
15162
|
-
/* @__PURE__ */
|
|
15245
|
+
hasDiscount && /* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
15246
|
+
/* @__PURE__ */ jsx22("dt", { children: autoDiscount ? t.staffDiscountApplied : `${t.discountPrefix}${discountCode ? ` (${discountCode})` : ""}` }),
|
|
15247
|
+
/* @__PURE__ */ jsxs21("dd", { children: [
|
|
15163
15248
|
"-",
|
|
15164
15249
|
formatPrice(discountAmount, currencyCode, locale)
|
|
15165
15250
|
] })
|
|
15166
15251
|
] }),
|
|
15167
|
-
shippingEnabled && /* @__PURE__ */
|
|
15168
|
-
/* @__PURE__ */
|
|
15169
|
-
/* @__PURE__ */
|
|
15252
|
+
shippingEnabled && /* @__PURE__ */ jsxs21("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
15253
|
+
/* @__PURE__ */ jsx22("dt", { children: t.shipping }),
|
|
15254
|
+
/* @__PURE__ */ jsx22("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
15170
15255
|
] }),
|
|
15171
|
-
/* @__PURE__ */
|
|
15172
|
-
/* @__PURE__ */
|
|
15173
|
-
/* @__PURE__ */
|
|
15256
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
15257
|
+
/* @__PURE__ */ jsx22("dt", { children: t.total }),
|
|
15258
|
+
/* @__PURE__ */ jsx22("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
15174
15259
|
] })
|
|
15175
15260
|
]
|
|
15176
15261
|
}
|
|
15177
15262
|
);
|
|
15178
15263
|
if (!hasNotice) return breakdown;
|
|
15179
|
-
return /* @__PURE__ */
|
|
15180
|
-
/* @__PURE__ */
|
|
15264
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn16("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
15265
|
+
/* @__PURE__ */ jsx22(
|
|
15181
15266
|
"div",
|
|
15182
15267
|
{
|
|
15183
15268
|
role: "status",
|
|
@@ -15191,8 +15276,8 @@ function CartSummary({
|
|
|
15191
15276
|
}
|
|
15192
15277
|
|
|
15193
15278
|
// src/components/cart-adjustments-notice.tsx
|
|
15194
|
-
import { cn as
|
|
15195
|
-
import { jsx as
|
|
15279
|
+
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
15280
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
15196
15281
|
var DEFAULT_LABELS4 = {
|
|
15197
15282
|
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.`,
|
|
15198
15283
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -15226,20 +15311,20 @@ function CartAdjustmentsNotice({
|
|
|
15226
15311
|
);
|
|
15227
15312
|
}
|
|
15228
15313
|
if (messages.length === 0) return null;
|
|
15229
|
-
return /* @__PURE__ */
|
|
15314
|
+
return /* @__PURE__ */ jsx23(
|
|
15230
15315
|
"div",
|
|
15231
15316
|
{
|
|
15232
15317
|
role: "status",
|
|
15233
|
-
className:
|
|
15318
|
+
className: cn17("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
15234
15319
|
"data-slot": "cart-adjustments-notice",
|
|
15235
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
15320
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx23("p", { children: messages[0] }) : /* @__PURE__ */ jsx23("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx23("li", { children: message }, index)) })
|
|
15236
15321
|
}
|
|
15237
15322
|
);
|
|
15238
15323
|
}
|
|
15239
15324
|
|
|
15240
15325
|
// src/components/added-to-cart-toast.tsx
|
|
15241
|
-
import { cn as
|
|
15242
|
-
import { jsx as
|
|
15326
|
+
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
15327
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15243
15328
|
var DEFAULT_LABELS5 = {
|
|
15244
15329
|
success: "A\xF1adido al carrito",
|
|
15245
15330
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -15259,12 +15344,12 @@ function AddedToCartToast({
|
|
|
15259
15344
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
15260
15345
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
15261
15346
|
const variant = status === "success" ? "success" : "error";
|
|
15262
|
-
return /* @__PURE__ */
|
|
15347
|
+
return /* @__PURE__ */ jsxs22(
|
|
15263
15348
|
"div",
|
|
15264
15349
|
{
|
|
15265
15350
|
"data-slot": "added-to-cart-toast",
|
|
15266
15351
|
"data-variant": variant,
|
|
15267
|
-
className:
|
|
15352
|
+
className: cn18(
|
|
15268
15353
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
15269
15354
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
15270
15355
|
variant === "error" && "border-destructive/30",
|
|
@@ -15272,20 +15357,20 @@ function AddedToCartToast({
|
|
|
15272
15357
|
),
|
|
15273
15358
|
children: [
|
|
15274
15359
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
15275
|
-
/* @__PURE__ */
|
|
15276
|
-
/* @__PURE__ */
|
|
15277
|
-
/* @__PURE__ */
|
|
15278
|
-
/* @__PURE__ */
|
|
15360
|
+
/* @__PURE__ */ jsx24("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
15361
|
+
/* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
|
|
15362
|
+
/* @__PURE__ */ jsx24("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
15363
|
+
/* @__PURE__ */ jsx24("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
15279
15364
|
] }),
|
|
15280
|
-
/* @__PURE__ */
|
|
15365
|
+
/* @__PURE__ */ jsx24("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx24("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
15281
15366
|
]
|
|
15282
15367
|
}
|
|
15283
15368
|
);
|
|
15284
15369
|
}
|
|
15285
15370
|
|
|
15286
15371
|
// src/components/checkout-login-prompt.tsx
|
|
15287
|
-
import { cn as
|
|
15288
|
-
import { Fragment as
|
|
15372
|
+
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
15373
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
15289
15374
|
var DEFAULT_LABELS6 = {
|
|
15290
15375
|
title: "Identificaci\xF3n",
|
|
15291
15376
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -15312,26 +15397,26 @@ function CheckoutLoginPrompt({
|
|
|
15312
15397
|
if (!open) return null;
|
|
15313
15398
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
15314
15399
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
15315
|
-
return /* @__PURE__ */
|
|
15316
|
-
/* @__PURE__ */
|
|
15317
|
-
/* @__PURE__ */
|
|
15400
|
+
return /* @__PURE__ */ jsxs23(Fragment4, { children: [
|
|
15401
|
+
/* @__PURE__ */ jsx25("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
15402
|
+
/* @__PURE__ */ jsxs23(
|
|
15318
15403
|
"div",
|
|
15319
15404
|
{
|
|
15320
15405
|
role: "dialog",
|
|
15321
15406
|
"aria-modal": "true",
|
|
15322
15407
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
15323
15408
|
"data-slot": "checkout-login-prompt",
|
|
15324
|
-
className:
|
|
15409
|
+
className: cn19(
|
|
15325
15410
|
"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",
|
|
15326
15411
|
className
|
|
15327
15412
|
),
|
|
15328
15413
|
children: [
|
|
15329
|
-
/* @__PURE__ */
|
|
15330
|
-
/* @__PURE__ */
|
|
15331
|
-
/* @__PURE__ */
|
|
15332
|
-
/* @__PURE__ */
|
|
15414
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15415
|
+
/* @__PURE__ */ jsxs23("div", { children: [
|
|
15416
|
+
/* @__PURE__ */ jsx25("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
15417
|
+
/* @__PURE__ */ jsx25("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
15333
15418
|
] }),
|
|
15334
|
-
/* @__PURE__ */
|
|
15419
|
+
/* @__PURE__ */ jsx25(
|
|
15335
15420
|
"button",
|
|
15336
15421
|
{
|
|
15337
15422
|
type: "button",
|
|
@@ -15342,9 +15427,9 @@ function CheckoutLoginPrompt({
|
|
|
15342
15427
|
}
|
|
15343
15428
|
)
|
|
15344
15429
|
] }),
|
|
15345
|
-
/* @__PURE__ */
|
|
15346
|
-
/* @__PURE__ */
|
|
15347
|
-
/* @__PURE__ */
|
|
15430
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-2", children: [
|
|
15431
|
+
/* @__PURE__ */ jsx25("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15432
|
+
/* @__PURE__ */ jsx25(
|
|
15348
15433
|
"input",
|
|
15349
15434
|
{
|
|
15350
15435
|
id: "checkout-login-prompt-email",
|
|
@@ -15353,29 +15438,29 @@ function CheckoutLoginPrompt({
|
|
|
15353
15438
|
value: email,
|
|
15354
15439
|
onChange: (e) => onEmailChange(e.target.value),
|
|
15355
15440
|
placeholder: t.emailPlaceholder,
|
|
15356
|
-
className:
|
|
15441
|
+
className: cn19(
|
|
15357
15442
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15358
15443
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
15359
15444
|
)
|
|
15360
15445
|
}
|
|
15361
15446
|
),
|
|
15362
|
-
error && /* @__PURE__ */
|
|
15447
|
+
error && /* @__PURE__ */ jsx25("p", { className: "text-xs text-destructive", children: error })
|
|
15363
15448
|
] }),
|
|
15364
|
-
/* @__PURE__ */
|
|
15365
|
-
/* @__PURE__ */
|
|
15449
|
+
/* @__PURE__ */ jsxs23("div", { className: "space-y-2", children: [
|
|
15450
|
+
/* @__PURE__ */ jsx25(
|
|
15366
15451
|
"button",
|
|
15367
15452
|
{
|
|
15368
15453
|
type: "button",
|
|
15369
15454
|
onClick: onSubmitEmail,
|
|
15370
15455
|
disabled: checking || !isValidEmail,
|
|
15371
|
-
className:
|
|
15456
|
+
className: cn19(
|
|
15372
15457
|
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
15373
15458
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
15374
15459
|
),
|
|
15375
15460
|
children: checking ? t.checking : t.continueWithEmail
|
|
15376
15461
|
}
|
|
15377
15462
|
),
|
|
15378
|
-
/* @__PURE__ */
|
|
15463
|
+
/* @__PURE__ */ jsx25(
|
|
15379
15464
|
"button",
|
|
15380
15465
|
{
|
|
15381
15466
|
type: "button",
|
|
@@ -15392,9 +15477,9 @@ function CheckoutLoginPrompt({
|
|
|
15392
15477
|
}
|
|
15393
15478
|
|
|
15394
15479
|
// src/components/checkout-form.tsx
|
|
15395
|
-
import { cn as
|
|
15480
|
+
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15396
15481
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
15397
|
-
import { Fragment as
|
|
15482
|
+
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
15398
15483
|
var DEFAULT_LABELS7 = {
|
|
15399
15484
|
contactTitle: "Datos de contacto",
|
|
15400
15485
|
nameLabel: "Nombre completo",
|
|
@@ -15450,22 +15535,22 @@ function CheckoutForm({
|
|
|
15450
15535
|
event.preventDefault();
|
|
15451
15536
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15452
15537
|
}
|
|
15453
|
-
return /* @__PURE__ */
|
|
15538
|
+
return /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
15454
15539
|
loginPrompt,
|
|
15455
|
-
/* @__PURE__ */
|
|
15540
|
+
/* @__PURE__ */ jsxs24(
|
|
15456
15541
|
"form",
|
|
15457
15542
|
{
|
|
15458
15543
|
"data-testid": "checkout-form",
|
|
15459
15544
|
onSubmit,
|
|
15460
|
-
className:
|
|
15545
|
+
className: cn20("space-y-8", className),
|
|
15461
15546
|
"data-slot": "checkout-form",
|
|
15462
15547
|
children: [
|
|
15463
|
-
/* @__PURE__ */
|
|
15464
|
-
/* @__PURE__ */
|
|
15465
|
-
/* @__PURE__ */
|
|
15466
|
-
/* @__PURE__ */
|
|
15467
|
-
/* @__PURE__ */
|
|
15468
|
-
/* @__PURE__ */
|
|
15548
|
+
/* @__PURE__ */ jsxs24("section", { className: "space-y-4", children: [
|
|
15549
|
+
/* @__PURE__ */ jsx26("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15550
|
+
/* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15551
|
+
/* @__PURE__ */ jsxs24("div", { className: "space-y-1", children: [
|
|
15552
|
+
/* @__PURE__ */ jsx26("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15553
|
+
/* @__PURE__ */ jsx26(
|
|
15469
15554
|
"input",
|
|
15470
15555
|
{
|
|
15471
15556
|
id: "checkout-form-name",
|
|
@@ -15474,17 +15559,17 @@ function CheckoutForm({
|
|
|
15474
15559
|
value: contact.name,
|
|
15475
15560
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
15476
15561
|
placeholder: t.namePlaceholder,
|
|
15477
|
-
className:
|
|
15562
|
+
className: cn20(
|
|
15478
15563
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15479
15564
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
15480
15565
|
)
|
|
15481
15566
|
}
|
|
15482
15567
|
),
|
|
15483
|
-
contactErrors?.name && /* @__PURE__ */
|
|
15568
|
+
contactErrors?.name && /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15484
15569
|
] }),
|
|
15485
|
-
/* @__PURE__ */
|
|
15486
|
-
/* @__PURE__ */
|
|
15487
|
-
/* @__PURE__ */
|
|
15570
|
+
/* @__PURE__ */ jsxs24("div", { className: "space-y-1", children: [
|
|
15571
|
+
/* @__PURE__ */ jsx26("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15572
|
+
/* @__PURE__ */ jsx26(
|
|
15488
15573
|
"input",
|
|
15489
15574
|
{
|
|
15490
15575
|
id: "checkout-form-email",
|
|
@@ -15493,15 +15578,15 @@ function CheckoutForm({
|
|
|
15493
15578
|
value: contact.email,
|
|
15494
15579
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
15495
15580
|
placeholder: t.emailPlaceholder,
|
|
15496
|
-
className:
|
|
15581
|
+
className: cn20(
|
|
15497
15582
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15498
15583
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
15499
15584
|
)
|
|
15500
15585
|
}
|
|
15501
15586
|
),
|
|
15502
|
-
contactErrors?.email && /* @__PURE__ */
|
|
15587
|
+
contactErrors?.email && /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15503
15588
|
] }),
|
|
15504
|
-
/* @__PURE__ */
|
|
15589
|
+
/* @__PURE__ */ jsx26("div", { className: "space-y-1", children: /* @__PURE__ */ jsx26(
|
|
15505
15590
|
PhoneInput,
|
|
15506
15591
|
{
|
|
15507
15592
|
id: "checkout-form-phone",
|
|
@@ -15515,26 +15600,26 @@ function CheckoutForm({
|
|
|
15515
15600
|
] })
|
|
15516
15601
|
] }),
|
|
15517
15602
|
children2,
|
|
15518
|
-
generalError ? /* @__PURE__ */
|
|
15519
|
-
/* @__PURE__ */
|
|
15520
|
-
/* @__PURE__ */
|
|
15521
|
-
autoDiscount ? /* @__PURE__ */
|
|
15603
|
+
generalError ? /* @__PURE__ */ jsx26("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15604
|
+
/* @__PURE__ */ jsxs24("section", { className: "space-y-3", children: [
|
|
15605
|
+
/* @__PURE__ */ jsx26("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15606
|
+
autoDiscount ? /* @__PURE__ */ jsxs24(
|
|
15522
15607
|
"div",
|
|
15523
15608
|
{
|
|
15524
15609
|
className: "flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-3 text-sm text-green-700 dark:border-green-800 dark:bg-green-900/20 dark:text-green-400",
|
|
15525
15610
|
"data-slot": "checkout-staff-discount",
|
|
15526
15611
|
children: [
|
|
15527
|
-
/* @__PURE__ */
|
|
15528
|
-
/* @__PURE__ */
|
|
15612
|
+
/* @__PURE__ */ jsx26("span", { className: "font-semibold", children: t.staffDiscountApplied }),
|
|
15613
|
+
/* @__PURE__ */ jsx26("span", { children: t.discountAppliedSuffix(formatPrice(autoDiscount.amount, currencyCode, locale)) })
|
|
15529
15614
|
]
|
|
15530
15615
|
}
|
|
15531
15616
|
) : null,
|
|
15532
|
-
appliedDiscount && !autoDiscount ? /* @__PURE__ */
|
|
15533
|
-
/* @__PURE__ */
|
|
15534
|
-
/* @__PURE__ */
|
|
15535
|
-
/* @__PURE__ */
|
|
15617
|
+
appliedDiscount && !autoDiscount ? /* @__PURE__ */ jsxs24("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: [
|
|
15618
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15619
|
+
/* @__PURE__ */ jsx26("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15620
|
+
/* @__PURE__ */ jsx26("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15536
15621
|
] }),
|
|
15537
|
-
/* @__PURE__ */
|
|
15622
|
+
/* @__PURE__ */ jsx26(
|
|
15538
15623
|
"button",
|
|
15539
15624
|
{
|
|
15540
15625
|
type: "button",
|
|
@@ -15544,9 +15629,9 @@ function CheckoutForm({
|
|
|
15544
15629
|
children: t.removeDiscount
|
|
15545
15630
|
}
|
|
15546
15631
|
)
|
|
15547
|
-
] }) : /* @__PURE__ */
|
|
15548
|
-
/* @__PURE__ */
|
|
15549
|
-
/* @__PURE__ */
|
|
15632
|
+
] }) : /* @__PURE__ */ jsxs24("div", { className: "flex gap-2", children: [
|
|
15633
|
+
/* @__PURE__ */ jsx26("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15634
|
+
/* @__PURE__ */ jsx26(
|
|
15550
15635
|
"input",
|
|
15551
15636
|
{
|
|
15552
15637
|
id: "checkout-form-discount-code",
|
|
@@ -15558,7 +15643,7 @@ function CheckoutForm({
|
|
|
15558
15643
|
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"
|
|
15559
15644
|
}
|
|
15560
15645
|
),
|
|
15561
|
-
/* @__PURE__ */
|
|
15646
|
+
/* @__PURE__ */ jsx26(
|
|
15562
15647
|
"button",
|
|
15563
15648
|
{
|
|
15564
15649
|
type: "button",
|
|
@@ -15569,14 +15654,14 @@ function CheckoutForm({
|
|
|
15569
15654
|
}
|
|
15570
15655
|
)
|
|
15571
15656
|
] }),
|
|
15572
|
-
discountError && /* @__PURE__ */
|
|
15657
|
+
discountError && /* @__PURE__ */ jsx26("p", { className: "text-xs text-destructive", children: discountError })
|
|
15573
15658
|
] }),
|
|
15574
|
-
/* @__PURE__ */
|
|
15659
|
+
/* @__PURE__ */ jsx26(
|
|
15575
15660
|
"button",
|
|
15576
15661
|
{
|
|
15577
15662
|
type: "submit",
|
|
15578
15663
|
disabled: submitting || submitDisabled,
|
|
15579
|
-
className:
|
|
15664
|
+
className: cn20(
|
|
15580
15665
|
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
15581
15666
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
15582
15667
|
),
|
|
@@ -15590,11 +15675,11 @@ function CheckoutForm({
|
|
|
15590
15675
|
}
|
|
15591
15676
|
|
|
15592
15677
|
// src/components/order-confirmation.tsx
|
|
15593
|
-
import { cn as
|
|
15678
|
+
import { cn as cn22 } from "@reblu/site-ui/utils";
|
|
15594
15679
|
|
|
15595
15680
|
// src/components/order-invoice-link.tsx
|
|
15596
|
-
import { cn as
|
|
15597
|
-
import { jsx as
|
|
15681
|
+
import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
15682
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
15598
15683
|
var DEFAULT_LABELS8 = {
|
|
15599
15684
|
linkLabel: "Descargar la factura {number}",
|
|
15600
15685
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15602,8 +15687,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15602
15687
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15603
15688
|
if (!invoice) return null;
|
|
15604
15689
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15605
|
-
return /* @__PURE__ */
|
|
15606
|
-
/* @__PURE__ */
|
|
15690
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn21("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15691
|
+
/* @__PURE__ */ jsx27(
|
|
15607
15692
|
"a",
|
|
15608
15693
|
{
|
|
15609
15694
|
href: invoice.url,
|
|
@@ -15611,12 +15696,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15611
15696
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15612
15697
|
}
|
|
15613
15698
|
),
|
|
15614
|
-
/* @__PURE__ */
|
|
15699
|
+
/* @__PURE__ */ jsx27("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15615
15700
|
] });
|
|
15616
15701
|
}
|
|
15617
15702
|
|
|
15618
15703
|
// src/components/order-confirmation.tsx
|
|
15619
|
-
import { jsx as
|
|
15704
|
+
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
15620
15705
|
var DEFAULT_LABELS9 = {
|
|
15621
15706
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15622
15707
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15682,43 +15767,43 @@ function OrderConfirmation({
|
|
|
15682
15767
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15683
15768
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15684
15769
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15685
|
-
return /* @__PURE__ */
|
|
15686
|
-
/* @__PURE__ */
|
|
15687
|
-
/* @__PURE__ */
|
|
15688
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
15689
|
-
/* @__PURE__ */
|
|
15690
|
-
/* @__PURE__ */
|
|
15691
|
-
/* @__PURE__ */
|
|
15770
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn22("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15771
|
+
/* @__PURE__ */ jsx28("h1", { className: "text-3xl font-bold", children: title }),
|
|
15772
|
+
/* @__PURE__ */ jsx28("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15773
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs26("div", { className: "space-y-6", children: [
|
|
15774
|
+
/* @__PURE__ */ jsxs26("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15775
|
+
/* @__PURE__ */ jsx28("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15776
|
+
/* @__PURE__ */ jsx28("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15692
15777
|
] }),
|
|
15693
|
-
/* @__PURE__ */
|
|
15694
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15778
|
+
/* @__PURE__ */ jsxs26("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15779
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs26(
|
|
15695
15780
|
"div",
|
|
15696
15781
|
{
|
|
15697
15782
|
className: "flex justify-between gap-4 text-sm",
|
|
15698
15783
|
children: [
|
|
15699
|
-
/* @__PURE__ */
|
|
15784
|
+
/* @__PURE__ */ jsxs26("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15700
15785
|
item.product.name,
|
|
15701
15786
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15702
15787
|
" x",
|
|
15703
15788
|
item.quantity
|
|
15704
15789
|
] }),
|
|
15705
|
-
/* @__PURE__ */
|
|
15790
|
+
/* @__PURE__ */ jsx28("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15706
15791
|
]
|
|
15707
15792
|
},
|
|
15708
15793
|
idx
|
|
15709
15794
|
)),
|
|
15710
|
-
/* @__PURE__ */
|
|
15711
|
-
/* @__PURE__ */
|
|
15712
|
-
/* @__PURE__ */
|
|
15795
|
+
/* @__PURE__ */ jsx28("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs26("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15796
|
+
/* @__PURE__ */ jsx28("span", { children: t.totalLabel }),
|
|
15797
|
+
/* @__PURE__ */ jsx28("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15713
15798
|
] }) })
|
|
15714
15799
|
] }),
|
|
15715
|
-
/* @__PURE__ */
|
|
15800
|
+
/* @__PURE__ */ jsxs26("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15716
15801
|
t.confirmationEmailPrefix,
|
|
15717
15802
|
" ",
|
|
15718
|
-
/* @__PURE__ */
|
|
15803
|
+
/* @__PURE__ */ jsx28("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15719
15804
|
"."
|
|
15720
15805
|
] }),
|
|
15721
|
-
/* @__PURE__ */
|
|
15806
|
+
/* @__PURE__ */ jsx28(
|
|
15722
15807
|
OrderInvoiceLink,
|
|
15723
15808
|
{
|
|
15724
15809
|
invoice: order.invoice,
|
|
@@ -15726,11 +15811,11 @@ function OrderConfirmation({
|
|
|
15726
15811
|
}
|
|
15727
15812
|
)
|
|
15728
15813
|
] }),
|
|
15729
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15730
|
-
/* @__PURE__ */
|
|
15731
|
-
/* @__PURE__ */
|
|
15814
|
+
showOrderReference && order && /* @__PURE__ */ jsxs26("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15815
|
+
/* @__PURE__ */ jsx28("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15816
|
+
/* @__PURE__ */ jsx28("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15732
15817
|
] }),
|
|
15733
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15818
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx28(
|
|
15734
15819
|
"a",
|
|
15735
15820
|
{
|
|
15736
15821
|
href: cartHref,
|
|
@@ -15738,7 +15823,7 @@ function OrderConfirmation({
|
|
|
15738
15823
|
children: t.backToCartLabel
|
|
15739
15824
|
}
|
|
15740
15825
|
),
|
|
15741
|
-
showRecheck && /* @__PURE__ */
|
|
15826
|
+
showRecheck && /* @__PURE__ */ jsx28(
|
|
15742
15827
|
"button",
|
|
15743
15828
|
{
|
|
15744
15829
|
type: "button",
|
|
@@ -15747,16 +15832,16 @@ function OrderConfirmation({
|
|
|
15747
15832
|
children: t.recheckLabel
|
|
15748
15833
|
}
|
|
15749
15834
|
),
|
|
15750
|
-
showSessionReference && /* @__PURE__ */
|
|
15751
|
-
/* @__PURE__ */
|
|
15752
|
-
/* @__PURE__ */
|
|
15835
|
+
showSessionReference && /* @__PURE__ */ jsxs26("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15836
|
+
/* @__PURE__ */ jsx28("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15837
|
+
/* @__PURE__ */ jsx28("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15753
15838
|
] })
|
|
15754
15839
|
] });
|
|
15755
15840
|
}
|
|
15756
15841
|
|
|
15757
15842
|
// src/components/full-invoice-fields.tsx
|
|
15758
|
-
import { cn as
|
|
15759
|
-
import { jsx as
|
|
15843
|
+
import { cn as cn23 } from "@reblu/site-ui/utils";
|
|
15844
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
15760
15845
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15761
15846
|
wantsFullInvoice: false,
|
|
15762
15847
|
billingIdType: "NIF",
|
|
@@ -15873,12 +15958,12 @@ function FullInvoiceFields({
|
|
|
15873
15958
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15874
15959
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15875
15960
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15876
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15961
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx29("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15877
15962
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15878
|
-
return /* @__PURE__ */
|
|
15879
|
-
overCap ? /* @__PURE__ */
|
|
15880
|
-
/* @__PURE__ */
|
|
15881
|
-
/* @__PURE__ */
|
|
15963
|
+
return /* @__PURE__ */ jsxs27("section", { className: cn23("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15964
|
+
overCap ? /* @__PURE__ */ jsx29("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
15965
|
+
/* @__PURE__ */ jsxs27("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15966
|
+
/* @__PURE__ */ jsx29(
|
|
15882
15967
|
"input",
|
|
15883
15968
|
{
|
|
15884
15969
|
type: "checkbox",
|
|
@@ -15888,12 +15973,12 @@ function FullInvoiceFields({
|
|
|
15888
15973
|
),
|
|
15889
15974
|
t.toggle
|
|
15890
15975
|
] }),
|
|
15891
|
-
/* @__PURE__ */
|
|
15976
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15892
15977
|
] }),
|
|
15893
|
-
showFields && /* @__PURE__ */
|
|
15894
|
-
/* @__PURE__ */
|
|
15895
|
-
/* @__PURE__ */
|
|
15896
|
-
/* @__PURE__ */
|
|
15978
|
+
showFields && /* @__PURE__ */ jsxs27("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15979
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
15980
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15981
|
+
/* @__PURE__ */ jsx29(
|
|
15897
15982
|
"select",
|
|
15898
15983
|
{
|
|
15899
15984
|
id: "full-invoice-id-type",
|
|
@@ -15902,14 +15987,14 @@ function FullInvoiceFields({
|
|
|
15902
15987
|
value: value.billingIdType,
|
|
15903
15988
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15904
15989
|
...invalid2("billingIdType"),
|
|
15905
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15990
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx29("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15906
15991
|
}
|
|
15907
15992
|
),
|
|
15908
15993
|
error("billingIdType")
|
|
15909
15994
|
] }),
|
|
15910
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15911
|
-
/* @__PURE__ */
|
|
15912
|
-
/* @__PURE__ */
|
|
15995
|
+
!isSpanishNif && /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
15996
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15997
|
+
/* @__PURE__ */ jsxs27(
|
|
15913
15998
|
"select",
|
|
15914
15999
|
{
|
|
15915
16000
|
id: "full-invoice-id-country",
|
|
@@ -15919,16 +16004,16 @@ function FullInvoiceFields({
|
|
|
15919
16004
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15920
16005
|
...invalid2("billingIdCountry"),
|
|
15921
16006
|
children: [
|
|
15922
|
-
/* @__PURE__ */
|
|
15923
|
-
countries.map((c) => /* @__PURE__ */
|
|
16007
|
+
/* @__PURE__ */ jsx29("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
16008
|
+
countries.map((c) => /* @__PURE__ */ jsx29("option", { value: c.code, children: c.name }, c.code))
|
|
15924
16009
|
]
|
|
15925
16010
|
}
|
|
15926
16011
|
),
|
|
15927
16012
|
error("billingIdCountry")
|
|
15928
16013
|
] }),
|
|
15929
|
-
/* @__PURE__ */
|
|
15930
|
-
/* @__PURE__ */
|
|
15931
|
-
/* @__PURE__ */
|
|
16014
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
16015
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
16016
|
+
/* @__PURE__ */ jsx29(
|
|
15932
16017
|
"input",
|
|
15933
16018
|
{
|
|
15934
16019
|
id: "full-invoice-nif",
|
|
@@ -15941,9 +16026,9 @@ function FullInvoiceFields({
|
|
|
15941
16026
|
),
|
|
15942
16027
|
error("billingNif")
|
|
15943
16028
|
] }),
|
|
15944
|
-
/* @__PURE__ */
|
|
15945
|
-
/* @__PURE__ */
|
|
15946
|
-
/* @__PURE__ */
|
|
16029
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
16030
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
16031
|
+
/* @__PURE__ */ jsx29(
|
|
15947
16032
|
"input",
|
|
15948
16033
|
{
|
|
15949
16034
|
id: "full-invoice-name",
|
|
@@ -15956,9 +16041,9 @@ function FullInvoiceFields({
|
|
|
15956
16041
|
),
|
|
15957
16042
|
error("billingName")
|
|
15958
16043
|
] }),
|
|
15959
|
-
/* @__PURE__ */
|
|
15960
|
-
/* @__PURE__ */
|
|
15961
|
-
/* @__PURE__ */
|
|
16044
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
16045
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
16046
|
+
/* @__PURE__ */ jsx29(
|
|
15962
16047
|
"input",
|
|
15963
16048
|
{
|
|
15964
16049
|
id: "full-invoice-street",
|
|
@@ -15970,9 +16055,9 @@ function FullInvoiceFields({
|
|
|
15970
16055
|
}
|
|
15971
16056
|
)
|
|
15972
16057
|
] }),
|
|
15973
|
-
/* @__PURE__ */
|
|
15974
|
-
/* @__PURE__ */
|
|
15975
|
-
/* @__PURE__ */
|
|
16058
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
16059
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
16060
|
+
/* @__PURE__ */ jsx29(
|
|
15976
16061
|
"input",
|
|
15977
16062
|
{
|
|
15978
16063
|
id: "full-invoice-postal-code",
|
|
@@ -15983,9 +16068,9 @@ function FullInvoiceFields({
|
|
|
15983
16068
|
}
|
|
15984
16069
|
)
|
|
15985
16070
|
] }),
|
|
15986
|
-
/* @__PURE__ */
|
|
15987
|
-
/* @__PURE__ */
|
|
15988
|
-
/* @__PURE__ */
|
|
16071
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
16072
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
16073
|
+
/* @__PURE__ */ jsx29(
|
|
15989
16074
|
"input",
|
|
15990
16075
|
{
|
|
15991
16076
|
id: "full-invoice-city",
|
|
@@ -15996,9 +16081,9 @@ function FullInvoiceFields({
|
|
|
15996
16081
|
}
|
|
15997
16082
|
)
|
|
15998
16083
|
] }),
|
|
15999
|
-
/* @__PURE__ */
|
|
16000
|
-
/* @__PURE__ */
|
|
16001
|
-
/* @__PURE__ */
|
|
16084
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
16085
|
+
/* @__PURE__ */ jsx29("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
16086
|
+
/* @__PURE__ */ jsx29(
|
|
16002
16087
|
"select",
|
|
16003
16088
|
{
|
|
16004
16089
|
id: "full-invoice-country",
|
|
@@ -16006,18 +16091,18 @@ function FullInvoiceFields({
|
|
|
16006
16091
|
required: true,
|
|
16007
16092
|
value: value.country,
|
|
16008
16093
|
onChange: (e) => set("country", e.target.value),
|
|
16009
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
16094
|
+
children: countries.map((c) => /* @__PURE__ */ jsx29("option", { value: c.code, children: c.name }, c.code))
|
|
16010
16095
|
}
|
|
16011
16096
|
)
|
|
16012
16097
|
] }),
|
|
16013
|
-
/* @__PURE__ */
|
|
16098
|
+
/* @__PURE__ */ jsx29("div", { className: "sm:col-span-2", children: error("address") })
|
|
16014
16099
|
] })
|
|
16015
16100
|
] });
|
|
16016
16101
|
}
|
|
16017
16102
|
|
|
16018
16103
|
// src/components/contact-interest-field.tsx
|
|
16019
|
-
import { cn as
|
|
16020
|
-
import { jsx as
|
|
16104
|
+
import { cn as cn24 } from "@reblu/site-ui/utils";
|
|
16105
|
+
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
16021
16106
|
function ContactInterestField({
|
|
16022
16107
|
interest,
|
|
16023
16108
|
value,
|
|
@@ -16034,18 +16119,18 @@ function ContactInterestField({
|
|
|
16034
16119
|
else next2.delete(option2);
|
|
16035
16120
|
onChange(interest.options.filter((candidate) => next2.has(candidate)));
|
|
16036
16121
|
};
|
|
16037
|
-
return /* @__PURE__ */
|
|
16038
|
-
/* @__PURE__ */
|
|
16039
|
-
/* @__PURE__ */
|
|
16122
|
+
return /* @__PURE__ */ jsxs28("fieldset", { "data-slot": "contact-interest", className: cn24("space-y-2", className), children: [
|
|
16123
|
+
/* @__PURE__ */ jsx30("legend", { className: "text-sm font-medium", children: interest.label }),
|
|
16124
|
+
/* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-2", children: interest.options.map((option2, index) => {
|
|
16040
16125
|
const id = `${idPrefix}-${index}`;
|
|
16041
|
-
return /* @__PURE__ */
|
|
16126
|
+
return /* @__PURE__ */ jsxs28(
|
|
16042
16127
|
"label",
|
|
16043
16128
|
{
|
|
16044
16129
|
htmlFor: id,
|
|
16045
16130
|
"data-slot": "contact-interest-option",
|
|
16046
16131
|
className: "flex items-center gap-2 text-sm",
|
|
16047
16132
|
children: [
|
|
16048
|
-
/* @__PURE__ */
|
|
16133
|
+
/* @__PURE__ */ jsx30(
|
|
16049
16134
|
"input",
|
|
16050
16135
|
{
|
|
16051
16136
|
id,
|
|
@@ -16069,6 +16154,7 @@ import { DATA_REQUEST_TYPES } from "@reblu/site-contracts";
|
|
|
16069
16154
|
export {
|
|
16070
16155
|
ALLOWED_YOUTUBE_HOSTS,
|
|
16071
16156
|
AddedToCartToast,
|
|
16157
|
+
ArbitrationBadge,
|
|
16072
16158
|
CartAdjustmentsNotice,
|
|
16073
16159
|
CartLineList,
|
|
16074
16160
|
CartSummary,
|