-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Token-docs] Static semantic colors with comments #3661
base: tokens-page
Are you sure you want to change the base?
Conversation
|
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.
Pull Request Overview
This PR introduces static semantic token configurations with detailed role‐specific files for various color roles and updates the semantic tokens aggregation logic. Key changes include:
- Addition of separate token configuration files for roles such as info, accent, warning, success, danger, neutral, and brand/meta variants.
- Refactoring of the semantic role tokens file to use a consolidated mapping (semanticRoleConfig) in place of dynamically generating tokens.
- Update of the index file to reference the new semanticRoleConfig during CSS bundle generation.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/info.tokens.ts | Added static token config for the info semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/accent.tokens.ts | Added static token config for the accent semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/warning.tokens.ts | Added static token config for the warning semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/success.tokens.ts | Added static token config for the success semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/danger.tokens.ts | Added static token config for the danger semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/neutral.tokens.ts | Added static token config for the neutral semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts | Added static token config for the brand-blue semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/meta-lime.tokens.ts | Added static token config for the meta-lime semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts | Added static token config for the brand-beige semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-magenta.tokens.ts | Added static token config for the brand-magenta semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-roles/meta-purple.tokens.ts | Added static token config for the meta-purple semantic role. |
@navikt/core/tokens/darkside/tokens/colors/semantic-role.tokens.ts | Refactored to consolidate individual role configs into a semanticRoleConfig mapping. |
@navikt/core/tokens/darkside/index.ts | Updated to reference semanticRoleConfig instead of generating tokens dynamically. |
Description
Allows for editing each semantic color definition by itself
Component Checklist 📝
@navikt/core/css/config/_mappings.js
)@navikt/core/css/tokens.json
)@navikt/aksel-stylelint/src/deprecations.ts
)@navikt/core/react/src/index.ts
and@navikt/core/react/package.json
)@navikt/core/css/index.css
)<Component>: <gitmoji?> <Text>.
E.g. "Button: ✨ Add feature xyz.")