@planetaexo/design-system 0.4.5 → 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 +135 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +135 -133
- 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 ─────────── */
|
|
@@ -4592,147 +4592,149 @@ function RegistrationForm({
|
|
|
4592
4592
|
}
|
|
4593
4593
|
) })
|
|
4594
4594
|
),
|
|
4595
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4596
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
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: [
|
|
4600
|
-
adventure && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4601
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.adventureLabel }),
|
|
4602
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: adventure.name })
|
|
4603
|
-
] }),
|
|
4604
|
-
dateRange && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4605
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
4606
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: dateRange })
|
|
4607
|
-
] }),
|
|
4608
|
-
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4609
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.partnerLabel }),
|
|
4610
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: adventure.partnerName })
|
|
4611
|
-
] }),
|
|
4612
|
-
booking && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4613
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.bookingLabel }),
|
|
4614
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-mono tabular-nums", children: booking.id })
|
|
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 })
|
|
4615
4599
|
] }),
|
|
4616
|
-
|
|
4617
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
{
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4639
|
-
|
|
4640
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
type: "checkbox",
|
|
4644
|
-
checked: termsAccepted,
|
|
4645
|
-
required: true,
|
|
4646
|
-
onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
|
|
4647
|
-
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4648
|
-
}
|
|
4649
|
-
),
|
|
4650
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: L.termsAccept })
|
|
4651
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4652
|
-
"div",
|
|
4653
|
-
{
|
|
4654
|
-
role: "radiogroup",
|
|
4655
|
-
"aria-label": L.termsSectionTitle,
|
|
4656
|
-
className: "flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
4657
|
-
children: [
|
|
4658
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
|
|
4659
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4660
|
-
"input",
|
|
4661
|
-
{
|
|
4662
|
-
type: "radio",
|
|
4663
|
-
name: "registration-terms-accept",
|
|
4664
|
-
checked: termsAccepted,
|
|
4665
|
-
required: true,
|
|
4666
|
-
onChange: () => setField(TERMS_ACCEPT_KEY, true),
|
|
4667
|
-
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4668
|
-
}
|
|
4669
|
-
),
|
|
4670
|
-
L.termsAccept
|
|
4671
|
-
] }),
|
|
4672
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
|
|
4673
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4674
|
-
"input",
|
|
4675
|
-
{
|
|
4676
|
-
type: "radio",
|
|
4677
|
-
name: "registration-terms-accept",
|
|
4678
|
-
checked: current[TERMS_ACCEPT_KEY] === false,
|
|
4679
|
-
onChange: () => setField(TERMS_ACCEPT_KEY, false),
|
|
4680
|
-
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4681
|
-
}
|
|
4682
|
-
),
|
|
4683
|
-
L.termsDecline
|
|
4684
|
-
] })
|
|
4685
|
-
]
|
|
4686
|
-
}
|
|
4687
|
-
)
|
|
4688
|
-
] }),
|
|
4689
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
|
|
4690
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4691
|
-
"button",
|
|
4692
|
-
{
|
|
4693
|
-
type: "submit",
|
|
4694
|
-
disabled: loading,
|
|
4695
|
-
className: cn(
|
|
4696
|
-
"inline-flex items-center justify-center gap-2 rounded-full px-10 py-3.5",
|
|
4697
|
-
"bg-primary text-primary-foreground font-ui font-semibold text-sm",
|
|
4698
|
-
"transition-colors hover:bg-primary/90 focus-visible:outline-none",
|
|
4699
|
-
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4700
|
-
"disabled:pointer-events-none disabled:opacity-60"
|
|
4701
|
-
),
|
|
4702
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4703
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4704
|
-
"svg",
|
|
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,
|
|
4705
4627
|
{
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
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: [
|
|
4710
4660
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4711
|
-
"
|
|
4661
|
+
"input",
|
|
4712
4662
|
{
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
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"
|
|
4719
4669
|
}
|
|
4720
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: [
|
|
4721
4674
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4722
|
-
"
|
|
4675
|
+
"input",
|
|
4723
4676
|
{
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
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"
|
|
4727
4682
|
}
|
|
4728
|
-
)
|
|
4729
|
-
|
|
4730
|
-
|
|
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"
|
|
4731
4702
|
),
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
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
|
+
] })
|
|
4736
4738
|
]
|
|
4737
4739
|
}
|
|
4738
4740
|
);
|
|
@@ -4800,7 +4802,7 @@ function RegistrationSuccessCard({
|
|
|
4800
4802
|
var _a, _b;
|
|
4801
4803
|
return ((_a = a.order) != null ? _a : 0) - ((_b = b.order) != null ? _b : 0);
|
|
4802
4804
|
}).filter((f) => Object.prototype.hasOwnProperty.call(answers, f.id));
|
|
4803
|
-
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: [
|
|
4804
4806
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
4805
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 }) }),
|
|
4806
4808
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
|