@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.d.cts CHANGED
@@ -450,6 +450,8 @@ interface BookingDetailsLabels {
450
450
  /** Botão "Add contact as traveller" / "Add contact". */
451
451
  addContactAsTraveller?: string;
452
452
  addContactAsTravellerShort?: string;
453
+ /** Tooltip (title nativo) exibido quando o botão está desabilitado por contato já adicionado. */
454
+ addContactAsTravellerDisabledTooltip?: string;
453
455
  /** Badge inline "Child". */
454
456
  childBadge?: string;
455
457
  /** Status do traveller (mostrado como badge). */
package/dist/index.d.ts CHANGED
@@ -450,6 +450,8 @@ interface BookingDetailsLabels {
450
450
  /** Botão "Add contact as traveller" / "Add contact". */
451
451
  addContactAsTraveller?: string;
452
452
  addContactAsTravellerShort?: string;
453
+ /** Tooltip (title nativo) exibido quando o botão está desabilitado por contato já adicionado. */
454
+ addContactAsTravellerDisabledTooltip?: string;
453
455
  /** Badge inline "Child". */
454
456
  childBadge?: string;
455
457
  /** Status do traveller (mostrado como badge). */
package/dist/index.js CHANGED
@@ -2783,6 +2783,7 @@ function AdventureSection({
2783
2783
  type: "button",
2784
2784
  onClick: () => onAddContactAsTraveller(adventure.id),
2785
2785
  disabled: adventure.addContactAsTravellerDisabled,
2786
+ title: adventure.addContactAsTravellerDisabled ? labels == null ? void 0 : labels.addContactAsTravellerDisabledTooltip : void 0,
2786
2787
  className: cn(
2787
2788
  "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",
2788
2789
  "hover:border-primary hover:text-primary hover:bg-primary/5",
@@ -3962,6 +3963,12 @@ ${content}
3962
3963
  </body>
3963
3964
  </html>`;
3964
3965
  }
3966
+ function constrainItineraryImages(html) {
3967
+ return html.replace(/<img\b[^>]*>/gi, (tag) => {
3968
+ const withoutStyle = tag.replace(/\sstyle\s*=\s*("[^"]*"|'[^']*')/gi, "");
3969
+ return withoutStyle.replace(/<img\b/i, '<img style="max-width:100%;height:auto"');
3970
+ });
3971
+ }
3965
3972
  var DEFAULT_LABELS = {
3966
3973
  travellersHeading: "TRAVELLERS",
3967
3974
  detailsHeading: "DETAILS",
@@ -4348,7 +4355,7 @@ function BookingAdventureCard({
4348
4355
  lineHeight: "1.4",
4349
4356
  margin: 0
4350
4357
  },
4351
- dangerouslySetInnerHTML: { __html: description }
4358
+ dangerouslySetInnerHTML: { __html: constrainItineraryImages(description) }
4352
4359
  }
4353
4360
  ) : itinerary.map((line, i) => /* @__PURE__ */ jsx(
4354
4361
  "p",