@filipgutica/design-system 1.0.25 → 1.0.26
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/language/DESIGN.md +2 -2
- package/language/components.html +3 -3
- package/language/components.md +3 -3
- package/package.json +1 -1
package/language/DESIGN.md
CHANGED
|
@@ -256,12 +256,12 @@ Each depth tier has one token. [`tokens.css`](tokens.css) holds every shadow val
|
|
|
256
256
|
Every interface built with this language starts minimal: application screens, mockups, artifacts, dashboards, charts, and the interface parts of documentation and product pages. Prose in lessons, documentation, and product pages keeps the [copy rules](#copy-and-density). A word, box, or control stays only when it changes what the reader knows or can do; remove anything that repeats what is already in view. Give the space that frees to the evidence, such as a chart or a key value, not to more items.
|
|
257
257
|
|
|
258
258
|
- **Status in one sentence.** A view's summary sentence carries its status, the numbers behind it, and a status icon. Use an [alert](components.md#alert) only for a caveat or an action the summary cannot carry: one per view at most, and never one that repeats a sentence, badge, or heading in view.
|
|
259
|
-
- **One meta line.** Context, such as who ran it, the scope, the size, and liveness ("still running"), sits on one muted line under the title, joined with " · ".
|
|
259
|
+
- **One meta line.** Context, such as who ran it, the scope, the size, and liveness ("still running"), sits on one muted line under the title, joined with " · ". Its details sit behind a disclosure on that line.
|
|
260
260
|
- **One-line rows.** Data rows in a table or list are one line, `--row` tall. Show a direction, trend, or unit as a glyph (↑ or ↓) and put the words in the accessible name. Secondary detail goes in the selected row's detail or a disclosure.
|
|
261
261
|
- **Mark the exceptions.** Status columns, badges, and status icons show only the values that differ from the default. The default has no mark, and one key line names it. Drop an icon that repeats a badge or label in the same row.
|
|
262
262
|
- **Primary action in reach.** A row or card shows its primary next action as a button, plus either one secondary button or, for two or more secondary actions, one overflow menu trigger. A failed or blocked item keeps its recovery action, such as Retry, Resume, or Reconnect, visible.
|
|
263
263
|
- **Forms.** A field takes a description only for a format, limit, or consequence its label does not state. No intro sentence restates the fields. A sticky action bar sits on the page background with a hairline divider, without a panel or shadow.
|
|
264
|
-
- **Containers group.** Never nest a panel, card, or well in another. A component's own parts, as its spec draws them, such as a code block's source panel
|
|
264
|
+
- **Containers group.** Never nest a panel, card, or well in another. A component's own parts, as its spec draws them, are fine, such as a code block's source panel. So are controls and alerts inside a container or a dialog. A figure is a well, so it sits on the page, not in a card. Grid cells and stat tiles take a fill or nothing, not a border each.
|
|
265
265
|
- **Explanations on request.** Method notes, "How to read this", and multiple-comparison caveats go in a closed disclosure next to what they explain.
|
|
266
266
|
|
|
267
267
|
Never cut these:
|
package/language/components.html
CHANGED
|
@@ -1195,7 +1195,7 @@
|
|
|
1195
1195
|
<section class="component" id="field-wrapper" data-layer="Core" data-states="invalid" aria-labelledby="fieldw-title">
|
|
1196
1196
|
<header><h3 id="fieldw-title">Field wrapper</h3><span class="badge">Core</span><a href="components.md#field-wrapper">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="field-wrapper" aria-label="Copy link to Field wrapper" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1197
1197
|
<p class="purpose">Label, description, and error text around a field.</p>
|
|
1198
|
-
<dl class="guidance"><dt>Do</dt><dd>Write the error as the fix, such as “Enter a date after today”, and the description as a format or limit, such as “Up to 64 characters
|
|
1198
|
+
<dl class="guidance"><dt>Do</dt><dd>Write the error as the fix, such as “Enter a date after today”, and the description as a format or limit, such as “Up to 64 characters”. Leave the description out when the label is enough.</dd><dt>Don’t</dt><dd>A description that repeats the label, or an error that only says “Invalid”.</dd></dl>
|
|
1199
1199
|
<div class="row"><h4>Description and error</h4><div class="states">
|
|
1200
1200
|
<div class="state"><div class="field"><label class="field-label" for="fw-desc">Threshold</label><input class="input" id="fw-desc" inputmode="numeric" value="300" aria-describedby="fw-desc-text"><p class="field-description" id="fw-desc-text">Milliseconds at p95.</p></div><span class="caption">With description</span></div>
|
|
1201
1201
|
<div class="state" inert><div class="field"><label class="field-label" for="fw-error">Threshold</label><input class="input" id="fw-error" value="-1" aria-invalid="true" aria-errormessage="fw-error-text"><p class="field-error" id="fw-error-text">Enter a positive number.</p></div><span class="caption">Error replaces the description</span></div>
|
|
@@ -1247,7 +1247,7 @@
|
|
|
1247
1247
|
<section class="component" id="badge" data-layer="Core" aria-labelledby="badge-title">
|
|
1248
1248
|
<header><h3 id="badge-title">Badge</h3><span class="badge">Core</span><a href="components.md#badge">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="badge" aria-label="Copy link to Badge" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1249
1249
|
<p class="purpose">A short status label.</p>
|
|
1250
|
-
<dl class="guidance"><dt>Do</dt><dd>A one- or two-word status or category on an item, such as “Healthy” or “Beta”, with a status tone only when it is a status.</dd><dt>Don’t</dt><dd>A badge that repeats the title, or one on every row with the same value. Badge the exceptions.</dd></dl>
|
|
1250
|
+
<dl class="guidance"><dt>Do</dt><dd>A one- or two-word status or category on an item, such as “Healthy” or “Beta”, with a status tone only when it is a status.</dd><dt>Don’t</dt><dd>A badge that repeats the title, or one on every row with the same value. Badge the exceptions. An icon beside a badge that says the same.</dd></dl>
|
|
1251
1251
|
<div class="row"><h4>Tones</h4><div class="states">
|
|
1252
1252
|
<div class="state"><span class="badge">No data</span><span class="caption">Neutral</span></div>
|
|
1253
1253
|
<div class="state"><span class="badge success">Healthy</span><span class="caption">Success</span></div>
|
|
@@ -1260,7 +1260,7 @@
|
|
|
1260
1260
|
<section class="component" id="alert" data-layer="Core" aria-labelledby="alert-title">
|
|
1261
1261
|
<header><h3 id="alert-title">Alert</h3><span class="badge">Core</span><a href="components.md#alert">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="alert" aria-label="Copy link to Alert" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1262
1262
|
<p class="purpose">A real caveat or status message in the page.</p>
|
|
1263
|
-
<dl class="guidance"><dt>Do</dt><dd>Use an alert for a caveat or status message the reader needs before acting. When action is needed, name it, such as “Reconnect the source to resume sync”.</dd><dt>Don’t</dt><dd>An alert for decoration or routine emphasis. A short status label is a badge; explanations and recovery instructions stay in an alert.</dd></dl>
|
|
1263
|
+
<dl class="guidance"><dt>Do</dt><dd>Use an alert for a caveat or status message the reader needs before acting. When action is needed, name it, such as “Reconnect the source to resume sync”.</dd><dt>Don’t</dt><dd>An alert for decoration or routine emphasis. A short status label is a badge; explanations and recovery instructions stay in an alert. An alert that repeats the summary sentence, a badge, or the heading in view, or a second alert in the same view.</dd></dl>
|
|
1264
1264
|
<div class="row"><h4>Tones</h4><div class="states">
|
|
1265
1265
|
<div class="state wide"><div class="alert"><svg class="icon" aria-hidden="true"><use href="#i-help"/></svg><p>Values are sampled every 5 minutes.</p></div><span class="caption">Neutral</span></div>
|
|
1266
1266
|
<div class="state wide"><div class="alert success"><svg class="icon" aria-hidden="true"><use href="#i-check"/></svg><p>The monitor recovered at 14:20.</p></div><span class="caption">Success</span></div>
|
package/language/components.md
CHANGED
|
@@ -176,7 +176,7 @@ Layer: Core.
|
|
|
176
176
|
- **Anatomy.** A grid with a 6px gap: label, control, then a description or an error. The error replaces the description.
|
|
177
177
|
- **Tokens.** Label `--text-sm` semibold `--color-text`. Description `--text-sm` `--color-muted`. Error `--text-sm` `--color-error`.
|
|
178
178
|
- **States.** Rest, and invalid: the error replaces the description, and the control takes its own invalid state.
|
|
179
|
-
- **Do.** Write the error as the fix, such as "Enter a date after today", and the description as a format or limit, such as "Up to 64 characters".
|
|
179
|
+
- **Do.** Write the error as the fix, such as "Enter a date after today", and the description as a format or limit, such as "Up to 64 characters". Leave the description out when the label is enough.
|
|
180
180
|
- **Don't.** A description that repeats the label, or an error that only says "Invalid".
|
|
181
181
|
- **Keyboard and screen reader.** The label's `for` names the control. The control points `aria-describedby` at the description, and `aria-errormessage` at the error with `aria-invalid="true"`.
|
|
182
182
|
- **Motion.** None: the error replaces the description at once, so it is never half shown.
|
|
@@ -226,7 +226,7 @@ Layer: Core.
|
|
|
226
226
|
- **Tokens.** Neutral: `--color-surface-muted` fill, `--color-muted`, no dot. Status tones (success, warning, danger, info): the tone at 22% over `--color-surface-raised`, text of the tone mixed 75% with `--color-status-ink` in light and 85% in dark, and a leading 6px dot in `currentColor`.
|
|
227
227
|
- **States.** None: a badge is static text. Its tone is a variant, not a state.
|
|
228
228
|
- **Do.** A one- or two-word status or category on an item, such as "Healthy" or "Beta", with a status tone only when it is a status.
|
|
229
|
-
- **Don't.** A badge that repeats the title, or one on every row with the same value. Badge the exceptions.
|
|
229
|
+
- **Don't.** A badge that repeats the title, or one on every row with the same value. Badge the exceptions. An icon beside a badge that says the same.
|
|
230
230
|
- **Keyboard and screen reader.** Static text; the label carries the meaning, never the colour alone.
|
|
231
231
|
- **Motion.** None: a badge is static.
|
|
232
232
|
- **Forced colors.** Fills drop and the transparent border draws as the system edge, so each badge reads as an outlined label. The tone dot opts out of adjustment (`forced-color-adjust: none`) and draws in `CanvasText`, the label's colour; the label still carries the status.
|
|
@@ -239,7 +239,7 @@ Layer: Core.
|
|
|
239
239
|
- **Tokens.** Neutral: `--color-surface`. Status tones use their `--color-*-surface` tint with `--color-text`; the icon takes the status colour.
|
|
240
240
|
- **States.** None: an alert is static content. Its tone is a variant, not a state.
|
|
241
241
|
- **Do.** Use an alert for a caveat or status message the reader needs before acting. When action is needed, name it, such as "Reconnect the source to resume sync".
|
|
242
|
-
- **Don't.** An alert for decoration or routine emphasis. A short status label is a badge; explanations and recovery instructions stay in an alert.
|
|
242
|
+
- **Don't.** An alert for decoration or routine emphasis. A short status label is a badge; explanations and recovery instructions stay in an alert. An alert that repeats the summary sentence, a badge, or the heading in view, or a second alert in the same view.
|
|
243
243
|
- **Keyboard and screen reader.** Static content. Use `role="status"` or `role="alert"` only for a message that appears while the reader works.
|
|
244
244
|
- **Motion.** None: an alert shows at once, with no entrance animation.
|
|
245
245
|
- **Forced colors.** Fills drop and the transparent border draws as the system edge. The icon takes `CanvasText`, the text colour, because an SVG keeps the status colour it sets; the text carries the message.
|