@planetaexo/design-system 0.77.0 → 0.78.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 +94 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +94 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1565,12 +1565,28 @@ function AdventureCard({
|
|
|
1565
1565
|
item
|
|
1566
1566
|
] }, i)) })
|
|
1567
1567
|
] }),
|
|
1568
|
-
adventure.cancellationPolicy && adventure.cancellationPolicy.
|
|
1568
|
+
adventure.cancellationPolicy && adventure.cancellationPolicy.trim() && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
|
|
1569
1569
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: (_r = adventure.cancellationPolicyLabel) != null ? _r : "Cancellation policy" }),
|
|
1570
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1570
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
|
+
"div",
|
|
1572
|
+
{
|
|
1573
|
+
className: cn(
|
|
1574
|
+
"text-foreground",
|
|
1575
|
+
"[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
|
|
1576
|
+
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
1577
|
+
"[&_em]:italic",
|
|
1578
|
+
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
1579
|
+
"[&_ul:not(.list-check):not(.list-cross)]:list-disc [&_ul:not(.list-check):not(.list-cross)]:pl-5 [&_ul:not(.list-check):not(.list-cross)]:space-y-1",
|
|
1580
|
+
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
1581
|
+
"[&_li]:text-base [&_li]:text-muted-foreground [&_li]:leading-snug",
|
|
1582
|
+
"[&_.list-check]:list-none [&_.list-check]:pl-5 [&_.list-check]:space-y-1",
|
|
1583
|
+
"[&_.list-check_li]:relative [&_.list-check_li]:before:absolute [&_.list-check_li]:before:-left-5 [&_.list-check_li]:before:content-['\u2713'] [&_.list-check_li]:before:text-primary [&_.list-check_li]:before:font-bold",
|
|
1584
|
+
"[&_.list-cross]:list-none [&_.list-cross]:pl-5 [&_.list-cross]:space-y-1",
|
|
1585
|
+
"[&_.list-cross_li]:relative [&_.list-cross_li]:before:absolute [&_.list-cross_li]:before:-left-5 [&_.list-cross_li]:before:content-['\u2717'] [&_.list-cross_li]:before:text-destructive [&_.list-cross_li]:before:font-bold"
|
|
1586
|
+
),
|
|
1587
|
+
dangerouslySetInnerHTML: { __html: adventure.cancellationPolicy }
|
|
1588
|
+
}
|
|
1589
|
+
)
|
|
1574
1590
|
] })
|
|
1575
1591
|
] })
|
|
1576
1592
|
] });
|
|
@@ -2866,19 +2882,24 @@ function AdventureSection({
|
|
|
2866
2882
|
i
|
|
2867
2883
|
)) })
|
|
2868
2884
|
] }),
|
|
2869
|
-
adventure.cancellationPolicy && adventure.cancellationPolicy.
|
|
2885
|
+
adventure.cancellationPolicy && adventure.cancellationPolicy.trim() && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2870
2886
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_k = (_j = labels == null ? void 0 : labels.adventureSections) == null ? void 0 : _j.cancellationPolicy) != null ? _k : "Cancellation policy" }),
|
|
2871
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2872
|
-
"
|
|
2887
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2888
|
+
"div",
|
|
2873
2889
|
{
|
|
2874
|
-
className:
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2890
|
+
className: cn(
|
|
2891
|
+
"text-foreground",
|
|
2892
|
+
"[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
|
|
2893
|
+
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
2894
|
+
"[&_em]:italic",
|
|
2895
|
+
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
2896
|
+
"[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
|
|
2897
|
+
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
2898
|
+
"[&_li]:text-sm [&_li]:text-muted-foreground [&_li]:leading-snug"
|
|
2899
|
+
),
|
|
2900
|
+
dangerouslySetInnerHTML: { __html: adventure.cancellationPolicy }
|
|
2901
|
+
}
|
|
2902
|
+
)
|
|
2882
2903
|
] })
|
|
2883
2904
|
] }),
|
|
2884
2905
|
adventure.rooms && adventure.rooms.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-3", children: [
|
|
@@ -4139,6 +4160,7 @@ var DEFAULT_LABELS = {
|
|
|
4139
4160
|
lineItemEquals: "=",
|
|
4140
4161
|
includedHeading: "O que est\xE1 incluso",
|
|
4141
4162
|
notIncludedHeading: "O que n\xE3o est\xE1 incluso",
|
|
4163
|
+
cancellationPolicyHeading: "Cancellation policy",
|
|
4142
4164
|
childBadge: "child",
|
|
4143
4165
|
adultsUnit: "adult(s)",
|
|
4144
4166
|
childrenUnit: "child(ren)",
|
|
@@ -4170,6 +4192,7 @@ function BookingAdventureCard({
|
|
|
4170
4192
|
partner,
|
|
4171
4193
|
included,
|
|
4172
4194
|
notIncluded,
|
|
4195
|
+
cancellationPolicy,
|
|
4173
4196
|
lineItems,
|
|
4174
4197
|
subtotal,
|
|
4175
4198
|
rooms,
|
|
@@ -4177,7 +4200,7 @@ function BookingAdventureCard({
|
|
|
4177
4200
|
labels,
|
|
4178
4201
|
className
|
|
4179
4202
|
}) {
|
|
4180
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
4203
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
|
|
4181
4204
|
const l = {
|
|
4182
4205
|
travellersHeading: (_a = labels == null ? void 0 : labels.travellersHeading) != null ? _a : DEFAULT_LABELS.travellersHeading,
|
|
4183
4206
|
detailsHeading: (_b = labels == null ? void 0 : labels.detailsHeading) != null ? _b : DEFAULT_LABELS.detailsHeading,
|
|
@@ -4188,18 +4211,19 @@ function BookingAdventureCard({
|
|
|
4188
4211
|
lineItemEquals: (_g = labels == null ? void 0 : labels.lineItemEquals) != null ? _g : DEFAULT_LABELS.lineItemEquals,
|
|
4189
4212
|
includedHeading: (_h = labels == null ? void 0 : labels.includedHeading) != null ? _h : DEFAULT_LABELS.includedHeading,
|
|
4190
4213
|
notIncludedHeading: (_i = labels == null ? void 0 : labels.notIncludedHeading) != null ? _i : DEFAULT_LABELS.notIncludedHeading,
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4214
|
+
cancellationPolicyHeading: (_j = labels == null ? void 0 : labels.cancellationPolicyHeading) != null ? _j : DEFAULT_LABELS.cancellationPolicyHeading,
|
|
4215
|
+
childBadge: (_k = labels == null ? void 0 : labels.childBadge) != null ? _k : DEFAULT_LABELS.childBadge,
|
|
4216
|
+
adultsUnit: (_l = labels == null ? void 0 : labels.adultsUnit) != null ? _l : DEFAULT_LABELS.adultsUnit,
|
|
4217
|
+
childrenUnit: (_m = labels == null ? void 0 : labels.childrenUnit) != null ? _m : DEFAULT_LABELS.childrenUnit,
|
|
4218
|
+
accommodationsHeading: (_n = labels == null ? void 0 : labels.accommodationsHeading) != null ? _n : DEFAULT_LABELS.accommodationsHeading,
|
|
4219
|
+
accommodationRoomHeading: (_o = labels == null ? void 0 : labels.accommodationRoomHeading) != null ? _o : DEFAULT_LABELS.accommodationRoomHeading,
|
|
4196
4220
|
bedArrangementLabels: {
|
|
4197
|
-
DOUBLE: (
|
|
4198
|
-
TWIN: (
|
|
4199
|
-
SINGLE: (
|
|
4200
|
-
TRIPLE: (
|
|
4201
|
-
QUADRUPLE: (
|
|
4202
|
-
QUINTUPLE: (
|
|
4221
|
+
DOUBLE: (_q = (_p = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _p.DOUBLE) != null ? _q : DEFAULT_LABELS.bedArrangementLabels.DOUBLE,
|
|
4222
|
+
TWIN: (_s = (_r = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _r.TWIN) != null ? _s : DEFAULT_LABELS.bedArrangementLabels.TWIN,
|
|
4223
|
+
SINGLE: (_u = (_t = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _t.SINGLE) != null ? _u : DEFAULT_LABELS.bedArrangementLabels.SINGLE,
|
|
4224
|
+
TRIPLE: (_w = (_v = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _v.TRIPLE) != null ? _w : DEFAULT_LABELS.bedArrangementLabels.TRIPLE,
|
|
4225
|
+
QUADRUPLE: (_y = (_x = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _x.QUADRUPLE) != null ? _y : DEFAULT_LABELS.bedArrangementLabels.QUADRUPLE,
|
|
4226
|
+
QUINTUPLE: (_A = (_z = labels == null ? void 0 : labels.bedArrangementLabels) == null ? void 0 : _z.QUINTUPLE) != null ? _A : DEFAULT_LABELS.bedArrangementLabels.QUINTUPLE
|
|
4203
4227
|
}
|
|
4204
4228
|
};
|
|
4205
4229
|
const hasTravellers = !!travellers && travellers.length > 0;
|
|
@@ -4207,6 +4231,7 @@ function BookingAdventureCard({
|
|
|
4207
4231
|
const hasDescription = !!description && description.trim().length > 0;
|
|
4208
4232
|
const hasIncluded = !!included && included.length > 0;
|
|
4209
4233
|
const hasNotIncluded = !!notIncluded && notIncluded.length > 0;
|
|
4234
|
+
const hasCancellationPolicy = !!cancellationPolicy && cancellationPolicy.trim().length > 0;
|
|
4210
4235
|
const hasLineItems = lineItems.length > 0;
|
|
4211
4236
|
const hasRooms = !!rooms && rooms.length > 0;
|
|
4212
4237
|
const dateRange = endDate ? `${startDate} \u2192 ${endDate}` : startDate;
|
|
@@ -4891,6 +4916,32 @@ function BookingAdventureCard({
|
|
|
4891
4916
|
i
|
|
4892
4917
|
))
|
|
4893
4918
|
] }),
|
|
4919
|
+
hasCancellationPolicy && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "10px" }, children: [
|
|
4920
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4921
|
+
"h4",
|
|
4922
|
+
{
|
|
4923
|
+
style: {
|
|
4924
|
+
fontSize: "14px",
|
|
4925
|
+
fontWeight: 700,
|
|
4926
|
+
color: emailTokens.foreground,
|
|
4927
|
+
margin: "0 0 8px 0"
|
|
4928
|
+
},
|
|
4929
|
+
children: l.cancellationPolicyHeading
|
|
4930
|
+
}
|
|
4931
|
+
),
|
|
4932
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4933
|
+
"div",
|
|
4934
|
+
{
|
|
4935
|
+
style: {
|
|
4936
|
+
fontSize: "14px",
|
|
4937
|
+
color: emailTokens.bodyText,
|
|
4938
|
+
lineHeight: "1.4",
|
|
4939
|
+
margin: 0
|
|
4940
|
+
},
|
|
4941
|
+
dangerouslySetInnerHTML: { __html: cancellationPolicy }
|
|
4942
|
+
}
|
|
4943
|
+
)
|
|
4944
|
+
] }),
|
|
4894
4945
|
hasLineItems && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "4px" }, children: [
|
|
4895
4946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4896
4947
|
"hr",
|
|
@@ -5283,6 +5334,7 @@ var DEFAULT_LABELS3 = {
|
|
|
5283
5334
|
itineraryLabel: "Details",
|
|
5284
5335
|
includedLabel: "O que est\xE1 incluso",
|
|
5285
5336
|
notIncludedLabel: "O que n\xE3o est\xE1 incluso",
|
|
5337
|
+
cancellationPolicyLabel: "Cancellation policy",
|
|
5286
5338
|
pricingLabel: "Pricing",
|
|
5287
5339
|
subtotalLabel: "Subtotal",
|
|
5288
5340
|
totalLabel: "Total",
|
|
@@ -5461,6 +5513,7 @@ function BookingPaymentConfirmationEmail({
|
|
|
5461
5513
|
partner: adventure.partnerName,
|
|
5462
5514
|
included: adventure.included,
|
|
5463
5515
|
notIncluded: adventure.notIncluded,
|
|
5516
|
+
cancellationPolicy: adventure.cancellationPolicy,
|
|
5464
5517
|
lineItems: lineItemsToPass,
|
|
5465
5518
|
subtotal: adventure.subtotal,
|
|
5466
5519
|
rooms: adventure.rooms,
|
|
@@ -5472,6 +5525,7 @@ function BookingPaymentConfirmationEmail({
|
|
|
5472
5525
|
subtotalLabel: l.subtotalLabel,
|
|
5473
5526
|
includedHeading: l.includedLabel,
|
|
5474
5527
|
notIncludedHeading: l.notIncludedLabel,
|
|
5528
|
+
cancellationPolicyHeading: l.cancellationPolicyLabel,
|
|
5475
5529
|
childBadge: l.childBadge,
|
|
5476
5530
|
adultsUnit: l.adultsUnit,
|
|
5477
5531
|
childrenUnit: l.childrenUnit,
|
|
@@ -10429,9 +10483,15 @@ function CancellationForm({
|
|
|
10429
10483
|
] })
|
|
10430
10484
|
] }),
|
|
10431
10485
|
selected && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 pl-7 space-y-4", children: [
|
|
10432
|
-
adv.cancellationPolicy && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md bg-muted/50 border border-border p-3", children: [
|
|
10486
|
+
adv.cancellationPolicy && adv.cancellationPolicy.trim() && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md bg-muted/50 border border-border p-3", children: [
|
|
10433
10487
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-ui font-semibold uppercase tracking-wide text-muted-foreground mb-1", children: labels.policyHeading }),
|
|
10434
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10488
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10489
|
+
"div",
|
|
10490
|
+
{
|
|
10491
|
+
className: "text-sm text-foreground [&_ul]:list-disc [&_ul]:pl-5 [&_ol]:list-decimal [&_ol]:pl-5 [&_li]:mb-1 [&_p]:mb-2 [&_p:last-child]:mb-0 [&_a]:underline",
|
|
10492
|
+
dangerouslySetInnerHTML: { __html: adv.cancellationPolicy }
|
|
10493
|
+
}
|
|
10494
|
+
)
|
|
10435
10495
|
] }),
|
|
10436
10496
|
adv.participants.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10437
10497
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-ui font-semibold uppercase tracking-wide text-muted-foreground mb-2", children: labels.participantsHeading }),
|
|
@@ -11637,7 +11697,7 @@ function Picture(_a) {
|
|
|
11637
11697
|
var _a2, _b2;
|
|
11638
11698
|
const ref = React20__namespace.useRef(null);
|
|
11639
11699
|
const [visible, setVisible] = React20__namespace.useState(eager);
|
|
11640
|
-
const [loaded, setLoaded] = React20__namespace.useState(
|
|
11700
|
+
const [loaded, setLoaded] = React20__namespace.useState(eager);
|
|
11641
11701
|
React20__namespace.useEffect(() => {
|
|
11642
11702
|
if (eager || visible) return;
|
|
11643
11703
|
const el = ref.current;
|
|
@@ -11657,7 +11717,10 @@ function Picture(_a) {
|
|
|
11657
11717
|
io.observe(el);
|
|
11658
11718
|
return () => io.disconnect();
|
|
11659
11719
|
}, [eager, visible, rootMargin]);
|
|
11720
|
+
const prevSrcRef = React20__namespace.useRef(src);
|
|
11660
11721
|
React20__namespace.useEffect(() => {
|
|
11722
|
+
if (prevSrcRef.current === src) return;
|
|
11723
|
+
prevSrcRef.current = src;
|
|
11661
11724
|
setLoaded(false);
|
|
11662
11725
|
}, [src]);
|
|
11663
11726
|
const webp = webpVariantUrl(src);
|