@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
@@ -0,0 +1,121 @@
1
+ # Buttons
2
+
3
+ **Emphasis is allocated, not chosen.** Don't ask which style a button is; ask
4
+ how many actions share this surface (a card, a dialog, a bar) and which one moves
5
+ the user forward.
6
+
7
+ ## The decision
8
+
9
+ ```
10
+ Which style?
11
+ ├─ Is this the ONE thing that moves the user
12
+ │ forward on THIS surface? → filled max 1, or 0
13
+ ├─ Is it destructive? → error colour, level unchanged
14
+ └─ Everything else → text: the default
15
+ ```
16
+
17
+ ## Two rungs, and nothing else
18
+
19
+ **Text** (the default, never written out) and **filled** (allocated).
20
+
21
+ - **Outlined is out**: it fakes a middle rung. A segmented control keeps its
22
+ track ([selection.md](selection.md)).
23
+ - **Tonal is suspended**, because nobody could say when it earns its place. It
24
+ returns only for a named surface with two consequential actions at the same
25
+ step, with the reason written down.
26
+ - **No button without its state layer**: a "plain" text button that drops the
27
+ hover and press feedback is out.
28
+ - No elevated buttons, no shadow and no border on a button.
29
+
30
+ ## What earns the filled button
31
+
32
+ An **action of consequence**: it writes, sends, commits, or takes the user out of
33
+ the flow. Reads, expands, toggles, client-side filters and inspections never
34
+ qualify, so "Load more" stays text, and opening a dialog is not the write: the
35
+ dialog's own action is.
36
+
37
+ A filled button promises something will happen, so it is never a no-op, and **its
38
+ label names the outcome**: "Send the invites", not "Continue".
39
+
40
+ ## Colour
41
+
42
+ A button is `primary` (the default, never written), `error` when destructive, or
43
+ `on-surface-variant` for a quiet action beside content. Nothing else: a status is
44
+ a chip (B8).
45
+
46
+ **One exception: a capture in flight is red**, because every recorder marks a
47
+ live capture that way, and a user who can't find the badge doesn't believe it
48
+ stopped. The clause is exactly **a capture running right now, on the control that
49
+ stops it**, filled in `error`, and the label still names the outcome:
50
+ "Stop recording · 0:42".
51
+
52
+ ## The form: text only, unless scanned
53
+
54
+ **The default is no icon**, because an icon draws attention and emphasis is
55
+ rationed. Add a leading icon only when **both** hold: the button sits in a set of
56
+ similar controls people scan repeatedly, and the glyph is conventional.
57
+
58
+ - **Never on the filled primary**, and never on a dialog action.
59
+ - One icon, leading. The only trailing icon is a chevron meaning "opens a menu".
60
+ - An icon belongs to the action, not the instance: "Delete" is iconed everywhere
61
+ or nowhere.
62
+
63
+ ## Rules
64
+
65
+ - **One primary per surface, or none.** Two filled buttons on one card is B1.
66
+ - **A dead primary is worse than no primary.** If the main action is disabled by
67
+ default, don't render it filled (B5).
68
+ - **Dialogs: all text, trailing edge, affirmative last.** Destructive changes only
69
+ colour.
70
+ - **A 48px hit area, always, desktop included.** The visible box keeps its size
71
+ and the target extends beyond it (`touch-target`, `.app-target`), so rows don't
72
+ grow. A button in a toggle group or a table row is exempt: its neighbours are
73
+ 4px away, and overlapping targets steal each other's clicks. So is the menu
74
+ button on an agent chat row, whose 32px row would let a 48px target reach into
75
+ the chats either side ([spacing.md](spacing.md)).
76
+ - Button text is 14px at 700 with no tracking, set once by the button, never at a
77
+ site ([type.md](type.md) § Weight). Verb first, sentence case, no full stop.
78
+ - Groups sit in a row with `gap`.
79
+ - **A filled button answers a press**: it scales to 97% and rounds to 12px over
80
+ `dur-spatial` on `motion-spatial`, then settles. The button owns it: never on an
81
+ icon button, a tab or a disabled button, never under reduced motion, and a site
82
+ never animates a press itself.
83
+
84
+ ## Naming the action · New or Add
85
+
86
+ The action that brings a thing into a screen is a verb, then the object in the
87
+ singular, in sentence case.
88
+
89
+ ```
90
+ Did this thing exist before the action?
91
+ ├─ No, it is made here → New New project · New interview · New output
92
+ └─ Yes, it joins this place → Add Add member · Add seat · Add contribution
93
+ ```
94
+
95
+ - **One object, one label, everywhere it appears:** the title bar, an empty
96
+ state, a menu. Not Create, Generate new or Get started: the first two are more
97
+ words for New, and the last drops the object.
98
+ - **A product name keeps its capital and the object doesn't:** "New build
99
+ environment".
100
+ - **It names what brings a thing into a screen, not work inside one.** "Add a
101
+ follow-up round" edits an interview that exists. Plural only when one action
102
+ brings several: "Add participants".
103
+ - **The button that opens the dialog is text** ([page.md](page.md)); the dialog's
104
+ affirmative action names the outcome.
105
+
106
+ ## Icon buttons
107
+
108
+ [AppIconButton](../components/AppIconButton.md), never a button holding only a
109
+ glyph. A 20px glyph in a 48px hit area, in `on-surface-variant`: no fill, no
110
+ border, no shadow, no product colour. A tooltip names the action, and is required.
111
+
112
+ **It is a glyph, and it is an action.** If it shows a word, it is a
113
+ [AppButton](../components/AppButton.md). If it does nothing on its own (a chevron
114
+ whose row carries the click), it is an icon.
115
+
116
+ **An icon button is not a selection**, with one exception: **a toggle**, a button
117
+ that is on or off and stays that way, in a toggle group or alone. It may carry
118
+ the `secondary-container` fill as its selected state, because toolbar controls
119
+ sit shoulder to shoulder and a selection tile would be far too loud. A button
120
+ that navigates or acts never shows selection, and a button's active or pressed
121
+ style never means "current".
@@ -0,0 +1,77 @@
1
+ # Chips and alerts
2
+
3
+ **A chip is a container for a small fact. It is not a button**, so the button
4
+ ladder doesn't apply to it.
5
+
6
+ ## Chips
7
+
8
+ ```
9
+ What is this chip?
10
+ ├─ A status or a category → tonal, the status or cat role
11
+ │ (colour + label = two properties)
12
+ ├─ A label: a fact that is neither → tonal, on-surface-variant
13
+ ├─ An input, an assist, a filter → outlined, on-surface-variant
14
+ ├─ A selected filter → the selection fill (selection.md)
15
+ └─ Something you press → ask what the press DOES:
16
+ ├─ it acts: writes, sends, → it is a button (buttons.md)
17
+ │ navigates, starts, stops
18
+ └─ it only opens the detail → it stays a chip, pressable, with a
19
+ behind the status it shows tooltip naming the action
20
+ ```
21
+
22
+ - **A label** is a publisher, a version, "AI-generated", "3 days", an echoed
23
+ selection. Neutral tonal keeps it apart from a status (a colour that means
24
+ something) and a filter (outlined, pressable).
25
+ - **A chip you can close is an input**, not a label: outlined, and never a fill
26
+ with a border.
27
+ - **A pressable chip is judged by what the press does.** Following a link is
28
+ navigation, so it is a button. A chip that stays pressable is a real pressable
29
+ element, with the state layer and a tooltip that names the action. A click that
30
+ duplicates a button beside it is removed.
31
+ - **Tonal and outlined only.** A filled chip reads as a filled button, and a text
32
+ chip with a hand-drawn border is outlined, badly.
33
+ - Never `primary` on a chip you cannot press (B8).
34
+ - Full radius, one icon at most. A chip sets its own type ([type.md](type.md)).
35
+
36
+ **One exception: an opaque fill** (`.app-chip--opaque`), where a translucent
37
+ tonal fill cannot work: non-interactive chips that overlap and would darken at
38
+ every overlap, and a label that straddles a card's edge and has to hide the line.
39
+
40
+ Variants and the states table: [AppChip](../components/AppChip.md).
41
+
42
+ ## Alerts
43
+
44
+ An alert is a **statement carrying a status**: tonal, one status role, an icon,
45
+ sentence-case copy. Never filled (B7), never `primary`, never more than one on a
46
+ surface. A button in it is text.
47
+
48
+ **A panel that is the status is an alert; a panel that has one carries a chip.**
49
+ A row, card or panel with a status keeps its neutral fill and shows the status as
50
+ a tonal chip or a status icon, never a tint or a coloured border. A button is
51
+ never a status either: a pending invite or a passing check is a chip. The one
52
+ tint allowed is a diff's, beside + and − (a drawing, [styling.md](styling.md)).
53
+
54
+ ## Avatars
55
+
56
+ Icon tiles and initials take `surface-container-highest` with `on-surface` ink; a
57
+ categorical avatar takes a `catN` pair. Never a status role, never `primary`.
58
+
59
+ **A logo takes no ground.** It arrives with its own, so no disc and no white plate
60
+ behind it. The tile returns only when the logo is absent and a drawn mark stands
61
+ in.
62
+
63
+ ## Snackbars
64
+
65
+ Level 3 on `surface-variant`, light: the inverse surface belongs to machine
66
+ speech. One text action at most. When to use one, and for how long, is in
67
+ [AppAlert](../components/AppAlert.md) § AppSnackbar.
68
+
69
+ ## States of a thing
70
+
71
+ A lifecycle state is a status chip when it is one of the four statuses, and a
72
+ neutral label chip with an icon when it is not: ready or healthy is `success`;
73
+ in progress (deploying, running) is `info`; failed is `error`; needs attention
74
+ is `warning`; stopped, paused, cancelled, closed, declined, archived, queued,
75
+ not started and draft are labels.
76
+ In progress is never `signal`: signal is the mark and the caret, never a state.
77
+ [AppChip](../components/AppChip.md) has the full table.
@@ -0,0 +1,99 @@
1
+ # Colour
2
+
3
+ ## The one rule
4
+
5
+ **`primary` is the only actionable colour.** If it is coloured and not primary,
6
+ it is not something you press.
7
+
8
+ ## The decision
9
+
10
+ ```
11
+ What is this colour for?
12
+ ├─ Something the user can act on → primary
13
+ ├─ A failure or a destructive action → error
14
+ ├─ Alis is on it → signal: the mark, the caret, the loader
15
+ ├─ Which product am I in → a product tone, identity only
16
+ ├─ A selected thing → selection.md
17
+ ├─ Success / warning / info → the status roles
18
+ └─ Anything else → it is ink, not colour
19
+ ```
20
+
21
+ ## Ink
22
+
23
+ **`on-surface` and `on-surface-variant`, and no third** (D3). They are alisx.com's
24
+ ink, value for value. Write the role, never an opacity of another ink: an opacity
25
+ matches `on-surface-variant` only over the ground, and drifts on every other
26
+ surface. On a `secondary-container` fill, ink is `on-secondary-container`, because
27
+ the second ink falls below AA there.
28
+
29
+ ## The two reds
30
+
31
+ - **`signal`** is the caret, the cursor, the Alis mark and the loader. It means
32
+ *Alis is on it*: the agent at work, or content on its way ([loading.md](loading.md)).
33
+ Never a fill, a control or a state. A page that wants the brand in an
34
+ illustration draws the mark, the dotted grid, never a shape filled red.
35
+ - **`error`** is failure and destructive actions, and never animates. The one
36
+ exception is a live microphone: its recording dot pulses in `error`, always
37
+ beside the word *Recording*, because that is the privacy signal people already
38
+ read.
39
+
40
+ A notification badge is `error`, never `primary` (B8).
41
+
42
+ **Never write `secondary`.** M3's `secondary` slot is not part of this system: in
43
+ Alis's history it held the logo red, and reaching for it paints an error signal on
44
+ a neutral action (D4).
45
+
46
+ ## Product tones · wayfinding, never action
47
+
48
+ **Ideate's tone is `primary`; Build's is `build`.** There are no others: add one
49
+ only when a product has a surface to colour, and measure it first.
50
+
51
+ A tone may colour the app header's identity bar, a product switcher, a page-title
52
+ eyebrow and a lattice tick. It never colours a control, a link, a state, a chart
53
+ series or a selected row: that gives the product four accents. On a chip naming a
54
+ product the tone lives only in the glyph, and the chip is a label
55
+ ([chips-alerts.md](chips-alerts.md)), never a status.
56
+
57
+ ## Status
58
+
59
+ Four roles, `error`, `warning`, `success`, `info`, weight-matched at about L\* 40
60
+ so no status outranks another, and never borrowed from the accent ramp. A new
61
+ semantic colour is measured against the set it joins, not only against white, and
62
+ never taken from a framework default (D5).
63
+
64
+ `warning` fails AA as text, so it is never text ink: an icon in `warning` carries
65
+ it ([type.md](type.md)).
66
+
67
+ There are **no status containers.** A tint on a panel is colour carrying meaning
68
+ alone; a chip or an alert carries the status ([chips-alerts.md](chips-alerts.md)).
69
+
70
+ ## Categories
71
+
72
+ `cat1` … `cat6` tell categories apart: chart series, diagram node kinds, grouping
73
+ chips. Never emphasis, never state. Assign them in order, never by hash, so the
74
+ first category always reads as the brand. Past six, stop using colour and group
75
+ the tail into a neutral "Other". A solid takes `on-cat` (white); a `catN-container`
76
+ takes `on-surface`, and never carries meaning without a label or icon beside it.
77
+ A neutral chart mark is `chart-neutral`.
78
+
79
+ ## Marked text, the dark ground, the scrim
80
+
81
+ - **`highlight`** (with `on-highlight` ink) marks text: a comment's anchor, a
82
+ search hit, a transcript match. Never a status, a category or a selection. The
83
+ active mark is the same fill plus an underline.
84
+ - **`inverse-surface`** with `on-inverse-surface` is the ground for machine speech
85
+ only: a dark code block, a terminal, a canvas that draws light on dark. A dialog
86
+ hero or a band is never dark in the product, and a media stage is black
87
+ ([styling.md](styling.md)).
88
+ - **`scrim`** is the black behind text laid over an image, and with a drawing the
89
+ one place a role takes an alpha ([styling.md](styling.md)).
90
+
91
+ ## Every colour decision
92
+
93
+ - **No new hexes**, and **name only roles the system defines**: an undefined role
94
+ often doesn't fail, it falls through to the framework's default colour (D5). If
95
+ the colour you want is not a role, you are solving the wrong problem.
96
+ - Body text clears **4.5:1**. Headline-scale type and graphical objects clear
97
+ **3:1**.
98
+ - **No colour encodes anything on its own.** Pair it with a shape, an icon or a
99
+ label.
package/rules/icons.md ADDED
@@ -0,0 +1,65 @@
1
+ # Icons
2
+
3
+ **Material Symbols Outlined, and the capability marks**, Alis's own set. No other
4
+ library, and nothing else hand-drawn. Self-host the subset you use.
5
+
6
+ ## Sizes and axes
7
+
8
+ - **20px** by default; **24px** in the navigation pane and app bar.
9
+ - Unselected `FILL 0`, `wght 400`; selected `FILL 1` and weight 500
10
+ ([selection.md](selection.md)).
11
+ - `GRAD` is pinned to 0 in the subset, so it is not available for an active state.
12
+
13
+ ## Rules
14
+
15
+ - An icon never appears without a label or an accessible name.
16
+ - Icons inherit `currentColor`. **Never set a fill on the glyph.**
17
+ - **No emoji, ever**, and no unicode substitutes except the three the brand owns:
18
+ `❯` the prompt caret, `◼` the agent's reply mark, `→` a trailing link arrow.
19
+ - Prefer an icon's current name over a legacy one that still resolves (`mail`,
20
+ not `email`).
21
+
22
+ ## The capability marks
23
+
24
+ **One mark per primary tool, drawn to sit beside Material Symbols.** They are
25
+ icons, not brand marks: each names its tool wherever a symbol would.
26
+
27
+ | Name | Tool |
28
+ | --- | --- |
29
+ | `alis_projects` | Ideate projects |
30
+ | `alis_interviews` | Ideate interviews |
31
+ | `alis_artifacts` | Ideate artifacts |
32
+ | `alis_environments` | Build environments |
33
+ | `alis_skills` | Skill store |
34
+ | `alis_workstations` | Remote workstations |
35
+
36
+ - **Use one by name, exactly like a symbol**: route every `alis_` name in your
37
+ icon layer to the mark's geometry, so a site writes the name and never imports
38
+ the `CapabilityMark` component or inlines the SVG.
39
+ - **A mark means its tool.** Never reuse one for something else, and never add a
40
+ seventh without a seventh primary tool.
41
+ - **The geometry is the system's**, keyed by these names. A revision replaces it
42
+ at the source; a site never redraws a mark.
43
+ - **Otherwise, a symbol's rules:** a label or an accessible name, `currentColor`,
44
+ no fill set on it, and no product tone on a control ([colour.md](colour.md)).
45
+ - **The stroke is graded by rendered size:** 1.9 under 20px, 1.6 from 20 to 55px,
46
+ 1.4 above. Exactly one solid dot per mark: the live element. If your icon layer
47
+ cannot tell the mark its rendered size, it gets 1.6, which is right only for
48
+ the two icon sizes.
49
+ - **A selected mark does not change.** It has no filled form, so its row carries
50
+ selection through the fill and the label's weight ([selection.md](selection.md)).
51
+
52
+ ## Auxiliary areas
53
+
54
+ Activity is `monitoring` and Support is `support`. An auxiliary group of
55
+ destinations is told apart by its container (its own section of the navigation
56
+ pane), never by drawing new glyphs.
57
+
58
+ ## Brand marks are not icons
59
+
60
+ - **The Alis mark**: never recoloured to a product tone, never rotated, never
61
+ boxed.
62
+ - **Harness marks** (Claude, Copilot, Codex, Cursor, Antigravity, OpenCode): one
63
+ colour, at text size, for nominative "works with" use only. Never in a vendor's
64
+ brand colour.
65
+ - Product lockups are assets. Never reconstruct one by hand.
@@ -0,0 +1,34 @@
1
+ # Known gaps
2
+
3
+ What the system doesn't decide yet, in one place. When you hit one, take the quieter option, build it from role tokens (`var(--…)`, never a literal), mark it `GAP` in a comment, and say so when you hand the work back.
4
+
5
+ ## Components not in the set
6
+
7
+ - **Menus**, and the overflow menu behind a `more_vert` icon button. Until there is one, keep the verbs visible as text buttons.
8
+ - **Comboboxes** (a searchable or multi-value select) and **date and time pickers**. Use `AppSelect` or a text field with a format hint.
9
+ - **Checkboxes and radios** as standalone controls. A labelled set of choices is `AppSelectTile`s in an `AppFieldset`; an on/off setting is `AppSwitch`.
10
+ - **Tooltips** beyond the native `title` that `AppIconButton` sets (the product's opens below after 200ms, at most 240px wide).
11
+ - **The marketing components** (`.ax-*`, alisx.com) are not in this package: it covers the product register. A layout class for a grid of lattices is missing too.
12
+ - **What the Skill store and the Specialists offer**, beyond their one-line descriptions in [README.md](README.md). Marketing copy about them needs a product brief.
13
+ - **Tabs outside the title bar**, **avatars** as a component ([chips-alerts.md](chips-alerts.md) has the rule), **file upload**, and a **dismissible alert**.
14
+
15
+ ## Open patterns
16
+
17
+ - **Navigation inside a project.** Open objects can sit in the navigation pane as secondary rows under a heading ([AppShell](../components/AppShell.md)), and an object's own views are route tabs in its title bar. A project's own destinations beside the app's have no pattern yet.
18
+ - **Versions of generated content.** Regenerating replaces a synthesis; keeping or comparing earlier versions has no pattern.
19
+ - **A log viewer.** "View logs" goes to the logs' own screen; there is no pattern for showing logs inside a pane.
20
+ - **Each product's destinations** (what Alis Build's navigation pane lists) are product content, not part of this system. Use the capability marks for the tools they name.
21
+ - **Hairline weight.** Dividers and tracks use `outline-variant`; some shipped screens draw them lighter, at `on-surface` 12%. Not yet settled.
22
+
23
+ ## Open values
24
+
25
+ - `term-ok` (`#4CAF50`) and `term-reply` (`#FFC107`) are Material defaults on alisx.com's terminal: a stock palette (D5). They need measured brand replacements on `petrol-950`.
26
+ - `surface-variant` and `surface-container-highest` hold one value (`#E6E8EB`) for two jobs.
27
+ - `cat5-container` (`#F4F4FB`) sits very close to white; measure it against the ground.
28
+ - Long-form document surfaces have no ruled measure beyond 710px prose.
29
+ - No dark theme.
30
+
31
+ ## Assets
32
+
33
+ - No font files are vendored. `fonts.css` loads Nunito Sans and Material Symbols from Google Fonts, for prototypes; in production, self-host them (Material Symbols as the subset you use).
34
+ - The coding-agent ("works with") marks are not in this package; alisx.com carries them.
@@ -0,0 +1,71 @@
1
+ # Loading
2
+
3
+ ## The one rule
4
+
5
+ **If you know the shape of what is coming, draw the shape. If you do not, show
6
+ the mark.** Nothing else stands in for content. No spinner outside a control.
7
+
8
+ ## The decision
9
+
10
+ ```
11
+ What is the screen waiting for?
12
+ ├─ Content whose shape you know → a skeleton in that shape
13
+ ├─ Content whose shape you do not know → the mark
14
+ ├─ Content already on screen, again → keep it; nothing new appears
15
+ ├─ Something the user just did → the control they did it with
16
+ ├─ Progress you can count, like a deploy
17
+ │ or an upload → a determinate progress bar (AppProgress)
18
+ └─ Not sure → the skeleton, the quieter option
19
+ ```
20
+
21
+ ## Knowing the shape
22
+
23
+ **You know the shape when you could draw the loaded screen with the words blanked
24
+ out:** a list, a table, a card grid, a document column, a form, a dashboard of
25
+ known cards.
26
+
27
+ **You do not when the data decides the layout:** a file rendered in its own
28
+ format, an embedded frame, a generated UI, an agent's reply, or a wait that
29
+ decides which screen comes next (an invitation link, account setup, a handoff).
30
+
31
+ ## A skeleton
32
+
33
+ - **It is the layout with the words taken out**, not a gesture at one: the rows,
34
+ columns and rhythm the content will take. A two-line list gets two-line rows; a
35
+ table gets table rows inside the table ([AppSkeleton](../components/AppSkeleton.md)).
36
+ - **It fills what is visible, once.** Never more rows than the region shows.
37
+ - **It paints no surface** ([surfaces.md](surfaces.md)), and always shimmers: never
38
+ a static placeholder.
39
+
40
+ ## The mark
41
+
42
+ - **The Alis mark, animated** ([AppLoader](../components/AppLoader.md)). It is
43
+ known by its shape and every variant settles into it, so the motion may change
44
+ from wait to wait. Never pin one variant for a wait.
45
+ - **Two sizes.** In a pane, 84px tall, centred in the region it stands for. On a
46
+ line, 20px, where the content will appear. Nothing between.
47
+ - **Once per wait.** Never per tile, row or card. A grid whose shape you know is a
48
+ grid of skeletons.
49
+ - **No "Loading…".** A line under the mark names what is coming, and only when
50
+ the wait is long enough to need one: *Setting up your interview*.
51
+ - **Never inside a control.** A button, a field or a chip keeps its own small
52
+ progress indicator, and the spinner stays there.
53
+ - **It is `signal`** ([colour.md](colour.md)) and holds still under reduced
54
+ motion. Both belong to the loader; a site never sets its colour.
55
+
56
+ ## Every wait
57
+
58
+ - **One wait, one indicator.** A parent waiting on the same data as its child
59
+ waits blank. A route shell's title doesn't skeleton beside the view's body.
60
+ - **A long action the user started** shows on the button they pressed only until
61
+ the work is accepted. If it then runs in steps you can count, the progress bar
62
+ takes over where the result will appear and the button goes back to rest
63
+ (disabled if it can't run twice). Never both at once.
64
+ - **It stands where the content will stand**, in the same conditional that
65
+ renders the content. Never beside it, above it or over it.
66
+ - **What is on screen stays on screen.** A refetch, a poll or a regeneration
67
+ never blanks content or turns it back into a skeleton. A refresh the user asked
68
+ for shows on the control they pressed.
69
+ - **An empty state is an answer, not a wait.** Never show "No … yet" before the
70
+ first response is back: start in the loading state, or gate the empty state on
71
+ having loaded.
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.