@medquantis/design-system 1.1.0 → 1.2.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/README.md +34 -9
- package/css/app.css +1 -1
- package/css/components.css +20 -4
- package/css/kit/dark.css +6 -0
- package/css/kit/slide-frame.css +15 -2
- package/dist/DESIGN.md +176 -8
- package/dist/kit/brand.css +1 -1
- package/dist/kit/core.css +1 -1
- package/dist/kit/dark.css +47 -0
- package/dist/kit/dataviz.css +1 -1
- package/dist/kit/document.css +1 -1
- package/dist/kit/guidance.md +94 -4
- package/dist/kit/print.css +1 -1
- package/dist/kit/slide-frame.css +16 -3
- package/dist/kit/space-shape.css +1 -1
- package/dist/kit/type.css +1 -1
- package/dist/llms-full.txt +98 -8
- package/dist/llms.txt +23 -23
- package/dist/tailwind.css +1 -0
- package/dist/themes/dark.css +49 -0
- package/dist/themes/dark.json +436 -0
- package/dist/tokens.css +4 -0
- package/dist/tokens.json +41 -0
- package/guidelines/README.md +17 -2
- package/guidelines/brand.md +6 -1
- package/guidelines/colour.md +83 -2
- package/guidelines/layout.md +3 -3
- package/kit-manifest.json +2 -1
- package/package.json +5 -1
package/guidelines/colour.md
CHANGED
|
@@ -20,12 +20,13 @@ Documents never carry green, orange, red, sky blue, pink, purple or turquoise, n
|
|
|
20
20
|
| `--mq-accent-pale` | `#eaeef7` | Icon pills and chips, a deviating value, the highlighted table row, the pale state |
|
|
21
21
|
| `--mq-accent-pale-2` | `#f2f4f9` | Progress tracks, the quiet state, callout background |
|
|
22
22
|
| `--mq-on-accent` | `#ffffff` | Text and icons on an accent fill (14.53:1) |
|
|
23
|
+
| `--mq-accent-highlight` | `#0a2463` | Accent text on the pale fills (the pale KPI value, the pale badge, the callout title) and large highlighted title text: the accent itself in light, the light navy on dark (owner ruling 18) |
|
|
23
24
|
|
|
24
25
|
Navy carries emphasis on its own. Status colours never replace it for emphasis, in any medium.
|
|
25
26
|
|
|
26
27
|
## Neutrals
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
In the light theme the neutrals are warm greys tuned to the warm canvas, never blue-tinted greys; the neutrals of the dark theme carry the navy cast of its canvas ([Dark theme](#dark-theme)).
|
|
29
30
|
|
|
30
31
|
| Token | Value | Use | Contrast |
|
|
31
32
|
| :-- | :-- | :-- | :-- |
|
|
@@ -83,7 +84,7 @@ The first six are the `mq-badge` states (`is-solid`, `is-ring`, `is-pale`, `is-o
|
|
|
83
84
|
| `--mq-danger` | `#d8232a` | Errors, destructive actions | 5.01:1 on surface, 4.79:1 on canvas |
|
|
84
85
|
| `--mq-info` | `#1565c0` | Information | 5.75:1 on surface, 5.50:1 on canvas |
|
|
85
86
|
| `--mq-warning` | `#a06400` | Warning text, icons and borders | 4.86:1 on surface, 4.65:1 on canvas |
|
|
86
|
-
| `--mq-warning-fill` | `#d4850a` | Warning badge or highlight fill, always with
|
|
87
|
+
| `--mq-warning-fill` | `#d4850a` | Warning badge or highlight fill, always with its text role `--mq-on-warning-fill`, ink in light (5.93:1) | Fill only |
|
|
87
88
|
| `--mq-warning-tint` | `#fbf3e7` | Warning background behind ink text (15.81:1) | Fill only |
|
|
88
89
|
|
|
89
90
|
The warning split (owner ruling 5): the orange `#d4850a` is a fill and never text, an icon or a border (2.81:1 on canvas). Text on it is ink; white on it is forbidden (2.93:1). On the warning tint, the text stays ink and `--mq-warning` is used only for the icon and the border (4.42:1, non-text).
|
|
@@ -100,3 +101,83 @@ The red of the old Paracel theme survives only as `--mq-danger` ([ADR-0003](../d
|
|
|
100
101
|
## Chart colours
|
|
101
102
|
|
|
102
103
|
The chart tokens (`--mq-chart-series-1` to `--mq-chart-series-4`, `--mq-chart-rest`, `--mq-chart-axis`, `--mq-chart-baseline`) and their order are in [charts](charts.md).
|
|
104
|
+
|
|
105
|
+
## Dark theme
|
|
106
|
+
|
|
107
|
+
MedQuantis has one dark theme ([ADR-0007](../docs/architecture/decisions/adr-0007-medquantis-has-a-dark-theme.md), owner ruling 12). It re-values the semantic roles above under the `.dark` class: a role it does not name keeps its light value, and no component needs a second name. A consumer opts in by loading `themes/dark.css` of the package after `tokens.css` and setting `.dark` on `<html>` or on one slide. The design system never switches on `prefers-color-scheme` by itself.
|
|
108
|
+
|
|
109
|
+
- **Apps and the website:** light and dark; the app decides how the viewer chooses, and may follow the viewer's setting by toggling `.dark`.
|
|
110
|
+
- **Documents** (A4 reports, papers, PDFs): light or dark, chosen by the author per document at build time, never from the reader's screen (owner ruling 15). A dark document stays dark in its PDF; light stays the default for anything likely to be printed on paper.
|
|
111
|
+
- **Slides:** a whole deck, or a single slide carrying `.dark`.
|
|
112
|
+
|
|
113
|
+
Every ratio below is the WCAG 2.x contrast with the dark values, on the dark canvas `#11161f` and surface `#1a2131`; the token test checks every declared pair in both themes.
|
|
114
|
+
|
|
115
|
+
| Token | Dark value | Use | Contrast |
|
|
116
|
+
| :-- | :-- | :-- | :-- |
|
|
117
|
+
| `--mq-canvas` | `#11161f`, a near-black with a navy cast | Background of every dark page and slide | Background |
|
|
118
|
+
| `--mq-surface` | `#1a2131` | Cards, panels, tables, figures, inputs | Background |
|
|
119
|
+
| `--mq-surface-alt` | `#141a26` | Recessed areas: table headers, grouped areas | Background |
|
|
120
|
+
| `--mq-desk` | `#0b0f16` | On screen only, around a dark page preview | Background |
|
|
121
|
+
| `--mq-border` | white at 14 % | Borders, dividers | Decorative |
|
|
122
|
+
| `--mq-border-light` | white at 10 % | Hairlines, card borders | Decorative |
|
|
123
|
+
| `--mq-border-strong` | `#8795b3` | Outline of outlined and dashed state marks | 6.03:1 on canvas, 5.35:1 on surface, non-text |
|
|
124
|
+
| `--mq-ink` | `#f5f4f1`, warm white | Primary text and values | 16.48:1 on canvas, 14.62:1 on surface |
|
|
125
|
+
| `--mq-muted` | `#c3cbdc` | Secondary text, leads, captions | 11.13:1 on canvas, 9.88:1 on surface |
|
|
126
|
+
| `--mq-tertiary` | `#8f98aa` | Tertiary text: notes, footers, axis labels | 6.25:1 on canvas, 5.54:1 on surface |
|
|
127
|
+
| `--mq-decoration` | `#6b7385` | Non-text decoration only, never text | 3.81:1 on canvas, 3.38:1 on surface, non-text |
|
|
128
|
+
| `--mq-accent` | `#6f88c9`, the lifted navy | Links, labels, key figures, active states | 5.22:1 on canvas, 4.63:1 on surface, 5.01:1 on the recessed surface |
|
|
129
|
+
| `--mq-accent-hover` | `#8aa0d6` | Hover and pressed state of a link or an accent control | 6.98:1 on canvas |
|
|
130
|
+
| `--mq-accent-pale` | the lifted navy at 18 % | Icon pills and chips, the highlighted row, the pale state | Fill |
|
|
131
|
+
| `--mq-accent-pale-2` | the lifted navy at 10 % | Progress tracks, the quiet state, callout background | Fill |
|
|
132
|
+
| `--mq-accent-highlight` | `#9fb3e8`, the light navy | Large highlighted title text, and accent text on the pale fills: the pale KPI value, the pale badge and the callout title (owner ruling 18) | 8.71:1 on canvas, 7.73:1 on surface, 5.97:1 on the pale fill, 6.77:1 on the quiet pale fill |
|
|
133
|
+
| `--mq-on-accent` | `#11161f` | Text and icons on an accent fill, never white (white 3.48:1 on the accent) | 5.22:1 on the accent |
|
|
134
|
+
| `--mq-focus-ring-color` | `#9fb3e8`, the light navy | Focus ring on dark backgrounds | 8.71:1 on canvas |
|
|
135
|
+
| `--mq-panel-start` | `#2f4c8f` | Light end of the navy panel gradient | Background, white 8.23:1 on the panel start |
|
|
136
|
+
| `--mq-panel-end` | `#0f2a5e` | Dark end of the navy panel gradient | Background |
|
|
137
|
+
| `--mq-shadow-panel` | a 1 px outline, light navy at 35 %, no glow (owner ruling 13) | Navy panels, the report header and the navy KPI tile on dark | Edge of a panel |
|
|
138
|
+
| `--mq-shadow-edge` | the same 1 px outline, light navy at 35 %; none in light | The monogram (`mq-monogram`), the navy KPI tile and a navy brand or app tile, which draw no shadow in light (owner ruling 14) | Edge of a navy mark |
|
|
139
|
+
| `--mq-shadow-small` | black at 40 %, 1 px down with a 2 px blur | Cards, figures and tables on dark, where the light 5 % shadow does not show | Elevation |
|
|
140
|
+
| `--mq-shadow-medium` | black at 50 %, 3 px down with a 12 px blur | A slide or page previewed on the dark desk, raised panels and menus | Elevation |
|
|
141
|
+
|
|
142
|
+
Accent text on the pale fills reads `--mq-accent-highlight` in both themes (owner ruling 18): in light it is the accent itself, while on dark the lifted navy would be only 3.57:1 on the pale fill and 4.05:1 on the quiet pale fill. The fills are measured laid over the canvas and over the surface, the worse result counting. The callout tab keeps `--mq-accent` on the quiet pale fill as a non-text mark.
|
|
143
|
+
|
|
144
|
+
The retired `--mq-dim` and `--mq-accent-on-dark` follow the roles they alias on dark too: `#8f98aa` (tertiary) and `#b2c2ed` (the on-navy accent).
|
|
145
|
+
|
|
146
|
+
**The navy panel on dark.** Navy itself fails on a dark canvas (`#0a2463` is 1.25:1 on `#11161f`), so on dark the brand shows as the lifted navy, the light navy and the panel gradient, with no new hue ([ADR-0003](../docs/architecture/decisions/adr-0003-navy-is-the-single-brand-accent.md)). Navy panels, the report header and the navy KPI tile keep the 160 degree gradient between `--mq-panel-start` and `--mq-panel-end`, with the dark values above, and draw `--mq-shadow-panel`: a 1 px light-navy outline, never a glow (owner ruling 13). A navy tile on dark takes the panel gradient, never the lifted accent. Contrast on navy is still checked against the panel start, the lighter stop.
|
|
147
|
+
|
|
148
|
+
The on-navy tier on the dark panel (owner ruling 19): two roles take dark values, the others keep their light values and are checked again on the lighter dark panel start.
|
|
149
|
+
|
|
150
|
+
| Token | Dark value | Contrast | Allowed for |
|
|
151
|
+
| :-- | :-- | :-- | :-- |
|
|
152
|
+
| `--mq-on-navy-title` | `#ffffff`, unchanged | 8.23:1 on the panel start | Text |
|
|
153
|
+
| `--mq-on-navy-secondary` | white at 68 %, unchanged | 4.80:1 on the panel start | Text |
|
|
154
|
+
| `--mq-on-navy-second-level` | `#c3cbdc`, unchanged | 5.05:1 on the panel start | Text |
|
|
155
|
+
| `--mq-on-navy-accent` | `#b2c2ed`, a lighter navy tint | 4.64:1 on the panel start | Text, narrow margin |
|
|
156
|
+
| `--mq-on-navy-discreet` | white at 50 % | 3.37:1 on the panel start | Large text or non-text only |
|
|
157
|
+
| `--mq-on-navy-rule`, `--mq-on-navy-rule-strong`, `--mq-on-navy-pill` | white at 16, 18 and 12 %, unchanged | Decorative | Decorative only |
|
|
158
|
+
|
|
159
|
+
Light keeps `#8795b3` (4.61:1) and white at 40 % (3.44:1) for those two roles; on the dark panel start they would fall to 2.74:1 and 2.71:1.
|
|
160
|
+
|
|
161
|
+
**The light navy is a navy tint.** `#9fb3e8` (`--mq-accent-highlight`, `--mq-focus-ring-color`, dark series 1) is not the retired sky blue: its LCH hue 280.4 (chroma 29.2) sits in the navy family with the lifted navy `#6f88c9` (hue 282.8), against navy 293.7 and sky blue 269.9 (chroma 36.1). Sky blue stays retired in both themes (owner ruling 2).
|
|
162
|
+
|
|
163
|
+
Status colours on dark, apps only (ADR-0004, owner ruling 16), each still with an icon or a word; `--mq-warning-fill` keeps its value and stays a fill:
|
|
164
|
+
|
|
165
|
+
- `--mq-success` `#6fbf73`: 8.09:1 on canvas, 7.18:1 on surface.
|
|
166
|
+
- `--mq-warning` `#e0a040`: 8.00:1 on canvas, 7.10:1 on surface.
|
|
167
|
+
- `--mq-danger` `#ff6b6b`: 6.53:1 on canvas, 5.80:1 on surface.
|
|
168
|
+
- `--mq-info` `#64a8f0`: 7.25:1 on canvas, 6.43:1 on surface.
|
|
169
|
+
- `--mq-warning-fill` `#d4850a`, unchanged: a fill, never text.
|
|
170
|
+
- `--mq-warning-tint`, the warning fill at 16 %: ink 11.63:1 on the warning tint.
|
|
171
|
+
- `--mq-on-warning-fill` `#11161f`, text on `--mq-warning-fill`: 6.18:1 on the warning fill, where the warm white ink 2.67:1 on the warning fill would fail.
|
|
172
|
+
|
|
173
|
+
Chart colours on dark (owner ruling 16): the four series run in reverse order, the lightest first, under the same rules as light ([charts](charts.md)): series 4 for context bars, the remainder drawn with a series 4 outline. Each dark series meets or beats its light counterpart against its canvas.
|
|
174
|
+
|
|
175
|
+
| Token | Dark value | Contrast |
|
|
176
|
+
| :-- | :-- | :-- |
|
|
177
|
+
| `--mq-chart-series-1` | `#9fb3e8` | 8.71:1 on canvas |
|
|
178
|
+
| `--mq-chart-series-2` | `#6f88c9` | 5.22:1 on canvas |
|
|
179
|
+
| `--mq-chart-series-3` | `#5d6f91` | 3.58:1 on canvas |
|
|
180
|
+
| `--mq-chart-series-4` | `#3a4560` | 1.90:1 on canvas, context bars only |
|
|
181
|
+
| `--mq-chart-rest` | `#232b3d` | 1.28:1 on canvas, with a series 4 outline |
|
|
182
|
+
| `--mq-chart-axis` | `#6b7385` | 3.81:1 on canvas, non-text |
|
|
183
|
+
| `--mq-chart-baseline` | white at 10 % | Decorative |
|
package/guidelines/layout.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Medium | Canvas | Layout |
|
|
6
6
|
| :-- | :-- | :-- |
|
|
7
|
-
| Slide | 1280 by 720 px (`--mq-slide-width`, `--mq-slide-height`, `css/slide.css`) | Fixed canvas, 72 px side margins (`--mq-space-8`), section label top left, title under it, and a footer row (`mq-slide-foot`) with the legal line bottom left and the slide number bottom right, both in tertiary mono (owner ruling 11) |
|
|
7
|
+
| Slide | 1280 by 720 px (`--mq-slide-width`, `--mq-slide-height`, `css/slide.css`) | Fixed canvas, 72 px side margins (`--mq-space-8`), section label top left, title under it, and a footer row (`mq-slide-foot`) with the legal line bottom left and the slide number bottom right, both in tertiary mono (owner ruling 11); a classified deck adds its classification label at the right of the footer, before the slide number (owner ruling 17) |
|
|
8
8
|
| Screen report or paper | A page that scrolls, centred, `--mq-page-width` (1040 px) wide | Flow layout: no absolute positions, no fixed heights. It is not a deck: no slide canvas inside a report |
|
|
9
9
|
| A4 print | 210 by 297 mm (`--mq-a4-width`, `--mq-a4-height`, `css/print.css`) | One `mq-page` per sheet on the canvas colour; on screen the pages sit on the desk |
|
|
10
10
|
|
|
@@ -53,7 +53,7 @@ Squared-off corners read professional and institutional; pills read consumer.
|
|
|
53
53
|
|
|
54
54
|
## Elevation and navy blocks
|
|
55
55
|
|
|
56
|
-
- Cards, figures and tables: `--mq-shadow-small`. Raised panels, menus and a page or slide previewed on the desk: `--mq-shadow-medium`. Navy panels: `--mq-shadow-panel
|
|
56
|
+
- Cards, figures and tables: `--mq-shadow-small`. Raised panels, menus and a page or slide previewed on the desk: `--mq-shadow-medium`. Navy panels: `--mq-shadow-panel`, which on dark is a 1 px light-navy outline and never a glow (owner ruling 13). No shadow in print and none on chart marks.
|
|
57
57
|
- One large navy block per screen, slide or page area. In a report, keep the header, a navy KPI band and a navy panel apart with light content.
|
|
58
58
|
|
|
59
59
|
## Document components
|
|
@@ -67,7 +67,7 @@ Squared-off corners read professional and institutional; pills read consumer.
|
|
|
67
67
|
| Takeaway | `mq-takeaway` | The one sentence to remember, under a navy tab, Outfit 500 |
|
|
68
68
|
| Numbered rows | (pattern) | A navy circle with the number, a heading column, a body column: one line per point |
|
|
69
69
|
| Footer | `mq-foot` | Sources and legal line in tertiary italic, in reports and papers; never inside a slide |
|
|
70
|
-
| Slide footer | `mq-slide-foot` | On every slide (owner ruling 11): the legal line bottom left, the slide number bottom right, small, tertiary, Geist Mono: `<footer class="mq-slide-foot"><p>MedQuantis SA · CH-1095 Lutry · medquantis.ch</p><p class="mq-slide-number">03</p></footer>` |
|
|
70
|
+
| Slide footer | `mq-slide-foot` | On every slide (owner ruling 11): the legal line bottom left, the slide number bottom right, small, tertiary, Geist Mono. A classified deck shows its classification at the right of the footer, before the slide number: the label in the deck's language, never the C0 to C3 code (owner ruling 17). Without a classification: `<footer class="mq-slide-foot"><p>MedQuantis SA · CH-1095 Lutry · medquantis.ch</p><p class="mq-slide-number">03</p></footer>` |
|
|
71
71
|
|
|
72
72
|
## Tables
|
|
73
73
|
|
package/kit-manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractVersion": "2.
|
|
2
|
+
"contractVersion": "2.1.0",
|
|
3
3
|
"provides": {
|
|
4
4
|
"core": "./kit/core.css",
|
|
5
5
|
"dataviz": "./kit/dataviz.css",
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"space-shape": "./kit/space-shape.css",
|
|
8
8
|
"document": "./kit/document.css",
|
|
9
9
|
"slide-frame": "./kit/slide-frame.css",
|
|
10
|
+
"dark": "./kit/dark.css",
|
|
10
11
|
"print": "./kit/print.css",
|
|
11
12
|
"brand": "./kit/brand.css",
|
|
12
13
|
"guidance": "./kit/guidance.md"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medquantis/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "MedQuantis design tokens, shared CSS, assets, guidelines and Claude skill.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"dist/tokens.css",
|
|
16
16
|
"dist/tokens.json",
|
|
17
17
|
"dist/tailwind.css",
|
|
18
|
+
"dist/themes/dark.css",
|
|
19
|
+
"dist/themes/dark.json",
|
|
18
20
|
"dist/kit-contract.css",
|
|
19
21
|
"dist/kit/",
|
|
20
22
|
"kit-manifest.json",
|
|
@@ -32,6 +34,8 @@
|
|
|
32
34
|
"./tokens.css": "./dist/tokens.css",
|
|
33
35
|
"./tokens.json": "./dist/tokens.json",
|
|
34
36
|
"./tailwind.css": "./dist/tailwind.css",
|
|
37
|
+
"./themes/dark.css": "./dist/themes/dark.css",
|
|
38
|
+
"./themes/dark.json": "./dist/themes/dark.json",
|
|
35
39
|
"./kit-contract.css": "./dist/kit-contract.css",
|
|
36
40
|
"./kit/*": "./dist/kit/*",
|
|
37
41
|
"./kit-manifest.json": "./kit-manifest.json",
|