@vkontakte/vkui-tokens 4.86.0 → 4.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/compilers/cssVars/declarations/compileBreakpointsCssVarsDeclaration.d.ts +1 -2
- package/build/compilers/cssVars/declarations/compileBreakpointsCssVarsDeclaration.js +1 -2
- package/build/compilers/cssVars/helpers/accumulateValues.js +1 -2
- package/build/compilers/index.d.ts +1 -4
- package/build/compilers/index.js +2 -5
- package/build/compilers/styles/compileStyles.js +1 -2
- package/build/compilers/styles/helpers/tokenProcessors.d.ts +0 -1
- package/build/compilers/styles/helpers/tokenProcessors.js +2 -4
- package/build/themeProcessors/extractCssVarsStrict/extractCssVarsStrict.js +1 -3
- package/build/themeProcessors/extractVarsNames/extractVarsNames.js +0 -1
- package/interfaces/general/colors/index.d.ts +3 -4
- package/interfaces/general/index.d.ts +1 -2
- package/interfaces/general/tools/utils.d.ts +1 -2
- package/interfaces/themes/workSpaceChats/index.d.ts +155 -0
- package/interfaces/themes/workSpaceChats/index.js +1 -0
- package/interfaces/themes/workSpaceChatsDark/index.d.ts +7 -0
- package/interfaces/themes/workSpaceChatsDark/index.js +1 -0
- package/package.json +26 -51
- package/themeDescriptions/base/vk.d.ts +0 -1
- package/themeDescriptions/base/vk.js +1 -2
- package/themes/workSpaceChats/cssVars/declarations/index.css +1817 -0
- package/themes/workSpaceChats/cssVars/declarations/noColors.css +715 -0
- package/themes/workSpaceChats/cssVars/declarations/noSizes.css +564 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyAdaptiveGroups.css +164 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyColors.css +518 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyColors.js +1 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyMedia.css +420 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyVariables.css +865 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyVariables.js +1 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyVariablesLocal.css +865 -0
- package/themes/workSpaceChats/cssVars/declarations/onlyVariablesLocalIncremental.css +865 -0
- package/themes/workSpaceChats/cssVars/theme/fallbacks/index.css +1232 -0
- package/themes/workSpaceChats/cssVars/theme/fallbacks/index.less +963 -0
- package/themes/workSpaceChats/cssVars/theme/fallbacks/index.pcss +956 -0
- package/themes/workSpaceChats/cssVars/theme/fallbacks/index.scss +1235 -0
- package/themes/workSpaceChats/cssVars/theme/fallbacks/index.styl +963 -0
- package/themes/workSpaceChats/cssVars/theme/index.d.ts +4 -0
- package/themes/workSpaceChats/cssVars/theme/index.js +1 -0
- package/themes/workSpaceChats/cssVars/theme/index.json +5179 -0
- package/themes/workSpaceChats/docs.json +4648 -0
- package/themes/workSpaceChats/index.css +1232 -0
- package/themes/workSpaceChats/index.d.ts +4 -0
- package/themes/workSpaceChats/index.js +1 -0
- package/themes/workSpaceChats/index.json +1590 -0
- package/themes/workSpaceChats/index.less +963 -0
- package/themes/workSpaceChats/index.pcss +956 -0
- package/themes/workSpaceChats/index.scss +1235 -0
- package/themes/workSpaceChats/index.styl +963 -0
- package/themes/workSpaceChats/struct.json +1742 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/index.css +1817 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/noColors.css +715 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/noSizes.css +564 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyAdaptiveGroups.css +164 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyColors.css +518 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyColors.d.ts +3 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyColors.js +1 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyMedia.css +420 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyVariables.css +865 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyVariables.d.ts +3 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyVariables.js +1 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyVariablesLocal.css +865 -0
- package/themes/workSpaceChatsDark/cssVars/declarations/onlyVariablesLocalIncremental.css +865 -0
- package/themes/workSpaceChatsDark/cssVars/theme/fallbacks/index.css +1232 -0
- package/themes/workSpaceChatsDark/cssVars/theme/fallbacks/index.less +963 -0
- package/themes/workSpaceChatsDark/cssVars/theme/fallbacks/index.pcss +956 -0
- package/themes/workSpaceChatsDark/cssVars/theme/fallbacks/index.scss +1235 -0
- package/themes/workSpaceChatsDark/cssVars/theme/fallbacks/index.styl +963 -0
- package/themes/workSpaceChatsDark/cssVars/theme/index.d.ts +4 -0
- package/themes/workSpaceChatsDark/cssVars/theme/index.js +1 -0
- package/themes/workSpaceChatsDark/cssVars/theme/index.json +5179 -0
- package/themes/workSpaceChatsDark/docs.json +4648 -0
- package/themes/workSpaceChatsDark/index.css +1232 -0
- package/themes/workSpaceChatsDark/index.d.ts +4 -0
- package/themes/workSpaceChatsDark/index.js +1 -0
- package/themes/workSpaceChatsDark/index.json +1590 -0
- package/themes/workSpaceChatsDark/index.less +963 -0
- package/themes/workSpaceChatsDark/index.pcss +956 -0
- package/themes/workSpaceChatsDark/index.scss +1235 -0
- package/themes/workSpaceChatsDark/index.styl +963 -0
- package/themes/workSpaceChatsDark/struct.json +1742 -0
|
@@ -4,5 +4,4 @@ export type DeclarationType = 'default' | 'onlyRoot' | 'modern' | 'onlyColors';
|
|
|
4
4
|
* Компилирует медиаквери переходы между переменными
|
|
5
5
|
* @param sourceTheme
|
|
6
6
|
* @param type
|
|
7
|
-
*/
|
|
8
|
-
export declare function compileBreakpointsCssVarsDeclaration<T = Theme>(sourceTheme: ThemeCssVarsWide<T, Extract<keyof T, 'breakpoints'>>, type?: DeclarationType): string | null;
|
|
7
|
+
*/ export declare function compileBreakpointsCssVarsDeclaration<T = Theme>(sourceTheme: ThemeCssVarsWide<T, Extract<keyof T, 'breakpoints'>>, type?: DeclarationType): string | null;
|
|
@@ -2,6 +2,5 @@ import{_ as r}from"@swc/helpers/_/_sliced_to_array";import{_ as e}from"@swc/help
|
|
|
2
2
|
* Компилирует медиаквери переходы между переменными
|
|
3
3
|
* @param sourceTheme
|
|
4
4
|
* @param type
|
|
5
|
-
|
|
6
|
-
export function compileBreakpointsCssVarsDeclaration(e){var m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";if(!("breakpoints"in e))return null;var v=e.breakpoints,h=u(e),g=p({theme:"onlyColors"===m?l(e):e}).adaptiveValues,j="";if(!Object.keys(g.auto).length)return null;// только regular и auto
|
|
5
|
+
*/export function compileBreakpointsCssVarsDeclaration(e){var m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";if(!("breakpoints"in e))return null;var v=e.breakpoints,h=u(e),g=p({theme:"onlyColors"===m?l(e):e}).adaptiveValues,j="";if(!Object.keys(g.auto).length)return null;// только regular и auto
|
|
7
6
|
if(j+=o(t(),f({valuesObject:g.auto,prefix:" "})),2===Object.keys(g).length)return j;var d="",_="";return Object.entries(g).sort(function(e){return"regular"===r(e,1)[0]?1:-1}).forEach(function(e){var t=r(e,2),l=t[0],u=t[1],p="regular"===l;if("auto"!==l){var m=i(v,l);_+=o(n(),h["width".concat(c(m))],a(p?d:f({valuesObject:u,prefix:"",callback:function(r){if(!p){var e=r.replace(new RegExp("".concat(l,"$")),"regular"),t=g.regular[e];t&&(d+="".concat(e,": ").concat(t,";\n"))}}})),s(m),a(p?d:f({valuesObject:u,prefix:""}))),_+="\n\n"}}),o("".concat(j,"\n\n").concat(_))}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{_ as a}from"@swc/helpers/_/_sliced_to_array";import{_ as e}from"@swc/helpers/_/_type_of";import{adaptiveKeys as t}from"../../../../interfaces/general/tools/index.js";var n=function(a){var t=a.toValue,i=a.fromValue;if((void 0===t?"undefined":e(t))==="object"&&"name"in t&&"string"==typeof t.name){t.originalValue=i.originalValue;return}Object.keys(t).forEach(function(a){n({toValue:t[a],fromValue:i[a]})})},i=function(a){var e=a.destination,t=a.value,n=a.autoValue,i=a.singleBreakpoint;n&&"name"in n?e[n.name]=i?t.originalValue:"var(".concat(t.name,")"):void 0!==t.originalValue&&(e[t.name]=t.originalValue)},o=function(u){var l=u.destination,r=u.value,s=u.adaptiveDestination,v=u.autoValue,c=u.manyAdaptiveStates;(void 0===r?"undefined":e(r))==="object"&&"name"in r&&"string"==typeof r.name?i({destination:l,value:r,autoValue:v,singleBreakpoint:!c}):Object.entries(r).forEach(function(e){var i=a(e,2),u=i[0],d=i[1];if(t.includes(u)&&(s[u]
|
|
2
|
-
(s[u]={}),o({destination:s[u],value:d,autoValue:r.auto,manyAdaptiveStates:Object.keys(r).length>2})),"auto"===u){var f=Object.keys(r).length>2;f||n({toValue:d,fromValue:r.regular}),o({destination:s.auto,value:r.regular,autoValue:d,manyAdaptiveStates:f})}o({destination:l,value:d,autoValue:null==v?void 0:v[u],manyAdaptiveStates:c})})};export function accumulateValues(a){var e=a.theme,t={},n={auto:{},regular:{}};return Object.keys(e).forEach(function(a){var i=e[a];"breakpoints"!==a&&"themeType"!==a&&o({destination:t,value:i,adaptiveDestination:n,manyAdaptiveStates:!1})}),{flatValues:t,adaptiveValues:n}}
|
|
1
|
+
import{_ as a}from"@swc/helpers/_/_sliced_to_array";import{_ as e}from"@swc/helpers/_/_type_of";import{adaptiveKeys as t}from"../../../../interfaces/general/tools/index.js";var n=function(a){var t=a.toValue,i=a.fromValue;if((void 0===t?"undefined":e(t))==="object"&&"name"in t&&"string"==typeof t.name){t.originalValue=i.originalValue;return}Object.keys(t).forEach(function(a){n({toValue:t[a],fromValue:i[a]})})},i=function(a){var e=a.destination,t=a.value,n=a.autoValue,i=a.singleBreakpoint;n&&"name"in n?e[n.name]=i?t.originalValue:"var(".concat(t.name,")"):void 0!==t.originalValue&&(e[t.name]=t.originalValue)},o=function(u){var l=u.destination,r=u.value,s=u.adaptiveDestination,v=u.autoValue,c=u.manyAdaptiveStates;(void 0===r?"undefined":e(r))==="object"&&"name"in r&&"string"==typeof r.name?i({destination:l,value:r,autoValue:v,singleBreakpoint:!c}):Object.entries(r).forEach(function(e){var i=a(e,2),u=i[0],d=i[1];if(t.includes(u)&&(s[u]||(s[u]={}),o({destination:s[u],value:d,autoValue:r.auto,manyAdaptiveStates:Object.keys(r).length>2})),"auto"===u){var f=Object.keys(r).length>2;f||n({toValue:d,fromValue:r.regular}),o({destination:s.auto,value:r.regular,autoValue:d,manyAdaptiveStates:f})}o({destination:l,value:d,autoValue:null==v?void 0:v[u],manyAdaptiveStates:c})})};export function accumulateValues(a){var e=a.theme,t={},n={auto:{},regular:{}};return Object.keys(e).forEach(function(a){var i=e[a];"breakpoints"!==a&&"themeType"!==a&&o({destination:t,value:i,adaptiveDestination:n,manyAdaptiveStates:!1})}),{flatValues:t,adaptiveValues:n}}
|
|
@@ -2,12 +2,9 @@ import type { PixelifyTheme, SpecialTokens, Theme, ThemeCssVarsWide } from "../.
|
|
|
2
2
|
type ThemeBuildType = 'root' | 'subtheme' | 'flat' | 'cssVars' | 'cssVarsPseudoRoot';
|
|
3
3
|
declare function writeStructJsonFile<T = Theme>(themePath: string, theme: T, _?: ThemeBuildType): void;
|
|
4
4
|
declare function writeJsonFile<T = Theme>(themePath: string, theme: T, _?: ThemeBuildType): void;
|
|
5
|
-
// eslint-disable-next-line max-params
|
|
6
5
|
declare function writeTsFile<T extends SpecialTokens = Theme>(themePath: string, theme: T, type: ThemeBuildType, themeName?: string): void;
|
|
7
6
|
declare function writeStyleFiles<PT extends PixelifyTheme = PixelifyTheme>(themePath: string, theme: PT): void;
|
|
8
|
-
|
|
9
|
-
declare function writeCssVarsSourceFile<PT extends PixelifyTheme = PixelifyTheme>(themePath: string, theme: PT, // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
10
|
-
cssVarsTheme: any, themeBase?: PT): void;
|
|
7
|
+
declare function writeCssVarsSourceFile<PT extends PixelifyTheme = PixelifyTheme>(themePath: string, theme: PT, cssVarsTheme: any, themeBase?: PT): void;
|
|
11
8
|
declare function writeCssVarsSourceMediaFile<T = ThemeCssVarsWide>(themePath: string, theme: T): void;
|
|
12
9
|
declare function writeCssVarsJsUtils<T = Theme>(themePath: string, theme: ThemeCssVarsWide<T>): void;
|
|
13
10
|
declare function writeDocsFiles<T extends SpecialTokens = Theme>(themePath: string, theme: T): void;
|
package/build/compilers/index.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import e from"node:path";import o from"fs-extra";import{compileGetDeclarationString as s}from"./cssVars/jsUtils/compileGetDeclarationString.js";import{compileDocsJSON as l}from"./docs/compileDocsJSON.js";import{compileJSON as c}from"./json/compileJSON.js";import{compileStyles as r}from"./styles/compileStyles.js";import{compileTypeScript as a}from"./ts/compileTypeScript.js";import{capitalize as t}from"../helpers/capitalize.js";import{compileBreakpointsCssVarsDeclaration as n}from"./cssVars/declarations/compileBreakpointsCssVarsDeclaration.js";import{compileStructJSON as i}from"./structJSON/compileStructJSON.js";var m=[{mode:"default",fileName:"index.css"},{mode:"onlyVariables",fileName:"onlyVariables.css"},{mode:"onlyVariablesLocal",fileName:"onlyVariablesLocal.css"},{mode:"onlyVariablesLocalIncremental",fileName:"onlyVariablesLocalIncremental.css"},{mode:"onlyColors",fileName:"onlyColors.css"},{mode:"onlyAdaptiveGroups",fileName:"onlyAdaptiveGroups.css"},{mode:"noSizes",fileName:"noSizes.css"},{mode:"noColors",fileName:"noColors.css"}];function f(s,l,c){console.log("компилируем структурный json...");var r="struct.json",a=e.resolve(s,r),t=i(l);o.writeFileSync(a,t),console.log("успешно записали файл ".concat(r))}function p(s,l,r){console.log("компилируем json...");var a="index.json",t=e.resolve(s,a),n=c(l);o.writeFileSync(t,n),console.log("успешно записали файл ".concat(a))}//
|
|
2
|
-
function
|
|
3
|
-
{["css","less","styl","scss","pcss"].forEach(function(c){console.log("компилируем ".concat(c,"..."));var a="index.".concat(c),t=e.resolve(s,a),n=r(c,l);o.writeFileSync(t,n),console.log("успешно записали файл ".concat(a))})}// eslint-disable-next-line max-params
|
|
4
|
-
function y(s,l,// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
5
|
-
c,a){console.log("компилируем источники для css vars тем...");var t=!0,i=!1,f=void 0;try{for(var p,u=m[Symbol.iterator]();!(t=(p=u.next()).done);t=!0){var d,y=p.value,$=e.resolve(s,y.fileName),v=r("css",l,"default"===y.mode?"withAdaptiveGroups":y.mode,a),N="default"===y.mode?"\n\n".concat(null!=(d=n(c))?d:""):"";if(N.includes("null"))throw console.error(y),Error("NULL");var g=v+N;o.writeFileSync($,g),console.log("успешно записали файл ".concat(y.fileName))}}catch(e){i=!0,f=e}finally{try{t||null==u.return||u.return()}finally{if(i)throw f}}}function $(s,l){console.log("компилируем медиа переменные для css vars тем...");var c="onlyMedia.css",r=e.resolve(s,c),a=n(l);null!==a&&(o.writeFileSync(r,a),console.log("успешно записали файл ".concat(c)))}function v(l,c){console.log("компилируем утилиты для js для css vars тем..."),[{mode:"default",fileName:"onlyVariables.ts"},{mode:"onlyColors",fileName:"onlyColors.ts"}].forEach(function(r){var a=r.mode,t=r.fileName,n=e.resolve(l,t),i=s(c,a);o.writeFileSync(n,i),console.log("успешно записали файл ".concat(t))})}function N(s,c){console.log("компилируем документацию...");var r="docs.json",a=e.resolve(s,r),t=l(c);o.writeFileSync(a,t),console.log("успешно записали файл ".concat(r))}export{v as writeCssVarsJsUtils,y as writeCssVarsSourceFile,$ as writeCssVarsSourceMediaFile,N as writeDocsFiles,p as writeJsonFile,f as writeStructJsonFile,d as writeStyleFiles,u as writeTsFile};
|
|
1
|
+
import e from"node:path";import o from"fs-extra";import{compileGetDeclarationString as s}from"./cssVars/jsUtils/compileGetDeclarationString.js";import{compileDocsJSON as l}from"./docs/compileDocsJSON.js";import{compileJSON as c}from"./json/compileJSON.js";import{compileStyles as r}from"./styles/compileStyles.js";import{compileTypeScript as a}from"./ts/compileTypeScript.js";import{capitalize as t}from"../helpers/capitalize.js";import{compileBreakpointsCssVarsDeclaration as n}from"./cssVars/declarations/compileBreakpointsCssVarsDeclaration.js";import{compileStructJSON as i}from"./structJSON/compileStructJSON.js";var m=[{mode:"default",fileName:"index.css"},{mode:"onlyVariables",fileName:"onlyVariables.css"},{mode:"onlyVariablesLocal",fileName:"onlyVariablesLocal.css"},{mode:"onlyVariablesLocalIncremental",fileName:"onlyVariablesLocalIncremental.css"},{mode:"onlyColors",fileName:"onlyColors.css"},{mode:"onlyAdaptiveGroups",fileName:"onlyAdaptiveGroups.css"},{mode:"noSizes",fileName:"noSizes.css"},{mode:"noColors",fileName:"noColors.css"}];function f(s,l,c){console.log("компилируем структурный json...");var r="struct.json",a=e.resolve(s,r),t=i(l);o.writeFileSync(a,t),console.log("успешно записали файл ".concat(r))}function p(s,l,r){console.log("компилируем json...");var a="index.json",t=e.resolve(s,a),n=c(l);o.writeFileSync(t,n),console.log("успешно записали файл ".concat(a))}function u(s,l,c,r){console.log("компилируем ts...");var n="index.ts",i=e.resolve(s,n),m=null,f=a(l);switch(c){case"flat":m=f.replace(/\$\$InterfaceName\$\$/g,"Theme".concat(t(l.themeName),"Flat")).replace(/\$\$InterfaceURL\$\$/g,"../../interfaces/themes/".concat(l.themeName));break;case"subtheme":m=f.replace(/\$\$InterfaceName\$\$/g,"SubTheme".concat(t(l.parentThemeName))).replace(/\$\$InterfaceURL\$\$/g,"../../interfaces/themes/".concat(l.parentThemeName,"/subthemes"));break;case"cssVars":m=f.replace(/\$\$InterfaceName\$\$/g,"Theme".concat(t(r),"CssVars")).replace(/\$\$InterfaceURL\$\$/g,"../../../../interfaces/themes/".concat(r));break;default:m=f.replace(/\$\$InterfaceName\$\$/g,"Theme".concat(t(l.themeName))).replace(/\$\$InterfaceURL\$\$/g,"../../interfaces/themes/".concat(l.themeName))}o.writeFileSync(i,m),console.log("успешно записали файл ".concat(n))}function d(s,l)// type: Exclude<ThemeBuildType, 'cssVars' | 'cssVarsPseudoRoot'>,
|
|
2
|
+
{["css","less","styl","scss","pcss"].forEach(function(c){console.log("компилируем ".concat(c,"..."));var a="index.".concat(c),t=e.resolve(s,a),n=r(c,l);o.writeFileSync(t,n),console.log("успешно записали файл ".concat(a))})}function y(s,l,c,a){console.log("компилируем источники для css vars тем...");var t=!0,i=!1,f=void 0;try{for(var p,u=m[Symbol.iterator]();!(t=(p=u.next()).done);t=!0){var d,y=p.value,$=e.resolve(s,y.fileName),v=r("css",l,"default"===y.mode?"withAdaptiveGroups":y.mode,a),N="default"===y.mode?"\n\n".concat(null!=(d=n(c))?d:""):"";if(N.includes("null"))throw console.error(y),Error("NULL");var g=v+N;o.writeFileSync($,g),console.log("успешно записали файл ".concat(y.fileName))}}catch(e){i=!0,f=e}finally{try{t||null==u.return||u.return()}finally{if(i)throw f}}}function $(s,l){console.log("компилируем медиа переменные для css vars тем...");var c="onlyMedia.css",r=e.resolve(s,c),a=n(l);null!==a&&(o.writeFileSync(r,a),console.log("успешно записали файл ".concat(c)))}function v(l,c){console.log("компилируем утилиты для js для css vars тем..."),[{mode:"default",fileName:"onlyVariables.ts"},{mode:"onlyColors",fileName:"onlyColors.ts"}].forEach(function(r){var a=r.mode,t=r.fileName,n=e.resolve(l,t),i=s(c,a);o.writeFileSync(n,i),console.log("успешно записали файл ".concat(t))})}function N(s,c){console.log("компилируем документацию...");var r="docs.json",a=e.resolve(s,r),t=l(c);o.writeFileSync(a,t),console.log("успешно записали файл ".concat(r))}export{v as writeCssVarsJsUtils,y as writeCssVarsSourceFile,$ as writeCssVarsSourceMediaFile,N as writeDocsFiles,p as writeJsonFile,f as writeStructJsonFile,d as writeStyleFiles,u as writeTsFile};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import{_ as e}from"@swc/helpers/_/_tagged_template_literal";function r(){var o=e(["\n "," {\n ","}\n "]);return r=function(){return o},o}import"css.escape";import{deepStrictEqual as o}from"node:assert";import{stripIndent as t}from"common-tags";import{getAllButColors as n}from"../../helpers/getAllButColors.js";import{getAllButSizes as i}from"../../helpers/getAllButSizes.js";import{getOnlyColors as s}from"../../helpers/getOnlyColors.js";import{unCamelcasify as a}from"../../helpers/unCamelcasify.js";import{customMediaDeclaration as c,EStyleTypes as l,processGroupToken as f,varDeclarations as m,variablesStatementDeclaration as p}from"./helpers/tokenProcessors.js";import{isAdaptiveFlatToken as u,isColor as v,isCustomMediaToken as h,isGroupToken as S,isString as g}from"./helpers/tokenRecognition.js";export var serviceKeys=["breakpoints","prefix","themeType"];function d(e){return e===l.CSS||e===l.PCSS}export function getPrefix(e,r){var o=r.prefix?"".concat(r.prefix,"-"):"";return d(e)&&o&&(o+="-"),e!==l.CSS||o||(o="vkui--"),o}export function getRootSelector(e,r){var o;return r.toLowerCase().includes("local")?".".concat(getPrefix(l.CSS,e)).concat(null!=(o=e.themeNameBase)?o:e.themeName,"--").concat(e.colorsScheme):":root"}/**
|
|
2
2
|
* Компилирует строку со стилями (в разных форматах), на основе темы
|
|
3
|
-
*/export var compileStyles=function(e,l)
|
|
4
|
-
{var y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",C=arguments.length>3?arguments[3]:void 0,k=d(e),x=getPrefix(e,l),j=getRootSelector(l,y),b=y.toLowerCase().includes("incremental"),_=m[e],w=p[e],B=c[e],P="",N="",O="",A=l;switch(y){case"onlyColors":A=s(A);break;case"noSizes":A=i(A,A.themeNameBase);break;case"noColors":A=n(A,A.themeNameBase)}return(Object.keys(A).forEach(function(r){// пропускаем служебные ключи
|
|
3
|
+
*/export var compileStyles=function(e,l){var y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",C=arguments.length>3?arguments[3]:void 0,k=d(e),x=getPrefix(e,l),j=getRootSelector(l,y),b=y.toLowerCase().includes("incremental"),_=m[e],w=p[e],B=c[e],P="",N="",O="",A=l;switch(y){case"onlyColors":A=s(A);break;case"noSizes":A=i(A,A.themeNameBase);break;case"noColors":A=n(A,A.themeNameBase)}return(Object.keys(A).forEach(function(r){// пропускаем служебные ключи
|
|
5
4
|
if(!serviceKeys.includes(r)){var t=A[r];// в инкрементальном режиме пропускаем токены, чьи значения совпадают со значениями из themeBase
|
|
6
5
|
if(!(b&&C&&function(e,r){try{return o(e,r),!0}catch(e){return!1}}(t,C[r]))){// если переменная — строка (например, имя темы)
|
|
7
6
|
if(g(t,r)){N+=w(_(r,x),"'".concat(CSS.escape(t),"'"));return}// если переменная — цвет
|
|
@@ -22,7 +22,6 @@ interface ProcessGroupTokenParams {
|
|
|
22
22
|
prefix: string;
|
|
23
23
|
adaptiveMode?: 'none' | 'onlyAdaptiveGroups' | 'withAdaptiveGroups';
|
|
24
24
|
}
|
|
25
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity,max-lines-per-function
|
|
26
25
|
export declare function processGroupToken({ format, token, key, prefix, adaptiveMode }: ProcessGroupTokenParams): {
|
|
27
26
|
variables: string;
|
|
28
27
|
groupTokens: string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import{_ as n}from"@swc/helpers/_/_define_property";import{_ as t}from"@swc/helpers/_/_object_spread";import{_ as e}from"@swc/helpers/_/_sliced_to_array";import{_ as a}from"@swc/helpers/_/_tagged_template_literal";import{_ as c}from"@swc/helpers/_/_type_of";function o(){var n=a(["\n @mixin media-",""," {\n @media "," { @content; }\n }"]);return o=function(){return n},n}function r(){var n=a(["\n .media-","","(@content) {\n @media "," { @content; }\n }"]);return r=function(){return n},n}function i(){var n=a(["\n media-","","(content) {\n @media "," { content }\n }"]);return i=function(){return n},n}import{stripIndent as s}from"common-tags";import{unCamelcasify as l}from"../../../helpers/unCamelcasify.js";export var EStyleTypes={CSS:"css",SCSS:"scss",PCSS:"pcss",LESS:"less",STYL:"styl"};export var varDeclarations=(n(v={},EStyleTypes.CSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t).concat(l(n,"_"))}),n(v,EStyleTypes.PCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return"--".concat(t).concat(l(n))}),n(v,EStyleTypes.SCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"$".concat(t).concat(l(n))}),n(v,EStyleTypes.LESS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"@".concat(t).concat(l(n))}),n(v,EStyleTypes.STYL,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"$".concat(t).concat(l(n))}),v);export var variablesStatementDeclaration=(n(u={},EStyleTypes.CSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return" ".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.PCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return" ".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.SCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.LESS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.STYL,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(n).concat(e," = ").concat(t,";\n")}),u);export var mixinDeclaration=(n(S={},EStyleTypes.SCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"@mixin ".concat(t).concat(l(n)).concat(e,"()")}),n(S,EStyleTypes.CSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return".".concat(t).concat(l(n,"_")).concat(e)}),n(S,EStyleTypes.PCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"%".concat(t).concat(l(n)).concat(e)}),n(S,EStyleTypes.LESS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return".".concat(t).concat(l(n)).concat(e)}),n(S,EStyleTypes.STYL,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(t).concat(l(n)).concat(e,"()")}),S);export var customMediaDeclaration=(n(d={},EStyleTypes.CSS,null),n(d,EStyleTypes.PCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"@custom-media --".concat(l(n)).concat(e," ").concat(t,";\n")}),n(d,EStyleTypes.SCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(s(o(),l(n),e,t),"\n")}),n(d,EStyleTypes.LESS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(s(r(),l(n),e,t),"\n")}),n(d,EStyleTypes.STYL,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(s(i(),l(n),e,t),"\n")}),d);var v,u,S,d,p=function(n,t){var e,a=t;return(null==(e=a.includes)?void 0:e.call(a,","))&&(a='"'.concat(a,'"'))," '".concat(n,"': ").concat(a,",\n")},f=function(n){var t=n.subKey,a=n.subValue,c=n.token,o=n.key,r=n.prefix,i=n.needUpdateVariables,s=n.needMap,v=n.needAddAdaptiveClasses,u=n.addedAdaptiveGroup,S=n.adaptivityState,d=n.onVariables,f=n.onAdaptiveGroup,y=n.onMap;Object.entries(a).forEach(function(n){var a=e(n,2),g=a[0],m=a[1];if(i){var h="".concat(varDeclarations.css(o,r),"--").concat(l(t,"_"),"--").concat(l(g,"_"));if(void 0!==S){var E,_=(null==(E
|
|
2
|
-
|
|
3
|
-
if(v&&!u){var T="".concat(varDeclarations.css(o,r),"--").concat(l(t,"_"),"--").concat(l(g,"_"));f(" ".concat(l(t),"--").concat(l(g),": var(").concat(T,");\n"))}s&&y(p("".concat(t,".").concat(g),String(m)))})};// eslint-disable-next-line sonarjs/cognitive-complexity,max-lines-per-function
|
|
4
|
-
export function processGroupToken(n){var a=n.format,o=n.token,r=n.key,i=n.prefix,s=n.adaptiveMode,v=void 0===s?"none":s,u=a===EStyleTypes.CSS,S=a===EStyleTypes.SCSS,d=("withAdaptiveGroups"===v||"onlyAdaptiveGroups"===v)&&a===EStyleTypes.CSS,y=function(n,t,e){var a=" ".concat(l(n),": ").concat(t,";\n");return u&&(a+=" ".concat(l(n),": var(").concat(e,", ").concat(t,");\n")),a},g="",m="",h="",E=!1,_="";return(// адаптивная группа
|
|
1
|
+
import{_ as n}from"@swc/helpers/_/_define_property";import{_ as t}from"@swc/helpers/_/_object_spread";import{_ as e}from"@swc/helpers/_/_sliced_to_array";import{_ as a}from"@swc/helpers/_/_tagged_template_literal";import{_ as c}from"@swc/helpers/_/_type_of";function o(){var n=a(["\n @mixin media-",""," {\n @media "," { @content; }\n }"]);return o=function(){return n},n}function r(){var n=a(["\n .media-","","(@content) {\n @media "," { @content; }\n }"]);return r=function(){return n},n}function i(){var n=a(["\n media-","","(content) {\n @media "," { content }\n }"]);return i=function(){return n},n}import{stripIndent as s}from"common-tags";import{unCamelcasify as l}from"../../../helpers/unCamelcasify.js";export var EStyleTypes={CSS:"css",SCSS:"scss",PCSS:"pcss",LESS:"less",STYL:"styl"};export var varDeclarations=(n(v={},EStyleTypes.CSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t).concat(l(n,"_"))}),n(v,EStyleTypes.PCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return"--".concat(t).concat(l(n))}),n(v,EStyleTypes.SCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"$".concat(t).concat(l(n))}),n(v,EStyleTypes.LESS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"@".concat(t).concat(l(n))}),n(v,EStyleTypes.STYL,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"$".concat(t).concat(l(n))}),v);export var variablesStatementDeclaration=(n(u={},EStyleTypes.CSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return" ".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.PCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return" ".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.SCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.LESS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(n).concat(e,": ").concat(t,";\n")}),n(u,EStyleTypes.STYL,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(n).concat(e," = ").concat(t,";\n")}),u);export var mixinDeclaration=(n(S={},EStyleTypes.SCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"@mixin ".concat(t).concat(l(n)).concat(e,"()")}),n(S,EStyleTypes.CSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return".".concat(t).concat(l(n,"_")).concat(e)}),n(S,EStyleTypes.PCSS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"%".concat(t).concat(l(n)).concat(e)}),n(S,EStyleTypes.LESS,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return".".concat(t).concat(l(n)).concat(e)}),n(S,EStyleTypes.STYL,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(t).concat(l(n)).concat(e,"()")}),S);export var customMediaDeclaration=(n(d={},EStyleTypes.CSS,null),n(d,EStyleTypes.PCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"@custom-media --".concat(l(n)).concat(e," ").concat(t,";\n")}),n(d,EStyleTypes.SCSS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(s(o(),l(n),e,t),"\n")}),n(d,EStyleTypes.LESS,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(s(r(),l(n),e,t),"\n")}),n(d,EStyleTypes.STYL,function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(s(i(),l(n),e,t),"\n")}),d);var v,u,S,d,p=function(n,t){var e,a=t;return(null==(e=a.includes)?void 0:e.call(a,","))&&(a='"'.concat(a,'"'))," '".concat(n,"': ").concat(a,",\n")},f=function(n){var t=n.subKey,a=n.subValue,c=n.token,o=n.key,r=n.prefix,i=n.needUpdateVariables,s=n.needMap,v=n.needAddAdaptiveClasses,u=n.addedAdaptiveGroup,S=n.adaptivityState,d=n.onVariables,f=n.onAdaptiveGroup,y=n.onMap;Object.entries(a).forEach(function(n){var a=e(n,2),g=a[0],m=a[1];if(i){var h="".concat(varDeclarations.css(o,r),"--").concat(l(t,"_"),"--").concat(l(g,"_"));if(void 0!==S){var E,_=(null==(E=c[S][t])?void 0:E[g])!==void 0;h+="--".concat(_?l(S,"_"):"regular"),_&&d(variablesStatementDeclaration.css(h,String(m)))}else d(variablesStatementDeclaration.css(h,String(m)))}// fontVariationSettings не добавляем в groupTokens (не выводим CSS-свойство)
|
|
2
|
+
if(v&&!u){var T="".concat(varDeclarations.css(o,r),"--").concat(l(t,"_"),"--").concat(l(g,"_"));f(" ".concat(l(t),"--").concat(l(g),": var(").concat(T,");\n"))}s&&y(p("".concat(t,".").concat(g),String(m)))})};export function processGroupToken(n){var a=n.format,o=n.token,r=n.key,i=n.prefix,s=n.adaptiveMode,v=void 0===s?"none":s,u=a===EStyleTypes.CSS,S=a===EStyleTypes.SCSS,d=("withAdaptiveGroups"===v||"onlyAdaptiveGroups"===v)&&a===EStyleTypes.CSS,y=function(n,t,e){var a=" ".concat(l(n),": ").concat(t,";\n");return u&&(a+=" ".concat(l(n),": var(").concat(e,", ").concat(t,");\n")),a},g="",m="",h="",E=!1,_="";return(// адаптивная группа
|
|
5
3
|
"regular"in o?(Object.keys(o).forEach(function(n){m+="".concat(mixinDeclaration[a](r,i,"--".concat(l(n)))," {\n"),d&&!E&&(h+="".concat(mixinDeclaration[a](r,i)," {\n")),S&&(_+="".concat(varDeclarations.scss(r,i),"--").concat(l(n),"--map: (\n")),Object.entries(t({},o.regular,o[n])).forEach(function(t){var a=e(t,2),s=a[0],v=a[1];// Обработка вложенных объектов (fontVariationSettings)
|
|
6
4
|
if((void 0===v?"undefined":c(v))==="object"&&null!==v)return void f({subKey:s,subValue:v,token:o,key:r,prefix:i,needUpdateVariables:u,needMap:S,needAddAdaptiveClasses:d,addedAdaptiveGroup:E,adaptivityState:n,onVariables:function(n){g+=n},onAdaptiveGroup:function(n){h+=n},onMap:function(n){_+=n}});var T="";if(u){var b=void 0!==o[n][s];T="".concat(varDeclarations.css(r,i),"--").concat(l(s,"_"),"--").concat(b?l(n,"_"):"regular"),b&&(g+=variablesStatementDeclaration.css(T,String(v)))}m+=y(s,String(v),T),d&&!E&&(h+=" ".concat(l(s),": var(").concat(T.replace(new RegExp("--(regular|".concat(n,")$")),""),");\n")),S&&(_+=p(s,String(v)))}),m+="}\n",d&&!E&&(h+="}\n",m+=h,E=!0),S&&(_+=");\n",m+=_)}),"onlyAdaptiveGroups"===v&&(m=h)):(// неадаптивная группа
|
|
7
5
|
m+="".concat(mixinDeclaration[a](r,i)," {\n"),S&&(_+="".concat(varDeclarations.scss(r,i),"--map: (\n")),Object.entries(o).forEach(function(n){var t=e(n,2),a=t[0],s=t[1];// Обработка вложенных объектов (fontVariationSettings)
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import{_ as r}from"@swc/helpers/_/_sliced_to_array";import{_ as e}from"@swc/helpers/_/_type_of";export function extractCssVarsStrict(i){var t=JSON.parse(JSON.stringify(i));return!function i(t){if((void 0===t?"undefined":e(t))==="object"){if("originalValue"in t)return void
|
|
2
|
-
delete t.originalValue;Object.entries(t).forEach(function(e){var n=r(e,2),o=n[0],s=n[1];if("themeType"===o){// eslint-disable-next-line no-param-reassign
|
|
3
|
-
t[o]="cssVars";return}i(s)})}}(t),t}
|
|
1
|
+
import{_ as r}from"@swc/helpers/_/_sliced_to_array";import{_ as e}from"@swc/helpers/_/_type_of";export function extractCssVarsStrict(i){var t=JSON.parse(JSON.stringify(i));return!function i(t){if((void 0===t?"undefined":e(t))==="object"){if("originalValue"in t)return void delete t.originalValue;Object.entries(t).forEach(function(e){var n=r(e,2),o=n[0],s=n[1];if("themeType"===o){t[o]="cssVars";return}i(s)})}}(t),t}
|
|
@@ -2,7 +2,6 @@ import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as r}from"@swc/helper
|
|
|
2
2
|
"normal"===r?"--".concat(o(t)):"--".concat(o(t),"--").concat(o(r)).concat(void 0!==i&&"auto"!==i?"--".concat(o(i)):""))}function n(e,r){return r?"var(".concat(e,", ").concat(r,")"):"var(".concat(e,")")}/**
|
|
3
3
|
* Процессор, который на основе темы, создаёт сложную структуру для CssVars темы
|
|
4
4
|
*/export function extractVarsNames(o){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=c(o),m=i(o);return function e(o){var t=o.object,i=o.mode,c=o.prefix,u=void 0===c?"vkui":c,s=o.customMedia,m=o.valueConstruct,f=void 0===m?n:m,l={};return(// todo разнести на несколько функций вместо скипа
|
|
5
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
6
5
|
Object.keys(t).forEach(function(o){var c=JSON.parse(JSON.stringify(t[o]));// не процессим некоторые свойства темы
|
|
7
6
|
if("breakpoints"===o){l[o]=c;return}if("themeType"===o){l[o]="cssVarsWide";return}if(void 0!==c){// если это адаптивная переменная
|
|
8
7
|
if((void 0===c?"undefined":a(c))==="object"&&"regular"in c){var n=Object.keys(c);// если это адаптивный объект (например шрифты)
|
|
@@ -8,12 +8,11 @@ import type { ColorsDescription, ColorsScheme } from "../index.ts";
|
|
|
8
8
|
active: Property.Color;
|
|
9
9
|
}
|
|
10
10
|
export type ColorDescriptionStatic = Property.Color | ColorWithStates;
|
|
11
|
-
|
|
12
|
-
T extends {
|
|
11
|
+
// biome-ignore format: Preserve the existing multiline recursive type definition.
|
|
12
|
+
export type ColorDescriptionCallable<T extends {
|
|
13
13
|
[key in keyof T]: ColorDescription;
|
|
14
14
|
} = ColorsDescriptionStruct> = (theme: Partial<ColorsScheme & ColorsDescription<T>>) => ColorDescription;
|
|
15
|
-
export type ColorDescription
|
|
16
|
-
T extends {
|
|
15
|
+
export type ColorDescription<T extends {
|
|
17
16
|
[key in keyof T]: ColorDescription;
|
|
18
17
|
} = ColorsDescriptionStruct> = ColorDescriptionStatic | ColorDescriptionCallable<T>;
|
|
19
18
|
/**
|
|
@@ -70,8 +70,7 @@ export interface WithThemeType {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* Тема, в которой все значения пикселизированы. Т.е. 16 -> '16px'
|
|
73
|
-
*/
|
|
74
|
-
export type PixelifyTheme<T extends Partial<Record<keyof T, any>> = StaticTokens<Theme>> = StringifyObject<Omit<T, 'breakpoints' | 'themeType'>> & Pick<T, Extract<'breakpoints', keyof T>> & {
|
|
73
|
+
*/ export type PixelifyTheme<T extends Partial<Record<keyof T, any>> = StaticTokens<Theme>> = StringifyObject<Omit<T, 'breakpoints' | 'themeType'>> & Pick<T, Extract<'breakpoints', keyof T>> & {
|
|
75
74
|
themeType: 'pixelify';
|
|
76
75
|
themeName: string;
|
|
77
76
|
colorScheme: Property.ColorScheme;
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Как Partial, но уходящий вглубь.
|
|
20
|
-
*/
|
|
21
|
-
export type DeepPartial<T> = T extends object ? {
|
|
20
|
+
*/ export type DeepPartial<T> = T extends object ? {
|
|
22
21
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
23
22
|
} : T;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { ColorDescription, ColorsDescriptionStruct, ColorWithStates } from "../../general/colors/index.ts";
|
|
2
|
+
import type { ThemeCssVars } from "../../general/index.ts";
|
|
3
|
+
import type { Adaptive } from "../../general/tools/index.ts";
|
|
4
|
+
import type { Font } from "../../general/typography/index.ts";
|
|
5
|
+
import type { LocalParadigmColorsDescriptionStruct, ParadigmTheme, ParadigmThemeDescription } from "../../namespaces/paradigm/index.ts";
|
|
6
|
+
/**
|
|
7
|
+
* Локальная типографика WorkSpaceChats (UI-KIT Chats Web).
|
|
8
|
+
* Источник: Figma UI-KIT-Chats-Web, фрейм Fonts.
|
|
9
|
+
*/ export interface LocalWorkSpaceChatsTypography {
|
|
10
|
+
/**
|
|
11
|
+
* @desc Title 3 • 400. Regular (mobile)
|
|
12
|
+
* @tags font
|
|
13
|
+
*/ fontTitle3400: Adaptive<Font>;
|
|
14
|
+
/**
|
|
15
|
+
* @desc Caption 1 • 500. Regular (mobile)
|
|
16
|
+
* @tags font
|
|
17
|
+
*/ fontCaption1500: Adaptive<Font>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Локальные цвета темы WorkSpaceChats (чат-токены из UI-KIT Chats Web).
|
|
21
|
+
* Источник: Figma-переменные коллекции Colors (группа Chat).
|
|
22
|
+
*/ export interface LocalWorkSpaceChatsColorsDescriptionStruct {
|
|
23
|
+
// Text
|
|
24
|
+
/**
|
|
25
|
+
* @desc Цвет для системных сообщений в чате
|
|
26
|
+
* @tags color, text, alpha
|
|
27
|
+
*/ colorTextMediumAlpha: ColorDescription;
|
|
28
|
+
// Icon
|
|
29
|
+
/**
|
|
30
|
+
* @desc Цвет для замьюченных уведомлений в рисентах
|
|
31
|
+
* @tags color, icon, alpha
|
|
32
|
+
*/ colorIconNotificationNeutralAlpha: ColorDescription;
|
|
33
|
+
/**
|
|
34
|
+
* @desc Цвет для акцентного уведомления о реакции в рисентах
|
|
35
|
+
* @tags color, icon
|
|
36
|
+
*/ colorIconNotificationRed: ColorDescription;
|
|
37
|
+
/**
|
|
38
|
+
* @desc Цвет для акцентных уведомлений в рисентах
|
|
39
|
+
* @tags color, icon
|
|
40
|
+
*/ colorIconNotificationAccent: ColorDescription;
|
|
41
|
+
// Bubble
|
|
42
|
+
/**
|
|
43
|
+
* @desc Акцентный фон пузыря сообщения
|
|
44
|
+
* @tags color, bubble, background
|
|
45
|
+
*/ colorBubbleBackgroundAccent: ColorDescription;
|
|
46
|
+
/**
|
|
47
|
+
* @desc Нейтральный фон пузыря сообщения
|
|
48
|
+
* @tags color, bubble, background
|
|
49
|
+
*/ colorBubbleBackgroundNeutral: ColorDescription;
|
|
50
|
+
/**
|
|
51
|
+
* @desc Акцентная подсветка пузыря сообщения
|
|
52
|
+
* @tags color, bubble, background, alpha
|
|
53
|
+
*/ colorBubbleHighlightAccentAlpha: ColorDescription;
|
|
54
|
+
/**
|
|
55
|
+
* @desc Цвет текста в пузыре — красный
|
|
56
|
+
* @tags color, bubble, text
|
|
57
|
+
*/ colorBubbleTextRed: ColorDescription;
|
|
58
|
+
/**
|
|
59
|
+
* @desc Цвет текста в пузыре — оранжевый
|
|
60
|
+
* @tags color, bubble, text
|
|
61
|
+
*/ colorBubbleTextOrange: ColorDescription;
|
|
62
|
+
/**
|
|
63
|
+
* @desc Цвет текста в пузыре — персиковый
|
|
64
|
+
* @tags color, bubble, text
|
|
65
|
+
*/ colorBubbleTextPeach: ColorDescription;
|
|
66
|
+
/**
|
|
67
|
+
* @desc Цвет текста в пузыре — жёлтый
|
|
68
|
+
* @tags color, bubble, text
|
|
69
|
+
*/ colorBubbleTextYellow: ColorDescription;
|
|
70
|
+
/**
|
|
71
|
+
* @desc Цвет текста в пузыре — лаймовый
|
|
72
|
+
* @tags color, bubble, text
|
|
73
|
+
*/ colorBubbleTextLime: ColorDescription;
|
|
74
|
+
/**
|
|
75
|
+
* @desc Цвет текста в пузыре — зелёный
|
|
76
|
+
* @tags color, bubble, text
|
|
77
|
+
*/ colorBubbleTextGreen: ColorDescription;
|
|
78
|
+
/**
|
|
79
|
+
* @desc Цвет текста в пузыре — cyan
|
|
80
|
+
* @tags color, bubble, text
|
|
81
|
+
*/ colorBubbleTextCyan: ColorDescription;
|
|
82
|
+
/**
|
|
83
|
+
* @desc Цвет текста в пузыре — мятный
|
|
84
|
+
* @tags color, bubble, text
|
|
85
|
+
*/ colorBubbleTextMint: ColorDescription;
|
|
86
|
+
/**
|
|
87
|
+
* @desc Цвет текста в пузыре — салатовый
|
|
88
|
+
* @tags color, bubble, text
|
|
89
|
+
*/ colorBubbleTextSeagreen: ColorDescription;
|
|
90
|
+
/**
|
|
91
|
+
* @desc Цвет текста в пузыре — небесный
|
|
92
|
+
* @tags color, bubble, text
|
|
93
|
+
*/ colorBubbleTextSky: ColorDescription;
|
|
94
|
+
/**
|
|
95
|
+
* @desc Цвет текста в пузыре — синий
|
|
96
|
+
* @tags color, bubble, text
|
|
97
|
+
*/ colorBubbleTextBlue: ColorDescription;
|
|
98
|
+
/**
|
|
99
|
+
* @desc Цвет текста в пузыре — индиго
|
|
100
|
+
* @tags color, bubble, text
|
|
101
|
+
*/ colorBubbleTextIndigo: ColorDescription;
|
|
102
|
+
/**
|
|
103
|
+
* @desc Цвет текста в пузыре — фиолетовый
|
|
104
|
+
* @tags color, bubble, text
|
|
105
|
+
*/ colorBubbleTextViolet: ColorDescription;
|
|
106
|
+
/**
|
|
107
|
+
* @desc Цвет текста в пузыре — лавандовый
|
|
108
|
+
* @tags color, bubble, text
|
|
109
|
+
*/ colorBubbleTextLavender: ColorDescription;
|
|
110
|
+
/**
|
|
111
|
+
* @desc Цвет текста в пузыре — коралловый
|
|
112
|
+
* @tags color, bubble, text
|
|
113
|
+
*/ colorBubbleTextCoral: ColorDescription;
|
|
114
|
+
/**
|
|
115
|
+
* @desc Цвет текста в пузыре — розовый
|
|
116
|
+
* @tags color, bubble, text
|
|
117
|
+
*/ colorBubbleTextPink: ColorDescription;
|
|
118
|
+
// Other
|
|
119
|
+
/**
|
|
120
|
+
* @desc Фон pull-to-refresh с акцентом
|
|
121
|
+
* @tags color, other, alpha
|
|
122
|
+
*/ colorOtherPullBackgroundAccentAlpha: ColorDescription;
|
|
123
|
+
/**
|
|
124
|
+
* @desc Прогресс pull-to-refresh с акцентом
|
|
125
|
+
* @tags color, other, alpha
|
|
126
|
+
*/ colorOtherPullProgressAccentAlpha: ColorDescription;
|
|
127
|
+
/**
|
|
128
|
+
* @desc Фоновый размытый слой
|
|
129
|
+
* @tags color, other, background, alpha
|
|
130
|
+
*/ colorOtherBackgroundBlurAlpha: ColorDescription;
|
|
131
|
+
/**
|
|
132
|
+
* @desc Фон медиа в пузыре сообщения
|
|
133
|
+
* @tags color, other, background, alpha
|
|
134
|
+
*/ colorOtherBackgroundMediaAlpha: ColorDescription;
|
|
135
|
+
// States
|
|
136
|
+
/**
|
|
137
|
+
* @desc Прозрачный фон пузыря — Hover
|
|
138
|
+
* @tags color, bubble, alpha
|
|
139
|
+
*/ colorBubbleTransparentHover: ColorDescription;
|
|
140
|
+
/**
|
|
141
|
+
* @desc Прозрачный фон пузыря — Active
|
|
142
|
+
* @tags color, bubble, alpha
|
|
143
|
+
*/ colorBubbleTransparentActive: ColorDescription;
|
|
144
|
+
}
|
|
145
|
+
type WorkSpaceChatsLocalColors = {
|
|
146
|
+
[key in keyof LocalWorkSpaceChatsColorsDescriptionStruct]: ColorWithStates;
|
|
147
|
+
};
|
|
148
|
+
export interface ThemeWorkSpaceChats extends ParadigmTheme, LocalWorkSpaceChatsTypography, WorkSpaceChatsLocalColors {
|
|
149
|
+
}
|
|
150
|
+
export interface ThemeWorkSpaceChatsDescription extends ParadigmThemeDescription, LocalWorkSpaceChatsTypography {
|
|
151
|
+
colors: LocalParadigmColorsDescriptionStruct & ColorsDescriptionStruct & LocalWorkSpaceChatsColorsDescriptionStruct;
|
|
152
|
+
}
|
|
153
|
+
export interface ThemeWorkSpaceChatsCssVars extends ThemeCssVars<ThemeWorkSpaceChats, 'breakpoints'> {
|
|
154
|
+
}
|
|
155
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ThemeWorkSpaceChats, ThemeWorkSpaceChatsCssVars, ThemeWorkSpaceChatsDescription } from "../workSpaceChats/index.ts";
|
|
2
|
+
export interface ThemeWorkSpaceChatsDark extends ThemeWorkSpaceChats {
|
|
3
|
+
}
|
|
4
|
+
export interface ThemeWorkSpaceChatsDarkDescription extends ThemeWorkSpaceChatsDescription {
|
|
5
|
+
}
|
|
6
|
+
export interface ThemeWorkSpaceChatsDarkCssVars extends ThemeWorkSpaceChatsCssVars {
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/package.json
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/vkui-tokens",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.87.0",
|
|
4
4
|
"description": "Репозиторий, который содержит в себе дизайн-токены и другие инструменты объединенной дизайн-системы VKUI и Paradigm",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://vkcom.github.io/vkui-tokens",
|
|
8
8
|
"main": "./utils/descriptions.cjs",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "mkdir -p dist &&
|
|
11
|
-
"build:local": "
|
|
12
|
-
"clean-build": "
|
|
10
|
+
"build": "mkdir -p dist && yarn build:script && yarn swc",
|
|
11
|
+
"build:local": "yarn build && yarn clear:dist",
|
|
12
|
+
"clean-build": "yarn clear:src && yarn build",
|
|
13
13
|
"build:script": "node src/build/index.ts",
|
|
14
|
-
"lint": "
|
|
15
|
-
"lint:fix": "
|
|
16
|
-
"lint:prettier": "prettier --check --ignore-unknown --cache --cache-location .cache/.prettiercache .",
|
|
14
|
+
"lint": "biome check .",
|
|
15
|
+
"lint:fix": "biome check --write .",
|
|
17
16
|
"tsc": "tsc --project tsconfig.json",
|
|
18
17
|
"swc": "swc dist/ --config-file package.swcrc --strip-leading-paths --out-file-extension js -d dist -C module.type=es6",
|
|
19
18
|
"test": "node --test",
|
|
20
|
-
"test:ci": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info",
|
|
19
|
+
"test:ci": "node --test --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info",
|
|
21
20
|
"clear:src": "find src -name '*.d.ts' -delete && find src -name '*.js' -delete",
|
|
22
21
|
"clear:dist": "find dist -regex '.*[^d]\\.ts' -delete",
|
|
23
22
|
"docs:dev": "cd docs/rspack && rspack serve -c rspack.client.mjs --mode development",
|
|
@@ -26,13 +25,7 @@
|
|
|
26
25
|
"prepare": "husky"
|
|
27
26
|
},
|
|
28
27
|
"lint-staged": {
|
|
29
|
-
"
|
|
30
|
-
"prettier --check",
|
|
31
|
-
"eslint"
|
|
32
|
-
],
|
|
33
|
-
"*.{json,md}": [
|
|
34
|
-
"prettier --check"
|
|
35
|
-
]
|
|
28
|
+
"*": "biome check --no-errors-on-unmatched"
|
|
36
29
|
},
|
|
37
30
|
"repository": "https://github.com/VKCOM/vkui-tokens.git",
|
|
38
31
|
"dependencies": {
|
|
@@ -40,62 +33,44 @@
|
|
|
40
33
|
"csstype": "^3.1.1"
|
|
41
34
|
},
|
|
42
35
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@rspack/
|
|
36
|
+
"@biomejs/biome": "2.5.6",
|
|
37
|
+
"@rspack/cli": "^2.1.7",
|
|
38
|
+
"@rspack/core": "^2.1.7",
|
|
45
39
|
"@svgr/webpack": "^8.1.0",
|
|
46
|
-
"@swc/cli": "^0.
|
|
47
|
-
"@swc/core": "^1.15.
|
|
40
|
+
"@swc/cli": "^0.8.1",
|
|
41
|
+
"@swc/core": "^1.15.46",
|
|
48
42
|
"@swc/plugin-transform-imports": "^12.15.0",
|
|
49
|
-
"@types/color": "^4.2.
|
|
43
|
+
"@types/color": "^4.2.1",
|
|
50
44
|
"@types/common-tags": "^1.8.4",
|
|
51
45
|
"@types/fs-extra": "^11.0.4",
|
|
52
|
-
"@types/lodash": "^4.17.
|
|
46
|
+
"@types/lodash": "^4.17.24",
|
|
53
47
|
"@types/node": "^24.1.0",
|
|
54
48
|
"@types/react": "^19.2.17",
|
|
55
49
|
"@types/react-dom": "^19.2.3",
|
|
56
50
|
"@vkontakte/appearance": "https://github.com/VKCOM/Appearance#v10.2.0",
|
|
57
|
-
"@vkontakte/icons": "^3.
|
|
58
|
-
"@vkontakte/prettier-config": "^0.2.1",
|
|
51
|
+
"@vkontakte/icons": "^3.64.1",
|
|
59
52
|
"@vkontakte/vkjs": "^2.0.2",
|
|
60
|
-
"@vkontakte/vkui": "^
|
|
53
|
+
"@vkontakte/vkui": "^8.3.1",
|
|
61
54
|
"clsx": "^2.1.1",
|
|
62
|
-
"color": "^
|
|
55
|
+
"color": "^5.0.3",
|
|
63
56
|
"common-tags": "^1.8.2",
|
|
64
57
|
"css.escape": "^1.5.1",
|
|
65
|
-
"
|
|
66
|
-
"eslint-config-prettier": "^9.1.0",
|
|
67
|
-
"eslint-import-resolver-typescript": "4.4.4",
|
|
68
|
-
"eslint-plugin-compat": "^6.0.2",
|
|
69
|
-
"eslint-plugin-import": "^2.32.0",
|
|
70
|
-
"eslint-plugin-jasmine": "^4.2.2",
|
|
71
|
-
"eslint-plugin-node": "^11.1.0",
|
|
72
|
-
"eslint-plugin-prettier": "^5.5.3",
|
|
73
|
-
"eslint-plugin-promise": "^7.2.1",
|
|
74
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
75
|
-
"eslint-plugin-sonarjs": "^3.0.4",
|
|
76
|
-
"eslint-plugin-unicorn": "^55.0.0",
|
|
77
|
-
"fs-extra": "^11.3.0",
|
|
58
|
+
"fs-extra": "^11.4.0",
|
|
78
59
|
"highlight.js": "^11.11.1",
|
|
79
60
|
"html-loader": "^5.1.0",
|
|
80
61
|
"husky": "^9.1.7",
|
|
81
|
-
"lint-staged": "^17.0
|
|
62
|
+
"lint-staged": "^17.2.0",
|
|
82
63
|
"lodash": "^4.18.1",
|
|
83
|
-
"
|
|
84
|
-
"react": "^19.2.
|
|
85
|
-
"react-dom": "^
|
|
86
|
-
"react-router-dom": "^7.18.1",
|
|
64
|
+
"react": "^19.2.8",
|
|
65
|
+
"react-dom": "^19.2.8",
|
|
66
|
+
"react-router-dom": "^7.18.2",
|
|
87
67
|
"remark": "^15.0.1",
|
|
88
68
|
"remark-html": "^16.0.1",
|
|
89
69
|
"remark-loader": "^6.0.0",
|
|
90
|
-
"ts-morph": "^
|
|
91
|
-
"typescript": "^
|
|
92
|
-
"typescript-eslint": "^7.7.1"
|
|
70
|
+
"ts-morph": "^28.0.0",
|
|
71
|
+
"typescript": "^7.0.2"
|
|
93
72
|
},
|
|
94
|
-
"
|
|
95
|
-
"npm": ">=9.3.1",
|
|
96
|
-
"yarn": ">=1.21.1 <2"
|
|
97
|
-
},
|
|
98
|
-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
73
|
+
"packageManager": "yarn@4.17.1",
|
|
99
74
|
"publishConfig": {
|
|
100
75
|
"provenance": true
|
|
101
76
|
}
|
|
@@ -5,7 +5,6 @@ import type { Gradients } from "../../interfaces/general/gradients/index.ts";
|
|
|
5
5
|
import type { ColorsDescription, ThemeDescription } from "../../interfaces/general/index.ts";
|
|
6
6
|
import type { Adaptive } from "../../interfaces/general/tools/index.ts";
|
|
7
7
|
import type { Fonts, TypographyBaseProps } from "../../interfaces/general/typography/index.ts";
|
|
8
|
-
// eslint-disable-next-line max-lines-per-function
|
|
9
8
|
export declare const colorFromFigma: (colorsScheme: 'light' | 'dark') => ColorsDescription;
|
|
10
9
|
export declare const lightColors: ColorsDescription;
|
|
11
10
|
export declare const lightGradient: Gradients;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import{_ as r}from"@swc/helpers/_/_object_spread";import{_ as e}from"@swc/helpers/_/_object_spread_props";import{getGradientPointsFromColor as a}from"../../build/helpers/getGradientPointsFromColor.js";import{alias as o}from"../../build/helpers/tokenHelpers.js";import t from"./figma/vk.json";var i='-apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif'
|
|
2
|
-
export var colorFromFigma=function(r){var e=t[r],a=e.background,o=e.text,i=e.icons,n=e.stroke,l=e.palette,c=e.other,g=t.light.states;return{colorsScheme:r,colors:{// Background
|
|
1
|
+
import{_ as r}from"@swc/helpers/_/_object_spread";import{_ as e}from"@swc/helpers/_/_object_spread_props";import{getGradientPointsFromColor as a}from"../../build/helpers/getGradientPointsFromColor.js";import{alias as o}from"../../build/helpers/tokenHelpers.js";import t from"./figma/vk.json";var i='-apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif';export var colorFromFigma=function(r){var e=t[r],a=e.background,o=e.text,i=e.icons,n=e.stroke,l=e.palette,c=e.other,g=t.light.states;return{colorsScheme:r,colors:{// Background
|
|
3
2
|
colorBackgroundAccent:a.background_accent,colorBackgroundAccentThemed:a.background_accent_themed,colorBackgroundAccentThemedAlpha:a.background_accent_themed_alpha,colorBackgroundAccentTint:a.background_accent_tint,colorBackgroundAccentAlternative:({light:"#2688EB",dark:"#529EF4"})[r],colorBackground:a.background,colorBackgroundContent:a.background_content,colorBackgroundContentAlpha:({light:"rgba(255, 255, 255, 0.8)",dark:"rgba(25, 25, 26, 0.8)"})[r],colorBackgroundContentInverse:({light:"#19191A",dark:"#FFFFFF"})[r],colorBackgroundSecondary:a.background_secondary,colorBackgroundSecondaryAlpha:({light:{normal:a.background_secondary_alpha,hover:g.background_secondary_alpha.hover,active:g.background_secondary_alpha.active},dark:"rgba(255, 255, 255, 0.10)"})[r],colorBackgroundTertiary:a.background_tertiary,colorBackgroundTertiaryAlpha:({light:{normal:a.background_tertiary_alpha,hover:"rgba(0, 0, 0, 0.07)",active:"rgba(0, 0, 0, 0.11)"},dark:{normal:"rgba(255, 255, 255, 0.03)",hover:"rgba(255, 255, 255, 0.07)",active:"rgba(255, 255, 255, 0.11)"}})[r],colorBackgroundContrast:a.background_contrast,colorBackgroundContrastSecondaryAlpha:({light:{normal:a.background_contrast_secondary_alpha,hover:g.background_contrast_secondary_alpha.hover,active:g.background_contrast_secondary_alpha.active},dark:{normal:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.24)",active:"rgba(255, 255, 255, 0.28)"}})[r],colorBackgroundContrastInverse:a.background_contrast_inverse,colorBackgroundContrastThemed:({light:"#FFFFFF",dark:"#2C2D2E"})[r],colorBackgroundModal:({light:"#FFFFFF",dark:"#1C1D1E"})[r],colorBackgroundModalInverse:({light:"#1C1D1E",dark:"#FFFFFF"})[r],colorBackgroundPositive:a.background_positive,colorBackgroundPositiveTint:({light:"#E8F9E8",dark:"#2E3E2B"})[r],colorBackgroundWarning:({light:"#FFF2D6",dark:"#473315"})[r],colorBackgroundNegative:a.background_negative,colorBackgroundNegativeTint:({light:"#FFE9E9",dark:"#522E2E"})[r],colorBackgroundInfoTint:({light:"#DEEEFF",dark:"#1C3954"})[r],colorFieldBackground:a.field_background,colorHeaderBackground:a.header_background,// Text
|
|
4
3
|
colorTextAccent:o.text_accent,colorTextAccentThemed:o.text_accent_themed,colorTextPrimary:o.text_primary,colorTextPrimaryAlpha:({light:"rgba(37, 41, 46, 0.84)",dark:"rgba(249, 252, 255, 0.72)"})[r],colorTextPrimaryInvariably:o.text_primary_invariably,colorTextSecondary:o.text_secondary,colorTextSecondaryAlpha:({light:"rgba(37, 41, 46, 0.55)",dark:"rgba(247, 251, 255, 0.42)"})[r],colorTextSubhead:o.text_subhead,colorTextTertiary:o.text_tertiary,colorTextContrast:o.text_contrast,colorTextContrastThemed:o.text_contrast_themed,colorTextPositive:o.text_positive,colorTextNegative:o.text_negative,colorTextLink:o.text_link,colorTextLinkThemed:o.text_link_themed,colorTextLinkTint:o.text_link_tint,colorTextLinkVisited:o.text_link_visited,colorTextMuted:o.text_muted,colorLinkContrast:o.link_contrast,// Icons
|
|
5
4
|
colorIconAccent:i.icon_accent,colorIconAccentThemed:i.icon_accent_themed,colorIconPrimary:i.icon_primary,colorIconPrimaryInvariably:i.icon_primary_invariably,colorIconMedium:i.icon_medium,colorIconMediumAlpha:i.icon_medium_alpha,colorIconSecondary:i.icon_secondary,colorIconSecondaryAlpha:({light:"rgba(0, 0, 0, 0.36)",dark:"rgba(241, 247, 255, 0.43)"})[r],colorIconTertiary:i.icon_tertiary,colorIconTertiaryAlpha:i.icon_tertiary_alpha,colorIconContrast:i.icon_contrast,colorIconContrastThemed:i.icon_contrast_themed,colorIconContrastSecondary:i.icon_contrast_secondary,colorIconPositive:i.icon_positive,colorIconWarning:({light:"#F8A01C",dark:"#EDB055"})[r],colorIconNegative:i.icon_negative,// Stroke
|