@alis-build/design-system 0.21.0 → 0.21.1

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 CHANGED
@@ -699,6 +699,8 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
699
699
  /* ── Empty state · speaks to the user; may take the drafting field ── */
700
700
  .app-empty{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-8);min-height:320px;padding:var(--space-48) var(--space-24);text-align:center;color:var(--on-surface)}
701
701
  .app-empty__headline{margin:0;max-width:22ch}
702
+ /* The tile above the headline sits 16 clear of it */
703
+ .app-empty>.app-avatar{margin-bottom:var(--space-8)}
702
704
  .app-empty__line{margin:0 0 var(--space-8);max-width:44ch;color:var(--on-surface-variant)}
703
705
  .app-empty-line{margin:0;color:var(--on-surface-variant)}
704
706
  /* The drafting field around an empty state fills the pane with it */
@@ -1075,7 +1077,7 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
1075
1077
  .app-avatar--thing{border-radius:var(--radius-sm)}
1076
1078
  .app-avatar--thing.app-avatar--small{border-radius:var(--radius-xs)}
1077
1079
  .app-avatar--thing.app-avatar--large{border-radius:var(--radius-lg)}
1078
- .app-avatar--large>.app-icon{font-size:40px}
1080
+ .app-avatar--large>.app-icon{font-size:40px;font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 40}
1079
1081
  /* A logo and the Alis mark arrive with their own ground (rules/chips-alerts.md) */
1080
1082
  .app-avatar--logo,.app-avatar--alis{background:transparent}
1081
1083
  .app-avatar--logo{object-fit:contain}
@@ -1083,6 +1085,12 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
1083
1085
  /* Several people: side by side, never overlapped, so no ring has to guess the ground under it */
1084
1086
  .app-avatar-group{display:inline-flex;align-items:center;gap:var(--space-4)}
1085
1087
  .app-avatar-group__more{font-variant-numeric:tabular-nums}
1088
+ /* An avatar inside a button: the button is the control, and its state layer lies over the picture */
1089
+ .app-avatar-btn{display:inline-flex;flex:none;padding:0;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--on-surface)}
1090
+ .app-avatar-btn:has(>.app-avatar--thing){border-radius:var(--radius-sm)}
1091
+ .app-avatar-btn:has(>.app-avatar--thing.app-avatar--small){border-radius:var(--radius-xs)}
1092
+ .app-avatar-btn:has(>.app-avatar--thing.app-avatar--large){border-radius:var(--radius-lg)}
1093
+ .app-avatar-btn::before{z-index:1}
1086
1094
 
1087
1095
  /* ── Checkbox and radio · native inputs; the row is the target ── */
1088
1096
  .app-check-group{display:flex;flex-direction:column}
package/classes.json CHANGED
@@ -45,6 +45,7 @@
45
45
  "app-avatar--logo",
46
46
  "app-avatar--small",
47
47
  "app-avatar--thing",
48
+ "app-avatar-btn",
48
49
  "app-avatar-group",
49
50
  "app-avatar-group__more",
50
51
  "app-brand",
@@ -8,12 +8,12 @@ See [chips-alerts.md](../rules/chips-alerts.md) § Avatars.
8
8
 
9
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
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.
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, or as the tile above an empty state's headline ([AppEmptyState](AppEmptyState.md)). An icon tile is 36 or 80; at 24 the icon stands alone.
12
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
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
14
  - **A logo takes no ground** (`app-avatar--logo`): it arrives with its own, so no tile and no white plate behind it.
15
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.
16
+ - **Never the control, but it may sit inside one.** A button that holds an avatar (`.app-avatar-btn`: the account card, a person you can message) is the control, and its tooltip says what pressing does ("Message Thandi Mokoena privately"). **Nothing is drawn on the avatar**: no badge, no presence dot, no hover overlay. Changing the picture is a text button beside it ("Change photo"), never a press on the picture.
17
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
18
 
19
19
  ## Markup
@@ -50,6 +50,17 @@ See [chips-alerts.md](../rules/chips-alerts.md) § Avatars.
50
50
  <!-- Alis -->
51
51
  <span class="app-avatar app-avatar--small app-avatar--alis" aria-hidden="true"><svg …></svg></span>
52
52
 
53
+ <!-- Inside a button: the tooltip says what pressing does -->
54
+ <button type="button" class="app-avatar-btn app-state app-target" aria-label="Message Thandi Mokoena privately" title="Message Thandi Mokoena privately">
55
+ <span class="app-avatar" aria-hidden="true">TM</span>
56
+ </button>
57
+
58
+ <!-- Changing the picture: a text button beside it -->
59
+ <div class="app-btn-row">
60
+ <span class="app-avatar app-avatar--large" aria-hidden="true">TM</span>
61
+ <button type="button" class="app-btn app-state app-target">Change photo</button>
62
+ </div>
63
+
53
64
  <!-- Several people, then a count -->
54
65
  <span class="app-avatar-group" role="group" aria-label="Thandi Mokoena, Jan Krynauw, Priya Naidoo and 4 more">
55
66
  <span class="app-avatar app-avatar--small" aria-hidden="true">TM</span>
@@ -64,7 +75,8 @@ See [chips-alerts.md](../rules/chips-alerts.md) § Avatars.
64
75
  - **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
76
  - **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
77
  - **The count** is the number left out, never the total.
78
+ - **A button holding an avatar** takes an `aria-label` that says what pressing does, and an [AppTooltip](AppTooltip.md) with the same words.
67
79
 
68
80
  ## Classes
69
81
 
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`.
82
+ `.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`; `.app-avatar-btn`, with `.app-state` and `.app-target`.
@@ -7,6 +7,7 @@ An empty state that fills its pane and invites a first step.
7
7
  See [page.md](../rules/page.md).
8
8
 
9
9
  - It speaks to the user: a headline that says why you would act (never the screen's name), one supporting line that says how, and an outlined [AppButton](AppButton.md) (`app-btn--outlined`) that repeats the title bar's lead under the same label and glyph: the empty state is a surface, and that action is its lead.
10
+ - **It may lead with one icon tile**, above the headline: the avatar's thing tile at 80 ([AppAvatar](AppAvatar.md)), holding the icon of what the screen is about. Neutral, as every tile is, and never a status colour: a result says how it went in its headline. Leave it out when no icon is plainly the thing's own.
10
11
  - It takes the drafting field, one per screen. In `.app-shell__content` or the detail pane the field bleeds to the pane's edges (the CSS cancels the pane padding). Where the list pane and the detail pane are both empty, the detail pane takes the field and the list pane's empty state goes without it.
11
12
  - Keep the title bar's name and verb; hide search and the filter row.
12
13
  - An empty line inside working content ("No files yet" in a tab) is not this: use one supporting line, `.app-empty-line`.
@@ -30,6 +31,14 @@ See [page.md](../rules/page.md).
30
31
  </div>
31
32
  </div>
32
33
 
34
+ <!-- Led by an icon tile -->
35
+ <div class="app-empty">
36
+ <span class="app-avatar app-avatar--thing app-avatar--large" aria-hidden="true"><span class="app-icon" aria-hidden="true">forum</span></span>
37
+ <h2 class="app-empty__headline text-page-title">Hear from the people closest to the problem</h2>
38
+ <p class="app-empty__line text-supporting">Create an interview and send it to the people who do the work.</p>
39
+ <button type="button" class="app-btn app-state app-target app-btn--outlined"><span class="app-icon" aria-hidden="true">add</span>New interview</button>
40
+ </div>
41
+
33
42
  <!-- Without the field: just the .app-empty block -->
34
43
  <div class="app-empty">
35
44
  <h2 class="app-empty__headline text-page-title">…</h2>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
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",
@@ -62,10 +62,15 @@ Icon tiles and initials take `surface-container-highest` with `on-surface` ink;
62
62
  categorical avatar takes a `catN-container` with its `on-catN-container` ink. Never a status role, never `primary`.
63
63
  People are never coloured by their name.
64
64
 
65
- **Three sizes: 24 in a line, 36 leading a row, 80 on the page about them.**
65
+ **Three sizes: 24 in a line, 36 leading a row, 80 on the page about them or as the
66
+ tile above an empty state's headline.**
66
67
  Several people sit side by side at 24, three then a count, never overlapped: a
67
68
  ring round each would have to match whatever ground is under it.
68
69
 
70
+ **An avatar is never the control, but it may sit inside a button**, whose tooltip
71
+ says what pressing does. Nothing is drawn on it: no badge, no presence dot, no
72
+ hover overlay. Changing a picture is a text button beside it.
73
+
69
74
  **A logo takes no ground.** It arrives with its own, so no disc and no white plate
70
75
  behind it. The tile returns only when the logo is absent and a drawn mark stands
71
76
  in.
package/rules/page.md CHANGED
@@ -170,6 +170,10 @@ leads its content with it, or leaves it out.
170
170
  would act and never repeats the screen's name: "Hear from the people closest to
171
171
  the problem", not "Interviews". One `text-supporting` line says how, once, with
172
172
  no second line pointing at the button.
173
+ - **It may lead with one icon tile**, the avatar's thing tile at 80, above the
174
+ headline ([AppAvatar](../components/AppAvatar.md)): the icon of what the screen
175
+ is about, neutral, never a status colour. Never a round disc, a tint, or an
176
+ icon with no ground.
173
177
  - **The button repeats the bar's action under the bar's label**
174
178
  ([buttons.md](buttons.md) § Naming the action), outlined at the default size:
175
179
  the empty state is a surface, and that action is its lead.