@planetaexo/design-system 0.37.4 → 0.37.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.cjs CHANGED
@@ -2804,6 +2804,7 @@ function AdventureSection({
2804
2804
  type: "button",
2805
2805
  onClick: () => onAddContactAsTraveller(adventure.id),
2806
2806
  disabled: adventure.addContactAsTravellerDisabled,
2807
+ title: adventure.addContactAsTravellerDisabled ? labels == null ? void 0 : labels.addContactAsTravellerDisabledTooltip : void 0,
2807
2808
  className: cn(
2808
2809
  "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground transition-colors",
2809
2810
  "hover:border-primary hover:text-primary hover:bg-primary/5",
@@ -3983,6 +3984,12 @@ ${content}
3983
3984
  </body>
3984
3985
  </html>`;
3985
3986
  }
3987
+ function constrainItineraryImages(html) {
3988
+ return html.replace(/<img\b[^>]*>/gi, (tag) => {
3989
+ const withoutStyle = tag.replace(/\sstyle\s*=\s*("[^"]*"|'[^']*')/gi, "");
3990
+ return withoutStyle.replace(/<img\b/i, '<img style="max-width:100%;height:auto"');
3991
+ });
3992
+ }
3986
3993
  var DEFAULT_LABELS = {
3987
3994
  travellersHeading: "TRAVELLERS",
3988
3995
  detailsHeading: "DETAILS",
@@ -4369,7 +4376,7 @@ function BookingAdventureCard({
4369
4376
  lineHeight: "1.4",
4370
4377
  margin: 0
4371
4378
  },
4372
- dangerouslySetInnerHTML: { __html: description }
4379
+ dangerouslySetInnerHTML: { __html: constrainItineraryImages(description) }
4373
4380
  }
4374
4381
  ) : itinerary.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx(
4375
4382
  "p",