@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.js CHANGED
@@ -4530,7 +4530,7 @@ function RegistrationForm({
4530
4530
  {
4531
4531
  onSubmit: handleSubmit,
4532
4532
  noValidate: true,
4533
- className: cn("flex flex-col gap-10", className),
4533
+ className: cn("rounded-xl border border-border bg-card overflow-hidden", className),
4534
4534
  children: [
4535
4535
  heroImage ? (
4536
4536
  /* ── Hero image (full-width) with centered white logo ─────────── */
@@ -4571,147 +4571,149 @@ function RegistrationForm({
4571
4571
  }
4572
4572
  ) })
4573
4573
  ),
4574
- /* @__PURE__ */ jsxs("div", { children: [
4575
- /* @__PURE__ */ jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
4576
- /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle != null ? subtitle : L.formSubtitle })
4577
- ] }),
4578
- hasTripInfo && /* @__PURE__ */ jsx(FormSection2, { title: L.tripInfoSectionTitle, children: /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm font-ui sm:grid-cols-[max-content_1fr]", children: [
4579
- adventure && /* @__PURE__ */ jsxs(Fragment, { children: [
4580
- /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.adventureLabel }),
4581
- /* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium", children: adventure.name })
4582
- ] }),
4583
- dateRange && /* @__PURE__ */ jsxs(Fragment, { children: [
4584
- /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
4585
- /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: dateRange })
4586
- ] }),
4587
- (adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxs(Fragment, { children: [
4588
- /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.partnerLabel }),
4589
- /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: adventure.partnerName })
4590
- ] }),
4591
- booking && /* @__PURE__ */ jsxs(Fragment, { children: [
4592
- /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.bookingLabel }),
4593
- /* @__PURE__ */ jsx("dd", { className: "text-foreground font-mono tabular-nums", children: booking.id })
4574
+ /* @__PURE__ */ jsxs("div", { className: "px-6 sm:px-8 pt-8 pb-8 flex flex-col gap-10", children: [
4575
+ /* @__PURE__ */ jsxs("div", { children: [
4576
+ /* @__PURE__ */ jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
4577
+ /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle != null ? subtitle : L.formSubtitle })
4594
4578
  ] }),
4595
- traveller && /* @__PURE__ */ jsxs(Fragment, { children: [
4596
- /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.travellerLabel }),
4597
- /* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium", children: traveller.fullName })
4598
- ] })
4599
- ] }) }),
4600
- /* @__PURE__ */ jsx(FormSection2, { title: L.detailsSectionTitle, children: sortedFields.map((field) => {
4601
- var _a2;
4602
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
4603
- /* @__PURE__ */ jsx(
4604
- FieldRenderer,
4605
- {
4606
- field,
4607
- value: current[field.id],
4608
- onChange: (v) => setField(field.id, v),
4609
- defaultPhoneCountry,
4610
- labels: L
4611
- }
4612
- ),
4613
- ((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
4614
- ] }, field.id);
4615
- }) }),
4616
- termsEnabled && terms && /* @__PURE__ */ jsxs(FormSection2, { title: L.termsSectionTitle, children: [
4617
- /* @__PURE__ */ jsx("div", { className: "max-h-72 overflow-y-auto rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
4618
- acceptControl === "checkbox" ? /* @__PURE__ */ jsxs("label", { className: "flex cursor-pointer items-start gap-2.5 font-ui text-sm text-foreground", children: [
4619
- /* @__PURE__ */ jsx(
4620
- "input",
4621
- {
4622
- type: "checkbox",
4623
- checked: termsAccepted,
4624
- required: true,
4625
- onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
4626
- className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
4627
- }
4628
- ),
4629
- /* @__PURE__ */ jsx("span", { children: L.termsAccept })
4630
- ] }) : /* @__PURE__ */ jsxs(
4631
- "div",
4632
- {
4633
- role: "radiogroup",
4634
- "aria-label": L.termsSectionTitle,
4635
- className: "flex flex-wrap items-center gap-x-6 gap-y-3",
4636
- children: [
4637
- /* @__PURE__ */ jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
4638
- /* @__PURE__ */ jsx(
4639
- "input",
4640
- {
4641
- type: "radio",
4642
- name: "registration-terms-accept",
4643
- checked: termsAccepted,
4644
- required: true,
4645
- onChange: () => setField(TERMS_ACCEPT_KEY, true),
4646
- className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4647
- }
4648
- ),
4649
- L.termsAccept
4650
- ] }),
4651
- /* @__PURE__ */ jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
4652
- /* @__PURE__ */ jsx(
4653
- "input",
4654
- {
4655
- type: "radio",
4656
- name: "registration-terms-accept",
4657
- checked: current[TERMS_ACCEPT_KEY] === false,
4658
- onChange: () => setField(TERMS_ACCEPT_KEY, false),
4659
- className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4660
- }
4661
- ),
4662
- L.termsDecline
4663
- ] })
4664
- ]
4665
- }
4666
- )
4667
- ] }),
4668
- error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
4669
- /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsx(
4670
- "button",
4671
- {
4672
- type: "submit",
4673
- disabled: loading,
4674
- className: cn(
4675
- "inline-flex items-center justify-center gap-2 rounded-full px-10 py-3.5",
4676
- "bg-primary text-primary-foreground font-ui font-semibold text-sm",
4677
- "transition-colors hover:bg-primary/90 focus-visible:outline-none",
4678
- "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4679
- "disabled:pointer-events-none disabled:opacity-60"
4680
- ),
4681
- children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
4682
- /* @__PURE__ */ jsxs(
4683
- "svg",
4579
+ hasTripInfo && /* @__PURE__ */ jsx(FormSection2, { title: L.tripInfoSectionTitle, children: /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm font-ui sm:grid-cols-[max-content_1fr]", children: [
4580
+ adventure && /* @__PURE__ */ jsxs(Fragment, { children: [
4581
+ /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.adventureLabel }),
4582
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium", children: adventure.name })
4583
+ ] }),
4584
+ dateRange && /* @__PURE__ */ jsxs(Fragment, { children: [
4585
+ /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
4586
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: dateRange })
4587
+ ] }),
4588
+ (adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxs(Fragment, { children: [
4589
+ /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.partnerLabel }),
4590
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground", children: adventure.partnerName })
4591
+ ] }),
4592
+ booking && /* @__PURE__ */ jsxs(Fragment, { children: [
4593
+ /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.bookingLabel }),
4594
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground font-mono tabular-nums", children: booking.id })
4595
+ ] }),
4596
+ traveller && /* @__PURE__ */ jsxs(Fragment, { children: [
4597
+ /* @__PURE__ */ jsx("dt", { className: "text-muted-foreground", children: L.travellerLabel }),
4598
+ /* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium", children: traveller.fullName })
4599
+ ] })
4600
+ ] }) }),
4601
+ /* @__PURE__ */ jsx(FormSection2, { title: L.detailsSectionTitle, children: sortedFields.map((field) => {
4602
+ var _a2;
4603
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
4604
+ /* @__PURE__ */ jsx(
4605
+ FieldRenderer,
4684
4606
  {
4685
- className: "h-4 w-4 animate-spin",
4686
- viewBox: "0 0 24 24",
4687
- fill: "none",
4688
- children: [
4607
+ field,
4608
+ value: current[field.id],
4609
+ onChange: (v) => setField(field.id, v),
4610
+ defaultPhoneCountry,
4611
+ labels: L
4612
+ }
4613
+ ),
4614
+ ((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
4615
+ ] }, field.id);
4616
+ }) }),
4617
+ termsEnabled && terms && /* @__PURE__ */ jsxs(FormSection2, { title: L.termsSectionTitle, children: [
4618
+ /* @__PURE__ */ jsx("div", { className: "max-h-72 overflow-y-auto rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
4619
+ acceptControl === "checkbox" ? /* @__PURE__ */ jsxs("label", { className: "flex cursor-pointer items-start gap-2.5 font-ui text-sm text-foreground", children: [
4620
+ /* @__PURE__ */ jsx(
4621
+ "input",
4622
+ {
4623
+ type: "checkbox",
4624
+ checked: termsAccepted,
4625
+ required: true,
4626
+ onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
4627
+ className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
4628
+ }
4629
+ ),
4630
+ /* @__PURE__ */ jsx("span", { children: L.termsAccept })
4631
+ ] }) : /* @__PURE__ */ jsxs(
4632
+ "div",
4633
+ {
4634
+ role: "radiogroup",
4635
+ "aria-label": L.termsSectionTitle,
4636
+ className: "flex flex-wrap items-center gap-x-6 gap-y-3",
4637
+ children: [
4638
+ /* @__PURE__ */ jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
4689
4639
  /* @__PURE__ */ jsx(
4690
- "circle",
4640
+ "input",
4691
4641
  {
4692
- className: "opacity-25",
4693
- cx: "12",
4694
- cy: "12",
4695
- r: "10",
4696
- stroke: "currentColor",
4697
- strokeWidth: "4"
4642
+ type: "radio",
4643
+ name: "registration-terms-accept",
4644
+ checked: termsAccepted,
4645
+ required: true,
4646
+ onChange: () => setField(TERMS_ACCEPT_KEY, true),
4647
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4698
4648
  }
4699
4649
  ),
4650
+ L.termsAccept
4651
+ ] }),
4652
+ /* @__PURE__ */ jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
4700
4653
  /* @__PURE__ */ jsx(
4701
- "path",
4654
+ "input",
4702
4655
  {
4703
- className: "opacity-75",
4704
- fill: "currentColor",
4705
- d: "M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 00-8 8h4z"
4656
+ type: "radio",
4657
+ name: "registration-terms-accept",
4658
+ checked: current[TERMS_ACCEPT_KEY] === false,
4659
+ onChange: () => setField(TERMS_ACCEPT_KEY, false),
4660
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4706
4661
  }
4707
- )
4708
- ]
4709
- }
4662
+ ),
4663
+ L.termsDecline
4664
+ ] })
4665
+ ]
4666
+ }
4667
+ )
4668
+ ] }),
4669
+ error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
4670
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsx(
4671
+ "button",
4672
+ {
4673
+ type: "submit",
4674
+ disabled: loading,
4675
+ className: cn(
4676
+ "inline-flex items-center justify-center gap-2 rounded-full px-10 py-3.5",
4677
+ "bg-primary text-primary-foreground font-ui font-semibold text-sm",
4678
+ "transition-colors hover:bg-primary/90 focus-visible:outline-none",
4679
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4680
+ "disabled:pointer-events-none disabled:opacity-60"
4710
4681
  ),
4711
- L.submitting
4712
- ] }) : L.submitButton
4713
- }
4714
- ) })
4682
+ children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
4683
+ /* @__PURE__ */ jsxs(
4684
+ "svg",
4685
+ {
4686
+ className: "h-4 w-4 animate-spin",
4687
+ viewBox: "0 0 24 24",
4688
+ fill: "none",
4689
+ children: [
4690
+ /* @__PURE__ */ jsx(
4691
+ "circle",
4692
+ {
4693
+ className: "opacity-25",
4694
+ cx: "12",
4695
+ cy: "12",
4696
+ r: "10",
4697
+ stroke: "currentColor",
4698
+ strokeWidth: "4"
4699
+ }
4700
+ ),
4701
+ /* @__PURE__ */ jsx(
4702
+ "path",
4703
+ {
4704
+ className: "opacity-75",
4705
+ fill: "currentColor",
4706
+ d: "M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 00-8 8h4z"
4707
+ }
4708
+ )
4709
+ ]
4710
+ }
4711
+ ),
4712
+ L.submitting
4713
+ ] }) : L.submitButton
4714
+ }
4715
+ ) })
4716
+ ] })
4715
4717
  ]
4716
4718
  }
4717
4719
  );
@@ -4779,7 +4781,7 @@ function RegistrationSuccessCard({
4779
4781
  var _a, _b;
4780
4782
  return ((_a = a.order) != null ? _a : 0) - ((_b = b.order) != null ? _b : 0);
4781
4783
  }).filter((f) => Object.prototype.hasOwnProperty.call(answers, f.id));
4782
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-10", className), children: [
4784
+ return /* @__PURE__ */ jsxs("div", { className: cn("rounded-xl border border-border bg-card p-6 sm:p-8 flex flex-col gap-10", className), children: [
4783
4785
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4784
4786
  /* @__PURE__ */ jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(CircleCheckIcon, { size: 28 }) }),
4785
4787
  /* @__PURE__ */ jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),