@astryxdesign/theme-neutral 0.5.2-canary.edc0cfc → 0.5.2-canary.f613dcb
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 +32 -9
- package/dist/neutral.js +82 -16
- package/dist/neutral.variants.d.ts +7 -0
- package/dist/neutralPalettes.d.ts +3 -0
- package/dist/neutralPalettes.d.ts.map +1 -0
- package/dist/neutralPalettes.generated.d.ts +494 -0
- package/dist/neutralPalettes.generated.d.ts.map +1 -0
- package/dist/neutralPalettes.test.d.ts +2 -0
- package/dist/neutralPalettes.test.d.ts.map +1 -0
- package/dist/neutralTheme.d.ts.map +1 -1
- package/dist/neutralTheme.test.d.ts +2 -0
- package/dist/neutralTheme.test.d.ts.map +1 -0
- package/dist/source.js +76 -146
- package/dist/source.mjs +80 -147
- package/dist/theme.css +75 -16
- package/package.json +5 -4
- package/palette.config.json +114 -0
- package/src/neutralPalettes.generated.receipt.json +616 -0
- package/src/neutralPalettes.generated.ts +498 -0
- package/src/neutralPalettes.test.ts +37 -0
- package/src/neutralPalettes.ts +7 -0
- package/src/neutralTheme.test.ts +84 -0
- package/src/neutralTheme.ts +91 -149
package/README.md
CHANGED
|
@@ -23,14 +23,37 @@ function App() {
|
|
|
23
23
|
|
|
24
24
|
### Import paths
|
|
25
25
|
|
|
26
|
-
| Path
|
|
27
|
-
|
|
|
28
|
-
| `@astryxdesign/theme-neutral` | Source build (StyleX compilation via `@astryxdesign/build`)
|
|
29
|
-
| `@astryxdesign/theme-neutral/built` | Pre-built dist (Tailwind, plain CSS, or no build step)
|
|
30
|
-
| `@astryxdesign/theme-neutral/theme.css` | Pre-built CSS file (import in your stylesheet)
|
|
26
|
+
| Path | Use case |
|
|
27
|
+
| --------------------------------------- | ----------------------------------------------------------- |
|
|
28
|
+
| `@astryxdesign/theme-neutral` | Source build (StyleX compilation via `@astryxdesign/build`) |
|
|
29
|
+
| `@astryxdesign/theme-neutral/built` | Pre-built dist (Tailwind, plain CSS, or no build step) |
|
|
30
|
+
| `@astryxdesign/theme-neutral/theme.css` | Pre-built CSS file (import in your stylesheet) |
|
|
31
31
|
|
|
32
32
|
If you're using `@astryxdesign/build` for StyleX source compilation, import from the bare path. Otherwise, use `/built`.
|
|
33
33
|
|
|
34
|
+
## Approved palette
|
|
35
|
+
|
|
36
|
+
The repository keeps Neutral's generation request in `palette.config.json`, the
|
|
37
|
+
exact `astryx-oklch-v1` output in `src/neutralPalettes.generated.ts`, and its
|
|
38
|
+
generation receipt beside that file. `src/neutralPalettes.ts` provides the stable
|
|
39
|
+
theme-local import. Neutral currently uses 21 numbered stops in each light and
|
|
40
|
+
dark ramp, but that layout is a Neutral decision rather than a requirement for
|
|
41
|
+
other themes.
|
|
42
|
+
|
|
43
|
+
Neutral is the reference implementation for palette-aware theme templates.
|
|
44
|
+
Templates may follow its ownership, review, and alignment workflow without
|
|
45
|
+
copying its colors or stop layout.
|
|
46
|
+
|
|
47
|
+
Use semantic theme tokens in components. Neutral's runtime theme does not import
|
|
48
|
+
the complete authoring palette. Mapping semantic tokens to reviewed stops is a
|
|
49
|
+
separate change, so palette generation and token adoption can be reviewed
|
|
50
|
+
independently.
|
|
51
|
+
|
|
52
|
+
The committed request and receipt preserve the generation inputs and provenance.
|
|
53
|
+
CLI regeneration is not yet a supported release workflow; until that tooling
|
|
54
|
+
ships, treat the generated module and receipt as reviewed artifacts rather than
|
|
55
|
+
editing them by hand.
|
|
56
|
+
|
|
34
57
|
### CSS import
|
|
35
58
|
|
|
36
59
|
Add the theme CSS to your stylesheet:
|
|
@@ -45,8 +68,8 @@ This theme uses system fonts; no external font loading is required.
|
|
|
45
68
|
|
|
46
69
|
## Related Packages
|
|
47
70
|
|
|
48
|
-
| Package | Description
|
|
49
|
-
| ------------------------------------------------------------------------------------ |
|
|
50
|
-
| [`@astryxdesign/core`](https://github.com/facebook/astryx/tree/main/packages/core) | Core components and theme system
|
|
51
|
-
| [`@astryxdesign/build`](https://github.com/facebook/astryx/tree/main/packages/build) | Build plugins for StyleX source builds
|
|
71
|
+
| Package | Description |
|
|
72
|
+
| ------------------------------------------------------------------------------------ | ----------------------------------------- |
|
|
73
|
+
| [`@astryxdesign/core`](https://github.com/facebook/astryx/tree/main/packages/core) | Core components and theme system |
|
|
74
|
+
| [`@astryxdesign/build`](https://github.com/facebook/astryx/tree/main/packages/build) | Build plugins for StyleX source builds |
|
|
52
75
|
| [`@astryxdesign/cli`](https://github.com/facebook/astryx/tree/main/packages/cli) | CLI tooling including `astryx docs theme` |
|
package/dist/neutral.js
CHANGED
|
@@ -189,6 +189,25 @@ export const neutralTheme = {
|
|
|
189
189
|
"--shadow-inset-warning": "inset 0px 0px 0px 2px #ffce2f4D",
|
|
190
190
|
"--shadow-inset-error": "inset 0px 0px 0px 2px #e33f4a4D"
|
|
191
191
|
},
|
|
192
|
+
localTokens: {
|
|
193
|
+
"--astryx-theme-neutral-color-status-fill-accent": "light-dark(#0074e2, #6d9cfe)",
|
|
194
|
+
"--astryx-theme-neutral-color-status-fill-success": "light-dark(#198100, #64af4c)",
|
|
195
|
+
"--astryx-theme-neutral-color-status-fill-warning": "#ffce2f",
|
|
196
|
+
"--astryx-theme-neutral-color-status-fill-error": "light-dark(#c9303a, #ff705d)",
|
|
197
|
+
"--astryx-theme-neutral-color-on-tint-neutral": "light-dark(#fafafa4D, #0a0a0a4D)",
|
|
198
|
+
"--astryx-theme-neutral-color-on-tint-overlay-hover": "light-dark(#fafafa1A, #0a0a0a1A)",
|
|
199
|
+
"--astryx-theme-neutral-color-on-tint-overlay-pressed": "light-dark(#fafafa33, #0a0a0a33)"
|
|
200
|
+
},
|
|
201
|
+
__localTokenOwners: {
|
|
202
|
+
"--astryx-theme-neutral-color-status-fill-accent": "neutral",
|
|
203
|
+
"--astryx-theme-neutral-color-status-fill-success": "neutral",
|
|
204
|
+
"--astryx-theme-neutral-color-status-fill-warning": "neutral",
|
|
205
|
+
"--astryx-theme-neutral-color-status-fill-error": "neutral",
|
|
206
|
+
"--astryx-theme-neutral-color-on-tint-neutral": "neutral",
|
|
207
|
+
"--astryx-theme-neutral-color-on-tint-overlay-hover": "neutral",
|
|
208
|
+
"--astryx-theme-neutral-color-on-tint-overlay-pressed": "neutral"
|
|
209
|
+
},
|
|
210
|
+
__localTokenLineage: ["neutral"],
|
|
192
211
|
components: {
|
|
193
212
|
"heading": {
|
|
194
213
|
"level:1": {
|
|
@@ -293,24 +312,24 @@ export const neutralTheme = {
|
|
|
293
312
|
},
|
|
294
313
|
"badge": {
|
|
295
314
|
"variant:info": {
|
|
296
|
-
"backgroundColor": "
|
|
297
|
-
"color": "
|
|
315
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-accent)",
|
|
316
|
+
"color": "var(--color-on-accent)"
|
|
298
317
|
},
|
|
299
318
|
"variant:neutral": {
|
|
300
319
|
"backgroundColor": "var(--color-background-gray)",
|
|
301
320
|
"color": "var(--color-text-gray)"
|
|
302
321
|
},
|
|
303
322
|
"variant:success": {
|
|
304
|
-
"backgroundColor": "
|
|
305
|
-
"color": "
|
|
323
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-success)",
|
|
324
|
+
"color": "var(--color-on-success)"
|
|
306
325
|
},
|
|
307
326
|
"variant:warning": {
|
|
308
|
-
"backgroundColor": "
|
|
309
|
-
"color": "
|
|
327
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-warning)",
|
|
328
|
+
"color": "var(--color-on-warning)"
|
|
310
329
|
},
|
|
311
330
|
"variant:error": {
|
|
312
|
-
"backgroundColor": "
|
|
313
|
-
"color": "
|
|
331
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-error)",
|
|
332
|
+
"color": "var(--color-on-error)"
|
|
314
333
|
},
|
|
315
334
|
"variant:red": {
|
|
316
335
|
"backgroundColor": "var(--color-background-red)",
|
|
@@ -355,19 +374,51 @@ export const neutralTheme = {
|
|
|
355
374
|
},
|
|
356
375
|
"statusdot": {
|
|
357
376
|
"variant:success": {
|
|
358
|
-
"backgroundColor": "
|
|
377
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-success)"
|
|
359
378
|
},
|
|
360
379
|
"variant:warning": {
|
|
361
|
-
"backgroundColor": "
|
|
380
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-warning)"
|
|
362
381
|
},
|
|
363
382
|
"variant:error": {
|
|
364
|
-
"backgroundColor": "
|
|
383
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-error)"
|
|
365
384
|
},
|
|
366
385
|
"variant:accent": {
|
|
367
|
-
"backgroundColor": "
|
|
386
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-accent)"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"avatar-status-dot": {
|
|
390
|
+
"variant:success": {
|
|
391
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-success)"
|
|
392
|
+
},
|
|
393
|
+
"variant:error": {
|
|
394
|
+
"backgroundColor": "var(--astryx-theme-neutral-color-status-fill-error)"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"segmented-control": {
|
|
398
|
+
"base": {
|
|
399
|
+
"padding": "var(--spacing-1)"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"segmented-control-item": {
|
|
403
|
+
"size:sm": {
|
|
404
|
+
"height": "calc(var(--size-element-sm) - 8px)"
|
|
405
|
+
},
|
|
406
|
+
"size:md": {
|
|
407
|
+
"height": "calc(var(--size-element-md) - 8px)"
|
|
408
|
+
},
|
|
409
|
+
"size:lg": {
|
|
410
|
+
"height": "calc(var(--size-element-lg) - 8px)"
|
|
411
|
+
},
|
|
412
|
+
"selected": {
|
|
413
|
+
"boxShadow": "none"
|
|
368
414
|
}
|
|
369
415
|
},
|
|
370
416
|
"banner": {
|
|
417
|
+
"base": {
|
|
418
|
+
"--color-neutral": "var(--astryx-theme-neutral-color-on-tint-neutral)",
|
|
419
|
+
"--color-overlay-hover": "var(--astryx-theme-neutral-color-on-tint-overlay-hover)",
|
|
420
|
+
"--color-overlay-pressed": "var(--astryx-theme-neutral-color-on-tint-overlay-pressed)"
|
|
421
|
+
},
|
|
371
422
|
"status:info": {
|
|
372
423
|
"--color-accent-muted": "var(--color-background-blue)",
|
|
373
424
|
"--color-text-primary": "var(--color-text-blue)",
|
|
@@ -385,11 +436,26 @@ export const neutralTheme = {
|
|
|
385
436
|
"--color-warning": "var(--color-text-yellow)"
|
|
386
437
|
},
|
|
387
438
|
"status:error": {
|
|
439
|
+
"--color-error-muted": "var(--color-background-red)",
|
|
388
440
|
"--color-text-primary": "var(--color-text-red)",
|
|
389
441
|
"--color-text-secondary": "var(--color-text-red)",
|
|
390
442
|
"--color-error": "var(--color-text-red)"
|
|
391
443
|
}
|
|
392
444
|
},
|
|
445
|
+
"step-indicator": {
|
|
446
|
+
"status:accent": {
|
|
447
|
+
"--color-accent": "var(--astryx-theme-neutral-color-status-fill-accent)"
|
|
448
|
+
},
|
|
449
|
+
"status:success": {
|
|
450
|
+
"--color-success": "var(--astryx-theme-neutral-color-status-fill-success)"
|
|
451
|
+
},
|
|
452
|
+
"status:warning": {
|
|
453
|
+
"--color-warning": "var(--astryx-theme-neutral-color-status-fill-warning)"
|
|
454
|
+
},
|
|
455
|
+
"status:error": {
|
|
456
|
+
"--color-error": "var(--astryx-theme-neutral-color-status-fill-error)"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
393
459
|
"switch": {
|
|
394
460
|
"base": {
|
|
395
461
|
"--color-background-gray": "var(--color-border-emphasized)"
|
|
@@ -400,16 +466,16 @@ export const neutralTheme = {
|
|
|
400
466
|
"--color-background-muted": "var(--color-border-emphasized)"
|
|
401
467
|
},
|
|
402
468
|
"variant:accent": {
|
|
403
|
-
"--color-accent": "
|
|
469
|
+
"--color-accent": "var(--astryx-theme-neutral-color-status-fill-accent)"
|
|
404
470
|
},
|
|
405
471
|
"variant:success": {
|
|
406
|
-
"--color-success": "
|
|
472
|
+
"--color-success": "var(--astryx-theme-neutral-color-status-fill-success)"
|
|
407
473
|
},
|
|
408
474
|
"variant:warning": {
|
|
409
|
-
"--color-warning": "
|
|
475
|
+
"--color-warning": "var(--astryx-theme-neutral-color-status-fill-warning)"
|
|
410
476
|
},
|
|
411
477
|
"variant:error": {
|
|
412
|
-
"--color-error": "
|
|
478
|
+
"--color-error": "var(--astryx-theme-neutral-color-status-fill-error)"
|
|
413
479
|
}
|
|
414
480
|
},
|
|
415
481
|
"card": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neutralPalettes.d.ts","sourceRoot":"","sources":["../src/neutralPalettes.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,OAAO,IAAI,OAAO,GACnB,MAAM,6BAA6B,CAAC"}
|