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

174 lines (151 loc) 3.06 kB
.memori-dropdown { position: relative; display: inline-block; } .memori-dropdown--trigger { cursor: pointer; } .memori-dropdown--content { position: absolute; z-index: 10001; overflow: hidden; min-width: 280px; max-width: 320px; border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 12px; animation: dropdownFadeIn 0.2s ease-out; background: white; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1); } @keyframes dropdownFadeIn { from { opacity: 0; transform: translateY(-8px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } /* Placement variants */ .memori-dropdown--content--bottom-right { top: 100%; right: 0; margin-top: 8px; } .memori-dropdown--content--bottom-left { top: 100%; left: 0; margin-top: 8px; } .memori-dropdown--content--top-right { right: 0; bottom: 100%; margin-bottom: 8px; } .memori-dropdown--content--top-left { bottom: 100%; left: 0; margin-bottom: 8px; } /* User profile dropdown specific styles */ .memori-dropdown--user-profile { padding: 16px; /* border-bottom: 1px solid #f1f5f9; */ } .memori-dropdown--user-info { display: flex; align-items: center; gap: 12px; } .memori-dropdown--avatar { width: 48px; height: 48px; border: 2px solid #e2e8f0; border-radius: 50%; object-fit: cover; } .memori-dropdown--avatar-placeholder { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 2px solid #e2e8f0; border-radius: 50%; background: var(--memori-primary); color: white; font-size: 16px; font-weight: 600; } .memori-dropdown--user-details { min-width: 0; flex: 1; } .memori-dropdown--user-name { overflow: hidden; margin: 0; color: #1e293b; font-size: 14px; font-weight: 600; text-align: start; text-overflow: ellipsis; white-space: nowrap; } .memori-dropdown--user-email { overflow: hidden; margin: 2px 0 0 0; color: #64748b; font-size: 12px; text-align: start; text-overflow: ellipsis; white-space: nowrap; } .memori-dropdown--user-badge { border-radius: 12px; margin-top: 6px; color: rgb(119, 119, 119); font-size: 11px; font-weight: 500; text-align: start; } .memori-dropdown--actions { padding: 8px 0; } .memori-dropdown--action-button { display: flex; width: 100%; align-items: center; padding: 12px 16px; border: none; background: none; color: #374151; cursor: pointer; font-size: 14px; gap: 8px; text-align: left; transition: background-color 0.2s ease; } .memori-dropdown--action-button:hover { background: #f8fafc; } .memori-dropdown--action-button--logout { border-top: 1px solid #f1f5f9; margin-top: 4px; color: #dc2626; } .memori-dropdown--action-button--logout:hover { background: #fef2f2; } .memori-dropdown--action-icon { width: 16px; height: 16px; flex-shrink: 0; } /* Responsive adjustments */ @media (max-width: 640px) { .memori-dropdown--content { min-width: 260px; max-width: 280px; } }