-
Notifications
You must be signed in to change notification settings - Fork 110
H-5721: Figma-to-tokens transform / panda "preset + styled-system + ui" packages #8191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
e4bcac8
adopt park-ui architecture for theme colors, with generation from figβ¦
lunelson 595326e
clean up the color generation script, pass 1
lunelson e691f5a
convert color generation to use Zod
lunelson 3253764
move files around
lunelson 17f92a3
ladle initial setup
lunelson 1d6c39a
working ladle color swatches output
lunelson d2dc167
add rust compile pkg dir ignore to workspaces def in root package
lunelson 381ebca
format fixes, and untrack styled-system
lunelson b854e37
align vite versions
lunelson 69a15d2
get semantic colors in the export; fix codegen pkg script
lunelson 418e9bf
add semantic color file generation to the script
lunelson 8d07904
get semantic colors actually connected
lunelson 4777ddd
snip ds-helpers out of chain; try fixing the variable references in dβ¦
lunelson 6b524b3
add more variables to the figma export
lunelson 19573fa
lint and type fixes
lunelson 6cf8c22
expand ladle config w util components, hooks and tokened styles
lunelson bc79370
align w library pattern from tsdown
lunelson da4dd4e
add codegen for other tokens
lunelson 4f34ec9
add stories for the new tokens
lunelson 81dd8b8
add tests and tighten zod schemas
lunelson ae1dfd0
create turbo config
lunelson f2f6677
fix the type inference and strictness of tokens
lunelson e661f00
extend strictness to ds-components; fix for current naming
lunelson c521c38
fix color assignment in ladle and restrict core colors story to core
lunelson fb7c15f
keep description field from tokens; convert default props to DEFAULT
lunelson 9dcebee
fixups
lunelson b6553c6
add vercel config and playwright snapshot testing
lunelson d793cc7
lint fixes, on everything except petrinaut
lunelson 2019c6d
reinstate ds-helpers; move ladle stuff from ds-theme to ds-helpers
lunelson 58851c2
align configuration files with tsdown patterns
lunelson e2823d5
mostly fix token name errors in ds-components and petrinaut
lunelson 336f02d
capture panda's preflight styles to align ladle w production
lunelson 1a1a5c5
fix up pkg and turbo.json configs in all ds-*
lunelson 6ab8907
make ds-* tsconfigs _slightly_ less strict
lunelson 436833c
fix the dark/light switching again
lunelson 47b2e0d
fix the codegen vs format loop problem for now
lunelson ed4505b
add AGENTS.md to each of the 3 packages
lunelson 9319fd3
fix ts path mapping of hickory package
lunelson 85bf6d0
fix vercel config
lunelson a3722d2
fix build chain, up to ds-components
lunelson 99352d4
fix ds- package resolutions by using workspace refs; use correct refs
lunelson f5d33cf
fix pkg constraints
lunelson 31d9f02
fix ds-helpers testing
lunelson 7e7f44b
review fixes
lunelson 6da1e2e
pkg fixes: patch refractive version, re-add panda dev
lunelson cb77e6f
format fixes
lunelson e81828d
maybe fix biome invocation
lunelson 0a819bc
fix ds-components exports of main vs index
lunelson 29b5de0
remove that build command
lunelson ac5d5a2
change ds-theme codegen to use the *.gen.* convention
lunelson 5d54849
comment re panda config questions
lunelson c40a570
various self-review related trimmings and fixes
lunelson cdeff35
experimental fix for refractive CI errors
lunelson d89e871
changesets entry
lunelson d35783f
untrack build outputs
lunelson 344cf54
removed the previous dependsOn: [] override in ds-components turbo
lunelson 758275c
fixes for lint dependency failures
lunelson ee61bad
H-6024: Update design system repo config from #8191 (#8277)
CiaranMn 311d857
set the ds-components compile and export config to send both barrel aβ¦
lunelson 36181cc
rename ds-theme and ds-component test:* scripts, so they run as part β¦
lunelson c728cdc
fix snapshot file naming
lunelson 70ab98f
bugbot fixes
lunelson 06bb42a
yarn deduplicate
lunelson fb8fe2b
revert snapshot test naming; the solution for CI is too complicated rβ¦
lunelson d706e34
fix constraints
lunelson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| node_modules | ||
| dist | ||
| *.log | ||
| .DS_Store | ||
|
|
||
| # Used for Figma access token | ||
| .env | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,221 @@ | ||
| @layer reset, base, tokens, recipes, utilities; | ||
|
|
||
| /* panda's preflight (reset) styles, since we set preflight:false */ | ||
| @layer reset { | ||
| html, | ||
| :host { | ||
| --font-fallback: | ||
| ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
| "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", | ||
| "Segoe UI Symbol", "Noto Color Emoji"; | ||
| line-height: 1.5; | ||
| -webkit-text-size-adjust: 100%; | ||
| -webkit-font-smoothing: antialiased; | ||
| -moz-osx-font-smoothing: grayscale; | ||
| -moz-tab-size: 4; | ||
| tab-size: 4; | ||
| font-family: var(--global-font-body, var(--font-fallback)); | ||
| -webkit-tap-highlight-color: transparent; | ||
| } | ||
|
|
||
| *, | ||
| ::before, | ||
| ::after, | ||
| ::backdrop, | ||
| ::file-selector-button { | ||
| margin: 0px; | ||
| padding: 0px; | ||
| border-width: 0px; | ||
| border-style: solid; | ||
| border-color: var(--global-color-border, currentcolor); | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| hr { | ||
| color: inherit; | ||
| height: 0px; | ||
| border-top-width: 1px; | ||
| } | ||
|
|
||
| body { | ||
| line-height: inherit; | ||
| height: 100%; | ||
| } | ||
|
|
||
| img { | ||
| border-style: none; | ||
| } | ||
|
|
||
| img, | ||
| svg, | ||
| video, | ||
| canvas, | ||
| audio, | ||
| iframe, | ||
| embed, | ||
| object { | ||
| display: block; | ||
| vertical-align: middle; | ||
| } | ||
|
|
||
| img, | ||
| video { | ||
| max-width: 100%; | ||
| height: auto; | ||
| } | ||
|
|
||
| h1, | ||
| h2, | ||
| h3, | ||
| h4, | ||
| h5, | ||
| h6 { | ||
| text-wrap: balance; | ||
| font-size: inherit; | ||
| font-weight: inherit; | ||
| } | ||
|
|
||
| p, | ||
| h1, | ||
| h2, | ||
| h3, | ||
| h4, | ||
| h5, | ||
| h6 { | ||
| overflow-wrap: break-word; | ||
| } | ||
|
|
||
| ol, | ||
| ul, | ||
| menu { | ||
| list-style: none; | ||
| } | ||
|
|
||
| button, | ||
| input:where([type="button"], [type="reset"], [type="submit"]), | ||
| ::file-selector-button { | ||
| appearance: button; | ||
| -webkit-appearance: button; | ||
| } | ||
|
|
||
| button, | ||
| input, | ||
| optgroup, | ||
| select, | ||
| textarea, | ||
| ::file-selector-button { | ||
| font: inherit; | ||
| background: transparent; | ||
| font-feature-settings: inherit; | ||
| font-variation-settings: inherit; | ||
| letter-spacing: inherit; | ||
| color: inherit; | ||
| } | ||
|
|
||
| ::placeholder { | ||
| --placeholder-fallback: rgba(0, 0, 0, 0.5); | ||
| opacity: 1; | ||
| color: var(--global-color-placeholder, var(--placeholder-fallback)); | ||
| } | ||
|
|
||
| @supports (not (-webkit-appearance: -apple-pay-button)) or | ||
| (contain-intrinsic-size: 1px) { | ||
| ::placeholder { | ||
| --placeholder-fallback: color-mix(in oklab, currentcolor 50%, transparent); | ||
| } | ||
| } | ||
|
|
||
| ::selection { | ||
| background-color: var(--global-color-selection, rgba(0, 115, 255, 0.3)); | ||
| } | ||
|
|
||
| textarea { | ||
| resize: vertical; | ||
| } | ||
|
|
||
| table { | ||
| border-color: inherit; | ||
| text-indent: 0px; | ||
| border-collapse: collapse; | ||
| } | ||
|
|
||
| summary { | ||
| display: list-item; | ||
| } | ||
|
|
||
| small { | ||
| font-size: 80%; | ||
| } | ||
|
|
||
| sub, | ||
| sup { | ||
| font-size: 75%; | ||
| line-height: 0; | ||
| position: relative; | ||
| vertical-align: baseline; | ||
| } | ||
|
|
||
| sub { | ||
| bottom: -0.25em; | ||
| } | ||
|
|
||
| sup { | ||
| top: -0.5em; | ||
| } | ||
|
|
||
| dialog { | ||
| padding: 0px; | ||
| } | ||
|
|
||
| a { | ||
| text-decoration: inherit; | ||
| color: inherit; | ||
| } | ||
|
|
||
| abbr:where([title]) { | ||
| text-decoration: underline dotted; | ||
| } | ||
|
|
||
| b, | ||
| strong { | ||
| font-weight: bolder; | ||
| } | ||
|
|
||
| code, | ||
| kbd, | ||
| samp, | ||
| pre { | ||
| --font-mono-fallback: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, | ||
| "Liberation Mono", "Courier New"; | ||
| font-family: var(--global-font-mono, var(--font-mono-fallback)); | ||
| font-size: 1em; | ||
| font-feature-settings: normal; | ||
| font-variation-settings: normal; | ||
| } | ||
|
|
||
| progress { | ||
| vertical-align: baseline; | ||
| } | ||
|
|
||
| ::-webkit-search-decoration, | ||
| ::-webkit-search-cancel-button { | ||
| -webkit-appearance: none; | ||
| } | ||
|
|
||
| ::-webkit-inner-spin-button, | ||
| ::-webkit-outer-spin-button { | ||
| height: auto; | ||
| } | ||
|
|
||
| :-moz-ui-invalid { | ||
| box-shadow: none; | ||
| } | ||
|
|
||
| :-moz-focusring { | ||
| outline: auto; | ||
| } | ||
|
|
||
| [hidden]:where(:not([hidden="until-found"])) { | ||
| display: none !important; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added panda's reset styles here because I'm conservatively going with
preflight:falseon the config, due to not being 100% sure yet, what impact the preflight option could have on consumersThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The impact will be that reset styles are applied to global elements (interfering with global styling) unless they are scoped to a specific class, as we do in Petrinaut.
But surely
preflight: falsemeans that the components will not display as intended, and that the Storybook is in fact not a faithful representation of what they look like, since it is adding additional styling to them?Either:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can deal with this in follow-up. I'm maybe 70% confident I'm right above but it can easily be verified by building the library and looking at the generated CSS file