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

Auro design tokens: Support importing into TypeScript #182

Open
codetothepoint opened this issue Oct 16, 2024 · 1 comment
Open

Auro design tokens: Support importing into TypeScript #182

codetothepoint opened this issue Oct 16, 2024 · 1 comment

Comments

@codetothepoint
Copy link

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

I would like to import Auro tokens into server-side rendered components written in TypeScript.
Here is the syntax I would like to use:
import {DsColorBackgroundPrimary100Default} from '@aurodesignsystem/design-tokens/dist/tokens/JSData--color';

But instead of using JSData--color, it would be nice to use TSData--color instead.

When I try importing JSData--color, I get the following compilation error:

Could not find a declaration file for module '@aurodesignsystem/design-tokens/dist/tokens/JSVariables--color.js'. '[my project]/node_modules/@aurodesignsystem/design-tokens/dist/tokens/JSVariables--color.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/aurodesignsystem__design-tokens` if it exists or add a new declaration (.d.ts) file containing `declare module '@aurodesignsystem/design-tokens/dist/tokens/JSVariables--color.js';`

Describe alternatives you've considered

No response

Additional context

No response

Exit criteria

No response

@codetothepoint codetothepoint added design tokens not-reviewed Issue has not been reviewed by Auro team members Type: Feature New Feature labels Oct 16, 2024
@Patrick-Daly-AA Patrick-Daly-AA removed the not-reviewed Issue has not been reviewed by Auro team members label Oct 17, 2024
@Patrick-Daly-AA Patrick-Daly-AA removed their assignment Oct 17, 2024
@chrisfalaska
Copy link

I've used Style Dictionary in the past to export design tokens to different formats (JSON, CSS Vars, iOS, Android, etc)

https://amzn.github.io/style-dictionary/#/

amzn/style-dictionary#425

@jason-capsule42 jason-capsule42 removed the Type: Feature New Feature label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants