@planetaexo/design-system 0.9.1 → 0.9.2

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 CHANGED
@@ -5559,11 +5559,12 @@ function isoOrDateToString(v) {
5559
5559
  return d.toISOString().slice(0, 10);
5560
5560
  }
5561
5561
  function RegistrationSuccessCard({
5562
+ variant = "full",
5562
5563
  title = "Thanks \u2014 your answers have been received.",
5563
5564
  message = "We'll get in touch if anything else is needed.",
5564
5565
  answersTitle = "Your submitted answers",
5565
- fields,
5566
- answers,
5566
+ fields = [],
5567
+ answers = {},
5567
5568
  dateFormatter = isoOrDateToString,
5568
5569
  formatAnswer,
5569
5570
  className,
@@ -5577,11 +5578,12 @@ function RegistrationSuccessCard({
5577
5578
  tripInfoLabels
5578
5579
  }) {
5579
5580
  var _a, _b, _c, _d, _e;
5580
- const sorted = [...fields].sort((a, b) => {
5581
+ const isMinimal = variant === "minimal";
5582
+ const sorted = isMinimal ? [] : [...fields].sort((a, b) => {
5581
5583
  var _a2, _b2;
5582
5584
  return ((_a2 = a.order) != null ? _a2 : 0) - ((_b2 = b.order) != null ? _b2 : 0);
5583
5585
  }).filter((f) => Object.prototype.hasOwnProperty.call(answers, f.id));
5584
- const hasTripInfo = !!(adventure || booking || traveller);
5586
+ const hasTripInfo = !isMinimal && !!(adventure || booking || traveller);
5585
5587
  const dateRange = adventure ? formatDateRange(adventure, dateFormatter) : null;
5586
5588
  const TL = {
5587
5589
  sectionTitle: (_a = tripInfoLabels == null ? void 0 : tripInfoLabels.sectionTitle) != null ? _a : "Trip info",
@@ -5635,7 +5637,7 @@ function RegistrationSuccessCard({
5635
5637
  answers[f.id]
5636
5638
  ) })
5637
5639
  ] }, f.id)) }) }),
5638
- terms && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: "Terms & Conditions", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm font-ui", children: [
5640
+ !isMinimal && terms && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: "Terms & Conditions", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm font-ui", children: [
5639
5641
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
5640
5642
  "inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs font-bold",
5641
5643
  terms.accepted ? "bg-primary" : "bg-destructive"