diff --git a/apps/partner-sas/globals.css b/apps/partner-sas/globals.css index 136c6c2ef..f35d77cc0 100644 --- a/apps/partner-sas/globals.css +++ b/apps/partner-sas/globals.css @@ -158,6 +158,11 @@ body.partner-sas { white-space: nowrap; border-width: 0; } +/* When a select in the booking widget is open, react-aria sets overflow:hidden + which breaks sticky positioning. Override with clip which doesn't break sticky. */ +body:has([data-booking-widget-open] [data-open]) { + overflow: clip !important; +} @media screen and (min-width: 768px) { :root { diff --git a/apps/scandic-web/app/globals.css b/apps/scandic-web/app/globals.css index 644f3abfb..592f26dbc 100644 --- a/apps/scandic-web/app/globals.css +++ b/apps/scandic-web/app/globals.css @@ -88,6 +88,12 @@ body:has([data-booking-widget-open="true"]) #kindly-chat-api { z-index: -1 !important; } +/* When a select in the booking widget is open, react-aria sets overflow:hidden + which breaks sticky positioning. Override with clip which doesn't break sticky. */ +body:has([data-booking-widget-open] [data-open]) { + overflow: clip !important; +} + @media screen and (min-width: 768px) { :root { --max-width-single-spacing: var(--Layout-Tablet-Margin-Margin-min); diff --git a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/Dialog/dialog.module.css b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/Dialog/dialog.module.css index 5eb17cb04..a79d7a905 100644 --- a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/Dialog/dialog.module.css +++ b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/Dialog/dialog.module.css @@ -9,7 +9,7 @@ overflow-y: auto; padding: var(--Space-x2) var(--Space-x3); position: fixed; - top: calc(140px + max(var(--sitewide-alert-sticky-height), 25px)); + top: calc(140px + max(var(--sitewide-alert-sticky-height), 15px)); width: 100%; height: calc(100% - 200px); z-index: 10010; diff --git a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/searchList.module.css b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/searchList.module.css index 70d5c3ce7..ff0c5413f 100644 --- a/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/searchList.module.css +++ b/packages/booking-flow/lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/SearchList/searchList.module.css @@ -33,6 +33,7 @@ .text { padding: 0 var(--Space-x1); + white-space: normal; } .textPlaceholderColor { color: var(--UI-Text-Placeholder); diff --git a/packages/booking-flow/lib/components/BookingWidget/Client.tsx b/packages/booking-flow/lib/components/BookingWidget/Client.tsx index 7752e589e..2b44c6b24 100644 --- a/packages/booking-flow/lib/components/BookingWidget/Client.tsx +++ b/packages/booking-flow/lib/components/BookingWidget/Client.tsx @@ -5,6 +5,7 @@ import { cx } from "class-variance-authority" import { useSearchParams } from "next/navigation" import { use, useEffect, useRef, useState } from "react" import { FormProvider, useForm } from "react-hook-form" +import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" import { useScrollLock } from "@scandic-hotels/common/hooks/useScrollLock" @@ -12,7 +13,7 @@ import useStickyPosition from "@scandic-hotels/common/hooks/useStickyPosition" import { StickyElementNameEnum } from "@scandic-hotels/common/stores/sticky-position" import { debounce } from "@scandic-hotels/common/utils/debounce" import isValidJson from "@scandic-hotels/common/utils/isValidJson" -import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" +import { IconButton } from "@scandic-hotels/design-system/IconButton" import { trpc } from "@scandic-hotels/trpc/client" import { SEARCH_TYPE_REDEMPTION } from "@scandic-hotels/trpc/constants/booking" @@ -66,6 +67,7 @@ export default function BookingWidgetClient({ autoLock: false, }) const shouldFetchAutoComplete = !!data.hotelId || !!data.city + const intl = useIntl() const { data: destinationsData, isPending } = trpc.autocomplete.destinations.useQuery( @@ -257,13 +259,17 @@ export default function BookingWidgetClient({ />
- + variant="Muted" + emphasis + aria-label={intl.formatMessage({ + id: "common.close", + defaultMessage: "Close", + })} + onPress={closeMobileSearch} + iconName="close" + />
- +
- +