fix(SW-360): remove container queries to fix stacking context bug affecting dropdowns in signup
This commit is contained in:
@@ -68,10 +68,11 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
|
|||||||
password: "",
|
password: "",
|
||||||
termsAccepted: false,
|
termsAccepted: false,
|
||||||
},
|
},
|
||||||
mode: "onBlur",
|
mode: "all",
|
||||||
criteriaMode: "all",
|
criteriaMode: "all",
|
||||||
resolver: zodResolver(signUpSchema),
|
resolver: zodResolver(signUpSchema),
|
||||||
reValidateMode: "onChange",
|
reValidateMode: "onChange",
|
||||||
|
shouldFocusError: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
async function onSubmit(data: SignUpSchema) {
|
async function onSubmit(data: SignUpSchema) {
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
/* Leaving, will most likely get deleted */
|
|
||||||
.datePicker {
|
|
||||||
container-name: datePickerContainer;
|
|
||||||
container-type: inline-size;
|
|
||||||
}
|
|
||||||
.container {
|
.container {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Spacing-x2);
|
gap: var(--Spacing-x2);
|
||||||
@@ -11,6 +6,13 @@
|
|||||||
width: var(--width);
|
width: var(--width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 350px) {
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.day {
|
.day {
|
||||||
grid-area: day;
|
grid-area: day;
|
||||||
}
|
}
|
||||||
@@ -31,10 +33,3 @@
|
|||||||
.year.invalid > div > div {
|
.year.invalid > div > div {
|
||||||
border-color: var(--Scandic-Red-60);
|
border-color: var(--Scandic-Red-60);
|
||||||
}
|
}
|
||||||
|
|
||||||
@container datePickerContainer (max-width: 350px) {
|
|
||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ export default function Phone({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${styles.wrapper} ${className}`}>
|
<div className={`${styles.phone} ${className}`}>
|
||||||
<div className={styles.phone}>
|
|
||||||
<CountrySelector
|
<CountrySelector
|
||||||
disabled={readOnly}
|
disabled={readOnly}
|
||||||
dropdownArrowClassName={styles.arrow}
|
dropdownArrowClassName={styles.arrow}
|
||||||
@@ -141,6 +140,5 @@ export default function Phone({
|
|||||||
<ErrorMessage errors={formState.errors} name={field.name} />
|
<ErrorMessage errors={formState.errors} name={field.name} />
|
||||||
</TextField>
|
</TextField>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
.wrapper {
|
|
||||||
container-name: phoneContainer;
|
|
||||||
container-type: inline-size;
|
|
||||||
}
|
|
||||||
.phone {
|
.phone {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
gap: var(--Spacing-x2);
|
gap: var(--Spacing-x2);
|
||||||
grid-template-columns: minmax(124px, 164px) 1fr;
|
|
||||||
|
|
||||||
--react-international-phone-background-color: var(--Main-Grey-White);
|
--react-international-phone-background-color: var(--Main-Grey-White);
|
||||||
--react-international-phone-border-color: var(--Scandic-Beige-40);
|
--react-international-phone-border-color: var(--Scandic-Beige-40);
|
||||||
@@ -28,6 +24,12 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 385px) {
|
||||||
|
.phone {
|
||||||
|
grid-template-columns: minmax(124px, 164px) 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.phone:has(.input:active, .input:focus) {
|
.phone:has(.input:active, .input:focus) {
|
||||||
--react-international-phone-border-color: var(--Scandic-Blue-90);
|
--react-international-phone-border-color: var(--Scandic-Blue-90);
|
||||||
}
|
}
|
||||||
@@ -104,10 +106,3 @@
|
|||||||
justify-self: flex-start;
|
justify-self: flex-start;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@container phoneContainer (max-width: 350px) {
|
|
||||||
.phone {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user