Skip to content

Add PRIVATE_SWITCH_ON_CONTRAST_OFF token (web only)#494

Merged
Vincent Liu (xiaogliu) merged 1 commit into
mainfrom
gert-janvercauteren/switch-ios-on-contrast-off-token
May 9, 2026
Merged

Add PRIVATE_SWITCH_ON_CONTRAST_OFF token (web only)#494
Vincent Liu (xiaogliu) merged 1 commit into
mainfrom
gert-janvercauteren/switch-ios-on-contrast-off-token

Conversation

@gert-janvercauteren
Copy link
Copy Markdown
Contributor

Adds a new web-only private token PRIVATE_SWITCH_ON_CONTRAST_OFF (DAY/NIGHT) for BpkSwitch, set to rgba(255, 255, 255, 0.20) via the WHITE_ALPHA_20 alias. Source lives in a new packages/bpk-foundations-web/src/base/switch.json with category switch-colors; generated tokens/* outputs were rebuilt via npm run tokens. Not propagated to common, iOS, or Android per scope.

Remember to include the following changes:

  • README.md
  • Tests
  • Storybook examples created/updated for changes to tokens and icons

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json defining PRIVATE_SWITCH_ON_CONTRAST_OFF_DAY/NIGHT via the WHITE_ALPHA_20 alias under the new switch-colors category.
  • Registers the new source file in packages/bpk-foundations-web/src/base.json so 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"
@xiaogliu Vincent Liu (xiaogliu) merged commit 67a322c into main May 9, 2026
11 of 12 checks passed
@xiaogliu Vincent Liu (xiaogliu) deleted the gert-janvercauteren/switch-ios-on-contrast-off-token branch May 9, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants