@mutmutco/ui-dashboard
v0.4.0
Published
Mutatis Mutandis UI foundation: design tokens, Tailwind preset, and self-hosted fonts
Readme
@mutmutco/ui-dashboard
Design token package for MMD-UI.
Token pipeline
tokens/tokens.json is the DTCG source for the package.
It carries:
- Brand primitives, semantic colors, state colors, six palettes, and dark/light theme values.
- Typography families, sizes, line heights, and tracking.
- Spacing, radii, border widths, elevation, shadows, and motion tokens.
- MMD metadata in
$extensions.mmd, includingcssVariable,palette, andtheme.
Style Dictionary reads that source through style-dictionary.config.mjs and writes the generated CSS to src/styles.css.
The generated file is checked in because downstream packages import @mutmutco/ui-dashboard/styles.css directly.
Rebuild
Run from the repository root:
npm --workspace @mutmutco/ui-dashboard run build:cssThis regenerates packages/ui/src/styles.css.
The package check script also runs build:css, so the root gate covers token generation:
npm run checkFonts
src/styles.css declares four self-hosted @font-face rules:
- Questrial regular.
- Archivo Black regular.
- Roboto Mono upright variable.
- Roboto Mono italic variable.
The URLs point to ../assets/fonts/... from src/styles.css, so they resolve inside the published npm package.
Tailwind v4 preset
src/preset.ts maps MMD CSS variables to Tailwind theme keys (colors, fonts, radii, spacing).
Consumers import tokens + preset in global CSS:
@import "@mutmutco/ui-dashboard/styles.css";
@import "tailwindcss";
@plugin "@mutmutco/ui-dashboard/preset";Dark is the default on :root. Light theme uses [data-theme="light"] on <html>.
Palette classes (.p-studio, .p-void, …) swap semantic color variables.
