mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-03 06:55:44 +00:00
Absorb the matrix-react-sdk repository (#28192)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Florian Duros <florian.duros@ormaz.fr> Co-authored-by: Kim Brose <kim.brose@nordeck.net> Co-authored-by: Florian Duros <florianduros@element.io> Co-authored-by: R Midhun Suresh <hi@midhun.dev> Co-authored-by: dbkr <986903+dbkr@users.noreply.github.com> Co-authored-by: ElementRobot <releases@riot.im> Co-authored-by: dbkr <dbkr@users.noreply.github.com> Co-authored-by: David Baker <dbkr@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Co-authored-by: David Langley <davidl@element.io> Co-authored-by: Michael Weimann <michaelw@matrix.org> Co-authored-by: Timshel <Timshel@users.noreply.github.com> Co-authored-by: Sahil Silare <32628578+sahil9001@users.noreply.github.com> Co-authored-by: Will Hunt <will@half-shot.uk> Co-authored-by: Hubert Chathi <hubert@uhoreg.ca> Co-authored-by: Andrew Ferrazzutti <andrewf@element.io> Co-authored-by: Robin <robin@robin.town> Co-authored-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
committed by
GitHub
parent
2b99496025
commit
c05c429803
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
Copyright 2019-2024 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
/* TODO: Consider unifying with general input styles in _light.pcss */
|
||||
|
||||
.mx_Field {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
margin: 1em 0;
|
||||
border-radius: 8px;
|
||||
transition: border-color 0.25s;
|
||||
border: 1px solid var(--cpd-color-border-interactive-secondary);
|
||||
}
|
||||
|
||||
.mx_Field_prefix {
|
||||
border-right: 1px solid var(--cpd-color-border-interactive-secondary);
|
||||
}
|
||||
|
||||
.mx_Field_postfix {
|
||||
border-left: 1px solid var(--cpd-color-border-interactive-secondary);
|
||||
}
|
||||
|
||||
.mx_Field input,
|
||||
.mx_Field select,
|
||||
.mx_Field textarea {
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
border: none;
|
||||
/* Even without a border here, we still need this avoid overlapping the rounded */
|
||||
/* corners on the field above. */
|
||||
border-radius: 8px;
|
||||
padding: 8px 9px;
|
||||
color: $primary-content;
|
||||
background-color: $background;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mx_Field select {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Can't add pseudo-elements to a select directly, so we use its parent. */
|
||||
.mx_Field_select::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
mask: url("$(res)/img/feather-customised/dropdown-arrow.svg");
|
||||
mask-repeat: no-repeat;
|
||||
background-color: $primary-content;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.mx_Field:focus-within {
|
||||
border-color: $accent-alt;
|
||||
}
|
||||
|
||||
.mx_Field input:focus,
|
||||
.mx_Field select:focus,
|
||||
.mx_Field textarea:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.mx_Field input::placeholder,
|
||||
.mx_Field textarea::placeholder {
|
||||
transition: color 0.25s ease-in 0s;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.mx_Field input:placeholder-shown:focus::placeholder,
|
||||
.mx_Field textarea:placeholder-shown:focus::placeholder,
|
||||
.mx_Field.mx_Field_placeholderIsHint input::placeholder {
|
||||
transition: color 0.25s ease-in 0.1s;
|
||||
color: $info-plinth-fg-color;
|
||||
}
|
||||
|
||||
.mx_Field label {
|
||||
transition:
|
||||
font-size 0.25s ease-out 0.1s,
|
||||
color 0.25s ease-out 0.1s,
|
||||
transform 0.25s ease-out 0.1s,
|
||||
background-color 0.25s ease-out 0.1s;
|
||||
background-color: transparent;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
color: var(--cpd-color-text-secondary);
|
||||
transform: translateY(0);
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
margin: 7px 8px;
|
||||
padding: 2px;
|
||||
pointer-events: none; /* Allow clicks to fall through to the input */
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: calc(100% - 20px); /* 100% of parent minus margin and padding */
|
||||
}
|
||||
|
||||
.mx_Field_labelAlwaysTopLeft label,
|
||||
.mx_Field select + label /* Always show a select's label on top to not collide with the value */,
|
||||
.mx_Field input:focus + label,
|
||||
.mx_Field input:not(:placeholder-shown) + label,
|
||||
.mx_Field textarea:focus + label,
|
||||
.mx_Field textarea:not(:placeholder-shown) + label {
|
||||
transition:
|
||||
font-size 0.25s ease-out 0s,
|
||||
color 0.25s ease-out 0s,
|
||||
transform 0.25s ease-out 0s,
|
||||
background-color 0.25s ease-out 0s;
|
||||
font-size: $font-10px;
|
||||
transform: translateY(-13px);
|
||||
padding: 0 2px;
|
||||
background-color: $background;
|
||||
pointer-events: initial;
|
||||
}
|
||||
|
||||
.mx_Field input:focus + label,
|
||||
.mx_Field select:focus + label,
|
||||
.mx_Field textarea:focus + label {
|
||||
color: $accent-alt;
|
||||
}
|
||||
|
||||
.mx_Field select:disabled,
|
||||
.mx_Field select:disabled + label,
|
||||
.mx_Field input:disabled,
|
||||
.mx_Field input:disabled + label,
|
||||
.mx_Field textarea:disabled,
|
||||
.mx_Field textarea:disabled + label {
|
||||
background-color: $background;
|
||||
color: $info-plinth-fg-color;
|
||||
}
|
||||
|
||||
.mx_Field_valid {
|
||||
&.mx_Field,
|
||||
&.mx_Field:focus-within {
|
||||
border-color: $accent;
|
||||
}
|
||||
|
||||
&.mx_Field label,
|
||||
&.mx_Field:focus-within label {
|
||||
color: $accent;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_Field_invalid {
|
||||
&.mx_Field,
|
||||
&.mx_Field:focus-within {
|
||||
border-color: $alert;
|
||||
}
|
||||
|
||||
&.mx_Field label,
|
||||
&.mx_Field:focus-within label {
|
||||
color: $alert;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_Field_tooltip {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.mx_Field_tooltip.mx_Field_valid {
|
||||
animation: mx_fadeout 1s 2s forwards;
|
||||
}
|
||||
|
||||
/* Customise other components when placed inside a Field */
|
||||
|
||||
.mx_Field .mx_Dropdown_input {
|
||||
border: initial;
|
||||
border-radius: initial;
|
||||
}
|
||||
|
||||
.mx_Field .mx_CountryDropdown {
|
||||
width: fit-content;
|
||||
}
|
||||
Reference in New Issue
Block a user