@memori.ai/memori-react
Version:
[](https://www.npmjs.com/package/@memori.ai/memori-react)   • 6.77 kB
CSS
/* Updated FilePreview Styles */
.memori--preview-container {
z-index: 10;
overflow: hidden;
width: 100%;
min-width: 0;
max-width: 100%;
border-radius: 8px;
animation: slide-in 0.3s ease;
background: white;
transition: all 0.3s ease;
}
.memori--preview-container.slide-down {
animation: slide-down 0.3s ease;
}
/* Responsive adjustments for file preview */
@media (max-width: 768px) {
.memori--absolute-preview {
max-height: 150px;
}
.memori--preview-container {
padding: 8px;
margin-bottom: 8px;
}
.memori--preview-filename {
max-width: 150px;
font-size: 12px;
}
/* Make remove button always visible on mobile */
.memori--remove-button {
opacity: 1 ;
transform: scale(1) ;
}
/* Increase card size for easier interaction */
.memori--preview-item {
min-width: 140px;
min-height: 60px;
padding: 12px;
}
.memori--preview-icon {
width: 24px;
height: 24px;
}
.memori--preview-thumbnail {
min-width: 50px;
min-height: 50px;
}
.memori--preview-thumbnail img {
width: 50px;
height: 50px;
object-fit: cover;
}
}
@media (max-width: 480px) {
.memori--absolute-preview {
max-height: 120px;
}
.memori--preview-container {
padding: 6px;
margin-bottom: 6px;
}
.memori--preview-filename {
max-width: 100px;
font-size: 11px;
}
/* Make remove button always visible on mobile */
.memori--remove-button {
opacity: 1 ;
transform: scale(1) ;
}
/* Increase card size for easier interaction on small screens */
.memori--preview-item {
min-width: 160px;
min-height: 70px;
padding: 14px;
}
.memori--preview-icon {
width: 28px;
height: 28px;
}
.memori--preview-thumbnail {
min-width: 60px;
min-height: 60px;
}
.memori--preview-thumbnail img {
width: 60px;
height: 60px;
object-fit: cover;
}
}
.memori--message-preview {
max-width: 100%;
margin: 12px 0;
}
.memori--preview-list {
display: flex;
width: 100%;
min-width: 0;
flex-direction: row;
flex-wrap: nowrap;
padding: 0.875rem;
padding-bottom: 0.625rem;
gap: 8px;
-webkit-overflow-scrolling: touch;
overflow-x: auto;
overflow-y: hidden;
scrollbar-color: hsla(var(--border-300) / 35%) transparent;
scrollbar-width: thin;
}
.memori--preview-item {
position: relative;
display: flex;
max-width: fit-content;
flex-shrink: 0;
align-items: center;
padding: 8px;
border-radius: 8px;
animation: slide-in 0.3s ease;
background-color: #f8f9fa;
cursor: pointer;
gap: 8px;
transition: all 0.2s ease;
}
.memori--preview-item:hover {
background-color: #f1f3f5;
transform: translateX(4px);
}
.memori--preview-icon {
width: 20px;
height: 20px;
flex-shrink: 0;
color: #fff;
fill: #868e96;
}
.memori--preview-thumbnail {
display: flex;
overflow: hidden;
flex-shrink: 0;
align-items: center;
justify-content: center;
border-radius: 4px;
}
.memori--preview-thumbnail img {
width: 40px;
height: 40px;
border-radius: 4px;
object-fit: cover;
}
.memori--preview-file-info {
display: flex;
overflow: hidden;
flex-direction: column;
}
.memori-modal--title {
overflow: hidden;
max-width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
}
.memori--preview-filename {
overflow: hidden;
max-width: 100px;
color: #495057;
font-size: 14px;
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
}
.memori--preview-filetype {
margin-top: 2px;
color: #868e96;
font-size: 12px;
}
.memori--modal-title-preview {
margin-top: 12px;
margin-bottom: 12px;
font-size: 20px;
font-weight: 600;
}
.memori--remove-button {
position: absolute;
top: -4px;
right: -4px;
padding: 4px;
border: none;
border-radius: 50%;
background-color: #e03131;
color: white;
cursor: pointer;
opacity: 0;
transform: scale(0.75);
transition: all 0.2s ease;
}
.memori--remove-button:hover {
background-color: #c92a2a;
transform: scale(1.1);
}
/* Show remove button only when user hovers the preview item */
.memori--preview-item:hover .memori--remove-button {
opacity: 1;
transform: scale(1);
}
.memori--remove-icon {
width: 12px;
height: 12px;
}
.memori--modal-preview-file {
width: 100%;
max-width: 800px;
height: 100%;
padding: 12px;
}
.memori--preview-content {
padding: 16px;
border-radius: 8px;
/* background-color: #f8f9fa; */
font-family: monospace;
font-size: 14px;
line-height: 1.5;
}
/* Skeleton loading card */
.memori--preview-item--skeleton {
min-width: 140px;
cursor: default;
pointer-events: none;
}
.memori--preview-item--skeleton:hover {
background-color: #f8f9fa;
transform: none;
}
.memori--skeleton-icon {
width: 20px;
height: 20px;
flex-shrink: 0;
border-radius: 4px;
animation: memori-skeleton-pulse 1.5s ease-in-out infinite;
background: linear-gradient(90deg, #e9ecef 25%, #f1f3f5 50%, #e9ecef 75%);
background-size: 200% 100%;
}
.memori--skeleton-line {
border-radius: 4px;
animation: memori-skeleton-pulse 1.5s ease-in-out infinite;
background: linear-gradient(90deg, #e9ecef 25%, #f1f3f5 50%, #e9ecef 75%);
background-size: 200% 100%;
}
.memori--skeleton-line--name {
width: 80px;
height: 12px;
margin-bottom: 6px;
}
.memori--skeleton-line--type {
width: 40px;
height: 10px;
}
@keyframes memori-skeleton-pulse {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes slide-up {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slide-in {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slide-down {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0;
transform: translateY(10px);
}
}