@ferrlabs/ui-foundation 5.8.0 → 5.10.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 CHANGED
@@ -13,6 +13,26 @@ package instead of three. Tracked under UI#105.
13
13
  | `@ferrlabs/ui-foundation/styles/global.css` | Base stylesheet — fonts + Tailwind import + brand tokens | Every app's `global.css` |
14
14
  | `@ferrlabs/ui-foundation/styles/tokens.css` | Brand color + typography tokens (consumed via `@theme`) | apps/sites |
15
15
 
16
+ ## Style presets
17
+
18
+ `data-style` on `<html>` selects a preset of token overrides, the same way
19
+ `data-theme="dark"` selects the dark palette. The two combine freely. No attribute
20
+ is the default editorial look.
21
+
22
+ | `data-style` | Radii (control / card / modal) | Font | `--control-height` |
23
+ | ------------ | ------------------------------ | -------- | ------------------ |
24
+ | (none) | 4px / 8px / 12px | Fraunces | 40px |
25
+ | `precision` | 2px / 4px / 6px | Geist | 28px |
26
+ | `soft` | 8px / 12px / 16px | Geist | 36px |
27
+
28
+ `--control-height` is the `md` height of buttons, inputs, selects, search fields,
29
+ multi-selects and submit buttons. `sm` and `lg` are 8px below and above it. Buttons
30
+ are padding-sized, so they shift by half the difference to 40px on each side.
31
+
32
+ ```html
33
+ <html data-style="precision" data-theme="dark"></html>
34
+ ```
35
+
16
36
  ## Usage
17
37
 
18
38
  ### React app
@@ -62,4 +82,4 @@ should target `@ferrlabs/ui-foundation` directly.
62
82
 
63
83
  Licensed under either of [Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT), at your option.
64
84
 
65
- The Fraunces and DM Mono fonts are not covered by this license. They are pulled in through the `@fontsource/fraunces` and `@fontsource/dm-mono` dependencies and stay under the SIL Open Font License 1.1, whose text ships in each of those packages.
85
+ The Fraunces, DM Mono and Geist fonts are not covered by this license. They are pulled in through the `@fontsource/fraunces`, `@fontsource/dm-mono` and `@fontsource/geist-sans` dependencies and stay under the SIL Open Font License 1.1, whose text ships in each of those packages.
package/package.json CHANGED
@@ -4,7 +4,8 @@
4
4
  },
5
5
  "dependencies": {
6
6
  "@fontsource/dm-mono": "^5.0.0",
7
- "@fontsource/fraunces": "^5.0.0"
7
+ "@fontsource/fraunces": "^5.0.0",
8
+ "@fontsource/geist-sans": "^5.3.0"
8
9
  },
9
10
  "description": "Framework-agnostic FerrLabs design foundation: SVG icons, base CSS + fonts, Tailwind preset tokens. Consumed by @ferrlabs/ui-ng and by the Astro sites directly.",
10
11
  "devDependencies": {
@@ -54,7 +55,7 @@
54
55
  },
55
56
  "type": "module",
56
57
  "types": "./dist/index.d.ts",
57
- "version": "5.8.0",
58
+ "version": "5.10.0",
58
59
  "scripts": {
59
60
  "build": "tsc",
60
61
  "typecheck": "tsc --noEmit"
@@ -27,6 +27,9 @@
27
27
  @import '@fontsource/fraunces/900.css';
28
28
  @import '@fontsource/dm-mono/400.css';
29
29
  @import '@fontsource/dm-mono/500.css';
30
+ @import '@fontsource/geist-sans/400.css';
31
+ @import '@fontsource/geist-sans/500.css';
32
+ @import '@fontsource/geist-sans/700.css';
30
33
 
31
34
  /* 2. Tailwind v4 — consumers do NOT @import this themselves. */
32
35
  @import 'tailwindcss';
@@ -88,6 +91,10 @@
88
91
  body {
89
92
  font-feature-settings: 'ss01', 'ss02';
90
93
  }
94
+ html[data-style='precision'] body,
95
+ html[data-style='soft'] body {
96
+ font-feature-settings: normal;
97
+ }
91
98
  ::selection {
92
99
  background: var(--color-ink);
93
100
  color: var(--color-paper);
@@ -97,6 +97,7 @@
97
97
  --radius-card: 8px; /* Cards, menus, popovers, rail items */
98
98
  --radius-modal: 12px; /* Modals, switcher panels, large surfaces */
99
99
  --radius-full: 999px; /* Switch, avatar, badges, status dots */
100
+ --control-height: 40px;
100
101
  }
101
102
 
102
103
  /* Dark mode tokens — opt-in via `<html data-theme="dark">`. The marketing
@@ -143,3 +144,21 @@ html[data-theme='dark'] {
143
144
  --color-code-inserted: #86efac;
144
145
  --color-code-deleted: #fca5a5;
145
146
  }
147
+
148
+ html[data-style='precision'] {
149
+ --radius-control: 2px;
150
+ --radius-card: 4px;
151
+ --radius-modal: 6px;
152
+ --font-sans: 'Geist Sans', system-ui, sans-serif;
153
+ --font-display: 'Geist Sans', system-ui, sans-serif;
154
+ --control-height: 28px;
155
+ }
156
+
157
+ html[data-style='soft'] {
158
+ --radius-control: 8px;
159
+ --radius-card: 12px;
160
+ --radius-modal: 16px;
161
+ --font-sans: 'Geist Sans', system-ui, sans-serif;
162
+ --font-display: 'Geist Sans', system-ui, sans-serif;
163
+ --control-height: 36px;
164
+ }