Add @pui/theme-radix package with Radix token pipeline and component ports#60
Draft
Add @pui/theme-radix package with Radix token pipeline and component ports#60
Conversation
✅ Deploy Preview for pui-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Size Change: 0 B Total Size: 10.6 kB ℹ️ View Unchanged
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
--p-*HSL triplet variables so PUI can consume Radix themes at build time.Description
packages/pui-theme-radixwithpackage.json,postcss.config.cjs, and npm scriptsbuild:tokens,build:css, andbuildto run the token generator and PostCSS build.src/build/gen-tokens.mjs(PostCSS bundle -> virtual CSS var resolver -> composite alpha over background -> HSL triplet converter) and an editablesrc/build/token-map.jsonthat maps Radix variables to PUI--p-*outputs.src/radix-src/(tokens, colors, components and_internalpieces) and add asrc/build/css/radix-entry.cssentry used by the generator.src/generated/tokens.cssfrom the generator and stitch the theme insrc/index.css, and add PUI-ported component styles insrc/components/forbutton,input,textarea, anddialogfollowing the selector/variant mapping rules.white/blackparsing to the generator'sparseColorto handle CSS keywords; updated workspace (pnpm-workspace.yaml) and lockfile to include the new package and PostCSS dev deps.Testing
pnpm installwas executed for the workspace and completed successfully, installing the new PostCSS/tooling dev dependencies for the theme package.node packages/pui-theme-radix/src/build/gen-tokens.mjs; the first run exposed a color parsing edge-case (CSS keywords) and after a small parsing fix the generator re-ran successfully and emittedpackages/pui-theme-radix/src/generated/tokens.css.postcssbuild (pnpm --filter @pui/theme-radix run build:css) was not executed in this rollout; the package contains the PostCSS wiring andpostcssdevDependencies to run that step in CI or locally.Codex Task