@planetaexo/design-system 0.3.11 → 0.3.13
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 +124 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +124 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -499,8 +499,8 @@ var FloatingInput = React19__namespace.forwardRef(
|
|
|
499
499
|
ref,
|
|
500
500
|
placeholder: " ",
|
|
501
501
|
className: cn(
|
|
502
|
-
"peer block w-full rounded-lg border border-border bg-background",
|
|
503
|
-
"px-3 pt-
|
|
502
|
+
"peer block w-full h-14 rounded-lg border border-border bg-background",
|
|
503
|
+
"px-3 pt-6 pb-2 text-base text-foreground font-ui",
|
|
504
504
|
"transition-colors placeholder-transparent",
|
|
505
505
|
"focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
506
506
|
error && "border-destructive focus:border-destructive focus:ring-destructive"
|
|
@@ -516,8 +516,8 @@ var FloatingInput = React19__namespace.forwardRef(
|
|
|
516
516
|
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
|
|
517
517
|
"text-base text-muted-foreground font-ui transition-all duration-150",
|
|
518
518
|
/* When peer has content or is focused, float up */
|
|
519
|
-
"peer-focus:top-
|
|
520
|
-
"peer-not-placeholder-shown:top-
|
|
519
|
+
"peer-focus:top-2 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
|
|
520
|
+
"peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
|
|
521
521
|
),
|
|
522
522
|
children: [
|
|
523
523
|
label,
|
|
@@ -541,8 +541,8 @@ var FloatingSelect = React19__namespace.forwardRef(
|
|
|
541
541
|
id: inputId,
|
|
542
542
|
ref,
|
|
543
543
|
className: cn(
|
|
544
|
-
"peer block w-full appearance-none rounded-lg border border-border bg-background",
|
|
545
|
-
"px-3 pt-
|
|
544
|
+
"peer block w-full h-14 appearance-none rounded-lg border border-border bg-background",
|
|
545
|
+
"px-3 pt-6 pb-2 text-base text-foreground font-ui",
|
|
546
546
|
"transition-colors",
|
|
547
547
|
"focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
548
548
|
error && "border-destructive"
|
|
@@ -572,8 +572,8 @@ var FloatingSelect = React19__namespace.forwardRef(
|
|
|
572
572
|
className: cn(
|
|
573
573
|
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
|
|
574
574
|
"text-base text-muted-foreground font-ui transition-all duration-150",
|
|
575
|
-
"peer-focus:top-
|
|
576
|
-
"peer-not-placeholder-shown:top-
|
|
575
|
+
"peer-focus:top-2 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
|
|
576
|
+
"peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs"
|
|
577
577
|
),
|
|
578
578
|
children: [
|
|
579
579
|
label,
|
|
@@ -1110,8 +1110,27 @@ function CountrySearchField({
|
|
|
1110
1110
|
] })
|
|
1111
1111
|
] });
|
|
1112
1112
|
}
|
|
1113
|
+
var VARIANT_STYLES = {
|
|
1114
|
+
error: "text-destructive border-destructive/30 bg-destructive/5",
|
|
1115
|
+
warning: "text-amber-400 border-amber-500/30 bg-amber-500/10",
|
|
1116
|
+
success: "text-primary border-primary/30 bg-primary/10",
|
|
1117
|
+
info: "text-muted-foreground border-primary/25 bg-primary/5"
|
|
1118
|
+
};
|
|
1119
|
+
function Alert({ variant = "info", children, className }) {
|
|
1120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1121
|
+
"div",
|
|
1122
|
+
{
|
|
1123
|
+
className: cn(
|
|
1124
|
+
"rounded-lg border px-3 py-2 text-sm font-sans leading-snug",
|
|
1125
|
+
VARIANT_STYLES[variant],
|
|
1126
|
+
className
|
|
1127
|
+
),
|
|
1128
|
+
children
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1113
1132
|
function AdventureCard({ adventure }) {
|
|
1114
|
-
var _a, _b, _c, _d, _e;
|
|
1133
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1115
1134
|
const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
|
|
1116
1135
|
const [checkedInternal, setCheckedInternal] = React19__namespace.useState(
|
|
1117
1136
|
new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
|
|
@@ -1198,11 +1217,32 @@ function AdventureCard({ adventure }) {
|
|
|
1198
1217
|
opt.id
|
|
1199
1218
|
)) })
|
|
1200
1219
|
] }),
|
|
1201
|
-
adventure.description && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1220
|
+
(adventure.description || adventure.detailsSlot) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1202
1221
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
|
|
1203
1222
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1204
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-
|
|
1205
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-relaxed font-sans", children: adventure.description })
|
|
1223
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-3", children: (_f = adventure.itineraryLabel) != null ? _f : "Itinerary" }),
|
|
1224
|
+
adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-relaxed font-sans", children: adventure.description }),
|
|
1225
|
+
adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
1226
|
+
"text-foreground",
|
|
1227
|
+
// Base paragraph and heading styles
|
|
1228
|
+
"[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-relaxed [&_p]:mb-2",
|
|
1229
|
+
"[&_h2]:text-xl [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
1230
|
+
"[&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
1231
|
+
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
1232
|
+
"[&_em]:italic",
|
|
1233
|
+
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
1234
|
+
"[&_blockquote]:border-l-2 [&_blockquote]:border-primary [&_blockquote]:pl-3 [&_blockquote]:italic [&_blockquote]:text-muted-foreground [&_blockquote]:my-2",
|
|
1235
|
+
// Standard lists
|
|
1236
|
+
"[&_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",
|
|
1237
|
+
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
1238
|
+
"[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-relaxed",
|
|
1239
|
+
// Check list (✓)
|
|
1240
|
+
"[&_.list-check]:list-none [&_.list-check]:pl-5 [&_.list-check]:space-y-1",
|
|
1241
|
+
"[&_.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",
|
|
1242
|
+
// Cross list (✗)
|
|
1243
|
+
"[&_.list-cross]:list-none [&_.list-cross]:pl-5 [&_.list-cross]:space-y-1",
|
|
1244
|
+
"[&_.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"
|
|
1245
|
+
), children: adventure.detailsSlot })
|
|
1206
1246
|
] })
|
|
1207
1247
|
] }),
|
|
1208
1248
|
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
|
|
@@ -1225,10 +1265,6 @@ function AdventureCard({ adventure }) {
|
|
|
1225
1265
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary shrink-0 mt-2.5" }),
|
|
1226
1266
|
item
|
|
1227
1267
|
] }, i)) })
|
|
1228
|
-
] }),
|
|
1229
|
-
adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1230
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
|
|
1231
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3 text-foreground", children: adventure.detailsSlot })
|
|
1232
1268
|
] })
|
|
1233
1269
|
] })
|
|
1234
1270
|
] });
|
|
@@ -1552,8 +1588,8 @@ function BookingShell({
|
|
|
1552
1588
|
] }),
|
|
1553
1589
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 flex flex-col gap-5", children: [
|
|
1554
1590
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children }),
|
|
1555
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1556
|
-
successMessage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1591
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "error", children: error }),
|
|
1592
|
+
successMessage && /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "success", children: successMessage }),
|
|
1557
1593
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1558
1594
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1559
1595
|
currentStep > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1584,7 +1620,7 @@ function BookingShell({
|
|
|
1584
1620
|
}
|
|
1585
1621
|
)
|
|
1586
1622
|
] }),
|
|
1587
|
-
nextDisabled && nextBlockedMessage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1623
|
+
nextDisabled && nextBlockedMessage && /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "warning", children: nextBlockedMessage }),
|
|
1588
1624
|
currentStep === 0 && onCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1589
1625
|
"button",
|
|
1590
1626
|
{
|
|
@@ -6465,25 +6501,6 @@ function ActivityCard({
|
|
|
6465
6501
|
}
|
|
6466
6502
|
);
|
|
6467
6503
|
}
|
|
6468
|
-
var VARIANT_STYLES = {
|
|
6469
|
-
error: "text-destructive border-destructive/30 bg-destructive/5",
|
|
6470
|
-
warning: "text-amber-400 border-amber-500/30 bg-amber-500/10",
|
|
6471
|
-
success: "text-primary border-primary/30 bg-primary/10",
|
|
6472
|
-
info: "text-muted-foreground border-primary/25 bg-primary/5"
|
|
6473
|
-
};
|
|
6474
|
-
function Alert({ variant = "info", children, className }) {
|
|
6475
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6476
|
-
"div",
|
|
6477
|
-
{
|
|
6478
|
-
className: cn(
|
|
6479
|
-
"rounded-lg border px-3 py-2 text-sm font-sans leading-snug",
|
|
6480
|
-
VARIANT_STYLES[variant],
|
|
6481
|
-
className
|
|
6482
|
-
),
|
|
6483
|
-
children
|
|
6484
|
-
}
|
|
6485
|
-
);
|
|
6486
|
-
}
|
|
6487
6504
|
function PaymentModalShell({
|
|
6488
6505
|
open,
|
|
6489
6506
|
title,
|
|
@@ -6712,8 +6729,75 @@ var DARK = {
|
|
|
6712
6729
|
}
|
|
6713
6730
|
}
|
|
6714
6731
|
};
|
|
6715
|
-
function getStripeAppearance(isDark = false) {
|
|
6716
|
-
|
|
6732
|
+
function getStripeAppearance(isDark = false, tokens) {
|
|
6733
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6734
|
+
const base = isDark ? DARK : LIGHT;
|
|
6735
|
+
if (!tokens) return base;
|
|
6736
|
+
const t = {
|
|
6737
|
+
primary: (_a = tokens.primary) != null ? _a : base.variables.colorPrimary,
|
|
6738
|
+
background: (_b = tokens.background) != null ? _b : base.variables.colorBackground,
|
|
6739
|
+
card: (_c = tokens.card) != null ? _c : base.variables.colorBackground,
|
|
6740
|
+
foreground: (_d = tokens.foreground) != null ? _d : base.variables.colorText,
|
|
6741
|
+
muted: (_e = tokens.muted) != null ? _e : base.variables.colorTextPlaceholder,
|
|
6742
|
+
border: (_f = tokens.border) != null ? _f : isDark ? "rgba(255,255,255,0.10)" : "#e3eeeb",
|
|
6743
|
+
destructive: (_g = tokens.destructive) != null ? _g : base.variables.colorDanger
|
|
6744
|
+
};
|
|
6745
|
+
return __spreadProps(__spreadValues({}, base), {
|
|
6746
|
+
variables: __spreadProps(__spreadValues({}, base.variables), {
|
|
6747
|
+
colorPrimary: t.primary,
|
|
6748
|
+
colorBackground: t.card,
|
|
6749
|
+
colorText: t.foreground,
|
|
6750
|
+
colorTextPlaceholder: t.muted,
|
|
6751
|
+
colorIcon: t.muted,
|
|
6752
|
+
colorIconTab: t.muted,
|
|
6753
|
+
colorIconTabSelected: t.primary,
|
|
6754
|
+
colorIconTabHover: t.foreground,
|
|
6755
|
+
colorDanger: t.destructive
|
|
6756
|
+
}),
|
|
6757
|
+
rules: __spreadProps(__spreadValues({}, base.rules), {
|
|
6758
|
+
".Input": __spreadProps(__spreadValues({}, base.rules[".Input"]), {
|
|
6759
|
+
border: `1px solid ${t.border}`,
|
|
6760
|
+
backgroundColor: t.background,
|
|
6761
|
+
color: t.foreground
|
|
6762
|
+
}),
|
|
6763
|
+
".Input:focus": {
|
|
6764
|
+
border: `1px solid ${t.primary}`,
|
|
6765
|
+
boxShadow: `0 0 0 2px color-mix(in srgb, ${t.primary} 20%, transparent)`,
|
|
6766
|
+
outline: "none"
|
|
6767
|
+
},
|
|
6768
|
+
".Input--invalid": {
|
|
6769
|
+
border: `1px solid ${t.destructive}`,
|
|
6770
|
+
boxShadow: `0 0 0 2px color-mix(in srgb, ${t.destructive} 15%, transparent)`
|
|
6771
|
+
},
|
|
6772
|
+
".Label": __spreadProps(__spreadValues({}, base.rules[".Label"]), {
|
|
6773
|
+
color: t.muted
|
|
6774
|
+
}),
|
|
6775
|
+
".Error": {
|
|
6776
|
+
color: t.destructive,
|
|
6777
|
+
fontSize: "12px"
|
|
6778
|
+
},
|
|
6779
|
+
".Tab": __spreadProps(__spreadValues({}, base.rules[".Tab"]), {
|
|
6780
|
+
border: `1px solid ${t.border}`,
|
|
6781
|
+
backgroundColor: t.background,
|
|
6782
|
+
color: t.muted
|
|
6783
|
+
}),
|
|
6784
|
+
".Tab:hover": {
|
|
6785
|
+
color: t.foreground,
|
|
6786
|
+
border: `1px solid ${t.primary}`
|
|
6787
|
+
},
|
|
6788
|
+
".Tab--selected": {
|
|
6789
|
+
border: `1px solid ${t.primary}`,
|
|
6790
|
+
backgroundColor: `color-mix(in srgb, ${t.primary} 8%, transparent)`,
|
|
6791
|
+
color: t.foreground,
|
|
6792
|
+
boxShadow: "none"
|
|
6793
|
+
},
|
|
6794
|
+
".TabLabel--selected": { color: t.foreground },
|
|
6795
|
+
".TabIcon--selected": { fill: t.primary },
|
|
6796
|
+
".Block": __spreadProps(__spreadValues({}, base.rules[".Block"]), {
|
|
6797
|
+
border: `1px solid ${t.border}`
|
|
6798
|
+
})
|
|
6799
|
+
})
|
|
6800
|
+
});
|
|
6717
6801
|
}
|
|
6718
6802
|
var stripeAppearance = LIGHT;
|
|
6719
6803
|
function Input(_a) {
|