@alis-build/design-system 0.50.1 → 0.52.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/alisx.css +29 -0
- package/classes.json +11 -0
- package/components/AppCodeField.md +63 -0
- package/components/AppSignIn.md +37 -4
- package/components/README.md +1 -0
- package/package.json +1 -1
- package/rules/README.md +8 -6
- package/rules/anti-patterns.md +10 -2
- package/rules/buttons.md +3 -1
- package/rules/quick-start.md +1 -0
- package/rules/register.md +65 -21
- package/rules/terminal.md +8 -0
- package/words.json +26 -0
package/alisx.css
CHANGED
|
@@ -687,6 +687,27 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
687
687
|
.app-field.is-disabled .app-field__box{border-color:var(--field-edge)}
|
|
688
688
|
.app-form{display:flex;flex-direction:column;gap:var(--space-24);max-width:var(--measure-prose)}
|
|
689
689
|
|
|
690
|
+
/* ── Code field · one input for a code from an email or a device, its characters drawn as cells ── */
|
|
691
|
+
.app-code-field{display:flex;flex-direction:column;align-items:center;gap:var(--space-8);min-width:0;color:var(--on-surface)}
|
|
692
|
+
.app-code-field__box{position:relative;display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-8) var(--space-16)}
|
|
693
|
+
.app-code-field__group{display:flex;gap:var(--space-8)}
|
|
694
|
+
.app-code-field__cell{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:40px;height:48px;border:1px solid var(--field-edge);border-radius:var(--radius-sm);background:var(--surface);color:var(--on-surface);font-family:var(--font-mono);font-size:20px;line-height:28px}
|
|
695
|
+
.app-code-field__box:hover .app-code-field__cell{border-color:var(--field-edge-hover)}
|
|
696
|
+
.app-code-field__cell.is-active{border-color:var(--primary);box-shadow:inset 0 0 0 1px var(--primary)}
|
|
697
|
+
.app-code-field__cell.is-active:empty::after{content:"";width:2px;height:24px;border-radius:1px;background:var(--on-surface)}
|
|
698
|
+
@media (prefers-reduced-motion:no-preference){.app-code-field__cell.is-active:empty::after{animation:app-dot var(--loop-blink)}}
|
|
699
|
+
.app-code-field.is-error .app-code-field__cell{border-color:var(--error);box-shadow:inset 0 0 0 1px var(--error)}
|
|
700
|
+
.app-code-field__support{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--space-4);margin:0;text-align:center;color:var(--on-surface-variant)}
|
|
701
|
+
.app-code-field__support a{color:var(--primary);text-decoration:underline;text-underline-offset:.15em}
|
|
702
|
+
.app-code-field.is-error .app-code-field__support{color:var(--error)}
|
|
703
|
+
/* Drawn: the input lies unseen over the cells and takes every key, paste and autofill */
|
|
704
|
+
.app-code-field.is-drawn .app-code-field__input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;font-size:16px;caret-color:transparent;cursor:text}
|
|
705
|
+
/* Not drawn (no script yet, or none): one plain box */
|
|
706
|
+
.app-code-field:not(.is-drawn) .app-code-field__input{box-sizing:border-box;width:min(100%,240px);height:48px;padding:0 var(--space-16);border:1px solid var(--field-edge);border-radius:var(--radius-sm);background:var(--surface);color:var(--on-surface);font-family:var(--font-mono);font-size:20px;letter-spacing:.3em;text-align:center;outline:none}
|
|
707
|
+
.app-code-field:not(.is-drawn) .app-code-field__input:hover{border-color:var(--field-edge-hover)}
|
|
708
|
+
.app-code-field:not(.is-drawn) .app-code-field__input:focus{border-color:var(--primary);box-shadow:inset 0 0 0 1px var(--primary)}
|
|
709
|
+
.app-code-field.is-error:not(.is-drawn) .app-code-field__input{border-color:var(--error);box-shadow:inset 0 0 0 1px var(--error)}
|
|
710
|
+
|
|
690
711
|
/* ── App shell · navigation pane, content, optional detail pane, all on the ground ── */
|
|
691
712
|
.app-shell{display:grid;grid-template-columns:var(--nav-width) minmax(0,1fr);min-height:100vh;background:var(--background);color:var(--on-surface);font-family:var(--font-sans)}
|
|
692
713
|
.app-shell--detail{grid-template-columns:var(--nav-width) minmax(0,1fr) var(--detail-width)}
|
|
@@ -787,9 +808,17 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
|
|
|
787
808
|
.app-signin__lead>h1,.app-signin__lead>h2,.app-signin__lead>p{margin:0}
|
|
788
809
|
.app-signin__card--steps .app-signin__lead{align-items:flex-start;text-align:start}
|
|
789
810
|
.app-signin__logo{display:block;max-width:200px;max-height:40px;margin-bottom:var(--space-8)}
|
|
811
|
+
/* An invitation leads with who sent it: the name gives way, the verb never does */
|
|
812
|
+
.app-signin__inviter{display:flex;align-items:center;max-width:100%;margin:0 0 var(--space-8)}
|
|
813
|
+
.app-signin__inviter>.app-avatar{margin-right:var(--space-8)}
|
|
814
|
+
.app-signin__inviter-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
|
|
815
|
+
.app-signin__inviter-verb{flex:none;white-space:pre}
|
|
790
816
|
/* With nothing to fill in, the empty-state block sits at its own height so the foot stays under it */
|
|
791
817
|
.app-signin>.app-empty{flex:none;min-height:0;padding:0}
|
|
792
818
|
.app-signin__action{width:100%}
|
|
819
|
+
/* Says what Resend code did; until then it holds no room but stays a live region */
|
|
820
|
+
.app-signin__status{margin:0;text-align:center;color:var(--on-surface-variant)}
|
|
821
|
+
.app-signin__status:empty{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
|
|
793
822
|
.app-signin__foot{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-4) var(--space-8);margin:0;color:var(--on-surface-variant)}
|
|
794
823
|
.app-signin__foot a{color:inherit;text-decoration:none}
|
|
795
824
|
.app-signin__foot a:hover,.app-signin__foot a:focus-visible{text-decoration:underline;text-underline-offset:2px}
|
package/classes.json
CHANGED
|
@@ -98,6 +98,12 @@
|
|
|
98
98
|
"app-chip__close",
|
|
99
99
|
"app-code",
|
|
100
100
|
"app-code--command",
|
|
101
|
+
"app-code-field",
|
|
102
|
+
"app-code-field__box",
|
|
103
|
+
"app-code-field__cell",
|
|
104
|
+
"app-code-field__group",
|
|
105
|
+
"app-code-field__input",
|
|
106
|
+
"app-code-field__support",
|
|
101
107
|
"app-code__body",
|
|
102
108
|
"app-code__caret",
|
|
103
109
|
"app-code__foot",
|
|
@@ -292,8 +298,12 @@
|
|
|
292
298
|
"app-signin__card",
|
|
293
299
|
"app-signin__card--steps",
|
|
294
300
|
"app-signin__foot",
|
|
301
|
+
"app-signin__inviter",
|
|
302
|
+
"app-signin__inviter-name",
|
|
303
|
+
"app-signin__inviter-verb",
|
|
295
304
|
"app-signin__lead",
|
|
296
305
|
"app-signin__logo",
|
|
306
|
+
"app-signin__status",
|
|
297
307
|
"app-skel",
|
|
298
308
|
"app-skel__bar",
|
|
299
309
|
"app-skel__bar--block",
|
|
@@ -408,6 +418,7 @@
|
|
|
408
418
|
"is-disabled",
|
|
409
419
|
"is-done",
|
|
410
420
|
"is-dragged",
|
|
421
|
+
"is-drawn",
|
|
411
422
|
"is-empty",
|
|
412
423
|
"is-error",
|
|
413
424
|
"is-failed",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# AppCodeField
|
|
2
|
+
|
|
3
|
+
A code a person types to prove who they are: one emailed to them, or one their device shows. One input, its characters drawn as cells.
|
|
4
|
+
|
|
5
|
+
## Use / don't use
|
|
6
|
+
|
|
7
|
+
- **Only for a code**: sent by email to sign in, open a shared page or join an interview, or shown on a device being signed in. Never for a number with meaning of its own (an amount, a phone number, a PIN a person chose): that is an [AppTextField](AppTextField.md).
|
|
8
|
+
- **One real input, the cells drawn over it.** The input lies unseen over the cells and takes every key, paste, the phone's autofill from Mail or Messages, a password manager and undo; a screen reader hears one field. Never one input per character. Without the script the input is one plain box, and the form still works.
|
|
9
|
+
- **A cell per character, in two groups**: six as 3 + 3, eight as 4 + 4. Each cell is 40 × 48 on every pointer, `radius-sm`, in `font-mono` at 20, with the field's edge: `field-edge`, `field-edge-hover` under the pointer, 2px `primary` on the cell the next character goes in. Cells sit 8 apart, groups 16; on a phone eight cells wrap to two rows of four.
|
|
10
|
+
- **Labelled "Code", centred above**; the supporting line centred below. On the email-code step of [AppSignIn](AppSignIn.md) the supporting line is the way back a step: "Wrong address? Use a different email", the last three words a link.
|
|
11
|
+
- **It never sends itself.** The last character lands and nothing moves; Enter or the card's filled action sends it, as on every form ([page.md](../rules/page.md) § Forms). Never a disabled action while cells are empty.
|
|
12
|
+
- **Errors at the field when they send**, in `error` with the `error` icon, replacing the supporting line; every cell takes the error edge. Say what to do: "Enter all 6 digits.", "That code doesn't match. Check the email and try again.", "That code has expired. Resend code to get a new one." A wrong code stays in the cells, selected, so typing replaces it.
|
|
13
|
+
- **Digits or letters, never both**: an emailed code is digits (`inputmode="numeric"`, `autocomplete="one-time-code"`); a device code is letters, shown as capitals, with autocomplete off.
|
|
14
|
+
- **The words**: Code, Send code, Resend code, Use a different email ([words.json](../words.json)). Never OTP, PIN, passcode or verification code.
|
|
15
|
+
|
|
16
|
+
## Markup
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<!-- As served, and as it stays without a script: one plain box -->
|
|
20
|
+
<div class="app-code-field">
|
|
21
|
+
<label for="code" class="text-label">Code</label>
|
|
22
|
+
<div class="app-code-field__box">
|
|
23
|
+
<input id="code" class="app-code-field__input" name="code" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" aria-describedby="code-s">
|
|
24
|
+
</div>
|
|
25
|
+
<p id="code-s" class="app-code-field__support text-supporting">Wrong address? <a href="/signin">Use a different email</a></p>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- Drawn: the script adds is-drawn and the cells after the input; the next cell is is-active -->
|
|
29
|
+
<div class="app-code-field is-drawn">
|
|
30
|
+
<label for="code-d" class="text-label">Code</label>
|
|
31
|
+
<div class="app-code-field__box">
|
|
32
|
+
<input id="code-d" class="app-code-field__input" name="code" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" value="4821" aria-describedby="code-d-s">
|
|
33
|
+
<div class="app-code-field__group" aria-hidden="true"><span class="app-code-field__cell">4</span><span class="app-code-field__cell">8</span><span class="app-code-field__cell">2</span></div>
|
|
34
|
+
<div class="app-code-field__group" aria-hidden="true"><span class="app-code-field__cell">1</span><span class="app-code-field__cell is-active"></span><span class="app-code-field__cell"></span></div>
|
|
35
|
+
</div>
|
|
36
|
+
<p id="code-d-s" class="app-code-field__support text-supporting">Wrong address? <a href="/signin">Use a different email</a></p>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<!-- Error, after they send -->
|
|
40
|
+
<div class="app-code-field is-drawn is-error">
|
|
41
|
+
<label for="code-e" class="text-label">Code</label>
|
|
42
|
+
<div class="app-code-field__box">
|
|
43
|
+
<input id="code-e" class="app-code-field__input" name="code" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" value="482914" aria-invalid="true" aria-describedby="code-e-s">
|
|
44
|
+
<div class="app-code-field__group" aria-hidden="true"><span class="app-code-field__cell">4</span><span class="app-code-field__cell">8</span><span class="app-code-field__cell">2</span></div>
|
|
45
|
+
<div class="app-code-field__group" aria-hidden="true"><span class="app-code-field__cell">9</span><span class="app-code-field__cell">1</span><span class="app-code-field__cell">4</span></div>
|
|
46
|
+
</div>
|
|
47
|
+
<p id="code-e-s" class="app-code-field__support text-supporting"><span class="app-icon" aria-hidden="true">error</span>That code doesn't match. Check the email and try again.</p>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- A device code: eight letters, as capitals -->
|
|
51
|
+
<input id="device" class="app-code-field__input" name="user_code" maxlength="8" inputmode="text" autocapitalize="characters" autocomplete="off" spellcheck="false">
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Behaviour you must supply
|
|
55
|
+
|
|
56
|
+
- **Draw the cells** once the script runs: add `is-drawn` to `.app-code-field` and two `.app-code-field__group`s of cells after the input, `aria-hidden="true"`, as many cells as `maxlength`.
|
|
57
|
+
- **On every input**, keep only the allowed characters (digits; or letters, upper-cased) up to `maxlength`, write each into its cell, and clear `is-error`. Paste and autofill arrive as one input event; nothing else is needed for them.
|
|
58
|
+
- **`is-active`** is on the cell the next character goes in (the last cell once full) while the input has focus, on none when it hasn't. The caret stays at the end: on focus and click, move the selection there. When the whole code is selected, every filled cell is `is-active`, and typing replaces it.
|
|
59
|
+
- **On send**: fewer characters than `maxlength`, or a code the server refuses, sets `is-error`, `aria-invalid="true"` and the error line, focuses the input and selects the code. Work in progress shows on the button pressed.
|
|
60
|
+
|
|
61
|
+
## Classes
|
|
62
|
+
|
|
63
|
+
`.app-code-field`, `.is-drawn`, `.is-error`, `.app-code-field__box`, `.app-code-field__input`, `.app-code-field__group`, `.app-code-field__cell`, `.is-active`, `.app-code-field__support`.
|
package/components/AppSignIn.md
CHANGED
|
@@ -7,13 +7,15 @@ Signing in, signing up and onboarding: one card on the plain ground.
|
|
|
7
7
|
- **Every screen before the product**: Alis Identity signing someone in to any app, AlisX's sign-up and its onboarding steps, an invitation being accepted. Not the home that greets you, which is an entry screen ([page.md](../rules/page.md) § Empty and entry screens), and not an empty state.
|
|
8
8
|
- **The plain ground, never the drafting field or a petrol band.** Alis Identity signs people in to other companies' apps, and there the app's logo is the only brand on the page ([branding.md](../rules/branding.md)). AlisX's own sign-up and onboarding take the same frame, so going from sign-in into onboarding never changes the ground.
|
|
9
9
|
- **One instrument card, 440 wide**: white, its edge, no shadow ([AppCard](AppCard.md)). On a phone it fills the width inside the gutter.
|
|
10
|
-
- **The lead, centred at the top of the card**: the logo of the app being signed in to, then the question in `text-page-title`, then one `text-body` line. For AlisX the logo is the Alis mark at 32 ([AlisMark](AlisMark.md)); a client's logo is at most 40 tall and 200 wide, keeps its aspect ratio, and falls back to its name in `text-object-title`. Never `text-welcome-title`: this is a card.
|
|
11
|
-
- **One question per card and one filled action**, the card's full width, last. A second way on ("Create an account", "
|
|
10
|
+
- **The lead, centred at the top of the card**: the logo of the app being signed in to, then the question in `text-page-title`, then one `text-body` line. **An invitation leads with who sent it** instead of a logo: their [AppAvatar](AppAvatar.md) at 36, in the logo's place, beside "Ruan Spies invited you" on one line in `text-body`, the name at 600. A long name ends in an ellipsis, with the whole name as its `title`; "invited you" never shortens. Then the title of what they were invited to. For AlisX the logo is the Alis mark at 32 ([AlisMark](AlisMark.md)); a client's logo is at most 40 tall and 200 wide, keeps its aspect ratio, and falls back to its name in `text-object-title`. Never `text-welcome-title`: this is a card.
|
|
11
|
+
- **One question per card and one filled action**, the card's full width, last. A second way on ("Create an account", "Resend code") is a text button, full width, under it; one at most. A way back a step ("Use a different email") is a link in the field's supporting line, never a second button. Signing in with a provider ("Continue with Google") is an outlined button, its words alone until the marks are listed ([known-gaps.md](../rules/known-gaps.md)).
|
|
12
12
|
- **Fields as on every form** ([page.md](../rules/page.md) § Forms): labelled above, errors at the field when they try to continue, the action never disabled. A form's groups inside the card are headed in `text-section-title` ([type.md](../rules/type.md)).
|
|
13
|
+
- **Signing in with a code from an email is two cards.** First the address: "Email address", a supporting line that says a code will be sent, and **Send code**. Then the code: "Check your email", one line naming the address and how long the code lasts ("A code was sent to sam@acme.com. It expires in 10 minutes."), an [AppCodeField](AppCodeField.md) whose supporting line is "Wrong address? Use a different email", the filled action named for where it goes ("Sign in", "Open the page", "Open the interview"), and **Resend code** as the second way on. Where telling a stranger whether an address was invited would leak it, the line says "If sam@acme.com was invited, a code is on its way." The code never sends itself.
|
|
14
|
+
- **Resend code** sends a new code without leaving the card and says so in the status line under it (`.app-signin__status`, a live region that takes no room while empty): "New code sent. The earlier one still works." Never a countdown in front of it; if the server's limit is reached, that line says when another can be sent.
|
|
13
15
|
- **Help · Privacy · Terms under the card**, in `text-meta` and `on-surface-variant`, centred: the links of whoever's app it is.
|
|
14
16
|
- **Onboarding in steps** ([page.md](../rules/page.md) § A form in steps): from the first stepped card, [AppStepper](AppStepper.md) leads the card and the logo goes, because the person has just seen it. A stepped card reads like any form in steps: the title and its line start-aligned, and the action row at the foot with Back leading and the filled action last, at its own width.
|
|
15
17
|
- **A screen with nothing to fill in** (an error, "You're signed in", a request sent) has no card: the logo over an [AppEmptyState](AppEmptyState.md) block, without the drafting field, with the foot under it. Its words are in [errors.md](../rules/errors.md).
|
|
16
|
-
- **The words**: an account, its Admins, free credits, the spend limit, Request to join ([words.json](../words.json)).
|
|
18
|
+
- **The words**: an account, its Admins, free credits, the spend limit, Request to join, a code, Send code, Resend code ([words.json](../words.json)).
|
|
17
19
|
|
|
18
20
|
## Markup
|
|
19
21
|
|
|
@@ -63,6 +65,37 @@ Signing in, signing up and onboarding: one card on the plain ground.
|
|
|
63
65
|
<nav class="app-signin__foot text-meta" aria-label="Help and legal"><!-- as above --></nav>
|
|
64
66
|
</main>
|
|
65
67
|
|
|
68
|
+
<!-- A code from an email: the second card -->
|
|
69
|
+
<main class="app-signin">
|
|
70
|
+
<form class="app-card app-card--instrument app-form app-signin__card" novalidate>
|
|
71
|
+
<div class="app-signin__lead">
|
|
72
|
+
<img class="app-signin__logo" src="…/acme.svg" alt="Acme">
|
|
73
|
+
<h1 class="text-page-title">Check your email</h1>
|
|
74
|
+
<p class="text-body">A code was sent to sam@acme.com. It expires in 10 minutes.</p>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="app-code-field">
|
|
77
|
+
<label for="signin-code" class="text-label">Code</label>
|
|
78
|
+
<div class="app-code-field__box">
|
|
79
|
+
<input id="signin-code" class="app-code-field__input" name="code" maxlength="6" inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" aria-describedby="signin-code-s">
|
|
80
|
+
</div>
|
|
81
|
+
<p id="signin-code-s" class="app-code-field__support text-supporting">Wrong address? <a href="/signin">Use a different email</a></p>
|
|
82
|
+
</div>
|
|
83
|
+
<button type="submit" class="app-btn app-state app-target app-btn--filled app-signin__action">Sign in</button>
|
|
84
|
+
<button type="button" class="app-btn app-state app-target app-signin__action">Resend code</button>
|
|
85
|
+
<p class="app-signin__status text-supporting" role="status"></p><!-- after a resend: New code sent. The earlier one still works. -->
|
|
86
|
+
</form>
|
|
87
|
+
<nav class="app-signin__foot text-meta" aria-label="Help and legal"><!-- as above --></nav>
|
|
88
|
+
</main>
|
|
89
|
+
|
|
90
|
+
<!-- An invitation: who sent it, in the logo's place -->
|
|
91
|
+
<div class="app-signin__lead">
|
|
92
|
+
<p class="app-signin__inviter text-body">
|
|
93
|
+
<span class="app-avatar" aria-hidden="true">RS</span>
|
|
94
|
+
<span class="app-signin__inviter-name" title="Ruan Spies">Ruan Spies</span><span class="app-signin__inviter-verb"> invited you</span>
|
|
95
|
+
</p>
|
|
96
|
+
<h1 class="text-page-title">Skills discovery interview</h1>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
66
99
|
<!-- Nothing to fill in: no card -->
|
|
67
100
|
<main class="app-signin">
|
|
68
101
|
<div class="app-empty">
|
|
@@ -82,4 +115,4 @@ Signing in, signing up and onboarding: one card on the plain ground.
|
|
|
82
115
|
|
|
83
116
|
## Classes
|
|
84
117
|
|
|
85
|
-
`.app-signin`, `.app-signin__card`, `.app-signin__card--steps`, `.app-signin__lead`, `.app-signin__logo`, `.app-signin__action`, `.app-signin__foot`.
|
|
118
|
+
`.app-signin`, `.app-signin__card`, `.app-signin__card--steps`, `.app-signin__lead`, `.app-signin__logo`, `.app-signin__inviter`, `.app-signin__inviter-name`, `.app-signin__inviter-verb`, `.app-signin__action`, `.app-signin__status`, `.app-signin__foot`.
|
package/components/README.md
CHANGED
|
@@ -22,6 +22,7 @@ Shared conventions: `app-state` gives anything pressable its hover, focus and pr
|
|
|
22
22
|
| AppButton | Text in ink by default, outlined for a surface's lead, filled for the one action that commits | [AppButton.md](AppButton.md) |
|
|
23
23
|
| AppIconButton | A glyph that performs one action; or a toggle | [AppIconButton.md](AppIconButton.md) |
|
|
24
24
|
| AppTextField | A labelled input; the field set and the form | [AppTextField.md](AppTextField.md) |
|
|
25
|
+
| AppCodeField | A code from an email or a device: one input, its characters drawn as cells | [AppCodeField.md](AppCodeField.md) |
|
|
25
26
|
| AppSelect | One choice from a list, native select | [AppSelect.md](AppSelect.md) |
|
|
26
27
|
| AppCombobox | One or several from a long list: the select's box, with a search in its menu | [AppCombobox.md](AppCombobox.md) |
|
|
27
28
|
| AppSwitch | An on/off setting | [AppSwitch.md](AppSwitch.md) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
|
|
5
5
|
"keywords": ["alisx", "design-system", "design-tokens", "css"],
|
|
6
6
|
"homepage": "https://alisx.com",
|
package/rules/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Read only what the job needs.
|
|
|
14
14
|
|
|
15
15
|
| Rule | Decides |
|
|
16
16
|
| --- | --- |
|
|
17
|
-
| [register.md](register.md) | Which register a surface is in, and the voice |
|
|
17
|
+
| [register.md](register.md) | Which register a surface is in, what a screen shows and what the docs explain (Glass views), and the voice |
|
|
18
18
|
| [colour.md](colour.md) | Roles, the one action colour, status, categories |
|
|
19
19
|
| [themes.md](themes.md) | Light and dark: asking for a theme, what changes, what doesn't |
|
|
20
20
|
| [branding.md](branding.md) | Client identity, account-to-portal inheritance, permitted role overrides and embedding |
|
|
@@ -56,11 +56,13 @@ Read only what the job needs.
|
|
|
56
56
|
|
|
57
57
|
Which applies is decided by the surface, never by preference ([register.md](register.md)).
|
|
58
58
|
|
|
59
|
-
| | Product |
|
|
60
|
-
|
|
61
|
-
| **Where** | Ideate, Build, Admin: anything a user *works* in
|
|
62
|
-
| **Tokens** | Product roles (M3 names) |
|
|
63
|
-
| **Components** | `.app-*` (this package) |
|
|
59
|
+
| | Product | Narrative |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| **Where** | Ideate, Build, Admin: anything a user *works* in, Glass views included | alisx.com, decks, one-pagers |
|
|
62
|
+
| **Tokens** | Product roles (M3 names) | `narrative-*`, `band-*`, `on-band-*`, `term-*` |
|
|
63
|
+
| **Components** | `.app-*` (this package) | `.ax-*` (not in this package) |
|
|
64
|
+
|
|
65
|
+
How the platform works is neither: it is the docs, and a screen links to it ([register.md](register.md) § Show it or explain it).
|
|
64
66
|
|
|
65
67
|
**The platform.** **Alis Ideate**: discovery, AI-led interviews, context and shareable artifacts. **Alis Build**: delivery, secure build environments in your own Google Cloud. **Skill store**: the app store for know-how, at four levels (me, my team, the community, the platform). **AlisX Specialists**: vetted human expertise, inside the session.
|
|
66
68
|
|
package/rules/anti-patterns.md
CHANGED
|
@@ -39,6 +39,11 @@ Cite by ID in review. Each is a defect that has shipped in an Alis product.
|
|
|
39
39
|
- **C4 third-party styling**: a library component styled in place instead of
|
|
40
40
|
themed or wrapped.
|
|
41
41
|
|
|
42
|
+
- **C5 a second manual**: how the platform works, written into a screen, a dialog,
|
|
43
|
+
a help panel or a command, where it drifts from the docs and no search finds it.
|
|
44
|
+
One sentence and a "How *thing* works" link instead ([register.md](register.md)
|
|
45
|
+
§ Show it or explain it).
|
|
46
|
+
|
|
42
47
|
## D · Config holes
|
|
43
48
|
|
|
44
49
|
- **D1 off the scale**: a spacing, size or radius value outside its scale.
|
|
@@ -55,7 +60,7 @@ Cite by ID in review. Each is a defect that has shipped in an Alis product.
|
|
|
55
60
|
|
|
56
61
|
## Smell test
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
Seven questions, about a minute. **Run this before handing work back.**
|
|
59
64
|
|
|
60
65
|
1. **Is anything in the page casting a shadow?** Only a menu, the composer,
|
|
61
66
|
a snackbar, a dialog, a dragged item or a card on the drafting field may. A
|
|
@@ -71,6 +76,9 @@ Six questions, about a minute. **Run this before handing work back.**
|
|
|
71
76
|
6. **Have you looked at it in dark?** Set `data-theme="dark"` on the page. Text
|
|
72
77
|
that vanishes, a white box, a shadow doing an edge's job → a colour that isn't
|
|
73
78
|
a role ([themes.md](themes.md)).
|
|
79
|
+
7. **Is anything here written once, for everyone, beyond one sentence?** Concepts,
|
|
80
|
+
how-it-works steps, conventions, gotchas → C5: it is the docs; link it. A page
|
|
81
|
+
called a Glass view that reads nothing of yours is the docs too.
|
|
74
82
|
|
|
75
83
|
## The agent failure mode
|
|
76
84
|
|
|
@@ -78,4 +86,4 @@ A developer under-reads a system and invents locally (C3). An agent does the
|
|
|
78
86
|
opposite: it **over-produces**. Linters catch shapes, not this. Before handing
|
|
79
87
|
work back, look for **B6** (a card where spacing would have done), **B1** (a
|
|
80
88
|
second primary), **B9** (an outline on every card), a fourth type role, a section
|
|
81
|
-
nobody asked for, and a colour that is not a role.
|
|
89
|
+
nobody asked for, a section explaining how it works (C5), and a colour that is not a role.
|
package/rules/buttons.md
CHANGED
|
@@ -172,7 +172,9 @@ click goes.
|
|
|
172
172
|
another site, and its accessible name says so ("Logs, opens in a new tab"), as
|
|
173
173
|
on an [AppAttachment](../components/AppAttachment.md) and an
|
|
174
174
|
[AppMenu](../components/AppMenu.md) row. Never `arrow_outward` or
|
|
175
|
-
`arrow_forward` for it.
|
|
175
|
+
`arrow_forward` for it. A link to the docs is one of these and reads
|
|
176
|
+
**How *thing* works**, never "Learn more" ([register.md](register.md) § Show
|
|
177
|
+
it or explain it).
|
|
176
178
|
- **A third party's mark on a hand-off**: "Sign in with Google", "Connect
|
|
177
179
|
GitHub", "Open in VS Code". The button takes you to that party, so it leads
|
|
178
180
|
with their mark, at the glyph's size and never recoloured (an agent's mark
|
package/rules/quick-start.md
CHANGED
|
@@ -56,6 +56,7 @@ AppShell
|
|
|
56
56
|
| A form | `.app-form` of fields, one filled action last (see § Forms) |
|
|
57
57
|
| A form in named steps | `AppStepper` at the top of the form's card; Back on the leading edge, one filled forward action ([page.md](page.md) § A form in steps) |
|
|
58
58
|
| Text | `AppTextField` (with `action` for one that collects several values, shown as input `AppChip`s below) |
|
|
59
|
+
| A code from an email or a device | `AppCodeField`: one input drawn as cells; it never sends itself |
|
|
59
60
|
| One choice from a list | `AppSelect`; past about ten options, or to choose several, `AppCombobox` |
|
|
60
61
|
| An on/off setting | `AppSwitch` |
|
|
61
62
|
| Several of a list, or something to agree to | `AppCheckbox`; one of a few short options is its radio ([page.md](page.md) § Which control) |
|
package/rules/register.md
CHANGED
|
@@ -11,13 +11,76 @@ What am I building?
|
|
|
11
11
|
│ plain ground (AppSignIn)
|
|
12
12
|
├─ An empty state, an upgrade prompt → PRODUCT, with the one
|
|
13
13
|
│ crossing below
|
|
14
|
-
├─
|
|
15
|
-
│
|
|
14
|
+
├─ The live inside of one thing of yours: an
|
|
15
|
+
│ environment, a product's deploys, a run → PRODUCT, a Glass view
|
|
16
|
+
│ (Show it or explain it)
|
|
17
|
+
├─ How the platform works: concepts, steps,
|
|
18
|
+
│ lifecycle, conventions, gotchas → THE DOCS, never a screen;
|
|
19
|
+
│ the screen links to them
|
|
20
|
+
│ (Show it or explain it)
|
|
16
21
|
├─ An email → PRODUCT, built from the
|
|
17
22
|
│ email shell (email.md)
|
|
18
23
|
└─ alisx.com, a landing page, a deck → NARRATIVE
|
|
19
24
|
```
|
|
20
25
|
|
|
26
|
+
## Show it or explain it
|
|
27
|
+
|
|
28
|
+
**A screen shows what the platform knows about your things. The docs explain how
|
|
29
|
+
the platform works.** Ask of every part of a page: **is it read from the
|
|
30
|
+
platform when you open it, or was it written once, for everyone?**
|
|
31
|
+
|
|
32
|
+
- **Read when you open it** (your environments, a version's artifacts, where each
|
|
33
|
+
deployment stands, the arithmetic behind your score): a product screen.
|
|
34
|
+
- **Written once, for everyone** (what a workstation is, how a release moves, a
|
|
35
|
+
Makefile's conventions, what to do when a deploy hangs): the docs, where search,
|
|
36
|
+
`alis docs` and every agent find it, and where it is written once rather than
|
|
37
|
+
drifting in two places. The screen links to it.
|
|
38
|
+
- **A page that does both** is a product screen: the live part stays, the
|
|
39
|
+
explanation moves to the docs, and the screen links to it.
|
|
40
|
+
|
|
41
|
+
How much a screen explains, so the line is not a judgment:
|
|
42
|
+
|
|
43
|
+
- **One sentence that says what a thing is, where you first meet it**: an empty
|
|
44
|
+
state's line, a field's supporting line, a dialog's line. Then the link.
|
|
45
|
+
- **Never a section of explanation**: no concepts, how-it-works steps, lifecycle,
|
|
46
|
+
conventions, worked examples, gotchas or FAQ on a screen, a tab, a dialog or a
|
|
47
|
+
help panel; and no screen or dialog that holds only explanation.
|
|
48
|
+
- **The link reads "How *thing* works"** ("How workstations work"): a text
|
|
49
|
+
button with a trailing `open_in_new` that opens the docs page in a new tab
|
|
50
|
+
([buttons.md](buttons.md) § The form). Never "Learn more", "Explain …" or
|
|
51
|
+
"Documentation".
|
|
52
|
+
|
|
53
|
+
### The Glass view
|
|
54
|
+
|
|
55
|
+
Glass is what you get when the casing of a running machine is made of glass: the
|
|
56
|
+
same thing, with what is happening inside it in sight. **A Glass view is a product
|
|
57
|
+
screen that shows the live inside of one thing of yours**: a build environment's
|
|
58
|
+
products, services and shared infrastructure; where each of a product's
|
|
59
|
+
deployments stands against its designated branch; every artifact of a Define
|
|
60
|
+
result as it lands.
|
|
61
|
+
|
|
62
|
+
- **Nothing running behind it, no Glass view.** A page that reads nothing of
|
|
63
|
+
yours when it opens is the docs, whatever it is called.
|
|
64
|
+
- **Of one named thing**: reached from that thing's screen, at that thing's
|
|
65
|
+
address (`…/products/payments/glass`), never from a separate area of
|
|
66
|
+
explainers. Its title is **Glass view** and back names the thing
|
|
67
|
+
([page.md](page.md) § Where back goes).
|
|
68
|
+
- **The way in is a text button, "Glass view"**, in the thing's title bar
|
|
69
|
+
([AppTitleBar](../components/AppTitleBar.md)); a list row whose thing has one may
|
|
70
|
+
carry it in the row's menu. Never "Explain", "Explain this …" or "Glass Mode".
|
|
71
|
+
- **The product register throughout**: the title bar, sections, tables and
|
|
72
|
+
states every screen has. No hero, no display type, no petrol band; it is a
|
|
73
|
+
working screen, and the person on it asked a question.
|
|
74
|
+
- **Its explanation is a docs link** ("How build environments work"), by the
|
|
75
|
+
rule above.
|
|
76
|
+
- **Smaller evidence stays in place**: the arithmetic behind one score, in a
|
|
77
|
+
dialog from the stat it explains, is part of that screen, not a Glass view.
|
|
78
|
+
|
|
79
|
+
The same line holds in the terminal ([terminal.md](terminal.md)).
|
|
80
|
+
|
|
81
|
+
**Nothing inside a product sells.** A signed-in person who asked how something
|
|
82
|
+
works wants the answer, in the docs; the pitch is alisx.com's (Narrative).
|
|
83
|
+
|
|
21
84
|
## Product
|
|
22
85
|
|
|
23
86
|
Material Design 3 is the substrate, and the brand is pulled through it. **Where
|
|
@@ -54,25 +117,6 @@ one card on the plain ground ([AppSignIn](../components/AppSignIn.md)).
|
|
|
54
117
|
The test: is the person on this screen **working**, or **being spoken to**? If it
|
|
55
118
|
is genuinely both, it is product with a narrative hero, not a blend.
|
|
56
119
|
|
|
57
|
-
## Expressive pages
|
|
58
|
-
|
|
59
|
-
An explainer page inside the product may take a bolder treatment:
|
|
60
|
-
|
|
61
|
-
- A drafting-field hero, Nunito Sans 800 display at 64px (48 tablet, 36 phone)
|
|
62
|
-
with tight tracking, and the red terminal mark when the headline has no
|
|
63
|
-
punctuation.
|
|
64
|
-
- Hero copy at 20/32 (18/28 compact) in solid supporting ink, and section
|
|
65
|
-
headings at 36/44 (28/36 phone).
|
|
66
|
-
- Petrol narrative and statistic bands with paired inverse ink, a teal lead
|
|
67
|
-
feature card, and 64px section gaps (48 on a phone).
|
|
68
|
-
- One filled action per hero or closing section; on petrol it is the light filled
|
|
69
|
-
action. Link to destinations and interactions that already exist, rather than
|
|
70
|
-
inventing new ones.
|
|
71
|
-
|
|
72
|
-
The treatment stops at the page's own content. Code, tables, diagnostics, status
|
|
73
|
-
colours and dialogs keep product roles. Never carry the display scale into working
|
|
74
|
-
records or app chrome.
|
|
75
|
-
|
|
76
120
|
## Narrative
|
|
77
121
|
|
|
78
122
|
alisx.com and the pages that sell, outside the product. An email addresses a
|
package/rules/terminal.md
CHANGED
|
@@ -25,6 +25,14 @@ reads. They use the names in `words.json`, in full sentences ([words.md](words.m
|
|
|
25
25
|
§ Name it as they know it). JSON field names, error codes and resource paths
|
|
26
26
|
(`ideas/*`) are code and stay as they are.
|
|
27
27
|
|
|
28
|
+
## Show it or explain it
|
|
29
|
+
|
|
30
|
+
The line in [register.md](register.md) § Show it or explain it holds here too.
|
|
31
|
+
A command or a key shows your things; what it prints about how the platform works
|
|
32
|
+
is the docs page's address and `alis docs <topic>`, never an explanation of its
|
|
33
|
+
own, so there is one manual for people and agents. Where it shows the live inside
|
|
34
|
+
of one thing, it calls that the **Glass view**.
|
|
35
|
+
|
|
28
36
|
## Command and flag names
|
|
29
37
|
|
|
30
38
|
A command or a flag is a label: it takes its name from `words.json`.
|
package/words.json
CHANGED
|
@@ -43,6 +43,13 @@
|
|
|
43
43
|
"retired": ["Alis Build console", "Ideate console"],
|
|
44
44
|
"avoid": ["Console (capitalised, unless it opens a sentence)", "the dashboard", "the web app"]
|
|
45
45
|
},
|
|
46
|
+
{
|
|
47
|
+
"name": "docs",
|
|
48
|
+
"product": "all",
|
|
49
|
+
"means": "How the platform works, written once for everyone: the docs site, and `alis docs` in the terminal, the one manual for people and agents. A screen says what a thing is in one sentence and links to its page with \"How *thing* works\", a text button with a trailing open_in_new (register.md § Show it or explain it).",
|
|
50
|
+
"retired": ["Learn more"],
|
|
51
|
+
"avoid": ["Explain (as a label for a link to the docs)", "Documentation (as a link label)", "help centre", "knowledge base"]
|
|
52
|
+
},
|
|
46
53
|
{
|
|
47
54
|
"name": "account",
|
|
48
55
|
"plural": "accounts",
|
|
@@ -414,6 +421,14 @@
|
|
|
414
421
|
"avoid": ["codeblock (`alis docs codeblocks` is a topic name and stays)", "block (alone)"],
|
|
415
422
|
"code": "blocks/*"
|
|
416
423
|
},
|
|
424
|
+
{
|
|
425
|
+
"name": "code",
|
|
426
|
+
"plural": "codes",
|
|
427
|
+
"product": "all",
|
|
428
|
+
"means": "The short code a person types to prove who they are: one emailed to them to sign in, open a shared page or join an interview, or one a device shows while it is being signed in. The field is labelled Code (AppCodeField); its email says how long it lasts. Send code asks for one, Resend code sends another, and the earlier one still works.",
|
|
429
|
+
"retired": ["Email me a code", "Send a new code", "Email code", "Code from the email", "verification code"],
|
|
430
|
+
"avoid": ["OTP", "PIN", "passcode", "one-time password", "security code"]
|
|
431
|
+
},
|
|
417
432
|
{
|
|
418
433
|
"name": "Define, Build, Deploy",
|
|
419
434
|
"product": "build",
|
|
@@ -510,6 +525,14 @@
|
|
|
510
525
|
"means": "Showing only the build environments you choose, so the others can't be acted on by mistake.",
|
|
511
526
|
"retired": [],
|
|
512
527
|
"avoid": []
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"name": "Glass view",
|
|
531
|
+
"plural": "Glass views",
|
|
532
|
+
"product": "build",
|
|
533
|
+
"means": "A screen that shows the live inside of one thing of yours, read when you open it: a build environment's services and shared infrastructure, where each of a product's deployments stands, a Define result's artifacts. Reached by the text button Glass view in that thing's title bar. A page that reads nothing of yours is the docs, never a Glass view (register.md § Show it or explain it).",
|
|
534
|
+
"retired": ["Glass Mode"],
|
|
535
|
+
"avoid": ["Glass (alone, as its name)", "Explain (as its way in)"]
|
|
513
536
|
}
|
|
514
537
|
],
|
|
515
538
|
"verbs": [
|
|
@@ -524,6 +547,9 @@
|
|
|
524
547
|
{ "name": "Request access", "means": "Asks whoever can grant it for a role here, with an optional note (rules/access.md). Afterwards the control reads \"Request sent\" until they decide; a refusal reads \"Declined by …\" with Request again." },
|
|
525
548
|
{ "name": "Request to join", "means": "Asks an account's Admins to let you in, from the account rows sign-up shows for your email's domain. Afterwards it reads \"Request sent\" until an Admin decides, as Request access does." },
|
|
526
549
|
{ "name": "Talk", "means": "Starts a live voice conversation from an empty composer (AppComposer § The trailing button): one word, never \"Talk instead\", \"Talk to Alis\" or \"Voice mode\" on the button. Dictate and Record are the mic's." },
|
|
550
|
+
{ "name": "Send code", "means": "Emails a code to the address just given: the first card of signing in with a code (AppSignIn). Never \"Email me a code\"." },
|
|
551
|
+
{ "name": "Resend code", "means": "Emails another code without leaving the card; the earlier one still works, and a status line says so. Never \"Send a new code\", and never behind a countdown." },
|
|
552
|
+
{ "name": "Use a different email", "means": "Goes back from the code to the address, as a link in the code field's supporting line: \"Wrong address? Use a different email\"." },
|
|
527
553
|
{ "name": "Ask Alis", "means": "Opens the docked composer from a page that isn't a conversation: the composer put away, or a selection quoted in its tray (AppComposer § Docked as a way in). Never \"Ask AI\", \"Chat\" or \"Open Alis\"." }
|
|
528
554
|
]
|
|
529
555
|
}
|