@vkontakte/vkui-tokens 4.43.0 → 4.43.2-dev-78ebf3.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.
Files changed (156) hide show
  1. package/build/compilers/docs/compileDocsJSON.js +2 -2
  2. package/build/compilers/index.js +9 -9
  3. package/build/compilers/styles/compileStyles.js +2 -2
  4. package/build/themeProcessors/customMedia/customMedia.js +4 -3
  5. package/build/themeProcessors/extractCssVarsStrict/extractCssVarsStrict.test.js +1 -1
  6. package/build/themeProcessors/extractVarsNames/extractVarsNames.test.js +1 -1
  7. package/interfaces/themes/dobro/index.d.ts +16 -26
  8. package/interfaces/themes/media/index.d.ts +149 -11
  9. package/package.json +21 -20
  10. package/themes/dobro/cssVars/declarations/index.css +278 -12
  11. package/themes/dobro/cssVars/declarations/noColors.css +0 -12
  12. package/themes/dobro/cssVars/declarations/noSizes.css +0 -12
  13. package/themes/dobro/cssVars/declarations/onlyMedia.css +278 -0
  14. package/themes/dobro/cssVars/declarations/onlyVariables.css +0 -12
  15. package/themes/dobro/cssVars/declarations/onlyVariables.js +2 -2
  16. package/themes/dobro/cssVars/declarations/onlyVariablesLocal.css +0 -12
  17. package/themes/dobro/cssVars/declarations/onlyVariablesLocalIncremental.css +0 -12
  18. package/themes/dobro/cssVars/theme/fallbacks/index.css +0 -12
  19. package/themes/dobro/cssVars/theme/fallbacks/index.less +30 -12
  20. package/themes/dobro/cssVars/theme/fallbacks/index.pcss +11 -13
  21. package/themes/dobro/cssVars/theme/fallbacks/index.scss +31 -13
  22. package/themes/dobro/cssVars/theme/fallbacks/index.styl +30 -12
  23. package/themes/dobro/cssVars/theme/index.js +57 -47
  24. package/themes/dobro/cssVars/theme/index.json +57 -47
  25. package/themes/dobro/docs.json +44 -48
  26. package/themes/dobro/index.css +0 -12
  27. package/themes/dobro/index.js +28 -12
  28. package/themes/dobro/index.json +28 -12
  29. package/themes/dobro/index.less +30 -12
  30. package/themes/dobro/index.pcss +11 -13
  31. package/themes/dobro/index.scss +31 -13
  32. package/themes/dobro/index.styl +30 -12
  33. package/themes/dobro/struct.json +28 -12
  34. package/themes/dobroDark/cssVars/declarations/index.css +278 -12
  35. package/themes/dobroDark/cssVars/declarations/noColors.css +0 -12
  36. package/themes/dobroDark/cssVars/declarations/noSizes.css +0 -12
  37. package/themes/dobroDark/cssVars/declarations/onlyMedia.css +278 -0
  38. package/themes/dobroDark/cssVars/declarations/onlyVariables.css +0 -12
  39. package/themes/dobroDark/cssVars/declarations/onlyVariables.js +2 -2
  40. package/themes/dobroDark/cssVars/declarations/onlyVariablesLocal.css +0 -12
  41. package/themes/dobroDark/cssVars/theme/fallbacks/index.css +0 -12
  42. package/themes/dobroDark/cssVars/theme/fallbacks/index.less +30 -12
  43. package/themes/dobroDark/cssVars/theme/fallbacks/index.pcss +11 -13
  44. package/themes/dobroDark/cssVars/theme/fallbacks/index.scss +31 -13
  45. package/themes/dobroDark/cssVars/theme/fallbacks/index.styl +30 -12
  46. package/themes/dobroDark/cssVars/theme/index.js +57 -47
  47. package/themes/dobroDark/cssVars/theme/index.json +57 -47
  48. package/themes/dobroDark/docs.json +44 -48
  49. package/themes/dobroDark/index.css +0 -12
  50. package/themes/dobroDark/index.js +28 -12
  51. package/themes/dobroDark/index.json +28 -12
  52. package/themes/dobroDark/index.less +30 -12
  53. package/themes/dobroDark/index.pcss +11 -13
  54. package/themes/dobroDark/index.scss +31 -13
  55. package/themes/dobroDark/index.styl +30 -12
  56. package/themes/dobroDark/struct.json +28 -12
  57. package/themes/media/cssVars/declarations/index.css +765 -686
  58. package/themes/media/cssVars/declarations/noColors.css +447 -437
  59. package/themes/media/cssVars/declarations/noSizes.css +20 -32
  60. package/themes/media/cssVars/declarations/onlyAdaptiveGroups.css +62 -38
  61. package/themes/media/cssVars/declarations/onlyMedia.css +256 -211
  62. package/themes/media/cssVars/declarations/onlyVariables.css +152 -132
  63. package/themes/media/cssVars/declarations/onlyVariables.js +2 -2
  64. package/themes/media/cssVars/declarations/onlyVariablesLocal.css +152 -132
  65. package/themes/media/cssVars/declarations/onlyVariablesLocalIncremental.css +152 -132
  66. package/themes/media/cssVars/theme/fallbacks/index.css +456 -446
  67. package/themes/media/cssVars/theme/fallbacks/index.less +194 -215
  68. package/themes/media/cssVars/theme/fallbacks/index.pcss +194 -215
  69. package/themes/media/cssVars/theme/fallbacks/index.scss +433 -491
  70. package/themes/media/cssVars/theme/fallbacks/index.styl +194 -215
  71. package/themes/media/cssVars/theme/index.js +666 -516
  72. package/themes/media/cssVars/theme/index.json +666 -516
  73. package/themes/media/docs.json +318 -91
  74. package/themes/media/index.css +447 -437
  75. package/themes/media/index.js +201 -177
  76. package/themes/media/index.json +201 -177
  77. package/themes/media/index.less +176 -197
  78. package/themes/media/index.pcss +176 -197
  79. package/themes/media/index.scss +402 -460
  80. package/themes/media/index.styl +176 -197
  81. package/themes/media/struct.json +207 -183
  82. package/themes/mediaDark/cssVars/declarations/index.css +765 -686
  83. package/themes/mediaDark/cssVars/declarations/noColors.css +447 -437
  84. package/themes/mediaDark/cssVars/declarations/noSizes.css +20 -32
  85. package/themes/mediaDark/cssVars/declarations/onlyAdaptiveGroups.css +62 -38
  86. package/themes/mediaDark/cssVars/declarations/onlyMedia.css +256 -211
  87. package/themes/mediaDark/cssVars/declarations/onlyVariables.css +152 -132
  88. package/themes/mediaDark/cssVars/declarations/onlyVariables.js +2 -2
  89. package/themes/mediaDark/cssVars/declarations/onlyVariablesLocal.css +152 -132
  90. package/themes/mediaDark/cssVars/declarations/onlyVariablesLocalIncremental.css +152 -132
  91. package/themes/mediaDark/cssVars/theme/fallbacks/index.css +456 -446
  92. package/themes/mediaDark/cssVars/theme/fallbacks/index.less +194 -215
  93. package/themes/mediaDark/cssVars/theme/fallbacks/index.pcss +194 -215
  94. package/themes/mediaDark/cssVars/theme/fallbacks/index.scss +433 -491
  95. package/themes/mediaDark/cssVars/theme/fallbacks/index.styl +194 -215
  96. package/themes/mediaDark/cssVars/theme/index.js +666 -516
  97. package/themes/mediaDark/cssVars/theme/index.json +666 -516
  98. package/themes/mediaDark/docs.json +318 -91
  99. package/themes/mediaDark/index.css +447 -437
  100. package/themes/mediaDark/index.js +201 -177
  101. package/themes/mediaDark/index.json +201 -177
  102. package/themes/mediaDark/index.less +176 -197
  103. package/themes/mediaDark/index.pcss +176 -197
  104. package/themes/mediaDark/index.scss +402 -460
  105. package/themes/mediaDark/index.styl +176 -197
  106. package/themes/mediaDark/struct.json +207 -183
  107. package/themes/mycom/cssVars/declarations/index.css +732 -653
  108. package/themes/mycom/cssVars/declarations/noColors.css +417 -407
  109. package/themes/mycom/cssVars/declarations/noSizes.css +350 -124
  110. package/themes/mycom/cssVars/declarations/onlyAdaptiveGroups.css +62 -38
  111. package/themes/mycom/cssVars/declarations/onlyMedia.css +253 -208
  112. package/themes/mycom/cssVars/declarations/onlyVariables.css +143 -123
  113. package/themes/mycom/cssVars/declarations/onlyVariables.js +2 -2
  114. package/themes/mycom/cssVars/declarations/onlyVariablesLocal.css +143 -123
  115. package/themes/mycom/cssVars/declarations/onlyVariablesLocalIncremental.css +143 -123
  116. package/themes/mycom/cssVars/theme/fallbacks/index.css +427 -417
  117. package/themes/mycom/cssVars/theme/fallbacks/index.less +184 -205
  118. package/themes/mycom/cssVars/theme/fallbacks/index.pcss +184 -205
  119. package/themes/mycom/cssVars/theme/fallbacks/index.scss +409 -467
  120. package/themes/mycom/cssVars/theme/fallbacks/index.styl +184 -205
  121. package/themes/mycom/cssVars/theme/index.js +657 -507
  122. package/themes/mycom/cssVars/theme/index.json +657 -507
  123. package/themes/mycom/docs.json +318 -91
  124. package/themes/mycom/index.css +417 -407
  125. package/themes/mycom/index.js +189 -165
  126. package/themes/mycom/index.json +189 -165
  127. package/themes/mycom/index.less +164 -185
  128. package/themes/mycom/index.pcss +164 -185
  129. package/themes/mycom/index.scss +371 -429
  130. package/themes/mycom/index.styl +164 -185
  131. package/themes/mycom/struct.json +199 -175
  132. package/themes/pharma/cssVars/declarations/index.css +765 -686
  133. package/themes/pharma/cssVars/declarations/noColors.css +447 -437
  134. package/themes/pharma/cssVars/declarations/noSizes.css +356 -130
  135. package/themes/pharma/cssVars/declarations/onlyAdaptiveGroups.css +62 -38
  136. package/themes/pharma/cssVars/declarations/onlyMedia.css +256 -211
  137. package/themes/pharma/cssVars/declarations/onlyVariables.css +152 -132
  138. package/themes/pharma/cssVars/declarations/onlyVariables.js +2 -2
  139. package/themes/pharma/cssVars/declarations/onlyVariablesLocal.css +152 -132
  140. package/themes/pharma/cssVars/declarations/onlyVariablesLocalIncremental.css +152 -132
  141. package/themes/pharma/cssVars/theme/fallbacks/index.css +456 -446
  142. package/themes/pharma/cssVars/theme/fallbacks/index.less +194 -215
  143. package/themes/pharma/cssVars/theme/fallbacks/index.pcss +194 -215
  144. package/themes/pharma/cssVars/theme/fallbacks/index.scss +433 -491
  145. package/themes/pharma/cssVars/theme/fallbacks/index.styl +194 -215
  146. package/themes/pharma/cssVars/theme/index.js +666 -516
  147. package/themes/pharma/cssVars/theme/index.json +666 -516
  148. package/themes/pharma/docs.json +318 -91
  149. package/themes/pharma/index.css +447 -437
  150. package/themes/pharma/index.js +201 -177
  151. package/themes/pharma/index.json +201 -177
  152. package/themes/pharma/index.less +176 -197
  153. package/themes/pharma/index.pcss +176 -197
  154. package/themes/pharma/index.scss +402 -460
  155. package/themes/pharma/index.styl +176 -197
  156. package/themes/pharma/struct.json +207 -183
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.compileDocsJSON = exports.getTypeDocs = void 0;
18
- var path_1 = __importDefault(require("path"));
18
+ var node_path_1 = __importDefault(require("node:path"));
19
19
  var ts_morph_1 = require("ts-morph");
20
20
  var capitalize_1 = require("../../helpers/capitalize");
21
21
  function getTagDescription(tag) {
@@ -149,7 +149,7 @@ exports.getTypeDocs = getTypeDocs;
149
149
  * - export { BaseTheme as MyTheme } from 'path/to/baseTheme.ts'
150
150
  */
151
151
  function compileDocsJSON(theme) {
152
- var themeFilePath = path_1.default.resolve("src/interfaces/themes/".concat(theme.themeName, "/index.ts"));
152
+ var themeFilePath = node_path_1.default.resolve("src/interfaces/themes/".concat(theme.themeName, "/index.ts"));
153
153
  var themeInterfaceName = "Theme".concat((0, capitalize_1.capitalize)(theme.themeName));
154
154
  var docs = getTypeDocs(themeFilePath, themeInterfaceName);
155
155
  return JSON.stringify(docs, null, ' ');
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.writeTsFile = exports.writeStyleFiles = exports.writeStructJsonFile = exports.writeJsonFile = exports.writeDocsFiles = exports.writeCssVarsSourceMediaFile = exports.writeCssVarsSourceFile = exports.writeCssVarsJsUtils = void 0;
7
+ var node_path_1 = __importDefault(require("node:path"));
7
8
  var fs_extra_1 = __importDefault(require("fs-extra"));
8
- var path_1 = __importDefault(require("path"));
9
9
  var compileGetDeclarationString_1 = require("./cssVars/jsUtils/compileGetDeclarationString");
10
10
  var compileDocsJSON_1 = require("./docs/compileDocsJSON");
11
11
  var compileJSON_1 = require("./json/compileJSON");
@@ -30,7 +30,7 @@ var cssModes = [
30
30
  function writeStructJsonFile(themePath, theme, _) {
31
31
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0439 json...");
32
32
  var fileName = "struct.json";
33
- var filePath = path_1.default.resolve(themePath, fileName);
33
+ var filePath = node_path_1.default.resolve(themePath, fileName);
34
34
  var content = (0, compileStructJSON_1.compileStructJSON)(theme);
35
35
  fs_extra_1.default.writeFileSync(filePath, content);
36
36
  console.log("\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0438\u0441\u0430\u043B\u0438 \u0444\u0430\u0439\u043B ".concat(fileName));
@@ -39,7 +39,7 @@ exports.writeStructJsonFile = writeStructJsonFile;
39
39
  function writeJsonFile(themePath, theme, _) {
40
40
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C json...");
41
41
  var fileName = "index.json";
42
- var filePath = path_1.default.resolve(themePath, fileName);
42
+ var filePath = node_path_1.default.resolve(themePath, fileName);
43
43
  var content = (0, compileJSON_1.compileJSON)(theme);
44
44
  fs_extra_1.default.writeFileSync(filePath, content);
45
45
  console.log("\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0438\u0441\u0430\u043B\u0438 \u0444\u0430\u0439\u043B ".concat(fileName));
@@ -49,7 +49,7 @@ exports.writeJsonFile = writeJsonFile;
49
49
  function writeTsFile(themePath, theme, type, themeName) {
50
50
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C ts...");
51
51
  var fileName = "index.ts";
52
- var filePath = path_1.default.resolve(themePath, fileName);
52
+ var filePath = node_path_1.default.resolve(themePath, fileName);
53
53
  var content = null;
54
54
  var sourceContent = (0, compileTypeScript_1.compileTypeScript)(theme);
55
55
  switch (type) {
@@ -83,7 +83,7 @@ function writeStyleFiles(themePath, theme) {
83
83
  a.forEach(function (format) {
84
84
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C ".concat(format, "..."));
85
85
  var fileName = "index.".concat(format);
86
- var filePath = path_1.default.resolve(themePath, fileName);
86
+ var filePath = node_path_1.default.resolve(themePath, fileName);
87
87
  var content = (0, compileStyles_1.compileStyles)(format, theme);
88
88
  fs_extra_1.default.writeFileSync(filePath, content);
89
89
  console.log("\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0438\u0441\u0430\u043B\u0438 \u0444\u0430\u0439\u043B ".concat(fileName));
@@ -98,7 +98,7 @@ cssVarsTheme, themeBase) {
98
98
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438 \u0434\u043B\u044F css vars \u0442\u0435\u043C...");
99
99
  for (var _i = 0, cssModes_1 = cssModes; _i < cssModes_1.length; _i++) {
100
100
  var modeConfig = cssModes_1[_i];
101
- var filePath = path_1.default.resolve(themePath, modeConfig.fileName);
101
+ var filePath = node_path_1.default.resolve(themePath, modeConfig.fileName);
102
102
  var compiledVars = (0, compileStyles_1.compileStyles)('css', theme, modeConfig.mode === 'default' ? 'withAdaptiveGroups' : modeConfig.mode, themeBase);
103
103
  var compiledBreakpoints = modeConfig.mode === 'default'
104
104
  ? "\n\n".concat((_a = (0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(cssVarsTheme)) !== null && _a !== void 0 ? _a : '')
@@ -116,7 +116,7 @@ exports.writeCssVarsSourceFile = writeCssVarsSourceFile;
116
116
  function writeCssVarsSourceMediaFile(themePath, theme) {
117
117
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C \u043C\u0435\u0434\u0438\u0430 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u0434\u043B\u044F css vars \u0442\u0435\u043C...");
118
118
  var fileName = 'onlyMedia.css';
119
- var filePath = path_1.default.resolve(themePath, fileName);
119
+ var filePath = node_path_1.default.resolve(themePath, fileName);
120
120
  var content = (0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme);
121
121
  if (content !== null) {
122
122
  fs_extra_1.default.writeFileSync(filePath, content);
@@ -131,7 +131,7 @@ function writeCssVarsJsUtils(themePath, theme) {
131
131
  { mode: 'onlyColors', fileName: 'onlyColors.ts' },
132
132
  ].forEach(function (_a) {
133
133
  var mode = _a.mode, fileName = _a.fileName;
134
- var filePath = path_1.default.resolve(themePath, fileName);
134
+ var filePath = node_path_1.default.resolve(themePath, fileName);
135
135
  var content = (0, compileGetDeclarationString_1.compileGetDeclarationString)(theme, mode);
136
136
  fs_extra_1.default.writeFileSync(filePath, content);
137
137
  console.log("\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0438\u0441\u0430\u043B\u0438 \u0444\u0430\u0439\u043B ".concat(fileName));
@@ -141,7 +141,7 @@ exports.writeCssVarsJsUtils = writeCssVarsJsUtils;
141
141
  function writeDocsFiles(themePath, theme) {
142
142
  console.log("\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u043C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E...");
143
143
  var fileName = "docs.json";
144
- var filePath = path_1.default.resolve(themePath, fileName);
144
+ var filePath = node_path_1.default.resolve(themePath, fileName);
145
145
  var content = (0, compileDocsJSON_1.compileDocsJSON)(theme);
146
146
  fs_extra_1.default.writeFileSync(filePath, content);
147
147
  console.log("\u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u043F\u0438\u0441\u0430\u043B\u0438 \u0444\u0430\u0439\u043B ".concat(fileName));
@@ -6,7 +6,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.compileStyles = exports.getRootSelector = exports.getPrefix = exports.serviceKeys = void 0;
8
8
  require("css.escape");
9
- var assert_1 = require("assert");
9
+ var node_assert_1 = require("node:assert");
10
10
  var common_tags_1 = require("common-tags");
11
11
  var getAllButColors_1 = require("../../helpers/getAllButColors");
12
12
  var getAllButSizes_1 = require("../../helpers/getAllButSizes");
@@ -51,7 +51,7 @@ function getRootSelector(theme, mode) {
51
51
  exports.getRootSelector = getRootSelector;
52
52
  function isDeepEqual(actual, expected) {
53
53
  try {
54
- (0, assert_1.deepStrictEqual)(actual, expected);
54
+ (0, node_assert_1.deepStrictEqual)(actual, expected);
55
55
  return true;
56
56
  }
57
57
  catch (_) {
@@ -32,12 +32,13 @@ function processCustomMedia(_a) {
32
32
  var usingViewports = (0, exports.getUsingViewports)(breakpoints);
33
33
  var result = {};
34
34
  usingViewports.forEach(function (viewport, index, array) {
35
- var _a;
35
+ var _a, _b;
36
36
  if (viewport !== 'touch') {
37
37
  // больше теущего брейкпоинта
38
- result[(0, exports.getCustomMediaKey)(viewport, 'from')] = "(min-width: ".concat(breakpoints[viewport].breakpoint, "px)");
38
+ result[(0, exports.getCustomMediaKey)(viewport, 'from')] =
39
+ "(min-width: ".concat(breakpoints[viewport].breakpoint, "px)");
39
40
  // между текущим и следущим брейкпоинтом
40
- result[(0, exports.getCustomMediaKey)(viewport)] = "(min-width: ".concat(breakpoints[viewport].breakpoint, "px) and (max-width: ").concat(((_a = breakpoints[array[index + 1]]) === null || _a === void 0 ? void 0 : _a.breakpoint) - 1, "px)");
41
+ result[(0, exports.getCustomMediaKey)(viewport)] = "(min-width: ".concat(breakpoints[viewport].breakpoint, "px) and (max-width: ").concat(((_b = (_a = breakpoints[array[index + 1]]) === null || _a === void 0 ? void 0 : _a.breakpoint) !== null && _b !== void 0 ? _b : 0) - 1, "px)");
41
42
  }
42
43
  if (viewport === 'touch') {
43
44
  // меньше следующего
@@ -39,7 +39,7 @@ var extractCssVarsStrict_1 = require("./extractCssVarsStrict");
39
39
  },
40
40
  },
41
41
  };
42
- var expectedData = __assign({ breakpoints: __assign({}, theme.breakpoints) });
42
+ var expectedData = { breakpoints: __assign({}, theme.breakpoints) };
43
43
  (0, globals_1.expect)((0, extractCssVarsStrict_1.extractCssVarsStrict)(theme)).toStrictEqual(expectedData);
44
44
  });
45
45
  (0, globals_1.it)('should change type', function () {
@@ -63,7 +63,7 @@ var extractVarsNames_1 = require("./extractVarsNames");
63
63
  },
64
64
  },
65
65
  };
66
- var expectedData = __assign({ breakpoints: __assign({}, theme.breakpoints) });
66
+ var expectedData = { breakpoints: __assign({}, theme.breakpoints) };
67
67
  (0, globals_1.expect)((0, extractVarsNames_1.extractVarsNames)(theme)).toStrictEqual(expectedData);
68
68
  });
69
69
  (0, globals_1.it)('should change type', function () {
@@ -1,38 +1,28 @@
1
- import type { Theme, ThemeCssVars, ThemeDescription } from '../../general';
2
- import type { Adaptive } from '../../general/tools';
3
- import type { Fonts, TypographyBaseProps } from '../../general/typography';
4
- export interface ThemeDobro extends Theme, ThemeDobroMedia, ThemeDobroCustomTokens, ThemeDobroFonts {
5
- }
6
- export interface ThemeDobroDescription extends ThemeDescription, ThemeDobroMedia, ThemeDobroCustomTokens, ThemeDobroFonts {
7
- }
8
- export interface ThemeDobroCssVars extends ThemeCssVars<ThemeDobro> {
9
- }
1
+ import type { Theme, ThemeDescription } from '../../general';
2
+ import type { Breakpoints } from '../../general/tools';
3
+ import type { CustomMediaByViewport } from '../../general/tools/customMedia';
4
+ import type { DefaultViewports, ViewportsTuple } from '../../general/tools/viewports';
5
+ import type { ParadigmThemeCssVars } from '../../namespaces/paradigm';
6
+ type DobroViewportsTuple = ['touch', 'tablet', 'desktopS', 'desktopM'];
10
7
  interface ThemeDobroCustomTokens {
11
8
  dobroPortalZIndex: number;
12
9
  dobroPopoutZIndex: number;
13
10
  dobroModalZIndex: number;
14
11
  dobroMenuZIndex: number;
15
12
  }
16
- export interface ThemeDobroFonts {
13
+ interface ThemeDobroFonts {
17
14
  dobroFontFamily600: string;
18
15
  dobroFontFamily500: string;
19
16
  dobroFontFamily400: string;
20
17
  }
21
- export interface ThemeDobroMedia {
22
- dobroLayoutWidthToMobileS: string;
23
- dobroLayoutWidthMobileM: string;
24
- dobroLayoutWidthToMobileM: string;
25
- dobroLayoutWidthMobileL: string;
26
- dobroLayoutWidthToMobile: string;
27
- dobroLayoutWidthFromTablet: string;
28
- dobroLayoutWidthTablet: string;
29
- dobroLayoutWidthToTablet: string;
30
- dobroLayoutWidthFromDesktopS: string;
31
- dobroLayoutWidthDesktopS: string;
32
- dobroLayoutWidthToDesktopS: string;
33
- dobroLayoutWidthDesktopM: string;
18
+ interface ThemeDobroStatic<Vt extends ViewportsTuple = DefaultViewports> extends Theme, ThemeDobroCustomTokens, ThemeDobroFonts, Breakpoints<Vt> {
19
+ }
20
+ type ThemeDobroStaticType<Vt extends ViewportsTuple = DefaultViewports> = ThemeDobroStatic<Vt> & CustomMediaByViewport<Vt>;
21
+ interface ThemeDobroDescriptionStatic<Vt extends ViewportsTuple = DefaultViewports> extends ThemeDescription, ThemeDobroCustomTokens, ThemeDobroFonts, Breakpoints<Vt> {
22
+ }
23
+ interface ThemeDobroCssVarsStatic extends ParadigmThemeCssVars<DobroViewportsTuple, ThemeDobro> {
34
24
  }
35
- export type BaseFonts = Omit<{
36
- [key in keyof Fonts]: Adaptive<Fonts[key]>;
37
- }, 'fontHeadline'> & TypographyBaseProps;
25
+ export type ThemeDobro = ThemeDobroStaticType<DobroViewportsTuple>;
26
+ export type ThemeDobroDescription = ThemeDobroDescriptionStatic<DobroViewportsTuple>;
27
+ export type ThemeDobroCssVars = ThemeDobroCssVarsStatic;
38
28
  export {};
@@ -5,20 +5,72 @@ import { Font } from '../../general/typography';
5
5
  import { ParadigmTheme, ParadigmThemeCssVars, ParadigmThemeDescription } from '../../namespaces/paradigm';
6
6
  export type MediaViewportsTuple = ['touch', 'tablet', 'desktopS', 'desktopM'];
7
7
  interface ProjectColors {
8
+ /**
9
+ * @desc Акцентный цвет проекта auto.mail.ru
10
+ * @tags color
11
+ */
8
12
  colorPrimaryAuto: ColorWithStates;
13
+ /**
14
+ * @desc Основной акцентный цвет. Используют проекты news.mail.ru, sportmail.ru, pogoda.mail.ru
15
+ * @tags color
16
+ */
9
17
  colorPrimaryBase: ColorWithStates;
18
+ /**
19
+ * @desc Акцентный цвет проекта deti.mail.ru
20
+ * @tags color
21
+ */
10
22
  colorPrimaryDeti: ColorWithStates;
23
+ /**
24
+ * @desc Акцентный цвет проекта dobro.mail.ru
25
+ * @tags color
26
+ */
11
27
  colorPrimaryDobro: ColorWithStates;
28
+ /**
29
+ * @desc Акцентный цвет проекта health.mail.ru
30
+ * @tags color, lagacy
31
+ */
12
32
  colorPrimaryHealth: ColorWithStates;
33
+ /**
34
+ * @desc Альтернативный акцентный цвет проекта health.mail.ru
35
+ * @tags color, lagacy
36
+ */
13
37
  colorPrimaryHealthNew: ColorWithStates;
38
+ /**
39
+ * @desc Акцентный цвет проекта hi-tech.mail.ru
40
+ * @tags color
41
+ */
14
42
  colorPrimaryHitech: ColorWithStates;
43
+ /**
44
+ * @desc Акцентный цвет проекта kino.mail.ru
45
+ * @tags color
46
+ */
15
47
  colorPrimaryKino: ColorWithStates;
48
+ /**
49
+ * @desc Акцентный цвет проекта lady.mail.ru
50
+ * @tags color
51
+ */
16
52
  colorPrimaryLady: ColorWithStates;
17
53
  colorPrimaryMycom: ColorWithStates;
54
+ /**
55
+ * @desc Акцентный цвет проекта dom.mail.ru
56
+ * @tags color
57
+ */
18
58
  colorPrimaryRealty: ColorWithStates;
19
59
  colorPrimaryPharma: ColorWithStates;
60
+ /**
61
+ * @desc Акцентный цвет проекта pets.mail.ru
62
+ * @tags color
63
+ */
20
64
  colorPrimaryPets: ColorWithStates;
65
+ /**
66
+ * @desc Второстепенный акцентный цвет. Используют проекты news.mail.ru, sportmail.ru, pogoda.mail.ru
67
+ * @tags color
68
+ */
21
69
  colorSecondaryBase: ColorWithStates;
70
+ /**
71
+ * @desc Альтернативный акцентный цвет проекта health.mail.ru
72
+ * @tags color, lagacy
73
+ */
22
74
  colorSecondaryHealth: ColorWithStates;
23
75
  colorSecondaryMycom: ColorWithStates;
24
76
  }
@@ -38,34 +90,120 @@ type SocialColorsDescriptions = {
38
90
  [key in keyof SocialColors]: ColorDescription;
39
91
  };
40
92
  interface MediaUniqTokens {
41
- mediaFontMediaHeader: Adaptive<Font>;
93
+ /**
94
+ * @desc Заголовок h1
95
+ * @tags font
96
+ */
42
97
  mediaFontMediaTitle1: Adaptive<Font>;
98
+ /**
99
+ * @desc Заголовок h2
100
+ * @tags font
101
+ */
43
102
  mediaFontMediaTitle2: Adaptive<Font>;
103
+ /**
104
+ * @desc Заголовок h3
105
+ * @tags font
106
+ */
44
107
  mediaFontMediaTitle3: Adaptive<Font>;
108
+ /**
109
+ * @desc Заголовок h4
110
+ * @tags font
111
+ */
112
+ mediaFontMediaTitle4: Adaptive<Font>;
113
+ /**
114
+ * @desc Заголовок h5
115
+ * @tags font
116
+ */
117
+ mediaFontMediaTitle5: Adaptive<Font>;
118
+ /**
119
+ * @desc Заголовок h6
120
+ * @tags font
121
+ */
122
+ mediaFontMediaTitle6: Adaptive<Font>;
123
+ /**
124
+ * @desc Лид статьи
125
+ * @tags font
126
+ */
45
127
  mediaFontMediaLead: Adaptive<Font>;
128
+ /**
129
+ * @desc Цитата или другой врез
130
+ * @tags font
131
+ */
132
+ mediaFontMediaQuote: Adaptive<Font>;
133
+ /**
134
+ * @desc Автор цитаты
135
+ * @tags font
136
+ */
137
+ mediaFontMediaQuotePerson: Adaptive<Font>;
138
+ /**
139
+ * @desc Параграф статьи
140
+ * @tags font
141
+ */
46
142
  mediaFontMediaParagraph: Adaptive<Font>;
143
+ /**
144
+ * @desc Второстепенный блок текста
145
+ * @tags font
146
+ */
147
+ mediaFontMediaParagraphSecondary: Adaptive<Font>;
148
+ /**
149
+ * @desc Второстепенный текст
150
+ * @tags font
151
+ */
152
+ mediaFontMediaTextSecondaryLight: Adaptive<Font>;
153
+ /**
154
+ * @desc Подпись под блоком статьи
155
+ * @tags font
156
+ */
157
+ mediaFontMediaCaption: Adaptive<Font>;
158
+ /**
159
+ * @desc Подпись под блоком статьи заглавными буквами
160
+ * @tags font
161
+ */
162
+ mediaFontMediaCaptionCaps: Adaptive<Font>;
163
+ /**
164
+ * @desc Семейство шрифтов статьи
165
+ * @tags font
166
+ */
47
167
  fontFamilyArticle: Property.FontFamily;
48
- fontWeightArticle1: Property.FontWeight;
49
- fontWeightArticle2: Property.FontWeight;
50
168
  fontH1: Adaptive<Font>;
51
169
  fontH2: Adaptive<Font>;
52
170
  fontH3: Adaptive<Font>;
53
171
  fontH4: Adaptive<Font>;
54
- fontLead: Adaptive<Font>;
55
- fontArticleBody: Adaptive<Font>;
56
- fontSpecificText: Adaptive<Font>;
57
- fontSpecificFootnote: Adaptive<Font>;
58
- fontSpecificButton: Adaptive<Font>;
172
+ /**
173
+ * @desc Ширина колонки страницы
174
+ * @tags size, component
175
+ */
59
176
  gridWrapperContent: Adaptive<number | string>;
177
+ /**
178
+ * @desc Ширина основной колонки контента
179
+ * @tags size, component
180
+ */
60
181
  gridMainContent: Adaptive<number | string>;
182
+ /**
183
+ * @desc Ширина sidebar
184
+ * @tags size, component
185
+ */
61
186
  gridAsideContent: Adaptive<number | string>;
187
+ /**
188
+ * @desc
189
+ * @tags size, component
190
+ */
62
191
  gridColumnX2: Adaptive<string | number>;
192
+ /**
193
+ * @desc
194
+ * @tags size, component
195
+ */
63
196
  gridColumnX3: Adaptive<string | number>;
197
+ /**
198
+ * @desc
199
+ * @tags size, component
200
+ */
64
201
  gridColumnX4: Adaptive<string | number>;
202
+ /**
203
+ * @desc
204
+ * @tags size, component
205
+ */
65
206
  gridColumnX6: Adaptive<string | number>;
66
- gridContent: Adaptive<number | string>;
67
- gridLayoutArticle: Adaptive<string | number>;
68
- gridLayoutBanner: Adaptive<string | number>;
69
207
  }
70
208
  export interface ThemeMedia extends ParadigmTheme<MediaViewportsTuple>, ProjectColors, SocialColors, MediaUniqTokens {
71
209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/vkui-tokens",
3
- "version": "4.43.0",
3
+ "version": "4.43.2-dev-78ebf3.0",
4
4
  "description": "Репозиторий, который содержит в себе дизайн-токены и другие инструменты объединенной дизайн-системы VKUI и Paradigm",
5
5
  "license": "MIT",
6
6
  "homepage": "https://vkcom.github.io/vkui-tokens",
@@ -50,11 +50,9 @@
50
50
  "@types/fs-extra": "11.0.4",
51
51
  "@types/lodash": "4.14.202",
52
52
  "@types/node": "18.11.10",
53
- "@types/react": "18.2.48",
54
- "@types/react-dom": "18.2.18",
55
- "@typescript-eslint/eslint-plugin": "6.13.2",
56
- "@typescript-eslint/parser": "6.20.0",
57
- "@vkontakte/appearance": "https://github.com/VKCOM/Appearance#v10.1.7",
53
+ "@types/react": "18.2.55",
54
+ "@types/react-dom": "18.2.19",
55
+ "@vkontakte/appearance": "https://github.com/VKCOM/Appearance#v10.2.0",
58
56
  "@vkontakte/icons": "2.95.0",
59
57
  "@vkontakte/prettier-config": "0.1.0",
60
58
  "@vkontakte/vk-bridge": "2.12.2",
@@ -69,44 +67,47 @@
69
67
  "copy-webpack-plugin": "12.0.2",
70
68
  "css-loader": "6.8.1",
71
69
  "css.escape": "1.5.1",
72
- "eslint": "7.32.0",
73
- "eslint-config-prettier": "9.0.0",
74
- "eslint-config-silence": "1.0.0",
70
+ "eslint": "8.56.0",
71
+ "eslint-config-prettier": "9.1.0",
75
72
  "eslint-import-resolver-alias": "1.1.2",
76
73
  "eslint-plugin-compat": "4.2.0",
77
- "eslint-plugin-import": "2.28.1",
74
+ "eslint-plugin-import": "2.29.1",
78
75
  "eslint-plugin-jasmine": "4.1.3",
79
- "eslint-plugin-prettier": "4.2.1",
80
- "eslint-plugin-simple-import-sort": "10.0.0",
81
- "eslint-plugin-sonarjs": "0.19.0",
76
+ "eslint-plugin-node": "11.1.0",
77
+ "eslint-plugin-prettier": "5.1.3",
78
+ "eslint-plugin-promise": "6.1.1",
79
+ "eslint-plugin-simple-import-sort": "12.0.0",
80
+ "eslint-plugin-sonarjs": "0.24.0",
81
+ "eslint-plugin-unicorn": "51.0.1",
82
82
  "fs-extra": "11.2.0",
83
83
  "html-webpack-plugin": "5.6.0",
84
- "husky": "8.0.3",
84
+ "husky": "9.0.11",
85
85
  "jest": "29.7.0",
86
86
  "jest-junit": "16.0.0",
87
87
  "lint-staged": "15.2.0",
88
88
  "lodash": "4.17.21",
89
- "prettier": "2.8.8",
89
+ "prettier": "3.2.5",
90
90
  "react": "18.2.0",
91
91
  "react-dom": "18.2.0",
92
92
  "rimraf": "5.0.5",
93
93
  "style-loader": "3.3.3",
94
- "terser-webpack-plugin": "5.3.9",
94
+ "terser-webpack-plugin": "5.3.10",
95
95
  "ts-jest": "29.1.2",
96
96
  "ts-loader": "9.5.1",
97
97
  "ts-morph": "20.0.0",
98
98
  "ts-node": "10.9.2",
99
99
  "tsconfig-paths": "4.2.0",
100
100
  "tscpaths": "0.0.9",
101
- "type-fest": "4.10.1",
101
+ "type-fest": "4.10.2",
102
102
  "typescript": "5.2.2",
103
- "webpack": "5.89.0",
103
+ "typescript-eslint": "7.0.1",
104
+ "webpack": "5.90.1",
104
105
  "webpack-cli": "5.1.4",
105
106
  "webpack-dev-server": "4.15.1",
106
107
  "webpack-notifier": "1.15.0"
107
108
  },
108
109
  "engines": {
109
- "npm": "^9.3.1",
110
- "yarn": "^1.21.1"
110
+ "npm": ">=9.3.1",
111
+ "yarn": ">=1.21.1 <2"
111
112
  }
112
113
  }