@fastwork/xosmoz-theme 0.14.0 → 0.16.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/llms.txt CHANGED
@@ -52,12 +52,14 @@ Surface colors that adapt between light and dark themes.
52
52
  | `--xz-color-surface-100` | Page background |
53
53
  | `--xz-color-surface-200` | Elevated surface (cards, modals) |
54
54
  | `--xz-color-surface-300` | Secondary surface |
55
- | `--xz-color-surface-400` | Tertiary surface / hover states |
55
+ | `--xz-color-surface-400` | Tertiary surface / popovers |
56
56
  | `--xz-color-text-100` | Primary text color |
57
- | `--xz-color-text-200` | Secondary/muted text (80% opacity of text-100) |
58
- | `--xz-color-text-300` | Tertiary/disabled text (60% opacity of text-100) |
57
+ | `--xz-color-text-200` | Secondary/muted text (70% opacity) |
58
+ | `--xz-color-text-300` | Tertiary/disabled text (50% opacity) |
59
59
  | `--xz-color-bg-100` | Extreme base background (near-black in light, near-white in dark) |
60
60
  | `--xz-color-fg-100` | Text on bg-100 (white in light, black in dark) |
61
+ | `--xz-color-soft-100` | Very subtle overlay (5% opacity of bg) |
62
+ | `--xz-color-soft-200` | Subtle overlay (10% opacity of bg) |
61
63
  | `--xz-color-line-100` | Subtle borders |
62
64
  | `--xz-color-line-200` | Default borders |
63
65
  | `--xz-color-line-300` | Strong/emphasized borders |
@@ -70,19 +72,17 @@ Each category follows the same token structure. Replace `{name}` with the catego
70
72
 
71
73
  | Variable | Purpose |
72
74
  |----------|---------|
73
- | `--xz-color-{name}-soft-100` | Lightest soft background |
74
- | `--xz-color-{name}-soft-200` | Medium soft background |
75
- | `--xz-color-{name}-soft-300` | Darkest soft background |
76
- | `--xz-color-{name}-line-100` | Subtle border |
77
- | `--xz-color-{name}-line-200` | Default border |
78
- | `--xz-color-{name}-line-300` | Strong border |
75
+ | `--xz-color-{name}-soft-100` | Lightest tinted background |
76
+ | `--xz-color-{name}-soft-200` | Stronger tinted background (hover states) |
77
+ | `--xz-color-{name}-line-100` | Subtle colored border |
78
+ | `--xz-color-{name}-line-200` | Default colored border |
79
+ | `--xz-color-{name}-line-300` | Strong colored border |
79
80
  | `--xz-color-{name}-bg-100` | Solid fill background (e.g. button bg) |
80
81
  | `--xz-color-{name}-bg-200` | Darker solid fill (e.g. hover state) |
81
- | `--xz-color-{name}-fg-100` | Text on solid bg — use for text over `{name}-bg-100`/`bg-200` (typically white) |
82
- | `--xz-color-{name}-text-100` | Main text color for that semantic meaning |
83
- | `--xz-color-{name}-text-200` | Darkest/emphasized text |
82
+ | `--xz-color-{name}-fg-100` | Text on solid bg — use over `{name}-bg-100`/`bg-200` (typically white) |
83
+ | `--xz-color-{name}-text-100` | Colored text on surfaces (links, status labels) |
84
84
 
85
- **Important: `fg-100` is the foreground color for text on solid backgrounds (`bg-100`/`bg-200`) of the same palette.** For example, use `--xz-color-primary-fg-100` as the text color on a `--xz-color-primary-bg-100` button. This is typically white.
85
+ **Important: `fg-100` is the foreground color for text on solid backgrounds (`bg-100`/`bg-200`).** Use `--xz-color-primary-fg-100` as the text color on a `--xz-color-primary-bg-100` button. This is typically white.
86
86
 
87
87
  ### Raw Color Palettes
88
88
 
@@ -129,7 +129,7 @@ Alpha palettes (`black-alpha`, `white-alpha`) use opacity steps from 0.1 to 1.0.
129
129
  --xz-line-height-200pct (2)
130
130
  ```
131
131
 
132
- **Font shorthand tokens** (responsive — desktop sizes, scales down on mobile <=768px):
132
+ **Font shorthand tokens** (responsive — desktop sizes, scales down on mobile 768px):
133
133
 
134
134
  ```
135
135
  --xz-font-heading1 through --xz-font-heading6 (secondary font, bold)
@@ -158,11 +158,26 @@ Usage: `font: var(--xz-font-heading1);`
158
158
  ```typescript
159
159
  import { lightTheme, darkTheme, themes, getTheme, getThemeNames } from '@fastwork/xosmoz-theme';
160
160
 
161
- // Access theme colors
162
- lightTheme.colors.primary.bg[100] // 'oklch(0.58 .2524 260)'
163
- lightTheme.colors.primary.fg[100] // 'oklch(1 0 0)' — white text for solid bg
164
- lightTheme.colors.text[100] // primary text color
165
- lightTheme.colors.fastwork[700] // raw palette value
161
+ // Access raw palette colors
162
+ lightTheme.colors.fastwork[600] // 'oklch(0.613 0.233 260.608)'
163
+ lightTheme.colors.gray[300] // raw palette value
164
+
165
+ // Access semantic colors
166
+ lightTheme.colors.primary.bg[100] // solid fill color
167
+ lightTheme.colors.primary.fg[100] // white text for solid bg
168
+ lightTheme.colors.primary.text[100] // colored text on surfaces
169
+ lightTheme.colors.primary.soft[100] // tinted background
170
+ lightTheme.colors.primary.line[200] // border color
171
+
172
+ // Access base tokens
173
+ lightTheme.colors.surface[200] // card background
174
+ lightTheme.colors.text[100] // primary text
175
+
176
+ // Access box shadows (on theme objects)
177
+ lightTheme.boxShadows[100] // '0 1px 2px 0 rgba(0, 0, 0, 0.08)'
178
+ lightTheme.boxShadows[200] // '0 2px 6px 0 rgba(0, 0, 0, 0.10)'
179
+ lightTheme.boxShadows[300] // '0 4px 16px 0 rgba(0, 0, 0, 0.12)'
180
+ lightTheme.boxShadows[400] // '0 8px 20px 0 rgba(0, 0, 0, 0.14)'
166
181
 
167
182
  // Get theme by name
168
183
  const theme = getTheme('dark');
@@ -174,20 +189,33 @@ const names = getThemeNames(); // ['light', 'dark']
174
189
  ### Design tokens
175
190
 
176
191
  ```typescript
177
- import { fontSize, fontWeight, fontFamily, lineHeight, font, boxShadows } from '@fastwork/xosmoz-theme/tokens';
178
-
179
- fontSize[400] // '1rem'
180
- fontWeight[700] // 700
181
- fontFamily.primary // system sans-serif stack
182
- fontFamily.secondary // "Fastwork" + fallbacks
183
- font.heading1 // { fontFamily, fontSize: { desktop, mobile }, fontWeight, lineHeight }
184
- boxShadows[300] // '0 4px 16px 0 rgba(0, 0, 0, 0.12)'
192
+ import { fontSize, fontWeight, fontFamily, lineHeight, font, typography } from '@fastwork/xosmoz-theme/tokens';
193
+
194
+ fontSize[400] // '1rem'
195
+ fontSize[700] // '1.5rem'
196
+ fontWeight[700] // 700
197
+ fontFamily.primary // system sans-serif stack
198
+ fontFamily.secondary // "Fastwork" + fallbacks
199
+ lineHeight['150pct'] // '1.5'
200
+
201
+ font.heading1 // { fontFamily, fontSize: { desktop, mobile }, fontWeight, lineHeight }
202
+ font.title2
203
+ font.subtitle1Bold
204
+ font.body1
185
205
  ```
186
206
 
187
207
  ### Types
188
208
 
189
209
  ```typescript
190
- import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastwork/xosmoz-theme';
210
+ import type {
211
+ ThemeConfig,
212
+ ThemeName,
213
+ ThemeRegistry,
214
+ ColorToken,
215
+ TypographyToken,
216
+ TypographyScale,
217
+ FontWeights,
218
+ } from '@fastwork/xosmoz-theme';
191
219
  ```
192
220
 
193
221
  ## Common Patterns
@@ -213,7 +241,7 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
213
241
  .button-secondary {
214
242
  background: transparent;
215
243
  color: var(--xz-color-primary-text-100);
216
- border: 1px solid var(--xz-color-line-100);
244
+ border: 1px solid var(--xz-color-primary-line-200);
217
245
  }
218
246
  ```
219
247
 
@@ -262,10 +290,6 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
262
290
  ### Muted/secondary text
263
291
 
264
292
  ```css
265
- .text-muted {
266
- color: var(--xz-color-text-200);
267
- }
268
- .text-disabled {
269
- color: var(--xz-color-text-300);
270
- }
293
+ .text-muted { color: var(--xz-color-text-200); }
294
+ .text-disabled { color: var(--xz-color-text-300); }
271
295
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastwork/xosmoz-theme",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Xosmoz Theme - Design tokens and theming system for Xosmoz",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",