{header}
-
+
{children}
diff --git a/components/BookingWidget/Client.tsx b/components/BookingWidget/Client.tsx
index ce8370bab..48f08f323 100644
--- a/components/BookingWidget/Client.tsx
+++ b/components/BookingWidget/Client.tsx
@@ -22,6 +22,7 @@ import type { Location } from "@/types/trpc/routers/hotel/locations"
export default function BookingWidgetClient({
locations,
+ type,
}: BookingWidgetClientProps) {
const [isOpen, setIsOpen] = useState(false)
@@ -99,8 +100,9 @@ export default function BookingWidgetClient({
>
-
+
+
)
diff --git a/components/BookingWidget/MobileToggleButton/button.module.css b/components/BookingWidget/MobileToggleButton/button.module.css
index f4a3d80fc..4d501f748 100644
--- a/components/BookingWidget/MobileToggleButton/button.module.css
+++ b/components/BookingWidget/MobileToggleButton/button.module.css
@@ -6,6 +6,10 @@
display: grid;
gap: var(--Spacing-x-one-and-half);
padding: var(--Spacing-x2);
+ position: sticky;
+ top: 0;
+ z-index: 1;
+ background-color: var(--Base-Surface-Primary-light-Normal);
}
.complete {
@@ -13,7 +17,7 @@
}
.partial {
- grid-template-columns: min(1fr, 150px) min-content min(1fr, 150px) 1fr;
+ grid-template-columns: minmax(auto, 150px) min-content minmax(auto, 150px) auto;
}
.icon {
@@ -27,7 +31,7 @@
width: 36px;
}
-@media screen and (min-width: 768px) {
+@media screen and (min-width: 767px) {
.complete,
.partial {
display: none;
diff --git a/components/BookingWidget/bookingWidget.module.css b/components/BookingWidget/bookingWidget.module.css
index 5384dac60..0048f25de 100644
--- a/components/BookingWidget/bookingWidget.module.css
+++ b/components/BookingWidget/bookingWidget.module.css
@@ -1,16 +1,17 @@
-@media screen and (max-width: 1366px) {
+@media screen and (max-width: 766px) {
.container {
background-color: var(--UI-Input-Controls-Surface-Normal);
bottom: -100%;
display: grid;
gap: var(--Spacing-x3);
grid-template-rows: 36px 1fr;
- height: 100dvh;
+ height: calc(100dvh - 20px);
padding: var(--Spacing-x3) var(--Spacing-x2) var(--Spacing-x7);
position: fixed;
transition: bottom 300ms ease;
width: 100%;
z-index: 10000;
+ border-radius: var(--Corner-radius-Large) var(--Corner-radius-Large) 0 0;
}
.container[data-open="true"] {
@@ -23,13 +24,26 @@
cursor: pointer;
justify-self: flex-end;
}
+
+ .container[data-open="true"] + .backdrop {
+ background-color: rgba(0, 0, 0, 0.4);
+ height: 100%;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ z-index: 1000;
+ }
}
-@media screen and (min-width: 1367px) {
+@media screen and (min-width: 767px) {
.container {
- border-bottom: 1px solid var(--Base-Border-Subtle);
- border-top: 1px solid var(--Base-Border-Subtle);
display: block;
+ box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.05);
+ position: sticky;
+ top: 0;
+ z-index: 1;
+ background-color: var(--Base-Surface-Primary-light-Normal);
}
.close {
diff --git a/components/BookingWidget/index.tsx b/components/BookingWidget/index.tsx
index 1c8b02f8e..4b1115647 100644
--- a/components/BookingWidget/index.tsx
+++ b/components/BookingWidget/index.tsx
@@ -2,16 +2,22 @@ import { getLocations } from "@/lib/trpc/memoizedRequests"
import BookingWidgetClient from "./Client"
+import type { BookingWidgetType } from "@/types/components/bookingWidget"
+
export function preload() {
void getLocations()
}
-export default async function BookingWidget() {
+export default async function BookingWidget({
+ type,
+}: {
+ type: BookingWidgetType
+}) {
const locations = await getLocations()
if (!locations || "error" in locations) {
return null
}
- return
+ return
}
diff --git a/components/DatePicker/Screen/Desktop.tsx b/components/DatePicker/Screen/Desktop.tsx
index 8656fb8e5..4be5495a2 100644
--- a/components/DatePicker/Screen/Desktop.tsx
+++ b/components/DatePicker/Screen/Desktop.tsx
@@ -1,4 +1,5 @@
"use client"
+import React from "react"
import { DayPicker } from "react-day-picker"
import { useIntl } from "react-intl"
diff --git a/components/DatePicker/date-picker.module.css b/components/DatePicker/date-picker.module.css
index faaac7dd0..b11ab3b77 100644
--- a/components/DatePicker/date-picker.module.css
+++ b/components/DatePicker/date-picker.module.css
@@ -41,7 +41,8 @@
}
.container[data-isopen="true"] .hideWrapper {
- top: 0;
+ border-radius: var(--Corner-radius-Large) var(--Corner-radius-Large) 0 0;
+ top: 20px;
}
}
diff --git a/components/Forms/BookingWidget/FormContent/Search/search.module.css b/components/Forms/BookingWidget/FormContent/Search/search.module.css
index d2f40bda3..6a0602fed 100644
--- a/components/Forms/BookingWidget/FormContent/Search/search.module.css
+++ b/components/Forms/BookingWidget/FormContent/Search/search.module.css
@@ -46,3 +46,8 @@
.input::-webkit-search-cancel-button {
display: none;
}
+
+.input:disabled,
+.input:disabled::placeholder {
+ color: var(--Base-Text-Disabled);
+}
diff --git a/components/Forms/BookingWidget/FormContent/formContent.module.css b/components/Forms/BookingWidget/FormContent/formContent.module.css
index 4b62ecdcb..d26036db2 100644
--- a/components/Forms/BookingWidget/FormContent/formContent.module.css
+++ b/components/Forms/BookingWidget/FormContent/formContent.module.css
@@ -1,5 +1,4 @@
.options {
- display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
@@ -7,9 +6,30 @@
.option {
display: flex;
+ gap: var(--Spacing-x-one-and-half);
+ align-items: center;
}
-@media screen and (max-width: 1366px) {
+.infoIcon {
+ stroke: var(--Base-Text-Disabled);
+}
+
+.vouchers,
+.options {
+ display: none;
+}
+
+.vouchersHeader {
+ display: flex;
+ gap: var(--Spacing-x-one-and-half);
+}
+
+.checkbox {
+ width: var(--Spacing-x3);
+ height: var(--Spacing-x3);
+}
+
+@media screen and (max-width: 766px) {
.input {
display: grid;
gap: var(--Spacing-x2);
@@ -39,7 +59,7 @@
}
}
-@media screen and (min-width: 1367px) {
+@media screen and (min-width: 767px) {
.input {
display: flex;
gap: var(--Spacing-x2);
@@ -49,7 +69,6 @@
.vouchers,
.when,
.where {
- border-right: 1px solid var(--Base-Surface-Subtle-Normal);
width: 100%;
}
@@ -59,14 +78,20 @@
}
.rooms,
+ .vouchers,
.when {
max-width: 240px;
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
+ border-radius: var(--Corner-radius-Small);
+ }
+ .when:hover,
+ .rooms:hover,
+ .rooms:has(.input:active, .input:focus, .input:focus-within) {
+ background-color: var(--Base-Surface-Primary-light-Hover-alt);
}
.vouchers {
max-width: 200px;
- padding: var(--Spacing-x1) 0;
}
.where {
@@ -75,6 +100,20 @@
}
.options {
- max-width: 158px;
+ max-width: 190px;
+ }
+}
+
+@media screen and (min-width: 1367px) {
+ .vouchers {
+ display: block;
+ }
+
+ .options {
+ display: flex;
+ }
+ .vouchers:hover,
+ .option:hover {
+ cursor: not-allowed;
}
}
diff --git a/components/Forms/BookingWidget/FormContent/index.tsx b/components/Forms/BookingWidget/FormContent/index.tsx
index fcb5bb847..d440138e5 100644
--- a/components/Forms/BookingWidget/FormContent/index.tsx
+++ b/components/Forms/BookingWidget/FormContent/index.tsx
@@ -5,11 +5,14 @@ import { useIntl } from "react-intl"
import { dt } from "@/lib/dt"
import DatePicker from "@/components/DatePicker"
+import { InfoCircleIcon } from "@/components/Icons"
+import Body from "@/components/TempDesignSystem/Text/Body"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import Search from "./Search"
import styles from "./formContent.module.css"
+import tempStyles from "./Search/search.module.css" // TODO: Remove this when Rooms and Voucher is implemented
import type { BookingWidgetFormContentProps } from "@/types/components/form/bookingwidget"
@@ -21,6 +24,7 @@ export default function FormContent({
const rooms = intl.formatMessage({ id: "Guests & Rooms" })
const vouchers = intl.formatMessage({ id: "Code / Voucher" })
+ const addVouchers = intl.formatMessage({ id: "Add code" })
const bonus = intl.formatMessage({ id: "Use bonus cheque" })
const reward = intl.formatMessage({ id: "Book reward night" })
@@ -44,22 +48,36 @@ export default function FormContent({
{rooms}
-
+
+
+
-
- {vouchers}
-
-
+
+
+ {vouchers}
+
+
+
+
+
+
diff --git a/components/Forms/BookingWidget/form.module.css b/components/Forms/BookingWidget/form.module.css
index 323d84037..465ba56d6 100644
--- a/components/Forms/BookingWidget/form.module.css
+++ b/components/Forms/BookingWidget/form.module.css
@@ -12,7 +12,7 @@
width: 100%;
}
-@media screen and (max-width: 1366px) {
+@media screen and (max-width: 766px) {
.form {
align-self: flex-start;
}
@@ -24,13 +24,23 @@
}
}
-@media screen and (min-width: 1367px) {
+@media screen and (min-width: 767px) {
.section {
display: flex;
+ padding: var(--Spacing-x1) var(--Spacing-x5);
}
.button {
justify-content: center;
width: 118px;
}
+
+ .default {
+ border-radius: var(--Corner-radius-Medium);
+ padding: var(--Spacing-x-one-and-half) var(--Spacing-x2)
+ var(--Spacing-x-one-and-half) var(--Spacing-x1);
+ }
+ .full {
+ padding: var(--Spacing-x1) var(--Spacing-x5);
+ }
}
diff --git a/components/Forms/BookingWidget/index.tsx b/components/Forms/BookingWidget/index.tsx
index f78e38be0..8a193b53d 100644
--- a/components/Forms/BookingWidget/index.tsx
+++ b/components/Forms/BookingWidget/index.tsx
@@ -7,6 +7,7 @@ import Button from "@/components/TempDesignSystem/Button"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import FormContent from "./FormContent"
+import { bookingWidgetVariants } from "./variants"
import styles from "./form.module.css"
@@ -15,10 +16,14 @@ import type { BookingWidgetFormProps } from "@/types/components/form/bookingwidg
const formId = "booking-widget"
-export default function Form({ locations }: BookingWidgetFormProps) {
+export default function Form({ locations, type }: BookingWidgetFormProps) {
const intl = useIntl()
const router = useRouter()
+ const classNames = bookingWidgetVariants({
+ type,
+ })
+
const { formState, handleSubmit, register } =
useFormContext()
@@ -31,7 +36,7 @@ export default function Form({ locations }: BookingWidgetFormProps) {
}
return (
-