@planetaexo/design-system 0.9.2 → 0.9.3
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 +30 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +30 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5572,12 +5572,14 @@ function RegistrationSuccessCard({
|
|
|
5572
5572
|
logo,
|
|
5573
5573
|
logoAlt = "PlanetaEXO",
|
|
5574
5574
|
terms,
|
|
5575
|
+
termsLayout = "summary",
|
|
5576
|
+
termsLabels,
|
|
5575
5577
|
adventure,
|
|
5576
5578
|
booking,
|
|
5577
5579
|
traveller,
|
|
5578
5580
|
tripInfoLabels
|
|
5579
5581
|
}) {
|
|
5580
|
-
var _a, _b, _c, _d, _e;
|
|
5582
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5581
5583
|
const isMinimal = variant === "minimal";
|
|
5582
5584
|
const sorted = isMinimal ? [] : [...fields].sort((a, b) => {
|
|
5583
5585
|
var _a2, _b2;
|
|
@@ -5609,40 +5611,43 @@ function RegistrationSuccessCard({
|
|
|
5609
5611
|
message && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-ui", children: message })
|
|
5610
5612
|
] }),
|
|
5611
5613
|
hasTripInfo && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: TL.sectionTitle, children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: [
|
|
5612
|
-
adventure && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start
|
|
5613
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: TL.adventureLabel }),
|
|
5614
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
|
|
5614
|
+
adventure && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5615
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.adventureLabel }),
|
|
5616
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
|
|
5615
5617
|
] }),
|
|
5616
|
-
dateRange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start
|
|
5617
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
5618
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground text-right min-w-0", children: dateRange })
|
|
5618
|
+
dateRange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5619
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
5620
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: dateRange })
|
|
5619
5621
|
] }),
|
|
5620
|
-
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start
|
|
5621
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: TL.partnerLabel }),
|
|
5622
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground text-right min-w-0", children: adventure.partnerName })
|
|
5622
|
+
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5623
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.partnerLabel }),
|
|
5624
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: adventure.partnerName })
|
|
5623
5625
|
] }),
|
|
5624
|
-
booking && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start
|
|
5625
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: TL.bookingLabel }),
|
|
5626
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-mono tabular-nums text-right min-w-0", children: booking.id })
|
|
5626
|
+
booking && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5627
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.bookingLabel }),
|
|
5628
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground font-mono tabular-nums text-right min-w-0 break-words", children: booking.id })
|
|
5627
5629
|
] }),
|
|
5628
|
-
traveller && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start
|
|
5629
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: TL.travellerLabel }),
|
|
5630
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium text-right min-w-0 break-words", children: traveller.fullName })
|
|
5630
|
+
traveller && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5631
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.travellerLabel }),
|
|
5632
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: traveller.fullName })
|
|
5631
5633
|
] })
|
|
5632
5634
|
] }) }),
|
|
5633
|
-
sorted.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start
|
|
5634
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
|
|
5635
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground text-right min-w-0 break-words", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter)))(
|
|
5635
|
+
sorted.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5636
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: f.label }),
|
|
5637
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter)))(
|
|
5636
5638
|
f,
|
|
5637
5639
|
answers[f.id]
|
|
5638
5640
|
) })
|
|
5639
5641
|
] }, f.id)) }) }),
|
|
5640
|
-
!isMinimal && terms && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: "Terms & Conditions", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex
|
|
5641
|
-
/* @__PURE__ */ jsxRuntime.
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5642
|
+
!isMinimal && terms && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: (_f = termsLabels == null ? void 0 : termsLabels.title) != null ? _f : "Terms & Conditions", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 text-sm font-ui", children: [
|
|
5643
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5644
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
5645
|
+
"inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs font-bold",
|
|
5646
|
+
terms.accepted ? "bg-primary" : "bg-destructive"
|
|
5647
|
+
), children: terms.accepted ? "\u2713" : "\u2717" }),
|
|
5648
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: terms.accepted ? "text-primary font-medium" : "text-destructive font-medium", children: terms.accepted ? (_g = termsLabels == null ? void 0 : termsLabels.accepted) != null ? _g : "Accepted" : (_h = termsLabels == null ? void 0 : termsLabels.notAccepted) != null ? _h : "Not accepted" })
|
|
5649
|
+
] }),
|
|
5650
|
+
termsLayout === "full" && terms.markdown.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-wrap break-words text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) })
|
|
5646
5651
|
] }) })
|
|
5647
5652
|
] });
|
|
5648
5653
|
}
|