@alis-build/design-system 0.14.0 → 0.15.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/README.md +7 -1
- package/alisx.css +212 -61
- package/components/AlisMark.md +1 -1
- package/components/AppComposer.md +1 -1
- package/components/AppDialog.md +1 -1
- package/components/AppFilePane.md +2 -2
- package/components/AppMenu.md +2 -2
- package/components/AppTooltip.md +1 -1
- package/package.json +5 -1
- package/rules/README.md +2 -1
- package/rules/anti-patterns.md +4 -1
- package/rules/chips-alerts.md +2 -2
- package/rules/colour.md +25 -7
- package/rules/known-gaps.md +0 -1
- package/rules/spacing.md +3 -2
- package/rules/styling.md +6 -4
- package/rules/surfaces.md +8 -2
- package/rules/themes.md +115 -0
- package/themes.json +144 -0
- package/tokens.css +309 -0
- package/tokens.json +620 -12
package/README.md
CHANGED
|
@@ -9,10 +9,12 @@ product screens in any framework: Svelte, Vue, or plain HTML.
|
|
|
9
9
|
| Path | What it is |
|
|
10
10
|
| --- | --- |
|
|
11
11
|
| `alisx.css` | Every token as a custom property, the type classes (`.text-*`), the product base (resets `*` and `body`) and the `.app-*` component classes. |
|
|
12
|
+
| `tokens.css` | Every token as a custom property, light and dark, and nothing else: for an app with its own component library. |
|
|
13
|
+
| `themes.json` | Every product role resolved to a literal, per theme (`light`, `dark`): for code that needs values, such as a component library's theme or a diagram renderer. |
|
|
12
14
|
| `fonts.css` | Loads Nunito Sans and Material Symbols Outlined from Google Fonts. For prototypes; self-host the fonts in production. |
|
|
13
15
|
| `components/` | One guide per component: the markup to write, the behaviour you supply, its classes. `components/README.md` has a finished screen skeleton. |
|
|
14
16
|
| `rules/` | What to build and why: one file per decision, plus a quick start and the known gaps. |
|
|
15
|
-
| `tokens.json` | The
|
|
17
|
+
| `tokens.json` | The source of every value: each colour tagged palette, product or narrative, each product role with a value per theme. References such as `{cyan-600}` are left in; read `tokens.css` or `themes.json` rather than resolving them. For code written before themes, each product role also keeps a `value` (its light one), and each shadow its light literal as `value` beside `values` per theme. |
|
|
16
18
|
| `marks.json` | The capability marks (`alis_*`): construction, stroke grade by size, geometry, in canonical order. |
|
|
17
19
|
| `assets/Brand/` | The Alis mark, product lockups, app icon and favicon. |
|
|
18
20
|
|
|
@@ -26,6 +28,10 @@ import '@alis-build/design-system/alisx.css'
|
|
|
26
28
|
import tokens from '@alis-build/design-system/tokens.json' with { type: 'json' }
|
|
27
29
|
```
|
|
28
30
|
|
|
31
|
+
**Light and dark.** A page is light unless it asks: set `data-theme="dark"`, or
|
|
32
|
+
`"system"` to follow the operating system, on `<html>` or on any element
|
|
33
|
+
([rules/themes.md](rules/themes.md)). Choosing the theme is your app's job.
|
|
34
|
+
|
|
29
35
|
The package root has no JavaScript entry: import the files above by path.
|
|
30
36
|
Pin an exact version from a CDN with
|
|
31
37
|
`https://cdn.jsdelivr.net/npm/@alis-build/design-system@<version>/alisx.css`.
|
package/alisx.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* alisx.css · @alis-build/design-system. GENERATED from tokens.json and source/css
|
|
2
|
-
Contents: tokens as custom properties · type classes · product base (resets * and body) · .app-* product components.
|
|
1
|
+
/* alisx.css · @alis-build/design-system. GENERATED from tokens.json and source/css/; do not edit by hand.
|
|
2
|
+
Contents: tokens as custom properties, light and dark (rules/themes.md) · type classes · product base (resets * and body) · .app-* product components.
|
|
3
3
|
Fonts are not loaded here: add fonts.css, or self-host Nunito Sans and Material Symbols Outlined. */
|
|
4
4
|
|
|
5
5
|
:root {
|
|
@@ -37,56 +37,70 @@
|
|
|
37
37
|
--alis-red: #f02222;
|
|
38
38
|
--red-700: #ba1a1a;
|
|
39
39
|
--green-700: #1e6b3a;
|
|
40
|
-
--primary: var(--cyan-600);
|
|
41
|
-
--on-primary: var(--paper-0);
|
|
40
|
+
--primary: light-dark(var(--cyan-600), var(--cyan-200));
|
|
41
|
+
--on-primary: light-dark(var(--paper-0), #00303f);
|
|
42
42
|
--signal: var(--alis-red);
|
|
43
|
-
--on-surface: var(--petrol-800);
|
|
44
|
-
--on-surface-variant: var(--petrol-500);
|
|
45
|
-
--background: var(--paper-50);
|
|
46
|
-
--surface: var(--paper-0);
|
|
47
|
-
--surface-container-low: var(--paper-150);
|
|
48
|
-
--surface-container-
|
|
49
|
-
--surface-
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--
|
|
60
|
-
--
|
|
61
|
-
--
|
|
43
|
+
--on-surface: light-dark(var(--petrol-800), var(--mist-100));
|
|
44
|
+
--on-surface-variant: light-dark(var(--petrol-500), #9aa6ae);
|
|
45
|
+
--background: light-dark(var(--paper-50), #192127);
|
|
46
|
+
--surface: light-dark(var(--paper-0), #26313a);
|
|
47
|
+
--surface-container-low: light-dark(var(--paper-150), #21292f);
|
|
48
|
+
--surface-container-high: light-dark(var(--paper-0), #29343c);
|
|
49
|
+
--surface-container-highest: light-dark(var(--grey-200), #2f3b45);
|
|
50
|
+
--surface-variant: light-dark(var(--grey-200), #2f3b45);
|
|
51
|
+
--shimmer: light-dark(var(--paper-0), #3d4a55);
|
|
52
|
+
--secondary-container: light-dark(var(--grey-300), #34434e);
|
|
53
|
+
--on-secondary-container: light-dark(var(--petrol-800), var(--mist-100));
|
|
54
|
+
--selection-chrome: light-dark(var(--grey-250), #2a363f);
|
|
55
|
+
--outline: light-dark(var(--grey-600), #77838c);
|
|
56
|
+
--outline-variant: light-dark(var(--grey-200), #34414a);
|
|
57
|
+
--error: light-dark(var(--red-700), #ffb4ab);
|
|
58
|
+
--on-error: light-dark(var(--paper-0), #690005);
|
|
59
|
+
--warning: light-dark(var(--amber-700), #e9b443);
|
|
60
|
+
--success: light-dark(var(--green-700), #7ccf95);
|
|
61
|
+
--info: light-dark(var(--blue-600), #a9c1ff);
|
|
62
|
+
--inverse-surface: light-dark(var(--petrol-800), var(--mist-100));
|
|
63
|
+
--on-inverse-surface: light-dark(var(--paper-100), var(--petrol-800));
|
|
64
|
+
--machine-surface: light-dark(var(--petrol-800), #0f1418);
|
|
65
|
+
--on-machine-surface: light-dark(var(--paper-100), var(--mist-100));
|
|
66
|
+
--paper: var(--paper-0);
|
|
62
67
|
--scrim: #000000;
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
68
|
+
--shadow-key: light-dark(rgba(16, 24, 40, 0.16), rgba(0, 0, 0, 0.4));
|
|
69
|
+
--shadow-ambient: light-dark(rgba(16, 24, 40, 0.2), rgba(0, 0, 0, 0.45));
|
|
70
|
+
--highlight: light-dark(#fdecc8, #5b4614);
|
|
71
|
+
--on-highlight: light-dark(var(--petrol-800), #fdecc8);
|
|
72
|
+
--cat1: light-dark(#7860c4, #846cd1);
|
|
66
73
|
--cat2: #19a289;
|
|
67
74
|
--cat3: #c97409;
|
|
68
75
|
--cat4: #0398cd;
|
|
69
|
-
--cat5: #b3487e;
|
|
76
|
+
--cat5: light-dark(#b3487e, #c1548a);
|
|
70
77
|
--cat6: #728d02;
|
|
71
78
|
--on-cat: var(--paper-0);
|
|
72
|
-
--cat1-container: #ede9ff;
|
|
73
|
-
--cat2-container: #d2f6ec;
|
|
74
|
-
--cat3-container: #ffe8d2;
|
|
75
|
-
--cat4-container: #d3f2ff;
|
|
76
|
-
--cat5-container: #ffe2f0;
|
|
77
|
-
--cat6-container: #e8f2d4;
|
|
78
|
-
--on-cat1-container: #443672;
|
|
79
|
-
--on-cat2-container: #004f41;
|
|
80
|
-
--on-cat3-container: #653400;
|
|
81
|
-
--on-cat4-container: #00496a;
|
|
82
|
-
--on-cat5-container: #682848;
|
|
83
|
-
--on-cat6-container: #3a4a00;
|
|
79
|
+
--cat1-container: light-dark(#ede9ff, #2f2752);
|
|
80
|
+
--cat2-container: light-dark(#d2f6ec, #0f3a31);
|
|
81
|
+
--cat3-container: light-dark(#ffe8d2, #43280a);
|
|
82
|
+
--cat4-container: light-dark(#d3f2ff, #0b3446);
|
|
83
|
+
--cat5-container: light-dark(#ffe2f0, #45192f);
|
|
84
|
+
--cat6-container: light-dark(#e8f2d4, #2a3405);
|
|
85
|
+
--on-cat1-container: light-dark(#443672, #ddd5ff);
|
|
86
|
+
--on-cat2-container: light-dark(#004f41, #b5efdc);
|
|
87
|
+
--on-cat3-container: light-dark(#653400, #ffd9b3);
|
|
88
|
+
--on-cat4-container: light-dark(#00496a, #c2ecff);
|
|
89
|
+
--on-cat5-container: light-dark(#682848, #ffd1e6);
|
|
90
|
+
--on-cat6-container: light-dark(#3a4a00, #d6ea9f);
|
|
84
91
|
--chart-neutral: #8c8e8e;
|
|
92
|
+
--syntax-plain: light-dark(var(--petrol-800), var(--mist-100));
|
|
93
|
+
--syntax-comment: light-dark(var(--petrol-500), #9aa6ae);
|
|
94
|
+
--syntax-keyword: light-dark(#5f45a6, #cdb7ff);
|
|
95
|
+
--syntax-string: light-dark(#006f58, #6de3c8);
|
|
96
|
+
--syntax-number: light-dark(#914100, #ffb35e);
|
|
97
|
+
--syntax-function: light-dark(#952c64, #ff9fd5);
|
|
85
98
|
--ai-you: #0398cd;
|
|
86
|
-
--ai-you-container: #d3f2ff;
|
|
99
|
+
--ai-you-container: light-dark(#d3f2ff, #9fdcf0);
|
|
87
100
|
--ai-alis: var(--signal);
|
|
88
|
-
--ai-alis-container: #ffece9;
|
|
101
|
+
--ai-alis-container: light-dark(#ffece9, #f0a39b);
|
|
89
102
|
--ai-tail: #19a289;
|
|
103
|
+
--ai-ground-start: var(--cyan-600);
|
|
90
104
|
--ai-ground-end: #004f41;
|
|
91
105
|
--narrative-canvas: var(--paper-25);
|
|
92
106
|
--narrative-surface-sunken: var(--paper-75);
|
|
@@ -110,7 +124,10 @@
|
|
|
110
124
|
--term-prompt: var(--teal-200);
|
|
111
125
|
--term-reply: #ffc107;
|
|
112
126
|
--term-ok: #4caf50;
|
|
113
|
-
--field-grid-line: rgba(39, 50, 58, 0.06);
|
|
127
|
+
--field-grid-line: light-dark(rgba(39, 50, 58, 0.06), rgba(127, 212, 232, 0.055));
|
|
128
|
+
--field-glow-1: light-dark(rgba(0, 99, 131, 0.12), rgba(127, 212, 232, 0.1));
|
|
129
|
+
--field-glow-2: light-dark(rgba(88, 66, 135, 0.1), rgba(195, 178, 247, 0.08));
|
|
130
|
+
--field-noise: light-dark(var(--petrol-800), var(--paper-0));
|
|
114
131
|
--bench-grid-line: rgba(127, 212, 232, 0.055);
|
|
115
132
|
--space-4: 4px;
|
|
116
133
|
--space-8: 8px;
|
|
@@ -140,9 +157,9 @@
|
|
|
140
157
|
--radius-lg: 16px;
|
|
141
158
|
--radius-xl: 28px;
|
|
142
159
|
--radius-pill: 999px;
|
|
143
|
-
--elevation-1: 0 1px 2px 0
|
|
144
|
-
--elevation-2: 0 1px 2px 0
|
|
145
|
-
--elevation-3: 0 1px 3px 0
|
|
160
|
+
--elevation-1: 0 1px 2px 0 var(--shadow-key), 0 2px 6px 0 var(--shadow-ambient);
|
|
161
|
+
--elevation-2: 0 1px 2px 0 var(--shadow-key), 0 4px 12px 0 var(--shadow-ambient);
|
|
162
|
+
--elevation-3: 0 1px 3px 0 var(--shadow-key), 0 12px 32px -4px var(--shadow-ambient);
|
|
146
163
|
--dur-spatial: 220ms;
|
|
147
164
|
--dur-effects: 160ms;
|
|
148
165
|
--dur-tint: 140ms;
|
|
@@ -164,6 +181,133 @@
|
|
|
164
181
|
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
|
|
165
182
|
}
|
|
166
183
|
|
|
184
|
+
/* Themes: light unless asked. data-theme works on any element (rules/themes.md). */
|
|
185
|
+
[data-theme="light"] { color-scheme: light; }
|
|
186
|
+
[data-theme="dark"] { color-scheme: dark; }
|
|
187
|
+
[data-theme="system"] { color-scheme: light dark; }
|
|
188
|
+
@media print { :root, [data-theme], .app-machine *, .app-ai-ground * { color-scheme: light !important; } }
|
|
189
|
+
/* A browser without light-dark() gets the light theme, never unset colours, and machine speech stays dark. */
|
|
190
|
+
@supports not (color: light-dark(#000, #fff)) {
|
|
191
|
+
:root {
|
|
192
|
+
--primary: var(--cyan-600);
|
|
193
|
+
--on-primary: var(--paper-0);
|
|
194
|
+
--on-surface: var(--petrol-800);
|
|
195
|
+
--on-surface-variant: var(--petrol-500);
|
|
196
|
+
--background: var(--paper-50);
|
|
197
|
+
--surface: var(--paper-0);
|
|
198
|
+
--surface-container-low: var(--paper-150);
|
|
199
|
+
--surface-container-high: var(--paper-0);
|
|
200
|
+
--surface-container-highest: var(--grey-200);
|
|
201
|
+
--surface-variant: var(--grey-200);
|
|
202
|
+
--shimmer: var(--paper-0);
|
|
203
|
+
--secondary-container: var(--grey-300);
|
|
204
|
+
--on-secondary-container: var(--petrol-800);
|
|
205
|
+
--selection-chrome: var(--grey-250);
|
|
206
|
+
--outline: var(--grey-600);
|
|
207
|
+
--outline-variant: var(--grey-200);
|
|
208
|
+
--error: var(--red-700);
|
|
209
|
+
--on-error: var(--paper-0);
|
|
210
|
+
--warning: var(--amber-700);
|
|
211
|
+
--success: var(--green-700);
|
|
212
|
+
--info: var(--blue-600);
|
|
213
|
+
--inverse-surface: var(--petrol-800);
|
|
214
|
+
--on-inverse-surface: var(--paper-100);
|
|
215
|
+
--machine-surface: var(--petrol-800);
|
|
216
|
+
--on-machine-surface: var(--paper-100);
|
|
217
|
+
--shadow-key: rgba(16, 24, 40, 0.16);
|
|
218
|
+
--shadow-ambient: rgba(16, 24, 40, 0.2);
|
|
219
|
+
--highlight: #fdecc8;
|
|
220
|
+
--on-highlight: var(--petrol-800);
|
|
221
|
+
--cat1: #7860c4;
|
|
222
|
+
--cat5: #b3487e;
|
|
223
|
+
--cat1-container: #ede9ff;
|
|
224
|
+
--cat2-container: #d2f6ec;
|
|
225
|
+
--cat3-container: #ffe8d2;
|
|
226
|
+
--cat4-container: #d3f2ff;
|
|
227
|
+
--cat5-container: #ffe2f0;
|
|
228
|
+
--cat6-container: #e8f2d4;
|
|
229
|
+
--on-cat1-container: #443672;
|
|
230
|
+
--on-cat2-container: #004f41;
|
|
231
|
+
--on-cat3-container: #653400;
|
|
232
|
+
--on-cat4-container: #00496a;
|
|
233
|
+
--on-cat5-container: #682848;
|
|
234
|
+
--on-cat6-container: #3a4a00;
|
|
235
|
+
--syntax-plain: var(--petrol-800);
|
|
236
|
+
--syntax-comment: var(--petrol-500);
|
|
237
|
+
--syntax-keyword: #5f45a6;
|
|
238
|
+
--syntax-string: #006f58;
|
|
239
|
+
--syntax-number: #914100;
|
|
240
|
+
--syntax-function: #952c64;
|
|
241
|
+
--ai-you-container: #d3f2ff;
|
|
242
|
+
--ai-alis-container: #ffece9;
|
|
243
|
+
--field-grid-line: rgba(39, 50, 58, 0.06);
|
|
244
|
+
--field-glow-1: rgba(0, 99, 131, 0.12);
|
|
245
|
+
--field-glow-2: rgba(88, 66, 135, 0.1);
|
|
246
|
+
--field-noise: var(--petrol-800);
|
|
247
|
+
}
|
|
248
|
+
.app-machine *, .app-ai-ground * {
|
|
249
|
+
--primary: var(--cyan-200);
|
|
250
|
+
--on-primary: #00303f;
|
|
251
|
+
--on-surface: var(--mist-100);
|
|
252
|
+
--on-surface-variant: #9aa6ae;
|
|
253
|
+
--background: #192127;
|
|
254
|
+
--surface: #26313a;
|
|
255
|
+
--surface-container-low: #21292f;
|
|
256
|
+
--surface-container-high: #29343c;
|
|
257
|
+
--surface-container-highest: #2f3b45;
|
|
258
|
+
--surface-variant: #2f3b45;
|
|
259
|
+
--shimmer: #3d4a55;
|
|
260
|
+
--secondary-container: #34434e;
|
|
261
|
+
--on-secondary-container: var(--mist-100);
|
|
262
|
+
--selection-chrome: #2a363f;
|
|
263
|
+
--outline: #77838c;
|
|
264
|
+
--outline-variant: #34414a;
|
|
265
|
+
--error: #ffb4ab;
|
|
266
|
+
--on-error: #690005;
|
|
267
|
+
--warning: #e9b443;
|
|
268
|
+
--success: #7ccf95;
|
|
269
|
+
--info: #a9c1ff;
|
|
270
|
+
--inverse-surface: var(--mist-100);
|
|
271
|
+
--on-inverse-surface: var(--petrol-800);
|
|
272
|
+
--machine-surface: #0f1418;
|
|
273
|
+
--on-machine-surface: var(--mist-100);
|
|
274
|
+
--shadow-key: rgba(0, 0, 0, 0.4);
|
|
275
|
+
--shadow-ambient: rgba(0, 0, 0, 0.45);
|
|
276
|
+
--highlight: #5b4614;
|
|
277
|
+
--on-highlight: #fdecc8;
|
|
278
|
+
--cat1: #846cd1;
|
|
279
|
+
--cat5: #c1548a;
|
|
280
|
+
--cat1-container: #2f2752;
|
|
281
|
+
--cat2-container: #0f3a31;
|
|
282
|
+
--cat3-container: #43280a;
|
|
283
|
+
--cat4-container: #0b3446;
|
|
284
|
+
--cat5-container: #45192f;
|
|
285
|
+
--cat6-container: #2a3405;
|
|
286
|
+
--on-cat1-container: #ddd5ff;
|
|
287
|
+
--on-cat2-container: #b5efdc;
|
|
288
|
+
--on-cat3-container: #ffd9b3;
|
|
289
|
+
--on-cat4-container: #c2ecff;
|
|
290
|
+
--on-cat5-container: #ffd1e6;
|
|
291
|
+
--on-cat6-container: #d6ea9f;
|
|
292
|
+
--syntax-plain: var(--mist-100);
|
|
293
|
+
--syntax-comment: #9aa6ae;
|
|
294
|
+
--syntax-keyword: #cdb7ff;
|
|
295
|
+
--syntax-string: #6de3c8;
|
|
296
|
+
--syntax-number: #ffb35e;
|
|
297
|
+
--syntax-function: #ff9fd5;
|
|
298
|
+
--ai-you-container: #9fdcf0;
|
|
299
|
+
--ai-alis-container: #f0a39b;
|
|
300
|
+
--field-grid-line: rgba(127, 212, 232, 0.055);
|
|
301
|
+
--field-glow-1: rgba(127, 212, 232, 0.1);
|
|
302
|
+
--field-glow-2: rgba(195, 178, 247, 0.08);
|
|
303
|
+
--field-noise: var(--paper-0);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Rules on the tokens themselves, shipped in alisx.css and tokens.css alike. */
|
|
308
|
+
@media (pointer: coarse) { :root { --touch-target: var(--touch-target-coarse); --control-height: var(--touch-target-coarse); } }
|
|
309
|
+
@media (prefers-reduced-motion: reduce) { :root { --dur-spatial: 0ms; --dur-effects: 0ms; --dur-tint: 0ms; --dur-ui: 0ms; --dur-panel: 0ms; --dur-arrive: 0ms; --stagger: 0ms; } }
|
|
310
|
+
|
|
167
311
|
/* Type styles: one class per job (rules/type.md). */
|
|
168
312
|
.text-welcome-title { font-family: var(--font-sans); font-size: 40px; line-height: 48px; font-weight: 800; letter-spacing: -0.03em; }
|
|
169
313
|
.text-page-title { font-family: var(--font-sans); font-size: 28px; line-height: 36px; font-weight: 700; letter-spacing: -0.03em; }
|
|
@@ -190,25 +334,25 @@
|
|
|
190
334
|
*, *::before, *::after { box-sizing: border-box; }
|
|
191
335
|
body { margin: 0; background: var(--background); color: var(--on-surface); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
|
|
192
336
|
button, input, textarea, select { font: inherit; }
|
|
193
|
-
|
|
194
|
-
|
|
337
|
+
/* A section that asks for a theme paints its own ground and ink, so it is right all the way down (rules/themes.md) */
|
|
338
|
+
[data-theme]:not(:root) { background-color: var(--background); color: var(--on-surface); }
|
|
195
339
|
|
|
196
340
|
/* Drafting field: the one marketing texture permitted in the product (entry screens and pane-filling empty states). */
|
|
197
341
|
:root {
|
|
198
342
|
--rc-noise: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
|
|
199
343
|
--noise-opacity: 0.025;
|
|
200
|
-
--noise-opacity-dark: 0.03;
|
|
201
344
|
--field-grid-size: 72px;
|
|
202
345
|
--field-grid: linear-gradient(var(--field-grid-line) 1px, transparent 1px),
|
|
203
346
|
linear-gradient(90deg, var(--field-grid-line) 1px, transparent 1px);
|
|
204
|
-
--field-glow: radial-gradient(52rem 26rem at 18% 118%,
|
|
205
|
-
radial-gradient(46rem 24rem at 82% 122%,
|
|
206
|
-
--field-mask: radial-gradient(closest-side at 50% 30%, rgba(0, 0, 0, 0.9), transparent 80%);
|
|
347
|
+
--field-glow: radial-gradient(52rem 26rem at 18% 118%, var(--field-glow-1), transparent 62%),
|
|
348
|
+
radial-gradient(46rem 24rem at 82% 122%, var(--field-glow-2), transparent 60%);
|
|
349
|
+
--field-mask: radial-gradient(closest-side at 50% 30%, rgba(0, 0, 0, 0.9), transparent 80%); /* any-theme: a mask reads alpha only */
|
|
207
350
|
}
|
|
208
351
|
.ax-field{position:absolute;inset:0;pointer-events:none;z-index:0}
|
|
209
352
|
.ax-field__glow{position:absolute;inset:0;background:var(--field-glow)}
|
|
210
353
|
.ax-field__grid{position:absolute;inset:0;background-image:var(--field-grid);background-size:var(--field-grid-size) var(--field-grid-size);-webkit-mask-image:var(--field-mask);mask-image:var(--field-mask)}
|
|
211
|
-
|
|
354
|
+
/* The grain is drawn in field-noise through the noise as a mask, so it darkens a light ground and lightens a dark one */
|
|
355
|
+
.ax-field__noise{position:absolute;inset:0;background:var(--field-noise);-webkit-mask-image:var(--rc-noise);mask-image:var(--rc-noise);opacity:var(--noise-opacity)}
|
|
212
356
|
|
|
213
357
|
/* ══ Product register · .app-* ═════════════════════════════════════════
|
|
214
358
|
Framework-neutral classes for working screens (Ideate, Build, Admin).
|
|
@@ -321,7 +465,7 @@ button, input, textarea, select { font: inherit; }
|
|
|
321
465
|
/* A shadow means above the page: on the drafting field a card is protected by elevation, not an edge */
|
|
322
466
|
.app-empty-field .app-card--instrument,:has(>.ax-field)>* .app-card--instrument{border-color:transparent;box-shadow:var(--elevation-2)}
|
|
323
467
|
/* A card or row being dragged lifts until it settles */
|
|
324
|
-
.app-card.is-dragged,.app-row.is-dragged{border-color:transparent;background:var(--surface);box-shadow:var(--elevation-3);cursor:grabbing}
|
|
468
|
+
.app-card.is-dragged,.app-row.is-dragged{border-color:transparent;background:var(--surface-container-high);box-shadow:var(--elevation-3);cursor:grabbing}
|
|
325
469
|
.app-card--instrument .app-card__inset{padding:var(--space-16);border-radius:var(--radius-md);background:var(--surface-container-low)}
|
|
326
470
|
button.app-card{border:0;font:inherit;width:100%}
|
|
327
471
|
.app-card__title{margin:0}
|
|
@@ -330,7 +474,12 @@ button.app-card{border:0;font:inherit;width:100%}
|
|
|
330
474
|
.app-statement-over-gradient{background:color-mix(in srgb,var(--on-surface) calc(var(--state-statement) * 100%),transparent)}
|
|
331
475
|
/* The AI identity: a drawing, from its own tokens, never a category */
|
|
332
476
|
.app-ai-text{background:linear-gradient(135deg,var(--signal),var(--primary) 30%,var(--ai-tail));-webkit-background-clip:text;background-clip:text;color:transparent}
|
|
333
|
-
.app-ai-ground{background:linear-gradient(135deg,var(--
|
|
477
|
+
.app-ai-ground{background:linear-gradient(135deg,var(--ai-ground-start),var(--ai-ground-end));color:var(--on-machine-surface);--shiki-background:transparent;--shiki-foreground:var(--on-machine-surface);scrollbar-color:color-mix(in srgb,var(--on-machine-surface) 40%,transparent) transparent}
|
|
478
|
+
/* Machine speech: a code block on the machine ground, a terminal. Dark in both themes, and everything inside takes its dark values */
|
|
479
|
+
/* On Shiki's own <pre> too: its inline background and foreground read these */
|
|
480
|
+
.app-machine{background:var(--machine-surface);color:var(--on-machine-surface);--shiki-background:var(--machine-surface);--shiki-foreground:var(--on-machine-surface);scrollbar-color:color-mix(in srgb,var(--on-machine-surface) 40%,transparent) transparent}
|
|
481
|
+
.app-machine *,.app-ai-ground *{color-scheme:dark}
|
|
482
|
+
@media print{.app-machine,.app-ai-ground{background:none;color:var(--on-surface)}}
|
|
334
483
|
|
|
335
484
|
/* ── Selection tile · a card chosen among others ── */
|
|
336
485
|
.app-tile{display:grid;grid-template-columns:1fr auto;align-items:start;gap:var(--space-4) var(--space-12);padding:var(--space-24);border:0;border-radius:var(--radius-lg);background:var(--surface-container-low);color:var(--on-surface);text-align:left;font:inherit}
|
|
@@ -432,7 +581,7 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
432
581
|
/* ── Dialog · white at level 3, text actions, affirmative last ── */
|
|
433
582
|
.app-scrim{position:fixed;inset:0;z-index:3;display:grid;place-items:center;padding:var(--space-24);background:color-mix(in srgb,var(--scrim) 32%,transparent)}
|
|
434
583
|
.app-scrim--inline{position:static;inset:auto}
|
|
435
|
-
.app-dialog{display:flex;flex-direction:column;gap:var(--space-16);width:min(560px,100%);padding:var(--space-24);border-radius:var(--radius-lg);background:var(--surface);color:var(--on-surface);box-shadow:var(--elevation-3)}
|
|
584
|
+
.app-dialog{display:flex;flex-direction:column;gap:var(--space-16);width:min(560px,100%);padding:var(--space-24);border-radius:var(--radius-lg);background:var(--surface-container-high);color:var(--on-surface);box-shadow:var(--elevation-3)}
|
|
436
585
|
@media (min-width:600px){.app-dialog{padding:var(--card-padding-wide)}}
|
|
437
586
|
.app-dialog__title{margin:0}
|
|
438
587
|
.app-dialog:focus{outline:none}
|
|
@@ -448,7 +597,7 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
448
597
|
.app-skel__row--plain .app-skel__dot{display:none}
|
|
449
598
|
.app-skel__dot{width:24px;height:24px;border-radius:var(--radius-pill);background:var(--surface-container-highest);flex:none}
|
|
450
599
|
.app-skel__lines{display:flex;flex-direction:column;gap:var(--space-8);flex:1}
|
|
451
|
-
@media (prefers-reduced-motion:no-preference){.app-skel__bar::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--
|
|
600
|
+
@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 var(--motion-effects) infinite}}
|
|
452
601
|
@keyframes app-shimmer{to{transform:translateX(100%)}}
|
|
453
602
|
|
|
454
603
|
/* ── Loader · the Alis mark, in signal ── */
|
|
@@ -481,7 +630,7 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
481
630
|
.app-shell__detail{display:flex;flex-direction:column;gap:var(--space-24);padding:var(--space-16) var(--space-24);border-left:1px solid var(--outline-variant);min-width:0}
|
|
482
631
|
.app-shell__detail{overflow:auto}
|
|
483
632
|
/* breakpoint-medium (840): the detail pane slides over the content */
|
|
484
|
-
@media (max-width:839px){.app-shell--detail{grid-template-columns:var(--nav-width) minmax(0,1fr)}.app-shell__detail{position:fixed;top:0;right:0;bottom:0;width:min(var(--detail-width),100%);background:var(--surface);box-shadow:var(--elevation-3),0 0 0 100vmax color-mix(in srgb,var(--scrim) 32%,transparent);border-left:0;z-index:2}}
|
|
633
|
+
@media (max-width:839px){.app-shell--detail{grid-template-columns:var(--nav-width) minmax(0,1fr)}.app-shell__detail{position:fixed;top:0;right:0;bottom:0;width:min(var(--detail-width),100%);background:var(--surface-container-high);box-shadow:var(--elevation-3),0 0 0 100vmax color-mix(in srgb,var(--scrim) 32%,transparent);border-left:0;z-index:2}}
|
|
485
634
|
/* breakpoint-compact (600): the navigation pane collapses to a column of icons */
|
|
486
635
|
/* Compact window: the navigation pane fills the screen, the same pane opened by the title bar's menu button
|
|
487
636
|
(app-shell--nav-open) on the ground: nothing shows behind it, so no scrim and no elevation. Its close sits in its head */
|
|
@@ -512,12 +661,12 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
512
661
|
.app-file-pane__tools>.app-seg{margin-right:var(--space-8)}
|
|
513
662
|
.app-file-pane__body{flex:1;min-height:0;overflow:auto;position:relative}
|
|
514
663
|
/* A page sets its own colours: its frame is white in every theme */
|
|
515
|
-
.app-file-pane__frame{display:block;width:100%;height:100%;border:0;background:var(--paper
|
|
664
|
+
.app-file-pane__frame{display:block;width:100%;height:100%;border:0;background:var(--paper)}
|
|
516
665
|
.app-file-pane__body--prose{padding:var(--space-32) var(--space-24)}
|
|
517
666
|
.app-file-pane__body--prose>.prose{max-width:var(--measure-prose);margin:0 auto}
|
|
518
667
|
.app-file-pane__body--image{display:flex;align-items:center;justify-content:center;padding:var(--space-24)}
|
|
519
668
|
.app-file-pane__body--image>img{display:block;max-width:100%;max-height:100%;object-fit:contain}
|
|
520
|
-
.app-file-pane__body--paper{background:var(--paper
|
|
669
|
+
.app-file-pane__body--paper{background:var(--paper)}
|
|
521
670
|
.app-file-pane__body--source{background:var(--surface-container-low)}
|
|
522
671
|
.app-file-pane__source{margin:0;padding:var(--space-16) 0;font-family:var(--font-mono);font-size:13px;line-height:20px;color:var(--on-surface);white-space:pre;counter-reset:app-ln}
|
|
523
672
|
.app-file-pane__source>span{display:block;padding-right:var(--space-24)}
|
|
@@ -644,6 +793,8 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
644
793
|
:not(pre)>code{padding:0 var(--space-4);border-radius:var(--radius-xs);background:var(--surface-container-highest);font-family:var(--font-mono)}
|
|
645
794
|
.prose code{font-size:var(--prose-code-size,14px)}
|
|
646
795
|
.prose pre{margin:0 0 var(--prose-gap,24px);padding:var(--space-12) var(--space-16);border-radius:var(--radius-md);background:var(--surface-container-highest);overflow-x:auto;font-family:var(--font-mono)}
|
|
796
|
+
/* Syntax colours: Shiki's css-variables theme reads these, so code is highlighted once and follows the theme it sits in */
|
|
797
|
+
:where(:root){--shiki-foreground:var(--syntax-plain);--shiki-background:transparent;--shiki-token-keyword:var(--syntax-keyword);--shiki-token-string:var(--syntax-string);--shiki-token-string-expression:var(--syntax-string);--shiki-token-constant:var(--syntax-number);--shiki-token-function:var(--syntax-function);--shiki-token-comment:var(--syntax-comment);--shiki-token-parameter:var(--syntax-plain);--shiki-token-punctuation:var(--syntax-plain);--shiki-token-link:var(--syntax-string)}
|
|
647
798
|
.prose table{width:100%;border-collapse:collapse;margin:0 0 var(--prose-gap,24px)}
|
|
648
799
|
.prose :is(th,td){padding:var(--space-8) var(--space-12);border-bottom:1px solid var(--outline-variant);text-align:start;vertical-align:top;font-size:14px;line-height:20px}
|
|
649
800
|
.prose th{font-weight:500}
|
|
@@ -657,7 +808,7 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
657
808
|
|
|
658
809
|
/* ── Composer · where you write to Alis, an agent or a person: tray, editor, row; one line below ── */
|
|
659
810
|
.app-composer{position:relative;display:flex;flex-direction:column;gap:var(--space-8);width:100%;max-width:var(--measure-prose);margin-inline:auto}
|
|
660
|
-
.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);box-shadow:var(--elevation-2);transition:background-color var(--dur-effects) var(--motion-effects),box-shadow var(--dur-effects) var(--motion-effects)}
|
|
811
|
+
.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(--dur-effects) var(--motion-effects),box-shadow var(--dur-effects) var(--motion-effects)}
|
|
661
812
|
.app-composer__tray{display:flex;flex-wrap:wrap;gap:var(--space-8);padding:var(--space-4) var(--space-4) 0}
|
|
662
813
|
.app-composer__editor{min-height:24px;max-height:208px;overflow-y:auto;padding:var(--space-12) var(--space-12) var(--space-4);color:var(--on-surface);font-family:var(--font-sans);font-size:16px;line-height:24px;font-weight:400;overflow-wrap:anywhere}
|
|
663
814
|
.app-composer__input{display:block;width:100%;margin:0;padding:0;border:0;outline:0;resize:none;background:transparent;color:inherit;font:inherit}
|
|
@@ -849,7 +1000,7 @@ button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor
|
|
|
849
1000
|
|
|
850
1001
|
/* ── Menu ── */
|
|
851
1002
|
/* One surface, two behaviours: an action menu (role=menu, focus moves in) and a suggestion menu (role=listbox, focus stays in the editor) */
|
|
852
|
-
.app-menu{display:flex;flex-direction:column;min-width:200px;max-width:320px;max-height:min(400px,60vh);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:var(--space-8);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--elevation-2);color:var(--on-surface);list-style:none}
|
|
1003
|
+
.app-menu{display:flex;flex-direction:column;min-width:200px;max-width:320px;max-height:min(400px,60vh);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:var(--space-8);border-radius:var(--radius-lg);background:var(--surface-container-high);box-shadow:var(--elevation-2);color:var(--on-surface);list-style:none}
|
|
853
1004
|
.app-menu[hidden]{display:none}
|
|
854
1005
|
.app-menu__heading{display:block;padding:var(--space-8) var(--space-12) var(--space-4);color:var(--on-surface-variant)}
|
|
855
1006
|
.app-menu__divider{flex:none;height:1px;margin:var(--space-4) calc(var(--space-8) * -1);border:0;background:var(--outline-variant)}
|
package/components/AlisMark.md
CHANGED
|
@@ -4,7 +4,7 @@ The brand mark: eleven circles on a 30 × 50 grid.
|
|
|
4
4
|
|
|
5
5
|
## Use / don't use
|
|
6
6
|
|
|
7
|
-
- Both registers.
|
|
7
|
+
- Both registers. In the product always red (`signal`), on light and dark grounds alike: it doesn't change with the theme ([themes.md](../rules/themes.md)). White only on alisx.com's petrol bands.
|
|
8
8
|
- Never recoloured, never rotated, never boxed.
|
|
9
9
|
- Pair it with the word "Alis" or "AlisX" set in Nunito Sans 800 at -0.03em when a lockup is needed. In the product, the AlisX wordmark asset heads the navigation pane ([AppShell](AppShell.md)'s `.app-brand`), and the mark alone in the collapsed rail.
|
|
10
10
|
- The one product use in another colour is [AppLoader](AppLoader.md), where the mark is drawn in `--signal` and its dots animate.
|
|
@@ -6,7 +6,7 @@ Where you write to Alis, an agent or a person. One floating surface with three b
|
|
|
6
6
|
|
|
7
7
|
- **Every conversation**: Ideate, an interview, an agent session, a specialist thread. One composer per conversation, at the thread's measure (`measure-prose`, 710px), docked to the bottom of the thread or centred on an empty home.
|
|
8
8
|
- **Not a form.** Something you fill in and submit once (feedback, a contribution, a new session's brief) is an [AppTextField](AppTextField.md) with a labelled filled button ([page.md](../rules/page.md) § Forms).
|
|
9
|
-
- The surface is white at `elevation-2` with `radius-xl` (28): concentric with the 40px trailing button set 8 in. It floats; locked, it drops to the ground and the shadow goes.
|
|
9
|
+
- The surface is `surface-container-high` (white in light, a step lighter than a card in dark) at `elevation-2` with `radius-xl` (28): concentric with the 40px trailing button set 8 in. It floats; locked, it drops to the ground and the shadow goes.
|
|
10
10
|
|
|
11
11
|
## Anatomy
|
|
12
12
|
|
package/components/AppDialog.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AppDialog
|
|
2
2
|
|
|
3
|
-
A dialog: white at `elevation-3`, an object-title, a body message, Cancel as text and the affirmative filled.
|
|
3
|
+
A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-title, a body message, Cancel as text and the affirmative filled.
|
|
4
4
|
|
|
5
5
|
## Use / don't use
|
|
6
6
|
|
|
@@ -21,8 +21,8 @@ See [page.md](../rules/page.md) § A file beside the conversation.
|
|
|
21
21
|
|
|
22
22
|
| Kind | Body |
|
|
23
23
|
|---|---|
|
|
24
|
-
| HTML page | A sandboxed frame (`.app-file-pane__frame`) on `paper
|
|
25
|
-
| SVG | Preview: as an image (never inline, so its scripts don't run) on `paper
|
|
24
|
+
| HTML page | A sandboxed frame (`.app-file-pane__frame`) on `paper`, white in every theme: the page sets its own colours, and on a dark ground half of them would vanish. Nothing of AlisX reaches inside |
|
|
25
|
+
| SVG | Preview: as an image (never inline, so its scripts don't run) on `paper` (`--image` with `--paper`) |
|
|
26
26
|
| Markdown | Preview: `.prose` at the prose measure, centred (`--prose`) |
|
|
27
27
|
| Image | Fitted: contained, never cropped, never past its own size (`--image`) |
|
|
28
28
|
| PDF | The browser's own viewer, in a frame. Its controls are the browser's |
|
package/components/AppMenu.md
CHANGED
|
@@ -6,7 +6,7 @@ A list of acts or places that opens from a control or from what you type, and cl
|
|
|
6
6
|
|
|
7
7
|
| Behaviour | Opens from | Where | Focus |
|
|
8
8
|
|---|---|---|---|
|
|
9
|
-
| **Action menu** (`role="menu"`) | A `more_vert` icon button, a button with a trailing chevron, the composer's Add, the account card, a long press on a phone | Floats: white at `elevation-2`, 4 from its trigger | Moves to the first item; Escape returns it to the trigger |
|
|
9
|
+
| **Action menu** (`role="menu"`) | A `more_vert` icon button, a button with a trailing chevron, the composer's Add, the account card, a long press on a phone | Floats: `surface-container-high` (white in light) at `elevation-2`, 4 from its trigger | Moves to the first item; Escape returns it to the trigger |
|
|
10
10
|
| **Suggestion menu** (`role="listbox"`) | Typing `/` or `@` in an editor | In a composer, a band on its surface above the editor (`.app-menu--suggest`), like an [AppAsk](AppAsk.md). In a document, at the caret | Stays in the editor; the active row follows the arrows |
|
|
11
11
|
|
|
12
12
|
- **Not a form.** A field, a checkbox or a type-to-confirm inside a menu is an [AppDialog](AppDialog.md); the item that opens it ends in an ellipsis ("Deploy to production…").
|
|
@@ -18,7 +18,7 @@ A list of acts or places that opens from a control or from what you type, and cl
|
|
|
18
18
|
|
|
19
19
|
| Part | What it is |
|
|
20
20
|
|---|---|
|
|
21
|
-
| **Surface** |
|
|
21
|
+
| **Surface** | `surface-container-high`: white in light, a step lighter than a card in dark ([themes.md](../rules/themes.md)). `elevation-2`, `radius-lg` (16) with 8 inside, so a row's `radius-sm` (8) is concentric. 200 to 320 wide. The one list in the product that is white ([surfaces.md](../rules/surfaces.md)). A suggestion band has no surface of its own: it is the composer's, with a hairline under it, and its rows take the ask's `radius-md` |
|
|
22
22
|
| **Row** | 40 tall (48 under a coarse pointer), the whole row the target. A 20px icon in `on-surface-variant` if any row in the menu has one; the label at 14/20 500, set by the menu, no role |
|
|
23
23
|
| **Second line** | Meta, only when the label can't stand alone: who has access, what a command does, a person's role |
|
|
24
24
|
| **Hint** | Trailing: a shortcut as an [AppKeys](AppKeys.md), or a /name in meta. Or `open_in_new` when the item leaves the app. Never a chevron |
|
package/components/AppTooltip.md
CHANGED
|
@@ -14,7 +14,7 @@ Names a control that shows no words, and carries its keys ([shortcuts.md](../rul
|
|
|
14
14
|
|
|
15
15
|
| Part | What it is |
|
|
16
16
|
|---|---|
|
|
17
|
-
| **Surface** | `inverse-surface`, `radius-sm`, no shadow; 28 tall for one line, at most 240 wide, wrapping after that |
|
|
17
|
+
| **Surface** | `inverse-surface`, Material 3's plain tooltip: the reverse of the UI around it, so it is petrol in light and light in dark. `radius-sm`, no shadow; 28 tall for one line, at most 240 wide, wrapping after that |
|
|
18
18
|
| **Label** | `on-inverse-surface` at 12/16 500, sentence case, no full stop: the action ("Resolve conversation") |
|
|
19
19
|
| **Keys** | An [AppKeys](AppKeys.md) after the label, 8 from it, the tooltip's end padding drawn in to 4 |
|
|
20
20
|
| **Place** | 4 below the control, centred on it; flipped above when there isn't room below, and kept 8 inside the window |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks and rules.",
|
|
5
5
|
"keywords": ["alisx", "design-system", "design-tokens", "css"],
|
|
6
6
|
"homepage": "https://alisx.com",
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
"sideEffects": ["*.css"],
|
|
10
10
|
"exports": {
|
|
11
11
|
"./alisx.css": "./alisx.css",
|
|
12
|
+
"./tokens.css": "./tokens.css",
|
|
12
13
|
"./fonts.css": "./fonts.css",
|
|
13
14
|
"./tokens.json": "./tokens.json",
|
|
15
|
+
"./themes.json": "./themes.json",
|
|
14
16
|
"./marks.json": "./marks.json",
|
|
15
17
|
"./rules/*": "./rules/*",
|
|
16
18
|
"./components/*": "./components/*",
|
|
@@ -19,8 +21,10 @@
|
|
|
19
21
|
},
|
|
20
22
|
"files": [
|
|
21
23
|
"alisx.css",
|
|
24
|
+
"tokens.css",
|
|
22
25
|
"fonts.css",
|
|
23
26
|
"tokens.json",
|
|
27
|
+
"themes.json",
|
|
24
28
|
"marks.json",
|
|
25
29
|
"rules",
|
|
26
30
|
"components",
|
package/rules/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Read only what the job needs.
|
|
|
16
16
|
| --- | --- |
|
|
17
17
|
| [register.md](register.md) | Which register a surface is in, and the voice |
|
|
18
18
|
| [colour.md](colour.md) | Roles, the one action colour, status, categories |
|
|
19
|
+
| [themes.md](themes.md) | Light and dark: asking for a theme, what changes, what doesn't |
|
|
19
20
|
| [type.md](type.md) | Type roles, weights, the shapes text takes |
|
|
20
21
|
| [surfaces.md](surfaces.md) | Ground, statement, instrument, lattice; depth |
|
|
21
22
|
| [spacing.md](spacing.md) | The scale, targets, density |
|
|
@@ -62,7 +63,7 @@ The product has **no product tones**: the navigation pane and the page say which
|
|
|
62
63
|
|
|
63
64
|
## Tokens
|
|
64
65
|
|
|
65
|
-
`alisx.css` carries every token as a custom property and every type style as a class; it is generated from `tokens.json`, the source for every other platform too. Three layers
|
|
66
|
+
`alisx.css` carries every token as a custom property and every type style as a class; it is generated from `tokens.json`, the source for every other platform too. Three layers, each colour token tagged with its `register`: **palette** tokens (`petrol-800`, `paper-50`, `alis-red` …) hold literal values; **product roles** (`primary`, `on-surface`, `surface-container-low` …) are named by job, with a value for each theme, light and dark, so build with these and both themes come free ([themes.md](themes.md)); **narrative roles** belong to alisx.com and never appear in the product. `tokens.css` carries the tokens alone, and `themes.json` every product role resolved per theme; read those rather than resolving `tokens.json` yourself. Set a component library's theme (button weight, state-layer opacities, shape scale) from the tokens once rather than overriding components.
|
|
66
67
|
|
|
67
68
|
## Components
|
|
68
69
|
|
package/rules/anti-patterns.md
CHANGED
|
@@ -55,7 +55,7 @@ Cite by ID in review. Each is a defect that has shipped in an Alis product.
|
|
|
55
55
|
|
|
56
56
|
## Smell test
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Six questions, about a minute. **Run this before handing work back.**
|
|
59
59
|
|
|
60
60
|
1. **Is anything in the page casting a shadow?** Only a menu, the composer,
|
|
61
61
|
a snackbar, a dialog, a dragged item or a card on the drafting field may. A
|
|
@@ -68,6 +68,9 @@ Five questions, about a minute. **Run this before handing work back.**
|
|
|
68
68
|
5. **Look at the component's own styles. Is there any appearance in them?** A
|
|
69
69
|
colour, font, radius, shadow, a forced override (`!important`) or a reach into
|
|
70
70
|
a library's internal classes → C3.
|
|
71
|
+
6. **Have you looked at it in dark?** Set `data-theme="dark"` on the page. Text
|
|
72
|
+
that vanishes, a white box, a shadow doing an edge's job → a colour that isn't
|
|
73
|
+
a role ([themes.md](themes.md)).
|
|
71
74
|
|
|
72
75
|
## The agent failure mode
|
|
73
76
|
|
package/rules/chips-alerts.md
CHANGED
|
@@ -63,8 +63,8 @@ in.
|
|
|
63
63
|
|
|
64
64
|
## Snackbars
|
|
65
65
|
|
|
66
|
-
Level 3 on `surface-variant`, light: the inverse surface belongs to
|
|
67
|
-
speech. One text action at most. When to use one, and for how long, is in
|
|
66
|
+
Level 3 on `surface-variant`, light: the inverse surface belongs to the
|
|
67
|
+
tooltip, and machine speech has its own. One text action at most. When to use one, and for how long, is in
|
|
68
68
|
[AppAlert](../components/AppAlert.md) § AppSnackbar.
|
|
69
69
|
|
|
70
70
|
## States of a thing
|