@alis-build/design-system 0.53.0 → 0.54.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 +15 -2
- package/classes.json +1 -0
- package/components/AppDialog.md +59 -5
- package/components/AppStepper.md +3 -3
- package/package.json +1 -1
- package/rules/buttons.md +2 -1
- package/rules/known-gaps.md +1 -0
- package/rules/motion.md +3 -2
- package/rules/page.md +36 -5
- package/rules/quick-start.md +2 -0
- package/words.json +1 -0
package/alisx.css
CHANGED
|
@@ -646,11 +646,20 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
646
646
|
/* ── Dialog · white at level 3, text actions, affirmative last ── */
|
|
647
647
|
.app-scrim{position:fixed;inset:0;z-index:3;display:grid;place-items:center;padding:var(--space-24);background:color-mix(in srgb,var(--scrim) 32%,transparent)}
|
|
648
648
|
.app-scrim--inline{position:static;inset:auto}
|
|
649
|
-
.app-dialog{display:flex;flex-direction:column;gap:var(--space-16);width:min(560px,100%);padding:var(--space-24);border-radius:var(--radius-lg);background:var(--surface-container-high);color:var(--on-surface);box-shadow:var(--elevation-3)}
|
|
649
|
+
.app-dialog{display:flex;flex-direction:column;gap:var(--space-16);width:min(560px,100%);max-height:100%;min-height:0;box-sizing:border-box;padding:var(--space-24);border-radius:var(--radius-lg);background:var(--surface-container-high);color:var(--on-surface);box-shadow:var(--elevation-3)}
|
|
650
650
|
@media (min-width:600px){.app-dialog{padding:var(--card-padding-wide)}}
|
|
651
651
|
.app-dialog__title{margin:0}
|
|
652
652
|
.app-dialog:focus{outline:none}
|
|
653
|
-
.app-dialog__body{margin:0}
|
|
653
|
+
.app-dialog__body{margin:0;min-height:0;overflow:auto;overscroll-behavior:contain}
|
|
654
|
+
/* Past the window, only the body scrolls: a hairline under the title once scrolled, one over the actions while there is more */
|
|
655
|
+
.app-dialog__body.is-scrolled{box-shadow:inset 0 1px 0 var(--outline-variant)}
|
|
656
|
+
.app-dialog__body.is-more{box-shadow:inset 0 -1px 0 var(--outline-variant)}
|
|
657
|
+
.app-dialog__body.is-scrolled.is-more{box-shadow:inset 0 1px 0 var(--outline-variant),inset 0 -1px 0 var(--outline-variant)}
|
|
658
|
+
/* On a phone every dialog docks to the foot: full width, its top corners rounded, riding on the keyboard (--app-keyboard) */
|
|
659
|
+
@media (max-width:599px){
|
|
660
|
+
.app-scrim:not(.app-scrim--inline){place-items:end stretch;padding:var(--space-48) 0 var(--app-keyboard,0px)}
|
|
661
|
+
.app-scrim:not(.app-scrim--inline)>.app-dialog{width:100%;border-radius:var(--radius-lg) var(--radius-lg) 0 0;padding-bottom:calc(var(--space-24) + env(safe-area-inset-bottom,0px))}
|
|
662
|
+
}
|
|
654
663
|
|
|
655
664
|
/* ── Skeleton · the layout with the words taken out ── */
|
|
656
665
|
.app-skel{display:flex;flex-direction:column;gap:var(--space-16)}
|
|
@@ -1435,6 +1444,7 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1435
1444
|
@keyframes app-fade-in{from{opacity:0}}
|
|
1436
1445
|
@keyframes app-fade-out{to{opacity:0}}
|
|
1437
1446
|
@keyframes app-from-end{from{translate:var(--space-24) 0}}
|
|
1447
|
+
@keyframes app-from-foot{from{translate:0 100%}}
|
|
1438
1448
|
@keyframes app-from-start{from{translate:calc(var(--space-24) * -1) 0}}
|
|
1439
1449
|
/* Reveals: the clip opens along one axis, 40px outside the box so the deepest shadow shows, and is gone once it has played */
|
|
1440
1450
|
@keyframes app-reveal-down{from{clip-path:inset(-40px -40px calc(100% + 40px) -40px)}to{clip-path:inset(-40px)}}
|
|
@@ -1490,6 +1500,8 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1490
1500
|
/* A dialog comes from nowhere: it fades in place, with its scrim */
|
|
1491
1501
|
.app-dialog{animation:app-fade-in var(--spring-default-effects);transition:opacity var(--spring-fast-effects)}
|
|
1492
1502
|
.app-scrim[hidden]>.app-dialog{opacity:0}
|
|
1503
|
+
/* On a phone it rises from the foot, where it docks; it leaves as a fade, as everything does */
|
|
1504
|
+
@media (max-width:599px){.app-scrim:not(.app-scrim--inline)>.app-dialog{animation:app-from-foot var(--spring-default-spatial),app-fade-in var(--spring-fast-effects)}}
|
|
1493
1505
|
/* Alis's ask, arriving while you watch, grows up out of the composer, then its words fade in */
|
|
1494
1506
|
.app-ask{min-block-size:0}
|
|
1495
1507
|
.app-ask.is-arriving{overflow:clip;transition:block-size var(--spring-default-spatial),padding-block var(--spring-default-spatial),opacity var(--spring-default-effects) var(--spring-fast-effects-duration)}
|
|
@@ -1555,6 +1567,7 @@ a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointe
|
|
|
1555
1567
|
.app-disclosure::details-content{transition:block-size 0s var(--spring-fast-effects-duration),content-visibility var(--spring-fast-effects) allow-discrete,overflow-y 0s allow-discrete}
|
|
1556
1568
|
}
|
|
1557
1569
|
@media (prefers-reduced-motion:reduce) and (max-width:599px){
|
|
1570
|
+
.app-scrim:not(.app-scrim--inline)>.app-dialog{animation:app-fade-in var(--spring-default-effects)}
|
|
1558
1571
|
.app-shell__nav{opacity:0;transition:opacity var(--spring-fast-effects),display var(--spring-fast-effects) allow-discrete}
|
|
1559
1572
|
.app-shell--nav-open .app-shell__nav{opacity:1}
|
|
1560
1573
|
@starting-style{.app-shell--nav-open .app-shell__nav{opacity:0}}
|
package/classes.json
CHANGED
package/components/AppDialog.md
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
# AppDialog
|
|
2
2
|
|
|
3
|
-
A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-title, a body
|
|
3
|
+
A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-title, a body, Cancel as text and the affirmative filled. Centred on a wide screen; docked to the foot on a phone.
|
|
4
4
|
|
|
5
5
|
## Use / don't use
|
|
6
6
|
|
|
7
|
+
- **A dialog holds one decision, in one screen.** It does one of four jobs: **confirm** what is hard to undo, take **a short form** with no sections, **choose** from a list when choosing is the whole task, or **show** something that stays read-only (Sharing, seen by a Viewer). Steps or sections make it a page: its own route, the form card at the prose measure, back leading the bar ([page.md](../rules/page.md) § A form in steps). Never a stepper in a dialog.
|
|
7
8
|
- Actions are [AppButton](AppButton.md)s on the trailing edge, affirmative last. A dialog is a screen of its own, so the affirmative is filled when it commits (`app-btn--filled`, with `app-btn--error` when it destroys) and the rest, Cancel always among them, are text. An affirmative that only opens, copies or reads stays text, so the whole dialog is text. The affirmative names the outcome ("Delete environment", not "OK"). A dialog is never heavier than what it interrupts, and never dark.
|
|
9
|
+
- **One width: 560**, Material's widest, which holds a body at the prose measure inside its padding. Never another width; what needs more room is a page or a full-size view (§ Not a dialog).
|
|
10
|
+
- **It grows with its content** to the window less 24 above and below. Past that only the body scrolls: the title and the action row stay, a hairline appears under the title once the body has scrolled (`is-scrolled`) and over the actions while there is more below (`is-more`), as the title bar's edge does ([AppTitleBar](AppTitleBar.md)).
|
|
11
|
+
- **Always a title**, in object-title, and nothing beside it: no glyph, no chip, no avatar. A confirm asks a question ("Delete staging?"); a form says what it does ("Invite people"); a list says what you're choosing ("Choose a project"); one that shows names what it shows ("Sharing").
|
|
12
|
+
- **It leaves by Cancel, never by an icon**: no ✕ ([page.md](../rules/page.md) § Close or back). One that only shows has **Close** instead, as text. Escape, a press on the scrim and the phone's back gesture all do what Cancel does, except that a form ignores Escape and the scrim, so a stray press loses nothing.
|
|
8
13
|
- **Confirm** what is hard to undo or reaches past the user: deleting, sending to people, deploying to production. Restate it in the title as a question ("Delete staging?") and say what goes with it in the body.
|
|
14
|
+
- **A form in a dialog** (Invite people) follows the form rules: fields 24 apart, validated on submit, and persistent (Escape and the scrim don't close it). The dialog is the confirmation, so its affirmative ("Send 3 invites") needs no second one; it is the dialog's filled button. Cancel discards what was typed without asking: the guard against leaving with unsaved changes is for screens and panes, never a second dialog over this one. A failure that belongs to no field is an error [AppAlert](AppAlert.md) at the top of the dialog, with the fields kept ([errors.md](../rules/errors.md)).
|
|
15
|
+
- **Choosing from a list** (Choose a project, Choose files and artifacts) is a dialog when the choice is the whole task. A search field ([page.md](../rules/page.md) § Search) sits under the title, fixed, once the list passes about eight rows; the rows scroll in the body. Several are checkboxes and one is radios ([AppCheckbox](AppCheckbox.md)); the affirmative counts what it will do ("Add 3 files"). A choice that only goes somewhere (switching project) is a menu ([AppMenu](AppMenu.md)); a choice inside a form is a field ([AppCombobox](AppCombobox.md)), never a dialog over a dialog.
|
|
9
16
|
- **Signed out** is the one dialog with no Cancel: there is nothing to go back to. It sits over the screen as it was, Escape and the scrim don't close it, and Sign in again opens sign-in in a new tab, so nothing underneath reloads ([errors.md](../rules/errors.md)).
|
|
10
17
|
- **Asking for access** ([access.md](../rules/access.md) § Asking for more) is a form in a dialog. The title asks for the role ("Ask for Editor access?"), the body names who will be asked ("Ruan Spies, the Owner of Renewal calls, will be asked."), one field takes an optional note ("Note for Ruan (optional)"), and Send request is the filled affirmative. After it sends, the control that opened it is replaced by "Request sent".
|
|
11
18
|
- **Sharing, seen by someone who can't change it**, lists the people with their roles as text (no role menus, no Remove), says what each role can do in the words of `words.json`, and has one line, "Only Owners can change Sharing.". Its actions are Close and, when they may ask, Request Editor access, both text: neither commits.
|
|
12
|
-
- **
|
|
19
|
+
- **Leaving with unsaved changes** is a dialog over the screen being left ([page.md](../rules/page.md) § Forms): "Discard changes?", a body naming what wasn't saved, then Keep editing as text and Discard changes filled in `error`. Keep editing takes Cancel's place in this one dialog, where "Cancel" could mean the edits or the leaving.
|
|
20
|
+
|
|
21
|
+
### On a phone
|
|
22
|
+
|
|
23
|
+
Below 600 every dialog docks to the foot: the same dialog, full width, its top corners rounded, its title, body and actions unchanged. It rises from the foot and grows with its content to 48 short of the top, where the screen it covers still shows under the scrim; then its body scrolls. While the keyboard is up it rides on top of it, so the action stays in sight. No ✕, no back arrow and no handle: Cancel is at the thumb, and the phone's back gesture is Cancel.
|
|
24
|
+
|
|
25
|
+
### Not a dialog
|
|
26
|
+
|
|
27
|
+
- **A flow in steps, or a form in sections** is a page ([page.md](../rules/page.md) § A form in steps).
|
|
28
|
+
- **Something shown full size** (an image, a video, a diagram, a document, a field expanded to edit at length) is a full-size view over the screen ([page.md](../rules/page.md) § A full-size view). A file Alis made opens in the [AppFilePane](AppFilePane.md).
|
|
29
|
+
- **An explanation** is a fold beside what it explains ([AppDisclosure](AppDisclosure.md)), a tooltip for one line, or the docs; never a dialog that ends in "Got it" ([register.md](../rules/register.md)). Your own agent's door is an [AppHandOff](AppHandOff.md).
|
|
30
|
+
- **A success** shows the result in place, with a snackbar when it's easy to miss ([page.md](../rules/page.md) § Forms). **A failure** is an alert where it happened ([errors.md](../rules/errors.md)).
|
|
31
|
+
- **What Alis or a person asks of you** is an [AppAsk](AppAsk.md) on the composer.
|
|
13
32
|
|
|
14
33
|
## Markup
|
|
15
34
|
|
|
@@ -27,6 +46,39 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
|
|
|
27
46
|
</div>
|
|
28
47
|
</div>
|
|
29
48
|
|
|
49
|
+
<!-- Choosing from a list: search fixed under the title, rows scrolling in the body, the affirmative counts -->
|
|
50
|
+
<div class="app-scrim">
|
|
51
|
+
<div role="dialog" aria-modal="true" aria-labelledby="d-pick-t" tabindex="-1" class="app-dialog">
|
|
52
|
+
<h2 id="d-pick-t" class="app-dialog__title text-object-title">Choose files and artifacts</h2>
|
|
53
|
+
<label class="app-search" role="search">
|
|
54
|
+
<span class="app-icon" aria-hidden="true">search</span>
|
|
55
|
+
<input class="app-search__input" type="search" placeholder="Search files" aria-label="Search files">
|
|
56
|
+
</label>
|
|
57
|
+
<div class="app-dialog__body is-scrolled is-more" role="group" aria-label="Files and artifacts">
|
|
58
|
+
<label class="app-check-row"><input type="checkbox" class="app-checkbox" checked><span class="app-check-row__text"><span class="text-body">Renewal interview guide.pdf</span></span></label>
|
|
59
|
+
<label class="app-check-row"><input type="checkbox" class="app-checkbox" checked><span class="app-check-row__text"><span class="text-body">Customer journey map</span></span></label>
|
|
60
|
+
<label class="app-check-row"><input type="checkbox" class="app-checkbox"><span class="app-check-row__text"><span class="text-body">Q3 churn notes.docx</span></span></label>
|
|
61
|
+
<label class="app-check-row"><input type="checkbox" class="app-checkbox" checked><span class="app-check-row__text"><span class="text-body">Pricing page draft</span></span></label>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="app-btn-row">
|
|
64
|
+
<button type="button" class="app-btn app-state app-target">Cancel</button>
|
|
65
|
+
<button type="button" class="app-btn app-state app-target app-btn--filled">Add 3 files</button>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- Leaving with unsaved changes: Keep editing in Cancel's place -->
|
|
71
|
+
<div class="app-scrim">
|
|
72
|
+
<div role="dialog" aria-modal="true" aria-labelledby="d-leave-t" tabindex="-1" class="app-dialog">
|
|
73
|
+
<h2 id="d-leave-t" class="app-dialog__title text-object-title">Discard changes?</h2>
|
|
74
|
+
<div class="app-dialog__body text-body">Your changes to Branding haven't been saved.</div>
|
|
75
|
+
<div class="app-btn-row">
|
|
76
|
+
<button type="button" class="app-btn app-state app-target">Keep editing</button>
|
|
77
|
+
<button type="button" class="app-btn app-state app-target app-btn--filled app-btn--error">Discard changes</button>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
30
82
|
<!-- Signed out: the one dialog with no Cancel -->
|
|
31
83
|
<div class="app-scrim">
|
|
32
84
|
<div role="dialog" aria-modal="true" aria-labelledby="d-out-t" tabindex="-1" class="app-dialog">
|
|
@@ -56,7 +108,7 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
|
|
|
56
108
|
</div>
|
|
57
109
|
</div>
|
|
58
110
|
|
|
59
|
-
<!-- Sharing, seen by a Viewer: roles as text, what each can do, one line -->
|
|
111
|
+
<!-- Sharing, seen by a Viewer: roles as text, what each can do, one line, Close -->
|
|
60
112
|
<div class="app-scrim">
|
|
61
113
|
<div role="dialog" aria-modal="true" aria-labelledby="d-share-t" tabindex="-1" class="app-dialog">
|
|
62
114
|
<h2 id="d-share-t" class="app-dialog__title text-object-title">Sharing</h2>
|
|
@@ -75,7 +127,7 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
|
|
|
75
127
|
</div>
|
|
76
128
|
</div>
|
|
77
129
|
|
|
78
|
-
<!-- In the flow, for docs: no scrim, no aria-modal, no focus handling -->
|
|
130
|
+
<!-- In the flow, for docs: no scrim, no aria-modal, no focus handling; it stays centred at every width -->
|
|
79
131
|
<div class="app-scrim app-scrim--inline">…</div>
|
|
80
132
|
<!-- or the .app-dialog alone -->
|
|
81
133
|
```
|
|
@@ -85,6 +137,8 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
|
|
|
85
137
|
- **Open**: remember `document.activeElement`, then focus the first focusable element inside the dialog (the first field, else the first action, which is Cancel), or a chosen element; fall back to the dialog itself (`tabindex="-1"`).
|
|
86
138
|
- **Trap focus**: on Tab from the last focusable element go to the first, and on Shift+Tab from the first go to the last.
|
|
87
139
|
- **Close** on Escape, on a press of the scrim itself (`mousedown` whose target is the `.app-scrim`, not the dialog), and on Cancel. A persistent dialog (a form) ignores Escape and the scrim.
|
|
140
|
+
- **The scroll edges**: while the body's `scrollTop` is above 0 it takes `is-scrolled`; while there is more below (`scrollTop + clientHeight < scrollHeight`) it takes `is-more`. Check on open, on scroll and when the content changes.
|
|
141
|
+
- **On a phone**: push a history entry on open, so the back gesture closes the dialog as Cancel does instead of leaving the screen; drop it when the dialog closes any other way. While the keyboard is up, set `--app-keyboard` on the scrim to the height it covers (`innerHeight - visualViewport.height - visualViewport.offsetTop`, on the visual viewport's `resize`), so the dialog rides on it. On Android, `interactive-widget=resizes-content` in the viewport tag does this without the script.
|
|
88
142
|
- **On close**: set `hidden` on the scrim and remove it after `--spring-fast-effects-duration`, so it fades ([motion.md](../rules/motion.md)); return focus to the remembered element if it is still in the document.
|
|
89
143
|
- Mount one dialog at a time.
|
|
90
144
|
- **Signed out**: Sign in again opens sign-in in a new tab from the click itself; where the tab is blocked, reload through sign-in instead. Close the dialog when that tab reports back, or when the window regains focus and the session is back. Back as someone else, reload the page.
|
|
@@ -92,4 +146,4 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
|
|
|
92
146
|
|
|
93
147
|
## Classes
|
|
94
148
|
|
|
95
|
-
`.app-scrim`, `.app-scrim--inline`, `.app-dialog`, `.app-dialog__title`, `.app-dialog__body`, `.app-btn-row`.
|
|
149
|
+
`.app-scrim`, `.app-scrim--inline`, `.app-dialog`, `.app-dialog__title`, `.app-dialog__body`, `.is-scrolled`, `.is-more`, `.app-btn-row`. The custom property `--app-keyboard` on the scrim.
|
package/components/AppStepper.md
CHANGED
|
@@ -12,8 +12,8 @@ See [page.md](../rules/page.md) § A form in steps for when a form takes steps a
|
|
|
12
12
|
- **A done step is a button back to it**, with `app-state`. A later step is not: the flow's Continue checks the step before it moves on. Editing something that already exists, every step has been reached, so every step is a button.
|
|
13
13
|
- **No step is a button while a save runs, or once going back can't undo what a step made** (an instance created before its configuration): those steps stay done, as `<span>`s.
|
|
14
14
|
- **A step that no longer holds** (an edit elsewhere broke it, or the server refused it) is `is-invalid`: its segment and name in `error`, the `error` glyph before the name.
|
|
15
|
-
- **It leads the flow's surface**: the top of the instrument card on
|
|
16
|
-
- **Narrower than 480** (its own width, so a narrow
|
|
15
|
+
- **It leads the flow's surface**: the top of the instrument card on the page; never in a dialog ([page.md](../rules/page.md) § A form in steps). Never a panel of its own, and never "Step 1 of 2" written beside it. On a sign-in card ([AppSignIn](AppSignIn.md)) it takes the logo's place from the first stepped card: the person has just seen the logo.
|
|
16
|
+
- **Narrower than 480** (its own width, so a narrow card counts too) the names leave and one caption under the bars names the current step and counts ("Contact", "2 of 3"). The names stay for assistive technology.
|
|
17
17
|
- Not for work the system runs: that is [AppProgress](AppProgress.md) and its steps. Not for views of one thing: that is an [AppSegmented](AppSegmented.md).
|
|
18
18
|
|
|
19
19
|
## Markup
|
|
@@ -69,7 +69,7 @@ See [page.md](../rules/page.md) § A form in steps for when a form takes steps a
|
|
|
69
69
|
|
|
70
70
|
- **Move the states** as the person moves: `is-done` on every step behind them, `is-current` and `aria-current="step"` on theirs, nothing on the rest. Swap a step's `<span>` for a `<button>` once it is done.
|
|
71
71
|
- **Continue checks the step**: on a failure it stays, turns each field `error` with its supporting line, and moves focus to the first; it is never disabled ([page.md](../rules/page.md) § Forms).
|
|
72
|
-
- **Keep the step in the URL** (`?step=review`): each step pushes a history entry, so the browser's back steps back and a refresh stays.
|
|
72
|
+
- **Keep the step in the URL** (`?step=review`): each step pushes a history entry, so the browser's back steps back and a refresh stays.
|
|
73
73
|
- **Update the caption** with the current step's name and count; it is `aria-hidden`, because the list already says it.
|
|
74
74
|
|
|
75
75
|
## Classes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.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/buttons.md
CHANGED
|
@@ -225,7 +225,8 @@ The rest:
|
|
|
225
225
|
interview"), and a control that works a thing in place (Start recording).
|
|
226
226
|
- **Dialogs:** a dialog is its own screen, so
|
|
227
227
|
its affirmative is filled when it commits, in `error` when it destroys, and
|
|
228
|
-
the rest are text. "Cancel" is always text
|
|
228
|
+
the rest are text. "Cancel" is always text; leaving with unsaved changes says
|
|
229
|
+
"Keep editing" in its place ([AppDialog](../components/AppDialog.md)). An affirmative that doesn't commit
|
|
229
230
|
(it opens, copies or reads: "Open app", "Copy message") is text too, so the
|
|
230
231
|
whole dialog is text. "Try again" is filled when it retries a write. A
|
|
231
232
|
"Continue" names no outcome: rename it to what happens.
|
package/rules/known-gaps.md
CHANGED
|
@@ -10,6 +10,7 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
|
|
|
10
10
|
- **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.
|
|
11
11
|
- **A standalone bulk uploader**, beyond conversation attachments. Conversation uploads are covered by [AppAttachment](../components/AppAttachment.md) and [AppComposer](../components/AppComposer.md).
|
|
12
12
|
- **A dismissible alert**.
|
|
13
|
+
- **A full-size view** ([page.md](page.md) § A full-size view) has no classes yet: build its bar from the title bar's parts and its ground from `machine-surface`'s black stage or `surface`, and mark it `GAP`.
|
|
13
14
|
|
|
14
15
|
## Open patterns
|
|
15
16
|
|
package/rules/motion.md
CHANGED
|
@@ -56,7 +56,8 @@ The curve is CSS `linear()`, drawn from the spring itself, every wobble of it.
|
|
|
56
56
|
from the right edge, the phone's navigation pane from the left, the composer's
|
|
57
57
|
bands up out of the composer, a menu out of its trigger, a snackbar up from the
|
|
58
58
|
foot. A dialog comes from nowhere: it fades in place, with its scrim, and
|
|
59
|
-
nothing about it moves.
|
|
59
|
+
nothing about it moves. On a phone it docks to the foot, so it rises from there
|
|
60
|
+
([AppDialog](../components/AppDialog.md)).
|
|
60
61
|
- **Leaving is quicker than arriving.** Something within the screen leaves as a
|
|
61
62
|
fade on fast effects, without moving. A pane goes back over its edge.
|
|
62
63
|
- **Grow, never scale.** A surface arrives by revealing itself along one axis (a
|
|
@@ -112,7 +113,7 @@ needs nothing from the site.
|
|
|
112
113
|
| An icon changing its meaning (Send to Stop, Copy to ✓) | `.app-icon-swap` turns one glyph away and springs the other in | Put both glyphs in it and toggle `is-swapped` ([AppIconButton](../components/AppIconButton.md)) |
|
|
113
114
|
| Selection that travels | `app-tabs--travel` and `app-seg--travel` draw one indicator that travels | Set `--indicator-left` and `--indicator-width` to the selected item's `offsetLeft` and `offsetWidth`, then add the modifier, so it is drawn in place and moves only on a change ([AppTitleBar](../components/AppTitleBar.md), [AppSegmented](../components/AppSegmented.md)) |
|
|
114
115
|
| Expand and collapse | A disclosure and a turn's steps open to their height, then their rows fade in | Toggle `open` or `hidden`, as already |
|
|
115
|
-
| A menu, tooltip, snackbar or dialog | A menu or snackbar arrives growing out of where it lives; a tooltip and a dialog fade in place. Each leaves as a fade when it's `hidden`. Nothing is clipped once it has arrived, so a field's panel inside it shows whole | Toggle `hidden`, or set it and remove the element once it has gone (§ Removing what has left). Removed at once, it just goes |
|
|
116
|
+
| A menu, tooltip, snackbar or dialog | A menu or snackbar arrives growing out of where it lives; a tooltip and a dialog fade in place, and a dialog on a phone rises from the foot. Each leaves as a fade when it's `hidden`. Nothing is clipped once it has arrived, so a field's panel inside it shows whole | Toggle `hidden`, or set it and remove the element once it has gone (§ Removing what has left). Removed at once, it just goes |
|
|
116
117
|
| Alis's ask | Grows up out of the composer | Render it with `is-arriving` when it opens while someone is there |
|
|
117
118
|
| The conversation | A turn that arrives fades in, and yours rises out of the composer; each status fades in; each run of a reply fades in as it lands | `is-arriving` on a turn that arrives while the thread is open; each step's words in a new element inside the one status; each arriving run in `.app-turn__chunk` ([AppTurn](../components/AppTurn.md)) |
|
|
118
119
|
| A list that changes | A row that arrives opens its space and is tinted for a moment; one that leaves folds away | `is-arriving` on a row that arrives while the list is open; `is-leaving`, then remove it once it has gone ([AppListRow](../components/AppListRow.md)) |
|
package/rules/page.md
CHANGED
|
@@ -89,7 +89,8 @@ One test: **is what you were on still there behind it?**
|
|
|
89
89
|
- **Either one leads the bar**, its glyph on the 24px edge. Never on the trailing
|
|
90
90
|
edge, and never both.
|
|
91
91
|
- **Never an icon to leave a dialog, a message or a step.** A dialog leaves by
|
|
92
|
-
Cancel ([AppDialog](../components/AppDialog.md))
|
|
92
|
+
Cancel ([AppDialog](../components/AppDialog.md)), on a phone too: there it docks
|
|
93
|
+
to the foot over the screen, which still shows above it, so it covers nothing. A snackbar goes by itself and
|
|
93
94
|
an alert stays until you act ([AppAlert](../components/AppAlert.md)). A step in
|
|
94
95
|
a flow goes back by a Back text button at the row's start
|
|
95
96
|
([AppStepper](../components/AppStepper.md)).
|
|
@@ -98,6 +99,24 @@ One test: **is what you were on still there behind it?**
|
|
|
98
99
|
[AppAttachment](../components/AppAttachment.md)). Never to delete, deny or
|
|
99
100
|
reject: those take words.
|
|
100
101
|
|
|
102
|
+
## A full-size view
|
|
103
|
+
|
|
104
|
+
**Something shown full size covers the window; it is not a dialog.** An image
|
|
105
|
+
or a video, a diagram, a document, a field expanded to edit at length.
|
|
106
|
+
|
|
107
|
+
- **Close (`close`) leads**, the thing's name beside it, its verbs on the
|
|
108
|
+
trailing edge (Download, Copy); the screen is still behind it (§ Close or
|
|
109
|
+
back). Esc closes it, and on a phone so does the back gesture.
|
|
110
|
+
- **Its ground**: an image or a video sits on black, the media stage
|
|
111
|
+
([styling.md](styling.md)); a diagram, a document or an editor sits on
|
|
112
|
+
`surface`.
|
|
113
|
+
- **Several images step** with ← and → and the chevrons at the sides, the place
|
|
114
|
+
counted at the foot ("2 of 4").
|
|
115
|
+
- **An expanded field** is the same field, larger: `close_fullscreen`
|
|
116
|
+
("Collapse") leads instead of close, and what was typed stays.
|
|
117
|
+
- **A file Alis made** opens beside the conversation instead
|
|
118
|
+
([AppFilePane](../components/AppFilePane.md)), and expands from there.
|
|
119
|
+
|
|
101
120
|
## Where back goes
|
|
102
121
|
|
|
103
122
|
**Back returns to where you came from, and its name says where.**
|
|
@@ -309,6 +328,14 @@ leads its content with it, or leaves it out. What a failure shows, and where, is
|
|
|
309
328
|
its evidence is off-screen or easy to miss, a snackbar confirms it ("Saved",
|
|
310
329
|
"Deleted staging"); a result someone needs to read stays as a success alert
|
|
311
330
|
at the top.
|
|
331
|
+
- **Leaving with unsaved changes** (a link, back, closing a pane) asks first, in
|
|
332
|
+
one dialog over the screen: "Discard changes?", a body naming what wasn't saved
|
|
333
|
+
("Your changes to Branding haven't been saved."), Keep editing as text and
|
|
334
|
+
Discard changes filled in `error` ([AppDialog](../components/AppDialog.md)).
|
|
335
|
+
Saving stays on the screen, where it can show its errors. Reloading or closing
|
|
336
|
+
the tab gets the browser's own prompt, whose words aren't ours. A form in a
|
|
337
|
+
dialog needs no guard: Escape and the scrim can't close it, so Cancel discards.
|
|
338
|
+
Never the browser's `confirm()` for it.
|
|
312
339
|
- **A switch** applies at once on its own, and with the rest on Save inside a form.
|
|
313
340
|
- **A provider's payment form** (Stripe's Payment Element) is themed once, from
|
|
314
341
|
the tokens, through its own appearance options: Nunito Sans through its fonts
|
|
@@ -347,9 +374,14 @@ Should this form take steps?
|
|
|
347
374
|
└─ Views of one thing, or work the system runs → not steps: AppSegmented, AppProgress
|
|
348
375
|
```
|
|
349
376
|
|
|
377
|
+
**Steps or sections make a page, never a dialog.** A dialog holds one decision
|
|
378
|
+
in one screen ([AppDialog](../components/AppDialog.md)); a flow in steps, or a form
|
|
379
|
+
in sections, gets its own route with the form card at the prose measure, back
|
|
380
|
+
leading the bar and naming where it returns ("Back to Workstations").
|
|
381
|
+
|
|
350
382
|
- **Two to five steps, each named in a word or two.** More than five is two flows.
|
|
351
383
|
- **[AppStepper](../components/AppStepper.md) leads the flow's surface**: the top
|
|
352
|
-
of its card on
|
|
384
|
+
of its card on the page. No panel round it, and no
|
|
353
385
|
"Step 1 of 2" beside it. On a sign-in card it takes the logo's place
|
|
354
386
|
([AppSignIn](../components/AppSignIn.md)).
|
|
355
387
|
- **One action row at the foot.** Back is text, on the leading edge, from the
|
|
@@ -364,9 +396,8 @@ Should this form take steps?
|
|
|
364
396
|
title asks the question ("Publish this interview?"), it lists what was chosen,
|
|
365
397
|
and its button names the outcome. No dialog after it.
|
|
366
398
|
- **A result is not a step.** When the flow ends, show the thing it made.
|
|
367
|
-
- **
|
|
368
|
-
|
|
369
|
-
step in the dialog, and closing it discards the step.
|
|
399
|
+
- **The step is in the URL** (`?step=review`), so a refresh keeps it and the
|
|
400
|
+
browser's back steps back.
|
|
370
401
|
- **A step that made something going back can't undo** stops being a way back,
|
|
371
402
|
and so does every step while a save runs.
|
|
372
403
|
|
package/rules/quick-start.md
CHANGED
|
@@ -68,6 +68,8 @@ AppShell
|
|
|
68
68
|
| 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) |
|
|
69
69
|
| A result that passes ("Saved", "Deleted") | `AppSnackbar` |
|
|
70
70
|
| A confirmation | `AppDialog` with `onClose`: Cancel as text, the affirmative last and filled (`tone="error"` when it destroys) |
|
|
71
|
+
| A choice from a list, when choosing is the whole task | `AppDialog` with a search field under the title, checkbox or radio rows in the body, the affirmative counting ("Add 3 files") |
|
|
72
|
+
| A flow in steps, or a form in sections | A page with its own route, never a dialog (`page.md` § A form in steps) |
|
|
71
73
|
| Waiting, shape known | `AppSkeleton` in the content's shape |
|
|
72
74
|
| Waiting, shape unknown | `AppLoader` |
|
|
73
75
|
| Work you can count (a deploy, an upload) | `AppProgress`, with `AppSteps` for named stages |
|
package/words.json
CHANGED
|
@@ -541,6 +541,7 @@
|
|
|
541
541
|
{ "name": "Upload", "means": "Files from your device (buttons.md § Naming the action)." },
|
|
542
542
|
{ "name": "Delete", "means": "It stops existing for everyone, and nobody can bring it back from the product." },
|
|
543
543
|
{ "name": "Discard", "means": "It was never kept, and goes for good: a recording, a draft. Its glyph is Delete's (buttons.md § The form)." },
|
|
544
|
+
{ "name": "Keep editing", "means": "Stays on the screen with the changes still there: the text action when leaving with unsaved changes asks \"Discard changes?\" (AppDialog), in Cancel's place there and nowhere else." },
|
|
544
545
|
{ "name": "Remove", "means": "It leaves this place and still exists: a person from Sharing, a project from a collection, a file from a message." },
|
|
545
546
|
{ "name": "Archive", "means": "Only where there is a place to find archived things and bring them back. Otherwise it is Delete." },
|
|
546
547
|
{ "name": "Share", "means": "Opens Sharing." },
|