Merged in fix/SW-3095-states-booking-widget (pull request #2534)
fix(SW-3095): update design for hover, focus etc for the booking widget * fix(SW-3095): update design for hover, focus etc for the booking widget Approved-by: Anton Gunnarsson Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--Spacing-x-half);
|
gap: var(--Spacing-x-half);
|
||||||
position: relative;
|
position: relative;
|
||||||
color: var(--Text-Accent-Primary);
|
color: var(--Text-Secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.errorContainer {
|
.errorContainer {
|
||||||
@@ -107,13 +107,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1367px) {
|
@media screen and (min-width: 1367px) {
|
||||||
.container:hover,
|
.container:hover {
|
||||||
.container:focus-within,
|
background-color: var(--Surface-Primary-Hover);
|
||||||
.container:has([data-focused="true"], [data-pressed="true"]) {
|
|
||||||
background-color: var(--Base-Surface-Primary-light-Hover-alt);
|
|
||||||
border-radius: var(--Corner-radius-md);
|
border-radius: var(--Corner-radius-md);
|
||||||
}
|
}
|
||||||
|
.container:focus-within,
|
||||||
|
.container:has([data-focused="true"]),
|
||||||
|
.container:has([data-pressed="true"]) {
|
||||||
|
background-color: var(--Surface-Primary-Hover);
|
||||||
|
border-radius: var(--Corner-radius-md);
|
||||||
|
border: 1px solid var(--Border-Interactive-Focus);
|
||||||
|
}
|
||||||
.bookingCodeRememberVisible {
|
.bookingCodeRememberVisible {
|
||||||
padding: var(--Spacing-x2);
|
padding: var(--Spacing-x2);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -9,15 +9,15 @@
|
|||||||
|
|
||||||
&:placeholder-shown::-webkit-search-cancel-button {
|
&:placeholder-shown::-webkit-search-cancel-button {
|
||||||
display: none;
|
display: none;
|
||||||
background-image: url("/_static/icons/close.svg");
|
background-image: url("/_static/icons/cancel.svg");
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(:placeholder-shown)::-webkit-search-cancel-button {
|
&:not(:placeholder-shown)::-webkit-search-cancel-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background-image: url("/_static/icons/close.svg");
|
background-image: url("/_static/icons/cancel.svg");
|
||||||
height: 20px;
|
height: 24px;
|
||||||
width: 20px;
|
width: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,5 +15,5 @@
|
|||||||
|
|
||||||
.active,
|
.active,
|
||||||
.button:focus {
|
.button:focus {
|
||||||
background-color: var(--Base-Surface-Primary-light-Hover-alt);
|
background-color: var(--Surface-Primary-Hover);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background-color: var(--Base-Surface-Primary-light-Hover-alt);
|
background-color: var(--Surface-Primary-Hover);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,9 +123,7 @@ export function Search({
|
|||||||
htmlFor: SEARCH_TERM_NAME,
|
htmlFor: SEARCH_TERM_NAME,
|
||||||
id: searchLabelId,
|
id: searchLabelId,
|
||||||
})}
|
})}
|
||||||
className={labelVariants({
|
className={styles.label}
|
||||||
color: withSearchButton && isOpen ? "default" : "red",
|
|
||||||
})}
|
|
||||||
>
|
>
|
||||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||||
<span>
|
<span>
|
||||||
@@ -280,15 +278,3 @@ const clearButtonVariants = cva(styles.clearButton, {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const labelVariants = cva(styles.label, {
|
|
||||||
variants: {
|
|
||||||
color: {
|
|
||||||
default: "",
|
|
||||||
red: styles.red,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaultVariants: {
|
|
||||||
color: "default",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-radius: var(--Corner-radius-sm);
|
border-radius: var(--Corner-radius-md);
|
||||||
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
|
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
@@ -17,27 +17,21 @@
|
|||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:has(input:active, input:focus, input:focus-within) {
|
&:has(input:active, input:focus, input:focus-within) {
|
||||||
background-color: var(--Background-Primary);
|
background-color: var(--Surface-Primary-Hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:has(input:active, input:focus, input:focus-within) {
|
&:has(input:active, input:focus, input:focus-within) {
|
||||||
border-color: 1px solid var(--UI-Input-Controls-Border-Focus);
|
border-color: 1px solid var(--Border-Interactive-Focus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
&:has(
|
color: var(--Text-Accent-Primary);
|
||||||
~ .inputContainer input:active,
|
&:focus-within,
|
||||||
~ .inputContainer input:focus,
|
&:focus,
|
||||||
~ .inputContainer input:focus-within
|
&:active {
|
||||||
)
|
color: var(--Text-Interactive-Focus);
|
||||||
p {
|
|
||||||
color: var(--UI-Text-Active);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.red {
|
|
||||||
color: var(--Scandic-Brand-Scandic-Red);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,10 @@
|
|||||||
.label {
|
.label {
|
||||||
color: var(--Text-Accent-Primary);
|
color: var(--Text-Accent-Primary);
|
||||||
}
|
}
|
||||||
|
.when:has([data-isopen="true"]) .label,
|
||||||
|
.rooms:has([data-focused="true"], [data-pressed="true"]) .label {
|
||||||
|
color: var(--Text-Interactive-Focus);
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.voucherContainer {
|
.voucherContainer {
|
||||||
@@ -102,14 +106,17 @@
|
|||||||
.rooms,
|
.rooms,
|
||||||
.when {
|
.when {
|
||||||
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
|
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
|
||||||
border-radius: var(--Corner-radius-sm);
|
border-radius: var(--Corner-radius-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.when:hover,
|
.when:hover,
|
||||||
.rooms:hover,
|
.rooms:hover {
|
||||||
|
background-color: var(--Surface-Primary-Hover);
|
||||||
|
}
|
||||||
.when:has([data-isopen="true"]),
|
.when:has([data-isopen="true"]),
|
||||||
.rooms:has([data-focused="true"], [data-pressed="true"]) {
|
.rooms:has([data-focused="true"], [data-pressed="true"]) {
|
||||||
background-color: var(--Base-Surface-Primary-light-Hover-alt);
|
background-color: var(--Surface-Primary-Hover);
|
||||||
|
border: 1px solid var(--Border-Interactive-Focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
.where {
|
.where {
|
||||||
|
|||||||
1
apps/scandic-web/public/_static/icons/cancel.svg
Normal file
1
apps/scandic-web/public/_static/icons/cancel.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#57514E"><path d="m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144 56 56ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"/></svg>
|
||||||
|
After Width: | Height: | Size: 507 B |
Reference in New Issue
Block a user