@planetaexo/design-system 0.92.5 → 0.93.1
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 +66 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +66 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1512,6 +1512,13 @@ interface BookingSummaryRoomItem {
|
|
|
1512
1512
|
roomName: string;
|
|
1513
1513
|
bedArrangement: "DOUBLE" | "TWIN" | "SINGLE" | "TRIPLE" | "QUADRUPLE" | "QUINTUPLE";
|
|
1514
1514
|
qty: number;
|
|
1515
|
+
/**
|
|
1516
|
+
* Spec planetaexo-bookings partner-email-accommodation-name — nome da
|
|
1517
|
+
* Acomodação-pai. Quando presente em ≥1 item, o bloco AGRUPA por acomodação
|
|
1518
|
+
* (sub-heading com o nome + quartos do grupo abaixo). Ausente em TODOS os
|
|
1519
|
+
* itens → lista flat (retrocompat com o render anterior).
|
|
1520
|
+
*/
|
|
1521
|
+
accommodationName?: string;
|
|
1515
1522
|
}
|
|
1516
1523
|
interface BookingSummaryProps {
|
|
1517
1524
|
/**
|
|
@@ -4167,6 +4174,14 @@ interface CategoryPage2Props {
|
|
|
4167
4174
|
title: string;
|
|
4168
4175
|
intro?: React.ReactNode;
|
|
4169
4176
|
heroImage?: string;
|
|
4177
|
+
/**
|
|
4178
|
+
* Responsive variants of `heroImage` for the LCP `<img>` — same
|
|
4179
|
+
* `srcSet`/`sizes` contract as `TripHeader`, so phones fetch a viewport-
|
|
4180
|
+
* sized cover instead of the full-width desktop one. Optional; the `<img>`
|
|
4181
|
+
* falls back to the single `heroImage` src when they are absent.
|
|
4182
|
+
*/
|
|
4183
|
+
heroImageSrcSet?: string;
|
|
4184
|
+
heroImageSizes?: string;
|
|
4170
4185
|
/**
|
|
4171
4186
|
* Optional hero background video. Plays muted/looping over the hero with
|
|
4172
4187
|
* `heroImage` as the instant poster (crossfades out once the video is ready).
|
|
@@ -4273,7 +4288,7 @@ interface CategoryPage2Props {
|
|
|
4273
4288
|
filterLabels?: FilterPanelLabels;
|
|
4274
4289
|
className?: string;
|
|
4275
4290
|
}
|
|
4276
|
-
declare function CategoryPage2({ title, intro, heroImage, videoUrl, trustpilotMini, breadcrumb, siteHeader, heroRightSlot, popularTours, popularToursTitle, popularToursEyebrow, trips, tripsTitle, tripsEyebrow, filterGroups, sortOptions, defaultSort, tripsInitialCount, tripListingSlot, trustpilot, reviewsTitle, reviewsSubtitle, blogPosts, aboutTitle, aboutContent, blogIntro, travelGuideHref, travelGuideLabel, blogPostsTitle, blogPostsViewAllHref, faqs, faqsTitle, faqInitialCount, gallery, galleryTitle, galleryLightbox, loadMoreLabel, showLessLabel, seeMoreLabel, viewAllPostsLabel, cardLabels, filterLabels, footerBadges, footer, className, }: CategoryPage2Props): react_jsx_runtime.JSX.Element;
|
|
4291
|
+
declare function CategoryPage2({ title, intro, heroImage, heroImageSrcSet, heroImageSizes, videoUrl, trustpilotMini, breadcrumb, siteHeader, heroRightSlot, popularTours, popularToursTitle, popularToursEyebrow, trips, tripsTitle, tripsEyebrow, filterGroups, sortOptions, defaultSort, tripsInitialCount, tripListingSlot, trustpilot, reviewsTitle, reviewsSubtitle, blogPosts, aboutTitle, aboutContent, blogIntro, travelGuideHref, travelGuideLabel, blogPostsTitle, blogPostsViewAllHref, faqs, faqsTitle, faqInitialCount, gallery, galleryTitle, galleryLightbox, loadMoreLabel, showLessLabel, seeMoreLabel, viewAllPostsLabel, cardLabels, filterLabels, footerBadges, footer, className, }: CategoryPage2Props): react_jsx_runtime.JSX.Element;
|
|
4277
4292
|
|
|
4278
4293
|
type ActivityCardSize = "sm" | "md" | "lg";
|
|
4279
4294
|
interface ActivityCardProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -1512,6 +1512,13 @@ interface BookingSummaryRoomItem {
|
|
|
1512
1512
|
roomName: string;
|
|
1513
1513
|
bedArrangement: "DOUBLE" | "TWIN" | "SINGLE" | "TRIPLE" | "QUADRUPLE" | "QUINTUPLE";
|
|
1514
1514
|
qty: number;
|
|
1515
|
+
/**
|
|
1516
|
+
* Spec planetaexo-bookings partner-email-accommodation-name — nome da
|
|
1517
|
+
* Acomodação-pai. Quando presente em ≥1 item, o bloco AGRUPA por acomodação
|
|
1518
|
+
* (sub-heading com o nome + quartos do grupo abaixo). Ausente em TODOS os
|
|
1519
|
+
* itens → lista flat (retrocompat com o render anterior).
|
|
1520
|
+
*/
|
|
1521
|
+
accommodationName?: string;
|
|
1515
1522
|
}
|
|
1516
1523
|
interface BookingSummaryProps {
|
|
1517
1524
|
/**
|
|
@@ -4167,6 +4174,14 @@ interface CategoryPage2Props {
|
|
|
4167
4174
|
title: string;
|
|
4168
4175
|
intro?: React.ReactNode;
|
|
4169
4176
|
heroImage?: string;
|
|
4177
|
+
/**
|
|
4178
|
+
* Responsive variants of `heroImage` for the LCP `<img>` — same
|
|
4179
|
+
* `srcSet`/`sizes` contract as `TripHeader`, so phones fetch a viewport-
|
|
4180
|
+
* sized cover instead of the full-width desktop one. Optional; the `<img>`
|
|
4181
|
+
* falls back to the single `heroImage` src when they are absent.
|
|
4182
|
+
*/
|
|
4183
|
+
heroImageSrcSet?: string;
|
|
4184
|
+
heroImageSizes?: string;
|
|
4170
4185
|
/**
|
|
4171
4186
|
* Optional hero background video. Plays muted/looping over the hero with
|
|
4172
4187
|
* `heroImage` as the instant poster (crossfades out once the video is ready).
|
|
@@ -4273,7 +4288,7 @@ interface CategoryPage2Props {
|
|
|
4273
4288
|
filterLabels?: FilterPanelLabels;
|
|
4274
4289
|
className?: string;
|
|
4275
4290
|
}
|
|
4276
|
-
declare function CategoryPage2({ title, intro, heroImage, videoUrl, trustpilotMini, breadcrumb, siteHeader, heroRightSlot, popularTours, popularToursTitle, popularToursEyebrow, trips, tripsTitle, tripsEyebrow, filterGroups, sortOptions, defaultSort, tripsInitialCount, tripListingSlot, trustpilot, reviewsTitle, reviewsSubtitle, blogPosts, aboutTitle, aboutContent, blogIntro, travelGuideHref, travelGuideLabel, blogPostsTitle, blogPostsViewAllHref, faqs, faqsTitle, faqInitialCount, gallery, galleryTitle, galleryLightbox, loadMoreLabel, showLessLabel, seeMoreLabel, viewAllPostsLabel, cardLabels, filterLabels, footerBadges, footer, className, }: CategoryPage2Props): react_jsx_runtime.JSX.Element;
|
|
4291
|
+
declare function CategoryPage2({ title, intro, heroImage, heroImageSrcSet, heroImageSizes, videoUrl, trustpilotMini, breadcrumb, siteHeader, heroRightSlot, popularTours, popularToursTitle, popularToursEyebrow, trips, tripsTitle, tripsEyebrow, filterGroups, sortOptions, defaultSort, tripsInitialCount, tripListingSlot, trustpilot, reviewsTitle, reviewsSubtitle, blogPosts, aboutTitle, aboutContent, blogIntro, travelGuideHref, travelGuideLabel, blogPostsTitle, blogPostsViewAllHref, faqs, faqsTitle, faqInitialCount, gallery, galleryTitle, galleryLightbox, loadMoreLabel, showLessLabel, seeMoreLabel, viewAllPostsLabel, cardLabels, filterLabels, footerBadges, footer, className, }: CategoryPage2Props): react_jsx_runtime.JSX.Element;
|
|
4277
4292
|
|
|
4278
4293
|
type ActivityCardSize = "sm" | "md" | "lg";
|
|
4279
4294
|
interface ActivityCardProps {
|
package/dist/index.js
CHANGED
|
@@ -5057,7 +5057,7 @@ var DEFAULT_BED_LABELS = {
|
|
|
5057
5057
|
QUINTUPLE: "Quintuple"
|
|
5058
5058
|
};
|
|
5059
5059
|
function BookingSummary({ heading, rows, rooms, roomsHeading, bedArrangementLabels, footer, className }) {
|
|
5060
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5060
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
5061
5061
|
const hasRooms = !!rooms && rooms.length > 0;
|
|
5062
5062
|
const bedLabels = {
|
|
5063
5063
|
DOUBLE: (_a = bedArrangementLabels == null ? void 0 : bedArrangementLabels.DOUBLE) != null ? _a : DEFAULT_BED_LABELS.DOUBLE,
|
|
@@ -5067,6 +5067,21 @@ function BookingSummary({ heading, rows, rooms, roomsHeading, bedArrangementLabe
|
|
|
5067
5067
|
QUADRUPLE: (_e = bedArrangementLabels == null ? void 0 : bedArrangementLabels.QUADRUPLE) != null ? _e : DEFAULT_BED_LABELS.QUADRUPLE,
|
|
5068
5068
|
QUINTUPLE: (_f = bedArrangementLabels == null ? void 0 : bedArrangementLabels.QUINTUPLE) != null ? _f : DEFAULT_BED_LABELS.QUINTUPLE
|
|
5069
5069
|
};
|
|
5070
|
+
const roomGroups = [];
|
|
5071
|
+
let anyAccommodation = false;
|
|
5072
|
+
if (hasRooms) {
|
|
5073
|
+
for (const room of rooms) {
|
|
5074
|
+
const name = ((_g = room.accommodationName) == null ? void 0 : _g.trim()) || null;
|
|
5075
|
+
if (name) anyAccommodation = true;
|
|
5076
|
+
let bucket = roomGroups.find((g) => g.name === name);
|
|
5077
|
+
if (!bucket) {
|
|
5078
|
+
bucket = { name, items: [] };
|
|
5079
|
+
roomGroups.push(bucket);
|
|
5080
|
+
}
|
|
5081
|
+
bucket.items.push(room);
|
|
5082
|
+
}
|
|
5083
|
+
}
|
|
5084
|
+
const roomLine = (room) => `${room.qty}\xD7 ${room.roomName} \u2014 ${bedLabels[room.bedArrangement]}`;
|
|
5070
5085
|
return /* @__PURE__ */ jsxs("div", { className, style: { marginBottom: "24px" }, children: [
|
|
5071
5086
|
heading && /* @__PURE__ */ jsx(
|
|
5072
5087
|
"p",
|
|
@@ -5166,18 +5181,51 @@ function BookingSummary({ heading, rows, rooms, roomsHeading, bedArrangementLabe
|
|
|
5166
5181
|
children: roomsHeading != null ? roomsHeading : "Accommodations"
|
|
5167
5182
|
}
|
|
5168
5183
|
),
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5184
|
+
!anyAccommodation ? (
|
|
5185
|
+
// Retrocompat: nenhum item tem accommodationName → lista flat
|
|
5186
|
+
// (idêntica ao render anterior).
|
|
5187
|
+
rooms.map((room, i) => /* @__PURE__ */ jsx(
|
|
5188
|
+
"div",
|
|
5189
|
+
{
|
|
5190
|
+
style: {
|
|
5191
|
+
fontSize: "14px",
|
|
5192
|
+
color: emailTokens.foreground,
|
|
5193
|
+
marginBottom: i < rooms.length - 1 ? "4px" : 0
|
|
5194
|
+
},
|
|
5195
|
+
children: roomLine(room)
|
|
5176
5196
|
},
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5197
|
+
i
|
|
5198
|
+
))
|
|
5199
|
+
) : (
|
|
5200
|
+
// Agrupado por acomodação: sub-heading (nome) + quartos do grupo.
|
|
5201
|
+
roomGroups.map((group, gi) => /* @__PURE__ */ jsxs("div", { children: [
|
|
5202
|
+
group.name && /* @__PURE__ */ jsx(
|
|
5203
|
+
"div",
|
|
5204
|
+
{
|
|
5205
|
+
style: {
|
|
5206
|
+
fontSize: "14px",
|
|
5207
|
+
fontWeight: 700,
|
|
5208
|
+
color: emailTokens.foreground,
|
|
5209
|
+
marginTop: gi > 0 ? "10px" : 0,
|
|
5210
|
+
marginBottom: "4px"
|
|
5211
|
+
},
|
|
5212
|
+
children: group.name
|
|
5213
|
+
}
|
|
5214
|
+
),
|
|
5215
|
+
group.items.map((room, ri) => /* @__PURE__ */ jsx(
|
|
5216
|
+
"div",
|
|
5217
|
+
{
|
|
5218
|
+
style: {
|
|
5219
|
+
fontSize: "14px",
|
|
5220
|
+
color: emailTokens.foreground,
|
|
5221
|
+
marginBottom: ri < group.items.length - 1 ? "4px" : 0
|
|
5222
|
+
},
|
|
5223
|
+
children: `\xB7 ${roomLine(room)}`
|
|
5224
|
+
},
|
|
5225
|
+
ri
|
|
5226
|
+
))
|
|
5227
|
+
] }, gi))
|
|
5228
|
+
)
|
|
5181
5229
|
]
|
|
5182
5230
|
}
|
|
5183
5231
|
)
|
|
@@ -5190,8 +5238,8 @@ function BookingSummary({ heading, rows, rooms, roomsHeading, bedArrangementLabe
|
|
|
5190
5238
|
style: {
|
|
5191
5239
|
padding: "12px 20px",
|
|
5192
5240
|
textAlign: "center",
|
|
5193
|
-
fontWeight: (
|
|
5194
|
-
color: (
|
|
5241
|
+
fontWeight: (_h = footer.fontWeight) != null ? _h : 600,
|
|
5242
|
+
color: (_i = footer.color) != null ? _i : emailTokens.foreground,
|
|
5195
5243
|
backgroundColor: footer.backgroundColor
|
|
5196
5244
|
},
|
|
5197
5245
|
children: footer.text
|
|
@@ -16382,6 +16430,8 @@ function CategoryPage2({
|
|
|
16382
16430
|
title,
|
|
16383
16431
|
intro,
|
|
16384
16432
|
heroImage,
|
|
16433
|
+
heroImageSrcSet,
|
|
16434
|
+
heroImageSizes,
|
|
16385
16435
|
videoUrl,
|
|
16386
16436
|
trustpilotMini,
|
|
16387
16437
|
breadcrumb,
|
|
@@ -16517,6 +16567,8 @@ function CategoryPage2({
|
|
|
16517
16567
|
"img",
|
|
16518
16568
|
{
|
|
16519
16569
|
src: heroImage,
|
|
16570
|
+
srcSet: heroImageSrcSet,
|
|
16571
|
+
sizes: heroImageSizes,
|
|
16520
16572
|
alt: "",
|
|
16521
16573
|
"aria-hidden": true,
|
|
16522
16574
|
fetchPriority: "high",
|