@vkontakte/vkui-tokens 4.33.0 → 4.34.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 (100) hide show
  1. package/README.md +1 -41
  2. package/build/compilers/cssVars/declarations/compileBreakpointsCssVarsDeclaration.test.js +14 -13
  3. package/build/compilers/cssVars/jsUtils/compileGetDeclarationString.test.js +8 -7
  4. package/build/compilers/docs/compileDocsJSON.test.js +8 -7
  5. package/build/compilers/json/compileJSON.test.js +4 -3
  6. package/build/compilers/structJSON/compileStructJSON.test.js +4 -3
  7. package/build/compilers/styles/compileStyles.d.ts +1 -1
  8. package/build/compilers/styles/compileStyles.test.js +16 -15
  9. package/build/compilers/ts/compileTypeScript.test.js +4 -3
  10. package/build/expandTheme.test.js +20 -19
  11. package/build/helpers/capitalize.test.js +5 -5
  12. package/build/helpers/convertCamelToSnake.test.js +14 -13
  13. package/build/helpers/cssHelpers.test.js +12 -11
  14. package/build/helpers/flatifyTheme.test.js +16 -15
  15. package/build/helpers/getAllButColors.test.js +4 -3
  16. package/build/helpers/getAllButSizes.test.js +4 -3
  17. package/build/helpers/getGradientPointsFromColor.test.js +4 -3
  18. package/build/helpers/getOnlyColors.test.js +4 -3
  19. package/build/helpers/getStateFunctions.test.js +14 -14
  20. package/build/helpers/overrideOnlyNeeded.test.js +11 -10
  21. package/build/helpers/replacePropDeep.test.js +12 -11
  22. package/build/helpers/tokenHelpers.test.js +10 -9
  23. package/build/helpers/unCamelcasify.test.js +10 -9
  24. package/build/themeProcessors/createPseudoRootFromCssVars/createPseudoRootFromCssVars.test.js +14 -13
  25. package/build/themeProcessors/customMedia/customMedia.test.js +23 -22
  26. package/build/themeProcessors/expandColors/expandColors.test.js +16 -15
  27. package/build/themeProcessors/expandColors/mixColors.test.js +12 -11
  28. package/build/themeProcessors/expandColors/overlayColors.test.js +10 -9
  29. package/build/themeProcessors/extractCssVarsStrict/extractCssVarsStrict.test.js +14 -13
  30. package/build/themeProcessors/extractGeneralTokens/extractGeneralTokens.test.js +8 -7
  31. package/build/themeProcessors/extractVarsNames/extractVarsNames.test.js +38 -37
  32. package/build/themeProcessors/extractViewports/extractViewports.test.js +10 -9
  33. package/build/themeProcessors/pixelifyValues/pixelifyValues.test.js +13 -12
  34. package/interfaces/themes/portalUI/index.d.ts +199 -0
  35. package/interfaces/themes/portalUI/index.js +2 -0
  36. package/interfaces/themes/portalUIDark/index.d.ts +7 -0
  37. package/interfaces/themes/portalUIDark/index.js +2 -0
  38. package/package.json +11 -12
  39. package/themes/portalUI/cssVars/declarations/index.css +1484 -0
  40. package/themes/portalUI/cssVars/declarations/noColors.css +665 -0
  41. package/themes/portalUI/cssVars/declarations/noSizes.css +432 -0
  42. package/themes/portalUI/cssVars/declarations/onlyAdaptiveGroups.css +128 -0
  43. package/themes/portalUI/cssVars/declarations/onlyColors.css +383 -0
  44. package/themes/portalUI/cssVars/declarations/onlyColors.d.ts +3 -0
  45. package/themes/portalUI/cssVars/declarations/onlyColors.js +11 -0
  46. package/themes/portalUI/cssVars/declarations/onlyMedia.css +362 -0
  47. package/themes/portalUI/cssVars/declarations/onlyVariables.css +696 -0
  48. package/themes/portalUI/cssVars/declarations/onlyVariables.d.ts +3 -0
  49. package/themes/portalUI/cssVars/declarations/onlyVariables.js +11 -0
  50. package/themes/portalUI/cssVars/declarations/onlyVariablesLocal.css +696 -0
  51. package/themes/portalUI/cssVars/declarations/onlyVariablesLocalIncremental.css +696 -0
  52. package/themes/portalUI/cssVars/theme/fallbacks/index.css +993 -0
  53. package/themes/portalUI/cssVars/theme/fallbacks/index.less +780 -0
  54. package/themes/portalUI/cssVars/theme/fallbacks/index.pcss +773 -0
  55. package/themes/portalUI/cssVars/theme/fallbacks/index.scss +1004 -0
  56. package/themes/portalUI/cssVars/theme/fallbacks/index.styl +780 -0
  57. package/themes/portalUI/cssVars/theme/index.d.ts +4 -0
  58. package/themes/portalUI/cssVars/theme/index.js +4246 -0
  59. package/themes/portalUI/cssVars/theme/index.json +4243 -0
  60. package/themes/portalUI/docs.json +4076 -0
  61. package/themes/portalUI/index.css +993 -0
  62. package/themes/portalUI/index.d.ts +4 -0
  63. package/themes/portalUI/index.js +1296 -0
  64. package/themes/portalUI/index.json +1293 -0
  65. package/themes/portalUI/index.less +780 -0
  66. package/themes/portalUI/index.pcss +773 -0
  67. package/themes/portalUI/index.scss +1004 -0
  68. package/themes/portalUI/index.styl +780 -0
  69. package/themes/portalUI/struct.json +1319 -0
  70. package/themes/portalUIDark/cssVars/declarations/index.css +1483 -0
  71. package/themes/portalUIDark/cssVars/declarations/noColors.css +664 -0
  72. package/themes/portalUIDark/cssVars/declarations/noSizes.css +431 -0
  73. package/themes/portalUIDark/cssVars/declarations/onlyAdaptiveGroups.css +128 -0
  74. package/themes/portalUIDark/cssVars/declarations/onlyColors.css +383 -0
  75. package/themes/portalUIDark/cssVars/declarations/onlyColors.d.ts +3 -0
  76. package/themes/portalUIDark/cssVars/declarations/onlyColors.js +11 -0
  77. package/themes/portalUIDark/cssVars/declarations/onlyMedia.css +362 -0
  78. package/themes/portalUIDark/cssVars/declarations/onlyVariables.css +695 -0
  79. package/themes/portalUIDark/cssVars/declarations/onlyVariables.d.ts +3 -0
  80. package/themes/portalUIDark/cssVars/declarations/onlyVariables.js +11 -0
  81. package/themes/portalUIDark/cssVars/declarations/onlyVariablesLocal.css +695 -0
  82. package/themes/portalUIDark/cssVars/declarations/onlyVariablesLocalIncremental.css +695 -0
  83. package/themes/portalUIDark/cssVars/theme/fallbacks/index.css +992 -0
  84. package/themes/portalUIDark/cssVars/theme/fallbacks/index.less +779 -0
  85. package/themes/portalUIDark/cssVars/theme/fallbacks/index.pcss +772 -0
  86. package/themes/portalUIDark/cssVars/theme/fallbacks/index.scss +1003 -0
  87. package/themes/portalUIDark/cssVars/theme/fallbacks/index.styl +779 -0
  88. package/themes/portalUIDark/cssVars/theme/index.d.ts +4 -0
  89. package/themes/portalUIDark/cssVars/theme/index.js +4242 -0
  90. package/themes/portalUIDark/cssVars/theme/index.json +4239 -0
  91. package/themes/portalUIDark/docs.json +4076 -0
  92. package/themes/portalUIDark/index.css +992 -0
  93. package/themes/portalUIDark/index.d.ts +4 -0
  94. package/themes/portalUIDark/index.js +1295 -0
  95. package/themes/portalUIDark/index.json +1292 -0
  96. package/themes/portalUIDark/index.less +779 -0
  97. package/themes/portalUIDark/index.pcss +772 -0
  98. package/themes/portalUIDark/index.scss +1003 -0
  99. package/themes/portalUIDark/index.styl +779 -0
  100. package/themes/portalUIDark/struct.json +1318 -0
package/README.md CHANGED
@@ -21,10 +21,10 @@
21
21
  - [Подключение темы на страницу](#подключение-темы-на-страницу)
22
22
  - [Использование переменных в вёрстке](#использование-переменных-в-вёрстке)
23
23
  - [Использование базовой темы напрямую из пакета](#использование-базовой-темы-напрямую-из-пакета)
24
+ - [Создание новой темы для вашего проекта](docs/articles/new-theme/INDEX.md)
24
25
  - [Инструменты](#инструменты)
25
26
  - [Локальная сборка своих тем инструментами библиотеки](#локальная-сборка-своих-тем-инструментами-библиотеки)
26
27
  - [Наследование от существующей темы](#наследование-от-существующей-темы)
27
- - [Создание собственной темы "с нуля"](#создание-собственной-темы-с-нуля)
28
28
  - [Roadmap](#roadmap)
29
29
  - [Полезные ссылки](#полезные-ссылки)
30
30
  - [Информация для внесения изменений](CONTRIBUTING.md)
@@ -217,46 +217,6 @@ const { theme, pixelifyTheme, cssVarsTheme } = expandAll(myNewAwesomeTheme);
217
217
  // которую можно вставить в DOM или сохранить в файл
218
218
  const cssString = compileStyles('css', pixelifyTheme);
219
219
  ```
220
-
221
- ### Создание собственной темы "с нуля"
222
-
223
- В некоторых случаях нет необходимости наследоваться от одной из
224
- базовых тем. Библиотека позволяет сгенерировать свою тему из
225
- произвольного количества уникальных переменных.
226
-
227
- Пример:
228
-
229
- ```typescript
230
- import type { Adaptive } from '@vkontakte/vkui-tokens/interfaces/general/tools';
231
- import { expandAll } from '@vkontakte/vkui-tokens/build/expandTheme';
232
- import { compileStyles } from '@vkontakte/vkui-tokens/build/compilers/styles/compileStyles';
233
-
234
- interface MyNewAwesomeThemeDescription {
235
- myNewAwesomeToken: Adaptive<number>;
236
- }
237
-
238
- const myNewAwesomeTheme: MyNewAwesomeThemeDescription = {
239
- myNewAwesomeToken: {
240
- regular: 20,
241
- compact: 12,
242
- },
243
- };
244
-
245
- // получаем разные типы тем на основе описания
246
- const { theme, pixelifyTheme, cssVarsTheme } = expandAll(myNewAwesomeTheme);
247
-
248
- // получаем CSS-строку со всеми переменными темы,
249
- // которую можно вставить в DOM или сохранить в файл
250
- // буквально тут содержится:
251
- /*
252
- :root {
253
- --vkui--my_new_awesome_token--regular: 20px;
254
- --vkui--my_new_awesome_token--compact: 12px;
255
- }
256
- */
257
- const cssString = compileStyles('css', pixelifyTheme);
258
- ```
259
-
260
220
  # Roadmap
261
221
 
262
222
  - [ ] Добавить более умную генерацию active, hover состояний цвета.
@@ -4,14 +4,15 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  return cooked;
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ var globals_1 = require("@jest/globals");
7
8
  var common_tags_1 = require("common-tags");
8
9
  var compileBreakpointsCssVarsDeclaration_1 = require("./compileBreakpointsCssVarsDeclaration");
9
- describe('compileBreakpointsCssVarsDeclaration', function () {
10
- it('should not work without breakpoints', function () {
10
+ (0, globals_1.describe)('compileBreakpointsCssVarsDeclaration', function () {
11
+ (0, globals_1.it)('should not work without breakpoints', function () {
11
12
  var theme = {};
12
- expect((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe(null);
13
+ (0, globals_1.expect)((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe(null);
13
14
  });
14
- it('should work with breakpoints and empty vals', function () {
15
+ (0, globals_1.it)('should work with breakpoints and empty vals', function () {
15
16
  var theme = {
16
17
  breakpoints: {
17
18
  touch: {
@@ -24,9 +25,9 @@ describe('compileBreakpointsCssVarsDeclaration', function () {
24
25
  },
25
26
  },
26
27
  };
27
- expect((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe(null);
28
+ (0, globals_1.expect)((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe(null);
28
29
  });
29
- it('should work with non adaptive values', function () {
30
+ (0, globals_1.it)('should work with non adaptive values', function () {
30
31
  var theme = {
31
32
  breakpoints: {
32
33
  touch: {
@@ -44,9 +45,9 @@ describe('compileBreakpointsCssVarsDeclaration', function () {
44
45
  originalValue: '4px',
45
46
  },
46
47
  };
47
- expect((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe(null);
48
+ (0, globals_1.expect)((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe(null);
48
49
  });
49
- it('should work with flat adaptive values and several breakpotins', function () {
50
+ (0, globals_1.it)('should work with flat adaptive values and several breakpotins', function () {
50
51
  var theme = {
51
52
  breakpoints: {
52
53
  touch: {
@@ -75,9 +76,9 @@ describe('compileBreakpointsCssVarsDeclaration', function () {
75
76
  },
76
77
  },
77
78
  };
78
- expect((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\t\t\t"], ["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\t\t\t"]))));
79
+ (0, globals_1.expect)((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\t\t\t"], ["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--size_popup_base_padding: var(--vkui--size_popup_base_padding--regular);\n\t\t\t}\n\t\t\t"]))));
79
80
  });
80
- it('should work with flat adaptive values and several breakpotins and without overriding', function () {
81
+ (0, globals_1.it)('should work with flat adaptive values and several breakpotins and without overriding', function () {
81
82
  var theme = {
82
83
  breakpoints: {
83
84
  touch: {
@@ -101,9 +102,9 @@ describe('compileBreakpointsCssVarsDeclaration', function () {
101
102
  },
102
103
  },
103
104
  };
104
- expect((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: 20px;\n\t\t\t}\n\t\t\t"], ["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: 20px;\n\t\t\t}\n\t\t\t"]))));
105
+ (0, globals_1.expect)((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: 20px;\n\t\t\t}\n\t\t\t"], ["\n\t\t\t:root {\n\t\t\t\t--vkui--size_popup_base_padding: 20px;\n\t\t\t}\n\t\t\t"]))));
105
106
  });
106
- it('should work with adaptive complex object', function () {
107
+ (0, globals_1.it)('should work with adaptive complex object', function () {
107
108
  var theme = {
108
109
  breakpoints: {
109
110
  touch: {
@@ -147,7 +148,7 @@ describe('compileBreakpointsCssVarsDeclaration', function () {
147
148
  },
148
149
  },
149
150
  };
150
- expect((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\t\t\t:root {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t--vkui--font_h1--line_height: var(--vkui--font_h1--line_height--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t}\n\t\t\t"], ["\n\t\t\t:root {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t--vkui--font_h1--line_height: var(--vkui--font_h1--line_height--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t}\n\t\t\t"]))));
151
+ (0, globals_1.expect)((0, compileBreakpointsCssVarsDeclaration_1.compileBreakpointsCssVarsDeclaration)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\t\t\t:root {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t--vkui--font_h1--line_height: var(--vkui--font_h1--line_height--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t}\n\t\t\t"], ["\n\t\t\t:root {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t--vkui--font_h1--line_height: var(--vkui--font_h1--line_height--regular);\n\t\t\t}\n\n\t\t\t@media (max-width: 767px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-touch {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--compact);\n\t\t\t}\n\n\t\t\t@media (min-width: 768px) {\n\t\t\t\t:root, .vkui--force-auto {\n\t\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.vkui--force-desktop_s {\n\t\t\t\t--vkui--font_h1--font_size: var(--vkui--font_h1--font_size--regular);\n\t\t\t}\n\t\t\t"]))));
151
152
  });
152
153
  });
153
154
  var templateObject_1, templateObject_2, templateObject_3;
@@ -4,14 +4,15 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  return cooked;
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ var globals_1 = require("@jest/globals");
7
8
  var common_tags_1 = require("common-tags");
8
9
  var compileGetDeclarationString_1 = require("./compileGetDeclarationString");
9
- describe('compileGetDeclarationString', function () {
10
- it('should work with empty', function () {
10
+ (0, globals_1.describe)('compileGetDeclarationString', function () {
11
+ (0, globals_1.it)('should work with empty', function () {
11
12
  var theme = {};
12
- expect((0, compileGetDeclarationString_1.compileGetDeclarationString)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn ``;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {} as Properties;\n\t\t\t}\n\t\t\t"], ["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn \\`\\`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {} as Properties;\n\t\t\t}\n\t\t\t"]))));
13
+ (0, globals_1.expect)((0, compileGetDeclarationString_1.compileGetDeclarationString)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn ``;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {} as Properties;\n\t\t\t}\n\t\t\t"], ["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn \\`\\`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {} as Properties;\n\t\t\t}\n\t\t\t"]))));
13
14
  });
14
- it('should work with any values', function () {
15
+ (0, globals_1.it)('should work with any values', function () {
15
16
  var theme = {
16
17
  x1: {
17
18
  name: '--paradigm--x1',
@@ -52,9 +53,9 @@ describe('compileGetDeclarationString', function () {
52
53
  },
53
54
  },
54
55
  };
55
- expect((0, compileGetDeclarationString_1.compileGetDeclarationString)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn `--paradigm--x1: 4px;--vkui--size_popup_base_padding--compact: 16px;--vkui--size_popup_base_padding--regular: 20px;--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {\"--paradigm--x1\":\"4px\",\"--vkui--size_popup_base_padding--compact\":\"16px\",\"--vkui--size_popup_base_padding--regular\":\"20px\",\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"], ["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn \\`--paradigm--x1: 4px;--vkui--size_popup_base_padding--compact: 16px;--vkui--size_popup_base_padding--regular: 20px;--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;\\`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {\"--paradigm--x1\":\"4px\",\"--vkui--size_popup_base_padding--compact\":\"16px\",\"--vkui--size_popup_base_padding--regular\":\"20px\",\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"]))));
56
+ (0, globals_1.expect)((0, compileGetDeclarationString_1.compileGetDeclarationString)(theme)).toBe((0, common_tags_1.stripIndent)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn `--paradigm--x1: 4px;--vkui--size_popup_base_padding--compact: 16px;--vkui--size_popup_base_padding--regular: 20px;--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {\"--paradigm--x1\":\"4px\",\"--vkui--size_popup_base_padding--compact\":\"16px\",\"--vkui--size_popup_base_padding--regular\":\"20px\",\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"], ["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarString(): string {\n\t\t\t\treturn \\`--paradigm--x1: 4px;--vkui--size_popup_base_padding--compact: 16px;--vkui--size_popup_base_padding--regular: 20px;--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;\\`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarObject(): Properties {\n\t\t\t\treturn {\"--paradigm--x1\":\"4px\",\"--vkui--size_popup_base_padding--compact\":\"16px\",\"--vkui--size_popup_base_padding--regular\":\"20px\",\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"]))));
56
57
  });
57
- it('should work onlyColorsMode', function () {
58
+ (0, globals_1.it)('should work onlyColorsMode', function () {
58
59
  var theme = {
59
60
  x1: {
60
61
  name: '--paradigm--x1',
@@ -95,7 +96,7 @@ describe('compileGetDeclarationString', function () {
95
96
  },
96
97
  },
97
98
  };
98
- expect((0, compileGetDeclarationString_1.compileGetDeclarationString)(theme, 'onlyColors')).toBe((0, common_tags_1.stripIndent)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarColorsString(): string {\n\t\t\t\treturn `--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarColorsObject(): Properties {\n\t\t\t\treturn {\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"], ["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarColorsString(): string {\n\t\t\t\treturn \\`--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;\\`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarColorsObject(): Properties {\n\t\t\t\treturn {\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"]))));
99
+ (0, globals_1.expect)((0, compileGetDeclarationString_1.compileGetDeclarationString)(theme, 'onlyColors')).toBe((0, common_tags_1.stripIndent)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarColorsString(): string {\n\t\t\t\treturn `--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarColorsObject(): Properties {\n\t\t\t\treturn {\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"], ["\n\t\t\timport {Properties} from 'csstype';\n\n\t\t\texport function getDeclarationVarColorsString(): string {\n\t\t\t\treturn \\`--vkui--color_text_accent: white;--vkui--color_text_accent--hover: black;--vkui--color_text_accent--active: red;\\`;\n\t\t\t}\n\n\t\t\texport function getDeclarationVarColorsObject(): Properties {\n\t\t\t\treturn {\"--vkui--color_text_accent\":\"white\",\"--vkui--color_text_accent--hover\":\"black\",\"--vkui--color_text_accent--active\":\"red\"} as Properties;\n\t\t\t}\n\t\t\t"]))));
99
100
  });
100
101
  });
101
102
  var templateObject_1, templateObject_2, templateObject_3;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var globals_1 = require("@jest/globals");
3
4
  var compileDocsJSON_1 = require("./compileDocsJSON");
4
- describe('compileDocsJSON', function () {
5
- it('should correct compile documentation with reexported interface', function () {
5
+ (0, globals_1.describe)('compileDocsJSON', function () {
6
+ (0, globals_1.it)('should correct compile documentation with reexported interface', function () {
6
7
  var docs = (0, compileDocsJSON_1.getTypeDocs)('src/build/compilers/docs/__test__/testRecursiveReexport.ts', 'BaseTheme');
7
- expect(docs).toEqual({
8
+ (0, globals_1.expect)(docs).toEqual({
8
9
  importedBaseProp: {
9
10
  desc: [
10
11
  {
@@ -16,9 +17,9 @@ describe('compileDocsJSON', function () {
16
17
  },
17
18
  });
18
19
  });
19
- it('should correct compile documentation with jsdoc link', function () {
20
+ (0, globals_1.it)('should correct compile documentation with jsdoc link', function () {
20
21
  var docs = (0, compileDocsJSON_1.getTypeDocs)('src/build/compilers/docs/__test__/testLinks.ts', 'BaseTheme');
21
- expect(docs).toEqual({
22
+ (0, globals_1.expect)(docs).toEqual({
22
23
  importedBaseProp: {
23
24
  desc: [
24
25
  {
@@ -44,9 +45,9 @@ describe('compileDocsJSON', function () {
44
45
  },
45
46
  });
46
47
  });
47
- it('should correct compile documentation with imports', function () {
48
+ (0, globals_1.it)('should correct compile documentation with imports', function () {
48
49
  var docs = (0, compileDocsJSON_1.getTypeDocs)('src/build/compilers/docs/__test__/testTheme.ts', 'ThemeTest');
49
- expect(docs).toEqual({
50
+ (0, globals_1.expect)(docs).toEqual({
50
51
  prop: {
51
52
  desc: [],
52
53
  tags: ['empty description'],
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var globals_1 = require("@jest/globals");
3
4
  var compileJSON_1 = require("./compileJSON");
4
- describe('compileJSON', function () {
5
- it('should correct stringify', function () {
5
+ (0, globals_1.describe)('compileJSON', function () {
6
+ (0, globals_1.it)('should correct stringify', function () {
6
7
  var testData = {
7
8
  colorState: {
8
9
  normal: '#00103D',
9
10
  },
10
11
  toneValueHover: 0.04,
11
12
  };
12
- expect((0, compileJSON_1.compileJSON)(testData)).toBe('{\n\t"colorState": {\n\t\t"normal": "#00103D"\n\t},\n\t"toneValueHover": 0.04\n}');
13
+ (0, globals_1.expect)((0, compileJSON_1.compileJSON)(testData)).toBe('{\n\t"colorState": {\n\t\t"normal": "#00103D"\n\t},\n\t"toneValueHover": 0.04\n}');
13
14
  });
14
15
  });
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var globals_1 = require("@jest/globals");
3
4
  var compileStructJSON_1 = require("./compileStructJSON");
4
- describe('compileJSON', function () {
5
- it('should correct stringify', function () {
5
+ (0, globals_1.describe)('compileJSON', function () {
6
+ (0, globals_1.it)('should correct stringify', function () {
6
7
  var testData = {
7
8
  colorA: '#fff',
8
9
  colorsScheme: 'scheme',
9
10
  randomToken: 123,
10
11
  };
11
- expect((0, compileStructJSON_1.compileStructJSON)(testData)).toBe("{\n\t\"color\": {\n\t\t\"colorA\": \"#fff\"\n\t},\n\t\"colorsScheme\": {\n\t\t\"colorsScheme\": \"scheme\"\n\t},\n\t\"other\": {\n\t\t\"randomToken\": 123\n\t}\n}");
12
+ (0, globals_1.expect)((0, compileStructJSON_1.compileStructJSON)(testData)).toBe("{\n\t\"color\": {\n\t\t\"colorA\": \"#fff\"\n\t},\n\t\"colorsScheme\": {\n\t\t\"colorsScheme\": \"scheme\"\n\t},\n\t\"other\": {\n\t\t\"randomToken\": 123\n\t}\n}");
12
13
  });
13
14
  });
@@ -8,4 +8,4 @@ export declare function getRootSelector<PT extends PixelifyTheme>(theme: PT, mod
8
8
  /**
9
9
  * Компилирует строку со стилями (в разных форматах), на основе темы
10
10
  */
11
- export declare const compileStyles: <PT extends PixelifyTheme<import("../../../interfaces/general/tools/tokenValue").StaticTokens<import("../../../interfaces/general").Theme>> = PixelifyTheme<import("../../../interfaces/general/tools/tokenValue").StaticTokens<import("../../../interfaces/general").Theme>>>(format: Formats, theme: PT, mode?: CompileStylesMode, themeBase?: PT) => string;
11
+ export declare const compileStyles: <PT extends PixelifyTheme = PixelifyTheme>(format: Formats, theme: PT, mode?: CompileStylesMode, themeBase?: PT) => string;
@@ -4,16 +4,17 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  return cooked;
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ var globals_1 = require("@jest/globals");
7
8
  var common_tags_1 = require("common-tags");
8
9
  var compileStyles_1 = require("./compileStyles");
9
10
  var tokenProcessors_1 = require("./helpers/tokenProcessors");
10
11
  var formats = Object.values(tokenProcessors_1.EStyleTypes);
11
12
  function runTest(format, testData) {
12
13
  var compiled = (0, compileStyles_1.compileStyles)(format, testData.descriptionTheme, testData.mode, testData.descriptionThemeBase);
13
- expect(compiled).toBe(testData.result[format]);
14
+ (0, globals_1.expect)(compiled).toBe(testData.result[format]);
14
15
  }
15
- describe('compileStyles', function () {
16
- test.each(formats)('%s: should compile colors', function (format) {
16
+ (0, globals_1.describe)('compileStyles', function () {
17
+ globals_1.test.each(formats)('%s: should compile colors', function (format) {
17
18
  runTest(format, {
18
19
  descriptionTheme: {
19
20
  themeName: 'testTheme',
@@ -33,7 +34,7 @@ describe('compileStyles', function () {
33
34
  },
34
35
  });
35
36
  });
36
- test.each(formats)('%s: should compile flat class variables', function (format) {
37
+ globals_1.test.each(formats)('%s: should compile flat class variables', function (format) {
37
38
  runTest(format, {
38
39
  descriptionTheme: {
39
40
  themeName: 'testTheme',
@@ -52,7 +53,7 @@ describe('compileStyles', function () {
52
53
  },
53
54
  });
54
55
  });
55
- test.each(formats)('%s: should compile adaptive class variables', function (f) {
56
+ globals_1.test.each(formats)('%s: should compile adaptive class variables', function (f) {
56
57
  runTest(f, {
57
58
  descriptionTheme: {
58
59
  themeName: 'testTheme',
@@ -79,7 +80,7 @@ describe('compileStyles', function () {
79
80
  },
80
81
  });
81
82
  });
82
- test.each(formats)('%s: should compile adaptive flat variables', function (f) {
83
+ globals_1.test.each(formats)('%s: should compile adaptive flat variables', function (f) {
83
84
  runTest(f, {
84
85
  descriptionTheme: {
85
86
  themeName: 'testTheme',
@@ -100,7 +101,7 @@ describe('compileStyles', function () {
100
101
  },
101
102
  });
102
103
  });
103
- test.each(formats)('%s: should compile flat variables', function (f) {
104
+ globals_1.test.each(formats)('%s: should compile flat variables', function (f) {
104
105
  runTest(f, {
105
106
  descriptionTheme: {
106
107
  themeName: 'testTheme',
@@ -116,7 +117,7 @@ describe('compileStyles', function () {
116
117
  },
117
118
  });
118
119
  });
119
- test.each(formats)('%s: should compile media queries', function (f) {
120
+ globals_1.test.each(formats)('%s: should compile media queries', function (f) {
120
121
  runTest(f, {
121
122
  descriptionTheme: {
122
123
  themeName: 'testTheme',
@@ -133,7 +134,7 @@ describe('compileStyles', function () {
133
134
  },
134
135
  });
135
136
  });
136
- test.each(formats)('%s: should compile adaptive class variables with onlyAdaptiveGroups', function (f) {
137
+ globals_1.test.each(formats)('%s: should compile adaptive class variables with onlyAdaptiveGroups', function (f) {
137
138
  runTest(f, {
138
139
  descriptionTheme: {
139
140
  themeName: 'testTheme',
@@ -161,7 +162,7 @@ describe('compileStyles', function () {
161
162
  },
162
163
  });
163
164
  });
164
- test.each(formats)('%s: should compile adaptive class variables with mode=withAdaptiveGroups', function (f) {
165
+ globals_1.test.each(formats)('%s: should compile adaptive class variables with mode=withAdaptiveGroups', function (f) {
165
166
  runTest(f, {
166
167
  mode: 'withAdaptiveGroups',
167
168
  descriptionTheme: {
@@ -189,7 +190,7 @@ describe('compileStyles', function () {
189
190
  },
190
191
  });
191
192
  });
192
- test.each(formats)('%s: should compile onlyColors', function (f) {
193
+ globals_1.test.each(formats)('%s: should compile onlyColors', function (f) {
193
194
  runTest(f, {
194
195
  mode: 'onlyColors',
195
196
  descriptionTheme: {
@@ -213,7 +214,7 @@ describe('compileStyles', function () {
213
214
  },
214
215
  });
215
216
  });
216
- test.each(formats)('%s: should compile noSizes', function (f) {
217
+ globals_1.test.each(formats)('%s: should compile noSizes', function (f) {
217
218
  runTest(f, {
218
219
  mode: 'noSizes',
219
220
  descriptionTheme: {
@@ -237,7 +238,7 @@ describe('compileStyles', function () {
237
238
  },
238
239
  });
239
240
  });
240
- test.each(formats)('%s: should compile noColors', function (f) {
241
+ globals_1.test.each(formats)('%s: should compile noColors', function (f) {
241
242
  runTest(f, {
242
243
  mode: 'noColors',
243
244
  descriptionTheme: {
@@ -261,7 +262,7 @@ describe('compileStyles', function () {
261
262
  },
262
263
  });
263
264
  });
264
- test.each(formats)('%s: customized selector in onlyVariablesLocal', function (f) {
265
+ globals_1.test.each(formats)('%s: customized selector in onlyVariablesLocal', function (f) {
265
266
  runTest(f, {
266
267
  mode: 'onlyVariablesLocal',
267
268
  descriptionTheme: {
@@ -283,7 +284,7 @@ describe('compileStyles', function () {
283
284
  },
284
285
  });
285
286
  });
286
- test.each(formats)('%s: onlyVariablesLocalIncremental', function (f) {
287
+ globals_1.test.each(formats)('%s: onlyVariablesLocalIncremental', function (f) {
287
288
  runTest(f, {
288
289
  mode: 'onlyVariablesLocalIncremental',
289
290
  descriptionTheme: {
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var globals_1 = require("@jest/globals");
3
4
  var compileTypeScript_1 = require("./compileTypeScript");
4
- describe('compileTypeScript', function () {
5
+ (0, globals_1.describe)('compileTypeScript', function () {
5
6
  var testData = {
6
7
  themeName: 'base',
7
8
  };
8
- it('should work', function () {
9
- expect((0, compileTypeScript_1.compileTypeScript)(testData)).toBe("import { $$InterfaceName$$ } from '$$InterfaceURL$$';\n\nconst theme: $$InterfaceName$$ = {\n\t\"themeName\": \"base\"\n};\n\nexport default theme;\nexport { $$InterfaceName$$ };\n");
9
+ (0, globals_1.it)('should work', function () {
10
+ (0, globals_1.expect)((0, compileTypeScript_1.compileTypeScript)(testData)).toBe("import { $$InterfaceName$$ } from '$$InterfaceURL$$';\n\nconst theme: $$InterfaceName$$ = {\n\t\"themeName\": \"base\"\n};\n\nexport default theme;\nexport { $$InterfaceName$$ };\n");
10
11
  });
11
12
  });
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var globals_1 = require("@jest/globals");
3
4
  var expandTheme_1 = require("./expandTheme");
4
- describe('expandTheme', function () {
5
- describe('expandRootTheme', function () {
6
- it('should return specific props', function () {
5
+ (0, globals_1.describe)('expandTheme', function () {
6
+ (0, globals_1.describe)('expandRootTheme', function () {
7
+ (0, globals_1.it)('should return specific props', function () {
7
8
  var result = (0, expandTheme_1.expandRootTheme)({
8
9
  colorsScheme: 'light',
9
10
  colors: {
@@ -11,7 +12,7 @@ describe('expandTheme', function () {
11
12
  },
12
13
  someNewRandomToken: '3',
13
14
  });
14
- expect(result).toStrictEqual({
15
+ (0, globals_1.expect)(result).toStrictEqual({
15
16
  colorOverlayPrimary: {
16
17
  active: 'rgba(0, 0, 0, 0.56)',
17
18
  hover: 'rgba(0, 0, 0, 0.52)',
@@ -22,14 +23,14 @@ describe('expandTheme', function () {
22
23
  themeType: 'root',
23
24
  });
24
25
  });
25
- it('should work without colors', function () {
26
+ (0, globals_1.it)('should work without colors', function () {
26
27
  var result = (0, expandTheme_1.expandRootTheme)({
27
28
  someNewRandomToken: '3',
28
29
  sizeArrow: {
29
30
  regular: 3,
30
31
  },
31
32
  });
32
- expect(result).toStrictEqual({
33
+ (0, globals_1.expect)(result).toStrictEqual({
33
34
  sizeArrow: {
34
35
  regular: 3,
35
36
  },
@@ -38,8 +39,8 @@ describe('expandTheme', function () {
38
39
  });
39
40
  });
40
41
  });
41
- describe('expandAll', function () {
42
- it('should add specific prop theme', function () {
42
+ (0, globals_1.describe)('expandAll', function () {
43
+ (0, globals_1.it)('should add specific prop theme', function () {
43
44
  var result = (0, expandTheme_1.expandAll)({
44
45
  colorsScheme: 'light',
45
46
  colors: {
@@ -47,10 +48,10 @@ describe('expandTheme', function () {
47
48
  },
48
49
  someNewRandomToken: '3',
49
50
  });
50
- expect(result.theme).not.toBeUndefined();
51
- expect(result.theme.themeType).toBe('root');
51
+ (0, globals_1.expect)(result.theme).not.toBeUndefined();
52
+ (0, globals_1.expect)(result.theme.themeType).toBe('root');
52
53
  });
53
- it('should add specific prop pixelifyTheme', function () {
54
+ (0, globals_1.it)('should add specific prop pixelifyTheme', function () {
54
55
  var result = (0, expandTheme_1.expandAll)({
55
56
  colorsScheme: 'light',
56
57
  colors: {
@@ -58,19 +59,19 @@ describe('expandTheme', function () {
58
59
  },
59
60
  someNewRandomToken: '3',
60
61
  });
61
- expect(result.pixelifyTheme).not.toBeUndefined();
62
- expect(result.pixelifyTheme.themeType).toBe('pixelify');
62
+ (0, globals_1.expect)(result.pixelifyTheme).not.toBeUndefined();
63
+ (0, globals_1.expect)(result.pixelifyTheme.themeType).toBe('pixelify');
63
64
  });
64
- it('should pixelify in pixelifyTheme', function () {
65
+ (0, globals_1.it)('should pixelify in pixelifyTheme', function () {
65
66
  var result = (0, expandTheme_1.expandAll)({
66
67
  someNewRandomToken: '3',
67
68
  sizeArrow: {
68
69
  regular: 3,
69
70
  },
70
71
  });
71
- expect(result.pixelifyTheme.sizeArrow.regular).toBe('3px');
72
+ (0, globals_1.expect)(result.pixelifyTheme.sizeArrow.regular).toBe('3px');
72
73
  });
73
- it('should add specific prop cssVarsWide', function () {
74
+ (0, globals_1.it)('should add specific prop cssVarsWide', function () {
74
75
  var result = (0, expandTheme_1.expandAll)({
75
76
  colorsScheme: 'light',
76
77
  colors: {
@@ -78,7 +79,7 @@ describe('expandTheme', function () {
78
79
  },
79
80
  someNewRandomToken: '3',
80
81
  });
81
- expect(result.cssVarsThemeWide).toStrictEqual({
82
+ (0, globals_1.expect)(result.cssVarsThemeWide).toStrictEqual({
82
83
  colorOverlayPrimary: {
83
84
  active: {
84
85
  name: '--vkui--color_overlay_primary--active',
@@ -109,7 +110,7 @@ describe('expandTheme', function () {
109
110
  themeType: 'cssVarsWide',
110
111
  });
111
112
  });
112
- it('should add specific prop cssVars', function () {
113
+ (0, globals_1.it)('should add specific prop cssVars', function () {
113
114
  var result = (0, expandTheme_1.expandAll)({
114
115
  colorsScheme: 'light',
115
116
  colors: {
@@ -117,7 +118,7 @@ describe('expandTheme', function () {
117
118
  },
118
119
  someNewRandomToken: '3',
119
120
  });
120
- expect(result.cssVarsTheme).toStrictEqual({
121
+ (0, globals_1.expect)(result.cssVarsTheme).toStrictEqual({
121
122
  colorOverlayPrimary: {
122
123
  active: {
123
124
  name: '--vkui--color_overlay_primary--active',
@@ -2,17 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var globals_1 = require("@jest/globals");
4
4
  var capitalize_1 = require("./capitalize");
5
- describe('capitalize', function () {
6
- it('should work without letters', function () {
5
+ (0, globals_1.describe)('capitalize', function () {
6
+ (0, globals_1.it)('should work without letters', function () {
7
7
  (0, globals_1.expect)((0, capitalize_1.capitalize)('')).toBe('');
8
8
  });
9
- it('should work with 1 letter', function () {
9
+ (0, globals_1.it)('should work with 1 letter', function () {
10
10
  (0, globals_1.expect)((0, capitalize_1.capitalize)('a')).toBe('A');
11
11
  });
12
- it('should work with some letters', function () {
12
+ (0, globals_1.it)('should work with some letters', function () {
13
13
  (0, globals_1.expect)((0, capitalize_1.capitalize)('aaaaa')).toBe('Aaaaa');
14
14
  });
15
- it('should ignore another letters', function () {
15
+ (0, globals_1.it)('should ignore another letters', function () {
16
16
  (0, globals_1.expect)((0, capitalize_1.capitalize)('1ds')).toBe('1ds');
17
17
  });
18
18
  });
@@ -1,23 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var globals_1 = require("@jest/globals");
3
4
  var convertCamelToSnake_1 = require("./convertCamelToSnake");
4
- describe('convertCamelToSnake', function () {
5
- it('should correctly work with empty string', function () {
6
- expect((0, convertCamelToSnake_1.convertCamelToSnake)('')).toBe('');
5
+ (0, globals_1.describe)('convertCamelToSnake', function () {
6
+ (0, globals_1.it)('should correctly work with empty string', function () {
7
+ (0, globals_1.expect)((0, convertCamelToSnake_1.convertCamelToSnake)('')).toBe('');
7
8
  });
8
- it('should work with word lower letters', function () {
9
- expect((0, convertCamelToSnake_1.convertCamelToSnake)('hello')).toBe('hello');
9
+ (0, globals_1.it)('should work with word lower letters', function () {
10
+ (0, globals_1.expect)((0, convertCamelToSnake_1.convertCamelToSnake)('hello')).toBe('hello');
10
11
  });
11
- it('should work with Capitalize world', function () {
12
- expect((0, convertCamelToSnake_1.convertCamelToSnake)('Hello')).toBe('hello');
12
+ (0, globals_1.it)('should work with Capitalize world', function () {
13
+ (0, globals_1.expect)((0, convertCamelToSnake_1.convertCamelToSnake)('Hello')).toBe('hello');
13
14
  });
14
- it('should convert two words string', function () {
15
- expect((0, convertCamelToSnake_1.convertCamelToSnake)('desktopS')).toBe('desktop_s');
15
+ (0, globals_1.it)('should convert two words string', function () {
16
+ (0, globals_1.expect)((0, convertCamelToSnake_1.convertCamelToSnake)('desktopS')).toBe('desktop_s');
16
17
  });
17
- it('should convert many words string', function () {
18
- expect((0, convertCamelToSnake_1.convertCamelToSnake)('helloWorldMyFriend')).toBe('hello_world_my_friend');
18
+ (0, globals_1.it)('should convert many words string', function () {
19
+ (0, globals_1.expect)((0, convertCamelToSnake_1.convertCamelToSnake)('helloWorldMyFriend')).toBe('hello_world_my_friend');
19
20
  });
20
- it('should convert special case 1', function () {
21
- expect((0, convertCamelToSnake_1.convertCamelToSnake)('octaviusShadowLetterList')).toBe('octavius_shadow_letter_list');
21
+ (0, globals_1.it)('should convert special case 1', function () {
22
+ (0, globals_1.expect)((0, convertCamelToSnake_1.convertCamelToSnake)('octaviusShadowLetterList')).toBe('octavius_shadow_letter_list');
22
23
  });
23
24
  });