@planetaexo/design-system 0.65.0 → 0.66.0

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
@@ -1327,7 +1327,7 @@ function AdventureCard({
1327
1327
  labels,
1328
1328
  interactionsDisabled
1329
1329
  }) {
1330
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
1330
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
1331
1331
  const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
1332
1332
  const [checkedInternal, setCheckedInternal] = React32__namespace.useState(
1333
1333
  new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
@@ -1501,6 +1501,29 @@ function AdventureCard({
1501
1501
  }
1502
1502
  )
1503
1503
  ] }),
1504
+ adventure.rooms && adventure.rooms.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-5 mt-1", children: adventure.rooms.map((room, i) => {
1505
+ var _a2, _b2;
1506
+ const bedLabel = (_b2 = (_a2 = adventure.bedArrangementLabels) == null ? void 0 : _a2[room.bedArrangement]) != null ? _b2 : room.bedArrangement === "DOUBLE" ? "Double" : room.bedArrangement === "TWIN" ? "Twin" : room.bedArrangement === "SINGLE" ? "Single" : "Triple";
1507
+ const heading = adventure.accommodationRoomHeading ? adventure.accommodationRoomHeading(room.roomName) : `Accommodation: ${room.roomName}`;
1508
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
1509
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-lg font-semibold text-foreground font-heading", children: heading }),
1510
+ room.imageUrl && // eslint-disable-next-line @next/next/no-img-element
1511
+ /* @__PURE__ */ jsxRuntime.jsx(
1512
+ "img",
1513
+ {
1514
+ src: room.imageUrl,
1515
+ alt: room.roomName,
1516
+ className: "w-full h-auto max-w-full rounded"
1517
+ }
1518
+ ),
1519
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold text-foreground", children: `${room.qty}\xD7 ${room.roomName}` }),
1520
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-foreground/70 flex items-center gap-2 flex-wrap", children: [
1521
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: room.accommodationName }),
1522
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-2 py-0.5 text-xs font-semibold bg-primary/10 text-primary rounded uppercase tracking-wide", children: bedLabel })
1523
+ ] }),
1524
+ room.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/70 leading-snug", children: room.description })
1525
+ ] }, i);
1526
+ }) }),
1504
1527
  (adventure.description || adventure.detailsSlot) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1505
1528
  /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
1506
1529
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -1529,48 +1552,22 @@ function AdventureCard({
1529
1552
  ), children: adventure.detailsSlot })
1530
1553
  ] })
1531
1554
  ] }),
1532
- adventure.rooms && adventure.rooms.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
1533
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_p = adventure.accommodationsLabel) != null ? _p : "Accommodations" }),
1534
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-3", children: adventure.rooms.map((room, i) => {
1535
- var _a2, _b2;
1536
- const bedLabel = (_b2 = (_a2 = adventure.bedArrangementLabels) == null ? void 0 : _a2[room.bedArrangement]) != null ? _b2 : room.bedArrangement === "DOUBLE" ? "Double" : room.bedArrangement === "TWIN" ? "Twin" : room.bedArrangement === "SINGLE" ? "Single" : "Triple";
1537
- return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-3", children: [
1538
- room.imageUrl && // eslint-disable-next-line @next/next/no-img-element
1539
- /* @__PURE__ */ jsxRuntime.jsx(
1540
- "img",
1541
- {
1542
- src: room.imageUrl,
1543
- alt: room.roomName,
1544
- className: "w-20 h-16 object-cover rounded shrink-0"
1545
- }
1546
- ),
1547
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
1548
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold text-foreground", children: `${room.qty}\xD7 ${room.roomName}` }),
1549
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-foreground/70 flex items-center gap-2 flex-wrap", children: [
1550
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: room.accommodationName }),
1551
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-2 py-0.5 text-xs font-semibold bg-primary/10 text-primary rounded uppercase tracking-wide", children: bedLabel })
1552
- ] }),
1553
- room.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/70 mt-1 leading-snug", children: room.description })
1554
- ] })
1555
- ] }, i);
1556
- }) })
1557
- ] }),
1558
1555
  adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
1559
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_q = adventure.includedLabel) != null ? _q : "What's included" }),
1556
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_p = adventure.includedLabel) != null ? _p : "What's included" }),
1560
1557
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-base text-foreground/80 font-sans", children: [
1561
1558
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "w-4 h-4 text-primary shrink-0 mt-1" }),
1562
1559
  item
1563
1560
  ] }, i)) })
1564
1561
  ] }),
1565
1562
  adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
1566
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_r = adventure.notIncludedLabel) != null ? _r : "What's not included" }),
1563
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_q = adventure.notIncludedLabel) != null ? _q : "What's not included" }),
1567
1564
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-base text-foreground/80 font-sans", children: [
1568
1565
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-4 h-4 text-destructive shrink-0 mt-1" }),
1569
1566
  item
1570
1567
  ] }, i)) })
1571
1568
  ] }),
1572
1569
  adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
1573
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_s = adventure.cancellationPolicyLabel) != null ? _s : "Cancellation policy" }),
1570
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_r = adventure.cancellationPolicyLabel) != null ? _r : "Cancellation policy" }),
1574
1571
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.cancellationPolicy.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-base text-muted-foreground font-sans", children: [
1575
1572
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary shrink-0 mt-2.5" }),
1576
1573
  item
@@ -4147,6 +4144,7 @@ var DEFAULT_LABELS = {
4147
4144
  adultsUnit: "adult(s)",
4148
4145
  childrenUnit: "child(ren)",
4149
4146
  accommodationsHeading: "ACCOMMODATIONS",
4147
+ accommodationRoomHeading: (name) => `Accommodation: ${name}`,
4150
4148
  bedArrangementLabels: {
4151
4149
  DOUBLE: "Double",
4152
4150
  TWIN: "Twin",
@@ -4174,10 +4172,11 @@ function BookingAdventureCard({
4174
4172
  lineItems,
4175
4173
  subtotal,
4176
4174
  rooms,
4175
+ roomLayout = "compact",
4177
4176
  labels,
4178
4177
  className
4179
4178
  }) {
4180
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
4179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
4181
4180
  const l = {
4182
4181
  travellersHeading: (_a = labels == null ? void 0 : labels.travellersHeading) != null ? _a : DEFAULT_LABELS.travellersHeading,
4183
4182
  detailsHeading: (_b = labels == null ? void 0 : labels.detailsHeading) != null ? _b : DEFAULT_LABELS.detailsHeading,
@@ -4192,11 +4191,12 @@ function BookingAdventureCard({
4192
4191
  adultsUnit: (_k = labels == null ? void 0 : labels.adultsUnit) != null ? _k : DEFAULT_LABELS.adultsUnit,
4193
4192
  childrenUnit: (_l = labels == null ? void 0 : labels.childrenUnit) != null ? _l : DEFAULT_LABELS.childrenUnit,
4194
4193
  accommodationsHeading: (_m = labels == null ? void 0 : labels.accommodationsHeading) != null ? _m : DEFAULT_LABELS.accommodationsHeading,
4194
+ accommodationRoomHeading: (_n = labels == null ? void 0 : labels.accommodationRoomHeading) != null ? _n : DEFAULT_LABELS.accommodationRoomHeading,
4195
4195
  bedArrangementLabels: {
4196
- DOUBLE: (_o = (_n = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _n.DOUBLE) != null ? _o : DEFAULT_LABELS.bedArrangementLabels.DOUBLE,
4197
- TWIN: (_q = (_p = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _p.TWIN) != null ? _q : DEFAULT_LABELS.bedArrangementLabels.TWIN,
4198
- SINGLE: (_s = (_r = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _r.SINGLE) != null ? _s : DEFAULT_LABELS.bedArrangementLabels.SINGLE,
4199
- TRIPLE: (_u = (_t = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _t.TRIPLE) != null ? _u : DEFAULT_LABELS.bedArrangementLabels.TRIPLE
4196
+ DOUBLE: (_p = (_o = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _o.DOUBLE) != null ? _p : DEFAULT_LABELS.bedArrangementLabels.DOUBLE,
4197
+ TWIN: (_r = (_q = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _q.TWIN) != null ? _r : DEFAULT_LABELS.bedArrangementLabels.TWIN,
4198
+ SINGLE: (_t = (_s = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _s.SINGLE) != null ? _t : DEFAULT_LABELS.bedArrangementLabels.SINGLE,
4199
+ TRIPLE: (_v = (_u = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _u.TRIPLE) != null ? _v : DEFAULT_LABELS.bedArrangementLabels.TRIPLE
4200
4200
  }
4201
4201
  };
4202
4202
  const hasTravellers = !!travellers && travellers.length > 0;
@@ -4535,7 +4535,116 @@ function BookingAdventureCard({
4535
4535
  );
4536
4536
  })
4537
4537
  ] }),
4538
- hasRooms && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "4px" }, children: [
4538
+ hasRooms && roomLayout === "feature" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "4px" }, children: [
4539
+ /* @__PURE__ */ jsxRuntime.jsx(
4540
+ "hr",
4541
+ {
4542
+ style: {
4543
+ border: "none",
4544
+ borderTop: `1px solid ${emailTokens.border}`,
4545
+ marginBottom: "10px"
4546
+ }
4547
+ }
4548
+ ),
4549
+ /* @__PURE__ */ jsxRuntime.jsx(
4550
+ "p",
4551
+ {
4552
+ style: {
4553
+ fontSize: "10px",
4554
+ fontWeight: 700,
4555
+ color: emailTokens.mutedForeground,
4556
+ textTransform: "uppercase",
4557
+ letterSpacing: "0.1em",
4558
+ margin: "0 0 10px 0"
4559
+ },
4560
+ children: l.accommodationsHeading
4561
+ }
4562
+ ),
4563
+ rooms.map((room, i) => /* @__PURE__ */ jsxRuntime.jsxs(
4564
+ "div",
4565
+ {
4566
+ style: {
4567
+ marginBottom: i < rooms.length - 1 ? "16px" : "0"
4568
+ },
4569
+ children: [
4570
+ /* @__PURE__ */ jsxRuntime.jsx(
4571
+ "p",
4572
+ {
4573
+ style: {
4574
+ fontSize: "16px",
4575
+ fontWeight: 700,
4576
+ color: emailTokens.foreground,
4577
+ lineHeight: "1.3",
4578
+ margin: "0 0 8px 0"
4579
+ },
4580
+ children: l.accommodationRoomHeading(room.roomName)
4581
+ }
4582
+ ),
4583
+ room.imageUrl && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
4584
+ "img",
4585
+ {
4586
+ src: room.imageUrl,
4587
+ alt: room.roomName,
4588
+ style: {
4589
+ width: "100%",
4590
+ height: "auto",
4591
+ maxWidth: "100%",
4592
+ display: "block",
4593
+ borderRadius: "8px"
4594
+ }
4595
+ }
4596
+ ) }),
4597
+ /* @__PURE__ */ jsxRuntime.jsx(
4598
+ "div",
4599
+ {
4600
+ style: {
4601
+ fontSize: "14px",
4602
+ fontWeight: 600,
4603
+ color: emailTokens.foreground,
4604
+ marginBottom: "2px"
4605
+ },
4606
+ children: `${room.qty}\xD7 ${room.roomName}`
4607
+ }
4608
+ ),
4609
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: "12px", color: emailTokens.mutedForeground }, children: [
4610
+ room.accommodationName,
4611
+ /* @__PURE__ */ jsxRuntime.jsx(
4612
+ "span",
4613
+ {
4614
+ style: {
4615
+ display: "inline-block",
4616
+ marginLeft: "8px",
4617
+ padding: "1px 6px",
4618
+ fontSize: "10px",
4619
+ fontWeight: 600,
4620
+ color: emailTokens.primary,
4621
+ backgroundColor: emailTokens.primaryLight,
4622
+ borderRadius: "4px",
4623
+ textTransform: "uppercase",
4624
+ letterSpacing: "0.05em"
4625
+ },
4626
+ children: l.bedArrangementLabels[room.bedArrangement]
4627
+ }
4628
+ )
4629
+ ] }),
4630
+ room.description && /* @__PURE__ */ jsxRuntime.jsx(
4631
+ "div",
4632
+ {
4633
+ style: {
4634
+ fontSize: "12px",
4635
+ color: emailTokens.bodyText,
4636
+ marginTop: "4px",
4637
+ lineHeight: "1.4"
4638
+ },
4639
+ children: room.description
4640
+ }
4641
+ )
4642
+ ]
4643
+ },
4644
+ i
4645
+ ))
4646
+ ] }),
4647
+ hasRooms && roomLayout === "compact" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "4px" }, children: [
4539
4648
  /* @__PURE__ */ jsxRuntime.jsx(
4540
4649
  "hr",
4541
4650
  {
@@ -5174,6 +5283,14 @@ var DEFAULT_LABELS3 = {
5174
5283
  pricingLabel: "Pricing",
5175
5284
  subtotalLabel: "Subtotal",
5176
5285
  totalLabel: "Total",
5286
+ accommodationsLabel: "ACCOMMODATIONS",
5287
+ accommodationRoomHeading: (name) => `Accommodation: ${name}`,
5288
+ bedArrangementLabels: {
5289
+ DOUBLE: "Double",
5290
+ TWIN: "Twin",
5291
+ SINGLE: "Single",
5292
+ TRIPLE: "Triple"
5293
+ },
5177
5294
  paymentSummaryHeading: "\u{1F4B0} Payment Summary",
5178
5295
  paymentDetailsHeading: "Payment Details",
5179
5296
  depositLabel: (percent) => `Deposit (${percent}%)`,
@@ -5342,6 +5459,7 @@ function BookingPaymentConfirmationEmail({
5342
5459
  lineItems: lineItemsToPass,
5343
5460
  subtotal: adventure.subtotal,
5344
5461
  rooms: adventure.rooms,
5462
+ roomLayout: "feature",
5345
5463
  labels: {
5346
5464
  travellersHeading: l.travellersLabel,
5347
5465
  detailsHeading: l.itineraryLabel,
@@ -5351,7 +5469,10 @@ function BookingPaymentConfirmationEmail({
5351
5469
  notIncludedHeading: l.notIncludedLabel,
5352
5470
  childBadge: l.childBadge,
5353
5471
  adultsUnit: l.adultsUnit,
5354
- childrenUnit: l.childrenUnit
5472
+ childrenUnit: l.childrenUnit,
5473
+ accommodationsHeading: l.accommodationsLabel,
5474
+ accommodationRoomHeading: l.accommodationRoomHeading,
5475
+ bedArrangementLabels: l.bedArrangementLabels
5355
5476
  }
5356
5477
  }
5357
5478
  )