@atom63/styles 0.1.0-beta.5 → 0.1.0-beta.7
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 +16 -10
- package/generated/atom63.figma-sync.json +12897 -6323
- package/generated/atom63.tokens.json +8778 -3550
- package/package.json +8 -7
- package/src/compat/a63-from-shadcn.css +10 -0
- package/src/compat/shadcn.browser.test.ts +23 -0
- package/src/compat/shadcn.css +118 -16
- package/src/contracts/action.css +4 -3
- package/src/contracts/action.native.css +11 -0
- package/src/contracts/action.tokens.json +66 -0
- package/src/contracts/badge.css +83 -58
- package/src/contracts/badge.resolver.json +449 -0
- package/src/contracts/choice.css +4 -1
- package/src/contracts/choice.native.css +9 -0
- package/src/contracts/choice.tokens.json +66 -0
- package/src/contracts/control.css +43 -52
- package/src/contracts/control.native.css +13 -0
- package/src/contracts/control.tokens.json +245 -0
- package/src/contracts/environment.css +45 -49
- package/src/contracts/environment.native.css +23 -0
- package/src/contracts/environment.resolver.json +569 -0
- package/src/contracts/field.css +3 -1
- package/src/contracts/field.tokens.json +40 -0
- package/src/contracts/marker.css +6 -4
- package/src/contracts/marker.tokens.json +15 -0
- package/src/contracts/menu.css +25 -61
- package/src/contracts/menu.native.css +10 -0
- package/src/contracts/menu.resolver.json +122 -0
- package/src/contracts/overlay.css +11 -13
- package/src/contracts/overlay.native.css +13 -0
- package/src/contracts/overlay.tokens.json +103 -0
- package/src/contracts/segment.css +22 -68
- package/src/contracts/segment.tokens.json +19 -0
- package/src/contracts/selection.css +3 -1
- package/src/contracts/selection.tokens.json +37 -0
- package/src/contracts/skeleton.css +3 -0
- package/src/contracts/skeleton.resolver.json +66 -0
- package/src/contracts/surface.css +13 -24
- package/src/contracts/surface.native.css +17 -0
- package/src/contracts/surface.tokens.json +97 -0
- package/src/contracts/toggle.css +3 -1
- package/src/contracts/toggle.tokens.json +49 -0
- package/src/contracts/track.css +3 -1
- package/src/contracts/track.tokens.json +39 -0
- package/src/contracts/trigger.css +5 -2
- package/src/contracts/trigger.native.css +9 -0
- package/src/contracts/trigger.tokens.json +58 -0
- package/src/contracts/widget.css +41 -51
- package/src/contracts/widget.native.css +23 -0
- package/src/contracts/widget.resolver.json +1104 -0
- package/src/tailwind/roles.json +172 -0
- package/src/tailwind/theme.css +107 -23
- package/src/themes/aqua.css +24 -89
- package/src/themes/aqua.native.css +80 -0
- package/src/themes/aqua.resolver.json +1292 -0
- package/src/themes/modern.css +10 -14
- package/src/themes/modern.native.css +16 -0
- package/src/themes/modern.resolver.json +350 -0
- package/src/themes/retro.css +21 -26
- package/src/themes/retro.native.css +16 -0
- package/src/themes/retro.resolver.json +788 -0
- package/src/themes/terminal.css +34 -41
- package/src/themes/terminal.native.css +22 -0
- package/src/themes/terminal.resolver.json +517 -0
- package/src/tokens/brand-action.css +61 -0
- package/src/tokens/brand-action.resolver.json +137 -0
- package/src/tokens/brand-ramp.css +108 -0
- package/src/tokens/brand-ramp.resolver.json +418 -0
- package/src/tokens/brand.css +6 -146
- package/src/tokens/color-mix-space.browser.test.ts +79 -0
- package/src/tokens/contrast.browser.test.ts +82 -3
- package/src/tokens/figma-parity.browser.test.ts +270 -0
- package/src/tokens/font.css +6 -0
- package/src/tokens/font.resolver.json +107 -0
- package/src/tokens/foundation/effects.css +13 -13
- package/src/tokens/foundation/effects.resolver.json +433 -0
- package/src/tokens/foundation/fonts.css +3 -1
- package/src/tokens/foundation/fonts.tokens.json +6 -1
- package/src/tokens/foundation/radius.css +6 -9
- package/src/tokens/foundation/radius.tokens.json +100 -0
- package/src/tokens/foundation/typography.css +25 -12
- package/src/tokens/foundation/typography.native.css +11 -0
- package/src/tokens/foundation/typography.resolver.json +936 -0
- package/src/tokens/foundation.css +0 -1
- package/src/tokens/motion.css +3 -1
- package/src/tokens/motion.resolver.json +135 -0
- package/src/tokens/native-values.json +38 -0
- package/src/tokens/personalization-axes.browser.test.ts +5 -3
- package/src/tokens/radius.css +12 -8
- package/src/tokens/radius.resolver.json +138 -0
- package/src/tokens/semantics.css +211 -47
- package/src/tokens/semantics.resolver.json +1296 -0
- package/src/tokens/space.css +8 -6
- package/src/tokens/space.tokens.json +78 -0
- package/src/tokens/swift-parity.browser.test.ts +141 -0
- package/src/tokens/type-scale.css +6 -0
- package/src/tokens/type-scale.resolver.json +67 -0
- package/generated/atom63.figma-tokens.json +0 -21661
- package/src/tokens/foundation/aliases.css +0 -32
- package/src/tokens/foundation/aliases.tokens.json +0 -105
package/README.md
CHANGED
|
@@ -100,13 +100,16 @@ Tailwind/shadcn names are the day-to-day design surface. Shared-scale drift
|
|
|
100
100
|
Default entry `@atom63/styles` (`src/index.css`) imports **tokens → contracts →
|
|
101
101
|
themes → os → animations → utils only** — never `tailwind/`, never `compat/`.
|
|
102
102
|
|
|
103
|
+
Most layers are authored as DTCG sources (`*.tokens.json`, `*.resolver.json`); the `.css` next to
|
|
104
|
+
each source is generated by `pnpm --filter @atom63/styles generate:tokens` and must not be edited.
|
|
105
|
+
|
|
103
106
|
| Layer | Path | Purpose | May reference |
|
|
104
107
|
| --- | --- | --- | --- |
|
|
105
108
|
| **Foundation** | `tokens/foundation/*` | **Shared dictionaries** — palette, spacing, sizes, z, radius, fonts, typography, generic shadow/blur scales, motion | nothing (literals) or other foundation |
|
|
106
|
-
| **Semantic** (canonical) | `tokens/semantics.
|
|
109
|
+
| **Semantic** (canonical) | `tokens/semantics.resolver.json` + `tokens/brand-{ramp,action}.resolver.json` (generated `semantics.css`, `brand.css`) | `--a63-*` intent roles (surface/text/border/status; primary + focus in brand). Alias/compose foundation; light/dark resolution lives here | foundation |
|
|
107
110
|
| **Scale bridges** | `tokens/{space,radius,type-scale,font,motion}.css` | `--a63-*` semantic scale aliases over the foundation | foundation |
|
|
108
|
-
| **Contract** | `contracts
|
|
109
|
-
| **Theme** | `themes
|
|
111
|
+
| **Contract** | `contracts/*.tokens.json`, `contracts/*.resolver.json` | Shared component-family contracts (`control`, `field`, `overlay`, `badge`, …) + environment dimensions (`environment.resolver.json`) | semantic + scale bridges |
|
|
112
|
+
| **Theme** | `themes/*.resolver.json` | Skin character under `[data-a63-theme]` — assigns contracts; **may** own theme-private material (gel/bevel/CRT). No new shared scales; never structure | semantic + foundation |
|
|
110
113
|
| **OS** | `os/*` | Chrome **structure** + chrome-specific paint tokens that compose from semantics (`--a63-os-*`) under `[data-a63-os]` — peer of theme | foundation + semantic |
|
|
111
114
|
| **Animations** | `animations/*` | Generic executable CSS (keyframes) | foundation |
|
|
112
115
|
| **Utils** | `utils/*` | Reusable utilities (scrollbars, masks, code highlighting, view transitions, debug) | semantic + foundation |
|
|
@@ -154,21 +157,24 @@ of bug; run it after touching the token layers.
|
|
|
154
157
|
|
|
155
158
|
## Canonical `--a63-*` semantic tokens
|
|
156
159
|
|
|
157
|
-
Surfaces, text, borders, danger/status, and
|
|
160
|
+
Surfaces, text, borders, danger/status, scrim and media colors are defined in
|
|
161
|
+
`tokens/semantics.resolver.json`, one resolver context per mode, generated into
|
|
158
162
|
`tokens/semantics.css` (`:root, .light` + `.dark` overrides). Primary action and
|
|
159
|
-
focus ring are brand-derived in `tokens/brand.
|
|
160
|
-
`:root, [data-a63-brand]` so they re-resolve per
|
|
161
|
-
single source of semantic truth.
|
|
163
|
+
focus ring are brand-derived in `tokens/brand-action.resolver.json`, generated into
|
|
164
|
+
`tokens/brand.css` (scoped to `:root, [data-a63-brand]` so they re-resolve per
|
|
165
|
+
ramp). Together these are the single source of semantic truth.
|
|
162
166
|
|
|
163
167
|
| Group | Tokens | Home |
|
|
164
168
|
| --- | --- | --- |
|
|
165
169
|
| Surface | `--a63-surface-page`, `--a63-surface-panel`, `--a63-surface-overlay`, `--a63-surface-muted`, `--a63-surface-control`, `--a63-surface-control-hover` | `semantics.css` |
|
|
166
|
-
| Text | `--a63-text-primary`, `--a63-text-secondary` | `semantics.css` |
|
|
170
|
+
| Text | `--a63-text-primary`, `--a63-text-secondary`, `--a63-text-danger` (error and destructive text; `--a63-action-danger` is the fill) | `semantics.css` |
|
|
167
171
|
| Border | `--a63-border-subtle`, `--a63-border-control` | `semantics.css` |
|
|
168
|
-
| Action | `--a63-action-primary` (+ `-hover`, `-foreground`), `--a63-action-danger` (+ `-hover`, `-foreground`), `--a63-action-neutral` (+ `-foreground`) | primary
|
|
172
|
+
| Action | `--a63-action-primary` (+ `-hover`, `-foreground`), `--a63-action-danger` (+ `-hover`, `-foreground`), `--a63-action-neutral` (+ `-foreground`) | primary in `brand-action.css`; danger/neutral in `semantics.css` |
|
|
169
173
|
| Status | `--a63-status-info`, `--a63-status-success`, `--a63-status-warning` (+ `-foreground`) | `semantics.css` |
|
|
170
|
-
| Focus | `--a63-focus-ring` | `
|
|
174
|
+
| Focus | `--a63-focus-ring` (brand step 600 in light, 400 in dark: 3:1 against surfaces, WCAG 1.4.11) | `semantics.css` |
|
|
171
175
|
| Scrim | `--a63-scrim` | `semantics.css` |
|
|
176
|
+
| Media | `--a63-media-stage`, `--a63-media-scrim` (behind full-screen photos and video, black in every theme) | `semantics.css` |
|
|
177
|
+
| On media | `--a63-on-media-foreground`, `--a63-on-media-surface` (+ `-strong`), `--a63-on-media-border`, `--a63-on-media-ring`, `--a63-on-media-veil` (+ `-strong`) — controls over photos and video, whose colors are unknowable, so these hold in every theme | `semantics.css` |
|
|
172
178
|
|
|
173
179
|
Contract tokens (`--a63-control-*`, `--a63-field-*`, `--a63-overlay-*`,
|
|
174
180
|
`--a63-badge-*`, `--a63-space-*`, `--a63-radius-*`, `--a63-motion-*`,
|