-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat(plasma-theme-builder): Actualize default tokens #1127
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4a7b780
feat(plasma-theme-builder,plasma-tokens-utils): Remove `transparent` …
neretin-trike 3e37f42
feat(plasma-theme-builder,plasma-tokens-utils): Remove opacity option…
neretin-trike c727d18
feat(plasma-theme-builder): Rename groups of tokens to actual name
neretin-trike 27cf50f
feat(plasma-theme-builder): Update tokens creators for `text` group
neretin-trike 6d25968
feat(plasma-theme-builder): Update tokens creators for `surface` group
neretin-trike 7299bca
feat(plasma-theme-builder): Update tokens creators for `overlay` group
neretin-trike 5f2d873
feat(plasma-theme-builder): Update tokens creators for `background` g…
neretin-trike a626878
feat(plasma-theme-builder): Add tokens creators for `outline` group
neretin-trike 382f8a7
fix(plasma-theme-builder): Fix styling problems
neretin-trike File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
24 changes: 24 additions & 0 deletions
24
...asma-theme-builder/src/builder/themeTokenGetters/background/getBackgroundPrimaryTokens.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { ThemeConfig, TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
import { getGreyTokenData, tokensCreator } from '../../../utils'; | ||
|
||
export const getBackgroundPrimaryTokens = (config: ThemeConfig) => { | ||
const { grayscale } = config; | ||
|
||
const darkValue = getGreyTokenData({ | ||
saturation: 1000, | ||
grayscale: grayscale.dark, | ||
}); | ||
const lightValue = getGreyTokenData({ | ||
saturation: 50, | ||
grayscale: grayscale.light, | ||
}); | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Основной фон', | ||
onDark: 'Основной фон на темном фоне', | ||
onLight: 'Основной фон на светлом фоне', | ||
inverse: 'Инвертированный основной фон', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, darkSubGroup: 'dark', lightSubGroup: 'light', comment }); | ||
}; |
25 changes: 25 additions & 0 deletions
25
...ma-theme-builder/src/builder/themeTokenGetters/background/getBackgroundSecondaryTokens.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getBackgroundSecondaryTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Вторичный фон', | ||
onDark: 'Вторичный фон на темном фоне', | ||
onLight: 'Вторичный фон на светлом фоне', | ||
inverse: 'Инвертированный вторичный фон', | ||
}; | ||
|
||
return tokensCreator({ | ||
darkValue, | ||
lightValue, | ||
darkSubGroup: 'dark', | ||
lightSubGroup: 'light', | ||
comment, | ||
enabledAll: false, | ||
}); | ||
}; |
25 changes: 25 additions & 0 deletions
25
...sma-theme-builder/src/builder/themeTokenGetters/background/getBackgroundTertiaryTokens.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getBackgroundTertiaryTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Третичный фон', | ||
onDark: 'Третичный фон на темном фоне', | ||
onLight: 'Третичный фон на светлом фоне', | ||
inverse: 'Инвертированный третичный фон', | ||
}; | ||
|
||
return tokensCreator({ | ||
darkValue, | ||
lightValue, | ||
darkSubGroup: 'dark', | ||
lightSubGroup: 'light', | ||
comment, | ||
enabledAll: false, | ||
}); | ||
}; |
File renamed without changes.
51 changes: 0 additions & 51 deletions
51
...sma-theme-builder/src/builder/themeTokenGetters/backgrounds/getBackgroundPrimaryTokens.ts
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
...a-theme-builder/src/builder/themeTokenGetters/backgrounds/getBackgroundSecondaryTokens.ts
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
...ma-theme-builder/src/builder/themeTokenGetters/backgrounds/getBackgroundTertiaryTokens.ts
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
.../builder/themeTokenGetters/controlsSurfacesTokenGetters/getSurfaceAccentGradientTokens.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
интересный нейминиг
то primary / secondary
то _ / minor
=/