Skip to content
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

feat: new color tokens and variables in code #3733

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

torleifhalseth
Copy link
Collaborator

This pull request includes several changes to the eds-tokens-build package, focusing on improving the build process, adding new transforms, and updating configurations. The most significant changes are grouped by theme below.

Build Process Improvements:

Use the new color library to sync tokens

Build Process Improvements:

  • Updated the build script in package.json to correct a typo and added new scripts for updating tokens and Figma colors.
  • Switched the build tool from tsc to vite in packages/eds-tokens-build/package.json and added vite and vite-plugin-dts as dependencies. [1] [2]

Refactor Transforms:

  • Added a new transform includeTokenFilter to filter tokens based on names and file path segments.
  • Introduced createDensitySpaceToggleTransform to handle density space toggling for design tokens.
  • Added fontQuote transform to wrap font values in quotes.
  • Created createLightDarkTransform to handle light and dark mode transformations for color tokens.
  • Added pxFormatted transform to format certain number tokens as pixel values.
  • Introduced pxToRem transform to convert pixel values to rem units.

Configuration Updates:

  • Updated the tsconfig.json to target ES2020, include DOM libraries, and enable importing TS extensions.
  • Added a vite.config.ts file to configure Vite for building the package, including rollup options and external dependencies.

Utility Functions:

  • Added utility functions in packages/eds-tokens-build/src/utils/index.ts for transforming numbers to rem units, resolving references, and extending Style Dictionary configurations.

@torleifhalseth torleifhalseth force-pushed the feat/new-color-tokens branch 2 times, most recently from d24ff14 to 51ac6b0 Compare February 12, 2025 20:03
@torleifhalseth torleifhalseth changed the title Feat/new color tokens feat: new color tokens and variables in code Feb 14, 2025
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.

1 participant