-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plasma-theme-builder): Add tokens creators for
outline
group
- Loading branch information
1 parent
5f2d873
commit a626878
Showing
34 changed files
with
678 additions
and
0 deletions.
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
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
18 changes: 18 additions & 0 deletions
18
...sma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineAccentGradientTokens.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,18 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineAccentGradientTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Акцентный цвет обводки с градиентом', | ||
onDark: 'Акцентный цвет обводки с градиентом на темном фоне', | ||
onLight: 'Акцентный цвет обводки с градиентом на светлом фоне', | ||
inverse: 'Инвертированный акцентный цвет обводки с градиентом', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment, enabledAll: false }); | ||
}; |
18 changes: 18 additions & 0 deletions
18
...heme-builder/src/builder/themeTokenGetters/outline/getOutlineAccentMinorGradientTokens.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,18 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineAccentMinorGradientTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Акцентный минорный цвет обводки с градиентом', | ||
onDark: 'Акцентный минорный цвет обводки с градиентом на темном фоне', | ||
onLight: 'Акцентный минорный цвет обводки с градиентом на светлом фоне', | ||
inverse: 'Инвертированный акцентный минорный цвет обводки с градиентом', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment, enabledAll: false }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineAccentMinorTokens.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,17 @@ | ||
import type { TokensByType, ThemeConfig } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator, updateColorSaturation } from '../../../utils'; | ||
|
||
export const getOutlineAccentMinorTokens = (config: ThemeConfig) => { | ||
const darkValue = updateColorSaturation(config.accentColor.dark, 850); | ||
const lightValue = updateColorSaturation(config.accentColor.light, 250); | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Акцентный минорный непрозрачный цвет обводки', | ||
onDark: 'Акцентный минорный непрозрачный цвет обводки на темном фоне', | ||
onLight: 'Акцентный минорный непрозрачный цвет обводки на светлом фоне', | ||
inverse: 'Инвертированный акцентный минорный непрозрачный цвет обводки', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
website/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineAccentTokens.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,17 @@ | ||
import type { ThemeConfig, TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineAccentTokens = (config: ThemeConfig) => { | ||
const darkValue = config.accentColor.dark; | ||
const lightValue = config.accentColor.light; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Акцентный цвет обводки', | ||
onDark: 'Акцентный цвет обводки на темном фоне', | ||
onLight: 'Акцентный цвет обводки на светлом фоне', | ||
inverse: 'Инвертированный акцентный цвет обводки', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
18 changes: 18 additions & 0 deletions
18
website/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineClearTokens.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,18 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineClearTokens = () => { | ||
const darkValue = baseColors.clear.value; | ||
const lightValue = baseColors.clear.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Бесцветная обводка', | ||
onDark: 'Бесцветная обводка на темном фоне', | ||
onLight: 'Бесцветная обводка на светлом фоне', | ||
inverse: 'Инвертированная бесцветная обводка', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...e/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineInfoMinorTokens.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,17 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineInfoMinorTokens = () => { | ||
const darkValue = '[general.blue.850]'; | ||
const lightValue = '[general.blue.250]'; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Минорный цвет обводки информация', | ||
onDark: 'Минорный цвет обводки информация на темном фоне', | ||
onLight: 'Минорный цвет обводки информация на светлом фоне', | ||
inverse: 'Инвертированный минорный цвет обводки информация', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
website/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineInfoTokens.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,17 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineInfoTokens = () => { | ||
const darkValue = '[general.blue.500]'; | ||
const lightValue = '[general.blue.600]'; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Цвет обводки информация', | ||
onDark: 'Цвет обводки информация на темном фоне', | ||
onLight: 'Цвет обводки информация на светлом фоне', | ||
inverse: 'Инвертированный цвет обводки информация', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...asma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineNegativeMinorTokens.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,17 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineNegativeMinorTokens = () => { | ||
const darkValue = '[general.red.850]'; | ||
const lightValue = '[general.red.250]'; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Минорный цвет обводки ошибка', | ||
onDark: 'Минорный цвет обводки ошибка на темном фоне', | ||
onLight: 'Минорный цвет обводки ошибка на светлом фоне', | ||
inverse: 'Инвертированный минорный цвет обводки ошибка', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...te/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineNegativeTokens.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,17 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineNegativeTokens = () => { | ||
const darkValue = '[general.red.500]'; | ||
const lightValue = '[general.red.600]'; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Цвет обводки ошибка', | ||
onDark: 'Цвет обводки ошибка на темном фоне', | ||
onLight: 'Цвет обводки ошибка на светлом фоне', | ||
inverse: 'Инвертированный цвет обводки ошибка', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...asma-theme-builder/src/builder/themeTokenGetters/outline/getOutlinePositiveMinorTokens.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,17 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlinePositiveMinorTokens = () => { | ||
const darkValue = '[general.green.850]'; | ||
const lightValue = '[general.green.250]'; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Минорный цвет обводки успех', | ||
onDark: 'Минорный цвет обводки успех на темном фоне', | ||
onLight: 'Минорный цвет обводки успех на светлом фоне', | ||
inverse: 'Инвертированный минорный цвет обводки успех', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...te/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlinePositiveTokens.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,17 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlinePositiveTokens = () => { | ||
const darkValue = '[general.green.500]'; | ||
const lightValue = '[general.green.600]'; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Цвет обводки успех', | ||
onDark: 'Цвет обводки успех на темном фоне', | ||
onLight: 'Цвет обводки успех на светлом фоне', | ||
inverse: 'Инвертированный цвет обводки успех', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
18 changes: 18 additions & 0 deletions
18
...asma-theme-builder/src/builder/themeTokenGetters/outline/getOutlinePromoGradientTokens.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,18 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlinePromoGradientTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Промо цвет обводки с градиентом', | ||
onDark: 'Промо цвет обводки с градиентом на темном фоне', | ||
onLight: 'Промо цвет обводки с градиентом на светлом фоне', | ||
inverse: 'Инвертированный промо цвет обводки с градиентом', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment, enabledAll: false }); | ||
}; |
18 changes: 18 additions & 0 deletions
18
...theme-builder/src/builder/themeTokenGetters/outline/getOutlinePromoMinorGradientTokens.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,18 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlinePromoMinorGradientTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Минорный промо цвет обводки с градиентом', | ||
onDark: 'Минорный промо цвет обводки с градиентом на темном фоне', | ||
onLight: 'Минорный промо цвет обводки с градиентом на светлом фоне', | ||
inverse: 'Инвертированный минорный промо цвет обводки с градиентом', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment, enabledAll: false }); | ||
}; |
18 changes: 18 additions & 0 deletions
18
.../plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlinePromoMinorTokens.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,18 @@ | ||
import type { TokensByType, ThemeConfig } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
import { baseColors } from '../../../types'; | ||
|
||
export const getOutlinePromoMinorTokens = (config: ThemeConfig) => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Минорный промо цвет обводки', | ||
onDark: 'Минорный промо цвет обводки на темном фоне', | ||
onLight: 'Минорный промо цвет обводки на светлом фоне', | ||
inverse: 'Инвертированный минорный промо цвет обводки', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment, enabledAll: false }); | ||
}; |
18 changes: 18 additions & 0 deletions
18
website/plasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlinePromoTokens.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,18 @@ | ||
import type { TokensByType } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { baseColors } from '../../../types'; | ||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlinePromoTokens = () => { | ||
const darkValue = baseColors.white.value; | ||
const lightValue = baseColors.white.value; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Промо цвет обводки', | ||
onDark: 'Промо цвет обводки на темном фоне', | ||
onLight: 'Промо цвет обводки на светлом фоне', | ||
inverse: 'Инвертированный промо цвет обводки', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment, enabledAll: false }); | ||
}; |
17 changes: 17 additions & 0 deletions
17
...lasma-theme-builder/src/builder/themeTokenGetters/outline/getOutlineSolidPrimaryTokens.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,17 @@ | ||
import type { TokensByType, ThemeConfig } from '@salutejs/plasma-tokens-utils'; | ||
|
||
import { tokensCreator } from '../../../utils'; | ||
|
||
export const getOutlineSolidPrimaryTokens = (config: ThemeConfig) => { | ||
const darkValue = `[general.${config.grayscale.dark}.${900}]`; | ||
const lightValue = `[general.${config.grayscale.light}.${200}]`; | ||
|
||
const comment: Record<keyof TokensByType, string> = { | ||
default: 'Основной непрозрачный цвет обводки', | ||
onDark: 'Основной непрозрачный цвет обводки на темном фоне', | ||
onLight: 'Основной непрозрачный цвет обводки на светлом фоне', | ||
inverse: 'Инвертированный основной непрозрачный цвет обводки', | ||
}; | ||
|
||
return tokensCreator({ darkValue, lightValue, comment }); | ||
}; |
Oops, something went wrong.