Skip to content

feat: add theme.state opacity tokens and split theme types#4917

Open
adrcotfas wants to merge 2 commits into@adrcotfas/refactor/tokens_colorsfrom
@adrcotfas/refactor/tokens_state
Open

feat: add theme.state opacity tokens and split theme types#4917
adrcotfas wants to merge 2 commits into@adrcotfas/refactor/tokens_colorsfrom
@adrcotfas/refactor/tokens_state

Conversation

@adrcotfas
Copy link
Copy Markdown
Collaborator

@adrcotfas adrcotfas commented May 5, 2026

Motivation

1. theme.state was missing.
Interaction-state opacities (hover, focus, press, drag) lived in the raw token layer but were never on the theme object. Components had to reach into the token layer directly, bypassing theme
overrides. theme.state.opacity fixes that.

2. src/theme/types.ts was getting too big.
All theme types lived in one 179-line file. Split into src/theme/types/ one file per concern so new types (like ThemeState) have a clear place to go.

No behavior changes for existing consumers: Theme gains one new required field (state), all built-in schemes populate it, and the barrel re-exports everything from the same path.

Related issue

See https://www.notion.so/callstack/React-Native-Paper-Foundation-for-MD3-Expressive-34c5d027c0f880edba3df107cd35946f?source=copy_link

#### Merge order:

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

The mobile version of example app from this branch is ready! You can see it here.

@callstack-bot
Copy link
Copy Markdown

Hey @adrcotfas, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants