@med-o/design-tokens 0.10.0 → 0.11.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/CHANGELOG.md +151 -0
- package/README.md +2 -0
- package/dist/css/base.css +29 -0
- package/package.json +4 -2
- package/src/css/base.css +29 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# @med-o/design-tokens
|
|
2
|
+
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
_Released 2026-11-10_
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 68e203d: New: `css/base.css` sets up the page for apps without Tailwind.
|
|
10
|
+
|
|
11
|
+
- Removes the browser margins and sizes every box with its padding and border (`border-box`).
|
|
12
|
+
- Gives `body` the canvas color, the primary text color and the text style body/md, in Light and Dark.
|
|
13
|
+
- Sits in the cascade layer `base`, so component styles, Tailwind utilities and your own CSS always win.
|
|
14
|
+
- Import it after `tokens.css`: `@import "@med-o/design-tokens/css/base.css";`
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 171a142: Fixed: both packages include their `CHANGELOG.md`.
|
|
19
|
+
|
|
20
|
+
What changed in each version now ships with the code you install, in `node_modules/@med-o/ui/CHANGELOG.md` and `node_modules/@med-o/design-tokens/CHANGELOG.md`.
|
|
21
|
+
|
|
22
|
+
## 0.10.0
|
|
23
|
+
|
|
24
|
+
_Released 2026-11-09_
|
|
25
|
+
|
|
26
|
+
### Minor Changes
|
|
27
|
+
|
|
28
|
+
- b2bbbb4: New: code/* tokens color the syntax in `CodeBlock`.
|
|
29
|
+
|
|
30
|
+
- `code/keyword`, `code/string`, `code/function`, `code/constant`, `code/comment` and `code/punctuation`, each for Light and Dark.
|
|
31
|
+
- Every color reaches at least 4.5 : 1 on surface/subtle, surface/default and surface/brand-muted. The token build checks these pairs.
|
|
32
|
+
|
|
33
|
+
## 0.9.0
|
|
34
|
+
|
|
35
|
+
_Released 2026-11-08_
|
|
36
|
+
|
|
37
|
+
No changes in this release.
|
|
38
|
+
|
|
39
|
+
## 0.8.1
|
|
40
|
+
|
|
41
|
+
_Released 2026-11-08_
|
|
42
|
+
|
|
43
|
+
No changes in this release.
|
|
44
|
+
|
|
45
|
+
## 0.8.0
|
|
46
|
+
|
|
47
|
+
_Released 2026-11-07_
|
|
48
|
+
|
|
49
|
+
### Minor Changes
|
|
50
|
+
|
|
51
|
+
- ef97ec8: New: width tokens `size/width/3xs` to `size/width/6xl` (80 to 720 px).
|
|
52
|
+
|
|
53
|
+
- For what has a width of its own: floating layers, limits that cut long text and app regions. Components in the page take the width of their container.
|
|
54
|
+
- CSS `--medo-size-width-*`, JS and Figma variables; in Tailwind `max-w-(--medo-size-width-xl)`.
|
|
55
|
+
- Size tokens carry their Figma description.
|
|
56
|
+
|
|
57
|
+
## 0.7.2
|
|
58
|
+
|
|
59
|
+
_Released 2026-11-07_
|
|
60
|
+
|
|
61
|
+
No changes in this release.
|
|
62
|
+
|
|
63
|
+
## 0.7.1
|
|
64
|
+
|
|
65
|
+
_Released 2026-11-07_
|
|
66
|
+
|
|
67
|
+
No changes in this release.
|
|
68
|
+
|
|
69
|
+
## 0.7.0
|
|
70
|
+
|
|
71
|
+
_Released 2026-11-03_
|
|
72
|
+
|
|
73
|
+
No changes in this release.
|
|
74
|
+
|
|
75
|
+
## 0.6.0
|
|
76
|
+
|
|
77
|
+
_Released 2026-11-01_
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- 3653bdb: Improved: the contrast check of the token build also covers higher contrast (`prefers-contrast: more`).
|
|
82
|
+
|
|
83
|
+
- Every allowed text / background pair is checked in that mode too.
|
|
84
|
+
- `docs/contrast.json` gets the values per mode (`light-more`, `dark-more`) and `higherContrast` – the lowest contrast of secondary text and borders on content surfaces.
|
|
85
|
+
|
|
86
|
+
## 0.5.1
|
|
87
|
+
|
|
88
|
+
_Released 2026-11-01_
|
|
89
|
+
|
|
90
|
+
No changes in this release.
|
|
91
|
+
|
|
92
|
+
## 0.5.0
|
|
93
|
+
|
|
94
|
+
_Released 2026-11-01_
|
|
95
|
+
|
|
96
|
+
### Minor Changes
|
|
97
|
+
|
|
98
|
+
- 2151054: New: fixed text / background pairs, checked in every build.
|
|
99
|
+
|
|
100
|
+
- `@med-o/design-tokens/docs/contrast.json` lists every allowed pair with its contrast in Light and Dark; the build fails below 4.5 : 1.
|
|
101
|
+
- The descriptions of `text/primary`, `text/secondary` and `border/strong` name the surfaces they are made for instead of “all surfaces”.
|
|
102
|
+
|
|
103
|
+
- 2151054: New: token `font/size/2xs` (11 px), used by `label/xs`.
|
|
104
|
+
|
|
105
|
+
For short metadata only.
|
|
106
|
+
|
|
107
|
+
## 0.4.2
|
|
108
|
+
|
|
109
|
+
_Released 2026-11-01_
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- 49f8981: Improved: the package README on npm covers the spacing rules and layout components.
|
|
114
|
+
|
|
115
|
+
Also supported browsers, versions and where to find the changelog.
|
|
116
|
+
|
|
117
|
+
## 0.4.1
|
|
118
|
+
|
|
119
|
+
_Released 2026-10-31_
|
|
120
|
+
|
|
121
|
+
## 0.4.0
|
|
122
|
+
|
|
123
|
+
_Released 2026-10-31_
|
|
124
|
+
|
|
125
|
+
### Minor Changes
|
|
126
|
+
|
|
127
|
+
- d1ca3a6: New: six spacing rules for the space between elements.
|
|
128
|
+
|
|
129
|
+
- `inline`, `content`, `fields`, `items`, `group`, `section` – as tokens `--medo-layout-gap-*` that follow the layout mode (mobile · tablet · desktop).
|
|
130
|
+
- As Tailwind utilities (`gap-items`, `space-y-fields`, `py-section` …) and as classes (`medo-gap-items`).
|
|
131
|
+
- `ButtonGroup` uses the rule `inline` (same value as before).
|
|
132
|
+
|
|
133
|
+
## 0.3.0
|
|
134
|
+
|
|
135
|
+
_Released 2026-10-30_
|
|
136
|
+
|
|
137
|
+
## 0.2.0
|
|
138
|
+
|
|
139
|
+
_Released 2026-10-28_
|
|
140
|
+
|
|
141
|
+
### Minor Changes
|
|
142
|
+
|
|
143
|
+
- be1add2: Improved: the overline text style is no longer uppercase.
|
|
144
|
+
|
|
145
|
+
Sentence case with normal tracking (`.medo-text-overline`, `--medo-typography-overline`); navigation section titles follow. Capitals are harder to read – write the text in the case you want to show.
|
|
146
|
+
|
|
147
|
+
- 23fbda6: Improved: higher contrast for “Increase contrast” in the system settings (`prefers-contrast: more`).
|
|
148
|
+
|
|
149
|
+
- `text/secondary` becomes neutral 700 (Light) or 300 (Dark): at least 9.4 : 1 on every surface.
|
|
150
|
+
- `border/default` becomes `border/strong`: at least 4.3 : 1.
|
|
151
|
+
- Works with `data-theme` on any element.
|
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ npm install @med-o/design-tokens
|
|
|
15
15
|
```css
|
|
16
16
|
@import "@med-o/design-tokens/css/tokens.css"; /* variables --medo-*, Light + Dark */
|
|
17
17
|
@import "@med-o/design-tokens/css/typography.css"; /* optional: .medo-text-* classes */
|
|
18
|
+
@import "@med-o/design-tokens/css/base.css"; /* optional: page reset and body styles, without Tailwind */
|
|
18
19
|
|
|
19
20
|
.card {
|
|
20
21
|
background: var(--medo-color-surface-raised);
|
|
@@ -44,6 +45,7 @@ Light and Dark follow the operating system. Force a theme with `data-theme="ligh
|
|
|
44
45
|
| --- | --- |
|
|
45
46
|
| `@med-o/design-tokens/css/tokens.css` | CSS variables, Light + Dark, responsive layout tokens (short form: `/css`) |
|
|
46
47
|
| `@med-o/design-tokens/css/typography.css` | Text style classes `.medo-text-*` |
|
|
48
|
+
| `@med-o/design-tokens/css/base.css` | Page base for apps without Tailwind: no browser margins, `border-box`, page colors and text style on `body` |
|
|
47
49
|
| `@med-o/design-tokens/tailwind/theme.css` | Tailwind v4 theme on top of the variables (short form: `/tailwind`) |
|
|
48
50
|
| `@med-o/design-tokens/js` | Resolved values and TypeScript types |
|
|
49
51
|
| `@med-o/design-tokens/src/*` | Source tokens in the DTCG format |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Page base of the med.o Design System: a minimal reset and the page colors and text style from the tokens.
|
|
3
|
+
* For apps without Tailwind – its preflight resets the page already; with Tailwind this file is optional.
|
|
4
|
+
*
|
|
5
|
+
* @import "@med-o/design-tokens/css/tokens.css";
|
|
6
|
+
* @import "@med-o/design-tokens/css/base.css";
|
|
7
|
+
* @import "@med-o/ui/styles.css";
|
|
8
|
+
*
|
|
9
|
+
* Cascade layer `base`, in the same order as @med-o/ui and Tailwind v4: component styles, utilities and CSS without
|
|
10
|
+
* a layer (your app) always win over these rules, whatever the specificity.
|
|
11
|
+
*/
|
|
12
|
+
@layer theme, base, components, utilities;
|
|
13
|
+
|
|
14
|
+
@layer base {
|
|
15
|
+
/* Widths include padding and border, as in every component. No browser margins: the spacing rules set the gaps. */
|
|
16
|
+
*,
|
|
17
|
+
::before,
|
|
18
|
+
::after {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The page follows Light and Dark through the tokens. */
|
|
24
|
+
body {
|
|
25
|
+
background: var(--medo-color-surface-canvas);
|
|
26
|
+
color: var(--medo-color-text-primary);
|
|
27
|
+
font: var(--medo-typography-body-md);
|
|
28
|
+
}
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@med-o/design-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Design tokens of the med.o Design System (DTCG source, CSS variables, Tailwind v4 theme, JS).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
|
-
"src"
|
|
9
|
+
"src",
|
|
10
|
+
"CHANGELOG.md"
|
|
10
11
|
],
|
|
11
12
|
"exports": {
|
|
12
13
|
"./css": "./dist/css/tokens.css",
|
|
13
14
|
"./css/tokens.css": "./dist/css/tokens.css",
|
|
14
15
|
"./css/typography.css": "./dist/css/typography.css",
|
|
16
|
+
"./css/base.css": "./dist/css/base.css",
|
|
15
17
|
"./tailwind": "./dist/tailwind/theme.css",
|
|
16
18
|
"./tailwind/theme.css": "./dist/tailwind/theme.css",
|
|
17
19
|
"./js": {
|
package/src/css/base.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Page base of the med.o Design System: a minimal reset and the page colors and text style from the tokens.
|
|
3
|
+
* For apps without Tailwind – its preflight resets the page already; with Tailwind this file is optional.
|
|
4
|
+
*
|
|
5
|
+
* @import "@med-o/design-tokens/css/tokens.css";
|
|
6
|
+
* @import "@med-o/design-tokens/css/base.css";
|
|
7
|
+
* @import "@med-o/ui/styles.css";
|
|
8
|
+
*
|
|
9
|
+
* Cascade layer `base`, in the same order as @med-o/ui and Tailwind v4: component styles, utilities and CSS without
|
|
10
|
+
* a layer (your app) always win over these rules, whatever the specificity.
|
|
11
|
+
*/
|
|
12
|
+
@layer theme, base, components, utilities;
|
|
13
|
+
|
|
14
|
+
@layer base {
|
|
15
|
+
/* Widths include padding and border, as in every component. No browser margins: the spacing rules set the gaps. */
|
|
16
|
+
*,
|
|
17
|
+
::before,
|
|
18
|
+
::after {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The page follows Light and Dark through the tokens. */
|
|
24
|
+
body {
|
|
25
|
+
background: var(--medo-color-surface-canvas);
|
|
26
|
+
color: var(--medo-color-text-primary);
|
|
27
|
+
font: var(--medo-typography-body-md);
|
|
28
|
+
}
|
|
29
|
+
}
|