@brignano/design 0.11.0 → 0.12.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/DESIGN.md CHANGED
@@ -35,7 +35,7 @@ family, motion and shape are identical; what changes is how much room things get
35
35
  | Body size | 17px | 15px |
36
36
  | Section rhythm | `--s9` (96px) | `--s6` (32px) |
37
37
  | Measure | 68ch | 780px |
38
- | Display face | Silkscreen — monogram, hero eyebrows | none (aliases to `--sans`) |
38
+ | Display face | Silkscreen — hero eyebrows | none (aliases to `--sans`) |
39
39
  | Motion | scroll reveal, overlays opening and closing (ADR-0013), a press and a switch of view (ADR-0015) | none, except overlays opening and closing (ADR-0013), a press and a switch of view (ADR-0015) |
40
40
  | Density | whitespace carries the layout | scanning beats reading |
41
41
 
@@ -68,7 +68,7 @@ system coherent across a marketing site and an operational tool.
68
68
 
69
69
  ### Identity is not a fill
70
70
 
71
- `--mark` inks a **graphic**: a product's glyph, the `A|B` monogram, a hero rule.
71
+ `--mark` inks a **graphic**: a product's glyph, the bar in the `A|B` logo, a hero rule.
72
72
  That is its entire permitted use. It is never a button, chip, badge, wash, border,
73
73
  or link. The scoped exceptions are the next sections: a product page, and the
74
74
  stage behind a product's picture on its card.
@@ -202,9 +202,9 @@ Three roles, no more:
202
202
  countdowns align in a column.
203
203
  - **`--mono` (IBM Plex Mono)** — data that must read *precise*: confirmation codes,
204
204
  timestamps, stat numbers, eyebrow labels.
205
- - **`--display` (Silkscreen)** — marketing tier only. The `A|B` monogram and hero
206
- eyebrows. Used **once, well** — it is memorable precisely because it is
207
- concentrated. On the tool tier it aliases to `--sans`.
205
+ - **`--display` (Silkscreen)** — marketing tier only. Hero eyebrows; the `A|B`
206
+ logo is drawn, not set in it ("The logo", below). Used **once, well** — it is
207
+ memorable precisely because it is concentrated. On the tool tier it aliases to `--sans`.
208
208
 
209
209
  No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
210
210
 
@@ -226,6 +226,31 @@ No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
226
226
  above a hero heading. (`--display` still names Silkscreen on the marketing tier until
227
227
  #142 removes it.)
228
228
 
229
+ ### The logo
230
+
231
+ The `A|B` logo is the monogram drawn once, in [`logo/`](./logo): the initials in
232
+ Geist at 800, outlined, with the bar between them as a text cursor in the mark
233
+ colour. It is the `.stamp` treatment made into a picture, so the logo and the
234
+ type match.
235
+
236
+ | File | For |
237
+ |---|---|
238
+ | `logo/paths.mjs` | the path data (`MARK`, `TILE`) to inline it: a site header, a share card |
239
+ | `logo/mark.svg` | the mark as an `<img>`, inked for the OS theme |
240
+ | `logo/tile.svg` | the favicon: the mark in an ink tile, the same in both themes |
241
+ | `logo/tile-180.png`, `logo/tile-512.png` | `apple-touch-icon` and the web manifest |
242
+
243
+ - **Inline it where the page has tokens.** The letters take `--ink` and the bar
244
+ `--mark-current`, so the header follows the site theme, not the OS. An
245
+ `<img>` can only follow the OS.
246
+ - **The letters are ink and only the bar is amber.** Never the whole mark in
247
+ `--mark`, never the letters in a state colour, never a gradient or a shadow.
248
+ - **Size by height.** 24 to 32px in a header; under 20px use the tile.
249
+ - **The tile is for icons only:** favicon, home screen, an app's sign-in. On a
250
+ page, use the bare mark.
251
+ - **The bar doesn't move,** except at most one blink on a page's first load,
252
+ and none under `prefers-reduced-motion`.
253
+
229
254
  Sizes change with the tier (`--text-xs` … `--text-4xl`); weight, leading and
230
255
  tracking don't:
231
256
 
@@ -828,6 +853,10 @@ and in what order: [`proposals/component-layer.md`](./proposals/component-layer.
828
853
  `aria-hidden`; an icon-only button carries an `aria-label`. Need one that
829
854
  isn't there? Add it from Lucide in a PR; don't draw one or pull in another
830
855
  set. Brand logos are the exception and stay with their brands.
856
+ - **Chip, segmented or tag.** A filter chip (`.chip`, a `<button>` with
857
+ `aria-pressed`) toggles one filter on a list, and any number can be on. One
858
+ of a few is `.segmented`; a filter already applied, with a remove button, is
859
+ `.tag`.
831
860
  - **Switch or checkbox.** A switch (`.switch`, `role="switch"`) is only for a
832
861
  setting that takes effect the moment it flips. Anything sent with a form's
833
862
  submit button is a checkbox, because a switch promises an effect the form
@@ -961,8 +990,9 @@ currency ("US$", "€") only when the reader could mistake it.
961
990
 
962
991
  These don't appear in a product's interface: exclamation marks; "simply",
963
992
  "just" or "easy" when they play a task down (they blame the person when it
964
- isn't); "Oops" or "Uh-oh"; emoji as words; ALL CAPS typed into the text; and,
965
- on marketing pages, jargon the reader has to look up.
993
+ isn't); "Oops" or "Uh-oh"; emoji as words, icons or category markers (use a
994
+ word or a Lucide icon); ALL CAPS typed into the text; and, on marketing pages,
995
+ jargon the reader has to look up.
966
996
 
967
997
  - Do: "Couldn't load your trips. Try again."
968
998
  - Don't: "Oops! Something went wrong!! Simply refresh."
package/README.md CHANGED
@@ -13,6 +13,7 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
13
13
  | [`product-page.css`](./product-page.css) | The structure of a product's marketing page, built from a five-line brief: thesis and proof on the first phone screen, one signature band, how it works, closing ask. The shared parts every page needs, and a starting point for the look each product writes over it: its mark fills the primary button, and five choices keep any two products from looking alike (ADR-0017). DESIGN.md §13; skeleton in `previews/product-page.html`, one worked example per product in `previews/product-page-example.html` (Driftwood), `product-page-guidebook.html` and `product-page-sites.html`, first-screen check in `scripts/fold.mjs`. |
14
14
  | [`templates/`](./templates) | Page templates built on `components.css`: `article.css` (posts and docs), `changelog.css`, `legal.css`, `error.css` (404, 500, offline), `settings.css`, and a transactional email (`email.html` + `email.txt`, filled from the tokens by `scripts/email-tokens.mjs`). Import as `@brignano/design/templates/<name>.css`. |
15
15
  | [`icons/`](./icons) | One curated outline icon set (Lucide, ISC; `icons/LICENSE`) on a 24px grid in `currentColor`. Size with `.icon-sm`, `.icon`, `.icon-lg` from `components.css`; browse and copy in `previews/icons.html`. Paste the markup inline (`@brignano/design/icons/<name>.svg`); through `<img>` an icon can't take the text colour. |
16
+ | [`logo/`](./logo) | The `A\|B` logo: `paths.mjs` to inline it (letters in `--ink`, bar in `--mark-current`), `mark.svg` for an `<img>`, `tile.svg` and the tile PNGs for a favicon and app icon. Rules in DESIGN.md §5, "The logo". |
16
17
  | [`previews/`](./previews) | Live swatches. Open one in a browser to see the tokens render. |
17
18
 
18
19
  ## The shape of it
package/components.css CHANGED
@@ -396,6 +396,57 @@
396
396
  }
397
397
  }
398
398
 
399
+ /* ── Filter chip (issue 167) ───────────────────────────────────────────────────
400
+ <div class="cluster gap-2" role="group" aria-label="Stage">
401
+ <button type="button" class="chip" aria-pressed="true">Lead</button>
402
+ <button type="button" class="chip" aria-pressed="false">Quoted</button>
403
+ </div>
404
+ A toggle for a filterable list: any number can be on at once. The state
405
+ is aria-pressed, never a class; your script flips it and filters the
406
+ list. Off is the card ground with a control edge; on is the --i fill, the
407
+ same as a chosen .segmented option. One of a few is .segmented; a filter
408
+ already applied, with a remove button, is .tag. */
409
+ @layer brignano.components {
410
+ .chip {
411
+ display: inline-flex;
412
+ align-items: center;
413
+ justify-content: center;
414
+ min-height: 32px;
415
+ margin: 0;
416
+ padding: 0 var(--s3);
417
+ border: 1px solid var(--line-control);
418
+ border-radius: var(--radius-control);
419
+ background-color: var(--card);
420
+ color: var(--ink);
421
+ font: inherit;
422
+ font-size: var(--text-sm);
423
+ font-weight: var(--weight-medium);
424
+ line-height: 20px;
425
+ white-space: nowrap;
426
+ cursor: pointer;
427
+ user-select: none;
428
+ transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
429
+ }
430
+ .chip:hover:not(:disabled) { background-color: var(--surface-hover); }
431
+ .chip[aria-pressed='true'], .chip[aria-pressed='true']:hover:not(:disabled) { border-color: transparent; background-color: var(--i); color: var(--on-i); }
432
+ .chip:focus-visible { outline: 2px solid var(--i-ink); outline-offset: 2px; }
433
+ .chip:disabled { border-color: var(--line); color: var(--i-disabled-ink); cursor: not-allowed; }
434
+ .chip[aria-pressed='true']:disabled { border-color: transparent; background-color: var(--i-disabled-bg); color: var(--i-disabled-ink); }
435
+
436
+ @media (pointer: coarse) {
437
+ .chip { min-height: 44px; }
438
+ }
439
+ @media (forced-colors: active) {
440
+ .chip { forced-color-adjust: none; border-color: CanvasText; background-color: Canvas; color: CanvasText; }
441
+ .chip[aria-pressed='true'] { border-color: Highlight; background-color: Highlight; color: HighlightText; }
442
+ .chip:disabled, .chip[aria-pressed='true']:disabled { border-color: GrayText; background-color: Canvas; color: GrayText; }
443
+ .chip:focus-visible { outline-color: CanvasText; }
444
+ }
445
+ @media (prefers-reduced-motion: reduce) {
446
+ .chip { transition: none; }
447
+ }
448
+ }
449
+
399
450
  /* ── Message and banner (#50) ─────────────────────────────────────────────
400
451
  <div class="msg msg-danger" role="alert">
401
452
  <svg aria-hidden="true" …></svg>
package/logo/mark.svg ADDED
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41.33 24" width="41.33" height="24" role="img" aria-label="Anthony Brignano">
2
+ <!-- The A|B logo: Geist at 800, outlined, with the bar as a cursor in the
3
+ mark colour. A file used as an <img> can't read tokens.css, so the
4
+ colours repeat the ink and mark tokens in each theme; keep them in step.
5
+ Inline it from logo/paths.mjs instead when the page has tokens. -->
6
+ <style>
7
+ .ab { fill: rgb(17 17 20); } .bar { fill: rgb(180 116 31); }
8
+ @media (prefers-color-scheme: dark) { .ab { fill: rgb(242 242 244); } .bar { fill: rgb(224 164 79); } }
9
+ </style>
10
+ <path class="ab" d="M0 20.44 6.08 3.56H10.87L16.96 20.44H12.71L11.61 17.25H5.33L4.23 20.44ZM6.45 13.96H10.5L8.49 8.03ZM27.17 20.44V3.56H34Q37.18 3.56 38.9 4.67Q40.61 5.77 40.61 8.16Q40.61 9.2 40.21 9.95Q39.8 10.71 38.99 11.15Q38.19 11.6 37.04 11.71L37.03 11.72Q39.16 11.89 40.24 12.95Q41.33 14.01 41.33 15.78Q41.33 18.14 39.62 19.29Q37.92 20.44 34.76 20.44ZM31.31 17.18H34.51Q35.68 17.18 36.43 16.71Q37.17 16.23 37.17 15.25Q37.17 14.26 36.43 13.77Q35.7 13.27 34.51 13.27H31.31ZM31.31 10.44H33.85Q35.02 10.44 35.74 9.99Q36.46 9.53 36.46 8.64Q36.46 7.68 35.76 7.25Q35.05 6.82 33.85 6.82H31.31Z"/>
11
+ <path class="bar" d="M20.52 0h3.09v24h-3.09z"/>
12
+ </svg>
@@ -0,0 +1,10 @@
1
+ // Types for logo/paths.mjs.
2
+ export interface LogoPaths {
3
+ width: number;
4
+ height: number;
5
+ viewBox: string;
6
+ letters: string;
7
+ bar: string;
8
+ }
9
+ export declare const MARK: LogoPaths;
10
+ export declare const TILE: LogoPaths & { radius: number };
package/logo/paths.mjs ADDED
@@ -0,0 +1,31 @@
1
+ // The A|B logo as path data, for a page that inlines it (React, satori, a
2
+ // template) instead of loading logo/mark.svg or logo/tile.svg as an image.
3
+ //
4
+ // Inline, the letters take the ink and the bar takes the mark in force:
5
+ //
6
+ // <svg viewBox={MARK.viewBox} role="img" aria-label="Anthony Brignano">
7
+ // <path d={MARK.letters} style="fill: var(--ink)" />
8
+ // <path d={MARK.bar} style="fill: var(--mark-current)" />
9
+ // </svg>
10
+ //
11
+ // The letters are Geist at weight 800 (OFL, fonts/LICENSE-geist.txt),
12
+ // outlined so the logo doesn't wait on the font. DESIGN.md §5, "The logo".
13
+
14
+ /** The mark on its own, 41.33 × 24 with no padding: header, share card, footer. */
15
+ export const MARK = {
16
+ width: 41.33,
17
+ height: 24,
18
+ viewBox: '0 0 41.33 24',
19
+ letters: 'M0 20.44 6.08 3.56H10.87L16.96 20.44H12.71L11.61 17.25H5.33L4.23 20.44ZM6.45 13.96H10.5L8.49 8.03ZM27.17 20.44V3.56H34Q37.18 3.56 38.9 4.67Q40.61 5.77 40.61 8.16Q40.61 9.2 40.21 9.95Q39.8 10.71 38.99 11.15Q38.19 11.6 37.04 11.71L37.03 11.72Q39.16 11.89 40.24 12.95Q41.33 14.01 41.33 15.78Q41.33 18.14 39.62 19.29Q37.92 20.44 34.76 20.44ZM31.31 17.18H34.51Q35.68 17.18 36.43 16.71Q37.17 16.23 37.17 15.25Q37.17 14.26 36.43 13.77Q35.7 13.27 34.51 13.27H31.31ZM31.31 10.44H33.85Q35.02 10.44 35.74 9.99Q36.46 9.53 36.46 8.64Q36.46 7.68 35.76 7.25Q35.05 6.82 33.85 6.82H31.31Z',
20
+ bar: 'M20.52 0h3.09v24h-3.09z',
21
+ };
22
+
23
+ /** The mark in a 24 × 24 tile with 5.5 corners: favicon and app icon. */
24
+ export const TILE = {
25
+ width: 24,
26
+ height: 24,
27
+ viewBox: '0 0 24 24',
28
+ radius: 5.5,
29
+ letters: 'M3 15.67 5.65 8.33H7.74L10.39 15.67H8.53L8.06 14.29H5.32L4.84 15.67ZM5.81 12.85H7.57L6.7 10.27ZM14.84 15.67V8.33H17.81Q19.2 8.33 19.94 8.81Q20.69 9.29 20.69 10.33Q20.69 10.78 20.51 11.11Q20.33 11.44 19.98 11.63Q19.63 11.82 19.13 11.87L19.13 11.88Q20.05 11.95 20.53 12.41Q21 12.87 21 13.65Q21 14.68 20.26 15.18Q19.51 15.67 18.14 15.67ZM16.64 14.26H18.03Q18.54 14.26 18.86 14.05Q19.19 13.84 19.19 13.41Q19.19 12.98 18.87 12.77Q18.55 12.55 18.03 12.55H16.64ZM16.64 11.32H17.74Q18.25 11.32 18.57 11.12Q18.88 10.93 18.88 10.53Q18.88 10.12 18.57 9.93Q18.27 9.74 17.74 9.74H16.64Z',
30
+ bar: 'M11.94 6.77h1.35v10.45h-1.35z',
31
+ };
Binary file
Binary file
package/logo/tile.svg ADDED
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-label="Anthony Brignano">
2
+ <!-- The A|B logo in an ink tile: the favicon and app icon. One look in both
3
+ themes, like an app icon: an ink ground (n-900 light), light letters
4
+ (n-900 dark) and the dark-theme mark token, the one tuned for a dark
5
+ ground. Keep in step with tokens.css. -->
6
+ <rect width="24" height="24" rx="5.5" fill="rgb(17 17 20)"/>
7
+ <path d="M3 15.67 5.65 8.33H7.74L10.39 15.67H8.53L8.06 14.29H5.32L4.84 15.67ZM5.81 12.85H7.57L6.7 10.27ZM14.84 15.67V8.33H17.81Q19.2 8.33 19.94 8.81Q20.69 9.29 20.69 10.33Q20.69 10.78 20.51 11.11Q20.33 11.44 19.98 11.63Q19.63 11.82 19.13 11.87L19.13 11.88Q20.05 11.95 20.53 12.41Q21 12.87 21 13.65Q21 14.68 20.26 15.18Q19.51 15.67 18.14 15.67ZM16.64 14.26H18.03Q18.54 14.26 18.86 14.05Q19.19 13.84 19.19 13.41Q19.19 12.98 18.87 12.77Q18.55 12.55 18.03 12.55H16.64ZM16.64 11.32H17.74Q18.25 11.32 18.57 11.12Q18.88 10.93 18.88 10.53Q18.88 10.12 18.57 9.93Q18.27 9.74 17.74 9.74H16.64Z" fill="rgb(242 242 244)"/>
8
+ <path d="M11.94 6.77h1.35v10.45h-1.35z" fill="rgb(224 164 79)"/>
9
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brignano/design",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Shared design system for brignano surfaces — colour, type, space, shape, motion.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,6 +21,7 @@
21
21
  "product-page.css",
22
22
  "templates/",
23
23
  "icons/",
24
+ "logo/",
24
25
  "scripts/fold.mjs",
25
26
  "scripts/email-tokens.mjs",
26
27
  "scripts/colour.mjs",
@@ -36,6 +37,7 @@
36
37
  "./product-page.css": "./product-page.css",
37
38
  "./templates/*": "./templates/*",
38
39
  "./icons/*": "./icons/*",
40
+ "./logo/*": "./logo/*",
39
41
  "./scripts/email-tokens.mjs": "./scripts/email-tokens.mjs"
40
42
  },
41
43
  "sideEffects": [