v0.1.7 — Toast, Button regular plus compact, note backdrop root imbriqué
- backdrop-filter : préfixe -webkit- déclaré avant la forme standard - Button size="regular" : 39px / 15px subheadline (token --control-height-regular) - nouveau Toast / ToastProvider / useToast (token --z-toast) - README : règle « ne pas imbriquer deux .material-* » Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+74
-13
@@ -47,6 +47,15 @@
|
||||
|
||||
/* ===== Cible tactile minimale ===== */
|
||||
--tap-target-min: 44px;
|
||||
/* v0.1.7 — hauteur du Button "regular" : 39px, milieu entre 44px
|
||||
(cible tactile HIG) et 34px (--control-height-compact, égal au
|
||||
Medium audité). VALEUR DÉRIVÉE, pas auditée : le kit n'a pas de
|
||||
bouton à 39px (tailles observées : 28 / 34 / 50). Retenue car un
|
||||
bouton à 44px + 17px pesait à côté du texte de champ en 15px, validée
|
||||
en usage réel (app Cars). NB : elle passe sous les 44px recommandés
|
||||
par le HIG pour le tactile ; --tap-target-min reste la référence si
|
||||
une app cible surtout le tactile. */
|
||||
--control-height-regular: 39px;
|
||||
--control-height-compact: 34px;
|
||||
|
||||
/* ===== Espacement — dérivé des valeurs réellement observées dans le kit
|
||||
@@ -66,6 +75,10 @@
|
||||
--space-7: 24px;
|
||||
--space-8: 48px;
|
||||
|
||||
/* ===== Couches — .dialog-overlay reste à 1000 (valeur historique, non
|
||||
migrée) ; le toast s'affiche au-dessus, y compris d'un dialogue. ===== */
|
||||
--z-toast: 1100;
|
||||
|
||||
/* ===== Typographie — échelle réelle (points Apple), police nApps (Manrope) =====
|
||||
Taille/graisse/interligne/tracking vérifiés sur le kit — la hiérarchie se fait
|
||||
autant par le POIDS que par la taille (Headline et Body partagent 17pt). */
|
||||
@@ -161,26 +174,26 @@
|
||||
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||
.material-control {
|
||||
background: rgba(255, 255, 255, 0.55);
|
||||
backdrop-filter: blur(46px) saturate(1.6);
|
||||
-webkit-backdrop-filter: blur(46px) saturate(1.6);
|
||||
backdrop-filter: blur(46px) saturate(1.6);
|
||||
}
|
||||
:root[data-theme="dark"] .material-control {
|
||||
background: rgba(38, 41, 48, 0.5);
|
||||
backdrop-filter: blur(46px) saturate(1.4);
|
||||
-webkit-backdrop-filter: blur(46px) saturate(1.4);
|
||||
backdrop-filter: blur(46px) saturate(1.4);
|
||||
}
|
||||
}
|
||||
|
||||
.material-panel {
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
backdrop-filter: blur(30px);
|
||||
-webkit-backdrop-filter: blur(30px);
|
||||
backdrop-filter: blur(30px);
|
||||
box-shadow: 0 8px 48px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
:root[data-theme="dark"] .material-panel {
|
||||
background: rgba(20, 20, 20, 0.85);
|
||||
backdrop-filter: blur(30px);
|
||||
-webkit-backdrop-filter: blur(30px);
|
||||
backdrop-filter: blur(30px);
|
||||
box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
@@ -208,13 +221,13 @@
|
||||
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
||||
.material-popover {
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
backdrop-filter: blur(65px) saturate(1.6);
|
||||
-webkit-backdrop-filter: blur(65px) saturate(1.6);
|
||||
backdrop-filter: blur(65px) saturate(1.6);
|
||||
}
|
||||
:root[data-theme="dark"] .material-popover {
|
||||
background: rgba(38, 41, 48, 0.5);
|
||||
backdrop-filter: blur(65px) saturate(1.4);
|
||||
-webkit-backdrop-filter: blur(65px) saturate(1.4);
|
||||
backdrop-filter: blur(65px) saturate(1.4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,8 +242,8 @@
|
||||
.material-popover,
|
||||
:root[data-theme="dark"] .material-popover {
|
||||
background: var(--bg-grouped);
|
||||
backdrop-filter: none;
|
||||
-webkit-backdrop-filter: none;
|
||||
backdrop-filter: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,10 +258,10 @@
|
||||
color: #FFFFFF;
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
min-height: var(--tap-target-min);
|
||||
min-height: var(--control-height-regular);
|
||||
padding: 0 var(--space-6);
|
||||
font: var(--text-body-weight) var(--text-body-size)/var(--text-body-line) var(--font-family);
|
||||
letter-spacing: var(--text-body-tracking);
|
||||
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||
letter-spacing: var(--text-subheadline-tracking);
|
||||
}
|
||||
.btn-primary--compact {
|
||||
min-height: var(--control-height-compact);
|
||||
@@ -262,10 +275,10 @@
|
||||
color: var(--napps-accent);
|
||||
border: none;
|
||||
border-radius: var(--radius-pill);
|
||||
min-height: var(--tap-target-min);
|
||||
min-height: var(--control-height-regular);
|
||||
padding: 0 var(--space-6);
|
||||
font: var(--text-body-weight) var(--text-body-size)/var(--text-body-line) var(--font-family);
|
||||
letter-spacing: var(--text-body-tracking);
|
||||
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||
letter-spacing: var(--text-subheadline-tracking);
|
||||
}
|
||||
.btn-secondary--compact {
|
||||
min-height: var(--control-height-compact);
|
||||
@@ -653,3 +666,51 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
TOAST — confirmation discrète après une action. Surface OPAQUE
|
||||
(jamais une matière translucide : la lisibilité ne dépend jamais
|
||||
du flou), pilule, centrée en bas. L'ombre est celle de
|
||||
.material-panel/.dialog — 0 8px 48px à .25 en light et .5 en dark,
|
||||
deux valeurs déjà vérifiées séparément — plus un liseré separator
|
||||
(token dark vérifié) qui garde le contour lisible sur fond sombre
|
||||
où l'ombre seule se voit à peine. Les couleurs d'icône viennent des
|
||||
tokens success/error, qui ont chacun leur valeur dark.
|
||||
============================================================ */
|
||||
.toast-region {
|
||||
position: fixed;
|
||||
left: 0; right: 0;
|
||||
bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0 var(--space-5);
|
||||
pointer-events: none;
|
||||
z-index: var(--z-toast);
|
||||
}
|
||||
.toast {
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
min-height: var(--control-height-regular);
|
||||
max-width: 100%;
|
||||
padding: var(--space-3) var(--space-5);
|
||||
border-radius: var(--radius-pill);
|
||||
background: var(--bg-grouped);
|
||||
color: var(--label-primary);
|
||||
font: var(--text-subheadline-weight) var(--text-subheadline-size)/var(--text-subheadline-line) var(--font-family);
|
||||
letter-spacing: var(--text-subheadline-tracking);
|
||||
box-shadow: 0 0 0 1px var(--separator), 0 8px 48px rgba(0, 0, 0, 0.25);
|
||||
animation: napps-toast-in 120ms ease-out;
|
||||
}
|
||||
:root[data-theme="dark"] .toast {
|
||||
box-shadow: 0 0 0 1px var(--separator), 0 8px 48px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.toast__icon { display: inline-flex; flex-shrink: 0; }
|
||||
.toast--success .toast__icon { color: var(--napps-success); }
|
||||
.toast--error .toast__icon { color: var(--napps-error); }
|
||||
.toast__message { min-width: 0; overflow-wrap: anywhere; }
|
||||
@keyframes napps-toast-in { from { opacity: 0; transform: translateY(var(--space-3)); } }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.toast { animation: none; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user