diff --git a/apps/scandic-web/components/ContentType/DestinationPage/CityListing/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/CityListing/index.tsx index 10cdf3ae0..8a5716879 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/CityListing/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/CityListing/index.tsx @@ -3,14 +3,14 @@ import { useRef } from "react" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import { BackToTopButton } from "@scandic-hotels/design-system/BackToTopButton" import { Typography } from "@scandic-hotels/design-system/Typography" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useDestinationDataStore } from "@/stores/destination-data" import DestinationFilterAndSort from "@/components/DestinationFilterAndSort" -import Alert from "@/components/TempDesignSystem/Alert" import { useScrollToTop } from "@/hooks/useScrollToTop" import CityListingItem from "./CityListingItem" diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/Content.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/Content.tsx index 7fac87c31..5fc9266fc 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/Content.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCityPage/CityMap/HotelList/Content.tsx @@ -3,9 +3,8 @@ import { useIntl } from "react-intl" import { useMediaQuery } from "usehooks-ts" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" - -import Alert from "@/components/TempDesignSystem/Alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import HotelCardCarousel from "../../../HotelCardCarousel" import HotelListItem from "../HotelListItem" diff --git a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx index d4ea062d4..1ef64f5b1 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/DestinationCountryPage/CountryMap/CityList/index.tsx @@ -2,13 +2,13 @@ import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import Body from "@scandic-hotels/design-system/Body" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useDestinationDataStore } from "@/stores/destination-data" import DestinationFilterAndSort from "@/components/DestinationFilterAndSort" -import Alert from "@/components/TempDesignSystem/Alert" import CityListItem from "../CityListItem" import CityListSkeleton from "./CityListSkeleton" diff --git a/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx index 2e5f1f9ea..42fbaadae 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/HotelListing/index.tsx @@ -5,16 +5,16 @@ import { useParams } from "next/navigation" import { useEffect, useRef, useState } from "react" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import { BackToTopButton } from "@scandic-hotels/design-system/BackToTopButton" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton" import { Typography } from "@scandic-hotels/design-system/Typography" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useDestinationDataStore } from "@/stores/destination-data" import DestinationFilterAndSort from "@/components/DestinationFilterAndSort" -import Alert from "@/components/TempDesignSystem/Alert" import { useScrollToTop } from "@/hooks/useScrollToTop" import HotelListingItem from "./HotelListingItem" diff --git a/apps/scandic-web/components/ContentType/HotelPage/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/index.tsx index 4519e93a1..834394167 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/index.tsx @@ -3,6 +3,7 @@ import { Suspense } from "react" import { dt } from "@scandic-hotels/common/dt" import { safeTry } from "@scandic-hotels/common/utils/safeTry" +import { Alert } from "@scandic-hotels/design-system/Alert" import Link from "@scandic-hotels/design-system/Link" import { @@ -14,7 +15,6 @@ import { import AccordionSection from "@/components/Blocks/Accordion" import Breadcrumbs from "@/components/Breadcrumbs" import HotelCampaigns from "@/components/ContentType/HotelPage/Campaigns" -import Alert from "@/components/TempDesignSystem/Alert" import BreadcrumbsSkeleton from "@/components/TempDesignSystem/Breadcrumbs/BreadcrumbsSkeleton" import TrackingSDK from "@/components/TrackingSDK" import { getIntl } from "@/i18n" diff --git a/apps/scandic-web/components/DestinationFilterAndSort/index.tsx b/apps/scandic-web/components/DestinationFilterAndSort/index.tsx index 93b2f5a3d..825cdec6c 100644 --- a/apps/scandic-web/components/DestinationFilterAndSort/index.tsx +++ b/apps/scandic-web/components/DestinationFilterAndSort/index.tsx @@ -10,16 +10,16 @@ import { } from "react-aria-components" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import { Divider } from "@scandic-hotels/design-system/Divider" import Footnote from "@scandic-hotels/design-system/Footnote" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton" import Subtitle from "@scandic-hotels/design-system/Subtitle" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useDestinationDataStore } from "@/stores/destination-data" -import Alert from "../TempDesignSystem/Alert" import Filter from "./Filter" import Sort from "./Sort" diff --git a/apps/scandic-web/components/HotelFilterAndSort/index.tsx b/apps/scandic-web/components/HotelFilterAndSort/index.tsx index 33b054821..9d5447e19 100644 --- a/apps/scandic-web/components/HotelFilterAndSort/index.tsx +++ b/apps/scandic-web/components/HotelFilterAndSort/index.tsx @@ -9,16 +9,16 @@ import { } from "react-aria-components" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import { Button } from "@scandic-hotels/design-system/Button" import { Divider } from "@scandic-hotels/design-system/Divider" import { IconButton } from "@scandic-hotels/design-system/IconButton" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useHotelListingDataStore } from "@/stores/hotel-listing-data" -import Alert from "../TempDesignSystem/Alert" import Filter from "./Filter" import Sort from "./Sort" diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/index.tsx index 512a0b1a5..a2919dc1b 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/index.tsx @@ -1,8 +1,9 @@ import { notFound } from "next/navigation" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" import { dt } from "@scandic-hotels/common/dt" +import { Alert } from "@scandic-hotels/design-system/Alert" import { Divider } from "@scandic-hotels/design-system/Divider" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { getBookingConfirmation } from "@/lib/trpc/memoizedRequests" @@ -12,7 +13,6 @@ import Promos from "@/components/HotelReservation/BookingConfirmation/Promos" import Receipt from "@/components/HotelReservation/BookingConfirmation/Receipt" import Rooms from "@/components/HotelReservation/BookingConfirmation/Rooms" import SidePanel from "@/components/HotelReservation/SidePanel" -import Alert from "@/components/TempDesignSystem/Alert" import { getIntl } from "@/i18n" import BookingConfirmationProvider from "@/providers/BookingConfirmationProvider" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/BookingAlert/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/BookingAlert/index.tsx index cf3e7c0bf..6bdb88a09 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/BookingAlert/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/BookingAlert/index.tsx @@ -4,14 +4,14 @@ import { usePathname, useSearchParams } from "next/navigation" import { useEffect, useRef, useState } from "react" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" import { selectRate } from "@scandic-hotels/common/constants/routes/hotelReservation" import useStickyPosition from "@scandic-hotels/common/hooks/useStickyPosition" +import { Alert } from "@scandic-hotels/design-system/Alert" import { BookingErrorCodeEnum } from "@scandic-hotels/trpc/enums/bookingErrorCode" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useEnterDetailsStore } from "@/stores/enter-details" -import Alert from "@/components/TempDesignSystem/Alert" import useLang from "@/hooks/useLang" import styles from "./bookingAlert.module.css" diff --git a/apps/scandic-web/components/HotelReservation/FnFNotAllowedAlert/FnFNotAllowedAlert.tsx b/apps/scandic-web/components/HotelReservation/FnFNotAllowedAlert/FnFNotAllowedAlert.tsx index e4b9ea67f..08755bbe1 100644 --- a/apps/scandic-web/components/HotelReservation/FnFNotAllowedAlert/FnFNotAllowedAlert.tsx +++ b/apps/scandic-web/components/HotelReservation/FnFNotAllowedAlert/FnFNotAllowedAlert.tsx @@ -1,6 +1,6 @@ -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" -import Alert from "@/components/TempDesignSystem/Alert" import { getIntl } from "@/i18n" import styles from "./FnFNotAllowedAlert.module.css" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx index 64a0535e8..08a9aa78d 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/ConfirmationStep/index.tsx @@ -1,13 +1,14 @@ import { useWatch } from "react-hook-form" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" import { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod" import { dt } from "@scandic-hotels/common/dt" +import { Alert } from "@scandic-hotels/design-system/Alert" import Checkbox from "@scandic-hotels/design-system/Form/Checkbox" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Link from "@scandic-hotels/design-system/Link" import { Typography } from "@scandic-hotels/design-system/Typography" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { bookingTermsAndConditions, privacyPolicy } from "@/constants/webHrefs" import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow" @@ -15,7 +16,6 @@ import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow" import PaymentOptionsGroup from "@/components/HotelReservation/EnterDetails/Payment/PaymentOptionsGroup" import MySavedCards from "@/components/HotelReservation/MySavedCards" import PaymentOption from "@/components/HotelReservation/PaymentOption" -import Alert from "@/components/TempDesignSystem/Alert" import useLang from "@/hooks/useLang" import styles from "./confirmationStep.module.css" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/SelectQuantityStep/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/SelectQuantityStep/index.tsx index 241fbf79a..70fe58215 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/SelectQuantityStep/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddAncillaryFlow/AddAncillaryFlowModal/Steps/SelectQuantityStep/index.tsx @@ -1,15 +1,15 @@ import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import Body from "@scandic-hotels/design-system/Body" import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow" -import Alert from "@/components/TempDesignSystem/Alert" import Select from "@/components/TempDesignSystem/Form/Select" import { getErrorMessage } from "@/utils/getErrorMessage" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx index 066325955..590e944ab 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/BookingSummary/index.tsx @@ -2,10 +2,10 @@ import { useIntl } from "react-intl" +import { Alert } from "@scandic-hotels/design-system/Alert" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" -import Alert from "@/components/TempDesignSystem/Alert" import { trackMyStayPageLink } from "@/utils/tracking" import SummaryCard from "./SummaryCard" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/CancelStay/Alerts.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/CancelStay/Alerts.tsx index e2f9792c5..5f423a025 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/CancelStay/Alerts.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/CancelStay/Alerts.tsx @@ -1,12 +1,12 @@ "use client" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import { useMyStayStore } from "@/stores/my-stay" import Modal from "@/components/HotelReservation/MyStay/Modal" -import Alert from "@/components/TempDesignSystem/Alert" interface AlertsProps extends React.PropsWithChildren { closeModal: () => void diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/CannotChangeDate.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/CannotChangeDate.tsx index ba14dd3c4..25637250d 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/CannotChangeDate.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/CannotChangeDate.tsx @@ -1,10 +1,10 @@ "use client" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import Modal from "@/components/HotelReservation/MyStay/Modal" -import Alert from "@/components/TempDesignSystem/Alert" export default function CannotChangeDate({ closeModal, diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/MultiRoomBooking.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/MultiRoomBooking.tsx index cde177682..efb3b4ada 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/MultiRoomBooking.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/MultiRoomBooking.tsx @@ -1,10 +1,10 @@ "use client" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import Modal from "@/components/HotelReservation/MyStay/Modal" -import Alert from "@/components/TempDesignSystem/Alert" export default function MultiRoomBooking({ closeModal, diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/NotMainRoom.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/NotMainRoom.tsx index bca25b4fa..8ca0d0710 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/NotMainRoom.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Alerts/NotMainRoom.tsx @@ -1,10 +1,10 @@ "use client" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import Modal from "@/components/HotelReservation/MyStay/Modal" -import Alert from "@/components/TempDesignSystem/Alert" export default function NotMainRoom({ closeModal, diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/Form/Alerts/NoAvailability.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/Form/Alerts/NoAvailability.tsx index 5cb0c35a0..db3b7e558 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/Form/Alerts/NoAvailability.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ReferenceCard/Actions/NotCancelled/ManageStay/Actions/ChangeDates/Steps/Form/Alerts/NoAvailability.tsx @@ -1,9 +1,8 @@ "use client" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" - -import Alert from "@/components/TempDesignSystem/Alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" export default function NoAvailability() { const intl = useIntl() diff --git a/apps/scandic-web/components/HotelReservation/SelectHotel/NoAvailabilityAlert.tsx b/apps/scandic-web/components/HotelReservation/SelectHotel/NoAvailabilityAlert.tsx index d0a436f21..c99228027 100644 --- a/apps/scandic-web/components/HotelReservation/SelectHotel/NoAvailabilityAlert.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectHotel/NoAvailabilityAlert.tsx @@ -1,7 +1,7 @@ +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" import { alternativeHotels } from "@scandic-hotels/common/constants/routes/hotelReservation" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" -import Alert from "@/components/TempDesignSystem/Alert" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/HotelDescription/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/HotelDescription/index.tsx index 504613841..aa81038d9 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/HotelDescription/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/HotelDescription/index.tsx @@ -4,11 +4,11 @@ import { useState } from "react" import { Button as ButtonRAC } from "react-aria-components" import { useIntl } from "react-intl" +import { Alert } from "@scandic-hotels/design-system/Alert" import { FacilityToIcon } from "@scandic-hotels/design-system/FacilityToIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import HotelDetailsSidePeek from "@/components/SidePeeks/HotelDetailsSidePeek" -import Alert from "@/components/TempDesignSystem/Alert" import styles from "./hotelDescription.module.css" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx index 6af69d75b..3e86fda9f 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/HotelInfoCard/index.tsx @@ -1,5 +1,6 @@ import { dt } from "@scandic-hotels/common/dt" import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting" +import { Alert } from "@scandic-hotels/design-system/Alert" import { Divider } from "@scandic-hotels/design-system/Divider" import { FacilityToIcon } from "@scandic-hotels/design-system/FacilityToIcon" import ImageGallery from "@scandic-hotels/design-system/ImageGallery" @@ -8,7 +9,6 @@ import { TripAdvisorChip } from "@scandic-hotels/design-system/TripAdvisorChip" import { Typography } from "@scandic-hotels/design-system/Typography" import HotelDetailsSidePeek from "@/components/SidePeeks/HotelDetailsSidePeek" -import Alert from "@/components/TempDesignSystem/Alert" import { getIntl } from "@/i18n" import { mapApiImagesToGalleryImages } from "@/utils/imageGallery" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/NoAvailabilityAlert/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/NoAvailabilityAlert/index.tsx index 6c80ed138..0bbba04b7 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/NoAvailabilityAlert/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/NoAvailabilityAlert/index.tsx @@ -1,11 +1,11 @@ "use client" import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" import { alternativeHotels } from "@scandic-hotels/common/constants/routes/hotelReservation" +import { Alert } from "@scandic-hotels/design-system/Alert" import { AvailabilityEnum } from "@scandic-hotels/trpc/enums/selectHotel" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" -import Alert from "@/components/TempDesignSystem/Alert" import { useSelectRateContext } from "@/contexts/SelectRate/SelectRateContext" import useLang from "@/hooks/useLang" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/index.tsx index 1acf7e87e..3d4abfa79 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/index.tsx @@ -3,9 +3,9 @@ import { TRPCClientError } from "@trpc/client" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" -import Alert from "@/components/TempDesignSystem/Alert" import { useSelectRateContext } from "@/contexts/SelectRate/SelectRateContext" import { RateSummary } from "./RateSummary" diff --git a/apps/scandic-web/components/HotelReservation/utils/index.test.ts b/apps/scandic-web/components/HotelReservation/utils/index.test.ts index 3b0b99f4e..adab4d01b 100644 --- a/apps/scandic-web/components/HotelReservation/utils/index.test.ts +++ b/apps/scandic-web/components/HotelReservation/utils/index.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" import { dt } from "@scandic-hotels/common/dt" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" import { getHotelAlertsForBookingDates } from "./index" diff --git a/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Alert/index.tsx b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Alert/index.tsx index ccbc49f35..6926391bb 100644 --- a/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Alert/index.tsx +++ b/apps/scandic-web/components/MyPages/DigitalTeamMemberCard/Alert/index.tsx @@ -3,12 +3,11 @@ import { useRouter, useSearchParams } from "next/navigation" import { useIntl } from "react-intl" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { Alert } from "@scandic-hotels/design-system/Alert" import { DTMC_SUCCESS_BANNER_KEY } from "@/constants/dtmc" -import Alert from "@/components/TempDesignSystem/Alert" - export default function DigitalTeamMemberCardAlert() { const intl = useIntl() const router = useRouter() diff --git a/apps/scandic-web/components/SitewideAlert/index.tsx b/apps/scandic-web/components/SitewideAlert/index.tsx index bb5f1337b..062aae53b 100644 --- a/apps/scandic-web/components/SitewideAlert/index.tsx +++ b/apps/scandic-web/components/SitewideAlert/index.tsx @@ -2,13 +2,13 @@ import { useCallback, useRef } from "react" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" 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 { Alert } from "@scandic-hotels/design-system/Alert" import { trpc } from "@scandic-hotels/trpc/client" -import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alert" -import Alert from "@/components/TempDesignSystem/Alert" import useLang from "@/hooks/useLang" import styles from "./sitewideAlert.module.css" diff --git a/packages/trpc/lib/types/alert.ts b/packages/common/constants/alert.ts similarity index 57% rename from packages/trpc/lib/types/alert.ts rename to packages/common/constants/alert.ts index 9fcff432f..87f527135 100644 --- a/packages/trpc/lib/types/alert.ts +++ b/packages/common/constants/alert.ts @@ -9,3 +9,13 @@ export const AlertVisibleOnEnum = { WEB: "WEB", APP: "APP", } as const + +export type SidepeekContent = { + heading: string + content: { + json?: any + embedded_itemsConnection: { + edges: any + } + } +} diff --git a/packages/common/package.json b/packages/common/package.json index 9588f0a60..0d97dcd1e 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -33,6 +33,7 @@ "./utils/isValidJson": "./utils/isValidJson.ts", "./hooks/*": "./hooks/*.ts", "./stores/*": "./stores/*.ts", + "./constants/alert": "./constants/alert.ts", "./constants/currency": "./constants/currency.ts", "./constants/dateFormats": "./constants/dateFormats.ts", "./constants/facilities": "./constants/facilities.ts", diff --git a/apps/scandic-web/components/TempDesignSystem/Alert/Sidepeek/index.tsx b/packages/design-system/lib/components/Alert/Sidepeek/index.tsx similarity index 58% rename from apps/scandic-web/components/TempDesignSystem/Alert/Sidepeek/index.tsx rename to packages/design-system/lib/components/Alert/Sidepeek/index.tsx index 9e517d806..db521f99d 100644 --- a/apps/scandic-web/components/TempDesignSystem/Alert/Sidepeek/index.tsx +++ b/packages/design-system/lib/components/Alert/Sidepeek/index.tsx @@ -1,16 +1,16 @@ -"use client" +'use client' -import { useState } from "react" -import { useIntl } from "react-intl" +import { useState } from 'react' +import { useIntl } from 'react-intl' -import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import { JsonToHtml } from "@scandic-hotels/design-system/JsonToHtml" -import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton" -import SidePeek from "@scandic-hotels/design-system/SidePeek" +import { MaterialIcon } from '../../Icons/MaterialIcon' +import { JsonToHtml } from '../../JsonToHtml/JsonToHtml' +import { Button } from '../../Button' +import SidePeek from '../../SidePeek' -import styles from "./sidepeek.module.css" +import styles from './sidepeek.module.css' -import type { AlertSidepeekProps } from "./sidepeek" +import type { AlertSidepeekProps } from './sidepeek' export default function AlertSidepeek({ ctaText, @@ -24,11 +24,11 @@ export default function AlertSidepeek({