Merged in feat/SW-1169-map-bedtype-icons (pull request #1113)
Feat/SW-1169 map bedtype icons * feat(SW-1169): Added bed icons * fix(SW-1169): update fill rule property * fix(SW-1169): update clip rule prop * feat(SW-1169): Added way of rendering bed type icons with extra beds * feat(SW-1169): update room schema to map mainBed to enum * feat(SW-1169): update bedtype icon color * feat(SW-1169): transform unknown bed types to BedTypeEnum.Other * test: update mock data with new schema Approved-by: Christel Westerberg
This commit is contained in:
@@ -10,3 +10,8 @@
|
||||
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
||||
width: min(600px, 100%);
|
||||
}
|
||||
|
||||
.iconContainer {
|
||||
display: flex;
|
||||
gap: var(--Spacing-x-one-and-half);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,13 @@ import { zodResolver } from "@hookform/resolvers/zod"
|
||||
import { useCallback, useEffect } from "react"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
|
||||
import {
|
||||
BED_TYPE_ICONS,
|
||||
type BedTypeEnum,
|
||||
type ExtraBedTypeEnum,
|
||||
} from "@/constants/booking"
|
||||
import { useEnterDetailsStore } from "@/stores/enter-details"
|
||||
|
||||
import { KingBedIcon } from "@/components/Icons"
|
||||
import RadioCard from "@/components/TempDesignSystem/Form/ChoiceCard/Radio"
|
||||
|
||||
import BedTypeInfo from "./BedTypeInfo"
|
||||
@@ -18,6 +22,7 @@ import type {
|
||||
BedTypeFormSchema,
|
||||
BedTypeProps,
|
||||
} from "@/types/components/hotelReservation/enterDetails/bedType"
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function BedType({ bedTypes }: BedTypeProps) {
|
||||
const initialBedType = useEnterDetailsStore(
|
||||
@@ -74,8 +79,13 @@ export default function BedType({ bedTypes }: BedTypeProps) {
|
||||
return (
|
||||
<RadioCard
|
||||
key={roomType.value}
|
||||
Icon={KingBedIcon}
|
||||
iconWidth={46}
|
||||
Icon={(props) => (
|
||||
<BedIconRenderer
|
||||
mainBedType={roomType.type}
|
||||
extraBedType={roomType.extraBed?.type}
|
||||
props={props}
|
||||
/>
|
||||
)}
|
||||
id={roomType.value}
|
||||
name="bedType"
|
||||
subtitle={width}
|
||||
@@ -89,3 +99,25 @@ export default function BedType({ bedTypes }: BedTypeProps) {
|
||||
</FormProvider>
|
||||
)
|
||||
}
|
||||
|
||||
function BedIconRenderer({
|
||||
mainBedType,
|
||||
extraBedType,
|
||||
props,
|
||||
}: {
|
||||
mainBedType: BedTypeEnum
|
||||
extraBedType: ExtraBedTypeEnum | undefined
|
||||
props: IconProps
|
||||
}) {
|
||||
const MainBedIcon = BED_TYPE_ICONS[mainBedType]
|
||||
const ExtraBedIcon = extraBedType ? BED_TYPE_ICONS[extraBedType] : null
|
||||
|
||||
return (
|
||||
<div className={`${props.className} ${styles.iconContainer}`}>
|
||||
<MainBedIcon height={32} color="uiTextMediumContrast" />
|
||||
{ExtraBedIcon && (
|
||||
<ExtraBedIcon height={32} color="uiTextMediumContrast" />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { iconVariants } from "./variants"
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { iconVariants } from "./variants"
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
101
components/Icons/Beds/ExtraBunkBed.tsx
Normal file
101
components/Icons/Beds/ExtraBunkBed.tsx
Normal file
@@ -0,0 +1,101 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function ExtraBunkBedIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="75"
|
||||
height="42"
|
||||
viewBox="0 0 75 42"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M18.0731 3.44172V40.1023H21.3198V3.44172H18.0731ZM16.1792 3.35155C16.1792 2.35541 16.9867 1.54785 17.9829 1.54785H21.41C22.4061 1.54785 23.2137 2.3554 23.2137 3.35155V40.1925C23.2137 41.1886 22.4061 41.9962 21.41 41.9962H17.9829C16.9867 41.9962 16.1792 41.1886 16.1792 40.1925V3.35155Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M67.765 5.1551V40.1021H71.0117V5.1551H67.765ZM65.8711 5.06493C65.8711 4.06877 66.6786 3.26123 67.6748 3.26123H71.1019C72.098 3.26123 72.9056 4.06877 72.9056 5.06493V40.1923C72.9056 41.1885 72.098 41.996 71.1019 41.996H67.6748C66.6786 41.996 65.8711 41.1885 65.8711 40.1923V5.06493Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M21.3196 31.5352H67.7652V36.8561H21.3196V31.5352ZM23.2134 33.429V34.9622H65.8714V33.429H23.2134Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M58.4325 27.9521C52.6201 26.9387 46.6738 26.9667 40.8711 28.0346L40.8711 28.0346L34.9466 29.1249C34.9466 29.1249 34.9466 29.1249 34.9466 29.1249C34.4972 29.2076 34.171 29.5993 34.171 30.0562V30.7681C34.171 31.2911 34.595 31.7151 35.118 31.7151H65.1048C65.6278 31.7151 66.0518 31.2911 66.0518 30.7681V30.0767C66.0518 29.6165 65.7209 29.2229 65.2674 29.1439L65.4138 28.3043L65.2674 29.1439L58.4325 27.9521ZM58.7253 26.273L58.5789 27.1125L58.7253 26.273L65.5602 27.4647C66.8297 27.6861 67.7562 28.7881 67.7562 30.0767V30.7681C67.7562 32.2325 66.5691 33.4195 65.1048 33.4195H35.118C33.6536 33.4195 32.4666 32.2325 32.4666 30.7681V30.0562C32.4666 28.777 33.3799 27.6801 34.6381 27.4486L34.6381 27.4486L40.5626 26.3583C40.5626 26.3583 40.5626 26.3583 40.5626 26.3583C46.564 25.2538 52.7138 25.2248 58.7253 26.273Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M23.9798 28.9647C23.4568 28.9647 23.0328 29.3887 23.0328 29.9117V30.7685C23.0328 31.2915 23.4568 31.7154 23.9798 31.7154H30.8339C31.3569 31.7154 31.7809 31.2915 31.7809 30.7685V29.9117C31.7809 29.3887 31.3569 28.9647 30.8339 28.9647H23.9798ZM21.3284 29.9117C21.3284 28.4473 22.5155 27.2603 23.9798 27.2603H30.8339C32.2983 27.2603 33.4854 28.4473 33.4854 29.9117V30.7685C33.4854 32.2328 32.2983 33.4199 30.8339 33.4199H23.9798C22.5155 33.4199 21.3284 32.2328 21.3284 30.7685V29.9117Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M25.2138 21.2745C24.5883 21.4597 23.949 21.7397 23.4251 22.168L25.2138 21.2745ZM23.4251 22.168C22.8933 22.6025 22.3724 23.2887 22.3152 24.2343C22.2586 25.1688 22.6812 25.9307 23.1322 26.4496M23.1322 26.4496C23.5824 26.9674 24.1643 27.373 24.7538 27.6876L23.1322 26.4496Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M29.6979 20.9796C28.0609 20.8019 26.4746 20.9014 25.2138 21.2745L23.4251 22.168C22.8933 22.6025 22.3724 23.2887 22.3152 24.2343C22.2586 25.1688 22.6812 25.9307 23.1322 26.4496L24.7538 27.6876C25.9405 28.3211 27.487 28.7611 29.1256 28.9389C30.7626 29.1166 32.3489 29.0173 33.6098 28.644C34.2356 28.4588 34.8746 28.1786 35.3985 27.7506C35.9304 27.316 36.451 26.6297 36.5083 25.6843C36.676 23.9652 34.9525 22.6658 34.0698 22.231C32.883 21.5974 31.3365 21.1574 29.6979 20.9796ZM29.4935 22.8624C28.0381 22.7044 26.714 22.8056 25.7514 23.0904C25.2695 23.2332 24.8867 23.4193 24.6235 23.6344C24.3625 23.8477 24.2215 24.086 24.2056 24.3487C24.189 24.6226 24.3082 24.9157 24.5616 25.2071C24.811 25.4941 25.1814 25.7691 25.6455 26.0168C26.574 26.5125 27.8757 26.8983 29.3299 27.0561C30.7856 27.2141 32.1096 27.113 33.0722 26.8281C33.5258 26.7045 34.4698 26.2799 34.6179 25.5698C34.6345 25.2958 34.5152 25.0027 34.2619 24.7114C34.0124 24.4244 33.642 24.1494 33.1778 23.9017C32.2494 23.406 30.9477 23.0202 29.4935 22.8624Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M21.3196 10.9722H67.7652V16.2931H21.3196V10.9722ZM23.2134 12.866V14.3992H65.8714V12.866H23.2134Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M58.4323 7.39062C52.6198 6.37719 46.6735 6.4051 40.8709 7.47303L34.9464 8.56337C34.497 8.64607 34.1708 9.03779 34.1708 9.49468V10.2066C34.1708 10.7296 34.5948 11.1535 35.1178 11.1535H65.1045C65.6275 11.1535 66.0515 10.7296 66.0515 10.2066V9.51516C66.0515 9.05495 65.7206 8.66136 65.2672 8.5823L58.4323 7.39062ZM40.5624 5.7967C46.5637 4.69221 52.7136 4.66335 58.725 5.71147L65.56 6.90316C66.8295 7.1245 67.756 8.22654 67.756 9.51516V10.2066C67.756 11.6709 66.5689 12.858 65.1045 12.858H35.1178C33.6534 12.858 32.4663 11.6709 32.4663 10.2066V9.49468C32.4663 8.21543 33.3797 7.11859 34.6378 6.88704"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M23.9798 8.40223C23.4568 8.40223 23.0328 8.8262 23.0328 9.3492V10.206C23.0328 10.729 23.4568 11.1529 23.9798 11.1529H30.8339C31.3569 11.1529 31.7809 10.729 31.7809 10.206V9.3492C31.7809 8.8262 31.3569 8.40223 30.8339 8.40223H23.9798ZM21.3284 9.3492C21.3284 7.88485 22.5155 6.69775 23.9798 6.69775H30.8339C32.2983 6.69775 33.4854 7.88485 33.4854 9.3492V10.206C33.4854 11.6703 32.2983 12.8574 30.8339 12.8574H23.9798C22.5155 12.8574 21.3284 11.6703 21.3284 10.206V9.3492Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M25.2138 0.441473C24.5883 0.626692 23.949 0.906727 23.4251 1.33497L25.2138 0.441473ZM23.4251 1.33497C22.8933 1.76954 22.3724 2.45571 22.3152 3.40126C22.2586 4.33574 22.6812 5.09771 23.1322 5.6166M23.1322 5.6166C23.5824 6.13441 24.1643 6.53996 24.7538 6.85458L23.1322 5.6166Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M29.6979 0.146592C28.0609 -0.0310981 26.4746 0.0683662 25.2138 0.441473L23.4251 1.33497C22.8933 1.76954 22.3724 2.45571 22.3152 3.40126C22.2586 4.33574 22.6812 5.09771 23.1322 5.6166L24.7538 6.85458C25.9405 7.48812 27.487 7.92808 29.1256 8.10592C30.7626 8.28361 32.3489 8.18425 33.6098 7.81102C34.2356 7.6258 34.8746 7.34563 35.3985 6.91763C35.9304 6.48295 36.451 5.79672 36.5083 4.85125C36.676 3.13218 34.9525 1.83278 34.0698 1.39797C32.883 0.764411 31.3365 0.32444 29.6979 0.146592ZM29.4935 2.0294C28.0381 1.87142 26.714 1.97259 25.7514 2.25743C25.2695 2.40017 24.8867 2.58628 24.6235 2.8014C24.3625 3.01472 24.2215 3.25294 24.2056 3.51573C24.189 3.78962 24.3082 4.08266 24.5616 4.3741C24.811 4.66111 25.1814 4.93606 25.6455 5.18381C26.574 5.67946 27.8757 6.06528 29.3299 6.22311C30.7856 6.38111 32.1096 6.27998 33.0722 5.99504C33.5258 5.8715 34.4698 5.44689 34.6179 4.73679C34.6345 4.46283 34.5152 4.1697 34.2619 3.87839C34.0124 3.59138 33.642 3.31641 33.1778 3.06866C32.2494 2.57301 30.9477 2.18723 29.4935 2.0294Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M9.84337 29.9109C14.3386 29.9109 17.9826 26.2668 17.9826 21.7716C17.9826 17.2764 14.3386 13.6323 9.84337 13.6323C5.34817 13.6323 1.7041 17.2764 1.7041 21.7716C1.7041 26.2668 5.34817 29.9109 9.84337 29.9109ZM10.9449 25.931V22.3934H14.5119C15.0469 22.3934 15.4036 22.0397 15.4036 21.509C15.4036 20.9784 15.0469 20.6246 14.5119 20.6246H10.9449V17.0871C10.9449 16.5564 10.5882 16.2026 10.0532 16.2026C9.51814 16.2026 9.16145 16.5564 9.16145 17.0871V20.6246H5.59451C5.05947 20.6246 4.70277 20.9784 4.70277 21.509C4.70277 22.0397 5.05947 22.3934 5.59451 22.3934H9.16145V25.931C9.16145 26.4617 9.51814 26.8155 10.0532 26.8155C10.5882 26.8155 10.9449 26.4617 10.9449 25.931Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
29
components/Icons/Beds/ExtraPullOutBed.tsx
Normal file
29
components/Icons/Beds/ExtraPullOutBed.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function ExtraPullOutBedIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="51"
|
||||
height="32"
|
||||
viewBox="0 0 51 32"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M43.8184 0V12.1806C43.0898 11.9742 42.2571 11.871 41.3204 11.7677C40.4878 8.25806 37.2612 5.57419 33.4102 5.57419H29.9755C25.9163 5.57419 22.5857 8.46452 21.9612 12.2839C20.7122 12.5935 19.5673 13.1097 18.5265 13.8323C18.6306 13.3161 18.7347 12.6968 18.7347 12.0774C18.7347 6.91613 14.5714 2.7871 9.36735 2.7871C4.16327 2.7871 0 6.91613 0 12.0774C0 17.2387 4.16327 21.3677 9.36735 21.3677C11.3449 21.3677 13.2184 20.7484 14.7796 19.6129C14.6755 20.2323 14.5714 20.8516 14.5714 21.6774V27.871H17.798C17.798 27.9742 17.7719 28.0516 17.7459 28.129C17.7199 28.2065 17.6939 28.2839 17.6939 28.3871C17.6939 30.3484 19.3592 32 21.3367 32C23.3143 32 24.9796 30.3484 24.9796 28.3871C24.9796 28.1806 24.9796 28.0774 24.8755 27.871H43.8184V31.7935H51V0H43.8184ZM30.0796 7.53548H33.5143C36.1163 7.53548 38.302 9.1871 39.2388 11.4581C37.7816 11.3548 36.1163 11.3548 34.3469 11.3548H30.3918C28.7265 11.3548 26.5408 11.3548 24.3551 11.6645C25.0837 9.29032 27.3735 7.53548 30.0796 7.53548ZM10.4082 17.1355V13.0065H14.5714C15.1959 13.0065 15.6122 12.5935 15.6122 11.9742C15.6122 11.3548 15.1959 10.9419 14.5714 10.9419H10.4082V6.8129C10.4082 6.19355 9.99184 5.78064 9.36735 5.78064C8.74286 5.78064 8.32653 6.19355 8.32653 6.8129V10.9419H4.16327C3.53878 10.9419 3.12245 11.3548 3.12245 11.9742C3.12245 12.5935 3.53878 13.0065 4.16327 13.0065H8.32653V17.1355C8.32653 17.7548 8.74286 18.1677 9.36735 18.1677C9.99184 18.1677 10.4082 17.7548 10.4082 17.1355ZM21.3367 29.9355C20.5041 29.9355 19.7755 29.2129 19.7755 28.3871C19.7755 28.1806 19.7755 28.0774 19.8796 27.871H22.7939C22.898 28.0774 22.898 28.1806 22.898 28.3871C22.898 29.2129 22.2735 29.9355 21.3367 29.9355ZM16.6531 25.8065H43.7143V23.7419H16.6531V25.8065ZM43.8184 21.6774H16.6531C16.6531 15.071 21.5449 13.4194 30.2878 13.4194H34.2429C38.7184 13.4194 41.7367 13.6258 43.8184 14.2452V21.6774ZM45.9 29.729H48.9184V2.06452H45.9V29.729Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
27
components/Icons/Beds/ExtraSofaBed.tsx
Normal file
27
components/Icons/Beds/ExtraSofaBed.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function ExtraSofaBedIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="70"
|
||||
height="34"
|
||||
viewBox="0 0 70 34"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
d="M69.5408 8.73112C69.3353 8.52568 69.0272 8.42296 68.719 8.42296C68.5136 8.42296 65.7402 8.6284 63.2749 9.75831C63.2749 6.88218 63.2749 4.82779 63.2749 4.82779C63.2749 2.1571 58.2417 0 51.9758 0C47.4562 0 43.5529 1.12991 41.7039 2.77341C39.855 1.12991 35.9517 0 31.432 0C25.1662 0 20.1329 2.1571 20.1329 4.82779C20.1329 4.82779 20.1329 6.88218 20.1329 9.75831C18.9003 9.14199 17.565 8.83384 16.5378 8.6284C14.8943 6.4713 12.2236 5.03323 9.24471 5.03323C4.10876 5.03323 0 9.14199 0 14.2779C0 19.4139 4.10876 23.5227 9.24471 23.5227C10.7855 23.5227 12.3263 23.1118 13.6616 22.3927V26.5015C13.6616 27.1178 14.1752 27.5287 14.6888 27.5287H20.1329H20.3384V28.2477C20.3384 29.3776 21.2628 30.4048 22.4955 30.4048H24.3444V32.8701C24.3444 33.4864 24.858 34 25.4743 34C26.0906 34 26.6042 33.4864 26.6042 32.8701V30.4048H57.0091V32.8701C57.0091 33.4864 57.5227 34 58.139 34C58.7553 34 59.2689 33.4864 59.2689 32.8701V30.4048H60.7069C61.8369 30.4048 62.864 29.4804 62.864 28.2477V27.5287H63.3776H68.8218C69.4381 27.5287 69.8489 27.0151 69.8489 26.5015V9.55287C69.8489 9.24471 69.7462 8.93656 69.5408 8.73112ZM49.4079 14.3807H34.5136C34.6163 13.148 34.9245 12.2236 35.6435 11.5045C36.7734 10.3746 38.7251 9.75831 41.6012 9.75831C47.9698 9.65559 49.2024 11.9154 49.4079 14.3807ZM10.2719 19.4139C10.2719 20.0302 9.86103 20.4411 9.24471 20.4411C8.6284 20.4411 8.21752 20.0302 8.21752 19.4139V15.3051H4.10876C3.49245 15.3051 3.08157 14.8943 3.08157 14.2779C3.08157 13.6616 3.49245 13.2508 4.10876 13.2508H8.21752V9.14199C8.21752 8.52568 8.6284 8.1148 9.24471 8.1148C9.86103 8.1148 10.2719 8.52568 10.2719 9.14199V13.2508H14.3807C14.997 13.2508 15.4079 13.6616 15.4079 14.2779C15.4079 14.8943 14.997 15.3051 14.3807 15.3051H10.2719V19.4139ZM22.0846 17.9758C20.3384 20.2356 20.3384 22.1873 20.3384 22.29V25.577H15.716V20.852C17.4622 19.2085 18.4894 16.8459 18.4894 14.2779C18.4894 13.148 18.284 12.1208 17.9758 11.1964C19.9275 11.8127 22.0846 12.9426 22.0846 15.2024V17.9758ZM22.29 11.1964V4.93051C22.3927 4.10876 25.7825 2.25982 31.5347 2.25982C37.0816 2.25982 40.4713 4.10876 40.6767 4.93051C40.6767 4.93051 40.6767 4.93051 40.6767 5.03323C40.6767 5.03323 40.6767 6.06042 40.6767 7.60121C37.6979 7.70393 35.5408 8.52568 34.1027 9.96375C32.9728 11.0937 32.3565 12.6344 32.3565 14.4834H29.8912C27.6314 14.4834 25.6798 14.997 24.2417 16.0242V15.3051C24.139 13.4562 23.4199 12.1208 22.29 11.1964ZM60.7069 28.4532H22.4955V25.3716H60.7069V28.4532ZM22.4955 23.1118V22.29C22.4955 22.29 22.4955 20.4411 24.5498 18.3867C25.7825 17.1541 27.6314 16.435 29.8912 16.435H53.003C55.571 16.435 57.5227 17.1541 58.7553 18.4894C60.8097 20.5438 60.7069 22.1873 60.7069 22.29V23.1118H22.4955ZM61.2205 11.1964C60.0906 12.1208 59.3716 13.4562 59.3716 15.3051V16.2296C57.7281 14.997 55.6737 14.3807 53.1057 14.3807H51.6677C51.4622 10.0665 48.4834 7.80665 42.9366 7.49849C42.9366 5.9577 42.9366 4.93051 42.9366 4.93051C42.9366 4.93051 42.9366 4.93051 42.9366 4.82779C43.2447 4.00604 46.5317 2.1571 52.0786 2.1571C57.8308 2.1571 61.1178 4.10876 61.3233 4.82779L61.2205 11.1964ZM67.7946 25.577H62.864V22.3927C62.864 22.29 62.864 20.5438 61.426 18.4894V15.3051C61.426 12.1208 65.6375 11.0937 67.6918 10.7855V25.577H67.7946Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
29
components/Icons/Beds/ExtraWallBed.tsx
Normal file
29
components/Icons/Beds/ExtraWallBed.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function ExtraWallBedIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="53"
|
||||
height="34"
|
||||
viewBox="0 0 53 34"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M50.9 0.149902H47H45V2.1499V13.8499C44.6 13.8499 44.2 13.8499 43.8 13.9499C43.6306 13.8168 43.4714 13.6895 43.3191 13.5678L43.319 13.5677C42.213 12.6834 41.47 12.0894 39.8 11.6499C39.1 7.9499 36 5.1499 32.1 5.1499H28.8C24.9 5.1499 21.7 7.9499 21.1 11.6499C20 11.9499 18.8 12.4499 17.9 13.0499C17.2 8.7499 13.5 5.4499 9 5.4499C4 5.4499 0 9.4499 0 14.4499C0 19.4499 4 23.4499 9 23.4499C10.9 23.4499 12.6 22.8499 14 21.9499V22.8499V24.8499V26.8499H16H45V31.8499V33.8499H47H50.9H52.9V31.8499V2.1499V0.149902H50.9ZM28.8 7.1499H32.1C34.7 7.1499 36.9 8.8499 37.6 11.1499C36 10.9499 34.4 10.8499 32.8 10.8499H29C27.4 10.8499 25.3 10.8499 23.2 11.1499C24.1 8.8499 26.3 7.1499 28.8 7.1499ZM32.9 12.8499H29.1C23.9 12.8499 20 13.5499 17.9 15.5499C17.7 17.2499 17 18.7499 16 20.0499V20.8499H38C38 18.2499 39.4 15.9499 41.5 14.7499C39.3 13.4499 37.1 12.8499 32.9 12.8499ZM10 19.4499C10 20.0499 9.6 20.4499 9 20.4499C8.4 20.4499 8 20.0499 8 19.4499V15.4499H4C3.4 15.4499 3 15.0499 3 14.4499C3 13.8499 3.4 13.4499 4 13.4499H8V9.4499C8 8.8499 8.4 8.4499 9 8.4499C9.6 8.4499 10 8.8499 10 9.4499V13.4499H14C14.6 13.4499 15 13.8499 15 14.4499C15 15.0499 14.6 15.4499 14 15.4499H10V19.4499ZM16 24.8499H45V22.8499H16V24.8499ZM45 17.9499C43.5 18.1499 42.3 19.3499 42.1 20.8499H40C40 18.0499 42.2 15.8499 45 15.8499V17.9499ZM47 31.8499H50.9V2.1499H47V20.8499V22.8499V24.8499V26.8499V31.8499Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
25
components/Icons/Beds/KingBed.tsx
Normal file
25
components/Icons/Beds/KingBed.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function KingBedIcon({ className, color, ...props }: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="51"
|
||||
height="36"
|
||||
viewBox="0 0 51 36"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M48.1255 17.2632C49.8873 18.9211 51 21.2237 51 24.2632V24.4474V24.5395V33.75C51 34.6711 50.1655 35.5 49.1455 35.5H46.8273C45.8073 35.5 44.9727 34.6711 44.9727 33.75V29.6053H6.12V33.75C6.12 34.6711 5.28545 35.5 4.26545 35.5H1.85455C0.834545 35.5 0 34.6711 0 33.75V24.4474C0 22.0526 0.556364 20.2105 1.39091 18.6447V18.5526V1.42105C1.39091 0.960526 1.85455 0.5 2.31818 0.5H47.1982C47.7545 0.5 48.1255 0.868421 48.1255 1.42105V17.2632ZM1.85455 23.5263H49.1455C48.8673 19.8421 46.6418 17.6316 43.3036 16.1579C43.2109 16.1579 43.1182 16.1579 43.0255 16.0658C38.2036 14.2237 31.1564 14.2237 24.5727 14.2237C11.6836 14.2237 2.41091 14.9605 1.85455 23.5263ZM6.58364 14.5V13.0263C6.58364 7.4079 12.5182 6.76316 15.1145 6.76316C17.6182 6.76316 23.2745 7.31579 23.6455 12.4737C17.6182 12.4737 11.22 12.5658 6.58364 14.5ZM25.5 12.3816V12.4737C31.1564 12.4737 37.5545 12.5658 42.5618 14.2237V12.3816C42.5618 6.76316 36.6273 6.11842 34.0309 6.11842C31.4345 6.11842 25.5 6.76316 25.5 12.3816ZM46.2709 2.34211V15.7895C45.7145 15.4211 45.0655 15.1447 44.4164 14.8684V12.2895C44.4164 7.31579 40.5218 4.27632 34.0309 4.27632C29.2091 4.27632 25.7782 5.93421 24.3873 8.88158C22.8109 6.48684 19.6582 5.10526 15.2073 5.10526C8.71636 5.10526 4.82182 8.05263 4.82182 13.1184V15.4211C4.26545 15.7895 3.80182 16.1579 3.33818 16.5263V2.34211H46.2709ZM1.85455 33.75H4.26545V29.6053H1.85455V33.75ZM1.85455 27.8553V25.2763H49.1455V27.8553H1.85455ZM46.7345 29.6053V33.75H49.1455V29.6053H46.7345Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { iconVariants } from "./variants"
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
29
components/Icons/Beds/QueenBed.tsx
Normal file
29
components/Icons/Beds/QueenBed.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function QueenBedIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="50"
|
||||
height="32"
|
||||
viewBox="0 0 50 32"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M49.8008 20.6355V20.3364C49.7012 15.352 47.1116 12.4611 43.2271 10.7664V8.17445C43.2271 3.09034 39.3426 0 32.7689 0C27.8884 0 25.2988 1.6947 23.9044 4.68536C22.3108 2.19315 20.0199 0.697819 15.4382 0.697819C8.76494 0.797508 4.88048 3.88785 4.88048 8.97196V11.3645C1.89243 13.1589 0 15.9502 0 20.6355V30.2056C0 31.2025 0.796813 32 1.89243 32H4.38247C5.37849 32 6.2749 31.2025 6.2749 30.2056V25.919H43.7251V30.1059C43.7251 31.1028 44.5219 31.9003 45.6175 31.9003H48.1076C49.1036 31.9003 50 31.1028 50 30.1059V20.6355H49.8008ZM1.89243 24.1246V21.5327H48.008V24.1246H1.89243ZM32.5697 1.89408C29.9801 1.89408 24.9004 2.49221 24.9004 8.27414L24.8008 8.37383V8.47352C30.4781 8.47352 36.1554 8.57321 41.2351 10.1682V8.27414C41.2351 2.49221 35.1594 1.89408 32.5697 1.89408ZM6.67331 8.97196C6.67331 3.19003 12.749 2.5919 15.3386 2.5919C17.8287 2.5919 22.6096 3.19003 23.008 8.37383C16.8327 8.37383 11.3546 8.47352 6.67331 10.3676V8.97196ZM41.7331 12.0623C36.753 10.1682 30.5777 10.1682 23.9044 10.1682C10.8566 10.1682 2.49004 10.866 1.89243 19.6386H47.9084C47.6096 15.8505 45.3187 13.5576 42.0319 12.162C41.9323 12.162 41.8327 12.162 41.7331 12.0623ZM1.89243 30.1059V25.919H4.38247V30.1059H1.89243ZM45.5179 25.919V30.1059H48.008V25.919H45.5179Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
29
components/Icons/Beds/SingleBed.tsx
Normal file
29
components/Icons/Beds/SingleBed.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function SingleBedIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="36"
|
||||
height="32"
|
||||
viewBox="0 0 36 32"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M29.52 9.90228C33.3257 11.6743 35.8971 14.6971 36 19.9088V20.1173V20.2215V30.1238C36 31.1661 35.1771 32 34.1486 32H31.7829C30.7543 32 29.9314 31.1661 29.9314 30.1238V25.6417H6.06857V30.1238C6.06857 31.1661 5.24571 32 4.21714 32H1.85143C0.822857 32 0 31.1661 0 30.1238V20.1173C0 15.3225 1.85143 12.2997 4.73143 10.3192L6.58286 9.38111C7.09714 9.17264 7.71429 8.96417 8.33143 8.7557C8.33143 6.14984 9.05143 3.96091 10.4914 2.50163C12.0343 0.833876 14.5029 0 17.5886 0C24.1714 0 27.5657 3.0228 27.5657 9.0684H27.4629C27.4629 9.17264 27.5657 9.17264 27.6686 9.17264L29.52 9.90228ZM17.6914 2.08469C15.0171 2.08469 13.1657 2.7101 11.9314 3.96091C10.9029 4.89902 10.3886 6.46254 10.3886 8.33876C12.1371 8.02606 14.0914 7.71335 16.0457 7.60912L20.0571 7.71335C22.0114 7.92182 23.9657 8.23453 25.7143 8.65147C25.6114 5.4202 24.48 2.08469 17.6914 2.08469ZM16.0457 9.38111L20.0571 9.48534C23.04 9.79805 25.8171 10.215 28.1829 11.1531C28.2857 11.2573 28.3886 11.2573 28.4914 11.2573C31.7829 12.7166 33.9429 15.114 34.2514 19.0749H1.85143C2.26286 12.0912 7.71428 10.0065 16.0457 9.38111ZM1.85143 30.1238H4.21714V25.6417H1.85143V30.1238ZM16.0457 23.7655H1.85143V21.0554H34.1486V23.7655H16.0457ZM31.7829 25.6417V30.1238H34.1486V25.6417H31.7829Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
29
components/Icons/Beds/TwinBeds.tsx
Normal file
29
components/Icons/Beds/TwinBeds.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { iconVariants } from "../variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function TwinBedsIcon({
|
||||
className,
|
||||
color,
|
||||
...props
|
||||
}: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
width="75"
|
||||
height="32"
|
||||
viewBox="0 0 75 32"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M29.8958 9.90228C33.75 11.6743 36.3542 14.6971 36.4583 19.9088V20.1173V20.2215V30.1238C36.4583 31.1661 35.625 32 34.5833 32H32.1875C31.1458 32 30.3125 31.1661 30.3125 30.1238V25.6417H6.14583V30.1238C6.14583 31.1661 5.3125 32 4.27083 32H1.875C0.833333 32 0 31.1661 0 30.1238V20.1173C0 15.3225 1.875 12.2997 4.79167 10.3192L6.66667 9.38111C7.1875 9.17264 7.8125 8.96417 8.4375 8.7557C8.4375 6.14984 9.16667 3.96091 10.625 2.50163C12.1875 0.833876 14.6875 0 17.8125 0C24.4792 0 27.9167 3.0228 27.9167 9.0684H27.8125C27.8125 9.17264 27.9167 9.17264 28.0208 9.17264L29.8958 9.90228ZM17.9167 2.08469C15.2083 2.08469 13.3333 2.7101 12.0833 3.96091C11.0417 4.89902 10.5208 6.46254 10.5208 8.33876C12.2917 8.02606 14.2708 7.71335 16.25 7.60912L20.3125 7.71335C22.2917 7.92182 24.2708 8.23453 26.0417 8.65147C25.9375 5.4202 24.7917 2.08469 17.9167 2.08469ZM16.25 9.38111L20.3125 9.48534C23.3333 9.79805 26.1458 10.215 28.5417 11.1531C28.6458 11.2573 28.75 11.2573 28.8542 11.2573C32.1875 12.7166 34.375 15.114 34.6875 19.0749H1.875C2.29167 12.0912 7.8125 10.0065 16.25 9.38111ZM1.875 30.1238H4.27083V25.6417H1.875V30.1238ZM16.25 23.7655H1.875V21.0554H34.5833V23.7655H16.25ZM32.1875 25.6417V30.1238H34.5833V25.6417H32.1875ZM75 19.9088C74.8958 14.6971 72.2917 11.6743 68.4375 9.90228L66.5625 9.17264C66.4583 9.17264 66.3542 9.17264 66.3542 9.0684H66.4583C66.4583 3.0228 63.0208 0 56.3542 0C53.2292 0 50.7292 0.833876 49.1667 2.50163C47.7083 3.96091 46.9792 6.14984 46.9792 8.7557C46.3542 8.96417 45.7292 9.17264 45.2083 9.38111L43.3333 10.3192C40.4167 12.2997 38.5417 15.3225 38.5417 20.1173V30.1238C38.5417 31.1661 39.375 32 40.4167 32H42.8125C43.8542 32 44.6875 31.1661 44.6875 30.1238V25.6417H68.8542V30.1238C68.8542 31.1661 69.6875 32 70.7292 32H73.125C74.1667 32 75 31.1661 75 30.1238V20.2215V20.1173V19.9088ZM56.4583 2.08469C53.75 2.08469 51.875 2.7101 50.625 3.96091C49.5833 4.89902 49.0625 6.46254 49.0625 8.33876C50.8333 8.02606 52.8125 7.71335 54.7917 7.60912L58.8542 7.71335C60.8333 7.92182 62.8125 8.23453 64.5833 8.65147C64.4792 5.4202 63.3333 2.08469 56.4583 2.08469ZM54.7917 9.38111L58.8542 9.48534C61.875 9.79805 64.6875 10.215 67.0833 11.1531C67.1875 11.2573 67.2917 11.2573 67.3958 11.2573C70.7292 12.7166 72.9167 15.114 73.2292 19.0749H40.4167C40.8333 12.0912 46.3542 10.0065 54.7917 9.38111ZM40.4167 30.1238H42.8125V25.6417H40.4167V30.1238ZM54.7917 23.7655H40.4167V21.0554H73.125V23.7655H54.7917ZM70.7292 25.6417V30.1238H73.125V25.6417H70.7292Z"
|
||||
fill="#26201E"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import { iconVariants } from "./variants"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export default function KingBedIcon({ className, color, ...props }: IconProps) {
|
||||
const classNames = iconVariants({ className, color })
|
||||
return (
|
||||
<svg
|
||||
className={classNames}
|
||||
fill="none"
|
||||
height="33"
|
||||
viewBox="0 0 46 33"
|
||||
width="46"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
clipRule="evenodd"
|
||||
fillRule="evenodd"
|
||||
d="M43.4073 15.8263C44.9964 17.3421 46 19.4474 46 22.2263V22.3947V22.4789V30.9C46 31.7421 45.2473 32.5 44.3273 32.5H42.2364C41.3164 32.5 40.5636 31.7421 40.5636 30.9V27.1105H5.52V30.9C5.52 31.7421 4.76727 32.5 3.84727 32.5H1.67273C0.752727 32.5 0 31.7421 0 30.9V22.3947C0 20.2053 0.501818 18.5211 1.25455 17.0895V17.0053V1.34211C1.25455 0.921053 1.67273 0.5 2.09091 0.5H42.5709C43.0727 0.5 43.4073 0.836842 43.4073 1.34211V15.8263ZM1.67273 21.5526H44.3273C44.0764 18.1842 42.0691 16.1632 39.0582 14.8158C38.9745 14.8158 38.8909 14.8158 38.8073 14.7316C34.4582 13.0474 28.1018 13.0474 22.1636 13.0474C10.5382 13.0474 2.17455 13.7211 1.67273 21.5526ZM5.93818 13.3V11.9526C5.93818 6.81579 11.2909 6.22632 13.6327 6.22632C15.8909 6.22632 20.9927 6.73158 21.3273 11.4474C15.8909 11.4474 10.12 11.5316 5.93818 13.3ZM23 11.3632V11.4474C28.1018 11.4474 33.8727 11.5316 38.3891 13.0474V11.3632C38.3891 6.22632 33.0364 5.63684 30.6945 5.63684C28.3527 5.63684 23 6.22632 23 11.3632ZM41.7345 2.18421V14.4789C41.2327 14.1421 40.6473 13.8895 40.0618 13.6368V11.2789C40.0618 6.73158 36.5491 3.95263 30.6945 3.95263C26.3455 3.95263 23.2509 5.46842 21.9964 8.16316C20.5745 5.97368 17.7309 4.71053 13.7164 4.71053C7.86182 4.71053 4.34909 7.40526 4.34909 12.0368V14.1421C3.84727 14.4789 3.42909 14.8158 3.01091 15.1526V2.18421H41.7345ZM1.67273 30.9H3.84727V27.1105H1.67273V30.9ZM1.67273 25.5105V23.1526H44.3273V25.5105H1.67273ZM42.1527 27.1105V30.9H44.3273V27.1105H42.1527Z"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
@@ -10,11 +10,20 @@ export { default as ArrowUpIcon } from "./ArrowUp"
|
||||
export { default as BalconyIcon } from "./Balcony"
|
||||
export { default as BarIcon } from "./Bar"
|
||||
export { default as BathtubIcon } from "./Bathtub"
|
||||
export { default as BedIcon } from "./Bed"
|
||||
export { default as BedDoubleIcon } from "./BedDouble"
|
||||
export { default as BedHotelIcon } from "./BedHotel"
|
||||
export { default as BedroomParentIcon } from "./BedroomParent"
|
||||
export { default as BedSingleIcon } from "./BedSingle"
|
||||
export { default as BedIcon } from "./Beds/Bed"
|
||||
export { default as BedDoubleIcon } from "./Beds/BedDouble"
|
||||
export { default as BedSingleIcon } from "./Beds/BedSingle"
|
||||
export { default as ExtraBunkBedIcon } from "./Beds/ExtraBunkBed"
|
||||
export { default as ExtraPullOutBedIcon } from "./Beds/ExtraPullOutBed"
|
||||
export { default as ExtraSofaBedIcon } from "./Beds/ExtraSofaBed"
|
||||
export { default as ExtraWallBedIcon } from "./Beds/ExtraWallBed"
|
||||
export { default as KingBedIcon } from "./Beds/KingBed"
|
||||
export { default as KingBedSmallIcon } from "./Beds/KingBedSmall"
|
||||
export { default as QueenBedIcon } from "./Beds/QueenBed"
|
||||
export { default as SingleBedIcon } from "./Beds/SingleBed"
|
||||
export { default as TwinBedsIcon } from "./Beds/TwinBeds"
|
||||
export { default as BikeIcon } from "./Bike"
|
||||
export { default as BikingIcon } from "./Biking"
|
||||
export { default as BreakfastIcon } from "./Breakfast"
|
||||
@@ -99,8 +108,6 @@ export { default as KayakingIcon } from "./Kayaking"
|
||||
export { default as KettleIcon } from "./Kettle"
|
||||
export { default as KidsIcon } from "./Kids"
|
||||
export { default as KidsMocktailIcon } from "./KidsMocktail"
|
||||
export { default as KingBedIcon } from "./KingBed"
|
||||
export { default as KingBedSmallIcon } from "./KingBedSmall"
|
||||
export { default as LampIcon } from "./Lamp"
|
||||
export { default as LaptopIcon } from "./Laptop"
|
||||
export { default as LaundryMachineIcon } from "./LaundryMachine"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
padding: var(--Spacing-x-one-and-half) var(--Spacing-x2);
|
||||
transition: all 200ms ease;
|
||||
width: min(100%, 600px);
|
||||
grid-column-gap: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.label:hover {
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
import {
|
||||
ExtraBunkBedIcon,
|
||||
ExtraPullOutBedIcon,
|
||||
ExtraSofaBedIcon,
|
||||
ExtraWallBedIcon,
|
||||
KingBedIcon,
|
||||
QueenBedIcon,
|
||||
SingleBedIcon,
|
||||
TwinBedsIcon,
|
||||
} from "@/components/Icons"
|
||||
|
||||
import type { IconProps } from "@/types/components/icon"
|
||||
|
||||
export enum BookingStatusEnum {
|
||||
BookingCompleted = "BookingCompleted",
|
||||
Cancelled = "Cancelled",
|
||||
@@ -101,3 +114,35 @@ export const PAYMENT_METHOD_ICONS: Record<
|
||||
chinaUnionPay: "/_static/icons/payment/china-union-pay.svg",
|
||||
discover: "/_static/icons/payment/discover.svg",
|
||||
}
|
||||
|
||||
export enum BedTypeEnum {
|
||||
King = "King",
|
||||
Queen = "Queen",
|
||||
Single = "Single",
|
||||
Twin = "Twin",
|
||||
Other = "Other",
|
||||
}
|
||||
|
||||
export enum ExtraBedTypeEnum {
|
||||
SofaBed = "SofaBed",
|
||||
WallBed = "WallBed",
|
||||
PullOutBed = "PullOutBed",
|
||||
BunkBed = "BunkBed",
|
||||
}
|
||||
|
||||
type BedTypes = keyof typeof BedTypeEnum | keyof typeof ExtraBedTypeEnum
|
||||
|
||||
export const BED_TYPE_ICONS: Record<
|
||||
BedTypes,
|
||||
(props: IconProps) => JSX.Element
|
||||
> = {
|
||||
King: KingBedIcon,
|
||||
Queen: QueenBedIcon,
|
||||
Single: SingleBedIcon,
|
||||
Twin: TwinBedsIcon,
|
||||
SofaBed: ExtraSofaBedIcon,
|
||||
WallBed: ExtraWallBedIcon,
|
||||
BunkBed: ExtraBunkBedIcon,
|
||||
PullOutBed: ExtraPullOutBedIcon,
|
||||
Other: SingleBedIcon,
|
||||
}
|
||||
|
||||
@@ -612,6 +612,13 @@ export const hotelQueryRouter = router({
|
||||
description: matchingRoom.description,
|
||||
size: matchingRoom.mainBed.widthRange,
|
||||
value: matchingRoom.code,
|
||||
type: matchingRoom.mainBed.type,
|
||||
extraBed: matchingRoom.fixedExtraBed
|
||||
? {
|
||||
type: matchingRoom.fixedExtraBed.type,
|
||||
description: matchingRoom.fixedExtraBed.description,
|
||||
}
|
||||
: undefined,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { BedTypeEnum, ExtraBedTypeEnum } from "@/constants/booking"
|
||||
|
||||
import { imageSchema } from "./image"
|
||||
|
||||
const roomContentSchema = z.object({
|
||||
@@ -17,22 +19,40 @@ const roomTypesSchema = z.object({
|
||||
description: z.string(),
|
||||
code: z.string(),
|
||||
roomCount: z.number(),
|
||||
mainBed: z.object({
|
||||
type: z.string(),
|
||||
description: z.string(),
|
||||
widthRange: z.object({
|
||||
min: z.number(),
|
||||
max: z.number(),
|
||||
mainBed: z
|
||||
.object({
|
||||
type: z.string(),
|
||||
description: z.string(),
|
||||
widthRange: z.object({
|
||||
min: z.number(),
|
||||
max: z.number(),
|
||||
}),
|
||||
})
|
||||
.transform((data) => ({
|
||||
type:
|
||||
data.type in BedTypeEnum
|
||||
? (data.type as BedTypeEnum)
|
||||
: BedTypeEnum.Other,
|
||||
description: data.description,
|
||||
widthRange: data.widthRange,
|
||||
})),
|
||||
fixedExtraBed: z
|
||||
.object({
|
||||
type: z.string(),
|
||||
description: z.string().optional(),
|
||||
widthRange: z.object({
|
||||
min: z.number(),
|
||||
max: z.number(),
|
||||
}),
|
||||
})
|
||||
.transform((data) => {
|
||||
return data.type in ExtraBedTypeEnum
|
||||
? {
|
||||
type: data.type as ExtraBedTypeEnum,
|
||||
description: data.description,
|
||||
}
|
||||
: undefined
|
||||
}),
|
||||
}),
|
||||
fixedExtraBed: z.object({
|
||||
type: z.string(),
|
||||
description: z.string().optional(),
|
||||
widthRange: z.object({
|
||||
min: z.number(),
|
||||
max: z.number(),
|
||||
}),
|
||||
}),
|
||||
roomSize: z.object({
|
||||
min: z.number(),
|
||||
max: z.number(),
|
||||
|
||||
@@ -2,6 +2,7 @@ import { describe, expect, test } from "@jest/globals"
|
||||
import { act, renderHook } from "@testing-library/react"
|
||||
import { type PropsWithChildren } from "react"
|
||||
|
||||
import { BedTypeEnum } from "@/constants/booking"
|
||||
import { Lang } from "@/constants/languages"
|
||||
|
||||
import EnterDetailsProvider from "@/providers/EnterDetailsProvider"
|
||||
@@ -43,6 +44,7 @@ const booking = {
|
||||
|
||||
const bedTypes = [
|
||||
{
|
||||
type: BedTypeEnum.King,
|
||||
description: "King-size bed",
|
||||
value: "SKS",
|
||||
size: {
|
||||
@@ -50,8 +52,10 @@ const bedTypes = [
|
||||
max: 200,
|
||||
},
|
||||
roomTypeCode: "SKS",
|
||||
extraBed: undefined,
|
||||
},
|
||||
{
|
||||
type: BedTypeEnum.Queen,
|
||||
description: "Queen-size bed",
|
||||
value: "QZ",
|
||||
size: {
|
||||
@@ -59,6 +63,7 @@ const bedTypes = [
|
||||
max: 200,
|
||||
},
|
||||
roomTypeCode: "QZ",
|
||||
extraBed: undefined,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import type {
|
||||
bedTypeFormSchema,
|
||||
bedTypeSchema,
|
||||
} from "@/components/HotelReservation/EnterDetails/BedType/schema"
|
||||
import type { BedTypeEnum, ExtraBedTypeEnum } from "@/constants/booking"
|
||||
|
||||
export type BedTypeSelection = {
|
||||
description: string
|
||||
@@ -12,6 +13,13 @@ export type BedTypeSelection = {
|
||||
max: number
|
||||
}
|
||||
value: string
|
||||
type: BedTypeEnum
|
||||
extraBed:
|
||||
| {
|
||||
description: string
|
||||
type: ExtraBedTypeEnum
|
||||
}
|
||||
| undefined
|
||||
}
|
||||
export type BedTypeProps = {
|
||||
bedTypes: BedTypeSelection[]
|
||||
|
||||
Reference in New Issue
Block a user