@integrate.team/react-chatbot-types
Version:
text format markdown
335 lines (291 loc) • 6.83 kB
CSS
.smartBotContainer{
display: flex;
flex-direction: column;
justify-content: baseline;
height: 100%;
gap: 16px;
}
.userInput {
background-color: #f9fafb;
border: 1px solid #d1d5db;
color: #111827;
font-size: 0.875rem;
border-radius: 0.5rem;
outline: none;
width: 100%;
padding: 0.625rem;
&:focus {
ring-color: #3b82f6;
border-color: #3b82f6;
}
@media (prefers-color-scheme: dark) {
background-color: #374151;
border-color: #4b5563;
color: #ffffff;
&::placeholder {
color: #9ca3af;
}
&:focus {
ring-color: #3b82f6;
border-color: #3b82f6;
}
}
}
.content {
margin: 20px 16px;
padding: 15px;
min-height: 280;
background: #fff;
border-radius: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.contents {
padding: 1.5rem;
width: 100%;
display: flex; /* flex */
flex-direction: column; /* flex-col */
justify-content: space-between; /* justify-between */
height: 100%; /* h-full */
gap: 1rem; /* gap-4 (4 = 1rem) */
}
.listChatContent {
max-height: 100vh; /* max-h-screen (100vh tương ứng với chiều cao màn hình tối đa) */
overflow-y: auto; /* overflow-scroll (cho phép cuộn theo chiều dọc) */
}
/* Ẩn thanh cuộn */
.listChatContent::-webkit-scrollbar {
display: none; /* Ẩn thanh cuộn cho các trình duyệt dựa trên WebKit (Chrome, Safari) */
}
.listChatContent {
-ms-overflow-style: none; /* Ẩn thanh cuộn cho Internet Explorer và Edge */
scrollbar-width: none; /* Ẩn thanh cuộn cho Firefox */
}
.cardInput {
width: 100%; /* w-full */
display: flex; /* flex */
flex-direction: row;
}
.inputField {
background-color: #f9fafb; /* bg-gray-50 */
border: 1px solid #d1d5db; /* border border-gray-300 */
color: #111827; /* text-gray-900 */
font-size: 0.875rem; /* text-sm (0.875rem tương đương) */
border-radius: 0.5rem; /* rounded-lg */
outline: none; /* focus-visible:outline-none */
padding: 0.5rem; /* p-2.5 (0.625rem tương đương) */
display: block; /* block */
width: 100%;
/* Dark mode */
/* background-color: #374151;
border-color: #4b5563;
color: white; dark:text-white */
}
.imgChatBot {
display: flex; /* flex */
height: 3.25rem; /* h-13 (13 = 3.25rem) */
width: 3.25rem; /* w-13 (13 = 3.25rem) */
cursor: pointer; /* cursor-pointer */
align-items: center; /* items-center */
justify-content: center; /* justify-center */
border-radius: 0.125rem; /* rounded-sm */
color: white; /* text-white */
transition: all 0.3s ease-in-out; /* transition duration-300 ease-in-out */
}
/* Hover effect */
.imgChatBot:hover {
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* hover:shadow-signUp (custom shadow) */
background-color: rgba(255, 255, 255, 0.8); /* hover:bg-opacity-80 */
}
.iconsChatBot {
position: fixed; /* fixed */
bottom: 2rem; /* bottom-8 (8 = 2rem) */
right: 8rem; /* right-32 (32 = 8rem) */
z-index: 99; /* z-[99] */
}
/* Placeholder cho dark mode */
.inputField::placeholder {
color: #9ca3af; /* dark:placeholder-gray-400 */
}
/* Hiệu ứng focus cho dark mode */
.inputField:focus {
}
/* .wrapper {
background: var(--primary-color);
} */
.container {
position: fixed;
bottom: 3rem;
background-color: white;
right: 11.5rem;
z-index: 50;
height: 32rem;
width: 27rem;
border-radius: 0.5rem; /* rounded-lg */
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05); /* shadow-lg */
padding: 1.5rem; /* p-6 */
display: flex; /* flex */
flex-direction: row; /* flex-row */
align-items: center; /* items-center */
justify-content: center; /* justify-center */
z-index: 99; /* z-[99] */
}
.threeDotsTest {
background-color: var(--chatTextUserColor);
border-radius: 20px;
padding: 0px 10px;
color: white;
display: flex;
flex-direction: row;
align-items: center;
gap: 5px;
}
.hidenBtn {
font-size: "16px";
width: 64px;
height: 64px;
}
.header {
padding: 0px;
background: #fff;
display: flex;
flex-direction: row;
align-items: center;
}
.layout {
height: 100vh;
}
.title {
margin: 0px;
}
/* Thêm CSS này vào tệp CSS của bạn để ẩn thanh cuộn */
.scrollbar-hide::-webkit-scrollbar {
display: none; /* Ẩn thanh cuộn trên Chrome, Safari và Edge */
}
.scrollbar-hide {
-ms-overflow-style: none; /* Ẩn thanh cuộn trên Internet Explorer và Edge */
scrollbar: none; /* Ẩn thanh cuộn trên Firefox */
}
.sendButton {
background: #3b82f6;
color: white;
padding: 8px;
border: none;
border-radius: 0 4px 4px 0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.sendButton:hover {
background: #2563eb;
}
.inputWrapper {
position: relative;
display: flex;
align-items: center;
padding: 16px;
width: 100%;
}
.inputField {
flex: 1;
width: 100%;
padding: 8px 40px 8px 12px; /* Chừa khoảng trống bên phải cho icon */
border: 1px solid #ccc;
border-radius: 14px;
outline: none;
height: 30px;
}
.chatContainer {
background: white;
display: flex;
flex-direction: column;
height: 100%;
justify-content: space-between;
border-radius: 0.5rem;
}
.chatBox {
max-height: 84%;
background: white;
border-radius: 12px;
padding: 15px;
overflow-y: auto;
overflow-x: hidden;
}
/* Bọc tin nhắn user và bot */
.messageWrapper {
display: flex;
align-items: flex-start;
}
.userWrapper {
justify-content: flex-end;
margin-bottom: 10px;
}
.botWrapper {
justify-content: flex-start;
margin-bottom: 10px;
}
/* Avatar bot */
.botAvatar {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 8px;
}
.loadingBot{
display: flex;
flex-direction: row;
align-items: center;
}
/* Tin nhắn user (bên phải) */
.userMessage {
background: #FFD700;
color: #333;
padding: 10px 15px;
border-radius: 16px 16px 0 16px;
max-width: 75%;
}
/* Tin nhắn bot (bên trái, có avatar) */
.botMessage {
background: #ffffff;
color: #333;
padding: 10px 15px;
border-radius: 0px 16px 16px 16px;
max-width: 80%;
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}
.botMessageCarousel {
background: #ffffff;
color: #333;
border-radius: 0px 16px 16px 16px;
max-width: 100%;
}
/* Input và icon */
.cardInput {
height: 16%;
width: 100%;
border-radius: 0rem 0rem 0.5rem 0.5rem;
}
.inputWrapper {
position: relative;
display: flex;
align-items: center;
}
.inputField {
flex: 1;
width: 100%;
padding: 12px 40px 12px 12px;
border: 1px solid #ccc;
border-radius: 20px;
outline: none;
}
.sendIcon {
position: absolute;
right: 36px;
color: #FFD100;
cursor: pointer;
}
.sendIcon:hover {
color: #b99909ab;
}