@travelswitchhq/flight-search-react 1.0.8 → 1.1.0
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 +36 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +36 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -66,7 +66,6 @@ var flightSearchWidgetStyles = `
|
|
|
66
66
|
--sw-size-lg: 20px;
|
|
67
67
|
}
|
|
68
68
|
.sw-container {
|
|
69
|
-
contain: layout;
|
|
70
69
|
position: relative;
|
|
71
70
|
display: block;
|
|
72
71
|
width: 100%;
|
|
@@ -171,7 +170,7 @@ var flightSearchWidgetStyles = `
|
|
|
171
170
|
position: relative;
|
|
172
171
|
display: block;
|
|
173
172
|
padding: 20px;
|
|
174
|
-
background-color: var(--
|
|
173
|
+
background-color: var(--secondary);
|
|
175
174
|
border-radius: var(--sw-radius);
|
|
176
175
|
}
|
|
177
176
|
.sw-card-box .br-right{
|
|
@@ -697,10 +696,10 @@ padding-inline-start: 25px;
|
|
|
697
696
|
.p-datepicker-other-month span{
|
|
698
697
|
opacity: 0;
|
|
699
698
|
}
|
|
700
|
-
.p-datepicker .p-highlight {
|
|
699
|
+
.sw-com-cal .p-datepicker .p-highlight {
|
|
701
700
|
position: relative;
|
|
702
|
-
background: var(--primary
|
|
703
|
-
color: var(--
|
|
701
|
+
background: var(--primary);
|
|
702
|
+
color: var(--primary-light);
|
|
704
703
|
}
|
|
705
704
|
.sw-product-tabs {
|
|
706
705
|
position: relative;
|
|
@@ -762,7 +761,7 @@ padding-inline-start: 25px;
|
|
|
762
761
|
gap: 10px;
|
|
763
762
|
cursor: pointer;
|
|
764
763
|
user-select: none;
|
|
765
|
-
color: var(--
|
|
764
|
+
color: var(--secondary-bg-text);
|
|
766
765
|
font-size: 14px;
|
|
767
766
|
}
|
|
768
767
|
.sw-material-checkbox input {
|
|
@@ -815,10 +814,13 @@ padding-inline-start: 25px;
|
|
|
815
814
|
background-color: var(--primary-light);
|
|
816
815
|
color: var(--primary);
|
|
817
816
|
}
|
|
818
|
-
.sw-tab-content {
|
|
817
|
+
.sw-card-box .sw-srh-class .sw-tab-content {
|
|
818
|
+
border: 1px solid var(--sw-form-border);
|
|
819
|
+
}
|
|
820
|
+
.sw-card-box .sw-tab-content {
|
|
819
821
|
height: 40px;
|
|
820
822
|
padding: 6px 15px;
|
|
821
|
-
border: 1px solid var(--
|
|
823
|
+
border: 1px solid var(--secondary-bg-text);
|
|
822
824
|
border-radius: var(--sw-radius);
|
|
823
825
|
align-content: center;
|
|
824
826
|
}
|
|
@@ -887,6 +889,13 @@ padding-inline-start: 25px;
|
|
|
887
889
|
gap: 8px;
|
|
888
890
|
height: 40px;
|
|
889
891
|
}
|
|
892
|
+
.sw-srh-round-text .sw-tab-content{
|
|
893
|
+
color: var(--secondary-bg-text);
|
|
894
|
+
}
|
|
895
|
+
.sw-advanced-search-options .p-accordion-header-text,
|
|
896
|
+
.sw-card-box .p-accordion-toggle-icon{
|
|
897
|
+
color: var(--secondary-bg-text);
|
|
898
|
+
}
|
|
890
899
|
.sw-remove-segment{
|
|
891
900
|
fill: var(--primary);
|
|
892
901
|
cursor: pointer;
|
|
@@ -932,14 +941,14 @@ padding-inline-start: 25px;
|
|
|
932
941
|
gap: 7px;
|
|
933
942
|
margin-inline-start: 5px;
|
|
934
943
|
padding: 8px 10px;
|
|
935
|
-
|
|
944
|
+
background-color: var(--primary);
|
|
936
945
|
border-radius: 30px;
|
|
937
|
-
|
|
938
|
-
color: var(--primary);
|
|
946
|
+
color: var(--sw-white);
|
|
939
947
|
font-size: 14px;
|
|
948
|
+
cursor: pointer;
|
|
940
949
|
}
|
|
941
950
|
.sw-srh-mc .sw-srh-mc-foot button svg {
|
|
942
|
-
fill: var(--
|
|
951
|
+
fill: var(--sw-white);
|
|
943
952
|
}
|
|
944
953
|
.sw-srh-mc .sw-srh-add-btn {
|
|
945
954
|
display: flex;
|
|
@@ -947,9 +956,9 @@ padding-inline-start: 25px;
|
|
|
947
956
|
gap: 7px;
|
|
948
957
|
margin-inline-start: 5px;
|
|
949
958
|
padding: 0.8rem 1rem;
|
|
959
|
+
border: 0;
|
|
950
960
|
border-radius: 30px;
|
|
951
961
|
color: var(--primary);
|
|
952
|
-
font-size: 1.4rem;
|
|
953
962
|
}
|
|
954
963
|
.sw-srh-mc .sw-traveller {
|
|
955
964
|
grid-row-start: 1;
|
|
@@ -964,10 +973,11 @@ padding-inline-start: 25px;
|
|
|
964
973
|
}
|
|
965
974
|
.p-autocomplete-multiple-container {
|
|
966
975
|
width: 100%;
|
|
976
|
+
background-color: var(--sw-white);
|
|
967
977
|
min-width: 270px;
|
|
968
978
|
padding: 10px;
|
|
969
979
|
padding-inline-end: 2rem;
|
|
970
|
-
border: 1px solid var(--
|
|
980
|
+
border: 1px solid var(--secondary-bg-text);
|
|
971
981
|
border-radius: var(--sw-radius);
|
|
972
982
|
gap: 0.5rem;
|
|
973
983
|
font-size: 14px;
|
|
@@ -1024,7 +1034,7 @@ padding-inline-start: 25px;
|
|
|
1024
1034
|
font-weight: 400;
|
|
1025
1035
|
}
|
|
1026
1036
|
.sw-srh-button-wrapper button.sw-active-button {
|
|
1027
|
-
background-color: var(--
|
|
1037
|
+
background-color: var(--primary);
|
|
1028
1038
|
color: var(--sw-white);
|
|
1029
1039
|
}
|
|
1030
1040
|
.sw-traveller .sw-rooms-guests-menu {
|
|
@@ -1324,12 +1334,12 @@ padding-inline-start: 25px;
|
|
|
1324
1334
|
.sw-srh-mc .sw-srh-mc-foot{
|
|
1325
1335
|
margin: 10px 0;
|
|
1326
1336
|
}
|
|
1327
|
-
.sw-srh-mc .sw-srh-wrap:nth-child(3){
|
|
1328
|
-
flex-direction: row;
|
|
1329
|
-
}
|
|
1330
1337
|
.sw-container .sw-search-button{
|
|
1331
1338
|
border-radius: var(--sw-btn-radius);
|
|
1332
1339
|
}
|
|
1340
|
+
.sw-fsrh-chk-main{
|
|
1341
|
+
flex-wrap: wrap;
|
|
1342
|
+
}
|
|
1333
1343
|
}
|
|
1334
1344
|
`;
|
|
1335
1345
|
|
|
@@ -1464,8 +1474,9 @@ function FlightSearchWidget({
|
|
|
1464
1474
|
}) {
|
|
1465
1475
|
const theme = config?.theme;
|
|
1466
1476
|
const primaryColor = theme?.primary ?? "#2c0a82";
|
|
1467
|
-
const secondaryColor = theme?.secondary ?? "#2c0a82";
|
|
1468
1477
|
const primaryLightColor = theme?.primaryLight ?? "#f3e2ff";
|
|
1478
|
+
const secondaryColor = theme?.secondary ?? "#2c0a82";
|
|
1479
|
+
const secondaryBgText = theme?.secondaryBgText ?? "#ffffff";
|
|
1469
1480
|
const fontName = config?.fontName;
|
|
1470
1481
|
const redirectionDomain = config?.redirectionDomain;
|
|
1471
1482
|
const env = config?.env ?? "dev";
|
|
@@ -1716,15 +1727,16 @@ function FlightSearchWidget({
|
|
|
1716
1727
|
() => {
|
|
1717
1728
|
const style = {
|
|
1718
1729
|
["--primary"]: primaryColor,
|
|
1730
|
+
["--primary-light"]: primaryLightColor,
|
|
1719
1731
|
["--secondary"]: secondaryColor,
|
|
1720
|
-
["--
|
|
1732
|
+
["--secondary-bg-text"]: secondaryBgText
|
|
1721
1733
|
};
|
|
1722
1734
|
if (fontName) {
|
|
1723
1735
|
style["--font-family"] = fontName;
|
|
1724
1736
|
}
|
|
1725
1737
|
return style;
|
|
1726
1738
|
},
|
|
1727
|
-
[primaryColor, secondaryColor, primaryLightColor]
|
|
1739
|
+
[primaryColor, secondaryColor, primaryLightColor, secondaryBgText]
|
|
1728
1740
|
);
|
|
1729
1741
|
(0, import_react.useEffect)(() => {
|
|
1730
1742
|
ensureStylesInjected();
|
|
@@ -2143,8 +2155,8 @@ function FlightSearchWidget({
|
|
|
2143
2155
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sw-dropdown", children: [
|
|
2144
2156
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mobileHead MobileShow", children: [
|
|
2145
2157
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { type: "button", onClick: () => closeAirportDropdown(dropdownType, segmentIndex), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: "20px", height: "20px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
2146
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M19 5L5 19", stroke: "black",
|
|
2147
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5 5L19 19", stroke: "black",
|
|
2158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M19 5L5 19", stroke: "black", strokeWidth: "2", "stroke-linecap": "round", strokeLinejoin: "round" }),
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M5 5L19 19", stroke: "black", strokeWidth: "2", "stroke-linecap": "round", strokeLinejoin: "round" })
|
|
2148
2160
|
] }) }),
|
|
2149
2161
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: isOrigin ? "Origin" : "Destination" })
|
|
2150
2162
|
] }),
|
|
@@ -2311,7 +2323,7 @@ function FlightSearchWidget({
|
|
|
2311
2323
|
className: "sw-form-swap",
|
|
2312
2324
|
"aria-label": "Swap origin and destination",
|
|
2313
2325
|
onClick: () => swapSegmentLocations(0),
|
|
2314
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "30px", height: "30px", fill: "var(--body-text)", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
2326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: "30px", height: "30px", fill: "var(--body-text)", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fillRule: "evenodd", d: "M14.6403 5.2477a.7483.7483 0 0 1 1.0612.0084l4.0871 4.1684a.7555.7555 0 0 1 .1573.8195.7502.7502 0 0 1-.6921.4623H6.8305c-.4145 0-.7504-.3373-.7504-.7533 0-.4161.336-.7534.7504-.7534h10.6317L14.632 6.3131a.7556.7556 0 0 1 .0083-1.0654ZM9.368 18.8148a.7483.7483 0 0 1-1.0611-.0084l-4.087-4.1684a.7555.7555 0 0 1-.1574-.8195.7503.7503 0 0 1 .6921-.4623H17.178c.4144 0 .7503.3373.7503.7533 0 .4161-.3359.7534-.7503.7534H6.5463l2.8301 2.8865a.7555.7555 0 0 1-.0083 1.0654Z", clipRule: "evenodd" }) })
|
|
2315
2327
|
}
|
|
2316
2328
|
),
|
|
2317
2329
|
renderAirportDropdown(0, "destination", destinationDropdownRef, isDestinationDropdownOpen, () => setIsDestinationDropdownOpen(true))
|