feat(editor): implement US-EDITOR-MOBILE with fixed premium toolbar (44px), action sheet (bottom sheet) for block and AI actions, select all block text, and performance fallbacks
This commit is contained in:
@@ -3008,4 +3008,233 @@ html.font-system * {
|
||||
|
||||
.memento-toast-warning {
|
||||
border-color: var(--memento-accent) !important;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
US-EDITOR-MOBILE — Tactile & Mobile Styles
|
||||
============================================ */
|
||||
@media (max-width: 767px) {
|
||||
/* Masquer le bubble menu et le drag handle desktop sur mobile */
|
||||
.notion-bubble-menu,
|
||||
.drag-handle {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Rendre l'éditeur plus confortable sur mobile */
|
||||
.notion-editor.tiptap {
|
||||
padding-bottom: 80px !important; /* laisser de la place pour la toolbar */
|
||||
}
|
||||
}
|
||||
|
||||
/* Toolbar Mobile Fixe */
|
||||
.mobile-editor-toolbar-container {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 150;
|
||||
height: 52px;
|
||||
background: color-mix(in srgb, var(--popover) 90%, transparent);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
border-top: 1px solid var(--border);
|
||||
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
|
||||
display: none;
|
||||
animation: slide-up-toolbar 0.25s ease;
|
||||
}
|
||||
|
||||
@keyframes slide-up-toolbar {
|
||||
from { transform: translateY(100%); }
|
||||
to { transform: translateY(0); }
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.mobile-editor-toolbar-container {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-editor-toolbar-scroll {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none; /* Firefox */
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.mobile-editor-toolbar-scroll::-webkit-scrollbar {
|
||||
display: none; /* Safari & Chrome */
|
||||
}
|
||||
|
||||
.mobile-toolbar-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
background: transparent;
|
||||
color: var(--muted-foreground);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
flex-shrink: 0;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.mobile-toolbar-btn:active {
|
||||
background: var(--accent);
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.mobile-toolbar-btn.active {
|
||||
background: hsl(var(--primary) / 0.15);
|
||||
border-color: hsl(var(--primary) / 0.2);
|
||||
color: hsl(var(--primary));
|
||||
}
|
||||
|
||||
.mobile-toolbar-btn.highlight-btn {
|
||||
background: hsl(var(--primary));
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2px 8px hsl(var(--primary) / 0.3);
|
||||
}
|
||||
|
||||
.mobile-toolbar-btn.highlight-btn:active {
|
||||
background: hsl(var(--primary) / 0.9);
|
||||
}
|
||||
|
||||
/* Action Sheet / Bottom Sheet Tactile */
|
||||
.mobile-action-sheet-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
backdrop-filter: blur(4px);
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
z-index: 200;
|
||||
animation: fade-in-overlay 0.2s ease;
|
||||
}
|
||||
|
||||
.mobile-action-sheet-content {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--popover);
|
||||
border-top: 1px solid var(--border);
|
||||
border-radius: 16px 16px 0 0;
|
||||
box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
|
||||
padding: 16px;
|
||||
z-index: 210;
|
||||
animation: slide-up-sheet 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@keyframes fade-in-overlay {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
@keyframes slide-up-sheet {
|
||||
from { transform: translateY(100%); }
|
||||
to { transform: translateY(0); }
|
||||
}
|
||||
|
||||
.mobile-action-sheet-header {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 20px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.drag-indicator {
|
||||
width: 36px;
|
||||
height: 4px;
|
||||
background: var(--border);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.mobile-action-sheet-header .close-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -4px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
background: var(--muted);
|
||||
border: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
|
||||
.mobile-action-sheet-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.mobile-action-sheet-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
color: var(--muted-foreground);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.action-tile-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
height: 64px;
|
||||
background: var(--muted);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
color: var(--foreground);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.action-tile-btn:active {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.format-pill-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 6px 12px;
|
||||
background: var(--muted);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 20px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: var(--foreground);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.format-pill-btn:active {
|
||||
background: var(--accent);
|
||||
}
|
||||
Reference in New Issue
Block a user