feat(paper): add PaperIcon component and createIconPlugin for alias resolution#375
Closed
sridhar-3009 wants to merge 3 commits into
Closed
feat(paper): add PaperIcon component and createIconPlugin for alias resolution#375sridhar-3009 wants to merge 3 commits into
sridhar-3009 wants to merge 3 commits into
Conversation
|
commit: |
Member
|
Paper is currently locked down. Can revisit this later. |
ae3207d to
0264e35
Compare
Contributor
Author
|
Thanks for the feedback! Closing for now since Paper is locked down — happy to reopen when the time is right. |
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.
Closes #107
What
Implements the Paper icon system described in #107: a renderless
<PaperIcon>component backed bycreateTokensalias resolution, with acreateIconPluginhelper for registration.API
createIconPlugin(icons)— design system setup<PaperIcon>— renderless componentUnregistered icon names pass through as-is (e.g.
icon="i-mdi-close"works without registration).useIconTokens()— direct token accessArchitecture
createIconPlugincallscreateTokens(icons)to build a full token context with alias resolution, then usesprovideIconContext(fromcreateTokensContext) to provide it to descendantsPaperIconcallsuseIconTokens()with a try/catch so it works without a plugin (passes icon name through)aria-hidden="true"on decorative icons; setlabelprop for meaningful iconsChecklist
pnpm typecheck— clean (paper + v0 + genesis)pnpm test:run— 6247 tests passpnpm lint:fix— cleanpnpm repo:check— clean