From c71f2a24339ba0cb2a8e174948617d7dba9de1cf Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Tue, 8 Oct 2024 12:00:46 +0200 Subject: [PATCH 01/10] feat(SW-564): Fix z-index error --- components/BookingWidget/bookingWidget.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/BookingWidget/bookingWidget.module.css b/components/BookingWidget/bookingWidget.module.css index 2827ba72d..461057bf1 100644 --- a/components/BookingWidget/bookingWidget.module.css +++ b/components/BookingWidget/bookingWidget.module.css @@ -42,7 +42,7 @@ box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.05); position: sticky; top: 0; - z-index: 10000; + z-index: 9; background-color: var(--Base-Surface-Primary-light-Normal); } From 155b6683c48d2702ba87d9820769da930db346f1 Mon Sep 17 00:00:00 2001 From: Simon Emanuelsson Date: Tue, 8 Oct 2024 11:06:09 +0200 Subject: [PATCH 02/10] feat: rename form/card to form/choicecard --- .../HotelReservation/EnterDetails/BedType/index.tsx | 6 ++---- .../EnterDetails/Breakfast/index.tsx | 6 ++---- .../HotelReservation/EnterDetails/Details/index.tsx | 5 +++-- .../Form/{Card => ChoiceCard}/Checkbox.tsx | 4 ++-- .../Form/{Card => ChoiceCard}/Radio.tsx | 4 ++-- .../Form/{Card => ChoiceCard/_Card}/card.module.css | 0 .../Form/{Card => ChoiceCard/_Card}/card.ts | 13 +++++++------ .../Form/{Card => ChoiceCard/_Card}/index.tsx | 6 +++--- 8 files changed, 21 insertions(+), 23 deletions(-) rename components/TempDesignSystem/Form/{Card => ChoiceCard}/Checkbox.tsx (58%) rename components/TempDesignSystem/Form/{Card => ChoiceCard}/Radio.tsx (57%) rename components/TempDesignSystem/Form/{Card => ChoiceCard/_Card}/card.module.css (100%) rename components/TempDesignSystem/Form/{Card => ChoiceCard/_Card}/card.ts (73%) rename components/TempDesignSystem/Form/{Card => ChoiceCard/_Card}/index.tsx (94%) diff --git a/components/HotelReservation/EnterDetails/BedType/index.tsx b/components/HotelReservation/EnterDetails/BedType/index.tsx index 61633cdcf..955ce740b 100644 --- a/components/HotelReservation/EnterDetails/BedType/index.tsx +++ b/components/HotelReservation/EnterDetails/BedType/index.tsx @@ -5,7 +5,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import { KingBedIcon } from "@/components/Icons" -import RadioCard from "@/components/TempDesignSystem/Form/Card/Radio" +import RadioCard from "@/components/TempDesignSystem/Form/ChoiceCard/Radio" import { bedTypeSchema } from "./schema" @@ -24,9 +24,7 @@ export default function BedType() { reValidateMode: "onChange", }) - // @ts-expect-error - Types mismatch docs as this is - // a pattern that is allowed https://formatjs.io/docs/react-intl/api#usage - const text = intl.formatMessage( + const text = intl.formatMessage( { id: "Included (based on availability)" }, { b: (str) => {str} } ) diff --git a/components/HotelReservation/EnterDetails/Breakfast/index.tsx b/components/HotelReservation/EnterDetails/Breakfast/index.tsx index b8f00ec83..8551e12dc 100644 --- a/components/HotelReservation/EnterDetails/Breakfast/index.tsx +++ b/components/HotelReservation/EnterDetails/Breakfast/index.tsx @@ -5,7 +5,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import { BreakfastIcon, NoBreakfastIcon } from "@/components/Icons" -import RadioCard from "@/components/TempDesignSystem/Form/Card/Radio" +import RadioCard from "@/components/TempDesignSystem/Form/ChoiceCard/Radio" import { breakfastSchema } from "./schema" @@ -31,9 +31,7 @@ export default function Breakfast() { Icon={BreakfastIcon} id={breakfastEnum.BREAKFAST} name="breakfast" - // @ts-expect-error - Types mismatch docs as this is - // a pattern that is allowed https://formatjs.io/docs/react-intl/api#usage - subtitle={intl.formatMessage( + subtitle={intl.formatMessage( { id: "{amount} {currency}/night per adult" }, { amount: "150", diff --git a/components/HotelReservation/EnterDetails/Details/index.tsx b/components/HotelReservation/EnterDetails/Details/index.tsx index 2dd1b1cdb..15792e384 100644 --- a/components/HotelReservation/EnterDetails/Details/index.tsx +++ b/components/HotelReservation/EnterDetails/Details/index.tsx @@ -4,7 +4,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import Button from "@/components/TempDesignSystem/Button" -import CheckboxCard from "@/components/TempDesignSystem/Form/Card/Checkbox" +import CheckboxCard from "@/components/TempDesignSystem/Form/ChoiceCard/Checkbox" import CountrySelect from "@/components/TempDesignSystem/Form/Country" import Input from "@/components/TempDesignSystem/Form/Input" import Phone from "@/components/TempDesignSystem/Form/Phone" @@ -88,8 +88,9 @@ export default function Details({ user }: DetailsProps) {