@clubmed/trident-ui 2.0.0-beta.74 → 2.0.0-beta.76
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/examples/chapters-demo.d.ts +1 -0
- package/examples/chapters-demo.js +46 -0
- package/examples/chapters-demo.js.map +1 -0
- package/examples/criteria-transports-b2b-demo.d.ts +1 -1
- package/examples/criteria-transports-b2b-demo.js +100 -33
- package/examples/criteria-transports-b2b-demo.js.map +1 -1
- package/examples/criteria-transports-demo.js +209 -20
- package/examples/criteria-transports-demo.js.map +1 -1
- package/examples/promises-demo.d.ts +1 -0
- package/examples/promises-demo.js +50 -0
- package/examples/promises-demo.js.map +1 -0
- package/examples/sparkle-wrapper-demo.d.ts +1 -0
- package/examples/sparkle-wrapper-demo.js +34 -0
- package/examples/sparkle-wrapper-demo.js.map +1 -0
- package/package.json +1 -1
- package/styles/animate.css +19 -0
- package/styles/theme.css +1 -0
- package/ui/Chapters/Chapter.d.ts +7 -0
- package/ui/Chapters/Chapter.js +36 -0
- package/ui/Chapters/Chapter.js.map +1 -0
- package/ui/Chapters/ChapterTitle.d.ts +14 -0
- package/ui/Chapters/ChapterTitle.js +35 -0
- package/ui/Chapters/ChapterTitle.js.map +1 -0
- package/ui/Chapters/Chapters.d.ts +15 -0
- package/ui/Chapters/Chapters.js +42 -0
- package/ui/Chapters/Chapters.js.map +1 -0
- package/ui/Chapters/Chapters.themes.d.ts +9 -0
- package/ui/Chapters/Chapters.themes.js +65 -0
- package/ui/Chapters/Chapters.themes.js.map +1 -0
- package/ui/Chapters/ChaptersSummary.d.ts +17 -0
- package/ui/Chapters/ChaptersSummary.js +29 -0
- package/ui/Chapters/ChaptersSummary.js.map +1 -0
- package/ui/ElasticHeight.js +1 -0
- package/ui/ElasticHeight.js.map +1 -1
- package/ui/Promises/Promises.d.ts +26 -0
- package/ui/Promises/Promises.js +42 -0
- package/ui/Promises/Promises.js.map +1 -0
- package/ui/Promises/PromisesMedia.d.ts +12 -0
- package/ui/Promises/PromisesMedia.js +64 -0
- package/ui/Promises/PromisesMedia.js.map +1 -0
- package/ui/Promises/PromisesMenu.d.ts +11 -0
- package/ui/Promises/PromisesMenu.js +154 -0
- package/ui/Promises/PromisesMenu.js.map +1 -0
- package/ui/SparkleWrapper.d.ts +5 -0
- package/ui/SparkleWrapper.js +56 -0
- package/ui/SparkleWrapper.js.map +1 -0
- package/ui/criteria/CriteriaTransports.d.ts +36 -55
- package/ui/criteria/CriteriaTransports.js +256 -206
- package/ui/criteria/CriteriaTransports.js.map +1 -1
- package/ui/forms/NumberField.d.ts +23 -23
- package/examples/criteria-transports-b2c-demo.d.ts +0 -1
- package/examples/criteria-transports-b2c-demo.js +0 -37
- package/examples/criteria-transports-b2c-demo.js.map +0 -1
- package/examples/criteria-transports-data.d.ts +0 -7
- package/examples/criteria-transports-data.js +0 -151
- package/examples/criteria-transports-data.js.map +0 -1
- package/examples/criteria-transports-error-demo.d.ts +0 -1
- package/examples/criteria-transports-error-demo.js +0 -29
- package/examples/criteria-transports-error-demo.js.map +0 -1
|
@@ -2,223 +2,273 @@
|
|
|
2
2
|
import { t as e } from "../../chunks/clsx.js";
|
|
3
3
|
import { ElasticHeight as t } from "../ElasticHeight.js";
|
|
4
4
|
import { Button as n } from "../buttons/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
13
|
-
import { Icon as m } from "@clubmed/trident-icons";
|
|
5
|
+
import { Switch as r } from "../forms/Switch.js";
|
|
6
|
+
import { Radio as i } from "../forms/radios/Radio.js";
|
|
7
|
+
import { RadioSelect as a } from "../forms/RadioSelect.js";
|
|
8
|
+
import { TextField as o } from "../forms/TextField.js";
|
|
9
|
+
import { forwardRef as s, useId as c, useRef as l } from "react";
|
|
10
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
import { Icon as p } from "@clubmed/trident-icons";
|
|
14
12
|
//#region lib/ui/criteria/CriteriaTransports.tsx
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
var m = s(({ airport: t, selected: n, onSelect: r, tabIndex: i = 0, onKeyDown: a, small: o = !0 }, s) => /* @__PURE__ */ f("div", {
|
|
14
|
+
ref: s,
|
|
15
|
+
role: "option",
|
|
16
|
+
"aria-selected": n,
|
|
17
|
+
tabIndex: i,
|
|
18
|
+
className: e("flex w-full cursor-pointer justify-between gap-12 text-left bg-white text-black transition-all aria-selected:invert", o ? "text-b4 px-8 py-4 rounded-8 items-center" : "text-b3 p-12 rounded-16 items-start"),
|
|
19
|
+
onClick: () => r(n ? null : t.code),
|
|
20
|
+
onKeyDown: (e) => {
|
|
21
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(n ? null : t.code)), a?.(e);
|
|
22
|
+
},
|
|
23
|
+
children: [/* @__PURE__ */ d("span", {
|
|
24
|
+
className: "font-normal",
|
|
25
|
+
children: t.name
|
|
26
|
+
}), /* @__PURE__ */ d("span", {
|
|
27
|
+
className: e("text-inherit shrink-0 transition-all duration-300 in-[[aria-selected=true]]:opacity-100 in-[[aria-selected=false]]:opacity-0"),
|
|
28
|
+
children: /* @__PURE__ */ d(p, {
|
|
29
|
+
"aria-hidden": !0,
|
|
30
|
+
name: "CheckDefault",
|
|
31
|
+
width: "24px",
|
|
32
|
+
className: "shrink-0"
|
|
33
|
+
})
|
|
34
|
+
})]
|
|
35
|
+
})), h = ({ label: e, airports: t, selectedCode: n, onSelect: r }) => {
|
|
36
|
+
let i = c(), a = l([]), o = t.findIndex((e) => e.code === n), s = o >= 0 ? o : 0, u = (e, n) => {
|
|
37
|
+
let r = n;
|
|
38
|
+
if (e.key === "ArrowDown") r = Math.min(n + 1, t.length - 1);
|
|
39
|
+
else if (e.key === "ArrowUp") r = Math.max(n - 1, 0);
|
|
40
|
+
else return;
|
|
41
|
+
e.preventDefault(), a.current[r]?.focus();
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ f("div", {
|
|
44
|
+
className: "flex flex-col gap-4",
|
|
45
|
+
children: [/* @__PURE__ */ d("div", {
|
|
46
|
+
className: "border-lightGrey border-b px-1 py-12",
|
|
47
|
+
children: /* @__PURE__ */ d("p", {
|
|
48
|
+
id: i,
|
|
49
|
+
className: "text-b3 font-semibold",
|
|
50
|
+
children: e
|
|
51
|
+
})
|
|
52
|
+
}), /* @__PURE__ */ d("div", {
|
|
53
|
+
role: "listbox",
|
|
54
|
+
"aria-labelledby": i,
|
|
55
|
+
className: "flex flex-col gap-4",
|
|
56
|
+
children: t.map((e, t) => /* @__PURE__ */ d(m, {
|
|
57
|
+
ref: (e) => {
|
|
58
|
+
a.current[t] = e;
|
|
59
|
+
},
|
|
60
|
+
airport: e,
|
|
61
|
+
selected: n === e.code,
|
|
62
|
+
onSelect: r,
|
|
63
|
+
tabIndex: t === s ? 0 : -1,
|
|
64
|
+
onKeyDown: (e) => u(e, t)
|
|
65
|
+
}, e.code))
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}, g = ({ title: e, description: t }) => /* @__PURE__ */ f("div", {
|
|
69
|
+
className: "rounded-16 border-lightGrey flex flex-col gap-20 border bg-white p-20 mb-20",
|
|
70
|
+
children: [/* @__PURE__ */ f("div", {
|
|
71
|
+
className: "flex items-center gap-20",
|
|
72
|
+
children: [/* @__PURE__ */ d("div", {
|
|
73
|
+
className: "bg-lightSand rounded-full flex shrink-0 items-center justify-center p-12",
|
|
74
|
+
children: /* @__PURE__ */ d(p, {
|
|
37
75
|
"aria-hidden": !0,
|
|
38
|
-
name: "
|
|
76
|
+
name: "GlobePlane",
|
|
39
77
|
width: "24px"
|
|
40
|
-
})
|
|
78
|
+
})
|
|
79
|
+
}), /* @__PURE__ */ d("p", {
|
|
80
|
+
className: "text-b3 font-semibold",
|
|
81
|
+
children: e
|
|
41
82
|
})]
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
83
|
+
}), /* @__PURE__ */ d("p", {
|
|
84
|
+
className: "text-b3 font-normal",
|
|
85
|
+
children: t
|
|
86
|
+
})]
|
|
87
|
+
}), _ = ({ roundTripLabel: e, oneWayLabel: t, value: n = "roundtrip", onChange: r }) => {
|
|
88
|
+
let a = c();
|
|
89
|
+
return /* @__PURE__ */ f("div", {
|
|
90
|
+
role: "radiogroup",
|
|
91
|
+
className: "flex gap-20",
|
|
92
|
+
children: [/* @__PURE__ */ d(i, {
|
|
93
|
+
name: a,
|
|
94
|
+
value: "roundtrip",
|
|
95
|
+
checked: n === "roundtrip",
|
|
96
|
+
onChange: () => r?.("roundtrip"),
|
|
97
|
+
children: /* @__PURE__ */ d("span", {
|
|
98
|
+
className: "text-b3 font-normal",
|
|
99
|
+
children: e
|
|
100
|
+
})
|
|
101
|
+
}), /* @__PURE__ */ d(i, {
|
|
102
|
+
name: a,
|
|
103
|
+
value: "oneway",
|
|
104
|
+
checked: n === "oneway",
|
|
105
|
+
onChange: () => r?.("oneway"),
|
|
106
|
+
children: /* @__PURE__ */ d("span", {
|
|
107
|
+
className: "text-b3 font-normal",
|
|
108
|
+
children: t
|
|
51
109
|
})
|
|
52
|
-
}), /* @__PURE__ */ f("div", {
|
|
53
|
-
className: "space-y-4",
|
|
54
|
-
children: e.options.map((e) => /* @__PURE__ */ f(h, {
|
|
55
|
-
isSelected: e.id === t,
|
|
56
|
-
isSmall: n,
|
|
57
|
-
onChange: r,
|
|
58
|
-
option: e
|
|
59
|
-
}, e.id))
|
|
60
110
|
})]
|
|
61
111
|
});
|
|
62
|
-
}
|
|
63
|
-
className: "flex
|
|
64
|
-
children:
|
|
65
|
-
className: "
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}) : null]
|
|
74
|
-
}), v = ({ labels: n, title: l, variant: u = "card", mode: h = "b2c", enabled: v, sections: y, selectedId: b, className: x, onChange: S, onReset: C, onApply: w, promotionalCard: T, error: E, flightType: D, flightTypeLabels: O, flightClass: k, flightClassLabel: A, flightClasses: j, fromQuery: M, fromQueryLabel: N }) => {
|
|
75
|
-
let P = u === "card", F = h === "b2b", I = F, L = /* @__PURE__ */ p("div", {
|
|
76
|
-
className: "gap-12 flex flex-col flex-1 min-h-0",
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ p("div", {
|
|
79
|
-
className: "space-y-8 px-8 pb-8",
|
|
80
|
-
children: [l ? /* @__PURE__ */ f("p", {
|
|
81
|
-
className: "text-b2 font-semibold",
|
|
82
|
-
children: l
|
|
83
|
-
}) : null, /* @__PURE__ */ p("div", {
|
|
84
|
-
className: "flex items-center justify-between",
|
|
85
|
-
children: [/* @__PURE__ */ f("p", {
|
|
86
|
-
className: "text-b3 font-semibold",
|
|
87
|
-
children: n.addTransportationFrom
|
|
88
|
-
}), /* @__PURE__ */ f(i, {
|
|
89
|
-
checked: v,
|
|
90
|
-
onChange: (e, t) => S({
|
|
91
|
-
type: "enabled",
|
|
92
|
-
payload: t
|
|
93
|
-
})
|
|
94
|
-
})]
|
|
95
|
-
})]
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ f(t, {
|
|
98
|
-
isExpanded: !F && !v && !!T,
|
|
99
|
-
children: /* @__PURE__ */ f("div", {
|
|
100
|
-
className: "pb-4 px-8",
|
|
101
|
-
children: T ? /* @__PURE__ */ p("div", {
|
|
102
|
-
className: "rounded-16 border-lightGrey bg-white border p-20 space-y-12",
|
|
103
|
-
children: [/* @__PURE__ */ p("div", {
|
|
104
|
-
className: "flex items-start gap-20",
|
|
105
|
-
children: [T.icon ? /* @__PURE__ */ f("div", {
|
|
106
|
-
className: "rounded-full bg-lightSand shrink-0 p-12",
|
|
107
|
-
children: /* @__PURE__ */ f(m, {
|
|
108
|
-
"aria-hidden": !0,
|
|
109
|
-
name: T.icon,
|
|
110
|
-
width: "24px"
|
|
111
|
-
})
|
|
112
|
-
}) : null, /* @__PURE__ */ f("p", {
|
|
113
|
-
className: "text-b3 font-semibold",
|
|
114
|
-
children: T.title
|
|
115
|
-
})]
|
|
116
|
-
}), /* @__PURE__ */ f("p", {
|
|
117
|
-
className: "text-b3",
|
|
118
|
-
children: T.description
|
|
119
|
-
})]
|
|
120
|
-
}) : null
|
|
121
|
-
})
|
|
122
|
-
}),
|
|
123
|
-
/* @__PURE__ */ f(t, {
|
|
124
|
-
isExpanded: v,
|
|
125
|
-
className: "flex-1 min-h-0",
|
|
126
|
-
innerClassName: "flex flex-col min-h-0",
|
|
127
|
-
children: /* @__PURE__ */ f("div", {
|
|
128
|
-
className: "flex flex-col gap-8 px-8 pb-4 min-h-0 flex-1",
|
|
129
|
-
children: E ? /* @__PURE__ */ f("div", {
|
|
130
|
-
className: "rounded-16 border-lightGrey bg-white border p-20",
|
|
131
|
-
children: /* @__PURE__ */ p("div", {
|
|
132
|
-
className: "flex items-center gap-20",
|
|
133
|
-
children: [/* @__PURE__ */ f(r, {
|
|
134
|
-
color: "sienna",
|
|
135
|
-
icon: "Error",
|
|
136
|
-
size: "size-48",
|
|
137
|
-
theme: "solid"
|
|
138
|
-
}), /* @__PURE__ */ f("p", {
|
|
139
|
-
className: "text-b3 font-semibold text-sienna",
|
|
140
|
-
children: E
|
|
141
|
-
})]
|
|
142
|
-
})
|
|
143
|
-
}) : /* @__PURE__ */ p(d, { children: [
|
|
144
|
-
F && O && D !== void 0 ? /* @__PURE__ */ p(c, {
|
|
145
|
-
name: "flightType",
|
|
146
|
-
value: D,
|
|
147
|
-
onChange: (e, t) => S({
|
|
148
|
-
type: "flightType",
|
|
149
|
-
payload: t
|
|
150
|
-
}),
|
|
151
|
-
children: [/* @__PURE__ */ f(a, {
|
|
152
|
-
value: "round-trip",
|
|
153
|
-
className: "text-b3",
|
|
154
|
-
children: O.roundTrip
|
|
155
|
-
}), /* @__PURE__ */ f(a, {
|
|
156
|
-
value: "one-way",
|
|
157
|
-
className: "text-b3",
|
|
158
|
-
children: O.oneWay
|
|
159
|
-
})]
|
|
160
|
-
}) : null,
|
|
161
|
-
F && A && k !== void 0 && j?.length ? /* @__PURE__ */ f(o, {
|
|
162
|
-
label: A,
|
|
163
|
-
name: "flightClass",
|
|
164
|
-
value: k,
|
|
165
|
-
options: j.map((e) => ({
|
|
166
|
-
value: e,
|
|
167
|
-
label: e
|
|
168
|
-
})),
|
|
169
|
-
onChange: (e, t) => S({
|
|
170
|
-
type: "flightClass",
|
|
171
|
-
payload: t
|
|
172
|
-
})
|
|
173
|
-
}) : null,
|
|
174
|
-
F && N && M !== void 0 ? /* @__PURE__ */ f(s, {
|
|
175
|
-
label: N,
|
|
176
|
-
name: N,
|
|
177
|
-
value: M,
|
|
178
|
-
icon: "Search",
|
|
179
|
-
placeholder: N,
|
|
180
|
-
onChange: (e, t) => S({
|
|
181
|
-
type: "fromQuery",
|
|
182
|
-
payload: t
|
|
183
|
-
})
|
|
184
|
-
}) : null,
|
|
185
|
-
/* @__PURE__ */ f("div", {
|
|
186
|
-
className: "flex flex-col gap-20 overflow-y-auto flex-1 min-h-0",
|
|
187
|
-
children: y.map((e) => /* @__PURE__ */ f(g, {
|
|
188
|
-
isSmall: I,
|
|
189
|
-
onChange: S,
|
|
190
|
-
section: e,
|
|
191
|
-
selectedId: b
|
|
192
|
-
}, e.title))
|
|
193
|
-
})
|
|
194
|
-
] })
|
|
195
|
-
})
|
|
112
|
+
}, v = ({ message: e }) => /* @__PURE__ */ d("div", {
|
|
113
|
+
className: "rounded-16 border-lightGrey flex border bg-white p-20 mb-20",
|
|
114
|
+
children: /* @__PURE__ */ f("div", {
|
|
115
|
+
className: "flex items-center gap-20",
|
|
116
|
+
children: [/* @__PURE__ */ d("div", {
|
|
117
|
+
className: "bg-lightSand rounded-full flex shrink-0 items-center justify-center p-12",
|
|
118
|
+
children: /* @__PURE__ */ d(p, {
|
|
119
|
+
"aria-hidden": !0,
|
|
120
|
+
name: "Error",
|
|
121
|
+
width: "24px",
|
|
122
|
+
className: "text-sienna"
|
|
196
123
|
})
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
className: e("rounded-16 border-lightGrey flex flex-col gap-20 border bg-white p-20 max-h-full", x),
|
|
201
|
-
children: [/* @__PURE__ */ f("div", {
|
|
202
|
-
className: "rounded-16 bg-lightSand flex flex-col flex-1 min-h-0 py-20 px-12",
|
|
203
|
-
children: L
|
|
204
|
-
}), /* @__PURE__ */ f(_, {
|
|
205
|
-
applyLabel: n.apply,
|
|
206
|
-
onApply: w,
|
|
207
|
-
onReset: C,
|
|
208
|
-
resetLabel: n.reset,
|
|
209
|
-
withSpacer: !0
|
|
124
|
+
}), /* @__PURE__ */ d("p", {
|
|
125
|
+
className: "text-b3 font-semibold text-sienna",
|
|
126
|
+
children: e
|
|
210
127
|
})]
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
128
|
+
})
|
|
129
|
+
}), y = ({ labels: i, title: s, variant: l = "card", mode: p = "b2c", enabled: m, topCities: y, otherCities: b, selectedAirportCode: x, className: S, onToggle: C, onSelect: w, onReset: T, onApply: E, b2bLabels: D, flightType: O = "roundtrip", onFlightTypeChange: k, cabinClass: A, cabinClassOptions: j, onCabinClassChange: M, departureQuery: N, onDepartureQueryChange: P, error: F }) => {
|
|
130
|
+
let I = l === "card", L = p === "b2b", R = c(), z = /* @__PURE__ */ f("div", {
|
|
131
|
+
className: "flex flex-col gap-8",
|
|
132
|
+
children: [s && /* @__PURE__ */ d("p", {
|
|
133
|
+
className: "text-b2 font-semibold",
|
|
134
|
+
children: s
|
|
135
|
+
}), /* @__PURE__ */ f("div", {
|
|
136
|
+
className: "flex items-center justify-between",
|
|
137
|
+
children: [/* @__PURE__ */ d("p", {
|
|
138
|
+
id: R,
|
|
139
|
+
className: "text-b3 font-semibold",
|
|
140
|
+
children: i.toggleLabel
|
|
141
|
+
}), /* @__PURE__ */ d(r, {
|
|
142
|
+
checked: m,
|
|
143
|
+
onChange: (e, t) => C(t),
|
|
144
|
+
"aria-labelledby": R
|
|
145
|
+
})]
|
|
218
146
|
})]
|
|
219
|
-
})
|
|
147
|
+
}), B = /* @__PURE__ */ f("div", {
|
|
148
|
+
className: "relative",
|
|
149
|
+
style: { timelineScope: "--airport-list" },
|
|
150
|
+
children: [/* @__PURE__ */ d("div", {
|
|
151
|
+
"aria-hidden": !0,
|
|
152
|
+
className: "absolute top-0 left-0 right-0 pointer-events-none z-10",
|
|
153
|
+
style: {
|
|
154
|
+
height: "20px",
|
|
155
|
+
background: "linear-gradient(to bottom, rgba(246,239,231,1), rgba(246,239,231,0))",
|
|
156
|
+
animationName: "criteria-transports-top-blur",
|
|
157
|
+
animationTimeline: "--airport-list",
|
|
158
|
+
animationRange: "0px 40px",
|
|
159
|
+
animationFillMode: "both",
|
|
160
|
+
animationTimingFunction: "linear",
|
|
161
|
+
opacity: 0
|
|
162
|
+
}
|
|
163
|
+
}), /* @__PURE__ */ f("div", {
|
|
164
|
+
role: "region",
|
|
165
|
+
"aria-label": i.topCitiesLabel || i.otherCitiesLabel,
|
|
166
|
+
tabIndex: 0,
|
|
167
|
+
className: "flex max-h-[420px] flex-col gap-20 pb-20 overflow-y-auto",
|
|
168
|
+
style: { scrollTimelineName: "--airport-list" },
|
|
169
|
+
children: [y.length > 0 && /* @__PURE__ */ d(h, {
|
|
170
|
+
label: i.topCitiesLabel,
|
|
171
|
+
airports: y,
|
|
172
|
+
selectedCode: x,
|
|
173
|
+
onSelect: w
|
|
174
|
+
}), b.length > 0 && /* @__PURE__ */ d(h, {
|
|
175
|
+
label: i.otherCitiesLabel,
|
|
176
|
+
airports: b,
|
|
177
|
+
selectedCode: x,
|
|
178
|
+
onSelect: w
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
}), V = L && N ? y.filter((e) => e.name.toLowerCase().includes(N.toLowerCase())) : y, H = L && N ? b.filter((e) => e.name.toLowerCase().includes(N.toLowerCase())) : b, U = /* @__PURE__ */ f("div", {
|
|
182
|
+
className: "relative",
|
|
183
|
+
style: { timelineScope: "--airport-list" },
|
|
184
|
+
children: [/* @__PURE__ */ d("div", {
|
|
185
|
+
"aria-hidden": !0,
|
|
186
|
+
className: "absolute top-0 left-0 right-0 pointer-events-none z-10",
|
|
187
|
+
style: {
|
|
188
|
+
height: "20px",
|
|
189
|
+
background: "linear-gradient(to bottom, rgba(246,239,231,1), rgba(246,239,231,0))",
|
|
190
|
+
animationName: "criteria-transports-top-blur",
|
|
191
|
+
animationTimeline: "--airport-list",
|
|
192
|
+
animationRange: "0px 40px",
|
|
193
|
+
animationFillMode: "both",
|
|
194
|
+
animationTimingFunction: "linear",
|
|
195
|
+
opacity: 0
|
|
196
|
+
}
|
|
197
|
+
}), /* @__PURE__ */ f("div", {
|
|
198
|
+
role: "region",
|
|
199
|
+
"aria-label": i.topCitiesLabel || i.otherCitiesLabel,
|
|
200
|
+
tabIndex: 0,
|
|
201
|
+
className: "flex max-h-[420px] flex-col gap-20 pb-20 overflow-y-auto",
|
|
202
|
+
style: { scrollTimelineName: "--airport-list" },
|
|
203
|
+
children: [V.length > 0 && /* @__PURE__ */ d(h, {
|
|
204
|
+
label: i.topCitiesLabel,
|
|
205
|
+
airports: V,
|
|
206
|
+
selectedCode: x,
|
|
207
|
+
onSelect: w
|
|
208
|
+
}), H.length > 0 && /* @__PURE__ */ d(h, {
|
|
209
|
+
label: i.otherCitiesLabel,
|
|
210
|
+
airports: H,
|
|
211
|
+
selectedCode: x,
|
|
212
|
+
onSelect: w
|
|
213
|
+
})]
|
|
214
|
+
})]
|
|
215
|
+
}), W = /* @__PURE__ */ f(u, { children: [z, /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d(t, {
|
|
216
|
+
isExpanded: m,
|
|
217
|
+
children: (L && D ? F ? /* @__PURE__ */ d(v, { message: F }) : /* @__PURE__ */ f("div", {
|
|
218
|
+
className: "flex flex-col gap-8",
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ d(_, {
|
|
221
|
+
roundTripLabel: D.roundTripLabel,
|
|
222
|
+
oneWayLabel: D.oneWayLabel,
|
|
223
|
+
value: O,
|
|
224
|
+
onChange: k
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ d(a, {
|
|
227
|
+
label: D.cabinClassLabel,
|
|
228
|
+
value: A,
|
|
229
|
+
options: j,
|
|
230
|
+
onChange: M
|
|
231
|
+
}),
|
|
232
|
+
/* @__PURE__ */ d(o, {
|
|
233
|
+
label: D.departureDateLabel,
|
|
234
|
+
value: N,
|
|
235
|
+
icon: "Search",
|
|
236
|
+
onChange: P
|
|
237
|
+
}),
|
|
238
|
+
U
|
|
239
|
+
]
|
|
240
|
+
}) : null) ?? B
|
|
241
|
+
}), /* @__PURE__ */ d(t, {
|
|
242
|
+
isExpanded: !m,
|
|
243
|
+
children: /* @__PURE__ */ d(g, {
|
|
244
|
+
title: i.clubMedTransportTitle,
|
|
245
|
+
description: i.clubMedTransportDescription
|
|
246
|
+
})
|
|
247
|
+
})] })] }), G = (T || E) && /* @__PURE__ */ f("div", {
|
|
248
|
+
className: "flex items-center justify-between",
|
|
249
|
+
children: [T && i.reset ? /* @__PURE__ */ d("button", {
|
|
250
|
+
className: "text-b3 cursor-pointer font-semibold underline",
|
|
251
|
+
onClick: T,
|
|
252
|
+
type: "button",
|
|
253
|
+
children: i.reset
|
|
254
|
+
}) : /* @__PURE__ */ d("span", {}), E && i.apply && /* @__PURE__ */ d(n, {
|
|
255
|
+
color: "saffron",
|
|
256
|
+
onClick: E,
|
|
257
|
+
children: i.apply
|
|
258
|
+
})]
|
|
259
|
+
}), K = /* @__PURE__ */ d("style", { children: "\n @keyframes criteria-transports-top-blur {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n " });
|
|
260
|
+
return I ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
|
|
261
|
+
className: e("rounded-16 border-lightGrey flex flex-col gap-20 border bg-white p-20", S),
|
|
262
|
+
children: [/* @__PURE__ */ d("div", {
|
|
263
|
+
className: "rounded-16 bg-lightSand flex flex-col gap-20 px-20 pt-20",
|
|
264
|
+
children: W
|
|
265
|
+
}), G]
|
|
266
|
+
}), K] }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
|
|
267
|
+
className: e("flex flex-col gap-20", S),
|
|
268
|
+
children: [W, G]
|
|
269
|
+
}), K] });
|
|
220
270
|
};
|
|
221
271
|
//#endregion
|
|
222
|
-
export {
|
|
272
|
+
export { y as CriteriaTransports };
|
|
223
273
|
|
|
224
274
|
//# sourceMappingURL=CriteriaTransports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriteriaTransports.js","names":[],"sources":["../../../lib/ui/criteria/CriteriaTransports.tsx"],"sourcesContent":["'use client';\nimport clsx from 'clsx';\nimport { memo, useCallback, type Dispatch, type FunctionComponent } from 'react';\n\nimport { Icon } from '@clubmed/trident-icons';\nimport { Chip } from '../Chip';\nimport { ElasticHeight } from '../ElasticHeight';\nimport { Button } from '../buttons/Button';\nimport { RadioSelect } from '../forms/RadioSelect';\nimport { Switch } from '../forms/Switch';\nimport { TextField } from '../forms/TextField';\nimport { Radio } from '../forms/radios/Radio';\nimport { RadioGroup } from '../forms/radios/RadioGroup';\n\nexport interface TransportOption {\n id: string;\n label: string;\n}\n\nexport interface TransportSection {\n title: string;\n options: TransportOption[];\n}\n\nexport interface TransportPromotionalCard {\n icon?: string;\n title: string;\n description: string;\n}\n\nexport interface CriteriaTransportsLabels {\n addTransportationFrom: string;\n reset?: string;\n apply?: string;\n}\n\nexport type CriteriaTransportsAction =\n | { type: 'enabled'; payload: boolean }\n | { type: 'select'; payload: string | null }\n | { type: 'flightType'; payload: 'round-trip' | 'one-way' }\n | { type: 'flightClass'; payload: string }\n | { type: 'fromQuery'; payload: string };\n\nexport interface CriteriaTransportsProps {\n labels: CriteriaTransportsLabels;\n title?: string;\n /** card (default): white outer card with sand inner. flat: no background, content rendered directly */\n variant?: 'card' | 'flat';\n /** b2c (default): large items + promotional card. b2b: compact items + flight controls */\n mode?: 'b2c' | 'b2b';\n enabled: boolean;\n sections: TransportSection[];\n selectedId: string | null;\n className?: string;\n onChange: Dispatch<CriteriaTransportsAction>;\n onReset?: () => void;\n onApply?: () => void;\n /** B2C: promotional card shown in the sand area when enabled=false */\n promotionalCard?: TransportPromotionalCard;\n /** Error message — shown instead of sections when enabled=true */\n error?: string;\n /** B2B: controlled flight type */\n flightType?: 'round-trip' | 'one-way';\n /** B2B: labels for the round-trip/one-way radio row */\n flightTypeLabels?: { roundTrip: string; oneWay: string };\n /** B2B: controlled selected class label */\n flightClass?: string;\n /** B2B: label for the class selector field */\n flightClassLabel?: string;\n /** B2B: available class options */\n flightClasses?: string[];\n /** B2B: controlled from/search query */\n fromQuery?: string;\n /** B2B: label for the from search field */\n fromQueryLabel?: string;\n}\n\n// ─── Sub-components ───────────────────────────────────────────────────────────\n\ninterface TransportOptionButtonProps {\n option: TransportOption;\n isSelected: boolean;\n isSmall: boolean;\n onChange: Dispatch<CriteriaTransportsAction>;\n}\n\n/** Toggle button for a single airport / transport option. */\nconst TransportOptionButton = memo(function TransportOptionButton({\n option,\n isSelected,\n isSmall,\n onChange,\n}: TransportOptionButtonProps) {\n const handleClick = useCallback(() => {\n onChange({ type: 'select', payload: isSelected ? null : option.id });\n }, [isSelected, onChange, option.id]);\n\n return (\n <button\n aria-pressed={isSelected}\n className={clsx(\n 'flex w-full items-center gap-12 text-left',\n isSmall ? 'rounded-8 px-8 py-4 text-b4' : 'rounded-16 p-12 text-b3',\n isSelected ? 'bg-black text-white' : 'bg-white',\n )}\n onClick={handleClick}\n type=\"button\"\n >\n <span className=\"min-w-0 flex-1\">{option.label}</span>\n <span className=\"shrink-0 size-24\">\n {isSelected ? <Icon aria-hidden name=\"CheckDefault\" width=\"24px\" /> : null}\n </span>\n </button>\n );\n});\n\ninterface TransportSectionItemProps {\n section: TransportSection;\n selectedId: string | null;\n isSmall: boolean;\n onChange: Dispatch<CriteriaTransportsAction>;\n}\n\n/** A titled section with its list of selectable transport option buttons. */\nconst TransportSectionItem = memo(function TransportSectionItem({\n section,\n selectedId,\n isSmall,\n onChange,\n}: TransportSectionItemProps) {\n return (\n <div className=\"space-y-8\">\n <div className=\"border-lightGrey border-b px-4 py-12\">\n <p className=\"text-b3 font-semibold\">{section.title}</p>\n </div>\n <div className=\"space-y-4\">\n {section.options.map((option) => (\n <TransportOptionButton\n key={option.id}\n isSelected={option.id === selectedId}\n isSmall={isSmall}\n onChange={onChange}\n option={option}\n />\n ))}\n </div>\n </div>\n );\n});\n\nconst Footer: FunctionComponent<{\n onReset?: () => void;\n onApply?: () => void;\n resetLabel?: string;\n applyLabel?: string;\n withSpacer?: boolean;\n}> = ({ onReset, onApply, resetLabel, applyLabel, withSpacer }) => {\n if (!onReset && !onApply) return null;\n return (\n <div className=\"flex items-center justify-between\">\n {onReset && resetLabel ? (\n <button\n className=\"text-b3 cursor-pointer font-semibold underline\"\n onClick={onReset}\n type=\"button\"\n >\n {resetLabel}\n </button>\n ) : withSpacer ? (\n <span />\n ) : null}\n {onApply && applyLabel ? (\n <Button color=\"saffron\" onClick={onApply}>\n {applyLabel}\n </Button>\n ) : null}\n </div>\n );\n};\n\n// ─── Main component ───────────────────────────────────────────────────────────\n\nexport const CriteriaTransports: FunctionComponent<CriteriaTransportsProps> = ({\n labels,\n title,\n variant = 'card',\n mode = 'b2c',\n enabled,\n sections,\n selectedId,\n className,\n onChange,\n onReset,\n onApply,\n promotionalCard,\n error,\n flightType,\n flightTypeLabels,\n flightClass,\n flightClassLabel,\n flightClasses,\n fromQuery,\n fromQueryLabel,\n}) => {\n const isCard = variant === 'card';\n const isB2b = mode === 'b2b';\n const isSmall = isB2b;\n\n const sandContent = (\n <div className=\"gap-12 flex flex-col flex-1 min-h-0\">\n <div className=\"space-y-8 px-8 pb-8\">\n {title ? <p className=\"text-b2 font-semibold\">{title}</p> : null}\n <div className=\"flex items-center justify-between\">\n <p className=\"text-b3 font-semibold\">{labels.addTransportationFrom}</p>\n <Switch\n checked={enabled}\n onChange={(_, val) => onChange({ type: 'enabled', payload: val })}\n />\n </div>\n </div>\n\n <ElasticHeight isExpanded={!isB2b && !enabled && !!promotionalCard}>\n <div className=\"pb-4 px-8\">\n {promotionalCard ? (\n <div className=\"rounded-16 border-lightGrey bg-white border p-20 space-y-12\">\n <div className=\"flex items-start gap-20\">\n {promotionalCard.icon ? (\n <div className=\"rounded-full bg-lightSand shrink-0 p-12\">\n <Icon aria-hidden name={promotionalCard.icon as never} width=\"24px\" />\n </div>\n ) : null}\n <p className=\"text-b3 font-semibold\">{promotionalCard.title}</p>\n </div>\n <p className=\"text-b3\">{promotionalCard.description}</p>\n </div>\n ) : null}\n </div>\n </ElasticHeight>\n\n <ElasticHeight\n isExpanded={enabled}\n className=\"flex-1 min-h-0\"\n innerClassName=\"flex flex-col min-h-0\"\n >\n <div className=\"flex flex-col gap-8 px-8 pb-4 min-h-0 flex-1\">\n {error ? (\n <div className=\"rounded-16 border-lightGrey bg-white border p-20\">\n <div className=\"flex items-center gap-20\">\n <Chip color=\"sienna\" icon=\"Error\" size=\"size-48\" theme=\"solid\" />\n <p className=\"text-b3 font-semibold text-sienna\">{error}</p>\n </div>\n </div>\n ) : (\n <>\n {isB2b && flightTypeLabels && flightType !== undefined ? (\n <RadioGroup\n name=\"flightType\"\n value={flightType}\n onChange={(_event, value) =>\n onChange({ type: 'flightType', payload: value as 'round-trip' | 'one-way' })\n }\n >\n <Radio value=\"round-trip\" className=\"text-b3\">\n {flightTypeLabels.roundTrip}\n </Radio>\n <Radio value=\"one-way\" className=\"text-b3\">\n {flightTypeLabels.oneWay}\n </Radio>\n </RadioGroup>\n ) : null}\n\n {isB2b && flightClassLabel && flightClass !== undefined && flightClasses?.length ? (\n <RadioSelect\n label={flightClassLabel}\n name=\"flightClass\"\n value={flightClass}\n options={flightClasses.map((cls) => ({ value: cls, label: cls }))}\n onChange={(_event, value) => onChange({ type: 'flightClass', payload: value })}\n />\n ) : null}\n\n {isB2b && fromQueryLabel && fromQuery !== undefined ? (\n <TextField\n label={fromQueryLabel}\n name={fromQueryLabel}\n value={fromQuery}\n icon=\"Search\"\n placeholder={fromQueryLabel}\n onChange={(_event, value) =>\n onChange({ type: 'fromQuery', payload: value as string })\n }\n />\n ) : null}\n\n <div className=\"flex flex-col gap-20 overflow-y-auto flex-1 min-h-0\">\n {sections.map((section) => (\n <TransportSectionItem\n key={section.title}\n isSmall={isSmall}\n onChange={onChange}\n section={section}\n selectedId={selectedId}\n />\n ))}\n </div>\n </>\n )}\n </div>\n </ElasticHeight>\n </div>\n );\n\n if (!isCard) {\n return (\n <div className={clsx('space-y-20 flex flex-col h-full', className)}>\n {sandContent}\n <Footer\n applyLabel={labels.apply}\n onApply={onApply}\n onReset={onReset}\n resetLabel={labels.reset}\n />\n </div>\n );\n }\n\n return (\n <div\n className={clsx(\n 'rounded-16 border-lightGrey flex flex-col gap-20 border bg-white p-20 max-h-full',\n className,\n )}\n >\n <div className=\"rounded-16 bg-lightSand flex flex-col flex-1 min-h-0 py-20 px-12\">\n {sandContent}\n </div>\n <Footer\n applyLabel={labels.apply}\n onApply={onApply}\n onReset={onReset}\n resetLabel={labels.reset}\n withSpacer\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAuFA,IAAM,IAAwB,EAAK,SAA+B,EAChE,WACA,eACA,YACA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AC,GAAD;GACE,YAAY,EAAO;GACV;GACA;GACT,YAAY,EAAO;GACnB,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"CriteriaTransports.js","names":[],"sources":["../../../lib/ui/criteria/CriteriaTransports.tsx"],"sourcesContent":["'use client';\nimport clsx from 'clsx';\nimport React, { forwardRef, type FunctionComponent, useId, useRef } from 'react';\n\nimport { Icon } from '@clubmed/trident-icons';\nimport { Button } from '../buttons/Button';\nimport { Switch } from '../forms/Switch';\nimport { ElasticHeight } from '../ElasticHeight';\nimport { Radio } from '../forms/radios/Radio';\nimport { RadioSelect } from '../forms/RadioSelect';\nimport type { RadioSelectOption } from '../forms/RadioSelect';\nimport { TextField } from '../forms/TextField';\n\nexport interface Airport {\n code: string;\n name: string;\n}\n\nexport interface CriteriaTransportsLabels {\n toggleLabel: string;\n topCitiesLabel: string;\n otherCitiesLabel: string;\n clubMedTransportTitle: string;\n clubMedTransportDescription: string;\n reset?: string;\n apply?: string;\n}\n\nexport interface CriteriaTransportsB2BLabels {\n roundTripLabel: string;\n oneWayLabel: string;\n cabinClassLabel: string;\n departureDateLabel: string;\n}\n\nexport interface CriteriaTransportsProps {\n labels: CriteriaTransportsLabels;\n title?: string;\n /** card (default): white outer card with sand inner. flat: no background, fields rendered directly */\n variant?: 'card' | 'flat';\n /** Switches between B2C (default) and B2B mode. B2B mode adds flight type, cabin class, and departure selectors. */\n mode?: 'b2c' | 'b2b';\n enabled: boolean;\n topCities: Airport[];\n otherCities: Airport[];\n selectedAirportCode?: string | null;\n className?: string;\n onToggle: (enabled: boolean) => void;\n onSelect: (code: string | null) => void;\n onReset?: () => void;\n onApply?: () => void;\n // B2B-specific props (ignored in b2c mode)\n b2bLabels?: CriteriaTransportsB2BLabels;\n /** Currently selected flight type (B2B mode). Defaults to 'roundtrip'. */\n flightType?: 'roundtrip' | 'oneway';\n onFlightTypeChange?: (type: 'roundtrip' | 'oneway') => void;\n /** Currently selected cabin class value (B2B mode). */\n cabinClass?: string;\n /** Options for the cabin class RadioSelect (B2B mode). */\n cabinClassOptions?: RadioSelectOption<string>[];\n onCabinClassChange?: (event: Event, value: string) => void;\n /** Controlled value for the departure airport TextField; also used to filter the airport list. */\n departureQuery?: string;\n onDepartureQueryChange?: (event: Event, value: string) => void;\n /** Error message shown in B2B mode when a prerequisite (e.g. resort selection) is missing. */\n error?: string;\n}\n\nconst AirportItem = forwardRef<\n HTMLDivElement,\n {\n airport: Airport;\n selected: boolean;\n onSelect: (code: string | null) => void;\n tabIndex?: number;\n onKeyDown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\n small?: boolean;\n }\n>(({ airport, selected, onSelect, tabIndex = 0, onKeyDown, small = true }, ref) => (\n <div\n ref={ref}\n role=\"option\"\n aria-selected={selected}\n tabIndex={tabIndex}\n className={clsx(\n 'flex w-full cursor-pointer justify-between gap-12 text-left bg-white text-black transition-all aria-selected:invert',\n small ? 'text-b4 px-8 py-4 rounded-8 items-center' : 'text-b3 p-12 rounded-16 items-start',\n )}\n onClick={() => onSelect(selected ? null : airport.code)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onSelect(selected ? null : airport.code);\n }\n onKeyDown?.(e);\n }}\n >\n <span className=\"font-normal\">{airport.name}</span>\n <span\n className={clsx(\n 'text-inherit shrink-0 transition-all duration-300 in-[[aria-selected=true]]:opacity-100 in-[[aria-selected=false]]:opacity-0',\n )}\n >\n <Icon aria-hidden name=\"CheckDefault\" width=\"24px\" className=\"shrink-0\" />\n </span>\n </div>\n));\n\nconst AirportGroup: FunctionComponent<{\n label: string;\n airports: Airport[];\n selectedCode?: string | null;\n onSelect: (code: string | null) => void;\n}> = ({ label, airports, selectedCode, onSelect }) => {\n const labelId = useId();\n const itemRefs = useRef<(HTMLDivElement | null)[]>([]);\n const selectedIndex = airports.findIndex((a) => a.code === selectedCode);\n const tabbableIndex = selectedIndex >= 0 ? selectedIndex : 0;\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>, index: number) => {\n let next = index;\n if (e.key === 'ArrowDown') next = Math.min(index + 1, airports.length - 1);\n else if (e.key === 'ArrowUp') next = Math.max(index - 1, 0);\n else return;\n e.preventDefault();\n itemRefs.current[next]?.focus();\n };\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"border-lightGrey border-b px-1 py-12\">\n <p id={labelId} className=\"text-b3 font-semibold\">\n {label}\n </p>\n </div>\n <div role=\"listbox\" aria-labelledby={labelId} className=\"flex flex-col gap-4\">\n {airports.map((airport, index) => (\n <AirportItem\n key={airport.code}\n ref={(el) => {\n itemRefs.current[index] = el;\n }}\n airport={airport}\n selected={selectedCode === airport.code}\n onSelect={onSelect}\n tabIndex={index === tabbableIndex ? 0 : -1}\n onKeyDown={(e) => handleKeyDown(e, index)}\n />\n ))}\n </div>\n </div>\n );\n};\n\nconst TransportCard: FunctionComponent<{ title: string; description: string }> = ({\n title,\n description,\n}) => (\n <div className=\"rounded-16 border-lightGrey flex flex-col gap-20 border bg-white p-20 mb-20\">\n <div className=\"flex items-center gap-20\">\n <div className=\"bg-lightSand rounded-full flex shrink-0 items-center justify-center p-12\">\n <Icon aria-hidden name=\"GlobePlane\" width=\"24px\" />\n </div>\n <p className=\"text-b3 font-semibold\">{title}</p>\n </div>\n <p className=\"text-b3 font-normal\">{description}</p>\n </div>\n);\n\nconst B2BFlightTypeSelector: FunctionComponent<{\n roundTripLabel: string;\n oneWayLabel: string;\n value?: 'roundtrip' | 'oneway';\n onChange?: (type: 'roundtrip' | 'oneway') => void;\n}> = ({ roundTripLabel, oneWayLabel, value = 'roundtrip', onChange }) => {\n const groupName = useId();\n return (\n <div role=\"radiogroup\" className=\"flex gap-20\">\n <Radio\n name={groupName}\n value=\"roundtrip\"\n checked={value === 'roundtrip'}\n onChange={() => onChange?.('roundtrip')}\n >\n <span className=\"text-b3 font-normal\">{roundTripLabel}</span>\n </Radio>\n <Radio\n name={groupName}\n value=\"oneway\"\n checked={value === 'oneway'}\n onChange={() => onChange?.('oneway')}\n >\n <span className=\"text-b3 font-normal\">{oneWayLabel}</span>\n </Radio>\n </div>\n );\n};\n\nconst B2BErrorCard: FunctionComponent<{ message: string }> = ({ message }) => (\n <div className=\"rounded-16 border-lightGrey flex border bg-white p-20 mb-20\">\n <div className=\"flex items-center gap-20\">\n <div className=\"bg-lightSand rounded-full flex shrink-0 items-center justify-center p-12\">\n <Icon aria-hidden name=\"Error\" width=\"24px\" className=\"text-sienna\" />\n </div>\n <p className=\"text-b3 font-semibold text-sienna\">{message}</p>\n </div>\n </div>\n);\n\nexport const CriteriaTransports: FunctionComponent<CriteriaTransportsProps> = ({\n labels,\n title,\n variant = 'card',\n mode = 'b2c',\n enabled,\n topCities,\n otherCities,\n selectedAirportCode,\n className,\n onToggle,\n onSelect,\n onReset,\n onApply,\n b2bLabels,\n flightType = 'roundtrip',\n onFlightTypeChange,\n cabinClass,\n cabinClassOptions,\n onCabinClassChange,\n departureQuery,\n onDepartureQueryChange,\n error,\n}) => {\n const isCard = variant === 'card';\n const isB2B = mode === 'b2b';\n const switchLabelId = useId();\n\n const header = (\n <div className=\"flex flex-col gap-8\">\n {title && <p className=\"text-b2 font-semibold\">{title}</p>}\n <div className=\"flex items-center justify-between\">\n <p id={switchLabelId} className=\"text-b3 font-semibold\">\n {labels.toggleLabel}\n </p>\n <Switch\n checked={enabled}\n onChange={(_, val) => onToggle(val)}\n aria-labelledby={switchLabelId}\n />\n </div>\n </div>\n );\n\n const airportList = (\n <div className=\"relative\" style={{ timelineScope: '--airport-list' } as React.CSSProperties}>\n <div\n aria-hidden\n className=\"absolute top-0 left-0 right-0 pointer-events-none z-10\"\n style={\n {\n height: '20px',\n background: 'linear-gradient(to bottom, rgba(246,239,231,1), rgba(246,239,231,0))',\n animationName: 'criteria-transports-top-blur',\n animationTimeline: '--airport-list',\n animationRange: '0px 40px',\n animationFillMode: 'both',\n animationTimingFunction: 'linear',\n opacity: 0,\n } as React.CSSProperties\n }\n />\n <div\n role=\"region\"\n aria-label={labels.topCitiesLabel || labels.otherCitiesLabel}\n tabIndex={0}\n className=\"flex max-h-[420px] flex-col gap-20 pb-20 overflow-y-auto\"\n style={{ scrollTimelineName: '--airport-list' } as React.CSSProperties}\n >\n {topCities.length > 0 && (\n <AirportGroup\n label={labels.topCitiesLabel}\n airports={topCities}\n selectedCode={selectedAirportCode}\n onSelect={onSelect}\n />\n )}\n {otherCities.length > 0 && (\n <AirportGroup\n label={labels.otherCitiesLabel}\n airports={otherCities}\n selectedCode={selectedAirportCode}\n onSelect={onSelect}\n />\n )}\n </div>\n </div>\n );\n\n const filteredTopCities =\n isB2B && departureQuery\n ? topCities.filter((a) => a.name.toLowerCase().includes(departureQuery.toLowerCase()))\n : topCities;\n\n const filteredOtherCities =\n isB2B && departureQuery\n ? otherCities.filter((a) => a.name.toLowerCase().includes(departureQuery.toLowerCase()))\n : otherCities;\n\n const b2bAirportList = (\n <div className=\"relative\" style={{ timelineScope: '--airport-list' } as React.CSSProperties}>\n <div\n aria-hidden\n className=\"absolute top-0 left-0 right-0 pointer-events-none z-10\"\n style={\n {\n height: '20px',\n background: 'linear-gradient(to bottom, rgba(246,239,231,1), rgba(246,239,231,0))',\n animationName: 'criteria-transports-top-blur',\n animationTimeline: '--airport-list',\n animationRange: '0px 40px',\n animationFillMode: 'both',\n animationTimingFunction: 'linear',\n opacity: 0,\n } as React.CSSProperties\n }\n />\n <div\n role=\"region\"\n aria-label={labels.topCitiesLabel || labels.otherCitiesLabel}\n tabIndex={0}\n className=\"flex max-h-[420px] flex-col gap-20 pb-20 overflow-y-auto\"\n style={{ scrollTimelineName: '--airport-list' } as React.CSSProperties}\n >\n {filteredTopCities.length > 0 && (\n <AirportGroup\n label={labels.topCitiesLabel}\n airports={filteredTopCities}\n selectedCode={selectedAirportCode}\n onSelect={onSelect}\n />\n )}\n {filteredOtherCities.length > 0 && (\n <AirportGroup\n label={labels.otherCitiesLabel}\n airports={filteredOtherCities}\n selectedCode={selectedAirportCode}\n onSelect={onSelect}\n />\n )}\n </div>\n </div>\n );\n\n const b2bExpandedContent =\n isB2B && b2bLabels ? (\n error ? (\n <B2BErrorCard message={error} />\n ) : (\n <div className=\"flex flex-col gap-8\">\n <B2BFlightTypeSelector\n roundTripLabel={b2bLabels.roundTripLabel}\n oneWayLabel={b2bLabels.oneWayLabel}\n value={flightType}\n onChange={onFlightTypeChange}\n />\n <RadioSelect\n label={b2bLabels.cabinClassLabel}\n value={cabinClass}\n options={cabinClassOptions}\n onChange={onCabinClassChange}\n />\n <TextField\n label={b2bLabels.departureDateLabel}\n value={departureQuery}\n icon=\"Search\"\n onChange={onDepartureQueryChange}\n />\n {b2bAirportList}\n </div>\n )\n ) : null;\n\n const content = (\n <>\n {header}\n <div>\n <ElasticHeight isExpanded={enabled}>{b2bExpandedContent ?? airportList}</ElasticHeight>\n <ElasticHeight isExpanded={!enabled}>\n <TransportCard\n title={labels.clubMedTransportTitle}\n description={labels.clubMedTransportDescription}\n />\n </ElasticHeight>\n </div>\n </>\n );\n\n const footer = (onReset || onApply) && (\n <div className=\"flex items-center justify-between\">\n {onReset && labels.reset ? (\n <button\n className=\"text-b3 cursor-pointer font-semibold underline\"\n onClick={onReset}\n type=\"button\"\n >\n {labels.reset}\n </button>\n ) : (\n <span />\n )}\n {onApply && labels.apply && (\n <Button color=\"saffron\" onClick={onApply}>\n {labels.apply}\n </Button>\n )}\n </div>\n );\n\n const keyframes = (\n <style>{`\n @keyframes criteria-transports-top-blur {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n `}</style>\n );\n\n if (!isCard) {\n return (\n <>\n <div className={clsx('flex flex-col gap-20', className)}>\n {content}\n {footer}\n </div>\n {keyframes}\n </>\n );\n }\n\n return (\n <>\n <div\n className={clsx(\n 'rounded-16 border-lightGrey flex flex-col gap-20 border bg-white p-20',\n className,\n )}\n >\n <div className=\"rounded-16 bg-lightSand flex flex-col gap-20 px-20 pt-20\">{content}</div>\n {footer}\n </div>\n {keyframes}\n </>\n );\n};\n"],"mappings":";;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