@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.d.cts
CHANGED
|
@@ -749,6 +749,19 @@ interface RegistrationSuccessCardProps {
|
|
|
749
749
|
markdown: string;
|
|
750
750
|
accepted: boolean;
|
|
751
751
|
} | null;
|
|
752
|
+
/**
|
|
753
|
+
* Layout of the "Terms & Conditions" section.
|
|
754
|
+
* - `"summary"` (default): shows only the accepted/not-accepted indicator.
|
|
755
|
+
* - `"full"`: shows the indicator **and** the full `terms.markdown` content
|
|
756
|
+
* (plain text, preserving line breaks). Used by the PDF export.
|
|
757
|
+
*/
|
|
758
|
+
termsLayout?: "summary" | "full";
|
|
759
|
+
/** i18n-friendly labels for the Terms section. Defaults to English. */
|
|
760
|
+
termsLabels?: {
|
|
761
|
+
title?: string;
|
|
762
|
+
accepted?: string;
|
|
763
|
+
notAccepted?: string;
|
|
764
|
+
};
|
|
752
765
|
adventure?: RegistrationAdventure | null;
|
|
753
766
|
booking?: RegistrationBooking | null;
|
|
754
767
|
traveller?: RegistrationTraveller | null;
|
|
@@ -760,7 +773,7 @@ interface RegistrationSuccessCardProps {
|
|
|
760
773
|
travellerLabel?: string;
|
|
761
774
|
};
|
|
762
775
|
}
|
|
763
|
-
declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, terms, adventure, booking, traveller, tripInfoLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
|
|
776
|
+
declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
|
|
764
777
|
|
|
765
778
|
interface FloatingInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
766
779
|
label: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -749,6 +749,19 @@ interface RegistrationSuccessCardProps {
|
|
|
749
749
|
markdown: string;
|
|
750
750
|
accepted: boolean;
|
|
751
751
|
} | null;
|
|
752
|
+
/**
|
|
753
|
+
* Layout of the "Terms & Conditions" section.
|
|
754
|
+
* - `"summary"` (default): shows only the accepted/not-accepted indicator.
|
|
755
|
+
* - `"full"`: shows the indicator **and** the full `terms.markdown` content
|
|
756
|
+
* (plain text, preserving line breaks). Used by the PDF export.
|
|
757
|
+
*/
|
|
758
|
+
termsLayout?: "summary" | "full";
|
|
759
|
+
/** i18n-friendly labels for the Terms section. Defaults to English. */
|
|
760
|
+
termsLabels?: {
|
|
761
|
+
title?: string;
|
|
762
|
+
accepted?: string;
|
|
763
|
+
notAccepted?: string;
|
|
764
|
+
};
|
|
752
765
|
adventure?: RegistrationAdventure | null;
|
|
753
766
|
booking?: RegistrationBooking | null;
|
|
754
767
|
traveller?: RegistrationTraveller | null;
|
|
@@ -760,7 +773,7 @@ interface RegistrationSuccessCardProps {
|
|
|
760
773
|
travellerLabel?: string;
|
|
761
774
|
};
|
|
762
775
|
}
|
|
763
|
-
declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, terms, adventure, booking, traveller, tripInfoLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
|
|
776
|
+
declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
|
|
764
777
|
|
|
765
778
|
interface FloatingInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
766
779
|
label: string;
|
package/dist/index.js
CHANGED
|
@@ -5551,12 +5551,14 @@ function RegistrationSuccessCard({
|
|
|
5551
5551
|
logo,
|
|
5552
5552
|
logoAlt = "PlanetaEXO",
|
|
5553
5553
|
terms,
|
|
5554
|
+
termsLayout = "summary",
|
|
5555
|
+
termsLabels,
|
|
5554
5556
|
adventure,
|
|
5555
5557
|
booking,
|
|
5556
5558
|
traveller,
|
|
5557
5559
|
tripInfoLabels
|
|
5558
5560
|
}) {
|
|
5559
|
-
var _a, _b, _c, _d, _e;
|
|
5561
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5560
5562
|
const isMinimal = variant === "minimal";
|
|
5561
5563
|
const sorted = isMinimal ? [] : [...fields].sort((a, b) => {
|
|
5562
5564
|
var _a2, _b2;
|
|
@@ -5588,40 +5590,43 @@ function RegistrationSuccessCard({
|
|
|
5588
5590
|
message && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-ui", children: message })
|
|
5589
5591
|
] }),
|
|
5590
5592
|
hasTripInfo && /* @__PURE__ */ jsx(FormSection2, { title: TL.sectionTitle, children: /* @__PURE__ */ jsxs("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: [
|
|
5591
|
-
adventure && /* @__PURE__ */ jsxs("div", { className: "flex items-start
|
|
5592
|
-
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: TL.adventureLabel }),
|
|
5593
|
-
/* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
|
|
5593
|
+
adventure && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5594
|
+
/* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.adventureLabel }),
|
|
5595
|
+
/* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
|
|
5594
5596
|
] }),
|
|
5595
|
-
dateRange && /* @__PURE__ */ jsxs("div", { className: "flex items-start
|
|
5596
|
-
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
5597
|
-
/* @__PURE__ */ jsx("dd", { className: "text-foreground text-right min-w-0", children: dateRange })
|
|
5597
|
+
dateRange && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5598
|
+
/* @__PURE__ */ 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" }),
|
|
5599
|
+
/* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: dateRange })
|
|
5598
5600
|
] }),
|
|
5599
|
-
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxs("div", { className: "flex items-start
|
|
5600
|
-
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: TL.partnerLabel }),
|
|
5601
|
-
/* @__PURE__ */ jsx("dd", { className: "text-foreground text-right min-w-0", children: adventure.partnerName })
|
|
5601
|
+
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5602
|
+
/* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.partnerLabel }),
|
|
5603
|
+
/* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: adventure.partnerName })
|
|
5602
5604
|
] }),
|
|
5603
|
-
booking && /* @__PURE__ */ jsxs("div", { className: "flex items-start
|
|
5604
|
-
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: TL.bookingLabel }),
|
|
5605
|
-
/* @__PURE__ */ jsx("dd", { className: "text-foreground font-mono tabular-nums text-right min-w-0", children: booking.id })
|
|
5605
|
+
booking && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5606
|
+
/* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.bookingLabel }),
|
|
5607
|
+
/* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground font-mono tabular-nums text-right min-w-0 break-words", children: booking.id })
|
|
5606
5608
|
] }),
|
|
5607
|
-
traveller && /* @__PURE__ */ jsxs("div", { className: "flex items-start
|
|
5608
|
-
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: TL.travellerLabel }),
|
|
5609
|
-
/* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium text-right min-w-0 break-words", children: traveller.fullName })
|
|
5609
|
+
traveller && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5610
|
+
/* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.travellerLabel }),
|
|
5611
|
+
/* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: traveller.fullName })
|
|
5610
5612
|
] })
|
|
5611
5613
|
] }) }),
|
|
5612
|
-
sorted.length > 0 && /* @__PURE__ */ jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxs("div", { className: "flex items-start
|
|
5613
|
-
/* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: f.label }),
|
|
5614
|
-
/* @__PURE__ */ jsx("dd", { className: "text-foreground text-right min-w-0 break-words", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter)))(
|
|
5614
|
+
sorted.length > 0 && /* @__PURE__ */ jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5615
|
+
/* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: f.label }),
|
|
5616
|
+
/* @__PURE__ */ 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)))(
|
|
5615
5617
|
f,
|
|
5616
5618
|
answers[f.id]
|
|
5617
5619
|
) })
|
|
5618
5620
|
] }, f.id)) }) }),
|
|
5619
|
-
!isMinimal && terms && /* @__PURE__ */ jsx(FormSection2, { title: "Terms & Conditions", children: /* @__PURE__ */ jsxs("div", { className: "flex
|
|
5620
|
-
/* @__PURE__ */
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5621
|
+
!isMinimal && terms && /* @__PURE__ */ jsx(FormSection2, { title: (_f = termsLabels == null ? void 0 : termsLabels.title) != null ? _f : "Terms & Conditions", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 text-sm font-ui", children: [
|
|
5622
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5623
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
5624
|
+
"inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs font-bold",
|
|
5625
|
+
terms.accepted ? "bg-primary" : "bg-destructive"
|
|
5626
|
+
), children: terms.accepted ? "\u2713" : "\u2717" }),
|
|
5627
|
+
/* @__PURE__ */ 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" })
|
|
5628
|
+
] }),
|
|
5629
|
+
termsLayout === "full" && terms.markdown.trim().length > 0 && /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) })
|
|
5625
5630
|
] }) })
|
|
5626
5631
|
] });
|
|
5627
5632
|
}
|