@travelswitchhq/flight-search-react 1.1.4 → 1.1.5

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 CHANGED
@@ -303,9 +303,11 @@ padding-inline-start: 25px;
303
303
  visibility: visible;
304
304
  opacity: 1;
305
305
  }
306
+ .sw-dropdown{
307
+ width: 380px;
308
+ }
306
309
  .sw-dropdown,
307
310
  .p-autocomplete-panel {
308
- width: 380px;
309
311
  max-height: 310px;
310
312
  margin: 0;
311
313
  padding: 0;
@@ -319,9 +321,16 @@ padding-inline-start: 25px;
319
321
  .sw-dropdown::-webkit-scrollbar {
320
322
  display: none;
321
323
  }
322
- .sw-dropdown-list-card,
323
- .sw-dropdown-list-box,
324
324
  .p-autocomplete-item {
325
+ display: flex;
326
+ align-items: center;
327
+ gap: 15px;
328
+ padding: 10px 20px;
329
+ cursor: pointer;
330
+ font-family: var(--sw-font-family);
331
+ }
332
+ .sw-dropdown-list-card,
333
+ .sw-dropdown-list-box {
325
334
  display: flex;
326
335
  align-items: center;
327
336
  gap: 15px;
@@ -1792,7 +1801,9 @@ function FlightSearchWidget({
1792
1801
  (0, import_react.useEffect)(() => {
1793
1802
  const handleClickOutside = (event) => {
1794
1803
  const target = event.target;
1795
- const isInsidePrimeDropdown = target.closest(".p-dropdown-panel") !== null || target.closest(".p-dropdown-items-wrapper") !== null || target.closest(".p-dropdown-item") !== null || target.closest(".p-component")?.classList.contains("p-dropdown") !== false || target.closest('[data-pc-section="panel"]') !== null || target.closest('[data-pc-name="dropdown"]') !== null;
1804
+ const isInsidePrimeDropdown = Boolean(
1805
+ target.closest(".p-dropdown-panel") || target.closest(".p-dropdown-items-wrapper") || target.closest(".p-dropdown-item") || target.closest('[data-pc-section="panel"]') || target.closest('[data-pc-name="dropdown"]')
1806
+ );
1796
1807
  if (originDropdownRef.current && !originDropdownRef.current.contains(target)) {
1797
1808
  setIsOriginDropdownOpen(false);
1798
1809
  }
@@ -2781,6 +2792,7 @@ function FlightSearchWidget({
2781
2792
  preferredAirlineList: next.map((item) => item.airline_code)
2782
2793
  }));
2783
2794
  },
2795
+ appendTo: "self",
2784
2796
  field: "airline_name",
2785
2797
  multiple: true,
2786
2798
  forceSelection: true,