@alis-build/design-system 0.18.0 → 0.21.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/classes.json ADDED
@@ -0,0 +1,587 @@
1
+ {
2
+ "classes": [
3
+ "app-account",
4
+ "app-account__avatar",
5
+ "app-account__text",
6
+ "app-ai-ground",
7
+ "app-ai-text",
8
+ "app-alert",
9
+ "app-alert--error",
10
+ "app-alert--stacked",
11
+ "app-alert--success",
12
+ "app-alert--warning",
13
+ "app-alert__actions",
14
+ "app-alert__body",
15
+ "app-alert__title",
16
+ "app-ask",
17
+ "app-ask__actions",
18
+ "app-ask__body",
19
+ "app-ask__grants",
20
+ "app-ask__head",
21
+ "app-ask__key",
22
+ "app-ask__line",
23
+ "app-ask__note",
24
+ "app-ask__option",
25
+ "app-ask__option-text",
26
+ "app-ask__options",
27
+ "app-ask__page",
28
+ "app-ask__title",
29
+ "app-attachment",
30
+ "app-attachment--image",
31
+ "app-attachment--message",
32
+ "app-attachment__bar",
33
+ "app-attachment__external",
34
+ "app-attachment__glyph",
35
+ "app-attachment__text",
36
+ "app-avatar",
37
+ "app-avatar--alis",
38
+ "app-avatar--cat1",
39
+ "app-avatar--cat2",
40
+ "app-avatar--cat3",
41
+ "app-avatar--cat4",
42
+ "app-avatar--cat5",
43
+ "app-avatar--cat6",
44
+ "app-avatar--large",
45
+ "app-avatar--logo",
46
+ "app-avatar--small",
47
+ "app-avatar--thing",
48
+ "app-avatar-group",
49
+ "app-avatar-group__more",
50
+ "app-brand",
51
+ "app-brand__wordmark",
52
+ "app-btn",
53
+ "app-btn--error",
54
+ "app-btn--filled",
55
+ "app-btn--outlined",
56
+ "app-btn--quiet",
57
+ "app-btn--small",
58
+ "app-btn-row",
59
+ "app-btn-row--end",
60
+ "app-btn__spinner",
61
+ "app-card",
62
+ "app-card--instrument",
63
+ "app-card--statement",
64
+ "app-card__inset",
65
+ "app-card__title",
66
+ "app-check-group",
67
+ "app-check-row",
68
+ "app-check-row__text",
69
+ "app-checkbox",
70
+ "app-chip",
71
+ "app-chip--cat1",
72
+ "app-chip--cat2",
73
+ "app-chip--cat3",
74
+ "app-chip--cat4",
75
+ "app-chip--cat5",
76
+ "app-chip--cat6",
77
+ "app-chip--error",
78
+ "app-chip--icon",
79
+ "app-chip--info",
80
+ "app-chip--opaque",
81
+ "app-chip--outlined",
82
+ "app-chip--small",
83
+ "app-chip--success",
84
+ "app-chip--warning",
85
+ "app-chip-group",
86
+ "app-chip__close",
87
+ "app-combo",
88
+ "app-combo__input",
89
+ "app-combo__list",
90
+ "app-combo__panel",
91
+ "app-combo__search",
92
+ "app-combo__text",
93
+ "app-combo__trigger",
94
+ "app-combo__value",
95
+ "app-compact-only",
96
+ "app-composer",
97
+ "app-composer__box",
98
+ "app-composer__drop",
99
+ "app-composer__editor",
100
+ "app-composer__go",
101
+ "app-composer__go--plain",
102
+ "app-composer__input",
103
+ "app-composer__interim",
104
+ "app-composer__light",
105
+ "app-composer__line",
106
+ "app-composer__line-action",
107
+ "app-composer__meter",
108
+ "app-composer__rec",
109
+ "app-composer__row",
110
+ "app-composer__spacer",
111
+ "app-composer__status",
112
+ "app-composer__timer",
113
+ "app-composer__tray",
114
+ "app-count",
115
+ "app-dialog",
116
+ "app-dialog__body",
117
+ "app-dialog__title",
118
+ "app-disclosure",
119
+ "app-disclosure-group",
120
+ "app-disclosure__body",
121
+ "app-disclosure__summary",
122
+ "app-disclosure__text",
123
+ "app-empty",
124
+ "app-empty-field",
125
+ "app-empty-line",
126
+ "app-empty__headline",
127
+ "app-empty__line",
128
+ "app-field",
129
+ "app-field__box",
130
+ "app-field__box--select",
131
+ "app-field__input",
132
+ "app-field__label",
133
+ "app-field__row",
134
+ "app-field__select",
135
+ "app-field__support",
136
+ "app-field__values",
137
+ "app-fieldset",
138
+ "app-fieldset__legend",
139
+ "app-fieldset__support",
140
+ "app-file-pane",
141
+ "app-file-pane__bar",
142
+ "app-file-pane__body",
143
+ "app-file-pane__body--image",
144
+ "app-file-pane__body--paper",
145
+ "app-file-pane__body--prose",
146
+ "app-file-pane__body--source",
147
+ "app-file-pane__body--table",
148
+ "app-file-pane__expand",
149
+ "app-file-pane__frame",
150
+ "app-file-pane__line",
151
+ "app-file-pane__name",
152
+ "app-file-pane__source",
153
+ "app-file-pane__state",
154
+ "app-file-pane__tools",
155
+ "app-file-pane__word",
156
+ "app-filterrow",
157
+ "app-filterrow__controls",
158
+ "app-filterrow__search",
159
+ "app-filterrow__summary",
160
+ "app-form",
161
+ "app-icon",
162
+ "app-icon--24",
163
+ "app-icon--filled",
164
+ "app-icon--mark",
165
+ "app-icon-btn",
166
+ "app-icon-btn--small",
167
+ "app-key",
168
+ "app-keys",
169
+ "app-keys--single",
170
+ "app-keys__said",
171
+ "app-keys__then",
172
+ "app-lattice",
173
+ "app-lattice__eyebrow",
174
+ "app-list",
175
+ "app-loader",
176
+ "app-loader--line",
177
+ "app-machine",
178
+ "app-menu",
179
+ "app-menu--suggest",
180
+ "app-menu__avatar",
181
+ "app-menu__divider",
182
+ "app-menu__empty",
183
+ "app-menu__heading",
184
+ "app-menu__hint",
185
+ "app-menu__item",
186
+ "app-menu__item--danger",
187
+ "app-menu__support",
188
+ "app-menu__text",
189
+ "app-nav-heading",
190
+ "app-progress",
191
+ "app-progress__fill",
192
+ "app-progress__head",
193
+ "app-progress__track",
194
+ "app-progress__value",
195
+ "app-qa",
196
+ "app-qa__a",
197
+ "app-qa__pair",
198
+ "app-qa__q",
199
+ "app-radio",
200
+ "app-row",
201
+ "app-row--agent-chat",
202
+ "app-row--divided",
203
+ "app-row--nav",
204
+ "app-row__hit",
205
+ "app-row__icon",
206
+ "app-row__meta",
207
+ "app-row__text",
208
+ "app-row__trailing",
209
+ "app-scrim",
210
+ "app-scrim--inline",
211
+ "app-search",
212
+ "app-search__clear",
213
+ "app-search__input",
214
+ "app-seg",
215
+ "app-seg__item",
216
+ "app-shell",
217
+ "app-shell--detail",
218
+ "app-shell--file",
219
+ "app-shell--file-expanded",
220
+ "app-shell--nav-open",
221
+ "app-shell__content",
222
+ "app-shell__detail",
223
+ "app-shell__main",
224
+ "app-shell__nav",
225
+ "app-shell__nav-close",
226
+ "app-shell__nav-foot",
227
+ "app-shortcuts",
228
+ "app-shortcuts__foot",
229
+ "app-shortcuts__group",
230
+ "app-shortcuts__heading",
231
+ "app-shortcuts__note",
232
+ "app-shortcuts__row",
233
+ "app-skel",
234
+ "app-skel__bar",
235
+ "app-skel__bar--block",
236
+ "app-skel__bar--short",
237
+ "app-skel__bar--title",
238
+ "app-skel__dot",
239
+ "app-skel__lines",
240
+ "app-skel__row",
241
+ "app-skel__row--plain",
242
+ "app-snackbar",
243
+ "app-snackbar--inline",
244
+ "app-snackbar__text",
245
+ "app-state",
246
+ "app-statement-over-gradient",
247
+ "app-step",
248
+ "app-steps",
249
+ "app-switch",
250
+ "app-switch-row",
251
+ "app-switch-row__text",
252
+ "app-tab",
253
+ "app-table",
254
+ "app-table--sticky",
255
+ "app-table-wrap",
256
+ "app-table__primary",
257
+ "app-tabs",
258
+ "app-target",
259
+ "app-target--none",
260
+ "app-thread",
261
+ "app-thread__event",
262
+ "app-thread__status",
263
+ "app-thread__typing",
264
+ "app-tile",
265
+ "app-tile-group",
266
+ "app-tile__check",
267
+ "app-titlebar",
268
+ "app-titlebar--detail",
269
+ "app-titlebar__actions",
270
+ "app-titlebar__label",
271
+ "app-titlebar__lead",
272
+ "app-titlebar__leading",
273
+ "app-titlebar__name",
274
+ "app-titlebar__row",
275
+ "app-titlebar__title",
276
+ "app-token",
277
+ "app-tooltip",
278
+ "app-turn",
279
+ "app-turn--alis",
280
+ "app-turn--them",
281
+ "app-turn--you",
282
+ "app-turn__about",
283
+ "app-turn__avatar",
284
+ "app-turn__avatar--alis",
285
+ "app-turn__bubble",
286
+ "app-turn__bubble--voice",
287
+ "app-turn__caret",
288
+ "app-turn__files",
289
+ "app-turn__foot",
290
+ "app-turn__head",
291
+ "app-turn__image",
292
+ "app-turn__line",
293
+ "app-turn__line-action",
294
+ "app-turn__mark",
295
+ "app-turn__output",
296
+ "app-turn__record",
297
+ "app-turn__request",
298
+ "app-turn__row",
299
+ "app-turn__status",
300
+ "app-turn__step",
301
+ "app-turn__steps",
302
+ "app-turn__tools",
303
+ "app-turn__who",
304
+ "app-turn__worked",
305
+ "app-voice",
306
+ "app-voice-note",
307
+ "app-voice-note__more",
308
+ "app-voice-note__player",
309
+ "app-voice-note__time",
310
+ "app-voice-note__transcript",
311
+ "app-voice-note__wave",
312
+ "app-voice__body",
313
+ "app-voice__caption",
314
+ "app-voice__controls",
315
+ "app-voice__end",
316
+ "app-voice__orb",
317
+ "app-voice__round",
318
+ "app-voice__said",
319
+ "app-voice__title",
320
+ "app-voice__top",
321
+ "app-wide-only",
322
+ "ax-field",
323
+ "ax-field__glow",
324
+ "ax-field__grid",
325
+ "ax-field__noise",
326
+ "drop-target",
327
+ "is-active",
328
+ "is-alis",
329
+ "is-checked",
330
+ "is-current",
331
+ "is-disabled",
332
+ "is-done",
333
+ "is-dragged",
334
+ "is-error",
335
+ "is-failed",
336
+ "is-gone",
337
+ "is-interactive",
338
+ "is-latest",
339
+ "is-loading",
340
+ "is-locked",
341
+ "is-muted",
342
+ "is-numeric",
343
+ "is-open",
344
+ "is-placeholder",
345
+ "is-played",
346
+ "is-selected",
347
+ "mono",
348
+ "mono-sm",
349
+ "mono-xs",
350
+ "narrative-body",
351
+ "narrative-deck",
352
+ "narrative-eyebrow",
353
+ "narrative-h1",
354
+ "narrative-h2",
355
+ "narrative-h3",
356
+ "narrative-lede",
357
+ "prose",
358
+ "prose-compact",
359
+ "text-body",
360
+ "text-emphasis",
361
+ "text-eyebrow",
362
+ "text-label",
363
+ "text-meta",
364
+ "text-metric-value",
365
+ "text-mono",
366
+ "text-object-title",
367
+ "text-on-surface",
368
+ "text-on-surface-variant",
369
+ "text-page-title",
370
+ "text-section-title",
371
+ "text-selected",
372
+ "text-supporting",
373
+ "text-welcome-title"
374
+ ],
375
+ "properties": [
376
+ "--ai-alis",
377
+ "--ai-alis-container",
378
+ "--ai-ground-end",
379
+ "--ai-ground-start",
380
+ "--ai-tail",
381
+ "--ai-you",
382
+ "--ai-you-container",
383
+ "--alis-red",
384
+ "--amber-100",
385
+ "--amber-700",
386
+ "--background",
387
+ "--band-bottom",
388
+ "--band-fg",
389
+ "--band-line",
390
+ "--band-surface",
391
+ "--band-top",
392
+ "--bench-grid-line",
393
+ "--blink",
394
+ "--blue-600",
395
+ "--breakpoint-compact",
396
+ "--breakpoint-expanded",
397
+ "--breakpoint-large",
398
+ "--breakpoint-medium",
399
+ "--card-padding-wide",
400
+ "--cat",
401
+ "--cat1",
402
+ "--cat1-container",
403
+ "--cat2",
404
+ "--cat2-container",
405
+ "--cat3",
406
+ "--cat3-container",
407
+ "--cat4",
408
+ "--cat4-container",
409
+ "--cat5",
410
+ "--cat5-container",
411
+ "--cat6",
412
+ "--cat6-container",
413
+ "--chart-neutral",
414
+ "--chat-row",
415
+ "--container",
416
+ "--control-height",
417
+ "--cyan-200",
418
+ "--cyan-600",
419
+ "--cyan-700",
420
+ "--detail-width",
421
+ "--dur-arrive",
422
+ "--dur-effects",
423
+ "--dur-panel",
424
+ "--dur-spatial",
425
+ "--dur-tint",
426
+ "--dur-ui",
427
+ "--ease-arrive",
428
+ "--ease-standard",
429
+ "--elevation-1",
430
+ "--elevation-2",
431
+ "--elevation-3",
432
+ "--error",
433
+ "--field-glow",
434
+ "--field-glow-1",
435
+ "--field-glow-2",
436
+ "--field-grid",
437
+ "--field-grid-line",
438
+ "--field-grid-size",
439
+ "--field-mask",
440
+ "--field-noise",
441
+ "--font-mono",
442
+ "--font-sans",
443
+ "--green-700",
444
+ "--grey-200",
445
+ "--grey-250",
446
+ "--grey-300",
447
+ "--grey-400",
448
+ "--grey-600",
449
+ "--highlight",
450
+ "--info",
451
+ "--inverse-surface",
452
+ "--machine-surface",
453
+ "--measure-prose",
454
+ "--mist-100",
455
+ "--motion-effects",
456
+ "--motion-spatial",
457
+ "--narrative-canvas",
458
+ "--narrative-ink-body",
459
+ "--narrative-line",
460
+ "--narrative-line-inverse",
461
+ "--narrative-line-strong",
462
+ "--narrative-link",
463
+ "--narrative-surface-sunken",
464
+ "--narrative-tone-forge",
465
+ "--nav-width",
466
+ "--noise-opacity",
467
+ "--on-band-build",
468
+ "--on-band-forge",
469
+ "--on-band-ideate",
470
+ "--on-band-spec",
471
+ "--on-cat",
472
+ "--on-cat1-container",
473
+ "--on-cat2-container",
474
+ "--on-cat3-container",
475
+ "--on-cat4-container",
476
+ "--on-cat5-container",
477
+ "--on-cat6-container",
478
+ "--on-error",
479
+ "--on-highlight",
480
+ "--on-inverse-surface",
481
+ "--on-machine-surface",
482
+ "--on-primary",
483
+ "--on-secondary-container",
484
+ "--on-surface",
485
+ "--on-surface-variant",
486
+ "--outline",
487
+ "--outline-variant",
488
+ "--paper",
489
+ "--paper-0",
490
+ "--paper-100",
491
+ "--paper-150",
492
+ "--paper-25",
493
+ "--paper-50",
494
+ "--paper-75",
495
+ "--petrol-500",
496
+ "--petrol-700",
497
+ "--petrol-800",
498
+ "--petrol-850",
499
+ "--petrol-900",
500
+ "--petrol-950",
501
+ "--primary",
502
+ "--prose-body-line",
503
+ "--prose-body-size",
504
+ "--prose-code-size",
505
+ "--prose-gap",
506
+ "--prose-h1-above",
507
+ "--prose-h1-below",
508
+ "--prose-h1-line",
509
+ "--prose-h1-size",
510
+ "--prose-h1-tracking",
511
+ "--prose-h1-weight",
512
+ "--prose-h2-above",
513
+ "--prose-h2-line",
514
+ "--prose-h2-size",
515
+ "--prose-h2-weight",
516
+ "--prose-h3-above",
517
+ "--prose-item-gap",
518
+ "--prose-minor-ink",
519
+ "--radius-0",
520
+ "--radius-lg",
521
+ "--radius-md",
522
+ "--radius-pill",
523
+ "--radius-sm",
524
+ "--radius-xl",
525
+ "--radius-xs",
526
+ "--rc-noise",
527
+ "--red-700",
528
+ "--scrim",
529
+ "--secondary-container",
530
+ "--selection-chrome",
531
+ "--shadow-ambient",
532
+ "--shadow-key",
533
+ "--shiki-background",
534
+ "--shiki-foreground",
535
+ "--shiki-token-comment",
536
+ "--shiki-token-constant",
537
+ "--shiki-token-function",
538
+ "--shiki-token-keyword",
539
+ "--shiki-token-link",
540
+ "--shiki-token-parameter",
541
+ "--shiki-token-punctuation",
542
+ "--shiki-token-string",
543
+ "--shiki-token-string-expression",
544
+ "--shimmer",
545
+ "--signal",
546
+ "--slate-500",
547
+ "--space-12",
548
+ "--space-16",
549
+ "--space-24",
550
+ "--space-32",
551
+ "--space-4",
552
+ "--space-48",
553
+ "--space-8",
554
+ "--stagger",
555
+ "--state-dragged",
556
+ "--state-focus",
557
+ "--state-hover",
558
+ "--state-pressed",
559
+ "--state-statement",
560
+ "--success",
561
+ "--surface",
562
+ "--surface-container-high",
563
+ "--surface-container-highest",
564
+ "--surface-container-low",
565
+ "--surface-variant",
566
+ "--syntax-comment",
567
+ "--syntax-function",
568
+ "--syntax-keyword",
569
+ "--syntax-number",
570
+ "--syntax-plain",
571
+ "--syntax-string",
572
+ "--teal-200",
573
+ "--teal-600",
574
+ "--term-bg",
575
+ "--term-fg",
576
+ "--term-ok",
577
+ "--term-prompt",
578
+ "--term-reply",
579
+ "--titlebar-height-phone",
580
+ "--touch-target",
581
+ "--touch-target-coarse",
582
+ "--violet-200",
583
+ "--violet-600",
584
+ "--violet-700",
585
+ "--warning"
586
+ ]
587
+ }
@@ -0,0 +1,70 @@
1
+ # AppAvatar
2
+
3
+ Someone or something with a name, drawn small: a person is round, a thing is a square tile.
4
+
5
+ ## Use / don't use
6
+
7
+ See [chips-alerts.md](../rules/chips-alerts.md) § Avatars.
8
+
9
+ - **A person is round**: their photo, else their initials. **A thing is a square tile** (`app-avatar--thing`): an organisation by its logo or initials, anything else by its icon. The shape says which before the words do, so never a round organisation or a square person.
10
+ - **Alis is the mark**, with no ground (`app-avatar--alis`, [AlisMark](AlisMark.md)).
11
+ - **Three sizes, nothing between.** 24 (`app-avatar--small`) in a line of text: a who-line, a menu row, a table cell. 36 (the default, `control-height`) leading a row or a card with two lines. 80 (`app-avatar--large`) once, on the page that is about them. An icon tile is 36 or 80; at 24 the icon stands alone.
12
+ - **Initials are two letters**, the first of the first and last names ("Thandi Mokoena" is TM); one when there is one name. An organisation takes the first letters of its first two words. Uppercase is typed in the data, never transformed.
13
+ - **Neutral**: `surface-container-highest` behind `on-surface` ink. People are never coloured by their name. A category colour (`app-avatar--cat1` to `--cat6`) is for a thing whose category the screen already colours, and matches it. Never `primary`, never a status role: a state is a chip beside the name.
14
+ - **A logo takes no ground** (`app-avatar--logo`): it arrives with its own, so no tile and no white plate behind it.
15
+ - **Several people** sit side by side at 24 in an `.app-avatar-group`: three at most, then a count ("+4"). Never overlapped.
16
+ - **Not a control.** The row, the name or a button is what you press; an avatar inside it adds no target. No presence dot and no badge on it.
17
+ - **An icon tile leads a row or a card whose subject has no picture of its own**: an action to take ("Invite your team"), a kind of thing (a guide, a flow). Inside a control (a button, a chip, a menu row, the rail) an icon is never tiled, and a file is an [AppAttachment](AppAttachment.md).
18
+
19
+ ## Markup
20
+
21
+ ```html
22
+ <!-- A person: a photo, else initials. Beside their name it is decoration -->
23
+ <img class="app-avatar" src="…" alt="">
24
+ <span class="app-avatar" aria-hidden="true">TM</span>
25
+
26
+ <!-- Leading a row -->
27
+ <div class="app-row app-state app-row--divided" role="listitem">
28
+ <span class="app-avatar" aria-hidden="true">TM</span>
29
+ <span class="app-row__text">
30
+ <a class="app-row__hit text-object-title" href="/people/thandi">Thandi Mokoena</a>
31
+ <span class="text-supporting">Build specialist</span>
32
+ </span>
33
+ </div>
34
+
35
+ <!-- Small, in a line; large, on their own page -->
36
+ <span class="app-avatar app-avatar--small" aria-hidden="true">TM</span>
37
+ <span class="app-avatar app-avatar--large" aria-hidden="true">TM</span>
38
+
39
+ <!-- Alone, with no name beside it: it carries the name -->
40
+ <span class="app-avatar app-avatar--small" role="img" aria-label="Thandi Mokoena">TM</span>
41
+
42
+ <!-- A thing: an organisation's initials, its logo, or an icon -->
43
+ <span class="app-avatar app-avatar--thing" aria-hidden="true">AE</span>
44
+ <img class="app-avatar app-avatar--thing app-avatar--logo" src="…" alt="">
45
+ <span class="app-avatar app-avatar--thing" aria-hidden="true"><span class="app-icon" aria-hidden="true">menu_book</span></span>
46
+
47
+ <!-- A thing in its category's colour -->
48
+ <span class="app-avatar app-avatar--thing app-avatar--cat2" aria-hidden="true"><span class="app-icon" aria-hidden="true">forum</span></span>
49
+
50
+ <!-- Alis -->
51
+ <span class="app-avatar app-avatar--small app-avatar--alis" aria-hidden="true"><svg …></svg></span>
52
+
53
+ <!-- Several people, then a count -->
54
+ <span class="app-avatar-group" role="group" aria-label="Thandi Mokoena, Jan Krynauw, Priya Naidoo and 4 more">
55
+ <span class="app-avatar app-avatar--small" aria-hidden="true">TM</span>
56
+ <span class="app-avatar app-avatar--small" aria-hidden="true">JK</span>
57
+ <span class="app-avatar app-avatar--small" aria-hidden="true">PN</span>
58
+ <span class="app-avatar app-avatar--small app-avatar-group__more" aria-hidden="true">+4</span>
59
+ </span>
60
+ ```
61
+
62
+ ## Behaviour you must supply
63
+
64
+ - **A photo that fails to load** becomes the initials: swap the `<img>` for the `<span>` on `error`. With no name either, a person is the `person` icon and an organisation the `domain` icon.
65
+ - **The name**: beside its name an avatar is hidden from assistive technology (`aria-hidden`, or `alt=""`). Alone, it carries the name (`role="img"` and `aria-label`, or `alt`); a group carries everyone's on the group.
66
+ - **The count** is the number left out, never the total.
67
+
68
+ ## Classes
69
+
70
+ `.app-avatar`, `.app-avatar--small`, `.app-avatar--large`, `.app-avatar--thing`, `.app-avatar--logo`, `.app-avatar--alis`, `.app-avatar--cat1` to `.app-avatar--cat6`; `.app-avatar-group`, `.app-avatar-group__more`.