@alis-build/design-system 0.48.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alisx.css +194 -27
- package/classes.json +27 -0
- package/components/AppAlert.md +1 -1
- package/components/AppAsk.md +2 -2
- package/components/AppButton.md +4 -3
- package/components/AppComposer.md +4 -4
- package/components/AppDialog.md +1 -1
- package/components/AppDisclosure.md +1 -1
- package/components/AppIconButton.md +3 -2
- package/components/AppListRow.md +3 -1
- package/components/AppMenu.md +2 -2
- package/components/AppSegmented.md +2 -1
- package/components/AppShell.md +4 -3
- package/components/AppTitleBar.md +3 -2
- package/components/AppTooltip.md +1 -1
- package/components/AppTurn.md +7 -3
- package/package.json +1 -1
- package/rules/README.md +1 -0
- package/rules/buttons.md +1 -1
- package/rules/known-gaps.md +6 -0
- package/rules/motion.md +154 -0
- package/rules/styling.md +3 -2
- package/stylelint.mjs +14 -0
- package/tokens.css +33 -0
- package/tokens.json +51 -4
package/alisx.css
CHANGED
|
@@ -181,10 +181,43 @@
|
|
|
181
181
|
--state-pressed: 0.12;
|
|
182
182
|
--state-statement: 0.04;
|
|
183
183
|
--state-dragged: 0.08;
|
|
184
|
+
--spring-fast-spatial: 359ms linear(0, 0.023, 0.084, 0.172, 0.275, 0.386, 0.498, 0.606, 0.705, 0.794, 0.872, 0.936, 0.988, 1.028, 1.058, 1.078, 1.089, 1.094, 1.094, 1.089, 1.082, 1.073, 1.062, 1.052, 1.041, 1.032, 1.023, 1.015, 1.008, 1.003, 0.999, 0.996, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.998, 1);
|
|
185
|
+
--spring-fast-spatial-duration: 359ms;
|
|
186
|
+
--spring-fast-spatial-easing: linear(0, 0.023, 0.084, 0.172, 0.275, 0.386, 0.498, 0.606, 0.705, 0.794, 0.872, 0.936, 0.988, 1.028, 1.058, 1.078, 1.089, 1.094, 1.094, 1.089, 1.082, 1.073, 1.062, 1.052, 1.041, 1.032, 1.023, 1.015, 1.008, 1.003, 0.999, 0.996, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.998, 1);
|
|
187
|
+
--spring-default-spatial: 435ms linear(0, 0.011, 0.04, 0.083, 0.136, 0.196, 0.259, 0.324, 0.389, 0.453, 0.514, 0.572, 0.626, 0.677, 0.723, 0.765, 0.802, 0.836, 0.866, 0.892, 0.914, 0.934, 0.95, 0.964, 0.976, 0.986, 0.994, 1, 1.005, 1.008, 1.011, 1.013, 1.014, 1.015, 1.015, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.006, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1.002, 1.001, 1);
|
|
188
|
+
--spring-default-spatial-duration: 435ms;
|
|
189
|
+
--spring-default-spatial-easing: linear(0, 0.011, 0.04, 0.083, 0.136, 0.196, 0.259, 0.324, 0.389, 0.453, 0.514, 0.572, 0.626, 0.677, 0.723, 0.765, 0.802, 0.836, 0.866, 0.892, 0.914, 0.934, 0.95, 0.964, 0.976, 0.986, 0.994, 1, 1.005, 1.008, 1.011, 1.013, 1.014, 1.015, 1.015, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.006, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1.002, 1.001, 1);
|
|
190
|
+
--spring-slow-spatial: 484ms linear(0, 0.009, 0.032, 0.066, 0.109, 0.157, 0.208, 0.262, 0.316, 0.369, 0.422, 0.472, 0.521, 0.566, 0.609, 0.649, 0.686, 0.721, 0.752, 0.781, 0.807, 0.83, 0.852, 0.871, 0.888, 0.903, 0.916, 0.928, 0.939, 0.948, 0.956, 0.963, 0.969, 0.974, 0.979, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 0.998, 0.999, 0.999, 1, 1, 1.001, 1.001, 1.001, 1.001, 1.001, 1.002, 1.002, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1);
|
|
191
|
+
--spring-slow-spatial-duration: 484ms;
|
|
192
|
+
--spring-slow-spatial-easing: linear(0, 0.009, 0.032, 0.066, 0.109, 0.157, 0.208, 0.262, 0.316, 0.369, 0.422, 0.472, 0.521, 0.566, 0.609, 0.649, 0.686, 0.721, 0.752, 0.781, 0.807, 0.83, 0.852, 0.871, 0.888, 0.903, 0.916, 0.928, 0.939, 0.948, 0.956, 0.963, 0.969, 0.974, 0.979, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 0.998, 0.999, 0.999, 1, 1, 1.001, 1.001, 1.001, 1.001, 1.001, 1.002, 1.002, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1);
|
|
193
|
+
--spring-fast-effects: 150ms linear(0, 0.086, 0.253, 0.427, 0.578, 0.697, 0.787, 0.853, 0.899, 0.932, 0.954, 0.969, 0.98, 0.987, 0.991, 0.994, 0.996, 0.998, 0.998, 1);
|
|
194
|
+
--spring-fast-effects-duration: 150ms;
|
|
195
|
+
--spring-fast-effects-easing: linear(0, 0.086, 0.253, 0.427, 0.578, 0.697, 0.787, 0.853, 0.899, 0.932, 0.954, 0.969, 0.98, 0.987, 0.991, 0.994, 0.996, 0.998, 0.998, 1);
|
|
196
|
+
--spring-default-effects: 231ms linear(0, 0.041, 0.134, 0.247, 0.363, 0.472, 0.568, 0.652, 0.722, 0.779, 0.826, 0.864, 0.894, 0.918, 0.936, 0.951, 0.962, 0.971, 0.978, 0.983, 0.987, 0.99, 0.993, 0.994, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
|
|
197
|
+
--spring-default-effects-duration: 231ms;
|
|
198
|
+
--spring-default-effects-easing: linear(0, 0.041, 0.134, 0.247, 0.363, 0.472, 0.568, 0.652, 0.722, 0.779, 0.826, 0.864, 0.894, 0.918, 0.936, 0.951, 0.962, 0.971, 0.978, 0.983, 0.987, 0.99, 0.993, 0.994, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
|
|
199
|
+
--spring-slow-effects: 326ms linear(0, 0.022, 0.075, 0.147, 0.227, 0.31, 0.391, 0.467, 0.537, 0.6, 0.657, 0.707, 0.751, 0.789, 0.822, 0.85, 0.874, 0.895, 0.912, 0.926, 0.939, 0.949, 0.958, 0.965, 0.971, 0.976, 0.98, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
|
|
200
|
+
--spring-slow-effects-duration: 326ms;
|
|
201
|
+
--spring-slow-effects-easing: linear(0, 0.022, 0.075, 0.147, 0.227, 0.31, 0.391, 0.467, 0.537, 0.6, 0.657, 0.707, 0.751, 0.789, 0.822, 0.85, 0.874, 0.895, 0.912, 0.926, 0.939, 0.949, 0.958, 0.965, 0.971, 0.976, 0.98, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
|
|
184
202
|
--font-sans: "Nunito Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
185
203
|
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
186
204
|
}
|
|
187
205
|
|
|
206
|
+
/* Reduced motion: nothing travels, and the fades stay, so nothing jump-cuts (rules/motion.md). */
|
|
207
|
+
@media (prefers-reduced-motion: reduce) {
|
|
208
|
+
:root {
|
|
209
|
+
--spring-fast-spatial: 0s linear;
|
|
210
|
+
--spring-fast-spatial-duration: 0ms;
|
|
211
|
+
--spring-fast-spatial-easing: linear;
|
|
212
|
+
--spring-default-spatial: 0s linear;
|
|
213
|
+
--spring-default-spatial-duration: 0ms;
|
|
214
|
+
--spring-default-spatial-easing: linear;
|
|
215
|
+
--spring-slow-spatial: 0s linear;
|
|
216
|
+
--spring-slow-spatial-duration: 0ms;
|
|
217
|
+
--spring-slow-spatial-easing: linear;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
188
221
|
/* Themes: light unless asked. data-theme works on any element (rules/themes.md). */
|
|
189
222
|
[data-theme="light"] { color-scheme: light; }
|
|
190
223
|
[data-theme="dark"] { color-scheme: dark; }
|
|
@@ -395,7 +428,7 @@ button, input, textarea, select { font: inherit; }
|
|
|
395
428
|
|
|
396
429
|
/* ── State layer: hover / focus / pressed over any interactive element ── */
|
|
397
430
|
.app-state{position:relative;isolation:isolate;cursor:pointer;-webkit-tap-highlight-color:transparent}
|
|
398
|
-
.app-state::before{content:"";position:absolute;inset:0;border-radius:inherit;background:currentColor;opacity:0;pointer-events:none;z-index:-1;transition:opacity var(--
|
|
431
|
+
.app-state::before{content:"";position:absolute;inset:0;border-radius:inherit;background:currentColor;opacity:0;pointer-events:none;z-index:-1;transition:opacity var(--spring-fast-effects)}
|
|
399
432
|
.app-state:hover::before{opacity:var(--state-hover)}
|
|
400
433
|
.app-state:focus-visible::before{opacity:var(--state-focus)}
|
|
401
434
|
.app-state:active::before{opacity:var(--state-pressed)}
|
|
@@ -412,7 +445,7 @@ button, input, textarea, select { font: inherit; }
|
|
|
412
445
|
.app-btn .app-icon{font-size:16px;margin-left:calc(var(--space-8) * -1)}
|
|
413
446
|
/* A trailing glyph (open_in_new, a menu's chevron) pulls into the end padding instead */
|
|
414
447
|
.app-btn .app-icon--trailing{margin-left:0;margin-right:calc(var(--space-8) * -1)}
|
|
415
|
-
.app-btn--filled{padding:0 var(--space-24);background:var(--primary);color:var(--on-primary);font-weight:700;transition:border-radius var(--
|
|
448
|
+
.app-btn--filled{padding:0 var(--space-24);background:var(--primary);color:var(--on-primary);font-weight:700;transition:border-radius var(--spring-fast-spatial),transform var(--spring-fast-spatial),background-color var(--spring-fast-effects)}
|
|
416
449
|
.app-btn--outlined{border:1px solid var(--outline-variant);background:var(--surface)}
|
|
417
450
|
.app-btn--error{color:var(--error)}
|
|
418
451
|
.app-btn--filled.app-btn--error{background:var(--error);color:var(--on-error)}
|
|
@@ -576,7 +609,7 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
576
609
|
.app-titlebar__leading{margin-left:calc(var(--space-12) * -1)}
|
|
577
610
|
.app-titlebar__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8);margin-left:auto}
|
|
578
611
|
.app-titlebar.is-scrolled,.app-file-pane__bar.is-scrolled{box-shadow:inset 0 -1px 0 var(--outline-variant)}
|
|
579
|
-
|
|
612
|
+
.app-titlebar,.app-file-pane__bar{transition:box-shadow var(--spring-fast-effects)}
|
|
580
613
|
.app-search{display:flex;align-items:center;gap:var(--space-8);height:var(--control-height);padding:0 var(--space-16);border-radius:var(--radius-pill);background:var(--surface-container-highest);color:var(--on-surface-variant);font-family:var(--font-sans);font-size:14px}
|
|
581
614
|
.app-search__clear{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin-right:calc(var(--space-8) * -1);padding:0;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--on-surface-variant)}
|
|
582
615
|
.app-search:focus-within{outline:2px solid var(--primary);outline-offset:1px}
|
|
@@ -627,13 +660,13 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
627
660
|
.app-skel__row--plain .app-skel__dot{display:none}
|
|
628
661
|
.app-skel__dot{width:24px;height:24px;border-radius:var(--radius-pill);background:var(--surface-container-highest);flex:none}
|
|
629
662
|
.app-skel__lines{display:flex;flex-direction:column;gap:var(--space-8);flex:1}
|
|
630
|
-
@media (prefers-reduced-motion:no-preference){.app-skel__bar::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--shimmer),transparent);opacity:.6;animation:app-shimmer 1.4s
|
|
663
|
+
@media (prefers-reduced-motion:no-preference){.app-skel__bar::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--shimmer),transparent);opacity:.6;animation:app-shimmer 1.4s ease-in-out infinite}}
|
|
631
664
|
@keyframes app-shimmer{to{transform:translateX(100%)}}
|
|
632
665
|
|
|
633
666
|
/* ── Loader · the Alis mark, in signal ── */
|
|
634
667
|
.app-loader{display:flex;flex-direction:column;align-items:center;gap:var(--space-16);color:var(--on-surface-variant)}
|
|
635
668
|
.app-loader--line{display:inline-flex;flex-direction:row;gap:var(--space-8)}
|
|
636
|
-
@media (prefers-reduced-motion:no-preference){.app-loader circle{animation:app-dot 1.2s
|
|
669
|
+
@media (prefers-reduced-motion:no-preference){.app-loader circle{animation:app-dot 1.2s ease-in-out infinite both}}
|
|
637
670
|
.app-loader circle:nth-child(1){animation-delay:0s}.app-loader circle:nth-child(2){animation-delay:.08s}.app-loader circle:nth-child(3){animation-delay:.16s}.app-loader circle:nth-child(4){animation-delay:.24s}.app-loader circle:nth-child(5){animation-delay:.32s}.app-loader circle:nth-child(6){animation-delay:.4s}.app-loader circle:nth-child(7){animation-delay:.48s}.app-loader circle:nth-child(8){animation-delay:.56s}.app-loader circle:nth-child(9){animation-delay:.64s}.app-loader circle:nth-child(10){animation-delay:.72s}.app-loader circle:nth-child(11){animation-delay:.8s}
|
|
638
671
|
@keyframes app-dot{0%,100%{opacity:1}50%{opacity:.25}}
|
|
639
672
|
|
|
@@ -785,8 +818,8 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
785
818
|
.app-switch-row{position:relative;display:flex;align-items:center;gap:var(--space-16);min-height:max(48px,var(--touch-target));color:var(--on-surface);cursor:pointer}
|
|
786
819
|
.app-switch-row__text{display:flex;flex-direction:column;flex:1;min-width:0}
|
|
787
820
|
.app-switch-row__text .text-supporting{color:var(--on-surface-variant)}
|
|
788
|
-
.app-switch{position:relative;flex:none;width:52px;height:32px;margin:0;border:2px solid var(--outline);border-radius:var(--radius-pill);background:var(--surface-container-highest);appearance:none;-webkit-appearance:none;cursor:pointer;transition:background-color var(--
|
|
789
|
-
.app-switch::before{content:"";position:absolute;top:50%;left:6px;width:16px;height:16px;border-radius:var(--radius-pill);background:var(--outline);transform:translateY(-50%);transition:left var(--
|
|
821
|
+
.app-switch{position:relative;flex:none;width:52px;height:32px;margin:0;border:2px solid var(--outline);border-radius:var(--radius-pill);background:var(--surface-container-highest);appearance:none;-webkit-appearance:none;cursor:pointer;transition:background-color var(--spring-fast-effects),border-color var(--spring-fast-effects)}
|
|
822
|
+
.app-switch::before{content:"";position:absolute;top:50%;left:6px;width:16px;height:16px;border-radius:var(--radius-pill);background:var(--outline);transform:translateY(-50%);transition:left var(--spring-fast-spatial),width var(--spring-fast-spatial),height var(--spring-fast-spatial),background-color var(--spring-fast-effects)}
|
|
790
823
|
.app-switch:checked{border-color:var(--primary);background:var(--primary)}
|
|
791
824
|
.app-switch:checked::before{left:22px;width:24px;height:24px;background:var(--on-primary)}
|
|
792
825
|
.app-switch:focus-visible{outline:2px solid var(--primary);outline-offset:1px}
|
|
@@ -801,7 +834,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
801
834
|
.app-progress__head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-16)}
|
|
802
835
|
.app-progress__value{color:var(--on-surface-variant);font-variant-numeric:tabular-nums}
|
|
803
836
|
.app-progress__track{position:relative;height:4px;border-radius:var(--radius-pill);background:var(--surface-container-highest);overflow:hidden}
|
|
804
|
-
.app-progress__fill{position:absolute;inset:0 auto 0 0;border-radius:inherit;background:var(--on-surface);transition:width var(--
|
|
837
|
+
.app-progress__fill{position:absolute;inset:0 auto 0 0;border-radius:inherit;background:var(--on-surface);transition:width var(--spring-default-effects)}
|
|
805
838
|
.app-progress.is-error .app-progress__fill{background:var(--error)}
|
|
806
839
|
|
|
807
840
|
/* ── Steps · the stages of a long piece of work ── */
|
|
@@ -931,7 +964,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
931
964
|
|
|
932
965
|
/* ── Composer · where you write to Alis, an agent or a person: tray, editor, row; one line below ── */
|
|
933
966
|
.app-composer{position:relative;display:flex;flex-direction:column;gap:var(--space-8);width:100%;max-width:var(--measure-prose);margin-inline:auto}
|
|
934
|
-
.app-composer__box{position:relative;z-index:1;display:flex;flex-direction:column;padding:var(--space-8);border-radius:var(--radius-xl);background:var(--surface-container-high);box-shadow:var(--elevation-2);transition:background-color var(--
|
|
967
|
+
.app-composer__box{position:relative;z-index:1;display:flex;flex-direction:column;padding:var(--space-8);border-radius:var(--radius-xl);background:var(--surface-container-high);box-shadow:var(--elevation-2);transition:background-color var(--spring-fast-effects),box-shadow var(--spring-fast-effects)}
|
|
935
968
|
/* Audience is a message property, kept above the draft even when its error line changes. */
|
|
936
969
|
.app-composer__audience{display:flex;flex-wrap:wrap;align-items:flex-end;gap:var(--space-12);padding:var(--space-8) var(--space-12) var(--space-12);border-bottom:1px solid var(--outline-variant)}
|
|
937
970
|
.app-composer__audience .app-field{flex:1 1 24ch;min-width:0;max-width:100%}
|
|
@@ -950,7 +983,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
950
983
|
/* A voice state carries its word: the only way into voice, and people meet it before they know the product. */
|
|
951
984
|
.app-composer__go:has(>.app-composer__go-label){width:auto;gap:var(--space-8);padding:0 var(--space-16) 0 var(--space-12)}
|
|
952
985
|
.app-composer__go-label{font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:600;white-space:nowrap}
|
|
953
|
-
@media (prefers-reduced-motion:no-preference){.app-composer__go{transition:transform var(--
|
|
986
|
+
@media (prefers-reduced-motion:no-preference){.app-composer__go{transition:transform var(--spring-fast-spatial)}.app-composer__go:not(:disabled):active{transform:scale(.94)}}
|
|
954
987
|
/* Recording: the level wears ai-you, the voice light's "you're speaking" */
|
|
955
988
|
.app-composer__meter{flex:1;min-width:0;height:32px;display:flex;align-items:center;justify-content:center;gap:3px;overflow:hidden;color:var(--ai-you)}
|
|
956
989
|
.app-composer__meter>i{display:block;flex:none;width:3px;height:4px;border-radius:2px;background:currentColor}
|
|
@@ -961,7 +994,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
961
994
|
.app-field__voice>:last-child{margin-left:auto}
|
|
962
995
|
.app-field__rec{display:inline-flex;align-items:center;gap:var(--space-8);color:var(--on-surface)}
|
|
963
996
|
.app-composer__rec::before,.app-field__rec::before{content:"";width:8px;height:8px;border-radius:var(--radius-pill);background:var(--error)}
|
|
964
|
-
@media (prefers-reduced-motion:no-preference){.app-composer__rec::before,.app-field__rec::before{animation:app-dot 1.2s
|
|
997
|
+
@media (prefers-reduced-motion:no-preference){.app-composer__rec::before,.app-field__rec::before{animation:app-dot 1.2s ease-in-out infinite both}}
|
|
965
998
|
.app-composer__timer{padding-inline:var(--space-8);font-variant-numeric:tabular-nums;color:var(--on-surface)}
|
|
966
999
|
/* A capture beside the conversation (a screen recording): a band docked on top of the box the way an ask docks, 20 in, a hairline under it. The editor stays writable; Send stays the one filled button, so Stop is error ink, unfilled (rules/buttons.md § Colour) */
|
|
967
1000
|
.app-composer__capture{display:flex;align-items:center;gap:var(--space-4);min-height:40px;padding:0 0 var(--space-4) var(--space-12);margin-bottom:var(--space-4);border-bottom:1px solid var(--outline-variant)}
|
|
@@ -1005,7 +1038,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
1005
1038
|
.app-composer.is-locked .app-composer__editor{color:var(--on-surface-variant)}
|
|
1006
1039
|
/* The voice light, behind the composer in a call: cool while you speak, warm while Alis does */
|
|
1007
1040
|
.app-composer__light{position:absolute;z-index:0;inset:-40px -64px;pointer-events:none;filter:blur(28px)}
|
|
1008
|
-
.app-composer__light::before,.app-composer__light::after,.app-voice__orb::before,.app-voice__orb::after{content:"";position:absolute;inset:0;border-radius:50%;transition:opacity var(--
|
|
1041
|
+
.app-composer__light::before,.app-composer__light::after,.app-voice__orb::before,.app-voice__orb::after{content:"";position:absolute;inset:0;border-radius:50%;transition:opacity var(--spring-slow-effects)}
|
|
1009
1042
|
.app-composer__light::before{background:radial-gradient(closest-side,color-mix(in srgb,var(--ai-you) 34%,var(--ai-you-container)) 55%,transparent)}
|
|
1010
1043
|
.app-composer__light::after{opacity:0;background:radial-gradient(closest-side,color-mix(in srgb,var(--ai-alis) 26%,var(--ai-alis-container)) 55%,transparent)}
|
|
1011
1044
|
.is-alis>.app-composer__light::before,.is-alis .app-voice__orb::before{opacity:0}
|
|
@@ -1019,26 +1052,26 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
1019
1052
|
the last line. While you read down it settles into Ask Alis at its own foot ── */
|
|
1020
1053
|
.app-dock{--app-trace-width:120px;position:sticky;z-index:1;bottom:0;flex:none;margin-top:auto;padding:var(--space-32) 0 calc(var(--space-16) + env(safe-area-inset-bottom,0px));pointer-events:none}
|
|
1021
1054
|
.app-shell__content:has(>.app-dock){padding-bottom:0}
|
|
1022
|
-
.app-dock::before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,transparent,var(--background) var(--space-32));transform-origin:bottom;transition:transform var(--
|
|
1055
|
+
.app-dock::before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,transparent,var(--background) var(--space-32));transform-origin:bottom;transition:transform var(--spring-default-spatial)}
|
|
1023
1056
|
@media (max-width:599px){.app-dock{padding:var(--space-24) 0 calc(var(--space-12) + env(safe-area-inset-bottom,0px))}}
|
|
1024
1057
|
/* Above the keyboard the composer needs no safe-area inset */
|
|
1025
1058
|
@media (max-width:599px) and (pointer:coarse){.app-dock:focus-within{padding-bottom:var(--space-12)}}
|
|
1026
1059
|
.app-dock .app-composer__box,.app-dock .app-composer__line{pointer-events:auto}
|
|
1027
1060
|
/* The box is clipped onto Ask Alis, so its edge closes over what it holds; nothing reflows and the textarea is the same
|
|
1028
1061
|
node. The shadow is a drop-shadow on .app-composer__lift, which wraps the box alone, so it follows the clip. */
|
|
1029
|
-
.app-composer__lift{position:relative;z-index:1;filter:drop-shadow(0 1px 2px var(--shadow-key)) drop-shadow(0 4px 12px var(--shadow-ambient));transition:filter var(--
|
|
1062
|
+
.app-composer__lift{position:relative;z-index:1;filter:drop-shadow(0 1px 2px var(--shadow-key)) drop-shadow(0 4px 12px var(--shadow-ambient));transition:filter var(--spring-fast-effects)}
|
|
1030
1063
|
.app-composer.is-locked .app-composer__lift{filter:none}
|
|
1031
|
-
.app-dock .app-composer__box{box-shadow:none;clip-path:inset(0 round var(--radius-xl));transition:clip-path var(--
|
|
1032
|
-
.app-dock .app-composer__box>:not(.app-composer__trace){transition:opacity var(--
|
|
1033
|
-
@media (max-width:599px){.app-dock .app-composer__row>*{transition:opacity var(--
|
|
1034
|
-
.app-composer__trace{position:absolute;z-index:1;left:50%;bottom:0;display:none;align-items:center;justify-content:center;gap:var(--space-8);width:var(--app-trace-width);height:40px;padding:0 var(--space-16) 0 var(--space-12);border:0;border-radius:var(--radius-pill);background:transparent;color:var(--on-surface);font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:600;white-space:nowrap;cursor:pointer;opacity:0;pointer-events:none;transform:translateX(-50%);transition:opacity var(--
|
|
1064
|
+
.app-dock .app-composer__box{box-shadow:none;clip-path:inset(0 round var(--radius-xl));transition:clip-path var(--spring-default-spatial),background-color var(--spring-fast-effects)}
|
|
1065
|
+
.app-dock .app-composer__box>:not(.app-composer__trace){transition:opacity var(--spring-default-effects) var(--spring-fast-effects-duration),transform var(--spring-default-spatial) var(--spring-fast-effects-duration)}
|
|
1066
|
+
@media (max-width:599px){.app-dock .app-composer__row>*{transition:opacity var(--spring-default-effects) var(--spring-fast-effects-duration),transform var(--spring-fast-spatial)}}
|
|
1067
|
+
.app-composer__trace{position:absolute;z-index:1;left:50%;bottom:0;display:none;align-items:center;justify-content:center;gap:var(--space-8);width:var(--app-trace-width);height:40px;padding:0 var(--space-16) 0 var(--space-12);border:0;border-radius:var(--radius-pill);background:transparent;color:var(--on-surface);font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:600;white-space:nowrap;cursor:pointer;opacity:0;pointer-events:none;transform:translateX(-50%);transition:opacity var(--spring-fast-effects)}
|
|
1035
1068
|
.app-dock .app-composer__trace{display:inline-flex}
|
|
1036
1069
|
.app-composer__trace>svg,.app-selection-ask>svg{flex:none;width:12px;height:20px}
|
|
1037
1070
|
/* Settled: the box closes onto its foot, the editor and the row fade and drop 6px, Ask Alis fades in near the end */
|
|
1038
1071
|
.app-dock .app-composer.is-settled .app-composer__box{clip-path:inset(calc(100% - 40px) calc(50% - var(--app-trace-width) / 2) 0 round 20px)}
|
|
1039
|
-
.app-dock .app-composer.is-settled .app-composer__box>:not(.app-composer__trace){opacity:0;transform:translateY(6px);transition:opacity var(--
|
|
1040
|
-
@media (max-width:599px){.app-dock .app-composer.is-settled .app-composer__row>*{opacity:0;transition:opacity var(--
|
|
1041
|
-
.app-dock .app-composer.is-settled .app-composer__trace{opacity:1;pointer-events:auto;transition:opacity var(--
|
|
1072
|
+
.app-dock .app-composer.is-settled .app-composer__box>:not(.app-composer__trace){opacity:0;transform:translateY(6px);transition:opacity var(--spring-fast-effects),transform var(--spring-default-spatial)}
|
|
1073
|
+
@media (max-width:599px){.app-dock .app-composer.is-settled .app-composer__row>*{opacity:0;transition:opacity var(--spring-fast-effects)}.app-dock .app-composer.is-settled .app-composer__box>.app-composer__editor{transform:none}}
|
|
1074
|
+
.app-dock .app-composer.is-settled .app-composer__trace{opacity:1;pointer-events:auto;transition:opacity var(--spring-default-effects) var(--spring-fast-effects-duration)}
|
|
1042
1075
|
.app-dock:has(.app-composer.is-settled)::before{transform:scaleY(.62)}
|
|
1043
1076
|
/* A snackbar on a screen with a dock rises above the composer at rest */
|
|
1044
1077
|
:root:has(.app-dock) .app-snackbar{bottom:calc(128px + env(safe-area-inset-bottom,0px))}
|
|
@@ -1133,7 +1166,7 @@ button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor
|
|
|
1133
1166
|
.app-turn__mark{display:inline-flex;flex:none}
|
|
1134
1167
|
.app-turn__status{color:var(--on-surface-variant)}
|
|
1135
1168
|
.app-turn__worked{align-self:flex-start;display:inline-flex;align-items:center;gap:var(--space-4);min-height:32px;margin-left:calc(var(--space-8) * -1);padding:0 var(--space-8);border:0;border-radius:var(--radius-pill);background:transparent;color:var(--on-surface-variant);font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:400}
|
|
1136
|
-
.app-turn__worked .app-icon{transition:transform var(--
|
|
1169
|
+
.app-turn__worked .app-icon{transition:transform var(--spring-default-spatial)}
|
|
1137
1170
|
.app-turn__worked[aria-expanded="true"] .app-icon{transform:rotate(180deg)}
|
|
1138
1171
|
.app-turn__steps{display:flex;flex-direction:column;gap:var(--space-8);margin:0 0 var(--space-8);padding:var(--space-4) 0 var(--space-4) var(--space-16);border-left:1px solid var(--outline-variant);list-style:none;color:var(--on-surface-variant)}
|
|
1139
1172
|
.app-turn__steps[hidden]{display:none}
|
|
@@ -1147,13 +1180,13 @@ button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor
|
|
|
1147
1180
|
.app-turn--them .app-turn__row{justify-content:flex-start}
|
|
1148
1181
|
.app-turn__bubble{min-width:0;max-width:80%;padding:var(--space-12) var(--space-16);border-radius:var(--radius-lg);background:var(--surface-container-low);color:var(--on-surface);font-family:var(--font-sans);font-size:16px;line-height:24px;font-weight:400;white-space:pre-line;overflow-wrap:anywhere}
|
|
1149
1182
|
.app-turn__bubble--voice{width:400px;padding:var(--space-8) var(--space-16) var(--space-12) var(--space-8);white-space:normal}
|
|
1150
|
-
.app-turn__tools{display:flex;opacity:0;transition:opacity var(--
|
|
1183
|
+
.app-turn__tools{display:flex;opacity:0;transition:opacity var(--spring-fast-effects)}
|
|
1151
1184
|
.app-turn:hover .app-turn__tools,.app-turn:focus-within .app-turn__tools{opacity:1}
|
|
1152
1185
|
.app-turn__files{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;gap:var(--space-8);max-width:80%}
|
|
1153
1186
|
.app-turn--them .app-turn__files{justify-content:flex-start}
|
|
1154
1187
|
.app-turn__image{display:block;width:240px;max-width:100%;border-radius:var(--radius-lg);overflow:hidden;background:var(--surface-container-low)}
|
|
1155
1188
|
.app-turn__image img{display:block;width:100%;height:auto}
|
|
1156
|
-
.app-turn__foot{display:flex;align-items:center;min-height:32px;margin-top:var(--space-4);transition:opacity var(--
|
|
1189
|
+
.app-turn__foot{display:flex;align-items:center;min-height:32px;margin-top:var(--space-4);transition:opacity var(--spring-fast-effects)}
|
|
1157
1190
|
.app-turn__foot .app-icon-btn:first-child{margin-left:-6px}
|
|
1158
1191
|
.app-turn--alis:not(.is-latest) .app-turn__foot{position:absolute;top:100%;left:0;margin:0;opacity:0}
|
|
1159
1192
|
.app-turn--alis:not(.is-latest):hover .app-turn__foot,.app-turn--alis:not(.is-latest):focus-within .app-turn__foot{opacity:1}
|
|
@@ -1309,7 +1342,7 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1309
1342
|
@media (pointer:coarse){.app-check-row{min-height:var(--touch-target-coarse);padding:var(--space-12) 0}}
|
|
1310
1343
|
.app-check-row__text{display:flex;flex-direction:column;flex:1;min-width:0}
|
|
1311
1344
|
.app-check-row__text .text-supporting{color:var(--on-surface-variant)}
|
|
1312
|
-
.app-checkbox,.app-radio{position:relative;flex:none;width:18px;height:18px;margin:3px;border:2px solid var(--on-surface-variant);background:transparent;appearance:none;-webkit-appearance:none;cursor:pointer;transition:background-color var(--
|
|
1345
|
+
.app-checkbox,.app-radio{position:relative;flex:none;width:18px;height:18px;margin:3px;border:2px solid var(--on-surface-variant);background:transparent;appearance:none;-webkit-appearance:none;cursor:pointer;transition:background-color var(--spring-fast-effects),border-color var(--spring-fast-effects),box-shadow var(--spring-fast-effects)}
|
|
1313
1346
|
.app-checkbox{border-radius:var(--radius-xs)}
|
|
1314
1347
|
.app-radio{width:20px;height:20px;margin:2px;border-radius:var(--radius-pill)}
|
|
1315
1348
|
.app-checkbox:checked,.app-checkbox:indeterminate,.app-checkbox.is-checked{border-color:var(--primary);background:var(--primary)}
|
|
@@ -1329,7 +1362,7 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1329
1362
|
.app-combo{position:relative}
|
|
1330
1363
|
.app-combo__trigger{width:100%;font-family:var(--font-sans);font-size:16px;line-height:24px;text-align:left;cursor:pointer;outline:none}
|
|
1331
1364
|
.app-combo__trigger:focus-visible,.app-combo__trigger[aria-expanded="true"]{border-color:var(--primary);box-shadow:inset 0 0 0 1px var(--primary)}
|
|
1332
|
-
.app-combo__trigger>.app-icon{flex:none;transition:transform var(--
|
|
1365
|
+
.app-combo__trigger>.app-icon{flex:none;transition:transform var(--spring-default-spatial)}
|
|
1333
1366
|
.app-combo__trigger[aria-expanded="true"]>.app-icon{transform:rotate(180deg)}
|
|
1334
1367
|
.app-combo__value{display:flex;align-items:center;gap:var(--space-8);flex:1;min-width:0;color:var(--on-surface)}
|
|
1335
1368
|
.app-combo__value.is-placeholder{color:var(--on-surface-variant)}
|
|
@@ -1350,7 +1383,7 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1350
1383
|
.app-disclosure__summary::-webkit-details-marker{display:none}
|
|
1351
1384
|
.app-disclosure__text{display:flex;flex-direction:column;flex:1;min-width:0}
|
|
1352
1385
|
.app-disclosure__text .text-supporting{color:var(--on-surface-variant)}
|
|
1353
|
-
.app-disclosure__summary>.app-icon:last-child{flex:none;color:var(--on-surface-variant);transition:transform var(--
|
|
1386
|
+
.app-disclosure__summary>.app-icon:last-child{flex:none;color:var(--on-surface-variant);transition:transform var(--spring-default-spatial)}
|
|
1354
1387
|
.app-disclosure[open]>.app-disclosure__summary>.app-icon:last-child{transform:rotate(180deg)}
|
|
1355
1388
|
.app-disclosure__body{padding:var(--space-4) 0 var(--space-16)}
|
|
1356
1389
|
.app-disclosure-group{display:flex;flex-direction:column}
|
|
@@ -1361,3 +1394,137 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1361
1394
|
|
|
1362
1395
|
/* ── Scrollbars · one treatment for the app ── */
|
|
1363
1396
|
*{scrollbar-width:thin;scrollbar-color:var(--outline-variant) transparent}
|
|
1397
|
+
|
|
1398
|
+
/* ── Motion · every move is a spring (rules/motion.md). It hangs off the state each component already has: hidden, [open],
|
|
1399
|
+
aria-pressed, is-selected, the shell's classes; is-arriving marks what arrives while someone watches, so a page's first
|
|
1400
|
+
draw stays still. Fast and default spatial overshoot a little; slow spatial and effects never do. Leaving is a
|
|
1401
|
+
fast-effects fade. Under reduced motion the spatial springs are 0s: things appear in place and still fade (the block
|
|
1402
|
+
at the end keeps a fade where a move was all there was). Nothing keeps a clip at rest, so a popup inside is never cut. ── */
|
|
1403
|
+
:root{interpolate-size:allow-keywords}
|
|
1404
|
+
@keyframes app-fade-in{from{opacity:0}}
|
|
1405
|
+
@keyframes app-fade-out{to{opacity:0}}
|
|
1406
|
+
@keyframes app-from-end{from{translate:var(--space-24) 0}}
|
|
1407
|
+
@keyframes app-from-start{from{translate:calc(var(--space-24) * -1) 0}}
|
|
1408
|
+
/* Reveals: the clip opens along one axis, 40px outside the box so the deepest shadow shows, and is gone once it has played */
|
|
1409
|
+
@keyframes app-reveal-down{from{clip-path:inset(-40px -40px calc(100% + 40px) -40px)}to{clip-path:inset(-40px)}}
|
|
1410
|
+
@keyframes app-reveal-up{from{clip-path:inset(calc(100% + 40px) -40px -40px -40px)}to{clip-path:inset(-40px)}}
|
|
1411
|
+
@keyframes app-reveal-middle{from{clip-path:inset(30% -40px 30% -40px)}to{clip-path:inset(-40px)}}
|
|
1412
|
+
|
|
1413
|
+
/* Icons that change their meaning: two glyphs in one slot. The one leaving turns away and fades; then the other springs in */
|
|
1414
|
+
.app-icon-swap{display:inline-grid;place-items:center;flex:none}
|
|
1415
|
+
.app-icon-swap>.app-icon{grid-area:1/1;transition:opacity var(--spring-fast-effects),scale var(--spring-fast-spatial),rotate var(--spring-fast-spatial)}
|
|
1416
|
+
.app-icon-swap>.app-icon:last-child,.app-icon-swap.is-swapped>.app-icon:first-child{opacity:0;scale:.4;rotate:-60deg}
|
|
1417
|
+
.app-icon-swap:not(.is-swapped)>.app-icon:first-child,.app-icon-swap.is-swapped>.app-icon:last-child{opacity:1;scale:1;rotate:0deg;transition:opacity var(--spring-fast-effects) var(--spring-fast-effects-duration),scale var(--spring-fast-spatial) var(--spring-fast-effects-duration),rotate var(--spring-fast-spatial) var(--spring-fast-effects-duration)}
|
|
1418
|
+
.app-btn .app-icon-swap{margin-left:calc(var(--space-8) * -1)}
|
|
1419
|
+
.app-btn .app-icon-swap>.app-icon{margin:0}
|
|
1420
|
+
/* A toggle turning on: its glyph gives under the press and springs back filled */
|
|
1421
|
+
.app-icon-btn>.app-icon{transition:scale var(--spring-fast-spatial),font-variation-settings var(--spring-fast-effects)}
|
|
1422
|
+
@media (prefers-reduced-motion:no-preference){.app-icon-btn[aria-pressed="false"]:active>.app-icon{scale:.8}}
|
|
1423
|
+
|
|
1424
|
+
/* Selection that travels: the site sets --indicator-left and --indicator-width to the selected item's offsetLeft and
|
|
1425
|
+
offsetWidth, then adds the modifier, so the indicator is drawn where it belongs and moves only on a change */
|
|
1426
|
+
.app-tabs{--tab-inset:var(--space-32)}
|
|
1427
|
+
@media (max-width:599px){.app-tabs{--tab-inset:var(--space-16)}}
|
|
1428
|
+
.app-tabs--travel{position:relative}
|
|
1429
|
+
.app-tabs--travel>.app-tab.is-selected::after{content:none}
|
|
1430
|
+
.app-tabs--travel::after{content:"";position:absolute;bottom:0;left:0;width:calc(var(--indicator-width,0px) - 2 * var(--tab-inset));height:3px;border-radius:var(--radius-sm) var(--radius-sm) 0 0;background:var(--on-surface);translate:calc(var(--indicator-left,0px) + var(--tab-inset)) 0;pointer-events:none;transition:translate var(--spring-default-spatial),width var(--spring-default-spatial)}
|
|
1431
|
+
.app-seg--travel{position:relative;isolation:isolate}
|
|
1432
|
+
.app-seg--travel::before{content:"";position:absolute;top:var(--space-4);bottom:var(--space-4);left:0;width:var(--indicator-width,0px);border:1px solid var(--outline-variant);border-radius:var(--radius-pill);background:var(--surface);translate:var(--indicator-left,0px) 0;pointer-events:none;transition:translate var(--spring-default-spatial),width var(--spring-default-spatial)}
|
|
1433
|
+
.app-seg--travel>.app-seg__item{position:relative;z-index:1}
|
|
1434
|
+
.app-seg--travel>.app-seg__item.is-selected{border-color:transparent;background:transparent}
|
|
1435
|
+
|
|
1436
|
+
/* Expand and collapse: the fold opens to its height, then its rows fade in. It clips only while it moves, so a field's
|
|
1437
|
+
panel inside an open one is never cut. Height animates where the browser has interpolate-size; elsewhere it opens at
|
|
1438
|
+
once and the rows still fade */
|
|
1439
|
+
.app-disclosure::details-content{block-size:0;overflow-y:clip;transition:block-size var(--spring-default-spatial),content-visibility var(--spring-default-spatial) allow-discrete,overflow-y 0s allow-discrete}
|
|
1440
|
+
.app-disclosure[open]::details-content{block-size:auto;overflow-y:visible;transition:block-size var(--spring-default-spatial),content-visibility var(--spring-default-spatial) allow-discrete,overflow-y 0s var(--spring-default-spatial-duration) allow-discrete}
|
|
1441
|
+
.app-disclosure>.app-disclosure__body{transition:opacity var(--spring-fast-effects)}
|
|
1442
|
+
.app-disclosure:not([open])>.app-disclosure__body{opacity:0}
|
|
1443
|
+
.app-disclosure[open]>.app-disclosure__body{transition:opacity var(--spring-default-effects) var(--spring-fast-effects-duration)}
|
|
1444
|
+
@starting-style{.app-disclosure[open]>.app-disclosure__body{opacity:0}}
|
|
1445
|
+
.app-turn__steps{min-block-size:0;overflow-y:clip;transition:block-size var(--spring-default-spatial),padding-block var(--spring-default-spatial),margin-bottom var(--spring-default-spatial),opacity var(--spring-default-effects) var(--spring-fast-effects-duration),display var(--spring-default-spatial) allow-discrete}
|
|
1446
|
+
.app-turn__steps[hidden]{block-size:0;padding-block:0;margin-bottom:0;opacity:0;transition:block-size var(--spring-default-spatial),padding-block var(--spring-default-spatial),margin-bottom var(--spring-default-spatial),opacity var(--spring-fast-effects),display var(--spring-default-spatial) allow-discrete}
|
|
1447
|
+
@starting-style{.app-turn__steps:not([hidden]){block-size:0;padding-block:0;margin-bottom:0;opacity:0}}
|
|
1448
|
+
|
|
1449
|
+
/* Enter and exit within the screen: grow out of where it lives along one axis (a reveal, never a scale) and fade in;
|
|
1450
|
+
leave as a fade. Toggle hidden and the exit runs; an element removed at once just goes */
|
|
1451
|
+
.app-menu{animation:app-reveal-down var(--spring-default-spatial),app-fade-in var(--spring-fast-effects);transition:opacity var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1452
|
+
.app-menu--above,.app-menu--suggest{animation-name:app-reveal-up,app-fade-in}
|
|
1453
|
+
.app-menu[hidden]{opacity:0}
|
|
1454
|
+
.app-tooltip{animation:app-fade-in var(--spring-fast-effects);transition:opacity var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1455
|
+
.app-tooltip[hidden]{opacity:0}
|
|
1456
|
+
.app-snackbar{animation:app-reveal-up var(--spring-default-spatial),app-fade-in var(--spring-fast-effects);transition:opacity var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1457
|
+
.app-snackbar[hidden]{display:none;opacity:0}
|
|
1458
|
+
.app-scrim{animation:app-fade-in var(--spring-default-effects);transition:background-color var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1459
|
+
.app-scrim[hidden]{display:none;background-color:transparent}
|
|
1460
|
+
.app-dialog{animation:app-reveal-middle var(--spring-default-spatial),app-fade-in var(--spring-fast-effects);transition:opacity var(--spring-fast-effects)}
|
|
1461
|
+
.app-scrim[hidden]>.app-dialog{opacity:0}
|
|
1462
|
+
/* Alis's ask, arriving while you watch, grows up out of the composer, then its words fade in */
|
|
1463
|
+
.app-ask{min-block-size:0}
|
|
1464
|
+
.app-ask.is-arriving{overflow:clip;transition:block-size var(--spring-default-spatial),padding-block var(--spring-default-spatial),opacity var(--spring-default-effects) var(--spring-fast-effects-duration)}
|
|
1465
|
+
@starting-style{.app-ask.is-arriving{block-size:0;padding-block:0;opacity:0}}
|
|
1466
|
+
|
|
1467
|
+
/* The conversation: a turn that arrives fades in, and yours rises out of the composer; each step's words fade in inside
|
|
1468
|
+
the status, which stays put as the live region; each run of a reply fades in as it lands */
|
|
1469
|
+
.app-turn.is-arriving{transition:opacity var(--spring-default-effects),translate var(--spring-default-spatial)}
|
|
1470
|
+
@starting-style{.app-turn.is-arriving{opacity:0}.app-turn--you.is-arriving{translate:0 var(--space-24)}}
|
|
1471
|
+
.app-turn__status>*{transition:opacity var(--spring-default-effects)}
|
|
1472
|
+
@starting-style{.app-turn__status>*{opacity:0}}
|
|
1473
|
+
.app-turn__chunk{animation:app-fade-in var(--spring-default-effects) both}
|
|
1474
|
+
|
|
1475
|
+
/* A list that changes under you: a row that arrives opens its space and is tinted for a moment; one that leaves folds away */
|
|
1476
|
+
.app-row.is-arriving{overflow:clip;transition:block-size var(--spring-default-spatial),min-block-size var(--spring-default-spatial),padding-block var(--spring-default-spatial),opacity var(--spring-default-effects),background-color var(--spring-slow-effects) var(--spring-default-spatial-duration)}
|
|
1477
|
+
@starting-style{.app-row.is-arriving{block-size:0;min-block-size:0;padding-block:0;opacity:0;background-color:var(--secondary-container)}}
|
|
1478
|
+
.app-row.is-leaving{block-size:0;min-block-size:0;padding-block:0;opacity:0;overflow:clip;pointer-events:none;transition:block-size var(--spring-default-spatial),min-block-size var(--spring-default-spatial),padding-block var(--spring-default-spatial),opacity var(--spring-fast-effects)}
|
|
1479
|
+
|
|
1480
|
+
/* Over the edge. The detail pane comes in from the right while the content narrows (they share a plane): from 840 its
|
|
1481
|
+
column grows from 0, and the pane, at least its full width, slides out from under the edge. Below 840 it slides over the
|
|
1482
|
+
content (is-arriving, so a page drawn with it open stays still), with a strip of its own ground beyond its edge for the
|
|
1483
|
+
overshoot; on a phone it fills the screen, so it moves on the slow spring. To close: drop app-shell--detail, then remove
|
|
1484
|
+
the pane once it has gone (rules/motion.md § Removing what has left). The file pane's own widths never animate */
|
|
1485
|
+
@media (min-width:840px){
|
|
1486
|
+
.app-shell{overflow-x:clip;transition:grid-template-columns var(--spring-default-spatial)}
|
|
1487
|
+
.app-shell:not(.app-shell--detail):not(.app-shell--file):not(.app-shell--file-expanded){grid-template-columns:var(--nav-width) minmax(0,1fr) 0px}
|
|
1488
|
+
.app-shell:not(.app-shell--file):not(.app-shell--file-expanded)>.app-shell__detail{min-width:var(--detail-width)}
|
|
1489
|
+
.app-shell--file,.app-shell--file-expanded{transition:none}
|
|
1490
|
+
}
|
|
1491
|
+
@media (max-width:839px){
|
|
1492
|
+
.app-shell__detail{transition:translate var(--spring-default-spatial),box-shadow var(--spring-default-effects),opacity var(--spring-fast-effects)}
|
|
1493
|
+
.app-shell:not(.app-shell--file):not(.app-shell--file-expanded)>.app-shell__detail{box-shadow:var(--space-24) 0 0 0 var(--surface-container-high),var(--elevation-3),0 0 0 100vmax color-mix(in srgb,var(--scrim) 32%,transparent)}
|
|
1494
|
+
.app-shell:not(.app-shell--detail):not(.app-shell--file):not(.app-shell--file-expanded)>.app-shell__detail{translate:100% 0;box-shadow:var(--space-24) 0 0 0 var(--surface-container-high),var(--elevation-3),0 0 0 100vmax transparent}
|
|
1495
|
+
@starting-style{.app-shell--detail:not(.app-shell--file):not(.app-shell--file-expanded)>.app-shell__detail.is-arriving{translate:100% 0;box-shadow:var(--space-24) 0 0 0 var(--surface-container-high),var(--elevation-3),0 0 0 100vmax transparent}}
|
|
1496
|
+
}
|
|
1497
|
+
@media (max-width:599px){
|
|
1498
|
+
.app-shell__detail{transition:translate var(--spring-slow-spatial),box-shadow var(--spring-default-effects),opacity var(--spring-fast-effects)}
|
|
1499
|
+
/* The navigation pane fills the screen too: in from the left on the slow spring, which never bounces */
|
|
1500
|
+
.app-shell__nav{translate:-100% 0;transition:translate var(--spring-slow-spatial),opacity var(--spring-fast-effects),display var(--spring-slow-spatial) allow-discrete}
|
|
1501
|
+
.app-shell--nav-open .app-shell__nav{translate:0 0}
|
|
1502
|
+
@starting-style{.app-shell--nav-open .app-shell__nav{translate:-100% 0}}
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
/* Changing page, through the browser's view transitions (rules/motion.md § Changing page). The content fades out, then
|
|
1506
|
+
the new content fades in; forward it also comes 24px in from the end, back from the start. The shell and the title bar
|
|
1507
|
+
stay put. A shared view-transition-name on two elements (a tile and the file pane it opens) morphs one into the other */
|
|
1508
|
+
.app-shell__content{view-transition-name:app-content}
|
|
1509
|
+
.app-dock{view-transition-name:app-dock}
|
|
1510
|
+
::view-transition-old(root),::view-transition-new(root){animation:none}
|
|
1511
|
+
::view-transition-group(*){animation-duration:var(--spring-default-spatial-duration);animation-timing-function:var(--spring-default-spatial-easing)}
|
|
1512
|
+
::view-transition-old(app-content){animation:app-fade-out var(--spring-fast-effects) both}
|
|
1513
|
+
::view-transition-new(app-content){animation:app-fade-in var(--spring-default-effects) var(--spring-fast-effects-duration) both}
|
|
1514
|
+
:root:active-view-transition-type(forward)::view-transition-new(app-content){animation:app-fade-in var(--spring-default-effects) var(--spring-fast-effects-duration) both,app-from-end var(--spring-default-spatial) var(--spring-fast-effects-duration) both}
|
|
1515
|
+
:root:active-view-transition-type(back)::view-transition-new(app-content){animation:app-fade-in var(--spring-default-effects) var(--spring-fast-effects-duration) both,app-from-start var(--spring-default-spatial) var(--spring-fast-effects-duration) both}
|
|
1516
|
+
|
|
1517
|
+
/* Reduced motion: where a move was all there was, a fade takes its place, and what folds away waits for the fade */
|
|
1518
|
+
@media (prefers-reduced-motion:reduce){
|
|
1519
|
+
.app-shell:not(.app-shell--detail):not(.app-shell--file):not(.app-shell--file-expanded)>.app-shell__detail{opacity:0}
|
|
1520
|
+
@starting-style{.app-shell__detail.is-arriving{opacity:0}}
|
|
1521
|
+
.app-shell:not(.app-shell--detail):not(.app-shell--file):not(.app-shell--file-expanded){transition:grid-template-columns 0s var(--spring-fast-effects-duration)}
|
|
1522
|
+
.app-shell__detail{transition:opacity var(--spring-fast-effects)}
|
|
1523
|
+
.app-row.is-leaving,.app-turn__steps[hidden]{transition:block-size 0s var(--spring-fast-effects-duration),min-block-size 0s var(--spring-fast-effects-duration),padding-block 0s var(--spring-fast-effects-duration),margin-bottom 0s var(--spring-fast-effects-duration),opacity var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1524
|
+
.app-disclosure::details-content{transition:block-size 0s var(--spring-fast-effects-duration),content-visibility var(--spring-fast-effects) allow-discrete,overflow-y 0s allow-discrete}
|
|
1525
|
+
}
|
|
1526
|
+
@media (prefers-reduced-motion:reduce) and (max-width:599px){
|
|
1527
|
+
.app-shell__nav{opacity:0;transition:opacity var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1528
|
+
.app-shell--nav-open .app-shell__nav{opacity:1}
|
|
1529
|
+
@starting-style{.app-shell--nav-open .app-shell__nav{opacity:0}}
|
|
1530
|
+
}
|
package/classes.json
CHANGED
|
@@ -212,6 +212,7 @@
|
|
|
212
212
|
"app-icon--trailing",
|
|
213
213
|
"app-icon-btn",
|
|
214
214
|
"app-icon-btn--small",
|
|
215
|
+
"app-icon-swap",
|
|
215
216
|
"app-key",
|
|
216
217
|
"app-keys",
|
|
217
218
|
"app-keys--single",
|
|
@@ -225,6 +226,7 @@
|
|
|
225
226
|
"app-loader--line",
|
|
226
227
|
"app-machine",
|
|
227
228
|
"app-menu",
|
|
229
|
+
"app-menu--above",
|
|
228
230
|
"app-menu--suggest",
|
|
229
231
|
"app-menu__avatar",
|
|
230
232
|
"app-menu__divider",
|
|
@@ -265,6 +267,7 @@
|
|
|
265
267
|
"app-search__clear",
|
|
266
268
|
"app-search__input",
|
|
267
269
|
"app-seg",
|
|
270
|
+
"app-seg--travel",
|
|
268
271
|
"app-seg__item",
|
|
269
272
|
"app-selection-ask",
|
|
270
273
|
"app-shell",
|
|
@@ -323,6 +326,7 @@
|
|
|
323
326
|
"app-table-wrap",
|
|
324
327
|
"app-table__primary",
|
|
325
328
|
"app-tabs",
|
|
329
|
+
"app-tabs--travel",
|
|
326
330
|
"app-target",
|
|
327
331
|
"app-target--none",
|
|
328
332
|
"app-thread",
|
|
@@ -355,6 +359,7 @@
|
|
|
355
359
|
"app-turn__bubble",
|
|
356
360
|
"app-turn__bubble--voice",
|
|
357
361
|
"app-turn__caret",
|
|
362
|
+
"app-turn__chunk",
|
|
358
363
|
"app-turn__files",
|
|
359
364
|
"app-turn__foot",
|
|
360
365
|
"app-turn__head",
|
|
@@ -397,6 +402,7 @@
|
|
|
397
402
|
"drop-target",
|
|
398
403
|
"is-active",
|
|
399
404
|
"is-alis",
|
|
405
|
+
"is-arriving",
|
|
400
406
|
"is-checked",
|
|
401
407
|
"is-current",
|
|
402
408
|
"is-disabled",
|
|
@@ -410,6 +416,7 @@
|
|
|
410
416
|
"is-interactive",
|
|
411
417
|
"is-invalid",
|
|
412
418
|
"is-latest",
|
|
419
|
+
"is-leaving",
|
|
413
420
|
"is-loading",
|
|
414
421
|
"is-locked",
|
|
415
422
|
"is-muted",
|
|
@@ -421,6 +428,7 @@
|
|
|
421
428
|
"is-scrolled",
|
|
422
429
|
"is-selected",
|
|
423
430
|
"is-settled",
|
|
431
|
+
"is-swapped",
|
|
424
432
|
"mono",
|
|
425
433
|
"mono-sm",
|
|
426
434
|
"mono-xs",
|
|
@@ -633,6 +641,24 @@
|
|
|
633
641
|
"--space-4",
|
|
634
642
|
"--space-48",
|
|
635
643
|
"--space-8",
|
|
644
|
+
"--spring-default-effects",
|
|
645
|
+
"--spring-default-effects-duration",
|
|
646
|
+
"--spring-default-effects-easing",
|
|
647
|
+
"--spring-default-spatial",
|
|
648
|
+
"--spring-default-spatial-duration",
|
|
649
|
+
"--spring-default-spatial-easing",
|
|
650
|
+
"--spring-fast-effects",
|
|
651
|
+
"--spring-fast-effects-duration",
|
|
652
|
+
"--spring-fast-effects-easing",
|
|
653
|
+
"--spring-fast-spatial",
|
|
654
|
+
"--spring-fast-spatial-duration",
|
|
655
|
+
"--spring-fast-spatial-easing",
|
|
656
|
+
"--spring-slow-effects",
|
|
657
|
+
"--spring-slow-effects-duration",
|
|
658
|
+
"--spring-slow-effects-easing",
|
|
659
|
+
"--spring-slow-spatial",
|
|
660
|
+
"--spring-slow-spatial-duration",
|
|
661
|
+
"--spring-slow-spatial-easing",
|
|
636
662
|
"--stagger",
|
|
637
663
|
"--state-dragged",
|
|
638
664
|
"--state-focus",
|
|
@@ -651,6 +677,7 @@
|
|
|
651
677
|
"--syntax-number",
|
|
652
678
|
"--syntax-plain",
|
|
653
679
|
"--syntax-string",
|
|
680
|
+
"--tab-inset",
|
|
654
681
|
"--teal-200",
|
|
655
682
|
"--teal-600",
|
|
656
683
|
"--term-bg",
|
package/components/AppAlert.md
CHANGED
|
@@ -80,7 +80,7 @@ See [chips-alerts.md](../rules/chips-alerts.md).
|
|
|
80
80
|
## Behaviour you must supply
|
|
81
81
|
|
|
82
82
|
- **Alert**: `role="alert"` for `error`, `role="status"` for the rest. No timeout, no dismiss on its own; remove it when the user acts again or leaves.
|
|
83
|
-
- **Snackbar**: it closes itself. Remove it after 5 seconds, or 10 with an action. A new message replaces the current one and restarts the timer. Undo cancels the action and removes the snackbar.
|
|
83
|
+
- **Snackbar**: it closes itself. Remove it after 5 seconds, or 10 with an action: set `hidden` and take it out after `--spring-fast-effects-duration`, so it fades. It grows up from the foot when it arrives. A new message replaces the current one and restarts the timer. Undo cancels the action and removes the snackbar.
|
|
84
84
|
- Screen readers announce a live region's *changes*: keep an empty `<div role="status">` on the page from the start and render the `.app-snackbar` inside it (dropping the snackbar's own `role`), rather than inserting the region and its text together.
|
|
85
85
|
|
|
86
86
|
## Classes
|
package/components/AppAsk.md
CHANGED
|
@@ -190,7 +190,7 @@ A band at the top of the composer's surface, above the editor, divided from it b
|
|
|
190
190
|
|
|
191
191
|
## Behaviour you must supply
|
|
192
192
|
|
|
193
|
-
- **Open and close** the band with the ask. Alis's ask takes focus (its first option, or its filled action); a person's docks without moving it and is announced through a polite live region. Return focus to the editor when it closes.
|
|
193
|
+
- **Open and close** the band with the ask. Render it with `is-arriving` when it opens while someone is there, and it grows up out of the composer; not when a page loads with an ask already waiting. Alis's ask takes focus (its first option, or its filled action); a person's docks without moving it and is announced through a polite live region. Return focus to the editor when it closes.
|
|
194
194
|
- **The lead**: `.app-composer__go--plain` on the composer's button while the editor is empty; when it has text, drop it (Send fills) and swap the ask's `app-btn--filled` for `app-btn--outlined`.
|
|
195
195
|
- **Keyboard** ([shortcuts.md](../rules/shortcuts.md) § The same everywhere): while focus is in no field (the editor included), the number keys pick an option, A answers with the affirmative and X refuses (opening the reason field where there is one). On an ask that is hard to undo (deleting, reaching production), A moves focus to the affirmative and Enter confirms. They are single keys: the switch turns them off. Enter on a focused option answers it; Escape moves focus to the editor without answering. Enter in the editor sends your words: Alis's answer, or a reply to a person.
|
|
196
196
|
- **Several questions**: answering moves to the next; previous and next page without answering; Skip answers "let Alis decide".
|
|
@@ -201,4 +201,4 @@ A band at the top of the composer's surface, above the editor, divided from it b
|
|
|
201
201
|
|
|
202
202
|
## Classes
|
|
203
203
|
|
|
204
|
-
`.app-ask`, `.app-ask__head`, `.app-ask__title`, `.app-ask__page`, `.app-ask__body`, `.app-ask__grants`, `.app-ask__note`, `.app-ask__options`, `.app-ask__option`, `.is-selected`, `.app-ask__key`, `.app-ask__option-text`, `.app-ask__line`, `.is-error`, `.app-ask__actions`; `.app-composer__go--plain`; `.app-turn__record`; `.app-count`; with `.app-btn`, `.app-icon-btn` and `.app-state` on the buttons.
|
|
204
|
+
`.app-ask`, `.is-arriving`, `.app-ask__head`, `.app-ask__title`, `.app-ask__page`, `.app-ask__body`, `.app-ask__grants`, `.app-ask__note`, `.app-ask__options`, `.app-ask__option`, `.is-selected`, `.app-ask__key`, `.app-ask__option-text`, `.app-ask__line`, `.is-error`, `.app-ask__actions`; `.app-composer__go--plain`; `.app-turn__record`; `.app-count`; with `.app-btn`, `.app-icon-btn` and `.app-state` on the buttons.
|
package/components/AppButton.md
CHANGED
|
@@ -56,9 +56,9 @@ Emphasis is allocated, not chosen ([buttons.md](../rules/buttons.md)).
|
|
|
56
56
|
<span class="app-btn__spinner" aria-hidden="true"></span>Deploying
|
|
57
57
|
</button>
|
|
58
58
|
|
|
59
|
-
<!-- Done: a result you can't see, for about two seconds -->
|
|
59
|
+
<!-- Done: a result you can't see, for about two seconds. The glyph swaps; the word changes with it -->
|
|
60
60
|
<button type="button" class="app-btn app-state app-target">
|
|
61
|
-
<span class="app-icon" aria-hidden="true">check</span><span aria-live="polite">Copied</span>
|
|
61
|
+
<span class="app-icon-swap is-swapped" aria-hidden="true"><span class="app-icon">content_copy</span><span class="app-icon">check</span></span><span aria-live="polite">Copied</span>
|
|
62
62
|
</button>
|
|
63
63
|
|
|
64
64
|
<!-- Disabled -->
|
|
@@ -88,9 +88,10 @@ Emphasis is allocated, not chosen ([buttons.md](../rules/buttons.md)).
|
|
|
88
88
|
## Behaviour you must supply
|
|
89
89
|
|
|
90
90
|
- Always `type="button"` unless it submits a form (`type="submit"`).
|
|
91
|
+
- **Done**: the leading glyph sits in `.app-icon-swap` with ✓ second; add `is-swapped` and change the word to what happened; after about two seconds remove `is-swapped` and put the word back ([AppIconButton](AppIconButton.md)).
|
|
91
92
|
- **Loading**: add `is-loading`, `aria-disabled="true"` and `aria-busy="true"`, swap the leading icon for `<span class="app-btn__spinner">`, and ignore the click in your handler. `is-loading` sets `pointer-events: none`, but keyboard activation still fires, so guard the handler. Remove all three when it settles.
|
|
92
93
|
- Don't use `disabled` for loading: a disabled button drops to 38% and loses focus.
|
|
93
94
|
|
|
94
95
|
## Classes
|
|
95
96
|
|
|
96
|
-
`.app-btn`, `.app-btn--outlined`, `.app-btn--filled`, `.app-btn--error`, `.app-btn--quiet`, `.app-btn--small`, `.app-btn__spinner`, `.app-state`, `.app-target`, `.app-target--none`, `.is-loading`, `.app-btn-row`, `.app-btn-row--start`, `.app-btn-row__start`.
|
|
97
|
+
`.app-btn`, `.app-btn--outlined`, `.app-btn--filled`, `.app-btn--error`, `.app-btn--quiet`, `.app-btn--small`, `.app-btn__spinner`, `.app-icon-swap`, `.is-swapped`, `.app-state`, `.app-target`, `.app-target--none`, `.is-loading`, `.app-btn-row`, `.app-btn-row--start`, `.app-btn-row__start`.
|
|
@@ -126,7 +126,7 @@ The draft and a submitted message have different owners. Use this lifecycle in e
|
|
|
126
126
|
- **The box sits in `.app-composer__lift`**, which carries the shadow, so the clip below takes the shadow with it. A docked composer has no line except an error.
|
|
127
127
|
- **It settles** while you scroll down, once the content is more than half its visible height from the top, and only while it holds nothing of yours: empty, unfocused, nothing in the tray, no menu or popover open from it, no ask, no capture, no recording and no call. Only scrolls you make count, not the product's own (restoring a position, scrolling to an anchor or to what has focus). A page that doesn't scroll never settles.
|
|
128
128
|
- **It opens** when you scroll up 48px from the furthest point down, reach the end of the page (with nothing more to load), click or tab to Ask Alis (the cursor goes to the editor), drop a file on the page, or choose Ask Alis on a selection. Scrolling down again past the halfway mark settles it again.
|
|
129
|
-
- **The movement**: the box closes in from the sides and the top onto Ask Alis, so it reads as the composer put away, never as something arriving. Settling,
|
|
129
|
+
- **The movement**: the box closes in from the sides and the top onto Ask Alis, so it reads as the composer put away, never as something arriving. Settling, the box closes on `spring-default-spatial`; the editor and the row fade on `spring-fast-effects` and drop 6px (on a phone, where they share a row, they only fade); Ask Alis fades in on `spring-default-effects` once they have gone. Opening runs it back: Ask Alis goes, the box opens, the rest fades and rises into place after it. Under reduced motion the box changes in one step and the rest still fades ([motion.md](../rules/motion.md)). The mark's dots hold still: dots that move are the loader, Alis working.
|
|
130
130
|
- **One markup.** The settle is `.is-settled` on `.app-composer`; Ask Alis is `.app-composer__trace` inside the box, there all along. The textarea is never re-rendered or moved, so a draft, a cursor or a phone's keyboard can't be lost.
|
|
131
131
|
- **What its controls do.** Send opens the new conversation on Alis's page with the message, the tray, and the page you were on as references. Talk opens it in a call. Add and a dropped file stage files in the tray first, as in any composer.
|
|
132
132
|
- **Layers.** The dock is at `z-index` 1, above the page. What opens from the composer or over the page (the Add menu, a combobox's panel, a popover) opens in a layer above it, outside the box: the box is clipped and would cut it. A snackbar rises above the composer at rest (the CSS does it).
|
|
@@ -179,7 +179,7 @@ Select text on a screen with a dock and **Ask Alis** appears by the selection (`
|
|
|
179
179
|
<div class="app-composer__row">
|
|
180
180
|
<button type="button" class="app-icon-btn app-state app-target" aria-label="Add files and more" title="Add files and more"><span class="app-icon" aria-hidden="true">add</span></button>
|
|
181
181
|
<span class="app-composer__spacer"></span>
|
|
182
|
-
<button type="button" class="app-composer__go app-state app-target" aria-label="Send internal note" title="Send internal note"><span class="app-icon" aria-hidden="true">arrow_upward</span></button>
|
|
182
|
+
<button type="button" class="app-composer__go app-state app-target" aria-label="Send internal note" title="Send internal note"><span class="app-icon-swap" aria-hidden="true"><span class="app-icon">arrow_upward</span><span class="app-icon">stop</span></span></button>
|
|
183
183
|
</div>
|
|
184
184
|
</div>
|
|
185
185
|
</div>
|
|
@@ -356,7 +356,7 @@ Select text on a screen with a dock and **Ask Alis** appears by the selection (`
|
|
|
356
356
|
|
|
357
357
|
## Behaviour you must supply
|
|
358
358
|
|
|
359
|
-
- **The state machine** above: swap the trailing button's glyph, `aria-label` and `title` (or its word, in a voice state), and add or remove the plain voice buttons, on every change to the draft, the tray or the agent's state. `disabled` on Send until there is something to send and every tile is ready.
|
|
359
|
+
- **The state machine** above: swap the trailing button's glyph, `aria-label` and `title` (or its word, in a voice state), and add or remove the plain voice buttons, on every change to the draft, the tray or the agent's state. `disabled` on Send until there is something to send and every tile is ready. **Send and Stop** share one `.app-icon-swap` (`arrow_upward` first, `stop` second), `is-swapped` while Alis works, so the glyph turns over rather than blinking ([AppIconButton](AppIconButton.md)).
|
|
360
360
|
- **Keyboard**, on the editor only (never a window listener): Enter sends; Shift Enter adds a line (no hint line says so: Send's [AppTooltip](AppTooltip.md) carries Enter, and the [AppShortcutSheet](AppShortcutSheet.md) lists both); ignore Enter while `isComposing` (IME) or while a suggestion menu is open ([AppMenu](AppMenu.md)). In a call, Enter with text sends into the call. While Alis works with the queue off, Enter does nothing.
|
|
361
361
|
- **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines (five on a phone while the keyboard is up) and scrolls.
|
|
362
362
|
- **One markup at every width.** The phone's one row is CSS alone. Never re-render or move the textarea when the composer changes form or state: a phone drops its keyboard mid-word.
|
|
@@ -372,4 +372,4 @@ Select text on a screen with a dock and **Ask Alis** appears by the selection (`
|
|
|
372
372
|
|
|
373
373
|
## Classes
|
|
374
374
|
|
|
375
|
-
`.app-composer`, `.app-composer__audience`, `.is-locked`, `.app-composer__go--plain`, `.is-alis`, `.is-muted`, `.app-composer__light`, `.app-composer__box`, `.app-composer__tray`, `.app-composer__drop`, `.app-composer__editor`, `.app-composer__input`, `.app-composer__interim`, `.app-composer__row`, `.app-composer__spacer`, `.app-composer__go`, `.app-composer__go-label`, `.app-composer__rec`, `.app-composer__meter`, `.app-composer__timer`, `.app-composer__capture`, `.is-paused`, `.app-composer__capture-label`, `.app-capture-thumb`, `.is-empty`, `.app-capture-peek`, `.app-capture-peek__head`, `.app-capture-peek__title`, `.app-capture-peek__frame`, `.app-capture-peek__note`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, `.app-dock`, `.app-composer__lift`, `.is-settled`, `.app-composer__trace`, `.app-composer__quote`, `.app-composer__quote-text`, `.app-selection-ask`, with `.drop-target` on the drop, `.app-state` on every button, `.app-target` on the icon buttons and the capture bar's buttons, `.app-btn--error` on Stop recording, and `.app-compact-only` on Pause's glyph.
|
|
375
|
+
`.app-composer`, `.app-icon-swap`, `.is-swapped`, `.app-composer__audience`, `.is-locked`, `.app-composer__go--plain`, `.is-alis`, `.is-muted`, `.app-composer__light`, `.app-composer__box`, `.app-composer__tray`, `.app-composer__drop`, `.app-composer__editor`, `.app-composer__input`, `.app-composer__interim`, `.app-composer__row`, `.app-composer__spacer`, `.app-composer__go`, `.app-composer__go-label`, `.app-composer__rec`, `.app-composer__meter`, `.app-composer__timer`, `.app-composer__capture`, `.is-paused`, `.app-composer__capture-label`, `.app-capture-thumb`, `.is-empty`, `.app-capture-peek`, `.app-capture-peek__head`, `.app-capture-peek__title`, `.app-capture-peek__frame`, `.app-capture-peek__note`, `.app-composer__status`, `.app-composer__line`, `.is-error`, `.app-composer__line-action`, `.app-dock`, `.app-composer__lift`, `.is-settled`, `.app-composer__trace`, `.app-composer__quote`, `.app-composer__quote-text`, `.app-selection-ask`, with `.drop-target` on the drop, `.app-state` on every button, `.app-target` on the icon buttons and the capture bar's buttons, `.app-btn--error` on Stop recording, and `.app-compact-only` on Pause's glyph.
|
package/components/AppDialog.md
CHANGED
|
@@ -85,7 +85,7 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
|
|
|
85
85
|
- **Open**: remember `document.activeElement`, then focus the first focusable element inside the dialog (the first field, else the first action, which is Cancel), or a chosen element; fall back to the dialog itself (`tabindex="-1"`).
|
|
86
86
|
- **Trap focus**: on Tab from the last focusable element go to the first, and on Shift+Tab from the first go to the last.
|
|
87
87
|
- **Close** on Escape, on a press of the scrim itself (`mousedown` whose target is the `.app-scrim`, not the dialog), and on Cancel. A persistent dialog (a form) ignores Escape and the scrim.
|
|
88
|
-
- **On close**:
|
|
88
|
+
- **On close**: set `hidden` on the scrim and remove it after `--spring-fast-effects-duration`, so it fades ([motion.md](../rules/motion.md)); return focus to the remembered element if it is still in the document.
|
|
89
89
|
- Mount one dialog at a time.
|
|
90
90
|
- **Signed out**: Sign in again opens sign-in in a new tab from the click itself; where the tab is blocked, reload through sign-in instead. Close the dialog when that tab reports back, or when the window regains focus and the session is back. Back as someone else, reload the page.
|
|
91
91
|
- **Asking for access**: Send request shows its work on the button; on success close the dialog, return focus to where the request's state now stands, and replace the control that opened it with that state. A failure stays in the dialog as an error alert at its top, with the note still there ([errors.md](../rules/errors.md)).
|
|
@@ -52,7 +52,7 @@ Detail most people don't need, folded under its title: press the title and it op
|
|
|
52
52
|
|
|
53
53
|
## Behaviour you must supply
|
|
54
54
|
|
|
55
|
-
- None: the native `<details>` opens, closes, takes Enter and Space, and announces its state. Add `open` to start one open.
|
|
55
|
+
- None: the native `<details>` opens, closes, takes Enter and Space, and announces its state. Add `open` to start one open. It opens to its height and its contents fade in once there's room (the CSS does it).
|
|
56
56
|
- **Remember** what a person opened for as long as they stay on the screen; a refetch never closes it.
|
|
57
57
|
- **A field with an error inside a closed one**: open it before focusing the field.
|
|
58
58
|
|
|
@@ -45,8 +45,9 @@ A 20px glyph in a 40px box that performs one action.
|
|
|
45
45
|
|
|
46
46
|
- `aria-label` and the [AppTooltip](AppTooltip.md) carry the same label. Older markup in these guides shows it as `title`; render the tooltip instead.
|
|
47
47
|
- A shortcut: its keys in the tooltip and `aria-keyshortcuts` on the button ([shortcuts.md](../rules/shortcuts.md)).
|
|
48
|
-
- A toggle: on press flip `aria-pressed`, `is-selected` on the button and `app-icon--filled` on the glyph together. A plain action never has `aria-pressed`.
|
|
48
|
+
- A toggle: on press flip `aria-pressed`, `is-selected` on the button and `app-icon--filled` on the glyph together. A plain action never has `aria-pressed`. Turning on, the glyph gives under the press and springs back filled (the CSS does it).
|
|
49
|
+
- **A glyph that changes its meaning** (Copy to ✓ for about two seconds, Send to Stop): put both in `<span class="app-icon-swap" aria-hidden="true">`, the one at rest first, and toggle `is-swapped`; the first turns away as the second springs in. Change the accessible name with it.
|
|
49
50
|
|
|
50
51
|
## Classes
|
|
51
52
|
|
|
52
|
-
`.app-icon-btn`, `.app-icon-btn--small`, `.is-selected`, with `.app-state .app-target`.
|
|
53
|
+
`.app-icon-btn`, `.app-icon-btn--small`, `.is-selected`; `.app-icon-swap`, `.is-swapped`; with `.app-state .app-target`.
|
package/components/AppListRow.md
CHANGED
|
@@ -99,7 +99,9 @@ Order inside the row: icon, text, trailing, meta.
|
|
|
99
99
|
- Focus lands on the hit; the CSS draws the focus ring on the whole row.
|
|
100
100
|
- **Field row**: on press, replace the row with its edit form in place (labels above, Cancel and Save on the trailing edge; Save is filled unless the screen already holds its one filled action, as a review before publishing does), one field at a time; on save or cancel, show the row again and return focus to its hit. The hit's accessible name is the verb and the name ("Edit length").
|
|
101
101
|
- Controls in the trailing slot are siblings of the hit, never inside it.
|
|
102
|
+
- **A row that arrives while the list is open** (a new response, a ticket) is rendered with `is-arriving`: it opens its space and is tinted for a moment. Never on the rows a page draws when it loads; take it off after about a second.
|
|
103
|
+
- **A row that leaves**: add `is-leaving`, then remove it once it has gone ([motion.md](../rules/motion.md) § Removing what has left); it folds away and the rows below close up.
|
|
102
104
|
|
|
103
105
|
## Classes
|
|
104
106
|
|
|
105
|
-
`.app-list`, `.app-row`, `.app-row--nav`, `.app-row--agent-chat`, `.app-row--divided`, `.app-list--fields`, `.app-row--field`, `.is-selected`, `.app-row__icon`, `.app-row__text`, `.app-row__hit`, `.app-row__trailing`, `.app-row__meta`, `.app-nav-heading`, with `.app-state` on every row.
|
|
107
|
+
`.app-list`, `.app-row`, `.app-row--nav`, `.app-row--agent-chat`, `.app-row--divided`, `.app-list--fields`, `.app-row--field`, `.is-selected`, `.is-arriving`, `.is-leaving`, `.app-row__icon`, `.app-row__text`, `.app-row__hit`, `.app-row__trailing`, `.app-row__meta`, `.app-nav-heading`, with `.app-state` on every row.
|
package/components/AppMenu.md
CHANGED
|
@@ -87,7 +87,7 @@ What you chose from `/` or `@` becomes **one token in the sentence** (`.app-toke
|
|
|
87
87
|
|
|
88
88
|
## Behaviour you must supply
|
|
89
89
|
|
|
90
|
-
- **Place an action menu** 4 below its trigger, its start edge on the trigger's start (its end edge for a trigger at the end of a row), flipping above when there isn't room; the composer's Add opens upward. Toggle `hidden` and the trigger's `aria-expanded
|
|
90
|
+
- **Place an action menu** 4 below its trigger, its start edge on the trigger's start (its end edge for a trigger at the end of a row), flipping above when there isn't room; the composer's Add opens upward. A menu above its trigger takes `app-menu--above` (the composer's bands already do). Toggle `hidden` and the trigger's `aria-expanded`: it grows out of its trigger and leaves as a fade ([motion.md](../rules/motion.md)).
|
|
91
91
|
- **Action menu keys**: Up and Down move and wrap, Home and End, a letter jumps to the next item starting with it, Enter or Space chooses, Escape closes and returns focus to the trigger, Tab closes. Down or Up on the trigger opens it on the first or last item. A press outside closes it.
|
|
92
92
|
- **Suggestion menu keys**, on the editor only (never a window listener): Up and Down move `is-active` and `aria-activedescendant`, Enter or Tab chooses, Escape closes. Ignore keys while `isComposing`. Stop the keys you handle from reaching anything else.
|
|
93
93
|
- **Triggers**: `/` at the start of the message only, `@` at the start or after a space; filter as you type; close when a space follows no match.
|
|
@@ -97,4 +97,4 @@ What you chose from `/` or `@` becomes **one token in the sentence** (`.app-toke
|
|
|
97
97
|
|
|
98
98
|
## Classes
|
|
99
99
|
|
|
100
|
-
`.app-menu`, `.app-menu--suggest`, `.app-menu__heading`, `.app-menu__divider`, `.app-menu__item`, `.app-menu__item--danger`, `.is-active`, `.is-selected`, `.app-menu__text`, `.app-menu__support`, `.app-menu__hint`, `.app-menu__avatar`, `.app-menu__empty`; `.app-token`; with `.app-state` on every item and `.app-loader.app-loader--line` on the searching line.
|
|
100
|
+
`.app-menu`, `.app-menu--above`, `.app-menu--suggest`, `.app-menu__heading`, `.app-menu__divider`, `.app-menu__item`, `.app-menu__item--danger`, `.is-active`, `.is-selected`, `.app-menu__text`, `.app-menu__support`, `.app-menu__hint`, `.app-menu__avatar`, `.app-menu__empty`; `.app-token`; with `.app-state` on every item and `.app-loader.app-loader--line` on the searching line.
|
|
@@ -29,9 +29,10 @@ See [selection.md](../rules/selection.md).
|
|
|
29
29
|
## Behaviour you must supply
|
|
30
30
|
|
|
31
31
|
- On press move `is-selected` and `aria-checked="true"` to the pressed segment (and `app-icon--filled` to its icon), clear them on the rest, and re-parameterise the content.
|
|
32
|
+
- **The selection travels**: set `--indicator-left` and `--indicator-width` on the `.app-seg` to the selected segment's `offsetLeft` and `offsetWidth`, then add `app-seg--travel` (in that order, or it grows in on every load); set them again when the choice changes or the fonts load.
|
|
32
33
|
- The group needs an `aria-label`.
|
|
33
34
|
- A radiogroup expects one tab stop and arrow keys: `tabindex="0"` on the checked segment, `-1` on the rest, Arrow keys move the choice.
|
|
34
35
|
|
|
35
36
|
## Classes
|
|
36
37
|
|
|
37
|
-
`.app-seg`, `.app-seg__item`, `.is-selected`, with `.app-state`.
|
|
38
|
+
`.app-seg`, `.app-seg--travel`, `.app-seg__item`, `.is-selected`, with `.app-state`.
|
package/components/AppShell.md
CHANGED
|
@@ -148,9 +148,10 @@ Usage lives here, never in a title bar: it measures the account, not the screen
|
|
|
148
148
|
|
|
149
149
|
## Behaviour you must supply
|
|
150
150
|
|
|
151
|
-
- Add `app-shell--detail` and the `<aside>` only while something is selected
|
|
151
|
+
- Add `app-shell--detail` and the `<aside>` only while something is selected, the `<aside>` rendered with `is-arriving` when someone opens it (not when a page loads with it open): the pane comes in from the right and the content narrows. To close, remove `app-shell--detail`, then the `<aside>` once it has gone ([motion.md](../rules/motion.md) § Removing what has left), so the pane goes back over the edge; return focus to the row that opened it.
|
|
152
152
|
- When the rail runs long, scroll only the region after the product groups (the agent chat list); the brand, the groups and the foot stay put.
|
|
153
|
-
- **The drawer** (below 600px): the title bar's menu button (`aria-expanded`, `aria-controls` on the nav) adds `app-shell--nav-open`. While it's open, make `.app-shell__main` `inert` and move focus to its close. It closes from its close, on a route change and on Escape, and focus returns to the menu button. Remove the class at 600px and up.
|
|
153
|
+
- **The drawer** (below 600px): the title bar's menu button (`aria-expanded`, `aria-controls` on the nav) adds `app-shell--nav-open`. While it's open, make `.app-shell__main` `inert` and move focus to its close. It closes from its close, on a route change and on Escape, and focus returns to the menu button. Remove the class at 600px and up. It comes in from the left by itself.
|
|
154
|
+
- **Changing page**: run the route change in a view transition, forward, back or neither ([motion.md](../rules/motion.md) § Changing page). The content is `app-content`; nothing else takes that name.
|
|
154
155
|
- **The detail pane's history**: opening it pushes a history entry with its parameter; choosing another row while it's open replaces that entry, so back doesn't step through every row you looked at; close goes back. At every width.
|
|
155
156
|
- The account card opens the account menu (toggle `aria-expanded`).
|
|
156
157
|
- No photo: the person's initials ([AppAvatar](AppAvatar.md)) in `<span class="app-account__avatar text-label" aria-hidden="true">RS</span>`.
|
|
@@ -160,4 +161,4 @@ Usage lives here, never in a title bar: it measures the account, not the screen
|
|
|
160
161
|
|
|
161
162
|
## Classes
|
|
162
163
|
|
|
163
|
-
`.app-shell`, `.app-shell--detail`, `.app-shell__nav`, `.app-shell__nav-foot`, `.app-shell__main`, `.app-shell__content`, `.app-shell__detail`; `.app-shell--nav-open`, `.app-shell__nav-close`; `.app-brand`, `.app-brand__wordmark`; `.app-nav-heading`, `.app-nav-secondary`; `.app-nav-switcher`, `.app-nav-switcher__text`, `.app-nav-switcher__kind`; `.app-account`, `.app-account__avatar`, `.app-account__text`.
|
|
164
|
+
`.app-shell`, `.app-shell--detail`, `.app-shell__nav`, `.app-shell__nav-foot`, `.app-shell__main`, `.app-shell__content`, `.app-shell__detail`, `.is-arriving`; `.app-shell--nav-open`, `.app-shell__nav-close`; `.app-brand`, `.app-brand__wordmark`; `.app-nav-heading`, `.app-nav-secondary`; `.app-nav-switcher`, `.app-nav-switcher__text`, `.app-nav-switcher__kind`; `.app-account`, `.app-account__avatar`, `.app-account__text`.
|
|
@@ -142,11 +142,12 @@ The tabs scroll under it; the filter row is unchanged. Mark the parts that exist
|
|
|
142
142
|
- **Search**: filter as the user types a list you already hold; where the search goes to a server, run it on Enter and say so in the placeholder. Show the clear button only while the input has a value; clear empties the input, re-filters and returns focus to the input. Keep the query in the URL (`?q=`), so back, refresh and a shared link keep it.
|
|
143
143
|
- **`/`** puts focus in the screen's search field from anywhere on the screen, except while focus is in another field ([shortcuts.md](../rules/shortcuts.md)). A section's or a pane's own search has no `/` and no cap: one field per screen answers to it.
|
|
144
144
|
- **The count** answers the row: the total at rest, "2 of 5" while a query or a filter narrows.
|
|
145
|
-
- **Tabs**: they are routes. Move `is-selected` and `aria-current="page"` to the current tab when the route changes. If your router renders links, `<a class="app-tab app-state" href="…">` takes the same classes.
|
|
145
|
+
- **Tabs**: they are routes. Move `is-selected` and `aria-current="page"` to the current tab when the route changes. If your router renders links, `<a class="app-tab app-state" href="…">` takes the same classes. The panel changes as a page does, with no type ([motion.md](../rules/motion.md) § Changing page).
|
|
146
|
+
- **The indicator travels** to the new tab: set `--indicator-left` and `--indicator-width` on the `.app-tabs` to the selected tab's `offsetLeft` and `offsetWidth`, then add `app-tabs--travel` (in that order, or it grows in from the start on every load); set them again when the tab changes, the fonts load or the bar resizes.
|
|
146
147
|
- Hide search and the filter row when the list is empty.
|
|
147
148
|
- **The role chip**: draw it only once the role is known, with the verbs ([access.md](../rules/access.md) § Before it is known). Pressing it opens Sharing; when the role changes (a request granted), remove it and draw the verbs the new role allows.
|
|
148
149
|
- **`is-scrolled`** on the bar while what scrolls under it has left the top (its `scrollTop` is above 0), and off again at the top. Where the bar scrolls away with the page, nothing is under it: leave it off.
|
|
149
150
|
|
|
150
151
|
## Classes
|
|
151
152
|
|
|
152
|
-
`.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`, `.app-titlebar__role`, `.is-scrolled`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
|
|
153
|
+
`.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`, `.app-titlebar__role`, `.is-scrolled`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tabs--travel`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
|
package/components/AppTooltip.md
CHANGED
|
@@ -40,7 +40,7 @@ Names a control that shows no words, and carries its keys ([shortcuts.md](../rul
|
|
|
40
40
|
- **Open** 200ms after the pointer rests on the control, or at once when it takes keyboard focus. Once one tooltip is open, the next opens at once while the pointer moves along a row of controls.
|
|
41
41
|
- **Close** when the pointer leaves or focus moves, when the control is pressed, when the page scrolls, and on Escape.
|
|
42
42
|
- **Place it** with `position: fixed` against the control's box; flip above near the window's bottom.
|
|
43
|
-
- **Render it once**, near the end of the document or in a portal, so a scrolling pane or an `overflow: hidden` parent can't clip it. Toggle `hidden
|
|
43
|
+
- **Render it once**, near the end of the document or in a portal, so a scrolling pane or an `overflow: hidden` parent can't clip it. Toggle `hidden`: it fades in and out by itself.
|
|
44
44
|
- **Assistive technology** already has the label (`aria-label`) and the keys (`aria-keyshortcuts`), so don't point `aria-describedby` at the tooltip unless it says more than the label, as a truncated name's full text does.
|
|
45
45
|
|
|
46
46
|
## Classes
|
package/components/AppTurn.md
CHANGED
|
@@ -163,7 +163,7 @@ Northwind 120 —</pre></li>
|
|
|
163
163
|
<!-- Thinking: the mark animates; the status names the step -->
|
|
164
164
|
<div class="app-turn__head">
|
|
165
165
|
<span class="app-turn__mark app-loader app-loader--line" aria-hidden="true"><svg …></svg></span>
|
|
166
|
-
<span class="app-turn__status text-supporting" role="status">Reading 14 interview transcripts</span>
|
|
166
|
+
<span class="app-turn__status text-supporting" role="status"><span>Reading 14 interview transcripts</span></span>
|
|
167
167
|
</div>
|
|
168
168
|
|
|
169
169
|
<!-- Writing: the caret follows the last word -->
|
|
@@ -236,11 +236,15 @@ Northwind 120 —</pre></li>
|
|
|
236
236
|
- **The disclosure**: toggle `aria-expanded` and the steps' `hidden`.
|
|
237
237
|
- **Your bubble**: put the text straight into the element with no whitespace around it; line breaks are kept.
|
|
238
238
|
- **A voice note**: drive `is-played` on the bars as it plays, swap `play_arrow` and `pause` (and the label); Show all toggles `is-open` and reads Show less.
|
|
239
|
-
- **Thumbs**: one at a time; set `aria-pressed`, `is-selected` and `app-icon--filled` on the one given.
|
|
239
|
+
- **Thumbs**: one at a time; set `aria-pressed`, `is-selected` and `app-icon--filled` on the one given. The glyph gives under the press and springs back filled (the CSS does it).
|
|
240
|
+
- **Copy**: the glyph sits in `.app-icon-swap` with ✓ second; `is-swapped` and "Copied" as its name for about two seconds ([AppIconButton](AppIconButton.md)).
|
|
241
|
+
- **A turn that arrives while the thread is open** is rendered with `is-arriving`: yours rises out of the composer as you send it, Alis's and a person's fade in. Never on the turns drawn when the thread loads; take it off after about a second.
|
|
242
|
+
- **The status**: keep `.app-turn__status` for the whole wait (it is a live region, and a new one isn't reliably announced) and put each step's words in a new `<span>` inside it, so each fades in where the last one was.
|
|
243
|
+
- **As the reply streams**, wrap each run of text as it arrives in `<span class="app-turn__chunk">`, so it fades in where it lands. A renderer that redraws the whole reply on every run leaves it out, or the reply would fade in again each time.
|
|
240
244
|
- **On a phone**, a long press on a turn opens its actions as a menu.
|
|
241
245
|
- Keep the thread pinned to the bottom while Alis writes, unless the person has scrolled up. Keep it there too when the space it has shrinks (the keyboard opening on a phone, the composer growing), if its end was in view: the latest question is what the person is answering.
|
|
242
246
|
- **People**: insert the day line before the first turn of each day; move *Seen* to the newest of your bubbles anyone has read; show the typing line while they type and drop it when their turn arrives; keep a request's state line in step with the request; write typing (once, as it starts) and each request change into the thread's status region.
|
|
243
247
|
|
|
244
248
|
## Classes
|
|
245
249
|
|
|
246
|
-
`.app-thread`, `.app-thread__event`, `.app-thread__typing`, `.app-thread__status`; `.app-turn`, `.app-turn--you`, `.app-turn--alis`, `.app-turn--them`, `.is-latest`; `.app-turn__about`, `.app-turn__who`, `.app-turn__audience`, `.app-turn__avatar`, `.app-turn__avatar--alis`; `.app-turn__head`, `.app-turn__mark`, `.app-turn__status`, `.app-turn__worked`, `.app-turn__steps`, `.app-turn__step`, `.app-turn__output`, `.app-turn__caret`; `.app-turn__row`, `.app-turn__bubble`, `.app-turn__bubble--voice`, `.app-turn__tools`, `.app-turn__files`, `.app-turn__image`; `.app-turn__foot`; `.app-turn__line`, `.is-error`, `.app-turn__line-action`; `.app-turn__record`; `.app-turn__request`; `.app-voice-note`, `.is-open`, `.app-voice-note__player`, `.app-voice-note__wave`, `.is-played`, `.app-voice-note__time`, `.app-voice-note__transcript`, `.app-voice-note__more`; with `.prose` on the reply, `.app-icon-btn` and `.app-state` on the buttons, and `.app-loader.app-loader--line` on the mark while Alis thinks.
|
|
250
|
+
`.app-thread`, `.app-thread__event`, `.app-thread__typing`, `.app-thread__status`; `.app-turn`, `.app-turn--you`, `.app-turn--alis`, `.app-turn--them`, `.is-latest`, `.is-arriving`; `.app-turn__about`, `.app-turn__who`, `.app-turn__audience`, `.app-turn__avatar`, `.app-turn__avatar--alis`; `.app-turn__head`, `.app-turn__mark`, `.app-turn__status`, `.app-turn__worked`, `.app-turn__steps`, `.app-turn__step`, `.app-turn__output`, `.app-turn__caret`, `.app-turn__chunk`; `.app-turn__row`, `.app-turn__bubble`, `.app-turn__bubble--voice`, `.app-turn__tools`, `.app-turn__files`, `.app-turn__image`; `.app-turn__foot`; `.app-turn__line`, `.is-error`, `.app-turn__line-action`; `.app-turn__record`; `.app-turn__request`; `.app-voice-note`, `.is-open`, `.app-voice-note__player`, `.app-voice-note__wave`, `.is-played`, `.app-voice-note__time`, `.app-voice-note__transcript`, `.app-voice-note__more`; with `.prose` on the reply, `.app-icon-btn` and `.app-state` on the buttons, and `.app-loader.app-loader--line` on the mark while Alis thinks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
|
|
5
5
|
"keywords": ["alisx", "design-system", "design-tokens", "css"],
|
|
6
6
|
"homepage": "https://alisx.com",
|
package/rules/README.md
CHANGED
|
@@ -23,6 +23,7 @@ Read only what the job needs.
|
|
|
23
23
|
| [spacing.md](spacing.md) | The scale, targets, density |
|
|
24
24
|
| [buttons.md](buttons.md) | Which button, and how many |
|
|
25
25
|
| [selection.md](selection.md) | How a selected thing is drawn |
|
|
26
|
+
| [motion.md](motion.md) | The springs, which one moves what, reduced motion, changing page |
|
|
26
27
|
| [chips-alerts.md](chips-alerts.md) | Chips, alerts, status |
|
|
27
28
|
| [loading.md](loading.md) | Skeleton, loader, progress |
|
|
28
29
|
| [errors.md](errors.md) | What shows when something fails, can't load, isn't allowed or isn't there |
|
package/rules/buttons.md
CHANGED
|
@@ -240,7 +240,7 @@ The rest:
|
|
|
240
240
|
§ Weight). Verb first, sentence case, no full stop.
|
|
241
241
|
- Groups sit in a row with `gap`.
|
|
242
242
|
- **A filled button answers a press**: it scales to 97% and rounds to 12px over
|
|
243
|
-
`
|
|
243
|
+
`spring-fast-spatial`, then springs back. The button owns it: never on an
|
|
244
244
|
icon button, a tab or a disabled button, never under reduced motion, and a site
|
|
245
245
|
never animates a press itself.
|
|
246
246
|
|
package/rules/known-gaps.md
CHANGED
|
@@ -28,6 +28,12 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
|
|
|
28
28
|
- `surface-variant` and `surface-container-highest` hold one value (`#E6E8EB`) for two jobs.
|
|
29
29
|
- Long-form document surfaces have no ruled measure beyond 710px prose.
|
|
30
30
|
|
|
31
|
+
## Motion
|
|
32
|
+
|
|
33
|
+
- **Gestures.** A swipe or a drag that lets go (the phone's navigation pane swiped shut, a row swiped to act on it, a row dragged to reorder) needs a spring that starts at the finger's speed, which CSS can't do. Until there is one, these move only on a press ([motion.md](motion.md)).
|
|
34
|
+
- **Motion tied to scrolling** (a phone's title bar condensing as you read) has no pattern yet.
|
|
35
|
+
- **Height** animates only in browsers with `interpolate-size`. Elsewhere a fold, an ask and an arriving row open at once and their contents still fade.
|
|
36
|
+
|
|
31
37
|
## Assets
|
|
32
38
|
|
|
33
39
|
- No font files are vendored. `fonts.css` loads Nunito Sans and Material Symbols from Google Fonts, for prototypes; in production, self-host them (Material Symbols as the subset you use).
|
package/rules/motion.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Motion
|
|
2
|
+
|
|
3
|
+
**Every move is a spring.** A spring has a stiffness and a damping, never a
|
|
4
|
+
duration: it settles when it settles, and something interrupted mid-way carries
|
|
5
|
+
on from where it is. The springs are M3's motion physics. The system's components
|
|
6
|
+
already move; a site that moves something of its own picks a spring token, and
|
|
7
|
+
never writes a duration or a curve.
|
|
8
|
+
|
|
9
|
+
## The springs
|
|
10
|
+
|
|
11
|
+
| Token | From M3 | Settles | Overshoot | For |
|
|
12
|
+
| --- | --- | --- | --- | --- |
|
|
13
|
+
| `spring-fast-spatial` | Expressive | 359ms | 9.5% | A control answering a touch in place: a press, a switch's handle, a toggle's glyph, an icon changing its meaning |
|
|
14
|
+
| `spring-default-spatial` | Expressive | 435ms | 1.5% | What covers part of the screen or travels across it: a menu, a dialog, a snackbar, a pane, a tab's indicator, a fold, a page's 24px shift |
|
|
15
|
+
| `spring-slow-spatial` | Standard | 484ms | 0.15%, too little to see | What fills the screen: the phone's navigation pane |
|
|
16
|
+
| `spring-fast-effects` | both | 150ms | never | Colour and opacity on a control, state layers, and every fade out |
|
|
17
|
+
| `spring-default-effects` | both | 231ms | never | Content fading in: a page, a tab's panel, a reply as it streams, a scrim |
|
|
18
|
+
| `spring-slow-effects` | both | 326ms | never | A slow colour change: the tint on a row that just arrived |
|
|
19
|
+
|
|
20
|
+
Each comes three ways: `--spring-fast-spatial` is the duration and the curve
|
|
21
|
+
together, for a `transition` or an `animation`; `--spring-fast-spatial-duration`
|
|
22
|
+
and `--spring-fast-spatial-easing` are the parts, for a delay, a timer, or a
|
|
23
|
+
property that takes them apart.
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
.thing { transition: opacity var(--spring-fast-effects), translate var(--spring-default-spatial); }
|
|
27
|
+
.thing.is-open { transition: opacity var(--spring-default-effects) var(--spring-fast-effects-duration); }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The curve is CSS `linear()`, drawn from the spring itself, every wobble of it.
|
|
31
|
+
|
|
32
|
+
## Which spring
|
|
33
|
+
|
|
34
|
+
- **What moves picks the kind.** Position, size, rotation, corners and a reveal are
|
|
35
|
+
spatial. Colour and opacity are effects. Something that shows a value (a
|
|
36
|
+
progress bar's width) moves on effects, so it never shows more than it means.
|
|
37
|
+
- **How much of the screen picks the speed.** Fast for a control, default for
|
|
38
|
+
anything up to a pane, slow for the whole screen.
|
|
39
|
+
- **The whole screen never bounces.** Fast and default spatial overshoot a little;
|
|
40
|
+
slow spatial comes from M3's Standard scheme and doesn't.
|
|
41
|
+
- **One transition, one spring.** The parts of a move share it: a chevron turns on
|
|
42
|
+
its fold's spring, not a faster one.
|
|
43
|
+
|
|
44
|
+
## The rules
|
|
45
|
+
|
|
46
|
+
- **Reduced motion: movement becomes a fade.** Under `prefers-reduced-motion` the
|
|
47
|
+
spatial springs are `0s` and the effects springs stay, so things appear in place
|
|
48
|
+
and still fade, and nothing jump-cuts. The tokens do it; never zero a fade
|
|
49
|
+
yourself. A loop (a loader, a shimmer, a caret) holds still: wrap its
|
|
50
|
+
`animation` in `@media (prefers-reduced-motion: no-preference)`.
|
|
51
|
+
- **One direction.** Everything that moves in a transition moves along one axis.
|
|
52
|
+
- **Clean fades.** The old content fades out on fast effects, then the new fades in
|
|
53
|
+
on default effects, delayed by `--spring-fast-effects-duration`. Two contents are
|
|
54
|
+
never half visible at once.
|
|
55
|
+
- **Things come from where they live**, and leave the way they came: the detail pane
|
|
56
|
+
from the right edge, the phone's navigation pane from the left, the composer's
|
|
57
|
+
bands up out of the composer, a menu out of its trigger, a snackbar up from the
|
|
58
|
+
foot.
|
|
59
|
+
- **Leaving is quicker than arriving.** Something within the screen leaves as a
|
|
60
|
+
fade on fast effects, without moving. A pane goes back over its edge.
|
|
61
|
+
- **Grow, never scale.** A surface arrives by revealing itself along one axis (a
|
|
62
|
+
clip or a height). Scale belongs to a press and a glyph.
|
|
63
|
+
- **The layout holds still.** A skeleton holds the shape ([loading.md](loading.md));
|
|
64
|
+
a row that arrives opens its own space; nothing pops in or shoves.
|
|
65
|
+
- **Focus never animates.** The ring is there the moment the key is pressed.
|
|
66
|
+
- **Only the tokens.** No duration or curve of your own in a `transition` or an
|
|
67
|
+
`animation`; the check refuses one ([styling.md](styling.md)). A loop of your
|
|
68
|
+
own is a gap: say so where it is.
|
|
69
|
+
- **Timing that isn't a spring** belongs to its component: a tooltip opens after
|
|
70
|
+
the pointer rests ([AppTooltip](../components/AppTooltip.md)); ✓ stays about two
|
|
71
|
+
seconds ([buttons.md](buttons.md)).
|
|
72
|
+
|
|
73
|
+
## What moves, and what the site does
|
|
74
|
+
|
|
75
|
+
The CSS hangs the motion off the state each component already has. Most of it
|
|
76
|
+
needs nothing from the site.
|
|
77
|
+
|
|
78
|
+
| Moment | The system | The site |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| A press | The filled button gives and springs back ([buttons.md](buttons.md)) | Nothing |
|
|
81
|
+
| A toggle turning on | The glyph gives under the press and springs back filled | Flip `aria-pressed`, as it already does |
|
|
82
|
+
| An icon changing its meaning (Send to Stop, Copy to ✓) | `.app-icon-swap` turns one glyph away and springs the other in | Put both glyphs in it and toggle `is-swapped` ([AppIconButton](../components/AppIconButton.md)) |
|
|
83
|
+
| Selection that travels | `app-tabs--travel` and `app-seg--travel` draw one indicator that travels | Set `--indicator-left` and `--indicator-width` to the selected item's `offsetLeft` and `offsetWidth`, then add the modifier, so it is drawn in place and moves only on a change ([AppTitleBar](../components/AppTitleBar.md), [AppSegmented](../components/AppSegmented.md)) |
|
|
84
|
+
| Expand and collapse | A disclosure and a turn's steps open to their height, then their rows fade in | Toggle `open` or `hidden`, as already |
|
|
85
|
+
| A menu, tooltip, snackbar or dialog | Arrives growing out of where it lives; leaves as a fade when it's `hidden`. Nothing is clipped once it has arrived, so a field's panel inside it shows whole | Toggle `hidden`, or set it and remove the element once it has gone (§ Removing what has left). Removed at once, it just goes |
|
|
86
|
+
| Alis's ask | Grows up out of the composer | Render it with `is-arriving` when it opens while someone is there |
|
|
87
|
+
| The conversation | A turn that arrives fades in, and yours rises out of the composer; each status fades in; each run of a reply fades in as it lands | `is-arriving` on a turn that arrives while the thread is open; each step's words in a new element inside the one status; each arriving run in `.app-turn__chunk` ([AppTurn](../components/AppTurn.md)) |
|
|
88
|
+
| A list that changes | A row that arrives opens its space and is tinted for a moment; one that leaves folds away | `is-arriving` on a row that arrives while the list is open; `is-leaving`, then remove it once it has gone ([AppListRow](../components/AppListRow.md)) |
|
|
89
|
+
| The detail pane | Comes in from the right while the content narrows; slides over the content below 840, and on a phone, where it fills the screen, on the slow spring | Open it with `is-arriving` on the pane; to close, drop `app-shell--detail`, then remove the pane once it has gone ([AppShell](../components/AppShell.md)) |
|
|
90
|
+
| The phone's navigation pane | Comes in from the left on slow spatial | Nothing |
|
|
91
|
+
| Changing page | The content fades out, then in; forward it comes 24px from the end, back from the start | Run the route change in a view transition (below) |
|
|
92
|
+
|
|
93
|
+
`is-arriving` is for what arrives while someone is watching. Never on what a page
|
|
94
|
+
draws when it loads, which would all fly in at once. Render the element with it:
|
|
95
|
+
added once the element is on the page, it does nothing. Take it off after about a
|
|
96
|
+
second, or the arrival plays again if the list is hidden and shown.
|
|
97
|
+
|
|
98
|
+
A few things move when a page first draws them, because nothing can tell that
|
|
99
|
+
draw from an arrival: a menu, tooltip, snackbar or dialog shown at once, a turn's
|
|
100
|
+
steps or a disclosure's rows drawn open, and a status. Each is brief, and it is what they would do anyway.
|
|
101
|
+
|
|
102
|
+
## Removing what has left
|
|
103
|
+
|
|
104
|
+
A thing that leaves stays on the page until it has gone, then the site removes it.
|
|
105
|
+
Wait for the longer of its move and its fade: under reduced motion the move is
|
|
106
|
+
0ms and the fade isn't.
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
const springMs = (name) => parseFloat(getComputedStyle(document.documentElement).getPropertyValue(`--spring-${name}-duration`))
|
|
110
|
+
const gone = () => Math.max(springMs('default-spatial'), springMs('fast-effects'))
|
|
111
|
+
// close the detail pane
|
|
112
|
+
shell.classList.remove('app-shell--detail')
|
|
113
|
+
const timer = setTimeout(() => pane.remove(), gone())
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If it opens again before the timer fires, cancel the timer and put the class back:
|
|
117
|
+
the move turns round from where it is.
|
|
118
|
+
|
|
119
|
+
## Changing page
|
|
120
|
+
|
|
121
|
+
The browser's view transitions do it. `.app-shell__content` is named
|
|
122
|
+
`app-content` and `.app-dock` is named `app-dock`; the rest of the shell, the title
|
|
123
|
+
bar included, changes in place. Give no other element those names.
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
// type: 'forward' going deeper (a list to one of its things), 'back' returning to
|
|
127
|
+
// where you came from, none between the navigation pane's destinations and a thing's tabs.
|
|
128
|
+
function changePage(update, type) {
|
|
129
|
+
if (!document.startViewTransition) return update()
|
|
130
|
+
try {
|
|
131
|
+
return document.startViewTransition({ update, types: type ? [type] : [] })
|
|
132
|
+
} catch {
|
|
133
|
+
return document.startViewTransition(update) // a browser that takes only the callback
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`update` renders the new page, or returns a promise that settles once it has. A
|
|
139
|
+
change that keeps the page (a filter, a query, a sort) is no transition. The
|
|
140
|
+
browser's own back and forward buttons run through it too: `back` when the entry
|
|
141
|
+
you arrive at is older than the one you left (keep its place in `history.state`),
|
|
142
|
+
`forward` when it is newer. A browser without view transitions changes at once;
|
|
143
|
+
one without their types fades without the shift. Two elements with one name stop
|
|
144
|
+
every transition, so a page renders one `.app-shell__content`.
|
|
145
|
+
|
|
146
|
+
**A container transform** (a tile opening into the file pane, the composer's trace
|
|
147
|
+
opening into the composer) is the same call with one `view-transition-name` on the
|
|
148
|
+
thing before and the thing after: the system's group timing morphs one into the
|
|
149
|
+
other on default spatial. It is for those moments, never a list row opening a page.
|
|
150
|
+
|
|
151
|
+
## Not yet
|
|
152
|
+
|
|
153
|
+
Swiping and dragging (the drawer swiped shut, a row dragged to reorder) and motion
|
|
154
|
+
tied to scrolling ([known-gaps.md](known-gaps.md)).
|
package/rules/styling.md
CHANGED
|
@@ -47,8 +47,9 @@ listed semantic roles and validated identity fields may change.
|
|
|
47
47
|
any of these.
|
|
48
48
|
- **Spacing**, only where the system's own spacing can't reach (a grid gap,
|
|
49
49
|
inside a media query), and only on the scale.
|
|
50
|
-
- **Motion.** Keyframes, transitions, animation, transform,
|
|
51
|
-
|
|
50
|
+
- **Motion.** Keyframes, transitions, animation, transform, translate, scale,
|
|
51
|
+
rotate, opacity, timed by the spring tokens: never a duration or a curve of your
|
|
52
|
+
own ([motion.md](motion.md)). A colour inside a keyframe is still a role.
|
|
52
53
|
- **Drawing.** Fill, stroke and stop colour on SVG marks, from roles. A role at an
|
|
53
54
|
alpha is allowed for an area or a band in a drawing, and for the `scrim` behind
|
|
54
55
|
text on an image. **Nowhere else.**
|
package/stylelint.mjs
CHANGED
|
@@ -53,6 +53,12 @@ const blendedColour =
|
|
|
53
53
|
// system doesn't have. A token's own name (var(--space-12)) is not a length.
|
|
54
54
|
const literalLength = /(?<!--[\w-]*)(?<![\w.])\d*\.?\d+(?:px|r?em|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax|[sld]v[wh])\b/i
|
|
55
55
|
const unknownSpace = new RegExp(`var\\(\\s*--space-(?!(?:${escaped(spaces.map((name) => name.slice('space-'.length)))})\\s*[,)])`)
|
|
56
|
+
// A duration or a curve written out in a transition or an animation: 150ms, .2s,
|
|
57
|
+
// -200ms, calc(…), cubic-bezier(…), steps(…), linear(…), linear, ease-out,
|
|
58
|
+
// step-end. 0s is no motion, not a duration. A token's own name
|
|
59
|
+
// (var(--spring-fast-effects-duration)) is neither.
|
|
60
|
+
const literalDuration = /(?<![\w.-])-?(?!0*\.?0+m?s\b)(?:\d+\.?\d*|\.\d+)m?s\b|\bcalc\(/i
|
|
61
|
+
const literalCurve = /\b(?:cubic-bezier|steps|linear)\(|(?<![\w-])(?:ease(?:-in|-out|-in-out)?|linear|step-start|step-end)(?![\w(-])/i
|
|
56
62
|
|
|
57
63
|
// The parts, exported so an app can add to a rule, or keep one part of it for
|
|
58
64
|
// a file, without losing the rest. Each part has a name, so an app picks it by
|
|
@@ -74,6 +80,14 @@ export const refused = {
|
|
|
74
80
|
values: [blendedColour],
|
|
75
81
|
message: `A role at an alpha or a blend belongs to a drawing (fill, stroke) or the scrim. Elsewhere, name the nearest role (${guide}).`,
|
|
76
82
|
},
|
|
83
|
+
motion: {
|
|
84
|
+
// "Every move is a spring": the timing of a transition or an animation is a
|
|
85
|
+
// spring token, never a duration or a curve of the site's own, and a custom
|
|
86
|
+
// property of the site's that holds one (--fade-duration: 200ms) is the same.
|
|
87
|
+
properties: '/^(?:(?:transition|animation)(?:-duration|-timing-function|-delay)?|--[\\w-]*(?:duration|delay|easing|timing))$/',
|
|
88
|
+
values: [literalDuration, literalCurve],
|
|
89
|
+
message: (property) => `Motion runs on the springs: write ${property} with var(--spring-fast-effects) and its kin, never a duration or a curve of your own (${guide}, rules/motion.md).`,
|
|
90
|
+
},
|
|
77
91
|
spacing: {
|
|
78
92
|
properties: '/^(?:(?:margin|padding|scroll-margin|scroll-padding)(?:-|$)|(?:grid-)?(?:row-|column-)?gap$)/',
|
|
79
93
|
values: [literalLength, unknownSpace],
|
package/tokens.css
CHANGED
|
@@ -181,10 +181,43 @@
|
|
|
181
181
|
--state-pressed: 0.12;
|
|
182
182
|
--state-statement: 0.04;
|
|
183
183
|
--state-dragged: 0.08;
|
|
184
|
+
--spring-fast-spatial: 359ms linear(0, 0.023, 0.084, 0.172, 0.275, 0.386, 0.498, 0.606, 0.705, 0.794, 0.872, 0.936, 0.988, 1.028, 1.058, 1.078, 1.089, 1.094, 1.094, 1.089, 1.082, 1.073, 1.062, 1.052, 1.041, 1.032, 1.023, 1.015, 1.008, 1.003, 0.999, 0.996, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.998, 1);
|
|
185
|
+
--spring-fast-spatial-duration: 359ms;
|
|
186
|
+
--spring-fast-spatial-easing: linear(0, 0.023, 0.084, 0.172, 0.275, 0.386, 0.498, 0.606, 0.705, 0.794, 0.872, 0.936, 0.988, 1.028, 1.058, 1.078, 1.089, 1.094, 1.094, 1.089, 1.082, 1.073, 1.062, 1.052, 1.041, 1.032, 1.023, 1.015, 1.008, 1.003, 0.999, 0.996, 0.993, 0.992, 0.991, 0.991, 0.991, 0.992, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.998, 1);
|
|
187
|
+
--spring-default-spatial: 435ms linear(0, 0.011, 0.04, 0.083, 0.136, 0.196, 0.259, 0.324, 0.389, 0.453, 0.514, 0.572, 0.626, 0.677, 0.723, 0.765, 0.802, 0.836, 0.866, 0.892, 0.914, 0.934, 0.95, 0.964, 0.976, 0.986, 0.994, 1, 1.005, 1.008, 1.011, 1.013, 1.014, 1.015, 1.015, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.006, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1.002, 1.001, 1);
|
|
188
|
+
--spring-default-spatial-duration: 435ms;
|
|
189
|
+
--spring-default-spatial-easing: linear(0, 0.011, 0.04, 0.083, 0.136, 0.196, 0.259, 0.324, 0.389, 0.453, 0.514, 0.572, 0.626, 0.677, 0.723, 0.765, 0.802, 0.836, 0.866, 0.892, 0.914, 0.934, 0.95, 0.964, 0.976, 0.986, 0.994, 1, 1.005, 1.008, 1.011, 1.013, 1.014, 1.015, 1.015, 1.015, 1.015, 1.014, 1.013, 1.012, 1.011, 1.01, 1.009, 1.008, 1.007, 1.006, 1.006, 1.005, 1.004, 1.004, 1.003, 1.002, 1.002, 1.002, 1.001, 1);
|
|
190
|
+
--spring-slow-spatial: 484ms linear(0, 0.009, 0.032, 0.066, 0.109, 0.157, 0.208, 0.262, 0.316, 0.369, 0.422, 0.472, 0.521, 0.566, 0.609, 0.649, 0.686, 0.721, 0.752, 0.781, 0.807, 0.83, 0.852, 0.871, 0.888, 0.903, 0.916, 0.928, 0.939, 0.948, 0.956, 0.963, 0.969, 0.974, 0.979, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 0.998, 0.999, 0.999, 1, 1, 1.001, 1.001, 1.001, 1.001, 1.001, 1.002, 1.002, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1);
|
|
191
|
+
--spring-slow-spatial-duration: 484ms;
|
|
192
|
+
--spring-slow-spatial-easing: linear(0, 0.009, 0.032, 0.066, 0.109, 0.157, 0.208, 0.262, 0.316, 0.369, 0.422, 0.472, 0.521, 0.566, 0.609, 0.649, 0.686, 0.721, 0.752, 0.781, 0.807, 0.83, 0.852, 0.871, 0.888, 0.903, 0.916, 0.928, 0.939, 0.948, 0.956, 0.963, 0.969, 0.974, 0.979, 0.983, 0.986, 0.989, 0.992, 0.994, 0.995, 0.997, 0.998, 0.999, 0.999, 1, 1, 1.001, 1.001, 1.001, 1.001, 1.001, 1.002, 1.002, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1.001, 1);
|
|
193
|
+
--spring-fast-effects: 150ms linear(0, 0.086, 0.253, 0.427, 0.578, 0.697, 0.787, 0.853, 0.899, 0.932, 0.954, 0.969, 0.98, 0.987, 0.991, 0.994, 0.996, 0.998, 0.998, 1);
|
|
194
|
+
--spring-fast-effects-duration: 150ms;
|
|
195
|
+
--spring-fast-effects-easing: linear(0, 0.086, 0.253, 0.427, 0.578, 0.697, 0.787, 0.853, 0.899, 0.932, 0.954, 0.969, 0.98, 0.987, 0.991, 0.994, 0.996, 0.998, 0.998, 1);
|
|
196
|
+
--spring-default-effects: 231ms linear(0, 0.041, 0.134, 0.247, 0.363, 0.472, 0.568, 0.652, 0.722, 0.779, 0.826, 0.864, 0.894, 0.918, 0.936, 0.951, 0.962, 0.971, 0.978, 0.983, 0.987, 0.99, 0.993, 0.994, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
|
|
197
|
+
--spring-default-effects-duration: 231ms;
|
|
198
|
+
--spring-default-effects-easing: linear(0, 0.041, 0.134, 0.247, 0.363, 0.472, 0.568, 0.652, 0.722, 0.779, 0.826, 0.864, 0.894, 0.918, 0.936, 0.951, 0.962, 0.971, 0.978, 0.983, 0.987, 0.99, 0.993, 0.994, 0.996, 0.997, 0.998, 0.998, 0.999, 1);
|
|
199
|
+
--spring-slow-effects: 326ms linear(0, 0.022, 0.075, 0.147, 0.227, 0.31, 0.391, 0.467, 0.537, 0.6, 0.657, 0.707, 0.751, 0.789, 0.822, 0.85, 0.874, 0.895, 0.912, 0.926, 0.939, 0.949, 0.958, 0.965, 0.971, 0.976, 0.98, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
|
|
200
|
+
--spring-slow-effects-duration: 326ms;
|
|
201
|
+
--spring-slow-effects-easing: linear(0, 0.022, 0.075, 0.147, 0.227, 0.31, 0.391, 0.467, 0.537, 0.6, 0.657, 0.707, 0.751, 0.789, 0.822, 0.85, 0.874, 0.895, 0.912, 0.926, 0.939, 0.949, 0.958, 0.965, 0.971, 0.976, 0.98, 0.984, 0.987, 0.989, 0.991, 0.993, 0.994, 0.995, 0.996, 0.997, 0.997, 0.998, 0.998, 0.998, 0.999, 1);
|
|
184
202
|
--font-sans: "Nunito Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
185
203
|
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
186
204
|
}
|
|
187
205
|
|
|
206
|
+
/* Reduced motion: nothing travels, and the fades stay, so nothing jump-cuts (rules/motion.md). */
|
|
207
|
+
@media (prefers-reduced-motion: reduce) {
|
|
208
|
+
:root {
|
|
209
|
+
--spring-fast-spatial: 0s linear;
|
|
210
|
+
--spring-fast-spatial-duration: 0ms;
|
|
211
|
+
--spring-fast-spatial-easing: linear;
|
|
212
|
+
--spring-default-spatial: 0s linear;
|
|
213
|
+
--spring-default-spatial-duration: 0ms;
|
|
214
|
+
--spring-default-spatial-easing: linear;
|
|
215
|
+
--spring-slow-spatial: 0s linear;
|
|
216
|
+
--spring-slow-spatial-duration: 0ms;
|
|
217
|
+
--spring-slow-spatial-easing: linear;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
188
221
|
/* Themes: light unless asked. data-theme works on any element (rules/themes.md). */
|
|
189
222
|
[data-theme="light"] { color-scheme: light; }
|
|
190
223
|
[data-theme="dark"] { color-scheme: dark; }
|
package/tokens.json
CHANGED
|
@@ -1553,12 +1553,12 @@
|
|
|
1553
1553
|
{
|
|
1554
1554
|
"name": "dur-spatial",
|
|
1555
1555
|
"value": "220ms",
|
|
1556
|
-
"usage": "
|
|
1556
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-spatial."
|
|
1557
1557
|
},
|
|
1558
1558
|
{
|
|
1559
1559
|
"name": "dur-effects",
|
|
1560
1560
|
"value": "160ms",
|
|
1561
|
-
"usage": "
|
|
1561
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-effects."
|
|
1562
1562
|
},
|
|
1563
1563
|
{
|
|
1564
1564
|
"name": "dur-tint",
|
|
@@ -1597,12 +1597,12 @@
|
|
|
1597
1597
|
{
|
|
1598
1598
|
"name": "motion-spatial",
|
|
1599
1599
|
"value": "cubic-bezier(0.2, 0.8, 0.2, 1.15)",
|
|
1600
|
-
"usage": "
|
|
1600
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-spatial."
|
|
1601
1601
|
},
|
|
1602
1602
|
{
|
|
1603
1603
|
"name": "motion-effects",
|
|
1604
1604
|
"value": "cubic-bezier(0.2, 0, 0, 1)",
|
|
1605
|
-
"usage": "
|
|
1605
|
+
"usage": "Deprecated in 0.49.0, removed in the next minor: use spring-fast-effects."
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
1608
|
"name": "ease-standard",
|
|
@@ -1616,6 +1616,53 @@
|
|
|
1616
1616
|
}
|
|
1617
1617
|
]
|
|
1618
1618
|
},
|
|
1619
|
+
"spring": {
|
|
1620
|
+
"about": "Product motion (rules/motion.md). M3's motion physics: a spring is a stiffness and a damping ratio, never a duration. The generator writes each as --<name> (its duration and a linear() curve drawn from the spring, for a transition or an animation), --<name>-duration and --<name>-easing. Spatial springs move things (position, size, rotation, corners, a reveal); effects springs change colour and opacity and never overshoot. Fast and default spatial come from M3's Expressive scheme, slow spatial from its Standard scheme, so the whole screen never bounces. Under prefers-reduced-motion the spatial springs are 0s and the effects springs stay.",
|
|
1621
|
+
"tokens": [
|
|
1622
|
+
{
|
|
1623
|
+
"name": "spring-fast-spatial",
|
|
1624
|
+
"stiffness": 800,
|
|
1625
|
+
"damping": 0.6,
|
|
1626
|
+
"scheme": "expressive",
|
|
1627
|
+
"usage": "Small things answering a touch in place: a press, a switch's handle, a toggle's glyph, an icon that changes its meaning. Overshoots 9.5%."
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
"name": "spring-default-spatial",
|
|
1631
|
+
"stiffness": 380,
|
|
1632
|
+
"damping": 0.8,
|
|
1633
|
+
"scheme": "expressive",
|
|
1634
|
+
"usage": "Things that cover part of the screen or travel across it: a menu, a dialog, a snackbar, a detail pane, a tab's indicator, a fold opening, a page's 24px shift. Overshoots 1.5%."
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"name": "spring-slow-spatial",
|
|
1638
|
+
"stiffness": 300,
|
|
1639
|
+
"damping": 0.9,
|
|
1640
|
+
"scheme": "standard",
|
|
1641
|
+
"usage": "What fills the screen: the phone's navigation pane. No visible overshoot."
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"name": "spring-fast-effects",
|
|
1645
|
+
"stiffness": 3800,
|
|
1646
|
+
"damping": 1,
|
|
1647
|
+
"scheme": "expressive",
|
|
1648
|
+
"usage": "Colour and opacity on small things, state layers, and everything leaving: a fade out."
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
"name": "spring-default-effects",
|
|
1652
|
+
"stiffness": 1600,
|
|
1653
|
+
"damping": 1,
|
|
1654
|
+
"scheme": "expressive",
|
|
1655
|
+
"usage": "Content fading in: a new page, a tab's panel, a fold's rows, a reply as it streams, a scrim."
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"name": "spring-slow-effects",
|
|
1659
|
+
"stiffness": 800,
|
|
1660
|
+
"damping": 1,
|
|
1661
|
+
"scheme": "expressive",
|
|
1662
|
+
"usage": "A slow colour change: the tint on a row that just arrived, fading out."
|
|
1663
|
+
}
|
|
1664
|
+
]
|
|
1665
|
+
},
|
|
1619
1666
|
"meta": {
|
|
1620
1667
|
"source": "AlisX design system",
|
|
1621
1668
|
"layers": "palette (literal values, register palette) -> product roles (Material Design 3 role names, kebab-case; register product; a value per theme in values) and narrative roles (alisx.com only, register narrative, one value). Framework-neutral: map the roles into any theme."
|