@planetaexo/design-system 0.17.0 → 0.19.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 +66 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -4
- package/dist/index.d.ts +57 -4
- package/dist/index.js +66 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1476,7 +1476,9 @@ function OfferSidebar({
|
|
|
1476
1476
|
onBook,
|
|
1477
1477
|
bookLabel,
|
|
1478
1478
|
bookDisabled,
|
|
1479
|
-
labels
|
|
1479
|
+
labels,
|
|
1480
|
+
bookHref,
|
|
1481
|
+
bookHrefLabel
|
|
1480
1482
|
}) {
|
|
1481
1483
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1482
1484
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
@@ -1485,7 +1487,18 @@ function OfferSidebar({
|
|
|
1485
1487
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs uppercase tracking-widest text-muted-foreground font-heading mb-1", children: (_a = labels == null ? void 0 : labels.bookingTotal) != null ? _a : "Booking Total" }),
|
|
1486
1488
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-black text-primary font-heading leading-none", children: total })
|
|
1487
1489
|
] }),
|
|
1488
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1490
|
+
bookHref ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1491
|
+
"a",
|
|
1492
|
+
{
|
|
1493
|
+
href: bookHref,
|
|
1494
|
+
className: cn(
|
|
1495
|
+
"w-full inline-flex items-center justify-center rounded-full bg-primary py-3 text-sm font-bold tracking-wide uppercase",
|
|
1496
|
+
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
1497
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
1498
|
+
),
|
|
1499
|
+
children: bookHrefLabel != null ? bookHrefLabel : bookLabel
|
|
1500
|
+
}
|
|
1501
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1489
1502
|
"button",
|
|
1490
1503
|
{
|
|
1491
1504
|
type: "button",
|
|
@@ -1930,19 +1943,37 @@ function BookingConfirmedCard({
|
|
|
1930
1943
|
email,
|
|
1931
1944
|
message,
|
|
1932
1945
|
onBack,
|
|
1933
|
-
backLabel = "Back to offer"
|
|
1946
|
+
backLabel = "Back to offer",
|
|
1947
|
+
bookingNumber,
|
|
1948
|
+
bookingNumberLabel = "Your booking number is:",
|
|
1949
|
+
viewBookingHref,
|
|
1950
|
+
viewBookingLabel = "VIEW BOOKING"
|
|
1934
1951
|
}) {
|
|
1952
|
+
const hasBookingNumber = bookingNumber !== void 0 && bookingNumber !== null && bookingNumber !== "";
|
|
1935
1953
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-8 flex flex-col items-center gap-6 text-center", children: [
|
|
1936
1954
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2Icon, { className: "w-10 h-10 text-primary" }) }),
|
|
1937
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1955
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
1938
1956
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-black text-foreground font-heading", children: title }),
|
|
1939
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1957
|
+
hasBookingNumber && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-foreground font-sans", children: [
|
|
1958
|
+
bookingNumberLabel,
|
|
1959
|
+
" ",
|
|
1960
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: bookingNumber })
|
|
1961
|
+
] }),
|
|
1962
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans max-w-sm mx-auto leading-relaxed", children: message != null ? message : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1940
1963
|
"A confirmation email has been sent to",
|
|
1941
1964
|
" ",
|
|
1942
1965
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: email || "your email" }),
|
|
1943
1966
|
". Our team will be in touch shortly."
|
|
1944
1967
|
] }) })
|
|
1945
1968
|
] }),
|
|
1969
|
+
viewBookingHref && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1970
|
+
"a",
|
|
1971
|
+
{
|
|
1972
|
+
href: viewBookingHref,
|
|
1973
|
+
className: "rounded-full bg-primary px-6 py-3 text-sm font-bold tracking-wide uppercase text-primary-foreground font-heading transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1974
|
+
children: viewBookingLabel
|
|
1975
|
+
}
|
|
1976
|
+
),
|
|
1946
1977
|
onBack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1947
1978
|
"button",
|
|
1948
1979
|
{
|
|
@@ -2224,11 +2255,12 @@ function Offer({
|
|
|
2224
2255
|
summaryDiscountLine,
|
|
2225
2256
|
continueDisabled,
|
|
2226
2257
|
labels,
|
|
2258
|
+
confirmedState,
|
|
2227
2259
|
className
|
|
2228
2260
|
}) {
|
|
2229
|
-
var _a, _b;
|
|
2261
|
+
var _a, _b, _c;
|
|
2230
2262
|
const [showBooking, setShowBooking] = React23__namespace.useState(false);
|
|
2231
|
-
const isShowingCheckout = !!checkoutSlot || showBooking;
|
|
2263
|
+
const isShowingCheckout = !confirmedState && (!!checkoutSlot || showBooking);
|
|
2232
2264
|
const handleBook = () => {
|
|
2233
2265
|
if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
|
|
2234
2266
|
onContinue == null ? void 0 : onContinue();
|
|
@@ -2238,11 +2270,25 @@ function Offer({
|
|
|
2238
2270
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
|
|
2239
2271
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
|
|
2240
2272
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-6 lg:gap-8 items-start", children: [
|
|
2241
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2273
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-6", children: confirmedState ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2274
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2275
|
+
BookingConfirmedCard,
|
|
2276
|
+
{
|
|
2277
|
+
title: (_a = confirmedState.title) != null ? _a : labels == null ? void 0 : labels.bookingConfirmed,
|
|
2278
|
+
email: confirmedState.email,
|
|
2279
|
+
message: confirmedState.message,
|
|
2280
|
+
bookingNumber: confirmedState.bookingNumber,
|
|
2281
|
+
bookingNumberLabel: confirmedState.bookingNumberLabel,
|
|
2282
|
+
viewBookingHref: confirmedState.viewBookingHref,
|
|
2283
|
+
viewBookingLabel: confirmedState.viewBookingLabel
|
|
2284
|
+
}
|
|
2285
|
+
),
|
|
2286
|
+
confirmedState.belowSlot
|
|
2287
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2242
2288
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2243
2289
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2244
2290
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
2245
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (
|
|
2291
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (_b = labels == null ? void 0 : labels.includedAdventures) != null ? _b : "Included Adventures" })
|
|
2246
2292
|
] }),
|
|
2247
2293
|
adventures.map((adventure) => /* @__PURE__ */ jsxRuntime.jsx(AdventureCard, { adventure, labels }, adventure.id))
|
|
2248
2294
|
] }),
|
|
@@ -2271,7 +2317,7 @@ function Offer({
|
|
|
2271
2317
|
labels
|
|
2272
2318
|
}
|
|
2273
2319
|
))
|
|
2274
|
-
] }),
|
|
2320
|
+
] }) }),
|
|
2275
2321
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2276
2322
|
OfferSidebar,
|
|
2277
2323
|
{
|
|
@@ -2280,13 +2326,15 @@ function Offer({
|
|
|
2280
2326
|
onBook: handleBook,
|
|
2281
2327
|
bookLabel: continueLabel,
|
|
2282
2328
|
bookDisabled: continueDisabled,
|
|
2283
|
-
labels
|
|
2329
|
+
labels,
|
|
2330
|
+
bookHref: confirmedState == null ? void 0 : confirmedState.viewBookingHref,
|
|
2331
|
+
bookHrefLabel: confirmedState == null ? void 0 : confirmedState.viewBookingLabel
|
|
2284
2332
|
}
|
|
2285
2333
|
) })
|
|
2286
2334
|
] }),
|
|
2287
|
-
!isShowingCheckout && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed bottom-0 inset-x-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm px-4 py-3 lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
|
|
2335
|
+
!isShowingCheckout && !confirmedState && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed bottom-0 inset-x-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm px-4 py-3 lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
|
|
2288
2336
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
2289
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (
|
|
2337
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (_c = labels == null ? void 0 : labels.total) != null ? _c : "Total" }),
|
|
2290
2338
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
|
|
2291
2339
|
] }),
|
|
2292
2340
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2294,10 +2342,12 @@ function Offer({
|
|
|
2294
2342
|
{
|
|
2295
2343
|
type: "button",
|
|
2296
2344
|
onClick: handleBook,
|
|
2345
|
+
disabled: continueDisabled,
|
|
2297
2346
|
className: cn(
|
|
2298
2347
|
"rounded-full bg-primary px-6 py-3 text-sm font-bold tracking-wide uppercase",
|
|
2299
2348
|
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
2300
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
2349
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2350
|
+
continueDisabled && "opacity-50 pointer-events-none"
|
|
2301
2351
|
),
|
|
2302
2352
|
children: continueLabel
|
|
2303
2353
|
}
|
|
@@ -6066,6 +6116,7 @@ function RegistrationSuccessCard({
|
|
|
6066
6116
|
actions,
|
|
6067
6117
|
logo,
|
|
6068
6118
|
logoAlt = "PlanetaEXO",
|
|
6119
|
+
showSuccessIcon,
|
|
6069
6120
|
terms,
|
|
6070
6121
|
termsLayout = "summary",
|
|
6071
6122
|
termsLabels,
|
|
@@ -6119,7 +6170,7 @@ function RegistrationSuccessCard({
|
|
|
6119
6170
|
className: "h-10 w-auto object-contain"
|
|
6120
6171
|
}
|
|
6121
6172
|
),
|
|
6122
|
-
logo === void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckIcon, { size: 28 }) }),
|
|
6173
|
+
(showSuccessIcon != null ? showSuccessIcon : logo === void 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckIcon, { size: 28 }) }),
|
|
6123
6174
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
|
|
6124
6175
|
message && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-ui", children: message })
|
|
6125
6176
|
] }),
|