@alis-build/design-system 0.0.0-stage → 0.1.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.
Files changed (57) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +33 -2
  4. package/alisx.css +586 -0
  5. package/assets/Brand/README.md +9 -0
  6. package/assets/Brand/alis-exchange-icon.png +0 -0
  7. package/assets/Brand/alis.svg +13 -0
  8. package/assets/Brand/alis_build.svg +31 -0
  9. package/assets/Brand/alis_exchange.svg +19 -0
  10. package/assets/Brand/alis_ideate.png +0 -0
  11. package/assets/Brand/alis_ideate.svg +31 -0
  12. package/assets/Brand/alis_primary_logo.png +0 -0
  13. package/assets/Brand/favicon.svg +17 -0
  14. package/components/AlisMark.md +34 -0
  15. package/components/AppAlert.md +56 -0
  16. package/components/AppButton.md +63 -0
  17. package/components/AppCard.md +54 -0
  18. package/components/AppChip.md +75 -0
  19. package/components/AppDialog.md +42 -0
  20. package/components/AppEmptyState.md +51 -0
  21. package/components/AppIcon.md +51 -0
  22. package/components/AppIconButton.md +44 -0
  23. package/components/AppLattice.md +53 -0
  24. package/components/AppListRow.md +69 -0
  25. package/components/AppLoader.md +44 -0
  26. package/components/AppProgress.md +50 -0
  27. package/components/AppSegmented.md +36 -0
  28. package/components/AppSelect.md +59 -0
  29. package/components/AppSelectTile.md +45 -0
  30. package/components/AppShell.md +66 -0
  31. package/components/AppSkeleton.md +51 -0
  32. package/components/AppSwitch.md +39 -0
  33. package/components/AppTable.md +63 -0
  34. package/components/AppTextField.md +83 -0
  35. package/components/AppTitleBar.md +85 -0
  36. package/components/CapabilityMark.md +63 -0
  37. package/components/README.md +121 -0
  38. package/fonts.css +4 -0
  39. package/marks.json +57 -0
  40. package/package.json +31 -4
  41. package/rules/README.md +68 -0
  42. package/rules/anti-patterns.md +68 -0
  43. package/rules/buttons.md +121 -0
  44. package/rules/chips-alerts.md +77 -0
  45. package/rules/colour.md +99 -0
  46. package/rules/icons.md +65 -0
  47. package/rules/known-gaps.md +34 -0
  48. package/rules/loading.md +71 -0
  49. package/rules/page.md +155 -0
  50. package/rules/quick-start.md +125 -0
  51. package/rules/register.md +119 -0
  52. package/rules/selection.md +111 -0
  53. package/rules/spacing.md +88 -0
  54. package/rules/styling.md +83 -0
  55. package/rules/surfaces.md +75 -0
  56. package/rules/type.md +186 -0
  57. package/tokens.json +922 -0
package/rules/type.md ADDED
@@ -0,0 +1,186 @@
1
+ # Type
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
6
+ `.prose` restates them for rendered markdown. **Never invent values.**
7
+
8
+ **Monospace means machine speech:** an agent talking, a prompt to paste, code, a
9
+ file path. It is the system stack (`font-mono`), and it changes the face only:
10
+ the role still sets the size. Write `.text-mono` beside the role class
11
+ (`class="text-meta text-mono"`), never on its own. The `.mono*` classes are
12
+ alisx.com's and set their own sizes; never use them in the product.
13
+
14
+ ## The seven jobs
15
+
16
+ Pick by **job**, never by size.
17
+
18
+ ```
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
23
+ ├─ Reading as prose → text-body 16/24 · 400
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
27
+ ```
28
+
29
+ Default when unsure: **body**.
30
+
31
+ Three more styles, each with one place:
32
+
33
+ - **`text-welcome-title`**, 40/48 at 800 (32/40 below 600px): the heading of an
34
+ entry screen that addresses the user ([page.md](page.md)). Never a table, form,
35
+ dialog or card.
36
+ - **`text-eyebrow`**, 12/16 at 700, uppercase, 0.12em: a structural tag of four
37
+ words at most over what follows. The lattice's label, and a group heading
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
40
+ headline metric. An ordinary stat in a tile or dialog is `text-page-title` with
41
+ tabular numerals. A stat value is never a heading, and the label over either is
42
+ `text-label`.
43
+
44
+ ## Body, supporting or meta
45
+
46
+ The question is never how big the text should be. It is **what the person is
47
+ doing with it.**
48
+
49
+ ```
50
+ What is this text doing?
51
+ ├─ Inside a component that sets its own type:
52
+ │ a button, chip, tab, list row's title, menu
53
+ │ option, avatar, alert, snackbar, tooltip,
54
+ │ expandable section's header → the component's type, no role
55
+ ├─ Acting as a control on a plain element, or a
56
+ │ question naming a field or a set of choices → label
57
+ ├─ Naming the thing: a row's person, file or
58
+ │ project, a card's subject, a card's or
59
+ │ popover's own title → object-title
60
+ │ a second name on the row, like the owner
61
+ │ beside the project → supporting
62
+ ├─ Heading a group of things below it → section-title; inside a card, eyebrow
63
+ ├─ Language someone reads to understand
64
+ │ ├─ the content of its region: a dialog's
65
+ │ │ message, an explanation that stands alone → body
66
+ │ └─ only makes sense with the heading,
67
+ │ control, chart or item it sits under → supporting
68
+ ├─ Feedback beside or in place of a control → supporting, or its status ink
69
+ ├─ A value about something: when, how many,
70
+ │ how big, which version, who or where from,
71
+ │ a one-word state or kind → meta
72
+ └─ Not sure → body
73
+ ```
74
+
75
+ **Read top down; the first branch that fits decides.** A ruled shape below beats
76
+ the tree's order.
77
+
78
+ **Read or scanned decides the region.** A region someone reads (a dialog, a
79
+ panel, an explanation) takes body. A collection someone scans (a list, a table, a
80
+ card grid, a feed) keeps its secondary lines in supporting and its values in
81
+ meta.
82
+
83
+ **Remove the title decides the line.** If the text still makes sense without the
84
+ title above it and is the main thing in its region, it is body. If it only makes
85
+ sense with what it sits under, it is supporting **in any region**: a helper stays
86
+ quieter than what it helps.
87
+
88
+ **Signals confirm, never decide alone,** and yield to the value branch and the
89
+ shapes: more than one sentence or 15 words suggests body; a short phrase set
90
+ heavier suggests a title or label; uppercase and short suggests eyebrow; a
91
+ formatted value (a date, a count, a size) suggests meta. A list row's or card's
92
+ subtitle is never body.
93
+
94
+ ### The shapes
95
+
96
+ | Shape | Role |
97
+ | --- | --- |
98
+ | A note beside a dialog's message, tinted or not | supporting; the message stays body |
99
+ | A key and its value | the key meta in `on-surface-variant`, the value supporting in ink. On one line ("Current balance: 40 credits") the whole line is the value's: supporting in ink |
100
+ | A value with its verb ("Updated 3 minutes ago") | meta |
101
+ | A card's only title | object-title, whatever the card's size |
102
+ | A caption naming the one block below it ("What we learned") | a key: meta in `on-surface-variant`, and the block keeps the role it would have alone. Over a list, table or set of stats it is a group heading instead |
103
+ | A data table | headers label, on each header cell; the cell naming the row object-title; other cells supporting in ink, a second line in `on-surface-variant`; a value cell (a date, a count) meta; a sentence standing in for rows supporting. A wrapper that gives a third-party grid its type takes the cell's role |
104
+ | A group heading | section-title; inside a card, eyebrow. Sentence case in the copy. Words someone typed are never eyebrow: section-title, or object-title inside a card |
105
+ | A heading that is also a link | label |
106
+ | A list item used as a control, its text the item itself | label |
107
+ | An expandable section's title holding a name and a second line | object-title, then supporting in `on-surface-variant` |
108
+ | A number or letter in a drawn token (not an avatar component), or a glyph standing in for an icon | meta; no role |
109
+ | An alert | its heading in the alert's title; the rest no role |
110
+ | The count in a contextual action bar ("3 selected") | object-title |
111
+ | A chart's legend key, or a tooltip heading that is the point's date or value | meta |
112
+ | A one-word state that replaces a control ("Sent") | meta, not supporting |
113
+ | A not-applicable value ("None", "n/a") | meta in `on-surface-variant`. Disabled styling is for disabled controls only |
114
+ | A placeholder in a name's slot ("Pending title…") | the name's role, in `on-surface-variant`, so the row keeps its height |
115
+ | A status line | the role its position gives it, in its status ink; a warning line keeps the role's ink beside a `warning` icon |
116
+ | A pane filled by an error, or by a state that is not a failure (no permission, nothing yet) | under its own heading, supporting; an error with no heading is body |
117
+ | An empty line inside working content | one supporting line ([page.md](page.md)) |
118
+ | An empty state inside working content with a heading and a hint | supporting on both, and report the copy: [page.md](page.md) asks for one line |
119
+ | A drop target's line | supporting, in `primary` while something is dragged over |
120
+ | Code | `.text-mono`, in ink, with supporting when someone copies it (a command, a prompt) and meta when it is a value (an id, a hash, a version) |
121
+ | Rendered markdown | `.prose` on the container (`.prose-compact` to step it down under its own heading), no role on the wrapper. A plain fallback line beside it takes supporting on its own element |
122
+ | Text on a sheet painted with a colour | the sheet's ink: no ink override, no disabled ink. The role still sets size and weight |
123
+ | A tab's pane | the rules of whatever holds the tabs |
124
+
125
+ ### Ink follows the role
126
+
127
+ | Role | Ink |
128
+ | --- | --- |
129
+ | body, the titles, label, code, a table cell, the value beside a key | `on-surface`: inherited, write nothing |
130
+ | supporting, meta, eyebrow, a key, a second line in a table cell | `on-surface-variant` |
131
+ | A status line | its status role |
132
+ | Text inside a component with its own type | the component's |
133
+
134
+ Write the role's ink, never a "medium emphasis" opacity on the text
135
+ ([colour.md](colour.md)). On a selected fill the system turns the ink for you
136
+ ([selection.md](selection.md)).
137
+
138
+ **The three-role budget holds.** If promoting a line would give a surface a
139
+ fourth role, the line keeps its role and the surface is reported as doing two
140
+ jobs.
141
+
142
+ ## Weight
143
+
144
+ **800 names and marks the selected, 700 acts, 650 labels, 450 dates, 400 is
145
+ read.**
146
+
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.
155
+
156
+ **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.
160
+
161
+ ## Tracking
162
+
163
+ **None outside the headings and the eyebrow**, because alisx.com sets Nunito Sans
164
+ at 0.
165
+
166
+ - welcome-title and page-title −0.03em, section-title −0.02em.
167
+ - eyebrow 0.12em, because it is uppercase.
168
+ - Everything else, labels, buttons and tabs included: 0. Set a component
169
+ library's own tracking to 0 once, in its theme; never restate it on a
170
+ component.
171
+
172
+ ## Rules
173
+
174
+ - **Max three roles on one surface.** A fourth means the surface is doing two jobs.
175
+ - **Nested content never outranks its container** (B4).
176
+ - **Emphasis changes weight only.** Never size, never colour.
177
+ - **No italic.** A placeholder value, an agent's transient line and an
178
+ empty-state sentence each already read as what they are from their role and
179
+ ink; italic only makes them a fourth face.
180
+ - **One body size.** Card body and agent prose are both body.
181
+ - **No fractional or unset line-heights.** Both lose the grid.
182
+ - **Nothing below 12px.**
183
+ - **Tabular numerals** wherever values change or align.
184
+ - **Paragraph spacing is one full line.**
185
+ - **Rendered markdown takes this scale** through `.prose`: never its own sizes,
186
+ black or bold runs (C1, B3).