@brignano/design 0.12.1 → 0.14.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.
Files changed (53) hide show
  1. package/DESIGN.md +179 -23
  2. package/README.md +51 -3
  3. package/components.css +249 -249
  4. package/controls.css +2251 -0
  5. package/decisions/0001-cobalt.md +1 -1
  6. package/decisions/0008-cobalt-hue-256.md +1 -1
  7. package/decisions/0014-identity.md +1 -1
  8. package/decisions/0015-white-label-on-cobalt.md +1 -1
  9. package/decisions/0017-product-identity.md +1 -1
  10. package/decisions/0019-house-theme-shell.md +51 -0
  11. package/decisions/0020-kits-opt-in.md +56 -0
  12. package/decisions/README.md +2 -0
  13. package/kits/larch.css +125 -0
  14. package/kits/ledger.css +121 -0
  15. package/kits/split.css +123 -0
  16. package/package.json +13 -2
  17. package/product-page.css +82 -82
  18. package/scripts/colour.mjs +42 -0
  19. package/scripts/theme.mjs +190 -0
  20. package/tailwind.css +13 -20
  21. package/templates/app-shell.css +15 -15
  22. package/templates/article.css +26 -26
  23. package/templates/changelog.css +9 -9
  24. package/templates/email.html +3 -3
  25. package/templates/error.css +7 -7
  26. package/templates/legal.css +11 -11
  27. package/templates/settings.css +9 -9
  28. package/themes/driftwood.css +109 -0
  29. package/themes/driftwood.theme +5 -0
  30. package/themes/guidebook.css +104 -0
  31. package/themes/guidebook.theme +5 -0
  32. package/themes/homelab.css +101 -0
  33. package/themes/homelab.theme +2 -0
  34. package/themes/receipts.css +101 -0
  35. package/themes/receipts.theme +2 -0
  36. package/themes/sites.css +106 -0
  37. package/themes/sites.theme +7 -0
  38. package/tokens/base.css +37 -0
  39. package/tokens/chart.json +145 -0
  40. package/tokens/color.json +840 -0
  41. package/tokens/component.json +75 -0
  42. package/tokens/head.css +84 -0
  43. package/tokens/kits/larch.json +255 -0
  44. package/tokens/kits/ledger.json +247 -0
  45. package/tokens/kits/split.json +247 -0
  46. package/tokens/motion.json +38 -0
  47. package/tokens/names.d.ts +246 -0
  48. package/tokens/shape.json +56 -0
  49. package/tokens/space.json +99 -0
  50. package/tokens/tailwind.json +343 -0
  51. package/tokens/type.json +206 -0
  52. package/tokens.chart.css +23 -23
  53. package/tokens.css +278 -136
@@ -0,0 +1,37 @@
1
+ ::selection {
2
+ background: var(--action-selection);
3
+ }
4
+
5
+ /* Native checkboxes, radios, range and progress take the control hue
6
+ instead of the browser's own blue. */
7
+ :root {
8
+ accent-color: var(--action);
9
+ }
10
+
11
+ /* Paper is light. Printing a dark page spends ink on the background and
12
+ most browsers drop backgrounds anyway, leaving pale text on white. After
13
+ the [data-theme] rules above so it wins over an in-app dark choice. */
14
+ @media print {
15
+ :root,
16
+ [data-theme] {
17
+ color-scheme: light;
18
+ }
19
+ }
20
+
21
+ /* Ships here so no surface can forget it. */
22
+ @media (prefers-reduced-motion: reduce) {
23
+ *,
24
+ *::before,
25
+ *::after {
26
+ animation-duration: 0.01ms !important;
27
+ animation-iteration-count: 1 !important;
28
+ transition-duration: 0.01ms !important;
29
+ scroll-behavior: auto !important;
30
+ }
31
+ /* View transitions live on pseudo-elements the rule above can't reach. */
32
+ ::view-transition-group(*),
33
+ ::view-transition-old(*),
34
+ ::view-transition-new(*) {
35
+ animation: none !important;
36
+ }
37
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "$description": "Chart colours: categorical, sequential and the chart frame. Imported separately as tokens.chart.css.",
3
+ "root": {
4
+ "$description": "─────────────────────────────────────────────────────────────────────────\ntokens.chart.css — the categorical palette for data visualisation.\n\nWHY THIS IS A SEPARATE FILE FROM THE BRAND ACCENT\n-------------------------------------------------\nA chart's colours do a different job from a brand's colours, so they are\nnot derived from the mark and they are not the state hues.\n\n mark (--mark) identity. One hue. \"This is Anthony.\"\n state (--success/…) state. RESERVED — never a series colour.\n categorical (this file) IDENTITY OF A SERIES. Needs 8 hues that a\n human can tell apart at a glance, including\n the ~8% of men with a colour-vision\n deficiency.\n\nTrying to derive eight distinguishable series hues from one amber gives\nyou eight ambers nobody can separate. Charts genuinely need the range —\nthe constraint is separability, not restraint.\n\nTHESE VALUES ARE VALIDATED, NOT CHOSEN BY EYE\n----------------------------------------------\nValues are light-dark(<light>, <dark>), one declaration each.\nBoth modes pass every hard gate of the six-check colour formula:\n\n lightness band PASS (all 8 inside the mode's band)\n chroma floor PASS (all 8 >= 0.1)\n CVD separation PASS worst adjacent dE 9.1 light / 8.4 dark (>=8)\n normal-vision PASS worst adjacent dE 19.6 light / 19.3 dark (>=15)\n contrast light: slots 3, 4, 5 sit below 3:1 — see RELIEF below\n dark: all 8 clear 3:1\n\nThe ORDER is the colourblind-safety mechanism, not decoration. Slots are\nassigned in fixed order and NEVER cycled. Re-ordering silently breaks the\nadjacent-pair separation the gates above measure. If you change anything\nhere, re-run the validator on both modes before shipping.\n\nRULES OF USE\n------------\n- Fixed order, never cycled. A 9th series is not a generated hue: fold it\n into \"Other\", facet into small multiples, or cut it. (`stats-pie.tsx`\n already does this correctly — top 8 + \"Other\".)\n- Colour follows the ENTITY, never its rank. A filter that changes the\n series count must not repaint the survivors. Map name -> slot once.\n- RELIEF: on light mode, slots 3/4/5 fall below 3:1 against the surface.\n That is legal only with visible direct labels or a table view — which\n the donut's centre readout and the legend already provide. Do not use\n those three as the ONLY signal for a mark with no label.\n- Never colour-alone: >=2 series always carries a legend, and <=4 are also\n direct-labelled.\n- Text wears text tokens (--ink / --ink-soft / --slate), never the series\n colour. A coloured mark beside a label carries the identity.\n─────────────────────────────────────────────────────────────────────────",
5
+ "$extensions": {
6
+ "io.brignano": {
7
+ "selector": ":root"
8
+ }
9
+ },
10
+ "chart-surface": {
11
+ "$value": "var(--card)"
12
+ },
13
+ "chart-1": {
14
+ "$type": "color",
15
+ "$value": {
16
+ "light": "#2a78d6",
17
+ "dark": "#3987e5"
18
+ },
19
+ "$extensions": {
20
+ "io.brignano": {
21
+ "note": "blue"
22
+ }
23
+ }
24
+ },
25
+ "chart-2": {
26
+ "$type": "color",
27
+ "$value": {
28
+ "light": "#eb6834",
29
+ "dark": "#d95926"
30
+ },
31
+ "$extensions": {
32
+ "io.brignano": {
33
+ "note": "orange"
34
+ }
35
+ }
36
+ },
37
+ "chart-3": {
38
+ "$type": "color",
39
+ "$value": {
40
+ "light": "#1baf7a",
41
+ "dark": "#199e70"
42
+ },
43
+ "$extensions": {
44
+ "io.brignano": {
45
+ "note": "aqua — relief required (2.74:1)"
46
+ }
47
+ }
48
+ },
49
+ "chart-4": {
50
+ "$type": "color",
51
+ "$value": {
52
+ "light": "#eda100",
53
+ "dark": "#c98500"
54
+ },
55
+ "$extensions": {
56
+ "io.brignano": {
57
+ "note": "yellow — relief required (2.11:1)"
58
+ }
59
+ }
60
+ },
61
+ "chart-5": {
62
+ "$type": "color",
63
+ "$value": {
64
+ "light": "#e87ba4",
65
+ "dark": "#d55181"
66
+ },
67
+ "$extensions": {
68
+ "io.brignano": {
69
+ "note": "magenta — relief required (2.62:1)"
70
+ }
71
+ }
72
+ },
73
+ "chart-6": {
74
+ "$value": "#008300",
75
+ "$extensions": {
76
+ "io.brignano": {
77
+ "note": "green — same in both"
78
+ }
79
+ }
80
+ },
81
+ "chart-7": {
82
+ "$type": "color",
83
+ "$value": {
84
+ "light": "#4a3aa7",
85
+ "dark": "#9085e9"
86
+ },
87
+ "$extensions": {
88
+ "io.brignano": {
89
+ "note": "violet"
90
+ }
91
+ }
92
+ },
93
+ "chart-8": {
94
+ "$type": "color",
95
+ "$value": {
96
+ "light": "#e34948",
97
+ "dark": "#e66767"
98
+ },
99
+ "$extensions": {
100
+ "io.brignano": {
101
+ "note": "red"
102
+ }
103
+ }
104
+ },
105
+ "chart-other": {
106
+ "$value": "var(--slate)",
107
+ "$description": "Everything past slot 8 aggregates here. Deliberately neutral: \"Other\"\nis not an entity, so it does not earn a hue."
108
+ },
109
+ "chart-grid": {
110
+ "$value": "var(--line)",
111
+ "$description": "Axes, gridlines and the ring behind overlapping marks. Recessive by\ndesign — the data is the ink, the frame is not."
112
+ },
113
+ "chart-axis": {
114
+ "$value": "var(--slate)"
115
+ },
116
+ "seq-0": {
117
+ "$value": "var(--line)",
118
+ "$description": "─────────────────────────────────────────────────────────────────────────\nSEQUENTIAL — one hue, light to dark, for CONTINUOUS MAGNITUDE.\nNot categorical. Use when the thing being coloured is \"how much\", not\n\"which one\": the GitHub contribution heatmap, a density map, a calendar.\n\nRules that differ from the categorical palette above:\n - ONE hue. Never a rainbow — a rainbow implies categories where there\n are only degrees.\n - Lightness must be MONOTONIC. Verified in OKLCH: light L 0.888 ->\n 0.487 descending, dark L 0.380 -> 0.808 ascending, every adjacent\n step separated by dL >= 0.107.\n - `--seq-0` is NEUTRAL on purpose. Zero contributions is not a small\n amount of the hue, it is the absence of a value — colouring it a pale\n blue would claim data that isn't there.\n\nThe hue is cobalt, the same family as --action. That is intentional: a\nmagnitude ramp is informational, the same register as a link, and giving\nit its own hue would add a meaning the system doesn't need.\n─────────────────────────────────────────────────────────────────────────"
119
+ },
120
+ "seq-1": {
121
+ "$type": "color",
122
+ "$value": {
123
+ "light": "#c6dcfb",
124
+ "dark": "#014084"
125
+ }
126
+ },
127
+ "seq-2": {
128
+ "$type": "color",
129
+ "$value": {
130
+ "light": "#87b5f3",
131
+ "dark": "#015cbb"
132
+ }
133
+ },
134
+ "seq-3": {
135
+ "$value": "#2885f5"
136
+ },
137
+ "seq-4": {
138
+ "$type": "color",
139
+ "$value": {
140
+ "light": "#015cbb",
141
+ "dark": "#98c3fe"
142
+ }
143
+ }
144
+ }
145
+ }