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

Semantic-Tokens: Generate from token JSON export #33931

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7a48bb0
Stash initial for now
Mitch-At-Work Feb 11, 2025
13424bc
Add initial Link tokens as example
Mitch-At-Work Feb 12, 2025
5badbf8
Add tsconfig for semantic-tokens
Mitch-At-Work Feb 12, 2025
36cc985
Update indexing and add token vars as exports
Mitch-At-Work Feb 14, 2025
88cc6f4
Change files
Mitch-At-Work Feb 18, 2025
6b008bd
Fix version of react-tokens
Mitch-At-Work Feb 18, 2025
8dba624
Update and connect local build artifacts
Mitch-At-Work Feb 18, 2025
4a8db31
Lint and fix exports
Mitch-At-Work Feb 19, 2025
e2aa7f2
Update E2E for semantic tokens to a dummy test (for now)
Mitch-At-Work Feb 20, 2025
96ef49f
Fix up extra bracket and brand ref color
Mitch-At-Work Feb 20, 2025
1d6d672
remove console
Mitch-At-Work Feb 21, 2025
f478839
Alphebetize order
Mitch-At-Work Feb 24, 2025
bb81096
Update tokens so far
Mitch-At-Work Feb 28, 2025
940f605
Add script to generate
Mitch-At-Work Feb 28, 2025
44bfcdf
Initial script gen
Mitch-At-Work Feb 28, 2025
57c7867
Update tokens and script
Mitch-At-Work Feb 28, 2025
81f1e05
Update script to handle duplicated tokens
Mitch-At-Work Feb 28, 2025
6035592
Add strokeWidthThin fallback
Mitch-At-Work Feb 28, 2025
83f6a0a
Set variable path correctly
Mitch-At-Work Mar 1, 2025
e5671d7
Update latest
Mitch-At-Work Mar 3, 2025
0ed592f
Update with better fallback logic
Mitch-At-Work Mar 3, 2025
c81c862
Update script to handle fallbacks and f2 tokens better
Mitch-At-Work Mar 3, 2025
4d4bd3f
Update naming to handle brackets and spacings
Mitch-At-Work Mar 3, 2025
4609e99
Ensure fallbacks work correctly for FST
Mitch-At-Work Mar 3, 2025
9c3a7fe
Simplify script to match design and add custom fluent fallback map
Mitch-At-Work Mar 5, 2025
032d3b7
Add missing imports structure
Mitch-At-Work Mar 5, 2025
a750369
Fix imports
Mitch-At-Work Mar 5, 2025
a55568e
Update script to add exports
Mitch-At-Work Mar 5, 2025
5658e2d
Update script to handle imports/exports
Mitch-At-Work Mar 5, 2025
56e1102
Token script fixed
Mitch-At-Work Mar 5, 2025
e3a0bba
Update tokens and script
Mitch-At-Work Mar 6, 2025
58bac11
Fix token reference fallback
Mitch-At-Work Mar 6, 2025
791a838
Update api
Mitch-At-Work Mar 6, 2025
9c1c981
Fix port
Mitch-At-Work Mar 6, 2025
8884ea1
Lint all files
Mitch-At-Work Mar 6, 2025
a5bb059
Update and remove eslint rule
Mitch-At-Work Mar 6, 2025
c4719f4
Fix up the ESLint rule
Mitch-At-Work Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update script to handle duplicated tokens
  • Loading branch information
Mitch-At-Work committed Feb 28, 2025
commit 81f1e05311551734db5e1e4e4dca02cd4583bbb9
12 changes: 6 additions & 6 deletions packages/semantic-tokens/scripts/tokenGen.ts
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ interface ComponentTokenMap {
}

// ToDo, make this dynamic to handle all needed variables imported after/during files generation
function exportImportHeaders() {
function generateImportHeaders() {
const esLintDisable = '// eslint-disable-next-line no-restricted-imports\n';
const importFluent = "import { tokens } from '@fluentui/tokens';\n\n";
return esLintDisable + importFluent;
@@ -110,9 +110,9 @@ function toCamelCase(str: string) {
function generateTokenVariables() {
// Default our files to token imports
// TODO: Add raw token imports
let optionalTokens = exportImportHeaders();
let controlTokens = exportImportHeaders();
let nullableTokens = exportImportHeaders();
let optionalTokens = generateImportHeaders();
let controlTokens = generateImportHeaders();
let nullableTokens = generateImportHeaders();
const componentTokens: ComponentTokenMap = {};
for (const token in tokensJSON) {
const tokenData: Token = tokensJSON[token];
@@ -143,7 +143,7 @@ function generateTokenVariables() {

let resolvedTokenFallback = `var(${escapeInlineToken(tokenNameRaw)})`;
// TODO: Check if a token has a FST reference that falls back to another FST/fluent fallback?
if (tokenFallback && tokenSemanticRef) {
if (tokenFallback && tokenSemanticRef && tokenFallback !== tokenSemanticRef) {
// Token has both a FST fallback and a Fluent fallback
resolvedTokenFallback = `var(${escapeInlineToken(tokenNameRaw)}, var(${escapeInlineToken(
tokenSemanticRef,
@@ -160,7 +160,7 @@ function generateTokenVariables() {
// We have a component level control token
const component = tokenData.name.split('/')[1];
if (!componentTokens[component]) {
componentTokens[component] = "import { tokens } from '@fluentui/tokens';\n\n";
componentTokens[component] = generateImportHeaders();
}
componentTokens[component] += `export const ${token} = '${resolvedTokenFallback}';\n`;
} else {
3 changes: 2 additions & 1 deletion packages/semantic-tokens/src/components/avatar/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlAvatarSize = 'var(${ctrlAvatarSizeRaw}, var(${sizeCtrlDefaultRaw}, ${📦 sizeAvatarSizeRaw}))';
export const ctrlAvatarCornerItem = 'var(${ctrlAvatarCornerItemRaw}, var(${cornerCircularRaw}, ${cornerCircularRaw}))';
export const ctrlAvatarCornerItem = 'var(${ctrlAvatarCornerItemRaw}, ${cornerCircularRaw})';
export const ctrlAvatarBackground = 'var(${ctrlAvatarBackgroundRaw}, ${neutralBackground6RestRaw})';
export const ctrlAvatarForeground = 'var(${ctrlAvatarForegroundRaw}, ${neutralForeground3RestRaw})';
export const ctrlAvatarIconSize = 'var(${ctrlAvatarIconSizeRaw}, ${sizeCtrlIconRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/badge/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlBadgeTextPaddingTop = 'var(${ctrlBadgeTextPaddingTopRaw})';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlBooleanSelectionhint = 'var(${ctrlBooleanSelectionhintRaw})';
21 changes: 11 additions & 10 deletions packages/semantic-tokens/src/components/choice/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlChoicePaddingHorizontal = 'var(${ctrlChoicePaddingHorizontalRaw}, ${horizontalSRaw})';
@@ -26,8 +27,8 @@ export const ctrlChoiceForegroundIndeterminatePressed = 'var(${ctrlChoiceForegro
export const ctrlChoiceForegroundIndeterminateDisabled = 'var(${ctrlChoiceForegroundIndeterminateDisabledRaw}, var(${foregroundCtrlOnbrandDisabledRaw}, ${neutralBackgroundTransparentPressedRaw}))';
export const ctrlChoiceCheckboxIconSize = 'var(${ctrlChoiceCheckboxIconSizeRaw}, ${sizeCtrlIconsecondaryRaw})';
export const ctrlChoiceCheckboxCorner = 'var(${ctrlChoiceCheckboxCornerRaw}, ${smallRaw})';
export const ctrlChoiceRadioCorner = 'var(${ctrlChoiceRadioCornerRaw}, var(${cornerCircularRaw}, ${cornerCircularRaw}))';
export const ctrlChoiceSwitchCorner = 'var(${ctrlChoiceSwitchCornerRaw}, var(${cornerCircularRaw}, ${cornerCircularRaw}))';
export const ctrlChoiceRadioCorner = 'var(${ctrlChoiceRadioCornerRaw}, ${cornerCircularRaw})';
export const ctrlChoiceSwitchCorner = 'var(${ctrlChoiceSwitchCornerRaw}, ${cornerCircularRaw})';
export const ctrlChoiceRadioDotSizeRest = 'var(${ctrlChoiceRadioDotSizeRestRaw})';
export const ctrlChoiceRadioDotSizeHover = 'var(${ctrlChoiceRadioDotSizeHoverRaw}, ${ctrlChoiceRadioDotSizeRestRaw})';
export const ctrlChoiceRadioDotSizePressed = 'var(${ctrlChoiceRadioDotSizePressedRaw}, ${ctrlChoiceRadioDotSizeRestRaw})';
@@ -39,14 +40,14 @@ export const ctrlChoiceSwitchWidth = 'var(${ctrlChoiceSwitchWidthRaw})';
export const ctrlChoiceSwitchThumbWidthRest = 'var(${ctrlChoiceSwitchThumbWidthRestRaw})';
export const ctrlChoiceSwitchThumbWidthHover = 'var(${ctrlChoiceSwitchThumbWidthHoverRaw}, ${ctrlChoiceSwitchThumbWidthRestRaw})';
export const ctrlChoiceSwitchThumbWidthPressed = 'var(${ctrlChoiceSwitchThumbWidthPressedRaw}, ${ctrlChoiceSwitchThumbWidthRestRaw})';
export const ctrlChoiceSwitchThumbShadowKeyX = 'var(${ctrlChoiceSwitchThumbShadowKeyXRaw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlChoiceSwitchThumbShadowKeyY = 'var(${ctrlChoiceSwitchThumbShadowKeyYRaw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlChoiceSwitchThumbShadowKeyBlur = 'var(${ctrlChoiceSwitchThumbShadowKeyBlurRaw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlChoiceSwitchThumbShadowKeyColor = 'var(${ctrlChoiceSwitchThumbShadowKeyColorRaw}, var(${nullColorRaw}, ${nullColorRaw}))';
export const ctrlChoiceSwitchThumbShadowAmbientX = 'var(${ctrlChoiceSwitchThumbShadowAmbientXRaw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlChoiceSwitchThumbShadowAmbientY = 'var(${ctrlChoiceSwitchThumbShadowAmbientYRaw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlChoiceSwitchThumbShadowAmbientBlur = 'var(${ctrlChoiceSwitchThumbShadowAmbientBlurRaw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlChoiceSwitchThumbShadowAmbientColor = 'var(${ctrlChoiceSwitchThumbShadowAmbientColorRaw}, var(${nullColorRaw}, ${nullColorRaw}))';
export const ctrlChoiceSwitchThumbShadowKeyX = 'var(${ctrlChoiceSwitchThumbShadowKeyXRaw}, ${nullNumberRaw})';
export const ctrlChoiceSwitchThumbShadowKeyY = 'var(${ctrlChoiceSwitchThumbShadowKeyYRaw}, ${nullNumberRaw})';
export const ctrlChoiceSwitchThumbShadowKeyBlur = 'var(${ctrlChoiceSwitchThumbShadowKeyBlurRaw}, ${nullNumberRaw})';
export const ctrlChoiceSwitchThumbShadowKeyColor = 'var(${ctrlChoiceSwitchThumbShadowKeyColorRaw}, ${nullColorRaw})';
export const ctrlChoiceSwitchThumbShadowAmbientX = 'var(${ctrlChoiceSwitchThumbShadowAmbientXRaw}, ${nullNumberRaw})';
export const ctrlChoiceSwitchThumbShadowAmbientY = 'var(${ctrlChoiceSwitchThumbShadowAmbientYRaw}, ${nullNumberRaw})';
export const ctrlChoiceSwitchThumbShadowAmbientBlur = 'var(${ctrlChoiceSwitchThumbShadowAmbientBlurRaw}, ${nullNumberRaw})';
export const ctrlChoiceSwitchThumbShadowAmbientColor = 'var(${ctrlChoiceSwitchThumbShadowAmbientColorRaw}, ${nullColorRaw})';
export const ctrlChoiceSmBaseSize = 'var(${ctrlChoiceSmBaseSizeRaw}, ${sizeCtrlSmIconRaw})';
export const ctrlChoiceSmCheckboxIconSize = 'var(${ctrlChoiceSmCheckboxIconSizeRaw}, ${sizeCtrlIconsecondaryRaw})';
export const ctrlChoiceSmCheckboxCorner = 'var(${ctrlChoiceSmCheckboxCornerRaw}, ${smallRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/dialog/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlDialogBackground = 'var(${ctrlDialogBackgroundRaw}, ${neutralBackground1RestRaw})';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlDividerFixedlineLength = 'var(${ctrlDividerFixedlineLengthRaw}, ${paddingContentAlignDefaultRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/drag/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlDragBackgroundSolid = 'var(${ctrlDragBackgroundSolidRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/fab/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlFabBackgroundRest = 'var(${ctrlFabBackgroundRestRaw}, ${neutralBackground1RestRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/focus/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlFocusPositionFigmaOnly = 'var(${ctrlFocusPositionFigmaOnlyRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/input/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlInputBackgroundRest = 'var(${ctrlInputBackgroundRestRaw}, var(${backgroundCtrlNeutralRestRaw}, ${neutralBackground1RestRaw}))';
9 changes: 5 additions & 4 deletions packages/semantic-tokens/src/components/link/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlLinkForegroundNeutralRest = 'var(${ctrlLinkForegroundNeutralRestRaw}, var(${foregroundCtrlNeutralPrimaryRestRaw}, ${foregroundCtrlNeutralPrimaryRestRaw}))';
export const ctrlLinkForegroundNeutralRest = 'var(${ctrlLinkForegroundNeutralRestRaw}, ${foregroundCtrlNeutralPrimaryRestRaw})';
export const ctrlLinkInlineStrokewidthRest = 'var(${ctrlLinkInlineStrokewidthRestRaw}, var(${strokewidthDefaultRaw}, ${thinRaw}))';
export const ctrlLinkInlineStrokewidthHover = 'var(${ctrlLinkInlineStrokewidthHoverRaw}, var(${strokewidthDefaultRaw}, ${thinRaw}))';
export const ctrlLinkInlineUnderlineDashed = 'var(${ctrlLinkInlineUnderlineDashedRaw})';
export const ctrlLinkInlineUnderlineSolidFigmaOnly = 'var(${ctrlLinkInlineUnderlineSolidFigmaOnlyRaw})';
export const ctrlLinkForegroundNeutralHover = 'var(${ctrlLinkForegroundNeutralHoverRaw}, var(${foregroundCtrlNeutralPrimaryRestRaw}, ${foregroundCtrlNeutralPrimaryHoverRaw}))';
export const ctrlLinkForegroundNeutralPressed = 'var(${ctrlLinkForegroundNeutralPressedRaw}, var(${foregroundCtrlNeutralPrimaryRestRaw}, ${foregroundCtrlNeutralPrimaryPressedRaw}))';
export const ctrlLinkForegroundBrandRest = 'var(${ctrlLinkForegroundBrandRestRaw}, var(${foregroundCtrlBrandRestRaw}, ${foregroundCtrlBrandRestRaw}))';
export const ctrlLinkForegroundBrandHover = 'var(${ctrlLinkForegroundBrandHoverRaw}, var(${foregroundCtrlBrandHoverRaw}, ${foregroundCtrlBrandHoverRaw}))';
export const ctrlLinkForegroundBrandPressed = 'var(${ctrlLinkForegroundBrandPressedRaw}, var(${foregroundCtrlBrandPressedRaw}, ${foregroundCtrlBrandPressedRaw}))';
export const ctrlLinkForegroundBrandRest = 'var(${ctrlLinkForegroundBrandRestRaw}, ${foregroundCtrlBrandRestRaw})';
export const ctrlLinkForegroundBrandHover = 'var(${ctrlLinkForegroundBrandHoverRaw}, ${foregroundCtrlBrandHoverRaw})';
export const ctrlLinkForegroundBrandPressed = 'var(${ctrlLinkForegroundBrandPressedRaw}, ${foregroundCtrlBrandPressedRaw})';
export const ctrlLinkOnpageStrokewidthRest = 'var(${ctrlLinkOnpageStrokewidthRestRaw}, var(${strokewidthDefaultRaw}, ${thinRaw}))';
export const ctrlLinkOnpageStrokewidthHover = 'var(${ctrlLinkOnpageStrokewidthHoverRaw}, var(${strokewidthDefaultRaw}, ${thinRaw}))';
export const ctrlLinkOnpageUnderlineDashed = 'var(${ctrlLinkOnpageUnderlineDashedRaw})';
9 changes: 5 additions & 4 deletions packages/semantic-tokens/src/components/list/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlListPillWidth = 'var(${ctrlListPillWidthRaw}, ${thickerRaw})';
@@ -14,10 +15,10 @@ export const ctrlListCornerPressed = 'var(${ctrlListCornerPressedRaw}, var(${cor
export const ctrlListIndentLevel1 = 'var(${ctrlListIndentLevel1Raw}, ${paddingCtrlHorizontalDefaultRaw})';
export const ctrlListIndentLevel2 = 'var(${ctrlListIndentLevel2Raw})';
export const ctrlListIndentLevel3 = 'var(${ctrlListIndentLevel3Raw})';
export const ctrlListBackgroundSelectedRest = 'var(${ctrlListBackgroundSelectedRestRaw}, var(${backgroundCtrlSubtleRestRaw}, ${backgroundCtrlSubtleRestRaw}))';
export const ctrlListBackgroundSelectedHover = 'var(${ctrlListBackgroundSelectedHoverRaw}, var(${backgroundCtrlSubtleHoverRaw}, ${backgroundCtrlSubtleHoverRaw}))';
export const ctrlListBackgroundSelectedPressed = 'var(${ctrlListBackgroundSelectedPressedRaw}, var(${backgroundCtrlSubtlePressedRaw}, ${backgroundCtrlSubtlePressedRaw}))';
export const ctrlListBackgroundSelectedDisabled = 'var(${ctrlListBackgroundSelectedDisabledRaw}, var(${backgroundCtrlSubtleDisabledRaw}, ${backgroundCtrlSubtleDisabledRaw}))';
export const ctrlListBackgroundSelectedRest = 'var(${ctrlListBackgroundSelectedRestRaw}, ${backgroundCtrlSubtleRestRaw})';
export const ctrlListBackgroundSelectedHover = 'var(${ctrlListBackgroundSelectedHoverRaw}, ${backgroundCtrlSubtleHoverRaw})';
export const ctrlListBackgroundSelectedPressed = 'var(${ctrlListBackgroundSelectedPressedRaw}, ${backgroundCtrlSubtlePressedRaw})';
export const ctrlListBackgroundSelectedDisabled = 'var(${ctrlListBackgroundSelectedDisabledRaw}, ${backgroundCtrlSubtleDisabledRaw})';
export const ctrlListChoiceBackgroundRest = 'var(${ctrlListChoiceBackgroundRestRaw}, var(${nullColorRaw}, ${neutralBackgroundTransparentRestRaw}))';
export const ctrlListChoiceStrokeRest = 'var(${ctrlListChoiceStrokeRestRaw}, var(${nullColorRaw}, ${neutralStrokeTransparentRestRaw}))';
export const ctrlListChoiceStrokeDisabled = 'var(${ctrlListChoiceStrokeDisabledRaw}, var(${nullColorRaw}, ${neutralStrokeTransparentDisabledRestRaw}))';
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlLitefilterBackgroundSelected = 'var(${ctrlLitefilterBackgroundSelectedRaw}, var(${backgroundCtrlBrandRestRaw}, ${backgroundCtrlBrandRestRaw}))';
export const ctrlLitefilterStrokeSelected = 'var(${ctrlLitefilterStrokeSelectedRaw}, var(${strokeCtrlOnbrandRestRaw}, ${strokeCtrlOnbrandRestRaw}))';
export const ctrlLitefilterForegroundSelected = 'var(${ctrlLitefilterForegroundSelectedRaw}, var(${foregroundCtrlOnbrandRestRaw}, ${foregroundCtrlOnbrandRestRaw}))';
export const ctrlLitefilterBackgroundSelected = 'var(${ctrlLitefilterBackgroundSelectedRaw}, ${backgroundCtrlBrandRestRaw})';
export const ctrlLitefilterStrokeSelected = 'var(${ctrlLitefilterStrokeSelectedRaw}, ${strokeCtrlOnbrandRestRaw})';
export const ctrlLitefilterForegroundSelected = 'var(${ctrlLitefilterForegroundSelectedRaw}, ${foregroundCtrlOnbrandRestRaw})';
export const ctrlLitefilterStrokewidthSelected = 'var(${ctrlLitefilterStrokewidthSelectedRaw}, var(${strokewidthDefaultRaw}, ${thinRaw}))';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlProgressBackgroundEmpty = 'var(${ctrlProgressBackgroundEmptyRaw}, ${neutralBackground6RestRaw})';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/rating/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlRatingIconTheme = 'var(${ctrlRatingIconThemeRaw}, ${iconthemeCtrlDefaultRestRaw})';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlSegmentedBackgroundRest = 'var(${ctrlSegmentedBackgroundRestRaw}, var(${backgroundCtrlOutlineRestRaw}, ${neutralBackgroundTransparentRestRaw}))';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/slider/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlSliderBarHeight = 'var(${ctrlSliderBarHeightRaw}, ${ctrlProgressHeightFilledRaw})';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlSpinnerSize = 'var(${ctrlSpinnerSizeRaw}, var(${sizeCtrlDefaultRaw}, ${📦 sizeSpinnerSizeRaw}))';
1 change: 1 addition & 0 deletions packages/semantic-tokens/src/components/split/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlSplitDividerStrokewidth = 'var(${ctrlSplitDividerStrokewidthRaw}, var(${strokewidthDefaultRaw}, ${thinRaw}))';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlTooltipShadowKeyX = 'var(${ctrlTooltipShadowKeyXRaw}, ${ctrlFabShadowRest(key)(x)Raw})';
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import { tokens } from '@fluentui/tokens';

export const ctrlComposerInputBottomStrokeWidthSelectedRest = 'var(${ctrlComposerInputBottomStrokeWidthSelectedRestRaw})';
10 changes: 5 additions & 5 deletions packages/semantic-tokens/src/nullable/tokens.ts
Original file line number Diff line number Diff line change
@@ -10,10 +10,10 @@ export const textStyleQuoteHeaderCase = 'var(${textStyleQuoteHeaderCaseRaw}, ${n
export const strokeLayer = 'var(${strokeLayerRaw}, var(${nullColorRaw}, ${neutralStrokeTransparentRestRaw}))';
export const strokeImage = 'var(${strokeImageRaw}, var(${nullColorRaw}, ${neutralStrokeTransparentRestRaw}))';
export const strokeFlyout = 'var(${strokeFlyoutRaw}, var(${nullColorRaw}, ${neutralStrokeTransparentRestRaw}))';
export const strokeCtrlOnbrandRest = 'var(${strokeCtrlOnbrandRestRaw}, var(${nullColorRaw}, ${nullColorRaw}))';
export const strokeCtrlOnbrandHover = 'var(${strokeCtrlOnbrandHoverRaw}, var(${nullColorRaw}, ${nullColorRaw}))';
export const strokeCtrlOnbrandPressed = 'var(${strokeCtrlOnbrandPressedRaw}, var(${nullColorRaw}, ${nullColorRaw}))';
export const strokeCtrlOnbrandDisabled = 'var(${strokeCtrlOnbrandDisabledRaw}, var(${nullColorRaw}, ${nullColorRaw}))';
export const strokeCtrlOnbrandRest = 'var(${strokeCtrlOnbrandRestRaw}, ${nullColorRaw})';
export const strokeCtrlOnbrandHover = 'var(${strokeCtrlOnbrandHoverRaw}, ${nullColorRaw})';
export const strokeCtrlOnbrandPressed = 'var(${strokeCtrlOnbrandPressedRaw}, ${nullColorRaw})';
export const strokeCtrlOnbrandDisabled = 'var(${strokeCtrlOnbrandDisabledRaw}, ${nullColorRaw})';
export const strokeCtrlOnneutralRest = 'var(${strokeCtrlOnneutralRestRaw}, var(${nullColorRaw}, ${neutralStroke1RestRaw}))';
export const strokeCtrlOnneutralHover = 'var(${strokeCtrlOnneutralHoverRaw}, var(${nullColorRaw}, ${neutralStroke1HoverRaw}))';
export const strokeCtrlOnneutralPressed = 'var(${strokeCtrlOnneutralPressedRaw}, var(${nullColorRaw}, ${neutralStroke1PressedRaw}))';
@@ -70,4 +70,4 @@ export const shadowLayerAmbientX = 'var(${shadowLayerAmbientXRaw}, ${nullNumberR
export const shadowLayerAmbientY = 'var(${shadowLayerAmbientYRaw}, ${nullNumberRaw})';
export const shadowLayerAmbientBlur = 'var(${shadowLayerAmbientBlurRaw}, ${nullNumberRaw})';
export const shadowLayerAmbientColor = 'var(${shadowLayerAmbientColorRaw}, ${nullColorRaw})';
export const ctrlListShadowSelectedKeyY2 = 'var(${ctrlListShadowSelectedKeyY2Raw}, var(${nullNumberRaw}, ${nullNumberRaw}))';
export const ctrlListShadowSelectedKeyY2 = 'var(${ctrlListShadowSelectedKeyY2Raw}, ${nullNumberRaw})';
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.