@planetaexo/design-system 0.4.4 → 0.4.6
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/dist/index.cjs +146 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +146 -141
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4551,7 +4551,7 @@ function RegistrationForm({
|
|
|
4551
4551
|
{
|
|
4552
4552
|
onSubmit: handleSubmit,
|
|
4553
4553
|
noValidate: true,
|
|
4554
|
-
className: cn("
|
|
4554
|
+
className: cn("rounded-xl border border-border bg-card overflow-hidden", className),
|
|
4555
4555
|
children: [
|
|
4556
4556
|
heroImage ? (
|
|
4557
4557
|
/* ── Hero image (full-width) with centered white logo ─────────── */
|
|
@@ -4580,156 +4580,161 @@ function RegistrationForm({
|
|
|
4580
4580
|
}
|
|
4581
4581
|
) })
|
|
4582
4582
|
] })
|
|
4583
|
-
) :
|
|
4584
|
-
|
|
4585
|
-
"
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
alt: logoAlt,
|
|
4589
|
-
className: "mx-auto block h-auto w-[150px] object-contain"
|
|
4590
|
-
}
|
|
4591
|
-
),
|
|
4592
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4593
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
|
|
4594
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle != null ? subtitle : L.formSubtitle })
|
|
4595
|
-
] }),
|
|
4596
|
-
hasTripInfo && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: L.tripInfoSectionTitle, children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm font-ui sm:grid-cols-[max-content_1fr]", children: [
|
|
4597
|
-
adventure && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4598
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.adventureLabel }),
|
|
4599
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: adventure.name })
|
|
4600
|
-
] }),
|
|
4601
|
-
dateRange && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4602
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
4603
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: dateRange })
|
|
4604
|
-
] }),
|
|
4605
|
-
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4606
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.partnerLabel }),
|
|
4607
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: adventure.partnerName })
|
|
4608
|
-
] }),
|
|
4609
|
-
booking && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4610
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.bookingLabel }),
|
|
4611
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-mono tabular-nums", children: booking.id })
|
|
4612
|
-
] }),
|
|
4613
|
-
traveller && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4614
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.travellerLabel }),
|
|
4615
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: traveller.fullName })
|
|
4616
|
-
] })
|
|
4617
|
-
] }) }),
|
|
4618
|
-
/* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: L.detailsSectionTitle, children: sortedFields.map((field) => {
|
|
4619
|
-
var _a2;
|
|
4620
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4621
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4622
|
-
FieldRenderer,
|
|
4623
|
-
{
|
|
4624
|
-
field,
|
|
4625
|
-
value: current[field.id],
|
|
4626
|
-
onChange: (v) => setField(field.id, v),
|
|
4627
|
-
defaultPhoneCountry,
|
|
4628
|
-
labels: L
|
|
4629
|
-
}
|
|
4630
|
-
),
|
|
4631
|
-
((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
|
|
4632
|
-
] }, field.id);
|
|
4633
|
-
}) }),
|
|
4634
|
-
termsEnabled && terms && /* @__PURE__ */ jsxRuntime.jsxs(FormSection2, { title: L.termsSectionTitle, children: [
|
|
4635
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-72 overflow-y-auto rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
|
|
4636
|
-
acceptControl === "checkbox" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex cursor-pointer items-start gap-2.5 font-ui text-sm text-foreground", children: [
|
|
4637
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4638
|
-
"input",
|
|
4639
|
-
{
|
|
4640
|
-
type: "checkbox",
|
|
4641
|
-
checked: termsAccepted,
|
|
4642
|
-
required: true,
|
|
4643
|
-
onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
|
|
4644
|
-
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4645
|
-
}
|
|
4646
|
-
),
|
|
4647
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: L.termsAccept })
|
|
4648
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4649
|
-
"div",
|
|
4583
|
+
) : (
|
|
4584
|
+
/* Fallback: banner bg-primary com logo centralizado */
|
|
4585
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex h-[190px] w-full items-center justify-center bg-primary sm:h-[220px]", children: logo && /* eslint-disable-next-line @next/next/no-img-element */
|
|
4586
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4587
|
+
"img",
|
|
4650
4588
|
{
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
className: "
|
|
4654
|
-
children: [
|
|
4655
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
|
|
4656
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4657
|
-
"input",
|
|
4658
|
-
{
|
|
4659
|
-
type: "radio",
|
|
4660
|
-
name: "registration-terms-accept",
|
|
4661
|
-
checked: termsAccepted,
|
|
4662
|
-
required: true,
|
|
4663
|
-
onChange: () => setField(TERMS_ACCEPT_KEY, true),
|
|
4664
|
-
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4665
|
-
}
|
|
4666
|
-
),
|
|
4667
|
-
L.termsAccept
|
|
4668
|
-
] }),
|
|
4669
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
|
|
4670
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4671
|
-
"input",
|
|
4672
|
-
{
|
|
4673
|
-
type: "radio",
|
|
4674
|
-
name: "registration-terms-accept",
|
|
4675
|
-
checked: current[TERMS_ACCEPT_KEY] === false,
|
|
4676
|
-
onChange: () => setField(TERMS_ACCEPT_KEY, false),
|
|
4677
|
-
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4678
|
-
}
|
|
4679
|
-
),
|
|
4680
|
-
L.termsDecline
|
|
4681
|
-
] })
|
|
4682
|
-
]
|
|
4589
|
+
src: logo,
|
|
4590
|
+
alt: logoAlt,
|
|
4591
|
+
className: "block h-auto w-[120px] object-contain brightness-0 invert"
|
|
4683
4592
|
}
|
|
4684
|
-
)
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
"
|
|
4694
|
-
"
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
"
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4593
|
+
) })
|
|
4594
|
+
),
|
|
4595
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 sm:px-8 pt-8 pb-8 flex flex-col gap-10", children: [
|
|
4596
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4597
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
|
|
4598
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle != null ? subtitle : L.formSubtitle })
|
|
4599
|
+
] }),
|
|
4600
|
+
hasTripInfo && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: L.tripInfoSectionTitle, children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm font-ui sm:grid-cols-[max-content_1fr]", children: [
|
|
4601
|
+
adventure && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4602
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.adventureLabel }),
|
|
4603
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: adventure.name })
|
|
4604
|
+
] }),
|
|
4605
|
+
dateRange && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4606
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
4607
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: dateRange })
|
|
4608
|
+
] }),
|
|
4609
|
+
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4610
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.partnerLabel }),
|
|
4611
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: adventure.partnerName })
|
|
4612
|
+
] }),
|
|
4613
|
+
booking && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4614
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.bookingLabel }),
|
|
4615
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-mono tabular-nums", children: booking.id })
|
|
4616
|
+
] }),
|
|
4617
|
+
traveller && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4618
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.travellerLabel }),
|
|
4619
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: traveller.fullName })
|
|
4620
|
+
] })
|
|
4621
|
+
] }) }),
|
|
4622
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: L.detailsSectionTitle, children: sortedFields.map((field) => {
|
|
4623
|
+
var _a2;
|
|
4624
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4625
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4626
|
+
FieldRenderer,
|
|
4702
4627
|
{
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4628
|
+
field,
|
|
4629
|
+
value: current[field.id],
|
|
4630
|
+
onChange: (v) => setField(field.id, v),
|
|
4631
|
+
defaultPhoneCountry,
|
|
4632
|
+
labels: L
|
|
4633
|
+
}
|
|
4634
|
+
),
|
|
4635
|
+
((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
|
|
4636
|
+
] }, field.id);
|
|
4637
|
+
}) }),
|
|
4638
|
+
termsEnabled && terms && /* @__PURE__ */ jsxRuntime.jsxs(FormSection2, { title: L.termsSectionTitle, children: [
|
|
4639
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-72 overflow-y-auto rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
|
|
4640
|
+
acceptControl === "checkbox" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex cursor-pointer items-start gap-2.5 font-ui text-sm text-foreground", children: [
|
|
4641
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4642
|
+
"input",
|
|
4643
|
+
{
|
|
4644
|
+
type: "checkbox",
|
|
4645
|
+
checked: termsAccepted,
|
|
4646
|
+
required: true,
|
|
4647
|
+
onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
|
|
4648
|
+
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4649
|
+
}
|
|
4650
|
+
),
|
|
4651
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: L.termsAccept })
|
|
4652
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4653
|
+
"div",
|
|
4654
|
+
{
|
|
4655
|
+
role: "radiogroup",
|
|
4656
|
+
"aria-label": L.termsSectionTitle,
|
|
4657
|
+
className: "flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
4658
|
+
children: [
|
|
4659
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
|
|
4707
4660
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4708
|
-
"
|
|
4661
|
+
"input",
|
|
4709
4662
|
{
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4663
|
+
type: "radio",
|
|
4664
|
+
name: "registration-terms-accept",
|
|
4665
|
+
checked: termsAccepted,
|
|
4666
|
+
required: true,
|
|
4667
|
+
onChange: () => setField(TERMS_ACCEPT_KEY, true),
|
|
4668
|
+
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4716
4669
|
}
|
|
4717
4670
|
),
|
|
4671
|
+
L.termsAccept
|
|
4672
|
+
] }),
|
|
4673
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
|
|
4718
4674
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4719
|
-
"
|
|
4675
|
+
"input",
|
|
4720
4676
|
{
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4677
|
+
type: "radio",
|
|
4678
|
+
name: "registration-terms-accept",
|
|
4679
|
+
checked: current[TERMS_ACCEPT_KEY] === false,
|
|
4680
|
+
onChange: () => setField(TERMS_ACCEPT_KEY, false),
|
|
4681
|
+
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4724
4682
|
}
|
|
4725
|
-
)
|
|
4726
|
-
|
|
4727
|
-
|
|
4683
|
+
),
|
|
4684
|
+
L.termsDecline
|
|
4685
|
+
] })
|
|
4686
|
+
]
|
|
4687
|
+
}
|
|
4688
|
+
)
|
|
4689
|
+
] }),
|
|
4690
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
|
|
4691
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4692
|
+
"button",
|
|
4693
|
+
{
|
|
4694
|
+
type: "submit",
|
|
4695
|
+
disabled: loading,
|
|
4696
|
+
className: cn(
|
|
4697
|
+
"inline-flex items-center justify-center gap-2 rounded-full px-10 py-3.5",
|
|
4698
|
+
"bg-primary text-primary-foreground font-ui font-semibold text-sm",
|
|
4699
|
+
"transition-colors hover:bg-primary/90 focus-visible:outline-none",
|
|
4700
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4701
|
+
"disabled:pointer-events-none disabled:opacity-60"
|
|
4728
4702
|
),
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4703
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4704
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4705
|
+
"svg",
|
|
4706
|
+
{
|
|
4707
|
+
className: "h-4 w-4 animate-spin",
|
|
4708
|
+
viewBox: "0 0 24 24",
|
|
4709
|
+
fill: "none",
|
|
4710
|
+
children: [
|
|
4711
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4712
|
+
"circle",
|
|
4713
|
+
{
|
|
4714
|
+
className: "opacity-25",
|
|
4715
|
+
cx: "12",
|
|
4716
|
+
cy: "12",
|
|
4717
|
+
r: "10",
|
|
4718
|
+
stroke: "currentColor",
|
|
4719
|
+
strokeWidth: "4"
|
|
4720
|
+
}
|
|
4721
|
+
),
|
|
4722
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4723
|
+
"path",
|
|
4724
|
+
{
|
|
4725
|
+
className: "opacity-75",
|
|
4726
|
+
fill: "currentColor",
|
|
4727
|
+
d: "M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 00-8 8h4z"
|
|
4728
|
+
}
|
|
4729
|
+
)
|
|
4730
|
+
]
|
|
4731
|
+
}
|
|
4732
|
+
),
|
|
4733
|
+
L.submitting
|
|
4734
|
+
] }) : L.submitButton
|
|
4735
|
+
}
|
|
4736
|
+
) })
|
|
4737
|
+
] })
|
|
4733
4738
|
]
|
|
4734
4739
|
}
|
|
4735
4740
|
);
|
|
@@ -4797,7 +4802,7 @@ function RegistrationSuccessCard({
|
|
|
4797
4802
|
var _a, _b;
|
|
4798
4803
|
return ((_a = a.order) != null ? _a : 0) - ((_b = b.order) != null ? _b : 0);
|
|
4799
4804
|
}).filter((f) => Object.prototype.hasOwnProperty.call(answers, f.id));
|
|
4800
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-10", className), children: [
|
|
4805
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-xl border border-border bg-card p-6 sm:p-8 flex flex-col gap-10", className), children: [
|
|
4801
4806
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
4802
4807
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckIcon, { size: 28 }) }),
|
|
4803
4808
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
|