@tectra-ng/themes 0.1.0 → 0.1.2

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
@@ -1,11 +1,13 @@
1
1
  # @tectra-ng/themes
2
2
 
3
- Gives the primitive tokens a meaning. A preset = semantic tokens for light + dark, built from an accent palette and the surface palette.
3
+ Gives the primitive tokens a meaning. A preset = semantic tokens for light + dark, built from a primary palette, a surface palette and a style.
4
4
 
5
5
  | File | What it does |
6
6
  |---|---|
7
7
  | `semantic/light.semantic.ts`, `semantic/dark.semantic.ts` | which step of which palette is `primary`, `surface.card`, `field.border`, `danger.hover`… in each mode |
8
- | `presets/ink/ink.preset.ts` | `createInkPreset(accent)` — ink surfaces + one of `blue` · `green` · `purple` · `cyan` · `teal`; `InkPreset` = blue |
8
+ | `presets/tectra.preset.ts` | `createTectraPreset({ style, primary, surface })` — `style` from `TECTRA_STYLES` (`tectra` · `soft` · `edge` · `paper`), `primary` from `PRIMARY_ORDER` (`noir` follows the surface), `surface` from `SURFACE_PALETTES`; ready presets `Tectra` (default), `Soft`, `Edge`, `Paper` |
9
+ | `styles/<name>/` | a style = component token overrides + semantic overrides + optional CSS on top of the default look: `tectra` — the default; `soft` — pill buttons, tags and segments, filled borderless fields, tonal secondary buttons, large card and overlay radii, glow focus; `edge` — sharp corners, strong borders, solid selection; `paper` — filled fields with an underline, elevation shadows, focus halos |
10
+ | `semantic/contrast.ts` | `primaryBaseStep(scale)` — light primary is step 600, or 700 when white text on 600 is under 4.5:1 |
9
11
  | `define-preset.ts` | `definePreset(base, overrides)` — deep merge: override one token without copying the rest |
10
12
  | `components/*.tokens.ts` | design tokens of each component (`button`, `badge`, `toggleButton`) — every size, padding, colour per severity and variant; emitted as `--tx-<component>-…`, overridable per preset or per instance with `[dt]` |
11
13
  | `preset-to-css.ts` | `presetToCss(preset)` → `:root { --tx-… }` + `:root[data-tx-theme="dark"] { … }` |