@fastwork/xosmoz-theme 0.0.41 → 0.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/llms.txt CHANGED
@@ -49,13 +49,15 @@ Surface colors that adapt between light and dark themes.
49
49
 
50
50
  | Variable | Purpose |
51
51
  |----------|---------|
52
- | `--xz-color-bg-100` | Page background |
53
- | `--xz-color-bg-200` | Elevated surface (cards, modals) |
54
- | `--xz-color-bg-300` | Secondary surface |
55
- | `--xz-color-bg-400` | Tertiary surface / hover states |
56
- | `--xz-color-fg-100` | Primary text color |
57
- | `--xz-color-fg-200` | Secondary/muted text (80% opacity of fg-100) |
58
- | `--xz-color-fg-300` | Tertiary/disabled text (60% opacity of fg-100) |
52
+ | `--xz-color-surface-100` | Page background |
53
+ | `--xz-color-surface-200` | Elevated surface (cards, modals) |
54
+ | `--xz-color-surface-300` | Secondary surface |
55
+ | `--xz-color-surface-400` | Tertiary surface / hover states |
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) |
59
+ | `--xz-color-bg-100` | Extreme base background (near-black in light, near-white in dark) |
60
+ | `--xz-color-fg-100` | Text on bg-100 (white in light, black in dark) |
59
61
  | `--xz-color-line-100` | Subtle borders |
60
62
  | `--xz-color-line-200` | Default borders |
61
63
  | `--xz-color-line-300` | Strong/emphasized borders |
@@ -76,11 +78,11 @@ Each category follows the same token structure. Replace `{name}` with the catego
76
78
  | `--xz-color-{name}-line-300` | Strong border |
77
79
  | `--xz-color-{name}-bg-100` | Solid fill background (e.g. button bg) |
78
80
  | `--xz-color-{name}-bg-200` | Darker solid fill (e.g. hover state) |
79
- | `--xz-color-{name}-fg-50` | Text on solid bg — use for text over `{name}-bg-100`/`bg-200` (typically white) |
80
- | `--xz-color-{name}-fg-100` | Main text color for that semantic meaning |
81
- | `--xz-color-{name}-fg-200` | Darkest/emphasized text |
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
84
 
83
- **Important: `fg-50` is specifically for text rendered on top of solid background colors (`bg-100`/`bg-200`) of the same palette.** For example, use `--xz-color-primary-fg-50` as the text color on a `--xz-color-primary-bg-100` button. This is typically white in light theme.
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.
84
86
 
85
87
  ### Raw Color Palettes
86
88
 
@@ -158,8 +160,8 @@ import { lightTheme, darkTheme, themes, getTheme, getThemeNames } from '@fastwor
158
160
 
159
161
  // Access theme colors
160
162
  lightTheme.colors.primary.bg[100] // 'oklch(0.58 .2524 260)'
161
- lightTheme.colors.primary.fg[50] // 'oklch(1 0 0)' — white text for solid bg
162
- lightTheme.colors.fg[100] // primary text color
163
+ lightTheme.colors.primary.fg[100] // 'oklch(1 0 0)' — white text for solid bg
164
+ lightTheme.colors.text[100] // primary text color
163
165
  lightTheme.colors.fastwork[700] // raw palette value
164
166
 
165
167
  // Get theme by name
@@ -195,7 +197,7 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
195
197
  ```css
196
198
  .button-primary {
197
199
  background: var(--xz-color-primary-bg-100);
198
- color: var(--xz-color-primary-fg-50); /* white text on solid bg */
200
+ color: var(--xz-color-primary-fg-100); /* white text on solid bg */
199
201
  font: var(--xz-font-subtitle1-bold);
200
202
  border: none;
201
203
  border-radius: 0.5rem;
@@ -210,7 +212,7 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
210
212
  ```css
211
213
  .button-secondary {
212
214
  background: transparent;
213
- color: var(--xz-color-primary-fg-100);
215
+ color: var(--xz-color-primary-text-100);
214
216
  border: 1px solid var(--xz-color-line-100);
215
217
  }
216
218
  ```
@@ -219,8 +221,8 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
219
221
 
220
222
  ```css
221
223
  .card {
222
- background: var(--xz-color-bg-200);
223
- color: var(--xz-color-fg-100);
224
+ background: var(--xz-color-surface-200);
225
+ color: var(--xz-color-text-100);
224
226
  border: 1px solid var(--xz-color-line-100);
225
227
  border-radius: 0.75rem;
226
228
  box-shadow: var(--xz-box-shadow-200);
@@ -232,13 +234,13 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
232
234
  ```css
233
235
  .alert-success {
234
236
  background: var(--xz-color-success-soft-100);
235
- color: var(--xz-color-success-fg-100);
237
+ color: var(--xz-color-success-text-100);
236
238
  border: 1px solid var(--xz-color-success-line-100);
237
239
  }
238
240
 
239
241
  .badge-danger {
240
242
  background: var(--xz-color-danger-bg-100);
241
- color: var(--xz-color-danger-fg-50); /* white text on solid bg */
243
+ color: var(--xz-color-danger-fg-100); /* white text on solid bg */
242
244
  }
243
245
  ```
244
246
 
@@ -246,8 +248,8 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
246
248
 
247
249
  ```css
248
250
  .input {
249
- background: var(--xz-color-bg-100);
250
- color: var(--xz-color-fg-100);
251
+ background: var(--xz-color-surface-100);
252
+ color: var(--xz-color-text-100);
251
253
  border: 1px solid var(--xz-color-line-200);
252
254
  font: var(--xz-font-body1);
253
255
  }
@@ -261,9 +263,9 @@ import type { ThemeConfig, ThemeName, ColorToken, TypographyToken } from '@fastw
261
263
 
262
264
  ```css
263
265
  .text-muted {
264
- color: var(--xz-color-fg-200);
266
+ color: var(--xz-color-text-200);
265
267
  }
266
268
  .text-disabled {
267
- color: var(--xz-color-fg-300);
269
+ color: var(--xz-color-text-300);
268
270
  }
269
271
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastwork/xosmoz-theme",
3
- "version": "0.0.41",
3
+ "version": "0.2.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",