@planetaexo/design-system 0.9.0 → 0.9.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 +40 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +40 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2276,6 +2276,7 @@ function AdventureSection({
|
|
|
2276
2276
|
onAddSuggestedTraveller,
|
|
2277
2277
|
onAddTraveller,
|
|
2278
2278
|
onUnassignFromAdventure,
|
|
2279
|
+
onCopyFormLink,
|
|
2279
2280
|
hasSubmitAddTraveller,
|
|
2280
2281
|
hasSubmitEditTraveller,
|
|
2281
2282
|
hasConfirmRemoveTraveller,
|
|
@@ -2287,7 +2288,11 @@ function AdventureSection({
|
|
|
2287
2288
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2288
2289
|
const [detailsOpen, setDetailsOpen] = React22__namespace.useState(false);
|
|
2289
2290
|
const handleCopyUrl = (url) => {
|
|
2290
|
-
|
|
2291
|
+
if (onCopyFormLink) {
|
|
2292
|
+
onCopyFormLink(url);
|
|
2293
|
+
} else {
|
|
2294
|
+
void navigator.clipboard.writeText(url);
|
|
2295
|
+
}
|
|
2291
2296
|
};
|
|
2292
2297
|
const people = adventure.slots;
|
|
2293
2298
|
[
|
|
@@ -2590,24 +2595,38 @@ function AdventureSection({
|
|
|
2590
2595
|
t.id
|
|
2591
2596
|
);
|
|
2592
2597
|
}) }),
|
|
2593
|
-
adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 &&
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2598
|
+
adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 && (() => {
|
|
2599
|
+
var _a2;
|
|
2600
|
+
const atCapacity = totalSlots > 0 && adventure.travellers.length >= totalSlots;
|
|
2601
|
+
const atCapacityTooltip = atCapacity ? (_a2 = adventure.atCapacityLabel) != null ? _a2 : "Adventure full" : void 0;
|
|
2602
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
|
|
2603
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-ui", children: "Add to this adventure" }),
|
|
2604
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: adventure.suggestedTravellers.map((st) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2605
|
+
"button",
|
|
2606
|
+
{
|
|
2607
|
+
type: "button",
|
|
2608
|
+
onClick: () => {
|
|
2609
|
+
if (atCapacity) return;
|
|
2610
|
+
onAddSuggestedTraveller == null ? void 0 : onAddSuggestedTraveller(adventure.id, st.id);
|
|
2611
|
+
},
|
|
2612
|
+
disabled: atCapacity,
|
|
2613
|
+
title: atCapacityTooltip,
|
|
2614
|
+
"aria-disabled": atCapacity,
|
|
2615
|
+
className: cn(
|
|
2616
|
+
"flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-foreground hover:border-primary hover:text-primary hover:bg-primary/5 transition-colors",
|
|
2617
|
+
"disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:border-border disabled:hover:text-foreground disabled:hover:bg-transparent"
|
|
2618
|
+
),
|
|
2619
|
+
children: [
|
|
2620
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
|
|
2621
|
+
st.firstName,
|
|
2622
|
+
" ",
|
|
2623
|
+
st.lastName
|
|
2624
|
+
]
|
|
2625
|
+
},
|
|
2626
|
+
st.id
|
|
2627
|
+
)) })
|
|
2628
|
+
] });
|
|
2629
|
+
})(),
|
|
2611
2630
|
adventure.travellers.length > 0 && totalSlots > 0 && (() => {
|
|
2612
2631
|
const completed = adventure.travellers.filter((t) => t.status === "completed").length;
|
|
2613
2632
|
const percent = Math.round(completed / totalSlots * 100);
|
|
@@ -3062,6 +3081,7 @@ function BookingDetails({
|
|
|
3062
3081
|
onAddSuggestedTraveller,
|
|
3063
3082
|
onAddTraveller,
|
|
3064
3083
|
onUnassignFromAdventure,
|
|
3084
|
+
onCopyFormLink,
|
|
3065
3085
|
onSubmitAddTraveller,
|
|
3066
3086
|
onSubmitEditTraveller,
|
|
3067
3087
|
onConfirmRemoveTraveller,
|
|
@@ -3274,6 +3294,7 @@ function BookingDetails({
|
|
|
3274
3294
|
onAddSuggestedTraveller,
|
|
3275
3295
|
onAddTraveller,
|
|
3276
3296
|
onUnassignFromAdventure,
|
|
3297
|
+
onCopyFormLink,
|
|
3277
3298
|
hasSubmitAddTraveller,
|
|
3278
3299
|
hasSubmitEditTraveller,
|
|
3279
3300
|
hasConfirmRemoveTraveller,
|