@reblu/site-blocks 0.18.0 → 0.19.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 +17 -0
- package/README.md +123 -0
- package/dist/_heading-BsNbc1wc.d.cts +4 -0
- package/dist/_heading-BsNbc1wc.d.ts +4 -0
- package/dist/client.cjs +256 -49
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +60 -2
- package/dist/client.d.ts +60 -2
- package/dist/client.js +255 -50
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +352 -302
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -6
- package/dist/index.d.ts +28 -6
- package/dist/index.js +351 -302
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13637,34 +13637,82 @@ function ParentPage({
|
|
|
13637
13637
|
var Specialty = ParentPage;
|
|
13638
13638
|
|
|
13639
13639
|
// src/components/profile-card.tsx
|
|
13640
|
+
import { cn as cn7 } from "@reblu/site-ui/utils";
|
|
13641
|
+
|
|
13642
|
+
// src/components/professional-fields.tsx
|
|
13640
13643
|
import { cn as cn6 } from "@reblu/site-ui/utils";
|
|
13641
13644
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
13645
|
+
function ProfessionalFields({
|
|
13646
|
+
fields,
|
|
13647
|
+
variant = "profile",
|
|
13648
|
+
className
|
|
13649
|
+
}) {
|
|
13650
|
+
const shown = (fields ?? []).filter((f) => variant !== "card" || f.showOnCard);
|
|
13651
|
+
if (shown.length === 0) return null;
|
|
13652
|
+
return /* @__PURE__ */ jsx7(
|
|
13653
|
+
"dl",
|
|
13654
|
+
{
|
|
13655
|
+
className: cn6(
|
|
13656
|
+
"grid gap-x-3 gap-y-1 text-sm",
|
|
13657
|
+
variant === "card" ? "justify-center" : "grid-cols-[auto_1fr]",
|
|
13658
|
+
className
|
|
13659
|
+
),
|
|
13660
|
+
"data-slot": "professional-fields",
|
|
13661
|
+
"data-variant": variant,
|
|
13662
|
+
children: shown.map((field, index) => /* @__PURE__ */ jsxs7(
|
|
13663
|
+
"div",
|
|
13664
|
+
{
|
|
13665
|
+
className: variant === "card" ? "flex justify-center gap-1" : "contents",
|
|
13666
|
+
children: [
|
|
13667
|
+
/* @__PURE__ */ jsx7("dt", { className: "text-muted-foreground", children: field.label }),
|
|
13668
|
+
/* @__PURE__ */ jsx7("dd", { className: "m-0 font-medium", children: field.value })
|
|
13669
|
+
]
|
|
13670
|
+
},
|
|
13671
|
+
`${field.label}-${index}`
|
|
13672
|
+
))
|
|
13673
|
+
}
|
|
13674
|
+
);
|
|
13675
|
+
}
|
|
13676
|
+
|
|
13677
|
+
// src/components/profile-card.tsx
|
|
13678
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
13642
13679
|
function initials(name) {
|
|
13643
13680
|
return name.split(/\s+/).filter(Boolean).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
|
|
13644
13681
|
}
|
|
13645
|
-
function ProfileCard({
|
|
13682
|
+
function ProfileCard({
|
|
13683
|
+
name,
|
|
13684
|
+
role,
|
|
13685
|
+
imageUrl,
|
|
13686
|
+
specialties = [],
|
|
13687
|
+
bio,
|
|
13688
|
+
fields,
|
|
13689
|
+
href,
|
|
13690
|
+
className
|
|
13691
|
+
}) {
|
|
13646
13692
|
const NameTag = href ? "a" : "span";
|
|
13647
|
-
return /* @__PURE__ */
|
|
13693
|
+
return /* @__PURE__ */ jsxs8(
|
|
13648
13694
|
"article",
|
|
13649
13695
|
{
|
|
13650
|
-
className:
|
|
13696
|
+
className: cn7(
|
|
13651
13697
|
"flex flex-col items-center gap-3 rounded-lg border bg-card p-6 text-center",
|
|
13652
13698
|
className
|
|
13653
13699
|
),
|
|
13654
13700
|
"data-slot": "profile-card",
|
|
13655
13701
|
children: [
|
|
13656
|
-
/* @__PURE__ */
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13702
|
+
/* @__PURE__ */ jsx8("div", { className: "relative h-24 w-24 overflow-hidden rounded-full bg-muted", children: imageUrl ? /* @__PURE__ */ jsx8("img", { src: imageUrl, alt: name, loading: "lazy", className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx8(
|
|
13703
|
+
"span",
|
|
13704
|
+
{
|
|
13705
|
+
className: "flex h-full w-full items-center justify-center text-2xl font-semibold text-muted-foreground",
|
|
13706
|
+
"aria-hidden": "true",
|
|
13707
|
+
children: initials(name)
|
|
13708
|
+
}
|
|
13709
|
+
) }),
|
|
13710
|
+
/* @__PURE__ */ jsxs8("div", { className: "space-y-1", children: [
|
|
13711
|
+
/* @__PURE__ */ jsx8("h3", { className: "text-lg font-semibold leading-tight", children: /* @__PURE__ */ jsx8(NameTag, { ...href ? { href, className: "transition-colors hover:text-primary" } : {}, children: name }) }),
|
|
13712
|
+
role && /* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: role })
|
|
13666
13713
|
] }),
|
|
13667
|
-
|
|
13714
|
+
/* @__PURE__ */ jsx8(ProfessionalFields, { fields, variant: "card" }),
|
|
13715
|
+
specialties.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "flex flex-wrap justify-center gap-1.5 p-0", children: specialties.map((s2) => /* @__PURE__ */ jsx8(
|
|
13668
13716
|
"li",
|
|
13669
13717
|
{
|
|
13670
13718
|
className: "inline-flex items-center rounded-full bg-secondary px-2.5 py-0.5 text-xs font-medium text-secondary-foreground",
|
|
@@ -13672,28 +13720,28 @@ function ProfileCard({ name, role, imageUrl, specialties = [], bio, href, classN
|
|
|
13672
13720
|
},
|
|
13673
13721
|
s2
|
|
13674
13722
|
)) }),
|
|
13675
|
-
bio && /* @__PURE__ */
|
|
13723
|
+
bio && /* @__PURE__ */ jsx8("p", { className: "text-sm text-muted-foreground", children: bio })
|
|
13676
13724
|
]
|
|
13677
13725
|
}
|
|
13678
13726
|
);
|
|
13679
13727
|
}
|
|
13680
13728
|
|
|
13681
13729
|
// src/components/product-card.tsx
|
|
13682
|
-
import { cn as
|
|
13683
|
-
import { jsx as
|
|
13730
|
+
import { cn as cn8 } from "@reblu/site-ui/utils";
|
|
13731
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
13684
13732
|
function ProductCard({ product, href, currencyCode = "EUR", locale, className }) {
|
|
13685
13733
|
const image = product.images.find((i) => i.isPrimary) ?? product.images[0];
|
|
13686
13734
|
const hasDiscount = product.comparePrice != null && product.comparePrice > product.price;
|
|
13687
|
-
return /* @__PURE__ */
|
|
13735
|
+
return /* @__PURE__ */ jsxs9(
|
|
13688
13736
|
"article",
|
|
13689
13737
|
{
|
|
13690
|
-
className:
|
|
13738
|
+
className: cn8(
|
|
13691
13739
|
"group flex flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-lg",
|
|
13692
13740
|
className
|
|
13693
13741
|
),
|
|
13694
13742
|
"data-slot": "product-card",
|
|
13695
13743
|
children: [
|
|
13696
|
-
/* @__PURE__ */
|
|
13744
|
+
/* @__PURE__ */ jsx9("div", { className: "relative aspect-square overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx9(
|
|
13697
13745
|
"img",
|
|
13698
13746
|
{
|
|
13699
13747
|
src: image.url,
|
|
@@ -13701,14 +13749,14 @@ function ProductCard({ product, href, currencyCode = "EUR", locale, className })
|
|
|
13701
13749
|
loading: "lazy",
|
|
13702
13750
|
className: "h-full w-full object-cover transition-transform group-hover:scale-105"
|
|
13703
13751
|
}
|
|
13704
|
-
) : /* @__PURE__ */
|
|
13705
|
-
/* @__PURE__ */
|
|
13706
|
-
product.category && /* @__PURE__ */
|
|
13707
|
-
/* @__PURE__ */
|
|
13708
|
-
product.shortDescription && /* @__PURE__ */
|
|
13709
|
-
/* @__PURE__ */
|
|
13710
|
-
/* @__PURE__ */
|
|
13711
|
-
hasDiscount && /* @__PURE__ */
|
|
13752
|
+
) : /* @__PURE__ */ jsx9("div", { className: "flex h-full items-center justify-center text-4xl text-muted-foreground/30", "aria-hidden": "true", children: "\u{1F6CD}\uFE0F" }) }),
|
|
13753
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
13754
|
+
product.category && /* @__PURE__ */ jsx9("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 }),
|
|
13755
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-base font-semibold leading-tight", children: href ? /* @__PURE__ */ jsx9("a", { href, className: "transition-colors hover:text-primary", children: product.name }) : product.name }),
|
|
13756
|
+
product.shortDescription && /* @__PURE__ */ jsx9("p", { className: "line-clamp-2 text-sm text-muted-foreground", children: product.shortDescription }),
|
|
13757
|
+
/* @__PURE__ */ jsxs9("div", { className: "mt-auto flex items-baseline gap-2 pt-2", children: [
|
|
13758
|
+
/* @__PURE__ */ jsx9("span", { className: "text-lg font-bold text-foreground", children: formatPrice(product.price, currencyCode, locale) }),
|
|
13759
|
+
hasDiscount && /* @__PURE__ */ jsx9("span", { className: "text-sm text-muted-foreground line-through", children: formatPrice(product.comparePrice, currencyCode, locale) })
|
|
13712
13760
|
] })
|
|
13713
13761
|
] })
|
|
13714
13762
|
]
|
|
@@ -13910,7 +13958,7 @@ var __iconNode8 = [
|
|
|
13910
13958
|
var Truck = createLucideIcon("truck", __iconNode8);
|
|
13911
13959
|
|
|
13912
13960
|
// src/components/product-trust-items.tsx
|
|
13913
|
-
import { jsx as
|
|
13961
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
13914
13962
|
var DEFAULT_TRUST_ICONS = Object.freeze({
|
|
13915
13963
|
shipping: Truck,
|
|
13916
13964
|
returns: RotateCcw,
|
|
@@ -13944,17 +13992,17 @@ function ProductTrustItems({
|
|
|
13944
13992
|
return [{ key: `${index}-${icon}`, Icon: Icon2, text: text3 }];
|
|
13945
13993
|
});
|
|
13946
13994
|
if (rows.length === 0) return null;
|
|
13947
|
-
return /* @__PURE__ */
|
|
13948
|
-
/* @__PURE__ */
|
|
13949
|
-
/* @__PURE__ */
|
|
13995
|
+
return /* @__PURE__ */ jsx10(List, { "data-slot": "product-trust-items", className: slotClassName("space-y-2.5", "", className), children: rows.map(({ key: key2, Icon: Icon2, text: text3 }) => /* @__PURE__ */ jsxs10("li", { className: slotClassName("flex items-center gap-3", "text-sm text-muted-foreground", itemClassName), children: [
|
|
13996
|
+
/* @__PURE__ */ jsx10(Icon2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 text-foreground/60" }),
|
|
13997
|
+
/* @__PURE__ */ jsx10("span", { children: text3 })
|
|
13950
13998
|
] }, key2)) });
|
|
13951
13999
|
}
|
|
13952
14000
|
|
|
13953
14001
|
// src/components/faq-accordion.tsx
|
|
13954
|
-
import { cn as
|
|
14002
|
+
import { cn as cn9 } from "@reblu/site-ui/utils";
|
|
13955
14003
|
|
|
13956
14004
|
// src/components/_heading.tsx
|
|
13957
|
-
import { jsx as
|
|
14005
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
13958
14006
|
function nextHeadingLevel(level) {
|
|
13959
14007
|
return Math.min(level + 1, 6);
|
|
13960
14008
|
}
|
|
@@ -13964,11 +14012,11 @@ function Heading({
|
|
|
13964
14012
|
children: children2
|
|
13965
14013
|
}) {
|
|
13966
14014
|
const Tag = `h${level}`;
|
|
13967
|
-
return /* @__PURE__ */
|
|
14015
|
+
return /* @__PURE__ */ jsx11(Tag, { className, children: children2 });
|
|
13968
14016
|
}
|
|
13969
14017
|
|
|
13970
14018
|
// src/components/faq-accordion.tsx
|
|
13971
|
-
import { jsx as
|
|
14019
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
13972
14020
|
function FaqAccordion({
|
|
13973
14021
|
items,
|
|
13974
14022
|
heading,
|
|
@@ -13979,18 +14027,18 @@ function FaqAccordion({
|
|
|
13979
14027
|
}) {
|
|
13980
14028
|
const visible = items.map((item, index) => ({ item, index })).filter(({ item }) => item.q.trim() !== "");
|
|
13981
14029
|
if (visible.length === 0) return null;
|
|
13982
|
-
return /* @__PURE__ */
|
|
13983
|
-
heading && /* @__PURE__ */
|
|
13984
|
-
/* @__PURE__ */
|
|
14030
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn9("space-y-4", className), "data-slot": "faq-accordion", children: [
|
|
14031
|
+
heading && /* @__PURE__ */ jsx12(Heading, { level: headingLevel, className: "text-2xl font-semibold tracking-tight", children: heading }),
|
|
14032
|
+
/* @__PURE__ */ jsx12("div", { className: "divide-y divide-border rounded-xl border border-border", children: visible.map(({ item, index }) => /* @__PURE__ */ jsxs11(
|
|
13985
14033
|
"details",
|
|
13986
14034
|
{
|
|
13987
14035
|
className: "group px-4",
|
|
13988
14036
|
"data-slot": "faq-item",
|
|
13989
14037
|
...defaultOpen.includes(index) ? { open: true } : {},
|
|
13990
14038
|
children: [
|
|
13991
|
-
/* @__PURE__ */
|
|
13992
|
-
questionHeadingLevel ? /* @__PURE__ */
|
|
13993
|
-
/* @__PURE__ */
|
|
14039
|
+
/* @__PURE__ */ jsxs11("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: [
|
|
14040
|
+
questionHeadingLevel ? /* @__PURE__ */ jsx12(Heading, { level: questionHeadingLevel, className: "text-base font-medium", children: item.q }) : /* @__PURE__ */ jsx12("span", { children: item.q }),
|
|
14041
|
+
/* @__PURE__ */ jsx12(
|
|
13994
14042
|
"span",
|
|
13995
14043
|
{
|
|
13996
14044
|
"aria-hidden": "true",
|
|
@@ -13999,7 +14047,7 @@ function FaqAccordion({
|
|
|
13999
14047
|
}
|
|
14000
14048
|
)
|
|
14001
14049
|
] }),
|
|
14002
|
-
/* @__PURE__ */
|
|
14050
|
+
/* @__PURE__ */ jsx12("p", { className: "whitespace-pre-line pb-4 text-muted-foreground", children: item.a })
|
|
14003
14051
|
]
|
|
14004
14052
|
},
|
|
14005
14053
|
index
|
|
@@ -14008,8 +14056,8 @@ function FaqAccordion({
|
|
|
14008
14056
|
}
|
|
14009
14057
|
|
|
14010
14058
|
// src/components/trust-badges.tsx
|
|
14011
|
-
import { cn as
|
|
14012
|
-
import { jsx as
|
|
14059
|
+
import { cn as cn10 } from "@reblu/site-ui/utils";
|
|
14060
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
14013
14061
|
var DEFAULT_TRUST_BADGE_HEADINGS = Object.freeze(
|
|
14014
14062
|
{
|
|
14015
14063
|
PARTNER: "Colaboradores",
|
|
@@ -14051,18 +14099,18 @@ function BadgeContent({ badge, logoClassName }) {
|
|
|
14051
14099
|
if (src) {
|
|
14052
14100
|
return (
|
|
14053
14101
|
// eslint-disable-next-line @next/next/no-img-element -- framework-agnostic SDK; the SITE owns image optimisation
|
|
14054
|
-
/* @__PURE__ */
|
|
14102
|
+
/* @__PURE__ */ jsx13(
|
|
14055
14103
|
"img",
|
|
14056
14104
|
{
|
|
14057
14105
|
src,
|
|
14058
14106
|
alt: badge.name,
|
|
14059
14107
|
loading: "lazy",
|
|
14060
|
-
className:
|
|
14108
|
+
className: cn10("h-12 w-auto object-contain", logoClassName)
|
|
14061
14109
|
}
|
|
14062
14110
|
)
|
|
14063
14111
|
);
|
|
14064
14112
|
}
|
|
14065
|
-
return /* @__PURE__ */
|
|
14113
|
+
return /* @__PURE__ */ jsx13("span", { className: "text-sm font-medium", children: badge.name });
|
|
14066
14114
|
}
|
|
14067
14115
|
function TrustBadges({
|
|
14068
14116
|
badges,
|
|
@@ -14090,14 +14138,14 @@ function TrustBadges({
|
|
|
14090
14138
|
if (groups.length === 0) return null;
|
|
14091
14139
|
const hasHeading = heading !== void 0 && heading !== null && heading !== "";
|
|
14092
14140
|
const groupHeadingLevel = hasHeading ? nextHeadingLevel(headingLevel) : headingLevel;
|
|
14093
|
-
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */
|
|
14141
|
+
const content = groups.map(({ type, groupHeading, items }) => /* @__PURE__ */ jsxs12(
|
|
14094
14142
|
"div",
|
|
14095
14143
|
{
|
|
14096
14144
|
"data-slot": "trust-badge-group",
|
|
14097
14145
|
"data-type": type,
|
|
14098
|
-
className:
|
|
14146
|
+
className: cn10("space-y-3", groupClassName),
|
|
14099
14147
|
children: [
|
|
14100
|
-
groupHeading ? /* @__PURE__ */
|
|
14148
|
+
groupHeading ? /* @__PURE__ */ jsx13(
|
|
14101
14149
|
Heading,
|
|
14102
14150
|
{
|
|
14103
14151
|
level: groupHeadingLevel,
|
|
@@ -14109,30 +14157,30 @@ function TrustBadges({
|
|
|
14109
14157
|
children: groupHeading
|
|
14110
14158
|
}
|
|
14111
14159
|
) : null,
|
|
14112
|
-
/* @__PURE__ */
|
|
14160
|
+
/* @__PURE__ */ jsx13("ul", { className: cn10("flex flex-wrap items-center gap-6", listClassName), children: items.map((badge) => {
|
|
14113
14161
|
const href = safeHref(badge.url);
|
|
14114
|
-
return /* @__PURE__ */
|
|
14115
|
-
/* @__PURE__ */
|
|
14162
|
+
return /* @__PURE__ */ jsx13("li", { children: href ? /* @__PURE__ */ jsxs12("a", { href, target: "_blank", rel: "noopener noreferrer", className: "inline-flex", children: [
|
|
14163
|
+
/* @__PURE__ */ jsx13(BadgeContent, { badge, logoClassName }),
|
|
14116
14164
|
" ",
|
|
14117
|
-
/* @__PURE__ */
|
|
14118
|
-
] }) : /* @__PURE__ */
|
|
14165
|
+
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: newWindowLabel })
|
|
14166
|
+
] }) : /* @__PURE__ */ jsx13(BadgeContent, { badge, logoClassName }) }, badge.id);
|
|
14119
14167
|
}) })
|
|
14120
14168
|
]
|
|
14121
14169
|
},
|
|
14122
14170
|
type
|
|
14123
14171
|
));
|
|
14124
14172
|
if (!hasHeading) {
|
|
14125
|
-
return /* @__PURE__ */
|
|
14173
|
+
return /* @__PURE__ */ jsx13("div", { "data-slot": "trust-badges", className: cn10("space-y-6", className), children: content });
|
|
14126
14174
|
}
|
|
14127
14175
|
const Tag = `h${headingLevel}`;
|
|
14128
|
-
return /* @__PURE__ */
|
|
14176
|
+
return /* @__PURE__ */ jsxs12(
|
|
14129
14177
|
"section",
|
|
14130
14178
|
{
|
|
14131
14179
|
"data-slot": "trust-badges",
|
|
14132
14180
|
"aria-labelledby": headingId,
|
|
14133
|
-
className:
|
|
14181
|
+
className: cn10("space-y-6", className),
|
|
14134
14182
|
children: [
|
|
14135
|
-
/* @__PURE__ */
|
|
14183
|
+
/* @__PURE__ */ jsx13(
|
|
14136
14184
|
Tag,
|
|
14137
14185
|
{
|
|
14138
14186
|
id: headingId,
|
|
@@ -14147,40 +14195,40 @@ function TrustBadges({
|
|
|
14147
14195
|
}
|
|
14148
14196
|
|
|
14149
14197
|
// src/components/page-blocks.tsx
|
|
14150
|
-
import { cn as
|
|
14198
|
+
import { cn as cn11 } from "@reblu/site-ui/utils";
|
|
14151
14199
|
import { buttonVariants as buttonVariants2 } from "@reblu/site-ui/button-variants";
|
|
14152
|
-
import { jsx as
|
|
14200
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
14153
14201
|
var ALIASES = {
|
|
14154
14202
|
doctor_embed: "profile_embed",
|
|
14155
14203
|
specialty_embed: "page_embed"
|
|
14156
14204
|
};
|
|
14157
14205
|
function HeroBlock({ block, headingLevel }) {
|
|
14158
14206
|
const { title, subtitle, imageUrl } = block.data;
|
|
14159
|
-
return /* @__PURE__ */
|
|
14160
|
-
/* @__PURE__ */
|
|
14161
|
-
subtitle && /* @__PURE__ */
|
|
14162
|
-
imageUrl && /* @__PURE__ */
|
|
14207
|
+
return /* @__PURE__ */ jsxs13("div", { className: "space-y-4", children: [
|
|
14208
|
+
/* @__PURE__ */ jsx14(Heading, { level: headingLevel, className: "text-3xl font-bold tracking-tight md:text-4xl", children: title }),
|
|
14209
|
+
subtitle && /* @__PURE__ */ jsx14("p", { className: "text-lg opacity-80", children: subtitle }),
|
|
14210
|
+
imageUrl && /* @__PURE__ */ jsx14("div", { className: "relative aspect-[21/9] w-full overflow-hidden rounded-xl bg-muted", children: /* @__PURE__ */ jsx14("img", { src: imageUrl, alt: "", loading: "lazy", className: "h-full w-full object-cover" }) })
|
|
14163
14211
|
] });
|
|
14164
14212
|
}
|
|
14165
14213
|
function RichtextBlock({ block, headingLevel }) {
|
|
14166
|
-
return /* @__PURE__ */
|
|
14214
|
+
return /* @__PURE__ */ jsx14(SafeHtml, { html: sanitizeHtml(block.data.html), headingOffset: headingLevel - 1 });
|
|
14167
14215
|
}
|
|
14168
14216
|
function FaqBlock({ block }) {
|
|
14169
|
-
return /* @__PURE__ */
|
|
14217
|
+
return /* @__PURE__ */ jsx14(FaqAccordion, { items: block.data.items });
|
|
14170
14218
|
}
|
|
14171
14219
|
function StatsBlock({ block }) {
|
|
14172
|
-
return /* @__PURE__ */
|
|
14173
|
-
/* @__PURE__ */
|
|
14174
|
-
/* @__PURE__ */
|
|
14220
|
+
return /* @__PURE__ */ jsx14("dl", { className: "grid gap-6 sm:grid-cols-2 lg:grid-cols-4", children: block.data.items.map((item, i) => /* @__PURE__ */ jsxs13("div", { className: "flex flex-col-reverse gap-1", children: [
|
|
14221
|
+
/* @__PURE__ */ jsx14("dt", { className: "text-sm opacity-80", children: item.label }),
|
|
14222
|
+
/* @__PURE__ */ jsx14("dd", { className: "text-3xl font-bold", children: item.value })
|
|
14175
14223
|
] }, i)) });
|
|
14176
14224
|
}
|
|
14177
14225
|
function TestimonialBlock({ block }) {
|
|
14178
14226
|
const { quote, author, role, avatarUrl } = block.data;
|
|
14179
|
-
return /* @__PURE__ */
|
|
14180
|
-
/* @__PURE__ */
|
|
14181
|
-
/* @__PURE__ */
|
|
14227
|
+
return /* @__PURE__ */ jsxs13("figure", { className: "space-y-4", children: [
|
|
14228
|
+
/* @__PURE__ */ jsx14("blockquote", { className: "text-xl italic", children: /* @__PURE__ */ jsx14("p", { children: quote }) }),
|
|
14229
|
+
/* @__PURE__ */ jsxs13("figcaption", { className: "flex items-center gap-3", children: [
|
|
14182
14230
|
avatarUrl && // eslint-disable-next-line @next/next/no-img-element
|
|
14183
|
-
/* @__PURE__ */
|
|
14231
|
+
/* @__PURE__ */ jsx14(
|
|
14184
14232
|
"img",
|
|
14185
14233
|
{
|
|
14186
14234
|
src: avatarUrl,
|
|
@@ -14189,9 +14237,9 @@ function TestimonialBlock({ block }) {
|
|
|
14189
14237
|
className: "h-10 w-10 rounded-full object-cover"
|
|
14190
14238
|
}
|
|
14191
14239
|
),
|
|
14192
|
-
/* @__PURE__ */
|
|
14193
|
-
/* @__PURE__ */
|
|
14194
|
-
role && /* @__PURE__ */
|
|
14240
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
14241
|
+
/* @__PURE__ */ jsx14("span", { className: "font-semibold", children: author }),
|
|
14242
|
+
role && /* @__PURE__ */ jsx14("span", { className: "block text-sm opacity-80", children: role })
|
|
14195
14243
|
] })
|
|
14196
14244
|
] })
|
|
14197
14245
|
] });
|
|
@@ -14200,19 +14248,19 @@ function CtaSlotBlock(_props) {
|
|
|
14200
14248
|
return null;
|
|
14201
14249
|
}
|
|
14202
14250
|
function FeatureListBlock({ block }) {
|
|
14203
|
-
return /* @__PURE__ */
|
|
14251
|
+
return /* @__PURE__ */ jsx14("ul", { className: "grid list-disc gap-2 pl-5 sm:grid-cols-2", children: block.data.items.map((item, i) => /* @__PURE__ */ jsx14("li", { children: item.text }, i)) });
|
|
14204
14252
|
}
|
|
14205
14253
|
function GalleryBlock({ block }) {
|
|
14206
14254
|
const { images } = block.data;
|
|
14207
|
-
return /* @__PURE__ */
|
|
14255
|
+
return /* @__PURE__ */ jsx14(
|
|
14208
14256
|
"div",
|
|
14209
14257
|
{
|
|
14210
|
-
className:
|
|
14258
|
+
className: cn11(
|
|
14211
14259
|
"grid gap-4",
|
|
14212
14260
|
images.length > 1 ? "sm:grid-cols-2 lg:grid-cols-3" : "grid-cols-1"
|
|
14213
14261
|
),
|
|
14214
|
-
children: images.map((img, i) => /* @__PURE__ */
|
|
14215
|
-
/* @__PURE__ */
|
|
14262
|
+
children: images.map((img, i) => /* @__PURE__ */ jsxs13("figure", { className: "space-y-1", children: [
|
|
14263
|
+
/* @__PURE__ */ jsx14("div", { className: "relative aspect-video w-full overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx14(
|
|
14216
14264
|
"img",
|
|
14217
14265
|
{
|
|
14218
14266
|
src: img.url,
|
|
@@ -14221,7 +14269,7 @@ function GalleryBlock({ block }) {
|
|
|
14221
14269
|
className: "h-full w-full object-cover"
|
|
14222
14270
|
}
|
|
14223
14271
|
) }),
|
|
14224
|
-
img.caption && /* @__PURE__ */
|
|
14272
|
+
img.caption && /* @__PURE__ */ jsx14("figcaption", { className: "text-sm opacity-80", children: img.caption })
|
|
14225
14273
|
] }, `${img.url}-${i}`))
|
|
14226
14274
|
}
|
|
14227
14275
|
);
|
|
@@ -14231,13 +14279,13 @@ function EmbedCard({
|
|
|
14231
14279
|
headingLevel,
|
|
14232
14280
|
embedHref
|
|
14233
14281
|
}) {
|
|
14234
|
-
return /* @__PURE__ */
|
|
14282
|
+
return /* @__PURE__ */ jsxs13(
|
|
14235
14283
|
"a",
|
|
14236
14284
|
{
|
|
14237
14285
|
href: embedHref(resolved),
|
|
14238
14286
|
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",
|
|
14239
14287
|
children: [
|
|
14240
|
-
resolved.coverImageUrl && /* @__PURE__ */
|
|
14288
|
+
resolved.coverImageUrl && /* @__PURE__ */ jsx14("div", { className: "aspect-video w-full overflow-hidden bg-muted", children: /* @__PURE__ */ jsx14(
|
|
14241
14289
|
"img",
|
|
14242
14290
|
{
|
|
14243
14291
|
src: resolved.coverImageUrl,
|
|
@@ -14246,24 +14294,24 @@ function EmbedCard({
|
|
|
14246
14294
|
className: "h-full w-full object-cover"
|
|
14247
14295
|
}
|
|
14248
14296
|
) }),
|
|
14249
|
-
/* @__PURE__ */
|
|
14250
|
-
/* @__PURE__ */
|
|
14251
|
-
resolved.role && /* @__PURE__ */
|
|
14252
|
-
resolved.excerpt && /* @__PURE__ */
|
|
14297
|
+
/* @__PURE__ */ jsxs13("div", { className: "space-y-1 p-4", children: [
|
|
14298
|
+
/* @__PURE__ */ jsx14(Heading, { level: headingLevel, className: "text-lg font-semibold", children: resolved.title }),
|
|
14299
|
+
resolved.role && /* @__PURE__ */ jsx14("p", { className: "text-sm text-muted-foreground", children: resolved.role }),
|
|
14300
|
+
resolved.excerpt && /* @__PURE__ */ jsx14("p", { className: "text-muted-foreground", children: resolved.excerpt })
|
|
14253
14301
|
] })
|
|
14254
14302
|
]
|
|
14255
14303
|
}
|
|
14256
14304
|
);
|
|
14257
14305
|
}
|
|
14258
14306
|
function PageEmbedBlock({ block, headingLevel, embedHref }) {
|
|
14259
|
-
return /* @__PURE__ */
|
|
14307
|
+
return /* @__PURE__ */ jsx14(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14260
14308
|
}
|
|
14261
14309
|
function ProfileEmbedBlock({
|
|
14262
14310
|
block,
|
|
14263
14311
|
headingLevel,
|
|
14264
14312
|
embedHref
|
|
14265
14313
|
}) {
|
|
14266
|
-
return /* @__PURE__ */
|
|
14314
|
+
return /* @__PURE__ */ jsx14(EmbedCard, { resolved: block.resolved, headingLevel, embedHref });
|
|
14267
14315
|
}
|
|
14268
14316
|
var DEFAULT_RENDERERS = {
|
|
14269
14317
|
hero: HeroBlock,
|
|
@@ -14320,14 +14368,14 @@ function toIdFragment(value) {
|
|
|
14320
14368
|
function SectionCta2({ cta }) {
|
|
14321
14369
|
if (!hasUsableCta(cta)) return null;
|
|
14322
14370
|
const variant = toButtonVariant(cta.variant);
|
|
14323
|
-
return /* @__PURE__ */
|
|
14371
|
+
return /* @__PURE__ */ jsx14("div", { className: "pt-2", children: /* @__PURE__ */ jsx14(
|
|
14324
14372
|
"a",
|
|
14325
14373
|
{
|
|
14326
14374
|
href: cta.url,
|
|
14327
14375
|
"data-slot": "button",
|
|
14328
14376
|
"data-variant": variant,
|
|
14329
14377
|
"data-size": "default",
|
|
14330
|
-
className:
|
|
14378
|
+
className: cn11(buttonVariants2({ variant, size: "default" })),
|
|
14331
14379
|
...cta.isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
14332
14380
|
children: cta.label
|
|
14333
14381
|
}
|
|
@@ -14353,17 +14401,17 @@ function PageBlocks({
|
|
|
14353
14401
|
const headingId = block.heading ? `${safePrefix}-${toIdFragment(block.id)}-heading` : void 0;
|
|
14354
14402
|
const background = block.backgroundColor;
|
|
14355
14403
|
return [
|
|
14356
|
-
/* @__PURE__ */
|
|
14404
|
+
/* @__PURE__ */ jsxs13(
|
|
14357
14405
|
"section",
|
|
14358
14406
|
{
|
|
14359
14407
|
"data-slot": "page-block",
|
|
14360
14408
|
"data-block-type": type,
|
|
14361
14409
|
"aria-labelledby": headingId,
|
|
14362
14410
|
style: surfaceStyle(background),
|
|
14363
|
-
className:
|
|
14411
|
+
className: cn11("space-y-6", background && "rounded-xl px-6 py-10", sectionClassName),
|
|
14364
14412
|
children: [
|
|
14365
|
-
block.heading && /* @__PURE__ */
|
|
14366
|
-
/* @__PURE__ */
|
|
14413
|
+
block.heading && /* @__PURE__ */ jsx14(Heading, { level: headingLevel, className: "text-2xl font-bold tracking-tight", children: /* @__PURE__ */ jsx14("span", { id: headingId, children: block.heading }) }),
|
|
14414
|
+
/* @__PURE__ */ jsx14(
|
|
14367
14415
|
Renderer,
|
|
14368
14416
|
{
|
|
14369
14417
|
block,
|
|
@@ -14371,7 +14419,7 @@ function PageBlocks({
|
|
|
14371
14419
|
embedHref
|
|
14372
14420
|
}
|
|
14373
14421
|
),
|
|
14374
|
-
/* @__PURE__ */
|
|
14422
|
+
/* @__PURE__ */ jsx14(SectionCta2, { cta: block.cta })
|
|
14375
14423
|
]
|
|
14376
14424
|
},
|
|
14377
14425
|
block.id
|
|
@@ -14379,12 +14427,12 @@ function PageBlocks({
|
|
|
14379
14427
|
];
|
|
14380
14428
|
});
|
|
14381
14429
|
if (sections.length === 0) return null;
|
|
14382
|
-
return /* @__PURE__ */
|
|
14430
|
+
return /* @__PURE__ */ jsx14("div", { className: cn11("space-y-12", className), "data-slot": "page-blocks", children: sections });
|
|
14383
14431
|
}
|
|
14384
14432
|
|
|
14385
14433
|
// src/components/shop-filters.tsx
|
|
14386
|
-
import { cn as
|
|
14387
|
-
import { jsx as
|
|
14434
|
+
import { cn as cn12 } from "@reblu/site-ui/utils";
|
|
14435
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
14388
14436
|
var DEFAULT_SHOP_PRICE_BANDS = [
|
|
14389
14437
|
{ max: 2500 },
|
|
14390
14438
|
{ min: 2500, max: 5e3 },
|
|
@@ -14428,7 +14476,7 @@ function priceBandLabel(band, t, currencyCode, locale) {
|
|
|
14428
14476
|
return "";
|
|
14429
14477
|
}
|
|
14430
14478
|
function OptionLink({ href, active, label, onActivate }) {
|
|
14431
|
-
return /* @__PURE__ */
|
|
14479
|
+
return /* @__PURE__ */ jsx15(
|
|
14432
14480
|
"a",
|
|
14433
14481
|
{
|
|
14434
14482
|
href,
|
|
@@ -14437,7 +14485,7 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14437
14485
|
event.preventDefault();
|
|
14438
14486
|
onActivate();
|
|
14439
14487
|
} : void 0,
|
|
14440
|
-
className:
|
|
14488
|
+
className: cn12(
|
|
14441
14489
|
"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",
|
|
14442
14490
|
active ? "border-transparent bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
14443
14491
|
),
|
|
@@ -14446,9 +14494,9 @@ function OptionLink({ href, active, label, onActivate }) {
|
|
|
14446
14494
|
);
|
|
14447
14495
|
}
|
|
14448
14496
|
function FilterFieldset({ legend, children: children2 }) {
|
|
14449
|
-
return /* @__PURE__ */
|
|
14450
|
-
/* @__PURE__ */
|
|
14451
|
-
/* @__PURE__ */
|
|
14497
|
+
return /* @__PURE__ */ jsxs14("fieldset", { className: "space-y-2", children: [
|
|
14498
|
+
/* @__PURE__ */ jsx15("legend", { className: "text-sm font-medium text-foreground", children: legend }),
|
|
14499
|
+
/* @__PURE__ */ jsx15("div", { className: "flex flex-wrap gap-2", children: children2 })
|
|
14452
14500
|
] });
|
|
14453
14501
|
}
|
|
14454
14502
|
function ShopFilters({
|
|
@@ -14471,11 +14519,11 @@ function ShopFilters({
|
|
|
14471
14519
|
if (!shouldRenderShopFilters(facets, active)) {
|
|
14472
14520
|
return null;
|
|
14473
14521
|
}
|
|
14474
|
-
return /* @__PURE__ */
|
|
14522
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn12("space-y-6", className), "data-slot": "shop-filters", children: [
|
|
14475
14523
|
visibleTaxonomies.map((axis) => {
|
|
14476
14524
|
const activeSlug = active.taxonomy?.[axis.key];
|
|
14477
|
-
return /* @__PURE__ */
|
|
14478
|
-
/* @__PURE__ */
|
|
14525
|
+
return /* @__PURE__ */ jsxs14(FilterFieldset, { legend: axis.label, children: [
|
|
14526
|
+
/* @__PURE__ */ jsx15(
|
|
14479
14527
|
OptionLink,
|
|
14480
14528
|
{
|
|
14481
14529
|
href: hrefs.taxonomy(axis.key, void 0),
|
|
@@ -14490,7 +14538,7 @@ function ShopFilters({
|
|
|
14490
14538
|
),
|
|
14491
14539
|
axis.terms.map((term) => {
|
|
14492
14540
|
const isActive = activeSlug === term.slug;
|
|
14493
|
-
return /* @__PURE__ */
|
|
14541
|
+
return /* @__PURE__ */ jsx15(
|
|
14494
14542
|
OptionLink,
|
|
14495
14543
|
{
|
|
14496
14544
|
href: hrefs.taxonomy(axis.key, isActive ? void 0 : term.slug),
|
|
@@ -14510,9 +14558,9 @@ function ShopFilters({
|
|
|
14510
14558
|
}),
|
|
14511
14559
|
visibleAttributes.map((attr) => {
|
|
14512
14560
|
const activeValues = toValueArray(active.attr?.[attr.key]);
|
|
14513
|
-
return /* @__PURE__ */
|
|
14561
|
+
return /* @__PURE__ */ jsx15(FilterFieldset, { legend: attr.label, children: attr.options.map((opt) => {
|
|
14514
14562
|
const isActive = activeValues.includes(opt.value);
|
|
14515
|
-
return /* @__PURE__ */
|
|
14563
|
+
return /* @__PURE__ */ jsx15(
|
|
14516
14564
|
OptionLink,
|
|
14517
14565
|
{
|
|
14518
14566
|
href: hrefs.attr(attr.key, opt.value),
|
|
@@ -14530,11 +14578,11 @@ function ShopFilters({
|
|
|
14530
14578
|
);
|
|
14531
14579
|
}) }, attr.key);
|
|
14532
14580
|
}),
|
|
14533
|
-
showPriceGroup && /* @__PURE__ */
|
|
14581
|
+
showPriceGroup && /* @__PURE__ */ jsx15(FilterFieldset, { legend: t.price, children: priceBands.map((band, i) => {
|
|
14534
14582
|
const isActive = active.priceMin === band.min && active.priceMax === band.max;
|
|
14535
14583
|
const nextMin = isActive ? void 0 : band.min;
|
|
14536
14584
|
const nextMax = isActive ? void 0 : band.max;
|
|
14537
|
-
return /* @__PURE__ */
|
|
14585
|
+
return /* @__PURE__ */ jsx15(
|
|
14538
14586
|
OptionLink,
|
|
14539
14587
|
{
|
|
14540
14588
|
href: hrefs.price(nextMin, nextMax),
|
|
@@ -14545,7 +14593,7 @@ function ShopFilters({
|
|
|
14545
14593
|
i
|
|
14546
14594
|
);
|
|
14547
14595
|
}) }),
|
|
14548
|
-
hasOnSale && /* @__PURE__ */
|
|
14596
|
+
hasOnSale && /* @__PURE__ */ jsx15(
|
|
14549
14597
|
OptionLink,
|
|
14550
14598
|
{
|
|
14551
14599
|
href: hrefs.onSale(!active.onSale),
|
|
@@ -14554,7 +14602,7 @@ function ShopFilters({
|
|
|
14554
14602
|
onActivate: onChange ? () => onChange({ onSale: !active.onSale }) : void 0
|
|
14555
14603
|
}
|
|
14556
14604
|
),
|
|
14557
|
-
/* @__PURE__ */
|
|
14605
|
+
/* @__PURE__ */ jsx15(
|
|
14558
14606
|
"a",
|
|
14559
14607
|
{
|
|
14560
14608
|
href: hrefs.clearAll(),
|
|
@@ -14570,8 +14618,8 @@ function ShopFilters({
|
|
|
14570
14618
|
}
|
|
14571
14619
|
|
|
14572
14620
|
// src/components/cart-line-list.tsx
|
|
14573
|
-
import { cn as
|
|
14574
|
-
import { jsx as
|
|
14621
|
+
import { cn as cn13 } from "@reblu/site-ui/utils";
|
|
14622
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
14575
14623
|
var DEFAULT_LABELS2 = {
|
|
14576
14624
|
quantityLabel: "Cantidad",
|
|
14577
14625
|
decrease: "Reducir cantidad",
|
|
@@ -14597,9 +14645,9 @@ function CartLineList({
|
|
|
14597
14645
|
}) {
|
|
14598
14646
|
const t = { ...DEFAULT_LABELS2, ...labels };
|
|
14599
14647
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14600
|
-
return /* @__PURE__ */
|
|
14601
|
-
/* @__PURE__ */
|
|
14602
|
-
noticeContent != null && noticeContent !== false && /* @__PURE__ */
|
|
14648
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn13("space-y-4", className), "data-slot": "cart-line-list", children: [
|
|
14649
|
+
/* @__PURE__ */ jsx16("div", { "aria-live": "polite", className: "sr-only", children: liveMessage }),
|
|
14650
|
+
noticeContent != null && noticeContent !== false && /* @__PURE__ */ jsx16(
|
|
14603
14651
|
"div",
|
|
14604
14652
|
{
|
|
14605
14653
|
role: "status",
|
|
@@ -14608,69 +14656,69 @@ function CartLineList({
|
|
|
14608
14656
|
children: noticeContent
|
|
14609
14657
|
}
|
|
14610
14658
|
),
|
|
14611
|
-
/* @__PURE__ */
|
|
14659
|
+
/* @__PURE__ */ jsx16("ul", { className: "space-y-4", children: items.map((item) => {
|
|
14612
14660
|
const maxQty = item.maxStock ?? Infinity;
|
|
14613
14661
|
const atMax = item.quantity >= maxQty;
|
|
14614
14662
|
const atMin = item.quantity <= 1;
|
|
14615
14663
|
const message = lineMessage?.(item);
|
|
14616
|
-
return /* @__PURE__ */
|
|
14664
|
+
return /* @__PURE__ */ jsxs15(
|
|
14617
14665
|
"li",
|
|
14618
14666
|
{
|
|
14619
14667
|
className: "flex gap-4 rounded-xl border border-border bg-card p-4",
|
|
14620
14668
|
children: [
|
|
14621
|
-
/* @__PURE__ */
|
|
14622
|
-
/* @__PURE__ */
|
|
14623
|
-
/* @__PURE__ */
|
|
14624
|
-
item.variantName && /* @__PURE__ */
|
|
14625
|
-
/* @__PURE__ */
|
|
14669
|
+
/* @__PURE__ */ jsx16("div", { className: "h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-muted", children: item.imageUrl ? /* @__PURE__ */ jsx16("img", { src: item.imageUrl, alt: item.name, className: "h-full w-full object-cover" }) : null }),
|
|
14670
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0 flex-1", children: [
|
|
14671
|
+
/* @__PURE__ */ jsx16("p", { className: "truncate text-sm font-semibold leading-tight", children: item.name }),
|
|
14672
|
+
item.variantName && /* @__PURE__ */ jsx16("p", { className: "mt-0.5 text-xs text-muted-foreground", children: item.variantName }),
|
|
14673
|
+
/* @__PURE__ */ jsxs15("p", { className: "mt-1 text-sm text-muted-foreground", children: [
|
|
14626
14674
|
formatPrice(item.unitPrice, currencyCode, locale),
|
|
14627
14675
|
" ",
|
|
14628
14676
|
t.unitPriceSuffix
|
|
14629
14677
|
] }),
|
|
14630
|
-
/* @__PURE__ */
|
|
14678
|
+
/* @__PURE__ */ jsxs15(
|
|
14631
14679
|
"div",
|
|
14632
14680
|
{
|
|
14633
14681
|
role: "group",
|
|
14634
14682
|
"aria-label": t.quantityLabel,
|
|
14635
14683
|
className: "mt-3 flex items-center gap-3",
|
|
14636
14684
|
children: [
|
|
14637
|
-
/* @__PURE__ */
|
|
14685
|
+
/* @__PURE__ */ jsx16(
|
|
14638
14686
|
"button",
|
|
14639
14687
|
{
|
|
14640
14688
|
type: "button",
|
|
14641
14689
|
"aria-label": t.decrease,
|
|
14642
14690
|
disabled: !onQuantityChange || atMin,
|
|
14643
14691
|
onClick: onQuantityChange ? () => onQuantityChange(item.productId, item.variantId, item.quantity - 1) : void 0,
|
|
14644
|
-
className: "flex h-7 w-7 items-center justify-center rounded border border-border transition hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40",
|
|
14692
|
+
className: "flex h-7 w-7 cursor-pointer items-center justify-center rounded border border-border transition hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40",
|
|
14645
14693
|
children: "\u2212"
|
|
14646
14694
|
}
|
|
14647
14695
|
),
|
|
14648
|
-
/* @__PURE__ */
|
|
14649
|
-
/* @__PURE__ */
|
|
14696
|
+
/* @__PURE__ */ jsx16("span", { className: "w-8 text-center text-sm font-semibold tabular-nums", children: item.quantity }),
|
|
14697
|
+
/* @__PURE__ */ jsx16(
|
|
14650
14698
|
"button",
|
|
14651
14699
|
{
|
|
14652
14700
|
type: "button",
|
|
14653
14701
|
"aria-label": t.increase,
|
|
14654
14702
|
disabled: !onQuantityChange || atMax,
|
|
14655
14703
|
onClick: onQuantityChange ? () => onQuantityChange(item.productId, item.variantId, item.quantity + 1) : void 0,
|
|
14656
|
-
className: "flex h-7 w-7 items-center justify-center rounded border border-border transition hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40",
|
|
14704
|
+
className: "flex h-7 w-7 cursor-pointer items-center justify-center rounded border border-border transition hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40",
|
|
14657
14705
|
children: "+"
|
|
14658
14706
|
}
|
|
14659
14707
|
),
|
|
14660
|
-
onRemove && /* @__PURE__ */
|
|
14708
|
+
onRemove && /* @__PURE__ */ jsx16(
|
|
14661
14709
|
"button",
|
|
14662
14710
|
{
|
|
14663
14711
|
type: "button",
|
|
14664
14712
|
"aria-label": `${t.remove} ${item.name}`,
|
|
14665
14713
|
onClick: () => onRemove(item.productId, item.variantId),
|
|
14666
|
-
className: "ml-2 text-muted-foreground transition-colors hover:text-destructive",
|
|
14714
|
+
className: "ml-2 cursor-pointer text-muted-foreground transition-colors hover:text-destructive",
|
|
14667
14715
|
children: t.remove
|
|
14668
14716
|
}
|
|
14669
14717
|
)
|
|
14670
14718
|
]
|
|
14671
14719
|
}
|
|
14672
14720
|
),
|
|
14673
|
-
message != null && message !== false && /* @__PURE__ */
|
|
14721
|
+
message != null && message !== false && /* @__PURE__ */ jsx16(
|
|
14674
14722
|
"p",
|
|
14675
14723
|
{
|
|
14676
14724
|
className: "mt-2 text-sm text-destructive",
|
|
@@ -14679,7 +14727,7 @@ function CartLineList({
|
|
|
14679
14727
|
}
|
|
14680
14728
|
)
|
|
14681
14729
|
] }),
|
|
14682
|
-
/* @__PURE__ */
|
|
14730
|
+
/* @__PURE__ */ jsx16("div", { className: "flex-shrink-0 text-right", children: /* @__PURE__ */ jsx16("p", { className: "text-base font-bold", children: formatPrice(item.unitPrice * item.quantity, currencyCode, locale) }) })
|
|
14683
14731
|
]
|
|
14684
14732
|
},
|
|
14685
14733
|
lineKey(item.productId, item.variantId)
|
|
@@ -14689,8 +14737,8 @@ function CartLineList({
|
|
|
14689
14737
|
}
|
|
14690
14738
|
|
|
14691
14739
|
// src/components/cart-summary.tsx
|
|
14692
|
-
import { cn as
|
|
14693
|
-
import { jsx as
|
|
14740
|
+
import { cn as cn14 } from "@reblu/site-ui/utils";
|
|
14741
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
14694
14742
|
var DEFAULT_LABELS3 = {
|
|
14695
14743
|
subtotal: "Subtotal",
|
|
14696
14744
|
discountPrefix: "Descuento",
|
|
@@ -14717,40 +14765,40 @@ function CartSummary({
|
|
|
14717
14765
|
const hasDiscount = Boolean(discount && discount > 0);
|
|
14718
14766
|
const noticeContent = notice === true ? t.cancelledNotice : notice;
|
|
14719
14767
|
const hasNotice = noticeContent != null && noticeContent !== false;
|
|
14720
|
-
const breakdown = /* @__PURE__ */
|
|
14768
|
+
const breakdown = /* @__PURE__ */ jsxs16(
|
|
14721
14769
|
"dl",
|
|
14722
14770
|
{
|
|
14723
|
-
className:
|
|
14771
|
+
className: cn14("space-y-2 text-sm", !hasNotice && className),
|
|
14724
14772
|
"data-slot": "cart-summary",
|
|
14725
14773
|
children: [
|
|
14726
|
-
/* @__PURE__ */
|
|
14727
|
-
/* @__PURE__ */
|
|
14728
|
-
/* @__PURE__ */
|
|
14774
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14775
|
+
/* @__PURE__ */ jsx17("dt", { children: t.subtotal }),
|
|
14776
|
+
/* @__PURE__ */ jsx17("dd", { children: formatPrice(subtotal, currencyCode, locale) })
|
|
14729
14777
|
] }),
|
|
14730
|
-
hasDiscount && /* @__PURE__ */
|
|
14731
|
-
/* @__PURE__ */
|
|
14778
|
+
hasDiscount && /* @__PURE__ */ jsxs16("div", { className: "flex justify-between text-green-600 dark:text-green-400", children: [
|
|
14779
|
+
/* @__PURE__ */ jsxs16("dt", { children: [
|
|
14732
14780
|
t.discountPrefix,
|
|
14733
14781
|
discountCode ? ` (${discountCode})` : ""
|
|
14734
14782
|
] }),
|
|
14735
|
-
/* @__PURE__ */
|
|
14783
|
+
/* @__PURE__ */ jsxs16("dd", { children: [
|
|
14736
14784
|
"-",
|
|
14737
14785
|
formatPrice(discount, currencyCode, locale)
|
|
14738
14786
|
] })
|
|
14739
14787
|
] }),
|
|
14740
|
-
shippingEnabled && /* @__PURE__ */
|
|
14741
|
-
/* @__PURE__ */
|
|
14742
|
-
/* @__PURE__ */
|
|
14788
|
+
shippingEnabled && /* @__PURE__ */ jsxs16("div", { className: "flex justify-between text-muted-foreground", children: [
|
|
14789
|
+
/* @__PURE__ */ jsx17("dt", { children: t.shipping }),
|
|
14790
|
+
/* @__PURE__ */ jsx17("dd", { children: shipping == null || !Number.isFinite(shipping) ? t.shippingCalculated : shipping === 0 ? t.freeShipping : formatPrice(shipping, currencyCode, locale) })
|
|
14743
14791
|
] }),
|
|
14744
|
-
/* @__PURE__ */
|
|
14745
|
-
/* @__PURE__ */
|
|
14746
|
-
/* @__PURE__ */
|
|
14792
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex justify-between border-t border-border pt-2 text-base font-bold", children: [
|
|
14793
|
+
/* @__PURE__ */ jsx17("dt", { children: t.total }),
|
|
14794
|
+
/* @__PURE__ */ jsx17("dd", { children: formatPrice(total, currencyCode, locale) })
|
|
14747
14795
|
] })
|
|
14748
14796
|
]
|
|
14749
14797
|
}
|
|
14750
14798
|
);
|
|
14751
14799
|
if (!hasNotice) return breakdown;
|
|
14752
|
-
return /* @__PURE__ */
|
|
14753
|
-
/* @__PURE__ */
|
|
14800
|
+
return /* @__PURE__ */ jsxs16("div", { className: cn14("space-y-3", className), "data-slot": "cart-summary-wrapper", children: [
|
|
14801
|
+
/* @__PURE__ */ jsx17(
|
|
14754
14802
|
"div",
|
|
14755
14803
|
{
|
|
14756
14804
|
role: "status",
|
|
@@ -14764,8 +14812,8 @@ function CartSummary({
|
|
|
14764
14812
|
}
|
|
14765
14813
|
|
|
14766
14814
|
// src/components/cart-adjustments-notice.tsx
|
|
14767
|
-
import { cn as
|
|
14768
|
-
import { jsx as
|
|
14815
|
+
import { cn as cn15 } from "@reblu/site-ui/utils";
|
|
14816
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
14769
14817
|
var DEFAULT_LABELS4 = {
|
|
14770
14818
|
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.`,
|
|
14771
14819
|
quantityChanged: (name, quantity) => `Hemos ajustado la cantidad de ${name} a ${quantity} por el stock disponible.`,
|
|
@@ -14799,20 +14847,20 @@ function CartAdjustmentsNotice({
|
|
|
14799
14847
|
);
|
|
14800
14848
|
}
|
|
14801
14849
|
if (messages.length === 0) return null;
|
|
14802
|
-
return /* @__PURE__ */
|
|
14850
|
+
return /* @__PURE__ */ jsx18(
|
|
14803
14851
|
"div",
|
|
14804
14852
|
{
|
|
14805
14853
|
role: "status",
|
|
14806
|
-
className:
|
|
14854
|
+
className: cn15("rounded-lg border border-border bg-muted px-3 py-2 text-sm", className),
|
|
14807
14855
|
"data-slot": "cart-adjustments-notice",
|
|
14808
|
-
children: messages.length === 1 ? /* @__PURE__ */
|
|
14856
|
+
children: messages.length === 1 ? /* @__PURE__ */ jsx18("p", { children: messages[0] }) : /* @__PURE__ */ jsx18("ul", { className: "list-disc space-y-1 pl-4", children: messages.map((message, index) => /* @__PURE__ */ jsx18("li", { children: message }, index)) })
|
|
14809
14857
|
}
|
|
14810
14858
|
);
|
|
14811
14859
|
}
|
|
14812
14860
|
|
|
14813
14861
|
// src/components/added-to-cart-toast.tsx
|
|
14814
|
-
import { cn as
|
|
14815
|
-
import { jsx as
|
|
14862
|
+
import { cn as cn16 } from "@reblu/site-ui/utils";
|
|
14863
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
14816
14864
|
var DEFAULT_LABELS5 = {
|
|
14817
14865
|
success: "A\xF1adido al carrito",
|
|
14818
14866
|
error: "No se pudo a\xF1adir al carrito",
|
|
@@ -14832,12 +14880,12 @@ function AddedToCartToast({
|
|
|
14832
14880
|
const message = status === "error" ? t.error : status === "outOfStock" ? t.outOfStock : t.success;
|
|
14833
14881
|
const hasThumbnail = Boolean(imageUrl && imageUrl.trim().length > 0);
|
|
14834
14882
|
const variant = status === "success" ? "success" : "error";
|
|
14835
|
-
return /* @__PURE__ */
|
|
14883
|
+
return /* @__PURE__ */ jsxs17(
|
|
14836
14884
|
"div",
|
|
14837
14885
|
{
|
|
14838
14886
|
"data-slot": "added-to-cart-toast",
|
|
14839
14887
|
"data-variant": variant,
|
|
14840
|
-
className:
|
|
14888
|
+
className: cn16(
|
|
14841
14889
|
"flex items-center gap-3 rounded-xl border border-border bg-card p-3 text-sm shadow-lg",
|
|
14842
14890
|
variant === "success" && "border-green-600/30 dark:border-green-400/30",
|
|
14843
14891
|
variant === "error" && "border-destructive/30",
|
|
@@ -14845,20 +14893,20 @@ function AddedToCartToast({
|
|
|
14845
14893
|
),
|
|
14846
14894
|
children: [
|
|
14847
14895
|
hasThumbnail && // eslint-disable-next-line @next/next/no-img-element -- toast content, not a Next <Image> layout context
|
|
14848
|
-
/* @__PURE__ */
|
|
14849
|
-
/* @__PURE__ */
|
|
14850
|
-
/* @__PURE__ */
|
|
14851
|
-
/* @__PURE__ */
|
|
14896
|
+
/* @__PURE__ */ jsx19("img", { src: imageUrl, alt: productName, className: "h-10 w-10 flex-shrink-0 rounded-lg object-cover" }),
|
|
14897
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
|
|
14898
|
+
/* @__PURE__ */ jsx19("p", { className: "truncate font-semibold text-foreground", children: productName }),
|
|
14899
|
+
/* @__PURE__ */ jsx19("p", { className: "truncate text-muted-foreground", children: quantity && quantity > 1 ? `${message} \xB7 x${quantity}` : message })
|
|
14852
14900
|
] }),
|
|
14853
|
-
/* @__PURE__ */
|
|
14901
|
+
/* @__PURE__ */ jsx19("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx19("a", { href: cartHref, className: "text-sm font-semibold text-primary underline-offset-2 hover:underline", children: t.viewCart }) })
|
|
14854
14902
|
]
|
|
14855
14903
|
}
|
|
14856
14904
|
);
|
|
14857
14905
|
}
|
|
14858
14906
|
|
|
14859
14907
|
// src/components/checkout-login-prompt.tsx
|
|
14860
|
-
import { cn as
|
|
14861
|
-
import { Fragment as Fragment3, jsx as
|
|
14908
|
+
import { cn as cn17 } from "@reblu/site-ui/utils";
|
|
14909
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
14862
14910
|
var DEFAULT_LABELS6 = {
|
|
14863
14911
|
title: "Identificaci\xF3n",
|
|
14864
14912
|
description: "Introduce tu email para agilizar el proceso o contin\xFAa como invitado.",
|
|
@@ -14885,39 +14933,39 @@ function CheckoutLoginPrompt({
|
|
|
14885
14933
|
if (!open) return null;
|
|
14886
14934
|
const t = { ...DEFAULT_LABELS6, ...labels };
|
|
14887
14935
|
const isValidEmail = EMAIL_PATTERN.test(email.trim());
|
|
14888
|
-
return /* @__PURE__ */
|
|
14889
|
-
/* @__PURE__ */
|
|
14890
|
-
/* @__PURE__ */
|
|
14936
|
+
return /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
14937
|
+
/* @__PURE__ */ jsx20("div", { className: "fixed inset-0 z-50 bg-black/50", onClick: onClose, "aria-hidden": "true" }),
|
|
14938
|
+
/* @__PURE__ */ jsxs18(
|
|
14891
14939
|
"div",
|
|
14892
14940
|
{
|
|
14893
14941
|
role: "dialog",
|
|
14894
14942
|
"aria-modal": "true",
|
|
14895
14943
|
"aria-labelledby": "checkout-login-prompt-title",
|
|
14896
14944
|
"data-slot": "checkout-login-prompt",
|
|
14897
|
-
className:
|
|
14945
|
+
className: cn17(
|
|
14898
14946
|
"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",
|
|
14899
14947
|
className
|
|
14900
14948
|
),
|
|
14901
14949
|
children: [
|
|
14902
|
-
/* @__PURE__ */
|
|
14903
|
-
/* @__PURE__ */
|
|
14904
|
-
/* @__PURE__ */
|
|
14905
|
-
/* @__PURE__ */
|
|
14950
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-start justify-between gap-3", children: [
|
|
14951
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
14952
|
+
/* @__PURE__ */ jsx20("h2", { id: "checkout-login-prompt-title", className: "text-xl font-bold", children: t.title }),
|
|
14953
|
+
/* @__PURE__ */ jsx20("p", { className: "mt-1 text-sm text-muted-foreground", children: t.description })
|
|
14906
14954
|
] }),
|
|
14907
|
-
/* @__PURE__ */
|
|
14955
|
+
/* @__PURE__ */ jsx20(
|
|
14908
14956
|
"button",
|
|
14909
14957
|
{
|
|
14910
14958
|
type: "button",
|
|
14911
14959
|
onClick: onClose,
|
|
14912
14960
|
"aria-label": t.close,
|
|
14913
|
-
className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
14961
|
+
className: "flex h-8 w-8 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
14914
14962
|
children: "\u2715"
|
|
14915
14963
|
}
|
|
14916
14964
|
)
|
|
14917
14965
|
] }),
|
|
14918
|
-
/* @__PURE__ */
|
|
14919
|
-
/* @__PURE__ */
|
|
14920
|
-
/* @__PURE__ */
|
|
14966
|
+
/* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
|
|
14967
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: "checkout-login-prompt-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
14968
|
+
/* @__PURE__ */ jsx20(
|
|
14921
14969
|
"input",
|
|
14922
14970
|
{
|
|
14923
14971
|
id: "checkout-login-prompt-email",
|
|
@@ -14926,34 +14974,34 @@ function CheckoutLoginPrompt({
|
|
|
14926
14974
|
value: email,
|
|
14927
14975
|
onChange: (e) => onEmailChange(e.target.value),
|
|
14928
14976
|
placeholder: t.emailPlaceholder,
|
|
14929
|
-
className:
|
|
14977
|
+
className: cn17(
|
|
14930
14978
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
14931
14979
|
error ? "border-destructive" : "border-border focus:border-primary"
|
|
14932
14980
|
)
|
|
14933
14981
|
}
|
|
14934
14982
|
),
|
|
14935
|
-
error && /* @__PURE__ */
|
|
14983
|
+
error && /* @__PURE__ */ jsx20("p", { className: "text-xs text-destructive", children: error })
|
|
14936
14984
|
] }),
|
|
14937
|
-
/* @__PURE__ */
|
|
14938
|
-
/* @__PURE__ */
|
|
14985
|
+
/* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
|
|
14986
|
+
/* @__PURE__ */ jsx20(
|
|
14939
14987
|
"button",
|
|
14940
14988
|
{
|
|
14941
14989
|
type: "button",
|
|
14942
14990
|
onClick: onSubmitEmail,
|
|
14943
14991
|
disabled: checking || !isValidEmail,
|
|
14944
|
-
className:
|
|
14945
|
-
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14992
|
+
className: cn17(
|
|
14993
|
+
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-all",
|
|
14946
14994
|
checking || !isValidEmail ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
14947
14995
|
),
|
|
14948
14996
|
children: checking ? t.checking : t.continueWithEmail
|
|
14949
14997
|
}
|
|
14950
14998
|
),
|
|
14951
|
-
/* @__PURE__ */
|
|
14999
|
+
/* @__PURE__ */ jsx20(
|
|
14952
15000
|
"button",
|
|
14953
15001
|
{
|
|
14954
15002
|
type: "button",
|
|
14955
15003
|
onClick: onContinueAsGuest,
|
|
14956
|
-
className: "flex w-full items-center justify-center gap-2 rounded-xl bg-muted px-4 py-2.5 text-sm font-semibold text-muted-foreground transition-colors hover:bg-muted/70",
|
|
15004
|
+
className: "flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl bg-muted px-4 py-2.5 text-sm font-semibold text-muted-foreground transition-colors hover:bg-muted/70",
|
|
14957
15005
|
children: t.continueAsGuest
|
|
14958
15006
|
}
|
|
14959
15007
|
)
|
|
@@ -14965,9 +15013,9 @@ function CheckoutLoginPrompt({
|
|
|
14965
15013
|
}
|
|
14966
15014
|
|
|
14967
15015
|
// src/components/checkout-form.tsx
|
|
14968
|
-
import { cn as
|
|
15016
|
+
import { cn as cn18 } from "@reblu/site-ui/utils";
|
|
14969
15017
|
import { PhoneInput } from "@reblu/site-ui/phone-input";
|
|
14970
|
-
import { Fragment as Fragment4, jsx as
|
|
15018
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
14971
15019
|
var DEFAULT_LABELS7 = {
|
|
14972
15020
|
contactTitle: "Datos de contacto",
|
|
14973
15021
|
nameLabel: "Nombre completo",
|
|
@@ -15021,22 +15069,22 @@ function CheckoutForm({
|
|
|
15021
15069
|
event.preventDefault();
|
|
15022
15070
|
if (discountCode.trim() && !discountApplying) onApplyDiscount();
|
|
15023
15071
|
}
|
|
15024
|
-
return /* @__PURE__ */
|
|
15072
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
15025
15073
|
loginPrompt,
|
|
15026
|
-
/* @__PURE__ */
|
|
15074
|
+
/* @__PURE__ */ jsxs19(
|
|
15027
15075
|
"form",
|
|
15028
15076
|
{
|
|
15029
15077
|
"data-testid": "checkout-form",
|
|
15030
15078
|
onSubmit,
|
|
15031
|
-
className:
|
|
15079
|
+
className: cn18("space-y-8", className),
|
|
15032
15080
|
"data-slot": "checkout-form",
|
|
15033
15081
|
children: [
|
|
15034
|
-
/* @__PURE__ */
|
|
15035
|
-
/* @__PURE__ */
|
|
15036
|
-
/* @__PURE__ */
|
|
15037
|
-
/* @__PURE__ */
|
|
15038
|
-
/* @__PURE__ */
|
|
15039
|
-
/* @__PURE__ */
|
|
15082
|
+
/* @__PURE__ */ jsxs19("section", { className: "space-y-4", children: [
|
|
15083
|
+
/* @__PURE__ */ jsx21("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.contactTitle }),
|
|
15084
|
+
/* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15085
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15086
|
+
/* @__PURE__ */ jsx21("label", { htmlFor: "checkout-form-name", className: "text-sm font-medium", children: t.nameLabel }),
|
|
15087
|
+
/* @__PURE__ */ jsx21(
|
|
15040
15088
|
"input",
|
|
15041
15089
|
{
|
|
15042
15090
|
id: "checkout-form-name",
|
|
@@ -15045,17 +15093,17 @@ function CheckoutForm({
|
|
|
15045
15093
|
value: contact.name,
|
|
15046
15094
|
onChange: (e) => patchContact({ name: e.target.value }),
|
|
15047
15095
|
placeholder: t.namePlaceholder,
|
|
15048
|
-
className:
|
|
15096
|
+
className: cn18(
|
|
15049
15097
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15050
15098
|
contactErrors?.name ? "border-destructive" : "border-border focus:border-primary"
|
|
15051
15099
|
)
|
|
15052
15100
|
}
|
|
15053
15101
|
),
|
|
15054
|
-
contactErrors?.name && /* @__PURE__ */
|
|
15102
|
+
contactErrors?.name && /* @__PURE__ */ jsx21("p", { className: "text-xs text-destructive", children: contactErrors.name })
|
|
15055
15103
|
] }),
|
|
15056
|
-
/* @__PURE__ */
|
|
15057
|
-
/* @__PURE__ */
|
|
15058
|
-
/* @__PURE__ */
|
|
15104
|
+
/* @__PURE__ */ jsxs19("div", { className: "space-y-1", children: [
|
|
15105
|
+
/* @__PURE__ */ jsx21("label", { htmlFor: "checkout-form-email", className: "text-sm font-medium", children: t.emailLabel }),
|
|
15106
|
+
/* @__PURE__ */ jsx21(
|
|
15059
15107
|
"input",
|
|
15060
15108
|
{
|
|
15061
15109
|
id: "checkout-form-email",
|
|
@@ -15064,15 +15112,15 @@ function CheckoutForm({
|
|
|
15064
15112
|
value: contact.email,
|
|
15065
15113
|
onChange: (e) => patchContact({ email: e.target.value }),
|
|
15066
15114
|
placeholder: t.emailPlaceholder,
|
|
15067
|
-
className:
|
|
15115
|
+
className: cn18(
|
|
15068
15116
|
"w-full rounded-lg border bg-background px-3 py-2 text-sm transition focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
15069
15117
|
contactErrors?.email ? "border-destructive" : "border-border focus:border-primary"
|
|
15070
15118
|
)
|
|
15071
15119
|
}
|
|
15072
15120
|
),
|
|
15073
|
-
contactErrors?.email && /* @__PURE__ */
|
|
15121
|
+
contactErrors?.email && /* @__PURE__ */ jsx21("p", { className: "text-xs text-destructive", children: contactErrors.email })
|
|
15074
15122
|
] }),
|
|
15075
|
-
/* @__PURE__ */
|
|
15123
|
+
/* @__PURE__ */ jsx21("div", { className: "space-y-1", children: /* @__PURE__ */ jsx21(
|
|
15076
15124
|
PhoneInput,
|
|
15077
15125
|
{
|
|
15078
15126
|
id: "checkout-form-phone",
|
|
@@ -15086,27 +15134,27 @@ function CheckoutForm({
|
|
|
15086
15134
|
] })
|
|
15087
15135
|
] }),
|
|
15088
15136
|
children2,
|
|
15089
|
-
generalError ? /* @__PURE__ */
|
|
15090
|
-
/* @__PURE__ */
|
|
15091
|
-
/* @__PURE__ */
|
|
15092
|
-
appliedDiscount ? /* @__PURE__ */
|
|
15093
|
-
/* @__PURE__ */
|
|
15094
|
-
/* @__PURE__ */
|
|
15095
|
-
/* @__PURE__ */
|
|
15137
|
+
generalError ? /* @__PURE__ */ jsx21("p", { role: "alert", className: "text-sm text-destructive", children: generalError }) : null,
|
|
15138
|
+
/* @__PURE__ */ jsxs19("section", { className: "space-y-3", children: [
|
|
15139
|
+
/* @__PURE__ */ jsx21("h2", { className: "border-b border-border pb-2 text-lg font-semibold", children: t.discountTitle }),
|
|
15140
|
+
appliedDiscount ? /* @__PURE__ */ jsxs19("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: [
|
|
15141
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 text-sm text-green-700 dark:text-green-400", children: [
|
|
15142
|
+
/* @__PURE__ */ jsx21("span", { className: "font-semibold", children: appliedDiscount.code }),
|
|
15143
|
+
/* @__PURE__ */ jsx21("span", { children: t.discountAppliedSuffix(formatPrice(appliedDiscount.amount, currencyCode, locale)) })
|
|
15096
15144
|
] }),
|
|
15097
|
-
/* @__PURE__ */
|
|
15145
|
+
/* @__PURE__ */ jsx21(
|
|
15098
15146
|
"button",
|
|
15099
15147
|
{
|
|
15100
15148
|
type: "button",
|
|
15101
15149
|
onClick: onRemoveDiscount,
|
|
15102
15150
|
"aria-label": t.removeDiscount,
|
|
15103
|
-
className: "text-green-600 transition-colors hover:text-green-800 dark:text-green-400 dark:hover:text-green-200",
|
|
15151
|
+
className: "cursor-pointer text-green-600 transition-colors hover:text-green-800 dark:text-green-400 dark:hover:text-green-200",
|
|
15104
15152
|
children: t.removeDiscount
|
|
15105
15153
|
}
|
|
15106
15154
|
)
|
|
15107
|
-
] }) : /* @__PURE__ */
|
|
15108
|
-
/* @__PURE__ */
|
|
15109
|
-
/* @__PURE__ */
|
|
15155
|
+
] }) : /* @__PURE__ */ jsxs19("div", { className: "flex gap-2", children: [
|
|
15156
|
+
/* @__PURE__ */ jsx21("label", { htmlFor: "checkout-form-discount-code", className: "sr-only", children: t.discountTitle }),
|
|
15157
|
+
/* @__PURE__ */ jsx21(
|
|
15110
15158
|
"input",
|
|
15111
15159
|
{
|
|
15112
15160
|
id: "checkout-form-discount-code",
|
|
@@ -15118,26 +15166,26 @@ function CheckoutForm({
|
|
|
15118
15166
|
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"
|
|
15119
15167
|
}
|
|
15120
15168
|
),
|
|
15121
|
-
/* @__PURE__ */
|
|
15169
|
+
/* @__PURE__ */ jsx21(
|
|
15122
15170
|
"button",
|
|
15123
15171
|
{
|
|
15124
15172
|
type: "button",
|
|
15125
15173
|
onClick: onApplyDiscount,
|
|
15126
15174
|
disabled: !discountCode.trim() || discountApplying,
|
|
15127
|
-
className: "rounded-lg bg-muted px-4 py-2 text-sm font-medium text-foreground transition hover:bg-muted/70 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15175
|
+
className: "cursor-pointer rounded-lg bg-muted px-4 py-2 text-sm font-medium text-foreground transition hover:bg-muted/70 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15128
15176
|
children: discountApplying ? t.applyingDiscount : t.applyDiscount
|
|
15129
15177
|
}
|
|
15130
15178
|
)
|
|
15131
15179
|
] }),
|
|
15132
|
-
discountError && /* @__PURE__ */
|
|
15180
|
+
discountError && /* @__PURE__ */ jsx21("p", { className: "text-xs text-destructive", children: discountError })
|
|
15133
15181
|
] }),
|
|
15134
|
-
/* @__PURE__ */
|
|
15182
|
+
/* @__PURE__ */ jsx21(
|
|
15135
15183
|
"button",
|
|
15136
15184
|
{
|
|
15137
15185
|
type: "submit",
|
|
15138
15186
|
disabled: submitting || submitDisabled,
|
|
15139
|
-
className:
|
|
15140
|
-
"flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
15187
|
+
className: cn18(
|
|
15188
|
+
"flex w-full cursor-pointer items-center justify-center gap-2 rounded-xl px-4 py-3 font-semibold transition-all",
|
|
15141
15189
|
submitting || submitDisabled ? "cursor-not-allowed bg-muted text-muted-foreground" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
15142
15190
|
),
|
|
15143
15191
|
children: submitting ? t.submitting : t.submit
|
|
@@ -15150,11 +15198,11 @@ function CheckoutForm({
|
|
|
15150
15198
|
}
|
|
15151
15199
|
|
|
15152
15200
|
// src/components/order-confirmation.tsx
|
|
15153
|
-
import { cn as
|
|
15201
|
+
import { cn as cn20 } from "@reblu/site-ui/utils";
|
|
15154
15202
|
|
|
15155
15203
|
// src/components/order-invoice-link.tsx
|
|
15156
|
-
import { cn as
|
|
15157
|
-
import { jsx as
|
|
15204
|
+
import { cn as cn19 } from "@reblu/site-ui/utils";
|
|
15205
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
15158
15206
|
var DEFAULT_LABELS8 = {
|
|
15159
15207
|
linkLabel: "Descargar la factura {number}",
|
|
15160
15208
|
signInHint: "Te pediremos que inicies sesi\xF3n para abrirla."
|
|
@@ -15162,8 +15210,8 @@ var DEFAULT_LABELS8 = {
|
|
|
15162
15210
|
function OrderInvoiceLink({ invoice, labels, className }) {
|
|
15163
15211
|
if (!invoice) return null;
|
|
15164
15212
|
const t = { ...DEFAULT_LABELS8, ...labels };
|
|
15165
|
-
return /* @__PURE__ */
|
|
15166
|
-
/* @__PURE__ */
|
|
15213
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn19("space-y-1 text-sm", className), "data-slot": "order-invoice-link", children: [
|
|
15214
|
+
/* @__PURE__ */ jsx22(
|
|
15167
15215
|
"a",
|
|
15168
15216
|
{
|
|
15169
15217
|
href: invoice.url,
|
|
@@ -15171,12 +15219,12 @@ function OrderInvoiceLink({ invoice, labels, className }) {
|
|
|
15171
15219
|
children: t.linkLabel.replace("{number}", invoice.number)
|
|
15172
15220
|
}
|
|
15173
15221
|
),
|
|
15174
|
-
/* @__PURE__ */
|
|
15222
|
+
/* @__PURE__ */ jsx22("p", { className: "text-muted-foreground", children: t.signInHint })
|
|
15175
15223
|
] });
|
|
15176
15224
|
}
|
|
15177
15225
|
|
|
15178
15226
|
// src/components/order-confirmation.tsx
|
|
15179
|
-
import { jsx as
|
|
15227
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
15180
15228
|
var DEFAULT_LABELS9 = {
|
|
15181
15229
|
pollingTitle: "Confirmando tu pedido\u2026",
|
|
15182
15230
|
pollingDescription: "Estamos procesando el pago, un momento\u2026",
|
|
@@ -15240,43 +15288,43 @@ function OrderConfirmation({
|
|
|
15240
15288
|
const showOrderReference = Boolean(order) && !showFullOrderSummary && (status === "refunded" || status === "partially_refunded" || status === "pending_timeout");
|
|
15241
15289
|
const showSessionReference = !order && sessionId && (status === "timeout" || status === "not_found" || status === "pending_timeout");
|
|
15242
15290
|
const showRecheck = (status === "pending_timeout" || status === "error") && onRecheck;
|
|
15243
|
-
return /* @__PURE__ */
|
|
15244
|
-
/* @__PURE__ */
|
|
15245
|
-
/* @__PURE__ */
|
|
15246
|
-
showFullOrderSummary && order && /* @__PURE__ */
|
|
15247
|
-
/* @__PURE__ */
|
|
15248
|
-
/* @__PURE__ */
|
|
15249
|
-
/* @__PURE__ */
|
|
15291
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn20("space-y-6 text-center", className), "data-slot": "order-confirmation", children: [
|
|
15292
|
+
/* @__PURE__ */ jsx23("h1", { className: "text-3xl font-bold", children: title }),
|
|
15293
|
+
/* @__PURE__ */ jsx23("p", { className: "text-lg text-muted-foreground", children: description }),
|
|
15294
|
+
showFullOrderSummary && order && /* @__PURE__ */ jsxs21("div", { className: "space-y-6", children: [
|
|
15295
|
+
/* @__PURE__ */ jsxs21("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15296
|
+
/* @__PURE__ */ jsx23("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderNumberLabel }),
|
|
15297
|
+
/* @__PURE__ */ jsx23("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15250
15298
|
] }),
|
|
15251
|
-
/* @__PURE__ */
|
|
15252
|
-
order.items.map((item, idx) => /* @__PURE__ */
|
|
15299
|
+
/* @__PURE__ */ jsxs21("div", { className: "mx-auto max-w-sm space-y-3 rounded-xl border border-border bg-card p-5 text-left", children: [
|
|
15300
|
+
order.items.map((item, idx) => /* @__PURE__ */ jsxs21(
|
|
15253
15301
|
"div",
|
|
15254
15302
|
{
|
|
15255
15303
|
className: "flex justify-between gap-4 text-sm",
|
|
15256
15304
|
children: [
|
|
15257
|
-
/* @__PURE__ */
|
|
15305
|
+
/* @__PURE__ */ jsxs21("span", { className: "max-w-[60%] truncate text-muted-foreground", children: [
|
|
15258
15306
|
item.product.name,
|
|
15259
15307
|
item.variant ? ` (${item.variant.name})` : "",
|
|
15260
15308
|
" x",
|
|
15261
15309
|
item.quantity
|
|
15262
15310
|
] }),
|
|
15263
|
-
/* @__PURE__ */
|
|
15311
|
+
/* @__PURE__ */ jsx23("span", { children: formatPrice(item.total, currencyCode, locale) })
|
|
15264
15312
|
]
|
|
15265
15313
|
},
|
|
15266
15314
|
idx
|
|
15267
15315
|
)),
|
|
15268
|
-
/* @__PURE__ */
|
|
15269
|
-
/* @__PURE__ */
|
|
15270
|
-
/* @__PURE__ */
|
|
15316
|
+
/* @__PURE__ */ jsx23("div", { className: "space-y-1 border-t border-border pt-3 text-sm", children: /* @__PURE__ */ jsxs21("div", { className: "flex justify-between pt-1 text-base font-bold", children: [
|
|
15317
|
+
/* @__PURE__ */ jsx23("span", { children: t.totalLabel }),
|
|
15318
|
+
/* @__PURE__ */ jsx23("span", { children: formatPrice(order.total, currencyCode, locale) })
|
|
15271
15319
|
] }) })
|
|
15272
15320
|
] }),
|
|
15273
|
-
/* @__PURE__ */
|
|
15321
|
+
/* @__PURE__ */ jsxs21("p", { className: "mx-auto max-w-sm text-sm text-muted-foreground", children: [
|
|
15274
15322
|
t.confirmationEmailPrefix,
|
|
15275
15323
|
" ",
|
|
15276
|
-
/* @__PURE__ */
|
|
15324
|
+
/* @__PURE__ */ jsx23("span", { className: "font-medium text-foreground", children: order.customerEmail }),
|
|
15277
15325
|
"."
|
|
15278
15326
|
] }),
|
|
15279
|
-
/* @__PURE__ */
|
|
15327
|
+
/* @__PURE__ */ jsx23(
|
|
15280
15328
|
OrderInvoiceLink,
|
|
15281
15329
|
{
|
|
15282
15330
|
invoice: order.invoice,
|
|
@@ -15284,11 +15332,11 @@ function OrderConfirmation({
|
|
|
15284
15332
|
}
|
|
15285
15333
|
)
|
|
15286
15334
|
] }),
|
|
15287
|
-
showOrderReference && order && /* @__PURE__ */
|
|
15288
|
-
/* @__PURE__ */
|
|
15289
|
-
/* @__PURE__ */
|
|
15335
|
+
showOrderReference && order && /* @__PURE__ */ jsxs21("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15336
|
+
/* @__PURE__ */ jsx23("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.orderReferenceLabel }),
|
|
15337
|
+
/* @__PURE__ */ jsx23("p", { className: "font-mono text-lg font-semibold", children: order.orderNumber })
|
|
15290
15338
|
] }),
|
|
15291
|
-
status === "failed" && cartHref && /* @__PURE__ */
|
|
15339
|
+
status === "failed" && cartHref && /* @__PURE__ */ jsx23(
|
|
15292
15340
|
"a",
|
|
15293
15341
|
{
|
|
15294
15342
|
href: cartHref,
|
|
@@ -15296,25 +15344,25 @@ function OrderConfirmation({
|
|
|
15296
15344
|
children: t.backToCartLabel
|
|
15297
15345
|
}
|
|
15298
15346
|
),
|
|
15299
|
-
showRecheck && /* @__PURE__ */
|
|
15347
|
+
showRecheck && /* @__PURE__ */ jsx23(
|
|
15300
15348
|
"button",
|
|
15301
15349
|
{
|
|
15302
15350
|
type: "button",
|
|
15303
15351
|
onClick: onRecheck,
|
|
15304
|
-
className: "inline-flex items-center justify-center rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90",
|
|
15352
|
+
className: "inline-flex cursor-pointer items-center justify-center rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90",
|
|
15305
15353
|
children: t.recheckLabel
|
|
15306
15354
|
}
|
|
15307
15355
|
),
|
|
15308
|
-
showSessionReference && /* @__PURE__ */
|
|
15309
|
-
/* @__PURE__ */
|
|
15310
|
-
/* @__PURE__ */
|
|
15356
|
+
showSessionReference && /* @__PURE__ */ jsxs21("div", { className: "inline-block rounded-xl bg-muted px-6 py-4", children: [
|
|
15357
|
+
/* @__PURE__ */ jsx23("p", { className: "mb-1 text-xs uppercase tracking-widest text-muted-foreground", children: t.sessionReferenceLabel }),
|
|
15358
|
+
/* @__PURE__ */ jsx23("p", { className: "break-all font-mono text-sm font-semibold", children: sessionId })
|
|
15311
15359
|
] })
|
|
15312
15360
|
] });
|
|
15313
15361
|
}
|
|
15314
15362
|
|
|
15315
15363
|
// src/components/full-invoice-fields.tsx
|
|
15316
|
-
import { cn as
|
|
15317
|
-
import { jsx as
|
|
15364
|
+
import { cn as cn21 } from "@reblu/site-ui/utils";
|
|
15365
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15318
15366
|
var EMPTY_FULL_INVOICE_VALUE = {
|
|
15319
15367
|
wantsFullInvoice: false,
|
|
15320
15368
|
billingIdType: "NIF",
|
|
@@ -15431,12 +15479,12 @@ function FullInvoiceFields({
|
|
|
15431
15479
|
const showFields = value.wantsFullInvoice || overCap;
|
|
15432
15480
|
const isSpanishNif = value.billingIdType === "NIF";
|
|
15433
15481
|
const set = (key2, next2) => onChange({ ...value, [key2]: next2 });
|
|
15434
|
-
const error = (key2) => errors[key2] ? /* @__PURE__ */
|
|
15482
|
+
const error = (key2) => errors[key2] ? /* @__PURE__ */ jsx24("p", { id: `full-invoice-${key2}-error`, className: "text-sm text-destructive", children: errors[key2] }) : null;
|
|
15435
15483
|
const invalid2 = (key2) => errors[key2] ? { "aria-invalid": true, "aria-describedby": `full-invoice-${key2}-error` } : {};
|
|
15436
|
-
return /* @__PURE__ */
|
|
15437
|
-
overCap ? /* @__PURE__ */
|
|
15438
|
-
/* @__PURE__ */
|
|
15439
|
-
/* @__PURE__ */
|
|
15484
|
+
return /* @__PURE__ */ jsxs22("section", { className: cn21("space-y-4", className), "data-slot": "full-invoice-fields", children: [
|
|
15485
|
+
overCap ? /* @__PURE__ */ jsx24("p", { role: "note", className: "rounded-lg border border-border p-4 text-sm", children: t.overCapNotice }) : /* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15486
|
+
/* @__PURE__ */ jsxs22("label", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
15487
|
+
/* @__PURE__ */ jsx24(
|
|
15440
15488
|
"input",
|
|
15441
15489
|
{
|
|
15442
15490
|
type: "checkbox",
|
|
@@ -15446,12 +15494,12 @@ function FullInvoiceFields({
|
|
|
15446
15494
|
),
|
|
15447
15495
|
t.toggle
|
|
15448
15496
|
] }),
|
|
15449
|
-
/* @__PURE__ */
|
|
15497
|
+
/* @__PURE__ */ jsx24("p", { className: "text-sm text-muted-foreground", children: t.underCapNotice })
|
|
15450
15498
|
] }),
|
|
15451
|
-
showFields && /* @__PURE__ */
|
|
15452
|
-
/* @__PURE__ */
|
|
15453
|
-
/* @__PURE__ */
|
|
15454
|
-
/* @__PURE__ */
|
|
15499
|
+
showFields && /* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
15500
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15501
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-id-type", className: "text-sm font-medium", children: t.idType }),
|
|
15502
|
+
/* @__PURE__ */ jsx24(
|
|
15455
15503
|
"select",
|
|
15456
15504
|
{
|
|
15457
15505
|
id: "full-invoice-id-type",
|
|
@@ -15460,14 +15508,14 @@ function FullInvoiceFields({
|
|
|
15460
15508
|
value: value.billingIdType,
|
|
15461
15509
|
onChange: (e) => set("billingIdType", e.target.value),
|
|
15462
15510
|
...invalid2("billingIdType"),
|
|
15463
|
-
children: ID_TYPES.map((type) => /* @__PURE__ */
|
|
15511
|
+
children: ID_TYPES.map((type) => /* @__PURE__ */ jsx24("option", { value: type, children: t.idTypeOptions[type] }, type))
|
|
15464
15512
|
}
|
|
15465
15513
|
),
|
|
15466
15514
|
error("billingIdType")
|
|
15467
15515
|
] }),
|
|
15468
|
-
!isSpanishNif && /* @__PURE__ */
|
|
15469
|
-
/* @__PURE__ */
|
|
15470
|
-
/* @__PURE__ */
|
|
15516
|
+
!isSpanishNif && /* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15517
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-id-country", className: "text-sm font-medium", children: t.idCountry }),
|
|
15518
|
+
/* @__PURE__ */ jsxs22(
|
|
15471
15519
|
"select",
|
|
15472
15520
|
{
|
|
15473
15521
|
id: "full-invoice-id-country",
|
|
@@ -15477,16 +15525,16 @@ function FullInvoiceFields({
|
|
|
15477
15525
|
onChange: (e) => set("billingIdCountry", e.target.value),
|
|
15478
15526
|
...invalid2("billingIdCountry"),
|
|
15479
15527
|
children: [
|
|
15480
|
-
/* @__PURE__ */
|
|
15481
|
-
countries.map((c) => /* @__PURE__ */
|
|
15528
|
+
/* @__PURE__ */ jsx24("option", { value: "", disabled: true, children: t.chooseCountry }),
|
|
15529
|
+
countries.map((c) => /* @__PURE__ */ jsx24("option", { value: c.code, children: c.name }, c.code))
|
|
15482
15530
|
]
|
|
15483
15531
|
}
|
|
15484
15532
|
),
|
|
15485
15533
|
error("billingIdCountry")
|
|
15486
15534
|
] }),
|
|
15487
|
-
/* @__PURE__ */
|
|
15488
|
-
/* @__PURE__ */
|
|
15489
|
-
/* @__PURE__ */
|
|
15535
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15536
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-nif", className: "text-sm font-medium", children: isSpanishNif ? t.spanishNif : t.documentNumber }),
|
|
15537
|
+
/* @__PURE__ */ jsx24(
|
|
15490
15538
|
"input",
|
|
15491
15539
|
{
|
|
15492
15540
|
id: "full-invoice-nif",
|
|
@@ -15499,9 +15547,9 @@ function FullInvoiceFields({
|
|
|
15499
15547
|
),
|
|
15500
15548
|
error("billingNif")
|
|
15501
15549
|
] }),
|
|
15502
|
-
/* @__PURE__ */
|
|
15503
|
-
/* @__PURE__ */
|
|
15504
|
-
/* @__PURE__ */
|
|
15550
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15551
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-name", className: "text-sm font-medium", children: t.name }),
|
|
15552
|
+
/* @__PURE__ */ jsx24(
|
|
15505
15553
|
"input",
|
|
15506
15554
|
{
|
|
15507
15555
|
id: "full-invoice-name",
|
|
@@ -15514,9 +15562,9 @@ function FullInvoiceFields({
|
|
|
15514
15562
|
),
|
|
15515
15563
|
error("billingName")
|
|
15516
15564
|
] }),
|
|
15517
|
-
/* @__PURE__ */
|
|
15518
|
-
/* @__PURE__ */
|
|
15519
|
-
/* @__PURE__ */
|
|
15565
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1 sm:col-span-2", children: [
|
|
15566
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-street", className: "text-sm font-medium", children: t.street }),
|
|
15567
|
+
/* @__PURE__ */ jsx24(
|
|
15520
15568
|
"input",
|
|
15521
15569
|
{
|
|
15522
15570
|
id: "full-invoice-street",
|
|
@@ -15528,9 +15576,9 @@ function FullInvoiceFields({
|
|
|
15528
15576
|
}
|
|
15529
15577
|
)
|
|
15530
15578
|
] }),
|
|
15531
|
-
/* @__PURE__ */
|
|
15532
|
-
/* @__PURE__ */
|
|
15533
|
-
/* @__PURE__ */
|
|
15579
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15580
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-postal-code", className: "text-sm font-medium", children: t.postalCode }),
|
|
15581
|
+
/* @__PURE__ */ jsx24(
|
|
15534
15582
|
"input",
|
|
15535
15583
|
{
|
|
15536
15584
|
id: "full-invoice-postal-code",
|
|
@@ -15541,9 +15589,9 @@ function FullInvoiceFields({
|
|
|
15541
15589
|
}
|
|
15542
15590
|
)
|
|
15543
15591
|
] }),
|
|
15544
|
-
/* @__PURE__ */
|
|
15545
|
-
/* @__PURE__ */
|
|
15546
|
-
/* @__PURE__ */
|
|
15592
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15593
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-city", className: "text-sm font-medium", children: t.city }),
|
|
15594
|
+
/* @__PURE__ */ jsx24(
|
|
15547
15595
|
"input",
|
|
15548
15596
|
{
|
|
15549
15597
|
id: "full-invoice-city",
|
|
@@ -15554,9 +15602,9 @@ function FullInvoiceFields({
|
|
|
15554
15602
|
}
|
|
15555
15603
|
)
|
|
15556
15604
|
] }),
|
|
15557
|
-
/* @__PURE__ */
|
|
15558
|
-
/* @__PURE__ */
|
|
15559
|
-
/* @__PURE__ */
|
|
15605
|
+
/* @__PURE__ */ jsxs22("div", { className: "space-y-1", children: [
|
|
15606
|
+
/* @__PURE__ */ jsx24("label", { htmlFor: "full-invoice-country", className: "text-sm font-medium", children: t.country }),
|
|
15607
|
+
/* @__PURE__ */ jsx24(
|
|
15560
15608
|
"select",
|
|
15561
15609
|
{
|
|
15562
15610
|
id: "full-invoice-country",
|
|
@@ -15564,11 +15612,11 @@ function FullInvoiceFields({
|
|
|
15564
15612
|
required: true,
|
|
15565
15613
|
value: value.country,
|
|
15566
15614
|
onChange: (e) => set("country", e.target.value),
|
|
15567
|
-
children: countries.map((c) => /* @__PURE__ */
|
|
15615
|
+
children: countries.map((c) => /* @__PURE__ */ jsx24("option", { value: c.code, children: c.name }, c.code))
|
|
15568
15616
|
}
|
|
15569
15617
|
)
|
|
15570
15618
|
] }),
|
|
15571
|
-
/* @__PURE__ */
|
|
15619
|
+
/* @__PURE__ */ jsx24("div", { className: "sm:col-span-2", children: error("address") })
|
|
15572
15620
|
] })
|
|
15573
15621
|
] });
|
|
15574
15622
|
}
|
|
@@ -15603,6 +15651,7 @@ export {
|
|
|
15603
15651
|
ParentPage,
|
|
15604
15652
|
ProductCard,
|
|
15605
15653
|
ProductTrustItems,
|
|
15654
|
+
ProfessionalFields,
|
|
15606
15655
|
ProfileCard,
|
|
15607
15656
|
SafeHtml,
|
|
15608
15657
|
ShopFilters,
|