fix: SW-1040 Updated fields clickable area

This commit is contained in:
Hrishikesh Vaipurkar
2024-11-28 18:04:15 +01:00
parent 86ddd79a38
commit dd0a699e4a
6 changed files with 67 additions and 33 deletions

View File

@@ -1,12 +1,3 @@
.container {
overflow: hidden;
position: relative;
&[data-isopen="true"] {
overflow: visible;
}
}
.btn { .btn {
background: none; background: none;
border: none; border: none;
@@ -15,6 +6,12 @@
padding: 0; padding: 0;
width: 100%; width: 100%;
text-align: left; text-align: left;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 20px var(--Spacing-x-one-and-half) 0;
} }
.body { .body {
@@ -33,6 +30,7 @@
@media screen and (max-width: 1366px) { @media screen and (max-width: 1366px) {
.container { .container {
z-index: 10001; z-index: 10001;
height: 24px;
} }
.hideWrapper { .hideWrapper {
@@ -63,6 +61,6 @@
border-width + border-width +
wanted space below booking widget wanted space below booking widget
*/ */
top: calc(100% + var(--Spacing-x2) + 1px + var(--Spacing-x4)); top: calc(100% + var(--Spacing-x1) + 1px + var(--Spacing-x4));
} }
} }

View File

@@ -169,25 +169,27 @@ export default function Search({ locations }: SearchProps) {
</Caption> </Caption>
</label> </label>
<div {...getRootProps({}, { suppressRefError: true })}> <div {...getRootProps({}, { suppressRefError: true })}>
<Input <label className={styles.searchInput}>
{...getInputProps({ <Input
id: name, {...getInputProps({
onFocus(evt) { id: name,
handleOnFocus(evt) onFocus(evt) {
openMenu() handleOnFocus(evt)
}, openMenu()
placeholder: intl.formatMessage({
id: "Destinations & hotels",
}),
...register(name, {
onBlur: function () {
closeMenu()
}, },
onChange: handleOnChange, placeholder: intl.formatMessage({
}), id: "Destinations & hotels",
type: "search", }),
})} ...register(name, {
/> onBlur: function () {
closeMenu()
},
onChange: handleOnChange,
}),
type: "search",
})}
/>
</label>
</div> </div>
<SearchList <SearchList
getItemProps={getItemProps} getItemProps={getItemProps}

View File

@@ -25,3 +25,15 @@
p { p {
color: var(--UI-Text-Active); color: var(--UI-Text-Active);
} }
.searchInput {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
height: 100%;
padding: var(--Spacing-x3) var(--Spacing-x-one-and-half) var(--Spacing-x-half);
align-items: center;
display: grid;
}

View File

@@ -12,6 +12,11 @@
display: none; display: none;
} }
.rooms,
.when {
position: relative;
}
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.voucherContainer { .voucherContainer {
padding: var(--Spacing-x2) 0 var(--Spacing-x4); padding: var(--Spacing-x2) 0 var(--Spacing-x4);
@@ -43,6 +48,10 @@
justify-content: center; justify-content: center;
width: 100%; width: 100%;
} }
.rooms {
height: 60px;
}
} }
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
@@ -79,7 +88,7 @@
.when:hover, .when:hover,
.rooms:hover, .rooms:hover,
.when:has([data-isopen="true"]), .when:has([data-isopen="true"]),
.rooms:has(.input:active, .input:focus, .input:focus-within) { .rooms:has([data-focused="true"], [data-pressed="true"]) {
background-color: var(--Base-Surface-Primary-light-Hover-alt); background-color: var(--Base-Surface-Primary-light-Hover-alt);
} }

View File

@@ -38,10 +38,14 @@ export default function FormContent({
</div> </div>
<div className={styles.when}> <div className={styles.when}>
<Caption color="red" type="bold"> <Caption color="red" type="bold">
{intl.formatMessage( {nights > 0
{ id: "booking.nights" }, ? intl.formatMessage(
{ totalNights: nights > 0 ? nights : 0 } { id: "booking.nights" },
)} { totalNights: nights }
)
: intl.formatMessage({
id: "Check in",
})}
</Caption> </Caption>
<DatePicker /> <DatePicker />
</div> </div>

View File

@@ -47,6 +47,12 @@
padding: 0; padding: 0;
width: 100%; width: 100%;
text-align: left; text-align: left;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 20px var(--Spacing-x-one-and-half) 0;
} }
.footer { .footer {
@@ -109,6 +115,9 @@
} }
@media screen and (min-width: 1367px) { @media screen and (min-width: 1367px) {
.container {
height: 24px;
}
.pickerContainerMobile { .pickerContainerMobile {
display: none; display: none;
} }