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

158 lines (139 loc) 3.47 kB
/* Screen reader only - visually hidden but accessible */ .sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; border-width: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; } /* Base Container */ .memori--date-selector { width: 100%; /* margin-top: 1.5rem; */ } /* Mobile Styles */ .memori--date-selector--mobile { display: flex; width: 100%; max-width: 100%; box-sizing: border-box; flex-direction: column; padding: 0; margin: 1rem 0; } .memori--date-selector__mobile-label { display: block; width: 100%; margin-bottom: 0.5rem; color: #374151; font-size: 0.95rem; font-weight: 500; text-align: left; } .memori--date-selector__mobile-input { width: 100%; max-width: 100%; min-height: 48px; box-sizing: border-box; padding: 0.875rem 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; -webkit-appearance: none; appearance: none; background: #ffffff; /* Touch-friendly */ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); color: #1f2937; font-size: 1rem; transition: all 0.2s ease; } .memori--date-selector__mobile-input:focus { border-color: var(--memori-primary, #9333ea); box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1); outline: none; } .memori--date-selector__mobile-input:active { border-color: var(--memori-primary, #9333ea); } .memori--date-selector__mobile-input:disabled { background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; opacity: 0.6; } /* Desktop Styles */ .memori--date-selector--desktop { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; } .memori--date-selector__input-group { display: flex; min-width: 80px; /* flex: 1; */ flex-direction: column; } .memori--date-selector__input-group--year { min-width: 100px; } .memori--date-selector__label { display: inline-block; margin-bottom: 0.5rem; color: #4b5563; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.01em; } .memori--date-selector__input { width: 100%; padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 0.75rem; -moz-appearance: textfield; appearance: textfield; /* Remove spinner buttons */ background: #ffffff; color: #1f2937; font-size: 0.95rem; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .memori--date-selector__input::-webkit-outer-spin-button, .memori--date-selector__input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; } .memori--date-selector__input:focus { border-color: var(--memori-primary); box-shadow: 0 0 0 4px rgba(var(--memori-primary-rgb), 0.1); outline: none; transform: translateY(-1px); } .memori--date-selector__input:disabled { border-color: #e5e7eb; background: #f9fafb; color: #9ca3af; cursor: not-allowed; opacity: 0.6; } .memori--date-selector__input::placeholder { color: #9ca3af; } /* Responsive adjustments */ @media (max-width: 767px) { .memori--date-selector--desktop { display: none; /* Hide desktop version on mobile if both are rendered for some reason */ } .memori--date-selector--mobile { margin: 0.75rem 0; } .memori--date-selector__mobile-input { min-height: 44px; font-size: 16px; /* Prevents zoom on iOS */ } }