Skip to content

Complete the Tier-3 component-token sweep across all components #39

Description

@tutkuofnight

Summary

Finish the Tier-3 component-token sweep so every Manti component exposes its full independent structural override surface as public --manti-{scope}-* tokens. This was started for the first 10 components in commit 1da8909 (feat(tokens): expand component-token coverage for 10 components); ~44 component CSS files still expose only a partial set (or none).

Why

Per the project rule (CLAUDE.md / AGENTS.md, Rule 2): every independent structural value (radius, padding, gap, sizing, typography) must be a public, semver-stable component token defaulting to a Tier-2 semantic token; only derived calc() values stay private --_*. The docs Component tokens tables read straight from the componentTokens registry, so completing this makes each component's override surface discoverable and consistent.

Done (reference)

accordion, alert, avatar, badge, card, carousel, checkbox, clipboard, collapsible, dialog — plus button / data-table already serve as the canonical examples.

Remaining (~44)

color-picker, combobox, date-picker, drawer, editable, field, file-upload, floating-panel, hover-card, listbox, marquee, menu, navigation-menu, number-input, pagination, password-input, pin-input, popover, progress, qr-code, radio-group, rating-group, scroll-area, segmented-control, select, signature-pad, slider, spinner, splitter, steps, swipe, switch, tabs, tags-input, time-picker, timer, toast, toggle, toggle-group, tooltip, tour, tree-view

(8 currently have no tokens at all: file-upload, password-input, qr-code, radio-group, splitter, swipe, tabs, tree-view.)

Convention

  • Token name --manti-{scope}-{prop} where {scope} = the CSS file basename. Reuse the shared vocabulary: radius, height, min/max-height, width, min/max-width, size, padding-x, padding-y, gap, font-size (plus component-specific structural names already in use, e.g. track-width, indicator-size, thumb-size).
  • Each token defaults to the exact current value (semantic token or literal) — a pure indirection refactor, zero visual change.
  • Structural only — never colours/tones/shadows; derived calc() stays private --_*.
  • Declare the tokens at the top of the component's primary part under the /* Component tokens (Tier 3) … */ comment; redeclare in size variants where needed (see button.css).
  • Register every token in the componentTokens map in packages/tokens/src/index.ts, then run pnpm --filter @manti-ui/styles gen:component-tokens-doc.

Acceptance criteria

  • Each remaining component exposes a complete, curated structural override surface (~3–8 tokens for typical components).
  • componentTokens registry matches the CSS exactly (the styles build's check-component-tokens.mjs is green).
  • docs/component-tokens.md regenerated and in sync.
  • pnpm verify green (no visual regressions).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededstatus:needs-triagecreated by fabrika status bootstrap label-taxonomy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions