@travelswitchhq/flight-search-react 1.1.7 → 1.1.8
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 +19 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +19 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -186,7 +186,7 @@ var flightSearchWidgetStyles = `
|
|
|
186
186
|
.sw-com-cal .p-disabled{
|
|
187
187
|
opacity: 0.3;
|
|
188
188
|
}
|
|
189
|
-
.sw-form-field {
|
|
189
|
+
.sw-srh-form-field {
|
|
190
190
|
display: flex;
|
|
191
191
|
flex-direction: column;
|
|
192
192
|
flex: 1 1 auto;
|
|
@@ -196,10 +196,10 @@ var flightSearchWidgetStyles = `
|
|
|
196
196
|
min-width: 0;
|
|
197
197
|
overflow: visible;
|
|
198
198
|
}
|
|
199
|
-
.sw-form-
|
|
199
|
+
.sw-srh-form-fieldsw-is-invalid {
|
|
200
200
|
box-shadow: inset 0 0 0 1px var(--sw-error);
|
|
201
201
|
}
|
|
202
|
-
.sw-form-
|
|
202
|
+
.sw-srh-form-fieldsw-is-invalid label {
|
|
203
203
|
color: var(--sw-error);
|
|
204
204
|
}
|
|
205
205
|
.sw-custom-dropdown.sw-has-error .sw-custom-dropdown-trigger {
|
|
@@ -225,8 +225,8 @@ var flightSearchWidgetStyles = `
|
|
|
225
225
|
.p-button-label {
|
|
226
226
|
flex: unset;
|
|
227
227
|
}
|
|
228
|
-
.sw-form-field input,
|
|
229
|
-
.sw-form-field .p-inputtext {
|
|
228
|
+
.sw-srh-form-field input,
|
|
229
|
+
.sw-srh-form-field .p-inputtext {
|
|
230
230
|
display: block;
|
|
231
231
|
width: 100%;
|
|
232
232
|
margin: 0;
|
|
@@ -240,8 +240,8 @@ var flightSearchWidgetStyles = `
|
|
|
240
240
|
font-size: 14px;
|
|
241
241
|
font-weight: 500;
|
|
242
242
|
}
|
|
243
|
-
.sw-form-field input::placeholder,
|
|
244
|
-
.sw-form-field .p-inputtext::placeholder {
|
|
243
|
+
.sw-srh-form-field input::placeholder,
|
|
244
|
+
.sw-srh-form-field .p-inputtext::placeholder {
|
|
245
245
|
color: var(--sw-label-color) !important;
|
|
246
246
|
}
|
|
247
247
|
.sw-form-swap {
|
|
@@ -259,7 +259,7 @@ var flightSearchWidgetStyles = `
|
|
|
259
259
|
cursor: pointer;
|
|
260
260
|
transform: translate(50%, -50%);
|
|
261
261
|
}
|
|
262
|
-
.sw-srh-wrap.sw-srh-box.sw-pos-rel .sw-form-field.sw-pos-rel:last-child {
|
|
262
|
+
.sw-srh-wrap.sw-srh-box.sw-pos-rel .sw-srh-form-field.sw-pos-rel:last-child {
|
|
263
263
|
padding-inline-start: 25px;
|
|
264
264
|
}
|
|
265
265
|
.sw-custom-dropdown {
|
|
@@ -875,7 +875,7 @@ padding-inline-start: 25px;
|
|
|
875
875
|
min-width: 0;
|
|
876
876
|
overflow: visible;
|
|
877
877
|
}
|
|
878
|
-
.sw-srh-wrap .sw-form-field {
|
|
878
|
+
.sw-srh-wrap .sw-srh-form-field {
|
|
879
879
|
flex: 1 1 50%;
|
|
880
880
|
min-width: 0;
|
|
881
881
|
justify-content: center;
|
|
@@ -1198,8 +1198,7 @@ padding-inline-start: 25px;
|
|
|
1198
1198
|
display: none;
|
|
1199
1199
|
}
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1202
|
-
.sw-container .sw-form-field {
|
|
1201
|
+
.sw-container .sw-srh-form-field {
|
|
1203
1202
|
border-radius: var(--sw-radius);
|
|
1204
1203
|
}
|
|
1205
1204
|
.sw-fsrh-adv-cont{
|
|
@@ -1230,7 +1229,7 @@ padding-inline-start: 25px;
|
|
|
1230
1229
|
line-height: 1;
|
|
1231
1230
|
}
|
|
1232
1231
|
}
|
|
1233
|
-
.sw-container .sw-srh-wrap.sw-srh-box.sw-pos-rel .sw-form-field.sw-pos-rel:last-child{
|
|
1232
|
+
.sw-container .sw-srh-wrap.sw-srh-box.sw-pos-rel .sw-srh-form-field.sw-pos-rel:last-child{
|
|
1234
1233
|
padding-inline-start: 15px;
|
|
1235
1234
|
}
|
|
1236
1235
|
.sw-container .p-datepicker-group + .p-datepicker-group .mobileHead {
|
|
@@ -2021,7 +2020,7 @@ function FlightSearchWidget({
|
|
|
2021
2020
|
case "multi-city":
|
|
2022
2021
|
return 3;
|
|
2023
2022
|
case "custom-search":
|
|
2024
|
-
return
|
|
2023
|
+
return 1;
|
|
2025
2024
|
default:
|
|
2026
2025
|
return 2;
|
|
2027
2026
|
}
|
|
@@ -2186,7 +2185,7 @@ function FlightSearchWidget({
|
|
|
2186
2185
|
const list = isOrigin ? getPredictiveState(segmentIndex).fromAirport : getPredictiveState(segmentIndex).toAirport;
|
|
2187
2186
|
const selectedIndex = isOrigin ? getPredictiveState(segmentIndex).selectedFromIndex : getPredictiveState(segmentIndex).selectedToIndex;
|
|
2188
2187
|
const isFirstOrigin = segmentIndex === 0 && isOrigin;
|
|
2189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `sw-form-field sw-pos-rel${isOrigin ? " br-left" : ""} ${validationErrors[segmentIndex]?.[dropdownType] ? "sw-is-invalid" : ""}`, children: [
|
|
2188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `sw-srh-form-field sw-pos-rel${isOrigin ? " br-left" : ""} ${validationErrors[segmentIndex]?.[dropdownType] ? "sw-is-invalid" : ""}`, children: [
|
|
2190
2189
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: `${dropdownType}-${segmentIndex}`, children: label }),
|
|
2191
2190
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `sw-custom-dropdown ${validationErrors[segmentIndex]?.[dropdownType] ? "sw-has-error" : ""}`, ref: dropdownRef, children: [
|
|
2192
2191
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -2295,7 +2294,7 @@ function FlightSearchWidget({
|
|
|
2295
2294
|
renderAirportDropdown(index, "destination", destinationDropdownRef || destinationRef, isDestOpen, () => toggleSegmentDropdown(index, "destination"))
|
|
2296
2295
|
] }, index),
|
|
2297
2296
|
isMultiCityOrCustom && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-srh-wrap sw-pos-rel", children: [
|
|
2298
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-form-field sw-com-cal
|
|
2297
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-srh-form-field sw-com-cal", children: [
|
|
2299
2298
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: `departure-${index}`, children: "Departure" }),
|
|
2300
2299
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
2301
2300
|
import_calendar.Calendar,
|
|
@@ -2418,7 +2417,7 @@ function FlightSearchWidget({
|
|
|
2418
2417
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { cursor: "pointer" }, onClick: () => {
|
|
2419
2418
|
dateRangeCalendarRef.current?.show?.();
|
|
2420
2419
|
mobileDateRangeCalendarRef.current?.show?.();
|
|
2421
|
-
}, className: "sw-form-field sw-com-cal", children: [
|
|
2420
|
+
}, className: "sw-srh-form-field sw-com-cal", children: [
|
|
2422
2421
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
2423
2422
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { children: "Departure" }),
|
|
2424
2423
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: segments[0]?.dateRange?.[0]?.toLocaleDateString("en-GB", { day: "2-digit", month: "short", year: "numeric" }) })
|
|
@@ -2507,7 +2506,7 @@ function FlightSearchWidget({
|
|
|
2507
2506
|
}
|
|
2508
2507
|
)
|
|
2509
2508
|
] }),
|
|
2510
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { cursor: "pointer" }, className: "sw-form-field sw-com-cal", onClick: () => {
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { cursor: "pointer" }, className: "sw-srh-form-field sw-com-cal", onClick: () => {
|
|
2511
2510
|
dateRangeCalendarRef.current?.show?.();
|
|
2512
2511
|
mobileDateRangeCalendarRef.current?.show?.();
|
|
2513
2512
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -2518,7 +2517,7 @@ function FlightSearchWidget({
|
|
|
2518
2517
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
2519
2518
|
"div",
|
|
2520
2519
|
{
|
|
2521
|
-
className: "sw-form-field sw-pos-rel sw-com-cal",
|
|
2520
|
+
className: "sw-srh-form-field sw-pos-rel sw-com-cal",
|
|
2522
2521
|
style: { cursor: "pointer" },
|
|
2523
2522
|
onClick: () => {
|
|
2524
2523
|
oneWayDesktopCalendarRef.current?.show?.();
|
|
@@ -2596,7 +2595,7 @@ function FlightSearchWidget({
|
|
|
2596
2595
|
]
|
|
2597
2596
|
}
|
|
2598
2597
|
),
|
|
2599
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "sw-form-field sw-pos-rel sw-com-cal sw-add-return-label", style: { cursor: "pointer" }, onClick: () => {
|
|
2598
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "sw-srh-form-field sw-pos-rel sw-com-cal sw-add-return-label", style: { cursor: "pointer" }, onClick: () => {
|
|
2600
2599
|
setTripType("round-trip");
|
|
2601
2600
|
setTimeout(() => document.getElementById("dateRange")?.querySelector("input")?.focus?.(), 100);
|
|
2602
2601
|
}, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "font14", children: "Add return" }) })
|
|
@@ -2608,7 +2607,7 @@ function FlightSearchWidget({
|
|
|
2608
2607
|
] }),
|
|
2609
2608
|
"Add Another Flight"
|
|
2610
2609
|
] }) }),
|
|
2611
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-form-field sw-traveller sw-pos-rel", children: [
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-srh-form-field sw-traveller sw-pos-rel", children: [
|
|
2612
2611
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "rooms", children: "Travellers and Class" }),
|
|
2613
2612
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-custom-dropdown", ref: roomsGuestsMenuRef, children: [
|
|
2614
2613
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|