@alis-build/design-system 0.46.0 → 0.47.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/components/AppButton.md +4 -2
- package/components/AppIconButton.md +1 -1
- package/package.json +1 -1
- package/rules/buttons.md +18 -16
package/components/AppButton.md
CHANGED
|
@@ -11,7 +11,7 @@ Emphasis is allocated, not chosen ([buttons.md](../rules/buttons.md)).
|
|
|
11
11
|
- Cyan text is a link, never a button.
|
|
12
12
|
- **Error** (`app-btn--error`) for destructive actions, at the same level. **Quiet** (`app-btn--quiet`, `on-surface-variant`) for a quiet action beside content.
|
|
13
13
|
- No tonal or elevated buttons. A filled button scales to 97% and rounds to 12px when pressed (the CSS does it).
|
|
14
|
-
- **A word or a glyph, never both, outside the lexicon** ([buttons.md](../rules/buttons.md) § The form): `add` (New, Add), `upload`, `download`, `content_copy` (Copy), `link` (Copy link) and `edit` lead their verb wherever it appears; `delete` (Delete, Discard)
|
|
14
|
+
- **A word or a glyph, never both, outside the lexicon** ([buttons.md](../rules/buttons.md) § The form): `add` (New, Add), `upload`, `download`, `content_copy` (Copy), `link` (Copy link) and `edit` lead their verb wherever it appears; `delete` (Delete, Discard) leads in the button's ink, `error` on a "Delete" text button, never on a dialog's filled affirmative; `edit_square` leads a new conversation; a trailing chevron opens a menu and a trailing `open_in_new` leaves the product, each with `app-icon--trailing` so it pulls into the end padding as a leading glyph pulls into the start; a third party's mark leads a hand-off to them. No glyph on a filled button or a dialog's affirmative.
|
|
15
15
|
- **A shortcut** never goes in the label. A button with one takes an [AppTooltip](AppTooltip.md) that says the label and its keys, and `aria-keyshortcuts` ([shortcuts.md](../rules/shortcuts.md)); a button without one has no tooltip.
|
|
16
16
|
- The visible box is `control-height` (36px, 48 on touch), padded 24, and the target is `touch-target` ([buttons.md](../rules/buttons.md)). Text and outlined buttons are 600, the filled button 700. `app-btn--small` (32px, padded 12) belongs only in a table row. Inside a toggle group or table row, add `app-target--none`.
|
|
17
17
|
- **Loading** shows the work on the control the user pressed: a 16px spinner replaces the icon and the label stays (or becomes the present participle, "Deploying"). The button is busy, not disabled: full colour, presses ignored until it settles.
|
|
@@ -45,7 +45,9 @@ Emphasis is allocated, not chosen ([buttons.md](../rules/buttons.md)).
|
|
|
45
45
|
<button type="submit" class="app-btn app-state app-target app-btn--filled">Save changes</button>
|
|
46
46
|
|
|
47
47
|
<!-- Destructive, quiet, small -->
|
|
48
|
-
<button type="button" class="app-btn app-state app-target app-btn--error">
|
|
48
|
+
<button type="button" class="app-btn app-state app-target app-btn--error">
|
|
49
|
+
<span class="app-icon" aria-hidden="true">delete</span>Delete
|
|
50
|
+
</button>
|
|
49
51
|
<button type="button" class="app-btn app-state app-target app-btn--quiet">Show all</button>
|
|
50
52
|
<button type="button" class="app-btn app-state app-target app-btn--small">Retry</button>
|
|
51
53
|
|
|
@@ -7,7 +7,7 @@ A 20px glyph in a 40px box that performs one action.
|
|
|
7
7
|
- `on-surface-variant`, no fill, no border, no shadow, no product colour ([buttons.md](../rules/buttons.md)).
|
|
8
8
|
- The label is required: it is the accessible name and its [AppTooltip](AppTooltip.md), which carries the keys when it has a shortcut. No `title` as well: the browser would show a second tooltip.
|
|
9
9
|
- An icon button is not a selection. The one exception is a **toggle** (on or off, and stays that way): selected, it takes the `secondary-container` fill with a filled glyph.
|
|
10
|
-
- **Delete and Discard are `delete`**, in the same `on-surface-variant`, on one thing on its own (a detail screen's title bar, a detail pane), never on every item in a list: there Delete is the danger row of the item's ⋯ menu. Remove is `close` ([buttons.md](../rules/buttons.md) § The form).
|
|
10
|
+
- **Delete and Discard are `delete`**, in the same `on-surface-variant`, on one thing on its own (a detail screen's title bar, a detail pane, the bar over what you selected), never on every item in a list: there Delete is the danger row of the item's ⋯ menu. Remove is `close` ([buttons.md](../rules/buttons.md) § The form).
|
|
11
11
|
- If it shows a word, use [AppButton](AppButton.md). If it does nothing on its own, it is an [AppIcon](AppIcon.md).
|
|
12
12
|
- `app-icon-btn--small` (32px box; on touch its target still projects to 48) for the title bar's verbs and a detail pane's close. In a list row's trailing slot or a table cell the CSS shrinks it to 32px and drops the projected target for you.
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.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
|
@@ -108,7 +108,7 @@ appears: a text button, a lead, a menu row in a menu with glyphs, an icon button
|
|
|
108
108
|
| Copy | `content_copy` |
|
|
109
109
|
| Copy link | `link` |
|
|
110
110
|
| Edit | `edit` |
|
|
111
|
-
| Delete, Discard | `delete
|
|
111
|
+
| Delete, Discard | `delete` |
|
|
112
112
|
|
|
113
113
|
- **`add` on every New and Add.** The action that brings a thing into a screen
|
|
114
114
|
(§ Naming the action) leads with the plain `add` glyph wherever it appears: a
|
|
@@ -131,29 +131,31 @@ appears: a text button, a lead, a menu row in a menu with glyphs, an icon button
|
|
|
131
131
|
somewhere: a file off a message, a person from Sharing, a value from a field
|
|
132
132
|
([AppChip](../components/AppChip.md),
|
|
133
133
|
[AppAttachment](../components/AppAttachment.md)). So the trash and the X never
|
|
134
|
-
stand in for each other.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
stand in for each other. The word follows what happens to the thing, not the
|
|
135
|
+
call that does it: a contribution archived with no way back is deleted, and
|
|
136
|
+
its button says Delete.
|
|
137
|
+
- **It takes the button's ink**: `error` on a "Delete" text button ("Delete
|
|
138
|
+
selected", a danger zone's "Delete project"), `on-surface-variant` on an
|
|
139
|
+
icon button, whose tooltip starts with Delete or Discard ("Delete
|
|
140
|
+
session"), and the danger row's `error` in a menu with glyphs
|
|
141
|
+
([AppMenu](../components/AppMenu.md)).
|
|
142
|
+
- **Never on the confirmation.** A dialog's affirmative is filled `error`,
|
|
143
|
+
and a filled button takes no glyph (below), so the trash is on the button
|
|
144
|
+
that asks and never on the one that does it. The affirmative names the
|
|
145
|
+
outcome ("Delete 2 interviews"), never "Confirm".
|
|
143
146
|
- **Never on every item.** In a list, a grid of cards or a table, Delete is the
|
|
144
147
|
danger row of each item's ⋯ menu, so how to destroy a thing is never the
|
|
145
148
|
loudest part of a list. One thing on its own (a detail screen's title bar, a
|
|
146
|
-
detail pane
|
|
149
|
+
detail pane, the bar over what you selected) shows it.
|
|
147
150
|
- **The act, never a state**: a "Deleting" chip takes no trash.
|
|
148
151
|
- **A verb joins the lexicon only when all four hold.** People know the glyph
|
|
149
152
|
without its word, from the products they already use. People come to the screen
|
|
150
153
|
looking for the action, rather than being offered it at the moment it fits
|
|
151
154
|
(Retry on an error line is offered). The glyph means one thing in the product.
|
|
152
|
-
And a glyph for an
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Preview (the eye also means show and hide), nor Share (its glyph differs by
|
|
155
|
+
And a glyph for an act that destroys never repeats down a list, because a
|
|
156
|
+
landmark pulls the eye, and the eye shouldn't go first to what destroys. So
|
|
157
|
+
Refresh, Retry and Update now keep no glyph (one arrow would mean three verbs),
|
|
158
|
+
nor Preview (the eye also means show and hide), nor Share (its glyph differs by
|
|
157
159
|
platform).
|
|
158
160
|
|
|
159
161
|
**Tells.** The glyph says what the word can't: what kind of action, or where the
|