@alis-build/design-system 0.0.0-stage → 0.2.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 +590 -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 +97 -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 +123 -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 +100 -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/page.md ADDED
@@ -0,0 +1,155 @@
1
+ # Page
2
+
3
+ Every screen with a title bar reads the same way, top down.
4
+
5
+ ## Where things go
6
+
7
+ ```
8
+ Where does this go?
9
+ ├─ The name of the screen → the title bar, left
10
+ ├─ Search over the screen's content → the title bar, centre
11
+ ├─ A verb: New, Refresh, Delete → the title bar, right
12
+ ├─ Tabs to another view of this screen,
13
+ │ each its own route → the title bar, under the name
14
+ ├─ A filter that scopes the page: account,
15
+ │ product, period, status, target, or tabs
16
+ │ that narrow one list → the filter row
17
+ └─ A filter inside one pane or one section → that pane or section's header
18
+ ```
19
+
20
+ **A tab that changes the route is navigation; a tab that narrows one list is a
21
+ filter**, and a filter belongs in the filter row as a segmented control
22
+ ([selection.md](selection.md)).
23
+
24
+ ## The title bar
25
+
26
+ [AppTitleBar](../components/AppTitleBar.md), `.app-titlebar`.
27
+
28
+ - **It holds the name, search and verbs, and nothing that narrows the data.** A
29
+ filter in the title slot leaves the screen unnamed; among the actions it reads
30
+ as something you do.
31
+ - **The name is the screen, alone.** Not the project, account or product the
32
+ screen sits in, and never a breadcrumb to it: "Interviews", not "Home ›
33
+ Project 2". The navigation pane already names the container.
34
+ - **One `text-page-title` per screen, and the bar has it.** A body heading that
35
+ stood in for the title drops to `text-section-title`, keeping any scope it
36
+ carries ("Alis Exchange · last 7 days"). An entry screen is the exception
37
+ (§ Empty and entry screens).
38
+ - **Its controls are small icon buttons and default-size text buttons.** The row
39
+ is 40 tall, so a larger control pushes the tabs down; every control keeps its
40
+ 48px hit area ([buttons.md](buttons.md)). Icon buttons stay
41
+ `on-surface-variant`, and a status chip in the bar is small. A control drawn to
42
+ a fixed small size (Ideate's usage ring) keeps it, and its target still projects
43
+ to 48.
44
+ - **An action is a text button, never filled.** The bar is chrome; a screen's one
45
+ filled button belongs in the content ([buttons.md](buttons.md)). Destructive
46
+ takes `error`. A split action is a text button and a `more_vert` icon button
47
+ whose menu holds the alternatives, never an outlined button group.
48
+ - **Controls sit in a row with an 8px gap**, never per-control margins. A leading
49
+ back or close button pulls its glyph onto the 24px edge the title uses.
50
+ - **A search gives way first** on a narrow pane: its width shrinks, so no verb is
51
+ pushed off the bar.
52
+ - **The verbs follow the route**: each route tab shows the verbs that act on what
53
+ it shows, and none when nothing can be done.
54
+
55
+ ## A detail screen
56
+
57
+ The same bar: the close button leading in flow, the name left, and renaming it or
58
+ switching to a sibling as small icon buttons beside the name. Never a centred
59
+ title with the close button pinned absolutely, never the name inside a pill
60
+ button, and never the name again as a title in the body.
61
+
62
+ **A detail pane** beside a list is part of the same screen, which already has its
63
+ page-title, so its bar names the selected thing in `text-section-title`
64
+ (`.app-titlebar--detail`). A notice about that thing sits at the top of the pane.
65
+
66
+ ## The filter row
67
+
68
+ `.app-filterrow`. The first thing in the content, directly above what it scopes,
69
+ scrolling with it. Its controls sit on the right in one row that wraps. The
70
+ control used most, usually the one whose choice reveals the others, sits at the
71
+ right edge so it never moves as they come and go; selects sit to its left. The
72
+ left of the row holds what the scope produces ("24 projects"), or nothing.
73
+
74
+ ## A page-level notice
75
+
76
+ Directly after the title bar, in the flow, never over it or inside it, so it
77
+ moves the content down instead of covering the name. A screen with no title bar
78
+ leads its content with it, or leaves it out.
79
+
80
+ ## Empty and entry screens
81
+
82
+ - **An entry screen that addresses the user** (the Ideate home) leads with
83
+ `text-welcome-title`. An empty state's headline keeps `text-page-title` even
84
+ under the title bar: it fills a pane, not the screen, and it is the one place a
85
+ second page-title appears.
86
+ - **When the screen's list is empty**, the title bar keeps the name and the
87
+ verb, and drops search and the filter row: there is nothing to search or
88
+ narrow.
89
+ - **An empty state that fills its pane speaks to the user**
90
+ ([AppEmptyState](../components/AppEmptyState.md)). Its headline says why you
91
+ would act and never repeats the screen's name: "Hear from the people closest to
92
+ the problem", not "Interviews". One `text-supporting` line says how, once, with
93
+ no second line pointing at the button.
94
+ - **The button repeats the bar's action under the bar's label**
95
+ ([buttons.md](buttons.md) § Naming the action), a text button at the default
96
+ size.
97
+ - **The voice is the product's:** calm, plain, British spelling, contractions, no
98
+ dashes, no promises about how long anything will take (when something happened
99
+ is fine: "3h ago"). The product never contacts anyone on its own: it prepares,
100
+ and the user sends, on a button that names the send ("Send to 3 people").
101
+ Afterwards the copy says what happened, not who did it: "Sent to 3 people".
102
+ - **An empty line inside working content is not this.** "No files yet" in a tab
103
+ is one `text-supporting` line (`.app-empty-line`): no headline, no button, no
104
+ drafting field.
105
+
106
+ ## Forms
107
+
108
+ - **One column at the prose measure** (`measure-prose`), fields 24px apart, the
109
+ one filled action last and labelled with its outcome.
110
+ - **A field is labelled above**, in label type. A set of choices (tiles,
111
+ checkboxes, radios) is labelled once, as a group, the same way.
112
+ - **A field that collects several values** (email addresses, tags) takes one text
113
+ action beside it ("Add"); added values show below as input chips. Enter adds
114
+ too.
115
+ - **Errors appear when the user tries to submit, at the field**: the field turns
116
+ `error` and its supporting line says what to do ("Enter a full email address,
117
+ like name@company.com"), never just "Invalid". Focus moves to the first
118
+ invalid field. No page-level alert as well, unless the failure belongs to no
119
+ field (the server refused, the connection dropped): then one alert at the top
120
+ of the form.
121
+ - **Work in progress shows on the button pressed**; nothing else on the screen
122
+ changes. Counted steps move to a progress bar ([loading.md](loading.md)).
123
+ - **Confirm what is hard to undo or reaches past the user**: deleting, sending to
124
+ people, deploying to production. The dialog restates what will happen as its
125
+ title ("Send this interview to 3 people?", "Delete staging?"), with text
126
+ actions, affirmative last and named by its outcome. An action that can be
127
+ undone needs no dialog; offer Undo in a snackbar instead. **Copying a link**
128
+ needs no dialog, unless the copy creates the link and so lets new people read
129
+ something (then confirm, saying who can read it and what they will see).
130
+ **Regenerating** needs no dialog: the old content stays on screen until the new
131
+ arrives, and a snackbar says when it has.
132
+ - **After it succeeds**, show the result in place: the thing that now exists. If
133
+ its evidence is off-screen or easy to miss, a snackbar confirms it ("Saved",
134
+ "Deleted staging"); a result someone needs to read stays as a success alert
135
+ at the top.
136
+ - **A switch** applies at once on its own, and with the rest on Save inside a form.
137
+
138
+ ## The drafting field
139
+
140
+ The alisx.com hero grid (the `DraftingField` component, or its classes).
141
+ Never redraw it locally or as a one-off background.
142
+
143
+ ```
144
+ Does this screen take the drafting field?
145
+ ├─ An entry screen that addresses the user → yes
146
+ ├─ An empty state that fills its pane,
147
+ │ and invites a first step → yes
148
+ ├─ An empty line in a list, drawer, form, table → no
149
+ ├─ "No results match your filter" → no, that is work
150
+ └─ Anything on a card or in a dialog → no
151
+ ```
152
+
153
+ It needs the whole pane, because its 72px cells are noise in a small block. One
154
+ per screen: where a list pane and a detail pane are both empty, the detail pane
155
+ takes it.
@@ -0,0 +1,125 @@
1
+ # Quick start · build a product screen
2
+
3
+ Everything you need to build a working screen in Ideate, Build or Admin. Use the [rules](README.md) for the reasons, and when something here doesn't decide.
4
+
5
+ ## 1. Load it
6
+
7
+ ```js
8
+ import '@alis-build/design-system/fonts.css' // prototypes only: Google Fonts. Self-host in production.
9
+ import '@alis-build/design-system/alisx.css' // tokens, type classes, product base, .app-* components
10
+ ```
11
+
12
+ Or link the same two files from `node_modules`, or from a CDN at a pinned version. Then write each component's markup from its guide in [components/](../components/README.md): the classes, the ARIA, and the behaviour you supply. That README ends with a finished skeleton of the § 5 screen (a list with a settings pane); start from it rather than blank. The names below (`AppShell`, `AppButton variant="filled"` …) are those components and their variants.
13
+
14
+ ## 2. The skeleton
15
+
16
+ ```
17
+ AppShell product="build"
18
+ ├─ nav AppListRow variant="nav" × destinations (navFoot: Settings, Help)
19
+ ├─ content AppTitleBar name · search · verbs · route tabs
20
+ │ [AppAlert, only for a page-level notice]
21
+ │ .app-shell__content
22
+ │ AppFilterRow "5 environments" ··· AppSegmented / filter AppChips
23
+ │ the list, table or document
24
+ └─ detail (optional) AppTitleBar variant="detail", then the selected thing
25
+ ```
26
+
27
+ ## 3. Which component
28
+
29
+ | You need | Use |
30
+ |---|---|
31
+ | The frame and the navigation rail | `AppShell` |
32
+ | The screen's name, search, verbs | `AppTitleBar`. Verbs are default-size text buttons; no icon on a single verb |
33
+ | The bar of a detail pane | `AppTitleBar variant="detail"`: close, the name in section-title, its verbs on a row below |
34
+ | To narrow one list | `AppFilterRow` + `AppSegmented` (2–5 options) or filter `AppChip`s |
35
+ | A list of things | `.app-list` + `AppListRow`; status as `trailing` small `AppChip kind="status"`; time as `meta`; other facts joined with " · " in `supporting` |
36
+ | Things people compare or sort by their values | `AppTable` |
37
+ | An object you act on | `AppCard variant="instrument"` |
38
+ | Context you don't act on | `AppCard variant="statement"`, or no container at all |
39
+ | Prose you read, a document | `AppLattice`s at the prose measure, `.prose` inside; a quote is a `blockquote` with a `cite` |
40
+ | Questions and answers | `AppTranscript` |
41
+ | Content Alis wrote | a label `AppChip icon="auto_awesome"` "AI-generated", once, at its top |
42
+ | The one action that moves the user forward | `AppButton variant="filled"`, once per surface, labelled with the outcome |
43
+ | Everything else you press | `AppButton` (text), `AppIconButton` |
44
+ | A form | `.app-form` of fields, one filled action last (see § Forms) |
45
+ | Text | `AppTextField` (with `action` for one that collects several values, shown as input `AppChip`s below) |
46
+ | One choice from a list | `AppSelect` |
47
+ | An on/off setting | `AppSwitch` |
48
+ | A choice among cards, labelled | `AppSelectTile`s in an `AppFieldset` |
49
+ | Rendered markdown | `.prose` on the container |
50
+ | A status on a panel | `AppAlert` (the panel is the status) or `AppChip` (the panel has one); states map to tones in [AppChip](../components/AppChip.md) |
51
+ | A result that passes ("Saved", "Deleted") | `AppSnackbar` |
52
+ | A confirmation | `AppDialog` with `onClose`, text actions, affirmative last |
53
+ | Waiting, shape known | `AppSkeleton` in the content's shape |
54
+ | Waiting, shape unknown | `AppLoader` |
55
+ | Work you can count (a deploy, an upload) | `AppProgress`, with `AppSteps` for named stages |
56
+ | Nothing yet | `AppEmptyState` filling the pane; keep the bar's name and verb, hide search and the filter row |
57
+
58
+ ## 4. The values you'll reach for
59
+
60
+ - **Colour**: `primary` (actions only), `on-surface` and `on-surface-variant` (the two inks), `background` / `surface-container-low` / `surface` (ground, statement, instrument), `secondary-container` (selected), `error` `warning` `success` `info`.
61
+ - **Type**: `.text-page-title`, `.text-section-title`, `.text-object-title`, `.text-body`, `.text-supporting`, `.text-meta`, `.text-label`, `.text-eyebrow`. Supporting, meta and eyebrow take `.text-on-surface-variant`. At most three on a surface. `.text-mono` and `.text-emphasis` sit beside a role.
62
+ - **Space**: `space-4` `8` `12` `16` `24` `32` `48`, nothing else. Sections of a pane 24 apart, things within a section 8. **Radius**: `radius-lg` cards and fields, `radius-pill` buttons and chips. **Depth**: `elevation-2` cards, `elevation-3` dialogs.
63
+
64
+ Your own CSS holds layout only: grid, flex, gap, widths. No colours, fonts, borders, radii or shadows ([styling.md](styling.md)). Building something from [known-gaps.md](known-gaps.md) is the one exception, and even then every value is a `var(--…)`.
65
+
66
+ ## 5. A list with a settings pane
67
+
68
+ The screen most product work becomes: a list on the left, the selected item's settings on the right. Everything below is decided.
69
+
70
+ ```
71
+ AppShell product="build" detail={…}
72
+ ├─ content
73
+ │ AppTitleBar title="Environments" search="Search environments"
74
+ │ actions=AppButton "New environment"
75
+ │ .app-shell__content
76
+ │ AppFilterRow summary="5 environments" → AppSegmented All · Healthy · Failed …
77
+ │ .app-list → AppListRow divided title="staging"
78
+ │ supporting="europe-west1 · v1.43.0 · release/1.43"
79
+ │ trailing=AppChip kind="status" tone="error" small "Failed"
80
+ │ meta="3h ago" selected onClick=select
81
+ └─ detail
82
+ AppTitleBar variant="detail" title="staging" leading=AppIconButton close
83
+ actions=[AppButton "Deploy", AppButton tone="error" "Delete"]
84
+ AppAlert tone="error" … only while something is wrong (it stacks here)
85
+ AppProgress steps=[…] only while work runs, or after it failed
86
+ .app-form
87
+ AppTextField "Name"
88
+ AppSelect "Region"
89
+ AppTextField "Branch to deploy"
90
+ AppTextField "Variables" action=AppButton "Add" values=[input AppChips]
91
+ AppSwitch "Deploy on every push" applies with Save, like every field here
92
+ AppButton variant="filled" "Save changes" the pane's one filled button
93
+ ```
94
+
95
+ - **The pane's bar** holds the name in section-title (the screen has the page-title) and the verbs for this thing on their own row, so nothing truncates at 360px.
96
+ - **Save** is the pane's one filled button, last in the form. **Deploy** and **Delete** are verbs, text buttons in the bar.
97
+ - **A long action** (Deploy): the button shows `loading` while the request is accepted; then the bar and steps appear at the top of the pane and the button returns to rest (disabled while the deploy runs). One wait, one indicator. The row's chip says "Deploying" meanwhile.
98
+ - **It fails**: the steps stay, the failed step in `error`, the bar stops in `error`, and an `AppAlert tone="error"` above says what happened and what to do, with one action ("View logs"). The row's chip says "Failed".
99
+ - **It succeeds**: the bar goes, the row's chip says "Healthy", and an `AppSnackbar` says "Deployed v1.43.0".
100
+ - **Delete**: an `AppDialog` titled "Delete staging?", a body saying what goes with it, Cancel then "Delete environment" in `error`. Afterwards the pane closes and a snackbar says "Deleted staging".
101
+ - **View logs** opens the logs where they live (their own screen, outside this system); a prototype links to it.
102
+ - **Deploying to production** is confirmed the same way ("Deploy v1.43.0 to production?"); other environments are not.
103
+ - **Loading** the list: `AppSkeleton` rows in the list's place. **Empty**: `AppEmptyState` in the list's place, with `field={false}` if the detail pane is also empty.
104
+
105
+ ## 6. Forms
106
+
107
+ 1. Validate when the user submits, not as they type. Mark each invalid field (`error="…"` says what to do) and focus the first one through its `ref`.
108
+ 2. Add one `AppAlert tone="error"` at the top only when the failure belongs to no field.
109
+ 3. While it sends, put `loading` on the button they pressed; nothing else changes.
110
+ 4. Confirm what is hard to undo or reaches past the user (sending to people, deleting, deploying to production) in an `AppDialog` that restates it ("Send this interview to 3 people?").
111
+ 5. On success, show the thing that now exists. If the evidence is off-screen or easy to miss, an `AppSnackbar` confirms it ("Saved"); a result someone needs to read gets an `AppAlert tone="success"` at the top.
112
+
113
+ ## 7. Copy
114
+
115
+ Sentence case, British spelling, plain and calm, no dashes, no emoji. Buttons are a verb then the object: **New project**, **Add member**. A filled button names its outcome: "Send the invites", not "Continue". An empty state's headline says why you would act, never the screen's name. An error says what to do next, in a sentence with a full stop. Times are relative and short: "Just now", "5 min ago", "3h ago", "Yesterday", then a date ("3 Oct", three-letter months, with the year only when it isn't this one).
116
+
117
+ ## 8. Before you hand it back
118
+
119
+ 1. Switch off borders and shadows. Can you still see the cards?
120
+ 2. Which button moves me forward? Obvious in one second, and only one is filled?
121
+ 3. More than a couple of bold things? More than three type roles on a surface?
122
+ 4. Any colour, font, radius or shadow in your own CSS?
123
+ 5. A card where spacing would have done? A section nobody asked for?
124
+
125
+ Anything the system didn't cover: [known-gaps.md](known-gaps.md), and say which you hit.
@@ -0,0 +1,119 @@
1
+ # Register
2
+
3
+ Answer this first. Every other rule assumes you have.
4
+
5
+ ```
6
+ What am I building?
7
+ ├─ A screen inside Ideate, Admin or Build: a
8
+ │ shell, thread, table, form, dialog, settings
9
+ │ page → PRODUCT
10
+ ├─ Sign-in, onboarding, an empty state, upgrade → PRODUCT, with the one
11
+ │ crossing below
12
+ ├─ An explainer page inside the product that
13
+ │ sells a capability → EXPRESSIVE (below)
14
+ └─ alisx.com, a landing page, a deck, an email → NARRATIVE
15
+ ```
16
+
17
+ ## Product
18
+
19
+ Material Design 3 is the substrate, and the brand is pulled through it. **Where
20
+ there is no strong contradiction, M3 wins.** Product roles are named as M3 names
21
+ them, so they map onto any M3 implementation.
22
+
23
+ ## The boundary
24
+
25
+ The brand wins on **face, surface, shadow, mark and voice**.
26
+ The product wins on **allocation, accessibility, spacing, icons and status**.
27
+
28
+ These are defects in the product, every time:
29
+
30
+ - The drafting field as app chrome
31
+ - A petrol band as a working surface
32
+ - Four accents: the product has one
33
+ - The narrative radius ladder, or fluid `clamp()` spacing
34
+ - Display weights at body or label size
35
+ - The narrative type scale on a working screen
36
+
37
+ ## The one permitted crossing
38
+
39
+ **Sign-in, onboarding, empty states and upgrade prompts** address the user rather
40
+ than put them to work, so they may use the drafting field and a petrol band
41
+ ([page.md](page.md)). Working screens do not.
42
+
43
+ The test: is the person on this screen **working**, or **being spoken to**? If it
44
+ is genuinely both, it is product with a narrative hero, not a blend.
45
+
46
+ ## Expressive pages
47
+
48
+ An explainer page inside the product may take a bolder treatment:
49
+
50
+ - A drafting-field hero, Nunito Sans 800 display at 64px (48 tablet, 36 phone)
51
+ with tight tracking, and the red terminal mark when the headline has no
52
+ punctuation.
53
+ - Hero copy at 20/32 (18/28 compact) in solid supporting ink, and section
54
+ headings at 36/44 (28/36 phone).
55
+ - Petrol narrative and statistic bands with paired inverse ink, a teal lead
56
+ feature card, and 64px section gaps (48 on a phone).
57
+ - One filled action per hero or closing section; on petrol it is the light filled
58
+ action. Link to destinations and interactions that already exist, rather than
59
+ inventing new ones.
60
+
61
+ The treatment stops at the page's own content. Code, tables, diagnostics, status
62
+ colours and dialogs keep product roles. Never carry the display scale into working
63
+ records or app chrome.
64
+
65
+ ## Narrative
66
+
67
+ alisx.com and everything that addresses a reader. Its tokens are `narrative-*`,
68
+ `band-*`, `on-band-*` and `term-*`; its type is the `narrative-*` and `mono*`
69
+ styles. It never reaches a working screen.
70
+
71
+ ### Voice on alisx.com
72
+
73
+ **Voice.** Declarative, concrete, slightly blunt. Sentences state a fact and stop.
74
+ The page argues by naming a real failure ("Nowhere approved to deploy it.") rather
75
+ than by adjectives. Almost no hype vocabulary: no "revolutionary", no "seamless",
76
+ no "unlock".
77
+
78
+ **Person.** Second person throughout, and specifically *you and your
79
+ organisation* as a pair. Almost every capability is argued twice:
80
+
81
+ > **For you** — Your agent already knows how things are done here.
82
+ > **For your organisation** — Standards that run, instead of standards in a wiki.
83
+
84
+ First person plural appears only where the company itself acts: "We'll introduce
85
+ you to the partner who built it."
86
+
87
+ **Spelling and casing.** British English: *industrialise*, *optimised*,
88
+ *organisation*, *prioritise*. Sentence case everywhere except the uppercase
89
+ micro-labels (eyebrows, part tags, key labels). Product names follow
90
+ [README.md](README.md).
91
+
92
+ **Headline construction.** Short, ending in a full stop, with a non-breaking space
93
+ binding the last two words so the balance never orphans:
94
+
95
+ > Everything your AI needs to go from knowing to doing.
96
+ > Intelligence without structure is costly chaos.
97
+ > Start from a blueprint that already works.
98
+
99
+ Headlines that turn on a pivot break at the pivot, one clause per line: the break
100
+ is authored, not left to `text-wrap`.
101
+
102
+ **The prompt as copy.** The page's signature device: every capability is also
103
+ expressed as a line you could paste into your own agent, in monospace behind a
104
+ red caret.
105
+
106
+ > ❯ Create an Alis Ideate interview for everyone who touches this process.
107
+ > ❯ Run alis define, then build and deploy this to our dev environment.
108
+
109
+ Prompts are written as real instructions: imperative, second person, sentence
110
+ case, ending in a full stop, never truncated.
111
+
112
+ **Parallelism.** Lists are strictly parallel and often anaphoric: *Always up to
113
+ speed. Always with you. Always collaborative. Always improving. Always governed.*
114
+ Each is one bold clause plus one plain sentence.
115
+
116
+ **Numbers.** Only where they are real. No invented stats, no "10x", no percentage
117
+ claims.
118
+
119
+ **Emoji.** None. Not in copy, not in UI, not in headings.
@@ -0,0 +1,111 @@
1
+ # Selection
2
+
3
+ **Selection is a petrol tonal fill, always carried by two properties.**
4
+
5
+ ## The decision
6
+
7
+ ```
8
+ Is this thing selected?
9
+ ├─ Yes → fill secondary-container
10
+ │ ink on-secondary-container
11
+ │ icon FILL 1 + weight 500
12
+ │ text weight 800 (.text-selected)
13
+ └─ No → transparent, on-surface-variant, icon FILL 0 + weight 400,
14
+ text at its role's own weight
15
+ ```
16
+
17
+ **Never colour alone.** Where a glyph has no filled version its weight still
18
+ changes, and where a glyph is identical filled and unfilled, selection rests on
19
+ weight alone. That is accepted; don't work around it locally.
20
+
21
+ **Selected text is 800** everywhere: list rows, the rail, tabs, segments and
22
+ tiles, one step above every role. Never 500. The selected component carries the
23
+ weight down to its title or label child, and turns a child's secondary ink to
24
+ `on-secondary-container` on the fill. Write the child's role as anywhere else;
25
+ never restate selection on a child.
26
+
27
+ ## Two strengths, one mechanism
28
+
29
+ ```
30
+ Where does this selected thing live?
31
+ ├─ Permanent chrome: on screen always,
32
+ │ a flat list on a flat ground → selection-chrome
33
+ └─ Everything else → secondary-container ← almost always
34
+ ```
35
+
36
+ **Permanent chrome is the app's navigation pane (the rail), and nothing else**,
37
+ so this is a lookup, not a judgment. A navigation list inside content is content.
38
+ Everything on a content plane takes the full fill, which has to clear the
39
+ `surface-container-highest` icon tiles beside it.
40
+
41
+ Petrol rather than M3's lilac, because lilac is also `cat3-container` and a
42
+ categorical chip beside a selected segment would share a fill.
43
+
44
+ ## Interaction states
45
+
46
+ A state layer (`.app-state`) is `on-surface` (or the control's own ink) laid over
47
+ the element:
48
+
49
+ - **Hover**: `state-hover`, 4%.
50
+ - **Focus**: capped to hover's opacity (`state-focus`, 4%), because at M3's
51
+ default a focused row looks selected. Focus is carried by a **2px `primary`
52
+ outline at 1px offset**, never removed.
53
+ - **Pressed**: `state-pressed`, 12%, on purpose: you press a row to select it.
54
+
55
+ Never add a third neutral step between hover and selection, and never hand-write
56
+ a hover fill: a plain element that needs hover, focus and press takes the state
57
+ layer. A drop target, while something is dragged over it, is `.drop-target`: a
58
+ 2px dashed `primary` outline and a `primary` wash at `state-dragged`, not a hover.
59
+
60
+ ## The selection tile
61
+
62
+ [AppSelectTile](../components/AppSelectTile.md): a card chosen among others.
63
+ Unselected it is the statement; selected it takes `secondary-container`, a filled
64
+ check and the selected weight, at the same size so nothing moves. **It is the
65
+ only way a chosen card is drawn:** never a tonal tint, a ring, a background swap
66
+ or a tonal/outlined switch.
67
+
68
+ Check the shape first: a fixed set of 2 to 5 that re-parameterises content in
69
+ place is a segmented control; a data-driven set is filter chips; a list is list
70
+ rows; a toggle is [buttons.md](buttons.md) § Icon buttons.
71
+
72
+ ## Rows and chip groups
73
+
74
+ - **A content-plane list row takes the full fill** and the selected weight
75
+ ([AppListRow](../components/AppListRow.md)).
76
+ - **A dense row may use a checked control as its second property.** Where a
77
+ checkbox already reports the state, the fill plus the checked box is the pair
78
+ and weight is left alone.
79
+ - **A selected filter chip** takes the selection fill
80
+ ([AppChip](../components/AppChip.md)).
81
+
82
+ ## Segmented controls · one track, one pill
83
+
84
+ A group of outlined toggle buttons is a segmented control
85
+ ([AppSegmented](../components/AppSegmented.md)). The outline belongs to the group:
86
+ one pill track with 4px of padding, which leaves room for the focus outline. The
87
+ selected segment is a `secondary-container` pill inset inside it, in
88
+ `on-secondary-container` at 800; the rest are transparent, in
89
+ `on-surface-variant` at 650. No dividers, no per-segment border. The system draws
90
+ the track, inks, weights and inset; never restyle a group locally.
91
+
92
+ ## A mark whose fill is already meaning
93
+
94
+ A data mark, like a timeline span or a diagram node, may already encode something
95
+ in its fill. **Selection rings it instead**: a 2px `on-surface` outline at 2px
96
+ offset. This is the one place an outline means selection, so hover (1px
97
+ `primary`), focus (2px `primary`) and selection must each look different, and
98
+ focus wins over selection. The mark's label takes ink at the selected weight,
99
+ never `primary`.
100
+
101
+ ## Near selection, and not it
102
+
103
+ - **Where you are** (the card a link points at, the machine you are on) is
104
+ location: a chip that says so, no fill. Choosing an account from a list is a
105
+ selection, not location: the fill and `check_circle`.
106
+ - **A step** in a sequence: done is a check, current a filled number in ink, next
107
+ an outlined number. Never `primary`.
108
+ - **Unread** is emphasis, 600, and a dot. No fill.
109
+ - **A button, a hover and a badge are not selections.** A button never shows an
110
+ active state to mean "current", and a row's badge hides once the row is
111
+ selected.
@@ -0,0 +1,88 @@
1
+ # Spacing, shape and depth
2
+
3
+ ## Space
4
+
5
+ **4 · 8 · 12 · 16 · 24 · 32 · 48. Nothing else** (D1). Tokens are named by
6
+ value: `space-4` … `space-48`.
7
+
8
+ | Context | Value |
9
+ |---|---|
10
+ | Card padding | 24, and 28 from 600px wide (`card-padding-wide`) |
11
+ | Between paragraphs | 24 |
12
+ | Between turns in a thread | 32 |
13
+ | Card to its caption | 8 |
14
+ | Minimum hit area | 48 (`touch-target`) |
15
+
16
+ **Card padding's 28 is the scale's one exception.** The card sets it on every one
17
+ of its parts, so a wide card breathes without anyone choosing a value; never
18
+ write it at a site.
19
+
20
+ **In a 48px table row, the row is the target.** A small button there is fine;
21
+ anywhere else it is D6.
22
+
23
+ **The agent chat list is 32px, and it is the only list that is** (`chat-row`,
24
+ `.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.
30
+
31
+ **It does not generalise.** Not to projects, collections, files, members,
32
+ another pane or another history, however alike they look. It is not a density
33
+ option: there is no dense variant, prop or class to reach for, on purpose. A
34
+ second case is ruled on its own, never applied by similarity.
35
+
36
+ ## Shape
37
+
38
+ **4 / 8 / 12 / 16 / 28 / pill.** Radius climbs with the size of the object.
39
+ Buttons and pills are `radius-pill`, tables are `radius-0`, cards and text
40
+ fields are `radius-lg` (16) with a `radius-md` (12) inset, so the corners stay
41
+ 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`.
43
+ There is no 24px step.
44
+
45
+ Radius is a dial. If it moves, change the token and move the inset with it,
46
+ never one card.
47
+
48
+ **A divider runs straight.** A row that carries a top or bottom border takes no
49
+ radius on that edge. In a rounded container only the first row takes the top
50
+ radius and the last the bottom, so the state layer still fits. Don't clip the
51
+ container (`overflow: hidden`), which clips a focus ring.
52
+
53
+ ## Depth
54
+
55
+ **Three levels, one brand recipe:** a 1px contact shadow plus a wide diffuse one,
56
+ in cool petrol rather than black.
57
+
58
+ - **`elevation-1`** resting
59
+ - **`elevation-2`** a card, the composer, sticky things, menus
60
+ - **`elevation-3`** dialogs and overlays
61
+
62
+ One shadow per level, never the Material 2 three-layer stack (A3), and never a
63
+ shadow on a flat surface.
64
+
65
+ **Hover never lifts.** A card rests at its level; a clickable card's hover is its
66
+ state layer ([selection.md](selection.md)).
67
+
68
+ **One border colour family:** `outline` for a rule, `outline-variant` for a
69
+ divider inside a surface.
70
+
71
+ ## Measure
72
+
73
+ **Prose is 710px wide** (`measure-prose`), about 84 characters. Thread content is
74
+ short paragraphs read in bursts, so the print range of 45 to 75 doesn't apply;
75
+ 540px was measured and rejected.
76
+
77
+ - A table in prose caps at 710px; as a view of its own it takes the full width,
78
+ because a table is scanned, not read.
79
+ - **All thread content shares one column and one set of edges.**
80
+ - **Persistent chrome aligns to the content column**, not to the viewport.
81
+
82
+ ## Layout
83
+
84
+ - Lay out sibling groups with flex or grid and `gap`. Never margins on each child,
85
+ never whitespace between inline elements.
86
+ - **A fixed height on anything containing text is a defect.** Let it grow.
87
+ - Nothing is positioned absolutely except decoration and overlays.
88
+ - Mobile is in scope for every rule here.