2023-04-25 16:23:03 +08:00
|
|
|
.chat-composer {
|
|
|
|
&__wrapper {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
z-index: 3;
|
2023-05-16 23:17:12 +08:00
|
|
|
background-color: var(--primary-very-low);
|
2023-05-22 23:00:50 +08:00
|
|
|
padding: 0.5rem 0 env(safe-area-inset-bottom) 0;
|
2023-05-17 00:46:14 +08:00
|
|
|
|
|
|
|
.keyboard-visible & {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
2023-04-25 16:23:03 +08:00
|
|
|
|
|
|
|
#chat-full-page-uploader,
|
|
|
|
#chat-widget-uploader {
|
|
|
|
display: none;
|
|
|
|
}
|
2022-11-02 21:41:30 +08:00
|
|
|
|
2023-04-25 16:23:03 +08:00
|
|
|
.drop-a-file {
|
|
|
|
display: none;
|
|
|
|
}
|
2023-05-22 23:55:31 +08:00
|
|
|
|
|
|
|
.chat-replying-indicator {
|
|
|
|
padding-inline: 1rem;
|
|
|
|
}
|
2022-11-02 21:41:30 +08:00
|
|
|
}
|
|
|
|
|
2023-05-16 23:17:12 +08:00
|
|
|
.chat-composer-button,
|
|
|
|
.chat-composer-separator {
|
2023-05-22 23:00:50 +08:00
|
|
|
align-self: flex-end;
|
2023-05-16 23:17:12 +08:00
|
|
|
}
|
|
|
|
|
2023-04-25 16:23:03 +08:00
|
|
|
&__outer-container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
2023-05-22 23:00:50 +08:00
|
|
|
padding-inline: 1rem;
|
|
|
|
}
|
|
|
|
|
2023-04-25 16:23:03 +08:00
|
|
|
&__inner-container {
|
2022-11-02 21:41:30 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2023-04-25 16:23:03 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
|
|
|
flex-direction: row;
|
2023-05-17 13:10:02 +08:00
|
|
|
border: 1px solid var(--primary-low);
|
2023-05-16 23:17:12 +08:00
|
|
|
border-radius: 10px;
|
2023-04-25 16:23:03 +08:00
|
|
|
background-color: var(--secondary);
|
2023-05-16 23:17:12 +08:00
|
|
|
min-height: 50px;
|
|
|
|
overflow: hidden;
|
2022-11-02 21:41:30 +08:00
|
|
|
|
2023-04-28 16:24:49 +08:00
|
|
|
.chat-composer.is-focused & {
|
2023-05-17 13:10:02 +08:00
|
|
|
border-color: var(--primary-low-mid);
|
|
|
|
box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.1);
|
2023-04-25 16:23:03 +08:00
|
|
|
}
|
|
|
|
|
2023-04-28 16:24:49 +08:00
|
|
|
.chat-composer.is-disabled & {
|
2023-04-25 16:23:03 +08:00
|
|
|
background: var(--primary-low);
|
2023-04-28 16:24:49 +08:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
2022-11-02 21:41:30 +08:00
|
|
|
}
|
2023-04-25 16:23:03 +08:00
|
|
|
}
|
2022-11-02 21:41:30 +08:00
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
.chat-composer-button__btn {
|
|
|
|
background: none;
|
2023-05-16 23:17:12 +08:00
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
&:not(:disabled) {
|
2023-05-18 21:15:10 +08:00
|
|
|
.d-icon {
|
|
|
|
color: var(--primary-high);
|
|
|
|
}
|
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
.no-touch & {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
.d-icon {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.primary {
|
|
|
|
.d-icon {
|
|
|
|
color: var(--tertiary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-04-28 16:24:49 +08:00
|
|
|
}
|
2023-04-25 16:23:03 +08:00
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
&.primary {
|
2023-05-16 23:17:12 +08:00
|
|
|
.d-icon {
|
2023-05-23 16:12:03 +08:00
|
|
|
color: var(--tertiary);
|
2023-05-16 23:17:12 +08:00
|
|
|
}
|
|
|
|
}
|
2023-04-25 16:23:03 +08:00
|
|
|
}
|
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
&:disabled {
|
2023-04-25 16:23:03 +08:00
|
|
|
cursor: default;
|
2023-05-16 23:17:12 +08:00
|
|
|
|
|
|
|
.d-icon {
|
2023-05-18 21:15:10 +08:00
|
|
|
color: var(--primary-low-mid);
|
2023-05-16 23:17:12 +08:00
|
|
|
}
|
2023-05-23 16:12:03 +08:00
|
|
|
}
|
|
|
|
}
|
2023-05-16 23:17:12 +08:00
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
&__send-btn {
|
|
|
|
will-change: scale;
|
|
|
|
|
|
|
|
@keyframes sendingScales {
|
|
|
|
0% {
|
|
|
|
transform: scale(0.9);
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
transform: scale(1.2);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: scale(0.9);
|
2023-04-28 16:24:49 +08:00
|
|
|
}
|
|
|
|
}
|
2023-04-25 16:23:03 +08:00
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
.chat-composer.is-sending & {
|
|
|
|
animation: sendingScales 1s infinite linear;
|
|
|
|
}
|
2023-05-16 23:17:12 +08:00
|
|
|
|
2023-05-23 16:12:03 +08:00
|
|
|
&:not(:disabled) {
|
2023-04-25 16:23:03 +08:00
|
|
|
&:hover {
|
2023-05-23 16:12:03 +08:00
|
|
|
.d-icon {
|
|
|
|
transform: scale(1.2);
|
|
|
|
}
|
2022-11-02 21:41:30 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-25 16:23:03 +08:00
|
|
|
&__input-container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
2023-05-16 23:17:12 +08:00
|
|
|
align-self: stretch;
|
2023-04-25 16:23:03 +08:00
|
|
|
}
|
|
|
|
|
2023-05-22 23:00:50 +08:00
|
|
|
--100dvh: 100vh;
|
|
|
|
@supports (height: 100dvh) {
|
|
|
|
--100dvh: 100dvh;
|
|
|
|
}
|
|
|
|
|
2023-04-25 16:23:03 +08:00
|
|
|
&__input {
|
2022-11-02 21:41:30 +08:00
|
|
|
overflow-x: hidden;
|
|
|
|
width: 100%;
|
|
|
|
appearance: none;
|
|
|
|
outline: none;
|
|
|
|
border: 0;
|
|
|
|
resize: none;
|
2023-05-22 23:00:50 +08:00
|
|
|
max-height: calc(
|
|
|
|
(
|
|
|
|
var(--100dvh) - var(--header-offset, 0px) -
|
|
|
|
var(--chat-header-offset, 0px)
|
|
|
|
) / 100 * 25
|
|
|
|
);
|
2022-11-02 21:41:30 +08:00
|
|
|
background: none;
|
2023-05-16 23:17:12 +08:00
|
|
|
padding: 0;
|
2023-05-22 23:00:50 +08:00
|
|
|
margin: 5px 0;
|
2022-11-02 21:41:30 +08:00
|
|
|
text-overflow: ellipsis;
|
2023-04-28 16:24:49 +08:00
|
|
|
cursor: inherit;
|
2023-04-03 16:46:38 +08:00
|
|
|
@include chat-scrollbar();
|
|
|
|
|
2023-04-25 16:23:03 +08:00
|
|
|
&[disabled] {
|
|
|
|
background: none;
|
2023-05-23 16:12:03 +08:00
|
|
|
|
|
|
|
.d-icon {
|
|
|
|
opacity: 0.4;
|
|
|
|
}
|
2023-04-25 16:23:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
2022-11-02 21:41:30 +08:00
|
|
|
&:placeholder-shown,
|
|
|
|
&::placeholder {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&__unreliable-network {
|
|
|
|
color: var(--danger);
|
|
|
|
padding: 0 0.5em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.chat-composer-message-details {
|
2023-05-26 15:16:27 +08:00
|
|
|
margin: 0 1rem 0.5rem 1rem;
|
2022-11-02 21:41:30 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.cancel-message-action {
|
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
}
|