@alis-build/design-system 0.2.0 → 0.4.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/rules/spacing.md CHANGED
@@ -11,22 +11,24 @@ value: `space-4` … `space-48`.
11
11
  | Between paragraphs | 24 |
12
12
  | Between turns in a thread | 32 |
13
13
  | Card to its caption | 8 |
14
- | Minimum hit area | 48 (`touch-target`) |
14
+ | Control height | 36 (`control-height`); 48 on touch |
15
+ | Minimum hit area | 32 (`touch-target`); 48 on touch (`touch-target-coarse`) |
15
16
 
16
17
  **Card padding's 28 is the scale's one exception.** The card sets it on every one
17
18
  of its parts, so a wide card breathes without anyone choosing a value; never
18
19
  write it at a site.
19
20
 
20
- **In a 48px table row, the row is the target.** A small button there is fine;
21
+ **In a table row, the row is the target.** A small button there is fine;
21
22
  anywhere else it is D6.
22
23
 
23
24
  **The agent chat list is 32px, and it is the only list that is** (`chat-row`,
24
25
  `.app-row--agent-chat`). The list of past agent conversations in a navigation
25
- pane runs at 32px rows, and so does its "Show N more", because at 48 they sat
26
- level with the pane's destinations and a history of conversations read as more
27
- places to go. The whole row is the target, above WCAG 2.2 AA's 24px, and a menu
28
- button on a row projects no target of its own ([buttons.md](buttons.md)). The
29
- group's heading and every destination in the pane stay 48.
26
+ pane runs at 32px rows, and so does its "Show N more", so a history of
27
+ conversations doesn't read as more places to go. The pane's destinations are 36;
28
+ what sets the chats apart is their heading and their missing icon more than the
29
+ 4px. The whole row is the target, above WCAG 2.2 AA's 24px, and a menu button on
30
+ a row projects no target of its own ([buttons.md](buttons.md)). Under a coarse
31
+ pointer both rise to 48.
30
32
 
31
33
  **It does not generalise.** Not to projects, collections, files, members,
32
34
  another pane or another history, however alike they look. It is not a density
@@ -39,7 +41,7 @@ second case is ruled on its own, never applied by similarity.
39
41
  Buttons and pills are `radius-pill`, tables are `radius-0`, cards and text
40
42
  fields are `radius-lg` (16) with a `radius-md` (12) inset, so the corners stay
41
43
  concentric. 28 (`radius-xl`) is on the scale with no assigned use: nothing is
42
- rounded to it by default, and the navigation pane's primary action is `radius-lg`.
44
+ rounded to it by default.
43
45
  There is no 24px step.
44
46
 
45
47
  Radius is a dial. If it moves, change the token and move the inset with it,
@@ -52,21 +54,25 @@ container (`overflow: hidden`), which clips a focus ring.
52
54
 
53
55
  ## Depth
54
56
 
55
- **Three levels, one brand recipe:** a 1px contact shadow plus a wide diffuse one,
56
- in cool petrol rather than black.
57
+ **A shadow means above the page** ([surfaces.md](surfaces.md) § Depth). One brand
58
+ recipe: a 1px contact shadow plus a wide diffuse one, in cool petrol rather than
59
+ black.
57
60
 
58
- - **`elevation-1`** resting
59
- - **`elevation-2`** a card, the composer, sticky things, menus
60
- - **`elevation-3`** dialogs and overlays
61
+ - **`elevation-2`** floats over the page: menus, the agent composer, a sticky bar
62
+ with content under it; and a card on the drafting field
63
+ - **`elevation-3`** interrupts or moves: snackbars, dialogs, an overlaid detail
64
+ pane, a card or row while it is dragged
65
+ - **`elevation-1`** is unassigned: nothing in the page lifts
61
66
 
62
67
  One shadow per level, never the Material 2 three-layer stack (A3), and never a
63
- shadow on a flat surface.
68
+ shadow on a card resting in the page.
64
69
 
65
70
  **Hover never lifts.** A card rests at its level; a clickable card's hover is its
66
71
  state layer ([selection.md](selection.md)).
67
72
 
68
- **One border colour family:** `outline` for a rule, `outline-variant` for a
69
- divider inside a surface.
73
+ **One border colour family:** `outline` for a rule and a field's box,
74
+ `outline-variant` for every hairline: an instrument's edge, the outlined button's
75
+ edge, the selected segment's edge, and a divider inside a surface.
70
76
 
71
77
  ## Measure
72
78
 
package/rules/styling.md CHANGED
@@ -13,7 +13,7 @@ the same split holds.
13
13
  | Border | `outline` or `outline-variant`, or a divider. A coloured border is a state: [selection.md](selection.md) or [chips-alerts.md](chips-alerts.md) |
14
14
  | Radius | `radius-0`, `-xs`, `-sm`, `-md`, `-lg`, `-xl`, `-pill`. No 24px step |
15
15
  | Shadow | `elevation-1`, `-2`, `-3`, or nothing ([spacing.md](spacing.md)). Never a shadow and a border |
16
- | Font, size, line height, tracking, weight | A `text-*` style. Beside it: `.text-mono` (the face), `.text-emphasis` (600), `.text-selected` (800, selection only) |
16
+ | Font, size, line height, tracking, weight | A `text-*` style. Beside it: `.text-mono` (the face), `.text-emphasis` (600), `.text-selected` (700, selection only) |
17
17
  | Spacing | `space-*` |
18
18
  | Hover, focus, pressed on a plain element | The state layer, `.app-state` ([selection.md](selection.md)) |
19
19
  | Rendered markdown | `.prose`, `.prose-compact` ([type.md](type.md)). Never reach into prose to restyle it |
package/rules/surfaces.md CHANGED
@@ -7,7 +7,7 @@ What is this containing?
7
7
  ├─ The app itself → the ground (background): every pane, the thread column
8
8
  ├─ Content you READ, continuous → the lattice: no box at all
9
9
  ├─ Grouped context, not acted on directly → a statement (surface-container-low): filled, flat
10
- └─ An object you ACT on → an instrument (surface): white, elevation-2
10
+ └─ An object you ACT on → an instrument (surface): white, an outline-variant edge
11
11
  ```
12
12
 
13
13
  Default when unsure: **no container** (B6). Before adding a card, try spacing, a
@@ -20,16 +20,17 @@ heading or a divider.
20
20
  ([AppShell](../components/AppShell.md)), so a white card always reads as an
21
21
  object.
22
22
  - **If a white card would sit on a white parent, the parent is wrong** (A1).
23
- - **No borders on cards.** Separation comes from fill and elevation (A2).
23
+ - **Fill says read or act; a shadow says above the page.** A statement is grey
24
+ and flat with no border. An instrument is white with a 1px `outline-variant`
25
+ edge and no shadow, and its action shows inside it: an action row, or the whole
26
+ card is one link. Never both an edge and a shadow (A2).
24
27
  - **No step under 1.0 L\*.** Below that, two surfaces are indistinguishable.
25
- - **Direction agrees with elevation.** A lighter surface implies lift, so it
26
- carries the shadow that confirms it.
27
28
  - **One inset level.** A panel inside a card is fine; a panel inside that is not.
28
29
  - **A statement carries at most one text (tertiary) link.** If it needs a
29
30
  primary, it is an instrument.
30
31
  - **An instrument puts its actions in one action row.**
31
32
  - **A card you open is an instrument**, because opening it is acting on it. It
32
- rests white at `elevation-2`, the default for [AppCard](../components/AppCard.md)'s
33
+ rests white with its edge, the default for [AppCard](../components/AppCard.md)'s
33
34
  instrument, and its hover is the link's state layer, never a lift.
34
35
  - **Cards in a collection are coplanar**: the same resting elevation and the same
35
36
  left and right edges.
@@ -66,7 +67,24 @@ Use it for continuous content that is read rather than manipulated: overview
66
67
  documents, synthesis sections, agent findings, long rendered artifacts. The tick
67
68
  may take a product tone where the section belongs to one.
68
69
 
69
- ## Depth
70
+ ## Depth · a shadow means above the page
71
+
72
+ Nothing in the page lifts. Separation comes from fill first, then the hairline,
73
+ as Material 3 does it; a shadow is kept for four things:
74
+
75
+ ```
76
+ Why is this above the page?
77
+ ├─ It floats over the page → elevation-2: a menu, the agent composer, a
78
+ │ sticky bar with content scrolled under it
79
+ ├─ It interrupts the page → elevation-3: a snackbar; with a scrim, a
80
+ │ dialog and the detail pane when it slides
81
+ │ over the content
82
+ ├─ It is being moved → elevation-3 while dragged, then it settles
83
+ └─ It sits on a busy background → elevation-2 instead of the edge: a card on the
84
+ drafting field
85
+ ```
86
+
87
+ **Hover never lifts.** A clickable card's hover is its state layer.
70
88
 
71
89
  Transparency and blur appear in exactly four places: a floating nav pill, glass
72
90
  on a dark panel, a dialog backdrop, and the statement over a gradient.
package/rules/type.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Type
2
2
 
3
- **Nunito Sans on M3's role structure, one style per job, set the way alisx.com
4
- sets it:** heavy headings that step down by size, heavy action labels, and no
5
- tracking on reading text. The values are the `text-*` styles in the tokens, and
3
+ **Nunito Sans on M3's role structure, one style per job, at M3 Expressive's
4
+ baseline weights:** ordinary text is light, and weight is spent on headings,
5
+ selection and the primary action. No tracking on reading text. The values are the `text-*` styles in the tokens, and
6
6
  `.prose` restates them for rendered markdown. **Never invent values.**
7
7
 
8
8
  **Monospace means machine speech:** an agent talking, a prompt to paste, code, a
@@ -17,13 +17,13 @@ Pick by **job**, never by size.
17
17
 
18
18
  ```
19
19
  What is this text doing?
20
- ├─ Naming the whole screen → text-page-title 28/36 · 800
21
- ├─ Naming a section within it → text-section-title 18/24 · 800
22
- ├─ Naming one object (card, row, item) → text-object-title 16/24 · 650
20
+ ├─ Naming the whole screen → text-page-title 28/36 · 700
21
+ ├─ Naming a section within it → text-section-title 18/24 · 600
22
+ ├─ Naming one object (card, row, item) → text-object-title 16/24 · 500
23
23
  ├─ Reading as prose → text-body 16/24 · 400
24
24
  ├─ Supporting the thing above it → text-supporting 14/20 · 400
25
- ├─ Timestamps, counts, provenance → text-meta 12/16 · 450
26
- └─ Inside a control → text-label 14/20 · 650
25
+ ├─ Timestamps, counts, provenance → text-meta 12/16 · 400
26
+ └─ Inside a control → text-label 14/20 · 500
27
27
  ```
28
28
 
29
29
  Default when unsure: **body**.
@@ -36,7 +36,9 @@ Three more styles, each with one place:
36
36
  - **`text-eyebrow`**, 12/16 at 700, uppercase, 0.12em: a structural tag of four
37
37
  words at most over what follows. The lattice's label, and a group heading
38
38
  inside a card, a list, a menu or a panel. The only all-caps in the product.
39
- - **`text-metric-value`**, 40/48 at 800 with tabular figures: a dashboard's
39
+ Never the navigation pane's group headings, which set their own type in
40
+ sentence case ([AppShell](../components/AppShell.md)).
41
+ - **`text-metric-value`**, 40/48 at 700 with tabular figures: a dashboard's
40
42
  headline metric. An ordinary stat in a tile or dialog is `text-page-title` with
41
43
  tabular numerals. A stat value is never a heading, and the label over either is
42
44
  `text-label`.
@@ -141,22 +143,20 @@ jobs.
141
143
 
142
144
  ## Weight
143
145
 
144
- **800 names and marks the selected, 700 acts, 650 labels, 450 dates, 400 is
145
- read.**
146
+ **400 is read, 500 names, 600 heads a section and asks, 700 names the screen,
147
+ marks the selected and commits, 800 greets.** This is M3 Expressive's model: a
148
+ quiet baseline, with emphasis spent where it means something.
146
149
 
147
- - **800**: welcome-title, page-title, section-title, and the selected state
148
- (`.text-selected`).
149
- - **700**: button text, set once in the button, and eyebrow.
150
- - **650**: object-title, label, tabs.
151
- - **600**: emphasis in reading text (`.text-emphasis`), and `strong` in rendered
152
- prose.
153
- - **450**: meta.
154
- - **400**: body and supporting.
150
+ - **800**: welcome-title only, the one hero moment of an entry screen.
151
+ - **700**: page-title, metric-value, the selected state (`.text-selected`), the
152
+ filled button, and eyebrow.
153
+ - **600**: section-title, a text or outlined button's label, emphasis in reading text
154
+ (`.text-emphasis`), and `strong` in rendered prose.
155
+ - **500**: object-title, label, tabs, segments, nav rows.
156
+ - **400**: body, supporting and meta.
155
157
 
156
158
  **Never override a role's weight.** A weight utility beside a role wins and
157
- breaks it: `text-object-title` at 500 is no longer a title. Choose the role, and
158
- emphasise only reading text. 500 is the old emphasis: it becomes 600 on reading
159
- text, and goes entirely on a title or a label.
159
+ breaks it. Choose the role, and emphasise only reading text, at 600.
160
160
 
161
161
  ## Tracking
162
162
 
package/tokens.json CHANGED
@@ -82,7 +82,7 @@
82
82
  {
83
83
  "name": "grey-200",
84
84
  "value": "#e6e8eb",
85
- "usage": "Icon tiles and initials; chip, snackbar and tooltip grounds."
85
+ "usage": "Icon tiles and initials; chip, snackbar and tooltip grounds; every hairline."
86
86
  },
87
87
  {
88
88
  "name": "grey-250",
@@ -97,7 +97,7 @@
97
97
  {
98
98
  "name": "grey-400",
99
99
  "value": "#c4c7ca",
100
- "usage": "A divider inside a surface."
100
+ "usage": "Unassigned since 2026-10-08, when hairlines moved to grey-200."
101
101
  },
102
102
  {
103
103
  "name": "grey-600",
@@ -172,7 +172,7 @@
172
172
  {
173
173
  "name": "primary",
174
174
  "value": "{cyan-600}",
175
- "usage": "The only actionable colour: the one filled button, links, the 2px focus outline, Ideate's tone. Never on something you cannot press (B8)."
175
+ "usage": "The only actionable colour, and only on the filled button, a link, and a control in use: the 2px focus outline, a focused field, a switch that is on, a drop target. Text and outlined buttons are ink. Never on something you cannot press (B8). Still Ideate's tone until it has its own (known gaps)."
176
176
  },
177
177
  {
178
178
  "name": "on-primary",
@@ -187,7 +187,7 @@
187
187
  {
188
188
  "name": "on-surface",
189
189
  "value": "{petrol-800}",
190
- "usage": "First ink: titles, body, labels, code, table cells."
190
+ "usage": "First ink: titles, body, labels, code, table cells, text and outlined buttons, the progress fill."
191
191
  },
192
192
  {
193
193
  "name": "on-surface-variant",
@@ -202,7 +202,7 @@
202
202
  {
203
203
  "name": "surface",
204
204
  "value": "{paper-0}",
205
- "usage": "The instrument: a card you act on, at elevation-2. Also menus and dialogs."
205
+ "usage": "The instrument: a card you act on, white with an outline-variant edge. Also the outlined button, the selected segment, menus and dialogs."
206
206
  },
207
207
  {
208
208
  "name": "surface-container-low",
@@ -222,7 +222,7 @@
222
222
  {
223
223
  "name": "secondary-container",
224
224
  "value": "{grey-300}",
225
- "usage": "Selected: rows, segments, chips, tiles, toggles. Always with a second property (FILL 1 icon, weight 800)."
225
+ "usage": "Selected: rows, segments, chips, tiles, toggles. Always with a second property (FILL 1 icon, weight 700)."
226
226
  },
227
227
  {
228
228
  "name": "on-secondary-container",
@@ -241,8 +241,8 @@
241
241
  },
242
242
  {
243
243
  "name": "outline-variant",
244
- "value": "{grey-400}",
245
- "usage": "A divider inside a surface; the scrollbar."
244
+ "value": "{grey-200}",
245
+ "usage": "Every hairline: a divider, table and tab lines, the instrument card's edge, a segmented track; the scrollbar."
246
246
  },
247
247
  {
248
248
  "name": "error",
@@ -514,7 +514,7 @@
514
514
  "name": "text-page-title",
515
515
  "fontSize": "28px",
516
516
  "lineHeight": "36px",
517
- "fontWeight": 800,
517
+ "fontWeight": 700,
518
518
  "letterSpacing": "-0.03em",
519
519
  "usage": "Names the whole screen. One per screen, in the title bar."
520
520
  },
@@ -522,7 +522,7 @@
522
522
  "name": "text-section-title",
523
523
  "fontSize": "18px",
524
524
  "lineHeight": "24px",
525
- "fontWeight": 800,
525
+ "fontWeight": 600,
526
526
  "letterSpacing": "-0.02em",
527
527
  "usage": "Names a section within the screen. Inside a card, use eyebrow."
528
528
  },
@@ -530,7 +530,7 @@
530
530
  "name": "text-object-title",
531
531
  "fontSize": "16px",
532
532
  "lineHeight": "24px",
533
- "fontWeight": 650,
533
+ "fontWeight": 500,
534
534
  "usage": "Names one object: a card, a row, an item."
535
535
  },
536
536
  {
@@ -551,14 +551,14 @@
551
551
  "name": "text-meta",
552
552
  "fontSize": "12px",
553
553
  "lineHeight": "16px",
554
- "fontWeight": 450,
554
+ "fontWeight": 400,
555
555
  "usage": "Timestamps, counts, provenance. Ink on-surface-variant."
556
556
  },
557
557
  {
558
558
  "name": "text-label",
559
559
  "fontSize": "14px",
560
560
  "lineHeight": "20px",
561
- "fontWeight": 650,
561
+ "fontWeight": 500,
562
562
  "usage": "Inside a control on a plain element."
563
563
  },
564
564
  {
@@ -573,7 +573,7 @@
573
573
  "name": "text-metric-value",
574
574
  "fontSize": "40px",
575
575
  "lineHeight": "48px",
576
- "fontWeight": 800,
576
+ "fontWeight": 700,
577
577
  "usage": "A dashboard's headline metric, tabular figures.",
578
578
  "letterSpacing": "-0.03em"
579
579
  }
@@ -715,8 +715,18 @@
715
715
  },
716
716
  {
717
717
  "name": "touch-target",
718
+ "value": "32px",
719
+ "usage": "Minimum hit area for a fine pointer (mouse, trackpad). Under a coarse pointer it is touch-target-coarse."
720
+ },
721
+ {
722
+ "name": "touch-target-coarse",
718
723
  "value": "48px",
719
- "usage": "Minimum hit area, desktop included."
724
+ "usage": "Minimum hit area under a coarse pointer (touch). Raises touch-target and control-height there."
725
+ },
726
+ {
727
+ "name": "control-height",
728
+ "value": "36px",
729
+ "usage": "The visible height of a button, text field, select, search field and segmented control, so a row of controls has one height. touch-target-coarse under a coarse pointer."
720
730
  },
721
731
  {
722
732
  "name": "measure-prose",
@@ -725,7 +735,7 @@
725
735
  },
726
736
  {
727
737
  "name": "nav-width",
728
- "value": "288px",
738
+ "value": "256px",
729
739
  "usage": "The app's navigation pane."
730
740
  },
731
741
  {
@@ -804,17 +814,17 @@
804
814
  {
805
815
  "name": "elevation-1",
806
816
  "value": "0 1px 2px 0 rgba(16, 24, 40, 0.16), 0 2px 6px 0 rgba(16, 24, 40, 0.2)",
807
- "usage": "Resting."
817
+ "usage": "Unassigned: nothing rests above the page."
808
818
  },
809
819
  {
810
820
  "name": "elevation-2",
811
821
  "value": "0 1px 2px 0 rgba(16, 24, 40, 0.16), 0 4px 12px 0 rgba(16, 24, 40, 0.2)",
812
- "usage": "A card (the instrument), the composer, sticky things, menus."
822
+ "usage": "Above the page: menus, the agent composer, a sticky bar with content under it, and a card on the drafting field."
813
823
  },
814
824
  {
815
825
  "name": "elevation-3",
816
826
  "value": "0 1px 3px 0 rgba(16, 24, 40, 0.16), 0 12px 32px -4px rgba(16, 24, 40, 0.2)",
817
- "usage": "Dialogs and overlays."
827
+ "usage": "Interrupting or moving: snackbars, dialogs, an overlaid detail pane, and a card or row while it is dragged."
818
828
  }
819
829
  ]
820
830
  },