@voyantjs/flights-ui 0.54.0 → 0.55.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.
|
@@ -49,14 +49,16 @@ function BaggageLegSection({ legLabel, catalog, offer, passengers, sliceIndex, v
|
|
|
49
49
|
}) })] }));
|
|
50
50
|
}
|
|
51
51
|
function PaxBaggageRow({ pax, options, selectedOptionId, onSelect, messages, }) {
|
|
52
|
-
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx(Label, { className: "font-medium text-sm", children: pax.label }), selectedOptionId == null && (_jsx("span", { className: "text-[11px] text-muted-foreground", children: messages.flightBaggageStep.noCheckedBag }))] }),
|
|
53
|
-
const isSelected = selectedOptionId === opt.id;
|
|
54
|
-
return (_jsxs("button", { type: "button", onClick: () => onSelect(isSelected ? null : opt.id), className: cn("relative flex flex-col items-center justify-center gap-1.5 rounded-lg border bg-card p-3 text-center transition-colors", isSelected
|
|
52
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx(Label, { className: "font-medium text-sm", children: pax.label }), selectedOptionId == null && (_jsx("span", { className: "text-[11px] text-muted-foreground", children: messages.flightBaggageStep.noCheckedBag }))] }), _jsxs("div", { className: "grid grid-cols-2 gap-2 md:grid-cols-5", children: [_jsxs("button", { type: "button", onClick: () => onSelect(null), className: cn("relative flex flex-col items-center justify-center gap-1.5 rounded-lg border bg-card p-3 text-center transition-colors", selectedOptionId == null
|
|
55
53
|
? "border-primary ring-2 ring-primary/20"
|
|
56
|
-
: "hover:border-primary/40 hover:bg-accent/30"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
: "hover:border-primary/40 hover:bg-accent/30"), children: [selectedOptionId == null && (_jsx(CheckCircle2, { className: "absolute top-2 right-2 h-3.5 w-3.5 text-primary" })), _jsx(Briefcase, { className: "h-7 w-7 text-muted-foreground/70" }), _jsx("span", { className: "font-semibold text-base", children: messages.flightBaggageStep.noCheckedBag }), _jsx("span", { className: "font-mono text-[11px] text-muted-foreground", children: messages.common.included })] }), options.map((opt) => {
|
|
55
|
+
const isSelected = selectedOptionId === opt.id;
|
|
56
|
+
return (_jsxs("button", { type: "button", onClick: () => onSelect(isSelected ? null : opt.id), className: cn("relative flex flex-col items-center justify-center gap-1.5 rounded-lg border bg-card p-3 text-center transition-colors", isSelected
|
|
57
|
+
? "border-primary ring-2 ring-primary/20"
|
|
58
|
+
: "hover:border-primary/40 hover:bg-accent/30", opt.recommended && !isSelected && "border-primary/40"), children: [opt.recommended && (_jsx("span", { className: "-translate-y-1/2 absolute top-0 left-1/2 -translate-x-1/2 rounded-full bg-primary px-2 py-0.5 font-medium text-[9px] text-primary-foreground uppercase tracking-wider", children: messages.common.recommended })), isSelected && (_jsx(CheckCircle2, { className: "absolute top-2 right-2 h-3.5 w-3.5 text-primary" })), _jsx(Briefcase, { className: "h-7 w-7 text-muted-foreground" }), _jsx("span", { className: "font-semibold text-base", children: opt.weightKg ? `${opt.weightKg} kg` : opt.label }), _jsx("span", { className: "font-mono text-[11px] text-muted-foreground", children: opt.price.amount === "0.00"
|
|
59
|
+
? messages.common.included
|
|
60
|
+
: `+${formatMoney(opt.price.amount, opt.price.currency)}` })] }, opt.id));
|
|
61
|
+
})] })] }));
|
|
60
62
|
}
|
|
61
63
|
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
62
64
|
function buildPassengerRows(passengers, counts, messages) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/flights-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"@tanstack/react-table": "^8.0.0",
|
|
45
45
|
"react": "^19.0.0",
|
|
46
46
|
"react-dom": "^19.0.0",
|
|
47
|
-
"@voyantjs/crm-react": "0.
|
|
48
|
-
"@voyantjs/finance": "0.
|
|
49
|
-
"@voyantjs/flights": "0.
|
|
50
|
-
"@voyantjs/flights-react": "0.
|
|
51
|
-
"@voyantjs/checkout-ui": "0.
|
|
52
|
-
"@voyantjs/ui": "0.
|
|
47
|
+
"@voyantjs/crm-react": "0.55.1",
|
|
48
|
+
"@voyantjs/finance": "0.55.1",
|
|
49
|
+
"@voyantjs/flights": "0.55.1",
|
|
50
|
+
"@voyantjs/flights-react": "0.55.1",
|
|
51
|
+
"@voyantjs/checkout-ui": "0.55.1",
|
|
52
|
+
"@voyantjs/ui": "0.55.1"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@voyantjs/i18n": "0.
|
|
55
|
+
"@voyantjs/i18n": "0.55.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"react-dom": "^19.2.4",
|
|
65
65
|
"typescript": "^6.0.2",
|
|
66
66
|
"vitest": "^4.1.2",
|
|
67
|
-
"@voyantjs/crm-react": "0.
|
|
68
|
-
"@voyantjs/finance": "0.
|
|
69
|
-
"@voyantjs/flights": "0.
|
|
70
|
-
"@voyantjs/flights-react": "0.
|
|
71
|
-
"@voyantjs/checkout-ui": "0.
|
|
72
|
-
"@voyantjs/i18n": "0.
|
|
73
|
-
"@voyantjs/ui": "0.
|
|
67
|
+
"@voyantjs/crm-react": "0.55.1",
|
|
68
|
+
"@voyantjs/finance": "0.55.1",
|
|
69
|
+
"@voyantjs/flights": "0.55.1",
|
|
70
|
+
"@voyantjs/flights-react": "0.55.1",
|
|
71
|
+
"@voyantjs/checkout-ui": "0.55.1",
|
|
72
|
+
"@voyantjs/i18n": "0.55.1",
|
|
73
|
+
"@voyantjs/ui": "0.55.1",
|
|
74
74
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
75
75
|
},
|
|
76
76
|
"files": [
|