Add PRIVATE_SWITCH_ON_CONTRAST_OFF token (web only)#494
Merged
Vincent Liu (xiaogliu) merged 1 commit intoMay 9, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot started reviewing on behalf of
Gert-Jan Vercauteren (gert-janvercauteren)
May 8, 2026 13:25
View session
There was a problem hiding this comment.
Pull request overview
Adds a new web-only private switch token (PRIVATE_SWITCH_ON_CONTRAST_OFF_{DAY|NIGHT}) to bpk-foundations-web, sourcing it from a new base token file and regenerating the compiled token outputs.
Changes:
- Introduces
packages/bpk-foundations-web/src/base/switch.jsondefiningPRIVATE_SWITCH_ON_CONTRAST_OFF_DAY/NIGHTvia theWHITE_ALPHA_20alias under the newswitch-colorscategory. - Registers the new source file in
packages/bpk-foundations-web/src/base.jsonso it participates in token generation. - Regenerates web token outputs (
tokens/*) to include the new token(s) across SCSS/JS/TS typings and category exports.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/bpk-foundations-web/tokens/base.scss | Adds SCSS variables for the new private switch tokens. |
| packages/bpk-foundations-web/tokens/base.raw.json | Adds raw token entries for PRIVATE_SWITCH_ON_CONTRAST_OFF_DAY/NIGHT under switch-colors. |
| packages/bpk-foundations-web/tokens/base.es6.js | Exports new token constants and adds a switchColors category export. |
| packages/bpk-foundations-web/tokens/base.es6.d.ts | Updates TS typings for the new exports, including switchColors. |
| packages/bpk-foundations-web/tokens/base.default.scss | Adds !default SCSS variables for the new private switch tokens. |
| packages/bpk-foundations-web/tokens/base.common.js | Adds CommonJS exports for the new private switch tokens. |
| packages/bpk-foundations-web/src/base/switch.json | New token source file defining the switch tokens (DAY/NIGHT). |
| packages/bpk-foundations-web/src/base.json | Includes ./base/switch.json in the web base import list for generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
17
to
22
| "./base/panels.json", | ||
| "./base/sliders.json", | ||
| "./base/spacing.json", | ||
| "./base/switch.json", | ||
| "./base/typography.json", | ||
| "./base/z-index.json" |
Nic da Costa (nicdaCosta)
approved these changes
May 8, 2026
Vincent Liu (xiaogliu)
approved these changes
May 9, 2026
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.
Adds a new web-only private token
PRIVATE_SWITCH_ON_CONTRAST_OFF(DAY/NIGHT) forBpkSwitch, set torgba(255, 255, 255, 0.20)via theWHITE_ALPHA_20alias. Source lives in a newpackages/bpk-foundations-web/src/base/switch.jsonwith categoryswitch-colors; generatedtokens/*outputs were rebuilt vianpm run tokens. Not propagated to common, iOS, or Android per scope.Remember to include the following changes:
README.md