From 75a377b59e8143387d8e69d1dcd28352af99d7a9 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Thu, 3 Jul 2025 08:04:36 +0000 Subject: [PATCH] Merged in chore/sw-3145-move-body (pull request #2505) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chore(SW-3145): Move Body component to design-system * Move Body component to design-system Approved-by: Joakim Jäderberg --- .../DynamicContent/Overview/Friend/index.tsx | 2 +- .../Overview/Stats/ExpiringPoints/index.tsx | 2 +- .../Stats/Points/PointsColumn/index.tsx | 3 +- .../JourneyTable/ClientTable/Row/index.tsx | 2 +- .../JourneyTable/ClientTable/index.tsx | 3 +- .../ExpiringPointsTable/index.tsx | 2 +- .../Rewards/NextLevel/index.tsx | 2 +- .../Rewards/Redeem/ConfirmClose.tsx | 3 +- .../Rewards/Redeem/Flows/Campaign.tsx | 2 +- .../Rewards/Redeem/Flows/Tier.tsx | 3 +- .../components/ContentCard/index.tsx | 3 +- .../CityListing/CityListingItem/index.tsx | 2 +- .../CountryMap/CityList/index.tsx | 2 +- .../HotelPage/Map/MapCard/index.tsx | 2 +- .../ContactInformation/index.tsx | 2 +- .../MeetingsAndConferences/index.tsx | 3 +- .../components/DatePicker/Range/Mobile.tsx | 2 +- .../components/DatePicker/Single/Mobile.tsx | 2 +- .../components/DatePicker/index.tsx | 2 +- .../DeprecatedJsonToHtml/renderOptions.tsx | 2 +- .../Filter/Checkbox/index.tsx | 3 +- apps/scandic-web/components/Dialog/index.tsx | 3 +- .../FormContent/BookingCode/index.tsx | 2 +- .../BookingWidget/FormContent/Input/index.tsx | 2 +- .../Search/SearchList/List/ListItem/index.tsx | 3 +- .../FormContent/Search/SearchList/index.tsx | 2 +- .../GuestsRoomsPicker/Counter/index.tsx | 2 +- .../Header/MainMenu/MyPagesMenu/index.tsx | 2 +- .../BookingConfirmation/Header/index.tsx | 3 +- .../HotelDetails/index.tsx | 3 +- .../PaymentDetails/index.tsx | 3 +- .../Promos/Promo/index.tsx | 3 +- .../Rooms/LinkedReservation/Retry.tsx | 3 +- .../HotelReservation/Contact/index.tsx | 2 +- .../EnterDetails/Breakfast/index.tsx | 2 +- .../Details/MemberPriceModal/index.tsx | 2 +- .../Payment/GuaranteeDetails/index.tsx | 3 +- .../MixedRatePaymentBreakdown/index.tsx | 2 +- .../PaymentCallback/TimeoutSpinner/index.tsx | 3 +- .../EnterDetails/Payment/PaymentClient.tsx | 2 +- .../PriceChangeSummary/index.tsx | 2 +- .../EnterDetails/PriceChangeDialog/index.tsx | 2 +- .../EnterDetails/Summary/UI/index.tsx | 2 +- .../FindMyBooking/AdditionalInfoForm.tsx | 3 +- .../HotelReservation/FindMyBooking/index.tsx | 2 +- .../HotelCard/HotelPriceCard/index.tsx | 2 +- .../StandaloneHotelCardDialog/index.tsx | 2 +- .../Steps/SelectQuantityStep/index.tsx | 2 +- .../Ancillaries/AddedAncillaries/index.tsx | 2 +- .../MyStay/ModifyContact/index.tsx | 3 +- .../HotelReservation/PaymentOption/index.tsx | 3 +- .../RateSummary/MobileSummary/Summary.tsx | 2 +- .../RoomsContainer/RateSummary/index.tsx | 2 +- .../SelectedRoomPanel/index.tsx | 2 +- .../InteractiveMap/PoiMapMarkers/index.tsx | 3 +- .../MyPages/Profile/MembershipCards/index.tsx | 2 +- .../Profile/CreditCardRow/index.tsx | 3 +- .../components/SasTierComparison/index.tsx | 2 +- .../JoinLoyalty/Contact/ContactRow/index.tsx | 2 +- .../components/Sidebar/JoinLoyalty/index.tsx | 2 +- .../Accordion/AccordionItem/index.tsx | 2 +- .../TempDesignSystem/Alert/index.tsx | 3 +- .../TempDesignSystem/AncillaryCard/index.tsx | 2 +- .../TempDesignSystem/Card/index.tsx | 3 +- .../components/TempDesignSystem/Card/utils.ts | 8 ++-- .../DeprecatedSelect/index.tsx | 2 +- .../TempDesignSystem/Form/Phone/index.tsx | 2 +- .../TempDesignSystem/Form/TextArea/index.tsx | 3 +- .../TempDesignSystem/LoyaltyCard/index.tsx | 2 +- .../MeetingRoomCard/index.tsx | 2 +- .../TempDesignSystem/TeaserCard/index.tsx | 3 +- .../TempDesignSystem/Text/Body/body.ts | 10 ----- .../TempDesignSystem/Text/Body/index.tsx | 30 -------------- .../TempDesignSystem/Toasts/index.tsx | 2 +- .../lib/components}/Body/body.module.css | 0 .../lib/components/Body/index.tsx | 40 +++++++++++++++++++ .../lib/components}/Body/variants.ts | 14 +++---- packages/design-system/package.json | 1 + 78 files changed, 141 insertions(+), 129 deletions(-) delete mode 100644 apps/scandic-web/components/TempDesignSystem/Text/Body/body.ts delete mode 100644 apps/scandic-web/components/TempDesignSystem/Text/Body/index.tsx rename {apps/scandic-web/components/TempDesignSystem/Text => packages/design-system/lib/components}/Body/body.module.css (100%) create mode 100644 packages/design-system/lib/components/Body/index.tsx rename {apps/scandic-web/components/TempDesignSystem/Text => packages/design-system/lib/components}/Body/variants.ts (89%) diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Overview/Friend/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Overview/Friend/index.tsx index b7f5467cd..08dcbbb80 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Overview/Friend/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Overview/Friend/index.tsx @@ -1,9 +1,9 @@ import { MembershipLevelEnum } from "@scandic-hotels/common/constants/membershipLevels" +import Body from "@scandic-hotels/design-system/Body" import { membershipLevels } from "@/constants/membershipLevels" import MembershipLevelIcon from "@/components/Levels/Icon" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" import { isHighestMembership } from "@/utils/user" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/ExpiringPoints/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/ExpiringPoints/index.tsx index ac41a5c1d..032926919 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/ExpiringPoints/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/ExpiringPoints/index.tsx @@ -1,8 +1,8 @@ import { Lang } from "@scandic-hotels/common/constants/language" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import { getFriendsMembership } from "@scandic-hotels/trpc/routers/user/helpers" -import Body from "@/components/TempDesignSystem/Text/Body" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/Points/PointsColumn/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/Points/PointsColumn/index.tsx index d65a04e9d..d98cabcab 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/Points/PointsColumn/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Overview/Stats/Points/PointsColumn/index.tsx @@ -1,4 +1,5 @@ -import Body from "@/components/TempDesignSystem/Text/Body" +import Body from "@scandic-hotels/design-system/Body" + import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx index 443832f85..9f5e9ff1a 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/Row/index.tsx @@ -4,13 +4,13 @@ import { usePathname } from "next/navigation" import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import { Transactions } from "@scandic-hotels/trpc/enums/transactions" import { webviews } from "@/constants/routes/webviews" import Link from "@/components/TempDesignSystem/Link" import Table from "@/components/TempDesignSystem/Table" -import Body from "@/components/TempDesignSystem/Text/Body" import useLang from "@/hooks/useLang" import AwardPoints from "../../../AwardPoints" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx index 23bc2eefe..cbe2f7f43 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/EarnAndBurn/JourneyTable/ClientTable/index.tsx @@ -2,8 +2,9 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import Table from "@/components/TempDesignSystem/Table" -import Body from "@/components/TempDesignSystem/Text/Body" import Row from "./Row" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx index 08385a291..c885f2d05 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/ExpiringPoints/ExpiringPointsTable/index.tsx @@ -3,9 +3,9 @@ import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import Table from "@/components/TempDesignSystem/Table" -import Body from "@/components/TempDesignSystem/Text/Body" import useLang from "@/hooks/useLang" import AwardPoints from "../../EarnAndBurn/AwardPoints" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx index ce12dbd2e..0d26e3623 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/NextLevel/index.tsx @@ -1,6 +1,7 @@ import { Lock } from "react-feather" import { MembershipLevelEnum } from "@scandic-hotels/common/constants/membershipLevels" +import Body from "@scandic-hotels/design-system/Body" import { getMembershipLevel } from "@/lib/trpc/memoizedRequests" import { serverClient } from "@/lib/trpc/server" @@ -10,7 +11,6 @@ import SectionHeader from "@/components/Section/Header" import SectionLink from "@/components/Section/Link" import Chip from "@/components/TempDesignSystem/Chip" import Grids from "@/components/TempDesignSystem/Grids" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx index 9417ead55..243107239 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/ConfirmClose.tsx @@ -1,7 +1,8 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import useRedeemFlow from "./useRedeemFlow" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx index 7b488302e..1f260d084 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Campaign.tsx @@ -2,11 +2,11 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { toast } from "@/components/TempDesignSystem/Toasts" diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx index 2f91cf2ac..8b3cf2b38 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/Flows/Tier.tsx @@ -2,9 +2,10 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import JsonToHtml from "@/components/JsonToHtml" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { isRestaurantOnSiteTierReward } from "@/utils/rewards" diff --git a/apps/scandic-web/components/ContentCard/index.tsx b/apps/scandic-web/components/ContentCard/index.tsx index a77bc66f8..6bce5a56d 100644 --- a/apps/scandic-web/components/ContentCard/index.tsx +++ b/apps/scandic-web/components/ContentCard/index.tsx @@ -1,7 +1,8 @@ +import Body from "@scandic-hotels/design-system/Body" + import Image from "@/components/Image" import Chip from "@/components/TempDesignSystem/Chip" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./contentCard.module.css" diff --git a/apps/scandic-web/components/ContentType/DestinationPage/CityListing/CityListingItem/index.tsx b/apps/scandic-web/components/ContentType/DestinationPage/CityListing/CityListingItem/index.tsx index 17240bae4..7fa65706d 100644 --- a/apps/scandic-web/components/ContentType/DestinationPage/CityListing/CityListingItem/index.tsx +++ b/apps/scandic-web/components/ContentType/DestinationPage/CityListing/CityListingItem/index.tsx @@ -3,11 +3,11 @@ import Link from "next/link" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import { Divider } from "@scandic-hotels/design-system/Divider" import ImageGallery from "@/components/ImageGallery" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { mapImageVaultImagesToGalleryImages } from "@/utils/imageGallery" 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 2df343cb8..39031c060 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 Body from "@scandic-hotels/design-system/Body" import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType" import { useDestinationDataStore } from "@/stores/destination-data" import DestinationFilterAndSort from "@/components/DestinationFilterAndSort" import Alert from "@/components/TempDesignSystem/Alert" -import Body from "@/components/TempDesignSystem/Text/Body" import CityListItem from "../CityListItem" import CityListSkeleton from "./CityListSkeleton" diff --git a/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx index 93cecf71e..b7b81a355 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/Map/MapCard/index.tsx @@ -5,11 +5,11 @@ import { useParams } from "next/navigation" import { useEffect, useState } from "react" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import PoiMarker from "@/components/Maps/Markers/Poi" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { trackHotelMapClick } from "@/utils/tracking" diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx index 55547c375..eef8363d2 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/AboutTheHotel/ContactInformation/index.tsx @@ -1,3 +1,4 @@ +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon" import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon" @@ -5,7 +6,6 @@ import { Country } from "@scandic-hotels/trpc/types/country" import Image from "@/components/Image" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" diff --git a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx index 8d23c5657..4578291c2 100644 --- a/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx +++ b/apps/scandic-web/components/ContentType/HotelPage/SidePeeks/MeetingsAndConferences/index.tsx @@ -1,6 +1,7 @@ +import Body from "@scandic-hotels/design-system/Body" + import ButtonLink from "@/components/ButtonLink" import SidePeek from "@/components/TempDesignSystem/SidePeek" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" diff --git a/apps/scandic-web/components/DatePicker/Range/Mobile.tsx b/apps/scandic-web/components/DatePicker/Range/Mobile.tsx index 864103431..9364a27dc 100644 --- a/apps/scandic-web/components/DatePicker/Range/Mobile.tsx +++ b/apps/scandic-web/components/DatePicker/Range/Mobile.tsx @@ -5,11 +5,11 @@ import { useIntl } from "react-intl" import { Lang } from "@scandic-hotels/common/constants/language" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import useLang from "@/hooks/useLang" import { locales } from "../locales" diff --git a/apps/scandic-web/components/DatePicker/Single/Mobile.tsx b/apps/scandic-web/components/DatePicker/Single/Mobile.tsx index 9070c8167..a33333c25 100644 --- a/apps/scandic-web/components/DatePicker/Single/Mobile.tsx +++ b/apps/scandic-web/components/DatePicker/Single/Mobile.tsx @@ -4,9 +4,9 @@ import { useIntl } from "react-intl" import { Lang } from "@scandic-hotels/common/constants/language" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import useLang from "@/hooks/useLang" diff --git a/apps/scandic-web/components/DatePicker/index.tsx b/apps/scandic-web/components/DatePicker/index.tsx index 41ae16f70..e0a522312 100644 --- a/apps/scandic-web/components/DatePicker/index.tsx +++ b/apps/scandic-web/components/DatePicker/index.tsx @@ -4,10 +4,10 @@ import { useFormContext, useWatch } from "react-hook-form" import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import { longDateFormat } from "@/constants/dateFormats" -import Body from "@/components/TempDesignSystem/Text/Body" import useLang from "@/hooks/useLang" import DatePickerRangeDesktop from "./Range/Desktop" diff --git a/apps/scandic-web/components/DeprecatedJsonToHtml/renderOptions.tsx b/apps/scandic-web/components/DeprecatedJsonToHtml/renderOptions.tsx index ebeb5ef90..030711521 100644 --- a/apps/scandic-web/components/DeprecatedJsonToHtml/renderOptions.tsx +++ b/apps/scandic-web/components/DeprecatedJsonToHtml/renderOptions.tsx @@ -1,4 +1,5 @@ import { removeMultipleSlashes } from "@scandic-hotels/common/utils/url" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" import { @@ -14,7 +15,6 @@ import Link from "@/components/TempDesignSystem/Link" import ImageContainer from "../ImageContainer" import Table from "../TempDesignSystem/Table" import BiroScript from "../TempDesignSystem/Text/BiroScript" -import Body from "../TempDesignSystem/Text/Body" import Footnote from "../TempDesignSystem/Text/Footnote" import Subtitle from "../TempDesignSystem/Text/Subtitle" import Title from "../TempDesignSystem/Text/Title" diff --git a/apps/scandic-web/components/DestinationFilterAndSort/Filter/Checkbox/index.tsx b/apps/scandic-web/components/DestinationFilterAndSort/Filter/Checkbox/index.tsx index 27a928e79..574f7950c 100644 --- a/apps/scandic-web/components/DestinationFilterAndSort/Filter/Checkbox/index.tsx +++ b/apps/scandic-web/components/DestinationFilterAndSort/Filter/Checkbox/index.tsx @@ -2,10 +2,9 @@ import { Checkbox as AriaCheckbox } from "react-aria-components" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import Body from "@/components/TempDesignSystem/Text/Body" - import styles from "./checkbox.module.css" interface CheckboxProps { diff --git a/apps/scandic-web/components/Dialog/index.tsx b/apps/scandic-web/components/Dialog/index.tsx index 4e8f286d6..a038acdab 100644 --- a/apps/scandic-web/components/Dialog/index.tsx +++ b/apps/scandic-web/components/Dialog/index.tsx @@ -6,10 +6,11 @@ import { ModalOverlay, } from "react-aria-components" +import Body from "@scandic-hotels/design-system/Body" + import LoadingSpinner from "@/components/LoadingSpinner" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./dialog.module.css" diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx index 698f6bdf6..7f24ec85f 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx @@ -4,6 +4,7 @@ import { type FieldError, useFormContext } from "react-hook-form" import { useIntl } from "react-intl" import { useMediaQuery } from "usehooks-ts" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" @@ -15,7 +16,6 @@ import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" import Input from "@/components/TempDesignSystem/Form/Input" import { getErrorMessage } from "@/components/TempDesignSystem/Form/Input/errors" import Switch from "@/components/TempDesignSystem/Form/Switch" -import Body from "@/components/TempDesignSystem/Text/Body" import { Input as BookingWidgetInput } from "../Input" import { isMultiRoomError } from "../utils" diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Input/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Input/index.tsx index 757976a82..07d337f5c 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Input/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Input/index.tsx @@ -1,7 +1,7 @@ import React, { forwardRef, type InputHTMLAttributes } from "react" import { Input as InputRAC } from "react-aria-components" -import Body from "@/components/TempDesignSystem/Text/Body" +import Body from "@scandic-hotels/design-system/Body" import styles from "./input.module.css" diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/index.tsx index f43515792..ac87120e6 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/List/ListItem/index.tsx @@ -1,5 +1,6 @@ +import Body from "@scandic-hotels/design-system/Body" + import SkeletonShimmer from "@/components/SkeletonShimmer" -import Body from "@/components/TempDesignSystem/Text/Body" import { listItemVariants } from "./variants" diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx index cca0250a3..45b0c8f7c 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/Search/SearchList/index.tsx @@ -4,12 +4,12 @@ import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" import { useDebounceValue } from "usehooks-ts" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { trpc } from "@scandic-hotels/trpc/client" -import Body from "@/components/TempDesignSystem/Text/Body" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import useLang from "@/hooks/useLang" diff --git a/apps/scandic-web/components/GuestsRoomsPicker/Counter/index.tsx b/apps/scandic-web/components/GuestsRoomsPicker/Counter/index.tsx index 4e170c5f6..2755eaa9b 100644 --- a/apps/scandic-web/components/GuestsRoomsPicker/Counter/index.tsx +++ b/apps/scandic-web/components/GuestsRoomsPicker/Counter/index.tsx @@ -1,9 +1,9 @@ "use client" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import styles from "./counter.module.css" diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx index 3b393a770..956e2f841 100644 --- a/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMenu/index.tsx @@ -3,12 +3,12 @@ import { useRef } from "react" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import useDropdownStore from "@/stores/main-menu" import SkeletonShimmer from "@/components/SkeletonShimmer" -import Body from "@/components/TempDesignSystem/Text/Body" import useClickOutside from "@/hooks/useClickOutside" import { useHandleKeyUp } from "@/hooks/useHandleKeyUp" import { getInitials } from "@/utils/user" diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx index e9269ebf1..14abd41cd 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Header/index.tsx @@ -2,7 +2,8 @@ import { useIntl } from "react-intl" -import Body from "@/components/TempDesignSystem/Text/Body" +import Body from "@scandic-hotels/design-system/Body" + import Title from "@/components/TempDesignSystem/Text/Title" import AddToCalendar from "../../AddToCalendar" diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx index f85e46fd3..111416560 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/HotelDetails/index.tsx @@ -2,8 +2,9 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./hotelDetails.module.css" diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx index facf18909..44b4f7fcc 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/PaymentDetails/index.tsx @@ -2,10 +2,11 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import { useBookingConfirmationStore } from "@/stores/booking-confirmation" import SkeletonShimmer from "@/components/SkeletonShimmer" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./paymentDetails.module.css" diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/Promo/index.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/Promo/index.tsx index 87b7f4748..49f34de61 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/Promo/index.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Promos/Promo/index.tsx @@ -1,6 +1,7 @@ +import Body from "@scandic-hotels/design-system/Body" + import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import styles from "./promo.module.css" diff --git a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx index 72bd589ab..788f880a8 100644 --- a/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx +++ b/apps/scandic-web/components/HotelReservation/BookingConfirmation/Rooms/LinkedReservation/Retry.tsx @@ -2,8 +2,9 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import styles from "./retry.module.css" diff --git a/apps/scandic-web/components/HotelReservation/Contact/index.tsx b/apps/scandic-web/components/HotelReservation/Contact/index.tsx index 936065235..b20f1c5cc 100644 --- a/apps/scandic-web/components/HotelReservation/Contact/index.tsx +++ b/apps/scandic-web/components/HotelReservation/Contact/index.tsx @@ -2,12 +2,12 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import FacebookIcon from "@scandic-hotels/design-system/Icons/FacebookIcon" import InstagramIcon from "@scandic-hotels/design-system/Icons/InstagramIcon" import Image from "@/components/Image" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import useLang from "@/hooks/useLang" import styles from "./contact.module.css" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx index 5a47124ca..72aab30bf 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx @@ -5,6 +5,7 @@ import { useCallback, useEffect } from "react" import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import BreakfastBuffetIcon from "@scandic-hotels/design-system/Icons/BreakfastBuffetIcon" import NoBreakfastBuffetIcon from "@scandic-hotels/design-system/Icons/NoBreakfastBuffetIcon" import { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast" @@ -12,7 +13,6 @@ import { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast" import { useEnterDetailsStore } from "@/stores/enter-details" import RadioCard from "@/components/TempDesignSystem/Form/RadioCard" -import Body from "@/components/TempDesignSystem/Text/Body" import { useRoomContext } from "@/contexts/Details/Room" import { formatPrice } from "@/utils/numberFormatting" import { trackBreakfastSelection } from "@/utils/tracking" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/MemberPriceModal/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/MemberPriceModal/index.tsx index 849fbb8ae..320119014 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Details/MemberPriceModal/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Details/MemberPriceModal/index.tsx @@ -5,11 +5,11 @@ import { useFormContext, useWatch } from "react-hook-form" import { useIntl } from "react-intl" import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import Body from "@scandic-hotels/design-system/Body" import MagicWandIcon from "@scandic-hotels/design-system/Icons/MagicWandIcon" import Modal from "@/components/Modal" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import Title from "@/components/TempDesignSystem/Text/Title" import { useRoomContext } from "@/contexts/Details/Room" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/GuaranteeDetails/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/GuaranteeDetails/index.tsx index b574dac07..37c4d8359 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/GuaranteeDetails/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/GuaranteeDetails/index.tsx @@ -1,10 +1,9 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import Body from "@/components/TempDesignSystem/Text/Body" - import styles from "./guaranteeDetails.module.css" export default function GuaranteeDetails() { diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/MixedRatePaymentBreakdown/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/MixedRatePaymentBreakdown/index.tsx index a4ac4b4ff..df36e787a 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/MixedRatePaymentBreakdown/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/MixedRatePaymentBreakdown/index.tsx @@ -1,9 +1,9 @@ import React from "react" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" -import Body from "@/components/TempDesignSystem/Text/Body" import { formatPrice } from "@/utils/numberFormatting" import { diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx index 8d951f802..15125f47b 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentCallback/TimeoutSpinner/index.tsx @@ -2,11 +2,12 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import { customerService } from "@/constants/webHrefs" import LoadingSpinner from "@/components/LoadingSpinner" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import useLang from "@/hooks/useLang" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx index ad02b0369..6ea0da737 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx @@ -10,6 +10,7 @@ import { useIntl } from "react-intl" import { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod" import { selectRate } from "@scandic-hotels/common/constants/routes/hotelReservation" +import Body from "@scandic-hotels/design-system/Body" import { Button } from "@scandic-hotels/design-system/Button" import { Typography } from "@scandic-hotels/design-system/Typography" import { trpc } from "@scandic-hotels/trpc/client" @@ -25,7 +26,6 @@ import { useEnterDetailsStore } from "@/stores/enter-details" import PaymentOption from "@/components/HotelReservation/PaymentOption" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" -import Body from "@/components/TempDesignSystem/Text/Body" import { useAvailablePaymentOptions } from "@/hooks/booking/useAvailablePaymentOptions" import { useHandleBookingStatus } from "@/hooks/booking/useHandleBookingStatus" import useLang from "@/hooks/useLang" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/PriceChangeSummary/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/PriceChangeSummary/index.tsx index e9c467367..46ca2f2fa 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/PriceChangeSummary/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/PriceChangeSummary/index.tsx @@ -9,12 +9,12 @@ import { } from "react-aria-components" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { formatPrice } from "@/utils/numberFormatting" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/index.tsx index fb976771f..07227d0d1 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/PriceChangeDialog/index.tsx @@ -1,13 +1,13 @@ import { Dialog, Modal, ModalOverlay } from "react-aria-components" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { useEnterDetailsStore } from "@/stores/enter-details" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import Title from "@/components/TempDesignSystem/Text/Title" import { formatPrice } from "@/utils/numberFormatting" diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/index.tsx index 52315276d..493d1e39c 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/index.tsx @@ -6,6 +6,7 @@ import { useMediaQuery } from "usehooks-ts" import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import { Divider } from "@scandic-hotels/design-system/Divider" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" @@ -16,7 +17,6 @@ import BookingCodeChip from "@/components/BookingCodeChip" import PriceDetailsModal from "@/components/HotelReservation/PriceDetailsModal" import { isBookingCodeRate } from "@/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/utils" import SignupPromoDesktop from "@/components/HotelReservation/SignupPromo/Desktop" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import useLang from "@/hooks/useLang" import { formatPrice } from "@/utils/numberFormatting" diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/AdditionalInfoForm.tsx b/apps/scandic-web/components/HotelReservation/FindMyBooking/AdditionalInfoForm.tsx index 225b07f75..5638d2d20 100644 --- a/apps/scandic-web/components/HotelReservation/FindMyBooking/AdditionalInfoForm.tsx +++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/AdditionalInfoForm.tsx @@ -5,9 +5,10 @@ import { useRouter } from "next/navigation" import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import Button from "@/components/TempDesignSystem/Button" import Input from "@/components/TempDesignSystem/Form/Input" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx b/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx index 3992a4aa5..e34bc1d76 100644 --- a/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx +++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/index.tsx @@ -6,6 +6,7 @@ import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" import { myStay } from "@scandic-hotels/common/constants/routes/myStay" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { trpc } from "@scandic-hotels/trpc/client" @@ -14,7 +15,6 @@ import { customerService } from "@/constants/webHrefs" import Button from "@/components/TempDesignSystem/Button" import Input from "@/components/TempDesignSystem/Form/Input" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { toast } from "@/components/TempDesignSystem/Toasts" import useLang from "@/hooks/useLang" diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx index 49cf7a9ef..0e7c51d4d 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/HotelPriceCard/index.tsx @@ -1,11 +1,11 @@ import { cx } from "class-variance-authority" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" import { RateTypeEnum } from "@scandic-hotels/trpc/enums/rateType" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./hotelPriceCard.module.css" diff --git a/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx index ae37b3399..3994af76f 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCardDialog/StandaloneHotelCardDialog/index.tsx @@ -4,6 +4,7 @@ import { useState } from "react" import { useIntl } from "react-intl" import { selectRate } from "@scandic-hotels/common/constants/routes/hotelReservation" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { IconButton } from "@scandic-hotels/design-system/IconButton" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" @@ -12,7 +13,6 @@ import { Typography } from "@scandic-hotels/design-system/Typography" import { FacilityToIcon } from "@/components/ContentType/HotelPage/data" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import useLang from "@/hooks/useLang" 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 30a5edf73..af80f9664 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,6 +1,7 @@ import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import { AlertTypeEnum } from "@scandic-hotels/trpc/types/alertType" @@ -10,7 +11,6 @@ import { useAddAncillaryStore } from "@/stores/my-stay/add-ancillary-flow" import Alert from "@/components/TempDesignSystem/Alert" import ErrorMessage from "@/components/TempDesignSystem/Form/ErrorMessage" import Select from "@/components/TempDesignSystem/Form/Select" -import Body from "@/components/TempDesignSystem/Text/Body" import styles from "./selectQuantityStep.module.css" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddedAncillaries/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddedAncillaries/index.tsx index 2f1512781..ed5ad29d7 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddedAncillaries/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/Ancillaries/AddedAncillaries/index.tsx @@ -1,13 +1,13 @@ import { Fragment } from "react" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import { Divider } from "@scandic-hotels/design-system/Divider" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { BreakfastPackageEnum } from "@scandic-hotels/trpc/enums/breakfast" import Accordion from "@/components/TempDesignSystem/Accordion" import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { formatPrice } from "@/utils/numberFormatting" diff --git a/apps/scandic-web/components/HotelReservation/MyStay/ModifyContact/index.tsx b/apps/scandic-web/components/HotelReservation/MyStay/ModifyContact/index.tsx index 151d1d196..eecc1f49f 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/ModifyContact/index.tsx +++ b/apps/scandic-web/components/HotelReservation/MyStay/ModifyContact/index.tsx @@ -3,10 +3,11 @@ import { useEffect } from "react" import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" + import CountrySelect from "@/components/TempDesignSystem/Form/Country" import Input from "@/components/TempDesignSystem/Form/Input" import Phone from "@/components/TempDesignSystem/Form/Phone" -import Body from "@/components/TempDesignSystem/Text/Body" import styles from "./modifyContact.module.css" diff --git a/apps/scandic-web/components/HotelReservation/PaymentOption/index.tsx b/apps/scandic-web/components/HotelReservation/PaymentOption/index.tsx index 0aba9e4ef..8774ced8e 100644 --- a/apps/scandic-web/components/HotelReservation/PaymentOption/index.tsx +++ b/apps/scandic-web/components/HotelReservation/PaymentOption/index.tsx @@ -2,12 +2,11 @@ import { cx } from "class-variance-authority" import Image from "next/image" import { Radio } from "react-aria-components" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { PAYMENT_METHOD_ICONS } from "@/constants/booking" -import Body from "@/components/TempDesignSystem/Text/Body" - import styles from "./paymentOption.module.css" import type { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/Summary.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/Summary.tsx index f315bf4ce..3e12160db 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/Summary.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/Summary.tsx @@ -4,6 +4,7 @@ import { Button as ButtonRAC } from "react-aria-components" import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import { Button } from "@scandic-hotels/design-system/Button" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" @@ -16,7 +17,6 @@ import { useRatesStore } from "@/stores/select-rate" import PriceDetailsModal from "@/components/HotelReservation/PriceDetailsModal" import SignupPromoDesktop from "@/components/HotelReservation/SignupPromo/Desktop" import Modal from "@/components/Modal" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import useLang from "@/hooks/useLang" import { formatPrice } from "@/utils/numberFormatting" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx index aa50ef414..6ec453a5e 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx @@ -5,6 +5,7 @@ import { useState, useTransition } from "react" import { useIntl } from "react-intl" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { RateEnum } from "@scandic-hotels/trpc/enums/rate" import { RateTypeEnum } from "@scandic-hotels/trpc/enums/rateType" @@ -13,7 +14,6 @@ import { useRatesStore } from "@/stores/select-rate" import SignupPromoDesktop from "@/components/HotelReservation/SignupPromo/Desktop" import Button from "@/components/TempDesignSystem/Button" -import Body from "@/components/TempDesignSystem/Text/Body" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { isValidClientSession } from "@/utils/clientSession" diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/MultiRoomWrapper/SelectedRoomPanel/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/MultiRoomWrapper/SelectedRoomPanel/index.tsx index 7e0b35c93..cf4d8baa1 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/MultiRoomWrapper/SelectedRoomPanel/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/MultiRoomWrapper/SelectedRoomPanel/index.tsx @@ -4,6 +4,7 @@ import { useIntl } from "react-intl" import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" import { dt } from "@scandic-hotels/common/dt" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { RateEnum } from "@scandic-hotels/trpc/enums/rate" @@ -13,7 +14,6 @@ import { useRatesStore } from "@/stores/select-rate" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import Chip from "@/components/TempDesignSystem/Chip" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { useRoomContext } from "@/contexts/SelectRate/Room" import { isValidClientSession } from "@/utils/clientSession" diff --git a/apps/scandic-web/components/Maps/InteractiveMap/PoiMapMarkers/index.tsx b/apps/scandic-web/components/Maps/InteractiveMap/PoiMapMarkers/index.tsx index 0fbdb84fb..9155cd233 100644 --- a/apps/scandic-web/components/Maps/InteractiveMap/PoiMapMarkers/index.tsx +++ b/apps/scandic-web/components/Maps/InteractiveMap/PoiMapMarkers/index.tsx @@ -4,10 +4,9 @@ import { } from "@vis.gl/react-google-maps" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" -import Body from "@/components/TempDesignSystem/Text/Body" - import HotelMarkerByType from "../../Markers" import PoiMarker from "../../Markers/Poi" diff --git a/apps/scandic-web/components/MyPages/Profile/MembershipCards/index.tsx b/apps/scandic-web/components/MyPages/Profile/MembershipCards/index.tsx index bb8ac4d07..6cb4b6bdf 100644 --- a/apps/scandic-web/components/MyPages/Profile/MembershipCards/index.tsx +++ b/apps/scandic-web/components/MyPages/Profile/MembershipCards/index.tsx @@ -1,10 +1,10 @@ +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import { getMembershipCards } from "@/lib/trpc/memoizedRequests" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import { getIntl } from "@/i18n" import styles from "./membershipcards.module.css" diff --git a/apps/scandic-web/components/Profile/CreditCardRow/index.tsx b/apps/scandic-web/components/Profile/CreditCardRow/index.tsx index f196bd50d..dc2d4c9b4 100644 --- a/apps/scandic-web/components/Profile/CreditCardRow/index.tsx +++ b/apps/scandic-web/components/Profile/CreditCardRow/index.tsx @@ -1,8 +1,7 @@ +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import Body from "@/components/TempDesignSystem/Text/Body" - import DeleteCreditCardConfirmation from "../DeleteCreditCardConfirmation" import styles from "./creditCardRow.module.css" diff --git a/apps/scandic-web/components/SasTierComparison/index.tsx b/apps/scandic-web/components/SasTierComparison/index.tsx index a0ac2f78c..29603ca67 100644 --- a/apps/scandic-web/components/SasTierComparison/index.tsx +++ b/apps/scandic-web/components/SasTierComparison/index.tsx @@ -1,6 +1,7 @@ "use client" import Image from "next/image" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" @@ -9,7 +10,6 @@ import Link from "@/components/TempDesignSystem/Link" import SectionContainer from "../Section/Container" import Button from "../TempDesignSystem/Button" -import Body from "../TempDesignSystem/Text/Body" import Subtitle from "../TempDesignSystem/Text/Subtitle" import Title from "../TempDesignSystem/Text/Title" diff --git a/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx b/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx index 8982d03b4..2184300b0 100644 --- a/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx +++ b/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx @@ -1,3 +1,4 @@ +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon, type MaterialIconSetIconProps, @@ -7,7 +8,6 @@ import { getValueFromContactConfig } from "@scandic-hotels/trpc/utils/contactCon import { serverClient } from "@/lib/trpc/server" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Footnote from "@/components/TempDesignSystem/Text/Footnote" // import { getValueFromContactConfig } from "@/utils/contactConfig" diff --git a/apps/scandic-web/components/Sidebar/JoinLoyalty/index.tsx b/apps/scandic-web/components/Sidebar/JoinLoyalty/index.tsx index b957f5e00..7098f4579 100644 --- a/apps/scandic-web/components/Sidebar/JoinLoyalty/index.tsx +++ b/apps/scandic-web/components/Sidebar/JoinLoyalty/index.tsx @@ -1,10 +1,10 @@ +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { ScandicFriends } from "@/components/Levels" import LoginButton from "@/components/LoginButton" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" import { isLoggedInUser } from "@/utils/isLoggedInUser" diff --git a/apps/scandic-web/components/TempDesignSystem/Accordion/AccordionItem/index.tsx b/apps/scandic-web/components/TempDesignSystem/Accordion/AccordionItem/index.tsx index b6c6a8191..41ac27ddc 100644 --- a/apps/scandic-web/components/TempDesignSystem/Accordion/AccordionItem/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Accordion/AccordionItem/index.tsx @@ -2,12 +2,12 @@ import { useRef } from "react" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { IconByIconName } from "@/components/Icons/IconByIconName" import { trackAccordionClick } from "@/utils/tracking" -import Body from "../../Text/Body" import Subtitle from "../../Text/Subtitle" import { accordionItemVariants } from "./variants" diff --git a/apps/scandic-web/components/TempDesignSystem/Alert/index.tsx b/apps/scandic-web/components/TempDesignSystem/Alert/index.tsx index 8efe55751..18cdfb31d 100644 --- a/apps/scandic-web/components/TempDesignSystem/Alert/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Alert/index.tsx @@ -1,10 +1,9 @@ "use client" +import Body from "@scandic-hotels/design-system/Body" import { Button } from "@scandic-hotels/design-system/Button" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" -import Body from "@/components/TempDesignSystem/Text/Body" - import Link from "../Link" import AlertSidepeek from "./Sidepeek" import { IconByAlertType } from "./utils" diff --git a/apps/scandic-web/components/TempDesignSystem/AncillaryCard/index.tsx b/apps/scandic-web/components/TempDesignSystem/AncillaryCard/index.tsx index aa372e83c..0801b6b02 100644 --- a/apps/scandic-web/components/TempDesignSystem/AncillaryCard/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/AncillaryCard/index.tsx @@ -1,10 +1,10 @@ import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" import Image from "@/components/Image" -import Body from "@/components/TempDesignSystem/Text/Body" import { formatPrice } from "@/utils/numberFormatting" import styles from "./ancillaryCard.module.css" diff --git a/apps/scandic-web/components/TempDesignSystem/Card/index.tsx b/apps/scandic-web/components/TempDesignSystem/Card/index.tsx index 0473bac89..297e69df7 100644 --- a/apps/scandic-web/components/TempDesignSystem/Card/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Card/index.tsx @@ -1,10 +1,11 @@ import { cx } from "class-variance-authority" import Link from "next/link" +import Body from "@scandic-hotels/design-system/Body" + import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import BiroScript from "@/components/TempDesignSystem/Text/BiroScript" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { diff --git a/apps/scandic-web/components/TempDesignSystem/Card/utils.ts b/apps/scandic-web/components/TempDesignSystem/Card/utils.ts index 0c75c443a..3751d1b13 100644 --- a/apps/scandic-web/components/TempDesignSystem/Card/utils.ts +++ b/apps/scandic-web/components/TempDesignSystem/Card/utils.ts @@ -1,9 +1,10 @@ +import type Body from "@scandic-hotels/design-system/Body" import type { VariantProps } from "class-variance-authority" +import type { ComponentProps } from "react" import type { ButtonProps } from "@/components/TempDesignSystem/Button/button" import type { CardProps } from "@/components/TempDesignSystem/Card/card" import type { biroScriptVariants } from "@/components/TempDesignSystem/Text/BiroScript/variants" -import type { bodyVariants } from "@/components/TempDesignSystem/Text/Body/variants" import type { headingVariants } from "@/components/TempDesignSystem/Text/Title/variants" export function getTitleFontColor( @@ -52,9 +53,8 @@ export function getScriptFontColor( } } -export function getBodyFontColor( - theme: CardProps["theme"] -): VariantProps["color"] { +type BodyColor = ComponentProps["color"] +export function getBodyFontColor(theme: CardProps["theme"]): BodyColor { switch (theme) { case "one": return "primaryLight" diff --git a/apps/scandic-web/components/TempDesignSystem/DeprecatedSelect/index.tsx b/apps/scandic-web/components/TempDesignSystem/DeprecatedSelect/index.tsx index 48a241403..beece0629 100644 --- a/apps/scandic-web/components/TempDesignSystem/DeprecatedSelect/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/DeprecatedSelect/index.tsx @@ -10,9 +10,9 @@ import { SelectValue, } from "react-aria-components" +import Body from "@scandic-hotels/design-system/Body" import { Label } from "@scandic-hotels/design-system/Label" -import Body from "@/components/TempDesignSystem/Text/Body" import useSetOverflowVisibleOnRA from "@/hooks/useSetOverflowVisibleOnRA" import SelectChevron from "../Form/SelectChevron" diff --git a/apps/scandic-web/components/TempDesignSystem/Form/Phone/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/Phone/index.tsx index d174b0e2c..ef81bdd5b 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/Phone/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/Phone/index.tsx @@ -15,6 +15,7 @@ import { } from "react-international-phone" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Input } from "@scandic-hotels/design-system/Input" import { Label } from "@scandic-hotels/design-system/Label" @@ -22,7 +23,6 @@ import { Label } from "@scandic-hotels/design-system/Label" import { getDefaultCountryFromLang } from "@/constants/languages" import ErrorMessage from "@/components/TempDesignSystem/Form/ErrorMessage" -import Body from "@/components/TempDesignSystem/Text/Body" import useLang from "@/hooks/useLang" import styles from "./phone.module.css" diff --git a/apps/scandic-web/components/TempDesignSystem/Form/TextArea/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/TextArea/index.tsx index 67f9de3ac..79c12e912 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/TextArea/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/TextArea/index.tsx @@ -8,12 +8,11 @@ import { } from "react-aria-components" import { Controller, useFormContext } from "react-hook-form" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Label } from "@scandic-hotels/design-system/Label" -import Body from "../../Text/Body" - import styles from "./textarea.module.css" import type { TextAreaProps } from "./input" diff --git a/apps/scandic-web/components/TempDesignSystem/LoyaltyCard/index.tsx b/apps/scandic-web/components/TempDesignSystem/LoyaltyCard/index.tsx index 9c1d33c11..bab1b07bf 100644 --- a/apps/scandic-web/components/TempDesignSystem/LoyaltyCard/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/LoyaltyCard/index.tsx @@ -1,8 +1,8 @@ +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Image from "@/components/Image" import Link from "@/components/TempDesignSystem/Link" -import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { loyaltyCardVariants } from "./variants" diff --git a/apps/scandic-web/components/TempDesignSystem/MeetingRoomCard/index.tsx b/apps/scandic-web/components/TempDesignSystem/MeetingRoomCard/index.tsx index 8a9a29844..cca3be041 100644 --- a/apps/scandic-web/components/TempDesignSystem/MeetingRoomCard/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/MeetingRoomCard/index.tsx @@ -2,6 +2,7 @@ import { useState } from "react" import { useIntl } from "react-intl" +import Body from "@scandic-hotels/design-system/Body" import Caption from "@scandic-hotels/design-system/Caption" import { Divider } from "@scandic-hotels/design-system/Divider" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" @@ -9,7 +10,6 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Image from "@/components/Image" import ShowMoreButton from "../ShowMoreButton" -import Body from "../Text/Body" import Subtitle from "../Text/Subtitle" import { translateRoomLighting, translateSeatingType } from "./utils" diff --git a/apps/scandic-web/components/TempDesignSystem/TeaserCard/index.tsx b/apps/scandic-web/components/TempDesignSystem/TeaserCard/index.tsx index a1d932a9c..587331942 100644 --- a/apps/scandic-web/components/TempDesignSystem/TeaserCard/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/TeaserCard/index.tsx @@ -1,6 +1,7 @@ +import Body from "@scandic-hotels/design-system/Body" + import ButtonLink from "@/components/ButtonLink" import Image from "@/components/Image" -import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "../Text/Subtitle" import TeaserCardSidepeek from "./Sidepeek" diff --git a/apps/scandic-web/components/TempDesignSystem/Text/Body/body.ts b/apps/scandic-web/components/TempDesignSystem/Text/Body/body.ts deleted file mode 100644 index e84ef73b3..000000000 --- a/apps/scandic-web/components/TempDesignSystem/Text/Body/body.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { VariantProps } from "class-variance-authority" - -import type { bodyVariants } from "./variants" - -export interface BodyProps - extends Omit, "color">, - VariantProps { - asChild?: boolean - fontOnly?: boolean -} diff --git a/apps/scandic-web/components/TempDesignSystem/Text/Body/index.tsx b/apps/scandic-web/components/TempDesignSystem/Text/Body/index.tsx deleted file mode 100644 index 61f71d19f..000000000 --- a/apps/scandic-web/components/TempDesignSystem/Text/Body/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Slot } from "@radix-ui/react-slot" - -import { bodyFontOnlyVariants, bodyVariants } from "./variants" - -import type { BodyProps } from "./body" - -export default function Body({ - asChild = false, - className = "", - color, - fontOnly = false, - textAlign, - textTransform, - ...props -}: BodyProps) { - const Comp = asChild ? Slot : "p" - const classNames = fontOnly - ? bodyFontOnlyVariants({ - className, - textAlign, - textTransform, - }) - : bodyVariants({ - className, - color, - textAlign, - textTransform, - }) - return -} diff --git a/apps/scandic-web/components/TempDesignSystem/Toasts/index.tsx b/apps/scandic-web/components/TempDesignSystem/Toasts/index.tsx index 2998c59d9..6f47d906f 100644 --- a/apps/scandic-web/components/TempDesignSystem/Toasts/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Toasts/index.tsx @@ -1,12 +1,12 @@ import { type ExternalToast, toast as sonnerToast, Toaster } from "sonner" +import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon, type MaterialIconSetIconProps, } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Button from "../Button" -import Body from "../Text/Body" import { toastVariants } from "./variants" import styles from "./toasts.module.css" diff --git a/apps/scandic-web/components/TempDesignSystem/Text/Body/body.module.css b/packages/design-system/lib/components/Body/body.module.css similarity index 100% rename from apps/scandic-web/components/TempDesignSystem/Text/Body/body.module.css rename to packages/design-system/lib/components/Body/body.module.css diff --git a/packages/design-system/lib/components/Body/index.tsx b/packages/design-system/lib/components/Body/index.tsx new file mode 100644 index 000000000..dbf55caef --- /dev/null +++ b/packages/design-system/lib/components/Body/index.tsx @@ -0,0 +1,40 @@ +import { Slot } from '@radix-ui/react-slot' + +import { bodyFontOnlyVariants, bodyVariants } from './variants' + +import type { VariantProps } from 'class-variance-authority' + +interface BodyProps + extends Omit, 'color'>, + VariantProps { + asChild?: boolean + fontOnly?: boolean +} + +/** + * @deprecated Use `@scandic-hotels/design-system/Typography` instead. + */ +export default function Body({ + asChild = false, + className = '', + color, + fontOnly = false, + textAlign, + textTransform, + ...props +}: BodyProps) { + const Comp = asChild ? Slot : 'p' + const classNames = fontOnly + ? bodyFontOnlyVariants({ + className, + textAlign, + textTransform, + }) + : bodyVariants({ + className, + color, + textAlign, + textTransform, + }) + return +} diff --git a/apps/scandic-web/components/TempDesignSystem/Text/Body/variants.ts b/packages/design-system/lib/components/Body/variants.ts similarity index 89% rename from apps/scandic-web/components/TempDesignSystem/Text/Body/variants.ts rename to packages/design-system/lib/components/Body/variants.ts index b2c908dcf..697011a37 100644 --- a/apps/scandic-web/components/TempDesignSystem/Text/Body/variants.ts +++ b/packages/design-system/lib/components/Body/variants.ts @@ -1,6 +1,6 @@ -import { cva } from "class-variance-authority" +import { cva } from 'class-variance-authority' -import styles from "./body.module.css" +import styles from './body.module.css' const config = { variants: { @@ -41,9 +41,9 @@ const config = { }, }, defaultVariants: { - color: "black", - textAlign: "left", - textTransform: "regular", + color: 'black', + textAlign: 'left', + textTransform: 'regular', }, } as const @@ -64,8 +64,8 @@ const fontOnlyconfig = { }, }, defaultVariants: { - textAlign: "left", - textTransform: "regular", + textAlign: 'left', + textTransform: 'regular', }, } as const export const bodyFontOnlyVariants = cva(styles.bodyFontOnly, fontOnlyconfig) diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 685eb99f4..186cbda4a 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -4,6 +4,7 @@ "version": "1.0.0-beta.1", "type": "module", "exports": { + "./Body": "./dist/components/Body/index.js", "./Button": "./dist/components/Button/index.js", "./Caption": "./dist/components/Caption/index.js", "./Card": "./dist/components/Card/index.js",