UNPKG

@memori.ai/memori-react

Version:

[![npm version](https://img.shields.io/github/package-json/v/memori-ai/memori-react)](https://www.npmjs.com/package/@memori.ai/memori-react) ![Tests](https://github.com/memori-ai/memori-react/workflows/CI/badge.svg?branch=main) ![TypeScript Support](https

341 lines (297 loc) 7.07 kB
.memori-chat-inputs-wrapper { position: sticky; z-index: 10; bottom: 0; width: 100%; padding: 0; padding-bottom: 1.5rem; margin: 0; /* background: linear-gradient(to top, rgba(255, 255, 255, 0.8) 0%, transparent 100%); */ } .memori-chat-inputs { position: relative; display: flex; min-width: 98%; max-width: 98%; box-sizing: border-box; flex-flow: column; flex-shrink: 0; padding: 0; padding: 8px 12px !important; border: none; border-radius: 12px; margin: 0; margin: auto; background: white; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .memori-chat-inputs:disabled { opacity: 0.5; pointer-events: none; } /* Wrapper so FilePreview horizontal scroll is constrained */ .memori-chat-inputs--preview-wrapper { overflow: hidden; width: 100%; min-width: 0; } .memori-chat-inputs--container { position: relative; display: grid; width: 100%; /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */ min-height: 56px; box-sizing: border-box; align-items: center; padding: 0 1rem; padding: 12px; border-radius: var(--memori-border-radius); /* max-width: 48rem; */ margin: 0 auto; background: #fff; gap: 0; grid-template-areas: 'leading primary trailing'; grid-template-columns: auto 1fr auto; } /* Responsive adjustments */ @media (max-width: 768px) { .memori-chat-inputs--container { padding: 0 0.5rem; } } @media (max-width: 480px) { .memori-chat-inputs--container { padding: 0 0.25rem; } } .memori-chat-inputs--leading { display: flex; align-items: center; padding-right: 6px; grid-area: leading; } .memori-chat-inputs--primary { display: flex; overflow: hidden; min-height: 36px; align-items: center; grid-area: primary; } .memori-chat-inputs--trailing { display: flex; align-items: center; padding-left: 8px; grid-area: trailing; } .memori-chat-inputs--trailing-inner { display: flex; align-items: center; gap: 12px; } /* Plus button styling */ .memori-chat-inputs--upload-wrapper { display: flex; align-items: center; } .memori-chat-inputs--upload-wrapper .memori--unified-upload-wrapper { display: flex; align-items: center; } .memori-chat-inputs--upload-wrapper .memori-button { display: flex; width: 20px; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0; border: none !important; background: transparent !important; box-shadow: none !important; color: #000 !important; cursor: pointer; transition: opacity 0.2s ease; } .memori-chat-inputs--upload-wrapper .memori-button:hover { background: transparent !important; opacity: 0.7; } .memori-chat-inputs--upload-wrapper .memori-button:disabled { cursor: not-allowed; opacity: 0.3; } /* Icon class styling */ .memori-chat-inputs--container .icon { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; } .memori-chat-inputs--disclaimer-text { padding: 4px 12px; border-radius: 10px; margin-top: 2px; background-color: var(--memori-inner-bg, transparent); color: rgba(0, 0, 0, 0.6); font-size: 12px; line-height: 1.5; text-align: center; } /* Microphone button styling */ .memori-chat-inputs--mic-btn { display: flex; width: 20px; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0; border: none; background: transparent; color: #000; cursor: pointer; transition: opacity 0.2s ease; } .memori-chat-inputs--mic-btn:hover { opacity: 0.7; } .memori-chat-inputs--mic-btn:disabled { cursor: not-allowed; opacity: 0.3; } .memori-chat-inputs--mic-btn svg, .memori-chat-inputs--mic-btn .icon { width: 20px; height: 20px; fill: #000; } /* Ensure icons are black on white background */ .memori-chat-inputs--leading .icon { fill: #000; } .memori-chat-inputs--send-btn svg { width: 20px; height: 20px; fill: #fff; } .memori-chat-inputs--send-btn .icon { width: 20px; height: 20px; fill: #fff; } .memori-chat-inputs--upload-wrapper .memori-button svg, .memori-chat-inputs--upload-wrapper .memori-button .icon { width: 20px; height: 20px; /* fill: #000; */ } .memori-chat-inputs--trailing .memori-chat-inputs--mic-btn .icon { fill: #000; } .memori-chat-inputs--mic-btn--listening { color: #10a37f; } .memori-chat-inputs--mic { font-size: 125%; } /* Style MicrophoneButton component when used in trailing area */ .memori-chat-inputs--trailing .memori-chat-inputs--mic { width: 20px; min-width: 20px; height: 20px; padding: 0; border: none; background: transparent; color: #000; } .memori-chat-inputs--trailing .memori-chat-inputs--mic .memori-button { width: 20px; min-width: 20px; height: 20px; padding: 0; border: none; background: transparent; color: #000; } /* Send button styling - ChatGPT style */ .memori-chat-inputs--send-btn { display: flex; width: 32px; min-width: 32px; height: 32px; flex-shrink: 0; align-items: center; justify-content: center; padding: 0; border: none; border-radius: var(--memori-border-radius); background: #000; background: var(--memori-chat-user-bubble-bg); color: #fff; cursor: pointer; transition: all 0.2s ease; } .memori-chat-inputs--send-btn:disabled { /* background: #f4f4f4; */ color: #f4f4f4; cursor: not-allowed; opacity: 0.3; } .memori-chat-inputs--send-btn:hover:not(:disabled) { opacity: 0.7; } .memori-chat-inputs--trailing .memori-chat-inputs--mic svg { width: 20px; height: 20px; } .memori-chat-inputs--send-btn--active { /* background: #000; */ color: #fff; } .memori-chat-inputs--send-btn--loading { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: var(--memori-border-radius); border-top-color: transparent; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Disclaimer styling */ .memori-chat-inputs--disclaimer { display: flex; min-height: 32px; align-items: center; justify-content: center; padding: 8px 60px; margin-top: -4px; color: rgba(0, 0, 0, 0.6); font-size: 12px; line-height: 1.5; text-align: center; } .memori-chat-inputs--disclaimer a { color: rgba(0, 0, 0, 0.8); cursor: pointer; text-decoration: underline; } .memori-chat-inputs--disclaimer a:hover { opacity: 0.8; } @media (max-width: 768px) { .memori-chat-inputs--disclaimer { padding: 8px 16px; } } /* Legacy support for old button classes */ .memori-chat-inputs .memori-upload-menu + .memori-send-on-enter-menu { margin-left: 0.33rem; } .memori-chat-inputs .memori--conversation-button { background: #fff; color: #000; }