@med-o/design-tokens 0.10.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/CHANGELOG.md ADDED
@@ -0,0 +1,157 @@
1
+ # @med-o/design-tokens
2
+
3
+ ## 0.12.0
4
+
5
+ _Released 2026-11-10_
6
+
7
+ No changes in this release.
8
+
9
+ ## 0.11.0
10
+
11
+ _Released 2026-11-10_
12
+
13
+ ### Minor Changes
14
+
15
+ - 68e203d: New: `css/base.css` sets up the page for apps without Tailwind.
16
+
17
+ - Removes the browser margins and sizes every box with its padding and border (`border-box`).
18
+ - Gives `body` the canvas color, the primary text color and the text style body/md, in Light and Dark.
19
+ - Sits in the cascade layer `base`, so component styles, Tailwind utilities and your own CSS always win.
20
+ - Import it after `tokens.css`: `@import "@med-o/design-tokens/css/base.css";`
21
+
22
+ ### Patch Changes
23
+
24
+ - 171a142: Fixed: both packages include their `CHANGELOG.md`.
25
+
26
+ 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`.
27
+
28
+ ## 0.10.0
29
+
30
+ _Released 2026-11-09_
31
+
32
+ ### Minor Changes
33
+
34
+ - b2bbbb4: New: code/* tokens color the syntax in `CodeBlock`.
35
+
36
+ - `code/keyword`, `code/string`, `code/function`, `code/constant`, `code/comment` and `code/punctuation`, each for Light and Dark.
37
+ - Every color reaches at least 4.5 : 1 on surface/subtle, surface/default and surface/brand-muted. The token build checks these pairs.
38
+
39
+ ## 0.9.0
40
+
41
+ _Released 2026-11-08_
42
+
43
+ No changes in this release.
44
+
45
+ ## 0.8.1
46
+
47
+ _Released 2026-11-08_
48
+
49
+ No changes in this release.
50
+
51
+ ## 0.8.0
52
+
53
+ _Released 2026-11-07_
54
+
55
+ ### Minor Changes
56
+
57
+ - ef97ec8: New: width tokens `size/width/3xs` to `size/width/6xl` (80 to 720 px).
58
+
59
+ - 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.
60
+ - CSS `--medo-size-width-*`, JS and Figma variables; in Tailwind `max-w-(--medo-size-width-xl)`.
61
+ - Size tokens carry their Figma description.
62
+
63
+ ## 0.7.2
64
+
65
+ _Released 2026-11-07_
66
+
67
+ No changes in this release.
68
+
69
+ ## 0.7.1
70
+
71
+ _Released 2026-11-07_
72
+
73
+ No changes in this release.
74
+
75
+ ## 0.7.0
76
+
77
+ _Released 2026-11-03_
78
+
79
+ No changes in this release.
80
+
81
+ ## 0.6.0
82
+
83
+ _Released 2026-11-01_
84
+
85
+ ### Patch Changes
86
+
87
+ - 3653bdb: Improved: the contrast check of the token build also covers higher contrast (`prefers-contrast: more`).
88
+
89
+ - Every allowed text / background pair is checked in that mode too.
90
+ - `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.
91
+
92
+ ## 0.5.1
93
+
94
+ _Released 2026-11-01_
95
+
96
+ No changes in this release.
97
+
98
+ ## 0.5.0
99
+
100
+ _Released 2026-11-01_
101
+
102
+ ### Minor Changes
103
+
104
+ - 2151054: New: fixed text / background pairs, checked in every build.
105
+
106
+ - `@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.
107
+ - The descriptions of `text/primary`, `text/secondary` and `border/strong` name the surfaces they are made for instead of “all surfaces”.
108
+
109
+ - 2151054: New: token `font/size/2xs` (11 px), used by `label/xs`.
110
+
111
+ For short metadata only.
112
+
113
+ ## 0.4.2
114
+
115
+ _Released 2026-11-01_
116
+
117
+ ### Patch Changes
118
+
119
+ - 49f8981: Improved: the package README on npm covers the spacing rules and layout components.
120
+
121
+ Also supported browsers, versions and where to find the changelog.
122
+
123
+ ## 0.4.1
124
+
125
+ _Released 2026-10-31_
126
+
127
+ ## 0.4.0
128
+
129
+ _Released 2026-10-31_
130
+
131
+ ### Minor Changes
132
+
133
+ - d1ca3a6: New: six spacing rules for the space between elements.
134
+
135
+ - `inline`, `content`, `fields`, `items`, `group`, `section` – as tokens `--medo-layout-gap-*` that follow the layout mode (mobile · tablet · desktop).
136
+ - As Tailwind utilities (`gap-items`, `space-y-fields`, `py-section` …) and as classes (`medo-gap-items`).
137
+ - `ButtonGroup` uses the rule `inline` (same value as before).
138
+
139
+ ## 0.3.0
140
+
141
+ _Released 2026-10-30_
142
+
143
+ ## 0.2.0
144
+
145
+ _Released 2026-10-28_
146
+
147
+ ### Minor Changes
148
+
149
+ - be1add2: Improved: the overline text style is no longer uppercase.
150
+
151
+ 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.
152
+
153
+ - 23fbda6: Improved: higher contrast for “Increase contrast” in the system settings (`prefers-contrast: more`).
154
+
155
+ - `text/secondary` becomes neutral 700 (Light) or 300 (Dark): at least 9.4 : 1 on every surface.
156
+ - `border/default` becomes `border/strong`: at least 4.3 : 1.
157
+ - 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.10.0",
3
+ "version": "0.12.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": {
@@ -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
+ }